@vchasno/ui-kit 0.4.23 → 0.4.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/components/BodyPortal/BodyPortal.d.ts +8 -0
  3. package/dist/components/BodyPortal/BodyPortal.js +2 -0
  4. package/dist/components/BodyPortal/BodyPortal.js.map +1 -0
  5. package/dist/components/Button/Button.d.ts +2 -2
  6. package/dist/components/Button/Button.js +1 -1
  7. package/dist/components/Button/Button.js.map +1 -1
  8. package/dist/components/Checkbox/Checkbox.d.ts +2 -2
  9. package/dist/components/Checkbox/Checkbox.js +1 -1
  10. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  11. package/dist/components/Datepicker/DatePicker.d.ts +2 -2
  12. package/dist/components/Datepicker/DatePicker.js +1 -1
  13. package/dist/components/Datepicker/DatePicker.js.map +1 -1
  14. package/dist/components/Input/Input.d.ts +2 -2
  15. package/dist/components/Input/Input.js +1 -1
  16. package/dist/components/Input/Input.js.map +1 -1
  17. package/dist/components/MaskInput/MaskInput.js +1 -1
  18. package/dist/components/MaskInput/MaskInput.js.map +1 -1
  19. package/dist/components/PasswordInput/PasswordInput.js +1 -1
  20. package/dist/components/PasswordInput/PasswordInput.js.map +1 -1
  21. package/dist/components/ScrollableBox/ScrollableBox.d.ts +13 -0
  22. package/dist/components/ScrollableBox/ScrollableBox.js +2 -0
  23. package/dist/components/ScrollableBox/ScrollableBox.js.map +1 -0
  24. package/dist/components/ScrollableBox/useElementScrollable.d.ts +5 -0
  25. package/dist/components/ScrollableBox/useElementScrollable.js +2 -0
  26. package/dist/components/ScrollableBox/useElementScrollable.js.map +1 -0
  27. package/dist/components/Select/AsyncSelect.d.ts +3 -3
  28. package/dist/components/Select/AsyncSelect.js +1 -1
  29. package/dist/components/Select/AsyncSelect.js.map +1 -1
  30. package/dist/components/Select/Select.d.ts +2 -2
  31. package/dist/components/Select/Select.js +1 -1
  32. package/dist/components/Select/Select.js.map +1 -1
  33. package/dist/components/Select/SelectCreatable.d.ts +2 -2
  34. package/dist/components/Select/SelectCreatable.js +1 -1
  35. package/dist/components/Select/SelectCreatable.js.map +1 -1
  36. package/dist/components/Text/Text.d.ts +2 -2
  37. package/dist/components/Text/Text.js +1 -1
  38. package/dist/components/Text/Text.js.map +1 -1
  39. package/dist/components/TextAreaInput/TextAreaInput.js +1 -1
  40. package/dist/components/TextAreaInput/TextAreaInput.js.map +1 -1
  41. package/dist/components/TextInput/TextInput.js +1 -1
  42. package/dist/components/TextInput/TextInput.js.map +1 -1
  43. package/dist/components/types.d.ts +5 -1
  44. package/dist/css/_animations.css +18 -0
  45. package/dist/css/_theme.css +4 -0
  46. package/dist/css/vchasno-ui.css +1 -1
  47. package/dist/index.d.ts +3 -0
  48. package/dist/index.js +1 -1
  49. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React from 'react';\nimport ReactSelect, { GroupBase, Props as ReactSelectProps, components } from 'react-select';\n\nimport cn from 'classnames';\n\nimport InputMeta from '../InputMeta';\nimport {\n DataQa,\n ErrorFeedback,\n HideEmptyMeta,\n LoadingFeedback,\n WithHint,\n WithLabel,\n} from '../types';\nimport Label from './Label';\nimport { SelectCreatableProps } from './SelectCreatable';\nimport CustomComponents from './customComponents';\nimport defaultProps from './defaultProps';\nimport { Option } from './types';\nimport { composeStyles } from './utils';\n\nimport './Select.global.css';\n\nexport interface SelectProps\n extends ReactSelectProps<Option, false | true, GroupBase<Option>>,\n Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {\n wide?: boolean;\n}\n\nconst Select: React.FC<SelectProps> = ({\n className,\n label,\n hint,\n wide,\n required,\n loading,\n isDisabled,\n menuPlacement = 'auto',\n noOptionsMessage = defaultProps.noOptionsMessageDefault,\n loadingMessage = defaultProps.loadingMessageDefault,\n placeholder = ' ', //need \"space\" for correct label working\n components = {},\n error = '',\n dataQa,\n closeMenuOnSelect = true,\n hideEmptyMeta = false,\n ...rest\n}) => {\n return (\n <label\n data-qa={dataQa}\n className={cn(\n 'vchasno-ui-select',\n {\n '--required': required,\n '--disabled': isDisabled,\n '--wide': wide,\n '--error': error,\n },\n className,\n )}\n >\n {label && <Label label={label} />}\n <ReactSelect\n required={required}\n isLoading={loading}\n components={{\n ...(CustomComponents as SelectCreatableProps['components']),\n ...components,\n }}\n closeMenuOnSelect={closeMenuOnSelect}\n classNamePrefix=\"vchasno-ui-select\"\n menuPlacement={menuPlacement}\n isDisabled={isDisabled}\n noOptionsMessage={noOptionsMessage}\n loadingMessage={loadingMessage}\n placeholder={placeholder}\n {...rest}\n styles={\n {\n ...composeStyles,\n ...rest.styles,\n } as never\n }\n />\n {hideEmptyMeta && !error && !hint ? null : <InputMeta hint={hint} error={error} />}\n </label>\n );\n};\n\nexport const SelectComponents = components;\n\nexport default Select;\n"],"names":["Select","_param","className","label","hint","wide","required","loading","isDisabled","menuPlacement","noOptionsMessage","defaultProps","noOptionsMessageDefault","_param_noOptionsMessage","_param_loadingMessage","loadingMessage","loadingMessageDefault","placeholder","components","_param_error","error","dataQa","closeMenuOnSelect","hideEmptyMeta","rest","React","data-qa","cn","Label","ReactSelect","isLoading","_object_spread","CustomComponents","_param_components","classNamePrefix","styles","composeStyles","InputMeta","SelectComponents"],"mappings":"krBA6BA,IAAMA,EAAgC,SAAAC,CAAA,EAClCC,QAAAA,EAAAA,EAAAA,UACAC,EAAAA,EAAAA,KAAAA,CACAC,IAAAA,IACAC,CAAAA,EAAAA,EAAAA,KACAC,EAAAA,EAAAA,QAAAA,CACAC,IAAAA,OACAC,CAAAA,EAAAA,EAAAA,eACAC,aAAAA,KACAC,gBAAAA,CAAAA,EAAAA,AAAAA,KAAAA,IAAAA,EAAmBC,EAAaC,uBAAuB,CAAAC,EAAAC,EAAAb,EACvDc,eAAAA,EAAiBJ,AAAAA,KAAAA,IAAAA,EAAAA,EAAaK,qBAAqB,CACnDC,EAAAA,EAAAA,EAAAA,WAAAA,CACAC,EAAAA,EAAAA,UAAAA,CAAcC,EAAAlB,EACdmB,MAAAA,EAAQD,AAAA,KAAA,IAAAA,EAAA,GAAAA,EACRE,IAAAA,MACAC,CAAAA,EAAAA,EAAAA,iBAAAA,CACAC,EAAAA,EAAAA,aAAAA,CACGC,EAAAA,sXAAAA,EAAAA,CAhBHtB,YACAC,QACAC,OACAC,OACAC,WACAC,UACAC,aACAC,gBACAC,mBACAK,iBACAE,cACAC,aACAE,QACAC,SACAC,oBACAC,kBAGA,oBACIE,EAACtB,aAAAA,CAAAA,QAAAA,CACGuB,UAASL,EACTnB,UAAWyB,EACP,oBACA,CACI,aAAcrB,EACd,aAAcE,EACd,SAAUH,EACV,UAAWe,CAEflB,EAAAA,EAGHC,EAAAA,GAAS,WAAA,EAAAsB,EAACG,aAAAA,CAAAA,EAAAA,CAAMzB,MAAOA,IACxB,WAAA,EAAAsB,EAACI,aAAAA,CAAAA,KAAAA,EAAAA,CACGvB,SAAUA,EACVwB,UAAWvB,EACXW,WAAYa,KACJC,aA1BP,CAAC,EAAAC,GA6BFX,8BAzBZC,EA0BYW,gBAAgB,oBAChBzB,cAnCZA,AAAAA,KAAAA,IAAAA,EAAgB,SAoCJD,WAAYA,EACZE,iBAAkBA,EAClBK,eAAgBA,EAChBE,uBApCE,IACdC,CAoCgBM,EAAAA,OAAAA,CACJW,OACIJ,EAAA,CAAA,EACOK,EACAZ,EAAKW,MAAM,CAIzBZ,+UAAAA,cAvCNC,CAAAA,GAuCwBJ,GAAUhB,EAAc,WAAA,EAAAqB,EAACY,aAAAA,CAAAA,EAAAA,CAAUjC,KAAMA,EAAMgB,MAAOA,IAArC,KAGhD,EAEakB,EAAmBpB"}
1
+ {"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React from 'react';\nimport ReactSelect, { GroupBase, Props as ReactSelectProps, components } from 'react-select';\n\nimport cn from 'classnames';\n\nimport InputMeta from '../InputMeta';\nimport {\n DataQa,\n ErrorFeedback,\n HideEmptyMeta,\n LoadingFeedback,\n WithHint,\n WithLabel,\n WithPulseAnimation,\n} from '../types';\nimport Label from './Label';\nimport { SelectCreatableProps } from './SelectCreatable';\nimport CustomComponents from './customComponents';\nimport defaultProps from './defaultProps';\nimport { Option } from './types';\nimport { composeStyles } from './utils';\n\nimport './Select.global.css';\n\nexport interface SelectProps\n extends ReactSelectProps<Option, false | true, GroupBase<Option>>,\n Partial<\n WithLabel &\n WithHint &\n LoadingFeedback &\n ErrorFeedback &\n DataQa &\n HideEmptyMeta &\n WithPulseAnimation\n > {\n wide?: boolean;\n}\n\nconst Select: React.FC<SelectProps> = ({\n className,\n label,\n hint,\n wide,\n required,\n loading,\n isDisabled,\n menuPlacement = 'auto',\n noOptionsMessage = defaultProps.noOptionsMessageDefault,\n loadingMessage = defaultProps.loadingMessageDefault,\n placeholder = ' ', //need \"space\" for correct label working\n components = {},\n error = '',\n dataQa,\n closeMenuOnSelect = true,\n hideEmptyMeta = false,\n pulse,\n ...rest\n}) => {\n return (\n <label\n data-qa={dataQa}\n className={cn(\n 'vchasno-ui-select',\n {\n '--pulse': pulse,\n '--required': required,\n '--disabled': isDisabled,\n '--wide': wide,\n '--error': error,\n },\n className,\n )}\n >\n {label && <Label label={label} />}\n <ReactSelect\n required={required}\n isLoading={loading}\n components={{\n ...(CustomComponents as SelectCreatableProps['components']),\n ...components,\n }}\n closeMenuOnSelect={closeMenuOnSelect}\n classNamePrefix=\"vchasno-ui-select\"\n menuPlacement={menuPlacement}\n isDisabled={isDisabled}\n noOptionsMessage={noOptionsMessage}\n loadingMessage={loadingMessage}\n placeholder={placeholder}\n {...rest}\n styles={\n {\n ...composeStyles,\n ...rest.styles,\n } as never\n }\n />\n {hideEmptyMeta && !error && !hint ? null : <InputMeta hint={hint} error={error} />}\n </label>\n );\n};\n\nexport const SelectComponents = components;\n\nexport default Select;\n"],"names":["Select","_param","className","label","hint","wide","required","loading","isDisabled","menuPlacement","_param_noOptionsMessage","noOptionsMessage","defaultProps","noOptionsMessageDefault","loadingMessage","loadingMessageDefault","placeholder","components","error","dataQa","closeMenuOnSelect","hideEmptyMeta","pulse","rest","React","data-qa","cn","Label","ReactSelect","isLoading","_object_spread","CustomComponents","classNamePrefix","_param_menuPlacement","styles","composeStyles","InputMeta","SelectComponents"],"mappings":"krBAsCA,IAAMA,EAAgC,SAAAC,CAAA,UAClCC,EAAAA,EAAAA,SAAAA,CACAC,IAAAA,KACAC,CAAAA,EAAAA,EAAAA,KACAC,EAAAA,EAAAA,IAAAA,CACAC,IAAAA,QACAC,CAAAA,EAAAA,EAAAA,QACAC,EAAAA,EAAAA,UAAAA,CAAAA,EAAAA,EACAC,cAAgBC,EAAAT,EAChBU,iBAAAA,EAAmBC,AAAAA,KAAAA,IAAAA,EAAAA,EAAaC,uBAAuB,CACvDC,EAAAA,EAAAA,EAAAA,cAAAA,CAAAA,aAAiBF,EAAaG,qBAAqB,OACnDC,WAAAA,KACAC,UAAAA,CACAC,EAAAA,EAAAA,KAAAA,CAAAA,aAAQ,GACRC,EAAAA,EAAAA,EAAAA,WACAC,iBAAAA,KACAC,aAAAA,CACAC,EAAAA,EAAAA,KACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAjBHrB,YACAC,QACAC,OACAC,OACAC,WACAC,UACAC,aACAC,gBACAE,mBACAG,iBACAE,cACAC,aACAC,QACAC,SACAC,oBACAC,gBACAC,UAGA,oBACIE,EAACrB,aAAAA,CAAAA,QAAAA,CACGsB,UAASN,EACTjB,UAAWwB,EACP,oBACA,CACI,UAAWJ,EACX,aAAchB,EACd,aAAcE,EACd,SAAUH,EACV,UAAWa,CAEfhB,EAAAA,EAGHC,EAAAA,GAAS,WAAA,EAAAqB,EAACG,aAAAA,CAAAA,EAAAA,CAAMxB,MAAOA,IACxB,WAAA,EAAAqB,EAACI,aAAAA,CAAAA,KAAAA,EAAAA,CACGtB,SAAUA,EACVuB,UAAWtB,EACXU,WAAYa,KACJC,EA5BpBd,AAAAA,KAAAA,IAAAA,EAAa,GACbC,GA8BYE,kBA5BZA,AAAAA,KAAAA,IAAAA,KA6BYY,gBAAgB,oBAChBvB,cArCIwB,AAAA,KAAA,IAAAA,EAAA,OAAAA,EAsCJzB,WAAYA,EACZG,iBAAkBA,EAClBG,eAAgBA,EAChBE,YAtCZA,AAAAA,KAAAA,IAAAA,EAAc,KAuCEO,EAAAA,OAAAA,CACJW,OACIJ,EAAA,CAAA,EACOK,EACAZ,EAAKW,MAAM,CAIzBb,+UAAAA,CA1CTA,CAAAA,AAAAA,KAAAA,IAAAA,GACAC,CAAAA,GAyC2BJ,GAAUd,EAAc,WAAA,EAAAoB,EAACY,aAAAA,CAAAA,EAAAA,CAAUhC,KAAMA,EAAMc,MAAOA,IAArC,KAGhD,EAEamB,EAAmBpB"}
@@ -1,10 +1,10 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
2
  import { CreatableProps } from 'react-select/creatable';
3
3
  import { GroupBase } from 'react-select/dist/declarations/src/types';
4
- import { WithLabel, WithHint, LoadingFeedback, ErrorFeedback, DataQa, HideEmptyMeta } from '../types.js';
4
+ import { WithLabel, WithHint, LoadingFeedback, ErrorFeedback, DataQa, HideEmptyMeta, WithPulseAnimation } from '../types.js';
5
5
  import { Option } from './types.js';
6
6
 
7
- interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {
7
+ interface SelectCreatableProps extends CreatableProps<Option, false | true, GroupBase<Option>>, Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta & WithPulseAnimation> {
8
8
  wide?: boolean;
9
9
  labelProps?: InputHTMLAttributes<HTMLLabelElement>;
10
10
  }
@@ -1,2 +1,2 @@
1
- import e from"react";import t from"react-select/creatable";import r from"classnames";import o from"../InputMeta/InputMeta.js";import a from"./Label.js";import n from"./customComponents.js";import l from"./defaultProps.js";import{composeStyles as s}from"./utils.js";function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var p=function(p){var u=p.className,m=p.label,b=p.hint,d=p.wide,f=p.required,O=p.loading,g=p.isDisabled,y=p.menuPlacement,j=p.noOptionsMessage,P=void 0===j?l.noOptionsMessageDefault:j,v=p.loadingMessage,h=void 0===v?l.loadingMessageDefault:v,w=p.placeholder,M=p.components,D=p.isClearable,E=p.dataQa,S=p.labelProps,q=p.hideEmptyMeta,C=p.error,x=function(e,t){if(null==e)return{};var r,o,a=function(e,t){if(null==e)return{};var r,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)r=n[o],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(p,["className","label","hint","wide","required","loading","isDisabled","menuPlacement","noOptionsMessage","loadingMessage","placeholder","components","isClearable","dataQa","labelProps","hideEmptyMeta","error"]);return /*#__PURE__*/e.createElement("label",c(i({},S),{"data-qa":E,className:r("vchasno-ui-select",{"--required":f,"--disabled":g,"--wide":d,"--error":C},u)}),m&&/*#__PURE__*/e.createElement(a,{label:m}),/*#__PURE__*/e.createElement(t,c(i({isClearable:D,required:f,isLoading:O,components:i({},n,void 0===M?{}:M),classNamePrefix:"vchasno-ui-select",menuPlacement:void 0===y?"auto":y,isDisabled:g,noOptionsMessage:P,loadingMessage:h,placeholder:void 0===w?" ":w},x),{styles:i({},s,x.styles)})),!(void 0!==q&&q)||C||b?/*#__PURE__*/e.createElement(o,{hint:b,error:C}):null)};export{p as default};
1
+ import e from"react";import t from"react-select/creatable";import r from"classnames";import o from"../InputMeta/InputMeta.js";import a from"./Label.js";import n from"./customComponents.js";import l from"./defaultProps.js";import{composeStyles as s}from"./utils.js";function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){var o;o=r[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}function c(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r.push.apply(r,o)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var p=function(p){var u=p.className,m=p.label,b=p.hint,d=p.wide,f=p.required,O=p.loading,g=p.isDisabled,y=p.menuPlacement,j=p.noOptionsMessage,P=void 0===j?l.noOptionsMessageDefault:j,v=p.loadingMessage,h=void 0===v?l.loadingMessageDefault:v,w=p.placeholder,M=p.components,D=p.isClearable,E=p.dataQa,S=p.labelProps,q=p.hideEmptyMeta,C=p.pulse,x=p.error,N=function(e,t){if(null==e)return{};var r,o,a=function(e,t){if(null==e)return{};var r,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)r=n[o],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(p,["className","label","hint","wide","required","loading","isDisabled","menuPlacement","noOptionsMessage","loadingMessage","placeholder","components","isClearable","dataQa","labelProps","hideEmptyMeta","pulse","error"]);return /*#__PURE__*/e.createElement("label",c(i({},S),{"data-qa":E,className:r("vchasno-ui-select",{"--pulse":C,"--required":f,"--disabled":g,"--wide":d,"--error":x},u)}),m&&/*#__PURE__*/e.createElement(a,{label:m}),/*#__PURE__*/e.createElement(t,c(i({isClearable:D,required:f,isLoading:O,components:i({},n,void 0===M?{}:M),classNamePrefix:"vchasno-ui-select",menuPlacement:void 0===y?"auto":y,isDisabled:g,noOptionsMessage:P,loadingMessage:h,placeholder:void 0===w?" ":w},N),{styles:i({},s,N.styles)})),!(void 0!==q&&q)||x||b?/*#__PURE__*/e.createElement(o,{hint:b,error:x}):null)};export{p as default};
2
2
  //# sourceMappingURL=SelectCreatable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectCreatable.js","sources":["../../../src/components/Select/SelectCreatable.tsx"],"sourcesContent":["import React, { InputHTMLAttributes } from 'react';\nimport ReactSelectCreatable, { CreatableProps } from 'react-select/creatable';\nimport type { GroupBase } from 'react-select/dist/declarations/src/types';\n\nimport cn from 'classnames';\n\nimport InputMeta from '../InputMeta';\nimport {\n DataQa,\n ErrorFeedback,\n HideEmptyMeta,\n LoadingFeedback,\n WithHint,\n WithLabel,\n} from '../types';\nimport Label from './Label';\nimport CustomComponents from './customComponents';\nimport defaultProps from './defaultProps';\nimport { Option } from './types';\nimport { composeStyles } from './utils';\n\nimport './Select.global.css';\n\nexport type SelectOption = Option;\n\nexport interface SelectCreatableProps\n extends CreatableProps<Option, false | true, GroupBase<Option>>,\n Partial<WithLabel & WithHint & LoadingFeedback & ErrorFeedback & DataQa & HideEmptyMeta> {\n wide?: boolean;\n labelProps?: InputHTMLAttributes<HTMLLabelElement>;\n}\n\nconst SelectCreatable: React.FC<SelectCreatableProps> = ({\n className,\n label,\n hint,\n wide,\n required,\n loading,\n isDisabled,\n menuPlacement = 'auto',\n noOptionsMessage = defaultProps.noOptionsMessageDefault,\n loadingMessage = defaultProps.loadingMessageDefault,\n placeholder = ' ', //need \"space\" for correct label working\n components = {},\n isClearable,\n dataQa,\n labelProps,\n hideEmptyMeta = false,\n error,\n ...rest\n}) => {\n return (\n <label\n {...labelProps}\n data-qa={dataQa}\n className={cn(\n 'vchasno-ui-select',\n {\n '--required': required,\n '--disabled': isDisabled,\n '--wide': wide,\n '--error': error,\n },\n className,\n )}\n >\n {label && <Label label={label} />}\n <ReactSelectCreatable\n isClearable={isClearable}\n required={required}\n isLoading={loading}\n components={{\n ...(CustomComponents as SelectCreatableProps['components']),\n ...components,\n }}\n classNamePrefix=\"vchasno-ui-select\"\n menuPlacement={menuPlacement}\n isDisabled={isDisabled}\n noOptionsMessage={noOptionsMessage}\n loadingMessage={loadingMessage}\n placeholder={placeholder}\n {...rest}\n styles={\n {\n ...composeStyles,\n ...rest.styles,\n } as never\n }\n />\n {hideEmptyMeta && !error && !hint ? null : <InputMeta hint={hint} error={error} />}\n </label>\n );\n};\n\nexport default SelectCreatable;\n"],"names":["SelectCreatable","_param","className","label","hint","wide","required","loading","isDisabled","menuPlacement","noOptionsMessage","defaultProps","noOptionsMessageDefault","_param_noOptionsMessage","_param_loadingMessage","loadingMessage","loadingMessageDefault","placeholder","components","isClearable","dataQa","labelProps","hideEmptyMeta","error","rest","React","data-qa","cn","Label","ReactSelectCreatable","isLoading","_object_spread","CustomComponents","_param_components","classNamePrefix","styles","composeStyles","_param_hideEmptyMeta","InputMeta"],"mappings":"4hCAgCA,IAAMA,EAAkD,SAAAC,CAAA,EACpDC,IAAAA,EAAAA,EAAAA,UACAC,EAAAA,EAAAA,KAAAA,CACAC,IAAAA,IACAC,CAAAA,EAAAA,EAAAA,KACAC,EAAAA,EAAAA,QAAAA,CACAC,IAAAA,OACAC,CAAAA,EAAAA,EAAAA,eACAC,aAAAA,KACAC,gBAAAA,CAAAA,EAAAA,AAAAA,KAAAA,IAAAA,EAAmBC,EAAaC,uBAAuB,CAAAC,EAAAC,EAAAb,EACvDc,eAAAA,EAAiBJ,AAAAA,KAAAA,IAAAA,EAAAA,EAAaK,qBAAqB,CACnDC,EAAAA,EAAAA,EAAAA,WAAAA,CACAC,EAAAA,EAAAA,UAAAA,CACAC,IAAAA,WACAC,CAAAA,EAAAA,EAAAA,OACAC,EAAAA,EAAAA,UAAAA,CAAAA,EAAAA,EACAC,cACAC,IAAAA,KACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAjBHtB,YACAC,QACAC,OACAC,OACAC,WACAC,UACAC,aACAC,gBACAC,mBACAK,iBACAE,cACAC,aACAC,cACAC,SACAC,aACAC,gBACAC,UAGA,OACI,WAAA,EAAAE,gBAACtB,QACOkB,EAAAA,EAAAA,CAAAA,EAAAA,GAAAA,CACJK,UAASN,EACTlB,UAAWyB,EACP,oBACA,CACI,aAAcrB,EACd,aAAcE,EACd,SAAUH,EACV,UAAWkB,CAEfrB,EAAAA,EAGHC,GAAAA,GAAAA,WAAAA,EAASsB,EAACG,aAAAA,CAAAA,EAAAA,CAAMzB,MAAOA,IACxB,WAAA,EAAAsB,EAACI,aAAAA,CAAAA,EAAAA,EAAAA,EAAAA,CACGV,YAAaA,EACbb,SAAUA,EACVwB,UAAWvB,EACXW,WAAYa,KACJC,aA7BP,GAACC,GAgCFC,gBAAgB,oBAChBzB,cArCZA,AAAAA,KAAAA,IAAAA,EAAgB,SAsCJD,WAAYA,EACZE,iBAAkBA,EAClBK,eAAgBA,EAChBE,uBAtCE,IACdC,CAsCgBM,EAAAA,GAAAA,CACJW,OACIJ,EAAA,CAAA,EACOK,EACAZ,EAAKW,MAAM,CAIzBb,IAAAA,CA1COe,CAAAA,AAAA,KAAA,IAAAA,GAAAA,IA0CWd,GAAUnB,EAAc,WAAA,EAAAqB,EAACa,aAAAA,CAAAA,EAAAA,CAAUlC,KAAMA,EAAMmB,MAAOA,IAArC,KAGhD"}
1
+ {"version":3,"file":"SelectCreatable.js","sources":["../../../src/components/Select/SelectCreatable.tsx"],"sourcesContent":["import React, { InputHTMLAttributes } from 'react';\nimport ReactSelectCreatable, { CreatableProps } from 'react-select/creatable';\nimport type { GroupBase } from 'react-select/dist/declarations/src/types';\n\nimport cn from 'classnames';\n\nimport InputMeta from '../InputMeta';\nimport {\n DataQa,\n ErrorFeedback,\n HideEmptyMeta,\n LoadingFeedback,\n WithHint,\n WithLabel,\n WithPulseAnimation,\n} from '../types';\nimport Label from './Label';\nimport CustomComponents from './customComponents';\nimport defaultProps from './defaultProps';\nimport { Option } from './types';\nimport { composeStyles } from './utils';\n\nimport './Select.global.css';\n\nexport type SelectOption = Option;\n\nexport interface SelectCreatableProps\n extends CreatableProps<Option, false | true, GroupBase<Option>>,\n Partial<\n WithLabel &\n WithHint &\n LoadingFeedback &\n ErrorFeedback &\n DataQa &\n HideEmptyMeta &\n WithPulseAnimation\n > {\n wide?: boolean;\n labelProps?: InputHTMLAttributes<HTMLLabelElement>;\n}\n\nconst SelectCreatable: React.FC<SelectCreatableProps> = ({\n className,\n label,\n hint,\n wide,\n required,\n loading,\n isDisabled,\n menuPlacement = 'auto',\n noOptionsMessage = defaultProps.noOptionsMessageDefault,\n loadingMessage = defaultProps.loadingMessageDefault,\n placeholder = ' ', //need \"space\" for correct label working\n components = {},\n isClearable,\n dataQa,\n labelProps,\n hideEmptyMeta = false,\n pulse,\n error,\n ...rest\n}) => {\n return (\n <label\n {...labelProps}\n data-qa={dataQa}\n className={cn(\n 'vchasno-ui-select',\n {\n '--pulse': pulse,\n '--required': required,\n '--disabled': isDisabled,\n '--wide': wide,\n '--error': error,\n },\n className,\n )}\n >\n {label && <Label label={label} />}\n <ReactSelectCreatable\n isClearable={isClearable}\n required={required}\n isLoading={loading}\n components={{\n ...(CustomComponents as SelectCreatableProps['components']),\n ...components,\n }}\n classNamePrefix=\"vchasno-ui-select\"\n menuPlacement={menuPlacement}\n isDisabled={isDisabled}\n noOptionsMessage={noOptionsMessage}\n loadingMessage={loadingMessage}\n placeholder={placeholder}\n {...rest}\n styles={\n {\n ...composeStyles,\n ...rest.styles,\n } as never\n }\n />\n {hideEmptyMeta && !error && !hint ? null : <InputMeta hint={hint} error={error} />}\n </label>\n );\n};\n\nexport default SelectCreatable;\n"],"names":["SelectCreatable","_param","className","label","hint","wide","required","loading","isDisabled","menuPlacement","_param_noOptionsMessage","noOptionsMessage","defaultProps","noOptionsMessageDefault","loadingMessage","loadingMessageDefault","placeholder","components","isClearable","dataQa","labelProps","hideEmptyMeta","pulse","error","rest","React","data-qa","cn","Label","ReactSelectCreatable","isLoading","_object_spread","CustomComponents","classNamePrefix","_param_menuPlacement","styles","composeStyles","InputMeta"],"mappings":"4hCAyCA,IAAMA,EAAkD,SAAAC,CAAA,MACpDC,EAAAA,EAAAA,SAAAA,CACAC,IAAAA,KACAC,CAAAA,EAAAA,EAAAA,KACAC,EAAAA,EAAAA,IAAAA,CACAC,IAAAA,QACAC,CAAAA,EAAAA,EAAAA,QACAC,EAAAA,EAAAA,UAAAA,CAAAA,EAAAA,EACAC,cAAgBC,EAAAT,EAChBU,iBAAAA,EAAmBC,AAAAA,KAAAA,IAAAA,EAAAA,EAAaC,uBAAuB,CACvDC,EAAAA,EAAAA,EAAAA,cAAAA,CAAAA,aAAiBF,EAAaG,qBAAqB,OACnDC,WAAAA,KACAC,UAAAA,CACAC,EAAAA,EAAAA,YACAC,EAAAA,EAAAA,MAAAA,CACAC,IAAAA,UACAC,CAAAA,EAAAA,EAAAA,aAAAA,CACAC,EAAAA,EAAAA,KACAC,CAAAA,EAAAA,EAAAA,KACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAlBHtB,YACAC,QACAC,OACAC,OACAC,WACAC,UACAC,aACAC,gBACAE,mBACAG,iBACAE,cACAC,aACAC,cACAC,SACAC,aACAC,gBACAC,QACAC,UAGA,OACI,WAAA,EAAAE,gBAACtB,QACOiB,EAAAA,EAAAA,CAAAA,EAAAA,GAAAA,CACJM,UAASP,EACTjB,UAAWyB,EACP,oBACA,CACI,UAAWL,EACX,aAAchB,EACd,aAAcE,EACd,SAAUH,EACV,UAAWkB,CAEfrB,EAAAA,EAGHC,GAAAA,GAAAA,WAAAA,EAASsB,EAACG,aAAAA,CAAAA,EAAAA,CAAMzB,MAAOA,IACxB,WAAA,EAAAsB,EAACI,aAAAA,CAAAA,EAAAA,EAAAA,EAAAA,CACGX,YAAaA,EACbZ,SAAUA,EACVwB,UAAWvB,EACXU,WAAYc,KACJC,EA/BpBf,AAAAA,KAAAA,IAAAA,EAAa,CACbC,EAAAA,GAiCYe,gBAAgB,oBAChBxB,cAvCIyB,AAAA,KAAA,IAAAA,EAAA,OAAAA,EAwCJ1B,WAAYA,EACZG,iBAAkBA,EAClBG,eAAgBA,EAChBE,YAxCZA,AAAAA,KAAAA,IAAAA,EAAc,KAyCEQ,EAAAA,GAAAA,CACJW,OACIJ,EAAA,CAAA,EACOK,EACAZ,EAAKW,MAAM,CAIzBd,IAAAA,cA3CTC,IA2C2BC,GAAUnB,EAAc,WAAA,EAAAqB,EAACY,aAAAA,CAAAA,EAAAA,CAAUjC,KAAMA,EAAMmB,MAAOA,IAArC,KAGhD"}
@@ -1,7 +1,7 @@
1
1
  import React, { HTMLAttributes } from 'react';
2
- import { EllipsisText, DataQa, TextType } from '../types.js';
2
+ import { EllipsisText, DataQa, WithPulseAnimation, TextType } from '../types.js';
3
3
 
4
- interface TextProps extends HTMLAttributes<HTMLSpanElement>, EllipsisText, DataQa {
4
+ interface TextProps extends HTMLAttributes<HTMLSpanElement>, EllipsisText, DataQa, WithPulseAnimation {
5
5
  type?: TextType;
6
6
  code?: boolean;
7
7
  underline?: boolean;
@@ -1,2 +1,2 @@
1
- import e from"react";import r from"classnames";var t={warning:"--warning",success:"--success",danger:"--danger",default:"--default",secondary:"--secondary",link:"--link",likeLink:"--like-link"},n=/*#__PURE__*/e.forwardRef(function(n,a){var i=n.type,o=n.className,l=n.code,c=void 0!==l&&l,s=n.del,d=n.underline,u=n.strong,f=n.children,p=n.ellipsis,y=n.required,b=n.dataQa,g=function(e,r){if(null==e)return{};var t,n,a=function(e,r){if(null==e)return{};var t,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(n,["type","className","code","del","underline","strong","children","ellipsis","required","dataQa"]),m="span";return void 0!==s&&s&&(m="del"),void 0!==u&&u&&(m="strong"),void 0!==d&&d&&(m="u"),c&&(m="code"),/*#__PURE__*/e.createElement(m,function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}({ref:a,"data-qa":b,className:r("vchasno-ui-text",o,t[void 0===i?"default":i],{"--code":c,"--ellipsis":p,"--required":void 0!==y&&y}),title:p&&"string"==typeof f?f:void 0},g),f)});n.displayName="Text";export{n as default};
1
+ import e from"react";import r from"classnames";var t={warning:"--warning",success:"--success",danger:"--danger",default:"--default",secondary:"--secondary",link:"--link",likeLink:"--like-link"},n=/*#__PURE__*/e.forwardRef(function(n,a){var i=n.type,l=n.className,o=n.code,s=void 0!==o&&o,c=n.del,u=n.underline,d=n.strong,f=n.children,p=n.ellipsis,y=n.required,b=n.dataQa,m=n.pulse,v=function(e,r){if(null==e)return{};var t,n,a=function(e,r){if(null==e)return{};var t,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(n,["type","className","code","del","underline","strong","children","ellipsis","required","dataQa","pulse"]),g="span";return void 0!==c&&c&&(g="del"),void 0!==d&&d&&(g="strong"),void 0!==u&&u&&(g="u"),s&&(g="code"),/*#__PURE__*/e.createElement(g,function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}({ref:a,"data-qa":b,className:r("vchasno-ui-text",l,t[void 0===i?"default":i],{"--code":s,"--ellipsis":p,"--required":void 0!==y&&y,"vchasno-ui-pulse-animation":m}),title:p&&"string"==typeof f?f:void 0},v),f)});n.displayName="Text";export{n as default};
2
2
  //# sourceMappingURL=Text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport { DataQa, EllipsisText, TextType } from '../types';\n\nimport './Text.global.css';\n\nconst typeToCN: Record<TextType, string> = {\n warning: '--warning',\n success: '--success',\n danger: '--danger',\n default: '--default',\n secondary: '--secondary',\n link: '--link',\n likeLink: '--like-link',\n};\n\nexport interface TextProps extends HTMLAttributes<HTMLSpanElement>, EllipsisText, DataQa {\n type?: TextType;\n code?: boolean;\n underline?: boolean;\n del?: boolean;\n strong?: boolean;\n className?: string;\n required?: boolean;\n}\n\nconst Text = React.forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n type = 'default',\n className,\n code = false,\n del = false,\n underline = false,\n strong = false,\n children,\n ellipsis,\n required = false,\n dataQa,\n ...rest\n },\n ref,\n ) => {\n let element = 'span';\n if (del) {\n element = 'del';\n }\n if (strong) {\n element = 'strong';\n }\n if (underline) {\n element = 'u';\n }\n if (code) {\n element = 'code';\n }\n\n return React.createElement(\n element,\n {\n ref,\n 'data-qa': dataQa,\n className: cn('vchasno-ui-text', className, typeToCN[type], {\n '--code': code,\n '--ellipsis': ellipsis,\n '--required': required,\n }),\n title: ellipsis && typeof children === 'string' ? children : undefined,\n ...rest,\n },\n children,\n );\n },\n);\n\nText.displayName = 'Text';\n\nexport default Text;\n"],"names":["typeToCN","warning","success","danger","default","secondary","link","likeLink","Text","React","forwardRef","ref","type","className","code","del","_param_underline","_param","underline","strong","children","ellipsis","required","dataQa","rest","element","_param_del","createElement","_object_spread","cn","title","undefined","displayName"],"mappings":"+CAQA,IAAMA,EAAqC,CACvCC,QAAS,YACTC,QAAS,YACTC,OAAQ,WACRC,QAAS,YACTC,UAAW,cACXC,KAAM,SACNC,SAAU,aACd,EAYMC,EAAOC,WAAAA,EAAAA,EAAMC,UAAU,CACzB,SAcIC,CAAAA,CAAAA,CAAAA,UAZIC,IAAAA,CACAC,EAAAA,EAAAA,SACAC,CAAAA,EAAAA,EAAAA,IAAAA,CAAAA,cACAC,EAAAA,EAAAA,EAAAA,GAAAA,CAAMC,EAAAC,EACNC,SAAAA,KACAC,MAAAA,CACAC,EAAAA,EAAAA,QACAC,CAAAA,EAAAA,EAAAA,aACAC,QAAAA,CACAC,EAAAA,EAAAA,MACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAVHZ,OACAC,YACAC,OACAC,MACAG,YACAC,SACAC,WACAC,WACAC,WACAC,WAKAE,EAAU,OAcd,OAzBU,KAAA,IAAAC,GAAAA,GAaND,CAAAA,EAAU,KAAA,EAXVN,KAAAA,IAAAA,GACAC,GAaAK,CAAAA,EAAU,QAAA,EAfVP,KAAAA,IAAAA,MAkBAO,CAAAA,EAAU,GAAA,EAEVX,GACAW,CAAAA,EAAU,MAAA,EAGd,WAAA,EAAOhB,EAAMkB,aAAa,CACtBF,EACAG,iaAAA,CACIjB,IAAAA,EACA,UAAWY,EACXV,UAAWgB,EAAG,kBAAmBhB,EAAWb,CAAQ,CAjCxDY,AAAAA,KAAAA,IAAAA,EAAO,UACPC,EAgC8D,CAAE,CACxD,SAAUC,EACV,aAAcO,EACd,aA5BRC,AAAAA,KAAAA,IAAAA,GACAC,CA4BI,GACAO,MAAOT,GAAY,AAAoB,UAApB,OAAOD,EAAwBA,EAAWW,KAAAA,GAC1DP,GAEPJ,EAER,EAGJZ,CAAAA,EAAKwB,WAAW,CAAG"}
1
+ {"version":3,"file":"Text.js","sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport { DataQa, EllipsisText, TextType, WithPulseAnimation } from '../types';\n\nimport './Text.global.css';\n\nconst typeToCN: Record<TextType, string> = {\n warning: '--warning',\n success: '--success',\n danger: '--danger',\n default: '--default',\n secondary: '--secondary',\n link: '--link',\n likeLink: '--like-link',\n};\n\nexport interface TextProps\n extends HTMLAttributes<HTMLSpanElement>,\n EllipsisText,\n DataQa,\n WithPulseAnimation {\n type?: TextType;\n code?: boolean;\n underline?: boolean;\n del?: boolean;\n strong?: boolean;\n className?: string;\n required?: boolean;\n}\n\nconst Text = React.forwardRef<HTMLSpanElement, TextProps>(\n (\n {\n type = 'default',\n className,\n code = false,\n del = false,\n underline = false,\n strong = false,\n children,\n ellipsis,\n required = false,\n dataQa,\n pulse,\n ...rest\n },\n ref,\n ) => {\n let element = 'span';\n if (del) {\n element = 'del';\n }\n if (strong) {\n element = 'strong';\n }\n if (underline) {\n element = 'u';\n }\n if (code) {\n element = 'code';\n }\n\n return React.createElement(\n element,\n {\n ref,\n 'data-qa': dataQa,\n className: cn('vchasno-ui-text', className, typeToCN[type], {\n '--code': code,\n '--ellipsis': ellipsis,\n '--required': required,\n 'vchasno-ui-pulse-animation': pulse,\n }),\n title: ellipsis && typeof children === 'string' ? children : undefined,\n ...rest,\n },\n children,\n );\n },\n);\n\nText.displayName = 'Text';\n\nexport default Text;\n"],"names":["typeToCN","warning","success","danger","default","secondary","link","likeLink","Text","React","forwardRef","ref","type","className","code","_param_code","_param_del","_param","del","underline","_param_strong","strong","children","ellipsis","required","dataQa","pulse","rest","element","_param_underline","createElement","_object_spread","cn","title","undefined","displayName"],"mappings":"+CAQA,IAAMA,EAAqC,CACvCC,QAAS,YACTC,QAAS,YACTC,OAAQ,WACRC,QAAS,YACTC,UAAW,cACXC,KAAM,SACNC,SAAU,aACd,EAgBMC,EAAOC,WAAAA,EAAAA,EAAMC,UAAU,CACzB,SAeIC,CAAAA,CAAAA,CAAAA,UAbIC,IAAAA,CACAC,EAAAA,EAAAA,SACAC,CAAAA,EAAAA,EAAAA,IAAAA,CAAAA,EAAOC,AAAA,KAAA,IAAAA,GAAAA,EAAAC,EAAAC,EACPC,GAAAA,CACAC,EAAAA,EAAAA,SAAAA,CAAYC,EAAAH,EACZI,OACAC,EAAAA,EAAAA,QAAAA,CACAC,EAAAA,EAAAA,QAAAA,CAAAA,EAAAA,EACAC,QAAAA,CACAC,EAAAA,EAAAA,MACAC,CAAAA,EAAAA,EAAAA,KACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAXHf,OACAC,YACAC,OACAI,MACAC,YACAE,SACAC,WACAC,WACAC,WACAC,SACAC,UAKAE,EAAU,OAcd,OA1BIV,KAAAA,IAAAA,GACAC,GAaAS,CAAAA,EAAU,KAAA,EAZD,KAAA,IAAAR,GAAAA,GAeTQ,CAAAA,EAAU,QAAA,EAhBE,KAAA,IAAAC,GAAAA,GAmBZD,CAAAA,EAAU,GAAA,EAEVd,GACAc,CAAAA,EAAU,MAAA,EAGd,WAAA,EAAOnB,EAAMqB,aAAa,CACtBF,EACAG,iaAAA,CACIpB,IAAAA,EACA,UAAWc,EACXZ,UAAWmB,EAAG,kBAAmBnB,EAAWb,CAAQ,CAlCxDY,AAAAA,KAAAA,IAAAA,EAAO,UACPC,EAiC8D,CAAE,CACxD,SAAUC,EACV,aAAcS,EACd,aA7BRC,AAAAA,KAAAA,IAAAA,GACAC,EA6BQ,6BAA8BC,CAClC,GACAO,MAAOV,GAAY,AAAoB,UAApB,OAAOD,EAAwBA,EAAWY,KAAAA,GAC1DP,GAEPL,EAER,EAGJd,CAAAA,EAAK2B,WAAW,CAAG"}
@@ -1,2 +1,2 @@
1
- import e from"react";import t from"classnames";import r from"../Input/Input.js";import{TextareaAutosize as a}from"@mui/base/TextareaAutosize";var n=/*#__PURE__*/e.forwardRef(function(n,o){var i,l,s=n.className,c=n.disabled,m=n.startElement,p=n.endElement,u=n.error,b=n.label,d=n.hint,f=n.wide,O=n.required,y=n.loading,w=n.minRows,j=n.maxRows,g=n.textareaClassName,P=n.labelProps,h=n.dataQa,E=n.hideEmptyMeta,v=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(n,["className","disabled","startElement","endElement","error","label","hint","wide","required","loading","minRows","maxRows","textareaClassName","labelProps","dataQa","hideEmptyMeta"]);return /*#__PURE__*/e.createElement(r,{dataQa:h,required:O,wide:f,hideEmptyMeta:E,className:t(s,"vchasno-ui-textarea-input-container"),loading:y,disabled:c,label:b,error:u,hint:d,endElement:p,labelProps:P,startElement:m},/*#__PURE__*/e.createElement(a,(i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){var a;a=r[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a})}return e}({},v),l=l={ref:o,minRows:w,maxRows:j,required:O,disabled:c,className:t("vchasno-ui-textarea-input",g)},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r.push.apply(r,a)}return r})(Object(l)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(l,e))}),i)))});n.displayName="TextAreaInput";export{n as default};
1
+ import e from"react";import t from"classnames";import r from"../Input/Input.js";import{TextareaAutosize as a}from"@mui/base/TextareaAutosize";var n=/*#__PURE__*/e.forwardRef(function(n,o){var l,i,s=n.className,c=n.disabled,p=n.startElement,u=n.endElement,m=n.error,b=n.label,d=n.hint,f=n.wide,O=n.required,y=n.loading,w=n.minRows,j=n.maxRows,g=n.textareaClassName,P=n.labelProps,h=n.dataQa,E=n.hideEmptyMeta,v=n.pulse,x=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(n,["className","disabled","startElement","endElement","error","label","hint","wide","required","loading","minRows","maxRows","textareaClassName","labelProps","dataQa","hideEmptyMeta","pulse"]);return /*#__PURE__*/e.createElement(r,{dataQa:h,pulse:v,required:O,wide:f,hideEmptyMeta:E,className:t(s,"vchasno-ui-textarea-input-container"),loading:y,disabled:c,label:b,error:m,hint:d,endElement:u,labelProps:P,startElement:p},/*#__PURE__*/e.createElement(a,(l=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){var a;a=r[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a})}return e}({},x),i=i={ref:o,minRows:w,maxRows:j,required:O,disabled:c,className:t("vchasno-ui-textarea-input",g)},Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(i)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r.push.apply(r,a)}return r})(Object(i)).forEach(function(e){Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(i,e))}),l)))});n.displayName="TextAreaInput";export{n as default};
2
2
  //# sourceMappingURL=TextAreaInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextAreaInput.js","sources":["../../../src/components/TextAreaInput/TextAreaInput.tsx"],"sourcesContent":["import React, { InputHTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport Input, { InputProps } from '../Input';\nimport { DataQa } from '../types';\nimport { TextareaAutosize } from '@mui/base/TextareaAutosize';\n\nimport './TextAreaInput.global.css';\n\nexport interface TextAreaInputProps\n extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'children' | 'rows'>,\n Omit<InputProps, 'children'>,\n DataQa {\n textareaClassName?: string;\n labelProps?: InputHTMLAttributes<HTMLLabelElement>;\n minRows?: number;\n maxRows?: number;\n}\n\nconst TextAreaInput = React.forwardRef<HTMLTextAreaElement, TextAreaInputProps>(\n (\n {\n className,\n disabled,\n startElement,\n endElement,\n error,\n label,\n hint,\n wide,\n required,\n loading,\n minRows,\n maxRows,\n textareaClassName,\n labelProps,\n dataQa,\n hideEmptyMeta,\n ...rest\n },\n ref,\n ) => {\n return (\n <Input\n dataQa={dataQa}\n required={required}\n wide={wide}\n hideEmptyMeta={hideEmptyMeta}\n className={cn(className, 'vchasno-ui-textarea-input-container')}\n loading={loading}\n disabled={disabled}\n label={label}\n error={error}\n hint={hint}\n endElement={endElement}\n labelProps={labelProps}\n startElement={startElement}\n >\n <TextareaAutosize\n {...rest}\n ref={ref}\n minRows={minRows}\n maxRows={maxRows}\n required={required}\n disabled={disabled}\n className={cn('vchasno-ui-textarea-input', textareaClassName)}\n />\n </Input>\n );\n },\n);\n\nTextAreaInput.displayName = 'TextAreaInput';\n\nexport default TextAreaInput;\n"],"names":["TextAreaInput","React","forwardRef","ref","className","disabled","startElement","endElement","error","label","hint","wide","required","loading","minRows","maxRows","textareaClassName","labelProps","dataQa","hideEmptyMeta","rest","Input","cn","createElement","TextareaAutosize","displayName"],"mappings":"8IAoBA,IAAMA,EAAgBC,WAAAA,EAAAA,EAAMC,UAAU,CAClC,SAoBIC,CAAAA,CAAAA,CAAAA,EAlBIC,QAAAA,EAAAA,EAAAA,SACAC,CAAAA,EAAAA,EAAAA,QACAC,CAAAA,EAAAA,EAAAA,YACAC,CAAAA,EAAAA,EAAAA,UACAC,CAAAA,EAAAA,EAAAA,KACAC,CAAAA,EAAAA,EAAAA,KACAC,CAAAA,EAAAA,EAAAA,KACAC,EAAAA,EAAAA,IAAAA,CACAC,EAAAA,EAAAA,QAAAA,CACAC,EAAAA,EAAAA,OAAAA,CACAC,EAAAA,EAAAA,OAAAA,CACAC,EAAAA,EAAAA,OAAAA,CACAC,EAAAA,EAAAA,iBAAAA,CACAC,EAAAA,EAAAA,UAAAA,CACAC,EAAAA,EAAAA,MAAAA,CACAC,IAAAA,aACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAhBHhB,YACAC,WACAC,eACAC,aACAC,QACAC,QACAC,OACAC,OACAC,WACAC,UACAC,UACAC,UACAC,oBACAC,aACAC,SACAC,kBAKJ,oBACIlB,EAACoB,aAAAA,CAAAA,EAAAA,CACGH,OAAQA,EACRN,SAAUA,EACVD,KAAMA,EACNQ,cAAeA,EACff,UAAWkB,EAAGlB,EAAW,uCACzBS,QAASA,EACTR,SAAUA,EACVI,MAAOA,EACPD,MAAOA,EACPE,KAAMA,EACNH,WAAYA,EACZU,WAAYA,EACZX,aAAcA,CAEd,EAAA,WAAA,EAAAL,EAAAsB,aAAA,CAACC,KACOJ,iaAAAA,CAAAA,EAAAA,OAAAA,CACJjB,IAAKA,EACLW,QAASA,EACTC,QAASA,EACTH,SAAUA,EACVP,SAAUA,EACVD,UAAWkB,EAAG,4BAA6BN,iVAI3D,EAGJhB,CAAAA,EAAcyB,WAAW,CAAG"}
1
+ {"version":3,"file":"TextAreaInput.js","sources":["../../../src/components/TextAreaInput/TextAreaInput.tsx"],"sourcesContent":["import React, { InputHTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport Input, { InputProps } from '../Input';\nimport { DataQa } from '../types';\nimport { TextareaAutosize } from '@mui/base/TextareaAutosize';\n\nimport './TextAreaInput.global.css';\n\nexport interface TextAreaInputProps\n extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'children' | 'rows'>,\n Omit<InputProps, 'children'>,\n DataQa {\n textareaClassName?: string;\n labelProps?: InputHTMLAttributes<HTMLLabelElement>;\n minRows?: number;\n maxRows?: number;\n}\n\nconst TextAreaInput = React.forwardRef<HTMLTextAreaElement, TextAreaInputProps>(\n (\n {\n className,\n disabled,\n startElement,\n endElement,\n error,\n label,\n hint,\n wide,\n required,\n loading,\n minRows,\n maxRows,\n textareaClassName,\n labelProps,\n dataQa,\n hideEmptyMeta,\n pulse,\n ...rest\n },\n ref,\n ) => {\n return (\n <Input\n dataQa={dataQa}\n pulse={pulse}\n required={required}\n wide={wide}\n hideEmptyMeta={hideEmptyMeta}\n className={cn(className, 'vchasno-ui-textarea-input-container')}\n loading={loading}\n disabled={disabled}\n label={label}\n error={error}\n hint={hint}\n endElement={endElement}\n labelProps={labelProps}\n startElement={startElement}\n >\n <TextareaAutosize\n {...rest}\n ref={ref}\n minRows={minRows}\n maxRows={maxRows}\n required={required}\n disabled={disabled}\n className={cn('vchasno-ui-textarea-input', textareaClassName)}\n />\n </Input>\n );\n },\n);\n\nTextAreaInput.displayName = 'TextAreaInput';\n\nexport default TextAreaInput;\n"],"names":["TextAreaInput","React","forwardRef","ref","className","disabled","startElement","endElement","error","label","hint","wide","required","loading","minRows","maxRows","textareaClassName","labelProps","dataQa","hideEmptyMeta","pulse","rest","Input","cn","createElement","TextareaAutosize","displayName"],"mappings":"8IAoBA,IAAMA,EAAgBC,WAAAA,EAAAA,EAAMC,UAAU,CAClC,SAqBIC,CAAAA,CAAAA,CAAAA,EAnBIC,QAAAA,EAAAA,EAAAA,SACAC,CAAAA,EAAAA,EAAAA,QACAC,CAAAA,EAAAA,EAAAA,aACAC,EAAAA,EAAAA,UAAAA,CACAC,EAAAA,EAAAA,KAAAA,CACAC,EAAAA,EAAAA,KAAAA,CACAC,EAAAA,EAAAA,IAAAA,CACAC,IAAAA,IACAC,CAAAA,EAAAA,EAAAA,QACAC,CAAAA,EAAAA,EAAAA,OACAC,CAAAA,EAAAA,EAAAA,OACAC,CAAAA,EAAAA,EAAAA,QACAC,EAAAA,EAAAA,iBAAAA,CACAC,EAAAA,EAAAA,UAAAA,CACAC,EAAAA,EAAAA,MAAAA,CACAC,EAAAA,EAAAA,aAAAA,CACAC,IAAAA,KACGC,CAAAA,EAAAA,sXAAAA,EAAAA,CAjBHjB,YACAC,WACAC,eACAC,aACAC,QACAC,QACAC,OACAC,OACAC,WACAC,UACAC,UACAC,UACAC,oBACAC,aACAC,SACAC,gBACAC,UAKJ,oBACInB,EAACqB,aAAAA,CAAAA,EAAAA,CACGJ,OAAQA,EACRE,MAAOA,EACPR,SAAUA,EACVD,KAAMA,EACNQ,cAAeA,EACff,UAAWmB,EAAGnB,EAAW,uCACzBS,QAASA,EACTR,SAAUA,EACVI,MAAOA,EACPD,MAAOA,EACPE,KAAMA,EACNH,WAAYA,EACZU,WAAYA,EACZX,aAAcA,CAEd,EAAA,WAAA,EAAAL,EAAAuB,aAAA,CAACC,KACOJ,iaAAAA,CAAAA,EAAAA,OAAAA,CACJlB,IAAKA,EACLW,QAASA,EACTC,QAASA,EACTH,SAAUA,EACVP,SAAUA,EACVD,UAAWmB,EAAG,4BAA6BP,iVAI3D,EAGJhB,CAAAA,EAAc0B,WAAW,CAAG"}
@@ -1,2 +1,2 @@
1
- import e from"react";import r from"classnames";import t from"../Input/Input.js";var n=/*#__PURE__*/e.forwardRef(function(n,a){var l=n.className,o=n.disabled,i=n.startElement,u=n.endElement,c=n.error,s=n.label,d=n.hint,p=n.wide,f=n.required,m=n.loading,b=n.inputClassName,y=n.labelProps,O=n.hideEmptyMeta,h=n.dataQa,v=n.isClearable,E=n.onClear,g=n.placeholder,j=function(e,r){if(null==e)return{};var t,n,a=function(e,r){if(null==e)return{};var t,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)t=l[n],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(n,["className","disabled","startElement","endElement","error","label","hint","wide","required","loading","inputClassName","labelProps","hideEmptyMeta","dataQa","isClearable","onClear","placeholder"]),w=e.useRef(null);return /*#__PURE__*/e.createElement(t,{dataQa:h,required:f,wide:p,className:l,loading:m,disabled:o,label:s,error:c,hint:d,endElement:u,startElement:i,labelProps:y,hideEmptyMeta:O,isClearable:v,onClear:function(){if("function"==typeof E){E();return}a&&"current"in a&&a.current?a.current.value="":w.current&&(w.current.value="")}},/*#__PURE__*/e.createElement("input",function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}({disabled:o,className:r("vchasno-ui-text-input",b),required:f,ref:a||w,placeholder:void 0===g?" ":g},j)))});n.displayName="TextInput";export{n as default};
1
+ import e from"react";import r from"classnames";import t from"../Input/Input.js";var n=/*#__PURE__*/e.forwardRef(function(n,a){var l=n.className,o=n.disabled,i=n.startElement,u=n.endElement,s=n.error,c=n.label,p=n.hint,d=n.wide,f=n.required,m=n.loading,b=n.inputClassName,y=n.labelProps,O=n.hideEmptyMeta,h=n.dataQa,v=n.isClearable,E=n.onClear,g=n.pulse,j=n.placeholder,w=function(e,r){if(null==e)return{};var t,n,a=function(e,r){if(null==e)return{};var t,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)t=l[n],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(n,["className","disabled","startElement","endElement","error","label","hint","wide","required","loading","inputClassName","labelProps","hideEmptyMeta","dataQa","isClearable","onClear","pulse","placeholder"]),P=e.useRef(null);return /*#__PURE__*/e.createElement(t,{pulse:g,dataQa:h,required:f,wide:d,className:l,loading:m,disabled:o,label:c,error:s,hint:p,endElement:u,startElement:i,labelProps:y,hideEmptyMeta:O,isClearable:v,onClear:function(){if("function"==typeof E){E();return}a&&"current"in a&&a.current?a.current.value="":P.current&&(P.current.value="")}},/*#__PURE__*/e.createElement("input",function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}({disabled:o,className:r("vchasno-ui-text-input",b),required:f,ref:a||P,placeholder:void 0===j?" ":j},w)))});n.displayName="TextInput";export{n as default};
2
2
  //# sourceMappingURL=TextInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sources":["../../../src/components/TextInput/TextInput.tsx"],"sourcesContent":["import React, { InputHTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport type { InputProps } from '../Input';\nimport Input from '../Input';\nimport { DataQa } from '../types';\n\nimport './TextInput.global.css';\n\nexport interface TextInputProps\n extends InputHTMLAttributes<HTMLInputElement>,\n Omit<InputProps, 'children'>,\n DataQa {\n inputClassName?: string;\n labelProps?: InputHTMLAttributes<HTMLLabelElement>;\n onClear?: VoidFunction;\n}\n\nconst TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(\n (\n {\n className,\n disabled,\n startElement,\n endElement,\n error,\n label,\n hint,\n wide,\n required,\n loading,\n inputClassName,\n labelProps,\n hideEmptyMeta,\n dataQa,\n isClearable,\n onClear,\n placeholder = ' ', //need \"space\" for correct label working\n ...rest\n },\n ref,\n ) => {\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n return (\n <Input\n dataQa={dataQa}\n required={required}\n wide={wide}\n className={className}\n loading={loading}\n disabled={disabled}\n label={label}\n error={error}\n hint={hint}\n endElement={endElement}\n startElement={startElement}\n labelProps={labelProps}\n hideEmptyMeta={hideEmptyMeta}\n isClearable={isClearable}\n onClear={() => {\n if (typeof onClear === 'function') {\n onClear();\n return;\n }\n\n if (ref && 'current' in ref && ref.current) {\n ref.current.value = '';\n } else if (inputRef.current) {\n inputRef.current.value = '';\n }\n }}\n >\n <input\n disabled={disabled}\n className={cn('vchasno-ui-text-input', inputClassName)}\n required={required}\n ref={ref || inputRef}\n placeholder={placeholder}\n {...rest}\n />\n </Input>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\n\nexport default TextInput;\n"],"names":["TextInput","React","forwardRef","ref","className","disabled","startElement","endElement","error","label","hint","wide","required","loading","inputClassName","labelProps","hideEmptyMeta","dataQa","isClearable","onClear","placeholder","rest","inputRef","useRef","Input","current","value","input","cn","displayName"],"mappings":"gFAmBA,IAAMA,EAAYC,WAAAA,EAAAA,EAAMC,UAAU,CAC9B,SAqBIC,CAAAA,CAAAA,CAAAA,EAnBIC,IAAAA,EAAAA,EAAAA,SACAC,CAAAA,EAAAA,EAAAA,QACAC,CAAAA,EAAAA,EAAAA,aACAC,EAAAA,EAAAA,UAAAA,CACAC,EAAAA,EAAAA,KAAAA,CACAC,EAAAA,EAAAA,KAAAA,CACAC,EAAAA,EAAAA,IAAAA,CACAC,IAAAA,IACAC,CAAAA,EAAAA,EAAAA,QACAC,CAAAA,EAAAA,EAAAA,OACAC,CAAAA,EAAAA,EAAAA,cACAC,CAAAA,EAAAA,EAAAA,WACAC,EAAAA,EAAAA,aAAAA,CACAC,EAAAA,EAAAA,MAAAA,CACAC,IAAAA,WACAC,CAAAA,EAAAA,EAAAA,OACAC,CAAAA,EAAAA,EAAAA,WAAAA,CACGC,EAAAA,sXAAAA,EAAAA,CAjBHjB,YACAC,WACAC,eACAC,aACAC,QACAC,QACAC,OACAC,OACAC,WACAC,UACAC,iBACAC,aACAC,gBACAC,SACAC,cACAC,UACAC,gBAKEE,EAAWrB,EAAMsB,MAAM,CAAmB,MAEhD,oBACItB,EAACuB,aAAAA,CAAAA,EAAAA,CACGP,OAAQA,EACRL,SAAUA,EACVD,KAAMA,EACNP,UAAWA,EACXS,QAASA,EACTR,SAAUA,EACVI,MAAOA,EACPD,MAAOA,EACPE,KAAMA,EACNH,WAAYA,EACZD,aAAcA,EACdS,WAAYA,EACZC,cAAeA,EACfE,YAAaA,EACbC,QAAS,WACL,GAAI,AAAmB,YAAnB,OAAOA,EAAwB,CAC/BA,IACA,MACJ,CAEIhB,GAAO,YAAaA,GAAOA,EAAIsB,OAAO,CACtCtB,EAAIsB,OAAO,CAACC,KAAK,CAAG,GACbJ,EAASG,OAAO,EACvBH,CAAAA,EAASG,OAAO,CAACC,KAAK,CAAG,GAEjC,gBAEAzB,EAAC0B,aAAAA,CAAAA,QAAAA,iaAAAA,CACGtB,SAAUA,EACVD,UAAWwB,EAAG,wBAAyBd,GACvCF,SAAUA,EACVT,IAAKA,GAAOmB,EACZF,uBAzCM,IACXC,CAyCSA,EAAAA,IAIpB,EAGJrB,CAAAA,EAAU6B,WAAW,CAAG"}
1
+ {"version":3,"file":"TextInput.js","sources":["../../../src/components/TextInput/TextInput.tsx"],"sourcesContent":["import React, { InputHTMLAttributes } from 'react';\n\nimport cn from 'classnames';\n\nimport type { InputProps } from '../Input';\nimport Input from '../Input';\nimport { DataQa } from '../types';\n\nimport './TextInput.global.css';\n\nexport interface TextInputProps\n extends InputHTMLAttributes<HTMLInputElement>,\n Omit<InputProps, 'children'>,\n DataQa {\n inputClassName?: string;\n labelProps?: InputHTMLAttributes<HTMLLabelElement>;\n onClear?: VoidFunction;\n}\n\nconst TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(\n (\n {\n className,\n disabled,\n startElement,\n endElement,\n error,\n label,\n hint,\n wide,\n required,\n loading,\n inputClassName,\n labelProps,\n hideEmptyMeta,\n dataQa,\n isClearable,\n onClear,\n pulse,\n placeholder = ' ', //need \"space\" for correct label working\n ...rest\n },\n ref,\n ) => {\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n return (\n <Input\n pulse={pulse}\n dataQa={dataQa}\n required={required}\n wide={wide}\n className={className}\n loading={loading}\n disabled={disabled}\n label={label}\n error={error}\n hint={hint}\n endElement={endElement}\n startElement={startElement}\n labelProps={labelProps}\n hideEmptyMeta={hideEmptyMeta}\n isClearable={isClearable}\n onClear={() => {\n if (typeof onClear === 'function') {\n onClear();\n return;\n }\n\n if (ref && 'current' in ref && ref.current) {\n ref.current.value = '';\n } else if (inputRef.current) {\n inputRef.current.value = '';\n }\n }}\n >\n <input\n disabled={disabled}\n className={cn('vchasno-ui-text-input', inputClassName)}\n required={required}\n ref={ref || inputRef}\n placeholder={placeholder}\n {...rest}\n />\n </Input>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\n\nexport default TextInput;\n"],"names":["TextInput","React","forwardRef","ref","className","disabled","startElement","endElement","error","label","hint","wide","required","loading","inputClassName","labelProps","hideEmptyMeta","dataQa","isClearable","onClear","pulse","placeholder","rest","inputRef","useRef","Input","current","value","input","cn","displayName"],"mappings":"gFAmBA,IAAMA,EAAYC,WAAAA,EAAAA,EAAMC,UAAU,CAC9B,SAsBIC,CAAAA,CAAAA,CAAAA,EApBIC,IAAAA,EAAAA,EAAAA,SACAC,CAAAA,EAAAA,EAAAA,QACAC,CAAAA,EAAAA,EAAAA,aACAC,EAAAA,EAAAA,UAAAA,CACAC,EAAAA,EAAAA,KAAAA,CACAC,IAAAA,KACAC,CAAAA,EAAAA,EAAAA,IACAC,CAAAA,EAAAA,EAAAA,KACAC,EAAAA,EAAAA,QAAAA,CACAC,EAAAA,EAAAA,OAAAA,CACAC,IAAAA,cACAC,CAAAA,EAAAA,EAAAA,UACAC,CAAAA,EAAAA,EAAAA,cACAC,EAAAA,EAAAA,MAAAA,CACAC,EAAAA,EAAAA,WAAAA,CACAC,IAAAA,OACAC,CAAAA,EAAAA,EAAAA,KACAC,CAAAA,EAAAA,EAAAA,WAAAA,CACGC,EAAAA,sXAAAA,EAAAA,CAlBHlB,YACAC,WACAC,eACAC,aACAC,QACAC,QACAC,OACAC,OACAC,WACAC,UACAC,iBACAC,aACAC,gBACAC,SACAC,cACAC,UACAC,QACAC,gBAKEE,EAAWtB,EAAMuB,MAAM,CAAmB,MAEhD,oBACIvB,EAACwB,aAAAA,CAAAA,EAAAA,CACGL,MAAOA,EACPH,OAAQA,EACRL,SAAUA,EACVD,KAAMA,EACNP,UAAWA,EACXS,QAASA,EACTR,SAAUA,EACVI,MAAOA,EACPD,MAAOA,EACPE,KAAMA,EACNH,WAAYA,EACZD,aAAcA,EACdS,WAAYA,EACZC,cAAeA,EACfE,YAAaA,EACbC,QAAS,WACL,GAAI,AAAmB,YAAnB,OAAOA,EAAwB,CAC/BA,IACA,MACJ,CAEIhB,GAAO,YAAaA,GAAOA,EAAIuB,OAAO,CACtCvB,EAAIuB,OAAO,CAACC,KAAK,CAAG,GACbJ,EAASG,OAAO,EACvBH,CAAAA,EAASG,OAAO,CAACC,KAAK,CAAG,GAEjC,gBAEA1B,EAAC2B,aAAAA,CAAAA,QAAAA,iaAAAA,CACGvB,SAAUA,EACVD,UAAWyB,EAAG,wBAAyBf,GACvCF,SAAUA,EACVT,IAAKA,GAAOoB,EACZF,uBA1CM,IACXC,CA0CSA,EAAAA,IAIpB,EAGJtB,CAAAA,EAAU8B,WAAW,CAAG"}
@@ -38,6 +38,10 @@ interface TextAlign {
38
38
  /** для центрування тексту **/
39
39
  textAlign?: 'center' | 'start' | 'end' | 'justify';
40
40
  }
41
+ interface WithPulseAnimation {
42
+ /** для анімації пульсу */
43
+ pulse?: boolean;
44
+ }
41
45
  type VchasnoProduct = 'edo' | 'kep' | 'kasa' | 'edi' | 'ttn' | 'dm';
42
46
 
43
- export type { ClearControl, DataQa, EllipsisText, ErrorFeedback, HideEmptyMeta, LoadingFeedback, Sizable, TextAlign, TextType, VchasnoProduct, WithHint, WithLabel };
47
+ export type { ClearControl, DataQa, EllipsisText, ErrorFeedback, HideEmptyMeta, LoadingFeedback, Sizable, TextAlign, TextType, VchasnoProduct, WithHint, WithLabel, WithPulseAnimation };
@@ -0,0 +1,18 @@
1
+ .vchasno-ui-pulse-animation {
2
+ animation: box-shadow-pulse var(--vchasno-pulse-animation-duration) infinite;
3
+ box-shadow: 0 0 0 0 rgb(var(--vchasno-pulse-animation-color) / 30%);
4
+ }
5
+
6
+ @keyframes box-shadow-pulse {
7
+ 0% {
8
+ box-shadow: 0 0 0 0 rgb(var(--vchasno-pulse-animation-color) / 80%);
9
+ }
10
+
11
+ 70% {
12
+ box-shadow: 0 0 0 10px rgb(var(--vchasno-pulse-animation-color) / 0%);
13
+ }
14
+
15
+ 100% {
16
+ box-shadow: 0 0 0 30px rgb(var(--vchasno-pulse-animation-color) / 0%);
17
+ }
18
+ }
@@ -142,6 +142,10 @@
142
142
  --vchasno-ui-snackbar-color-progress-error: var(--vchasno-ui-snackbar-color-error);
143
143
  --vchasno-ui-snackbar-color-progress-bgo: 0.2;
144
144
  --vchasno-ui-snackbar-action-button-color: #0094ff;
145
+
146
+ /* pulse animation color */
147
+ --vchasno-pulse-animation-color: 107 95 255;
148
+ --vchasno-pulse-animation-duration: 1.5s;
145
149
  }
146
150
 
147
151
  :root .vchasno-ui-kit-theme-edo {