@chayns-components/core 5.0.14 → 5.0.16
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/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/cjs/components/amount-control/AmountControl.styles.js.map +1 -1
- package/lib/cjs/components/icon/Icon.styles.js.map +1 -1
- package/lib/cjs/components/multi-action-button/MultiActionButton.js +2 -2
- package/lib/cjs/components/multi-action-button/MultiActionButton.js.map +1 -1
- package/lib/cjs/components/multi-action-button/MultiActionButton.types.js.map +1 -1
- package/lib/cjs/components/search-input/SearchInput.js.map +1 -1
- package/lib/cjs/components/sharing-bar/SharingBar.js +5 -85
- package/lib/cjs/components/sharing-bar/SharingBar.js.map +1 -1
- package/lib/cjs/components/sharing-button/SharingButton.js +43 -0
- package/lib/cjs/components/sharing-button/SharingButton.js.map +1 -0
- package/lib/cjs/components/sharing-button/SharingButton.styles.js +11 -0
- package/lib/cjs/components/sharing-button/SharingButton.styles.js.map +1 -0
- package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js +107 -0
- package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js.map +1 -0
- package/lib/cjs/components/slider/Slider.styles.js.map +1 -1
- package/lib/cjs/index.js +14 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/esm/components/amount-control/AmountControl.styles.js.map +1 -1
- package/lib/esm/components/icon/Icon.styles.js.map +1 -1
- package/lib/esm/components/multi-action-button/MultiActionButton.js +2 -2
- package/lib/esm/components/multi-action-button/MultiActionButton.js.map +1 -1
- package/lib/esm/components/multi-action-button/MultiActionButton.types.js.map +1 -1
- package/lib/esm/components/search-input/SearchInput.js.map +1 -1
- package/lib/esm/components/sharing-bar/SharingBar.js +3 -82
- package/lib/esm/components/sharing-bar/SharingBar.js.map +1 -1
- package/lib/esm/components/sharing-button/SharingButton.js +35 -0
- package/lib/esm/components/sharing-button/SharingButton.js.map +1 -0
- package/lib/esm/components/sharing-button/SharingButton.styles.js +5 -0
- package/lib/esm/components/sharing-button/SharingButton.styles.js.map +1 -0
- package/lib/esm/components/sharing-context-menu/SharingContextMenu.js +99 -0
- package/lib/esm/components/sharing-context-menu/SharingContextMenu.js.map +1 -0
- package/lib/esm/components/slider/Slider.styles.js.map +1 -1
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/types/components/amount-control/AmountControl.styles.d.ts +2 -2
- package/lib/types/components/multi-action-button/MultiActionButton.types.d.ts +7 -0
- package/lib/types/components/sharing-button/SharingButton.d.ts +5 -0
- package/lib/types/components/sharing-button/SharingButton.styles.d.ts +1 -0
- package/lib/types/components/sharing-context-menu/SharingContextMenu.d.ts +15 -0
- package/lib/types/index.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { getSite } from 'chayns-api';
|
|
2
1
|
import React, { useCallback, useRef } from 'react';
|
|
3
|
-
import { SHAREPROVIDER } from '../../constants/sharingBar';
|
|
4
|
-
import { useIsTouch } from '../../utils/environment';
|
|
5
|
-
import { copyToClipboard, shareWithApp, shareWithUrl } from '../../utils/sharingBar';
|
|
6
|
-
import ContextMenu from '../context-menu/ContextMenu';
|
|
7
2
|
import Icon from '../icon/Icon';
|
|
8
3
|
import { StyledSharingBar, StyledSharingBarIconWrapper, StyledSharingBarText } from './SharingBar.styles';
|
|
4
|
+
import SharingContextMenu from '../sharing-context-menu/SharingContextMenu';
|
|
9
5
|
const SharingBar = ({
|
|
10
6
|
label,
|
|
11
7
|
link,
|
|
@@ -13,81 +9,6 @@ const SharingBar = ({
|
|
|
13
9
|
container
|
|
14
10
|
}) => {
|
|
15
11
|
const contextMenuRef = useRef(null);
|
|
16
|
-
const handleImageDownload = () => {
|
|
17
|
-
shareWithUrl(
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
SHAREPROVIDER[5].url.replace('{url}', encodeURIComponent(link)).replace('{linkText}', 'Teilen').replace('{color}', getSite().color.replace('#', '')));
|
|
21
|
-
};
|
|
22
|
-
const isTouch = useIsTouch();
|
|
23
|
-
const handleShare = key => {
|
|
24
|
-
contextMenuRef.current?.hide();
|
|
25
|
-
switch (key) {
|
|
26
|
-
case 'whatsapp':
|
|
27
|
-
shareWithUrl(
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
SHAREPROVIDER[0].url.replace('{url}', encodeURIComponent(`${link}`.trim())));
|
|
31
|
-
break;
|
|
32
|
-
case 'facebook':
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
shareWithUrl(SHAREPROVIDER[3].url.replace('{url}', encodeURIComponent(link)));
|
|
36
|
-
break;
|
|
37
|
-
case 'twitter':
|
|
38
|
-
shareWithUrl(
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
SHAREPROVIDER[4].url.replace('{url}', encodeURIComponent(link)).replace('{linkText}', ''));
|
|
42
|
-
break;
|
|
43
|
-
case 'mail':
|
|
44
|
-
if (isTouch) {
|
|
45
|
-
shareWithApp(`${link}`.trim());
|
|
46
|
-
} else {
|
|
47
|
-
shareWithUrl(
|
|
48
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
49
|
-
// @ts-ignore
|
|
50
|
-
SHAREPROVIDER[2].url.replace('{url}', encodeURIComponent(`${link}`.trim())));
|
|
51
|
-
}
|
|
52
|
-
break;
|
|
53
|
-
case 'copy':
|
|
54
|
-
copyToClipboard(link);
|
|
55
|
-
break;
|
|
56
|
-
default:
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
const contextMenuItems = [{
|
|
61
|
-
icons: ['fa fa-copy'],
|
|
62
|
-
key: 'copy',
|
|
63
|
-
onClick: () => handleShare('copy'),
|
|
64
|
-
text: 'Zwischenablage'
|
|
65
|
-
}, {
|
|
66
|
-
icons: ['fa-solid fa-brands fa-whatsapp'],
|
|
67
|
-
key: 'whatsapp',
|
|
68
|
-
onClick: () => handleShare('whatsapp'),
|
|
69
|
-
text: 'Whatsapp'
|
|
70
|
-
}, {
|
|
71
|
-
icons: ['fa-solid fa-brands fa-facebook-f'],
|
|
72
|
-
key: 'facebook',
|
|
73
|
-
onClick: () => handleShare('facebook'),
|
|
74
|
-
text: 'Facebook'
|
|
75
|
-
}, {
|
|
76
|
-
icons: ['fa-solid fa-brands fa-x-twitter'],
|
|
77
|
-
key: 'twitter',
|
|
78
|
-
onClick: () => handleShare('twitter'),
|
|
79
|
-
text: 'X'
|
|
80
|
-
}, {
|
|
81
|
-
icons: ['fa fa-envelope'],
|
|
82
|
-
key: 'mail',
|
|
83
|
-
onClick: () => handleShare('mail'),
|
|
84
|
-
text: 'Mail'
|
|
85
|
-
}, {
|
|
86
|
-
icons: ['fa fa-qrcode'],
|
|
87
|
-
key: 'callingCode',
|
|
88
|
-
onClick: handleImageDownload,
|
|
89
|
-
text: 'Calling Code herunterladen'
|
|
90
|
-
}];
|
|
91
12
|
const handleSharingBarClick = useCallback(event => {
|
|
92
13
|
event.preventDefault();
|
|
93
14
|
event.stopPropagation();
|
|
@@ -97,8 +18,8 @@ const SharingBar = ({
|
|
|
97
18
|
onClick: handleSharingBarClick
|
|
98
19
|
}, /*#__PURE__*/React.createElement(StyledSharingBarIconWrapper, null, /*#__PURE__*/React.createElement(Icon, {
|
|
99
20
|
icons: ['fa-solid fa-share-nodes']
|
|
100
|
-
})), /*#__PURE__*/React.createElement(
|
|
101
|
-
|
|
21
|
+
})), /*#__PURE__*/React.createElement(SharingContextMenu, {
|
|
22
|
+
link: link,
|
|
102
23
|
ref: contextMenuRef,
|
|
103
24
|
alignment: popupAlignment,
|
|
104
25
|
container: container
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SharingBar.js","names":["
|
|
1
|
+
{"version":3,"file":"SharingBar.js","names":["React","useCallback","useRef","Icon","StyledSharingBar","StyledSharingBarIconWrapper","StyledSharingBarText","SharingContextMenu","SharingBar","label","link","popupAlignment","container","contextMenuRef","handleSharingBarClick","event","preventDefault","stopPropagation","current","show","createElement","onClick","icons","ref","alignment","displayName"],"sources":["../../../../src/components/sharing-bar/SharingBar.tsx"],"sourcesContent":["import React, { FC, MouseEventHandler, useCallback, useRef } from 'react';\nimport Icon from '../icon/Icon';\nimport {\n StyledSharingBar,\n StyledSharingBarIconWrapper,\n StyledSharingBarText,\n} from './SharingBar.styles';\nimport type { ContextMenuAlignment } from '../context-menu/ContextMenu.types';\nimport SharingContextMenu from '../sharing-context-menu/SharingContextMenu';\n\nexport type SharingBarProps = {\n /**\n * The element where the content of the `SharingBar` should be rendered via React Portal.\n */\n container?: Element;\n /**\n * The label that should be displayed.\n */\n label: string;\n /**\n * The link that should be shared.\n */\n link: string;\n /**\n * The alignment of the sharing options.\n */\n popupAlignment: ContextMenuAlignment;\n};\n\nconst SharingBar: FC<SharingBarProps> = ({ label, link, popupAlignment, container }) => {\n const contextMenuRef = useRef<{ hide: VoidFunction; show: VoidFunction }>(null);\n\n const handleSharingBarClick = useCallback<MouseEventHandler<HTMLDivElement>>((event) => {\n event.preventDefault();\n event.stopPropagation();\n\n contextMenuRef.current?.show();\n }, []);\n\n return (\n <StyledSharingBar onClick={handleSharingBarClick}>\n <StyledSharingBarIconWrapper>\n <Icon icons={['fa-solid fa-share-nodes']} />\n </StyledSharingBarIconWrapper>\n <SharingContextMenu\n link={link}\n ref={contextMenuRef}\n alignment={popupAlignment}\n container={container}\n >\n {null}\n </SharingContextMenu>\n <StyledSharingBarText>{label}</StyledSharingBarText>\n </StyledSharingBar>\n );\n};\n\nSharingBar.displayName = 'SharingBar';\n\nexport default SharingBar;\n"],"mappings":"AAAA,OAAOA,KAAK,IAA2BC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AACzE,OAAOC,IAAI,MAAM,cAAc;AAC/B,SACIC,gBAAgB,EAChBC,2BAA2B,EAC3BC,oBAAoB,QACjB,qBAAqB;AAE5B,OAAOC,kBAAkB,MAAM,4CAA4C;AAqB3E,MAAMC,UAA+B,GAAGA,CAAC;EAAEC,KAAK;EAAEC,IAAI;EAAEC,cAAc;EAAEC;AAAU,CAAC,KAAK;EACpF,MAAMC,cAAc,GAAGX,MAAM,CAA6C,IAAI,CAAC;EAE/E,MAAMY,qBAAqB,GAAGb,WAAW,CAAqCc,KAAK,IAAK;IACpFA,KAAK,CAACC,cAAc,CAAC,CAAC;IACtBD,KAAK,CAACE,eAAe,CAAC,CAAC;IAEvBJ,cAAc,CAACK,OAAO,EAAEC,IAAI,CAAC,CAAC;EAClC,CAAC,EAAE,EAAE,CAAC;EAEN,oBACInB,KAAA,CAAAoB,aAAA,CAAChB,gBAAgB;IAACiB,OAAO,EAAEP;EAAsB,gBAC7Cd,KAAA,CAAAoB,aAAA,CAACf,2BAA2B,qBACxBL,KAAA,CAAAoB,aAAA,CAACjB,IAAI;IAACmB,KAAK,EAAE,CAAC,yBAAyB;EAAE,CAAE,CAClB,CAAC,eAC9BtB,KAAA,CAAAoB,aAAA,CAACb,kBAAkB;IACfG,IAAI,EAAEA,IAAK;IACXa,GAAG,EAAEV,cAAe;IACpBW,SAAS,EAAEb,cAAe;IAC1BC,SAAS,EAAEA;EAAU,GAEpB,IACe,CAAC,eACrBZ,KAAA,CAAAoB,aAAA,CAACd,oBAAoB,QAAEG,KAA4B,CACrC,CAAC;AAE3B,CAAC;AAEDD,UAAU,CAACiB,WAAW,GAAG,YAAY;AAErC,eAAejB,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import SharingContextMenu from '../sharing-context-menu/SharingContextMenu';
|
|
3
|
+
import { StyledSharingButtonContainer } from './SharingButton.styles';
|
|
4
|
+
import Button from '../button/Button';
|
|
5
|
+
const SharingButton = ({
|
|
6
|
+
link,
|
|
7
|
+
alignment,
|
|
8
|
+
container,
|
|
9
|
+
children
|
|
10
|
+
}) => {
|
|
11
|
+
const contextMenuRef = React.useRef(null);
|
|
12
|
+
const [isButtonDisabled, setIsButtonDisabled] = React.useState(false);
|
|
13
|
+
const handleButtonClick = () => {
|
|
14
|
+
contextMenuRef.current?.show();
|
|
15
|
+
};
|
|
16
|
+
const handleOnShow = () => {
|
|
17
|
+
setIsButtonDisabled(true);
|
|
18
|
+
};
|
|
19
|
+
const handleOnHide = () => {
|
|
20
|
+
setIsButtonDisabled(false);
|
|
21
|
+
};
|
|
22
|
+
return /*#__PURE__*/React.createElement(StyledSharingButtonContainer, null, /*#__PURE__*/React.createElement(SharingContextMenu, {
|
|
23
|
+
link: link,
|
|
24
|
+
alignment: alignment,
|
|
25
|
+
container: container,
|
|
26
|
+
ref: contextMenuRef,
|
|
27
|
+
onShow: handleOnShow,
|
|
28
|
+
onHide: handleOnHide
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
30
|
+
onClick: handleButtonClick,
|
|
31
|
+
isDisabled: isButtonDisabled
|
|
32
|
+
}, children)));
|
|
33
|
+
};
|
|
34
|
+
export default SharingButton;
|
|
35
|
+
//# sourceMappingURL=SharingButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharingButton.js","names":["React","SharingContextMenu","StyledSharingButtonContainer","Button","SharingButton","link","alignment","container","children","contextMenuRef","useRef","isButtonDisabled","setIsButtonDisabled","useState","handleButtonClick","current","show","handleOnShow","handleOnHide","createElement","ref","onShow","onHide","onClick","isDisabled"],"sources":["../../../../src/components/sharing-button/SharingButton.tsx"],"sourcesContent":["import React, { FunctionComponent, PropsWithChildren } from 'react';\nimport { ContextMenuRef } from '../context-menu/ContextMenu.types';\nimport SharingContextMenu, {\n SharingContextMenuProps,\n} from '../sharing-context-menu/SharingContextMenu';\nimport { StyledSharingButtonContainer } from './SharingButton.styles';\nimport Button from '../button/Button';\n\nexport type SharingButtonProps = PropsWithChildren<\n Pick<SharingContextMenuProps, 'link' | 'alignment' | 'container'>\n>;\n\nconst SharingButton: FunctionComponent<SharingButtonProps> = ({\n link,\n alignment,\n container,\n children,\n}) => {\n const contextMenuRef = React.useRef<ContextMenuRef>(null);\n const [isButtonDisabled, setIsButtonDisabled] = React.useState(false);\n\n const handleButtonClick = () => {\n contextMenuRef.current?.show();\n };\n\n const handleOnShow = () => {\n setIsButtonDisabled(true);\n };\n\n const handleOnHide = () => {\n setIsButtonDisabled(false);\n };\n\n return (\n <StyledSharingButtonContainer>\n <SharingContextMenu\n link={link}\n alignment={alignment}\n container={container}\n ref={contextMenuRef}\n onShow={handleOnShow}\n onHide={handleOnHide}\n >\n <Button onClick={handleButtonClick} isDisabled={isButtonDisabled}>\n {children}\n </Button>\n </SharingContextMenu>\n </StyledSharingButtonContainer>\n );\n};\n\nexport default SharingButton;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAgD,OAAO;AAEnE,OAAOC,kBAAkB,MAElB,4CAA4C;AACnD,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,OAAOC,MAAM,MAAM,kBAAkB;AAMrC,MAAMC,aAAoD,GAAGA,CAAC;EAC1DC,IAAI;EACJC,SAAS;EACTC,SAAS;EACTC;AACJ,CAAC,KAAK;EACF,MAAMC,cAAc,GAAGT,KAAK,CAACU,MAAM,CAAiB,IAAI,CAAC;EACzD,MAAM,CAACC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGZ,KAAK,CAACa,QAAQ,CAAC,KAAK,CAAC;EAErE,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;IAC5BL,cAAc,CAACM,OAAO,EAAEC,IAAI,CAAC,CAAC;EAClC,CAAC;EAED,MAAMC,YAAY,GAAGA,CAAA,KAAM;IACvBL,mBAAmB,CAAC,IAAI,CAAC;EAC7B,CAAC;EAED,MAAMM,YAAY,GAAGA,CAAA,KAAM;IACvBN,mBAAmB,CAAC,KAAK,CAAC;EAC9B,CAAC;EAED,oBACIZ,KAAA,CAAAmB,aAAA,CAACjB,4BAA4B,qBACzBF,KAAA,CAAAmB,aAAA,CAAClB,kBAAkB;IACfI,IAAI,EAAEA,IAAK;IACXC,SAAS,EAAEA,SAAU;IACrBC,SAAS,EAAEA,SAAU;IACrBa,GAAG,EAAEX,cAAe;IACpBY,MAAM,EAAEJ,YAAa;IACrBK,MAAM,EAAEJ;EAAa,gBAErBlB,KAAA,CAAAmB,aAAA,CAAChB,MAAM;IAACoB,OAAO,EAAET,iBAAkB;IAACU,UAAU,EAAEb;EAAiB,GAC5DH,QACG,CACQ,CACM,CAAC;AAEvC,CAAC;AAED,eAAeJ,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharingButton.styles.js","names":["styled","StyledSharingButtonContainer","div"],"sources":["../../../../src/components/sharing-button/SharingButton.styles.ts"],"sourcesContent":["import { styled } from 'styled-components';\n\nexport const StyledSharingButtonContainer = styled.div`\n width: fit-content;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAE1C,OAAO,MAAMC,4BAA4B,GAAGD,MAAM,CAACE,GAAG;AACtD;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import { getSite } from 'chayns-api';
|
|
3
|
+
import React, { forwardRef, useCallback } from 'react';
|
|
4
|
+
import { SHAREPROVIDER } from '../../constants/sharingBar';
|
|
5
|
+
import { useIsTouch } from '../../utils/environment';
|
|
6
|
+
import { copyToClipboard, shareWithApp, shareWithUrl } from '../../utils/sharingBar';
|
|
7
|
+
import ContextMenu from '../context-menu/ContextMenu';
|
|
8
|
+
const SharingContextMenu = /*#__PURE__*/forwardRef(({
|
|
9
|
+
link,
|
|
10
|
+
children,
|
|
11
|
+
...contextMenuProps
|
|
12
|
+
}, ref) => {
|
|
13
|
+
const isTouch = useIsTouch();
|
|
14
|
+
const handleImageDownload = useCallback(() => {
|
|
15
|
+
shareWithUrl(
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
SHAREPROVIDER[5].url.replace('{url}', encodeURIComponent(link)).replace('{linkText}', 'Teilen').replace('{color}', getSite().color.replace('#', '')));
|
|
19
|
+
}, [link]);
|
|
20
|
+
const handleShare = useCallback(key => {
|
|
21
|
+
switch (key) {
|
|
22
|
+
case 'whatsapp':
|
|
23
|
+
shareWithUrl(
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
SHAREPROVIDER[0].url.replace('{url}', encodeURIComponent(`${link}`.trim())));
|
|
27
|
+
break;
|
|
28
|
+
case 'facebook':
|
|
29
|
+
shareWithUrl(
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
SHAREPROVIDER[3].url.replace('{url}', encodeURIComponent(link)));
|
|
33
|
+
break;
|
|
34
|
+
case 'twitter':
|
|
35
|
+
shareWithUrl(
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
SHAREPROVIDER[4].url.replace('{url}', encodeURIComponent(link)).replace('{linkText}', ''));
|
|
39
|
+
break;
|
|
40
|
+
case 'mail':
|
|
41
|
+
if (isTouch) {
|
|
42
|
+
shareWithApp(`${link}`.trim());
|
|
43
|
+
} else {
|
|
44
|
+
shareWithUrl(
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
SHAREPROVIDER[2].url.replace('{url}', encodeURIComponent(`${link}`.trim())));
|
|
48
|
+
}
|
|
49
|
+
break;
|
|
50
|
+
case 'copy':
|
|
51
|
+
copyToClipboard(link);
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}, [link, isTouch]);
|
|
57
|
+
const contextMenuItems = [{
|
|
58
|
+
icons: ['fa fa-copy'],
|
|
59
|
+
key: 'copy',
|
|
60
|
+
onClick: () => handleShare('copy'),
|
|
61
|
+
text: 'Zwischenablage'
|
|
62
|
+
}, {
|
|
63
|
+
icons: ['fa-solid fa-brands fa-whatsapp'],
|
|
64
|
+
key: 'whatsapp',
|
|
65
|
+
onClick: () => handleShare('whatsapp'),
|
|
66
|
+
text: 'Whatsapp'
|
|
67
|
+
}, {
|
|
68
|
+
icons: ['fa-solid fa-brands fa-facebook-f'],
|
|
69
|
+
key: 'facebook',
|
|
70
|
+
onClick: () => handleShare('facebook'),
|
|
71
|
+
text: 'Facebook'
|
|
72
|
+
}, {
|
|
73
|
+
icons: ['fa-solid fa-brands fa-x-twitter'],
|
|
74
|
+
key: 'twitter',
|
|
75
|
+
onClick: () => handleShare('twitter'),
|
|
76
|
+
text: 'X'
|
|
77
|
+
}, {
|
|
78
|
+
icons: ['fa fa-envelope'],
|
|
79
|
+
key: 'mail',
|
|
80
|
+
onClick: () => handleShare('mail'),
|
|
81
|
+
text: 'Mail'
|
|
82
|
+
}, {
|
|
83
|
+
icons: ['fa fa-qrcode'],
|
|
84
|
+
key: 'callingCode',
|
|
85
|
+
onClick: handleImageDownload,
|
|
86
|
+
text: 'Calling Code herunterladen'
|
|
87
|
+
}];
|
|
88
|
+
return (
|
|
89
|
+
/*#__PURE__*/
|
|
90
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
91
|
+
React.createElement(ContextMenu, _extends({
|
|
92
|
+
items: contextMenuItems,
|
|
93
|
+
ref: ref
|
|
94
|
+
}, contextMenuProps), children)
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
SharingContextMenu.displayName = 'SharingContextMenu';
|
|
98
|
+
export default SharingContextMenu;
|
|
99
|
+
//# sourceMappingURL=SharingContextMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharingContextMenu.js","names":["getSite","React","forwardRef","useCallback","SHAREPROVIDER","useIsTouch","copyToClipboard","shareWithApp","shareWithUrl","ContextMenu","SharingContextMenu","link","children","contextMenuProps","ref","isTouch","handleImageDownload","url","replace","encodeURIComponent","color","handleShare","key","trim","contextMenuItems","icons","onClick","text","createElement","_extends","items","displayName"],"sources":["../../../../src/components/sharing-context-menu/SharingContextMenu.tsx"],"sourcesContent":["import { getSite } from 'chayns-api';\nimport React, { forwardRef, useCallback } from 'react';\nimport { SHAREPROVIDER } from '../../constants/sharingBar';\nimport { useIsTouch } from '../../utils/environment';\nimport { copyToClipboard, shareWithApp, shareWithUrl } from '../../utils/sharingBar';\nimport ContextMenu from '../context-menu/ContextMenu';\nimport { ContextMenuProps, ContextMenuRef } from '../context-menu/ContextMenu.types';\n\nexport type SharingContextMenuProps = {\n /**\n * The link that should be shared.\n */\n link: string;\n} & Omit<ContextMenuProps, 'items'>;\n\nconst SharingContextMenu = forwardRef<ContextMenuRef, SharingContextMenuProps>(\n ({ link, children, ...contextMenuProps }, ref) => {\n const isTouch = useIsTouch();\n\n const handleImageDownload = useCallback(() => {\n shareWithUrl(\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n SHAREPROVIDER[5].url\n .replace('{url}', encodeURIComponent(link))\n .replace('{linkText}', 'Teilen')\n .replace('{color}', getSite().color.replace('#', '')),\n );\n }, [link]);\n\n const handleShare = useCallback(\n (key: string) => {\n switch (key) {\n case 'whatsapp':\n shareWithUrl(\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n SHAREPROVIDER[0].url.replace(\n '{url}',\n encodeURIComponent(`${link}`.trim()),\n ),\n );\n break;\n case 'facebook':\n shareWithUrl(\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n SHAREPROVIDER[3].url.replace('{url}', encodeURIComponent(link)),\n );\n break;\n case 'twitter':\n shareWithUrl(\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n SHAREPROVIDER[4].url\n .replace('{url}', encodeURIComponent(link))\n .replace('{linkText}', ''),\n );\n break;\n case 'mail':\n if (isTouch) {\n shareWithApp(`${link}`.trim());\n } else {\n shareWithUrl(\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n SHAREPROVIDER[2].url.replace(\n '{url}',\n encodeURIComponent(`${link}`.trim()),\n ),\n );\n }\n break;\n case 'copy':\n copyToClipboard(link);\n break;\n default:\n break;\n }\n },\n [link, isTouch],\n );\n\n const contextMenuItems = [\n {\n icons: ['fa fa-copy'],\n key: 'copy',\n onClick: () => handleShare('copy'),\n text: 'Zwischenablage',\n },\n {\n icons: ['fa-solid fa-brands fa-whatsapp'],\n key: 'whatsapp',\n onClick: () => handleShare('whatsapp'),\n text: 'Whatsapp',\n },\n {\n icons: ['fa-solid fa-brands fa-facebook-f'],\n key: 'facebook',\n onClick: () => handleShare('facebook'),\n text: 'Facebook',\n },\n {\n icons: ['fa-solid fa-brands fa-x-twitter'],\n key: 'twitter',\n onClick: () => handleShare('twitter'),\n text: 'X',\n },\n {\n icons: ['fa fa-envelope'],\n key: 'mail',\n onClick: () => handleShare('mail'),\n text: 'Mail',\n },\n {\n icons: ['fa fa-qrcode'],\n key: 'callingCode',\n onClick: handleImageDownload,\n text: 'Calling Code herunterladen',\n },\n ];\n\n return (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <ContextMenu items={contextMenuItems} ref={ref} {...contextMenuProps}>\n {children}\n </ContextMenu>\n );\n },\n);\n\nSharingContextMenu.displayName = 'SharingContextMenu';\n\nexport default SharingContextMenu;\n"],"mappings":";AAAA,SAASA,OAAO,QAAQ,YAAY;AACpC,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,CAAC,EACD;IACIF,KAAK,EAAE,CAAC,gBAAgB,CAAC;IACzBH,GAAG,EAAE,MAAM;IACXI,OAAO,EAAEA,CAAA,KAAML,WAAW,CAAC,MAAM,CAAC;IAClCM,IAAI,EAAE;EACV,CAAC,EACD;IACIF,KAAK,EAAE,CAAC,cAAc,CAAC;IACvBH,GAAG,EAAE,aAAa;IAClBI,OAAO,EAAEV,mBAAmB;IAC5BW,IAAI,EAAE;EACV,CAAC,CACJ;EAED;IAAA;IACI;IACA1B,KAAA,CAAA2B,aAAA,CAACnB,WAAW,EAAAoB,QAAA;MAACC,KAAK,EAAEN,gBAAiB;MAACV,GAAG,EAAEA;IAAI,GAAKD,gBAAgB,GAC/DD,QACQ;EAAC;AAEtB,CACJ,CAAC;AAEDF,kBAAkB,CAACqB,WAAW,GAAG,oBAAoB;AAErD,eAAerB,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.styles.js","names":["motion","styled","StyledSlider","div","$isDisabled","StyledSliderInput","input","attrs","$background","$isInterval","$thumbWidth","style","pointerEvents","width","background","StyledSliderThumb","$position","$isBigSlider","left","height","StyledSliderThumbLabel","span","$width","minWidth","top","StyledHighlightedStep","$isFilled","theme","$leftPosition"],"sources":["../../../../src/components/slider/Slider.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled from 'styled-components';\nimport type {
|
|
1
|
+
{"version":3,"file":"Slider.styles.js","names":["motion","styled","StyledSlider","div","$isDisabled","StyledSliderInput","input","attrs","$background","$isInterval","$thumbWidth","style","pointerEvents","width","background","StyledSliderThumb","$position","$isBigSlider","left","height","StyledSliderThumbLabel","span","$width","minWidth","top","StyledHighlightedStep","$isFilled","theme","$leftPosition"],"sources":["../../../../src/components/slider/Slider.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledSliderProps = WithTheme<{ $isDisabled?: boolean }>;\n\nexport const StyledSlider = styled.div<StyledSliderProps>`\n width: 100%;\n height: 30px;\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')} !important;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n touch-action: none;\n user-select: none;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n`;\n\ntype StyledSliderInputProps = WithTheme<{\n $background?: string;\n $isInterval: boolean;\n $thumbWidth: number;\n}>;\n\nexport const StyledSliderInput = styled(motion.input).attrs<StyledSliderInputProps>(\n ({ $background, $isInterval, $thumbWidth }) => ({\n style: {\n pointerEvents: $isInterval ? 'none' : 'all',\n width: `calc(100% - ${$thumbWidth}px)`,\n background: $background,\n },\n }),\n)`\n position: absolute;\n border-radius: 100px;\n -webkit-appearance: none;\n\n outline: none;\n cursor: pointer !important;\n z-index: 2;\n appearance: none;\n\n // Slider thumb for chrome\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n\n // slider thumb for firefox\n\n &::-moz-range-thumb {\n width: 50px;\n height: 20px;\n cursor: pointer;\n opacity: 0;\n pointer-events: all;\n position: relative;\n }\n`;\n\ntype StyledSliderThumbProps = WithTheme<{\n $position: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumb = styled.div.attrs<StyledSliderThumbProps>(\n ({ $position, $isBigSlider }) => ({\n style: {\n left: `${$position}px`,\n height: `${$isBigSlider ? 0 : 20}px`,\n },\n }),\n)`\n width: 20px;\n height: 20px;\n cursor: pointer;\n border-radius: 100px;\n background-color: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n pointer-events: none;\n z-index: 5;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n white-space: nowrap;\n top: 5px;\n\n transition: top 0.2s ease 0s;\n`;\n\ntype StyledSliderThumbLabelProps = WithTheme<{\n $position: number;\n $width: number;\n $isBigSlider: boolean;\n}>;\n\nexport const StyledSliderThumbLabel = styled.span.attrs<StyledSliderThumbLabelProps>(\n ({ $position, $isBigSlider, $width }) => ({\n style: {\n minWidth: `${$width}px`,\n top: `-${$isBigSlider ? 56 : 48}px`,\n left: `${$position}px`,\n },\n }),\n)`\n pointer-events: none;\n color: #222;\n\n height: 20px;\n cursor: pointer;\n border-radius: 3px;\n background-color: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);\n z-index: 3;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 16px;\n white-space: nowrap;\n\n transition: top 0.2s ease 0s;\n\n &::after {\n background-color: inherit;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.4);\n content: '';\n height: 14px;\n position: absolute;\n width: 14px;\n z-index: -2;\n left: ${({ $position }) => $position * -1}px;\n transform: rotate(225deg);\n bottom: -7px;\n }\n\n &::before {\n background-color: inherit;\n bottom: 0;\n content: '';\n left: 0;\n position: absolute;\n right: 0;\n border-radius: 3px;\n top: 0;\n z-index: -1;\n }\n`;\n\ntype StyledHighlightedStepProps = WithTheme<{\n $isDisabled: boolean;\n $isFilled: boolean;\n $leftPosition: number;\n}>;\n\nexport const StyledHighlightedStep = styled.div<StyledHighlightedStepProps>`\n background-color: ${({ $isDisabled, $isFilled, theme }) => {\n if ($isDisabled) return 'rgb(215, 215, 215)';\n if ($isFilled) return theme['409'];\n return theme['403'];\n }};\n border-radius: 50%;\n height: 18px;\n left: ${({ $leftPosition }) => $leftPosition}px;\n pointer-events: none;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 18px;\n z-index: 3;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,MAAM,mBAAmB;AAKtC,OAAO,MAAMC,YAAY,GAAGD,MAAM,C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EAAE,IAAIP,YAAY,GAAG,EAAE,GAAG,EAAE,IAAI;IACnCC,IAAI,EAAE,GAAGF,SAAS;EACtB;AACJ,CAAC,CACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,CAAC;EAAEA;AAAU,CAAC,KAAKA,SAAS,GAAG,CAAC,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAQD,OAAO,MAAMS,qBAAqB,GAAGxB,MAAM,CAACE,GAA+B;AAC3E,wBAAwB,CAAC;EAAEC,WAAW;EAAEsB,SAAS;EAAEC;AAAM,CAAC,KAAK;EACvD,IAAIvB,WAAW,EAAE,OAAO,oBAAoB;EAC5C,IAAIsB,SAAS,EAAE,OAAOC,KAAK,CAAC,KAAK,CAAC;EAClC,OAAOA,KAAK,CAAC,KAAK,CAAC;AACvB,CAAC;AACL;AACA;AACA,YAAY,CAAC;EAAEC;AAAc,CAAC,KAAKA,aAAa;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
package/lib/esm/index.js
CHANGED
|
@@ -54,7 +54,9 @@ export { default as SearchInput } from './components/search-input/SearchInput';
|
|
|
54
54
|
export { default as SelectButton } from './components/select-button/SelectButton';
|
|
55
55
|
export { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';
|
|
56
56
|
export { default as SetupWizard } from './components/setup-wizard/SetupWizard';
|
|
57
|
+
export { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';
|
|
57
58
|
export { default as SharingBar } from './components/sharing-bar/SharingBar';
|
|
59
|
+
export { default as SharingButton } from './components/sharing-button/SharingButton';
|
|
58
60
|
export { default as Signature } from './components/signature/Signature';
|
|
59
61
|
export { default as SliderButton } from './components/slider-button/SliderButton';
|
|
60
62
|
export { default as Slider } from './components/slider/Slider';
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","VerificationBadge","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","useColorScheme","BadgeSize","BadgeDesign","useContainer","ContainerAnchor","DropdownDirection","useIsMeasuredClone","useCombinedRefs","Filter","AnimatedNumber","FileList","FileSelect","DropdownBodyWrapper","ComboBox","ComboBoxSize","ContentCard","HighlightSlider","ContextMenu","ContextMenuAlignment","ExpandableContent","FileInput","STREAMINGSERVICE_FILE_TYPES","TSIMG_FILE_TYPES","FilterButton","FilterButtons","GridImage","GroupedImage","Icon","Input","InputSize","List","ListItemContent","ListItem","MentionFinder","MultiActionButton","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","PopupAlignment","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingBar","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ContentCardType","isValidFileType","FilterButtonItemShape","FilterButtonSize","MultiActionButtonHeight","MultiActionButtonStatusType","ClampPosition","useIsTouch","filterFilesByMimeType","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\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 {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport {\n default as ComboBox,\n type ComboBoxTextStyles,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n type ComboBoxRef,\n ComboBoxSize,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } 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 type ListItemRef,\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 MultiActionButton } from './components/multi-action-button/MultiActionButton';\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 { PopupAlignment } from './types/popup';\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 type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } 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/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/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 {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\n"],"mappings":"AAAA;;AAEA,SAASA,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","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","VerificationBadge","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","useColorScheme","BadgeSize","BadgeDesign","useContainer","ContainerAnchor","DropdownDirection","useIsMeasuredClone","useCombinedRefs","Filter","AnimatedNumber","FileList","FileSelect","DropdownBodyWrapper","ComboBox","ComboBoxSize","ContentCard","HighlightSlider","ContextMenu","ContextMenuAlignment","ExpandableContent","FileInput","STREAMINGSERVICE_FILE_TYPES","TSIMG_FILE_TYPES","FilterButton","FilterButtons","GridImage","GroupedImage","Icon","Input","InputSize","List","ListItemContent","ListItem","MentionFinder","MultiActionButton","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","PopupAlignment","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingContextMenu","SharingBar","SharingButton","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ContentCardType","isValidFileType","FilterButtonItemShape","FilterButtonSize","MultiActionButtonHeight","MultiActionButtonStatusType","ClampPosition","useIsTouch","filterFilesByMimeType","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\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 {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport {\n default as ComboBox,\n type ComboBoxTextStyles,\n type IComboBoxItem as ComboBoxItem,\n type IComboBoxItems as ComboBoxItems,\n type ComboBoxRef,\n ComboBoxSize,\n} from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } 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 type ListItemRef,\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 MultiActionButton } from './components/multi-action-button/MultiActionButton';\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 { PopupAlignment } from './types/popup';\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 SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\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 type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } 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/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/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 {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\n"],"mappings":"AAAA;;AAEA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACv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Q,oBAAoB","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';
|
|
2
2
|
import type { DisplayState } from './AmountControl';
|
|
3
3
|
type StyledAmountControlProps = WithTheme<{
|
|
4
4
|
$isDisabled: boolean;
|
|
@@ -11,7 +11,7 @@ type StyledAmountControlInputProps = WithTheme<{
|
|
|
11
11
|
$shouldShowWideInput: boolean;
|
|
12
12
|
}>;
|
|
13
13
|
export declare const StyledInputWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
14
|
-
theme: Theme;
|
|
14
|
+
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
15
15
|
}>> & string;
|
|
16
16
|
export declare const StyledAmountControlInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, StyledAmountControlInputProps>> & string;
|
|
17
17
|
type StyledAmountControlPseudoInputProps = WithTheme<{
|
|
@@ -73,6 +73,13 @@ export type MultiActionButtonActionEvent = {
|
|
|
73
73
|
* Configuration for a single action.
|
|
74
74
|
*/
|
|
75
75
|
export type MultiActionButtonAction = {
|
|
76
|
+
/**
|
|
77
|
+
* Optional background color for this action.
|
|
78
|
+
* @description Overrides the component-level background color for this specific action.
|
|
79
|
+
* If omitted, `MultiActionButton.backgroundColor` is used as fallback.
|
|
80
|
+
* @optional
|
|
81
|
+
*/
|
|
82
|
+
backgroundColor?: string;
|
|
76
83
|
/**
|
|
77
84
|
* Optional color for the icon and label.
|
|
78
85
|
* @description Overrides the default text/icon color. If omitted, the current theme text color is used.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
+
import { SharingContextMenuProps } from '../sharing-context-menu/SharingContextMenu';
|
|
3
|
+
export type SharingButtonProps = PropsWithChildren<Pick<SharingContextMenuProps, 'link' | 'alignment' | 'container'>>;
|
|
4
|
+
declare const SharingButton: FunctionComponent<SharingButtonProps>;
|
|
5
|
+
export default SharingButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledSharingButtonContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContextMenuProps, ContextMenuRef } from '../context-menu/ContextMenu.types';
|
|
3
|
+
export type SharingContextMenuProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The link that should be shared.
|
|
6
|
+
*/
|
|
7
|
+
link: string;
|
|
8
|
+
} & Omit<ContextMenuProps, 'items'>;
|
|
9
|
+
declare const SharingContextMenu: React.ForwardRefExoticComponent<{
|
|
10
|
+
/**
|
|
11
|
+
* The link that should be shared.
|
|
12
|
+
*/
|
|
13
|
+
link: string;
|
|
14
|
+
} & Omit<ContextMenuProps, "items"> & React.RefAttributes<ContextMenuRef>>;
|
|
15
|
+
export default SharingContextMenu;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -57,7 +57,9 @@ export { default as SelectButton } from './components/select-button/SelectButton
|
|
|
57
57
|
export { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';
|
|
58
58
|
export { default as SetupWizard } from './components/setup-wizard/SetupWizard';
|
|
59
59
|
export type { SetupWizardRef } from './components/setup-wizard/SetupWizard';
|
|
60
|
+
export { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';
|
|
60
61
|
export { default as SharingBar } from './components/sharing-bar/SharingBar';
|
|
62
|
+
export { default as SharingButton } from './components/sharing-button/SharingButton';
|
|
61
63
|
export { default as Signature } from './components/signature/Signature';
|
|
62
64
|
export type { SignatureRef } from './components/signature/Signature';
|
|
63
65
|
export { default as SliderButton } from './components/slider-button/SliderButton';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.16",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "15a2ac91eb5ee5dbd203d70cb396c2a9fcf905ae"
|
|
90
90
|
}
|