@salutejs/plasma-new-hope 0.196.1-dev.0 → 0.197.0-canary.1556.11973013493.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +18 -19
  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 +18 -19
  5. package/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -2
  6. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  7. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +18 -19
  8. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +18 -19
  9. package/cjs/components/DatePicker/RangeDate/RangeDate.css +18 -19
  10. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +18 -19
  11. package/cjs/components/DatePicker/SingleDate/SingleDate.css +18 -19
  12. package/cjs/components/DatePicker/SingleDate/SingleDate.js +7 -3
  13. package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  14. package/cjs/components/Pagination/Pagination.css +18 -19
  15. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +18 -19
  16. package/cjs/components/Range/Range.css +18 -19
  17. package/cjs/components/Select/Select.css +18 -19
  18. package/cjs/components/Select/ui/Inner/Inner.css +18 -19
  19. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +18 -19
  20. package/cjs/components/Select/ui/Target/Target.css +18 -19
  21. package/cjs/components/Select/ui/Target/Target.js +1 -2
  22. package/cjs/components/Select/ui/Target/Target.js.map +1 -1
  23. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +18 -19
  24. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +12 -7
  25. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  26. package/cjs/components/Slider/Slider.css +18 -19
  27. package/cjs/components/Slider/components/Double/Double.css +18 -19
  28. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +18 -19
  29. package/cjs/components/TextField/TextField.js +12 -11
  30. package/cjs/components/TextField/TextField.js.map +1 -1
  31. package/cjs/components/TextField/TextField.styles.js +20 -11
  32. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  33. package/cjs/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
  34. package/cjs/components/TextField/TextField.tokens.js +1 -0
  35. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  36. package/cjs/components/TextField/ui/Hint/Hint.css +20 -20
  37. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +1 -2
  38. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +3 -17
  39. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  40. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -7
  41. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  42. package/{es/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1yosnxc.css → cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css} +0 -1
  43. package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  44. package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -1
  45. package/cjs/components/TextField/variations/_label-placement/base_y1lvvc.css +1 -0
  46. package/cjs/index.css +18 -19
  47. package/emotion/cjs/components/Autocomplete/Autocomplete.js +7 -1
  48. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -2
  49. package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +7 -3
  50. package/emotion/cjs/components/Select/ui/Target/Target.js +1 -2
  51. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +12 -7
  52. package/emotion/cjs/components/TextField/TextField.js +13 -12
  53. package/emotion/cjs/components/TextField/TextField.styles.js +29 -26
  54. package/emotion/cjs/components/TextField/TextField.template-doc.mdx +3 -13
  55. package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
  56. package/emotion/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +3 -17
  57. package/emotion/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +3 -12
  58. package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  59. package/emotion/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +1 -8
  60. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -10
  61. package/emotion/cjs/examples/plasma_web/components/Select/Select.stories.tsx +1 -8
  62. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -12
  63. package/emotion/es/components/Autocomplete/Autocomplete.js +7 -1
  64. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +7 -2
  65. package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +7 -3
  66. package/emotion/es/components/Select/ui/Target/Target.js +1 -2
  67. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +12 -7
  68. package/emotion/es/components/TextField/TextField.js +13 -12
  69. package/emotion/es/components/TextField/TextField.styles.js +29 -26
  70. package/emotion/es/components/TextField/TextField.template-doc.mdx +3 -13
  71. package/emotion/es/components/TextField/TextField.tokens.js +1 -0
  72. package/emotion/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +4 -18
  73. package/emotion/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +2 -11
  74. package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
  75. package/emotion/es/examples/plasma_b2c/components/Select/Select.stories.tsx +1 -8
  76. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -10
  77. package/emotion/es/examples/plasma_web/components/Select/Select.stories.tsx +1 -8
  78. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -12
  79. package/es/components/Autocomplete/Autocomplete.css +18 -19
  80. package/es/components/Autocomplete/Autocomplete.js +7 -1
  81. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  82. package/es/components/Combobox/ComboboxNew/Combobox.css +18 -19
  83. package/es/components/Combobox/ComboboxNew/Combobox.js +7 -2
  84. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  85. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +18 -19
  86. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +18 -19
  87. package/es/components/DatePicker/RangeDate/RangeDate.css +18 -19
  88. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +18 -19
  89. package/es/components/DatePicker/SingleDate/SingleDate.css +18 -19
  90. package/es/components/DatePicker/SingleDate/SingleDate.js +7 -3
  91. package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  92. package/es/components/Pagination/Pagination.css +18 -19
  93. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +18 -19
  94. package/es/components/Range/Range.css +18 -19
  95. package/es/components/Select/Select.css +18 -19
  96. package/es/components/Select/ui/Inner/Inner.css +18 -19
  97. package/es/components/Select/ui/Inner/ui/Item/Item.css +18 -19
  98. package/es/components/Select/ui/Target/Target.css +18 -19
  99. package/es/components/Select/ui/Target/Target.js +1 -2
  100. package/es/components/Select/ui/Target/Target.js.map +1 -1
  101. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +18 -19
  102. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +12 -7
  103. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  104. package/es/components/Slider/Slider.css +18 -19
  105. package/es/components/Slider/components/Double/Double.css +18 -19
  106. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +18 -19
  107. package/es/components/TextField/TextField.js +12 -11
  108. package/es/components/TextField/TextField.js.map +1 -1
  109. package/es/components/TextField/TextField.styles.js +20 -11
  110. package/es/components/TextField/TextField.styles.js.map +1 -1
  111. package/es/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
  112. package/es/components/TextField/TextField.tokens.js +1 -0
  113. package/es/components/TextField/TextField.tokens.js.map +1 -1
  114. package/es/components/TextField/ui/Hint/Hint.css +20 -20
  115. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +1 -2
  116. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +4 -18
  117. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  118. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +2 -7
  119. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  120. package/{cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1yosnxc.css → es/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css} +0 -1
  121. package/es/components/TextField/variations/_label-placement/base.js +1 -1
  122. package/es/components/TextField/variations/_label-placement/base.js.map +1 -1
  123. package/es/components/TextField/variations/_label-placement/base_y1lvvc.css +1 -0
  124. package/es/index.css +18 -19
  125. package/package.json +2 -2
  126. package/styled-components/cjs/components/Autocomplete/Autocomplete.js +7 -1
  127. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -2
  128. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +7 -3
  129. package/styled-components/cjs/components/Select/ui/Target/Target.js +1 -2
  130. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +12 -7
  131. package/styled-components/cjs/components/TextField/TextField.js +12 -11
  132. package/styled-components/cjs/components/TextField/TextField.styles.js +9 -6
  133. package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +3 -13
  134. package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
  135. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +3 -17
  136. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +2 -10
  137. package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  138. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +1 -8
  139. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -10
  140. package/styled-components/cjs/examples/plasma_web/components/Select/Select.stories.tsx +1 -8
  141. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -12
  142. package/styled-components/es/components/Autocomplete/Autocomplete.js +7 -1
  143. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +7 -2
  144. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +7 -3
  145. package/styled-components/es/components/Select/ui/Target/Target.js +1 -2
  146. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +12 -7
  147. package/styled-components/es/components/TextField/TextField.js +12 -11
  148. package/styled-components/es/components/TextField/TextField.styles.js +9 -6
  149. package/styled-components/es/components/TextField/TextField.template-doc.mdx +3 -13
  150. package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
  151. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +4 -18
  152. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -9
  153. package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
  154. package/styled-components/es/examples/plasma_b2c/components/Select/Select.stories.tsx +1 -8
  155. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -10
  156. package/styled-components/es/examples/plasma_web/components/Select/Select.stories.tsx +1 -8
  157. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -12
  158. package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  159. package/types/components/Autocomplete/Autocomplete.types.d.ts +2 -3
  160. package/types/components/Autocomplete/Autocomplete.types.d.ts.map +1 -1
  161. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +709 -69
  162. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
  163. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  164. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +30 -10
  165. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  166. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +709 -69
  167. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
  168. package/types/components/DatePicker/SingleDate/SingleDate.d.ts +2 -2
  169. package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
  170. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +709 -69
  171. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
  172. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +28 -9
  173. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
  174. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +282 -20
  175. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
  176. package/types/components/Range/Range.styles.d.ts +709 -69
  177. package/types/components/Range/Range.styles.d.ts.map +1 -1
  178. package/types/components/Select/Select.types.d.ts +30 -15
  179. package/types/components/Select/Select.types.d.ts.map +1 -1
  180. package/types/components/Select/ui/Target/Target.d.ts +1 -1
  181. package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
  182. package/types/components/Select/ui/Target/Target.types.d.ts +1 -1
  183. package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
  184. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  185. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +709 -69
  186. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  187. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
  188. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
  189. package/types/components/Slider/components/Double/Double.styles.d.ts +709 -69
  190. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
  191. package/types/components/TextField/TextField.d.ts.map +1 -1
  192. package/types/components/TextField/TextField.styles.d.ts +3 -1
  193. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  194. package/types/components/TextField/TextField.tokens.d.ts +1 -0
  195. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  196. package/types/components/TextField/TextField.types.d.ts +42 -27
  197. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  198. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -1
  199. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts +0 -1
  200. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts.map +1 -1
  201. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts +1 -5
  202. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts.map +1 -1
  203. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts +5 -557
  204. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  205. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +1045 -133
  206. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  207. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +47 -1
  208. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
  209. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +1238 -70
  210. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
  211. package/types/examples/plasma_b2c/components/Select/Select.d.ts +282 -20
  212. package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
  213. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +709 -69
  214. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  215. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts +5 -557
  216. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  217. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +1045 -133
  218. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
  219. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +47 -1
  220. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
  221. package/types/examples/plasma_web/components/Mask/Mask.d.ts +1238 -70
  222. package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
  223. package/types/examples/plasma_web/components/Select/Select.d.ts +282 -20
  224. package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
  225. package/types/examples/plasma_web/components/TextField/TextField.d.ts +709 -69
  226. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  227. package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
  228. package/es/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
@@ -7,6 +7,7 @@ exports.tokens = exports.classes = void 0;
7
7
  var classes = exports.classes = {
8
8
  hasChips: 'has-chips',
9
9
  hasValue: 'has-value',
10
+ forcePlaceholder: 'force-placeholder',
10
11
  hasEmptyContentLeft: 'has-empty-content-left',
11
12
  hasEmptyContentRight: 'has-empty-content-right',
12
13
  innerLabelPlacement: 'label-placement-inner',
@@ -20,23 +20,14 @@ var TextFieldChip = exports.TextFieldChip = /*#__PURE__*/(0, _react.forwardRef)(
20
20
  onClick = _ref.onClick,
21
21
  onClear = _ref.onClear,
22
22
  onKeyDown = _ref.onKeyDown,
23
- _forceChipManipulationWithReadonly = _ref._forceChipManipulationWithReadonly,
24
- chipType = _ref.chipType;
23
+ _forceChipManipulationWithReadonly = _ref._forceChipManipulationWithReadonly;
25
24
  var onClearHandle = function onClearHandle() {
26
25
  return onClear(id);
27
26
  };
28
27
  var onKeyDownHandle = function onKeyDownHandle(event) {
29
28
  onKeyDown === null || onKeyDown === void 0 || onKeyDown(event, id);
30
29
  };
31
- var handleClick = function handleClick(e) {
32
- if (onClick) {
33
- onClick(e);
34
- }
35
- if (onClear) {
36
- onClear(id);
37
- }
38
- };
39
- return chipType === 'default' ? /*#__PURE__*/_react["default"].createElement(_TextFieldChip.StyledChip, {
30
+ return /*#__PURE__*/_react["default"].createElement(_TextFieldChip.StyledChip, {
40
31
  ref: ref,
41
32
  tabIndex: -1,
42
33
  disabled: disabled,
@@ -50,10 +41,5 @@ var TextFieldChip = exports.TextFieldChip = /*#__PURE__*/(0, _react.forwardRef)(
50
41
  // @ts-ignore
51
42
  ,
52
43
  _forceChipManipulationWithReadonly: _forceChipManipulationWithReadonly
53
- }) : /*#__PURE__*/_react["default"].createElement(_TextFieldChip.TextChip, {
54
- ref: ref,
55
- tabIndex: -1,
56
- onClick: handleClick,
57
- onKeyDown: onKeyDownHandle
58
- }, text);
44
+ });
59
45
  });
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TextChip = exports.StyledChip = void 0;
6
+ exports.StyledChip = void 0;
7
7
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
8
8
  var _Chip = /*#__PURE__*/require("../../../Chip");
9
9
  var _engines = /*#__PURE__*/require("../../../../engines");
@@ -22,12 +22,4 @@ var StyledChip = exports.StyledChip = /*#__PURE__*/(0, _styledComponents["defaul
22
22
  outlineSize: '0.0625rem',
23
23
  outlineRadius: /*#__PURE__*/"calc(var(".concat(_TextField.tokens.chipBorderRadius, ") - 0.1rem)"),
24
24
  outlineColor: /*#__PURE__*/"var(".concat(_TextField.tokens.focusColor, ")")
25
- }), _TextField.tokens.chipOpacityReadonly);
26
- var TextChip = exports.TextChip = /*#__PURE__*/_styledComponents["default"].button.withConfig({
27
- componentId: "plasma-new-hope__sc-1mypbcr-1"
28
- })(["display:block;flex:none;background:none;border:none;outline:none;padding:0;white-space:nowrap;cursor:pointer;font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");color:var(", ");", " &:after{content:',';}&:last-child{&:after{content:'';}}"], _TextField.tokens.fontFamily, _TextField.tokens.fontSize, _TextField.tokens.fontStyle, _TextField.tokens.fontWeight, _TextField.tokens.letterSpacing, _TextField.tokens.lineHeight, _TextField.tokens.color, /*#__PURE__*/(0, _mixins.addFocus)({
29
- outlineOffset: '0.0625rem',
30
- outlineSize: '0.0625rem',
31
- outlineRadius: /*#__PURE__*/"calc(var(".concat(_TextField.tokens.chipBorderRadius, ") - 0.1rem)"),
32
- outlineColor: /*#__PURE__*/"var(".concat(_TextField.tokens.focusColor, ")")
33
- }));
25
+ }), _TextField.tokens.chipOpacityReadonly);
@@ -7,4 +7,4 @@ exports.base = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("styled-components");
8
8
  var _TextField = /*#__PURE__*/require("../../TextField.tokens");
9
9
  var _TextField2 = /*#__PURE__*/require("../../TextField.styles");
10
- var base = exports.base = /*#__PURE__*/(0, _styledComponents.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(", ");}}"], _TextField.classes.outerLabelPlacement, _TextField2.Label, _TextField.tokens.labelColor, _TextField.classes.innerLabelPlacement, _TextField2.InputContainer, _TextField.tokens.contentLabelInnerPadding, _TextField2.StyledTextAfter, _TextField2.StyledTextBefore, _TextField.tokens.contentLabelInnerPadding, _TextField2.Input, _TextField2.Label, _TextField2.Input, _TextField.classes.hasValue, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.labelInnerPadding, _TextField.tokens.labelInnerFontFamily, _TextField.tokens.labelInnerFontSize, _TextField.tokens.labelInnerFontStyle, _TextField.tokens.labelInnerFontWeight, _TextField.tokens.labelInnerLetterSpacing, _TextField.tokens.labelInnerLineHeight, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.height, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.classes.clear, _TextField2.Label, _TextField.tokens.clearPlaceholderColor);
10
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.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(", ");}}"], _TextField.classes.outerLabelPlacement, _TextField2.Label, _TextField.tokens.labelColor, _TextField.classes.innerLabelPlacement, _TextField2.InputContainer, _TextField.tokens.contentLabelInnerPadding, _TextField2.StyledTextAfter, _TextField2.StyledTextBefore, _TextField.tokens.contentLabelInnerPadding, _TextField2.Input, _TextField2.Label, _TextField2.Input, _TextField.classes.hasValue, _TextField2.Label, _TextField2.Input, _TextField.classes.forcePlaceholder, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.labelInnerPadding, _TextField.tokens.labelInnerFontFamily, _TextField.tokens.labelInnerFontSize, _TextField.tokens.labelInnerFontStyle, _TextField.tokens.labelInnerFontWeight, _TextField.tokens.labelInnerLetterSpacing, _TextField.tokens.labelInnerLineHeight, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.height, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.classes.clear, _TextField2.Label, _TextField.tokens.clearPlaceholderColor);
@@ -104,11 +104,6 @@ const meta: Meta<StorySelectProps> = {
104
104
  },
105
105
  if: { arg: 'required', truthy: false },
106
106
  },
107
- chipType: {
108
- control: 'select',
109
- options: ['default', 'text'],
110
- if: { arg: 'target', eq: 'textfield-like' },
111
- },
112
107
  },
113
108
  args: {
114
109
  target: 'textfield-like',
@@ -126,7 +121,6 @@ const meta: Meta<StorySelectProps> = {
126
121
  optional: false,
127
122
  required: false,
128
123
  requiredPlacement: 'right',
129
- chipType: 'default',
130
124
  },
131
125
  parameters: {
132
126
  controls: {
@@ -150,7 +144,6 @@ const meta: Meta<StorySelectProps> = {
150
144
  'optional',
151
145
  'required',
152
146
  'requiredPlacement',
153
- 'chipType',
154
147
  ],
155
148
  },
156
149
  },
@@ -389,7 +382,7 @@ const SingleStory = (args: StorySelectProps) => {
389
382
  export const Single: StoryObj<StorySelectProps> = {
390
383
  parameters: {
391
384
  controls: {
392
- exclude: ['chipView', 'isTargetAmount', 'chipType'],
385
+ exclude: ['chipView', 'isTargetAmount'],
393
386
  },
394
387
  },
395
388
  render: (args) => <SingleStory {...args} />,
@@ -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: {
@@ -134,10 +140,6 @@ const meta: Meta<typeof TextField> = {
134
140
  control: { type: 'text' },
135
141
  if: { arg: 'hasHint', truthy: true },
136
142
  },
137
- chipType: {
138
- control: 'select',
139
- options: ['default', 'text'],
140
- },
141
143
  },
142
144
  };
143
145
 
@@ -214,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
214
216
  view: 'default',
215
217
  label: 'Лейбл',
216
218
  labelPlacement: 'outer',
219
+ hasPlaceholder: false,
217
220
  titleCaption: 'Подпись к полю',
218
221
  textBefore: '',
219
222
  textAfter: '',
@@ -237,11 +240,6 @@ export const Default: StoryObj<StoryPropsDefault> = {
237
240
  hintWidth: '10rem',
238
241
  hintHasArrow: true,
239
242
  },
240
- parameters: {
241
- controls: {
242
- exclude: ['chipType'],
243
- },
244
- },
245
243
  render: (args) => <StoryDemo {...args} />,
246
244
  };
247
245
 
@@ -297,7 +295,6 @@ export const Chips: StoryObj<StoryPropsChips> = {
297
295
  args: {
298
296
  ...Default.args,
299
297
  chips: ['1 value', '2 value', '3 value', '4 value'],
300
- chipType: 'default',
301
298
  },
302
299
  render: (args) => <StoryChips {...args} />,
303
300
  };
@@ -103,11 +103,6 @@ const meta: Meta<StorySelectProps> = {
103
103
  },
104
104
  if: { arg: 'required', truthy: false },
105
105
  },
106
- chipType: {
107
- control: 'select',
108
- options: ['default', 'text'],
109
- if: { arg: 'target', eq: 'textfield-like' },
110
- },
111
106
  },
112
107
  args: {
113
108
  target: 'textfield-like',
@@ -125,7 +120,6 @@ const meta: Meta<StorySelectProps> = {
125
120
  optional: false,
126
121
  required: false,
127
122
  requiredPlacement: 'right',
128
- chipType: 'default',
129
123
  },
130
124
  parameters: {
131
125
  controls: {
@@ -149,7 +143,6 @@ const meta: Meta<StorySelectProps> = {
149
143
  'optional',
150
144
  'required',
151
145
  'requiredPlacement',
152
- 'chipType',
153
146
  ],
154
147
  },
155
148
  },
@@ -388,7 +381,7 @@ const SingleStory = (args: StorySelectProps) => {
388
381
  export const Single: StoryObj<StorySelectProps> = {
389
382
  parameters: {
390
383
  controls: {
391
- exclude: ['chipView', 'isTargetAmount', 'chipType'],
384
+ exclude: ['chipView', 'isTargetAmount'],
392
385
  },
393
386
  },
394
387
  render: (args) => <SingleStory {...args} />,
@@ -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: {
@@ -134,10 +140,6 @@ const meta: Meta<typeof TextField> = {
134
140
  control: { type: 'text' },
135
141
  if: { arg: 'hasHint', truthy: true },
136
142
  },
137
- chipType: {
138
- control: 'select',
139
- options: ['default', 'text'],
140
- },
141
143
  },
142
144
  };
143
145
 
@@ -214,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
214
216
  view: 'default',
215
217
  label: 'Лейбл',
216
218
  labelPlacement: 'outer',
219
+ hasPlaceholder: false,
217
220
  titleCaption: 'Подпись к полю',
218
221
  textBefore: '',
219
222
  textAfter: '',
@@ -223,11 +226,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
223
226
  readOnly: false,
224
227
  enableContentLeft: true,
225
228
  enableContentRight: true,
226
- clear: false,
227
- hasDivider: false,
228
229
  optional: false,
229
230
  required: false,
230
231
  requiredPlacement: 'right',
232
+ clear: false,
233
+ hasDivider: false,
231
234
  hasHint: true,
232
235
  hintText: 'Текст подсказки',
233
236
  hintTrigger: 'hover',
@@ -237,11 +240,6 @@ export const Default: StoryObj<StoryPropsDefault> = {
237
240
  hintWidth: '10rem',
238
241
  hintHasArrow: true,
239
242
  },
240
- parameters: {
241
- controls: {
242
- exclude: ['chipType'],
243
- },
244
- },
245
243
  render: (args) => <StoryDemo {...args} />,
246
244
  };
247
245
 
@@ -297,7 +295,6 @@ export const Chips: StoryObj<StoryPropsChips> = {
297
295
  args: {
298
296
  ...Default.args,
299
297
  chips: ['1 value', '2 value', '3 value', '4 value'],
300
- chipType: 'default',
301
298
  },
302
299
  render: (args) => <StoryChips {...args} />,
303
300
  };
@@ -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,4 +1,4 @@
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", "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
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
4
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -59,6 +59,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
59
59
  view = props.view,
60
60
  size = props.size,
61
61
  labelPlacement = props.labelPlacement,
62
+ hasPlaceholder = props.hasPlaceholder,
62
63
  _props$readOnly = props.readOnly,
63
64
  readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
64
65
  _props$disabled = props.disabled,
@@ -386,7 +387,6 @@ export var comboboxRoot = function comboboxRoot(Root) {
386
387
  onChange: handleTextValueChange,
387
388
  size: size,
388
389
  view: view,
389
- labelPlacement: labelPlacement,
390
390
  disabled: disabled,
391
391
  readOnly: readOnly,
392
392
  label: label,
@@ -409,6 +409,11 @@ export var comboboxRoot = function comboboxRoot(Root) {
409
409
  "aria-controls": "".concat(treeId, "_tree_level_1"),
410
410
  "aria-expanded": isCurrentListOpen,
411
411
  "aria-activedescendant": activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''
412
+ }, labelPlacement === 'inner' ? {
413
+ labelPlacement: labelPlacement,
414
+ hasPlaceholder: hasPlaceholder
415
+ } : {
416
+ labelPlacement: labelPlacement
412
417
  }, multiple ? {
413
418
  enumerationType: 'chip',
414
419
  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,
@@ -165,9 +166,12 @@ export var datePickerRoot = function datePickerRoot(Root) {
165
166
  onFocus: onFocus,
166
167
  onBlur: onBlur,
167
168
  onKeyDown: onKeyDown
168
- }, innerLabelPlacement && {
169
+ }, labelPlacement === 'inner' ? {
169
170
  label: label,
170
- labelPlacement: labelPlacement
171
+ labelPlacement: labelPlacement,
172
+ hasPlaceholder: hasPlaceholder
173
+ } : {
174
+ labelPlacement: undefined
171
175
  }));
172
176
  useEffect(function () {
173
177
  setIsInnerOpen(function (prevOpen) {
@@ -73,7 +73,6 @@ export var Target = /*#__PURE__*/forwardRef(function (_ref, ref) {
73
73
  onChange: onChange,
74
74
  labelToItemMap: labelToItemMap,
75
75
  chipView: chipView,
76
- requiredProps: requiredProps,
77
- chipType: selectProps.chipType
76
+ requiredProps: requiredProps
78
77
  });
79
78
  });
@@ -16,9 +16,10 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
16
  multiselect = _ref.multiselect,
17
17
  value = _ref.value,
18
18
  label = _ref.label,
19
+ labelPlacement = _ref.labelPlacement,
20
+ hasPlaceholder = _ref.hasPlaceholder,
19
21
  placeholder = _ref.placeholder,
20
22
  onKeyDown = _ref.onKeyDown,
21
- labelPlacement = _ref.labelPlacement,
22
23
  size = _ref.size,
23
24
  view = _ref.view,
24
25
  handleClickArrow = _ref.handleClickArrow,
@@ -33,8 +34,7 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
33
34
  onChange = _ref.onChange,
34
35
  labelToItemMap = _ref.labelToItemMap,
35
36
  chipView = _ref.chipView,
36
- requiredProps = _ref.requiredProps,
37
- chipType = _ref.chipType;
37
+ requiredProps = _ref.requiredProps;
38
38
  var withArrowInverse = opened ? classes.arrowInverse : undefined;
39
39
  var getChips = function getChips() {
40
40
  if (multiselect && Array.isArray(value)) {
@@ -81,10 +81,16 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
81
81
  value: multiselect ? undefined : ((_valueToItemMap$get = valueToItemMap.get(value.toString())) === null || _valueToItemMap$get === void 0 ? void 0 : _valueToItemMap$get.label) || '',
82
82
  size: size,
83
83
  view: view,
84
- chipView: chipView,
84
+ chipView: chipView
85
+ }, labelPlacement === 'inner' ? {
86
+ label: label,
85
87
  labelPlacement: labelPlacement,
86
- disabled: disabled,
88
+ hasPlaceholder: hasPlaceholder
89
+ } : {
87
90
  label: label,
91
+ labelPlacement: labelPlacement
92
+ }, {
93
+ disabled: disabled,
88
94
  placeholder: value instanceof Array && value.length ? '' : placeholder,
89
95
  contentLeft: contentLeft,
90
96
  contentRight: /*#__PURE__*/React.createElement(IconArrowWrapper, {
@@ -105,8 +111,7 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
105
111
  }, multiselect ? {
106
112
  enumerationType: 'chip',
107
113
  chips: getChips(),
108
- onChangeChips: handleChipsChange,
109
- chipType: chipType
114
+ onChangeChips: handleChipsChange
110
115
  } : {
111
116
  enumerationType: 'plain'
112
117
  }, {
@@ -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", "chipType", "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,
@@ -77,8 +78,6 @@ export var textFieldRoot = function textFieldRoot(Root) {
77
78
  hasDivider = _ref.hasDivider,
78
79
  outerValue = _ref.value,
79
80
  values = _ref.chips,
80
- _ref$chipType = _ref.chipType,
81
- chipType = _ref$chipType === void 0 ? 'default' : _ref$chipType,
82
81
  onChange = _ref.onChange,
83
82
  onChangeChips = _ref.onChangeChips,
84
83
  onSearch = _ref.onSearch,
@@ -116,10 +115,10 @@ export var textFieldRoot = function textFieldRoot(Root) {
116
115
  var hasLabelValue = Boolean(label);
117
116
  var hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;
118
117
  var hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;
119
- var hasPlaceholder = Boolean(placeholder) && !hasInnerLabel;
118
+ var innerHasPlaceholder = Boolean(placeholder) && (hasPlaceholder || !hasInnerLabel);
120
119
  var innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;
121
120
  var innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;
122
- var innerPlaceholderValue = hasPlaceholder ? placeholder : undefined;
121
+ var innerPlaceholderValue = innerHasPlaceholder ? placeholder : undefined;
123
122
  var placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;
124
123
  var clearClass = clear ? classes.clear : undefined;
125
124
  var hasDividerClass = hasDivider ? classes.hasDivider : undefined;
@@ -127,8 +126,9 @@ export var textFieldRoot = function textFieldRoot(Root) {
127
126
  var requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;
128
127
  var labelPlacementClass = innerLabelPlacementValue ? classes["".concat(innerLabelPlacementValue, "LabelPlacement")] : undefined;
129
128
  var hasValueClass = hasValue ? classes.hasValue : undefined;
130
- var wrapperWithoutLeftContent = !contentLeft && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentLeft : undefined;
131
- var wrapperWithoutRightContent = !contentRight && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentRight : undefined;
129
+ var hasPlaceholderClass = innerHasPlaceholder && placeholderShown && classes.forcePlaceholder;
130
+ var wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;
131
+ var wrapperWithoutRightContent = !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;
132
132
  var hintRef = useOutsideClick(function () {
133
133
  setIsHintVisible(false);
134
134
  });
@@ -319,8 +319,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
319
319
  onClear: function onClear() {
320
320
  return onChipClear(chipId, index);
321
321
  },
322
- onClick: onChipClick,
323
- chipType: chipType
322
+ onClick: onChipClick
324
323
  // TODO: #1547
325
324
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
326
325
  // @ts-ignore
@@ -336,7 +335,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
336
335
  "aria-labelledby": labelId,
337
336
  "aria-describedby": helperTextId,
338
337
  placeholder: innerPlaceholderValue,
339
- className: cx(hasValueClass),
338
+ className: cx(hasValueClass, hasPlaceholderClass),
340
339
  disabled: disabled,
341
340
  readOnly: !disabled && readOnly,
342
341
  onInput: handleInput,
@@ -345,7 +344,9 @@ export var textFieldRoot = function textFieldRoot(Root) {
345
344
  }, rest)), hasInnerLabel && /*#__PURE__*/React.createElement(Label, {
346
345
  id: labelId,
347
346
  htmlFor: innerId
348
- }, 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, {
349
350
  id: helperTextId
350
351
  }, leftHelper));
351
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({
@@ -62,7 +62,7 @@ export function App() {
62
62
  ```
63
63
 
64
64
  ### Статус поля
65
- Статус поля задается с помощью свойства `status`.
65
+ Статус поля задается с помощью свойства `status`.
66
66
  Возможные значения свойства: `success`, `warning` и `error`.
67
67
  На отображение TextField так же влияют свойства `clear` и `hasDivider`:
68
68
 
@@ -150,7 +150,7 @@ export function App() {
150
150
  ```
151
151
 
152
152
  ### Режим ввода
153
- С помощью свойства `enumerationType` можно вводить элементы как теги. Свойство `chipType` изменяет внешний вид чипа.
153
+ С помощью свойства `enumerationType` можно вводить элементы как теги.
154
154
  По нажатию Enter, после ввода нужного текста, он преобразуется в Chip:
155
155
 
156
156
  ```tsx live
@@ -166,17 +166,7 @@ export function App() {
166
166
  size="l"
167
167
  enumerationType="chip"
168
168
  helperText="Подсказка снизу"
169
- chips={["Значение 1"]}
170
- />
171
-
172
- <TextField
173
- placeholder="Введите значение"
174
- defaultValue="Значение"
175
- size="l"
176
- enumerationType="chip"
177
- helperText="Подсказка снизу"
178
- chips={["Значение 1"]}
179
- chipType="text"
169
+ values={["Значение 1"]}
180
170
  />
181
171
  </div>
182
172
  );
@@ -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,5 +1,5 @@
1
1
  import React, { forwardRef } from 'react';
2
- import { StyledChip, TextChip } from './TextFieldChip.styles';
2
+ import { StyledChip } from './TextFieldChip.styles';
3
3
  /**
4
4
  * Чип, отображающий выбранный элемент
5
5
  */
@@ -11,23 +11,14 @@ export var TextFieldChip = /*#__PURE__*/forwardRef(function (_ref, ref) {
11
11
  onClick = _ref.onClick,
12
12
  onClear = _ref.onClear,
13
13
  onKeyDown = _ref.onKeyDown,
14
- _forceChipManipulationWithReadonly = _ref._forceChipManipulationWithReadonly,
15
- chipType = _ref.chipType;
14
+ _forceChipManipulationWithReadonly = _ref._forceChipManipulationWithReadonly;
16
15
  var onClearHandle = function onClearHandle() {
17
16
  return onClear(id);
18
17
  };
19
18
  var onKeyDownHandle = function onKeyDownHandle(event) {
20
19
  onKeyDown === null || onKeyDown === void 0 || onKeyDown(event, id);
21
20
  };
22
- var handleClick = function handleClick(e) {
23
- if (onClick) {
24
- onClick(e);
25
- }
26
- if (onClear) {
27
- onClear(id);
28
- }
29
- };
30
- return chipType === 'default' ? /*#__PURE__*/React.createElement(StyledChip, {
21
+ return /*#__PURE__*/React.createElement(StyledChip, {
31
22
  ref: ref,
32
23
  tabIndex: -1,
33
24
  disabled: disabled,
@@ -41,10 +32,5 @@ export var TextFieldChip = /*#__PURE__*/forwardRef(function (_ref, ref) {
41
32
  // @ts-ignore
42
33
  ,
43
34
  _forceChipManipulationWithReadonly: _forceChipManipulationWithReadonly
44
- }) : /*#__PURE__*/React.createElement(TextChip, {
45
- ref: ref,
46
- tabIndex: -1,
47
- onClick: handleClick,
48
- onKeyDown: onKeyDownHandle
49
- }, text);
35
+ });
50
36
  });