@cloudscape-design/components 3.0.26 → 3.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/internal.d.ts.map +1 -1
- package/alert/internal.js +3 -4
- package/alert/internal.js.map +1 -1
- package/app-layout/index.js +1 -1
- package/app-layout/index.js.map +1 -1
- package/breadcrumb-group/internal.d.ts.map +1 -1
- package/breadcrumb-group/internal.js +4 -4
- package/breadcrumb-group/internal.js.map +1 -1
- package/button-dropdown/interfaces.d.ts +1 -1
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-dropdown/internal.js +1 -1
- package/button-dropdown/internal.js.map +1 -1
- package/cards/index.js +1 -1
- package/cards/index.js.map +1 -1
- package/code-editor/index.d.ts.map +1 -1
- package/code-editor/index.js +2 -3
- package/code-editor/index.js.map +1 -1
- package/container/internal.js +1 -1
- package/container/internal.js.map +1 -1
- package/container/use-sticky-header.js +1 -1
- package/container/use-sticky-header.js.map +1 -1
- package/date-picker/calendar/index.d.ts.map +1 -1
- package/date-picker/calendar/index.js +2 -1
- package/date-picker/calendar/index.js.map +1 -1
- package/date-picker/calendar/utils/memoized-date.d.ts +2 -0
- package/date-picker/calendar/utils/memoized-date.d.ts.map +1 -0
- package/date-picker/calendar/utils/memoized-date.js +13 -0
- package/date-picker/calendar/utils/memoized-date.js.map +1 -0
- package/date-picker/embedded.js +1 -1
- package/date-picker/embedded.js.map +1 -1
- package/date-picker/index.d.ts.map +1 -1
- package/date-picker/index.js +3 -4
- package/date-picker/index.js.map +1 -1
- package/date-picker/use-date-picker.d.ts.map +1 -1
- package/date-picker/use-date-picker.js +1 -1
- package/date-picker/use-date-picker.js.map +1 -1
- package/date-range-picker/calendar/grids/day/index.js +1 -1
- package/date-range-picker/calendar/grids/day/index.js.map +1 -1
- package/date-range-picker/calendar/index.d.ts.map +1 -1
- package/date-range-picker/calendar/index.js +9 -11
- package/date-range-picker/calendar/index.js.map +1 -1
- package/date-range-picker/index.d.ts.map +1 -1
- package/date-range-picker/index.js +4 -4
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/time-offset.d.ts +0 -7
- package/date-range-picker/time-offset.d.ts.map +1 -1
- package/date-range-picker/time-offset.js +4 -60
- package/date-range-picker/time-offset.js.map +1 -1
- package/flashbar/index.js +1 -1
- package/flashbar/index.js.map +1 -1
- package/form-field/internal.d.ts.map +1 -1
- package/form-field/internal.js +3 -6
- package/form-field/internal.js.map +1 -1
- package/header/internal.d.ts.map +1 -1
- package/header/internal.js +3 -6
- package/header/internal.js.map +1 -1
- package/icon/icons.js +1 -1
- package/icon/interfaces.d.ts +1 -1
- package/icon/interfaces.d.ts.map +1 -1
- package/icon/interfaces.js.map +1 -1
- package/icon/internal.js +1 -1
- package/icon/internal.js.map +1 -1
- package/input/styles.css.js +13 -13
- package/input/styles.scoped.css +35 -37
- package/input/styles.selectors.js +13 -13
- package/internal/components/checkbox-icon/index.d.ts.map +1 -1
- package/internal/components/checkbox-icon/index.js +3 -4
- package/internal/components/checkbox-icon/index.js.map +1 -1
- package/internal/components/content-layout/index.d.ts.map +1 -1
- package/internal/components/content-layout/index.js +3 -4
- package/internal/components/content-layout/index.js.map +1 -1
- package/internal/components/date-input/index.d.ts +1 -1
- package/internal/components/date-input/index.d.ts.map +1 -1
- package/internal/components/date-input/index.js +6 -4
- package/internal/components/date-input/index.js.map +1 -1
- package/internal/components/dropdown/index.js +1 -1
- package/internal/components/dropdown/index.js.map +1 -1
- package/internal/components/masked-input/utils/mask-format.d.ts.map +1 -1
- package/internal/components/masked-input/utils/mask-format.js +2 -1
- package/internal/components/masked-input/utils/mask-format.js.map +1 -1
- package/internal/components/masked-input/utils/strings.d.ts +0 -1
- package/internal/components/masked-input/utils/strings.d.ts.map +1 -1
- package/internal/components/masked-input/utils/strings.js +0 -6
- package/internal/components/masked-input/utils/strings.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/hooks/use-mutation-observer/index.d.ts +5 -0
- package/internal/hooks/use-mutation-observer/index.d.ts.map +1 -1
- package/internal/hooks/use-mutation-observer/index.js +5 -0
- package/internal/hooks/use-mutation-observer/index.js.map +1 -1
- package/internal/hooks/use-portal-mode-classes/index.js +1 -1
- package/internal/hooks/use-portal-mode-classes/index.js.map +1 -1
- package/internal/hooks/use-singleton-handler/index.d.ts +2 -1
- package/internal/hooks/use-singleton-handler/index.d.ts.map +1 -1
- package/internal/hooks/use-singleton-handler/index.js.map +1 -1
- package/internal/hooks/use-visual-mode/index.d.ts +1 -1
- package/internal/hooks/use-visual-mode/index.d.ts.map +1 -1
- package/internal/hooks/use-visual-mode/index.js +16 -11
- package/internal/hooks/use-visual-mode/index.js.map +1 -1
- package/internal/utils/date-time/display-format.d.ts +9 -0
- package/internal/utils/date-time/display-format.d.ts.map +1 -0
- package/internal/utils/date-time/display-format.js +15 -0
- package/internal/utils/date-time/display-format.js.map +1 -0
- package/internal/utils/date-time/format-date.d.ts +7 -0
- package/internal/utils/date-time/format-date.d.ts.map +1 -0
- package/internal/utils/date-time/format-date.js +15 -0
- package/internal/utils/date-time/format-date.js.map +1 -0
- package/internal/utils/date-time/format-time.d.ts +5 -0
- package/internal/utils/date-time/format-time.d.ts.map +1 -0
- package/internal/utils/date-time/format-time.js +13 -0
- package/internal/utils/date-time/format-time.js.map +1 -0
- package/internal/utils/date-time/format-timezone-offset.d.ts +2 -0
- package/internal/utils/date-time/format-timezone-offset.d.ts.map +1 -0
- package/internal/utils/date-time/format-timezone-offset.js +11 -0
- package/internal/utils/date-time/format-timezone-offset.js.map +1 -0
- package/internal/utils/date-time/get-browser-timezone-offset.d.ts +7 -0
- package/internal/utils/date-time/get-browser-timezone-offset.d.ts.map +1 -0
- package/internal/utils/date-time/get-browser-timezone-offset.js +11 -0
- package/internal/utils/date-time/get-browser-timezone-offset.js.map +1 -0
- package/internal/utils/date-time/index.d.ts +11 -0
- package/internal/utils/date-time/index.d.ts.map +1 -0
- package/internal/utils/date-time/index.js +13 -0
- package/internal/utils/date-time/index.js.map +1 -0
- package/internal/utils/date-time/is-iso-date-only.d.ts +5 -0
- package/internal/utils/date-time/is-iso-date-only.d.ts.map +1 -0
- package/internal/utils/date-time/is-iso-date-only.js +10 -0
- package/internal/utils/date-time/is-iso-date-only.js.map +1 -0
- package/internal/utils/date-time/join-date-time.d.ts +2 -0
- package/internal/utils/date-time/join-date-time.d.ts.map +1 -0
- package/internal/utils/date-time/join-date-time.js +6 -0
- package/internal/utils/date-time/join-date-time.js.map +1 -0
- package/internal/utils/date-time/parse-date.d.ts +8 -0
- package/internal/utils/date-time/parse-date.d.ts.map +1 -0
- package/internal/utils/date-time/parse-date.js +16 -0
- package/internal/utils/date-time/parse-date.js.map +1 -0
- package/internal/utils/date-time/parse-timezone-offset.d.ts +5 -0
- package/internal/utils/date-time/parse-timezone-offset.d.ts.map +1 -0
- package/internal/utils/date-time/parse-timezone-offset.js +20 -0
- package/internal/utils/date-time/parse-timezone-offset.js.map +1 -0
- package/internal/utils/date-time/shift-timezone-offset.d.ts +12 -0
- package/internal/utils/date-time/shift-timezone-offset.d.ts.map +1 -0
- package/internal/utils/date-time/shift-timezone-offset.js +27 -0
- package/internal/utils/date-time/shift-timezone-offset.js.map +1 -0
- package/internal/utils/strings/index.d.ts +3 -0
- package/internal/utils/strings/index.d.ts.map +1 -0
- package/internal/utils/strings/index.js +5 -0
- package/internal/utils/strings/index.js.map +1 -0
- package/internal/utils/strings/join-strings.d.ts +5 -0
- package/internal/utils/strings/join-strings.d.ts.map +1 -0
- package/internal/utils/{strings.js → strings/join-strings.js} +7 -6
- package/internal/utils/strings/join-strings.js.map +1 -0
- package/internal/utils/strings/pad-left-zeros.d.ts +5 -0
- package/internal/utils/strings/pad-left-zeros.d.ts.map +1 -0
- package/internal/utils/strings/pad-left-zeros.js +12 -0
- package/internal/utils/strings/pad-left-zeros.js.map +1 -0
- package/link/internal.js +3 -3
- package/link/internal.js.map +1 -1
- package/link/styles.css.js +19 -18
- package/link/styles.scoped.css +73 -69
- package/link/styles.selectors.js +19 -18
- package/mixed-line-bar-chart/bar-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/bar-series.js +3 -4
- package/mixed-line-bar-chart/bar-series.js.map +1 -1
- package/mixed-line-bar-chart/chart-container.js +1 -1
- package/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/mixed-line-bar-chart/interfaces.d.ts +5 -4
- package/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
- package/mixed-line-bar-chart/interfaces.js.map +1 -1
- package/modal/internal.js +1 -1
- package/modal/internal.js.map +1 -1
- package/package.json +1 -1
- package/pie-chart/pie-chart.d.ts.map +1 -1
- package/pie-chart/pie-chart.js +2 -2
- package/pie-chart/pie-chart.js.map +1 -1
- package/pie-chart/segments.d.ts +1 -2
- package/pie-chart/segments.d.ts.map +1 -1
- package/pie-chart/segments.js +2 -2
- package/pie-chart/segments.js.map +1 -1
- package/popover/container.js +1 -1
- package/popover/container.js.map +1 -1
- package/popover/styles.css.js +48 -48
- package/popover/styles.scoped.css +65 -60
- package/popover/styles.selectors.js +48 -48
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +10 -2
- package/property-filter/index.js.map +1 -1
- package/radio-group/radio-button.d.ts.map +1 -1
- package/radio-group/radio-button.js +3 -4
- package/radio-group/radio-button.js.map +1 -1
- package/s3-resource-selector/s3-modal/index.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/index.js +2 -3
- package/s3-resource-selector/s3-modal/index.js.map +1 -1
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +2 -2
- package/split-panel/index.js.map +1 -1
- package/table/internal.js +1 -1
- package/table/internal.js.map +1 -1
- package/table/sticky-scrollbar.js +1 -1
- package/table/sticky-scrollbar.js.map +1 -1
- package/table/styles.css.js +32 -32
- package/table/styles.scoped.css +40 -43
- package/table/styles.selectors.js +32 -32
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +40 -43
- package/tabs/styles.selectors.js +21 -21
- package/tabs/tab-header-bar.js +1 -1
- package/tabs/tab-header-bar.js.map +1 -1
- package/textarea/styles.css.js +4 -4
- package/textarea/styles.scoped.css +13 -14
- package/textarea/styles.selectors.js +4 -4
- package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/index.js +3 -4
- package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js +5 -7
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/wizard/index.d.ts.map +1 -1
- package/wizard/index.js +2 -3
- package/wizard/index.js.map +1 -1
- package/date-picker/calendar/utils/date.d.ts +0 -10
- package/date-picker/calendar/utils/date.d.ts.map +0 -1
- package/date-picker/calendar/utils/date.js +0 -50
- package/date-picker/calendar/utils/date.js.map +0 -1
- package/internal/components/date-input/utils/date.d.ts +0 -5
- package/internal/components/date-input/utils/date.d.ts.map +0 -1
- package/internal/components/date-input/utils/date.js +0 -11
- package/internal/components/date-input/utils/date.js.map +0 -1
- package/internal/utils/strings.d.ts +0 -2
- package/internal/utils/strings.d.ts.map +0 -1
- package/internal/utils/strings.js.map +0 -1
package/popover/container.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/popover/container.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC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,eAAe,CAAC,QAAkB;IACnC,IAAA,KAAgB,QAAQ,CAAC,eAAe,CAAC,qBAAqB,EAAE,EAA9D,GAAG,SAAA,EAAE,IAAI,UAAqD,CAAC;IACvE,OAAO;QACL,GAAG,KAAA;QACH,IAAI,MAAA;QACJ,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,WAAW;QAC3C,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,YAAY;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { CSSProperties, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { getContainingBlock, nodeContains } from '../internal/utils/dom';\nimport { ContainerQueryEntry, useContainerQuery } from '../internal/hooks/container-queries';\nimport { BoundingOffset, InternalPosition, Offset, PopoverProps } from './interfaces';\nimport { calculatePosition } from './utils/positions';\nimport styles from './styles.css.js';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\n\nexport interface PopoverContainerProps {\n /** References the element the container is positioned against. */\n trackRef: React.RefObject<Element>;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n position: PopoverProps.Position;\n zIndex?: React.CSSProperties['zIndex'];\n arrow: (position: InternalPosition | null) => React.ReactNode;\n children: React.ReactNode;\n renderWithPortal?: boolean;\n}\n\nconst INITIAL_STYLES: CSSProperties = { position: 'absolute', top: -9999, left: -9999 };\n\nexport default function PopoverContainer({\n position,\n trackRef,\n trackKey,\n arrow,\n children,\n zIndex,\n renderWithPortal,\n}: PopoverContainerProps) {\n const [popoverRect, ref] = useContainerQuery((rect, prev) => {\n const roundedRect = { width: Math.round(rect.width), height: Math.round(rect.height) };\n return prev?.width === roundedRect.width && prev?.height === roundedRect.height ? prev : rect;\n }) as [ContainerQueryEntry | null, React.MutableRefObject<HTMLDivElement | null>];\n\n const bodyRef = useRef<HTMLDivElement | null>(null);\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const [inlineStyle, setInlineStyle] = useState<CSSProperties>(INITIAL_STYLES);\n const [internalPosition, setInternalPosition] = useState<InternalPosition | null>(null);\n const isRefresh = useVisualRefresh(ref);\n\n // Store the handler in a ref so that it can still be replaced from outside of the listener closure.\n const positionHandlerRef = useRef<() => void>(() => {});\n\n // Updates the position handler.\n const updatePositionHandler = useCallback(() => {\n if (!trackRef.current || !ref.current || !bodyRef.current || !arrowRef.current) {\n return;\n }\n\n // Get important elements\n const body = bodyRef.current;\n const arrow = arrowRef.current;\n const document = ref.current.ownerDocument;\n const track = trackRef.current;\n\n // If the popover body isn't being rendered for whatever reason (e.g. \"display: none\" or JSDOM),\n // or track does not belong to the document - bail on calculating dimensions.\n if (body.offsetWidth === 0 || body.offsetHeight === 0 || !nodeContains(document.body, track)) {\n return;\n }\n\n // Imperatively move body off-screen to give it room to expand.\n // Not doing this in React because this recalculation should happen\n // in the span of a single frame without rerendering anything.\n const prevTop = body.style.top;\n const prevLeft = body.style.left;\n body.style.top = '0';\n body.style.left = '0';\n\n // Get rects representing key elements\n // Use getComputedStyle for arrowRect to avoid modifications made by transform\n const viewportRect = getViewportRect(document.defaultView!);\n const trackRect = track.getBoundingClientRect();\n const arrowRect = {\n width: parseFloat(getComputedStyle(arrow).width),\n height: parseFloat(getComputedStyle(arrow).height),\n };\n const containingBlock = getContainingBlock(body);\n const containingBlockRect = containingBlock ? containingBlock.getBoundingClientRect() : viewportRect;\n\n // Round up dimensions (IE11 doesn't handle subpixels too accurately)\n const bodyRect = body.getBoundingClientRect();\n const bodyRectCeil = {\n top: bodyRect.top,\n left: bodyRect.left,\n width: Math.ceil(bodyRect.width),\n height: Math.ceil(bodyRect.height),\n };\n\n // Calculate the arrow direction and viewport-relative position of the popover.\n const { internalPosition: newInternalPosition, boundingOffset } = calculatePosition(\n position,\n trackRect,\n arrowRect,\n bodyRectCeil,\n containingBlock ? containingBlockRect : getDocumentRect(document),\n viewportRect,\n renderWithPortal\n );\n\n // Get the position of the popover relative to the offset parent.\n const popoverOffset = toRelativePosition(boundingOffset, containingBlockRect);\n\n // Cache the distance between the trigger and the popover (which stays the same as you scroll),\n // and use that to recalculate the new popover position.\n const trackRelativeOffset = toRelativePosition(popoverOffset, toRelativePosition(trackRect, containingBlockRect));\n\n // Bring back the container to its original position to prevent any\n // flashing.\n body.style.top = prevTop;\n body.style.left = prevLeft;\n\n // Position the popover\n setInternalPosition(newInternalPosition);\n setInlineStyle({ top: popoverOffset.top, left: popoverOffset.left });\n\n positionHandlerRef.current = () => {\n const newTrackOffset = toRelativePosition(\n track.getBoundingClientRect(),\n containingBlock ? containingBlock.getBoundingClientRect() : viewportRect\n );\n setInlineStyle({\n top: newTrackOffset.top + trackRelativeOffset.top,\n left: newTrackOffset.left + trackRelativeOffset.left,\n });\n };\n }, [position, trackRef, ref, renderWithPortal]);\n\n // Update the handler when properties change.\n useLayoutEffect(() => {\n updatePositionHandler();\n }, [updatePositionHandler, trackKey, popoverRect]);\n\n // Attach document listeners.\n useLayoutEffect(() => {\n /*\n This is a heuristic. Some layout changes are caused by user clicks (e.g. toggling the tools panel, submitting a form),\n and by tracking the click event we can adapt the popover's position to the new layout.\n\n TODO: extend this to Enter and Spacebar?\n */\n const updatePosition = () => requestAnimationFrame(() => updatePositionHandler());\n const refreshPosition = () => requestAnimationFrame(() => positionHandlerRef.current());\n\n window.addEventListener('click', updatePosition);\n window.addEventListener('resize', updatePosition);\n window.addEventListener('scroll', refreshPosition, true);\n return () => {\n window.removeEventListener('click', updatePosition);\n window.removeEventListener('resize', updatePosition);\n window.removeEventListener('scroll', refreshPosition, true);\n };\n }, [updatePositionHandler]);\n\n const mergedRef = useMergeRefs(bodyRef, ref);\n\n return (\n <div\n ref={mergedRef}\n style={{ ...inlineStyle, zIndex }}\n className={clsx(styles.container, isRefresh && styles.refresh)}\n >\n <div\n ref={arrowRef}\n className={clsx(styles[`container-arrow`], styles[`container-arrow-position-${internalPosition}`])}\n aria-hidden={true}\n >\n {arrow(internalPosition)}\n </div>\n {children}\n </div>\n );\n}\n\n/**\n * Convert a viewport-relative offset to an element-relative offset.\n */\nfunction toRelativePosition(element: Offset, parent: Offset): Offset {\n return {\n top: element.top - parent.top,\n left: element.left - parent.left,\n };\n}\n\n/**\n * Get a BoundingOffset that represents the visible viewport.\n */\nfunction getViewportRect(window: Window): BoundingOffset {\n return {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n };\n}\n\nfunction getDocumentRect(document: Document): BoundingOffset {\n const { top, left } = document.documentElement.getBoundingClientRect();\n return {\n top,\n left,\n width: document.documentElement.scrollWidth,\n height: document.documentElement.scrollHeight,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/popover/container.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAsBhE,IAAM,cAAc,GAAkB,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,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AAC,eAAe,CAAC,YAAY;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { CSSProperties, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { getContainingBlock, nodeContains } from '../internal/utils/dom';\nimport { ContainerQueryEntry, useContainerQuery } from '../internal/hooks/container-queries';\nimport { BoundingOffset, InternalPosition, Offset, PopoverProps } from './interfaces';\nimport { calculatePosition } from './utils/positions';\nimport styles from './styles.css.js';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\n\nexport interface PopoverContainerProps {\n /** References the element the container is positioned against. */\n trackRef: React.RefObject<Element>;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n position: PopoverProps.Position;\n zIndex?: React.CSSProperties['zIndex'];\n arrow: (position: InternalPosition | null) => React.ReactNode;\n children: React.ReactNode;\n renderWithPortal?: boolean;\n}\n\nconst INITIAL_STYLES: CSSProperties = { position: 'absolute', top: -9999, left: -9999 };\n\nexport default function PopoverContainer({\n position,\n trackRef,\n trackKey,\n arrow,\n children,\n zIndex,\n renderWithPortal,\n}: PopoverContainerProps) {\n const [popoverRect, ref] = useContainerQuery((rect, prev) => {\n const roundedRect = { width: Math.round(rect.width), height: Math.round(rect.height) };\n return prev?.width === roundedRect.width && prev?.height === roundedRect.height ? prev : rect;\n }) as [ContainerQueryEntry | null, React.MutableRefObject<HTMLDivElement | null>];\n\n const bodyRef = useRef<HTMLDivElement | null>(null);\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const [inlineStyle, setInlineStyle] = useState<CSSProperties>(INITIAL_STYLES);\n const [internalPosition, setInternalPosition] = useState<InternalPosition | null>(null);\n const isRefresh = useVisualRefresh();\n\n // Store the handler in a ref so that it can still be replaced from outside of the listener closure.\n const positionHandlerRef = useRef<() => void>(() => {});\n\n // Updates the position handler.\n const updatePositionHandler = useCallback(() => {\n if (!trackRef.current || !ref.current || !bodyRef.current || !arrowRef.current) {\n return;\n }\n\n // Get important elements\n const body = bodyRef.current;\n const arrow = arrowRef.current;\n const document = ref.current.ownerDocument;\n const track = trackRef.current;\n\n // If the popover body isn't being rendered for whatever reason (e.g. \"display: none\" or JSDOM),\n // or track does not belong to the document - bail on calculating dimensions.\n if (body.offsetWidth === 0 || body.offsetHeight === 0 || !nodeContains(document.body, track)) {\n return;\n }\n\n // Imperatively move body off-screen to give it room to expand.\n // Not doing this in React because this recalculation should happen\n // in the span of a single frame without rerendering anything.\n const prevTop = body.style.top;\n const prevLeft = body.style.left;\n body.style.top = '0';\n body.style.left = '0';\n\n // Get rects representing key elements\n // Use getComputedStyle for arrowRect to avoid modifications made by transform\n const viewportRect = getViewportRect(document.defaultView!);\n const trackRect = track.getBoundingClientRect();\n const arrowRect = {\n width: parseFloat(getComputedStyle(arrow).width),\n height: parseFloat(getComputedStyle(arrow).height),\n };\n const containingBlock = getContainingBlock(body);\n const containingBlockRect = containingBlock ? containingBlock.getBoundingClientRect() : viewportRect;\n\n // Round up dimensions (IE11 doesn't handle subpixels too accurately)\n const bodyRect = body.getBoundingClientRect();\n const bodyRectCeil = {\n top: bodyRect.top,\n left: bodyRect.left,\n width: Math.ceil(bodyRect.width),\n height: Math.ceil(bodyRect.height),\n };\n\n // Calculate the arrow direction and viewport-relative position of the popover.\n const { internalPosition: newInternalPosition, boundingOffset } = calculatePosition(\n position,\n trackRect,\n arrowRect,\n bodyRectCeil,\n containingBlock ? containingBlockRect : getDocumentRect(document),\n viewportRect,\n renderWithPortal\n );\n\n // Get the position of the popover relative to the offset parent.\n const popoverOffset = toRelativePosition(boundingOffset, containingBlockRect);\n\n // Cache the distance between the trigger and the popover (which stays the same as you scroll),\n // and use that to recalculate the new popover position.\n const trackRelativeOffset = toRelativePosition(popoverOffset, toRelativePosition(trackRect, containingBlockRect));\n\n // Bring back the container to its original position to prevent any\n // flashing.\n body.style.top = prevTop;\n body.style.left = prevLeft;\n\n // Position the popover\n setInternalPosition(newInternalPosition);\n setInlineStyle({ top: popoverOffset.top, left: popoverOffset.left });\n\n positionHandlerRef.current = () => {\n const newTrackOffset = toRelativePosition(\n track.getBoundingClientRect(),\n containingBlock ? containingBlock.getBoundingClientRect() : viewportRect\n );\n setInlineStyle({\n top: newTrackOffset.top + trackRelativeOffset.top,\n left: newTrackOffset.left + trackRelativeOffset.left,\n });\n };\n }, [position, trackRef, ref, renderWithPortal]);\n\n // Update the handler when properties change.\n useLayoutEffect(() => {\n updatePositionHandler();\n }, [updatePositionHandler, trackKey, popoverRect]);\n\n // Attach document listeners.\n useLayoutEffect(() => {\n /*\n This is a heuristic. Some layout changes are caused by user clicks (e.g. toggling the tools panel, submitting a form),\n and by tracking the click event we can adapt the popover's position to the new layout.\n\n TODO: extend this to Enter and Spacebar?\n */\n const updatePosition = () => requestAnimationFrame(() => updatePositionHandler());\n const refreshPosition = () => requestAnimationFrame(() => positionHandlerRef.current());\n\n window.addEventListener('click', updatePosition);\n window.addEventListener('resize', updatePosition);\n window.addEventListener('scroll', refreshPosition, true);\n return () => {\n window.removeEventListener('click', updatePosition);\n window.removeEventListener('resize', updatePosition);\n window.removeEventListener('scroll', refreshPosition, true);\n };\n }, [updatePositionHandler]);\n\n const mergedRef = useMergeRefs(bodyRef, ref);\n\n return (\n <div\n ref={mergedRef}\n style={{ ...inlineStyle, zIndex }}\n className={clsx(styles.container, isRefresh && styles.refresh)}\n >\n <div\n ref={arrowRef}\n className={clsx(styles[`container-arrow`], styles[`container-arrow-position-${internalPosition}`])}\n aria-hidden={true}\n >\n {arrow(internalPosition)}\n </div>\n {children}\n </div>\n );\n}\n\n/**\n * Convert a viewport-relative offset to an element-relative offset.\n */\nfunction toRelativePosition(element: Offset, parent: Offset): Offset {\n return {\n top: element.top - parent.top,\n left: element.left - parent.left,\n };\n}\n\n/**\n * Get a BoundingOffset that represents the visible viewport.\n */\nfunction getViewportRect(window: Window): BoundingOffset {\n return {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n };\n}\n\nfunction getDocumentRect(document: Document): BoundingOffset {\n const { top, left } = document.documentElement.getBoundingClientRect();\n return {\n top,\n left,\n width: document.documentElement.scrollWidth,\n height: document.documentElement.scrollHeight,\n };\n}\n"]}
|
package/popover/styles.css.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"arrow": "
|
|
5
|
-
"arrow-outer": "awsui_arrow-
|
|
6
|
-
"arrow-inner": "awsui_arrow-
|
|
7
|
-
"arrow-position-right-top": "awsui_arrow-position-right-
|
|
8
|
-
"arrow-position-right-bottom": "awsui_arrow-position-right-
|
|
9
|
-
"arrow-position-left-top": "awsui_arrow-position-left-
|
|
10
|
-
"arrow-position-left-bottom": "awsui_arrow-position-left-
|
|
11
|
-
"arrow-position-top-center": "awsui_arrow-position-top-
|
|
12
|
-
"arrow-position-top-right": "awsui_arrow-position-top-
|
|
13
|
-
"arrow-position-top-left": "awsui_arrow-position-top-
|
|
14
|
-
"arrow-position-top-responsive": "awsui_arrow-position-top-
|
|
15
|
-
"arrow-position-bottom-center": "awsui_arrow-position-bottom-
|
|
16
|
-
"arrow-position-bottom-right": "awsui_arrow-position-bottom-
|
|
17
|
-
"arrow-position-bottom-left": "awsui_arrow-position-bottom-
|
|
18
|
-
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-
|
|
19
|
-
"body": "
|
|
20
|
-
"body-overflow-visible": "awsui_body-overflow-
|
|
21
|
-
"variant-annotation": "awsui_variant-
|
|
22
|
-
"body-size-small": "awsui_body-size-
|
|
23
|
-
"fixed-width": "awsui_fixed-
|
|
24
|
-
"body-size-medium": "awsui_body-size-
|
|
25
|
-
"body-size-large": "awsui_body-size-
|
|
26
|
-
"has-dismiss": "awsui_has-
|
|
27
|
-
"dismiss": "
|
|
28
|
-
"dismiss-control": "awsui_dismiss-
|
|
29
|
-
"header-row": "awsui_header-
|
|
30
|
-
"header": "
|
|
31
|
-
"content": "
|
|
32
|
-
"content-overflow-visible": "awsui_content-overflow-
|
|
33
|
-
"container": "
|
|
34
|
-
"container-arrow": "awsui_container-
|
|
35
|
-
"container-arrow-position-right-top": "awsui_container-arrow-position-right-
|
|
36
|
-
"container-arrow-position-right-bottom": "awsui_container-arrow-position-right-
|
|
37
|
-
"container-arrow-position-left-top": "awsui_container-arrow-position-left-
|
|
38
|
-
"container-arrow-position-left-bottom": "awsui_container-arrow-position-left-
|
|
39
|
-
"container-arrow-position-top-center": "awsui_container-arrow-position-top-
|
|
40
|
-
"container-arrow-position-top-right": "awsui_container-arrow-position-top-
|
|
41
|
-
"container-arrow-position-top-left": "awsui_container-arrow-position-top-
|
|
42
|
-
"container-arrow-position-top-responsive": "awsui_container-arrow-position-top-
|
|
43
|
-
"container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-
|
|
44
|
-
"container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-
|
|
45
|
-
"container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-
|
|
46
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
47
|
-
"refresh": "
|
|
48
|
-
"root": "
|
|
49
|
-
"trigger": "
|
|
50
|
-
"trigger-type-text": "awsui_trigger-type-
|
|
51
|
-
"trigger-inner-text": "awsui_trigger-inner-
|
|
4
|
+
"arrow": "awsui_arrow_xjuzf_1bftv_185",
|
|
5
|
+
"arrow-outer": "awsui_arrow-outer_xjuzf_1bftv_189",
|
|
6
|
+
"arrow-inner": "awsui_arrow-inner_xjuzf_1bftv_189",
|
|
7
|
+
"arrow-position-right-top": "awsui_arrow-position-right-top_xjuzf_1bftv_220",
|
|
8
|
+
"arrow-position-right-bottom": "awsui_arrow-position-right-bottom_xjuzf_1bftv_220",
|
|
9
|
+
"arrow-position-left-top": "awsui_arrow-position-left-top_xjuzf_1bftv_223",
|
|
10
|
+
"arrow-position-left-bottom": "awsui_arrow-position-left-bottom_xjuzf_1bftv_223",
|
|
11
|
+
"arrow-position-top-center": "awsui_arrow-position-top-center_xjuzf_1bftv_226",
|
|
12
|
+
"arrow-position-top-right": "awsui_arrow-position-top-right_xjuzf_1bftv_226",
|
|
13
|
+
"arrow-position-top-left": "awsui_arrow-position-top-left_xjuzf_1bftv_226",
|
|
14
|
+
"arrow-position-top-responsive": "awsui_arrow-position-top-responsive_xjuzf_1bftv_226",
|
|
15
|
+
"arrow-position-bottom-center": "awsui_arrow-position-bottom-center_xjuzf_1bftv_229",
|
|
16
|
+
"arrow-position-bottom-right": "awsui_arrow-position-bottom-right_xjuzf_1bftv_229",
|
|
17
|
+
"arrow-position-bottom-left": "awsui_arrow-position-bottom-left_xjuzf_1bftv_229",
|
|
18
|
+
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_xjuzf_1bftv_229",
|
|
19
|
+
"body": "awsui_body_xjuzf_1bftv_325",
|
|
20
|
+
"body-overflow-visible": "awsui_body-overflow-visible_xjuzf_1bftv_344",
|
|
21
|
+
"variant-annotation": "awsui_variant-annotation_xjuzf_1bftv_348",
|
|
22
|
+
"body-size-small": "awsui_body-size-small_xjuzf_1bftv_353",
|
|
23
|
+
"fixed-width": "awsui_fixed-width_xjuzf_1bftv_356",
|
|
24
|
+
"body-size-medium": "awsui_body-size-medium_xjuzf_1bftv_360",
|
|
25
|
+
"body-size-large": "awsui_body-size-large_xjuzf_1bftv_367",
|
|
26
|
+
"has-dismiss": "awsui_has-dismiss_xjuzf_1bftv_379",
|
|
27
|
+
"dismiss": "awsui_dismiss_xjuzf_1bftv_384",
|
|
28
|
+
"dismiss-control": "awsui_dismiss-control_xjuzf_1bftv_391",
|
|
29
|
+
"header-row": "awsui_header-row_xjuzf_1bftv_395",
|
|
30
|
+
"header": "awsui_header_xjuzf_1bftv_395",
|
|
31
|
+
"content": "awsui_content_xjuzf_1bftv_417",
|
|
32
|
+
"content-overflow-visible": "awsui_content-overflow-visible_xjuzf_1bftv_424",
|
|
33
|
+
"container": "awsui_container_xjuzf_1bftv_436",
|
|
34
|
+
"container-arrow": "awsui_container-arrow_xjuzf_1bftv_444",
|
|
35
|
+
"container-arrow-position-right-top": "awsui_container-arrow-position-right-top_xjuzf_1bftv_448",
|
|
36
|
+
"container-arrow-position-right-bottom": "awsui_container-arrow-position-right-bottom_xjuzf_1bftv_448",
|
|
37
|
+
"container-arrow-position-left-top": "awsui_container-arrow-position-left-top_xjuzf_1bftv_460",
|
|
38
|
+
"container-arrow-position-left-bottom": "awsui_container-arrow-position-left-bottom_xjuzf_1bftv_460",
|
|
39
|
+
"container-arrow-position-top-center": "awsui_container-arrow-position-top-center_xjuzf_1bftv_472",
|
|
40
|
+
"container-arrow-position-top-right": "awsui_container-arrow-position-top-right_xjuzf_1bftv_472",
|
|
41
|
+
"container-arrow-position-top-left": "awsui_container-arrow-position-top-left_xjuzf_1bftv_472",
|
|
42
|
+
"container-arrow-position-top-responsive": "awsui_container-arrow-position-top-responsive_xjuzf_1bftv_472",
|
|
43
|
+
"container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-center_xjuzf_1bftv_488",
|
|
44
|
+
"container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-right_xjuzf_1bftv_492",
|
|
45
|
+
"container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-left_xjuzf_1bftv_496",
|
|
46
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_xjuzf_1bftv_1",
|
|
47
|
+
"refresh": "awsui_refresh_xjuzf_1bftv_614",
|
|
48
|
+
"root": "awsui_root_xjuzf_1bftv_636",
|
|
49
|
+
"trigger": "awsui_trigger_xjuzf_1bftv_648",
|
|
50
|
+
"trigger-type-text": "awsui_trigger-type-text_xjuzf_1bftv_655",
|
|
51
|
+
"trigger-inner-text": "awsui_trigger-inner-text_xjuzf_1bftv_684"
|
|
52
52
|
};
|
|
53
53
|
|
|
@@ -182,11 +182,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
182
182
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
183
183
|
SPDX-License-Identifier: Apache-2.0
|
|
184
184
|
*/
|
|
185
|
-
.
|
|
185
|
+
.awsui_arrow_xjuzf_1bftv_185:not(#\9) {
|
|
186
186
|
width: 20px;
|
|
187
187
|
height: 10px;
|
|
188
188
|
}
|
|
189
|
-
.awsui_arrow-
|
|
189
|
+
.awsui_arrow-outer_xjuzf_1bftv_189:not(#\9), .awsui_arrow-inner_xjuzf_1bftv_189:not(#\9) {
|
|
190
190
|
position: absolute;
|
|
191
191
|
overflow: hidden;
|
|
192
192
|
width: 20px;
|
|
@@ -194,7 +194,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
194
194
|
top: 0;
|
|
195
195
|
left: 0;
|
|
196
196
|
}
|
|
197
|
-
.awsui_arrow-
|
|
197
|
+
.awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after, .awsui_arrow-inner_xjuzf_1bftv_189:not(#\9)::after {
|
|
198
198
|
content: "";
|
|
199
199
|
box-sizing: border-box;
|
|
200
200
|
display: inline-block;
|
|
@@ -207,26 +207,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
207
207
|
transform: rotate(45deg);
|
|
208
208
|
transform-origin: 0 100%;
|
|
209
209
|
}
|
|
210
|
-
.awsui_arrow-
|
|
210
|
+
.awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after {
|
|
211
211
|
background-color: var(--color-border-popover-5pygk7, #9ba7b6);
|
|
212
212
|
}
|
|
213
|
-
.awsui_arrow-
|
|
213
|
+
.awsui_arrow-inner_xjuzf_1bftv_189:not(#\9) {
|
|
214
214
|
top: 2px;
|
|
215
215
|
}
|
|
216
|
-
.awsui_arrow-
|
|
216
|
+
.awsui_arrow-inner_xjuzf_1bftv_189:not(#\9)::after {
|
|
217
217
|
border-radius: 1px 0 0 0;
|
|
218
218
|
background-color: var(--color-background-popover-mn5o9k, #ffffff);
|
|
219
219
|
}
|
|
220
|
-
.awsui_arrow-position-right-
|
|
220
|
+
.awsui_arrow-position-right-top_xjuzf_1bftv_220 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after, .awsui_arrow-position-right-bottom_xjuzf_1bftv_220 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after {
|
|
221
221
|
box-shadow: -0.71px 0.71px 4px -2px var(--color-shadow-default-3se70f, rgba(0, 7, 22, 0.12));
|
|
222
222
|
}
|
|
223
|
-
.awsui_arrow-position-left-
|
|
223
|
+
.awsui_arrow-position-left-top_xjuzf_1bftv_223 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after, .awsui_arrow-position-left-bottom_xjuzf_1bftv_223 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after {
|
|
224
224
|
box-shadow: 0.71px -0.71px 4px -2px var(--color-shadow-default-3se70f, rgba(0, 7, 22, 0.12));
|
|
225
225
|
}
|
|
226
|
-
.awsui_arrow-position-top-
|
|
226
|
+
.awsui_arrow-position-top-center_xjuzf_1bftv_226 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after, .awsui_arrow-position-top-right_xjuzf_1bftv_226 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after, .awsui_arrow-position-top-left_xjuzf_1bftv_226 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after, .awsui_arrow-position-top-responsive_xjuzf_1bftv_226 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after {
|
|
227
227
|
box-shadow: -0.71px -0.71px 4px -2px var(--color-shadow-default-3se70f, rgba(0, 7, 22, 0.12));
|
|
228
228
|
}
|
|
229
|
-
.awsui_arrow-position-bottom-
|
|
229
|
+
.awsui_arrow-position-bottom-center_xjuzf_1bftv_229 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after, .awsui_arrow-position-bottom-right_xjuzf_1bftv_229 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after, .awsui_arrow-position-bottom-left_xjuzf_1bftv_229 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after, .awsui_arrow-position-bottom-responsive_xjuzf_1bftv_229 > .awsui_arrow-outer_xjuzf_1bftv_189:not(#\9)::after {
|
|
230
230
|
box-shadow: 0.71px 0.71px 4px -2px var(--color-shadow-default-3se70f, rgba(0, 7, 22, 0.12));
|
|
231
231
|
}
|
|
232
232
|
|
|
@@ -322,7 +322,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
322
322
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
323
323
|
SPDX-License-Identifier: Apache-2.0
|
|
324
324
|
*/
|
|
325
|
-
.
|
|
325
|
+
.awsui_body_xjuzf_1bftv_325:not(#\9) {
|
|
326
326
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
327
327
|
border-collapse: separate;
|
|
328
328
|
border-spacing: 0;
|
|
@@ -367,57 +367,62 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
367
367
|
box-shadow: var(--shadow-popover-kzy6rd, 0px 4px 20px 1px rgba(0, 7, 22, 0.1));
|
|
368
368
|
border: var(--border-field-width-idlekx, 2px) solid var(--color-border-popover-5pygk7, #9ba7b6);
|
|
369
369
|
}
|
|
370
|
-
.awsui_body-overflow-
|
|
370
|
+
.awsui_body-overflow-visible_xjuzf_1bftv_344:not(#\9) {
|
|
371
371
|
overflow: visible;
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
-
.awsui_variant-
|
|
374
|
+
.awsui_variant-annotation_xjuzf_1bftv_348:not(#\9) {
|
|
375
375
|
background-color: var(--color-background-status-info-usb30e, #f2f8fd);
|
|
376
376
|
border-color: var(--color-border-status-info-546i7i, #0972d3);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
.awsui_body-size-
|
|
379
|
+
.awsui_body-size-small_xjuzf_1bftv_353:not(#\9) {
|
|
380
380
|
max-width: 210px;
|
|
381
381
|
}
|
|
382
|
-
.awsui_body-size-
|
|
382
|
+
.awsui_body-size-small_xjuzf_1bftv_353.awsui_fixed-width_xjuzf_1bftv_356:not(#\9) {
|
|
383
383
|
width: 210px;
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
.awsui_body-size-
|
|
386
|
+
.awsui_body-size-medium_xjuzf_1bftv_360:not(#\9) {
|
|
387
387
|
max-width: 310px;
|
|
388
388
|
}
|
|
389
|
-
.awsui_body-size-
|
|
389
|
+
.awsui_body-size-medium_xjuzf_1bftv_360.awsui_fixed-width_xjuzf_1bftv_356:not(#\9) {
|
|
390
390
|
width: 310px;
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
.awsui_body-size-
|
|
393
|
+
.awsui_body-size-large_xjuzf_1bftv_367:not(#\9) {
|
|
394
394
|
max-width: 480px;
|
|
395
395
|
}
|
|
396
|
-
|
|
396
|
+
@media (max-width: 480px) {
|
|
397
|
+
.awsui_body-size-large_xjuzf_1bftv_367:not(#\9) {
|
|
398
|
+
max-width: 310px;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
.awsui_body-size-large_xjuzf_1bftv_367.awsui_fixed-width_xjuzf_1bftv_356:not(#\9) {
|
|
397
402
|
width: 480px;
|
|
398
403
|
}
|
|
399
404
|
|
|
400
|
-
.awsui_has-
|
|
405
|
+
.awsui_has-dismiss_xjuzf_1bftv_379:not(#\9) {
|
|
401
406
|
display: flex;
|
|
402
407
|
align-items: baseline;
|
|
403
408
|
}
|
|
404
409
|
|
|
405
|
-
.
|
|
410
|
+
.awsui_dismiss_xjuzf_1bftv_384:not(#\9) {
|
|
406
411
|
margin: calc(-1 * (var(--space-scaled-xxs-95dhkm, 4px) + var(--border-field-width-idlekx, 2px))) calc(-1 * (var(--space-xxs-ynfts5, 4px) + var(--border-field-width-idlekx, 2px)));
|
|
407
412
|
margin-left: 0;
|
|
408
413
|
flex: 0 0 auto;
|
|
409
414
|
order: 1;
|
|
410
415
|
}
|
|
411
416
|
|
|
412
|
-
.awsui_dismiss-
|
|
417
|
+
.awsui_dismiss-control_xjuzf_1bftv_391:not(#\9) {
|
|
413
418
|
/* used in test-utils */
|
|
414
419
|
}
|
|
415
420
|
|
|
416
|
-
.awsui_header-
|
|
421
|
+
.awsui_header-row_xjuzf_1bftv_395:not(#\9) {
|
|
417
422
|
margin-bottom: var(--space-xs-rsr2qu, 8px);
|
|
418
423
|
}
|
|
419
424
|
|
|
420
|
-
.
|
|
425
|
+
.awsui_header_xjuzf_1bftv_395:not(#\9) {
|
|
421
426
|
word-wrap: break-word;
|
|
422
427
|
max-width: 100%;
|
|
423
428
|
overflow: hidden;
|
|
@@ -428,21 +433,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
428
433
|
/* stylelint-disable selector-max-type */
|
|
429
434
|
/* stylelint-enable selector-max-type */
|
|
430
435
|
}
|
|
431
|
-
.
|
|
436
|
+
.awsui_header_xjuzf_1bftv_395 > h2:not(#\9) {
|
|
432
437
|
font-size: var(--font-heading-xs-size-fryxro, 14px);
|
|
433
438
|
line-height: var(--font-heading-xs-line-height-5x131j, 18px);
|
|
434
439
|
font-weight: var(--font-heading-xs-weight-wwznty, 800);
|
|
435
440
|
display: inline;
|
|
436
441
|
}
|
|
437
442
|
|
|
438
|
-
.
|
|
443
|
+
.awsui_content_xjuzf_1bftv_417:not(#\9) {
|
|
439
444
|
word-wrap: break-word;
|
|
440
445
|
max-width: 100%;
|
|
441
446
|
overflow: hidden;
|
|
442
447
|
color: var(--color-text-body-secondary-fdstdf, #414d5c);
|
|
443
448
|
flex: 1 1 auto;
|
|
444
449
|
}
|
|
445
|
-
.awsui_content-overflow-
|
|
450
|
+
.awsui_content-overflow-visible_xjuzf_1bftv_424:not(#\9) {
|
|
446
451
|
overflow: visible;
|
|
447
452
|
}
|
|
448
453
|
|
|
@@ -454,7 +459,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
454
459
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
455
460
|
SPDX-License-Identifier: Apache-2.0
|
|
456
461
|
*/
|
|
457
|
-
.
|
|
462
|
+
.awsui_container_xjuzf_1bftv_436:not(#\9) {
|
|
458
463
|
display: inline-block;
|
|
459
464
|
position: fixed;
|
|
460
465
|
top: -9999px;
|
|
@@ -462,59 +467,59 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
462
467
|
z-index: 2000;
|
|
463
468
|
}
|
|
464
469
|
|
|
465
|
-
.awsui_container-
|
|
470
|
+
.awsui_container-arrow_xjuzf_1bftv_444:not(#\9) {
|
|
466
471
|
position: absolute;
|
|
467
472
|
display: inline-block;
|
|
468
473
|
}
|
|
469
|
-
.awsui_container-arrow-position-right-
|
|
474
|
+
.awsui_container-arrow-position-right-top_xjuzf_1bftv_448:not(#\9), .awsui_container-arrow-position-right-bottom_xjuzf_1bftv_448:not(#\9) {
|
|
470
475
|
transform: rotate(-90deg);
|
|
471
476
|
transform-origin: 0 100%;
|
|
472
477
|
}
|
|
473
|
-
.awsui_container-arrow-position-right-
|
|
478
|
+
.awsui_container-arrow-position-right-top_xjuzf_1bftv_448:not(#\9) {
|
|
474
479
|
top: calc(12px + 10px);
|
|
475
480
|
left: 0;
|
|
476
481
|
}
|
|
477
|
-
.awsui_container-arrow-position-right-
|
|
482
|
+
.awsui_container-arrow-position-right-bottom_xjuzf_1bftv_448:not(#\9) {
|
|
478
483
|
bottom: 12px;
|
|
479
484
|
left: 0;
|
|
480
485
|
}
|
|
481
|
-
.awsui_container-arrow-position-left-
|
|
486
|
+
.awsui_container-arrow-position-left-top_xjuzf_1bftv_460:not(#\9), .awsui_container-arrow-position-left-bottom_xjuzf_1bftv_460:not(#\9) {
|
|
482
487
|
transform: rotate(90deg);
|
|
483
488
|
transform-origin: 100% 100%;
|
|
484
489
|
}
|
|
485
|
-
.awsui_container-arrow-position-left-
|
|
490
|
+
.awsui_container-arrow-position-left-top_xjuzf_1bftv_460:not(#\9) {
|
|
486
491
|
top: calc(12px + 10px);
|
|
487
492
|
right: 0;
|
|
488
493
|
}
|
|
489
|
-
.awsui_container-arrow-position-left-
|
|
494
|
+
.awsui_container-arrow-position-left-bottom_xjuzf_1bftv_460:not(#\9) {
|
|
490
495
|
bottom: 12px;
|
|
491
496
|
right: 0;
|
|
492
497
|
}
|
|
493
|
-
.awsui_container-arrow-position-top-
|
|
498
|
+
.awsui_container-arrow-position-top-center_xjuzf_1bftv_472:not(#\9), .awsui_container-arrow-position-top-right_xjuzf_1bftv_472:not(#\9), .awsui_container-arrow-position-top-left_xjuzf_1bftv_472:not(#\9), .awsui_container-arrow-position-top-responsive_xjuzf_1bftv_472:not(#\9) {
|
|
494
499
|
transform: rotate(180deg);
|
|
495
500
|
transform-origin: 50% 50%;
|
|
496
501
|
}
|
|
497
|
-
.awsui_container-arrow-position-top-
|
|
502
|
+
.awsui_container-arrow-position-top-center_xjuzf_1bftv_472:not(#\9) {
|
|
498
503
|
bottom: -10px;
|
|
499
504
|
left: calc(50% - 10px);
|
|
500
505
|
}
|
|
501
|
-
.awsui_container-arrow-position-top-
|
|
506
|
+
.awsui_container-arrow-position-top-right_xjuzf_1bftv_472:not(#\9) {
|
|
502
507
|
bottom: -10px;
|
|
503
508
|
left: 12px;
|
|
504
509
|
}
|
|
505
|
-
.awsui_container-arrow-position-top-
|
|
510
|
+
.awsui_container-arrow-position-top-left_xjuzf_1bftv_472:not(#\9) {
|
|
506
511
|
bottom: -10px;
|
|
507
512
|
left: calc(100% - 20px - 12px);
|
|
508
513
|
}
|
|
509
|
-
.awsui_container-arrow-position-bottom-
|
|
514
|
+
.awsui_container-arrow-position-bottom-center_xjuzf_1bftv_488:not(#\9) {
|
|
510
515
|
top: -10px;
|
|
511
516
|
left: calc(50% - 10px);
|
|
512
517
|
}
|
|
513
|
-
.awsui_container-arrow-position-bottom-
|
|
518
|
+
.awsui_container-arrow-position-bottom-right_xjuzf_1bftv_492:not(#\9) {
|
|
514
519
|
top: -10px;
|
|
515
520
|
left: 12px;
|
|
516
521
|
}
|
|
517
|
-
.awsui_container-arrow-position-bottom-
|
|
522
|
+
.awsui_container-arrow-position-bottom-left_xjuzf_1bftv_496:not(#\9) {
|
|
518
523
|
top: -10px;
|
|
519
524
|
left: calc(100% - 20px - 12px);
|
|
520
525
|
}
|
|
@@ -611,10 +616,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
611
616
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
612
617
|
SPDX-License-Identifier: Apache-2.0
|
|
613
618
|
*/
|
|
614
|
-
.
|
|
615
|
-
animation: awsui_awsui-motion-fade-
|
|
619
|
+
.awsui_container_xjuzf_1bftv_436:not(#\9) {
|
|
620
|
+
animation: awsui_awsui-motion-fade-in_xjuzf_1bftv_1 var(--motion-duration-show-paced-7wspqf, 180ms) var(--motion-easing-show-paced-wj4ybn, ease-out);
|
|
616
621
|
}
|
|
617
|
-
@keyframes awsui_awsui-motion-fade-
|
|
622
|
+
@keyframes awsui_awsui-motion-fade-in_xjuzf_1bftv_1 {
|
|
618
623
|
from {
|
|
619
624
|
opacity: 0.2;
|
|
620
625
|
}
|
|
@@ -623,19 +628,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
623
628
|
}
|
|
624
629
|
}
|
|
625
630
|
@media (prefers-reduced-motion: reduce) {
|
|
626
|
-
.
|
|
631
|
+
.awsui_container_xjuzf_1bftv_436:not(#\9) {
|
|
627
632
|
animation: none;
|
|
628
633
|
transition: none;
|
|
629
634
|
}
|
|
630
635
|
}
|
|
631
|
-
.awsui-motion-disabled .
|
|
636
|
+
.awsui-motion-disabled .awsui_container_xjuzf_1bftv_436:not(#\9), .awsui-mode-entering .awsui_container_xjuzf_1bftv_436:not(#\9) {
|
|
632
637
|
animation: none;
|
|
633
638
|
transition: none;
|
|
634
639
|
}
|
|
635
|
-
.
|
|
636
|
-
animation: awsui_awsui-motion-fade-
|
|
640
|
+
.awsui_container_xjuzf_1bftv_436.awsui_refresh_xjuzf_1bftv_614:not(#\9) {
|
|
641
|
+
animation: awsui_awsui-motion-fade-in_xjuzf_1bftv_1 var(--motion-duration-refresh-only-fast-addxjd, 115ms) var(--motion-easing-refresh-only-a-sy0g8m, cubic-bezier(0, 0, 0, 1));
|
|
637
642
|
}
|
|
638
|
-
@keyframes awsui_awsui-motion-fade-
|
|
643
|
+
@keyframes awsui_awsui-motion-fade-in_xjuzf_1bftv_1 {
|
|
639
644
|
from {
|
|
640
645
|
opacity: 0.2;
|
|
641
646
|
}
|
|
@@ -644,17 +649,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
644
649
|
}
|
|
645
650
|
}
|
|
646
651
|
@media (prefers-reduced-motion: reduce) {
|
|
647
|
-
.
|
|
652
|
+
.awsui_container_xjuzf_1bftv_436.awsui_refresh_xjuzf_1bftv_614:not(#\9) {
|
|
648
653
|
animation: none;
|
|
649
654
|
transition: none;
|
|
650
655
|
}
|
|
651
656
|
}
|
|
652
|
-
.awsui-motion-disabled .
|
|
657
|
+
.awsui-motion-disabled .awsui_container_xjuzf_1bftv_436.awsui_refresh_xjuzf_1bftv_614:not(#\9), .awsui-mode-entering .awsui_container_xjuzf_1bftv_436.awsui_refresh_xjuzf_1bftv_614:not(#\9) {
|
|
653
658
|
animation: none;
|
|
654
659
|
transition: none;
|
|
655
660
|
}
|
|
656
661
|
|
|
657
|
-
.
|
|
662
|
+
.awsui_root_xjuzf_1bftv_636:not(#\9) {
|
|
658
663
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
659
664
|
border-collapse: separate;
|
|
660
665
|
border-spacing: 0;
|
|
@@ -692,14 +697,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
692
697
|
color: inherit;
|
|
693
698
|
}
|
|
694
699
|
|
|
695
|
-
.
|
|
700
|
+
.awsui_trigger_xjuzf_1bftv_648:not(#\9) {
|
|
696
701
|
display: inline-block;
|
|
697
702
|
max-width: 100%;
|
|
698
703
|
color: inherit;
|
|
699
704
|
text-align: inherit;
|
|
700
705
|
}
|
|
701
706
|
|
|
702
|
-
.awsui_trigger-type-
|
|
707
|
+
.awsui_trigger-type-text_xjuzf_1bftv_655:not(#\9) {
|
|
703
708
|
border: 0;
|
|
704
709
|
margin: 0;
|
|
705
710
|
padding: 0;
|
|
@@ -707,17 +712,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
707
712
|
cursor: pointer;
|
|
708
713
|
border-bottom: var(--border-divider-list-width-hacikr, 1px) dashed currentColor;
|
|
709
714
|
}
|
|
710
|
-
.awsui_trigger-type-
|
|
715
|
+
.awsui_trigger-type-text_xjuzf_1bftv_655:not(#\9):focus {
|
|
711
716
|
outline: none;
|
|
712
717
|
}
|
|
713
|
-
.awsui_trigger-type-
|
|
718
|
+
.awsui_trigger-type-text_xjuzf_1bftv_655[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
714
719
|
position: relative;
|
|
715
720
|
}
|
|
716
|
-
.awsui_trigger-type-
|
|
721
|
+
.awsui_trigger-type-text_xjuzf_1bftv_655[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
717
722
|
outline: 2px dotted transparent;
|
|
718
723
|
outline-offset: calc(1px - 1px);
|
|
719
724
|
}
|
|
720
|
-
.awsui_trigger-type-
|
|
725
|
+
.awsui_trigger-type-text_xjuzf_1bftv_655[data-awsui-focus-visible=true]:not(#\9):focus::before {
|
|
721
726
|
content: " ";
|
|
722
727
|
display: block;
|
|
723
728
|
position: absolute;
|
|
@@ -728,6 +733,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
728
733
|
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
729
734
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
730
735
|
}
|
|
731
|
-
.awsui_trigger-type-
|
|
736
|
+
.awsui_trigger-type-text_xjuzf_1bftv_655 > .awsui_trigger-inner-text_xjuzf_1bftv_684:not(#\9) {
|
|
732
737
|
position: relative;
|
|
733
738
|
}
|