@vchasno/ui-kit 0.4.22 → 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.
- package/CHANGELOG.md +14 -0
- package/dist/components/BodyPortal/BodyPortal.d.ts +8 -0
- package/dist/components/BodyPortal/BodyPortal.js +2 -0
- package/dist/components/BodyPortal/BodyPortal.js.map +1 -0
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Datepicker/DatePicker.d.ts +2 -2
- package/dist/components/Datepicker/DatePicker.js +1 -1
- package/dist/components/Datepicker/DatePicker.js.map +1 -1
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/MaskInput/MaskInput.js +1 -1
- package/dist/components/MaskInput/MaskInput.js.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.js.map +1 -1
- package/dist/components/ScrollableBox/ScrollableBox.d.ts +13 -0
- package/dist/components/ScrollableBox/ScrollableBox.js +2 -0
- package/dist/components/ScrollableBox/ScrollableBox.js.map +1 -0
- package/dist/components/ScrollableBox/useElementScrollable.d.ts +5 -0
- package/dist/components/ScrollableBox/useElementScrollable.js +2 -0
- package/dist/components/ScrollableBox/useElementScrollable.js.map +1 -0
- package/dist/components/Select/AsyncSelect.d.ts +3 -3
- package/dist/components/Select/AsyncSelect.js +1 -1
- package/dist/components/Select/AsyncSelect.js.map +1 -1
- package/dist/components/Select/Select.d.ts +2 -2
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectCreatable.d.ts +2 -2
- package/dist/components/Select/SelectCreatable.js +1 -1
- package/dist/components/Select/SelectCreatable.js.map +1 -1
- package/dist/components/Snackbar/Snackbar.js +1 -1
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/Snackbar/WithAction.js +1 -1
- package/dist/components/Snackbar/WithAction.js.map +1 -1
- package/dist/components/Text/Text.d.ts +2 -2
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/TextAreaInput/TextAreaInput.js +1 -1
- package/dist/components/TextAreaInput/TextAreaInput.js.map +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/components/TextInput/TextInput.js.map +1 -1
- package/dist/components/types.d.ts +5 -1
- package/dist/css/_animations.css +18 -0
- package/dist/css/_theme.css +5 -1
- package/dist/css/vchasno-ui.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- 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
|
|
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.
|
|
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
|
|
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,2 +1,2 @@
|
|
|
1
|
-
import t from"react";import{ToastContainer as r,toast as e}from"react-toastify";import
|
|
1
|
+
import t from"react";import{ToastContainer as r,toast as e}from"react-toastify";import a from"./ActionButton.js";import o from"./WithAction.js";var n=function(t){var r=t.type;return"success"===r?"✅":"warning"===r?"⚠️":"error"===r?"❗":"\uD83E\uDD14"},c=function(e){return /*#__PURE__*/t.createElement(r,function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{},a=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.forEach(function(r){var a;a=e[r],r in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a})}return t}({hideProgressBar:!0,theme:"dark",className:"vchasno-ui-snackbar",bodyClassName:"vchasno-ui-snackbar-body",toastClassName:"vchasno-ui-snackbar-toast",position:"bottom-right",icon:n},e))},i=e;c.displayName="Snackbar";var s=Object.assign(c,{ActionButton:a,WithAction:o});export{s as default,i as snackbarToast};
|
|
2
2
|
//# sourceMappingURL=Snackbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snackbar.js","sources":["../../../src/components/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport {\n IconProps as ReactToastifyIconProps,\n ToastContainer,\n ToastContainerProps,\n toast,\n} from 'react-toastify';\
|
|
1
|
+
{"version":3,"file":"Snackbar.js","sources":["../../../src/components/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport {\n IconProps as ReactToastifyIconProps,\n ToastContainer,\n ToastContainerProps,\n toast,\n} from 'react-toastify';\n\nimport ActionButton from './ActionButton';\nimport WithAction from './WithAction';\n\nimport './SnackbarPackage.global.css';\n\nimport './Snackbar.global.css';\n\nexport interface SnackbarProps extends ToastContainerProps {}\nexport interface SnackbarIconProps extends ReactToastifyIconProps {}\n\nconst getIcon = (icon: SnackbarIconProps) => {\n const { type } = icon;\n\n if (type === 'success') {\n return '✅';\n }\n if (type === 'warning') {\n return '⚠️';\n }\n if (type === 'error') {\n return '❗';\n }\n return '🤔';\n};\n\nconst Snackbar: React.FC<SnackbarProps> = (props) => {\n return (\n <ToastContainer\n hideProgressBar\n theme=\"dark\"\n className=\"vchasno-ui-snackbar\"\n bodyClassName=\"vchasno-ui-snackbar-body\"\n toastClassName=\"vchasno-ui-snackbar-toast\"\n position=\"bottom-right\"\n icon={getIcon}\n {...props}\n />\n );\n};\n\nexport const snackbarToast = toast;\n\nSnackbar.displayName = 'Snackbar';\n\nexport default Object.assign(Snackbar, { ActionButton, WithAction });\n"],"names":["getIcon","icon","type","Snackbar","props","React","ToastContainer","hideProgressBar","theme","className","bodyClassName","toastClassName","position","snackbarToast","toast","displayName","Snackbar$1","Object","assign","ActionButton","WithAction"],"mappings":"gJAkBA,IAAMA,EAAU,SAACC,CAAAA,EACb,IAAQC,EAASD,EAATC,IAAAA,OAER,AAAIA,AAAS,YAATA,EACO,IAEPA,AAAS,YAATA,EACO,KAEPA,AAAS,UAATA,EACO,IAEJ,cACX,EAEMC,EAAoC,SAACC,CAAAA,EACvC,OAAA,WAAA,EACIC,EAACC,aAAAA,CAAAA,EAAAA,iaAAAA,CACGC,gBAAAA,CAAAA,EACAC,MAAM,OACNC,UAAU,sBACVC,cAAc,2BACdC,eAAe,4BACfC,SAAS,eACTX,KAAMD,CACFI,EAAAA,GAGhB,EAEaS,EAAgBC,CAE7BX,CAAAA,EAASY,WAAW,CAAG,WAEvB,IAAAC,EAAeC,OAAOC,MAAM,CAACf,EAAU,CAAEgB,aAAAA,EAAcC,WAAAA,CAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from"react";var t=function(t){var r=t.children;return /*#__PURE__*/a.createElement("div",{className:"vchasno-ui-snackbar-with-action-container"},r)};export{t as default};
|
|
2
2
|
//# sourceMappingURL=WithAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithAction.js","sources":["../../../src/components/Snackbar/WithAction.tsx"],"sourcesContent":["import React from 'react';\n\
|
|
1
|
+
{"version":3,"file":"WithAction.js","sources":["../../../src/components/Snackbar/WithAction.tsx"],"sourcesContent":["import React from 'react';\n\nconst WithAction: React.FC = ({ children }) => {\n return <div className=\"vchasno-ui-snackbar-with-action-container\">{children}</div>;\n};\n\nexport default WithAction;\n"],"names":["WithAction","param","children","React","div","className"],"mappings":"qBAEA,IAAMA,EAAuB,SAAAC,CAAA,MAAGC,EAAAA,EAAAA,QAAAA,CAC5B,oBAAOC,EAACC,aAAAA,CAAAA,MAAAA,CAAIC,UAAU,2CAA6CH,EAAAA,EACvE"}
|
|
@@ -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,
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
+
}
|
package/dist/css/_theme.css
CHANGED
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
env(safe-area-inset-bottom)
|
|
114
114
|
);
|
|
115
115
|
--vchasno-ui-snackbar-toast-background: rgb(0 0 0 / 90%);
|
|
116
|
-
--vchasno-ui-snackbar-toast-min-height:
|
|
116
|
+
--vchasno-ui-snackbar-toast-min-height: 24px;
|
|
117
117
|
--vchasno-ui-snackbar-toast-max-height: 800px;
|
|
118
118
|
--vchasno-ui-snackbar-toast-bd-radius: 8px;
|
|
119
119
|
--vchasno-ui-snackbar-font-family: sans-serif;
|
|
@@ -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 {
|