@chayns-components/core 5.0.0-beta.45 → 5.0.0-beta.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/accordion/Accordion.d.ts +11 -2
- package/lib/components/accordion/Accordion.js +10 -4
- package/lib/components/accordion/Accordion.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.d.ts +8 -3
- package/lib/components/accordion/accordion-body/AccordionBody.js +11 -7
- package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.d.ts +6 -2
- package/lib/components/accordion/accordion-content/AccordionContent.js +4 -2
- package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +2 -2
- package/lib/components/accordion/accordion-head/AccordionHead.d.ts +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.d.ts +1 -1
- package/lib/components/badge/Badge.d.ts +1 -1
- package/lib/components/button/Button.d.ts +1 -1
- package/lib/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +2 -2
- package/lib/components/context-menu/ContextMenu.d.ts +4 -4
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -1
- package/lib/components/grid-image/GridImage.d.ts +1 -1
- package/lib/components/grid-image/GridImage.styles.d.ts +3 -3
- package/lib/components/icon/Icon.d.ts +1 -1
- package/lib/components/icon/Icon.styles.d.ts +1 -1
- package/lib/components/input/Input.d.ts +1 -1
- package/lib/components/list/List.d.ts +1 -1
- package/lib/components/list/list-item/ListItem.d.ts +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.d.ts +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.d.ts +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.d.ts +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +1 -1
- package/package.json +10 -10
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import React, { ChangeEventHandler, FC, ReactNode } from 'react';
|
|
1
|
+
import React, { ChangeEventHandler, FC, ReactNode, UIEvent } from 'react';
|
|
2
2
|
export declare const AccordionContext: React.Context<{
|
|
3
3
|
isWrapped: boolean;
|
|
4
4
|
}>;
|
|
5
|
-
export
|
|
5
|
+
export type AccordionProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Maximum height of the accordion body element. This automatically makes the content of the
|
|
8
|
+
* body element scrollable.
|
|
9
|
+
*/
|
|
10
|
+
bodyMaxHeight?: number;
|
|
6
11
|
/**
|
|
7
12
|
* The content of the accordion body
|
|
8
13
|
*/
|
|
@@ -33,6 +38,10 @@ export declare type AccordionProps = {
|
|
|
33
38
|
* the head and the padding of the content.
|
|
34
39
|
*/
|
|
35
40
|
isWrapped?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Function that is executed when the accordion body will be scrolled
|
|
43
|
+
*/
|
|
44
|
+
onBodyScroll?: (event: UIEvent<HTMLDivElement>) => void;
|
|
36
45
|
/**
|
|
37
46
|
* Function that is executed when the accordion will be closed.
|
|
38
47
|
*/
|
|
@@ -21,6 +21,7 @@ exports.AccordionContext = AccordionContext;
|
|
|
21
21
|
AccordionContext.displayName = 'AccordionContext';
|
|
22
22
|
const Accordion = _ref => {
|
|
23
23
|
let {
|
|
24
|
+
bodyMaxHeight,
|
|
24
25
|
children,
|
|
25
26
|
icon,
|
|
26
27
|
isDefaultOpen = false,
|
|
@@ -28,6 +29,7 @@ const Accordion = _ref => {
|
|
|
28
29
|
isFixed = false,
|
|
29
30
|
isTitleGreyed = false,
|
|
30
31
|
isWrapped = false,
|
|
32
|
+
onBodyScroll,
|
|
31
33
|
onClose,
|
|
32
34
|
onOpen,
|
|
33
35
|
onSearchChange,
|
|
@@ -77,6 +79,9 @@ const Accordion = _ref => {
|
|
|
77
79
|
});
|
|
78
80
|
}
|
|
79
81
|
}, [isDefaultOpen, updateOpenAccordionUuid, uuid]);
|
|
82
|
+
const accordionContextProviderValue = (0, _react.useMemo)(() => ({
|
|
83
|
+
isWrapped
|
|
84
|
+
}), [isWrapped]);
|
|
80
85
|
return /*#__PURE__*/_react.default.createElement(_Accordion.StyledAccordion, {
|
|
81
86
|
className: "beta-chayns-accordion",
|
|
82
87
|
isOpen: isOpen,
|
|
@@ -84,9 +89,7 @@ const Accordion = _ref => {
|
|
|
84
89
|
isWrapped: isWrapped,
|
|
85
90
|
shouldHideBackground: shouldHideBackground
|
|
86
91
|
}, /*#__PURE__*/_react.default.createElement(AccordionContext.Provider, {
|
|
87
|
-
value:
|
|
88
|
-
isWrapped
|
|
89
|
-
}
|
|
92
|
+
value: accordionContextProviderValue
|
|
90
93
|
}, /*#__PURE__*/_react.default.createElement(_framerMotion.MotionConfig, {
|
|
91
94
|
transition: {
|
|
92
95
|
type: 'tween'
|
|
@@ -106,7 +109,10 @@ const Accordion = _ref => {
|
|
|
106
109
|
titleElement: titleElement
|
|
107
110
|
}), /*#__PURE__*/_react.default.createElement(_framerMotion.AnimatePresence, {
|
|
108
111
|
initial: false
|
|
109
|
-
}, isOpen && /*#__PURE__*/_react.default.createElement(_AccordionBody.default,
|
|
112
|
+
}, isOpen && /*#__PURE__*/_react.default.createElement(_AccordionBody.default, {
|
|
113
|
+
maxHeight: bodyMaxHeight,
|
|
114
|
+
onScroll: onBodyScroll
|
|
115
|
+
}, children)))));
|
|
110
116
|
};
|
|
111
117
|
Accordion.displayName = 'Accordion';
|
|
112
118
|
var _default = Accordion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","names":["AccordionContext","React","createContext","isWrapped","displayName","Accordion","children","icon","isDefaultOpen","isDisabled","isFixed","isTitleGreyed","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","type"],"sources":["../../../src/components/accordion/Accordion.tsx"],"sourcesContent":["import { AnimatePresence, MotionConfig } from 'framer-motion';\nimport React, {\n ChangeEventHandler,\n FC,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\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 * 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 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 children,\n icon,\n isDefaultOpen = false,\n isDisabled = false,\n isFixed = false,\n isTitleGreyed = false,\n isWrapped = false,\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 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={{ isWrapped }}>\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 && <AccordionBody>{children}</AccordionBody>}\n </AnimatePresence>\n </MotionConfig>\n </AccordionContext.Provider>\n </StyledAccordion>\n );\n};\n\nAccordion.displayName = 'Accordion';\n\nexport default Accordion;\n"],"mappings":";;;;;;AAAA;AACA;AAUA;AACA;AACA;AACA;AACA;AAAqD;AAAA;AAAA;AAE9C,MAAMA,gBAAgB,gBAAGC,cAAK,CAACC,aAAa,CAAC;EAAEC,SAAS,EAAE;AAAM,CAAC,CAAC;AAAC;AAE1EH,gBAAgB,CAACI,WAAW,GAAG,kBAAkB;AAyEjD,MAAMC,SAA6B,GAAG,QAiBhC;EAAA,IAjBiC;IACnCC,QAAQ;IACRC,IAAI;IACJC,aAAa,GAAG,KAAK;IACrBC,UAAU,GAAG,KAAK;IAClBC,OAAO,GAAG,KAAK;IACfC,aAAa,GAAG,KAAK;IACrBR,SAAS,GAAG,KAAK;IACjBS,OAAO;IACPC,MAAM;IACNC,cAAc;IACdC,YAAY;IACZC,UAAU;IACVC,iBAAiB;IACjBC,oBAAoB,GAAG,KAAK;IAC5BC,KAAK;IACLC;EACJ,CAAC;EACG,MAAM;IAAEC,iBAAiB;IAAEC;EAAwB,CAAC,GAAG,IAAAC,iBAAU,EAACC,qCAAqB,CAAC;EACxF,MAAM;IAAErB,SAAS,EAAEsB;EAAgB,CAAC,GAAG,IAAAF,iBAAU,EAACvB,gBAAgB,C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BAAuB,EAAEO,IAAI,CAAC,CAAC;EAElD,oBACI,6BAAC,0BAAe;IACZ,SAAS,EAAC,uBAAuB;IACjC,MAAM,EAAEK,MAAO;IACf,eAAe,EAAET,eAAgB;IACjC,SAAS,EAAEtB,SAAU;IACrB,oBAAoB,EAAEe;EAAqB,gBAE3C,6BAAC,gBAAgB,CAAC,QAAQ;IAAC,KAAK,EAAE;MAAEf;IAAU;EAAE,gBAC5C,6BAAC,0BAAY;IAAC,UAAU,EAAE;MAAEsC,IAAI,EAAE;IAAQ;EAAE,gBACxC,6BAAC,sBAAa;IACV,IAAI,EAAElC,IAAK;IACX,MAAM,EAAE2B,MAAO;IACf,OAAO,EAAExB,OAAQ;IACjB,aAAa,EAAEC,aAAa,IAAIF,UAAW;IAC3C,SAAS,EAAEN,SAAU;IACrB,OAAO,EAAEgC,eAAgB;IACzB,cAAc,EAAErB,cAAe;IAC/B,YAAY,EAAEC,YAAa;IAC3B,UAAU,EAAEC,UAAW;IACvB,iBAAiB,EAAEC,iBAAkB;IACrC,KAAK,EAAEE,KAAM;IACb,YAAY,EAAEC;EAAa,EAC7B,eACF,6BAAC,6BAAe;IAAC,OAAO,EAAE;EAAM,GAC3Bc,MAAM,iBAAI,6BAAC,sBAAa,QAAE5B,QAAQ,CAAiB,CACtC,CACP,CACS,CACd;AAE1B,CAAC;AAEDD,SAAS,CAACD,WAAW,GAAG,WAAW;AAAC,eAErBC,SAAS;AAAA"}
|
|
1
|
+
{"version":3,"file":"Accordion.js","names":["AccordionContext","React","createContext","isWrapped","displayName","Accordion","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","type"],"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;AACA;AAYA;AACA;AACA;AACA;AACA;AAAqD;AAAA;AAAA;AAE9C,MAAMA,gBAAgB,gBAAGC,cAAK,CAACC,aAAa,CAAC;EAAEC,SAAS,EAAE;AAAM,CAAC,CAAC;AAAC;AAE1EH,gBAAgB,CAACI,WAAW,GAAG,kBAAkB;AAkFjD,MAAMC,SAA6B,GAAG,QAmBhC;EAAA,IAnBiC;IACnCC,aAAa;IACbC,QAAQ;IACRC,IAAI;IACJC,aAAa,GAAG,KAAK;IACrBC,UAAU,GAAG,KAAK;IAClBC,OAAO,GAAG,KAAK;IACfC,aAAa,GAAG,KAAK;IACrBT,SAAS,GAAG,KAAK;IACjBU,YAAY;IACZC,OAAO;IACPC,MAAM;IACNC,cAAc;IACdC,YAAY;IACZC,UAAU;IACVC,iBAAiB;IACjBC,oBAAoB,GAAG,KAAK;IAC5BC,KAAK;IACLC;EACJ,CAAC;EACG,MA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14 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
|
|
1
|
+
import { FC, UIEvent } from 'react';
|
|
2
|
+
import type { AccordionProps } from '../Accordion';
|
|
3
|
+
export type AccordionBodyProps = {
|
|
3
4
|
/**
|
|
4
5
|
* Maximum height of the element. This automatically makes the content of the element scrollable.
|
|
5
6
|
*/
|
|
6
|
-
maxHeight
|
|
7
|
+
maxHeight: AccordionProps['bodyMaxHeight'];
|
|
8
|
+
/**
|
|
9
|
+
* Function that is executed when the element will be scrolled
|
|
10
|
+
*/
|
|
11
|
+
onScroll?: (event: UIEvent<HTMLDivElement>) => void;
|
|
7
12
|
};
|
|
8
13
|
declare const AccordionBody: FC<AccordionBodyProps>;
|
|
9
14
|
export default AccordionBody;
|
|
@@ -4,15 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _AccordionGroup = require("../accordion-group/AccordionGroup");
|
|
9
9
|
var _AccordionBody = require("./AccordionBody.styles");
|
|
10
|
-
function
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
12
|
const AccordionBody = _ref => {
|
|
12
13
|
let {
|
|
13
14
|
children,
|
|
14
|
-
maxHeight
|
|
15
|
+
maxHeight,
|
|
16
|
+
onScroll
|
|
15
17
|
} = _ref;
|
|
18
|
+
const AccordionGroupContextProviderValue = (0, _react.useMemo)(() => ({
|
|
19
|
+
openAccordionUuid: undefined
|
|
20
|
+
}), []);
|
|
16
21
|
return /*#__PURE__*/_react.default.createElement(_AccordionBody.StyledMotionAccordionBody, {
|
|
17
22
|
animate: {
|
|
18
23
|
height: 'auto',
|
|
@@ -27,11 +32,10 @@ const AccordionBody = _ref => {
|
|
|
27
32
|
height: 0,
|
|
28
33
|
opacity: 0
|
|
29
34
|
},
|
|
30
|
-
maxHeight: maxHeight
|
|
35
|
+
maxHeight: maxHeight,
|
|
36
|
+
onScroll: onScroll
|
|
31
37
|
}, /*#__PURE__*/_react.default.createElement(_AccordionGroup.AccordionGroupContext.Provider, {
|
|
32
|
-
value:
|
|
33
|
-
openAccordionUuid: undefined
|
|
34
|
-
}
|
|
38
|
+
value: AccordionGroupContextProviderValue
|
|
35
39
|
}, children));
|
|
36
40
|
};
|
|
37
41
|
AccordionBody.displayName = 'AccordionBody';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionBody.js","names":["AccordionBody","children","maxHeight","
|
|
1
|
+
{"version":3,"file":"AccordionBody.js","names":["AccordionBody","children","maxHeight","onScroll","AccordionGroupContextProviderValue","useMemo","openAccordionUuid","undefined","height","opacity","displayName"],"sources":["../../../../src/components/accordion/accordion-body/AccordionBody.tsx"],"sourcesContent":["import React, { FC, UIEvent, useMemo } from 'react';\nimport type { AccordionProps } from '../Accordion';\nimport { AccordionGroupContext } from '../accordion-group/AccordionGroup';\nimport { StyledMotionAccordionBody } from './AccordionBody.styles';\n\nexport type AccordionBodyProps = {\n /**\n * Maximum height of the element. This automatically makes the content of the element scrollable.\n */\n maxHeight: AccordionProps['bodyMaxHeight'];\n /**\n * Function that is executed when the element will be scrolled\n */\n onScroll?: (event: UIEvent<HTMLDivElement>) => void;\n};\n\nconst AccordionBody: FC<AccordionBodyProps> = ({ children, maxHeight, onScroll }) => {\n const AccordionGroupContextProviderValue = useMemo(\n () => ({ openAccordionUuid: undefined }),\n []\n );\n\n return (\n <StyledMotionAccordionBody\n animate={{ height: 'auto', opacity: 1 }}\n className=\"beta-chayns-accordion-body\"\n exit={{ height: 0, opacity: 0 }}\n initial={{ height: 0, opacity: 0 }}\n maxHeight={maxHeight}\n onScroll={onScroll}\n >\n <AccordionGroupContext.Provider value={AccordionGroupContextProviderValue}>\n {children}\n </AccordionGroupContext.Provider>\n </StyledMotionAccordionBody>\n );\n};\n\nAccordionBody.displayName = 'AccordionBody';\n\nexport default AccordionBody;\n"],"mappings":";;;;;;AAAA;AAEA;AACA;AAAmE;AAAA;AAanE,MAAMA,aAAqC,GAAG,QAAuC;EAAA,IAAtC;IAAEC,QAAQ;IAAEC,SAAS;IAAEC;EAAS,CAAC;EAC5E,MAAMC,kCAAkC,GAAG,IAAAC,cAAO,EAC9C,OAAO;IAAEC,iBAAiB,EAAEC;EAAU,CAAC,CAAC,EACxC,EAAE,CACL;EAED,oBACI,6BAAC,wCAAyB;IACtB,OAAO,EAAE;MAAEC,MAAM,EAAE,MAAM;MAAEC,OAAO,EAAE;IAAE,CAAE;IACxC,SAAS,EAAC,4BAA4B;IACtC,IAAI,EAAE;MAAED,MAAM,EAAE,CAAC;MAAEC,OAAO,EAAE;IAAE,CAAE;IAChC,OAAO,EAAE;MAAED,MAAM,EAAE,CAAC;MAAEC,OAAO,EAAE;IAAE,CAAE;IACnC,SAAS,EAAEP,SAAU;IACrB,QAAQ,EAAEC;EAAS,gBAEnB,6BAAC,qCAAqB,CAAC,QAAQ;IAAC,KAAK,EAAEC;EAAmC,GACrEH,QAAQ,CACoB,CACT;AAEpC,CAAC;AAEDD,aAAa,CAACU,WAAW,GAAG,eAAe;AAAC,eAE7BV,aAAa;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AccordionBodyProps } from './AccordionBody';
|
|
2
|
-
|
|
2
|
+
type StyledMotionAccordionBodyProps = Pick<AccordionBodyProps, 'maxHeight'>;
|
|
3
3
|
export declare const StyledMotionAccordionBody: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, StyledMotionAccordionBodyProps, never>;
|
|
4
4
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
export
|
|
1
|
+
import { FC, ReactNode, UIEvent } from 'react';
|
|
2
|
+
export type AccordionContentProps = {
|
|
3
3
|
/**
|
|
4
4
|
* The content of the accordion content element
|
|
5
5
|
*/
|
|
@@ -8,6 +8,10 @@ export declare type AccordionContentProps = {
|
|
|
8
8
|
* Maximum height of the element. This automatically makes the content of the element scrollable.
|
|
9
9
|
*/
|
|
10
10
|
maxHeight?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Function that is executed when the element will be scrolled
|
|
13
|
+
*/
|
|
14
|
+
onScroll?: (event: UIEvent<HTMLDivElement>) => void;
|
|
11
15
|
};
|
|
12
16
|
declare const AccordionContent: FC<AccordionContentProps>;
|
|
13
17
|
export default AccordionContent;
|
|
@@ -11,7 +11,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
11
11
|
const AccordionContent = _ref => {
|
|
12
12
|
let {
|
|
13
13
|
children,
|
|
14
|
-
maxHeight
|
|
14
|
+
maxHeight,
|
|
15
|
+
onScroll
|
|
15
16
|
} = _ref;
|
|
16
17
|
return /*#__PURE__*/_react.default.createElement(_Accordion.AccordionContext.Consumer, null, _ref2 => {
|
|
17
18
|
let {
|
|
@@ -20,7 +21,8 @@ const AccordionContent = _ref => {
|
|
|
20
21
|
return /*#__PURE__*/_react.default.createElement(_AccordionContent.StyledAccordionContent, {
|
|
21
22
|
className: "beta-chayns-accordion-content",
|
|
22
23
|
isWrapped: isWrapped,
|
|
23
|
-
maxHeight: maxHeight
|
|
24
|
+
maxHeight: maxHeight,
|
|
25
|
+
onScroll: onScroll
|
|
24
26
|
}, children);
|
|
25
27
|
});
|
|
26
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionContent.js","names":["AccordionContent","children","maxHeight","isWrapped","displayName"],"sources":["../../../../src/components/accordion/accordion-content/AccordionContent.tsx"],"sourcesContent":["import React, { FC, ReactNode } from 'react';\nimport { AccordionContext } from '../Accordion';\nimport { StyledAccordionContent } from './AccordionContent.styles';\n\nexport type AccordionContentProps = {\n /**\n * The content of the accordion content element\n */\n children: ReactNode;\n /**\n * Maximum height of the element. This automatically makes the content of the element scrollable.\n */\n maxHeight?: number;\n};\n\nconst AccordionContent: FC<AccordionContentProps> = ({ children, maxHeight }) => (\n <AccordionContext.Consumer>\n {({ isWrapped }) => (\n <StyledAccordionContent\n className=\"beta-chayns-accordion-content\"\n isWrapped={isWrapped}\n maxHeight={maxHeight}\n >\n {children}\n </StyledAccordionContent>\n )}\n </AccordionContext.Consumer>\n);\n\nAccordionContent.displayName = 'AccordionContent';\n\nexport default AccordionContent;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAmE;
|
|
1
|
+
{"version":3,"file":"AccordionContent.js","names":["AccordionContent","children","maxHeight","onScroll","isWrapped","displayName"],"sources":["../../../../src/components/accordion/accordion-content/AccordionContent.tsx"],"sourcesContent":["import React, { FC, ReactNode, UIEvent } from 'react';\nimport { AccordionContext } from '../Accordion';\nimport { StyledAccordionContent } from './AccordionContent.styles';\n\nexport type AccordionContentProps = {\n /**\n * The content of the accordion content element\n */\n children: ReactNode;\n /**\n * Maximum height of the element. This automatically makes the content of the element scrollable.\n */\n maxHeight?: number;\n /**\n * Function that is executed when the element will be scrolled\n */\n onScroll?: (event: UIEvent<HTMLDivElement>) => void;\n};\n\nconst AccordionContent: FC<AccordionContentProps> = ({ children, maxHeight, onScroll }) => (\n <AccordionContext.Consumer>\n {({ isWrapped }) => (\n <StyledAccordionContent\n className=\"beta-chayns-accordion-content\"\n isWrapped={isWrapped}\n maxHeight={maxHeight}\n onScroll={onScroll}\n >\n {children}\n </StyledAccordionContent>\n )}\n </AccordionContext.Consumer>\n);\n\nAccordionContent.displayName = 'AccordionContent';\n\nexport default AccordionContent;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAmE;AAiBnE,MAAMA,gBAA2C,GAAG;EAAA,IAAC;IAAEC,QAAQ;IAAEC,SAAS;IAAEC;EAAS,CAAC;EAAA,oBAClF,6BAAC,2BAAgB,CAAC,QAAQ,QACrB;IAAA,IAAC;MAAEC;IAAU,CAAC;IAAA,oBACX,6BAAC,wCAAsB;MACnB,SAAS,EAAC,+BAA+B;MACzC,SAAS,EAAEA,SAAU;MACrB,SAAS,EAAEF,SAAU;MACrB,QAAQ,EAAEC;IAAS,GAElBF,QAAQ,CACY;EAAA,CAC5B,CACuB;AAAA,CAC/B;AAEDD,gBAAgB,CAACK,WAAW,GAAG,kBAAkB;AAAC,eAEnCL,gBAAgB;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
type IUpdateOpenAccordionUuid = (uuid: string, options?: {
|
|
3
3
|
shouldOnlyOpen?: boolean;
|
|
4
4
|
}) => void;
|
|
5
5
|
interface IAccordionGroupContext {
|
|
@@ -7,7 +7,7 @@ interface IAccordionGroupContext {
|
|
|
7
7
|
updateOpenAccordionUuid?: IUpdateOpenAccordionUuid;
|
|
8
8
|
}
|
|
9
9
|
export declare const AccordionGroupContext: React.Context<IAccordionGroupContext>;
|
|
10
|
-
|
|
10
|
+
type AccordionGroupProps = {
|
|
11
11
|
/**
|
|
12
12
|
* The Accordions that should be grouped. Accordions with the same group are
|
|
13
13
|
* automatically closed when an `Accordion` of the group is opened.
|
|
@@ -4,7 +4,7 @@ declare enum ColorMode {
|
|
|
4
4
|
Dark = 1,
|
|
5
5
|
Light = 2
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type ColorSchemeProviderProps = {
|
|
8
8
|
/**
|
|
9
9
|
* The content of the application or the components for which the styles should be set
|
|
10
10
|
*/
|
|
@@ -37,7 +37,7 @@ declare type ColorSchemeProviderProps = {
|
|
|
37
37
|
export interface Theme {
|
|
38
38
|
[key: string]: string;
|
|
39
39
|
}
|
|
40
|
-
export
|
|
40
|
+
export type WithTheme<T> = T & {
|
|
41
41
|
theme: Theme;
|
|
42
42
|
};
|
|
43
43
|
declare const ColorSchemeProvider: FC<ColorSchemeProviderProps>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React, { MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { ContextMenuAlignment } from './constants/alignment';
|
|
3
|
-
export
|
|
3
|
+
export type ContextMenuCoordinates = {
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type ContextMenuItem = {
|
|
8
8
|
icons: string[];
|
|
9
9
|
key: string;
|
|
10
10
|
onClick: (event?: MouseEvent<HTMLDivElement>) => void;
|
|
11
11
|
text: string;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type ContextMenuRef = {
|
|
14
14
|
hide: VoidFunction;
|
|
15
15
|
show: VoidFunction;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type ContextMenuProps = {
|
|
18
18
|
/**
|
|
19
19
|
* Optional custom alignment used instead of calculating it using the
|
|
20
20
|
* alignment within the page. The available alignment can be taken from the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ContextMenuAlignment } from '../constants/alignment';
|
|
3
3
|
import type { ContextMenuCoordinates, ContextMenuItem } from '../ContextMenu';
|
|
4
|
-
|
|
4
|
+
type ContextMenuContentProps = {
|
|
5
5
|
alignment: ContextMenuAlignment;
|
|
6
6
|
coordinates: ContextMenuCoordinates;
|
|
7
7
|
items: ContextMenuItem[];
|
|
@@ -4,17 +4,17 @@ export declare const StyledGridImage: import("styled-components").StyledComponen
|
|
|
4
4
|
} & {
|
|
5
5
|
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
6
6
|
}, never>;
|
|
7
|
-
|
|
7
|
+
type StyledGridLeftImageProps = {
|
|
8
8
|
isHidden: boolean;
|
|
9
9
|
size: number;
|
|
10
10
|
};
|
|
11
11
|
export declare const StyledGridLeftImage: import("styled-components").StyledComponent<"img", any, StyledGridLeftImageProps, never>;
|
|
12
|
-
|
|
12
|
+
type StyledGridTopRightImageProps = {
|
|
13
13
|
isHidden: boolean;
|
|
14
14
|
size: number;
|
|
15
15
|
};
|
|
16
16
|
export declare const StyledGridTopRightImage: import("styled-components").StyledComponent<"img", any, StyledGridTopRightImageProps, never>;
|
|
17
|
-
|
|
17
|
+
type StyledGridBottomRightImageProps = {
|
|
18
18
|
isHidden: boolean;
|
|
19
19
|
};
|
|
20
20
|
export declare const StyledGridBottomRightImage: import("styled-components").StyledComponent<"img", any, StyledGridBottomRightImageProps, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, MouseEventHandler, ReactNode, TouchEventHandler } from 'react';
|
|
2
|
-
|
|
2
|
+
type ListItemProps = {
|
|
3
3
|
/**
|
|
4
4
|
* The content of the `ListItem` body. When the `ListItem` has children,
|
|
5
5
|
* it can be opened and also gets an icon as an indicator automatically.
|
|
@@ -4,7 +4,7 @@ export declare const StyledListItemHead: import("styled-components").StyledCompo
|
|
|
4
4
|
theme: import("../../../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
5
5
|
}, never>;
|
|
6
6
|
export declare const StyledMotionListItemHeadIndicator: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
|
|
7
|
-
|
|
7
|
+
type StyledListItemHeadContentProps = {
|
|
8
8
|
isIconOrImageGiven: boolean;
|
|
9
9
|
isOpen: boolean;
|
|
10
10
|
};
|
package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const StyledListItemHeadImageWrapper: import("styled-components")
|
|
|
3
3
|
} & {
|
|
4
4
|
theme: import("../../../../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
5
5
|
}, never>;
|
|
6
|
-
|
|
6
|
+
type StyledListItemHeadImageProps = {
|
|
7
7
|
isHidden: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare const StyledListItemHeadImage: import("styled-components").StyledComponent<"img", any, StyledListItemHeadImageProps, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.47",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chayns",
|
|
@@ -34,26 +34,26 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/cli": "^7.19.3",
|
|
37
|
-
"@babel/core": "^7.
|
|
38
|
-
"@babel/preset-env": "^7.
|
|
37
|
+
"@babel/core": "^7.20.5",
|
|
38
|
+
"@babel/preset-env": "^7.20.2",
|
|
39
39
|
"@babel/preset-react": "^7.18.6",
|
|
40
40
|
"@babel/preset-typescript": "^7.18.6",
|
|
41
|
-
"@types/react": "^17.0.
|
|
42
|
-
"@types/react-dom": "^17.0.
|
|
41
|
+
"@types/react": "^17.0.52",
|
|
42
|
+
"@types/react-dom": "^17.0.18",
|
|
43
43
|
"@types/styled-components": "^5.1.26",
|
|
44
|
-
"@types/uuid": "^
|
|
45
|
-
"babel-loader": "^8.
|
|
44
|
+
"@types/uuid": "^9.0.0",
|
|
45
|
+
"babel-loader": "^8.3.0",
|
|
46
46
|
"lerna": "^4.0.0",
|
|
47
47
|
"react": "^17.0.2",
|
|
48
48
|
"react-dom": "^17.0.2",
|
|
49
|
-
"typescript": "^4.
|
|
49
|
+
"typescript": "^4.9.4"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@chayns/colors": "^2.0.0",
|
|
53
53
|
"clsx": "^1.2.1",
|
|
54
54
|
"framer-motion": "^6.5.1",
|
|
55
55
|
"styled-components": "^5.3.6",
|
|
56
|
-
"uuid": "^
|
|
56
|
+
"uuid": "^9.0.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"react": ">=16.14.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "0d986ac20ab799e45608c68892592d1c83038a8b"
|
|
66
66
|
}
|