@os-design/core 1.0.305 → 1.0.306

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.
@@ -5,7 +5,7 @@ export interface ScrollButtonProps extends Omit<ButtonProps, 'type' | 'wide'> {
5
5
  * The container that needs to be scrolled.
6
6
  * @default undefined
7
7
  */
8
- container?: Element | RefObject<Element>;
8
+ container?: Element | RefObject<Element | null>;
9
9
  /**
10
10
  * Where the container should be scrolled.
11
11
  * @default top
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ScrollButton/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAe,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAM9D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3E;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+CD;;GAEG;AACH,QAAA,MAAM,YAAY,iHAqEjB,CAAC;AAIF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ScrollButton/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAe,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAM9D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3E;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAChD;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+CD;;GAEG;AACH,QAAA,MAAM,YAAY,iHAqEjB,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -6,6 +6,6 @@ export interface ContainerPosition {
6
6
  /**
7
7
  * Calculates the position of the container.
8
8
  */
9
- declare const useContainerPosition: (container?: Element | RefObject<Element>) => ContainerPosition;
9
+ declare const useContainerPosition: (container?: Element | RefObject<Element | null>) => ContainerPosition;
10
10
  export default useContainerPosition;
11
11
  //# sourceMappingURL=useContainerPosition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useContainerPosition.d.ts","sourceRoot":"","sources":["../../../src/ScrollButton/utils/useContainerPosition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,QAAA,MAAM,oBAAoB,GACxB,YAAY,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,KACvC,iBAyBF,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"useContainerPosition.d.ts","sourceRoot":"","sources":["../../../src/ScrollButton/utils/useContainerPosition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,QAAA,MAAM,oBAAoB,GACxB,YAAY,OAAO,GAAG,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,KAC9C,iBAyBF,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type RefObject } from 'react';
2
2
  interface UseVisibilityProps {
3
- container?: Element | RefObject<Element>;
3
+ container?: Element | RefObject<Element | null>;
4
4
  scrollTo: 'top' | 'bottom';
5
5
  minOffset: number;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useVisibility.d.ts","sourceRoot":"","sources":["../../../src/ScrollButton/utils/useVisibility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAC;AAE9D,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACzC,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,QAAA,MAAM,aAAa,GAAI,qCAIpB,kBAAkB,KAAG,OAsCvB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"useVisibility.d.ts","sourceRoot":"","sources":["../../../src/ScrollButton/utils/useVisibility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAC;AAE9D,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAChD,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,QAAA,MAAM,aAAa,GAAI,qCAIpB,kBAAkB,KAAG,OAsCvB,CAAC;AAEF,eAAe,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@os-design/core",
3
- "version": "1.0.305",
3
+ "version": "1.0.306",
4
4
  "license": "UNLICENSED",
5
5
  "repository": "git@gitlab.com:os-team/libs/os-design.git",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "sideEffects": false,
21
21
  "scripts": {
22
- "clean": "rimraf dist",
22
+ "clean": "rm -r dist",
23
23
  "build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx --out-dir dist",
24
24
  "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --declaration --declarationDir dist",
25
25
  "build": "yarn clean && npm-run-all 'build:*'",
@@ -30,16 +30,16 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@os-design/date-picker-utils": "^1.0.33",
33
- "@os-design/icons": "^1.0.74",
34
- "@os-design/input-number-utils": "^1.0.41",
35
- "@os-design/input-password-utils": "^1.0.6",
36
- "@os-design/media": "^1.0.35",
37
- "@os-design/menu-utils": "^1.0.31",
38
- "@os-design/portal": "^1.0.28",
39
- "@os-design/styles": "^1.0.71",
40
- "@os-design/theming": "^1.0.66",
33
+ "@os-design/icons": "^1.0.75",
34
+ "@os-design/input-number-utils": "^1.0.42",
35
+ "@os-design/input-password-utils": "^1.0.7",
36
+ "@os-design/media": "^1.0.36",
37
+ "@os-design/menu-utils": "^1.0.32",
38
+ "@os-design/portal": "^1.0.29",
39
+ "@os-design/styles": "^1.0.72",
40
+ "@os-design/theming": "^1.0.67",
41
41
  "@os-design/time-picker-utils": "^1.0.23",
42
- "@os-design/utils": "^1.0.96",
42
+ "@os-design/utils": "^1.0.97",
43
43
  "facepaint": "^1.2.1",
44
44
  "react-focus-lock": "^2.13.7",
45
45
  "react-window": "^1.8.11"
@@ -58,5 +58,5 @@
58
58
  "react": "19",
59
59
  "react-dom": "19"
60
60
  },
61
- "gitHead": "f333f60e39273574d2227cf0ee70b0c8897b2dde"
61
+ "gitHead": "83ca5af2bb91d07d64440f87b7ab23f5100daa02"
62
62
  }
@@ -21,7 +21,7 @@ export interface ScrollButtonProps extends Omit<ButtonProps, 'type' | 'wide'> {
21
21
  * The container that needs to be scrolled.
22
22
  * @default undefined
23
23
  */
24
- container?: Element | RefObject<Element>;
24
+ container?: Element | RefObject<Element | null>;
25
25
  /**
26
26
  * Where the container should be scrolled.
27
27
  * @default top
@@ -10,7 +10,7 @@ export interface ContainerPosition {
10
10
  * Calculates the position of the container.
11
11
  */
12
12
  const useContainerPosition = (
13
- container?: Element | RefObject<Element>
13
+ container?: Element | RefObject<Element | null>
14
14
  ): ContainerPosition => {
15
15
  const [position, setPosition] = useState<ContainerPosition>({
16
16
  right: 0,
@@ -2,7 +2,7 @@ import { useBrowserLayoutEffect, useEvent } from '@os-design/utils';
2
2
  import { type RefObject, useCallback, useState } from 'react';
3
3
 
4
4
  interface UseVisibilityProps {
5
- container?: Element | RefObject<Element>;
5
+ container?: Element | RefObject<Element | null>;
6
6
  scrollTo: 'top' | 'bottom';
7
7
  minOffset: number;
8
8
  }