@cloudscape-design/components 3.0.574 → 3.0.576

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.
Files changed (33) hide show
  1. package/area-chart/model/use-chart-model.js +1 -1
  2. package/area-chart/model/use-chart-model.js.map +1 -1
  3. package/container/styles.css.js +30 -30
  4. package/container/styles.scoped.css +56 -54
  5. package/container/styles.selectors.js +30 -30
  6. package/internal/environment.js +1 -1
  7. package/internal/environment.json +1 -1
  8. package/internal/hooks/use-virtual/index.d.ts +1 -1
  9. package/internal/hooks/use-virtual/index.d.ts.map +1 -1
  10. package/internal/hooks/use-virtual/index.js +1 -1
  11. package/internal/hooks/use-virtual/index.js.map +1 -1
  12. package/internal/manifest.json +1 -1
  13. package/internal/vendor/react-virtual.js +529 -0
  14. package/line-chart/index.d.ts.map +1 -1
  15. package/line-chart/index.js +11 -1
  16. package/line-chart/index.js.map +1 -1
  17. package/mixed-line-bar-chart/hooks/use-mouse-hover.js +1 -1
  18. package/mixed-line-bar-chart/hooks/use-mouse-hover.js.map +1 -1
  19. package/package.json +1 -2
  20. package/select/utils/render-options.d.ts +1 -1
  21. package/select/utils/render-options.d.ts.map +1 -1
  22. package/select/utils/render-options.js.map +1 -1
  23. package/table/body-cell/disabled-inline-editor.d.ts +1 -1
  24. package/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
  25. package/table/body-cell/disabled-inline-editor.js +7 -6
  26. package/table/body-cell/disabled-inline-editor.js.map +1 -1
  27. package/table/body-cell/index.d.ts +1 -0
  28. package/table/body-cell/index.d.ts.map +1 -1
  29. package/table/body-cell/index.js +5 -4
  30. package/table/body-cell/index.js.map +1 -1
  31. package/table/body-cell/styles.css.js +29 -30
  32. package/table/body-cell/styles.scoped.css +113 -84
  33. package/table/body-cell/styles.selectors.js +29 -30
@@ -240,7 +240,7 @@ export default function useChartModel({ fitHeight, externalSeries: allSeries, vi
240
240
  }
241
241
  };
242
242
  const onPopoverLeave = (event) => {
243
- if (plotRef.current.svg.contains(event.relatedTarget) || interactions.get().isPopoverPinned) {
243
+ if (nodeContains(plotRef.current.svg, event.relatedTarget) || interactions.get().isPopoverPinned) {
244
244
  return;
245
245
  }
246
246
  interactions.clearHighlight();
@@ -1 +1 @@
1
- {"version":3,"file":"use-chart-model.js","sourceRoot":"","sources":["../../../../src/area-chart/model/use-chart-model.ts"],"names":[],"mappings":"AAGA,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAyB,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,qBAAqB,MAAM,2BAA2B,CAAC;AAC9D,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAkB5B,6FAA6F;AAC7F,MAAM,CAAC,OAAO,UAAU,aAAa,CAAqC,EACxE,SAAS,EACT,cAAc,EAAE,SAAS,EACzB,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,OAAO,EACP,OAAO,EACP,UAAU,EACV,UAAU,EACV,MAAM,EAAE,cAAc,EACtB,KAAK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AI,EAAE,OAAO;gBACb,WAAW,EAAE,cAAc;gBAC3B,SAAS,EAAE,YAAY;gBACvB,cAAc,EAAE,iBAAiB;gBACjC,UAAU;aACX;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,EAAE,UAAU,CAAC,CAAC,CAAC;IAErH,8CAA8C;IAC9C,WAAW,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC;IAExF,uEAAuE;IACvE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,iBAAiB,KAAK,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE;YACpE,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;SACvD;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAE/B,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AreaChartProps } from '../interfaces';\nimport React, { useEffect, useMemo, useRef, RefObject, MouseEvent } from 'react';\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\nimport { findClosest, circleIndex } from './utils';\n\nimport { KeyCode } from '../../internal/keycode';\nimport { XDomain, XScaleType, YDomain, YScaleType } from '../../internal/components/cartesian-chart/interfaces';\nimport computeChartProps from './compute-chart-props';\nimport createSeriesDecorator from './create-series-decorator';\nimport InteractionsStore from './interactions-store';\nimport { ChartModel } from './index';\nimport { ChartPlotRef } from '../../internal/components/chart-plot';\nimport { throttle } from '../../internal/utils/throttle';\nimport { useReaction } from '../async-store';\nimport { useHeightMeasure } from '../../internal/hooks/container-queries/use-height-measure';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\nimport { nodeBelongs } from '../../internal/utils/node-belongs';\n\nconst MAX_HOVER_MARGIN = 6;\nconst SVG_HOVER_THROTTLE = 25;\nconst POPOVER_DEADZONE = 12;\n\nexport interface UseChartModelProps<T extends AreaChartProps.DataTypes> {\n fitHeight?: boolean;\n externalSeries: readonly AreaChartProps.Series<T>[];\n visibleSeries: readonly AreaChartProps.Series<T>[];\n setVisibleSeries: (series: readonly AreaChartProps.Series<T>[]) => void;\n highlightedSeries: null | AreaChartProps.Series<T>;\n setHighlightedSeries: (series: null | AreaChartProps.Series<T>) => void;\n xDomain?: XDomain<T>;\n yDomain?: YDomain;\n xScaleType: XScaleType;\n yScaleType: YScaleType;\n height: number;\n width: number;\n popoverRef: RefObject<HTMLElement>;\n}\n\n// Represents the core the chart logic, including the model of all allowed user interactions.\nexport default function useChartModel<T extends AreaChartProps.DataTypes>({\n fitHeight,\n externalSeries: allSeries,\n visibleSeries: series,\n setVisibleSeries,\n highlightedSeries,\n setHighlightedSeries,\n xDomain,\n yDomain,\n xScaleType,\n yScaleType,\n height: explicitHeight,\n width,\n popoverRef,\n}: UseChartModelProps<T>): ChartModel<T> {\n // Chart elements refs used in handlers.\n const plotRef = useRef<ChartPlotRef>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const verticalMarkerRef = useRef<SVGLineElement>(null);\n\n const plotMeasureRef = useRef<SVGLineElement>(null);\n const hasVisibleSeries = series.length > 0;\n const height = useHeightMeasure(() => plotMeasureRef.current, !fitHeight, [hasVisibleSeries]) ?? explicitHeight;\n\n const stableSetVisibleSeries = useStableCallback(setVisibleSeries);\n\n const model = useMemo(() => {\n // Compute scales, ticks and two-dimensional plots.\n const computed = computeChartProps({\n series,\n xDomain,\n yDomain,\n xScaleType,\n yScaleType,\n height,\n width,\n });\n\n // A store for chart interactions that don't require plot recomputation.\n const interactions = new InteractionsStore(series, computed.plot);\n\n const containsMultipleSeries = interactions.series.length > 1;\n\n // A series decorator to provide extra props such as color and marker type.\n const getInternalSeries = createSeriesDecorator(allSeries);\n\n const isMouseOverPopover = (clientX: number, clientY: number) => {\n if (popoverRef.current?.firstChild) {\n const popoverPosition = (popoverRef.current.firstChild as HTMLElement).getBoundingClientRect();\n if (\n clientX > popoverPosition.x - POPOVER_DEADZONE &&\n clientX < popoverPosition.x + popoverPosition.width + POPOVER_DEADZONE &&\n clientY > popoverPosition.y - POPOVER_DEADZONE &&\n clientY < popoverPosition.y + popoverPosition.height + POPOVER_DEADZONE\n ) {\n return true;\n }\n }\n return false;\n };\n\n // A Callback for svg mouseover to hover the plot points.\n // Throttling is necessary for a substantially smoother customer experience.\n const onSVGMouseMoveThrottled = throttle((clientX: number, clientY: number) => {\n // No hover logic when the popover is pinned or no data available.\n if (\n interactions.get().isPopoverPinned ||\n !plotRef.current ||\n interactions.plot.xy.length === 0 ||\n isMouseOverPopover(clientX, clientY)\n ) {\n return;\n }\n\n const svgRect = plotRef.current.svg.getBoundingClientRect();\n const offsetX = clientX - svgRect.left;\n const offsetY = clientY - svgRect.top;\n\n const closestX = findClosest(interactions.plot.xy, offsetX, xPoints => xPoints[0].scaled.x);\n const closestPoint = findClosest(closestX, offsetY, point => point.scaled.y1);\n\n // If close enough to the point - highlight the point and its column.\n // If not - only highlight the closest column.\n if (\n Math.abs(offsetX - closestPoint.scaled.x) < MAX_HOVER_MARGIN &&\n Math.abs(offsetY - closestPoint.scaled.y1) < MAX_HOVER_MARGIN\n ) {\n interactions.highlightPoint(closestPoint);\n } else {\n interactions.highlightX(closestX);\n }\n }, SVG_HOVER_THROTTLE);\n\n const onSVGMouseMove = ({ clientX, clientY }: React.MouseEvent<SVGElement>) =>\n onSVGMouseMoveThrottled(clientX, clientY);\n\n // A callback for svg mouseout to clear all highlights.\n const onSVGMouseOut = (event: React.MouseEvent<SVGElement>) => {\n // Because the mouseover is throttled, in can occur slightly after the mouseout,\n // neglecting its effect; cancelling the throttled function prevents that.\n onSVGMouseMoveThrottled.cancel();\n\n // No hover logic when the popover is pinned or mouse is over popover\n if (interactions.get().isPopoverPinned || isMouseOverPopover(event.clientX, event.clientY)) {\n return;\n }\n\n // Check if the target is contained within svg to allow hovering on the popover body.\n if (!nodeContains(plotRef.current!.svg, event.relatedTarget as Element)) {\n interactions.clearHighlightedLegend();\n interactions.clearHighlight();\n }\n };\n\n // A callback for svg click to pin/unpin the popover.\n const onSVGMouseDown = (event: React.MouseEvent<SVGSVGElement>) => {\n interactions.togglePopoverPin();\n event.preventDefault();\n };\n\n const moveWithinXAxis = (direction: -1 | 1) => {\n if (interactions.get().highlightedPoint) {\n return moveWithinSeries(direction);\n } else if (containsMultipleSeries) {\n const { highlightedX } = interactions.get();\n if (highlightedX) {\n const currentXIndex = highlightedX[0].index.x;\n const nextXIndex = circleIndex(currentXIndex + direction, [0, interactions.plot.xy.length - 1]);\n interactions.highlightX(interactions.plot.xy[nextXIndex]);\n }\n }\n };\n\n // A helper function to highlight the next or previous point within selected series.\n const moveWithinSeries = (direction: -1 | 1) => {\n // Can only use motion when a particular point is highlighted.\n const point = interactions.get().highlightedPoint;\n if (!point) {\n return;\n }\n\n // Take the index of the currently highlighted series.\n const sIndex = point.index.s;\n // Take the incremented(circularly) x-index of the currently highlighted point.\n const xIndex = circleIndex(point.index.x + direction, [0, interactions.plot.xs.length - 1]);\n // Highlight the next point using x:s grouped data.\n interactions.highlightPoint(interactions.plot.xs[xIndex][sIndex]);\n };\n\n // A helper function to highlight the next or previous point within the selected column.\n const moveBetweenSeries = (direction: -1 | 1) => {\n const point = interactions.get().highlightedPoint;\n if (!point) {\n const { highlightedX } = interactions.get();\n if (highlightedX) {\n const xIndex = highlightedX[0].index.x;\n const points = interactions.plot.xy[xIndex];\n const yIndex = direction === 1 ? 0 : points.length - 1;\n interactions.highlightPoint(points[yIndex]);\n }\n return;\n }\n\n // Take the index of the currently highlighted column.\n const xIndex = point.index.x;\n const currentYIndex = point.index.y;\n\n if (\n containsMultipleSeries &&\n ((currentYIndex === 0 && direction === -1) ||\n (currentYIndex === interactions.plot.xy[xIndex].length - 1 && direction === 1))\n ) {\n interactions.highlightX(interactions.plot.xy[xIndex]);\n } else {\n // Take the incremented(circularly) y-index of the currently highlighted point.\n const nextYIndex = circleIndex(currentYIndex + direction, [0, interactions.plot.xy[xIndex].length - 1]);\n // Highlight the next point using x:y grouped data.\n interactions.highlightPoint(interactions.plot.xy[xIndex][nextYIndex]);\n }\n };\n\n // A callback for svg keydown to enable motions and popover pin with the keyboard.\n const onSVGKeyDown = (event: React.KeyboardEvent) => {\n const keyCode = event.keyCode;\n if (\n keyCode !== KeyCode.up &&\n keyCode !== KeyCode.right &&\n keyCode !== KeyCode.down &&\n keyCode !== KeyCode.left &&\n keyCode !== KeyCode.space &&\n keyCode !== KeyCode.enter\n ) {\n return;\n }\n\n // Preventing default fixes an issue in Safari+VO when VO additionally interprets arrow keys as its commands.\n event.preventDefault();\n\n // No keydown logic when the popover is pinned.\n if (interactions.get().isPopoverPinned) {\n return;\n }\n\n // Move up/down.\n if (keyCode === KeyCode.down || keyCode === KeyCode.up) {\n moveBetweenSeries(keyCode === KeyCode.down ? -1 : 1);\n }\n // Move left/right.\n else if (keyCode === KeyCode.left || keyCode === KeyCode.right) {\n moveWithinXAxis(keyCode === KeyCode.right ? 1 : -1);\n }\n // Pin popover.\n else if (keyCode === KeyCode.enter || keyCode === KeyCode.space) {\n interactions.pinPopover();\n }\n };\n\n const highlightFirstX = () => {\n interactions.highlightX(interactions.plot.xy[0]);\n };\n\n // A callback for application focus to highlight series.\n const onApplicationFocus = (_event: React.FocusEvent, trigger: 'mouse' | 'keyboard') => {\n // When focus is caused by a click event nothing is expected as clicks are handled separately.\n if (trigger === 'keyboard') {\n const { highlightedX, highlightedPoint, highlightedSeries, legendSeries } = interactions.get();\n if (containsMultipleSeries && !highlightedX && !highlightedPoint && !highlightedSeries && !legendSeries) {\n highlightFirstX();\n } else if (!highlightedX) {\n interactions.highlightFirstPoint();\n }\n }\n };\n\n // A callback for application blur to clear all highlights unless the popover is pinned.\n const onApplicationBlur = (event: React.FocusEvent<Element>) => {\n // Pinned popover stays pinned even if the focus is lost.\n // If blur is not caused by the popover, forget the previously highlighted point.\n if (!nodeBelongs(containerRef.current, event.relatedTarget) && !interactions.get().isPopoverPinned) {\n interactions.clearHighlight();\n }\n };\n\n const onFilterSeries = (series: readonly AreaChartProps.Series<T>[]) => {\n stableSetVisibleSeries(series);\n };\n\n const onLegendHighlight = (series: null | AreaChartProps.Series<T>) => {\n interactions.highlightSeries(series);\n };\n\n const onPopoverDismiss = (outsideClick?: boolean) => {\n interactions.unpinPopover();\n\n // Return focus back to the application or plot (when no point is highlighted).\n if (!outsideClick) {\n // The delay is needed to bypass focus events caused by click or keypress needed to unpin the popover.\n setTimeout(() => {\n if (interactions.get().highlightedPoint || interactions.get().highlightedX) {\n plotRef.current!.focusApplication();\n } else {\n interactions.clearHighlight();\n plotRef.current!.focusPlot();\n }\n }, 0);\n }\n };\n\n const onContainerBlur = () => {\n interactions.clearState();\n };\n\n const onDocumentKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n interactions.clearHighlight();\n interactions.clearHighlightedLegend();\n }\n };\n\n const onPopoverLeave = (event: MouseEvent) => {\n if (plotRef.current!.svg.contains(event.relatedTarget as Node) || interactions.get().isPopoverPinned) {\n return;\n }\n interactions.clearHighlight();\n interactions.clearHighlightedLegend();\n };\n return {\n width,\n height,\n series,\n allSeries,\n getInternalSeries,\n computed,\n interactions,\n handlers: {\n onSVGMouseMove,\n onSVGMouseOut,\n onSVGMouseDown,\n onSVGKeyDown,\n onApplicationFocus,\n onApplicationBlur,\n onFilterSeries,\n onLegendHighlight,\n onPopoverDismiss,\n onContainerBlur,\n onDocumentKeyDown,\n onPopoverLeave,\n },\n refs: {\n plot: plotRef,\n plotMeasure: plotMeasureRef,\n container: containerRef,\n verticalMarker: verticalMarkerRef,\n popoverRef,\n },\n };\n }, [allSeries, series, xDomain, yDomain, xScaleType, yScaleType, height, width, stableSetVisibleSeries, popoverRef]);\n\n // Notify client when series highlight change.\n useReaction(model.interactions, state => state.highlightedSeries, setHighlightedSeries);\n\n // Update interactions store when series highlight in a controlled way.\n useEffect(() => {\n if (highlightedSeries !== model.interactions.get().highlightedSeries) {\n model.interactions.highlightSeries(highlightedSeries);\n }\n }, [model, highlightedSeries]);\n\n return model;\n}\n"]}
1
+ {"version":3,"file":"use-chart-model.js","sourceRoot":"","sources":["../../../../src/area-chart/model/use-chart-model.ts"],"names":[],"mappings":"AAGA,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAyB,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,qBAAqB,MAAM,2BAA2B,CAAC;AAC9D,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAkB5B,6FAA6F;AAC7F,MAAM,CAAC,OAAO,UAAU,aAAa,CAAqC,EACxE,SAAS,EACT,cAAc,EAAE,SAAS,EACzB,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,OAAO,EACP,OAAO,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f,iBAAiB;gBACjB,cAAc;aACf;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,cAAc;gBAC3B,SAAS,EAAE,YAAY;gBACvB,cAAc,EAAE,iBAAiB;gBACjC,UAAU;aACX;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,EAAE,UAAU,CAAC,CAAC,CAAC;IAErH,8CAA8C;IAC9C,WAAW,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC;IAExF,uEAAuE;IACvE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,iBAAiB,KAAK,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE;YACpE,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;SACvD;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAE/B,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AreaChartProps } from '../interfaces';\nimport React, { useEffect, useMemo, useRef, RefObject, MouseEvent } from 'react';\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\nimport { findClosest, circleIndex } from './utils';\n\nimport { KeyCode } from '../../internal/keycode';\nimport { XDomain, XScaleType, YDomain, YScaleType } from '../../internal/components/cartesian-chart/interfaces';\nimport computeChartProps from './compute-chart-props';\nimport createSeriesDecorator from './create-series-decorator';\nimport InteractionsStore from './interactions-store';\nimport { ChartModel } from './index';\nimport { ChartPlotRef } from '../../internal/components/chart-plot';\nimport { throttle } from '../../internal/utils/throttle';\nimport { useReaction } from '../async-store';\nimport { useHeightMeasure } from '../../internal/hooks/container-queries/use-height-measure';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\nimport { nodeBelongs } from '../../internal/utils/node-belongs';\n\nconst MAX_HOVER_MARGIN = 6;\nconst SVG_HOVER_THROTTLE = 25;\nconst POPOVER_DEADZONE = 12;\n\nexport interface UseChartModelProps<T extends AreaChartProps.DataTypes> {\n fitHeight?: boolean;\n externalSeries: readonly AreaChartProps.Series<T>[];\n visibleSeries: readonly AreaChartProps.Series<T>[];\n setVisibleSeries: (series: readonly AreaChartProps.Series<T>[]) => void;\n highlightedSeries: null | AreaChartProps.Series<T>;\n setHighlightedSeries: (series: null | AreaChartProps.Series<T>) => void;\n xDomain?: XDomain<T>;\n yDomain?: YDomain;\n xScaleType: XScaleType;\n yScaleType: YScaleType;\n height: number;\n width: number;\n popoverRef: RefObject<HTMLElement>;\n}\n\n// Represents the core the chart logic, including the model of all allowed user interactions.\nexport default function useChartModel<T extends AreaChartProps.DataTypes>({\n fitHeight,\n externalSeries: allSeries,\n visibleSeries: series,\n setVisibleSeries,\n highlightedSeries,\n setHighlightedSeries,\n xDomain,\n yDomain,\n xScaleType,\n yScaleType,\n height: explicitHeight,\n width,\n popoverRef,\n}: UseChartModelProps<T>): ChartModel<T> {\n // Chart elements refs used in handlers.\n const plotRef = useRef<ChartPlotRef>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const verticalMarkerRef = useRef<SVGLineElement>(null);\n\n const plotMeasureRef = useRef<SVGLineElement>(null);\n const hasVisibleSeries = series.length > 0;\n const height = useHeightMeasure(() => plotMeasureRef.current, !fitHeight, [hasVisibleSeries]) ?? explicitHeight;\n\n const stableSetVisibleSeries = useStableCallback(setVisibleSeries);\n\n const model = useMemo(() => {\n // Compute scales, ticks and two-dimensional plots.\n const computed = computeChartProps({\n series,\n xDomain,\n yDomain,\n xScaleType,\n yScaleType,\n height,\n width,\n });\n\n // A store for chart interactions that don't require plot recomputation.\n const interactions = new InteractionsStore(series, computed.plot);\n\n const containsMultipleSeries = interactions.series.length > 1;\n\n // A series decorator to provide extra props such as color and marker type.\n const getInternalSeries = createSeriesDecorator(allSeries);\n\n const isMouseOverPopover = (clientX: number, clientY: number) => {\n if (popoverRef.current?.firstChild) {\n const popoverPosition = (popoverRef.current.firstChild as HTMLElement).getBoundingClientRect();\n if (\n clientX > popoverPosition.x - POPOVER_DEADZONE &&\n clientX < popoverPosition.x + popoverPosition.width + POPOVER_DEADZONE &&\n clientY > popoverPosition.y - POPOVER_DEADZONE &&\n clientY < popoverPosition.y + popoverPosition.height + POPOVER_DEADZONE\n ) {\n return true;\n }\n }\n return false;\n };\n\n // A Callback for svg mouseover to hover the plot points.\n // Throttling is necessary for a substantially smoother customer experience.\n const onSVGMouseMoveThrottled = throttle((clientX: number, clientY: number) => {\n // No hover logic when the popover is pinned or no data available.\n if (\n interactions.get().isPopoverPinned ||\n !plotRef.current ||\n interactions.plot.xy.length === 0 ||\n isMouseOverPopover(clientX, clientY)\n ) {\n return;\n }\n\n const svgRect = plotRef.current.svg.getBoundingClientRect();\n const offsetX = clientX - svgRect.left;\n const offsetY = clientY - svgRect.top;\n\n const closestX = findClosest(interactions.plot.xy, offsetX, xPoints => xPoints[0].scaled.x);\n const closestPoint = findClosest(closestX, offsetY, point => point.scaled.y1);\n\n // If close enough to the point - highlight the point and its column.\n // If not - only highlight the closest column.\n if (\n Math.abs(offsetX - closestPoint.scaled.x) < MAX_HOVER_MARGIN &&\n Math.abs(offsetY - closestPoint.scaled.y1) < MAX_HOVER_MARGIN\n ) {\n interactions.highlightPoint(closestPoint);\n } else {\n interactions.highlightX(closestX);\n }\n }, SVG_HOVER_THROTTLE);\n\n const onSVGMouseMove = ({ clientX, clientY }: React.MouseEvent<SVGElement>) =>\n onSVGMouseMoveThrottled(clientX, clientY);\n\n // A callback for svg mouseout to clear all highlights.\n const onSVGMouseOut = (event: React.MouseEvent<SVGElement>) => {\n // Because the mouseover is throttled, in can occur slightly after the mouseout,\n // neglecting its effect; cancelling the throttled function prevents that.\n onSVGMouseMoveThrottled.cancel();\n\n // No hover logic when the popover is pinned or mouse is over popover\n if (interactions.get().isPopoverPinned || isMouseOverPopover(event.clientX, event.clientY)) {\n return;\n }\n\n // Check if the target is contained within svg to allow hovering on the popover body.\n if (!nodeContains(plotRef.current!.svg, event.relatedTarget as Element)) {\n interactions.clearHighlightedLegend();\n interactions.clearHighlight();\n }\n };\n\n // A callback for svg click to pin/unpin the popover.\n const onSVGMouseDown = (event: React.MouseEvent<SVGSVGElement>) => {\n interactions.togglePopoverPin();\n event.preventDefault();\n };\n\n const moveWithinXAxis = (direction: -1 | 1) => {\n if (interactions.get().highlightedPoint) {\n return moveWithinSeries(direction);\n } else if (containsMultipleSeries) {\n const { highlightedX } = interactions.get();\n if (highlightedX) {\n const currentXIndex = highlightedX[0].index.x;\n const nextXIndex = circleIndex(currentXIndex + direction, [0, interactions.plot.xy.length - 1]);\n interactions.highlightX(interactions.plot.xy[nextXIndex]);\n }\n }\n };\n\n // A helper function to highlight the next or previous point within selected series.\n const moveWithinSeries = (direction: -1 | 1) => {\n // Can only use motion when a particular point is highlighted.\n const point = interactions.get().highlightedPoint;\n if (!point) {\n return;\n }\n\n // Take the index of the currently highlighted series.\n const sIndex = point.index.s;\n // Take the incremented(circularly) x-index of the currently highlighted point.\n const xIndex = circleIndex(point.index.x + direction, [0, interactions.plot.xs.length - 1]);\n // Highlight the next point using x:s grouped data.\n interactions.highlightPoint(interactions.plot.xs[xIndex][sIndex]);\n };\n\n // A helper function to highlight the next or previous point within the selected column.\n const moveBetweenSeries = (direction: -1 | 1) => {\n const point = interactions.get().highlightedPoint;\n if (!point) {\n const { highlightedX } = interactions.get();\n if (highlightedX) {\n const xIndex = highlightedX[0].index.x;\n const points = interactions.plot.xy[xIndex];\n const yIndex = direction === 1 ? 0 : points.length - 1;\n interactions.highlightPoint(points[yIndex]);\n }\n return;\n }\n\n // Take the index of the currently highlighted column.\n const xIndex = point.index.x;\n const currentYIndex = point.index.y;\n\n if (\n containsMultipleSeries &&\n ((currentYIndex === 0 && direction === -1) ||\n (currentYIndex === interactions.plot.xy[xIndex].length - 1 && direction === 1))\n ) {\n interactions.highlightX(interactions.plot.xy[xIndex]);\n } else {\n // Take the incremented(circularly) y-index of the currently highlighted point.\n const nextYIndex = circleIndex(currentYIndex + direction, [0, interactions.plot.xy[xIndex].length - 1]);\n // Highlight the next point using x:y grouped data.\n interactions.highlightPoint(interactions.plot.xy[xIndex][nextYIndex]);\n }\n };\n\n // A callback for svg keydown to enable motions and popover pin with the keyboard.\n const onSVGKeyDown = (event: React.KeyboardEvent) => {\n const keyCode = event.keyCode;\n if (\n keyCode !== KeyCode.up &&\n keyCode !== KeyCode.right &&\n keyCode !== KeyCode.down &&\n keyCode !== KeyCode.left &&\n keyCode !== KeyCode.space &&\n keyCode !== KeyCode.enter\n ) {\n return;\n }\n\n // Preventing default fixes an issue in Safari+VO when VO additionally interprets arrow keys as its commands.\n event.preventDefault();\n\n // No keydown logic when the popover is pinned.\n if (interactions.get().isPopoverPinned) {\n return;\n }\n\n // Move up/down.\n if (keyCode === KeyCode.down || keyCode === KeyCode.up) {\n moveBetweenSeries(keyCode === KeyCode.down ? -1 : 1);\n }\n // Move left/right.\n else if (keyCode === KeyCode.left || keyCode === KeyCode.right) {\n moveWithinXAxis(keyCode === KeyCode.right ? 1 : -1);\n }\n // Pin popover.\n else if (keyCode === KeyCode.enter || keyCode === KeyCode.space) {\n interactions.pinPopover();\n }\n };\n\n const highlightFirstX = () => {\n interactions.highlightX(interactions.plot.xy[0]);\n };\n\n // A callback for application focus to highlight series.\n const onApplicationFocus = (_event: React.FocusEvent, trigger: 'mouse' | 'keyboard') => {\n // When focus is caused by a click event nothing is expected as clicks are handled separately.\n if (trigger === 'keyboard') {\n const { highlightedX, highlightedPoint, highlightedSeries, legendSeries } = interactions.get();\n if (containsMultipleSeries && !highlightedX && !highlightedPoint && !highlightedSeries && !legendSeries) {\n highlightFirstX();\n } else if (!highlightedX) {\n interactions.highlightFirstPoint();\n }\n }\n };\n\n // A callback for application blur to clear all highlights unless the popover is pinned.\n const onApplicationBlur = (event: React.FocusEvent<Element>) => {\n // Pinned popover stays pinned even if the focus is lost.\n // If blur is not caused by the popover, forget the previously highlighted point.\n if (!nodeBelongs(containerRef.current, event.relatedTarget) && !interactions.get().isPopoverPinned) {\n interactions.clearHighlight();\n }\n };\n\n const onFilterSeries = (series: readonly AreaChartProps.Series<T>[]) => {\n stableSetVisibleSeries(series);\n };\n\n const onLegendHighlight = (series: null | AreaChartProps.Series<T>) => {\n interactions.highlightSeries(series);\n };\n\n const onPopoverDismiss = (outsideClick?: boolean) => {\n interactions.unpinPopover();\n\n // Return focus back to the application or plot (when no point is highlighted).\n if (!outsideClick) {\n // The delay is needed to bypass focus events caused by click or keypress needed to unpin the popover.\n setTimeout(() => {\n if (interactions.get().highlightedPoint || interactions.get().highlightedX) {\n plotRef.current!.focusApplication();\n } else {\n interactions.clearHighlight();\n plotRef.current!.focusPlot();\n }\n }, 0);\n }\n };\n\n const onContainerBlur = () => {\n interactions.clearState();\n };\n\n const onDocumentKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n interactions.clearHighlight();\n interactions.clearHighlightedLegend();\n }\n };\n\n const onPopoverLeave = (event: MouseEvent) => {\n if (nodeContains(plotRef.current!.svg, event.relatedTarget as Element) || interactions.get().isPopoverPinned) {\n return;\n }\n interactions.clearHighlight();\n interactions.clearHighlightedLegend();\n };\n return {\n width,\n height,\n series,\n allSeries,\n getInternalSeries,\n computed,\n interactions,\n handlers: {\n onSVGMouseMove,\n onSVGMouseOut,\n onSVGMouseDown,\n onSVGKeyDown,\n onApplicationFocus,\n onApplicationBlur,\n onFilterSeries,\n onLegendHighlight,\n onPopoverDismiss,\n onContainerBlur,\n onDocumentKeyDown,\n onPopoverLeave,\n },\n refs: {\n plot: plotRef,\n plotMeasure: plotMeasureRef,\n container: containerRef,\n verticalMarker: verticalMarkerRef,\n popoverRef,\n },\n };\n }, [allSeries, series, xDomain, yDomain, xScaleType, yScaleType, height, width, stableSetVisibleSeries, popoverRef]);\n\n // Notify client when series highlight change.\n useReaction(model.interactions, state => state.highlightedSeries, setHighlightedSeries);\n\n // Update interactions store when series highlight in a controlled way.\n useEffect(() => {\n if (highlightedSeries !== model.interactions.get().highlightedSeries) {\n model.interactions.highlightSeries(highlightedSeries);\n }\n }, [model, highlightedSeries]);\n\n return model;\n}\n"]}
@@ -1,35 +1,35 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_14iqq_1c5es_103",
5
- "fit-height": "awsui_fit-height_14iqq_1c5es_139",
6
- "with-side-media": "awsui_with-side-media_14iqq_1c5es_144",
7
- "variant-default": "awsui_variant-default_14iqq_1c5es_147",
8
- "variant-stacked": "awsui_variant-stacked_14iqq_1c5es_147",
9
- "refresh": "awsui_refresh_14iqq_1c5es_155",
10
- "sticky-enabled": "awsui_sticky-enabled_14iqq_1c5es_205",
11
- "with-top-media": "awsui_with-top-media_14iqq_1c5es_217",
12
- "content-wrapper": "awsui_content-wrapper_14iqq_1c5es_222",
13
- "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_1c5es_227",
14
- "media": "awsui_media_14iqq_1c5es_232",
15
- "media-top": "awsui_media-top_14iqq_1c5es_250",
16
- "media-side": "awsui_media-side_14iqq_1c5es_255",
17
- "header": "awsui_header_14iqq_1c5es_261",
18
- "header-with-media": "awsui_header-with-media_14iqq_1c5es_266",
19
- "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_1c5es_272",
20
- "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_1c5es_276",
21
- "header-stuck": "awsui_header-stuck_14iqq_1c5es_282",
22
- "header-variant-cards": "awsui_header-variant-cards_14iqq_1c5es_292",
23
- "header-dynamic-height": "awsui_header-dynamic-height_14iqq_1c5es_295",
24
- "with-paddings": "awsui_with-paddings_14iqq_1c5es_301",
25
- "with-hidden-content": "awsui_with-hidden-content_14iqq_1c5es_310",
26
- "header-variant-full-page": "awsui_header-variant-full-page_14iqq_1c5es_368",
27
- "remove-high-contrast-header": "awsui_remove-high-contrast-header_14iqq_1c5es_388",
28
- "dark-header": "awsui_dark-header_14iqq_1c5es_397",
29
- "content": "awsui_content_14iqq_1c5es_222",
30
- "content-fit-height": "awsui_content-fit-height_14iqq_1c5es_405",
31
- "content-with-media": "awsui_content-with-media_14iqq_1c5es_415",
32
- "footer": "awsui_footer_14iqq_1c5es_419",
33
- "with-divider": "awsui_with-divider_14iqq_1c5es_423"
4
+ "root": "awsui_root_14iqq_v4tpg_103",
5
+ "fit-height": "awsui_fit-height_14iqq_v4tpg_139",
6
+ "with-side-media": "awsui_with-side-media_14iqq_v4tpg_144",
7
+ "variant-default": "awsui_variant-default_14iqq_v4tpg_147",
8
+ "variant-stacked": "awsui_variant-stacked_14iqq_v4tpg_147",
9
+ "refresh": "awsui_refresh_14iqq_v4tpg_155",
10
+ "sticky-enabled": "awsui_sticky-enabled_14iqq_v4tpg_205",
11
+ "with-top-media": "awsui_with-top-media_14iqq_v4tpg_217",
12
+ "content-wrapper": "awsui_content-wrapper_14iqq_v4tpg_222",
13
+ "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_v4tpg_227",
14
+ "media": "awsui_media_14iqq_v4tpg_234",
15
+ "media-top": "awsui_media-top_14iqq_v4tpg_252",
16
+ "media-side": "awsui_media-side_14iqq_v4tpg_257",
17
+ "header": "awsui_header_14iqq_v4tpg_263",
18
+ "header-with-media": "awsui_header-with-media_14iqq_v4tpg_268",
19
+ "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_v4tpg_274",
20
+ "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_v4tpg_278",
21
+ "header-stuck": "awsui_header-stuck_14iqq_v4tpg_284",
22
+ "header-variant-cards": "awsui_header-variant-cards_14iqq_v4tpg_294",
23
+ "header-dynamic-height": "awsui_header-dynamic-height_14iqq_v4tpg_297",
24
+ "with-paddings": "awsui_with-paddings_14iqq_v4tpg_303",
25
+ "with-hidden-content": "awsui_with-hidden-content_14iqq_v4tpg_312",
26
+ "header-variant-full-page": "awsui_header-variant-full-page_14iqq_v4tpg_370",
27
+ "remove-high-contrast-header": "awsui_remove-high-contrast-header_14iqq_v4tpg_390",
28
+ "dark-header": "awsui_dark-header_14iqq_v4tpg_399",
29
+ "content": "awsui_content_14iqq_v4tpg_222",
30
+ "content-fit-height": "awsui_content-fit-height_14iqq_v4tpg_407",
31
+ "content-with-media": "awsui_content-with-media_14iqq_v4tpg_417",
32
+ "footer": "awsui_footer_14iqq_v4tpg_421",
33
+ "with-divider": "awsui_with-divider_14iqq_v4tpg_425"
34
34
  };
35
35
 
@@ -100,7 +100,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
100
100
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
101
101
  SPDX-License-Identifier: Apache-2.0
102
102
  */
103
- .awsui_root_14iqq_1c5es_103:not(#\9) {
103
+ .awsui_root_14iqq_v4tpg_103:not(#\9) {
104
104
  border-collapse: separate;
105
105
  border-spacing: 0;
106
106
  box-sizing: border-box;
@@ -137,15 +137,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
137
137
  word-wrap: break-word;
138
138
  position: relative;
139
139
  }
140
- .awsui_root_14iqq_1c5es_103.awsui_fit-height_14iqq_1c5es_139:not(#\9) {
140
+ .awsui_root_14iqq_v4tpg_103.awsui_fit-height_14iqq_v4tpg_139:not(#\9) {
141
141
  display: flex;
142
142
  flex-direction: column;
143
143
  block-size: 100%;
144
144
  }
145
- .awsui_root_14iqq_1c5es_103.awsui_fit-height_14iqq_1c5es_139.awsui_with-side-media_14iqq_1c5es_144:not(#\9) {
145
+ .awsui_root_14iqq_v4tpg_103.awsui_fit-height_14iqq_v4tpg_139.awsui_with-side-media_14iqq_v4tpg_144:not(#\9) {
146
146
  flex-direction: row;
147
147
  }
148
- .awsui_root_14iqq_1c5es_103.awsui_variant-default_14iqq_1c5es_147:not(#\9), .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9) {
148
+ .awsui_root_14iqq_v4tpg_103.awsui_variant-default_14iqq_v4tpg_147:not(#\9), .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9) {
149
149
  background-color: var(--color-background-container-content-4un1ap, #ffffff);
150
150
  border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
151
151
  border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
@@ -153,11 +153,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
153
153
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
154
154
  box-sizing: border-box;
155
155
  }
156
- .awsui_root_14iqq_1c5es_103.awsui_variant-default_14iqq_1c5es_147.awsui_refresh_14iqq_1c5es_155:not(#\9), .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147.awsui_refresh_14iqq_1c5es_155:not(#\9) {
156
+ .awsui_root_14iqq_v4tpg_103.awsui_variant-default_14iqq_v4tpg_147.awsui_refresh_14iqq_v4tpg_155:not(#\9), .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147.awsui_refresh_14iqq_v4tpg_155:not(#\9) {
157
157
  border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
158
158
  border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
159
159
  }
160
- .awsui_root_14iqq_1c5es_103.awsui_variant-default_14iqq_1c5es_147:not(#\9):not(.awsui_refresh_14iqq_1c5es_155)::before, .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9):not(.awsui_refresh_14iqq_1c5es_155)::before {
160
+ .awsui_root_14iqq_v4tpg_103.awsui_variant-default_14iqq_v4tpg_147:not(#\9):not(.awsui_refresh_14iqq_v4tpg_155)::before, .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9):not(.awsui_refresh_14iqq_v4tpg_155)::before {
161
161
  content: "";
162
162
  position: absolute;
163
163
  inset-inline-start: 0px;
@@ -175,7 +175,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
175
175
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
176
176
  z-index: 1;
177
177
  }
178
- .awsui_root_14iqq_1c5es_103.awsui_variant-default_14iqq_1c5es_147:not(#\9):not(.awsui_refresh_14iqq_1c5es_155)::after, .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9):not(.awsui_refresh_14iqq_1c5es_155)::after {
178
+ .awsui_root_14iqq_v4tpg_103.awsui_variant-default_14iqq_v4tpg_147:not(#\9):not(.awsui_refresh_14iqq_v4tpg_155)::after, .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9):not(.awsui_refresh_14iqq_v4tpg_155)::after {
179
179
  content: "";
180
180
  position: absolute;
181
181
  inset-inline-start: 0px;
@@ -191,139 +191,141 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
191
191
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
192
192
  box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
193
193
  }
194
- .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9):not(:last-child), .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9):not(:last-child)::before, .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9):not(:last-child)::after {
194
+ .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9):not(:last-child), .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9):not(:last-child)::before, .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9):not(:last-child)::after {
195
195
  border-end-end-radius: 0;
196
196
  border-end-start-radius: 0;
197
197
  border-block-end-width: 0;
198
198
  }
199
- .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147 + .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9), .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147 + .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9)::before, .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147 + .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9)::after {
199
+ .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147 + .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9), .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147 + .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9)::before, .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147 + .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9)::after {
200
200
  border-start-start-radius: 0;
201
201
  border-start-end-radius: 0;
202
202
  }
203
- .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147 + .awsui_root_14iqq_1c5es_103.awsui_variant-stacked_14iqq_1c5es_147:not(#\9):not(.awsui_refresh_14iqq_1c5es_155)::before {
203
+ .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147 + .awsui_root_14iqq_v4tpg_103.awsui_variant-stacked_14iqq_v4tpg_147:not(#\9):not(.awsui_refresh_14iqq_v4tpg_155)::before {
204
204
  border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
205
205
  }
206
- .awsui_root_14iqq_1c5es_103.awsui_sticky-enabled_14iqq_1c5es_205:not(#\9):not(.awsui_refresh_14iqq_1c5es_155)::before {
206
+ .awsui_root_14iqq_v4tpg_103.awsui_sticky-enabled_14iqq_v4tpg_205:not(#\9):not(.awsui_refresh_14iqq_v4tpg_155)::before {
207
207
  inset-block-start: calc(-1 * var(--border-container-top-width-uugwwl, 0px));
208
208
  }
209
- .awsui_root_14iqq_1c5es_103.awsui_sticky-enabled_14iqq_1c5es_205:not(#\9):not(.awsui_refresh_14iqq_1c5es_155).awsui_variant-stacked_14iqq_1c5es_147::before {
209
+ .awsui_root_14iqq_v4tpg_103.awsui_sticky-enabled_14iqq_v4tpg_205:not(#\9):not(.awsui_refresh_14iqq_v4tpg_155).awsui_variant-stacked_14iqq_v4tpg_147::before {
210
210
  inset-block-start: calc(-1 * var(--border-divider-section-width-1061zr, 1px));
211
211
  }
212
212
 
213
- .awsui_with-side-media_14iqq_1c5es_144:not(#\9) {
213
+ .awsui_with-side-media_14iqq_v4tpg_144:not(#\9) {
214
214
  display: flex;
215
215
  flex-direction: row;
216
216
  }
217
217
 
218
- .awsui_with-top-media_14iqq_1c5es_217:not(#\9) {
218
+ .awsui_with-top-media_14iqq_v4tpg_217:not(#\9) {
219
219
  display: flex;
220
220
  flex-direction: column;
221
221
  }
222
222
 
223
- .awsui_content-wrapper_14iqq_1c5es_222:not(#\9) {
223
+ .awsui_content-wrapper_14iqq_v4tpg_222:not(#\9) {
224
224
  display: flex;
225
225
  flex-direction: column;
226
226
  inline-size: 100%;
227
227
  }
228
- .awsui_content-wrapper-fit-height_14iqq_1c5es_227:not(#\9) {
228
+ .awsui_content-wrapper-fit-height_14iqq_v4tpg_227:not(#\9) {
229
229
  block-size: 100%;
230
230
  overflow: hidden;
231
+ border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
232
+ border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
231
233
  }
232
234
 
233
- .awsui_media_14iqq_1c5es_232:not(#\9) {
235
+ .awsui_media_14iqq_v4tpg_234:not(#\9) {
234
236
  overflow: hidden;
235
237
  flex-shrink: 0;
236
238
  }
237
- .awsui_media_14iqq_1c5es_232 img:not(#\9),
238
- .awsui_media_14iqq_1c5es_232 video:not(#\9),
239
- .awsui_media_14iqq_1c5es_232 picture:not(#\9) {
239
+ .awsui_media_14iqq_v4tpg_234 img:not(#\9),
240
+ .awsui_media_14iqq_v4tpg_234 video:not(#\9),
241
+ .awsui_media_14iqq_v4tpg_234 picture:not(#\9) {
240
242
  inline-size: 100%;
241
243
  block-size: 100%;
242
244
  object-fit: cover;
243
245
  object-position: center;
244
246
  }
245
- .awsui_media_14iqq_1c5es_232 iframe:not(#\9) {
247
+ .awsui_media_14iqq_v4tpg_234 iframe:not(#\9) {
246
248
  inline-size: 100%;
247
249
  block-size: 100%;
248
250
  border-block: 0;
249
251
  border-inline: 0;
250
252
  }
251
- .awsui_media-top_14iqq_1c5es_250:not(#\9) {
253
+ .awsui_media-top_14iqq_v4tpg_252:not(#\9) {
252
254
  max-block-size: 66%;
253
255
  border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
254
256
  border-start-end-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
255
257
  }
256
- .awsui_media-side_14iqq_1c5es_255:not(#\9) {
258
+ .awsui_media-side_14iqq_v4tpg_257:not(#\9) {
257
259
  max-inline-size: 66%;
258
260
  border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
259
261
  border-end-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
260
262
  }
261
263
 
262
- .awsui_header_14iqq_1c5es_261:not(#\9) {
264
+ .awsui_header_14iqq_v4tpg_263:not(#\9) {
263
265
  background-color: var(--color-background-container-header-8b9fgi, #ffffff);
264
266
  border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
265
267
  border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
266
268
  }
267
- .awsui_header_14iqq_1c5es_261.awsui_header-with-media_14iqq_1c5es_266:not(#\9) {
269
+ .awsui_header_14iqq_v4tpg_263.awsui_header-with-media_14iqq_v4tpg_268:not(#\9) {
268
270
  background: none;
269
271
  }
270
- .awsui_header_14iqq_1c5es_261.awsui_header-with-media_14iqq_1c5es_266:not(#\9):not(:empty) {
272
+ .awsui_header_14iqq_v4tpg_263.awsui_header-with-media_14iqq_v4tpg_268:not(#\9):not(:empty) {
271
273
  border-block-end: none;
272
274
  }
273
- .awsui_header-sticky-disabled_14iqq_1c5es_272:not(#\9) {
275
+ .awsui_header-sticky-disabled_14iqq_v4tpg_274:not(#\9) {
274
276
  position: relative;
275
277
  z-index: 1;
276
278
  }
277
- .awsui_header-sticky-enabled_14iqq_1c5es_276:not(#\9) {
279
+ .awsui_header-sticky-enabled_14iqq_v4tpg_278:not(#\9) {
278
280
  inset-block-start: 0;
279
281
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
280
282
  position: sticky;
281
283
  z-index: 800;
282
284
  }
283
- .awsui_header-stuck_14iqq_1c5es_282:not(#\9) {
285
+ .awsui_header-stuck_14iqq_v4tpg_284:not(#\9) {
284
286
  border-start-start-radius: 0;
285
287
  border-start-end-radius: 0;
286
288
  border-end-start-radius: 0;
287
289
  border-end-end-radius: 0;
288
290
  }
289
- .awsui_header-stuck_14iqq_1c5es_282:not(#\9)::before {
291
+ .awsui_header-stuck_14iqq_v4tpg_284:not(#\9)::before {
290
292
  border-block: 0;
291
293
  border-inline: 0;
292
294
  }
293
- .awsui_header-stuck_14iqq_1c5es_282:not(#\9):not(.awsui_header-variant-cards_14iqq_1c5es_292) {
295
+ .awsui_header-stuck_14iqq_v4tpg_284:not(#\9):not(.awsui_header-variant-cards_14iqq_v4tpg_294) {
294
296
  box-shadow: var(--shadow-sticky-embedded-uvh5ry, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
295
297
  }
296
- .awsui_header-dynamic-height_14iqq_1c5es_295.awsui_header-stuck_14iqq_1c5es_282:not(#\9) {
298
+ .awsui_header-dynamic-height_14iqq_v4tpg_297.awsui_header-stuck_14iqq_v4tpg_284:not(#\9) {
297
299
  margin-block-end: calc(var(--line-height-heading-xl-avbttk, 30px) - var(--line-height-heading-l-mmm3my, 24px));
298
300
  }
299
- .awsui_header_14iqq_1c5es_261:not(#\9):not(:empty) {
301
+ .awsui_header_14iqq_v4tpg_263:not(#\9):not(:empty) {
300
302
  border-block-end: var(--border-container-sticky-width-6asz33, 0px) solid var(--color-border-container-divider-p2uygo, transparent);
301
303
  }
302
- .awsui_header_14iqq_1c5es_261.awsui_with-paddings_14iqq_1c5es_301:not(#\9) {
304
+ .awsui_header_14iqq_v4tpg_263.awsui_with-paddings_14iqq_v4tpg_303:not(#\9) {
303
305
  padding-block-start: var(--space-container-header-top-5qav00, 12px);
304
306
  padding-block-end: var(--space-container-header-bottom-vj01hn, 8px);
305
307
  padding-inline: var(--space-container-horizontal-wfukh3, 20px);
306
308
  }
307
- .awsui_header_14iqq_1c5es_261.awsui_with-paddings_14iqq_1c5es_301.awsui_header-variant-cards_14iqq_1c5es_292:not(#\9) {
309
+ .awsui_header_14iqq_v4tpg_263.awsui_with-paddings_14iqq_v4tpg_303.awsui_header-variant-cards_14iqq_v4tpg_294:not(#\9) {
308
310
  padding-block: var(--space-container-header-top-5qav00, 12px);
309
311
  padding-inline: var(--space-container-horizontal-wfukh3, 20px);
310
312
  }
311
- .awsui_header_14iqq_1c5es_261.awsui_with-hidden-content_14iqq_1c5es_310:not(#\9) {
313
+ .awsui_header_14iqq_v4tpg_263.awsui_with-hidden-content_14iqq_v4tpg_312:not(#\9) {
312
314
  border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
313
315
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
314
316
  }
315
- .awsui_header-variant-cards_14iqq_1c5es_292:not(#\9) {
317
+ .awsui_header-variant-cards_14iqq_v4tpg_294:not(#\9) {
316
318
  border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
317
319
  border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
318
320
  border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
319
321
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
320
322
  box-sizing: border-box;
321
323
  }
322
- .awsui_header-variant-cards_14iqq_1c5es_292.awsui_refresh_14iqq_1c5es_155:not(#\9) {
324
+ .awsui_header-variant-cards_14iqq_v4tpg_294.awsui_refresh_14iqq_v4tpg_155:not(#\9) {
323
325
  border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
324
326
  border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
325
327
  }
326
- .awsui_header-variant-cards_14iqq_1c5es_292:not(#\9):not(.awsui_refresh_14iqq_1c5es_155)::before {
328
+ .awsui_header-variant-cards_14iqq_v4tpg_294:not(#\9):not(.awsui_refresh_14iqq_v4tpg_155)::before {
327
329
  content: "";
328
330
  position: absolute;
329
331
  inset-inline-start: 0px;
@@ -341,7 +343,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
341
343
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
342
344
  z-index: 1;
343
345
  }
344
- .awsui_header-variant-cards_14iqq_1c5es_292:not(#\9):not(.awsui_refresh_14iqq_1c5es_155)::after {
346
+ .awsui_header-variant-cards_14iqq_v4tpg_294:not(#\9):not(.awsui_refresh_14iqq_v4tpg_155)::after {
345
347
  content: "";
346
348
  position: absolute;
347
349
  inset-inline-start: 0px;
@@ -357,19 +359,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
357
359
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
358
360
  box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
359
361
  }
360
- .awsui_header-variant-cards_14iqq_1c5es_292:not(#\9):not(.awsui_header-sticky-enabled_14iqq_1c5es_276) {
362
+ .awsui_header-variant-cards_14iqq_v4tpg_294:not(#\9):not(.awsui_header-sticky-enabled_14iqq_v4tpg_278) {
361
363
  position: relative;
362
364
  }
363
- .awsui_header-variant-cards_14iqq_1c5es_292.awsui_header-stuck_14iqq_1c5es_282:not(#\9)::after, .awsui_header-variant-cards_14iqq_1c5es_292.awsui_header-stuck_14iqq_1c5es_282:not(#\9)::before {
365
+ .awsui_header-variant-cards_14iqq_v4tpg_294.awsui_header-stuck_14iqq_v4tpg_284:not(#\9)::after, .awsui_header-variant-cards_14iqq_v4tpg_294.awsui_header-stuck_14iqq_v4tpg_284:not(#\9)::before {
364
366
  border-block: 0;
365
367
  border-inline: 0;
366
368
  border-start-start-radius: 0;
367
369
  border-start-end-radius: 0;
368
370
  }
369
- .awsui_header-variant-full-page_14iqq_1c5es_368.awsui_header-stuck_14iqq_1c5es_282:not(#\9) {
371
+ .awsui_header-variant-full-page_14iqq_v4tpg_370.awsui_header-stuck_14iqq_v4tpg_284:not(#\9) {
370
372
  box-shadow: none;
371
373
  }
372
- .awsui_header-variant-full-page_14iqq_1c5es_368.awsui_header-stuck_14iqq_1c5es_282:not(#\9)::before {
374
+ .awsui_header-variant-full-page_14iqq_v4tpg_370.awsui_header-stuck_14iqq_v4tpg_284:not(#\9)::before {
373
375
  content: "";
374
376
  position: absolute;
375
377
  pointer-events: none;
@@ -379,14 +381,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
379
381
  inset-block-start: 0;
380
382
  border-block-end: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
381
383
  }
382
- .awsui_header-variant-full-page_14iqq_1c5es_368.awsui_header-stuck_14iqq_1c5es_282:not(#\9)::after {
384
+ .awsui_header-variant-full-page_14iqq_v4tpg_370.awsui_header-stuck_14iqq_v4tpg_284:not(#\9)::after {
383
385
  content: "";
384
386
  position: absolute;
385
387
  inset: 0;
386
388
  box-shadow: var(--shadow-sticky-blixp9, 0px 4px 8px 1px rgba(0, 7, 22, 0.1));
387
389
  clip-path: polygon(-999% 100%, 999% 100%, 999% 999%, -999% 999%);
388
390
  }
389
- .awsui_header-variant-full-page_14iqq_1c5es_368.awsui_header-stuck_14iqq_1c5es_282:not(#\9):not(.awsui_remove-high-contrast-header_14iqq_1c5es_388)::before {
391
+ .awsui_header-variant-full-page_14iqq_v4tpg_370.awsui_header-stuck_14iqq_v4tpg_284:not(#\9):not(.awsui_remove-high-contrast-header_14iqq_v4tpg_390)::before {
390
392
  content: "";
391
393
  border-block-end: none;
392
394
  }
@@ -395,32 +397,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
395
397
  The dynamic height dark header needs a background that will cover
396
398
  the default white background of the container component.
397
399
  */
398
- .awsui_dark-header_14iqq_1c5es_397:not(#\9) {
400
+ .awsui_dark-header_14iqq_v4tpg_399:not(#\9) {
399
401
  background-color: var(--color-background-layout-main-nx09lr, #ffffff);
400
402
  color: var(--color-text-body-default-at06ol, #000716);
401
403
  }
402
404
 
403
- .awsui_content_14iqq_1c5es_222:not(#\9) {
405
+ .awsui_content_14iqq_v4tpg_222:not(#\9) {
404
406
  flex: 1;
405
407
  }
406
- .awsui_content-fit-height_14iqq_1c5es_405:not(#\9) {
408
+ .awsui_content-fit-height_14iqq_v4tpg_407:not(#\9) {
407
409
  overflow: auto;
408
410
  }
409
- .awsui_content_14iqq_1c5es_222.awsui_with-paddings_14iqq_1c5es_301:not(#\9) {
411
+ .awsui_content_14iqq_v4tpg_222.awsui_with-paddings_14iqq_v4tpg_303:not(#\9) {
410
412
  padding-block: var(--space-scaled-l-0hpmd7, 20px);
411
413
  padding-inline: var(--space-container-horizontal-wfukh3, 20px);
412
414
  }
413
- .awsui_header_14iqq_1c5es_261 + .awsui_content_14iqq_1c5es_222.awsui_with-paddings_14iqq_1c5es_301:not(#\9) {
415
+ .awsui_header_14iqq_v4tpg_263 + .awsui_content_14iqq_v4tpg_222.awsui_with-paddings_14iqq_v4tpg_303:not(#\9) {
414
416
  padding-block-start: var(--space-container-content-top-1ae0r3, 4px);
415
417
  }
416
- .awsui_header_14iqq_1c5es_261 + .awsui_content_14iqq_1c5es_222.awsui_with-paddings_14iqq_1c5es_301.awsui_content-with-media_14iqq_1c5es_415:not(#\9) {
418
+ .awsui_header_14iqq_v4tpg_263 + .awsui_content_14iqq_v4tpg_222.awsui_with-paddings_14iqq_v4tpg_303.awsui_content-with-media_14iqq_v4tpg_417:not(#\9) {
417
419
  padding-block-start: 0;
418
420
  }
419
421
 
420
- .awsui_footer_14iqq_1c5es_419.awsui_with-paddings_14iqq_1c5es_301:not(#\9) {
422
+ .awsui_footer_14iqq_v4tpg_421.awsui_with-paddings_14iqq_v4tpg_303:not(#\9) {
421
423
  padding-block: var(--space-scaled-s-aqzyko, 12px);
422
424
  padding-inline: var(--space-container-horizontal-wfukh3, 20px);
423
425
  }
424
- .awsui_footer_14iqq_1c5es_419.awsui_with-divider_14iqq_1c5es_423:not(#\9) {
426
+ .awsui_footer_14iqq_v4tpg_421.awsui_with-divider_14iqq_v4tpg_425:not(#\9) {
425
427
  border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
426
428
  }
@@ -2,35 +2,35 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_14iqq_1c5es_103",
6
- "fit-height": "awsui_fit-height_14iqq_1c5es_139",
7
- "with-side-media": "awsui_with-side-media_14iqq_1c5es_144",
8
- "variant-default": "awsui_variant-default_14iqq_1c5es_147",
9
- "variant-stacked": "awsui_variant-stacked_14iqq_1c5es_147",
10
- "refresh": "awsui_refresh_14iqq_1c5es_155",
11
- "sticky-enabled": "awsui_sticky-enabled_14iqq_1c5es_205",
12
- "with-top-media": "awsui_with-top-media_14iqq_1c5es_217",
13
- "content-wrapper": "awsui_content-wrapper_14iqq_1c5es_222",
14
- "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_1c5es_227",
15
- "media": "awsui_media_14iqq_1c5es_232",
16
- "media-top": "awsui_media-top_14iqq_1c5es_250",
17
- "media-side": "awsui_media-side_14iqq_1c5es_255",
18
- "header": "awsui_header_14iqq_1c5es_261",
19
- "header-with-media": "awsui_header-with-media_14iqq_1c5es_266",
20
- "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_1c5es_272",
21
- "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_1c5es_276",
22
- "header-stuck": "awsui_header-stuck_14iqq_1c5es_282",
23
- "header-variant-cards": "awsui_header-variant-cards_14iqq_1c5es_292",
24
- "header-dynamic-height": "awsui_header-dynamic-height_14iqq_1c5es_295",
25
- "with-paddings": "awsui_with-paddings_14iqq_1c5es_301",
26
- "with-hidden-content": "awsui_with-hidden-content_14iqq_1c5es_310",
27
- "header-variant-full-page": "awsui_header-variant-full-page_14iqq_1c5es_368",
28
- "remove-high-contrast-header": "awsui_remove-high-contrast-header_14iqq_1c5es_388",
29
- "dark-header": "awsui_dark-header_14iqq_1c5es_397",
30
- "content": "awsui_content_14iqq_1c5es_222",
31
- "content-fit-height": "awsui_content-fit-height_14iqq_1c5es_405",
32
- "content-with-media": "awsui_content-with-media_14iqq_1c5es_415",
33
- "footer": "awsui_footer_14iqq_1c5es_419",
34
- "with-divider": "awsui_with-divider_14iqq_1c5es_423"
5
+ "root": "awsui_root_14iqq_v4tpg_103",
6
+ "fit-height": "awsui_fit-height_14iqq_v4tpg_139",
7
+ "with-side-media": "awsui_with-side-media_14iqq_v4tpg_144",
8
+ "variant-default": "awsui_variant-default_14iqq_v4tpg_147",
9
+ "variant-stacked": "awsui_variant-stacked_14iqq_v4tpg_147",
10
+ "refresh": "awsui_refresh_14iqq_v4tpg_155",
11
+ "sticky-enabled": "awsui_sticky-enabled_14iqq_v4tpg_205",
12
+ "with-top-media": "awsui_with-top-media_14iqq_v4tpg_217",
13
+ "content-wrapper": "awsui_content-wrapper_14iqq_v4tpg_222",
14
+ "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_v4tpg_227",
15
+ "media": "awsui_media_14iqq_v4tpg_234",
16
+ "media-top": "awsui_media-top_14iqq_v4tpg_252",
17
+ "media-side": "awsui_media-side_14iqq_v4tpg_257",
18
+ "header": "awsui_header_14iqq_v4tpg_263",
19
+ "header-with-media": "awsui_header-with-media_14iqq_v4tpg_268",
20
+ "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_v4tpg_274",
21
+ "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_v4tpg_278",
22
+ "header-stuck": "awsui_header-stuck_14iqq_v4tpg_284",
23
+ "header-variant-cards": "awsui_header-variant-cards_14iqq_v4tpg_294",
24
+ "header-dynamic-height": "awsui_header-dynamic-height_14iqq_v4tpg_297",
25
+ "with-paddings": "awsui_with-paddings_14iqq_v4tpg_303",
26
+ "with-hidden-content": "awsui_with-hidden-content_14iqq_v4tpg_312",
27
+ "header-variant-full-page": "awsui_header-variant-full-page_14iqq_v4tpg_370",
28
+ "remove-high-contrast-header": "awsui_remove-high-contrast-header_14iqq_v4tpg_390",
29
+ "dark-header": "awsui_dark-header_14iqq_v4tpg_399",
30
+ "content": "awsui_content_14iqq_v4tpg_222",
31
+ "content-fit-height": "awsui_content-fit-height_14iqq_v4tpg_407",
32
+ "content-with-media": "awsui_content-with-media_14iqq_v4tpg_417",
33
+ "footer": "awsui_footer_14iqq_v4tpg_421",
34
+ "with-divider": "awsui_with-divider_14iqq_v4tpg_425"
35
35
  };
36
36
 
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (961ecb0d)";
2
+ export var PACKAGE_VERSION = "3.0.0 (acb14963)";
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 (961ecb0d)",
3
+ "PACKAGE_VERSION": "3.0.0 (acb14963)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { VirtualItem } from 'react-virtual';
2
+ import { VirtualItem } from '../../vendor/react-virtual';
3
3
  interface UseVirtualProps<Item> {
4
4
  items: readonly Item[];
5
5
  parentRef: React.RefObject<HTMLElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-virtual/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAmC,WAAW,EAAE,MAAM,eAAe,CAAC;AAI7E,UAAU,eAAe,CAAC,IAAI;IAC5B,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACvB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,MAAM,CAAC;CAC5B;AAED,UAAU,cAAc;IACtB,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,IAAI,SAAS,MAAM,EAAE,EAC9C,KAAK,EACL,SAAS,EACT,YAAY,GACb,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,cAAc,CAgCxC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-virtual/index.ts"],"names":[],"mappings":"AAEA,OAAO,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