@semcore/inline-input 3.7.5 → 4.0.0-beta.1

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,17 +1,10 @@
1
1
  import React from 'react';
2
- import { PropGetterFn } from '@semcore/core';
3
- import { IBoxProps } from '@semcore/flex-box';
2
+ import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
3
+ import { BoxProps } from '@semcore/flex-box';
4
4
 
5
- /* utils type */
6
- type CProps<Props, Ctx = {}, UCProps = {}> = Props & {
7
- children?:
8
- | ((props: Props & Ctx, handlers: UCProps) => React.ReactNode)
9
- | React.ReactNode
10
- | React.ReactNode[];
11
- };
12
- /* utils type */
13
-
14
- export interface IInlineInputProps extends IBoxProps {
5
+ /** @deprecated */
6
+ export interface IInlineInputProps extends InlineInputProps, UnknownProperties {}
7
+ export type InlineInputProps = BoxProps & {
15
8
  /**
16
9
  * Visual state of inline input
17
10
  * @default normal
@@ -64,10 +57,14 @@ export interface IInlineInputProps extends IBoxProps {
64
57
  */
65
58
  onBlurBehavior?: 'cancel' | 'confirm';
66
59
  locale?: string;
67
- }
60
+ };
68
61
 
69
- export interface IInlineInputAddonProps extends IBoxProps {}
70
- export interface IInlineInputValueProps extends IBoxProps {
62
+ /** @deprecated */
63
+ export interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}
64
+ export type InlineInputAddonProps = BoxProps & {};
65
+ /** @deprecated */
66
+ export interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}
67
+ export type InlineInputValueProps = BoxProps & {
71
68
  /**
72
69
  * id attribute of input tag
73
70
  */
@@ -104,8 +101,12 @@ export interface IInlineInputValueProps extends IBoxProps {
104
101
  * gray text in empty input tag
105
102
  */
106
103
  placeholder?: string;
107
- }
108
- export interface IInlineInputConfirmControlProps extends IBoxProps {
104
+ };
105
+ /** @deprecated */
106
+ export interface IInlineInputConfirmControlProps
107
+ extends InlineInputConfirmControlProps,
108
+ UnknownProperties {}
109
+ export type InlineInputConfirmControlProps = BoxProps & {
109
110
  /**
110
111
  * Text of tooltip
111
112
  * @default Confirm
@@ -116,8 +117,12 @@ export interface IInlineInputConfirmControlProps extends IBoxProps {
116
117
  * @default CheckM
117
118
  */
118
119
  icon?: React.FC;
119
- }
120
- export interface IInlineInputCancelControlProps extends IBoxProps {
120
+ };
121
+ /** @deprecated */
122
+ export interface IInlineInputCancelControlProps
123
+ extends InlineInputCancelControlProps,
124
+ UnknownProperties {}
125
+ export type InlineInputCancelControlProps = BoxProps & {
121
126
  /**
122
127
  * Text of tooltip
123
128
  * @default Cancel
@@ -128,25 +133,19 @@ export interface IInlineInputCancelControlProps extends IBoxProps {
128
133
  * @default CloseM
129
134
  */
130
135
  icon?: React.FC;
131
- }
136
+ };
132
137
 
133
- interface IInlineInputCtx {
138
+ type InlineInputCtx = {
134
139
  getAddonProps: PropGetterFn;
135
140
  getConfirmControlProps: PropGetterFn;
136
141
  getCancelControlProps: PropGetterFn;
137
142
  getValueProps: PropGetterFn;
138
- }
143
+ };
139
144
 
140
- declare const InlineInput: (<T>(
141
- props: CProps<IInlineInputProps & T, IInlineInputCtx>,
142
- ) => React.ReactElement) & {
143
- Addon: <T>(props: CProps<IInlineInputAddonProps & T, IInlineInputProps>) => React.ReactElement;
144
- Value: <T>(props: CProps<IInlineInputValueProps & T, IInlineInputProps>) => React.ReactElement;
145
- ConfirmControl: <T>(
146
- props: CProps<IInlineInputConfirmControlProps & T, IInlineInputProps>,
147
- ) => React.ReactElement;
148
- CancelControl: <T>(
149
- props: CProps<IInlineInputCancelControlProps & T, IInlineInputProps>,
150
- ) => React.ReactElement;
145
+ declare const InlineInput: Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {
146
+ Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;
147
+ Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;
148
+ ConfirmControl: Intergalactic.Component<'div', InlineInputConfirmControlProps, InlineInputProps>;
149
+ CancelControl: Intergalactic.Component<'div', InlineInputCancelControlProps, InlineInputProps>;
151
150
  };
152
151
  export default InlineInput;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/inline-input",
3
3
  "description": "Semrush Input Component",
4
- "version": "3.7.5",
4
+ "version": "4.0.0-beta.1",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,11 +9,11 @@
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@semcore/flex-box": "^4.5.0",
13
- "@semcore/icon": "2.19.3 - 3",
14
- "@semcore/spin": "^4",
15
- "@semcore/tooltip": "^5",
16
- "@semcore/utils": "^3.31.1"
12
+ "@semcore/flex-box": "5.0.0-beta.1",
13
+ "@semcore/icon": "4.0.0-beta.1",
14
+ "@semcore/spin": "5.0.0-beta.1",
15
+ "@semcore/tooltip": "6.0.0-beta.1",
16
+ "@semcore/utils": "4.0.0-beta.1"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/react": "18.0.21",
@@ -23,7 +23,7 @@
23
23
  "@semcore/tooltip": "*"
24
24
  },
25
25
  "peerDependencies": {
26
- "@semcore/core": "^1.11",
26
+ "@semcore/core": "2.0.0-beta.1",
27
27
  "react": "16.8 - 18",
28
28
  "react-dom": "16.8 - 18"
29
29
  },