kwant-ui 3.41.0-dev.0 → 3.41.0
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/dist/components/Alert/AlertTypes.d.ts +1 -1
- package/dist/components/Alert/AlertUtils.d.ts +1 -0
- package/dist/components/Calendar/CalendarComponents.d.ts +3 -3
- package/dist/components/Calendar/CalendarStyled.d.ts +4 -1
- package/dist/components/Calendar/CalendarTypes.d.ts +2 -1
- package/dist/components/Calendar/CalendarUtils.d.ts +3 -0
- package/dist/components/Datepicker/DatepickerStyled.d.ts +1 -0
- package/dist/components/Datepicker/types.d.ts +7 -1
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/types.d.ts +1 -0
- package/dist/components/Toast/Toast.types.d.ts +2 -1
- package/dist/hooks/useToast.d.ts +1 -0
- package/dist/index.es.js +160 -135
- package/dist/index.js +159 -134
- package/dist/package.json +1 -1
- package/dist/themes/colors.ts +5 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.ts +14 -0
- package/package.json +1 -1
- package/themes/colors.ts +5 -0
- package/utils/index.ts +14 -0
package/dist/package.json
CHANGED
package/dist/themes/colors.ts
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export declare const stringToColor: (str: string) => string;
|
|
|
9
9
|
declare const isArray: (array: unknown) => boolean;
|
|
10
10
|
declare const isArrayEmpty: <T>(array: T[]) => boolean;
|
|
11
11
|
declare const getLastItem: <T>(array: T[]) => T;
|
|
12
|
-
|
|
12
|
+
declare function debounce<T extends (...args: any[]) => void>(func: T, delay: number): (...args: Parameters<T>) => void;
|
|
13
|
+
export { switchValue, escapeRegExp, mobileView, tabletView, overflowView, isArray, isArrayEmpty, getLastItem, debounce, };
|
package/dist/utils/index.ts
CHANGED
|
@@ -74,6 +74,19 @@ export const stringToColor = function (str: string) {
|
|
|
74
74
|
const isArray = (array: unknown) => Array.isArray(array);
|
|
75
75
|
const isArrayEmpty = <T>(array: Array<T>) => array.length === 0;
|
|
76
76
|
const getLastItem = <T>(array: Array<T>) => array[array.length - 1];
|
|
77
|
+
|
|
78
|
+
function debounce<T extends (...args: any[]) => void>(func: T, delay: number) {
|
|
79
|
+
let timeoutId: NodeJS.Timeout;
|
|
80
|
+
|
|
81
|
+
return (...args: Parameters<T>) => {
|
|
82
|
+
clearTimeout(timeoutId);
|
|
83
|
+
|
|
84
|
+
timeoutId = setTimeout(() => {
|
|
85
|
+
func(...args);
|
|
86
|
+
}, delay);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
77
90
|
export {
|
|
78
91
|
switchValue,
|
|
79
92
|
escapeRegExp,
|
|
@@ -83,4 +96,5 @@ export {
|
|
|
83
96
|
isArray,
|
|
84
97
|
isArrayEmpty,
|
|
85
98
|
getLastItem,
|
|
99
|
+
debounce,
|
|
86
100
|
};
|
package/package.json
CHANGED
package/themes/colors.ts
CHANGED
package/utils/index.ts
CHANGED
|
@@ -74,6 +74,19 @@ export const stringToColor = function (str: string) {
|
|
|
74
74
|
const isArray = (array: unknown) => Array.isArray(array);
|
|
75
75
|
const isArrayEmpty = <T>(array: Array<T>) => array.length === 0;
|
|
76
76
|
const getLastItem = <T>(array: Array<T>) => array[array.length - 1];
|
|
77
|
+
|
|
78
|
+
function debounce<T extends (...args: any[]) => void>(func: T, delay: number) {
|
|
79
|
+
let timeoutId: NodeJS.Timeout;
|
|
80
|
+
|
|
81
|
+
return (...args: Parameters<T>) => {
|
|
82
|
+
clearTimeout(timeoutId);
|
|
83
|
+
|
|
84
|
+
timeoutId = setTimeout(() => {
|
|
85
|
+
func(...args);
|
|
86
|
+
}, delay);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
77
90
|
export {
|
|
78
91
|
switchValue,
|
|
79
92
|
escapeRegExp,
|
|
@@ -83,4 +96,5 @@ export {
|
|
|
83
96
|
isArray,
|
|
84
97
|
isArrayEmpty,
|
|
85
98
|
getLastItem,
|
|
99
|
+
debounce,
|
|
86
100
|
};
|