@semcore/inline-input 16.2.2 → 17.0.0-prerelease.18

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.
@@ -1,22 +1,16 @@
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");
10
+ var _baseComponents = require("@semcore/base-components");
15
11
  var _button = require("@semcore/button");
16
- var _autoFocusEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/autoFocusEnhance"));
17
12
  var _i18nEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/i18nEnhance"));
18
13
  var _hasParent = require("@semcore/core/lib/utils/hasParent");
19
- var _flexBox = require("@semcore/flex-box");
20
14
  var _m = _interopRequireDefault(require("@semcore/icon/Check/m"));
21
15
  var _m2 = _interopRequireDefault(require("@semcore/icon/Close/m"));
22
16
  var _inputNumber = _interopRequireDefault(require("@semcore/input-number"));
@@ -24,304 +18,267 @@ var _spin = _interopRequireDefault(require("@semcore/spin"));
24
18
  var _react = _interopRequireDefault(require("react"));
25
19
  var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
26
20
  /*!__reshadow-styles__:"./style/inline-input.shadow.css"*/
27
- var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SInlineInput_10nzu_gg_{display:inline-flex;width:100%;height:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SInlineInput_10nzu_gg_ .___SConfirmIcon_10nzu_gg_{color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SInlineInput_10nzu_gg_ .___SConfirmIcon_10nzu_gg_:hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SInlineInput_10nzu_gg_ .___SCancelIcon_10nzu_gg_{color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SInlineInput_10nzu_gg_ .___SCancelIcon_10nzu_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_10nzu_gg_ .___SValue_10nzu_gg_{min-width:0;width:100%;height:100%;padding:0 var(--intergalactic-spacing-1x, 4px);border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;line-height:1.2;text-overflow:ellipsis;font-family:inherit;background:0 0;min-height:1em}.___SInlineInput_10nzu_gg_ .___SValue_10nzu_gg_:focus,.___SInlineInput_10nzu_gg_ .___SValue_10nzu_gg_:focus-visible{outline:0}.___SInlineInput_10nzu_gg_ .___SValue_10nzu_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_10nzu_gg_ .___SValue_10nzu_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_10nzu_gg_ .___SValue_10nzu_gg_.__disabled_10nzu_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SInlineInput_10nzu_gg_ .___SValue_10nzu_gg_::-webkit-inner-spin-button,.___SInlineInput_10nzu_gg_ .___SValue_10nzu_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SInlineInput_10nzu_gg_ .___SValue_10nzu_gg_._type_number_10nzu_gg_{-moz-appearance:textfield}.___SUnderline_10nzu_gg_{display:flex;flex-direction:row;align-items:center;flex-grow:1;width:100%;height:100%;min-height:1em;border:1px solid transparent;border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SAddon_10nzu_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);padding:0 var(--intergalactic-spacing-1x, 4px)}.___SAddon_10nzu_gg_.__disabled_10nzu_gg_,.___SInlineInput_10nzu_gg_.__disabled_10nzu_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SUnderline_10nzu_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-info-active, #006dca);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SInlineInput_10nzu_gg_._state_valid_10nzu_gg_ .___SUnderline_10nzu_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_10nzu_gg_._state_valid_10nzu_gg_ .___SUnderline_10nzu_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInlineInput_10nzu_gg_._state_invalid_10nzu_gg_ .___SUnderline_10nzu_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_10nzu_gg_._state_invalid_10nzu_gg_ .___SUnderline_10nzu_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SValue_10nzu_gg_:focus~.___SControls_10nzu_gg_{display:flex}.___SInvalidPattern_10nzu_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}", /*__inner_css_end__*/"10nzu_gg_"),
21
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SInlineInput_mw77c_gg_{display:inline-flex;width:100%;height:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SInlineInput_mw77c_gg_ .___SConfirmIcon_mw77c_gg_{color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SInlineInput_mw77c_gg_ .___SConfirmIcon_mw77c_gg_:hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SInlineInput_mw77c_gg_ .___SCancelIcon_mw77c_gg_{color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SInlineInput_mw77c_gg_ .___SCancelIcon_mw77c_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_{min-width:0;width:100%;height:100%;padding:0 var(--intergalactic-spacing-1x, 4px);border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;line-height:1.2;text-overflow:ellipsis;font-family:inherit;background:0 0;min-height:1em}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_:focus,.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_:focus-visible{outline:0}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_.__disabled_mw77c_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-webkit-inner-spin-button,.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_._type_number_mw77c_gg_{-moz-appearance:textfield}.___SUnderline_mw77c_gg_{display:flex;flex-direction:row;align-items:center;flex-grow:1;width:100%;height:100%;min-height:1em;border:1px solid transparent;border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SAddon_mw77c_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);padding:0 var(--intergalactic-spacing-1x, 4px)}.___SAddon_mw77c_gg_.__disabled_mw77c_gg_,.___SInlineInput_mw77c_gg_.__disabled_mw77c_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-info-active, #006dca);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SInlineInput_mw77c_gg_._state_valid_mw77c_gg_ .___SUnderline_mw77c_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_mw77c_gg_._state_valid_mw77c_gg_ .___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInlineInput_mw77c_gg_._state_invalid_mw77c_gg_ .___SUnderline_mw77c_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_mw77c_gg_._state_invalid_mw77c_gg_ .___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SValue_mw77c_gg_:focus~.___SControls_mw77c_gg_{display:flex}.___SInvalidPattern_mw77c_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}", /*__inner_css_end__*/"mw77c_gg_"),
28
22
  /*__reshadow_css_end__*/
29
23
  {
30
- "__SInlineInput": "___SInlineInput_10nzu_gg_",
31
- "_disabled": "__disabled_10nzu_gg_",
32
- "__SUnderline": "___SUnderline_10nzu_gg_",
33
- "__SAddon": "___SAddon_10nzu_gg_",
34
- "_state_valid": "_state_valid_10nzu_gg_",
35
- "_state_invalid": "_state_invalid_10nzu_gg_",
36
- "__SValue": "___SValue_10nzu_gg_",
37
- "__SControls": "___SControls_10nzu_gg_",
38
- "__SInvalidPattern": "___SInvalidPattern_10nzu_gg_",
39
- "__SConfirmIcon": "___SConfirmIcon_10nzu_gg_",
40
- "__SCancelIcon": "___SCancelIcon_10nzu_gg_",
41
- "_type_number": "_type_number_10nzu_gg_"
24
+ "__SInlineInput": "___SInlineInput_mw77c_gg_",
25
+ "_disabled": "__disabled_mw77c_gg_",
26
+ "__SUnderline": "___SUnderline_mw77c_gg_",
27
+ "__SAddon": "___SAddon_mw77c_gg_",
28
+ "_state_valid": "_state_valid_mw77c_gg_",
29
+ "_state_invalid": "_state_invalid_mw77c_gg_",
30
+ "__SValue": "___SValue_mw77c_gg_",
31
+ "__SControls": "___SControls_mw77c_gg_",
32
+ "__SInvalidPattern": "___SInvalidPattern_mw77c_gg_",
33
+ "__SConfirmIcon": "___SConfirmIcon_mw77c_gg_",
34
+ "__SCancelIcon": "___SCancelIcon_mw77c_gg_",
35
+ "_type_number": "_type_number_mw77c_gg_"
42
36
  });
43
- var pointInsideOfRect = function pointInsideOfRect(_ref15) {
44
- var x = _ref15.x,
45
- y = _ref15.y,
46
- rect = _ref15.rect;
37
+ const pointInsideOfRect = ({
38
+ x,
39
+ y,
40
+ rect
41
+ }) => {
47
42
  return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;
48
43
  };
49
- var InlineInputBase = /*#__PURE__*/function (_Component) {
50
- function InlineInputBase() {
51
- var _this;
52
- (0, _classCallCheck2["default"])(this, InlineInputBase);
53
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
54
- args[_key] = arguments[_key];
55
- }
56
- _this = (0, _callSuper2["default"])(this, InlineInputBase, [].concat(args));
57
- (0, _defineProperty2["default"])(_this, "rootRef", /*#__PURE__*/_react["default"].createRef());
58
- (0, _defineProperty2["default"])(_this, "inputRef", /*#__PURE__*/_react["default"].createRef());
59
- (0, _defineProperty2["default"])(_this, "inputHandlersRef", /*#__PURE__*/_react["default"].createRef());
60
- (0, _defineProperty2["default"])(_this, "initValue", '');
61
- (0, _defineProperty2["default"])(_this, "lastMouseDownPosition", null);
62
- (0, _defineProperty2["default"])(_this, "lastHandledKeyboardEvent", -1);
63
- (0, _defineProperty2["default"])(_this, "handleDocumentMouseDown", function (event) {
64
- _this.lastMouseDownPosition = {
44
+ class InlineInputBase extends _core.Component {
45
+ constructor(...args) {
46
+ super(...args);
47
+ (0, _defineProperty2.default)(this, "rootRef", /*#__PURE__*/_react.default.createRef());
48
+ (0, _defineProperty2.default)(this, "inputRef", /*#__PURE__*/_react.default.createRef());
49
+ (0, _defineProperty2.default)(this, "initValue", '');
50
+ (0, _defineProperty2.default)(this, "lastMouseDownPosition", null);
51
+ (0, _defineProperty2.default)(this, "lastHandledKeyboardEvent", -1);
52
+ (0, _defineProperty2.default)(this, "handleDocumentMouseDown", event => {
53
+ this.lastMouseDownPosition = {
65
54
  x: event.clientX,
66
55
  y: event.clientY
67
56
  };
68
- _this.lastHandledKeyboardEvent = -1;
57
+ this.lastHandledKeyboardEvent = -1;
69
58
  });
70
- (0, _defineProperty2["default"])(_this, "handleDocumentKeyDown", function () {
71
- _this.lastMouseDownPosition = null;
59
+ (0, _defineProperty2.default)(this, "handleDocumentKeyDown", () => {
60
+ this.lastMouseDownPosition = null;
72
61
  });
73
- (0, _defineProperty2["default"])(_this, "increment", function (event) {
74
- var _this$inputRef$curren, _this$inputRef$curren2, _this$inputRef$curren3, _this$inputHandlersRe, _this$inputRef$curren4;
62
+ (0, _defineProperty2.default)(this, "increment", event => {
75
63
  // https://stackoverflow.com/questions/68010124/safari-number-input-stepup-stepdown-not-functioning-with-empty-value
76
- if (((_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 ? void 0 : _this$inputRef$curren.value) === '') _this.inputRef.current.value = _this.inputRef.current.min || '0';
77
- (_this$inputRef$curren2 = _this.inputRef.current) === null || _this$inputRef$curren2 === void 0 || (_this$inputRef$curren3 = _this$inputRef$curren2.stepUp) === null || _this$inputRef$curren3 === void 0 || _this$inputRef$curren3.call(_this$inputRef$curren2, event);
78
- (_this$inputHandlersRe = _this.inputHandlersRef.current) === null || _this$inputHandlersRe === void 0 || _this$inputHandlersRe.value((_this$inputRef$curren4 = _this.inputRef.current) === null || _this$inputRef$curren4 === void 0 ? void 0 : _this$inputRef$curren4.value, event);
64
+ if (this.inputRef.current?.value === '') this.inputRef.current.value = this.inputRef.current.min || '0';
65
+ this.inputRef.current?.stepUp?.(event);
79
66
  });
80
- (0, _defineProperty2["default"])(_this, "decrement", function (event) {
81
- var _this$inputRef$curren5, _this$inputRef$curren6, _this$inputRef$curren7, _this$inputHandlersRe2, _this$inputRef$curren8;
82
- if (((_this$inputRef$curren5 = _this.inputRef.current) === null || _this$inputRef$curren5 === void 0 ? void 0 : _this$inputRef$curren5.value) === '') _this.inputRef.current.value = _this.inputRef.current.max || '0';
83
- (_this$inputRef$curren6 = _this.inputRef.current) === null || _this$inputRef$curren6 === void 0 || (_this$inputRef$curren7 = _this$inputRef$curren6.stepDown) === null || _this$inputRef$curren7 === void 0 || _this$inputRef$curren7.call(_this$inputRef$curren6, event);
84
- (_this$inputHandlersRe2 = _this.inputHandlersRef.current) === null || _this$inputHandlersRe2 === void 0 || _this$inputHandlersRe2.value((_this$inputRef$curren8 = _this.inputRef.current) === null || _this$inputRef$curren8 === void 0 ? void 0 : _this$inputRef$curren8.value, event);
67
+ (0, _defineProperty2.default)(this, "decrement", event => {
68
+ if (this.inputRef.current?.value === '') this.inputRef.current.value = this.inputRef.current.max || '0';
69
+ this.inputRef.current?.stepDown?.(event);
85
70
  });
86
- (0, _defineProperty2["default"])(_this, "handleMouseDownAddon", function (event) {
87
- var _this$inputRef$curren9;
71
+ (0, _defineProperty2.default)(this, "handleMouseDownAddon", event => {
88
72
  event.preventDefault();
89
- (_this$inputRef$curren9 = _this.inputRef.current) === null || _this$inputRef$curren9 === void 0 || _this$inputRef$curren9.focus();
73
+ this.inputRef.current?.focus();
90
74
  });
91
- (0, _defineProperty2["default"])(_this, "handleConfirm", function (text, event) {
92
- var _this$asProps$onConfi, _this$asProps;
93
- (_this$asProps$onConfi = (_this$asProps = _this.asProps).onConfirm) === null || _this$asProps$onConfi === void 0 || _this$asProps$onConfi.call(_this$asProps, text, event);
75
+ (0, _defineProperty2.default)(this, "handleConfirm", (text, event) => {
76
+ this.asProps.onConfirm?.(text, event);
94
77
  });
95
- (0, _defineProperty2["default"])(_this, "handleCancel", function (prevText, event) {
96
- var _this$asProps$onCance, _this$asProps2;
97
- (_this$asProps$onCance = (_this$asProps2 = _this.asProps).onCancel) === null || _this$asProps$onCance === void 0 || _this$asProps$onCance.call(_this$asProps2, prevText, event);
78
+ (0, _defineProperty2.default)(this, "handleCancel", (prevText, event) => {
79
+ this.asProps.onCancel?.(prevText, event);
98
80
  });
99
- (0, _defineProperty2["default"])(_this, "handleBlur", function (event) {
100
- var _this$inputRef$curren0, _this$inputRef$curren1;
101
- var _this$asProps3 = _this.asProps,
102
- onConfirm = _this$asProps3.onConfirm,
103
- onCancel = _this$asProps3.onCancel,
104
- onBlurBehavior = _this$asProps3.onBlurBehavior;
81
+ (0, _defineProperty2.default)(this, "handleBlur", event => {
82
+ const {
83
+ onConfirm,
84
+ onCancel,
85
+ onBlurBehavior
86
+ } = this.asProps;
105
87
  if (!onBlurBehavior) return;
106
- if (Date.now() - _this.lastHandledKeyboardEvent < 250) return;
107
- if ((0, _hasParent.hasParent)(event.relatedTarget, _this.rootRef.current)) return;
108
- if (_this.lastMouseDownPosition && _this.rootRef.current) {
109
- var _this$lastMouseDownPo = _this.lastMouseDownPosition,
110
- x = _this$lastMouseDownPo.x,
111
- y = _this$lastMouseDownPo.y;
112
- var rect = _this.rootRef.current.getBoundingClientRect();
88
+ if (Date.now() - this.lastHandledKeyboardEvent < 250) return;
89
+ if ((0, _hasParent.hasParent)(event.relatedTarget, this.rootRef.current)) return;
90
+ if (this.lastMouseDownPosition && this.rootRef.current) {
91
+ const {
92
+ x,
93
+ y
94
+ } = this.lastMouseDownPosition;
95
+ const rect = this.rootRef.current.getBoundingClientRect();
113
96
  if (pointInsideOfRect({
114
- x: x,
115
- y: y,
116
- rect: rect
97
+ x,
98
+ y,
99
+ rect
117
100
  })) {
118
101
  return;
119
102
  }
120
103
  }
121
- if (onBlurBehavior === 'confirm') onConfirm === null || onConfirm === void 0 || onConfirm((_this$inputRef$curren0 = (_this$inputRef$curren1 = _this.inputRef.current) === null || _this$inputRef$curren1 === void 0 ? void 0 : _this$inputRef$curren1.value) !== null && _this$inputRef$curren0 !== void 0 ? _this$inputRef$curren0 : '', event);
122
- if (onBlurBehavior === 'cancel') onCancel === null || onCancel === void 0 || onCancel(_this.initValue, event);
104
+ if (onBlurBehavior === 'confirm') onConfirm?.(this.inputRef.current?.value ?? '', event);
105
+ if (onBlurBehavior === 'cancel') onCancel?.(this.initValue, event);
123
106
  });
124
- (0, _defineProperty2["default"])(_this, "handleKeyDown", function (event) {
125
- var _this$asProps4 = _this.asProps,
126
- onConfirm = _this$asProps4.onConfirm,
127
- onCancel = _this$asProps4.onCancel;
107
+ (0, _defineProperty2.default)(this, "handleKeyDown", event => {
108
+ const {
109
+ onConfirm,
110
+ onCancel
111
+ } = this.asProps;
128
112
  if (event.key === 'Enter') {
129
- var _this$inputRef$curren10, _this$inputRef$curren11;
130
- onConfirm === null || onConfirm === void 0 || onConfirm((_this$inputRef$curren10 = (_this$inputRef$curren11 = _this.inputRef.current) === null || _this$inputRef$curren11 === void 0 ? void 0 : _this$inputRef$curren11.value) !== null && _this$inputRef$curren10 !== void 0 ? _this$inputRef$curren10 : '', event);
131
- _this.lastHandledKeyboardEvent = Date.now();
113
+ onConfirm?.(this.inputRef.current?.value ?? '', event);
114
+ this.lastHandledKeyboardEvent = Date.now();
132
115
  }
133
116
  if (event.key === 'Escape') {
134
- onCancel === null || onCancel === void 0 || onCancel(_this.initValue, event);
135
- _this.lastHandledKeyboardEvent = Date.now();
117
+ onCancel?.(this.initValue, event);
118
+ this.lastHandledKeyboardEvent = Date.now();
136
119
  }
137
120
  });
138
- return _this;
139
121
  }
140
- (0, _inherits2["default"])(InlineInputBase, _Component);
141
- return (0, _createClass2["default"])(InlineInputBase, [{
142
- key: "componentDidMount",
143
- value: function componentDidMount() {
122
+ componentDidMount() {
123
+ this.updateInert();
124
+ if (!this.asProps.onBlurBehavior) return;
125
+ document.body.addEventListener('mousedown', this.handleDocumentMouseDown);
126
+ document.body.addEventListener('keydown', this.handleDocumentKeyDown);
127
+ }
128
+ componentDidUpdate(prevProps) {
129
+ if (prevProps.disabled !== this.asProps.disabled) {
144
130
  this.updateInert();
145
- if (!this.asProps.onBlurBehavior) return;
146
- document.body.addEventListener('mousedown', this.handleDocumentMouseDown);
147
- document.body.addEventListener('keydown', this.handleDocumentKeyDown);
148
- }
149
- }, {
150
- key: "componentDidUpdate",
151
- value: function componentDidUpdate(prevProps) {
152
- if (prevProps.disabled !== this.asProps.disabled) {
153
- this.updateInert();
154
- }
155
- }
156
- }, {
157
- key: "componentWillUnmount",
158
- value: function componentWillUnmount() {
159
- if (!this.asProps.onBlurBehavior) return;
160
- document.body.removeEventListener('mousedown', this.handleDocumentMouseDown);
161
- document.body.removeEventListener('keydown', this.handleDocumentKeyDown);
162
- }
163
- }, {
164
- key: "getAddonProps",
165
- value: function getAddonProps() {
166
- return {
167
- onMouseDown: this.handleMouseDownAddon
168
- };
169
- }
170
- }, {
171
- key: "getConfirmControlProps",
172
- value: function getConfirmControlProps() {
173
- var _this$asProps5 = this.asProps,
174
- loading = _this$asProps5.loading,
175
- getI18nText = _this$asProps5.getI18nText;
176
- return {
177
- inputRef: this.inputRef,
178
- loading: loading,
179
- onConfirm: this.handleConfirm,
180
- getI18nText: getI18nText
181
- };
182
131
  }
183
- }, {
184
- key: "getCancelControlProps",
185
- value: function getCancelControlProps() {
186
- var _this$asProps6 = this.asProps,
187
- loading = _this$asProps6.loading,
188
- disabled = _this$asProps6.disabled,
189
- getI18nText = _this$asProps6.getI18nText;
190
- return {
191
- value: this.initValue,
192
- // because double disabled(root disabled and addon disabled)
193
- disabled: loading && !disabled,
194
- onCancel: this.handleCancel,
195
- getI18nText: getI18nText
196
- };
197
- }
198
- }, {
199
- key: "getValueProps",
200
- value: function getValueProps() {
201
- var state = this.asProps.state;
202
- return {
203
- ref: this.inputRef,
204
- state: state,
205
- onKeyDown: this.handleKeyDown
206
- };
207
- }
208
- }, {
209
- key: "getNumberValueProps",
210
- value: function getNumberValueProps() {
211
- var numberFormatter = new Intl.NumberFormat(this.asProps.locale, {
212
- style: 'decimal'
213
- });
214
- return {
215
- numberFormatter: numberFormatter,
216
- inputRef: this.inputRef,
217
- inputHandlerRefs: this.inputHandlersRef,
218
- increment: this.increment,
219
- decrement: this.decrement
220
- };
221
- }
222
- }, {
223
- key: "getNumberControlsProps",
224
- value: function getNumberControlsProps() {
225
- var getI18nText = this.asProps.getI18nText;
226
- return {
227
- increment: this.increment,
228
- decrement: this.decrement,
229
- getI18nText: getI18nText
230
- };
231
- }
232
- }, {
233
- key: "updateInert",
234
- value: function updateInert() {
235
- var disabled = this.asProps.disabled;
236
- if (!this.rootRef.current) return;
237
- if (disabled) {
238
- this.rootRef.current.setAttribute('inert', '');
239
- } else {
240
- this.rootRef.current.removeAttribute('inert');
241
- }
132
+ }
133
+ componentWillUnmount() {
134
+ if (!this.asProps.onBlurBehavior) return;
135
+ document.body.removeEventListener('mousedown', this.handleDocumentMouseDown);
136
+ document.body.removeEventListener('keydown', this.handleDocumentKeyDown);
137
+ }
138
+ getAddonProps() {
139
+ return {
140
+ onMouseDown: this.handleMouseDownAddon
141
+ };
142
+ }
143
+ getConfirmControlProps() {
144
+ const {
145
+ loading,
146
+ getI18nText
147
+ } = this.asProps;
148
+ return {
149
+ inputRef: this.inputRef,
150
+ loading,
151
+ onConfirm: this.handleConfirm,
152
+ getI18nText
153
+ };
154
+ }
155
+ getCancelControlProps() {
156
+ const {
157
+ loading,
158
+ disabled,
159
+ getI18nText
160
+ } = this.asProps;
161
+ return {
162
+ value: this.initValue,
163
+ // because double disabled(root disabled and addon disabled)
164
+ disabled: loading && !disabled,
165
+ onCancel: this.handleCancel,
166
+ getI18nText
167
+ };
168
+ }
169
+ getValueProps() {
170
+ const {
171
+ state
172
+ } = this.asProps;
173
+ return {
174
+ ref: this.inputRef,
175
+ state,
176
+ onKeyDown: this.handleKeyDown
177
+ };
178
+ }
179
+ getNumberValueProps() {
180
+ const numberFormatter = new Intl.NumberFormat(this.asProps.locale, {
181
+ style: 'decimal'
182
+ });
183
+ return {
184
+ numberFormatter,
185
+ inputRef: this.inputRef,
186
+ increment: this.increment,
187
+ decrement: this.decrement
188
+ };
189
+ }
190
+ getNumberControlsProps() {
191
+ const {
192
+ getI18nText
193
+ } = this.asProps;
194
+ return {
195
+ increment: this.increment,
196
+ decrement: this.decrement,
197
+ getI18nText
198
+ };
199
+ }
200
+ updateInert() {
201
+ const {
202
+ disabled
203
+ } = this.asProps;
204
+ if (!this.rootRef.current) return;
205
+ if (disabled) {
206
+ this.rootRef.current.setAttribute('inert', '');
207
+ } else {
208
+ this.rootRef.current.removeAttribute('inert');
242
209
  }
243
- }, {
244
- key: "render",
245
- value: function render() {
246
- var _ref = this.asProps,
247
- _ref8;
248
- var SInlineInput = _flexBox.Box;
249
- var SUnderline = 'div';
250
- var SInvalidPattern = _flexBox.InvalidStateBox;
251
- var _this$asProps7 = this.asProps,
252
- Children = _this$asProps7.Children,
253
- styles = _this$asProps7.styles,
254
- state = _this$asProps7.state;
255
- return _ref8 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SInlineInput, _ref8.cn("SInlineInput", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
210
+ }
211
+ render() {
212
+ var _ref = this.asProps,
213
+ _ref8;
214
+ const SInlineInput = _baseComponents.Box;
215
+ const SUnderline = 'div';
216
+ const SInvalidPattern = _baseComponents.InvalidStateBox;
217
+ const {
218
+ Children,
219
+ styles,
220
+ state
221
+ } = this.asProps;
222
+ return _ref8 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SInlineInput, _ref8.cn("SInlineInput", {
223
+ ...(0, _core.assignProps)({
256
224
  "ref": this.rootRef,
257
225
  "onBlur": this.handleBlur
258
- }, _ref))), /*#__PURE__*/_react["default"].createElement(SUnderline, _ref8.cn("SUnderline", {}), state === 'invalid' && /*#__PURE__*/_react["default"].createElement(SInvalidPattern, _ref8.cn("SInvalidPattern", {})), /*#__PURE__*/_react["default"].createElement(Children, _ref8.cn("Children", {}))));
259
- }
260
- }]);
261
- }(_core.Component);
262
- (0, _defineProperty2["default"])(InlineInputBase, "displayName", 'InlineInput');
263
- (0, _defineProperty2["default"])(InlineInputBase, "enhance", [(0, _i18nEnhance["default"])(_intergalacticDynamicLocales.localizedMessages)]);
264
- (0, _defineProperty2["default"])(InlineInputBase, "defaultProps", {
226
+ }, _ref)
227
+ }), /*#__PURE__*/_react.default.createElement(SUnderline, _ref8.cn("SUnderline", {}), state === 'invalid' && /*#__PURE__*/_react.default.createElement(SInvalidPattern, _ref8.cn("SInvalidPattern", {})), /*#__PURE__*/_react.default.createElement(Children, _ref8.cn("Children", {}))));
228
+ }
229
+ }
230
+ (0, _defineProperty2.default)(InlineInputBase, "displayName", 'InlineInput');
231
+ (0, _defineProperty2.default)(InlineInputBase, "enhance", [(0, _i18nEnhance.default)(_intergalacticDynamicLocales.localizedMessages)]);
232
+ (0, _defineProperty2.default)(InlineInputBase, "defaultProps", {
265
233
  state: 'normal',
266
234
  onBlurBehavior: 'confirm',
267
235
  i18n: _intergalacticDynamicLocales.localizedMessages,
268
236
  locale: 'en'
269
237
  });
270
- (0, _defineProperty2["default"])(InlineInputBase, "style", style);
271
- var Value = /*#__PURE__*/function (_Component2) {
272
- function Value() {
273
- (0, _classCallCheck2["default"])(this, Value);
274
- return (0, _callSuper2["default"])(this, Value, arguments);
238
+ (0, _defineProperty2.default)(InlineInputBase, "style", style);
239
+ class Value extends _core.Component {
240
+ uncontrolledProps() {
241
+ return {
242
+ value: event => event.target.value
243
+ };
275
244
  }
276
- (0, _inherits2["default"])(Value, _Component2);
277
- return (0, _createClass2["default"])(Value, [{
278
- key: "uncontrolledProps",
279
- value: function uncontrolledProps() {
280
- return {
281
- value: function value(event) {
282
- return event.target.value;
283
- }
284
- };
285
- }
286
- }, {
287
- key: "render",
288
- value: function render() {
289
- var _ref2 = this.asProps,
290
- _ref9;
291
- var SValue = _flexBox.Box;
292
- return _ref9 = (0, _core.sstyled)(this.asProps.styles), /*#__PURE__*/_react["default"].createElement(SValue, _ref9.cn("SValue", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
245
+ render() {
246
+ var _ref2 = this.asProps,
247
+ _ref9;
248
+ const SValue = _baseComponents.Box;
249
+ return _ref9 = (0, _core.sstyled)(this.asProps.styles), /*#__PURE__*/_react.default.createElement(SValue, _ref9.cn("SValue", {
250
+ ...(0, _core.assignProps)({
293
251
  "tag": 'input',
294
252
  "type": 'text'
295
- }, _ref2))));
296
- }
297
- }]);
298
- }(_core.Component);
299
- (0, _defineProperty2["default"])(Value, "defaultProps", {
253
+ }, _ref2)
254
+ }));
255
+ }
256
+ }
257
+ (0, _defineProperty2.default)(Value, "defaultProps", {
300
258
  defaultValue: ''
301
259
  });
302
- (0, _defineProperty2["default"])(Value, "enhance", [(0, _autoFocusEnhance["default"])()]);
303
- (0, _defineProperty2["default"])(Value, "hoistProps", ['disabled']);
304
- var Addon = function Addon(props) {
260
+ function Addon(props) {
305
261
  var _ref3 = arguments[0],
306
262
  _ref0;
307
- var SAddon = _flexBox.Box;
308
- return _ref0 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SAddon, _ref0.cn("SAddon", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref3))));
309
- };
310
- var ConfirmControl = function ConfirmControl(props) {
263
+ const SAddon = _baseComponents.Box;
264
+ return _ref0 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SAddon, _ref0.cn("SAddon", {
265
+ ...(0, _core.assignProps)({}, _ref3)
266
+ }));
267
+ }
268
+ function ConfirmControl(props) {
311
269
  var _ref4 = arguments[0],
312
- _ref10,
313
- _props$title,
314
- _ref16;
315
- var SAddon = _flexBox.Box;
316
- var Children = props.Children,
317
- hasChildren = props.children,
318
- inputRef = props.inputRef;
319
- var title = (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : props.getI18nText('confirm');
320
- var handleConfirm = _react["default"].useCallback(function (event) {
321
- var _props$onConfirm, _inputRef$current$val, _inputRef$current;
322
- (_props$onConfirm = props.onConfirm) === null || _props$onConfirm === void 0 || _props$onConfirm.call(props, (_inputRef$current$val = inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value) !== null && _inputRef$current$val !== void 0 ? _inputRef$current$val : '', event);
323
- }, [props.onConfirm, inputRef === null || inputRef === void 0 ? void 0 : inputRef.current]);
324
- var handleKeydown = _react["default"].useCallback(function (event) {
270
+ _ref10;
271
+ const SAddon = _baseComponents.Box;
272
+ const {
273
+ Children,
274
+ children: hasChildren,
275
+ inputRef
276
+ } = props;
277
+ const title = props.title ?? props.getI18nText('confirm');
278
+ const handleConfirm = _react.default.useCallback(event => {
279
+ props.onConfirm?.(inputRef?.current?.value ?? '', event);
280
+ }, [props.onConfirm, inputRef?.current]);
281
+ const handleKeydown = _react.default.useCallback(event => {
325
282
  if (event.key === 'Enter' || event.key === ' ') {
326
283
  event.preventDefault();
327
284
  event.stopPropagation();
@@ -330,37 +287,40 @@ var ConfirmControl = function ConfirmControl(props) {
330
287
  }, [handleConfirm]);
331
288
  if (props.loading) {
332
289
  var _ref1;
333
- return _ref1 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SAddon, _ref1.cn("SAddon", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref4))), hasChildren ? /*#__PURE__*/_react["default"].createElement(Children, _ref1.cn("Children", {})) : /*#__PURE__*/_react["default"].createElement(_spin["default"], _ref1.cn("Spin", {
290
+ return _ref1 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SAddon, _ref1.cn("SAddon", {
291
+ ...(0, _core.assignProps)({}, _ref4)
292
+ }), hasChildren ? /*#__PURE__*/_react.default.createElement(Children, _ref1.cn("Children", {})) : /*#__PURE__*/_react.default.createElement(_spin.default, _ref1.cn("Spin", {
334
293
  "size": 'xs'
335
294
  })));
336
295
  }
337
- var sstyles = (0, _core.sstyled)(props.styles);
338
- var sConfirmIconStyles = sstyles.cn('SConfirmIcon', {});
339
- return _ref10 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SAddon, _ref10.cn("SAddon", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
340
- "onKeyDown": handleKeydown
341
- }, _ref4))), hasChildren ? /*#__PURE__*/_react["default"].createElement(Children, _ref10.cn("Children", {})) : /*#__PURE__*/_react["default"].createElement(_button.ButtonLink, _ref10.cn("ButtonLink", {
342
- "addonLeft": (_ref16 = props.icon) !== null && _ref16 !== void 0 ? _ref16 : _m["default"],
296
+ const sstyles = (0, _core.sstyled)(props.styles);
297
+ const sConfirmIconStyles = sstyles.cn('SConfirmIcon', {});
298
+ return _ref10 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SAddon, _ref10.cn("SAddon", {
299
+ ...(0, _core.assignProps)({
300
+ "onKeyDown": handleKeydown
301
+ }, _ref4)
302
+ }), hasChildren ? /*#__PURE__*/_react.default.createElement(Children, _ref10.cn("Children", {})) : /*#__PURE__*/_react.default.createElement(_button.ButtonLink, _ref10.cn("ButtonLink", {
303
+ "addonLeft": props.icon ?? _m.default,
343
304
  "use": 'secondary',
344
305
  "onClick": handleConfirm,
345
306
  "className": sConfirmIconStyles.className,
346
307
  "style": sConfirmIconStyles.style,
347
308
  "aria-label": title
348
309
  })));
349
- };
350
- var CancelControl = function CancelControl(props) {
310
+ }
311
+ function CancelControl(props) {
351
312
  var _ref5 = arguments[0],
352
- _ref12,
353
- _props$title2,
354
- _ref17;
355
- var SAddon = _flexBox.Box;
356
- var Children = props.Children,
357
- hasChildren = props.children;
358
- var title = (_props$title2 = props.title) !== null && _props$title2 !== void 0 ? _props$title2 : props.getI18nText('discard');
359
- var handleCancel = _react["default"].useCallback(function (event) {
360
- var _props$onCancel, _props$value;
361
- (_props$onCancel = props.onCancel) === null || _props$onCancel === void 0 || _props$onCancel.call(props, (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : '', event);
313
+ _ref12;
314
+ const SAddon = _baseComponents.Box;
315
+ const {
316
+ Children,
317
+ children: hasChildren
318
+ } = props;
319
+ const title = props.title ?? props.getI18nText('discard');
320
+ const handleCancel = _react.default.useCallback(event => {
321
+ props.onCancel?.(props.value ?? '', event);
362
322
  }, [props.onCancel, props.value]);
363
- var handleKeydown = _react["default"].useCallback(function (event) {
323
+ const handleKeydown = _react.default.useCallback(event => {
364
324
  if (event.key === 'Enter' || event.key === ' ') {
365
325
  event.preventDefault();
366
326
  event.stopPropagation();
@@ -369,44 +329,53 @@ var CancelControl = function CancelControl(props) {
369
329
  }, [handleCancel]);
370
330
  if (props.disabled) {
371
331
  var _ref11;
372
- return _ref11 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SAddon, _ref11.cn("SAddon", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref5))), hasChildren ? /*#__PURE__*/_react["default"].createElement(Children, _ref11.cn("Children", {})) : /*#__PURE__*/_react["default"].createElement(_m2["default"], _ref11.cn("CloseM", {})));
332
+ return _ref11 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SAddon, _ref11.cn("SAddon", {
333
+ ...(0, _core.assignProps)({}, _ref5)
334
+ }), hasChildren ? /*#__PURE__*/_react.default.createElement(Children, _ref11.cn("Children", {})) : /*#__PURE__*/_react.default.createElement(_m2.default, _ref11.cn("CloseM", {})));
373
335
  }
374
- var sstyles = (0, _core.sstyled)(props.styles);
375
- var sCancelIconStyles = sstyles.cn('SCancelIcon', {});
376
- return _ref12 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SAddon, _ref12.cn("SAddon", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
377
- "onKeyDown": handleKeydown
378
- }, _ref5))), hasChildren ? /*#__PURE__*/_react["default"].createElement(Children, _ref12.cn("Children", {})) : /*#__PURE__*/_react["default"].createElement(_button.ButtonLink, _ref12.cn("ButtonLink", {
336
+ const sstyles = (0, _core.sstyled)(props.styles);
337
+ const sCancelIconStyles = sstyles.cn('SCancelIcon', {});
338
+ return _ref12 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SAddon, _ref12.cn("SAddon", {
339
+ ...(0, _core.assignProps)({
340
+ "onKeyDown": handleKeydown
341
+ }, _ref5)
342
+ }), hasChildren ? /*#__PURE__*/_react.default.createElement(Children, _ref12.cn("Children", {})) : /*#__PURE__*/_react.default.createElement(_button.ButtonLink, _ref12.cn("ButtonLink", {
379
343
  "use": 'secondary',
380
- "addonLeft": (_ref17 = props.icon) !== null && _ref17 !== void 0 ? _ref17 : _m2["default"],
344
+ "addonLeft": props.icon ?? _m2.default,
381
345
  "onClick": handleCancel,
382
346
  "className": sCancelIconStyles.className,
383
347
  "style": sCancelIconStyles.style,
384
348
  "aria-label": title
385
349
  })));
386
- };
387
- var NumberValue = function NumberValue(props) {
350
+ }
351
+ function NumberValue(props) {
388
352
  var _ref6 = arguments[0],
389
353
  _ref13;
390
- var SValue = _inputNumber["default"].Value;
391
- return _ref13 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SValue, _ref13.cn("SValue", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref6))));
392
- };
354
+ const SValue = _inputNumber.default.Value;
355
+ return _ref13 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SValue, _ref13.cn("SValue", {
356
+ ...(0, _core.assignProps)({}, _ref6)
357
+ }));
358
+ }
359
+ ;
393
360
  function NumberControls(props) {
394
361
  var _ref7 = arguments[0],
395
362
  _ref14;
396
- var SControls = _inputNumber["default"].Controls;
397
- return _ref14 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SControls, _ref14.cn("SControls", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
398
- "tag": InlineInput.Addon
399
- }, _ref7))));
363
+ const SControls = _inputNumber.default.Controls;
364
+ return _ref14 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react.default.createElement(SControls, _ref14.cn("SControls", {
365
+ ...(0, _core.assignProps)({
366
+ "tag": InlineInput.Addon
367
+ }, _ref7)
368
+ }));
400
369
  }
401
370
 
402
371
  /** `createComponent` currently exposes unrelated junk instead of typings, that the reason of to any cast */
403
- var InlineInput = (0, _core.createComponent)(InlineInputBase, {
404
- Addon: Addon,
405
- Value: Value,
406
- ConfirmControl: ConfirmControl,
407
- CancelControl: CancelControl,
408
- NumberValue: NumberValue,
409
- NumberControls: NumberControls
372
+ const InlineInput = (0, _core.createComponent)(InlineInputBase, {
373
+ Addon,
374
+ Value,
375
+ ConfirmControl,
376
+ CancelControl,
377
+ NumberValue,
378
+ NumberControls
410
379
  });
411
- var _default = exports["default"] = InlineInput;
380
+ var _default = exports.default = InlineInput;
412
381
  //# sourceMappingURL=InlineInput.js.map