@semcore/inline-input 17.0.0-prerelease.36 → 17.0.0-prerelease.39

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,11 +2,11 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [17.0.0] - 2026-04-10
5
+ ## [17.0.0] - 2026-04-14
6
6
 
7
7
  ### BREAK
8
8
 
9
- - **ellipsis**: New major version.
9
+ - New major version.
10
10
 
11
11
  ## [16.2.3] - 2026-04-01
12
12
 
@@ -1,5 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import { sstyled, createComponent, Component, assignProps } from "@semcore/core";
2
+ import { sstyled, Component, assignProps, createComponent } from "@semcore/core";
3
3
  import { Box, InvalidStateBox } from "@semcore/base-components";
4
4
  import { ButtonLink } from "@semcore/button";
5
5
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
@@ -10,7 +10,6 @@ import InputNumber from "@semcore/input-number";
10
10
  import Spin from "@semcore/spin";
11
11
  import React from "react";
12
12
  import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
13
- /*!__reshadow-styles__:"./style/inline-input.shadow.css"*/
14
13
  const style = (
15
14
  /*__reshadow_css_start__*/
16
15
  (sstyled.insert(
@@ -61,30 +60,24 @@ class InlineInputBase extends Component {
61
60
  this.lastMouseDownPosition = null;
62
61
  });
63
62
  _defineProperty(this, "increment", (event) => {
64
- var _a, _b, _c;
65
- if (((_a = this.inputRef.current) == null ? void 0 : _a.value) === "") this.inputRef.current.value = this.inputRef.current.min || "0";
66
- (_c = (_b = this.inputRef.current) == null ? void 0 : _b.stepUp) == null ? void 0 : _c.call(_b, event);
63
+ if (this.inputRef.current?.value === "") this.inputRef.current.value = this.inputRef.current.min || "0";
64
+ this.inputRef.current?.stepUp?.(event);
67
65
  });
68
66
  _defineProperty(this, "decrement", (event) => {
69
- var _a, _b, _c;
70
- if (((_a = this.inputRef.current) == null ? void 0 : _a.value) === "") this.inputRef.current.value = this.inputRef.current.max || "0";
71
- (_c = (_b = this.inputRef.current) == null ? void 0 : _b.stepDown) == null ? void 0 : _c.call(_b, event);
67
+ if (this.inputRef.current?.value === "") this.inputRef.current.value = this.inputRef.current.max || "0";
68
+ this.inputRef.current?.stepDown?.(event);
72
69
  });
73
70
  _defineProperty(this, "handleMouseDownAddon", (event) => {
74
- var _a;
75
71
  event.preventDefault();
76
- (_a = this.inputRef.current) == null ? void 0 : _a.focus();
72
+ this.inputRef.current?.focus();
77
73
  });
78
74
  _defineProperty(this, "handleConfirm", (text, event) => {
79
- var _a, _b;
80
- (_b = (_a = this.asProps).onConfirm) == null ? void 0 : _b.call(_a, text, event);
75
+ this.asProps.onConfirm?.(text, event);
81
76
  });
82
77
  _defineProperty(this, "handleCancel", (prevText, event) => {
83
- var _a, _b;
84
- (_b = (_a = this.asProps).onCancel) == null ? void 0 : _b.call(_a, prevText, event);
78
+ this.asProps.onCancel?.(prevText, event);
85
79
  });
86
80
  _defineProperty(this, "handleBlur", (event) => {
87
- var _a;
88
81
  const {
89
82
  onConfirm,
90
83
  onCancel,
@@ -107,21 +100,20 @@ class InlineInputBase extends Component {
107
100
  return;
108
101
  }
109
102
  }
110
- if (onBlurBehavior === "confirm") onConfirm == null ? void 0 : onConfirm(((_a = this.inputRef.current) == null ? void 0 : _a.value) ?? "", event);
111
- if (onBlurBehavior === "cancel") onCancel == null ? void 0 : onCancel(this.initValue, event);
103
+ if (onBlurBehavior === "confirm") onConfirm?.(this.inputRef.current?.value ?? "", event);
104
+ if (onBlurBehavior === "cancel") onCancel?.(this.initValue, event);
112
105
  });
113
106
  _defineProperty(this, "handleKeyDown", (event) => {
114
- var _a;
115
107
  const {
116
108
  onConfirm,
117
109
  onCancel
118
110
  } = this.asProps;
119
111
  if (event.key === "Enter") {
120
- onConfirm == null ? void 0 : onConfirm(((_a = this.inputRef.current) == null ? void 0 : _a.value) ?? "", event);
112
+ onConfirm?.(this.inputRef.current?.value ?? "", event);
121
113
  this.lastHandledKeyboardEvent = Date.now();
122
114
  }
123
115
  if (event.key === "Escape") {
124
- onCancel == null ? void 0 : onCancel(this.initValue, event);
116
+ onCancel?.(this.initValue, event);
125
117
  this.lastHandledKeyboardEvent = Date.now();
126
118
  }
127
119
  });
@@ -279,9 +271,8 @@ function ConfirmControl(props) {
279
271
  } = props;
280
272
  const title = props.title ?? props.getI18nText("confirm");
281
273
  const handleConfirm = React.useCallback((event) => {
282
- var _a, _b;
283
- (_b = props.onConfirm) == null ? void 0 : _b.call(props, ((_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.value) ?? "", event);
284
- }, [props.onConfirm, inputRef == null ? void 0 : inputRef.current]);
274
+ props.onConfirm?.(inputRef?.current?.value ?? "", event);
275
+ }, [props.onConfirm, inputRef?.current]);
285
276
  const handleKeydown = React.useCallback((event) => {
286
277
  if (event.key === "Enter" || event.key === " ") {
287
278
  event.preventDefault();
@@ -321,8 +312,7 @@ function CancelControl(props) {
321
312
  } = props;
322
313
  const title = props.title ?? props.getI18nText("discard");
323
314
  const handleCancel = React.useCallback((event) => {
324
- var _a;
325
- (_a = props.onCancel) == null ? void 0 : _a.call(props, props.value ?? "", event);
315
+ props.onCancel?.(props.value ?? "", event);
326
316
  }, [props.onCancel, props.value]);
327
317
  const handleKeydown = React.useCallback((event) => {
328
318
  if (event.key === "Enter" || event.key === " ") {
@@ -359,6 +349,7 @@ function NumberValue(props) {
359
349
  ...assignProps({}, _ref6)
360
350
  }));
361
351
  }
352
+ ;
362
353
  function NumberControls(props) {
363
354
  var _ref7 = arguments[0], _ref14;
364
355
  const SControls = InputNumber.Controls;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/inline-input",
3
3
  "description": "Semrush Input Component",
4
- "version": "17.0.0-prerelease.36",
4
+ "version": "17.0.0-prerelease.39",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,24 +9,24 @@
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "exports": {
12
- "require": "./lib/cjs/index.js",
12
+ "types": "./lib/types/index.d.ts",
13
13
  "import": "./lib/esm/index.mjs",
14
- "types": "./lib/types/index.d.ts"
14
+ "require": "./lib/cjs/index.js"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/spin": "^17.0.0-prerelease.36",
18
- "@semcore/tooltip": "^17.0.0-prerelease.36",
19
- "@semcore/input-number": "^17.0.0-prerelease.36",
20
- "@semcore/input": "^17.0.0-prerelease.36",
21
- "@semcore/button": "^17.0.0-prerelease.36"
17
+ "@semcore/spin": "^17.0.0-prerelease.39",
18
+ "@semcore/tooltip": "^17.0.0-prerelease.39",
19
+ "@semcore/input-number": "^17.0.0-prerelease.39",
20
+ "@semcore/input": "^17.0.0-prerelease.39",
21
+ "@semcore/button": "^17.0.0-prerelease.39"
22
22
  },
23
23
  "devDependencies": {
24
- "@semcore/core": "17.0.0-prerelease.36",
25
- "@semcore/spin": "17.0.0-prerelease.36",
24
+ "@semcore/core": "17.0.0-prerelease.39",
25
+ "@semcore/spin": "17.0.0-prerelease.39",
26
26
  "@semcore/testing-utils": "1.0.0",
27
- "@semcore/base-components": "17.0.0-prerelease.36",
28
- "@semcore/tooltip": "17.0.0-prerelease.36",
29
- "@semcore/icon": "16.7.2-prerelease.36"
27
+ "@semcore/tooltip": "17.0.0-prerelease.39",
28
+ "@semcore/base-components": "17.0.0-prerelease.39",
29
+ "@semcore/icon": "17.0.0-prerelease.39"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@semcore/base-components": "^17.0.0 || ^17.0.0-0",