@salutejs/plasma-new-hope 0.230.0-canary.1670.12462995068.0 → 0.230.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. package/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
  2. package/cjs/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  3. package/cjs/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +3 -0
  4. package/cjs/components/Breadcrumbs/utils/getShortItems.js +44 -0
  5. package/cjs/components/Breadcrumbs/utils/getShortItems.js.map +1 -0
  6. package/cjs/components/Breadcrumbs/utils/index.js +0 -38
  7. package/cjs/components/Breadcrumbs/utils/index.js.map +1 -1
  8. package/cjs/components/Calendar/utils/getDateWithModification.js.map +1 -1
  9. package/cjs/components/Combobox/ComboboxNew/Combobox.context.js +10 -0
  10. package/cjs/components/Combobox/ComboboxNew/Combobox.context.js.map +1 -0
  11. package/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -3
  12. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  13. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -75
  14. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -112
  15. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
  16. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  17. package/cjs/components/Dropdown/Dropdown.context.js +10 -0
  18. package/cjs/components/Dropdown/Dropdown.context.js.map +1 -0
  19. package/cjs/components/Dropdown/Dropdown.js +2 -3
  20. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  21. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.css +27 -0
  22. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  23. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  24. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +0 -25
  25. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -2
  26. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  27. package/cjs/components/Select/Select.context.js +10 -0
  28. package/cjs/components/Select/Select.context.js.map +1 -0
  29. package/cjs/components/Select/Select.js +2 -3
  30. package/cjs/components/Select/Select.js.map +1 -1
  31. package/cjs/components/Select/ui/Inner/Inner.css +0 -109
  32. package/cjs/components/Select/ui/Inner/Inner.js +1 -1
  33. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  34. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +0 -112
  35. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -2
  36. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  37. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -7
  38. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  39. package/cjs/components/TextArea/TextArea.js +0 -1
  40. package/cjs/components/TextArea/TextArea.js.map +1 -1
  41. package/cjs/components/TextField/TextField.js +0 -1
  42. package/cjs/components/TextField/TextField.js.map +1 -1
  43. package/cjs/engines/common.js +0 -36
  44. package/cjs/engines/common.js.map +1 -1
  45. package/cjs/engines/linaria.js +3 -3
  46. package/cjs/engines/linaria.js.map +1 -1
  47. package/cjs/engines/utils.js +40 -0
  48. package/cjs/engines/utils.js.map +1 -0
  49. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
  50. package/emotion/cjs/components/Breadcrumbs/utils/getShortItems.js +42 -0
  51. package/emotion/cjs/components/Breadcrumbs/utils/index.js +1 -37
  52. package/emotion/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
  53. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.context.js +8 -0
  54. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +3 -4
  55. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  56. package/emotion/cjs/components/Dropdown/Dropdown.context.js +8 -0
  57. package/emotion/cjs/components/Dropdown/Dropdown.js +3 -4
  58. package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
  59. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  60. package/emotion/cjs/components/Select/Select.context.js +8 -0
  61. package/emotion/cjs/components/Select/Select.js +3 -4
  62. package/emotion/cjs/components/Select/ui/Inner/Inner.js +3 -3
  63. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  64. package/emotion/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
  65. package/emotion/cjs/components/TextArea/TextArea.js +1 -2
  66. package/emotion/cjs/components/TextField/TextField.js +1 -2
  67. package/emotion/cjs/engines/common.js +2 -42
  68. package/emotion/cjs/engines/emotion.js +4 -4
  69. package/emotion/cjs/engines/utils.js +42 -0
  70. package/emotion/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
  71. package/emotion/es/components/Breadcrumbs/utils/getShortItems.js +35 -0
  72. package/emotion/es/components/Breadcrumbs/utils/index.js +0 -35
  73. package/emotion/es/components/Calendar/utils/getDateWithModification.js +1 -1
  74. package/emotion/es/components/Combobox/ComboboxNew/Combobox.context.js +2 -0
  75. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
  76. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  77. package/emotion/es/components/Dropdown/Dropdown.context.js +2 -0
  78. package/emotion/es/components/Dropdown/Dropdown.js +2 -2
  79. package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  80. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  81. package/emotion/es/components/Select/Select.context.js +2 -0
  82. package/emotion/es/components/Select/Select.js +2 -2
  83. package/emotion/es/components/Select/ui/Inner/Inner.js +1 -1
  84. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  85. package/emotion/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
  86. package/emotion/es/components/TextArea/TextArea.js +1 -2
  87. package/emotion/es/components/TextField/TextField.js +1 -2
  88. package/emotion/es/engines/common.js +0 -40
  89. package/emotion/es/engines/emotion.js +2 -2
  90. package/emotion/es/engines/utils.js +36 -0
  91. package/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
  92. package/es/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  93. package/es/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +3 -0
  94. package/es/components/Breadcrumbs/utils/getShortItems.js +39 -0
  95. package/es/components/Breadcrumbs/utils/getShortItems.js.map +1 -0
  96. package/es/components/Breadcrumbs/utils/index.js +1 -37
  97. package/es/components/Breadcrumbs/utils/index.js.map +1 -1
  98. package/es/components/Calendar/utils/getDateWithModification.js.map +1 -1
  99. package/es/components/Combobox/ComboboxNew/Combobox.context.js +6 -0
  100. package/es/components/Combobox/ComboboxNew/Combobox.context.js.map +1 -0
  101. package/es/components/Combobox/ComboboxNew/Combobox.js +3 -3
  102. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  103. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -75
  104. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -112
  105. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  106. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  107. package/es/components/Dropdown/Dropdown.context.js +6 -0
  108. package/es/components/Dropdown/Dropdown.context.js.map +1 -0
  109. package/es/components/Dropdown/Dropdown.js +3 -3
  110. package/es/components/Dropdown/Dropdown.js.map +1 -1
  111. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.css +27 -0
  112. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  113. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  114. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +0 -25
  115. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  116. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  117. package/es/components/Select/Select.context.js +6 -0
  118. package/es/components/Select/Select.context.js.map +1 -0
  119. package/es/components/Select/Select.js +3 -3
  120. package/es/components/Select/Select.js.map +1 -1
  121. package/es/components/Select/ui/Inner/Inner.css +0 -109
  122. package/es/components/Select/ui/Inner/Inner.js +1 -1
  123. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  124. package/es/components/Select/ui/Inner/ui/Item/Item.css +0 -112
  125. package/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  126. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  127. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -7
  128. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  129. package/es/components/TextArea/TextArea.js +0 -1
  130. package/es/components/TextArea/TextArea.js.map +1 -1
  131. package/es/components/TextField/TextField.js +0 -1
  132. package/es/components/TextField/TextField.js.map +1 -1
  133. package/es/engines/common.js +2 -36
  134. package/es/engines/common.js.map +1 -1
  135. package/es/engines/linaria.js +1 -1
  136. package/es/engines/linaria.js.map +1 -1
  137. package/es/engines/utils.js +35 -0
  138. package/es/engines/utils.js.map +1 -0
  139. package/package.json +22 -5
  140. package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
  141. package/styled-components/cjs/components/Breadcrumbs/utils/getShortItems.js +42 -0
  142. package/styled-components/cjs/components/Breadcrumbs/utils/index.js +1 -37
  143. package/styled-components/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
  144. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.context.js +8 -0
  145. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +3 -4
  146. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  147. package/styled-components/cjs/components/Dropdown/Dropdown.context.js +8 -0
  148. package/styled-components/cjs/components/Dropdown/Dropdown.js +3 -4
  149. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
  150. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  151. package/styled-components/cjs/components/Select/Select.context.js +8 -0
  152. package/styled-components/cjs/components/Select/Select.js +3 -4
  153. package/styled-components/cjs/components/Select/ui/Inner/Inner.js +3 -3
  154. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  155. package/styled-components/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
  156. package/styled-components/cjs/components/TextArea/TextArea.js +0 -1
  157. package/styled-components/cjs/components/TextField/TextField.js +0 -1
  158. package/styled-components/cjs/engines/common.js +2 -42
  159. package/styled-components/cjs/engines/styled-components.js +3 -3
  160. package/styled-components/cjs/engines/utils.js +42 -0
  161. package/styled-components/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
  162. package/styled-components/es/components/Breadcrumbs/utils/getShortItems.js +35 -0
  163. package/styled-components/es/components/Breadcrumbs/utils/index.js +0 -35
  164. package/styled-components/es/components/Calendar/utils/getDateWithModification.js +1 -1
  165. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.context.js +2 -0
  166. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
  167. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  168. package/styled-components/es/components/Dropdown/Dropdown.context.js +2 -0
  169. package/styled-components/es/components/Dropdown/Dropdown.js +2 -2
  170. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  171. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  172. package/styled-components/es/components/Select/Select.context.js +2 -0
  173. package/styled-components/es/components/Select/Select.js +2 -2
  174. package/styled-components/es/components/Select/ui/Inner/Inner.js +1 -1
  175. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  176. package/styled-components/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
  177. package/styled-components/es/components/TextArea/TextArea.js +0 -1
  178. package/styled-components/es/components/TextField/TextField.js +0 -1
  179. package/styled-components/es/engines/common.js +0 -40
  180. package/styled-components/es/engines/styled-components.js +1 -1
  181. package/styled-components/es/engines/utils.js +36 -0
  182. package/types/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  183. package/types/components/Breadcrumbs/utils/getShortItems.d.ts +6 -0
  184. package/types/components/Breadcrumbs/utils/getShortItems.d.ts.map +1 -0
  185. package/types/components/Breadcrumbs/utils/index.d.ts +2 -5
  186. package/types/components/Breadcrumbs/utils/index.d.ts.map +1 -1
  187. package/types/components/Calendar/utils/getDateWithModification.d.ts +1 -1
  188. package/types/components/Calendar/utils/getDateWithModification.d.ts.map +1 -1
  189. package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts +4 -0
  190. package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts.map +1 -0
  191. package/types/components/Combobox/ComboboxNew/Combobox.d.ts +1 -2
  192. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  193. package/types/components/Dropdown/Dropdown.context.d.ts +4 -0
  194. package/types/components/Dropdown/Dropdown.context.d.ts.map +1 -0
  195. package/types/components/Dropdown/Dropdown.d.ts +1 -2
  196. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  197. package/types/components/Select/Select.context.d.ts +4 -0
  198. package/types/components/Select/Select.context.d.ts.map +1 -0
  199. package/types/components/Select/Select.d.ts +1 -2
  200. package/types/components/Select/Select.d.ts.map +1 -1
  201. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  202. package/types/components/TextField/TextField.d.ts.map +1 -1
  203. package/types/engines/common.d.ts +1 -3
  204. package/types/engines/common.d.ts.map +1 -1
  205. package/types/engines/utils.d.ts +4 -0
  206. package/types/engines/utils.d.ts.map +1 -0
  207. package/cjs/components/Slider/components/Double/Double.css +0 -91
  208. package/es/components/Slider/components/Double/Double.css +0 -91
  209. /package/cjs/components/Breadcrumbs/utils/{index.css → getShortItems.css} +0 -0
  210. /package/es/components/Breadcrumbs/utils/{index.css → getShortItems.css} +0 -0
@@ -382,7 +382,6 @@ var textFieldRoot = function textFieldRoot(Root) {
382
382
  ref: inputForkRef,
383
383
  id: innerId,
384
384
  value: outerValue,
385
- required: required,
386
385
  "aria-labelledby": labelId,
387
386
  "aria-describedby": helperTextId,
388
387
  placeholder: innerPlaceholderValue,
@@ -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, MouseEventHandler } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\nimport { css } from '@linaria/core';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport type { ChipValues, TextFieldPrimitiveValue, TextFieldProps, TextFieldRootProps } from './TextField.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as clearCSS } from './variations/_clear/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 { base as hintViewCSS } from './variations/_hint-view/base';\nimport { base as hintSizeCSS } from './variations/_hint-size/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 OuterLabelWrapper,\n TitleCaption,\n StyledHintWrapper,\n StyledIndicatorWrapper,\n} from './TextField.styles';\nimport { classes } from './TextField.tokens';\nimport { TextFieldChip } from './ui';\nimport { useKeyNavigation } from './hooks';\nimport { HintComponent } from './ui/Hint/Hint';\nimport { getInputWidth } from './getInputWidth';\n\nconst optionalText = 'optional';\n\nexport const base = css`\n /* NOTE: Webkit не применяет opacity к inline тегам */\n display: block;\n`;\n\nconst HINT_DEFAULT_OFFSET: [number, number] = [0, 0];\n\nexport const textFieldRoot = (Root: RootProps<HTMLDivElement, TextFieldRootProps>) =>\n forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n className,\n style,\n\n // layout\n contentLeft,\n contentRight,\n label,\n labelPlacement,\n keepPlaceholder,\n textBefore,\n textAfter,\n placeholder,\n leftHelper,\n enumerationType = 'plain',\n requiredPlacement = 'right',\n titleCaption,\n chipView = 'default',\n chipValidator,\n\n // hint\n hintTrigger = 'hover',\n hintText,\n hintView = 'default',\n hintSize = 'm',\n hintTargetIcon,\n hintPlacement = 'auto',\n hintHasArrow,\n hintOffset = HINT_DEFAULT_OFFSET,\n hintWidth,\n hintContentLeft,\n\n // variations\n view,\n size,\n readOnly = false,\n disabled = false,\n required = false,\n clear = false,\n optional,\n hasDivider,\n\n // controlled\n value: outerValue,\n chips: values,\n chipType = 'default',\n\n // events\n onChange,\n onChangeChips,\n onSearch,\n onKeyDown,\n onFocus,\n onBlur,\n\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputContainerRef = 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 [hasFocus, setHasFocus] = useState(false);\n\n const [chips, setChips] = useState<Array<ChipValues>>([]);\n const [isHintVisible, setIsHintVisible] = useState(false);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const labelId = safeUseId();\n const helperTextId = safeUseId();\n\n const isDefaultView = view === 'default' || readOnly || disabled;\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 innerKeepPlaceholder = keepPlaceholder && labelPlacement === 'inner';\n const hasPlaceholder = Boolean(placeholder) && (innerKeepPlaceholder || !hasInnerLabel);\n let hasTextAfter = Boolean(textAfter);\n let hasTextBefore = textBefore && !isChipEnumeration;\n if (labelPlacement === 'inner') {\n if (!hasValue && !hasPlaceholder && !hasFocus) {\n hasTextAfter = false;\n hasTextBefore = false;\n }\n }\n\n const hasPlaceholderPadding = hasInnerLabel && keepPlaceholder && size !== 'xs';\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 clearClass = clear ? classes.clear : undefined;\n const hasDividerClass = hasDivider ? classes.hasDivider : undefined;\n const hasHintClass = hintText ? classes.hasHint : undefined;\n const requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;\n const labelPlacementClass = innerLabelPlacementValue\n ? classes[`${innerLabelPlacementValue}LabelPlacement` as keyof typeof classes]\n : undefined;\n const hasValueClass = hasValue ? classes.hasValue : undefined;\n const keepPlaceholderClass = hasPlaceholder && placeholderShown && classes.keepPlaceholder;\n\n const wrapperWithoutLeftContent =\n !contentLeft && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentLeft : undefined;\n const wrapperWithoutRightContent =\n !contentRight && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentRight : undefined;\n\n const hintRef = useOutsideClick<HTMLDivElement>(() => {\n setIsHintVisible(false);\n });\n const hintInnerRef = useRef<HTMLDivElement>(null);\n const hintForkRef = useForkRef(hintRef, hintInnerRef);\n\n const handleInput: FormEventHandler<HTMLInputElement> = (event) => {\n const { value } = event.target as HTMLInputElement;\n if (hasTextAfter) {\n const textWidth = getInputWidth(event.currentTarget, inputContainerRef.current);\n event.currentTarget.style.width = `${textWidth}px`;\n }\n setHasValue(Boolean(value));\n };\n\n useEffect(() => {\n if (hasTextAfter && inputRef.current) {\n const textWidth = getInputWidth(inputRef.current, inputContainerRef.current);\n inputRef.current.style.width = `${textWidth}px`;\n } else {\n inputRef.current?.style.removeProperty('width');\n }\n }, [hasTextAfter]);\n\n const handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n setHasFocus(true);\n onFocus?.(event);\n };\n\n const handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n setHasFocus(false);\n onBlur?.(event);\n };\n\n const handleHintShow = () => setIsHintVisible(true);\n const handleHintHide = () => setIsHintVisible(false);\n const handleHintClick: MouseEventHandler = (event) => {\n if (!hintText || hintTrigger !== 'click') {\n return;\n }\n\n event.stopPropagation();\n const targetIsPopover = event.target === hintInnerRef.current;\n const rootHasTarget = hintInnerRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n setIsHintVisible(true);\n }\n };\n\n 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\n if (onKeyDown) {\n onKeyDown(event);\n }\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(rest?.defaultValue));\n }, [rest.defaultValue]);\n\n useEffect(() => {\n setHasValue(Boolean(outerValue) || Boolean(inputRef?.current?.value));\n }, [outerValue, 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 clear={clear}\n labelPlacement={innerLabelPlacementValue}\n chipView={chipView}\n onClick={handleInputFocus}\n className={cx(\n labelPlacementClass,\n clearClass,\n hasDividerClass,\n hasHintClass,\n classes.textFieldGroupItem,\n className,\n )}\n style={style}\n {...(hintText && { hintView, hintSize })}\n >\n {(hasOuterLabel || titleCaption) && (\n <OuterLabelWrapper isInnerLabel={labelPlacement === 'inner'}>\n {hasOuterLabel && (\n <StyledIndicatorWrapper>\n <Label id={labelId} htmlFor={id}>\n {innerLabelValue}\n </Label>\n\n {hintText && (\n <StyledHintWrapper>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n {required && (\n <StyledIndicator\n className={cx(\n classes.outerLabelPlacement,\n requiredPlacementClass,\n hasHintClass,\n )}\n />\n )}\n {optionalTextNode}\n </StyledIndicatorWrapper>\n )}\n {titleCaption && <TitleCaption>{titleCaption}</TitleCaption>}\n </OuterLabelWrapper>\n )}\n <InputWrapper\n // Ref для внутреннего использования. Не отдается наружу.\n ref={(rest as any).inputWrapperRef}\n // TODO: #1544, и после убрать classes.inputWrapper\n className={cx(\n withHasChips,\n wrapperWithoutLeftContent,\n wrapperWithoutRightContent,\n classes.inputWrapper,\n )}\n >\n {!hasOuterLabel && (\n <>\n {required && (\n <StyledIndicator\n className={cx(classes.innerLabelPlacement, requiredPlacementClass)}\n />\n )}\n {hintText && (\n <StyledHintWrapper className={classes.innerLabelPlacement}>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n </>\n )}\n {contentLeft && (\n <StyledContentLeft isClear={clear} isDefaultView={isDefaultView}>\n {contentLeft}\n </StyledContentLeft>\n )}\n <InputLabelWrapper\n tabIndex={-1}\n ref={contentRef}\n onKeyDown={handleContentKeyDown}\n className={withHasChips}\n >\n {Boolean(textBefore && isChipEnumeration) && (\n <StyledTextBefore>{textBefore}</StyledTextBefore>\n )}\n {isChipEnumeration && Boolean(chips?.length) && (\n <StyledChips className={classes.chipsWrapper}>\n {chips?.map(({ id: chipId, text }, index) => {\n const validationView = chipValidator?.(String(text));\n const resView = validationView?.view || chipView;\n\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 chipType={chipType}\n view={resView}\n rootWrapper={Root}\n // TODO: #1547\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n _forceChipManipulationWithReadonly={\n // eslint-disable-next-line no-underscore-dangle\n (rest as any)._forceChipManipulationWithReadonly\n }\n />\n );\n })}\n </StyledChips>\n )}\n <InputContainer ref={inputContainerRef} hasDynamicWidth={hasTextAfter}>\n {hasTextBefore && <StyledTextBefore>{textBefore}</StyledTextBefore>}\n <Input\n ref={inputForkRef}\n id={innerId}\n value={outerValue}\n required={required}\n aria-labelledby={labelId}\n aria-describedby={helperTextId}\n placeholder={innerPlaceholderValue}\n className={cx(hasValueClass, keepPlaceholderClass)}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n onInput={handleInput}\n onChange={handleChange}\n onKeyDown={handleOnKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...rest}\n />\n {hasInnerLabel && (\n <Label id={labelId} htmlFor={innerId}>\n {innerLabelValue}\n {optionalTextNode}\n </Label>\n )}\n {placeholderShown && !hasValue && (\n <InputPlaceholder hasPadding={hasPlaceholderPadding}>\n {hasTextBefore && <StyledTextBefore isHidden>{textBefore}</StyledTextBefore>}\n {innerPlaceholderValue}\n {hasPlaceholderOptional && optionalTextNode}\n </InputPlaceholder>\n )}\n {hasTextAfter && <StyledTextAfter>{textAfter}</StyledTextAfter>}\n </InputContainer>\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 clear: {\n css: clearCSS,\n attrs: true,\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 hintView: {\n css: hintViewCSS,\n },\n hintSize: {\n css: hintSizeCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n },\n};\n"],"names":["optionalText","base","HINT_DEFAULT_OFFSET","textFieldRoot","Root","forwardRef","_ref","ref","_inputRef$current","_inputRef$current4","id","className","style","contentLeft","contentRight","label","labelPlacement","keepPlaceholder","textBefore","textAfter","placeholder","leftHelper","_ref$enumerationType","enumerationType","_ref$requiredPlacemen","requiredPlacement","titleCaption","_ref$chipView","chipView","chipValidator","_ref$hintTrigger","hintTrigger","hintText","_ref$hintView","hintView","_ref$hintSize","hintSize","hintTargetIcon","_ref$hintPlacement","hintPlacement","hintHasArrow","_ref$hintOffset","hintOffset","hintWidth","hintContentLeft","view","size","_ref$readOnly","readOnly","_ref$disabled","disabled","_ref$required","required","_ref$clear","clear","optional","hasDivider","outerValue","value","values","chips","_ref$chipType","chipType","onChange","onChangeChips","onSearch","onKeyDown","onFocus","onBlur","rest","contentRef","useRef","inputContainerRef","inputRef","inputForkRef","useForkRef","chipsRefs","controlledRefs","_useState","useState","Boolean","current","defaultValue","_useState2","_slicedToArray","hasValue","setHasValue","_useState3","_useState4","hasFocus","setHasFocus","_useState5","_useState6","setChips","_useState7","_useState8","isHintVisible","setIsHintVisible","uniqId","safeUseId","innerId","labelId","helperTextId","isDefaultView","isChipEnumeration","isChipsVisible","length","withHasChips","classes","hasChips","undefined","hasLabelValue","hasInnerLabel","hasOuterLabel","innerKeepPlaceholder","hasPlaceholder","hasTextAfter","hasTextBefore","hasPlaceholderPadding","innerLabelValue","innerLabelPlacementValue","innerPlaceholderValue","placeholderShown","clearClass","hasDividerClass","hasHintClass","hasHint","requiredPlacementClass","requiredAlignRight","labelPlacementClass","concat","hasValueClass","keepPlaceholderClass","wrapperWithoutLeftContent","hasEmptyContentLeft","wrapperWithoutRightContent","hasEmptyContentRight","hintRef","useOutsideClick","hintInnerRef","hintForkRef","handleInput","event","_ref2","target","textWidth","getInputWidth","currentTarget","width","useEffect","_inputRef$current2","removeProperty","handleFocus","handleBlur","handleHintShow","handleHintHide","handleHintClick","_hintInnerRef$current","stopPropagation","targetIsPopover","rootHasTarget","contains","handleChange","_event$target","maxLength","updateChips","newChips","newValues","_useKeyNavigation","useKeyNavigation","onEnterDisabled","handleInputKeydown","handleChipKeyDown","onChipClear","handleContentKeyDown","onChipClick","handleInputFocus","scrollTo","top","left","offsetLeft","behavior","focus","getRef","element","index","handleOnKeyDown","map","text","_inputRef$current3","innerOptional","hasPlaceholderOptional","optionalTextNode","React","createElement","StyledOptionalText","_extends","onClick","cx","textFieldGroupItem","OuterLabelWrapper","isInnerLabel","StyledIndicatorWrapper","Label","htmlFor","StyledHintWrapper","HintComponent","StyledIndicator","outerLabelPlacement","TitleCaption","InputWrapper","inputWrapperRef","inputWrapper","Fragment","innerLabelPlacement","StyledContentLeft","isClear","InputLabelWrapper","tabIndex","StyledTextBefore","StyledChips","chipsWrapper","_ref3","chipId","validationView","String","resView","TextFieldChip","key","onClear","rootWrapper","_forceChipManipulationWithReadonly","InputContainer","hasDynamicWidth","Input","onInput","InputPlaceholder","hasPadding","isHidden","StyledTextAfter","StyledContentRight","LeftHelper","textFieldConfig","name","tag","layout","variations","css","viewCSS","sizeCSS","clearCSS","attrs","disabledCSS","readOnlyCSS","labelPlacementCSS","hintViewCSS","hintSizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4CA,IAAMA,YAAY,GAAG,UAAU,CAAA;AAExB,IAAMC,IAAI,GAGhB,UAAA;AAED,IAAMC,mBAAqC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAEvCC,aAAa,GAAGA,SAAhBA,aAAaA,CAAIC,IAAmD,EAAA;AAAA,EAAA,oBAC7EC,UAAU,CACN,UAAAC,IAAA,EA2DIC,GAAG,EACF;IAAA,IAAAC,iBAAA,EAAAC,kBAAA,CAAA;AAAA,IAAA,IA1DGC,EAAE,GAAAJ,IAAA,CAAFI,EAAE;MACFC,SAAS,GAAAL,IAAA,CAATK,SAAS;MACTC,KAAK,GAAAN,IAAA,CAALM,KAAK;MAGLC,WAAW,GAAAP,IAAA,CAAXO,WAAW;MACXC,YAAY,GAAAR,IAAA,CAAZQ,YAAY;MACZC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,cAAc,GAAAV,IAAA,CAAdU,cAAc;MACdC,eAAe,GAAAX,IAAA,CAAfW,eAAe;MACfC,UAAU,GAAAZ,IAAA,CAAVY,UAAU;MACVC,SAAS,GAAAb,IAAA,CAATa,SAAS;MACTC,WAAW,GAAAd,IAAA,CAAXc,WAAW;MACXC,UAAU,GAAAf,IAAA,CAAVe,UAAU;MAAAC,oBAAA,GAAAhB,IAAA,CACViB,eAAe;AAAfA,MAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,oBAAA;MAAAE,qBAAA,GAAAlB,IAAA,CACzBmB,iBAAiB;AAAjBA,MAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,qBAAA;MAC3BE,YAAY,GAAApB,IAAA,CA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,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD1M,IAAAA,IAAI,EAAE;AACFyM,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDnM,IAAAA,KAAK,EAAE;AACHiM,MAAAA,GAAG,EAAEG,MAAQ;AACbC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDzM,IAAAA,QAAQ,EAAE;AACNqM,MAAAA,GAAG,EAAEK,MAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACD3M,IAAAA,QAAQ,EAAE;AACNuM,MAAAA,GAAG,EAAEM,MAAW;AAChBF,MAAAA,KAAK,EAAE,IAAA;KACV;AACD3O,IAAAA,cAAc,EAAE;AACZuO,MAAAA,GAAG,EAAEO,MAAAA;KACR;AACD5N,IAAAA,QAAQ,EAAE;AACNqN,MAAAA,GAAG,EAAEQ,MAAAA;KACR;AACD3N,IAAAA,QAAQ,EAAE;AACNmN,MAAAA,GAAG,EAAES,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnN,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, MouseEventHandler } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\nimport { css } from '@linaria/core';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport type { ChipValues, TextFieldPrimitiveValue, TextFieldProps, TextFieldRootProps } from './TextField.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as clearCSS } from './variations/_clear/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 { base as hintViewCSS } from './variations/_hint-view/base';\nimport { base as hintSizeCSS } from './variations/_hint-size/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 OuterLabelWrapper,\n TitleCaption,\n StyledHintWrapper,\n StyledIndicatorWrapper,\n} from './TextField.styles';\nimport { classes } from './TextField.tokens';\nimport { TextFieldChip } from './ui';\nimport { useKeyNavigation } from './hooks';\nimport { HintComponent } from './ui/Hint/Hint';\nimport { getInputWidth } from './getInputWidth';\n\nconst optionalText = 'optional';\n\nexport const base = css`\n /* NOTE: Webkit не применяет opacity к inline тегам */\n display: block;\n`;\n\nconst HINT_DEFAULT_OFFSET: [number, number] = [0, 0];\n\nexport const textFieldRoot = (Root: RootProps<HTMLDivElement, TextFieldRootProps>) =>\n forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n className,\n style,\n\n // layout\n contentLeft,\n contentRight,\n label,\n labelPlacement,\n keepPlaceholder,\n textBefore,\n textAfter,\n placeholder,\n leftHelper,\n enumerationType = 'plain',\n requiredPlacement = 'right',\n titleCaption,\n chipView = 'default',\n chipValidator,\n\n // hint\n hintTrigger = 'hover',\n hintText,\n hintView = 'default',\n hintSize = 'm',\n hintTargetIcon,\n hintPlacement = 'auto',\n hintHasArrow,\n hintOffset = HINT_DEFAULT_OFFSET,\n hintWidth,\n hintContentLeft,\n\n // variations\n view,\n size,\n readOnly = false,\n disabled = false,\n required = false,\n clear = false,\n optional,\n hasDivider,\n\n // controlled\n value: outerValue,\n chips: values,\n chipType = 'default',\n\n // events\n onChange,\n onChangeChips,\n onSearch,\n onKeyDown,\n onFocus,\n onBlur,\n\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputContainerRef = 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 [hasFocus, setHasFocus] = useState(false);\n\n const [chips, setChips] = useState<Array<ChipValues>>([]);\n const [isHintVisible, setIsHintVisible] = useState(false);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const labelId = safeUseId();\n const helperTextId = safeUseId();\n\n const isDefaultView = view === 'default' || readOnly || disabled;\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 innerKeepPlaceholder = keepPlaceholder && labelPlacement === 'inner';\n const hasPlaceholder = Boolean(placeholder) && (innerKeepPlaceholder || !hasInnerLabel);\n let hasTextAfter = Boolean(textAfter);\n let hasTextBefore = textBefore && !isChipEnumeration;\n if (labelPlacement === 'inner') {\n if (!hasValue && !hasPlaceholder && !hasFocus) {\n hasTextAfter = false;\n hasTextBefore = false;\n }\n }\n\n const hasPlaceholderPadding = hasInnerLabel && keepPlaceholder && size !== 'xs';\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 clearClass = clear ? classes.clear : undefined;\n const hasDividerClass = hasDivider ? classes.hasDivider : undefined;\n const hasHintClass = hintText ? classes.hasHint : undefined;\n const requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;\n const labelPlacementClass = innerLabelPlacementValue\n ? classes[`${innerLabelPlacementValue}LabelPlacement` as keyof typeof classes]\n : undefined;\n const hasValueClass = hasValue ? classes.hasValue : undefined;\n const keepPlaceholderClass = hasPlaceholder && placeholderShown && classes.keepPlaceholder;\n\n const wrapperWithoutLeftContent =\n !contentLeft && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentLeft : undefined;\n const wrapperWithoutRightContent =\n !contentRight && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentRight : undefined;\n\n const hintRef = useOutsideClick<HTMLDivElement>(() => {\n setIsHintVisible(false);\n });\n const hintInnerRef = useRef<HTMLDivElement>(null);\n const hintForkRef = useForkRef(hintRef, hintInnerRef);\n\n const handleInput: FormEventHandler<HTMLInputElement> = (event) => {\n const { value } = event.target as HTMLInputElement;\n if (hasTextAfter) {\n const textWidth = getInputWidth(event.currentTarget, inputContainerRef.current);\n event.currentTarget.style.width = `${textWidth}px`;\n }\n setHasValue(Boolean(value));\n };\n\n useEffect(() => {\n if (hasTextAfter && inputRef.current) {\n const textWidth = getInputWidth(inputRef.current, inputContainerRef.current);\n inputRef.current.style.width = `${textWidth}px`;\n } else {\n inputRef.current?.style.removeProperty('width');\n }\n }, [hasTextAfter]);\n\n const handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n setHasFocus(true);\n onFocus?.(event);\n };\n\n const handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n setHasFocus(false);\n onBlur?.(event);\n };\n\n const handleHintShow = () => setIsHintVisible(true);\n const handleHintHide = () => setIsHintVisible(false);\n const handleHintClick: MouseEventHandler = (event) => {\n if (!hintText || hintTrigger !== 'click') {\n return;\n }\n\n event.stopPropagation();\n const targetIsPopover = event.target === hintInnerRef.current;\n const rootHasTarget = hintInnerRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n setIsHintVisible(true);\n }\n };\n\n 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\n if (onKeyDown) {\n onKeyDown(event);\n }\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(rest?.defaultValue));\n }, [rest.defaultValue]);\n\n useEffect(() => {\n setHasValue(Boolean(outerValue) || Boolean(inputRef?.current?.value));\n }, [outerValue, 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 clear={clear}\n labelPlacement={innerLabelPlacementValue}\n chipView={chipView}\n onClick={handleInputFocus}\n className={cx(\n labelPlacementClass,\n clearClass,\n hasDividerClass,\n hasHintClass,\n classes.textFieldGroupItem,\n className,\n )}\n style={style}\n {...(hintText && { hintView, hintSize })}\n >\n {(hasOuterLabel || titleCaption) && (\n <OuterLabelWrapper isInnerLabel={labelPlacement === 'inner'}>\n {hasOuterLabel && (\n <StyledIndicatorWrapper>\n <Label id={labelId} htmlFor={id}>\n {innerLabelValue}\n </Label>\n\n {hintText && (\n <StyledHintWrapper>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n {required && (\n <StyledIndicator\n className={cx(\n classes.outerLabelPlacement,\n requiredPlacementClass,\n hasHintClass,\n )}\n />\n )}\n {optionalTextNode}\n </StyledIndicatorWrapper>\n )}\n {titleCaption && <TitleCaption>{titleCaption}</TitleCaption>}\n </OuterLabelWrapper>\n )}\n <InputWrapper\n // Ref для внутреннего использования. Не отдается наружу.\n ref={(rest as any).inputWrapperRef}\n // TODO: #1544, и после убрать classes.inputWrapper\n className={cx(\n withHasChips,\n wrapperWithoutLeftContent,\n wrapperWithoutRightContent,\n classes.inputWrapper,\n )}\n >\n {!hasOuterLabel && (\n <>\n {required && (\n <StyledIndicator\n className={cx(classes.innerLabelPlacement, requiredPlacementClass)}\n />\n )}\n {hintText && (\n <StyledHintWrapper className={classes.innerLabelPlacement}>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n </>\n )}\n {contentLeft && (\n <StyledContentLeft isClear={clear} isDefaultView={isDefaultView}>\n {contentLeft}\n </StyledContentLeft>\n )}\n <InputLabelWrapper\n tabIndex={-1}\n ref={contentRef}\n onKeyDown={handleContentKeyDown}\n className={withHasChips}\n >\n {Boolean(textBefore && isChipEnumeration) && (\n <StyledTextBefore>{textBefore}</StyledTextBefore>\n )}\n {isChipEnumeration && Boolean(chips?.length) && (\n <StyledChips className={classes.chipsWrapper}>\n {chips?.map(({ id: chipId, text }, index) => {\n const validationView = chipValidator?.(String(text));\n const resView = validationView?.view || chipView;\n\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 chipType={chipType}\n view={resView}\n rootWrapper={Root}\n // TODO: #1547\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n _forceChipManipulationWithReadonly={\n // eslint-disable-next-line no-underscore-dangle\n (rest as any)._forceChipManipulationWithReadonly\n }\n />\n );\n })}\n </StyledChips>\n )}\n <InputContainer ref={inputContainerRef} hasDynamicWidth={hasTextAfter}>\n {hasTextBefore && <StyledTextBefore>{textBefore}</StyledTextBefore>}\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, keepPlaceholderClass)}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n onInput={handleInput}\n onChange={handleChange}\n onKeyDown={handleOnKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...rest}\n />\n {hasInnerLabel && (\n <Label id={labelId} htmlFor={innerId}>\n {innerLabelValue}\n {optionalTextNode}\n </Label>\n )}\n {placeholderShown && !hasValue && (\n <InputPlaceholder hasPadding={hasPlaceholderPadding}>\n {hasTextBefore && <StyledTextBefore isHidden>{textBefore}</StyledTextBefore>}\n {innerPlaceholderValue}\n {hasPlaceholderOptional && optionalTextNode}\n </InputPlaceholder>\n )}\n {hasTextAfter && <StyledTextAfter>{textAfter}</StyledTextAfter>}\n </InputContainer>\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 clear: {\n css: clearCSS,\n attrs: true,\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 hintView: {\n css: hintViewCSS,\n },\n hintSize: {\n css: hintSizeCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n },\n};\n"],"names":["optionalText","base","HINT_DEFAULT_OFFSET","textFieldRoot","Root","forwardRef","_ref","ref","_inputRef$current","_inputRef$current4","id","className","style","contentLeft","contentRight","label","labelPlacement","keepPlaceholder","textBefore","textAfter","placeholder","leftHelper","_ref$enumerationType","enumerationType","_ref$requiredPlacemen","requiredPlacement","titleCaption","_ref$chipView","chipView","chipValidator","_ref$hintTrigger","hintTrigger","hintText","_ref$hintView","hintView","_ref$hintSize","hintSize","hintTargetIcon","_ref$hintPlacement","hintPlacement","hintHasArrow","_ref$hintOffset","hintOffset","hintWidth","hintContentLeft","view","size","_ref$readOnly","readOnly","_ref$disabled","disabled","_ref$required","required","_ref$clear","clear","optional","hasDivider","outerValue","value","values","chips","_ref$chipType","chipType","onChange","onChangeChips","onSearch","onKeyDown","onFocus","onBlur","rest","contentRef","useRef","inputContainerRef","inputRef","inputForkRef","useForkRef","chipsRefs","controlledRefs","_useState","useState","Boolean","current","defaultValue","_useState2","_slicedToArray","hasValue","setHasValue","_useState3","_useState4","hasFocus","setHasFocus","_useState5","_useState6","setChips","_useState7","_useState8","isHintVisible","setIsHintVisible","uniqId","safeUseId","innerId","labelId","helperTextId","isDefaultView","isChipEnumeration","isChipsVisible","length","withHasChips","classes","hasChips","undefined","hasLabelValue","hasInnerLabel","hasOuterLabel","innerKeepPlaceholder","hasPlaceholder","hasTextAfter","hasTextBefore","hasPlaceholderPadding","innerLabelValue","innerLabelPlacementValue","innerPlaceholderValue","placeholderShown","clearClass","hasDividerClass","hasHintClass","hasHint","requiredPlacementClass","requiredAlignRight","labelPlacementClass","concat","hasValueClass","keepPlaceholderClass","wrapperWithoutLeftContent","hasEmptyContentLeft","wrapperWithoutRightContent","hasEmptyContentRight","hintRef","useOutsideClick","hintInnerRef","hintForkRef","handleInput","event","_ref2","target","textWidth","getInputWidth","currentTarget","width","useEffect","_inputRef$current2","removeProperty","handleFocus","handleBlur","handleHintShow","handleHintHide","handleHintClick","_hintInnerRef$current","stopPropagation","targetIsPopover","rootHasTarget","contains","handleChange","_event$target","maxLength","updateChips","newChips","newValues","_useKeyNavigation","useKeyNavigation","onEnterDisabled","handleInputKeydown","handleChipKeyDown","onChipClear","handleContentKeyDown","onChipClick","handleInputFocus","scrollTo","top","left","offsetLeft","behavior","focus","getRef","element","index","handleOnKeyDown","map","text","_inputRef$current3","innerOptional","hasPlaceholderOptional","optionalTextNode","React","createElement","StyledOptionalText","_extends","onClick","cx","textFieldGroupItem","OuterLabelWrapper","isInnerLabel","StyledIndicatorWrapper","Label","htmlFor","StyledHintWrapper","HintComponent","StyledIndicator","outerLabelPlacement","TitleCaption","InputWrapper","inputWrapperRef","inputWrapper","Fragment","innerLabelPlacement","StyledContentLeft","isClear","InputLabelWrapper","tabIndex","StyledTextBefore","StyledChips","chipsWrapper","_ref3","chipId","validationView","String","resView","TextFieldChip","key","onClear","rootWrapper","_forceChipManipulationWithReadonly","InputContainer","hasDynamicWidth","Input","onInput","InputPlaceholder","hasPadding","isHidden","StyledTextAfter","StyledContentRight","LeftHelper","textFieldConfig","name","tag","layout","variations","css","viewCSS","sizeCSS","clearCSS","attrs","disabledCSS","readOnlyCSS","labelPlacementCSS","hintViewCSS","hintSizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4CA,IAAMA,YAAY,GAAG,UAAU,CAAA;AAExB,IAAMC,IAAI,GAGhB,UAAA;AAED,IAAMC,mBAAqC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAEvCC,aAAa,GAAGA,SAAhBA,aAAaA,CAAIC,IAAmD,EAAA;AAAA,EAAA,oBAC7EC,UAAU,CACN,UAAAC,IAAA,EA2DIC,GAAG,EACF;IAAA,IAAAC,iBAAA,EAAAC,kBAAA,CAAA;AAAA,IAAA,IA1DGC,EAAE,GAAAJ,IAAA,CAAFI,EAAE;MACFC,SAAS,GAAAL,IAAA,CAATK,SAAS;MACTC,KAAK,GAAAN,IAAA,CAALM,KAAK;MAGLC,WAAW,GAAAP,IAAA,CAAXO,WAAW;MACXC,YAAY,GAAAR,IAAA,CAAZQ,YAAY;MACZC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,cAAc,GAAAV,IAAA,CAAdU,cAAc;MACdC,eAAe,GAAAX,IAAA,CAAfW,eAAe;MACfC,UAAU,GAAAZ,IAAA,CAAVY,UAAU;MACVC,SAAS,GAAAb,IAAA,CAATa,SAAS;MACTC,WAAW,GAAAd,IAAA,CAAXc,WAAW;MACXC,UAAU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CACnE,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM6N,eAAe,GAAG;AAC3BC,EAAAA,IAAI,EAAE,WAAW;AACjBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElP,aAAa;AACrBF,EAAAA,IAAI,EAAJA,IAAI;AACJqP,EAAAA,UAAU,EAAE;AACRzM,IAAAA,IAAI,EAAE;AACF0M,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD1M,IAAAA,IAAI,EAAE;AACFyM,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDnM,IAAAA,KAAK,EAAE;AACHiM,MAAAA,GAAG,EAAEG,MAAQ;AACbC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDzM,IAAAA,QAAQ,EAAE;AACNqM,MAAAA,GAAG,EAAEK,MAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACD3M,IAAAA,QAAQ,EAAE;AACNuM,MAAAA,GAAG,EAAEM,MAAW;AAChBF,MAAAA,KAAK,EAAE,IAAA;KACV;AACD3O,IAAAA,cAAc,EAAE;AACZuO,MAAAA,GAAG,EAAEO,MAAAA;KACR;AACD5N,IAAAA,QAAQ,EAAE;AACNqN,MAAAA,GAAG,EAAEQ,MAAAA;KACR;AACD3N,IAAAA,QAAQ,EAAE;AACNmN,MAAAA,GAAG,EAAES,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnN,IAAAA,IAAI,EAAE,GAAG;AACTD,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
@@ -1,41 +1,7 @@
1
- import { objectSpread2 as _objectSpread2, extends as _extends, toConsumableArray as _toConsumableArray } from '../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { objectSpread2 as _objectSpread2, extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import React from 'react';
3
3
  import { _component } from './linaria.js';
4
4
 
5
- //
6
- // Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange
7
- //
8
-
9
- var getStaticVariants = function getStaticVariants(config) {
10
- if (!config.variations) {
11
- return [];
12
- }
13
- var res = [];
14
- var variations = config.variations;
15
-
16
- // eslint-disable-next-line guard-for-in
17
- for (var key in variations) {
18
- var css = variations[key].css;
19
- css && res.push(css);
20
- }
21
- return res;
22
- };
23
- var getDynamicVariants = function getDynamicVariants(config) {
24
- return function (props) {
25
- var res = [];
26
-
27
- // eslint-disable-next-line guard-for-in
28
- for (var key in config.variations) {
29
- if (key in props) {
30
- var variant = config.variations[key];
31
- var css = variant[props[key]];
32
- // no css for { modifier: true }
33
- css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
34
- }
35
- }
36
- return res;
37
- };
38
- };
39
5
  var mergeConfig = function mergeConfig(baseConfig, userConfig) {
40
6
  var res = _objectSpread2(_objectSpread2({}, baseConfig), userConfig);
41
7
  if (res.variations) {
@@ -72,5 +38,5 @@ function component(config) {
72
38
  });
73
39
  }
74
40
 
75
- export { component, getDynamicVariants, getStaticVariants, mergeConfig };
41
+ export { component, mergeConfig };
76
42
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sources":["../../src/engines/common.tsx"],"sourcesContent":["import React from 'react';\n\nimport { _component } from './linaria';\nimport type {\n ComponentConfig,\n HTMLAnyAttributes,\n HTMLTagList,\n PropsType,\n Variants,\n HTMLAttributesWithoutOnChange,\n HTMLAttributesWithoutOnChangeAndDefaultValue,\n} from './types';\n\n//\n// Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange\n//\n\nexport const getStaticVariants = (config: ComponentConfig) => {\n if (!config.variations) {\n return [];\n }\n const res = [];\n const { variations } = config;\n\n // eslint-disable-next-line guard-for-in\n for (const key in variations) {\n const { css } = variations[key];\n css && res.push(css);\n }\n\n return res;\n};\n\nexport const getDynamicVariants = (config: ComponentConfig) => {\n return (props: HTMLAnyAttributes) => {\n const res = [];\n\n // eslint-disable-next-line guard-for-in\n for (const key in config.variations) {\n if (key in props) {\n const variant = config.variations[key];\n\n const css = variant[props[key]];\n // no css for { modifier: true }\n css && Array.isArray(css) ? res.push(...css) : res.push(css);\n }\n }\n\n return res;\n };\n};\n\nexport const mergeConfig = <\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutPropsBase extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>,\n LayoutPropsUser extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n | undefined = undefined\n>(\n baseConfig: ComponentConfig<Tag, Variants, PropsType & LayoutPropsBase, LayoutPropsBase>,\n userConfig?: Partial<ComponentConfig<Tag, VariantList, VariantsProps, LayoutPropsUser>>,\n) => {\n const res = { ...baseConfig, ...userConfig };\n\n if (res.variations) {\n // copy variations base css\n // eslint-disable-next-line guard-for-in\n for (const key in res.variations) {\n const variant = baseConfig.variations[key];\n\n res.variations[key].css = variant?.css;\n /* start of bad decision */\n if (!res.variations[key].true && variant?.true) {\n res.variations[key].true = variant.true;\n }\n /* end of bad decision */\n if (variant?.attrs) {\n res.variations[key].attrs = variant.attrs;\n }\n }\n }\n\n // eslint-disable-next-line guard-for-in\n for (const key in baseConfig.defaults || {}) {\n if (!(key in res.defaults)) {\n res.defaults[key] = baseConfig.defaults[key];\n }\n }\n\n return res as ComponentConfig<\n Tag,\n VariantList,\n PropsType<VariantList>,\n LayoutPropsUser extends undefined ? LayoutPropsBase : LayoutPropsUser\n >;\n};\n\nexport function component<\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutProps extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n>(\n config: ComponentConfig<Tag, VariantList, VariantsProps, LayoutProps>,\n): React.FunctionComponent<VariantsProps & LayoutProps> {\n const Comp = config.layout(_component((config as unknown) as ComponentConfig));\n\n return React.forwardRef<VariantsProps & LayoutProps, any>((props, ref) => (\n <Comp {...config?.defaults} {...props} ref={ref} />\n ));\n}\n"],"names":["getStaticVariants","config","variations","res","key","css","push","getDynamicVariants","props","variant","Array","isArray","apply","_toConsumableArray","mergeConfig","baseConfig","userConfig","_objectSpread","attrs","defaults","component","Comp","layout","_component","React","forwardRef","ref","createElement","_extends"],"mappings":";;;;AAaA;AACA;AACA;;IAEaA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,MAAuB,EAAK;AAC1D,EAAA,IAAI,CAACA,MAAM,CAACC,UAAU,EAAE;AACpB,IAAA,OAAO,EAAE,CAAA;AACb,GAAA;EACA,IAAMC,GAAG,GAAG,EAAE,CAAA;AACd,EAAA,IAAQD,UAAU,GAAKD,MAAM,CAArBC,UAAU,CAAA;;AAElB;AACA,EAAA,KAAK,IAAME,GAAG,IAAIF,UAAU,EAAE;AAC1B,IAAA,IAAQG,GAAG,GAAKH,UAAU,CAACE,GAAG,CAAC,CAAvBC,GAAG,CAAA;AACXA,IAAAA,GAAG,IAAIF,GAAG,CAACG,IAAI,CAACD,GAAG,CAAC,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOF,GAAG,CAAA;AACd,EAAC;IAEYI,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIN,MAAuB,EAAK;EAC3D,OAAO,UAACO,KAAwB,EAAK;IACjC,IAAML,GAAG,GAAG,EAAE,CAAA;;AAEd;AACA,IAAA,KAAK,IAAMC,GAAG,IAAIH,MAAM,CAACC,UAAU,EAAE;MACjC,IAAIE,GAAG,IAAII,KAAK,EAAE;AACd,QAAA,IAAMC,OAAO,GAAGR,MAAM,CAACC,UAAU,CAACE,GAAG,CAAC,CAAA;QAEtC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O,eAAPA,OAAO,CAAES,KAAK,EAAE;QAChBf,GAAG,CAACD,UAAU,CAACE,GAAG,CAAC,CAACc,KAAK,GAAGT,OAAO,CAACS,KAAK,CAAA;AAC7C,OAAA;AACJ,KAAA;AACJ,GAAA;;AAEA;EACA,KAAK,IAAMd,IAAG,IAAIW,UAAU,CAACI,QAAQ,IAAI,EAAE,EAAE;AACzC,IAAA,IAAI,EAAEf,IAAG,IAAID,GAAG,CAACgB,QAAQ,CAAC,EAAE;MACxBhB,GAAG,CAACgB,QAAQ,CAACf,IAAG,CAAC,GAAGW,UAAU,CAACI,QAAQ,CAACf,IAAG,CAAC,CAAA;AAChD,KAAA;AACJ,GAAA;AAEA,EAAA,OAAOD,GAAG,CAAA;AAMd,EAAC;AAEM,SAASiB,SAASA,CASrBnB,MAAqE,EACjB;EACpD,IAAMoB,IAAI,GAAGpB,MAAM,CAACqB,MAAM,CAACC,UAAU,CAAEtB,MAAqC,CAAC,CAAC,CAAA;AAE9E,EAAA,oBAAOuB,KAAK,CAACC,UAAU,CAAmC,UAACjB,KAAK,EAAEkB,GAAG,EAAA;AAAA,IAAA,oBACjEF,KAAA,CAAAG,aAAA,CAACN,IAAI,EAAAO,QAAA,CAAA,EAAA,EAAK3B,MAAM,KAAA,IAAA,IAANA,MAAM,KAANA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,MAAM,CAAEkB,QAAQ,EAAMX,KAAK,EAAA;AAAEkB,MAAAA,GAAG,EAAEA,GAAAA;AAAI,KAAA,CAAE,CAAC,CAAA;AAAA,GACtD,CAAC,CAAA;AACN;;;;"}
1
+ {"version":3,"file":"common.js","sources":["../../src/engines/common.tsx"],"sourcesContent":["import React from 'react';\n\nimport { _component } from './linaria';\nimport type {\n ComponentConfig,\n HTMLTagList,\n PropsType,\n Variants,\n HTMLAttributesWithoutOnChange,\n HTMLAttributesWithoutOnChangeAndDefaultValue,\n} from './types';\n\nexport const mergeConfig = <\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutPropsBase extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>,\n LayoutPropsUser extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n | undefined = undefined\n>(\n baseConfig: ComponentConfig<Tag, Variants, PropsType & LayoutPropsBase, LayoutPropsBase>,\n userConfig?: Partial<ComponentConfig<Tag, VariantList, VariantsProps, LayoutPropsUser>>,\n) => {\n const res = { ...baseConfig, ...userConfig };\n\n if (res.variations) {\n // copy variations base css\n // eslint-disable-next-line guard-for-in\n for (const key in res.variations) {\n const variant = baseConfig.variations[key];\n\n res.variations[key].css = variant?.css;\n /* start of bad decision */\n if (!res.variations[key].true && variant?.true) {\n res.variations[key].true = variant.true;\n }\n /* end of bad decision */\n if (variant?.attrs) {\n res.variations[key].attrs = variant.attrs;\n }\n }\n }\n\n // eslint-disable-next-line guard-for-in\n for (const key in baseConfig.defaults || {}) {\n if (!(key in res.defaults)) {\n res.defaults[key] = baseConfig.defaults[key];\n }\n }\n\n return res as ComponentConfig<\n Tag,\n VariantList,\n PropsType<VariantList>,\n LayoutPropsUser extends undefined ? LayoutPropsBase : LayoutPropsUser\n >;\n};\n\nexport function component<\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutProps extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n>(\n config: ComponentConfig<Tag, VariantList, VariantsProps, LayoutProps>,\n): React.FunctionComponent<VariantsProps & LayoutProps> {\n const Comp = config.layout(_component((config as unknown) as ComponentConfig));\n\n return React.forwardRef<VariantsProps & LayoutProps, any>((props, ref) => (\n <Comp {...config?.defaults} {...props} ref={ref} />\n ));\n}\n"],"names":["mergeConfig","baseConfig","userConfig","res","_objectSpread","variations","key","variant","css","attrs","defaults","component","config","Comp","layout","_component","React","forwardRef","props","ref","createElement","_extends"],"mappings":";;;;AAYO,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAcpBC,UAAwF,EACxFC,UAAuF,EACtF;EACD,IAAMC,GAAG,GAAAC,cAAA,CAAAA,cAAA,CAAQH,EAAAA,EAAAA,UAAU,CAAKC,EAAAA,UAAU,CAAE,CAAA;EAE5C,IAAIC,GAAG,CAACE,UAAU,EAAE;AAChB;AACA;AACA,IAAA,KAAK,IAAMC,GAAG,IAAIH,GAAG,CAACE,UAAU,EAAE;AAC9B,MAAA,IAAME,OAAO,GAAGN,UAAU,CAACI,UAAU,CAACC,GAAG,CAAC,CAAA;AAE1CH,MAAAA,GAAG,CAACE,UAAU,CAACC,GAAG,CAAC,CAACE,GAAG,GAAGD,OAAO,KAAPA,IAAAA,IAAAA,OAAO,KAAPA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,OAAO,CAAEC,GAAG,CAAA;AACtC;AACA,MAAA,IAAI,CAACL,GAAG,CAACE,UAAU,CAACC,GAAG,CAAC,CAAK,MAAA,CAAA,IAAIC,OAAO,KAAPA,IAAAA,IAAAA,OAAO,KAAPA,KAAAA,CAAAA,IAAAA,OAAO,QAAM,EAAE;QAC5CJ,GAAG,CAACE,UAAU,CAACC,GAAG,CAAC,CAAK,MAAA,CAAA,GAAGC,OAAO,CAAK,MAAA,CAAA,CAAA;AAC3C,OAAA;AACA;AACA,MAAA,IAAIA,OAAO,KAAPA,IAAAA,IAAAA,OAAO,eAAPA,OAAO,CAAEE,KAAK,EAAE;QAChBN,GAAG,CAACE,UAAU,CAACC,GAAG,CAAC,CAACG,KAAK,GAAGF,OAAO,CAACE,KAAK,CAAA;AAC7C,OAAA;AACJ,KAAA;AACJ,GAAA;;AAEA;EACA,KAAK,IAAMH,IAAG,IAAIL,UAAU,CAACS,QAAQ,IAAI,EAAE,EAAE;AACzC,IAAA,IAAI,EAAEJ,IAAG,IAAIH,GAAG,CAACO,QAAQ,CAAC,EAAE;MACxBP,GAAG,CAACO,QAAQ,CAACJ,IAAG,CAAC,GAAGL,UAAU,CAACS,QAAQ,CAACJ,IAAG,CAAC,CAAA;AAChD,KAAA;AACJ,GAAA;AAEA,EAAA,OAAOH,GAAG,CAAA;AAMd,EAAC;AAEM,SAASQ,SAASA,CASrBC,MAAqE,EACjB;EACpD,IAAMC,IAAI,GAAGD,MAAM,CAACE,MAAM,CAACC,UAAU,CAAEH,MAAqC,CAAC,CAAC,CAAA;AAE9E,EAAA,oBAAOI,KAAK,CAACC,UAAU,CAAmC,UAACC,KAAK,EAAEC,GAAG,EAAA;AAAA,IAAA,oBACjEH,KAAA,CAAAI,aAAA,CAACP,IAAI,EAAAQ,QAAA,CAAA,EAAA,EAAKT,MAAM,KAAA,IAAA,IAANA,MAAM,KAANA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,MAAM,CAAEF,QAAQ,EAAMQ,KAAK,EAAA;AAAEC,MAAAA,GAAG,EAAEA,GAAAA;AAAI,KAAA,CAAE,CAAC,CAAA;AAAA,GACtD,CAAC,CAAA;AACN;;;;"}
@@ -2,7 +2,7 @@ import { objectWithoutProperties as _objectWithoutProperties, toConsumableArray
2
2
  import React, { forwardRef } from 'react';
3
3
  import { cx } from '@linaria/core';
4
4
  import 'focus-visible';
5
- import { getStaticVariants, getDynamicVariants } from './common.js';
5
+ import { getStaticVariants, getDynamicVariants } from './utils.js';
6
6
 
7
7
  var _excluded = ["className"];
8
8
  /* eslint-disable no-underscore-dangle */
@@ -1 +1 @@
1
- {"version":3,"file":"linaria.js","sources":["../../src/engines/linaria.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { cx } from '@linaria/core';\n\n// TODO: #1008 Избавиться от импортов и переделать addFocus\nimport 'focus-visible';\nimport { getStaticVariants, getDynamicVariants } from './common';\nimport type { ComponentConfig, HTMLAnyAttributes } from './types';\n\n/* eslint-disable no-underscore-dangle */\nexport const _component = (componentConfig: ComponentConfig) => {\n const { tag, base, name } = componentConfig;\n const staticVariants = getStaticVariants(componentConfig);\n const dynamicVariants = getDynamicVariants(componentConfig);\n const Root = tag as React.ElementType;\n\n const component = forwardRef<HTMLElement, HTMLAnyAttributes>((props, ref) => {\n const { className, ...rest } = props;\n const variants = dynamicVariants(rest);\n const cls = cx(className, base as string, ...(staticVariants as string[]), ...variants);\n\n // styled-components do it inside\n // filter props\n const baseProps: HTMLAnyAttributes = {};\n for (const key in rest) {\n if (!(key in componentConfig.variations)) {\n baseProps[key] = rest[key];\n }\n }\n\n baseProps.ref = ref;\n\n // styled-components do it inside\n // add props that should be attr( disabled for example)\n const htmlAttrs: HTMLAnyAttributes = {};\n for (const key in componentConfig.variations || {}) {\n if (key in rest) {\n const variant = componentConfig.variations[key];\n\n const { attrs } = variant;\n if (typeof attrs === 'boolean') {\n htmlAttrs[key] = rest[key];\n }\n }\n }\n\n return <Root className={cls} {...htmlAttrs} {...baseProps} />;\n });\n if (name) {\n component.displayName = name;\n }\n return component;\n};\n"],"names":["_component","componentConfig","tag","base","name","staticVariants","getStaticVariants","dynamicVariants","getDynamicVariants","Root","component","forwardRef","props","ref","className","rest","_objectWithoutProperties","_excluded","variants","cls","cx","apply","concat","_toConsumableArray","baseProps","key","variations","htmlAttrs","variant","attrs","React","createElement","_extends","displayName"],"mappings":";;;;;;;AAQA;IACaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,eAAgC,EAAK;AAC5D,EAAA,IAAQC,GAAG,GAAiBD,eAAe,CAAnCC,GAAG;IAAEC,IAAI,GAAWF,eAAe,CAA9BE,IAAI;IAAEC,IAAI,GAAKH,eAAe,CAAxBG,IAAI,CAAA;AACvB,EAAA,IAAMC,cAAc,GAAGC,iBAAiB,CAACL,eAAe,CAAC,CAAA;AACzD,EAAA,IAAMM,eAAe,GAAGC,kBAAkB,CAACP,eAAe,CAA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AACU,IAAG,CAAC,CAAA;AAC9B,SAAA;AACJ,OAAA;AACJ,KAAA;AAEA,IAAA,oBAAOK,KAAA,CAAAC,aAAA,CAACtB,IAAI,EAAAuB,QAAA,CAAA;AAAClB,MAAAA,SAAS,EAAEK,GAAAA;AAAI,KAAA,EAAKQ,SAAS,EAAMH,SAAS,CAAG,CAAC,CAAA;AACjE,GAAC,CAAC,CAAA;AACF,EAAA,IAAIpB,IAAI,EAAE;IACNM,SAAS,CAACuB,WAAW,GAAG7B,IAAI,CAAA;AAChC,GAAA;AACA,EAAA,OAAOM,SAAS,CAAA;AACpB;;;;"}
1
+ {"version":3,"file":"linaria.js","sources":["../../src/engines/linaria.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { cx } from '@linaria/core';\n\n// TODO: #1008 Избавиться от импортов и переделать addFocus\nimport 'focus-visible';\nimport { getStaticVariants, getDynamicVariants } from './utils';\nimport type { ComponentConfig, HTMLAnyAttributes } from './types';\n\n/* eslint-disable no-underscore-dangle */\nexport const _component = (componentConfig: ComponentConfig) => {\n const { tag, base, name } = componentConfig;\n const staticVariants = getStaticVariants(componentConfig);\n const dynamicVariants = getDynamicVariants(componentConfig);\n const Root = tag as React.ElementType;\n\n const component = forwardRef<HTMLElement, HTMLAnyAttributes>((props, ref) => {\n const { className, ...rest } = props;\n const variants = dynamicVariants(rest);\n const cls = cx(className, base as string, ...(staticVariants as string[]), ...variants);\n\n // styled-components do it inside\n // filter props\n const baseProps: HTMLAnyAttributes = {};\n for (const key in rest) {\n if (!(key in componentConfig.variations)) {\n baseProps[key] = rest[key];\n }\n }\n\n baseProps.ref = ref;\n\n // styled-components do it inside\n // add props that should be attr( disabled for example)\n const htmlAttrs: HTMLAnyAttributes = {};\n for (const key in componentConfig.variations || {}) {\n if (key in rest) {\n const variant = componentConfig.variations[key];\n\n const { attrs } = variant;\n if (typeof attrs === 'boolean') {\n htmlAttrs[key] = rest[key];\n }\n }\n }\n\n return <Root className={cls} {...htmlAttrs} {...baseProps} />;\n });\n if (name) {\n component.displayName = name;\n }\n return component;\n};\n"],"names":["_component","componentConfig","tag","base","name","staticVariants","getStaticVariants","dynamicVariants","getDynamicVariants","Root","component","forwardRef","props","ref","className","rest","_objectWithoutProperties","_excluded","variants","cls","cx","apply","concat","_toConsumableArray","baseProps","key","variations","htmlAttrs","variant","attrs","React","createElement","_extends","displayName"],"mappings":";;;;;;;AAQA;IACaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,eAAgC,EAAK;AAC5D,EAAA,IAAQC,GAAG,GAAiBD,eAAe,CAAnCC,GAAG;IAAEC,IAAI,GAAWF,eAAe,CAA9BE,IAAI;IAAEC,IAAI,GAAKH,eAAe,CAAxBG,IAAI,CAAA;AACvB,EAAA,IAAMC,cAAc,GAAGC,iBAAiB,CAACL,eAAe,CAAC,CAAA;AACzD,EAAA,IAAMM,eAAe,GAAGC,kBAAkB,CAACP,eAAe,CAAC,CAAA;EAC3D,IAAMQ,IAAI,GAAGP,GAAwB,CAAA;EAErC,IAAMQ,SAAS,gBAAGC,UAAU,CAAiC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACzE,IAAA,IAAQC,SAAS,GAAcF,KAAK,CAA5BE,SAAS;AAAKC,MAAAA,IAAI,GAAAC,wBAAA,CAAKJ,KAAK,EAAAK,SAAA,CAAA,CAAA;AACpC,IAAA,IAAMC,QAAQ,GAAGX,eAAe,CAACQ,IAAI,CAAC,CAAA;AACtC,IAAA,IAAMI,GAAG,GAAGC,EAAE,CAAAC,KAAA,CAAA,KAAA,CAAA,EAAA,CAACP,SAAS,EAAEX,IAAI,EAAAmB,MAAA,CAAAC,kBAAA,CAAgBlB,cAAc,GAAAkB,kBAAA,CAAkBL,QAAQ,CAAC,CAAA,CAAA,CAAA;;AAEvF;AACA;IACA,IAAMM,SAA4B,GAAG,EAAE,CAAA;AACvC,IAAA,KAAK,IAAMC,GAAG,IAAIV,IAAI,EAAE;AACpB,MAAA,IAAI,EAAEU,GAAG,IAAIxB,eAAe,CAACyB,UAAU,CAAC,EAAE;AACtCF,QAAAA,SAAS,CAACC,GAAG,CAAC,GAAGV,IAAI,CAACU,GAAG,CAAC,CAAA;AAC9B,OAAA;AACJ,KAAA;IAEAD,SAAS,CAACX,GAAG,GAAGA,GAAG,CAAA;;AAEnB;AACA;IACA,IAAMc,SAA4B,GAAG,EAAE,CAAA;IACvC,KAAK,IAAMF,IAAG,IAAIxB,eAAe,CAACyB,UAAU,IAAI,EAAE,EAAE;MAChD,IAAID,IAAG,IAAIV,IAAI,EAAE;AACb,QAAA,IAAMa,OAAO,GAAG3B,eAAe,CAACyB,UAAU,CAACD,IAAG,CAAC,CAAA;AAE/C,QAAA,IAAQI,KAAK,GAAKD,OAAO,CAAjBC,KAAK,CAAA;AACb,QAAA,IAAI,OAAOA,KAAK,KAAK,SAAS,EAAE;AAC5BF,UAAAA,SAAS,CAACF,IAAG,CAAC,GAAGV,IAAI,CAACU,IAAG,CAAC,CAAA;AAC9B,SAAA;AACJ,OAAA;AACJ,KAAA;AAEA,IAAA,oBAAOK,KAAA,CAAAC,aAAA,CAACtB,IAAI,EAAAuB,QAAA,CAAA;AAAClB,MAAAA,SAAS,EAAEK,GAAAA;AAAI,KAAA,EAAKQ,SAAS,EAAMH,SAAS,CAAG,CAAC,CAAA;AACjE,GAAC,CAAC,CAAA;AACF,EAAA,IAAIpB,IAAI,EAAE;IACNM,SAAS,CAACuB,WAAW,GAAG7B,IAAI,CAAA;AAChC,GAAA;AACA,EAAA,OAAOM,SAAS,CAAA;AACpB;;;;"}
@@ -0,0 +1,35 @@
1
+ import { toConsumableArray as _toConsumableArray } from '../_virtual/_rollupPluginBabelHelpers.js';
2
+
3
+ var getStaticVariants = function getStaticVariants(config) {
4
+ if (!config.variations) {
5
+ return [];
6
+ }
7
+ var res = [];
8
+ var variations = config.variations;
9
+
10
+ // eslint-disable-next-line guard-for-in
11
+ for (var key in variations) {
12
+ var css = variations[key].css;
13
+ css && res.push(css);
14
+ }
15
+ return res;
16
+ };
17
+ var getDynamicVariants = function getDynamicVariants(config) {
18
+ return function (props) {
19
+ var res = [];
20
+
21
+ // eslint-disable-next-line guard-for-in
22
+ for (var key in config.variations) {
23
+ if (key in props) {
24
+ var variant = config.variations[key];
25
+ var css = variant[props[key]];
26
+ // no css for { modifier: true }
27
+ css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
28
+ }
29
+ }
30
+ return res;
31
+ };
32
+ };
33
+
34
+ export { getDynamicVariants, getStaticVariants };
35
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../src/engines/utils.ts"],"sourcesContent":["import type { ComponentConfig, HTMLAnyAttributes } from './types';\n\nexport const getStaticVariants = (config: ComponentConfig) => {\n if (!config.variations) {\n return [];\n }\n const res = [];\n const { variations } = config;\n\n // eslint-disable-next-line guard-for-in\n for (const key in variations) {\n const { css } = variations[key];\n css && res.push(css);\n }\n\n return res;\n};\n\nexport const getDynamicVariants = (config: ComponentConfig) => {\n return (props: HTMLAnyAttributes) => {\n const res = [];\n\n // eslint-disable-next-line guard-for-in\n for (const key in config.variations) {\n if (key in props) {\n const variant = config.variations[key];\n\n const css = variant[props[key]];\n // no css for { modifier: true }\n css && Array.isArray(css) ? res.push(...css) : res.push(css);\n }\n }\n\n return res;\n };\n};\n"],"names":["getStaticVariants","config","variations","res","key","css","push","getDynamicVariants","props","variant","Array","isArray","apply","_toConsumableArray"],"mappings":";;IAEaA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,MAAuB,EAAK;AAC1D,EAAA,IAAI,CAACA,MAAM,CAACC,UAAU,EAAE;AACpB,IAAA,OAAO,EAAE,CAAA;AACb,GAAA;EACA,IAAMC,GAAG,GAAG,EAAE,CAAA;AACd,EAAA,IAAQD,UAAU,GAAKD,MAAM,CAArBC,UAAU,CAAA;;AAElB;AACA,EAAA,KAAK,IAAME,GAAG,IAAIF,UAAU,EAAE;AAC1B,IAAA,IAAQG,GAAG,GAAKH,UAAU,CAACE,GAAG,CAAC,CAAvBC,GAAG,CAAA;AACXA,IAAAA,GAAG,IAAIF,GAAG,CAACG,IAAI,CAACD,GAAG,CAAC,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOF,GAAG,CAAA;AACd,EAAC;IAEYI,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIN,MAAuB,EAAK;EAC3D,OAAO,UAACO,KAAwB,EAAK;IACjC,IAAML,GAAG,GAAG,EAAE,CAAA;;AAEd;AACA,IAAA,KAAK,IAAMC,GAAG,IAAIH,MAAM,CAACC,UAAU,EAAE;MACjC,IAAIE,GAAG,IAAII,KAAK,EAAE;AACd,QAAA,IAAMC,OAAO,GAAGR,MAAM,CAACC,UAAU,CAACE,GAAG,CAAC,CAAA;QAEtC,IAAMC,GAAG,GAAGI,OAAO,CAACD,KAAK,CAACJ,GAAG,CAAC,CAAC,CAAA;AAC/B;QACAC,GAAG,IAAIK,KAAK,CAACC,OAAO,CAACN,GAAG,CAAC,GAAGF,GAAG,CAACG,IAAI,CAAAM,KAAA,CAART,GAAG,EAAAU,kBAAA,CAASR,GAAG,CAAA,CAAC,GAAGF,GAAG,CAACG,IAAI,CAACD,GAAG,CAAC,CAAA;AAChE,OAAA;AACJ,KAAA;AAEA,IAAA,OAAOF,GAAG,CAAA;GACb,CAAA;AACL;;;;"}
package/package.json CHANGED
@@ -1,10 +1,27 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.230.0-canary.1670.12462995068.0",
3
+ "version": "0.230.0-dev.0",
4
4
  "description": "Salute Design System blueprint",
5
- "main": "cjs/index.js",
6
- "module": "es/index.js",
7
- "types": "types/index.d.ts",
5
+ "main": "./cjs/index.js",
6
+ "module": "./es/index.js",
7
+ "types": "./types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "require": "./cjs/index.js",
11
+ "import": "./es/index.js",
12
+ "types": "./types/index.d.ts"
13
+ },
14
+ "./styled-components": {
15
+ "require": "./styled-components/cjs/index.js",
16
+ "import": "./styled-components/es/index.js",
17
+ "types": "./types/index.d.ts"
18
+ },
19
+ "./emotion": {
20
+ "require": "./emotion/cjs/index.js",
21
+ "import": "./emotion/es/index.js",
22
+ "types": "./types/index.d.ts"
23
+ }
24
+ },
8
25
  "files": [
9
26
  "cjs",
10
27
  "es",
@@ -128,5 +145,5 @@
128
145
  "sideEffects": [
129
146
  "*.css"
130
147
  ],
131
- "gitHead": "63f7c34e142b4b79944a0dfc1e4aab4616ee3413"
148
+ "gitHead": "0e42778df9b9bf7ed9a2eea33d3e3a3643950cf3"
132
149
  }
@@ -11,6 +11,7 @@ var _base = /*#__PURE__*/require("./variations/_size/base");
11
11
  var _base2 = /*#__PURE__*/require("./variations/_view/base");
12
12
  var _Breadcrumbs = /*#__PURE__*/require("./Breadcrumbs.styles");
13
13
  var _utils2 = /*#__PURE__*/require("./utils");
14
+ var _getShortItems = /*#__PURE__*/require("./utils/getShortItems");
14
15
  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); }
15
16
  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; }
16
17
  var breadcrumbsRoot = exports.breadcrumbsRoot = function breadcrumbsRoot(Root) {
@@ -26,7 +27,7 @@ var breadcrumbsRoot = exports.breadcrumbsRoot = function breadcrumbsRoot(Root) {
26
27
  color: "inherit",
27
28
  size: (0, _utils2.convertIconSize)(size)
28
29
  });
29
- var renderItems = (0, _utils2.getRenderItems)(items, renderSeparator, showItems);
30
+ var renderItems = (0, _getShortItems.getRenderItems)(items, renderSeparator, showItems);
30
31
  var itemsWithSeparator = (0, _utils2.addSeparator)(renderItems, renderSeparator);
31
32
  return /*#__PURE__*/_react["default"].createElement(Root, {
32
33
  ref: outerRootRef,
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.shortItems = exports.getRenderItems = void 0;
7
+ var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
+ var _BreadcrumbShorter = /*#__PURE__*/require("../ui/BreadcrumbShorter/BreadcrumbShorter");
9
+ var _Breadcrumbs = /*#__PURE__*/require("../Breadcrumbs.styles");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ var shortItems = exports.shortItems = function shortItems(items, renderSeparator, showItems) {
12
+ if (!showItems || showItems < 2 || items.length <= showItems) {
13
+ return items;
14
+ }
15
+ var leftSlice = Math.floor(showItems / 2);
16
+ var rightSlice = items.length - leftSlice - showItems % 2;
17
+ var renderItems = items.slice(leftSlice, rightSlice);
18
+ var shorter = /*#__PURE__*/_react["default"].createElement(_BreadcrumbShorter.BreadcrumbShorter, {
19
+ separator: renderSeparator
20
+ }, renderItems);
21
+ items.splice(leftSlice, rightSlice - leftSlice, shorter);
22
+ return items;
23
+ };
24
+ var getRenderItems = exports.getRenderItems = function getRenderItems(items, renderSeparator, showItems) {
25
+ var renderItems = shortItems(items.map(function (item) {
26
+ if (item.renderItem) {
27
+ return item.renderItem();
28
+ }
29
+ var title = item.title,
30
+ disabled = item.disabled,
31
+ href = item.href,
32
+ onClick = item.onClick;
33
+ return /*#__PURE__*/_react["default"].createElement(_Breadcrumbs.StyledLink, {
34
+ tabIndex: 0,
35
+ href: href,
36
+ disabled: disabled,
37
+ onClick: onClick,
38
+ isHref: Boolean(href || onClick)
39
+ }, title);
40
+ }), renderSeparator, showItems);
41
+ return renderItems;
42
+ };
@@ -3,24 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.shortItems = exports.getRenderItems = exports.convertIconSize = exports.addSeparator = void 0;
7
- var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
- var _BreadcrumbShorter = /*#__PURE__*/require("../ui/BreadcrumbShorter/BreadcrumbShorter");
9
- var _Breadcrumbs = /*#__PURE__*/require("../Breadcrumbs.styles");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
- var shortItems = exports.shortItems = function shortItems(items, renderSeparator, showItems) {
12
- if (!showItems || showItems < 2 || items.length <= showItems) {
13
- return items;
14
- }
15
- var leftSlice = Math.floor(showItems / 2);
16
- var rightSlice = items.length - leftSlice - showItems % 2;
17
- var renderItems = items.slice(leftSlice, rightSlice);
18
- var shorter = /*#__PURE__*/_react["default"].createElement(_BreadcrumbShorter.BreadcrumbShorter, {
19
- separator: renderSeparator
20
- }, renderItems);
21
- items.splice(leftSlice, rightSlice - leftSlice, shorter);
22
- return items;
23
- };
6
+ exports.convertIconSize = exports.addSeparator = void 0;
24
7
  var convertIconSize = exports.convertIconSize = function convertIconSize(size) {
25
8
  switch (size) {
26
9
  case 's':
@@ -30,25 +13,6 @@ var convertIconSize = exports.convertIconSize = function convertIconSize(size) {
30
13
  return 's';
31
14
  }
32
15
  };
33
- var getRenderItems = exports.getRenderItems = function getRenderItems(items, renderSeparator, showItems) {
34
- var renderItems = shortItems(items.map(function (item) {
35
- if (item.renderItem) {
36
- return item.renderItem();
37
- }
38
- var title = item.title,
39
- disabled = item.disabled,
40
- href = item.href,
41
- onClick = item.onClick;
42
- return /*#__PURE__*/_react["default"].createElement(_Breadcrumbs.StyledLink, {
43
- tabIndex: 0,
44
- href: href,
45
- disabled: disabled,
46
- onClick: onClick,
47
- isHref: Boolean(href || onClick)
48
- }, title);
49
- }), renderSeparator, showItems);
50
- return renderItems;
51
- };
52
16
  var addSeparator = exports.addSeparator = function addSeparator(items, renderSeparator) {
53
17
  return items.flatMap(function (item, idx) {
54
18
  return idx < items.length - 1 ? [item, renderSeparator] : [item];
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getDatesWithModifications = void 0;
7
7
  var _types = /*#__PURE__*/require("../store/types");
8
- var _ = /*#__PURE__*/require(".");
8
+ var _calendarGridHelper = /*#__PURE__*/require("./calendarGridHelper");
9
9
  var dateOperationHandler = {
10
10
  Days: {
11
11
  add: function add(date) {
@@ -144,8 +144,8 @@ var getDatesWithModifications = exports.getDatesWithModifications = function get
144
144
  includeEdgeDates = _ref3.includeEdgeDates,
145
145
  min = _ref3.min,
146
146
  max = _ref3.max;
147
- var eventsMap = (0, _.getPropsMap)(eventList);
148
- var disabledDatesMap = (0, _.getPropsMap)(disabledList);
147
+ var eventsMap = (0, _calendarGridHelper.getPropsMap)(eventList);
148
+ var disabledDatesMap = (0, _calendarGridHelper.getPropsMap)(disabledList);
149
149
  var filteredDates = type === _types.CalendarState.Days ? dates.filter(function (_ref4) {
150
150
  var isDayInCurrentMonth = _ref4.isDayInCurrentMonth;
151
151
  return isDayInCurrentMonth;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Context = void 0;
7
+ var _react = /*#__PURE__*/require("react");
8
+ var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)({});