@chayns-components/core 5.0.0-beta.85 → 5.0.0-beta.89

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 (27) hide show
  1. package/lib/components/accordion/Accordion.js +3 -2
  2. package/lib/components/accordion/Accordion.js.map +1 -1
  3. package/lib/components/accordion/accordion-body/AccordionBody.styles.js +1 -1
  4. package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  5. package/lib/components/accordion/accordion-head/AccordionHead.styles.js +9 -9
  6. package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  7. package/lib/components/context-menu/ContextMenu.js +2 -1
  8. package/lib/components/context-menu/ContextMenu.js.map +1 -1
  9. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +1 -1
  10. package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
  11. package/lib/components/input/Input.js +4 -2
  12. package/lib/components/input/Input.js.map +1 -1
  13. package/lib/components/input/Input.styles.js +2 -1
  14. package/lib/components/input/Input.styles.js.map +1 -1
  15. package/lib/components/lazy-motion-wrapper/LazyMotionWrapper.d.ts +6 -0
  16. package/lib/components/lazy-motion-wrapper/LazyMotionWrapper.js +21 -0
  17. package/lib/components/lazy-motion-wrapper/LazyMotionWrapper.js.map +1 -0
  18. package/lib/components/list/List.js +4 -2
  19. package/lib/components/list/List.js.map +1 -1
  20. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +1 -1
  21. package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
  22. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +2 -2
  23. package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  24. package/lib/index.d.ts +1 -0
  25. package/lib/index.js +7 -0
  26. package/lib/index.js.map +1 -1
  27. package/package.json +2 -2
@@ -7,6 +7,7 @@ exports.default = exports.AccordionContext = void 0;
7
7
  var _framerMotion = require("framer-motion");
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _uuid = require("../../hooks/uuid");
10
+ var _LazyMotionWrapper = _interopRequireDefault(require("../lazy-motion-wrapper/LazyMotionWrapper"));
10
11
  var _AccordionBody = _interopRequireDefault(require("./accordion-body/AccordionBody"));
11
12
  var _AccordionGroup = require("./accordion-group/AccordionGroup");
12
13
  var _AccordionHead = _interopRequireDefault(require("./accordion-head/AccordionHead"));
@@ -82,7 +83,7 @@ const Accordion = _ref => {
82
83
  const accordionContextProviderValue = (0, _react.useMemo)(() => ({
83
84
  isWrapped
84
85
  }), [isWrapped]);
85
- return /*#__PURE__*/_react.default.createElement(_Accordion.StyledAccordion, {
86
+ return /*#__PURE__*/_react.default.createElement(_LazyMotionWrapper.default, null, /*#__PURE__*/_react.default.createElement(_Accordion.StyledAccordion, {
86
87
  className: "beta-chayns-accordion",
87
88
  isOpen: isOpen,
88
89
  isParentWrapped: isParentWrapped,
@@ -112,7 +113,7 @@ const Accordion = _ref => {
112
113
  }, isOpen && /*#__PURE__*/_react.default.createElement(_AccordionBody.default, {
113
114
  maxHeight: bodyMaxHeight,
114
115
  onScroll: onBodyScroll
115
- }, children)))));
116
+ }, children))))));
116
117
  };
117
118
  Accordion.displayName = 'Accordion';
118
119
  var _default = Accordion;
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_uuid","_AccordionBody","_interopRequireDefault","_AccordionGroup","_AccordionHead","_Accordion","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","AccordionContext","React","createContext","isWrapped","exports","displayName","Accordion","_ref","bodyMaxHeight","children","icon","isDefaultOpen","isDisabled","isFixed","isTitleGreyed","onBodyScroll","onClose","onOpen","onSearchChange","rightElement","searchIcon","searchPlaceholder","shouldHideBackground","title","titleElement","openAccordionUuid","updateOpenAccordionUuid","useContext","AccordionGroupContext","isParentWrapped","isAccordionOpen","setIsAccordionOpen","useState","uuid","useUuid","isInitialRenderRef","useRef","isInGroup","isOpen","handleHeadClick","useCallback","currentIsAccordionOpen","useEffect","current","shouldOnlyOpen","accordionContextProviderValue","useMemo","createElement","StyledAccordion","className","Provider","value","MotionConfig","transition","type","onClick","AnimatePresence","initial","maxHeight","onScroll","_default"],"sources":["../../../src/components/accordion/Accordion.tsx"],"sourcesContent":["import { AnimatePresence, MotionConfig } from 'framer-motion';\nimport React, {\n ChangeEventHandler,\n FC,\n ReactNode,\n UIEvent,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport AccordionBody from './accordion-body/AccordionBody';\nimport { AccordionGroupContext } from './accordion-group/AccordionGroup';\nimport AccordionHead from './accordion-head/AccordionHead';\nimport { StyledAccordion } from './Accordion.styles';\n\nexport const AccordionContext = React.createContext({ isWrapped: false });\n\nAccordionContext.displayName = 'AccordionContext';\n\nexport type AccordionProps = {\n /**\n * Maximum height of the accordion body element. This automatically makes the content of the\n * body element scrollable.\n */\n bodyMaxHeight?: number;\n /**\n * The content of the accordion body\n */\n children: ReactNode;\n /**\n * The icon that is displayed in front of the title\n */\n icon?: string;\n /**\n * This can be used to automatically expand the Accordion during the first render.\n */\n isDefaultOpen?: boolean;\n /**\n * This will disable the Accordion so that it cannot be opened and will gray out the title.\n */\n isDisabled?: boolean;\n /**\n * This can be used so that the Accordion cannot be opened or closed.\n * In addition, in this case the icon is exchanged to mark the Accordions.\n */\n isFixed?: boolean;\n /**\n * This will gray out the title of the Accordion to indicate hidden content, for example.\n */\n isTitleGreyed?: boolean;\n /**\n * This value must be set for nested Accordions. This adjusts the style of\n * the head and the padding of the content.\n */\n isWrapped?: boolean;\n /**\n * Function that is executed when the accordion body will be scrolled\n */\n onBodyScroll?: (event: UIEvent<HTMLDivElement>) => void;\n /**\n * Function that is executed when the accordion will be closed.\n */\n onClose?: VoidFunction;\n /**\n * Function that is executed when the accordion will be opened.\n */\n onOpen?: VoidFunction;\n /**\n * Function that is executed when the text of the search in the accordion\n * head changes. When this function is given, the search field is displayed\n * in the Accordion Head.\n */\n onSearchChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Content to be displayed on the right side in the head of the Accordion\n */\n rightElement?: ReactNode;\n /**\n * Icon to be displayed on the right side in the search input\n */\n searchIcon?: string[];\n /**\n * The placeholder to be used for the search\n */\n searchPlaceholder?: string;\n /**\n * This will hide the background color of the accordion\n */\n shouldHideBackground?: boolean;\n /**\n * Title of the Accordion displayed in the head\n */\n title: string;\n /**\n * Additional elements to be displayed in the header next to the title.\n */\n titleElement?: ReactNode;\n};\n\nconst Accordion: FC<AccordionProps> = ({\n bodyMaxHeight,\n children,\n icon,\n isDefaultOpen = false,\n isDisabled = false,\n isFixed = false,\n isTitleGreyed = false,\n isWrapped = false,\n onBodyScroll,\n onClose,\n onOpen,\n onSearchChange,\n rightElement,\n searchIcon,\n searchPlaceholder,\n shouldHideBackground = false,\n title,\n titleElement,\n}) => {\n const { openAccordionUuid, updateOpenAccordionUuid } = useContext(AccordionGroupContext);\n const { isWrapped: isParentWrapped } = useContext(AccordionContext);\n\n const [isAccordionOpen, setIsAccordionOpen] = useState<boolean>(isDefaultOpen);\n\n const uuid = useUuid();\n\n const isInitialRenderRef = useRef(true);\n\n const isInGroup = typeof updateOpenAccordionUuid === 'function';\n\n const isOpen = isInGroup ? openAccordionUuid === uuid : isAccordionOpen;\n\n const handleHeadClick = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n if (typeof updateOpenAccordionUuid === 'function') {\n updateOpenAccordionUuid(uuid);\n }\n\n setIsAccordionOpen((currentIsAccordionOpen) => !currentIsAccordionOpen);\n }, [isDisabled, updateOpenAccordionUuid, uuid]);\n\n useEffect(() => {\n if (isInitialRenderRef.current) {\n isInitialRenderRef.current = false;\n } else if (isOpen) {\n if (typeof onOpen === 'function') {\n onOpen();\n }\n } else if (typeof onClose === 'function') {\n onClose();\n }\n }, [isOpen, onClose, onOpen]);\n\n useEffect(() => {\n if (isDefaultOpen && typeof updateOpenAccordionUuid === 'function') {\n updateOpenAccordionUuid(uuid, { shouldOnlyOpen: true });\n }\n }, [isDefaultOpen, updateOpenAccordionUuid, uuid]);\n\n const accordionContextProviderValue = useMemo(() => ({ isWrapped }), [isWrapped]);\n\n return (\n <StyledAccordion\n className=\"beta-chayns-accordion\"\n isOpen={isOpen}\n isParentWrapped={isParentWrapped}\n isWrapped={isWrapped}\n shouldHideBackground={shouldHideBackground}\n >\n <AccordionContext.Provider value={accordionContextProviderValue}>\n <MotionConfig transition={{ type: 'tween' }}>\n <AccordionHead\n icon={icon}\n isOpen={isOpen}\n isFixed={isFixed}\n isTitleGreyed={isTitleGreyed || isDisabled}\n isWrapped={isWrapped}\n onClick={handleHeadClick}\n onSearchChange={onSearchChange}\n rightElement={rightElement}\n searchIcon={searchIcon}\n searchPlaceholder={searchPlaceholder}\n title={title}\n titleElement={titleElement}\n />\n <AnimatePresence initial={false}>\n {isOpen && (\n <AccordionBody maxHeight={bodyMaxHeight} onScroll={onBodyScroll}>\n {children}\n </AccordionBody>\n )}\n </AnimatePresence>\n </MotionConfig>\n </AccordionContext.Provider>\n </StyledAccordion>\n );\n};\n\nAccordion.displayName = 'Accordion';\n\nexport default Accordion;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAYA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AAAqD,SAAAK,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA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CAAAmE,aAAA,CAACvE,cAAA,CAAAI,OAAa;IACV8B,IAAI,EAAEA,IAAK;IACX4B,MAAM,EAAEA,MAAO;IACfzB,OAAO,EAAEA,OAAQ;IACjBC,aAAa,EAAEA,aAAa,IAAIF,UAAW;IAC3CT,SAAS,EAAEA,SAAU;IACrBoD,OAAO,EAAEhB,eAAgB;IACzBrB,cAAc,EAAEA,cAAe;IAC/BC,YAAY,EAAEA,YAAa;IAC3BC,UAAU,EAAEA,UAAW;IACvBC,iBAAiB,EAAEA,iBAAkB;IACrCE,KAAK,EAAEA,KAAM;IACbC,YAAY,EAAEA;EAAa,EAC7B,eACFtD,MAAA,CAAAU,OAAA,CAAAmE,aAAA,CAAC/E,aAAA,CAAAwF,eAAe;IAACC,OAAO,EAAE;EAAM,GAC3BnB,MAAM,iBACHpE,MAAA,CAAAU,OAAA,CAAAmE,aAAA,CAAC1E,cAAA,CAAAO,OAAa;IAAC8E,SAAS,EAAElD,aAAc;IAACmD,QAAQ,EAAE5C;EAAa,GAC3DN,QAAQ,CAEhB,CACa,CACP,CACS,CACd;AAE1B,CAAC;AAEDH,SAAS,CAACD,WAAW,GAAG,WAAW;AAAC,IAAAuD,QAAA,GAErBtD,SAAS;AAAAF,OAAA,CAAAxB,OAAA,GAAAgF,QAAA"}
1
+ {"version":3,"file":"Accordion.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_uuid","_LazyMotionWrapper","_interopRequireDefault","_AccordionBody","_AccordionGroup","_AccordionHead","_Accordion","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","AccordionContext","React","createContext","isWrapped","exports","displayName","Accordion","_ref","bodyMaxHeight","children","icon","isDefaultOpen","isDisabled","isFixed","isTitleGreyed","onBodyScroll","onClose","onOpen","onSearchChange","rightElement","searchIcon","searchPlaceholder","shouldHideBackground","title","titleElement","openAccordionUuid","updateOpenAccordionUuid","useContext","AccordionGroupContext","isParentWrapped","isAccordionOpen","setIsAccordionOpen","useState","uuid","useUuid","isInitialRenderRef","useRef","isInGroup","isOpen","handleHeadClick","useCallback","currentIsAccordionOpen","useEffect","current","shouldOnlyOpen","accordionContextProviderValue","useMemo","createElement","StyledAccordion","className","Provider","value","MotionConfig","transition","type","onClick","AnimatePresence","initial","maxHeight","onScroll","_default"],"sources":["../../../src/components/accordion/Accordion.tsx"],"sourcesContent":["import { AnimatePresence, MotionConfig } from 'framer-motion';\nimport React, {\n ChangeEventHandler,\n FC,\n ReactNode,\n UIEvent,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport LazyMotionWrapper from '../lazy-motion-wrapper/LazyMotionWrapper';\nimport AccordionBody from './accordion-body/AccordionBody';\nimport { AccordionGroupContext } from './accordion-group/AccordionGroup';\nimport AccordionHead from './accordion-head/AccordionHead';\nimport { StyledAccordion } from './Accordion.styles';\n\nexport const AccordionContext = React.createContext({ isWrapped: false });\n\nAccordionContext.displayName = 'AccordionContext';\n\nexport type AccordionProps = {\n /**\n * Maximum height of the accordion body element. This automatically makes the content of the\n * body element scrollable.\n */\n bodyMaxHeight?: number;\n /**\n * The content of the accordion body\n */\n children: ReactNode;\n /**\n * The icon that is displayed in front of the title\n */\n icon?: string;\n /**\n * This can be used to automatically expand the Accordion during the first render.\n */\n isDefaultOpen?: boolean;\n /**\n * This will disable the Accordion so that it cannot be opened and will gray out the title.\n */\n isDisabled?: boolean;\n /**\n * This can be used so that the Accordion cannot be opened or closed.\n * In addition, in this case the icon is exchanged to mark the Accordions.\n */\n isFixed?: boolean;\n /**\n * This will gray out the title of the Accordion to indicate hidden content, for example.\n */\n isTitleGreyed?: boolean;\n /**\n * This value must be set for nested Accordions. This adjusts the style of\n * the head and the padding of the content.\n */\n isWrapped?: boolean;\n /**\n * Function that is executed when the accordion body will be scrolled\n */\n onBodyScroll?: (event: UIEvent<HTMLDivElement>) => void;\n /**\n * Function that is executed when the accordion will be closed.\n */\n onClose?: VoidFunction;\n /**\n * Function that is executed when the accordion will be opened.\n */\n onOpen?: VoidFunction;\n /**\n * Function that is executed when the text of the search in the accordion\n * head changes. When this function is given, the search field is displayed\n * in the Accordion Head.\n */\n onSearchChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Content to be displayed on the right side in the head of the Accordion\n */\n rightElement?: ReactNode;\n /**\n * Icon to be displayed on the right side in the search input\n */\n searchIcon?: string[];\n /**\n * The placeholder to be used for the search\n */\n searchPlaceholder?: string;\n /**\n * This will hide the background color of the accordion\n */\n shouldHideBackground?: boolean;\n /**\n * Title of the Accordion displayed in the head\n */\n title: string;\n /**\n * Additional elements to be displayed in the header next to the title.\n */\n titleElement?: ReactNode;\n};\n\nconst Accordion: FC<AccordionProps> = ({\n bodyMaxHeight,\n children,\n icon,\n isDefaultOpen = false,\n isDisabled = false,\n isFixed = false,\n isTitleGreyed = false,\n isWrapped = false,\n onBodyScroll,\n onClose,\n onOpen,\n onSearchChange,\n rightElement,\n searchIcon,\n searchPlaceholder,\n shouldHideBackground = false,\n title,\n titleElement,\n}) => {\n const { openAccordionUuid, updateOpenAccordionUuid } = useContext(AccordionGroupContext);\n const { isWrapped: isParentWrapped } = useContext(AccordionContext);\n\n const [isAccordionOpen, setIsAccordionOpen] = useState<boolean>(isDefaultOpen);\n\n const uuid = useUuid();\n\n const isInitialRenderRef = useRef(true);\n\n const isInGroup = typeof updateOpenAccordionUuid === 'function';\n\n const isOpen = isInGroup ? openAccordionUuid === uuid : isAccordionOpen;\n\n const handleHeadClick = useCallback(() => {\n if (isDisabled) {\n return;\n }\n\n if (typeof updateOpenAccordionUuid === 'function') {\n updateOpenAccordionUuid(uuid);\n }\n\n setIsAccordionOpen((currentIsAccordionOpen) => !currentIsAccordionOpen);\n }, [isDisabled, updateOpenAccordionUuid, uuid]);\n\n useEffect(() => {\n if (isInitialRenderRef.current) {\n isInitialRenderRef.current = false;\n } else if (isOpen) {\n if (typeof onOpen === 'function') {\n onOpen();\n }\n } else if (typeof onClose === 'function') {\n onClose();\n }\n }, [isOpen, onClose, onOpen]);\n\n useEffect(() => {\n if (isDefaultOpen && typeof updateOpenAccordionUuid === 'function') {\n updateOpenAccordionUuid(uuid, { shouldOnlyOpen: true });\n }\n }, [isDefaultOpen, updateOpenAccordionUuid, uuid]);\n\n const accordionContextProviderValue = useMemo(() => ({ isWrapped }), [isWrapped]);\n\n return (\n <LazyMotionWrapper>\n <StyledAccordion\n className=\"beta-chayns-accordion\"\n isOpen={isOpen}\n isParentWrapped={isParentWrapped}\n isWrapped={isWrapped}\n shouldHideBackground={shouldHideBackground}\n >\n <AccordionContext.Provider value={accordionContextProviderValue}>\n <MotionConfig transition={{ type: 'tween' }}>\n <AccordionHead\n icon={icon}\n isOpen={isOpen}\n isFixed={isFixed}\n isTitleGreyed={isTitleGreyed || isDisabled}\n isWrapped={isWrapped}\n onClick={handleHeadClick}\n onSearchChange={onSearchChange}\n rightElement={rightElement}\n searchIcon={searchIcon}\n searchPlaceholder={searchPlaceholder}\n title={title}\n titleElement={titleElement}\n />\n <AnimatePresence initial={false}>\n {isOpen && (\n <AccordionBody maxHeight={bodyMaxHeight} onScroll={onBodyScroll}>\n {children}\n </AccordionBody>\n )}\n </AnimatePresence>\n </MotionConfig>\n </AccordionContext.Provider>\n </StyledAccordion>\n </LazyMotionWrapper>\n );\n};\n\nAccordion.displayName = 'Accordion';\n\nexport default Accordion;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAYA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,cAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAH,s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E,aAAA,CAAC/C,gBAAgB,CAACkD,QAAQ;IAACC,KAAK,EAAEN;EAA8B,gBAC5D5E,MAAA,CAAAW,OAAA,CAAAmE,aAAA,CAAChF,aAAA,CAAAqF,YAAY;IAACC,UAAU,EAAE;MAAEC,IAAI,EAAE;IAAQ;EAAE,gBACxCrF,MAAA,CAAAW,OAAA,CAAAmE,aAAA,CAACvE,cAAA,CAAAI,OAAa;IACV8B,IAAI,EAAEA,IAAK;IACX4B,MAAM,EAAEA,MAAO;IACfzB,OAAO,EAAEA,OAAQ;IACjBC,aAAa,EAAEA,aAAa,IAAIF,UAAW;IAC3CT,SAAS,EAAEA,SAAU;IACrBoD,OAAO,EAAEhB,eAAgB;IACzBrB,cAAc,EAAEA,cAAe;IAC/BC,YAAY,EAAEA,YAAa;IAC3BC,UAAU,EAAEA,UAAW;IACvBC,iBAAiB,EAAEA,iBAAkB;IACrCE,KAAK,EAAEA,KAAM;IACbC,YAAY,EAAEA;EAAa,EAC7B,eACFvD,MAAA,CAAAW,OAAA,CAAAmE,aAAA,CAAChF,aAAA,CAAAyF,eAAe;IAACC,OAAO,EAAE;EAAM,GAC3BnB,MAAM,iBACHrE,MAAA,CAAAW,OAAA,CAAAmE,aAAA,CAACzE,cAAA,CAAAM,OAAa;IAAC8E,SAAS,EAAElD,aAAc;IAACmD,QAAQ,EAAE5C;EAAa,GAC3DN,QAAQ,CAEhB,CACa,CACP,CACS,CACd,CACF;AAE5B,CAAC;AAEDH,SAAS,CAACD,WAAW,GAAG,WAAW;AAAC,IAAAuD,QAAA,GAErBtD,SAAS;AAAAF,OAAA,CAAAxB,OAAA,GAAAgF,QAAA"}
@@ -8,7 +8,7 @@ var _framerMotion = require("framer-motion");
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
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
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 StyledMotionAccordionBody = (0, _styledComponents.default)(_framerMotion.motion.div)`
11
+ const StyledMotionAccordionBody = (0, _styledComponents.default)(_framerMotion.m.div)`
12
12
  overflow: hidden;
13
13
 
14
14
  ${_ref => {
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionBody.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledMotionAccordionBody","styled","motion","div","_ref","maxHeight","css","exports"],"sources":["../../../../src/components/accordion/accordion-body/AccordionBody.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { AccordionBodyProps } from './AccordionBody';\n\ntype StyledMotionAccordionBodyProps = Pick<AccordionBodyProps, 'maxHeight'>;\n\nexport const StyledMotionAccordionBody = styled(motion.div)<StyledMotionAccordionBodyProps>`\n overflow: hidden;\n\n ${({ maxHeight }) =>\n typeof maxHeight === 'number' &&\n css`\n max-height: ${maxHeight}px;\n overflow-y: scroll;\n `}\n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AM,EAACC,oBAAM,CAACC,GAAG,CAAkC;AAC5F;AACA;AACA,MAAMC,IAAA;EAAA,IAAC;IAAEC;EAAU,CAAC,GAAAD,IAAA;EAAA,OACZ,OAAOC,SAAS,KAAK,QAAQ,IAC7B,IAAAC,qBAAG,CAAC;AACZ,0BAA0BD,SAAU;AACpC;AACA,SAAS;AAAA,CAAC;AACV,CAAC;AAACE,OAAA,CAAAP,yBAAA,GAAAA,yBAAA"}
1
+ {"version":3,"file":"AccordionBody.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledMotionAccordionBody","styled","m","div","_ref","maxHeight","css","exports"],"sources":["../../../../src/components/accordion/accordion-body/AccordionBody.styles.ts"],"sourcesContent":["import { m } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { AccordionBodyProps } from './AccordionBody';\n\ntype StyledMotionAccordionBodyProps = Pick<AccordionBodyProps, 'maxHeight'>;\n\nexport const StyledMotionAccordionBody = styled(m.div)<StyledMotionAccordionBodyProps>`\n overflow: hidden;\n\n ${({ maxHeight }) =>\n typeof maxHeight === 'number' &&\n css`\n max-height: ${maxHeight}px;\n overflow-y: scroll;\n `}\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAgD,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,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAA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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
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 StyledMotionAccordionHead = (0, _styledComponents.default)(_framerMotion.motion.div)`
11
+ const StyledMotionAccordionHead = (0, _styledComponents.default)(_framerMotion.m.div)`
12
12
  align-items: center;
13
13
  color: ${_ref => {
14
14
  let {
@@ -21,7 +21,7 @@ const StyledMotionAccordionHead = (0, _styledComponents.default)(_framerMotion.m
21
21
  padding: 4px 0;
22
22
  `;
23
23
  exports.StyledMotionAccordionHead = StyledMotionAccordionHead;
24
- const StyledMotionIconWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
24
+ const StyledMotionIconWrapper = (0, _styledComponents.default)(_framerMotion.m.div)`
25
25
  align-items: center;
26
26
  cursor: ${_ref2 => {
27
27
  let {
@@ -36,7 +36,7 @@ const StyledMotionIconWrapper = (0, _styledComponents.default)(_framerMotion.mot
36
36
  width: 25px;
37
37
  `;
38
38
  exports.StyledMotionIconWrapper = StyledMotionIconWrapper;
39
- const StyledMotionContentWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
39
+ const StyledMotionContentWrapper = (0, _styledComponents.default)(_framerMotion.m.div)`
40
40
  align-self: flex-start;
41
41
  cursor: ${_ref3 => {
42
42
  let {
@@ -51,13 +51,13 @@ const StyledMotionContentWrapper = (0, _styledComponents.default)(_framerMotion.
51
51
  margin-right: 10px;
52
52
  `;
53
53
  exports.StyledMotionContentWrapper = StyledMotionContentWrapper;
54
- const StyledMotionTitleWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
54
+ const StyledMotionTitleWrapper = (0, _styledComponents.default)(_framerMotion.m.div)`
55
55
  display: grid;
56
56
  flex: 0 1 auto;
57
57
  grid-template-areas: 'header';
58
58
  `;
59
59
  exports.StyledMotionTitleWrapper = StyledMotionTitleWrapper;
60
- const StyledMotionTitle = (0, _styledComponents.default)(_framerMotion.motion.div)`
60
+ const StyledMotionTitle = (0, _styledComponents.default)(_framerMotion.m.div)`
61
61
  font-size: ${_ref4 => {
62
62
  let {
63
63
  isOpen,
@@ -102,7 +102,7 @@ const StyledMotionTitle = (0, _styledComponents.default)(_framerMotion.motion.di
102
102
  }}
103
103
  `;
104
104
  exports.StyledMotionTitle = StyledMotionTitle;
105
- const StyledMotionTitleElementWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
105
+ const StyledMotionTitleElementWrapper = (0, _styledComponents.default)(_framerMotion.m.div)`
106
106
  align-items: center;
107
107
  display: flex;
108
108
  margin-left: 8px;
@@ -117,14 +117,14 @@ const StyledRightWrapper = _styledComponents.default.div`
117
117
  position: relative;
118
118
  `;
119
119
  exports.StyledRightWrapper = StyledRightWrapper;
120
- const StyledMotionRightElementWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
120
+ const StyledMotionRightElementWrapper = (0, _styledComponents.default)(_framerMotion.m.div)`
121
121
  align-items: center;
122
122
  display: flex;
123
123
  grid-area: header;
124
124
  justify-content: flex-end;
125
125
  `;
126
126
  exports.StyledMotionRightElementWrapper = StyledMotionRightElementWrapper;
127
- const StyledMotionRightInput = (0, _styledComponents.default)(_framerMotion.motion.input)`
127
+ const StyledMotionRightInput = (0, _styledComponents.default)(_framerMotion.m.input)`
128
128
  background-color: transparent;
129
129
  border: 1px solid transparent;
130
130
  border-bottom-color: rgba(
@@ -145,7 +145,7 @@ const StyledMotionRightInput = (0, _styledComponents.default)(_framerMotion.moti
145
145
  }};
146
146
  `;
147
147
  exports.StyledMotionRightInput = StyledMotionRightInput;
148
- const StyledMotionRightInputIconWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
148
+ const StyledMotionRightInputIconWrapper = (0, _styledComponents.default)(_framerMotion.m.div)`
149
149
  align-items: center;
150
150
  display: flex;
151
151
  height: 100%;
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionHead.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledMotionAccordionHead","styled","motion","div","_ref","theme","text","exports","StyledMotionIconWrapper","_ref2","onClick","StyledMotionContentWrapper","_ref3","StyledMotionTitleWrapper","StyledMotionTitle","_ref4","isOpen","isWrapped","undefined","_ref5","_ref6","_ref7","_ref8","css","StyledMotionTitleElementWrapper","StyledRightWrapper","StyledMotionRightElementWrapper","StyledMotionRightInput","input","_ref9","_ref10","hasIcon","StyledMotionRightInputIconWrapper"],"sources":["../../../../src/components/accordion/accordion-head/AccordionHead.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledMotionAccordionHeadProps = WithTheme<unknown>;\n\nexport const StyledMotionAccordionHead = styled(motion.div)`\n align-items: center;\n color: ${({ theme }: StyledMotionAccordionHeadProps) => theme.text};\n display: flex;\n overflow: hidden;\n padding: 4px 0;\n`;\n\nexport const StyledMotionIconWrapper = styled(motion.div)`\n align-items: center;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n height: 25px;\n justify-content: center;\n width: 25px;\n`;\n\nexport const StyledMotionContentWrapper = styled(motion.div)`\n align-self: flex-start;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 1 1 auto;\n height: 100%;\n overflow: hidden;\n margin-right: 10px;\n`;\n\nexport const StyledMotionTitleWrapper = styled(motion.div)`\n display: grid;\n flex: 0 1 auto;\n grid-template-areas: 'header';\n`;\n\ninterface StyledMotionTitleProps {\n isOpen: boolean;\n isWrapped: boolean;\n}\n\nexport const StyledMotionTitle = styled(motion.div)<StyledMotionTitleProps>`\n font-size: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? '1.3rem' : undefined)};\n font-weight: ${({ isOpen, isWrapped }) => (isOpen && isWrapped ? 700 : 'normal')};\n grid-area: header;\n height: ${({ isWrapped }) => (isWrapped ? '100%' : undefined)};\n overflow: hidden;\n text-overflow: ellipsis;\n transform-origin: top left;\n user-select: none;\n white-space: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? 'normal' : 'nowrap')};\n\n ${({ isWrapped }) =>\n isWrapped &&\n css`\n align-items: center;\n display: flex;\n `}\n`;\n\nexport const StyledMotionTitleElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n margin-left: 8px;\n`;\n\nexport const StyledRightWrapper = styled.div`\n display: grid;\n flex: 0 0 auto;\n grid-template-areas: 'right';\n margin-right: 5px;\n overflow: hidden;\n position: relative;\n`;\n\nexport const StyledMotionRightElementWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n grid-area: header;\n justify-content: flex-end;\n`;\n\ntype StyledMotionRightInputProps = WithTheme<{\n hasIcon: boolean;\n}>;\n\nexport const StyledMotionRightInput = styled(motion.input)<StyledMotionRightInputProps>`\n background-color: transparent;\n border: 1px solid transparent;\n border-bottom-color: rgba(\n ${({ theme }: StyledMotionRightInputProps) => theme['headline-rgb']},\n 0.45\n );\n grid-area: header;\n padding: ${({ hasIcon }) => (hasIcon ? '5px 23px 5px 1px' : '5px 1px')};\n`;\n\nexport const StyledMotionRightInputIconWrapper = styled(motion.div)`\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n right: 4px;\n top: 0;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAgD,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,SAAAF,wBAAAM,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,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,G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+BAAA,GAAAA,+BAAA;AAMK,MAAMC,sBAAsB,GAAG,IAAA1B,yBAAM,EAACC,oBAAM,CAAC0B,KAAK,CAA+B;AACxF;AACA;AACA;AACA,UAAUC,KAAA;EAAA,IAAC;IAAExB;EAAmC,CAAC,GAAAwB,KAAA;EAAA,OAAKxB,KAAK,CAAC,cAAc,CAAC;AAAA,CAAC;AAC5E;AACA;AACA;AACA,eAAeyB,MAAA;EAAA,IAAC;IAAEC;EAAQ,CAAC,GAAAD,MAAA;EAAA,OAAMC,OAAO,GAAG,kBAAkB,GAAG,SAAS;AAAA,CAAE;AAC3E,CAAC;AAACxB,OAAA,CAAAoB,sBAAA,GAAAA,sBAAA;AAEK,MAAMK,iCAAiC,GAAG,IAAA/B,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACI,OAAA,CAAAyB,iCAAA,GAAAA,iCAAA"}
1
+ {"version":3,"file":"AccordionHead.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledMotionAccordionHead","styled","m","div","_ref","theme","text","exports","StyledMotionIconWrapper","_ref2","onClick","StyledMotionContentWrapper","_ref3","StyledMotionTitleWrapper","StyledMotionTitle","_ref4","isOpen","isWrapped","undefined","_ref5","_ref6","_ref7","_ref8","css","StyledMotionTitleElementWrapper","StyledRightWrapper","StyledMotionRightElementWrapper","StyledMotionRightInput","input","_ref9","_ref10","hasIcon","StyledMotionRightInputIconWrapper"],"sources":["../../../../src/components/accordion/accordion-head/AccordionHead.styles.ts"],"sourcesContent":["import { m } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledMotionAccordionHeadProps = WithTheme<unknown>;\n\nexport const StyledMotionAccordionHead = styled(m.div)`\n align-items: center;\n color: ${({ theme }: StyledMotionAccordionHeadProps) => theme.text};\n display: flex;\n overflow: hidden;\n padding: 4px 0;\n`;\n\nexport const StyledMotionIconWrapper = styled(m.div)`\n align-items: center;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n height: 25px;\n justify-content: center;\n width: 25px;\n`;\n\nexport const StyledMotionContentWrapper = styled(m.div)`\n align-self: flex-start;\n cursor: ${({ onClick }) => (typeof onClick === 'function' ? 'pointer' : 'default')};\n display: flex;\n flex: 1 1 auto;\n height: 100%;\n overflow: hidden;\n margin-right: 10px;\n`;\n\nexport const StyledMotionTitleWrapper = styled(m.div)`\n display: grid;\n flex: 0 1 auto;\n grid-template-areas: 'header';\n`;\n\ninterface StyledMotionTitleProps {\n isOpen: boolean;\n isWrapped: boolean;\n}\n\nexport const StyledMotionTitle = styled(m.div)<StyledMotionTitleProps>`\n font-size: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? '1.3rem' : undefined)};\n font-weight: ${({ isOpen, isWrapped }) => (isOpen && isWrapped ? 700 : 'normal')};\n grid-area: header;\n height: ${({ isWrapped }) => (isWrapped ? '100%' : undefined)};\n overflow: hidden;\n text-overflow: ellipsis;\n transform-origin: top left;\n user-select: none;\n white-space: ${({ isOpen, isWrapped }) => (isOpen && !isWrapped ? 'normal' : 'nowrap')};\n\n ${({ isWrapped }) =>\n isWrapped &&\n css`\n align-items: center;\n display: flex;\n `}\n`;\n\nexport const StyledMotionTitleElementWrapper = styled(m.div)`\n align-items: center;\n display: flex;\n margin-left: 8px;\n`;\n\nexport const StyledRightWrapper = styled.div`\n display: grid;\n flex: 0 0 auto;\n grid-template-areas: 'right';\n margin-right: 5px;\n overflow: hidden;\n position: relative;\n`;\n\nexport const StyledMotionRightElementWrapper = styled(m.div)`\n align-items: center;\n display: flex;\n grid-area: header;\n justify-content: flex-end;\n`;\n\ntype StyledMotionRightInputProps = WithTheme<{\n hasIcon: boolean;\n}>;\n\nexport const StyledMotionRightInput = styled(m.input)<StyledMotionRightInputProps>`\n background-color: transparent;\n border: 1px solid transparent;\n border-bottom-color: rgba(\n ${({ theme }: StyledMotionRightInputProps) => theme['headline-rgb']},\n 0.45\n );\n grid-area: header;\n padding: ${({ hasIcon }) => (hasIcon ? '5px 23px 5px 1px' : '5px 1px')};\n`;\n\nexport const StyledMotionRightInputIconWrapper = styled(m.div)`\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n right: 4px;\n top: 0;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAgD,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,SAAAF,wBAAAM,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,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,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,kBAAA,GAAAA,kBAAA;AAEK,MAAMC,+BAA+B,GAAG,IAAAzB,yBAAM,EAACC,eAAC,CAACC,GAAG,CAAE;AAC7D;AACA;AACA;AACA;AACA,CAAC;AAACI,OAAA,CAAAmB,+BAAA,GAAAA,+BAAA;AAMK,MAAMC,sBAAsB,GAAG,IAAA1B,yBAAM,EAACC,eAAC,CAAC0B,KAAK,CAA+B;AACnF;AACA;AACA;AACA,UAAUC,KAAA;EAAA,IAAC;IAAExB;EAAmC,CAAC,GAAAwB,KAAA;EAAA,OAAKxB,KAAK,CAAC,cAAc,CAAC;AAAA,CAAC;AAC5E;AACA;AACA;AACA,eAAeyB,MAAA;EAAA,IAAC;IAAEC;EAAQ,CAAC,GAAAD,MAAA;EAAA,OAAMC,OAAO,GAAG,kBAAkB,GAAG,SAAS;AAAA,CAAE;AAC3E,CAAC;AAACxB,OAAA,CAAAoB,sBAAA,GAAAA,sBAAA;AAEK,MAAMK,iCAAiC,GAAG,IAAA/B,yBAAM,EAACC,eAAC,CAACC,GAAG,CAAE;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACI,OAAA,CAAAyB,iCAAA,GAAAA,iCAAA"}
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _reactDom = require("react-dom");
10
10
  var _uuid = require("../../hooks/uuid");
11
11
  var _Icon = _interopRequireDefault(require("../icon/Icon"));
12
+ var _LazyMotionWrapper = _interopRequireDefault(require("../lazy-motion-wrapper/LazyMotionWrapper"));
12
13
  var _alignment = require("./constants/alignment");
13
14
  var _ContextMenuContent = _interopRequireDefault(require("./context-menu-content/ContextMenuContent"));
14
15
  var _ContextMenu = require("./ContextMenu.styles");
@@ -142,7 +143,7 @@ const ContextMenu = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
142
143
  alignment: alignment !== null && alignment !== void 0 ? alignment : internalAlignment,
143
144
  ref: contextMenuContentRef
144
145
  })), container), [container, coordinates, internalCoordinates, internalAlignment, isContentShown, items, alignment, uuid]);
145
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ContextMenu.StyledContextMenu, {
146
+ return /*#__PURE__*/_react.default.createElement(_LazyMotionWrapper.default, null, /*#__PURE__*/_react.default.createElement(_ContextMenu.StyledContextMenu, {
146
147
  className: "beta-chayns-context-menu",
147
148
  onClick: handleClick,
148
149
  ref: contextMenuRef
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_reactDom","_uuid","_Icon","_interopRequireDefault","_alignment","_ContextMenuContent","_ContextMenu","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ContextMenu","forwardRef","_ref","ref","alignment","children","createElement","icons","container","document","body","coordinates","items","onHide","onShow","internalCoordinates","setInternalCoordinates","useState","x","y","internalAlignment","setInternalAlignment","ContextMenuAlignment","TopLeft","isContentShown","setIsContentShown","uuid","useUuid","contextMenuContentRef","useRef","contextMenuRef","handleHide","useCallback","handleShow","isMobile","isTablet","chayns","env","_selection$","buttonType","selection","dialog","select","buttons","list","map","_ref2","index","text","name","value","icon","type","_items$selection$0$va","onClick","current","rootElement","querySelector","height","childrenHeight","width","childrenWidth","getBoundingClientRect","BottomRight","TopRight","BottomLeft","handleClick","event","preventDefault","stopPropagation","handleDocumentClick","_contextMenuContentRe","contains","target","useImperativeHandle","hide","show","useEffect","addEventListener","window","removeEventListener","portal","useMemo","createPortal","AnimatePresence","initial","Fragment","StyledContextMenu","className","displayName","_default","exports"],"sources":["../../../src/components/context-menu/ContextMenu.tsx"],"sourcesContent":["import { AnimatePresence } from 'framer-motion';\nimport React, {\n forwardRef,\n MouseEvent,\n MouseEventHandler,\n ReactNode,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useUuid } from '../../hooks/uuid';\nimport Icon from '../icon/Icon';\nimport { ContextMenuAlignment } from './constants/alignment';\nimport ContextMenuContent from './context-menu-content/ContextMenuContent';\nimport { StyledContextMenu } from './ContextMenu.styles';\n\nexport type ContextMenuCoordinates = {\n x: number;\n y: number;\n};\n\nexport type ContextMenuItem = {\n icons: string[];\n key: string;\n onClick: (event?: MouseEvent<HTMLDivElement>) => void;\n text: string;\n};\n\ntype ContextMenuRef = {\n hide: VoidFunction;\n show: VoidFunction;\n};\n\ntype ContextMenuProps = {\n /**\n * Optional custom alignment used instead of calculating it using the\n * alignment within the page. The available alignment can be taken from the\n * ContextMenuAlignment enum.\n */\n alignment?: ContextMenuAlignment;\n /**\n * The element over which the content of the `ContextMenu` should be displayed.\n */\n children?: ReactNode;\n /**\n * The element where the content of the `ContextMenu` should be rendered via React Portal.\n */\n container?: Element;\n /**\n * Optional own coordinates to be used instead of calculating the alignment\n * based on the alignment of the children.\n */\n coordinates?: ContextMenuCoordinates;\n /**\n * The items that will be displayed in the content of the `ContextMenu`.\n */\n items: ContextMenuItem[];\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 ContextMenu = forwardRef<ContextMenuRef, ContextMenuProps>(\n (\n {\n alignment,\n children = <Icon icons={['ts-ellipsis_v']} />,\n container = document.body,\n coordinates,\n items,\n onHide,\n onShow,\n },\n ref\n ) => {\n const [internalCoordinates, setInternalCoordinates] = useState<ContextMenuCoordinates>({\n x: 0,\n y: 0,\n });\n const [internalAlignment, setInternalAlignment] = useState<ContextMenuAlignment>(\n ContextMenuAlignment.TopLeft\n );\n const [isContentShown, setIsContentShown] = useState(false);\n\n const uuid = useUuid();\n\n // ToDo: Replace with hook if new chayns api is ready\n const contextMenuContentRef = useRef<HTMLDivElement>(null);\n const contextMenuRef = useRef<HTMLSpanElement>(null);\n\n const handleHide = useCallback(() => {\n setIsContentShown(false);\n }, []);\n\n const handleShow = useCallback(async () => {\n const { isMobile, isTablet } = chayns.env;\n\n if (isMobile || isTablet) {\n // ToDo: Replace with new api function if new api is ready\n const { buttonType, selection } = await chayns.dialog.select({\n buttons: [],\n list: items.map(({ icons, text }, index) => ({\n name: text,\n value: index,\n icon: icons[0],\n })),\n type: 2,\n });\n\n if (buttonType === 1 && typeof selection[0]?.value === 'number') {\n items[selection[0].value]?.onClick();\n }\n } else if (contextMenuRef.current) {\n const rootElement = document.querySelector('.tapp') || document.body;\n\n const {\n x,\n y,\n height: childrenHeight,\n width: childrenWidth,\n } = contextMenuRef.current.getBoundingClientRect();\n\n setInternalCoordinates({ x: x + childrenWidth / 2, y: y + childrenHeight / 2 });\n\n const { height, width } = rootElement.getBoundingClientRect();\n\n if (x < width / 2) {\n if (y < height / 2) {\n setInternalAlignment(ContextMenuAlignment.BottomRight);\n } else {\n setInternalAlignment(ContextMenuAlignment.TopRight);\n }\n } else if (y < height / 2) {\n setInternalAlignment(ContextMenuAlignment.BottomLeft);\n } else {\n setInternalAlignment(ContextMenuAlignment.TopLeft);\n }\n\n setIsContentShown(true);\n }\n }, [items]);\n\n const handleClick = useCallback<MouseEventHandler<HTMLDivElement>>(\n (event) => {\n event.preventDefault();\n event.stopPropagation();\n\n void handleShow();\n },\n [handleShow]\n );\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (!contextMenuContentRef.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 (isContentShown) {\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, isContentShown, onHide, onShow]);\n\n const portal = useMemo(\n () =>\n createPortal(\n <AnimatePresence initial={false}>\n {isContentShown && (\n <ContextMenuContent\n coordinates={coordinates ?? internalCoordinates}\n items={items}\n key={`contextMenu_${uuid}`}\n alignment={alignment ?? internalAlignment}\n ref={contextMenuContentRef}\n />\n )}\n </AnimatePresence>,\n container\n ),\n [\n container,\n coordinates,\n internalCoordinates,\n internalAlignment,\n isContentShown,\n items,\n alignment,\n uuid,\n ]\n );\n\n return (\n <>\n <StyledContextMenu\n className=\"beta-chayns-context-menu\"\n onClick={handleClick}\n ref={contextMenuRef}\n >\n {children}\n </StyledContextMenu>\n {portal}\n </>\n );\n }\n);\n\nContextMenu.displayName = 'ContextMenu';\n\nexport default ContextMenu;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAYA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAF,sBAAA,CAAAN,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AAAyD,SAAAM,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,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,SAAAZ,wBAAAQ,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IA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","_reactDom","_uuid","_Icon","_interopRequireDefault","_LazyMotionWrapper","_alignment","_ContextMenuContent","_ContextMenu","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ContextMenu","forwardRef","_ref","ref","alignment","children","createElement","icons","container","document","body","coordinates","items","onHide","onShow","internalCoordinates","setInternalCoordinates","useState","x","y","internalAlignment","setInternalAlignment","ContextMenuAlignment","TopLeft","isContentShown","setIsContentShown","uuid","useUuid","contextMenuContentRef","useRef","contextMenuRef","handleHide","useCallback","handleShow","isMobile","isTablet","chayns","env","_selection$","buttonType","selection","dialog","select","buttons","list","map","_ref2","index","text","name","value","icon","type","_items$selection$0$va","onClick","current","rootElement","querySelector","height","childrenHeight","width","childrenWidth","getBoundingClientRect","BottomRight","TopRight","BottomLeft","handleClick","event","preventDefault","stopPropagation","handleDocumentClick","_contextMenuContentRe","contains","target","useImperativeHandle","hide","show","useEffect","addEventListener","window","removeEventListener","portal","useMemo","createPortal","AnimatePresence","initial","StyledContextMenu","className","displayName","_default","exports"],"sources":["../../../src/components/context-menu/ContextMenu.tsx"],"sourcesContent":["import { AnimatePresence } from 'framer-motion';\nimport React, {\n forwardRef,\n MouseEvent,\n MouseEventHandler,\n ReactNode,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useUuid } from '../../hooks/uuid';\nimport Icon from '../icon/Icon';\nimport LazyMotionWrapper from '../lazy-motion-wrapper/LazyMotionWrapper';\nimport { ContextMenuAlignment } from './constants/alignment';\nimport ContextMenuContent from './context-menu-content/ContextMenuContent';\nimport { StyledContextMenu } from './ContextMenu.styles';\n\nexport type ContextMenuCoordinates = {\n x: number;\n y: number;\n};\n\nexport type ContextMenuItem = {\n icons: string[];\n key: string;\n onClick: (event?: MouseEvent<HTMLDivElement>) => void;\n text: string;\n};\n\ntype ContextMenuRef = {\n hide: VoidFunction;\n show: VoidFunction;\n};\n\ntype ContextMenuProps = {\n /**\n * Optional custom alignment used instead of calculating it using the\n * alignment within the page. The available alignment can be taken from the\n * ContextMenuAlignment enum.\n */\n alignment?: ContextMenuAlignment;\n /**\n * The element over which the content of the `ContextMenu` should be displayed.\n */\n children?: ReactNode;\n /**\n * The element where the content of the `ContextMenu` should be rendered via React Portal.\n */\n container?: Element;\n /**\n * Optional own coordinates to be used instead of calculating the alignment\n * based on the alignment of the children.\n */\n coordinates?: ContextMenuCoordinates;\n /**\n * The items that will be displayed in the content of the `ContextMenu`.\n */\n items: ContextMenuItem[];\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 ContextMenu = forwardRef<ContextMenuRef, ContextMenuProps>(\n (\n {\n alignment,\n children = <Icon icons={['ts-ellipsis_v']} />,\n container = document.body,\n coordinates,\n items,\n onHide,\n onShow,\n },\n ref\n ) => {\n const [internalCoordinates, setInternalCoordinates] = useState<ContextMenuCoordinates>({\n x: 0,\n y: 0,\n });\n const [internalAlignment, setInternalAlignment] = useState<ContextMenuAlignment>(\n ContextMenuAlignment.TopLeft\n );\n const [isContentShown, setIsContentShown] = useState(false);\n\n const uuid = useUuid();\n\n // ToDo: Replace with hook if new chayns api is ready\n const contextMenuContentRef = useRef<HTMLDivElement>(null);\n const contextMenuRef = useRef<HTMLSpanElement>(null);\n\n const handleHide = useCallback(() => {\n setIsContentShown(false);\n }, []);\n\n const handleShow = useCallback(async () => {\n const { isMobile, isTablet } = chayns.env;\n\n if (isMobile || isTablet) {\n // ToDo: Replace with new api function if new api is ready\n const { buttonType, selection } = await chayns.dialog.select({\n buttons: [],\n list: items.map(({ icons, text }, index) => ({\n name: text,\n value: index,\n icon: icons[0],\n })),\n type: 2,\n });\n\n if (buttonType === 1 && typeof selection[0]?.value === 'number') {\n items[selection[0].value]?.onClick();\n }\n } else if (contextMenuRef.current) {\n const rootElement = document.querySelector('.tapp') || document.body;\n\n const {\n x,\n y,\n height: childrenHeight,\n width: childrenWidth,\n } = contextMenuRef.current.getBoundingClientRect();\n\n setInternalCoordinates({ x: x + childrenWidth / 2, y: y + childrenHeight / 2 });\n\n const { height, width } = rootElement.getBoundingClientRect();\n\n if (x < width / 2) {\n if (y < height / 2) {\n setInternalAlignment(ContextMenuAlignment.BottomRight);\n } else {\n setInternalAlignment(ContextMenuAlignment.TopRight);\n }\n } else if (y < height / 2) {\n setInternalAlignment(ContextMenuAlignment.BottomLeft);\n } else {\n setInternalAlignment(ContextMenuAlignment.TopLeft);\n }\n\n setIsContentShown(true);\n }\n }, [items]);\n\n const handleClick = useCallback<MouseEventHandler<HTMLDivElement>>(\n (event) => {\n event.preventDefault();\n event.stopPropagation();\n\n void handleShow();\n },\n [handleShow]\n );\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (!contextMenuContentRef.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 (isContentShown) {\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, isContentShown, onHide, onShow]);\n\n const portal = useMemo(\n () =>\n createPortal(\n <AnimatePresence initial={false}>\n {isContentShown && (\n <ContextMenuContent\n coordinates={coordinates ?? internalCoordinates}\n items={items}\n key={`contextMenu_${uuid}`}\n alignment={alignment ?? internalAlignment}\n ref={contextMenuContentRef}\n />\n )}\n </AnimatePresence>,\n container\n ),\n [\n container,\n coordinates,\n internalCoordinates,\n internalAlignment,\n isContentShown,\n items,\n alignment,\n uuid,\n ]\n );\n\n return (\n <LazyMotionWrapper>\n <StyledContextMenu\n className=\"beta-chayns-context-menu\"\n onClick={handleClick}\n ref={contextMenuRef}\n >\n {children}\n </StyledContextMenu>\n {portal}\n </LazyMotionWrapper>\n );\n }\n);\n\nContextMenu.displayName = 'ContextMenu';\n\nexport default ContextMenu;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAYA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAAyD,SAAAM,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,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,SAAAb,wBAAAS,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA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AA0B,aAAA,CAACxC,aAAA,CAAAsH,eAAe;IAACC,OAAO,EAAE;EAAM,GAC3B7D,cAAc,iBACXxD,MAAA,CAAAY,OAAA,CAAA0B,aAAA,CAAC9B,mBAAA,CAAAI,OAAkB;IACf+B,WAAW,EAAEA,WAAW,aAAXA,WAAW,cAAXA,WAAW,GAAII,mBAAoB;IAChDH,KAAK,EAAEA,KAAM;IACblB,GAAG,EAAG,eAAcgC,IAAK,EAAE;IAC3BtB,SAAS,EAAEA,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIgB,iBAAkB;IAC1CjB,GAAG,EAAEyB;EAAsB,EAElC,CACa,EAClBpB,SAAS,CACZ,EACL,CACIA,SAAS,EACTG,WAAW,EACXI,mBAAmB,EACnBK,iBAAiB,EACjBI,cAAc,EACdZ,KAAK,EACLR,SAAS,EACTsB,IAAI,CACP,CACJ;EAED,oBACI1D,MAAA,CAAAY,OAAA,CAAA0B,aAAA,CAAChC,kBAAA,CAAAM,OAAiB,qBACdZ,MAAA,CAAAY,OAAA,CAAA0B,aAAA,CAAC7B,YAAA,CAAA6G,iBAAiB;IACdC,SAAS,EAAC,0BAA0B;IACpCjC,OAAO,EAAEY,WAAY;IACrB/D,GAAG,EAAE2B;EAAe,GAEnBzB,QAAQ,CACO,EACnB4E,MAAM,CACS;AAE5B,CAAC,CACJ;AAEDjF,WAAW,CAACwF,WAAW,GAAG,aAAa;AAAC,IAAAC,QAAA,GAEzBzF,WAAW;AAAA0F,OAAA,CAAA9G,OAAA,GAAA6G,QAAA"}
@@ -9,7 +9,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
  var _alignment = require("../constants/alignment");
10
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
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 StyledMotionContextMenuContent = (0, _styledComponents.default)(_framerMotion.motion.div)`
12
+ const StyledMotionContextMenuContent = (0, _styledComponents.default)(_framerMotion.m.div)`
13
13
  background-color: ${_ref => {
14
14
  let {
15
15
  theme
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuContent.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_alignment","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledMotionContextMenuContent","styled","motion","div","_ref","theme","_ref2","text","_ref3","position","ContextMenuAlignment","TopLeft","css","BottomLeft","TopRight","BottomRight","undefined","exports","StyledContextMenuContentItem","_ref4","StyledContextMenuContentItemIconWrapper","StyledContextMenuContentItemText"],"sources":["../../../../src/components/context-menu/context-menu-content/ContextMenuContent.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\nimport { ContextMenuAlignment } from '../constants/alignment';\n\ntype StyledMotionContextMenuContentProps = WithTheme<{\n position: ContextMenuAlignment;\n}>;\n\nexport const StyledMotionContextMenuContent = styled(\n motion.div\n)<StyledMotionContextMenuContentProps>`\n background-color: ${({ theme }: StyledMotionContextMenuContentProps) => theme['001']};\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n box-shadow: 1px 3px 8px rgb(0 0 0 / 30%);\n color: ${({ theme }: StyledMotionContextMenuContentProps) => theme.text};\n position: absolute;\n z-index: 0;\n\n ::after {\n background-color: inherit;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n border-bottom-right-radius: 3px;\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 2px 2px 8px rgb(4 3 4 / 10%);\n content: '';\n height: 14px;\n position: absolute;\n width: 14px;\n z-index: -2;\n\n ${({ position }) => {\n switch (position) {\n case ContextMenuAlignment.TopLeft:\n return css`\n bottom: -8px;\n right: 13px;\n transform: rotate(45deg);\n `;\n case ContextMenuAlignment.BottomLeft:\n return css`\n top: -8px;\n right: 13px;\n transform: rotate(225deg);\n `;\n case ContextMenuAlignment.TopRight:\n return css`\n transform: rotate(45deg);\n bottom: -8px;\n left: 13px;\n `;\n case ContextMenuAlignment.BottomRight:\n return css`\n transform: rotate(225deg);\n top: -8px;\n left: 13px;\n `;\n default:\n return undefined;\n }\n }}\n }\n\n ::before {\n background-color: inherit;\n bottom: 0;\n content: '';\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: -1;\n }\n`;\n\ntype StyledContextMenuContentItemProps = WithTheme<unknown>;\n\nexport const StyledContextMenuContentItem = styled.div<StyledContextMenuContentItemProps>`\n cursor: pointer;\n display: flex;\n padding: 5px 8px 5px 5px;\n transition: background-color 0.3s ease;\n\n :hover {\n background-color: ${({ theme }: StyledContextMenuContentItemProps) =>\n theme['secondary-103']};\n }\n`;\n\nexport const StyledContextMenuContentItemIconWrapper = styled.div`\n flex: 0 0 auto;\n margin: 0 8px 0 3px;\n width: 20px;\n`;\n\nexport const StyledContextMenuContentItemText = styled.div`\n flex: 0 0 auto;\n white-space: nowrap;\n`;\n"],"mappings":";;;;;;AAAA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AAA,4BAAA;AAEK,MAAME,uCAAuC,GAAGnB,yBAAM,CAACE,GAAI;AAClE;AACA;AACA;AACA,CAAC;AAACc,OAAA,CAAAG,uCAAA,GAAAA,uCAAA;AAEK,MAAMC,gCAAgC,GAAGpB,yBAAM,CAACE,GAAI;AAC3D;AACA;AACA,CAAC;AAACc,OAAA,CAAAI,gCAAA,GAAAA,gCAAA"}
1
+ {"version":3,"file":"ContextMenuContent.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_alignment","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledMotionContextMenuContent","styled","m","div","_ref","theme","_ref2","text","_ref3","position","ContextMenuAlignment","TopLeft","css","BottomLeft","TopRight","BottomRight","undefined","exports","StyledContextMenuContentItem","_ref4","StyledContextMenuContentItemIconWrapper","StyledContextMenuContentItemText"],"sources":["../../../../src/components/context-menu/context-menu-content/ContextMenuContent.styles.ts"],"sourcesContent":["import { m } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\nimport { ContextMenuAlignment } from '../constants/alignment';\n\ntype StyledMotionContextMenuContentProps = WithTheme<{\n position: ContextMenuAlignment;\n}>;\n\nexport const StyledMotionContextMenuContent = styled(m.div)<StyledMotionContextMenuContentProps>`\n background-color: ${({ theme }: StyledMotionContextMenuContentProps) => theme['001']};\n border: 1px solid rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n box-shadow: 1px 3px 8px rgb(0 0 0 / 30%);\n color: ${({ theme }: StyledMotionContextMenuContentProps) => theme.text};\n position: absolute;\n z-index: 0;\n\n ::after {\n background-color: inherit;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n border-bottom-right-radius: 3px;\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 2px 2px 8px rgb(4 3 4 / 10%);\n content: '';\n height: 14px;\n position: absolute;\n width: 14px;\n z-index: -2;\n\n ${({ position }) => {\n switch (position) {\n case ContextMenuAlignment.TopLeft:\n return css`\n bottom: -8px;\n right: 13px;\n transform: rotate(45deg);\n `;\n case ContextMenuAlignment.BottomLeft:\n return css`\n top: -8px;\n right: 13px;\n transform: rotate(225deg);\n `;\n case ContextMenuAlignment.TopRight:\n return css`\n transform: rotate(45deg);\n bottom: -8px;\n left: 13px;\n `;\n case ContextMenuAlignment.BottomRight:\n return css`\n transform: rotate(225deg);\n top: -8px;\n left: 13px;\n `;\n default:\n return undefined;\n }\n }}\n }\n\n ::before {\n background-color: inherit;\n bottom: 0;\n content: '';\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: -1;\n }\n`;\n\ntype StyledContextMenuContentItemProps = WithTheme<unknown>;\n\nexport const StyledContextMenuContentItem = styled.div<StyledContextMenuContentItemProps>`\n cursor: pointer;\n display: flex;\n padding: 5px 8px 5px 5px;\n transition: background-color 0.3s ease;\n\n :hover {\n background-color: ${({ theme }: StyledContextMenuContentItemProps) =>\n theme['secondary-103']};\n }\n`;\n\nexport const StyledContextMenuContentItemIconWrapper = styled.div`\n flex: 0 0 auto;\n margin: 0 8px 0 3px;\n width: 20px;\n`;\n\nexport const StyledContextMenuContentItemText = styled.div`\n flex: 0 0 auto;\n white-space: nowrap;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAA8D,SAAAI,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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ACA;AACA;AACA;AACA;AACA,UAAUC,KAAA,IAAkB;EAAA,IAAjB;IAAEC;EAAS,CAAC,GAAAD,KAAA;EACX,QAAQC,QAAQ;IACZ,KAAKC,+BAAoB,CAACC,OAAO;MAC7B,OAAO,IAAAC,qBAAG,CAAC;AAC/B;AACA;AACA;AACA,qBAAqB;IACL,KAAKF,+BAAoB,CAACG,UAAU;MAChC,OAAO,IAAAD,qBAAG,CAAC;AAC/B;AACA;AACA;AACA,qBAAqB;IACL,KAAKF,+BAAoB,CAACI,QAAQ;MAC9B,OAAO,IAAAF,qBAAG,CAAC;AAC/B;AACA;AACA;AACA,qBAAqB;IACL,KAAKF,+BAAoB,CAACK,WAAW;MACjC,OAAO,IAAAH,qBAAG,CAAC;AAC/B;AACA;AACA;AACA,qBAAqB;IACL;MACI,OAAOI,SAAS;EAAC;AAE7B,CAAE;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAjB,8BAAA,GAAAA,8BAAA;AAIK,MAAMkB,4BAA4B,GAAGjB,yBAAM,CAACE,GAAuC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4BgB,KAAA;EAAA,IAAC;IAAEd;EAAyC,CAAC,GAAAc,KAAA;EAAA,OAC7Dd,KAAK,CAAC,eAAe,CAAC;AAAA,CAAC;AACnC;AACA,CAAC;AAACY,OAAA,CAAAC,4BAAA,GAAAA,4BAAA;AAEK,MAAME,uCAAuC,GAAGnB,yBAAM,CAACE,GAAI;AAClE;AACA;AACA;AACA,CAAC;AAACc,OAAA,CAAAG,uCAAA,GAAAA,uCAAA;AAEK,MAAMC,gCAAgC,GAAGpB,yBAAM,CAACE,GAAI;AAC3D;AACA;AACA,CAAC;AAACc,OAAA,CAAAI,gCAAA,GAAAA,gCAAA"}
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
+ var _LazyMotionWrapper = _interopRequireDefault(require("../lazy-motion-wrapper/LazyMotionWrapper"));
8
9
  var _Input = require("./Input.styles");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
11
  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
12
  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
13
  const Input = _ref => {
@@ -43,7 +45,7 @@ const Input = _ref => {
43
45
  top: 0
44
46
  };
45
47
  }, [hasValue]);
46
- return /*#__PURE__*/_react.default.createElement(_Input.StyledInput, {
48
+ return /*#__PURE__*/_react.default.createElement(_LazyMotionWrapper.default, null, /*#__PURE__*/_react.default.createElement(_Input.StyledInput, {
47
49
  className: "beta-chayns-input",
48
50
  isDisabled: isDisabled
49
51
  }, /*#__PURE__*/_react.default.createElement(_Input.StyledInputContent, null, /*#__PURE__*/_react.default.createElement(_Input.StyledInputField, {
@@ -67,7 +69,7 @@ const Input = _ref => {
67
69
  transition: {
68
70
  type: 'tween'
69
71
  }
70
- }, placeholder)));
72
+ }, placeholder))));
71
73
  };
72
74
  Input.displayName = 'Input';
73
75
  var _default = Input;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","names":["_react","_interopRequireWildcard","require","_Input","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Input","_ref","isDisabled","onBlur","onChange","onFocus","onKeyDown","placeholder","type","value","hasValue","setHasValue","useState","handleInputFieldChange","useCallback","event","target","useEffect","labelPosition","useMemo","bottom","right","left","top","createElement","StyledInput","className","StyledInputContent","StyledInputField","disabled","StyledMotionInputLabel","animate","scale","layout","style","originX","originY","transition","displayName","_default","exports"],"sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n FC,\n FocusEventHandler,\n HTMLInputTypeAttribute,\n KeyboardEventHandler,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport {\n StyledInput,\n StyledInputContent,\n StyledInputField,\n StyledMotionInputLabel,\n} from './Input.styles';\n\nexport type InputProps = {\n /**\n * Disables the input so that it cannot be changed anymore\n */\n isDisabled?: boolean;\n /**\n * Function that is executed when the input field loses focus\n */\n onBlur?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when the text of the input changes\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when the input field is focused\n */\n onFocus?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when a letter is pressed\n */\n onKeyDown?: KeyboardEventHandler<HTMLInputElement>;\n /**\n * Placeholder for the input field\n */\n placeholder?: string;\n /**\n * Input type set for input element (e.g. 'text', 'number' or 'password')\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value if the input field should be controlled\n */\n value?: string;\n};\n\nconst Input: FC<InputProps> = ({\n isDisabled,\n onBlur,\n onChange,\n onFocus,\n onKeyDown,\n placeholder,\n type = 'text',\n value,\n}) => {\n const [hasValue, setHasValue] = useState(typeof value === 'string' && value !== '');\n\n const handleInputFieldChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setHasValue(event.target.value !== '');\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange]\n );\n\n useEffect(() => {\n if (typeof value === 'string') {\n setHasValue(value !== '');\n }\n }, [value]);\n\n const labelPosition = useMemo(() => {\n if (hasValue) {\n return { bottom: -8, right: -6 };\n }\n\n return { left: 0, top: 0 };\n }, [hasValue]);\n\n return (\n <StyledInput className=\"beta-chayns-input\" isDisabled={isDisabled}>\n <StyledInputContent>\n <StyledInputField\n disabled={isDisabled}\n onBlur={onBlur}\n onChange={handleInputFieldChange}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n type={type}\n />\n <StyledMotionInputLabel\n animate={{ scale: hasValue ? 0.6 : 1 }}\n layout\n style={{ ...labelPosition, originX: 1, originY: 1 }}\n transition={{ type: 'tween' }}\n >\n {placeholder}\n </StyledMotionInputLabel>\n </StyledInputContent>\n </StyledInput>\n );\n};\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAYA,IAAAC,MAAA,GAAAD,OAAA;AAKwB,SAAAE,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,SAAAJ,wBAAAQ,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,IAAAA,KAAA,CAAAC,GAAA,CA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ACR,CACX;AAEtB,CAAC;AAEDP,KAAK,CAACsC,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAEbvC,KAAK;AAAAwC,OAAA,CAAAvD,OAAA,GAAAsD,QAAA"}
1
+ {"version":3,"file":"Input.js","names":["_react","_interopRequireWildcard","require","_LazyMotionWrapper","_interopRequireDefault","_Input","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Input","_ref","isDisabled","onBlur","onChange","onFocus","onKeyDown","placeholder","type","value","hasValue","setHasValue","useState","handleInputFieldChange","useCallback","event","target","useEffect","labelPosition","useMemo","bottom","right","left","top","createElement","StyledInput","className","StyledInputContent","StyledInputField","disabled","StyledMotionInputLabel","animate","scale","layout","style","originX","originY","transition","displayName","_default","exports"],"sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n FC,\n FocusEventHandler,\n HTMLInputTypeAttribute,\n KeyboardEventHandler,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport LazyMotionWrapper from '../lazy-motion-wrapper/LazyMotionWrapper';\nimport {\n StyledInput,\n StyledInputContent,\n StyledInputField,\n StyledMotionInputLabel,\n} from './Input.styles';\n\nexport type InputProps = {\n /**\n * Disables the input so that it cannot be changed anymore\n */\n isDisabled?: boolean;\n /**\n * Function that is executed when the input field loses focus\n */\n onBlur?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when the text of the input changes\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when the input field is focused\n */\n onFocus?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when a letter is pressed\n */\n onKeyDown?: KeyboardEventHandler<HTMLInputElement>;\n /**\n * Placeholder for the input field\n */\n placeholder?: string;\n /**\n * Input type set for input element (e.g. 'text', 'number' or 'password')\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value if the input field should be controlled\n */\n value?: string;\n};\n\nconst Input: FC<InputProps> = ({\n isDisabled,\n onBlur,\n onChange,\n onFocus,\n onKeyDown,\n placeholder,\n type = 'text',\n value,\n}) => {\n const [hasValue, setHasValue] = useState(typeof value === 'string' && value !== '');\n\n const handleInputFieldChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setHasValue(event.target.value !== '');\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange]\n );\n\n useEffect(() => {\n if (typeof value === 'string') {\n setHasValue(value !== '');\n }\n }, [value]);\n\n const labelPosition = useMemo(() => {\n if (hasValue) {\n return { bottom: -8, right: -6 };\n }\n\n return { left: 0, top: 0 };\n }, [hasValue]);\n\n return (\n <LazyMotionWrapper>\n <StyledInput className=\"beta-chayns-input\" isDisabled={isDisabled}>\n <StyledInputContent>\n <StyledInputField\n disabled={isDisabled}\n onBlur={onBlur}\n onChange={handleInputFieldChange}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n type={type}\n />\n <StyledMotionInputLabel\n animate={{ scale: hasValue ? 0.6 : 1 }}\n layout\n style={{ ...labelPosition, originX: 1, originY: 1 }}\n transition={{ type: 'tween' }}\n >\n {placeholder}\n </StyledMotionInputLabel>\n </StyledInputContent>\n </StyledInput>\n </LazyMotionWrapper>\n );\n};\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAYA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAKwB,SAAAE,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gB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AAuB;IACjCR,OAAO,EAAEA,OAAQ;IACjBC,SAAS,EAAEA,SAAU;IACrBG,KAAK,EAAEA,KAAM;IACbD,IAAI,EAAEA;EAAK,EACb,eACFpC,MAAA,CAAAQ,OAAA,CAAA4C,aAAA,CAAC/C,MAAA,CAAAqD,sBAAsB;IACnBC,OAAO,EAAE;MAAEC,KAAK,EAAEtB,QAAQ,GAAG,GAAG,GAAG;IAAE,CAAE;IACvCuB,MAAM;IACNC,KAAK,EAAE;MAAE,GAAGhB,aAAa;MAAEiB,OAAO,EAAE,CAAC;MAAEC,OAAO,EAAE;IAAE,CAAE;IACpDC,UAAU,EAAE;MAAE7B,IAAI,EAAE;IAAQ;EAAE,GAE7BD,WAAW,CACS,CACR,CACX,CACE;AAE5B,CAAC;AAEDP,KAAK,CAACsC,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAEbvC,KAAK;AAAAwC,OAAA,CAAA5D,OAAA,GAAA2D,QAAA"}
@@ -34,6 +34,7 @@ const StyledInput = _styledComponents.default.div`
34
34
  }};
35
35
  padding: 8px 10px;
36
36
  transition: opacity 0.3s ease;
37
+ width: 100%;
37
38
 
38
39
  &:not(&:first-child) {
39
40
  margin-top: 8px;
@@ -60,7 +61,7 @@ const StyledInputField = _styledComponents.default.input`
60
61
  padding: 0;
61
62
  `;
62
63
  exports.StyledInputField = StyledInputField;
63
- const StyledMotionInputLabel = (0, _styledComponents.default)(_framerMotion.motion.label)`
64
+ const StyledMotionInputLabel = (0, _styledComponents.default)(_framerMotion.m.label)`
64
65
  line-height: 1.15;
65
66
  pointer-events: none;
66
67
  position: absolute;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledInput","styled","div","_ref","theme","_ref2","_ref3","isDisabled","exports","StyledInputContent","StyledInputField","input","_ref4","text","StyledMotionInputLabel","motion","label"],"sources":["../../../src/components/input/Input.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { InputProps } from './Input';\n\ntype StyledInputProps = WithTheme<Pick<InputProps, 'isDisabled'>>;\n\nexport const StyledInput = styled.div<StyledInputProps>`\n align-items: center;\n background-color: ${({ theme }: StyledInputProps) => theme['100']};\n border: 1px solid rgba(160, 160, 160, 0.3);\n border-radius: 3px;\n color: ${({ theme }: StyledInputProps) => theme['006']};\n display: flex;\n justify-content: space-between;\n min-height: 42px;\n opacity: ${({ isDisabled }) => (isDisabled ? 0.5 : 1)};\n padding: 8px 10px;\n transition: opacity 0.3s ease;\n\n &:not(&:first-child) {\n margin-top: 8px;\n }\n`;\n\nexport const StyledInputContent = styled.div`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n position: relative;\n min-width: 0;\n`;\n\nexport const StyledInputField = styled.input`\n background: none;\n border: none;\n color: ${({ theme }: StyledInputProps) => theme.text};\n padding: 0;\n`;\n\nexport const StyledMotionInputLabel = styled(motion.label)`\n line-height: 1.15;\n pointer-events: none;\n position: absolute;\n user-select: none;\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;AAMhC,MAAMG,WAAW,GAAGC,yBAAM,CAACC,GAAsB;AACxD;AACA,wBAAwBC,IAAA;EAAA,IAAC;IAAEC;EAAwB,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACtE;AACA;AACA,aAAaC,KAAA;EAAA,IAAC;IAAED;EAAwB,CAAC,GAAAC,KAAA;EAAA,OAAKD,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AAC3D;AACA;AACA;AACA,eAAeE,KAAA;EAAA,IAAC;IAAEC;EAAW,CAAC,GAAAD,KAAA;EAAA,OAAMC,UAAU,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAR,WAAA,GAAAA,WAAA;AAEK,MAAMS,kBAAkB,GAAGR,yBAAM,CAACC,GAAI;AAC7C;AACA;AACA;AACA;AACA;AACA,CAAC;AAACM,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAEK,MAAMC,gBAAgB,GAAGT,yBAAM,CAACU,KAAM;AAC7C;AACA;AACA,aAAaC,KAAA;EAAA,IAAC;IAAER;EAAwB,CAAC,GAAAQ,KAAA;EAAA,OAAKR,KAAK,CAACS,IAAI;AAAA,CAAC;AACzD;AACA,CAAC;AAACL,OAAA,CAAAE,gBAAA,GAAAA,gBAAA;AAEK,MAAMI,sBAAsB,GAAG,IAAAb,yBAAM,EAACc,oBAAM,CAACC,KAAK,CAAE;AAC3D;AACA;AACA;AACA;AACA,CAAC;AAACR,OAAA,CAAAM,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"file":"Input.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledInput","styled","div","_ref","theme","_ref2","_ref3","isDisabled","exports","StyledInputContent","StyledInputField","input","_ref4","text","StyledMotionInputLabel","m","label"],"sources":["../../../src/components/input/Input.styles.ts"],"sourcesContent":["import { m } from 'framer-motion';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { InputProps } from './Input';\n\ntype StyledInputProps = WithTheme<Pick<InputProps, 'isDisabled'>>;\n\nexport const StyledInput = styled.div<StyledInputProps>`\n align-items: center;\n background-color: ${({ theme }: StyledInputProps) => theme['100']};\n border: 1px solid rgba(160, 160, 160, 0.3);\n border-radius: 3px;\n color: ${({ theme }: StyledInputProps) => theme['006']};\n display: flex;\n justify-content: space-between;\n min-height: 42px;\n opacity: ${({ isDisabled }) => (isDisabled ? 0.5 : 1)};\n padding: 8px 10px;\n transition: opacity 0.3s ease;\n width: 100%;\n\n &:not(&:first-child) {\n margin-top: 8px;\n }\n`;\n\nexport const StyledInputContent = styled.div`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n position: relative;\n min-width: 0;\n`;\n\nexport const StyledInputField = styled.input`\n background: none;\n border: none;\n color: ${({ theme }: StyledInputProps) => theme.text};\n padding: 0;\n`;\n\nexport const StyledMotionInputLabel = styled(m.label)`\n line-height: 1.15;\n pointer-events: none;\n position: absolute;\n user-select: none;\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;AAMhC,MAAMG,WAAW,GAAGC,yBAAM,CAACC,GAAsB;AACxD;AACA,wBAAwBC,IAAA;EAAA,IAAC;IAAEC;EAAwB,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACtE;AACA;AACA,aAAaC,KAAA;EAAA,IAAC;IAAED;EAAwB,CAAC,GAAAC,KAAA;EAAA,OAAKD,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AAC3D;AACA;AACA;AACA,eAAeE,KAAA;EAAA,IAAC;IAAEC;EAAW,CAAC,GAAAD,KAAA;EAAA,OAAMC,UAAU,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAR,WAAA,GAAAA,WAAA;AAEK,MAAMS,kBAAkB,GAAGR,yBAAM,CAACC,GAAI;AAC7C;AACA;AACA;AACA;AACA;AACA,CAAC;AAACM,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAEK,MAAMC,gBAAgB,GAAGT,yBAAM,CAACU,KAAM;AAC7C;AACA;AACA,aAAaC,KAAA;EAAA,IAAC;IAAER;EAAwB,CAAC,GAAAQ,KAAA;EAAA,OAAKR,KAAK,CAACS,IAAI;AAAA,CAAC;AACzD;AACA,CAAC;AAACL,OAAA,CAAAE,gBAAA,GAAAA,gBAAA;AAEK,MAAMI,sBAAsB,GAAG,IAAAb,yBAAM,EAACc,eAAC,CAACC,KAAK,CAAE;AACtD;AACA;AACA;AACA;AACA,CAAC;AAACR,OAAA,CAAAM,sBAAA,GAAAA,sBAAA"}
@@ -0,0 +1,6 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export type LazyMotionWrapperProps = {
3
+ children: ReactNode;
4
+ };
5
+ declare const LazyMotionWrapper: FC<LazyMotionWrapperProps>;
6
+ export default LazyMotionWrapper;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _framerMotion = require("framer-motion");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ const LazyMotionWrapper = _ref => {
11
+ let {
12
+ children
13
+ } = _ref;
14
+ return /*#__PURE__*/_react.default.createElement(_framerMotion.LazyMotion, {
15
+ features: _framerMotion.domAnimation
16
+ }, children);
17
+ };
18
+ LazyMotionWrapper.displayName = 'LazyMotionWrapper';
19
+ var _default = LazyMotionWrapper;
20
+ exports.default = _default;
21
+ //# sourceMappingURL=LazyMotionWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LazyMotionWrapper.js","names":["_framerMotion","require","_react","_interopRequireDefault","obj","__esModule","default","LazyMotionWrapper","_ref","children","createElement","LazyMotion","features","domAnimation","displayName","_default","exports"],"sources":["../../../src/components/lazy-motion-wrapper/LazyMotionWrapper.tsx"],"sourcesContent":["import { domAnimation, LazyMotion } from 'framer-motion';\nimport React, { FC, ReactNode } from 'react';\n\nexport type LazyMotionWrapperProps = {\n children: ReactNode;\n};\n\nconst LazyMotionWrapper: FC<LazyMotionWrapperProps> = ({ children }) => (\n <LazyMotion features={domAnimation}>{children}</LazyMotion>\n);\n\nLazyMotionWrapper.displayName = 'LazyMotionWrapper';\n\nexport default LazyMotionWrapper;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA6C,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAM7C,MAAMG,iBAA6C,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAS,CAAC,GAAAD,IAAA;EAAA,oBAC/DN,MAAA,CAAAI,OAAA,CAAAI,aAAA,CAACV,aAAA,CAAAW,UAAU;IAACC,QAAQ,EAAEC;EAAa,GAAEJ,QAAQ,CAAc;AAAA,CAC9D;AAEDF,iBAAiB,CAACO,WAAW,GAAG,mBAAmB;AAAC,IAAAC,QAAA,GAErCR,iBAAiB;AAAAS,OAAA,CAAAV,OAAA,GAAAS,QAAA"}
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = exports.ListContext = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
+ var _LazyMotionWrapper = _interopRequireDefault(require("../lazy-motion-wrapper/LazyMotionWrapper"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
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); }
9
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; }
10
12
  const ListContext = /*#__PURE__*/_react.default.createContext({
@@ -44,9 +46,9 @@ const List = _ref => {
44
46
  openItemUuid,
45
47
  incrementExpandableItemCount
46
48
  }), [expandableItemCount, incrementExpandableItemCount, openItemUuid, updateOpenItemUuid]);
47
- return /*#__PURE__*/_react.default.createElement(ListContext.Provider, {
49
+ return /*#__PURE__*/_react.default.createElement(_LazyMotionWrapper.default, null, /*#__PURE__*/_react.default.createElement(ListContext.Provider, {
48
50
  value: providerValue
49
- }, children);
51
+ }, children));
50
52
  };
51
53
  List.displayName = 'List';
52
54
  var _default = List;
@@ -1 +1 @@
1
- {"version":3,"file":"List.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","ListContext","React","createContext","incrementExpandableItemCount","isAnyItemExpandable","openItemUuid","undefined","updateOpenItemUuid","exports","displayName","List","_ref","children","setOpenItemUuid","useState","expandableItemCount","setExpandableItemCount","useCallback","uuid","shouldOnlyOpen","arguments","length","currentOpenItemUuid","count","providerValue","useMemo","createElement","Provider","value","_default"],"sources":["../../../src/components/list/List.tsx"],"sourcesContent":["import React, { FC, ReactNode, useCallback, useMemo, useState } from 'react';\n\ninterface IListContext {\n incrementExpandableItemCount: () => () => void;\n isAnyItemExpandable: boolean;\n openItemUuid: string | undefined;\n updateOpenItemUuid: (uuid: string, options?: { shouldOnlyOpen?: boolean }) => void;\n}\n\nexport const ListContext = React.createContext<IListContext>({\n incrementExpandableItemCount: () => () => {},\n isAnyItemExpandable: false,\n openItemUuid: undefined,\n updateOpenItemUuid: () => {},\n});\n\nListContext.displayName = 'ListContext';\n\ntype ListProps = {\n /**\n * The items of the list\n */\n children: ReactNode;\n};\n\nconst List: FC<ListProps> = ({ children }) => {\n const [openItemUuid, setOpenItemUuid] = useState<IListContext['openItemUuid']>(undefined);\n const [expandableItemCount, setExpandableItemCount] = useState<number>(0);\n\n const updateOpenItemUuid = useCallback<IListContext['updateOpenItemUuid']>(\n (uuid, { shouldOnlyOpen } = {}) => {\n setOpenItemUuid((currentOpenItemUuid) => {\n if (currentOpenItemUuid === uuid && shouldOnlyOpen !== true) {\n return undefined;\n }\n\n return uuid;\n });\n },\n [setOpenItemUuid]\n );\n\n const incrementExpandableItemCount = useCallback(() => {\n setExpandableItemCount((count) => count + 1);\n\n return () => {\n setExpandableItemCount((count) => count - 1);\n };\n }, [setExpandableItemCount]);\n\n const providerValue = useMemo<IListContext>(\n () => ({\n isAnyItemExpandable: expandableItemCount > 0,\n updateOpenItemUuid,\n openItemUuid,\n incrementExpandableItemCount,\n }),\n [expandableItemCount, incrementExpandableItemCount, openItemUuid, updateOpenItemUuid]\n );\n\n return <ListContext.Provider value={providerValue}>{children}</ListContext.Provider>;\n};\n\nList.displayName = 'List';\n\nexport default List;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA6E,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,GAA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AI;AAAAF,OAAA,CAAAvB,OAAA,GAAA4C,QAAA"}
1
+ {"version":3,"file":"List.js","names":["_react","_interopRequireWildcard","require","_LazyMotionWrapper","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ListContext","React","createContext","incrementExpandableItemCount","isAnyItemExpandable","openItemUuid","undefined","updateOpenItemUuid","exports","displayName","List","_ref","children","setOpenItemUuid","useState","expandableItemCount","setExpandableItemCount","useCallback","uuid","shouldOnlyOpen","arguments","length","currentOpenItemUuid","count","providerValue","useMemo","createElement","Provider","value","_default"],"sources":["../../../src/components/list/List.tsx"],"sourcesContent":["import React, { FC, ReactNode, useCallback, useMemo, useState } from 'react';\nimport LazyMotionWrapper from '../lazy-motion-wrapper/LazyMotionWrapper';\n\ninterface IListContext {\n incrementExpandableItemCount: () => () => void;\n isAnyItemExpandable: boolean;\n openItemUuid: string | undefined;\n updateOpenItemUuid: (uuid: string, options?: { shouldOnlyOpen?: boolean }) => void;\n}\n\nexport const ListContext = React.createContext<IListContext>({\n incrementExpandableItemCount: () => () => {},\n isAnyItemExpandable: false,\n openItemUuid: undefined,\n updateOpenItemUuid: () => {},\n});\n\nListContext.displayName = 'ListContext';\n\ntype ListProps = {\n /**\n * The items of the list\n */\n children: ReactNode;\n};\n\nconst List: FC<ListProps> = ({ children }) => {\n const [openItemUuid, setOpenItemUuid] = useState<IListContext['openItemUuid']>(undefined);\n const [expandableItemCount, setExpandableItemCount] = useState<number>(0);\n\n const updateOpenItemUuid = useCallback<IListContext['updateOpenItemUuid']>(\n (uuid, { shouldOnlyOpen } = {}) => {\n setOpenItemUuid((currentOpenItemUuid) => {\n if (currentOpenItemUuid === uuid && shouldOnlyOpen !== true) {\n return undefined;\n }\n\n return uuid;\n });\n },\n [setOpenItemUuid]\n );\n\n const incrementExpandableItemCount = useCallback(() => {\n setExpandableItemCount((count) => count + 1);\n\n return () => {\n setExpandableItemCount((count) => count - 1);\n };\n }, [setExpandableItemCount]);\n\n const providerValue = useMemo<IListContext>(\n () => ({\n isAnyItemExpandable: expandableItemCount > 0,\n updateOpenItemUuid,\n openItemUuid,\n incrementExpandableItemCount,\n }),\n [expandableItemCount, incrementExpandableItemCount, openItemUuid, updateOpenItemUuid]\n );\n\n return (\n <LazyMotionWrapper>\n <ListContext.Provider value={providerValue}>{children}</ListContext.Provider>\n </LazyMotionWrapper>\n );\n};\n\nList.displayName = 'List';\n\nexport default List;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAyE,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,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,SAAAR,wBAAAI,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAA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IAAK;MACrC,IAAIA,mBAAmB,KAAKJ,IAAI,IAAIC,cAAc,KAAK,IAAI,EAAE;QACzD,OAAOb,SAAS;MACpB;MAEA,OAAOY,IAAI;IACf,CAAC,CAAC;EACN,CAAC,EACD,CAACL,eAAe,CAAC,CACpB;EAED,MAAMV,4BAA4B,GAAG,IAAAc,kBAAW,EAAC,MAAM;IACnDD,sBAAsB,CAAEO,KAAK,IAAKA,KAAK,GAAG,CAAC,CAAC;IAE5C,OAAO,MAAM;MACTP,sBAAsB,CAAEO,KAAK,IAAKA,KAAK,GAAG,CAAC,CAAC;IAChD,CAAC;EACL,CAAC,EAAE,CAACP,sBAAsB,CAAC,CAAC;EAE5B,MAAMQ,aAAa,GAAG,IAAAC,cAAO,EACzB,OAAO;IACHrB,mBAAmB,EAAEW,mBAAmB,GAAG,CAAC;IAC5CR,kBAAkB;IAClBF,YAAY;IACZF;EACJ,CAAC,CAAC,EACF,CAACY,mBAAmB,EAAEZ,4BAA4B,EAAEE,YAAY,EAAEE,kBAAkB,CAAC,CACxF;EAED,oBACIlC,MAAA,CAAAO,OAAA,CAAA8C,aAAA,CAAClD,kBAAA,CAAAI,OAAiB,qBACdP,MAAA,CAAAO,OAAA,CAAA8C,aAAA,CAAC1B,WAAW,CAAC2B,QAAQ;IAACC,KAAK,EAAEJ;EAAc,GAAEZ,QAAQ,CAAwB,CAC7D;AAE5B,CAAC;AAEDF,IAAI,CAACD,WAAW,GAAG,MAAM;AAAC,IAAAoB,QAAA,GAEXnB,IAAI;AAAAF,OAAA,CAAA5B,OAAA,GAAAiD,QAAA"}
@@ -7,7 +7,7 @@ exports.StyledMotionListItemBody = 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 }; }
10
- const StyledMotionListItemBody = (0, _styledComponents.default)(_framerMotion.motion.div)`
10
+ const StyledMotionListItemBody = (0, _styledComponents.default)(_framerMotion.m.div)`
11
11
  overflow: hidden;
12
12
  `;
13
13
  exports.StyledMotionListItemBody = StyledMotionListItemBody;
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemBody.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledMotionListItemBody","styled","motion","div","exports"],"sources":["../../../../../src/components/list/list-item/list-item-body/ListItemBody.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledMotionListItemBody = styled(motion.div)`\n overflow: hidden;\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;AAEhC,MAAMG,wBAAwB,GAAG,IAAAC,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AAC3D;AACA,CAAC;AAACC,OAAA,CAAAJ,wBAAA,GAAAA,wBAAA"}
1
+ {"version":3,"file":"ListItemBody.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledMotionListItemBody","styled","m","div","exports"],"sources":["../../../../../src/components/list/list-item/list-item-body/ListItemBody.styles.ts"],"sourcesContent":["import { m } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledMotionListItemBody = styled(m.div)`\n overflow: hidden;\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;AAEhC,MAAMG,wBAAwB,GAAG,IAAAC,yBAAM,EAACC,eAAC,CAACC,GAAG,CAAE;AACtD;AACA,CAAC;AAACC,OAAA,CAAAJ,wBAAA,GAAAA,wBAAA"}
@@ -30,7 +30,7 @@ const StyledListItemHead = _styledComponents.default.div`
30
30
  }}
31
31
  `;
32
32
  exports.StyledListItemHead = StyledListItemHead;
33
- const StyledMotionListItemHeadIndicator = (0, _styledComponents.default)(_framerMotion.motion.div)`
33
+ const StyledMotionListItemHeadIndicator = (0, _styledComponents.default)(_framerMotion.m.div)`
34
34
  align-items: center;
35
35
  display: flex;
36
36
  flex: 0 0 auto;
@@ -103,7 +103,7 @@ const StyledListItemHeadRightElement = _styledComponents.default.div`
103
103
  margin-left: 8px;
104
104
  `;
105
105
  exports.StyledListItemHeadRightElement = StyledListItemHeadRightElement;
106
- const StyledMotionListItemHeadHoverItem = (0, _styledComponents.default)(_framerMotion.motion.div)`
106
+ const StyledMotionListItemHeadHoverItem = (0, _styledComponents.default)(_framerMotion.m.div)`
107
107
  overflow: hidden;
108
108
  `;
109
109
  exports.StyledMotionListItemHeadHoverItem = StyledMotionListItemHeadHoverItem;
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemHead.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledListItemHead","styled","div","_ref","theme","text","_ref2","isClickable","css","exports","StyledMotionListItemHeadIndicator","motion","StyledListItemHeadContent","_ref3","isOpen","_ref4","isIconOrImageGiven","undefined","StyledListItemHeadTitle","StyledListItemHeadTitleText","span","StyledListItemHeadSubtitle","StyledListItemHeadSubtitleText","StyledListItemHeadTopRightElement","StyledListItemHeadBottomRightElement","StyledListItemHeadRightElement","StyledMotionListItemHeadHoverItem"],"sources":["../../../../../src/components/list/list-item/list-item-head/ListItemHead.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledListItemHeadProps = WithTheme<{\n isClickable: boolean;\n}>;\n\nexport const StyledListItemHead = styled.div<StyledListItemHeadProps>`\n align-items: center;\n color: ${({ theme }: StyledListItemHeadProps) => theme.text};\n display: flex;\n height: 64px;\n padding: 12px 9px;\n\n ${({ isClickable }) =>\n isClickable &&\n css`\n cursor: pointer;\n `}\n`;\n\nexport const StyledMotionListItemHeadIndicator = styled(motion.div)`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n height: 26px;\n justify-content: center;\n width: 26px;\n`;\n\ntype StyledListItemHeadContentProps = {\n isIconOrImageGiven: boolean;\n isOpen: boolean;\n};\n\nexport const StyledListItemHeadContent = styled.div<StyledListItemHeadContentProps>`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n font-weight: ${({ isOpen }) => (isOpen ? 'bold' : 'normal')};\n justify-content: center;\n line-height: normal;\n margin-left: ${({ isIconOrImageGiven }) => (isIconOrImageGiven ? '10px' : undefined)};\n min-width: 0;\n`;\n\nexport const StyledListItemHeadTitle = styled.div`\n align-items: center;\n display: flex;\n justify-content: space-between;\n`;\n\nexport const StyledListItemHeadTitleText = styled.span`\n flex: 1 1 auto;\n min-width: 0;\n`;\n\nexport const StyledListItemHeadSubtitle = styled.div`\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin-top: 2px;\n opacity: 0.75;\n`;\n\nexport const StyledListItemHeadSubtitleText = styled.span`\n flex: 1 1 auto;\n font-size: 85%;\n min-width: 0;\n`;\n\nexport const StyledListItemHeadTopRightElement = styled.div`\n flex: 0 0 auto;\n font-size: 85%;\n margin-left: 8px;\n opacity: 0.75;\n`;\n\nexport const StyledListItemHeadBottomRightElement = styled.div`\n flex: 0 0 auto;\n margin-left: 8px;\n font-size: 85%;\n`;\n\nexport const StyledListItemHeadRightElement = styled.div`\n flex: 0 0 auto;\n margin-left: 8px;\n`;\n\nexport const StyledMotionListItemHeadHoverItem = styled(motion.div)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AA;AAEK,MAAMC,8BAA8B,GAAGrB,yBAAM,CAACmB,IAAK;AAC1D;AACA;AACA;AACA,CAAC;AAACX,OAAA,CAAAa,8BAAA,GAAAA,8BAAA;AAEK,MAAMC,iCAAiC,GAAGtB,yBAAM,CAACC,GAAI;AAC5D;AACA;AACA;AACA;AACA,CAAC;AAACO,OAAA,CAAAc,iCAAA,GAAAA,iCAAA;AAEK,MAAMC,oCAAoC,GAAGvB,yBAAM,CAACC,GAAI;AAC/D;AACA;AACA;AACA,CAAC;AAACO,OAAA,CAAAe,oCAAA,GAAAA,oCAAA;AAEK,MAAMC,8BAA8B,GAAGxB,yBAAM,CAACC,GAAI;AACzD;AACA;AACA,CAAC;AAACO,OAAA,CAAAgB,8BAAA,GAAAA,8BAAA;AAEK,MAAMC,iCAAiC,GAAG,IAAAzB,yBAAM,EAACU,oBAAM,CAACT,GAAG,CAAE;AACpE;AACA,CAAC;AAACO,OAAA,CAAAiB,iCAAA,GAAAA,iCAAA"}
1
+ {"version":3,"file":"ListItemHead.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StyledListItemHead","styled","div","_ref","theme","text","_ref2","isClickable","css","exports","StyledMotionListItemHeadIndicator","m","StyledListItemHeadContent","_ref3","isOpen","_ref4","isIconOrImageGiven","undefined","StyledListItemHeadTitle","StyledListItemHeadTitleText","span","StyledListItemHeadSubtitle","StyledListItemHeadSubtitleText","StyledListItemHeadTopRightElement","StyledListItemHeadBottomRightElement","StyledListItemHeadRightElement","StyledMotionListItemHeadHoverItem"],"sources":["../../../../../src/components/list/list-item/list-item-head/ListItemHead.styles.ts"],"sourcesContent":["import { m } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledListItemHeadProps = WithTheme<{\n isClickable: boolean;\n}>;\n\nexport const StyledListItemHead = styled.div<StyledListItemHeadProps>`\n align-items: center;\n color: ${({ theme }: StyledListItemHeadProps) => theme.text};\n display: flex;\n height: 64px;\n padding: 12px 9px;\n\n ${({ isClickable }) =>\n isClickable &&\n css`\n cursor: pointer;\n `}\n`;\n\nexport const StyledMotionListItemHeadIndicator = styled(m.div)`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n height: 26px;\n justify-content: center;\n width: 26px;\n`;\n\ntype StyledListItemHeadContentProps = {\n isIconOrImageGiven: boolean;\n isOpen: boolean;\n};\n\nexport const StyledListItemHeadContent = styled.div<StyledListItemHeadContentProps>`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n font-weight: ${({ isOpen }) => (isOpen ? 'bold' : 'normal')};\n justify-content: center;\n line-height: normal;\n margin-left: ${({ isIconOrImageGiven }) => (isIconOrImageGiven ? '10px' : undefined)};\n min-width: 0;\n`;\n\nexport const StyledListItemHeadTitle = styled.div`\n align-items: center;\n display: flex;\n justify-content: space-between;\n`;\n\nexport const StyledListItemHeadTitleText = styled.span`\n flex: 1 1 auto;\n min-width: 0;\n`;\n\nexport const StyledListItemHeadSubtitle = styled.div`\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin-top: 2px;\n opacity: 0.75;\n`;\n\nexport const StyledListItemHeadSubtitleText = styled.span`\n flex: 1 1 auto;\n font-size: 85%;\n min-width: 0;\n`;\n\nexport const StyledListItemHeadTopRightElement = styled.div`\n flex: 0 0 auto;\n font-size: 85%;\n margin-left: 8px;\n opacity: 0.75;\n`;\n\nexport const StyledListItemHeadBottomRightElement = styled.div`\n flex: 0 0 auto;\n margin-left: 8px;\n font-size: 85%;\n`;\n\nexport const StyledListItemHeadRightElement = styled.div`\n flex: 0 0 auto;\n margin-left: 8px;\n`;\n\nexport const StyledMotionListItemHeadHoverItem = styled(m.div)`\n overflow: hidden;\n`;\n"],"mappings":";;;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,yBAAM,CAACmB,IAAK;AAC1D;AACA;AACA;AACA,CAAC;AAACX,OAAA,CAAAa,8BAAA,GAAAA,8BAAA;AAEK,MAAMC,iCAAiC,GAAGtB,yBAAM,CAACC,GAAI;AAC5D;AACA;AACA;AACA;AACA,CAAC;AAACO,OAAA,CAAAc,iCAAA,GAAAA,iCAAA;AAEK,MAAMC,oCAAoC,GAAGvB,yBAAM,CAACC,GAAI;AAC/D;AACA;AACA;AACA,CAAC;AAACO,OAAA,CAAAe,oCAAA,GAAAA,oCAAA;AAEK,MAAMC,8BAA8B,GAAGxB,yBAAM,CAACC,GAAI;AACzD;AACA;AACA,CAAC;AAACO,OAAA,CAAAgB,8BAAA,GAAAA,8BAAA;AAEK,MAAMC,iCAAiC,GAAG,IAAAzB,yBAAM,EAACU,eAAC,CAACT,GAAG,CAAE;AAC/D;AACA,CAAC;AAACO,OAAA,CAAAiB,iCAAA,GAAAA,iCAAA"}
package/lib/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export { default as ContextMenu } from './components/context-menu/ContextMenu';
11
11
  export { default as GridImage } from './components/grid-image/GridImage';
12
12
  export { default as Icon } from './components/icon/Icon';
13
13
  export { default as Input } from './components/input/Input';
14
+ export { default as LazyMotionWrapper } from './components/lazy-motion-wrapper/LazyMotionWrapper';
14
15
  export { default as List } from './components/list/List';
15
16
  export { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';
16
17
  export { default as ListItem } from './components/list/list-item/ListItem';
package/lib/index.js CHANGED
@@ -75,6 +75,12 @@ Object.defineProperty(exports, "Input", {
75
75
  return _Input.default;
76
76
  }
77
77
  });
78
+ Object.defineProperty(exports, "LazyMotionWrapper", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _LazyMotionWrapper.default;
82
+ }
83
+ });
78
84
  Object.defineProperty(exports, "List", {
79
85
  enumerable: true,
80
86
  get: function () {
@@ -105,6 +111,7 @@ var _ContextMenu = _interopRequireDefault(require("./components/context-menu/Con
105
111
  var _GridImage = _interopRequireDefault(require("./components/grid-image/GridImage"));
106
112
  var _Icon = _interopRequireDefault(require("./components/icon/Icon"));
107
113
  var _Input = _interopRequireDefault(require("./components/input/Input"));
114
+ var _LazyMotionWrapper = _interopRequireDefault(require("./components/lazy-motion-wrapper/LazyMotionWrapper"));
108
115
  var _List = _interopRequireDefault(require("./components/list/List"));
109
116
  var _ListItemContent = _interopRequireDefault(require("./components/list/list-item/list-item-content/ListItemContent"));
110
117
  var _ListItem = _interopRequireDefault(require("./components/list/list-item/ListItem"));
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_ContextMenu","_GridImage","_Icon","_Input","_List","_ListItemContent","_ListItem","obj","__esModule","default"],"sources":["../src/index.ts"],"sourcesContent":["export { 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 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 ContextMenu } from './components/context-menu/ContextMenu';\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';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,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,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,oBAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEA,IAAAQ,YAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,UAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,KAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,MAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,KAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,gBAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,SAAA,GAAAf,sBAAA,CAAAC,OAAA;AAA2E,SAAAD,uBAAAgB,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","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_ContextMenu","_GridImage","_Icon","_Input","_LazyMotionWrapper","_List","_ListItemContent","_ListItem","obj","__esModule","default"],"sources":["../src/index.ts"],"sourcesContent":["export { 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 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 ContextMenu } from './components/context-menu/ContextMenu';\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 LazyMotionWrapper } from './components/lazy-motion-wrapper/LazyMotionWrapper';\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';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,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,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,oBAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEA,IAAAQ,YAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,UAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,KAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,MAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,kBAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,KAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,gBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,SAAA,GAAAhB,sBAAA,CAAAC,OAAA;AAA2E,SAAAD,uBAAAiB,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/core",
3
- "version": "5.0.0-beta.85",
3
+ "version": "5.0.0-beta.89",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "keywords": [
6
6
  "chayns",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "899d6a0c64f9168e05dff3560c0c36ecbcaa48c8"
65
+ "gitHead": "6762ce977ccf926ce6a2e0e0ae513d5709395758"
66
66
  }