@salutejs/plasma-new-hope 0.193.0-canary.1556.11815100174.0 → 0.193.0-canary.1559.11815272061.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +17 -17
  2. package/cjs/components/Autocomplete/Autocomplete.js +1 -7
  3. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  4. package/cjs/components/Combobox/ComboboxNew/Combobox.css +17 -17
  5. package/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -7
  6. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  7. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
  8. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
  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 +4 -9
  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/Slider/Slider.css +17 -17
  23. package/cjs/components/Slider/components/Double/Double.css +17 -17
  24. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
  25. package/cjs/components/TextField/TextField.js +4 -8
  26. package/cjs/components/TextField/TextField.js.map +1 -1
  27. package/cjs/components/TextField/TextField.styles.js +11 -20
  28. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  29. package/cjs/components/TextField/{TextField.styles_ppcxpx.css → TextField.styles_j7dqpn.css} +1 -1
  30. package/cjs/components/TextField/TextField.tokens.js +0 -1
  31. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  32. package/cjs/components/TextField/ui/Hint/Hint.css +20 -20
  33. package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  34. package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -1
  35. package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +1 -0
  36. package/cjs/index.css +17 -17
  37. package/emotion/cjs/components/Autocomplete/Autocomplete.js +1 -7
  38. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -7
  39. package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +4 -9
  40. package/emotion/cjs/components/TextField/TextField.js +5 -9
  41. package/emotion/cjs/components/TextField/TextField.styles.js +26 -29
  42. package/emotion/cjs/components/TextField/TextField.tokens.js +0 -1
  43. package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  44. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -7
  45. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +2 -9
  46. package/emotion/es/components/Autocomplete/Autocomplete.js +1 -7
  47. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +2 -7
  48. package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +4 -9
  49. package/emotion/es/components/TextField/TextField.js +5 -9
  50. package/emotion/es/components/TextField/TextField.styles.js +26 -29
  51. package/emotion/es/components/TextField/TextField.tokens.js +0 -1
  52. package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
  53. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -7
  54. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +2 -9
  55. package/es/components/Autocomplete/Autocomplete.css +17 -17
  56. package/es/components/Autocomplete/Autocomplete.js +1 -7
  57. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  58. package/es/components/Combobox/ComboboxNew/Combobox.css +17 -17
  59. package/es/components/Combobox/ComboboxNew/Combobox.js +2 -7
  60. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  61. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
  62. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
  63. package/es/components/DatePicker/RangeDate/RangeDate.css +17 -17
  64. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
  65. package/es/components/DatePicker/SingleDate/SingleDate.css +17 -17
  66. package/es/components/DatePicker/SingleDate/SingleDate.js +4 -9
  67. package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  68. package/es/components/Pagination/Pagination.css +17 -17
  69. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
  70. package/es/components/Range/Range.css +17 -17
  71. package/es/components/Select/Select.css +17 -17
  72. package/es/components/Select/ui/Inner/Inner.css +17 -17
  73. package/es/components/Select/ui/Inner/ui/Item/Item.css +17 -17
  74. package/es/components/Select/ui/Target/Target.css +17 -17
  75. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
  76. package/es/components/Slider/Slider.css +17 -17
  77. package/es/components/Slider/components/Double/Double.css +17 -17
  78. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
  79. package/es/components/TextField/TextField.js +4 -8
  80. package/es/components/TextField/TextField.js.map +1 -1
  81. package/es/components/TextField/TextField.styles.js +11 -20
  82. package/es/components/TextField/TextField.styles.js.map +1 -1
  83. package/es/components/TextField/{TextField.styles_ppcxpx.css → TextField.styles_j7dqpn.css} +1 -1
  84. package/es/components/TextField/TextField.tokens.js +0 -1
  85. package/es/components/TextField/TextField.tokens.js.map +1 -1
  86. package/es/components/TextField/ui/Hint/Hint.css +20 -20
  87. package/es/components/TextField/variations/_label-placement/base.js +1 -1
  88. package/es/components/TextField/variations/_label-placement/base.js.map +1 -1
  89. package/es/components/TextField/variations/_label-placement/base_gttvto.css +1 -0
  90. package/es/index.css +17 -17
  91. package/package.json +5 -5
  92. package/styled-components/cjs/components/Autocomplete/Autocomplete.js +1 -7
  93. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -7
  94. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +4 -9
  95. package/styled-components/cjs/components/TextField/TextField.js +4 -8
  96. package/styled-components/cjs/components/TextField/TextField.styles.js +6 -9
  97. package/styled-components/cjs/components/TextField/TextField.tokens.js +0 -1
  98. package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  99. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -7
  100. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +2 -9
  101. package/styled-components/es/components/Autocomplete/Autocomplete.js +1 -7
  102. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +2 -7
  103. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +4 -9
  104. package/styled-components/es/components/TextField/TextField.js +4 -8
  105. package/styled-components/es/components/TextField/TextField.styles.js +6 -9
  106. package/styled-components/es/components/TextField/TextField.tokens.js +0 -1
  107. package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
  108. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +0 -7
  109. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +2 -9
  110. package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  111. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +59 -715
  112. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
  113. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  114. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +10 -30
  115. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  116. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +59 -715
  117. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
  118. package/types/components/DatePicker/SingleDate/SingleDate.d.ts +2 -2
  119. package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
  120. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +59 -715
  121. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
  122. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +9 -28
  123. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
  124. package/types/components/Range/Range.styles.d.ts +59 -715
  125. package/types/components/Range/Range.styles.d.ts.map +1 -1
  126. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +59 -715
  127. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  128. package/types/components/Slider/components/Double/Double.styles.d.ts +59 -715
  129. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
  130. package/types/components/TextField/TextField.d.ts.map +1 -1
  131. package/types/components/TextField/TextField.styles.d.ts +1 -3
  132. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  133. package/types/components/TextField/TextField.tokens.d.ts +0 -1
  134. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  135. package/types/components/TextField/TextField.types.d.ts +20 -43
  136. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  137. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts +4 -2
  138. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  139. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +110 -1022
  140. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  141. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +1 -47
  142. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
  143. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +62 -1246
  144. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
  145. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +59 -715
  146. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  147. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts +4 -2
  148. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  149. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +110 -1022
  150. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
  151. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +1 -47
  152. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
  153. package/types/examples/plasma_web/components/Mask/Mask.d.ts +62 -1246
  154. package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
  155. package/types/examples/plasma_web/components/TextField/TextField.d.ts +59 -715
  156. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  157. package/cjs/components/TextField/variations/_label-placement/base_y1lvvc.css +0 -1
  158. package/es/components/TextField/variations/_label-placement/base_y1lvvc.css +0 -1
@@ -87,12 +87,6 @@ const meta: Meta<typeof TextField> = {
87
87
  type: 'inline-radio',
88
88
  },
89
89
  },
90
- hasInnerLabelPlaceholder: {
91
- control: {
92
- type: 'boolean',
93
- },
94
- if: { arg: 'labelPlacement', equal: 'inner' },
95
- },
96
90
  size: {
97
91
  options: sizes,
98
92
  control: {
@@ -216,7 +210,6 @@ export const Default: StoryObj<StoryPropsDefault> = {
216
210
  view: 'default',
217
211
  label: 'Лейбл',
218
212
  labelPlacement: 'outer',
219
- hasInnerLabelPlaceholder: false,
220
213
  titleCaption: 'Подпись к полю',
221
214
  textBefore: '',
222
215
  textAfter: '',
@@ -226,11 +219,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
226
219
  readOnly: false,
227
220
  enableContentLeft: true,
228
221
  enableContentRight: true,
222
+ clear: false,
223
+ hasDivider: false,
229
224
  optional: false,
230
225
  required: false,
231
226
  requiredPlacement: 'right',
232
- clear: false,
233
- hasDivider: false,
234
227
  hasHint: true,
235
228
  hintText: 'Текст подсказки',
236
229
  hintTrigger: 'hover',
@@ -1,4 +1,4 @@
1
- var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "hasInnerLabelPlaceholder", "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", "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,7 +28,6 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
28
28
  view = _ref.view,
29
29
  size = _ref.size,
30
30
  labelPlacement = _ref.labelPlacement,
31
- hasInnerLabelPlaceholder = _ref.hasInnerLabelPlaceholder,
32
31
  disabled = _ref.disabled,
33
32
  readOnly = _ref.readOnly,
34
33
  label = _ref.label,
@@ -148,11 +147,6 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
148
147
  "aria-activedescendant": "".concat(listId, "/").concat(focused),
149
148
  "aria-describedby": helperTextId,
150
149
  hintText: String(hintText || '')
151
- }, labelPlacement === 'inner' ? {
152
- labelPlacement: labelPlacement,
153
- hasInnerLabelPlaceholder: hasInnerLabelPlaceholder
154
- } : {
155
- labelPlacement: labelPlacement
156
150
  }, rest)),
157
151
  preventOverflow: false,
158
152
  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", "hasInnerLabelPlaceholder", "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", "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 _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."); }
@@ -55,7 +55,6 @@ export var comboboxRoot = function comboboxRoot(Root) {
55
55
  view = props.view,
56
56
  size = props.size,
57
57
  labelPlacement = props.labelPlacement,
58
- hasInnerLabelPlaceholder = props.hasInnerLabelPlaceholder,
59
58
  _props$readOnly = props.readOnly,
60
59
  readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
61
60
  _props$disabled = props.disabled,
@@ -369,6 +368,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
369
368
  onChange: handleTextValueChange,
370
369
  size: size,
371
370
  view: view,
371
+ labelPlacement: labelPlacement,
372
372
  disabled: disabled,
373
373
  readOnly: readOnly,
374
374
  label: label,
@@ -391,11 +391,6 @@ export var comboboxRoot = function comboboxRoot(Root) {
391
391
  "aria-controls": "".concat(treeId, "_tree_level_1"),
392
392
  "aria-expanded": isCurrentListOpen,
393
393
  "aria-activedescendant": activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''
394
- }, labelPlacement === 'inner' ? {
395
- labelPlacement: labelPlacement,
396
- hasInnerLabelPlaceholder: hasInnerLabelPlaceholder
397
- } : {
398
- labelPlacement: labelPlacement
399
394
  }, multiple ? {
400
395
  enumerationType: 'chip',
401
396
  chips: getChips(),
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "opened", "label", "labelPlacement", "hasInnerLabelPlaceholder", "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", "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,7 +28,6 @@ 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
- hasInnerLabelPlaceholder = _ref.hasInnerLabelPlaceholder,
32
31
  placeholder = _ref.placeholder,
33
32
  leftHelper = _ref.leftHelper,
34
33
  contentLeft = _ref.contentLeft,
@@ -165,14 +164,10 @@ export var datePickerRoot = function datePickerRoot(Root) {
165
164
  },
166
165
  onFocus: onFocus,
167
166
  onBlur: onBlur,
168
- onKeyDown: onKeyDown,
169
- labelPlacement: labelPlacement
170
- }, labelPlacement === 'inner' ? {
167
+ onKeyDown: onKeyDown
168
+ }, innerLabelPlacement && {
171
169
  label: label,
172
- labelPlacement: labelPlacement,
173
- hasInnerLabelPlaceholder: hasInnerLabelPlaceholder
174
- } : {
175
- labelPlacement: undefined
170
+ labelPlacement: labelPlacement
176
171
  }));
177
172
  useEffect(function () {
178
173
  setIsInnerOpen(function (prevOpen) {
@@ -1,4 +1,4 @@
1
- var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "hasInnerLabelPlaceholder", "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", "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,7 +39,6 @@ export var textFieldRoot = function textFieldRoot(Root) {
39
39
  contentRight = _ref.contentRight,
40
40
  label = _ref.label,
41
41
  labelPlacement = _ref.labelPlacement,
42
- hasInnerLabelPlaceholder = _ref.hasInnerLabelPlaceholder,
43
42
  textBefore = _ref.textBefore,
44
43
  textAfter = _ref.textAfter,
45
44
  placeholder = _ref.placeholder,
@@ -115,7 +114,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
115
114
  var hasLabelValue = Boolean(label);
116
115
  var hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;
117
116
  var hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;
118
- var hasPlaceholder = Boolean(placeholder) && (hasInnerLabelPlaceholder || !hasInnerLabel);
117
+ var hasPlaceholder = Boolean(placeholder) && !hasInnerLabel;
119
118
  var innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;
120
119
  var innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;
121
120
  var innerPlaceholderValue = hasPlaceholder ? placeholder : undefined;
@@ -126,7 +125,6 @@ export var textFieldRoot = function textFieldRoot(Root) {
126
125
  var requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;
127
126
  var labelPlacementClass = innerLabelPlacementValue ? classes["".concat(innerLabelPlacementValue, "LabelPlacement")] : undefined;
128
127
  var hasValueClass = hasValue ? classes.hasValue : undefined;
129
- var hasInnerLabelPlaceholderClass = hasInnerLabelPlaceholder && placeholderShown && classes.forcePlaceholder;
130
128
  var wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;
131
129
  var wrapperWithoutRightContent = !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;
132
130
  var hintRef = useOutsideClick(function () {
@@ -335,7 +333,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
335
333
  "aria-labelledby": labelId,
336
334
  "aria-describedby": helperTextId,
337
335
  placeholder: innerPlaceholderValue,
338
- className: cx(hasValueClass, hasInnerLabelPlaceholderClass),
336
+ className: cx(hasValueClass),
339
337
  disabled: disabled,
340
338
  readOnly: !disabled && readOnly,
341
339
  onInput: handleInput,
@@ -344,9 +342,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
344
342
  }, rest)), hasInnerLabel && /*#__PURE__*/React.createElement(Label, {
345
343
  id: labelId,
346
344
  htmlFor: innerId
347
- }, innerLabelValue, optionalTextNode), placeholderShown && !hasValue && /*#__PURE__*/React.createElement(InputPlaceholder, {
348
- hasInnerLabelPlaceholder: hasInnerLabelPlaceholder
349
- }, innerPlaceholderValue, hasPlaceholderOptional && optionalTextNode)), textAfter && /*#__PURE__*/React.createElement(StyledTextAfter, null, textAfter)), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, {
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, {
350
346
  id: helperTextId
351
347
  }, leftHelper));
352
348
  });
@@ -24,14 +24,11 @@ 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(", ");padding:", ";"], tokens.placeholderColor, function (_ref) {
28
- var hasInnerLabelPlaceholder = _ref.hasInnerLabelPlaceholder;
29
- return hasInnerLabelPlaceholder ? "var(".concat(tokens.contentLabelInnerPadding, ")") : '0';
30
- });
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);
31
28
  export var OuterLabelWrapper = /*#__PURE__*/styled.div.withConfig({
32
29
  componentId: "plasma-new-hope__sc-g4vxbb-7"
33
- })(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref2) {
34
- var isInnerLabel = _ref2.isInnerLabel;
30
+ })(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref) {
31
+ var isInnerLabel = _ref.isInnerLabel;
35
32
  return isInnerLabel ? "var(".concat(tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(tokens.labelOffset, ")");
36
33
  });
37
34
  export var TitleCaption = /*#__PURE__*/styled.div.withConfig({
@@ -45,9 +42,9 @@ export var Label = /*#__PURE__*/styled.label.withConfig({
45
42
  })(["display:inline-flex;"]);
46
43
  export var StyledContentLeft = /*#__PURE__*/styled.div.withConfig({
47
44
  componentId: "plasma-new-hope__sc-g4vxbb-11"
48
- })(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (_ref3) {
49
- var isDefaultView = _ref3.isDefaultView,
50
- isClear = _ref3.isClear;
45
+ })(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (_ref2) {
46
+ var isDefaultView = _ref2.isDefaultView,
47
+ isClear = _ref2.isClear;
51
48
  return !isDefaultView && isClear ? "var(".concat(tokens.clearColor, ")") : "var(".concat(tokens.contentSlotColor, ")");
52
49
  });
53
50
  export var StyledContentRight = /*#__PURE__*/styled.div.withConfig({
@@ -1,7 +1,6 @@
1
1
  export var classes = {
2
2
  hasChips: 'has-chips',
3
3
  hasValue: 'has-value',
4
- forcePlaceholder: 'force-placeholder',
5
4
  hasEmptyContentLeft: 'has-empty-content-left',
6
5
  hasEmptyContentRight: 'has-empty-content-right',
7
6
  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, 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);
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);
@@ -87,12 +87,6 @@ const meta: Meta<typeof TextField> = {
87
87
  type: 'inline-radio',
88
88
  },
89
89
  },
90
- hasInnerLabelPlaceholder: {
91
- control: {
92
- type: 'boolean',
93
- },
94
- if: { arg: 'labelPlacement', equal: 'inner' },
95
- },
96
90
  size: {
97
91
  options: sizes,
98
92
  control: {
@@ -216,7 +210,6 @@ export const Default: StoryObj<StoryPropsDefault> = {
216
210
  view: 'default',
217
211
  label: 'Лейбл',
218
212
  labelPlacement: 'outer',
219
- hasInnerLabelPlaceholder: false,
220
213
  titleCaption: 'Подпись к полю',
221
214
  textBefore: '',
222
215
  textAfter: '',
@@ -87,12 +87,6 @@ const meta: Meta<typeof TextField> = {
87
87
  type: 'inline-radio',
88
88
  },
89
89
  },
90
- hasInnerLabelPlaceholder: {
91
- control: {
92
- type: 'boolean',
93
- },
94
- if: { arg: 'labelPlacement', equal: 'inner' },
95
- },
96
90
  size: {
97
91
  options: sizes,
98
92
  control: {
@@ -216,7 +210,6 @@ export const Default: StoryObj<StoryPropsDefault> = {
216
210
  view: 'default',
217
211
  label: 'Лейбл',
218
212
  labelPlacement: 'outer',
219
- hasInnerLabelPlaceholder: false,
220
213
  titleCaption: 'Подпись к полю',
221
214
  textBefore: '',
222
215
  textAfter: '',
@@ -226,11 +219,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
226
219
  readOnly: false,
227
220
  enableContentLeft: true,
228
221
  enableContentRight: true,
222
+ clear: false,
223
+ hasDivider: false,
229
224
  optional: false,
230
225
  required: false,
231
226
  requiredPlacement: 'right',
232
- clear: false,
233
- hasDivider: false,
234
227
  hasHint: true,
235
228
  hintText: 'Текст подсказки',
236
229
  hintTrigger: 'hover',
@@ -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,+FA8LhF,CAAC;AAEN,eAAO,MAAM,kBAAkB;;;mBAhMQ,UAAU,gBAAgB,EAAE,iBAAiB,CAAC;;;;;;;;;;;;CA+MpF,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,+FAuLhF,CAAC;AAEN,eAAO,MAAM,kBAAkB;;;mBAzLQ,UAAU,gBAAgB,EAAE,iBAAiB,CAAC;;;;;;;;;;;;CAwMpF,CAAC"}