@primereact/headless 11.0.0-alpha.6 → 11.0.0-alpha.8
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/colorpicker/colorManager.d.ts +101 -0
- package/colorpicker/index.d.ts +3 -0
- package/colorpicker/index.mjs +2 -0
- package/colorpicker/index.mjs.map +1 -0
- package/colorpicker/input/index.d.ts +2 -0
- package/colorpicker/input/index.mjs +2 -0
- package/colorpicker/input/index.mjs.map +1 -0
- package/colorpicker/input/useColorPickerInput.d.ts +11 -0
- package/colorpicker/input/useColorPickerInput.props.d.ts +2 -0
- package/colorpicker/input/useColorPickerInput.test.d.ts +0 -0
- package/colorpicker/slider/index.d.ts +2 -0
- package/colorpicker/slider/index.mjs +2 -0
- package/colorpicker/slider/index.mjs.map +1 -0
- package/colorpicker/slider/useColorPickerSlider.d.ts +13 -0
- package/colorpicker/slider/useColorPickerSlider.props.d.ts +2 -0
- package/colorpicker/slider/useColorPickerSlider.test.d.ts +0 -0
- package/colorpicker/useColorPicker.d.ts +26 -0
- package/colorpicker/useColorPicker.props.d.ts +2 -0
- package/colorpicker/useColorPicker.test.d.ts +0 -0
- package/dataview/index.d.ts +2 -0
- package/dataview/index.mjs +2 -0
- package/dataview/index.mjs.map +1 -0
- package/dataview/useDataView.d.ts +3 -0
- package/dataview/useDataView.props.d.ts +2 -0
- package/dataview/useDataView.test.d.ts +0 -0
- package/datepicker/index.d.ts +2 -0
- package/datepicker/index.mjs +2 -0
- package/datepicker/index.mjs.map +1 -0
- package/datepicker/useDatePicker.d.ts +114 -0
- package/datepicker/useDatePicker.props.d.ts +2 -0
- package/datepicker/useDatePicker.test.d.ts +0 -0
- package/fileupload/index.d.ts +2 -0
- package/fileupload/index.mjs +2 -0
- package/fileupload/index.mjs.map +1 -0
- package/fileupload/useFileUpload.d.ts +26 -0
- package/fileupload/useFileUpload.props.d.ts +2 -0
- package/fileupload/useFileUpload.test.d.ts +0 -0
- package/gallery/index.d.ts +2 -0
- package/gallery/index.mjs +2 -0
- package/gallery/index.mjs.map +1 -0
- package/gallery/item/index.d.ts +2 -0
- package/gallery/item/index.mjs +2 -0
- package/gallery/item/index.mjs.map +1 -0
- package/gallery/item/useGalleryItem.d.ts +45 -0
- package/gallery/item/useGalleryItem.props.d.ts +2 -0
- package/gallery/useGallery.d.ts +31 -0
- package/gallery/useGallery.props.d.ts +2 -0
- package/gallery/useGallery.test.d.ts +0 -0
- package/listbox/index.d.ts +2 -0
- package/listbox/index.mjs +2 -0
- package/listbox/index.mjs.map +1 -0
- package/listbox/useListbox.d.ts +45 -0
- package/listbox/useListbox.props.d.ts +2 -0
- package/listbox/useListbox.test.d.ts +0 -0
- package/orgchart/index.d.ts +2 -0
- package/orgchart/index.mjs +2 -0
- package/orgchart/index.mjs.map +1 -0
- package/orgchart/useOrgChart.d.ts +20 -0
- package/orgchart/useOrgChart.props.d.ts +2 -0
- package/orgchart/useOrgChart.test.d.ts +0 -0
- package/overlay/index.d.ts +2 -0
- package/overlay/index.mjs +2 -0
- package/overlay/index.mjs.map +1 -0
- package/overlay/useOverlay.d.ts +16 -0
- package/overlay/useOverlay.props.d.ts +2 -0
- package/overlay/useOverlay.test.d.ts +0 -0
- package/package.json +4 -4
- package/password/index.d.ts +2 -0
- package/password/index.mjs +2 -0
- package/password/index.mjs.map +1 -0
- package/password/usePassword.d.ts +35 -0
- package/password/usePassword.props.d.ts +2 -0
- package/password/usePassword.test.d.ts +0 -0
- package/speeddial/index.mjs +1 -1
- package/speeddial/index.mjs.map +1 -1
- package/speeddial/useSpeedDial.d.ts +2 -1
- package/toast/index.d.ts +1 -0
- package/toast/index.mjs +1 -1
- package/toast/index.mjs.map +1 -1
- package/toast/item/index.css +1 -1
- package/toast/item/index.css.map +1 -1
- package/toast/item/index.mjs +1 -1
- package/toast/item/index.mjs.map +1 -1
- package/toast/item/useToastItem.d.ts +11 -7
- package/toast/toastStore.d.ts +39 -0
- package/toast/useToast.d.ts +12 -4
- package/toast/index.css +0 -2
- package/toast/index.css.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/colorpicker/slider/useColorPickerSlider.ts","../../../../primereact/src/colorpicker/ColorPicker.tsx","../../../../primereact/src/base/index.ts","../../../../primereact/src/colorpicker/ColorPicker.context.ts","../../../../primereact/src/colorpicker/ColorPicker.props.ts","../../../../primereact/src/colorpicker/area/ColorPickerArea.tsx","../../../../primereact/src/colorpicker/areabackground/ColorPickerAreaBackground.tsx","../../../../primereact/src/colorpicker/areabackground/ColorPickerAreaBackground.props.ts","../../../../primereact/src/colorpicker/areathumb/ColorPickerAreaThumb.tsx","../../../../primereact/src/colorpicker/areathumb/ColorPickerAreaThumb.props.ts","../../../../primereact/src/colorpicker/area/ColorPickerArea.props.ts","../../../../primereact/src/colorpicker/eyedropper/ColorPickerEyeDropper.tsx","../../../../primereact/src/button/Button.tsx","../../../../primereact/src/button/Button.context.ts","../../../../primereact/src/button/Button.props.ts","../../../../primereact/src/button/group/ButtonGroup.tsx","../../../../primereact/src/button/group/ButtonGroup.context.ts","../../../../primereact/src/button/group/ButtonGroup.props.ts","../../../../primereact/src/colorpicker/eyedropper/ColorPickerEyeDropper.props.ts","../../../../primereact/src/colorpicker/input/ColorPickerInput.tsx","../../../../primereact/src/inputtext/InputText.tsx","../../../../primereact/src/fluid/Fluid.tsx","../../../../primereact/src/fluid/Fluid.context.ts","../../../../primereact/src/fluid/Fluid.props.ts","../../../../primereact/src/inputtext/InputText.context.ts","../../../../primereact/src/inputtext/InputText.props.ts","../../../../primereact/src/colorpicker/input/ColorPickerInput.context.ts","../../../../primereact/src/colorpicker/input/ColorPickerInput.props.ts","../../../../primereact/src/colorpicker/slider/ColorPickerSlider.tsx","../../../../primereact/src/colorpicker/sliderthumb/ColorPickerSliderThumb.tsx","../../../../primereact/src/colorpicker/slider/ColorPickerSlider.context.ts","../../../../primereact/src/colorpicker/sliderthumb/ColorPickerSliderThumb.props.ts","../../../../primereact/src/colorpicker/slidertrack/ColorPickerSliderTrack.tsx","../../../../primereact/src/colorpicker/slidertrack/ColorPickerSliderTrack.props.ts","../../../../primereact/src/colorpicker/transparencygrid/ColorPickerTransparencyGrid.tsx","../../../../primereact/src/colorpicker/transparencygrid/ColorPickerTransparencyGrid.props.ts","../../../../primereact/src/colorpicker/slider/ColorPickerSlider.props.ts","../../../../primereact/src/colorpicker/swatch/ColorPickerSwatch.tsx","../../../../primereact/src/colorpicker/swatchbackground/ColorPickerSwatchBackground.tsx","../../../../primereact/src/colorpicker/swatchbackground/ColorPickerSwatchBackground.props.ts","../../../../primereact/src/colorpicker/swatch/ColorPickerSwatch.props.ts","../../../src/colorpicker/colorManager.ts","../../../src/colorpicker/slider/useColorPickerSlider.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { useColorPickerContext } from 'primereact/colorpicker';\nimport * as React from 'react';\nimport { getChannelColor, getChannelGradient } from '../colorManager';\nimport { defaultProps } from './useColorPickerSlider.props';\n\nexport const useColorPickerSlider = withHeadless({\n name: 'useColorPickerSlider',\n defaultProps,\n setup({ props }) {\n const { channel = 'hue', orientation, disabled } = props;\n const colorpicker = useColorPickerContext();\n const [isSliderDragging, setIsSliderDragging] = React.useState(false);\n\n const state = {\n isSliderDragging\n };\n\n const workingValue =\n channel === 'alpha'\n ? colorpicker?.areaValue\n : colorpicker?.state.value?.getChannels().includes(channel)\n ? colorpicker?.state.value\n : colorpicker?.areaValue.getChannels().includes(channel)\n ? colorpicker?.areaValue\n : colorpicker?.state.value?.toFormat(colorpicker?.props.format || 'hsba');\n\n const moveSlider = (x: number, y: number, element: HTMLElement) => {\n if (!element || disabled || colorpicker?.props.disabled) return;\n\n const rect = element.getBoundingClientRect();\n const rel = orientation === 'horizontal' ? (x - rect.left) / rect.width : (y - rect.top) / rect.height;\n const clamped = Math.max(0, Math.min(1, rel));\n\n const channelRange = workingValue!.getChannelRange(channel);\n const targetValue = clamped * (channelRange.max - channelRange.min) + channelRange.min;\n\n const currentValue = workingValue!.getChannelValue(channel);\n const delta = targetValue - currentValue;\n\n const newColor = workingValue!.incChannelValue(channel, delta);\n\n colorpicker?.setValue([\n newColor,\n {\n color: newColor.toString(colorpicker?.props.format || 'css'),\n value: newColor\n }\n ]);\n\n colorpicker?.syncChannelInputs(newColor);\n };\n\n const handleSliderPointerDown = (event: PointerEvent) => {\n const element = event.currentTarget as HTMLElement;\n\n if (!element) return;\n\n element.setPointerCapture(event.pointerId);\n setIsSliderDragging(true);\n moveSlider(event.clientX, event.clientY, element);\n };\n\n const handleSliderPointerMove = (event: PointerEvent) => {\n if (!isSliderDragging) return;\n\n moveSlider(event.clientX, event.clientY, event.currentTarget as HTMLElement);\n };\n\n const handleSliderPointerUp = (event: PointerEvent) => {\n const element = event.currentTarget as HTMLElement;\n\n if (!element) return;\n\n element.releasePointerCapture(event.pointerId);\n setIsSliderDragging(false);\n };\n\n const handleSliderKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n if (disabled || colorpicker?.props.disabled) return;\n\n const key = event.key;\n const isVertical = orientation === 'vertical';\n const allowed = isVertical ? ['ArrowUp', 'ArrowDown'] : ['ArrowLeft', 'ArrowRight'];\n\n if (!allowed.includes(key)) return;\n\n event.preventDefault();\n\n const base = workingValue;\n\n if (!base) return;\n\n const { step } = base.getChannelRange(channel);\n\n let next = base;\n\n if (!isVertical) {\n if (key === 'ArrowRight') next = next.incChannelValue(channel, step);\n\n if (key === 'ArrowLeft') next = next.decChannelValue(channel, step);\n } else {\n if (key === 'ArrowDown') next = next.incChannelValue(channel, step);\n\n if (key === 'ArrowUp') next = next.decChannelValue(channel, step);\n }\n\n colorpicker?.setValue([\n next,\n {\n color: next.toString(colorpicker?.props.format || 'css'),\n value: next\n }\n ]);\n\n colorpicker?.syncChannelInputs(next);\n };\n\n const channelRange = workingValue!.getChannelRange(channel);\n const channelValue = workingValue!.getChannelValue(channel);\n\n const offset = (channelValue - channelRange.min) / (channelRange.max - channelRange.min);\n\n const sliderStyle = {\n '--slider-background': getChannelGradient(channel, workingValue!, orientation ?? 'horizontal'),\n '--thumb-position-left': orientation === 'horizontal' ? `${offset * 100}%` : '50%',\n '--thumb-position-top': orientation === 'vertical' ? `${offset * 100}%` : '50%',\n '--thumb-background': getChannelColor(workingValue!, channel).toString('css')\n } as React.CSSProperties;\n\n return {\n state,\n handleSliderPointerDown,\n handleSliderPointerMove,\n handleSliderPointerUp,\n handleSliderKeyDown,\n sliderStyle,\n channelValue,\n channelRange\n };\n }\n});\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { useColorPicker } from '@primereact/headless/colorpicker';\nimport { styles } from '@primereact/styles/colorpicker';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { ColorPickerProvider } from './ColorPicker.context';\nimport { defaultProps } from './ColorPicker.props';\nimport { ColorPickerArea } from './area';\nimport { ColorPickerAreaBackground } from './areabackground';\nimport { ColorPickerAreaThumb } from './areathumb';\nimport { ColorPickerEyeDropper } from './eyedropper/ColorPickerEyeDropper';\nimport { ColorPickerInput } from './input/ColorPickerInput';\nimport { ColorPickerSlider } from './slider';\nimport { ColorPickerSliderThumb } from './sliderthumb';\nimport { ColorPickerSliderTrack } from './slidertrack';\nimport { ColorPickerSwatch } from './swatch';\nimport { ColorPickerSwatchBackground } from './swatchbackground';\nimport { ColorPickerTransparencyGrid } from './transparencygrid';\n\nexport const ColorPicker = withComponent({\n name: 'ColorPicker',\n defaultProps,\n styles,\n setup(instance) {\n const colorpicker = useColorPicker(instance.inProps);\n\n return colorpicker;\n },\n render(instance) {\n const { props, ptmi } = instance;\n\n const rootProps = mergeProps(ptmi('root'));\n\n return (\n <ColorPickerProvider value={instance}>\n <Component instance={instance} attrs={rootProps} children={props.children} as={React.Fragment} />\n </ColorPickerProvider>\n );\n },\n components: {\n Area: ColorPickerArea,\n AreaBackground: ColorPickerAreaBackground,\n AreaThumb: ColorPickerAreaThumb,\n Slider: ColorPickerSlider,\n SliderThumb: ColorPickerSliderThumb,\n SliderTrack: ColorPickerSliderTrack,\n TransparencyGrid: ColorPickerTransparencyGrid,\n Swatch: ColorPickerSwatch,\n SwatchBackground: ColorPickerSwatchBackground,\n EyeDropper: ColorPickerEyeDropper,\n Input: ColorPickerInput\n }\n});\n","import { withComponent as withComponentInCore } from '@primereact/core/component';\nimport { styles as baseStyles } from '@primereact/styles/base';\nimport type { withComponentOptions } from '@primereact/types/core';\nimport type { StylesOptions } from '@primereact/types/styles';\n\nexport const withComponent = <IProps, DProps, Exposes extends Record<PropertyKey, unknown> = Record<PropertyKey, unknown>, Styles = StylesOptions, CData = Record<string, unknown>>({\n name = 'UnknownComponent',\n defaultProps,\n styles = {\n ...baseStyles,\n name: 'global'\n } as Styles,\n components,\n setup,\n render\n}: withComponentOptions<IProps, DProps, Exposes, Styles, CData>) => {\n return withComponentInCore<IProps, DProps, Exposes, Styles, CData>({\n name,\n defaultProps,\n styles,\n components,\n setup,\n render\n });\n};\n","import { createOptionalContext } from '@primereact/core/utils';\nimport type { ColorPickerInstance } from '@primereact/types/shared/colorpicker';\n\nexport const [ColorPickerProvider, useColorPickerContext] = createOptionalContext<ColorPickerInstance>();\n","import * as HeadlessColorPicker from '@primereact/headless/colorpicker';\nimport type { ColorPickerProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultProps: ColorPickerProps = {\n ...HeadlessColorPicker.defaultProps\n};\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { ColorPickerAreaBackground } from '../areabackground/ColorPickerAreaBackground';\nimport { ColorPickerAreaThumb } from '../areathumb/ColorPickerAreaThumb';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { defaultAreaProps } from './ColorPickerArea.props';\n\nexport const ColorPickerArea = withComponent({\n name: 'ColorPickerArea',\n defaultProps: defaultAreaProps,\n setup() {\n const colorpicker = useColorPickerContext();\n\n return { colorpicker };\n },\n render(instance) {\n const { props, ptmi, colorpicker } = instance;\n\n const rootProps = mergeProps(\n {\n className: colorpicker?.cx('area'),\n onPointerDown: colorpicker?.handleAreaPointerDown,\n onPointerMove: colorpicker?.handleAreaPointerMove,\n onPointerUp: colorpicker?.handleAreaPointerUp,\n style: { ...colorpicker?.areaStyles, ...colorpicker?.sx('area') }\n },\n colorpicker?.ptm('area'),\n ptmi('root')\n );\n\n return (\n <Component\n instance={instance}\n attrs={rootProps}\n children={\n props.children ?? (\n <>\n <ColorPickerAreaBackground />\n <ColorPickerAreaThumb />\n </>\n )\n }\n />\n );\n }\n});\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { defaultAreaBackgroundProps } from './ColorPickerAreaBackground.props';\n\nexport const ColorPickerAreaBackground = withComponent({\n name: 'ColorPickerAreaBackground',\n defaultProps: defaultAreaBackgroundProps,\n setup() {\n const colorpicker = useColorPickerContext();\n\n return { colorpicker };\n },\n render(instance) {\n const { props, ptmi, colorpicker } = instance;\n\n const rootProps = mergeProps(\n {\n className: colorpicker?.cx('areaBackground')\n },\n colorpicker?.ptm('areaBackground'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import type { ColorPickerAreaBackgroundProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultAreaBackgroundProps: ColorPickerAreaBackgroundProps = {\n as: 'div'\n};\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { defaultAreaThumbProps } from './ColorPickerAreaThumb.props';\n\nexport const ColorPickerAreaThumb = withComponent({\n name: 'ColorPickerAreaThumb',\n defaultProps: defaultAreaThumbProps,\n setup() {\n const colorpicker = useColorPickerContext();\n\n return { colorpicker };\n },\n render(instance) {\n const { props, ptmi, colorpicker } = instance;\n\n const disabled = colorpicker?.props.disabled;\n\n const rootProps = mergeProps(\n {\n className: colorpicker?.cx('areaThumb', { disabled }),\n onKeyDown: colorpicker?.handleAreaKeyDown,\n role: 'slider',\n tabIndex: disabled ? -1 : 0,\n 'aria-disabled': disabled,\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n 'aria-valuenow': colorpicker?.areaValue?.getChannelValue(colorpicker?.areaChannels.xChannel) ?? 0,\n 'aria-label': `${colorpicker?.areaChannels.xChannel} and ${colorpicker?.areaChannels.yChannel}`,\n 'aria-roledescription': '2d slider',\n 'aria-valuetext': `${colorpicker?.areaChannels.xChannel} ${colorpicker?.areaValue.getChannelValue(colorpicker?.areaChannels.xChannel)}, ${colorpicker?.areaChannels.yChannel} ${colorpicker?.areaValue.getChannelValue(colorpicker?.areaChannels.yChannel)}`\n },\n colorpicker?.ptm('areaThumb'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n\n// <div data-scope=\"color-picker\" data-part=\"area-thumb\" id=\"color-picker:_r_0_:area-thumb\" dir=\"ltr\" tabindex=\"0\" role=\"slider\" aria-valuemin=\"0\" aria-valuemax=\"100\" aria-valuenow=\"52\" aria-label=\"saturation and brightness\" aria-roledescription=\"2d slider\" aria-valuetext=\"saturation 52, brightness 10\" class=\"colorPicker__areaThumb css-u4jt6x\" style=\"position: absolute; left: 52%; top: 90%; transform: translate(-50%, -50%); touch-action: none; forced-color-adjust: none; --color: hsla(51.76, 35.14%, 7.4%, 1); background: rgb(26, 24, 12);\"></div>\n","import type { ColorPickerAreaThumbProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultAreaThumbProps: ColorPickerAreaThumbProps = {\n as: 'div'\n};\n","import type { ColorPickerAreaProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultAreaProps: ColorPickerAreaProps = {\n as: 'div'\n};\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { EyeDropperIcon } from '@primereact/icons/eyedropper';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport { Button } from 'primereact/button';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { defaultEyeDropperProps } from './ColorPickerEyeDropper.props';\n\nexport const ColorPickerEyeDropper = withComponent({\n name: 'ColorPickerEyeDropper',\n defaultProps: defaultEyeDropperProps,\n setup() {\n const colorpicker = useColorPickerContext();\n\n return { colorpicker };\n },\n render(instance) {\n const { props, ptmi, colorpicker } = instance;\n\n const rootProps = mergeProps(\n {\n type: 'button',\n className: colorpicker?.cx('eyeDropper'),\n onClick: colorpicker?.openEyeDropper,\n disabled: props.disabled || colorpicker?.props.disabled\n },\n colorpicker?.ptm('eyeDropper'),\n ptmi('root')\n );\n\n const createIconElement = () => {\n return <EyeDropperIcon pt={colorpicker?.ptm('eyeDropperIcon')} />;\n };\n\n const icon = createIconElement();\n\n // @ts-expect-error: Button expects a type prop, but we are using it as a close button.\n return <Component as={Button} instance={instance} attrs={{ ...props, ...rootProps }} pt={colorpicker?.ptm('eyeDropper')} children={props.children ?? icon} />;\n }\n});\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { useButton } from '@primereact/headless/button';\nimport { styles } from '@primereact/styles/button';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { ButtonProvider } from './Button.context';\nimport { defaultProps } from './Button.props';\nimport { ButtonGroup } from './group';\n\nexport const Button = withComponent({\n name: 'Button',\n defaultProps,\n styles,\n setup(instance) {\n const button = useButton(instance.inProps);\n\n return button;\n },\n render(instance) {\n const { id, props, ptmi, cx } = instance;\n\n const rootProps = mergeProps(\n {\n id,\n className: cx('root')\n },\n ptmi('root')\n );\n\n return (\n <ButtonProvider value={instance}>\n <Component instance={instance} attrs={rootProps} children={props.children} />\n </ButtonProvider>\n );\n },\n components: {\n Group: ButtonGroup\n }\n});\n","import { createOptionalContext } from '@primereact/core/utils';\nimport type { ButtonInstance } from '@primereact/types/shared/button';\n\nexport const [ButtonProvider, useButtonContext] = createOptionalContext<ButtonInstance>();\n","import * as HeadlessButton from '@primereact/headless/button';\nimport type { ButtonProps } from '@primereact/types/shared/button';\n\nexport const defaultProps: ButtonProps = {\n ...HeadlessButton.defaultProps,\n as: 'button',\n size: undefined,\n severity: undefined,\n variant: undefined,\n plain: false,\n rounded: false,\n raised: false,\n iconOnly: false,\n fluid: false\n};\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { groupStyles } from '@primereact/styles/button';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { ButtonGroupProvider } from './ButtonGroup.context';\nimport { defaultGroupProps } from './ButtonGroup.props';\n\nexport const ButtonGroup = withComponent({\n name: 'ButtonGroup',\n defaultProps: defaultGroupProps,\n styles: groupStyles,\n render(instance) {\n const { props, ptmi, cx } = instance;\n\n const rootProps = mergeProps(\n {\n className: cx('root')\n },\n ptmi('root')\n );\n\n return (\n <ButtonGroupProvider value={instance}>\n <Component instance={instance} attrs={rootProps} children={props.children} />\n </ButtonGroupProvider>\n );\n }\n});\n","import { createOptionalContext } from '@primereact/core/utils';\nimport type { ButtonGroupInstance } from '@primereact/types/shared/button';\n\nexport const [ButtonGroupProvider, useButtonGroupContext] = createOptionalContext<ButtonGroupInstance>();\n","import type { ButtonGroupProps } from '@primereact/types/shared/button';\n\nexport const defaultGroupProps: ButtonGroupProps = {\n as: 'div'\n};\n","import { ColorPickerEyeDropperProps } from '@primereact/types/shared/colorpicker';\nimport * as Button from 'primereact/button';\n\nexport const defaultEyeDropperProps: ColorPickerEyeDropperProps = {\n ...(Button.defaultProps as ColorPickerEyeDropperProps),\n iconOnly: true,\n variant: 'outlined',\n severity: 'secondary'\n};\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { useColorPickerInput } from '@primereact/headless/colorpicker/input';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport { InputText } from 'primereact/inputtext';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { ColorPickerInputProvider } from './ColorPickerInput.context';\nimport { defaultInputProps } from './ColorPickerInput.props';\n\nexport const ColorPickerInput = withComponent({\n name: 'ColorPickerInput',\n defaultProps: defaultInputProps,\n setup(instance) {\n const colorpicker = useColorPickerContext();\n const colorpickerinput = useColorPickerInput(instance.inProps);\n\n return { colorpicker, ...colorpickerinput };\n },\n render(instance) {\n const { props, ptmi, colorpicker, type, channelRange, channelValue, handleBlur, handleKeyDown } = instance;\n\n const rootProps = mergeProps(\n {\n id: props.inputId,\n className: colorpicker?.cx('input'),\n type,\n spellCheck: false,\n autoComplete: 'off',\n defaultValue: channelValue,\n min: channelRange?.min,\n max: channelRange?.max,\n step: channelRange?.step,\n onBlur: handleBlur,\n onKeyDown: handleKeyDown,\n 'data-channel': props.channel,\n 'aria-label': props.channel,\n disabled: props.disabled || colorpicker?.props.disabled\n },\n colorpicker?.ptm('input'),\n ptmi('root')\n );\n\n return (\n <ColorPickerInputProvider value={instance}>\n {/* @ts-expect-error: InputText expects a type prop, but we are using it as a text input. */}\n <Component as={InputText} instance={instance} attrs={{ ...props, ...rootProps }} pt={colorpicker?.ptm('input')} children={props.children} ref={colorpicker?.registerInputEl} />\n </ColorPickerInputProvider>\n );\n }\n});\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { useInputText } from '@primereact/headless/inputtext';\nimport { styles } from '@primereact/styles/inputtext';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport { useFluidContext } from 'primereact/fluid';\nimport * as React from 'react';\nimport { InputTextProvider } from './InputText.context';\nimport { defaultProps } from './InputText.props';\n\nexport const InputText = withComponent({\n name: 'InputText',\n defaultProps,\n styles,\n setup(instance) {\n const inputtext = useInputText(instance?.inProps);\n const fluid = useFluidContext();\n\n return { ...inputtext, fluid };\n },\n render(instance) {\n const { id, props, ptmi, cx, fluid } = instance;\n\n const rootProps = mergeProps(\n {\n id,\n type: 'text',\n className: cx('root', { $fluid: !!fluid })\n },\n ptmi('root')\n );\n\n return (\n <InputTextProvider value={instance}>\n <Component instance={instance} attrs={rootProps} children={props.children} />\n </InputTextProvider>\n );\n }\n});\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { useFluid } from '@primereact/headless/fluid';\nimport { styles } from '@primereact/styles/fluid';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { FluidProvider } from './Fluid.context';\nimport { defaultProps } from './Fluid.props';\n\nexport const Fluid = withComponent({\n name: 'Fluid',\n defaultProps,\n styles,\n setup(instance) {\n const fluid = useFluid(instance.inProps);\n\n return fluid;\n },\n render(instance) {\n const { id, props, ptmi, cx } = instance;\n\n const rootProps = mergeProps(\n {\n id,\n className: cx('root')\n },\n ptmi('root')\n );\n\n return (\n <FluidProvider value={instance}>\n <Component instance={instance} attrs={rootProps} children={props.children} />\n </FluidProvider>\n );\n }\n});\n","import { createOptionalContext } from '@primereact/core/utils';\nimport type { FluidInstance } from '@primereact/types/shared/fluid';\n\nexport const [FluidProvider, useFluidContext] = createOptionalContext<FluidInstance>();\n","import * as HeadlessFluid from '@primereact/headless/fluid';\nimport type { FluidProps } from '@primereact/types/shared/fluid';\n\nexport const defaultProps: FluidProps = {\n ...HeadlessFluid.defaultProps,\n as: 'div'\n};\n","import { createOptionalContext } from '@primereact/core/utils';\nimport type { InputTextInstance } from '@primereact/types/shared/inputtext';\n\nexport const [InputTextProvider, useInputTextContext] = createOptionalContext<InputTextInstance>();\n","import * as HeadlessInputText from '@primereact/headless/inputtext';\nimport type { InputTextProps } from '@primereact/types/shared/inputtext';\n\nexport const defaultProps: InputTextProps = {\n ...HeadlessInputText.defaultProps,\n as: 'input',\n size: undefined,\n variant: undefined,\n fluid: undefined,\n invalid: false\n};\n","import { createOptionalContext } from '@primereact/core/utils';\nimport type { ColorPickerInputInstance } from '@primereact/types/shared/colorpicker';\n\nexport const [ColorPickerInputProvider, useColorPickerInputContext] = createOptionalContext<ColorPickerInputInstance>();\n","import * as HeadlessColorPickerInput from '@primereact/headless/colorpicker/input';\nimport { ColorPickerInputProps } from '@primereact/types/shared/colorpicker';\nimport * as InputText from 'primereact/inputtext';\n\nexport const defaultInputProps: ColorPickerInputProps = {\n ...(InputText.defaultProps as ColorPickerInputProps),\n ...HeadlessColorPickerInput.defaultProps\n};\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { useColorPickerSlider } from '@primereact/headless/colorpicker/slider';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { ColorPickerSliderThumb } from '../sliderthumb/ColorPickerSliderThumb';\nimport { ColorPickerSliderTrack } from '../slidertrack/ColorPickerSliderTrack';\nimport { ColorPickerTransparencyGrid } from '../transparencygrid';\nimport { ColorPickerSliderProvider } from './ColorPickerSlider.context';\nimport { defaultSliderProps } from './ColorPickerSlider.props';\n\nexport const ColorPickerSlider = withComponent({\n name: 'ColorPickerSlider',\n defaultProps: defaultSliderProps,\n setup(instance) {\n const colorpicker = useColorPickerContext();\n const colorpickerslider = useColorPickerSlider({ ...instance.inProps, context: colorpicker });\n\n return { ...colorpickerslider, colorpicker };\n },\n render(instance) {\n const { props, ptmi, colorpicker, handleSliderPointerDown, handleSliderPointerMove, handleSliderPointerUp, sliderStyle } = instance;\n\n const rootProps = mergeProps(\n {\n className: colorpicker?.cx('slider', { orientation: props.orientation }),\n onPointerDown: handleSliderPointerDown,\n onPointerMove: handleSliderPointerMove,\n onPointerUp: handleSliderPointerUp,\n style: { ...sliderStyle, ...colorpicker?.sx('slider') },\n 'data-orientation': props.orientation,\n 'data-channel': props.channel\n },\n colorpicker?.ptm('slider'),\n ptmi('root')\n );\n\n return (\n <ColorPickerSliderProvider value={instance}>\n <Component\n instance={instance}\n attrs={rootProps}\n children={\n props.children ?? (\n <>\n <ColorPickerTransparencyGrid />\n <ColorPickerSliderTrack />\n <ColorPickerSliderThumb />\n </>\n )\n }\n />\n </ColorPickerSliderProvider>\n );\n }\n});\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { useColorPickerSliderContext } from '../slider/ColorPickerSlider.context';\nimport { defaultSliderThumbProps } from './ColorPickerSliderThumb.props';\n\nexport const ColorPickerSliderThumb = withComponent({\n name: 'ColorPickerSliderThumb',\n defaultProps: defaultSliderThumbProps,\n setup() {\n const colorpicker = useColorPickerContext();\n const colorpickerslider = useColorPickerSliderContext();\n\n return { colorpicker, colorpickerslider };\n },\n render(instance) {\n const { props, ptmi, colorpicker, colorpickerslider } = instance;\n\n const disabled = !!(colorpickerslider?.props.disabled || colorpicker?.props.disabled);\n\n const rootProps = mergeProps(\n {\n className: colorpicker?.cx('slider-thumb', { disabled: colorpickerslider?.props.disabled || colorpicker?.props.disabled }),\n role: 'slider',\n tabIndex: disabled ? -1 : 0,\n onKeyDown: colorpickerslider?.handleSliderKeyDown,\n 'data-orientation': colorpickerslider?.props.orientation,\n 'data-channel': colorpickerslider?.props.channel,\n 'aria-orientation': colorpickerslider?.props.orientation,\n 'aria-disabled': disabled,\n 'aria-label': `${colorpickerslider?.props.channel} slider`,\n 'aria-valuemin': colorpickerslider?.channelRange?.min ?? 0,\n 'aria-valuemax': colorpickerslider?.channelRange?.max ?? 100,\n 'aria-valuenow': colorpickerslider?.channelValue,\n 'aria-valuetext': `${colorpickerslider?.props.channel} ${colorpickerslider?.channelValue}`\n },\n colorpicker?.ptm('slider-thumb'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import { createOptionalContext } from '@primereact/core/utils';\nimport type { ColorPickerSliderInstance } from '@primereact/types/shared/colorpicker';\n\nexport const [ColorPickerSliderProvider, useColorPickerSliderContext] = createOptionalContext<ColorPickerSliderInstance>();\n","import type { ColorPickerSliderThumbProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultSliderThumbProps: ColorPickerSliderThumbProps = {\n as: 'div'\n};\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { useColorPickerSliderContext } from '../slider/ColorPickerSlider.context';\nimport { defaultSliderTrackProps } from './ColorPickerSliderTrack.props';\n\nexport const ColorPickerSliderTrack = withComponent({\n name: 'ColorPickerSliderTrack',\n defaultProps: defaultSliderTrackProps,\n setup() {\n const colorpicker = useColorPickerContext();\n const colorpickerslider = useColorPickerSliderContext();\n\n return { colorpicker, colorpickerslider };\n },\n render(instance) {\n const { props, ptmi, colorpicker, colorpickerslider } = instance;\n\n const rootProps = mergeProps(\n {\n className: colorpicker?.cx('slider-track'),\n 'data-orientation': colorpickerslider?.props.orientation,\n 'data-channel': colorpickerslider?.props.channel\n },\n colorpicker?.ptm('slider-track'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import type { ColorPickerSliderTrackProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultSliderTrackProps: ColorPickerSliderTrackProps = {\n as: 'div'\n};\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { defaultTransparencyGridProps } from './ColorPickerTransparencyGrid.props';\n\nexport const ColorPickerTransparencyGrid = withComponent({\n name: 'ColorPickerTransparencyGrid',\n defaultProps: defaultTransparencyGridProps,\n setup() {\n const colorpicker = useColorPickerContext();\n\n return { colorpicker };\n },\n render(instance) {\n const { props, ptmi, colorpicker } = instance;\n\n const rootProps = mergeProps(\n {\n className: colorpicker?.cx('transparency-grid')\n },\n colorpicker?.ptm('transparency-grid'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import type { ColorPickerTransparencyGridProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultTransparencyGridProps: ColorPickerTransparencyGridProps = {\n as: 'div'\n};\n","import * as HeadlessColorPickerSlider from '@primereact/headless/colorpicker/slider';\nimport type { ColorPickerSliderProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultSliderProps: ColorPickerSliderProps = {\n ...HeadlessColorPickerSlider.defaultProps,\n as: 'div'\n};\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { ColorPickerSwatchBackground } from '../swatchbackground';\nimport { ColorPickerTransparencyGrid } from '../transparencygrid';\nimport { defaultSwatchProps } from './ColorPickerSwatch.props';\n\nexport const ColorPickerSwatch = withComponent({\n name: 'ColorPickerSwatch',\n defaultProps: defaultSwatchProps,\n setup() {\n const colorpicker = useColorPickerContext();\n\n return { colorpicker };\n },\n render(instance) {\n const { props, ptmi, colorpicker } = instance;\n\n const rootProps = mergeProps(\n {\n className: colorpicker?.cx('swatch'),\n style: { ...colorpicker?.swatchStyles, ...colorpicker?.sx('swatch') }\n },\n colorpicker?.ptm('swatch'),\n ptmi('root')\n );\n\n return (\n <Component\n instance={instance}\n attrs={rootProps}\n children={\n props.children ?? (\n <>\n <ColorPickerTransparencyGrid />\n <ColorPickerSwatchBackground />\n </>\n )\n }\n />\n );\n }\n});\n","'use client';\nimport { Component } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport { withComponent } from 'primereact/base';\nimport * as React from 'react';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { defaultSwatchBackgroundProps } from './ColorPickerSwatchBackground.props';\n\nexport const ColorPickerSwatchBackground = withComponent({\n name: 'ColorPickerSwatchBackground',\n defaultProps: defaultSwatchBackgroundProps,\n setup() {\n const colorpicker = useColorPickerContext();\n\n return { colorpicker };\n },\n render(instance) {\n const { props, ptmi, colorpicker } = instance;\n\n const rootProps = mergeProps(\n {\n className: colorpicker?.cx('swatchBackground')\n },\n colorpicker?.ptm('swatchBackground'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import type { ColorPickerSwatchBackgroundProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultSwatchBackgroundProps: ColorPickerSwatchBackgroundProps = {\n as: 'div'\n};\n","import type { ColorPickerSwatchProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultSwatchProps: ColorPickerSwatchProps = {\n as: 'div'\n};\n","import type { Color2DAxes, Color3DAxes, ColorChannel, ColorChannelRange, ColorInputChannel, ColorInstance, ColorOutput, ColorSliderChannel, ColorSpace } from '@primereact/types/shared/colorpicker';\n\n// CONSTANTS\nconst HSB_REGEX = /hsb\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsba\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\nconst HSL_REGEX = /hsl\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsla\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\nconst HEX_REGEX = /^#?([a-fA-F0-9]{3,8})$/;\nconst RGB_REGEX = /^rgba?\\(\\s*([^)]+)\\s*\\)$/;\nconst OKLCH_REGEX = /oklch\\(\\s*([\\d.]+)%?\\s+([\\d.]+)\\s+([\\d.]+)(deg)?(?:\\s*\\/\\s*([\\d.]+))?\\)/i;\n\n// UTILS\nfunction clamp(value: number, min: number, max: number) {\n return Math.min(Math.max(value, min), max);\n}\n\nexport const isEqual = (a: unknown, b: unknown) => JSON.stringify(a) === JSON.stringify(b);\n\nconst multiplyMatrices = (A: number[], B: number[]) => {\n return [A[0] * B[0] + A[1] * B[1] + A[2] * B[2], A[3] * B[0] + A[4] * B[1] + A[5] * B[2], A[6] * B[0] + A[7] * B[1] + A[8] * B[2]];\n};\n\n/**\n * Snaps a value to the nearest step increment within min/max bounds\n * @example snap(23.7, 0, 100, 5) => 25\n * @example snap(0.234, 0, 1, 0.01) => 0.23\n */\nfunction snap(value: number, min: number, max: number, step: number) {\n const clamped = clamp(value, min, max);\n\n const offset = clamped - min;\n const steps = Math.round(offset / step);\n\n const snapped = min + steps * step;\n\n const precision = (step.toString().split('.')[1] || '').length;\n\n return parseFloat(snapped.toFixed(precision));\n}\n\nabstract class Color {\n abstract clone(): ColorInstance;\n abstract toString(format: ColorOutput): string;\n abstract toFormat(format: ColorSpace): ColorInstance;\n abstract toJSON(): Record<string, number>;\n abstract getChannelRange(channel: ColorChannel): ColorChannelRange;\n abstract getFormat(): ColorSpace;\n abstract getChannels(): [ColorChannel, ColorChannel, ColorChannel];\n\n getChannelValue(channel: ColorChannel): number {\n if (channel in this) {\n return this[channel as keyof this] as number;\n }\n\n throw new Error(`Channel ${channel} not found`);\n }\n\n withChannelValue(channel: ColorChannel, value: number): ColorInstance {\n const { min, max } = this.getChannelRange(channel);\n\n if (channel in this) {\n const cloned = this.clone();\n\n // @ts-expect-error - channel\n cloned[channel] = clamp(value, min, max);\n\n return cloned;\n }\n\n throw new Error(`Channel ${channel} not found`);\n }\n\n getSpaceAxes(xyChannels: Color2DAxes): Color3DAxes {\n const { xChannel, yChannel } = xyChannels;\n\n if (xChannel === yChannel) {\n throw new Error('xChannel and yChannel cannot be the same');\n }\n\n const zChannel = this.getChannels().find((channel) => channel !== xChannel && channel !== yChannel);\n\n if (!zChannel) {\n throw new Error('zChannel not found');\n }\n\n return { xChannel, yChannel, zChannel };\n }\n\n incChannelValue(channel: ColorChannel, step: number): ColorInstance {\n const { min, max, step: availableStep } = this.getChannelRange(channel);\n\n const value = snap(clamp(this.getChannelValue(channel) + step, min, max), min, max, availableStep);\n\n return this.withChannelValue(channel, value);\n }\n\n decChannelValue(channel: ColorChannel, step: number): ColorInstance {\n return this.incChannelValue(channel, -step);\n }\n}\n\nexport class HSBColor extends Color {\n private hue: number;\n private saturation: number;\n private brightness: number;\n private alpha: number;\n\n constructor(hue: number, saturation: number, brightness: number, alpha: number) {\n super();\n this.hue = hue;\n this.saturation = saturation;\n this.brightness = brightness;\n this.alpha = alpha;\n }\n\n static parse(value: string): HSBColor | undefined {\n const match = value.match(HSB_REGEX);\n\n if (!match) return undefined;\n\n const [h, s, b, a] = (match[1] ?? match[2]).split(',').map((n) => Number(n.trim().replace('%', '')));\n\n return new HSBColor(h % 360, clamp(s, 0, 100), clamp(b, 0, 100), clamp(a ?? 1, 0, 1));\n }\n\n private toRGB(): RGBColor {\n const h = this.hue;\n const s = this.saturation / 100;\n const b = this.brightness / 100;\n\n function f(n: number) {\n const k = (n + h / 60) % 6;\n\n return b - b * s * Math.max(0, Math.min(k, 4 - k, 1));\n }\n\n const scale = 255;\n\n return new RGBColor(Math.round(f(5) * scale), Math.round(f(3) * scale), Math.round(f(1) * scale), Number(this.alpha.toFixed(2)));\n }\n\n private toHSL(): HSLColor {\n const h = this.hue;\n let s = this.saturation / 100;\n const b = this.brightness / 100;\n\n const l = b * (1 - s / 2);\n\n if (l === 0 || l === 1) {\n s = 0;\n } else {\n s = (b - l) / Math.min(l, 1 - l);\n }\n\n return new HSLColor(Number(h.toFixed(2)), Number((s * 100).toFixed(2)), Number((l * 100).toFixed(2)), Number(this.alpha.toFixed(2)));\n }\n\n toFormat(format: ColorSpace): ColorInstance {\n switch (format) {\n case 'hsba':\n return this;\n case 'rgba':\n return this.toRGB();\n case 'hsla':\n return this.toHSL();\n case 'oklcha':\n return this.toRGB().toFormat('oklcha');\n default:\n throw new Error(`Invalid format: ${format}`);\n }\n }\n\n toString(format: ColorOutput): string {\n switch (format) {\n case 'css':\n return this.toHSL().toString('css');\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsb':\n return `hsb(${this.hue}, ${this.saturation.toFixed(2)}%, ${this.brightness.toFixed(2)}%)`;\n case 'hsba':\n return `hsba(${this.hue}, ${this.saturation.toFixed(2)}%, ${this.brightness.toFixed(2)}%, ${this.alpha})`;\n case 'hsl':\n return this.toHSL().toString('hsl');\n case 'rgb':\n return this.toRGB().toString('rgb');\n case 'oklch':\n return this.toRGB().toFormat('oklcha').toString('oklch');\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toJSON() {\n return {\n hue: this.hue,\n saturation: this.saturation,\n brightness: this.brightness,\n alpha: this.alpha\n };\n }\n\n clone(): ColorInstance {\n return new HSBColor(this.hue, this.saturation, this.brightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return { min: 0, max: 360, step: 1 };\n case 'saturation':\n case 'brightness':\n return { min: 0, max: 100, step: 1 };\n case 'alpha':\n return { min: 0, max: 1, step: 0.01 };\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n getFormat(): ColorSpace {\n return 'hsba';\n }\n\n getChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return ['hue', 'saturation', 'brightness'];\n }\n}\n\nexport class HSLColor extends Color {\n private hue: number;\n private saturation: number;\n private lightness: number;\n private alpha: number;\n\n constructor(hue: number, saturation: number, lightness: number, alpha: number) {\n super();\n this.hue = hue;\n this.saturation = saturation;\n this.lightness = lightness;\n this.alpha = alpha;\n }\n\n static parse(value: string): HSLColor | undefined {\n const match = value.match(HSL_REGEX);\n\n if (!match) return undefined;\n\n const [h, s, l, a] = (match[1] || match[2])?.split(',').map((n) => Number(n.trim().replace('%', ''))) ?? [];\n\n return new HSLColor(h % 360, clamp(s, 0, 100), clamp(l, 0, 100), clamp(a ?? 1, 0, 1));\n }\n\n private toRGB(): RGBColor {\n const h = this.hue;\n const s = this.saturation / 100;\n const l = this.lightness / 100;\n\n function f(n: number) {\n const k = (n + h / 30) % 12;\n const a = s * Math.min(l, 1 - l);\n\n return l - a * Math.max(-1, Math.min(k - 3, 9 - k, 1));\n }\n\n const scale = 255;\n\n return new RGBColor(Math.round(f(0) * scale), Math.round(f(8) * scale), Math.round(f(4) * scale), Number(this.alpha.toFixed(2)));\n }\n\n private toHSB(): HSBColor {\n const h = this.hue;\n let s = this.saturation / 100;\n const l = this.lightness / 100;\n\n const b = l + s * Math.min(l, 1 - l);\n\n if (b === 0) {\n s = 0;\n } else {\n s = 2 * (1 - l / b);\n }\n\n return new HSBColor(Number(h.toFixed(2)), Number((s * 100).toFixed(2)), Number((b * 100).toFixed(2)), Number(this.alpha.toFixed(2)));\n }\n\n toFormat(format: ColorSpace): ColorInstance {\n switch (format) {\n case 'hsla':\n return this;\n case 'rgba':\n return this.toRGB();\n case 'hsba':\n return this.toHSB();\n case 'oklcha':\n return this.toRGB().toFormat('oklcha');\n default:\n throw new Error(`Invalid format: ${format}`);\n }\n }\n\n toString(format: ColorOutput): string {\n switch (format) {\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsl':\n return `hsl(${this.hue}, ${this.saturation.toFixed(2)}%, ${this.lightness.toFixed(2)}%)`;\n case 'css':\n case 'hsla':\n return `hsla(${this.hue}, ${this.saturation.toFixed(2)}%, ${this.lightness.toFixed(2)}%, ${this.alpha})`;\n case 'rgb':\n return this.toRGB().toString('rgb');\n case 'hsb':\n return this.toHSB().toString('hsb');\n case 'oklch':\n return this.toRGB().toFormat('oklcha').toString('oklch');\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toJSON(): Record<string, number> {\n return {\n hue: this.hue,\n saturation: this.saturation,\n lightness: this.lightness,\n alpha: this.alpha\n };\n }\n\n clone(): ColorInstance {\n return new HSLColor(this.hue, this.saturation, this.lightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return { min: 0, max: 360, step: 1 };\n case 'saturation':\n case 'lightness':\n return { min: 0, max: 100, step: 1 };\n case 'alpha':\n return { min: 0, max: 1, step: 0.01 };\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n getFormat(): ColorSpace {\n return 'hsla';\n }\n\n getChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return ['hue', 'saturation', 'lightness'];\n }\n}\n\nexport class RGBColor extends Color {\n private red: number;\n private green: number;\n private blue: number;\n private alpha: number;\n\n constructor(red: number, green: number, blue: number, alpha: number) {\n super();\n this.red = red;\n this.green = green;\n this.blue = blue;\n this.alpha = alpha;\n }\n\n static parse(value: string): RGBColor | undefined {\n if (!value) return undefined;\n\n const input = value.trim();\n\n return this.parseHexColor(input) ?? this.parseRgbFunction(input);\n }\n\n private static parseHexColor(input: string): RGBColor | undefined {\n const match = input.match(HEX_REGEX);\n\n if (!match) return undefined;\n\n let hex = match[1];\n\n // Expand shorthand (#abc -> #aabbcc)\n if (hex.length <= 4) {\n hex = hex\n .split('')\n .map((c) => c + c)\n .join('');\n }\n\n if (![6, 8].includes(hex.length)) return undefined;\n\n const r = parseInt(hex.slice(0, 2), 16);\n const g = parseInt(hex.slice(2, 4), 16);\n const b = parseInt(hex.slice(4, 6), 16);\n const a = hex.length === 8 ? parseInt(hex.slice(6, 8), 16) / 255 : 1;\n\n return new RGBColor(r, g, b, a);\n }\n\n private static parseRgbFunction(input: string): RGBColor | undefined {\n const match = input.match(RGB_REGEX);\n\n if (!match?.[1]) return undefined;\n\n const [rStr, gStr, bStr, aStr] = match[1].split(',').map((v) => v.trim());\n\n const r = clamp(Number(rStr), 0, 255);\n const g = clamp(Number(gStr), 0, 255);\n const b = clamp(Number(bStr), 0, 255);\n const a = aStr !== undefined ? clamp(Number(aStr), 0, 1) : 1;\n\n if ([r, g, b, a].some((v) => Number.isNaN(v))) return undefined;\n\n return new RGBColor(r, g, b, a);\n }\n\n private toHSB(): HSBColor {\n const scale = 255;\n const [r, g, b] = [this.red / scale, this.green / scale, this.blue / scale];\n\n const mmax = Math.max(r, g, b);\n const mmin = Math.min(r, g, b);\n\n const chroma = mmax - mmin;\n const brightness = mmax;\n\n const saturation = mmax === 0 ? 0 : chroma / mmax;\n\n let hue = 0;\n\n if (chroma !== 0) {\n switch (mmax) {\n case r:\n hue = ((g - b) / chroma) % 6;\n break;\n case g:\n hue = (b - r) / chroma + 2;\n break;\n case b:\n hue = (r - g) / chroma + 4;\n break;\n }\n\n hue *= 60;\n\n if (hue < 0) {\n hue += 360;\n }\n }\n\n return new HSBColor(Number(hue.toFixed(2)), Number((saturation * 100).toFixed(2)), Number((brightness * 100).toFixed(2)), Number(this.alpha.toFixed(2)));\n }\n\n private toHSL(): HSLColor {\n const scale = 255;\n const [r, g, b] = [this.red / scale, this.green / scale, this.blue / scale];\n\n const mmax = Math.max(r, g, b);\n const mmin = Math.min(r, g, b);\n\n const lightness = (mmax + mmin) / 2;\n const chroma = mmax - mmin;\n\n let hue = 0;\n let saturation = -1;\n\n if (chroma !== 0) {\n switch (mmax) {\n case r:\n hue = ((g - b) / chroma) % 6;\n break;\n case g:\n hue = (b - r) / chroma + 2;\n break;\n case b:\n hue = (r - g) / chroma + 4;\n break;\n }\n\n hue *= 60;\n\n if (hue < 0) {\n hue += 360;\n }\n }\n\n if (lightness === 0 || lightness === 1) {\n saturation = 0;\n } else {\n saturation = chroma / (1 - Math.abs(2 * mmax - chroma - 1));\n }\n\n return new HSLColor(Number(hue.toFixed(2)), Number((saturation * 100).toFixed(2)), Number((lightness * 100).toFixed(2)), Number(this.alpha.toFixed(2)));\n }\n\n private toOKLCH(): OKLCHColor {\n const rgb = [this.red / 255, this.green / 255, this.blue / 255];\n\n const rgbLinear = rgb.map((c) => (Math.abs(c) <= 0.04045 ? c / 12.92 : (c < 0 ? -1 : 1) * ((Math.abs(c) + 0.055) / 1.055) ** 2.4));\n\n const xyz = multiplyMatrices([0.41239079926595934, 0.357584339383878, 0.1804807884018343, 0.21263900587151027, 0.715168678767756, 0.07219231536073371, 0.01933081871559182, 0.11919477979462598, 0.9505321522496607], rgbLinear);\n\n const LMS = multiplyMatrices([0.819022437996703, 0.3619062600528904, -0.1288737815209879, 0.0329836539323885, 0.9292868615863434, 0.0361446663506424, 0.0481771893596242, 0.2642395317527308, 0.6335478284694309], xyz);\n\n const LMSg = LMS.map((val) => Math.cbrt(val));\n\n const [L, a, b] = multiplyMatrices([0.210454268309314, 0.7936177747023054, -0.0040720430116193, 1.9779985324311684, -2.4285922420485799, 0.450593709617411, 0.0259040424655478, 0.7827717124575296, -0.8086757549230774], LMSg);\n\n const C = Math.sqrt(a ** 2 + b ** 2);\n const H = Math.abs(a) < 0.0002 && Math.abs(b) < 0.0002 ? NaN : ((((Math.atan2(b, a) * 180) / Math.PI) % 360) + 360) % 360;\n\n const outL = Number(Math.min(1, Math.max(0, L)).toFixed(4));\n\n const outC = Number(C.toFixed(4));\n\n const outH = Number.isNaN(H) ? NaN : Number(H.toFixed(2));\n\n return new OKLCHColor(outL, outC, outH, Number(this.alpha.toFixed(2)));\n }\n\n toHexInt(): number {\n return (this.red << 16) | (this.green << 8) | this.blue;\n }\n\n toFormat(format: ColorSpace): ColorInstance {\n switch (format) {\n case 'rgba':\n return this;\n case 'hsla':\n return this.toHSL();\n case 'hsba':\n return this.toHSB();\n case 'oklcha':\n return this.toOKLCH();\n default:\n throw new Error(`Invalid format: ${format}`);\n }\n }\n\n toString(format: ColorOutput): string {\n switch (format) {\n case 'hex':\n return `#${this.red.toString(16).padStart(2, '0')}${this.green.toString(16).padStart(2, '0')}${this.blue.toString(16).padStart(2, '0')}`;\n case 'hexa':\n return `#${this.red.toString(16).padStart(2, '0')}${this.green.toString(16).padStart(2, '0')}${this.blue.toString(16).padStart(2, '0')}${Math.round(this.alpha * 255)\n .toString(16)\n .padStart(2, '0')}`;\n case 'rgb':\n return `rgb(${this.red}, ${this.green}, ${this.blue})`;\n case 'rgba':\n case 'css':\n return `rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;\n case 'hsl':\n return this.toHSL().toString('hsl');\n case 'hsb':\n return this.toHSB().toString('hsb');\n case 'oklch':\n return this.toOKLCH().toString('oklch');\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toJSON(): Record<string, number> {\n return {\n red: this.red,\n green: this.green,\n blue: this.blue,\n alpha: this.alpha\n };\n }\n\n clone(): ColorInstance {\n return new RGBColor(this.red, this.green, this.blue, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'red':\n case 'green':\n case 'blue':\n return { min: 0, max: 255, step: 1 };\n case 'alpha':\n return { min: 0, max: 1, step: 0.01 };\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n getFormat(): ColorSpace {\n return 'rgba';\n }\n\n getChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return ['red', 'green', 'blue'];\n }\n}\n\nexport class OKLCHColor extends Color {\n private L: number; // 0–1\n private C: number; // ~0–0.4 typical usable range\n private H: number; // 0–360\n private alpha: number; // 0–1\n\n constructor(L: number, C: number, H: number, alpha: number) {\n super();\n this.L = L;\n this.C = C;\n this.H = H;\n this.alpha = alpha;\n }\n\n static parse(value: string): OKLCHColor | undefined {\n if (!value) return undefined;\n\n const m = value.trim().match(OKLCH_REGEX);\n\n if (!m) return;\n\n const l = Number(m[1]) / 100;\n const c = Number(m[2]);\n const h = Number(m[3]);\n const alpha = m[5] !== undefined ? Number(m[5]) : 1;\n\n return new OKLCHColor(l, c, h, alpha);\n }\n\n private toRGB(): RGBColor {\n const L = this.L;\n const a = Number.isNaN(this.H) ? 0 : this.C * Math.cos((this.H * Math.PI) / 180);\n const b = Number.isNaN(this.H) ? 0 : this.C * Math.sin((this.H * Math.PI) / 180);\n\n const LMSg = multiplyMatrices([1, 0.3963377774, 0.2158037573, 1, -0.1055613458, -0.0638541728, 1, -0.0894841775, -1.291485548], [L, a, b]);\n\n const LMS = LMSg.map((v) => v ** 3);\n\n const xyz = multiplyMatrices([1.2268798758, -0.5578149945, 0.2813910457, -0.0405757452, 1.1122868033, -0.0717110581, -0.0763729367, -0.4214933324, 1.5869240198], LMS);\n\n let [r, g, b2] = multiplyMatrices([3.240969942, -1.537383178, -0.49861076, -0.969243636, 1.875967502, 0.041555057, 0.05563008, -0.203976959, 1.056971514], xyz);\n\n [r, g, b2] = [r, g, b2].map((c) => (Math.abs(c) > 0.0031308 ? (c < 0 ? -1 : 1) * (1.055 * Math.abs(c) ** (1 / 2.4) - 0.055) : 12.92 * c));\n\n return new RGBColor(Math.round(clamp(r, 0, 1) * 255), Math.round(clamp(g, 0, 1) * 255), Math.round(clamp(b2, 0, 1) * 255), Number(this.alpha.toFixed(2)));\n }\n\n toJSON(): Record<string, number> {\n return {\n L: this.L,\n C: this.C,\n H: this.H,\n alpha: this.alpha\n };\n }\n\n clone(): ColorInstance {\n return new OKLCHColor(this.L, this.C, this.H, this.alpha);\n }\n\n toFormat(format: ColorSpace): ColorInstance {\n switch (format) {\n case 'oklcha':\n return this;\n case 'rgba':\n return this.toRGB();\n case 'hsla':\n return this.toRGB().toFormat('hsla');\n case 'hsba':\n return this.toRGB().toFormat('hsba');\n default:\n throw new Error(`Invalid format: ${format}`);\n }\n }\n\n toString(format: ColorOutput): string {\n switch (format) {\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n\n case 'oklch': {\n const l = Number.isNaN(this.L) ? 0 : Number((this.L * 100).toFixed(2));\n const c = Number.isNaN(this.C) ? 0 : Number(this.C.toFixed(4));\n const h = Number.isNaN(this.H) ? 0 : Number(this.H.toFixed(2));\n\n return `oklch(${l}% ${c} ${h})`;\n }\n\n case 'oklcha':\n\n case 'css': {\n const l = Number.isNaN(this.L) ? 0 : Number((this.L * 100).toFixed(2));\n const c = Number.isNaN(this.C) ? 0 : Number(this.C.toFixed(4));\n const h = Number.isNaN(this.H) ? 0 : Number(this.H.toFixed(2));\n const a = Number.isNaN(this.alpha) ? 1 : Number(this.alpha.toFixed(2));\n\n return `oklch(${l}% ${c} ${h} / ${a})`;\n }\n\n case 'hsl':\n return this.toRGB().toString('hsl');\n case 'hsb':\n return this.toRGB().toString('hsb');\n case 'rgb':\n return this.toRGB().toString('rgb');\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'L':\n return { min: 0, max: 1, step: 0.01 };\n case 'C':\n return { min: 0, max: 0.4, step: 0.01 };\n case 'H':\n return { min: 0, max: 360, step: 1 };\n case 'alpha':\n return { min: 0, max: 1, step: 0.01 };\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n getFormat(): ColorSpace {\n return 'oklcha';\n }\n\n getChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return ['L', 'C', 'H'];\n }\n}\n\nexport const parseColor = (color: string): ColorInstance => {\n const parsedColor = RGBColor.parse(color) ?? HSLColor.parse(color) ?? HSBColor.parse(color) ?? undefined;\n\n if (!parsedColor) {\n throw new Error(`Invalid color: ${color}`);\n }\n\n return parsedColor;\n};\n\nexport function getChannelGradient(channel: ColorSliderChannel, value: ColorInstance, orientation: 'horizontal' | 'vertical') {\n const { min, max } = value.getChannelRange(channel);\n\n const direction = orientation === 'horizontal' ? 'right' : 'bottom';\n\n switch (channel) {\n case 'hue':\n return `linear-gradient(to ${direction}, rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)`;\n\n case 'lightness': {\n const start = value.withChannelValue(channel, min).toString('css');\n const middle = value.withChannelValue(channel, (max - min) / 2).toString('css');\n const end = value.withChannelValue(channel, max).toString('css');\n\n return `linear-gradient(to ${direction}, ${start}, ${middle}, ${end})`;\n }\n\n case 'red':\n case 'green':\n case 'blue':\n case 'saturation':\n case 'brightness':\n\n case 'alpha': {\n const start = value.withChannelValue(channel, min).toString('css');\n const end = value.withChannelValue(channel, max).toString('css');\n\n return `linear-gradient(to ${direction}, ${start}, ${end})`;\n }\n\n default:\n throw new Error(`Unknown color channel: ${channel}`);\n }\n}\n\nexport function getChannelColor(color: ColorInstance, channel: ColorChannel) {\n switch (channel) {\n case 'hue':\n return parseColor(`hsl(${color.getChannelValue('hue')}, 100%, 50%)`);\n\n case 'red':\n case 'green':\n case 'blue':\n case 'lightness':\n case 'brightness':\n case 'saturation':\n return color.withChannelValue('alpha', 1);\n\n case 'alpha': {\n return color;\n }\n\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n}\n\nconst channelGenerators = {\n hue: (color: ColorInstance) => [0, 60, 120, 180, 240, 300, 360].map((h) => color.withChannelValue('hue', h).toString('css')).join(', '),\n\n saturation: (color: ColorInstance) => `${color.withChannelValue('saturation', 0).toString('css')}, transparent`,\n\n lightness: () => 'black, transparent, white',\n brightness: () => 'black, transparent'\n};\n\nexport function getAreaGradient(color: ColorInstance, axes: Color2DAxes) {\n const { xChannel, zChannel } = color.getSpaceAxes(axes);\n const zValue = color.getChannelValue(zChannel);\n const baseFormat = color.getFormat();\n\n const format = baseFormat === 'rgba' || baseFormat === 'oklcha' ? 'hsba' : baseFormat;\n\n const base = (format === 'hsla' ? parseColor('hsl(0, 100%, 50%)') : parseColor('hsb(0, 100%, 100%)')).withChannelValue(zChannel, zValue);\n\n const channels = color.getChannels();\n\n const direction = (c: string) => (c === xChannel ? 'right' : 'top');\n\n const layers = channels\n .filter((c) => c !== zChannel)\n .map((c) => `linear-gradient(to ${direction(c)}, ${channelGenerators[c as keyof typeof channelGenerators](base)})`)\n .reverse();\n\n if (zChannel === 'hue') {\n layers.push(base.toString('css'));\n }\n\n return {\n '--area-gradient': layers.join(', ')\n };\n}\n\nexport function getInputChannelValue(color: ColorInstance, channel: ColorInputChannel, format: ColorSpace = 'hsba') {\n const isHSL = color.getFormat() === 'hsla';\n\n switch (channel) {\n case 'hex': {\n if (color.getChannelValue('alpha') < color.getChannelRange('alpha').max) {\n return color.toString('hexa');\n }\n\n return color.toString('hex');\n }\n\n case 'css':\n return color.toFormat(format).toString('css');\n\n case 'red':\n case 'green':\n case 'blue':\n return color.toFormat('rgba').getChannelValue(channel).toString();\n\n case 'hue':\n return color\n .toFormat(isHSL ? 'hsla' : 'hsba')\n .getChannelValue('hue')\n .toString();\n\n case 'saturation':\n return color\n .toFormat(isHSL ? 'hsla' : 'hsba')\n .getChannelValue('saturation')\n .toString();\n\n case 'lightness':\n return color.toFormat('hsla').getChannelValue('lightness').toString();\n\n case 'brightness':\n return color.toFormat('hsba').getChannelValue('brightness').toString();\n\n case 'C':\n return color.toFormat('oklcha').getChannelValue('C').toString();\n case 'H':\n return color.toFormat('oklcha').getChannelValue('H').toString();\n case 'L':\n return color.toFormat('oklcha').getChannelValue('L').toString();\n default:\n return color.getChannelValue(channel).toString();\n }\n}\n\nexport function getInputChannelRange(color: ColorInstance, channel: ColorInputChannel = 'hex'): ColorChannelRange | undefined {\n switch (channel) {\n case 'hex': {\n return {\n min: (parseColor('#000000') as RGBColor).toHexInt(),\n max: (parseColor('#FFFFFF') as RGBColor).toHexInt(),\n step: 1\n };\n }\n\n case 'css':\n return undefined;\n\n case 'red':\n case 'green':\n case 'blue':\n return color.toFormat('rgba').getChannelRange(channel);\n\n case 'hue':\n case 'lightness':\n case 'saturation':\n return color.toFormat('hsla').getChannelRange(channel);\n\n case 'brightness':\n return color.toFormat('hsba').getChannelRange(channel);\n\n case 'L':\n case 'C':\n case 'H':\n return color.toFormat('oklcha').getChannelRange(channel);\n\n default:\n return color.getChannelRange(channel);\n }\n}\n","import type { useColorPickerSliderProps } from '@primereact/types/shared/colorpicker';\n\nexport const defaultProps: useColorPickerSliderProps = {\n channel: 'hue',\n orientation: 'horizontal',\n disabled: false\n};\n"],"mappings":"6bAAA,OAAS,gBAAAA,OAAoB,4BCC7B,OAAS,aAAAC,OAAiB,6BAC1B,OAAS,kBAAAC,OAAsB,mCAC/B,OAAS,UAAAC,OAAc,iCACvB,OAAS,cAAAC,OAAkB,kBCJ3B,OAAS,iBAAiBC,OAA2B,6BACrD,OAAS,UAAUC,OAAkB,0BAI9B,IAAMC,EAAgB,CAAuJ,CAChL,KAAAC,EAAO,mBACP,aAAAC,EACA,OAAAC,EAASC,EAAAC,EAAA,GACFC,IADE,CAEL,KAAM,QACV,GACA,WAAAC,EACA,MAAAC,EACA,OAAAC,CACJ,IACWC,GAA4D,CAC/D,KAAAT,EACA,aAAAC,EACA,OAAAC,EACA,WAAAI,EACA,MAAAC,EACA,OAAAC,CACJ,CAAC,EDjBL,UAAYE,MAAW,QENvB,OAAS,yBAAAC,OAA6B,yBAG/B,GAAM,CAACC,GAAqBC,CAAqB,EAAIF,GAA2C,ECHvG,UAAYG,OAAyB,mCAG9B,IAAMC,GAAiCC,EAAA,GACnB,iBCH3B,OAAS,aAAAC,OAAiB,6BAC1B,OAAS,cAAAC,OAAkB,kBAE3B,UAAYC,MAAW,QCHvB,OAAS,aAAAC,OAAiB,6BAC1B,OAAS,cAAAC,OAAkB,kBAE3B,UAAYC,OAAW,QCFhB,IAAMC,GAA6D,CACtE,GAAI,KACR,EDIO,IAAMC,EAA4BC,EAAc,CACnD,KAAM,4BACN,aAAcC,GACd,OAAQ,CAGJ,MAAO,CAAE,YAFWC,EAAsB,CAErB,CACzB,EACA,OAAOC,EAAU,CACb,GAAM,CAAE,MAAAC,EAAO,KAAAC,EAAM,YAAAC,CAAY,EAAIH,EAE/BI,EAAYC,GACd,CACI,UAAWF,GAAA,YAAAA,EAAa,GAAG,iBAC/B,EACAA,GAAA,YAAAA,EAAa,IAAI,kBACjBD,EAAK,MAAM,CACf,EAEA,OAAO,iBAACI,G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Headless","Component","useColorPicker","styles","mergeProps","withComponentInCore","baseStyles","withComponent","name","defaultProps","styles","__spreadProps","__spreadValues","baseStyles","components","setup","render","withComponentInCore","React","createOptionalContext","ColorPickerProvider","useColorPickerContext","HeadlessColorPicker","defaultProps","__spreadValues","Component","mergeProps","React","Component","mergeProps","React","defaultAreaBackgroundProps","ColorPickerAreaBackground","withComponent","defaultAreaBackgroundProps","useColorPickerContext","instance","props","ptmi","colorpicker","rootProps","mergeProps","Component","Component","mergeProps","React","defaultAreaThumbProps","ColorPickerAreaThumb","withComponent","defaultAreaThumbProps","useColorPickerContext","instance","_a","_b","props","ptmi","colorpicker","disabled","rootProps","mergeProps","Component","defaultAreaProps","ColorPickerArea","withComponent","defaultAreaProps","useColorPickerContext","instance","_a","props","ptmi","colorpicker","rootProps","mergeProps","__spreadValues","Component","ColorPickerAreaBackground","ColorPickerAreaThumb","Component","EyeDropperIcon","mergeProps","Component","useButton","styles","mergeProps","React","createOptionalContext","ButtonProvider","useButtonContext","HeadlessButton","defaultProps","__spreadProps","__spreadValues","Component","groupStyles","mergeProps","React","createOptionalContext","ButtonGroupProvider","useButtonGroupContext","defaultGroupProps","ButtonGroup","withComponent","defaultGroupProps","groupStyles","instance","props","ptmi","cx","rootProps","mergeProps","ButtonGroupProvider","Component","Button","withComponent","defaultProps","styles","instance","useButton","id","props","ptmi","cx","rootProps","mergeProps","ButtonProvider","Component","ButtonGroup","React","defaultEyeDropperProps","__spreadProps","__spreadValues","defaultProps","ColorPickerEyeDropper","withComponent","defaultEyeDropperProps","useColorPickerContext","instance","_a","props","ptmi","colorpicker","rootProps","mergeProps","icon","EyeDropperIcon","Component","Button","__spreadValues","Component","useColorPickerInput","mergeProps","Component","useInputText","styles","mergeProps","Component","useFluid","styles","mergeProps","React","createOptionalContext","FluidProvider","useFluidContext","HeadlessFluid","defaultProps","__spreadProps","__spreadValues","Fluid","withComponent","defaultProps","styles","instance","useFluid","id","props","ptmi","cx","rootProps","mergeProps","FluidProvider","Component","React","createOptionalContext","InputTextProvider","useInputTextContext","HeadlessInputText","defaultProps","__spreadProps","__spreadValues","InputText","withComponent","defaultProps","styles","instance","inputtext","useInputText","fluid","useFluidContext","__spreadProps","__spreadValues","id","props","ptmi","cx","rootProps","mergeProps","InputTextProvider","Component","React","createOptionalContext","ColorPickerInputProvider","useColorPickerInputContext","HeadlessColorPickerInput","defaultInputProps","__spreadValues","defaultProps","ColorPickerInput","withComponent","defaultInputProps","instance","colorpicker","useColorPickerContext","colorpickerinput","useColorPickerInput","__spreadValues","props","ptmi","type","channelRange","channelValue","handleBlur","handleKeyDown","rootProps","mergeProps","ColorPickerInputProvider","Component","InputText","Component","useColorPickerSlider","mergeProps","React","Component","mergeProps","React","createOptionalContext","ColorPickerSliderProvider","useColorPickerSliderContext","defaultSliderThumbProps","ColorPickerSliderThumb","withComponent","defaultSliderThumbProps","colorpicker","useColorPickerContext","colorpickerslider","useColorPickerSliderContext","instance","_a","_b","_c","_d","props","ptmi","disabled","rootProps","mergeProps","Component","Component","mergeProps","React","defaultSliderTrackProps","ColorPickerSliderTrack","withComponent","defaultSliderTrackProps","colorpicker","useColorPickerContext","colorpickerslider","useColorPickerSliderContext","instance","props","ptmi","rootProps","mergeProps","Component","Component","mergeProps","React","defaultTransparencyGridProps","ColorPickerTransparencyGrid","withComponent","defaultTransparencyGridProps","useColorPickerContext","instance","props","ptmi","colorpicker","rootProps","mergeProps","Component","HeadlessColorPickerSlider","defaultSliderProps","__spreadProps","__spreadValues","ColorPickerSlider","withComponent","defaultSliderProps","instance","colorpicker","useColorPickerContext","colorpickerslider","useColorPickerSlider","__spreadProps","__spreadValues","_a","props","ptmi","handleSliderPointerDown","handleSliderPointerMove","handleSliderPointerUp","sliderStyle","rootProps","mergeProps","ColorPickerSliderProvider","Component","ColorPickerTransparencyGrid","ColorPickerSliderTrack","ColorPickerSliderThumb","Component","mergeProps","React","Component","mergeProps","React","defaultSwatchBackgroundProps","ColorPickerSwatchBackground","withComponent","defaultSwatchBackgroundProps","useColorPickerContext","instance","props","ptmi","colorpicker","rootProps","mergeProps","Component","defaultSwatchProps","ColorPickerSwatch","withComponent","defaultSwatchProps","useColorPickerContext","instance","_a","props","ptmi","colorpicker","rootProps","mergeProps","__spreadValues","Component","ColorPickerTransparencyGrid","ColorPickerSwatchBackground","ColorPicker","withComponent","defaultProps","styles","instance","useColorPicker","props","ptmi","rootProps","mergeProps","ColorPickerProvider","Component","ColorPickerArea","ColorPickerAreaBackground","ColorPickerAreaThumb","ColorPickerSlider","ColorPickerSliderThumb","ColorPickerSliderTrack","ColorPickerTransparencyGrid","ColorPickerSwatch","ColorPickerSwatchBackground","ColorPickerEyeDropper","ColorPickerInput","React","HSB_REGEX","HSL_REGEX","HEX_REGEX","RGB_REGEX","OKLCH_REGEX","clamp","value","min","max","multiplyMatrices","A","B","snap","value","min","max","step","offset","clamp","steps","snapped","precision","Color","channel","cloned","xyChannels","xChannel","yChannel","zChannel","availableStep","HSBColor","_HSBColor","hue","saturation","brightness","alpha","_a","match","HSB_REGEX","h","s","b","a","n","f","k","scale","RGBColor","l","HSLColor","format","_HSLColor","lightness","_b","HSL_REGEX","_RGBColor","red","green","blue","input","HEX_REGEX","hex","c","g","RGB_REGEX","rStr","gStr","bStr","aStr","v","r","mmax","mmin","chroma","rgbLinear","xyz","LMSg","val","L","C","H","outL","outC","outH","OKLCHColor","_OKLCHColor","m","OKLCH_REGEX","LMS","b2","parseColor","color","_c","parsedColor","getChannelGradient","orientation","direction","start","middle","end","getChannelColor","defaultProps","useColorPickerSlider","withHeadless","defaultProps","props","_a","_b","channel","orientation","disabled","colorpicker","useColorPickerContext","isSliderDragging","setIsSliderDragging","state","workingValue","moveSlider","x","y","element","rect","rel","clamped","channelRange","targetValue","currentValue","delta","newColor","handleSliderPointerDown","event","handleSliderPointerMove","handleSliderPointerUp","handleSliderKeyDown","key","isVertical","base","step","next","channelValue","offset","sliderStyle","getChannelGradient","getChannelColor"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const useColorPickerSlider: (inProps?: unknown) => import("@primereact/types/core").HeadlessInstance<import("@primereact/types/shared/colorpicker").useColorPickerSliderProps, unknown, {
|
|
3
|
+
state: {
|
|
4
|
+
isSliderDragging: boolean;
|
|
5
|
+
};
|
|
6
|
+
handleSliderPointerDown: (event: PointerEvent) => void;
|
|
7
|
+
handleSliderPointerMove: (event: PointerEvent) => void;
|
|
8
|
+
handleSliderPointerUp: (event: PointerEvent) => void;
|
|
9
|
+
handleSliderKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
10
|
+
sliderStyle: React.CSSProperties;
|
|
11
|
+
channelValue: number;
|
|
12
|
+
channelRange: import("@primereact/types/shared/colorpicker").ColorChannelRange;
|
|
13
|
+
}>;
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ColorInstance } from '@primereact/types/shared/colorpicker';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const useColorPicker: (inProps?: unknown) => import("@primereact/types/core").HeadlessInstance<import("@primereact/types/shared/colorpicker").useColorPickerProps, unknown, {
|
|
4
|
+
state: {
|
|
5
|
+
value: ColorInstance;
|
|
6
|
+
isAreaDragging: boolean;
|
|
7
|
+
};
|
|
8
|
+
value: ColorInstance | undefined;
|
|
9
|
+
areaValue: ColorInstance;
|
|
10
|
+
areaChannels: {
|
|
11
|
+
xChannel: import("@primereact/types/shared/colorpicker").ColorChannel;
|
|
12
|
+
yChannel: import("@primereact/types/shared/colorpicker").ColorChannel;
|
|
13
|
+
};
|
|
14
|
+
setValue: (inValue: unknown | ((prev?: ColorInstance | undefined) => unknown)) => void;
|
|
15
|
+
handleAreaPointerDown: (event: PointerEvent) => void;
|
|
16
|
+
handleAreaPointerMove: (event: PointerEvent) => void;
|
|
17
|
+
handleAreaPointerUp: (event: PointerEvent) => void;
|
|
18
|
+
handleAreaKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
19
|
+
areaStyles: React.CSSProperties;
|
|
20
|
+
swatchStyles: React.CSSProperties;
|
|
21
|
+
openEyeDropper: () => void;
|
|
22
|
+
syncChannelInputs: (color?: ColorInstance) => void;
|
|
23
|
+
registerInputEl: (el: {
|
|
24
|
+
elementRef: React.RefObject<HTMLInputElement>;
|
|
25
|
+
}) => void;
|
|
26
|
+
}>;
|
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{withHeadless as i}from"@primereact/core/headless";import{localeComparator as l,resolveFieldData as p}from"@primeuix/utils/object";var n={};var P=i({name:"useDataView",defaultProps:n,setup:()=>({sort:(e,o,m)=>{if(e){let s=[...e],a=l();return s.sort((u,c)=>{let r=p(u,o),t=p(c,o);return(a?a(r,t):r>t?1:r<t?-1:0)*m}),s}return null}})});export{n as defaultProps,P as useDataView};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/dataview/useDataView.ts","../../src/dataview/useDataView.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { localeComparator, resolveFieldData } from '@primeuix/utils/object';\nimport { defaultProps } from './useDataView.props';\n\nexport const useDataView = withHeadless({\n name: 'useDataView',\n defaultProps,\n setup: () => {\n const sort = (value: unknown[] | null, sortField: string, sortOrder: number) => {\n if (value) {\n const _value = [...value];\n const comparer = localeComparator();\n\n _value.sort((data1, data2) => {\n const value1 = resolveFieldData(data1, sortField);\n const value2 = resolveFieldData(data2, sortField);\n const cmp = comparer ? comparer(value1, value2) : value1 > value2 ? 1 : value1 < value2 ? -1 : 0;\n\n return cmp * sortOrder;\n });\n\n return _value;\n }\n\n return null;\n };\n\n return {\n // methods\n sort\n };\n }\n});\n","import type { useDataViewProps } from '@primereact/types/shared/dataview';\n\nexport const defaultProps: useDataViewProps = {};\n"],"mappings":"AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,oBAAAC,EAAkB,oBAAAC,MAAwB,yBCC5C,IAAMC,EAAiC,CAAC,EDExC,IAAMC,EAAcC,EAAa,CACpC,KAAM,cACN,aAAAC,EACA,MAAO,KAoBI,CAEH,KArBS,CAACC,EAAyBC,EAAmBC,IAAsB,CAC5E,GAAIF,EAAO,CACP,IAAMG,EAAS,CAAC,GAAGH,CAAK,EAClBI,EAAWC,EAAiB,EAElC,OAAAF,EAAO,KAAK,CAACG,EAAOC,IAAU,CAC1B,IAAMC,EAASC,EAAiBH,EAAOL,CAAS,EAC1CS,EAASD,EAAiBF,EAAON,CAAS,EAGhD,OAFYG,EAAWA,EAASI,EAAQE,CAAM,EAAIF,EAASE,EAAS,EAAIF,EAASE,EAAS,GAAK,GAElFR,CACjB,CAAC,EAEMC,CACX,CAEA,OAAO,IACX,CAKA,EAER,CAAC","names":["withHeadless","localeComparator","resolveFieldData","defaultProps","useDataView","withHeadless","defaultProps","value","sortField","sortOrder","_value","comparer","localeComparator","data1","data2","value1","resolveFieldData","value2"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const useDataView: (inProps?: unknown) => import("@primereact/types/core").HeadlessInstance<import("@primereact/types/shared/dataview").useDataViewProps, unknown, {
|
|
2
|
+
sort: (value: unknown[] | null, sortField: string, sortOrder: number) => unknown[] | null;
|
|
3
|
+
}>;
|
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{withHeadless as Nn}from"@primereact/core/headless";import{useMountEffect as Bn}from"@primereact/hooks";import{find as ae,findSingle as _,getAttribute as fe,getFocusableElements as Et,getIndex as Qe,getOuterWidth as Tt,isDate as wt,isEmpty as Be,isNotEmpty as Yn}from"@primeuix/utils";import*as d from"react";var yt={defaultValue:void 0,value:void 0,updateModelType:"date",selectionMode:"single",dateFormat:void 0,selectOtherMonths:!1,numberOfMonths:1,view:"date",minDate:void 0,maxDate:void 0,maxDateCount:void 0,showOnFocus:!0,autoZIndex:!0,baseZIndex:0,shortYearCutoff:"+10",showTime:!1,timeOnly:!1,hourFormat:"24",stepHour:1,stepMinute:1,stepSecond:1,hideOnDateTimeSelect:!1,hideOnRangeSelection:!1,timeSeparator:":",manualInput:!0,showSeconds:!1,appendTo:"body",onValueChange:void 0,onDateSelect:void 0,onMonthChange:void 0,onYearChange:void 0,onTodayButtonClick:void 0,onClearButtonClick:void 0,onInput:void 0,onKeyDown:void 0,onFocus:void 0,onBlur:void 0};var kt=(1969*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7,o={config:{locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",fileChosenMessage:"{0} files",noFileChosenMessage:"No file chosen",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"Page {page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List"}}}},Wn=Nn({name:"useDatePicker",defaultProps:yt,setup:({props:a,elementRef:ke})=>{var ht,bt,gt,Dt,Mt;let N=d.useRef(null),Ye=d.useRef(null),Oe=d.useRef(null),de=d.useRef(null),y=d.useRef(null),Ke=d.useRef(null),me=d.useRef(!1),Re=d.useRef(null),He=d.useRef(null),[Xe,le]=d.useState(!0),[V,A]=d.useState(!1),[v,he]=d.useState(a.view),[C,p]=d.useState(0),[m,ee]=d.useState(0),[T,Se]=d.useState(0),[B,Le]=d.useState(0),[Y,xe]=d.useState(0),[L,be]=d.useState(!1),[ge,Ve]=d.useState(0),[Ae,S]=d.useState(null),[re,Ce]=d.useState(null),Rt=()=>a.value!==void 0?typeof a.value=="string"?Z(a.value):a.value:a.defaultValue!==void 0?typeof a.defaultValue=="string"?Z(a.defaultValue):a.defaultValue:null,[s,Ue]=d.useState(()=>Rt()),Ht={rawValue:s,overlayVisible:V,currentView:v,showClearIcon:Xe,hoveredDate:re},pe=e=>{if(s){if(z())return te(k(s),e);if(O()){let t=!1;if(Array.isArray(s)){for(let n of s)if(t=te(k(n),e),t)break}return t}else if(F()&&Array.isArray(s)){let t=k(s[0]);if(t===null)return!1;if(s[1]){let n=k(s[1]);return n===null?!1:te(t,e)||te(n,e)||Ct(t,n,e)}else return te(t,e)}}return!1},St=e=>{if(!F()||!re||!s||!Array.isArray(s)||s.length===0||s[1]!==null)return!1;let t=k(s[0]);if(!t)return!1;let n=new Date(re.year,re.month,re.day),l=new Date(e.year,e.month,e.day),r=t.getTime()<n.getTime()?t:n,c=t.getTime()<n.getTime()?n:t,u=l.getTime();return u>=r.getTime()&&u<=c.getTime()},Lt=e=>{F()&&e.selectable&&Ce(e)},xt=e=>{if(wt(s)&&s!==null)return s.getMonth()===e&&s.getFullYear()===m;if(Array.isArray(s)){if(O())return s==null?void 0:s.some(t=>{let n=k(t);return n?n.getMonth()===e&&n.getFullYear()===m:!1});if(F()){let t=s!=null&&s[0]?k(s[0]):null,n=s!=null&&s[1]?k(s[1]):null;if(n){if(!t)return!1;let l=new Date(m,e,1),r=new Date(t.getFullYear(),t.getMonth(),1),c=new Date(n.getFullYear(),n.getMonth(),1);return l>=r&&l<=c}else return t?t.getFullYear()===m&&t.getMonth()===e:!1}}return!1},At=e=>{if(typeof s!="string"&&s!==null)return s.getFullYear()===e;if(Array.isArray(s)){if(O())return s==null?void 0:s.some(t=>{let n=k(t);return n?n.getFullYear()===e:!1});if(F()){let t=s!=null&&s[0]?k(s[0]):null,n=s!=null&&s[1]?k(s[1]):null,l=t?t.getFullYear():null,r=n?n.getFullYear():null;return!l||!r?!1:l===e||r===e||l<e&&r>e}}return!1},te=(e,t)=>{if(e){let n=typeof e=="string"?Z(e):e;if(n&&n instanceof Date)return n.getDate()===t.day&&n.getMonth()===t.month&&n.getFullYear()===t.year}return!1},Ct=(e,t,n)=>{let r=k(e),c=k(t);if(r&&c){let u=new Date(n.year,n.month,n.day);return r.getTime()<=u.getTime()&&c.getTime()>=u.getTime()}return!1},Ft=d.useMemo(()=>{var e,t,n,l;return((t=(e=o==null?void 0:o.config)==null?void 0:e.locale)==null?void 0:t.firstDayOfWeek)>0?7-((l=(n=o==null?void 0:o.config)==null?void 0:n.locale)==null?void 0:l.firstDayOfWeek):0},[]),Pt=(e,t)=>{let n=new Date;n.setDate(1),n.setMonth(e),n.setFullYear(t);let l=n.getDay()+Ft;return l>=7?l-7:l},je=(e,t)=>32-tt(new Date(t,e,32)).getDate(),vt=(e,t)=>{let n=et(e,t);return je(n.month,n.year)},et=(e,t)=>{let n,l;return e===0?(n=11,l=t-1):(n=e-1,l=t),{month:n,year:l}},It=(e,t)=>{let n,l;return e===11?(n=0,l=t+1):(n=e+1,l=t),{month:n,year:l}},tt=e=>(e||(e=new Date),e.setHours(e.getHours()>12?e.getHours()+2:0),e),Fe=(e,t,n,l)=>e.getDate()===t&&e.getMonth()===n&&e.getFullYear()===l,se=(e,t,n,l)=>{let r=!0,c=!0,u=!0,f=!0;return l&&!a.selectOtherMonths?!1:(a.minDate&&(a.minDate.getFullYear()>n||a.minDate.getFullYear()===n&&(a.minDate.getMonth()>t||a.minDate.getMonth()===t&&a.minDate.getDate()>e))&&(r=!1),a.maxDate&&(a.maxDate.getFullYear()<n||a.maxDate.getFullYear()===n&&(a.maxDate.getMonth()<t||a.maxDate.getMonth()===t&&a.maxDate.getDate()<e))&&(c=!1),a.disabledDates&&(u=!Wt(e,t,n)),a.disabledDays&&(f=!Jt(e,t,n)),r&&c&&u&&f)},Nt=e=>{S({backward:!0,button:!0}),J(e)},Bt=e=>{S({backward:!1,button:!0}),q(e)},J=e=>{e.preventDefault(),$()&&(v==="month"?(We(),a.onYearChange&&a.onYearChange({month:C,year:m})):v==="year"?Yt():e.shiftKey?We():(C===0?(p(11),We()):p(C-1),a.onMonthChange&&a.onMonthChange({month:C+1,year:m})))},q=e=>{e.preventDefault(),$()&&(v==="month"?(Je(),a.onYearChange&&a.onYearChange({month:C,year:m})):v==="year"?Ot():e.shiftKey?Je():(C===11?(p(0),Je()):p(C+1),a.onMonthChange&&a.onMonthChange({month:C+1,year:m})))},We=()=>{ee((m!=null?m:0)-1)},Yt=()=>{ee((m!=null?m:0)-10)},Je=()=>{ee((m!=null?m:0)+1)},Ot=()=>{ee((m!=null?m:0)+10)},Kt=e=>{he("month"),e.preventDefault()},Vt=e=>{he("year"),e.preventDefault()},$=()=>!a.disabled&&!a.readOnly,Ut=e=>{var n,l,r,c,u,f;let t=e.getHours();a.hourFormat==="12"&&(be(t>11),t>=12&&(t=t==12?12:t-12)),Se(Math.floor(t/((n=a.stepHour)!=null?n:1))*((l=a.stepHour)!=null?l:1)),Le(Math.floor(e.getMinutes()/((r=a.stepMinute)!=null?r:1))*((c=a.stepMinute)!=null?c:1)),xe(Math.floor(e.getSeconds()/((u=a.stepSecond)!=null?u:1))*((f=a.stepSecond)!=null?f:1))},jt=()=>{var e,t;$()&&(V?A(!1):((t=(e=N.current)==null?void 0:e.elementRef.current)==null||t.focus(),A(!0)))},Wt=(e,t,n)=>{if(a.disabledDates){for(let l of a.disabledDates)if(l.getFullYear()===n&&l.getMonth()===t&&l.getDate()===e)return!0}return!1},Jt=(e,t,n)=>{if(a.disabledDays){let r=new Date(n,t,e).getDay();return a.disabledDays.indexOf(r)!==-1}return!1},De=(e,t)=>{var n;if(!(a.disabled||!t.selectable)){if(y.current&&ae(y.current,'table td span:not([data-p-disabled="true"])').forEach(l=>l.tabIndex=-1),e&&e.currentTarget.focus(),O()&&pe(t)){if(s&&Array.isArray(s)){let l=s.filter(r=>!te(k(r),t));oe(l)}}else qt()&&(t.otherMonth&&(p(t.month),ee(t.year)),nt(t));z()&&(!a.showTime||a.hideOnDateTimeSelect)&&(N.current&&((n=N.current)==null||n.elementRef.current.focus()),setTimeout(()=>{A(!1)},150))}},nt=e=>{let t=new Date(e.year,e.month,e.day);a.showTime&&(a.hourFormat==="12"&&T!==12&&L?t.setHours(T+12):t.setHours(T),t.setMinutes(B),t.setSeconds(a.showSeconds?Y:0)),a.minDate&&a.minDate>t&&(t=a.minDate),a.maxDate&&a.maxDate<t&&(t=a.maxDate),Se(t.getHours()),Le(t.getMinutes()),xe(t.getSeconds());let n=null;if(z())n=t;else if(O())Array.isArray(s)?n=[...s,t]:n=[t];else if(F())if(s&&Array.isArray(s)&&s.length){let l=k(s[0]),r=s[1];!r&&t.getTime()>=l.getTime()?(r=t,Ve(1),Ce(null)):(l=t,r=null,Ve(0),Ce(null)),n=[l,r]}else n=[t,null],Ve(0);n!==null&&oe(n),a.onDateSelect&&a.onDateSelect({value:t})},oe=e=>{if(Ue(e),a.updateModelType==="date")if(z())Me(e);else{let t=null;Array.isArray(e)&&(t=e.map(n=>k(n))),Me(t)}else if(a.updateModelType=="string"){if(z())(e instanceof Date||typeof e=="string"||e===null)&&Me(Q(e));else if(O()){let t=null;Array.isArray(e)&&(t=e.map(n=>{let l=Q(n);return typeof l=="string"?l:null})),Me(t)}else if(F()){let t=null;Array.isArray(e)&&(t=e.map(n=>{if(n==null)return null;let l=Q(n);return l!==null&&typeof l=="string"?l:null})),Me(t)}}},qt=()=>O()&&a.maxDateCount!=null?a.maxDateCount>(s&&Array.isArray(s)?s.length:0):!0,Me=e=>{le(!Be(e)),a.onValueChange&&a.onValueChange({value:e})},z=()=>a.selectionMode==="single",F=()=>a.selectionMode==="range",O=()=>a.selectionMode==="multiple",ye=e=>{var n,l,r,c;if(typeof e=="string")return a.dateFormat?isNaN(new Date(e).getTime())?e:at(new Date(e),a.dateFormat):e;let t="";if(e)try{if(z()){let u=Array.isArray(e)?(n=e[0])!=null?n:null:e;u==null?t="":t=(l=Q(u))!=null?l:""}else if(O()){if(Array.isArray(e))for(let u=0;u<e.length;u++){let f=e[u],h=Q(typeof f=="string"?k(f):f);t+=h,u!==e.length-1&&(t+=", ")}}else if(F()&&Array.isArray(e)&&e.length){let u=k(e[0]),f=k(e[1]);t=(r=Q(u))!=null?r:"",f&&(t+=" - "+((c=Q(f))!=null?c:""))}}catch(u){t=typeof e=="string"?e:""}return t},Q=e=>{let t=null;return wt(e)&&Yn(e)?a.timeOnly?t=lt(e):(t=at(e,mt),a.showTime&&(t+=" "+lt(e))):a.updateModelType==="string"&&(t=e),t},at=(e,t)=>{var h,i,g,R,M,w,b,K;if(!e)return"";let n,l=D=>{let H=n+1<t.length&&t.charAt(n+1)===D;return H&&n++,H},r=(D,H,I)=>{let E=""+H;if(l(D))for(;E.length<I;)E="0"+E;return E},c=(D,H,I,E)=>l(D)?E[H]:I[H],u="",f=!1;if(e)for(n=0;n<t.length;n++)if(f)t.charAt(n)==="'"&&!l("'")?f=!1:u+=t.charAt(n);else switch(t.charAt(n)){case"d":u+=r("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),(i=(h=o==null?void 0:o.config)==null?void 0:h.locale)==null?void 0:i.dayNamesShort,(R=(g=o==null?void 0:o.config)==null?void 0:g.locale)==null?void 0:R.dayNames);break;case"o":u+=r("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=r("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),(w=(M=o==null?void 0:o.config)==null?void 0:M.locale)==null?void 0:w.monthNamesShort,(K=(b=o==null?void 0:o.config)==null?void 0:b.locale)==null?void 0:K.monthNames);break;case"y":u+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=e.getTime()*1e4+kt;break;case"'":l("'")?u+="'":f=!0;break;default:u+=t.charAt(n)}return u},lt=e=>{var c,u,f,h;if(!e)return"";let t="",n=e.getHours(),l=e.getMinutes(),r=e.getSeconds();return a.hourFormat==="12"&&n>11&&n!==12&&(n-=12),a.hourFormat==="12"?t+=n===0?12:n<10?"0"+n:n:t+=n<10?"0"+n:n,t+=":",t+=l<10?"0"+l:l,a.showSeconds&&(t+=":",t+=r<10?"0"+r:r),a.hourFormat==="12"&&(t+=e.getHours()>11?` ${(u=(c=o==null?void 0:o.config)==null?void 0:c.locale)==null?void 0:u.pm}`:` ${(h=(f=o==null?void 0:o.config)==null?void 0:f.locale)==null?void 0:h.am}`),t},qe=()=>{Ke.current&&clearTimeout(Ke.current)},zt=e=>{let t=new Date,n={day:t.getDate(),month:t.getMonth(),year:t.getFullYear(),otherMonth:t.getMonth()!==C||t.getFullYear()!==m,today:!0,selectable:!0};he("date"),De(null,n),a.onTodayButtonClick&&a.onTodayButtonClick({originalEvent:e,date:t}),e.preventDefault()},Zt=e=>{oe(null),A(!1),le(!1),a.onClearButtonClick&&a.onClearButtonClick(e),e.preventDefault()},Gt=(e,t,n)=>{$()&&(ze(e,null,t,n),e.preventDefault())},rt=e=>{$()&&(qe(),st(),e.preventDefault())},_t=()=>{qe()},$t=e=>{switch(e.code){case"Tab":Ee(e);break;case"Escape":A(!1),e.preventDefault();break;default:break}a.onKeyDown&&a.onKeyDown(e)},Qt=(e,t,n)=>{switch(e.code){case"Enter":case"NumpadEnter":case"Space":$()&&(ze(e,null,t,n),e.preventDefault());break}},Xt=e=>{switch(e.code){case"Enter":case"NumpadEnter":case"Space":rt(e)}},ze=(e,t,n,l)=>{let r=t||500;switch(qe(),Ke.current=setTimeout(()=>{ze(e,100,n,l)},r),n){case 0:l===1?en(e):tn(e);break;case 1:l===1?nn(e):an(e);break;case 2:l===1?ln(e):rn(e);break}},pt=(e,t)=>a.hourFormat=="12"?e===12?t?12:0:t?e+12:e:e,ne=(e,t,n,l)=>{let r=$e,c=pt(e,l);F()&&(r=Array.isArray(s)?s[1]||s[0]:null),O()&&(r=Array.isArray(s)?s[s.length-1]:null);let u=r instanceof Date?r.toDateString():null;return!(a.minDate&&u&&a.minDate.toDateString()===u&&(a.minDate.getHours()>c||a.minDate.getHours()===c&&(a.minDate.getMinutes()>t||a.minDate.getMinutes()===t&&a.minDate.getSeconds()>n))||a.maxDate&&u&&a.maxDate.toDateString()===u&&(a.maxDate.getHours()<c||a.maxDate.getHours()===c&&(a.maxDate.getMinutes()<t||a.maxDate.getMinutes()===t&&a.maxDate.getSeconds()<n)))},en=e=>{let t=T,n=T+Number(a.stepHour),l=L;a.hourFormat=="24"?n=n>=24?n-24:n:a.hourFormat=="12"&&(t<12&&n>11&&(l=!L),n=n>=13?n-12:n),ne(n,B,Y,l)&&(Se(n),be(l)),e.preventDefault()},tn=e=>{let t=T-Number(a.stepHour),n=L;a.hourFormat=="24"?t=t<0?24+t:t:a.hourFormat=="12"&&(T===12&&(n=!L),t=t<=0?12+t:t),ne(t,B,Y,n)&&(Se(t),be(n)),e.preventDefault()},nn=e=>{let t=B+Number(a.stepMinute);ne(T,t,Y,L)&&Le(t>59?t-60:t),e.preventDefault()},an=e=>{let t=B-Number(a.stepMinute);t=t<0?60+t:t,ne(T,t,Y,L)&&Le(t),e.preventDefault()},ln=e=>{let t=Y+Number(a.stepSecond);ne(T,B,t,L)&&xe(t>59?t-60:t),e.preventDefault()},rn=e=>{let t=Y-Number(a.stepSecond);t=t<0?60+t:t,ne(T,B,t,L)&&xe(t),e.preventDefault()},st=()=>{let e=$e;F()&&(e=Array.isArray(s)?s[ge]||s[0]:null),O()&&(e=Array.isArray(s)?s[s.length-1]:null);let t=e&&e instanceof Date?new Date(e.getTime()):new Date;a.hourFormat=="12"?T===12?t.setHours(L?12:0):t.setHours(L?T+12:T):t.setHours(T),t.setMinutes(B),t.setSeconds(Y);let n;F()?Array.isArray(s)?ge===1&&s[1]?n=[s[0],t]:ge===0?n=[t,s[1]]:n=[t,null]:n=[t,null]:O()?Array.isArray(s)?n=[...s.slice(0,-1),t]:n=[t]:n=t,oe(n),a.onDateSelect&&a.onDateSelect({value:n})},sn=e=>{!ne(T,B,Y,!L)&&(a.maxDate||a.minDate)||(be(!L),e.preventDefault())},ot=(e,t)=>{a.view==="month"?De(e,{year:m,month:t,day:1,selectable:!0,otherMonth:!1,today:!1}):(p(t),he("date"),a.onMonthChange&&a.onMonthChange({month:C+1,year:m})),setTimeout(Pe,0)},ut=(e,t)=>{a.view==="year"?De(e,{year:t.value,month:0,day:1,selectable:!0,otherMonth:!1,today:!1}):(ee(t.value),he("month"),a.onYearChange&&a.onYearChange({month:C+1,year:m})),setTimeout(Pe,0)},Ze=()=>{let e=$e;if(e&&(p(e.getMonth()),ee(e.getFullYear()),a.showTime||a.timeOnly)){let t=e;if(F()&&s&&Array.isArray(s)&&s[ge]){let n=s[ge];n instanceof Date&&(t=n)}Ut(t)}},ct=e=>{if(e==null)return!0;let t=!0;return z()&&e instanceof Date?se(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(t=!1):Array.isArray(e)&&e.every(n=>se(n.getDate(),n.getMonth(),n.getFullYear(),!1))&&F()&&(t=e.length>1&&e[1]>=e[0]),t},Z=e=>{var n,l,r;if(!e||e.trim().length===0)return null;let t;if(z())t=(n=Ge(e))!=null?n:null;else if(O()){let c=e.split(","),u=[];for(let f of c)u.push((l=Ge(f.trim()))!=null?l:null);t=u}else if(F()){let c=e.split(" - "),u=[];for(let f=0;f<c.length;f++)u[f]=(r=Ge(c[f].trim()))!=null?r:null;t=u}return t},k=e=>{var t,n;if(typeof e=="string"){let l=Z(e);return l?z()?l:Array.isArray(l)&&(t=l[0])!=null?t:null:null}return Array.isArray(e)?(n=e[0])!=null?n:null:e!=null?e:null},Ge=e=>{let t,n=e.match(/(?:(.+?) )?(\d{2}:\d{2}(?::\d{2})?)(?: (am|pm))?/);if(a.timeOnly)t=new Date,n&&it(t,n[2],n[3]);else{let l=mt;a.showTime?n&&(t=ft(n[1],l),it(t,n[2],n[3])):t=ft(e,l)}return t},it=(e,t,n)=>{var r,c,u,f;if(a.hourFormat=="12"&&!n)throw new Error("Invalid Time");be(n===((c=(r=o==null?void 0:o.config)==null?void 0:r.locale)==null?void 0:c.pm)||n===((f=(u=o==null?void 0:o.config)==null?void 0:u.locale)==null?void 0:f.pm.toLowerCase()));let l=on(t);e.setHours(l.hour),e.setMinutes(l.minute),l.second!==null&&e.setSeconds(l.second)},on=e=>{let t=e.split(":"),n=a.showSeconds?3:2,l=/^[0-9][0-9]$/;if(t.length!==n||!t[0].match(l)||!t[1].match(l)||a.showSeconds&&!t[2].match(l))throw"Invalid time";let r=parseInt(t[0]),c=parseInt(t[1]),u=a.showSeconds?parseInt(t[2]):null;if(isNaN(r)||isNaN(c)||r>23||c>59||a.hourFormat=="12"&&r>12||a.showSeconds&&(u===null||isNaN(u)||u>59))throw"Invalid time";return a.hourFormat=="12"&&r!==12&&L?r+=12:a.hourFormat=="12"&&r==12&&!L&&(r=0),{hour:r,minute:c,second:u}},ft=(e,t)=>{var H,I,E,ue,j,x,P,ce;if(t==null||e==null)throw"Invalid arguments";if(e=typeof e=="object"?e.toString():e+"",e==="")return null;let n,l,r,c=0,u=typeof a.shortYearCutoff!="string"?a.shortYearCutoff:new Date().getFullYear()%100+parseInt(a.shortYearCutoff,10),f=-1,h=-1,i=-1,g=-1,R=!1,M,w=W=>{let ie=n+1<t.length&&t.charAt(n+1)===W;return ie&&n++,ie},b=W=>{let ie=w(W),Ie=W==="@"?14:W==="!"?20:W==="y"&&ie?4:W==="o"?3:2,Te=W==="y"?Ie:1,Ne=new RegExp("^\\d{"+Te+","+Ie+"}"),G=e.substring(c).match(Ne);if(!G)throw"Missing number at position "+c;return c+=G[0].length,parseInt(G[0],10)},K=(W,ie,Ie)=>{let Te=-1,Ne=w(W)?Ie:ie,G=[];for(let U=0;U<Ne.length;U++)G.push([U,Ne[U]]);G.sort((U,we)=>we[1].length-U[1].length);for(let U=0;U<G.length;U++){let we=G[U][1];if(e.substr(c,we.length).toLowerCase()===we.toLowerCase()){Te=G[U][0],c+=we.length;break}}if(Te!==-1)return Te+1;throw"Unknown name at position "+c},D=()=>{if(e.charAt(c)!==t.charAt(n))throw"Unexpected literal at position "+c;c++};for(v==="month"&&(i=1),v==="year"&&(i=1,h=1),n=0;n<t.length;n++)if(R)t.charAt(n)==="'"&&!w("'")?R=!1:D();else switch(t.charAt(n)){case"d":i=b("d");break;case"D":K("D",(I=(H=o==null?void 0:o.config)==null?void 0:H.locale)==null?void 0:I.dayNamesShort,(ue=(E=o==null?void 0:o.config)==null?void 0:E.locale)==null?void 0:ue.dayNames);break;case"o":g=b("o");break;case"m":h=b("m");break;case"M":h=K("M",(x=(j=o==null?void 0:o.config)==null?void 0:j.locale)==null?void 0:x.monthNamesShort,(ce=(P=o==null?void 0:o.config)==null?void 0:P.locale)==null?void 0:ce.monthNames);break;case"y":f=b("y");break;case"@":M=new Date(b("@")),f=M.getFullYear(),h=M.getMonth()+1,i=M.getDate();break;case"!":M=new Date((b("!")-kt)/1e4),f=M.getFullYear(),h=M.getMonth()+1,i=M.getDate();break;case"'":w("'")?D():R=!0;break;default:D()}if(c<e.length&&(r=e.substr(c),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(f===-1?f=new Date().getFullYear():f<100&&(f+=new Date().getFullYear()-new Date().getFullYear()%100+(f<=u?0:-100)),g>-1){h=1,i=g;do{if(l=je(h-1,f),i<=l)break;h++,i-=l}while(!0)}if(M=tt(new Date(f,h-1,i)),M.getFullYear()!==f||M.getMonth()+1!==h||M.getDate()!==i)throw"Invalid date";return M},un=e=>{let t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));let n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t.getTime())/864e5)/7)+1},cn=(e,t,n)=>{var u,f,h,i,g,R,M,w,b,K,D,H;e.preventDefault();let l=e.currentTarget,r=l.parentElement,c=Qe(r);switch(e.code){case"ArrowDown":{if(l.tabIndex=-1,(u=r.parentElement)==null?void 0:u.nextElementSibling){let E=Qe(r.parentElement),x=Array.from((i=(h=(f=r.parentElement)==null?void 0:f.parentElement)==null?void 0:h.children)!=null?i:[]).slice(E+1).find(P=>{let ce=P.children[c].children[0];return!fe(ce,"data-p-disabled")});if(x){let P=x.children[c].children[0];P.tabIndex=0,P.focus()}else S({backward:!1}),q(e)}else S({backward:!1}),q(e);e.preventDefault();break}case"ArrowUp":{if(l.tabIndex=-1,e.altKey)A(!0);else if((g=r.parentElement)==null?void 0:g.previousElementSibling){let E=Qe(r.parentElement),x=Array.from((w=(M=(R=r.parentElement)==null?void 0:R.parentElement)==null?void 0:M.children)!=null?w:[]).slice(0,E).reverse().find(P=>{let ce=P.children[c].children[0];return!fe(ce,"data-p-disabled")});if(x){let P=x.children[c].children[0];P.tabIndex=0,P.focus()}else S({backward:!0}),J(e)}else S({backward:!0}),J(e);e.preventDefault();break}case"ArrowLeft":{if(l.tabIndex=-1,r.previousElementSibling){let j=Array.from((K=(b=r.parentElement)==null?void 0:b.children)!=null?K:[]).slice(0,c).reverse().find(x=>{let P=x.children[0];return fe(P,"data-pc-section")!=="weeklabelcontainer"});if(j){let x=j.children[0];x.tabIndex=0,x.focus()}else X(e,!0,n)}else X(e,!0,n);e.preventDefault();break}case"ArrowRight":{if(l.tabIndex=-1,r.nextElementSibling){let j=Array.from((H=(D=r.parentElement)==null?void 0:D.children)!=null?H:[]).slice(c+1).find(x=>{let P=x.children[0];return!fe(P,"data-p-disabled")});if(j){let x=j.children[0];x.tabIndex=0,x.focus()}else X(e,!1,n)}else X(e,!1,n);e.preventDefault();break}case"Enter":case"NumpadEnter":case"Space":{De(e,t),e.preventDefault();break}case"Escape":{A(!1),e.preventDefault();break}case"Tab":{Ee(e);break}case"Home":{l.tabIndex=-1;let E=r.parentElement.children[0].children[0];fe(E,"data-p-disabled")?X(e,!0,n):(E.tabIndex=0,E.focus()),e.preventDefault();break}case"End":{l.tabIndex=-1;let I=r.parentElement,E=I.children[I.children.length-1].children[0];fe(E,"data-p-disabled")?X(e,!1,n):(E.tabIndex=0,E.focus()),e.preventDefault();break}case"PageUp":{l.tabIndex=-1,e.shiftKey?(S({backward:!0}),J(e)):X(e,!0,n),e.preventDefault();break}case"PageDown":{l.tabIndex=-1,e.shiftKey?(S({backward:!1}),q(e)):X(e,!1,n),e.preventDefault();break}default:break}},X=(e,t,n=0)=>{var l,r;if(t)if(a.numberOfMonths===1||n===0)S({backward:!0}),J(e);else{let c=(l=y.current)==null?void 0:l.children[n-1],u=ae(c,'table td span:not([data-p-disabled="true"])'),f=u[u.length-1];f.tabIndex=0,f.focus()}else if(a.numberOfMonths===1||n===a.numberOfMonths-1)S({backward:!1}),q(e);else{let c=(r=y.current)==null?void 0:r.children[n+1],u=_(c,'table td span:not([data-p-disabled="true"])');u.tabIndex=0,u.focus()}},fn=(e,t)=>{var l,r,c,u,f,h;let n=e.currentTarget;switch(e.code){case"ArrowUp":case"ArrowDown":{n.tabIndex=-1;let i=n.parentElement,g=i==null?void 0:i.parentElement,R=e.code==="ArrowUp"?g==null?void 0:g.previousElementSibling:g==null?void 0:g.nextElementSibling,M=Array.from((r=(l=i==null?void 0:i.parentElement)==null?void 0:l.children)!=null?r:[]).indexOf(i),w=R==null?void 0:R.children[M],b=w==null?void 0:w.children[0];b&&(b.tabIndex=0,b.focus()),e.preventDefault();break}case"ArrowLeft":{n.tabIndex=-1;let i=(u=(c=n.parentElement)==null?void 0:c.previousElementSibling)==null?void 0:u.children[0];i?(i.tabIndex=0,i.focus()):(S({backward:!0}),J(e)),e.preventDefault();break}case"ArrowRight":{n.tabIndex=-1;let i=(h=(f=n.parentElement)==null?void 0:f.nextElementSibling)==null?void 0:h.children[0];i?(i.tabIndex=0,i.focus()):(S({backward:!1}),q(e)),e.preventDefault();break}case"Home":case"End":break;case"PageUp":{if(e.shiftKey)return;S({backward:!0}),J(e);break}case"PageDown":{if(e.shiftKey)return;S({backward:!1}),q(e);break}case"Enter":case"NumpadEnter":case"Space":{ot(e,t),e.preventDefault();break}case"Escape":{A(!1),e.preventDefault();break}case"Tab":{Ee(e);break}default:break}},dn=(e,t)=>{var l,r,c,u,f,h;let n=e.currentTarget;switch(e.code){case"ArrowUp":case"ArrowDown":{n.tabIndex=-1;let i=n.parentElement,g=i==null?void 0:i.parentElement,R=e.code==="ArrowUp"?g==null?void 0:g.previousElementSibling:g==null?void 0:g.nextElementSibling,M=Array.from((r=(l=i==null?void 0:i.parentElement)==null?void 0:l.children)!=null?r:[]).indexOf(i),w=R==null?void 0:R.children[M],b=w==null?void 0:w.children[0];b&&(b.tabIndex=0,b.focus()),e.preventDefault();break}case"ArrowLeft":{n.tabIndex=-1;let i=(u=(c=n.parentElement)==null?void 0:c.previousElementSibling)==null?void 0:u.children[0];i?(i.tabIndex=0,i.focus()):(S({backward:!0}),J(e)),e.preventDefault();break}case"ArrowRight":{n.tabIndex=-1;let i=(h=(f=n.parentElement)==null?void 0:f.nextElementSibling)==null?void 0:h.children[0];i?(i.tabIndex=0,i.focus()):(S({backward:!1}),q(e)),e.preventDefault();break}case"Home":case"End":break;case"PageUp":{if(e.shiftKey)return;S({backward:!0}),J(e);break}case"PageDown":{if(e.shiftKey)return;S({backward:!1}),q(e);break}case"Enter":case"NumpadEnter":case"Space":{ut(e,t),e.preventDefault();break}case"Escape":{A(!1),e.preventDefault();break}case"Tab":{Ee(e);break}default:break}},Pe=()=>{var t,n;let e=null;if(Ae){if(Ae.button)_e(),Ae.backward?Oe.current&&((t=Oe.current)==null||t.elementRef.current.focus()):Ye.current&&((n=Ye.current)==null||n.elementRef.current.focus());else{if(!y.current)return;if(Ae.backward){let l;v==="month"?l=ae(y.current,'[data-pc-name="datepickertable"] [data-pc-section="month"]:not([data-p-disabled="true"])'):v==="year"?l=ae(y.current,'[data-pc-name="datepickertable"] [data-pc-section="year"]:not([data-p-disabled="true"])'):l=ae(y.current,'table td span:not([data-pc-section="weeklabelcontainer"]):not([data-p-disabled="true"])'),l&&l.length>0&&(e=l[l.length-1])}else v==="month"?e=_(y.current,'[data-pc-name="datepickertable"] [data-pc-section="month"]:not([data-p-disabled="true"])'):v==="year"?e=_(y.current,'[data-pc-name="datepickertable"] [data-pc-section="year"]:not([data-p-disabled="true"])'):e=_(y.current,'table td span:not([data-pc-section="weeklabelcontainer"]):not([data-p-disabled="true"])');e&&(e.tabIndex=0,e.focus())}S(null)}else _e()},_e=()=>{let e;if(y.current){if(v==="month"){let t=ae(y.current,'[data-pc-name="datepickertable"] [data-pc-section="month"]'),n=_(y.current,'[data-pc-name="datepickertable"] [data-pc-section="month"][data-p-selected="true"]');t.forEach(l=>l.tabIndex=-1),e=n||t[0]}else if(v==="year"){let t=ae(y.current,'[data-pc-name="datepickertable"] [data-pc-section="year"]'),n=_(y.current,'[data-pc-name="datepickertable"] [data-pc-section="year"][data-p-selected="true"]');t.forEach(l=>l.tabIndex=-1),e=n||t[0]}else if(e=_(y.current,'.p-datepicker-calendar span[data-p-selected="true"]'),!e){let t=_(y.current,'td[data-p-today="true"] span:not([data-pc-section="weeklabelcontainer"]):not([data-p-disabled="true"])');t?e=t:e=_(y.current,'.p-datepicker-calendar td span:not([data-pc-section="weeklabelcontainer"]):not([data-p-disabled="true"])')}e&&(e.tabIndex=0)}},Ee=e=>{if(e.preventDefault(),!y.current)return;let t=Et(y.current);if(t&&t.length>0)if(!document.activeElement)t[0].focus();else{let n=t.indexOf(document.activeElement);if(e.shiftKey)n===-1||n===0?t[t.length-1].focus():t[n-1].focus();else if(n===-1)if(a.timeOnly)t[0].focus();else{let l=t.findIndex(r=>r.tagName==="SPAN");l===-1&&(l=t.findIndex(r=>r.tagName==="BUTTON")),l!==-1?t[l].focus():t[0].focus()}else n===t.length-1?t[0].focus():t[n+1].focus()}},mn=e=>{var t,n;return(n=(t=o==null?void 0:o.config)==null?void 0:t.locale)==null?void 0:n.monthNames[e!=null?e:C]},hn=()=>m,bn=()=>{oe(null),le(!1),A(!1)},gn=e=>{try{Re.current=e.target.selectionStart,He.current=e.target.selectionEnd,le(!Be(e.target.value));let t=Z(e.target.value);ct(t)&&(me.current=!0,oe(a.updateModelType==="string"?ye(t):t),Ze())}catch(t){}a.onInput&&a.onInput(e)},Dn=()=>{a.showOnFocus&&$()&&!V&&A(!0)},Mn=e=>{var t;if(e.code==="ArrowDown"&&V)Ee(e);else if(e.code==="ArrowDown"&&!V)A(!0);else if(e.code==="Escape")V&&(A(!1),e.preventDefault(),e.stopPropagation());else if(e.code==="Tab")V&&y.current&&Et(y.current).forEach(n=>n.tabIndex=-1),V&&A(!1);else if(e.code==="Enter"){if(a.manualInput&&e.target.value!==null&&((t=e.target.value)==null?void 0:t.trim())!=="")try{let n=Z(e.target.value);ct(n)&&A(!1)}catch(n){}a.onKeyDown&&a.onKeyDown(e)}},yn=e=>{a.showonInputFocus&&$()&&A(!0),a.onFocus&&a.onFocus(e)},En=e=>{a.onBlur&&a.onBlur({originalEvent:e,value:e.target.value}),a.onValueChange&&(e.target.value=ye(s)),Xe&&le(!Be(e.target.value))},Tn=()=>{var e,t,n,l;if(Pe(),(l=(n=(t=(e=de==null?void 0:de.current)==null?void 0:e.containerRef)==null?void 0:t.current)==null?void 0:n.elementRef)!=null&&l.current){let r=de.current.containerRef.current.elementRef.current;ke!=null&&ke.current&&(r.style.width=Tt(r)+"px",r.style.minWidth=Tt(ke.current)+"px")}},wn=e=>{A(e)},$e=d.useMemo(()=>{var t,n;let e=s;if(e&&Array.isArray(e))if(F())if(e.length===0)e=null;else if(e.length===1)e=e[0];else{let l=k(e[0]),r=k(e[1]),c=new Date(l.getFullYear(),l.getMonth()+((t=a.numberOfMonths)!=null?t:1),1);!r||r<c?e=e[0]:e=new Date(r.getFullYear(),r.getMonth()-((n=a.numberOfMonths)!=null?n:1)+1,1)}else O()&&(e=e[e.length-1]);if(e&&typeof e!="string")return e;{let l=new Date;return a.maxDate&&a.maxDate<l?a.maxDate:a.minDate&&a.minDate>l?a.minDate:l}},[s,a.numberOfMonths,a.maxDate,a.minDate]),dt=d.useMemo(()=>ye(s),[s]),ve=d.useMemo(()=>{var t;let e=[];for(let n=0;n<((t=a.numberOfMonths)!=null?t:1);n++){let l=(C!=null?C:0)+n,r=m!=null?m:0;l>11&&(l=l%11-1,r=r+1);let c=[],u=Pt(l,r),f=je(l,r),h=vt(l,r),i=1,g=new Date,R=[],M=Math.ceil((f+u)/7);for(let w=0;w<M;w++){let b=[];if(w==0){for(let D=h-u+1;D<=h;D++){let H=et(l,r);b.push({day:D,month:H.month,year:H.year,otherMonth:!0,today:Fe(g,D,H.month,H.year),selectable:se(D,H.month,H.year,!0)})}let K=7-b.length;for(let D=0;D<K;D++)b.push({day:i,month:l,year:r,otherMonth:!1,today:Fe(g,i,l,r),selectable:se(i,l,r,!1)}),i++}else for(let K=0;K<7;K++){if(i>f){let D=It(l,r);b.push({day:i-f,month:D.month,year:D.year,otherMonth:!0,today:Fe(g,i-f,D.month,D.year),selectable:se(i-f,D.month,D.year,!0)})}else b.push({day:i,month:l,year:r,otherMonth:!1,today:Fe(g,i,l,r),selectable:se(i,l,r,!1)});i++}R.push(un(new Date(b[0].year,b[0].month,b[0].day))),c.push(b)}e.push({month:l,year:r,dates:c,weekNumbers:R})}return e},[C,m,a.numberOfMonths,a.minDate,a.maxDate,a.disabledDates,a.disabledDays,a.selectOtherMonths]),kn=d.useCallback((e=0)=>ve[e],[ve]),Rn=d.useMemo(()=>{var n,l;let e=[],t=r=>{if(a.minDate){let c=a.minDate.getMonth(),u=a.minDate.getFullYear();if(m<u||m===u&&r<c)return!1}if(a.maxDate){let c=a.maxDate.getMonth(),u=a.maxDate.getFullYear();if(m>u||m===u&&r>c)return!1}return!0};for(let r=0;r<=11;r++)e.push({value:(l=(n=o==null?void 0:o.config)==null?void 0:n.locale)==null?void 0:l.monthNamesShort[r],selectable:t(r)});return e},[m,a.minDate,a.maxDate]),Hn=d.useMemo(()=>{let e=[],t=m-m%10,n=l=>!(a.minDate&&a.minDate.getFullYear()>l||a.maxDate&&a.maxDate.getFullYear()<l);for(let l=0;l<10;l++)e.push({value:t+l,selectable:n(t+l)});return e},[m,a.minDate,a.maxDate]),Sn=d.useMemo(()=>{var n,l,r,c;let e=[],t=(l=(n=o==null?void 0:o.config)==null?void 0:n.locale)==null?void 0:l.firstDayOfWeek;for(let u=0;u<7;u++)e.push((c=(r=o==null?void 0:o.config)==null?void 0:r.locale)==null?void 0:c.dayNamesMin[t]),t=t==6?0:++t;return e},[]),mt=d.useMemo(()=>{var e,t;return a.dateFormat||((t=(e=o==null?void 0:o.config)==null?void 0:e.locale)==null?void 0:t.dateFormat)},[a.dateFormat,(ht=o==null?void 0:o.config)==null?void 0:ht.locale]),Ln=d.useMemo(()=>T==0&&a.hourFormat=="12"?T+12:T<10?"0"+T:T,[T,a.hourFormat]),xn=d.useMemo(()=>B<10?"0"+B:B,[B]),An=d.useMemo(()=>Y<10?"0"+Y:Y,[Y]),Cn=d.useMemo(()=>{var e,t;return(t=(e=o==null?void 0:o.config)==null?void 0:e.locale)==null?void 0:t.today},[(bt=o==null?void 0:o.config)==null?void 0:bt.locale]),Fn=d.useMemo(()=>{var e,t;return(t=(e=o==null?void 0:o.config)==null?void 0:e.locale)==null?void 0:t.clear},[(gt=o==null?void 0:o.config)==null?void 0:gt.locale]),Pn=d.useMemo(()=>{var e,t;return(t=(e=o==null?void 0:o.config)==null?void 0:e.locale)==null?void 0:t.weekHeader},[(Dt=o==null?void 0:o.config)==null?void 0:Dt.locale]),vn=d.useMemo(()=>a.numberOfMonths>1||!!a.disabled,[a.numberOfMonths,a.disabled]),In=d.useMemo(()=>{var e,t,n,l;return L?(t=(e=o==null?void 0:o.config)==null?void 0:e.locale)==null?void 0:t.pm:(l=(n=o==null?void 0:o.config)==null?void 0:n.locale)==null?void 0:l.am},[L,(Mt=o==null?void 0:o.config)==null?void 0:Mt.locale]);return Bn(()=>{setTimeout(()=>{a.disabled||_e()},300)}),d.useEffect(()=>{var e;(e=N.current)!=null&&e.elementRef.current&&Re.current!=null&&He.current!=null&&(N.current.elementRef.current.selectionStart=Re.current,N.current.elementRef.current.selectionEnd=He.current,Re.current=null,He.current=null)},[dt]),d.useEffect(()=>{Pe()},[v,ve]),d.useEffect(()=>{if(a.value===void 0)return;Ze();let e=typeof a.value=="string"?Z(a.value):a.value;Ue(e),!me.current&&N.current&&N.current.elementRef.current&&(N.current.elementRef.current.value=ye(e)),me.current=!1},[a.value]),d.useEffect(()=>{if(a.value!==void 0)return;Ze();let e=typeof a.defaultValue=="string"?Z(a.defaultValue):a.defaultValue;Ue(e),!me.current&&N.current&&N.current.elementRef.current&&(N.current.elementRef.current.value=ye(e)),me.current=!1},[a.defaultValue]),d.useEffect(()=>{Be(s)&&le(!1)},[s]),d.useEffect(()=>{a.showTime&&V&&st()},[L]),d.useEffect(()=>{!V&&re&&Ce(null)},[V]),{state:Ht,inputRef:N,nextButtonRef:Ye,prevButtonRef:Oe,portalRef:de,overlayRef:y,inputFieldValue:dt,weekHeaderLabel:Pn,todayLabel:Cn,clearLabel:Fn,weekDays:Sn,months:ve,getIndexedMonth:kn,getYear:hn,getMonthName:mn,onPrevButtonClick:Nt,onNextButtonClick:Bt,monthPickerValues:Rn,yearPickerValues:Hn,switchToMonthView:Kt,switchToYearView:Vt,onDateSelect:De,onMonthSelect:ot,onYearSelect:ut,onDateCellKeydown:cn,onMonthCellKeydown:fn,onYearCellKeydown:dn,onButtonClick:jt,switchViewButtonDisabled:vn,formattedCurrentHour:Ln,formattedCurrentMinute:xn,formattedCurrentSecond:An,ampmLabel:In,onTimePickerElementMouseDown:Gt,onTimePickerElementMouseUp:rt,onTimePickerElementMouseLeave:_t,onContainerButtonKeydown:$t,onTimePickerElementKeyDown:Qt,onTimePickerElementKeyUp:Xt,toggleAMPM:sn,onTodayButtonClick:zt,onClearButtonClick:Zt,onClearClick:bn,onInput:gn,onInputClick:Dn,onInputKeyDown:Mn,onInputFocus:yn,onInputBlur:En,onOverlayEnter:Tn,changeVisibleState:wn,isRangeSelection:F,isSelected:pe,parseValue:Z,isDateEquals:te,isMonthSelected:xt,isYearSelected:At,isInHoverRange:St,onDateCellMouseEnter:Lt}}});export{yt as defaultProps,Wn as useDatePicker};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|