@odx/websites-react 1.0.48 → 1.0.50

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.
Files changed (62) hide show
  1. package/dist/components/layout/accordion/Accordion.js +2 -2
  2. package/dist/components/layout/accordion/Accordion.js.map +1 -1
  3. package/dist/components/layout/card/CardGroup.js +2 -2
  4. package/dist/components/layout/list/List.d.ts +24 -1
  5. package/dist/components/layout/list/List.d.ts.map +1 -1
  6. package/dist/components/layout/list/List.js +26 -11
  7. package/dist/components/layout/list/List.js.map +1 -1
  8. package/dist/components/layout/screenOverlay/ScreenOverlay.d.ts +15 -0
  9. package/dist/components/layout/screenOverlay/ScreenOverlay.d.ts.map +1 -0
  10. package/dist/components/layout/screenOverlay/ScreenOverlay.js +25 -0
  11. package/dist/components/layout/screenOverlay/ScreenOverlay.js.map +1 -0
  12. package/dist/components/layout/screenOverlay/index.d.ts +2 -0
  13. package/dist/components/layout/screenOverlay/index.d.ts.map +1 -0
  14. package/dist/components/layout/screenOverlay/index.js +2 -0
  15. package/dist/components/layout/screenOverlay/index.js.map +1 -0
  16. package/dist/components/layout/showMore/ShowMore.js +2 -2
  17. package/dist/components/layout/showMore/ShowMore.js.map +1 -1
  18. package/dist/components/layout/slimRichText/SlimRichText.js +1 -1
  19. package/dist/components/layout/slimRichText/SlimRichText.js.map +1 -1
  20. package/dist/components/navigation/anchorNav/AnchorNav.d.ts.map +1 -1
  21. package/dist/components/navigation/anchorNav/AnchorNav.js +1 -1
  22. package/dist/components/navigation/anchorNav/AnchorNav.js.map +1 -1
  23. package/dist/components/navigation/flyout/Flyout.d.ts +7 -15
  24. package/dist/components/navigation/flyout/Flyout.d.ts.map +1 -1
  25. package/dist/components/navigation/flyout/Flyout.js +18 -52
  26. package/dist/components/navigation/flyout/Flyout.js.map +1 -1
  27. package/dist/components/navigation/flyout/FlyoutMobile.d.ts +53 -0
  28. package/dist/components/navigation/flyout/FlyoutMobile.d.ts.map +1 -0
  29. package/dist/components/navigation/flyout/FlyoutMobile.js +179 -0
  30. package/dist/components/navigation/flyout/FlyoutMobile.js.map +1 -0
  31. package/dist/components/navigation/flyout/index.d.ts +1 -0
  32. package/dist/components/navigation/flyout/index.d.ts.map +1 -1
  33. package/dist/components/navigation/flyout/index.js +1 -0
  34. package/dist/components/navigation/flyout/index.js.map +1 -1
  35. package/dist/components/navigation/header/Header.d.ts +11 -8
  36. package/dist/components/navigation/header/Header.d.ts.map +1 -1
  37. package/dist/components/navigation/header/Header.js +34 -36
  38. package/dist/components/navigation/header/Header.js.map +1 -1
  39. package/dist/components/navigation/searchInput/SearchInput.d.ts +1 -0
  40. package/dist/components/navigation/searchInput/SearchInput.d.ts.map +1 -1
  41. package/dist/components/navigation/searchInput/SearchInput.js +17 -9
  42. package/dist/components/navigation/searchInput/SearchInput.js.map +1 -1
  43. package/dist/components/structures/loadingSpinner/LoadingSpinner.d.ts.map +1 -1
  44. package/dist/components/structures/loadingSpinner/LoadingSpinner.js +6 -6
  45. package/dist/components/structures/loadingSpinner/LoadingSpinner.js.map +1 -1
  46. package/dist/hooks/useElementSize/index.d.ts +2 -0
  47. package/dist/hooks/useElementSize/index.d.ts.map +1 -0
  48. package/dist/hooks/useElementSize/index.js +2 -0
  49. package/dist/hooks/useElementSize/index.js.map +1 -0
  50. package/dist/hooks/useElementSize/useElementSize.d.ts +6 -0
  51. package/dist/hooks/useElementSize/useElementSize.d.ts.map +1 -0
  52. package/dist/hooks/useElementSize/useElementSize.js +24 -0
  53. package/dist/hooks/useElementSize/useElementSize.js.map +1 -0
  54. package/package.json +3 -3
  55. package/dist/hooks/useElementHeight/index.d.ts +0 -2
  56. package/dist/hooks/useElementHeight/index.d.ts.map +0 -1
  57. package/dist/hooks/useElementHeight/index.js +0 -2
  58. package/dist/hooks/useElementHeight/index.js.map +0 -1
  59. package/dist/hooks/useElementHeight/useElementHeight.d.ts +0 -3
  60. package/dist/hooks/useElementHeight/useElementHeight.d.ts.map +0 -1
  61. package/dist/hooks/useElementHeight/useElementHeight.js +0 -28
  62. package/dist/hooks/useElementHeight/useElementHeight.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/useElementSize/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { DependencyList } from 'react';
2
+ export declare const useElementSize: (deps?: DependencyList) => readonly [import("react").RefObject<HTMLDivElement>, {
3
+ height: number;
4
+ width: number;
5
+ }];
6
+ //# sourceMappingURL=useElementSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementSize.d.ts","sourceRoot":"","sources":["../../../src/hooks/useElementSize/useElementSize.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAE1C,eAAO,MAAM,cAAc,UAAU,cAAc;;;EAwBlD,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { useLayoutEffect, useCallback, useRef, useState } from 'react';
2
+ import ResizeObserver from 'resize-observer-polyfill';
3
+ import { debounce } from '../../utils';
4
+ export const useElementSize = (deps = []) => {
5
+ const [elementSize, setElementSize] = useState({ height: 0, width: 0 });
6
+ const ref = useRef(null);
7
+ const handleContentResize = useCallback(debounce(setElementSize, 50), []);
8
+ useLayoutEffect(() => {
9
+ if (!ref.current)
10
+ return;
11
+ const { height, width } = ref.current.getBoundingClientRect();
12
+ setElementSize({ height, width });
13
+ const resizeObserver = new ResizeObserver(entries => {
14
+ entries.forEach(entry => {
15
+ const { height, width } = entry.contentRect;
16
+ handleContentResize({ height, width });
17
+ });
18
+ });
19
+ resizeObserver.observe(ref.current);
20
+ return () => resizeObserver.disconnect();
21
+ }, deps);
22
+ return [ref, elementSize];
23
+ };
24
+ //# sourceMappingURL=useElementSize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementSize.js","sourceRoot":"","sources":["../../../src/hooks/useElementSize/useElementSize.ts"],"names":[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O,CAAC,GAAG,EAAE,WAAW,CAAU,CAAC;AACrC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@odx/websites-react",
3
3
  "author": "Drägerwerk AG & Co. KGaA",
4
- "version": "1.0.48",
4
+ "version": "1.0.50",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "description": "ODX React component library for websites",
7
7
  "type": "module",
@@ -82,8 +82,8 @@
82
82
  "ts-node": "^10.9.2",
83
83
  "typescript": "^5.4.5",
84
84
  "@odx/eslint-config-websites": "0.0.1",
85
- "@odx/websites-tsconfig": "0.0.0",
86
- "@odx/websites-ui": "0.2.14"
85
+ "@odx/websites-ui": "0.2.15",
86
+ "@odx/websites-tsconfig": "0.0.0"
87
87
  },
88
88
  "peerDependencies": {
89
89
  "@odx/websites-ui": ">=0.2.1",
@@ -1,2 +0,0 @@
1
- export * from './useElementHeight';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useElementHeight/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './useElementHeight';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/useElementHeight/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { DependencyList } from 'react';
2
- export declare const useElementHeight: (deps?: DependencyList) => readonly [import("react").RefObject<HTMLDivElement>, number];
3
- //# sourceMappingURL=useElementHeight.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useElementHeight.d.ts","sourceRoot":"","sources":["../../../src/hooks/useElementHeight/useElementHeight.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAE1C,eAAO,MAAM,gBAAgB,UAAU,cAAc,iEA4BpD,CAAC"}
@@ -1,28 +0,0 @@
1
- import { useLayoutEffect, useCallback, useRef, useState } from 'react';
2
- import ResizeObserver from 'resize-observer-polyfill';
3
- import { debounce } from '../../utils';
4
- export const useElementHeight = (deps = []) => {
5
- const [contentHeight, setContentHeight] = useState(0);
6
- const ref = useRef(null);
7
- const handleContentResize = useCallback(debounce(setContentHeight, 50), []);
8
- useLayoutEffect(() => {
9
- if (ref.current) {
10
- const { height } = ref.current.getBoundingClientRect();
11
- setContentHeight(height);
12
- }
13
- }, deps);
14
- useLayoutEffect(() => {
15
- if (!ref.current)
16
- return;
17
- const resizeObserver = new ResizeObserver(entries => {
18
- entries.forEach(entry => {
19
- const { height } = entry.contentRect;
20
- handleContentResize(height);
21
- });
22
- });
23
- resizeObserver.observe(ref.current);
24
- return () => resizeObserver.disconnect();
25
- }, []);
26
- return [ref, contentHeight];
27
- };
28
- //# sourceMappingURL=useElementHeight.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useElementHeight.js","sourceRoot":"","sources":["../../../src/hooks/useElementHeight/useElementHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACrE,OAAO,cAAc,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAIrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAuB,EAAE,EAAE,EAAE;IAC5D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEzC,MAAM,mBAAmB,GAAG,WAAW,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAE5E,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,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