@semcore/input 16.1.1 → 16.1.2-prerelease.9

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [16.1.2] - 2026-02-16
6
+
7
+ ### Changed
8
+
9
+ - Addon right padding for L size.
10
+
5
11
  ## [16.1.1] - 2025-10-29
6
12
 
7
13
  ### Changed
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![version](https://img.shields.io/npm/v/@semcore/input.svg)](https://www.npmjs.com/@semcore/input)
4
4
  [![downloads](https://img.shields.io/npm/dt/@semcore/input.svg)](https://www.npmjs.com/package/@semcore/input)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/semrush/intergalactic/blob/master/LICENSE)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/semrush/intergalactic/blob/HEAD/LICENSE)
6
6
 
7
7
  > This component is part of the Intergalactic Design System
8
8
 
@@ -20,13 +20,13 @@ npm install @semcore/input
20
20
 
21
21
  ## 👤 Author
22
22
 
23
- [UI-kit team](https://github.com/semrush/intergalactic/blob/master/MAINTAINERS) and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors)
23
+ [UI-kit team](https://github.com/semrush/intergalactic/blob/HEAD/MAINTAINERS) and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors)
24
24
 
25
25
  ## 🤝 Contributing
26
26
 
27
27
  Contributions, issues and feature requests are welcome!
28
28
 
29
- Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at the [contributing guide](https://github.com/semrush/intergalactic/blob/master/CONTRIBUTING.md).
29
+ Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at the [contributing guide](https://github.com/semrush/intergalactic/blob/HEAD/CONTRIBUTING.md).
30
30
 
31
31
  ## Show your support
32
32
 
@@ -34,4 +34,4 @@ Give a ⭐️ if this project helped you!
34
34
 
35
35
  ## 📝 License
36
36
 
37
- This project is [MIT](https://github.com/semrush/intergalactic/blob/master/LICENSE) licensed.
37
+ This project is [MIT](https://github.com/semrush/intergalactic/blob/HEAD/LICENSE) licensed.
package/lib/cjs/Input.js CHANGED
@@ -1,202 +1,179 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports["default"] = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
7
+ exports.default = void 0;
13
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
9
  var _core = require("@semcore/core");
15
- var _autoFocusEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/autoFocusEnhance"));
16
- var _flexBox = require("@semcore/flex-box");
17
- var _neighborLocation = _interopRequireDefault(require("@semcore/neighbor-location"));
10
+ var _baseComponents = require("@semcore/base-components");
18
11
  var _react = _interopRequireDefault(require("react"));
19
12
  /*!__reshadow-styles__:"./style/input.shadow.css"*/
20
- var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SInput_1qrmt_gg_{display:inline-flex;width:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box}.___SInput_1qrmt_gg_ input:-webkit-autofill{border-radius:var(--intergalactic-control-rounded, 6px);-webkit-box-shadow:0 0 0 30px #faffbd inset}.___SInput_1qrmt_gg_ input:-webkit-autofill~.___SOutline_1qrmt_gg_{background-color:#faffbd}.___SInput_1qrmt_gg_ .___SValue_1qrmt_gg_:focus,.___SInput_1qrmt_gg_ .___SValue_1qrmt_gg_:focus-visible,.___SInput_1qrmt_gg_ .___SValue_1qrmt_gg_:focus-visible::after,.___SInput_1qrmt_gg_ .___SValue_1qrmt_gg_:focus::after{outline:0}.___SValue_1qrmt_gg_{min-width:0;width:100%;height:100%;padding:0;border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;text-overflow:ellipsis;font-family:inherit;background:0 0}.___SValue_1qrmt_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_1qrmt_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_1qrmt_gg_:not(:disabled):-moz-read-only~.___SOutline_1qrmt_gg_{background:var(--intergalactic-bg-secondary-neutral, #f4f5f9)}.___SValue_1qrmt_gg_:not(:disabled):read-only~.___SOutline_1qrmt_gg_{background:var(--intergalactic-bg-secondary-neutral, #f4f5f9)}.___SValue_1qrmt_gg_:disabled{-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SInput_1qrmt_gg_.__disabled_1qrmt_gg_ .___SOutline_1qrmt_gg_,.___SValue_1qrmt_gg_:disabled~.___SOutline_1qrmt_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SOutline_1qrmt_gg_{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid;border-radius:var(--intergalactic-control-rounded, 6px);z-index:-1;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SAddon_1qrmt_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;padding:0 var(--intergalactic-spacing-2x, 8px);height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6)}.___SAddon_1qrmt_gg_.__interactive_1qrmt_gg_{cursor:pointer}@media (hover:hover){.___SAddon_1qrmt_gg_.__interactive_1qrmt_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SAddon_1qrmt_gg_.__disabled_1qrmt_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SAddon_1qrmt_gg_._size_m_1qrmt_gg_:not(.___SButton_1qrmt_gg_){padding:0 var(--intergalactic-spacing-2x, 8px)}.___SAddon_1qrmt_gg_._size_l_1qrmt_gg_:not(.___SButton_1qrmt_gg_){padding:0 var(--intergalactic-spacing-2x, 8px)0 var(--intergalactic-spacing-3x, 12px)}.___SInput_1qrmt_gg_ .___SAddon_1qrmt_gg_:nth-last-child(2){margin-right:-1px}.___SValue_1qrmt_gg_._size_m_1qrmt_gg_{padding:0 var(--intergalactic-spacing-2x, 8px)}.___SValue_1qrmt_gg_._size_l_1qrmt_gg_{padding:0 var(--intergalactic-spacing-3x, 12px)}.___SInput_1qrmt_gg_._size_m_1qrmt_gg_{font-size:var(--intergalactic-fs-200, 14px);height:var(--intergalactic-form-control-m, 28px)}.___SInput_1qrmt_gg_._size_l_1qrmt_gg_{font-size:var(--intergalactic-fs-300, 16px);height:var(--intergalactic-form-control-l, 40px)}.___SInput_1qrmt_gg_:has(.___SValue_1qrmt_gg_:focus-visible){z-index:1}.___SInput_1qrmt_gg_._state_normal_1qrmt_gg_ .___SOutline_1qrmt_gg_{border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SInput_1qrmt_gg_._state_normal_1qrmt_gg_:has(.___SValue_1qrmt_gg_:focus-visible) .___SOutline_1qrmt_gg_{outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;outline-offset:0;transition-property:outline-color,outline-width;border-color:var(--intergalactic-border-info-active, #006dca)}.___SInput_1qrmt_gg_._state_valid_1qrmt_gg_ .___SOutline_1qrmt_gg_{border-color:var(--intergalactic-border-success-active, #007c65)}.___SInput_1qrmt_gg_._state_valid_1qrmt_gg_:has(.___SValue_1qrmt_gg_:focus-visible) .___SOutline_1qrmt_gg_{outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;outline-offset:0;transition-property:outline-color,outline-width;border-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInput_1qrmt_gg_._state_invalid_1qrmt_gg_ .___SOutline_1qrmt_gg_{border-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInput_1qrmt_gg_._state_invalid_1qrmt_gg_:has(.___SValue_1qrmt_gg_:focus-visible) .___SOutline_1qrmt_gg_{outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;outline-offset:0;transition-property:outline-color,outline-width;border-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SInput_1qrmt_gg_._neighborLocation_right_1qrmt_gg_ .___SOutline_1qrmt_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SInput_1qrmt_gg_._neighborLocation_both_1qrmt_gg_ .___SOutline_1qrmt_gg_{border-radius:0;border-left:none}.___SInput_1qrmt_gg_._neighborLocation_left_1qrmt_gg_ .___SOutline_1qrmt_gg_{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.___SValue_1qrmt_gg_._neighborLocation_right_1qrmt_gg_{padding-right:0}.___SValue_1qrmt_gg_._neighborLocation_both_1qrmt_gg_{padding-left:0;padding-right:0}.___SValue_1qrmt_gg_._neighborLocation_left_1qrmt_gg_{padding-left:0}", /*__inner_css_end__*/"1qrmt_gg_"),
13
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SInput_1yq06_gg_{display:inline-flex;width:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box}.___SInput_1yq06_gg_ input:-webkit-autofill{border-radius:var(--intergalactic-control-rounded, 6px);-webkit-box-shadow:0 0 0 30px #faffbd inset}.___SInput_1yq06_gg_ input:-webkit-autofill~.___SOutline_1yq06_gg_{background-color:#faffbd}.___SInput_1yq06_gg_ .___SValue_1yq06_gg_:focus,.___SInput_1yq06_gg_ .___SValue_1yq06_gg_:focus-visible,.___SInput_1yq06_gg_ .___SValue_1yq06_gg_:focus-visible::after,.___SInput_1yq06_gg_ .___SValue_1yq06_gg_:focus::after{outline:0}.___SValue_1yq06_gg_{min-width:0;width:100%;height:100%;padding:0;border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;text-overflow:ellipsis;font-family:inherit;background:0 0}.___SValue_1yq06_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_1yq06_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_1yq06_gg_:not(:disabled):-moz-read-only~.___SOutline_1yq06_gg_{background:var(--intergalactic-bg-secondary-neutral, #f4f5f9)}.___SValue_1yq06_gg_:not(:disabled):read-only~.___SOutline_1yq06_gg_{background:var(--intergalactic-bg-secondary-neutral, #f4f5f9)}.___SValue_1yq06_gg_:disabled{-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SInput_1yq06_gg_.__disabled_1yq06_gg_ .___SOutline_1yq06_gg_,.___SValue_1yq06_gg_:disabled~.___SOutline_1yq06_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SOutline_1yq06_gg_{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid;border-radius:var(--intergalactic-control-rounded, 6px);z-index:-1;background:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SAddon_1yq06_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;padding:0 var(--intergalactic-spacing-2x, 8px);height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6)}.___SAddon_1yq06_gg_.__interactive_1yq06_gg_{cursor:pointer}@media (hover:hover){.___SAddon_1yq06_gg_.__interactive_1yq06_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SAddon_1yq06_gg_.__disabled_1yq06_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SAddon_1yq06_gg_._size_m_1yq06_gg_:not(.___SButton_1yq06_gg_){padding:0 var(--intergalactic-spacing-2x, 8px)}.___SAddon_1yq06_gg_._size_l_1yq06_gg_._neighborLocation_right_1yq06_gg_:not(.___SButton_1yq06_gg_){padding:0 var(--intergalactic-spacing-2x, 8px)0 var(--intergalactic-spacing-3x, 12px)}.___SAddon_1yq06_gg_._size_l_1yq06_gg_._neighborLocation_left_1yq06_gg_:not(.___SButton_1yq06_gg_){padding:0 var(--intergalactic-spacing-3x, 12px)0 var(--intergalactic-spacing-2x, 8px)}.___SInput_1yq06_gg_ .___SAddon_1yq06_gg_:nth-last-child(2){margin-right:-1px}.___SValue_1yq06_gg_._size_m_1yq06_gg_{padding:0 var(--intergalactic-spacing-2x, 8px)}.___SValue_1yq06_gg_._size_l_1yq06_gg_{padding:0 var(--intergalactic-spacing-3x, 12px)}.___SInput_1yq06_gg_._size_m_1yq06_gg_{font-size:var(--intergalactic-fs-200, 14px);height:var(--intergalactic-form-control-m, 28px)}.___SInput_1yq06_gg_._size_l_1yq06_gg_{font-size:var(--intergalactic-fs-300, 16px);height:var(--intergalactic-form-control-l, 40px)}.___SInput_1yq06_gg_:has(.___SValue_1yq06_gg_:focus-visible){z-index:1}.___SInput_1yq06_gg_._state_normal_1yq06_gg_ .___SOutline_1yq06_gg_{border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SInput_1yq06_gg_._state_normal_1yq06_gg_:has(.___SValue_1yq06_gg_:focus-visible) .___SOutline_1yq06_gg_{outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;outline-offset:0;transition-property:outline-color,outline-width;border-color:var(--intergalactic-border-info-active, #006dca)}.___SInput_1yq06_gg_._state_valid_1yq06_gg_ .___SOutline_1yq06_gg_{border-color:var(--intergalactic-border-success-active, #007c65)}.___SInput_1yq06_gg_._state_valid_1yq06_gg_:has(.___SValue_1yq06_gg_:focus-visible) .___SOutline_1yq06_gg_{outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;outline-offset:0;transition-property:outline-color,outline-width;border-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInput_1yq06_gg_._state_invalid_1yq06_gg_ .___SOutline_1yq06_gg_{border-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInput_1yq06_gg_._state_invalid_1yq06_gg_:has(.___SValue_1yq06_gg_:focus-visible) .___SOutline_1yq06_gg_{outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;outline-offset:0;transition-property:outline-color,outline-width;border-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SInput_1yq06_gg_._neighborLocation_right_1yq06_gg_ .___SOutline_1yq06_gg_{border-top-right-radius:0;border-bottom-right-radius:0}.___SInput_1yq06_gg_._neighborLocation_both_1yq06_gg_ .___SOutline_1yq06_gg_{border-radius:0;border-left:none}.___SInput_1yq06_gg_._neighborLocation_left_1yq06_gg_ .___SOutline_1yq06_gg_{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.___SValue_1yq06_gg_._neighborLocation_right_1yq06_gg_{padding-right:0}.___SValue_1yq06_gg_._neighborLocation_both_1yq06_gg_{padding-left:0;padding-right:0}.___SValue_1yq06_gg_._neighborLocation_left_1yq06_gg_{padding-left:0}", /*__inner_css_end__*/"1yq06_gg_"),
21
14
  /*__reshadow_css_end__*/
22
15
  {
23
- "__SInput": "___SInput_1qrmt_gg_",
24
- "_disabled": "__disabled_1qrmt_gg_",
25
- "__SOutline": "___SOutline_1qrmt_gg_",
26
- "__SValue": "___SValue_1qrmt_gg_",
27
- "__SAddon": "___SAddon_1qrmt_gg_",
28
- "_size_m": "_size_m_1qrmt_gg_",
29
- "__SButton": "___SButton_1qrmt_gg_",
30
- "_size_l": "_size_l_1qrmt_gg_",
31
- "_neighborLocation_right": "_neighborLocation_right_1qrmt_gg_",
32
- "_neighborLocation_both": "_neighborLocation_both_1qrmt_gg_",
33
- "_neighborLocation_left": "_neighborLocation_left_1qrmt_gg_",
34
- "_interactive": "__interactive_1qrmt_gg_",
35
- "_state_normal": "_state_normal_1qrmt_gg_",
36
- "_state_valid": "_state_valid_1qrmt_gg_",
37
- "_state_invalid": "_state_invalid_1qrmt_gg_"
16
+ "__SInput": "___SInput_1yq06_gg_",
17
+ "_disabled": "__disabled_1yq06_gg_",
18
+ "__SOutline": "___SOutline_1yq06_gg_",
19
+ "__SValue": "___SValue_1yq06_gg_",
20
+ "__SAddon": "___SAddon_1yq06_gg_",
21
+ "_size_m": "_size_m_1yq06_gg_",
22
+ "__SButton": "___SButton_1yq06_gg_",
23
+ "_size_l": "_size_l_1yq06_gg_",
24
+ "_neighborLocation_right": "_neighborLocation_right_1yq06_gg_",
25
+ "_neighborLocation_left": "_neighborLocation_left_1yq06_gg_",
26
+ "_neighborLocation_both": "_neighborLocation_both_1yq06_gg_",
27
+ "_interactive": "__interactive_1yq06_gg_",
28
+ "_state_normal": "_state_normal_1yq06_gg_",
29
+ "_state_valid": "_state_valid_1yq06_gg_",
30
+ "_state_invalid": "_state_invalid_1yq06_gg_"
38
31
  });
39
- var Input = /*#__PURE__*/function (_Component) {
40
- function Input() {
41
- var _this;
42
- (0, _classCallCheck2["default"])(this, Input);
43
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
44
- args[_key] = arguments[_key];
45
- }
46
- _this = (0, _callSuper2["default"])(this, Input, [].concat(args));
47
- (0, _defineProperty2["default"])(_this, "inputRef", /*#__PURE__*/_react["default"].createRef());
48
- (0, _defineProperty2["default"])(_this, "handleMouseDownAddon", function (event) {
49
- var _this$inputRef$curren;
32
+ class Input extends _core.Component {
33
+ constructor(...args) {
34
+ super(...args);
35
+ (0, _defineProperty2.default)(this, "inputRef", /*#__PURE__*/_react.default.createRef());
36
+ (0, _defineProperty2.default)(this, "handleMouseDownAddon", event => {
50
37
  event.preventDefault();
51
- (_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 || _this$inputRef$curren.focus();
38
+ this.inputRef.current?.focus();
52
39
  });
53
- (0, _defineProperty2["default"])(_this, "handleClick", function () {
40
+ (0, _defineProperty2.default)(this, "handleClick", () => {
54
41
  if (!_core.lastInteraction.isKeyboard) return;
55
- setTimeout(function () {
42
+ setTimeout(() => {
56
43
  if (document.activeElement === document.body) {
57
- var _this$inputRef$curren2;
58
- (_this$inputRef$curren2 = _this.inputRef.current) === null || _this$inputRef$curren2 === void 0 || _this$inputRef$curren2.focus();
44
+ this.inputRef.current?.focus();
59
45
  }
60
46
  }, 0);
61
47
  });
62
- return _this;
63
48
  }
64
- (0, _inherits2["default"])(Input, _Component);
65
- return (0, _createClass2["default"])(Input, [{
66
- key: "getAddonProps",
67
- value: function getAddonProps() {
68
- var _this$asProps = this.asProps,
69
- disabled = _this$asProps.disabled,
70
- size = _this$asProps.size;
71
- return {
72
- disabled: disabled,
73
- onMouseDown: this.handleMouseDownAddon,
74
- onClick: this.handleClick,
75
- size: size
76
- };
77
- }
78
- }, {
79
- key: "getValueProps",
80
- value: function getValueProps() {
81
- var _this$asProps2 = this.asProps,
82
- size = _this$asProps2.size,
83
- disabled = _this$asProps2.disabled,
84
- state = _this$asProps2.state,
85
- role = _this$asProps2.role,
86
- placeholder = _this$asProps2.placeholder,
87
- ariaHaspopup = _this$asProps2['aria-haspopup'],
88
- ariaControls = _this$asProps2['aria-controls'],
89
- ariaExpanded = _this$asProps2['aria-expanded'],
90
- ariaAutocomplete = _this$asProps2['aria-autocomplete'],
91
- ariaOwns = _this$asProps2['aria-owns'],
92
- ariaActivedescendant = _this$asProps2['aria-activedescendant'];
93
- return {
94
- 'ref': this.inputRef,
95
- size: size,
96
- disabled: disabled,
97
- state: state,
98
- role: role,
99
- placeholder: placeholder,
100
- 'aria-haspopup': ariaHaspopup,
101
- 'aria-controls': ariaControls,
102
- 'aria-expanded': ariaExpanded,
103
- 'aria-autocomplete': ariaAutocomplete,
104
- 'aria-owns': ariaOwns,
105
- 'aria-activedescendant': ariaActivedescendant
106
- };
107
- }
108
- }, {
109
- key: "render",
110
- value: function render() {
111
- var _ref = this.asProps;
112
- var SInput = _flexBox.Box;
113
- var SOutline = 'div';
114
- var _this$asProps3 = this.asProps,
115
- Children = _this$asProps3.Children,
116
- styles = _this$asProps3.styles,
117
- neighborLocation = _this$asProps3.neighborLocation,
118
- controlsLength = _this$asProps3.controlsLength,
119
- state = _this$asProps3.state;
120
- return /*#__PURE__*/_react["default"].createElement(_neighborLocation["default"].Detect, {
121
- neighborLocation: neighborLocation
122
- }, function (neighborLocation) {
123
- var _ref4;
124
- return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SInput, _ref4.cn("SInput", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
49
+ getAddonProps() {
50
+ const {
51
+ disabled,
52
+ size
53
+ } = this.asProps;
54
+ return {
55
+ disabled,
56
+ onMouseDown: this.handleMouseDownAddon,
57
+ onClick: this.handleClick,
58
+ size
59
+ };
60
+ }
61
+ getValueProps() {
62
+ const {
63
+ size,
64
+ disabled,
65
+ state,
66
+ role,
67
+ placeholder,
68
+ // these props might be passed from the <Select /> component
69
+ 'aria-haspopup': ariaHaspopup,
70
+ 'aria-controls': ariaControls,
71
+ 'aria-expanded': ariaExpanded,
72
+ 'aria-autocomplete': ariaAutocomplete,
73
+ 'aria-owns': ariaOwns,
74
+ 'aria-activedescendant': ariaActivedescendant
75
+ } = this.asProps;
76
+ return {
77
+ 'ref': this.inputRef,
78
+ size,
79
+ disabled,
80
+ state,
81
+ role,
82
+ placeholder,
83
+ 'aria-haspopup': ariaHaspopup,
84
+ 'aria-controls': ariaControls,
85
+ 'aria-expanded': ariaExpanded,
86
+ 'aria-autocomplete': ariaAutocomplete,
87
+ 'aria-owns': ariaOwns,
88
+ 'aria-activedescendant': ariaActivedescendant
89
+ };
90
+ }
91
+ render() {
92
+ var _ref = this.asProps;
93
+ const SInput = _baseComponents.Box;
94
+ const SOutline = 'div';
95
+ const {
96
+ Children,
97
+ styles,
98
+ neighborLocation,
99
+ controlsLength,
100
+ state
101
+ } = this.asProps;
102
+ return /*#__PURE__*/_react.default.createElement(_baseComponents.NeighborLocation.Detect, {
103
+ neighborLocation: neighborLocation
104
+ }, neighborLocation => {
105
+ var _ref4;
106
+ return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SInput, _ref4.cn("SInput", {
107
+ ...(0, _core.assignProps)({
125
108
  "neighborLocation": neighborLocation,
126
109
  "__excludeProps": ['role', 'aria-haspopup', 'aria-controls', 'aria-expanded', 'placeholder', 'aria-autocomplete', 'aria-owns', 'aria-activedescendant', 'tabIndex']
127
- }, _ref))), /*#__PURE__*/_react["default"].createElement(_neighborLocation["default"], _ref4.cn("NeighborLocation", {
128
- "controlsLength": controlsLength
129
- }), /*#__PURE__*/_react["default"].createElement(Children, _ref4.cn("Children", {}))), /*#__PURE__*/_react["default"].createElement(SOutline, _ref4.cn("SOutline", {}), state === 'invalid' && /*#__PURE__*/_react["default"].createElement(_flexBox.InvalidStateBox, _ref4.cn("InvalidStateBox", {}))));
130
- });
131
- }
132
- }]);
133
- }(_core.Component);
134
- (0, _defineProperty2["default"])(Input, "displayName", 'Input');
135
- (0, _defineProperty2["default"])(Input, "defaultProps", {
110
+ }, _ref)
111
+ }), /*#__PURE__*/_react.default.createElement(_baseComponents.NeighborLocation, _ref4.cn("NeighborLocation", {
112
+ "controlsLength": controlsLength
113
+ }), /*#__PURE__*/_react.default.createElement(Children, _ref4.cn("Children", {}))), /*#__PURE__*/_react.default.createElement(SOutline, _ref4.cn("SOutline", {}), state === 'invalid' && /*#__PURE__*/_react.default.createElement(_baseComponents.InvalidStateBox, _ref4.cn("InvalidStateBox", {}))));
114
+ });
115
+ }
116
+ }
117
+ (0, _defineProperty2.default)(Input, "displayName", 'Input');
118
+ (0, _defineProperty2.default)(Input, "defaultProps", {
136
119
  size: 'm',
137
120
  state: 'normal'
138
121
  });
139
- (0, _defineProperty2["default"])(Input, "style", style);
140
- var Value = /*#__PURE__*/function (_Component2) {
141
- function Value() {
142
- (0, _classCallCheck2["default"])(this, Value);
143
- return (0, _callSuper2["default"])(this, Value, arguments);
122
+ (0, _defineProperty2.default)(Input, "style", style);
123
+ class Value extends _core.Component {
124
+ uncontrolledProps() {
125
+ return {
126
+ value: e => e.target.value
127
+ };
144
128
  }
145
- (0, _inherits2["default"])(Value, _Component2);
146
- return (0, _createClass2["default"])(Value, [{
147
- key: "uncontrolledProps",
148
- value: function uncontrolledProps() {
149
- return {
150
- value: function value(e) {
151
- return e.target.value;
152
- }
153
- };
154
- }
155
- }, {
156
- key: "render",
157
- value: function render() {
158
- var _ref2 = this.asProps;
159
- var SValue = _flexBox.Box;
160
- var _this$asProps4 = this.asProps,
161
- styles = _this$asProps4.styles,
162
- neighborLocation = _this$asProps4.neighborLocation,
163
- state = _this$asProps4.state;
164
- return /*#__PURE__*/_react["default"].createElement(_neighborLocation["default"].Detect, {
165
- neighborLocation: neighborLocation
166
- }, function (neighborLocation) {
167
- var _ref5;
168
- return _ref5 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SValue, _ref5.cn("SValue", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
129
+ render() {
130
+ var _ref2 = this.asProps;
131
+ const SValue = _baseComponents.Box;
132
+ const {
133
+ styles,
134
+ neighborLocation,
135
+ state
136
+ } = this.asProps;
137
+ return /*#__PURE__*/_react.default.createElement(_baseComponents.NeighborLocation.Detect, {
138
+ neighborLocation: neighborLocation
139
+ }, neighborLocation => {
140
+ var _ref5;
141
+ return _ref5 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SValue, _ref5.cn("SValue", {
142
+ ...(0, _core.assignProps)({
169
143
  "inAfterOutline": true,
170
144
  "neighborLocation": neighborLocation,
171
145
  "tag": 'input',
172
146
  "type": 'text',
173
147
  "aria-invalid": state === 'invalid'
174
- }, _ref2))));
175
- });
176
- }
177
- }]);
178
- }(_core.Component);
179
- (0, _defineProperty2["default"])(Value, "defaultProps", {
148
+ }, _ref2)
149
+ }));
150
+ });
151
+ }
152
+ }
153
+ (0, _defineProperty2.default)(Value, "defaultProps", {
180
154
  defaultValue: ''
181
155
  });
182
- (0, _defineProperty2["default"])(Value, "enhance", [(0, _autoFocusEnhance["default"])()]);
183
156
  function Addon(props) {
184
157
  var _ref3 = arguments[0];
185
- var SAddon = _flexBox.Box;
186
- var Children = props.Children,
187
- styles = props.styles,
188
- neighborLocation = props.neighborLocation;
189
- return /*#__PURE__*/_react["default"].createElement(_neighborLocation["default"].Detect, {
158
+ const SAddon = _baseComponents.Box;
159
+ const {
160
+ Children,
161
+ styles,
162
+ neighborLocation
163
+ } = props;
164
+ return /*#__PURE__*/_react.default.createElement(_baseComponents.NeighborLocation.Detect, {
190
165
  neighborLocation: neighborLocation
191
- }, function (neighborLocation) {
166
+ }, neighborLocation => {
192
167
  var _ref6;
193
- return _ref6 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SAddon, _ref6.cn("SAddon", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
194
- "neighborLocation": neighborLocation
195
- }, _ref3))), /*#__PURE__*/_react["default"].createElement(Children, _ref6.cn("Children", {})));
168
+ return _ref6 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SAddon, _ref6.cn("SAddon", {
169
+ ...(0, _core.assignProps)({
170
+ "neighborLocation": neighborLocation
171
+ }, _ref3)
172
+ }), /*#__PURE__*/_react.default.createElement(Children, _ref6.cn("Children", {})));
196
173
  });
197
174
  }
198
- var _default = exports["default"] = (0, _core.createComponent)(Input, {
199
- Addon: Addon,
200
- Value: Value
175
+ var _default = exports.default = (0, _core.createComponent)(Input, {
176
+ Addon,
177
+ Value
201
178
  });
202
179
  //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","names":["_core","require","_autoFocusEnhance","_interopRequireDefault","_flexBox","_neighborLocation","_react","style","sstyled","insert","Input","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","React","createRef","event","_this$inputRef$curren","preventDefault","inputRef","current","focus","lastInteraction","isKeyboard","setTimeout","document","activeElement","body","_this$inputRef$curren2","_inherits2","_createClass2","key","value","getAddonProps","_this$asProps","asProps","disabled","size","onMouseDown","handleMouseDownAddon","onClick","handleClick","getValueProps","_this$asProps2","state","role","placeholder","ariaHaspopup","ariaControls","ariaExpanded","ariaAutocomplete","ariaOwns","ariaActivedescendant","render","_ref","SInput","Box","SOutline","_this$asProps3","Children","styles","neighborLocation","controlsLength","createElement","Detect","_ref4","cn","_objectSpread2","assignProps","InvalidStateBox","Component","Value","_Component2","uncontrolledProps","e","target","_ref2","SValue","_this$asProps4","_ref5","defaultValue","autoFocusEnhance","Addon","props","_ref3","arguments[0]","SAddon","_ref6","_default","exports","createComponent"],"sources":["../../src/Input.jsx"],"sourcesContent":["import { createComponent, Component, sstyled, Root, lastInteraction } from '@semcore/core';\nimport autoFocusEnhance from '@semcore/core/lib/utils/enhances/autoFocusEnhance';\nimport { Box, InvalidStateBox } from '@semcore/flex-box';\nimport NeighborLocation from '@semcore/neighbor-location';\nimport React from 'react';\n\nimport style from './style/input.shadow.css';\n\nclass Input extends Component {\n static displayName = 'Input';\n\n static defaultProps = {\n size: 'm',\n state: 'normal',\n };\n\n static style = style;\n\n inputRef = React.createRef();\n\n handleMouseDownAddon = (event) => {\n event.preventDefault();\n this.inputRef.current?.focus();\n };\n\n handleClick = () => {\n if (!lastInteraction.isKeyboard) return;\n setTimeout(() => {\n if (document.activeElement === document.body) {\n this.inputRef.current?.focus();\n }\n }, 0);\n };\n\n getAddonProps() {\n const { disabled, size } = this.asProps;\n return {\n disabled,\n onMouseDown: this.handleMouseDownAddon,\n onClick: this.handleClick,\n size,\n };\n }\n\n getValueProps() {\n const {\n size,\n disabled,\n state,\n role,\n placeholder,\n // these props might be passed from the <Select /> component\n 'aria-haspopup': ariaHaspopup,\n 'aria-controls': ariaControls,\n 'aria-expanded': ariaExpanded,\n 'aria-autocomplete': ariaAutocomplete,\n 'aria-owns': ariaOwns,\n 'aria-activedescendant': ariaActivedescendant,\n } = this.asProps;\n\n return {\n 'ref': this.inputRef,\n size,\n disabled,\n state,\n role,\n placeholder,\n 'aria-haspopup': ariaHaspopup,\n 'aria-controls': ariaControls,\n 'aria-expanded': ariaExpanded,\n 'aria-autocomplete': ariaAutocomplete,\n 'aria-owns': ariaOwns,\n 'aria-activedescendant': ariaActivedescendant,\n };\n }\n\n render() {\n const SInput = Root;\n const SOutline = 'div';\n const { Children, styles, neighborLocation, controlsLength, state } = this.asProps;\n return (\n <NeighborLocation.Detect neighborLocation={neighborLocation}>\n {(neighborLocation) =>\n sstyled(styles)(\n <SInput\n render={Box}\n neighborLocation={neighborLocation}\n __excludeProps={[\n 'role',\n 'aria-haspopup',\n 'aria-controls',\n 'aria-expanded',\n 'placeholder',\n 'aria-autocomplete',\n 'aria-owns',\n 'aria-activedescendant',\n 'tabIndex',\n ]}\n >\n <NeighborLocation controlsLength={controlsLength}>\n <Children />\n </NeighborLocation>\n <SOutline>{state === 'invalid' && <InvalidStateBox />}</SOutline>\n </SInput>,\n )}\n </NeighborLocation.Detect>\n );\n }\n}\n\nclass Value extends Component {\n static defaultProps = {\n defaultValue: '',\n };\n\n static enhance = [autoFocusEnhance()];\n\n uncontrolledProps() {\n return {\n value: (e) => e.target.value,\n };\n }\n\n render() {\n const SValue = Root;\n const { styles, neighborLocation, state } = this.asProps;\n\n return (\n <NeighborLocation.Detect neighborLocation={neighborLocation}>\n {(neighborLocation) =>\n sstyled(styles)(\n <SValue\n render={Box}\n inAfterOutline\n neighborLocation={neighborLocation}\n tag='input'\n type='text'\n aria-invalid={state === 'invalid'}\n />,\n )}\n </NeighborLocation.Detect>\n );\n }\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n const { Children, styles, neighborLocation } = props;\n return (\n <NeighborLocation.Detect neighborLocation={neighborLocation}>\n {(neighborLocation) =>\n sstyled(styles)(\n <SAddon render={Box} neighborLocation={neighborLocation}>\n <Children />\n </SAddon>,\n )}\n </NeighborLocation.Detect>\n );\n}\n\nexport default createComponent(Input, {\n Addon,\n Value,\n});\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AAA0B;AAAA,IAAAM,KAAA,8BAAAP,KAAA,CAAAQ,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIpBC,KAAK,0BAAAC,UAAA;EAAA,SAAAD,MAAA;IAAA,IAAAE,KAAA;IAAA,IAAAC,gBAAA,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;UAAA,OAC9B,OAAO;UAAA,QACN,MAAM;UAAA,gBACGjB,KAAK,KAAK;QAAS,GAAAgC,KAAA,GAClC,CAAC;MAAA,CAEiB,CAAC;IAE9B;EAAC;AAAA,EAhCiBN,eAAS;AAAA,IAAAzD,gBAAA,aAAvB0D,KAAK,kBACa;EACpBS,YAAY,EAAE;AAChB,CAAC;AAAA,IAAAnE,gBAAA,aAHG0D,KAAK,aAKQ,CAAC,IAAAU,4BAAgB,EAAC,CAAC,CAAC;AA8BvC,SAASC,KAAKA,CAACC,KAAK,EAAE;EAAA,IAAAC,KAAA,GAAAC,YAAA;EACpB,IAAMC,MAAM,GAMY9B,YAAG;EAL3B,IAAQG,QAAQ,GAA+BwB,KAAK,CAA5CxB,QAAQ;IAAEC,MAAM,GAAuBuB,KAAK,CAAlCvB,MAAM;IAAEC,gBAAgB,GAAKsB,KAAK,CAA1BtB,gBAAgB;EAC1C,oBACEhE,MAAA,YAAAkE,aAAA,CAACnE,iBAAA,WAAgB,CAACoE,MAAM;IAACH,gBAAgB,EAAEA;EAAiB,GACzD,UAACA,gBAAgB;IAAA,IAAA0B,KAAA;IAAA,OAAAA,KAAA,GAChB,IAAAxF,aAAO,EAAC6D,MAAM,CAAC,eACb/D,MAAA,YAAAkE,aAAA,CAACuB,MAAM,EAAAC,KAAA,CAAArB,EAAA,eAAAC,cAAA,qBAAA5E,KAAA,CAAA6E,WAAA;MAAA,oBAAgCP;IAAgB,GAAAuB,KAAA,kBACrDvF,MAAA,YAAAkE,aAAA,CAACJ,QAAQ,EAAA4B,KAAA,CAAArB,EAAA,gBAAE,CACL,CAAC;EAAA,CAEU,CAAC;AAE9B;AAAC,IAAAsB,QAAA,GAAAC,OAAA,cAEc,IAAAC,qBAAe,EAACzF,KAAK,EAAE;EACpCiF,KAAK,EAALA,KAAK;EACLX,KAAK,EAALA;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Input.js","names":["_core","require","_baseComponents","_react","_interopRequireDefault","style","sstyled","insert","Input","Component","constructor","args","_defineProperty2","default","React","createRef","event","preventDefault","inputRef","current","focus","lastInteraction","isKeyboard","setTimeout","document","activeElement","body","getAddonProps","disabled","size","asProps","onMouseDown","handleMouseDownAddon","onClick","handleClick","getValueProps","state","role","placeholder","ariaHaspopup","ariaControls","ariaExpanded","ariaAutocomplete","ariaOwns","ariaActivedescendant","render","_ref","SInput","Box","SOutline","Children","styles","neighborLocation","controlsLength","createElement","NeighborLocation","Detect","_ref4","cn","assignProps","InvalidStateBox","Value","uncontrolledProps","value","e","target","_ref2","SValue","_ref5","defaultValue","Addon","props","_ref3","arguments[0]","SAddon","_ref6","_default","exports","createComponent"],"sources":["../../src/Input.jsx"],"sourcesContent":["import { NeighborLocation, Box, InvalidStateBox } from '@semcore/base-components';\nimport { createComponent, Component, sstyled, Root, lastInteraction } from '@semcore/core';\nimport React from 'react';\n\nimport style from './style/input.shadow.css';\n\nclass Input extends Component {\n static displayName = 'Input';\n\n static defaultProps = {\n size: 'm',\n state: 'normal',\n };\n\n static style = style;\n\n inputRef = React.createRef();\n\n handleMouseDownAddon = (event) => {\n event.preventDefault();\n this.inputRef.current?.focus();\n };\n\n handleClick = () => {\n if (!lastInteraction.isKeyboard) return;\n setTimeout(() => {\n if (document.activeElement === document.body) {\n this.inputRef.current?.focus();\n }\n }, 0);\n };\n\n getAddonProps() {\n const { disabled, size } = this.asProps;\n return {\n disabled,\n onMouseDown: this.handleMouseDownAddon,\n onClick: this.handleClick,\n size,\n };\n }\n\n getValueProps() {\n const {\n size,\n disabled,\n state,\n role,\n placeholder,\n // these props might be passed from the <Select /> component\n 'aria-haspopup': ariaHaspopup,\n 'aria-controls': ariaControls,\n 'aria-expanded': ariaExpanded,\n 'aria-autocomplete': ariaAutocomplete,\n 'aria-owns': ariaOwns,\n 'aria-activedescendant': ariaActivedescendant,\n } = this.asProps;\n\n return {\n 'ref': this.inputRef,\n size,\n disabled,\n state,\n role,\n placeholder,\n 'aria-haspopup': ariaHaspopup,\n 'aria-controls': ariaControls,\n 'aria-expanded': ariaExpanded,\n 'aria-autocomplete': ariaAutocomplete,\n 'aria-owns': ariaOwns,\n 'aria-activedescendant': ariaActivedescendant,\n };\n }\n\n render() {\n const SInput = Root;\n const SOutline = 'div';\n const { Children, styles, neighborLocation, controlsLength, state } = this.asProps;\n return (\n <NeighborLocation.Detect neighborLocation={neighborLocation}>\n {(neighborLocation) =>\n sstyled(styles)(\n <SInput\n render={Box}\n neighborLocation={neighborLocation}\n __excludeProps={[\n 'role',\n 'aria-haspopup',\n 'aria-controls',\n 'aria-expanded',\n 'placeholder',\n 'aria-autocomplete',\n 'aria-owns',\n 'aria-activedescendant',\n 'tabIndex',\n ]}\n >\n <NeighborLocation controlsLength={controlsLength}>\n <Children />\n </NeighborLocation>\n <SOutline>{state === 'invalid' && <InvalidStateBox />}</SOutline>\n </SInput>,\n )}\n </NeighborLocation.Detect>\n );\n }\n}\n\nclass Value extends Component {\n static defaultProps = {\n defaultValue: '',\n };\n\n uncontrolledProps() {\n return {\n value: (e) => e.target.value,\n };\n }\n\n render() {\n const SValue = Root;\n const { styles, neighborLocation, state } = this.asProps;\n\n return (\n <NeighborLocation.Detect neighborLocation={neighborLocation}>\n {(neighborLocation) =>\n sstyled(styles)(\n <SValue\n render={Box}\n inAfterOutline\n neighborLocation={neighborLocation}\n tag='input'\n type='text'\n aria-invalid={state === 'invalid'}\n />,\n )}\n </NeighborLocation.Detect>\n );\n }\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n const { Children, styles, neighborLocation } = props;\n return (\n <NeighborLocation.Detect neighborLocation={neighborLocation}>\n {(neighborLocation) =>\n sstyled(styles)(\n <SAddon render={Box} neighborLocation={neighborLocation}>\n <Children />\n </SAddon>,\n )}\n </NeighborLocation.Detect>\n );\n}\n\nexport default createComponent(Input, {\n Addon,\n Value,\n});\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE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AAM,EAAAC,KAAA,CAAAV,EAAA;QAAA,OAAA1D,KAAA,CAAA2D,WAAA;UAAA;UAAA,oBAGaP,gBAAgB;UAAA,OAC9B,OAAO;UAAA,QACN,MAAM;UAAA,gBACGhB,KAAK,KAAK;QAAS,GAAA8B,KAAA;MAAA,EAClC,CAAC;IAAA,CAEiB,CAAC;EAE9B;AACF;AAAC,IAAAtD,gBAAA,CAAAC,OAAA,EA/BKgD,KAAK,kBACa;EACpBQ,YAAY,EAAE;AAChB,CAAC;AA8BH,SAASC,KAAKA,CAACC,KAAK,EAAE;EAAA,IAAAC,KAAA,GAAAC,YAAA;EACpB,MAAMC,MAAM,GAMY1B,mBAAG;EAL3B,MAAM;IAAEE,QAAQ;IAAEC,MAAM;IAAEC;EAAiB,CAAC,GAAGmB,KAAK;EACpD,oBACEpE,MAAA,CAAAU,OAAA,CAAAyC,aAAA,CAACpD,eAAA,CAAAqD,gBAAgB,CAACC,MAAM;IAACJ,gBAAgB,EAAEA;EAAiB,GACxDA,gBAAgB;IAAA,IAAAuB,KAAA;IAAA,OAAAA,KAAA,GAChB,IAAArE,aAAO,EAAC6C,MAAM,CAAC,eACbhD,MAAA,CAAAU,OAAA,CAAAyC,aAAA,CAACoB,MAAM,EAAAC,KAAA,CAAAjB,EAAA;MAAA,OAAA1D,KAAA,CAAA2D,WAAA;QAAA,oBAAgCP;MAAgB,GAAAoB,KAAA;IAAA,iBACrDrE,MAAA,CAAAU,OAAA,CAAAyC,aAAA,CAACJ,QAAQ,EAAAyB,KAAA,CAAAjB,EAAA,gBAAE,CACL,CAAC;EAAA,CAEU,CAAC;AAE9B;AAAC,IAAAkB,QAAA,GAAAC,OAAA,CAAAhE,OAAA,GAEc,IAAAiE,qBAAe,EAACtE,KAAK,EAAE;EACpC8D,KAAK;EACLT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport type { WithAutoFocusEnhanceProps } from '@semcore/core/lib/utils/enhances/autoFocusEnhance';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type { NeighborItemProps, NeighborLocationProps } from '@semcore/neighbor-location';\nimport type React from 'react';\n\nexport type InputSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IInputProps extends InputProps, UnknownProperties {}\nexport type InputProps = BoxProps &\n NeighborItemProps &\n NeighborLocationProps & {\n /**\n * Sets the input and addons to the disabled state\n * */\n disabled?: boolean;\n /**\n * Input size\n * @default m\n */\n size?: InputSize;\n /**\n * Sets the input state\n * @default normal\n */\n state?: 'normal' | 'invalid' | 'valid';\n };\n\n/** @deprecated */\nexport interface IInputValueProps extends InputValueProps, UnknownProperties {}\nexport type InputValueProps = BoxProps &\n NeighborItemProps &\n WithAutoFocusEnhanceProps & {\n /**\n * Input value\n */\n value?: string;\n /**\n * Default value if `value` property is not provided\n */\n defaultValue?: string;\n /**\n * Handler for changing the value\n */\n onChange?: (value: string, event: React.SyntheticEvent<HTMLInputElement>) => void;\n /**\n * @deprecated Set `disabled` on `Input` instead.\n * */\n disabled?: boolean;\n /**\n * Sets the input to the read-only state\n * */\n readOnly?: boolean;\n /**\n * Input size\n * @default m\n */\n size?: InputSize;\n /**\n * Placeholder for input\n */\n placeholder?: string;\n };\n\n/** @deprecated */\nexport interface IInputAddonProps extends InputAddonProps, UnknownProperties {}\nexport type InputAddonProps = BoxProps &\n NeighborItemProps & {\n /**\n * Adds styles for interactive icons\n */\n interactive?: boolean;\n /**\n * Blocks the addon\n * */\n disabled?: boolean;\n /**\n * Input size\n * @default m\n */\n size?: InputSize;\n };\n\n/** @deprecated */\nexport interface IInputCtx extends InputCtx, UnknownProperties {}\nexport type InputCtx = {\n getValueProps: PropGetterFn;\n getAddonProps: PropGetterFn;\n};\n\ndeclare const Input: Intergalactic.Component<'div', InputProps, InputCtx> & {\n Value: Intergalactic.Component<'input', InputValueProps>;\n Addon: Intergalactic.Component<'div', InputAddonProps>;\n};\nexport default Input;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps, NeighborItemProps, NeighborLocationProps } from '@semcore/base-components';\nimport type { Intergalactic, PropGetterFn } from '@semcore/core';\nimport type React from 'react';\n\nexport type InputSize = 'm' | 'l';\n\nexport type InputProps = BoxProps &\n NeighborItemProps &\n NeighborLocationProps & {\n /**\n * Sets the input and addons to the disabled state\n * */\n disabled?: boolean;\n /**\n * Input size\n * @default m\n */\n size?: InputSize;\n /**\n * Sets the input state\n * @default normal\n */\n state?: 'normal' | 'invalid' | 'valid';\n };\n\nexport type InputValueProps = BoxProps &\n NeighborItemProps & {\n /**\n * Input value\n */\n value?: string;\n /**\n * Default value if `value` property is not provided\n */\n defaultValue?: string;\n /**\n * Handler for changing the value\n */\n onChange?: (value: string, event: React.SyntheticEvent<HTMLInputElement>) => void;\n /**\n * Sets the input to the read-only state\n * */\n readOnly?: boolean;\n /**\n * Input size\n * @default m\n */\n size?: InputSize;\n /**\n * Placeholder for input\n */\n placeholder?: string;\n /**\n * Flag to enable autofocusing after component mounting\n * @default false\n */\n autoFocus?: boolean;\n };\n\nexport type InputAddonProps = BoxProps &\n NeighborItemProps & {\n /**\n * Adds styles for interactive icons\n */\n interactive?: boolean;\n /**\n * Blocks the addon\n * */\n disabled?: boolean;\n /**\n * Input size\n * @default m\n */\n size?: InputSize;\n };\n\nexport type InputCtx = {\n getValueProps: PropGetterFn;\n getAddonProps: PropGetterFn;\n};\n\ndeclare const Input: Intergalactic.Component<'div', InputProps, InputCtx> & {\n Value: Intergalactic.Component<'input', InputValueProps>;\n Addon: Intergalactic.Component<'div', InputAddonProps>;\n};\nexport default Input;\n"],"mappings":"","ignoreList":[]}
package/lib/cjs/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  Object.defineProperty(exports, "default", {
8
8
  enumerable: true,
9
- get: function get() {
10
- return _Input["default"];
9
+ get: function () {
10
+ return _Input.default;
11
11
  }
12
12
  });
13
13
  var _Input = _interopRequireDefault(require("./Input"));
@@ -105,10 +105,14 @@ SAddon[size='m']:not(SButton) {
105
105
  padding: 0 var(--intergalactic-spacing-2x, 8px);
106
106
  }
107
107
 
108
- SAddon[size='l']:not(SButton) {
108
+ SAddon[size='l'][neighborLocation='right']:not(SButton) {
109
109
  padding: 0 var(--intergalactic-spacing-2x, 8px) 0 var(--intergalactic-spacing-3x, 12px);
110
110
  }
111
111
 
112
+ SAddon[size='l'][neighborLocation='left']:not(SButton) {
113
+ padding: 0 var(--intergalactic-spacing-3x, 12px) 0 var(--intergalactic-spacing-2x, 8px);
114
+ }
115
+
112
116
  SInput SAddon:nth-last-child(2) {
113
117
  margin-right: -1px;
114
118
  }