@chayns-components/core 5.0.0-beta.400 → 5.0.0-beta.402
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js +2 -2
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -1
- package/lib/components/popup/Popup.js +11 -4
- package/lib/components/popup/Popup.js.map +1 -1
- package/lib/components/popup/Popup.styles.js +2 -0
- package/lib/components/popup/Popup.styles.js.map +1 -1
- package/lib/components/popup/popup-content/PopupContent.d.ts +2 -1
- package/lib/components/popup/popup-content/PopupContent.js +4 -1
- package/lib/components/popup/popup-content/PopupContent.js.map +1 -1
- package/lib/components/progress-bar/ProgressBar.d.ts +4 -0
- package/lib/components/progress-bar/ProgressBar.js +3 -2
- package/lib/components/progress-bar/ProgressBar.js.map +1 -1
- package/lib/components/progress-bar/ProgressBar.styles.d.ts +1 -0
- package/lib/components/progress-bar/ProgressBar.styles.js +2 -1
- package/lib/components/progress-bar/ProgressBar.styles.js.map +1 -1
- package/lib/components/tooltip/Tooltip.js +3 -1
- package/lib/components/tooltip/Tooltip.js.map +1 -1
- package/lib/components/tooltip/interface.d.ts +5 -0
- package/lib/components/tooltip/interface.js.map +1 -1
- package/lib/components/tooltip/tooltip-item/TooltipItem.d.ts +5 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js +10 -2
- package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -1
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +2 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +6 -1
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -1
- package/package.json +2 -2
|
@@ -53,7 +53,7 @@ const StyledFilterButtonItemBorder = exports.StyledFilterButtonItemBorder = _sty
|
|
|
53
53
|
height: 100%;
|
|
54
54
|
width: 100%;
|
|
55
55
|
opacity: 0.4;
|
|
56
|
-
z-index:
|
|
56
|
+
z-index: 0;
|
|
57
57
|
border-radius: ${_ref4 => {
|
|
58
58
|
let {
|
|
59
59
|
shape
|
|
@@ -79,7 +79,7 @@ const StyledMotionFilterButtonItemBackground = exports.StyledMotionFilterButtonI
|
|
|
79
79
|
left: 0;
|
|
80
80
|
height: 100%;
|
|
81
81
|
width: 100%;
|
|
82
|
-
z-index:
|
|
82
|
+
z-index: 0;
|
|
83
83
|
opacity: ${_ref6 => {
|
|
84
84
|
let {
|
|
85
85
|
isSelected
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterButton.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_types","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","StyledFilterButtonItem","exports","styled","div","_ref","size","FilterButtonSize","Normal","_ref2","isSelected","css","StyledFilterButtonItemLabel","StyledFilterButtonItemLabelText","p","_ref3","theme","text","StyledFilterButtonItemBorder","_ref4","shape","FilterButtonItemShape","Round","_ref5","color","headline","StyledMotionFilterButtonItemBackground","motion","_ref6","_ref7","_ref8"],"sources":["../../../../src/components/filter-buttons/filter-button/FilterButton.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport type { CSSProperties } from 'react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\nimport { FilterButtonItemShape, FilterButtonSize } from '../types';\n\ntype StyledFilterButtonItemProps = WithTheme<{ size: FilterButtonSize; isSelected: boolean }>;\n\nexport const StyledFilterButtonItem = styled.div<StyledFilterButtonItemProps>`\n position: relative;\n font-size: ${({ size }) => (size === FilterButtonSize.Normal ? 15 : 12)}px;\n cursor: pointer;\n user-select: none;\n padding: 3px 14px;\n\n &:hover > div:last-child {\n ${({ isSelected }) =>\n !isSelected &&\n css`\n opacity: 0.2;\n `}\n }\n`;\n\nexport const StyledFilterButtonItemLabel = styled.div`\n display: flex;\n gap: 5px;\n align-items: center;\n`;\n\ntype StyledFilterButtonItemLabelTextProps = WithTheme<unknown>;\n\nexport const StyledFilterButtonItemLabelText = styled.p<StyledFilterButtonItemLabelTextProps>`\n color: ${({ theme }: StyledFilterButtonItemLabelTextProps) => theme.text};\n margin-top: 2px;\n`;\n\ntype StyledFilterButtonItemBorderProps = WithTheme<{\n shape: FilterButtonItemShape;\n color: CSSProperties['color'];\n isSelected: boolean;\n}>;\n\nexport const StyledFilterButtonItemBorder = styled.div<StyledFilterButtonItemBorderProps>`\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n opacity: 0.4;\n z-index:
|
|
1
|
+
{"version":3,"file":"FilterButton.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_types","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","StyledFilterButtonItem","exports","styled","div","_ref","size","FilterButtonSize","Normal","_ref2","isSelected","css","StyledFilterButtonItemLabel","StyledFilterButtonItemLabelText","p","_ref3","theme","text","StyledFilterButtonItemBorder","_ref4","shape","FilterButtonItemShape","Round","_ref5","color","headline","StyledMotionFilterButtonItemBackground","motion","_ref6","_ref7","_ref8"],"sources":["../../../../src/components/filter-buttons/filter-button/FilterButton.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport type { CSSProperties } from 'react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\nimport { FilterButtonItemShape, FilterButtonSize } from '../types';\n\ntype StyledFilterButtonItemProps = WithTheme<{ size: FilterButtonSize; isSelected: boolean }>;\n\nexport const StyledFilterButtonItem = styled.div<StyledFilterButtonItemProps>`\n position: relative;\n font-size: ${({ size }) => (size === FilterButtonSize.Normal ? 15 : 12)}px;\n cursor: pointer;\n user-select: none;\n padding: 3px 14px;\n\n &:hover > div:last-child {\n ${({ isSelected }) =>\n !isSelected &&\n css`\n opacity: 0.2;\n `}\n }\n`;\n\nexport const StyledFilterButtonItemLabel = styled.div`\n display: flex;\n gap: 5px;\n align-items: center;\n`;\n\ntype StyledFilterButtonItemLabelTextProps = WithTheme<unknown>;\n\nexport const StyledFilterButtonItemLabelText = styled.p<StyledFilterButtonItemLabelTextProps>`\n color: ${({ theme }: StyledFilterButtonItemLabelTextProps) => theme.text};\n margin-top: 2px;\n`;\n\ntype StyledFilterButtonItemBorderProps = WithTheme<{\n shape: FilterButtonItemShape;\n color: CSSProperties['color'];\n isSelected: boolean;\n}>;\n\nexport const StyledFilterButtonItemBorder = styled.div<StyledFilterButtonItemBorderProps>`\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n opacity: 0.4;\n z-index: 0;\n border-radius: ${({ shape }) => (shape === FilterButtonItemShape.Round ? 100 : 0)}px;\n ${({ color, theme, isSelected }: StyledFilterButtonItemBorderProps) =>\n !isSelected &&\n css`\n border-width: 1px;\n border-style: solid;\n border-color: ${color ?? theme.headline};\n `};\n`;\n\ntype StyledFilterButtonItemBackgroundProps = WithTheme<{\n shape: FilterButtonItemShape;\n color: CSSProperties['color'];\n isSelected: boolean;\n}>;\n\nexport const StyledMotionFilterButtonItemBackground = styled(\n motion.div\n)<StyledFilterButtonItemBackgroundProps>`\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 0;\n opacity: ${({ isSelected }) => (isSelected ? 0.4 : 0)};\n transition: opacity 0.5s ease;\n border-radius: ${({ shape }) => (shape === FilterButtonItemShape.Round ? 100 : 0)}px;\n background-color: ${({ color, theme }: StyledFilterButtonItemBackgroundProps) =>\n color ?? theme.headline};\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAAmE,SAAAI,yBAAAC,CAAA,6BAAAC,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W,CAAC,GAAAkB,KAAA;EAAA,OAAMlB,UAAU,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AAC1D;AACA,qBAAqBmB,KAAA;EAAA,IAAC;IAAET;EAAM,CAAC,GAAAS,KAAA;EAAA,OAAMT,KAAK,KAAKC,4BAAqB,CAACC,KAAK,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AACtF,wBAAwBQ,KAAA;EAAA,IAAC;IAAEN,KAAK;IAAER;EAA6C,CAAC,GAAAc,KAAA;EAAA,OACxEN,KAAK,IAAIR,KAAK,CAACS,QAAQ;AAAA,CAAC;AAChC,CAAC"}
|
|
@@ -88,11 +88,17 @@ const Popup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
88
88
|
handleShow();
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
-
const handleMouseLeave = () => {
|
|
91
|
+
const handleMouseLeave = (0, _react.useCallback)(event => {
|
|
92
92
|
if (shouldShowOnHover) {
|
|
93
|
+
if (event.currentTarget.dataset.ispopup === 'true') {
|
|
94
|
+
handleHide();
|
|
95
|
+
}
|
|
96
|
+
if (event.relatedTarget && (event.relatedTarget === popupContentRef.current || popupContentRef.current?.contains(event.relatedTarget))) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
93
99
|
handleHide();
|
|
94
100
|
}
|
|
95
|
-
};
|
|
101
|
+
}, [handleHide, shouldShowOnHover]);
|
|
96
102
|
const handleDocumentClick = (0, _react.useCallback)(event => {
|
|
97
103
|
if (!popupContentRef.current?.contains(event.target)) {
|
|
98
104
|
event.preventDefault();
|
|
@@ -136,9 +142,10 @@ const Popup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
136
142
|
content: content,
|
|
137
143
|
key: `tooltip_${uuid}`,
|
|
138
144
|
alignment: alignment,
|
|
139
|
-
ref: popupContentRef
|
|
145
|
+
ref: popupContentRef,
|
|
146
|
+
onMouseLeave: handleMouseLeave
|
|
140
147
|
})), container));
|
|
141
|
-
}, [alignment, container, content, coordinates, isOpen, uuid]);
|
|
148
|
+
}, [alignment, container, content, coordinates, handleMouseLeave, isOpen, uuid]);
|
|
142
149
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Popup.StyledPopupPseudo, {
|
|
143
150
|
ref: popupPseudoContentRef,
|
|
144
151
|
menuHeight: menuHeight
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.js","names":["_chaynsApi","require","_framerMotion","_react","_interopRequireWildcard","_reactDom","_uuid","_PopupContent","_interopRequireDefault","_Popup","_types","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Popup","forwardRef","_ref","ref","content","onShow","onHide","children","shouldShowOnHover","yOffset","coordinates","setCoordinates","useState","x","y","container","document","querySelector","body","alignment","setAlignment","PopupAlignment","TopLeft","isOpen","setIsOpen","portal","setPortal","menuHeight","setMenuHeight","uuid","useUuid","popupContentRef","useRef","popupPseudoContentRef","popupRef","handleShow","useCallback","current","height","pseudoHeight","width","pseudoWidth","getBoundingClientRect","childrenHeight","left","childrenLeft","top","childrenTop","childrenWidth","BottomRight","BottomLeft","TopRight","handleChildrenClick","handleHide","handleMouseEnter","handleMouseLeave","handleDocumentClick","event","contains","target","preventDefault","stopPropagation","useImperativeHandle","hide","show","useEffect","getWindowMetrics","then","result","topBarHeight","addEventListener","window","removeEventListener","createPortal","createElement","AnimatePresence","initial","key","Fragment","StyledPopupPseudo","StyledPopup","onClick","onMouseLeave","onMouseEnter","displayName","_default","exports"],"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 useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useUuid } from '../../hooks/uuid';\nimport PopupContent from './popup-content/PopupContent';\nimport { StyledPopup, StyledPopupPseudo } from './Popup.styles';\nimport { PopupAlignment, PopupCoordinates, PopupRef } from './types';\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 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 * The Y offset of the popup to the children.\n */\n yOffset?: number;\n};\n\nconst Popup = forwardRef<PopupRef, PopupProps>(\n ({ content, onShow, onHide, children, shouldShowOnHover = false, yOffset = 0 }, ref) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n const container = document.querySelector('.tapp') || document.body;\n\n const [alignment, setAlignment] = useState<PopupAlignment>(PopupAlignment.TopLeft);\n const [isOpen, setIsOpen] = useState(false);\n const [portal, setPortal] = useState<ReactPortal>();\n const [menuHeight, setMenuHeight] = useState(0);\n\n const uuid = useUuid();\n\n // ToDo: Replace with hook if new chayns api is ready\n const popupContentRef = useRef<HTMLDivElement>(null);\n const popupPseudoContentRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n const handleShow = useCallback(() => {\n if (popupRef.current && popupPseudoContentRef.current) {\n const { height: pseudoHeight, width: pseudoWidth } =\n popupPseudoContentRef.current.getBoundingClientRect();\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 if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.BottomRight);\n } else {\n setAlignment(PopupAlignment.BottomLeft);\n }\n\n setCoordinates({\n x: childrenLeft + childrenWidth / 2,\n y: childrenTop + childrenHeight + yOffset,\n });\n } else {\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.TopRight);\n } else {\n setAlignment(PopupAlignment.TopLeft);\n }\n\n setCoordinates({\n x: childrenLeft + childrenWidth / 2,\n y: childrenTop - yOffset,\n });\n }\n\n setIsOpen(true);\n }\n }, [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 = () => {\n if (shouldShowOnHover) {\n handleShow();\n }\n };\n\n const handleMouseLeave = () => {\n if (shouldShowOnHover) {\n handleHide();\n }\n };\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (!popupContentRef.current?.contains(event.target as Node)) {\n event.preventDefault();\n event.stopPropagation();\n\n if (!shouldShowOnHover) {\n handleHide();\n }\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 <PopupContent\n coordinates={coordinates}\n content={content}\n key={`tooltip_${uuid}`}\n alignment={alignment}\n ref={popupContentRef}\n />\n )}\n </AnimatePresence>,\n container,\n ),\n );\n }, [alignment, container, content, coordinates, isOpen, uuid]);\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 >\n {children}\n </StyledPopup>\n {portal}\n </>\n );\n },\n);\n\nPopup.displayName = 'Popup';\n\nexport default Popup;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AAUA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAAqE,SAAAO,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,OAAAM,CAAA,KAAAC,SAAA,UAAAC,C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ACT8B,WAAW,EAAEA,WAAY;MACzBN,OAAO,EAAEA,OAAQ;MACjByE,GAAG,EAAG,WAAUhD,IAAK,EAAE;MACvBV,SAAS,EAAEA,SAAU;MACrBhB,GAAG,EAAE4B;IAAgB,CACxB,CAEQ,CAAC,EAClBhB,SACJ,CACJ,CAAC;EACL,CAAC,EAAE,CAACI,SAAS,EAAEJ,SAAS,EAAEX,OAAO,EAAEM,WAAW,EAAEa,MAAM,EAAEM,IAAI,CAAC,CAAC;EAE9D,oBACI3D,MAAA,CAAAU,OAAA,CAAA8F,aAAA,CAAAxG,MAAA,CAAAU,OAAA,CAAAkG,QAAA,qBACI5G,MAAA,CAAAU,OAAA,CAAA8F,aAAA,CAAClG,MAAA,CAAAuG,iBAAiB;IAAC5E,GAAG,EAAE8B,qBAAsB;IAACN,UAAU,EAAEA;EAAW,GACjEvB,OACc,CAAC,eACpBlC,MAAA,CAAAU,OAAA,CAAA8F,aAAA,CAAClG,MAAA,CAAAwG,WAAW;IACR7E,GAAG,EAAE+B,QAAS;IACd+C,OAAO,EAAE7B,mBAAoB;IAC7B8B,YAAY,EAAE3B,gBAAiB;IAC/B4B,YAAY,EAAE7B;EAAiB,GAE9B/C,QACQ,CAAC,EACbkB,MACH,CAAC;AAEX,CACJ,CAAC;AAEDzB,KAAK,CAACoF,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA1G,OAAA,GAEboB,KAAK"}
|
|
1
|
+
{"version":3,"file":"Popup.js","names":["_chaynsApi","require","_framerMotion","_react","_interopRequireWildcard","_reactDom","_uuid","_PopupContent","_interopRequireDefault","_Popup","_types","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Popup","forwardRef","_ref","ref","content","onShow","onHide","children","shouldShowOnHover","yOffset","coordinates","setCoordinates","useState","x","y","container","document","querySelector","body","alignment","setAlignment","PopupAlignment","TopLeft","isOpen","setIsOpen","portal","setPortal","menuHeight","setMenuHeight","uuid","useUuid","popupContentRef","useRef","popupPseudoContentRef","popupRef","handleShow","useCallback","current","height","pseudoHeight","width","pseudoWidth","getBoundingClientRect","childrenHeight","left","childrenLeft","top","childrenTop","childrenWidth","BottomRight","BottomLeft","TopRight","handleChildrenClick","handleHide","handleMouseEnter","handleMouseLeave","event","currentTarget","dataset","ispopup","relatedTarget","contains","handleDocumentClick","target","preventDefault","stopPropagation","useImperativeHandle","hide","show","useEffect","getWindowMetrics","then","result","topBarHeight","addEventListener","window","removeEventListener","createPortal","createElement","AnimatePresence","initial","key","onMouseLeave","Fragment","StyledPopupPseudo","StyledPopup","onClick","onMouseEnter","displayName","_default","exports"],"sources":["../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { getWindowMetrics } from 'chayns-api';\nimport { AnimatePresence } from 'framer-motion';\nimport React, {\n forwardRef,\n MouseEvent,\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 PopupContent from './popup-content/PopupContent';\nimport { StyledPopup, StyledPopupPseudo } from './Popup.styles';\nimport { PopupAlignment, PopupCoordinates, PopupRef } from './types';\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 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 * The Y offset of the popup to the children.\n */\n yOffset?: number;\n};\n\nconst Popup = forwardRef<PopupRef, PopupProps>(\n ({ content, onShow, onHide, children, shouldShowOnHover = false, yOffset = 0 }, ref) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n const container = document.querySelector('.tapp') || document.body;\n\n const [alignment, setAlignment] = useState<PopupAlignment>(PopupAlignment.TopLeft);\n const [isOpen, setIsOpen] = useState(false);\n const [portal, setPortal] = useState<ReactPortal>();\n const [menuHeight, setMenuHeight] = useState(0);\n\n const uuid = useUuid();\n\n // ToDo: Replace with hook if new chayns api is ready\n const popupContentRef = useRef<HTMLDivElement>(null);\n const popupPseudoContentRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n const handleShow = useCallback(() => {\n if (popupRef.current && popupPseudoContentRef.current) {\n const { height: pseudoHeight, width: pseudoWidth } =\n popupPseudoContentRef.current.getBoundingClientRect();\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 if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.BottomRight);\n } else {\n setAlignment(PopupAlignment.BottomLeft);\n }\n\n setCoordinates({\n x: childrenLeft + childrenWidth / 2,\n y: childrenTop + childrenHeight + yOffset,\n });\n } else {\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.TopRight);\n } else {\n setAlignment(PopupAlignment.TopLeft);\n }\n\n setCoordinates({\n x: childrenLeft + childrenWidth / 2,\n y: childrenTop - yOffset,\n });\n }\n\n setIsOpen(true);\n }\n }, [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 = () => {\n if (shouldShowOnHover) {\n handleShow();\n }\n };\n\n const handleMouseLeave = useCallback(\n (event: MouseEvent) => {\n if (shouldShowOnHover) {\n if ((event.currentTarget as HTMLElement).dataset.ispopup === 'true') {\n handleHide();\n }\n\n if (\n event.relatedTarget &&\n (event.relatedTarget === popupContentRef.current ||\n popupContentRef.current?.contains(event.relatedTarget as Node))\n ) {\n return;\n }\n\n handleHide();\n }\n },\n [handleHide, shouldShowOnHover]\n );\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (!popupContentRef.current?.contains(event.target as Node)) {\n event.preventDefault();\n event.stopPropagation();\n\n if (!shouldShowOnHover) {\n handleHide();\n }\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 <PopupContent\n coordinates={coordinates}\n content={content}\n key={`tooltip_${uuid}`}\n alignment={alignment}\n ref={popupContentRef}\n onMouseLeave={handleMouseLeave}\n />\n )}\n </AnimatePresence>,\n container\n )\n );\n }, [alignment, container, content, coordinates, handleMouseLeave, isOpen, uuid]);\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 >\n {children}\n </StyledPopup>\n {portal}\n </>\n );\n }\n);\n\nPopup.displayName = 'Popup';\n\nexport default Popup;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;A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aAAA,CAAAM,OAAY;MACT8B,WAAW,EAAEA,WAAY;MACzBN,OAAO,EAAEA,OAAQ;MACjB6E,GAAG,EAAG,WAAUpD,IAAK,EAAE;MACvBV,SAAS,EAAEA,SAAU;MACrBhB,GAAG,EAAE4B,eAAgB;MACrBmD,YAAY,EAAE3B;IAAiB,CAClC,CAEQ,CAAC,EAClBxC,SACJ,CACJ,CAAC;EACL,CAAC,EAAE,CAACI,SAAS,EAAEJ,SAAS,EAAEX,OAAO,EAAEM,WAAW,EAAE6C,gBAAgB,EAAEhC,MAAM,EAAEM,IAAI,CAAC,CAAC;EAEhF,oBACI3D,MAAA,CAAAU,OAAA,CAAAkG,aAAA,CAAA5G,MAAA,CAAAU,OAAA,CAAAuG,QAAA,qBACIjH,MAAA,CAAAU,OAAA,CAAAkG,aAAA,CAACtG,MAAA,CAAA4G,iBAAiB;IAACjF,GAAG,EAAE8B,qBAAsB;IAACN,UAAU,EAAEA;EAAW,GACjEvB,OACc,CAAC,eACpBlC,MAAA,CAAAU,OAAA,CAAAkG,aAAA,CAACtG,MAAA,CAAA6G,WAAW;IACRlF,GAAG,EAAE+B,QAAS;IACdoD,OAAO,EAAElC,mBAAoB;IAC7B8B,YAAY,EAAE3B,gBAAiB;IAC/BgC,YAAY,EAAEjC;EAAiB,GAE9B/C,QACQ,CAAC,EACbkB,MACH,CAAC;AAEX,CACJ,CAAC;AAEDzB,KAAK,CAACwF,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA9G,OAAA,GAEboB,KAAK"}
|
|
@@ -10,6 +10,8 @@ const StyledPopup = exports.StyledPopup = _styledComponents.default.span`
|
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
position: relative;
|
|
12
12
|
display: flex;
|
|
13
|
+
width: fit-content;
|
|
14
|
+
height: fit-content;
|
|
13
15
|
`;
|
|
14
16
|
const StyledPopupPseudo = exports.StyledPopupPseudo = _styledComponents.default.div`
|
|
15
17
|
top: ${_ref => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledPopup","exports","styled","span","StyledPopupPseudo","div","_ref","menuHeight"],"sources":["../../../src/components/popup/Popup.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledPopup = styled.span`\n cursor: pointer;\n position: relative;\n display: flex;\n`;\n\nexport const StyledPopupPseudo = styled.div<{\n menuHeight: number;\n}>`\n top: ${({ menuHeight }) => `${menuHeight - 0}px`};\n left: 0;\n pointer-events: none;\n visibility: hidden;\n position: absolute;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAGE,yBAAM,CAACC,IAAK;AACvC;AACA;AACA;AACA,CAAC;AAEM,MAAMC,iBAAiB,GAAAH,OAAA,CAAAG,iBAAA,GAAGF,yBAAM,CAACG,GAErC;AACH,WAAWC,IAAA;EAAA,IAAC;IAAEC;EAAW,CAAC,GAAAD,IAAA;EAAA,OAAM,GAAEC,UAAU,GAAG,CAAE,IAAG;AAAA,CAAC;AACrD;AACA;AACA;AACA;AACA,CAAC"}
|
|
1
|
+
{"version":3,"file":"Popup.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledPopup","exports","styled","span","StyledPopupPseudo","div","_ref","menuHeight"],"sources":["../../../src/components/popup/Popup.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledPopup = styled.span`\n cursor: pointer;\n position: relative;\n display: flex;\n width: fit-content;\n height: fit-content;\n`;\n\nexport const StyledPopupPseudo = styled.div<{\n menuHeight: number;\n}>`\n top: ${({ menuHeight }) => `${menuHeight - 0}px`};\n left: 0;\n pointer-events: none;\n visibility: hidden;\n position: absolute;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAGE,yBAAM,CAACC,IAAK;AACvC;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,iBAAiB,GAAAH,OAAA,CAAAG,iBAAA,GAAGF,yBAAM,CAACG,GAErC;AACH,WAAWC,IAAA;EAAA,IAAC;IAAEC;EAAW,CAAC,GAAAD,IAAA;EAAA,OAAM,GAAEC,UAAU,GAAG,CAAE,IAAG;AAAA,CAAC;AACrD;AACA;AACA;AACA;AACA,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
1
|
+
import React, { type MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { PopupAlignment, PopupCoordinates } from '../types';
|
|
3
3
|
type PopupContentProps = {
|
|
4
4
|
alignment: PopupAlignment;
|
|
5
5
|
coordinates: PopupCoordinates;
|
|
6
6
|
content: ReactNode;
|
|
7
|
+
onMouseLeave: MouseEventHandler<HTMLSpanElement>;
|
|
7
8
|
};
|
|
8
9
|
declare const PopupContent: React.ForwardRefExoticComponent<PopupContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export default PopupContent;
|
|
@@ -13,7 +13,8 @@ const PopupContent = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
13
13
|
let {
|
|
14
14
|
alignment,
|
|
15
15
|
coordinates,
|
|
16
|
-
content
|
|
16
|
+
content,
|
|
17
|
+
onMouseLeave
|
|
17
18
|
} = _ref;
|
|
18
19
|
const colorMode = (0, _colorMode.useColorMode)();
|
|
19
20
|
const isBottomLeftAlignment = alignment === _types.PopupAlignment.BottomLeft;
|
|
@@ -40,6 +41,8 @@ const PopupContent = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
40
41
|
},
|
|
41
42
|
position: alignment,
|
|
42
43
|
ref: ref,
|
|
44
|
+
"data-isPopup": "true",
|
|
45
|
+
onMouseLeave: onMouseLeave,
|
|
43
46
|
style: {
|
|
44
47
|
left: coordinates.x,
|
|
45
48
|
top: coordinates.y
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupContent.js","names":["_react","_interopRequireDefault","require","_colorMode","_types","_PopupContent","obj","__esModule","default","PopupContent","React","forwardRef","_ref","ref","alignment","coordinates","content","colorMode","useColorMode","isBottomLeftAlignment","PopupAlignment","BottomLeft","isTopLeftAlignment","TopLeft","isTopRightAlignment","TopRight","percentageOffsetX","percentageOffsetY","anchorOffsetX","anchorOffsetY","exitAndInitialY","createElement","StyledMotionPopupContent","animate","opacity","y","exit","initial","position","style","left","x","top","transition","type","transformTemplate","_ref2","StyledPopupContentInner","displayName","_default","exports"],"sources":["../../../../src/components/popup/popup-content/PopupContent.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { useColorMode } from '../../../hooks/colorMode';\nimport { PopupAlignment, PopupCoordinates } from '../types';\nimport { StyledMotionPopupContent, StyledPopupContentInner } from './PopupContent.styles';\n\ntype PopupContentProps = {\n alignment: PopupAlignment;\n coordinates: PopupCoordinates;\n content: ReactNode;\n};\n\nconst PopupContent = React.forwardRef<HTMLDivElement, PopupContentProps>(\n ({ alignment, coordinates, content }, ref) => {\n const colorMode = useColorMode();\n\n const isBottomLeftAlignment = alignment === PopupAlignment.BottomLeft;\n const isTopLeftAlignment = alignment === PopupAlignment.TopLeft;\n const isTopRightAlignment = alignment === PopupAlignment.TopRight;\n\n const percentageOffsetX = isBottomLeftAlignment || isTopLeftAlignment ? -100 : 0;\n const percentageOffsetY = isTopRightAlignment || isTopLeftAlignment ? -100 : 0;\n\n const anchorOffsetX = isBottomLeftAlignment || isTopLeftAlignment ? 21 : -21;\n const anchorOffsetY = isTopRightAlignment || isTopLeftAlignment ? -21 : 21;\n\n const exitAndInitialY = isTopLeftAlignment || isTopRightAlignment ? -16 : 16;\n\n return (\n <StyledMotionPopupContent\n animate={{ opacity: 1, y: 0 }}\n colorMode={colorMode}\n exit={{ opacity: 0, y: exitAndInitialY }}\n initial={{ opacity: 0, y: exitAndInitialY }}\n position={alignment}\n ref={ref}\n style={{ left: coordinates.x, top: coordinates.y }}\n transition={{ type: 'tween' }}\n transformTemplate={({ y = '0px' }) => `\n translateX(${percentageOffsetX}%)\n translateY(${percentageOffsetY}%)\n translateX(${anchorOffsetX}px)\n translateY(${anchorOffsetY}px)\n translateY(${y})\n `}\n >\n <StyledPopupContentInner>{content}</StyledPopupContentInner>\n </StyledMotionPopupContent>\n );\n }
|
|
1
|
+
{"version":3,"file":"PopupContent.js","names":["_react","_interopRequireDefault","require","_colorMode","_types","_PopupContent","obj","__esModule","default","PopupContent","React","forwardRef","_ref","ref","alignment","coordinates","content","onMouseLeave","colorMode","useColorMode","isBottomLeftAlignment","PopupAlignment","BottomLeft","isTopLeftAlignment","TopLeft","isTopRightAlignment","TopRight","percentageOffsetX","percentageOffsetY","anchorOffsetX","anchorOffsetY","exitAndInitialY","createElement","StyledMotionPopupContent","animate","opacity","y","exit","initial","position","style","left","x","top","transition","type","transformTemplate","_ref2","StyledPopupContentInner","displayName","_default","exports"],"sources":["../../../../src/components/popup/popup-content/PopupContent.tsx"],"sourcesContent":["import React, { type MouseEventHandler, ReactNode } from 'react';\nimport { useColorMode } from '../../../hooks/colorMode';\nimport { PopupAlignment, PopupCoordinates } from '../types';\nimport { StyledMotionPopupContent, StyledPopupContentInner } from './PopupContent.styles';\n\ntype PopupContentProps = {\n alignment: PopupAlignment;\n coordinates: PopupCoordinates;\n content: ReactNode;\n onMouseLeave: MouseEventHandler<HTMLSpanElement>;\n};\n\nconst PopupContent = React.forwardRef<HTMLDivElement, PopupContentProps>(\n ({ alignment, coordinates, content, onMouseLeave }, ref) => {\n const colorMode = useColorMode();\n\n const isBottomLeftAlignment = alignment === PopupAlignment.BottomLeft;\n const isTopLeftAlignment = alignment === PopupAlignment.TopLeft;\n const isTopRightAlignment = alignment === PopupAlignment.TopRight;\n\n const percentageOffsetX = isBottomLeftAlignment || isTopLeftAlignment ? -100 : 0;\n const percentageOffsetY = isTopRightAlignment || isTopLeftAlignment ? -100 : 0;\n\n const anchorOffsetX = isBottomLeftAlignment || isTopLeftAlignment ? 21 : -21;\n const anchorOffsetY = isTopRightAlignment || isTopLeftAlignment ? -21 : 21;\n\n const exitAndInitialY = isTopLeftAlignment || isTopRightAlignment ? -16 : 16;\n\n return (\n <StyledMotionPopupContent\n animate={{ opacity: 1, y: 0 }}\n colorMode={colorMode}\n exit={{ opacity: 0, y: exitAndInitialY }}\n initial={{ opacity: 0, y: exitAndInitialY }}\n position={alignment}\n ref={ref}\n data-isPopup=\"true\"\n onMouseLeave={onMouseLeave}\n style={{ left: coordinates.x, top: coordinates.y }}\n transition={{ type: 'tween' }}\n transformTemplate={({ y = '0px' }) => `\n translateX(${percentageOffsetX}%)\n translateY(${percentageOffsetY}%)\n translateX(${anchorOffsetX}px)\n translateY(${anchorOffsetY}px)\n translateY(${y})\n `}\n >\n <StyledPopupContentInner>{content}</StyledPopupContentInner>\n </StyledMotionPopupContent>\n );\n }\n);\n\nPopupContent.displayName = 'PopupContent';\n\nexport default PopupContent;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAA0F,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAS1F,MAAMG,YAAY,gBAAGC,cAAK,CAACC,UAAU,CACjC,CAAAC,IAAA,EAAoDC,G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EAAE1B,WAAW,CAAC2B,CAAC;MAAEC,GAAG,EAAE5B,WAAW,CAACqB;IAAE,CAAE;IACnDQ,UAAU,EAAE;MAAEC,IAAI,EAAE;IAAQ,CAAE;IAC9BC,iBAAiB,EAAEC,KAAA;MAAA,IAAC;QAAEX,CAAC,GAAG;MAAM,CAAC,GAAAW,KAAA;MAAA,OAAM;AACvD,iCAAiCpB,iBAAkB;AACnD,iCAAiCC,iBAAkB;AACnD,iCAAiCC,aAAc;AAC/C,iCAAiCC,aAAc;AAC/C,iCAAiCM,CAAE;AACnC,iBAAiB;IAAA;EAAC,gBAEFpC,MAAA,CAAAQ,OAAA,CAAAwB,aAAA,CAAC3B,aAAA,CAAA2C,uBAAuB,QAAEhC,OAAiC,CACrC,CAAC;AAEnC,CACJ,CAAC;AAEDP,YAAY,CAACwC,WAAW,GAAG,cAAc;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA3C,OAAA,GAE3BC,YAAY"}
|
|
@@ -10,7 +10,8 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
const ProgressBar = _ref => {
|
|
12
12
|
let {
|
|
13
|
-
percentage
|
|
13
|
+
percentage,
|
|
14
|
+
lable
|
|
14
15
|
} = _ref;
|
|
15
16
|
const [internalPercentage, setInternalPercentage] = (0, _react.useState)(0);
|
|
16
17
|
(0, _react.useEffect)(() => {
|
|
@@ -31,7 +32,7 @@ const ProgressBar = _ref => {
|
|
|
31
32
|
transition: {
|
|
32
33
|
type: 'tween'
|
|
33
34
|
}
|
|
34
|
-
}), /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarBackground, null)), [internalPercentage]);
|
|
35
|
+
}), /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarBackground, null), lable && /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarLable, null, lable)), [lable, internalPercentage]);
|
|
35
36
|
};
|
|
36
37
|
ProgressBar.displayName = 'ProgressBar';
|
|
37
38
|
var _default = exports.default = ProgressBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["_react","_interopRequireWildcard","require","_ProgressBar","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ProgressBar","_ref","percentage","internalPercentage","setInternalPercentage","useState","useEffect","useMemo","createElement","StyledProgressBar","StyledMotionProgressBarProgress","initial","width","animate","exit","transition","type","StyledProgressBarBackground","displayName","_default","exports"],"sources":["../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import React, { FC, useEffect, useMemo, useState } from 'react';\nimport {\n StyledMotionProgressBarProgress,\n StyledProgressBar,\n StyledProgressBarBackground,\n} from './ProgressBar.styles';\n\nexport type ProgressBarProps = {\n /**\n * The percentage of the progress. Number between 0 and 100.\n */\n percentage: number;\n};\n\nconst ProgressBar: FC<ProgressBarProps> = ({ percentage }) => {\n const [internalPercentage, setInternalPercentage] = useState(0);\n\n useEffect(() => {\n if (percentage >= 0 && percentage <= 100) {\n setInternalPercentage(percentage);\n }\n }, [percentage]);\n\n return useMemo(\n () => (\n <StyledProgressBar>\n <StyledMotionProgressBarProgress\n initial={{ width: '0%' }}\n animate={{ width: `${internalPercentage}%` }}\n exit={{ width: '0%' }}\n transition={{ type: 'tween' }}\n />\n <StyledProgressBarBackground />\n </StyledProgressBar>\n ),\n [internalPercentage]\n );\n};\n\nProgressBar.displayName = 'ProgressBar';\n\nexport default ProgressBar;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["_react","_interopRequireWildcard","require","_ProgressBar","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ProgressBar","_ref","percentage","lable","internalPercentage","setInternalPercentage","useState","useEffect","useMemo","createElement","StyledProgressBar","StyledMotionProgressBarProgress","initial","width","animate","exit","transition","type","StyledProgressBarBackground","StyledProgressBarLable","displayName","_default","exports"],"sources":["../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import React, { FC, useEffect, useMemo, useState } from 'react';\nimport {\n StyledMotionProgressBarProgress,\n StyledProgressBar,\n StyledProgressBarBackground,\n StyledProgressBarLable,\n} from './ProgressBar.styles';\n\nexport type ProgressBarProps = {\n /**\n * The lable that should be displayed under the progressbar.\n */\n lable?: string;\n /**\n * The percentage of the progress. Number between 0 and 100.\n */\n percentage: number;\n};\n\nconst ProgressBar: FC<ProgressBarProps> = ({ percentage, lable }) => {\n const [internalPercentage, setInternalPercentage] = useState(0);\n\n useEffect(() => {\n if (percentage >= 0 && percentage <= 100) {\n setInternalPercentage(percentage);\n }\n }, [percentage]);\n\n return useMemo(\n () => (\n <StyledProgressBar>\n <StyledMotionProgressBarProgress\n initial={{ width: '0%' }}\n animate={{ width: `${internalPercentage}%` }}\n exit={{ width: '0%' }}\n transition={{ type: 'tween' }}\n />\n <StyledProgressBarBackground />\n {lable && <StyledProgressBarLable>{lable}</StyledProgressBarLable>}\n </StyledProgressBar>\n ),\n [lable, internalPercentage]\n );\n};\n\nProgressBar.displayName = 'ProgressBar';\n\nexport default ProgressBar;\n"],"mappings":";;;;;;AAAA,IAAAA,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UAAU;IAAEC;EAAM,CAAC,GAAAF,IAAA;EAC5D,MAAM,CAACG,kBAAkB,EAAEC,qBAAqB,CAAC,GAAG,IAAAC,eAAQ,EAAC,CAAC,CAAC;EAE/D,IAAAC,gBAAS,EAAC,MAAM;IACZ,IAAIL,UAAU,IAAI,CAAC,IAAIA,UAAU,IAAI,GAAG,EAAE;MACtCG,qBAAqB,CAACH,UAAU,CAAC;IACrC;EACJ,CAAC,EAAE,CAACA,UAAU,CAAC,CAAC;EAEhB,OAAO,IAAAM,cAAO,EACV,mBACIjC,MAAA,CAAAU,OAAA,CAAAwB,aAAA,CAAC/B,YAAA,CAAAgC,iBAAiB,qBACdnC,MAAA,CAAAU,OAAA,CAAAwB,aAAA,CAAC/B,YAAA,CAAAiC,+BAA+B;IAC5BC,OAAO,EAAE;MAAEC,KAAK,EAAE;IAAK,CAAE;IACzBC,OAAO,EAAE;MAAED,KAAK,EAAG,GAAET,kBAAmB;IAAG,CAAE;IAC7CW,IAAI,EAAE;MAAEF,KAAK,EAAE;IAAK,CAAE;IACtBG,UAAU,EAAE;MAAEC,IAAI,EAAE;IAAQ;EAAE,CACjC,CAAC,eACF1C,MAAA,CAAAU,OAAA,CAAAwB,aAAA,CAAC/B,YAAA,CAAAwC,2BAA2B,MAAE,CAAC,EAC9Bf,KAAK,iBAAI5B,MAAA,CAAAU,OAAA,CAAAwB,aAAA,CAAC/B,YAAA,CAAAyC,sBAAsB,QAAEhB,KAA8B,CAClD,CACtB,EACD,CAACA,KAAK,EAAEC,kBAAkB,CAC9B,CAAC;AACL,CAAC;AAEDJ,WAAW,CAACoB,WAAW,GAAG,aAAa;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArC,OAAA,GAEzBe,WAAW"}
|
|
@@ -269,3 +269,4 @@ export declare const StyledMotionProgressBarProgress: import("styled-components"
|
|
|
269
269
|
} & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLDivElement>, {
|
|
270
270
|
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
271
271
|
}>> & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
|
|
272
|
+
export declare const StyledProgressBarLable: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyledProgressBarBackground = exports.StyledProgressBar = exports.StyledMotionProgressBarProgress = void 0;
|
|
6
|
+
exports.StyledProgressBarLable = exports.StyledProgressBarBackground = exports.StyledProgressBar = exports.StyledMotionProgressBarProgress = void 0;
|
|
7
7
|
var _framerMotion = require("framer-motion");
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -33,4 +33,5 @@ const StyledMotionProgressBarProgress = exports.StyledMotionProgressBarProgress
|
|
|
33
33
|
return theme.headline;
|
|
34
34
|
}};
|
|
35
35
|
`;
|
|
36
|
+
const StyledProgressBarLable = exports.StyledProgressBarLable = _styledComponents.default.div``;
|
|
36
37
|
//# sourceMappingURL=ProgressBar.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledProgressBar","exports","styled","div","StyledProgressBarBackground","_ref","theme","StyledMotionProgressBarProgress","motion","_ref2","headline"],"sources":["../../../src/components/progress-bar/ProgressBar.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledProgressBar = styled.div`\n position: relative;\n`;\n\ntype StyledProgressBarBackgroundProps = WithTheme<unknown>;\nexport const StyledProgressBarBackground = styled.div<StyledProgressBarBackgroundProps>`\n height: 10px;\n width: 100%;\n background-color: ${({ theme }: StyledProgressBarBackgroundProps) => theme['100']};\n`;\n\ntype StyledProgressBarProgressProps = WithTheme<unknown>;\nexport const StyledMotionProgressBarProgress = styled(motion.div)<StyledProgressBarProgressProps>`\n height: 10px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n background-color: ${({ theme }: StyledProgressBarProgressProps) => theme.headline};\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGhC,MAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,yBAAM,CAACC,GAAI;AAC5C;AACA,CAAC;AAGM,MAAMC,2BAA2B,GAAAH,OAAA,CAAAG,2BAAA,GAAGF,yBAAM,CAACC,GAAsC;AACxF;AACA;AACA,wBAAwBE,IAAA;EAAA,IAAC;IAAEC;EAAwC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACtF,CAAC;AAGM,MAAMC,+BAA+B,GAAAN,OAAA,CAAAM,+BAAA,GAAG,IAAAL,yBAAM,EAACM,oBAAM,CAACL,GAAG,CAAkC;AAClG;AACA;AACA;AACA;AACA;AACA,wBAAwBM,KAAA;EAAA,IAAC;IAAEH;EAAsC,CAAC,GAAAG,KAAA;EAAA,OAAKH,KAAK,CAACI,QAAQ;AAAA,CAAC;AACtF,CAAC"}
|
|
1
|
+
{"version":3,"file":"ProgressBar.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledProgressBar","exports","styled","div","StyledProgressBarBackground","_ref","theme","StyledMotionProgressBarProgress","motion","_ref2","headline","StyledProgressBarLable"],"sources":["../../../src/components/progress-bar/ProgressBar.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledProgressBar = styled.div`\n position: relative;\n`;\n\ntype StyledProgressBarBackgroundProps = WithTheme<unknown>;\nexport const StyledProgressBarBackground = styled.div<StyledProgressBarBackgroundProps>`\n height: 10px;\n width: 100%;\n background-color: ${({ theme }: StyledProgressBarBackgroundProps) => theme['100']};\n`;\n\ntype StyledProgressBarProgressProps = WithTheme<unknown>;\nexport const StyledMotionProgressBarProgress = styled(motion.div)<StyledProgressBarProgressProps>`\n height: 10px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n background-color: ${({ theme }: StyledProgressBarProgressProps) => theme.headline};\n`;\n\nexport const StyledProgressBarLable = styled.div``;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGhC,MAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,yBAAM,CAACC,GAAI;AAC5C;AACA,CAAC;AAGM,MAAMC,2BAA2B,GAAAH,OAAA,CAAAG,2BAAA,GAAGF,yBAAM,CAACC,GAAsC;AACxF;AACA;AACA,wBAAwBE,IAAA;EAAA,IAAC;IAAEC;EAAwC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACtF,CAAC;AAGM,MAAMC,+BAA+B,GAAAN,OAAA,CAAAM,+BAAA,GAAG,IAAAL,yBAAM,EAACM,oBAAM,CAACL,GAAG,CAAkC;AAClG;AACA;AACA;AACA;AACA;AACA,wBAAwBM,KAAA;EAAA,IAAC;IAAEH;EAAsC,CAAC,GAAAG,KAAA;EAAA,OAAKH,KAAK,CAACI,QAAQ;AAAA,CAAC;AACtF,CAAC;AAEM,MAAMC,sBAAsB,GAAAV,OAAA,CAAAU,sBAAA,GAAGT,yBAAM,CAACC,GAAI,EAAC"}
|
|
@@ -22,7 +22,9 @@ const Tooltip = _ref => {
|
|
|
22
22
|
shouldShowOnHover: true,
|
|
23
23
|
content: /*#__PURE__*/_react.default.createElement(_TooltipItem.default, {
|
|
24
24
|
text: item.text,
|
|
25
|
-
headline: item.headline
|
|
25
|
+
headline: item.headline,
|
|
26
|
+
imageUrl: item.imageUrl,
|
|
27
|
+
button: item.button
|
|
26
28
|
}),
|
|
27
29
|
ref: tooltipRef
|
|
28
30
|
}, children)), [isDisabled, children, item]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["_react","_interopRequireWildcard","require","_Popup","_interopRequireDefault","_TooltipItem","_Tooltip","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Tooltip","_ref","item","children","isDisabled","tooltipRef","useRef","useMemo","createElement","StyledTooltip","shouldShowOnHover","content","text","headline","ref","displayName","_default","exports"],"sources":["../../../src/components/tooltip/Tooltip.tsx"],"sourcesContent":["import React, { FC, ReactNode, useMemo, useRef } from 'react';\nimport Popup from '../popup/Popup';\nimport type { PopupRef } from '../popup/types';\nimport type { ITooltipItem } from './interface';\nimport TooltipItem from './tooltip-item/TooltipItem';\nimport { StyledTooltip } from './Tooltip.styles';\n\nexport type TooltipProps = {\n /**\n * The elements that the tooltip should surround.\n */\n children: ReactNode;\n /**\n * The content that should be displayed.\n */\n item: ITooltipItem;\n /**\n * whether the tooltip should be shown.\n */\n isDisabled?: boolean;\n};\n\nconst Tooltip: FC<TooltipProps> = ({ item, children, isDisabled }) => {\n const tooltipRef = useRef<PopupRef>(null);\n\n return useMemo(\n () => (\n <StyledTooltip>\n {isDisabled ? (\n children\n ) : (\n <Popup\n shouldShowOnHover\n content={<TooltipItem
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["_react","_interopRequireWildcard","require","_Popup","_interopRequireDefault","_TooltipItem","_Tooltip","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Tooltip","_ref","item","children","isDisabled","tooltipRef","useRef","useMemo","createElement","StyledTooltip","shouldShowOnHover","content","text","headline","imageUrl","button","ref","displayName","_default","exports"],"sources":["../../../src/components/tooltip/Tooltip.tsx"],"sourcesContent":["import React, { FC, ReactNode, useMemo, useRef } from 'react';\nimport Popup from '../popup/Popup';\nimport type { PopupRef } from '../popup/types';\nimport type { ITooltipItem } from './interface';\nimport TooltipItem from './tooltip-item/TooltipItem';\nimport { StyledTooltip } from './Tooltip.styles';\n\nexport type TooltipProps = {\n /**\n * The elements that the tooltip should surround.\n */\n children: ReactNode;\n /**\n * The content that should be displayed.\n */\n item: ITooltipItem;\n /**\n * whether the tooltip should be shown.\n */\n isDisabled?: boolean;\n};\n\nconst Tooltip: FC<TooltipProps> = ({ item, children, isDisabled }) => {\n const tooltipRef = useRef<PopupRef>(null);\n\n return useMemo(\n () => (\n <StyledTooltip>\n {isDisabled ? (\n children\n ) : (\n <Popup\n shouldShowOnHover\n content={\n <TooltipItem\n text={item.text}\n headline={item.headline}\n imageUrl={item.imageUrl}\n button={item.button}\n />\n }\n ref={tooltipRef}\n >\n {children}\n </Popup>\n )}\n </StyledTooltip>\n ),\n [isDisabled, children, item]\n );\n};\n\nTooltip.displayName = 'Tooltip';\n\nexport default Tooltip;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,YAAA,GAAAD,sBAAA,CAAA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AA,GAAAA,CAAA;AAiBjD,MAAMY,OAAyB,GAAGC,IAAA,IAAoC;EAAA,IAAnC;IAAEC,IAAI;IAAEC,QAAQ;IAAEC;EAAW,CAAC,GAAAH,IAAA;EAC7D,MAAMI,UAAU,GAAG,IAAAC,aAAM,EAAW,IAAI,CAAC;EAEzC,OAAO,IAAAC,cAAO,EACV,mBACIpC,MAAA,CAAAS,OAAA,CAAA4B,aAAA,CAAC/B,QAAA,CAAAgC,aAAa,QACTL,UAAU,GACPD,QAAQ,gBAERhC,MAAA,CAAAS,OAAA,CAAA4B,aAAA,CAAClC,MAAA,CAAAM,OAAK;IACF8B,iBAAiB;IACjBC,OAAO,eACHxC,MAAA,CAAAS,OAAA,CAAA4B,aAAA,CAAChC,YAAA,CAAAI,OAAW;MACRgC,IAAI,EAAEV,IAAI,CAACU,IAAK;MAChBC,QAAQ,EAAEX,IAAI,CAACW,QAAS;MACxBC,QAAQ,EAAEZ,IAAI,CAACY,QAAS;MACxBC,MAAM,EAAEb,IAAI,CAACa;IAAO,CACvB,CACJ;IACDC,GAAG,EAAEX;EAAW,GAEfF,QACE,CAEA,CAClB,EACD,CAACC,UAAU,EAAED,QAAQ,EAAED,IAAI,CAC/B,CAAC;AACL,CAAC;AAEDF,OAAO,CAACiB,WAAW,GAAG,SAAS;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvC,OAAA,GAEjBoB,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","names":[],"sources":["../../../src/components/tooltip/interface.ts"],"sourcesContent":["export interface ITooltipItem {\n headline?: string;\n text: string;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"interface.js","names":[],"sources":["../../../src/components/tooltip/interface.ts"],"sourcesContent":["export interface ITooltipItem {\n headline?: string;\n text: string;\n imageUrl?: string;\n button?: { text: string; onClick: () => void };\n}\n"],"mappings":""}
|
|
@@ -6,14 +6,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _TooltipItem = require("./TooltipItem.styles");
|
|
9
|
+
var _Button = _interopRequireDefault(require("../../button/Button"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
13
|
const TooltipItem = _ref => {
|
|
12
14
|
let {
|
|
13
15
|
headline,
|
|
14
|
-
text
|
|
16
|
+
text,
|
|
17
|
+
button,
|
|
18
|
+
imageUrl
|
|
15
19
|
} = _ref;
|
|
16
|
-
return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_TooltipItem.StyledTooltipItem, null, /*#__PURE__*/_react.default.createElement(_TooltipItem.StyledTooltipItemHeadline, null, headline), /*#__PURE__*/_react.default.createElement(_TooltipItem.
|
|
20
|
+
return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_TooltipItem.StyledTooltipItem, null, headline && /*#__PURE__*/_react.default.createElement(_TooltipItem.StyledTooltipItemHeadline, null, headline), imageUrl && /*#__PURE__*/_react.default.createElement(_TooltipItem.StyledTooltipItemImage, {
|
|
21
|
+
src: imageUrl
|
|
22
|
+
}), /*#__PURE__*/_react.default.createElement(_TooltipItem.StyledTooltipItemText, null, text), button && /*#__PURE__*/_react.default.createElement(_TooltipItem.StyledTooltipItemButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
23
|
+
onClick: button.onClick
|
|
24
|
+
}, button.text))), [button, headline, imageUrl, text]);
|
|
17
25
|
};
|
|
18
26
|
TooltipItem.displayName = 'TooltipItem';
|
|
19
27
|
var _default = exports.default = TooltipItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipItem.js","names":["_react","_interopRequireWildcard","require","_TooltipItem","
|
|
1
|
+
{"version":3,"file":"TooltipItem.js","names":["_react","_interopRequireWildcard","require","_TooltipItem","_Button","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","TooltipItem","_ref","headline","text","button","imageUrl","useMemo","createElement","StyledTooltipItem","StyledTooltipItemHeadline","StyledTooltipItemImage","src","StyledTooltipItemText","StyledTooltipItemButtonWrapper","onClick","displayName","_default","exports"],"sources":["../../../../src/components/tooltip/tooltip-item/TooltipItem.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport {\n StyledTooltipItem,\n StyledTooltipItemButtonWrapper,\n StyledTooltipItemHeadline,\n StyledTooltipItemImage,\n StyledTooltipItemText,\n} from './TooltipItem.styles';\nimport Button from '../../button/Button';\n\nexport type TooltipProps = {\n headline?: string;\n text: string;\n imageUrl?: string;\n button?: { text: string; onClick: () => void };\n};\n\nconst TooltipItem: FC<TooltipProps> = ({ headline, text, button, imageUrl }) =>\n useMemo(\n () => (\n <StyledTooltipItem>\n {headline && <StyledTooltipItemHeadline>{headline}</StyledTooltipItemHeadline>}\n {imageUrl && <StyledTooltipItemImage src={imageUrl} />}\n <StyledTooltipItemText>{text}</StyledTooltipItemText>\n {button && (\n <StyledTooltipItemButtonWrapper>\n <Button onClick={button.onClick}>{button.text}</Button>\n </StyledTooltipItem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ipItem: import("styled-components").IStyledCompo
|
|
|
3
3
|
export declare const StyledTooltipItemHeadline: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {
|
|
4
4
|
theme: import("../../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
5
5
|
}>>;
|
|
6
|
+
export declare const StyledTooltipItemImage: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>>;
|
|
7
|
+
export declare const StyledTooltipItemButtonWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
6
8
|
export declare const StyledTooltipItemText: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {
|
|
7
9
|
theme: import("../../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
8
10
|
}>>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyledTooltipItemText = exports.StyledTooltipItemHeadline = exports.StyledTooltipItem = void 0;
|
|
6
|
+
exports.StyledTooltipItemText = exports.StyledTooltipItemImage = exports.StyledTooltipItemHeadline = exports.StyledTooltipItemButtonWrapper = exports.StyledTooltipItem = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
9
|
const StyledTooltipItem = exports.StyledTooltipItem = _styledComponents.default.div`
|
|
@@ -18,6 +18,11 @@ const StyledTooltipItemHeadline = exports.StyledTooltipItemHeadline = _styledCom
|
|
|
18
18
|
}};
|
|
19
19
|
margin: 0;
|
|
20
20
|
`;
|
|
21
|
+
const StyledTooltipItemImage = exports.StyledTooltipItemImage = _styledComponents.default.img``;
|
|
22
|
+
const StyledTooltipItemButtonWrapper = exports.StyledTooltipItemButtonWrapper = _styledComponents.default.div`
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
`;
|
|
21
26
|
const StyledTooltipItemText = exports.StyledTooltipItemText = _styledComponents.default.p`
|
|
22
27
|
color: ${_ref2 => {
|
|
23
28
|
let {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipItem.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledTooltipItem","exports","styled","div","StyledTooltipItemHeadline","h5","_ref","theme","headline","StyledTooltipItemText","p","_ref2","text"],"sources":["../../../../src/components/tooltip/tooltip-item/TooltipItem.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledTooltipItem = styled.div`\n padding: 5px;\n`;\n\ntype StyledTooltipItemHeadlineProps = WithTheme<unknown>;\n\nexport const StyledTooltipItemHeadline = styled.h5<StyledTooltipItemHeadlineProps>`\n color: ${({ theme }: StyledTooltipItemHeadlineProps) => theme.headline};\n margin: 0;\n`;\n\ntype StyledTooltipItemTextProps = WithTheme<unknown>;\n\nexport const StyledTooltipItemText = styled.p<StyledTooltipItemTextProps>`\n color: ${({ theme }: StyledTooltipItemTextProps) => theme.text};\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGhC,MAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,yBAAM,CAACC,GAAI;AAC5C;AACA,CAAC;AAIM,MAAMC,yBAAyB,GAAAH,OAAA,CAAAG,yBAAA,GAAGF,yBAAM,CAACG,EAAmC;AACnF,aAAaC,IAAA;EAAA,IAAC;IAAEC;EAAsC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,QAAQ;AAAA,CAAC;AAC3E;AACA,CAAC;
|
|
1
|
+
{"version":3,"file":"TooltipItem.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledTooltipItem","exports","styled","div","StyledTooltipItemHeadline","h5","_ref","theme","headline","StyledTooltipItemImage","img","StyledTooltipItemButtonWrapper","StyledTooltipItemText","p","_ref2","text"],"sources":["../../../../src/components/tooltip/tooltip-item/TooltipItem.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledTooltipItem = styled.div`\n padding: 5px;\n`;\n\ntype StyledTooltipItemHeadlineProps = WithTheme<unknown>;\n\nexport const StyledTooltipItemHeadline = styled.h5<StyledTooltipItemHeadlineProps>`\n color: ${({ theme }: StyledTooltipItemHeadlineProps) => theme.headline};\n margin: 0;\n`;\n\nexport const StyledTooltipItemImage = styled.img``;\n\nexport const StyledTooltipItemButtonWrapper = styled.div`\n display: flex;\n justify-content: center;\n`;\n\ntype StyledTooltipItemTextProps = WithTheme<unknown>;\n\nexport const StyledTooltipItemText = styled.p<StyledTooltipItemTextProps>`\n color: ${({ theme }: StyledTooltipItemTextProps) => theme.text};\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGhC,MAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,yBAAM,CAACC,GAAI;AAC5C;AACA,CAAC;AAIM,MAAMC,yBAAyB,GAAAH,OAAA,CAAAG,yBAAA,GAAGF,yBAAM,CAACG,EAAmC;AACnF,aAAaC,IAAA;EAAA,IAAC;IAAEC;EAAsC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,QAAQ;AAAA,CAAC;AAC3E;AACA,CAAC;AAEM,MAAMC,sBAAsB,GAAAR,OAAA,CAAAQ,sBAAA,GAAGP,yBAAM,CAACQ,GAAI,EAAC;AAE3C,MAAMC,8BAA8B,GAAAV,OAAA,CAAAU,8BAAA,GAAGT,yBAAM,CAACC,GAAI;AACzD;AACA;AACA,CAAC;AAIM,MAAMS,qBAAqB,GAAAX,OAAA,CAAAW,qBAAA,GAAGV,yBAAM,CAACW,CAA8B;AAC1E,aAAaC,KAAA;EAAA,IAAC;IAAEP;EAAkC,CAAC,GAAAO,KAAA;EAAA,OAAKP,KAAK,CAACQ,IAAI;AAAA,CAAC;AACnE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.402",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chayns",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "6f2f36bfe7e18d3c37a745e753a8b68df128278d"
|
|
74
74
|
}
|