@chayns-components/core 5.0.0-beta.796 → 5.0.0-beta.798

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 (67) hide show
  1. package/lib/cjs/components/button/Button.js +7 -1
  2. package/lib/cjs/components/button/Button.js.map +1 -1
  3. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js +1 -0
  4. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  5. package/lib/cjs/components/context-menu/ContextMenu.js +2 -2
  6. package/lib/cjs/components/context-menu/ContextMenu.js.map +1 -1
  7. package/lib/cjs/components/page-provider/PageProvider.js +67 -0
  8. package/lib/cjs/components/page-provider/PageProvider.js.map +1 -0
  9. package/lib/cjs/components/page-provider/PageProvider.styles.js +34 -0
  10. package/lib/cjs/components/page-provider/PageProvider.styles.js.map +1 -0
  11. package/lib/cjs/components/popup/Popup.js +1 -1
  12. package/lib/cjs/components/popup/Popup.js.map +1 -1
  13. package/lib/cjs/constants/pageProvider.js +16 -0
  14. package/lib/cjs/constants/pageProvider.js.map +1 -0
  15. package/lib/cjs/index.js +14 -0
  16. package/lib/cjs/index.js.map +1 -1
  17. package/lib/cjs/utils/pageProvider.js +92 -0
  18. package/lib/cjs/utils/pageProvider.js.map +1 -0
  19. package/lib/esm/components/button/Button.js +7 -1
  20. package/lib/esm/components/button/Button.js.map +1 -1
  21. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js +1 -0
  22. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  23. package/lib/esm/components/context-menu/ContextMenu.js +2 -2
  24. package/lib/esm/components/context-menu/ContextMenu.js.map +1 -1
  25. package/lib/esm/components/page-provider/PageProvider.js +59 -0
  26. package/lib/esm/components/page-provider/PageProvider.js.map +1 -0
  27. package/lib/esm/components/page-provider/PageProvider.styles.js +33 -0
  28. package/lib/esm/components/page-provider/PageProvider.styles.js.map +1 -0
  29. package/lib/esm/components/popup/Popup.js +1 -1
  30. package/lib/esm/components/popup/Popup.js.map +1 -1
  31. package/lib/esm/constants/pageProvider.js +10 -0
  32. package/lib/esm/constants/pageProvider.js.map +1 -0
  33. package/lib/esm/index.js +2 -0
  34. package/lib/esm/index.js.map +1 -1
  35. package/lib/esm/utils/pageProvider.js +84 -0
  36. package/lib/esm/utils/pageProvider.js.map +1 -0
  37. package/lib/types/components/accordion/Accordion.styles.d.ts +1 -1
  38. package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +1 -1
  39. package/lib/types/components/accordion/accordion-head/AccordionHead.styles.d.ts +10 -10
  40. package/lib/types/components/amount-control/AmountControl.styles.d.ts +1 -1
  41. package/lib/types/components/button/Button.styles.d.ts +3 -3
  42. package/lib/types/components/color-scheme-provider/ColorSchemeProvider.d.ts +1 -1
  43. package/lib/types/components/combobox/ComboBox.styles.d.ts +1 -1
  44. package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +1 -1
  45. package/lib/types/components/expandable-content/ExpandableContent.styles.d.ts +1 -1
  46. package/lib/types/components/file-input/FileInput.styles.d.ts +1 -1
  47. package/lib/types/components/filter-buttons/filter-button/FilterButton.styles.d.ts +1 -1
  48. package/lib/types/components/input/Input.styles.d.ts +3 -3
  49. package/lib/types/components/list/list-item/ListItem.styles.d.ts +1 -1
  50. package/lib/types/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +1 -1
  51. package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +4 -4
  52. package/lib/types/components/mention-finder/MentionFinder.styles.d.ts +1 -1
  53. package/lib/types/components/page-provider/PageProvider.d.ts +14 -0
  54. package/lib/types/components/page-provider/PageProvider.styles.d.ts +7 -0
  55. package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +1 -1
  56. package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +1 -1
  57. package/lib/types/components/radio-button/RadioButton.styles.d.ts +1 -1
  58. package/lib/types/components/search-box/SearchBox.styles.d.ts +1 -1
  59. package/lib/types/components/search-box/search-box-body/SearchBoxBody.styles.d.ts +1 -1
  60. package/lib/types/components/search-input/SearchInput.styles.d.ts +2 -2
  61. package/lib/types/components/slider/Slider.styles.d.ts +2 -2
  62. package/lib/types/components/slider-button/SliderButton.styles.d.ts +1 -1
  63. package/lib/types/components/truncation/Truncation.styles.d.ts +1 -1
  64. package/lib/types/constants/pageProvider.d.ts +6 -0
  65. package/lib/types/index.d.ts +2 -0
  66. package/lib/types/utils/pageProvider.d.ts +2 -0
  67. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.js","names":["getWindowMetrics","AnimatePresence","React","forwardRef","useCallback","useEffect","useImperativeHandle","useLayoutEffect","useRef","useState","createPortal","useUuid","PopupAlignment","AreaContextProvider","PopupContentWrapper","StyledPopup","StyledPopupPseudo","Popup","_ref","ref","content","onShow","container","document","querySelector","body","onHide","children","shouldShowOnHover","shouldUseChildrenWidth","yOffset","coordinates","setCoordinates","x","y","alignment","setAlignment","TopLeft","offset","setOffset","isOpen","setIsOpen","portal","setPortal","menuHeight","setMenuHeight","pseudoSize","setPseudoSize","timeout","uuid","popupContentRef","popupPseudoContentRef","popupRef","current","height","width","getBoundingClientRect","resizeObserver","ResizeObserver","entries","observedHeight","contentRect","observedWidth","observe","disconnect","handleShow","pseudoHeight","pseudoWidth","childrenHeight","left","childrenLeft","top","childrenTop","childrenWidth","isRight","BottomRight","BottomLeft","newOffset","window","innerWidth","right","newX","TopRight","handleChildrenClick","handleHide","handleMouseEnter","clearTimeout","handleMouseLeave","setTimeout","handleDocumentClick","event","contains","target","preventDefault","stopPropagation","hide","show","then","result","topBarHeight","addEventListener","removeEventListener","createElement","initial","key","onMouseLeave","onMouseEnter","shouldChangeColor","Fragment","$menuHeight","onClick","$shouldUseChildrenWidth","displayName"],"sources":["../../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { getWindowMetrics } from 'chayns-api';\nimport { AnimatePresence } from 'framer-motion';\nimport React, {\n forwardRef,\n ReactNode,\n ReactPortal,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\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, StyledPopupPseudo } from './Popup.styles';\n\nexport type PopupProps = {\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 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 * The Y offset of the popup to the children.\n */\n yOffset?: number;\n};\n\nconst Popup = forwardRef<PopupRef, PopupProps>(\n (\n {\n content,\n onShow,\n container = document.querySelector('.tapp') || document.body,\n onHide,\n children,\n shouldShowOnHover = false,\n shouldUseChildrenWidth = true,\n yOffset = 0,\n },\n ref,\n ) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n\n const [alignment, setAlignment] = useState<PopupAlignment>(PopupAlignment.TopLeft);\n const [offset, setOffset] = useState<number>(0);\n const [isOpen, setIsOpen] = useState(false);\n const [portal, setPortal] = useState<ReactPortal>();\n const [menuHeight, setMenuHeight] = useState(0);\n const [pseudoSize, setPseudoSize] = useState<{ height: number; width: number }>();\n\n const timeout = useRef<number>();\n\n const uuid = useUuid();\n\n // ToDo: Replace with hook if new chayns api is ready\n\n const popupContentRef = useRef<HTMLDivElement>(null);\n const popupPseudoContentRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (popupPseudoContentRef.current) {\n const { height, width } = popupPseudoContentRef.current.getBoundingClientRect();\n\n setPseudoSize({ height, width });\n }\n }, []);\n\n useLayoutEffect(() => {\n if (popupPseudoContentRef.current) {\n const resizeObserver = new ResizeObserver((entries) => {\n if (entries && entries[0]) {\n const observedHeight = entries[0].contentRect.height;\n const observedWidth = entries[0].contentRect.width;\n\n setPseudoSize({ height: observedHeight, width: observedWidth });\n }\n });\n\n resizeObserver.observe(popupPseudoContentRef.current);\n\n return () => {\n resizeObserver.disconnect();\n };\n }\n\n return () => {};\n }, []);\n\n const handleShow = useCallback(() => {\n if (popupRef.current && pseudoSize) {\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 if (pseudoHeight > childrenTop - 25) {\n let isRight = false;\n\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.BottomRight);\n\n isRight = true;\n } else {\n setAlignment(PopupAlignment.BottomLeft);\n }\n\n const x = childrenLeft + childrenWidth / 2;\n const y = childrenTop + childrenHeight + yOffset;\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n x + pseudoWidth >= window.innerWidth\n ? x + pseudoWidth - window.innerWidth\n : 0;\n } else {\n newOffset = 0;\n\n const right = window.innerWidth - (childrenLeft + childrenWidth / 2);\n\n newOffset =\n right + pseudoWidth >= window.innerWidth\n ? right + pseudoWidth - window.innerWidth\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX < 23 ? 23 : newX,\n y: y - yOffset,\n });\n } else {\n let isRight = false;\n\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.TopRight);\n\n isRight = true;\n } else {\n setAlignment(PopupAlignment.TopLeft);\n }\n\n const x = childrenLeft + childrenWidth / 2;\n const y = childrenTop - yOffset;\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n x + pseudoWidth >= window.innerWidth\n ? x + pseudoWidth - window.innerWidth\n : 0;\n } else {\n newOffset = 0;\n\n const right = window.innerWidth - (childrenLeft + childrenWidth / 2);\n\n newOffset =\n right + pseudoWidth >= window.innerWidth\n ? right + pseudoWidth - window.innerWidth\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX < 23 ? 23 : newX,\n y: y - yOffset,\n });\n }\n\n setIsOpen(true);\n }\n }, [pseudoSize, yOffset]);\n\n const handleChildrenClick = () => {\n if (!shouldShowOnHover) {\n handleShow();\n }\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 timeout.current = window.setTimeout(() => {\n handleHide();\n }, 500);\n }, [handleHide, shouldShowOnHover]);\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (\n !popupContentRef.current?.contains(event.target as Node) &&\n !shouldShowOnHover\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n handleHide();\n }\n },\n [handleHide, shouldShowOnHover],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow],\n );\n\n useEffect(() => {\n void getWindowMetrics().then((result) => {\n if (result.topBarHeight) {\n setMenuHeight(result.topBarHeight);\n }\n });\n }, []);\n\n useEffect(() => {\n if (isOpen) {\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]);\n\n useEffect(() => {\n setPortal(() =>\n createPortal(\n <AnimatePresence initial={false}>\n {isOpen && (\n <PopupContentWrapper\n width={pseudoSize?.width ?? 0}\n offset={offset}\n coordinates={coordinates}\n key={`tooltip_${uuid}`}\n alignment={alignment}\n ref={popupContentRef}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n >\n <AreaContextProvider shouldChangeColor={false}>\n {content}\n </AreaContextProvider>\n </PopupContentWrapper>\n )}\n </AnimatePresence>,\n container,\n ),\n );\n }, [\n alignment,\n container,\n content,\n coordinates,\n handleMouseEnter,\n handleMouseLeave,\n isOpen,\n offset,\n pseudoSize?.width,\n uuid,\n ]);\n\n return (\n <>\n <StyledPopupPseudo ref={popupPseudoContentRef} $menuHeight={menuHeight}>\n {content}\n </StyledPopupPseudo>\n <StyledPopup\n ref={popupRef}\n onClick={handleChildrenClick}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n $shouldUseChildrenWidth={shouldUseChildrenWidth}\n >\n {children}\n </StyledPopup>\n {portal}\n </>\n );\n },\n);\n\nPopup.displayName = 'Popup';\n\nexport default Popup;\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,eAAe,QAAQ,eAAe;AAC/C,OAAOC,KAAK,IACRC,UAAU,EAGVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,eAAe,EACfC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,cAAc,QAAoC,mBAAmB;AAC9E,OAAOC,mBAAmB,MAAM,sCAAsC;AACtE,OAAOC,mBAAmB,MAAM,6CAA6C;AAC7E,SAASC,WAAW,EAAEC,iBAAiB,QAAQ,gBAAgB;AAq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WAAW,EACXsD,gBAAgB,EAChBE,gBAAgB,EAChB/C,MAAM,EACNF,MAAM,EACNQ,UAAU,EAAES,KAAK,EACjBN,IAAI,CACP,CAAC;EAEF,oBACI/C,KAAA,CAAAoG,aAAA,CAAApG,KAAA,CAAA0G,QAAA,qBACI1G,KAAA,CAAAoG,aAAA,CAACtF,iBAAiB;IAACG,GAAG,EAAEgC,qBAAsB;IAAC0D,WAAW,EAAEjE;EAAW,GAClExB,OACc,CAAC,eACpBlB,KAAA,CAAAoG,aAAA,CAACvF,WAAW;IACRI,GAAG,EAAEiC,QAAS;IACd0D,OAAO,EAAE3B,mBAAoB;IAC7BsB,YAAY,EAAElB,gBAAiB;IAC/BmB,YAAY,EAAErB,gBAAiB;IAC/B0B,uBAAuB,EAAElF;EAAuB,GAE/CF,QACQ,CAAC,EACbe,MACH,CAAC;AAEX,CACJ,CAAC;AAEDzB,KAAK,CAAC+F,WAAW,GAAG,OAAO;AAE3B,eAAe/F,KAAK","ignoreList":[]}
1
+ {"version":3,"file":"Popup.js","names":["getWindowMetrics","AnimatePresence","React","forwardRef","useCallback","useEffect","useImperativeHandle","useLayoutEffect","useRef","useState","createPortal","useUuid","PopupAlignment","AreaContextProvider","PopupContentWrapper","StyledPopup","StyledPopupPseudo","Popup","_ref","ref","content","onShow","container","document","querySelector","body","onHide","children","shouldShowOnHover","shouldUseChildrenWidth","yOffset","coordinates","setCoordinates","x","y","alignment","setAlignment","TopLeft","offset","setOffset","isOpen","setIsOpen","portal","setPortal","menuHeight","setMenuHeight","pseudoSize","setPseudoSize","timeout","uuid","popupContentRef","popupPseudoContentRef","popupRef","current","height","width","getBoundingClientRect","resizeObserver","ResizeObserver","entries","observedHeight","contentRect","observedWidth","observe","disconnect","handleShow","pseudoHeight","pseudoWidth","childrenHeight","left","childrenLeft","top","childrenTop","childrenWidth","isRight","BottomRight","BottomLeft","newOffset","window","innerWidth","right","newX","TopRight","handleChildrenClick","handleHide","handleMouseEnter","clearTimeout","handleMouseLeave","setTimeout","handleDocumentClick","event","contains","target","preventDefault","stopPropagation","hide","show","then","result","topBarHeight","addEventListener","removeEventListener","createElement","initial","key","onMouseLeave","onMouseEnter","shouldChangeColor","Fragment","$menuHeight","onClick","$shouldUseChildrenWidth","displayName"],"sources":["../../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { getWindowMetrics } from 'chayns-api';\nimport { AnimatePresence } from 'framer-motion';\nimport React, {\n forwardRef,\n ReactNode,\n ReactPortal,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\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, StyledPopupPseudo } from './Popup.styles';\n\nexport type PopupProps = {\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 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 * The Y offset of the popup to the children.\n */\n yOffset?: number;\n};\n\nconst Popup = forwardRef<PopupRef, PopupProps>(\n (\n {\n content,\n onShow,\n container = document.querySelector('.page-provider') || document.body,\n onHide,\n children,\n shouldShowOnHover = false,\n shouldUseChildrenWidth = true,\n yOffset = 0,\n },\n ref,\n ) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n\n const [alignment, setAlignment] = useState<PopupAlignment>(PopupAlignment.TopLeft);\n const [offset, setOffset] = useState<number>(0);\n const [isOpen, setIsOpen] = useState(false);\n const [portal, setPortal] = useState<ReactPortal>();\n const [menuHeight, setMenuHeight] = useState(0);\n const [pseudoSize, setPseudoSize] = useState<{ height: number; width: number }>();\n\n const timeout = useRef<number>();\n\n const uuid = useUuid();\n\n // ToDo: Replace with hook if new chayns api is ready\n\n const popupContentRef = useRef<HTMLDivElement>(null);\n const popupPseudoContentRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (popupPseudoContentRef.current) {\n const { height, width } = popupPseudoContentRef.current.getBoundingClientRect();\n\n setPseudoSize({ height, width });\n }\n }, []);\n\n useLayoutEffect(() => {\n if (popupPseudoContentRef.current) {\n const resizeObserver = new ResizeObserver((entries) => {\n if (entries && entries[0]) {\n const observedHeight = entries[0].contentRect.height;\n const observedWidth = entries[0].contentRect.width;\n\n setPseudoSize({ height: observedHeight, width: observedWidth });\n }\n });\n\n resizeObserver.observe(popupPseudoContentRef.current);\n\n return () => {\n resizeObserver.disconnect();\n };\n }\n\n return () => {};\n }, []);\n\n const handleShow = useCallback(() => {\n if (popupRef.current && pseudoSize) {\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 if (pseudoHeight > childrenTop - 25) {\n let isRight = false;\n\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.BottomRight);\n\n isRight = true;\n } else {\n setAlignment(PopupAlignment.BottomLeft);\n }\n\n const x = childrenLeft + childrenWidth / 2;\n const y = childrenTop + childrenHeight + yOffset;\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n x + pseudoWidth >= window.innerWidth\n ? x + pseudoWidth - window.innerWidth\n : 0;\n } else {\n newOffset = 0;\n\n const right = window.innerWidth - (childrenLeft + childrenWidth / 2);\n\n newOffset =\n right + pseudoWidth >= window.innerWidth\n ? right + pseudoWidth - window.innerWidth\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX < 23 ? 23 : newX,\n y: y - yOffset,\n });\n } else {\n let isRight = false;\n\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.TopRight);\n\n isRight = true;\n } else {\n setAlignment(PopupAlignment.TopLeft);\n }\n\n const x = childrenLeft + childrenWidth / 2;\n const y = childrenTop - yOffset;\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n x + pseudoWidth >= window.innerWidth\n ? x + pseudoWidth - window.innerWidth\n : 0;\n } else {\n newOffset = 0;\n\n const right = window.innerWidth - (childrenLeft + childrenWidth / 2);\n\n newOffset =\n right + pseudoWidth >= window.innerWidth\n ? right + pseudoWidth - window.innerWidth\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX < 23 ? 23 : newX,\n y: y - yOffset,\n });\n }\n\n setIsOpen(true);\n }\n }, [pseudoSize, yOffset]);\n\n const handleChildrenClick = () => {\n if (!shouldShowOnHover) {\n handleShow();\n }\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 timeout.current = window.setTimeout(() => {\n handleHide();\n }, 500);\n }, [handleHide, shouldShowOnHover]);\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (\n !popupContentRef.current?.contains(event.target as Node) &&\n !shouldShowOnHover\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n handleHide();\n }\n },\n [handleHide, shouldShowOnHover],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow],\n );\n\n useEffect(() => {\n void getWindowMetrics().then((result) => {\n if (result.topBarHeight) {\n setMenuHeight(result.topBarHeight);\n }\n });\n }, []);\n\n useEffect(() => {\n if (isOpen) {\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]);\n\n useEffect(() => {\n setPortal(() =>\n createPortal(\n <AnimatePresence initial={false}>\n {isOpen && (\n <PopupContentWrapper\n width={pseudoSize?.width ?? 0}\n offset={offset}\n coordinates={coordinates}\n key={`tooltip_${uuid}`}\n alignment={alignment}\n ref={popupContentRef}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n >\n <AreaContextProvider shouldChangeColor={false}>\n {content}\n </AreaContextProvider>\n </PopupContentWrapper>\n )}\n </AnimatePresence>,\n container,\n ),\n );\n }, [\n alignment,\n container,\n content,\n coordinates,\n handleMouseEnter,\n handleMouseLeave,\n isOpen,\n offset,\n pseudoSize?.width,\n uuid,\n ]);\n\n return (\n <>\n <StyledPopupPseudo ref={popupPseudoContentRef} $menuHeight={menuHeight}>\n {content}\n </StyledPopupPseudo>\n <StyledPopup\n ref={popupRef}\n onClick={handleChildrenClick}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n $shouldUseChildrenWidth={shouldUseChildrenWidth}\n >\n {children}\n </StyledPopup>\n {portal}\n </>\n );\n },\n);\n\nPopup.displayName = 'Popup';\n\nexport default Popup;\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,eAAe,QAAQ,eAAe;AAC/C,OAAOC,KAAK,IACRC,UAAU,EAGVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,eAAe,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B,eAAgB;MACrBuD,YAAY,EAAElB,gBAAiB;MAC/BmB,YAAY,EAAErB;IAAiB,gBAE/BnF,KAAA,CAAAoG,aAAA,CAACzF,mBAAmB;MAAC8F,iBAAiB,EAAE;IAAM,GACzCvF,OACgB,CACJ,CAEZ,CAAC,EAClBE,SACJ,CACJ,CAAC;EACL,CAAC,EAAE,CACCa,SAAS,EACTb,SAAS,EACTF,OAAO,EACPW,WAAW,EACXsD,gBAAgB,EAChBE,gBAAgB,EAChB/C,MAAM,EACNF,MAAM,EACNQ,UAAU,EAAES,KAAK,EACjBN,IAAI,CACP,CAAC;EAEF,oBACI/C,KAAA,CAAAoG,aAAA,CAAApG,KAAA,CAAA0G,QAAA,qBACI1G,KAAA,CAAAoG,aAAA,CAACtF,iBAAiB;IAACG,GAAG,EAAEgC,qBAAsB;IAAC0D,WAAW,EAAEjE;EAAW,GAClExB,OACc,CAAC,eACpBlB,KAAA,CAAAoG,aAAA,CAACvF,WAAW;IACRI,GAAG,EAAEiC,QAAS;IACd0D,OAAO,EAAE3B,mBAAoB;IAC7BsB,YAAY,EAAElB,gBAAiB;IAC/BmB,YAAY,EAAErB,gBAAiB;IAC/B0B,uBAAuB,EAAElF;EAAuB,GAE/CF,QACQ,CAAC,EACbe,MACH,CAAC;AAEX,CACJ,CAAC;AAEDzB,KAAK,CAAC+F,WAAW,GAAG,OAAO;AAE3B,eAAe/F,KAAK","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ export const PAGE_BREAKPOINTS = {
2
+ mobile: 'screen and (max-width: 37.438em)',
3
+ // less than 600px
4
+ desktop: 'screen and (min-width: 33.5em)',
5
+ // more than 600px; could: and (max-width: 63.9375em)
6
+ desk: 'screen and (min-width: 53.125em)',
7
+ // more than 850px
8
+ retina: '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)'
9
+ };
10
+ //# sourceMappingURL=pageProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageProvider.js","names":["PAGE_BREAKPOINTS","mobile","desktop","desk","retina"],"sources":["../../../src/constants/pageProvider.ts"],"sourcesContent":["export const PAGE_BREAKPOINTS = {\n mobile: 'screen and (max-width: 37.438em)', // less than 600px\n desktop: 'screen and (min-width: 33.5em)', // more than 600px; could: and (max-width: 63.9375em)\n desk: 'screen and (min-width: 53.125em)', // more than 850px\n retina: '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)',\n};\n"],"mappings":"AAAA,OAAO,MAAMA,gBAAgB,GAAG;EAC5BC,MAAM,EAAE,kCAAkC;EAAE;EAC5CC,OAAO,EAAE,gCAAgC;EAAE;EAC3CC,IAAI,EAAE,kCAAkC;EAAE;EAC1CC,MAAM,EAAE;AACZ,CAAC","ignoreList":[]}
package/lib/esm/index.js CHANGED
@@ -24,6 +24,7 @@ export { default as ListItemContent } from './components/list/list-item/list-ite
24
24
  export { default as ListItem } from './components/list/list-item/ListItem';
25
25
  export { default as MentionFinder } from './components/mention-finder/MentionFinder';
26
26
  export { default as NumberInput } from './components/number-input/NumberInput';
27
+ export { default as PageProvider } from './components/page-provider/PageProvider';
27
28
  export { default as Popup } from './components/popup/Popup';
28
29
  export { default as PopupContent } from './components/popup/popup-content/PopupContent';
29
30
  export { default as ProgressBar } from './components/progress-bar/ProgressBar';
@@ -54,5 +55,6 @@ export { ClampPosition } from './types/truncation';
54
55
  export { getIsTouch } from './utils/environment';
55
56
  export { getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';
56
57
  export { isTobitEmployee } from './utils/isTobitEmployee';
58
+ export { getUsableHeight } from './utils/pageProvider';
57
59
  export { uploadFile } from './utils/uploadFile';
58
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","ComboBox","ContentCard","ContextMenu","ExpandableContent","FileInput","FilterButtons","GridImage","Icon","Input","List","ListItemContent","ListItem","MentionFinder","NumberInput","Popup","PopupContent","ProgressBar","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingBar","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ComboBoxDirection","ContentCardType","ContextMenuAlignment","FilterButtonItemShape","FilterButtonSize","ClampPosition","getIsTouch","getFileAsArrayBuffer","selectFiles","isTobitEmployee","uploadFile"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\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 {\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 { default as ColorSchemeProvider } from './components/color-scheme-provider/ColorSchemeProvider';\nexport type {\n FramerMotionBugFix,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport {\n default as ComboBox,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu, type ContextMenuRef } from './components/context-menu/ContextMenu';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport { default as FileInput, type FileInputRef } from './components/file-input/FileInput';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as Icon } from './components/icon/Icon';\nexport { default as Input } 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} 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 NumberInput } from './components/number-input/NumberInput';\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 {\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 SharingBar } from './components/sharing-bar/SharingBar';\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 { default as TagInput } 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/useElementSize';\nexport { ComboBoxDirection } from './types/comboBox';\nexport { ContentCardType } from './types/contentCard';\nexport { ContextMenuAlignment } from './types/contextMenu';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/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 { ClampPosition } from './types/truncation';\nexport { getIsTouch } from './utils/environment';\nexport { getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { uploadFile } from './utils/uploadFile';\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;AACjG,SAASH,OAAO,IAAII,cAAc,QAAQ,uDAAuD;AACjG,SAASJ,OAAO,IAAIK,aAAa,QAAQ,qDAAqD;AAC9F,SAASL,OAAO,IAAIM,aAAa,QAAQ,2CAA2C;AACpF,SACIC,WAAW,EACXP,OAAO,IAAIQ,YAAY,QACpB,gDAAgD;AACvD,SAASR,OAAO,IAAIS,KAAK,QAAQ,0BAA0B;AAC3D,SAAST,OAAO,IAAIU,MAAM,QAAQ,4BAA4B;AAC9D,SAASV,OAAO,IAAIW,QAAQ,QAAQ,gCAAgC;AACpE,SAASX,OAAO,IAAIY,mBAAmB,QAAQ,wDAAwD;AAKvG,SACIZ,OAAO,IAAIa,QAAQ,QAGhB,gCAAgC;AACvC,SAASb,OAAO,IAAIc,WAAW,QAAQ,uCAAuC;AAC9E,SAASd,OAAO,IA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;AAEvE,SAASvC,OAAO,IAAIwC,YAAY,QAAQ,yCAAyC;AACjF,SAASxC,OAAO,IAAIyC,MAAM,QAAQ,4BAA4B;AAC9D,SACIzC,OAAO,IAAI0C,eAAe,EAC1BC,mBAAmB,EACnBC,oBAAoB,QACjB,gDAAgD;AACvD,SAAS5C,OAAO,IAAI6C,QAAQ,QAAQ,iCAAiC;AACrE,SAAS7C,OAAO,IAAI8C,QAAQ,QAAQ,iCAAiC;AACrE,SAAS9C,OAAO,IAAI+C,OAAO,QAAQ,8BAA8B;AACjE,SAAS/C,OAAO,IAAIgD,UAAU,QAAQ,oCAAoC;AAC1E,SAASC,2BAA2B,QAAQ,2BAA2B;AACvE,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,iBAAiB,QAAQ,kBAAkB;AACpD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,oBAAoB,QAAQ,qBAAqB;AAG1D,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAW/E,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,oBAAoB,EAAEC,WAAW,QAAQ,oBAAoB;AACtE,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,UAAU,QAAQ,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","ComboBox","ContentCard","ContextMenu","ExpandableContent","FileInput","FilterButtons","GridImage","Icon","Input","List","ListItemContent","ListItem","MentionFinder","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingBar","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ComboBoxDirection","ContentCardType","ContextMenuAlignment","FilterButtonItemShape","FilterButtonSize","ClampPosition","getIsTouch","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\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 {\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 { default as ColorSchemeProvider } from './components/color-scheme-provider/ColorSchemeProvider';\nexport type {\n FramerMotionBugFix,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport {\n default as ComboBox,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu, type ContextMenuRef } from './components/context-menu/ContextMenu';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport { default as FileInput, type FileInputRef } from './components/file-input/FileInput';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as Icon } from './components/icon/Icon';\nexport { default as Input } 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} 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 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 {\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 SharingBar } from './components/sharing-bar/SharingBar';\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 { default as TagInput } 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/useElementSize';\nexport { ComboBoxDirection } from './types/comboBox';\nexport { ContentCardType } from './types/contentCard';\nexport { ContextMenuAlignment } from './types/contextMenu';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/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 { ClampPosition } from './types/truncation';\nexport { getIsTouch } from './utils/environment';\nexport { getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;AACjG,SAASH,OAAO,IAAII,cAAc,QAAQ,uDAAuD;AACjG,SAASJ,OAAO,IAAIK,aAAa,QAAQ,qDAAqD;AAC9F,SAASL,OAAO,IAAIM,aAAa,QAAQ,2CAA2C;AACpF,SACIC,WAAW,EACXP,OAAO,IAAIQ,YAAY,QACpB,gDAAgD;AACvD,SAASR,OAAO,IAAIS,KAAK,QAAQ,0BAA0B;AAC3D,SAAST,OAAO,IAAIU,MAAM,QAAQ,4BAA4B;AAC9D,SAASV,OAAO,IAAIW,QAAQ,QAAQ,gCAAgC;AACpE,SAASX,OAAO,IAAIY,mBAAmB,QAAQ,wDAAwD;AAKvG,SACIZ,OAAO,IAAIa,QAAQ,QAGhB,gCAAgC;AACvC,SAASb,OAAO,IAAIc,WAAW,QAAQ,uCAAuC;AAC9E,SAASd,OAAO,IAAIe,WAAW,QAA6B,uCAAuC;AACnG,SAASf,OAAO,IAAIgB,iBAAiB,QAAQ,mDAAmD;AAChG,SAAShB,OAAO,IAAIiB,SAAS,QAA2B,mCAAmC;AAC3F,SAASjB,OAAO,IAAIkB,aAAa,QAAQ,2CAA2C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2C,eAAe,EAC1BC,mBAAmB,EACnBC,oBAAoB,QACjB,gDAAgD;AACvD,SAAS7C,OAAO,IAAI8C,QAAQ,QAAQ,iCAAiC;AACrE,SAAS9C,OAAO,IAAI+C,QAAQ,QAAQ,iCAAiC;AACrE,SAAS/C,OAAO,IAAIgD,OAAO,QAAQ,8BAA8B;AACjE,SAAShD,OAAO,IAAIiD,UAAU,QAAQ,oCAAoC;AAC1E,SAASC,2BAA2B,QAAQ,2BAA2B;AACvE,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,iBAAiB,QAAQ,kBAAkB;AACpD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,oBAAoB,QAAQ,qBAAqB;AAG1D,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAW/E,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,oBAAoB,EAAEC,WAAW,QAAQ,oBAAoB;AACtE,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,UAAU,QAAQ,oBAAoB","ignoreList":[]}
@@ -0,0 +1,84 @@
1
+ import { getEnvironment, getWindowMetrics } from 'chayns-api';
2
+ import { PAGE_BREAKPOINTS } from '../constants/pageProvider';
3
+ export const getPagePadding = () => {
4
+ const {
5
+ runtimeEnvironment
6
+ } = getEnvironment();
7
+ if (typeof runtimeEnvironment === 'number' && [4, 5].includes(runtimeEnvironment)) {
8
+ return '0';
9
+ }
10
+ if (matchMedia(PAGE_BREAKPOINTS.desktop).matches) {
11
+ return '35px 43px 30px';
12
+ }
13
+ return '15px 10px 20px';
14
+ };
15
+ const getPageProviderInformation = customPadding => {
16
+ const padding = (customPadding ?? getPagePadding()).split(' ');
17
+ const parseValue = value => {
18
+ const parsed = parseInt(value.replace('px', ''), 10);
19
+ return Number.isNaN(parsed) ? 0 : parsed;
20
+ };
21
+ if (padding.length === 1) {
22
+ const value = parseValue(padding[0] ?? '');
23
+ return {
24
+ top: value,
25
+ right: value,
26
+ bottom: value,
27
+ left: value
28
+ };
29
+ }
30
+ if (padding.length === 2) {
31
+ const [vertical, horizontal] = padding.map(parseValue);
32
+ return {
33
+ top: vertical ?? 0,
34
+ right: horizontal ?? 0,
35
+ bottom: vertical ?? 0,
36
+ left: horizontal ?? 0
37
+ };
38
+ }
39
+ if (padding.length === 3) {
40
+ const [top, horizontal, bottom] = padding.map(parseValue);
41
+ return {
42
+ top: top ?? 0,
43
+ right: horizontal ?? 0,
44
+ bottom: bottom ?? 0,
45
+ left: horizontal ?? 0
46
+ };
47
+ }
48
+ if (padding.length === 4) {
49
+ const [top, right, bottom, left] = padding.map(parseValue);
50
+ return {
51
+ top: top ?? 0,
52
+ right: right ?? 0,
53
+ bottom: bottom ?? 0,
54
+ left: left ?? 0
55
+ };
56
+ }
57
+ return {
58
+ top: 0,
59
+ right: 0,
60
+ bottom: 0,
61
+ left: 0
62
+ };
63
+ };
64
+ export const getUsableHeight = async customPadding => {
65
+ let usableHeight;
66
+ const {
67
+ bottomBarHeight,
68
+ topBarHeight,
69
+ windowHeight
70
+ } = await getWindowMetrics();
71
+ const {
72
+ top,
73
+ bottom
74
+ } = getPageProviderInformation(customPadding);
75
+ usableHeight = windowHeight - bottom - top;
76
+ if (bottomBarHeight) {
77
+ usableHeight -= bottomBarHeight;
78
+ }
79
+ if (topBarHeight) {
80
+ usableHeight -= topBarHeight;
81
+ }
82
+ return usableHeight;
83
+ };
84
+ //# sourceMappingURL=pageProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageProvider.js","names":["getEnvironment","getWindowMetrics","PAGE_BREAKPOINTS","getPagePadding","runtimeEnvironment","includes","matchMedia","desktop","matches","getPageProviderInformation","customPadding","padding","split","parseValue","value","parsed","parseInt","replace","Number","isNaN","length","top","right","bottom","left","vertical","horizontal","map","getUsableHeight","usableHeight","bottomBarHeight","topBarHeight","windowHeight"],"sources":["../../../src/utils/pageProvider.ts"],"sourcesContent":["import { getEnvironment, getWindowMetrics } from 'chayns-api';\nimport { PAGE_BREAKPOINTS } from '../constants/pageProvider';\n\nexport const getPagePadding = () => {\n const { runtimeEnvironment } = getEnvironment();\n\n if (typeof runtimeEnvironment === 'number' && [4, 5].includes(runtimeEnvironment)) {\n return '0';\n }\n\n if (matchMedia(PAGE_BREAKPOINTS.desktop).matches) {\n return '35px 43px 30px';\n }\n\n return '15px 10px 20px';\n};\n\ntype PaddingValues = {\n top: number;\n right: number;\n bottom: number;\n left: number;\n};\n\nconst getPageProviderInformation = (customPadding?: string): PaddingValues => {\n const padding = (customPadding ?? getPagePadding()).split(' ');\n\n const parseValue = (value: string): number => {\n const parsed = parseInt(value.replace('px', ''), 10);\n return Number.isNaN(parsed) ? 0 : parsed;\n };\n\n if (padding.length === 1) {\n const value = parseValue(padding[0] ?? '');\n return { top: value, right: value, bottom: value, left: value };\n }\n\n if (padding.length === 2) {\n const [vertical, horizontal] = padding.map(parseValue);\n return {\n top: vertical ?? 0,\n right: horizontal ?? 0,\n bottom: vertical ?? 0,\n left: horizontal ?? 0,\n };\n }\n\n if (padding.length === 3) {\n const [top, horizontal, bottom] = padding.map(parseValue);\n return {\n top: top ?? 0,\n right: horizontal ?? 0,\n bottom: bottom ?? 0,\n left: horizontal ?? 0,\n };\n }\n\n if (padding.length === 4) {\n const [top, right, bottom, left] = padding.map(parseValue);\n return { top: top ?? 0, right: right ?? 0, bottom: bottom ?? 0, left: left ?? 0 };\n }\n\n return { top: 0, right: 0, bottom: 0, left: 0 };\n};\n\nexport const getUsableHeight = async (customPadding?: string) => {\n let usableHeight;\n\n const { bottomBarHeight, topBarHeight, windowHeight } = await getWindowMetrics();\n\n const { top, bottom } = getPageProviderInformation(customPadding);\n\n usableHeight = windowHeight - bottom - top;\n\n if (bottomBarHeight) {\n usableHeight -= bottomBarHeight;\n }\n\n if (topBarHeight) {\n usableHeight -= topBarHeight;\n }\n\n return usableHeight;\n};\n"],"mappings":"A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jEmB,YAAY,GAAGG,YAAY,GAAGT,MAAM,GAAGF,GAAG;EAE1C,IAAIS,eAAe,EAAE;IACjBD,YAAY,IAAIC,eAAe;EACnC;EAEA,IAAIC,YAAY,EAAE;IACdF,YAAY,IAAIE,YAAY;EAChC;EAEA,OAAOF,YAAY;AACvB,CAAC","ignoreList":[]}
@@ -11,6 +11,7 @@ export declare const StyledMotionAccordion: import("styled-components/dist/types
11
11
  slot?: string | undefined;
12
12
  title?: string | undefined;
13
13
  color?: string | undefined;
14
+ className?: string | undefined;
14
15
  rel?: string | undefined;
15
16
  defaultChecked?: boolean | undefined;
16
17
  defaultValue?: string | number | readonly string[] | undefined;
@@ -18,7 +19,6 @@ export declare const StyledMotionAccordion: import("styled-components/dist/types
18
19
  suppressHydrationWarning?: boolean | undefined;
19
20
  accessKey?: string | undefined;
20
21
  autoFocus?: boolean | undefined;
21
- className?: string | undefined;
22
22
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
23
23
  contextMenu?: string | undefined;
24
24
  dir?: string | undefined;
@@ -8,6 +8,7 @@ export declare const StyledMotionAccordionBody: import("styled-components/dist/t
8
8
  slot?: string | undefined;
9
9
  title?: string | undefined;
10
10
  color?: string | undefined;
11
+ className?: string | undefined;
11
12
  rel?: string | undefined;
12
13
  defaultChecked?: boolean | undefined;
13
14
  defaultValue?: string | number | readonly string[] | undefined;
@@ -15,7 +16,6 @@ export declare const StyledMotionAccordionBody: import("styled-components/dist/t
15
16
  suppressHydrationWarning?: boolean | undefined;
16
17
  accessKey?: string | undefined;
17
18
  autoFocus?: boolean | undefined;
18
- className?: string | undefined;
19
19
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
20
20
  contextMenu?: string | undefined;
21
21
  dir?: string | undefined;
@@ -4,6 +4,7 @@ export declare const StyledMotionAccordionHead: import("styled-components/dist/t
4
4
  slot?: string | undefined;
5
5
  title?: string | undefined;
6
6
  color?: string | undefined;
7
+ className?: string | undefined;
7
8
  rel?: string | undefined;
8
9
  defaultChecked?: boolean | undefined;
9
10
  defaultValue?: string | number | readonly string[] | undefined;
@@ -11,7 +12,6 @@ export declare const StyledMotionAccordionHead: import("styled-components/dist/t
11
12
  suppressHydrationWarning?: boolean | undefined;
12
13
  accessKey?: string | undefined;
13
14
  autoFocus?: boolean | undefined;
14
- className?: string | undefined;
15
15
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
16
16
  contextMenu?: string | undefined;
17
17
  dir?: string | undefined;
@@ -269,6 +269,7 @@ export declare const StyledMotionIconWrapper: import("styled-components/dist/typ
269
269
  slot?: string | undefined;
270
270
  title?: string | undefined;
271
271
  color?: string | undefined;
272
+ className?: string | undefined;
272
273
  rel?: string | undefined;
273
274
  defaultChecked?: boolean | undefined;
274
275
  defaultValue?: string | number | readonly string[] | undefined;
@@ -276,7 +277,6 @@ export declare const StyledMotionIconWrapper: import("styled-components/dist/typ
276
277
  suppressHydrationWarning?: boolean | undefined;
277
278
  accessKey?: string | undefined;
278
279
  autoFocus?: boolean | undefined;
279
- className?: string | undefined;
280
280
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
281
281
  contextMenu?: string | undefined;
282
282
  dir?: string | undefined;
@@ -538,6 +538,7 @@ export declare const StyledMotionContentWrapper: import("styled-components/dist/
538
538
  slot?: string | undefined;
539
539
  title?: string | undefined;
540
540
  color?: string | undefined;
541
+ className?: string | undefined;
541
542
  rel?: string | undefined;
542
543
  defaultChecked?: boolean | undefined;
543
544
  defaultValue?: string | number | readonly string[] | undefined;
@@ -545,7 +546,6 @@ export declare const StyledMotionContentWrapper: import("styled-components/dist/
545
546
  suppressHydrationWarning?: boolean | undefined;
546
547
  accessKey?: string | undefined;
547
548
  autoFocus?: boolean | undefined;
548
- className?: string | undefined;
549
549
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
550
550
  contextMenu?: string | undefined;
551
551
  dir?: string | undefined;
@@ -803,6 +803,7 @@ export declare const StyledMotionTitleWrapper: import("styled-components/dist/ty
803
803
  slot?: string | undefined;
804
804
  title?: string | undefined;
805
805
  color?: string | undefined;
806
+ className?: string | undefined;
806
807
  rel?: string | undefined;
807
808
  defaultChecked?: boolean | undefined;
808
809
  defaultValue?: string | number | readonly string[] | undefined;
@@ -810,7 +811,6 @@ export declare const StyledMotionTitleWrapper: import("styled-components/dist/ty
810
811
  suppressHydrationWarning?: boolean | undefined;
811
812
  accessKey?: string | undefined;
812
813
  autoFocus?: boolean | undefined;
813
- className?: string | undefined;
814
814
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
815
815
  contextMenu?: string | undefined;
816
816
  dir?: string | undefined;
@@ -1073,6 +1073,7 @@ export declare const StyledMotionTitle: import("styled-components/dist/types").I
1073
1073
  slot?: string | undefined;
1074
1074
  title?: string | undefined;
1075
1075
  color?: string | undefined;
1076
+ className?: string | undefined;
1076
1077
  rel?: string | undefined;
1077
1078
  defaultChecked?: boolean | undefined;
1078
1079
  defaultValue?: string | number | readonly string[] | undefined;
@@ -1080,7 +1081,6 @@ export declare const StyledMotionTitle: import("styled-components/dist/types").I
1080
1081
  suppressHydrationWarning?: boolean | undefined;
1081
1082
  accessKey?: string | undefined;
1082
1083
  autoFocus?: boolean | undefined;
1083
- className?: string | undefined;
1084
1084
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
1085
1085
  contextMenu?: string | undefined;
1086
1086
  dir?: string | undefined;
@@ -1336,6 +1336,7 @@ export declare const StyledMotionTitleElementWrapper: import("styled-components/
1336
1336
  slot?: string | undefined;
1337
1337
  title?: string | undefined;
1338
1338
  color?: string | undefined;
1339
+ className?: string | undefined;
1339
1340
  rel?: string | undefined;
1340
1341
  defaultChecked?: boolean | undefined;
1341
1342
  defaultValue?: string | number | readonly string[] | undefined;
@@ -1343,7 +1344,6 @@ export declare const StyledMotionTitleElementWrapper: import("styled-components/
1343
1344
  suppressHydrationWarning?: boolean | undefined;
1344
1345
  accessKey?: string | undefined;
1345
1346
  autoFocus?: boolean | undefined;
1346
- className?: string | undefined;
1347
1347
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
1348
1348
  contextMenu?: string | undefined;
1349
1349
  dir?: string | undefined;
@@ -1602,6 +1602,7 @@ export declare const StyledMotionSearchWrapper: import("styled-components/dist/t
1602
1602
  slot?: string | undefined;
1603
1603
  title?: string | undefined;
1604
1604
  color?: string | undefined;
1605
+ className?: string | undefined;
1605
1606
  rel?: string | undefined;
1606
1607
  defaultChecked?: boolean | undefined;
1607
1608
  defaultValue?: string | number | readonly string[] | undefined;
@@ -1609,7 +1610,6 @@ export declare const StyledMotionSearchWrapper: import("styled-components/dist/t
1609
1610
  suppressHydrationWarning?: boolean | undefined;
1610
1611
  accessKey?: string | undefined;
1611
1612
  autoFocus?: boolean | undefined;
1612
- className?: string | undefined;
1613
1613
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
1614
1614
  contextMenu?: string | undefined;
1615
1615
  dir?: string | undefined;
@@ -1867,6 +1867,7 @@ export declare const StyledMotionRightElementWrapper: import("styled-components/
1867
1867
  slot?: string | undefined;
1868
1868
  title?: string | undefined;
1869
1869
  color?: string | undefined;
1870
+ className?: string | undefined;
1870
1871
  rel?: string | undefined;
1871
1872
  defaultChecked?: boolean | undefined;
1872
1873
  defaultValue?: string | number | readonly string[] | undefined;
@@ -1874,7 +1875,6 @@ export declare const StyledMotionRightElementWrapper: import("styled-components/
1874
1875
  suppressHydrationWarning?: boolean | undefined;
1875
1876
  accessKey?: string | undefined;
1876
1877
  autoFocus?: boolean | undefined;
1877
- className?: string | undefined;
1878
1878
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
1879
1879
  contextMenu?: string | undefined;
1880
1880
  dir?: string | undefined;
@@ -2140,6 +2140,7 @@ export declare const StyledMotionRightInput: import("styled-components/dist/type
2140
2140
  size?: number | undefined;
2141
2141
  color?: string | undefined;
2142
2142
  type?: import("react").HTMLInputTypeAttribute | undefined;
2143
+ className?: string | undefined;
2143
2144
  rel?: string | undefined;
2144
2145
  defaultChecked?: boolean | undefined;
2145
2146
  defaultValue?: string | number | readonly string[] | undefined;
@@ -2147,7 +2148,6 @@ export declare const StyledMotionRightInput: import("styled-components/dist/type
2147
2148
  suppressHydrationWarning?: boolean | undefined;
2148
2149
  accessKey?: string | undefined;
2149
2150
  autoFocus?: boolean | undefined;
2150
- className?: string | undefined;
2151
2151
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
2152
2152
  contextMenu?: string | undefined;
2153
2153
  dir?: string | undefined;
@@ -2429,6 +2429,7 @@ export declare const StyledMotionRightInputIconWrapper: import("styled-component
2429
2429
  slot?: string | undefined;
2430
2430
  title?: string | undefined;
2431
2431
  color?: string | undefined;
2432
+ className?: string | undefined;
2432
2433
  rel?: string | undefined;
2433
2434
  defaultChecked?: boolean | undefined;
2434
2435
  defaultValue?: string | number | readonly string[] | undefined;
@@ -2436,7 +2437,6 @@ export declare const StyledMotionRightInputIconWrapper: import("styled-component
2436
2437
  suppressHydrationWarning?: boolean | undefined;
2437
2438
  accessKey?: string | undefined;
2438
2439
  autoFocus?: boolean | undefined;
2439
- className?: string | undefined;
2440
2440
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
2441
2441
  contextMenu?: string | undefined;
2442
2442
  dir?: string | undefined;
@@ -26,6 +26,7 @@ export declare const StyledMotionAmountControlButton: import("styled-components/
26
26
  value?: string | number | readonly string[] | undefined;
27
27
  color?: string | undefined;
28
28
  type?: "button" | "reset" | "submit" | undefined;
29
+ className?: string | undefined;
29
30
  rel?: string | undefined;
30
31
  defaultChecked?: boolean | undefined;
31
32
  defaultValue?: string | number | readonly string[] | undefined;
@@ -33,7 +34,6 @@ export declare const StyledMotionAmountControlButton: import("styled-components/
33
34
  suppressHydrationWarning?: boolean | undefined;
34
35
  accessKey?: string | undefined;
35
36
  autoFocus?: boolean | undefined;
36
- className?: string | undefined;
37
37
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
38
38
  contextMenu?: string | undefined;
39
39
  dir?: string | undefined;
@@ -14,6 +14,7 @@ export declare const StyledMotionButton: import("styled-components/dist/types").
14
14
  value?: string | number | readonly string[] | undefined;
15
15
  color?: string | undefined;
16
16
  type?: "button" | "reset" | "submit" | undefined;
17
+ className?: string | undefined;
17
18
  rel?: string | undefined;
18
19
  defaultChecked?: boolean | undefined;
19
20
  defaultValue?: string | number | readonly string[] | undefined;
@@ -21,7 +22,6 @@ export declare const StyledMotionButton: import("styled-components/dist/types").
21
22
  suppressHydrationWarning?: boolean | undefined;
22
23
  accessKey?: string | undefined;
23
24
  autoFocus?: boolean | undefined;
24
- className?: string | undefined;
25
25
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
26
26
  contextMenu?: string | undefined;
27
27
  dir?: string | undefined;
@@ -285,6 +285,7 @@ export declare const StyledMotionChildrenWrapper: import("styled-components/dist
285
285
  slot?: string | undefined;
286
286
  title?: string | undefined;
287
287
  color?: string | undefined;
288
+ className?: string | undefined;
288
289
  rel?: string | undefined;
289
290
  defaultChecked?: boolean | undefined;
290
291
  defaultValue?: string | number | readonly string[] | undefined;
@@ -292,7 +293,6 @@ export declare const StyledMotionChildrenWrapper: import("styled-components/dist
292
293
  suppressHydrationWarning?: boolean | undefined;
293
294
  accessKey?: string | undefined;
294
295
  autoFocus?: boolean | undefined;
295
- className?: string | undefined;
296
296
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
297
297
  contextMenu?: string | undefined;
298
298
  dir?: string | undefined;
@@ -550,6 +550,7 @@ export declare const StyledMotionWaitCursorWrapper: import("styled-components/di
550
550
  slot?: string | undefined;
551
551
  title?: string | undefined;
552
552
  color?: string | undefined;
553
+ className?: string | undefined;
553
554
  rel?: string | undefined;
554
555
  defaultChecked?: boolean | undefined;
555
556
  defaultValue?: string | number | readonly string[] | undefined;
@@ -557,7 +558,6 @@ export declare const StyledMotionWaitCursorWrapper: import("styled-components/di
557
558
  suppressHydrationWarning?: boolean | undefined;
558
559
  accessKey?: string | undefined;
559
560
  autoFocus?: boolean | undefined;
560
- className?: string | undefined;
561
561
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
562
562
  contextMenu?: string | undefined;
563
563
  dir?: string | undefined;
@@ -5,7 +5,7 @@ declare enum ColorMode {
5
5
  Dark = 1,
6
6
  Light = 2
7
7
  }
8
- type ColorSchemeProviderProps = {
8
+ export type ColorSchemeProviderProps = {
9
9
  /**
10
10
  * The content of the application or the components for which the styles should be set
11
11
  */
@@ -33,6 +33,7 @@ export declare const StyledMotionComboBoxBody: import("styled-components/dist/ty
33
33
  slot?: string | undefined;
34
34
  title?: string | undefined;
35
35
  color?: string | undefined;
36
+ className?: string | undefined;
36
37
  rel?: string | undefined;
37
38
  defaultChecked?: boolean | undefined;
38
39
  defaultValue?: string | number | readonly string[] | undefined;
@@ -40,7 +41,6 @@ export declare const StyledMotionComboBoxBody: import("styled-components/dist/ty
40
41
  suppressHydrationWarning?: boolean | undefined;
41
42
  accessKey?: string | undefined;
42
43
  autoFocus?: boolean | undefined;
43
- className?: string | undefined;
44
44
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
45
45
  contextMenu?: string | undefined;
46
46
  dir?: string | undefined;
@@ -7,6 +7,7 @@ export declare const StyledMotionContextMenuContent: import("styled-components/d
7
7
  slot?: string | undefined;
8
8
  title?: string | undefined;
9
9
  color?: string | undefined;
10
+ className?: string | undefined;
10
11
  rel?: string | undefined;
11
12
  defaultChecked?: boolean | undefined;
12
13
  defaultValue?: string | number | readonly string[] | undefined;
@@ -14,7 +15,6 @@ export declare const StyledMotionContextMenuContent: import("styled-components/d
14
15
  suppressHydrationWarning?: boolean | undefined;
15
16
  accessKey?: string | undefined;
16
17
  autoFocus?: boolean | undefined;
17
- className?: string | undefined;
18
18
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
19
19
  contextMenu?: string | undefined;
20
20
  dir?: string | undefined;
@@ -5,6 +5,7 @@ export declare const StyledMotionExpandableContent: import("styled-components/di
5
5
  slot?: string | undefined;
6
6
  title?: string | undefined;
7
7
  color?: string | undefined;
8
+ className?: string | undefined;
8
9
  rel?: string | undefined;
9
10
  defaultChecked?: boolean | undefined;
10
11
  defaultValue?: string | number | readonly string[] | undefined;
@@ -12,7 +13,6 @@ export declare const StyledMotionExpandableContent: import("styled-components/di
12
13
  suppressHydrationWarning?: boolean | undefined;
13
14
  accessKey?: string | undefined;
14
15
  autoFocus?: boolean | undefined;
15
- className?: string | undefined;
16
16
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
17
17
  contextMenu?: string | undefined;
18
18
  dir?: string | undefined;
@@ -19,6 +19,7 @@ export declare const StyledMotionFileInputList: import("styled-components/dist/t
19
19
  slot?: string | undefined;
20
20
  title?: string | undefined;
21
21
  color?: string | undefined;
22
+ className?: string | undefined;
22
23
  rel?: string | undefined;
23
24
  defaultChecked?: boolean | undefined;
24
25
  defaultValue?: string | number | readonly string[] | undefined;
@@ -26,7 +27,6 @@ export declare const StyledMotionFileInputList: import("styled-components/dist/t
26
27
  suppressHydrationWarning?: boolean | undefined;
27
28
  accessKey?: string | undefined;
28
29
  autoFocus?: boolean | undefined;
29
- className?: string | undefined;
30
30
  contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
31
31
  contextMenu?: string | undefined;
32
32
  dir?: string | undefined;