@cloudscape-design/components 3.0.1052 → 3.0.1053

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/alert/index.js CHANGED
@@ -4,12 +4,12 @@ import React from 'react';
4
4
 
5
5
  import CoreComponent from './internal-do-not-use-core';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '../internal/base-component';
7
+ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
8
 
9
9
 
10
10
 
11
11
  const Alert = React.forwardRef((props, ref) => {
12
- validateProps('Alert', props, ["style"], {});
12
+ validateProps('Alert', props, ["style"], {}, 'console');
13
13
  return React.createElement(CoreComponent, {ref,...props});
14
14
  });
15
15
 
package/badge/index.js CHANGED
@@ -4,12 +4,12 @@ import React from 'react';
4
4
 
5
5
  import CoreComponent from './internal-do-not-use-core';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '../internal/base-component';
7
+ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
8
 
9
9
 
10
10
 
11
11
  const Badge = (props) => {
12
- validateProps('Badge', props, ["style"], {});
12
+ validateProps('Badge', props, ["style"], {}, 'console');
13
13
  return React.createElement(CoreComponent, props);
14
14
  };
15
15
 
package/button/index.js CHANGED
@@ -4,12 +4,12 @@ import React from 'react';
4
4
 
5
5
  import CoreComponent from './internal-do-not-use-core';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '../internal/base-component';
7
+ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
8
 
9
9
 
10
10
 
11
11
  const Button = React.forwardRef((props, ref) => {
12
- validateProps('Button', props, ["nativeAnchorAttributes","nativeButtonAttributes","style"], {});
12
+ validateProps('Button', props, ["nativeAnchorAttributes","nativeButtonAttributes","style"], {}, 'console');
13
13
  return React.createElement(CoreComponent, {ref,...props});
14
14
  });
15
15
 
@@ -4,12 +4,12 @@ import React from 'react';
4
4
 
5
5
  import CoreComponent from './internal-do-not-use-core';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '../internal/base-component';
7
+ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
8
 
9
9
 
10
10
 
11
11
  const ButtonDropdown = React.forwardRef((props, ref) => {
12
- validateProps('ButtonDropdown', props, ["nativeMainActionAttributes","nativeTriggerAttributes"], {});
12
+ validateProps('ButtonDropdown', props, ["nativeMainActionAttributes","nativeTriggerAttributes"], {}, 'console');
13
13
  return React.createElement(CoreComponent, {ref,...props});
14
14
  });
15
15
 
@@ -4,12 +4,12 @@ import React from 'react';
4
4
 
5
5
  import CoreComponent from './internal-do-not-use-core';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '../internal/base-component';
7
+ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
8
 
9
9
 
10
10
 
11
11
  const Container = (props) => {
12
- validateProps('Container', props, ["disableFooterPaddings","style"], {});
12
+ validateProps('Container', props, ["disableFooterPaddings","style"], {}, 'console');
13
13
  return React.createElement(CoreComponent, props);
14
14
  };
15
15
 
package/flashbar/index.js CHANGED
@@ -4,12 +4,12 @@ import React from 'react';
4
4
 
5
5
  import CoreComponent from './internal-do-not-use-core';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '../internal/base-component';
7
+ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
8
 
9
9
 
10
10
 
11
11
  const Flashbar = (props) => {
12
- validateProps('Flashbar', props, ["style"], {});
12
+ validateProps('Flashbar', props, ["style"], {}, 'console');
13
13
  return React.createElement(CoreComponent, props);
14
14
  };
15
15
 
@@ -2039,5 +2039,5 @@
2039
2039
  }
2040
2040
  }
2041
2041
  :root {
2042
- --awsui-version-info-2c99e1af: true;
2042
+ --awsui-version-info-8767da01: true;
2043
2043
  }
@@ -1,6 +1,6 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (2c99e1af)";
3
- export var GIT_SHA = "2c99e1af";
2
+ export var PACKAGE_VERSION = "3.0.0 (8767da01)";
3
+ export var GIT_SHA = "8767da01";
4
4
  export var THEME = "open-source-visual-refresh";
5
5
  export var SYSTEM = "console";
6
6
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (2c99e1af)",
4
- "GIT_SHA": "2c99e1af",
3
+ "PACKAGE_VERSION": "3.0.0 (8767da01)",
4
+ "GIT_SHA": "8767da01",
5
5
  "THEME": "open-source-visual-refresh",
6
6
  "SYSTEM": "console",
7
7
  "ALWAYS_VISUAL_REFRESH": true
@@ -1,4 +1,4 @@
1
- import { MutableRefObject } from 'react';
1
+ import React, { MutableRefObject } from 'react';
2
2
  import { ComponentConfiguration } from '@cloudscape-design/component-toolkit/internal';
3
3
  import { AnalyticsMetadata } from '../../analytics/interfaces';
4
4
  export interface InternalBaseComponentProps<T = any> {
@@ -10,5 +10,5 @@ export interface InternalBaseComponentProps<T = any> {
10
10
  * root DOM node and emits the telemetry for this component.
11
11
  */
12
12
  export default function useBaseComponent<T = any>(componentName: string, config?: ComponentConfiguration, analyticsMetadata?: AnalyticsMetadata): {
13
- __internalRootRef: import("react").RefObject<T>;
13
+ __internalRootRef: React.RefObject<T>;
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-base-component/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EACL,sBAAsB,EAIvB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAM/D,MAAM,WAAW,0BAA0B,CAAC,CAAC,GAAG,GAAG;IACjD,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;CACvD;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAC9C,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,sBAAsB,EAC/B,iBAAiB,CAAC,EAAE,iBAAiB;;EAatC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-base-component/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EACL,sBAAsB,EAIvB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAM/D,MAAM,WAAW,0BAA0B,CAAC,CAAC,GAAG,GAAG;IACjD,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;CACvD;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAC9C,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,sBAAsB,EAC/B,iBAAiB,CAAC,EAAE,iBAAiB;;EAatC"}
@@ -12,8 +12,8 @@ export default function useBaseComponent(componentName, config, analyticsMetadat
12
12
  const isVisualRefresh = useVisualRefresh();
13
13
  const theme = getVisualTheme(THEME, isVisualRefresh);
14
14
  useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);
15
- useMissingStylesCheck();
16
15
  const elementRef = useComponentMetadata(componentName, { packageName: PACKAGE_SOURCE, version: PACKAGE_VERSION, theme }, analyticsMetadata);
16
+ useMissingStylesCheck(elementRef);
17
17
  useFocusVisible(elementRef);
18
18
  return { __internalRootRef: elementRef };
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-base-component/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GAChB,MAAM,+CAA+C,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAMvD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,aAAqB,EACrB,MAA+B,EAC/B,iBAAqC;IAErC,MAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAC3C,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACrD,mBAAmB,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;IACtH,qBAAqB,EAAE,CAAC;IACxB,MAAM,UAAU,GAAG,oBAAoB,CACrC,aAAa,EACb,EAAE,WAAW,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,EAChE,iBAAwB,CACzB,CAAC;IACF,eAAe,CAAC,UAA2C,CAAC,CAAC;IAC7D,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { MutableRefObject } from 'react';\n\nimport {\n ComponentConfiguration,\n useComponentMetadata,\n useComponentMetrics,\n useFocusVisible,\n} from '@cloudscape-design/component-toolkit/internal';\n\nimport { AnalyticsMetadata } from '../../analytics/interfaces';\nimport { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from '../../environment';\nimport { getVisualTheme } from '../../utils/get-visual-theme';\nimport { useVisualRefresh } from '../use-visual-mode';\nimport { useMissingStylesCheck } from './styles-check';\n\nexport interface InternalBaseComponentProps<T = any> {\n __internalRootRef?: MutableRefObject<T | null> | null;\n}\n\n/**\n * This hook is used for components which are exported to customers. The returned __internalRootRef needs to be\n * attached to the (internal) component's root DOM node. The hook takes care of attaching the metadata to this\n * root DOM node and emits the telemetry for this component.\n */\nexport default function useBaseComponent<T = any>(\n componentName: string,\n config?: ComponentConfiguration,\n analyticsMetadata?: AnalyticsMetadata\n) {\n const isVisualRefresh = useVisualRefresh();\n const theme = getVisualTheme(THEME, isVisualRefresh);\n useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);\n useMissingStylesCheck();\n const elementRef = useComponentMetadata<T>(\n componentName,\n { packageName: PACKAGE_SOURCE, version: PACKAGE_VERSION, theme },\n analyticsMetadata as any\n );\n useFocusVisible(elementRef as MutableRefObject<HTMLElement>);\n return { __internalRootRef: elementRef };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-base-component/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GAChB,MAAM,+CAA+C,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAMvD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,aAAqB,EACrB,MAA+B,EAC/B,iBAAqC;IAErC,MAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAC3C,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACrD,mBAAmB,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;IACtH,MAAM,UAAU,GAAG,oBAAoB,CACrC,aAAa,EACb,EAAE,WAAW,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,EAChE,iBAAwB,CACzB,CAAC;IACF,qBAAqB,CAAC,UAA0C,CAAC,CAAC;IAClE,eAAe,CAAC,UAA0C,CAAC,CAAC;IAC5D,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { MutableRefObject } from 'react';\n\nimport {\n ComponentConfiguration,\n useComponentMetadata,\n useComponentMetrics,\n useFocusVisible,\n} from '@cloudscape-design/component-toolkit/internal';\n\nimport { AnalyticsMetadata } from '../../analytics/interfaces';\nimport { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from '../../environment';\nimport { getVisualTheme } from '../../utils/get-visual-theme';\nimport { useVisualRefresh } from '../use-visual-mode';\nimport { useMissingStylesCheck } from './styles-check';\n\nexport interface InternalBaseComponentProps<T = any> {\n __internalRootRef?: MutableRefObject<T | null> | null;\n}\n\n/**\n * This hook is used for components which are exported to customers. The returned __internalRootRef needs to be\n * attached to the (internal) component's root DOM node. The hook takes care of attaching the metadata to this\n * root DOM node and emits the telemetry for this component.\n */\nexport default function useBaseComponent<T = any>(\n componentName: string,\n config?: ComponentConfiguration,\n analyticsMetadata?: AnalyticsMetadata\n) {\n const isVisualRefresh = useVisualRefresh();\n const theme = getVisualTheme(THEME, isVisualRefresh);\n useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);\n const elementRef = useComponentMetadata<T>(\n componentName,\n { packageName: PACKAGE_SOURCE, version: PACKAGE_VERSION, theme },\n analyticsMetadata as any\n );\n useMissingStylesCheck(elementRef as React.RefObject<HTMLElement>);\n useFocusVisible(elementRef as React.RefObject<HTMLElement>);\n return { __internalRootRef: elementRef };\n}\n"]}
@@ -1,3 +1,4 @@
1
- export declare function checkMissingStyles(): void;
1
+ import React from 'react';
2
+ export declare function checkMissingStyles(ownerDocument: Document): void;
2
3
  export declare function idleWithDelay(cb: () => void): (() => void) | undefined;
3
- export declare function useMissingStylesCheck(): void;
4
+ export declare function useMissingStylesCheck(elementRef: React.RefObject<HTMLElement>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"styles-check.d.ts","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-base-component/styles-check.ts"],"names":[],"mappings":"AAOA,wBAAgB,kBAAkB,SAMjC;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,IAAI,4BAsB3C;AAUD,wBAAgB,qBAAqB,SAIpC"}
1
+ {"version":3,"file":"styles-check.d.ts","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-base-component/styles-check.ts"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,QAAQ,QAMzD;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,IAAI,4BAsB3C;AAYD,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,QAI7E"}
@@ -3,8 +3,8 @@
3
3
  import { useEffect } from 'react';
4
4
  import { GIT_SHA, PACKAGE_VERSION, THEME } from '../../environment';
5
5
  import { metrics } from '../../metrics';
6
- export function checkMissingStyles() {
7
- const result = getComputedStyle(document.body).getPropertyValue(`--awsui-version-info-${GIT_SHA}`);
6
+ export function checkMissingStyles(ownerDocument) {
7
+ const result = getComputedStyle(ownerDocument.body).getPropertyValue(`--awsui-version-info-${GIT_SHA}`);
8
8
  if (!result) {
9
9
  console.error(`Missing AWS-UI CSS for theme "${THEME}", version "${PACKAGE_VERSION}", and git sha "${GIT_SHA}".`);
10
10
  metrics.sendOpsMetricObject('awsui-missing-css-asset', {});
@@ -31,16 +31,19 @@ export function idleWithDelay(cb) {
31
31
  aborted = true;
32
32
  };
33
33
  }
34
- let checked = false;
35
- const checkMissingStylesOnce = () => {
34
+ const checkedDocs = new WeakMap();
35
+ const checkMissingStylesOnce = (elementRef) => {
36
+ var _a, _b;
37
+ const ownerDocument = (_b = (_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) !== null && _b !== void 0 ? _b : document;
38
+ const checked = checkedDocs.get(ownerDocument);
36
39
  if (!checked) {
37
- checkMissingStyles();
38
- checked = true;
40
+ checkMissingStyles(ownerDocument);
41
+ checkedDocs.set(ownerDocument, true);
39
42
  }
40
43
  };
41
- export function useMissingStylesCheck() {
44
+ export function useMissingStylesCheck(elementRef) {
42
45
  useEffect(() => {
43
- return idleWithDelay(() => checkMissingStylesOnce());
44
- }, []);
46
+ return idleWithDelay(() => checkMissingStylesOnce(elementRef));
47
+ }, [elementRef]);
45
48
  }
46
49
  //# sourceMappingURL=styles-check.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles-check.js","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-base-component/styles-check.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,UAAU,kBAAkB;IAChC,MAAM,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;IACnG,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,CAAC,KAAK,CAAC,iCAAiC,KAAK,eAAe,eAAe,mBAAmB,OAAO,IAAI,CAAC,CAAC;QAClH,OAAO,CAAC,mBAAmB,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;KAC5D;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,EAAc;IAC1C,uEAAuE;IACvE,IAAI,OAAO,mBAAmB,KAAK,UAAU,EAAE;QAC7C,OAAO;KACR;IACD,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,OAAO,EAAE;YACX,OAAO;SACR;QACD,mBAAmB,CAAC,GAAG,EAAE;YACvB,IAAI,OAAO,EAAE;gBACX,OAAO;aACR;YACD,EAAE,EAAE,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,IAAI,CAAC,CAAC;IAET,OAAO,GAAG,EAAE;QACV,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,OAAO,GAAG,KAAK,CAAC;AACpB,MAAM,sBAAsB,GAAG,GAAG,EAAE;IAClC,IAAI,CAAC,OAAO,EAAE;QACZ,kBAAkB,EAAE,CAAC;QACrB,OAAO,GAAG,IAAI,CAAC;KAChB;AACH,CAAC,CAAC;AAEF,MAAM,UAAU,qBAAqB;IACnC,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,aAAa,CAAC,GAAG,EAAE,CAAC,sBAAsB,EAAE,CAAC,CAAC;IACvD,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useEffect } from 'react';\n\nimport { GIT_SHA, PACKAGE_VERSION, THEME } from '../../environment';\nimport { metrics } from '../../metrics';\n\nexport function checkMissingStyles() {\n const result = getComputedStyle(document.body).getPropertyValue(`--awsui-version-info-${GIT_SHA}`);\n if (!result) {\n console.error(`Missing AWS-UI CSS for theme \"${THEME}\", version \"${PACKAGE_VERSION}\", and git sha \"${GIT_SHA}\".`);\n metrics.sendOpsMetricObject('awsui-missing-css-asset', {});\n }\n}\n\nexport function idleWithDelay(cb: () => void) {\n // if idle callbacks not supported, we simply do not collect the metric\n if (typeof requestIdleCallback !== 'function') {\n return;\n }\n let aborted = false;\n\n setTimeout(() => {\n if (aborted) {\n return;\n }\n requestIdleCallback(() => {\n if (aborted) {\n return;\n }\n cb();\n });\n }, 1000);\n\n return () => {\n aborted = true;\n };\n}\n\nlet checked = false;\nconst checkMissingStylesOnce = () => {\n if (!checked) {\n checkMissingStyles();\n checked = true;\n }\n};\n\nexport function useMissingStylesCheck() {\n useEffect(() => {\n return idleWithDelay(() => checkMissingStylesOnce());\n }, []);\n}\n"]}
1
+ {"version":3,"file":"styles-check.js","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-base-component/styles-check.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,UAAU,kBAAkB,CAAC,aAAuB;IACxD,MAAM,MAAM,GAAG,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;IACxG,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,CAAC,KAAK,CAAC,iCAAiC,KAAK,eAAe,eAAe,mBAAmB,OAAO,IAAI,CAAC,CAAC;QAClH,OAAO,CAAC,mBAAmB,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;KAC5D;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,EAAc;IAC1C,uEAAuE;IACvE,IAAI,OAAO,mBAAmB,KAAK,UAAU,EAAE;QAC7C,OAAO;KACR;IACD,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,OAAO,EAAE;YACX,OAAO;SACR;QACD,mBAAmB,CAAC,GAAG,EAAE;YACvB,IAAI,OAAO,EAAE;gBACX,OAAO;aACR;YACD,EAAE,EAAE,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,IAAI,CAAC,CAAC;IAET,OAAO,GAAG,EAAE;QACV,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,IAAI,OAAO,EAAqB,CAAC;AACrD,MAAM,sBAAsB,GAAG,CAAC,UAAwC,EAAE,EAAE;;IAC1E,MAAM,aAAa,GAAG,MAAA,MAAA,UAAU,CAAC,OAAO,0CAAE,aAAa,mCAAI,QAAQ,CAAC;IACpE,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/C,IAAI,CAAC,OAAO,EAAE;QACZ,kBAAkB,CAAC,aAAa,CAAC,CAAC;QAClC,WAAW,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;KACtC;AACH,CAAC,CAAC;AAEF,MAAM,UAAU,qBAAqB,CAAC,UAAwC;IAC5E,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,aAAa,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC,CAAC;IACjE,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AACnB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\n\nimport { GIT_SHA, PACKAGE_VERSION, THEME } from '../../environment';\nimport { metrics } from '../../metrics';\n\nexport function checkMissingStyles(ownerDocument: Document) {\n const result = getComputedStyle(ownerDocument.body).getPropertyValue(`--awsui-version-info-${GIT_SHA}`);\n if (!result) {\n console.error(`Missing AWS-UI CSS for theme \"${THEME}\", version \"${PACKAGE_VERSION}\", and git sha \"${GIT_SHA}\".`);\n metrics.sendOpsMetricObject('awsui-missing-css-asset', {});\n }\n}\n\nexport function idleWithDelay(cb: () => void) {\n // if idle callbacks not supported, we simply do not collect the metric\n if (typeof requestIdleCallback !== 'function') {\n return;\n }\n let aborted = false;\n\n setTimeout(() => {\n if (aborted) {\n return;\n }\n requestIdleCallback(() => {\n if (aborted) {\n return;\n }\n cb();\n });\n }, 1000);\n\n return () => {\n aborted = true;\n };\n}\n\nconst checkedDocs = new WeakMap<Document, boolean>();\nconst checkMissingStylesOnce = (elementRef: React.RefObject<HTMLElement>) => {\n const ownerDocument = elementRef.current?.ownerDocument ?? document;\n const checked = checkedDocs.get(ownerDocument);\n if (!checked) {\n checkMissingStyles(ownerDocument);\n checkedDocs.set(ownerDocument, true);\n }\n};\n\nexport function useMissingStylesCheck(elementRef: React.RefObject<HTMLElement>) {\n useEffect(() => {\n return idleWithDelay(() => checkMissingStylesOnce(elementRef));\n }, [elementRef]);\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "2c99e1af2e33a3f30f0518f077b13e7e43f8c2a5"
2
+ "commit": "8767da0142e31201ac776297aaf9ff937ebbb8dd"
3
3
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-global-breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../../src/internal/plugins/helpers/use-global-breadcrumbs.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAoC5E,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,WAQ1G;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,oCAiBvD"}
1
+ {"version":3,"file":"use-global-breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../../src/internal/plugins/helpers/use-global-breadcrumbs.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAyC5E,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,WAQ1G;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,oCAiBvD"}
@@ -4,6 +4,7 @@ import { __rest } from "tslib";
4
4
  import { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
5
5
  import { useAppLayoutFlagEnabled } from '../../../app-layout/utils/feature-flags';
6
6
  import { AppLayoutVisibilityContext, BreadcrumbsSlotContext, } from '../../../app-layout/visual-refresh-toolbar/contexts';
7
+ import { metrics } from '../../metrics';
7
8
  import { awsuiPluginsInternal } from '../api';
8
9
  function useSetGlobalBreadcrumbsImplementation(_a) {
9
10
  var _b, _c;
@@ -16,7 +17,13 @@ function useSetGlobalBreadcrumbsImplementation(_a) {
16
17
  if (isInToolbar || __disableGlobalization || !isLayoutVisible) {
17
18
  return;
18
19
  }
19
- const registration = awsuiPluginsInternal.breadcrumbs.registerBreadcrumbs(props, isRegistered => setRegistered(isRegistered !== null && isRegistered !== void 0 ? isRegistered : true));
20
+ const registration = awsuiPluginsInternal.breadcrumbs.registerBreadcrumbs(props, isRegistered => {
21
+ setRegistered(isRegistered !== null && isRegistered !== void 0 ? isRegistered : true);
22
+ if (isRegistered) {
23
+ const breadcrumbs = props.items.map(item => item.text).join(' > ');
24
+ metrics.sendOpsMetricObject('awsui-global-breadcrumbs-used', { breadcrumbs });
25
+ }
26
+ });
20
27
  registrationRef.current = registration;
21
28
  return () => {
22
29
  registration.cleanup();
@@ -1 +1 @@
1
- {"version":3,"file":"use-global-breadcrumbs.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/helpers/use-global-breadcrumbs.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAA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UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAsC,KAA8B;IACzG,gEAAgE;IAChE,IAAI,CAAC,uBAAuB,EAAE,EAAE;QAC9B,OAAO,KAAK,CAAC;KACd;IACD,iEAAiE;IACjE,sDAAsD;IACtD,OAAO,qCAAqC,CAAC,KAAK,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAmC,IAAI,CAAC,CAAC;IAE3G,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;SACR;QACD,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,WAAW,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;YAC3F,wBAAwB,CAAC,WAAW,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE;YACV,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAC;YACxB,wBAAwB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,qBAAqB,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { useAppLayoutFlagEnabled } from '../../../app-layout/utils/feature-flags';\nimport {\n AppLayoutVisibilityContext,\n BreadcrumbsSlotContext,\n} from '../../../app-layout/visual-refresh-toolbar/contexts';\nimport { BreadcrumbGroupProps } from '../../../breadcrumb-group/interfaces';\nimport { awsuiPluginsInternal } from '../api';\nimport { BreadcrumbsGlobalRegistration } from '../controllers/breadcrumbs';\n\nfunction useSetGlobalBreadcrumbsImplementation({\n __disableGlobalization,\n ...props\n}: BreadcrumbGroupProps<any> & { __disableGlobalization?: boolean }) {\n const { isInToolbar } = useContext(BreadcrumbsSlotContext) ?? {};\n const isLayoutVisible = useContext(AppLayoutVisibilityContext) ?? true;\n const registrationRef = useRef<BreadcrumbsGlobalRegistration<BreadcrumbGroupProps> | null>();\n const [registered, setRegistered] = useState(false);\n\n useEffect(() => {\n if (isInToolbar || __disableGlobalization || !isLayoutVisible) {\n return;\n }\n const registration = awsuiPluginsInternal.breadcrumbs.registerBreadcrumbs(props, isRegistered =>\n setRegistered(isRegistered ?? true)\n );\n registrationRef.current = registration;\n\n return () => {\n registration.cleanup();\n };\n // subsequent prop changes are handled by another effect\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isInToolbar, __disableGlobalization, isLayoutVisible]);\n\n useLayoutEffect(() => {\n registrationRef.current?.update(props);\n });\n\n return registered;\n}\n\nexport function useSetGlobalBreadcrumbs<T extends BreadcrumbGroupProps.Item>(props: BreadcrumbGroupProps<T>) {\n // avoid additional side effects when this feature is not active\n if (!useAppLayoutFlagEnabled()) {\n return false;\n }\n // getGlobalFlag() value does not change without full page reload\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useSetGlobalBreadcrumbsImplementation(props);\n}\n\nexport function useGetGlobalBreadcrumbs(enabled: boolean) {\n const [discoveredBreadcrumbs, setDiscoveredBreadcrumbs] = useState<BreadcrumbGroupProps<any> | null>(null);\n\n useEffect(() => {\n if (!enabled) {\n return;\n }\n const unregisterAppLayout = awsuiPluginsInternal.breadcrumbs.registerAppLayout(breadcrumbs => {\n setDiscoveredBreadcrumbs(breadcrumbs);\n });\n return () => {\n unregisterAppLayout?.();\n setDiscoveredBreadcrumbs(null);\n };\n }, [enabled]);\n\n return discoveredBreadcrumbs;\n}\n"]}
1
+ {"version":3,"file":"use-global-breadcrumbs.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/helpers/use-global-breadcrumbs.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,UA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ier: Apache-2.0\nimport { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { useAppLayoutFlagEnabled } from '../../../app-layout/utils/feature-flags';\nimport {\n AppLayoutVisibilityContext,\n BreadcrumbsSlotContext,\n} from '../../../app-layout/visual-refresh-toolbar/contexts';\nimport { BreadcrumbGroupProps } from '../../../breadcrumb-group/interfaces';\nimport { metrics } from '../../metrics';\nimport { awsuiPluginsInternal } from '../api';\nimport { BreadcrumbsGlobalRegistration } from '../controllers/breadcrumbs';\n\nfunction useSetGlobalBreadcrumbsImplementation({\n __disableGlobalization,\n ...props\n}: BreadcrumbGroupProps<any> & { __disableGlobalization?: boolean }) {\n const { isInToolbar } = useContext(BreadcrumbsSlotContext) ?? {};\n const isLayoutVisible = useContext(AppLayoutVisibilityContext) ?? true;\n const registrationRef = useRef<BreadcrumbsGlobalRegistration<BreadcrumbGroupProps> | null>();\n const [registered, setRegistered] = useState(false);\n\n useEffect(() => {\n if (isInToolbar || __disableGlobalization || !isLayoutVisible) {\n return;\n }\n const registration = awsuiPluginsInternal.breadcrumbs.registerBreadcrumbs(props, isRegistered => {\n setRegistered(isRegistered ?? true);\n if (isRegistered) {\n const breadcrumbs = props.items.map(item => item.text).join(' > ');\n metrics.sendOpsMetricObject('awsui-global-breadcrumbs-used', { breadcrumbs });\n }\n });\n registrationRef.current = registration;\n\n return () => {\n registration.cleanup();\n };\n // subsequent prop changes are handled by another effect\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isInToolbar, __disableGlobalization, isLayoutVisible]);\n\n useLayoutEffect(() => {\n registrationRef.current?.update(props);\n });\n\n return registered;\n}\n\nexport function useSetGlobalBreadcrumbs<T extends BreadcrumbGroupProps.Item>(props: BreadcrumbGroupProps<T>) {\n // avoid additional side effects when this feature is not active\n if (!useAppLayoutFlagEnabled()) {\n return false;\n }\n // getGlobalFlag() value does not change without full page reload\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useSetGlobalBreadcrumbsImplementation(props);\n}\n\nexport function useGetGlobalBreadcrumbs(enabled: boolean) {\n const [discoveredBreadcrumbs, setDiscoveredBreadcrumbs] = useState<BreadcrumbGroupProps<any> | null>(null);\n\n useEffect(() => {\n if (!enabled) {\n return;\n }\n const unregisterAppLayout = awsuiPluginsInternal.breadcrumbs.registerAppLayout(breadcrumbs => {\n setDiscoveredBreadcrumbs(breadcrumbs);\n });\n return () => {\n unregisterAppLayout?.();\n setDiscoveredBreadcrumbs(null);\n };\n }, [enabled]);\n\n return discoveredBreadcrumbs;\n}\n"]}
package/link/index.js CHANGED
@@ -4,12 +4,12 @@ import React from 'react';
4
4
 
5
5
  import CoreComponent from './internal-do-not-use-core';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '../internal/base-component';
7
+ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
8
 
9
9
 
10
10
 
11
11
  const Link = React.forwardRef((props, ref) => {
12
- validateProps('Link', props, ["style"], {});
12
+ validateProps('Link', props, ["style"], {}, 'console');
13
13
  return React.createElement(CoreComponent, {ref,...props});
14
14
  });
15
15
 
package/package.json CHANGED
@@ -150,7 +150,7 @@
150
150
  "./internal/base-component/index.js",
151
151
  "./internal/base-component/styles.css.js"
152
152
  ],
153
- "version": "3.0.1052",
153
+ "version": "3.0.1053",
154
154
  "repository": {
155
155
  "type": "git",
156
156
  "url": "https://github.com/cloudscape-design/components.git"
@@ -4,12 +4,12 @@ import React from 'react';
4
4
 
5
5
  import CoreComponent from './internal-do-not-use-core';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '../internal/base-component';
7
+ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
8
 
9
9
 
10
10
 
11
11
  const PromptInput = React.forwardRef((props, ref) => {
12
- validateProps('PromptInput', props, ["customPrimaryAction"], {});
12
+ validateProps('PromptInput', props, ["customPrimaryAction"], {}, 'console');
13
13
  return React.createElement(CoreComponent, {ref,...props});
14
14
  });
15
15
 
@@ -4,12 +4,12 @@ import React from 'react';
4
4
 
5
5
  import CoreComponent from './internal-do-not-use-core';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '../internal/base-component';
7
+ import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
8
 
9
9
 
10
10
 
11
11
  const ToggleButton = React.forwardRef((props, ref) => {
12
- validateProps('ToggleButton', props, ["nativeAnchorAttributes","nativeButtonAttributes"], {});
12
+ validateProps('ToggleButton', props, ["nativeAnchorAttributes","nativeButtonAttributes"], {}, 'console');
13
13
  return React.createElement(CoreComponent, {ref,...props});
14
14
  });
15
15