@primereact/headless 11.0.0-alpha.1 → 11.0.0-alpha.10
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/accordion/index.mjs +1 -1
- package/accordion/index.mjs.map +1 -1
- package/accordion/useAccordion.d.ts +6 -6
- package/animateonscroll/index.d.ts +2 -0
- package/animateonscroll/index.mjs +2 -0
- package/animateonscroll/index.mjs.map +1 -0
- package/animateonscroll/useAnimateOnScroll.d.ts +3 -0
- package/animateonscroll/useAnimateOnScroll.props.d.ts +2 -0
- package/animateonscroll/useAnimateOnScroll.test.d.ts +0 -0
- package/autocomplete/index.d.ts +2 -0
- package/autocomplete/index.mjs +2 -0
- package/autocomplete/index.mjs.map +1 -0
- package/autocomplete/useAutoComplete.d.ts +87 -0
- package/autocomplete/useAutoComplete.props.d.ts +2 -0
- package/autocomplete/useAutoComplete.test.d.ts +0 -0
- package/breadcrumb/index.d.ts +2 -0
- package/breadcrumb/index.mjs +2 -0
- package/breadcrumb/index.mjs.map +1 -0
- package/breadcrumb/useBreadcrumb.d.ts +3 -0
- package/breadcrumb/useBreadcrumb.props.d.ts +2 -0
- package/breadcrumb/useBreadcrumb.test.d.ts +0 -0
- package/carousel/index.d.ts +2 -0
- package/carousel/index.mjs +2 -0
- package/carousel/index.mjs.map +1 -0
- package/carousel/useCarousel.d.ts +23 -0
- package/carousel/useCarousel.props.d.ts +2 -0
- package/carousel/useCarousel.test.d.ts +0 -0
- package/checkboxgroup/index.d.ts +2 -0
- package/checkboxgroup/index.mjs +2 -0
- package/checkboxgroup/index.mjs.map +1 -0
- package/checkboxgroup/useCheckboxGroup.d.ts +7 -0
- package/checkboxgroup/useCheckboxGroup.props.d.ts +2 -0
- package/checkboxgroup/useCheckboxGroup.test.d.ts +0 -0
- package/collapsible/index.d.ts +2 -0
- package/collapsible/index.mjs +2 -0
- package/collapsible/index.mjs.map +1 -0
- package/collapsible/useCollapsible.d.ts +9 -0
- package/collapsible/useCollapsible.props.d.ts +2 -0
- package/collapsible/useCollapsible.test.d.ts +0 -0
- package/colorpicker/colorManager.d.ts +102 -0
- package/colorpicker/index.d.ts +3 -0
- package/colorpicker/index.mjs +2 -0
- package/colorpicker/index.mjs.map +1 -0
- package/colorpicker/useColorPicker.d.ts +59 -0
- package/colorpicker/useColorPicker.props.d.ts +2 -0
- package/colorpicker/useColorPicker.test.d.ts +0 -0
- package/commandmenu/index.d.ts +2 -0
- package/commandmenu/index.mjs +2 -0
- package/commandmenu/index.mjs.map +1 -0
- package/commandmenu/useCommandMenu.d.ts +11 -0
- package/commandmenu/useCommandMenu.props.d.ts +2 -0
- package/commandmenu/useCommandMenu.test.d.ts +0 -0
- package/compare/index.d.ts +2 -0
- package/compare/index.mjs +2 -0
- package/compare/index.mjs.map +1 -0
- package/compare/useCompare.d.ts +35 -0
- package/compare/useCompare.props.d.ts +2 -0
- package/compare/useCompare.test.d.ts +0 -0
- package/confirmdialog/index.d.ts +2 -0
- package/confirmdialog/index.mjs +2 -0
- package/confirmdialog/index.mjs.map +1 -0
- package/confirmdialog/useConfirmDialog.d.ts +43 -0
- package/confirmdialog/useConfirmDialog.props.d.ts +2 -0
- package/confirmdialog/useConfirmDialog.test.d.ts +0 -0
- package/confirmpopup/index.d.ts +2 -0
- package/confirmpopup/index.mjs +2 -0
- package/confirmpopup/index.mjs.map +1 -0
- package/confirmpopup/useConfirmPopup.d.ts +25 -0
- package/confirmpopup/useConfirmPopup.props.d.ts +2 -0
- package/confirmpopup/useConfirmPopup.test.d.ts +0 -0
- package/contextmenu/index.d.ts +2 -0
- package/contextmenu/index.mjs +2 -0
- package/contextmenu/index.mjs.map +1 -0
- package/contextmenu/useContextMenu.d.ts +1 -0
- package/contextmenu/useContextMenu.props.d.ts +2 -0
- package/contextmenu/useContextMenu.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/dialog/index.d.ts +2 -0
- package/dialog/index.mjs +2 -0
- package/dialog/index.mjs.map +1 -0
- package/dialog/useDialog.d.ts +30 -0
- package/dialog/useDialog.props.d.ts +2 -0
- package/dialog/useDialog.test.d.ts +0 -0
- package/drawer/index.d.ts +2 -0
- package/drawer/index.mjs +2 -0
- package/drawer/index.mjs.map +1 -0
- package/drawer/useDrawer.d.ts +24 -0
- package/drawer/useDrawer.props.d.ts +2 -0
- package/drawer/useDrawer.test.d.ts +0 -0
- package/fieldset/index.mjs +1 -1
- package/fieldset/index.mjs.map +1 -1
- package/fieldset/useFieldset.d.ts +29 -1
- 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/floatlabel/index.d.ts +2 -0
- package/floatlabel/index.mjs +2 -0
- package/floatlabel/index.mjs.map +1 -0
- package/floatlabel/useFloatLabel.d.ts +1 -0
- package/floatlabel/useFloatLabel.props.d.ts +2 -0
- package/floatlabel/useFloatLabel.test.d.ts +0 -0
- package/fluid/index.d.ts +2 -0
- package/fluid/index.mjs +2 -0
- package/fluid/index.mjs.map +1 -0
- package/fluid/useFluid.d.ts +1 -0
- package/fluid/useFluid.props.d.ts +2 -0
- package/fluid/useFluid.test.d.ts +0 -0
- package/focustrap/index.d.ts +2 -0
- package/focustrap/index.mjs +2 -0
- package/focustrap/index.mjs.map +1 -0
- package/focustrap/useFocusTrap.d.ts +9 -0
- package/focustrap/useFocusTrap.props.d.ts +2 -0
- package/focustrap/useFocusTrap.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/iconfield/index.d.ts +2 -0
- package/iconfield/index.mjs +2 -0
- package/iconfield/index.mjs.map +1 -0
- package/iconfield/useIconField.d.ts +1 -0
- package/iconfield/useIconField.props.d.ts +2 -0
- package/iconfield/useIconField.test.d.ts +0 -0
- package/iftalabel/index.d.ts +2 -0
- package/iftalabel/index.mjs +2 -0
- package/iftalabel/index.mjs.map +1 -0
- package/iftalabel/useIftaLabel.d.ts +1 -0
- package/iftalabel/useIftaLabel.props.d.ts +2 -0
- package/iftalabel/useIftaLabel.test.d.ts +0 -0
- package/inplace/index.mjs +1 -1
- package/inplace/index.mjs.map +1 -1
- package/inplace/useInplace.d.ts +1 -1
- package/inputgroup/index.d.ts +2 -0
- package/inputgroup/index.mjs +2 -0
- package/inputgroup/index.mjs.map +1 -0
- package/inputgroup/useInputGroup.d.ts +1 -0
- package/inputgroup/useInputGroup.props.d.ts +2 -0
- package/inputgroup/useInputGroup.test.d.ts +0 -0
- package/inputnumber/index.d.ts +2 -0
- package/inputnumber/index.mjs +2 -0
- package/inputnumber/index.mjs.map +1 -0
- package/inputnumber/useInputNumber.d.ts +23 -0
- package/inputnumber/useInputNumber.props.d.ts +2 -0
- package/inputnumber/useInputNumber.test.d.ts +0 -0
- package/inputotp/index.d.ts +2 -0
- package/inputotp/index.mjs +2 -0
- package/inputotp/index.mjs.map +1 -0
- package/inputotp/useInputOtp.d.ts +14 -0
- package/inputotp/useInputOtp.props.d.ts +2 -0
- package/inputotp/useInputOtp.test.d.ts +0 -0
- package/inputtags/index.d.ts +2 -0
- package/inputtags/index.mjs +2 -0
- package/inputtags/index.mjs.map +1 -0
- package/inputtags/useInputTags.d.ts +86 -0
- package/inputtags/useInputTags.props.d.ts +2 -0
- package/inputtags/useInputTags.test.d.ts +0 -0
- package/knob/index.d.ts +2 -0
- package/knob/index.mjs +2 -0
- package/knob/index.mjs.map +1 -0
- package/knob/useKnob.d.ts +17 -0
- package/knob/useKnob.props.d.ts +2 -0
- package/knob/useKnob.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 +52 -0
- package/listbox/useListbox.props.d.ts +2 -0
- package/listbox/useListbox.test.d.ts +0 -0
- package/menu/index.d.ts +2 -0
- package/menu/index.mjs +2 -0
- package/menu/index.mjs.map +1 -0
- package/menu/sub/index.d.ts +2 -0
- package/menu/sub/index.mjs +2 -0
- package/menu/sub/index.mjs.map +1 -0
- package/menu/sub/useMenuSub.d.ts +19 -0
- package/menu/sub/useMenuSub.props.d.ts +2 -0
- package/menu/useMenu.d.ts +34 -0
- package/menu/useMenu.props.d.ts +2 -0
- package/menu/useMenu.test.d.ts +0 -0
- package/message/index.d.ts +2 -0
- package/message/index.mjs +2 -0
- package/message/index.mjs.map +1 -0
- package/message/useMessage.d.ts +6 -0
- package/message/useMessage.props.d.ts +2 -0
- package/message/useMessage.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/overlaybadge/index.d.ts +2 -0
- package/overlaybadge/index.mjs +2 -0
- package/overlaybadge/index.mjs.map +1 -0
- package/overlaybadge/useOverlayBadge.d.ts +1 -0
- package/overlaybadge/useOverlayBadge.props.d.ts +2 -0
- package/overlaybadge/useOverlayBadge.test.d.ts +0 -0
- package/package.json +6 -6
- package/paginator/index.d.ts +2 -0
- package/paginator/index.mjs +2 -0
- package/paginator/index.mjs.map +1 -0
- package/paginator/usePaginator.d.ts +19 -0
- package/paginator/usePaginator.props.d.ts +2 -0
- package/paginator/usePaginator.test.d.ts +0 -0
- package/panel/index.mjs +1 -1
- package/panel/index.mjs.map +1 -1
- package/panel/usePanel.d.ts +24 -7
- 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 +9 -0
- package/password/usePassword.props.d.ts +2 -0
- package/password/usePassword.test.d.ts +0 -0
- package/placer/index.d.ts +2 -0
- package/placer/index.mjs +2 -0
- package/placer/index.mjs.map +1 -0
- package/placer/usePlacer.d.ts +12 -0
- package/placer/usePlacer.props.d.ts +2 -0
- package/placer/usePlacer.test.d.ts +0 -0
- package/popover/index.d.ts +2 -0
- package/popover/index.mjs +2 -0
- package/popover/index.mjs.map +1 -0
- package/popover/usePopover.d.ts +19 -0
- package/popover/usePopover.props.d.ts +2 -0
- package/popover/usePopover.test.d.ts +0 -0
- package/portal/index.d.ts +2 -0
- package/portal/index.mjs +2 -0
- package/portal/index.mjs.map +1 -0
- package/portal/usePortal.d.ts +3 -0
- package/portal/usePortal.props.d.ts +2 -0
- package/portal/usePortal.test.d.ts +0 -0
- package/positioner/index.d.ts +2 -0
- package/positioner/index.mjs +2 -0
- package/positioner/index.mjs.map +1 -0
- package/positioner/usePositioner copy.d.ts +18 -0
- package/positioner/usePositioner.d.ts +11 -0
- package/positioner/usePositioner.props.d.ts +2 -0
- package/positioner/usePositioner.test.d.ts +0 -0
- package/radiobuttongroup/index.d.ts +2 -0
- package/radiobuttongroup/index.mjs +2 -0
- package/radiobuttongroup/index.mjs.map +1 -0
- package/radiobuttongroup/useRadioButtonGroup.d.ts +7 -0
- package/radiobuttongroup/useRadioButtonGroup.props.d.ts +2 -0
- package/radiobuttongroup/useRadioButtonGroup.test.d.ts +0 -0
- package/rating/index.d.ts +2 -0
- package/rating/index.mjs +2 -0
- package/rating/index.mjs.map +1 -0
- package/rating/useRating.d.ts +15 -0
- package/rating/useRating.props.d.ts +2 -0
- package/rating/useRating.test.d.ts +0 -0
- package/select/index.d.ts +2 -0
- package/select/index.mjs +2 -0
- package/select/index.mjs.map +1 -0
- package/select/useSelect.d.ts +87 -0
- package/select/useSelect.props.d.ts +2 -0
- package/select/useSelect.test.d.ts +1 -0
- package/slider/index.d.ts +2 -0
- package/slider/index.mjs +2 -0
- package/slider/index.mjs.map +1 -0
- package/slider/useSlider.d.ts +20 -0
- package/slider/useSlider.props.d.ts +2 -0
- package/slider/useSlider.test.d.ts +0 -0
- package/speeddial/index.d.ts +2 -0
- package/speeddial/index.mjs +2 -0
- package/speeddial/index.mjs.map +1 -0
- package/speeddial/useSpeedDial.d.ts +16 -0
- package/speeddial/useSpeedDial.props.d.ts +2 -0
- package/speeddial/useSpeedDial.test.d.ts +0 -0
- package/terminal/index.d.ts +2 -0
- package/terminal/index.mjs +2 -0
- package/terminal/index.mjs.map +1 -0
- package/terminal/useTerminal.d.ts +13 -0
- package/terminal/useTerminal.props.d.ts +2 -0
- package/terminal/useTerminal.test.d.ts +0 -0
- package/textarea/index.d.ts +2 -0
- package/textarea/index.mjs +2 -0
- package/textarea/index.mjs.map +1 -0
- package/textarea/useTextarea.d.ts +4 -0
- package/textarea/useTextarea.props.d.ts +2 -0
- package/textarea/useTextarea.test.d.ts +0 -0
- package/timeline/index.d.ts +2 -0
- package/timeline/index.mjs +2 -0
- package/timeline/index.mjs.map +1 -0
- package/timeline/useTimeline.d.ts +1 -0
- package/timeline/useTimeline.props.d.ts +2 -0
- package/timeline/useTimeline.test.d.ts +0 -0
- package/toast/index.d.ts +2 -0
- package/toast/index.mjs +2 -0
- package/toast/index.mjs.map +1 -0
- package/toast/useToast.d.ts +31 -0
- package/toast/useToast.props.d.ts +2 -0
- package/toast/useToast.test.d.ts +0 -0
- package/toaster/index.d.ts +3 -0
- package/toaster/index.mjs +2 -0
- package/toaster/index.mjs.map +1 -0
- package/toaster/toastStore.d.ts +40 -0
- package/toaster/useToaster.d.ts +26 -0
- package/toaster/useToaster.props.d.ts +2 -0
- package/toaster/useToaster.test.d.ts +0 -0
- package/togglebuttongroup/index.d.ts +2 -0
- package/togglebuttongroup/index.mjs +2 -0
- package/togglebuttongroup/index.mjs.map +1 -0
- package/togglebuttongroup/useToggleButtonGroup.d.ts +8 -0
- package/togglebuttongroup/useToggleButtonGroup.props.d.ts +2 -0
- package/togglebuttongroup/useToggleButtonGroup.test.d.ts +0 -0
- package/tooltip/group/index.d.ts +2 -0
- package/tooltip/group/index.mjs +2 -0
- package/tooltip/group/index.mjs.map +1 -0
- package/tooltip/group/useTooltipGroup.d.ts +9 -0
- package/tooltip/group/useTooltipGroup.props.d.ts +2 -0
- package/tooltip/group/useTooltipGroup.test.d.ts +0 -0
- package/tooltip/index.d.ts +2 -0
- package/tooltip/index.mjs +2 -0
- package/tooltip/index.mjs.map +1 -0
- package/tooltip/useTooltip.d.ts +28 -0
- package/tooltip/useTooltip.props.d.ts +2 -0
- package/tooltip/useTooltip.test.d.ts +0 -0
- package/tree/TreeDragDropService.d.ts +24 -0
- package/tree/index.d.ts +3 -0
- package/tree/index.mjs +2 -0
- package/tree/index.mjs.map +1 -0
- package/tree/useTree.d.ts +27 -0
- package/tree/useTree.props.d.ts +2 -0
- package/tree/useTree.test.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/gallery/item/useGalleryItem.ts","../../../../../primereact/src/gallery/Gallery.context.ts","../../../../../primereact/src/gallery/Gallery.parts.ts","../../../../../primereact/src/gallery/backdrop/GalleryBackdrop.tsx","../../../../../primereact/src/gallery/backdrop/GalleryBackdrop.props.ts","../../../../../primereact/src/gallery/content/GalleryContent.tsx","../../../../../primereact/src/gallery/content/GalleryContent.props.ts","../../../../../primereact/src/gallery/item/GalleryItem.tsx","../../../../../primereact/src/gallery/item/GalleryItem.context.ts","../../../../../primereact/src/gallery/item/GalleryItem.props.ts","../../../../../primereact/src/gallery/next/GalleryNext.tsx","../../../../../primereact/src/gallery/next/GalleryNext.props.ts","../../../../../primereact/src/gallery/prev/GalleryPrev.tsx","../../../../../primereact/src/gallery/prev/GalleryPrev.props.ts","../../../../../primereact/src/gallery/root/GalleryRoot.tsx","../../../../../primereact/src/gallery/root/GalleryRoot.props.ts","../../../../../primereact/src/gallery/thumbnail/GalleryThumbnail.tsx","../../../../../primereact/src/carousel/Carousel.context.ts","../../../../../primereact/src/carousel/Carousel.parts.ts","../../../../../primereact/src/carousel/content/CarouselContent.tsx","../../../../../primereact/src/carousel/content/CarouselContent.props.ts","../../../../../primereact/src/carousel/indicator/CarouselIndicator.tsx","../../../../../primereact/src/carousel/indicator/CarouselIndicator.props.ts","../../../../../primereact/src/carousel/indicators/CarouselIndicators.tsx","../../../../../primereact/src/carousel/indicators/CarouselIndicators.props.ts","../../../../../primereact/src/carousel/item/CarouselItem.tsx","../../../../../primereact/src/carousel/item/CarouselItem.props.ts","../../../../../primereact/src/carousel/next/CarouselNext.tsx","../../../../../primereact/src/carousel/next/CarouselNext.props.ts","../../../../../primereact/src/carousel/prev/CarouselPrev.tsx","../../../../../primereact/src/carousel/prev/CarouselPrev.props.ts","../../../../../primereact/src/carousel/root/CarouselRoot.tsx","../../../../../primereact/src/carousel/root/CarouselRoot.props.ts","../../../../../primereact/src/carousel/Carousel.props.ts","../../../../../primereact/src/gallery/thumbnail/GalleryThumbnail.props.ts","../../../../../primereact/src/gallery/thumbnailcontent/GalleryThumbnailContent.tsx","../../../../../primereact/src/gallery/thumbnailcontent/GalleryThumbnailContent.props.ts","../../../../../primereact/src/gallery/thumbnailitem/GalleryThumbnailItem.tsx","../../../../../primereact/src/gallery/thumbnailitem/GalleryThumbnailItem.props.ts","../../../../../primereact/src/gallery/toolbar/GalleryToolbar.tsx","../../../../../primereact/src/gallery/toolbar/GalleryToolbar.props.ts","../../../../../primereact/src/gallery/toolbaritem/GalleryToolbarItem.tsx","../../../../../primereact/src/gallery/toolbaritem/GalleryToolbarItem.props.ts","../../../../../primereact/src/gallery/Gallery.props.ts","../../../src/gallery/item/useGalleryItem.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { useGalleryContext } from 'primereact/gallery';\nimport * as React from 'react';\nimport { defaultItemProps } from './useGalleryItem.props';\n\nexport const useGalleryItem = withHeadless({\n name: 'useGalleryItem',\n defaultProps: defaultItemProps,\n setup: ({ props, elementRef }) => {\n const { normalScale = 1, zoomedScale = 3 } = props;\n\n const gallery = useGalleryContext();\n const [index, setIndex] = React.useState(-1);\n const [isActive, setIsActive] = React.useState(false);\n const [position, setPosition] = React.useState({ x: 0, y: 0 });\n const [scale, setScale] = React.useState(1);\n const [rotation, setRotation] = React.useState(0);\n const [flip, setFlip] = React.useState({ x: 1, y: 1 });\n\n const [isDragging, setIsDragging] = React.useState(false);\n const [dragStart, setDragStart] = React.useState({ x: 0, y: 0 });\n const [hasDragged, setHasDragged] = React.useState(false);\n\n const pointerDataRef = React.useRef<Map<number, { x: number; y: number }>>(new Map());\n const lastDistanceRef = React.useRef(0);\n\n const calculateItemSize = React.useCallback(() => {\n if (!gallery?.contentRef.current || !elementRef.current) return;\n\n const contentRect = gallery?.contentRef.current.getBoundingClientRect();\n\n const imageElement = elementRef.current.firstElementChild as HTMLImageElement;\n\n if (!imageElement) return;\n\n let naturalWidth = imageElement.naturalWidth || imageElement.offsetWidth;\n let naturalHeight = imageElement.naturalHeight || imageElement.offsetHeight;\n\n if (naturalWidth === 0 || naturalHeight === 0) return;\n\n const isRotated = Math.abs(rotation) % 180 === 90;\n\n if (isRotated) {\n [naturalWidth, naturalHeight] = [naturalHeight, naturalWidth];\n }\n\n const naturalAspectRatio = naturalWidth / naturalHeight;\n const contentAspectRatio = contentRect.width / contentRect.height;\n\n let targetWidth, targetHeight;\n\n if (naturalAspectRatio > contentAspectRatio) {\n targetWidth = Math.min(contentRect.width * 0.99, naturalWidth);\n targetHeight = targetWidth / naturalAspectRatio;\n } else {\n targetHeight = Math.min(contentRect.height * 0.99, naturalHeight);\n targetWidth = targetHeight * naturalAspectRatio;\n }\n\n if (isRotated) {\n imageElement.style.width = `${targetHeight}px`;\n imageElement.style.height = `${targetWidth}px`;\n elementRef.current.style.width = `${targetHeight > 0 ? targetHeight : 'auto'}px`;\n elementRef.current.style.height = `${targetWidth > 0 ? targetWidth : 'auto'}px`;\n } else {\n imageElement.style.width = `${targetWidth}px`;\n imageElement.style.height = `${targetHeight}px`;\n elementRef.current.style.width = `${targetWidth > 0 ? targetWidth : 'auto'}px`;\n elementRef.current.style.height = `${targetHeight > 0 ? targetHeight : 'auto'}px`;\n }\n\n elementRef.current.style.aspectRatio = `${naturalWidth / naturalHeight}`;\n }, [gallery?.contentRef, rotation]);\n\n const calculateConstraints = React.useCallback(\n (targetScale?: number) => {\n if (!gallery?.contentRef.current || !elementRef.current) return { minX: 0, maxX: 0, minY: 0, maxY: 0 };\n\n const contentRect = gallery?.contentRef.current.getBoundingClientRect();\n const scaleToUse = targetScale !== undefined ? targetScale : scale;\n\n const itemElement = elementRef.current.firstElementChild as HTMLElement;\n\n if (!itemElement) return { minX: 0, maxX: 0, minY: 0, maxY: 0 };\n\n let originalWidth = itemElement.offsetWidth;\n let originalHeight = itemElement.offsetHeight;\n\n const isRotated = Math.abs(rotation) % 180 === 90;\n\n if (isRotated) {\n [originalWidth, originalHeight] = [originalHeight, originalWidth];\n }\n\n const scaledWidth = originalWidth * scaleToUse;\n const scaledHeight = originalHeight * scaleToUse;\n\n const contentCenterX = contentRect.width / 2;\n const contentCenterY = contentRect.height / 2;\n\n const halfScaledWidth = scaledWidth / 2;\n const halfScaledHeight = scaledHeight / 2;\n\n const maxX = halfScaledWidth > contentCenterX ? halfScaledWidth - contentCenterX : 0;\n const minX = halfScaledWidth > contentCenterX ? -(halfScaledWidth - contentCenterX) : 0;\n\n const maxY = halfScaledHeight > contentCenterY ? halfScaledHeight - contentCenterY : 0;\n const minY = halfScaledHeight > contentCenterY ? -(halfScaledHeight - contentCenterY) : 0;\n\n return { minX, maxX, minY, maxY };\n },\n [gallery?.contentRef, scale, rotation]\n );\n\n const zoomIn = React.useCallback(() => {\n setScale(zoomedScale);\n\n const hiddenStyles = {\n visibility: 'hidden',\n opacity: 0,\n pointerEvents: 'none',\n userSelect: 'none',\n touchAction: 'none'\n };\n\n if (gallery?.toolbarRef.current) {\n Object.assign(gallery?.toolbarRef.current.style, hiddenStyles);\n }\n\n if (gallery?.thumbnailRef.current) {\n // @ts-expect-error - thumbnailRef may not have elementRef property\n Object.assign(gallery?.thumbnailRef.current.elementRef.current.style, hiddenStyles);\n }\n\n if (gallery?.prevRef.current) {\n Object.assign(gallery.prevRef.current.style, hiddenStyles);\n }\n\n if (gallery?.nextRef.current) {\n Object.assign(gallery.nextRef.current.style, hiddenStyles);\n }\n\n if (elementRef.current) {\n elementRef.current.style.cursor = 'zoom-out';\n elementRef.current.style.pointerEvents = 'auto';\n }\n }, [zoomedScale, gallery?.toolbarRef, gallery?.thumbnailRef, gallery?.prevRef, gallery?.nextRef]);\n\n const zoomOut = React.useCallback(() => {\n setScale(normalScale);\n setPosition({ x: 0, y: 0 });\n\n const resetStyles = {\n visibility: '',\n opacity: '',\n pointerEvents: '',\n userSelect: '',\n touchAction: ''\n };\n\n if (gallery?.toolbarRef.current) {\n Object.assign(gallery.toolbarRef.current.style, resetStyles);\n }\n\n if (gallery?.thumbnailRef.current) {\n // @ts-expect-error - thumbnailRef may not have elementRef property\n Object.assign(gallery.thumbnailRef.current.elementRef.current.style, resetStyles);\n }\n\n if (gallery?.prevRef.current) {\n Object.assign(gallery.prevRef.current.style, resetStyles);\n }\n\n if (gallery?.nextRef.current) {\n Object.assign(gallery.nextRef.current.style, resetStyles);\n }\n\n if (elementRef.current) {\n elementRef.current.style.cursor = 'zoom-in';\n elementRef.current.style.pointerEvents = 'auto';\n }\n }, [normalScale, gallery?.toolbarRef, gallery?.thumbnailRef, gallery?.prevRef, gallery?.nextRef]);\n\n const rotateLeft = () => {\n if (!elementRef.current) return;\n\n elementRef.current.style.transition = 'none';\n setRotation((prev) => prev - 90);\n setTimeout(() => {\n if (elementRef.current) {\n elementRef.current.style.transition = '';\n }\n }, 0);\n };\n\n const rotateRight = () => {\n if (!elementRef.current) return;\n\n elementRef.current.style.transition = 'none';\n setRotation((prev) => prev + 90);\n setTimeout(() => {\n if (elementRef.current) {\n elementRef.current.style.transition = '';\n }\n }, 0);\n };\n\n const flipX = () => {\n setFlip((prev) => ({ ...prev, x: Math.sign(prev.x) * -1 }));\n };\n\n const flipY = () => {\n setFlip((prev) => ({ ...prev, y: Math.sign(prev.y) * -1 }));\n };\n\n const download = () => {\n if (!elementRef.current) return;\n\n const imageElement = elementRef.current.querySelector('img') as HTMLImageElement;\n\n if (!imageElement || !imageElement.src) return;\n\n const link = document.createElement('a');\n\n link.href = imageElement.src;\n\n const urlParts = imageElement.src.split('/');\n const filename = urlParts[urlParts.length - 1] || 'image.jpg';\n\n link.download = filename;\n link.target = '_blank';\n\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n };\n\n const handleClick = React.useCallback(\n (e: React.MouseEvent) => {\n if (hasDragged) {\n setHasDragged(false);\n\n return;\n }\n\n if (scale === normalScale) {\n if (elementRef.current) {\n const itemRect = elementRef.current.getBoundingClientRect();\n\n const itemCenterX = itemRect.width / 2;\n const itemCenterY = itemRect.height / 2;\n\n const clickX = e.clientX - itemRect.left;\n const clickY = e.clientY - itemRect.top;\n\n const offsetX = itemCenterX - clickX;\n const offsetY = itemCenterY - clickY;\n\n const zoomOffsetX = offsetX * (zoomedScale - 1);\n const zoomOffsetY = offsetY * (zoomedScale - 1);\n\n const constraints = calculateConstraints(zoomedScale);\n const constrainedX = Math.max(constraints.minX, Math.min(constraints.maxX, zoomOffsetX));\n const constrainedY = Math.max(constraints.minY, Math.min(constraints.maxY, zoomOffsetY));\n\n setPosition({ x: constrainedX, y: constrainedY });\n }\n\n zoomIn();\n } else {\n zoomOut();\n }\n },\n [hasDragged, normalScale, zoomedScale, calculateConstraints, scale, zoomIn, zoomOut]\n );\n const handleDragStart = React.useCallback((e: React.DragEvent<HTMLDivElement>) => {\n e.preventDefault();\n }, []);\n\n const handlePointerDown = React.useCallback(\n (e: React.PointerEvent) => {\n e.currentTarget.setPointerCapture(e.pointerId);\n pointerDataRef.current.set(e.pointerId, { x: e.clientX, y: e.clientY });\n\n if (scale > 1) {\n if (e.pointerType === 'mouse') {\n setIsDragging(true);\n setDragStart({ x: e.clientX - position.x, y: e.clientY - position.y });\n setHasDragged(false);\n } else if (e.pointerType === 'touch' && pointerDataRef.current.size === 1) {\n setIsDragging(true);\n setDragStart({ x: e.clientX - position.x, y: e.clientY - position.y });\n setHasDragged(false);\n lastDistanceRef.current = 0;\n }\n }\n\n if (e.pointerType === 'touch' && pointerDataRef.current.size === 1) {\n lastDistanceRef.current = 0;\n }\n },\n [scale, position]\n );\n\n const handlePointerMove = React.useCallback(\n (e: React.PointerEvent) => {\n if (!pointerDataRef.current.has(e.pointerId) || !elementRef.current) return;\n\n elementRef.current.style.transition = 'none';\n\n // Preserve cursor during move\n const currentCursor = elementRef.current.style.cursor;\n\n if (!currentCursor) {\n elementRef.current.style.cursor = scale > normalScale ? 'zoom-out' : 'zoom-in';\n }\n\n pointerDataRef.current.set(e.pointerId, { x: e.clientX, y: e.clientY });\n\n const pointers = Array.from(pointerDataRef.current.values());\n\n if (pointers.length === 2) {\n const [p1, p2] = pointers;\n const distance = Math.hypot(p2.x - p1.x, p2.y - p1.y);\n\n if (lastDistanceRef.current > 0) {\n const delta = (distance - lastDistanceRef.current) * 0.01;\n\n if (Math.abs(delta) > 0.01) {\n const newScale = scale === normalScale ? zoomedScale : normalScale;\n\n const constraints = calculateConstraints(newScale);\n const constrainedX = Math.max(constraints.minX, Math.min(constraints.maxX, position.x));\n const constrainedY = Math.max(constraints.minY, Math.min(constraints.maxY, position.y));\n\n setPosition({ x: constrainedX, y: constrainedY });\n\n setScale(newScale);\n }\n }\n\n lastDistanceRef.current = distance;\n } else if (pointers.length === 1 && isDragging) {\n const pointer = pointers[0];\n const newX = pointer.x - dragStart.x;\n const newY = pointer.y - dragStart.y;\n const constraints = calculateConstraints();\n\n const computedX = Math.max(constraints.minX, Math.min(constraints.maxX, newX));\n const computedY = Math.max(constraints.minY, Math.min(constraints.maxY, newY));\n\n setPosition({\n x: computedX,\n y: computedY\n });\n setHasDragged(true);\n }\n },\n [isDragging, dragStart, scale, normalScale, zoomedScale, position, calculateConstraints]\n );\n\n const handlePointerUp = React.useCallback((e: React.PointerEvent) => {\n if (!elementRef.current) return;\n\n elementRef.current.style.transition = '';\n // Restore proper cursor after interaction\n elementRef.current.style.cursor = scale > normalScale ? 'zoom-out' : 'zoom-in';\n e.currentTarget.releasePointerCapture(e.pointerId);\n pointerDataRef.current.delete(e.pointerId);\n\n if (pointerDataRef.current.size < 2) lastDistanceRef.current = 0;\n\n if (pointerDataRef.current.size === 0) {\n setIsDragging(false);\n }\n }, []);\n\n React.useEffect(() => {\n if (scale <= 1) {\n setPosition({ x: 0, y: 0 });\n }\n }, [scale]);\n\n React.useEffect(() => {\n if (gallery?.state.activeIndex === index && document.readyState === 'complete') {\n calculateItemSize();\n }\n }, [gallery?.state.activeIndex, index, calculateItemSize]);\n\n React.useEffect(() => {\n if (gallery?.state.activeIndex === index) {\n calculateItemSize();\n }\n }, [rotation, calculateItemSize, gallery?.state.activeIndex, index]);\n\n React.useEffect(() => {\n if (gallery?.state.activeIndex === index && gallery?.state.isFullscreen !== undefined) {\n calculateItemSize();\n }\n }, [gallery?.state.isFullscreen, calculateItemSize, gallery?.state.activeIndex, index]);\n\n React.useEffect(() => {\n const handleResize = () => {\n if (gallery?.state.activeIndex === index) {\n calculateItemSize();\n }\n };\n\n window.addEventListener('resize', handleResize);\n\n return () => window.removeEventListener('resize', handleResize);\n }, [gallery?.state.activeIndex, index, calculateItemSize]);\n\n React.useEffect(() => {\n if (gallery && elementRef.current) {\n const index = gallery.registerItem(elementRef.current as HTMLDivElement);\n\n setIndex(index);\n }\n }, [gallery]);\n\n React.useEffect(() => {\n const handleCustomEvent = (e: CustomEvent) => {\n if (e.detail?.action === 'zoom-in') {\n zoomIn();\n } else if (e.detail?.action === 'zoom-out') {\n zoomOut();\n } else if (e.detail?.action === 'rotate-left') {\n rotateLeft();\n } else if (e.detail?.action === 'rotate-right') {\n rotateRight();\n } else if (e.detail?.action === 'flip-x') {\n flipX();\n } else if (e.detail?.action === 'flip-y') {\n flipY();\n } else if (e.detail?.action === 'download') {\n download();\n }\n };\n\n const itemElement = elementRef.current;\n\n if (itemElement) {\n itemElement.addEventListener('gallery-zoom-in', handleCustomEvent as EventListener);\n itemElement.addEventListener('gallery-zoom-out', handleCustomEvent as EventListener);\n itemElement.addEventListener('gallery-rotate-left', handleCustomEvent as EventListener);\n itemElement.addEventListener('gallery-rotate-right', handleCustomEvent as EventListener);\n itemElement.addEventListener('gallery-flip-x', handleCustomEvent as EventListener);\n itemElement.addEventListener('gallery-flip-y', handleCustomEvent as EventListener);\n itemElement.addEventListener('gallery-download', handleCustomEvent as EventListener);\n }\n\n return () => {\n if (itemElement) {\n itemElement.removeEventListener('gallery-zoom-in', handleCustomEvent as EventListener);\n itemElement.removeEventListener('gallery-zoom-out', handleCustomEvent as EventListener);\n itemElement.removeEventListener('gallery-rotate-left', handleCustomEvent as EventListener);\n itemElement.removeEventListener('gallery-rotate-right', handleCustomEvent as EventListener);\n itemElement.removeEventListener('gallery-flip-x', handleCustomEvent as EventListener);\n itemElement.removeEventListener('gallery-flip-y', handleCustomEvent as EventListener);\n itemElement.removeEventListener('gallery-download', handleCustomEvent as EventListener);\n }\n };\n }, [normalScale, zoomedScale]);\n\n React.useEffect(() => {\n if (gallery?.state.activeIndex === index) {\n setIsActive(true);\n } else {\n setIsActive(false);\n }\n }, [gallery?.state.activeIndex, index]);\n\n const attributes = React.useMemo(() => {\n return {\n 'data-active': isActive\n };\n }, [isActive]);\n\n const CSSVariables = React.useMemo(() => {\n return {\n '--position-x': `${position.x}px`,\n '--position-y': `${position.y}px`,\n '--scale': `${scale}`,\n '--rotation': `${rotation}deg`,\n '--flip-x': flip.x,\n '--flip-y': flip.y\n } as React.CSSProperties;\n }, [position, scale, rotation, flip]);\n\n const state = {\n index,\n position,\n scale,\n rotation,\n flip,\n isActive,\n dragStart,\n hasDragged\n };\n\n return {\n state,\n attributes,\n CSSVariables,\n handlePointerUp,\n handlePointerMove,\n handlePointerDown,\n handleClick,\n handleDragStart,\n zoomIn,\n zoomOut,\n rotateLeft,\n rotateRight,\n flipX,\n flipY,\n download,\n calculateConstraints,\n calculateItemSize\n };\n }\n});\n","'use client';\nimport { createOptionalContext } from '@primereact/core/utils';\nimport type { GalleryRootInstance } from '@primereact/types/shared/gallery';\n\nexport const [GalleryProvider, useGalleryContext] = createOptionalContext<GalleryRootInstance>();\n","export { GalleryBackdrop as Backdrop } from './backdrop';\nexport { GalleryContent as Content } from './content';\nexport { GalleryItem as Item } from './item';\nexport { GalleryNext as Next } from './next';\nexport { GalleryPrev as Prev } from './prev';\nexport { GalleryRoot as Root } from './root';\nexport { GalleryThumbnail as Thumbnail } from './thumbnail';\nexport { GalleryThumbnailContent as ThumbnailContent } from './thumbnailcontent';\nexport { GalleryThumbnailItem as ThumbnailItem } from './thumbnailitem';\nexport { GalleryToolbar as Toolbar } from './toolbar';\nexport { GalleryToolbarItem as ToolbarItem } from './toolbaritem';\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { defaultBackdropProps } from './GalleryBackdrop.props';\n\nexport const GalleryBackdrop = withComponent({\n name: 'Gallery.Backdrop',\n defaultProps: defaultBackdropProps,\n setup() {\n const gallery = useGalleryContext();\n\n return { gallery };\n },\n render(instance) {\n const { props, ptmi, gallery } = instance;\n\n const rootProps = mergeProps(\n {\n className: gallery?.cx('backdrop')\n },\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import { GalleryBackdropProps } from '@primereact/types/shared/gallery';\n\nexport const defaultBackdropProps: GalleryBackdropProps = {\n as: 'div'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { defaultContentProps } from './GalleryContent.props';\n\nexport const GalleryContent = withComponent({\n name: 'Gallery.Content',\n defaultProps: defaultContentProps,\n setup() {\n const gallery = useGalleryContext();\n\n return { gallery };\n },\n render(instance) {\n const { props, ptmi, gallery } = instance;\n\n const rootProps = mergeProps(\n {\n className: gallery?.cx('content')\n },\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} ref={gallery?.contentRef} />;\n }\n});\n","import { GalleryContentProps } from '@primereact/types/shared/gallery';\n\nexport const defaultContentProps: GalleryContentProps = {\n as: 'div'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { useGalleryItem } from '@primereact/headless/gallery/item';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { GalleryItemProvider } from './GalleryItem.context';\nimport { defaultItemProps } from './GalleryItem.props';\n\nexport const GalleryItem = withComponent({\n name: 'Gallery.Item',\n defaultProps: defaultItemProps,\n setup(instance) {\n const gallery = useGalleryContext();\n const galleryItem = useGalleryItem(instance.inProps);\n\n return { ...galleryItem, gallery };\n },\n render(instance) {\n const { id, props, ptmi, gallery, handleClick, handlePointerDown, handlePointerMove, handlePointerUp, handleDragStart, CSSVariables, attributes } = instance;\n\n const rootProps = mergeProps(\n {\n id,\n className: gallery?.cx('item'),\n onClick: handleClick,\n onPointerDown: handlePointerDown,\n onPointerMove: handlePointerMove,\n onPointerUp: handlePointerUp,\n onDragStart: handleDragStart,\n style: CSSVariables,\n ...attributes\n },\n ptmi('root'),\n gallery?.ptm('item')\n );\n\n return (\n <GalleryItemProvider value={instance}>\n <Component instance={instance} attrs={rootProps} children={props.children} />\n </GalleryItemProvider>\n );\n }\n});\n","'use client';\nimport { createOptionalContext } from '@primereact/core/utils';\nimport type { GalleryItemInstance } from '@primereact/types/shared/gallery';\n\nexport const [GalleryItemProvider, useGalleryItemContext] = createOptionalContext<GalleryItemInstance>();\n","import * as HeadlessGallery from '@primereact/headless/gallery';\nimport type { GalleryItemProps } from '@primereact/types/shared/gallery';\n\nexport const defaultItemProps: GalleryItemProps = {\n ...HeadlessGallery.defaultProps,\n as: 'div'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { defaultNextProps } from './GalleryNext.props';\n\nexport const GalleryNext = withComponent({\n name: 'Gallery.Next',\n defaultProps: defaultNextProps,\n setup() {\n const gallery = useGalleryContext();\n\n return { gallery };\n },\n render(instance) {\n const { props, ptmi, gallery } = instance;\n\n const rootProps = mergeProps(\n {\n className: gallery?.cx('next'),\n onClick: gallery?.actions?.next\n },\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} ref={gallery?.nextRef} />;\n }\n});\n","import { GalleryNextProps } from '@primereact/types/shared/gallery';\n\nexport const defaultNextProps: GalleryNextProps = {\n as: 'button'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { defaultPrevProps } from './GalleryPrev.props';\n\nexport const GalleryPrev = withComponent({\n name: 'Gallery.Prev',\n defaultProps: defaultPrevProps,\n setup() {\n const gallery = useGalleryContext();\n\n return { gallery };\n },\n render(instance) {\n const { props, ptmi, gallery } = instance;\n\n const rootProps = mergeProps(\n {\n className: gallery?.cx('prev'),\n onClick: gallery?.actions?.prev\n },\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} ref={gallery?.prevRef} />;\n }\n});\n","import { GalleryPrevProps } from '@primereact/types/shared/gallery';\n\nexport const defaultPrevProps: GalleryPrevProps = {\n as: 'button'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { useGallery } from '@primereact/headless/gallery';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { GalleryProvider } from '../Gallery.context';\nimport { defaultRootProps } from './GalleryRoot.props';\n\nexport const GalleryRoot = withComponent({\n name: 'Gallery.Root',\n defaultProps: defaultRootProps,\n setup(instance) {\n const gallery = useGallery(instance.inProps);\n\n return gallery;\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 <GalleryProvider value={instance}>\n <Component instance={instance} attrs={rootProps} children={props.children} />\n </GalleryProvider>\n );\n }\n});\n","import * as HeadlessGallery from '@primereact/headless/gallery';\nimport type { GalleryRootProps } from '@primereact/types/shared/gallery';\n\nexport const defaultRootProps: GalleryRootProps = {\n ...HeadlessGallery.defaultProps,\n as: 'div'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { defaultThumbnailProps } from './GalleryThumbnail.props';\n\nexport const GalleryThumbnail = withComponent({\n name: 'Gallery.Thumbnail',\n defaultProps: defaultThumbnailProps,\n setup() {\n const gallery = useGalleryContext();\n\n return { gallery };\n },\n render(instance) {\n const { props, ptmi, gallery } = instance;\n const { as, ...restProps } = props;\n\n const rootProps = mergeProps(\n restProps,\n {\n className: gallery?.cx('thumbnail')\n },\n gallery?.ptm('thumbnail'),\n ptmi('root')\n );\n\n return <Component as={as} instance={instance} attrs={rootProps} children={props.children} ref={gallery?.thumbnailRef} />;\n }\n});\n","'use client';\nimport { createOptionalContext } from '@primereact/core/utils';\nimport type { CarouselRootInstance } from '@primereact/types/shared/carousel';\n\nexport const [CarouselProvider, useCarouselContext] = createOptionalContext<CarouselRootInstance>();\n","export { CarouselContent as Content } from './content';\nexport { CarouselIndicator as Indicator } from './indicator';\nexport { CarouselIndicators as Indicators } from './indicators';\nexport { CarouselItem as Item } from './item';\nexport { CarouselNext as Next } from './next';\nexport { CarouselPrev as Prev } from './prev';\nexport { CarouselRoot as Root } from './root';\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useCarouselContext } from '../Carousel.context';\nimport { defaultContentProps } from './CarouselContent.props';\n\nexport const CarouselContent = withComponent({\n name: 'Carousel.Content',\n defaultProps: defaultContentProps,\n setup() {\n const carousel = useCarouselContext();\n\n return { carousel };\n },\n render(instance) {\n const { props, ptmi, carousel } = instance;\n\n const contentProps = mergeProps(\n {\n className: carousel?.cx('content'),\n style: {\n '--slides-per-page': carousel?.slidesPerPage,\n '--spacing-items': carousel?.props.spacing + 'px',\n '--scroll-snap-type': carousel?.resolveSnapType(),\n position: 'relative',\n scrollbarWidth: 'none',\n display: 'flex',\n flexDirection: carousel?.props.orientation === 'vertical' ? 'column' : 'row',\n overflowX: carousel?.props.orientation === 'horizontal' ? 'scroll' : undefined,\n overflowY: carousel?.props.orientation === 'vertical' ? 'scroll' : undefined,\n overscrollBehaviorX: carousel?.props.orientation === 'horizontal' ? 'contain' : undefined,\n overscrollBehaviorY: carousel?.props.orientation === 'vertical' ? 'contain' : undefined,\n gap: 'var(--spacing-items)',\n scrollSnapType: 'var(--scroll-snap-type)',\n ...carousel?.sx('content')\n },\n onPointerDown: carousel?.onContentPointerDown,\n onPointerMove: carousel?.onContentPointerMove,\n onPointerUp: carousel?.onContentPointerUp,\n onWheel: carousel?.onContentWheel,\n 'data-orientation': carousel?.props.orientation,\n 'data-align': carousel?.props.align,\n 'data-page': carousel?.state.page,\n ...(carousel?.props.autoSize ? { 'data-autosize': '' } : {}),\n ...(carousel?.state.swiping ? { 'data-swiping': '' } : {})\n },\n carousel?.ptm('content'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={contentProps} children={props.children} ref={carousel?.contentRef} />;\n }\n});\n","import type { CarouselContentProps } from '@primereact/types/shared/carousel';\n\nexport const defaultContentProps: CarouselContentProps = {\n as: 'div'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useCarouselContext } from '../Carousel.context';\nimport { defaultIndicatorProps } from './CarouselIndicator.props';\n\nexport const CarouselIndicator = withComponent({\n name: 'Carousel.Indicator',\n defaultProps: defaultIndicatorProps,\n setup() {\n const carousel = useCarouselContext();\n\n return { carousel };\n },\n render(instance) {\n const { props, ptmi, carousel } = instance;\n\n const isActive = carousel?.state.page === props.page;\n\n const contentProps = mergeProps(\n {\n className: carousel?.cx('indicator', { active: isActive }),\n onClick: () => carousel?.scrollToPage(props.page ?? 0),\n 'data-orientation': carousel?.props.orientation,\n 'data-align': carousel?.props.align,\n 'data-page': carousel?.state.page,\n ...(isActive && { 'data-active': '' }),\n ...(carousel?.state.swiping ? { 'data-swiping': '' } : {})\n },\n carousel?.ptm('indicator'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={contentProps} children={props.children} />;\n }\n});\n","import type { CarouselIndicatorProps } from '@primereact/types/shared/carousel';\n\nexport const defaultIndicatorProps: CarouselIndicatorProps = {\n as: 'button',\n page: undefined\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useCarouselContext } from '../Carousel.context';\nimport { CarouselIndicator } from '../indicator/CarouselIndicator';\nimport { defaultIndicatorsProps } from './CarouselIndicators.props';\n\nexport const CarouselIndicators = withComponent({\n name: 'Carousel.Indicators',\n defaultProps: defaultIndicatorsProps,\n setup() {\n const carousel = useCarouselContext();\n\n return { carousel };\n },\n render(instance) {\n const { props, ptmi, carousel } = instance;\n\n const contentProps = mergeProps(\n {\n className: carousel?.cx('indicators'),\n 'data-orientation': carousel?.props.orientation,\n 'data-align': carousel?.props.align,\n 'data-page': carousel?.state.page,\n ...(carousel?.state.swiping ? { 'data-swiping': '' } : {})\n },\n carousel?.ptm('indicators'),\n ptmi('root')\n );\n\n return (\n <Component\n instance={instance}\n attrs={contentProps}\n children={\n props.children ?? (\n <>\n {Array.from(carousel?.state.snapPoints ?? []).map((_, i) => (\n <CarouselIndicator key={i} page={i} />\n ))}\n </>\n )\n }\n />\n );\n }\n});\n","import type { CarouselIndicatorsProps } from '@primereact/types/shared/carousel';\n\nexport const defaultIndicatorsProps: CarouselIndicatorsProps = {\n as: 'div'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useCarouselContext } from '../Carousel.context';\nimport { defaultItemProps } from './CarouselItem.props';\n\nexport const CarouselItem = withComponent({\n name: 'Carousel.Item',\n defaultProps: defaultItemProps,\n setup() {\n const carousel = useCarouselContext();\n\n return { carousel };\n },\n render(instance) {\n const { id, props, ptmi, carousel } = instance;\n\n const rootProps = mergeProps(\n {\n id,\n className: carousel?.cx('item'),\n style: {\n flexGrow: 0,\n flexShrink: 0,\n minWidth: 0,\n flexBasis: carousel?.props.autoSize ? 'auto' : `calc(100% / var(--slides-per-page) - var(--spacing-items) * (var(--slides-per-page) - 1) / var(--slides-per-page))`,\n scrollSnapAlign: carousel?.props.align,\n ...carousel?.sx('item')\n },\n 'data-value': props.value,\n 'data-item': '',\n 'data-inview': 'false',\n 'data-orientation': carousel?.props.orientation,\n 'data-align': carousel?.props.align,\n 'data-page': carousel?.state.page,\n ...(carousel?.state.swiping ? { 'data-swiping': '' } : {}),\n ...(carousel?.props.autoSize ? { 'data-autosize': '' } : {})\n },\n carousel?.ptm('item'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import type { CarouselItemProps } from '@primereact/types/shared/carousel';\n\nexport const defaultItemProps: CarouselItemProps = {\n as: 'div',\n value: undefined\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useCarouselContext } from '../Carousel.context';\nimport { defaultNextProps } from './CarouselNext.props';\n\nexport const CarouselNext = withComponent({\n name: 'Carousel.Next',\n defaultProps: defaultNextProps,\n setup() {\n const carousel = useCarouselContext();\n\n return { carousel };\n },\n render(instance) {\n const { props, ptmi, carousel } = instance;\n\n const disabled = carousel?.state.isNextDisabled || props.disabled;\n const rootProps = mergeProps(\n {\n className: carousel?.cx('next', { disabled }),\n onClick: carousel?.next,\n disabled,\n 'data-orientation': carousel?.props.orientation,\n 'data-align': carousel?.props.align,\n 'data-page': carousel?.state.page,\n 'data-disabled': disabled,\n ...(carousel?.state.swiping ? { 'data-swiping': '' } : {})\n },\n carousel?.ptm('prev'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import type { CarouselNextProps } from '@primereact/types/shared/carousel';\n\nexport const defaultNextProps: CarouselNextProps = {\n as: 'button'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useCarouselContext } from '../Carousel.context';\nimport { defaultPrevProps } from './CarouselPrev.props';\n\nexport const CarouselPrev = withComponent({\n name: 'Carousel.Prev',\n defaultProps: defaultPrevProps,\n setup() {\n const carousel = useCarouselContext();\n\n return { carousel };\n },\n render(instance) {\n const { props, ptmi, carousel } = instance;\n\n const disabled = carousel?.state.isPrevDisabled || props.disabled;\n const rootProps = mergeProps(\n {\n className: carousel?.cx('prev', { disabled }),\n onClick: carousel?.prev,\n disabled,\n 'data-orientation': carousel?.props.orientation,\n 'data-align': carousel?.props.align,\n 'data-page': carousel?.state.page,\n 'data-disabled': disabled,\n ...(carousel?.state.swiping ? { 'data-swiping': '' } : {})\n },\n carousel?.ptm('prev'),\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import type { CarouselPrevProps } from '@primereact/types/shared/carousel';\n\nexport const defaultPrevProps: CarouselPrevProps = {\n as: 'button'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { useCarousel } from '@primereact/headless/carousel';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { CarouselProvider } from '../Carousel.context';\nimport { defaultRootProps } from './CarouselRoot.props';\n\nexport const CarouselRoot = withComponent({\n name: 'Carousel.Root',\n defaultProps: defaultRootProps,\n setup(instance) {\n const carousel = useCarousel(instance.inProps);\n\n return carousel;\n },\n render(instance) {\n const { id, props, state, ptmi, cx } = instance;\n\n const rootProps = mergeProps(\n {\n id,\n className: cx('root'),\n 'data-orientation': props.orientation,\n 'data-align': props.align,\n 'data-page': state.page,\n ...(state.swiping ? { 'data-swiping': '' } : {}),\n ...(props.autoSize ? { 'data-autosize': '' } : {})\n },\n ptmi('root')\n );\n\n return (\n <CarouselProvider value={instance}>\n <Component instance={instance} attrs={rootProps} children={props.children} />\n </CarouselProvider>\n );\n }\n});\n","import * as HeadlessCarousel from '@primereact/headless/carousel';\nimport type { CarouselRootProps } from '@primereact/types/shared/carousel';\n\nexport const defaultRootProps: CarouselRootProps = {\n ...HeadlessCarousel.defaultProps,\n as: 'div'\n};\n","export { defaultContentProps } from './content';\nexport { defaultIndicatorProps } from './indicator';\nexport { defaultIndicatorsProps } from './indicators';\nexport { defaultItemProps } from './item';\nexport { defaultNextProps } from './next';\nexport { defaultPrevProps } from './prev';\nexport { defaultRootProps } from './root';\n","import { GalleryThumbnailProps } from '@primereact/types/shared/gallery';\nimport { CarouselRoot } from 'primereact/carousel';\n\nexport const defaultThumbnailProps: GalleryThumbnailProps = {\n as: CarouselRoot\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { defaultThumbnailContentProps } from './GalleryThumbnailContent.props';\n\nexport const GalleryThumbnailContent = withComponent({\n name: 'Gallery.ThumbnailContent',\n defaultProps: defaultThumbnailContentProps,\n setup() {\n const gallery = useGalleryContext();\n\n return { gallery };\n },\n render(instance) {\n const { props, ptmi, gallery } = instance;\n const { as, ...restProps } = props;\n\n const rootProps = mergeProps(\n restProps,\n {\n className: gallery?.cx('thumbnailContent')\n },\n gallery?.ptm('thumbnailContent'),\n ptmi('root')\n );\n\n return <Component as={as} instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import { GalleryThumbnailContentProps } from '@primereact/types/shared/gallery';\nimport { CarouselContent } from 'primereact/carousel';\n\nexport const defaultThumbnailContentProps: GalleryThumbnailContentProps = {\n as: CarouselContent\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { defaultThumbnailItemProps } from './GalleryThumbnailItem.props';\n\nexport const GalleryThumbnailItem = withComponent({\n name: 'Gallery.ThumbnailItem',\n defaultProps: defaultThumbnailItemProps,\n setup() {\n const gallery = useGalleryContext();\n\n return { gallery };\n },\n render(instance) {\n const { props, ptmi, gallery } = instance;\n const { as, ...restProps } = props;\n\n const rootProps = mergeProps(\n restProps,\n {\n className: gallery?.cx('thumbnailItem')\n },\n gallery?.ptm('thumbnailItem'),\n ptmi('root')\n );\n\n return <Component as={as} instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import { GalleryThumbnailItemProps } from '@primereact/types/shared/gallery';\nimport { CarouselItem } from 'primereact/carousel';\n\nexport const defaultThumbnailItemProps: GalleryThumbnailItemProps = {\n as: CarouselItem\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { defaultToolbarProps } from './GalleryToolbar.props';\n\nexport const GalleryToolbar = withComponent({\n name: 'Gallery.Toolbar',\n defaultProps: defaultToolbarProps,\n setup() {\n const gallery = useGalleryContext();\n\n return { gallery };\n },\n render(instance) {\n const { props, ptmi, gallery } = instance;\n\n const rootProps = mergeProps(\n {\n className: gallery?.cx('toolbar')\n },\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} ref={gallery?.toolbarRef} />;\n }\n});\n","import { GalleryToolbarProps } from '@primereact/types/shared/gallery';\n\nexport const defaultToolbarProps: GalleryToolbarProps = {\n as: 'div'\n};\n","'use client';\nimport { Component, withComponent } from '@primereact/core/component';\nimport { mergeProps } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useGalleryContext } from '../Gallery.context';\nimport { defaultToolbarItemProps } from './GalleryToolbarItem.props';\n\nexport const GalleryToolbarItem = withComponent({\n name: 'Gallery.ToolbarItem',\n defaultProps: defaultToolbarItemProps,\n setup() {\n const gallery = useGalleryContext();\n\n return { gallery };\n },\n render(instance) {\n const { props, ptmi, gallery } = instance;\n\n const rootProps = mergeProps(\n {\n className: gallery?.cx('toolbarItem'),\n onClick: () => {\n gallery?.handleClickAction(props?.action);\n props?.onClick?.();\n }\n },\n ptmi('root')\n );\n\n return <Component instance={instance} attrs={rootProps} children={props.children} />;\n }\n});\n","import { GalleryToolbarItemProps } from '@primereact/types/shared/gallery';\n\nexport const defaultToolbarItemProps: GalleryToolbarItemProps = {\n as: 'div',\n action: undefined,\n onClick: undefined\n};\n","export { defaultBackdropProps } from './backdrop';\nexport { defaultContentProps } from './content';\nexport { defaultItemProps } from './item';\nexport { defaultNextProps } from './next';\nexport { defaultPrevProps } from './prev';\nexport { defaultRootProps } from './root';\nexport { defaultThumbnailProps } from './thumbnail';\nexport { defaultThumbnailContentProps } from './thumbnailcontent';\nexport { defaultThumbnailItemProps } from './thumbnailitem';\nexport { defaultToolbarProps } from './toolbar';\nexport { defaultToolbarItemProps } from './toolbaritem';\n","import type { useGalleryItemProps } from '@primereact/types/shared/gallery';\n\nexport const defaultItemProps: useGalleryItemProps = {\n normalScale: 1,\n zoomedScale: 3\n};\n"],"mappings":"mqBAAA,OAAS,gBAAAA,OAAoB,4BCC7B,OAAS,yBAAAC,OAA6B,yBAG/B,GAAM,CAACC,GAAiBC,CAAiB,EAAIF,GAA2C,ECJ/F,IAAAG,GAAA,GAAAC,GAAAD,GAAA,cAAAE,GAAA,YAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,cAAAC,GAAA,qBAAAC,GAAA,kBAAAC,GAAA,YAAAC,GAAA,gBAAAC,KCCA,OAAS,aAAAC,GAAW,iBAAAC,OAAqB,6BACzC,OAAS,cAAAC,OAAkB,kBAC3B,UAAYC,OAAW,QCDhB,IAAMC,EAA6C,CACtD,GAAI,KACR,EDGO,IAAMC,GAAkBC,GAAc,CACzC,KAAM,mBACN,aAAcC,EACd,OAAQ,CAGJ,MAAO,CAAE,QAFOC,EAAkB,CAEjB,CACrB,EACA,OAAOC,EAAU,CACb,GAAM,CAAE,MAAAC,EAAO,KAAAC,EAAM,QAAAC,CAAQ,EAAIH,EAE3BI,EAAYC,GACd,CACI,UAAWF,GAAA,YAAAA,EAAS,GAAG,WAC3B,EACAD,EAAK,MAAM,CACf,EAEA,OAAO,iBAACI,GAAA,CAAU,SAAUN,EAAU,MAAOI,EAAW,SAAUH,EAAM,SAAU,CACtF,CACJ,CAAC,EE1BD,OAAS,aAAAM,GAAW,iBAAAC,OAAqB,6BACzC,OAAS,cAAAC,OAAkB,kBAC3B,UAAYC,OAAW,QCDhB,IAAMC,EAA2C,CACpD,GAAI,KACR,EDGO,IAAMC,GAAiBC,GAAc,CACxC,KAAM,kBACN,aAAcC,EAC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MAAO,CACH,MAZU,CACV,MAAAV,EACA,SAAAI,EACA,MAAAE,EACA,SAAAE,EACA,KAAAE,GACA,SAAAR,EACA,UAAAY,GACA,WAAAE,EACJ,EAII,WAAAmF,GACA,aAAAC,GACA,gBAAAX,GACA,kBAAAZ,GACA,kBAAAD,GACA,YAAAf,GACA,gBAAAc,GACA,OAAA7B,GACA,QAAAE,GACA,WAAAE,GACA,YAAAE,GACA,MAAAC,GACA,MAAAG,GACA,SAAAC,GACA,qBAAA3B,EACA,kBAAAV,CACJ,CACJ,CACJ,CAAC","names":["withHeadless","createOptionalContext","GalleryProvider","useGalleryContext","Gallery_parts_exports","__export","GalleryBackdrop","GalleryContent","GalleryItem","GalleryNext","GalleryPrev","GalleryRoot","GalleryThumbnail","GalleryThumbnailContent","GalleryThumbnailItem","GalleryToolbar","GalleryToolbarItem","Component","withComponent","mergeProps","React","defaultBackdropProps","GalleryBackdrop","withComponent","defaultBackdropProps","useGalleryContext","instance","props","ptmi","gallery","rootProps","mergeProps","Component","Component","withComponent","mergeProps","React","defaultContentProps","GalleryContent","withComponent","defaultContentProps","useGalleryContext","instance","props","ptmi","gallery","rootProps","mergeProps","Component","Component","withComponent","useGalleryItem","mergeProps","React","createOptionalContext","GalleryItemProvider","useGalleryItemContext","HeadlessGallery","defaultItemProps","__spreadProps","__spreadValues","GalleryItem","withComponent","defaultItemProps","instance","gallery","useGalleryContext","galleryItem","useGalleryItem","__spreadProps","__spreadValues","id","props","ptmi","handleClick","handlePointerDown","handlePointerMove","handlePointerUp","handleDragStart","CSSVariables","attributes","rootProps","mergeProps","GalleryItemProvider","Component","Component","withComponent","mergeProps","React","defaultNextProps","GalleryNext","withComponent","defaultNextProps","useGalleryContext","instance","_a","props","ptmi","gallery","rootProps","mergeProps","Component","Component","withComponent","mergeProps","React","defaultPrevProps","GalleryPrev","withComponent","defaultPrevProps","useGalleryContext","instance","_a","props","ptmi","gallery","rootProps","mergeProps","Component","Component","withComponent","useGallery","mergeProps","React","HeadlessGallery","defaultRootProps","__spreadProps","__spreadValues","GalleryRoot","withComponent","defaultRootProps","instance","useGallery","id","props","ptmi","cx","rootProps","mergeProps","GalleryProvider","Component","Component","withComponent","mergeProps","React","createOptionalContext","CarouselProvider","useCarouselContext","Carousel_parts_exports","__export","CarouselContent","CarouselIndicator","CarouselIndicators","CarouselItem","CarouselNext","CarouselPrev","CarouselRoot","Component","withComponent","mergeProps","React","defaultContentProps","CarouselContent","withComponent","defaultContentProps","useCarouselContext","instance","props","ptmi","carousel","contentProps","mergeProps","__spreadValues","Component","Component","withComponent","mergeProps","React","defaultIndicatorProps","CarouselIndicator","withComponent","defaultIndicatorProps","useCarouselContext","instance","props","ptmi","carousel","isActive","contentProps","mergeProps","__spreadValues","_a","Component","Component","withComponent","mergeProps","React","defaultIndicatorsProps","CarouselIndicators","withComponent","defaultIndicatorsProps","useCarouselContext","instance","_a","_b","props","ptmi","carousel","contentProps","mergeProps","__spreadValues","Component","_","i","CarouselIndicator","Component","withComponent","mergeProps","React","defaultItemProps","CarouselItem","withComponent","defaultItemProps","useCarouselContext","instance","id","props","ptmi","carousel","rootProps","mergeProps","__spreadValues","Component","Component","withComponent","mergeProps","React","defaultNextProps","CarouselNext","withComponent","defaultNextProps","useCarouselContext","instance","props","ptmi","carousel","disabled","rootProps","mergeProps","__spreadValues","Component","Component","withComponent","mergeProps","React","defaultPrevProps","CarouselPrev","withComponent","defaultPrevProps","useCarouselContext","instance","props","ptmi","carousel","disabled","rootProps","mergeProps","__spreadValues","Component","Component","withComponent","useCarousel","mergeProps","React","HeadlessCarousel","defaultRootProps","__spreadProps","__spreadValues","CarouselRoot","withComponent","defaultRootProps","instance","useCarousel","id","props","state","ptmi","cx","rootProps","mergeProps","__spreadValues","CarouselProvider","Component","Carousel_props_exports","__export","defaultContentProps","defaultIndicatorProps","defaultIndicatorsProps","defaultItemProps","defaultNextProps","defaultPrevProps","defaultRootProps","defaultThumbnailProps","CarouselRoot","GalleryThumbnail","withComponent","defaultThumbnailProps","useGalleryContext","instance","props","ptmi","gallery","_a","as","restProps","__objRest","rootProps","mergeProps","Component","Component","withComponent","mergeProps","React","defaultThumbnailContentProps","CarouselContent","GalleryThumbnailContent","withComponent","defaultThumbnailContentProps","useGalleryContext","instance","props","ptmi","gallery","_a","as","restProps","__objRest","rootProps","mergeProps","Component","Component","withComponent","mergeProps","React","defaultThumbnailItemProps","CarouselItem","GalleryThumbnailItem","withComponent","defaultThumbnailItemProps","useGalleryContext","instance","props","ptmi","gallery","_a","as","restProps","__objRest","rootProps","mergeProps","Component","Component","withComponent","mergeProps","React","defaultToolbarProps","GalleryToolbar","withComponent","defaultToolbarProps","useGalleryContext","instance","props","ptmi","gallery","rootProps","mergeProps","Component","Component","withComponent","mergeProps","React","defaultToolbarItemProps","GalleryToolbarItem","withComponent","defaultToolbarItemProps","useGalleryContext","instance","props","ptmi","gallery","rootProps","mergeProps","_a","Component","Gallery_props_exports","__export","defaultBackdropProps","defaultContentProps","defaultItemProps","defaultNextProps","defaultPrevProps","defaultRootProps","defaultThumbnailContentProps","defaultThumbnailItemProps","defaultThumbnailProps","defaultToolbarItemProps","defaultToolbarProps","React","defaultItemProps","useGalleryItem","withHeadless","defaultItemProps","props","elementRef","normalScale","zoomedScale","gallery","useGalleryContext","index","setIndex","isActive","setIsActive","position","setPosition","scale","setScale","rotation","setRotation","flip","setFlip","isDragging","setIsDragging","dragStart","setDragStart","hasDragged","setHasDragged","pointerDataRef","lastDistanceRef","calculateItemSize","contentRect","imageElement","naturalWidth","naturalHeight","isRotated","naturalAspectRatio","contentAspectRatio","targetWidth","targetHeight","calculateConstraints","targetScale","scaleToUse","itemElement","originalWidth","originalHeight","scaledWidth","scaledHeight","contentCenterX","contentCenterY","halfScaledWidth","halfScaledHeight","maxX","minX","maxY","minY","zoomIn","hiddenStyles","zoomOut","resetStyles","rotateLeft","prev","rotateRight","flipX","__spreadProps","__spreadValues","flipY","download","link","urlParts","filename","handleClick","e","itemRect","itemCenterX","itemCenterY","clickX","clickY","offsetX","offsetY","zoomOffsetX","zoomOffsetY","constraints","constrainedX","constrainedY","handleDragStart","handlePointerDown","handlePointerMove","pointers","p1","p2","distance","delta","newScale","pointer","newX","newY","computedX","computedY","handlePointerUp","handleResize","handleCustomEvent","_a","_b","_c","_d","_e","_f","_g","attributes","CSSVariables"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const useGalleryItem: (inProps?: unknown) => import("@primereact/types/core").HeadlessInstance<import("@primereact/types/shared/gallery").useGalleryItemProps, unknown, {
|
|
3
|
+
state: {
|
|
4
|
+
index: number;
|
|
5
|
+
position: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
scale: number;
|
|
10
|
+
rotation: number;
|
|
11
|
+
flip: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
isActive: boolean;
|
|
16
|
+
dragStart: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
hasDragged: boolean;
|
|
21
|
+
};
|
|
22
|
+
attributes: {
|
|
23
|
+
'data-active': boolean;
|
|
24
|
+
};
|
|
25
|
+
CSSVariables: React.CSSProperties;
|
|
26
|
+
handlePointerUp: (e: React.PointerEvent) => void;
|
|
27
|
+
handlePointerMove: (e: React.PointerEvent) => void;
|
|
28
|
+
handlePointerDown: (e: React.PointerEvent) => void;
|
|
29
|
+
handleClick: (e: React.MouseEvent) => void;
|
|
30
|
+
handleDragStart: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
31
|
+
zoomIn: () => void;
|
|
32
|
+
zoomOut: () => void;
|
|
33
|
+
rotateLeft: () => void;
|
|
34
|
+
rotateRight: () => void;
|
|
35
|
+
flipX: () => void;
|
|
36
|
+
flipY: () => void;
|
|
37
|
+
download: () => void;
|
|
38
|
+
calculateConstraints: (targetScale?: number) => {
|
|
39
|
+
minX: number;
|
|
40
|
+
maxX: number;
|
|
41
|
+
minY: number;
|
|
42
|
+
maxY: number;
|
|
43
|
+
};
|
|
44
|
+
calculateItemSize: () => void;
|
|
45
|
+
}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { CarouselRootInstance } from '@primereact/types/shared/carousel';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const useGallery: (inProps?: unknown) => import("@primereact/types/core").HeadlessInstance<import("@primereact/types/shared/gallery").useGalleryProps, unknown, {
|
|
4
|
+
state: {
|
|
5
|
+
isFullscreen: boolean;
|
|
6
|
+
activeIndex: number;
|
|
7
|
+
};
|
|
8
|
+
registerItem: (ref: HTMLDivElement | null) => number;
|
|
9
|
+
handleNext: () => void;
|
|
10
|
+
handlePrev: () => void;
|
|
11
|
+
createCustomEvent: (action: string) => () => void;
|
|
12
|
+
toggleFullScreen: () => void;
|
|
13
|
+
handleClickAction: (action?: string) => void;
|
|
14
|
+
actions: {
|
|
15
|
+
zoomIn: () => void;
|
|
16
|
+
zoomOut: () => void;
|
|
17
|
+
rotateLeft: () => void;
|
|
18
|
+
rotateRight: () => void;
|
|
19
|
+
flipX: () => void;
|
|
20
|
+
flipY: () => void;
|
|
21
|
+
download: () => void;
|
|
22
|
+
next: () => void;
|
|
23
|
+
prev: () => void;
|
|
24
|
+
toggleFullScreen: () => void;
|
|
25
|
+
};
|
|
26
|
+
contentRef: React.RefObject<HTMLDivElement | null>;
|
|
27
|
+
toolbarRef: React.RefObject<HTMLDivElement | null>;
|
|
28
|
+
thumbnailRef: React.RefObject<CarouselRootInstance | null>;
|
|
29
|
+
prevRef: React.RefObject<HTMLButtonElement | null>;
|
|
30
|
+
nextRef: React.RefObject<HTMLButtonElement | null>;
|
|
31
|
+
}>;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/iconfield/useIconField.ts","../../src/iconfield/useIconField.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { defaultProps } from './useIconField.props';\n\nexport const useIconField = withHeadless({\n name: 'useIconField',\n defaultProps\n});\n","import type { useIconFieldProps } from '@primereact/types/shared/iconfield';\n\nexport const defaultProps: useIconFieldProps = {};\n"],"mappings":"AAAA,OAAS,gBAAAA,MAAoB,4BCEtB,IAAMC,EAAkC,CAAC,EDCzC,IAAMC,EAAeC,EAAa,CACrC,KAAM,eACN,aAAAC,CACJ,CAAC","names":["withHeadless","defaultProps","useIconField","withHeadless","defaultProps"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIconField: (inProps?: unknown) => import("@primereact/types/core").HeadlessInstance<import("@primereact/types/shared/iconfield").useIconFieldProps, unknown, Record<PropertyKey, unknown>>;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/iftalabel/useIftaLabel.ts","../../src/iftalabel/useIftaLabel.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { defaultProps } from './useIftaLabel.props';\n\nexport const useIftaLabel = withHeadless({\n name: 'useIftaLabel',\n defaultProps\n});\n","import type { useIftaLabelProps } from '@primereact/types/shared/iftalabel';\n\nexport const defaultProps: useIftaLabelProps = {};\n"],"mappings":"AAAA,OAAS,gBAAAA,MAAoB,4BCEtB,IAAMC,EAAkC,CAAC,EDCzC,IAAMC,EAAeC,EAAa,CACrC,KAAM,eACN,aAAAC,CACJ,CAAC","names":["withHeadless","defaultProps","useIftaLabel","withHeadless","defaultProps"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIftaLabel: (inProps?: unknown) => import("@primereact/types/core").HeadlessInstance<import("@primereact/types/shared/iftalabel").useIftaLabelProps, unknown, Record<PropertyKey, unknown>>;
|
|
File without changes
|
package/inplace/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{withHeadless as
|
|
1
|
+
import{withHeadless as f}from"@primereact/core/headless";import{useControlledState as u}from"@primereact/hooks/use-controlled-state";var r={active:void 0,defaultActive:!1,onActiveChange:void 0};var g=f({name:"useInplace",defaultProps:r,setup:({props:t})=>{var o;let[i,a]=u({value:t.active,defaultValue:(o=t.defaultActive)!=null?o:!1,onChange:t.onActiveChange}),c={active:i},n=()=>a([!0,{originalEvent:void 0,active:!0}]),l=()=>a([!1,{originalEvent:void 0,active:!1}]);function s(e){e.defaultPrevented||(e.preventDefault(),(e.code==="Enter"||e.code==="Space")&&n())}return{state:c,open:n,close:l,onDisplayKeyDown:s}}});export{r as defaultProps,g as useInplace};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/inplace/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/inplace/useInplace.ts","../../src/inplace/useInplace.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/inplace/useInplace.ts","../../src/inplace/useInplace.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { useControlledState } from '@primereact/hooks/use-controlled-state';\nimport { defaultProps } from './useInplace.props';\n\nexport const useInplace = withHeadless({\n name: 'useInplace',\n defaultProps,\n setup: ({ props }) => {\n const [activeState, setActiveState] = useControlledState({\n value: props.active,\n defaultValue: props.defaultActive ?? false,\n onChange: props.onActiveChange\n });\n\n const state = {\n active: activeState\n };\n\n // methods\n const open = () =>\n setActiveState([\n true,\n {\n originalEvent: undefined,\n active: true\n }\n ]);\n const close = () =>\n setActiveState([\n false,\n {\n originalEvent: undefined,\n active: false\n }\n ]);\n\n function onDisplayKeyDown(event: React.KeyboardEvent<HTMLDivElement>) {\n if (event.defaultPrevented) return;\n\n event.preventDefault();\n\n if (event.code === 'Enter' || event.code === 'Space') {\n open();\n }\n }\n\n return {\n state,\n open,\n close,\n onDisplayKeyDown\n };\n }\n});\n","import type { useInplaceProps } from '@primereact/types/shared/inplace';\n\nexport const defaultProps: useInplaceProps = {\n active: undefined,\n defaultActive: false,\n onActiveChange: undefined\n};\n"],"mappings":"AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,sBAAAC,MAA0B,yCCC5B,IAAMC,EAAgC,CACzC,OAAQ,OACR,cAAe,GACf,eAAgB,MACpB,EDFO,IAAMC,EAAaC,EAAa,CACnC,KAAM,aACN,aAAAC,EACA,MAAO,CAAC,CAAE,MAAAC,CAAM,IAAM,CAP1B,IAAAC,EAQQ,GAAM,CAACC,EAAaC,CAAc,EAAIC,EAAmB,CACrD,MAAOJ,EAAM,OACb,cAAcC,EAAAD,EAAM,gBAAN,KAAAC,EAAuB,GACrC,SAAUD,EAAM,cACpB,CAAC,EAEKK,EAAQ,CACV,OAAQH,CACZ,EAGMI,EAAO,IACTH,EAAe,CACX,GACA,CACI,cAAe,OACf,OAAQ,EACZ,CACJ,CAAC,EACCI,EAAQ,IACVJ,EAAe,CACX,GACA,CACI,cAAe,OACf,OAAQ,EACZ,CACJ,CAAC,EAEL,SAASK,EAAiBC,EAA4C,CAC9DA,EAAM,mBAEVA,EAAM,eAAe,GAEjBA,EAAM,OAAS,SAAWA,EAAM,OAAS,UACzCH,EAAK,EAEb,CAEA,MAAO,CACH,MAAAD,EACA,KAAAC,EACA,MAAAC,EACA,iBAAAC,CACJ,CACJ,CACJ,CAAC","names":["withHeadless","useControlledState","defaultProps","useInplace","withHeadless","defaultProps","props","_a","activeState","setActiveState","useControlledState","state","open","close","onDisplayKeyDown","event"]}
|
package/inplace/useInplace.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/inputgroup/useInputGroup.ts","../../src/inputgroup/useInputGroup.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { defaultProps } from './useInputGroup.props';\n\nexport const useInputGroup = withHeadless({\n name: 'useInputGroup',\n defaultProps\n});\n","import type { useInputGroupProps } from '@primereact/types/shared/inputgroup';\n\nexport const defaultProps: useInputGroupProps = {};\n"],"mappings":"AAAA,OAAS,gBAAAA,MAAoB,4BCEtB,IAAMC,EAAmC,CAAC,EDC1C,IAAMC,EAAgBC,EAAa,CACtC,KAAM,gBACN,aAAAC,CACJ,CAAC","names":["withHeadless","defaultProps","useInputGroup","withHeadless","defaultProps"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useInputGroup: (inProps?: unknown) => import("@primereact/types/core").HeadlessInstance<import("@primereact/types/shared/inputgroup").useInputGroupProps, unknown, Record<PropertyKey, unknown>>;
|
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{withHeadless as we}from"@primereact/core/headless";import{useControlledState as Pe,useMountEffect as Ve,useNumberFormatter as pe,useUnmountEffect as Fe,useUpdateEffect as O}from"@primereact/hooks";import{clearSelection as Ne,getSelection as le,isEmpty as ke,isNotEmpty as ie}from"@primeuix/utils";import*as D from"react";var te={value:void 0,defaultValue:void 0,format:!0,locale:void 0,mode:"decimal",prefix:void 0,suffix:void 0,currency:void 0,currencyDisplay:void 0,useGrouping:!0,minFractionDigits:void 0,maxFractionDigits:void 0,roundingMode:void 0,min:void 0,max:void 0,step:1,allowEmpty:!0,highlightOnFocus:!1,onValueChange:void 0,onChange:void 0};var $e=we({name:"useInputNumber",defaultProps:te,setup({props:i}){let[d,ae]=Pe({value:i.value,defaultValue:i.defaultValue,onChange:i.onValueChange}),ue=pe({value:d,locale:i.locale,localeMatcher:i.localeMatcher,mode:i.mode,currency:i.currency,currencyDisplay:i.currencyDisplay,useGrouping:i.useGrouping,minFractionDigits:i.minFractionDigits,maxFractionDigits:i.maxFractionDigits,roundingMode:i.roundingMode,prefix:i.prefix,suffix:i.suffix,min:i.min,format:i.format}),{formattedValue:ce,formatValue:C,parseValue:I,addWithPrecision:G,isDecimalMode:$,isNumeralChar:T,isMinusSign:se,isDecimalSign:V,allowMinusSign:re,getDecimalCharIndexes:v,getCharIndexes:oe,getDecimalLength:U,concatValues:me,groupChar:y,prefixChar:W,suffixChar:j,resolvedOptions:fe}=ue,p=D.useRef(null),F=D.useRef(null),N=D.useRef(null),J=D.useRef(d);J.current=d;let ge={value:d,formattedValue:ce},k=(e,l)=>{var u,s;let n=((u=i.step)!=null?u:1)*l;if(e){let t=I(e.currentTarget.value)||0,a=H(G(Number(t),n));Z(e,a,null,"spin",String(t)),x(e,a),B(e,String(t),a)}else{let t=(s=J.current)!=null?s:0,a=H(G(Number(t),n));x(null,a),B(null,String(t),a)}},A=(e,l,n)=>{if(i.readOnly)return;let u=l||500;P(),p.current=setTimeout(()=>{A(e,40,n)},u),k(e,n)},_=(e,l)=>{var n;i.disabled||(A(e,void 0,(n=l!=null?l:i.step)!=null?n:1),e==null||e.preventDefault())},q=(e,l)=>{var n;i.disabled||(A(e,void 0,l!=null?l:((n=i.step)!=null?n:1)*-1),e==null||e.preventDefault())},de=()=>{var e;_(null,(e=i.step)!=null?e:1)},Ee=()=>{var e;q(null,((e=i.step)!=null?e:1)*-1)},he=()=>{i.disabled||P()},z=e=>{var l;i.disabled||i.readOnly||(N.current&&(e.currentTarget.value=(l=F.current)!=null?l:""),N.current=!1)},be=e=>{var o,h,M,g;if(i.readOnly)return;let l=e.currentTarget;if(e.altKey||e.ctrlKey||e.metaKey){N.current=!0,F.current=l.value;return}F.current=l.value;let n=(o=l.selectionStart)!=null?o:0,u=(h=l.selectionEnd)!=null?h:0,s=u-n,t=l.value,a=null;switch(e.code||e.key){case"ArrowUp":k(e,1),e.preventDefault();break;case"ArrowDown":k(e,-1),e.preventDefault();break;case"ArrowLeft":if(s>1){let m=T(t.charAt(n))?n+1:n+2;e.currentTarget.setSelectionRange(m,m)}else T(t.charAt(n-1))||e.preventDefault();break;case"ArrowRight":if(s>1){let m=u-1;e.currentTarget.setSelectionRange(m,m)}else T(t.charAt(n))||e.preventDefault();break;case"Tab":case"Enter":case"NumpadEnter":a=H(I(t)),e.currentTarget.value=C(a),e.currentTarget.setAttribute("aria-valuenow",a!=null?String(a):""),x(e,a);break;case"Backspace":{if(e.preventDefault(),n===u){n>=t.length&&j!==null&&(n=t.length-j.length,e.currentTarget.setSelectionRange(n,n));let m=t.charAt(n-1),{decimalCharIndex:c,decimalCharIndexWithoutPrefix:R}=v(t);if(T(m)){let E=U(t);if(y&&new RegExp(`[${y}]`,"g").test(m))a=t.slice(0,n-2)+t.slice(n-1);else if(V(m))E?e.currentTarget.setSelectionRange(n-1,n-1):a=t.slice(0,n-1)+t.slice(n);else if(c>0&&n>c){let f=$()&&(i.minFractionDigits||0)<E?"":"0";a=t.slice(0,n-1)+f+t.slice(n)}else if(R===1){a=t.slice(0,n-1)+"0"+t.slice(n);let f=I(a);a=typeof f=="number"&&f>0?a:""}else a=t.slice(0,n-1)+t.slice(n)}b(e,a,null,"delete-single")}else a=X(t,n,u),b(e,a,null,"delete-range");break}case"Delete":if(e.preventDefault(),n===u){let m=t.charAt(n),{decimalCharIndex:c,decimalCharIndexWithoutPrefix:R}=v(t);if(T(m)){let E=U(t);if(y&&new RegExp(`[${y}]`,"g").test(m))a=t.slice(0,n)+t.slice(n+2);else if(V(m))E?e.currentTarget.setSelectionRange(n+1,n+1):a=t.slice(0,n)+t.slice(n+1);else if(c>0&&n>c){let f=$()&&(i.minFractionDigits||0)<E?"":"0";a=t.slice(0,n)+f+t.slice(n+1)}else if(R===1){a=t.slice(0,n)+"0"+t.slice(n+1);let f=I(a);a=typeof f=="number"&&f>0?a:""}else a=t.slice(0,n)+t.slice(n+1)}b(e,a,null,"delete-back-single")}else a=X(t,n,u),b(e,a,null,"delete-range");break;case"Home":e.preventDefault(),ie(i.min)&&x(e,(M=i.min)!=null?M:0);break;case"End":e.preventDefault(),ie(i.max)&&x(e,(g=i.max)!=null?g:100);break;default:break}},Re=e=>{if(i.readOnly)return;let l=e.key,n=V(l),u=se(l);e.code!=="Enter"&&e.preventDefault(),(Number(l)>=0&&Number(l)<=9||u||n)&&Q(e,l,{isDecimalSign:n,isMinusSign:u})},Ie=e=>{var n;if(i.readOnly)return;e.preventDefault();let l=(n=e.clipboardData||window.clipboardData)==null?void 0:n.getData("Text");if(l){let u=I(l);u!=null&&Q(e,u.toString())}},Q=(e,l,n={isDecimalSign:!1,isMinusSign:!1})=>{var m,c,R,E;let u=l.search(/-/);if(!re()&&u!==-1)return;let s=(m=e.currentTarget.selectionStart)!=null?m:0,t=(c=e.currentTarget.selectionEnd)!=null?c:0,a=e.currentTarget.value.trim(),{decimalCharIndex:r,minusCharIndex:o,suffixCharIndex:h,currencyCharIndex:M}=oe(a),g;if(n.isMinusSign){let f=o===-1;(s===0||s===M+1)&&(g=a,(f||t!==0)&&(g=w(a,l,0,t)),b(e,g,l,"insert"))}else if(n.isDecimalSign)r>0&&s===r?b(e,a,l,"insert"):(r>s&&r<t||r===-1&&i.maxFractionDigits)&&(g=w(a,l,s,t),b(e,g,l,"insert"));else{let f=(E=(R=fe())==null?void 0:R.maximumFractionDigits)!=null?E:0,S=s!==t?"range-insert":"insert";if(r>0&&s>r){if(s+l.length-(r+1)<=f){let L=M>=s?M-1:h>=s?h:a.length;g=a.slice(0,s)+l+a.slice(s+l.length,L)+a.slice(L),b(e,g,l,S)}}else g=w(a,l,s,t),b(e,g,l,S)}},w=(e,l,n,u)=>(l==="."?l:l.split(".")).length===2?e.slice(n,u).search(/[.,]/)>0?e.slice(0,n)+C(l)+e.slice(u):C(l)||e:u-n===e.length?C(l):n===0?l+e.slice(u):u===e.length?e.slice(0,n)+l:e.slice(0,n)+l+e.slice(u),X=(e,l,n)=>{let u;return n-l===e.length?u="":l===0?u=e.slice(n):n===e.length?u=e.slice(0,l):u=e.slice(0,l)+e.slice(n),u},K=e=>{var h;let l=e.currentTarget,n=l.value,u=(h=l.selectionStart)!=null?h:0,s=n.length,t=null,a=(W||"").length;n=n.replace(W||"",""),u=u-a;let r=n.charAt(u);if(T(r))return u+a;let o=u-1;for(;o>=0;)if(r=n.charAt(o),T(r)){t=o+a;break}else o--;if(t!==null)l.setSelectionRange&&l.setSelectionRange(t+1,t+1);else{for(o=u;o<s;)if(r=n.charAt(o),T(r)){t=o+a;break}else o++;t!==null&&l.setSelectionRange&&l.setSelectionRange(t,t)}return t||0},Te=e=>{!i.readOnly&&e.currentTarget.value!==le()&&K(e)},Y=()=>{let e=d!=null?d:null,l=Le(e);ee(l);let n=H(e);e!==null&&e!==n&&x(null,n)},b=(e,l,n,u)=>{let s=e.currentTarget.value,t=null;l!=null&&(t=I(l),t=!t&&!i.allowEmpty?0:t,Z(e,t,n,u,l),B(e,s,t))},Me=(e,l)=>{if(l===null&&e!==null)return!0;if(l!=null){let n=typeof e=="string"?I(e):e;return l!==n}return!1},B=(e,l,n)=>{i.onChange&&Me(l,n)&&i.onChange({originalEvent:e,value:n})},H=e=>e==="-"||e==null?null:i.min!=null&&typeof i.min=="number"&&typeof e=="number"&&e<i.min?i.min:i.max!=null&&typeof i.max=="number"&&typeof e=="number"&&e>i.max?i.max:e,Le=e=>ke(e)?null:i.min!==void 0&&i.min!==null&&e!==null&&e<i.min?i.min:i.max!==void 0&&i.max!==null&&e!==null&&e>i.max?i.max:e,Z=(e,l,n,u,s)=>{var h,M,g;let t=e.currentTarget,a=(h=t.value)!=null?h:"",r=C(l),o=a.length;if(r!==s&&(r=me(r,s)),o===0){t.value=r,t.setSelectionRange&&t.setSelectionRange(0,0);let c=K(e)+(n?n.length:0);t.setSelectionRange&&t.setSelectionRange(c,c)}else{let m=(M=t.selectionStart)!=null?M:0,c=(g=t.selectionEnd)!=null?g:0;t.value=r;let R=r.length;if(u==="range-insert"){let E=I(a.slice(0,m)),S=(E!==null?E.toString():"").split("").join(`(${y})?`),L=new RegExp(S,"g");L.test(r);let De=(n!=null?n:"").split("").join(`(${y})?`),ne=new RegExp(De,"g");ne.test(r.slice(L.lastIndex)),c=L.lastIndex+ne.lastIndex,t.setSelectionRange&&t.setSelectionRange(c,c)}else if(R===o)u==="insert"||u==="delete-back-single"?t.setSelectionRange&&t.setSelectionRange(c+1,c+1):u==="delete-single"?t.setSelectionRange&&t.setSelectionRange(c-1,c-1):(u==="delete-range"||u==="spin")&&t.setSelectionRange&&t.setSelectionRange(c,c);else if(u==="delete-back-single"){let E=a.charAt(c-1),f=a.charAt(c),S=o-R,L=y?new RegExp(`[${y}]`,"g").test(f):!1;L&&S===1?c+=1:!L&&T(E)&&(c+=-1*S+1),t.setSelectionRange&&t.setSelectionRange(c,c)}else if(a==="-"&&u==="insert"){t.setSelectionRange&&t.setSelectionRange(0,0);let f=K(e)+(n?n.length:0)+1;t.setSelectionRange&&t.setSelectionRange(f,f)}else c=c+(R-o),t.setSelectionRange&&t.setSelectionRange(c,c)}t.setAttribute("aria-valuenow",String(l))},ye=e=>{var l;return!e&&!i.allowEmpty?(l=i.min)!=null?l:0:e},ee=e=>{let l=ye(e);ae([l,{value:l}])},x=(e,l)=>{if(i.onValueChange){let n;e?n=e:n={target:null},i.onValueChange({originalEvent:n,value:l})}},xe=e=>{!i.disabled&&!i.readOnly&&e.currentTarget.value!==le()&&i.highlightOnFocus&&e.currentTarget.select()},Se=e=>{let l=e.currentTarget,n=H(I(l.value));x(e,n),!i.disabled&&!i.readOnly&&i.highlightOnFocus&&Ne()},P=()=>{p.current&&clearInterval(p.current)},He=()=>i.max!==void 0&&(d!=null?d:0)>=i.max,Ce=()=>i.min!==void 0&&(d!=null?d:0)<=i.min;return Fe(()=>{P()}),Ve(()=>{let e=H(d);ee(typeof e=="number"?e:null),d!==null&&d!==e&&x(null,e)}),O(()=>{Y()},[i.locale,i.localeMatcher,i.mode,i.currency,i.currencyDisplay,i.useGrouping,i.minFractionDigits,i.maxFractionDigits,i.suffix,i.prefix]),O(()=>{Y()},[i.value,i.defaultValue]),O(()=>{i.disabled&&P()},[i.disabled]),{state:ge,onChange:z,onInput:z,onInputKeyDown:be,onInputKeyPress:Re,onInputClick:Te,onInputPaste:Ie,onInputFocus:xe,onInputBlur:Se,maxBoundry:He,minBoundry:Ce,increment:_,decrement:q,stepUp:de,stepDown:Ee,stopSpin:he}}});export{te as defaultProps,$e as useInputNumber};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/inputnumber/useInputNumber.ts","../../src/inputnumber/useInputNumber.props.ts"],"sourcesContent":["import { withHeadless } from '@primereact/core/headless';\nimport { useControlledState, useMountEffect, useNumberFormatter, useUnmountEffect, useUpdateEffect } from '@primereact/hooks';\nimport { useInputNumberProps } from '@primereact/types/shared/inputnumber';\nimport { clearSelection, getSelection, isEmpty, isNotEmpty } from '@primeuix/utils';\nimport * as React from 'react';\nimport { defaultProps } from './useInputNumber.props';\n\nexport const useInputNumber = withHeadless({\n name: 'useInputNumber',\n defaultProps,\n setup({ props }) {\n const [valueState, setValueState] = useControlledState({\n value: props.value,\n defaultValue: props.defaultValue,\n onChange: props.onValueChange\n });\n\n const formatter = useNumberFormatter({\n value: valueState,\n locale: props.locale,\n localeMatcher: props.localeMatcher,\n mode: props.mode,\n currency: props.currency,\n currencyDisplay: props.currencyDisplay,\n useGrouping: props.useGrouping,\n minFractionDigits: props.minFractionDigits,\n maxFractionDigits: props.maxFractionDigits,\n roundingMode: props.roundingMode,\n prefix: props.prefix,\n suffix: props.suffix,\n min: props.min,\n format: props.format\n });\n\n const {\n formattedValue,\n formatValue,\n parseValue,\n addWithPrecision,\n isDecimalMode,\n isNumeralChar,\n isMinusSign: isMinusSignFn,\n isDecimalSign: isDecimalSignFn,\n allowMinusSign,\n getDecimalCharIndexes,\n getCharIndexes,\n getDecimalLength,\n concatValues,\n groupChar,\n prefixChar,\n suffixChar,\n resolvedOptions\n } = formatter;\n\n const timer = React.useRef<NodeJS.Timeout | null>(null);\n const lastValue = React.useRef<string | null>(null);\n const isSpecialChar = React.useRef<boolean | null>(null);\n const valueRef = React.useRef(valueState);\n\n valueRef.current = valueState;\n\n const state = {\n value: valueState,\n formattedValue\n };\n\n const spin = (event: React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLInputElement> | React.PointerEvent<HTMLButtonElement> | null, dir: number) => {\n const step = (props.step ?? 1) * dir;\n\n if (event) {\n const currentValue = parseValue((event.currentTarget as HTMLInputElement).value) || 0;\n const newValue = validateValue(addWithPrecision(Number(currentValue), step));\n\n updateInput(event, newValue as number, null, 'spin', String(currentValue));\n updateModel(event, newValue as useInputNumberProps['value']);\n handleOnInput(event, String(currentValue), newValue as number);\n } else {\n const currentValue = valueRef.current ?? 0;\n const newValue = validateValue(addWithPrecision(Number(currentValue), step));\n\n updateModel(null, newValue as useInputNumberProps['value']);\n handleOnInput(null, String(currentValue), newValue as number);\n }\n };\n\n const repeat = (event: React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLInputElement> | React.PointerEvent<HTMLButtonElement> | null, interval: number | undefined, dir: number) => {\n if (props.readOnly) {\n return;\n }\n\n const i = interval || 500;\n\n clearTimer();\n timer.current = setTimeout(() => {\n repeat(event, 40, dir);\n }, i);\n\n spin(event, dir);\n };\n\n const increment = (event: React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLInputElement> | React.PointerEvent<HTMLButtonElement> | null, dir: number) => {\n if (!props.disabled) {\n repeat(event, undefined, dir ?? props.step ?? 1);\n event?.preventDefault();\n }\n };\n\n const decrement = (event: React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLInputElement> | React.PointerEvent<HTMLButtonElement> | null, dir: number) => {\n if (!props.disabled) {\n repeat(event, undefined, dir ?? (props.step ?? 1) * -1);\n event?.preventDefault();\n }\n };\n\n const stepUp = () => {\n increment(null, props.step ?? 1);\n };\n\n const stepDown = () => {\n decrement(null, (props.step ?? 1) * -1);\n };\n\n const stopSpin = () => {\n if (!props.disabled) {\n clearTimer();\n }\n };\n\n const onInput = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (props.disabled || props.readOnly) {\n return;\n }\n\n if (isSpecialChar.current) {\n event.currentTarget.value = lastValue.current ?? '';\n }\n\n isSpecialChar.current = false;\n };\n\n const onInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (props.readOnly) {\n return;\n }\n\n const inputElement = event.currentTarget;\n\n if (event.altKey || event.ctrlKey || event.metaKey) {\n isSpecialChar.current = true;\n lastValue.current = inputElement.value;\n\n return;\n }\n\n lastValue.current = inputElement.value;\n\n let selectionStart = inputElement.selectionStart ?? 0;\n const selectionEnd = inputElement.selectionEnd ?? 0;\n const selectionRange = selectionEnd - selectionStart;\n const inputValue = inputElement.value;\n let newValueStr = null;\n const code = event.code || event.key;\n\n switch (code) {\n case 'ArrowUp':\n spin(event, 1);\n event.preventDefault();\n break;\n\n case 'ArrowDown':\n spin(event, -1);\n event.preventDefault();\n break;\n\n case 'ArrowLeft':\n if (selectionRange > 1) {\n const cursorPosition = isNumeralChar(inputValue.charAt(selectionStart)) ? selectionStart + 1 : selectionStart + 2;\n\n event.currentTarget.setSelectionRange(cursorPosition, cursorPosition);\n } else if (!isNumeralChar(inputValue.charAt(selectionStart - 1))) {\n event.preventDefault();\n }\n\n break;\n\n case 'ArrowRight':\n if (selectionRange > 1) {\n const cursorPosition = selectionEnd - 1;\n\n event.currentTarget.setSelectionRange(cursorPosition, cursorPosition);\n } else if (!isNumeralChar(inputValue.charAt(selectionStart))) {\n event.preventDefault();\n }\n\n break;\n\n case 'Tab':\n case 'Enter':\n case 'NumpadEnter':\n newValueStr = validateValue(parseValue(inputValue)) as useInputNumberProps['value'];\n event.currentTarget.value = formatValue(newValueStr);\n event.currentTarget.setAttribute('aria-valuenow', newValueStr != null ? String(newValueStr) : '');\n updateModel(event, newValueStr);\n break;\n\n case 'Backspace': {\n event.preventDefault();\n\n if (selectionStart === selectionEnd) {\n if (selectionStart >= inputValue.length && suffixChar !== null) {\n selectionStart = inputValue.length - suffixChar.length;\n event.currentTarget.setSelectionRange(selectionStart, selectionStart);\n }\n\n const deleteChar = inputValue.charAt(selectionStart - 1);\n const { decimalCharIndex, decimalCharIndexWithoutPrefix } = getDecimalCharIndexes(inputValue);\n\n if (isNumeralChar(deleteChar)) {\n const decimalLength = getDecimalLength(inputValue);\n\n if (groupChar && new RegExp(`[${groupChar}]`, 'g').test(deleteChar)) {\n newValueStr = inputValue.slice(0, selectionStart - 2) + inputValue.slice(selectionStart - 1);\n } else if (isDecimalSignFn(deleteChar)) {\n if (decimalLength) {\n event.currentTarget.setSelectionRange(selectionStart - 1, selectionStart - 1);\n } else {\n newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);\n }\n } else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n const insertedText = isDecimalMode() && (props.minFractionDigits || 0) < decimalLength ? '' : '0';\n\n newValueStr = inputValue.slice(0, selectionStart - 1) + insertedText + inputValue.slice(selectionStart);\n } else if (decimalCharIndexWithoutPrefix === 1) {\n newValueStr = inputValue.slice(0, selectionStart - 1) + '0' + inputValue.slice(selectionStart);\n const parsed = parseValue(newValueStr);\n\n newValueStr = typeof parsed === 'number' && parsed > 0 ? newValueStr : '';\n } else {\n newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);\n }\n }\n\n updateValue(event, newValueStr as string, null, 'delete-single');\n } else {\n newValueStr = deleteRange(inputValue, selectionStart, selectionEnd);\n updateValue(event, newValueStr, null, 'delete-range');\n }\n\n break;\n }\n\n case 'Delete':\n event.preventDefault();\n\n if (selectionStart === selectionEnd) {\n const deleteChar = inputValue.charAt(selectionStart);\n const { decimalCharIndex, decimalCharIndexWithoutPrefix } = getDecimalCharIndexes(inputValue);\n\n if (isNumeralChar(deleteChar)) {\n const decimalLength = getDecimalLength(inputValue);\n\n if (groupChar && new RegExp(`[${groupChar}]`, 'g').test(deleteChar)) {\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 2);\n } else if (isDecimalSignFn(deleteChar)) {\n if (decimalLength) {\n event.currentTarget.setSelectionRange(selectionStart + 1, selectionStart + 1);\n } else {\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);\n }\n } else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n const insertedText = isDecimalMode() && (props.minFractionDigits || 0) < decimalLength ? '' : '0';\n\n newValueStr = inputValue.slice(0, selectionStart) + insertedText + inputValue.slice(selectionStart + 1);\n } else if (decimalCharIndexWithoutPrefix === 1) {\n newValueStr = inputValue.slice(0, selectionStart) + '0' + inputValue.slice(selectionStart + 1);\n const parsed = parseValue(newValueStr);\n\n newValueStr = typeof parsed === 'number' && parsed > 0 ? newValueStr : '';\n } else {\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);\n }\n }\n\n updateValue(event, newValueStr as string, null, 'delete-back-single');\n } else {\n newValueStr = deleteRange(inputValue, selectionStart, selectionEnd);\n updateValue(event, newValueStr, null, 'delete-range');\n }\n\n break;\n\n case 'Home':\n event.preventDefault();\n\n if (isNotEmpty(props.min)) {\n updateModel(event, props.min ?? 0);\n }\n\n break;\n\n case 'End':\n event.preventDefault();\n\n if (isNotEmpty(props.max)) {\n updateModel(event, props.max ?? 100);\n }\n\n break;\n\n default:\n break;\n }\n };\n\n const onInputKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (props.readOnly) {\n return;\n }\n\n const char = event.key;\n const isDecimalSign = isDecimalSignFn(char);\n const isMinusSign = isMinusSignFn(char);\n\n if (event.code !== 'Enter') {\n event.preventDefault();\n }\n\n if ((Number(char) >= 0 && Number(char) <= 9) || isMinusSign || isDecimalSign) {\n insert(event, char, { isDecimalSign, isMinusSign });\n }\n };\n\n const onInputPaste = (event: React.ClipboardEvent<HTMLInputElement>) => {\n if (props.readOnly) {\n return;\n }\n\n event.preventDefault();\n const data = (event.clipboardData || (window as Window & { clipboardData?: DataTransfer }).clipboardData)?.getData('Text');\n\n if (data) {\n const filteredData = parseValue(data);\n\n if (filteredData != null) {\n insert(event, filteredData.toString());\n }\n }\n };\n\n const insert = (event: React.KeyboardEvent<HTMLInputElement> | React.ClipboardEvent<HTMLInputElement>, text: string, sign = { isDecimalSign: false, isMinusSign: false }) => {\n const minusCharIndexOnText = text.search(/-/);\n\n if (!allowMinusSign() && minusCharIndexOnText !== -1) {\n return;\n }\n\n const selectionStart = (event.currentTarget as HTMLInputElement).selectionStart ?? 0;\n const selectionEnd = (event.currentTarget as HTMLInputElement).selectionEnd ?? 0;\n const inputValue = (event.currentTarget as HTMLInputElement).value.trim();\n const { decimalCharIndex, minusCharIndex, suffixCharIndex, currencyCharIndex } = getCharIndexes(inputValue);\n let newValueStr;\n\n if (sign.isMinusSign) {\n const isNewMinusSign = minusCharIndex === -1;\n\n if (selectionStart === 0 || selectionStart === currencyCharIndex + 1) {\n newValueStr = inputValue;\n\n if (isNewMinusSign || selectionEnd !== 0) {\n newValueStr = insertText(inputValue, text, 0, selectionEnd);\n }\n\n updateValue(event, newValueStr, text, 'insert');\n }\n } else if (sign.isDecimalSign) {\n if (decimalCharIndex > 0 && selectionStart === decimalCharIndex) {\n updateValue(event, inputValue, text, 'insert');\n } else if (decimalCharIndex > selectionStart && decimalCharIndex < selectionEnd) {\n newValueStr = insertText(inputValue, text, selectionStart, selectionEnd);\n updateValue(event, newValueStr, text, 'insert');\n } else if (decimalCharIndex === -1 && props.maxFractionDigits) {\n newValueStr = insertText(inputValue, text, selectionStart, selectionEnd);\n updateValue(event, newValueStr, text, 'insert');\n }\n } else {\n const maxFractionDigits = resolvedOptions()?.maximumFractionDigits ?? 0;\n const operation = selectionStart !== selectionEnd ? 'range-insert' : 'insert';\n\n if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n if (selectionStart + text.length - (decimalCharIndex + 1) <= maxFractionDigits) {\n const charIndex = currencyCharIndex >= selectionStart ? currencyCharIndex - 1 : suffixCharIndex >= selectionStart ? suffixCharIndex : inputValue.length;\n\n newValueStr = inputValue.slice(0, selectionStart) + text + inputValue.slice(selectionStart + text.length, charIndex) + inputValue.slice(charIndex);\n updateValue(event, newValueStr, text, operation);\n }\n } else {\n newValueStr = insertText(inputValue, text, selectionStart, selectionEnd);\n updateValue(event, newValueStr, text, operation);\n }\n }\n };\n\n const insertText = (value: string, text: string, start: number, end: number) => {\n const textSplit = text === '.' ? text : text.split('.');\n\n if (textSplit.length === 2) {\n const decimalCharIndex = value.slice(start, end).search(/[.,]/);\n\n return decimalCharIndex > 0 ? value.slice(0, start) + formatValue(text) + value.slice(end) : formatValue(text) || value;\n } else if (end - start === value.length) {\n return formatValue(text);\n } else if (start === 0) {\n return text + value.slice(end);\n } else if (end === value.length) {\n return value.slice(0, start) + text;\n } else {\n return value.slice(0, start) + text + value.slice(end);\n }\n };\n\n const deleteRange = (value: string, start: number, end: number) => {\n let newValueStr;\n\n if (end - start === value.length) newValueStr = '';\n else if (start === 0) newValueStr = value.slice(end);\n else if (end === value.length) newValueStr = value.slice(0, start);\n else newValueStr = value.slice(0, start) + value.slice(end);\n\n return newValueStr;\n };\n\n const initCursor = (event: React.SyntheticEvent<HTMLInputElement | HTMLButtonElement>) => {\n const inputEl = event.currentTarget as HTMLInputElement;\n\n let inputValue = inputEl.value;\n let selectionStart = inputEl.selectionStart ?? 0;\n const valueLength = inputValue.length;\n let index = null;\n\n // remove prefix\n const prefixLength = (prefixChar || '').length;\n\n inputValue = inputValue.replace(prefixChar || '', '');\n selectionStart = selectionStart - prefixLength;\n\n let char = inputValue.charAt(selectionStart);\n\n if (isNumeralChar(char)) {\n return selectionStart + prefixLength;\n }\n\n //left\n let i = selectionStart - 1;\n\n while (i >= 0) {\n char = inputValue.charAt(i);\n\n if (isNumeralChar(char)) {\n index = i + prefixLength;\n break;\n } else {\n i--;\n }\n }\n\n if (index !== null) {\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(index + 1, index + 1);\n } else {\n i = selectionStart;\n\n while (i < valueLength) {\n char = inputValue.charAt(i);\n\n if (isNumeralChar(char)) {\n index = i + prefixLength;\n break;\n } else {\n i++;\n }\n }\n\n if (index !== null) {\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(index, index);\n }\n }\n\n return index || 0;\n };\n\n const onInputClick = (event: React.MouseEvent<HTMLInputElement>) => {\n if (!props.readOnly && (event.currentTarget as HTMLInputElement).value !== getSelection()) {\n initCursor(event);\n }\n };\n\n const changeValue = () => {\n const _value = valueState ?? null;\n const val = validateValueByLimit(_value);\n\n updateInputValue(val);\n\n const newValue = validateValue(_value);\n\n if (_value !== null && _value !== newValue) {\n updateModel(null, newValue as useInputNumberProps['value']);\n }\n };\n\n const updateValue = (event: React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent<HTMLInputElement> | React.ClipboardEvent<HTMLInputElement>, valueStr: string, insertedValueStr: string | null, operation: string) => {\n const currentValue = (event.currentTarget as HTMLInputElement).value;\n let newValue = null;\n\n if (valueStr != null) {\n newValue = parseValue(valueStr);\n newValue = !newValue && !props.allowEmpty ? 0 : newValue;\n\n updateInput(event, newValue, insertedValueStr, operation, valueStr);\n handleOnInput(event, currentValue, newValue);\n }\n };\n\n const isValueChanged = (currentValue: string | number | null, newValue: number | string | null) => {\n if (newValue === null && currentValue !== null) {\n return true;\n }\n\n if (newValue != null) {\n const parsedCurrentValue = typeof currentValue === 'string' ? parseValue(currentValue) : currentValue;\n\n return newValue !== parsedCurrentValue;\n }\n\n return false;\n };\n\n const handleOnInput = (\n event: React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLInputElement> | React.ClipboardEvent<HTMLInputElement> | React.PointerEvent<HTMLButtonElement> | null,\n currentValue: string,\n newValue: number | string | null\n ) => {\n if (props.onChange && isValueChanged(currentValue, newValue)) {\n props.onChange({\n originalEvent: event,\n value: newValue as number\n });\n }\n };\n\n const validateValue = (value: number | string | null) => {\n if (value === '-' || value == null) {\n return null;\n }\n\n if (props.min != null && typeof props.min === 'number' && typeof value === 'number' && value < props.min) {\n return props.min;\n }\n\n if (props.max != null && typeof props.max === 'number' && typeof value === 'number' && value > props.max) {\n return props.max;\n }\n\n return value;\n };\n\n const validateValueByLimit = (value: number | null) => {\n if (isEmpty(value)) {\n return null;\n }\n\n if (props.min !== undefined && props.min !== null && value !== null && value < props.min) {\n return props.min;\n }\n\n if (props.max !== undefined && props.max !== null && value !== null && value > props.max) {\n return props.max;\n }\n\n return value;\n };\n\n const updateInput = (\n event: React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent<HTMLInputElement> | React.ClipboardEvent<HTMLInputElement> | React.MouseEvent<HTMLInputElement> | React.PointerEvent<HTMLButtonElement>,\n value: number | string | null,\n insertedValueStr: string | null,\n operation: string,\n valueStr: string\n ) => {\n const inputEl = event.currentTarget as HTMLInputElement;\n const inputValue = inputEl.value ?? '';\n\n let newValue = formatValue(value);\n const currentLength = inputValue.length;\n\n if (newValue !== valueStr) {\n newValue = concatValues(newValue, valueStr);\n }\n\n if (currentLength === 0) {\n inputEl.value = newValue;\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(0, 0);\n\n const index = initCursor(event);\n const selectionEnd = index + (insertedValueStr ? insertedValueStr.length : 0);\n\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(selectionEnd, selectionEnd);\n } else {\n const selectionStart = inputEl.selectionStart ?? 0;\n let selectionEnd = inputEl.selectionEnd ?? 0;\n\n inputEl.value = newValue;\n const newLength = newValue.length;\n\n if (operation === 'range-insert') {\n const startValue = parseValue(inputValue.slice(0, selectionStart));\n const startValueStr = startValue !== null ? startValue.toString() : '';\n const startExpr = startValueStr.split('').join(`(${groupChar})?`);\n const sRegex = new RegExp(startExpr, 'g');\n\n sRegex.test(newValue);\n\n const tExpr = (insertedValueStr ?? '').split('').join(`(${groupChar})?`);\n const tRegex = new RegExp(tExpr, 'g');\n\n tRegex.test(newValue.slice(sRegex.lastIndex));\n\n selectionEnd = sRegex.lastIndex + tRegex.lastIndex;\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(selectionEnd, selectionEnd);\n } else if (newLength === currentLength) {\n if (operation === 'insert' || operation === 'delete-back-single') {\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(selectionEnd + 1, selectionEnd + 1);\n } else if (operation === 'delete-single') {\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(selectionEnd - 1, selectionEnd - 1);\n } else if (operation === 'delete-range' || operation === 'spin') {\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(selectionEnd, selectionEnd);\n }\n } else if (operation === 'delete-back-single') {\n const prevChar = inputValue.charAt(selectionEnd - 1);\n const nextChar = inputValue.charAt(selectionEnd);\n const diff = currentLength - newLength;\n const isGroupCharacter = groupChar ? new RegExp(`[${groupChar}]`, 'g').test(nextChar) : false;\n\n if (isGroupCharacter && diff === 1) {\n selectionEnd += 1;\n } else if (!isGroupCharacter && isNumeralChar(prevChar)) {\n selectionEnd += -1 * diff + 1;\n }\n\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(selectionEnd, selectionEnd);\n } else if (inputValue === '-' && operation === 'insert') {\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(0, 0);\n\n const index = initCursor(event);\n const selectionEnd = index + (insertedValueStr ? insertedValueStr.length : 0) + 1;\n\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(selectionEnd, selectionEnd);\n } else {\n selectionEnd = selectionEnd + (newLength - currentLength);\n if (inputEl.setSelectionRange) inputEl.setSelectionRange(selectionEnd, selectionEnd);\n }\n }\n\n inputEl.setAttribute('aria-valuenow', String(value));\n };\n\n const evaluateEmpty = (newValue: useInputNumberProps['value']) => {\n return !newValue && !props.allowEmpty ? (props.min ?? 0) : newValue;\n };\n\n const updateInputValue = (newValue: useInputNumberProps['value']) => {\n const newValueEvaluated = evaluateEmpty(newValue);\n\n setValueState([\n newValueEvaluated,\n {\n value: newValueEvaluated as number\n }\n ]);\n };\n\n const updateModel = (\n event: React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLInputElement> | React.PointerEvent<HTMLButtonElement> | React.PointerEvent<HTMLButtonElement> | null,\n value: useInputNumberProps['value']\n ) => {\n if (props.onValueChange) {\n let originalEvent;\n\n if (event) {\n originalEvent = event;\n } else {\n // Create a dummy synthetic event if event is null\n originalEvent = {\n ...({} as React.FormEvent<HTMLInputElement>),\n target: null as unknown as EventTarget & HTMLInputElement\n };\n }\n\n props.onValueChange({\n originalEvent,\n value: value as number\n });\n }\n };\n\n const onInputFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n if (!props.disabled && !props.readOnly && event.currentTarget.value !== getSelection() && props.highlightOnFocus) {\n event.currentTarget.select();\n }\n };\n\n const onInputBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n const input = event.currentTarget as HTMLInputElement;\n const newValue = validateValue(parseValue(input.value)) as useInputNumberProps['value'];\n\n updateModel(event, newValue);\n\n if (!props.disabled && !props.readOnly && props.highlightOnFocus) {\n clearSelection();\n }\n };\n\n const clearTimer = () => {\n if (timer.current) {\n clearInterval(timer.current);\n }\n };\n\n const maxBoundry = () => {\n return props.max !== undefined && (valueState ?? 0) >= props.max;\n };\n\n const minBoundry = () => {\n return props.min !== undefined && (valueState ?? 0) <= props.min;\n };\n\n useUnmountEffect(() => {\n clearTimer();\n });\n\n useMountEffect(() => {\n const newValue = validateValue(valueState as number | null);\n const valueForInput = typeof newValue === 'number' ? newValue : null;\n\n updateInputValue(valueForInput);\n\n if (valueState !== null && valueState !== newValue) {\n updateModel(null, newValue as number);\n }\n });\n\n useUpdateEffect(() => {\n changeValue();\n }, [props.locale, props.localeMatcher, props.mode, props.currency, props.currencyDisplay, props.useGrouping, props.minFractionDigits, props.maxFractionDigits, props.suffix, props.prefix]);\n\n useUpdateEffect(() => {\n changeValue();\n }, [props.value, props.defaultValue]);\n\n useUpdateEffect(() => {\n if (props.disabled) {\n clearTimer();\n }\n }, [props.disabled]);\n\n return {\n state,\n // methods\n onChange: onInput,\n onInput,\n onInputKeyDown,\n onInputKeyPress,\n onInputClick,\n onInputPaste,\n onInputFocus,\n onInputBlur,\n maxBoundry,\n minBoundry,\n increment,\n decrement,\n stepUp,\n stepDown,\n stopSpin\n };\n }\n});\n","import type { useInputNumberProps } from '@primereact/types/shared/inputnumber';\n\nexport const defaultProps: useInputNumberProps = {\n value: undefined,\n defaultValue: undefined,\n format: true,\n locale: undefined,\n mode: 'decimal',\n prefix: undefined,\n suffix: undefined,\n currency: undefined,\n currencyDisplay: undefined,\n useGrouping: true,\n minFractionDigits: undefined,\n maxFractionDigits: undefined,\n roundingMode: undefined,\n min: undefined,\n max: undefined,\n step: 1,\n allowEmpty: true,\n highlightOnFocus: false,\n onValueChange: undefined,\n onChange: undefined\n};\n"],"mappings":"AAAA,OAAS,gBAAAA,OAAoB,4BAC7B,OAAS,sBAAAC,GAAoB,kBAAAC,GAAgB,sBAAAC,GAAoB,oBAAAC,GAAkB,mBAAAC,MAAuB,oBAE1G,OAAS,kBAAAC,GAAgB,gBAAAC,GAAc,WAAAC,GAAS,cAAAC,OAAkB,kBAClE,UAAYC,MAAW,QCFhB,IAAMC,GAAoC,CAC7C,MAAO,OACP,aAAc,OACd,OAAQ,GACR,OAAQ,OACR,KAAM,UACN,OAAQ,OACR,OAAQ,OACR,SAAU,OACV,gBAAiB,OACjB,YAAa,GACb,kBAAmB,OACnB,kBAAmB,OACnB,aAAc,OACd,IAAK,OACL,IAAK,OACL,KAAM,EACN,WAAY,GACZ,iBAAkB,GAClB,cAAe,OACf,SAAU,MACd,EDhBO,IAAMC,GAAiBC,GAAa,CACvC,KAAM,iBACN,aAAAC,GACA,MAAM,CAAE,MAAAC,CAAM,EAAG,CACb,GAAM,CAACC,EAAYC,EAAa,EAAIC,GAAmB,CACnD,MAAOH,EAAM,MACb,aAAcA,EAAM,aACpB,SAAUA,EAAM,aACpB,CAAC,EAEKI,GAAYC,GAAmB,CACjC,MAAOJ,EACP,OAAQD,EAAM,OACd,cAAeA,EAAM,cACrB,KAAMA,EAAM,KACZ,SAAUA,EAAM,SAChB,gBAAiBA,EAAM,gBACvB,YAAaA,EAAM,YACnB,kBAAmBA,EAAM,kBACzB,kBAAmBA,EAAM,kBACzB,aAAcA,EAAM,aACpB,OAAQA,EAAM,OACd,OAAQA,EAAM,OACd,IAAKA,EAAM,IACX,OAAQA,EAAM,MAClB,CAAC,EAEK,CACF,eAAAM,GACA,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AAM,MAAQ,SAAcC,GAAA,KAAAA,EAAc,IAAMD,EAAM,IAG3D+H,GAAa,IACR/H,EAAM,MAAQ,SAAcC,GAAA,KAAAA,EAAc,IAAMD,EAAM,IAGjE,OAAAgI,GAAiB,IAAM,CACnBrF,EAAW,CACf,CAAC,EAEDsF,GAAe,IAAM,CACjB,IAAM9F,EAAWC,EAAcnC,CAA2B,EAG1DqG,GAFsB,OAAOnE,GAAa,SAAWA,EAAW,IAElC,EAE1BlC,IAAe,MAAQA,IAAekC,GACtCG,EAAY,KAAMH,CAAkB,CAE5C,CAAC,EAED+F,EAAgB,IAAM,CAClBhC,EAAY,CAChB,EAAG,CAAClG,EAAM,OAAQA,EAAM,cAAeA,EAAM,KAAMA,EAAM,SAAUA,EAAM,gBAAiBA,EAAM,YAAaA,EAAM,kBAAmBA,EAAM,kBAAmBA,EAAM,OAAQA,EAAM,MAAM,CAAC,EAE1LkI,EAAgB,IAAM,CAClBhC,EAAY,CAChB,EAAG,CAAClG,EAAM,MAAOA,EAAM,YAAY,CAAC,EAEpCkI,EAAgB,IAAM,CACdlI,EAAM,UACN2C,EAAW,CAEnB,EAAG,CAAC3C,EAAM,QAAQ,CAAC,EAEZ,CACH,MAAA2B,GAEA,SAAUsB,EACV,QAAAA,EACA,eAAAC,GACA,gBAAAmB,GACA,aAAA2B,GACA,aAAAtB,GACA,aAAAgD,GACA,YAAAC,GACA,WAAAG,GACA,WAAAC,GACA,UAAAnF,EACA,UAAAC,EACA,OAAAC,GACA,SAAAC,GACA,SAAAC,EACJ,CACJ,CACJ,CAAC","names":["withHeadless","useControlledState","useMountEffect","useNumberFormatter","useUnmountEffect","useUpdateEffect","clearSelection","getSelection","isEmpty","isNotEmpty","React","defaultProps","useInputNumber","withHeadless","defaultProps","props","valueState","setValueState","useControlledState","formatter","useNumberFormatter","formattedValue","formatValue","parseValue","addWithPrecision","isDecimalMode","isNumeralChar","isMinusSignFn","isDecimalSignFn","allowMinusSign","getDecimalCharIndexes","getCharIndexes","getDecimalLength","concatValues","groupChar","prefixChar","suffixChar","resolvedOptions","timer","lastValue","isSpecialChar","valueRef","state","spin","event","dir","_a","_b","step","currentValue","newValue","validateValue","updateInput","updateModel","handleOnInput","repeat","interval","i","clearTimer","increment","decrement","stepUp","stepDown","stopSpin","onInput","onInputKeyDown","_c","_d","inputElement","selectionStart","selectionEnd","selectionRange","inputValue","newValueStr","cursorPosition","deleteChar","decimalCharIndex","decimalCharIndexWithoutPrefix","decimalLength","insertedText","parsed","updateValue","deleteRange","isNotEmpty","onInputKeyPress","char","isDecimalSign","isMinusSign","insert","onInputPaste","data","filteredData","text","sign","minusCharIndexOnText","minusCharIndex","suffixCharIndex","currencyCharIndex","isNewMinusSign","insertText","maxFractionDigits","operation","charIndex","value","start","end","initCursor","inputEl","valueLength","index","prefixLength","onInputClick","getSelection","changeValue","_value","val","validateValueByLimit","updateInputValue","valueStr","insertedValueStr","isValueChanged","parsedCurrentValue","isEmpty","currentLength","newLength","startValue","startExpr","sRegex","tExpr","tRegex","prevChar","nextChar","diff","isGroupCharacter","evaluateEmpty","newValueEvaluated","originalEvent","onInputFocus","onInputBlur","input","clearSelection","maxBoundry","minBoundry","useUnmountEffect","useMountEffect","useUpdateEffect"]}
|