@synerise/ds-utils 0.24.16 → 0.24.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.
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.18](https://github.com/synerise/synerise-design/compare/@synerise/ds-utils@0.24.17...@synerise/ds-utils@0.24.18) (2023-10-11)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-utils
9
+
10
+
11
+
12
+
13
+
14
+ ## [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)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-utils
17
+
18
+
19
+
20
+
21
+
6
22
  ## [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)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-utils
@@ -5,7 +5,7 @@ function doubleClickListener(onClick, onDblClick, delay) {
5
5
  delay = DEFAULT_DELAY;
6
6
  }
7
7
 
8
- var timeout = null;
8
+ var timeout;
9
9
  return function (event) {
10
10
  if (!timeout) {
11
11
  timeout = setTimeout(function () {
@@ -1,11 +1,11 @@
1
- export declare type ColorByLetter = {
1
+ export type ColorByLetter = {
2
2
  [index: string]: string;
3
3
  };
4
- export declare type ColorObject = {
4
+ export type ColorObject = {
5
5
  color: string;
6
6
  hue: string;
7
7
  };
8
- export declare type Color = string | ColorObject;
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
- declare const renderWithProvider: (node: React.ReactElement, options?: Pick<RenderOptions<typeof import("@testing-library/dom/queries")>, "container" | "baseElement" | "hydrate" | "wrapper"> | undefined, props?: {
4
- locale?: string | undefined;
5
- notation?: "US" | "EU" | undefined;
6
- } | undefined) => RenderResult;
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 declare type Dimensions = {
1
+ export type Dimensions = {
2
2
  width: number;
3
3
  height: number;
4
4
  };
5
- export declare type Breakpoint = {
5
+ export type Breakpoint = {
6
6
  min: number;
7
7
  max: number;
8
8
  columns: number;
9
9
  name: string;
10
10
  };
11
- export declare type DimensionsWithBreakpoint = {
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
- declare type HandledEvents = [typeof MOUSEDOWN, typeof TOUCHSTART, typeof CLICK, typeof CONTEXTMENU];
7
- export declare type HandledEventsType = HandledEvents[number];
8
- declare type PossibleEvent = {
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
- declare type Handler = (event: PossibleEvent) => void;
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?: ("mousedown" | "touchstart" | "click" | "contextmenu")[] | undefined, ignoreSelectors?: string[] | undefined) => void;
20
+ export declare const useOnClickOutside: (ref: RefObject<HTMLElement>, handler: Handler | null, customEventsTypes?: HandledEventsType[], ignoreSelectors?: string[]) => void;
21
21
  export {};
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- declare type Dimensions = {
2
+ type Dimensions = {
3
3
  width: number;
4
4
  height: number;
5
5
  };
@@ -1 +1 @@
1
- export declare const useTraceUpdate: (props: {}) => void;
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.16",
3
+ "version": "0.24.18",
4
4
  "description": "Utils UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -21,6 +21,7 @@
21
21
  "build:js": "babel --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
22
  "build:watch": "npm run build:js -- --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
+ "pack:ci": "npm pack --pack-destination ../../portal/storybook-static/static",
24
25
  "prepublish": "npm run build",
25
26
  "test": "jest",
26
27
  "types": "tsc --noEmit"
@@ -31,7 +32,7 @@
31
32
  ],
32
33
  "types": "dist/index.d.ts",
33
34
  "dependencies": {
34
- "@synerise/ds-data-format": "^0.4.2",
35
+ "@synerise/ds-data-format": "^0.4.4",
35
36
  "latinize": "^0.5.0"
36
37
  },
37
38
  "peerDependencies": {
@@ -40,8 +41,8 @@
40
41
  "styled-components": "5.0.1"
41
42
  },
42
43
  "devDependencies": {
43
- "@synerise/ds-core": "^0.40.2",
44
+ "@synerise/ds-core": "^0.40.4",
44
45
  "@testing-library/react": "10.0.1"
45
46
  },
46
- "gitHead": "f1f520c4c5ef9f90bacb5d5e0b2e778ceb8fdf79"
47
+ "gitHead": "8eb4a3e304406a8dbb9258803c48952461fc5a55"
47
48
  }