@chayns-components/core 5.0.0-beta.176 → 5.0.0-beta.178

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 (34) hide show
  1. package/lib/components/popup/Popup.d.ts +8 -0
  2. package/lib/components/popup/Popup.js +22 -5
  3. package/lib/components/popup/Popup.js.map +1 -1
  4. package/lib/components/radio-button/RadioButton.d.ts +22 -0
  5. package/lib/components/radio-button/RadioButton.js +71 -0
  6. package/lib/components/radio-button/RadioButton.js.map +1 -0
  7. package/lib/components/radio-button/RadioButton.styles.d.ts +13 -0
  8. package/lib/components/radio-button/RadioButton.styles.js +105 -0
  9. package/lib/components/radio-button/RadioButton.styles.js.map +1 -0
  10. package/lib/components/radio-button/interface.d.ts +4 -0
  11. package/lib/components/radio-button/interface.js +6 -0
  12. package/lib/components/radio-button/interface.js.map +1 -0
  13. package/lib/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +21 -0
  14. package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js +54 -0
  15. package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -0
  16. package/lib/components/tooltip/Tooltip.d.ts +10 -0
  17. package/lib/components/tooltip/Tooltip.js +32 -0
  18. package/lib/components/tooltip/Tooltip.js.map +1 -0
  19. package/lib/components/tooltip/Tooltip.styles.d.ts +1 -0
  20. package/lib/components/tooltip/Tooltip.styles.js +11 -0
  21. package/lib/components/tooltip/Tooltip.styles.js.map +1 -0
  22. package/lib/components/tooltip/interface.d.ts +4 -0
  23. package/lib/components/tooltip/interface.js +6 -0
  24. package/lib/components/tooltip/interface.js.map +1 -0
  25. package/lib/components/tooltip/tooltip-item/TooltipItem.d.ts +7 -0
  26. package/lib/components/tooltip/tooltip-item/TooltipItem.js +21 -0
  27. package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -0
  28. package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +7 -0
  29. package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +32 -0
  30. package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -0
  31. package/lib/index.d.ts +4 -0
  32. package/lib/index.js +28 -0
  33. package/lib/index.js.map +1 -1
  34. package/package.json +2 -2
@@ -1,6 +1,10 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { PopupRef } from './interface';
3
3
  export type PopupProps = {
4
+ /**
5
+ * The element over which the content of the `ContextMenu` should be displayed.
6
+ */
7
+ children?: ReactNode;
4
8
  /**
5
9
  * The content that should be displayed inside the popup.
6
10
  */
@@ -13,6 +17,10 @@ export type PopupProps = {
13
17
  * Function to be executed when the content of the Context menu has been shown.
14
18
  */
15
19
  onShow?: VoidFunction;
20
+ /**
21
+ * Whether the popup should be opened on hover. If not, the popup will be opened on click.
22
+ */
23
+ shouldShowOnHover?: boolean;
16
24
  };
17
25
  declare const Popup: React.ForwardRefExoticComponent<PopupProps & React.RefAttributes<PopupRef>>;
18
26
  export default Popup;
@@ -19,7 +19,8 @@ const Popup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
19
19
  content,
20
20
  onShow,
21
21
  onHide,
22
- children
22
+ children,
23
+ shouldShowOnHover = false
23
24
  } = _ref;
24
25
  const [coordinates, setCoordinates] = (0, _react.useState)({
25
26
  x: 0,
@@ -74,19 +75,33 @@ const Popup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
74
75
  }
75
76
  }, []);
76
77
  const handleChildrenClick = () => {
77
- handleShow();
78
+ if (!shouldShowOnHover) {
79
+ handleShow();
80
+ }
78
81
  };
79
82
  const handleHide = (0, _react.useCallback)(() => {
80
83
  setIsOpen(false);
81
84
  }, []);
85
+ const handleMouseEnter = () => {
86
+ if (shouldShowOnHover) {
87
+ handleShow();
88
+ }
89
+ };
90
+ const handleMouseLeave = () => {
91
+ if (shouldShowOnHover) {
92
+ handleHide();
93
+ }
94
+ };
82
95
  const handleDocumentClick = (0, _react.useCallback)(event => {
83
96
  var _popupContentRef$curr;
84
97
  if (!((_popupContentRef$curr = popupContentRef.current) !== null && _popupContentRef$curr !== void 0 && _popupContentRef$curr.contains(event.target))) {
85
98
  event.preventDefault();
86
99
  event.stopPropagation();
87
100
  }
88
- handleHide();
89
- }, [handleHide]);
101
+ if (!shouldShowOnHover) {
102
+ handleHide();
103
+ }
104
+ }, [handleHide, shouldShowOnHover]);
90
105
  (0, _react.useImperativeHandle)(ref, () => ({
91
106
  hide: handleHide,
92
107
  show: handleShow
@@ -121,7 +136,9 @@ const Popup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
121
136
  ref: popupPseudoContentRef
122
137
  }, content), /*#__PURE__*/_react.default.createElement(_Popup.StyledPopup, {
123
138
  ref: popupRef,
124
- onClick: handleChildrenClick
139
+ onClick: handleChildrenClick,
140
+ onMouseLeave: handleMouseLeave,
141
+ onMouseEnter: handleMouseEnter
125
142
  }, children), portal);
126
143
  });
127
144
  Popup.displayName = 'Popup';
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_reactDom","_uuid","_interface","_PopupContent","_interopRequireDefault","_Popup","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Popup","forwardRef","_ref","ref","content","onShow","onHide","children","coordinates","setCoordinates","useState","x","y","container","document","body","alignment","setAlignment","PopupAlignment","TopLeft","isOpen","setIsOpen","portal","setPortal","uuid","useUuid","popupContentRef","useRef","popupPseudoContentRef","popupRef","handleShow","useCallback","current","height","pseudoHeight","width","pseudoWidth","getBoundingClientRect","childrenX","childrenY","childrenHeight","childrenWidth","BottomRight","BottomLeft","TopRight","handleChildrenClick","handleHide","handleDocumentClick","event","_popupContentRef$curr","contains","target","preventDefault","stopPropagation","useImperativeHandle","hide","show","useEffect","addEventListener","window","removeEventListener","createPortal","createElement","AnimatePresence","initial","Fragment","StyledPopupPseudo","StyledPopup","onClick","displayName","_default","exports"],"sources":["../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { 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 { PopupAlignment, PopupCoordinates, PopupRef } from './interface';\nimport PopupContent from './popup-content/PopupContent';\nimport { StyledPopup, StyledPopupPseudo } from './Popup.styles';\n\nexport type PopupProps = {\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\nconst Popup = forwardRef<PopupRef, PopupProps>(({ content, onShow, onHide, children }, ref) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n const container = document.body;\n\n const [alignment, setAlignment] = useState<PopupAlignment>(PopupAlignment.TopLeft);\n const [isOpen, setIsOpen] = useState(false);\n const [portal, setPortal] = useState<ReactPortal>();\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 x: childrenX,\n y: childrenY,\n height: childrenHeight,\n width: childrenWidth,\n } = popupRef.current.getBoundingClientRect();\n\n if (pseudoHeight > childrenY - 25) {\n if (pseudoWidth > childrenX + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.BottomRight);\n } else {\n setAlignment(PopupAlignment.BottomLeft);\n }\n\n setCoordinates({\n x: childrenX + childrenWidth / 2,\n y: childrenY + childrenHeight - 15,\n });\n } else if (pseudoWidth > childrenX + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.TopRight);\n setCoordinates({\n x: childrenX + childrenWidth / 2,\n y: childrenY,\n });\n } else {\n setAlignment(PopupAlignment.TopLeft);\n setCoordinates({\n x: childrenX + childrenWidth / 2,\n y: childrenY + 15,\n });\n }\n\n setIsOpen(true);\n }\n }, []);\n\n const handleChildrenClick = () => {\n handleShow();\n };\n\n const handleHide = useCallback(() => {\n setIsOpen(false);\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\n handleHide();\n },\n [handleHide]\n );\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow]\n );\n\n useEffect(() => {\n if (isOpen) {\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}>{content}</StyledPopupPseudo>\n <StyledPopup ref={popupRef} onClick={handleChildrenClick}>\n {children}\n </StyledPopup>\n {portal}\n </>\n );\n});\n\nPopup.displayName = 'Popup';\n\nexport default Popup;\n"],"mappings":";;;;;;AAAA,IAAAA,aAA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MAAM,CAAC,CAAC;EAE7D,IAAAoD,gBAAS,EAAC,MAAM;IACZlC,SAAS,CAAC,mBACN,IAAAsC,sBAAY,gBACR3F,MAAA,CAAAU,OAAA,CAAAkF,aAAA,CAAC9F,aAAA,CAAA+F,eAAe;MAACC,OAAO,EAAE;IAAM,GAC3B5C,MAAM,iBACHlD,MAAA,CAAAU,OAAA,CAAAkF,aAAA,CAACvF,aAAA,CAAAK,OAAY;MACT4B,WAAW,EAAEA,WAAY;MACzBJ,OAAO,EAAEA,OAAQ;MACjBV,GAAG,EAAG,WAAU8B,IAAK,EAAE;MACvBR,SAAS,EAAEA,SAAU;MACrBb,GAAG,EAAEuB;IAAgB,CACxB,CAEQ,CAAC,EAClBb,SACJ,CACJ,CAAC;EACL,CAAC,EAAE,CAACG,SAAS,EAAEH,SAAS,EAAET,OAAO,EAAEI,WAAW,EAAEY,MAAM,EAAEI,IAAI,CAAC,CAAC;EAE9D,oBACItD,MAAA,CAAAU,OAAA,CAAAkF,aAAA,CAAA5F,MAAA,CAAAU,OAAA,CAAAqF,QAAA,qBACI/F,MAAA,CAAAU,OAAA,CAAAkF,aAAA,CAACrF,MAAA,CAAAyF,iBAAiB;IAAC/D,GAAG,EAAEyB;EAAsB,GAAExB,OAA2B,CAAC,eAC5ElC,MAAA,CAAAU,OAAA,CAAAkF,aAAA,CAACrF,MAAA,CAAA0F,WAAW;IAAChE,GAAG,EAAE0B,QAAS;IAACuC,OAAO,EAAEvB;EAAoB,GACpDtC,QACQ,CAAC,EACbe,MACH,CAAC;AAEX,CAAC,CAAC;AAEFtB,KAAK,CAACqE,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAEbtE,KAAK;AAAAuE,OAAA,CAAA3F,OAAA,GAAA0F,QAAA"}
1
+ {"version":3,"file":"Popup.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_reactDom","_uuid","_interface","_PopupContent","_interopRequireDefault","_Popup","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Popup","forwardRef","_ref","ref","content","onShow","onHide","children","shouldShowOnHover","coordinates","setCoordinates","useState","x","y","container","document","body","alignment","setAlignment","PopupAlignment","TopLeft","isOpen","setIsOpen","portal","setPortal","uuid","useUuid","popupContentRef","useRef","popupPseudoContentRef","popupRef","handleShow","useCallback","current","height","pseudoHeight","width","pseudoWidth","getBoundingClientRect","childrenX","childrenY","childrenHeight","childrenWidth","BottomRight","BottomLeft","TopRight","handleChildrenClick","handleHide","handleMouseEnter","handleMouseLeave","handleDocumentClick","event","_popupContentRef$curr","contains","target","preventDefault","stopPropagation","useImperativeHandle","hide","show","useEffect","addEventListener","window","removeEventListener","createPortal","createElement","AnimatePresence","initial","Fragment","StyledPopupPseudo","StyledPopup","onClick","onMouseLeave","onMouseEnter","displayName","_default","exports"],"sources":["../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { 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 { PopupAlignment, PopupCoordinates, PopupRef } from './interface';\nimport PopupContent from './popup-content/PopupContent';\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 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\nconst Popup = forwardRef<PopupRef, PopupProps>(\n ({ content, onShow, onHide, children, shouldShowOnHover = false }, ref) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n const container = document.body;\n\n const [alignment, setAlignment] = useState<PopupAlignment>(PopupAlignment.TopLeft);\n const [isOpen, setIsOpen] = useState(false);\n const [portal, setPortal] = useState<ReactPortal>();\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 x: childrenX,\n y: childrenY,\n height: childrenHeight,\n width: childrenWidth,\n } = popupRef.current.getBoundingClientRect();\n\n if (pseudoHeight > childrenY - 25) {\n if (pseudoWidth > childrenX + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.BottomRight);\n } else {\n setAlignment(PopupAlignment.BottomLeft);\n }\n\n setCoordinates({\n x: childrenX + childrenWidth / 2,\n y: childrenY + childrenHeight - 15,\n });\n } else if (pseudoWidth > childrenX + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.TopRight);\n setCoordinates({\n x: childrenX + childrenWidth / 2,\n y: childrenY,\n });\n } else {\n setAlignment(PopupAlignment.TopLeft);\n setCoordinates({\n x: childrenX + childrenWidth / 2,\n y: childrenY + 15,\n });\n }\n\n setIsOpen(true);\n }\n }, []);\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\n if (!shouldShowOnHover) {\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 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}>{content}</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,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAUA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAgE,SAAAO,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAA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Item } from './interface';
3
+ export type RadioButtonProps = {
4
+ /**
5
+ * Whether the radio button should be checked.
6
+ */
7
+ isChecked?: boolean;
8
+ /**
9
+ * The id of the radio button.
10
+ */
11
+ id: string;
12
+ /**
13
+ * The label that should be displayed next to the radio button.
14
+ */
15
+ label?: string;
16
+ /**
17
+ * Function to be executed when a button is checked.
18
+ */
19
+ onChange?: (item: RadioButtonItem) => void;
20
+ };
21
+ declare const RadioButton: FC<RadioButtonProps>;
22
+ export default RadioButton;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _RadioButtonGroup = require("./radio-button-group/RadioButtonGroup");
9
+ var _RadioButton = require("./RadioButton.styles");
10
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
+ const RadioButton = _ref => {
13
+ let {
14
+ isChecked,
15
+ label,
16
+ onChange,
17
+ id
18
+ } = _ref;
19
+ const {
20
+ selectedRadioButtonId,
21
+ updateSelectedRadioButtonId
22
+ } = (0, _react.useContext)(_RadioButtonGroup.RadioButtonGroupContext);
23
+ const [internalIsChecked, setInternalIsChecked] = (0, _react.useState)(false);
24
+ const [isHovered, setIsHovered] = (0, _react.useState)(false);
25
+ const isInGroup = typeof updateSelectedRadioButtonId === 'function';
26
+ const isMarked = isInGroup ? selectedRadioButtonId === id : internalIsChecked;
27
+ const isInitialRenderRef = (0, _react.useRef)(true);
28
+ (0, _react.useEffect)(() => {
29
+ if (isChecked) {
30
+ setInternalIsChecked(isChecked);
31
+ }
32
+ }, [isChecked]);
33
+ (0, _react.useEffect)(() => {
34
+ if (isInitialRenderRef.current) {
35
+ isInitialRenderRef.current = false;
36
+ } else if (typeof onChange === 'function') {
37
+ onChange({
38
+ isChecked: isMarked,
39
+ id
40
+ });
41
+ }
42
+ }, [id, isMarked, onChange]);
43
+ const handleClick = (0, _react.useCallback)(() => {
44
+ if (typeof updateSelectedRadioButtonId === 'function') {
45
+ updateSelectedRadioButtonId(id);
46
+ }
47
+ setInternalIsChecked(prevState => !prevState);
48
+ }, [id, updateSelectedRadioButtonId]);
49
+ const handleMouseEnter = () => {
50
+ setIsHovered(true);
51
+ };
52
+ const handleMouseLeave = () => {
53
+ setIsHovered(false);
54
+ };
55
+ return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_RadioButton.StyledRadioButton, {
56
+ onClick: handleClick,
57
+ onMouseEnter: handleMouseEnter,
58
+ onMouseLeave: handleMouseLeave
59
+ }, /*#__PURE__*/_react.default.createElement(_RadioButton.StyledRadioButtonCheckBoxMark, {
60
+ isHovered: isHovered,
61
+ isSelected: isMarked
62
+ }), /*#__PURE__*/_react.default.createElement(_RadioButton.StyledRadioButtonCheckBox, {
63
+ type: "radio",
64
+ checked: isMarked,
65
+ onChange: () => {}
66
+ }), label && /*#__PURE__*/_react.default.createElement(_RadioButton.StyledRadioButtonLabel, null, label)), [handleClick, isHovered, isMarked, label]);
67
+ };
68
+ RadioButton.displayName = 'RadioButton';
69
+ var _default = RadioButton;
70
+ exports.default = _default;
71
+ //# sourceMappingURL=RadioButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.js","names":["_react","_interopRequireWildcard","require","_RadioButtonGroup","_RadioButton","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","RadioButton","_ref","isChecked","label","onChange","id","selectedRadioButtonId","updateSelectedRadioButtonId","useContext","RadioButtonGroupContext","internalIsChecked","setInternalIsChecked","useState","isHovered","setIsHovered","isInGroup","isMarked","isInitialRenderRef","useRef","useEffect","current","handleClick","useCallback","prevState","handleMouseEnter","handleMouseLeave","useMemo","createElement","StyledRadioButton","onClick","onMouseEnter","onMouseLeave","StyledRadioButtonCheckBoxMark","isSelected","StyledRadioButtonCheckBox","type","checked","StyledRadioButtonLabel","displayName","_default","exports"],"sources":["../../../src/components/radio-button/RadioButton.tsx"],"sourcesContent":["import React, { FC, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport type { RadioButtonItem } from './interface';\nimport { RadioButtonGroupContext } from './radio-button-group/RadioButtonGroup';\nimport {\n StyledRadioButton,\n StyledRadioButtonCheckBox,\n StyledRadioButtonCheckBoxMark,\n StyledRadioButtonLabel,\n} from './RadioButton.styles';\n\nexport type RadioButtonProps = {\n /**\n * Whether the radio button should be checked.\n */\n isChecked?: boolean;\n /**\n * The id of the radio button.\n */\n id: string;\n /**\n * The label that should be displayed next to the radio button.\n */\n label?: string;\n /**\n * Function to be executed when a button is checked.\n */\n onChange?: (item: RadioButtonItem) => void;\n};\n\nconst RadioButton: FC<RadioButtonProps> = ({ isChecked, label, onChange, id }) => {\n const { selectedRadioButtonId, updateSelectedRadioButtonId } =\n useContext(RadioButtonGroupContext);\n\n const [internalIsChecked, setInternalIsChecked] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n\n const isInGroup = typeof updateSelectedRadioButtonId === 'function';\n\n const isMarked = isInGroup ? selectedRadioButtonId === id : internalIsChecked;\n\n const isInitialRenderRef = useRef(true);\n\n useEffect(() => {\n if (isChecked) {\n setInternalIsChecked(isChecked);\n }\n }, [isChecked]);\n\n useEffect(() => {\n if (isInitialRenderRef.current) {\n isInitialRenderRef.current = false;\n } else if (typeof onChange === 'function') {\n onChange({ isChecked: isMarked, id });\n }\n }, [id, isMarked, onChange]);\n\n const handleClick = useCallback(() => {\n if (typeof updateSelectedRadioButtonId === 'function') {\n updateSelectedRadioButtonId(id);\n }\n\n setInternalIsChecked((prevState) => !prevState);\n }, [id, updateSelectedRadioButtonId]);\n\n const handleMouseEnter = () => {\n setIsHovered(true);\n };\n\n const handleMouseLeave = () => {\n setIsHovered(false);\n };\n\n return useMemo(\n () => (\n <StyledRadioButton\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <StyledRadioButtonCheckBoxMark isHovered={isHovered} isSelected={isMarked} />\n <StyledRadioButtonCheckBox type=\"radio\" checked={isMarked} onChange={() => {}} />\n {label && <StyledRadioButtonLabel>{label}</StyledRadioButtonLabel>}\n </StyledRadioButton>\n ),\n [handleClick, isHovered, isMarked, label]\n );\n};\n\nRadioButton.displayName = 'RadioButton';\n\nexport default RadioButton;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAK8B,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAA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C/BO,YAAY,EAAEN;EAAiB,gBAE/BpD,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAAClD,YAAA,CAAAuD,6BAA6B;IAACnB,SAAS,EAAEA,SAAU;IAACoB,UAAU,EAAEjB;EAAS,CAAE,CAAC,eAC7E3C,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAAClD,YAAA,CAAAyD,yBAAyB;IAACC,IAAI,EAAC,OAAO;IAACC,OAAO,EAAEpB,QAAS;IAACZ,QAAQ,EAAEA,CAAA,KAAM,CAAC;EAAE,CAAE,CAAC,EAChFD,KAAK,iBAAI9B,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAAClD,YAAA,CAAA4D,sBAAsB,QAAElC,KAA8B,CAClD,CACtB,EACD,CAACkB,WAAW,EAAER,SAAS,EAAEG,QAAQ,EAAEb,KAAK,CAC5C,CAAC;AACL,CAAC;AAEDH,WAAW,CAACsC,WAAW,GAAG,aAAa;AAAC,IAAAC,QAAA,GAEzBvC,WAAW;AAAAwC,OAAA,CAAAvD,OAAA,GAAAsD,QAAA"}
@@ -0,0 +1,13 @@
1
+ export declare const StyledRadioButton: import("styled-components").StyledComponent<"span", any, {}, never>;
2
+ export declare const StyledRadioButtonCheckBox: import("styled-components").StyledComponent<"input", any, {
3
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
4
+ }, never>;
5
+ export declare const StyledRadioButtonCheckBoxMark: import("styled-components").StyledComponent<"input", any, {
6
+ isHovered: boolean;
7
+ isSelected: boolean;
8
+ } & {
9
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
10
+ }, never>;
11
+ export declare const StyledRadioButtonLabel: import("styled-components").StyledComponent<"p", any, {
12
+ theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
13
+ }, never>;
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledRadioButtonLabel = exports.StyledRadioButtonCheckBoxMark = exports.StyledRadioButtonCheckBox = exports.StyledRadioButton = void 0;
7
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
+ const StyledRadioButton = _styledComponents.default.span`
11
+ display: flex;
12
+ gap: 5px;
13
+ cursor: pointer;
14
+ user-select: none;
15
+ width: fit-content;
16
+ align-items: center;
17
+ position: relative;
18
+ `;
19
+ exports.StyledRadioButton = StyledRadioButton;
20
+ const StyledRadioButtonCheckBox = _styledComponents.default.input`
21
+ cursor: pointer !important;
22
+
23
+ :before {
24
+ background-color: ${_ref => {
25
+ let {
26
+ theme
27
+ } = _ref;
28
+ return theme['secondary-103'];
29
+ }};
30
+ border: 1px solid rgba(160, 160, 160, 0.3);
31
+ content: '';
32
+ width: 13px;
33
+ height: 13px;
34
+ position: absolute;
35
+ border-radius: 100%;
36
+ top: 5.8px;
37
+ left: 0;
38
+ cursor: pointer !important;
39
+ }
40
+
41
+ :checked::before {
42
+ content: '';
43
+ width: 13px;
44
+ height: 13px;
45
+ background-color: ${_ref2 => {
46
+ let {
47
+ theme
48
+ } = _ref2;
49
+ return theme.secondary;
50
+ }};
51
+ position: absolute;
52
+ border-radius: 100%;
53
+ top: 5.75px;
54
+ left: 0;
55
+ cursor: pointer !important;
56
+ }
57
+ `;
58
+ exports.StyledRadioButtonCheckBox = StyledRadioButtonCheckBox;
59
+ const StyledRadioButtonCheckBoxMark = _styledComponents.default.input`
60
+ cursor: pointer;
61
+ background-color: transparent;
62
+ position: absolute;
63
+ top: 6.8px;
64
+ left: 3.25px;
65
+ display: inline-block;
66
+ transform: rotate(35deg);
67
+ height: 9px;
68
+ width: 0.75px;
69
+ border-bottom: 2px solid white;
70
+ border-right: 2px solid white;
71
+ border-top: transparent;
72
+ border-left: transparent;
73
+ z-index: 2;
74
+
75
+ ${_ref3 => {
76
+ let {
77
+ isHovered,
78
+ isSelected
79
+ } = _ref3;
80
+ if (isSelected) {
81
+ return (0, _styledComponents.css)`
82
+ opacity: 1;
83
+ `;
84
+ }
85
+ if (isHovered) {
86
+ return (0, _styledComponents.css)`
87
+ opacity: 0.5;
88
+ `;
89
+ }
90
+ return (0, _styledComponents.css)`
91
+ opacity: 0;
92
+ `;
93
+ }}
94
+ `;
95
+ exports.StyledRadioButtonCheckBoxMark = StyledRadioButtonCheckBoxMark;
96
+ const StyledRadioButtonLabel = _styledComponents.default.p`
97
+ color: ${_ref4 => {
98
+ let {
99
+ theme
100
+ } = _ref4;
101
+ return theme.text;
102
+ }};
103
+ `;
104
+ exports.StyledRadioButtonLabel = StyledRadioButtonLabel;
105
+ //# sourceMappingURL=RadioButton.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledRadioButton","styled","span","exports","StyledRadioButtonCheckBox","input","_ref","theme","_ref2","secondary","StyledRadioButtonCheckBoxMark","_ref3","isHovered","isSelected","css","StyledRadioButtonLabel","p","_ref4","text"],"sources":["../../../src/components/radio-button/RadioButton.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledRadioButton = styled.span`\n display: flex;\n gap: 5px;\n cursor: pointer;\n user-select: none;\n width: fit-content;\n align-items: center;\n position: relative;\n`;\n\ntype StyledRadioButtonCheckBoxProps = WithTheme<unknown>;\n\nexport const StyledRadioButtonCheckBox = styled.input<StyledRadioButtonCheckBoxProps>`\n cursor: pointer !important;\n\n :before {\n background-color: ${({ theme }: StyledRadioButtonCheckBoxProps) => theme['secondary-103']};\n border: 1px solid rgba(160, 160, 160, 0.3);\n content: '';\n width: 13px;\n height: 13px;\n position: absolute;\n border-radius: 100%;\n top: 5.8px;\n left: 0;\n cursor: pointer !important;\n }\n\n :checked::before {\n content: '';\n width: 13px;\n height: 13px;\n background-color: ${({ theme }: StyledRadioButtonCheckBoxProps) => theme.secondary};\n position: absolute;\n border-radius: 100%;\n top: 5.75px;\n left: 0;\n cursor: pointer !important;\n }\n`;\n\ntype StyledRadioButtonCheckBoxMarkProps = WithTheme<{\n isHovered: boolean;\n isSelected: boolean;\n}>;\n\nexport const StyledRadioButtonCheckBoxMark = styled.input<StyledRadioButtonCheckBoxMarkProps>`\n cursor: pointer;\n background-color: transparent;\n position: absolute;\n top: 6.8px;\n left: 3.25px;\n display: inline-block;\n transform: rotate(35deg);\n height: 9px;\n width: 0.75px;\n border-bottom: 2px solid white;\n border-right: 2px solid white;\n border-top: transparent;\n border-left: transparent;\n z-index: 2;\n\n ${({ isHovered, isSelected }) => {\n if (isSelected) {\n return css`\n opacity: 1;\n `;\n }\n\n if (isHovered) {\n return css`\n opacity: 0.5;\n `;\n }\n\n return css`\n opacity: 0;\n `;\n }}\n`;\n\ntype StyledRadioButtonLabelProps = WithTheme<unkn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AAA,CAAC;AACpE,CAAC;AAACf,OAAA,CAAAY,sBAAA,GAAAA,sBAAA"}
@@ -0,0 +1,4 @@
1
+ export interface RadioButtonItem {
2
+ id: string;
3
+ isChecked: boolean;
4
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.js","names":[],"sources":["../../../src/components/radio-button/interface.ts"],"sourcesContent":["export interface RadioButtonItem {\n id: string;\n isChecked: boolean;\n}\n"],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import React, { FC, ReactNode } from 'react';
2
+ import type { RadioButtonItem } from '../interface';
3
+ type IUpdateSelectedRadioButtonId = (id: string) => void;
4
+ interface IRadioButtonGroupContext {
5
+ selectedRadioButtonId: string | undefined;
6
+ updateSelectedRadioButtonId?: IUpdateSelectedRadioButtonId;
7
+ }
8
+ export declare const RadioButtonGroupContext: React.Context<IRadioButtonGroupContext>;
9
+ export type RadioButtonGroupProps = {
10
+ /**
11
+ * The RadioButtons that should be grouped. Radio buttons with the same group are
12
+ * automatically unchecked when an `RadioButton` of the group is checked.
13
+ */
14
+ children: ReactNode;
15
+ /**
16
+ * Function to be executed when a button is checked.
17
+ */
18
+ onChange?: (item: RadioButtonItem) => void;
19
+ };
20
+ declare const RadioButtonGroup: FC<RadioButtonGroupProps>;
21
+ export default RadioButtonGroup;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.RadioButtonGroupContext = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
+ const RadioButtonGroupContext = /*#__PURE__*/_react.default.createContext({
11
+ selectedRadioButtonId: undefined,
12
+ updateSelectedRadioButtonId: undefined
13
+ });
14
+ exports.RadioButtonGroupContext = RadioButtonGroupContext;
15
+ RadioButtonGroupContext.displayName = 'RadioButtonGroupContext';
16
+ const RadioButtonGroup = _ref => {
17
+ let {
18
+ children,
19
+ onChange
20
+ } = _ref;
21
+ const [selectedRadioButtonId, setSelectedRadioButtonId] = (0, _react.useState)(undefined);
22
+ const isInitialRenderRef = (0, _react.useRef)(true);
23
+ const updateSelectedRadioButtonId = (0, _react.useCallback)(id => {
24
+ setSelectedRadioButtonId(currentSelectedRadioButtonId => {
25
+ if (currentSelectedRadioButtonId === id) {
26
+ return undefined;
27
+ }
28
+ return id;
29
+ });
30
+ }, []);
31
+ (0, _react.useEffect)(() => {
32
+ if (isInitialRenderRef.current) {
33
+ isInitialRenderRef.current = false;
34
+ } else if (typeof selectedRadioButtonId === 'string') {
35
+ if (typeof onChange === 'function') {
36
+ onChange({
37
+ id: selectedRadioButtonId !== null && selectedRadioButtonId !== void 0 ? selectedRadioButtonId : '',
38
+ isChecked: true
39
+ });
40
+ }
41
+ }
42
+ }, [onChange, selectedRadioButtonId]);
43
+ const providerValue = (0, _react.useMemo)(() => ({
44
+ selectedRadioButtonId,
45
+ updateSelectedRadioButtonId
46
+ }), [selectedRadioButtonId, updateSelectedRadioButtonId]);
47
+ return /*#__PURE__*/_react.default.createElement(RadioButtonGroupContext.Provider, {
48
+ value: providerValue
49
+ }, children);
50
+ };
51
+ RadioButtonGroup.displayName = 'RadioButtonGroup';
52
+ var _default = RadioButtonGroup;
53
+ exports.default = _default;
54
+ //# sourceMappingURL=RadioButtonGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButtonGroup.js","names":["_react","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","RadioButtonGroupContext","React","createContext","selectedRadioButtonId","undefined","updateSelectedRadioButtonId","exports","displayName","RadioButtonGroup","_ref","children","onChange","setSelectedRadioButtonId","useState","isInitialRenderRef","useRef","useCallback","id","currentSelectedRadioButtonId","useEffect","current","isChecked","providerValue","useMemo","createElement","Provider","value","_default"],"sources":["../../../../src/components/radio-button/radio-button-group/RadioButtonGroup.tsx"],"sourcesContent":["import React, { FC, ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { RadioButtonItem } from '../interface';\n\ntype IUpdateSelectedRadioButtonId = (id: string) => void;\n\ninterface IRadioButtonGroupContext {\n selectedRadioButtonId: string | undefined;\n updateSelectedRadioButtonId?: IUpdateSelectedRadioButtonId;\n}\n\nexport const RadioButtonGroupContext = React.createContext<IRadioButtonGroupContext>({\n selectedRadioButtonId: undefined,\n updateSelectedRadioButtonId: undefined,\n});\n\nRadioButtonGroupContext.displayName = 'RadioButtonGroupContext';\n\nexport type RadioButtonGroupProps = {\n /**\n * The RadioButtons that should be grouped. Radio buttons with the same group are\n * automatically unchecked when an `RadioButton` of the group is checked.\n */\n children: ReactNode;\n /**\n * Function to be executed when a button is checked.\n */\n onChange?: (item: RadioButtonItem) => void;\n};\n\nconst RadioButtonGroup: FC<RadioButtonGroupProps> = ({ children, onChange }) => {\n const [selectedRadioButtonId, setSelectedRadioButtonId] =\n useState<IRadioButtonGroupContext['selectedRadioButtonId']>(undefined);\n\n const isInitialRenderRef = useRef(true);\n\n const updateSelectedRadioButtonId = useCallback<IUpdateSelectedRadioButtonId>((id) => {\n setSelectedRadioButtonId((currentSelectedRadioButtonId) => {\n if (currentSelectedRadioButtonId === id) {\n return undefined;\n }\n\n return id;\n });\n }, []);\n\n useEffect(() => {\n if (isInitialRenderRef.current) {\n isInitialRenderRef.current = false;\n } else if (typeof selectedRadioButtonId === 'string') {\n if (typeof onChange === 'function') {\n onChange({ id: selectedRadioButtonId ?? '', isChecked: true });\n }\n }\n }, [onChange, selectedRadioButtonId]);\n\n const providerValue = useMemo<IRadioButtonGroupContext>(\n () => ({\n selectedRadioButtonId,\n updateSelectedRadioButtonId,\n }),\n [selectedRadioButtonId, updateSelectedRadioButtonId]\n );\n\n return (\n <RadioButtonGroupContext.Provider value={providerValue}>\n {children}\n </RadioButtonGroupContext.Provider>\n );\n};\n\nRadioButtonGroup.displayName = 'RadioButtonGroup';\n\nexport default RadioButtonGroup;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgG,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,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MACvD,IAAIA,4BAA4B,KAAKD,EAAE,EAAE;QACrC,OAAOb,SAAS;MACpB;MAEA,OAAOa,EAAE;IACb,CAAC,CAAC;EACN,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAE,gBAAS,EAAC,MAAM;IACZ,IAAIL,kBAAkB,CAACM,OAAO,EAAE;MAC5BN,kBAAkB,CAACM,OAAO,GAAG,KAAK;IACtC,CAAC,MAAM,IAAI,OAAOjB,qBAAqB,KAAK,QAAQ,EAAE;MAClD,IAAI,OAAOQ,QAAQ,KAAK,UAAU,EAAE;QAChCA,QAAQ,CAAC;UAAEM,EAAE,EAAEd,qBAAqB,aAArBA,qBAAqB,cAArBA,qBAAqB,GAAI,EAAE;UAAEkB,SAAS,EAAE;QAAK,CAAC,CAAC;MAClE;IACJ;EACJ,CAAC,EAAE,CAACV,QAAQ,EAAER,qBAAqB,CAAC,CAAC;EAErC,MAAMmB,aAAa,GAAG,IAAAC,cAAO,EACzB,OAAO;IACHpB,qBAAqB;IACrBE;EACJ,CAAC,CAAC,EACF,CAACF,qBAAqB,EAAEE,2BAA2B,CACvD,CAAC;EAED,oBACI9B,MAAA,CAAAU,OAAA,CAAAuC,aAAA,CAACxB,uBAAuB,CAACyB,QAAQ;IAACC,KAAK,EAAEJ;EAAc,GAClDZ,QAC6B,CAAC;AAE3C,CAAC;AAEDF,gBAAgB,CAACD,WAAW,GAAG,kBAAkB;AAAC,IAAAoB,QAAA,GAEnCnB,gBAAgB;AAAAF,OAAA,CAAArB,OAAA,GAAA0C,QAAA"}
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import type { ITooltipItem } from './interface';
3
+ export type TooltipProps = {
4
+ /**
5
+ * The content that should be displayed.
6
+ */
7
+ item: ITooltipItem;
8
+ };
9
+ declare const Tooltip: FC<TooltipProps>;
10
+ export default Tooltip;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _Popup = _interopRequireDefault(require("../popup/Popup"));
9
+ var _TooltipItem = _interopRequireDefault(require("./tooltip-item/TooltipItem"));
10
+ var _Tooltip = require("./Tooltip.styles");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+ const Tooltip = _ref => {
15
+ let {
16
+ item,
17
+ children
18
+ } = _ref;
19
+ const tooltipRef = (0, _react.useRef)(null);
20
+ return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_Tooltip.StyledTooltip, null, /*#__PURE__*/_react.default.createElement(_Popup.default, {
21
+ shouldShowOnHover: true,
22
+ content: /*#__PURE__*/_react.default.createElement(_TooltipItem.default, {
23
+ text: item.text,
24
+ headline: item.headline
25
+ }),
26
+ ref: tooltipRef
27
+ }, children)), [item, children]);
28
+ };
29
+ Tooltip.displayName = 'Tooltip';
30
+ var _default = Tooltip;
31
+ exports.default = _default;
32
+ //# sourceMappingURL=Tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.js","names":["_react","_interopRequireWildcard","require","_Popup","_interopRequireDefault","_TooltipItem","_Tooltip","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Tooltip","_ref","item","children","tooltipRef","useRef","useMemo","createElement","StyledTooltip","shouldShowOnHover","content","text","headline","ref","displayName","_default","exports"],"sources":["../../../src/components/tooltip/Tooltip.tsx"],"sourcesContent":["import React, { FC, useMemo, useRef } from 'react';\nimport type { PopupRef } from '../popup/interface';\nimport Popup from '../popup/Popup';\nimport type { ITooltipItem } from './interface';\nimport TooltipItem from './tooltip-item/TooltipItem';\nimport { StyledTooltip } from './Tooltip.styles';\n\nexport type TooltipProps = {\n /**\n * The content that should be displayed.\n */\n item: ITooltipItem;\n};\n\nconst Tooltip: FC<TooltipProps> = ({ item, children }) => {\n const tooltipRef = useRef<PopupRef>(null);\n\n return useMemo(\n () => (\n <StyledTooltip>\n <Popup\n shouldShowOnHover\n content={<TooltipItem text={item.text} headline={item.headline} />}\n ref={tooltipRef}\n >\n {children}\n </Popup>\n </StyledTooltip>\n ),\n [item, children]\n );\n};\n\nTooltip.displayName = 'Tooltip';\n\nexport default Tooltip;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAAiD,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA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CAAAS,OAAA,CAAA2B,aAAA,CAAC9B,QAAA,CAAA+B,aAAa,qBACVrC,MAAA,CAAAS,OAAA,CAAA2B,aAAA,CAACjC,MAAA,CAAAM,OAAK;IACF6B,iBAAiB;IACjBC,OAAO,eAAEvC,MAAA,CAAAS,OAAA,CAAA2B,aAAA,CAAC/B,YAAA,CAAAI,OAAW;MAAC+B,IAAI,EAAET,IAAI,CAACS,IAAK;MAACC,QAAQ,EAAEV,IAAI,CAACU;IAAS,CAAE,CAAE;IACnEC,GAAG,EAAET;EAAW,GAEfD,QACE,CACI,CAClB,EACD,CAACD,IAAI,EAAEC,QAAQ,CACnB,CAAC;AACL,CAAC;AAEDH,OAAO,CAACc,WAAW,GAAG,SAAS;AAAC,IAAAC,QAAA,GAEjBf,OAAO;AAAAgB,OAAA,CAAApC,OAAA,GAAAmC,QAAA"}
@@ -0,0 +1 @@
1
+ export declare const StyledTooltip: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledTooltip = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ const StyledTooltip = _styledComponents.default.div``;
10
+ exports.StyledTooltip = StyledTooltip;
11
+ //# sourceMappingURL=Tooltip.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledTooltip","styled","div","exports"],"sources":["../../../src/components/tooltip/Tooltip.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledTooltip = styled.div``;\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,aAAa,GAAGC,yBAAM,CAACC,GAAI,EAAC;AAACC,OAAA,CAAAH,aAAA,GAAAA,aAAA"}
@@ -0,0 +1,4 @@
1
+ export interface ITooltipItem {
2
+ headline?: string;
3
+ text: string;
4
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +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":""}
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ export type TooltipProps = {
3
+ headline?: string;
4
+ text: string;
5
+ };
6
+ declare const TooltipItem: FC<TooltipProps>;
7
+ export default TooltipItem;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _TooltipItem = require("./TooltipItem.styles");
9
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
+ const TooltipItem = _ref => {
12
+ let {
13
+ headline,
14
+ text
15
+ } = _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.StyledTooltipItemText, null, text)), [headline, text]);
17
+ };
18
+ TooltipItem.displayName = 'TooltipItem';
19
+ var _default = TooltipItem;
20
+ exports.default = _default;
21
+ //# sourceMappingURL=TooltipItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TooltipItem.js","names":["_react","_interopRequireWildcard","require","_TooltipItem","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TooltipItem","_ref","headline","text","useMemo","createElement","StyledTooltipItem","StyledTooltipItemHeadline","StyledTooltipItemText","displayName","_default","exports"],"sources":["../../../../src/components/tooltip/tooltip-item/TooltipItem.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport {\n StyledTooltipItem,\n StyledTooltipItemHeadline,\n StyledTooltipItemText,\n} from './TooltipItem.styles';\n\nexport type TooltipProps = {\n headline?: string;\n text: string;\n};\n\nconst TooltipItem: FC<TooltipProps> = ({ headline, text }) =>\n useMemo(\n () => (\n <StyledTooltipItem>\n <StyledTooltipItemHeadline>{headline}</StyledTooltipItemHeadline>\n <StyledTooltipItemText>{text}</StyledTooltipItemText>\n </StyledTooltipItem>\n ),\n [headline, text]\n );\n\nTooltipItem.displayName = 'TooltipItem';\n\nexport default TooltipItem;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CA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AAA,OACrD,IAAAG,cAAO,EACH,mBACI9B,MAAA,CAAAW,OAAA,CAAAoB,aAAA,CAAC5B,YAAA,CAAA6B,iBAAiB,qBACdhC,MAAA,CAAAW,OAAA,CAAAoB,aAAA,CAAC5B,YAAA,CAAA8B,yBAAyB,QAAEL,QAAoC,CAAC,eACjE5B,MAAA,CAAAW,OAAA,CAAAoB,aAAA,CAAC5B,YAAA,CAAA+B,qBAAqB,QAAEL,IAA4B,CACrC,CACtB,EACD,CAACD,QAAQ,EAAEC,IAAI,CACnB,CAAC;AAAA;AAELH,WAAW,CAACS,WAAW,GAAG,aAAa;AAAC,IAAAC,QAAA,GAEzBV,WAAW;AAAAW,OAAA,CAAA1B,OAAA,GAAAyB,QAAA"}
@@ -0,0 +1,7 @@
1
+ export declare const StyledTooltipItem: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledTooltipItemHeadline: import("styled-components").StyledComponent<"h5", any, {
3
+ theme: import("../../color-scheme-provider/ColorSchemeProvider").Theme;
4
+ }, never>;
5
+ export declare const StyledTooltipItemText: import("styled-components").StyledComponent<"p", any, {
6
+ theme: import("../../color-scheme-provider/ColorSchemeProvider").Theme;
7
+ }, never>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledTooltipItemText = exports.StyledTooltipItemHeadline = exports.StyledTooltipItem = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ const StyledTooltipItem = _styledComponents.default.div`
10
+ padding: 5px;
11
+ `;
12
+ exports.StyledTooltipItem = StyledTooltipItem;
13
+ const StyledTooltipItemHeadline = _styledComponents.default.h5`
14
+ color: ${_ref => {
15
+ let {
16
+ theme
17
+ } = _ref;
18
+ return theme.headline;
19
+ }};
20
+ margin: 0;
21
+ `;
22
+ exports.StyledTooltipItemHeadline = StyledTooltipItemHeadline;
23
+ const StyledTooltipItemText = _styledComponents.default.p`
24
+ color: ${_ref2 => {
25
+ let {
26
+ theme
27
+ } = _ref2;
28
+ return theme.text;
29
+ }};
30
+ `;
31
+ exports.StyledTooltipItemText = StyledTooltipItemText;
32
+ //# sourceMappingURL=TooltipItem.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TooltipItem.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledTooltipItem","styled","div","exports","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,GAAGC,yBAAM,CAACC,GAAI;AAC5C;AACA,CAAC;AAACC,OAAA,CAAAH,iBAAA,GAAAA,iBAAA;AAIK,MAAMI,yBAAyB,GAAGH,yBAAM,CAACI,EAAmC;AACnF,aAAaC,IAAA;EAAA,IAAC;IAAEC;EAAsC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,QAAQ;AAAA,CAAC;AAC3E;AACA,CAAC;AAACL,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAIK,MAAMK,qBAAqB,GAAGR,yBAAM,CAACS,CAA8B;AAC1E,aAAaC,KAAA;EAAA,IAAC;IAAEJ;EAAkC,CAAC,GAAAI,KAAA;EAAA,OAAKJ,KAAK,CAACK,IAAI;AAAA,CAAC;AACnE,CAAC;AAACT,OAAA,CAAAM,qBAAA,GAAAA,qBAAA"}
package/lib/index.d.ts CHANGED
@@ -23,6 +23,9 @@ export { default as ListItem } from './components/list/list-item/ListItem';
23
23
  export { MentionFinderPopupAlignment } from './components/mention-finder/constants/alignment';
24
24
  export { default as MentionFinder } from './components/mention-finder/MentionFinder';
25
25
  export type { MentionMember } from './components/mention-finder/MentionFinder';
26
+ export { default as Popup } from './components/popup/Popup';
27
+ export { default as RadioButtonGroup } from './components/radio-button/radio-button-group/RadioButtonGroup';
28
+ export { default as RadioButton } from './components/radio-button/RadioButton';
26
29
  export type { ISearchBoxItem as SearchBoxItem } from './components/search-box/interface';
27
30
  export { default as SearchBox } from './components/search-box/SearchBox';
28
31
  export { default as SearchInput } from './components/search-input/SearchInput';
@@ -30,3 +33,4 @@ export { default as SharingBar } from './components/sharing-bar/SharingBar';
30
33
  export { default as Slider } from './components/slider/Slider';
31
34
  export { default as SmallWaitCursor, SmallWaitCursorSpeed, } from './components/small-wait-cursor/SmallWaitCursor';
32
35
  export { default as TextArea } from './components/text-area/TextArea';
36
+ export { default as Tooltip } from './components/tooltip/Tooltip';
package/lib/index.js CHANGED
@@ -129,6 +129,24 @@ Object.defineProperty(exports, "MentionFinderPopupAlignment", {
129
129
  return _alignment.MentionFinderPopupAlignment;
130
130
  }
131
131
  });
132
+ Object.defineProperty(exports, "Popup", {
133
+ enumerable: true,
134
+ get: function () {
135
+ return _Popup.default;
136
+ }
137
+ });
138
+ Object.defineProperty(exports, "RadioButton", {
139
+ enumerable: true,
140
+ get: function () {
141
+ return _RadioButton.default;
142
+ }
143
+ });
144
+ Object.defineProperty(exports, "RadioButtonGroup", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _RadioButtonGroup.default;
148
+ }
149
+ });
132
150
  Object.defineProperty(exports, "SearchBox", {
133
151
  enumerable: true,
134
152
  get: function () {
@@ -171,6 +189,12 @@ Object.defineProperty(exports, "TextArea", {
171
189
  return _TextArea.default;
172
190
  }
173
191
  });
192
+ Object.defineProperty(exports, "Tooltip", {
193
+ enumerable: true,
194
+ get: function () {
195
+ return _Tooltip.default;
196
+ }
197
+ });
174
198
  var _Accordion = _interopRequireDefault(require("./components/accordion/Accordion"));
175
199
  var _AccordionContent = _interopRequireDefault(require("./components/accordion/accordion-content/AccordionContent"));
176
200
  var _AccordionGroup = _interopRequireDefault(require("./components/accordion/accordion-group/AccordionGroup"));
@@ -192,12 +216,16 @@ var _ListItemContent = _interopRequireDefault(require("./components/list/list-it
192
216
  var _ListItem = _interopRequireDefault(require("./components/list/list-item/ListItem"));
193
217
  var _alignment = require("./components/mention-finder/constants/alignment");
194
218
  var _MentionFinder = _interopRequireDefault(require("./components/mention-finder/MentionFinder"));
219
+ var _Popup = _interopRequireDefault(require("./components/popup/Popup"));
220
+ var _RadioButtonGroup = _interopRequireDefault(require("./components/radio-button/radio-button-group/RadioButtonGroup"));
221
+ var _RadioButton = _interopRequireDefault(require("./components/radio-button/RadioButton"));
195
222
  var _SearchBox = _interopRequireDefault(require("./components/search-box/SearchBox"));
196
223
  var _SearchInput = _interopRequireDefault(require("./components/search-input/SearchInput"));
197
224
  var _SharingBar = _interopRequireDefault(require("./components/sharing-bar/SharingBar"));
198
225
  var _Slider = _interopRequireDefault(require("./components/slider/Slider"));
199
226
  var _SmallWaitCursor = _interopRequireWildcard(require("./components/small-wait-cursor/SmallWaitCursor"));
200
227
  var _TextArea = _interopRequireDefault(require("./components/text-area/TextArea"));
228
+ var _Tooltip = _interopRequireDefault(require("./components/tooltip/Tooltip"));
201
229
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
202
230
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
203
231
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AmountControl","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_ComboBox","_ContentCard","_ContextMenu","_FilterButton","_GridImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_alignment","_MentionFinder","_SearchBox","_SearchInput","_SharingBar","_Slider","_SmallWaitCursor","_interopRequireWildcard","_TextArea","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sources":["../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\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 { WithTheme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport type { IComboBoxItem as ComboBoxItem } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport { default as FilterButton } from './components/filter-button/FilterButton';\nexport type {\n FilterButtonItemShape,\n FilterButtonSize,\n IFilterButtonItem as FilterButtonItem,\n} from './components/filter-button/interface';\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 { default as ListItem } from './components/list/list-item/ListItem';\nexport { MentionFinderPopupAlignment } from './components/mention-finder/constants/alignment';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport type { ISearchBoxItem as SearchBoxItem } from './components/search-box/interface';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport { default as TextArea } from './components/text-area/TextArea';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA"}
1
+ {"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AmountControl","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_ComboBox","_ContentCard","_ContextMenu","_FilterButton","_GridImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_alignment","_MentionFinder","_Popup","_RadioButtonGroup","_RadioButton","_SearchBox","_SearchInput","_SharingBar","_Slider","_SmallWaitCursor","_interopRequireWildcard","_TextArea","_Tooltip","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sources":["../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\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 { WithTheme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport type { IComboBoxItem as ComboBoxItem } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport { default as FilterButton } from './components/filter-button/FilterButton';\nexport type {\n FilterButtonItemShape,\n FilterButtonSize,\n IFilterButtonItem as FilterButtonItem,\n} from './components/filter-button/interface';\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 { default as ListItem } from './components/list/list-item/ListItem';\nexport { MentionFinderPopupAlignment } from './components/mention-finder/constants/alignment';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as RadioButtonGroup } from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport type { ISearchBoxItem as SearchBoxItem } from './components/search-box/interface';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,eAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,MAAA,GAAAN,sBAAA,CAAA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version": "5.0.0-beta.176",
3
+ "version": "5.0.0-beta.178",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "keywords": [
6
6
  "chayns",
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "ba18e5c342ffb57fd61a98a8e223a768d0595e5d"
66
+ "gitHead": "bb434a7b62b3b66f2d662bcb0b124a9c4f02f0b2"
67
67
  }