@salutejs/plasma-new-hope 0.145.0-canary.1421.10845314144.0 → 0.145.0-canary.1433.10846476158.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. package/cjs/components/Slider/Slider.css +10 -12
  2. package/cjs/components/Slider/Slider.js +6 -19
  3. package/cjs/components/Slider/Slider.js.map +1 -1
  4. package/cjs/components/Slider/components/Double/Double.css +5 -6
  5. package/cjs/components/Slider/components/Double/Double.js +2 -36
  6. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  7. package/cjs/components/Slider/components/Double/Double.styles.js +1 -7
  8. package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
  9. package/cjs/components/Slider/components/Double/{Double.styles_4053ky.css → Double.styles_1jhda4u.css} +0 -1
  10. package/cjs/components/Slider/components/Single/Single.css +5 -6
  11. package/cjs/components/Slider/components/Single/Single.js +12 -35
  12. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  13. package/cjs/components/Slider/components/Single/Single.styles.js +1 -7
  14. package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
  15. package/{es/components/Slider/components/Single/Single.styles_9lxkbx.css → cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css} +0 -1
  16. package/cjs/components/Slider/utils/index.js +0 -6
  17. package/cjs/components/Slider/utils/index.js.map +1 -1
  18. package/cjs/components/TextArea/TextArea.js +2 -3
  19. package/cjs/components/TextArea/TextArea.js.map +1 -1
  20. package/cjs/components/TextField/TextField.js +5 -3
  21. package/cjs/components/TextField/TextField.js.map +1 -1
  22. package/cjs/index.css +10 -12
  23. package/cjs/index.js +0 -5
  24. package/cjs/index.js.map +1 -1
  25. package/cjs/utils/index.js.map +1 -1
  26. package/emotion/cjs/components/Slider/Slider.js +6 -15
  27. package/emotion/cjs/components/Slider/components/Double/Double.js +2 -36
  28. package/emotion/cjs/components/Slider/components/Double/Double.styles.js +15 -28
  29. package/emotion/cjs/components/Slider/components/Single/Single.js +7 -30
  30. package/emotion/cjs/components/Slider/components/Single/Single.styles.js +13 -26
  31. package/emotion/cjs/components/Slider/components/index.js +0 -11
  32. package/emotion/cjs/components/Slider/utils/index.js +1 -6
  33. package/emotion/cjs/components/TextArea/TextArea.js +3 -3
  34. package/emotion/cjs/components/TextField/TextField.js +6 -4
  35. package/emotion/cjs/hooks/index.js +1 -8
  36. package/emotion/cjs/utils/index.js +0 -15
  37. package/emotion/es/components/Slider/Slider.js +6 -16
  38. package/emotion/es/components/Slider/components/Double/Double.js +4 -38
  39. package/emotion/es/components/Slider/components/Double/Double.styles.js +14 -27
  40. package/emotion/es/components/Slider/components/Single/Single.js +9 -32
  41. package/emotion/es/components/Slider/components/Single/Single.styles.js +12 -25
  42. package/emotion/es/components/Slider/components/index.js +0 -1
  43. package/emotion/es/components/Slider/utils/index.js +0 -5
  44. package/emotion/es/components/TextArea/TextArea.js +4 -4
  45. package/emotion/es/components/TextField/TextField.js +6 -4
  46. package/emotion/es/hooks/index.js +1 -2
  47. package/emotion/es/utils/index.js +0 -1
  48. package/es/components/Slider/Slider.css +10 -12
  49. package/es/components/Slider/Slider.js +7 -20
  50. package/es/components/Slider/Slider.js.map +1 -1
  51. package/es/components/Slider/components/Double/Double.css +5 -6
  52. package/es/components/Slider/components/Double/Double.js +4 -38
  53. package/es/components/Slider/components/Double/Double.js.map +1 -1
  54. package/es/components/Slider/components/Double/Double.styles.js +2 -7
  55. package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
  56. package/es/components/Slider/components/Double/{Double.styles_4053ky.css → Double.styles_1jhda4u.css} +0 -1
  57. package/es/components/Slider/components/Single/Single.css +5 -6
  58. package/es/components/Slider/components/Single/Single.js +9 -32
  59. package/es/components/Slider/components/Single/Single.js.map +1 -1
  60. package/es/components/Slider/components/Single/Single.styles.js +2 -7
  61. package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
  62. package/{cjs/components/Slider/components/Single/Single.styles_9lxkbx.css → es/components/Slider/components/Single/Single.styles_1r9f1e0.css} +0 -1
  63. package/es/components/Slider/utils/index.js +1 -6
  64. package/es/components/Slider/utils/index.js.map +1 -1
  65. package/es/components/TextArea/TextArea.js +2 -3
  66. package/es/components/TextArea/TextArea.js.map +1 -1
  67. package/es/components/TextField/TextField.js +5 -3
  68. package/es/components/TextField/TextField.js.map +1 -1
  69. package/es/index.css +10 -12
  70. package/es/index.js +0 -2
  71. package/es/index.js.map +1 -1
  72. package/es/utils/index.js.map +1 -1
  73. package/package.json +2 -3
  74. package/styled-components/cjs/components/Slider/Slider.js +6 -15
  75. package/styled-components/cjs/components/Slider/components/Double/Double.js +2 -36
  76. package/styled-components/cjs/components/Slider/components/Double/Double.styles.js +2 -5
  77. package/styled-components/cjs/components/Slider/components/Single/Single.js +7 -30
  78. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +2 -5
  79. package/styled-components/cjs/components/Slider/components/index.js +0 -11
  80. package/styled-components/cjs/components/Slider/utils/index.js +1 -6
  81. package/styled-components/cjs/components/TextArea/TextArea.js +2 -2
  82. package/styled-components/cjs/components/TextField/TextField.js +5 -3
  83. package/styled-components/cjs/hooks/index.js +1 -8
  84. package/styled-components/cjs/utils/index.js +0 -15
  85. package/styled-components/es/components/Slider/Slider.js +6 -16
  86. package/styled-components/es/components/Slider/components/Double/Double.js +4 -38
  87. package/styled-components/es/components/Slider/components/Double/Double.styles.js +1 -4
  88. package/styled-components/es/components/Slider/components/Single/Single.js +9 -32
  89. package/styled-components/es/components/Slider/components/Single/Single.styles.js +1 -4
  90. package/styled-components/es/components/Slider/components/index.js +0 -1
  91. package/styled-components/es/components/Slider/utils/index.js +0 -5
  92. package/styled-components/es/components/TextArea/TextArea.js +3 -3
  93. package/styled-components/es/components/TextField/TextField.js +5 -3
  94. package/styled-components/es/hooks/index.js +1 -2
  95. package/styled-components/es/utils/index.js +0 -1
  96. package/types/components/Slider/Slider.d.ts.map +1 -1
  97. package/types/components/Slider/Slider.types.d.ts +2 -2
  98. package/types/components/Slider/Slider.types.d.ts.map +1 -1
  99. package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
  100. package/types/components/Slider/components/Double/Double.styles.d.ts +0 -1
  101. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
  102. package/types/components/Slider/components/Double/Double.types.d.ts +0 -2
  103. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
  104. package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
  105. package/types/components/Slider/components/Single/Single.styles.d.ts +0 -1
  106. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
  107. package/types/components/Slider/components/Single/Single.types.d.ts +1 -3
  108. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
  109. package/types/components/Slider/components/index.d.ts +0 -2
  110. package/types/components/Slider/components/index.d.ts.map +1 -1
  111. package/types/components/Slider/utils/index.d.ts +0 -1
  112. package/types/components/Slider/utils/index.d.ts.map +1 -1
  113. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  114. package/types/components/TextField/TextField.d.ts.map +1 -1
  115. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +1 -3
  116. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
  117. package/types/examples/plasma_web/components/Slider/Slider.d.ts +1 -3
  118. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
  119. package/types/hooks/index.d.ts +0 -1
  120. package/types/hooks/index.d.ts.map +1 -1
  121. package/types/utils/index.d.ts +0 -1
  122. package/types/utils/index.d.ts.map +1 -1
  123. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -56
  124. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +0 -1
  125. package/cjs/hooks/useForm.js +0 -96
  126. package/cjs/hooks/useForm.js.map +0 -1
  127. package/cjs/utils/setRefList.js +0 -28
  128. package/cjs/utils/setRefList.js.map +0 -1
  129. package/emotion/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -60
  130. package/emotion/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.types.js +0 -5
  131. package/emotion/cjs/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -191
  132. package/emotion/cjs/hooks/useForm.js +0 -102
  133. package/emotion/cjs/utils/setRefList.js +0 -27
  134. package/emotion/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -51
  135. package/emotion/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.types.js +0 -1
  136. package/emotion/es/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -191
  137. package/emotion/es/hooks/useForm.js +0 -93
  138. package/emotion/es/utils/setRefList.js +0 -20
  139. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -52
  140. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +0 -1
  141. package/es/hooks/useForm.js +0 -92
  142. package/es/hooks/useForm.js.map +0 -1
  143. package/es/utils/setRefList.js +0 -23
  144. package/es/utils/setRefList.js.map +0 -1
  145. package/styled-components/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -60
  146. package/styled-components/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.types.js +0 -5
  147. package/styled-components/cjs/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -191
  148. package/styled-components/cjs/hooks/useForm.js +0 -102
  149. package/styled-components/cjs/utils/setRefList.js +0 -27
  150. package/styled-components/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -51
  151. package/styled-components/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.types.js +0 -1
  152. package/styled-components/es/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -191
  153. package/styled-components/es/hooks/useForm.js +0 -93
  154. package/styled-components/es/utils/setRefList.js +0 -20
  155. package/types/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.d.ts +0 -4
  156. package/types/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.d.ts.map +0 -1
  157. package/types/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.types.d.ts +0 -5
  158. package/types/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.types.d.ts.map +0 -1
  159. package/types/hooks/useForm.d.ts +0 -10
  160. package/types/hooks/useForm.d.ts.map +0 -1
  161. package/types/utils/setRefList.d.ts +0 -6
  162. package/types/utils/setRefList.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import React, { forwardRef, useState, createRef, useCallback } from 'react';\nimport { css } from '@linaria/core';\nimport { useResizeObserver } from '@salutejs/plasma-core';\n\nimport { cx, mergeRefs } from '../../utils';\nimport type { RootProps } from '../../engines/types';\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} 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 disabledCSS } from './variations/_disabled/base';\nimport type { TextAreaProps } from './TextArea.types';\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\n// TODO: Перенести этот метод в файл applyDynamicLabel.ts\nexport const getDynamicLabelClasses = (props: TextAreaProps, focused: boolean) => {\n const { readOnly, label, labelPlacement, autoResize, 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 !autoResize &&\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 || autoResize)) ||\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, TextAreaProps>) =>\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 placeholder,\n defaultValue,\n height,\n width,\n value,\n disabled,\n required = false,\n requiredPlacement = 'right',\n optional = false,\n size,\n view,\n id,\n style,\n className,\n readOnly,\n rows,\n cols,\n onChange,\n ...rest\n } = props;\n\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 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 requiredPlacementClass = requiredPlacement === 'right' ? 'align-right ' : undefined;\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, 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 onChange?.(event);\n },\n [value, onChange],\n );\n\n const dynamicLabelClasses = getDynamicLabelClasses(\n {\n size,\n readOnly,\n label,\n labelPlacement,\n value: value || uncontrolledValue || defaultValue,\n ...(rows ? { rows } : { autoResize }),\n },\n focused,\n );\n\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText>\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 style={{ width: helperWidth, ...style }}\n className={className}\n >\n {hasOuterLabel && (\n <StyledLabel>\n {required && (\n <StyledIndicator className={cx(classes.outerLabelPlacement, requiredPlacementClass)} />\n )}\n {label}\n {optionalTextNode}\n </StyledLabel>\n )}\n <StyledContainer\n className={cx(styledContainer, ...dynamicLabelClasses)}\n width={helperWidth}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n >\n {required && !hasOuterLabel && (\n <StyledIndicator className={cx(classes.innerLabelPlacement, requiredPlacementClass)} />\n )}\n {contentRight && <StyledContent>{contentRight}</StyledContent>}\n <StyledTextAreaWrapper className={styledTextAreaWrapper} hasHelper={hasHelper}>\n <StyledTextArea\n className={styledTextArea}\n id={id}\n hasContentRight={Boolean(contentRight)}\n hasHelper={hasHelper}\n applyCustomWidth={applyCustomWidth}\n ref={mergeRefs(outerRef, innerRef)}\n disabled={disabled}\n height={autoResize ? 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 disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n attrs: true,\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","getDynamicLabelClasses","props","focused","readOnly","label","labelPlacement","autoResize","rows","value","size","withFocusedOuterUpPlaceholder","undefined","withInnerPlaceholderUp","withHidePlaceholder","textAreaRoot","Root","forwardRef","innerRef","helperText","status","resize","rightHelper","leftHelper","contentRight","_props$autoResize","_props$minAuto","minAuto","maxAuto","_props$labelPlacement","placeholder","defaultValue","height","width","disabled","_props$required","required","_props$requiredPlacem","requiredPlacement","_props$optional","optional","view","id","style","className","cols","onChange","rest","_excluded","_useState","useState","concat","_useState2","_slicedToArray","helperWidth","setHelperWidth","_useState3","_useState4","setFocused","_useState5","_useState6","uncontrolledValue","setUncontrolledValue","outerRef","createRef","innerOptional","hasHelper","Boolean","hasOuterLabel","hasInnerLabel","hasPlaceholderOptional","overriddenView","textareaHelperId","applyCustomWidth","placeholderLabel","requiredPlacementClass","useResizeObserver","currentElement","inlineWidth","_currentElement$getBo","getBoundingClientRect","elementWidth","ROOT_FONT_SIZE","useAutoResize","onFocusHandler","useCallback","onBlurHandler","onChangeHandler","event","target","dynamicLabelClasses","_objectSpread","optionalTextNode","React","createElement","StyledOptionalText","StyledLabel","StyledIndicator","cx","outerLabelPlacement","StyledContainer","apply","_toConsumableArray","onFocus","onBlur","innerLabelPlacement","StyledContent","StyledTextAreaWrapper","StyledTextArea","_extends","hasContentRight","ref","mergeRefs","StyledHelpers","StyledLeftHelper","StyledRightHelper","StyledPlaceholder","htmlFor","textAreaConfig","name","tag","layout","variations","css","sizeCSS","viewCSS","disabledCSS","attrs","defaults"],"mappings":";;;;;;;;;;;;;AA4BA,IACIA,kBAAkB,GAQlBC,OAAO,CARPD,kBAAkB;EAClBE,4BAA4B,GAO5BD,OAAO,CAPPC,4BAA4B;EAC5BC,eAAe,GAMfF,OAAO,CANPE,eAAe;EACfC,eAAe,GAKfH,OAAO,CALPG,eAAe;EACfC,cAAc,GAIdJ,OAAO,CAJPI,cAAc;EACdC,qBAAqB,GAGrBL,OAAO,CAHPK,qBAAqB;EACrBC,iBAAiB,GAEjBN,OAAO,CAFPM,iBAAiB;EACjBC,aAAAA,GACAP,OAAO,CADPO,aAAAA,CAAAA;AAGJ,IAAMC,Y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AAA,IAAI,EAAJA,IAAI;AACJ8H,EAAAA,UAAU,EAAE;AACRhH,IAAAA,IAAI,EAAE;AACFiH,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDnF,IAAAA,IAAI,EAAE;AACFkF,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD3F,IAAAA,QAAQ,EAAE;AACNyF,MAAAA,GAAG,EAAEG,MAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACD3H,IAAAA,QAAQ,EAAE;AACN2H,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtH,IAAAA,IAAI,EAAE,GAAG;AACT+B,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"TextArea.js","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import React, { forwardRef, useState, createRef, useCallback } from 'react';\nimport { css } from '@linaria/core';\nimport { useResizeObserver } from '@salutejs/plasma-core';\n\nimport { cx } from '../../utils';\nimport type { RootProps } from '../../engines/types';\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} 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 disabledCSS } from './variations/_disabled/base';\nimport type { TextAreaProps } from './TextArea.types';\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\n// TODO: Перенести этот метод в файл applyDynamicLabel.ts\nexport const getDynamicLabelClasses = (props: TextAreaProps, focused: boolean) => {\n const { readOnly, label, labelPlacement, autoResize, 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 !autoResize &&\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 || autoResize)) ||\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, TextAreaProps>) =>\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 placeholder,\n defaultValue,\n height,\n width,\n value,\n disabled,\n required = false,\n requiredPlacement = 'right',\n optional = false,\n size,\n view,\n id,\n style,\n className,\n readOnly,\n rows,\n cols,\n onChange,\n ...rest\n } = props;\n\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 = innerRef && 'current' in innerRef ? innerRef : createRef<HTMLTextAreaElement>();\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 requiredPlacementClass = requiredPlacement === 'right' ? 'align-right ' : undefined;\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, 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 dynamicLabelClasses = getDynamicLabelClasses(\n {\n size,\n readOnly,\n label,\n labelPlacement,\n value: value || uncontrolledValue || defaultValue,\n ...(rows ? { rows } : { autoResize }),\n },\n focused,\n );\n\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText>\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 style={{ width: helperWidth, ...style }}\n className={className}\n >\n {hasOuterLabel && (\n <StyledLabel>\n {required && (\n <StyledIndicator className={cx(classes.outerLabelPlacement, requiredPlacementClass)} />\n )}\n {label}\n {optionalTextNode}\n </StyledLabel>\n )}\n <StyledContainer\n className={cx(styledContainer, ...dynamicLabelClasses)}\n width={helperWidth}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n >\n {required && !hasOuterLabel && (\n <StyledIndicator className={cx(classes.innerLabelPlacement, requiredPlacementClass)} />\n )}\n {contentRight && <StyledContent>{contentRight}</StyledContent>}\n <StyledTextAreaWrapper className={styledTextAreaWrapper} hasHelper={hasHelper}>\n <StyledTextArea\n className={styledTextArea}\n id={id}\n hasContentRight={Boolean(contentRight)}\n hasHelper={hasHelper}\n applyCustomWidth={applyCustomWidth}\n ref={outerRef}\n disabled={disabled}\n height={autoResize ? 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 disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n attrs: true,\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","getDynamicLabelClasses","props","focused","readOnly","label","labelPlacement","autoResize","rows","value","size","withFocusedOuterUpPlaceholder","undefined","withInnerPlaceholderUp","withHidePlaceholder","textAreaRoot","Root","forwardRef","innerRef","helperText","status","resize","rightHelper","leftHelper","contentRight","_props$autoResize","_props$minAuto","minAuto","maxAuto","_props$labelPlacement","placeholder","defaultValue","height","width","disabled","_props$required","required","_props$requiredPlacem","requiredPlacement","_props$optional","optional","view","id","style","className","cols","onChange","rest","_excluded","_useState","useState","concat","_useState2","_slicedToArray","helperWidth","setHelperWidth","_useState3","_useState4","setFocused","_useState5","_useState6","uncontrolledValue","setUncontrolledValue","outerRef","createRef","innerOptional","hasHelper","Boolean","hasOuterLabel","hasInnerLabel","hasPlaceholderOptional","overriddenView","textareaHelperId","applyCustomWidth","placeholderLabel","requiredPlacementClass","useResizeObserver","currentElement","inlineWidth","_currentElement$getBo","getBoundingClientRect","elementWidth","ROOT_FONT_SIZE","useAutoResize","onFocusHandler","useCallback","onBlurHandler","onChangeHandler","event","target","dynamicLabelClasses","_objectSpread","optionalTextNode","React","createElement","StyledOptionalText","StyledLabel","StyledIndicator","cx","outerLabelPlacement","StyledContainer","apply","_toConsumableArray","onFocus","onBlur","innerLabelPlacement","StyledContent","StyledTextAreaWrapper","StyledTextArea","_extends","hasContentRight","ref","StyledHelpers","StyledLeftHelper","StyledRightHelper","StyledPlaceholder","htmlFor","textAreaConfig","name","tag","layout","variations","css","sizeCSS","viewCSS","disabledCSS","attrs","defaults"],"mappings":";;;;;;;;;;;;AA4BA,IACIA,kBAAkB,GAQlBC,OAAO,CARPD,kBAAkB;EAClBE,4BAA4B,GAO5BD,OAAO,CAPPC,4BAA4B;EAC5BC,eAAe,GA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,OAAO,EAAE1E,EAAAA;KAERgC,EAAAA,gBAAgB,EAChB,CAACN,aAAa,IAAIwB,gBACJ,CAEV,CACf,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMyB,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEzG,YAAY;AACpBnB,EAAAA,IAAI,EAAJA,IAAI;AACJ6H,EAAAA,UAAU,EAAE;AACR/G,IAAAA,IAAI,EAAE;AACFgH,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDlF,IAAAA,IAAI,EAAE;AACFiF,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD1F,IAAAA,QAAQ,EAAE;AACNwF,MAAAA,GAAG,EAAEG,MAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACD1H,IAAAA,QAAQ,EAAE;AACN0H,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrH,IAAAA,IAAI,EAAE,GAAG;AACT+B,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
@@ -18,6 +18,7 @@ var optionalText = 'optional';
18
18
  var base = "bpunezx";
19
19
  var textFieldRoot = function textFieldRoot(Root) {
20
20
  return /*#__PURE__*/forwardRef(function (_ref, ref) {
21
+ var _inputRef$current, _inputRef$current3;
21
22
  var id = _ref.id,
22
23
  className = _ref.className,
23
24
  style = _ref.style,
@@ -58,7 +59,7 @@ var textFieldRoot = function textFieldRoot(Root) {
58
59
  inputRef: inputRef,
59
60
  chipsRefs: chipsRefs
60
61
  };
61
- var _useState = useState(Boolean(outerValue) || Boolean(rest === null || rest === void 0 ? void 0 : rest.defaultValue)),
62
+ var _useState = useState(Boolean(outerValue) || Boolean(inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value) || Boolean(rest === null || rest === void 0 ? void 0 : rest.defaultValue)),
62
63
  _useState2 = _slicedToArray(_useState, 2),
63
64
  hasValue = _useState2[0],
64
65
  setHasValue = _useState2[1];
@@ -156,8 +157,9 @@ var textFieldRoot = function textFieldRoot(Root) {
156
157
  setChips(newChips);
157
158
  }, [isChipEnumeration, values]);
158
159
  useEffect(function () {
159
- setHasValue(Boolean(outerValue) || Boolean(rest === null || rest === void 0 ? void 0 : rest.defaultValue));
160
- }, [outerValue, rest.defaultValue]);
160
+ var _inputRef$current2;
161
+ setHasValue(Boolean(outerValue) || Boolean(inputRef === null || inputRef === void 0 || (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.value) || Boolean(rest === null || rest === void 0 ? void 0 : rest.defaultValue));
162
+ }, [outerValue, rest.defaultValue, inputRef === null || inputRef === void 0 || (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.value]);
161
163
  var innerOptional = Boolean(required ? false : optional);
162
164
  var hasPlaceholderOptional = innerOptional && !innerLabelValue && !hasOuterLabel;
163
165
  var optionalTextNode = innerOptional ? /*#__PURE__*/React.createElement(StyledOptionalText, null, Boolean(hasPlaceholderOptional ? innerPlaceholderValue : innerLabelValue) && '\xa0', optionalText) : null;
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { FormEventHandler, ChangeEventHandler, KeyboardEvent, ChangeEvent } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\nimport { css } from '@linaria/core';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { ChipValues, TextFieldPrimitiveValue, TextFieldProps } from './TextField.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readOnlyCSS } from './variations/_read-only/base';\nimport { base as labelPlacementCSS } from './variations/_label-placement/base';\nimport {\n Input,\n InputContainer,\n LeftHelper,\n Label,\n InputWrapper,\n InputLabelWrapper,\n StyledContentLeft,\n StyledContentRight,\n StyledChips,\n StyledTextBefore,\n StyledTextAfter,\n StyledIndicator,\n StyledOptionalText,\n InputPlaceholder,\n} from './TextField.styles';\nimport { classes } from './TextField.tokens';\nimport { TextFieldChip } from './ui';\nimport { useKeyNavigation } from './hooks';\n\nconst optionalText = 'optional';\n\nexport const base = css`\n /* NOTE: Webkit не применяет opacity к inline тегам */\n display: block;\n`;\n\nexport const textFieldRoot = (Root: RootProps<HTMLDivElement, TextFieldProps>) =>\n forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n className,\n style,\n\n // layout\n contentLeft,\n contentRight,\n label,\n labelPlacement,\n textBefore,\n textAfter,\n placeholder,\n leftHelper,\n enumerationType = 'plain',\n requiredPlacement = 'right',\n\n // variations\n view,\n size,\n readOnly = false,\n disabled = false,\n required = false,\n optional,\n\n // controlled\n value: outerValue,\n chips: values,\n\n // events\n onChange,\n onChangeChips,\n onSearch,\n onKeyDown,\n\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const chipsRefs = useRef<Array<HTMLButtonElement>>([]);\n\n const controlledRefs = { contentRef, inputRef, chipsRefs };\n\n const [hasValue, setHasValue] = useState(Boolean(outerValue) || Boolean(rest?.defaultValue));\n const [chips, setChips] = useState<Array<ChipValues>>([]);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const labelId = safeUseId();\n const helperTextId = safeUseId();\n\n const isChipEnumeration = enumerationType === 'chip';\n const isChipsVisible = isChipEnumeration && Boolean(chips?.length);\n const withHasChips = isChipsVisible ? classes.hasChips : undefined;\n\n const hasLabelValue = Boolean(label);\n const hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;\n const hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;\n const hasPlaceholder = Boolean(placeholder) && !hasInnerLabel;\n\n const innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;\n const innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;\n\n const innerPlaceholderValue = hasPlaceholder ? placeholder : undefined;\n const placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;\n\n const requiredPlacementClass = requiredPlacement === 'right' ? 'align-right ' : undefined;\n const labelPlacementClass = innerLabelPlacementValue\n ? classes[`${innerLabelPlacementValue}LabelPlacement` as keyof typeof classes]\n : undefined;\n const hasValueClass = hasValue ? classes.hasValue : undefined;\n\n const wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;\n const wrapperWithoutRightContent =\n !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;\n\n const handleInput: FormEventHandler<HTMLInputElement> = (event) => {\n setHasValue(Boolean((event.target as HTMLInputElement).value));\n };\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n if (disabled || readOnly) {\n return;\n }\n\n const { maxLength, value } = event.target;\n\n if (maxLength !== -1 && value.length > maxLength) {\n return;\n }\n\n onChange?.(event);\n };\n\n const updateChips = (newChips: Array<ChipValues>, newValues: Array<TextFieldPrimitiveValue>) => {\n setChips(newChips);\n onChangeChips?.(newValues);\n };\n\n const { handleInputKeydown, handleChipKeyDown, onChipClear, handleContentKeyDown } = useKeyNavigation({\n controlledRefs,\n disabled,\n readOnly,\n chips,\n enumerationType,\n updateChips,\n onSearch,\n onChange,\n onEnterDisabled: (rest as any).onEnterDisabled,\n });\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const handleInputFocus = () => {\n if (readOnly || disabled || !inputRef?.current) {\n return;\n }\n\n inputRef.current.scrollTo({\n top: 0,\n left: inputRef.current.offsetLeft,\n behavior: 'smooth',\n });\n\n inputRef.current.focus();\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs?.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n const handleOnKeyDown = (event: ChangeEvent<HTMLInputElement> & KeyboardEvent<HTMLInputElement>) => {\n handleInputKeydown(event);\n onKeyDown && onKeyDown(event);\n };\n\n useEffect(() => {\n if (!isChipEnumeration && !values?.length) {\n return;\n }\n\n const newChips =\n values?.map((value, index) => ({\n id: `${index}_${value}`,\n text: value,\n })) || [];\n\n setChips(newChips);\n }, [isChipEnumeration, values]);\n\n useEffect(() => {\n setHasValue(Boolean(outerValue) || Boolean(rest?.defaultValue));\n }, [outerValue, rest.defaultValue]);\n\n const innerOptional = Boolean(required ? false : optional);\n const hasPlaceholderOptional = innerOptional && !innerLabelValue && !hasOuterLabel;\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText>\n {Boolean(hasPlaceholderOptional ? innerPlaceholderValue : innerLabelValue) && '\\xa0'}\n {optionalText}\n </StyledOptionalText>\n ) : null;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n labelPlacement={innerLabelPlacementValue}\n onClick={handleInputFocus}\n className={cx(labelPlacementClass, classes.textFieldGroupItem, className)}\n style={style}\n >\n {hasOuterLabel && (\n <Label id={labelId} htmlFor={id}>\n {required && (\n <StyledIndicator className={cx(classes.outerLabelPlacement, requiredPlacementClass)} />\n )}\n {innerLabelValue}\n {optionalTextNode}\n </Label>\n )}\n <InputWrapper\n // Ref для внутреннего использования. Не отдается наружу.\n ref={(rest as any).inputWrapperRef}\n className={cx(withHasChips, wrapperWithoutLeftContent, wrapperWithoutRightContent)}\n >\n {!hasOuterLabel && required && (\n <StyledIndicator className={cx(classes.innerLabelPlacement, requiredPlacementClass)} />\n )}\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n <InputLabelWrapper\n tabIndex={-1}\n ref={contentRef}\n onKeyDown={handleContentKeyDown}\n className={withHasChips}\n >\n {textBefore && <StyledTextBefore>{textBefore}</StyledTextBefore>}\n {isChipEnumeration && Boolean(chips?.length) && (\n <StyledChips>\n {chips?.map(({ id: chipId, text }, index) => {\n return (\n <TextFieldChip\n id={chipId}\n ref={(element) => getRef(element, index)}\n key={`${chipId}_${index}`}\n disabled={disabled}\n readOnly={readOnly}\n value={text}\n text={text}\n onKeyDown={(event) => handleChipKeyDown(event, chipId, index)}\n onClear={() => onChipClear(chipId, index)}\n onClick={onChipClick}\n />\n );\n })}\n </StyledChips>\n )}\n <InputContainer>\n <Input\n ref={inputForkRef}\n id={innerId}\n value={outerValue}\n aria-labelledby={labelId}\n aria-describedby={helperTextId}\n placeholder={innerPlaceholderValue}\n className={cx(hasValueClass)}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n onInput={handleInput}\n onChange={handleChange}\n onKeyDown={handleOnKeyDown}\n {...rest}\n />\n {hasInnerLabel && (\n <Label id={labelId} htmlFor={innerId}>\n {innerLabelValue}\n {optionalTextNode}\n </Label>\n )}\n {placeholderShown && !hasValue && (\n <InputPlaceholder>\n {innerPlaceholderValue}\n {hasPlaceholderOptional && optionalTextNode}\n </InputPlaceholder>\n )}\n </InputContainer>\n {textAfter && <StyledTextAfter>{textAfter}</StyledTextAfter>}\n </InputLabelWrapper>\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </InputWrapper>\n {leftHelper && <LeftHelper id={helperTextId}>{leftHelper}</LeftHelper>}\n </Root>\n );\n },\n );\n\nexport const textFieldConfig = {\n name: 'TextField',\n tag: 'div',\n layout: textFieldRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readOnlyCSS,\n attrs: true,\n },\n labelPlacement: {\n css: labelPlacementCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n },\n};\n"],"names":["optionalText","base","textFieldRoot","Root","forwardRef","_ref","ref","id","className","style","contentLeft","contentRight","label","labelPlacement","textBefore","textAfter","placeholder","leftHelper","_ref$enumerationType","enumerationType","_ref$requiredPlacemen","requiredPlacement","view","size","_ref$readOnly","readOnly","_ref$disabled","disabled","_ref$required","required","optional","outerValue","value","values","chips","onChange","onChangeChips","onSearch","onKeyDown","rest","contentRef","useRef","inputRef","inputForkRef","useForkRef","chipsRefs","controlledRefs","_useState","useState","Boolean","defaultValue","_useState2","_slicedToArray","hasValue","setHasValue","_useState3","_useState4","setChips","uniqId","safeUseId","innerId","labelId","helperTextId","isChipEnumeration","isChipsVisible","length","withHasChips","classes","hasChips","undefined","hasLabelValue","hasInnerLabel","hasOuterLabel","hasPlaceholder","innerLabelValue","innerLabelPlacementValue","innerPlaceholderValue","placeholderShown","requiredPlacementClass","labelPlacementClass","concat","hasValueClass","wrapperWithoutLeftContent","hasEmptyContentLeft","wrapperWithoutRightContent","hasEmptyContentRight","handleInput","event","target","handleChange","_event$target","maxLength","updateChips","newChips","newValues","_useKeyNavigation","useKeyNavigation","onEnterDisabled","handleInputKeydown","handleChipKeyDown","onChipClear","handleContentKeyDown","onChipClick","stopPropagation","handleInputFocus","current","scrollTo","top","left","offsetLeft","behavior","focus","getRef","element","index","handleOnKeyDown","useEffect","map","text","innerOptional","hasPlaceholderOptional","optionalTextNode","React","createElement","StyledOptionalText","onClick","cx","textFieldGroupItem","Label","htmlFor","StyledIndicator","outerLabelPlacement","InputWrapper","inputWrapperRef","innerLabelPlacement","StyledContentLeft","InputLabelWrapper","tabIndex","StyledTextBefore","StyledChips","_ref2","chipId","TextFieldChip","key","onClear","InputContainer","Input","_extends","onInput","InputPlaceholder","StyledTextAfter","StyledContentRight","LeftHelper","textFieldConfig","name","tag","layout","variations","css","viewCSS","sizeCSS","disabledCSS","attrs","readOnlyCSS","labelPlacementCSS","defaults"],"mappings":";;;;;;;;;;;;;;;AAkCA,IAAMA,YAAY,GAAG,UAAU,CAAA;AAExB,IAAMC,IAAI,GAGhB,UAAA;IAE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AAMwI,eAAe,GAAG;AAC3BC,EAAAA,IAAI,EAAE,WAAW;AACjBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE1J,aAAa;AACrBD,EAAAA,IAAI,EAAJA,IAAI;AACJ4J,EAAAA,UAAU,EAAE;AACRvI,IAAAA,IAAI,EAAE;AACFwI,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDxI,IAAAA,IAAI,EAAE;AACFuI,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDrI,IAAAA,QAAQ,EAAE;AACNmI,MAAAA,GAAG,EAAEG,MAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDzI,IAAAA,QAAQ,EAAE;AACNqI,MAAAA,GAAG,EAAEK,MAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACDrJ,IAAAA,cAAc,EAAE;AACZiJ,MAAAA,GAAG,EAAEM,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN9I,IAAAA,IAAI,EAAE,GAAG;AACTD,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"TextField.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { FormEventHandler, ChangeEventHandler, KeyboardEvent, ChangeEvent } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\nimport { css } from '@linaria/core';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { ChipValues, TextFieldPrimitiveValue, TextFieldProps } from './TextField.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readOnlyCSS } from './variations/_read-only/base';\nimport { base as labelPlacementCSS } from './variations/_label-placement/base';\nimport {\n Input,\n InputContainer,\n LeftHelper,\n Label,\n InputWrapper,\n InputLabelWrapper,\n StyledContentLeft,\n StyledContentRight,\n StyledChips,\n StyledTextBefore,\n StyledTextAfter,\n StyledIndicator,\n StyledOptionalText,\n InputPlaceholder,\n} from './TextField.styles';\nimport { classes } from './TextField.tokens';\nimport { TextFieldChip } from './ui';\nimport { useKeyNavigation } from './hooks';\n\nconst optionalText = 'optional';\n\nexport const base = css`\n /* NOTE: Webkit не применяет opacity к inline тегам */\n display: block;\n`;\n\nexport const textFieldRoot = (Root: RootProps<HTMLDivElement, TextFieldProps>) =>\n forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n className,\n style,\n\n // layout\n contentLeft,\n contentRight,\n label,\n labelPlacement,\n textBefore,\n textAfter,\n placeholder,\n leftHelper,\n enumerationType = 'plain',\n requiredPlacement = 'right',\n\n // variations\n view,\n size,\n readOnly = false,\n disabled = false,\n required = false,\n optional,\n\n // controlled\n value: outerValue,\n chips: values,\n\n // events\n onChange,\n onChangeChips,\n onSearch,\n onKeyDown,\n\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const chipsRefs = useRef<Array<HTMLButtonElement>>([]);\n\n const controlledRefs = { contentRef, inputRef, chipsRefs };\n\n const [hasValue, setHasValue] = useState(\n Boolean(outerValue) || Boolean(inputRef?.current?.value) || Boolean(rest?.defaultValue),\n );\n const [chips, setChips] = useState<Array<ChipValues>>([]);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const labelId = safeUseId();\n const helperTextId = safeUseId();\n\n const isChipEnumeration = enumerationType === 'chip';\n const isChipsVisible = isChipEnumeration && Boolean(chips?.length);\n const withHasChips = isChipsVisible ? classes.hasChips : undefined;\n\n const hasLabelValue = Boolean(label);\n const hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;\n const hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;\n const hasPlaceholder = Boolean(placeholder) && !hasInnerLabel;\n\n const innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;\n const innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;\n\n const innerPlaceholderValue = hasPlaceholder ? placeholder : undefined;\n const placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;\n\n const requiredPlacementClass = requiredPlacement === 'right' ? 'align-right ' : undefined;\n const labelPlacementClass = innerLabelPlacementValue\n ? classes[`${innerLabelPlacementValue}LabelPlacement` as keyof typeof classes]\n : undefined;\n const hasValueClass = hasValue ? classes.hasValue : undefined;\n\n const wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;\n const wrapperWithoutRightContent =\n !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;\n\n const handleInput: FormEventHandler<HTMLInputElement> = (event) => {\n setHasValue(Boolean((event.target as HTMLInputElement).value));\n };\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n if (disabled || readOnly) {\n return;\n }\n\n const { maxLength, value } = event.target;\n\n if (maxLength !== -1 && value.length > maxLength) {\n return;\n }\n\n onChange?.(event);\n };\n\n const updateChips = (newChips: Array<ChipValues>, newValues: Array<TextFieldPrimitiveValue>) => {\n setChips(newChips);\n onChangeChips?.(newValues);\n };\n\n const { handleInputKeydown, handleChipKeyDown, onChipClear, handleContentKeyDown } = useKeyNavigation({\n controlledRefs,\n disabled,\n readOnly,\n chips,\n enumerationType,\n updateChips,\n onSearch,\n onChange,\n onEnterDisabled: (rest as any).onEnterDisabled,\n });\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const handleInputFocus = () => {\n if (readOnly || disabled || !inputRef?.current) {\n return;\n }\n\n inputRef.current.scrollTo({\n top: 0,\n left: inputRef.current.offsetLeft,\n behavior: 'smooth',\n });\n\n inputRef.current.focus();\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs?.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n const handleOnKeyDown = (event: ChangeEvent<HTMLInputElement> & KeyboardEvent<HTMLInputElement>) => {\n handleInputKeydown(event);\n onKeyDown && onKeyDown(event);\n };\n\n useEffect(() => {\n if (!isChipEnumeration && !values?.length) {\n return;\n }\n\n const newChips =\n values?.map((value, index) => ({\n id: `${index}_${value}`,\n text: value,\n })) || [];\n\n setChips(newChips);\n }, [isChipEnumeration, values]);\n\n useEffect(() => {\n setHasValue(Boolean(outerValue) || Boolean(inputRef?.current?.value) || Boolean(rest?.defaultValue));\n }, [outerValue, rest.defaultValue, inputRef?.current?.value]);\n\n const innerOptional = Boolean(required ? false : optional);\n const hasPlaceholderOptional = innerOptional && !innerLabelValue && !hasOuterLabel;\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText>\n {Boolean(hasPlaceholderOptional ? innerPlaceholderValue : innerLabelValue) && '\\xa0'}\n {optionalText}\n </StyledOptionalText>\n ) : null;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n labelPlacement={innerLabelPlacementValue}\n onClick={handleInputFocus}\n className={cx(labelPlacementClass, classes.textFieldGroupItem, className)}\n style={style}\n >\n {hasOuterLabel && (\n <Label id={labelId} htmlFor={id}>\n {required && (\n <StyledIndicator className={cx(classes.outerLabelPlacement, requiredPlacementClass)} />\n )}\n {innerLabelValue}\n {optionalTextNode}\n </Label>\n )}\n <InputWrapper\n // Ref для внутреннего использования. Не отдается наружу.\n ref={(rest as any).inputWrapperRef}\n className={cx(withHasChips, wrapperWithoutLeftContent, wrapperWithoutRightContent)}\n >\n {!hasOuterLabel && required && (\n <StyledIndicator className={cx(classes.innerLabelPlacement, requiredPlacementClass)} />\n )}\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n <InputLabelWrapper\n tabIndex={-1}\n ref={contentRef}\n onKeyDown={handleContentKeyDown}\n className={withHasChips}\n >\n {textBefore && <StyledTextBefore>{textBefore}</StyledTextBefore>}\n {isChipEnumeration && Boolean(chips?.length) && (\n <StyledChips>\n {chips?.map(({ id: chipId, text }, index) => {\n return (\n <TextFieldChip\n id={chipId}\n ref={(element) => getRef(element, index)}\n key={`${chipId}_${index}`}\n disabled={disabled}\n readOnly={readOnly}\n value={text}\n text={text}\n onKeyDown={(event) => handleChipKeyDown(event, chipId, index)}\n onClear={() => onChipClear(chipId, index)}\n onClick={onChipClick}\n />\n );\n })}\n </StyledChips>\n )}\n <InputContainer>\n <Input\n ref={inputForkRef}\n id={innerId}\n value={outerValue}\n aria-labelledby={labelId}\n aria-describedby={helperTextId}\n placeholder={innerPlaceholderValue}\n className={cx(hasValueClass)}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n onInput={handleInput}\n onChange={handleChange}\n onKeyDown={handleOnKeyDown}\n {...rest}\n />\n {hasInnerLabel && (\n <Label id={labelId} htmlFor={innerId}>\n {innerLabelValue}\n {optionalTextNode}\n </Label>\n )}\n {placeholderShown && !hasValue && (\n <InputPlaceholder>\n {innerPlaceholderValue}\n {hasPlaceholderOptional && optionalTextNode}\n </InputPlaceholder>\n )}\n </InputContainer>\n {textAfter && <StyledTextAfter>{textAfter}</StyledTextAfter>}\n </InputLabelWrapper>\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </InputWrapper>\n {leftHelper && <LeftHelper id={helperTextId}>{leftHelper}</LeftHelper>}\n </Root>\n );\n },\n );\n\nexport const textFieldConfig = {\n name: 'TextField',\n tag: 'div',\n layout: textFieldRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readOnlyCSS,\n attrs: true,\n },\n labelPlacement: {\n css: labelPlacementCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n },\n};\n"],"names":["optionalText","base","textFieldRoot","Root","forwardRef","_ref","ref","_inputRef$current","_inputRef$current3","id","className","style","contentLeft","contentRight","label","labelPlacement","textBefore","textAfter","placeholder","leftHelper","_ref$enumerationType","enumerationType","_ref$requiredPlacemen","requiredPlacement","view","size","_ref$readOnly","readOnly","_ref$disabled","disabled","_ref$required","required","optional","outerValue","value","values","chips","onChange","onChangeChips","onSearch","onKeyDown","rest","contentRef","useRef","inputRef","inputForkRef","useForkRef","chipsRefs","controlledRefs","_useState","useState","Boolean","current","defaultValue","_useState2","_slicedToArray","hasValue","setHasValue","_useState3","_useState4","setChips","uniqId","safeUseId","innerId","labelId","helperTextId","isChipEnumeration","isChipsVisible","length","withHasChips","classes","hasChips","undefined","hasLabelValue","hasInnerLabel","hasOuterLabel","hasPlaceholder","innerLabelValue","innerLabelPlacementValue","innerPlaceholderValue","placeholderShown","requiredPlacementClass","labelPlacementClass","concat","hasValueClass","wrapperWithoutLeftContent","hasEmptyContentLeft","wrapperWithoutRightContent","hasEmptyContentRight","handleInput","event","target","handleChange","_event$target","maxLength","updateChips","newChips","newValues","_useKeyNavigation","useKeyNavigation","onEnterDisabled","handleInputKeydown","handleChipKeyDown","onChipClear","handleContentKeyDown","onChipClick","stopPropagation","handleInputFocus","scrollTo","top","left","offsetLeft","behavior","focus","getRef","element","index","handleOnKeyDown","useEffect","map","text","_inputRef$current2","innerOptional","hasPlaceholderOptional","optionalTextNode","React","createElement","StyledOptionalText","onClick","cx","textFieldGroupItem","Label","htmlFor","StyledIndicator","outerLabelPlacement","InputWrapper","inputWrapperRef","innerLabelPlacement","StyledContentLeft","InputLabelWrapper","tabIndex","StyledTextBefore","StyledChips","_ref2","chipId","TextFieldChip","key","onClear","InputContainer","Input","_extends","onInput","InputPlaceholder","StyledTextAfter","StyledContentRight","LeftHelper","textFieldConfig","name","tag","layout","variations","css","viewCSS","sizeCSS","disabledCSS","attrs","readOnlyCSS","labelPlacementCSS","defaults"],"mappings":";;;;;;;;;;;;;;;AAkCA,IAAMA,YAAY,GAAG,UAAU,CAAA;AAExB,IAAMC,IAAI,GAGhB,UAAA;IAEYC,aAAa,GAAGA,SAAhBA,aAAa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AAA,QAAQ,EAAE;AACN/I,IAAAA,IAAI,EAAE,GAAG;AACTD,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
package/es/index.css CHANGED
@@ -581,22 +581,20 @@
581
581
  .SliderBase_styles_7is2ll_r1bro5xo__0c0959e2{position:relative;top:50%;height:var(--plasma-slider-rail-height);border-radius:var(--plasma-slider-rail-border-radius);background-color:var(--plasma-slider-rail-background-color);overflow:hidden;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}
582
582
  .SliderBase_styles_7is2ll_fdg7yhg__0c0959e2{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
583
583
 
584
- .Single_styles_9lxkbx_l1p4kc08__98c0cad3{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);}
584
+ .Single_styles_1r9f1e0_l1p4kc08__4db690dd{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);}
585
585
 
586
- .Single_styles_9lxkbx_lozb535__98c0cad3{font-family:var(--plasma-slider-label-font-family);font-size:var(--plasma-slider-label-font-size);font-style:var(--plasma-slider-label-font-style);font-weight:var(--plasma-slider-label-font-weight);-webkit-letter-spacing:var(--plasma-slider-label-letter-spacing);-moz-letter-spacing:var(--plasma-slider-label-letter-spacing);-ms-letter-spacing:var(--plasma-slider-label-letter-spacing);letter-spacing:var(--plasma-slider-label-letter-spacing);line-height:var(--plasma-slider-label-line-height);}
587
- .Single_styles_9lxkbx_s1w9icbd__98c0cad3{color:var(--plasma-slider-range-value-color);font-family:var(--plasma-slider-range-value-font-family);font-size:var(--plasma-slider-range-value-font-size);font-style:var(--plasma-slider-range-value-font-style);font-weight:var(--plasma-slider-range-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-range-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-range-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-range-value-letter-spacing);letter-spacing:var(--plasma-slider-range-value-letter-spacing);line-height:var(--plasma-slider-range-value-line-height);-webkit-transition:opacity 0.1s ease-in-out;transition:opacity 0.1s ease-in-out;}.Single_styles_9lxkbx_s1w9icbd__98c0cad3.Single_styles_9lxkbx_sliderHideMinValue__98c0cad3,.Single_styles_9lxkbx_s1w9icbd__98c0cad3.Single_styles_9lxkbx_sliderHideMaxValue__98c0cad3{opacity:0;}.Single_styles_9lxkbx_s1w9icbd__98c0cad3.Single_styles_9lxkbx_sliderActiveRangeValue__98c0cad3{color:var(--plasma-slider-label-color);}
588
- .Single_styles_9lxkbx_s1d2sfgl__98c0cad3{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;}.Single_styles_9lxkbx_s1d2sfgl__98c0cad3.Single_styles_9lxkbx_sliderRangeValuesPlacementOuter__98c0cad3 .Single_styles_9lxkbx_s1w9icbd__98c0cad3{position:absolute;bottom:var(--plasma-slider-range-value-bottom-offset);left:0;}.Single_styles_9lxkbx_s1d2sfgl__98c0cad3.Single_styles_9lxkbx_sliderRangeValuesPlacementOuter__98c0cad3 .Single_styles_9lxkbx_s1w9icbd__98c0cad3.Single_styles_9lxkbx_sliderMaxRangeValue__98c0cad3{left:unset;right:0;}.Single_styles_9lxkbx_s1d2sfgl__98c0cad3.Single_styles_9lxkbx_sliderRangeValuesPlacementInner__98c0cad3{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_9lxkbx_s1d2sfgl__98c0cad3.Single_styles_9lxkbx_sliderRangeValuesPlacementInner__98c0cad3 .Single_styles_9lxkbx_s1w9icbd__98c0cad3{margin-right:var(--plasma-slider-range-min-value-margin);}.Single_styles_9lxkbx_s1d2sfgl__98c0cad3.Single_styles_9lxkbx_sliderRangeValuesPlacementInner__98c0cad3 .Single_styles_9lxkbx_s1w9icbd__98c0cad3.Single_styles_9lxkbx_sliderMaxRangeValue__98c0cad3{margin-right:0;margin-left:var(--plasma-slider-range-max-value-margin);}
589
- .Single_styles_9lxkbx_ss3ujqx__98c0cad3{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;opacity:var(--plasma-slider-disabled-opacity);}.Single_styles_9lxkbx_ss3ujqx__98c0cad3.Single_styles_9lxkbx_sliderLabelPlacementOuter__98c0cad3{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_9lxkbx_ss3ujqx__98c0cad3.Single_styles_9lxkbx_sliderLabelPlacementOuter__98c0cad3 .Single_styles_9lxkbx_l1p4kc08__98c0cad3{margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}.Single_styles_9lxkbx_ss3ujqx__98c0cad3.Single_styles_9lxkbx_sliderLabelPlacementInner__98c0cad3 .Single_styles_9lxkbx_l1p4kc08__98c0cad3{margin-right:var(--plasma-slider-label-wrapper-margin-right);}
590
- .Single_styles_9lxkbx_i1c6g2fq__98c0cad3{visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;}
586
+ .Single_styles_1r9f1e0_lozb535__4db690dd{font-family:var(--plasma-slider-label-font-family);font-size:var(--plasma-slider-label-font-size);font-style:var(--plasma-slider-label-font-style);font-weight:var(--plasma-slider-label-font-weight);-webkit-letter-spacing:var(--plasma-slider-label-letter-spacing);-moz-letter-spacing:var(--plasma-slider-label-letter-spacing);-ms-letter-spacing:var(--plasma-slider-label-letter-spacing);letter-spacing:var(--plasma-slider-label-letter-spacing);line-height:var(--plasma-slider-label-line-height);}
587
+ .Single_styles_1r9f1e0_s1w9icbd__4db690dd{color:var(--plasma-slider-range-value-color);font-family:var(--plasma-slider-range-value-font-family);font-size:var(--plasma-slider-range-value-font-size);font-style:var(--plasma-slider-range-value-font-style);font-weight:var(--plasma-slider-range-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-range-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-range-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-range-value-letter-spacing);letter-spacing:var(--plasma-slider-range-value-letter-spacing);line-height:var(--plasma-slider-range-value-line-height);-webkit-transition:opacity 0.1s ease-in-out;transition:opacity 0.1s ease-in-out;}.Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderHideMinValue__4db690dd,.Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderHideMaxValue__4db690dd{opacity:0;}.Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderActiveRangeValue__4db690dd{color:var(--plasma-slider-label-color);}
588
+ .Single_styles_1r9f1e0_s1d2sfgl__4db690dd{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementOuter__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd{position:absolute;bottom:var(--plasma-slider-range-value-bottom-offset);left:0;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementOuter__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderMaxRangeValue__4db690dd{left:unset;right:0;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementInner__4db690dd{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementInner__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd{margin-right:var(--plasma-slider-range-min-value-margin);}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementInner__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderMaxRangeValue__4db690dd{margin-right:0;margin-left:var(--plasma-slider-range-max-value-margin);}
589
+ .Single_styles_1r9f1e0_ss3ujqx__4db690dd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;opacity:var(--plasma-slider-disabled-opacity);}.Single_styles_1r9f1e0_ss3ujqx__4db690dd.Single_styles_1r9f1e0_sliderLabelPlacementOuter__4db690dd{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_1r9f1e0_ss3ujqx__4db690dd.Single_styles_1r9f1e0_sliderLabelPlacementOuter__4db690dd .Single_styles_1r9f1e0_l1p4kc08__4db690dd{margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}.Single_styles_1r9f1e0_ss3ujqx__4db690dd.Single_styles_1r9f1e0_sliderLabelPlacementInner__4db690dd .Single_styles_1r9f1e0_l1p4kc08__4db690dd{margin-right:var(--plasma-slider-label-wrapper-margin-right);}
591
590
 
592
- .Double_styles_4053ky_lcs82cd__094dd7ae{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}
591
+ .Double_styles_1jhda4u_lcs82cd__5dc981f4{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}
593
592
 
594
- .Double_styles_4053ky_l1at2q9b__094dd7ae{font-family:var(--plasma-slider-label-font-family);font-size:var(--plasma-slider-label-font-size);font-style:var(--plasma-slider-label-font-style);font-weight:var(--plasma-slider-label-font-weight);-webkit-letter-spacing:var(--plasma-slider-label-letter-spacing);-moz-letter-spacing:var(--plasma-slider-label-letter-spacing);-ms-letter-spacing:var(--plasma-slider-label-letter-spacing);letter-spacing:var(--plasma-slider-label-letter-spacing);line-height:var(--plasma-slider-label-line-height);}
595
- .Double_styles_4053ky_i11dc2og__094dd7ae{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-text-field-wrapper-gap);margin-top:var(--plasma-slider-double-wrapper-gap);}
596
- .Double_styles_4053ky_s4zvp7i__094dd7ae{-webkit-flex:1;-ms-flex:1;flex:1;--plasma-textfield-color:var(--plasma-slider-text-field-color);--plasma-textfield-bg-color:var(--plasma-slider-text-field-background-color);--plasma-textfield__caret-color:var(--plasma-slider-text-field-caret-color);--plasma-textfield__placeholder-color:var(--plasma-slider-text-field-placeholder-color);--plasma-textfield-disabled-opacity:var(--plasma-slider-disabled-opacity);--plasma-textfield-height:var(--plasma-slider-text-field-height);--plasma-textfield-padding:var(--plasma-slider-text-field-padding);--plasma-textfield-border-radius:var(--plasma-slider-text-field-border-radius);--plasma-textfield-font-family:var(--plasma-slider-text-field-font-family);--plasma-textfield-font-size:var(--plasma-slider-text-field-font-size);--plasma-textfield-font-style:var(--plasma-slider-text-field-font-style);--plasma-textfield-font-weight:var(--plasma-slider-text-field-font-weight);--plasma-textfield-letter-spacing:var(--plasma-slider-text-field-letter-spacing);--plasma-textfield-line-height:var(--plasma-slider-text-field-line-height);}.Double_styles_4053ky_s4zvp7i__094dd7ae.Double_styles_4053ky_sliderFirstTextField__094dd7ae > div{border-top-right-radius:0;border-bottom-right-radius:0;}.Double_styles_4053ky_s4zvp7i__094dd7ae.Double_styles_4053ky_sliderSecondTextField__094dd7ae > div{border-top-left-radius:0;border-bottom-left-radius:0;}.Double_styles_4053ky_s4zvp7i__094dd7ae input:focus,.Double_styles_4053ky_s4zvp7i__094dd7ae.Double_styles_4053ky_sliderTextFieldActive__094dd7ae{--plasma-textfield-color:var(--plasma-slider-text-field-focus-color);}
597
- .Double_styles_4053ky_d3kvcjo__094dd7ae{opacity:var(--plasma-slider-disabled-opacity);}
593
+ .Double_styles_1jhda4u_l1at2q9b__5dc981f4{font-family:var(--plasma-slider-label-font-family);font-size:var(--plasma-slider-label-font-size);font-style:var(--plasma-slider-label-font-style);font-weight:var(--plasma-slider-label-font-weight);-webkit-letter-spacing:var(--plasma-slider-label-letter-spacing);-moz-letter-spacing:var(--plasma-slider-label-letter-spacing);-ms-letter-spacing:var(--plasma-slider-label-letter-spacing);letter-spacing:var(--plasma-slider-label-letter-spacing);line-height:var(--plasma-slider-label-line-height);}
594
+ .Double_styles_1jhda4u_i11dc2og__5dc981f4{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-text-field-wrapper-gap);margin-top:var(--plasma-slider-double-wrapper-gap);}
595
+ .Double_styles_1jhda4u_s4zvp7i__5dc981f4{-webkit-flex:1;-ms-flex:1;flex:1;--plasma-textfield-color:var(--plasma-slider-text-field-color);--plasma-textfield-bg-color:var(--plasma-slider-text-field-background-color);--plasma-textfield__caret-color:var(--plasma-slider-text-field-caret-color);--plasma-textfield__placeholder-color:var(--plasma-slider-text-field-placeholder-color);--plasma-textfield-disabled-opacity:var(--plasma-slider-disabled-opacity);--plasma-textfield-height:var(--plasma-slider-text-field-height);--plasma-textfield-padding:var(--plasma-slider-text-field-padding);--plasma-textfield-border-radius:var(--plasma-slider-text-field-border-radius);--plasma-textfield-font-family:var(--plasma-slider-text-field-font-family);--plasma-textfield-font-size:var(--plasma-slider-text-field-font-size);--plasma-textfield-font-style:var(--plasma-slider-text-field-font-style);--plasma-textfield-font-weight:var(--plasma-slider-text-field-font-weight);--plasma-textfield-letter-spacing:var(--plasma-slider-text-field-letter-spacing);--plasma-textfield-line-height:var(--plasma-slider-text-field-line-height);}.Double_styles_1jhda4u_s4zvp7i__5dc981f4.Double_styles_1jhda4u_sliderFirstTextField__5dc981f4 > div{border-top-right-radius:0;border-bottom-right-radius:0;}.Double_styles_1jhda4u_s4zvp7i__5dc981f4.Double_styles_1jhda4u_sliderSecondTextField__5dc981f4 > div{border-top-left-radius:0;border-bottom-left-radius:0;}.Double_styles_1jhda4u_s4zvp7i__5dc981f4 input:focus,.Double_styles_1jhda4u_s4zvp7i__5dc981f4.Double_styles_1jhda4u_sliderTextFieldActive__5dc981f4{--plasma-textfield-color:var(--plasma-slider-text-field-focus-color);}
596
+ .Double_styles_1jhda4u_d3kvcjo__5dc981f4{opacity:var(--plasma-slider-disabled-opacity);}
598
597
 
599
- .Double_styles_4053ky_i5j72f8__094dd7ae{visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;}
600
598
 
601
599
  .Handler_styles_8crx5z_h1tnrnip__2d4342c7{cursor:pointer;position:absolute;z-index:1;top:0;left:0;}
602
600
  .Handler_styles_8crx5z_s12uu2lj__2d4342c7{position:absolute;z-index:1;top:var(--plasma-slider-current-value-top-offset);text-align:center;width:100%;margin-left:-0.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-family:var(--plasma-slider-current-value-font-family);font-size:var(--plasma-slider-current-value-font-size);font-style:var(--plasma-slider-current-value-font-style);font-weight:var(--plasma-slider-current-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-current-value-letter-spacing);letter-spacing:var(--plasma-slider-current-value-letter-spacing);line-height:var(--plasma-slider-current-value-line-height);}
package/es/index.js CHANGED
@@ -17,7 +17,6 @@ export { useForceUpdate } from './hooks/useForceUpdate.js';
17
17
  export { useDidMountEffect } from './hooks/useDidMountEffect.js';
18
18
  export { useOutsideClick } from './hooks/useOutsideClick.js';
19
19
  export { useIsomorphicLayoutEffect } from './hooks/useIsomorphicLayoutEffect.js';
20
- export { useFormPlasma } from './hooks/useForm.js';
21
20
  export { composableStyle, cx } from './utils/index.js';
22
21
  export { buttonConfig, buttonRoot } from './components/Button/Button.js';
23
22
  export { classes as buttonClasses, tokens as buttonTokens } from './components/Button/Button.tokens.js';
@@ -192,7 +191,6 @@ export { extractTextFrom } from './utils/extractTextFrom.js';
192
191
  export { getSizeValueFromProp } from './utils/getSizeValueFromProp.js';
193
192
  export { IS_REACT_18, safeUseId } from './utils/react.js';
194
193
  export { isNumber } from './utils/isNumber.js';
195
- export { mergeRefs, setRefList } from './utils/setRefList.js';
196
194
  export { isEmpty } from './utils/isEmpty.js';
197
195
  export { getPlacement, getPlacements } from './utils/getPopoverPlacement.js';
198
196
  import * as constants from './utils/constants.js';
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/utils/index.ts"],"sourcesContent":["import { CSSProperties } from '@linaria/core';\n\nexport { canUseDOM } from './canUseDOM';\nexport { extractTextFrom } from './extractTextFrom';\nexport { getSizeValueFromProp } from './getSizeValueFromProp';\nexport { IS_REACT_18, safeUseId } from './react';\nexport { isNumber } from './isNumber';\nexport { mergeRefs, setRefList } from './setRefList';\nexport { isEmpty } from './isEmpty';\nexport * as constants from './constants';\nexport * from './getPopoverPlacement';\n\nexport const cx = (...classes: (string | undefined)[]) => classes.filter((classItem) => classItem).join(' ');\n\nexport const composableStyle = (s: TemplateStringsArray, ...expr: Array<string | number | CSSProperties>): string => {\n let res = '';\n for (let i = 0; i < Math.max(s.length, expr.length); ++i) {\n res += s[i] ?? '';\n res += expr[i] ?? '';\n }\n\n return res;\n};\n"],"names":["cx","_len","arguments","length","classes","Array","_key","filter","classItem","join","composableStyle","s","res","i","Math","max","_s$i","_ref","undefined"],"mappings":";;;AAYaA,IAAAA,EAAE,GAAG,SAALA,EAAEA,GAAA;AAAA,EAAA,KAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAOC,OAAO,GAAAC,IAAAA,KAAA,CAAAJ,IAAA,GAAAK,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,EAAA,EAAA;AAAPF,IAAAA,OAAO,CAAAE,IAAA,CAAAJ,GAAAA,SAAA,CAAAI,IAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,OAA6BF,OAAO,CAACG,MAAM,CAAC,UAACC,SAAS,EAAA;AAAA,IAAA,OAAKA,SAAS,CAAA;AAAA,GAAA,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAA;AAAA,EAAA;IAE/FC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,CAAuB,EAA8D;EACjH,IAAIC,GAAG,GAAG,EAAE,CAAA;EACZ,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,IAAI,CAACC,GAAG,CAACJ,CAAC,CAACR,MAAM,EAAAD,SAAA,CAAAC,MAAA,IAAA,CAAA,GAAA,CAAA,GAAAD,SAAA,CAAAC,MAAA,GAAA,CAAa,CAAC,EAAE,EAAEU,CAAC,EAAE;IAAA,IAAAG,IAAA,EAAAC,IAAA,CAAA;AACtDL,IAAAA,GAAG,IAAAI,CAAAA,IAAA,GAAIL,CAAC,CAACE,CAAC,CAAC,MAAA,IAAA,IAAAG,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAI,EAAE,CAAA;IACjBJ,GAAG,IAAA,CAAAK,IAAA,GAASJ,CAAC,YAAAX,SAAA,CAAAC,MAAA,IAADU,CAAC,OAAAK,SAAA,GAAAhB,SAAA,CAADW,CAAC,mBAAAI,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAK,EAAE,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOL,GAAG,CAAA;AACd;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/utils/index.ts"],"sourcesContent":["import { CSSProperties } from '@linaria/core';\n\nexport { canUseDOM } from './canUseDOM';\nexport { extractTextFrom } from './extractTextFrom';\nexport { getSizeValueFromProp } from './getSizeValueFromProp';\nexport { IS_REACT_18, safeUseId } from './react';\nexport { isNumber } from './isNumber';\nexport { isEmpty } from './isEmpty';\nexport * as constants from './constants';\nexport * from './getPopoverPlacement';\n\nexport const cx = (...classes: (string | undefined)[]) => classes.filter((classItem) => classItem).join(' ');\n\nexport const composableStyle = (s: TemplateStringsArray, ...expr: Array<string | number | CSSProperties>): string => {\n let res = '';\n for (let i = 0; i < Math.max(s.length, expr.length); ++i) {\n res += s[i] ?? '';\n res += expr[i] ?? '';\n }\n\n return res;\n};\n"],"names":["cx","_len","arguments","length","classes","Array","_key","filter","classItem","join","composableStyle","s","res","i","Math","max","_s$i","_ref","undefined"],"mappings":";;;AAWaA,IAAAA,EAAE,GAAG,SAALA,EAAEA,GAAA;AAAA,EAAA,KAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAOC,OAAO,GAAAC,IAAAA,KAAA,CAAAJ,IAAA,GAAAK,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,EAAA,EAAA;AAAPF,IAAAA,OAAO,CAAAE,IAAA,CAAAJ,GAAAA,SAAA,CAAAI,IAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,OAA6BF,OAAO,CAACG,MAAM,CAAC,UAACC,SAAS,EAAA;AAAA,IAAA,OAAKA,SAAS,CAAA;AAAA,GAAA,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAA;AAAA,EAAA;IAE/FC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,CAAuB,EAA8D;EACjH,IAAIC,GAAG,GAAG,EAAE,CAAA;EACZ,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,IAAI,CAACC,GAAG,CAACJ,CAAC,CAACR,MAAM,EAAAD,SAAA,CAAAC,MAAA,IAAA,CAAA,GAAA,CAAA,GAAAD,SAAA,CAAAC,MAAA,GAAA,CAAa,CAAC,EAAE,EAAEU,CAAC,EAAE;IAAA,IAAAG,IAAA,EAAAC,IAAA,CAAA;AACtDL,IAAAA,GAAG,IAAAI,CAAAA,IAAA,GAAIL,CAAC,CAACE,CAAC,CAAC,MAAA,IAAA,IAAAG,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAI,EAAE,CAAA;IACjBJ,GAAG,IAAA,CAAAK,IAAA,GAASJ,CAAC,YAAAX,SAAA,CAAAC,MAAA,IAADU,CAAC,OAAAK,SAAA,GAAAhB,SAAA,CAADW,CAAC,mBAAAI,IAAA,KAAA,KAAA,CAAA,GAAAA,IAAA,GAAK,EAAE,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOL,GAAG,CAAA;AACd;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.145.0-canary.1421.10845314144.0",
3
+ "version": "0.145.0-canary.1433.10846476158.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -100,7 +100,6 @@
100
100
  "default-browser-id": "2.0.0",
101
101
  "react": "18.2.0",
102
102
  "react-dom": "18.2.0",
103
- "react-hook-form": "7.52.1",
104
103
  "rollup": "^3.28.0",
105
104
  "storybook": "7.6.17",
106
105
  "styled-components": "5.3.1",
@@ -122,5 +121,5 @@
122
121
  "react-popper": "2.3.0",
123
122
  "storeon": "3.1.5"
124
123
  },
125
- "gitHead": "aea932f7110a952f5a10fec8e84fc6d81a8e8d35"
124
+ "gitHead": "5aa7854e24d5a32c6a3fd4d1f9eb3107d1b76e5c"
126
125
  }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -9,27 +10,17 @@ var _base = /*#__PURE__*/require("./variations/_view/base");
9
10
  var _base2 = /*#__PURE__*/require("./variations/_size/base");
10
11
  var _base3 = /*#__PURE__*/require("./variations/_disabled/base");
11
12
  var _components = /*#__PURE__*/require("./components");
12
- var _excluded = ["type"];
13
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
15
15
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
17
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
18
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
19
- var isSingleValueProps = function isSingleValueProps(props, type) {
20
- return typeof props.value === 'number' || type === 'single' && _typeof(props.value) !== 'object';
21
- };
22
- var isDoubleValueProps = function isDoubleValueProps(props, type) {
23
- return _typeof(props.value) === 'object' || type === 'double';
16
+ var isSingleValueProps = function isSingleValueProps(props) {
17
+ return typeof props.value === 'number';
24
18
  };
25
19
  var sliderRoot = exports.sliderRoot = function sliderRoot(Root) {
26
- return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
27
- var _ref$type = _ref.type,
28
- type = _ref$type === void 0 ? 'single' : _ref$type,
29
- props = _objectWithoutProperties(_ref, _excluded);
30
- return /*#__PURE__*/_react["default"].createElement(Root, _extends({}, props, {
20
+ return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
21
+ return /*#__PURE__*/_react["default"].createElement(Root, _extends({
31
22
  ref: ref
32
- }), isSingleValueProps(props, type) && /*#__PURE__*/_react["default"].createElement(_components.SingleSlider, props), isDoubleValueProps(props, type) && /*#__PURE__*/_react["default"].createElement(_components.DoubleUncontrolled, props));
23
+ }, props), isSingleValueProps(props) && /*#__PURE__*/_react["default"].createElement(_components.SingleSlider, props), !isSingleValueProps(props) && /*#__PURE__*/_react["default"].createElement(_components.DoubleSlider, props));
33
24
  });
34
25
  };
35
26
  var sliderConfig = exports.sliderConfig = {
@@ -12,7 +12,7 @@ var _utils = /*#__PURE__*/require("../../utils");
12
12
  var _utils2 = /*#__PURE__*/require("../../../../utils");
13
13
  var _Slider = /*#__PURE__*/require("../../Slider.tokens");
14
14
  var _Double = /*#__PURE__*/require("./Double.styles");
15
- var _excluded = ["min", "max", "value", "disabled", "label", "labelContentLeft", "size", "onChangeCommitted", "onChangeTextField", "onBlurTextField", "onKeyDownTextField", "onChange", "ariaLabel", "multipleStepSize", "name"];
15
+ var _excluded = ["min", "max", "value", "disabled", "label", "labelContentLeft", "size", "onChangeCommitted", "onChangeTextField", "onBlurTextField", "onKeyDownTextField", "onChange", "ariaLabel", "multipleStepSize"];
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
18
18
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -53,7 +53,6 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
53
53
  ariaLabel = _ref.ariaLabel,
54
54
  _ref$multipleStepSize = _ref.multipleStepSize,
55
55
  multipleStepSize = _ref$multipleStepSize === void 0 ? 10 : _ref$multipleStepSize,
56
- name = _ref.name,
57
56
  rest = _objectWithoutProperties(_ref, _excluded);
58
57
  var _useState = (0, _react.useState)({
59
58
  stepSize: 0,
@@ -89,8 +88,6 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
89
88
  var secondHandleRef = (0, _react.useRef)(null);
90
89
  var firstHandleValue = (0, _react.useRef)(value[0]);
91
90
  var secondHandleValue = (0, _react.useRef)(value[1]);
92
- var innerRefFirst = (0, _react.useRef)(null);
93
- var innerRefSecond = (0, _react.useRef)(null);
94
91
  var stepSize = state.stepSize;
95
92
  var hasLabelContent = label || labelContentLeft;
96
93
  var firstInputActiveClass = firstInputActive && !disabled ? _Slider.classes.textFieldActive : undefined;
@@ -109,23 +106,6 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
109
106
  });
110
107
  });
111
108
  }, [value, stepSize, min, max, setFirstValue, setSecondValue]);
112
- (0, _react.useEffect)(function () {
113
- if (innerRefSecond.current && onChangeCommitted) {
114
- innerRefSecond.current.addEventListener('setInitValue', function (e) {
115
- var firstElement = innerRefFirst.current;
116
- var firstValueInit = Number(firstElement.getAttribute('defaultValue'));
117
- var secondValueInit = (0, _utils.setInitValue)(e);
118
- onChangeCommitted([firstValueInit, secondValueInit]);
119
- setFirstValue(firstValueInit);
120
- setSecondValue(secondValueInit);
121
- });
122
- }
123
- return function () {
124
- if (innerRefSecond.current && onChangeCommitted) {
125
- innerRefSecond.current.addEventListener('setInitValue', function () {});
126
- }
127
- };
128
- }, [innerRefSecond]);
129
109
  var setStepSize = (0, _react.useCallback)(function (newStepSize) {
130
110
  setState(function (prevState) {
131
111
  return _objectSpread(_objectSpread({}, prevState), {}, {
@@ -334,19 +314,5 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
334
314
  onChange: onSecondTextfieldChange,
335
315
  onBlur: onSecondTextfieldBlur,
336
316
  onKeyDown: onTextfieldKeyDown
337
- }))), /*#__PURE__*/_react["default"].createElement(_Double.InputHidden, {
338
- name: name,
339
- type: "number",
340
- datatype: "slider-double",
341
- "data-slidertype": "min",
342
- value: firstValue,
343
- ref: innerRefFirst
344
- }), /*#__PURE__*/_react["default"].createElement(_Double.InputHidden, {
345
- name: name,
346
- type: "number",
347
- datatype: "slider-double",
348
- "data-slidertype": "max",
349
- value: secondValue,
350
- ref: innerRefSecond
351
- }));
317
+ }))));
352
318
  };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyledInput = exports.SliderWrapper = exports.LabelWrapper = exports.LabelContentLeft = exports.Label = exports.InputsWrapper = exports.InputHidden = exports.DoubleWrapper = void 0;
6
+ exports.StyledInput = exports.SliderWrapper = exports.LabelWrapper = exports.LabelContentLeft = exports.Label = exports.InputsWrapper = exports.DoubleWrapper = void 0;
7
7
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
8
8
  var _Slider = /*#__PURE__*/require("../../Slider.tokens");
9
9
  var _engines = /*#__PURE__*/require("../../../../engines");
@@ -33,7 +33,4 @@ var DoubleWrapper = exports.DoubleWrapper = /*#__PURE__*/_styledComponents["defa
33
33
  })(["opacity:var(", ");"], _Slider.tokens.disabledOpacity);
34
34
  var SliderWrapper = exports.SliderWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
35
35
  componentId: "plasma-new-hope__sc-97pdfk-6"
36
- })([""]);
37
- var InputHidden = exports.InputHidden = /*#__PURE__*/_styledComponents["default"].input.withConfig({
38
- componentId: "plasma-new-hope__sc-97pdfk-7"
39
- })(["visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;"]);
36
+ })([""]);