@rescui/input 0.15.2 → 0.15.4-RUI-293-Update-menu-component-7a032357e.20

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/lib/index.d.ts CHANGED
@@ -1,64 +1,63 @@
1
- /// <reference types="react" />
2
- /**
3
- * @deprecated use named import instead
4
- */
5
- declare const DefaultInput: import("react").ForwardRefExoticComponent<{
6
- id?: string;
7
- className?: string;
8
- placeholder?: string;
9
- disabled?: boolean;
10
- error?: import("react").ReactNode;
11
- reserveErrorLine?: boolean;
12
- busy?: boolean;
13
- onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
14
- onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
15
- onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
16
- onClear?: import("react").MouseEventHandler<HTMLButtonElement>;
17
- onMouseEnter?: import("react").MouseEventHandler<HTMLInputElement>;
18
- onMouseLeave?: import("react").MouseEventHandler<HTMLInputElement>;
19
- mode?: import("./input").InputMode;
20
- size?: import("./input").InputSize;
21
- theme?: import("./input").InputTheme;
22
- type?: import("./input").InputType;
23
- value?: string | number | string[];
24
- icon?: import("react").ReactNode;
25
- iconType?: import("./input").InputIconType;
26
- label?: import("react").ReactNode;
27
- note?: import("react").ReactNode;
28
- name?: string;
29
- clearIcon?: import("react").ReactNode;
30
- suffix?: import("react").ReactNode;
31
- offSystemMicroelements?: boolean;
32
- boldLabel?: boolean;
33
- } & Omit<import("react").HTMLProps<HTMLInputElement>, keyof {
34
- id?: string;
35
- className?: string;
36
- placeholder?: string;
37
- disabled?: boolean;
38
- error?: import("react").ReactNode;
39
- reserveErrorLine?: boolean;
40
- busy?: boolean;
41
- onChange?: import("react").ChangeEventHandler<HTMLInputElement>;
42
- onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
43
- onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
44
- onClear?: import("react").MouseEventHandler<HTMLButtonElement>;
45
- onMouseEnter?: import("react").MouseEventHandler<HTMLInputElement>;
46
- onMouseLeave?: import("react").MouseEventHandler<HTMLInputElement>;
47
- mode?: import("./input").InputMode;
48
- size?: import("./input").InputSize;
49
- theme?: import("./input").InputTheme;
50
- type?: import("./input").InputType;
51
- value?: string | number | string[];
52
- icon?: import("react").ReactNode;
53
- iconType?: import("./input").InputIconType;
54
- label?: import("react").ReactNode;
55
- note?: import("react").ReactNode;
56
- name?: string;
57
- clearIcon?: import("react").ReactNode;
58
- suffix?: import("react").ReactNode;
59
- offSystemMicroelements?: boolean;
60
- boldLabel?: boolean;
61
- } | "ref"> & import("react").RefAttributes<HTMLInputElement>>;
62
- export default DefaultInput;
63
- export { Input } from './input';
64
- export type { InputProps } from './input';
1
+ /**
2
+ * @deprecated use named import instead
3
+ */
4
+ declare const DefaultInput: import("react").ForwardRefExoticComponent<{
5
+ id?: string;
6
+ className?: string;
7
+ placeholder?: string;
8
+ disabled?: boolean;
9
+ error?: boolean | React.ReactNode;
10
+ reserveErrorLine?: boolean;
11
+ busy?: boolean;
12
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
13
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
14
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
15
+ onClear?: React.MouseEventHandler<HTMLButtonElement>;
16
+ onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
17
+ onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
18
+ mode?: import("./input").InputMode;
19
+ size?: import("./input").InputSize;
20
+ theme?: import("./input").InputTheme;
21
+ type?: import("./input").InputType;
22
+ value?: string | number | string[];
23
+ icon?: React.ReactNode;
24
+ iconType?: import("./input").InputIconType;
25
+ label?: React.ReactNode;
26
+ note?: React.ReactNode;
27
+ name?: string;
28
+ clearIcon?: React.ReactNode;
29
+ suffix?: React.ReactNode;
30
+ offSystemMicroelements?: boolean;
31
+ boldLabel?: boolean;
32
+ } & Omit<import("react").HTMLProps<HTMLInputElement>, keyof {
33
+ id?: string;
34
+ className?: string;
35
+ placeholder?: string;
36
+ disabled?: boolean;
37
+ error?: boolean | React.ReactNode;
38
+ reserveErrorLine?: boolean;
39
+ busy?: boolean;
40
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
41
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
42
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
43
+ onClear?: React.MouseEventHandler<HTMLButtonElement>;
44
+ onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
45
+ onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
46
+ mode?: import("./input").InputMode;
47
+ size?: import("./input").InputSize;
48
+ theme?: import("./input").InputTheme;
49
+ type?: import("./input").InputType;
50
+ value?: string | number | string[];
51
+ icon?: React.ReactNode;
52
+ iconType?: import("./input").InputIconType;
53
+ label?: React.ReactNode;
54
+ note?: React.ReactNode;
55
+ name?: string;
56
+ clearIcon?: React.ReactNode;
57
+ suffix?: React.ReactNode;
58
+ offSystemMicroelements?: boolean;
59
+ boldLabel?: boolean;
60
+ } | "ref"> & import("react").RefAttributes<HTMLInputElement>>;
61
+ export default DefaultInput;
62
+ export { Input } from './input';
63
+ export type { InputProps } from './input';
package/lib/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import './index.css';
2
2
  import { Input } from './input.js';
3
3
  export { Input } from './input.js';
4
- /**
5
- * @deprecated use named import instead
4
+ /**
5
+ * @deprecated use named import instead
6
6
  */
7
7
 
8
8
  const DefaultInput = Input;
package/lib/input.d.ts CHANGED
@@ -1,94 +1,94 @@
1
- import * as React from 'react';
2
- export declare type InputMode = 'classic' | 'rock';
3
- export declare type InputSize = 'l' | 'm' | 's';
4
- export declare type InputTheme = 'light' | 'dark';
5
- export declare type InputType = 'text' | 'email' | 'search' | 'date' | 'time' | 'password' | 'number' | 'file' | 'url' | 'tel';
6
- export declare type InputIconType = 'left' | 'right' | 'rightAction' | 'rightActionFocusable';
7
- declare type InputExclusiveProps = {
8
- id?: string;
9
- className?: string;
10
- placeholder?: string;
11
- /**
12
- * Disable input
13
- */
14
- disabled?: boolean;
15
- /**
16
- * Error state flag
17
- */
18
- error?: boolean | React.ReactNode;
19
- /**
20
- * If `true`, there will be reserved a space for a 1-line error message. Subsequent lines will be placed below normally.
21
- * If `false `, there will be no reservation.
22
- */
23
- reserveErrorLine?: boolean;
24
- /**
25
- * Set busy state
26
- */
27
- busy?: boolean;
28
- /**
29
- * Change value callback. `value => ...`
30
- */
31
- onChange?: React.ChangeEventHandler<HTMLInputElement>;
32
- /**
33
- * Focus input callback
34
- */
35
- onFocus?: React.FocusEventHandler<HTMLInputElement>;
36
- /**
37
- * Blur input callback
38
- */
39
- onBlur?: React.FocusEventHandler<HTMLInputElement>;
40
- /**
41
- * Clear input callback, clear button appears when this callback provided and input is not empty
42
- */
43
- onClear?: React.MouseEventHandler<HTMLButtonElement>;
44
- /**
45
- * `mouseEnter` input callback
46
- */
47
- onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
48
- /**
49
- * `mouseLeave` input callback
50
- */
51
- onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
52
- /**
53
- * Mode of the input - classic or rock
54
- */
55
- mode?: InputMode;
56
- /**
57
- * Size
58
- */
59
- size?: InputSize;
60
- /**
61
- * Appearance theme
62
- */
63
- theme?: InputTheme;
64
- /**
65
- * Change input behavior
66
- */
67
- type?: InputType;
68
- /**
69
- * Set value to control state of the input. `onChange` callback is required.
70
- */
71
- value?: string | number | string[];
72
- /**
73
- * Icon to place inside the input, supports only icons from `@rescui/icons` package or similar in structure
74
- */
75
- icon?: React.ReactNode;
76
- /**
77
- * Left or right decorative icon or right action (clickable) icon or right action focusable (by tab) icon.
78
- */
79
- iconType?: InputIconType;
80
- label?: React.ReactNode;
81
- note?: React.ReactNode;
82
- name?: string;
83
- /**
84
- * Clear icon customization, supports only icons from `@rescui/icons` package
85
- */
86
- clearIcon?: React.ReactNode;
87
- suffix?: React.ReactNode;
88
- /** Turns off system microelements in input. For example turns off arrows for input[type='number'] */
89
- offSystemMicroelements?: boolean;
90
- boldLabel?: boolean;
91
- };
92
- export declare type InputProps = InputExclusiveProps & Omit<React.HTMLProps<HTMLInputElement>, keyof InputExclusiveProps | 'ref'>;
93
- export declare const Input: React.ForwardRefExoticComponent<InputExclusiveProps & Omit<React.HTMLProps<HTMLInputElement>, keyof InputExclusiveProps | "ref"> & React.RefAttributes<HTMLInputElement>>;
94
- export default Input;
1
+ import * as React from 'react';
2
+ export type InputMode = 'classic' | 'rock';
3
+ export type InputSize = 'l' | 'm' | 's';
4
+ export type InputTheme = 'light' | 'dark';
5
+ export type InputType = 'text' | 'email' | 'search' | 'date' | 'time' | 'password' | 'number' | 'file' | 'url' | 'tel';
6
+ export type InputIconType = 'left' | 'right' | 'rightAction' | 'rightActionFocusable';
7
+ type InputExclusiveProps = {
8
+ id?: string;
9
+ className?: string;
10
+ placeholder?: string;
11
+ /**
12
+ * Disable input
13
+ */
14
+ disabled?: boolean;
15
+ /**
16
+ * Error state flag
17
+ */
18
+ error?: boolean | React.ReactNode;
19
+ /**
20
+ * If `true`, there will be reserved a space for a 1-line error message. Subsequent lines will be placed below normally.
21
+ * If `false `, there will be no reservation.
22
+ */
23
+ reserveErrorLine?: boolean;
24
+ /**
25
+ * Set busy state
26
+ */
27
+ busy?: boolean;
28
+ /**
29
+ * Change value callback. `value => ...`
30
+ */
31
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
32
+ /**
33
+ * Focus input callback
34
+ */
35
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
36
+ /**
37
+ * Blur input callback
38
+ */
39
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
40
+ /**
41
+ * Clear input callback, clear button appears when this callback provided and input is not empty
42
+ */
43
+ onClear?: React.MouseEventHandler<HTMLButtonElement>;
44
+ /**
45
+ * `mouseEnter` input callback
46
+ */
47
+ onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
48
+ /**
49
+ * `mouseLeave` input callback
50
+ */
51
+ onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
52
+ /**
53
+ * Mode of the input - classic or rock
54
+ */
55
+ mode?: InputMode;
56
+ /**
57
+ * Size
58
+ */
59
+ size?: InputSize;
60
+ /**
61
+ * Appearance theme
62
+ */
63
+ theme?: InputTheme;
64
+ /**
65
+ * Change input behavior
66
+ */
67
+ type?: InputType;
68
+ /**
69
+ * Set value to control state of the input. `onChange` callback is required.
70
+ */
71
+ value?: string | number | string[];
72
+ /**
73
+ * Icon to place inside the input, supports only icons from `@rescui/icons` package or similar in structure
74
+ */
75
+ icon?: React.ReactNode;
76
+ /**
77
+ * Left or right decorative icon or right action (clickable) icon or right action focusable (by tab) icon.
78
+ */
79
+ iconType?: InputIconType;
80
+ label?: React.ReactNode;
81
+ note?: React.ReactNode;
82
+ name?: string;
83
+ /**
84
+ * Clear icon customization, supports only icons from `@rescui/icons` package
85
+ */
86
+ clearIcon?: React.ReactNode;
87
+ suffix?: React.ReactNode;
88
+ /** Turns off system microelements in input. For example turns off arrows for input[type='number'] */
89
+ offSystemMicroelements?: boolean;
90
+ boldLabel?: boolean;
91
+ };
92
+ export type InputProps = InputExclusiveProps & Omit<React.HTMLProps<HTMLInputElement>, keyof InputExclusiveProps | 'ref'>;
93
+ export declare const Input: React.ForwardRefExoticComponent<InputExclusiveProps & Omit<React.HTMLProps<HTMLInputElement>, keyof InputExclusiveProps | "ref"> & React.RefAttributes<HTMLInputElement>>;
94
+ export default Input;
@@ -1,31 +1,31 @@
1
1
  var styles = {
2
- "light": "_light_f036h4_7",
3
- "dark": "_dark_f036h4_10",
4
- "sizeS": "_sizeS_f036h4_14",
5
- "sizeM": "_sizeM_f036h4_17",
6
- "sizeL": "_sizeL_f036h4_20",
7
- "classic": "_classic_f036h4_24",
8
- "rock": "_rock_f036h4_27",
9
- "container": "_container_f036h4_31",
10
- "wrapper": "_wrapper_f036h4_39",
11
- "error": "_error_f036h4_55",
12
- "disabled": "_disabled_f036h4_61",
13
- "enabled": "_enabled_f036h4_67",
14
- "focused": "_focused_f036h4_67",
15
- "filled": "_filled_f036h4_73",
16
- "field": "_field_f036h4_91",
17
- "inner": "_inner_f036h4_101",
18
- "offSystemMicroelements": "_offSystemMicroelements_f036h4_202",
19
- "iconWrapper": "_iconWrapper_f036h4_212",
20
- "action": "_action_f036h4_223",
21
- "right": "_right_f036h4_261",
22
- "left": "_left_f036h4_265",
23
- "icon": "_icon_f036h4_212",
24
- "divider": "_divider_f036h4_299",
25
- "suffix": "_suffix_f036h4_315",
26
- "label": "_label_f036h4_329",
27
- "footer": "_footer_f036h4_340",
28
- "errorMessage": "_errorMessage_f036h4_347",
29
- "note": "_note_f036h4_356"
2
+ "light": "_light_1o3n6hz_7",
3
+ "dark": "_dark_1o3n6hz_10",
4
+ "sizeS": "_sizeS_1o3n6hz_14",
5
+ "sizeM": "_sizeM_1o3n6hz_17",
6
+ "sizeL": "_sizeL_1o3n6hz_20",
7
+ "classic": "_classic_1o3n6hz_24",
8
+ "rock": "_rock_1o3n6hz_27",
9
+ "container": "_container_1o3n6hz_31",
10
+ "wrapper": "_wrapper_1o3n6hz_39",
11
+ "error": "_error_1o3n6hz_55",
12
+ "disabled": "_disabled_1o3n6hz_61",
13
+ "enabled": "_enabled_1o3n6hz_67",
14
+ "focused": "_focused_1o3n6hz_67",
15
+ "filled": "_filled_1o3n6hz_73",
16
+ "field": "_field_1o3n6hz_91",
17
+ "inner": "_inner_1o3n6hz_101",
18
+ "offSystemMicroelements": "_offSystemMicroelements_1o3n6hz_202",
19
+ "iconWrapper": "_iconWrapper_1o3n6hz_212",
20
+ "action": "_action_1o3n6hz_223",
21
+ "right": "_right_1o3n6hz_261",
22
+ "left": "_left_1o3n6hz_265",
23
+ "icon": "_icon_1o3n6hz_212",
24
+ "divider": "_divider_1o3n6hz_299",
25
+ "suffix": "_suffix_1o3n6hz_315",
26
+ "label": "_label_1o3n6hz_329",
27
+ "footer": "_footer_1o3n6hz_340",
28
+ "errorMessage": "_errorMessage_1o3n6hz_347",
29
+ "note": "_note_1o3n6hz_356"
30
30
  };
31
31
  export { styles as default };
@@ -1,26 +1,26 @@
1
- import * as React from 'react';
2
- interface MouseInteractiveProps {
3
- onClick?: React.MouseEventHandler<HTMLButtonElement>;
4
- onContextMenu?: React.MouseEventHandler<HTMLButtonElement>;
5
- onDoubleClick?: React.MouseEventHandler<HTMLButtonElement>;
6
- onMouseDown?: React.MouseEventHandler<HTMLButtonElement>;
7
- onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
8
- onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
9
- onMouseMove?: React.MouseEventHandler<HTMLButtonElement>;
10
- onMouseOut?: React.MouseEventHandler<HTMLButtonElement>;
11
- onMouseOver?: React.MouseEventHandler<HTMLButtonElement>;
12
- onMouseUp?: React.MouseEventHandler<HTMLButtonElement>;
13
- 'aria-label'?: string;
14
- }
15
- export declare function transferInteractiveProps(iconProps: MouseInteractiveProps): {
16
- button: MouseInteractiveProps;
17
- icon: MouseInteractiveProps;
18
- };
19
- declare type CustomIconProps = {
20
- icon: React.ReactNode;
21
- iconIsAction?: boolean;
22
- iconIsFocusable?: boolean;
23
- iconPosition?: 'left' | 'right';
24
- };
25
- export declare const CustomIcon: React.FC<CustomIconProps>;
26
- export {};
1
+ import * as React from 'react';
2
+ interface MouseInteractiveProps {
3
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
4
+ onContextMenu?: React.MouseEventHandler<HTMLButtonElement>;
5
+ onDoubleClick?: React.MouseEventHandler<HTMLButtonElement>;
6
+ onMouseDown?: React.MouseEventHandler<HTMLButtonElement>;
7
+ onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
8
+ onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
9
+ onMouseMove?: React.MouseEventHandler<HTMLButtonElement>;
10
+ onMouseOut?: React.MouseEventHandler<HTMLButtonElement>;
11
+ onMouseOver?: React.MouseEventHandler<HTMLButtonElement>;
12
+ onMouseUp?: React.MouseEventHandler<HTMLButtonElement>;
13
+ 'aria-label'?: string;
14
+ }
15
+ export declare function transferInteractiveProps(iconProps: MouseInteractiveProps): {
16
+ button: MouseInteractiveProps;
17
+ icon: MouseInteractiveProps;
18
+ };
19
+ type CustomIconProps = {
20
+ icon: React.ReactNode;
21
+ iconIsAction?: boolean;
22
+ iconIsFocusable?: boolean;
23
+ iconPosition?: 'left' | 'right';
24
+ };
25
+ export declare const CustomIcon: React.FC<CustomIconProps>;
26
+ export {};
@@ -1,14 +1,14 @@
1
- import * as React from 'react';
2
- import { InputSize } from '../input';
3
- declare type RightIconsProps = {
4
- busy?: boolean;
5
- onClear?: React.MouseEventHandler<HTMLButtonElement>;
6
- size?: InputSize;
7
- icon?: React.ReactNode;
8
- iconIsAction?: boolean;
9
- iconIsFocusable?: boolean;
10
- clearIcon?: React.ReactNode;
11
- empty: boolean;
12
- };
13
- export declare const RightIcons: React.FC<RightIconsProps>;
14
- export {};
1
+ import * as React from 'react';
2
+ import { InputSize } from '../input';
3
+ type RightIconsProps = {
4
+ busy?: boolean;
5
+ onClear?: React.MouseEventHandler<HTMLButtonElement>;
6
+ size?: InputSize;
7
+ icon?: React.ReactNode;
8
+ iconIsAction?: boolean;
9
+ iconIsFocusable?: boolean;
10
+ clearIcon?: React.ReactNode;
11
+ empty: boolean;
12
+ };
13
+ export declare const RightIcons: React.FC<RightIconsProps>;
14
+ export {};
@@ -1,4 +1,4 @@
1
- export declare const useBackwardCompatibleId: {
2
- (): string | number;
3
- counter: number;
4
- };
1
+ export declare const useBackwardCompatibleId: {
2
+ (): string | number;
3
+ counter: number;
4
+ };