@homecode/ui 4.27.17 → 4.27.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.
@@ -68,7 +68,24 @@ const Input = forwardRef((props, ref) => {
68
68
  return val;
69
69
  };
70
70
  const onTextareaPaste = e => {
71
- // wait for native paste operation completes in DOM
71
+ // Prevent default paste behavior to strip formatting
72
+ e.preventDefault();
73
+ // Get plain text from clipboard
74
+ const text = (e.clipboardData || window.clipboardData)?.getData('text/plain') || '';
75
+ // Insert plain text at cursor position
76
+ if (document.queryCommandSupported('insertText')) {
77
+ document.execCommand('insertText', false, text);
78
+ }
79
+ else {
80
+ // Fallback for older browsers
81
+ const selection = window.getSelection();
82
+ if (!selection.rangeCount)
83
+ return;
84
+ selection.deleteFromDocument();
85
+ selection.getRangeAt(0).insertNode(document.createTextNode(text));
86
+ selection.collapseToEnd();
87
+ }
88
+ // Update the value after paste
72
89
  setTimeout(() => {
73
90
  if (inputRef.current) {
74
91
  const newValue = inputRef.current.innerText;
@@ -243,7 +260,7 @@ const Input = forwardRef((props, ref) => {
243
260
  updateAutoComplete();
244
261
  if (value !== inputValue) {
245
262
  if (isTextArea)
246
- setTextareaValue(String(value));
263
+ setTextareaValue(String(value ?? ''));
247
264
  setInputValue(value);
248
265
  }
249
266
  if (autoFocus && inputRef.current) {
@@ -252,7 +269,7 @@ const Input = forwardRef((props, ref) => {
252
269
  }, [value, autoFocus]);
253
270
  useEffect(() => {
254
271
  if (isTextArea)
255
- setTextareaValue(String(value));
272
+ setTextareaValue(String(value ?? ''));
256
273
  }, []);
257
274
  const Control = isTextArea ? 'span' : 'input';
258
275
  const classes = cn(S.root, isTextArea && S.isTextArea, S[`size-${size}`], S[`variant-${variant}`], isFocused && S.isFocused, error && S.hasError, hasClear && S.hasClear, disabled && S.isDisabled, round && S.round, className);
@@ -1,91 +1,97 @@
1
+ /// <reference types="uilib/declarations" />
1
2
  import * as T from './Icon.types';
2
3
  export declare const icons: {
3
- attach: () => Promise<any>;
4
- arrowRight: () => Promise<any>;
5
- arrowLeft: () => Promise<any>;
6
- arrowUp: () => Promise<any>;
7
- arrowDown: () => Promise<any>;
8
- avatar: () => Promise<any>;
9
- bookmark: () => Promise<any>;
10
- bookmarkAdd: () => Promise<any>;
11
- brain: () => Promise<any>;
12
- brokenImage: () => Promise<any>;
13
- camera: () => Promise<any>;
14
- chat: () => Promise<any>;
15
- check: () => Promise<any>;
16
- close: () => Promise<any>;
17
- colors: () => Promise<any>;
18
- compass: () => Promise<any>;
19
- copy: () => Promise<any>;
20
- checkers: () => Promise<any>;
21
- chevronUp: () => Promise<any>;
22
- chevronDown: () => Promise<any>;
23
- chevronRight: () => Promise<any>;
24
- chevronLeft: () => Promise<any>;
25
- clearAll: () => Promise<any>;
26
- cubes: () => Promise<any>;
27
- delete: () => Promise<any>;
28
- draft: () => Promise<any>;
29
- dragHandlerHorizontal: () => Promise<any>;
30
- dragHandlerVertical: () => Promise<any>;
31
- edit: () => Promise<any>;
32
- email: () => Promise<any>;
33
- externalLink: () => Promise<any>;
34
- eye: () => Promise<any>;
35
- forward: () => Promise<any>;
36
- folder: () => Promise<any>;
37
- folderOpen: () => Promise<any>;
38
- fullscreen: () => Promise<any>;
39
- fullscreenExit: () => Promise<any>;
40
- function: () => Promise<any>;
41
- flyover: () => Promise<any>;
42
- gear: () => Promise<any>;
43
- geolocation: () => Promise<any>;
44
- globe: () => Promise<any>;
45
- group: () => Promise<any>;
46
- history: () => Promise<any>;
47
- image: () => Promise<any>;
48
- instagram: () => Promise<any>;
49
- home: () => Promise<any>;
50
- layers: () => Promise<any>;
51
- link: () => Promise<any>;
52
- loader: () => Promise<any>;
53
- lock: () => Promise<any>;
54
- lockOpen: () => Promise<any>;
55
- map: () => Promise<any>;
56
- menu: () => Promise<any>;
57
- mic: () => Promise<any>;
58
- minus: () => Promise<any>;
59
- moreVertical: () => Promise<any>;
60
- moreHorizontal: () => Promise<any>;
61
- output: () => Promise<any>;
62
- pause: () => Promise<any>;
63
- play: () => Promise<any>;
64
- plus: () => Promise<any>;
65
- redo: () => Promise<any>;
66
- undo: () => Promise<any>;
67
- usage: () => Promise<any>;
68
- requiredStar: () => Promise<any>;
69
- rewind: () => Promise<any>;
70
- rocket: () => Promise<any>;
71
- route: () => Promise<any>;
72
- routeFrom: () => Promise<any>;
73
- routeTo: () => Promise<any>;
74
- save: () => Promise<any>;
75
- search: () => Promise<any>;
76
- send: () => Promise<any>;
77
- settings: () => Promise<any>;
78
- shoppingBag: () => Promise<any>;
79
- smile: () => Promise<any>;
80
- soundWave: () => Promise<any>;
81
- sparks: () => Promise<any>;
82
- star: () => Promise<any>;
83
- stopInCircle: () => Promise<any>;
84
- syncArrows: () => Promise<any>;
85
- table: () => Promise<any>;
86
- telegram: () => Promise<any>;
87
- tool: () => Promise<any>;
88
- trafficLight: () => Promise<any>;
4
+ attach: () => Promise<typeof import("*.svg")>;
5
+ apple: () => Promise<typeof import("*.svg")>;
6
+ arrowRight: () => Promise<typeof import("*.svg")>;
7
+ arrowLeft: () => Promise<typeof import("*.svg")>;
8
+ arrowUp: () => Promise<typeof import("*.svg")>;
9
+ arrowDown: () => Promise<typeof import("*.svg")>;
10
+ avatar: () => Promise<typeof import("*.svg")>;
11
+ bookmark: () => Promise<typeof import("*.svg")>;
12
+ bookmarkAdd: () => Promise<typeof import("*.svg")>;
13
+ brain: () => Promise<typeof import("*.svg")>;
14
+ brokenImage: () => Promise<typeof import("*.svg")>;
15
+ camera: () => Promise<typeof import("*.svg")>;
16
+ chat: () => Promise<typeof import("*.svg")>;
17
+ check: () => Promise<typeof import("*.svg")>;
18
+ close: () => Promise<typeof import("*.svg")>;
19
+ colors: () => Promise<typeof import("*.svg")>;
20
+ compass: () => Promise<typeof import("*.svg")>;
21
+ copy: () => Promise<typeof import("*.svg")>;
22
+ checkers: () => Promise<typeof import("*.svg")>;
23
+ chevronUp: () => Promise<typeof import("*.svg")>;
24
+ chevronDown: () => Promise<typeof import("*.svg")>;
25
+ chevronRight: () => Promise<typeof import("*.svg")>;
26
+ chevronLeft: () => Promise<typeof import("*.svg")>;
27
+ clearAll: () => Promise<typeof import("*.svg")>;
28
+ cubes: () => Promise<typeof import("*.svg")>;
29
+ delete: () => Promise<typeof import("*.svg")>;
30
+ draft: () => Promise<typeof import("*.svg")>;
31
+ dragHandlerHorizontal: () => Promise<typeof import("*.svg")>;
32
+ dragHandlerVertical: () => Promise<typeof import("*.svg")>;
33
+ edit: () => Promise<typeof import("*.svg")>;
34
+ email: () => Promise<typeof import("*.svg")>;
35
+ externalLink: () => Promise<typeof import("*.svg")>;
36
+ eye: () => Promise<typeof import("*.svg")>;
37
+ forward: () => Promise<typeof import("*.svg")>;
38
+ folder: () => Promise<typeof import("*.svg")>;
39
+ folderOpen: () => Promise<typeof import("*.svg")>;
40
+ fullscreen: () => Promise<typeof import("*.svg")>;
41
+ fullscreenExit: () => Promise<typeof import("*.svg")>;
42
+ function: () => Promise<typeof import("*.svg")>;
43
+ flyover: () => Promise<typeof import("*.svg")>;
44
+ gear: () => Promise<typeof import("*.svg")>;
45
+ geolocation: () => Promise<typeof import("*.svg")>;
46
+ globe: () => Promise<typeof import("*.svg")>;
47
+ google: () => Promise<typeof import("*.svg")>;
48
+ group: () => Promise<typeof import("*.svg")>;
49
+ github: () => Promise<typeof import("*.svg")>;
50
+ history: () => Promise<typeof import("*.svg")>;
51
+ image: () => Promise<typeof import("*.svg")>;
52
+ instagram: () => Promise<typeof import("*.svg")>;
53
+ home: () => Promise<typeof import("*.svg")>;
54
+ layers: () => Promise<typeof import("*.svg")>;
55
+ link: () => Promise<typeof import("*.svg")>;
56
+ loader: () => Promise<typeof import("*.svg")>;
57
+ lock: () => Promise<typeof import("*.svg")>;
58
+ lockOpen: () => Promise<typeof import("*.svg")>;
59
+ map: () => Promise<typeof import("*.svg")>;
60
+ menu: () => Promise<typeof import("*.svg")>;
61
+ mic: () => Promise<typeof import("*.svg")>;
62
+ micMuted: () => Promise<typeof import("*.svg")>;
63
+ minus: () => Promise<typeof import("*.svg")>;
64
+ moreVertical: () => Promise<typeof import("*.svg")>;
65
+ moreHorizontal: () => Promise<typeof import("*.svg")>;
66
+ output: () => Promise<typeof import("*.svg")>;
67
+ pause: () => Promise<typeof import("*.svg")>;
68
+ play: () => Promise<typeof import("*.svg")>;
69
+ plus: () => Promise<typeof import("*.svg")>;
70
+ redo: () => Promise<typeof import("*.svg")>;
71
+ undo: () => Promise<typeof import("*.svg")>;
72
+ usage: () => Promise<typeof import("*.svg")>;
73
+ requiredStar: () => Promise<typeof import("*.svg")>;
74
+ rewind: () => Promise<typeof import("*.svg")>;
75
+ rocket: () => Promise<typeof import("*.svg")>;
76
+ route: () => Promise<typeof import("*.svg")>;
77
+ routeFrom: () => Promise<typeof import("*.svg")>;
78
+ routeTo: () => Promise<typeof import("*.svg")>;
79
+ save: () => Promise<typeof import("*.svg")>;
80
+ search: () => Promise<typeof import("*.svg")>;
81
+ send: () => Promise<typeof import("*.svg")>;
82
+ settings: () => Promise<typeof import("*.svg")>;
83
+ shoppingBag: () => Promise<typeof import("*.svg")>;
84
+ smile: () => Promise<typeof import("*.svg")>;
85
+ soundWave: () => Promise<typeof import("*.svg")>;
86
+ sparks: () => Promise<typeof import("*.svg")>;
87
+ star: () => Promise<typeof import("*.svg")>;
88
+ stop: () => Promise<typeof import("*.svg")>;
89
+ stopInCircle: () => Promise<typeof import("*.svg")>;
90
+ syncArrows: () => Promise<typeof import("*.svg")>;
91
+ table: () => Promise<typeof import("*.svg")>;
92
+ telegram: () => Promise<typeof import("*.svg")>;
93
+ tool: () => Promise<typeof import("*.svg")>;
94
+ trafficLight: () => Promise<typeof import("*.svg")>;
89
95
  };
90
96
  export type { IconType } from './Icon.types';
91
97
  export declare function Icon(props: T.Props): JSX.Element;
@@ -1,94 +1,95 @@
1
+ /// <reference types="uilib/declarations" />
1
2
  declare const _default: {
2
- attach: () => Promise<any>;
3
- apple: () => Promise<any>;
4
- arrowRight: () => Promise<any>;
5
- arrowLeft: () => Promise<any>;
6
- arrowUp: () => Promise<any>;
7
- arrowDown: () => Promise<any>;
8
- avatar: () => Promise<any>;
9
- bookmark: () => Promise<any>;
10
- bookmarkAdd: () => Promise<any>;
11
- brain: () => Promise<any>;
12
- brokenImage: () => Promise<any>;
13
- camera: () => Promise<any>;
14
- chat: () => Promise<any>;
15
- check: () => Promise<any>;
16
- close: () => Promise<any>;
17
- colors: () => Promise<any>;
18
- compass: () => Promise<any>;
19
- copy: () => Promise<any>;
20
- checkers: () => Promise<any>;
21
- chevronUp: () => Promise<any>;
22
- chevronDown: () => Promise<any>;
23
- chevronRight: () => Promise<any>;
24
- chevronLeft: () => Promise<any>;
25
- clearAll: () => Promise<any>;
26
- cubes: () => Promise<any>;
27
- delete: () => Promise<any>;
28
- draft: () => Promise<any>;
29
- dragHandlerHorizontal: () => Promise<any>;
30
- dragHandlerVertical: () => Promise<any>;
31
- edit: () => Promise<any>;
32
- email: () => Promise<any>;
33
- externalLink: () => Promise<any>;
34
- eye: () => Promise<any>;
35
- forward: () => Promise<any>;
36
- folder: () => Promise<any>;
37
- folderOpen: () => Promise<any>;
38
- fullscreen: () => Promise<any>;
39
- fullscreenExit: () => Promise<any>;
40
- function: () => Promise<any>;
41
- flyover: () => Promise<any>;
42
- gear: () => Promise<any>;
43
- geolocation: () => Promise<any>;
44
- globe: () => Promise<any>;
45
- google: () => Promise<any>;
46
- group: () => Promise<any>;
47
- github: () => Promise<any>;
48
- history: () => Promise<any>;
49
- image: () => Promise<any>;
50
- instagram: () => Promise<any>;
51
- home: () => Promise<any>;
52
- layers: () => Promise<any>;
53
- link: () => Promise<any>;
54
- loader: () => Promise<any>;
55
- lock: () => Promise<any>;
56
- lockOpen: () => Promise<any>;
57
- map: () => Promise<any>;
58
- menu: () => Promise<any>;
59
- mic: () => Promise<any>;
60
- micMuted: () => Promise<any>;
61
- minus: () => Promise<any>;
62
- moreVertical: () => Promise<any>;
63
- moreHorizontal: () => Promise<any>;
64
- output: () => Promise<any>;
65
- pause: () => Promise<any>;
66
- play: () => Promise<any>;
67
- plus: () => Promise<any>;
68
- redo: () => Promise<any>;
69
- undo: () => Promise<any>;
70
- usage: () => Promise<any>;
71
- requiredStar: () => Promise<any>;
72
- rewind: () => Promise<any>;
73
- rocket: () => Promise<any>;
74
- route: () => Promise<any>;
75
- routeFrom: () => Promise<any>;
76
- routeTo: () => Promise<any>;
77
- save: () => Promise<any>;
78
- search: () => Promise<any>;
79
- send: () => Promise<any>;
80
- settings: () => Promise<any>;
81
- shoppingBag: () => Promise<any>;
82
- smile: () => Promise<any>;
83
- soundWave: () => Promise<any>;
84
- sparks: () => Promise<any>;
85
- star: () => Promise<any>;
86
- stop: () => Promise<any>;
87
- stopInCircle: () => Promise<any>;
88
- syncArrows: () => Promise<any>;
89
- table: () => Promise<any>;
90
- telegram: () => Promise<any>;
91
- tool: () => Promise<any>;
92
- trafficLight: () => Promise<any>;
3
+ attach: () => Promise<typeof import("*.svg")>;
4
+ apple: () => Promise<typeof import("*.svg")>;
5
+ arrowRight: () => Promise<typeof import("*.svg")>;
6
+ arrowLeft: () => Promise<typeof import("*.svg")>;
7
+ arrowUp: () => Promise<typeof import("*.svg")>;
8
+ arrowDown: () => Promise<typeof import("*.svg")>;
9
+ avatar: () => Promise<typeof import("*.svg")>;
10
+ bookmark: () => Promise<typeof import("*.svg")>;
11
+ bookmarkAdd: () => Promise<typeof import("*.svg")>;
12
+ brain: () => Promise<typeof import("*.svg")>;
13
+ brokenImage: () => Promise<typeof import("*.svg")>;
14
+ camera: () => Promise<typeof import("*.svg")>;
15
+ chat: () => Promise<typeof import("*.svg")>;
16
+ check: () => Promise<typeof import("*.svg")>;
17
+ close: () => Promise<typeof import("*.svg")>;
18
+ colors: () => Promise<typeof import("*.svg")>;
19
+ compass: () => Promise<typeof import("*.svg")>;
20
+ copy: () => Promise<typeof import("*.svg")>;
21
+ checkers: () => Promise<typeof import("*.svg")>;
22
+ chevronUp: () => Promise<typeof import("*.svg")>;
23
+ chevronDown: () => Promise<typeof import("*.svg")>;
24
+ chevronRight: () => Promise<typeof import("*.svg")>;
25
+ chevronLeft: () => Promise<typeof import("*.svg")>;
26
+ clearAll: () => Promise<typeof import("*.svg")>;
27
+ cubes: () => Promise<typeof import("*.svg")>;
28
+ delete: () => Promise<typeof import("*.svg")>;
29
+ draft: () => Promise<typeof import("*.svg")>;
30
+ dragHandlerHorizontal: () => Promise<typeof import("*.svg")>;
31
+ dragHandlerVertical: () => Promise<typeof import("*.svg")>;
32
+ edit: () => Promise<typeof import("*.svg")>;
33
+ email: () => Promise<typeof import("*.svg")>;
34
+ externalLink: () => Promise<typeof import("*.svg")>;
35
+ eye: () => Promise<typeof import("*.svg")>;
36
+ forward: () => Promise<typeof import("*.svg")>;
37
+ folder: () => Promise<typeof import("*.svg")>;
38
+ folderOpen: () => Promise<typeof import("*.svg")>;
39
+ fullscreen: () => Promise<typeof import("*.svg")>;
40
+ fullscreenExit: () => Promise<typeof import("*.svg")>;
41
+ function: () => Promise<typeof import("*.svg")>;
42
+ flyover: () => Promise<typeof import("*.svg")>;
43
+ gear: () => Promise<typeof import("*.svg")>;
44
+ geolocation: () => Promise<typeof import("*.svg")>;
45
+ globe: () => Promise<typeof import("*.svg")>;
46
+ google: () => Promise<typeof import("*.svg")>;
47
+ group: () => Promise<typeof import("*.svg")>;
48
+ github: () => Promise<typeof import("*.svg")>;
49
+ history: () => Promise<typeof import("*.svg")>;
50
+ image: () => Promise<typeof import("*.svg")>;
51
+ instagram: () => Promise<typeof import("*.svg")>;
52
+ home: () => Promise<typeof import("*.svg")>;
53
+ layers: () => Promise<typeof import("*.svg")>;
54
+ link: () => Promise<typeof import("*.svg")>;
55
+ loader: () => Promise<typeof import("*.svg")>;
56
+ lock: () => Promise<typeof import("*.svg")>;
57
+ lockOpen: () => Promise<typeof import("*.svg")>;
58
+ map: () => Promise<typeof import("*.svg")>;
59
+ menu: () => Promise<typeof import("*.svg")>;
60
+ mic: () => Promise<typeof import("*.svg")>;
61
+ micMuted: () => Promise<typeof import("*.svg")>;
62
+ minus: () => Promise<typeof import("*.svg")>;
63
+ moreVertical: () => Promise<typeof import("*.svg")>;
64
+ moreHorizontal: () => Promise<typeof import("*.svg")>;
65
+ output: () => Promise<typeof import("*.svg")>;
66
+ pause: () => Promise<typeof import("*.svg")>;
67
+ play: () => Promise<typeof import("*.svg")>;
68
+ plus: () => Promise<typeof import("*.svg")>;
69
+ redo: () => Promise<typeof import("*.svg")>;
70
+ undo: () => Promise<typeof import("*.svg")>;
71
+ usage: () => Promise<typeof import("*.svg")>;
72
+ requiredStar: () => Promise<typeof import("*.svg")>;
73
+ rewind: () => Promise<typeof import("*.svg")>;
74
+ rocket: () => Promise<typeof import("*.svg")>;
75
+ route: () => Promise<typeof import("*.svg")>;
76
+ routeFrom: () => Promise<typeof import("*.svg")>;
77
+ routeTo: () => Promise<typeof import("*.svg")>;
78
+ save: () => Promise<typeof import("*.svg")>;
79
+ search: () => Promise<typeof import("*.svg")>;
80
+ send: () => Promise<typeof import("*.svg")>;
81
+ settings: () => Promise<typeof import("*.svg")>;
82
+ shoppingBag: () => Promise<typeof import("*.svg")>;
83
+ smile: () => Promise<typeof import("*.svg")>;
84
+ soundWave: () => Promise<typeof import("*.svg")>;
85
+ sparks: () => Promise<typeof import("*.svg")>;
86
+ star: () => Promise<typeof import("*.svg")>;
87
+ stop: () => Promise<typeof import("*.svg")>;
88
+ stopInCircle: () => Promise<typeof import("*.svg")>;
89
+ syncArrows: () => Promise<typeof import("*.svg")>;
90
+ table: () => Promise<typeof import("*.svg")>;
91
+ telegram: () => Promise<typeof import("*.svg")>;
92
+ tool: () => Promise<typeof import("*.svg")>;
93
+ trafficLight: () => Promise<typeof import("*.svg")>;
93
94
  };
94
95
  export default _default;
@@ -1,12 +1,13 @@
1
+ import * as T from './Notifications.types';
1
2
  type Props = {
2
3
  store?: any;
3
4
  };
4
5
  export declare const NotificationsStore: import("justorm/dist/esm/proxy").ProxyStore<{
5
6
  items: string[];
6
- autohide: string[];
7
+ autoHide: string[];
7
8
  data: {};
8
9
  paused: boolean;
9
- show(data: any): any;
10
+ show(data: T.ItemParams): any;
10
11
  pause(): void;
11
12
  unpause(): void;
12
13
  close(id: any): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.27.17",
3
+ "version": "4.27.18",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",