@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.
Files changed (43) hide show
  1. package/lib/cjs/components/accordion/accordion-content/AccordionContent.js.map +1 -1
  2. package/lib/cjs/components/amount-control/AmountControl.styles.js.map +1 -1
  3. package/lib/cjs/components/icon/Icon.styles.js.map +1 -1
  4. package/lib/cjs/components/multi-action-button/MultiActionButton.js +2 -2
  5. package/lib/cjs/components/multi-action-button/MultiActionButton.js.map +1 -1
  6. package/lib/cjs/components/multi-action-button/MultiActionButton.types.js.map +1 -1
  7. package/lib/cjs/components/search-input/SearchInput.js.map +1 -1
  8. package/lib/cjs/components/sharing-bar/SharingBar.js +5 -85
  9. package/lib/cjs/components/sharing-bar/SharingBar.js.map +1 -1
  10. package/lib/cjs/components/sharing-button/SharingButton.js +43 -0
  11. package/lib/cjs/components/sharing-button/SharingButton.js.map +1 -0
  12. package/lib/cjs/components/sharing-button/SharingButton.styles.js +11 -0
  13. package/lib/cjs/components/sharing-button/SharingButton.styles.js.map +1 -0
  14. package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js +107 -0
  15. package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js.map +1 -0
  16. package/lib/cjs/components/slider/Slider.styles.js.map +1 -1
  17. package/lib/cjs/index.js +14 -0
  18. package/lib/cjs/index.js.map +1 -1
  19. package/lib/esm/components/accordion/accordion-content/AccordionContent.js.map +1 -1
  20. package/lib/esm/components/amount-control/AmountControl.styles.js.map +1 -1
  21. package/lib/esm/components/icon/Icon.styles.js.map +1 -1
  22. package/lib/esm/components/multi-action-button/MultiActionButton.js +2 -2
  23. package/lib/esm/components/multi-action-button/MultiActionButton.js.map +1 -1
  24. package/lib/esm/components/multi-action-button/MultiActionButton.types.js.map +1 -1
  25. package/lib/esm/components/search-input/SearchInput.js.map +1 -1
  26. package/lib/esm/components/sharing-bar/SharingBar.js +3 -82
  27. package/lib/esm/components/sharing-bar/SharingBar.js.map +1 -1
  28. package/lib/esm/components/sharing-button/SharingButton.js +35 -0
  29. package/lib/esm/components/sharing-button/SharingButton.js.map +1 -0
  30. package/lib/esm/components/sharing-button/SharingButton.styles.js +5 -0
  31. package/lib/esm/components/sharing-button/SharingButton.styles.js.map +1 -0
  32. package/lib/esm/components/sharing-context-menu/SharingContextMenu.js +99 -0
  33. package/lib/esm/components/sharing-context-menu/SharingContextMenu.js.map +1 -0
  34. package/lib/esm/components/slider/Slider.styles.js.map +1 -1
  35. package/lib/esm/index.js +2 -0
  36. package/lib/esm/index.js.map +1 -1
  37. package/lib/types/components/amount-control/AmountControl.styles.d.ts +2 -2
  38. package/lib/types/components/multi-action-button/MultiActionButton.types.d.ts +7 -0
  39. package/lib/types/components/sharing-button/SharingButton.d.ts +5 -0
  40. package/lib/types/components/sharing-button/SharingButton.styles.d.ts +1 -0
  41. package/lib/types/components/sharing-context-menu/SharingContextMenu.d.ts +15 -0
  42. package/lib/types/index.d.ts +2 -0
  43. package/package.json +2 -2
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _chaynsApi = require("chayns-api");
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _sharingBar = require("../../constants/sharingBar");
10
+ var _environment = require("../../utils/environment");
11
+ var _sharingBar2 = require("../../utils/sharingBar");
12
+ var _ContextMenu = _interopRequireDefault(require("../context-menu/ContextMenu"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
+ 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); }
16
+ const SharingContextMenu = /*#__PURE__*/(0, _react.forwardRef)(({
17
+ link,
18
+ children,
19
+ ...contextMenuProps
20
+ }, ref) => {
21
+ const isTouch = (0, _environment.useIsTouch)();
22
+ const handleImageDownload = (0, _react.useCallback)(() => {
23
+ (0, _sharingBar2.shareWithUrl)(
24
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
25
+ // @ts-ignore
26
+ _sharingBar.SHAREPROVIDER[5].url.replace('{url}', encodeURIComponent(link)).replace('{linkText}', 'Teilen').replace('{color}', (0, _chaynsApi.getSite)().color.replace('#', '')));
27
+ }, [link]);
28
+ const handleShare = (0, _react.useCallback)(key => {
29
+ switch (key) {
30
+ case 'whatsapp':
31
+ (0, _sharingBar2.shareWithUrl)(
32
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
33
+ // @ts-ignore
34
+ _sharingBar.SHAREPROVIDER[0].url.replace('{url}', encodeURIComponent(`${link}`.trim())));
35
+ break;
36
+ case 'facebook':
37
+ (0, _sharingBar2.shareWithUrl)(
38
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
39
+ // @ts-ignore
40
+ _sharingBar.SHAREPROVIDER[3].url.replace('{url}', encodeURIComponent(link)));
41
+ break;
42
+ case 'twitter':
43
+ (0, _sharingBar2.shareWithUrl)(
44
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
45
+ // @ts-ignore
46
+ _sharingBar.SHAREPROVIDER[4].url.replace('{url}', encodeURIComponent(link)).replace('{linkText}', ''));
47
+ break;
48
+ case 'mail':
49
+ if (isTouch) {
50
+ (0, _sharingBar2.shareWithApp)(`${link}`.trim());
51
+ } else {
52
+ (0, _sharingBar2.shareWithUrl)(
53
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
54
+ // @ts-ignore
55
+ _sharingBar.SHAREPROVIDER[2].url.replace('{url}', encodeURIComponent(`${link}`.trim())));
56
+ }
57
+ break;
58
+ case 'copy':
59
+ (0, _sharingBar2.copyToClipboard)(link);
60
+ break;
61
+ default:
62
+ break;
63
+ }
64
+ }, [link, isTouch]);
65
+ const contextMenuItems = [{
66
+ icons: ['fa fa-copy'],
67
+ key: 'copy',
68
+ onClick: () => handleShare('copy'),
69
+ text: 'Zwischenablage'
70
+ }, {
71
+ icons: ['fa-solid fa-brands fa-whatsapp'],
72
+ key: 'whatsapp',
73
+ onClick: () => handleShare('whatsapp'),
74
+ text: 'Whatsapp'
75
+ }, {
76
+ icons: ['fa-solid fa-brands fa-facebook-f'],
77
+ key: 'facebook',
78
+ onClick: () => handleShare('facebook'),
79
+ text: 'Facebook'
80
+ }, {
81
+ icons: ['fa-solid fa-brands fa-x-twitter'],
82
+ key: 'twitter',
83
+ onClick: () => handleShare('twitter'),
84
+ text: 'X'
85
+ }, {
86
+ icons: ['fa fa-envelope'],
87
+ key: 'mail',
88
+ onClick: () => handleShare('mail'),
89
+ text: 'Mail'
90
+ }, {
91
+ icons: ['fa fa-qrcode'],
92
+ key: 'callingCode',
93
+ onClick: handleImageDownload,
94
+ text: 'Calling Code herunterladen'
95
+ }];
96
+ return (
97
+ /*#__PURE__*/
98
+ // eslint-disable-next-line react/jsx-props-no-spreading
99
+ _react.default.createElement(_ContextMenu.default, _extends({
100
+ items: contextMenuItems,
101
+ ref: ref
102
+ }, contextMenuProps), children)
103
+ );
104
+ });
105
+ SharingContextMenu.displayName = 'SharingContextMenu';
106
+ var _default = exports.default = SharingContextMenu;
107
+ //# sourceMappingURL=SharingContextMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SharingContextMenu.js","names":["_chaynsApi","require","_react","_interopRequireWildcard","_sharingBar","_environment","_sharingBar2","_ContextMenu","_interopRequireDefault","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","SharingContextMenu","forwardRef","link","children","contextMenuProps","ref","isTouch","useIsTouch","handleImageDownload","useCallback","shareWithUrl","SHAREPROVIDER","url","replace","encodeURIComponent","getSite","color","handleShare","key","trim","shareWithApp","copyToClipboard","contextMenuItems","icons","onClick","text","createElement","items","displayName","_default","exports"],"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,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF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AAkC,CAAC;IAC3CL,GAAG,EAAE,UAAU;IACfM,OAAO,EAAEA,CAAA,KAAMP,WAAW,CAAC,UAAU,CAAC;IACtCQ,IAAI,EAAE;EACV,CAAC,EACD;IACIF,KAAK,EAAE,CAAC,iCAAiC,CAAC;IAC1CL,GAAG,EAAE,SAAS;IACdM,OAAO,EAAEA,CAAA,KAAMP,WAAW,CAAC,SAAS,CAAC;IACrCQ,IAAI,EAAE;EACV,CAAC,EACD;IACIF,KAAK,EAAE,CAAC,gBAAgB,CAAC;IACzBL,GAAG,EAAE,MAAM;IACXM,OAAO,EAAEA,CAAA,KAAMP,WAAW,CAAC,MAAM,CAAC;IAClCQ,IAAI,EAAE;EACV,CAAC,EACD;IACIF,KAAK,EAAE,CAAC,cAAc,CAAC;IACvBL,GAAG,EAAE,aAAa;IAClBM,OAAO,EAAEhB,mBAAmB;IAC5BiB,IAAI,EAAE;EACV,CAAC,CACJ;EAED;IAAA;IACI;IACAzD,MAAA,CAAAS,OAAA,CAAAiD,aAAA,CAACrD,YAAA,CAAAI,OAAW,EAAAiB,QAAA;MAACiC,KAAK,EAAEL,gBAAiB;MAACjB,GAAG,EAAEA;IAAI,GAAKD,gBAAgB,GAC/DD,QACQ;EAAC;AAEtB,CACJ,CAAC;AAEDH,kBAAkB,CAAC4B,WAAW,GAAG,oBAAoB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArD,OAAA,GAEvCuB,kBAAkB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.styles.js","names":["_react","require","_styledComponents","_interopRequireDefault","e","__esModule","default","StyledSlider","exports","styled","div","$isDisabled","StyledSliderInput","motion","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 { Theme, 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,IAAAA,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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAQM,MAAMG,sBAAsB,GAAApB,OAAA,CAAAoB,sBAAA,GAAGnB,yBAAM,CAACoB,IAAI,CAACd,KAAK,CACnD,CAAC;EAAES,SAAS;EAAEC,YAAY;EAAEK;AAAO,CAAC,MAAM;EACtCX,KAAK,EAAE;IACHY,QAAQ,EAAE,GAAGD,MAAM,IAAI;IACvBE,GAAG,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;AAQM,MAAMS,qBAAqB,GAAAzB,OAAA,CAAAyB,qBAAA,GAAGxB,yBAAM,CAACC,GAA+B;AAC3E,wBAAwB,CAAC;EAAEC,WAAW;EAAEuB,SAAS;EAAEC;AAAM,CAAC,KAAK;EACvD,IAAIxB,WAAW,EAAE,OAAO,oBAAoB;EAC5C,IAAIuB,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":[]}
1
+ {"version":3,"file":"Slider.styles.js","names":["_react","require","_styledComponents","_interopRequireDefault","e","__esModule","default","StyledSlider","exports","styled","div","$isDisabled","StyledSliderInput","motion","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,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKhC,MAAMG,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGE,yBAAM,CAACC,GAAsB;AACzD;AACA;AACA,cAAc,CAAC;EAAEC;AAAY,CAAC,KAAMA,WAAW,GAAG,SAAS,GAAG,SAAU;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,CAAC;EAAEA;AAAY,CAAC,KAAMA,WAAW,GAAG,GAAG,GAAG,CAAE;AAC3D,CAAC;AAQM,MAAMC,iBAAiB,GAAAJ,OAAA,CAAAI,iBAAA,GAAG,IAAAH,yBAAM,EAACI,aAAM,CAACC,KAAK,CAAC,CAACC,KAAK,CACvD,CAAC;EAAEC,WAAW;EAAEC,WAAW;EAAEC;AAAY,CAAC,MAAM;EAC5CC,KAAK,EAAE;IACHC,aAAa,EAAEH,WAAW,GAAG,MAAM,GAAG,KAAK;IAC3CI,KAAK,EAAE,eAAeH,WAAW,KAAK;IACtCI,UAAU,EAAEN;EAChB;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;AACA;AACA;AACA,CAAC;AAOM,MAAMO,iBAAiB,GAAAf,OAAA,CAAAe,iBAAA,GAAGd,yBAAM,CAACC,GAAG,CAAC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;AACA,YAAY,CAAC;EAAEC;AAAc,CAAC,KAAKA,aAAa;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
package/lib/cjs/index.js CHANGED
@@ -387,6 +387,18 @@ Object.defineProperty(exports, "SharingBar", {
387
387
  return _SharingBar.default;
388
388
  }
389
389
  });
390
+ Object.defineProperty(exports, "SharingButton", {
391
+ enumerable: true,
392
+ get: function () {
393
+ return _SharingButton.default;
394
+ }
395
+ });
396
+ Object.defineProperty(exports, "SharingContextMenu", {
397
+ enumerable: true,
398
+ get: function () {
399
+ return _SharingContextMenu.default;
400
+ }
401
+ });
390
402
  Object.defineProperty(exports, "Signature", {
391
403
  enumerable: true,
392
404
  get: function () {
@@ -591,7 +603,9 @@ var _SearchInput = _interopRequireDefault(require("./components/search-input/Sea
591
603
  var _SelectButton = _interopRequireDefault(require("./components/select-button/SelectButton"));
592
604
  var _SetupWizardItem = _interopRequireDefault(require("./components/setup-wizard/setup-wizard-item/SetupWizardItem"));
593
605
  var _SetupWizard = _interopRequireDefault(require("./components/setup-wizard/SetupWizard"));
606
+ var _SharingContextMenu = _interopRequireDefault(require("./components/sharing-context-menu/SharingContextMenu"));
594
607
  var _SharingBar = _interopRequireDefault(require("./components/sharing-bar/SharingBar"));
608
+ var _SharingButton = _interopRequireDefault(require("./components/sharing-button/SharingButton"));
595
609
  var _Signature = _interopRequireDefault(require("./components/signature/Signature"));
596
610
  var _SliderButton = _interopRequireDefault(require("./components/slider-button/SliderButton"));
597
611
  var _Slider = _interopRequireDefault(require("./components/slider/Slider"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingBar","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAA7E,uBAAA4E,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingContextMenu","_SharingBar","_SharingButton","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAvE,uBAAA,YAAAA,CAAAqE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAA/E,uBAAA8E,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionContent.js","names":["getDevice","React","StyledAccordionContent","AccordionContent","children","maxHeight","onScroll","shouldPreventBottomSpace","browser","createElement","className","$browser","name","$maxHeight","$shouldPreventBottomSpace","displayName"],"sources":["../../../../../src/components/accordion/accordion-content/AccordionContent.tsx"],"sourcesContent":["import { getDevice } from 'chayns-api';\nimport React, { FC, ReactNode, UIEvent } from 'react';\nimport { BrowserName } from '../../../types/chayns';\nimport { AccordionContext } from '../Accordion';\nimport { StyledAccordionContent } from './AccordionContent.styles';\n\nexport type AccordionContentProps = {\n /**\n * The content of the accordion content element\n */\n children: ReactNode;\n /**\n * Maximum height of the element. This automatically makes the content of the element scrollable.\n */\n maxHeight?: number;\n /**\n * Function that is executed when the element will be scrolled\n */\n onScroll?: (event: UIEvent<HTMLDivElement>) => void;\n /**\n * Whether the bottom space should be removed.\n */\n shouldPreventBottomSpace?: boolean;\n};\n\nconst AccordionContent: FC<AccordionContentProps> = ({\n children,\n maxHeight,\n onScroll,\n shouldPreventBottomSpace = false,\n}) => {\n const { browser } = getDevice();\n\n return (\n <StyledAccordionContent\n className=\"beta-chayns-accordion-content\"\n $browser={browser?.name as BrowserName}\n $maxHeight={maxHeight}\n onScroll={onScroll}\n $shouldPreventBottomSpace={shouldPreventBottomSpace}\n >\n {children}\n </StyledAccordionContent>\n );\n};\n\nAccordionContent.displayName = 'AccordionContent';\n\nexport default AccordionContent;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,YAAY;AACtC,OAAOC,KAAK,MAAkC,OAAO;AAGrD,SAASC,sBAAsB,QAAQ,2BAA2B;AAqBlE,MAAMC,gBAA2C,GAAGA,CAAC;EACjDC,QAAQ;EACRC,SAAS;EACTC,QAAQ;EACRC,wBAAwB,GAAG;AAC/B,CAAC,KAAK;EACF,MAAM;IAAEC;EAAQ,CAAC,GAAGR,SAAS,CAAC,CAAC;EAE/B,oBACIC,KAAA,CAAAQ,aAAA,CAACP,sBAAsB;IACnBQ,SAAS,EAAC,+BAA+B;IACzCC,QAAQ,EAAEH,OAAO,EAAEI,IAAoB;IACvCC,UAAU,EAAER,SAAU;IACtBC,QAAQ,EAAEA,QAAS;IACnBQ,yBAAyB,EAAEP;EAAyB,GAEnDH,QACmB,CAAC;AAEjC,CAAC;AAEDD,gBAAgB,CAACY,WAAW,GAAG,kBAAkB;AAEjD,eAAeZ,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"AccordionContent.js","names":["getDevice","React","StyledAccordionContent","AccordionContent","children","maxHeight","onScroll","shouldPreventBottomSpace","browser","createElement","className","$browser","name","$maxHeight","$shouldPreventBottomSpace","displayName"],"sources":["../../../../../src/components/accordion/accordion-content/AccordionContent.tsx"],"sourcesContent":["import { getDevice } from 'chayns-api';\nimport React, { FC, ReactNode, UIEvent } from 'react';\nimport { BrowserName } from '../../../types/chayns';\nimport { StyledAccordionContent } from './AccordionContent.styles';\n\nexport type AccordionContentProps = {\n /**\n * The content of the accordion content element\n */\n children: ReactNode;\n /**\n * Maximum height of the element. This automatically makes the content of the element scrollable.\n */\n maxHeight?: number;\n /**\n * Function that is executed when the element will be scrolled\n */\n onScroll?: (event: UIEvent<HTMLDivElement>) => void;\n /**\n * Whether the bottom space should be removed.\n */\n shouldPreventBottomSpace?: boolean;\n};\n\nconst AccordionContent: FC<AccordionContentProps> = ({\n children,\n maxHeight,\n onScroll,\n shouldPreventBottomSpace = false,\n}) => {\n const { browser } = getDevice();\n\n return (\n <StyledAccordionContent\n className=\"beta-chayns-accordion-content\"\n $browser={browser?.name as BrowserName}\n $maxHeight={maxHeight}\n onScroll={onScroll}\n $shouldPreventBottomSpace={shouldPreventBottomSpace}\n >\n {children}\n </StyledAccordionContent>\n );\n};\n\nAccordionContent.displayName = 'AccordionContent';\n\nexport default AccordionContent;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,YAAY;AACtC,OAAOC,KAAK,MAAkC,OAAO;AAErD,SAASC,sBAAsB,QAAQ,2BAA2B;AAqBlE,MAAMC,gBAA2C,GAAGA,CAAC;EACjDC,QAAQ;EACRC,SAAS;EACTC,QAAQ;EACRC,wBAAwB,GAAG;AAC/B,CAAC,KAAK;EACF,MAAM;IAAEC;EAAQ,CAAC,GAAGR,SAAS,CAAC,CAAC;EAE/B,oBACIC,KAAA,CAAAQ,aAAA,CAACP,sBAAsB;IACnBQ,SAAS,EAAC,+BAA+B;IACzCC,QAAQ,EAAEH,OAAO,EAAEI,IAAoB;IACvCC,UAAU,EAAER,SAAU;IACtBC,QAAQ,EAAEA,QAAS;IACnBQ,yBAAyB,EAAEP;EAAyB,GAEnDH,QACmB,CAAC;AAEjC,CAAC;AAEDD,gBAAgB,CAACY,WAAW,GAAG,kBAAkB;AAEjD,eAAeZ,gBAAgB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"AmountControl.styles.js","names":["motion","styled","css","StyledAmountControl","div","theme","$isDisabled","StyledInputWrapper","StyledAmountControlInput","input","$shouldShowWideInput","$hasFocus","$displayState","$shouldShowIcon","StyledAmountControlPseudoInput","$shouldShowRightIcon","StyledMotionAmountControlButton","button","$color"],"sources":["../../../../src/components/amount-control/AmountControl.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css } from 'styled-components';\nimport type { Theme, WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { DisplayState } from './AmountControl';\n\ntype StyledAmountControlProps = WithTheme<{\n $isDisabled: boolean;\n}>;\n\nexport const StyledAmountControl = styled.div<StyledAmountControlProps>`\n background-color: ${({ theme }: StyledAmountControlProps) => theme['202']};\n display: flex;\n width: fit-content;\n border-radius: 3px;\n overflow: hidden;\n transition: opacity 0.2s ease;\n height: 28px;\n\n ${({ $isDisabled }) =>\n $isDisabled &&\n css`\n opacity: 0.5;\n pointer-events: none;\n `}\n`;\n\ntype StyledAmountControlInputProps = WithTheme<{\n $displayState: DisplayState;\n $shouldShowIcon: boolean;\n $hasFocus: boolean;\n $shouldShowWideInput: boolean;\n}>;\n\nexport const StyledInputWrapper = styled.div<WithTheme<unknown>>`\n background-color: ${({ theme }) => theme['408']};\n`;\n\nexport const StyledAmountControlInput = styled.input<StyledAmountControlInputProps>`\n background-color: rgba(255, 255, 255, 0.2);\n color: white;\n border: none;\n height: 28px;\n width: ${({ $shouldShowWideInput }) => ($shouldShowWideInput ? 90 : 55)}px;\n text-align: center;\n cursor: ${({ $hasFocus }) => ($hasFocus ? 'text' : 'pointer')};\n\n ${({ $displayState }) =>\n $displayState === 'maxAmount' &&\n css`\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n `}\n ${({ $displayState, $shouldShowIcon }) =>\n $displayState === 'default' &&\n !$shouldShowIcon &&\n css`\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n `};\n`;\n\ntype StyledAmountControlPseudoInputProps = WithTheme<{\n $shouldShowWideInput: boolean;\n $shouldShowRightIcon: boolean;\n}>;\n\nexport const StyledAmountControlPseudoInput = styled.div<StyledAmountControlPseudoInputProps>`\n background-color: rgba(255, 255, 255, 0.2);\n color: white;\n border: none;\n height: 28px;\n min-width: ${({ $shouldShowWideInput }) => ($shouldShowWideInput ? 90 : 55)}px;\n padding: 1px 8px;\n text-align: center;\n cursor: pointer;\n user-select: none;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n border-bottom-left-radius: ${({ $shouldShowRightIcon }) =>\n $shouldShowRightIcon ? '3px' : 'unset'};\n border-top-left-radius: ${({ $shouldShowRightIcon }) =>\n $shouldShowRightIcon ? '3px' : 'unset'};\n`;\n\ntype StyledAmountControlButtonProps = WithTheme<{\n $isDisabled: boolean;\n $color?: string;\n}>;\n\nexport const StyledMotionAmountControlButton = styled(\n motion.button,\n)<StyledAmountControlButtonProps>`\n align-items: center;\n background-color: ${({ theme, $color }: StyledAmountControlButtonProps) =>\n $color ?? theme['408']};\n display: flex;\n justify-content: center;\n overflow: hidden;\n transition: background-color 0.2s ease-in-out;\n\n ${({ $isDisabled }) =>\n $isDisabled &&\n css`\n opacity: 0.5;\n `}\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAQ/C,OAAO,MAAMC,mBAAmB,GAAGF,MAAM,CAACG,GAA6B;AACvE,wBAAwB,CAAC;EAAEC;AAAgC,CAAC,KAAKA,KAAK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;EAAEZ,KAAK;EAAEa;AAAuC,CAAC,KAClEA,MAAM,IAAIb,KAAK,CAAC,KAAK,CAAC;AAC9B;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC;EAAEC;AAAY,CAAC,KACdA,WAAW,IACXJ,GAAG;AACX;AACA,SAAS;AACT,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"AmountControl.styles.js","names":["motion","styled","css","StyledAmountControl","div","theme","$isDisabled","StyledInputWrapper","StyledAmountControlInput","input","$shouldShowWideInput","$hasFocus","$displayState","$shouldShowIcon","StyledAmountControlPseudoInput","$shouldShowRightIcon","StyledMotionAmountControlButton","button","$color"],"sources":["../../../../src/components/amount-control/AmountControl.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { DisplayState } from './AmountControl';\n\ntype StyledAmountControlProps = WithTheme<{\n $isDisabled: boolean;\n}>;\n\nexport const StyledAmountControl = styled.div<StyledAmountControlProps>`\n background-color: ${({ theme }: StyledAmountControlProps) => theme['202']};\n display: flex;\n width: fit-content;\n border-radius: 3px;\n overflow: hidden;\n transition: opacity 0.2s ease;\n height: 28px;\n\n ${({ $isDisabled }) =>\n $isDisabled &&\n css`\n opacity: 0.5;\n pointer-events: none;\n `}\n`;\n\ntype StyledAmountControlInputProps = WithTheme<{\n $displayState: DisplayState;\n $shouldShowIcon: boolean;\n $hasFocus: boolean;\n $shouldShowWideInput: boolean;\n}>;\n\nexport const StyledInputWrapper = styled.div<WithTheme<unknown>>`\n background-color: ${({ theme }) => theme['408']};\n`;\n\nexport const StyledAmountControlInput = styled.input<StyledAmountControlInputProps>`\n background-color: rgba(255, 255, 255, 0.2);\n color: white;\n border: none;\n height: 28px;\n width: ${({ $shouldShowWideInput }) => ($shouldShowWideInput ? 90 : 55)}px;\n text-align: center;\n cursor: ${({ $hasFocus }) => ($hasFocus ? 'text' : 'pointer')};\n\n ${({ $displayState }) =>\n $displayState === 'maxAmount' &&\n css`\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n `}\n ${({ $displayState, $shouldShowIcon }) =>\n $displayState === 'default' &&\n !$shouldShowIcon &&\n css`\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n `};\n`;\n\ntype StyledAmountControlPseudoInputProps = WithTheme<{\n $shouldShowWideInput: boolean;\n $shouldShowRightIcon: boolean;\n}>;\n\nexport const StyledAmountControlPseudoInput = styled.div<StyledAmountControlPseudoInputProps>`\n background-color: rgba(255, 255, 255, 0.2);\n color: white;\n border: none;\n height: 28px;\n min-width: ${({ $shouldShowWideInput }) => ($shouldShowWideInput ? 90 : 55)}px;\n padding: 1px 8px;\n text-align: center;\n cursor: pointer;\n user-select: none;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n border-bottom-left-radius: ${({ $shouldShowRightIcon }) =>\n $shouldShowRightIcon ? '3px' : 'unset'};\n border-top-left-radius: ${({ $shouldShowRightIcon }) =>\n $shouldShowRightIcon ? '3px' : 'unset'};\n`;\n\ntype StyledAmountControlButtonProps = WithTheme<{\n $isDisabled: boolean;\n $color?: string;\n}>;\n\nexport const StyledMotionAmountControlButton = styled(\n motion.button,\n)<StyledAmountControlButtonProps>`\n align-items: center;\n background-color: ${({ theme, $color }: StyledAmountControlButtonProps) =>\n $color ?? theme['408']};\n display: flex;\n justify-content: center;\n overflow: hidden;\n transition: background-color 0.2s ease-in-out;\n\n ${({ $isDisabled }) =>\n $isDisabled &&\n css`\n opacity: 0.5;\n `}\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAQ/C,OAAO,MAAMC,mBAAmB,GAAGF,MAAM,CAACG,GAA6B;AACvE,wBAAwB,CAAC;EAAEC;AAAgC,CAAC,KAAKA,KAAK,CAAC,KAAK,CAAC;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC;EAA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AAC;AAC9B;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC;EAAEC;AAAY,CAAC,KACdA,WAAW,IACXJ,GAAG;AACX;AACA,SAAS;AACT,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.styles.js","names":["styled","css","StyledIconWrapper","span","$isDisabled","$isOnClick","$size","StyledIcon","i","$color","theme","iconColor","text","$isStacked","undefined","$fontSize","StyledUnicodeIcon","headline","$icon"],"sources":["../../../../src/components/icon/Icon.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport { motion } from 'motion/react';\n\ntype StyledIconWrapperProps = {\n $isDisabled?: boolean;\n $isOnClick: boolean;\n $size: number;\n};\n\nexport const StyledIconWrapper = styled.span<StyledIconWrapperProps>`\n align-items: center;\n cursor: ${({ $isDisabled, $isOnClick }) =>\n $isOnClick && !$isDisabled ? 'pointer' : 'inherit'};\n display: inline-flex;\n min-height: ${({ $size }) => `${$size}px`};\n justify-content: center;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n position: relative;\n transition: opacity 0.3s ease;\n min-width: ${({ $size }) => `${$size}px`};\n\n // To insure that stacked icons have the same size as normal icons.\n &&.fa-stack {\n height: fit-content;\n width: fit-content;\n line-height: ${({ $size }) => $size}px;\n }\n`;\n\ntype StyledIconProps = WithTheme<{\n $fontSize: number;\n $isStacked?: boolean;\n $color?: string;\n $size: number;\n}>;\n\nexport const StyledIcon = styled.i<StyledIconProps>`\n color: ${({ $color, theme }: StyledIconProps) => $color || theme.iconColor || theme.text};\n display: ${({ $isStacked }) => ($isStacked ? undefined : 'inline-flex')};\n font-size: ${({ $fontSize }) => `${$fontSize}px`};\n\n ${({ $fontSize, $size }) =>\n $fontSize !== $size &&\n css`\n top: 50%;\n transform: translateY(-50%);\n `}\n`;\n\ntype StyledUnicodeIconProps = WithTheme<{ $icon: string }>;\n\nexport const StyledUnicodeIcon = styled.i<StyledUnicodeIconProps>`\n align-items: center;\n justify-content: center;\n display: flex;\n color: ${({ theme }: StyledUnicodeIconProps) => theme.iconColor || theme.headline};\n\n &:before {\n content: ${({ $icon }) => `\"\\\\${$icon}\"`};\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAU/C,OAAO,MAAMC,iBAAiB,GAAGF,MAAM,CAACG,IAA4B;AACpE;AACA,cAAc,CAAC;EAAEC,WAAW;EAAEC;AAAW,CAAC,KAClCA,UAAU,IAAI,CAACD,WAAW,GAAG,SAAS,GAAG,SAAS;AAC1D;AACA,kBAAkB,CAAC;EAAEE;AAAM,CAAC,KAAK,GAAGA,KAAK,IAAI;AAC7C;AACA,eAAe,CAAC;EAAEF;AAAY,CAAC,KAAMA,WAAW,GAAG,GAAG,GAAG,CAAE;AAC3D;AACA;AACA,iBAAiB,CAAC;EAAEE;AAAM,CAAC,KAAK,GAAGA,KAAK,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA,uBAAuB,CAAC;EAAEA;AAAM,CAAC,KAAKA,KAAK;AAC3C;AACA,CAAC;AASD,OAAO,MAAMC,UAAU,GAAGP,MAAM,CAACQ,CAAkB;AACnD,aAAa,CAAC;EAAEC,MAAM;EAAEC;AAAuB,CAAC,KAAKD,MAAM,IAAIC,KAAK,CAACC,SAAS,IAAID,KAAK,CAACE,IAAI;AAC5F,eAAe,CAAC;EAAEC;AAAW,CAAC,KAAMA,UAAU,GAAGC,SAAS,GAAG,aAAc;AAC3E,iBAAiB,CAAC;EAAEC;AAAU,CAAC,KAAK,GAAGA,SAAS,IAAI;AACpD;AACA,MAAM,CAAC;EAAEA,SAAS;EAAET;AAAM,CAAC,KACnBS,SAAS,KAAKT,KAAK,IACnBL,GAAG;AACX;AACA;AACA,SAAS;AACT,CAAC;AAID,OAAO,MAAMe,iBAAiB,GAAGhB,MAAM,CAACQ,CAAyB;AACjE;AACA;AACA;AACA,aAAa,CAAC;EAAEE;AAA8B,CAAC,KAAKA,KAAK,CAACC,SAAS,IAAID,KAAK,CAACO,QAAQ;AACrF;AACA;AACA,mBAAmB,CAAC;EAAEC;AAAM,CAAC,KAAK,MAAMA,KAAK,GAAG;AAChD;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Icon.styles.js","names":["styled","css","StyledIconWrapper","span","$isDisabled","$isOnClick","$size","StyledIcon","i","$color","theme","iconColor","text","$isStacked","undefined","$fontSize","StyledUnicodeIcon","headline","$icon"],"sources":["../../../../src/components/icon/Icon.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledIconWrapperProps = {\n $isDisabled?: boolean;\n $isOnClick: boolean;\n $size: number;\n};\n\nexport const StyledIconWrapper = styled.span<StyledIconWrapperProps>`\n align-items: center;\n cursor: ${({ $isDisabled, $isOnClick }) =>\n $isOnClick && !$isDisabled ? 'pointer' : 'inherit'};\n display: inline-flex;\n min-height: ${({ $size }) => `${$size}px`};\n justify-content: center;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n position: relative;\n transition: opacity 0.3s ease;\n min-width: ${({ $size }) => `${$size}px`};\n\n // To insure that stacked icons have the same size as normal icons.\n &&.fa-stack {\n height: fit-content;\n width: fit-content;\n line-height: ${({ $size }) => $size}px;\n }\n`;\n\ntype StyledIconProps = WithTheme<{\n $fontSize: number;\n $isStacked?: boolean;\n $color?: string;\n $size: number;\n}>;\n\nexport const StyledIcon = styled.i<StyledIconProps>`\n color: ${({ $color, theme }: StyledIconProps) => $color || theme.iconColor || theme.text};\n display: ${({ $isStacked }) => ($isStacked ? undefined : 'inline-flex')};\n font-size: ${({ $fontSize }) => `${$fontSize}px`};\n\n ${({ $fontSize, $size }) =>\n $fontSize !== $size &&\n css`\n top: 50%;\n transform: translateY(-50%);\n `}\n`;\n\ntype StyledUnicodeIconProps = WithTheme<{ $icon: string }>;\n\nexport const StyledUnicodeIcon = styled.i<StyledUnicodeIconProps>`\n align-items: center;\n justify-content: center;\n display: flex;\n color: ${({ theme }: StyledUnicodeIconProps) => theme.iconColor || theme.headline};\n\n &:before {\n content: ${({ $icon }) => `\"\\\\${$icon}\"`};\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAS/C,OAAO,MAAMC,iBAAiB,GAAGF,MAAM,CAACG,IAA4B;AACpE;AACA,cAAc,CAAC;EAAEC,WAAW;EAAEC;AAAW,CAAC,KAClCA,UAAU,IAAI,CAACD,WAAW,GAAG,SAAS,GAAG,SAAS;AAC1D;AACA,kBAAkB,CAAC;EAAEE;AAAM,CAAC,KAAK,GAAGA,KAAK,IAAI;AAC7C;AACA,eAAe,CAAC;EAAEF;AAAY,CAAC,KAAMA,WAAW,GAAG,GAAG,GAAG,CAAE;AAC3D;AACA;AACA,iBAAiB,CAAC;EAAEE;AAAM,CAAC,KAAK,GAAGA,KAAK,IAAI;AAC5C;AACA;AACA;AACA;AACA;AACA,uBAAuB,CAAC;EAAEA;AAAM,CAAC,KAAKA,KAAK;AAC3C;AACA,CAAC;AASD,OAAO,MAAMC,UAAU,GAAGP,MAAM,CAACQ,CAAkB;AACnD,aAAa,CAAC;EAAEC,MAAM;EAAEC;AAAuB,CAAC,KAAKD,MAAM,IAAIC,KAAK,CAACC,SAAS,IAAID,KAAK,CAACE,IAAI;AAC5F,eAAe,CAAC;EAAEC;AAAW,CAAC,KAAMA,UAAU,GAAGC,SAAS,GAAG,aAAc;AAC3E,iBAAiB,CAAC;EAAEC;AAAU,CAAC,KAAK,GAAGA,SAAS,IAAI;AACpD;AACA,MAAM,CAAC;EAAEA,SAAS;EAAET;AAAM,CAAC,KACnBS,SAAS,KAAKT,KAAK,IACnBL,GAAG;AACX;AACA;AACA,SAAS;AACT,CAAC;AAID,OAAO,MAAMe,iBAAiB,GAAGhB,MAAM,CAACQ,CAAyB;AACjE;AACA;AACA;AACA,aAAa,CAAC;EAAEE;AAA8B,CAAC,KAAKA,KAAK,CAACC,SAAS,IAAID,KAAK,CAACO,QAAQ;AACrF;AACA;AACA,mBAAmB,CAAC;EAAEC;AAAM,CAAC,KAAK,MAAMA,KAAK,GAAG;AAChD;AACA,CAAC","ignoreList":[]}
@@ -142,7 +142,7 @@ const MultiActionButton = ({
142
142
  }, /*#__PURE__*/React.createElement(ActionButton, {
143
143
  action: primaryAction,
144
144
  actionType: "primary",
145
- backgroundColor: backgroundColor,
145
+ backgroundColor: primaryAction.backgroundColor ?? backgroundColor,
146
146
  isCollapsed: isCollapsed,
147
147
  isDisabled: isDisabled,
148
148
  isShrunk: hasSecondaryAction && isSecondaryExpanded,
@@ -156,7 +156,7 @@ const MultiActionButton = ({
156
156
  }), /*#__PURE__*/React.createElement(ActionButton, {
157
157
  action: secondaryAction,
158
158
  actionType: "secondary",
159
- backgroundColor: backgroundColor,
159
+ backgroundColor: secondaryAction.backgroundColor ?? backgroundColor,
160
160
  isCollapsed: isCollapsed,
161
161
  isDisabled: isDisabled,
162
162
  isExpanded: isSecondaryExpanded,
@@ -1 +1 @@
1
- {"version":3,"file":"MultiActionButton.js","names":["clsx","React","useCallback","useEffect","useRef","useState","useIsTouch","ActionButton","StyledMultiActionButton","StyledSeparator","MultiActionButtonHeight","MultiActionButton","backgroundColor","className","extendedTimeoutMs","gapColor","height","Medium","isCollapsed","isDisabled","primaryAction","secondaryAction","shouldUseFullWidth","width","isExtendedByClick","setIsExtendedByClick","isSecondaryExpanded","setIsSecondaryExpanded","isSecondaryHovered","setIsSecondaryHovered","autoCollapseTimeoutRef","isTouch","hasSecondaryAction","Boolean","shouldUseContentWidth","resolvedWidth","resetAutoCollapseTimeout","current","window","clearTimeout","setTimeout","expandSecondaryByClick","handlePrimaryClick","event","payload","action","isExtended","onClick","handleSecondaryClick","handleSecondaryMouseEnter","handleSecondaryMouseLeave","isSecondaryLabelVisible","createElement","style","maxWidth","actionType","isShrunk","isSolo","showLabel","Fragment","$gapColor","isExpanded","isHidden","onMouseEnter","onMouseLeave","displayName"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React, { FC, MouseEvent, useCallback, useEffect, useRef, useState } from 'react';\nimport { useIsTouch } from '../../utils/environment';\nimport ActionButton from './action-button/ActionButton';\nimport { StyledMultiActionButton, StyledSeparator } from './MultiActionButton.styles';\nimport { MultiActionButtonHeight } from './MultiActionButton.types';\nimport type {\n MultiActionButtonActionEvent,\n MultiActionButtonProps,\n} from './MultiActionButton.types';\n\n/**\n * Multi-action button with optional secondary action that can expand on hover/click.\n */\nconst MultiActionButton: FC<MultiActionButtonProps> = ({\n backgroundColor,\n className,\n extendedTimeoutMs = 3000,\n gapColor,\n height = MultiActionButtonHeight.Medium,\n isCollapsed = false,\n isDisabled = false,\n primaryAction,\n secondaryAction,\n shouldUseFullWidth,\n width,\n}) => {\n const [isExtendedByClick, setIsExtendedByClick] = useState(false);\n const [isSecondaryExpanded, setIsSecondaryExpanded] = useState(false);\n const [isSecondaryHovered, setIsSecondaryHovered] = useState(false);\n\n const autoCollapseTimeoutRef = useRef<number | null>(null);\n\n const isTouch = useIsTouch();\n\n const hasSecondaryAction = Boolean(secondaryAction);\n const shouldUseContentWidth = !width && !shouldUseFullWidth;\n\n const resolvedWidth = isCollapsed\n ? height\n : (width ?? (shouldUseFullWidth ? '100%' : 'fit-content'));\n\n /**\n * Clears and restarts the auto-collapse timer used after click-triggered expansion.\n */\n const resetAutoCollapseTimeout = useCallback(() => {\n if (autoCollapseTimeoutRef.current) {\n window.clearTimeout(autoCollapseTimeoutRef.current);\n }\n\n if (extendedTimeoutMs <= 0) {\n autoCollapseTimeoutRef.current = null;\n return;\n }\n\n autoCollapseTimeoutRef.current = window.setTimeout(() => {\n setIsSecondaryExpanded(false);\n setIsExtendedByClick(false);\n }, extendedTimeoutMs);\n }, [extendedTimeoutMs]);\n\n /**\n * Expands the secondary action and remembers that it originated from a click.\n */\n const expandSecondaryByClick = useCallback(() => {\n setIsSecondaryExpanded(true);\n setIsExtendedByClick(true);\n resetAutoCollapseTimeout();\n }, [resetAutoCollapseTimeout]);\n\n /**\n * Cleanup timers on unmount.\n */\n useEffect(\n () => () => {\n if (autoCollapseTimeoutRef.current) {\n window.clearTimeout(autoCollapseTimeoutRef.current);\n }\n },\n [],\n );\n\n /**\n * Collapsing the control should also reset any temporary expansion state.\n */\n useEffect(() => {\n if (isCollapsed) {\n setIsSecondaryExpanded(false);\n setIsExtendedByClick(false);\n }\n }, [isCollapsed]);\n\n /**\n * Handler for the primary action button.\n */\n const handlePrimaryClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (isDisabled || primaryAction.isDisabled) {\n return;\n }\n\n const payload: MultiActionButtonActionEvent = {\n action: 'primary',\n event,\n isExtended: isSecondaryExpanded,\n isTouch,\n };\n\n primaryAction.onClick?.(payload);\n },\n [isDisabled, isSecondaryExpanded, isTouch, primaryAction],\n );\n\n /**\n * Handler for the secondary action button.\n */\n const handleSecondaryClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (!secondaryAction || isCollapsed || isDisabled || secondaryAction.isDisabled) {\n return;\n }\n\n const payload: MultiActionButtonActionEvent = {\n action: 'secondary',\n event,\n isExtended: isSecondaryExpanded,\n isTouch,\n };\n\n secondaryAction.onClick?.(payload);\n expandSecondaryByClick();\n },\n [\n expandSecondaryByClick,\n isCollapsed,\n isDisabled,\n isSecondaryExpanded,\n isTouch,\n secondaryAction,\n ],\n );\n\n /**\n * Desktop hover behavior keeps the secondary action expanded while hovered.\n */\n const handleSecondaryMouseEnter = useCallback(() => {\n if (\n !secondaryAction ||\n isCollapsed ||\n isTouch ||\n isDisabled ||\n secondaryAction.isDisabled\n ) {\n return;\n }\n\n setIsSecondaryHovered(true);\n if (!isExtendedByClick) {\n setIsSecondaryExpanded(true);\n }\n }, [isCollapsed, isDisabled, isExtendedByClick, isTouch, secondaryAction]);\n\n const handleSecondaryMouseLeave = useCallback(() => {\n if (isTouch) {\n return;\n }\n\n setIsSecondaryHovered(false);\n if (!isExtendedByClick && !isCollapsed) {\n setIsSecondaryExpanded(false);\n }\n }, [isCollapsed, isExtendedByClick, isTouch]);\n\n /**\n * Secondary label is visible when expanded or when hovered (desktop only).\n */\n const isSecondaryLabelVisible = isSecondaryExpanded || (!isTouch && isSecondaryHovered);\n\n return (\n <StyledMultiActionButton\n className={clsx('beta-chayns-multi-action', className)}\n style={{ maxWidth: '100%', width: resolvedWidth }}\n >\n <ActionButton\n action={primaryAction}\n actionType=\"primary\"\n backgroundColor={backgroundColor}\n isCollapsed={isCollapsed}\n isDisabled={isDisabled}\n isShrunk={hasSecondaryAction && isSecondaryExpanded}\n isSolo={!hasSecondaryAction && !isCollapsed}\n onClick={handlePrimaryClick}\n showLabel={!isCollapsed && (!hasSecondaryAction || !isSecondaryExpanded)}\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n {secondaryAction && (\n <>\n {!isCollapsed && <StyledSeparator $gapColor={gapColor} />}\n <ActionButton\n action={secondaryAction}\n actionType=\"secondary\"\n backgroundColor={backgroundColor}\n isCollapsed={isCollapsed}\n isDisabled={isDisabled}\n isExpanded={isSecondaryExpanded}\n isHidden={isCollapsed}\n onClick={handleSecondaryClick}\n onMouseEnter={handleSecondaryMouseEnter}\n onMouseLeave={handleSecondaryMouseLeave}\n showLabel={isSecondaryLabelVisible}\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n </>\n )}\n </StyledMultiActionButton>\n );\n};\n\nMultiActionButton.displayName = 'MultiActionButton';\n\nexport default MultiActionButton;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,MAAM;AACvB,OAAOC,KAAK,IAAoBC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACvF,SAASC,UAAU,QAAQ,yBAAyB;AACpD,OAAOC,YAAY,MAAM,8BAA8B;AACvD,SAASC,uBAAuB,EAAEC,eAAe,QAAQ,4BAA4B;AAC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":3,"file":"MultiActionButton.js","names":["clsx","React","useCallback","useEffect","useRef","useState","useIsTouch","ActionButton","StyledMultiActionButton","StyledSeparator","MultiActionButtonHeight","MultiActionButton","backgroundColor","className","extendedTimeoutMs","gapColor","height","Medium","isCollapsed","isDisabled","primaryAction","secondaryAction","shouldUseFullWidth","width","isExtendedByClick","setIsExtendedByClick","isSecondaryExpanded","setIsSecondaryExpanded","isSecondaryHovered","setIsSecondaryHovered","autoCollapseTimeoutRef","isTouch","hasSecondaryAction","Boolean","shouldUseContentWidth","resolvedWidth","resetAutoCollapseTimeout","current","window","clearTimeout","setTimeout","expandSecondaryByClick","handlePrimaryClick","event","payload","action","isExtended","onClick","handleSecondaryClick","handleSecondaryMouseEnter","handleSecondaryMouseLeave","isSecondaryLabelVisible","createElement","style","maxWidth","actionType","isShrunk","isSolo","showLabel","Fragment","$gapColor","isExpanded","isHidden","onMouseEnter","onMouseLeave","displayName"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React, { FC, MouseEvent, useCallback, useEffect, useRef, useState } from 'react';\nimport { useIsTouch } from '../../utils/environment';\nimport ActionButton from './action-button/ActionButton';\nimport { StyledMultiActionButton, StyledSeparator } from './MultiActionButton.styles';\nimport { MultiActionButtonHeight } from './MultiActionButton.types';\nimport type {\n MultiActionButtonActionEvent,\n MultiActionButtonProps,\n} from './MultiActionButton.types';\n\n/**\n * Multi-action button with optional secondary action that can expand on hover/click.\n */\nconst MultiActionButton: FC<MultiActionButtonProps> = ({\n backgroundColor,\n className,\n extendedTimeoutMs = 3000,\n gapColor,\n height = MultiActionButtonHeight.Medium,\n isCollapsed = false,\n isDisabled = false,\n primaryAction,\n secondaryAction,\n shouldUseFullWidth,\n width,\n}) => {\n const [isExtendedByClick, setIsExtendedByClick] = useState(false);\n const [isSecondaryExpanded, setIsSecondaryExpanded] = useState(false);\n const [isSecondaryHovered, setIsSecondaryHovered] = useState(false);\n\n const autoCollapseTimeoutRef = useRef<number | null>(null);\n\n const isTouch = useIsTouch();\n\n const hasSecondaryAction = Boolean(secondaryAction);\n const shouldUseContentWidth = !width && !shouldUseFullWidth;\n\n const resolvedWidth = isCollapsed\n ? height\n : (width ?? (shouldUseFullWidth ? '100%' : 'fit-content'));\n\n /**\n * Clears and restarts the auto-collapse timer used after click-triggered expansion.\n */\n const resetAutoCollapseTimeout = useCallback(() => {\n if (autoCollapseTimeoutRef.current) {\n window.clearTimeout(autoCollapseTimeoutRef.current);\n }\n\n if (extendedTimeoutMs <= 0) {\n autoCollapseTimeoutRef.current = null;\n return;\n }\n\n autoCollapseTimeoutRef.current = window.setTimeout(() => {\n setIsSecondaryExpanded(false);\n setIsExtendedByClick(false);\n }, extendedTimeoutMs);\n }, [extendedTimeoutMs]);\n\n /**\n * Expands the secondary action and remembers that it originated from a click.\n */\n const expandSecondaryByClick = useCallback(() => {\n setIsSecondaryExpanded(true);\n setIsExtendedByClick(true);\n resetAutoCollapseTimeout();\n }, [resetAutoCollapseTimeout]);\n\n /**\n * Cleanup timers on unmount.\n */\n useEffect(\n () => () => {\n if (autoCollapseTimeoutRef.current) {\n window.clearTimeout(autoCollapseTimeoutRef.current);\n }\n },\n [],\n );\n\n /**\n * Collapsing the control should also reset any temporary expansion state.\n */\n useEffect(() => {\n if (isCollapsed) {\n setIsSecondaryExpanded(false);\n setIsExtendedByClick(false);\n }\n }, [isCollapsed]);\n\n /**\n * Handler for the primary action button.\n */\n const handlePrimaryClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (isDisabled || primaryAction.isDisabled) {\n return;\n }\n\n const payload: MultiActionButtonActionEvent = {\n action: 'primary',\n event,\n isExtended: isSecondaryExpanded,\n isTouch,\n };\n\n primaryAction.onClick?.(payload);\n },\n [isDisabled, isSecondaryExpanded, isTouch, primaryAction],\n );\n\n /**\n * Handler for the secondary action button.\n */\n const handleSecondaryClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (!secondaryAction || isCollapsed || isDisabled || secondaryAction.isDisabled) {\n return;\n }\n\n const payload: MultiActionButtonActionEvent = {\n action: 'secondary',\n event,\n isExtended: isSecondaryExpanded,\n isTouch,\n };\n\n secondaryAction.onClick?.(payload);\n expandSecondaryByClick();\n },\n [\n expandSecondaryByClick,\n isCollapsed,\n isDisabled,\n isSecondaryExpanded,\n isTouch,\n secondaryAction,\n ],\n );\n\n /**\n * Desktop hover behavior keeps the secondary action expanded while hovered.\n */\n const handleSecondaryMouseEnter = useCallback(() => {\n if (\n !secondaryAction ||\n isCollapsed ||\n isTouch ||\n isDisabled ||\n secondaryAction.isDisabled\n ) {\n return;\n }\n\n setIsSecondaryHovered(true);\n if (!isExtendedByClick) {\n setIsSecondaryExpanded(true);\n }\n }, [isCollapsed, isDisabled, isExtendedByClick, isTouch, secondaryAction]);\n\n const handleSecondaryMouseLeave = useCallback(() => {\n if (isTouch) {\n return;\n }\n\n setIsSecondaryHovered(false);\n if (!isExtendedByClick && !isCollapsed) {\n setIsSecondaryExpanded(false);\n }\n }, [isCollapsed, isExtendedByClick, isTouch]);\n\n /**\n * Secondary label is visible when expanded or when hovered (desktop only).\n */\n const isSecondaryLabelVisible = isSecondaryExpanded || (!isTouch && isSecondaryHovered);\n\n return (\n <StyledMultiActionButton\n className={clsx('beta-chayns-multi-action', className)}\n style={{ maxWidth: '100%', width: resolvedWidth }}\n >\n <ActionButton\n action={primaryAction}\n actionType=\"primary\"\n backgroundColor={primaryAction.backgroundColor ?? backgroundColor}\n isCollapsed={isCollapsed}\n isDisabled={isDisabled}\n isShrunk={hasSecondaryAction && isSecondaryExpanded}\n isSolo={!hasSecondaryAction && !isCollapsed}\n onClick={handlePrimaryClick}\n showLabel={!isCollapsed && (!hasSecondaryAction || !isSecondaryExpanded)}\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n {secondaryAction && (\n <>\n {!isCollapsed && <StyledSeparator $gapColor={gapColor} />}\n <ActionButton\n action={secondaryAction}\n actionType=\"secondary\"\n backgroundColor={secondaryAction.backgroundColor ?? backgroundColor}\n isCollapsed={isCollapsed}\n isDisabled={isDisabled}\n isExpanded={isSecondaryExpanded}\n isHidden={isCollapsed}\n onClick={handleSecondaryClick}\n onMouseEnter={handleSecondaryMouseEnter}\n onMouseLeave={handleSecondaryMouseLeave}\n showLabel={isSecondaryLabelVisible}\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n </>\n )}\n </StyledMultiActionButton>\n );\n};\n\nMultiActionButton.displayName = 'MultiActionButton';\n\nexport default MultiActionButton;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,MAAM;AACvB,OAAOC,KAAK,IAAoBC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACvF,SAASC,UAAU,QAAQ,yBAAyB;AACpD,OAAOC,YAAY,MAAM,8BAA8B;AACvD,SAASC,uBAAuB,EAAEC,eAAe,QAAQ,4BAA4B;AACrF,SAASC,uBAAuB,QAAQ,2BAA2B;AAMnE;AACA;AACA;AACA,MAAMC,iBAA6C,GAAGA,CAAC;EACnDC,eAAe;EACfC,SAAS;EACTC,iBAAiB,GAAG,IAAI;EACxBC,QAAQ;EACRC,MAAM,GAAGN,uBAAuB,CAACO,MAAM;EACvCC,WAAW,GAAG,KAAK;EACnBC,UAAU,GAAG,KAAK;EAClBC,aAAa;EACbC,eAAe;EACfC,kBAAkB;EAClBC;AACJ,CAAC,KAAK;EACF,MAAM,CAACC,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGpB,QAAQ,CAAC,KAAK,CAAC;EACjE,MAAM,CAACqB,mBAAmB,EAAEC,sBAAsB,CAAC,GAAGtB,QAAQ,CAAC,KAAK,CAAC;EACrE,MAAM,CAACuB,kBAAkB,EAAEC,qBAAqB,CAAC,GAAGxB,QAAQ,CAAC,KAAK,CAAC;EAEnE,MAAMyB,sBAAsB,GAAG1B,MAAM,CAAgB,IAAI,CAAC;EAE1D,MAAM2B,OAAO,GAAGzB,UAAU,CAA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AAAmD,aAAA,CAAC3C,eAAe;IAACmD,SAAS,EAAE7C;EAAS,CAAE,CAAC,eACzDd,KAAA,CAAAmD,aAAA,CAAC7C,YAAY;IACTsC,MAAM,EAAExB,eAAgB;IACxBkC,UAAU,EAAC,WAAW;IACtB3C,eAAe,EAAES,eAAe,CAACT,eAAe,IAAIA,eAAgB;IACpEM,WAAW,EAAEA,WAAY;IACzBC,UAAU,EAAEA,UAAW;IACvB0C,UAAU,EAAEnC,mBAAoB;IAChCoC,QAAQ,EAAE5C,WAAY;IACtB6B,OAAO,EAAEC,oBAAqB;IAC9Be,YAAY,EAAEd,yBAA0B;IACxCe,YAAY,EAAEd,yBAA0B;IACxCQ,SAAS,EAAEP,uBAAwB;IACnCjB,qBAAqB,EAAEA,qBAAsB;IAC7ClB,MAAM,EAAEA;EAAO,CAClB,CACH,CAEe,CAAC;AAElC,CAAC;AAEDL,iBAAiB,CAACsD,WAAW,GAAG,mBAAmB;AAEnD,eAAetD,iBAAiB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"MultiActionButton.types.js","names":["MultiActionButtonStatusType","MultiActionButtonHeight"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.types.ts"],"sourcesContent":["import type { MouseEvent, ReactElement, ReactNode } from 'react';\nimport type { MotionValue } from 'motion/react';\n\n/**\n * Supported status types for the multi action button.\n */\nexport enum MultiActionButtonStatusType {\n /**\n * Pulsing background effect.\n * @description Applies a subtle animated overlay on the action background to draw attention.\n * This is intended for temporary states like recording or live activity indicators.\n */\n Pulse = 'pulse',\n}\n\n/**\n * Supported heights for the multi action button.\n */\nexport enum MultiActionButtonHeight {\n /**\n * Medium height (42px).\n */\n Medium = 42,\n /**\n * Large height (48px).\n */\n Large = 48,\n}\n\n/**\n * Minimal status configuration for an action.\n */\nexport type MultiActionButtonActionStatus = {\n /**\n * Optional pulse colors for the animation.\n * @description Defines the two colors for the pulsing background animation. If not provided, defaults to ['#A50000', '#630000'].\n * @optional\n */\n pulseColors?: [string, string];\n /**\n * Status type to apply.\n * @description Selects the visual emphasis type applied to the action. The component currently\n * supports a pulsing overlay, and additional types may be added later.\n * @optional\n */\n type?: MultiActionButtonStatusType;\n};\n\n/**\n * Event payload emitted on action click.\n */\nexport type MultiActionButtonActionEvent = {\n /**\n * Which action was clicked.\n * @description Indicates whether the primary or secondary action fired. This is helpful when\n * sharing a handler between both actions.\n */\n action: 'primary' | 'secondary';\n /**\n * Original click event.\n * @description Useful to access modifier keys, prevent default, or stop propagation.\n */\n event: MouseEvent<HTMLButtonElement>;\n /**\n * Whether the secondary action is currently extended.\n * @description Useful for flows that need to distinguish between a collapsed and expanded\n * secondary action, especially on touch devices.\n */\n isExtended: boolean;\n /**\n * Whether the device is considered touch.\n * @description Derived from pointer capabilities and used to decide between hover and click behavior.\n */\n isTouch: boolean;\n};\n\n/**\n * Configuration for a single action.\n */\nexport type MultiActionButtonAction = {\n /**\n * Optional color for the icon and label.\n * @description Overrides the default text/icon color. If omitted, the current theme text color is used.\n * @optional\n */\n color?: string;\n /**\n * The icon for the action.\n * @description Can be a FontAwesome class string (e.g., 'fa fa-microphone') or a custom React element.\n * The icon is always rendered inside a fixed-size slot to keep alignment stable.\n */\n icon: string | ReactElement;\n /**\n * Whether the action is disabled.\n * @description Disabled actions do not respond to hover or click and are visually dimmed.\n * @optional\n */\n isDisabled?: boolean;\n /**\n * Optional reason shown in a tooltip when the action is disabled.\n * @description Use this to explain why the action is currently unavailable.\n * @optional\n */\n disabledReason?: string;\n /**\n * The optional label for the action.\n * @description The label is shown next to the icon and will be truncated with ellipsis when\n * there is not enough horizontal space.\n * @optional\n */\n label: ReactNode;\n /**\n * Click handler for the action.\n * @description Receives a payload that includes the action type, extension state, and device info.\n * This allows external logic to decide whether the click should trigger an action immediately.\n * @optional\n */\n onClick?: (info: MultiActionButtonActionEvent) => void;\n /**\n * Status effect configuration for the action.\n * @description Controls optional visual emphasis like pulsing, without changing layout or sizing.\n * @optional\n */\n status?: MultiActionButtonActionStatus;\n};\n\n/**\n * Props for the MultiActionButton component.\n */\nexport type MultiActionButtonProps = {\n /**\n * Optional background color for both actions.\n * @description Overrides the default background color for the action buttons. This is useful\n * when the button is used on different backgrounds or when a specific brand color is needed.\n * If omitted, the primary color from the theme is used.\n * @default theme.primary\n * @optional\n */\n backgroundColor?: string;\n /**\n * Additional class name for the wrapper element.\n * @description Useful for custom styling or testing hooks.\n * @optional\n */\n className?: string;\n /**\n * Timeout in ms before the secondary action collapses after a click.\n * @description Set to 0 to keep the secondary action extended until the user collapses it.\n * @example\n * <MultiActionButton\n * primaryAction={primaryAction}\n * secondaryAction={secondaryAction}\n * extendedTimeoutMs={0}\n * />\n * @default 3000\n * @optional\n */\n extendedTimeoutMs?: number;\n /**\n * Height of the button.\n * @description Controls the height of the button. Use values from MultiActionButtonHeight enum or custom number.\n * @default MultiActionButtonHeight.Medium\n * @optional\n */\n height?: number;\n /**\n * Optional color for the 1px separator line between actions.\n * @description Defaults to theme.cw-body-background and falls back to #fff if not available.\n * @optional\n */\n gapColor?: string;\n /**\n * Whether the button is collapsed to a single icon.\n * @description When collapsed, only the primary icon is shown and the overall width shrinks to a circle.\n * Use this to provide compact states or toolbar modes.\n * @default false\n * @optional\n */\n isCollapsed?: boolean;\n /**\n * Whether the whole control is disabled.\n * @description Disables interactions for both actions, including hover expansion and clicks.\n * @default false\n * @optional\n */\n isDisabled?: boolean;\n /**\n * Primary action configuration.\n * @description Required action shown on the left side (or as the only action when no secondary is provided).\n */\n primaryAction: MultiActionButtonAction;\n /**\n * Secondary action configuration.\n * @description Optional action shown on the right side. When present, it can expand on hover or click.\n * @optional\n */\n secondaryAction?: MultiActionButtonAction;\n /**\n * Whether the button should take the full width of its parent.\n * @description When true, the control stretches to 100% width unless `width` is provided.\n * @optional\n */\n shouldUseFullWidth?: boolean;\n /**\n * Optional width override for the whole button.\n * @description Can be a fixed number or a MotionValue for external animations. When omitted,\n * the width is driven by the content unless `shouldUseFullWidth` is true.\n * @optional\n */\n width?: number | MotionValue<number>;\n};\n"],"mappings":"AAGA;AACA;AACA;AACA,WAAYA,2BAA2B,0BAA3BA,2BAA2B;EACnC;AACJ;AACA;AACA;AACA;EALYA,2BAA2B;EAAA,OAA3BA,2BAA2B;AAAA;;AASvC;AACA;AACA;AACA,WAAYC,uBAAuB,0BAAvBA,uBAAuB;EAC/B;AACJ;AACA;EAHYA,uBAAuB,CAAvBA,uBAAuB;EAK/B;AACJ;AACA;EAPYA,uBAAuB,CAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;;AAWnC;AACA;AACA;;AAiBA;AACA;AACA;;AA0BA;AACA;AACA;;AAgDA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"MultiActionButton.types.js","names":["MultiActionButtonStatusType","MultiActionButtonHeight"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.types.ts"],"sourcesContent":["import type { MouseEvent, ReactElement, ReactNode } from 'react';\nimport type { MotionValue } from 'motion/react';\n\n/**\n * Supported status types for the multi action button.\n */\nexport enum MultiActionButtonStatusType {\n /**\n * Pulsing background effect.\n * @description Applies a subtle animated overlay on the action background to draw attention.\n * This is intended for temporary states like recording or live activity indicators.\n */\n Pulse = 'pulse',\n}\n\n/**\n * Supported heights for the multi action button.\n */\nexport enum MultiActionButtonHeight {\n /**\n * Medium height (42px).\n */\n Medium = 42,\n /**\n * Large height (48px).\n */\n Large = 48,\n}\n\n/**\n * Minimal status configuration for an action.\n */\nexport type MultiActionButtonActionStatus = {\n /**\n * Optional pulse colors for the animation.\n * @description Defines the two colors for the pulsing background animation. If not provided, defaults to ['#A50000', '#630000'].\n * @optional\n */\n pulseColors?: [string, string];\n /**\n * Status type to apply.\n * @description Selects the visual emphasis type applied to the action. The component currently\n * supports a pulsing overlay, and additional types may be added later.\n * @optional\n */\n type?: MultiActionButtonStatusType;\n};\n\n/**\n * Event payload emitted on action click.\n */\nexport type MultiActionButtonActionEvent = {\n /**\n * Which action was clicked.\n * @description Indicates whether the primary or secondary action fired. This is helpful when\n * sharing a handler between both actions.\n */\n action: 'primary' | 'secondary';\n /**\n * Original click event.\n * @description Useful to access modifier keys, prevent default, or stop propagation.\n */\n event: MouseEvent<HTMLButtonElement>;\n /**\n * Whether the secondary action is currently extended.\n * @description Useful for flows that need to distinguish between a collapsed and expanded\n * secondary action, especially on touch devices.\n */\n isExtended: boolean;\n /**\n * Whether the device is considered touch.\n * @description Derived from pointer capabilities and used to decide between hover and click behavior.\n */\n isTouch: boolean;\n};\n\n/**\n * Configuration for a single action.\n */\nexport type MultiActionButtonAction = {\n /**\n * Optional background color for this action.\n * @description Overrides the component-level background color for this specific action.\n * If omitted, `MultiActionButton.backgroundColor` is used as fallback.\n * @optional\n */\n backgroundColor?: string;\n /**\n * Optional color for the icon and label.\n * @description Overrides the default text/icon color. If omitted, the current theme text color is used.\n * @optional\n */\n color?: string;\n /**\n * The icon for the action.\n * @description Can be a FontAwesome class string (e.g., 'fa fa-microphone') or a custom React element.\n * The icon is always rendered inside a fixed-size slot to keep alignment stable.\n */\n icon: string | ReactElement;\n /**\n * Whether the action is disabled.\n * @description Disabled actions do not respond to hover or click and are visually dimmed.\n * @optional\n */\n isDisabled?: boolean;\n /**\n * Optional reason shown in a tooltip when the action is disabled.\n * @description Use this to explain why the action is currently unavailable.\n * @optional\n */\n disabledReason?: string;\n /**\n * The optional label for the action.\n * @description The label is shown next to the icon and will be truncated with ellipsis when\n * there is not enough horizontal space.\n * @optional\n */\n label: ReactNode;\n /**\n * Click handler for the action.\n * @description Receives a payload that includes the action type, extension state, and device info.\n * This allows external logic to decide whether the click should trigger an action immediately.\n * @optional\n */\n onClick?: (info: MultiActionButtonActionEvent) => void;\n /**\n * Status effect configuration for the action.\n * @description Controls optional visual emphasis like pulsing, without changing layout or sizing.\n * @optional\n */\n status?: MultiActionButtonActionStatus;\n};\n\n/**\n * Props for the MultiActionButton component.\n */\nexport type MultiActionButtonProps = {\n /**\n * Optional background color for both actions.\n * @description Overrides the default background color for the action buttons. This is useful\n * when the button is used on different backgrounds or when a specific brand color is needed.\n * If omitted, the primary color from the theme is used.\n * @default theme.primary\n * @optional\n */\n backgroundColor?: string;\n /**\n * Additional class name for the wrapper element.\n * @description Useful for custom styling or testing hooks.\n * @optional\n */\n className?: string;\n /**\n * Timeout in ms before the secondary action collapses after a click.\n * @description Set to 0 to keep the secondary action extended until the user collapses it.\n * @example\n * <MultiActionButton\n * primaryAction={primaryAction}\n * secondaryAction={secondaryAction}\n * extendedTimeoutMs={0}\n * />\n * @default 3000\n * @optional\n */\n extendedTimeoutMs?: number;\n /**\n * Height of the button.\n * @description Controls the height of the button. Use values from MultiActionButtonHeight enum or custom number.\n * @default MultiActionButtonHeight.Medium\n * @optional\n */\n height?: number;\n /**\n * Optional color for the 1px separator line between actions.\n * @description Defaults to theme.cw-body-background and falls back to #fff if not available.\n * @optional\n */\n gapColor?: string;\n /**\n * Whether the button is collapsed to a single icon.\n * @description When collapsed, only the primary icon is shown and the overall width shrinks to a circle.\n * Use this to provide compact states or toolbar modes.\n * @default false\n * @optional\n */\n isCollapsed?: boolean;\n /**\n * Whether the whole control is disabled.\n * @description Disables interactions for both actions, including hover expansion and clicks.\n * @default false\n * @optional\n */\n isDisabled?: boolean;\n /**\n * Primary action configuration.\n * @description Required action shown on the left side (or as the only action when no secondary is provided).\n */\n primaryAction: MultiActionButtonAction;\n /**\n * Secondary action configuration.\n * @description Optional action shown on the right side. When present, it can expand on hover or click.\n * @optional\n */\n secondaryAction?: MultiActionButtonAction;\n /**\n * Whether the button should take the full width of its parent.\n * @description When true, the control stretches to 100% width unless `width` is provided.\n * @optional\n */\n shouldUseFullWidth?: boolean;\n /**\n * Optional width override for the whole button.\n * @description Can be a fixed number or a MotionValue for external animations. When omitted,\n * the width is driven by the content unless `shouldUseFullWidth` is true.\n * @optional\n */\n width?: number | MotionValue<number>;\n};\n"],"mappings":"AAGA;AACA;AACA;AACA,WAAYA,2BAA2B,0BAA3BA,2BAA2B;EACnC;AACJ;AACA;AACA;AACA;EALYA,2BAA2B;EAAA,OAA3BA,2BAA2B;AAAA;;AASvC;AACA;AACA;AACA,WAAYC,uBAAuB,0BAAvBA,uBAAuB;EAC/B;AACJ;AACA;EAHYA,uBAAuB,CAAvBA,uBAAuB;EAK/B;AACJ;AACA;EAPYA,uBAAuB,CAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;;AAWnC;AACA;AACA;;AAiBA;AACA;AACA;;AA0BA;AACA;AACA;;AAuDA;AACA;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.js","names":["AnimatePresence","React","forwardRef","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","Icon","Input","InputSize","StyledMotionSearchInputContentWrapper","StyledMotionSearchInputIconWrapper","StyledMotionSearchInputIconWrapperContent","StyledSearchInput","StyledSearchInputPseudoElement","useTheme","useElementSize","SearchInput","iconColor","isActive","onActiveChange","onChange","onKeyDown","placeholder","shouldUseAbsolutePositioning","size","Medium","value","width","widthValue","ref","isSearchInputActive","setIsSearchInputActive","trim","inputRef","pseudoRef","parentWidth","theme","handleBackIconClick","handleSearchIconClick","current","focus","blur","createElement","Fragment","className","$size","$shouldUseAbsolutePositioning","onClick","initial","animate","opacity","exit","key","transition","duration","type","shouldShowClearIcon","position","id","tabIndex","e","preventDefault","color","icons","leftElement","text","displayName"],"sources":["../../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, {\n ChangeEventHandler,\n CSSProperties,\n FC,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport Icon from '../icon/Icon';\nimport Input, { InputRef, InputSize } from '../input/Input';\nimport {\n StyledMotionSearchInputContentWrapper,\n StyledMotionSearchInputIconWrapper,\n StyledMotionSearchInputIconWrapperContent,\n StyledSearchInput,\n StyledSearchInputPseudoElement,\n} from './SearchInput.styles';\nimport { useTheme } from 'styled-components';\nimport type { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport { useElementSize } from '../../hooks/element';\n\nexport type SearchInputProps = {\n /**\n * Color of the icon\n */\n iconColor?: CSSProperties['color'];\n /**\n * Force the active state of the input and override the internal state\n */\n isActive?: boolean;\n /**\n * Function that is executed when the active state of the input changes\n */\n onActiveChange?: (isActive: boolean) => void;\n /**\n * Function that is executed when the text of the input changes\n */\n onChange: ChangeEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when a key is pressed\n */\n onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n /**\n * Placeholder for the input field\n */\n placeholder?: string;\n /**\n * Whether the SearchInput should be positioned absolute.\n */\n shouldUseAbsolutePositioning?: boolean;\n /**\n * The size of the input field\n */\n size?: InputSize;\n /**\n * Value if the input field should be controlled\n */\n value?: string;\n /**\n * The width of the parent.\n */\n width?: number;\n};\n\nconst SearchInput = forwardRef<InputRef, SearchInputProps>(\n (\n {\n iconColor,\n isActive,\n onActiveChange,\n onChange,\n onKeyDown,\n placeholder,\n shouldUseAbsolutePositioning = false,\n size = InputSize.Medium,\n value,\n width: widthValue,\n },\n ref,\n ) => {\n const [isSearchInputActive, setIsSearchInputActive] = useState(\n isActive ?? (typeof value === 'string' && value.trim() !== ''),\n );\n\n const inputRef = useRef<InputRef>(null);\n const pseudoRef = useRef<HTMLDivElement>(null);\n\n const parentWidth = useElementSize(pseudoRef);\n\n const theme = useTheme() as Theme;\n\n const handleBackIconClick = useCallback(() => setIsSearchInputActive(false), []);\n\n const handleSearchIconClick = useCallback(() => setIsSearchInputActive(true), []);\n\n useEffect(() => {\n if (typeof onActiveChange === 'function') {\n onActiveChange(isSearchInputActive);\n }\n\n if (isSearchInputActive) {\n inputRef.current?.focus();\n }\n }, [isSearchInputActive, onActiveChange]);\n\n useEffect(() => {\n if (typeof isActive === 'boolean') {\n setIsSearchInputActive(isActive);\n }\n }, [isActive]);\n\n useImperativeHandle(\n ref,\n () => ({\n focus: () => inputRef.current?.focus(),\n blur: () => inputRef.current?.blur(),\n }),\n [],\n );\n\n const width = useMemo(\n () => widthValue ?? parentWidth?.width,\n [parentWidth?.width, widthValue],\n );\n\n return (\n <>\n <StyledSearchInput\n className=\"beta-chayns-search-input\"\n $size={size}\n $shouldUseAbsolutePositioning={shouldUseAbsolutePositioning}\n onClick={() => {\n if (shouldUseAbsolutePositioning) {\n if (isSearchInputActive) {\n handleBackIconClick();\n } else {\n handleSearchIconClick();\n }\n }\n }}\n >\n {shouldUseAbsolutePositioning ? (\n <AnimatePresence initial={false}>\n {isSearchInputActive && (\n <StyledMotionSearchInputContentWrapper\n $shouldUseAbsolutePositioning={shouldUseAbsolutePositioning}\n animate={{ opacity: 1, width }}\n exit={{ opacity: 0, width: 0 }}\n initial={{ opacity: 0, width: 0 }}\n key=\"searchInputContentWrapper\"\n transition={{ duration: 0.25, type: 'tween' }}\n >\n <Input\n onChange={onChange}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n ref={inputRef}\n shouldShowClearIcon\n size={size}\n value={value}\n />\n </StyledMotionSearchInputContentWrapper>\n )}\n <StyledMotionSearchInputIconWrapperContent\n animate={{ opacity: 1 }}\n exit={{ opacity: 0, position: 'absolute' }}\n initial={{ opacity: 0 }}\n key={isSearchInputActive ? 'backIcon' : 'searchIcon'}\n transition={{ duration: 0.3 }}\n id={\n isSearchInputActive\n ? 'search-input-backIcon'\n : 'search-input-searchIcon'\n }\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n if (isSearchInputActive) {\n handleBackIconClick();\n } else {\n handleSearchIconClick();\n }\n }\n }}\n >\n <Icon\n key=\"icon\"\n color={iconColor}\n tabIndex={-1}\n icons={isSearchInputActive ? ['fa fa-xmark'] : ['fa fa-search']}\n onClick={\n isSearchInputActive\n ? handleBackIconClick\n : handleSearchIconClick\n }\n />\n </StyledMotionSearchInputIconWrapperContent>\n </AnimatePresence>\n ) : (\n <>\n <StyledMotionSearchInputIconWrapper>\n <AnimatePresence initial={false}>\n <StyledMotionSearchInputIconWrapperContent\n animate={{ opacity: 1 }}\n exit={{ opacity: 0, position: 'absolute' }}\n initial={{ opacity: 0 }}\n key={isSearchInputActive ? 'backIcon' : 'searchIcon'}\n transition={{ duration: 0.3 }}\n id={\n isSearchInputActive\n ? 'search-input-backIcon'\n : 'search-input-searchIcon'\n }\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n if (isSearchInputActive) {\n handleBackIconClick();\n } else {\n handleSearchIconClick();\n }\n }\n }}\n >\n <Icon\n key=\"icon\"\n color={iconColor}\n tabIndex={-1}\n icons={\n isSearchInputActive\n ? ['fa fa-arrow-left']\n : ['fa fa-search']\n }\n onClick={\n isSearchInputActive\n ? handleBackIconClick\n : handleSearchIconClick\n }\n />\n </StyledMotionSearchInputIconWrapperContent>\n </AnimatePresence>\n </StyledMotionSearchInputIconWrapper>\n <AnimatePresence initial={false}>\n {isSearchInputActive && (\n <StyledMotionSearchInputContentWrapper\n $shouldUseAbsolutePositioning={shouldUseAbsolutePositioning}\n animate={{ opacity: 1, width: '100%' }}\n exit={{ opacity: 0, width: 0 }}\n initial={{ opacity: 0, width: 0 }}\n key=\"searchInputContentWrapper\"\n transition={{ duration: 0.3 }}\n >\n <Input\n key=\"input\"\n leftElement={\n <Icon\n color={theme.text}\n icons={['far fa-search']}\n />\n }\n onChange={onChange}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n ref={inputRef}\n shouldShowClearIcon\n size={size}\n value={value}\n />\n </StyledMotionSearchInputContentWrapper>\n )}\n </AnimatePresence>\n </>\n )}\n </StyledSearchInput>\n <StyledSearchInputPseudoElement ref={pseudoRef} />\n </>\n );\n },\n);\n\nSearchInput.displayName = 'SearchInput';\n\nexport default SearchInput;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,cAAc;AAC9C,OAAOC,KAAK,IAIRC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EAC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AAW","ignoreList":[]}
1
+ {"version":3,"file":"SearchInput.js","names":["AnimatePresence","React","forwardRef","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","Icon","Input","InputSize","StyledMotionSearchInputContentWrapper","StyledMotionSearchInputIconWrapper","StyledMotionSearchInputIconWrapperContent","StyledSearchInput","StyledSearchInputPseudoElement","useTheme","useElementSize","SearchInput","iconColor","isActive","onActiveChange","onChange","onKeyDown","placeholder","shouldUseAbsolutePositioning","size","Medium","value","width","widthValue","ref","isSearchInputActive","setIsSearchInputActive","trim","inputRef","pseudoRef","parentWidth","theme","handleBackIconClick","handleSearchIconClick","current","focus","blur","createElement","Fragment","className","$size","$shouldUseAbsolutePositioning","onClick","initial","animate","opacity","exit","key","transition","duration","type","shouldShowClearIcon","position","id","tabIndex","e","preventDefault","color","icons","leftElement","text","displayName"],"sources":["../../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, {\n ChangeEventHandler,\n CSSProperties,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport Icon from '../icon/Icon';\nimport Input, { InputRef, InputSize } from '../input/Input';\nimport {\n StyledMotionSearchInputContentWrapper,\n StyledMotionSearchInputIconWrapper,\n StyledMotionSearchInputIconWrapperContent,\n StyledSearchInput,\n StyledSearchInputPseudoElement,\n} from './SearchInput.styles';\nimport { useTheme } from 'styled-components';\nimport type { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport { useElementSize } from '../../hooks/element';\n\nexport type SearchInputProps = {\n /**\n * Color of the icon\n */\n iconColor?: CSSProperties['color'];\n /**\n * Force the active state of the input and override the internal state\n */\n isActive?: boolean;\n /**\n * Function that is executed when the active state of the input changes\n */\n onActiveChange?: (isActive: boolean) => void;\n /**\n * Function that is executed when the text of the input changes\n */\n onChange: ChangeEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when a key is pressed\n */\n onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n /**\n * Placeholder for the input field\n */\n placeholder?: string;\n /**\n * Whether the SearchInput should be positioned absolute.\n */\n shouldUseAbsolutePositioning?: boolean;\n /**\n * The size of the input field\n */\n size?: InputSize;\n /**\n * Value if the input field should be controlled\n */\n value?: string;\n /**\n * The width of the parent.\n */\n width?: number;\n};\n\nconst SearchInput = forwardRef<InputRef, SearchInputProps>(\n (\n {\n iconColor,\n isActive,\n onActiveChange,\n onChange,\n onKeyDown,\n placeholder,\n shouldUseAbsolutePositioning = false,\n size = InputSize.Medium,\n value,\n width: widthValue,\n },\n ref,\n ) => {\n const [isSearchInputActive, setIsSearchInputActive] = useState(\n isActive ?? (typeof value === 'string' && value.trim() !== ''),\n );\n\n const inputRef = useRef<InputRef>(null);\n const pseudoRef = useRef<HTMLDivElement>(null);\n\n const parentWidth = useElementSize(pseudoRef);\n\n const theme = useTheme() as Theme;\n\n const handleBackIconClick = useCallback(() => setIsSearchInputActive(false), []);\n\n const handleSearchIconClick = useCallback(() => setIsSearchInputActive(true), []);\n\n useEffect(() => {\n if (typeof onActiveChange === 'function') {\n onActiveChange(isSearchInputActive);\n }\n\n if (isSearchInputActive) {\n inputRef.current?.focus();\n }\n }, [isSearchInputActive, onActiveChange]);\n\n useEffect(() => {\n if (typeof isActive === 'boolean') {\n setIsSearchInputActive(isActive);\n }\n }, [isActive]);\n\n useImperativeHandle(\n ref,\n () => ({\n focus: () => inputRef.current?.focus(),\n blur: () => inputRef.current?.blur(),\n }),\n [],\n );\n\n const width = useMemo(\n () => widthValue ?? parentWidth?.width,\n [parentWidth?.width, widthValue],\n );\n\n return (\n <>\n <StyledSearchInput\n className=\"beta-chayns-search-input\"\n $size={size}\n $shouldUseAbsolutePositioning={shouldUseAbsolutePositioning}\n onClick={() => {\n if (shouldUseAbsolutePositioning) {\n if (isSearchInputActive) {\n handleBackIconClick();\n } else {\n handleSearchIconClick();\n }\n }\n }}\n >\n {shouldUseAbsolutePositioning ? (\n <AnimatePresence initial={false}>\n {isSearchInputActive && (\n <StyledMotionSearchInputContentWrapper\n $shouldUseAbsolutePositioning={shouldUseAbsolutePositioning}\n animate={{ opacity: 1, width }}\n exit={{ opacity: 0, width: 0 }}\n initial={{ opacity: 0, width: 0 }}\n key=\"searchInputContentWrapper\"\n transition={{ duration: 0.25, type: 'tween' }}\n >\n <Input\n onChange={onChange}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n ref={inputRef}\n shouldShowClearIcon\n size={size}\n value={value}\n />\n </StyledMotionSearchInputContentWrapper>\n )}\n <StyledMotionSearchInputIconWrapperContent\n animate={{ opacity: 1 }}\n exit={{ opacity: 0, position: 'absolute' }}\n initial={{ opacity: 0 }}\n key={isSearchInputActive ? 'backIcon' : 'searchIcon'}\n transition={{ duration: 0.3 }}\n id={\n isSearchInputActive\n ? 'search-input-backIcon'\n : 'search-input-searchIcon'\n }\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n if (isSearchInputActive) {\n handleBackIconClick();\n } else {\n handleSearchIconClick();\n }\n }\n }}\n >\n <Icon\n key=\"icon\"\n color={iconColor}\n tabIndex={-1}\n icons={isSearchInputActive ? ['fa fa-xmark'] : ['fa fa-search']}\n onClick={\n isSearchInputActive\n ? handleBackIconClick\n : handleSearchIconClick\n }\n />\n </StyledMotionSearchInputIconWrapperContent>\n </AnimatePresence>\n ) : (\n <>\n <StyledMotionSearchInputIconWrapper>\n <AnimatePresence initial={false}>\n <StyledMotionSearchInputIconWrapperContent\n animate={{ opacity: 1 }}\n exit={{ opacity: 0, position: 'absolute' }}\n initial={{ opacity: 0 }}\n key={isSearchInputActive ? 'backIcon' : 'searchIcon'}\n transition={{ duration: 0.3 }}\n id={\n isSearchInputActive\n ? 'search-input-backIcon'\n : 'search-input-searchIcon'\n }\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n if (isSearchInputActive) {\n handleBackIconClick();\n } else {\n handleSearchIconClick();\n }\n }\n }}\n >\n <Icon\n key=\"icon\"\n color={iconColor}\n tabIndex={-1}\n icons={\n isSearchInputActive\n ? ['fa fa-arrow-left']\n : ['fa fa-search']\n }\n onClick={\n isSearchInputActive\n ? handleBackIconClick\n : handleSearchIconClick\n }\n />\n </StyledMotionSearchInputIconWrapperContent>\n </AnimatePresence>\n </StyledMotionSearchInputIconWrapper>\n <AnimatePresence initial={false}>\n {isSearchInputActive && (\n <StyledMotionSearchInputContentWrapper\n $shouldUseAbsolutePositioning={shouldUseAbsolutePositioning}\n animate={{ opacity: 1, width: '100%' }}\n exit={{ opacity: 0, width: 0 }}\n initial={{ opacity: 0, width: 0 }}\n key=\"searchInputContentWrapper\"\n transition={{ duration: 0.3 }}\n >\n <Input\n key=\"input\"\n leftElement={\n <Icon\n color={theme.text}\n icons={['far fa-search']}\n />\n }\n onChange={onChange}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n ref={inputRef}\n shouldShowClearIcon\n size={size}\n value={value}\n />\n </StyledMotionSearchInputContentWrapper>\n )}\n </AnimatePresence>\n </>\n )}\n </StyledSearchInput>\n <StyledSearchInputPseudoElement ref={pseudoRef} />\n </>\n );\n },\n);\n\nSearchInput.displayName = 'SearchInput';\n\nexport default SearchInput;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,cAAc;AAC9C,OAAOC,KAAK,IAGRC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,OAAOC,IAAI,MAAM,cAAc;AAC/B,OAAOC,KAAK,IAAcC,SAAS,QAAQ,gBAAgB;AAC3D,SACIC,qCAAqC,EACrCC,kCAAkC,EAClCC,yCAAyC,EACzCC,iBAAiB,EACjBC,8BAA8B,QAC3B,sBAAsB;AAC7B,SAASC,QAAQ,QAAQ,mBAAmB;AAE5C,SAASC,cAAc,QAAQ,qBAAqB;AA6CpD,MAAMC,WAAW,gBAAGjB,UAAU,CAC1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