@synerise/ds-utils 0.24.15 → 0.24.17
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 +16 -0
- package/dist/doubleClickListener/doubleClickListener.js +1 -1
- package/dist/selectColorByLetter/selectColorByLetter.d.ts +3 -3
- package/dist/testing/renderWithProvider/renderWithProvider.d.ts +6 -4
- package/dist/useBreakpoint/useBreakpoint.d.ts +3 -3
- package/dist/useOnClickOutside/useOnClickOutside.d.ts +5 -5
- package/dist/useResize/useResize.d.ts +1 -1
- package/dist/useTraceUpdate/index.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.24.17](https://github.com/synerise/synerise-design/compare/@synerise/ds-utils@0.24.16...@synerise/ds-utils@0.24.17) (2023-10-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-utils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.24.16](https://github.com/synerise/synerise-design/compare/@synerise/ds-utils@0.24.15...@synerise/ds-utils@0.24.16) (2023-09-26)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-utils
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.24.15](https://github.com/synerise/synerise-design/compare/@synerise/ds-utils@0.24.14...@synerise/ds-utils@0.24.15) (2023-09-05)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @synerise/ds-utils
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ColorByLetter = {
|
|
2
2
|
[index: string]: string;
|
|
3
3
|
};
|
|
4
|
-
export
|
|
4
|
+
export type ColorObject = {
|
|
5
5
|
color: string;
|
|
6
6
|
hue: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type Color = string | ColorObject;
|
|
9
9
|
export declare const palette: string[];
|
|
10
10
|
export declare const colorByLetter: ColorByLetter;
|
|
11
11
|
export declare function getColor(colorString: string, forAvatar: boolean): Color;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RenderOptions, RenderResult } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { DataFormatNotationType } from '@synerise/ds-data-format';
|
|
4
|
+
type Options = Omit<RenderOptions, 'queries'>;
|
|
5
|
+
declare const renderWithProvider: (node: React.ReactElement, options?: Options, props?: {
|
|
6
|
+
locale?: string;
|
|
7
|
+
notation?: DataFormatNotationType;
|
|
8
|
+
}) => RenderResult;
|
|
7
9
|
export default renderWithProvider;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Dimensions = {
|
|
2
2
|
width: number;
|
|
3
3
|
height: number;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type Breakpoint = {
|
|
6
6
|
min: number;
|
|
7
7
|
max: number;
|
|
8
8
|
columns: number;
|
|
9
9
|
name: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type DimensionsWithBreakpoint = {
|
|
12
12
|
dimensions: Dimensions;
|
|
13
13
|
breakpoint?: Breakpoint;
|
|
14
14
|
};
|
|
@@ -3,12 +3,12 @@ declare const MOUSEDOWN = "mousedown";
|
|
|
3
3
|
declare const TOUCHSTART = "touchstart";
|
|
4
4
|
declare const CLICK = "click";
|
|
5
5
|
declare const CONTEXTMENU = "contextmenu";
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
6
|
+
type HandledEvents = [typeof MOUSEDOWN, typeof TOUCHSTART, typeof CLICK, typeof CONTEXTMENU];
|
|
7
|
+
export type HandledEventsType = HandledEvents[number];
|
|
8
|
+
type PossibleEvent = {
|
|
9
9
|
[Type in HandledEventsType]: HTMLElementEventMap[Type];
|
|
10
10
|
}[HandledEventsType];
|
|
11
|
-
|
|
11
|
+
type Handler = (event: PossibleEvent) => void;
|
|
12
12
|
/**
|
|
13
13
|
* Hook for listening for outside clicks.
|
|
14
14
|
*
|
|
@@ -17,5 +17,5 @@ declare type Handler = (event: PossibleEvent) => void;
|
|
|
17
17
|
* @param customEventsTypes list of events to handle that are happening outside (optional, pass something else than `undefined` to overwrite default `['mousedown', 'touchstart']`)
|
|
18
18
|
* @param ignoreSelectors list of selectors/classes which, in case it is found that any of parent elements of triggering element has this class, event `handler` won't be called
|
|
19
19
|
*/
|
|
20
|
-
export declare const useOnClickOutside: (ref: RefObject<HTMLElement>, handler: Handler | null, customEventsTypes?:
|
|
20
|
+
export declare const useOnClickOutside: (ref: RefObject<HTMLElement>, handler: Handler | null, customEventsTypes?: HandledEventsType[], ignoreSelectors?: string[]) => void;
|
|
21
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useTraceUpdate: (props:
|
|
1
|
+
export declare const useTraceUpdate: (props: Record<string, unknown>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-utils",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.17",
|
|
4
4
|
"description": "Utils UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"types": "dist/index.d.ts",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@synerise/ds-data-format": "^0.4.
|
|
34
|
+
"@synerise/ds-data-format": "^0.4.3",
|
|
35
35
|
"latinize": "^0.5.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"styled-components": "5.0.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@synerise/ds-core": "^0.40.
|
|
43
|
+
"@synerise/ds-core": "^0.40.3",
|
|
44
44
|
"@testing-library/react": "10.0.1"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "1c1adf344f447e404a1d6320ad1d3f8486f29f67"
|
|
47
47
|
}
|