@windstream/react-shared-components 0.0.21 → 0.0.23
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/contentful/index.d.ts +13 -4
- package/dist/contentful/index.esm.js +3 -1
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +3 -1
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +4 -2
- package/dist/index.d.ts +6 -4
- package/dist/index.esm.js +3 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/next/index.d.ts +10 -0
- package/dist/next/index.esm.js +4 -0
- package/dist/next/index.esm.js.map +1 -0
- package/dist/next/index.js +4 -0
- package/dist/next/index.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +17 -1
- package/src/components/accordion/index.tsx +2 -0
- package/src/components/alert-card/types.ts +9 -9
- package/src/components/brand-button/index.tsx +2 -0
- package/src/components/button/index.tsx +2 -0
- package/src/components/button/types.ts +14 -14
- package/src/components/checkbox/index.tsx +2 -0
- package/src/components/collapse/index.tsx +2 -0
- package/src/components/image/index.tsx +6 -3
- package/src/components/image/types.ts +7 -2
- package/src/components/input/index.tsx +2 -0
- package/src/components/link/index.tsx +2 -0
- package/src/components/link/types.ts +25 -25
- package/src/components/list/index.tsx +88 -86
- package/src/components/list/list-item/index.tsx +38 -36
- package/src/components/list/list-item/types.ts +13 -13
- package/src/components/list/types.ts +29 -29
- package/src/components/material-icon/index.tsx +44 -44
- package/src/components/material-icon/types.ts +31 -31
- package/src/components/modal/index.tsx +2 -0
- package/src/components/next-image/index.tsx +25 -0
- package/src/components/next-image/types.ts +1 -0
- package/src/components/see-more/index.tsx +2 -0
- package/src/components/select/index.tsx +2 -0
- package/src/components/skeleton/index.tsx +61 -61
- package/src/components/text/index.tsx +2 -0
- package/src/components/text/types.ts +45 -45
- package/src/contentful/blocks/floating-banner/FloatingBanner.stories.tsx +34 -23
- package/src/contentful/blocks/floating-banner/index.tsx +99 -11
- package/src/contentful/blocks/floating-banner/types.ts +22 -1
- package/src/contentful/blocks/image-promo-bar/ImagePromoBar.stories.tsx +1 -1
- package/src/contentful/blocks/primary-hero/PrimaryHero.stories.tsx +1 -1
- package/src/hooks/use-body-scroll-lock.ts +2 -0
- package/src/next/index.ts +5 -0
- package/src/setupTests.ts +46 -46
- package/src/types/global.d.ts +9 -9
package/src/setupTests.ts
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import "@testing-library/jest-dom";
|
|
2
|
-
|
|
3
|
-
// Mock window.matchMedia
|
|
4
|
-
Object.defineProperty(window, "matchMedia", {
|
|
5
|
-
writable: true,
|
|
6
|
-
value: (query: string) => ({
|
|
7
|
-
matches: false,
|
|
8
|
-
media: query,
|
|
9
|
-
onchange: null,
|
|
10
|
-
addListener: () => {}, // deprecated
|
|
11
|
-
removeListener: () => {}, // deprecated
|
|
12
|
-
addEventListener: () => {},
|
|
13
|
-
removeEventListener: () => {},
|
|
14
|
-
dispatchEvent: () => true,
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
// Mock ResizeObserver
|
|
19
|
-
global.ResizeObserver = class ResizeObserver {
|
|
20
|
-
observe = () => {};
|
|
21
|
-
unobserve = () => {};
|
|
22
|
-
disconnect = () => {};
|
|
23
|
-
constructor(_callback: ResizeObserverCallback) {}
|
|
24
|
-
} as unknown as typeof ResizeObserver;
|
|
25
|
-
|
|
26
|
-
// Mock IntersectionObserver
|
|
27
|
-
global.IntersectionObserver = class IntersectionObserver {
|
|
28
|
-
observe = () => {};
|
|
29
|
-
unobserve = () => {};
|
|
30
|
-
disconnect = () => {};
|
|
31
|
-
constructor(_callback: IntersectionObserverCallback) {}
|
|
32
|
-
} as unknown as typeof IntersectionObserver;
|
|
33
|
-
|
|
34
|
-
// Mock scrollTo
|
|
35
|
-
Object.defineProperty(window, "scrollTo", {
|
|
36
|
-
writable: true,
|
|
37
|
-
value: () => {},
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// Mock getComputedStyle
|
|
41
|
-
Object.defineProperty(window, "getComputedStyle", {
|
|
42
|
-
writable: true,
|
|
43
|
-
value: () => ({
|
|
44
|
-
getPropertyValue: () => "",
|
|
45
|
-
}),
|
|
46
|
-
});
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
2
|
+
|
|
3
|
+
// Mock window.matchMedia
|
|
4
|
+
Object.defineProperty(window, "matchMedia", {
|
|
5
|
+
writable: true,
|
|
6
|
+
value: (query: string) => ({
|
|
7
|
+
matches: false,
|
|
8
|
+
media: query,
|
|
9
|
+
onchange: null,
|
|
10
|
+
addListener: () => {}, // deprecated
|
|
11
|
+
removeListener: () => {}, // deprecated
|
|
12
|
+
addEventListener: () => {},
|
|
13
|
+
removeEventListener: () => {},
|
|
14
|
+
dispatchEvent: () => true,
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// Mock ResizeObserver
|
|
19
|
+
global.ResizeObserver = class ResizeObserver {
|
|
20
|
+
observe = () => {};
|
|
21
|
+
unobserve = () => {};
|
|
22
|
+
disconnect = () => {};
|
|
23
|
+
constructor(_callback: ResizeObserverCallback) {}
|
|
24
|
+
} as unknown as typeof ResizeObserver;
|
|
25
|
+
|
|
26
|
+
// Mock IntersectionObserver
|
|
27
|
+
global.IntersectionObserver = class IntersectionObserver {
|
|
28
|
+
observe = () => {};
|
|
29
|
+
unobserve = () => {};
|
|
30
|
+
disconnect = () => {};
|
|
31
|
+
constructor(_callback: IntersectionObserverCallback) {}
|
|
32
|
+
} as unknown as typeof IntersectionObserver;
|
|
33
|
+
|
|
34
|
+
// Mock scrollTo
|
|
35
|
+
Object.defineProperty(window, "scrollTo", {
|
|
36
|
+
writable: true,
|
|
37
|
+
value: () => {},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Mock getComputedStyle
|
|
41
|
+
Object.defineProperty(window, "getComputedStyle", {
|
|
42
|
+
writable: true,
|
|
43
|
+
value: () => ({
|
|
44
|
+
getPropertyValue: () => "",
|
|
45
|
+
}),
|
|
46
|
+
});
|
package/src/types/global.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare module "*.module.css" {
|
|
2
|
-
const classes: { [key: string]: string };
|
|
3
|
-
export default classes;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
declare module "*.css" {
|
|
7
|
-
const content: string;
|
|
8
|
-
export default content;
|
|
9
|
-
}
|
|
1
|
+
declare module "*.module.css" {
|
|
2
|
+
const classes: { [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
declare module "*.css" {
|
|
7
|
+
const content: string;
|
|
8
|
+
export default content;
|
|
9
|
+
}
|