1 line
5.7 KiB
JSON
1 line
5.7 KiB
JSON
|
{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport classNames from 'classnames';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport { FormItemInputContext } from '../form/context';\nimport useStyle from './style';\nconst Group = props => {\n const {\n getPrefixCls,\n direction\n } = useContext(ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className\n } = props;\n const prefixCls = getPrefixCls('input-group', customizePrefixCls);\n const inputPrefixCls = getPrefixCls('input');\n const [wrapCSSVar, hashId] = useStyle(inputPrefixCls);\n const cls = classNames(prefixCls, {\n [`${prefixCls}-lg`]: props.size === 'large',\n [`${prefixCls}-sm`]: props.size === 'small',\n [`${prefixCls}-compact`]: props.compact,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, hashId, className);\n const formItemContext = useContext(FormItemInputContext);\n const groupFormItemContext = useMemo(() => Object.assign(Object.assign({}, formItemContext), {\n isFormItemInput: false\n }), [formItemContext]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Input.Group');\n warning.deprecated(false, 'Input.Group', 'Space.Compact');\n }\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\", {\n className: cls,\n style: props.style,\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n onFocus: props.onFocus,\n onBlur: props.onBlur\n }, /*#__PURE__*/React.createElement(FormItemInputContext.Provider, {\n value: groupFormItemContext\n }, props.children)));\n};\nexport default Group;","map":{"version":3,"names":["React","useContext","useMemo","classNames","devUseWarning","ConfigContext","FormItemInputContext","useStyle","Group","props","getPrefixCls","direction","prefixCls","customizePrefixCls","className","inputPrefixCls","wrapCSSVar","hashId","cls","size","compact","formItemContext","groupFormItemContext","Object","assign","isFormItemInput","process","env","NODE_ENV","warning","deprecated","createElement","style","onMouseEnter","onMouseLeave","onFocus","onBlur","Provider","value","children"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/input/Group.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport classNames from 'classnames';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport { FormItemInputContext } from '../form/context';\nimport useStyle from './style';\nconst Group = props => {\n const {\n getPrefixCls,\n direction\n } = useContext(ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className\n } = props;\n const prefixCls = getPrefixCls('input-group', customizePrefixCls);\n const inputPrefixCls = getPrefixCls('input');\n const [wrapCSSVar, hashId] = useStyle(inputPrefixCls);\n const cls = classNames(prefixCls, {\n [`${prefixCls}-lg`]: props.size === 'large',\n [`${prefixCls}-sm`]: props.size === 'small',\n [`${prefixCls}-compact`]: props.compact,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, hashId, className);\n const formItemContext = useContext(FormItemInputContext);\n const groupFormItemContext = useMemo(() => Object.assign(Object.assign({}, formItemContext), {\n isFormItemInput: false\n }), [formItemContext]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Input.Group');\n warning.deprecated(false, 'Input.Group', 'Space.Compact');\n }\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\", {\n className: cls,\n style: props.style,\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n onFocus: props.onFocus,\n onBlur: props.onBlur\n }, /*#__PURE__*/React.createElement(FormItemInputContext.Provider, {\n value: groupFormItemContext\n }, props.children)));\n};\nexport de
|