@salutejs/plasma-new-hope 0.189.0-canary.1551.11792996525.0 → 0.189.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. package/cjs/components/TextArea/TextArea.js +1 -1
  2. package/cjs/components/TextArea/TextArea.js.map +1 -1
  3. package/cjs/components/TextArea/hooks/useAutoResize.js +3 -3
  4. package/cjs/components/TextArea/hooks/useAutoResize.js.map +1 -1
  5. package/emotion/cjs/components/TextArea/TextArea.js +2 -2
  6. package/emotion/cjs/components/TextArea/hooks/useAutoResize.js +3 -3
  7. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +16 -16
  8. package/emotion/es/components/TextArea/TextArea.js +2 -2
  9. package/emotion/es/components/TextArea/hooks/useAutoResize.js +3 -3
  10. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +16 -16
  11. package/es/components/TextArea/TextArea.js +1 -1
  12. package/es/components/TextArea/TextArea.js.map +1 -1
  13. package/es/components/TextArea/hooks/useAutoResize.js +3 -3
  14. package/es/components/TextArea/hooks/useAutoResize.js.map +1 -1
  15. package/package.json +2 -2
  16. package/styled-components/cjs/components/TextArea/TextArea.js +1 -1
  17. package/styled-components/cjs/components/TextArea/hooks/useAutoResize.js +3 -3
  18. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +4 -4
  19. package/styled-components/es/components/TextArea/TextArea.js +1 -1
  20. package/styled-components/es/components/TextArea/hooks/useAutoResize.js +3 -3
  21. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +4 -4
  22. package/types/components/TextArea/hooks/useAutoResize.d.ts +1 -1
  23. package/types/components/TextArea/hooks/useAutoResize.d.ts.map +1 -1
  24. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
@@ -178,7 +178,7 @@ var textAreaRoot = function textAreaRoot(Root) {
178
178
  setHelperWidth("".concat(elementWidth / useAutoResize.ROOT_FONT_SIZE, "rem"));
179
179
  }
180
180
  });
181
- useAutoResize.useAutoResize(autoResize || Boolean(clear), outerRef, value, minAuto, maxAuto);
181
+ useAutoResize.useAutoResize(autoResize || Boolean(clear), outerRef, value, minAuto, maxAuto, resize);
182
182
  var onFocusHandler = React.useCallback(function () {
183
183
  setFocused(true);
184
184
  }, []);
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import React, { forwardRef, useState, createRef, useCallback, useRef, MouseEventHandler } from 'react';\nimport { css } from '@linaria/core';\nimport { useForkRef, useResizeObserver } from '@salutejs/plasma-core';\n\nimport { cx, mergeRefs } from '../../utils';\nimport type { RootProps } from '../../engines/types';\nimport { useOutsideClick } from '../../hooks';\n\nimport { applyDynamicLabel } from './mixins';\nimport { useAutoResize, ROOT_FONT_SIZE } from './hooks';\nimport {\n StyledContent,\n StyledHelpers,\n StyledLeftHelper,\n StyledRightHelper,\n StyledLabel,\n StyledPlaceholder,\n StyledTextArea,\n StyledTextAreaWrapper,\n StyledContainer,\n StyledIndicator,\n StyledOptionalText,\n OuterLabelWrapper,\n StyledIndicatorWrapper,\n StyledHintWrapper,\n TitleCaption,\n} from './TextArea.styles';\nimport { classes } from './TextArea.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as hintViewCSS } from './variations/_hint-view/base';\nimport { base as hintSizeCSS } from './variations/_hint-size/base';\nimport type { TextAreaProps, TextAreaRootProps } from './TextArea.types';\nimport { HintComponent } from './ui/Hint/Hint';\n\nconst {\n innerPlaceholderUp,\n focusedOuterPlaceholderColor,\n hidePlaceHolder,\n styledContainer,\n styledTextArea,\n styledTextAreaWrapper,\n styledPlaceholder,\n styledHelpers,\n} = classes;\n\nconst optionalText = 'optional';\n\nconst base = css`\n ${applyDynamicLabel};\n\n position: relative;\n box-sizing: border-box;\n`;\n\n// TODO: Удалить после отказа от старых библиотек plasma-web / plasma-b2c\nconst fallbackStatusMap = {\n '': 'primary',\n success: 'positive',\n warning: 'warning',\n error: 'negative',\n};\n\nconst HINT_DEFAULT_OFFSET: [number, number] = [0, 0];\n\n// TODO: Перенести этот метод в файл applyDynamicLabel.ts\nexport const getDynamicLabelClasses = (props: TextAreaProps, focused: boolean) => {\n const { readOnly, label, labelPlacement, rows, value, size } = props;\n\n // Добавить класс отвечающий за изменение цвета плейсхолдера при фокусе\n const withFocusedOuterUpPlaceholder =\n !readOnly && focused && (!label || labelPlacement === 'outer') ? focusedOuterPlaceholderColor : undefined;\n\n // Добавить класс отвечающий за поднятие и уменьшение плейсхолдера\n const withInnerPlaceholderUp =\n labelPlacement === 'inner' &&\n label &&\n !rows &&\n size !== 'xs' &&\n ((!readOnly && (value || focused)) || (readOnly && value))\n ? innerPlaceholderUp\n : undefined;\n\n // Добавить класс отвечающий за скрытие плейсхолдера\n const withHidePlaceholder =\n (value && !label) ||\n (labelPlacement === 'inner' && ((focused && !readOnly) || value) && label && rows) ||\n (labelPlacement === 'outer' && value) ||\n (labelPlacement === 'inner' && size === 'xs' && value)\n ? hidePlaceHolder\n : undefined;\n\n return [withFocusedOuterUpPlaceholder, withInnerPlaceholderUp, withHidePlaceholder];\n};\n\nexport const textAreaRoot = (Root: RootProps<HTMLTextAreaElement, TextAreaRootProps>) =>\n forwardRef<HTMLTextAreaElement, TextAreaProps>((props, innerRef) => {\n const {\n helperText,\n status,\n resize,\n rightHelper,\n leftHelper,\n contentRight,\n autoResize = false,\n minAuto = 0,\n maxAuto,\n label,\n labelPlacement = 'inner',\n titleCaption,\n placeholder,\n defaultValue,\n height,\n width,\n value,\n disabled,\n required = false,\n requiredPlacement = 'right',\n optional = false,\n clear,\n hasDivider,\n size,\n view,\n id,\n style,\n className,\n readOnly,\n rows,\n cols,\n hintTrigger = 'hover',\n hintText,\n hintView = 'default',\n hintSize = 'm',\n hintTargetIcon,\n hintPlacement = 'auto',\n hintHasArrow,\n hintOffset = HINT_DEFAULT_OFFSET,\n hintWidth,\n hintContentLeft,\n onChange,\n ...rest\n } = props;\n\n const [isHintVisible, setIsHintVisible] = useState(false);\n const [helperWidth, setHelperWidth] = useState<string>(width ? `${width}rem` : '100%');\n const [focused, setFocused] = useState(false);\n const [uncontrolledValue, setUncontrolledValue] = useState<string | undefined>();\n\n const outerRef = createRef<HTMLTextAreaElement>();\n\n const hintRef = useOutsideClick<HTMLDivElement>(() => {\n setIsHintVisible(false);\n });\n const hintInnerRef = useRef<HTMLDivElement>(null);\n const hintForkRef = useForkRef(hintRef, hintInnerRef);\n\n const innerOptional = required ? false : optional;\n const hasHelper = Boolean(leftHelper || rightHelper || helperText);\n const hasOuterLabel = Boolean(label && labelPlacement === 'outer');\n const hasInnerLabel = Boolean(label && labelPlacement === 'inner' && size !== 'xs');\n const hasPlaceholderOptional = innerOptional && !hasOuterLabel;\n\n const overriddenView = status !== undefined ? fallbackStatusMap[status] : view;\n const textareaHelperId = id ? `${id}-helper` : undefined;\n const applyCustomWidth = resize !== 'horizontal' && resize !== 'both' && !cols;\n const placeholderLabel = hasInnerLabel ? label : placeholder;\n\n const clearClass = clear ? classes.clear : undefined;\n const hasHintClass = hintText ? classes.hasHint : undefined;\n const hasRightContentClass = contentRight ? classes.hasRightContent : undefined;\n const hasDividerClass = hasDivider ? classes.hasDivider : undefined;\n const requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;\n\n const handleHintShow = () => setIsHintVisible(true);\n const handleHintHide = () => setIsHintVisible(false);\n const handleHintClick: MouseEventHandler = (event) => {\n if (!hintText || hintTrigger !== 'click') {\n return;\n }\n\n event.stopPropagation();\n const targetIsPopover = event.target === hintInnerRef.current;\n const rootHasTarget = hintInnerRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n setIsHintVisible(true);\n }\n };\n\n useResizeObserver(outerRef, (currentElement) => {\n const { width: inlineWidth } = currentElement.style;\n\n if (inlineWidth || cols) {\n const { width: elementWidth } = currentElement.getBoundingClientRect();\n setHelperWidth(`${elementWidth / ROOT_FONT_SIZE}rem`);\n }\n });\n\n useAutoResize(autoResize || Boolean(clear), outerRef, value, minAuto, maxAuto);\n\n const onFocusHandler = useCallback(() => {\n setFocused(true);\n }, []);\n\n const onBlurHandler = useCallback(() => {\n setFocused(false);\n }, []);\n\n const onChangeHandler = useCallback(\n (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n // INFO: Для крайне редких кейсов, когда value снаружи не контролируется\n if (value === undefined) {\n setUncontrolledValue(event?.target.value);\n }\n\n onChange?.(event);\n },\n [value, onChange],\n );\n\n const handleTextAreaFocus = () => {\n if (readOnly || disabled || !outerRef?.current) {\n return;\n }\n\n outerRef.current.scrollTo({\n top: 0,\n left: outerRef.current.offsetLeft,\n behavior: 'smooth',\n });\n\n outerRef.current.focus();\n };\n\n const dynamicLabelClasses = getDynamicLabelClasses(\n {\n size,\n readOnly,\n label,\n labelPlacement,\n value: value || uncontrolledValue || defaultValue,\n rows,\n },\n focused,\n );\n\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText inheritFont={!hasOuterLabel}>\n {Boolean(hasPlaceholderOptional ? placeholderLabel : label) && '\\xa0'}\n {optionalText}\n </StyledOptionalText>\n ) : null;\n\n return (\n <Root\n view={overriddenView}\n size={size}\n disabled={disabled}\n readOnly={readOnly}\n clear={clear}\n style={{ width: helperWidth, ...style }}\n className={cx(clearClass, hasDividerClass, hasHintClass, className)}\n onClick={handleTextAreaFocus}\n {...(hintText && { hintView, hintSize })}\n >\n {(hasOuterLabel || titleCaption) && (\n <OuterLabelWrapper isInnerLabel={labelPlacement === 'inner'}>\n {hasOuterLabel && (\n <StyledIndicatorWrapper>\n <StyledLabel>{label}</StyledLabel>\n\n {hintText && (\n <StyledHintWrapper>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n {required && (\n <StyledIndicator\n className={cx(\n classes.outerLabelPlacement,\n requiredPlacementClass,\n hasHintClass,\n )}\n />\n )}\n {optionalTextNode}\n </StyledIndicatorWrapper>\n )}\n {titleCaption && <TitleCaption>{titleCaption}</TitleCaption>}\n </OuterLabelWrapper>\n )}\n <StyledContainer\n className={cx(styledContainer, ...dynamicLabelClasses)}\n width={helperWidth}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n >\n {!hasOuterLabel && (\n <>\n {required && (\n <StyledIndicator className={cx(classes.innerLabelPlacement, requiredPlacementClass)} />\n )}\n {hintText && (\n <StyledHintWrapper className={classes.innerLabelPlacement}>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n </>\n )}\n {contentRight && <StyledContent>{contentRight}</StyledContent>}\n <StyledTextAreaWrapper className={styledTextAreaWrapper} hasHelper={hasHelper}>\n <StyledTextArea\n className={cx(styledTextArea, hasRightContentClass)}\n id={id}\n hasContentRight={Boolean(contentRight)}\n hasHelper={hasHelper}\n applyCustomWidth={applyCustomWidth}\n ref={mergeRefs(outerRef, innerRef)}\n disabled={disabled}\n height={autoResize || Boolean(clear) ? minAuto : height}\n width={width}\n placeholder={placeholderLabel}\n aria-describedby={textareaHelperId}\n value={value}\n readOnly={readOnly}\n rows={rows}\n cols={cols}\n resize={resize}\n defaultValue={defaultValue}\n onChange={onChangeHandler}\n {...rest}\n />\n </StyledTextAreaWrapper>\n {hasHelper && (\n <StyledHelpers className={styledHelpers} id={textareaHelperId}>\n {(leftHelper || helperText) && (\n <StyledLeftHelper>{leftHelper || helperText}</StyledLeftHelper>\n )}\n {rightHelper && <StyledRightHelper>{rightHelper}</StyledRightHelper>}\n </StyledHelpers>\n )}\n {placeholderLabel && (\n <StyledPlaceholder\n hasContentRight={Boolean(contentRight)}\n className={styledPlaceholder}\n htmlFor={id}\n >\n {placeholderLabel}\n {!hasOuterLabel && optionalTextNode}\n </StyledPlaceholder>\n )}\n </StyledContainer>\n </Root>\n );\n });\n\nexport const textAreaConfig = {\n name: 'TextArea',\n tag: 'div',\n layout: textAreaRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n attrs: true,\n },\n hintView: {\n css: hintViewCSS,\n },\n hintSize: {\n css: hintSizeCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'primary',\n },\n};\n"],"names":["innerPlaceholderUp","classes","focusedOuterPlaceholderColor","hidePlaceHolder","styledContainer","styledTextArea","styledTextAreaWrapper","styledPlaceholder","styledHelpers","optionalText","base","fallbackStatusMap","success","warning","error","HINT_DEFAULT_OFFSET","getDynamicLabelClasses","props","focused","readOnly","label","labelPlacement","rows","value","size","withFocusedOuterUpPlaceholder","undefined","withInnerPlaceholderUp","withHidePlaceholder","textAreaRoot","Root","forwardRef","innerRef","helperText","status","resize","rightHelper","leftHelper","contentRight","_props$autoResize","autoResize","_props$minAuto","minAuto","maxAuto","_props$labelPlacement","titleCaption","placeholder","defaultValue","height","width","disabled","_props$required","required","_props$requiredPlacem","requiredPlacement","_props$optional","optional","clear","hasDivider","view","id","style","className","cols","_props$hintTrigger","hintTrigger","hintText","_props$hintView","hintView","_props$hintSize","hintSize","hintTargetIcon","_props$hintPlacement","hintPlacement","hintHasArrow","_props$hintOffset","hintOffset","hintWidth","hintContentLeft","onChange","rest","_excluded","_useState","useState","_useState2","_slicedToArray","isHintVisible","setIsHintVisible","_useState3","concat","_useState4","helperWidth","setHelperWidth","_useState5","_useState6","setFocused","_useState7","_useState8","uncontrolledValue","setUncontrolledValue","outerRef","createRef","hintRef","useOutsideClick","hintInnerRef","useRef","hintForkRef","useForkRef","innerOptional","hasHelper","Boolean","hasOuterLabel","hasInnerLabel","hasPlaceholderOptional","overriddenView","textareaHelperId","applyCustomWidth","placeholderLabel","clearClass","hasHintClass","hasHint","hasRightContentClass","hasRightContent","hasDividerClass","requiredPlacementClass","requiredAlignRight","handleHintShow","handleHintHide","handleHintClick","event","_hintInnerRef$current","stopPropagation","targetIsPopover","target","current","rootHasTarget","contains","useResizeObserver","currentElement","inlineWidth","_currentElement$getBo","getBoundingClientRect","elementWidth","ROOT_FONT_SIZE","useAutoResize","onFocusHandler","useCallback","onBlurHandler","onChangeHandler","handleTextAreaFocus","scrollTo","top","left","offsetLeft","behavior","focus","dynamicLabelClasses","optionalTextNode","React","createElement","StyledOptionalText","inheritFont","_extends","_objectSpread","cx","onClick","OuterLabelWrapper","isInnerLabel","StyledIndicatorWrapper","StyledLabel","StyledHintWrapper","HintComponent","ref","StyledIndicator","outerLabelPlacement","TitleCaption","StyledContainer","apply","_toConsumableArray","onFocus","onBlur","Fragment","innerLabelPlacement","StyledContent","StyledTextAreaWrapper","StyledTextArea","hasContentRight","mergeRefs","StyledHelpers","StyledLeftHelper","StyledRightHelper","StyledPlaceholder","htmlFor","textAreaConfig","name","tag","layout","variations","css","sizeCSS","viewCSS","clearCSS","attrs","disabledCSS","hintViewCSS","hintSizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqCA,IACIA,kBAAkB,GAQlBC,uBAAO,CARPD,kBAAkB;EAClBE,4BAA4B,GAO5BD,uBAAO,CAPPC,4BAA4B;EAC5BC,eAAe,GAMfF,uBAAO,CANPE,eAAe;EACfC,eAAe,GAKf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":["import React, { forwardRef, useState, createRef, useCallback, useRef, MouseEventHandler } from 'react';\nimport { css } from '@linaria/core';\nimport { useForkRef, useResizeObserver } from '@salutejs/plasma-core';\n\nimport { cx, mergeRefs } from '../../utils';\nimport type { RootProps } from '../../engines/types';\nimport { useOutsideClick } from '../../hooks';\n\nimport { applyDynamicLabel } from './mixins';\nimport { useAutoResize, ROOT_FONT_SIZE } from './hooks';\nimport {\n StyledContent,\n StyledHelpers,\n StyledLeftHelper,\n StyledRightHelper,\n StyledLabel,\n StyledPlaceholder,\n StyledTextArea,\n StyledTextAreaWrapper,\n StyledContainer,\n StyledIndicator,\n StyledOptionalText,\n OuterLabelWrapper,\n StyledIndicatorWrapper,\n StyledHintWrapper,\n TitleCaption,\n} from './TextArea.styles';\nimport { classes } from './TextArea.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as hintViewCSS } from './variations/_hint-view/base';\nimport { base as hintSizeCSS } from './variations/_hint-size/base';\nimport type { TextAreaProps, TextAreaRootProps } from './TextArea.types';\nimport { HintComponent } from './ui/Hint/Hint';\n\nconst {\n innerPlaceholderUp,\n focusedOuterPlaceholderColor,\n hidePlaceHolder,\n styledContainer,\n styledTextArea,\n styledTextAreaWrapper,\n styledPlaceholder,\n styledHelpers,\n} = classes;\n\nconst optionalText = 'optional';\n\nconst base = css`\n ${applyDynamicLabel};\n\n position: relative;\n box-sizing: border-box;\n`;\n\n// TODO: Удалить после отказа от старых библиотек plasma-web / plasma-b2c\nconst fallbackStatusMap = {\n '': 'primary',\n success: 'positive',\n warning: 'warning',\n error: 'negative',\n};\n\nconst HINT_DEFAULT_OFFSET: [number, number] = [0, 0];\n\n// TODO: Перенести этот метод в файл applyDynamicLabel.ts\nexport const getDynamicLabelClasses = (props: TextAreaProps, focused: boolean) => {\n const { readOnly, label, labelPlacement, rows, value, size } = props;\n\n // Добавить класс отвечающий за изменение цвета плейсхолдера при фокусе\n const withFocusedOuterUpPlaceholder =\n !readOnly && focused && (!label || labelPlacement === 'outer') ? focusedOuterPlaceholderColor : undefined;\n\n // Добавить класс отвечающий за поднятие и уменьшение плейсхолдера\n const withInnerPlaceholderUp =\n labelPlacement === 'inner' &&\n label &&\n !rows &&\n size !== 'xs' &&\n ((!readOnly && (value || focused)) || (readOnly && value))\n ? innerPlaceholderUp\n : undefined;\n\n // Добавить класс отвечающий за скрытие плейсхолдера\n const withHidePlaceholder =\n (value && !label) ||\n (labelPlacement === 'inner' && ((focused && !readOnly) || value) && label && rows) ||\n (labelPlacement === 'outer' && value) ||\n (labelPlacement === 'inner' && size === 'xs' && value)\n ? hidePlaceHolder\n : undefined;\n\n return [withFocusedOuterUpPlaceholder, withInnerPlaceholderUp, withHidePlaceholder];\n};\n\nexport const textAreaRoot = (Root: RootProps<HTMLTextAreaElement, TextAreaRootProps>) =>\n forwardRef<HTMLTextAreaElement, TextAreaProps>((props, innerRef) => {\n const {\n helperText,\n status,\n resize,\n rightHelper,\n leftHelper,\n contentRight,\n autoResize = false,\n minAuto = 0,\n maxAuto,\n label,\n labelPlacement = 'inner',\n titleCaption,\n placeholder,\n defaultValue,\n height,\n width,\n value,\n disabled,\n required = false,\n requiredPlacement = 'right',\n optional = false,\n clear,\n hasDivider,\n size,\n view,\n id,\n style,\n className,\n readOnly,\n rows,\n cols,\n hintTrigger = 'hover',\n hintText,\n hintView = 'default',\n hintSize = 'm',\n hintTargetIcon,\n hintPlacement = 'auto',\n hintHasArrow,\n hintOffset = HINT_DEFAULT_OFFSET,\n hintWidth,\n hintContentLeft,\n onChange,\n ...rest\n } = props;\n\n const [isHintVisible, setIsHintVisible] = useState(false);\n const [helperWidth, setHelperWidth] = useState<string>(width ? `${width}rem` : '100%');\n const [focused, setFocused] = useState(false);\n const [uncontrolledValue, setUncontrolledValue] = useState<string | undefined>();\n\n const outerRef = createRef<HTMLTextAreaElement>();\n\n const hintRef = useOutsideClick<HTMLDivElement>(() => {\n setIsHintVisible(false);\n });\n const hintInnerRef = useRef<HTMLDivElement>(null);\n const hintForkRef = useForkRef(hintRef, hintInnerRef);\n\n const innerOptional = required ? false : optional;\n const hasHelper = Boolean(leftHelper || rightHelper || helperText);\n const hasOuterLabel = Boolean(label && labelPlacement === 'outer');\n const hasInnerLabel = Boolean(label && labelPlacement === 'inner' && size !== 'xs');\n const hasPlaceholderOptional = innerOptional && !hasOuterLabel;\n\n const overriddenView = status !== undefined ? fallbackStatusMap[status] : view;\n const textareaHelperId = id ? `${id}-helper` : undefined;\n const applyCustomWidth = resize !== 'horizontal' && resize !== 'both' && !cols;\n const placeholderLabel = hasInnerLabel ? label : placeholder;\n\n const clearClass = clear ? classes.clear : undefined;\n const hasHintClass = hintText ? classes.hasHint : undefined;\n const hasRightContentClass = contentRight ? classes.hasRightContent : undefined;\n const hasDividerClass = hasDivider ? classes.hasDivider : undefined;\n const requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;\n\n const handleHintShow = () => setIsHintVisible(true);\n const handleHintHide = () => setIsHintVisible(false);\n const handleHintClick: MouseEventHandler = (event) => {\n if (!hintText || hintTrigger !== 'click') {\n return;\n }\n\n event.stopPropagation();\n const targetIsPopover = event.target === hintInnerRef.current;\n const rootHasTarget = hintInnerRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n setIsHintVisible(true);\n }\n };\n\n useResizeObserver(outerRef, (currentElement) => {\n const { width: inlineWidth } = currentElement.style;\n\n if (inlineWidth || cols) {\n const { width: elementWidth } = currentElement.getBoundingClientRect();\n setHelperWidth(`${elementWidth / ROOT_FONT_SIZE}rem`);\n }\n });\n\n useAutoResize(autoResize || Boolean(clear), outerRef, value, minAuto, maxAuto, resize);\n\n const onFocusHandler = useCallback(() => {\n setFocused(true);\n }, []);\n\n const onBlurHandler = useCallback(() => {\n setFocused(false);\n }, []);\n\n const onChangeHandler = useCallback(\n (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n // INFO: Для крайне редких кейсов, когда value снаружи не контролируется\n if (value === undefined) {\n setUncontrolledValue(event?.target.value);\n }\n\n onChange?.(event);\n },\n [value, onChange],\n );\n\n const handleTextAreaFocus = () => {\n if (readOnly || disabled || !outerRef?.current) {\n return;\n }\n\n outerRef.current.scrollTo({\n top: 0,\n left: outerRef.current.offsetLeft,\n behavior: 'smooth',\n });\n\n outerRef.current.focus();\n };\n\n const dynamicLabelClasses = getDynamicLabelClasses(\n {\n size,\n readOnly,\n label,\n labelPlacement,\n value: value || uncontrolledValue || defaultValue,\n rows,\n },\n focused,\n );\n\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText inheritFont={!hasOuterLabel}>\n {Boolean(hasPlaceholderOptional ? placeholderLabel : label) && '\\xa0'}\n {optionalText}\n </StyledOptionalText>\n ) : null;\n\n return (\n <Root\n view={overriddenView}\n size={size}\n disabled={disabled}\n readOnly={readOnly}\n clear={clear}\n style={{ width: helperWidth, ...style }}\n className={cx(clearClass, hasDividerClass, hasHintClass, className)}\n onClick={handleTextAreaFocus}\n {...(hintText && { hintView, hintSize })}\n >\n {(hasOuterLabel || titleCaption) && (\n <OuterLabelWrapper isInnerLabel={labelPlacement === 'inner'}>\n {hasOuterLabel && (\n <StyledIndicatorWrapper>\n <StyledLabel>{label}</StyledLabel>\n\n {hintText && (\n <StyledHintWrapper>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n {required && (\n <StyledIndicator\n className={cx(\n classes.outerLabelPlacement,\n requiredPlacementClass,\n hasHintClass,\n )}\n />\n )}\n {optionalTextNode}\n </StyledIndicatorWrapper>\n )}\n {titleCaption && <TitleCaption>{titleCaption}</TitleCaption>}\n </OuterLabelWrapper>\n )}\n <StyledContainer\n className={cx(styledContainer, ...dynamicLabelClasses)}\n width={helperWidth}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n >\n {!hasOuterLabel && (\n <>\n {required && (\n <StyledIndicator className={cx(classes.innerLabelPlacement, requiredPlacementClass)} />\n )}\n {hintText && (\n <StyledHintWrapper className={classes.innerLabelPlacement}>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n </>\n )}\n {contentRight && <StyledContent>{contentRight}</StyledContent>}\n <StyledTextAreaWrapper className={styledTextAreaWrapper} hasHelper={hasHelper}>\n <StyledTextArea\n className={cx(styledTextArea, hasRightContentClass)}\n id={id}\n hasContentRight={Boolean(contentRight)}\n hasHelper={hasHelper}\n applyCustomWidth={applyCustomWidth}\n ref={mergeRefs(outerRef, innerRef)}\n disabled={disabled}\n height={autoResize || Boolean(clear) ? minAuto : height}\n width={width}\n placeholder={placeholderLabel}\n aria-describedby={textareaHelperId}\n value={value}\n readOnly={readOnly}\n rows={rows}\n cols={cols}\n resize={resize}\n defaultValue={defaultValue}\n onChange={onChangeHandler}\n {...rest}\n />\n </StyledTextAreaWrapper>\n {hasHelper && (\n <StyledHelpers className={styledHelpers} id={textareaHelperId}>\n {(leftHelper || helperText) && (\n <StyledLeftHelper>{leftHelper || helperText}</StyledLeftHelper>\n )}\n {rightHelper && <StyledRightHelper>{rightHelper}</StyledRightHelper>}\n </StyledHelpers>\n )}\n {placeholderLabel && (\n <StyledPlaceholder\n hasContentRight={Boolean(contentRight)}\n className={styledPlaceholder}\n htmlFor={id}\n >\n {placeholderLabel}\n {!hasOuterLabel && optionalTextNode}\n </StyledPlaceholder>\n )}\n </StyledContainer>\n </Root>\n );\n });\n\nexport const textAreaConfig = {\n name: 'TextArea',\n tag: 'div',\n layout: textAreaRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n attrs: true,\n },\n hintView: {\n css: hintViewCSS,\n },\n hintSize: {\n css: hintSizeCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'primary',\n },\n};\n"],"names":["innerPlaceholderUp","classes","focusedOuterPlaceholderColor","hidePlaceHolder","styledContainer","styledTextArea","styledTextAreaWrapper","styledPlaceholder","styledHelpers","optionalText","base","fallbackStatusMap","success","warning","error","HINT_DEFAULT_OFFSET","getDynamicLabelClasses","props","focused","readOnly","label","labelPlacement","rows","value","size","withFocusedOuterUpPlaceholder","undefined","withInnerPlaceholderUp","withHidePlaceholder","textAreaRoot","Root","forwardRef","innerRef","helperText","status","resize","rightHelper","leftHelper","contentRight","_props$autoResize","autoResize","_props$minAuto","minAuto","maxAuto","_props$labelPlacement","titleCaption","placeholder","defaultValue","height","width","disabled","_props$required","required","_props$requiredPlacem","requiredPlacement","_props$optional","optional","clear","hasDivider","view","id","style","className","cols","_props$hintTrigger","hintTrigger","hintText","_props$hintView","hintView","_props$hintSize","hintSize","hintTargetIcon","_props$hintPlacement","hintPlacement","hintHasArrow","_props$hintOffset","hintOffset","hintWidth","hintContentLeft","onChange","rest","_excluded","_useState","useState","_useState2","_slicedToArray","isHintVisible","setIsHintVisible","_useState3","concat","_useState4","helperWidth","setHelperWidth","_useState5","_useState6","setFocused","_useState7","_useState8","uncontrolledValue","setUncontrolledValue","outerRef","createRef","hintRef","useOutsideClick","hintInnerRef","useRef","hintForkRef","useForkRef","innerOptional","hasHelper","Boolean","hasOuterLabel","hasInnerLabel","hasPlaceholderOptional","overriddenView","textareaHelperId","applyCustomWidth","placeholderLabel","clearClass","hasHintClass","hasHint","hasRightContentClass","hasRightContent","hasDividerClass","requiredPlacementClass","requiredAlignRight","handleHintShow","handleHintHide","handleHintClick","event","_hintInnerRef$current","stopPropagation","targetIsPopover","target","current","rootHasTarget","contains","useResizeObserver","currentElement","inlineWidth","_currentElement$getBo","getBoundingClientRect","elementWidth","ROOT_FONT_SIZE","useAutoResize","onFocusHandler","useCallback","onBlurHandler","onChangeHandler","handleTextAreaFocus","scrollTo","top","left","offsetLeft","behavior","focus","dynamicLabelClasses","optionalTextNode","React","createElement","StyledOptionalText","inheritFont","_extends","_objectSpread","cx","onClick","OuterLabelWrapper","isInnerLabel","StyledIndicatorWrapper","StyledLabel","StyledHintWrapper","HintComponent","ref","StyledIndicator","outerLabelPlacement","TitleCaption","StyledContainer","apply","_toConsumableArray","onFocus","onBlur","Fragment","innerLabelPlacement","StyledContent","StyledTextAreaWrapper","StyledTextArea","hasContentRight","mergeRefs","StyledHelpers","StyledLeftHelper","StyledRightHelper","StyledPlaceholder","htmlFor","textAreaConfig","name","tag","layout","variations","css","sizeCSS","viewCSS","clearCSS","attrs","disabledCSS","hintViewCSS","hintSizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqCA,IACIA,kBAAkB,GAQlBC,uBAAO,CARPD,kBAAkB;EAClBE,4BAA4B,GAO5BD,uBAAO,CAPPC,4BAA4B;EAC5BC,eAAe,GAMfF,uBAAO,CANPE,eAAe;EACfC,eAAe,GAKfH,uBAAO,CALPG,eAAe;EACfC,cAAc,GAIdJ,uBAAO,CAJPI,cAAc;EACdC,qBAAqB,GAGrBL,uBAAO,CAHPK,qBAAqB;EACrBC,iBAAiB,GAEjBN,uBAAO,CAFPM,iBAAiB;EACjBC,aAAAA,GACAP,uBAAO,CADPO,aAAAA,CAAAA;AAGJ,IAAMC,YAAY,GAAG,UAA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AgB,EAChB,CAACN,aAAa,IAAI8C,gBACJ,CAEV,CACf,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMoC,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEvK,YAAY;AACpBnB,EAAAA,IAAI,EAAJA,IAAI;AACJ2L,EAAAA,UAAU,EAAE;AACR7K,IAAAA,IAAI,EAAE;AACF8K,MAAAA,GAAG,EAAEC,WAAAA;KACR;AACD5I,IAAAA,IAAI,EAAE;AACF2I,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACD/I,IAAAA,KAAK,EAAE;AACH6I,MAAAA,GAAG,EAAEG,WAAQ;AACbC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDxJ,IAAAA,QAAQ,EAAE;AACNoJ,MAAAA,GAAG,EAAEK,WAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACDvL,IAAAA,QAAQ,EAAE;AACNuL,MAAAA,KAAK,EAAE,IAAA;KACV;AACDtI,IAAAA,QAAQ,EAAE;AACNkI,MAAAA,GAAG,EAAEM,WAAAA;KACR;AACDtI,IAAAA,QAAQ,EAAE;AACNgI,MAAAA,GAAG,EAAEO,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtL,IAAAA,IAAI,EAAE,GAAG;AACTmC,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;"}
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
 
7
7
  var ROOT_FONT_SIZE = 16;
8
- var useAutoResize = function useAutoResize(active, ref, value, minAuto, maxAuto) {
8
+ var useAutoResize = function useAutoResize(active, ref, value, minAuto, maxAuto, resize) {
9
9
  var previousHeight = React.useRef();
10
10
  React.useEffect(function () {
11
11
  if (active && ref && ref.current) {
12
12
  // проверка на пользовательский resize (вручную)
13
13
  var height = ref.current.clientHeight / ROOT_FONT_SIZE;
14
- if (previousHeight.current !== undefined && previousHeight.current !== height) {
14
+ if (resize && resize !== 'none' && previousHeight.current !== undefined && previousHeight.current !== height) {
15
15
  return;
16
16
  }
17
17
  var style = getComputedStyle(ref.current);
@@ -26,7 +26,7 @@ var useAutoResize = function useAutoResize(active, ref, value, minAuto, maxAuto)
26
26
  ref.current.style.height = "".concat(newHeight, "rem");
27
27
  previousHeight.current = newHeight;
28
28
  }
29
- }, [ref, active, value, minAuto, maxAuto]);
29
+ }, [ref, resize, active, value, minAuto, maxAuto]);
30
30
  };
31
31
 
32
32
  exports.ROOT_FONT_SIZE = ROOT_FONT_SIZE;
@@ -1 +1 @@
1
- {"version":3,"file":"useAutoResize.js","sources":["../../../../src/components/TextArea/hooks/useAutoResize.ts"],"sourcesContent":["import { useEffect, useRef, MutableRefObject } from 'react';\n\nexport const ROOT_FONT_SIZE = 16;\n\nexport const useAutoResize = <T extends HTMLTextAreaElement>(\n active: boolean,\n ref: MutableRefObject<T | null>,\n value?: string | ReadonlyArray<string> | number,\n minAuto?: number,\n maxAuto?: number,\n) => {\n const previousHeight = useRef<number | undefined>();\n\n useEffect(() => {\n if (active && ref && ref.current) {\n // проверка на пользовательский resize (вручную)\n const height = ref.current.clientHeight / ROOT_FONT_SIZE;\n if (previousHeight.current !== undefined && previousHeight.current !== height) {\n return;\n }\n\n const style = getComputedStyle(ref.current);\n const lineHeight = parseInt(style.lineHeight, 10);\n const lineHeightInRem = lineHeight / ROOT_FONT_SIZE;\n\n const minAutoHeight = minAuto ? minAuto * lineHeightInRem : 0;\n ref.current.style.height = `${minAutoHeight}rem`;\n\n const lines = Math.floor(ref.current.scrollHeight / lineHeight);\n const newScrollHeight = lines * lineHeightInRem;\n\n const maxAutoHeight = maxAuto ? maxAuto * lineHeightInRem : newScrollHeight;\n\n const newHeight = Math.min(newScrollHeight, maxAutoHeight);\n\n ref.current.style.height = `${newHeight}rem`;\n previousHeight.current = newHeight;\n }\n }, [ref, active, value, minAuto, maxAuto]);\n};\n"],"names":["ROOT_FONT_SIZE","useAutoResize","active","ref","value","minAuto","maxAuto","previousHeight","useRef","useEffect","current","height","clientHeight","undefined","style","getComputedStyle","lineHeight","parseInt","lineHeightInRem","minAutoHeight","concat","lines","Math","floor","scrollHeight","newScrollHeight","maxAutoHeight","newHeight","min"],"mappings":";;;;;;AAEO,IAAMA,cAAc,GAAG,GAAE;AAEnBC,IAAAA,aAAa,GAAG,SAAhBA,aAAaA,CACtBC,MAAe,EACfC,GAA+B,EAC/BC,KAA+C,EAC/CC,OAAgB,EAChBC,OAAgB,EACf;AACD,EAAA,IAAMC,cAAc,GAAGC,YAAM,EAAsB,CAAA;AAEnDC,EAAAA,eAAS,CAAC,YAAM;AACZ,IAAA,IAAIP,MAAM,IAAIC,GAAG,IAAIA,GAAG,CAACO,OAAO,EAAE;AAC9B;MACA,IAAMC,MAAM,GAAGR,GAAG,CAACO,OAAO,CAACE,YAAY,GAAGZ,cAAc,CAAA;MACxD,IAAIO,cAAc,CAACG,OAAO,KAAKG,SAAS,IAAIN,cAAc,CAACG,OAAO,KAAKC,MAAM,EAAE;AAC3E,QAAA,OAAA;AACJ,OAAA;AAEA,MAAA,IAAMG,KAAK,GAAGC,gBAAgB,CAACZ,GAAG,CAACO,OAAO,CAAC,CAAA;MAC3C,IAAMM,UAAU,GAAGC,QAAQ,CAACH,KAAK,CAACE,UAAU,EAAE,EAAE,CAAC,CAAA;AACjD,MAAA,IAAME,eAAe,GAAGF,UAAU,GAAGhB,cAAc,CAAA;MAEnD,IAAMmB,aAAa,GAAGd,OAAO,GAAGA,OAAO,GAAGa,eAAe,GAAG,CAAC,CAAA;MAC7Df,GAAG,CAACO,OAAO,CAACI,KAAK,CAACH,MAAM,GAAAS,EAAAA,CAAAA,MAAA,CAAMD,aAAa,EAAK,KAAA,CAAA,CAAA;AAEhD,MAAA,IAAME,KAAK,GAAGC,IAAI,CAACC,KAAK,CAACpB,GAAG,CAACO,OAAO,CAACc,YAAY,GAAGR,UAAU,CAAC,CAAA;AAC/D,MAAA,IAAMS,eAAe,GAAGJ,KAAK,GAAGH,eAAe,CAAA;MAE/C,IAAMQ,aAAa,GAAGpB,OAAO,GAAGA,OAAO,GAAGY,eAAe,GAAGO,eAAe,CAAA;MAE3E,IAAME,SAAS,GAAGL,IAAI,CAACM,GAAG,CAACH,eAAe,EAAEC,aAAa,CAAC,CAAA;MAE1DvB,GAAG,CAACO,OAAO,CAACI,KAAK,CAACH,MAAM,GAAAS,EAAAA,CAAAA,MAAA,CAAMO,SAAS,EAAK,KAAA,CAAA,CAAA;MAC5CpB,cAAc,CAACG,OAAO,GAAGiB,SAAS,CAAA;AACtC,KAAA;AACJ,GAAC,EAAE,CAACxB,GAAG,EAAED,MAAM,EAAEE,KAAK,EAAEC,OAAO,EAAEC,OAAO,CAAC,CAAC,CAAA;AAC9C;;;;;"}
1
+ {"version":3,"file":"useAutoResize.js","sources":["../../../../src/components/TextArea/hooks/useAutoResize.ts"],"sourcesContent":["import { useEffect, useRef, MutableRefObject } from 'react';\n\nexport const ROOT_FONT_SIZE = 16;\n\nexport const useAutoResize = <T extends HTMLTextAreaElement>(\n active: boolean,\n ref: MutableRefObject<T | null>,\n value?: string | ReadonlyArray<string> | number,\n minAuto?: number,\n maxAuto?: number,\n resize?: string,\n) => {\n const previousHeight = useRef<number | undefined>();\n\n useEffect(() => {\n if (active && ref && ref.current) {\n // проверка на пользовательский resize (вручную)\n const height = ref.current.clientHeight / ROOT_FONT_SIZE;\n if (\n resize &&\n resize !== 'none' &&\n previousHeight.current !== undefined &&\n previousHeight.current !== height\n ) {\n return;\n }\n\n const style = getComputedStyle(ref.current);\n const lineHeight = parseInt(style.lineHeight, 10);\n const lineHeightInRem = lineHeight / ROOT_FONT_SIZE;\n\n const minAutoHeight = minAuto ? minAuto * lineHeightInRem : 0;\n ref.current.style.height = `${minAutoHeight}rem`;\n\n const lines = Math.floor(ref.current.scrollHeight / lineHeight);\n const newScrollHeight = lines * lineHeightInRem;\n\n const maxAutoHeight = maxAuto ? maxAuto * lineHeightInRem : newScrollHeight;\n\n const newHeight = Math.min(newScrollHeight, maxAutoHeight);\n\n ref.current.style.height = `${newHeight}rem`;\n previousHeight.current = newHeight;\n }\n }, [ref, resize, active, value, minAuto, maxAuto]);\n};\n"],"names":["ROOT_FONT_SIZE","useAutoResize","active","ref","value","minAuto","maxAuto","resize","previousHeight","useRef","useEffect","current","height","clientHeight","undefined","style","getComputedStyle","lineHeight","parseInt","lineHeightInRem","minAutoHeight","concat","lines","Math","floor","scrollHeight","newScrollHeight","maxAutoHeight","newHeight","min"],"mappings":";;;;;;AAEO,IAAMA,cAAc,GAAG,GAAE;IAEnBC,aAAa,GAAG,SAAhBA,aAAaA,CACtBC,MAAe,EACfC,GAA+B,EAC/BC,KAA+C,EAC/CC,OAAgB,EAChBC,OAAgB,EAChBC,MAAe,EACd;AACD,EAAA,IAAMC,cAAc,GAAGC,YAAM,EAAsB,CAAA;AAEnDC,EAAAA,eAAS,CAAC,YAAM;AACZ,IAAA,IAAIR,MAAM,IAAIC,GAAG,IAAIA,GAAG,CAACQ,OAAO,EAAE;AAC9B;MACA,IAAMC,MAAM,GAAGT,GAAG,CAACQ,OAAO,CAACE,YAAY,GAAGb,cAAc,CAAA;AACxD,MAAA,IACIO,MAAM,IACNA,MAAM,KAAK,MAAM,IACjBC,cAAc,CAACG,OAAO,KAAKG,SAAS,IACpCN,cAAc,CAACG,OAAO,KAAKC,MAAM,EACnC;AACE,QAAA,OAAA;AACJ,OAAA;AAEA,MAAA,IAAMG,KAAK,GAAGC,gBAAgB,CAACb,GAAG,CAACQ,OAAO,CAAC,CAAA;MAC3C,IAAMM,UAAU,GAAGC,QAAQ,CAACH,KAAK,CAACE,UAAU,EAAE,EAAE,CAAC,CAAA;AACjD,MAAA,IAAME,eAAe,GAAGF,UAAU,GAAGjB,cAAc,CAAA;MAEnD,IAAMoB,aAAa,GAAGf,OAAO,GAAGA,OAAO,GAAGc,eAAe,GAAG,CAAC,CAAA;MAC7DhB,GAAG,CAACQ,OAAO,CAACI,KAAK,CAACH,MAAM,GAAAS,EAAAA,CAAAA,MAAA,CAAMD,aAAa,EAAK,KAAA,CAAA,CAAA;AAEhD,MAAA,IAAME,KAAK,GAAGC,IAAI,CAACC,KAAK,CAACrB,GAAG,CAACQ,OAAO,CAACc,YAAY,GAAGR,UAAU,CAAC,CAAA;AAC/D,MAAA,IAAMS,eAAe,GAAGJ,KAAK,GAAGH,eAAe,CAAA;MAE/C,IAAMQ,aAAa,GAAGrB,OAAO,GAAGA,OAAO,GAAGa,eAAe,GAAGO,eAAe,CAAA;MAE3E,IAAME,SAAS,GAAGL,IAAI,CAACM,GAAG,CAACH,eAAe,EAAEC,aAAa,CAAC,CAAA;MAE1DxB,GAAG,CAACQ,OAAO,CAACI,KAAK,CAACH,MAAM,GAAAS,EAAAA,CAAAA,MAAA,CAAMO,SAAS,EAAK,KAAA,CAAA,CAAA;MAC5CpB,cAAc,CAACG,OAAO,GAAGiB,SAAS,CAAA;AACtC,KAAA;AACJ,GAAC,EAAE,CAACzB,GAAG,EAAEI,MAAM,EAAEL,MAAM,EAAEE,KAAK,EAAEC,OAAO,EAAEC,OAAO,CAAC,CAAC,CAAA;AACtD;;;;;"}
@@ -51,7 +51,7 @@ var innerPlaceholderUp = _TextArea2.classes.innerPlaceholderUp,
51
51
  styledPlaceholder = _TextArea2.classes.styledPlaceholder,
52
52
  styledHelpers = _TextArea2.classes.styledHelpers;
53
53
  var optionalText = 'optional';
54
- var base = /*#__PURE__*/(0, _react2.css)(_mixins.applyDynamicLabel, ";position:relative;box-sizing:border-box;;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvVGV4dEFyZWEvVGV4dEFyZWEudHN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ICAgbWF4QXV0byxcbiAgICAgICAgICAgIGxhYmVsLFxuICAgICAgICAgICAgbGFiZWxQbGFjZW1lbnQgPSAnaW5uZXInLFxuICAgICAgICAgICAgdGl0bGVDYXB0aW9uLFxuICAgICAgICAgICAgcGxhY2Vob2xkZXIsXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWUsXG4gICAgICAgICAgICBoZWlnaHQsXG4gICAgICAgICAgICB3aWR0aCxcbiAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgICAgZGlzYWJsZWQsXG4gICAgICAgICAgICByZXF1aXJlZCA9IGZhbHNlLFxuICAgICAgICAgICAgcmVxdWlyZWRQbGFjZW1lbnQgPSAncmlnaHQnLFxuICAgICAgICAgICAgb3B0aW9uYWwgPSBmYWxzZSxcbiAgICAgICAgICAgIGNsZWFyLFxuICAgICAgICAgICAgaGFzRGl2aWRlcixcbiAgICAgICAgICAgIHNpemUsXG4gICAgICAgICAgICB2aWV3LFxuICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICBzdHlsZSxcbiAgICAgICAgICAgIGNsYXNzTmFtZSxcbiAgICAgICAgICAgIHJlYWRPbmx5LFxuICAgICAgICAgICAgcm93cyxcbiAgICAgICAgICAgIGNvbHMsXG4gICAgICAgICAgICBoaW50VHJpZ2dlciA9ICdob3ZlcicsXG4gICAgICAgICAgICBoaW50VGV4dCxcbiAgICAgICAgICAgIGhpbnRWaWV3ID0gJ2RlZmF1bHQnLFxuICAgICAgICAgICAgaGludFNpemUgPSAnbScsXG4gICAgICAgICAgICBoaW50VGFyZ2V0SWNvbixcbiAgICAgICAgICAgIGhpbnRQbGFjZW1lbnQgPSAnYXV0bycsXG4gICAgICAgICAgICBoaW50SGFzQXJyb3csXG4gICAgICAgICAgICBoaW50T2Zmc2V0ID0gSElOVF9ERUZBVUxUX09GRlNFVCxcbiAgICAgICAgICAgIGhpbnRXaWR0aCxcbiAgICAgICAgICAgIGhpbnRDb250ZW50TGVmdCxcbiAgICAgICAgICAgIG9uQ2hhbmdlLFxuICAgICAgICAgICAgLi4ucmVzdFxuICAgICAgICB9ID0gcHJvcHM7XG5cbiAgICAgICAgY29uc3QgW2lzSGludFZpc2libGUsIHNldElzSGludFZpc2libGVdID0gdXNlU3RhdGUoZmFsc2UpO1xuICAgICAgICBjb25zdCBbaGVscGVyV2lkdGgsIHNldEhlbHBlcldpZHRoXSA9IHVzZVN0YXRlPHN0cmluZz4od2lkdGggPyBgJHt3aWR0aH1yZW1gIDogJzEwMCUnKTtcbiAgICAgICAgY29uc3QgW2ZvY3VzZWQsIHNldEZvY3VzZWRdID0gdXNlU3RhdGUoZmFsc2UpO1xuICAgICAgICBjb25zdCBbdW5jb250cm9sbGVkVmFsdWUsIHNldFVuY29udHJvbGxlZFZhbHVlXSA9IHVzZVN0YXRlPHN0cmluZyB8IHVuZGVmaW5lZD4oKTtcblxuICAgICAgICBjb25zdCBvdXRlclJlZiA9IGNyZWF0ZVJlZjxIVE1MVGV4dEFyZWFFbGVtZW50PigpO1xuXG4gICAgICAgIGNvbnN0IGhpbnRSZWYgPSB1c2VPdXRzaWRlQ2xpY2s8SFRNTERpdkVsZW1lbnQ+KCgpID0+IHtcbiAgICAgICAgICAgIHNldElzSGludFZpc2libGUoZmFsc2UpO1xuICAgICAgICB9KTtcbiAgICAgICAgY29uc3QgaGludElubmVyUmVmID0gdXNlUmVmPEhUTUxEaXZFbGVtZW50PihudWxsKTtcbiAgICAgICAgY29uc3QgaGludEZvcmtSZWYgPSB1c2VGb3JrUmVmKGhpbnRSZWYsIGhpbnRJbm5lclJlZik7XG5cbiAgICAgICAgY29uc3QgaW5uZXJPcHRpb25hbCA9IHJlcXVpcmVkID8gZmFsc2UgOiBvcHRpb25hbDtcbiAgICAgICAgY29uc3QgaGFzSGVscGVyID0gQm9vbGVhbihsZWZ0SGVscGVyIHx8IHJpZ2h0SGVscGVyIHx8IGhlbHBlclRleHQpO1xuICAgICAgICBjb25zdCBoYXNPdXRlckxhYmVsID0gQm9vbGVhbih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AgICAgICAgY29uc3QgcmVxdWlyZWRQbGFjZW1lbnRDbGFzcyA9IHJlcXVpcmVkUGxhY2VtZW50ID09PSAncmlnaHQnID8gY2xhc3Nlcy5yZXF1aXJlZEFsaWduUmlnaHQgOiB1bmRlZmluZWQ7XG5cbiAgICAgICAgY29uc3QgaGFuZGxlSGludFNob3cgPSAoKSA9PiBzZXRJc0hpbnRWaXNpYmxlKHRydWUpO1xuICAgICAgICBjb25zdCBoYW5kbGVIaW50SGlkZSA9ICgpID0+IHNldElzSGludFZpc2libGUoZmFsc2UpO1xuICAgICAgICBjb25zdCBoYW5kbGVIaW50Q2xpY2s6IE1vdXNlRXZlbnRIYW5kbGVyID0gKGV2ZW50KSA9PiB7XG4gICAgICAgICAgICBpZiAoIWhpbnRUZXh0IHx8IGhpbnRUcmlnZ2VyICE9PSAnY2xpY2snKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgIGNvbnN0IHRhcmdldElzUG9wb3ZlciA9IGV2ZW50LnRhcmdldCA9PT0gaGludElubmVyUmVmLmN1cnJlbnQ7XG4gICAgICAgICAgICBjb25zdCByb290SGFzVGFyZ2V0ID0gaGludElubmVyUmVmLmN1cnJlbnQ/LmNvbnRhaW5zKGV2ZW50LnRhcmdldCBhcyBFbGVtZW50KTtcblxuICAgICAgICAgICAgaWYgKCF0YXJnZXRJc1BvcG92ZXIgJiYgIXJvb3RIYXNUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICBzZXRJc0hpbnRWaXNpYmxlKHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHVzZVJlc2l6ZU9ic2VydmVyKG91dGVyUmVmLCAoY3VycmVudEVsZW1lbnQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHsgd2lkdGg6IGlubGluZVdpZHRoIH0gPSBjdXJyZW50R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AgICAgICAgICAgICAgIHNldFVuY29udHJvbGxlZFZhbHVlKGV2ZW50Py50YXJnZXQudmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPy4oZXZlbnQpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIFt2YWx1ZSwgb25DaGFuZ2VdLFxuICAgICAgICApO1xuXG4gICAgICAgIGNvbnN0IGhhbmRsZVRleHRBcmVhRm9jdXMgPSAoKSA9PiB7XG4gICAgICAgICAgICBpZiAocmVhZE9ubHkgfHwgZGlzYWJsZWQgfHwgIW91dGVyUmVmPy5jdXJyZW50KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBvdXRlclJlZi5jdXJyZW50LnNjcm9sbFRvKHtcbiAgICAgICAgICAgICAgICB0b3A6IDAsXG4gICAgICAgICAgICAgICAgbGVmdDogb3V0ZXJSZWYuY3VycmVudC5vZmZzZXRMZWZ0LFxuICAgICAgICAgICAgICAgIGJlaGF2aW9yOiAnc21vb3RoJyxcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBvdXRlclJlZi5jdXJyZW50LmZvY3VzKCk7XG4gICAgICAgIH07XG5cbiAgICAgICAgY29uc3QgZHluYW1pY0xhYmVsQ2xhc3NlcyA9IGdldER5bmFtaWNMYWJlbENsYXNzZXMoXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgc2l6ZSxcbiAgICAgICAgICAgICAgICByZWFkT25seSxcbiAgICAgICAgICAgICAgICBsYWJlbCxcbiAgICAgICAgICAgICAgICBsYWJlbFBsYWNlbWVudCxcbiAgICAgICAgICAgICAgICB2YWx1ZTogdmFsdWUgfHwgdW5jb250cm9sbGVkVmFsdWUgfHwgZGVmYXVsdFZhbHVlLFxuICAgICAgICAgICAgICAgIHJvd3MsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZm9jdXNlZCxcbiAgICAgICAgKTtcblxuICAgICAgICBjb25zdCBvcHRpb25hbFRleHROb2RlID0gaW5uZXJPcHRpb25hbCA/IChcbiAgICAgICAgICAgIDxTdHlsZWRPcHRpb25hbFRleHQgaW5oZXJpdEZvbnQ9eyFoYXNPdXRlckxhYmVsfT5cbiAgICAgICAgICAgICAgICB7Qm9vbGVhbihoYXNQbGFjZWhvbGRlck9wdGlvbmFsID8gcGxhY2Vob2xkZXJMYWJlbCA6IGxhYmVsKSAmJiAnXFx4YTAnfVxuICAgICAgICAgICAgICAgIHtvcHRpb25hbFRleHR9XG4gICAgICAgICAgICA8L1N0eWxlZE9wdGlvbmFsVGV4dD5cbiAgICAgICAgKSA6IG51bGw7XG5cbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxSb290XG4gICAgICAgICAgICAgICAgdmlldz17b3ZlcnJpZGRlblZpZXd9XG4gICAgICAgICAgICAgICAgc2l6ZT17c2l6ZX1cbiAgICAgICAgICAgICAgICBkaXNhYmxlZD17ZGlzYWJsZWR9XG4gICAgICAgICAgICAgICAgcmVhZE9ubHk9e3JlYWRPbmx5fVxuICAgICAgICAgICAgICAgIGNsZWFyPXtjbGVhcn1cbiAgICAgICAgICAgICAgICBzdHlsZT17eyB3aWR0aDogaGVscGVyV2lkdGgsIC4uLnN0eWxlIH19XG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeChjbGVhckNsYXNzLCBoYXNEaXZpZGVyQ2xhc3MsIGhhc0hpbnRDbGFzcywgY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXtoYW5kbGVUZXh0QXJlYUZvY3VzfVxuICAgICAgICAgICAgICAgIHsuLi4oaGludFRleHQgJiYgeyBoaW50VmlldywgaGludFNpemUgfSl9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgeyhoYXNPdXRlckxhYmVsIHx8IHRpdGxlQ2FwdGlvbikgJiYgKFxuICAgICAgICAgICAgICAgICAgICA8T3V0ZXJMYWJlbFdyYXBwZXIgaXNJbm5lckxhYmVsPXtsYWJlbFBsYWNlbWVudCA9PT0gJ2lubmVyJ30+XG4gICAgICAgICAgICAgICAgICAgICAgICB7aGFzT3V0ZXJMYWJlbCAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPFN0eWxlZEluZGljYXRvcldyYXBwZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxTdHlsZWRMYWJlbD57bGFiZWx9PC9TdHlsZWRMYWJlbD5cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7aGludFRleHQgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPFN0eWxlZEhpbnRXcmFwcGVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxIaW50Q29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZj17aGludEZvcmtSZWZ9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRUZXh0PXtoaW50VGV4dH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludFRyaWdnZXI9e2hpbnRUcmlnZ2VyfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc0hpbnRWaXNpYmxlPXtpc0hpbnRWaXNpYmxlfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaW50VGFyZ2V0SWNvbj17aGludFRhcmdldEljb259XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRQbGFjZW1lbnQ9e2hpbnRQbGFjZW1lbnR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRIYXNBcnJvdz17aGludEhhc0Fycm93fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaW50T2Zmc2V0PXtoaW50T2Zmc2V0fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaW50V2lkdGg9e2hpbnRXaWR0aH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludENvbnRlbnRMZWZ0PXtoaW50Q29udGVudExlZnR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZUhpbnRTaG93PXtoYW5kbGVIaW50U2hvd31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlSGludEhpZGU9e2hhbmRsZUhpbnRIaWRlfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVIaW50Q2xpY2s9e2hhbmRsZUhpbnRDbGlja31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9TdHlsZWRIaW50V3JhcHBlcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3JlcXVpcmVkICYmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxTdHlsZWRJbmRpY2F0b3JcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzc2VzLm91dGVyTGFiZWxQbGFjZW1lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkUGxhY2VtZW50Q2xhc3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc0hpbnRDbGFzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge29wdGlvbmFsVGV4dE5vZGV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9TdHlsZWRJbmRpY2F0b3JXcmFwcGVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgICAgIHt0aXRsZUNhcHRpb24gJiYgPFRpdGxlQ2FwdGlvbj57dGl0bGVDYXB0aW9ufTwvVGl0bGVDYXB0aW9uPn1cbiAgICAgICAgICAgICAgICAgICAgPC9PdXRlckxhYmVsV3JhcHBlcj5cbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIDxTdHlsZWRDb250YWluZXJcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeChzdHlsZWRDb250YWluZXIsIC4uLmR5bmFtaWNMYWJlbENsYXNzZXMpfVxuICAgICAgICAgICAgICAgICAgICB3aWR0aD17aGVscGVyV2lkdGh9XG4gICAgICAgICAgICAgICAgICAgIG9uRm9jdXM9e29uRm9jdXNIYW5kbGVyfVxuICAgICAgICAgICAgICAgICAgICBvbkJsdXI9e29uQmx1ckhhbmRsZXJ9XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICB7IWhhc091dGVyTGFiZWwgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgPD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7cmVxdWlyZWQgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8U3R5bGVkSW5kaWNhdG9yIGNsYXNzTmFtZT17Y3goY2xhc3Nlcy5pbm5lckxhYmVsUGxhY2VtZW50LCByZXF1aXJlZFBsYWNlbWVudENsYXNzKX0gLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtoaW50VGV4dCAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxTdHlsZWRIaW50V3JhcHBlciBjbGFzc05hbWU9e2NsYXNzZXMuaW5uZXJMYWJlbFBsYWNlbWVudH0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8SGludENvbXBvbmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZj17aGludEZvcmtSZWZ9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludFRleHQ9e2hpbnRUZXh0fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRUcmlnZ2VyPXtoaW50VHJpZ2dlcn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc0hpbnRWaXNpYmxlPXtpc0hpbnRWaXNpYmxlfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRUYXJnZXRJY29uPXtoaW50VGFyZ2V0SWNvbn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaW50UGxhY2VtZW50PXtoaW50UGxhY2VtZW50fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRIYXNBcnJvdz17aGludEhhc0Fycm93fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRPZmZzZXQ9e2hpbnRPZmZzZXR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludFdpZHRoPXtoaW50V2lkdGh9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludENvbnRlbnRMZWZ0PXtoaW50Q29udGVudExlZnR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlSGludFNob3c9e2hhbmRsZUhpbnRTaG93fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZUhpbnRIaWRlPXtoYW5kbGVIaW50SGlkZX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVIaW50Q2xpY2s9e2hhbmRsZUhpbnRDbGlja31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvU3R5bGVkSGludFdyYXBwZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvPlxuICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICB7Y29udGVudFJpZ2h0ICYmIDxTdHlsZWRDb250ZW50Pntjb250ZW50UmlnaHR9PC9TdHlsZWRDb250ZW50Pn1cbiAgICAgICAgICAgICAgICAgICAgPFN0eWxlZFRleHRBcmVhV3JhcHBlciBjbGFzc05hbWU9e3N0eWxlZFRleHRBcmVhV3JhcHBlcn0gaGFzSGVscGVyPXtoYXNIZWxwZXJ9PlxuICAgICAgICAgICAgICAgICAgICAgICAgPFN0eWxlZFRleHRBcmVhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeChzdHlsZWRUZXh0QXJlYSwgaGFzUmlnaHRDb250ZW50Q2xhc3MpfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkPXtpZH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYXNDb250ZW50UmlnaHQ9e0Jvb2xlYW4oY29udGVudFJpZ2h0KX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYXNIZWxwZXI9e2hhc0hlbHBlcn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBseUN1c3RvbVdpZHRoPXthcHBseUN1c3RvbVdpZHRofVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZj17bWVyZ2VSZWZzKG91dGVyUmVmLCBpbm5lclJlZil9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ9e2Rpc2FibGVkfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodD17YXV0b1Jlc2l6ZSB8fCBCb29sZWFuKGNsZWFyKSA/IG1pbkF1dG8gOiBoZWlnaHR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg9e3dpZHRofVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyPXtwbGFjZWhvbGRlckxhYmVsfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyaWEtZGVzY3JpYmVkYnk9e3RleHRhcmVhSGVscGVySWR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU9e3ZhbHVlfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRPbmx5PXtyZWFkT25seX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3dzPXtyb3dzfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbHM9e2NvbHN9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzaXplPXtyZXNpemV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlPXtkZWZhdWx0VmFsdWV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U9e29uQ2hhbmdlSGFuZGxlcn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Li4ucmVzdH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgIDwvU3R5bGVkVGV4dEFyZWFXcmFwcGVyPlxuICAgICAgICAgICAgICAgICAgICB7aGFzSGVscGVyICYmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIDxTdHlsZWRIZWxwZXJzIGNsYXNzTmFtZT17c3R5bGVkSGVscGVyc30gaWQ9e3RleHRhcmVhSGVscGVySWR9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsobGVmdEhlbHBlciB8fCBoZWxwZXJUZXh0KSAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxTdHlsZWRMZWZ0SGVscGVyPntsZWZ0SGVscGVyIHx8IGhlbHBlclRleHR9PC9TdHlsZWRMZWZ0SGVscGVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge3JpZ2h0SGVscGVyICYmIDxTdHlsZWRSaWdodEhlbHBlcj57cmlnaHRIZWxwZXJ9PC9TdHlsZWRSaWdodEhlbHBlcj59XG4gICAgICAgICAgICAgICAgICAgICAgICA8L1N0eWxlZEhlbHBlcnM+XG4gICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgIHtwbGFjZWhvbGRlckxhYmVsICYmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIDxTdHlsZWRQbGFjZWhvbGRlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc0NvbnRlbnRSaWdodD17Qm9vbGVhbihjb250ZW50UmlnaHQpfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17c3R5bGVkUGxhY2Vob2xkZXJ9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbEZvcj17aWR9XG4gICAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge3BsYWNlaG9sZGVyTGFiZWx9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeyFoYXNPdXRlckxhYmVsICYmIG9wdGlvbmFsVGV4dE5vZGV9XG4gICAgICAgICAgICAgICAgICAgICAgICA8L1N0eWxlZFBsYWNlaG9sZGVyPlxuICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIDwvU3R5bGVkQ29udGFpbmVyPlxuICAgICAgICAgICAgPC9Sb290PlxuICAgICAgICApO1xuICAgIH0pO1xuXG5leHBvcnQgY29uc3QgdGV4dEFyZWFDb25maWcgPSB7XG4gICAgbmFtZTogJ1RleHRBcmVhJyxcbiAgICB0YWc6ICdkaXYnLFxuICAgIGxheW91dDogdGV4dEFyZWFSb290LFxuICAgIGJhc2UsXG4gICAgdmFyaWF0aW9uczoge1xuICAgICAgICBzaXplOiB7XG4gICAgICAgICAgICBjc3M6IHNpemVDU1MsXG4gICAgICAgIH0sXG4gICAgICAgIHZpZXc6IHtcbiAgICAgICAgICAgIGNzczogdmlld0NTUyxcbiAgICAgICAgfSxcbiAgICAgICAgY2xlYXI6IHtcbiAgICAgICAgICAgIGNzczogY2xlYXJDU1MsXG4gICAgICAgICAgICBhdHRyczogdHJ1ZSxcbiAgICAgICAgfSxcbiAgICAgICAgZGlzYWJsZWQ6IHtcbiAgICAgICAgICAgIGNzczogZGlzYWJsZWRDU1MsXG4gICAgICAgICAgICBhdHRyczogdHJ1ZSxcbiAgICAgICAgfSxcbiAgICAgICAgcmVhZE9ubHk6IHtcbiAgICAgICAgICAgIGF0dHJzOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICBoaW50Vmlldzoge1xuICAgICAgICAgICAgY3NzOiBoaW50Vmlld0NTUyxcbiAgICAgICAgfSxcbiAgICAgICAgaGludFNpemU6IHtcbiAgICAgICAgICAgIGNzczogaGludFNpemVDU1MsXG4gICAgICAgIH0sXG4gICAgfSxcbiAgICBkZWZhdWx0czoge1xuICAgICAgICBzaXplOiAnbScsXG4gICAgICAgIHZpZXc6ICdwcmltYXJ5JyxcbiAgICB9LFxufTtcbiJdfQ== */"));
54
+ var base = /*#__PURE__*/(0, _react2.css)(_mixins.applyDynamicLabel, ";position:relative;box-sizing:border-box;;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3Vy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AgICAgICAgICAgIGF1dG9SZXNpemUgPSBmYWxzZSxcbiAgICAgICAgICAgIG1pbkF1dG8gPSAwLFxuICAgICAgICAgICAgbWF4QXV0byxcbiAgICAgICAgICAgIGxhYmVsLFxuICAgICAgICAgICAgbGFiZWxQbGFjZW1lbnQgPSAnaW5uZXInLFxuICAgICAgICAgICAgdGl0bGVDYXB0aW9uLFxuICAgICAgICAgICAgcGxhY2Vob2xkZXIsXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWUsXG4gICAgICAgICAgICBoZWlnaHQsXG4gICAgICAgICAgICB3aWR0aCxcbiAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgICAgZGlzYWJsZWQsXG4gICAgICAgICAgICByZXF1aXJlZCA9IGZhbHNlLFxuICAgICAgICAgICAgcmVxdWlyZWRQbGFjZW1lbnQgPSAncmlnaHQnLFxuICAgICAgICAgICAgb3B0aW9uYWwgPSBmYWxzZSxcbiAgICAgICAgICAgIGNsZWFyLFxuICAgICAgICAgICAgaGFzRGl2aWRlcixcbiAgICAgICAgICAgIHNpemUsXG4gICAgICAgICAgICB2aWV3LFxuICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICBzdHlsZSxcbiAgICAgICAgICAgIGNsYXNzTmFtZSxcbiAgICAgICAgICAgIHJlYWRPbmx5LFxuICAgICAgICAgICAgcm93cyxcbiAgICAgICAgICAgIGNvbHMsXG4gICAgICAgICAgICBoaW50VHJpZ2dlciA9ICdob3ZlcicsXG4gICAgICAgICAgICBoaW50VGV4dCxcbiAgICAgICAgICAgIGhpbnRWaWV3ID0gJ2RlZmF1bHQnLFxuICAgICAgICAgICAgaGludFNpemUgPSAnbScsXG4gICAgICAgICAgICBoaW50VGFyZ2V0SWNvbixcbiAgICAgICAgICAgIGhpbnRQbGFjZW1lbnQgPSAnYXV0bycsXG4gICAgICAgICAgICBoaW50SGFzQXJyb3csXG4gICAgICAgICAgICBoaW50T2Zmc2V0ID0gSElOVF9ERUZBVUxUX09GRlNFVCxcbiAgICAgICAgICAgIGhpbnRXaWR0aCxcbiAgICAgICAgICAgIGhpbnRDb250ZW50TGVmdCxcbiAgICAgICAgICAgIG9uQ2hhbmdlLFxuICAgICAgICAgICAgLi4ucmVzdFxuICAgICAgICB9ID0gcHJvcHM7XG5cbiAgICAgICAgY29uc3QgW2lzSGludFZpc2libGUsIHNldElzSGludFZpc2libGVdID0gdXNlU3RhdGUoZmFsc2UpO1xuICAgICAgICBjb25zdCBbaGVscGVyV2lkdGgsIHNldEhlbHBlcldpZHRoXSA9IHVzZVN0YXRlPHN0cmluZz4od2lkdGggPyBgJHt3aWR0aH1yZW1gIDogJzEwMCUnKTtcbiAgICAgICAgY29uc3QgW2ZvY3VzZWQsIHNldEZvY3VzZWRdID0gdXNlU3RhdGUoZmFsc2UpO1xuICAgICAgICBjb25zdCBbdW5jb250cm9sbGVkVmFsdWUsIHNldFVuY29udHJvbGxlZFZhbHVlXSA9IHVzZVN0YXRlPHN0cmluZyB8IHVuZGVmaW5lZD4oKTtcblxuICAgICAgICBjb25zdCBvdXRlclJlZiA9IGNyZWF0ZVJlZjxIVE1MVGV4dEFyZWFFbGVtZW50PigpO1xuXG4gICAgICAgIGNvbnN0IGhpbnRSZWYgPSB1c2VPdXRzaWRlQ2xpY2s8SFRNTERpdkVsZW1lbnQ+KCgpID0+IHtcbiAgICAgICAgICAgIHNldElzSGludFZpc2libGUoZmFsc2UpO1xuICAgICAgICB9KTtcbiAgICAgICAgY29uc3QgaGludElubmVyUmVmID0gdXNlUmVmPEhUTUxEaXZFbGVtZW50PihudWxsKTtcbiAgICAgICAgY29uc3QgaGludEZvcmtSZWYgPSB1c2VGb3JrUmVmKGhpbnRSZWYsIGhpbnRJbm5lclJlZik7XG5cbiAgICAgICAgY29uc3QgaW5uZXJPcHRpb25hbCA9IHJlcXVpcmVkID8gZmFsc2UgOiBvcHRpb25hbDtcbiAgICAgICAgY29uc3QgaGFzSGVscGVyID0gQm9vbGVhbihsZWZ0SGVscGVyIHx8IH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VsZW1lbnQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHsgd2lkdGg6IGlubGluZVdpZHRoIH0gPSBjdXJyZW50RWxlbWVudC5zdHlsZTtcblxuICAgICAgICAgICAgaWYgKGlubGluZVdpZHRoIHx8IGNvbHMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCB7IHdpZHRoOiBlbGVtZW50V2lkdGggfSA9IGN1cnJlbnRFbGVtZW50LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpO1xuICAgICAgICAgICAgICAgIHNldEhlbHBlcldpZHRoKGAke2VsZW1lbnRXaWR0aCAvIFJPT1RfRk9OVF9TSVpFfXJlbWApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICB1c2VBdXRvUmVzaXplKGF1dG9SZXNpemUgfHwgQm9vbGVhbihjbGVhciksIG91dGVyUmVmLCB2YWx1ZSwgbWluQXV0bywgbWF4QXV0bywgcmVzaXplKTtcblxuICAgICAgICBjb25zdCBvbkZvY3VzSGFuZGxlciA9IHVzZUNhbGxiYWNrKCgpID0+IHtcbiAgICAgICAgICAgIHNldEZvY3VzZWQodHJ1ZSk7XG4gICAgICAgIH0sIFtdKTtcblxuICAgICAgICBjb25zdCBvbkJsdXJIYW5kbGVyID0gdXNlQ2FsbGJhY2soKCkgPT4ge1xuICAgICAgICAgICAgc2V0Rm9jdXNlZChmYWxzZSk7XG4gICAgICAgIH0sIFtdKTtcblxuICAgICAgICBjb25zdCBvbkNoYW5nZUhhbmRsZXIgPSB1c2VDYWxsYmFjayhcbiAgICAgICAgICAgIChldmVudDogUmVhY3QuQ2hhbmdlRXZlbnQ8SFRNTFRleHRBcmVhRWxlbWVudD4pID0+IHtcbiAgICAgICAgICAgICAgICAvLyBJTkZPOiDQlNC70Y8g0LrRgNCw0LnQvdC1INGA0LXQtNC60LjRhSDQutC10LnRgdC+0LIsINC60L7Qs9C00LAgdmFsdWUg0YHQvdCw0YDRg9C20Lgg0L3QtSDQutC+0L3RgtGA0L7Qu9C40YDRg9C10YLRgdGPXG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgc2V0VW5jb250cm9sbGVkVmFsdWUoZXZlbnQ/LnRhcmdldC52YWx1ZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U/LihldmVudCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgW3ZhbHVlLCBvbkNoYW5nZV0sXG4gICAgICAgICk7XG5cbiAgICAgICAgY29uc3QgaGFuZGxlVGV4dEFyZWFGb2N1cyA9ICgpID0+IHtcbiAgICAgICAgICAgIGlmIChyZWFkT25seSB8fCBkaXNhYmxlZCB8fCAhb3V0ZXJSZWY/LmN1cnJlbnQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIG91dGVyUmVmLmN1cnJlbnQuc2Nyb2xsVG8oe1xuICAgICAgICAgICAgICAgIHRvcDogMCxcbiAgICAgICAgICAgICAgICBsZWZ0OiBvdXRlclJlZi5jdXJyZW50Lm9mZnNldExlZnQsXG4gICAgICAgICAgICAgICAgYmVoYXZpb3I6ICdzbW9vdGgnLFxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIG91dGVyUmVmLmN1cnJlbnQuZm9jdXMoKTtcbiAgICAgICAgfTtcblxuICAgICAgICBjb25zdCBkeW5hbWljTGFiZWxDbGFzc2VzID0gZ2V0RHluYW1pY0xhYmVsQ2xhc3NlcyhcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBzaXplLFxuICAgICAgICAgICAgICAgIHJlYWRPbmx5LFxuICAgICAgICAgICAgICAgIGxhYmVsLFxuICAgICAgICAgICAgICAgIGxhYmVsUGxhY2VtZW50LFxuICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSB8fCB1bmNvbnRyb2xsZWRWYWx1ZSB8fCBkZWZhdWx0VmFsdWUsXG4gICAgICAgICAgICAgICAgcm93cyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBmb2N1c2VkLFxuICAgICAgICApO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbmFsVGV4dE5vZGUgPSBpbm5lck9wdGlvbmFsID8gKFxuICAgICAgICAgICAgPFN0eWxlZE9wdGlvbmFsVGV4dCBpbmhlcml0Rm9udD17IWhhc091dGVyTGFiZWx9PlxuICAgICAgICAgICAgICAgIHtCb29sZWFuKGhhc1BsYWNlaG9sZGVyT3B0aW9uYWwgPyBwbGFjZWhvbGRlckxhYmVsIDogbGFiZWwpICYmICdcXHhhMCd9XG4gICAgICAgICAgICAgICAge29wdGlvbmFsVGV4dH1cbiAgICAgICAgICAgIDwvU3R5bGVkT3B0aW9uYWxUZXh0PlxuICAgICAgICApIDogbnVsbDtcblxuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPFJvb3RcbiAgICAgICAgICAgICAgICB2aWV3PXtvdmVycmlkZGVuVmlld31cbiAgICAgICAgICAgICAgICBzaXplPXtzaXplfVxuICAgICAgICAgICAgICAgIGRpc2FibGVkPXtkaXNhYmxlZH1cbiAgICAgICAgICAgICAgICByZWFkT25seT17cmVhZE9ubHl9XG4gICAgICAgICAgICAgICAgY2xlYXI9e2NsZWFyfVxuICAgICAgICAgICAgICAgIHN0eWxlPXt7IHdpZHRoOiBoZWxwZXJXaWR0aCwgLi4uc3R5bGUgfX1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KGNsZWFyQ2xhc3MsIGhhc0RpdmlkZXJDbGFzcywgaGFzSGludENsYXNzLCBjbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9e2hhbmRsZVRleHRBcmVhRm9jdXN9XG4gICAgICAgICAgICAgICAgey4uLihoaW50VGV4dCAmJiB7IGhpbnRWaWV3LCBoaW50U2l6ZSB9KX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICB7KGhhc091dGVyTGFiZWwgfHwgdGl0bGVDYXB0aW9uKSAmJiAoXG4gICAgICAgICAgICAgICAgICAgIDxPdXRlckxhYmVsV3JhcHBlciBpc0lubmVyTGFiZWw9e2xhYmVsUGxhY2VtZW50ID09PSAnaW5uZXInfT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtoYXNPdXRlckxhYmVsICYmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8U3R5bGVkSW5kaWNhdG9yV3JhcHBlcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPFN0eWxlZExhYmVsPntsYWJlbH08L1N0eWxlZExhYmVsPlxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtoaW50VGV4dCAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8U3R5bGVkSGludFdyYXBwZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPEhpbnRDb21wb25lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmPXtoaW50Rm9ya1JlZn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludFRleHQ9e2hpbnRUZXh0fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaW50VHJpZ2dlcj17aGludFRyaWdnZXJ9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzSGludFZpc2libGU9e2lzSGludFZpc2libGV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRUYXJnZXRJY29uPXtoaW50VGFyZ2V0SWNvbn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludFBsYWNlbWVudD17aGludFBsYWNlbWVudH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludEhhc0Fycm93PXtoaW50SGFzQXJyb3d9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRPZmZzZXQ9e2hpbnRPZmZzZXR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRXaWR0aD17aGludFdpZHRofVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaW50Q29udGVudExlZnQ9e2hpbnRDb250ZW50TGVmdH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlSGludFNob3c9e2hhbmRsZUhpbnRTaG93fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVIaW50SGlkZT17aGFuZGxlSGludEhpZGV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZUhpbnRDbGljaz17aGFuZGxlSGludENsaWNrfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L1N0eWxlZEhpbnRXcmFwcGVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7cmVxdWlyZWQgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPFN0eWxlZEluZGljYXRvclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzZXMub3V0ZXJMYWJlbFBsYWNlbWVudCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWRQbGFjZW1lbnRDbGFzcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzSGludENsYXNzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7b3B0aW9uYWxUZXh0Tm9kZX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L1N0eWxlZEluZGljYXRvcldyYXBwZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgICAge3RpdGxlQ2FwdGlvbiAmJiA8VGl0bGVDYXB0aW9uPnt0aXRsZUNhcHRpb259PC9UaXRsZUNhcHRpb24+fVxuICAgICAgICAgICAgICAgICAgICA8L091dGVyTGFiZWxXcmFwcGVyPlxuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgPFN0eWxlZENvbnRhaW5lclxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KHN0eWxlZENvbnRhaW5lciwgLi4uZHluYW1pY0xhYmVsQ2xhc3Nlcyl9XG4gICAgICAgICAgICAgICAgICAgIHdpZHRoPXtoZWxwZXJXaWR0aH1cbiAgICAgICAgICAgICAgICAgICAgb25Gb2N1cz17b25Gb2N1c0hhbmRsZXJ9XG4gICAgICAgICAgICAgICAgICAgIG9uQmx1cj17b25CbHVySGFuZGxlcn1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIHshaGFzT3V0ZXJMYWJlbCAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICA8PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtyZXF1aXJlZCAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxTdHlsZWRJbmRpY2F0b3IgY2xhc3NOYW1lPXtjeChjbGFzc2VzLmlubmVyTGFiZWxQbGFjZW1lbnQsIHJlcXVpcmVkUGxhY2VtZW50Q2xhc3MpfSAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge2hpbnRUZXh0ICYmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPFN0eWxlZEhpbnRXcmFwcGVyIGNsYXNzTmFtZT17Y2xhc3Nlcy5pbm5lckxhYmVsUGxhY2VtZW50fT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxIaW50Q29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmPXtoaW50Rm9ya1JlZn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaW50VGV4dD17aGludFRleHR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludFRyaWdnZXI9e2hpbnRUcmlnZ2VyfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzSGludFZpc2libGU9e2lzSGludFZpc2libGV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludFRhcmdldEljb249e2hpbnRUYXJnZXRJY29ufVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpbnRQbGFjZW1lbnQ9e2hpbnRQbGFjZW1lbnR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludEhhc0Fycm93PXtoaW50SGFzQXJyb3d9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGludE9mZnNldD17aGludE9mZnNldH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaW50V2lkdGg9e2hpbnRXaWR0aH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaW50Q29udGVudExlZnQ9e2hpbnRDb250ZW50TGVmdH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVIaW50U2hvdz17aGFuZGxlSGludFNob3d9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlSGludEhpZGU9e2hhbmRsZUhpbnRIaWRlfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZUhpbnRDbGljaz17aGFuZGxlSGludENsaWNrfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9TdHlsZWRIaW50V3JhcHBlcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgICAgPC8+XG4gICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgIHtjb250ZW50UmlnaHQgJiYgPFN0eWxlZENvbnRlbnQ+e2NvbnRlbnRSaWdodH08L1N0eWxlZENvbnRlbnQ+fVxuICAgICAgICAgICAgICAgICAgICA8U3R5bGVkVGV4dEFyZWFXcmFwcGVyIGNsYXNzTmFtZT17c3R5bGVkVGV4dEFyZWFXcmFwcGVyfSBoYXNIZWxwZXI9e2hhc0hlbHBlcn0+XG4gICAgICAgICAgICAgICAgICAgICAgICA8U3R5bGVkVGV4dEFyZWFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KHN0eWxlZFRleHRBcmVhLCBoYXNSaWdodENvbnRlbnRDbGFzcyl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ9e2lkfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc0NvbnRlbnRSaWdodD17Qm9vbGVhbihjb250ZW50UmlnaHQpfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc0hlbHBlcj17aGFzSGVscGVyfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGx5Q3VzdG9tV2lkdGg9e2FwcGx5Q3VzdG9tV2lkdGh9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmPXttZXJnZVJlZnMob3V0ZXJSZWYsIGlubmVyUmVmKX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlZD17ZGlzYWJsZWR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0PXthdXRvUmVzaXplIHx8IEJvb2xlYW4oY2xlYXIpID8gbWluQXV0byA6IGhlaWdodH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aD17d2lkdGh9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI9e3BsYWNlaG9sZGVyTGFiZWx9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJpYS1kZXNjcmliZWRieT17dGV4dGFyZWFIZWxwZXJJZH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZT17dmFsdWV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhZE9ubHk9e3JlYWRPbmx5fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvd3M9e3Jvd3N9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29scz17Y29sc31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNpemU9e3Jlc2l6ZX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU9e2RlZmF1bHRWYWx1ZX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZT17b25DaGFuZ2VIYW5kbGVyfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsuLi5yZXN0fVxuICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgPC9TdHlsZWRUZXh0QXJlYVdyYXBwZXI+XG4gICAgICAgICAgICAgICAgICAgIHtoYXNIZWxwZXIgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgPFN0eWxlZEhlbHBlcnMgY2xhc3NOYW1lPXtzdHlsZWRIZWxwZXJzfSBpZD17dGV4dGFyZWFIZWxwZXJJZH0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeyhsZWZ0SGVscGVyIHx8IGhlbHBlclRleHQpICYmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPFN0eWxlZExlZnRIZWxwZXI+e2xlZnRIZWxwZXIgfHwgaGVscGVyVGV4dH08L1N0eWxlZExlZnRIZWxwZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7cmlnaHRIZWxwZXIgJiYgPFN0eWxlZFJpZ2h0SGVscGVyPntyaWdodEhlbHBlcn08L1N0eWxlZFJpZ2h0SGVscGVyPn1cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvU3R5bGVkSGVscGVycz5cbiAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAge3BsYWNlaG9sZGVyTGFiZWwgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgPFN0eWxlZFBsYWNlaG9sZGVyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzQ29udGVudFJpZ2h0PXtCb29sZWFuKGNvbnRlbnRSaWdodCl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtzdHlsZWRQbGFjZWhvbGRlcn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sRm9yPXtpZH1cbiAgICAgICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7cGxhY2Vob2xkZXJMYWJlbH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IWhhc091dGVyTGFiZWwgJiYgb3B0aW9uYWxUZXh0Tm9kZX1cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvU3R5bGVkUGxhY2Vob2xkZXI+XG4gICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgPC9TdHlsZWRDb250YWluZXI+XG4gICAgICAgICAgICA8L1Jvb3Q+XG4gICAgICAgICk7XG4gICAgfSk7XG5cbmV4cG9ydCBjb25zdCB0ZXh0QXJlYUNvbmZpZyA9IHtcbiAgICBuYW1lOiAnVGV4dEFyZWEnLFxuICAgIHRhZzogJ2RpdicsXG4gICAgbGF5b3V0OiB0ZXh0QXJlYVJvb3QsXG4gICAgYmFzZSxcbiAgICB2YXJpYXRpb25zOiB7XG4gICAgICAgIHNpemU6IHtcbiAgICAgICAgICAgIGNzczogc2l6ZUNTUyxcbiAgICAgICAgfSxcbiAgICAgICAgdmlldzoge1xuICAgICAgICAgICAgY3NzOiB2aWV3Q1NTLFxuICAgICAgICB9LFxuICAgICAgICBjbGVhcjoge1xuICAgICAgICAgICAgY3NzOiBjbGVhckNTUyxcbiAgICAgICAgICAgIGF0dHJzOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICBkaXNhYmxlZDoge1xuICAgICAgICAgICAgY3NzOiBkaXNhYmxlZENTUyxcbiAgICAgICAgICAgIGF0dHJzOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICByZWFkT25seToge1xuICAgICAgICAgICAgYXR0cnM6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICAgIGhpbnRWaWV3OiB7XG4gICAgICAgICAgICBjc3M6IGhpbnRWaWV3Q1NTLFxuICAgICAgICB9LFxuICAgICAgICBoaW50U2l6ZToge1xuICAgICAgICAgICAgY3NzOiBoaW50U2l6ZUNTUyxcbiAgICAgICAgfSxcbiAgICB9LFxuICAgIGRlZmF1bHRzOiB7XG4gICAgICAgIHNpemU6ICdtJyxcbiAgICAgICAgdmlldzogJ3ByaW1hcnknLFxuICAgIH0sXG59O1xuIl19 */"));
55
55
 
56
56
  // TODO: Удалить после отказа от старых библиотек plasma-web / plasma-b2c
57
57
  var fallbackStatusMap = {
@@ -199,7 +199,7 @@ var textAreaRoot = exports.textAreaRoot = function textAreaRoot(Root) {
199
199
  setHelperWidth("".concat(elementWidth / _hooks2.ROOT_FONT_SIZE, "rem"));
200
200
  }
201
201
  });
202
- (0, _hooks2.useAutoResize)(autoResize || Boolean(clear), outerRef, value, minAuto, maxAuto);
202
+ (0, _hooks2.useAutoResize)(autoResize || Boolean(clear), outerRef, value, minAuto, maxAuto, resize);
203
203
  var onFocusHandler = (0, _react.useCallback)(function () {
204
204
  setFocused(true);
205
205
  }, []);
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useAutoResize = exports.ROOT_FONT_SIZE = void 0;
7
7
  var _react = /*#__PURE__*/require("react");
8
8
  var ROOT_FONT_SIZE = exports.ROOT_FONT_SIZE = 16;
9
- var useAutoResize = exports.useAutoResize = function useAutoResize(active, ref, value, minAuto, maxAuto) {
9
+ var useAutoResize = exports.useAutoResize = function useAutoResize(active, ref, value, minAuto, maxAuto, resize) {
10
10
  var previousHeight = (0, _react.useRef)();
11
11
  (0, _react.useEffect)(function () {
12
12
  if (active && ref && ref.current) {
13
13
  // проверка на пользовательский resize (вручную)
14
14
  var height = ref.current.clientHeight / ROOT_FONT_SIZE;
15
- if (previousHeight.current !== undefined && previousHeight.current !== height) {
15
+ if (resize && resize !== 'none' && previousHeight.current !== undefined && previousHeight.current !== height) {
16
16
  return;
17
17
  }
18
18
  var style = getComputedStyle(ref.current);
@@ -27,5 +27,5 @@ var useAutoResize = exports.useAutoResize = function useAutoResize(active, ref,
27
27
  ref.current.style.height = "".concat(newHeight, "rem");
28
28
  previousHeight.current = newHeight;
29
29
  }
30
- }, [ref, active, value, minAuto, maxAuto]);
30
+ }, [ref, resize, active, value, minAuto, maxAuto]);
31
31
  };