@salutejs/plasma-new-hope 0.194.0-canary.1552.11858023676.0 → 0.194.0-canary.1556.11879682469.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +17 -17
  2. package/cjs/components/Autocomplete/Autocomplete.js +7 -1
  3. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  4. package/cjs/components/Combobox/ComboboxNew/Combobox.css +17 -19
  5. package/cjs/components/Combobox/ComboboxNew/Combobox.js +12 -39
  6. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  7. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -19
  8. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -19
  9. package/cjs/components/DatePicker/RangeDate/RangeDate.css +17 -17
  10. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
  11. package/cjs/components/DatePicker/SingleDate/SingleDate.css +17 -17
  12. package/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
  13. package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  14. package/cjs/components/Pagination/Pagination.css +17 -17
  15. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
  16. package/cjs/components/Range/Range.css +17 -17
  17. package/cjs/components/Select/Select.css +17 -17
  18. package/cjs/components/Select/ui/Inner/Inner.css +17 -17
  19. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +17 -17
  20. package/cjs/components/Select/ui/Target/Target.css +17 -17
  21. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
  22. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  23. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  24. package/cjs/components/Slider/Slider.css +17 -17
  25. package/cjs/components/Slider/components/Double/Double.css +17 -17
  26. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
  27. package/cjs/components/TextField/TextField.js +9 -5
  28. package/cjs/components/TextField/TextField.js.map +1 -1
  29. package/cjs/components/TextField/TextField.styles.js +20 -11
  30. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  31. package/cjs/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
  32. package/cjs/components/TextField/TextField.tokens.js +1 -0
  33. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  34. package/cjs/components/TextField/ui/Hint/Hint.css +20 -20
  35. package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  36. package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -1
  37. package/cjs/components/TextField/variations/_label-placement/base_y1lvvc.css +1 -0
  38. package/cjs/index.css +17 -19
  39. package/cjs/index.js +0 -2
  40. package/cjs/index.js.map +1 -1
  41. package/cjs/utils/index.js.map +1 -1
  42. package/emotion/cjs/components/Autocomplete/Autocomplete.js +7 -1
  43. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +13 -40
  44. package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
  45. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  46. package/emotion/cjs/components/TextField/TextField.js +10 -6
  47. package/emotion/cjs/components/TextField/TextField.styles.js +29 -26
  48. package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
  49. package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  50. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
  51. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  52. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  53. package/emotion/cjs/utils/index.js +1 -10
  54. package/emotion/es/components/Autocomplete/Autocomplete.js +7 -1
  55. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +13 -41
  56. package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
  57. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  58. package/emotion/es/components/TextField/TextField.js +10 -6
  59. package/emotion/es/components/TextField/TextField.styles.js +29 -26
  60. package/emotion/es/components/TextField/TextField.tokens.js +1 -0
  61. package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
  62. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
  63. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  64. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  65. package/emotion/es/utils/index.js +0 -1
  66. package/es/components/Autocomplete/Autocomplete.css +17 -17
  67. package/es/components/Autocomplete/Autocomplete.js +7 -1
  68. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  69. package/es/components/Combobox/ComboboxNew/Combobox.css +17 -19
  70. package/es/components/Combobox/ComboboxNew/Combobox.js +14 -41
  71. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  72. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -19
  73. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -19
  74. package/es/components/DatePicker/RangeDate/RangeDate.css +17 -17
  75. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
  76. package/es/components/DatePicker/SingleDate/SingleDate.css +17 -17
  77. package/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
  78. package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  79. package/es/components/Pagination/Pagination.css +17 -17
  80. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
  81. package/es/components/Range/Range.css +17 -17
  82. package/es/components/Select/Select.css +17 -17
  83. package/es/components/Select/ui/Inner/Inner.css +17 -17
  84. package/es/components/Select/ui/Inner/ui/Item/Item.css +17 -17
  85. package/es/components/Select/ui/Target/Target.css +17 -17
  86. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
  87. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  88. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  89. package/es/components/Slider/Slider.css +17 -17
  90. package/es/components/Slider/components/Double/Double.css +17 -17
  91. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
  92. package/es/components/TextField/TextField.js +9 -5
  93. package/es/components/TextField/TextField.js.map +1 -1
  94. package/es/components/TextField/TextField.styles.js +20 -11
  95. package/es/components/TextField/TextField.styles.js.map +1 -1
  96. package/es/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
  97. package/es/components/TextField/TextField.tokens.js +1 -0
  98. package/es/components/TextField/TextField.tokens.js.map +1 -1
  99. package/es/components/TextField/ui/Hint/Hint.css +20 -20
  100. package/es/components/TextField/variations/_label-placement/base.js +1 -1
  101. package/es/components/TextField/variations/_label-placement/base.js.map +1 -1
  102. package/es/components/TextField/variations/_label-placement/base_y1lvvc.css +1 -0
  103. package/es/index.css +17 -19
  104. package/es/index.js +0 -1
  105. package/es/index.js.map +1 -1
  106. package/es/utils/index.js.map +1 -1
  107. package/package.json +2 -2
  108. package/styled-components/cjs/components/Autocomplete/Autocomplete.js +7 -1
  109. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +13 -40
  110. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
  111. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  112. package/styled-components/cjs/components/TextField/TextField.js +9 -5
  113. package/styled-components/cjs/components/TextField/TextField.styles.js +9 -6
  114. package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
  115. package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  116. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
  117. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  118. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  119. package/styled-components/cjs/utils/index.js +1 -10
  120. package/styled-components/es/components/Autocomplete/Autocomplete.js +7 -1
  121. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +13 -41
  122. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
  123. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  124. package/styled-components/es/components/TextField/TextField.js +9 -5
  125. package/styled-components/es/components/TextField/TextField.styles.js +9 -6
  126. package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
  127. package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
  128. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
  129. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  130. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  131. package/styled-components/es/utils/index.js +0 -1
  132. package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  133. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +717 -61
  134. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
  135. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  136. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +31 -33
  137. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  138. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +717 -61
  139. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
  140. package/types/components/DatePicker/SingleDate/SingleDate.d.ts +2 -2
  141. package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
  142. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +717 -61
  143. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
  144. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +28 -9
  145. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
  146. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +176 -4
  147. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
  148. package/types/components/Range/Range.styles.d.ts +717 -61
  149. package/types/components/Range/Range.styles.d.ts.map +1 -1
  150. package/types/components/Select/Select.types.d.ts +30 -10
  151. package/types/components/Select/Select.types.d.ts.map +1 -1
  152. package/types/components/Select/ui/Target/Target.d.ts +1 -1
  153. package/types/components/Select/ui/Target/Target.types.d.ts +1 -1
  154. package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
  155. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  156. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +717 -61
  157. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  158. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
  159. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
  160. package/types/components/Slider/components/Double/Double.styles.d.ts +717 -61
  161. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
  162. package/types/components/TextField/TextField.d.ts.map +1 -1
  163. package/types/components/TextField/TextField.styles.d.ts +3 -1
  164. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  165. package/types/components/TextField/TextField.tokens.d.ts +1 -0
  166. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  167. package/types/components/TextField/TextField.types.d.ts +43 -20
  168. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  169. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts +3 -5
  170. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  171. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +452 -500
  172. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  173. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +47 -1
  174. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
  175. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +1246 -62
  176. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
  177. package/types/examples/plasma_b2c/components/Select/Select.d.ts +176 -4
  178. package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
  179. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +717 -61
  180. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  181. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts +3 -5
  182. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  183. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +452 -500
  184. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
  185. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +47 -1
  186. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
  187. package/types/examples/plasma_web/components/Mask/Mask.d.ts +1246 -62
  188. package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
  189. package/types/examples/plasma_web/components/Select/Select.d.ts +176 -4
  190. package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
  191. package/types/examples/plasma_web/components/TextField/TextField.d.ts +717 -61
  192. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  193. package/types/utils/index.d.ts +0 -1
  194. package/types/utils/index.d.ts.map +1 -1
  195. package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.css +0 -1
  196. package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -39
  197. package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js.map +0 -1
  198. package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -15
  199. package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js.map +0 -1
  200. package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles_18yw2bf.css +0 -1
  201. package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
  202. package/cjs/utils/createEvent.js +0 -54
  203. package/cjs/utils/createEvent.js.map +0 -1
  204. package/emotion/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -40
  205. package/emotion/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -13
  206. package/emotion/cjs/utils/createEvent.js +0 -53
  207. package/emotion/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -31
  208. package/emotion/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -6
  209. package/emotion/es/utils/createEvent.js +0 -47
  210. package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.css +0 -1
  211. package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -35
  212. package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js.map +0 -1
  213. package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -11
  214. package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js.map +0 -1
  215. package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles_18yw2bf.css +0 -1
  216. package/es/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
  217. package/es/utils/createEvent.js +0 -50
  218. package/es/utils/createEvent.js.map +0 -1
  219. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -40
  220. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -12
  221. package/styled-components/cjs/utils/createEvent.js +0 -53
  222. package/styled-components/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +0 -31
  223. package/styled-components/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +0 -5
  224. package/styled-components/es/utils/createEvent.js +0 -47
  225. package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.d.ts +0 -6
  226. package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.d.ts.map +0 -1
  227. package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.d.ts +0 -3
  228. package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.d.ts.map +0 -1
  229. package/types/utils/createEvent.d.ts +0 -3
  230. package/types/utils/createEvent.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
1
+ var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "hasPlaceholder", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
2
2
  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); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -28,6 +28,7 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
28
28
  view = _ref.view,
29
29
  size = _ref.size,
30
30
  labelPlacement = _ref.labelPlacement,
31
+ hasPlaceholder = _ref.hasPlaceholder,
31
32
  disabled = _ref.disabled,
32
33
  readOnly = _ref.readOnly,
33
34
  label = _ref.label,
@@ -147,6 +148,11 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
147
148
  "aria-activedescendant": "".concat(listId, "/").concat(focused),
148
149
  "aria-describedby": helperTextId,
149
150
  hintText: String(hintText || '')
151
+ }, labelPlacement === 'inner' ? {
152
+ labelPlacement: labelPlacement,
153
+ hasPlaceholder: hasPlaceholder
154
+ } : {
155
+ labelPlacement: labelPlacement
150
156
  }, rest)),
151
157
  preventOverflow: false,
152
158
  ref: targetRef,
@@ -1,6 +1,5 @@
1
- var _excluded = ["name", "multiple", "value", "onChange", "defaultValue", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
1
+ var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "hasPlaceholder", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
2
2
  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); }
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); }
4
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -9,7 +8,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
9
8
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
10
9
  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; }
11
10
  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; }
12
- import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef, useEffect } from 'react';
11
+ import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';
13
12
  import { safeUseId, useForkRef } from '@salutejs/plasma-core';
14
13
  import { isEmpty } from '../../../utils';
15
14
  import { useOutsideClick } from '../../../hooks';
@@ -24,21 +23,17 @@ import { getPathMap, getTreeMaps } from './hooks/getPathMaps';
24
23
  import { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';
25
24
  import { base as viewCSS } from './variations/_view/base';
26
25
  import { base as sizeCSS } from './variations/_size/base';
27
- import { SelectNative } from './ui/SelectNative/SelectNative';
28
26
  export var Context = /*#__PURE__*/createContext({});
29
27
 
30
28
  /**
31
29
  * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
32
30
  */
33
-
34
31
  export var comboboxRoot = function comboboxRoot(Root) {
35
32
  return /*#__PURE__*/forwardRef(function (props, ref) {
36
33
  var _valueToItemMap$get, _valueToItemMap$get2, _getItemByFocused;
37
- var name = props.name,
38
- multiple = props.multiple,
34
+ var multiple = props.multiple,
39
35
  outerValue = props.value,
40
36
  outerOnChange = props.onChange,
41
- defaultValue = props.defaultValue,
42
37
  isTargetAmount = props.isTargetAmount,
43
38
  targetAmount = props.targetAmount,
44
39
  items = props.items,
@@ -60,6 +55,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
60
55
  view = props.view,
61
56
  size = props.size,
62
57
  labelPlacement = props.labelPlacement,
58
+ hasPlaceholder = props.hasPlaceholder,
63
59
  _props$readOnly = props.readOnly,
64
60
  readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
65
61
  _props$disabled = props.disabled,
@@ -70,7 +66,6 @@ export var comboboxRoot = function comboboxRoot(Root) {
70
66
  outerCloseAfterSelect = props.closeAfterSelect,
71
67
  renderValue = props.renderValue,
72
68
  rest = _objectWithoutProperties(props, _excluded);
73
- console.log('render');
74
69
  var transformedItems = useMemo(function () {
75
70
  return initialItemsTransform(items || []);
76
71
  }, [items]);
@@ -146,27 +141,11 @@ export var comboboxRoot = function comboboxRoot(Root) {
146
141
  }
147
142
  }
148
143
  }, floatingPopoverRef);
149
-
150
- // Эта функция срабатывает при изменении Combobox и
151
- // при изменении нативного Select для формы (срабатывает только после изменения internalValue и рендера).
152
144
  var onChange = function onChange(newValue) {
153
- // Условие для отправки изменений наружу
154
145
  if (outerOnChange) {
155
- // Условие для отправки если комбобокс используется без формы.
156
- if (!name && (typeof newValue === 'string' || Array.isArray(newValue))) {
157
- outerOnChange(newValue);
158
- }
159
-
160
- // Условие для отправки если комбобокс используется с формой.
161
- if (name && _typeof(newValue) === 'object' && !Array.isArray(newValue)) {
162
- outerOnChange(newValue);
163
- }
164
- }
165
-
166
- // Условие для изменения внутреннего значения (только если newValue строка или массив строк).
167
- if (typeof newValue === 'string' || Array.isArray(newValue)) {
168
- setInternalValue(newValue);
146
+ outerOnChange(newValue);
169
147
  }
148
+ setInternalValue(newValue);
170
149
  };
171
150
  var handleClickArrow = function handleClickArrow() {
172
151
  if (disabled || readOnly) {
@@ -354,24 +333,13 @@ export var comboboxRoot = function comboboxRoot(Root) {
354
333
  // Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.
355
334
  // А переменную, содержащую сложные типы данных, нельзя помещать в deps.
356
335
  }, [outerValue, internalValue, items]);
357
- useEffect(function () {
358
- if (defaultValue) {
359
- setInternalValue(defaultValue);
360
- }
361
- }, [defaultValue]);
362
336
  return /*#__PURE__*/React.createElement(Root, {
363
337
  size: size,
364
338
  view: view,
365
339
  labelPlacement: labelPlacement,
366
340
  disabled: disabled,
367
341
  readOnly: readOnly
368
- }, name && /*#__PURE__*/React.createElement(SelectNative, {
369
- name: name,
370
- value: internalValue,
371
- multiple: multiple,
372
- onChange: onChange,
373
- ref: ref
374
- }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Context.Provider, {
342
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Context.Provider, {
375
343
  value: {
376
344
  focusedPath: focusedPath,
377
345
  checked: checked,
@@ -395,13 +363,12 @@ export var comboboxRoot = function comboboxRoot(Root) {
395
363
  listWidth: listWidth,
396
364
  target: function target(referenceRef) {
397
365
  return /*#__PURE__*/React.createElement(StyledTextField, _extends({
398
- ref: name ? inputRef : inputForkRef,
366
+ ref: inputForkRef,
399
367
  inputWrapperRef: referenceRef,
400
368
  value: textValue,
401
369
  onChange: handleTextValueChange,
402
370
  size: size,
403
371
  view: view,
404
- labelPlacement: labelPlacement,
405
372
  disabled: disabled,
406
373
  readOnly: readOnly,
407
374
  label: label,
@@ -424,6 +391,11 @@ export var comboboxRoot = function comboboxRoot(Root) {
424
391
  "aria-controls": "".concat(treeId, "_tree_level_1"),
425
392
  "aria-expanded": isCurrentListOpen,
426
393
  "aria-activedescendant": activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''
394
+ }, labelPlacement === 'inner' ? {
395
+ labelPlacement: labelPlacement,
396
+ hasPlaceholder: hasPlaceholder
397
+ } : {
398
+ labelPlacement: labelPlacement
427
399
  }, multiple ? {
428
400
  enumerationType: 'chip',
429
401
  chips: getChips(),
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "opened", "label", "labelPlacement", "placeholder", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "view", "size", "readOnly", "disabled", "name", "defaultDate", "valueError", "valueSuccess", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "frame", "usePortal", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onChangeValue", "onCommitDate", "onToggle", "onFocus", "onBlur", "onChange"];
1
+ var _excluded = ["className", "opened", "label", "labelPlacement", "hasPlaceholder", "placeholder", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "view", "size", "readOnly", "disabled", "name", "defaultDate", "valueError", "valueSuccess", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "frame", "usePortal", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onChangeValue", "onCommitDate", "onToggle", "onFocus", "onBlur", "onChange"];
2
2
  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); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -28,6 +28,7 @@ export var datePickerRoot = function datePickerRoot(Root) {
28
28
  label = _ref.label,
29
29
  _ref$labelPlacement = _ref.labelPlacement,
30
30
  labelPlacement = _ref$labelPlacement === void 0 ? 'outer' : _ref$labelPlacement,
31
+ hasPlaceholder = _ref.hasPlaceholder,
31
32
  placeholder = _ref.placeholder,
32
33
  leftHelper = _ref.leftHelper,
33
34
  contentLeft = _ref.contentLeft,
@@ -164,10 +165,14 @@ export var datePickerRoot = function datePickerRoot(Root) {
164
165
  },
165
166
  onFocus: onFocus,
166
167
  onBlur: onBlur,
167
- onKeyDown: onKeyDown
168
- }, innerLabelPlacement && {
169
- label: label,
168
+ onKeyDown: onKeyDown,
170
169
  labelPlacement: labelPlacement
170
+ }, labelPlacement === 'inner' ? {
171
+ label: label,
172
+ labelPlacement: labelPlacement,
173
+ hasPlaceholder: hasPlaceholder
174
+ } : {
175
+ labelPlacement: undefined
171
176
  }));
172
177
  useEffect(function () {
173
178
  setIsInnerOpen(function (prevOpen) {
@@ -10,9 +10,10 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
10
10
  multiselect = _ref.multiselect,
11
11
  value = _ref.value,
12
12
  label = _ref.label,
13
+ labelPlacement = _ref.labelPlacement,
14
+ hasPlaceholder = _ref.hasPlaceholder,
13
15
  placeholder = _ref.placeholder,
14
16
  onKeyDown = _ref.onKeyDown,
15
- labelPlacement = _ref.labelPlacement,
16
17
  size = _ref.size,
17
18
  view = _ref.view,
18
19
  handleClickArrow = _ref.handleClickArrow,
@@ -58,10 +59,16 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
58
59
  value: multiselect ? undefined : ((_valueToItemMap$get = valueToItemMap.get(value.toString())) === null || _valueToItemMap$get === void 0 ? void 0 : _valueToItemMap$get.label) || '',
59
60
  size: size,
60
61
  view: view,
61
- chipView: chipView,
62
+ chipView: chipView
63
+ }, labelPlacement === 'inner' ? {
64
+ label: label,
62
65
  labelPlacement: labelPlacement,
63
- disabled: disabled,
66
+ hasPlaceholder: hasPlaceholder
67
+ } : {
64
68
  label: label,
69
+ labelPlacement: labelPlacement
70
+ }, {
71
+ disabled: disabled,
65
72
  placeholder: value instanceof Array && value.length ? '' : placeholder,
66
73
  contentLeft: contentLeft,
67
74
  contentRight: /*#__PURE__*/React.createElement(IconArrowWrapper, {
@@ -1,4 +1,4 @@
1
- var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "textBefore", "textAfter", "placeholder", "leftHelper", "enumerationType", "requiredPlacement", "titleCaption", "hintTrigger", "hintText", "hintView", "hintSize", "hintTargetIcon", "hintPlacement", "hintHasArrow", "hintOffset", "hintWidth", "hintContentLeft", "view", "size", "readOnly", "disabled", "required", "clear", "optional", "hasDivider", "value", "chips", "onChange", "onChangeChips", "onSearch", "onKeyDown"];
1
+ var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "hasPlaceholder", "textBefore", "textAfter", "placeholder", "leftHelper", "enumerationType", "requiredPlacement", "titleCaption", "hintTrigger", "hintText", "hintView", "hintSize", "hintTargetIcon", "hintPlacement", "hintHasArrow", "hintOffset", "hintWidth", "hintContentLeft", "view", "size", "readOnly", "disabled", "required", "clear", "optional", "hasDivider", "value", "chips", "onChange", "onChangeChips", "onSearch", "onKeyDown"];
2
2
  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); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -39,6 +39,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
39
39
  contentRight = _ref.contentRight,
40
40
  label = _ref.label,
41
41
  labelPlacement = _ref.labelPlacement,
42
+ hasPlaceholder = _ref.hasPlaceholder,
42
43
  textBefore = _ref.textBefore,
43
44
  textAfter = _ref.textAfter,
44
45
  placeholder = _ref.placeholder,
@@ -114,10 +115,10 @@ export var textFieldRoot = function textFieldRoot(Root) {
114
115
  var hasLabelValue = Boolean(label);
115
116
  var hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;
116
117
  var hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;
117
- var hasPlaceholder = Boolean(placeholder) && !hasInnerLabel;
118
+ var innerHasPlaceholder = Boolean(placeholder) && (hasPlaceholder || !hasInnerLabel);
118
119
  var innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;
119
120
  var innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;
120
- var innerPlaceholderValue = hasPlaceholder ? placeholder : undefined;
121
+ var innerPlaceholderValue = innerHasPlaceholder ? placeholder : undefined;
121
122
  var placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;
122
123
  var clearClass = clear ? classes.clear : undefined;
123
124
  var hasDividerClass = hasDivider ? classes.hasDivider : undefined;
@@ -125,6 +126,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
125
126
  var requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;
126
127
  var labelPlacementClass = innerLabelPlacementValue ? classes["".concat(innerLabelPlacementValue, "LabelPlacement")] : undefined;
127
128
  var hasValueClass = hasValue ? classes.hasValue : undefined;
129
+ var hasPlaceholderClass = innerHasPlaceholder && placeholderShown && classes.forcePlaceholder;
128
130
  var wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;
129
131
  var wrapperWithoutRightContent = !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;
130
132
  var hintRef = useOutsideClick(function () {
@@ -333,7 +335,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
333
335
  "aria-labelledby": labelId,
334
336
  "aria-describedby": helperTextId,
335
337
  placeholder: innerPlaceholderValue,
336
- className: cx(hasValueClass),
338
+ className: cx(hasValueClass, hasPlaceholderClass),
337
339
  disabled: disabled,
338
340
  readOnly: !disabled && readOnly,
339
341
  onInput: handleInput,
@@ -342,7 +344,9 @@ export var textFieldRoot = function textFieldRoot(Root) {
342
344
  }, rest)), hasInnerLabel && /*#__PURE__*/React.createElement(Label, {
343
345
  id: labelId,
344
346
  htmlFor: innerId
345
- }, innerLabelValue, optionalTextNode), placeholderShown && !hasValue && /*#__PURE__*/React.createElement(InputPlaceholder, null, innerPlaceholderValue, hasPlaceholderOptional && optionalTextNode)), textAfter && /*#__PURE__*/React.createElement(StyledTextAfter, null, textAfter)), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, {
347
+ }, innerLabelValue, optionalTextNode), placeholderShown && !hasValue && /*#__PURE__*/React.createElement(InputPlaceholder, {
348
+ hasPadding: hasPlaceholder && size !== 'xs'
349
+ }, innerPlaceholderValue, hasPlaceholderOptional && optionalTextNode)), textAfter && /*#__PURE__*/React.createElement(StyledTextAfter, null, textAfter)), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, {
346
350
  id: helperTextId
347
351
  }, leftHelper));
348
352
  });
@@ -24,11 +24,14 @@ export var InputContainer = /*#__PURE__*/styled.div.withConfig({
24
24
  })(["position:relative;flex:1;min-width:60%;"]);
25
25
  export var InputPlaceholder = /*#__PURE__*/styled.div.withConfig({
26
26
  componentId: "plasma-new-hope__sc-g4vxbb-6"
27
- })(["position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;user-select:none;font:inherit;letter-spacing:inherit;line-height:inherit;color:var(", ");"], tokens.placeholderColor);
27
+ })(["position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;user-select:none;font:inherit;letter-spacing:inherit;line-height:inherit;color:var(", ");padding:", ";"], tokens.placeholderColor, function (_ref) {
28
+ var hasPadding = _ref.hasPadding;
29
+ return hasPadding ? "var(".concat(tokens.contentLabelInnerPadding, ")") : '0';
30
+ });
28
31
  export var OuterLabelWrapper = /*#__PURE__*/styled.div.withConfig({
29
32
  componentId: "plasma-new-hope__sc-g4vxbb-7"
30
- })(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref) {
31
- var isInnerLabel = _ref.isInnerLabel;
33
+ })(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref2) {
34
+ var isInnerLabel = _ref2.isInnerLabel;
32
35
  return isInnerLabel ? "var(".concat(tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(tokens.labelOffset, ")");
33
36
  });
34
37
  export var TitleCaption = /*#__PURE__*/styled.div.withConfig({
@@ -42,9 +45,9 @@ export var Label = /*#__PURE__*/styled.label.withConfig({
42
45
  })(["display:inline-flex;"]);
43
46
  export var StyledContentLeft = /*#__PURE__*/styled.div.withConfig({
44
47
  componentId: "plasma-new-hope__sc-g4vxbb-11"
45
- })(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (_ref2) {
46
- var isDefaultView = _ref2.isDefaultView,
47
- isClear = _ref2.isClear;
48
+ })(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (_ref3) {
49
+ var isDefaultView = _ref3.isDefaultView,
50
+ isClear = _ref3.isClear;
48
51
  return !isDefaultView && isClear ? "var(".concat(tokens.clearColor, ")") : "var(".concat(tokens.contentSlotColor, ")");
49
52
  });
50
53
  export var StyledContentRight = /*#__PURE__*/styled.div.withConfig({
@@ -1,6 +1,7 @@
1
1
  export var classes = {
2
2
  hasChips: 'has-chips',
3
3
  hasValue: 'has-value',
4
+ forcePlaceholder: 'force-placeholder',
4
5
  hasEmptyContentLeft: 'has-empty-content-left',
5
6
  hasEmptyContentRight: 'has-empty-content-right',
6
7
  innerLabelPlacement: 'label-placement-inner',
@@ -1,4 +1,4 @@
1
1
  import { css } from 'styled-components';
2
2
  import { classes, tokens } from '../../TextField.tokens';
3
3
  import { Input, InputContainer, Label, StyledTextAfter, StyledTextBefore } from '../../TextField.styles';
4
- export var base = /*#__PURE__*/css(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", "{color:var(", ");align-items:flex-start;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;height:var(", ");padding-top:calc(calc(var(", ") - var(", ")) / 2);padding-bottom:calc(calc(var(", ") - var(", ")) / 2);}&.", " ", "{color:var(", ");}}"], classes.outerLabelPlacement, Label, tokens.labelColor, classes.innerLabelPlacement, InputContainer, tokens.contentLabelInnerPadding, StyledTextAfter, StyledTextBefore, tokens.contentLabelInnerPadding, Input, Label, Input, classes.hasValue, Label, tokens.placeholderColor, tokens.labelInnerPadding, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight, Label, tokens.placeholderColor, tokens.height, tokens.height, tokens.labelLineHeight, tokens.height, tokens.labelLineHeight, classes.clear, Label, tokens.clearPlaceholderColor);
4
+ export var base = /*#__PURE__*/css(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", ",", ".", " ~ ", "{color:var(", ");align-items:flex-start;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;height:var(", ");padding-top:calc(calc(var(", ") - var(", ")) / 2);padding-bottom:calc(calc(var(", ") - var(", ")) / 2);}&.", " ", "{color:var(", ");}}"], classes.outerLabelPlacement, Label, tokens.labelColor, classes.innerLabelPlacement, InputContainer, tokens.contentLabelInnerPadding, StyledTextAfter, StyledTextBefore, tokens.contentLabelInnerPadding, Input, Label, Input, classes.hasValue, Label, Input, classes.forcePlaceholder, Label, tokens.placeholderColor, tokens.labelInnerPadding, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight, Label, tokens.placeholderColor, tokens.height, tokens.height, tokens.labelLineHeight, tokens.height, tokens.labelLineHeight, classes.clear, Label, tokens.clearPlaceholderColor);
@@ -353,11 +353,11 @@ const items = [
353
353
 
354
354
  const SingleStory = (args: StorySelectProps) => {
355
355
  const [value, setValue] = useState('');
356
+
356
357
  return (
357
358
  <div style={{ width: '400px' }}>
358
359
  <Combobox
359
360
  {...args}
360
- name="mau"
361
361
  items={items}
362
362
  value={value}
363
363
  onChange={setValue}
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
87
87
  type: 'inline-radio',
88
88
  },
89
89
  },
90
+ hasPlaceholder: {
91
+ control: {
92
+ type: 'boolean',
93
+ },
94
+ if: { arg: 'labelPlacement', eq: 'inner' },
95
+ },
90
96
  size: {
91
97
  options: sizes,
92
98
  control: {
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
210
216
  view: 'default',
211
217
  label: 'Лейбл',
212
218
  labelPlacement: 'outer',
219
+ hasPlaceholder: false,
213
220
  titleCaption: 'Подпись к полю',
214
221
  textBefore: '',
215
222
  textAfter: '',
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
87
87
  type: 'inline-radio',
88
88
  },
89
89
  },
90
+ hasPlaceholder: {
91
+ control: {
92
+ type: 'boolean',
93
+ },
94
+ if: { arg: 'labelPlacement', eq: 'inner' },
95
+ },
90
96
  size: {
91
97
  options: sizes,
92
98
  control: {
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
210
216
  view: 'default',
211
217
  label: 'Лейбл',
212
218
  labelPlacement: 'outer',
219
+ hasPlaceholder: false,
213
220
  titleCaption: 'Подпись к полю',
214
221
  textBefore: '',
215
222
  textAfter: '',
@@ -219,11 +226,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
219
226
  readOnly: false,
220
227
  enableContentLeft: true,
221
228
  enableContentRight: true,
222
- clear: false,
223
- hasDivider: false,
224
229
  optional: false,
225
230
  required: false,
226
231
  requiredPlacement: 'right',
232
+ clear: false,
233
+ hasDivider: false,
227
234
  hasHint: true,
228
235
  hintText: 'Текст подсказки',
229
236
  hintTrigger: 'hover',
@@ -5,7 +5,6 @@ export { IS_REACT_18, safeUseId } from './react';
5
5
  export { isNumber } from './isNumber';
6
6
  export { mergeRefs, setRefList } from './setRefList';
7
7
  export { isEmpty } from './isEmpty';
8
- export { createEvent } from './createEvent';
9
8
  import * as _constants from './constants';
10
9
  export { _constants as constants };
11
10
  export * from './getPopoverPlacement';
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAIhE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,sBAAsB,CAAC;AAGlF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,gBAAgB,EAAE,iBAAiB,CAAC,+FAuLhF,CAAC;AAEN,eAAO,MAAM,kBAAkB;;;mBAzLQ,UAAU,gBAAgB,EAAE,iBAAiB,CAAC;;;;;;;;;;;;CAwMpF,CAAC"}
1
+ {"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAIhE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,sBAAsB,CAAC;AAGlF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,gBAAgB,EAAE,iBAAiB,CAAC,+FA8LhF,CAAC;AAEN,eAAO,MAAM,kBAAkB;;;mBAhMQ,UAAU,gBAAgB,EAAE,iBAAiB,CAAC;;;;;;;;;;;;CA+MpF,CAAC"}