@chayns-components/core 5.0.46 → 5.0.48

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.
Files changed (35) hide show
  1. package/AGENTS.md +60 -0
  2. package/lib/cjs/components/filter/Filter.js +24 -8
  3. package/lib/cjs/components/filter/Filter.js.map +1 -1
  4. package/lib/cjs/components/filter/filter-content/FIlterContent.js +3 -2
  5. package/lib/cjs/components/filter/filter-content/FIlterContent.js.map +1 -1
  6. package/lib/cjs/components/filter/filter-content/FilterContent.styles.js +9 -3
  7. package/lib/cjs/components/filter/filter-content/FilterContent.styles.js.map +1 -1
  8. package/lib/cjs/components/popup/Popup.js +59 -22
  9. package/lib/cjs/components/popup/Popup.js.map +1 -1
  10. package/lib/cjs/components/popup/Popup.types.js +6 -0
  11. package/lib/cjs/components/popup/Popup.types.js.map +1 -0
  12. package/lib/cjs/index.js.map +1 -1
  13. package/lib/cjs/types/filter.js +2 -1
  14. package/lib/cjs/types/filter.js.map +1 -1
  15. package/lib/esm/components/filter/Filter.js +24 -8
  16. package/lib/esm/components/filter/Filter.js.map +1 -1
  17. package/lib/esm/components/filter/filter-content/FIlterContent.js +4 -3
  18. package/lib/esm/components/filter/filter-content/FIlterContent.js.map +1 -1
  19. package/lib/esm/components/filter/filter-content/FilterContent.styles.js +8 -2
  20. package/lib/esm/components/filter/filter-content/FilterContent.styles.js.map +1 -1
  21. package/lib/esm/components/popup/Popup.js +59 -22
  22. package/lib/esm/components/popup/Popup.js.map +1 -1
  23. package/lib/esm/components/popup/Popup.types.js +2 -0
  24. package/lib/esm/components/popup/Popup.types.js.map +1 -0
  25. package/lib/esm/index.js.map +1 -1
  26. package/lib/esm/types/filter.js +2 -1
  27. package/lib/esm/types/filter.js.map +1 -1
  28. package/lib/types/components/filter/Filter.d.ts +2 -1
  29. package/lib/types/components/filter/filter-content/FIlterContent.d.ts +2 -1
  30. package/lib/types/components/filter/filter-content/FilterContent.styles.d.ts +1 -0
  31. package/lib/types/components/popup/Popup.d.ts +4 -56
  32. package/lib/types/components/popup/Popup.types.d.ts +151 -0
  33. package/lib/types/index.d.ts +1 -0
  34. package/lib/types/types/filter.d.ts +6 -1
  35. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.js","names":["_react","require","_react2","_interopRequireWildcard","_reactDom","_uuid","_popup","_AreaContextProvider","_interopRequireDefault","_PopupContentWrapper","_Popup","_element","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Popup","forwardRef","alignment","content","onShow","container","onHide","children","shouldHideOnChildrenLeave","shouldShowOnHover","shouldUseChildrenWidth","shouldScrollWithContent","shouldUseFullWidth","yOffset","shouldBeOpen","ref","coordinates","setCoordinates","useState","x","y","internalAlignment","setInternalAlignment","PopupAlignment","TopLeft","offset","setOffset","isOpen","setIsOpen","portal","setPortal","pseudoSize","setPseudoSize","newContainer","setNewContainer","contentMaxHeight","setContentMaxHeight","undefined","timeout","useRef","uuid","useUuid","height","width","measuredElement","useMeasuredClone","shouldPreventTextWrapping","popupContentRef","popupRef","useEffect","current","el","element","closest","Element","handleShow","useCallback","HORIZONTAL_PADDING","pseudoHeight","pseudoWidth","childrenHeight","left","childrenLeft","top","childrenTop","childrenWidth","getBoundingClientRect","document","body","containerHeight","containerWidth","zoomX","offsetWidth","zoomY","offsetHeight","childrenCenterX","scrollLeft","scrollTop","boundaryLeft","boundaryWidth","relativeX","shouldShowBottom","BottomLeft","BottomRight","BottomCenter","shouldForceRight","TopRight","shouldUseCenterAlignment","TopCenter","hasEnoughSpaceForCenter","isRight","newOffset","right","newX","handleReposition","window","addEventListener","removeEventListener","viewHeight","clientHeight","includes","handleChildrenClick","handleHide","handleMouseEnter","clearTimeout","handleMouseLeave","setTimeout","handleDocumentClick","event","_popupContentRef$curr","contains","target","useImperativeHandle","hide","show","createPortal","createElement","AnimatePresence","initial","key","maxHeight","onMouseLeave","onMouseEnter","shouldChangeColor","Fragment","StyledPopup","className","onClick","$shouldUseChildrenWidth","$shouldUseFullWidth","displayName","_default","exports"],"sources":["../../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, {\n forwardRef,\n ReactNode,\n ReactPortal,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useUuid } from '../../hooks/uuid';\nimport { PopupAlignment, PopupCoordinates, PopupRef } from '../../types/popup';\nimport AreaContextProvider from '../area-provider/AreaContextProvider';\nimport PopupContentWrapper from './popup-content-wrapper/PopupContentWrapper';\nimport { StyledPopup } from './Popup.styles';\nimport { useMeasuredClone } from '../../hooks/element';\n\nexport type PopupProps = {\n /**\n * The alignment of the popup. By default, the popup will calculate the best alignment.\n */\n alignment?: PopupAlignment;\n /**\n * The element over which the content of the `ContextMenu` should be displayed.\n */\n children?: ReactNode;\n /**\n * The element where the content of the `Popup` should be rendered via React Portal.\n */\n container?: Element;\n /**\n * The content that should be displayed inside the popup.\n */\n content: ReactNode;\n /**\n * Function to be executed when the content of the Context menu has been hidden.\n */\n onHide?: VoidFunction;\n /**\n * Function to be executed when the content of the Context menu has been shown.\n */\n onShow?: VoidFunction;\n /**\n * Whether the tooltip should be hidden after the children is not hovered.\n */\n shouldHideOnChildrenLeave?: boolean;\n /**\n * Whether the popup should scroll with the content.\n */\n shouldScrollWithContent?: boolean;\n /**\n * Whether the popup should be opened on hover. If not, the popup will be opened on click.\n */\n shouldShowOnHover?: boolean;\n /**\n * Whether the width of the children should be used.\n */\n shouldUseChildrenWidth?: boolean;\n /**\n * Whether the popup children should use the full width.\n */\n shouldUseFullWidth?: boolean;\n /**\n * The Y offset of the popup to the children.\n */\n yOffset?: number;\n /**\n * Whether the popup should be open. This can be used to control the popup from outside.\n */\n shouldBeOpen?: boolean;\n};\n\nconst Popup = forwardRef<PopupRef, PopupProps>(\n (\n {\n alignment,\n content,\n onShow,\n container,\n onHide,\n children,\n shouldHideOnChildrenLeave,\n shouldShowOnHover = false,\n shouldUseChildrenWidth = true,\n shouldScrollWithContent = true,\n shouldUseFullWidth = false,\n yOffset = 0,\n shouldBeOpen = false,\n },\n ref,\n ) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n\n const [internalAlignment, setInternalAlignment] = useState<PopupAlignment>(\n PopupAlignment.TopLeft,\n );\n const [offset, setOffset] = useState<number>(0);\n const [isOpen, setIsOpen] = useState(shouldBeOpen);\n const [portal, setPortal] = useState<ReactPortal>();\n const [pseudoSize, setPseudoSize] = useState<{ height: number; width: number }>();\n const [newContainer, setNewContainer] = useState<Element | null>(container ?? null);\n const [contentMaxHeight, setContentMaxHeight] = useState<number | undefined>(undefined);\n\n const timeout = useRef<number>();\n\n const uuid = useUuid();\n\n const { height, width, measuredElement } = useMeasuredClone({\n content,\n shouldPreventTextWrapping: !shouldUseChildrenWidth,\n });\n\n const popupContentRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (popupRef.current && !container) {\n const el = popupRef.current as HTMLElement;\n\n const element = el.closest('.dialog-inner, .page-provider, .tapp, body');\n\n setNewContainer(element);\n }\n }, [container]);\n\n useEffect(() => {\n if (container instanceof Element) {\n setNewContainer(container);\n }\n }, [container]);\n\n useEffect(() => {\n setPseudoSize({ height, width });\n }, [height, width]);\n\n const handleShow = useCallback(() => {\n if (popupRef.current && pseudoSize) {\n if (!newContainer) {\n return;\n }\n\n const HORIZONTAL_PADDING = 23;\n\n const { height: pseudoHeight, width: pseudoWidth } = pseudoSize;\n\n const {\n height: childrenHeight,\n left: childrenLeft,\n top: childrenTop,\n width: childrenWidth,\n } = popupRef.current.getBoundingClientRect();\n\n const element = shouldScrollWithContent ? newContainer : document.body;\n\n const {\n height: containerHeight,\n width: containerWidth,\n top,\n left,\n } = element.getBoundingClientRect();\n\n const zoomX = containerWidth / (element as HTMLElement).offsetWidth;\n const zoomY = containerHeight / (element as HTMLElement).offsetHeight;\n\n const childrenCenterX = childrenLeft + childrenWidth / 2;\n const x = (childrenCenterX - left) / zoomX + element.scrollLeft;\n const y =\n (childrenTop + childrenHeight / 2 - top) / zoomY + element.scrollTop - yOffset;\n\n // Use one coordinate space for all horizontal bounds checks.\n const boundaryLeft = element.scrollLeft;\n const boundaryWidth = containerWidth / zoomX;\n const relativeX = x - boundaryLeft;\n\n const shouldShowBottom =\n pseudoHeight > childrenTop - 25 ||\n alignment === PopupAlignment.BottomLeft ||\n alignment === PopupAlignment.BottomRight ||\n alignment === PopupAlignment.BottomCenter;\n\n const shouldForceRight = shouldShowBottom\n ? alignment === PopupAlignment.BottomRight\n : alignment === PopupAlignment.TopRight;\n\n const shouldUseCenterAlignment = shouldShowBottom\n ? alignment === PopupAlignment.BottomCenter\n : alignment === PopupAlignment.TopCenter;\n\n const hasEnoughSpaceForCenter =\n pseudoWidth / 2 <= relativeX - HORIZONTAL_PADDING &&\n pseudoWidth / 2 <= boundaryWidth - relativeX - HORIZONTAL_PADDING;\n\n if (shouldUseCenterAlignment && hasEnoughSpaceForCenter) {\n setInternalAlignment(\n shouldShowBottom ? PopupAlignment.BottomCenter : PopupAlignment.TopCenter,\n );\n setOffset(0);\n setCoordinates({\n x,\n y,\n });\n } else {\n let isRight = false;\n\n if (pseudoWidth > relativeX - HORIZONTAL_PADDING || shouldForceRight) {\n setInternalAlignment(\n shouldShowBottom ? PopupAlignment.BottomRight : PopupAlignment.TopRight,\n );\n isRight = true;\n } else {\n setInternalAlignment(\n shouldShowBottom ? PopupAlignment.BottomLeft : PopupAlignment.TopLeft,\n );\n }\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n relativeX + pseudoWidth >= boundaryWidth - HORIZONTAL_PADDING\n ? relativeX + pseudoWidth - (boundaryWidth - HORIZONTAL_PADDING)\n : 0;\n } else {\n const right = boundaryWidth - relativeX;\n\n newOffset =\n right + pseudoWidth >= boundaryWidth + HORIZONTAL_PADDING\n ? right + pseudoWidth - (boundaryWidth + HORIZONTAL_PADDING)\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX,\n y,\n });\n }\n\n setIsOpen(true);\n }\n }, [alignment, newContainer, pseudoSize, shouldScrollWithContent, yOffset]);\n\n useEffect(() => {\n if (shouldBeOpen) {\n handleShow();\n }\n }, [handleShow, shouldBeOpen]);\n\n const handleReposition = useCallback(() => {\n if (isOpen) {\n handleShow();\n }\n }, [handleShow, isOpen]);\n\n useEffect(() => {\n if (!isOpen) {\n return;\n }\n\n window.addEventListener('resize', handleReposition);\n window.addEventListener('scroll', handleReposition, true);\n\n return () => {\n window.removeEventListener('resize', handleReposition);\n window.removeEventListener('scroll', handleReposition, true);\n };\n }, [handleReposition, isOpen]);\n\n useEffect(() => {\n if (!newContainer || !popupRef.current) return;\n\n const viewHeight = newContainer.clientHeight;\n const childrenHeight = popupRef.current.getBoundingClientRect().height;\n\n if (\n [\n PopupAlignment.TopLeft,\n PopupAlignment.TopRight,\n PopupAlignment.TopCenter,\n ].includes(internalAlignment)\n ) {\n setContentMaxHeight(coordinates.y - 20);\n } else {\n setContentMaxHeight(viewHeight - childrenHeight - coordinates.y - 20);\n }\n }, [coordinates.y, internalAlignment, newContainer]);\n\n const handleChildrenClick = () => {\n handleShow();\n };\n\n const handleHide = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleMouseEnter = useCallback(() => {\n if (shouldShowOnHover) {\n window.clearTimeout(timeout.current);\n handleShow();\n }\n }, [handleShow, shouldShowOnHover]);\n\n const handleMouseLeave = useCallback(() => {\n if (!shouldShowOnHover) {\n return;\n }\n\n if (shouldHideOnChildrenLeave) {\n handleHide();\n\n return;\n }\n\n timeout.current = window.setTimeout(() => {\n handleHide();\n }, 500);\n }, [handleHide, shouldHideOnChildrenLeave, shouldShowOnHover]);\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (!popupContentRef.current?.contains(event.target as Node)) {\n handleHide();\n }\n },\n [handleHide],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow],\n );\n\n useEffect(() => {\n if (isOpen && !shouldBeOpen) {\n document.addEventListener('click', handleDocumentClick, true);\n window.addEventListener('blur', handleHide);\n\n if (typeof onShow === 'function') {\n onShow();\n }\n } else if (typeof onHide === 'function') {\n onHide();\n }\n\n return () => {\n document.removeEventListener('click', handleDocumentClick, true);\n window.removeEventListener('blur', handleHide);\n };\n }, [handleDocumentClick, handleHide, isOpen, onHide, onShow, shouldBeOpen]);\n\n useEffect(() => {\n if (!newContainer) {\n return;\n }\n\n setPortal(() =>\n createPortal(\n <AnimatePresence initial={false}>\n {isOpen && (\n <PopupContentWrapper\n width={pseudoSize?.width ?? 0}\n offset={offset}\n shouldScrollWithContent={shouldScrollWithContent}\n coordinates={coordinates}\n key={`tooltip_${uuid}`}\n maxHeight={contentMaxHeight}\n alignment={internalAlignment}\n ref={popupContentRef}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n >\n <AreaContextProvider shouldChangeColor>\n {content}\n </AreaContextProvider>\n </PopupContentWrapper>\n )}\n </AnimatePresence>,\n newContainer,\n ),\n );\n }, [\n contentMaxHeight,\n internalAlignment,\n newContainer,\n content,\n coordinates,\n handleMouseEnter,\n handleMouseLeave,\n isOpen,\n offset,\n pseudoSize?.width,\n uuid,\n shouldScrollWithContent,\n ]);\n\n return (\n <>\n {measuredElement}\n <StyledPopup\n className=\"beta-chayns-popup\"\n ref={popupRef}\n onClick={handleChildrenClick}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n $shouldUseChildrenWidth={shouldUseChildrenWidth}\n $shouldUseFullWidth={shouldUseFullWidth}\n >\n {children}\n </StyledPopup>\n {portal}\n </>\n );\n },\n);\n\nPopup.displayName = 'Popup';\n\nexport default Popup;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;A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AkJ,WAAW;IACRC,SAAS,EAAC,mBAAmB;IAC7B/G,GAAG,EAAEiC,QAAS;IACd+E,OAAO,EAAE1B,mBAAoB;IAC7BoB,YAAY,EAAEhB,gBAAiB;IAC/BiB,YAAY,EAAEnB,gBAAiB;IAC/ByB,uBAAuB,EAAEtH,sBAAuB;IAChDuH,mBAAmB,EAAErH;EAAmB,GAEvCL,QACQ,CAAC,EACbsB,MACH,CAAC;AAEX,CACJ,CAAC;AAED7B,KAAK,CAACkI,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArJ,OAAA,GAEbiB,KAAK","ignoreList":[]}
1
+ {"version":3,"file":"Popup.js","names":["_react","require","_react2","_interopRequireWildcard","_reactDom","_uuid","_popup","_AreaContextProvider","_interopRequireDefault","_PopupContentWrapper","_Popup","_element","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Popup","forwardRef","alignment","content","onShow","container","onHide","children","isOpen","shouldHideOnChildrenLeave","shouldShowOnHover","shouldUseChildrenWidth","shouldScrollWithContent","shouldUseFullWidth","yOffset","shouldBeOpen","ref","coordinates","setCoordinates","useState","x","y","internalAlignment","setInternalAlignment","PopupAlignment","TopLeft","offset","setOffset","isInternallyOpen","setIsInternallyOpen","portal","setPortal","pseudoSize","setPseudoSize","newContainer","setNewContainer","contentMaxHeight","setContentMaxHeight","undefined","timeout","useRef","previousIsVisibleRef","uuid","useUuid","isControlled","isPopupOpen","height","width","measuredElement","useMeasuredClone","shouldPreventTextWrapping","popupContentRef","popupRef","useEffect","current","el","element","closest","Element","updatePopupPosition","useCallback","HORIZONTAL_PADDING","pseudoHeight","pseudoWidth","childrenHeight","left","childrenLeft","top","childrenTop","childrenWidth","getBoundingClientRect","document","body","containerHeight","containerWidth","zoomX","offsetWidth","zoomY","offsetHeight","childrenCenterX","scrollLeft","scrollTop","boundaryLeft","boundaryWidth","relativeX","shouldShowBottom","BottomLeft","BottomRight","BottomCenter","shouldForceRight","TopRight","shouldUseCenterAlignment","TopCenter","hasEnoughSpaceForCenter","isRight","newOffset","right","newX","handleShow","handleReposition","window","addEventListener","removeEventListener","viewHeight","clientHeight","includes","handleChildrenClick","handleHide","handleMouseEnter","clearTimeout","handleMouseLeave","setTimeout","handleDocumentClick","event","_popupContentRef$curr","contains","target","useImperativeHandle","hide","show","createPortal","createElement","AnimatePresence","initial","key","maxHeight","onMouseLeave","onMouseEnter","shouldChangeColor","Fragment","StyledPopup","className","onClick","$shouldUseChildrenWidth","$shouldUseFullWidth","displayName","_default","exports"],"sources":["../../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, {\n forwardRef,\n ReactPortal,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useUuid } from '../../hooks/uuid';\nimport { PopupAlignment, PopupCoordinates, PopupRef } from '../../types/popup';\nimport AreaContextProvider from '../area-provider/AreaContextProvider';\nimport PopupContentWrapper from './popup-content-wrapper/PopupContentWrapper';\nimport { StyledPopup } from './Popup.styles';\nimport { useMeasuredClone } from '../../hooks/element';\nimport type { PopupProps } from './Popup.types';\n\nexport type { PopupProps } from './Popup.types';\n\nconst Popup = forwardRef<PopupRef, PopupProps>(\n (\n {\n alignment,\n content,\n onShow,\n container,\n onHide,\n children,\n isOpen,\n shouldHideOnChildrenLeave,\n shouldShowOnHover = false,\n shouldUseChildrenWidth = true,\n shouldScrollWithContent = true,\n shouldUseFullWidth = false,\n yOffset = 0,\n shouldBeOpen = false,\n },\n ref,\n ) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n\n const [internalAlignment, setInternalAlignment] = useState<PopupAlignment>(\n PopupAlignment.TopLeft,\n );\n const [offset, setOffset] = useState<number>(0);\n const [isInternallyOpen, setIsInternallyOpen] = useState(shouldBeOpen);\n const [portal, setPortal] = useState<ReactPortal>();\n const [pseudoSize, setPseudoSize] = useState<{ height: number; width: number }>();\n const [newContainer, setNewContainer] = useState<Element | null>(container ?? null);\n const [contentMaxHeight, setContentMaxHeight] = useState<number | undefined>(undefined);\n\n const timeout = useRef<number>();\n const previousIsVisibleRef = useRef(false);\n\n const uuid = useUuid();\n const isControlled = typeof isOpen === 'boolean';\n const isPopupOpen = isControlled ? isOpen : isInternallyOpen;\n\n const { height, width, measuredElement } = useMeasuredClone({\n content,\n shouldPreventTextWrapping: !shouldUseChildrenWidth,\n });\n\n const popupContentRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (popupRef.current && !container) {\n const el = popupRef.current as HTMLElement;\n\n const element = el.closest('.dialog-inner, .page-provider, .tapp, body');\n\n setNewContainer(element);\n }\n }, [container]);\n\n useEffect(() => {\n if (container instanceof Element) {\n setNewContainer(container);\n }\n }, [container]);\n\n useEffect(() => {\n setPseudoSize({ height, width });\n }, [height, width]);\n\n const updatePopupPosition = useCallback(() => {\n if (popupRef.current && pseudoSize) {\n if (!newContainer) {\n return;\n }\n\n const HORIZONTAL_PADDING = 23;\n\n const { height: pseudoHeight, width: pseudoWidth } = pseudoSize;\n\n const {\n height: childrenHeight,\n left: childrenLeft,\n top: childrenTop,\n width: childrenWidth,\n } = popupRef.current.getBoundingClientRect();\n\n const element = shouldScrollWithContent ? newContainer : document.body;\n\n const {\n height: containerHeight,\n width: containerWidth,\n top,\n left,\n } = element.getBoundingClientRect();\n\n const zoomX = containerWidth / (element as HTMLElement).offsetWidth;\n const zoomY = containerHeight / (element as HTMLElement).offsetHeight;\n\n const childrenCenterX = childrenLeft + childrenWidth / 2;\n const x = (childrenCenterX - left) / zoomX + element.scrollLeft;\n const y =\n (childrenTop + childrenHeight / 2 - top) / zoomY + element.scrollTop - yOffset;\n\n // Use one coordinate space for all horizontal bounds checks.\n const boundaryLeft = element.scrollLeft;\n const boundaryWidth = containerWidth / zoomX;\n const relativeX = x - boundaryLeft;\n\n const shouldShowBottom =\n pseudoHeight > childrenTop - 25 ||\n alignment === PopupAlignment.BottomLeft ||\n alignment === PopupAlignment.BottomRight ||\n alignment === PopupAlignment.BottomCenter;\n\n const shouldForceRight = shouldShowBottom\n ? alignment === PopupAlignment.BottomRight\n : alignment === PopupAlignment.TopRight;\n\n const shouldUseCenterAlignment = shouldShowBottom\n ? alignment === PopupAlignment.BottomCenter\n : alignment === PopupAlignment.TopCenter;\n\n const hasEnoughSpaceForCenter =\n pseudoWidth / 2 <= relativeX - HORIZONTAL_PADDING &&\n pseudoWidth / 2 <= boundaryWidth - relativeX - HORIZONTAL_PADDING;\n\n if (shouldUseCenterAlignment && hasEnoughSpaceForCenter) {\n setInternalAlignment(\n shouldShowBottom ? PopupAlignment.BottomCenter : PopupAlignment.TopCenter,\n );\n setOffset(0);\n setCoordinates({\n x,\n y,\n });\n } else {\n let isRight = false;\n\n if (pseudoWidth > relativeX - HORIZONTAL_PADDING || shouldForceRight) {\n setInternalAlignment(\n shouldShowBottom ? PopupAlignment.BottomRight : PopupAlignment.TopRight,\n );\n isRight = true;\n } else {\n setInternalAlignment(\n shouldShowBottom ? PopupAlignment.BottomLeft : PopupAlignment.TopLeft,\n );\n }\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n relativeX + pseudoWidth >= boundaryWidth - HORIZONTAL_PADDING\n ? relativeX + pseudoWidth - (boundaryWidth - HORIZONTAL_PADDING)\n : 0;\n } else {\n const right = boundaryWidth - relativeX;\n\n newOffset =\n right + pseudoWidth >= boundaryWidth + HORIZONTAL_PADDING\n ? right + pseudoWidth - (boundaryWidth + HORIZONTAL_PADDING)\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX,\n y,\n });\n }\n }\n }, [alignment, newContainer, pseudoSize, shouldScrollWithContent, yOffset]);\n\n const handleShow = useCallback(() => {\n updatePopupPosition();\n\n if (isControlled) {\n return;\n }\n\n setIsInternallyOpen(true);\n }, [isControlled, updatePopupPosition]);\n\n useEffect(() => {\n if (isControlled) {\n if (isOpen) {\n updatePopupPosition();\n }\n\n return;\n }\n\n if (shouldBeOpen) {\n handleShow();\n }\n }, [handleShow, isControlled, isOpen, shouldBeOpen, updatePopupPosition]);\n\n const handleReposition = useCallback(() => {\n if (isPopupOpen) {\n updatePopupPosition();\n }\n }, [isPopupOpen, updatePopupPosition]);\n\n useEffect(() => {\n if (!isPopupOpen) {\n return;\n }\n\n window.addEventListener('resize', handleReposition);\n window.addEventListener('scroll', handleReposition, true);\n\n return () => {\n window.removeEventListener('resize', handleReposition);\n window.removeEventListener('scroll', handleReposition, true);\n };\n }, [handleReposition, isPopupOpen]);\n\n useEffect(() => {\n if (!newContainer || !popupRef.current) return;\n\n const viewHeight = newContainer.clientHeight;\n const childrenHeight = popupRef.current.getBoundingClientRect().height;\n\n if (\n [\n PopupAlignment.TopLeft,\n PopupAlignment.TopRight,\n PopupAlignment.TopCenter,\n ].includes(internalAlignment)\n ) {\n setContentMaxHeight(coordinates.y - 20);\n } else {\n setContentMaxHeight(viewHeight - childrenHeight - coordinates.y - 20);\n }\n }, [coordinates.y, internalAlignment, newContainer]);\n\n const handleChildrenClick = () => {\n if (isControlled) {\n return;\n }\n\n handleShow();\n };\n\n const handleHide = useCallback(() => {\n if (isControlled) {\n return;\n }\n\n setIsInternallyOpen(false);\n }, [isControlled]);\n\n const handleMouseEnter = useCallback(() => {\n if (isControlled) {\n return;\n }\n\n if (shouldShowOnHover) {\n window.clearTimeout(timeout.current);\n handleShow();\n }\n }, [handleShow, isControlled, shouldShowOnHover]);\n\n const handleMouseLeave = useCallback(() => {\n if (isControlled) {\n return;\n }\n\n if (!shouldShowOnHover) {\n return;\n }\n\n if (shouldHideOnChildrenLeave) {\n handleHide();\n\n return;\n }\n\n timeout.current = window.setTimeout(() => {\n handleHide();\n }, 500);\n }, [handleHide, isControlled, shouldHideOnChildrenLeave, shouldShowOnHover]);\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (!popupContentRef.current?.contains(event.target as Node)) {\n handleHide();\n }\n },\n [handleHide],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow],\n );\n\n useEffect(() => {\n if (!isPopupOpen) {\n return undefined;\n }\n\n if (!isControlled && !shouldBeOpen) {\n document.addEventListener('click', handleDocumentClick, true);\n window.addEventListener('blur', handleHide);\n }\n\n return () => {\n document.removeEventListener('click', handleDocumentClick, true);\n window.removeEventListener('blur', handleHide);\n };\n }, [handleDocumentClick, handleHide, isControlled, isPopupOpen, shouldBeOpen]);\n\n useEffect(() => {\n if (previousIsVisibleRef.current === isPopupOpen) {\n return;\n }\n\n previousIsVisibleRef.current = isPopupOpen;\n\n if (isPopupOpen) {\n onShow?.();\n\n return;\n }\n\n onHide?.();\n }, [isPopupOpen, onHide, onShow]);\n\n useEffect(() => {\n if (!newContainer) {\n return;\n }\n\n setPortal(() =>\n createPortal(\n <AnimatePresence initial={false}>\n {isPopupOpen && (\n <PopupContentWrapper\n width={pseudoSize?.width ?? 0}\n offset={offset}\n shouldScrollWithContent={shouldScrollWithContent}\n coordinates={coordinates}\n key={`tooltip_${uuid}`}\n maxHeight={contentMaxHeight}\n alignment={internalAlignment}\n ref={popupContentRef}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n >\n <AreaContextProvider shouldChangeColor>\n {content}\n </AreaContextProvider>\n </PopupContentWrapper>\n )}\n </AnimatePresence>,\n newContainer,\n ),\n );\n }, [\n contentMaxHeight,\n internalAlignment,\n newContainer,\n content,\n coordinates,\n handleMouseEnter,\n handleMouseLeave,\n isPopupOpen,\n offset,\n pseudoSize?.width,\n uuid,\n shouldScrollWithContent,\n ]);\n\n return (\n <>\n {measuredElement}\n <StyledPopup\n className=\"beta-chayns-popup\"\n ref={popupRef}\n onClick={handleChildrenClick}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n $shouldUseCh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AY,EAAEhB,gBAAiB;IAC/BiB,YAAY,EAAEnB,gBAAiB;IAC/ByB,uBAAuB,EAAE1H,sBAAuB;IAChD2H,mBAAmB,EAAEzH;EAAmB,GAEvCN,QACQ,CAAC,EACbuB,MACH,CAAC;AAEX,CACJ,CAAC;AAED9B,KAAK,CAACuI,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA1J,OAAA,GAEbiB,KAAK","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=Popup.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Popup.types.js","names":[],"sources":["../../../../src/components/popup/Popup.types.ts"],"sourcesContent":["import { ReactNode } from 'react';\nimport { PopupAlignment } from '../../types/popup';\n\nexport type PopupProps = {\n /**\n * The preferred alignment of the popup relative to its trigger element.\n * @description\n * Use this prop to influence where the popup should appear around its trigger. If no alignment is provided,\n * the component automatically chooses a suitable position based on the available space.\n * @example\n * <Popup alignment={PopupAlignment.BottomRight} content=\"Details\">Open</Popup>\n * @optional\n */\n alignment?: PopupAlignment;\n /**\n * The trigger element that the popup is attached to.\n * @description\n * This content is rendered in place and acts as the interactive anchor for the popup.\n * Depending on the configured behavior, clicking or hovering this element can show or hide the popup.\n * @example\n * <Popup content=\"Details\"><button type=\"button\">Open</button></Popup>\n * @optional\n */\n children?: ReactNode;\n /**\n * The DOM element that should receive the popup portal.\n * @description\n * By default, the popup resolves a suitable container automatically. Use this prop when the popup should be rendered\n * into a specific element instead, for example to keep it inside a dialog or another scrollable area.\n * @example\n * <Popup container={document.body} content=\"Details\">Open</Popup>\n * @optional\n */\n container?: Element;\n /**\n * The content rendered inside the popup.\n * @description\n * This can be any React node, such as text, markup, or a fully custom component tree.\n * @example\n * <Popup content={<div>Additional information</div>}>Open</Popup>\n */\n content: ReactNode;\n /**\n * Fully controls whether the popup is visible.\n * @description\n * When this prop receives a boolean value, the popup becomes fully controlled from the outside.\n * Internal triggers such as click, hover, outside click, blur handling, or imperative `show` and `hide`\n * calls no longer change the visibility state. The popup is then shown only when `isOpen` is `true`\n * and hidden only when `isOpen` is `false`.\n * @example\n * <Popup isOpen={isPopupOpen} content=\"Details\">Open</Popup>\n * @optional\n */\n isOpen?: boolean;\n /**\n * Callback that is called after the popup becomes hidden.\n * @description\n * Use this callback to react to the popup closing, for example to synchronize external UI state.\n * It is called when the effective popup visibility changes from open to closed.\n * @example\n * <Popup onHide={() => console.log('Popup hidden')} content=\"Details\">Open</Popup>\n * @optional\n */\n onHide?: VoidFunction;\n /**\n * Callback that is called after the popup becomes visible.\n * @description\n * Use this callback to react to the popup opening, for example to start related UI behavior or analytics.\n * It is called when the effective popup visibility changes from closed to open.\n * @example\n * <Popup onShow={() => console.log('Popup shown')} content=\"Details\">Open</Popup>\n * @optional\n */\n onShow?: VoidFunction;\n /**\n * Hides the popup when the pointer leaves the trigger element.\n * @description\n * This prop is only relevant when `shouldShowOnHover` is enabled. When set to `true`, the popup closes immediately\n * after the pointer leaves the trigger element instead of waiting for the delayed hide behavior.\n * This prop has no effect while `isOpen` is used as a controlled prop.\n * @default false\n * @example\n * <Popup shouldShowOnHover shouldHideOnChildrenLeave content=\"Details\">Open</Popup>\n * @optional\n */\n shouldHideOnChildrenLeave?: boolean;\n /**\n * Keeps the popup aligned within the scrolling content container.\n * @description\n * When set to `true`, the popup uses the resolved container for positioning and scroll synchronization.\n * When set to `false`, it is positioned relative to the document body instead.\n * @default true\n * @example\n * <Popup shouldScrollWithContent={false} content=\"Details\">Open</Popup>\n * @optional\n */\n shouldScrollWithContent?: boolean;\n /**\n * Opens the popup when the trigger element is hovered instead of clicked.\n * @description\n * By default, the popup opens on click. Set this prop to `true` to switch to hover-based interaction.\n * This prop has no effect while `isOpen` is used as a controlled prop.\n * @default false\n * @example\n * <Popup shouldShowOnHover content=\"Details\">Open</Popup>\n * @optional\n */\n shouldShowOnHover?: boolean;\n /**\n * Uses the trigger element width as the popup width reference.\n * @description\n * When enabled, the popup measurement and layout respect the width of the trigger element.\n * Disable this when the popup should size itself more freely based on its content.\n * @default true\n * @example\n * <Popup shouldUseChildrenWidth={false} content=\"Details\">Open</Popup>\n * @optional\n */\n shouldUseChildrenWidth?: boolean;\n /**\n * Stretches the trigger element to the full available width.\n * @description\n * This affects the wrapper around the popup trigger and is useful when the trigger should behave like a block-level element.\n * @default false\n * @example\n * <Popup shouldUseFullWidth content=\"Details\">Open</Popup>\n * @optional\n */\n shouldUseFullWidth?: boolean;\n /**\n * Requests that the popup should be opened from outside.\n * @description\n * Unlike `isOpen`, this prop does not fully control visibility. It acts as an external open trigger and keeps compatibility\n * with the existing behavior, while other internal interactions may still influence the popup state.\n * Use `isOpen` when you need full external control over showing and hiding the popup.\n * @default false\n * @example\n * <Popup shouldBeOpen={shouldOpenInitially} content=\"Details\">Open</Popup>\n * @optional\n */\n shouldBeOpen?: boolean;\n /**\n * Vertical offset between the trigger element and the popup.\n * @description\n * Use this prop to fine-tune the popup position on the Y axis. Positive and negative values can be used depending on the desired spacing.\n * @default 0\n * @example\n * <Popup yOffset={8} content=\"Details\">Open</Popup>\n * @optional\n */\n yOffset?: number;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingContextMenu","_SharingBar","_SharingButton","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","_ComboBox2","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAxE,uBAAA,YAAAA,CAAAsE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAAhF,uBAAA+E,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingContextMenu","_SharingBar","_SharingButton","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","_ComboBox2","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAA","ignoreList":[]}
@@ -9,7 +9,8 @@ let FilterType = exports.FilterType = /*#__PURE__*/function (FilterType) {
9
9
  FilterType[FilterType["ONLY_FILTER"] = 1] = "ONLY_FILTER";
10
10
  FilterType[FilterType["ONLY_SORT"] = 2] = "ONLY_SORT";
11
11
  FilterType[FilterType["ONLY_CHECKBOX"] = 3] = "ONLY_CHECKBOX";
12
- FilterType[FilterType["MULTIPLE"] = 4] = "MULTIPLE";
12
+ FilterType[FilterType["ONLY_COMBOBOX"] = 4] = "ONLY_COMBOBOX";
13
+ FilterType[FilterType["MULTIPLE"] = 5] = "MULTIPLE";
13
14
  return FilterType;
14
15
  }({});
15
16
  //# sourceMappingURL=filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter.js","names":["FilterType","exports"],"sources":["../../../src/types/filter.ts"],"sourcesContent":["import { FilterButtonsProps } from '../components/filter-buttons/FilterButtons';\nimport { CheckboxProps } from '../components/checkbox/Checkbox';\n\nexport interface SearchConfig {\n onSearchChange: (search: string) => void;\n searchValue: string;\n}\n\nexport interface SortItem {\n text: string;\n id: string | number;\n}\n\nexport interface SortConfig {\n onSortChange: (item: SortItem) => void;\n selectedItem: SortItem;\n items: SortItem[];\n}\n\nexport type CheckboxConfig = CheckboxProps;\n\nexport type FilterButtonConfig = FilterButtonsProps;\n\nexport type FilterRef = {\n hide: VoidFunction;\n show: VoidFunction;\n};\n\nexport enum FilterType {\n ONLY_SEARCH,\n ONLY_FILTER,\n ONLY_SORT,\n ONLY_CHECKBOX,\n MULTIPLE,\n}\n"],"mappings":";;;;;;IA4BYA,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"filter.js","names":["FilterType","exports"],"sources":["../../../src/types/filter.ts"],"sourcesContent":["import { FilterButtonsProps } from '../components/filter-buttons/FilterButtons';\nimport { CheckboxProps } from '../components/checkbox/Checkbox';\nimport { ComboBoxProps } from '../components/combobox/ComboBox.types';\n\nexport interface SearchConfig {\n onSearchChange: (search: string) => void;\n searchValue: string;\n}\n\nexport interface SortItem {\n text: string;\n id: string | number;\n}\n\nexport interface SortConfig {\n onSortChange: (item: SortItem) => void;\n selectedItem: SortItem;\n items: SortItem[];\n}\n\nexport type CheckboxConfig = CheckboxProps;\n\nexport type FilterButtonConfig = FilterButtonsProps;\n\nexport type ComboboxConfig = ComboBoxProps & { label: string };\n\nexport type FilterRef = {\n hide: VoidFunction;\n show: VoidFunction;\n};\n\nexport enum FilterType {\n ONLY_SEARCH,\n ONLY_FILTER,\n ONLY_SORT,\n ONLY_CHECKBOX,\n ONLY_COMBOBOX,\n MULTIPLE,\n}\n"],"mappings":";;;;;;IA+BYA,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA","ignoreList":[]}
@@ -3,6 +3,7 @@ import { StyledFilter, StyledFilterContentWrapper, StyledFilterHead, StyledFilte
3
3
  import ExpandableContent from '../expandable-content/ExpandableContent';
4
4
  import Icon from '../icon/Icon';
5
5
  import FilterContent from './filter-content/FIlterContent';
6
+ import ComboBox from '../combobox/ComboBox';
6
7
  import { FilterType } from '../../types/filter';
7
8
  import SearchInput from '../search-input/SearchInput';
8
9
  import ContextMenu from '../context-menu/ContextMenu';
@@ -18,6 +19,7 @@ const Filter = /*#__PURE__*/forwardRef(({
18
19
  shouldShowRoundedHoverEffect = false,
19
20
  filterButtonConfig,
20
21
  checkboxConfig,
22
+ comboboxConfig,
21
23
  onActiveChange,
22
24
  rightIcons
23
25
  }, ref) => {
@@ -35,20 +37,23 @@ const Filter = /*#__PURE__*/forwardRef(({
35
37
  const searchRef = useRef(null);
36
38
  const contextMenuRef = useRef(null);
37
39
  const type = useMemo(() => {
38
- if (filterButtonConfig && !searchConfig && !sortConfig && !checkboxConfig) {
40
+ if (filterButtonConfig && !searchConfig && !sortConfig && !checkboxConfig && !comboboxConfig) {
39
41
  return FilterType.ONLY_FILTER;
40
42
  }
41
- if (!filterButtonConfig && !searchConfig && sortConfig && !checkboxConfig) {
43
+ if (!filterButtonConfig && !searchConfig && sortConfig && !checkboxConfig && !comboboxConfig) {
42
44
  return FilterType.ONLY_SORT;
43
45
  }
44
- if (!filterButtonConfig && searchConfig && !sortConfig && !checkboxConfig) {
46
+ if (!filterButtonConfig && searchConfig && !sortConfig && !checkboxConfig && !comboboxConfig) {
45
47
  return FilterType.ONLY_SEARCH;
46
48
  }
47
- if (!filterButtonConfig && !searchConfig && !sortConfig && checkboxConfig) {
49
+ if (!filterButtonConfig && !searchConfig && !sortConfig && checkboxConfig && !comboboxConfig) {
48
50
  return FilterType.ONLY_CHECKBOX;
49
51
  }
52
+ if (!filterButtonConfig && !searchConfig && !sortConfig && !checkboxConfig && comboboxConfig) {
53
+ return FilterType.ONLY_COMBOBOX;
54
+ }
50
55
  return FilterType.MULTIPLE;
51
- }, [checkboxConfig, filterButtonConfig, searchConfig, sortConfig]);
56
+ }, [checkboxConfig, comboboxConfig, filterButtonConfig, searchConfig, sortConfig]);
52
57
  const icons = useMemo(() => {
53
58
  switch (type) {
54
59
  case FilterType.ONLY_FILTER:
@@ -166,6 +171,16 @@ const Filter = /*#__PURE__*/forwardRef(({
166
171
  })
167
172
  }));
168
173
  }, [sortConfig]);
174
+ const comboboxElement = useMemo(() => {
175
+ if (!comboboxConfig) {
176
+ return null;
177
+ }
178
+ return (
179
+ /*#__PURE__*/
180
+ // eslint-disable-next-line react/jsx-props-no-spreading
181
+ React.createElement(ComboBox, comboboxConfig)
182
+ );
183
+ }, [comboboxConfig]);
169
184
  return useMemo(() => /*#__PURE__*/React.createElement(StyledFilter, {
170
185
  ref: filterRef
171
186
  }, /*#__PURE__*/React.createElement(StyledFilterHead, null, ! /*#__PURE__*/isValidElement(headline) ? /*#__PURE__*/React.createElement(StyledFilterHeadline, {
@@ -197,7 +212,7 @@ const Filter = /*#__PURE__*/forwardRef(({
197
212
  }, iconElement), type === FilterType.ONLY_CHECKBOX && checkboxConfig &&
198
213
  /*#__PURE__*/
199
214
  // eslint-disable-next-line react/jsx-props-no-spreading
200
- React.createElement(Checkbox, checkboxConfig)), [FilterType.MULTIPLE, FilterType.ONLY_FILTER].includes(type) && /*#__PURE__*/React.createElement(StyledFilterContentWrapper, {
215
+ React.createElement(Checkbox, checkboxConfig), type === FilterType.ONLY_COMBOBOX && comboboxElement), [FilterType.MULTIPLE, FilterType.ONLY_FILTER].includes(type) && /*#__PURE__*/React.createElement(StyledFilterContentWrapper, {
201
216
  ref: contentRef
202
217
  }, /*#__PURE__*/React.createElement(ExpandableContent, {
203
218
  isOpen: isOpen,
@@ -207,8 +222,9 @@ const Filter = /*#__PURE__*/forwardRef(({
207
222
  searchConfig: searchConfig,
208
223
  filterButtonConfig: filterButtonConfig,
209
224
  sortConfig: sortConfig,
210
- checkboxConfig: checkboxConfig
211
- })))), [headline, isSearchActive, type, rightIcons, iconElement, backgroundDistance, backgroundElement, searchConfig, sortConfig, sortItems, checkboxConfig, isOpen, shouldFocus, filterButtonConfig, shouldShowRoundedHoverEffect]);
225
+ checkboxConfig: checkboxConfig,
226
+ comboboxConfig: comboboxConfig
227
+ })))), [headline, isSearchActive, type, rightIcons, iconElement, backgroundDistance, backgroundElement, searchConfig, sortConfig, sortItems, checkboxConfig, isOpen, shouldFocus, filterButtonConfig, comboboxConfig, comboboxElement, shouldShowRoundedHoverEffect]);
212
228
  });
213
229
  Filter.displayName = 'Filter';
214
230
  export default Filter;
@@ -1 +1 @@
1
- {"version":3,"file":"Filter.js","names":["React","forwardRef","isValidElement","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","StyledFilter","StyledFilterContentWrapper","StyledFilterHead","StyledFilterHeadline","StyledFilterHeadlineElement","StyledFilterIcon","StyledFilterIconWrapper","StyledFilterSearch","StyledMotionFilterBackground","ExpandableContent","Icon","FilterContent","FilterType","SearchInput","ContextMenu","Checkbox","Filter","headline","searchConfig","sortConfig","shouldAutoFocus","shouldShowRoundedHoverEffect","filterButtonConfig","checkboxConfig","onActiveChange","rightIcons","ref","isOpen","setIsOpen","isSearchActive","setIsSearchActive","shouldFocus","setShouldFocus","backgroundDistance","setBackgroundDistance","backgroundCoordinates","setBackgroundCoordinates","top","left","contentRef","iconRef","filterRef","searchRef","contextMenuRef","type","ONLY_FILTER","ONLY_SORT","ONLY_SEARCH","ONLY_CHECKBOX","MULTIPLE","icons","handleHide","current","hide","focus","window","setTimeout","handleShow","show","handleIconClick","iconRect","getBoundingClientRect","filterRect","contentRect","relativeTop","bottom","relativeLeft","iconElement","createElement","onClick","$isOpen","$shouldShowRoundedHoverEffect","size","backgroundElement","$top","$left","animate","height","transition","duration","delay","sortItems","selectedItem","onSortChange","items","map","id","text","key","toString","isSelected","$isSearchActive","includes","Fragment","rIcons","isActive","value","searchValue","onChange","ev","onSearchChange","target","startDelay","displayName"],"sources":["../../../../src/components/filter/Filter.tsx"],"sourcesContent":["import React, {\n forwardRef,\n isValidElement,\n ReactNode,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n StyledFilter,\n StyledFilterContentWrapper,\n StyledFilterHead,\n StyledFilterHeadline,\n StyledFilterHeadlineElement,\n StyledFilterIcon,\n StyledFilterIconWrapper,\n StyledFilterSearch,\n StyledMotionFilterBackground,\n} from './Filter.styles';\nimport ExpandableContent from '../expandable-content/ExpandableContent';\nimport Icon from '../icon/Icon';\nimport FilterContent from './filter-content/FIlterContent';\nimport {\n CheckboxConfig,\n FilterButtonConfig,\n FilterRef,\n FilterType,\n SearchConfig,\n SortConfig,\n} from '../../types/filter';\nimport SearchInput from '../search-input/SearchInput';\nimport ContextMenu from '../context-menu/ContextMenu';\nimport Checkbox from '../checkbox/Checkbox';\nimport { InputRef } from '../input/Input';\nimport type { ContextMenuItem, ContextMenuRef } from '../context-menu/ContextMenu.types';\n\nexport interface FilterRightIcon {\n icons: string[];\n onClick: VoidFunction;\n}\n\n//\nexport type FilterProps = {\n headline: ReactNode;\n searchConfig?: SearchConfig;\n filterButtonConfig?: FilterButtonConfig;\n sortConfig?: SortConfig;\n checkboxConfig?: CheckboxConfig;\n onActiveChange?: (isActive: boolean) => void;\n shouldShowRoundedHoverEffect?: boolean;\n rightIcons?: FilterRightIcon[];\n shouldAutoFocus?: boolean;\n};\n\nconst Filter = forwardRef<FilterRef, FilterProps>(\n (\n {\n headline,\n searchConfig,\n sortConfig,\n shouldAutoFocus = false,\n shouldShowRoundedHoverEffect = false,\n filterButtonConfig,\n checkboxConfig,\n onActiveChange,\n rightIcons,\n },\n ref,\n ) => {\n const [isOpen, setIsOpen] = useState(false);\n const [isSearchActive, setIsSearchActive] = useState(false);\n const [shouldFocus, setShouldFocus] = useState(false);\n const [backgroundDistance, setBackgroundDistance] = useState(0);\n const [backgroundCoordinates, setBackgroundCoordinates] = useState({ top: 0, left: 0 });\n\n const contentRef = useRef<HTMLDivElement | null>(null);\n const iconRef = useRef<HTMLDivElement | null>(null);\n const filterRef = useRef<HTMLDivElement | null>(null);\n const searchRef = useRef<InputRef | null>(null);\n\n const contextMenuRef = useRef<ContextMenuRef>(null);\n\n const type = useMemo(() => {\n if (filterButtonConfig && !searchConfig && !sortConfig && !checkboxConfig) {\n return FilterType.ONLY_FILTER;\n }\n\n if (!filterButtonConfig && !searchConfig && sortConfig && !checkboxConfig) {\n return FilterType.ONLY_SORT;\n }\n\n if (!filterButtonConfig && searchConfig && !sortConfig && !checkboxConfig) {\n return FilterType.ONLY_SEARCH;\n }\n\n if (!filterButtonConfig && !searchConfig && !sortConfig && checkboxConfig) {\n return FilterType.ONLY_CHECKBOX;\n }\n\n return FilterType.MULTIPLE;\n }, [checkboxConfig, filterButtonConfig, searchConfig, sortConfig]);\n\n const icons = useMemo(() => {\n switch (type) {\n case FilterType.ONLY_FILTER:\n return ['fa fa-filter'];\n case FilterType.ONLY_SORT:\n return ['fa fa-arrow-up-arrow-down'];\n default:\n return ['fa fa-search'];\n }\n }, [type]);\n\n useEffect(() => {\n if (typeof onActiveChange === 'function') {\n onActiveChange(isOpen);\n }\n }, [isOpen, onActiveChange]);\n\n const handleHide = useCallback(() => {\n setIsOpen(false);\n\n if (type === FilterType.ONLY_SORT && contextMenuRef.current) {\n contextMenuRef.current.hide();\n }\n\n if (type === FilterType.ONLY_SEARCH) {\n setIsSearchActive(false);\n }\n }, [type]);\n\n useEffect(() => {\n if (shouldFocus) {\n searchRef.current?.focus();\n\n window.setTimeout(() => {\n setShouldFocus(false);\n }, 200);\n }\n }, [shouldFocus]);\n\n const handleShow = useCallback(() => {\n setIsOpen(true);\n\n if (shouldAutoFocus) {\n setShouldFocus(true);\n }\n\n if (type === FilterType.ONLY_SORT && contextMenuRef.current) {\n contextMenuRef.current.hide();\n }\n\n if (type === FilterType.ONLY_SEARCH) {\n setIsSearchActive(true);\n }\n }, [shouldAutoFocus, type]);\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow],\n );\n\n const handleIconClick = useCallback(() => {\n if (isOpen) {\n handleHide();\n } else {\n handleShow();\n }\n }, [handleHide, handleShow, isOpen]);\n\n useEffect(() => {\n if (headline && iconRef.current && contentRef.current && filterRef.current) {\n const iconRect = iconRef.current.getBoundingClientRect();\n const filterRect = filterRef.current.getBoundingClientRect();\n const contentRect = contentRef.current.getBoundingClientRect();\n\n const relativeTop = iconRect.bottom - filterRect.top;\n const relativeLeft = iconRect.left - filterRect.left;\n\n setBackgroundDistance(contentRect.top - iconRect.bottom);\n setBackgroundCoordinates({\n top: relativeTop,\n left: relativeLeft,\n });\n } else {\n setBackgroundDistance(0);\n setBackgroundCoordinates({ top: 0, left: 0 });\n }\n }, [headline]);\n\n const iconElement = useMemo(\n () => (\n <StyledFilterIcon\n onClick={handleIconClick}\n $isOpen={isOpen}\n ref={iconRef}\n $shouldShowRoundedHoverEffect={shouldShowRoundedHoverEffect}\n >\n <Icon icons={icons} size={18} />\n </StyledFilterIcon>\n ),\n [handleIconClick, icons, isOpen, shouldShowRoundedHoverEffect],\n );\n\n const backgroundElement = useMemo(\n () => (\n <StyledMotionFilterBackground\n $top={backgroundCoordinates.top}\n $left={backgroundCoordinates.left}\n animate={{ height: isOpen ? `${backgroundDistance}px` : 0 }}\n transition={{ duration: 0.1, delay: isOpen ? 0 : 0.2 }}\n />\n ),\n [backgroundDistance, isOpen, backgroundCoordinates],\n );\n\n const sortItems: ContextMenuItem[] = useMemo(() => {\n if (!sortConfig) {\n return [];\n }\n\n const { selectedItem, onSortChange } = sortConfig;\n\n return sortConfig.items.map(({ id, text }) => ({\n text,\n key: id.toString(),\n isSelected: id === selectedItem.id,\n icons: id === selectedItem.id ? ['fas fa-circle-small'] : [],\n onClick: () => onSortChange({ text, id }),\n }));\n }, [sortConfig]);\n\n return useMemo(\n () => (\n <StyledFilter ref={filterRef}>\n <StyledFilterHead>\n {!isValidElement(headline) ? (\n <StyledFilterHeadline $isSearchActive={isSearchActive}>\n {headline}\n </StyledFilterHeadline>\n ) : (\n <StyledFilterHeadlineElement $isSearchActive={isSearchActive}>\n {headline}\n </StyledFilterHeadlineElement>\n )}\n {[FilterType.MULTIPLE, FilterType.ONLY_FILTER].includes(type) && (\n <>\n <StyledFilterIconWrapper>\n {rightIcons &&\n rightIcons.map(({ icons: rIcons, onClick }) => (\n <StyledFilterIcon\n onClick={onClick}\n $isOpen={false}\n $shouldShowRoundedHoverEffect={\n shouldShowRoundedHoverEffect\n }\n >\n <Icon icons={rIcons} size={18} />\n </StyledFilterIcon>\n ))}\n {iconElement}\n </StyledFilterIconWrapper>\n {backgroundDistance > 0 && backgroundElement}\n </>\n )}\n {type === FilterType.ONLY_SEARCH && searchConfig && (\n <StyledFilterSearch>\n <SearchInput\n onActiveChange={(isActive) => {\n setIsSearchActive(isActive);\n setIsOpen(isActive);\n }}\n ref={searchRef}\n isActive={isSearchActive}\n value={searchConfig.searchValue}\n onChange={(ev) => searchConfig.onSearchChange(ev.target.value)}\n />\n </StyledFilterSearch>\n )}\n {type === FilterType.ONLY_SORT && sortConfig && (\n <ContextMenu ref={contextMenuRef} items={sortItems}>\n {iconElement}\n </ContextMenu>\n )}\n {type === FilterType.ONLY_CHECKBOX && checkboxConfig && (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <Checkbox {...checkboxConfig} />\n )}\n </StyledFilterHead>\n {[FilterType.MULTIPLE, FilterType.ONLY_FILTER].includes(type) && (\n <StyledFilterContentWrapper ref={contentRef}>\n <ExpandableContent\n isOpen={isOpen}\n startDelay={backgroundDistance > 0 ? 0.1 : 0}\n >\n <FilterContent\n shouldAutoFocus={shouldFocus}\n searchConfig={searchConfig}\n filterButtonConfig={filterButtonConfig}\n sortConfig={sortConfig}\n checkboxConfig={checkboxConfig}\n />\n </ExpandableContent>\n </StyledFilterContentWrapper>\n )}\n </StyledFilter>\n ),\n [\n headline,\n isSearchActive,\n type,\n rightIcons,\n iconElement,\n backgroundDistance,\n backgroundElement,\n searchConfig,\n sortConfig,\n sortItems,\n checkboxConfig,\n isOpen,\n shouldFocus,\n filterButtonConfig,\n shouldShowRoundedHoverEffect,\n ],\n );\n },\n);\n\nFilter.displayName = 'Filter';\n\nexport default Filter;\n"],"mappings":"AAAA,OAAOA,KAAK,IACRC,UAAU,EACVC,cAAc,EAEdC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SACIC,YAAY,EACZC,0BAA0B,EAC1BC,gBAAgB,EAChBC,oBAAoB,EACpBC,2BAA2B,E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,CAACuF,WAAW,GAAG,QAAQ;AAE7B,eAAevF,MAAM","ignoreList":[]}
1
+ {"version":3,"file":"Filter.js","names":["React","forwardRef","isValidElement","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","StyledFilter","StyledFilterContentWrapper","StyledFilterHead","StyledFilterHeadline","StyledFilterHeadlineElement","StyledFilterIcon","StyledFilterIconWrapper","StyledFilterSearch","StyledMotionFilterBackground","ExpandableContent","Icon","FilterContent","ComboBox","FilterType","SearchInput","ContextMenu","Checkbox","Filter","headline","searchConfig","sortConfig","shouldAutoFocus","shouldShowRoundedHoverEffect","filterButtonConfig","checkboxConfig","comboboxConfig","onActiveChange","rightIcons","ref","isOpen","setIsOpen","isSearchActive","setIsSearchActive","shouldFocus","setShouldFocus","backgroundDistance","setBackgroundDistance","backgroundCoordinates","setBackgroundCoordinates","top","left","contentRef","iconRef","filterRef","searchRef","contextMenuRef","type","ONLY_FILTER","ONLY_SORT","ONLY_SEARCH","ONLY_CHECKBOX","ONLY_COMBOBOX","MULTIPLE","icons","handleHide","current","hide","focus","window","setTimeout","handleShow","show","handleIconClick","iconRect","getBoundingClientRect","filterRect","contentRect","relativeTop","bottom","relativeLeft","iconElement","createElement","onClick","$isOpen","$shouldShowRoundedHoverEffect","size","backgroundElement","$top","$left","animate","height","transition","duration","delay","sortItems","selectedItem","onSortChange","items","map","id","text","key","toString","isSelected","comboboxElement","$isSearchActive","includes","Fragment","rIcons","isActive","value","searchValue","onChange","ev","onSearchChange","target","startDelay","displayName"],"sources":["../../../../src/components/filter/Filter.tsx"],"sourcesContent":["import React, {\n forwardRef,\n isValidElement,\n ReactNode,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n StyledFilter,\n StyledFilterContentWrapper,\n StyledFilterHead,\n StyledFilterHeadline,\n StyledFilterHeadlineElement,\n StyledFilterIcon,\n StyledFilterIconWrapper,\n StyledFilterSearch,\n StyledMotionFilterBackground,\n} from './Filter.styles';\nimport ExpandableContent from '../expandable-content/ExpandableContent';\nimport Icon from '../icon/Icon';\nimport FilterContent from './filter-content/FIlterContent';\nimport ComboBox from '../combobox/ComboBox';\nimport {\n CheckboxConfig,\n ComboboxConfig,\n FilterButtonConfig,\n FilterRef,\n FilterType,\n SearchConfig,\n SortConfig,\n} from '../../types/filter';\nimport SearchInput from '../search-input/SearchInput';\nimport ContextMenu from '../context-menu/ContextMenu';\nimport Checkbox from '../checkbox/Checkbox';\nimport { InputRef } from '../input/Input';\nimport type { ContextMenuItem, ContextMenuRef } from '../context-menu/ContextMenu.types';\n\nexport interface FilterRightIcon {\n icons: string[];\n onClick: VoidFunction;\n}\n\n//\nexport type FilterProps = {\n headline: ReactNode;\n searchConfig?: SearchConfig;\n filterButtonConfig?: FilterButtonConfig;\n sortConfig?: SortConfig;\n checkboxConfig?: CheckboxConfig;\n comboboxConfig?: ComboboxConfig;\n onActiveChange?: (isActive: boolean) => void;\n shouldShowRoundedHoverEffect?: boolean;\n rightIcons?: FilterRightIcon[];\n shouldAutoFocus?: boolean;\n};\n\nconst Filter = forwardRef<FilterRef, FilterProps>(\n (\n {\n headline,\n searchConfig,\n sortConfig,\n shouldAutoFocus = false,\n shouldShowRoundedHoverEffect = false,\n filterButtonConfig,\n checkboxConfig,\n comboboxConfig,\n onActiveChange,\n rightIcons,\n },\n ref,\n ) => {\n const [isOpen, setIsOpen] = useState(false);\n const [isSearchActive, setIsSearchActive] = useState(false);\n const [shouldFocus, setShouldFocus] = useState(false);\n const [backgroundDistance, setBackgroundDistance] = useState(0);\n const [backgroundCoordinates, setBackgroundCoordinates] = useState({ top: 0, left: 0 });\n\n const contentRef = useRef<HTMLDivElement | null>(null);\n const iconRef = useRef<HTMLDivElement | null>(null);\n const filterRef = useRef<HTMLDivElement | null>(null);\n const searchRef = useRef<InputRef | null>(null);\n\n const contextMenuRef = useRef<ContextMenuRef>(null);\n\n const type = useMemo(() => {\n if (\n filterButtonConfig &&\n !searchConfig &&\n !sortConfig &&\n !checkboxConfig &&\n !comboboxConfig\n ) {\n return FilterType.ONLY_FILTER;\n }\n\n if (\n !filterButtonConfig &&\n !searchConfig &&\n sortConfig &&\n !checkboxConfig &&\n !comboboxConfig\n ) {\n return FilterType.ONLY_SORT;\n }\n\n if (\n !filterButtonConfig &&\n searchConfig &&\n !sortConfig &&\n !checkboxConfig &&\n !comboboxConfig\n ) {\n return FilterType.ONLY_SEARCH;\n }\n\n if (\n !filterButtonConfig &&\n !searchConfig &&\n !sortConfig &&\n checkboxConfig &&\n !comboboxConfig\n ) {\n return FilterType.ONLY_CHECKBOX;\n }\n\n if (\n !filterButtonConfig &&\n !searchConfig &&\n !sortConfig &&\n !checkboxConfig &&\n comboboxConfig\n ) {\n return FilterType.ONLY_COMBOBOX;\n }\n\n return FilterType.MULTIPLE;\n }, [checkboxConfig, comboboxConfig, filterButtonConfig, searchConfig, sortConfig]);\n\n const icons = useMemo(() => {\n switch (type) {\n case FilterType.ONLY_FILTER:\n return ['fa fa-filter'];\n case FilterType.ONLY_SORT:\n return ['fa fa-arrow-up-arrow-down'];\n default:\n return ['fa fa-search'];\n }\n }, [type]);\n\n useEffect(() => {\n if (typeof onActiveChange === 'function') {\n onActiveChange(isOpen);\n }\n }, [isOpen, onActiveChange]);\n\n const handleHide = useCallback(() => {\n setIsOpen(false);\n\n if (type === FilterType.ONLY_SORT && contextMenuRef.current) {\n contextMenuRef.current.hide();\n }\n\n if (type === FilterType.ONLY_SEARCH) {\n setIsSearchActive(false);\n }\n }, [type]);\n\n useEffect(() => {\n if (shouldFocus) {\n searchRef.current?.focus();\n\n window.setTimeout(() => {\n setShouldFocus(false);\n }, 200);\n }\n }, [shouldFocus]);\n\n const handleShow = useCallback(() => {\n setIsOpen(true);\n\n if (shouldAutoFocus) {\n setShouldFocus(true);\n }\n\n if (type === FilterType.ONLY_SORT && contextMenuRef.current) {\n contextMenuRef.current.hide();\n }\n\n if (type === FilterType.ONLY_SEARCH) {\n setIsSearchActive(true);\n }\n }, [shouldAutoFocus, type]);\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow],\n );\n\n const handleIconClick = useCallback(() => {\n if (isOpen) {\n handleHide();\n } else {\n handleShow();\n }\n }, [handleHide, handleShow, isOpen]);\n\n useEffect(() => {\n if (headline && iconRef.current && contentRef.current && filterRef.current) {\n const iconRect = iconRef.current.getBoundingClientRect();\n const filterRect = filterRef.current.getBoundingClientRect();\n const contentRect = contentRef.current.getBoundingClientRect();\n\n const relativeTop = iconRect.bottom - filterRect.top;\n const relativeLeft = iconRect.left - filterRect.left;\n\n setBackgroundDistance(contentRect.top - iconRect.bottom);\n setBackgroundCoordinates({\n top: relativeTop,\n left: relativeLeft,\n });\n } else {\n setBackgroundDistance(0);\n setBackgroundCoordinates({ top: 0, left: 0 });\n }\n }, [headline]);\n\n const iconElement = useMemo(\n () => (\n <StyledFilterIcon\n onClick={handleIconClick}\n $isOpen={isOpen}\n ref={iconRef}\n $shouldShowRoundedHoverEffect={shouldShowRoundedHoverEffect}\n >\n <Icon icons={icons} size={18} />\n </StyledFilterIcon>\n ),\n [handleIconClick, icons, isOpen, shouldShowRoundedHoverEffect],\n );\n\n const backgroundElement = useMemo(\n () => (\n <StyledMotionFilterBackground\n $top={backgroundCoordinates.top}\n $left={backgroundCoordinates.left}\n animate={{ height: isOpen ? `${backgroundDistance}px` : 0 }}\n transition={{ duration: 0.1, delay: isOpen ? 0 : 0.2 }}\n />\n ),\n [backgroundDistance, isOpen, backgroundCoordinates],\n );\n\n const sortItems: ContextMenuItem[] = useMemo(() => {\n if (!sortConfig) {\n return [];\n }\n\n const { selectedItem, onSortChange } = sortConfig;\n\n return sortConfig.items.map(({ id, text }) => ({\n text,\n key: id.toString(),\n isSelected: id === selectedItem.id,\n icons: id === selectedItem.id ? ['fas fa-circle-small'] : [],\n onClick: () => onSortChange({ text, id }),\n }));\n }, [sortConfig]);\n\n const comboboxElement = useMemo(() => {\n if (!comboboxConfig) {\n return null;\n }\n\n return (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <ComboBox {...comboboxConfig} />\n );\n }, [comboboxConfig]);\n\n return useMemo(\n () => (\n <StyledFilter ref={filterRef}>\n <StyledFilterHead>\n {!isValidElement(headline) ? (\n <StyledFilterHeadline $isSearchActive={isSearchActive}>\n {headline}\n </StyledFilterHeadline>\n ) : (\n <StyledFilterHeadlineElement $isSearchActive={isSearchActive}>\n {headline}\n </StyledFilterHeadlineElement>\n )}\n {[FilterType.MULTIPLE, FilterType.ONLY_FILTER].includes(type) && (\n <>\n <StyledFilterIconWrapper>\n {rightIcons &&\n rightIcons.map(({ icons: rIcons, onClick }) => (\n <StyledFilterIcon\n onClick={onClick}\n $isOpen={false}\n $shouldShowRoundedHoverEffect={\n shouldShowRoundedHoverEffect\n }\n >\n <Icon icons={rIcons} size={18} />\n </StyledFilterIcon>\n ))}\n {iconElement}\n </StyledFilterIconWrapper>\n {backgroundDistance > 0 && backgroundElement}\n </>\n )}\n {type === FilterType.ONLY_SEARCH && searchConfig && (\n <StyledFilterSearch>\n <SearchInput\n onActiveChange={(isActive) => {\n setIsSearchActive(isActive);\n setIsOpen(isActive);\n }}\n ref={searchRef}\n isActive={isSearchActive}\n value={searchConfig.searchValue}\n onChange={(ev) => searchConfig.onSearchChange(ev.target.value)}\n />\n </StyledFilterSearch>\n )}\n {type === FilterType.ONLY_SORT && sortConfig && (\n <ContextMenu ref={contextMenuRef} items={sortItems}>\n {iconElement}\n </ContextMenu>\n )}\n {type === FilterType.ONLY_CHECKBOX && checkboxConfig && (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <Checkbox {...checkboxConfig} />\n )}\n {type === FilterType.ONLY_COMBOBOX && comboboxElement}\n </StyledFilterHead>\n {[FilterType.MULTIPLE, FilterType.ONLY_FILTER].includes(type) && (\n <StyledFilterContentWrapper ref={contentRef}>\n <ExpandableContent\n isOpen={isOpen}\n startDelay={backgroundDistance > 0 ? 0.1 : 0}\n >\n <FilterContent\n shouldAutoFocus={shouldFocus}\n searchConfig={searchConfig}\n filterButtonConfig={filterButtonConfig}\n sortConfig={sortConfig}\n checkboxConfig={checkboxConfig}\n comboboxConfig={comboboxConfig}\n />\n </ExpandableContent>\n </StyledFilterContentWrapper>\n )}\n </StyledFilter>\n ),\n [\n headline,\n isSearchActive,\n type,\n rightIcons,\n iconElement,\n backgroundDistance,\n backgroundElement,\n searchConfig,\n sortConfig,\n sortItems,\n checkboxConfig,\n isOpen,\n shouldFocus,\n filterButtonConfig,\n comboboxConfig,\n comboboxElement,\n shouldShowRoundedHoverEffect,\n ],\n );\n },\n);\n\nFilter.displayName = 'Filter';\n\nexport default Filter;\n"],"mappings":"AAAA,OAAOA,KAAK,IACRC,UAAU,EACVC,cAAc,EAEdC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SACIC,YAAY,EACZC,0BAA0B,EAC1BC,gBAAgB,EAChBC,oBAAoB,EACpBC,2BAA2B,EAC3BC,gBAAgB,EAChBC,uBAAuB,EACvBC,kBAAkB,EAClBC,4BAA4B,QACzB,iBAAiB;AACxB,OAAOC,iBAAiB,MAAM,yCAAyC;AACvE,OAAOC,IAAI,MAAM,cAAc;AAC/B,OAAOC,aAAa,MAAM,gCAAgC;AAC1D,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,SAKIC,UAAU,QAGP,oBAAoB;AAC3B,OAAOC,WAAW,MAAM,6BAA6B;AACrD,OAAOC,WAAW,MAAM,6BAA6B;AACrD,OAAOC,QAAQ,MAAM,sBAAsB;;AAS3C;;AAcA,MAAMC,MAAM,gBAAGzB,UAAU,CACrB,CACI;EACI0B,QAAQ;EACRC,YAAY;EACZC,UAAU;EACVC,eAAe,GAAG,KAAK;EACvBC,4BAA4B,GAAG,KAAK;EACpCC,kBAAkB;EAClBC,cAAc;EACdC,cAAc;EACdC,cAAc;EACdC;AACJ,CAAC,EACDC,GAAG,KACF;EAC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L,MAAM,CAAC0F,WAAW,GAAG,QAAQ;AAE7B,eAAe1F,MAAM","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
- import { StyledFilterComboboxWrapper, StyledFilterContent, StyledFilterSort, StyledFilterSortText } from './FilterContent.styles';
2
+ import { StyledFilterComboboxInline, StyledFilterComboboxWrapper, StyledFilterContent, StyledFilterSort, StyledFilterSortText } from './FilterContent.styles';
3
3
  import Input from '../../input/Input';
4
4
  import Icon from '../../icon/Icon';
5
5
  import FilterButtons from '../../filter-buttons/FilterButtons';
@@ -10,6 +10,7 @@ const FilterContent = ({
10
10
  sortConfig,
11
11
  filterButtonConfig,
12
12
  checkboxConfig,
13
+ comboboxConfig,
13
14
  shouldAutoFocus
14
15
  }) => {
15
16
  const sortTextRef = useRef(null);
@@ -69,10 +70,10 @@ const FilterContent = ({
69
70
  value: sortConfig.selectedItem.id
70
71
  },
71
72
  onSelect: handleSelectSortItem
72
- }))), checkboxConfig &&
73
+ }))), comboboxConfig && /*#__PURE__*/React.createElement(StyledFilterComboboxInline, null, comboboxConfig.label, /*#__PURE__*/React.createElement(ComboBox, comboboxConfig)), checkboxConfig &&
73
74
  /*#__PURE__*/
74
75
  // eslint-disable-next-line react/jsx-props-no-spreading
75
- React.createElement(Checkbox, checkboxConfig)), [checkboxConfig, filterButtonConfig, handleSelectSortItem, searchConfig, sortConfig, sortTextWidth]);
76
+ React.createElement(Checkbox, checkboxConfig)), [checkboxConfig, comboboxConfig, filterButtonConfig, handleSelectSortItem, searchConfig, sortConfig, sortTextWidth]);
76
77
  };
77
78
  FilterContent.displayName = 'FilterContent';
78
79
  export default FilterContent;
@@ -1 +1 @@
1
- {"version":3,"file":"FIlterContent.js","names":["React","useCallback","useEffect","useMemo","useRef","useState","StyledFilterComboboxWrapper","StyledFilterContent","StyledFilterSort","StyledFilterSortText","Input","Icon","FilterButtons","ComboBox","Checkbox","FilterContent","searchConfig","sortConfig","filterButtonConfig","checkboxConfig","shouldAutoFocus","sortTextRef","searchRef","sortTextWidth","setSortTextWidth","handleSelectSortItem","item","text","value","onSortChange","id","current","clientWidth","focus","createElement","ref","onChange","ev","onSearchChange","target","placeholder","searchValue","shouldShowClearIcon","length","leftElement","icons","$textWidth","lists","list","items","map","selectedItem","onSelect","displayName"],"sources":["../../../../../src/components/filter/filter-content/FIlterContent.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n StyledFilterComboboxWrapper,\n StyledFilterContent,\n StyledFilterSort,\n StyledFilterSortText,\n} from './FilterContent.styles';\nimport Input, { InputRef } from '../../input/Input';\nimport Icon from '../../icon/Icon';\nimport FilterButtons from '../../filter-buttons/FilterButtons';\nimport {\n CheckboxConfig,\n FilterButtonConfig,\n SearchConfig,\n SortConfig,\n} from '../../../types/filter';\nimport ComboBox from '../../combobox/ComboBox';\nimport Checkbox from '../../checkbox/Checkbox';\nimport { IComboBoxItem } from '../../combobox/ComboBox.types';\n\nexport type FilterContentProps = {\n searchConfig?: SearchConfig;\n filterButtonConfig?: FilterButtonConfig;\n sortConfig?: SortConfig;\n checkboxConfig?: CheckboxConfig;\n shouldAutoFocus: boolean;\n};\n\nconst FilterContent: FC<FilterContentProps> = ({\n searchConfig,\n sortConfig,\n filterButtonConfig,\n checkboxConfig,\n shouldAutoFocus,\n}) => {\n const sortTextRef = useRef<HTMLDivElement>(null);\n const searchRef = useRef<InputRef>(null);\n\n const [sortTextWidth, setSortTextWidth] = useState(0);\n\n const handleSelectSortItem = useCallback(\n (item: IComboBoxItem | undefined) => {\n if (!item) {\n return;\n }\n\n const { text, value } = item;\n\n if (sortConfig) {\n sortConfig.onSortChange({ text, id: value });\n }\n },\n [sortConfig],\n );\n\n useEffect(() => {\n if (sortTextRef.current) {\n setSortTextWidth(sortTextRef.current.clientWidth + 20);\n }\n }, []);\n\n useEffect(() => {\n if (shouldAutoFocus) {\n searchRef.current?.focus();\n }\n }, [shouldAutoFocus]);\n\n return useMemo(\n () => (\n <StyledFilterContent>\n {searchConfig && (\n <Input\n ref={searchRef}\n onChange={(ev) => searchConfig.onSearchChange(ev.target.value)}\n placeholder=\"Suche\"\n value={searchConfig.searchValue}\n shouldShowClearIcon={searchConfig.searchValue.length > 0}\n leftElement={<Icon icons={['fa fa-search']} />}\n />\n )}\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n {filterButtonConfig && <FilterButtons {...filterButtonConfig} />}\n {sortConfig && (\n <StyledFilterSort>\n <StyledFilterSortText ref={sortTextRef}>Sortierung</StyledFilterSortText>\n <StyledFilterComboboxWrapper $textWidth={sortTextWidth}>\n <ComboBox\n lists={[\n {\n list: sortConfig.items.map(({ text, id }) => ({\n text,\n value: id,\n })),\n },\n ]}\n placeholder=\"\"\n selectedItem={{\n text: sortConfig.selectedItem.text,\n value: sortConfig.selectedItem.id,\n }}\n onSelect={handleSelectSortItem}\n />\n </StyledFilterComboboxWrapper>\n </StyledFilterSort>\n )}\n {checkboxConfig && (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <Checkbox {...checkboxConfig} />\n )}\n </StyledFilterContent>\n ),\n [\n checkboxConfig,\n filterButtonConfig,\n handleSelectSortItem,\n searchConfig,\n sortConfig,\n sortTextWidth,\n ],\n );\n};\n\nFilterContent.displayName = 'FilterContent';\n\nexport default FilterContent;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAQC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACpF,SACIC,2BAA2B,EAC3BC,mBAAmB,EACnBC,gBAAgB,EAChBC,oBAAoB,QACjB,wBAAwB;AAC/B,OAAOC,KAAK,MAAoB,mBAAmB;AACnD,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,aAAa,MAAM,oCAAoC;AAO9D,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,OAAOC,QAAQ,MAAM,yBAAyB;AAW9C,MAAMC,aAAqC,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allback","useEffect","useMemo","useRef","useState","StyledFilterComboboxInline","StyledFilterComboboxWrapper","StyledFilterContent","StyledFilterSort","StyledFilterSortText","Input","Icon","FilterButtons","ComboBox","Checkbox","FilterContent","searchConfig","sortConfig","filterButtonConfig","checkboxConfig","comboboxConfig","shouldAutoFocus","sortTextRef","searchRef","sortTextWidth","setSortTextWidth","handleSelectSortItem","item","text","value","onSortChange","id","current","clientWidth","focus","createElement","ref","onChange","ev","onSearchChange","target","placeholder","searchValue","shouldShowClearIcon","length","leftElement","icons","$textWidth","lists","list","items","map","selectedItem","onSelect","label","displayName"],"sources":["../../../../../src/components/filter/filter-content/FIlterContent.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n StyledFilterComboboxInline,\n StyledFilterComboboxWrapper,\n StyledFilterContent,\n StyledFilterSort,\n StyledFilterSortText,\n} from './FilterContent.styles';\nimport Input, { InputRef } from '../../input/Input';\nimport Icon from '../../icon/Icon';\nimport FilterButtons from '../../filter-buttons/FilterButtons';\nimport {\n CheckboxConfig,\n ComboboxConfig,\n FilterButtonConfig,\n SearchConfig,\n SortConfig,\n} from '../../../types/filter';\nimport ComboBox from '../../combobox/ComboBox';\nimport Checkbox from '../../checkbox/Checkbox';\nimport { IComboBoxItem } from '../../combobox/ComboBox.types';\n\nexport type FilterContentProps = {\n searchConfig?: SearchConfig;\n filterButtonConfig?: FilterButtonConfig;\n sortConfig?: SortConfig;\n checkboxConfig?: CheckboxConfig;\n comboboxConfig?: ComboboxConfig;\n shouldAutoFocus: boolean;\n};\n\nconst FilterContent: FC<FilterContentProps> = ({\n searchConfig,\n sortConfig,\n filterButtonConfig,\n checkboxConfig,\n comboboxConfig,\n shouldAutoFocus,\n}) => {\n const sortTextRef = useRef<HTMLDivElement>(null);\n const searchRef = useRef<InputRef>(null);\n\n const [sortTextWidth, setSortTextWidth] = useState(0);\n\n const handleSelectSortItem = useCallback(\n (item: IComboBoxItem | undefined) => {\n if (!item) {\n return;\n }\n\n const { text, value } = item;\n\n if (sortConfig) {\n sortConfig.onSortChange({ text, id: value });\n }\n },\n [sortConfig],\n );\n\n useEffect(() => {\n if (sortTextRef.current) {\n setSortTextWidth(sortTextRef.current.clientWidth + 20);\n }\n }, []);\n\n useEffect(() => {\n if (shouldAutoFocus) {\n searchRef.current?.focus();\n }\n }, [shouldAutoFocus]);\n\n return useMemo(\n () => (\n <StyledFilterContent>\n {searchConfig && (\n <Input\n ref={searchRef}\n onChange={(ev) => searchConfig.onSearchChange(ev.target.value)}\n placeholder=\"Suche\"\n value={searchConfig.searchValue}\n shouldShowClearIcon={searchConfig.searchValue.length > 0}\n leftElement={<Icon icons={['fa fa-search']} />}\n />\n )}\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n {filterButtonConfig && <FilterButtons {...filterButtonConfig} />}\n {sortConfig && (\n <StyledFilterSort>\n <StyledFilterSortText ref={sortTextRef}>Sortierung</StyledFilterSortText>\n <StyledFilterComboboxWrapper $textWidth={sortTextWidth}>\n <ComboBox\n lists={[\n {\n list: sortConfig.items.map(({ text, id }) => ({\n text,\n value: id,\n })),\n },\n ]}\n placeholder=\"\"\n selectedItem={{\n text: sortConfig.selectedItem.text,\n value: sortConfig.selectedItem.id,\n }}\n onSelect={handleSelectSortItem}\n />\n </StyledFilterComboboxWrapper>\n </StyledFilterSort>\n )}\n {comboboxConfig && (\n <StyledFilterComboboxInline>\n {comboboxConfig.label}\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <ComboBox {...comboboxConfig} />\n </StyledFilterComboboxInline>\n )}\n {checkboxConfig && (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <Checkbox {...checkboxConfig} />\n )}\n </StyledFilterContent>\n ),\n [\n checkboxConfig,\n comboboxConfig,\n filterButtonConfig,\n handleSelectSortItem,\n searchConfig,\n sortConfig,\n sortTextWidth,\n ],\n );\n};\n\nFilterContent.displayName = 'FilterContent';\n\nexport default FilterContent;\n"],"mappings":"AAAA,OAAO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,EAAEZ,UAAU,CAACmC,YAAY,CAACrB;IACnC,CAAE;IACFsB,QAAQ,EAAE3B;EAAqB,CAClC,CACwB,CACf,CACrB,EACAN,cAAc,iBACXrB,KAAA,CAAAoC,aAAA,CAAC9B,0BAA0B,QACtBe,cAAc,CAACkC,KAAK,eAErBvD,KAAA,CAAAoC,aAAA,CAACtB,QAAQ,EAAKO,cAAiB,CACP,CAC/B,EACAD,cAAc;EAAA;EACX;EACApB,KAAA,CAAAoC,aAAA,CAACrB,QAAQ,EAAKK,cAAiB,CAElB,CACxB,EACD,CACIA,cAAc,EACdC,cAAc,EACdF,kBAAkB,EAClBQ,oBAAoB,EACpBV,YAAY,EACZC,UAAU,EACVO,aAAa,CAErB,CAAC;AACL,CAAC;AAEDT,aAAa,CAACwC,WAAW,GAAG,eAAe;AAE3C,eAAexC,aAAa","ignoreList":[]}
@@ -8,12 +8,13 @@ export const StyledFilterContent = styled.div`
8
8
 
9
9
  display: flex;
10
10
  flex-direction: column;
11
- gap: 20px;
11
+ gap: 10px;
12
12
  `;
13
13
  export const StyledFilterSort = styled.div`
14
14
  display: flex;
15
15
  align-items: center;
16
- gap: 20px;
16
+ justify-content: space-between;
17
+ gap: 10px;
17
18
  `;
18
19
  export const StyledFilterSortText = styled.div`
19
20
  flex: 0 0 auto;
@@ -26,4 +27,9 @@ export const StyledFilterComboboxWrapper = styled.div`
26
27
  $textWidth
27
28
  }) => `calc(100% - ${$textWidth}px)`}}
28
29
  `;
30
+ export const StyledFilterComboboxInline = styled.div`
31
+ display: flex;
32
+ justify-content: space-between;
33
+ align-items: center;
34
+ `;
29
35
  //# sourceMappingURL=FilterContent.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterContent.styles.js","names":["styled","StyledFilterContent","div","theme","StyledFilterSort","StyledFilterSortText","StyledFilterComboboxWrapper","$textWidth"],"sources":["../../../../../src/components/filter/filter-content/FilterContent.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledFilterContentProps = WithTheme<unknown>;\n\nexport const StyledFilterContent = styled.div<StyledFilterContentProps>`\n background-color: ${({ theme }) => theme['100']};\n\n padding: 12px;\n\n display: flex;\n flex-direction: column;\n gap: 20px;\n`;\n\nexport const StyledFilterSort = styled.div`\n display: flex;\n align-items: center;\n gap: 20px;\n`;\n\nexport const StyledFilterSortText = styled.div`\n flex: 0 0 auto;\n`;\n\ntype StyledFilterComboboxWrapperProps = WithTheme<{\n $textWidth: number;\n}>;\n\nexport const StyledFilterComboboxWrapper = styled.div<StyledFilterComboboxWrapperProps>`\n display: flex;\n justify-content: end;\n \n width: ${({ $textWidth }) => `calc(100% - ${$textWidth}px)`}}\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAKtC,OAAO,MAAMC,mBAAmB,GAAGD,MAAM,CAACE,GAA6B;AACvE,wBAAwB,CAAC;EAAEC;AAAM,CAAC,KAAKA,KAAK,CAAC,KAAK,CAAC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAGJ,MAAM,CAACE,GAAG;AAC1C;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMG,oBAAoB,GAAGL,MAAM,CAACE,GAAG;AAC9C;AACA,CAAC;AAMD,OAAO,MAAMI,2BAA2B,GAAGN,MAAM,CAACE,GAAqC;AACvF;AACA;AACA;AACA,aAAa,CAAC;EAAEK;AAAW,CAAC,KAAK,eAAeA,UAAU,KAAK;AAC/D,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"FilterContent.styles.js","names":["styled","StyledFilterContent","div","theme","StyledFilterSort","StyledFilterSortText","StyledFilterComboboxWrapper","$textWidth","StyledFilterComboboxInline"],"sources":["../../../../../src/components/filter/filter-content/FilterContent.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledFilterContentProps = WithTheme<unknown>;\n\nexport const StyledFilterContent = styled.div<StyledFilterContentProps>`\n background-color: ${({ theme }) => theme['100']};\n\n padding: 12px;\n\n display: flex;\n flex-direction: column;\n gap: 10px;\n`;\n\nexport const StyledFilterSort = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n`;\n\nexport const StyledFilterSortText = styled.div`\n flex: 0 0 auto;\n`;\n\ntype StyledFilterComboboxWrapperProps = WithTheme<{\n $textWidth: number;\n}>;\n\nexport const StyledFilterComboboxWrapper = styled.div<StyledFilterComboboxWrapperProps>`\n display: flex;\n justify-content: end;\n \n width: ${({ $textWidth }) => `calc(100% - ${$textWidth}px)`}}\n`;\n\nexport const StyledFilterComboboxInline = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAKtC,OAAO,MAAMC,mBAAmB,GAAGD,MAAM,CAACE,GAA6B;AACvE,wBAAwB,CAAC;EAAEC;AAAM,CAAC,KAAKA,KAAK,CAAC,KAAK,CAAC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAGJ,MAAM,CAACE,GAAG;AAC1C;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMG,oBAAoB,GAAGL,MAAM,CAACE,GAAG;AAC9C;AACA,CAAC;AAMD,OAAO,MAAMI,2BAA2B,GAAGN,MAAM,CAACE,GAAqC;AACvF;AACA;AACA;AACA,aAAa,CAAC;EAAEK;AAAW,CAAC,KAAK,eAAeA,UAAU,KAAK;AAC/D,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGR,MAAM,CAACE,GAAG;AACpD;AACA;AACA;AACA,CAAC","ignoreList":[]}