@chayns-components/core 5.0.0-beta.171 → 5.0.0-beta.173
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/content-card/ContentCard.d.ts +9 -0
- package/lib/components/content-card/ContentCard.js +19 -0
- package/lib/components/content-card/ContentCard.js.map +1 -0
- package/lib/components/content-card/ContentCard.styles.d.ts +1 -0
- package/lib/components/content-card/ContentCard.styles.js +23 -0
- package/lib/components/content-card/ContentCard.styles.js.map +1 -0
- 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 +2 -0
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _ContentCard = require("./ContentCard.styles");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const ContentCard = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
children
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_ContentCard.StyledContentCard, null, children);
|
|
15
|
+
};
|
|
16
|
+
ContentCard.displayName = 'ContentCard';
|
|
17
|
+
var _default = ContentCard;
|
|
18
|
+
exports.default = _default;
|
|
19
|
+
//# sourceMappingURL=ContentCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentCard.js","names":["_react","_interopRequireDefault","require","_ContentCard","obj","__esModule","default","ContentCard","_ref","children","createElement","StyledContentCard","displayName","_default","exports"],"sources":["../../../src/components/content-card/ContentCard.tsx"],"sourcesContent":["import React, { FC, ReactNode } from 'react';\nimport { StyledContentCard } from './ContentCard.styles';\n\nexport type ContentCardProps = {\n /**\n * The content of the content card\n */\n children: ReactNode;\n};\n\nconst ContentCard: FC<ContentCardProps> = ({ children }) => (\n <StyledContentCard>{children}</StyledContentCard>\n);\n\nContentCard.displayName = 'ContentCard';\n\nexport default ContentCard;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAyD,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AASzD,MAAMG,WAAiC,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAS,CAAC,GAAAD,IAAA;EAAA,oBACnDR,MAAA,CAAAM,OAAA,CAAAI,aAAA,CAACP,YAAA,CAAAQ,iBAAiB,QAAEF,QAA4B,CAAC;AAAA,CACpD;AAEDF,WAAW,CAACK,WAAW,GAAG,aAAa;AAAC,IAAAC,QAAA,GAEzBN,WAAW;AAAAO,OAAA,CAAAR,OAAA,GAAAO,QAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledContentCard: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledContentCard = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
const StyledContentCard = _styledComponents.default.div`
|
|
10
|
+
background-color: ${_ref => {
|
|
11
|
+
let {
|
|
12
|
+
theme
|
|
13
|
+
} = _ref;
|
|
14
|
+
return theme['secondary-100'];
|
|
15
|
+
}};
|
|
16
|
+
padding: 8px 12px;
|
|
17
|
+
|
|
18
|
+
:not(:last-child) {
|
|
19
|
+
margin-bottom: 8px;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
exports.StyledContentCard = StyledContentCard;
|
|
23
|
+
//# sourceMappingURL=ContentCard.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentCard.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledContentCard","styled","div","_ref","theme","exports"],"sources":["../../../src/components/content-card/ContentCard.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledContentCardProps = WithTheme<unknown>;\n\nexport const StyledContentCard = styled.div`\n background-color: ${({ theme }: StyledContentCardProps) => theme['secondary-100']};\n padding: 8px 12px;\n\n :not(:last-child) {\n margin-bottom: 8px;\n }\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;AAKhC,MAAMG,iBAAiB,GAAGC,yBAAM,CAACC,GAAI;AAC5C,wBAAwBC,IAAA;EAAA,IAAC;IAAEC;EAA8B,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAAC,eAAe,CAAC;AAAA,CAAC;AACtF;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAL,iBAAA,GAAAA,iBAAA"}
|
|
@@ -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,OAAA;AAYA,IAAAC,SAAA,GAAAD,OAAA;AAAwE,SAAAE,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;A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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
|
@@ -10,6 +10,7 @@ export { default as ColorSchemeProvider } from './components/color-scheme-provid
|
|
|
10
10
|
export type { WithTheme } from './components/color-scheme-provider/ColorSchemeProvider';
|
|
11
11
|
export { default as ComboBox } from './components/combobox/ComboBox';
|
|
12
12
|
export type { IComboBoxItem as ComboBoxItem } from './components/combobox/ComboBox';
|
|
13
|
+
export { default as ContentCard } from './components/content-card/ContentCard';
|
|
13
14
|
export { default as ContextMenu } from './components/context-menu/ContextMenu';
|
|
14
15
|
export { default as GridImage } from './components/grid-image/GridImage';
|
|
15
16
|
export { default as Icon } from './components/icon/Icon';
|
|
@@ -24,3 +25,4 @@ export { default as SearchInput } from './components/search-input/SearchInput';
|
|
|
24
25
|
export { default as SharingBar } from './components/sharing-bar/SharingBar';
|
|
25
26
|
export { default as Slider } from './components/slider/Slider';
|
|
26
27
|
export { default as SmallWaitCursor, SmallWaitCursorSpeed, } from './components/small-wait-cursor/SmallWaitCursor';
|
|
28
|
+
export { default as TextArea } from './components/text-area/TextArea';
|
package/lib/index.js
CHANGED
|
@@ -63,6 +63,12 @@ Object.defineProperty(exports, "ComboBox", {
|
|
|
63
63
|
return _ComboBox.default;
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
+
Object.defineProperty(exports, "ContentCard", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _ContentCard.default;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
66
72
|
Object.defineProperty(exports, "ContextMenu", {
|
|
67
73
|
enumerable: true,
|
|
68
74
|
get: function () {
|
|
@@ -147,6 +153,12 @@ Object.defineProperty(exports, "SmallWaitCursorSpeed", {
|
|
|
147
153
|
return _SmallWaitCursor.SmallWaitCursorSpeed;
|
|
148
154
|
}
|
|
149
155
|
});
|
|
156
|
+
Object.defineProperty(exports, "TextArea", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () {
|
|
159
|
+
return _TextArea.default;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
150
162
|
var _Accordion = _interopRequireDefault(require("./components/accordion/Accordion"));
|
|
151
163
|
var _AccordionContent = _interopRequireDefault(require("./components/accordion/accordion-content/AccordionContent"));
|
|
152
164
|
var _AccordionGroup = _interopRequireDefault(require("./components/accordion/accordion-group/AccordionGroup"));
|
|
@@ -157,6 +169,7 @@ var _Button = _interopRequireDefault(require("./components/button/Button"));
|
|
|
157
169
|
var _Checkbox = _interopRequireDefault(require("./components/checkbox/Checkbox"));
|
|
158
170
|
var _ColorSchemeProvider = _interopRequireDefault(require("./components/color-scheme-provider/ColorSchemeProvider"));
|
|
159
171
|
var _ComboBox = _interopRequireDefault(require("./components/combobox/ComboBox"));
|
|
172
|
+
var _ContentCard = _interopRequireDefault(require("./components/content-card/ContentCard"));
|
|
160
173
|
var _ContextMenu = _interopRequireDefault(require("./components/context-menu/ContextMenu"));
|
|
161
174
|
var _GridImage = _interopRequireDefault(require("./components/grid-image/GridImage"));
|
|
162
175
|
var _Icon = _interopRequireDefault(require("./components/icon/Icon"));
|
|
@@ -170,6 +183,7 @@ var _SearchInput = _interopRequireDefault(require("./components/search-input/Sea
|
|
|
170
183
|
var _SharingBar = _interopRequireDefault(require("./components/sharing-bar/SharingBar"));
|
|
171
184
|
var _Slider = _interopRequireDefault(require("./components/slider/Slider"));
|
|
172
185
|
var _SmallWaitCursor = _interopRequireWildcard(require("./components/small-wait-cursor/SmallWaitCursor"));
|
|
186
|
+
var _TextArea = _interopRequireDefault(require("./components/text-area/TextArea"));
|
|
173
187
|
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); }
|
|
174
188
|
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; }
|
|
175
189
|
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","_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 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","_GridImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_alignment","_MentionFinder","_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 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';\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,IAAAM,OAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,oBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAEA,IAAAS,SAAA,GAAAV,sBAAA,CAAAC,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AA,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,SAAAtC,uBAAAgC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA"}
|
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.173",
|
|
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": "7e44faf366b4d691047e28ce340aae06c39d0c93"
|
|
67
67
|
}
|