@chayns-components/core 5.0.0-beta.772 → 5.0.0-beta.775
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/cjs/components/color-scheme-provider/ColorSchemeProvider.js +1 -0
- package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/cjs/components/context-menu/ContextMenu.js +2 -2
- package/lib/cjs/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/cjs/components/filter-buttons/FilterButtons.js +2 -1
- package/lib/cjs/components/filter-buttons/FilterButtons.js.map +1 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.js +20 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.js.map +1 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.js +24 -2
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.js.map +1 -1
- package/lib/cjs/components/page-provider/PageProvider.js +67 -0
- package/lib/cjs/components/page-provider/PageProvider.js.map +1 -0
- package/lib/cjs/components/page-provider/PageProvider.styles.js +34 -0
- package/lib/cjs/components/page-provider/PageProvider.styles.js.map +1 -0
- package/lib/cjs/components/popup/Popup.js +1 -1
- package/lib/cjs/components/popup/Popup.js.map +1 -1
- package/lib/cjs/constants/pageProvider.js +16 -0
- package/lib/cjs/constants/pageProvider.js.map +1 -0
- package/lib/cjs/index.js +14 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/types/list.js.map +1 -1
- package/lib/cjs/utils/pageProvider.js +92 -0
- package/lib/cjs/utils/pageProvider.js.map +1 -0
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js +1 -0
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/esm/components/context-menu/ContextMenu.js +2 -2
- package/lib/esm/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/esm/components/filter-buttons/FilterButtons.js +2 -1
- package/lib/esm/components/filter-buttons/FilterButtons.js.map +1 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.js +21 -2
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.js.map +1 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.js +29 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.js.map +1 -1
- package/lib/esm/components/page-provider/PageProvider.js +59 -0
- package/lib/esm/components/page-provider/PageProvider.js.map +1 -0
- package/lib/esm/components/page-provider/PageProvider.styles.js +33 -0
- package/lib/esm/components/page-provider/PageProvider.styles.js.map +1 -0
- package/lib/esm/components/popup/Popup.js +1 -1
- package/lib/esm/components/popup/Popup.js.map +1 -1
- package/lib/esm/constants/pageProvider.js +10 -0
- package/lib/esm/constants/pageProvider.js.map +1 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/types/list.js.map +1 -1
- package/lib/esm/utils/pageProvider.js +84 -0
- package/lib/esm/utils/pageProvider.js.map +1 -0
- package/lib/types/components/accordion/Accordion.styles.d.ts +1 -1
- package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +1 -1
- package/lib/types/components/accordion/accordion-head/AccordionHead.styles.d.ts +10 -10
- package/lib/types/components/amount-control/AmountControl.styles.d.ts +1 -1
- package/lib/types/components/button/Button.styles.d.ts +3 -3
- package/lib/types/components/color-scheme-provider/ColorSchemeProvider.d.ts +1 -1
- package/lib/types/components/combobox/ComboBox.styles.d.ts +1 -1
- package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +1 -1
- package/lib/types/components/expandable-content/ExpandableContent.styles.d.ts +1 -1
- package/lib/types/components/file-input/FileInput.styles.d.ts +1 -1
- package/lib/types/components/filter-buttons/filter-button/FilterButton.styles.d.ts +1 -1
- package/lib/types/components/input/Input.styles.d.ts +3 -3
- package/lib/types/components/list/list-item/ListItem.styles.d.ts +1 -1
- package/lib/types/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +1 -1
- package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +4 -4
- package/lib/types/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.d.ts +11 -2
- package/lib/types/components/mention-finder/MentionFinder.styles.d.ts +1 -1
- package/lib/types/components/page-provider/PageProvider.d.ts +14 -0
- package/lib/types/components/page-provider/PageProvider.styles.d.ts +7 -0
- package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +1 -1
- package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +1 -1
- package/lib/types/components/radio-button/RadioButton.styles.d.ts +1 -1
- package/lib/types/components/search-box/SearchBox.styles.d.ts +1 -1
- package/lib/types/components/search-box/search-box-body/SearchBoxBody.styles.d.ts +1 -1
- package/lib/types/components/search-input/SearchInput.styles.d.ts +2 -2
- package/lib/types/components/slider/Slider.styles.d.ts +2 -2
- package/lib/types/components/slider-button/SliderButton.styles.d.ts +1 -1
- package/lib/types/components/truncation/Truncation.styles.d.ts +1 -1
- package/lib/types/constants/pageProvider.d.ts +6 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/types/list.d.ts +3 -1
- package/lib/types/utils/pageProvider.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemRightElements.js","names":["React","isValidElement","useMemo","StyledListItemRightElements","StyledListItemRightElementsLeft","StyledListItemRightElementsLeftBottom","StyledListItemRightElementsLeftTop","StyledListItemRightElementsRight","ListItemRightElements","_ref","rightElements","topElement","top","undefined","bottomElement","bottom","centerElement","center","createElement","displayName"],"sources":["../../../../../../../src/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.tsx"],"sourcesContent":["import React, { FC, isValidElement, useMemo } from 'react';\nimport type { IListItemRightElement, IListItemRightElements } from '../../../../../types/list';\nimport {\n StyledListItemRightElements,\n StyledListItemRightElementsLeft,\n StyledListItemRightElementsLeftBottom,\n StyledListItemRightElementsLeftTop,\n StyledListItemRightElementsRight,\n} from './ListItemRightElements.styles';\n\ntype ListItemRightElementsProps = {\n rightElements?: IListItemRightElements;\n};\n\nconst ListItemRightElements: FC<ListItemRightElementsProps> = ({ rightElements }) => {\n const topElement = useMemo(() => {\n if (typeof rightElements === 'object' && rightElements && 'top' in rightElements) {\n return (rightElements as unknown as IListItemRightElement).top;\n }\n\n return undefined;\n }, [rightElements]);\n\n const bottomElement = useMemo(() => {\n if (typeof rightElements === 'object' && rightElements && 'bottom' in rightElements) {\n return (rightElements as unknown as IListItemRightElement).bottom;\n }\n\n return undefined;\n }, [rightElements]);\n\n const centerElement = useMemo(() => {\n if (typeof rightElements === 'string' || isValidElement(rightElements)) {\n return rightElements;\n }\n\n if (typeof rightElements === 'object' && rightElements && 'center' in rightElements) {\n return (rightElements as unknown as IListItemRightElement).center;\n }\n\n return undefined;\n }, [rightElements]);\n\n return (\n <StyledListItemRightElements>\n {(topElement || bottomElement) && (\n <StyledListItemRightElementsLeft>\n {topElement
|
|
1
|
+
{"version":3,"file":"ListItemRightElements.js","names":["React","isValidElement","useMemo","StyledListItemRightElements","StyledListItemRightElementsLeft","StyledListItemRightElementsLeftBottom","StyledListItemRightElementsLeftPseudo","StyledListItemRightElementsLeftTop","StyledListItemRightElementsRight","ListItemRightElements","_ref","rightElements","topElement","top","undefined","bottomElement","bottom","centerElement","center","topAlignment","bottomAlignment","createElement","$alignment","displayName"],"sources":["../../../../../../../src/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.tsx"],"sourcesContent":["import React, { FC, isValidElement, useMemo } from 'react';\nimport type { IListItemRightElement, IListItemRightElements } from '../../../../../types/list';\nimport {\n StyledListItemRightElements,\n StyledListItemRightElementsLeft,\n StyledListItemRightElementsLeftBottom,\n StyledListItemRightElementsLeftPseudo,\n StyledListItemRightElementsLeftTop,\n StyledListItemRightElementsRight,\n} from './ListItemRightElements.styles';\n\ntype ListItemRightElementsProps = {\n rightElements?: IListItemRightElements;\n};\n\nconst ListItemRightElements: FC<ListItemRightElementsProps> = ({ rightElements }) => {\n const topElement = useMemo(() => {\n if (typeof rightElements === 'object' && rightElements && 'top' in rightElements) {\n return (rightElements as unknown as IListItemRightElement).top;\n }\n\n return undefined;\n }, [rightElements]);\n\n const bottomElement = useMemo(() => {\n if (typeof rightElements === 'object' && rightElements && 'bottom' in rightElements) {\n return (rightElements as unknown as IListItemRightElement).bottom;\n }\n\n return undefined;\n }, [rightElements]);\n\n const centerElement = useMemo(() => {\n if (typeof rightElements === 'string' || isValidElement(rightElements)) {\n return rightElements;\n }\n\n if (typeof rightElements === 'object' && rightElements && 'center' in rightElements) {\n return (rightElements as unknown as IListItemRightElement).center;\n }\n\n return undefined;\n }, [rightElements]);\n\n const { topAlignment, bottomAlignment } = useMemo(() => {\n if (\n typeof rightElements === 'object' &&\n ((rightElements && 'topAlignment' in rightElements) ||\n (rightElements && 'bottomAlignment' in rightElements))\n ) {\n return {\n topAlignment: rightElements.topAlignment,\n bottomAlignment: rightElements.bottomAlignment,\n };\n }\n\n return { topAlignment: undefined, bottomAlignment: undefined };\n }, [rightElements]);\n\n return (\n <StyledListItemRightElements>\n {(topElement || bottomElement) && (\n <StyledListItemRightElementsLeft>\n {topElement ? (\n <StyledListItemRightElementsLeftTop $alignment={topAlignment}>\n {topElement}\n </StyledListItemRightElementsLeftTop>\n ) : (\n <StyledListItemRightElementsLeftPseudo>\n .\n </StyledListItemRightElementsLeftPseudo>\n )}\n {bottomElement && (\n <StyledListItemRightElementsLeftBottom $alignment={bottomAlignment}>\n {bottomElement}\n </StyledListItemRightElementsLeftBottom>\n )}\n </StyledListItemRightElementsLeft>\n )}\n {centerElement && (\n <StyledListItemRightElementsRight>{centerElement}</StyledListItemRightElementsRight>\n )}\n </StyledListItemRightElements>\n );\n};\n\nListItemRightElements.displayName = 'ListItemRightElements';\n\nexport default ListItemRightElements;\n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aAAa,IAAI,iBAAiB,IAAIA,aAAc,CAAC,EAC5D;MACE,OAAO;QACHQ,YAAY,EAAER,aAAa,CAACQ,YAAY;QACxCC,eAAe,EAAET,aAAa,CAACS;MACnC,CAAC;IACL;IAEA,OAAO;MAAED,YAAY,EAAEL,SAAS;MAAEM,eAAe,EAAEN;IAAU,CAAC;EAClE,CAAC,EAAE,CAACH,aAAa,CAAC,CAAC;EAEnB,oBACIX,KAAA,CAAAqB,aAAA,CAAClB,2BAA2B,QACvB,CAACS,UAAU,IAAIG,aAAa,kBACzBf,KAAA,CAAAqB,aAAA,CAACjB,+BAA+B,QAC3BQ,UAAU,gBACPZ,KAAA,CAAAqB,aAAA,CAACd,kCAAkC;IAACe,UAAU,EAAEH;EAAa,GACxDP,UAC+B,CAAC,gBAErCZ,KAAA,CAAAqB,aAAA,CAACf,qCAAqC,QAAC,GAEA,CAC1C,EACAS,aAAa,iBACVf,KAAA,CAAAqB,aAAA,CAAChB,qCAAqC;IAACiB,UAAU,EAAEF;EAAgB,GAC9DL,aACkC,CAEd,CACpC,EACAE,aAAa,iBACVjB,KAAA,CAAAqB,aAAA,CAACb,gCAAgC,QAAES,aAAgD,CAE9D,CAAC;AAEtC,CAAC;AAEDR,qBAAqB,CAACc,WAAW,GAAG,uBAAuB;AAE3D,eAAed,qBAAqB","ignoreList":[]}
|
|
@@ -8,21 +8,49 @@ export const StyledListItemRightElements = styled.div`
|
|
|
8
8
|
export const StyledListItemRightElementsLeft = styled.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
|
-
|
|
11
|
+
height: 100%;
|
|
12
|
+
`;
|
|
13
|
+
export const StyledListItemRightElementsLeftPseudo = styled.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
flex: 0 0 auto;
|
|
16
|
+
font-size: 85%;
|
|
17
|
+
color: transparent;
|
|
18
|
+
height: 50%;
|
|
19
|
+
line-height: normal;
|
|
20
|
+
user-select: none;
|
|
12
21
|
`;
|
|
13
22
|
export const StyledListItemRightElementsLeftTop = styled.div`
|
|
14
23
|
display: flex;
|
|
15
24
|
flex: 0 0 auto;
|
|
16
25
|
font-size: 85%;
|
|
26
|
+
height: 50%;
|
|
27
|
+
justify-content: ${_ref => {
|
|
28
|
+
let {
|
|
29
|
+
$alignment
|
|
30
|
+
} = _ref;
|
|
31
|
+
return $alignment ?? 'end';
|
|
32
|
+
}};
|
|
33
|
+
align-items: center;
|
|
34
|
+
line-height: normal;
|
|
17
35
|
`;
|
|
18
36
|
export const StyledListItemRightElementsLeftBottom = styled.div`
|
|
19
37
|
display: flex;
|
|
20
38
|
flex: 0 0 auto;
|
|
21
39
|
font-size: 85%;
|
|
40
|
+
height: 50%;
|
|
41
|
+
justify-content: ${_ref2 => {
|
|
42
|
+
let {
|
|
43
|
+
$alignment
|
|
44
|
+
} = _ref2;
|
|
45
|
+
return $alignment ?? 'end';
|
|
46
|
+
}};
|
|
47
|
+
align-items: center;
|
|
48
|
+
line-height: normal;
|
|
22
49
|
`;
|
|
23
50
|
export const StyledListItemRightElementsRight = styled.div`
|
|
24
51
|
margin: auto 0;
|
|
25
52
|
display: flex;
|
|
26
53
|
flex: 0 0 auto;
|
|
54
|
+
line-height: normal;
|
|
27
55
|
`;
|
|
28
56
|
//# sourceMappingURL=ListItemRightElements.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemRightElements.styles.js","names":["styled","StyledListItemRightElements","div","StyledListItemRightElementsLeft","StyledListItemRightElementsLeftTop","StyledListItemRightElementsLeftBottom","StyledListItemRightElementsRight"],"sources":["../../../../../../../src/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledListItemRightElements = styled.div`\n display: flex;\n align-items: start;\n gap: 6px;\n margin-left: 8px;\n`;\n\nexport const StyledListItemRightElementsLeft = styled.div`\n display: flex;\n flex-direction: column;\n
|
|
1
|
+
{"version":3,"file":"ListItemRightElements.styles.js","names":["styled","StyledListItemRightElements","div","StyledListItemRightElementsLeft","StyledListItemRightElementsLeftPseudo","StyledListItemRightElementsLeftTop","_ref","$alignment","StyledListItemRightElementsLeftBottom","_ref2","StyledListItemRightElementsRight"],"sources":["../../../../../../../src/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport styled from 'styled-components';\n\nexport const StyledListItemRightElements = styled.div`\n display: flex;\n align-items: start;\n gap: 6px;\n margin-left: 8px;\n`;\n\nexport const StyledListItemRightElementsLeft = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n`;\n\nexport const StyledListItemRightElementsLeftPseudo = styled.div`\n display: flex;\n flex: 0 0 auto;\n font-size: 85%;\n color: transparent;\n height: 50%;\n line-height: normal;\n user-select: none;\n`;\n\ntype StyledListItemRightElementsLeftTopProps = {\n $alignment?: CSSProperties['justifyContent'];\n};\n\nexport const StyledListItemRightElementsLeftTop = styled.div<StyledListItemRightElementsLeftTopProps>`\n display: flex;\n flex: 0 0 auto;\n font-size: 85%;\n height: 50%;\n justify-content: ${({ $alignment }) => $alignment ?? 'end'};\n align-items: center;\n line-height: normal;\n`;\n\ntype StyledListItemRightElementsLeftBottomProps = {\n $alignment?: CSSProperties['justifyContent'];\n};\n\nexport const StyledListItemRightElementsLeftBottom = styled.div<StyledListItemRightElementsLeftBottomProps>`\n display: flex;\n flex: 0 0 auto;\n font-size: 85%;\n height: 50%;\n justify-content: ${({ $alignment }) => $alignment ?? 'end'};\n align-items: center;\n line-height: normal;\n`;\n\nexport const StyledListItemRightElementsRight = styled.div`\n margin: auto 0;\n display: flex;\n flex: 0 0 auto;\n line-height: normal;\n`;\n"],"mappings":"AACA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,2BAA2B,GAAGD,MAAM,CAACE,GAAG;AACrD;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,+BAA+B,GAAGH,MAAM,CAACE,GAAG;AACzD;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAME,qCAAqC,GAAGJ,MAAM,CAACE,GAAG;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAMD,OAAO,MAAMG,kCAAkC,GAAGL,MAAM,CAACE,GAA4C;AACrG;AACA;AACA;AACA;AACA,uBAAuBI,IAAA;EAAA,IAAC;IAAEC;EAAW,CAAC,GAAAD,IAAA;EAAA,OAAKC,UAAU,IAAI,KAAK;AAAA;AAC9D;AACA;AACA,CAAC;AAMD,OAAO,MAAMC,qCAAqC,GAAGR,MAAM,CAACE,GAA+C;AAC3G;AACA;AACA;AACA;AACA,uBAAuBO,KAAA;EAAA,IAAC;IAAEF;EAAW,CAAC,GAAAE,KAAA;EAAA,OAAKF,UAAU,IAAI,KAAK;AAAA;AAC9D;AACA;AACA,CAAC;AAED,OAAO,MAAMG,gCAAgC,GAAGV,MAAM,CAACE,GAAG;AAC1D;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { createGlobalStyle } from 'styled-components';
|
|
3
|
+
import { getPagePadding, getUsableHeight } from '../../utils/pageProvider';
|
|
4
|
+
import ColorSchemeProvider from '../color-scheme-provider/ColorSchemeProvider';
|
|
5
|
+
import { StyledPageProvider } from './PageProvider.styles';
|
|
6
|
+
const GlobalStyle = createGlobalStyle`
|
|
7
|
+
*, *::before, *::after {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
const PageProvider = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
children,
|
|
14
|
+
color,
|
|
15
|
+
colorMode,
|
|
16
|
+
cssVariables = {},
|
|
17
|
+
secondaryColor,
|
|
18
|
+
siteId,
|
|
19
|
+
style = {},
|
|
20
|
+
designSettings,
|
|
21
|
+
shouldRemovePadding,
|
|
22
|
+
shouldUseUsableHeight
|
|
23
|
+
} = _ref;
|
|
24
|
+
const [usableHeight, setUsableHeight] = useState(0);
|
|
25
|
+
const [padding, setPadding] = useState();
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
const fetchUsableHeight = async () => {
|
|
28
|
+
const height = await getUsableHeight();
|
|
29
|
+
setUsableHeight(height);
|
|
30
|
+
};
|
|
31
|
+
void fetchUsableHeight();
|
|
32
|
+
}, []);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const handleResize = () => {
|
|
35
|
+
setPadding(getPagePadding());
|
|
36
|
+
};
|
|
37
|
+
setPadding(getPagePadding());
|
|
38
|
+
window.addEventListener('resize', handleResize);
|
|
39
|
+
return () => {
|
|
40
|
+
window.removeEventListener('resize', handleResize);
|
|
41
|
+
};
|
|
42
|
+
}, [padding]);
|
|
43
|
+
return /*#__PURE__*/React.createElement(StyledPageProvider, {
|
|
44
|
+
className: "page-provider",
|
|
45
|
+
$padding: shouldRemovePadding ? 0 : padding,
|
|
46
|
+
$usableHeight: shouldUseUsableHeight ? usableHeight : undefined
|
|
47
|
+
}, /*#__PURE__*/React.createElement(ColorSchemeProvider, {
|
|
48
|
+
color: color,
|
|
49
|
+
secondaryColor: secondaryColor,
|
|
50
|
+
colorMode: colorMode,
|
|
51
|
+
style: style,
|
|
52
|
+
siteId: siteId,
|
|
53
|
+
designSettings: designSettings,
|
|
54
|
+
cssVariables: cssVariables
|
|
55
|
+
}, children), /*#__PURE__*/React.createElement(GlobalStyle, null));
|
|
56
|
+
};
|
|
57
|
+
PageProvider.displayName = 'PageProvider';
|
|
58
|
+
export default PageProvider;
|
|
59
|
+
//# sourceMappingURL=PageProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageProvider.js","names":["React","useEffect","useState","createGlobalStyle","getPagePadding","getUsableHeight","ColorSchemeProvider","StyledPageProvider","GlobalStyle","PageProvider","_ref","children","color","colorMode","cssVariables","secondaryColor","siteId","style","designSettings","shouldRemovePadding","shouldUseUsableHeight","usableHeight","setUsableHeight","padding","setPadding","fetchUsableHeight","height","handleResize","window","addEventListener","removeEventListener","createElement","className","$padding","$usableHeight","undefined","displayName"],"sources":["../../../../src/components/page-provider/PageProvider.tsx"],"sourcesContent":["import React, { FC, useEffect, useState, type CSSProperties } from 'react';\nimport { createGlobalStyle } from 'styled-components';\nimport { getPagePadding, getUsableHeight } from '../../utils/pageProvider';\nimport ColorSchemeProvider, {\n type ColorSchemeProviderProps,\n} from '../color-scheme-provider/ColorSchemeProvider';\nimport { StyledPageProvider } from './PageProvider.styles';\n\ninterface PageProviderProps extends ColorSchemeProviderProps {\n /**\n * Whether the padding should be removed.\n */\n shouldRemovePadding?: boolean;\n /**\n * Whether the usable height should be used.\n */\n shouldUseUsableHeight?: boolean;\n}\n\nconst GlobalStyle = createGlobalStyle`\n *, *::before, *::after {\n box-sizing: border-box;\n }\n`;\n\nconst PageProvider: FC<PageProviderProps> = ({\n children,\n color,\n colorMode,\n cssVariables = {},\n secondaryColor,\n siteId,\n style = {},\n designSettings,\n shouldRemovePadding,\n shouldUseUsableHeight,\n}) => {\n const [usableHeight, setUsableHeight] = useState(0);\n const [padding, setPadding] = useState<CSSProperties['padding']>();\n\n useEffect(() => {\n const fetchUsableHeight = async () => {\n const height = await getUsableHeight();\n setUsableHeight(height);\n };\n\n void fetchUsableHeight();\n }, []);\n\n useEffect(() => {\n const handleResize = () => {\n setPadding(getPagePadding());\n };\n\n setPadding(getPagePadding());\n\n window.addEventListener('resize', handleResize);\n\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, [padding]);\n\n return (\n <StyledPageProvider\n className=\"page-provider\"\n $padding={shouldRemovePadding ? 0 : padding}\n $usableHeight={shouldUseUsableHeight ? usableHeight : undefined}\n >\n <ColorSchemeProvider\n color={color}\n secondaryColor={secondaryColor}\n colorMode={colorMode}\n style={style}\n siteId={siteId}\n designSettings={designSettings}\n cssVariables={cssVariables}\n >\n {children}\n </ColorSchemeProvider>\n <GlobalStyle />\n </StyledPage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BAAmB,CAAC,QAAQ,EAAEH,YAAY,CAAC;IACtD,CAAC;EACL,CAAC,EAAE,CAACJ,OAAO,CAAC,CAAC;EAEb,oBACIvB,KAAA,CAAA+B,aAAA,CAACxB,kBAAkB;IACfyB,SAAS,EAAC,eAAe;IACzBC,QAAQ,EAAEd,mBAAmB,GAAG,CAAC,GAAGI,OAAQ;IAC5CW,aAAa,EAAEd,qBAAqB,GAAGC,YAAY,GAAGc;EAAU,gBAEhEnC,KAAA,CAAA+B,aAAA,CAACzB,mBAAmB;IAChBM,KAAK,EAAEA,KAAM;IACbG,cAAc,EAAEA,cAAe;IAC/BF,SAAS,EAAEA,SAAU;IACrBI,KAAK,EAAEA,KAAM;IACbD,MAAM,EAAEA,MAAO;IACfE,cAAc,EAAEA,cAAe;IAC/BJ,YAAY,EAAEA;EAAa,GAE1BH,QACgB,CAAC,eACtBX,KAAA,CAAA+B,aAAA,CAACvB,WAAW,MAAE,CACE,CAAC;AAE7B,CAAC;AACDC,YAAY,CAAC2B,WAAW,GAAG,cAAc;AAEzC,eAAe3B,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const StyledPageProvider = styled.div`
|
|
3
|
+
padding: ${_ref => {
|
|
4
|
+
let {
|
|
5
|
+
$padding
|
|
6
|
+
} = _ref;
|
|
7
|
+
return $padding;
|
|
8
|
+
}};
|
|
9
|
+
height: ${_ref2 => {
|
|
10
|
+
let {
|
|
11
|
+
$usableHeight
|
|
12
|
+
} = _ref2;
|
|
13
|
+
return $usableHeight ? `${$usableHeight}px` : undefined;
|
|
14
|
+
}};
|
|
15
|
+
|
|
16
|
+
.color-scheme-provider:first-child:not(td) {
|
|
17
|
+
& > h1,
|
|
18
|
+
& > .h1,
|
|
19
|
+
& > h2,
|
|
20
|
+
& > .h2,
|
|
21
|
+
& > h3,
|
|
22
|
+
& > .h3,
|
|
23
|
+
& > h4,
|
|
24
|
+
& > .h4,
|
|
25
|
+
& > h5,
|
|
26
|
+
& > .h5 {
|
|
27
|
+
&:first-of-type:first-child {
|
|
28
|
+
margin-top: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
//# sourceMappingURL=PageProvider.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageProvider.styles.js","names":["styled","StyledPageProvider","div","_ref","$padding","_ref2","$usableHeight","undefined"],"sources":["../../../../src/components/page-provider/PageProvider.styles.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport styled from 'styled-components';\n\ntype StyledPageProviderProps = {\n $padding?: CSSProperties['padding'];\n $usableHeight?: CSSProperties['height'];\n};\n\nexport const StyledPageProvider = styled.div<StyledPageProviderProps>`\n padding: ${({ $padding }) => $padding};\n height: ${({ $usableHeight }) => ($usableHeight ? `${$usableHeight}px` : undefined)};\n\n .color-scheme-provider:first-child:not(td) {\n & > h1,\n & > .h1,\n & > h2,\n & > .h2,\n & > h3,\n & > .h3,\n & > h4,\n & > .h4,\n & > h5,\n & > .h5 {\n &:first-of-type:first-child {\n margin-top: 0;\n }\n }\n }\n`;\n"],"mappings":"AACA,OAAOA,MAAM,MAAM,mBAAmB;AAOtC,OAAO,MAAMC,kBAAkB,GAAGD,MAAM,CAACE,GAA4B;AACrE,eAAeC,IAAA;EAAA,IAAC;IAAEC;EAAS,CAAC,GAAAD,IAAA;EAAA,OAAKC,QAAQ;AAAA;AACzC,cAAcC,KAAA;EAAA,IAAC;IAAEC;EAAc,CAAC,GAAAD,KAAA;EAAA,OAAMC,aAAa,GAAG,GAAGA,aAAa,IAAI,GAAGC,SAAS;AAAA,CAAC;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -11,7 +11,7 @@ const Popup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
11
11
|
let {
|
|
12
12
|
content,
|
|
13
13
|
onShow,
|
|
14
|
-
container = document.querySelector('.
|
|
14
|
+
container = document.querySelector('.page-provider') || document.body,
|
|
15
15
|
onHide,
|
|
16
16
|
children,
|
|
17
17
|
shouldShowOnHover = false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.js","names":["getWindowMetrics","AnimatePresence","React","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","useState","createPortal","useUuid","PopupAlignment","AreaContextProvider","PopupContentWrapper","StyledPopup","StyledPopupPseudo","Popup","_ref","ref","content","onShow","container","document","querySelector","body","onHide","children","shouldShowOnHover","yOffset","coordinates","setCoordinates","x","y","alignment","setAlignment","TopLeft","offset","setOffset","isOpen","setIsOpen","portal","setPortal","menuHeight","setMenuHeight","pseudoSize","setPseudoSize","timeout","uuid","popupContentRef","popupPseudoContentRef","popupRef","current","height","width","getBoundingClientRect","handleShow","pseudoHeight","pseudoWidth","childrenHeight","left","childrenLeft","top","childrenTop","childrenWidth","isRight","BottomRight","BottomLeft","newOffset","window","innerWidth","right","newX","TopRight","handleChildrenClick","handleHide","handleMouseEnter","clearTimeout","handleMouseLeave","setTimeout","handleDocumentClick","event","contains","target","preventDefault","stopPropagation","hide","show","then","result","topBarHeight","addEventListener","removeEventListener","createElement","initial","key","onMouseLeave","onMouseEnter","shouldChangeColor","Fragment","$menuHeight","onClick","displayName"],"sources":["../../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { getWindowMetrics } from 'chayns-api';\nimport { AnimatePresence } from 'framer-motion';\nimport React, {\n forwardRef,\n ReactNode,\n ReactPortal,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useUuid } from '../../hooks/uuid';\nimport { PopupAlignment, PopupCoordinates, PopupRef } from '../../types/popup';\nimport AreaContextProvider from '../area-provider/AreaContextProvider';\nimport PopupContentWrapper from './popup-content-wrapper/PopupContentWrapper';\nimport { StyledPopup, StyledPopupPseudo } from './Popup.styles';\n\nexport type PopupProps = {\n /**\n * The element over which the content of the `ContextMenu` should be displayed.\n */\n children?: ReactNode;\n /**\n * The element where the content of the `Popup` should be rendered via React Portal.\n */\n container?: Element;\n /**\n * The content that should be displayed inside the popup.\n */\n content: ReactNode;\n /**\n * Function to be executed when the content of the Context menu has been hidden.\n */\n onHide?: VoidFunction;\n /**\n * Function to be executed when the content of the Context menu has been shown.\n */\n onShow?: VoidFunction;\n /**\n * Whether the popup should be opened on hover. If not, the popup will be opened on click.\n */\n shouldShowOnHover?: boolean;\n /**\n * The Y offset of the popup to the children.\n */\n yOffset?: number;\n};\n\nconst Popup = forwardRef<PopupRef, PopupProps>(\n (\n {\n content,\n onShow,\n container = document.querySelector('.tapp') || document.body,\n onHide,\n children,\n shouldShowOnHover = false,\n yOffset = 0,\n },\n ref,\n ) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n\n const [alignment, setAlignment] = useState<PopupAlignment>(PopupAlignment.TopLeft);\n const [offset, setOffset] = useState<number>(0);\n const [isOpen, setIsOpen] = useState(false);\n const [portal, setPortal] = useState<ReactPortal>();\n const [menuHeight, setMenuHeight] = useState(0);\n\n const [pseudoSize, setPseudoSize] = useState<{ height: number; width: number }>();\n\n const timeout = useRef<number>();\n\n const uuid = useUuid();\n\n // ToDo: Replace with hook if new chayns api is ready\n\n const popupContentRef = useRef<HTMLDivElement>(null);\n const popupPseudoContentRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (popupPseudoContentRef.current) {\n const { height, width } = popupPseudoContentRef.current.getBoundingClientRect();\n\n setPseudoSize({ height, width });\n }\n }, []);\n\n const handleShow = useCallback(() => {\n if (popupRef.current && pseudoSize) {\n const { height: pseudoHeight, width: pseudoWidth } = pseudoSize;\n\n const {\n height: childrenHeight,\n left: childrenLeft,\n top: childrenTop,\n width: childrenWidth,\n } = popupRef.current.getBoundingClientRect();\n\n if (pseudoHeight > childrenTop - 25) {\n let isRight = false;\n\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.BottomRight);\n\n isRight = true;\n } else {\n setAlignment(PopupAlignment.BottomLeft);\n }\n\n const x = childrenLeft + childrenWidth / 2;\n const y = childrenTop + childrenHeight + yOffset;\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n x + pseudoWidth >= window.innerWidth\n ? x + pseudoWidth - window.innerWidth\n : 0;\n } else {\n newOffset = 0;\n\n const right = window.innerWidth - (childrenLeft + childrenWidth / 2);\n\n newOffset =\n right + pseudoWidth >= window.innerWidth\n ? right + pseudoWidth - window.innerWidth\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX < 23 ? 23 : newX,\n y: y - yOffset,\n });\n } else {\n let isRight = false;\n\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.TopRight);\n\n isRight = true;\n } else {\n setAlignment(PopupAlignment.TopLeft);\n }\n\n const x = childrenLeft + childrenWidth / 2;\n const y = childrenTop - yOffset;\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n x + pseudoWidth >= window.innerWidth\n ? x + pseudoWidth - window.innerWidth\n : 0;\n } else {\n newOffset = 0;\n\n const right = window.innerWidth - (childrenLeft + childrenWidth / 2);\n\n newOffset =\n right + pseudoWidth >= window.innerWidth\n ? right + pseudoWidth - window.innerWidth\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX < 23 ? 23 : newX,\n y: y - yOffset,\n });\n }\n\n setIsOpen(true);\n }\n }, [pseudoSize, yOffset]);\n\n const handleChildrenClick = () => {\n if (!shouldShowOnHover) {\n handleShow();\n }\n };\n\n const handleHide = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleMouseEnter = useCallback(() => {\n if (shouldShowOnHover) {\n window.clearTimeout(timeout.current);\n handleShow();\n }\n }, [handleShow, shouldShowOnHover]);\n\n const handleMouseLeave = useCallback(() => {\n if (!shouldShowOnHover) {\n return;\n }\n\n timeout.current = window.setTimeout(() => {\n handleHide();\n }, 500);\n }, [handleHide, shouldShowOnHover]);\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (\n !popupContentRef.current?.contains(event.target as Node) &&\n !shouldShowOnHover\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n handleHide();\n }\n },\n [handleHide, shouldShowOnHover],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow],\n );\n\n useEffect(() => {\n void getWindowMetrics().then((result) => {\n if (result.topBarHeight) {\n setMenuHeight(result.topBarHeight);\n }\n });\n }, []);\n\n useEffect(() => {\n if (isOpen) {\n document.addEventListener('click', handleDocumentClick, true);\n window.addEventListener('blur', handleHide);\n\n if (typeof onShow === 'function') {\n onShow();\n }\n } else if (typeof onHide === 'function') {\n onHide();\n }\n\n return () => {\n document.removeEventListener('click', handleDocumentClick, true);\n window.removeEventListener('blur', handleHide);\n };\n }, [handleDocumentClick, handleHide, isOpen, onHide, onShow]);\n\n useEffect(() => {\n setPortal(() =>\n createPortal(\n <AnimatePresence initial={false}>\n {isOpen && (\n <PopupContentWrapper\n offset={offset}\n coordinates={coordinates}\n key={`tooltip_${uuid}`}\n alignment={alignment}\n ref={popupContentRef}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n >\n <AreaContextProvider shouldChangeColor={false}>\n {content}\n </AreaContextProvider>\n </PopupContentWrapper>\n )}\n </AnimatePresence>,\n container,\n ),\n );\n }, [\n alignment,\n container,\n content,\n coordinates,\n handleMouseEnter,\n handleMouseLeave,\n isOpen,\n offset,\n uuid,\n ]);\n\n return (\n <>\n {!pseudoSize && (\n <StyledPopupPseudo ref={popupPseudoContentRef} $menuHeight={menuHeight}>\n {content}\n </StyledPopupPseudo>\n )}\n <StyledPopup\n ref={popupRef}\n onClick={handleChildrenClick}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n >\n {children}\n </StyledPopup>\n {portal}\n </>\n );\n },\n);\n\nPopup.displayName = 'Popup';\n\nexport default Popup;\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,eAAe,QAAQ,eAAe;AAC/C,OAAOC,KAAK,IACRC,UAAU,EAGVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,cAAc,QAAoC,mBAAmB;AAC9E,OAAOC,mBAAmB,MAAM,sCAAsC;AACtE,OAAOC,mBAAmB,MAAM,6CAA6C;AAC7E,SAASC,WAAW,EAAEC,iBAAiB,QAAQ,gBAAgB;AAiC/D,MAAMC,KAAK,gBAAGb,UAAU,CACpB,CAAAc,IAAA,EAUIC,GAAG,KACF;EAAA,IAVD;IACIC,OAAO;IACPC,MAAM;IACNC,SAAS,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC,IAAID,QAAQ,CAACE,IAAI;IAC5DC,MAAM;IACNC,QAAQ;IACRC,iBAAiB,GAAG,KAAK;IACzBC,OAAO,GAAG;EACd,CAAC,GAAAX,IAAA;EAGD,MAAM,CAACY,WAAW,EAAEC,cAAc,CAAC,GAAGtB,QAAQ,CAAmB;IAC7DuB,CAAC,EAAE,CAAC;IACJC,CAAC,EAAE;EACP,CAAC,CAAC;EAEF,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG1B,QAAQ,CAAiBG,cAAc,CAACwB,OAAO,CAAC;EAClF,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG7B,QAAQ,CAAS,CAAC,CAAC;EAC/C,MAAM,CAAC8B,MAAM,EAAEC,SAAS,CAAC,GAAG/B,QAAQ,CAAC,KAAK,CAAC;EAC3C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AA,QACK,CAACtD,UAAU,iBACR1C,KAAA,CAAA0F,aAAA,CAAC7E,iBAAiB;IAACG,GAAG,EAAE+B,qBAAsB;IAACkD,WAAW,EAAEzD;EAAW,GAClEvB,OACc,CACtB,eACDjB,KAAA,CAAA0F,aAAA,CAAC9E,WAAW;IACRI,GAAG,EAAEgC,QAAS;IACdkD,OAAO,EAAE3B,mBAAoB;IAC7BsB,YAAY,EAAElB,gBAAiB;IAC/BmB,YAAY,EAAErB;EAAiB,GAE9BjD,QACQ,CAAC,EACbc,MACH,CAAC;AAEX,CACJ,CAAC;AAEDxB,KAAK,CAACqF,WAAW,GAAG,OAAO;AAE3B,eAAerF,KAAK","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Popup.js","names":["getWindowMetrics","AnimatePresence","React","forwardRef","useCallback","useEffect","useImperativeHandle","useRef","useState","createPortal","useUuid","PopupAlignment","AreaContextProvider","PopupContentWrapper","StyledPopup","StyledPopupPseudo","Popup","_ref","ref","content","onShow","container","document","querySelector","body","onHide","children","shouldShowOnHover","yOffset","coordinates","setCoordinates","x","y","alignment","setAlignment","TopLeft","offset","setOffset","isOpen","setIsOpen","portal","setPortal","menuHeight","setMenuHeight","pseudoSize","setPseudoSize","timeout","uuid","popupContentRef","popupPseudoContentRef","popupRef","current","height","width","getBoundingClientRect","handleShow","pseudoHeight","pseudoWidth","childrenHeight","left","childrenLeft","top","childrenTop","childrenWidth","isRight","BottomRight","BottomLeft","newOffset","window","innerWidth","right","newX","TopRight","handleChildrenClick","handleHide","handleMouseEnter","clearTimeout","handleMouseLeave","setTimeout","handleDocumentClick","event","contains","target","preventDefault","stopPropagation","hide","show","then","result","topBarHeight","addEventListener","removeEventListener","createElement","initial","key","onMouseLeave","onMouseEnter","shouldChangeColor","Fragment","$menuHeight","onClick","displayName"],"sources":["../../../../src/components/popup/Popup.tsx"],"sourcesContent":["import { getWindowMetrics } from 'chayns-api';\nimport { AnimatePresence } from 'framer-motion';\nimport React, {\n forwardRef,\n ReactNode,\n ReactPortal,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { useUuid } from '../../hooks/uuid';\nimport { PopupAlignment, PopupCoordinates, PopupRef } from '../../types/popup';\nimport AreaContextProvider from '../area-provider/AreaContextProvider';\nimport PopupContentWrapper from './popup-content-wrapper/PopupContentWrapper';\nimport { StyledPopup, StyledPopupPseudo } from './Popup.styles';\n\nexport type PopupProps = {\n /**\n * The element over which the content of the `ContextMenu` should be displayed.\n */\n children?: ReactNode;\n /**\n * The element where the content of the `Popup` should be rendered via React Portal.\n */\n container?: Element;\n /**\n * The content that should be displayed inside the popup.\n */\n content: ReactNode;\n /**\n * Function to be executed when the content of the Context menu has been hidden.\n */\n onHide?: VoidFunction;\n /**\n * Function to be executed when the content of the Context menu has been shown.\n */\n onShow?: VoidFunction;\n /**\n * Whether the popup should be opened on hover. If not, the popup will be opened on click.\n */\n shouldShowOnHover?: boolean;\n /**\n * The Y offset of the popup to the children.\n */\n yOffset?: number;\n};\n\nconst Popup = forwardRef<PopupRef, PopupProps>(\n (\n {\n content,\n onShow,\n container = document.querySelector('.page-provider') || document.body,\n onHide,\n children,\n shouldShowOnHover = false,\n yOffset = 0,\n },\n ref,\n ) => {\n const [coordinates, setCoordinates] = useState<PopupCoordinates>({\n x: 0,\n y: 0,\n });\n\n const [alignment, setAlignment] = useState<PopupAlignment>(PopupAlignment.TopLeft);\n const [offset, setOffset] = useState<number>(0);\n const [isOpen, setIsOpen] = useState(false);\n const [portal, setPortal] = useState<ReactPortal>();\n const [menuHeight, setMenuHeight] = useState(0);\n\n const [pseudoSize, setPseudoSize] = useState<{ height: number; width: number }>();\n\n const timeout = useRef<number>();\n\n const uuid = useUuid();\n\n // ToDo: Replace with hook if new chayns api is ready\n\n const popupContentRef = useRef<HTMLDivElement>(null);\n const popupPseudoContentRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (popupPseudoContentRef.current) {\n const { height, width } = popupPseudoContentRef.current.getBoundingClientRect();\n\n setPseudoSize({ height, width });\n }\n }, []);\n\n const handleShow = useCallback(() => {\n if (popupRef.current && pseudoSize) {\n const { height: pseudoHeight, width: pseudoWidth } = pseudoSize;\n\n const {\n height: childrenHeight,\n left: childrenLeft,\n top: childrenTop,\n width: childrenWidth,\n } = popupRef.current.getBoundingClientRect();\n\n if (pseudoHeight > childrenTop - 25) {\n let isRight = false;\n\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.BottomRight);\n\n isRight = true;\n } else {\n setAlignment(PopupAlignment.BottomLeft);\n }\n\n const x = childrenLeft + childrenWidth / 2;\n const y = childrenTop + childrenHeight + yOffset;\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n x + pseudoWidth >= window.innerWidth\n ? x + pseudoWidth - window.innerWidth\n : 0;\n } else {\n newOffset = 0;\n\n const right = window.innerWidth - (childrenLeft + childrenWidth / 2);\n\n newOffset =\n right + pseudoWidth >= window.innerWidth\n ? right + pseudoWidth - window.innerWidth\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX < 23 ? 23 : newX,\n y: y - yOffset,\n });\n } else {\n let isRight = false;\n\n if (pseudoWidth > childrenLeft + childrenWidth / 2 - 25) {\n setAlignment(PopupAlignment.TopRight);\n\n isRight = true;\n } else {\n setAlignment(PopupAlignment.TopLeft);\n }\n\n const x = childrenLeft + childrenWidth / 2;\n const y = childrenTop - yOffset;\n\n let newOffset;\n\n if (isRight) {\n newOffset =\n x + pseudoWidth >= window.innerWidth\n ? x + pseudoWidth - window.innerWidth\n : 0;\n } else {\n newOffset = 0;\n\n const right = window.innerWidth - (childrenLeft + childrenWidth / 2);\n\n newOffset =\n right + pseudoWidth >= window.innerWidth\n ? right + pseudoWidth - window.innerWidth\n : 0;\n }\n\n setOffset(newOffset);\n\n const newX = x - newOffset;\n\n setCoordinates({\n x: newX < 23 ? 23 : newX,\n y: y - yOffset,\n });\n }\n\n setIsOpen(true);\n }\n }, [pseudoSize, yOffset]);\n\n const handleChildrenClick = () => {\n if (!shouldShowOnHover) {\n handleShow();\n }\n };\n\n const handleHide = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleMouseEnter = useCallback(() => {\n if (shouldShowOnHover) {\n window.clearTimeout(timeout.current);\n handleShow();\n }\n }, [handleShow, shouldShowOnHover]);\n\n const handleMouseLeave = useCallback(() => {\n if (!shouldShowOnHover) {\n return;\n }\n\n timeout.current = window.setTimeout(() => {\n handleHide();\n }, 500);\n }, [handleHide, shouldShowOnHover]);\n\n const handleDocumentClick = useCallback<EventListener>(\n (event) => {\n if (\n !popupContentRef.current?.contains(event.target as Node) &&\n !shouldShowOnHover\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n handleHide();\n }\n },\n [handleHide, shouldShowOnHover],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleHide,\n show: handleShow,\n }),\n [handleHide, handleShow],\n );\n\n useEffect(() => {\n void getWindowMetrics().then((result) => {\n if (result.topBarHeight) {\n setMenuHeight(result.topBarHeight);\n }\n });\n }, []);\n\n useEffect(() => {\n if (isOpen) {\n document.addEventListener('click', handleDocumentClick, true);\n window.addEventListener('blur', handleHide);\n\n if (typeof onShow === 'function') {\n onShow();\n }\n } else if (typeof onHide === 'function') {\n onHide();\n }\n\n return () => {\n document.removeEventListener('click', handleDocumentClick, true);\n window.removeEventListener('blur', handleHide);\n };\n }, [handleDocumentClick, handleHide, isOpen, onHide, onShow]);\n\n useEffect(() => {\n setPortal(() =>\n createPortal(\n <AnimatePresence initial={false}>\n {isOpen && (\n <PopupContentWrapper\n offset={offset}\n coordinates={coordinates}\n key={`tooltip_${uuid}`}\n alignment={alignment}\n ref={popupContentRef}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n >\n <AreaContextProvider shouldChangeColor={false}>\n {content}\n </AreaContextProvider>\n </PopupContentWrapper>\n )}\n </AnimatePresence>,\n container,\n ),\n );\n }, [\n alignment,\n container,\n content,\n coordinates,\n handleMouseEnter,\n handleMouseLeave,\n isOpen,\n offset,\n uuid,\n ]);\n\n return (\n <>\n {!pseudoSize && (\n <StyledPopupPseudo ref={popupPseudoContentRef} $menuHeight={menuHeight}>\n {content}\n </StyledPopupPseudo>\n )}\n <StyledPopup\n ref={popupRef}\n onClick={handleChildrenClick}\n onMouseLeave={handleMouseLeave}\n onMouseEnter={handleMouseEnter}\n >\n {children}\n </StyledPopup>\n {portal}\n </>\n );\n },\n);\n\nPopup.displayName = 'Popup';\n\nexport default Popup;\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,eAAe,QAAQ,eAAe;AAC/C,OAAOC,KAAK,IACRC,UAAU,EAGVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,cAAc,QAAoC,mBAAmB;AAC9E,OAAOC,mBAAmB,MAAM,sCAAsC;AACtE,OAAOC,mBAAmB,MAAM,6CAA6C;AAC7E,SAASC,WAAW,EAAEC,iBAAiB,QAAQ,gBAAgB;AAiC/D,MAAMC,KAAK,gBAAGb,UAAU,CACpB,CAAAc,IAAA,EAUIC,GAAG,KACF;EAAA,IAVD;IACIC,OAAO;IACPC,MAAM;IACNC,SAAS,GAAGC,QAAQ,CAACC,aAAa,CAAC,gBAAgB,CAAC,IAAID,QAAQ,CAACE,IAAI;IACrEC,MAAM;IACNC,QAAQ;IACRC,iBAAiB,GAAG,KAAK;IACzBC,OAAO,GAAG;EACd,CAAC,GAAAX,IAAA;EAGD,MAAM,CAACY,WAAW,EAAEC,cAAc,CAAC,GAAGtB,QAAQ,CAAmB;IAC7DuB,CAAC,EAAE,CAAC;IACJC,CAAC,EAAE;EACP,CAAC,CAAC;EAEF,MA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,CAEZ,CAAC,EAClBE,SACJ,CACJ,CAAC;EACL,CAAC,EAAE,CACCY,SAAS,EACTZ,SAAS,EACTF,OAAO,EACPU,WAAW,EACX8C,gBAAgB,EAChBE,gBAAgB,EAChBvC,MAAM,EACNF,MAAM,EACNW,IAAI,CACP,CAAC;EAEF,oBACI7C,KAAA,CAAA0F,aAAA,CAAA1F,KAAA,CAAAgG,QAAA,QACK,CAACtD,UAAU,iBACR1C,KAAA,CAAA0F,aAAA,CAAC7E,iBAAiB;IAACG,GAAG,EAAE+B,qBAAsB;IAACkD,WAAW,EAAEzD;EAAW,GAClEvB,OACc,CACtB,eACDjB,KAAA,CAAA0F,aAAA,CAAC9E,WAAW;IACRI,GAAG,EAAEgC,QAAS;IACdkD,OAAO,EAAE3B,mBAAoB;IAC7BsB,YAAY,EAAElB,gBAAiB;IAC/BmB,YAAY,EAAErB;EAAiB,GAE9BjD,QACQ,CAAC,EACbc,MACH,CAAC;AAEX,CACJ,CAAC;AAEDxB,KAAK,CAACqF,WAAW,GAAG,OAAO;AAE3B,eAAerF,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const PAGE_BREAKPOINTS = {
|
|
2
|
+
mobile: 'screen and (max-width: 37.438em)',
|
|
3
|
+
// less than 600px
|
|
4
|
+
desktop: 'screen and (min-width: 33.5em)',
|
|
5
|
+
// more than 600px; could: and (max-width: 63.9375em)
|
|
6
|
+
desk: 'screen and (min-width: 53.125em)',
|
|
7
|
+
// more than 850px
|
|
8
|
+
retina: '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)'
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=pageProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageProvider.js","names":["PAGE_BREAKPOINTS","mobile","desktop","desk","retina"],"sources":["../../../src/constants/pageProvider.ts"],"sourcesContent":["export const PAGE_BREAKPOINTS = {\n mobile: 'screen and (max-width: 37.438em)', // less than 600px\n desktop: 'screen and (min-width: 33.5em)', // more than 600px; could: and (max-width: 63.9375em)\n desk: 'screen and (min-width: 53.125em)', // more than 850px\n retina: '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)',\n};\n"],"mappings":"AAAA,OAAO,MAAMA,gBAAgB,GAAG;EAC5BC,MAAM,EAAE,kCAAkC;EAAE;EAC5CC,OAAO,EAAE,gCAAgC;EAAE;EAC3CC,IAAI,EAAE,kCAAkC;EAAE;EAC1CC,MAAM,EAAE;AACZ,CAAC","ignoreList":[]}
|
package/lib/esm/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export { default as ListItemContent } from './components/list/list-item/list-ite
|
|
|
24
24
|
export { default as ListItem } from './components/list/list-item/ListItem';
|
|
25
25
|
export { default as MentionFinder } from './components/mention-finder/MentionFinder';
|
|
26
26
|
export { default as NumberInput } from './components/number-input/NumberInput';
|
|
27
|
+
export { default as PageProvider } from './components/page-provider/PageProvider';
|
|
27
28
|
export { default as Popup } from './components/popup/Popup';
|
|
28
29
|
export { default as PopupContent } from './components/popup/popup-content/PopupContent';
|
|
29
30
|
export { default as ProgressBar } from './components/progress-bar/ProgressBar';
|
|
@@ -54,5 +55,6 @@ export { ClampPosition } from './types/truncation';
|
|
|
54
55
|
export { getIsTouch } from './utils/environment';
|
|
55
56
|
export { getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';
|
|
56
57
|
export { isTobitEmployee } from './utils/isTobitEmployee';
|
|
58
|
+
export { getUsableHeight } from './utils/pageProvider';
|
|
57
59
|
export { uploadFile } from './utils/uploadFile';
|
|
58
60
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","ComboBox","ContentCard","ContextMenu","ExpandableContent","FileInput","FilterButtons","GridImage","Icon","Input","List","ListItemContent","ListItem","MentionFinder","NumberInput","Popup","PopupContent","ProgressBar","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingBar","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ComboBoxDirection","ContentCardType","ContextMenuAlignment","FilterButtonItemShape","FilterButtonSize","ClampPosition","getIsTouch","getFileAsArrayBuffer","selectFiles","isTobitEmployee","uploadFile"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport { default as ColorSchemeProvider } from './components/color-scheme-provider/ColorSchemeProvider';\nexport type {\n FramerMotionBugFix,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport {\n default as ComboBox,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu, type ContextMenuRef } from './components/context-menu/ContextMenu';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport { default as FileInput, type FileInputRef } from './components/file-input/FileInput';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as Icon } from './components/icon/Icon';\nexport { default as Input } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/useElementSize';\nexport { ComboBoxDirection } from './types/comboBox';\nexport { ContentCardType } from './types/contentCard';\nexport { ContextMenuAlignment } from './types/contextMenu';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport { ClampPosition } from './types/truncation';\nexport { getIsTouch } from './utils/environment';\nexport { getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { uploadFile } from './utils/uploadFile';\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;AACjG,SAASH,OAAO,IAAII,cAAc,QAAQ,uDAAuD;AACjG,SAASJ,OAAO,IAAIK,aAAa,QAAQ,qDAAqD;AAC9F,SAASL,OAAO,IAAIM,aAAa,QAAQ,2CAA2C;AACpF,SACIC,WAAW,EACXP,OAAO,IAAIQ,YAAY,QACpB,gDAAgD;AACvD,SAASR,OAAO,IAAIS,KAAK,QAAQ,0BAA0B;AAC3D,SAAST,OAAO,IAAIU,MAAM,QAAQ,4BAA4B;AAC9D,SAASV,OAAO,IAAIW,QAAQ,QAAQ,gCAAgC;AACpE,SAASX,OAAO,IAAIY,mBAAmB,QAAQ,wDAAwD;AAKvG,SACIZ,OAAO,IAAIa,QAAQ,QAGhB,gCAAgC;AACvC,SAASb,OAAO,IAAIc,WAAW,QAAQ,uCAAuC;AAC9E,SAASd,OAAO,IAAIe,WAAW,QAA6B,uCAAuC;AACnG,SAASf,OAAO,IAAIgB,iBAAiB,QAAQ,mDAAmD;AAChG,SAAShB,OAAO,IAAIiB,SAAS,QAA2B,mCAAmC;AAC3F,SAASjB,OAAO,IAAIkB,aAAa,QAAQ,2CAA2C;AACpF,SAASlB,OAAO,IAAImB,SAAS,QAAQ,mCAAmC;AACxE,SAASnB,OAAO,IAAIoB,IAAI,QAAQ,wBAAwB;AACxD,SAASpB,OAAO,IAAIqB,KAAK,QAAQ,0BAA0B;AAC3D,SAASrB,OAAO,IAAIsB,IAAI,QAAQ,wBAAwB;AACxD,SAAStB,OAAO,IAAIuB,eAAe,QAAQ,+DAA+D;AAC1G,SACIvB,OAAO,IAAIwB,QAAQ,QAGhB,sCAAsC;AAC7C,SAASxB,OAAO,IAAIyB,aAAa,QAAQ,2CAA2C;AAEpF,SAASzB,OAAO,IAAI0B,WAAW,QAAQ,uCAAuC;AAC9E,SAAS1B,OAAO,IAAI2B,KAAK,QAAQ,0BAA0B;AAC3D,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","ComboBox","ContentCard","ContextMenu","ExpandableContent","FileInput","FilterButtons","GridImage","Icon","Input","List","ListItemContent","ListItem","MentionFinder","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingBar","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ComboBoxDirection","ContentCardType","ContextMenuAlignment","FilterButtonItemShape","FilterButtonSize","ClampPosition","getIsTouch","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport { default as ColorSchemeProvider } from './components/color-scheme-provider/ColorSchemeProvider';\nexport type {\n FramerMotionBugFix,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport {\n default as ComboBox,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu, type ContextMenuRef } from './components/context-menu/ContextMenu';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport { default as FileInput, type FileInputRef } from './components/file-input/FileInput';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as Icon } from './components/icon/Icon';\nexport { default as Input } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/useElementSize';\nexport { ComboBoxDirection } from './types/comboBox';\nexport { ContentCardType } from './types/contentCard';\nexport { ContextMenuAlignment } from './types/contextMenu';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport { ClampPosition } from './types/truncation';\nexport { getIsTouch } from './utils/environment';\nexport { getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;AACjG,SAASH,OAAO,IAAII,cAAc,QAAQ,uDAAuD;AACjG,SAASJ,OAAO,IAAIK,aAAa,QAAQ,qDAAqD;AAC9F,SAASL,OAAO,IAAIM,aAAa,QAAQ,2CAA2C;AACpF,SACIC,WAAW,EACXP,OAAO,IAAIQ,YAAY,QACpB,gDAAgD;AACvD,SAASR,OAAO,IAAIS,KAAK,QAAQ,0BAA0B;AAC3D,SAAST,OAAO,IAAIU,MAAM,QAAQ,4BAA4B;AAC9D,SAASV,OAAO,IAAIW,QAAQ,QAAQ,gCAAgC;AACpE,SAASX,OAAO,IAAIY,mBAAmB,QAAQ,wDAAwD;AAKvG,SACIZ,OAAO,IAAIa,QAAQ,QAGhB,gCAAgC;AACvC,SAASb,OAAO,IAAIc,WAAW,QAAQ,uCAAuC;AAC9E,SAASd,OAAO,IAAIe,WAAW,QAA6B,uCAAuC;AACnG,SAASf,OAAO,IAAIgB,iBAAiB,QAAQ,mDAAmD;AAChG,SAAShB,OAAO,IAAIiB,SAAS,QAA2B,mCAAmC;AAC3F,SAASjB,OAAO,IAAIkB,aAAa,QAAQ,2CAA2C;AACpF,SAASlB,OAAO,IAAImB,SAAS,QAAQ,mCAAmC;AACxE,SAASnB,OAAO,IAAIoB,IAAI,QAAQ,wBAAwB;AACxD,SAASpB,OAAO,IAAIqB,KAAK,QAAQ,0BAA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QAAQ,iCAAiC;AACrE,SAAS/C,OAAO,IAAIgD,OAAO,QAAQ,8BAA8B;AACjE,SAAShD,OAAO,IAAIiD,UAAU,QAAQ,oCAAoC;AAC1E,SAASC,2BAA2B,QAAQ,2BAA2B;AACvE,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,iBAAiB,QAAQ,kBAAkB;AACpD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,oBAAoB,QAAQ,qBAAqB;AAG1D,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAW/E,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,oBAAoB,EAAEC,WAAW,QAAQ,oBAAoB;AACtE,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,UAAU,QAAQ,oBAAoB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","names":[],"sources":["../../../src/types/list.ts"],"sourcesContent":["import type { ReactNode } from 'react';\n\nexport interface IListItemRightElement {\n bottom?: ReactNode;\n center?: ReactNode;\n top?: ReactNode;\n}\n\nexport type IListItemRightElements = IListItemRightElement | ReactNode;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"list.js","names":[],"sources":["../../../src/types/list.ts"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\n\nexport interface IListItemRightElement {\n bottom?: ReactNode;\n center?: ReactNode;\n top?: ReactNode;\n topAlignment?: CSSProperties['justifyContent'];\n bottomAlignment?: CSSProperties['justifyContent'];\n}\n\nexport type IListItemRightElements = IListItemRightElement | ReactNode;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { getEnvironment, getWindowMetrics } from 'chayns-api';
|
|
2
|
+
import { PAGE_BREAKPOINTS } from '../constants/pageProvider';
|
|
3
|
+
export const getPagePadding = () => {
|
|
4
|
+
const {
|
|
5
|
+
runtimeEnvironment
|
|
6
|
+
} = getEnvironment();
|
|
7
|
+
if (typeof runtimeEnvironment === 'number' && [4, 5].includes(runtimeEnvironment)) {
|
|
8
|
+
return '0';
|
|
9
|
+
}
|
|
10
|
+
if (matchMedia(PAGE_BREAKPOINTS.desktop).matches) {
|
|
11
|
+
return '35px 43px 30px';
|
|
12
|
+
}
|
|
13
|
+
return '15px 10px 20px';
|
|
14
|
+
};
|
|
15
|
+
const getPageProviderInformation = customPadding => {
|
|
16
|
+
const padding = (customPadding ?? getPagePadding()).split(' ');
|
|
17
|
+
const parseValue = value => {
|
|
18
|
+
const parsed = parseInt(value.replace('px', ''), 10);
|
|
19
|
+
return Number.isNaN(parsed) ? 0 : parsed;
|
|
20
|
+
};
|
|
21
|
+
if (padding.length === 1) {
|
|
22
|
+
const value = parseValue(padding[0] ?? '');
|
|
23
|
+
return {
|
|
24
|
+
top: value,
|
|
25
|
+
right: value,
|
|
26
|
+
bottom: value,
|
|
27
|
+
left: value
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
if (padding.length === 2) {
|
|
31
|
+
const [vertical, horizontal] = padding.map(parseValue);
|
|
32
|
+
return {
|
|
33
|
+
top: vertical ?? 0,
|
|
34
|
+
right: horizontal ?? 0,
|
|
35
|
+
bottom: vertical ?? 0,
|
|
36
|
+
left: horizontal ?? 0
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (padding.length === 3) {
|
|
40
|
+
const [top, horizontal, bottom] = padding.map(parseValue);
|
|
41
|
+
return {
|
|
42
|
+
top: top ?? 0,
|
|
43
|
+
right: horizontal ?? 0,
|
|
44
|
+
bottom: bottom ?? 0,
|
|
45
|
+
left: horizontal ?? 0
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (padding.length === 4) {
|
|
49
|
+
const [top, right, bottom, left] = padding.map(parseValue);
|
|
50
|
+
return {
|
|
51
|
+
top: top ?? 0,
|
|
52
|
+
right: right ?? 0,
|
|
53
|
+
bottom: bottom ?? 0,
|
|
54
|
+
left: left ?? 0
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
top: 0,
|
|
59
|
+
right: 0,
|
|
60
|
+
bottom: 0,
|
|
61
|
+
left: 0
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export const getUsableHeight = async customPadding => {
|
|
65
|
+
let usableHeight;
|
|
66
|
+
const {
|
|
67
|
+
bottomBarHeight,
|
|
68
|
+
topBarHeight,
|
|
69
|
+
windowHeight
|
|
70
|
+
} = await getWindowMetrics();
|
|
71
|
+
const {
|
|
72
|
+
top,
|
|
73
|
+
bottom
|
|
74
|
+
} = getPageProviderInformation(customPadding);
|
|
75
|
+
usableHeight = windowHeight - bottom - top;
|
|
76
|
+
if (bottomBarHeight) {
|
|
77
|
+
usableHeight -= bottomBarHeight;
|
|
78
|
+
}
|
|
79
|
+
if (topBarHeight) {
|
|
80
|
+
usableHeight -= topBarHeight;
|
|
81
|
+
}
|
|
82
|
+
return usableHeight;
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=pageProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageProvider.js","names":["getEnvironment","getWindowMetrics","PAGE_BREAKPOINTS","getPagePadding","runtimeEnvironment","includes","matchMedia","desktop","matches","getPageProviderInformation","customPadding","padding","split","parseValue","value","parsed","parseInt","replace","Number","isNaN","length","top","right","bottom","left","vertical","horizontal","map","getUsableHeight","usableHeight","bottomBarHeight","topBarHeight","windowHeight"],"sources":["../../../src/utils/pageProvider.ts"],"sourcesContent":["import { getEnvironment, getWindowMetrics } from 'chayns-api';\nimport { PAGE_BREAKPOINTS } from '../constants/pageProvider';\n\nexport const getPagePadding = () => {\n const { runtimeEnvironment } = getEnvironment();\n\n if (typeof runtimeEnvironment === 'number' && [4, 5].includes(runtimeEnvironment)) {\n return '0';\n }\n\n if (matchMedia(PAGE_BREAKPOINTS.desktop).matches) {\n return '35px 43px 30px';\n }\n\n return '15px 10px 20px';\n};\n\ntype PaddingValues = {\n top: number;\n right: number;\n bottom: number;\n left: number;\n};\n\nconst getPageProviderInformation = (customPadding?: string): PaddingValues => {\n const padding = (customPadding ?? getPagePadding()).split(' ');\n\n const parseValue = (value: string): number => {\n const parsed = parseInt(value.replace('px', ''), 10);\n return Number.isNaN(parsed) ? 0 : parsed;\n };\n\n if (padding.length === 1) {\n const value = parseValue(padding[0] ?? '');\n return { top: value, right: value, bottom: value, left: value };\n }\n\n if (padding.length === 2) {\n const [vertical, horizontal] = padding.map(parseValue);\n return {\n top: vertical ?? 0,\n right: horizontal ?? 0,\n bottom: vertical ?? 0,\n left: horizontal ?? 0,\n };\n }\n\n if (padding.length === 3) {\n const [top, horizontal, bottom] = padding.map(parseValue);\n return {\n top: top ?? 0,\n right: horizontal ?? 0,\n bottom: bottom ?? 0,\n left: horizontal ?? 0,\n };\n }\n\n if (padding.length === 4) {\n const [top, right, bottom, left] = padding.map(parseValue);\n return { top: top ?? 0, right: right ?? 0, bottom: bottom ?? 0, left: left ?? 0 };\n }\n\n return { top: 0, right: 0, bottom: 0, left: 0 };\n};\n\nexport const getUsableHeight = async (customPadding?: string) => {\n let usableHeight;\n\n const { bottomBarHeight, topBarHeight, windowHeight } = await getWindowMetrics();\n\n const { top, bottom } = getPageProviderInformation(customPadding);\n\n usableHeight = windowHeight - bottom - top;\n\n if (bottomBarHeight) {\n usableHeight -= bottomBarHeight;\n }\n\n if (topBarHeight) {\n usableHeight -= topBarHeight;\n }\n\n return usableHeight;\n};\n"],"mappings":"AAAA,SAASA,cAAc,EAAEC,gBAAgB,QAAQ,YAAY;AAC7D,SAASC,gBAAgB,QAAQ,2BAA2B;AAE5D,OAAO,MAAMC,cAAc,GAAGA,CAAA,KAAM;EAChC,MAAM;IAAEC;EAAmB,CAAC,GAAGJ,cAAc,CAAC,CAAC;EAE/C,IAAI,OAAOI,kBAAkB,KAAK,QAAQ,IAAI,C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are const StyledMotionAccordion: import("styled-components/dist/types
|
|
|
11
11
|
slot?: string | undefined;
|
|
12
12
|
title?: string | undefined;
|
|
13
13
|
color?: string | undefined;
|
|
14
|
+
className?: string | undefined;
|
|
14
15
|
rel?: string | undefined;
|
|
15
16
|
defaultChecked?: boolean | undefined;
|
|
16
17
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -18,7 +19,6 @@ export declare const StyledMotionAccordion: import("styled-components/dist/types
|
|
|
18
19
|
suppressHydrationWarning?: boolean | undefined;
|
|
19
20
|
accessKey?: string | undefined;
|
|
20
21
|
autoFocus?: boolean | undefined;
|
|
21
|
-
className?: string | undefined;
|
|
22
22
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
23
23
|
contextMenu?: string | undefined;
|
|
24
24
|
dir?: string | undefined;
|
|
@@ -8,6 +8,7 @@ export declare const StyledMotionAccordionBody: import("styled-components/dist/t
|
|
|
8
8
|
slot?: string | undefined;
|
|
9
9
|
title?: string | undefined;
|
|
10
10
|
color?: string | undefined;
|
|
11
|
+
className?: string | undefined;
|
|
11
12
|
rel?: string | undefined;
|
|
12
13
|
defaultChecked?: boolean | undefined;
|
|
13
14
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -15,7 +16,6 @@ export declare const StyledMotionAccordionBody: import("styled-components/dist/t
|
|
|
15
16
|
suppressHydrationWarning?: boolean | undefined;
|
|
16
17
|
accessKey?: string | undefined;
|
|
17
18
|
autoFocus?: boolean | undefined;
|
|
18
|
-
className?: string | undefined;
|
|
19
19
|
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
20
20
|
contextMenu?: string | undefined;
|
|
21
21
|
dir?: string | undefined;
|