@chayns-components/core 5.0.0-beta.172 → 5.0.0-beta.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/combobox/ComboBox.js +10 -10
- package/lib/components/combobox/ComboBox.js.map +1 -1
- package/lib/components/combobox/ComboBox.styles.d.ts +3 -1
- package/lib/components/combobox/ComboBox.styles.js +12 -6
- package/lib/components/combobox/ComboBox.styles.js.map +1 -1
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.d.ts +3 -1
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js +6 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js.map +1 -1
- package/lib/components/filter-button/FilterButton.d.ts +22 -0
- package/lib/components/filter-button/FilterButton.js +89 -0
- package/lib/components/filter-button/FilterButton.js.map +1 -0
- package/lib/components/filter-button/FilterButton.styles.d.ts +1 -0
- package/lib/components/filter-button/FilterButton.styles.js +15 -0
- package/lib/components/filter-button/FilterButton.styles.js.map +1 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.d.ts +14 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.js +48 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.js.map +1 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.styles.d.ts +26 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.styles.js +109 -0
- package/lib/components/filter-button/filter-button-item/FilterButtonItem.styles.js.map +1 -0
- package/lib/components/filter-button/interface.d.ts +15 -0
- package/lib/components/filter-button/interface.js +19 -0
- package/lib/components/filter-button/interface.js.map +1 -0
- package/lib/components/search-box/SearchBox.d.ts +26 -0
- package/lib/components/search-box/SearchBox.js +149 -0
- package/lib/components/search-box/SearchBox.js.map +1 -0
- package/lib/components/search-box/SearchBox.styles.d.ts +6 -0
- package/lib/components/search-box/SearchBox.styles.js +51 -0
- package/lib/components/search-box/SearchBox.styles.js.map +1 -0
- package/lib/components/search-box/interface.d.ts +4 -0
- package/lib/components/search-box/interface.js +6 -0
- package/lib/components/search-box/interface.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.d.ts +9 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js +30 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.d.ts +6 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js +30 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js.map +1 -0
- package/lib/components/search-box/utils.d.ts +7 -0
- package/lib/components/search-box/utils.js +23 -0
- package/lib/components/search-box/utils.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.d.ts +9 -0
- package/lib/components/sharing-bar/SharingBar.js +12 -9
- package/lib/components/sharing-bar/SharingBar.js.map +1 -1
- package/lib/components/sharing-bar/SharingBar.styles.d.ts +3 -1
- package/lib/components/sharing-bar/SharingBar.styles.js +8 -1
- package/lib/components/sharing-bar/SharingBar.styles.js.map +1 -1
- package/lib/components/text-area/TextArea.d.ts +25 -0
- package/lib/components/text-area/TextArea.js +63 -0
- package/lib/components/text-area/TextArea.js.map +1 -0
- package/lib/components/text-area/TextArea.styles.d.ts +8 -0
- package/lib/components/text-area/TextArea.styles.js +46 -0
- package/lib/components/text-area/TextArea.styles.js.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +21 -0
- package/lib/index.js.map +1 -1
- package/lib/{components/combobox/utils.js → utils/calculate.js} +1 -1
- package/lib/utils/calculate.js.map +1 -0
- package/package.json +2 -2
- package/lib/components/combobox/utils.js.map +0 -1
- /package/lib/{components/combobox/utils.d.ts → utils/calculate.d.ts} +0 -0
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _alignment = require("../context-menu/constants/alignment");
|
|
9
8
|
var _ContextMenu = _interopRequireDefault(require("../context-menu/ContextMenu"));
|
|
10
9
|
var _Icon = _interopRequireDefault(require("../icon/Icon"));
|
|
11
10
|
var _SharingBar = require("./SharingBar.styles");
|
|
@@ -14,10 +13,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
14
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
14
|
const SharingBar = _ref => {
|
|
16
15
|
let {
|
|
17
|
-
|
|
16
|
+
label,
|
|
17
|
+
link,
|
|
18
|
+
popupAlignment
|
|
18
19
|
} = _ref;
|
|
19
20
|
const contextMenuRef = (0, _react.useRef)(null);
|
|
20
21
|
const handleImageDownload = async () => {
|
|
22
|
+
var _contextMenuRef$curre;
|
|
21
23
|
const image = await fetch(`https://cube.tobit.cloud/qr-code-generator/v1.0/png?value=${link}&color=005EB8&text=Teilen`);
|
|
22
24
|
const imageBlog = await image.blob();
|
|
23
25
|
const imageURL = URL.createObjectURL(imageBlog);
|
|
@@ -30,8 +32,11 @@ const SharingBar = _ref => {
|
|
|
30
32
|
document.body.appendChild(url);
|
|
31
33
|
url.click();
|
|
32
34
|
document.body.removeChild(url);
|
|
35
|
+
(_contextMenuRef$curre = contextMenuRef.current) === null || _contextMenuRef$curre === void 0 ? void 0 : _contextMenuRef$curre.hide();
|
|
33
36
|
};
|
|
34
37
|
const handleShare = key => {
|
|
38
|
+
var _contextMenuRef$curre2;
|
|
39
|
+
(_contextMenuRef$curre2 = contextMenuRef.current) === null || _contextMenuRef$curre2 === void 0 ? void 0 : _contextMenuRef$curre2.hide();
|
|
35
40
|
const encodedUrl = encodeURIComponent(link);
|
|
36
41
|
let preparedLink;
|
|
37
42
|
switch (key) {
|
|
@@ -90,8 +95,8 @@ const SharingBar = _ref => {
|
|
|
90
95
|
text: 'Calling Code herunterladen'
|
|
91
96
|
}];
|
|
92
97
|
const handleSharingBarClick = () => {
|
|
93
|
-
var _contextMenuRef$
|
|
94
|
-
(_contextMenuRef$
|
|
98
|
+
var _contextMenuRef$curre3;
|
|
99
|
+
(_contextMenuRef$curre3 = contextMenuRef.current) === null || _contextMenuRef$curre3 === void 0 ? void 0 : _contextMenuRef$curre3.show();
|
|
95
100
|
};
|
|
96
101
|
return /*#__PURE__*/_react.default.createElement(_SharingBar.StyledSharingBar, {
|
|
97
102
|
onClick: handleSharingBarClick
|
|
@@ -99,11 +104,9 @@ const SharingBar = _ref => {
|
|
|
99
104
|
icons: ['fa fa-share-nodes']
|
|
100
105
|
})), /*#__PURE__*/_react.default.createElement(_ContextMenu.default, {
|
|
101
106
|
items: contextMenuItems,
|
|
102
|
-
ref: contextMenuRef
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
alignment: _alignment.ContextMenuAlignment.BottomRight
|
|
106
|
-
}, null), /*#__PURE__*/_react.default.createElement(_SharingBar.StyledSharingBarText, null, "Teilen"));
|
|
107
|
+
ref: contextMenuRef,
|
|
108
|
+
alignment: popupAlignment
|
|
109
|
+
}, null), /*#__PURE__*/_react.default.createElement(_SharingBar.StyledSharingBarText, null, label));
|
|
107
110
|
};
|
|
108
111
|
SharingBar.displayName = 'SharingBar';
|
|
109
112
|
var _default = SharingBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SharingBar.js","names":["_react","_interopRequireWildcard","require","
|
|
1
|
+
{"version":3,"file":"SharingBar.js","names":["_react","_interopRequireWildcard","require","_ContextMenu","_interopRequireDefault","_Icon","_SharingBar","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SharingBar","_ref","label","link","popupAlignment","contextMenuRef","useRef","handleImageDownload","_contextMenuRef$curre","image","fetch","imageBlog","blob","imageURL","URL","createObjectURL","url","document","createElement","fileName","replace","trim","slice","href","download","body","appendChild","click","removeChild","current","hide","handleShare","_contextMenuRef$curre2","encodedUrl","encodeURIComponent","preparedLink","navigator","clipboard","writeText","window","open","contextMenuItems","icons","onClick","text","handleSharingBarClick","_contextMenuRef$curre3","show","StyledSharingBar","StyledSharingBarIconWrapper","items","ref","alignment","StyledSharingBarText","displayName","_default","exports"],"sources":["../../../src/components/sharing-bar/SharingBar.tsx"],"sourcesContent":["import React, { FC, useRef } from 'react';\nimport type { ContextMenuAlignment } from '../context-menu/constants/alignment';\nimport ContextMenu from '../context-menu/ContextMenu';\nimport Icon from '../icon/Icon';\nimport {\n StyledSharingBar,\n StyledSharingBarIconWrapper,\n StyledSharingBarText,\n} from './SharingBar.styles';\n\nexport type SharingBarProps = {\n /**\n * The label that should be displayed.\n */\n label: string;\n /**\n * The link that should be shared.\n */\n link: string;\n /**\n * The alignment of the sharing options.\n */\n popupAlignment: ContextMenuAlignment;\n};\n\nconst SharingBar: FC<SharingBarProps> = ({ label, link, popupAlignment }) => {\n const contextMenuRef = useRef<{ hide: VoidFunction; show: VoidFunction }>(null);\n\n const handleImageDownload = async () => {\n const image = await fetch(\n `https://cube.tobit.cloud/qr-code-generator/v1.0/png?value=${link}&color=005EB8&text=Teilen`\n );\n const imageBlog = await image.blob();\n const imageURL = URL.createObjectURL(imageBlog);\n\n const url = document.createElement('a');\n\n // Removes illegal characters from the name and shortens it to a maximum of 50 characters\n const fileName = `CallingCode_Share`\n .replace(/[^\\w-]+/g, '_')\n .trim()\n .slice(0, 75);\n\n url.href = imageURL;\n url.download = fileName;\n\n document.body.appendChild(url);\n\n url.click();\n\n document.body.removeChild(url);\n\n contextMenuRef.current?.hide();\n };\n\n const handleShare = (key: string) => {\n contextMenuRef.current?.hide();\n\n const encodedUrl = encodeURIComponent(link);\n let preparedLink;\n\n switch (key) {\n case 'whatsapp':\n preparedLink = `https://wa.me/?text=${encodedUrl}`;\n break;\n case 'facebook':\n preparedLink = `https://www.facebook.com/sharer.php?u=${encodedUrl}`;\n break;\n case 'twitter':\n preparedLink = `https://twitter.com/intent/tweet?url=${encodedUrl}`;\n break;\n case 'mail':\n preparedLink = `mailto:?subject=&body= ${encodedUrl}`;\n break;\n case 'copy':\n void navigator.clipboard.writeText(link);\n break;\n default:\n break;\n }\n\n if (!preparedLink) {\n return;\n }\n\n window.open(preparedLink);\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-brands fa-whatsapp'],\n key: 'whatsapp',\n onClick: () => handleShare('whatsapp'),\n text: 'Whatsapp',\n },\n {\n icons: ['fa-brands fa-facebook-f'],\n key: 'facebook',\n onClick: () => handleShare('facebook'),\n text: 'Facebook',\n },\n {\n icons: ['fa-brands fa-twitter'],\n key: 'twitter',\n onClick: () => handleShare('twitter'),\n text: 'Twitter',\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 const handleSharingBarClick = () => {\n contextMenuRef.current?.show();\n };\n\n return (\n <StyledSharingBar onClick={handleSharingBarClick}>\n <StyledSharingBarIconWrapper>\n <Icon icons={['fa fa-share-nodes']} />\n </StyledSharingBarIconWrapper>\n <ContextMenu items={contextMenuItems} ref={contextMenuRef} alignment={popupAlignment}>\n {null}\n </ContextMenu>\n <StyledSharingBarText>{label}</StyledSharingBarText>\n </StyledSharingBar>\n );\n};\n\nSharingBar.displayName = 'SharingBar';\n\nexport default SharingBar;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAI6B,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAV,wBAAAM,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAnB,GAAA,EAAAgB,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAf,GAAA,EAAAgB,GAAA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C,aAAA,CAACzC,WAAA,CAAA4E,oBAAoB,QAAEnD,KAA4B,CACrC,CAAC;AAE3B,CAAC;AAEDF,UAAU,CAACsD,WAAW,GAAG,YAAY;AAAC,IAAAC,QAAA,GAEvBvD,UAAU;AAAAwD,OAAA,CAAA5E,OAAA,GAAA2E,QAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const StyledSharingBar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export declare const StyledSharingBarIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const StyledSharingBarText: import("styled-components").StyledComponent<"p", any, {
|
|
3
|
+
export declare const StyledSharingBarText: import("styled-components").StyledComponent<"p", any, {
|
|
4
|
+
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
5
|
+
}, never>;
|
|
@@ -9,12 +9,19 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
9
9
|
const StyledSharingBar = _styledComponents.default.div`
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
display: flex;
|
|
12
|
+
align-items: center;
|
|
12
13
|
`;
|
|
13
14
|
exports.StyledSharingBar = StyledSharingBar;
|
|
14
15
|
const StyledSharingBarIconWrapper = _styledComponents.default.div``;
|
|
15
16
|
exports.StyledSharingBarIconWrapper = StyledSharingBarIconWrapper;
|
|
16
17
|
const StyledSharingBarText = _styledComponents.default.p`
|
|
17
|
-
|
|
18
|
+
color: ${_ref => {
|
|
19
|
+
let {
|
|
20
|
+
theme
|
|
21
|
+
} = _ref;
|
|
22
|
+
return theme.text;
|
|
23
|
+
}};
|
|
24
|
+
margin: 0 0 0 5px;
|
|
18
25
|
`;
|
|
19
26
|
exports.StyledSharingBarText = StyledSharingBarText;
|
|
20
27
|
//# sourceMappingURL=SharingBar.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SharingBar.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledSharingBar","styled","div","exports","StyledSharingBarIconWrapper","StyledSharingBarText","p"],"sources":["../../../src/components/sharing-bar/SharingBar.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledSharingBar = styled.div`\n cursor: pointer;\n display: flex;\n`;\n\nexport const StyledSharingBarIconWrapper = styled.div``;\n\nexport const StyledSharingBarText = styled.p
|
|
1
|
+
{"version":3,"file":"SharingBar.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledSharingBar","styled","div","exports","StyledSharingBarIconWrapper","StyledSharingBarText","p","_ref","theme","text"],"sources":["../../../src/components/sharing-bar/SharingBar.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledSharingBar = styled.div`\n cursor: pointer;\n display: flex;\n align-items: center;\n`;\n\nexport const StyledSharingBarIconWrapper = styled.div``;\n\ntype StyledSharingBarTextProps = WithTheme<unknown>;\n\nexport const StyledSharingBarText = styled.p<StyledSharingBarTextProps>`\n color: ${({ theme }: StyledSharingBarTextProps) => theme.text};\n margin: 0 0 0 5px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGhC,MAAMG,gBAAgB,GAAGC,yBAAM,CAACC,GAAI;AAC3C;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAH,gBAAA,GAAAA,gBAAA;AAEK,MAAMI,2BAA2B,GAAGH,yBAAM,CAACC,GAAI,EAAC;AAACC,OAAA,CAAAC,2BAAA,GAAAA,2BAAA;AAIjD,MAAMC,oBAAoB,GAAGJ,yBAAM,CAACK,CAA6B;AACxE,aAAaC,IAAA;EAAA,IAAC;IAAEC;EAAiC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,IAAI;AAAA,CAAC;AAClE;AACA,CAAC;AAACN,OAAA,CAAAE,oBAAA,GAAAA,oBAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChangeEventHandler, CSSProperties, FC, FocusEventHandler } from 'react';
|
|
2
|
+
export type TextAreaProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The maximum height of the text area.
|
|
5
|
+
*/
|
|
6
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
7
|
+
/**
|
|
8
|
+
* Function that is executed when the text area loses focus.
|
|
9
|
+
*/
|
|
10
|
+
onBlur?: FocusEventHandler<HTMLTextAreaElement>;
|
|
11
|
+
/**
|
|
12
|
+
* Function that is executed when the text of the text area changes.
|
|
13
|
+
*/
|
|
14
|
+
onChange?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
15
|
+
/**
|
|
16
|
+
* Placeholder for the text area field.
|
|
17
|
+
*/
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Value if the text area should be controlled.
|
|
21
|
+
*/
|
|
22
|
+
value?: string;
|
|
23
|
+
};
|
|
24
|
+
declare const TextArea: FC<TextAreaProps>;
|
|
25
|
+
export default TextArea;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _TextArea = require("./TextArea.styles");
|
|
9
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
const TextArea = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
placeholder,
|
|
14
|
+
value,
|
|
15
|
+
onChange,
|
|
16
|
+
onBlur,
|
|
17
|
+
maxHeight = '120px'
|
|
18
|
+
} = _ref;
|
|
19
|
+
const [displayedValue, setDisplayedValue] = (0, _react.useState)('');
|
|
20
|
+
const [isOverflowing, setIsOverflowing] = (0, _react.useState)(false);
|
|
21
|
+
const textareaRef = (0, _react.useRef)(null);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This function sets the external value
|
|
25
|
+
*/
|
|
26
|
+
(0, _react.useEffect)(() => {
|
|
27
|
+
if (value) {
|
|
28
|
+
setDisplayedValue(value);
|
|
29
|
+
}
|
|
30
|
+
}, [value]);
|
|
31
|
+
const adjustTextareaHeight = (0, _react.useCallback)(() => {
|
|
32
|
+
if (textareaRef.current) {
|
|
33
|
+
textareaRef.current.style.height = 'auto';
|
|
34
|
+
textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
|
|
35
|
+
setIsOverflowing(textareaRef.current.scrollHeight > parseInt(maxHeight.toString(), 10));
|
|
36
|
+
}
|
|
37
|
+
}, [maxHeight]);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* This function updates the value
|
|
41
|
+
*/
|
|
42
|
+
const handleChange = (0, _react.useCallback)(event => {
|
|
43
|
+
setDisplayedValue(event.target.value);
|
|
44
|
+
adjustTextareaHeight();
|
|
45
|
+
if (onChange) {
|
|
46
|
+
onChange(event);
|
|
47
|
+
}
|
|
48
|
+
}, [adjustTextareaHeight, onChange]);
|
|
49
|
+
return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextArea, null, /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextAreaInput, {
|
|
50
|
+
ref: textareaRef,
|
|
51
|
+
value: displayedValue,
|
|
52
|
+
placeholder: placeholder,
|
|
53
|
+
onBlur: onBlur,
|
|
54
|
+
onChange: handleChange,
|
|
55
|
+
maxHeight: maxHeight,
|
|
56
|
+
isOverflowing: isOverflowing,
|
|
57
|
+
rows: 1
|
|
58
|
+
})), [displayedValue, handleChange, isOverflowing, maxHeight, onBlur, placeholder]);
|
|
59
|
+
};
|
|
60
|
+
TextArea.displayName = 'TextArea';
|
|
61
|
+
var _default = TextArea;
|
|
62
|
+
exports.default = _default;
|
|
63
|
+
//# sourceMappingURL=TextArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.js","names":["_react","_interopRequireWildcard","require","_TextArea","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TextArea","_ref","placeholder","value","onChange","onBlur","maxHeight","displayedValue","setDisplayedValue","useState","isOverflowing","setIsOverflowing","textareaRef","useRef","useEffect","adjustTextareaHeight","useCallback","current","style","height","scrollHeight","parseInt","toString","handleChange","event","target","useMemo","createElement","StyledTextArea","StyledTextAreaInput","ref","rows","displayName","_default","exports"],"sources":["../../../src/components/text-area/TextArea.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n CSSProperties,\n FC,\n FocusEventHandler,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { StyledTextArea, StyledTextAreaInput } from './TextArea.styles';\n\nexport type TextAreaProps = {\n /**\n * The maximum height of the text area.\n */\n maxHeight?: CSSProperties['maxHeight'];\n /**\n * Function that is executed when the text area loses focus.\n */\n onBlur?: FocusEventHandler<HTMLTextAreaElement>;\n /**\n * Function that is executed when the text of the text area changes.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n /**\n * Placeholder for the text area field.\n */\n placeholder?: string;\n /**\n * Value if the text area should be controlled.\n */\n value?: string;\n};\n\nconst TextArea: FC<TextAreaProps> = ({\n placeholder,\n value,\n onChange,\n onBlur,\n maxHeight = '120px',\n}) => {\n const [displayedValue, setDisplayedValue] = useState('');\n const [isOverflowing, setIsOverflowing] = useState(false);\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n /**\n * This function sets the external value\n */\n useEffect(() => {\n if (value) {\n setDisplayedValue(value);\n }\n }, [value]);\n\n const adjustTextareaHeight = useCallback(() => {\n if (textareaRef.current) {\n textareaRef.current.style.height = 'auto';\n textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;\n\n setIsOverflowing(textareaRef.current.scrollHeight > parseInt(maxHeight.toString(), 10));\n }\n }, [maxHeight]);\n\n /**\n * This function updates the value\n */\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLTextAreaElement>) => {\n setDisplayedValue(event.target.value);\n\n adjustTextareaHeight();\n\n if (onChange) {\n onChange(event);\n }\n },\n [adjustTextareaHeight, onChange]\n );\n\n return useMemo(\n () => (\n <StyledTextArea>\n <StyledTextAreaInput\n ref={textareaRef}\n value={displayedValue}\n placeholder={placeholder}\n onBlur={onBlur}\n onChange={handleChange}\n maxHeight={maxHeight}\n isOverflowing={isOverflowing}\n rows={1}\n />\n </StyledTextArea>\n ),\n [displayedValue, handleChange, isOverflowing, maxHeight, onBlur, placeholder]\n );\n};\n\nTextArea.displayName = 'TextArea';\n\nexport default TextArea;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,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,CAAClD,SAAA,CAAAmD,cAAc,qBACXtD,MAAA,CAAAW,OAAA,CAAA0C,aAAA,CAAClD,SAAA,CAAAoD,mBAAmB;IAChBC,GAAG,EAAElB,WAAY;IACjBT,KAAK,EAAEI,cAAe;IACtBL,WAAW,EAAEA,WAAY;IACzBG,MAAM,EAAEA,MAAO;IACfD,QAAQ,EAAEmB,YAAa;IACvBjB,SAAS,EAAEA,SAAU;IACrBI,aAAa,EAAEA,aAAc;IAC7BqB,IAAI,EAAE;EAAE,CACX,CACW,CACnB,EACD,CAACxB,cAAc,EAAEgB,YAAY,EAAEb,aAAa,EAAEJ,SAAS,EAAED,MAAM,EAAEH,WAAW,CAChF,CAAC;AACL,CAAC;AAEDF,QAAQ,CAACgC,WAAW,GAAG,UAAU;AAAC,IAAAC,QAAA,GAEnBjC,QAAQ;AAAAkC,OAAA,CAAAjD,OAAA,GAAAgD,QAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export declare const StyledTextArea: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const StyledTextAreaInput: import("styled-components").StyledComponent<"textarea", any, {
|
|
4
|
+
maxHeight: CSSProperties['maxHeight'];
|
|
5
|
+
isOverflowing: boolean;
|
|
6
|
+
} & {
|
|
7
|
+
theme: import("../color-scheme-provider/ColorSchemeProvider").Theme;
|
|
8
|
+
}, never>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledTextAreaInput = exports.StyledTextArea = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
const StyledTextArea = _styledComponents.default.div``;
|
|
10
|
+
exports.StyledTextArea = StyledTextArea;
|
|
11
|
+
const StyledTextAreaInput = _styledComponents.default.textarea`
|
|
12
|
+
border-radius: 3px;
|
|
13
|
+
border: 1px solid rgba(160, 160, 160, 0.3);
|
|
14
|
+
color: ${_ref => {
|
|
15
|
+
let {
|
|
16
|
+
theme
|
|
17
|
+
} = _ref;
|
|
18
|
+
return theme['006'];
|
|
19
|
+
}};
|
|
20
|
+
resize: none;
|
|
21
|
+
overflow-y: ${_ref2 => {
|
|
22
|
+
let {
|
|
23
|
+
isOverflowing
|
|
24
|
+
} = _ref2;
|
|
25
|
+
return isOverflowing ? 'scroll' : 'hidden';
|
|
26
|
+
}};
|
|
27
|
+
max-height: ${_ref3 => {
|
|
28
|
+
let {
|
|
29
|
+
maxHeight
|
|
30
|
+
} = _ref3;
|
|
31
|
+
return maxHeight;
|
|
32
|
+
}};
|
|
33
|
+
width: 100%;
|
|
34
|
+
padding: 8px 10px;
|
|
35
|
+
|
|
36
|
+
&::-webkit-scrollbar {
|
|
37
|
+
width: 5px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&::-webkit-scrollbar-thumb {
|
|
41
|
+
background: rgba(160, 160, 160, 1);
|
|
42
|
+
border-radius: 3px;
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
exports.StyledTextAreaInput = StyledTextAreaInput;
|
|
46
|
+
//# sourceMappingURL=TextArea.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledTextArea","styled","div","exports","StyledTextAreaInput","textarea","_ref","theme","_ref2","isOverflowing","_ref3","maxHeight"],"sources":["../../../src/components/text-area/TextArea.styles.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledTextArea = styled.div``;\n\ntype StyledTextAreaInputProps = WithTheme<{\n maxHeight: CSSProperties['maxHeight'];\n isOverflowing: boolean;\n}>;\n\nexport const StyledTextAreaInput = styled.textarea<StyledTextAreaInputProps>`\n border-radius: 3px;\n border: 1px solid rgba(160, 160, 160, 0.3);\n color: ${({ theme }: StyledTextAreaInputProps) => theme['006']};\n resize: none;\n overflow-y: ${({ isOverflowing }) => (isOverflowing ? 'scroll' : 'hidden')};\n max-height: ${({ maxHeight }: StyledTextAreaInputProps) => maxHeight};\n width: 100%;\n padding: 8px 10px;\n\n &::-webkit-scrollbar {\n width: 5px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: rgba(160, 160, 160, 1);\n border-radius: 3px;\n }\n`;\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGhC,MAAMG,cAAc,GAAGC,yBAAM,CAACC,GAAI,EAAC;AAACC,OAAA,CAAAH,cAAA,GAAAA,cAAA;AAOpC,MAAMI,mBAAmB,GAAGH,yBAAM,CAACI,QAAmC;AAC7E;AACA;AACA,aAAaC,IAAA;EAAA,IAAC;IAAEC;EAAgC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACnE;AACA,kBAAkBC,KAAA;EAAA,IAAC;IAAEC;EAAc,CAAC,GAAAD,KAAA;EAAA,OAAMC,aAAa,GAAG,QAAQ,GAAG,QAAQ;AAAA,CAAE;AAC/E,kBAAkBC,KAAA;EAAA,IAAC;IAAEC;EAAoC,CAAC,GAAAD,KAAA;EAAA,OAAKC,SAAS;AAAA,CAAC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACR,OAAA,CAAAC,mBAAA,GAAAA,mBAAA"}
|
package/lib/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export { default as ComboBox } from './components/combobox/ComboBox';
|
|
|
12
12
|
export type { IComboBoxItem as ComboBoxItem } from './components/combobox/ComboBox';
|
|
13
13
|
export { default as ContentCard } from './components/content-card/ContentCard';
|
|
14
14
|
export { default as ContextMenu } from './components/context-menu/ContextMenu';
|
|
15
|
+
export { default as FilterButton } from './components/filter-button/FilterButton';
|
|
16
|
+
export type { FilterButtonItemShape, FilterButtonSize, IFilterButtonItem as FilterButtonItem, } from './components/filter-button/interface';
|
|
15
17
|
export { default as GridImage } from './components/grid-image/GridImage';
|
|
16
18
|
export { default as Icon } from './components/icon/Icon';
|
|
17
19
|
export { default as Input } from './components/input/Input';
|
|
@@ -21,7 +23,10 @@ export { default as ListItem } from './components/list/list-item/ListItem';
|
|
|
21
23
|
export { MentionFinderPopupAlignment } from './components/mention-finder/constants/alignment';
|
|
22
24
|
export { default as MentionFinder } from './components/mention-finder/MentionFinder';
|
|
23
25
|
export type { MentionMember } from './components/mention-finder/MentionFinder';
|
|
26
|
+
export type { ISearchBoxItem as SearchBoxItem } from './components/search-box/interface';
|
|
27
|
+
export { default as SearchBox } from './components/search-box/SearchBox';
|
|
24
28
|
export { default as SearchInput } from './components/search-input/SearchInput';
|
|
25
29
|
export { default as SharingBar } from './components/sharing-bar/SharingBar';
|
|
26
30
|
export { default as Slider } from './components/slider/Slider';
|
|
27
31
|
export { default as SmallWaitCursor, SmallWaitCursorSpeed, } from './components/small-wait-cursor/SmallWaitCursor';
|
|
32
|
+
export { default as TextArea } from './components/text-area/TextArea';
|
package/lib/index.js
CHANGED
|
@@ -75,6 +75,12 @@ Object.defineProperty(exports, "ContextMenu", {
|
|
|
75
75
|
return _ContextMenu.default;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "FilterButton", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _FilterButton.default;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
78
84
|
Object.defineProperty(exports, "GridImage", {
|
|
79
85
|
enumerable: true,
|
|
80
86
|
get: function () {
|
|
@@ -123,6 +129,12 @@ Object.defineProperty(exports, "MentionFinderPopupAlignment", {
|
|
|
123
129
|
return _alignment.MentionFinderPopupAlignment;
|
|
124
130
|
}
|
|
125
131
|
});
|
|
132
|
+
Object.defineProperty(exports, "SearchBox", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _SearchBox.default;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
126
138
|
Object.defineProperty(exports, "SearchInput", {
|
|
127
139
|
enumerable: true,
|
|
128
140
|
get: function () {
|
|
@@ -153,6 +165,12 @@ Object.defineProperty(exports, "SmallWaitCursorSpeed", {
|
|
|
153
165
|
return _SmallWaitCursor.SmallWaitCursorSpeed;
|
|
154
166
|
}
|
|
155
167
|
});
|
|
168
|
+
Object.defineProperty(exports, "TextArea", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () {
|
|
171
|
+
return _TextArea.default;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
156
174
|
var _Accordion = _interopRequireDefault(require("./components/accordion/Accordion"));
|
|
157
175
|
var _AccordionContent = _interopRequireDefault(require("./components/accordion/accordion-content/AccordionContent"));
|
|
158
176
|
var _AccordionGroup = _interopRequireDefault(require("./components/accordion/accordion-group/AccordionGroup"));
|
|
@@ -165,6 +183,7 @@ var _ColorSchemeProvider = _interopRequireDefault(require("./components/color-sc
|
|
|
165
183
|
var _ComboBox = _interopRequireDefault(require("./components/combobox/ComboBox"));
|
|
166
184
|
var _ContentCard = _interopRequireDefault(require("./components/content-card/ContentCard"));
|
|
167
185
|
var _ContextMenu = _interopRequireDefault(require("./components/context-menu/ContextMenu"));
|
|
186
|
+
var _FilterButton = _interopRequireDefault(require("./components/filter-button/FilterButton"));
|
|
168
187
|
var _GridImage = _interopRequireDefault(require("./components/grid-image/GridImage"));
|
|
169
188
|
var _Icon = _interopRequireDefault(require("./components/icon/Icon"));
|
|
170
189
|
var _Input = _interopRequireDefault(require("./components/input/Input"));
|
|
@@ -173,10 +192,12 @@ var _ListItemContent = _interopRequireDefault(require("./components/list/list-it
|
|
|
173
192
|
var _ListItem = _interopRequireDefault(require("./components/list/list-item/ListItem"));
|
|
174
193
|
var _alignment = require("./components/mention-finder/constants/alignment");
|
|
175
194
|
var _MentionFinder = _interopRequireDefault(require("./components/mention-finder/MentionFinder"));
|
|
195
|
+
var _SearchBox = _interopRequireDefault(require("./components/search-box/SearchBox"));
|
|
176
196
|
var _SearchInput = _interopRequireDefault(require("./components/search-input/SearchInput"));
|
|
177
197
|
var _SharingBar = _interopRequireDefault(require("./components/sharing-bar/SharingBar"));
|
|
178
198
|
var _Slider = _interopRequireDefault(require("./components/slider/Slider"));
|
|
179
199
|
var _SmallWaitCursor = _interopRequireWildcard(require("./components/small-wait-cursor/SmallWaitCursor"));
|
|
200
|
+
var _TextArea = _interopRequireDefault(require("./components/text-area/TextArea"));
|
|
180
201
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
181
202
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
182
203
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AmountControl","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_ComboBox","_ContentCard","_ContextMenu","_GridImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_alignment","_MentionFinder","_SearchInput","_SharingBar","_Slider","_SmallWaitCursor","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"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 AmountControl } from './components/amount-control/AmountControl';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport { default as ColorSchemeProvider } from './components/color-scheme-provider/ColorSchemeProvider';\nexport type { WithTheme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport type { IComboBoxItem as ComboBoxItem } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as Icon } from './components/icon/Icon';\nexport { default as Input } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport { default as ListItem } from './components/list/list-item/ListItem';\nexport { MentionFinderPopupAlignment } from './components/mention-finder/constants/alignment';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AmountControl","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_ComboBox","_ContentCard","_ContextMenu","_FilterButton","_GridImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_alignment","_MentionFinder","_SearchBox","_SearchInput","_SharingBar","_Slider","_SmallWaitCursor","_interopRequireWildcard","_TextArea","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"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 AmountControl } from './components/amount-control/AmountControl';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport { default as ColorSchemeProvider } from './components/color-scheme-provider/ColorSchemeProvider';\nexport type { WithTheme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport type { IComboBoxItem as ComboBoxItem } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport { default as FilterButton } from './components/filter-button/FilterButton';\nexport type {\n FilterButtonItemShape,\n FilterButtonSize,\n IFilterButtonItem as FilterButtonItem,\n} from './components/filter-button/interface';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as Icon } from './components/icon/Icon';\nexport { default as Input } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport { default as ListItem } from './components/list/list-item/ListItem';\nexport { MentionFinderPopupAlignment } from './components/mention-finder/constants/alignment';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport type { ISearchBoxItem as SearchBoxItem } from './components/search-box/interface';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport { default as TextArea } from './components/text-area/TextArea';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,eAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,MAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,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GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAAA,SAAAxC,uBAAAkC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculate.js","names":["calculateContentWidth","texts","length","forEach","text","div","document","createElement","style","visibility","position","width","whiteSpace","body","appendChild","innerText","push","offsetWidth","removeChild","Math","max","apply","exports","calculateContentHeight","margin","offsetHeight","reduce","partialSum","a"],"sources":["../../src/utils/calculate.ts"],"sourcesContent":["export const calculateContentWidth = (texts: string[]) => {\n const length: number[] = [];\n\n texts.forEach((text) => {\n const div = document.createElement('div');\n div.style.visibility = 'hidden';\n div.style.position = 'absolute';\n div.style.width = 'auto';\n div.style.whiteSpace = 'nowrap';\n document.body.appendChild(div);\n\n div.innerText = text;\n\n length.push(div.offsetWidth);\n\n document.body.removeChild(div);\n });\n\n return Math.max.apply(null, length);\n};\n\nexport const calculateContentHeight = (texts: string[]) => {\n const length: number[] = [];\n\n texts.forEach((text) => {\n const div = document.createElement('p');\n div.style.visibility = 'hidden';\n div.style.position = 'absolute';\n div.style.width = 'auto';\n div.style.margin = '5px';\n div.style.whiteSpace = 'nowrap';\n document.body.appendChild(div);\n\n div.innerText = text;\n\n length.push(div.offsetHeight);\n\n document.body.removeChild(div);\n });\n\n return length.reduce((partialSum, a) => partialSum + a, 0);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,qBAAqB,GAAIC,KAAe,IAAK;EACtD,MAAMC,MAAgB,GAAG,EAAE;EAE3BD,KAAK,CAACE,OAAO,CAAEC,IAAI,IAAK;IACpB,MAAMC,GAAG,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;IACzCF,GAAG,CAACG,KAAK,CAACC,UAAU,GAAG,QAAQ;IAC/BJ,GAAG,CAACG,KAAK,CAACE,QAAQ,GAAG,UAAU;IAC/BL,GAAG,CAACG,KAAK,CAACG,KAAK,GAAG,MAAM;IACxBN,GAAG,CAACG,KAAK,CAACI,UAAU,GAAG,QAAQ;IAC/BN,QAAQ,CAACO,IAAI,CAACC,WAAW,CAACT,GAAG,CAAC;IAE9BA,GAAG,CAACU,SAAS,GAAGX,IAAI;IAEpBF,MAAM,CAACc,IAAI,CAACX,GAAG,CAACY,WAAW,CAAC;IAE5BX,QAAQ,CAACO,IAAI,CAACK,WAAW,CAACb,GAAG,CAAC;EAClC,CAAC,CAAC;EAEF,OAAOc,IAAI,CAACC,GAAG,CAACC,KAAK,CAAC,IAAI,EAAEnB,MAAM,CAAC;AACvC,CAAC;AAACoB,OAAA,CAAAtB,qBAAA,GAAAA,qBAAA;AAEK,MAAMuB,sBAAsB,GAAItB,KAAe,IAAK;EACvD,MAAMC,MAAgB,GAAG,EAAE;EAE3BD,KAAK,CAACE,OAAO,CAAEC,IAAI,IAAK;IACpB,MAAMC,GAAG,GAAGC,QAAQ,CAACC,aAAa,CAAC,GAAG,CAAC;IACvCF,GAAG,CAACG,KAAK,CAACC,UAAU,GAAG,QAAQ;IAC/BJ,GAAG,CAACG,KAAK,CAACE,QAAQ,GAAG,UAAU;IAC/BL,GAAG,CAACG,KAAK,CAACG,KAAK,GAAG,MAAM;IACxBN,GAAG,CAACG,KAAK,CAACgB,MAAM,GAAG,KAAK;IACxBnB,GAAG,CAACG,KAAK,CAACI,UAAU,GAAG,QAAQ;IAC/BN,QAAQ,CAACO,IAAI,CAACC,WAAW,CAACT,GAAG,CAAC;IAE9BA,GAAG,CAACU,SAAS,GAAGX,IAAI;IAEpBF,MAAM,CAACc,IAAI,CAACX,GAAG,CAACoB,YAAY,CAAC;IAE7BnB,QAAQ,CAACO,IAAI,CAACK,WAAW,CAACb,GAAG,CAAC;EAClC,CAAC,CAAC;EAEF,OAAOH,MAAM,CAACwB,MAAM,CAAC,CAACC,UAAU,EAAEC,CAAC,KAAKD,UAAU,GAAGC,CAAC,EAAE,CAAC,CAAC;AAC9D,CAAC;AAACN,OAAA,CAAAC,sBAAA,GAAAA,sBAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.174",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chayns",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "364604da7330bc187a2f8c49136fd1f46c2b1224"
|
|
67
67
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["calculateContentWidth","texts","length","forEach","text","div","document","createElement","style","visibility","position","width","whiteSpace","body","appendChild","innerText","push","offsetWidth","removeChild","Math","max","apply","exports","calculateContentHeight","margin","offsetHeight","reduce","partialSum","a"],"sources":["../../../src/components/combobox/utils.ts"],"sourcesContent":["export const calculateContentWidth = (texts: string[]) => {\n const length: number[] = [];\n\n texts.forEach((text) => {\n const div = document.createElement('div');\n div.style.visibility = 'hidden';\n div.style.position = 'absolute';\n div.style.width = 'auto';\n div.style.whiteSpace = 'nowrap';\n document.body.appendChild(div);\n\n div.innerText = text;\n\n length.push(div.offsetWidth);\n\n document.body.removeChild(div);\n });\n\n return Math.max.apply(null, length);\n};\n\nexport const calculateContentHeight = (texts: string[]) => {\n const length: number[] = [];\n\n texts.forEach((text) => {\n const div = document.createElement('p');\n div.style.visibility = 'hidden';\n div.style.position = 'absolute';\n div.style.width = 'auto';\n div.style.margin = '5px';\n div.style.whiteSpace = 'nowrap';\n document.body.appendChild(div);\n\n div.innerText = text;\n\n length.push(div.offsetHeight);\n\n document.body.removeChild(div);\n });\n\n return length.reduce((partialSum, a) => partialSum + a, 0);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,qBAAqB,GAAIC,KAAe,IAAK;EACtD,MAAMC,MAAgB,GAAG,EAAE;EAE3BD,KAAK,CAACE,OAAO,CAAEC,IAAI,IAAK;IACpB,MAAMC,GAAG,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;IACzCF,GAAG,CAACG,KAAK,CAACC,UAAU,GAAG,QAAQ;IAC/BJ,GAAG,CAACG,KAAK,CAACE,QAAQ,GAAG,UAAU;IAC/BL,GAAG,CAACG,KAAK,CAACG,KAAK,GAAG,MAAM;IACxBN,GAAG,CAACG,KAAK,CAACI,UAAU,GAAG,QAAQ;IAC/BN,QAAQ,CAACO,IAAI,CAACC,WAAW,CAACT,GAAG,CAA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