@cloudscape-design/board-components 3.0.53 → 3.0.55

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,9 @@ import useBaseComponent from "../internal/base-component/use-base-component";
5
5
  import { applyDisplayName } from "../internal/utils/apply-display-name";
6
6
  import { InternalBoardItem } from "./internal";
7
7
  export default function BoardItem(props) {
8
- const baseComponentProps = useBaseComponent("BoardItem");
8
+ const baseComponentProps = useBaseComponent("BoardItem", {
9
+ props: { disableContentPaddings: props.disableContentPaddings },
10
+ });
9
11
  return _jsx(InternalBoardItem, { ...props, ...baseComponentProps });
10
12
  }
11
13
  applyDisplayName(BoardItem, "BoardItem");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/board-item/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAqB;IACrD,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzD,OAAO,KAAC,iBAAiB,OAAK,KAAK,KAAM,kBAAkB,GAAI,CAAC;AAClE,CAAC;AAED,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport useBaseComponent from \"../internal/base-component/use-base-component\";\nimport { applyDisplayName } from \"../internal/utils/apply-display-name\";\nimport type { BoardItemProps } from \"./interfaces\";\nimport { InternalBoardItem } from \"./internal\";\n\nexport { BoardItemProps };\n\nexport default function BoardItem(props: BoardItemProps) {\n const baseComponentProps = useBaseComponent(\"BoardItem\");\n return <InternalBoardItem {...props} {...baseComponentProps} />;\n}\n\napplyDisplayName(BoardItem, \"BoardItem\");\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/board-item/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAqB;IACrD,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,WAAW,EAAE;QACvD,KAAK,EAAE,EAAE,sBAAsB,EAAE,KAAK,CAAC,sBAAsB,EAAE;KAChE,CAAC,CAAC;IACH,OAAO,KAAC,iBAAiB,OAAK,KAAK,KAAM,kBAAkB,GAAI,CAAC;AAClE,CAAC;AAED,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport useBaseComponent from \"../internal/base-component/use-base-component\";\nimport { applyDisplayName } from \"../internal/utils/apply-display-name\";\nimport type { BoardItemProps } from \"./interfaces\";\nimport { InternalBoardItem } from \"./internal\";\n\nexport { BoardItemProps };\n\nexport default function BoardItem(props: BoardItemProps) {\n const baseComponentProps = useBaseComponent(\"BoardItem\", {\n props: { disableContentPaddings: props.disableContentPaddings },\n });\n return <InternalBoardItem {...props} {...baseComponentProps} />;\n}\n\napplyDisplayName(BoardItem, \"BoardItem\");\n"]}
@@ -1,3 +1,4 @@
1
+ import { ComponentConfiguration } from "@cloudscape-design/component-toolkit/internal";
1
2
  import { MutableRefObject } from "react";
2
3
  export interface InternalBaseComponentProps {
3
4
  __internalRootRef?: MutableRefObject<any> | null;
@@ -7,6 +8,6 @@ export interface InternalBaseComponentProps {
7
8
  * attached to the (internal) component's root DOM node. The hook takes care of attaching the metadata to this
8
9
  * root DOM node and emits the telemetry for this component.
9
10
  */
10
- export default function useBaseComponent<T = any>(componentName: string): {
11
+ export default function useBaseComponent<T = any>(componentName: string, config?: ComponentConfiguration): {
11
12
  __internalRootRef: import("react").RefObject<T>;
12
13
  };
@@ -1,6 +1,6 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import { initAwsUiVersions, useComponentMetadata } from "@cloudscape-design/component-toolkit/internal";
3
+ import { initAwsUiVersions, useComponentMetadata, } from "@cloudscape-design/component-toolkit/internal";
4
4
  import { PACKAGE_SOURCE, PACKAGE_VERSION } from "../environment";
5
5
  import { useTelemetry } from "./use-telemetry";
6
6
  initAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION);
@@ -9,8 +9,8 @@ initAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION);
9
9
  * attached to the (internal) component's root DOM node. The hook takes care of attaching the metadata to this
10
10
  * root DOM node and emits the telemetry for this component.
11
11
  */
12
- export default function useBaseComponent(componentName) {
13
- useTelemetry(componentName);
12
+ export default function useBaseComponent(componentName, config) {
13
+ useTelemetry(componentName, config);
14
14
  const elementRef = useComponentMetadata(componentName, PACKAGE_VERSION);
15
15
  return { __internalRootRef: elementRef };
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-base-component.js","sourceRoot":"","sources":["../../../../src/internal/base-component/use-base-component.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAExG,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,iBAAiB,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AAMnD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAU,aAAqB;IACrE,YAAY,CAAC,aAAa,CAAC,CAAC;IAC5B,MAAM,UAAU,GAAG,oBAAoB,CAAI,aAAa,EAAE,eAAe,CAAC,CAAC;IAC3E,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\n\nimport { initAwsUiVersions, useComponentMetadata } from \"@cloudscape-design/component-toolkit/internal\";\nimport { MutableRefObject } from \"react\";\nimport { PACKAGE_SOURCE, PACKAGE_VERSION } from \"../environment\";\nimport { useTelemetry } from \"./use-telemetry\";\n\ninitAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION);\n\nexport interface InternalBaseComponentProps {\n __internalRootRef?: MutableRefObject<any> | 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>(componentName: string) {\n useTelemetry(componentName);\n const elementRef = useComponentMetadata<T>(componentName, PACKAGE_VERSION);\n return { __internalRootRef: elementRef };\n}\n"]}
1
+ {"version":3,"file":"use-base-component.js","sourceRoot":"","sources":["../../../../src/internal/base-component/use-base-component.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAEL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,iBAAiB,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AAMnD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAU,aAAqB,EAAE,MAA+B;IACtG,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,UAAU,GAAG,oBAAoB,CAAI,aAAa,EAAE,eAAe,CAAC,CAAC;IAC3E,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\n\nimport {\n ComponentConfiguration,\n initAwsUiVersions,\n useComponentMetadata,\n} from \"@cloudscape-design/component-toolkit/internal\";\nimport { MutableRefObject } from \"react\";\nimport { PACKAGE_SOURCE, PACKAGE_VERSION } from \"../environment\";\nimport { useTelemetry } from \"./use-telemetry\";\n\ninitAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION);\n\nexport interface InternalBaseComponentProps {\n __internalRootRef?: MutableRefObject<any> | 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>(componentName: string, config?: ComponentConfiguration) {\n useTelemetry(componentName, config);\n const elementRef = useComponentMetadata<T>(componentName, PACKAGE_VERSION);\n return { __internalRootRef: elementRef };\n}\n"]}
@@ -1 +1,2 @@
1
- export declare function useTelemetry(componentName: string): void;
1
+ import { ComponentConfiguration } from "@cloudscape-design/component-toolkit/internal";
2
+ export declare function useTelemetry(componentName: string, config?: ComponentConfiguration): void;
@@ -3,8 +3,8 @@
3
3
  import { useComponentMetrics } from "@cloudscape-design/component-toolkit/internal";
4
4
  import { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from "../environment";
5
5
  import { useVisualRefresh } from "./use-visual-refresh";
6
- export function useTelemetry(componentName) {
6
+ export function useTelemetry(componentName, config) {
7
7
  const theme = useVisualRefresh() ? "vr" : THEME;
8
- useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme });
8
+ useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);
9
9
  }
10
10
  //# sourceMappingURL=use-telemetry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-telemetry.js","sourceRoot":"","sources":["../../../../src/internal/base-component/use-telemetry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,YAAY,CAAC,aAAqB;IAChD,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAChD,mBAAmB,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC;AAChH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useComponentMetrics } from \"@cloudscape-design/component-toolkit/internal\";\nimport { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from \"../environment\";\nimport { useVisualRefresh } from \"./use-visual-refresh\";\n\nexport function useTelemetry(componentName: string) {\n const theme = useVisualRefresh() ? \"vr\" : THEME;\n useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme });\n}\n"]}
1
+ {"version":3,"file":"use-telemetry.js","sourceRoot":"","sources":["../../../../src/internal/base-component/use-telemetry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAA0B,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAC5G,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,YAAY,CAAC,aAAqB,EAAE,MAA+B;IACjF,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAChD,mBAAmB,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;AACxH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ComponentConfiguration, useComponentMetrics } from \"@cloudscape-design/component-toolkit/internal\";\nimport { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from \"../environment\";\nimport { useVisualRefresh } from \"./use-visual-refresh\";\n\nexport function useTelemetry(componentName: string, config?: ComponentConfiguration) {\n const theme = useVisualRefresh() ? \"vr\" : THEME;\n useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "board-components";
2
- export var PACKAGE_VERSION = "3.0.0 (9c5fa24b)";
2
+ export var PACKAGE_VERSION = "3.0.0 (fd52d402)";
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": "board-components",
3
- "PACKAGE_VERSION": "3.0.0 (9c5fa24b)",
3
+ "PACKAGE_VERSION": "3.0.0 (fd52d402)",
4
4
  "THEME": "open-source-visual-refresh",
5
5
  "ALWAYS_VISUAL_REFRESH": true
6
6
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "9c5fa24b49c44827a74ff3e587e9273707b3abfd"
2
+ "commit": "fd52d4021b59050d09361733e46a4004f6d2259a"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudscape-design/board-components",
3
- "version": "3.0.53",
3
+ "version": "3.0.55",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/cloudscape-design/board-components.git"
File without changes
File without changes