@salutejs/plasma-new-hope 0.81.0-canary.1205.9092167838.0 → 0.81.0-canary.1208.9111977682.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. package/cjs/components/Range/Range.css +63 -0
  2. package/cjs/components/Range/Range.js +146 -0
  3. package/cjs/components/Range/Range.js.map +1 -0
  4. package/cjs/components/Range/Range.styles.js +63 -0
  5. package/cjs/components/Range/Range.styles.js.map +1 -0
  6. package/cjs/components/Range/Range.styles_mc4w65.css +8 -0
  7. package/cjs/components/Range/Range.tokens.js +105 -0
  8. package/cjs/components/Range/Range.tokens.js.map +1 -0
  9. package/cjs/components/Range/utils/index.js +24 -0
  10. package/cjs/components/Range/utils/index.js.map +1 -0
  11. package/cjs/components/Range/variations/_disabled/base.js +9 -0
  12. package/cjs/components/Range/variations/_disabled/base.js.map +1 -0
  13. package/cjs/components/Range/variations/_disabled/base_1ufizo4.css +1 -0
  14. package/cjs/components/Range/variations/_readonly/base.js +9 -0
  15. package/cjs/components/Range/variations/_readonly/base.js.map +1 -0
  16. package/cjs/components/Range/variations/_readonly/base_hzmd8h.css +1 -0
  17. package/cjs/components/Range/variations/_size/base.js +9 -0
  18. package/cjs/components/Range/variations/_size/base.js.map +1 -0
  19. package/cjs/components/Range/variations/_size/base_f8ah3.css +1 -0
  20. package/cjs/components/Range/variations/_view/base.js +9 -0
  21. package/cjs/components/Range/variations/_view/base.js.map +1 -0
  22. package/cjs/components/Range/variations/_view/base_5iz3nr.css +1 -0
  23. package/cjs/components/TextField/TextField.js +10 -4
  24. package/cjs/components/TextField/TextField.js.map +1 -1
  25. package/cjs/components/TextField/TextField.styles.js +13 -1
  26. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  27. package/cjs/components/TextField/{TextField.styles_1b1mddp.css → TextField.styles_aqmut.css} +2 -0
  28. package/cjs/components/TextField/TextField.tokens.js +5 -0
  29. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  30. package/cjs/components/TextField/variations/_label-placement/inner.js +1 -1
  31. package/cjs/components/TextField/variations/_label-placement/inner.js.map +1 -1
  32. package/cjs/components/TextField/variations/_label-placement/inner_7c08qb.css +1 -0
  33. package/cjs/components/TextField/variations/_size/base.js +1 -1
  34. package/cjs/components/TextField/variations/_size/base.js.map +1 -1
  35. package/{es/components/TextField/variations/_size/base_1khzr9t.css → cjs/components/TextField/variations/_size/base_ntoddv.css} +1 -1
  36. package/cjs/components/TextField/variations/_view/base.js +1 -1
  37. package/cjs/components/TextField/variations/_view/base.js.map +1 -1
  38. package/{es/components/TextField/variations/_view/base_1qd77x6.css → cjs/components/TextField/variations/_view/base_19gxyva.css} +1 -1
  39. package/cjs/index.css +28 -9
  40. package/cjs/index.js +5 -0
  41. package/cjs/index.js.map +1 -1
  42. package/es/components/Range/Range.css +63 -0
  43. package/es/components/Range/Range.js +141 -0
  44. package/es/components/Range/Range.js.map +1 -0
  45. package/es/components/Range/Range.styles.js +52 -0
  46. package/es/components/Range/Range.styles.js.map +1 -0
  47. package/es/components/Range/Range.styles_mc4w65.css +8 -0
  48. package/es/components/Range/Range.tokens.js +100 -0
  49. package/es/components/Range/Range.tokens.js.map +1 -0
  50. package/es/components/Range/utils/index.js +19 -0
  51. package/es/components/Range/utils/index.js.map +1 -0
  52. package/es/components/Range/variations/_disabled/base.js +5 -0
  53. package/es/components/Range/variations/_disabled/base.js.map +1 -0
  54. package/es/components/Range/variations/_disabled/base_1ufizo4.css +1 -0
  55. package/es/components/Range/variations/_readonly/base.js +5 -0
  56. package/es/components/Range/variations/_readonly/base.js.map +1 -0
  57. package/es/components/Range/variations/_readonly/base_hzmd8h.css +1 -0
  58. package/es/components/Range/variations/_size/base.js +5 -0
  59. package/es/components/Range/variations/_size/base.js.map +1 -0
  60. package/es/components/Range/variations/_size/base_f8ah3.css +1 -0
  61. package/es/components/Range/variations/_view/base.js +5 -0
  62. package/es/components/Range/variations/_view/base.js.map +1 -0
  63. package/es/components/Range/variations/_view/base_5iz3nr.css +1 -0
  64. package/es/components/TextField/TextField.js +11 -5
  65. package/es/components/TextField/TextField.js.map +1 -1
  66. package/es/components/TextField/TextField.styles.js +12 -2
  67. package/es/components/TextField/TextField.styles.js.map +1 -1
  68. package/es/components/TextField/{TextField.styles_1b1mddp.css → TextField.styles_aqmut.css} +2 -0
  69. package/es/components/TextField/TextField.tokens.js +5 -0
  70. package/es/components/TextField/TextField.tokens.js.map +1 -1
  71. package/es/components/TextField/variations/_label-placement/inner.js +1 -1
  72. package/es/components/TextField/variations/_label-placement/inner.js.map +1 -1
  73. package/es/components/TextField/variations/_label-placement/inner_7c08qb.css +1 -0
  74. package/es/components/TextField/variations/_size/base.js +1 -1
  75. package/es/components/TextField/variations/_size/base.js.map +1 -1
  76. package/{cjs/components/TextField/variations/_size/base_1khzr9t.css → es/components/TextField/variations/_size/base_ntoddv.css} +1 -1
  77. package/es/components/TextField/variations/_view/base.js +1 -1
  78. package/es/components/TextField/variations/_view/base.js.map +1 -1
  79. package/{cjs/components/TextField/variations/_view/base_1qd77x6.css → es/components/TextField/variations/_view/base_19gxyva.css} +1 -1
  80. package/es/index.css +28 -9
  81. package/es/index.js +2 -0
  82. package/es/index.js.map +1 -1
  83. package/package.json +2 -2
  84. package/styled-components/cjs/components/Range/Range.js +148 -0
  85. package/styled-components/cjs/components/Range/Range.styles.js +39 -0
  86. package/styled-components/cjs/components/Range/Range.tokens.js +103 -0
  87. package/styled-components/cjs/components/Range/Range.types.js +5 -0
  88. package/styled-components/cjs/components/Range/index.js +25 -0
  89. package/styled-components/cjs/components/Range/utils/index.js +22 -0
  90. package/styled-components/cjs/components/Range/variations/_disabled/base.js +9 -0
  91. package/styled-components/cjs/components/Range/variations/_disabled/tokens.json +4 -0
  92. package/styled-components/cjs/components/Range/variations/_readonly/base.js +10 -0
  93. package/styled-components/cjs/components/Range/variations/_readonly/tokens.json +4 -0
  94. package/styled-components/cjs/components/Range/variations/_size/base.js +10 -0
  95. package/styled-components/cjs/components/Range/variations/_size/tokens.json +26 -0
  96. package/styled-components/cjs/components/Range/variations/_view/base.js +10 -0
  97. package/styled-components/cjs/components/Range/variations/_view/tokens.json +6 -0
  98. package/styled-components/cjs/components/TextField/TextField.js +10 -4
  99. package/styled-components/cjs/components/TextField/TextField.styles.js +7 -1
  100. package/styled-components/cjs/components/TextField/TextField.tokens.js +5 -0
  101. package/styled-components/cjs/components/TextField/variations/_label-placement/inner.js +1 -1
  102. package/styled-components/cjs/components/TextField/variations/_size/base.js +1 -1
  103. package/styled-components/cjs/components/TextField/variations/_view/base.js +1 -1
  104. package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.config.js +31 -0
  105. package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.js +11 -0
  106. package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.stories.tsx +312 -0
  107. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +8 -8
  108. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +2 -0
  109. package/styled-components/cjs/examples/plasma_web/components/Range/Range.config.js +31 -0
  110. package/styled-components/cjs/examples/plasma_web/components/Range/Range.js +11 -0
  111. package/styled-components/cjs/examples/plasma_web/components/Range/Range.stories.tsx +312 -0
  112. package/styled-components/cjs/index.js +11 -0
  113. package/styled-components/es/components/Range/Range.js +139 -0
  114. package/styled-components/es/components/Range/Range.styles.js +31 -0
  115. package/styled-components/es/components/Range/Range.tokens.js +97 -0
  116. package/styled-components/es/components/Range/Range.types.js +1 -0
  117. package/styled-components/es/components/Range/index.js +2 -0
  118. package/styled-components/es/components/Range/utils/index.js +16 -0
  119. package/styled-components/es/components/Range/variations/_disabled/base.js +3 -0
  120. package/styled-components/es/components/Range/variations/_disabled/tokens.json +4 -0
  121. package/styled-components/es/components/Range/variations/_readonly/base.js +4 -0
  122. package/styled-components/es/components/Range/variations/_readonly/tokens.json +4 -0
  123. package/styled-components/es/components/Range/variations/_size/base.js +4 -0
  124. package/styled-components/es/components/Range/variations/_size/tokens.json +26 -0
  125. package/styled-components/es/components/Range/variations/_view/base.js +4 -0
  126. package/styled-components/es/components/Range/variations/_view/tokens.json +6 -0
  127. package/styled-components/es/components/TextField/TextField.js +11 -5
  128. package/styled-components/es/components/TextField/TextField.styles.js +6 -0
  129. package/styled-components/es/components/TextField/TextField.tokens.js +5 -0
  130. package/styled-components/es/components/TextField/variations/_label-placement/inner.js +2 -2
  131. package/styled-components/es/components/TextField/variations/_size/base.js +2 -2
  132. package/styled-components/es/components/TextField/variations/_view/base.js +2 -2
  133. package/styled-components/es/examples/plasma_b2c/components/Range/Range.config.js +25 -0
  134. package/styled-components/es/examples/plasma_b2c/components/Range/Range.js +5 -0
  135. package/styled-components/es/examples/plasma_b2c/components/Range/Range.stories.tsx +312 -0
  136. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +8 -8
  137. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +2 -0
  138. package/styled-components/es/examples/plasma_web/components/Range/Range.config.js +25 -0
  139. package/styled-components/es/examples/plasma_web/components/Range/Range.js +5 -0
  140. package/styled-components/es/examples/plasma_web/components/Range/Range.stories.tsx +312 -0
  141. package/styled-components/es/index.js +2 -1
  142. package/types/components/Range/Range.d.ts +31 -0
  143. package/types/components/Range/Range.d.ts.map +1 -0
  144. package/types/components/Range/Range.styles.d.ts +48 -0
  145. package/types/components/Range/Range.styles.d.ts.map +1 -0
  146. package/types/components/Range/Range.tokens.d.ts +98 -0
  147. package/types/components/Range/Range.tokens.d.ts.map +1 -0
  148. package/types/components/Range/Range.types.d.ts +143 -0
  149. package/types/components/Range/Range.types.d.ts.map +1 -0
  150. package/types/components/Range/index.d.ts +4 -0
  151. package/types/components/Range/index.d.ts.map +1 -0
  152. package/types/components/Range/utils/index.d.ts +5 -0
  153. package/types/components/Range/utils/index.d.ts.map +1 -0
  154. package/types/components/Range/variations/_disabled/base.d.ts +2 -0
  155. package/types/components/Range/variations/_disabled/base.d.ts.map +1 -0
  156. package/types/components/Range/variations/_readonly/base.d.ts +2 -0
  157. package/types/components/Range/variations/_readonly/base.d.ts.map +1 -0
  158. package/types/components/Range/variations/_size/base.d.ts +2 -0
  159. package/types/components/Range/variations/_size/base.d.ts.map +1 -0
  160. package/types/components/Range/variations/_view/base.d.ts +2 -0
  161. package/types/components/Range/variations/_view/base.d.ts.map +1 -0
  162. package/types/components/TextField/TextField.d.ts.map +1 -1
  163. package/types/components/TextField/TextField.styles.d.ts +2 -0
  164. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  165. package/types/components/TextField/TextField.tokens.d.ts +5 -0
  166. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  167. package/types/components/TextField/TextField.types.d.ts +8 -0
  168. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  169. package/types/components/TextField/variations/_label-placement/inner.d.ts.map +1 -1
  170. package/types/components/TextField/variations/_size/base.d.ts.map +1 -1
  171. package/types/components/TextField/variations/_view/base.d.ts.map +1 -1
  172. package/types/examples/plasma_b2c/components/Range/Range.config.d.ts +24 -0
  173. package/types/examples/plasma_b2c/components/Range/Range.config.d.ts.map +1 -0
  174. package/types/examples/plasma_b2c/components/Range/Range.d.ts +127 -0
  175. package/types/examples/plasma_b2c/components/Range/Range.d.ts.map +1 -0
  176. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
  177. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +4 -0
  178. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  179. package/types/examples/plasma_web/components/Range/Range.config.d.ts +24 -0
  180. package/types/examples/plasma_web/components/Range/Range.config.d.ts.map +1 -0
  181. package/types/examples/plasma_web/components/Range/Range.d.ts +127 -0
  182. package/types/examples/plasma_web/components/Range/Range.d.ts.map +1 -0
  183. package/types/examples/plasma_web/components/TextField/TextField.d.ts +4 -0
  184. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  185. package/types/examples/sds_engineer/components/TextField/TextField.d.ts +4 -0
  186. package/types/examples/sds_engineer/components/TextField/TextField.d.ts.map +1 -1
  187. package/types/index.d.ts +1 -0
  188. package/types/index.d.ts.map +1 -1
  189. package/cjs/components/TextField/variations/_label-placement/inner_gqlcj2.css +0 -1
  190. package/es/components/TextField/variations/_label-placement/inner_gqlcj2.css +0 -1
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.rangeRoot = exports.rangeConfig = void 0;
8
+ var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
+ var _utils = /*#__PURE__*/require("../../utils");
10
+ var _base = /*#__PURE__*/require("./variations/_size/base");
11
+ var _base2 = /*#__PURE__*/require("./variations/_view/base");
12
+ var _base3 = /*#__PURE__*/require("./variations/_disabled/base");
13
+ var _base4 = /*#__PURE__*/require("./variations/_readonly/base");
14
+ var _utils2 = /*#__PURE__*/require("./utils");
15
+ var _Range = /*#__PURE__*/require("./Range.styles");
16
+ var _Range2 = /*#__PURE__*/require("./Range.tokens");
17
+ var _StyledDivider;
18
+ var _excluded = ["label", "leftHelper", "contentLeft", "contentRight", "view", "size", "readOnly", "disabled", "dividerVariant", "dividerIcon", "firstValue", "secondValue", "firstValueError", "secondValueError", "firstValueSuccess", "secondValueSuccess", "firstPlaceholder", "secondPlaceholder", "firstTextfieldContentLeft", "firstTextfieldContentRight", "secondTextfieldContentLeft", "secondTextfieldContentRight", "firstTextfieldTextBefore", "secondTextfieldTextBefore", "firstTextfieldTextAfter", "secondTextfieldTextAfter", "onChangeFirstValue", "onChangeSecondValue", "onSearchFirstValue", "onSearchSecondValue", "onFocusFirstTextfield", "onFocusSecondTextfield", "onBlurFirstTextfield", "onBlurSecondTextfield"];
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
21
+ 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); }
22
+ 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; }
23
+ 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; }
24
+ var rangeRoot = exports.rangeRoot = function rangeRoot(Root) {
25
+ return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
26
+ var _StyledDivider2;
27
+ var label = _ref.label,
28
+ leftHelper = _ref.leftHelper,
29
+ contentLeft = _ref.contentLeft,
30
+ contentRight = _ref.contentRight,
31
+ view = _ref.view,
32
+ size = _ref.size,
33
+ _ref$readOnly = _ref.readOnly,
34
+ readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
35
+ _ref$disabled = _ref.disabled,
36
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
37
+ _ref$dividerVariant = _ref.dividerVariant,
38
+ dividerVariant = _ref$dividerVariant === void 0 ? 'dash' : _ref$dividerVariant,
39
+ dividerIcon = _ref.dividerIcon,
40
+ firstValue = _ref.firstValue,
41
+ secondValue = _ref.secondValue,
42
+ firstValueError = _ref.firstValueError,
43
+ secondValueError = _ref.secondValueError,
44
+ firstValueSuccess = _ref.firstValueSuccess,
45
+ secondValueSuccess = _ref.secondValueSuccess,
46
+ firstPlaceholder = _ref.firstPlaceholder,
47
+ secondPlaceholder = _ref.secondPlaceholder,
48
+ firstTextfieldContentLeft = _ref.firstTextfieldContentLeft,
49
+ firstTextfieldContentRight = _ref.firstTextfieldContentRight,
50
+ secondTextfieldContentLeft = _ref.secondTextfieldContentLeft,
51
+ secondTextfieldContentRight = _ref.secondTextfieldContentRight,
52
+ firstTextfieldTextBefore = _ref.firstTextfieldTextBefore,
53
+ secondTextfieldTextBefore = _ref.secondTextfieldTextBefore,
54
+ firstTextfieldTextAfter = _ref.firstTextfieldTextAfter,
55
+ secondTextfieldTextAfter = _ref.secondTextfieldTextAfter,
56
+ onChangeFirstValue = _ref.onChangeFirstValue,
57
+ onChangeSecondValue = _ref.onChangeSecondValue,
58
+ onSearchFirstValue = _ref.onSearchFirstValue,
59
+ onSearchSecondValue = _ref.onSearchSecondValue,
60
+ onFocusFirstTextfield = _ref.onFocusFirstTextfield,
61
+ onFocusSecondTextfield = _ref.onFocusSecondTextfield,
62
+ onBlurFirstTextfield = _ref.onBlurFirstTextfield,
63
+ onBlurSecondTextfield = _ref.onBlurSecondTextfield,
64
+ rest = _objectWithoutProperties(_ref, _excluded);
65
+ var rangeErrorClass = firstValueError && secondValueError ? _Range2.classes.rangeError : undefined;
66
+ var firstValueErrorClass = !rangeErrorClass && firstValueError ? _Range2.classes.rangeValueError : undefined;
67
+ var secondValueErrorClass = !rangeErrorClass && secondValueError ? _Range2.classes.rangeValueError : undefined;
68
+ var rangeSuccessClass = firstValueSuccess && secondValueSuccess ? _Range2.classes.rangeSuccess : undefined;
69
+ var firstValueSuccessClass = !rangeSuccessClass && firstValueSuccess ? _Range2.classes.rangeValueSuccess : undefined;
70
+ var secondValueSuccessClass = !rangeSuccessClass && secondValueSuccess ? _Range2.classes.rangeValueSuccess : undefined;
71
+ var handleChangeFirstValue = (0, _react.useCallback)((0, _utils2.getChangeHandler)(onChangeFirstValue, disabled, readOnly), [onChangeFirstValue, disabled, readOnly]);
72
+ var handleChangeSecondValue = (0, _react.useCallback)((0, _utils2.getChangeHandler)(onChangeSecondValue, disabled, readOnly), [onChangeSecondValue, disabled, readOnly]);
73
+ var handleSearchFirstValue = (0, _react.useCallback)((0, _utils2.getSearchHandler)(onSearchFirstValue, disabled, readOnly), [onSearchFirstValue, disabled, readOnly]);
74
+ var handleSearchSecondValue = (0, _react.useCallback)((0, _utils2.getSearchHandler)(onSearchSecondValue, disabled, readOnly), [onSearchFirstValue, disabled, readOnly]);
75
+ var Divider = (0, _react.useMemo)(function () {
76
+ if (dividerVariant === 'none') {
77
+ return null;
78
+ }
79
+ if (dividerVariant === 'dash') {
80
+ return _StyledDivider || (_StyledDivider = /*#__PURE__*/_react["default"].createElement(_Range.StyledDivider, null, "-"));
81
+ }
82
+ return _StyledDivider2 || (_StyledDivider2 = /*#__PURE__*/_react["default"].createElement(_Range.StyledDivider, null, dividerIcon));
83
+ }, [dividerVariant, dividerIcon]);
84
+ return /*#__PURE__*/_react["default"].createElement(Root, _extends({
85
+ view: view,
86
+ size: size,
87
+ disabled: disabled,
88
+ readOnly: !disabled && readOnly,
89
+ ref: ref
90
+ }, rest), label && /*#__PURE__*/_react["default"].createElement(_Range.StyledLabel, null, label), /*#__PURE__*/_react["default"].createElement(_Range.ContentWrapper, {
91
+ className: (0, _utils.cx)(rangeErrorClass, rangeSuccessClass)
92
+ }, contentLeft && /*#__PURE__*/_react["default"].createElement(_Range.StyledContentLeft, null, contentLeft), /*#__PURE__*/_react["default"].createElement(_Range.StyledInput, {
93
+ className: (0, _utils.cx)(firstValueErrorClass, firstValueSuccessClass),
94
+ value: firstValue,
95
+ readOnly: readOnly,
96
+ disabled: disabled,
97
+ placeholder: firstPlaceholder,
98
+ contentLeft: firstTextfieldContentLeft,
99
+ contentRight: firstTextfieldContentRight,
100
+ textBefore: firstTextfieldTextBefore,
101
+ textAfter: firstTextfieldTextAfter,
102
+ onChange: handleChangeFirstValue,
103
+ onSearch: handleSearchFirstValue,
104
+ onFocus: onFocusFirstTextfield,
105
+ onBlur: onBlurFirstTextfield
106
+ }), Divider, /*#__PURE__*/_react["default"].createElement(_Range.StyledInput, {
107
+ className: (0, _utils.cx)(secondValueErrorClass, secondValueSuccessClass),
108
+ value: secondValue,
109
+ readOnly: readOnly,
110
+ disabled: disabled,
111
+ placeholder: secondPlaceholder,
112
+ contentLeft: secondTextfieldContentLeft,
113
+ contentRight: secondTextfieldContentRight,
114
+ textBefore: secondTextfieldTextBefore,
115
+ textAfter: secondTextfieldTextAfter,
116
+ onChange: handleChangeSecondValue,
117
+ onSearch: handleSearchSecondValue,
118
+ onFocus: onFocusSecondTextfield,
119
+ onBlur: onBlurSecondTextfield
120
+ }), contentRight && /*#__PURE__*/_react["default"].createElement(_Range.StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/_react["default"].createElement(_Range.LeftHelper, null, leftHelper));
121
+ });
122
+ };
123
+ var rangeConfig = exports.rangeConfig = {
124
+ name: 'Range',
125
+ tag: 'div',
126
+ layout: rangeRoot,
127
+ base: _Range.base,
128
+ variations: {
129
+ view: {
130
+ css: _base2.base
131
+ },
132
+ size: {
133
+ css: _base.base
134
+ },
135
+ disabled: {
136
+ css: _base3.base,
137
+ attrs: true
138
+ },
139
+ readOnly: {
140
+ css: _base4.base,
141
+ attrs: true
142
+ }
143
+ },
144
+ defaults: {
145
+ size: 'm',
146
+ view: 'default'
147
+ }
148
+ };
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.base = exports.StyledLabel = exports.StyledInput = exports.StyledDivider = exports.StyledContentRight = exports.StyledContentLeft = exports.LeftHelper = exports.ContentWrapper = void 0;
8
+ var _styledComponents = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("styled-components"));
9
+ var _engines = /*#__PURE__*/require("../../engines");
10
+ var _TextField = /*#__PURE__*/require("../TextField");
11
+ var _Range = /*#__PURE__*/require("./Range.tokens");
12
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
13
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
14
+ var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_TextField.textFieldConfig);
15
+ var TextField = /*#__PURE__*/(0, _engines.component)(mergedConfig);
16
+
17
+ // NOTE: переопределение токенов TextField
18
+ var StyledInput = exports.StyledInput = /*#__PURE__*/(0, _styledComponents["default"])(TextField).withConfig({
19
+ componentId: "plasma-new-hope__sc-xpkrak-0"
20
+ })(["flex:1;", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");&.", "{", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");}&.", "{", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");}"], _TextField.textFieldTokens.color, _Range.tokens.textFieldColor, _TextField.textFieldTokens.placeholderColor, _Range.tokens.textFieldPlaceholderColor, _TextField.textFieldTokens.caretColor, _Range.tokens.textFieldCaretColor, _TextField.textFieldTokens.focusColor, _Range.tokens.textFieldFocusColor, _TextField.textFieldTokens.backgroundColor, _Range.tokens.textFieldBackgroundColor, _TextField.textFieldTokens.backgroundColorHover, _Range.tokens.textFieldBackgroundColorHover, _TextField.textFieldTokens.backgroundColorFocus, _Range.tokens.textFieldBackgroundColorFocus, _TextField.textFieldTokens.borderColor, _Range.tokens.textFieldBorderColor, _TextField.textFieldTokens.borderColorHover, _Range.tokens.textFieldBorderColorHover, _TextField.textFieldTokens.borderColorFocus, _Range.tokens.textFieldBorderColorFocus, _TextField.textFieldTokens.colorReadOnly, _Range.tokens.textFieldColorReadOnly, _TextField.textFieldTokens.backgroundColorReadOnly, _Range.tokens.textFieldBackgroundColorReadOnly, _TextField.textFieldTokens.borderColorReadOnly, _Range.tokens.textFieldBorderColorReadOnly, _TextField.textFieldTokens.placeholderColorReadOnly, _Range.tokens.textFieldPlaceholderColorReadOnly, _TextField.textFieldTokens.height, _Range.tokens.textFieldHeight, _TextField.textFieldTokens.borderWidth, _Range.tokens.textFieldBorderWidth, _TextField.textFieldTokens.borderRadius, _Range.tokens.textFieldBorderRadius, _TextField.textFieldTokens.padding, _Range.tokens.textFieldPadding, _TextField.textFieldTokens.leftContentMargin, _Range.tokens.textFieldLeftContentMargin, _TextField.textFieldTokens.rightContentMargin, _Range.tokens.textFieldRightContentMargin, _TextField.textFieldTokens.fontFamily, _Range.tokens.textFieldFontFamily, _TextField.textFieldTokens.fontSize, _Range.tokens.textFieldFontSize, _TextField.textFieldTokens.fontStyle, _Range.tokens.textFieldFontStyle, _TextField.textFieldTokens.fontWeight, _Range.tokens.textFieldFontWeight, _TextField.textFieldTokens.letterSpacing, _Range.tokens.textFieldLetterSpacing, _TextField.textFieldTokens.lineHeight, _Range.tokens.textFieldLineHeight, _TextField.textFieldTokens.disabledOpacity, _Range.tokens.disabledOpacity, _TextField.textFieldTokens.textBeforeColor, _Range.tokens.textFieldTextBeforeColor, _TextField.textFieldTokens.textAfterColor, _Range.tokens.textFieldTextAfterColor, _TextField.textFieldTokens.textBeforeMargin, _Range.tokens.textFieldTextBeforeMargin, _TextField.textFieldTokens.textAfterMargin, _Range.tokens.textFieldTextAfterMargin, _Range.classes.rangeValueError, _TextField.textFieldTokens.backgroundColor, _Range.tokens.textFieldBackgroundErrorColor, _TextField.textFieldTokens.backgroundColorHover, _Range.tokens.textFieldBackgroundErrorColorHover, _TextField.textFieldTokens.backgroundColorFocus, _Range.tokens.textFieldBackgroundErrorColorFocus, _TextField.textFieldTokens.borderColor, _Range.tokens.textFieldBorderColorError, _TextField.textFieldTokens.borderColorHover, _Range.tokens.textFieldBorderColorErrorHover, _TextField.textFieldTokens.borderColorFocus, _Range.tokens.textFieldBorderColorErrorFocus, _Range.classes.rangeValueSuccess, _TextField.textFieldTokens.backgroundColor, _Range.tokens.textFieldBackgroundSuccessColor, _TextField.textFieldTokens.backgroundColorHover, _Range.tokens.textFieldBackgroundSuccessColorHover, _TextField.textFieldTokens.backgroundColorFocus, _Range.tokens.textFieldBackgroundSuccessColorFocus, _TextField.textFieldTokens.borderColor, _Range.tokens.textFieldBorderColorSuccess, _TextField.textFieldTokens.borderColorHover, _Range.tokens.textFieldBorderColorSuccessHover, _TextField.textFieldTokens.borderColorFocus, _Range.tokens.textFieldBorderColorSuccessFocus);
21
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)([""]);
22
+ var StyledLabel = exports.StyledLabel = /*#__PURE__*/_styledComponents["default"].label.withConfig({
23
+ componentId: "plasma-new-hope__sc-xpkrak-1"
24
+ })([""]);
25
+ var LeftHelper = exports.LeftHelper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
26
+ componentId: "plasma-new-hope__sc-xpkrak-2"
27
+ })([""]);
28
+ var ContentWrapper = exports.ContentWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
29
+ componentId: "plasma-new-hope__sc-xpkrak-3"
30
+ })(["display:flex;align-items:center;"]);
31
+ var StyledDivider = exports.StyledDivider = /*#__PURE__*/_styledComponents["default"].div.withConfig({
32
+ componentId: "plasma-new-hope__sc-xpkrak-4"
33
+ })([""]);
34
+ var StyledContentLeft = exports.StyledContentLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
35
+ componentId: "plasma-new-hope__sc-xpkrak-5"
36
+ })([""]);
37
+ var StyledContentRight = exports.StyledContentRight = /*#__PURE__*/_styledComponents["default"].div.withConfig({
38
+ componentId: "plasma-new-hope__sc-xpkrak-6"
39
+ })([""]);
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.tokens = exports.classes = void 0;
7
+ var classes = exports.classes = {
8
+ rangeError: 'range-error',
9
+ rangeValueError: 'range-value-error',
10
+ rangeSuccess: 'range-success',
11
+ rangeValueSuccess: 'range-value-success'
12
+ };
13
+ var tokens = exports.tokens = {
14
+ background: '--plasma-range-background',
15
+ backgroundError: '--plasma-range-background-error',
16
+ backgroundSuccess: '--plasma-range-background-success',
17
+ backgroundReadOnly: '--plasma-range-background-readonly',
18
+ borderRadius: '--plasma-range-border-radius',
19
+ borderWidth: '--plasma-range-border-width',
20
+ borderColor: '--plasma-range-border-color',
21
+ borderColorError: '--plasma-range-border-color-error',
22
+ borderColorSuccess: '--plasma-range-border-color-success',
23
+ borderColorReadOnly: '--plasma-range-border-color-readonly',
24
+ /** Токены разделителя */
25
+ dividerColor: '--plasma-range__divider-color',
26
+ dividerPadding: '--plasma-range__divider-padding',
27
+ dividerFontFamily: '--plasma-range__divider-font-family',
28
+ dividerFontStyle: '--plasma-range__divider-font-style',
29
+ dividerFontSize: '--plasma-range__divider-font-size',
30
+ dividerFontWeight: '--plasma-range__divider-font-weight',
31
+ dividerLetterSpacing: '--plasma-range__divider-letter-spacing',
32
+ dividerLineHeight: '--plasma-range__divider-line-height',
33
+ /** Токены слотов для контента */
34
+ leftContentMargin: '--plasma-range__left-content-margin',
35
+ rightContentMargin: '--plasma-range__right-content-margin',
36
+ /** Токены лейбла */
37
+ labelColor: '--plasma-range__label-color',
38
+ labelColorReadOnly: '--plasma-range__label-color-readonly',
39
+ labelOffset: '--plasma-range__label-offset',
40
+ labelFontFamily: '--plasma-range__label-font-family',
41
+ labelFontStyle: '--plasma-range__label-font-style',
42
+ labelFontSize: '--plasma-range__label-font-size',
43
+ labelFontWeight: '--plasma-range__label-font-weight',
44
+ labelLetterSpacing: '--plasma-range__label-letter-spacing',
45
+ labelLineHeight: '--plasma-range__label-line-height',
46
+ /** Токены вспомогательного текста */
47
+ leftHelperColor: '--plasma-range__left-helper-color',
48
+ leftHelperColorReadOnly: '--plasma-range__left-helper-color-readonly',
49
+ leftHelperOffset: '--plasma-range__left-helper-offset',
50
+ leftHelperFontFamily: '--plasma-range__left-helper-font-family',
51
+ leftHelperFontStyle: '--plasma-range__left-helper-font-style',
52
+ leftHelperFontSize: '--plasma-range__left-helper-font-size',
53
+ leftHelperFontWeight: '--plasma-range__left-helper-font-weight',
54
+ leftHelperLetterSpacing: '--plasma-range__left-helper-letter-spacing',
55
+ leftHelperLineHeight: '--plasma-range__left-helper-line-height',
56
+ /** Прозрачность для всего компонента в состоянии disabled */
57
+ disabledOpacity: '--plasma-range-disabled-opacity',
58
+ /** Цвет обводки поля ввода при фокусе */
59
+ focusColor: '--plasma-range-focus-color',
60
+ /** Токены полей ввода */
61
+ textFieldColor: '--plasma-range-textfield-color',
62
+ textFieldFocusColor: '--plasma-range-textfield-focus-color',
63
+ textFieldPlaceholderColor: '--plasma-range-textfield-placeholder-color',
64
+ textFieldCaretColor: '--plasma-range-textfield-caret-color',
65
+ textFieldBackgroundColor: '--plasma-range-textfield-background-color',
66
+ textFieldBackgroundColorHover: '--plasma-range-textfield-background-color-hover',
67
+ textFieldBackgroundColorFocus: '--plasma-range-textfield-background-color-focus',
68
+ textFieldBackgroundErrorColor: '--plasma-range-textfield-background-color-error',
69
+ textFieldBackgroundErrorColorHover: '--plasma-range-textfield-background-color-error-hover',
70
+ textFieldBackgroundErrorColorFocus: '--plasma-range-textfield-background-color-error-focus',
71
+ textFieldBackgroundSuccessColor: '--plasma-range-textfield-background-color-success',
72
+ textFieldBackgroundSuccessColorHover: '--plasma-range-textfield-background-color-success-hover',
73
+ textFieldBackgroundSuccessColorFocus: '--plasma-range-textfield-background-color-success-focus',
74
+ textFieldBorderColor: '--plasma-range-textfield-border-color',
75
+ textFieldBorderColorHover: '--plasma-range-textfield-border-color-hover',
76
+ textFieldBorderColorFocus: '--plasma-range-textfield-border-color-focus',
77
+ textFieldBorderColorError: '--plasma-range-textfield-border-color-error',
78
+ textFieldBorderColorErrorHover: '--plasma-range-textfield-border-color-error-hover',
79
+ textFieldBorderColorErrorFocus: '--plasma-range-textfield-border-color-error-focus',
80
+ textFieldBorderColorSuccess: '--plasma-range-textfield-border-color-success',
81
+ textFieldBorderColorSuccessHover: '--plasma-range-textfield-border-color-success-hover',
82
+ textFieldBorderColorSuccessFocus: '--plasma-range-textfield-border-color-success-focus',
83
+ textFieldColorReadOnly: '--plasma-range-textfield-color-readonly',
84
+ textFieldBackgroundColorReadOnly: '--plasma-range-textfield-background-color-readonly',
85
+ textFieldBorderColorReadOnly: '--plasma-range-textfield-border-color-readonly',
86
+ textFieldPlaceholderColorReadOnly: '--plasma-range-textfield-placeholder-color-readonly',
87
+ textFieldHeight: '--plasma-range-textfield-height',
88
+ textFieldBorderWidth: '--plasma-range-textfield-border-width',
89
+ textFieldBorderRadius: '--plasma-range-textfield-border-radius',
90
+ textFieldPadding: '--plasma-range-textfield-padding',
91
+ textFieldLeftContentMargin: '--plasma-range-textfield__left-content-margin',
92
+ textFieldRightContentMargin: '--plasma-range-textfield__right-content-margin',
93
+ textFieldFontFamily: '--plasma-range-textfield-font-family',
94
+ textFieldFontStyle: '--plasma-range-textfield-font-style',
95
+ textFieldFontSize: '--plasma-range-textfield-font-size',
96
+ textFieldFontWeight: '--plasma-range-textfield-font-weight',
97
+ textFieldLetterSpacing: '--plasma-range-textfield-letter-spacing',
98
+ textFieldLineHeight: '--plasma-range-textfield-line-height',
99
+ textFieldTextBeforeColor: '--plasma-range-textfield__before-text-color',
100
+ textFieldTextAfterColor: '--plasma-range-textfield__after-text-color',
101
+ textFieldTextBeforeMargin: '--plasma-range-textfield__before-text-margin',
102
+ textFieldTextAfterMargin: '--plasma-range-textfield__after-text-margin'
103
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "rangeConfig", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _Range.rangeConfig;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "rangeRoot", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _Range.rangeRoot;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "rangeTokens", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _Range2.tokens;
22
+ }
23
+ });
24
+ var _Range = /*#__PURE__*/require("./Range");
25
+ var _Range2 = /*#__PURE__*/require("./Range.tokens");
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSearchHandler = exports.getChangeHandler = void 0;
7
+ var getChangeHandler = exports.getChangeHandler = function getChangeHandler(changeHandler, disabled, readOnly) {
8
+ return function (event) {
9
+ if (disabled || readOnly) {
10
+ return;
11
+ }
12
+ changeHandler === null || changeHandler === void 0 || changeHandler(event, event.target.value);
13
+ };
14
+ };
15
+ var getSearchHandler = exports.getSearchHandler = function getSearchHandler(searchHandler, disabled, readOnly) {
16
+ return function (value, event) {
17
+ if (disabled || readOnly) {
18
+ return;
19
+ }
20
+ searchHandler === null || searchHandler === void 0 || searchHandler(event, value);
21
+ };
22
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.base = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var _Range = /*#__PURE__*/require("../../Range.tokens");
9
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["&[disabled]{opacity:var(", ");cursor:not-allowed;}"], _Range.tokens.disabledOpacity);
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "boolean",
3
+ "tokens": ["--plasma-range-disabled-opacity"]
4
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.base = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var _Range = /*#__PURE__*/require("../../Range.tokens");
9
+ var _Range2 = /*#__PURE__*/require("../../Range.styles");
10
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["&[readonly]{cursor:default;", "{background:var(", ");}", "{display:block;color:var(", ");}", "{color:var(", ");}}"], _Range2.ContentWrapper, _Range.tokens.backgroundReadOnly, _Range2.StyledLabel, _Range.tokens.labelColorReadOnly, _Range2.LeftHelper, _Range.tokens.leftHelperColorReadOnly);
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "boolean",
3
+ "tokens": ["--plasma-range-background-read-only"]
4
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.base = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var _Range = /*#__PURE__*/require("../../Range.tokens");
9
+ var _Range2 = /*#__PURE__*/require("../../Range.styles");
10
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["", "{width:inherit;border-radius:var(", ");}", "{display:flex;align-items:center;justify-content:center;height:100%;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{margin:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{margin:var(", ");}", "{margin:var(", ");}", "{margin:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}"], _Range2.ContentWrapper, _Range.tokens.borderRadius, _Range2.StyledDivider, _Range.tokens.dividerPadding, _Range.tokens.dividerFontFamily, _Range.tokens.dividerFontSize, _Range.tokens.dividerFontStyle, _Range.tokens.dividerFontWeight, _Range.tokens.dividerLetterSpacing, _Range.tokens.dividerLineHeight, _Range2.StyledLabel, _Range.tokens.labelOffset, _Range.tokens.labelFontFamily, _Range.tokens.labelFontSize, _Range.tokens.labelFontStyle, _Range.tokens.labelFontWeight, _Range.tokens.labelLetterSpacing, _Range.tokens.labelLineHeight, _Range2.StyledContentLeft, _Range.tokens.leftContentMargin, _Range2.StyledContentRight, _Range.tokens.rightContentMargin, _Range2.LeftHelper, _Range.tokens.leftHelperOffset, _Range.tokens.leftHelperFontFamily, _Range.tokens.leftHelperFontSize, _Range.tokens.leftHelperFontStyle, _Range.tokens.leftHelperFontWeight, _Range.tokens.leftHelperLetterSpacing, _Range.tokens.leftHelperLineHeight);
@@ -0,0 +1,26 @@
1
+ [
2
+ "--plasma-range-border-radius",
3
+ "--plasma-range__left-content-margin",
4
+ "--plasma-range__right-content-margin",
5
+ "--plasma-range__label-offset",
6
+ "--plasma-range__label-font-family",
7
+ "--plasma-range__label-font-style",
8
+ "--plasma-range__label-font-size",
9
+ "--plasma-range__label-font-weight",
10
+ "--plasma-range__label-letter-spacing",
11
+ "--plasma-range__label-line-height",
12
+ "--plasma-range__left-helper-offset",
13
+ "--plasma-range__left-helper-font-family",
14
+ "--plasma-range__left-helper-font-style",
15
+ "--plasma-range__left-helper-font-size",
16
+ "--plasma-range__left-helper-font-weight",
17
+ "--plasma-range__left-helper-letter-spacing",
18
+ "--plasma-range__left-helper-line-height",
19
+ "--plasma-range__divider-padding",
20
+ "--plasma-range__divider-font-family",
21
+ "--plasma-range__divider-font-style",
22
+ "--plasma-range__divider-font-size",
23
+ "--plasma-range__divider-font-weight",
24
+ "--plasma-range__divider-letter-spacing",
25
+ "--plasma-range__divider-line-height"
26
+ ]
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.base = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var _Range = /*#__PURE__*/require("../../Range.tokens");
9
+ var _Range2 = /*#__PURE__*/require("../../Range.styles");
10
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["", "{background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");&.", "{background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}&.", "{background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}}", "{color:var(", ");}", "{display:block;color:var(", ");}", "{color:var(", ");}"], _Range2.ContentWrapper, _Range.tokens.background, _Range.tokens.borderWidth, _Range.tokens.borderColor, _Range.classes.rangeError, _Range.tokens.backgroundError, _Range.tokens.borderWidth, _Range.tokens.borderColorError, _Range.classes.rangeSuccess, _Range.tokens.backgroundSuccess, _Range.tokens.borderWidth, _Range.tokens.borderColorSuccess, _Range2.StyledDivider, _Range.tokens.dividerColor, _Range2.StyledLabel, _Range.tokens.labelColor, _Range2.LeftHelper, _Range.tokens.leftHelperColor);
@@ -0,0 +1,6 @@
1
+ [
2
+ "--plasma-range-background",
3
+ "--plasma-range__label-color",
4
+ "--plasma-range__left-helper-color",
5
+ "--plasma-range__divider-color"
6
+ ]
@@ -18,7 +18,7 @@ var _TextField = /*#__PURE__*/require("./TextField.styles");
18
18
  var _TextField2 = /*#__PURE__*/require("./TextField.tokens");
19
19
  var _ui = /*#__PURE__*/require("./ui");
20
20
  var _hooks = /*#__PURE__*/require("./hooks");
21
- var _excluded = ["id", "contentLeft", "contentRight", "label", "labelPlacement", "placeholder", "leftHelper", "enumerationType", "view", "size", "readOnly", "disabled", "chips", "onChange", "onChangeChips", "onSearch"];
21
+ var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "textBefore", "textAfter", "placeholder", "leftHelper", "enumerationType", "view", "size", "readOnly", "disabled", "chips", "onChange", "onChangeChips", "onSearch"];
22
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
24
24
  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); }
@@ -34,10 +34,14 @@ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["display:bloc
34
34
  var textFieldRoot = exports.textFieldRoot = function textFieldRoot(Root) {
35
35
  return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
36
36
  var id = _ref.id,
37
+ className = _ref.className,
38
+ style = _ref.style,
37
39
  contentLeft = _ref.contentLeft,
38
40
  contentRight = _ref.contentRight,
39
41
  label = _ref.label,
40
42
  labelPlacement = _ref.labelPlacement,
43
+ textBefore = _ref.textBefore,
44
+ textAfter = _ref.textAfter,
41
45
  placeholder = _ref.placeholder,
42
46
  leftHelper = _ref.leftHelper,
43
47
  _ref$enumerationType = _ref.enumerationType,
@@ -149,7 +153,9 @@ var textFieldRoot = exports.textFieldRoot = function textFieldRoot(Root) {
149
153
  disabled: disabled,
150
154
  readOnly: !disabled && readOnly,
151
155
  labelPlacement: innerLabelPlacementValue,
152
- onClick: handleInputFocus
156
+ onClick: handleInputFocus,
157
+ className: className,
158
+ style: style
153
159
  }, labelInside || innerLabelValue && /*#__PURE__*/_react["default"].createElement(_TextField.Label, {
154
160
  id: labelId,
155
161
  htmlFor: id
@@ -160,7 +166,7 @@ var textFieldRoot = exports.textFieldRoot = function textFieldRoot(Root) {
160
166
  ref: contentRef,
161
167
  onKeyDown: handleContentKeyDown,
162
168
  className: withHasChips
163
- }, isChipEnumeration && Boolean(chips === null || chips === void 0 ? void 0 : chips.length) && /*#__PURE__*/_react["default"].createElement(_TextField.StyledChips, null, chips === null || chips === void 0 ? void 0 : chips.map(function (_ref2, index) {
169
+ }, textBefore && /*#__PURE__*/_react["default"].createElement(_TextField.StyledTextBefore, null, textBefore), isChipEnumeration && Boolean(chips === null || chips === void 0 ? void 0 : chips.length) && /*#__PURE__*/_react["default"].createElement(_TextField.StyledChips, null, chips === null || chips === void 0 ? void 0 : chips.map(function (_ref2, index) {
164
170
  var chipId = _ref2.id,
165
171
  text = _ref2.text;
166
172
  return /*#__PURE__*/_react["default"].createElement(_ui.TextFieldChip, {
@@ -194,7 +200,7 @@ var textFieldRoot = exports.textFieldRoot = function textFieldRoot(Root) {
194
200
  })), labelInside && /*#__PURE__*/_react["default"].createElement(_TextField.Label, {
195
201
  id: labelId,
196
202
  htmlFor: innerId
197
- }, innerLabelValue)), contentRight && /*#__PURE__*/_react["default"].createElement(_TextField.StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/_react["default"].createElement(_TextField.LeftHelper, {
203
+ }, innerLabelValue), textAfter && /*#__PURE__*/_react["default"].createElement(_TextField.StyledTextAfter, null, textAfter)), contentRight && /*#__PURE__*/_react["default"].createElement(_TextField.StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/_react["default"].createElement(_TextField.LeftHelper, {
198
204
  id: helperTextId
199
205
  }, leftHelper));
200
206
  });
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyledContentRight = exports.StyledContentLeft = exports.StyledChips = exports.LeftHelper = exports.Label = exports.InputWrapper = exports.InputLabelWrapper = exports.Input = void 0;
6
+ exports.StyledTextBefore = exports.StyledTextAfter = exports.StyledContentRight = exports.StyledContentLeft = exports.StyledChips = exports.LeftHelper = exports.Label = exports.InputWrapper = exports.InputLabelWrapper = exports.Input = void 0;
7
7
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
8
8
  var _TextField = /*#__PURE__*/require("./TextField.tokens");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -30,4 +30,10 @@ var StyledContentRight = exports.StyledContentRight = /*#__PURE__*/_styledCompon
30
30
  })(["margin:var(", ");"], _TextField.tokens.rightContentMargin);
31
31
  var LeftHelper = exports.LeftHelper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
32
32
  componentId: "plasma-new-hope__sc-g4vxbb-7"
33
+ })([""]);
34
+ var StyledTextBefore = exports.StyledTextBefore = /*#__PURE__*/_styledComponents["default"].div.withConfig({
35
+ componentId: "plasma-new-hope__sc-g4vxbb-8"
36
+ })([""]);
37
+ var StyledTextAfter = exports.StyledTextAfter = /*#__PURE__*/_styledComponents["default"].div.withConfig({
38
+ componentId: "plasma-new-hope__sc-g4vxbb-9"
33
39
  })([""]);
@@ -68,6 +68,11 @@ var tokens = exports.tokens = {
68
68
  leftHelperFontWeight: '--plasma-textfield__left-helper-font-weight',
69
69
  leftHelperLetterSpacing: '--plasma-textfield__left-helper-letter-spacing',
70
70
  leftHelperLineHeight: '--plasma-textfield__left-helper-line-height',
71
+ /** Токены вспомогательного текста */
72
+ textBeforeColor: '--plasma-textfield__before-text-color',
73
+ textAfterColor: '--plasma-textfield__after-text-color',
74
+ textBeforeMargin: '--plasma-textfield__before-text-margin',
75
+ textAfterMargin: '--plasma-textfield__after-text-margin',
71
76
  /** Прозрачность для всего компонента в состоянии disabled */
72
77
  disabledOpacity: '--plasma-textfield-disabled-opacity',
73
78
  /** Токены чипа */
@@ -7,4 +7,4 @@ exports.labelPlacement_inner = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("styled-components");
8
8
  var _TextField = /*#__PURE__*/require("../../TextField.styles");
9
9
  var _TextField2 = /*#__PURE__*/require("../../TextField.tokens");
10
- var labelPlacement_inner = exports.labelPlacement_inner = /*#__PURE__*/(0, _styledComponents.css)(["", "{padding:var(", ");}", ":focus ~ ", ",", ":not(:placeholder-shown) ~ ", "{height:auto;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", ":not(:focus)::placeholder{color:transparent;}", ":focus::placeholder{color:transparent;}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;transition:padding 0.1s ease-in-out,height 0s;height:var(", ");padding-top:calc(var(", ") / 4);padding-bottom:calc(var(", ") / 4);}"], _TextField.Input, _TextField2.tokens.contentLabelInnerPadding, _TextField.Input, _TextField.Label, _TextField.Input, _TextField.Label, _TextField2.tokens.labelInnerPadding, _TextField2.tokens.labelInnerFontFamily, _TextField2.tokens.labelInnerFontSize, _TextField2.tokens.labelInnerFontStyle, _TextField2.tokens.labelInnerFontWeight, _TextField2.tokens.labelInnerLetterSpacing, _TextField2.tokens.labelInnerLineHeight, _TextField.Input, _TextField.Input, _TextField.Label, _TextField2.tokens.placeholderColor, _TextField2.tokens.height, _TextField2.tokens.height, _TextField2.tokens.height);
10
+ var labelPlacement_inner = exports.labelPlacement_inner = /*#__PURE__*/(0, _styledComponents.css)(["", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ":not(:placeholder-shown) ~ ", "{height:auto;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", ":not(:focus)::placeholder{color:transparent;}", ":focus::placeholder{color:transparent;}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;transition:padding 0.1s ease-in-out,height 0s;height:var(", ");padding-top:calc(var(", ") / 4);padding-bottom:calc(var(", ") / 4);}"], _TextField.Input, _TextField2.tokens.contentLabelInnerPadding, _TextField.StyledTextAfter, _TextField.StyledTextBefore, _TextField2.tokens.contentLabelInnerPadding, _TextField.Input, _TextField.Label, _TextField.Input, _TextField.Label, _TextField2.tokens.labelInnerPadding, _TextField2.tokens.labelInnerFontFamily, _TextField2.tokens.labelInnerFontSize, _TextField2.tokens.labelInnerFontStyle, _TextField2.tokens.labelInnerFontWeight, _TextField2.tokens.labelInnerLetterSpacing, _TextField2.tokens.labelInnerLineHeight, _TextField.Input, _TextField.Input, _TextField.Label, _TextField2.tokens.placeholderColor, _TextField2.tokens.height, _TextField2.tokens.height, _TextField2.tokens.height);
@@ -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)(["", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{height:var(", ");border-radius:var(", ");padding:var(", ");&.", "{padding-top:var(", ");padding-bottom:var(", ");}&.", "{padding-left:var(", ");}&.", "{padding-right:var(", ");}}", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{margin-top:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}"], _TextField2.Input, _TextField.tokens.fontFamily, _TextField.tokens.fontSize, _TextField.tokens.fontStyle, _TextField.tokens.fontWeight, _TextField.tokens.letterSpacing, _TextField.tokens.lineHeight, _TextField2.InputWrapper, _TextField.tokens.height, _TextField.tokens.borderRadius, _TextField.tokens.padding, _TextField.classes.hasChips, _TextField.tokens.paddingWithChips, _TextField.tokens.paddingWithChips, _TextField.classes.hasEmptyContentLeft, _TextField.tokens.paddingWithChips, _TextField.classes.hasEmptyContentRight, _TextField.tokens.paddingWithChips, _TextField2.Label, _TextField.tokens.labelFontFamily, _TextField.tokens.labelFontSize, _TextField.tokens.labelFontStyle, _TextField.tokens.labelFontWeight, _TextField.tokens.labelLetterSpacing, _TextField.tokens.labelLineHeight, _TextField2.LeftHelper, _TextField.tokens.leftHelperOffset, _TextField.tokens.leftHelperFontFamily, _TextField.tokens.leftHelperFontSize, _TextField.tokens.leftHelperFontStyle, _TextField.tokens.leftHelperFontWeight, _TextField.tokens.leftHelperLetterSpacing, _TextField.tokens.leftHelperLineHeight);
10
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{height:var(", ");border-radius:var(", ");padding:var(", ");&.", "{padding-top:var(", ");padding-bottom:var(", ");}&.", "{padding-left:var(", ");}&.", "{padding-right:var(", ");}}", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{margin-top:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", ",", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{margin:var(", ");}", "{margin:var(", ");}"], _TextField2.Input, _TextField.tokens.fontFamily, _TextField.tokens.fontSize, _TextField.tokens.fontStyle, _TextField.tokens.fontWeight, _TextField.tokens.letterSpacing, _TextField.tokens.lineHeight, _TextField2.InputWrapper, _TextField.tokens.height, _TextField.tokens.borderRadius, _TextField.tokens.padding, _TextField.classes.hasChips, _TextField.tokens.paddingWithChips, _TextField.tokens.paddingWithChips, _TextField.classes.hasEmptyContentLeft, _TextField.tokens.paddingWithChips, _TextField.classes.hasEmptyContentRight, _TextField.tokens.paddingWithChips, _TextField2.Label, _TextField.tokens.labelFontFamily, _TextField.tokens.labelFontSize, _TextField.tokens.labelFontStyle, _TextField.tokens.labelFontWeight, _TextField.tokens.labelLetterSpacing, _TextField.tokens.labelLineHeight, _TextField2.LeftHelper, _TextField.tokens.leftHelperOffset, _TextField.tokens.leftHelperFontFamily, _TextField.tokens.leftHelperFontSize, _TextField.tokens.leftHelperFontStyle, _TextField.tokens.leftHelperFontWeight, _TextField.tokens.leftHelperLetterSpacing, _TextField.tokens.leftHelperLineHeight, _TextField2.StyledTextBefore, _TextField2.StyledTextAfter, _TextField.tokens.fontFamily, _TextField.tokens.fontSize, _TextField.tokens.fontStyle, _TextField.tokens.fontWeight, _TextField.tokens.letterSpacing, _TextField.tokens.lineHeight, _TextField2.StyledTextBefore, _TextField.tokens.textBeforeMargin, _TextField2.StyledTextAfter, _TextField.tokens.textAfterMargin);
@@ -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)(["", "{--plasma_private-textfield-border-color:var(", ");--plasma_private-textfield-bg-color:var(", ");color:var(", ");background-color:var(--plasma_private-textfield-bg-color);box-shadow:inset 0 0 0 var(", ") var(--plasma_private-textfield-border-color);caret-color:var(", ");transition:background-color 0.1s ease-in,color 0.1s ease-in,box-shadow 0.1s ease-in;}", ":hover{--plasma_private-textfield-border-color:var(", ",var(", "));--plasma_private-textfield-bg-color:var( ", ",var(", ") );}", ":focus-within{--plasma_private-textfield-border-color:var(", ",var(", "));--plasma_private-textfield-bg-color:var( ", ",var(", ") );}", "::placeholder{color:var(", ");}", "{color:var(", ");}", "{color:var(", ");}"], _TextField2.InputWrapper, /*#__PURE__*/String(_TextField.tokens.borderColor), /*#__PURE__*/String(_TextField.tokens.backgroundColor), _TextField.tokens.color, _TextField.tokens.borderWidth, _TextField.tokens.caretColor, _TextField2.InputWrapper, _TextField.tokens.borderColorHover, /*#__PURE__*/String(_TextField.tokens.borderColor), _TextField.tokens.backgroundColorHover, /*#__PURE__*/String(_TextField.tokens.backgroundColor), _TextField2.InputWrapper, _TextField.tokens.borderColorFocus, /*#__PURE__*/String(_TextField.tokens.borderColor), _TextField.tokens.backgroundColorFocus, /*#__PURE__*/String(_TextField.tokens.backgroundColor), _TextField2.Input, _TextField.tokens.placeholderColor, _TextField2.Input, _TextField.tokens.color, _TextField2.LeftHelper, _TextField.tokens.leftHelperColor);
10
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["", "{--plasma_private-textfield-border-color:var(", ");--plasma_private-textfield-bg-color:var(", ");color:var(", ");background-color:var(--plasma_private-textfield-bg-color);box-shadow:inset 0 0 0 var(", ") var(--plasma_private-textfield-border-color);caret-color:var(", ");transition:background-color 0.1s ease-in,color 0.1s ease-in,box-shadow 0.1s ease-in;}", ":hover{--plasma_private-textfield-border-color:var(", ",var(", "));--plasma_private-textfield-bg-color:var( ", ",var(", ") );}", ":focus-within{--plasma_private-textfield-border-color:var(", ",var(", "));--plasma_private-textfield-bg-color:var( ", ",var(", ") );}", "::placeholder{color:var(", ");}", "{color:var(", ");}", "{color:var(", ");}", "{color:var(", ");}", "{color:var(", ");}"], _TextField2.InputWrapper, /*#__PURE__*/String(_TextField.tokens.borderColor), /*#__PURE__*/String(_TextField.tokens.backgroundColor), _TextField.tokens.color, _TextField.tokens.borderWidth, _TextField.tokens.caretColor, _TextField2.InputWrapper, _TextField.tokens.borderColorHover, /*#__PURE__*/String(_TextField.tokens.borderColor), _TextField.tokens.backgroundColorHover, /*#__PURE__*/String(_TextField.tokens.backgroundColor), _TextField2.InputWrapper, _TextField.tokens.borderColorFocus, /*#__PURE__*/String(_TextField.tokens.borderColor), _TextField.tokens.backgroundColorFocus, /*#__PURE__*/String(_TextField.tokens.backgroundColor), _TextField2.Input, _TextField.tokens.placeholderColor, _TextField2.Input, _TextField.tokens.color, _TextField2.LeftHelper, _TextField.tokens.leftHelperColor, _TextField2.StyledTextBefore, _TextField.tokens.textBeforeColor, _TextField2.StyledTextAfter, _TextField.tokens.textAfterColor);