@hh.ru/magritte-ui-textarea 3.2.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/TextArea.js +4 -4
- package/TextArea.js.map +1 -1
- package/index.css +110 -110
- package/package.json +5 -5
package/TextArea.js
CHANGED
|
@@ -19,10 +19,10 @@ import './types.js';
|
|
|
19
19
|
import './TextAreaGrowLimiter.js';
|
|
20
20
|
import '@hh.ru/magritte-common-func-utils';
|
|
21
21
|
|
|
22
|
-
var styles = {"textarea":"magritte-textarea___ugvor_3-
|
|
22
|
+
var styles = {"textarea":"magritte-textarea___ugvor_3-3-0","textarea-elevated":"magritte-textarea-elevated___S0jk-_3-3-0","textareaElevated":"magritte-textarea-elevated___S0jk-_3-3-0","textarea-small":"magritte-textarea-small___Q-tsg_3-3-0","textareaSmall":"magritte-textarea-small___Q-tsg_3-3-0","textarea-medium":"magritte-textarea-medium___GNzAm_3-3-0","textareaMedium":"magritte-textarea-medium___GNzAm_3-3-0","textarea-large":"magritte-textarea-large___ugT-5_3-3-0","textareaLarge":"magritte-textarea-large___ugT-5_3-3-0","has-grip":"magritte-has-grip___ATMYQ_3-3-0","hasGrip":"magritte-has-grip___ATMYQ_3-3-0","textarea-limited":"magritte-textarea-limited___cU1Rg_3-3-0","textareaLimited":"magritte-textarea-limited___cU1Rg_3-3-0","maxed-height":"magritte-maxed-height___v1wYG_3-3-0","maxedHeight":"magritte-maxed-height___v1wYG_3-3-0","textarea-focused":"magritte-textarea-focused___eiGyC_3-3-0","textareaFocused":"magritte-textarea-focused___eiGyC_3-3-0","textarea-invalid":"magritte-textarea-invalid___iKOPh_3-3-0","textareaInvalid":"magritte-textarea-invalid___iKOPh_3-3-0","textarea-disabled":"magritte-textarea-disabled___XN0cg_3-3-0","textareaDisabled":"magritte-textarea-disabled___XN0cg_3-3-0","textarea-position-container-wrapper":"magritte-textarea-position-container-wrapper___4Dsui_3-3-0","textareaPositionContainerWrapper":"magritte-textarea-position-container-wrapper___4Dsui_3-3-0","textarea-position-container":"magritte-textarea-position-container___cEpbv_3-3-0","textareaPositionContainer":"magritte-textarea-position-container___cEpbv_3-3-0","native-element":"magritte-native-element___a0RAE_3-3-0","nativeElement":"magritte-native-element___a0RAE_3-3-0","textarea-label":"magritte-textarea-label___sgTIH_3-3-0","textareaLabel":"magritte-textarea-label___sgTIH_3-3-0","textarea-label-elevated":"magritte-textarea-label-elevated___0lxOI_3-3-0","textareaLabelElevated":"magritte-textarea-label-elevated___0lxOI_3-3-0","textarea-limit":"magritte-textarea-limit___IjPJy_3-3-0","textareaLimit":"magritte-textarea-limit___IjPJy_3-3-0","textarea-limit-error":"magritte-textarea-limit-error___vLvZU_3-3-0","textareaLimitError":"magritte-textarea-limit-error___vLvZU_3-3-0","textarea-layout-fill-both":"magritte-textarea-layout-fill-both___ERS-q_3-3-0","textareaLayoutFillBoth":"magritte-textarea-layout-fill-both___ERS-q_3-3-0","textarea-layout-fill-vertical":"magritte-textarea-layout-fill-vertical___HmNtp_3-3-0","textareaLayoutFillVertical":"magritte-textarea-layout-fill-vertical___HmNtp_3-3-0","textarea-layout-fill-horizontal":"magritte-textarea-layout-fill-horizontal___imBH2_3-3-0","textareaLayoutFillHorizontal":"magritte-textarea-layout-fill-horizontal___imBH2_3-3-0","textarea-layout-hug":"magritte-textarea-layout-hug___tdCMY_3-3-0","textareaLayoutHug":"magritte-textarea-layout-hug___tdCMY_3-3-0","textarea-wrapper":"magritte-textarea-wrapper___yD7G6_3-3-0","textareaWrapper":"magritte-textarea-wrapper___yD7G6_3-3-0","value-clone-wrapper":"magritte-value-clone-wrapper___2ZZvS_3-3-0","valueCloneWrapper":"magritte-value-clone-wrapper___2ZZvS_3-3-0","value-clone-container":"magritte-value-clone-container___PVM97_3-3-0","valueCloneContainer":"magritte-value-clone-container___PVM97_3-3-0","side-padding":"magritte-side-padding___O-HUP_3-3-0","sidePadding":"magritte-side-padding___O-HUP_3-3-0","textarea-animation-timeout":"magritte-textarea-animation-timeout___zudbr_3-3-0","textareaAnimationTimeout":"magritte-textarea-animation-timeout___zudbr_3-3-0","textarea-rigging-container":"magritte-textarea-rigging-container___-1S6i_3-3-0","textareaRiggingContainer":"magritte-textarea-rigging-container___-1S6i_3-3-0","label-no-wrap":"magritte-label-no-wrap___RxZ3A_3-3-0","labelNoWrap":"magritte-label-no-wrap___RxZ3A_3-3-0","textarea-grip":"magritte-textarea-grip___iL7lq_3-3-0","textareaGrip":"magritte-textarea-grip___iL7lq_3-3-0","textarea-grip-icon":"magritte-textarea-grip-icon___YK-9w_3-3-0","textareaGripIcon":"magritte-textarea-grip-icon___YK-9w_3-3-0","textarea-limit-enter":"magritte-textarea-limit-enter___CygGz_3-3-0","textareaLimitEnter":"magritte-textarea-limit-enter___CygGz_3-3-0","textarea-limit-exit":"magritte-textarea-limit-exit___RMp-R_3-3-0","textareaLimitExit":"magritte-textarea-limit-exit___RMp-R_3-3-0","textarea-limit-enter-active":"magritte-textarea-limit-enter-active___8vN-t_3-3-0","textareaLimitEnterActive":"magritte-textarea-limit-enter-active___8vN-t_3-3-0","textarea-limit-exit-active":"magritte-textarea-limit-exit-active___a5kBr_3-3-0","textareaLimitExitActive":"magritte-textarea-limit-exit-active___a5kBr_3-3-0"};
|
|
23
23
|
|
|
24
24
|
const ZERO_WIDTH_SPACE = '\u200B';
|
|
25
|
-
const TextAreaComponent = ({ onChange, onFocus, onBlur, onValidate, value, placeholder, disabled = false, elevatePlaceholder = false, invalid = false, invalidLimit = false, maxLength, description, errorMessage, resize = 'none', layout = 'fixed', size = 'large', minHeight: _minHeight, maxHeight, ...restProps }, ref) => {
|
|
25
|
+
const TextAreaComponent = ({ onChange, onFocus, onBlur, onValidate, value, placeholder, disabled = false, elevatePlaceholder = false, invalid = false, invalidLimit = false, maxLength, description, errorMessage, resize = 'none', layout = 'fixed', size = 'large', minHeight: _minHeight, maxHeight, 'aria-describedby': ariaDescribedBy, ...restProps }, ref) => {
|
|
26
26
|
const { isMobile } = useBreakpoint();
|
|
27
27
|
const forceDisabled = useDisabled();
|
|
28
28
|
const isComponentDisabled = forceDisabled || !!disabled;
|
|
@@ -118,9 +118,9 @@ const TextAreaComponent = ({ onChange, onFocus, onBlur, onValidate, value, place
|
|
|
118
118
|
const invalidState = invalid || invalidLimit;
|
|
119
119
|
const ariaProps = useInputAriaProps({
|
|
120
120
|
invalid: invalidState || internalInvalid,
|
|
121
|
-
hasDescription: !!description,
|
|
121
|
+
hasDescription: !!description || !!errorMessage || !!ariaDescribedBy,
|
|
122
122
|
hasPlaceholder: !!placeholder,
|
|
123
|
-
descriptionId
|
|
123
|
+
descriptionId: ariaDescribedBy || `input-description-${descriptionId}`,
|
|
124
124
|
labelId,
|
|
125
125
|
});
|
|
126
126
|
const hasElevatedPlaceholderClass = (isFocused || value !== '') && placeholderIsElevated;
|
package/TextArea.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sources":["../src/TextArea.tsx"],"sourcesContent":["import {\n forwardRef,\n ReactElement,\n useEffect,\n useId,\n useRef,\n useState,\n type TextareaHTMLAttributes,\n type ForwardedRef,\n type CSSProperties,\n} from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport classnames from 'classnames';\n\nimport { useDisabled } from '@hh.ru/magritte-common-use-disabled';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { useTranslation } from '@hh.ru/magritte-common-use-translation';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { FormHelper } from '@hh.ru/magritte-ui-form-helper';\nimport { GripSize24 } from '@hh.ru/magritte-ui-icon/private';\nimport { useInputAriaProps } from '@hh.ru/magritte-ui-input/useInputAriaProps';\nimport { Scrollbar, useScrollbar } from '@hh.ru/magritte-ui-scrollbar';\nimport { type TextAreaLayout, type ControlledTextAreaProps } from '@hh.ru/magritte-ui-textarea/types';\nimport { useFocus } from '@hh.ru/magritte-ui-textarea/useFocus';\nimport { useHeightObserver } from '@hh.ru/magritte-ui-textarea/useHeightObserver';\nimport { useLimitGrow } from '@hh.ru/magritte-ui-textarea/useLimitGrow';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './textarea.less';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\nconst TextAreaComponent = <Layout extends TextAreaLayout>(\n {\n onChange,\n onFocus,\n onBlur,\n onValidate,\n value,\n placeholder,\n disabled = false,\n elevatePlaceholder = false,\n invalid = false,\n invalidLimit = false,\n maxLength,\n description,\n errorMessage,\n resize = 'none',\n layout = 'fixed' as Layout,\n size = 'large',\n minHeight: _minHeight,\n maxHeight,\n ...restProps\n }: ControlledTextAreaProps<Layout> &\n Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, keyof ControlledTextAreaProps<'fixed'>>,\n ref: ForwardedRef<HTMLTextAreaElement>\n) => {\n const { isMobile } = useBreakpoint();\n const forceDisabled = useDisabled();\n const isComponentDisabled = forceDisabled || !!disabled;\n const [internalInvalid, setInternalInvalid] = useState(false);\n const [isFocusVisible, setFocusVisible] = useState(false);\n const limitRef = useRef<HTMLDivElement>(null);\n const previousInvalid = useRef(internalInvalid);\n const textAreaRef = useRef<HTMLTextAreaElement>(null);\n const resizableDivRef = useRef<HTMLDivElement>(null);\n const resizableDivSizes = useRef<{ width?: number; height?: number } | null>(null);\n const resizableDivWasResized = useRef(false);\n const { hasVerticalScroll, verticalScrollbarProps, ...scrollbar } = useScrollbar({\n axis: isComponentDisabled ? 'none' : 'vertical',\n });\n const textAreaRefCallback = useMultipleRefs(ref, textAreaRef, scrollbar.scrollContainerRef);\n const descriptionId = useId();\n const labelId = useId();\n const [animationTimeout, setAnimationTimeout] = useState(100);\n const currentResizeValue = isMobile ? 'none' : resize;\n const isResizable = currentResizeValue !== 'none';\n const contentCloneRef = useRef<HTMLPreElement>(null);\n const contentCloneWrapperRef = useRef<HTMLDivElement>(null);\n const { minHeight, maxedHeight } = useHeightObserver({\n size,\n minHeight: _minHeight,\n layout,\n contentCloneRef,\n onHeightChange: () => scrollbar.resizeCallbackRef.current?.(),\n });\n const { maxHeightRef, allowScrollRef } = useLimitGrow({\n layout,\n contentCloneRef,\n contentCloneWrapperRef,\n textAreaRef,\n resizableDivRef,\n minHeight,\n });\n const trlOf = useTranslation('TextArea', 'of');\n\n useEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.textareaAnimationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n const animationTimeout = parseInt(style.getPropertyValue(`--animation-duration`), 10);\n if (Number.isInteger(animationTimeout)) {\n setAnimationTimeout(animationTimeout);\n }\n document.body.removeChild(animationTimeoutElement);\n }, []);\n\n const { focusHandler, blurHandler, isFocused } = useFocus<HTMLTextAreaElement>(onFocus, onBlur);\n\n const handleClick = () => {\n if (resizableDivWasResized.current) {\n resizableDivWasResized.current = false;\n return;\n }\n textAreaRef.current?.focus();\n };\n\n const handleMouseUp = () => {\n if (\n resizableDivRef.current?.offsetWidth !== resizableDivSizes.current?.width ||\n resizableDivRef.current?.offsetHeight !== resizableDivSizes.current?.height\n ) {\n resizableDivWasResized.current = true;\n }\n };\n\n const handleMouseDown = () => {\n resizableDivSizes.current = {\n width: resizableDivRef.current?.offsetWidth,\n height: resizableDivRef.current?.offsetHeight,\n };\n };\n\n useEffect(() => {\n if (maxLength) {\n const invalid = !isFocused && value.length > maxLength;\n setInternalInvalid(invalid);\n\n if (previousInvalid.current !== invalid) {\n onValidate?.({ invalidLimit: invalid });\n }\n previousInvalid.current = invalid;\n }\n }, [onValidate, value, internalInvalid, maxLength, isFocused]);\n\n useEffect(() => {\n if (textAreaRef.current) {\n setFocusVisible(isFocused && textAreaRef.current.classList.contains('focus-visible'));\n }\n }, [isFocused]);\n\n useEffect(() => {\n // для layout === 'hug' resizeCallback вызывается в useHeightObserver, т.к. нужно ожидать перерисовку оберток\n if (layout !== 'hug') {\n scrollbar.resizeCallbackRef.current?.();\n }\n }, [layout, scrollbar.resizeCallbackRef, value]);\n\n const placeholderIsElevated = !!elevatePlaceholder && !!placeholder && size === 'large';\n const showLabel = placeholderIsElevated || value === '';\n\n const invalidState = invalid || invalidLimit;\n const ariaProps = useInputAriaProps({\n invalid: invalidState || internalInvalid,\n hasDescription: !!description,\n hasPlaceholder: !!placeholder,\n descriptionId,\n labelId,\n });\n\n const hasElevatedPlaceholderClass = (isFocused || value !== '') && placeholderIsElevated;\n\n return (\n <div\n data-qa=\"textarea-wrapper\"\n data-interactive={true}\n className={classnames(styles.textarea, styles[`textarea-${size}`], {\n [styles.textareaFocused]: isFocused,\n [styles.textareaDisabled]: isComponentDisabled,\n [styles.textareaInvalid]: !!(invalidState || internalInvalid),\n [styles.textareaLimitError]:\n invalidLimit || internalInvalid || (maxLength ? value.length > maxLength : false),\n [styles.textareaLimited]: !!maxLength && maxedHeight,\n [styles.textareaLayoutFillBoth]: layout === 'fill-both',\n [styles.textareaLayoutFillVertical]: layout === 'fill-vertical',\n [styles.textareaLayoutFillHorizontal]: layout === 'fill-horizontal',\n [styles.textareaLayoutHug]: layout === 'hug',\n [styles.textareaElevated]: placeholderIsElevated,\n [styles.hasGrip]: isResizable,\n [styles.maxedHeight]: size === 'large' && maxedHeight,\n })}\n >\n <div\n className={classnames(styles.textareaPositionContainerWrapper, scrollbar.hoverContainerCssClass, {\n 'focus-visible': isFocusVisible,\n })}\n >\n <div\n className={classnames(styles.textareaPositionContainer)}\n onClick={handleClick}\n onMouseDown={isResizable ? handleMouseDown : undefined}\n onMouseUp={isResizable ? handleMouseUp : undefined}\n style={\n {\n height: maxHeightRef.current || (maxedHeight ? 'auto' : minHeight),\n minHeight,\n '--magritte-textarea-max-height': maxHeight\n ? `${Math.max(maxHeight, minHeight)}px`\n : 'auto',\n resize: currentResizeValue,\n } as CSSProperties\n }\n ref={resizableDivRef}\n >\n <div className={styles.textareaWrapper} data-qa=\"textarea-native-wrapper\">\n <textarea\n {...restProps}\n {...ariaProps}\n disabled={isComponentDisabled}\n suppressHydrationWarning\n className={classnames(styles.nativeElement, styles.sidePadding)}\n value={value}\n onChange={onChange}\n onFocus={focusHandler}\n onBlur={blurHandler}\n style={{ overflowY: layout !== 'hug' || allowScrollRef.current ? 'auto' : 'hidden' }}\n ref={textAreaRefCallback}\n />\n {layout === 'hug' && (\n <div\n className={classnames(styles.valueCloneWrapper, styles.sidePadding)}\n ref={contentCloneWrapperRef}\n >\n <pre className={styles.valueCloneContainer} ref={contentCloneRef}>\n {`${value}${ZERO_WIDTH_SPACE}`}\n </pre>\n </div>\n )}\n {showLabel && (\n <div className={classnames(styles.textareaRiggingContainer, styles.sidePadding)}>\n <label\n className={classnames(styles.textareaLabel, {\n [styles.labelNoWrap]: elevatePlaceholder,\n [styles.textareaLabelElevated]: hasElevatedPlaceholderClass,\n })}\n id={ariaProps['aria-labelledby']}\n >\n {placeholder}\n </label>\n </div>\n )}\n </div>\n {hasVerticalScroll && <Scrollbar {...verticalScrollbarProps} />}\n </div>\n {!!maxLength && maxedHeight && (\n <CSSTransition\n in={isFocused || value.length > maxLength}\n timeout={animationTimeout}\n classNames={{\n enter: styles.textareaLimitEnter,\n enterActive: styles.textareaLimitEnterActive,\n exit: styles.textareaLimitExit,\n exitActive: styles.textareaLimitExitActive,\n }}\n unmountOnExit\n nodeRef={limitRef}\n >\n <div className={styles.textareaLimit} ref={limitRef}>\n <Text typography=\"label-3-regular\">\n {value.length}\n {trlOf}\n {maxLength}\n </Text>\n </div>\n </CSSTransition>\n )}\n {isResizable && (\n <div className={styles.textareaGrip}>\n <div className={styles.textareaGripIcon}>\n <GripSize24 />\n </div>\n </div>\n )}\n </div>\n <FormHelper\n description={description}\n errorMessage={errorMessage}\n descriptionId={ariaProps['aria-describedby']}\n disabled={isComponentDisabled}\n invalid={invalidState}\n data-qa=\"textarea-hint-container\"\n />\n </div>\n );\n};\n\nconst TextArea = forwardRef(TextAreaComponent) as (<Layout extends TextAreaLayout>(\n props: ControlledTextAreaProps<Layout> &\n Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, keyof ControlledTextAreaProps<'fixed'>> & {\n ref?: React.ForwardedRef<HTMLTextAreaElement>;\n }\n) => ReactElement | null) & { displayName: string };\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAElC,MAAM,iBAAiB,GAAG,CACtB,EACI,QAAQ,EACR,OAAO,EACP,MAAM,EACN,UAAU,EACV,KAAK,EACL,WAAW,EACX,QAAQ,GAAG,KAAK,EAChB,kBAAkB,GAAG,KAAK,EAC1B,OAAO,GAAG,KAAK,EACf,YAAY,GAAG,KAAK,EACpB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,GAAG,MAAM,EACf,MAAM,GAAG,OAAiB,EAC1B,IAAI,GAAG,OAAO,EACd,SAAS,EAAE,UAAU,EACrB,SAAS,EACT,GAAG,SAAS,EAE6E,EAC7F,GAAsC,KACtC;AACA,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;AACrC,IAAA,MAAM,aAAa,GAAG,WAAW,EAAE,CAAC;AACpC,IAAA,MAAM,mBAAmB,GAAG,aAAa,IAAI,CAAC,CAAC,QAAQ,CAAC;IACxD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC1D,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;AAC9C,IAAA,MAAM,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAChD,IAAA,MAAM,WAAW,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAC;AACtD,IAAA,MAAM,eAAe,GAAG,MAAM,CAAiB,IAAI,CAA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4BAChC,WAAW,EAAE,MAAM,CAAC,wBAAwB;4BAC5C,IAAI,EAAE,MAAM,CAAC,iBAAiB;4BAC9B,UAAU,EAAE,MAAM,CAAC,uBAAuB;AAC7C,yBAAA,EACD,aAAa,EACb,IAAA,EAAA,OAAO,EAAE,QAAQ,EAAA,QAAA,EAEjBA,aAAK,SAAS,EAAE,MAAM,CAAC,aAAa,EAAE,GAAG,EAAE,QAAQ,EAC/C,QAAA,EAAAD,IAAA,CAAC,IAAI,EAAC,EAAA,UAAU,EAAC,iBAAiB,EAAA,QAAA,EAAA,CAC7B,KAAK,CAAC,MAAM,EACZ,KAAK,EACL,SAAS,CACP,EAAA,CAAA,EAAA,CACL,GACM,CACnB,EACA,WAAW,KACRC,aAAK,SAAS,EAAE,MAAM,CAAC,YAAY,YAC/BA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,gBAAgB,EACnC,QAAA,EAAAA,GAAA,CAAC,UAAU,EAAG,EAAA,CAAA,EAAA,CACZ,GACJ,CACT,CAAA,EAAA,CACC,EACNA,GAAC,CAAA,UAAU,IACP,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,SAAS,CAAC,kBAAkB,CAAC,EAC5C,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,YAAY,EAAA,SAAA,EACb,yBAAyB,EACnC,CAAA,CAAA,EAAA,CACA,EACR;AACN,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,UAAU,CAAC,iBAAiB,EAKO;AAEpD,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
|
|
1
|
+
{"version":3,"file":"TextArea.js","sources":["../src/TextArea.tsx"],"sourcesContent":["import {\n forwardRef,\n ReactElement,\n useEffect,\n useId,\n useRef,\n useState,\n type TextareaHTMLAttributes,\n type ForwardedRef,\n type CSSProperties,\n} from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport classnames from 'classnames';\n\nimport { useDisabled } from '@hh.ru/magritte-common-use-disabled';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { useTranslation } from '@hh.ru/magritte-common-use-translation';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { FormHelper } from '@hh.ru/magritte-ui-form-helper';\nimport { GripSize24 } from '@hh.ru/magritte-ui-icon/private';\nimport { useInputAriaProps } from '@hh.ru/magritte-ui-input/useInputAriaProps';\nimport { Scrollbar, useScrollbar } from '@hh.ru/magritte-ui-scrollbar';\nimport { type TextAreaLayout, type ControlledTextAreaProps } from '@hh.ru/magritte-ui-textarea/types';\nimport { useFocus } from '@hh.ru/magritte-ui-textarea/useFocus';\nimport { useHeightObserver } from '@hh.ru/magritte-ui-textarea/useHeightObserver';\nimport { useLimitGrow } from '@hh.ru/magritte-ui-textarea/useLimitGrow';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './textarea.less';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\nconst TextAreaComponent = <Layout extends TextAreaLayout>(\n {\n onChange,\n onFocus,\n onBlur,\n onValidate,\n value,\n placeholder,\n disabled = false,\n elevatePlaceholder = false,\n invalid = false,\n invalidLimit = false,\n maxLength,\n description,\n errorMessage,\n resize = 'none',\n layout = 'fixed' as Layout,\n size = 'large',\n minHeight: _minHeight,\n maxHeight,\n 'aria-describedby': ariaDescribedBy,\n ...restProps\n }: ControlledTextAreaProps<Layout> &\n Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, keyof ControlledTextAreaProps<'fixed'>>,\n ref: ForwardedRef<HTMLTextAreaElement>\n) => {\n const { isMobile } = useBreakpoint();\n const forceDisabled = useDisabled();\n const isComponentDisabled = forceDisabled || !!disabled;\n const [internalInvalid, setInternalInvalid] = useState(false);\n const [isFocusVisible, setFocusVisible] = useState(false);\n const limitRef = useRef<HTMLDivElement>(null);\n const previousInvalid = useRef(internalInvalid);\n const textAreaRef = useRef<HTMLTextAreaElement>(null);\n const resizableDivRef = useRef<HTMLDivElement>(null);\n const resizableDivSizes = useRef<{ width?: number; height?: number } | null>(null);\n const resizableDivWasResized = useRef(false);\n const { hasVerticalScroll, verticalScrollbarProps, ...scrollbar } = useScrollbar({\n axis: isComponentDisabled ? 'none' : 'vertical',\n });\n const textAreaRefCallback = useMultipleRefs(ref, textAreaRef, scrollbar.scrollContainerRef);\n const descriptionId = useId();\n const labelId = useId();\n const [animationTimeout, setAnimationTimeout] = useState(100);\n const currentResizeValue = isMobile ? 'none' : resize;\n const isResizable = currentResizeValue !== 'none';\n const contentCloneRef = useRef<HTMLPreElement>(null);\n const contentCloneWrapperRef = useRef<HTMLDivElement>(null);\n const { minHeight, maxedHeight } = useHeightObserver({\n size,\n minHeight: _minHeight,\n layout,\n contentCloneRef,\n onHeightChange: () => scrollbar.resizeCallbackRef.current?.(),\n });\n const { maxHeightRef, allowScrollRef } = useLimitGrow({\n layout,\n contentCloneRef,\n contentCloneWrapperRef,\n textAreaRef,\n resizableDivRef,\n minHeight,\n });\n const trlOf = useTranslation('TextArea', 'of');\n\n useEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.textareaAnimationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n const animationTimeout = parseInt(style.getPropertyValue(`--animation-duration`), 10);\n if (Number.isInteger(animationTimeout)) {\n setAnimationTimeout(animationTimeout);\n }\n document.body.removeChild(animationTimeoutElement);\n }, []);\n\n const { focusHandler, blurHandler, isFocused } = useFocus<HTMLTextAreaElement>(onFocus, onBlur);\n\n const handleClick = () => {\n if (resizableDivWasResized.current) {\n resizableDivWasResized.current = false;\n return;\n }\n textAreaRef.current?.focus();\n };\n\n const handleMouseUp = () => {\n if (\n resizableDivRef.current?.offsetWidth !== resizableDivSizes.current?.width ||\n resizableDivRef.current?.offsetHeight !== resizableDivSizes.current?.height\n ) {\n resizableDivWasResized.current = true;\n }\n };\n\n const handleMouseDown = () => {\n resizableDivSizes.current = {\n width: resizableDivRef.current?.offsetWidth,\n height: resizableDivRef.current?.offsetHeight,\n };\n };\n\n useEffect(() => {\n if (maxLength) {\n const invalid = !isFocused && value.length > maxLength;\n setInternalInvalid(invalid);\n\n if (previousInvalid.current !== invalid) {\n onValidate?.({ invalidLimit: invalid });\n }\n previousInvalid.current = invalid;\n }\n }, [onValidate, value, internalInvalid, maxLength, isFocused]);\n\n useEffect(() => {\n if (textAreaRef.current) {\n setFocusVisible(isFocused && textAreaRef.current.classList.contains('focus-visible'));\n }\n }, [isFocused]);\n\n useEffect(() => {\n // для layout === 'hug' resizeCallback вызывается в useHeightObserver, т.к. нужно ожидать перерисовку оберток\n if (layout !== 'hug') {\n scrollbar.resizeCallbackRef.current?.();\n }\n }, [layout, scrollbar.resizeCallbackRef, value]);\n\n const placeholderIsElevated = !!elevatePlaceholder && !!placeholder && size === 'large';\n const showLabel = placeholderIsElevated || value === '';\n\n const invalidState = invalid || invalidLimit;\n const ariaProps = useInputAriaProps({\n invalid: invalidState || internalInvalid,\n hasDescription: !!description || !!errorMessage || !!ariaDescribedBy,\n hasPlaceholder: !!placeholder,\n descriptionId: ariaDescribedBy || `input-description-${descriptionId}`,\n labelId,\n });\n\n const hasElevatedPlaceholderClass = (isFocused || value !== '') && placeholderIsElevated;\n\n return (\n <div\n data-qa=\"textarea-wrapper\"\n data-interactive={true}\n className={classnames(styles.textarea, styles[`textarea-${size}`], {\n [styles.textareaFocused]: isFocused,\n [styles.textareaDisabled]: isComponentDisabled,\n [styles.textareaInvalid]: !!(invalidState || internalInvalid),\n [styles.textareaLimitError]:\n invalidLimit || internalInvalid || (maxLength ? value.length > maxLength : false),\n [styles.textareaLimited]: !!maxLength && maxedHeight,\n [styles.textareaLayoutFillBoth]: layout === 'fill-both',\n [styles.textareaLayoutFillVertical]: layout === 'fill-vertical',\n [styles.textareaLayoutFillHorizontal]: layout === 'fill-horizontal',\n [styles.textareaLayoutHug]: layout === 'hug',\n [styles.textareaElevated]: placeholderIsElevated,\n [styles.hasGrip]: isResizable,\n [styles.maxedHeight]: size === 'large' && maxedHeight,\n })}\n >\n <div\n className={classnames(styles.textareaPositionContainerWrapper, scrollbar.hoverContainerCssClass, {\n 'focus-visible': isFocusVisible,\n })}\n >\n <div\n className={classnames(styles.textareaPositionContainer)}\n onClick={handleClick}\n onMouseDown={isResizable ? handleMouseDown : undefined}\n onMouseUp={isResizable ? handleMouseUp : undefined}\n style={\n {\n height: maxHeightRef.current || (maxedHeight ? 'auto' : minHeight),\n minHeight,\n '--magritte-textarea-max-height': maxHeight\n ? `${Math.max(maxHeight, minHeight)}px`\n : 'auto',\n resize: currentResizeValue,\n } as CSSProperties\n }\n ref={resizableDivRef}\n >\n <div className={styles.textareaWrapper} data-qa=\"textarea-native-wrapper\">\n <textarea\n {...restProps}\n {...ariaProps}\n disabled={isComponentDisabled}\n suppressHydrationWarning\n className={classnames(styles.nativeElement, styles.sidePadding)}\n value={value}\n onChange={onChange}\n onFocus={focusHandler}\n onBlur={blurHandler}\n style={{ overflowY: layout !== 'hug' || allowScrollRef.current ? 'auto' : 'hidden' }}\n ref={textAreaRefCallback}\n />\n {layout === 'hug' && (\n <div\n className={classnames(styles.valueCloneWrapper, styles.sidePadding)}\n ref={contentCloneWrapperRef}\n >\n <pre className={styles.valueCloneContainer} ref={contentCloneRef}>\n {`${value}${ZERO_WIDTH_SPACE}`}\n </pre>\n </div>\n )}\n {showLabel && (\n <div className={classnames(styles.textareaRiggingContainer, styles.sidePadding)}>\n <label\n className={classnames(styles.textareaLabel, {\n [styles.labelNoWrap]: elevatePlaceholder,\n [styles.textareaLabelElevated]: hasElevatedPlaceholderClass,\n })}\n id={ariaProps['aria-labelledby']}\n >\n {placeholder}\n </label>\n </div>\n )}\n </div>\n {hasVerticalScroll && <Scrollbar {...verticalScrollbarProps} />}\n </div>\n {!!maxLength && maxedHeight && (\n <CSSTransition\n in={isFocused || value.length > maxLength}\n timeout={animationTimeout}\n classNames={{\n enter: styles.textareaLimitEnter,\n enterActive: styles.textareaLimitEnterActive,\n exit: styles.textareaLimitExit,\n exitActive: styles.textareaLimitExitActive,\n }}\n unmountOnExit\n nodeRef={limitRef}\n >\n <div className={styles.textareaLimit} ref={limitRef}>\n <Text typography=\"label-3-regular\">\n {value.length}\n {trlOf}\n {maxLength}\n </Text>\n </div>\n </CSSTransition>\n )}\n {isResizable && (\n <div className={styles.textareaGrip}>\n <div className={styles.textareaGripIcon}>\n <GripSize24 />\n </div>\n </div>\n )}\n </div>\n <FormHelper\n description={description}\n errorMessage={errorMessage}\n descriptionId={ariaProps['aria-describedby']}\n disabled={isComponentDisabled}\n invalid={invalidState}\n data-qa=\"textarea-hint-container\"\n />\n </div>\n );\n};\n\nconst TextArea = forwardRef(TextAreaComponent) as (<Layout extends TextAreaLayout>(\n props: ControlledTextAreaProps<Layout> &\n Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, keyof ControlledTextAreaProps<'fixed'>> & {\n ref?: React.ForwardedRef<HTMLTextAreaElement>;\n }\n) => ReactElement | null) & { displayName: string };\n\nTextArea.displayName = 'TextArea';\n\nexport { TextArea };\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAElC,MAAM,iBAAiB,GAAG,CACtB,EACI,QAAQ,EACR,OAAO,EACP,MAAM,EACN,UAAU,EACV,KAAK,EACL,WAAW,EACX,QAAQ,GAAG,KAAK,EAChB,kBAAkB,GAAG,KAAK,EAC1B,OAAO,GAAG,KAAK,EACf,YAAY,GAAG,KAAK,EACpB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,GAAG,MAAM,EACf,MAAM,GAAG,OAAiB,EAC1B,IAAI,GAAG,OAAO,EACd,SAAS,EAAE,UAAU,EACrB,SAAS,EACT,kBAAkB,EAAE,eAAe,EACnC,GAAG,SAAS,EAE6E,EAC7F,GAAsC,KACtC;AACA,IAAA,MAAM,EAAE,QAAQ,EAAE,G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AAA,GAAA,CAAC,UAAU,EAAG,EAAA,CAAA,EAAA,CACZ,GACJ,CACT,CAAA,EAAA,CACC,EACNA,GAAC,CAAA,UAAU,IACP,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,SAAS,CAAC,kBAAkB,CAAC,EAC5C,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,YAAY,EAAA,SAAA,EACb,yBAAyB,EACnC,CAAA,CAAA,EAAA,CACA,EACR;AACN,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,UAAU,CAAC,iBAAiB,EAKO;AAEpD,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
|
package/index.css
CHANGED
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
.magritte-zp-day-theme{
|
|
85
85
|
--magritte-color-component-input-stroke-state-field-focused-v24-3-0:#7195AF;
|
|
86
86
|
}
|
|
87
|
-
.magritte-textarea___ugvor_3-
|
|
87
|
+
.magritte-textarea___ugvor_3-3-0{
|
|
88
88
|
display:inline-flex;
|
|
89
89
|
flex-flow:column;
|
|
90
90
|
--magritte-ui-textarea-vertical-offset:0px;
|
|
@@ -92,229 +92,229 @@
|
|
|
92
92
|
--animation-100-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v24-3-0);
|
|
93
93
|
--animation-300-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-3-0);
|
|
94
94
|
}
|
|
95
|
-
.magritte-textarea___ugvor_3-
|
|
95
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-elevated___S0jk-_3-3-0{
|
|
96
96
|
--magritte-ui-textarea-vertical-offset:calc(18px * 0.5);
|
|
97
97
|
}
|
|
98
|
-
.magritte-textarea___ugvor_3-
|
|
98
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-small___Q-tsg_3-3-0{
|
|
99
99
|
--magritte-ui-textarea-vertical-padding:10px;
|
|
100
100
|
}
|
|
101
|
-
.magritte-textarea___ugvor_3-
|
|
101
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-medium___GNzAm_3-3-0{
|
|
102
102
|
--magritte-ui-textarea-vertical-padding:12px;
|
|
103
103
|
}
|
|
104
|
-
.magritte-textarea___ugvor_3-
|
|
104
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-large___ugT-5_3-3-0{
|
|
105
105
|
--magritte-ui-textarea-vertical-padding:16px;
|
|
106
106
|
}
|
|
107
|
-
.magritte-textarea___ugvor_3-
|
|
107
|
+
.magritte-textarea___ugvor_3-3-0.magritte-has-grip___ATMYQ_3-3-0{
|
|
108
108
|
--magritte-ui-textarea-additional-bottom-padding:18px;
|
|
109
109
|
}
|
|
110
|
-
.magritte-textarea___ugvor_3-
|
|
110
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-limited___cU1Rg_3-3-0{
|
|
111
111
|
--magritte-ui-textarea-additional-bottom-padding:20px + 8px;
|
|
112
112
|
}
|
|
113
|
-
.magritte-textarea___ugvor_3-
|
|
113
|
+
.magritte-textarea___ugvor_3-3-0.magritte-maxed-height___v1wYG_3-3-0.magritte-textarea-elevated___S0jk-_3-3-0{
|
|
114
114
|
--magritte-ui-textarea-bottom-padding:calc(12px + var(--magritte-ui-textarea-vertical-offset));
|
|
115
115
|
}
|
|
116
116
|
@media (min-width: 1020px){
|
|
117
|
-
body.magritte-old-layout .magritte-textarea___ugvor_3-
|
|
117
|
+
body.magritte-old-layout .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover{
|
|
118
118
|
--magritte-ui-form-helper-description-color-override:var(--magritte-color-component-input-text-state-description-hovered-v24-3-0);
|
|
119
119
|
}
|
|
120
|
-
body.magritte-old-layout .magritte-textarea___ugvor_3-
|
|
120
|
+
body.magritte-old-layout .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-position-container-wrapper___4Dsui_3-3-0::after{
|
|
121
121
|
border-bottom-color:var(--magritte-color-component-input-stroke-state-field-hovered-v24-3-0);
|
|
122
122
|
border-right-color:var(--magritte-color-component-input-stroke-state-field-hovered-v24-3-0);
|
|
123
123
|
border-width:1px;
|
|
124
124
|
background-color:var(--magritte-color-component-input-background-state-field-hovered-v24-3-0);
|
|
125
125
|
}
|
|
126
|
-
body.magritte-old-layout .magritte-textarea___ugvor_3-
|
|
126
|
+
body.magritte-old-layout .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-position-container___cEpbv_3-3-0{
|
|
127
127
|
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-state-field-hovered-v24-3-0);
|
|
128
128
|
background-color:var(--magritte-color-component-input-background-state-field-hovered-v24-3-0);
|
|
129
129
|
}
|
|
130
|
-
body.magritte-old-layout .magritte-textarea___ugvor_3-
|
|
130
|
+
body.magritte-old-layout .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-native-element___a0RAE_3-3-0{
|
|
131
131
|
color:var(--magritte-color-component-input-text-state-content-hovered-v24-3-0);
|
|
132
132
|
-webkit-text-fill-color:var(--magritte-color-component-input-text-state-content-hovered-v24-3-0);
|
|
133
133
|
opacity:1;
|
|
134
134
|
}
|
|
135
|
-
body.magritte-old-layout .magritte-textarea___ugvor_3-
|
|
135
|
+
body.magritte-old-layout .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-label___sgTIH_3-3-0{
|
|
136
136
|
color:var(--magritte-color-component-input-text-state-placeholder-hovered-v24-3-0);
|
|
137
137
|
}
|
|
138
|
-
body.magritte-old-layout .magritte-textarea___ugvor_3-
|
|
138
|
+
body.magritte-old-layout .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-label-elevated___0lxOI_3-3-0{
|
|
139
139
|
color:var(--magritte-color-component-input-text-state-label-hovered-v24-3-0);
|
|
140
140
|
}
|
|
141
|
-
body.magritte-old-layout .magritte-textarea___ugvor_3-
|
|
141
|
+
body.magritte-old-layout .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-limit___IjPJy_3-3-0{
|
|
142
142
|
background-color:var(--magritte-color-component-input-background-state-field-hovered-v24-3-0);
|
|
143
143
|
}
|
|
144
|
-
body.magritte-old-layout .magritte-textarea___ugvor_3-
|
|
144
|
+
body.magritte-old-layout .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-limit___IjPJy_3-3-0{
|
|
145
145
|
--magritte-ui-text-color-override:var(--magritte-color-component-input-text-state-limit-hovered-v24-3-0);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
@media (min-width: 1024px){
|
|
149
|
-
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-
|
|
149
|
+
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover{
|
|
150
150
|
--magritte-ui-form-helper-description-color-override:var(--magritte-color-component-input-text-state-description-hovered-v24-3-0);
|
|
151
151
|
}
|
|
152
|
-
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-
|
|
152
|
+
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-position-container-wrapper___4Dsui_3-3-0::after{
|
|
153
153
|
border-bottom-color:var(--magritte-color-component-input-stroke-state-field-hovered-v24-3-0);
|
|
154
154
|
border-right-color:var(--magritte-color-component-input-stroke-state-field-hovered-v24-3-0);
|
|
155
155
|
border-width:1px;
|
|
156
156
|
background-color:var(--magritte-color-component-input-background-state-field-hovered-v24-3-0);
|
|
157
157
|
}
|
|
158
|
-
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-
|
|
158
|
+
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-position-container___cEpbv_3-3-0{
|
|
159
159
|
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-state-field-hovered-v24-3-0);
|
|
160
160
|
background-color:var(--magritte-color-component-input-background-state-field-hovered-v24-3-0);
|
|
161
161
|
}
|
|
162
|
-
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-
|
|
162
|
+
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-native-element___a0RAE_3-3-0{
|
|
163
163
|
color:var(--magritte-color-component-input-text-state-content-hovered-v24-3-0);
|
|
164
164
|
-webkit-text-fill-color:var(--magritte-color-component-input-text-state-content-hovered-v24-3-0);
|
|
165
165
|
opacity:1;
|
|
166
166
|
}
|
|
167
|
-
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-
|
|
167
|
+
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-label___sgTIH_3-3-0{
|
|
168
168
|
color:var(--magritte-color-component-input-text-state-placeholder-hovered-v24-3-0);
|
|
169
169
|
}
|
|
170
|
-
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-
|
|
170
|
+
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-label-elevated___0lxOI_3-3-0{
|
|
171
171
|
color:var(--magritte-color-component-input-text-state-label-hovered-v24-3-0);
|
|
172
172
|
}
|
|
173
|
-
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-
|
|
173
|
+
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-limit___IjPJy_3-3-0{
|
|
174
174
|
background-color:var(--magritte-color-component-input-background-state-field-hovered-v24-3-0);
|
|
175
175
|
}
|
|
176
|
-
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-
|
|
176
|
+
body:not(.magritte-old-layout) .magritte-textarea___ugvor_3-3-0:not(.magritte-textarea-focused___eiGyC_3-3-0):not(.magritte-textarea-invalid___iKOPh_3-3-0):not(.magritte-textarea-disabled___XN0cg_3-3-0):hover .magritte-textarea-limit___IjPJy_3-3-0{
|
|
177
177
|
--magritte-ui-text-color-override:var(--magritte-color-component-input-text-state-limit-hovered-v24-3-0);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
.magritte-textarea___ugvor_3-
|
|
180
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0{
|
|
181
181
|
--magritte-ui-form-helper-description-color-override:var(--magritte-color-component-input-text-state-description-focused-v24-3-0);
|
|
182
182
|
}
|
|
183
|
-
.magritte-textarea___ugvor_3-
|
|
183
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0::after{
|
|
184
184
|
border-bottom-color:var(--magritte-color-component-input-stroke-state-field-focused-v24-3-0);
|
|
185
185
|
border-right-color:var(--magritte-color-component-input-stroke-state-field-focused-v24-3-0);
|
|
186
186
|
border-width:2px;
|
|
187
187
|
background-color:var(--magritte-color-component-input-background-state-field-focused-v24-3-0);
|
|
188
188
|
}
|
|
189
|
-
.magritte-textarea___ugvor_3-
|
|
189
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0 .magritte-textarea-position-container___cEpbv_3-3-0{
|
|
190
190
|
box-shadow:inset 0 0 0 2px var(--magritte-color-component-input-stroke-state-field-focused-v24-3-0);
|
|
191
191
|
background-color:var(--magritte-color-component-input-background-state-field-focused-v24-3-0);
|
|
192
192
|
}
|
|
193
|
-
.magritte-textarea___ugvor_3-
|
|
193
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0 .magritte-native-element___a0RAE_3-3-0{
|
|
194
194
|
color:var(--magritte-color-component-input-text-state-content-focused-v24-3-0);
|
|
195
195
|
-webkit-text-fill-color:var(--magritte-color-component-input-text-state-content-focused-v24-3-0);
|
|
196
196
|
opacity:1;
|
|
197
197
|
}
|
|
198
|
-
.magritte-textarea___ugvor_3-
|
|
198
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0 .magritte-textarea-label___sgTIH_3-3-0{
|
|
199
199
|
color:var(--magritte-color-component-input-text-state-placeholder-focused-v24-3-0);
|
|
200
200
|
}
|
|
201
|
-
.magritte-textarea___ugvor_3-
|
|
201
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0 .magritte-textarea-label-elevated___0lxOI_3-3-0{
|
|
202
202
|
color:var(--magritte-color-component-input-text-state-label-focused-v24-3-0);
|
|
203
203
|
}
|
|
204
|
-
.magritte-textarea___ugvor_3-
|
|
204
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0 .magritte-textarea-limit___IjPJy_3-3-0{
|
|
205
205
|
background-color:var(--magritte-color-component-input-background-state-field-focused-v24-3-0);
|
|
206
206
|
}
|
|
207
|
-
.magritte-textarea___ugvor_3-
|
|
207
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0 .magritte-textarea-limit___IjPJy_3-3-0{
|
|
208
208
|
--magritte-ui-text-color-override:var(--magritte-color-component-input-text-state-limit-focused-v24-3-0);
|
|
209
209
|
}
|
|
210
|
-
.magritte-textarea___ugvor_3-
|
|
211
|
-
.magritte-textarea___ugvor_3-
|
|
210
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-limit-error___vLvZU_3-3-0,
|
|
211
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0{
|
|
212
212
|
--magritte-ui-form-helper-error-color-override:var(--magritte-color-component-input-text-state-description-invalid-v24-3-0);
|
|
213
213
|
}
|
|
214
|
-
.magritte-textarea___ugvor_3-
|
|
215
|
-
.magritte-textarea___ugvor_3-
|
|
214
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-limit-error___vLvZU_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0::after,
|
|
215
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0::after{
|
|
216
216
|
border-bottom-color:var(--magritte-color-component-input-stroke-state-field-invalid-v24-3-0);
|
|
217
217
|
border-right-color:var(--magritte-color-component-input-stroke-state-field-invalid-v24-3-0);
|
|
218
218
|
border-width:2px;
|
|
219
219
|
background-color:var(--magritte-color-component-input-background-state-field-invalid-v24-3-0);
|
|
220
220
|
}
|
|
221
|
-
.magritte-textarea___ugvor_3-
|
|
222
|
-
.magritte-textarea___ugvor_3-
|
|
221
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-limit-error___vLvZU_3-3-0 .magritte-textarea-position-container___cEpbv_3-3-0,
|
|
222
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-position-container___cEpbv_3-3-0{
|
|
223
223
|
box-shadow:inset 0 0 0 2px var(--magritte-color-component-input-stroke-state-field-invalid-v24-3-0);
|
|
224
224
|
background-color:var(--magritte-color-component-input-background-state-field-invalid-v24-3-0);
|
|
225
225
|
}
|
|
226
|
-
.magritte-textarea___ugvor_3-
|
|
227
|
-
.magritte-textarea___ugvor_3-
|
|
226
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-limit-error___vLvZU_3-3-0 .magritte-native-element___a0RAE_3-3-0,
|
|
227
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-native-element___a0RAE_3-3-0{
|
|
228
228
|
color:var(--magritte-color-component-input-text-state-content-invalid-v24-3-0);
|
|
229
229
|
-webkit-text-fill-color:var(--magritte-color-component-input-text-state-content-invalid-v24-3-0);
|
|
230
230
|
opacity:1;
|
|
231
231
|
}
|
|
232
|
-
.magritte-textarea___ugvor_3-
|
|
233
|
-
.magritte-textarea___ugvor_3-
|
|
232
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-limit-error___vLvZU_3-3-0 .magritte-textarea-label___sgTIH_3-3-0,
|
|
233
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-label___sgTIH_3-3-0{
|
|
234
234
|
color:var(--magritte-color-component-input-text-state-placeholder-invalid-v24-3-0);
|
|
235
235
|
}
|
|
236
|
-
.magritte-textarea___ugvor_3-
|
|
237
|
-
.magritte-textarea___ugvor_3-
|
|
236
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-limit-error___vLvZU_3-3-0 .magritte-textarea-label-elevated___0lxOI_3-3-0,
|
|
237
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-label-elevated___0lxOI_3-3-0{
|
|
238
238
|
color:var(--magritte-color-component-input-text-state-label-invalid-v24-3-0);
|
|
239
239
|
}
|
|
240
|
-
.magritte-textarea___ugvor_3-
|
|
241
|
-
.magritte-textarea___ugvor_3-
|
|
240
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-limit-error___vLvZU_3-3-0 .magritte-textarea-limit___IjPJy_3-3-0,
|
|
241
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-limit___IjPJy_3-3-0{
|
|
242
242
|
background-color:var(--magritte-color-component-input-background-state-field-invalid-v24-3-0);
|
|
243
243
|
}
|
|
244
|
-
.magritte-textarea___ugvor_3-
|
|
244
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-focused___eiGyC_3-3-0.magritte-textarea-limit-error___vLvZU_3-3-0 .magritte-textarea-limit___IjPJy_3-3-0{
|
|
245
245
|
--magritte-ui-text-color-override:var(--magritte-color-component-input-text-state-limit-invalid-v24-3-0);
|
|
246
246
|
}
|
|
247
|
-
.magritte-textarea___ugvor_3-
|
|
247
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0{
|
|
248
248
|
--magritte-ui-form-helper-error-color-override:var(--magritte-color-component-input-text-state-description-invalid-v24-3-0);
|
|
249
249
|
}
|
|
250
|
-
.magritte-textarea___ugvor_3-
|
|
250
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0::after{
|
|
251
251
|
border-bottom-color:var(--magritte-color-component-input-stroke-state-field-invalid-v24-3-0);
|
|
252
252
|
border-right-color:var(--magritte-color-component-input-stroke-state-field-invalid-v24-3-0);
|
|
253
253
|
border-width:1px;
|
|
254
254
|
background-color:var(--magritte-color-component-input-background-state-field-invalid-v24-3-0);
|
|
255
255
|
}
|
|
256
|
-
.magritte-textarea___ugvor_3-
|
|
256
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-position-container___cEpbv_3-3-0{
|
|
257
257
|
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-state-field-invalid-v24-3-0);
|
|
258
258
|
background-color:var(--magritte-color-component-input-background-state-field-invalid-v24-3-0);
|
|
259
259
|
}
|
|
260
|
-
.magritte-textarea___ugvor_3-
|
|
260
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-native-element___a0RAE_3-3-0{
|
|
261
261
|
color:var(--magritte-color-component-input-text-state-content-invalid-v24-3-0);
|
|
262
262
|
-webkit-text-fill-color:var(--magritte-color-component-input-text-state-content-invalid-v24-3-0);
|
|
263
263
|
opacity:1;
|
|
264
264
|
}
|
|
265
|
-
.magritte-textarea___ugvor_3-
|
|
265
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-label___sgTIH_3-3-0{
|
|
266
266
|
color:var(--magritte-color-component-input-text-state-placeholder-invalid-v24-3-0);
|
|
267
267
|
}
|
|
268
|
-
.magritte-textarea___ugvor_3-
|
|
268
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-label-elevated___0lxOI_3-3-0{
|
|
269
269
|
color:var(--magritte-color-component-input-text-state-label-invalid-v24-3-0);
|
|
270
270
|
}
|
|
271
|
-
.magritte-textarea___ugvor_3-
|
|
271
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-limit___IjPJy_3-3-0{
|
|
272
272
|
background-color:var(--magritte-color-component-input-background-state-field-invalid-v24-3-0);
|
|
273
273
|
}
|
|
274
|
-
.magritte-textarea___ugvor_3-
|
|
274
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-limit-error___vLvZU_3-3-0 .magritte-textarea-limit___IjPJy_3-3-0{
|
|
275
275
|
--magritte-ui-text-color-override:var(--magritte-color-component-input-text-state-limit-invalid-v24-3-0);
|
|
276
276
|
}
|
|
277
|
-
.magritte-textarea___ugvor_3-
|
|
277
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0{
|
|
278
278
|
--magritte-ui-form-helper-description-color-override:var(--magritte-color-component-input-text-state-description-disabled-v24-3-0);
|
|
279
279
|
}
|
|
280
|
-
.magritte-textarea___ugvor_3-
|
|
280
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0::after{
|
|
281
281
|
border-bottom-color:var(--magritte-color-component-input-stroke-state-field-disabled-v24-3-0);
|
|
282
282
|
border-right-color:var(--magritte-color-component-input-stroke-state-field-disabled-v24-3-0);
|
|
283
283
|
border-width:1px;
|
|
284
284
|
background-color:var(--magritte-color-component-input-background-state-field-disabled-v24-3-0);
|
|
285
285
|
}
|
|
286
|
-
.magritte-textarea___ugvor_3-
|
|
286
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0 .magritte-textarea-position-container___cEpbv_3-3-0{
|
|
287
287
|
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-state-field-disabled-v24-3-0);
|
|
288
288
|
background-color:var(--magritte-color-component-input-background-state-field-disabled-v24-3-0);
|
|
289
289
|
}
|
|
290
|
-
.magritte-textarea___ugvor_3-
|
|
290
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0 .magritte-native-element___a0RAE_3-3-0{
|
|
291
291
|
color:var(--magritte-color-component-input-text-state-content-disabled-v24-3-0);
|
|
292
292
|
-webkit-text-fill-color:var(--magritte-color-component-input-text-state-content-disabled-v24-3-0);
|
|
293
293
|
opacity:1;
|
|
294
294
|
}
|
|
295
|
-
.magritte-textarea___ugvor_3-
|
|
295
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0 .magritte-textarea-label___sgTIH_3-3-0{
|
|
296
296
|
color:var(--magritte-color-component-input-text-state-placeholder-disabled-v24-3-0);
|
|
297
297
|
}
|
|
298
|
-
.magritte-textarea___ugvor_3-
|
|
298
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0 .magritte-textarea-label-elevated___0lxOI_3-3-0{
|
|
299
299
|
color:var(--magritte-color-component-input-text-state-label-disabled-v24-3-0);
|
|
300
300
|
}
|
|
301
|
-
.magritte-textarea___ugvor_3-
|
|
301
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0 .magritte-textarea-limit___IjPJy_3-3-0{
|
|
302
302
|
background-color:var(--magritte-color-component-input-background-state-field-disabled-v24-3-0);
|
|
303
303
|
}
|
|
304
|
-
.magritte-textarea___ugvor_3-
|
|
304
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0 .magritte-textarea-limit___IjPJy_3-3-0{
|
|
305
305
|
--magritte-ui-text-color-override:var(--magritte-color-component-input-text-state-limit-disabled-v24-3-0);
|
|
306
306
|
}
|
|
307
|
-
.magritte-textarea___ugvor_3-
|
|
308
|
-
.magritte-textarea___ugvor_3-
|
|
307
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0 .magritte-textarea-position-container___cEpbv_3-3-0,
|
|
308
|
+
.magritte-textarea___ugvor_3-3-0.magritte-textarea-disabled___XN0cg_3-3-0 .magritte-native-element___a0RAE_3-3-0{
|
|
309
309
|
cursor:not-allowed;
|
|
310
310
|
}
|
|
311
311
|
@media (prefers-reduced-motion){
|
|
312
|
-
.magritte-textarea___ugvor_3-
|
|
312
|
+
.magritte-textarea___ugvor_3-3-0{
|
|
313
313
|
--animation-100-duration:1ms;
|
|
314
314
|
--animation-300-duration:1ms;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
.magritte-textarea-position-container-wrapper___4Dsui_3-
|
|
317
|
+
.magritte-textarea-position-container-wrapper___4Dsui_3-3-0{
|
|
318
318
|
display:inline-flex;
|
|
319
319
|
position:relative;
|
|
320
320
|
overflow:hidden;
|
|
@@ -322,14 +322,14 @@
|
|
|
322
322
|
border-radius:12px;
|
|
323
323
|
--magritte-ui-scrollbar-border-radius:12px;
|
|
324
324
|
}
|
|
325
|
-
.magritte-textarea-position-container-wrapper___4Dsui_3-
|
|
325
|
+
.magritte-textarea-position-container-wrapper___4Dsui_3-3-0.focus-visible{
|
|
326
326
|
outline:var(--magritte-color-component-input-stroke-state-accent-focused-accessible-v24-3-0) solid 4px;
|
|
327
327
|
}
|
|
328
|
-
.magritte-textarea-invalid___iKOPh_3-
|
|
329
|
-
.magritte-textarea-limit-error___vLvZU_3-
|
|
328
|
+
.magritte-textarea-invalid___iKOPh_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0.focus-visible,
|
|
329
|
+
.magritte-textarea-limit-error___vLvZU_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0.focus-visible{
|
|
330
330
|
outline-color:var(--magritte-color-component-input-stroke-state-negative-focused-accessible-v24-3-0);
|
|
331
331
|
}
|
|
332
|
-
.magritte-textarea-position-container-wrapper___4Dsui_3-
|
|
332
|
+
.magritte-textarea-position-container-wrapper___4Dsui_3-3-0::after{
|
|
333
333
|
display:none;
|
|
334
334
|
pointer-events:none;
|
|
335
335
|
user-select:none;
|
|
@@ -344,10 +344,10 @@
|
|
|
344
344
|
border-bottom:1px solid var(--magritte-color-component-input-stroke-field-v24-3-0);
|
|
345
345
|
border-right:1px solid var(--magritte-color-component-input-stroke-field-v24-3-0);
|
|
346
346
|
}
|
|
347
|
-
.magritte-has-grip___ATMYQ_3-
|
|
347
|
+
.magritte-has-grip___ATMYQ_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0::after{
|
|
348
348
|
display:block;
|
|
349
349
|
}
|
|
350
|
-
.magritte-native-element___a0RAE_3-
|
|
350
|
+
.magritte-native-element___a0RAE_3-3-0{
|
|
351
351
|
box-sizing:border-box;
|
|
352
352
|
border:0;
|
|
353
353
|
width:100%;
|
|
@@ -376,11 +376,11 @@
|
|
|
376
376
|
background:none;
|
|
377
377
|
appearance:none;
|
|
378
378
|
}
|
|
379
|
-
.magritte-native-element___a0RAE_3-
|
|
379
|
+
.magritte-native-element___a0RAE_3-3-0::-webkit-scrollbar{
|
|
380
380
|
display:none;
|
|
381
381
|
}
|
|
382
|
-
.magritte-textarea-medium___GNzAm_3-
|
|
383
|
-
.magritte-textarea-large___ugT-5_3-
|
|
382
|
+
.magritte-textarea-medium___GNzAm_3-3-0 .magritte-native-element___a0RAE_3-3-0,
|
|
383
|
+
.magritte-textarea-large___ugT-5_3-3-0 .magritte-native-element___a0RAE_3-3-0{
|
|
384
384
|
font-family:"hh sans";
|
|
385
385
|
font-weight:400;
|
|
386
386
|
line-height:22px;
|
|
@@ -390,45 +390,45 @@
|
|
|
390
390
|
text-transform:none;
|
|
391
391
|
text-decoration:none;
|
|
392
392
|
}
|
|
393
|
-
.magritte-native-element___a0RAE_3-
|
|
393
|
+
.magritte-native-element___a0RAE_3-3-0:focus{
|
|
394
394
|
outline:none;
|
|
395
395
|
}
|
|
396
|
-
.magritte-textarea-layout-fill-both___ERS-q_3-
|
|
397
|
-
.magritte-textarea-layout-fill-vertical___HmNtp_3-
|
|
398
|
-
.magritte-textarea-layout-fill-horizontal___imBH2_3-
|
|
396
|
+
.magritte-textarea-layout-fill-both___ERS-q_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0,
|
|
397
|
+
.magritte-textarea-layout-fill-vertical___HmNtp_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0,
|
|
398
|
+
.magritte-textarea-layout-fill-horizontal___imBH2_3-3-0 .magritte-textarea-position-container-wrapper___4Dsui_3-3-0{
|
|
399
399
|
flex:1;
|
|
400
400
|
}
|
|
401
|
-
.magritte-textarea-layout-fill-both___ERS-q_3-
|
|
401
|
+
.magritte-textarea-layout-fill-both___ERS-q_3-3-0{
|
|
402
402
|
width:100%;
|
|
403
403
|
height:100%;
|
|
404
404
|
}
|
|
405
|
-
.magritte-textarea-layout-fill-vertical___HmNtp_3-
|
|
405
|
+
.magritte-textarea-layout-fill-vertical___HmNtp_3-3-0{
|
|
406
406
|
height:100%;
|
|
407
407
|
}
|
|
408
|
-
.magritte-textarea-layout-fill-horizontal___imBH2_3-
|
|
409
|
-
.magritte-textarea-layout-hug___tdCMY_3-
|
|
408
|
+
.magritte-textarea-layout-fill-horizontal___imBH2_3-3-0,
|
|
409
|
+
.magritte-textarea-layout-hug___tdCMY_3-3-0{
|
|
410
410
|
width:100%;
|
|
411
411
|
}
|
|
412
412
|
@media (min-width: 1020px){
|
|
413
|
-
body.magritte-old-layout .magritte-textarea-layout-hug___tdCMY_3-
|
|
413
|
+
body.magritte-old-layout .magritte-textarea-layout-hug___tdCMY_3-3-0 .magritte-textarea-position-container___cEpbv_3-3-0{
|
|
414
414
|
max-height:var(--magritte-textarea-max-height, auto);
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
@media (min-width: 1024px){
|
|
418
|
-
body:not(.magritte-old-layout) .magritte-textarea-layout-hug___tdCMY_3-
|
|
418
|
+
body:not(.magritte-old-layout) .magritte-textarea-layout-hug___tdCMY_3-3-0 .magritte-textarea-position-container___cEpbv_3-3-0{
|
|
419
419
|
max-height:var(--magritte-textarea-max-height, auto);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
.magritte-textarea-wrapper___yD7G6_3-
|
|
422
|
+
.magritte-textarea-wrapper___yD7G6_3-3-0{
|
|
423
423
|
display:grid;
|
|
424
424
|
width:100%;
|
|
425
425
|
}
|
|
426
|
-
.magritte-value-clone-wrapper___2ZZvS_3-
|
|
426
|
+
.magritte-value-clone-wrapper___2ZZvS_3-3-0{
|
|
427
427
|
grid-area:1 / 1 / 2 / 2;
|
|
428
428
|
min-height:0;
|
|
429
429
|
overflow:hidden;
|
|
430
430
|
}
|
|
431
|
-
.magritte-value-clone-container___PVM97_3-
|
|
431
|
+
.magritte-value-clone-container___PVM97_3-3-0{
|
|
432
432
|
margin:0;
|
|
433
433
|
box-sizing:border-box;
|
|
434
434
|
border:0;
|
|
@@ -457,11 +457,11 @@
|
|
|
457
457
|
visibility:hidden;
|
|
458
458
|
pointer-events:none;
|
|
459
459
|
}
|
|
460
|
-
.magritte-value-clone-container___PVM97_3-
|
|
460
|
+
.magritte-value-clone-container___PVM97_3-3-0::-webkit-scrollbar{
|
|
461
461
|
display:none;
|
|
462
462
|
}
|
|
463
|
-
.magritte-textarea-medium___GNzAm_3-
|
|
464
|
-
.magritte-textarea-large___ugT-5_3-
|
|
463
|
+
.magritte-textarea-medium___GNzAm_3-3-0 .magritte-value-clone-container___PVM97_3-3-0,
|
|
464
|
+
.magritte-textarea-large___ugT-5_3-3-0 .magritte-value-clone-container___PVM97_3-3-0{
|
|
465
465
|
font-family:"hh sans";
|
|
466
466
|
font-weight:400;
|
|
467
467
|
line-height:22px;
|
|
@@ -471,16 +471,16 @@
|
|
|
471
471
|
text-transform:none;
|
|
472
472
|
text-decoration:none;
|
|
473
473
|
}
|
|
474
|
-
.magritte-textarea-small___Q-tsg_3-
|
|
474
|
+
.magritte-textarea-small___Q-tsg_3-3-0 .magritte-side-padding___O-HUP_3-3-0{
|
|
475
475
|
padding:0 calc(12px - 2px);
|
|
476
476
|
}
|
|
477
|
-
.magritte-textarea-medium___GNzAm_3-
|
|
477
|
+
.magritte-textarea-medium___GNzAm_3-3-0 .magritte-side-padding___O-HUP_3-3-0{
|
|
478
478
|
padding:0 calc(16px - 2px);
|
|
479
479
|
}
|
|
480
|
-
.magritte-textarea-large___ugT-5_3-
|
|
480
|
+
.magritte-textarea-large___ugT-5_3-3-0 .magritte-side-padding___O-HUP_3-3-0{
|
|
481
481
|
padding:0 calc(16px - 2px);
|
|
482
482
|
}
|
|
483
|
-
.magritte-textarea-position-container___cEpbv_3-
|
|
483
|
+
.magritte-textarea-position-container___cEpbv_3-3-0{
|
|
484
484
|
display:inline-flex;
|
|
485
485
|
overflow:hidden;
|
|
486
486
|
position:relative;
|
|
@@ -492,19 +492,19 @@
|
|
|
492
492
|
box-shadow:inset 0 0 0 1px var(--magritte-color-component-input-stroke-field-v24-3-0);
|
|
493
493
|
padding:var(--magritte-ui-textarea-vertical-padding) 2px var(--magritte-ui-textarea-bottom-padding, var(--magritte-ui-textarea-vertical-padding));
|
|
494
494
|
}
|
|
495
|
-
.magritte-textarea-animation-timeout___zudbr_3-
|
|
496
|
-
.magritte-textarea-position-container___cEpbv_3-
|
|
495
|
+
.magritte-textarea-animation-timeout___zudbr_3-3-0,
|
|
496
|
+
.magritte-textarea-position-container___cEpbv_3-3-0{
|
|
497
497
|
transition-property:transform, color, font-size, letter-spacing;
|
|
498
498
|
transition-duration:var(--animation-100-duration);
|
|
499
499
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v24-3-0);
|
|
500
500
|
--animation-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v24-3-0);
|
|
501
501
|
}
|
|
502
|
-
.magritte-textarea-rigging-container___-1S6i_3-
|
|
502
|
+
.magritte-textarea-rigging-container___-1S6i_3-3-0{
|
|
503
503
|
position:relative;
|
|
504
504
|
pointer-events:none;
|
|
505
505
|
grid-area:1 / 1 / 2 / 2;
|
|
506
506
|
}
|
|
507
|
-
.magritte-textarea-label___sgTIH_3-
|
|
507
|
+
.magritte-textarea-label___sgTIH_3-3-0{
|
|
508
508
|
font-family:"hh sans";
|
|
509
509
|
font-weight:400;
|
|
510
510
|
line-height:22px;
|
|
@@ -522,10 +522,10 @@
|
|
|
522
522
|
transition-duration:var(--animation-100-duration);
|
|
523
523
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v24-3-0);
|
|
524
524
|
}
|
|
525
|
-
.magritte-label-no-wrap___RxZ3A_3-
|
|
525
|
+
.magritte-label-no-wrap___RxZ3A_3-3-0{
|
|
526
526
|
white-space:nowrap;
|
|
527
527
|
}
|
|
528
|
-
.magritte-textarea-label-elevated___0lxOI_3-
|
|
528
|
+
.magritte-textarea-label-elevated___0lxOI_3-3-0{
|
|
529
529
|
font-family:"hh sans";
|
|
530
530
|
font-weight:400;
|
|
531
531
|
line-height:18px;
|
|
@@ -537,7 +537,7 @@
|
|
|
537
537
|
color:var(--magritte-color-component-input-text-label-v24-3-0);
|
|
538
538
|
transform:translateY(calc(18px * -0.5));
|
|
539
539
|
}
|
|
540
|
-
.magritte-textarea-limit___IjPJy_3-
|
|
540
|
+
.magritte-textarea-limit___IjPJy_3-3-0{
|
|
541
541
|
position:absolute;
|
|
542
542
|
bottom:8px;
|
|
543
543
|
right:12px;
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
z-index:1;
|
|
549
549
|
--magritte-ui-text-color-override:var(--magritte-color-component-input-text-limit-v24-3-0);
|
|
550
550
|
}
|
|
551
|
-
.magritte-textarea-grip___iL7lq_3-
|
|
551
|
+
.magritte-textarea-grip___iL7lq_3-3-0{
|
|
552
552
|
position:absolute;
|
|
553
553
|
pointer-events:none;
|
|
554
554
|
display:inline-flex;
|
|
@@ -557,25 +557,25 @@
|
|
|
557
557
|
border-bottom-right-radius:12px;
|
|
558
558
|
--magritte-ui-icon-color-override:var(--magritte-color-component-input-icon-grip-v24-3-0);
|
|
559
559
|
}
|
|
560
|
-
.magritte-textarea-grip-icon___YK-9w_3-
|
|
560
|
+
.magritte-textarea-grip-icon___YK-9w_3-3-0{
|
|
561
561
|
display:inline-flex;
|
|
562
562
|
z-index:1;
|
|
563
563
|
}
|
|
564
564
|
@media (prefers-reduced-motion: no-preference){
|
|
565
|
-
.magritte-textarea-limit-enter___CygGz_3-
|
|
565
|
+
.magritte-textarea-limit-enter___CygGz_3-3-0{
|
|
566
566
|
opacity:0;
|
|
567
567
|
}
|
|
568
|
-
.magritte-textarea-limit-exit___RMp-R_3-
|
|
569
|
-
.magritte-textarea-limit-enter-active___8vN-t_3-
|
|
568
|
+
.magritte-textarea-limit-exit___RMp-R_3-3-0,
|
|
569
|
+
.magritte-textarea-limit-enter-active___8vN-t_3-3-0{
|
|
570
570
|
opacity:1;
|
|
571
571
|
}
|
|
572
|
-
.magritte-textarea-limit-enter-active___8vN-t_3-
|
|
572
|
+
.magritte-textarea-limit-enter-active___8vN-t_3-3-0{
|
|
573
573
|
transition-property:opacity;
|
|
574
574
|
transition-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-3-0);
|
|
575
575
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-3-0);
|
|
576
576
|
--animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-3-0);
|
|
577
577
|
}
|
|
578
|
-
.magritte-textarea-limit-exit-active___a5kBr_3-
|
|
578
|
+
.magritte-textarea-limit-exit-active___a5kBr_3-3-0{
|
|
579
579
|
opacity:0;
|
|
580
580
|
transition-property:opacity;
|
|
581
581
|
transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v24-3-0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-textarea",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"@hh.ru/magritte-common-func-utils": "1.3.14",
|
|
23
23
|
"@hh.ru/magritte-common-use-disabled": "1.0.14",
|
|
24
24
|
"@hh.ru/magritte-common-use-multiple-refs": "1.1.10",
|
|
25
|
-
"@hh.ru/magritte-common-use-translation": "2.
|
|
25
|
+
"@hh.ru/magritte-common-use-translation": "2.2.0",
|
|
26
26
|
"@hh.ru/magritte-design-tokens": "24.3.0",
|
|
27
27
|
"@hh.ru/magritte-ui-breakpoint": "6.0.6",
|
|
28
|
-
"@hh.ru/magritte-ui-form-helper": "2.0
|
|
28
|
+
"@hh.ru/magritte-ui-form-helper": "2.1.0",
|
|
29
29
|
"@hh.ru/magritte-ui-icon": "13.9.0",
|
|
30
|
-
"@hh.ru/magritte-ui-input": "9.
|
|
30
|
+
"@hh.ru/magritte-ui-input": "9.4.0",
|
|
31
31
|
"@hh.ru/magritte-ui-scrollbar": "1.0.16",
|
|
32
32
|
"@hh.ru/magritte-ui-typography": "4.5.0"
|
|
33
33
|
},
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "70f372926b8d8533d586d87bef0ea5ff522ad251"
|
|
43
43
|
}
|