1 |
- {"ast":null,"code":"import { genStyleHooks, mergeToken } from '../../theme/internal';\nimport { initComponentToken, initInputToken } from './token';\nexport { initComponentToken, initInputToken };\nconst genTextAreaStyle = token => {\n const {\n componentCls,\n paddingLG\n } = token;\n const textareaPrefixCls = `${componentCls}-textarea`;\n return {\n // Raw Textarea\n [`textarea${componentCls}`]: {\n maxWidth: '100%',\n // prevent textarea resize from coming out of its container\n height: 'auto',\n minHeight: token.controlHeight,\n lineHeight: token.lineHeight,\n verticalAlign: 'bottom',\n transition: `all ${token.motionDurationSlow}`,\n resize: 'vertical',\n [`&${componentCls}-mouse-active`]: {\n transition: `all ${token.motionDurationSlow}, height 0s, width 0s`\n }\n },\n // Wrapper for resize\n [`${componentCls}-textarea-affix-wrapper-resize-dirty`]: {\n width: 'auto'\n },\n [textareaPrefixCls]: {\n position: 'relative',\n '&-show-count': {\n [`${componentCls}-data-count`]: {\n position: 'absolute',\n bottom: token.calc(token.fontSize).mul(token.lineHeight).mul(-1).equal(),\n insetInlineEnd: 0,\n color: token.colorTextDescription,\n whiteSpace: 'nowrap',\n pointerEvents: 'none'\n }\n },\n [`\n &-allow-clear > ${componentCls},\n &-affix-wrapper${textareaPrefixCls}-has-feedback ${componentCls}\n `]: {\n paddingInlineEnd: paddingLG\n },\n [`&-affix-wrapper${componentCls}-affix-wrapper`]: {\n padding: 0,\n [`> textarea${componentCls}`]: {\n fontSize: 'inherit',\n border: 'none',\n outline: 'none',\n background: 'transparent',\n minHeight: token.calc(token.controlHeight).sub(token.calc(token.lineWidth).mul(2)).equal(),\n '&:focus': {\n boxShadow: 'none !important'\n }\n },\n [`${componentCls}-suffix`]: {\n margin: 0,\n '> *:not(:last-child)': {\n marginInline: 0\n },\n // Clear Icon\n [`${componentCls}-clear-icon`]: {\n position: 'absolute',\n insetInlineEnd: token.paddingInline,\n insetBlockStart: token.paddingXS\n },\n // Feedback Icon\n [`${textareaPrefixCls}-suffix`]: {\n position: 'absolute',\n top: 0,\n insetInlineEnd: token.paddingInline,\n bottom: 0,\n zIndex: 1,\n display: 'inline-flex',\n alignItems: 'center',\n margin: 'auto',\n pointerEvents: 'none'\n }\n }\n },\n [`&-affix-wrapper${componentCls}-affix-wrapper-rtl`]: {\n [`${componentCls}-suffix`]: {\n [`${componentCls}-data-count`]: {\n direction: 'ltr',\n insetInlineStart: 0\n }\n }\n },\n [`&-affix-wrapper${componentCls}-affix-wrapper-sm`]: {\n [`${componentCls}-suffix`]: {\n [`${componentCls}-clear-icon`]: {\n insetInlineEnd: token.paddingInlineSM\n }\n }\n }\n }\n };\n};\n// ============================== Export ==============================\nexport default genStyleHooks(['Input', 'TextArea'], token => {\n const inputToken = mergeToken(token, initInputToken(token));\n return genTextAreaStyle(inputToken);\n}, initComponentToken, {\n resetFont: false\n});","map":{"version":3,"names":["genStyleHooks","mergeToken","initComponentToken","initInputToken","genTextAreaStyle","token","componentCls","paddingLG","textareaPrefixCls","maxWidth","height","minHeight","controlHeight","lineHeight","verticalAlign","transition","motionDurationSlow","resize","width","position","bottom","calc","fontSize","mul","equal","insetInlineEnd","color","colorTextDescription","whiteSpace","pointerEvents","paddingInlineEnd","padding","border","outline","background","sub","lineWidth","boxShadow","margin","marginInline","paddingInline","insetBlockStart","paddingXS","top","zIndex","display","alignItems","direction","insetInlineStart","paddingInlineSM","inputToken","resetFont"],"sources":["/Users/max_liu/max_liu/company/tools_auto_pt/node_modules/antd/es/input/style/textarea.js"],"sourcesContent":["import { genStyleHooks, mergeToken } from '../../theme/internal';\nimport { initComponentToken, initInputToken } from './token';\nexport { initComponentToken, initInputToken };\nconst genTextAreaStyle = token => {\n const {\n componentCls,\n paddingLG\n } = token;\n const textareaPrefixCls = `${componentCls}-textarea`;\n return {\n // Raw Textarea\n [`textarea${componentCls}`]: {\n maxWidth: '100%',\n // prevent textarea resize from coming out of its container\n height: 'auto',\n minHeight: token.controlHeight,\n lineHeight: token.lineHeight,\n verticalAlign: 'bottom',\n transition: `all ${token.motionDurationSlow}`,\n resize: 'vertical',\n [`&${componentCls}-mouse-active`]: {\n transition: `all ${token.motionDurationSlow}, height 0s, width 0s`\n }\n },\n // Wrapper for resize\n [`${componentCls}-textarea-affix-wrapper-resize-dirty`]: {\n width: 'auto'\n },\n [textareaPrefixCls]: {\n position: 'relative',\n '&-show-count': {\n [`${componentCls}-data-count`]: {\n position: 'absolute',\n bottom: token.calc(token.fontSize).mul(token.lineHeight).mul(-1).equal(),\n insetInlineEnd: 0,\n color: token.colorTextDescription,\n whiteSpace: 'nowrap',\n pointerEvents: 'none'\n }\n },\n [`\n &-allow-clear > ${componentCls},\n &-affix-wrapper${textareaPrefixCls}-has-feedback ${componentCls}\n `]: {\n paddingInlineEnd: paddingLG\n },\n [`&-affix-wrapper${componentCls}-affix-wrapper`]: {\n padding: 0,\n [`> textarea${componentCls}`]: {\n fontSize: 'inherit',\n border: 'none',\n outline: 'none',\n background: 'transparent',\n minHeight: token.calc(token.controlHeight).sub(token.calc(token.lineWidth).mul(2)).equal(),\n '&:focus': {\n boxShadow: 'none !important'\n }\n },\n [`${componentCls}-suffix`]: {\n margin: 0,\n '> *:not(:last-child)': {\n marginInline: 0\n },\n // Clear Icon\n [`${componentCls}-clear-icon`]: {\n position: 'absolute',\n insetInlineEnd: token.paddingInline,\n insetBlockStart: token.paddingXS\n },\n // Feedback Icon\n [`${textareaPrefixCls}-suffix`]: {\n position: 'absolute',\n top: 0,\n insetInlineEnd: token.paddingInline,\n bottom: 0,\n zIndex: 1,\n display: 'inline-flex',\n alignItems: 'center',\n margin: 'auto',\n pointerEvents: 'none'\n }\n }\n },\n [`&-affix-wrapper${componentCls}-affix-wrapper-rtl`]: {\n [`${componentCls}-suffix`]: {\n [`${componentCls}-data-count`]: {\n direction: 'ltr',\n insetInlineStart: 0\n }\n }\n },\n [`&-affix-wrapper${componentCls}-affix-wrapper-sm`]: {\n [`${componentCls}-suffix`]: {\n [`${componentCls}-clear-icon`]: {\n insetInlineEnd: token.paddingInlineSM\n }\n }\n }\n }\n };\n};\n// ============================== Export ==============================\nexport default genStyleHooks(['Input', 'TextArea'], token => {\n const inputToken = mergeToken(token, initInputToken(token));\n return genTextAreaStyle(inputToken);\n}, initComponentToken, {\n resetFont: false\n});"],"mappings":"AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,sBAAsB;AAChE,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,SAAS;AAC5D,SAASD,kBAAkB,EAAEC,cAAc;AAC3C,MAAMC,gBAAgB,GAAGC,KAAK,IAAI;EAChC,MAAM;IACJC,YAAY;IACZC;EACF,CAAC,GAAGF,KAAK;EACT,MAAMG,iBAAiB,GAAG,GAAGF,YAAY,WAAW;EACpD,OAAO;IACL;IACA,CAAC,WAAWA,YAAY,EAAE,GAAG;MAC3BG,QAAQ,EAAE,MAAM;MAChB;MACAC,MAAM,EAAE,MAAM;MACdC,SAAS,EAAEN,KAAK,CAACO,aAAa;MAC9BC,UAAU,EAAER,KAAK,CAACQ,UAAU;MAC5BC,aAAa,EAAE,QAAQ;MACvBC,UAAU,EAAE,OAAOV,KAAK,CAACW,kBAAkB,EAAE;MAC7CC,MAAM,EAAE,UAAU;MAClB,CAAC,IAAIX,YAAY,eAAe,GAAG;QACjCS,UAAU,EAAE,OAAOV,KAAK,CAACW,kBAAkB;MAC7C;IACF,CAAC;IACD;IACA,CAAC,GAAGV,YAAY,sCAAsC,GAAG;MACvDY,KAAK,EAAE;IACT,CAAC;IACD,CAACV,iBAAiB,GAAG;MACnBW,QAAQ,EAAE,UAAU;MACpB,cAAc,EAAE;QACd,CAAC,GAAGb,YAAY,aAAa,GAAG;UAC9Ba,QAAQ,EAAE,UAAU;UACpBC,MAAM,EAAEf,KAAK,CAACgB,IAAI,CAAChB,KAAK,CAACiB,QAAQ,CAAC,CAACC,GAAG,CAAClB,KAAK,CAACQ,UAAU,CAAC,CAACU,GAAG,CAAC,CAAC,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC;UACxEC,cAAc,EAAE,CAAC;UACjBC,KAAK,EAAErB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