@alfalab/core-components-with-suffix 4.0.14 → 4.0.16

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.
package/Component.js CHANGED
@@ -1,17 +1,15 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
  var mergeRefs = require('react-merge-refs');
7
5
  var cn = require('classnames');
8
6
  var coreComponentsPortal = require('@alfalab/core-components-portal');
9
7
 
10
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
11
9
 
12
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
- var mergeRefs__default = /*#__PURE__*/_interopDefaultLegacy(mergeRefs);
14
- var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
10
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
11
+ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
12
+ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
15
13
 
16
14
  /******************************************************************************
17
15
  Copyright (c) Microsoft Corporation.
@@ -52,7 +50,7 @@ function __rest(s, e) {
52
50
  return t;
53
51
  }
54
52
 
55
- var styles = {"suffixContainer":"with-suffix__suffixContainer_582e4","suffixVisible":"with-suffix__suffixVisible_582e4","hasSuffix":"with-suffix__hasSuffix_582e4","spacer":"with-suffix__spacer_582e4","suffix":"with-suffix__suffix_582e4","disabled":"with-suffix__disabled_582e4","readOnly":"with-suffix__readOnly_582e4"};
53
+ var styles = {"suffixContainer":"with-suffix__suffixContainer_1apty","suffixVisible":"with-suffix__suffixVisible_1apty","hasSuffix":"with-suffix__hasSuffix_1apty","spacer":"with-suffix__spacer_1apty","suffix":"with-suffix__suffix_1apty","disabled":"with-suffix__disabled_1apty","readOnly":"with-suffix__readOnly_1apty"};
56
54
  require('./index.css')
57
55
 
58
56
  var withSuffix = function (Input) {
@@ -82,15 +80,15 @@ var withSuffix = function (Input) {
82
80
  // TODO: Изменить сигнатуру getPortalContainer в Portal
83
81
  function () { return inputRef.current.parentElement; }, []);
84
82
  var visibleValue = uncontrolled ? stateValue : value;
85
- return (React__default['default'].createElement(React.Fragment, null,
86
- React__default['default'].createElement(Input, __assign({ ref: mergeRefs__default['default']([ref, inputRef]), value: visibleValue, disabled: disabled, readOnly: readOnly, onChange: handleInputChange, onClear: handleClear, placeholder: placeholder, className: cn__default['default'](className, (_b = {},
83
+ return (React__default.default.createElement(React.Fragment, null,
84
+ React__default.default.createElement(Input, __assign({ ref: mergeRefs__default.default([ref, inputRef]), value: visibleValue, disabled: disabled, readOnly: readOnly, onChange: handleInputChange, onClear: handleClear, placeholder: placeholder, className: cn__default.default(className, (_b = {},
87
85
  _b[styles.suffixVisible] = Boolean(visibleValue),
88
86
  _b[styles.hasSuffix] = suffix,
89
87
  _b)) }, restProps)),
90
- React__default['default'].createElement(coreComponentsPortal.Portal, { getPortalContainer: getPortalContainer },
91
- React__default['default'].createElement("div", { className: cn__default['default'](styles.suffixContainer, suffixContainerClassName) },
92
- React__default['default'].createElement("span", { className: styles.spacer }, visibleValue),
93
- suffix && (React__default['default'].createElement("div", { className: cn__default['default'](styles.suffix, (_c = {},
88
+ React__default.default.createElement(coreComponentsPortal.Portal, { getPortalContainer: getPortalContainer },
89
+ React__default.default.createElement("div", { className: cn__default.default(styles.suffixContainer, suffixContainerClassName) },
90
+ React__default.default.createElement("span", { className: styles.spacer }, visibleValue),
91
+ suffix && (React__default.default.createElement("div", { className: cn__default.default(styles.suffix, (_c = {},
94
92
  _c[styles.disabled] = disabled,
95
93
  _c[styles.readOnly] = readOnly,
96
94
  _c)) }, suffix))))));
package/cssm/Component.js CHANGED
@@ -1,19 +1,17 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var React = require('react');
6
4
  var mergeRefs = require('react-merge-refs');
7
5
  var cn = require('classnames');
8
6
  var coreComponentsPortal = require('@alfalab/core-components-portal/cssm');
9
7
  var styles = require('./index.module.css');
10
8
 
11
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
12
10
 
13
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
- var mergeRefs__default = /*#__PURE__*/_interopDefaultLegacy(mergeRefs);
15
- var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
16
- var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
11
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
+ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
13
+ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
14
+ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
17
15
 
18
16
  /******************************************************************************
19
17
  Copyright (c) Microsoft Corporation.
@@ -81,17 +79,17 @@ var withSuffix = function (Input) {
81
79
  // TODO: Изменить сигнатуру getPortalContainer в Portal
82
80
  function () { return inputRef.current.parentElement; }, []);
83
81
  var visibleValue = uncontrolled ? stateValue : value;
84
- return (React__default['default'].createElement(React.Fragment, null,
85
- React__default['default'].createElement(Input, __assign({ ref: mergeRefs__default['default']([ref, inputRef]), value: visibleValue, disabled: disabled, readOnly: readOnly, onChange: handleInputChange, onClear: handleClear, placeholder: placeholder, className: cn__default['default'](className, (_b = {},
86
- _b[styles__default['default'].suffixVisible] = Boolean(visibleValue),
87
- _b[styles__default['default'].hasSuffix] = suffix,
82
+ return (React__default.default.createElement(React.Fragment, null,
83
+ React__default.default.createElement(Input, __assign({ ref: mergeRefs__default.default([ref, inputRef]), value: visibleValue, disabled: disabled, readOnly: readOnly, onChange: handleInputChange, onClear: handleClear, placeholder: placeholder, className: cn__default.default(className, (_b = {},
84
+ _b[styles__default.default.suffixVisible] = Boolean(visibleValue),
85
+ _b[styles__default.default.hasSuffix] = suffix,
88
86
  _b)) }, restProps)),
89
- React__default['default'].createElement(coreComponentsPortal.Portal, { getPortalContainer: getPortalContainer },
90
- React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].suffixContainer, suffixContainerClassName) },
91
- React__default['default'].createElement("span", { className: styles__default['default'].spacer }, visibleValue),
92
- suffix && (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].suffix, (_c = {},
93
- _c[styles__default['default'].disabled] = disabled,
94
- _c[styles__default['default'].readOnly] = readOnly,
87
+ React__default.default.createElement(coreComponentsPortal.Portal, { getPortalContainer: getPortalContainer },
88
+ React__default.default.createElement("div", { className: cn__default.default(styles__default.default.suffixContainer, suffixContainerClassName) },
89
+ React__default.default.createElement("span", { className: styles__default.default.spacer }, visibleValue),
90
+ suffix && (React__default.default.createElement("div", { className: cn__default.default(styles__default.default.suffix, (_c = {},
91
+ _c[styles__default.default.disabled] = disabled,
92
+ _c[styles__default.default.readOnly] = readOnly,
95
93
  _c)) }, suffix))))));
96
94
  });
97
95
  };
package/cssm/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var Component = require('./Component.js');
6
4
  require('react');
7
5
  require('react-merge-refs');
package/esm/Component.js CHANGED
@@ -42,7 +42,7 @@ function __rest(s, e) {
42
42
  return t;
43
43
  }
44
44
 
45
- var styles = {"suffixContainer":"with-suffix__suffixContainer_582e4","suffixVisible":"with-suffix__suffixVisible_582e4","hasSuffix":"with-suffix__hasSuffix_582e4","spacer":"with-suffix__spacer_582e4","suffix":"with-suffix__suffix_582e4","disabled":"with-suffix__disabled_582e4","readOnly":"with-suffix__readOnly_582e4"};
45
+ var styles = {"suffixContainer":"with-suffix__suffixContainer_1apty","suffixVisible":"with-suffix__suffixVisible_1apty","hasSuffix":"with-suffix__hasSuffix_1apty","spacer":"with-suffix__spacer_1apty","suffix":"with-suffix__suffix_1apty","disabled":"with-suffix__disabled_1apty","readOnly":"with-suffix__readOnly_1apty"};
46
46
  require('./index.css')
47
47
 
48
48
  var withSuffix = function (Input) {
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 7smr2 */
1
+ /* hash: r7ysj */
2
2
  :root {
3
3
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
4
4
  }
@@ -24,7 +24,7 @@
24
24
 
25
25
  /* управляет видимостью иконки ошибки, если она стоит рядом с другой иконкой */
26
26
  }
27
- .with-suffix__suffixContainer_582e4 {
27
+ .with-suffix__suffixContainer_1apty {
28
28
  font-size: 16px;
29
29
  line-height: 20px;
30
30
  font-weight: 400;
@@ -37,25 +37,25 @@
37
37
  display: none;
38
38
  pointer-events: none;
39
39
  }
40
- input:focus:not(:read-only) + .with-suffix__suffixContainer_582e4,
41
- .with-suffix__suffixVisible_582e4 .with-suffix__suffixContainer_582e4 {
40
+ input:focus:not(:read-only) + .with-suffix__suffixContainer_1apty,
41
+ .with-suffix__suffixVisible_1apty .with-suffix__suffixContainer_1apty {
42
42
  display: inline-flex;
43
43
  }
44
- .with-suffix__hasSuffix_582e4 input:focus::placeholder {
44
+ .with-suffix__hasSuffix_1apty input:focus::placeholder {
45
45
  color: transparent;
46
46
  transition: none;
47
47
  }
48
- .with-suffix__spacer_582e4 {
48
+ .with-suffix__spacer_1apty {
49
49
  visibility: hidden;
50
50
  flex-shrink: 0;
51
51
  white-space: pre;
52
52
  }
53
- .with-suffix__suffix_582e4 {
53
+ .with-suffix__suffix_1apty {
54
54
  white-space: pre;
55
55
  }
56
- .with-suffix__disabled_582e4 {
56
+ .with-suffix__disabled_1apty {
57
57
  color: var(--input-disabled-color);
58
58
  }
59
- .with-suffix__readOnly_582e4 {
59
+ .with-suffix__readOnly_1apty {
60
60
  color: var(--input-read-only-color);
61
61
  }
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 7smr2 */
1
+ /* hash: r7ysj */
2
2
  :root {
3
3
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
4
4
  }
@@ -24,7 +24,7 @@
24
24
 
25
25
  /* управляет видимостью иконки ошибки, если она стоит рядом с другой иконкой */
26
26
  }
27
- .with-suffix__suffixContainer_582e4 {
27
+ .with-suffix__suffixContainer_1apty {
28
28
  font-size: 16px;
29
29
  line-height: 20px;
30
30
  font-weight: 400;
@@ -37,25 +37,25 @@
37
37
  display: none;
38
38
  pointer-events: none;
39
39
  }
40
- input:focus:not(:read-only) + .with-suffix__suffixContainer_582e4,
41
- .with-suffix__suffixVisible_582e4 .with-suffix__suffixContainer_582e4 {
40
+ input:focus:not(:read-only) + .with-suffix__suffixContainer_1apty,
41
+ .with-suffix__suffixVisible_1apty .with-suffix__suffixContainer_1apty {
42
42
  display: inline-flex;
43
43
  }
44
- .with-suffix__hasSuffix_582e4 input:focus::placeholder {
44
+ .with-suffix__hasSuffix_1apty input:focus::placeholder {
45
45
  color: transparent;
46
46
  transition: none;
47
47
  }
48
- .with-suffix__spacer_582e4 {
48
+ .with-suffix__spacer_1apty {
49
49
  visibility: hidden;
50
50
  flex-shrink: 0;
51
51
  white-space: pre;
52
52
  }
53
- .with-suffix__suffix_582e4 {
53
+ .with-suffix__suffix_1apty {
54
54
  white-space: pre;
55
55
  }
56
- .with-suffix__disabled_582e4 {
56
+ .with-suffix__disabled_1apty {
57
57
  color: var(--input-disabled-color);
58
58
  }
59
- .with-suffix__readOnly_582e4 {
59
+ .with-suffix__readOnly_1apty {
60
60
  color: var(--input-read-only-color);
61
61
  }
package/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var Component = require('./Component.js');
6
4
  require('react');
7
5
  require('react-merge-refs');
@@ -3,7 +3,7 @@ import mergeRefs from 'react-merge-refs';
3
3
  import cn from 'classnames';
4
4
  import { Portal } from '@alfalab/core-components-portal/modern';
5
5
 
6
- var styles = {"suffixContainer":"with-suffix__suffixContainer_582e4","suffixVisible":"with-suffix__suffixVisible_582e4","hasSuffix":"with-suffix__hasSuffix_582e4","spacer":"with-suffix__spacer_582e4","suffix":"with-suffix__suffix_582e4","disabled":"with-suffix__disabled_582e4","readOnly":"with-suffix__readOnly_582e4"};
6
+ const styles = {"suffixContainer":"with-suffix__suffixContainer_1apty","suffixVisible":"with-suffix__suffixVisible_1apty","hasSuffix":"with-suffix__hasSuffix_1apty","spacer":"with-suffix__spacer_1apty","suffix":"with-suffix__suffix_1apty","disabled":"with-suffix__disabled_1apty","readOnly":"with-suffix__readOnly_1apty"};
7
7
  require('./index.css')
8
8
 
9
9
  const withSuffix = (Input) => forwardRef(({ value, defaultValue, onChange, onClear, suffix = '', placeholder, className, disabled, readOnly, suffixContainerClassName, ...restProps }, ref) => {
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 7smr2 */
1
+ /* hash: r7ysj */
2
2
  :root {
3
3
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
4
4
  }
@@ -24,7 +24,7 @@
24
24
 
25
25
  /* управляет видимостью иконки ошибки, если она стоит рядом с другой иконкой */
26
26
  }
27
- .with-suffix__suffixContainer_582e4 {
27
+ .with-suffix__suffixContainer_1apty {
28
28
  font-size: 16px;
29
29
  line-height: 20px;
30
30
  font-weight: 400;
@@ -37,25 +37,25 @@
37
37
  display: none;
38
38
  pointer-events: none;
39
39
  }
40
- input:focus:not(:read-only) + .with-suffix__suffixContainer_582e4,
41
- .with-suffix__suffixVisible_582e4 .with-suffix__suffixContainer_582e4 {
40
+ input:focus:not(:read-only) + .with-suffix__suffixContainer_1apty,
41
+ .with-suffix__suffixVisible_1apty .with-suffix__suffixContainer_1apty {
42
42
  display: inline-flex;
43
43
  }
44
- .with-suffix__hasSuffix_582e4 input:focus::placeholder {
44
+ .with-suffix__hasSuffix_1apty input:focus::placeholder {
45
45
  color: transparent;
46
46
  transition: none;
47
47
  }
48
- .with-suffix__spacer_582e4 {
48
+ .with-suffix__spacer_1apty {
49
49
  visibility: hidden;
50
50
  flex-shrink: 0;
51
51
  white-space: pre;
52
52
  }
53
- .with-suffix__suffix_582e4 {
53
+ .with-suffix__suffix_1apty {
54
54
  white-space: pre;
55
55
  }
56
- .with-suffix__disabled_582e4 {
56
+ .with-suffix__disabled_1apty {
57
57
  color: var(--input-disabled-color);
58
58
  }
59
- .with-suffix__readOnly_582e4 {
59
+ .with-suffix__readOnly_1apty {
60
60
  color: var(--input-read-only-color);
61
61
  }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
+ export { withSuffix } from './Component.js';
1
2
  import 'react';
2
3
  import 'react-merge-refs';
3
4
  import 'classnames';
4
5
  import '@alfalab/core-components-portal/modern';
5
- export { withSuffix } from './Component.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-with-suffix",
3
- "version": "4.0.14",
3
+ "version": "4.0.16",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -17,8 +17,8 @@
17
17
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
18
18
  },
19
19
  "dependencies": {
20
- "@alfalab/core-components-input": "^11.1.0",
21
- "@alfalab/core-components-portal": "^3.1.0",
20
+ "@alfalab/core-components-input": "^11.1.1",
21
+ "@alfalab/core-components-portal": "^3.1.2",
22
22
  "classnames": "^2.3.1",
23
23
  "react-merge-refs": "^1.1.0"
24
24
  }