@cloudscape-design/components 3.0.576 → 3.0.577

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.
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (acb14963)";
2
+ export var PACKAGE_VERSION = "3.0.0 (8152544e)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (acb14963)",
3
+ "PACKAGE_VERSION": "3.0.0 (8152544e)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "acb14963f2a873d95182701e933bcbbfd6d1efc1"
2
+ "commit": "8152544e3c17123ab31d1ba7255f7d84c5e62e71"
3
3
  }
package/package.json CHANGED
@@ -116,7 +116,7 @@
116
116
  "./internal/base-component/index.js",
117
117
  "./internal/base-component/styles.css.js"
118
118
  ],
119
- "version": "3.0.576",
119
+ "version": "3.0.577",
120
120
  "repository": {
121
121
  "type": "git",
122
122
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface DarkRibbonProps {
3
- children: React.ReactNode;
4
- isRefresh: boolean;
5
- hasPlainStyling?: boolean;
6
- }
7
- export default function DarkRibbon({ children, isRefresh, hasPlainStyling }: DarkRibbonProps): JSX.Element;
8
- export {};
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dark-ribbon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAMjD,UAAU,eAAe;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAQD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,eAAe,eA0C3F"}
@@ -1,47 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- import React, { useEffect, useRef } from 'react';
4
- import { useMutationObserver } from '../../hooks/use-mutation-observer';
5
- import { getContentHeaderClassName } from '../../utils/content-header-utils';
6
- import styles from './styles.css.js';
7
- import { useStableCallback } from '@cloudscape-design/component-toolkit/internal';
8
- function setIfChanged(oldValue, newValue, setter) {
9
- if (oldValue !== newValue) {
10
- setter(newValue);
11
- }
12
- }
13
- export default function DarkRibbon({ children, isRefresh, hasPlainStyling }) {
14
- const containerRef = useRef(null);
15
- const fillRef = useRef(null);
16
- const syncSizes = useStableCallback((from, to) => {
17
- // JSDOM calls mutation observer callback even if attribute did not change
18
- // https://github.com/jsdom/jsdom/issues/3305
19
- // To prevent infinite loops, we need to check the values before setting
20
- const size = from.getBoundingClientRect();
21
- const { height: oldHeight, left: oldLeft, right: oldRight } = to.style;
22
- setIfChanged(oldHeight, `${size.height}px`, newHeight => (to.style.height = newHeight));
23
- setIfChanged(oldLeft, `${-1 * size.left}px`, newLeft => (to.style.left = newLeft));
24
- setIfChanged(oldRight, `${-1 * (document.body.clientWidth - size.right)}px`, newRight => (to.style.right = newRight));
25
- });
26
- useMutationObserver(containerRef, node => {
27
- if (fillRef.current) {
28
- syncSizes(node, fillRef.current);
29
- }
30
- });
31
- useEffect(() => {
32
- const handler = () => {
33
- if (containerRef.current && fillRef.current) {
34
- syncSizes(containerRef.current, fillRef.current);
35
- }
36
- };
37
- window.addEventListener('resize', handler);
38
- return () => window.removeEventListener('resize', handler);
39
- }, [syncSizes]);
40
- if (hasPlainStyling === true || !isRefresh) {
41
- return React.createElement(React.Fragment, null, children);
42
- }
43
- return (React.createElement("div", { ref: containerRef, className: getContentHeaderClassName() },
44
- React.createElement("div", { ref: fillRef, className: styles['background-fill'] }),
45
- React.createElement("div", { className: styles.content }, children)));
46
- }
47
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dark-ribbon/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAQlF,SAAS,YAAY,CAAC,QAAgB,EAAE,QAAgB,EAAE,MAAkC;IAC1F,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACzB,MAAM,CAAC,QAAQ,CAAC,CAAC;KAClB;AACH,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAmB;IAC1F,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,iBAAiB,CAAC,CAAC,IAAiB,EAAE,EAAe,EAAE,EAAE;QACzE,0EAA0E;QAC1E,6CAA6C;QAC7C,wEAAwE;QACxE,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC1C,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;QACvE,YAAY,CAAC,SAAS,EAA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CAAI,CAAC;KACxB;IAED,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,yBAAyB,EAAE;QAC5D,6BAAK,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,GAAI;QAC3D,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAO,CAC5C,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { useMutationObserver } from '../../hooks/use-mutation-observer';\nimport { getContentHeaderClassName } from '../../utils/content-header-utils';\nimport styles from './styles.css.js';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\ninterface DarkRibbonProps {\n children: React.ReactNode;\n isRefresh: boolean;\n hasPlainStyling?: boolean;\n}\n\nfunction setIfChanged(oldValue: string, newValue: string, setter: (newValue: string) => void) {\n if (oldValue !== newValue) {\n setter(newValue);\n }\n}\n\nexport default function DarkRibbon({ children, isRefresh, hasPlainStyling }: DarkRibbonProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const fillRef = useRef<HTMLDivElement>(null);\n const syncSizes = useStableCallback((from: HTMLElement, to: HTMLElement) => {\n // JSDOM calls mutation observer callback even if attribute did not change\n // https://github.com/jsdom/jsdom/issues/3305\n // To prevent infinite loops, we need to check the values before setting\n const size = from.getBoundingClientRect();\n const { height: oldHeight, left: oldLeft, right: oldRight } = to.style;\n setIfChanged(oldHeight, `${size.height}px`, newHeight => (to.style.height = newHeight));\n setIfChanged(oldLeft, `${-1 * size.left}px`, newLeft => (to.style.left = newLeft));\n setIfChanged(\n oldRight,\n `${-1 * (document.body.clientWidth - size.right)}px`,\n newRight => (to.style.right = newRight)\n );\n });\n useMutationObserver(containerRef, node => {\n if (fillRef.current) {\n syncSizes(node, fillRef.current);\n }\n });\n useEffect(() => {\n const handler = () => {\n if (containerRef.current && fillRef.current) {\n syncSizes(containerRef.current, fillRef.current);\n }\n };\n window.addEventListener('resize', handler);\n return () => window.removeEventListener('resize', handler);\n }, [syncSizes]);\n\n if (hasPlainStyling === true || !isRefresh) {\n return <>{children}</>;\n }\n\n return (\n <div ref={containerRef} className={getContentHeaderClassName()}>\n <div ref={fillRef} className={styles['background-fill']} />\n <div className={styles.content}>{children}</div>\n </div>\n );\n}\n"]}
@@ -1,7 +0,0 @@
1
-
2
- import './styles.scoped.css';
3
- export default {
4
- "background-fill": "awsui_background-fill_1fi2u_1f726_9",
5
- "content": "awsui_content_1fi2u_1f726_15"
6
- };
7
-
@@ -1,17 +0,0 @@
1
- /*
2
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- SPDX-License-Identifier: Apache-2.0
4
- */
5
- /*
6
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
- SPDX-License-Identifier: Apache-2.0
8
- */
9
- .awsui_background-fill_1fi2u_1f726_9:not(#\9) {
10
- background-color: var(--color-background-layout-main-nx09lr, #ffffff);
11
- position: absolute;
12
- color: var(--color-text-body-default-at06ol, #000716);
13
- }
14
-
15
- .awsui_content_1fi2u_1f726_15:not(#\9) {
16
- position: relative;
17
- }
@@ -1,8 +0,0 @@
1
-
2
- // es-module interop with Babel and Typescript
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- module.exports.default = {
5
- "background-fill": "awsui_background-fill_1fi2u_1f726_9",
6
- "content": "awsui_content_1fi2u_1f726_15"
7
- };
8
-