@cloudscape-design/chart-components 1.0.16 → 1.0.18

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,3 +1,3 @@
1
1
  {
2
- "commit": "116234a9664d7074743c085519df60a1cba3b7e8"
2
+ "commit": "5a5216280e083d41852a08e3ea4a9454f4d23bbb"
3
3
  }
@@ -1,2 +1,2 @@
1
1
  import { CoreLegendProps } from "../../core/interfaces";
2
- export declare const CoreLegend: ({ items, title, actions, ariaLabel, alignment, onItemHighlight, onClearHighlight, onVisibleItemsChange, getLegendTooltipContent, }: CoreLegendProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const CoreLegend: ({ items, title, actions, ariaLabel, alignment, onItemHighlight, onClearHighlight, onVisibleItemsChange, getLegendTooltipContent, horizontalAlignment, }: CoreLegendProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ChartLegend as ChartLegendComponent } from "../../internal/components/chart-legend";
3
3
  import { fireNonCancelableEvent } from "../../internal/events";
4
- export const CoreLegend = ({ items, title, actions, ariaLabel, alignment = "horizontal", onItemHighlight, onClearHighlight, onVisibleItemsChange, getLegendTooltipContent, }) => {
4
+ export const CoreLegend = ({ items, title, actions, ariaLabel, alignment = "horizontal", onItemHighlight, onClearHighlight, onVisibleItemsChange, getLegendTooltipContent, horizontalAlignment = "start", }) => {
5
5
  const position = alignment === "horizontal" ? "bottom" : "side";
6
6
  if (items.length === 0) {
7
7
  return null;
8
8
  }
9
- return (_jsx(ChartLegendComponent, { items: items, actions: actions, legendTitle: title, position: position, ariaLabel: ariaLabel, getTooltipContent: (props) => { var _a; return (_a = getLegendTooltipContent === null || getLegendTooltipContent === void 0 ? void 0 : getLegendTooltipContent(props)) !== null && _a !== void 0 ? _a : null; }, onItemHighlightExit: () => fireNonCancelableEvent(onClearHighlight), onItemHighlightEnter: (item) => fireNonCancelableEvent(onItemHighlight, { item }), onItemVisibilityChange: (items) => fireNonCancelableEvent(onVisibleItemsChange, { items }) }));
9
+ return (_jsx(ChartLegendComponent, { items: items, actions: actions, legendTitle: title, position: position, horizontalAlignment: horizontalAlignment, ariaLabel: ariaLabel, getTooltipContent: (props) => { var _a; return (_a = getLegendTooltipContent === null || getLegendTooltipContent === void 0 ? void 0 : getLegendTooltipContent(props)) !== null && _a !== void 0 ? _a : null; }, onItemHighlightExit: () => fireNonCancelableEvent(onClearHighlight), onItemHighlightEnter: (item) => fireNonCancelableEvent(onItemHighlight, { item }), onItemVisibilityChange: (items) => fireNonCancelableEvent(onVisibleItemsChange, { items }) }));
10
10
  };
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal-do-not-use/core-legend/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,KAAK,EACL,KAAK,EACL,OAAO,EACP,SAAS,EACT,SAAS,GAAG,YAAY,EACxB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,GACP,EAAE,EAAE;IACpB,MAAM,QAAQ,GAAG,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAEhE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,KAAC,oBAAoB,IACnB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,KAAK,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,WAAC,OAAA,MAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAG,KAAK,CAAC,mCAAI,IAAI,CAAA,EAAA,EACtE,mBAAmB,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,EACnE,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,sBAAsB,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,EACjF,sBAAsB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,CAAC,GAC1F,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { CoreLegendProps } from \"../../core/interfaces\";\nimport { ChartLegend as ChartLegendComponent } from \"../../internal/components/chart-legend\";\nimport { fireNonCancelableEvent } from \"../../internal/events\";\n\nexport const CoreLegend = ({\n items,\n title,\n actions,\n ariaLabel,\n alignment = \"horizontal\",\n onItemHighlight,\n onClearHighlight,\n onVisibleItemsChange,\n getLegendTooltipContent,\n}: CoreLegendProps) => {\n const position = alignment === \"horizontal\" ? \"bottom\" : \"side\";\n\n if (items.length === 0) {\n return null;\n }\n\n return (\n <ChartLegendComponent\n items={items}\n actions={actions}\n legendTitle={title}\n position={position}\n ariaLabel={ariaLabel}\n getTooltipContent={(props) => getLegendTooltipContent?.(props) ?? null}\n onItemHighlightExit={() => fireNonCancelableEvent(onClearHighlight)}\n onItemHighlightEnter={(item) => fireNonCancelableEvent(onItemHighlight, { item })}\n onItemVisibilityChange={(items) => fireNonCancelableEvent(onVisibleItemsChange, { items })}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal-do-not-use/core-legend/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,KAAK,EACL,KAAK,EACL,OAAO,EACP,SAAS,EACT,SAAS,GAAG,YAAY,EACxB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,GAAG,OAAO,GACb,EAAE,EAAE;IACpB,MAAM,QAAQ,GAAG,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAEhE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,KAAC,oBAAoB,IACnB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,KAAK,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,EACxC,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,WAAC,OAAA,MAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAG,KAAK,CAAC,mCAAI,IAAI,CAAA,EAAA,EACtE,mBAAmB,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,EACnE,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,sBAAsB,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,EACjF,sBAAsB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,CAAC,GAC1F,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { CoreLegendProps } from \"../../core/interfaces\";\nimport { ChartLegend as ChartLegendComponent } from \"../../internal/components/chart-legend\";\nimport { fireNonCancelableEvent } from \"../../internal/events\";\n\nexport const CoreLegend = ({\n items,\n title,\n actions,\n ariaLabel,\n alignment = \"horizontal\",\n onItemHighlight,\n onClearHighlight,\n onVisibleItemsChange,\n getLegendTooltipContent,\n horizontalAlignment = \"start\",\n}: CoreLegendProps) => {\n const position = alignment === \"horizontal\" ? \"bottom\" : \"side\";\n\n if (items.length === 0) {\n return null;\n }\n\n return (\n <ChartLegendComponent\n items={items}\n actions={actions}\n legendTitle={title}\n position={position}\n horizontalAlignment={horizontalAlignment}\n ariaLabel={ariaLabel}\n getTooltipContent={(props) => getLegendTooltipContent?.(props) ?? null}\n onItemHighlightExit={() => fireNonCancelableEvent(onClearHighlight)}\n onItemHighlightEnter={(item) => fireNonCancelableEvent(onItemHighlight, { item })}\n onItemVisibilityChange={(items) => fireNonCancelableEvent(onVisibleItemsChange, { items })}\n />\n );\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudscape-design/chart-components",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cloudscape-design/chart-components.git"