@consta/uikit 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["checked","name","size","view","align","disabled","intermediate","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef"];import"./Checkbox.css";import React from"react";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{cnMixFocus}from"../../mixs/MixFocus/MixFocus";import{cn}from"../../utils/bem";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";export var checkboxPropSize=["m","xs","s","l"];export var checkboxPropSizeDefault=checkboxPropSize[0];export var checkboxPropView=["primary","ghost"];export var checkboxPropViewDefault=checkboxPropView[0];export var checkboxPropAlign=["center","top"];export var checkboxPropAlignDefault=checkboxPropAlign[0];export var COMPONENT_NAME="Checkbox";export var cnCheckbox=cn("Checkbox");export var Checkbox=React.forwardRef(function(a,b){var c=React.useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.checked,f=d.name,g=d.size,h=void 0===g?checkboxPropSizeDefault:g,i=d.view,j=void 0===i?checkboxPropViewDefault:i,k=d.align,l=void 0===k?checkboxPropAlignDefault:k,m=d.disabled,n=d.intermediate,o=d.className,p=d.label,q=d.onChange,r=d.onFocus,s=d.onBlur,t=d.readOnly,u=d.required,v=d.step,w=d.tabIndex,x=d.inputId,y=d.inputRef,z=_objectWithoutProperties(d,_excluded);return React.createElement("label",Object.assign({},z,{className:cnCheckbox({size:h,view:j,disabled:m,intermediate:void 0!==n&&n,align:l},[o]),ref:useForkRef([b,c])}),React.createElement("input",{type:"checkbox",name:f,className:cnCheckbox("Input",[cnMixFocus()]),checked:void 0!==e&&e,id:x,disabled:m,onChange:q,onFocus:r,onBlur:s,readOnly:t,required:u,step:v,tabIndex:w,ref:y}),p&&React.createElement("span",{className:cnCheckbox("Label")},p))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["checked","name","size","view","align","disabled","intermediate","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef"];import"./Checkbox.css";import React from"react";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{cnMixFocus}from"../../mixs/MixFocus/MixFocus";import{cn}from"../../utils/bem";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";export var checkboxPropSize=["m","xs","s","l"];export var checkboxPropSizeDefault=checkboxPropSize[0];export var checkboxPropView=["primary","ghost"];export var checkboxPropViewDefault=checkboxPropView[0];export var checkboxPropAlign=["center","top"];export var checkboxPropAlignDefault=checkboxPropAlign[0];var checkboxPropOnChangeDefault=function(){};export var COMPONENT_NAME="Checkbox";export var cnCheckbox=cn("Checkbox");export var Checkbox=React.forwardRef(function(a,b){var c=React.useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.checked,f=d.name,g=d.size,h=void 0===g?checkboxPropSizeDefault:g,i=d.view,j=void 0===i?checkboxPropViewDefault:i,k=d.align,l=void 0===k?checkboxPropAlignDefault:k,m=d.disabled,n=d.intermediate,o=d.className,p=d.label,q=d.onChange,r=void 0===q?checkboxPropOnChangeDefault:q,s=d.onFocus,t=d.onBlur,u=d.readOnly,v=d.required,w=d.step,x=d.tabIndex,y=d.inputId,z=d.inputRef,A=_objectWithoutProperties(d,_excluded);return React.createElement("label",Object.assign({},A,{className:cnCheckbox({size:h,view:j,disabled:m,intermediate:void 0!==n&&n,align:l},[o]),ref:useForkRef([b,c])}),React.createElement("input",{type:"checkbox",name:f,className:cnCheckbox("Input",[cnMixFocus()]),checked:void 0!==e&&e,id:y,disabled:m,onChange:r,onFocus:s,onBlur:t,readOnly:u,required:v,step:w,tabIndex:x,ref:z}),p&&React.createElement("span",{className:cnCheckbox("Label")},p))});
2
2
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":["React","useForkRef","cnMixFocus","cn","usePropsHandler","checkboxPropSize","checkboxPropSizeDefault","checkboxPropView","checkboxPropViewDefault","checkboxPropAlign","checkboxPropAlignDefault","COMPONENT_NAME","cnCheckbox","Checkbox","forwardRef","props","ref","checkboxRef","useRef","checked","name","size","view","align","disabled","intermediate","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef","otherProps"],"sources":["../../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import './Checkbox.css';\n\nimport React, { ChangeEventHandler } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const checkboxPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type CheckboxPropSize = typeof checkboxPropSize[number];\nexport const checkboxPropSizeDefault: CheckboxPropSize = checkboxPropSize[0];\n\nexport const checkboxPropView = ['primary', 'ghost'] as const;\nexport type CheckboxPropView = typeof checkboxPropView[number];\nexport const checkboxPropViewDefault: CheckboxPropView = checkboxPropView[0];\n\nexport const checkboxPropAlign = ['center', 'top'] as const;\nexport type CheckboxPropAlign = typeof checkboxPropAlign[number];\nexport const checkboxPropAlignDefault: CheckboxPropAlign = checkboxPropAlign[0];\n\nexport type CheckboxPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\ntype Props = {\n checked: boolean | undefined;\n size?: CheckboxPropSize;\n view?: CheckboxPropView;\n align?: CheckboxPropAlign;\n disabled?: boolean;\n intermediate?: boolean;\n label?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n for?: string;\n inputId?: string;\n};\n\nexport type CheckboxProps = PropsWithHTMLAttributes<Props, HTMLLabelElement>;\n\nexport const COMPONENT_NAME = 'Checkbox' as const;\nexport const cnCheckbox = cn(COMPONENT_NAME);\n\nexport const Checkbox = React.forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const checkboxRef = React.useRef<HTMLLabelElement>(null);\n\n const {\n checked = false,\n name,\n size = checkboxPropSizeDefault,\n view = checkboxPropViewDefault,\n align = checkboxPropAlignDefault,\n disabled,\n intermediate = false,\n className,\n label,\n onChange,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputId,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, checkboxRef);\n\n return (\n <label\n {...otherProps}\n className={cnCheckbox({ size, view, disabled, intermediate, align }, [\n className,\n ])}\n ref={useForkRef([ref, checkboxRef])}\n >\n <input\n type=\"checkbox\"\n name={name}\n className={cnCheckbox('Input', [cnMixFocus()])}\n checked={checked}\n id={inputId}\n disabled={disabled}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n tabIndex={tabIndex}\n ref={inputRef}\n />\n {label && <span className={cnCheckbox('Label')}>{label}</span>}\n </label>\n );\n },\n);\n"],"mappings":"qRAAA,uBAEA,MAAOA,MAAP,KAA0C,OAA1C,CAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBAEA,OAASC,eAAT,2CAEA,MAAO,IAAMC,iBAAgB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAzB,CAEP,MAAO,IAAMC,wBAAyC,CAAGD,gBAAgB,CAAC,CAAD,CAAlE,CAEP,MAAO,IAAME,iBAAgB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAzB,CAEP,MAAO,IAAMC,wBAAyC,CAA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ACe,CAAD,CAAMC,CAAN,CAAD,CALjB,GAOE,6BACE,IAAI,CAAC,UADP,CAEE,IAAI,CAAEG,CAFR,CAGE,SAAS,CAAER,UAAU,CAAC,OAAD,CAAU,CAACV,UAAU,EAAX,CAAV,CAHvB,CAIE,OAAO,cAJT,CAKE,EAAE,CAAEiC,CALN,CAME,QAAQ,CAAEX,CANZ,CAOE,QAAQ,CAAEI,CAPZ,CAQE,OAAO,CAAEC,CARX,CASE,MAAM,CAAEC,CATV,CAUE,QAAQ,CAAEC,CAVZ,CAWE,QAAQ,CAAEC,CAXZ,CAYE,IAAI,CAAEC,CAZR,CAaE,QAAQ,CAAEC,CAbZ,CAcE,GAAG,CAAEE,CAdP,EAPF,CAuBGT,CAAK,EAAI,4BAAM,SAAS,CAAEf,UAAU,CAAC,OAAD,CAA3B,EAAuCe,CAAvC,CAvBZ,CA0BH,CArDqB,CAAjB"}
1
+ {"version":3,"file":"Checkbox.js","names":["React","useForkRef","cnMixFocus","cn","usePropsHandler","checkboxPropSize","checkboxPropSizeDefault","checkboxPropView","checkboxPropViewDefault","checkboxPropAlign","checkboxPropAlignDefault","checkboxPropOnChangeDefault","COMPONENT_NAME","cnCheckbox","Checkbox","forwardRef","props","ref","checkboxRef","useRef","checked","name","size","view","align","disabled","intermediate","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef","otherProps"],"sources":["../../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import './Checkbox.css';\n\nimport React, { ChangeEventHandler } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const checkboxPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type CheckboxPropSize = typeof checkboxPropSize[number];\nexport const checkboxPropSizeDefault: CheckboxPropSize = checkboxPropSize[0];\n\nexport const checkboxPropView = ['primary', 'ghost'] as const;\nexport type CheckboxPropView = typeof checkboxPropView[number];\nexport const checkboxPropViewDefault: CheckboxPropView = checkboxPropView[0];\n\nexport const checkboxPropAlign = ['center', 'top'] as const;\nexport type CheckboxPropAlign = typeof checkboxPropAlign[number];\nexport const checkboxPropAlignDefault: CheckboxPropAlign = checkboxPropAlign[0];\n\nexport type CheckboxPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nconst checkboxPropOnChangeDefault = () => {};\n\ntype Props = {\n checked: boolean | undefined;\n size?: CheckboxPropSize;\n view?: CheckboxPropView;\n align?: CheckboxPropAlign;\n disabled?: boolean;\n intermediate?: boolean;\n label?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n for?: string;\n inputId?: string;\n};\n\nexport type CheckboxProps = PropsWithHTMLAttributes<Props, HTMLLabelElement>;\n\nexport const COMPONENT_NAME = 'Checkbox' as const;\nexport const cnCheckbox = cn(COMPONENT_NAME);\n\nexport const Checkbox = React.forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const checkboxRef = React.useRef<HTMLLabelElement>(null);\n\n const {\n checked = false,\n name,\n size = checkboxPropSizeDefault,\n view = checkboxPropViewDefault,\n align = checkboxPropAlignDefault,\n disabled,\n intermediate = false,\n className,\n label,\n onChange = checkboxPropOnChangeDefault,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputId,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, checkboxRef);\n\n return (\n <label\n {...otherProps}\n className={cnCheckbox({ size, view, disabled, intermediate, align }, [\n className,\n ])}\n ref={useForkRef([ref, checkboxRef])}\n >\n <input\n type=\"checkbox\"\n name={name}\n className={cnCheckbox('Input', [cnMixFocus()])}\n checked={checked}\n id={inputId}\n disabled={disabled}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n tabIndex={tabIndex}\n ref={inputRef}\n />\n {label && <span className={cnCheckbox('Label')}>{label}</span>}\n </label>\n );\n },\n);\n"],"mappings":"qRAAA,uBAEA,MAAOA,MAAP,KAA0C,OAA1C,CAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBAEA,OAASC,eAAT,2CAEA,MAAO,IAAMC,iBAAgB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAzB,CAEP,MAAO,IAAMC,wBAAyC,CAAGD,gBAAgB,CAAC,CAAD,CAAlE,CAEP,MAAO,IAAME,iBAAgB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAzB,CAEP,MAAO,IAAMC,wBAAyC,CAAGD,gBAAgB,CAAC,CAAD,CAAlE,CAEP,MAAO,IAAME,kBAAiB,CAAG,CAAC,QAAD,CAAW,KAAX,CAA1B,CAEP,MAAO,IAAMC,yBAA2C,CAAGD,iBAAiB,CAAC,CAAD,CAArE,CASP,GAAME,4BAA2B,CAAG,UAAM,CAAE,CAA5C,CA2BA,MAAO,IAAMC,eAAc,CAAG,UAAvB,CACP,MAAO,IAAMC,WAAU,CAAGV,EAAE,YAArB,CAEP,MAAO,IAAMW,SAAQ,CAAGd,KAAK,CAACe,UAAN,CACtB,SAACC,CAAD,CAAQC,CAAR,CAAgB,IACRC,EAAW,CAAGlB,KAAK,CAACmB,MAAN,CAA+B,IAA/B,CADN,GAuBVf,eAAe,CAACQ,cAAD,CAAiBI,CAAjB,CAAwBE,CAAxB,CAvBL,KAIZE,OAJY,CAKZC,CALY,GAKZA,IALY,KAMZC,IANY,CAMZA,CAN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,CAAC,OAAD,CAA3B,EAAuCe,CAAvC,CAvBZ,CA0BH,CArDqB,CAAjB"}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["checked","name","size","view","align","disabled","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef"];import"./Radio.css";import React,{useRef}from"react";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{cnMixFocus}from"../../mixs/MixFocus/MixFocus";import{cn}from"../../utils/bem";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";export var radioPropSize=["m","l","s","xs"];export var radioPropSizeDefault=radioPropSize[0];export var radioPropView=["primary","ghost"];export var radioPropViewDefault=radioPropView[0];export var radioPropAlign=["center","top"];export var radioPropAlignDefault=radioPropAlign[0];export var cnRadio=cn("Radio");export var COMPONENT_NAME="Radio";export var Radio=React.forwardRef(function(a,b){var c=useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.checked,f=d.name,g=d.size,h=void 0===g?radioPropSizeDefault:g,i=d.view,j=void 0===i?radioPropViewDefault:i,k=d.align,l=void 0===k?radioPropAlignDefault:k,m=d.disabled,n=d.className,o=d.label,p=d.onChange,q=d.onFocus,r=d.onBlur,s=d.readOnly,t=d.required,u=d.step,v=d.tabIndex,w=d.inputId,x=d.inputRef,y=_objectWithoutProperties(d,_excluded);return React.createElement("label",Object.assign({},y,{className:cnRadio({size:h,view:j,disabled:m,align:l},[n]),ref:useForkRef([b,c])}),React.createElement("input",{type:"radio",name:f,className:cnRadio("Input",[cnMixFocus()]),checked:void 0!==e&&e,disabled:m,onChange:p,onFocus:q,onBlur:r,readOnly:s,required:t,step:u,id:w,tabIndex:v,ref:x}),o&&React.createElement("span",{className:cnRadio("Label")},o))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["checked","name","size","view","align","disabled","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef"];import"./Radio.css";import React,{useRef}from"react";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{cnMixFocus}from"../../mixs/MixFocus/MixFocus";import{cn}from"../../utils/bem";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";export var radioPropSize=["m","l","s","xs"];export var radioPropSizeDefault=radioPropSize[0];export var radioPropView=["primary","ghost"];export var radioPropViewDefault=radioPropView[0];export var radioPropAlign=["center","top"];export var radioPropAlignDefault=radioPropAlign[0];var radioPropOnChangeDefault=function(){};export var cnRadio=cn("Radio");export var COMPONENT_NAME="Radio";export var Radio=React.forwardRef(function(a,b){var c=useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.checked,f=d.name,g=d.size,h=void 0===g?radioPropSizeDefault:g,i=d.view,j=void 0===i?radioPropViewDefault:i,k=d.align,l=void 0===k?radioPropAlignDefault:k,m=d.disabled,n=d.className,o=d.label,p=d.onChange,q=void 0===p?radioPropOnChangeDefault:p,r=d.onFocus,s=d.onBlur,t=d.readOnly,u=d.required,v=d.step,w=d.tabIndex,x=d.inputId,y=d.inputRef,z=_objectWithoutProperties(d,_excluded);return React.createElement("label",Object.assign({},z,{className:cnRadio({size:h,view:j,disabled:m,align:l},[n]),ref:useForkRef([b,c])}),React.createElement("input",{type:"radio",name:f,className:cnRadio("Input",[cnMixFocus()]),checked:void 0!==e&&e,disabled:m,onChange:q,onFocus:r,onBlur:s,readOnly:t,required:u,step:v,id:x,tabIndex:w,ref:y}),o&&React.createElement("span",{className:cnRadio("Label")},o))});
2
2
  //# sourceMappingURL=Radio.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","names":["React","useRef","useForkRef","cnMixFocus","cn","usePropsHandler","radioPropSize","radioPropSizeDefault","radioPropView","radioPropViewDefault","radioPropAlign","radioPropAlignDefault","cnRadio","COMPONENT_NAME","Radio","forwardRef","props","ref","radioRef","checked","name","size","view","align","disabled","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef","otherProps"],"sources":["../../../../../src/components/Radio/Radio.tsx"],"sourcesContent":["import './Radio.css';\n\nimport React, { ChangeEventHandler, useRef } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const radioPropSize = ['m', 'l', 's', 'xs'] as const;\nexport type RadioPropSize = typeof radioPropSize[number];\nexport const radioPropSizeDefault: RadioPropSize = radioPropSize[0];\n\nexport const radioPropView = ['primary', 'ghost'] as const;\nexport type RadioPropView = typeof radioPropView[number];\nexport const radioPropViewDefault: RadioPropView = radioPropView[0];\n\nexport const radioPropAlign = ['center', 'top'] as const;\nexport type RadioPropAlign = typeof radioPropAlign[number];\nexport const radioPropAlignDefault: RadioPropAlign = radioPropAlign[0];\n\nexport type RadioPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type Props = {\n checked?: boolean;\n size?: RadioPropSize;\n view?: RadioPropView;\n align?: RadioPropAlign;\n disabled?: boolean;\n className?: string;\n label?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n for?: string;\n inputId?: string;\n};\n\nexport type RadioProps = PropsWithHTMLAttributes<Props, HTMLLabelElement>;\n\nexport const cnRadio = cn('Radio');\n\nexport const COMPONENT_NAME = 'Radio' as const;\n\nexport const Radio = React.forwardRef<HTMLLabelElement, RadioProps>(\n (props, ref) => {\n const radioRef = useRef<HTMLLabelElement>(null);\n\n const {\n checked = false,\n name,\n size = radioPropSizeDefault,\n view = radioPropViewDefault,\n align = radioPropAlignDefault,\n disabled,\n className,\n label,\n onChange,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputId,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, radioRef);\n\n return (\n <label\n {...otherProps}\n className={cnRadio({ size, view, disabled, align }, [className])}\n ref={useForkRef([ref, radioRef])}\n >\n <input\n type=\"radio\"\n name={name}\n className={cnRadio('Input', [cnMixFocus()])}\n checked={checked}\n disabled={disabled}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n id={inputId}\n tabIndex={tabIndex}\n ref={inputRef}\n />\n {label && <span className={cnRadio('Label')}>{label}</span>}\n </label>\n );\n },\n);\n"],"mappings":"sQAAA,oBAEA,MAAOA,MAAP,EAAoCC,MAApC,KAAkD,OAAlD,CAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBAEA,OAASC,eAAT,2CAEA,MAAO,IAAMC,cAAa,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAgB,IAAhB,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAGD,aAAa,CAAC,CAAD,CAAzD,CAEP,MAAO,IAAME,cAAa,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAGD,aAAa,CAAC,CAAD,CAAzD,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,QAAD,CAAW,KAAX,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAkCP,MAAO,IAAME,QAAO,CAAGR,EAAE,CAAC,OAAD,CAAlB,CAEP,MAAO,IAAMS,eAAc,CAAG,OAAvB,CAEP,MAAO,IAAMC,MAAK,CAAGd,KAAK,CAACe,UAAN,CACnB,SAACC,CAAD,CAAQC,CAAR,CAAgB,IACRC,EAAQ,CAAGjB,MAAM,CA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bZ,CAcE,GAAG,CAAEE,CAdP,EALF,CAqBGT,CAAK,EAAI,4BAAM,SAAS,CAAEd,OAAO,CAAC,OAAD,CAAxB,EAAoCc,CAApC,CArBZ,CAwBH,CAlDkB,CAAd"}
1
+ {"version":3,"file":"Radio.js","names":["React","useRef","useForkRef","cnMixFocus","cn","usePropsHandler","radioPropSize","radioPropSizeDefault","radioPropView","radioPropViewDefault","radioPropAlign","radioPropAlignDefault","radioPropOnChangeDefault","cnRadio","COMPONENT_NAME","Radio","forwardRef","props","ref","radioRef","checked","name","size","view","align","disabled","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef","otherProps"],"sources":["../../../../../src/components/Radio/Radio.tsx"],"sourcesContent":["import './Radio.css';\n\nimport React, { ChangeEventHandler, useRef } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const radioPropSize = ['m', 'l', 's', 'xs'] as const;\nexport type RadioPropSize = typeof radioPropSize[number];\nexport const radioPropSizeDefault: RadioPropSize = radioPropSize[0];\n\nexport const radioPropView = ['primary', 'ghost'] as const;\nexport type RadioPropView = typeof radioPropView[number];\nexport const radioPropViewDefault: RadioPropView = radioPropView[0];\n\nexport const radioPropAlign = ['center', 'top'] as const;\nexport type RadioPropAlign = typeof radioPropAlign[number];\nexport const radioPropAlignDefault: RadioPropAlign = radioPropAlign[0];\n\nconst radioPropOnChangeDefault = () => {};\n\nexport type RadioPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type Props = {\n checked?: boolean;\n size?: RadioPropSize;\n view?: RadioPropView;\n align?: RadioPropAlign;\n disabled?: boolean;\n className?: string;\n label?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n for?: string;\n inputId?: string;\n};\n\nexport type RadioProps = PropsWithHTMLAttributes<Props, HTMLLabelElement>;\n\nexport const cnRadio = cn('Radio');\n\nexport const COMPONENT_NAME = 'Radio' as const;\n\nexport const Radio = React.forwardRef<HTMLLabelElement, RadioProps>(\n (props, ref) => {\n const radioRef = useRef<HTMLLabelElement>(null);\n\n const {\n checked = false,\n name,\n size = radioPropSizeDefault,\n view = radioPropViewDefault,\n align = radioPropAlignDefault,\n disabled,\n className,\n label,\n onChange = radioPropOnChangeDefault,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputId,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, radioRef);\n\n return (\n <label\n {...otherProps}\n className={cnRadio({ size, view, disabled, align }, [className])}\n ref={useForkRef([ref, radioRef])}\n >\n <input\n type=\"radio\"\n name={name}\n className={cnRadio('Input', [cnMixFocus()])}\n checked={checked}\n disabled={disabled}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n id={inputId}\n tabIndex={tabIndex}\n ref={inputRef}\n />\n {label && <span className={cnRadio('Label')}>{label}</span>}\n </label>\n );\n },\n);\n"],"mappings":"sQAAA,oBAEA,MAAOA,MAAP,EAAoCC,MAApC,KAAkD,OAAlD,CAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBAEA,OAASC,eAAT,2CAEA,MAAO,IAAMC,cAAa,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAgB,IAAhB,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAGD,aAAa,CAAC,CAAD,CAA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Q,CAARA,CAAd,CAAwBD,KAAK,CAALA,CAAxB,CAAD,CAAkC,CAACE,CAAD,CAAlC,CAFpB,CAGE,GAAG,CAAExB,UAAU,CAAC,CAACgB,CAAD,CAAMC,CAAN,CAAD,CAHjB,GAKE,6BACE,IAAI,CAAC,OADP,CAEE,IAAI,CAAEE,CAFR,CAGE,SAAS,CAAER,OAAO,CAAC,OAAD,CAAU,CAACV,UAAU,EAAX,CAAV,CAHpB,CAIE,OAAO,cAJT,CAKE,QAAQ,CAAEsB,CALZ,CAME,QAAQ,CAAEG,CANZ,CAOE,OAAO,CAAEC,CAPX,CAQE,MAAM,CAAEC,CARV,CASE,QAAQ,CAAEC,CATZ,CAUE,QAAQ,CAAEC,CAVZ,CAWE,IAAI,CAAEC,CAXR,CAYE,EAAE,CAAEE,CAZN,CAaE,QAAQ,CAAED,CAbZ,CAcE,GAAG,CAAEE,CAdP,EALF,CAqBGT,CAAK,EAAI,4BAAM,SAAS,CAAEd,OAAO,CAAC,OAAD,CAAxB,EAAoCc,CAApC,CArBZ,CAwBH,CAlDkB,CAAd"}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","label","active","hovered","multiple","size","indent","disabled"];import"./SelectItem.css";import React,{forwardRef}from"react";import{Checkbox}from"../../Checkbox";import{ListItem}from"../../ListCanary";import{cn}from"../../../utils/bem";export var sizeCheckboxMap={xs:"m",s:"m",m:"l",l:"l"};export var cnSelectItem=cn("SelectItem");export var SelectItem=forwardRef(function(a,b){var c=a.className,d=a.label,e=a.active,f=a.hovered,g=a.multiple,h=a.size,i=a.indent,j=a.disabled,k=_objectWithoutProperties(a,_excluded);return React.createElement(ListItem,Object.assign({},k,{ref:b,className:cnSelectItem(null,[c]),"aria-selected":e,"aria-disabled":j,role:"option",label:d,innerOffset:i,size:h,active:f,checked:!g&&e,disabled:j,leftSide:g&&React.createElement(Checkbox,{checked:e,disabled:j,size:sizeCheckboxMap[h]})}),d)});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","label","active","hovered","multiple","size","indent","disabled","onClick"];import"./SelectItem.css";import React,{forwardRef}from"react";import{Checkbox}from"../../Checkbox";import{ListItem}from"../../ListCanary";import{cn}from"../../../utils/bem";export var sizeCheckboxMap={xs:"m",s:"m",m:"l",l:"l"};export var cnSelectItem=cn("SelectItem");export var SelectItem=forwardRef(function(a,b){var c=a.className,d=a.label,e=a.active,f=a.hovered,g=a.multiple,h=a.size,i=a.indent,j=a.disabled,k=a.onClick,l=_objectWithoutProperties(a,_excluded);return React.createElement(ListItem,Object.assign({},l,{ref:b,className:cnSelectItem(null,[c]),"aria-selected":e,"aria-disabled":j,role:"option",label:d,innerOffset:i,size:h,active:f,checked:!g&&e,disabled:j,onClick:k,leftSide:g&&React.createElement(Checkbox,{checked:e,disabled:j,size:sizeCheckboxMap[h]})}),d)});
2
2
  //# sourceMappingURL=SelectItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectItem.js","names":["React","forwardRef","Checkbox","ListItem","cn","sizeCheckboxMap","xs","s","m","l","cnSelectItem","SelectItem","props","ref","className","label","active","hovered","multiple","size","indent","disabled","otherProps"],"sources":["../../../../../../src/components/SelectComponents/SelectItem/SelectItem.tsx"],"sourcesContent":["import './SelectItem.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { Checkbox, CheckboxPropSize } from '##/components/Checkbox';\nimport { ListItem } from '##/components/ListCanary';\nimport { cn } from '##/utils/bem';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nimport { PropSize } from '../types';\n\nexport type SelectItemProps = PropsWithHTMLAttributesAndRef<\n {\n label: string;\n active: boolean;\n hovered: boolean;\n multiple: boolean;\n size: PropSize;\n indent: 'normal' | 'increased';\n disabled: boolean | undefined;\n },\n HTMLDivElement\n>;\n\nexport const sizeCheckboxMap: Record<PropSize, CheckboxPropSize> = {\n xs: 'm',\n s: 'm',\n m: 'l',\n l: 'l',\n};\n\nexport const cnSelectItem = cn('SelectItem');\n\nexport const SelectItem: React.FC<SelectItemProps> = forwardRef(\n (props, ref) => {\n const {\n className,\n label,\n active,\n hovered,\n multiple,\n size,\n indent,\n disabled,\n ...otherProps\n } = props;\n\n return (\n <ListItem\n {...otherProps}\n ref={ref}\n className={cnSelectItem(null, [className])}\n aria-selected={active}\n aria-disabled={disabled}\n role=\"option\"\n label={label}\n innerOffset={indent}\n size={size}\n active={hovered}\n checked={!multiple && active}\n disabled={disabled}\n leftSide={\n multiple && (\n <Checkbox\n checked={active}\n disabled={disabled}\n size={sizeCheckboxMap[size]}\n />\n )\n }\n >\n {label}\n </ListItem>\n );\n },\n);\n"],"mappings":"kLAAA,yBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,QAAT,sBACA,OAASC,QAAT,wBACA,OAASC,EAAT,0BAkBA,MAAO,IAAMC,gBAAmD,CAAG,CACjEC,EAAE,CAAE,GAD6D,CAEjEC,CAAC,CAAE,GAF8D,CAGjEC,CAAC,CAAE,GAH8D,CAIjEC,CAAC,CAAE,GAJ8D,CAA5D,CAOP,MAAO,IAAMC,aAAY,CAAGN,EAAE,CAAC,YAAD,CAAvB,CAEP,MAAO,IAAMO,WAAqC,CAAGV,UAAU,CAC7D,SAACW,CAAD,CAAQC,CAAR,CAAgB,CACd,GACEC,EADF,CAUIF,CAVJ,CACEE,SADF,CAEEC,CAFF,CAUIH,CAVJ,CAEEG,KAFF,CAGEC,CAHF,CAUIJ,CAVJ,CAGEI,MAHF,CAIEC,CAJF,CAUIL,CAVJ,CAIEK,OAJF,CAKEC,CALF,CAUIN,CAVJ,CAKEM,QALF,CAMEC,CANF,CAUIP,CAVJ,CAMEO,IANF,CAOEC,CAPF,CAUIR,CAVJ,CAOEQ,MAPF,CAQEC,CARF,CAUIT,CAVJ,CAQES,QARF,CASKC,CATL,0BAUIV,CAVJ,YAYA,MACE,qBAAC,QAAD,kBACMU,CADN,EAEE,GAAG,CAAET,CAFP,CAGE,SAAS,CAAEH,YAAY,CAAC,IAAD,CAAO,CAACI,CAAD,CAAP,CAHzB,CAIE,gBAAeE,CAJjB,CAKE,gBAAeK,CALjB,CAME,IAAI,CAAC,QANP,CAOE,KAAK,CAAEN,CAPT,CAQE,WAAW,CAAEK,CARf,CASE,IAAI,CAAED,CATR,CAUE,MAAM,CAAEF,CAVV,CAWE,OAAO,CAAE,CAACC,CAAD,EAAaF,CAXxB,CAYE,QAAQ,CAAEK,CAZZ,CAaE,QAAQ,CACNH,CAAQ,EACN,oBAAC,QAAD,EACE,OAAO,CAAEF,CADX,CAEE,QAAQ,CAAEK,CAFZ,CAGE,IAAI,CAAEhB,eAAe,CAACc,CAAD,CAHvB,EAfN,GAuBGJ,CAvBH,CA0BH,CAzC4D,CAAxD"}
1
+ {"version":3,"file":"SelectItem.js","names":["React","forwardRef","Checkbox","ListItem","cn","sizeCheckboxMap","xs","s","m","l","cnSelectItem","SelectItem","props","ref","className","label","active","hovered","multiple","size","indent","disabled","onClick","otherProps"],"sources":["../../../../../../src/components/SelectComponents/SelectItem/SelectItem.tsx"],"sourcesContent":["import './SelectItem.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { Checkbox, CheckboxPropSize } from '##/components/Checkbox';\nimport { ListItem } from '##/components/ListCanary';\nimport { cn } from '##/utils/bem';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nimport { PropSize } from '../types';\n\nexport type SelectItemProps = PropsWithHTMLAttributesAndRef<\n {\n label: string;\n active: boolean;\n hovered: boolean;\n multiple: boolean;\n size: PropSize;\n indent: 'normal' | 'increased';\n disabled: boolean | undefined;\n },\n HTMLDivElement\n>;\n\nexport const sizeCheckboxMap: Record<PropSize, CheckboxPropSize> = {\n xs: 'm',\n s: 'm',\n m: 'l',\n l: 'l',\n};\n\nexport const cnSelectItem = cn('SelectItem');\n\nexport const SelectItem: React.FC<SelectItemProps> = forwardRef(\n (props, ref) => {\n const {\n className,\n label,\n active,\n hovered,\n multiple,\n size,\n indent,\n disabled,\n onClick,\n ...otherProps\n } = props;\n\n return (\n <ListItem\n {...otherProps}\n ref={ref}\n className={cnSelectItem(null, [className])}\n aria-selected={active}\n aria-disabled={disabled}\n role=\"option\"\n label={label}\n innerOffset={indent}\n size={size}\n active={hovered}\n checked={!multiple && active}\n disabled={disabled}\n onClick={onClick}\n leftSide={\n multiple && (\n <Checkbox\n checked={active}\n disabled={disabled}\n size={sizeCheckboxMap[size]}\n />\n )\n }\n >\n {label}\n </ListItem>\n );\n },\n);\n"],"mappings":"4LAAA,yBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,QAAT,sBACA,OAASC,QAAT,wBACA,OAASC,EAAT,0BAkBA,MAAO,IAAMC,gBAAmD,CAAG,CACjEC,EAAE,CAAE,GAD6D,CAEjEC,CAAC,CAAE,GAF8D,CAGjEC,CAAC,CAAE,GAH8D,CAIjEC,CAAC,CAAE,GAJ8D,CAA5D,CAOP,MAAO,IAAMC,aAAY,CAAGN,EAAE,CAAC,YAAD,CAAvB,CAEP,MAAO,IAAMO,WAAqC,CAAGV,UAAU,CAC7D,SAACW,CAAD,CAAQC,CAAR,CAAgB,CACd,GACEC,EADF,CAWIF,CAXJ,CACEE,SADF,CAEEC,CAFF,CAWIH,CAXJ,CAEEG,KAFF,CAGEC,CAHF,CAWIJ,CAXJ,CAGEI,MAHF,CAIEC,CAJF,CAWIL,CAXJ,CAIEK,OAJF,CAKEC,CALF,CAWIN,CAXJ,CAKEM,QALF,CAMEC,CANF,CAWIP,CAXJ,CAMEO,IANF,CAOEC,CAPF,CAWIR,CAXJ,CAOEQ,MAPF,CAQEC,CARF,CAWIT,CAXJ,CAQES,QARF,CASEC,CATF,CAWIV,CAXJ,CASEU,OATF,CAUKC,CAVL,0BAWIX,CAXJ,YAaA,MACE,qBAAC,QAAD,kBACMW,CADN,EAEE,GAAG,CAAEV,CAFP,CAGE,SAAS,CAAEH,YAAY,CAAC,IAAD,CAAO,CAACI,CAAD,CAAP,CAHzB,CAIE,gBAAeE,CAJjB,CAKE,gBAAeK,CALjB,CAME,IAAI,CAAC,QANP,CAOE,KAAK,CAAEN,CAPT,CAQE,WAAW,CAAEK,CARf,CASE,IAAI,CAAED,CATR,CAUE,MAAM,CAAEF,CAVV,CAWE,OAAO,CAAE,CAACC,CAAD,EAAaF,CAXxB,CAYE,QAAQ,CAAEK,CAZZ,CAaE,OAAO,CAAEC,CAbX,CAcE,QAAQ,CACNJ,CAAQ,EACN,oBAAC,QAAD,EACE,OAAO,CAAEF,CADX,CAEE,QAAQ,CAAEK,CAFZ,CAGE,IAAI,CAAEhB,eAAe,CAACc,CAAD,CAHvB,EAhBN,GAwBGJ,CAxBH,CA2BH,CA3C4D,CAAxD"}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["checked","name","size","view","align","disabled","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputRef"];import"./Switch.css";import React,{useRef}from"react";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{cnMixFocus}from"../../mixs/MixFocus/MixFocus";import{cn}from"../../utils/bem";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";import{switchPropAlignDefault,switchPropSizeDefault,switchPropViewDefault}from"./types";export var cnSwitch=cn("Switch");export var COMPONENT_NAME="Switch";export var Switch=React.forwardRef(function(a,b){var c=useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.checked,f=d.name,g=d.size,h=void 0===g?switchPropSizeDefault:g,i=d.view,j=void 0===i?switchPropViewDefault:i,k=d.align,l=void 0===k?switchPropAlignDefault:k,m=d.disabled,n=d.className,o=d.label,p=d.onChange,q=d.onFocus,r=d.onBlur,s=d.readOnly,t=d.required,u=d.step,v=d.tabIndex,w=d.inputRef,x=_objectWithoutProperties(d,_excluded);return React.createElement("label",Object.assign({},x,{className:cnSwitch({size:h,view:j,disabled:m,align:l},[n]),ref:useForkRef([c,b])}),React.createElement("input",{type:"checkbox",name:f,className:cnSwitch("Input",[cnMixFocus()]),checked:void 0!==e&&e,disabled:m,onChange:p,onFocus:q,onBlur:r,readOnly:s,required:t,step:u,tabIndex:v,ref:w}),o&&React.createElement("span",{className:cnSwitch("Label")},o))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["checked","name","size","view","align","disabled","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputRef"];import"./Switch.css";import React,{useRef}from"react";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{cnMixFocus}from"../../mixs/MixFocus/MixFocus";import{cn}from"../../utils/bem";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";import{switchPropAlignDefault,switchPropOnChangeDefault,switchPropSizeDefault,switchPropViewDefault}from"./types";export var cnSwitch=cn("Switch");export var COMPONENT_NAME="Switch";export var Switch=React.forwardRef(function(a,b){var c=useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.checked,f=d.name,g=d.size,h=void 0===g?switchPropSizeDefault:g,i=d.view,j=void 0===i?switchPropViewDefault:i,k=d.align,l=void 0===k?switchPropAlignDefault:k,m=d.disabled,n=d.className,o=d.label,p=d.onChange,q=void 0===p?switchPropOnChangeDefault:p,r=d.onFocus,s=d.onBlur,t=d.readOnly,u=d.required,v=d.step,w=d.tabIndex,x=d.inputRef,y=_objectWithoutProperties(d,_excluded);return React.createElement("label",Object.assign({},y,{className:cnSwitch({size:h,view:j,disabled:m,align:l},[n]),ref:useForkRef([c,b])}),React.createElement("input",{type:"checkbox",name:f,className:cnSwitch("Input",[cnMixFocus()]),checked:void 0!==e&&e,disabled:m,onChange:q,onFocus:r,onBlur:s,readOnly:t,required:u,step:v,tabIndex:w,ref:x}),o&&React.createElement("span",{className:cnSwitch("Label")},o))});
2
2
  //# sourceMappingURL=Switch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","names":["React","useRef","useForkRef","cnMixFocus","cn","usePropsHandler","switchPropAlignDefault","switchPropSizeDefault","switchPropViewDefault","cnSwitch","COMPONENT_NAME","Switch","forwardRef","props","ref","switchRef","checked","name","size","view","align","disabled","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputRef","otherProps"],"sources":["../../../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import './Switch.css';\n\nimport React, { useRef } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\nimport {\n switchPropAlignDefault,\n SwitchProps,\n switchPropSizeDefault,\n switchPropViewDefault,\n} from './types';\n\nexport const cnSwitch = cn('Switch');\n\nexport const COMPONENT_NAME = 'Switch' as const;\n\nexport const Switch = React.forwardRef<HTMLLabelElement, SwitchProps>(\n (props, ref) => {\n const switchRef = useRef<HTMLLabelElement>(null);\n const {\n checked = false,\n name,\n size = switchPropSizeDefault,\n view = switchPropViewDefault,\n align = switchPropAlignDefault,\n disabled,\n className,\n label,\n onChange,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, switchRef);\n\n return (\n <label\n {...otherProps}\n className={cnSwitch({ size, view, disabled, align }, [className])}\n ref={useForkRef([switchRef, ref])}\n >\n <input\n type=\"checkbox\"\n name={name}\n className={cnSwitch('Input', [cnMixFocus()])}\n checked={checked}\n disabled={disabled}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n tabIndex={tabIndex}\n ref={inputRef}\n />\n {label && <span className={cnSwitch('Label')}>{label}</span>}\n </label>\n );\n },\n);\n"],"mappings":"4PAAA,qBAEA,MAAOA,MAAP,EAAgBC,MAAhB,KAA8B,OAA9B,CAEA,OAASC,UAAT,yCACA,OAASC,UAA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AU,EAAX,CAAV,CAHrB,CAIE,OAAO,cAJT,CAKE,QAAQ,CAAEkB,CALZ,CAME,QAAQ,CAAEG,CANZ,CAOE,OAAO,CAAEC,CAPX,CAQE,MAAM,CAAEC,CARV,CASE,QAAQ,CAAEC,CATZ,CAUE,QAAQ,CAAEC,CAVZ,CAWE,IAAI,CAAEC,CAXR,CAYE,QAAQ,CAAEC,CAZZ,CAaE,GAAG,CAAEC,CAbP,EALF,CAoBGR,CAAK,EAAI,4BAAM,SAAS,CAAEd,QAAQ,CAAC,OAAD,CAAzB,EAAqCc,CAArC,CApBZ,CAuBH,CA/CmB,CAAf"}
1
+ {"version":3,"file":"Switch.js","names":["React","useRef","useForkRef","cnMixFocus","cn","usePropsHandler","switchPropAlignDefault","switchPropOnChangeDefault","switchPropSizeDefault","switchPropViewDefault","cnSwitch","COMPONENT_NAME","Switch","forwardRef","props","ref","switchRef","checked","name","size","view","align","disabled","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputRef","otherProps"],"sources":["../../../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import './Switch.css';\n\nimport React, { useRef } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\nimport {\n switchPropAlignDefault,\n switchPropOnChangeDefault,\n SwitchProps,\n switchPropSizeDefault,\n switchPropViewDefault,\n} from './types';\n\nexport const cnSwitch = cn('Switch');\n\nexport const COMPONENT_NAME = 'Switch' as const;\n\nexport const Switch = React.forwardRef<HTMLLabelElement, SwitchProps>(\n (props, ref) => {\n const switchRef = useRef<HTMLLabelElement>(null);\n const {\n checked = false,\n name,\n size = switchPropSizeDefault,\n view = switchPropViewDefault,\n align = switchPropAlignDefault,\n disabled,\n className,\n label,\n onChange = switchPropOnChangeDefault,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, switchRef);\n\n return (\n <label\n {...otherProps}\n className={cnSwitch({ size, view, disabled, align }, [className])}\n ref={useForkRef([switchRef, ref])}\n >\n <input\n type=\"checkbox\"\n name={name}\n className={cnSwitch('Input', [cnMixFocus()])}\n checked={checked}\n disabled={disabled}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n tabIndex={tabIndex}\n ref={inputRef}\n />\n {label && <span className={cnSwitch('Label')}>{label}</span>}\n </label>\n );\n },\n);\n"],"mappings":"4PAAA,qBAEA,MAAOA,MAAP,EAAgBC,MAAhB,KAA8B,OAA9B,CAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBACA,OAASC,eAAT,2CACA,OACEC,sBADF,CAEEC,yBAFF,CAIEC,qBAJF,CAKEC,qBALF,eAQA,MAAO,IAAMC,SAAQ,CAAGN,EAAE,CAAC,QAAD,CAAnB,CAEP,MAAO,IAAMO,eAAc,CAAG,QAAvB,CAEP,MAAO,IAAMC,OAAM,CAAGZ,KAAK,CAACa,UAAN,CACpB,SAACC,CAAD,CAAQC,CAAR,CAAgB,IACRC,EAAS,CAAGf,MAAM,CAAmB,IAAnB,CADV,GAoBVI,eAAe,CAACM,cAAD,CAAiBG,CAAjB,CAAwBE,CAAxB,CApBL,KAGZC,OAHY,CAIZC,CAJY,GAIZA,IAJY,KAKZC,IALY,CAKZA,CALY,YAKLX,qBALK,OAMZY,IANY,CAMZA,CANY,YAMLX,qBANK,OAOZY,KAPY,CAOZA,CAPY,YAOJf,sBAPI,GAQZgB,CARY,GAQZA,QARY,CASZC,CATY,GASZA,SATY,CAUZC,CAVY,GAUZA,KAVY,KAWZC,QAXY,CAWZA,CAXY,YAWDlB,yBAXC,GAYZmB,CAZY,GAYZA,OAZY,CAaZC,CAbY,GAaZA,MAbY,CAcZC,CAdY,GAcZA,QAdY,CAeZC,CAfY,GAeZA,QAfY,CAgBZC,CAhBY,GAgBZA,IAhBY,CAiBZC,CAjBY,GAiBZA,QAjBY,CAkBZC,CAlBY,GAkBZA,QAlBY,CAmBTC,CAnBS,uCAsBd,MACE,8CACMA,CADN,EAEE,SAAS,CAAEvB,QAAQ,CAAC,CAAES,IAAI,CAAJA,CAAF,CAAQC,IAAI,CAAJA,CAAR,CAAcE,QAAQ,CAARA,CAAd,CAAwBD,KAAK,CAALA,CAAxB,CAAD,CAAkC,CAACE,CAAD,CAAlC,CAFrB,CAGE,GAAG,CAAErB,UAAU,CAAC,CAACc,CAAD,CAAYD,CAAZ,CAAD,CAHjB,GAKE,6BACE,IAAI,CAAC,UADP,CAEE,IAAI,CAAEG,CAFR,CAGE,SAAS,CAAER,QAAQ,CAAC,OAAD,CAAU,CAACP,UAAU,EAAX,CAAV,CAHrB,CAIE,OAAO,cAJT,CAKE,QAAQ,CAAEmB,CALZ,CAME,QAAQ,CAAEG,CANZ,CAOE,OAAO,CAAEC,CAPX,CAQE,MAAM,CAAEC,CARV,CASE,QAAQ,CAAEC,CATZ,CAUE,QAAQ,CAAEC,CAVZ,CAWE,IAAI,CAAEC,CAXR,CAYE,QAAQ,CAAEC,CAZZ,CAaE,GAAG,CAAEC,CAbP,EALF,CAoBGR,CAAK,EAAI,4BAAM,SAAS,CAAEd,QAAQ,CAAC,OAAD,CAAzB,EAAqCc,CAArC,CApBZ,CAuBH,CA/CmB,CAAf"}
@@ -9,6 +9,7 @@ export declare const switchPropViewDefault: SwitchPropView;
9
9
  export declare const switchPropAlign: readonly ["center", "top"];
10
10
  export declare type SwitchPropAlign = typeof switchPropAlign[number];
11
11
  export declare const switchPropAlignDefault: SwitchPropAlign;
12
+ export declare const switchPropOnChangeDefault: () => void;
12
13
  export declare type SwitchPropOnChange = (checked: boolean, params: {
13
14
  e: React.ChangeEvent<HTMLInputElement>;
14
15
  }) => void;
@@ -1,2 +1,2 @@
1
- export var switchPropSize=["m","xs","s","l"];export var switchPropSizeDefault=switchPropSize[0];export var switchPropView=["primary","ghost"];export var switchPropViewDefault=switchPropView[0];export var switchPropAlign=["center","top"];export var switchPropAlignDefault=switchPropAlign[0];
1
+ export var switchPropSize=["m","xs","s","l"];export var switchPropSizeDefault=switchPropSize[0];export var switchPropView=["primary","ghost"];export var switchPropViewDefault=switchPropView[0];export var switchPropAlign=["center","top"];export var switchPropAlignDefault=switchPropAlign[0];export var switchPropOnChangeDefault=function(){};
2
2
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["switchPropSize","switchPropSizeDefault","switchPropView","switchPropViewDefault","switchPropAlign","switchPropAlignDefault"],"sources":["../../../../../src/components/Switch/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const switchPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type SwitchPropSize = typeof switchPropSize[number];\nexport const switchPropSizeDefault: SwitchPropSize = switchPropSize[0];\n\nexport const switchPropView = ['primary', 'ghost'] as const;\nexport type SwitchPropView = typeof switchPropView[number];\nexport const switchPropViewDefault: SwitchPropView = switchPropView[0];\n\nexport const switchPropAlign = ['center', 'top'] as const;\nexport type SwitchPropAlign = typeof switchPropAlign[number];\nexport const switchPropAlignDefault: SwitchPropAlign = switchPropAlign[0];\n\nexport type SwitchPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchProps = PropsWithHTMLAttributes<\n {\n checked: boolean | undefined;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n align?: SwitchPropAlign;\n disabled?: boolean;\n className?: string;\n label?: string;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n },\n HTMLLabelElement\n>;\n"],"mappings":"AAEA,MAAO,IAAMA,eAAc,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,QAAD,CAAW,KAAX,CAAxB,CAEP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D"}
1
+ {"version":3,"file":"types.js","names":["switchPropSize","switchPropSizeDefault","switchPropView","switchPropViewDefault","switchPropAlign","switchPropAlignDefault","switchPropOnChangeDefault"],"sources":["../../../../../src/components/Switch/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const switchPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type SwitchPropSize = typeof switchPropSize[number];\nexport const switchPropSizeDefault: SwitchPropSize = switchPropSize[0];\n\nexport const switchPropView = ['primary', 'ghost'] as const;\nexport type SwitchPropView = typeof switchPropView[number];\nexport const switchPropViewDefault: SwitchPropView = switchPropView[0];\n\nexport const switchPropAlign = ['center', 'top'] as const;\nexport type SwitchPropAlign = typeof switchPropAlign[number];\nexport const switchPropAlignDefault: SwitchPropAlign = switchPropAlign[0];\n\nexport const switchPropOnChangeDefault = () => {};\n\nexport type SwitchPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchProps = PropsWithHTMLAttributes<\n {\n checked: boolean | undefined;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n align?: SwitchPropAlign;\n disabled?: boolean;\n className?: string;\n label?: string;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n },\n HTMLLabelElement\n>;\n"],"mappings":"AAEA,MAAO,IAAMA,eAAc,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,QAAD,CAAW,KAAX,CAAxB,CAEP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D,CAEP,MAAO,IAAME,0BAAyB,CAAG,UAAM,CAAE,CAA1C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "keywords": [
5
5
  "ui-kit",
6
6
  "design-system",
@@ -22,8 +22,8 @@
22
22
  "react": ">= 16.8.0",
23
23
  "react-dom": ">= 16.8.0",
24
24
  "react-dropzone": "11.3.4",
25
- "react-textarea-autosize": "^8.5.3",
26
25
  "react-imask": "^7.2.1",
26
+ "react-textarea-autosize": "^8.5.3",
27
27
  "react-transition-group": "^4.4.5"
28
28
  },
29
29
  "files": [