@chayns-components/core 5.0.0-beta.164 → 5.0.0-beta.166

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.
@@ -1,4 +1,4 @@
1
- import { ChangeEventHandler, FC, FocusEventHandler, HTMLInputTypeAttribute, KeyboardEventHandler } from 'react';
1
+ import { ChangeEventHandler, FC, FocusEventHandler, HTMLInputTypeAttribute, KeyboardEventHandler, ReactNode } from 'react';
2
2
  export type InputProps = {
3
3
  /**
4
4
  * Disables the input so that it cannot be changed anymore
@@ -24,6 +24,10 @@ export type InputProps = {
24
24
  * Placeholder for the input field
25
25
  */
26
26
  placeholder?: string;
27
+ /**
28
+ * Element to be displayed next to or instead of the "placeholder"
29
+ */
30
+ placeholderElement?: ReactNode;
27
31
  /**
28
32
  * Input type set for input element (e.g. 'text', 'number' or 'password')
29
33
  */
@@ -16,6 +16,7 @@ const Input = _ref => {
16
16
  onFocus,
17
17
  onKeyDown,
18
18
  placeholder,
19
+ placeholderElement,
19
20
  type = 'text',
20
21
  value
21
22
  } = _ref;
@@ -58,6 +59,7 @@ const Input = _ref => {
58
59
  animate: {
59
60
  scale: hasValue ? 0.6 : 1
60
61
  },
62
+ initial: false,
61
63
  layout: true,
62
64
  style: {
63
65
  ...labelPosition,
@@ -67,7 +69,7 @@ const Input = _ref => {
67
69
  transition: {
68
70
  type: 'tween'
69
71
  }
70
- }, placeholder)));
72
+ }, placeholderElement, placeholder)));
71
73
  };
72
74
  Input.displayName = 'Input';
73
75
  var _default = Input;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","names":["_react","_interopRequireWildcard","require","_Input","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Input","_ref","isDisabled","onBlur","onChange","onFocus","onKeyDown","placeholder","type","value","hasValue","setHasValue","useState","handleInputFieldChange","useCallback","event","target","useEffect","labelPosition","useMemo","bottom","right","left","top","createElement","StyledInput","className","StyledInputContent","StyledInputField","disabled","StyledMotionInputLabel","animate","scale","layout","style","originX","originY","transition","displayName","_default","exports"],"sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n FC,\n FocusEventHandler,\n HTMLInputTypeAttribute,\n KeyboardEventHandler,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport {\n StyledInput,\n StyledInputContent,\n StyledInputField,\n StyledMotionInputLabel,\n} from './Input.styles';\n\nexport type InputProps = {\n /**\n * Disables the input so that it cannot be changed anymore\n */\n isDisabled?: boolean;\n /**\n * Function that is executed when the input field loses focus\n */\n onBlur?: FocusEventHandler<HTMLInputElement>;\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 the input field is focused\n */\n onFocus?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when a letter is pressed\n */\n onKeyDown?: KeyboardEventHandler<HTMLInputElement>;\n /**\n * Placeholder for the input field\n */\n placeholder?: string;\n /**\n * Input type set for input element (e.g. 'text', 'number' or 'password')\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value if the input field should be controlled\n */\n value?: string;\n};\n\nconst Input: FC<InputProps> = ({\n isDisabled,\n onBlur,\n onChange,\n onFocus,\n onKeyDown,\n placeholder,\n type = 'text',\n value,\n}) => {\n const [hasValue, setHasValue] = useState(typeof value === 'string' && value !== '');\n\n const handleInputFieldChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setHasValue(event.target.value !== '');\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange]\n );\n\n useEffect(() => {\n if (typeof value === 'string') {\n setHasValue(value !== '');\n }\n }, [value]);\n\n const labelPosition = useMemo(() => {\n if (hasValue) {\n return { bottom: -8, right: -6 };\n }\n\n return { left: 0, top: 0 };\n }, [hasValue]);\n\n return (\n <StyledInput className=\"beta-chayns-input\" isDisabled={isDisabled}>\n <StyledInputContent>\n <StyledInputField\n disabled={isDisabled}\n onBlur={onBlur}\n onChange={handleInputFieldChange}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n type={type}\n />\n <StyledMotionInputLabel\n animate={{ scale: hasValue ? 0.6 : 1 }}\n layout\n style={{ ...labelPosition, originX: 1, originY: 1 }}\n transition={{ type: 'tween' }}\n >\n {placeholder}\n </StyledMotionInputLabel>\n </StyledInputContent>\n </StyledInput>\n );\n};\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAYA,IAAAC,MAAA,GAAAD,OAAA;AAKwB,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;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,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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;MAAE,CAAC;IACpC;IAEA,OAAO;MAAEC,IAAI,EAAE,CAAC;MAAEC,GAAG,EAAE;IAAE,CAAC;EAC9B,CAAC,EAAE,CAACb,QAAQ,CAAC,CAAC;EAEd,oBACIpC,MAAA,CAAAW,OAAA,CAAAuC,aAAA,CAAC/C,MAAA,CAAAgD,WAAW;IAACC,SAAS,EAAC,mBAAmB;IAACxB,UAAU,EAAEA;EAAW,gBAC9D5B,MAAA,CAAAW,OAAA,CAAAuC,aAAA,CAAC/C,MAAA,CAAAkD,kBAAkB,qBACfrD,MAAA,CAAAW,OAAA,CAAAuC,aAAA,CAAC/C,MAAA,CAAAmD,gBAAgB;IACbC,QAAQ,EAAE3B,UAAW;IACrBC,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAES,sBAAuB;IACjCR,OAAO,EAAEA,OAAQ;IACjBC,SAAS,EAAEA,SAAU;IACrBG,KAAK,EAAEA,KAAM;IACbD,IAAI,EAAEA;EAAK,CACd,CAAC,eACFlC,MAAA,CAAAW,OAAA,CAAAuC,aAAA,CAAC/C,MAAA,CAAAqD,sBAAsB;IACnBC,OAAO,EAAE;MAAEC,KAAK,EAAEtB,QAAQ,GAAG,GAAG,GAAG;IAAE,CAAE;IACvCuB,MAAM;IACNC,KAAK,EAAE;MAAE,GAAGhB,aAAa;MAAEiB,OAAO,EAAE,CAAC;MAAEC,OAAO,EAAE;IAAE,CAAE;IACpDC,UAAU,EAAE;MAAE7B,IAAI,EAAE;IAAQ;EAAE,GAE7BD,WACmB,CACR,CACX,CAAC;AAEtB,CAAC;AAEDP,KAAK,CAACsC,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAEbvC,KAAK;AAAAwC,OAAA,CAAAvD,OAAA,GAAAsD,QAAA"}
1
+ {"version":3,"file":"Input.js","names":["_react","_interopRequireWildcard","require","_Input","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Input","_ref","isDisabled","onBlur","onChange","onFocus","onKeyDown","placeholder","placeholderElement","type","value","hasValue","setHasValue","useState","handleInputFieldChange","useCallback","event","target","useEffect","labelPosition","useMemo","bottom","right","left","top","createElement","StyledInput","className","StyledInputContent","StyledInputField","disabled","StyledMotionInputLabel","animate","scale","initial","layout","style","originX","originY","transition","displayName","_default","exports"],"sources":["../../../src/components/input/Input.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n FC,\n FocusEventHandler,\n HTMLInputTypeAttribute,\n KeyboardEventHandler,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport {\n StyledInput,\n StyledInputContent,\n StyledInputField,\n StyledMotionInputLabel,\n} from './Input.styles';\n\nexport type InputProps = {\n /**\n * Disables the input so that it cannot be changed anymore\n */\n isDisabled?: boolean;\n /**\n * Function that is executed when the input field loses focus\n */\n onBlur?: FocusEventHandler<HTMLInputElement>;\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 the input field is focused\n */\n onFocus?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function that is executed when a letter is pressed\n */\n onKeyDown?: KeyboardEventHandler<HTMLInputElement>;\n /**\n * Placeholder for the input field\n */\n placeholder?: string;\n /**\n * Element to be displayed next to or instead of the \"placeholder\"\n */\n placeholderElement?: ReactNode;\n /**\n * Input type set for input element (e.g. 'text', 'number' or 'password')\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value if the input field should be controlled\n */\n value?: string;\n};\n\nconst Input: FC<InputProps> = ({\n isDisabled,\n onBlur,\n onChange,\n onFocus,\n onKeyDown,\n placeholder,\n placeholderElement,\n type = 'text',\n value,\n}) => {\n const [hasValue, setHasValue] = useState(typeof value === 'string' && value !== '');\n\n const handleInputFieldChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setHasValue(event.target.value !== '');\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange]\n );\n\n useEffect(() => {\n if (typeof value === 'string') {\n setHasValue(value !== '');\n }\n }, [value]);\n\n const labelPosition = useMemo(() => {\n if (hasValue) {\n return { bottom: -8, right: -6 };\n }\n\n return { left: 0, top: 0 };\n }, [hasValue]);\n\n return (\n <StyledInput className=\"beta-chayns-input\" isDisabled={isDisabled}>\n <StyledInputContent>\n <StyledInputField\n disabled={isDisabled}\n onBlur={onBlur}\n onChange={handleInputFieldChange}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n type={type}\n />\n <StyledMotionInputLabel\n animate={{ scale: hasValue ? 0.6 : 1 }}\n initial={false}\n layout\n style={{ ...labelPosition, originX: 1, originY: 1 }}\n transition={{ type: 'tween' }}\n >\n {placeholderElement}\n {placeholder}\n </StyledMotionInputLabel>\n </StyledInputContent>\n </StyledInput>\n );\n};\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAaA,IAAAC,MAAA,GAAAD,OAAA;AAKwB,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;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,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,W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C;AAEtB,CAAC;AAEDP,KAAK,CAACwC,WAAW,GAAG,OAAO;AAAC,IAAAC,QAAA,GAEbzC,KAAK;AAAA0C,OAAA,CAAAzD,OAAA,GAAAwD,QAAA"}
@@ -35,10 +35,6 @@ const StyledInput = _styledComponents.default.div`
35
35
  padding: 8px 10px;
36
36
  transition: opacity 0.3s ease;
37
37
  width: 100%;
38
-
39
- &:not(&:first-child) {
40
- margin-top: 8px;
41
- }
42
38
  `;
43
39
  exports.StyledInput = StyledInput;
44
40
  const StyledInputContent = _styledComponents.default.div`
@@ -62,6 +58,10 @@ const StyledInputField = _styledComponents.default.input`
62
58
  `;
63
59
  exports.StyledInputField = StyledInputField;
64
60
  const StyledMotionInputLabel = (0, _styledComponents.default)(_framerMotion.motion.label)`
61
+ align-items: center;
62
+ display: flex;
63
+ flex: 0 0 auto;
64
+ gap: 4px;
65
65
  line-height: 1.15;
66
66
  pointer-events: none;
67
67
  position: absolute;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledInput","styled","div","_ref","theme","_ref2","_ref3","isDisabled","exports","StyledInputContent","StyledInputField","input","_ref4","text","StyledMotionInputLabel","motion","label"],"sources":["../../../src/components/input/Input.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { InputProps } from './Input';\n\ntype StyledInputProps = WithTheme<Pick<InputProps, 'isDisabled'>>;\n\nexport const StyledInput = styled.div<StyledInputProps>`\n align-items: center;\n background-color: ${({ theme }: StyledInputProps) => theme['100']};\n border: 1px solid rgba(160, 160, 160, 0.3);\n border-radius: 3px;\n color: ${({ theme }: StyledInputProps) => theme['006']};\n display: flex;\n justify-content: space-between;\n min-height: 42px;\n opacity: ${({ isDisabled }) => (isDisabled ? 0.5 : 1)};\n padding: 8px 10px;\n transition: opacity 0.3s ease;\n width: 100%;\n\n &:not(&:first-child) {\n margin-top: 8px;\n }\n`;\n\nexport const StyledInputContent = styled.div`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n position: relative;\n min-width: 0;\n`;\n\nexport const StyledInputField = styled.input`\n background: none;\n border: none;\n color: ${({ theme }: StyledInputProps) => theme.text};\n padding: 0;\n`;\n\nexport const StyledMotionInputLabel = styled(motion.label)`\n line-height: 1.15;\n pointer-events: none;\n position: absolute;\n user-select: none;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMhC,MAAMG,WAAW,GAAGC,yBAAM,CAACC,GAAsB;AACxD;AACA,wBAAwBC,IAAA;EAAA,IAAC;IAAEC;EAAwB,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AACtE;AACA;AACA,aAAaC,KAAA;EAAA,IAAC;IAAED;EAAwB,CAAC,GAAAC,KAAA;EAAA,OAAKD,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AAC3D;AACA;AACA;AACA,eAAeE,KAAA;EAAA,IAAC;IAAEC;EAAW,CAAC,GAAAD,KAAA;EAAA,OAAMC,UAAU,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAR,WAAA,GAAAA,WAAA;AAEK,MAAMS,kBAAkB,GAAGR,yBAAM,CAACC,GAAI;AAC7C;AACA;AACA;AACA;AACA;AACA,CAAC;AAACM,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAEK,MAAMC,gBAAgB,GAAGT,yBAAM,CAACU,KAAM;AAC7C;AACA;AACA,aAAaC,KAAA;EAAA,IAAC;IAAER;EAAwB,CAAC,GAAAQ,KAAA;EAAA,OAAKR,KAAK,CAACS,IAAI;AAAA,CAAC;AACzD;AACA,CAAC;AAACL,OAAA,CAAAE,gBAAA,GAAAA,gBAAA;AAEK,MAAMI,sBAAsB,GAAG,IAAAb,yBAAM,EAACc,oBAAM,CAACC,KAAK,CAAE;AAC3D;AACA;AACA;AACA;AACA,CAAC;AAACR,OAAA,CAAAM,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"file":"Input.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledInput","styled","div","_ref","theme","_ref2","_ref3","isDisabled","exports","StyledInputContent","StyledInputField","input","_ref4","text","StyledMotionInputLabel","motion","label"],"sources":["../../../src/components/input/Input.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { InputProps } from './Input';\n\ntype StyledInputProps = WithTheme<Pick<InputProps, 'isDisabled'>>;\n\nexport const StyledInput = styled.div<StyledInputProps>`\n align-items: center;\n background-color: ${({ theme }: StyledInputProps) => theme['100']};\n border: 1px solid rgba(160, 160, 160, 0.3);\n border-radius: 3px;\n color: ${({ theme }: StyledInputProps) => theme['006']};\n display: flex;\n justify-content: space-between;\n min-height: 42px;\n opacity: ${({ isDisabled }) => (isDisabled ? 0.5 : 1)};\n padding: 8px 10px;\n transition: opacity 0.3s ease;\n width: 100%;\n`;\n\nexport const StyledInputContent = styled.div`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n position: relative;\n min-width: 0;\n`;\n\nexport const StyledInputField = styled.input`\n background: none;\n border: none;\n color: ${({ theme }: StyledInputProps) => theme.text};\n padding: 0;\n`;\n\nexport const StyledMotionInputLabel = styled(motion.label)`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n gap: 4px;\n line-height: 1.15;\n pointer-events: none;\n position: absolute;\n user-select: none;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA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2
+ export type SearchInputProps = {
3
+ onActiveChange?: (isActive: boolean) => void;
4
+ /**
5
+ * Function that is executed when the text of the input changes
6
+ */
7
+ onChange: ChangeEventHandler<HTMLInputElement>;
8
+ /**
9
+ * Placeholder for the input field
10
+ */
11
+ placeholder?: string;
12
+ /**
13
+ * Value if the input field should be controlled
14
+ */
15
+ value?: string;
16
+ };
17
+ declare const SearchInput: FC<SearchInputProps>;
18
+ export default SearchInput;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _framerMotion = require("framer-motion");
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _index = require("../../index");
10
+ var _SearchInput = require("./SearchInput.styles");
11
+ 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); }
12
+ 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; }
13
+ const SearchInput = _ref => {
14
+ let {
15
+ onActiveChange,
16
+ onChange,
17
+ placeholder,
18
+ value
19
+ } = _ref;
20
+ const [isActive, setIsActive] = (0, _react.useState)(typeof value === 'string' && value.trim() !== '');
21
+ const handleBackIconClick = (0, _react.useCallback)(() => {
22
+ setIsActive(false);
23
+ }, []);
24
+ const handleSearchIconClick = (0, _react.useCallback)(() => setIsActive(true), []);
25
+ (0, _react.useEffect)(() => {
26
+ if (typeof onActiveChange === 'function') {
27
+ onActiveChange(isActive);
28
+ }
29
+ }, [isActive, onActiveChange]);
30
+ return /*#__PURE__*/_react.default.createElement(_SearchInput.StyledSearchInput, {
31
+ className: "beta-chayns-search-input"
32
+ }, /*#__PURE__*/_react.default.createElement(_SearchInput.StyledMotionSearchInputIconWrapper, null, /*#__PURE__*/_react.default.createElement(_framerMotion.AnimatePresence, {
33
+ initial: false
34
+ }, /*#__PURE__*/_react.default.createElement(_SearchInput.StyledMotionSearchInputIconWrapperContent, {
35
+ animate: {
36
+ opacity: 1
37
+ },
38
+ exit: {
39
+ opacity: 0,
40
+ position: 'absolute'
41
+ },
42
+ initial: {
43
+ opacity: 0
44
+ },
45
+ key: isActive ? 'backIcon' : 'searchIcon'
46
+ }, /*#__PURE__*/_react.default.createElement(_index.Icon, {
47
+ icons: isActive ? ['fa fa-arrow-left'] : ['fa fa-search'],
48
+ onClick: isActive ? handleBackIconClick : handleSearchIconClick,
49
+ size: 18
50
+ })))), /*#__PURE__*/_react.default.createElement(_framerMotion.AnimatePresence, {
51
+ initial: false
52
+ }, isActive && /*#__PURE__*/_react.default.createElement(_SearchInput.StyledMotionSearchInputContentWrapper, {
53
+ animate: {
54
+ opacity: 1,
55
+ width: '100%'
56
+ },
57
+ exit: {
58
+ opacity: 0,
59
+ width: 0
60
+ },
61
+ initial: {
62
+ opacity: 0,
63
+ width: 0
64
+ },
65
+ key: "searchInputContentWrapper"
66
+ }, /*#__PURE__*/_react.default.createElement(_index.Input, {
67
+ onChange: onChange,
68
+ placeholder: placeholder,
69
+ placeholderElement: /*#__PURE__*/_react.default.createElement(_index.Icon, {
70
+ icons: ['fa fa-search']
71
+ }),
72
+ value: value
73
+ }))));
74
+ };
75
+ SearchInput.displayName = 'SearchInput';
76
+ var _default = SearchInput;
77
+ exports.default = _default;
78
+ //# sourceMappingURL=SearchInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchInput.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_index","_SearchInput","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SearchInput","_ref","onActiveChange","onChange","placeholder","value","isActive","setIsActive","useState","trim","handleBackIconClick","useCallback","handleSearchIconClick","useEffect","createElement","StyledSearchInput","className","StyledMotionSearchInputIconWrapper","AnimatePresence","initial","StyledMotionSearchInputIconWrapperContent","animate","opacity","exit","position","Icon","icons","onClick","size","StyledMotionSearchInputContentWrapper","width","Input","placeholderElement","displayName","_default","exports"],"sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["import { AnimatePresence } from 'framer-motion';\nimport React, { ChangeEventHandler, FC, useCallback, useEffect, useState } from 'react';\nimport { Icon, Input } from '../../index';\nimport {\n StyledMotionSearchInputContentWrapper,\n StyledMotionSearchInputIconWrapper,\n StyledMotionSearchInputIconWrapperContent,\n StyledSearchInput,\n} from './SearchInput.styles';\n\nexport type SearchInputProps = {\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 * Placeholder for the input field\n */\n placeholder?: string;\n /**\n * Value if the input field should be controlled\n */\n value?: string;\n};\n\nconst SearchInput: FC<SearchInputProps> = ({ onActiveChange, onChange, placeholder, value }) => {\n const [isActive, setIsActive] = useState(typeof value === 'string' && value.trim() !== '');\n\n const handleBackIconClick = useCallback(() => {\n setIsActive(false);\n }, []);\n\n const handleSearchIconClick = useCallback(() => setIsActive(true), []);\n\n useEffect(() => {\n if (typeof onActiveChange === 'function') {\n onActiveChange(isActive);\n }\n }, [isActive, onActiveChange]);\n\n return (\n <StyledSearchInput className=\"beta-chayns-search-input\">\n <StyledMotionSearchInputIconWrapper>\n <AnimatePresence initial={false}>\n <StyledMotionSearchInputIconWrapperContent\n animate={{ opacity: 1 }}\n exit={{ opacity: 0, position: 'absolute' }}\n initial={{ opacity: 0 }}\n key={isActive ? 'backIcon' : 'searchIcon'}\n >\n <Icon\n icons={isActive ? ['fa fa-arrow-left'] : ['fa fa-search']}\n onClick={isActive ? handleBackIconClick : handleSearchIconClick}\n size={18}\n />\n </StyledMotionSearchInputIconWrapperContent>\n </AnimatePresence>\n </StyledMotionSearchInputIconWrapper>\n <AnimatePresence initial={false}>\n {isActive && (\n <StyledMotionSearchInputContentWrapper\n animate={{ opacity: 1, width: '100%' }}\n exit={{ opacity: 0, width: 0 }}\n initial={{ opacity: 0, width: 0 }}\n key=\"searchInputContentWrapper\"\n >\n <Input\n onChange={onChange}\n placeholder={placeholder}\n placeholderElement={<Icon icons={['fa fa-search']} />}\n value={value}\n />\n </StyledMotionSearchInputContentWrapper>\n )}\n </AnimatePresence>\n </StyledSearchInput>\n );\n};\n\nSearchInput.displayName = 'SearchInput';\n\nexport default SearchInput;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAK8B,SAAAK,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,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EA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MAAEC,OAAO,EAAE,CAAC;MAAEQ,KAAK,EAAE;IAAO,CAAE;IACvCP,IAAI,EAAE;MAAED,OAAO,EAAE,CAAC;MAAEQ,KAAK,EAAE;IAAE,CAAE;IAC/BX,OAAO,EAAE;MAAEG,OAAO,EAAE,CAAC;MAAEQ,KAAK,EAAE;IAAE,CAAE;IAClCpC,GAAG,EAAC;EAA2B,gBAE/BpB,MAAA,CAAAW,OAAA,CAAA6B,aAAA,CAACtC,MAAA,CAAAuD,KAAK;IACF5B,QAAQ,EAAEA,QAAS;IACnBC,WAAW,EAAEA,WAAY;IACzB4B,kBAAkB,eAAE1D,MAAA,CAAAW,OAAA,CAAA6B,aAAA,CAACtC,MAAA,CAAAiD,IAAI;MAACC,KAAK,EAAE,CAAC,cAAc;IAAE,CAAE,CAAE;IACtDrB,KAAK,EAAEA;EAAM,CAChB,CACkC,CAE9B,CACF,CAAC;AAE5B,CAAC;AAEDL,WAAW,CAACiC,WAAW,GAAG,aAAa;AAAC,IAAAC,QAAA,GAEzBlC,WAAW;AAAAmC,OAAA,CAAAlD,OAAA,GAAAiD,QAAA"}
@@ -0,0 +1,4 @@
1
+ export declare const StyledSearchInput: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledMotionSearchInputContentWrapper: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
3
+ export declare const StyledMotionSearchInputIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledMotionSearchInputIconWrapperContent: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledSearchInput = exports.StyledMotionSearchInputIconWrapperContent = exports.StyledMotionSearchInputIconWrapper = exports.StyledMotionSearchInputContentWrapper = void 0;
7
+ var _framerMotion = require("framer-motion");
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ const StyledSearchInput = _styledComponents.default.div`
11
+ align-items: center;
12
+ display: flex;
13
+ gap: 8px;
14
+ height: 42px;
15
+ `;
16
+ exports.StyledSearchInput = StyledSearchInput;
17
+ const StyledMotionSearchInputContentWrapper = (0, _styledComponents.default)(_framerMotion.motion.div)`
18
+ overflow: hidden;
19
+ `;
20
+ exports.StyledMotionSearchInputContentWrapper = StyledMotionSearchInputContentWrapper;
21
+ const StyledMotionSearchInputIconWrapper = _styledComponents.default.div`
22
+ height: 18px;
23
+ width: 18px;
24
+ `;
25
+ exports.StyledMotionSearchInputIconWrapper = StyledMotionSearchInputIconWrapper;
26
+ const StyledMotionSearchInputIconWrapperContent = (0, _styledComponents.default)(_framerMotion.motion.div)``;
27
+ exports.StyledMotionSearchInputIconWrapperContent = StyledMotionSearchInputIconWrapperContent;
28
+ //# sourceMappingURL=SearchInput.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchInput.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledSearchInput","styled","div","exports","StyledMotionSearchInputContentWrapper","motion","StyledMotionSearchInputIconWrapper","StyledMotionSearchInputIconWrapperContent"],"sources":["../../../src/components/search-input/SearchInput.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledSearchInput = styled.div`\n align-items: center;\n display: flex;\n gap: 8px;\n height: 42px;\n`;\n\nexport const StyledMotionSearchInputContentWrapper = styled(motion.div)`\n overflow: hidden;\n`;\n\nexport const StyledMotionSearchInputIconWrapper = styled.div`\n height: 18px;\n width: 18px;\n`;\n\nexport const StyledMotionSearchInputIconWrapperContent = styled(motion.div)``;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,iBAAiB,GAAGC,yBAAM,CAACC,GAAI;AAC5C;AACA;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAH,iBAAA,GAAAA,iBAAA;AAEK,MAAMI,qCAAqC,GAAG,IAAAH,yBAAM,EAACI,oBAAM,CAACH,GAAG,CAAE;AACxE;AACA,CAAC;AAACC,OAAA,CAAAC,qCAAA,GAAAA,qCAAA;AAEK,MAAME,kCAAkC,GAAGL,yBAAM,CAACC,GAAI;AAC7D;AACA;AACA,CAAC;AAACC,OAAA,CAAAG,kCAAA,GAAAA,kCAAA;AAEK,MAAMC,yCAAyC,GAAG,IAAAN,yBAAM,EAACI,oBAAM,CAACH,GAAG,CAAE,EAAC;AAACC,OAAA,CAAAI,yCAAA,GAAAA,yCAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/core",
3
- "version": "5.0.0-beta.164",
3
+ "version": "5.0.0-beta.166",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "keywords": [
6
6
  "chayns",
@@ -46,21 +46,22 @@
46
46
  "lerna": "^6.6.1",
47
47
  "react": "^17.0.2",
48
48
  "react-dom": "^17.0.2",
49
+ "styled-components": "^5.3.10",
49
50
  "typescript": "^4.9.5"
50
51
  },
51
52
  "dependencies": {
52
53
  "@chayns/colors": "^2.0.0",
53
54
  "clsx": "^1.2.1",
54
55
  "framer-motion": "^6.5.1",
55
- "styled-components": "^5.3.10",
56
56
  "uuid": "^9.0.0"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "react": ">=16.14.0",
60
- "react-dom": ">=16.14.0"
60
+ "react-dom": ">=16.14.0",
61
+ "styled-components": ">=5.0.0"
61
62
  },
62
63
  "publishConfig": {
63
64
  "access": "public"
64
65
  },
65
- "gitHead": "15292a04249204f10f954ba94119a66c814840f4"
66
+ "gitHead": "909efaacd0f64c35a7f52277876ef50639385161"
66
67
  }