@cloudscape-design/components 3.0.318 → 3.0.320
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/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +30 -30
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/drawer/interfaces.d.ts +0 -7
- package/app-layout/drawer/interfaces.d.ts.map +1 -1
- package/app-layout/drawer/interfaces.js.map +1 -1
- package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
- package/app-layout/drawer/resizable-drawer.js +3 -3
- package/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/runtime-api.d.ts.map +1 -1
- package/app-layout/runtime-api.js +5 -2
- package/app-layout/runtime-api.js.map +1 -1
- package/app-layout/styles.css.js +17 -13
- package/app-layout/styles.scoped.css +44 -13
- package/app-layout/styles.selectors.js +17 -13
- package/app-layout/utils/interfaces.d.ts +10 -0
- package/app-layout/utils/interfaces.d.ts.map +1 -0
- package/app-layout/utils/interfaces.js +2 -0
- package/app-layout/utils/interfaces.js.map +1 -0
- package/app-layout/utils/use-drawer-focus-control.d.ts.map +1 -1
- package/app-layout/utils/use-drawer-focus-control.js +8 -3
- package/app-layout/utils/use-drawer-focus-control.js.map +1 -1
- package/app-layout/utils/use-keyboard-events.d.ts +4 -0
- package/app-layout/utils/use-keyboard-events.d.ts.map +1 -0
- package/{split-panel → app-layout}/utils/use-keyboard-events.js +10 -11
- package/app-layout/utils/use-keyboard-events.js.map +1 -0
- package/app-layout/utils/use-pointer-events.d.ts +3 -0
- package/app-layout/utils/use-pointer-events.d.ts.map +1 -0
- package/{split-panel → app-layout}/utils/use-pointer-events.js +15 -8
- package/app-layout/utils/use-pointer-events.js.map +1 -0
- package/app-layout/utils/use-resize.d.ts +16 -0
- package/app-layout/utils/use-resize.d.ts.map +1 -0
- package/app-layout/utils/use-resize.js +84 -0
- package/app-layout/utils/use-resize.js.map +1 -0
- package/app-layout/visual-refresh/context.d.ts +11 -6
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +26 -7
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/drawers.d.ts +1 -33
- package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
- package/app-layout/visual-refresh/drawers.js +14 -7
- package/app-layout/visual-refresh/drawers.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +69 -68
- package/app-layout/visual-refresh/styles.scoped.css +294 -298
- package/app-layout/visual-refresh/styles.selectors.js +69 -68
- package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +1 -2
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/area-chart/{model/async-store.d.ts → async-store/index.d.ts} +1 -1
- package/area-chart/async-store/index.d.ts.map +1 -0
- package/area-chart/{model/async-store.js → async-store/index.js} +1 -1
- package/area-chart/async-store/index.js.map +1 -0
- package/area-chart/elements/area-chart-legend.d.ts.map +1 -1
- package/area-chart/elements/area-chart-legend.js +1 -1
- package/area-chart/elements/area-chart-legend.js.map +1 -1
- package/area-chart/elements/data-series.js +1 -1
- package/area-chart/elements/data-series.js.map +1 -1
- package/area-chart/elements/highlighted-point.js +1 -1
- package/area-chart/elements/highlighted-point.js.map +1 -1
- package/area-chart/elements/use-highlight-details.d.ts.map +1 -1
- package/area-chart/elements/use-highlight-details.js +3 -1
- package/area-chart/elements/use-highlight-details.js.map +1 -1
- package/area-chart/elements/vertical-marker.js +1 -1
- package/area-chart/elements/vertical-marker.js.map +1 -1
- package/area-chart/model/index.d.ts +1 -1
- package/area-chart/model/index.d.ts.map +1 -1
- package/area-chart/model/index.js.map +1 -1
- package/area-chart/model/interactions-store.d.ts +1 -1
- package/area-chart/model/interactions-store.d.ts.map +1 -1
- package/area-chart/model/interactions-store.js +1 -1
- package/area-chart/model/interactions-store.js.map +1 -1
- package/area-chart/model/use-chart-model.d.ts.map +1 -1
- package/area-chart/model/use-chart-model.js +1 -1
- package/area-chart/model/use-chart-model.js.map +1 -1
- package/attribute-editor/interfaces.d.ts +1 -1
- package/attribute-editor/interfaces.d.ts.map +1 -1
- package/attribute-editor/interfaces.js.map +1 -1
- package/content-layout/styles.css.js +7 -7
- package/content-layout/styles.scoped.css +13 -13
- package/content-layout/styles.selectors.js +7 -7
- package/expandable-section/expandable-section-container.js +2 -2
- package/expandable-section/expandable-section-container.js.map +1 -1
- package/expandable-section/interfaces.d.ts +3 -1
- package/expandable-section/interfaces.d.ts.map +1 -1
- package/expandable-section/interfaces.js.map +1 -1
- package/expandable-section/internal.d.ts.map +1 -1
- package/expandable-section/internal.js +4 -2
- package/expandable-section/internal.js.map +1 -1
- package/flashbar/styles.css.js +45 -45
- package/flashbar/styles.scoped.css +169 -169
- package/flashbar/styles.selectors.js +45 -45
- package/internal/environment.js +1 -1
- package/internal/generated/custom-css-properties/index.js +39 -39
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/plugins/drawers-controller.d.ts +5 -0
- package/internal/plugins/drawers-controller.d.ts.map +1 -1
- package/internal/plugins/drawers-controller.js.map +1 -1
- package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/data-series.js +8 -2
- package/mixed-line-bar-chart/data-series.js.map +1 -1
- package/package.json +1 -1
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +3 -3
- package/split-panel/index.js.map +1 -1
- package/split-panel/interfaces.d.ts +0 -7
- package/split-panel/interfaces.d.ts.map +1 -1
- package/split-panel/interfaces.js.map +1 -1
- package/split-panel/styles.css.js +56 -59
- package/split-panel/styles.scoped.css +77 -93
- package/split-panel/styles.selectors.js +56 -59
- package/table/body-cell/td-element.d.ts +1 -1
- package/table/body-cell/td-element.d.ts.map +1 -1
- package/table/body-cell/td-element.js +1 -1
- package/table/body-cell/td-element.js.map +1 -1
- package/table/header-cell/index.d.ts +1 -1
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +1 -1
- package/table/header-cell/index.js.map +1 -1
- package/table/internal.js +2 -2
- package/table/internal.js.map +1 -1
- package/table/sticky-columns/index.d.ts +2 -0
- package/table/sticky-columns/index.d.ts.map +1 -0
- package/table/sticky-columns/index.js +4 -0
- package/table/sticky-columns/index.js.map +1 -0
- package/table/{use-sticky-columns.d.ts → sticky-columns/use-sticky-columns.d.ts} +1 -1
- package/table/sticky-columns/use-sticky-columns.d.ts.map +1 -0
- package/table/{use-sticky-columns.js → sticky-columns/use-sticky-columns.js} +3 -3
- package/table/sticky-columns/use-sticky-columns.js.map +1 -0
- package/table/sticky-scrollbar/index.d.ts +2 -0
- package/table/sticky-scrollbar/index.d.ts.map +1 -0
- package/table/sticky-scrollbar/index.js +4 -0
- package/table/sticky-scrollbar/index.js.map +1 -0
- package/table/sticky-scrollbar/sticky-scrollbar.d.ts.map +1 -0
- package/table/{sticky-scrollbar.js → sticky-scrollbar/sticky-scrollbar.js} +2 -2
- package/table/sticky-scrollbar/sticky-scrollbar.js.map +1 -0
- package/table/sticky-scrollbar/styles.css.js +9 -0
- package/table/sticky-scrollbar/styles.scoped.css +22 -0
- package/table/sticky-scrollbar/styles.selectors.js +10 -0
- package/table/sticky-scrollbar/use-sticky-scrollbar.d.ts.map +1 -0
- package/table/{use-sticky-scrollbar.js → sticky-scrollbar/use-sticky-scrollbar.js} +3 -3
- package/table/sticky-scrollbar/use-sticky-scrollbar.js.map +1 -0
- package/table/styles.css.js +32 -36
- package/table/styles.scoped.css +40 -59
- package/table/styles.selectors.js +32 -36
- package/table/thead.d.ts +1 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +1 -1
- package/table/thead.js.map +1 -1
- package/table/utils.d.ts +1 -1
- package/table/utils.d.ts.map +1 -1
- package/table/utils.js.map +1 -1
- package/wizard/styles.css.js +31 -31
- package/wizard/styles.scoped.css +63 -63
- package/wizard/styles.selectors.js +31 -31
- package/area-chart/model/async-store.d.ts.map +0 -1
- package/area-chart/model/async-store.js.map +0 -1
- package/split-panel/utils/use-keyboard-events.d.ts +0 -4
- package/split-panel/utils/use-keyboard-events.d.ts.map +0 -1
- package/split-panel/utils/use-keyboard-events.js.map +0 -1
- package/split-panel/utils/use-pointer-events.d.ts +0 -3
- package/split-panel/utils/use-pointer-events.d.ts.map +0 -1
- package/split-panel/utils/use-pointer-events.js.map +0 -1
- package/table/sticky-scrollbar.d.ts.map +0 -1
- package/table/sticky-scrollbar.js.map +0 -1
- package/table/use-sticky-columns.d.ts.map +0 -1
- package/table/use-sticky-columns.js.map +0 -1
- package/table/use-sticky-scrollbar.d.ts.map +0 -1
- package/table/use-sticky-scrollbar.js.map +0 -1
- /package/table/{sticky-scrollbar.d.ts → sticky-scrollbar/sticky-scrollbar.d.ts} +0 -0
- /package/table/{use-sticky-scrollbar.d.ts → sticky-scrollbar/use-sticky-scrollbar.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-chart-model.js","sourceRoot":"lib/default/","sources":["area-chart/model/use-chart-model.ts"],"names":[],"mappings":"AAGA,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAyB,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,qBAAqB,MAAM,2BAA2B,CAAC;AAC9D,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA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ACf;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,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 { findClosest, circleIndex } from './utils';\n\nimport { nodeContains } from '../../internal/utils/dom';\nimport { KeyCode } from '../../internal/keycode';\nimport { XDomain, XScaleType, YDomain, YScaleType } from '../../internal/components/cartesian-chart/interfaces';\nimport { useReaction } from './async-store';\nimport computeChartProps from './compute-chart-props';\nimport createSeriesDecorator from './create-series-decorator';\nimport InteractionsStore from './interactions-store';\nimport { useStableEventHandler } from '../../internal/hooks/use-stable-event-handler';\nimport { ChartModel } from './index';\nimport { ChartPlotRef } from '../../internal/components/chart-plot';\nimport { throttle } from '../../internal/utils/throttle';\n\nconst MAX_HOVER_MARGIN = 6;\nconst SVG_HOVER_THROTTLE = 25;\nconst POPOVER_DEADZONE = 12;\n\nexport interface UseChartModelProps<T extends AreaChartProps.DataTypes> {\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 externalSeries: allSeries,\n visibleSeries: series,\n setVisibleSeries,\n highlightedSeries,\n setHighlightedSeries,\n xDomain,\n yDomain,\n xScaleType,\n yScaleType,\n height,\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 stableSetVisibleSeries = useStableEventHandler(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 svg focus to highlight series.\n const onSVGFocus = (_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 svg blur to clear all highlights unless the popover is pinned.\n const onSVGBlur = () => {\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 (!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 onSVGFocus,\n onSVGBlur,\n onFilterSeries,\n onLegendHighlight,\n onPopoverDismiss,\n onContainerBlur,\n onDocumentKeyDown,\n onPopoverLeave,\n },\n refs: {\n plot: plotRef,\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":"lib/default/","sources":["area-chart/model/use-chart-model.ts"],"names":[],"mappings":"AAGA,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K,CAAC,aAAqB,CAAC,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE;gBACpG,OAAO;aACR;YACD,YAAY,CAAC,cAAc,EAAE,CAAC;YAC9B,YAAY,CAAC,sBAAsB,EAAE,CAAC;QACxC,CAAC,CAAC;QACF,OAAO;YACL,KAAK;YACL,MAAM;YACN,MAAM;YACN,SAAS;YACT,iBAAiB;YACjB,QAAQ;YACR,YAAY;YACZ,QAAQ,EAAE;gBACR,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,YAAY;gBACZ,UAAU;gBACV,SAAS;gBACT,cAAc;gBACd,iBAAiB;gBACjB,gBAAgB;gBAChB,eAAe;gBACf,iBAAiB;gBACjB,cAAc;aACf;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,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 { findClosest, circleIndex } from './utils';\n\nimport { nodeContains } from '../../internal/utils/dom';\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 { useStableEventHandler } from '../../internal/hooks/use-stable-event-handler';\nimport { ChartModel } from './index';\nimport { ChartPlotRef } from '../../internal/components/chart-plot';\nimport { throttle } from '../../internal/utils/throttle';\nimport { useReaction } from '../async-store';\n\nconst MAX_HOVER_MARGIN = 6;\nconst SVG_HOVER_THROTTLE = 25;\nconst POPOVER_DEADZONE = 12;\n\nexport interface UseChartModelProps<T extends AreaChartProps.DataTypes> {\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 externalSeries: allSeries,\n visibleSeries: series,\n setVisibleSeries,\n highlightedSeries,\n setHighlightedSeries,\n xDomain,\n yDomain,\n xScaleType,\n yScaleType,\n height,\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 stableSetVisibleSeries = useStableEventHandler(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 svg focus to highlight series.\n const onSVGFocus = (_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 svg blur to clear all highlights unless the popover is pinned.\n const onSVGBlur = () => {\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 (!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 onSVGFocus,\n onSVGBlur,\n onFilterSeries,\n onLegendHighlight,\n onPopoverDismiss,\n onContainerBlur,\n onDocumentKeyDown,\n onPopoverLeave,\n },\n refs: {\n plot: plotRef,\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"]}
|
|
@@ -52,6 +52,7 @@ export interface AttributeEditorProps<T> extends BaseComponentProps {
|
|
|
52
52
|
addButtonText: string;
|
|
53
53
|
/**
|
|
54
54
|
* Specifies the text that's displayed in the remove button.
|
|
55
|
+
* @i18n
|
|
55
56
|
*/
|
|
56
57
|
removeButtonText?: string;
|
|
57
58
|
/**
|
|
@@ -92,7 +93,6 @@ export interface AttributeEditorProps<T> extends BaseComponentProps {
|
|
|
92
93
|
onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;
|
|
93
94
|
/**
|
|
94
95
|
* An object containing all the necessary localized strings required by the component.
|
|
95
|
-
* @i18n
|
|
96
96
|
*/
|
|
97
97
|
i18nStrings?: AttributeEditorProps.I18nStrings<T>;
|
|
98
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["attribute-editor/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAY/D,MAAM,WAAW,6BAA6B;IAC5C,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG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AAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3C;;WAEG;QACH,cAAc,IAAI,IAAI,CAAC;KACxB;IAED,UAAiB,WAAW,CAAC,CAAC,GAAG,GAAG;QAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;KAC7C;CACF;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IACjE;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAEzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IAElE;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;;;;;OAUG;IACH,UAAU,EAAE,aAAa,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE;;OAEG;IACH,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAE7C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;IAE9F;;OAEG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["attribute-editor/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface AttributeEditorForwardRefType {\n <T>(props: AttributeEditorProps<T> & { ref?: React.Ref<AttributeEditorProps.Ref> }): JSX.Element;\n}\n\nexport namespace AttributeEditorProps {\n export interface IsItemRemovableFunction<T> {\n (item: T): boolean;\n }\n\n export type FieldRenderable<T> = (item: T, itemIndex: number) => React.ReactNode;\n export interface FieldDefinition<T> {\n label?: React.ReactNode;\n info?: React.ReactNode;\n control?: FieldRenderable<T> | React.ReactNode;\n errorText?: FieldRenderable<T> | React.ReactNode;\n constraintText?: FieldRenderable<T> | React.ReactNode;\n }\n\n export interface RemoveButtonClickDetail {\n itemIndex: number;\n }\n\n export interface Ref {\n /**\n * Focuses the 'remove' button for the given row index.\n */\n focusRemoveButton(itemIndex: number): void;\n /**\n * Focuses the 'add' button. Use this, for example, after a user removes the last row.\n */\n focusAddButton(): void;\n }\n\n export interface I18nStrings<T = any> {\n errorIconAriaLabel?: string;\n itemRemovedAriaLive?: string;\n removeButtonAriaLabel?: (item: T) => string;\n }\n}\n\nexport interface AttributeEditorProps<T> extends BaseComponentProps {\n /**\n * Displayed when there are no items to display.\n */\n empty?: React.ReactNode;\n\n /**\n * Displayed below the add button. Use it for additional information related to the attribute editor.\n */\n additionalInfo?: React.ReactNode;\n\n /**\n * Specifies the text that's displayed in the add button.\n */\n addButtonText: string;\n\n /**\n * Specifies the text that's displayed in the remove button.\n */\n removeButtonText?: string;\n\n /**\n * Specifies the items that serve as the data source for all rows.\n * The display of a row is handled by the `definition` property.\n */\n items?: ReadonlyArray<T>;\n\n /**\n * Function that determines whether an item is removable. When this function returns `false`, the remove\n * button is not rendered and the user can't remove the item.\n * By default, all items are removable.\n */\n isItemRemovable?: AttributeEditorProps.IsItemRemovableFunction<T>;\n\n /**\n * Determines whether the add button is disabled.\n */\n disableAddButton?: boolean;\n\n /**\n * Defines the editor configuration. Each object in the array represents one form field in the row.\n * * `label` (ReactNode) - Text label for the form field.\n * * `info` (ReactNode) - Info link for the form field.\n * * `errorText` ((item, itemIndex) => ReactNode) - Error message text to display as a control validation message.\n * It renders the form field as invalid if the returned value is not `null` or `undefined`.\n * * `constraintText` ((item, itemIndex) => ReactNode) - Text to display as a constraint message below the field.\n * * `control` ((item, itemIndex) => ReactNode) - A control to use as the input for the field.\n *\n * A maximum of four fields are supported.\n */\n definition: ReadonlyArray<AttributeEditorProps.FieldDefinition<T>>;\n\n /**\n * Called when add button is clicked.\n */\n onAddButtonClick?: NonCancelableEventHandler;\n\n /**\n * Called when remove button is clicked.\n * The event `detail` contains the index of the corresponding item.\n */\n onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["attribute-editor/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface AttributeEditorForwardRefType {\n <T>(props: AttributeEditorProps<T> & { ref?: React.Ref<AttributeEditorProps.Ref> }): JSX.Element;\n}\n\nexport namespace AttributeEditorProps {\n export interface IsItemRemovableFunction<T> {\n (item: T): boolean;\n }\n\n export type FieldRenderable<T> = (item: T, itemIndex: number) => React.ReactNode;\n export interface FieldDefinition<T> {\n label?: React.ReactNode;\n info?: React.ReactNode;\n control?: FieldRenderable<T> | React.ReactNode;\n errorText?: FieldRenderable<T> | React.ReactNode;\n constraintText?: FieldRenderable<T> | React.ReactNode;\n }\n\n export interface RemoveButtonClickDetail {\n itemIndex: number;\n }\n\n export interface Ref {\n /**\n * Focuses the 'remove' button for the given row index.\n */\n focusRemoveButton(itemIndex: number): void;\n /**\n * Focuses the 'add' button. Use this, for example, after a user removes the last row.\n */\n focusAddButton(): void;\n }\n\n export interface I18nStrings<T = any> {\n errorIconAriaLabel?: string;\n itemRemovedAriaLive?: string;\n removeButtonAriaLabel?: (item: T) => string;\n }\n}\n\nexport interface AttributeEditorProps<T> extends BaseComponentProps {\n /**\n * Displayed when there are no items to display.\n */\n empty?: React.ReactNode;\n\n /**\n * Displayed below the add button. Use it for additional information related to the attribute editor.\n */\n additionalInfo?: React.ReactNode;\n\n /**\n * Specifies the text that's displayed in the add button.\n */\n addButtonText: string;\n\n /**\n * Specifies the text that's displayed in the remove button.\n * @i18n\n */\n removeButtonText?: string;\n\n /**\n * Specifies the items that serve as the data source for all rows.\n * The display of a row is handled by the `definition` property.\n */\n items?: ReadonlyArray<T>;\n\n /**\n * Function that determines whether an item is removable. When this function returns `false`, the remove\n * button is not rendered and the user can't remove the item.\n * By default, all items are removable.\n */\n isItemRemovable?: AttributeEditorProps.IsItemRemovableFunction<T>;\n\n /**\n * Determines whether the add button is disabled.\n */\n disableAddButton?: boolean;\n\n /**\n * Defines the editor configuration. Each object in the array represents one form field in the row.\n * * `label` (ReactNode) - Text label for the form field.\n * * `info` (ReactNode) - Info link for the form field.\n * * `errorText` ((item, itemIndex) => ReactNode) - Error message text to display as a control validation message.\n * It renders the form field as invalid if the returned value is not `null` or `undefined`.\n * * `constraintText` ((item, itemIndex) => ReactNode) - Text to display as a constraint message below the field.\n * * `control` ((item, itemIndex) => ReactNode) - A control to use as the input for the field.\n *\n * A maximum of four fields are supported.\n */\n definition: ReadonlyArray<AttributeEditorProps.FieldDefinition<T>>;\n\n /**\n * Called when add button is clicked.\n */\n onAddButtonClick?: NonCancelableEventHandler;\n\n /**\n * Called when remove button is clicked.\n * The event `detail` contains the index of the corresponding item.\n */\n onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n */\n i18nStrings?: AttributeEditorProps.I18nStrings<T>;\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"layout": "
|
|
5
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
6
|
-
"background": "
|
|
7
|
-
"header": "
|
|
8
|
-
"is-overlap-disabled": "awsui_is-overlap-
|
|
9
|
-
"content": "
|
|
10
|
-
"has-header": "awsui_has-
|
|
4
|
+
"layout": "awsui_layout_5gtk3_2fxok_99",
|
|
5
|
+
"is-visual-refresh": "awsui_is-visual-refresh_5gtk3_2fxok_99",
|
|
6
|
+
"background": "awsui_background_5gtk3_2fxok_102",
|
|
7
|
+
"header": "awsui_header_5gtk3_2fxok_105",
|
|
8
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_2fxok_121",
|
|
9
|
+
"content": "awsui_content_5gtk3_2fxok_129",
|
|
10
|
+
"has-header": "awsui_has-header_5gtk3_2fxok_133"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -96,48 +96,48 @@ visual refresh mode. The padding is still added to the header
|
|
|
96
96
|
in this scenario because otherwise the header and child
|
|
97
97
|
nodes will directly touch with no gap between them.
|
|
98
98
|
*/
|
|
99
|
-
.
|
|
99
|
+
.awsui_layout_5gtk3_2fxok_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_2fxok_99) {
|
|
100
100
|
display: contents;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
.awsui_layout_5gtk3_2fxok_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_2fxok_99) > .awsui_background_5gtk3_2fxok_102 {
|
|
103
103
|
display: none;
|
|
104
104
|
}
|
|
105
|
-
.
|
|
105
|
+
.awsui_layout_5gtk3_2fxok_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_2fxok_99) > .awsui_header_5gtk3_2fxok_105 {
|
|
106
106
|
padding-bottom: var(--space-content-header-padding-bottom-2cx87f, 24px);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.
|
|
109
|
+
.awsui_layout_5gtk3_2fxok_99.awsui_is-visual-refresh_5gtk3_2fxok_99:not(#\9) {
|
|
110
110
|
display: grid;
|
|
111
111
|
grid-template-columns: minmax(0, 1fr);
|
|
112
112
|
grid-template-rows: auto var(--space-dark-header-overlap-distance-l9lxfl, 36px) 1fr;
|
|
113
113
|
min-height: 100%;
|
|
114
114
|
}
|
|
115
|
-
.
|
|
115
|
+
.awsui_layout_5gtk3_2fxok_99.awsui_is-visual-refresh_5gtk3_2fxok_99 > .awsui_background_5gtk3_2fxok_102:not(#\9) {
|
|
116
116
|
background-color: var(--color-background-layout-main-m49752, #ffffff);
|
|
117
117
|
grid-column: 1;
|
|
118
118
|
grid-row: 1/3;
|
|
119
119
|
color: var(--color-text-body-default-mmvcvg, #000716);
|
|
120
120
|
}
|
|
121
|
-
.
|
|
121
|
+
.awsui_layout_5gtk3_2fxok_99.awsui_is-visual-refresh_5gtk3_2fxok_99 > .awsui_background_5gtk3_2fxok_102.awsui_is-overlap-disabled_5gtk3_2fxok_121:not(#\9) {
|
|
122
122
|
grid-row: 1/2;
|
|
123
123
|
}
|
|
124
|
-
.
|
|
124
|
+
.awsui_layout_5gtk3_2fxok_99.awsui_is-visual-refresh_5gtk3_2fxok_99 > .awsui_header_5gtk3_2fxok_105:not(#\9) {
|
|
125
125
|
grid-column: 1;
|
|
126
126
|
grid-row: 1;
|
|
127
127
|
padding-bottom: var(--space-content-header-padding-bottom-2cx87f, 24px);
|
|
128
128
|
}
|
|
129
|
-
.
|
|
129
|
+
.awsui_layout_5gtk3_2fxok_99.awsui_is-visual-refresh_5gtk3_2fxok_99 > .awsui_content_5gtk3_2fxok_129:not(#\9) {
|
|
130
130
|
grid-column: 1;
|
|
131
131
|
grid-row: 2/4;
|
|
132
132
|
}
|
|
133
|
-
.
|
|
133
|
+
.awsui_layout_5gtk3_2fxok_99.awsui_is-visual-refresh_5gtk3_2fxok_99:not(#\9):not(.awsui_has-header_5gtk3_2fxok_133) {
|
|
134
134
|
grid-template-rows: auto calc(
|
|
135
|
-
var(--space-dark-header-overlap-distance-l9lxfl, 36px) + var(--awsui-container-first-overlap-extension-
|
|
135
|
+
var(--space-dark-header-overlap-distance-l9lxfl, 36px) + var(--awsui-container-first-overlap-extension-zw2xxa, 0px) + var(--awsui-container-first-gap-zw2xxa, 0px)
|
|
136
136
|
) 1fr;
|
|
137
137
|
}
|
|
138
|
-
.
|
|
139
|
-
padding-top: var(--awsui-container-first-gap-
|
|
138
|
+
.awsui_layout_5gtk3_2fxok_99.awsui_is-visual-refresh_5gtk3_2fxok_99:not(#\9):not(.awsui_has-header_5gtk3_2fxok_133) > .awsui_content_5gtk3_2fxok_129 {
|
|
139
|
+
padding-top: var(--awsui-container-first-gap-zw2xxa, 0px);
|
|
140
140
|
}
|
|
141
|
-
.
|
|
141
|
+
.awsui_layout_5gtk3_2fxok_99.awsui_is-visual-refresh_5gtk3_2fxok_99.awsui_is-overlap-disabled_5gtk3_2fxok_121:not(#\9) {
|
|
142
142
|
grid-template-rows: auto 0 1fr;
|
|
143
143
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"layout": "
|
|
6
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
7
|
-
"background": "
|
|
8
|
-
"header": "
|
|
9
|
-
"is-overlap-disabled": "awsui_is-overlap-
|
|
10
|
-
"content": "
|
|
11
|
-
"has-header": "awsui_has-
|
|
5
|
+
"layout": "awsui_layout_5gtk3_2fxok_99",
|
|
6
|
+
"is-visual-refresh": "awsui_is-visual-refresh_5gtk3_2fxok_99",
|
|
7
|
+
"background": "awsui_background_5gtk3_2fxok_102",
|
|
8
|
+
"header": "awsui_header_5gtk3_2fxok_105",
|
|
9
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_2fxok_121",
|
|
10
|
+
"content": "awsui_content_5gtk3_2fxok_129",
|
|
11
|
+
"has-header": "awsui_has-header_5gtk3_2fxok_133"
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -5,8 +5,8 @@ import InternalContainer from '../container/internal';
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
export const ExpandableSectionContainer = (_a) => {
|
|
7
7
|
var { className, children, header, variant, expanded, disableContentPaddings, __internalRootRef } = _a, rest = __rest(_a, ["className", "children", "header", "variant", "expanded", "disableContentPaddings", "__internalRootRef"]);
|
|
8
|
-
if (variant === 'container') {
|
|
9
|
-
return (React.createElement(InternalContainer, Object.assign({}, rest, { className: className, header: header, variant:
|
|
8
|
+
if (variant === 'container' || variant === 'stacked') {
|
|
9
|
+
return (React.createElement(InternalContainer, Object.assign({}, rest, { className: className, header: header, variant: variant === 'stacked' ? 'stacked' : 'default', disableContentPaddings: disableContentPaddings || !expanded, disableHeaderPaddings: true, __hiddenContent: !expanded, __internalRootRef: __internalRootRef }), children));
|
|
10
10
|
}
|
|
11
11
|
return (React.createElement("div", Object.assign({ className: className }, rest, { ref: __internalRootRef }),
|
|
12
12
|
header,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandable-section-container.js","sourceRoot":"lib/default/","sources":["expandable-section/expandable-section-container.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAST,EAAE,EAAE;QATK,EACzC,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,sBAAsB,EACtB,iBAAiB,OAEe,EAD7B,IAAI,cARkC,yGAS1C,CADQ;IAEP,IAAI,OAAO,KAAK,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"expandable-section-container.js","sourceRoot":"lib/default/","sources":["expandable-section/expandable-section-container.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAST,EAAE,EAAE;QATK,EACzC,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,sBAAsB,EACtB,iBAAiB,OAEe,EAD7B,IAAI,cARkC,yGAS1C,CADQ;IAEP,IAAI,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,SAAS,EAAE;QACpD,OAAO,CACL,oBAAC,iBAAiB,oBACZ,IAAI,IACR,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACtD,sBAAsB,EAAE,sBAAsB,IAAI,CAAC,QAAQ,EAC3D,qBAAqB,EAAE,IAAI,EAC3B,eAAe,EAAE,CAAC,QAAQ,EAC1B,iBAAiB,EAAE,iBAAiB,KAEnC,QAAQ,CACS,CACrB,CAAC;KACH;IAED,OAAO,CACL,2CAAK,SAAS,EAAE,SAAS,IAAM,IAAI,IAAE,GAAG,EAAE,iBAAiB;QACxD,MAAM;QACN,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport InternalContainer from '../container/internal';\nimport React from 'react';\nimport { ExpandableSectionProps } from './interfaces';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\ninterface ExpandableSectionContainerProps extends InternalBaseComponentProps {\n className?: string;\n header: React.ReactNode;\n children?: React.ReactNode;\n variant: ExpandableSectionProps.Variant;\n expanded: boolean | undefined;\n disableContentPaddings: boolean | undefined;\n}\n\nexport const ExpandableSectionContainer = ({\n className,\n children,\n header,\n variant,\n expanded,\n disableContentPaddings,\n __internalRootRef,\n ...rest\n}: ExpandableSectionContainerProps) => {\n if (variant === 'container' || variant === 'stacked') {\n return (\n <InternalContainer\n {...rest}\n className={className}\n header={header}\n variant={variant === 'stacked' ? 'stacked' : 'default'}\n disableContentPaddings={disableContentPaddings || !expanded}\n disableHeaderPaddings={true}\n __hiddenContent={!expanded}\n __internalRootRef={__internalRootRef}\n >\n {children}\n </InternalContainer>\n );\n }\n\n return (\n <div className={className} {...rest} ref={__internalRootRef}>\n {header}\n {children}\n </div>\n );\n};\n"]}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { BaseComponentProps } from '../internal/base-component';
|
|
3
3
|
import { NonCancelableEventHandler } from '../internal/events';
|
|
4
4
|
export declare namespace ExpandableSectionProps {
|
|
5
|
-
type Variant = 'default' | 'footer' | 'container' | 'navigation';
|
|
5
|
+
type Variant = 'default' | 'footer' | 'container' | 'navigation' | 'stacked';
|
|
6
6
|
interface ChangeDetail {
|
|
7
7
|
expanded: boolean;
|
|
8
8
|
}
|
|
@@ -26,6 +26,8 @@ export interface ExpandableSectionProps extends BaseComponentProps {
|
|
|
26
26
|
* * `container` - Use this variant in a detail page alongside other containers.
|
|
27
27
|
* * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.
|
|
28
28
|
* It doesn't have any default styles.
|
|
29
|
+
* * `stacked` - Use this variant directly adjacent to other stacked containers (such as a container, table).
|
|
30
|
+
* @visualrefresh `stacked` variant
|
|
29
31
|
* */
|
|
30
32
|
variant?: ExpandableSectionProps.Variant;
|
|
31
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["expandable-section/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,yBAAiB,sBAAsB,CAAC;IACtC,KAAY,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["expandable-section/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,yBAAiB,sBAAsB,CAAC;IACtC,KAAY,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,CAAC;IACpF,UAAiB,YAAY;QAC3B,QAAQ,EAAE,OAAO,CAAC;KACnB;IACD,KAAY,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3D;AAED,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;SASK;IACL,OAAO,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC;IAEzC;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC;IAEvD;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;IAE1E;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE7B;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["expandable-section/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation';\n export interface ChangeDetail {\n expanded: boolean;\n }\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * @deprecated Use `headerText` instead.\n */\n header?: React.ReactNode;\n\n /**\n * The heading text. Use plain text. When using the container variant, you can use additional header props like `headerDescription` and `headerCounter` to display other elements in the header.\n */\n headerText?: React.ReactNode;\n\n /**\n * Supplementary text below the heading. Use with the container, default or footer variants.\n */\n headerDescription?: string;\n\n /**\n * Specifies secondary text that's displayed to the right of the heading title. Use with the container variant.\n * Behaves similar to the Header component counter.\n */\n headerCounter?: string;\n\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements).\n * Use with the container variant (which defaults to H2) or default/footer variants (which default to DIV). Note that this only\n * works with the `headerText` slot (not with the deprecated `header`), and not with the navigation variant.\n */\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n\n /**\n * The area next to the heading, used to display an Info link. Use with the container variant.\n */\n headerInfo?: React.ReactNode;\n\n /**\n * Actions for the header. Use with the container variant.\n */\n headerActions?: React.ReactNode;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["expandable-section/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation' | 'stacked';\n export interface ChangeDetail {\n expanded: boolean;\n }\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * * `stacked` - Use this variant directly adjacent to other stacked containers (such as a container, table).\n * @visualrefresh `stacked` variant\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * @deprecated Use `headerText` instead.\n */\n header?: React.ReactNode;\n\n /**\n * The heading text. Use plain text. When using the container variant, you can use additional header props like `headerDescription` and `headerCounter` to display other elements in the header.\n */\n headerText?: React.ReactNode;\n\n /**\n * Supplementary text below the heading. Use with the container, default or footer variants.\n */\n headerDescription?: string;\n\n /**\n * Specifies secondary text that's displayed to the right of the heading title. Use with the container variant.\n * Behaves similar to the Header component counter.\n */\n headerCounter?: string;\n\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements).\n * Use with the container variant (which defaults to H2) or default/footer variants (which default to DIV). Note that this only\n * works with the `headerText` slot (not with the deprecated `header`), and not with the navigation variant.\n */\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n\n /**\n * The area next to the heading, used to display an Info link. Use with the container variant.\n */\n headerInfo?: React.ReactNode;\n\n /**\n * Actions for the header. Use with the container variant.\n */\n headerActions?: React.ReactNode;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["expandable-section/internal.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,KAAK,8BAA8B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAE1F,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,EACf,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["expandable-section/internal.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,KAAK,8BAA8B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAE1F,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,EACf,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,8BAA8B,eAgGhC"}
|
|
@@ -52,8 +52,10 @@ export default function InternalExpandableSection(_a) {
|
|
|
52
52
|
onKeyDown,
|
|
53
53
|
onClick,
|
|
54
54
|
};
|
|
55
|
-
|
|
55
|
+
// Map stacked variant to container to avoid code duplication
|
|
56
|
+
const baseVariant = variant === 'stacked' ? 'container' : variant;
|
|
57
|
+
return (React.createElement(ExpandableSectionContainer, Object.assign({}, baseProps, { expanded: expanded, className: clsx(baseProps.className, styles.root), variant: variant, disableContentPaddings: disableContentPaddings, header: React.createElement(ExpandableSectionHeader, Object.assign({ id: triggerControlId, descriptionId: descriptionId, className: clsx(styles.header, styles[`header-${baseVariant}`]), variant: baseVariant, expanded: !!expanded, header: header, headerText: headerText, headerDescription: headerDescription, headerCounter: headerCounter, headerInfo: headerInfo, headerActions: headerActions, headingTagOverride: headingTagOverride }, triggerProps)), __internalRootRef: __internalRootRef }),
|
|
56
58
|
React.createElement(CSSTransition, { in: expanded, timeout: 30, classNames: { enter: styles['content-enter'] }, nodeRef: ref },
|
|
57
|
-
React.createElement("div", { id: controlId, ref: ref, className: clsx(styles.content, styles[`content-${
|
|
59
|
+
React.createElement("div", { id: controlId, ref: ref, className: clsx(styles.content, styles[`content-${baseVariant}`], expanded && styles['content-expanded']), role: "group", "aria-label": triggerProps.ariaLabel, "aria-labelledby": triggerProps.ariaLabelledBy, "aria-describedby": variantSupportsDescription(baseVariant) && headerDescription ? descriptionId : undefined }, children))));
|
|
58
60
|
}
|
|
59
61
|
//# sourceMappingURL=internal.js.map
|
|
@@ -1 +1 @@
|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,QAAQ,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,IAClC,YAAY,EAChB,EAEJ,iBAAiB,EAAE,iBAAiB;QAEpC,oBAAC,aAAa,IAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG;YACpG,6BACE,EAAE,EAAE,SAAS,EACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,WAAW,EAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,EACzG,IAAI,EAAC,OAAO,gBACA,YAAY,CAAC,SAAS,qBACjB,YAAY,CAAC,cAAc,sBAC1B,0BAA0B,CAAC,WAAW,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,IAEzG,QAAQ,CACL,CACQ,CACW,CAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEvent, useCallback, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { KeyCode } from '../internal/keycode';\nimport { fireNonCancelableEvent } from '../internal/events';\n\nimport { ExpandableSectionProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { ExpandableSectionContainer } from './expandable-section-container';\nimport { ExpandableSectionHeader } from './expandable-section-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { variantSupportsDescription } from './utils';\n\ntype InternalExpandableSectionProps = ExpandableSectionProps & InternalBaseComponentProps;\n\nexport default function InternalExpandableSection({\n expanded: controlledExpanded,\n defaultExpanded,\n onChange,\n variant = 'default',\n children,\n header,\n headerText,\n headerCounter,\n headerDescription,\n headerInfo,\n headerActions,\n headingTagOverride,\n disableContentPaddings,\n headerAriaLabel,\n __internalRootRef,\n ...props\n}: InternalExpandableSectionProps) {\n const ref = useRef<HTMLDivElement>(null);\n const controlId = useUniqueId();\n const triggerControlId = `${controlId}-trigger`;\n const descriptionId = `${controlId}-description`;\n\n const baseProps = getBaseProps(props);\n const [expanded, setExpanded] = useControllable(controlledExpanded, onChange, defaultExpanded, {\n componentName: 'ExpandableSection',\n controlledProp: 'expanded',\n changeHandler: 'onChange',\n });\n\n const onExpandChange = useCallback(\n (expanded: boolean) => {\n setExpanded(expanded);\n fireNonCancelableEvent(onChange, { expanded });\n },\n [onChange, setExpanded]\n );\n\n const onClick = useCallback(() => {\n onExpandChange(!expanded);\n }, [onExpandChange, expanded]);\n\n const onKeyUp = useCallback(\n (event: KeyboardEvent<Element>) => {\n const interactionKeys = [KeyCode.enter, KeyCode.space];\n\n if (interactionKeys.indexOf(event.keyCode) !== -1) {\n onExpandChange(!expanded);\n }\n },\n [onExpandChange, expanded]\n );\n\n const onKeyDown = useCallback((event: KeyboardEvent<Element>) => {\n if (event.keyCode === KeyCode.space) {\n // Prevent the page from scrolling when toggling the component with the space bar.\n event.preventDefault();\n }\n }, []);\n\n const triggerProps = {\n ariaControls: controlId,\n ariaLabel: headerAriaLabel,\n ariaLabelledBy: headerAriaLabel ? undefined : triggerControlId,\n onKeyUp,\n onKeyDown,\n onClick,\n };\n\n // Map stacked variant to container to avoid code duplication\n const baseVariant: ExpandableSectionProps.Variant = variant === 'stacked' ? 'container' : variant;\n\n return (\n <ExpandableSectionContainer\n {...baseProps}\n expanded={expanded}\n className={clsx(baseProps.className, styles.root)}\n variant={variant}\n disableContentPaddings={disableContentPaddings}\n header={\n <ExpandableSectionHeader\n id={triggerControlId}\n descriptionId={descriptionId}\n className={clsx(styles.header, styles[`header-${baseVariant}`])}\n variant={baseVariant}\n expanded={!!expanded}\n header={header}\n headerText={headerText}\n headerDescription={headerDescription}\n headerCounter={headerCounter}\n headerInfo={headerInfo}\n headerActions={headerActions}\n headingTagOverride={headingTagOverride}\n {...triggerProps}\n />\n }\n __internalRootRef={__internalRootRef}\n >\n <CSSTransition in={expanded} timeout={30} classNames={{ enter: styles['content-enter'] }} nodeRef={ref}>\n <div\n id={controlId}\n ref={ref}\n className={clsx(styles.content, styles[`content-${baseVariant}`], expanded && styles['content-expanded'])}\n role=\"group\"\n aria-label={triggerProps.ariaLabel}\n aria-labelledby={triggerProps.ariaLabelledBy}\n aria-describedby={variantSupportsDescription(baseVariant) && headerDescription ? descriptionId : undefined}\n >\n {children}\n </div>\n </CSSTransition>\n </ExpandableSectionContainer>\n );\n}\n"]}
|
package/flashbar/styles.css.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"flash-with-motion": "awsui_flash-with-
|
|
5
|
-
"enter": "
|
|
6
|
-
"flash-body": "awsui_flash-
|
|
7
|
-
"flash-message": "awsui_flash-
|
|
8
|
-
"flash-header": "awsui_flash-
|
|
9
|
-
"flash-content": "awsui_flash-
|
|
10
|
-
"action-button-wrapper": "awsui_action-button-
|
|
11
|
-
"dismiss-button-wrapper": "awsui_dismiss-button-
|
|
12
|
-
"flash-icon": "awsui_flash-
|
|
13
|
-
"entering": "
|
|
14
|
-
"entered": "
|
|
15
|
-
"exiting": "
|
|
16
|
-
"stack": "
|
|
17
|
-
"animation-running": "awsui_animation-
|
|
18
|
-
"item": "
|
|
19
|
-
"flash-list-item": "awsui_flash-list-
|
|
20
|
-
"notification-bar": "awsui_notification-
|
|
21
|
-
"collapsed": "
|
|
22
|
-
"animation-ready": "awsui_animation-
|
|
23
|
-
"expanded-only": "awsui_expanded-
|
|
24
|
-
"expanded": "
|
|
25
|
-
"flash": "
|
|
26
|
-
"collapsible": "
|
|
27
|
-
"short-list": "awsui_short-
|
|
28
|
-
"visual-refresh": "awsui_visual-
|
|
29
|
-
"status": "
|
|
30
|
-
"header": "
|
|
31
|
-
"item-count": "awsui_item-
|
|
32
|
-
"button": "
|
|
33
|
-
"type-count": "awsui_type-
|
|
34
|
-
"count-number": "awsui_count-
|
|
35
|
-
"icon": "
|
|
36
|
-
"floating": "
|
|
37
|
-
"flashbar": "
|
|
38
|
-
"flash-refresh": "awsui_flash-
|
|
39
|
-
"flash-list": "awsui_flash-
|
|
40
|
-
"flash-focus-container": "awsui_flash-focus-
|
|
41
|
-
"flash-text": "awsui_flash-
|
|
42
|
-
"dismiss-button": "awsui_dismiss-
|
|
43
|
-
"breakpoint-default": "awsui_breakpoint-
|
|
44
|
-
"action-button": "awsui_action-
|
|
45
|
-
"flash-type-success": "awsui_flash-type-
|
|
46
|
-
"flash-type-error": "awsui_flash-type-
|
|
47
|
-
"flash-type-warning": "awsui_flash-type-
|
|
48
|
-
"flash-type-info": "awsui_flash-type-
|
|
4
|
+
"flash-with-motion": "awsui_flash-with-motion_1q84n_cyh2o_93",
|
|
5
|
+
"enter": "awsui_enter_1q84n_cyh2o_93",
|
|
6
|
+
"flash-body": "awsui_flash-body_1q84n_cyh2o_107",
|
|
7
|
+
"flash-message": "awsui_flash-message_1q84n_cyh2o_107",
|
|
8
|
+
"flash-header": "awsui_flash-header_1q84n_cyh2o_107",
|
|
9
|
+
"flash-content": "awsui_flash-content_1q84n_cyh2o_108",
|
|
10
|
+
"action-button-wrapper": "awsui_action-button-wrapper_1q84n_cyh2o_109",
|
|
11
|
+
"dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_cyh2o_110",
|
|
12
|
+
"flash-icon": "awsui_flash-icon_1q84n_cyh2o_133",
|
|
13
|
+
"entering": "awsui_entering_1q84n_cyh2o_146",
|
|
14
|
+
"entered": "awsui_entered_1q84n_cyh2o_167",
|
|
15
|
+
"exiting": "awsui_exiting_1q84n_cyh2o_272",
|
|
16
|
+
"stack": "awsui_stack_1q84n_cyh2o_294",
|
|
17
|
+
"animation-running": "awsui_animation-running_1q84n_cyh2o_294",
|
|
18
|
+
"item": "awsui_item_1q84n_cyh2o_294",
|
|
19
|
+
"flash-list-item": "awsui_flash-list-item_1q84n_cyh2o_295",
|
|
20
|
+
"notification-bar": "awsui_notification-bar_1q84n_cyh2o_296",
|
|
21
|
+
"collapsed": "awsui_collapsed_1q84n_cyh2o_316",
|
|
22
|
+
"animation-ready": "awsui_animation-ready_1q84n_cyh2o_316",
|
|
23
|
+
"expanded-only": "awsui_expanded-only_1q84n_cyh2o_316",
|
|
24
|
+
"expanded": "awsui_expanded_1q84n_cyh2o_316",
|
|
25
|
+
"flash": "awsui_flash_1q84n_cyh2o_93",
|
|
26
|
+
"collapsible": "awsui_collapsible_1q84n_cyh2o_380",
|
|
27
|
+
"short-list": "awsui_short-list_1q84n_cyh2o_386",
|
|
28
|
+
"visual-refresh": "awsui_visual-refresh_1q84n_cyh2o_386",
|
|
29
|
+
"status": "awsui_status_1q84n_cyh2o_603",
|
|
30
|
+
"header": "awsui_header_1q84n_cyh2o_603",
|
|
31
|
+
"item-count": "awsui_item-count_1q84n_cyh2o_604",
|
|
32
|
+
"button": "awsui_button_1q84n_cyh2o_605",
|
|
33
|
+
"type-count": "awsui_type-count_1q84n_cyh2o_640",
|
|
34
|
+
"count-number": "awsui_count-number_1q84n_cyh2o_640",
|
|
35
|
+
"icon": "awsui_icon_1q84n_cyh2o_674",
|
|
36
|
+
"floating": "awsui_floating_1q84n_cyh2o_712",
|
|
37
|
+
"flashbar": "awsui_flashbar_1q84n_cyh2o_720",
|
|
38
|
+
"flash-refresh": "awsui_flash-refresh_1q84n_cyh2o_766",
|
|
39
|
+
"flash-list": "awsui_flash-list_1q84n_cyh2o_295",
|
|
40
|
+
"flash-focus-container": "awsui_flash-focus-container_1q84n_cyh2o_785",
|
|
41
|
+
"flash-text": "awsui_flash-text_1q84n_cyh2o_812",
|
|
42
|
+
"dismiss-button": "awsui_dismiss-button_1q84n_cyh2o_110",
|
|
43
|
+
"breakpoint-default": "awsui_breakpoint-default_1q84n_cyh2o_853",
|
|
44
|
+
"action-button": "awsui_action-button_1q84n_cyh2o_109",
|
|
45
|
+
"flash-type-success": "awsui_flash-type-success_1q84n_cyh2o_866",
|
|
46
|
+
"flash-type-error": "awsui_flash-type-error_1q84n_cyh2o_870",
|
|
47
|
+
"flash-type-warning": "awsui_flash-type-warning_1q84n_cyh2o_874",
|
|
48
|
+
"flash-type-info": "awsui_flash-type-info_1q84n_cyh2o_878"
|
|
49
49
|
};
|
|
50
50
|
|