@cloudscape-design/components 3.0.557 → 3.0.559
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/autosuggest/options-controller.js +9 -7
- package/autosuggest/options-controller.js.map +1 -1
- package/button-dropdown/category-elements/category-element.d.ts +1 -1
- package/button-dropdown/category-elements/category-element.d.ts.map +1 -1
- package/button-dropdown/category-elements/category-element.js +2 -2
- package/button-dropdown/category-elements/category-element.js.map +1 -1
- package/button-dropdown/category-elements/expandable-category-element.d.ts +1 -1
- package/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
- package/button-dropdown/category-elements/expandable-category-element.js +3 -3
- package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.js +2 -2
- package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
- package/button-dropdown/category-elements/styles.css.js +14 -13
- package/button-dropdown/category-elements/styles.scoped.css +27 -23
- package/button-dropdown/category-elements/styles.selectors.js +14 -13
- package/button-dropdown/interfaces.d.ts +4 -1
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-dropdown/internal.d.ts.map +1 -1
- package/button-dropdown/internal.js +2 -2
- package/button-dropdown/internal.js.map +1 -1
- package/button-dropdown/item-element/index.d.ts +1 -1
- package/button-dropdown/item-element/index.d.ts.map +1 -1
- package/button-dropdown/item-element/index.js +3 -2
- package/button-dropdown/item-element/index.js.map +1 -1
- package/button-dropdown/item-element/styles.css.js +16 -15
- package/button-dropdown/item-element/styles.scoped.css +18 -18
- package/button-dropdown/item-element/styles.selectors.js +16 -15
- package/button-dropdown/items-list.d.ts +1 -1
- package/button-dropdown/items-list.d.ts.map +1 -1
- package/button-dropdown/items-list.js +6 -4
- package/button-dropdown/items-list.js.map +1 -1
- package/internal/components/dropdown/index.js +1 -1
- package/internal/components/dropdown/index.js.map +1 -1
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +44 -42
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/options-list/index.d.ts +1 -1
- package/internal/components/options-list/index.d.ts.map +1 -1
- package/internal/components/options-list/index.js +2 -2
- package/internal/components/options-list/index.js.map +1 -1
- package/internal/components/options-list/styles.css.js +2 -2
- package/internal/components/options-list/styles.scoped.css +3 -3
- package/internal/components/options-list/styles.selectors.js +2 -2
- package/internal/components/options-list/utils/test-indexes.d.ts.map +1 -1
- package/internal/components/options-list/utils/test-indexes.js +18 -16
- package/internal/components/options-list/utils/test-indexes.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/global-flags.d.ts +2 -2
- package/internal/utils/global-flags.d.ts.map +1 -1
- package/internal/utils/global-flags.js +7 -5
- package/internal/utils/global-flags.js.map +1 -1
- package/package.json +1 -1
- package/test-utils/dom/internal/dropdown-host.d.ts +10 -0
- package/test-utils/dom/internal/dropdown-host.js +14 -0
- package/test-utils/dom/internal/dropdown-host.js.map +1 -1
- package/test-utils/selectors/internal/dropdown-host.d.ts +10 -0
- package/test-utils/selectors/internal/dropdown-host.js +14 -0
- package/test-utils/selectors/internal/dropdown-host.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM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AA,EAC5F,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAC7B;gBAEF,oBAAC,iBAAiB,IAChB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,GAAG,EAClB,eAAe,EAAE,eAAe,EAChC,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,yBAAyB,EAAE,yBAAyB,EACpD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,iBAAiB,EACrB,IAAI,EAAE,mBAAmB,EACzB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,IAE/B,QAAQ,CACS;gBAEpB,oBAAC,OAAO,IACN,iBAAiB,EAAE,GAAG,EAAE,WAAC,OAAA,UAAU,CAAC,OAAO,KAAI,MAAA,iBAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAA,CAAA,EAAA,EAC7F,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAC7B,CACE,CACP,CACU,CACK,CAChB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CACzB,QAAqD,EACf,EAAE,CAAE,QAAqC,CAAC,MAAM,KAAK,SAAS,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport {\n DropdownPosition,\n InteriorDropdownPosition,\n calculatePosition,\n defaultMaxDropdownWidth,\n hasEnoughSpaceToStretchBeyondTriggerWidth,\n} from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\nimport { useUniqueId } from '../../hooks/use-unique-id/index.js';\nimport customCssProps from '../../generated/custom-css-properties';\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\nimport { nodeBelongs } from '../../utils/node-belongs';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n referrerId?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, referrerId, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(\n <div id={id} data-awsui-referrer-id={referrerId}>\n {children}\n </div>,\n document.body\n );\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n stretchBeyondTriggerWidth?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n id?: string;\n role?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n stretchBeyondTriggerWidth,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n id,\n role,\n ariaLabelledby,\n ariaDescribedby,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-upper-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n [styles['stretch-beyond-trigger-width']]: stretchBeyondTriggerWidth,\n })}\n ref={contentRef}\n id={id}\n role={role}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n style={\n stretchBeyondTriggerWidth ? { [customCssProps.dropdownDefaultMaxWidth]: `${defaultMaxDropdownWidth}px` } : {}\n }\n onMouseDown={onMouseDown}\n >\n <div\n className={clsx(\n styles['dropdown-content-wrapper'],\n !header && !children && styles['is-empty'],\n isRefresh && styles.refresh\n )}\n >\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n stretchBeyondTriggerWidth = false,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n dropdownContentId,\n dropdownContentRole,\n ariaLabelledby,\n ariaDescribedby,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !nodeBelongs(wrapperRef.current, element)) &&\n (!dropdownContainerRef.current || !nodeBelongs(dropdownContainerRef.current, element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n // Prevent the dropdown width from stretching beyond the trigger width\n // if that is going to cause the dropdown to be cropped because of overflow\n const fixStretching = () => {\n const classNameToRemove = styles['stretch-beyond-trigger-width'];\n if (\n open &&\n stretchBeyondTriggerWidth &&\n dropdownRef.current &&\n triggerRef.current &&\n dropdownRef.current.classList.contains(classNameToRemove) &&\n !hasEnoughSpaceToStretchBeyondTriggerWidth({\n triggerElement: triggerRef.current,\n dropdownElement: dropdownRef.current,\n desiredMinWidth: minWidth,\n expandToViewport,\n stretchWidth,\n stretchHeight,\n isMobile,\n })\n ) {\n dropdownRef.current.classList.remove(classNameToRemove);\n }\n };\n\n useResizeObserver(() => dropdownRef.current, fixStretching);\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth,\n stretchBeyondTriggerWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!nodeBelongs(dropdownRef.current, e.target) && !nodeBelongs(triggerRef.current, e.target)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n window.addEventListener('click', clickListener, true);\n\n return () => {\n window.removeEventListener('click', clickListener, true);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n const referrerId = useUniqueId();\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div id={referrerId} className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer\n renderWithPortal={expandToViewport && !interior}\n id={dropdownId}\n referrerId={referrerId}\n open={open}\n >\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n stretchBeyondTriggerWidth={stretchBeyondTriggerWidth}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n id={dropdownContentId}\n role={dropdownContentRole}\n ariaLabelledby={ariaLabelledby}\n ariaDescribedby={ariaDescribedby}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAGL,iBAAiB,EACjB,uBAAuB,EACvB,yCAAyC,GAC1C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAgC,MAAM,WAAW,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,cAAc,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EA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O,CAAC,0CAAE,KAAK,EAAE,CAAA,CAAA,EAAA,EAC7F,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAC7B,CACE,CACP,CACU,CACK,CAChB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CACzB,QAAqD,EACf,EAAE,CAAE,QAAqC,CAAC,MAAM,KAAK,SAAS,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport {\n DropdownPosition,\n InteriorDropdownPosition,\n calculatePosition,\n defaultMaxDropdownWidth,\n hasEnoughSpaceToStretchBeyondTriggerWidth,\n} from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\nimport { useUniqueId } from '../../hooks/use-unique-id/index.js';\nimport customCssProps from '../../generated/custom-css-properties';\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\nimport { nodeBelongs } from '../../utils/node-belongs';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n referrerId?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, referrerId, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(\n <div id={id} data-awsui-referrer-id={referrerId}>\n {children}\n </div>,\n document.body\n );\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n stretchBeyondTriggerWidth?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n id?: string;\n role?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n stretchBeyondTriggerWidth,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n id,\n role,\n ariaLabelledby,\n ariaDescribedby,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-block-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n [styles['stretch-beyond-trigger-width']]: stretchBeyondTriggerWidth,\n })}\n ref={contentRef}\n id={id}\n role={role}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n style={\n stretchBeyondTriggerWidth ? { [customCssProps.dropdownDefaultMaxWidth]: `${defaultMaxDropdownWidth}px` } : {}\n }\n onMouseDown={onMouseDown}\n >\n <div\n className={clsx(\n styles['dropdown-content-wrapper'],\n !header && !children && styles['is-empty'],\n isRefresh && styles.refresh\n )}\n >\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n stretchBeyondTriggerWidth = false,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n dropdownContentId,\n dropdownContentRole,\n ariaLabelledby,\n ariaDescribedby,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !nodeBelongs(wrapperRef.current, element)) &&\n (!dropdownContainerRef.current || !nodeBelongs(dropdownContainerRef.current, element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n // Prevent the dropdown width from stretching beyond the trigger width\n // if that is going to cause the dropdown to be cropped because of overflow\n const fixStretching = () => {\n const classNameToRemove = styles['stretch-beyond-trigger-width'];\n if (\n open &&\n stretchBeyondTriggerWidth &&\n dropdownRef.current &&\n triggerRef.current &&\n dropdownRef.current.classList.contains(classNameToRemove) &&\n !hasEnoughSpaceToStretchBeyondTriggerWidth({\n triggerElement: triggerRef.current,\n dropdownElement: dropdownRef.current,\n desiredMinWidth: minWidth,\n expandToViewport,\n stretchWidth,\n stretchHeight,\n isMobile,\n })\n ) {\n dropdownRef.current.classList.remove(classNameToRemove);\n }\n };\n\n useResizeObserver(() => dropdownRef.current, fixStretching);\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth,\n stretchBeyondTriggerWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!nodeBelongs(dropdownRef.current, e.target) && !nodeBelongs(triggerRef.current, e.target)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n window.addEventListener('click', clickListener, true);\n\n return () => {\n window.removeEventListener('click', clickListener, true);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n const referrerId = useUniqueId();\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div id={referrerId} className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer\n renderWithPortal={expandToViewport && !interior}\n id={dropdownId}\n referrerId={referrerId}\n open={open}\n >\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n stretchBeyondTriggerWidth={stretchBeyondTriggerWidth}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n id={dropdownContentId}\n role={dropdownContentRole}\n ariaLabelledby={ariaLabelledby}\n ariaDescribedby={ariaDescribedby}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"dropdown-content-wrapper": "awsui_dropdown-content-
|
|
5
|
-
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-
|
|
6
|
-
"refresh": "
|
|
7
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
8
|
-
"root": "
|
|
9
|
-
"interior": "
|
|
10
|
-
"dropdown": "
|
|
11
|
-
"use-portal": "awsui_use-
|
|
12
|
-
"is-empty": "awsui_is-
|
|
13
|
-
"dropdown-drop-up": "awsui_dropdown-drop-
|
|
14
|
-
"with-limited-width": "awsui_with-limited-
|
|
15
|
-
"dropdown-drop-left": "awsui_dropdown-drop-
|
|
16
|
-
"dropdown-drop-right": "awsui_dropdown-drop-
|
|
17
|
-
"occupy-entire-width": "awsui_occupy-entire-
|
|
18
|
-
"stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-
|
|
19
|
-
"hide-
|
|
20
|
-
"open": "
|
|
21
|
-
"nowrap": "
|
|
22
|
-
"dropdown-content": "awsui_dropdown-
|
|
23
|
-
"stretch-trigger-height": "awsui_stretch-trigger-
|
|
4
|
+
"dropdown-content-wrapper": "awsui_dropdown-content-wrapper_qwoo0_1ea5w_99",
|
|
5
|
+
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-dropdown_qwoo0_1ea5w_1",
|
|
6
|
+
"refresh": "awsui_refresh_qwoo0_1ea5w_120",
|
|
7
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_qwoo0_1ea5w_1",
|
|
8
|
+
"root": "awsui_root_qwoo0_1ea5w_149",
|
|
9
|
+
"interior": "awsui_interior_qwoo0_1ea5w_185",
|
|
10
|
+
"dropdown": "awsui_dropdown_qwoo0_1ea5w_99",
|
|
11
|
+
"use-portal": "awsui_use-portal_qwoo0_1ea5w_196",
|
|
12
|
+
"is-empty": "awsui_is-empty_qwoo0_1ea5w_248",
|
|
13
|
+
"dropdown-drop-up": "awsui_dropdown-drop-up_qwoo0_1ea5w_255",
|
|
14
|
+
"with-limited-width": "awsui_with-limited-width_qwoo0_1ea5w_259",
|
|
15
|
+
"dropdown-drop-left": "awsui_dropdown-drop-left_qwoo0_1ea5w_262",
|
|
16
|
+
"dropdown-drop-right": "awsui_dropdown-drop-right_qwoo0_1ea5w_268",
|
|
17
|
+
"occupy-entire-width": "awsui_occupy-entire-width_qwoo0_1ea5w_274",
|
|
18
|
+
"stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-width_qwoo0_1ea5w_277",
|
|
19
|
+
"hide-block-border": "awsui_hide-block-border_qwoo0_1ea5w_281",
|
|
20
|
+
"open": "awsui_open_qwoo0_1ea5w_287",
|
|
21
|
+
"nowrap": "awsui_nowrap_qwoo0_1ea5w_296",
|
|
22
|
+
"dropdown-content": "awsui_dropdown-content_qwoo0_1ea5w_99",
|
|
23
|
+
"stretch-trigger-height": "awsui_stretch-trigger-height_qwoo0_1ea5w_307"
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -96,10 +96,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
96
96
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
97
97
|
SPDX-License-Identifier: Apache-2.0
|
|
98
98
|
*/
|
|
99
|
-
.awsui_dropdown-content-
|
|
100
|
-
animation: awsui_awsui-motion-fade-in-
|
|
99
|
+
.awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
100
|
+
animation: awsui_awsui-motion-fade-in-dropdown_qwoo0_1ea5w_1 var(--motion-duration-show-quick-aq3ump, 135ms) var(--motion-easing-show-quick-vc5zgd, ease-out);
|
|
101
101
|
}
|
|
102
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
102
|
+
@keyframes awsui_awsui-motion-fade-in-dropdown_qwoo0_1ea5w_1 {
|
|
103
103
|
from {
|
|
104
104
|
opacity: 0.4;
|
|
105
105
|
}
|
|
@@ -108,22 +108,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
@media (prefers-reduced-motion: reduce) {
|
|
111
|
-
.awsui_dropdown-content-
|
|
111
|
+
.awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
112
112
|
animation: none;
|
|
113
113
|
transition: none;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
.awsui-motion-disabled .awsui_dropdown-content-
|
|
116
|
+
.awsui-motion-disabled .awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9), .awsui-mode-entering .awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
117
117
|
animation: none;
|
|
118
118
|
transition: none;
|
|
119
119
|
}
|
|
120
|
-
.awsui_dropdown-content-
|
|
120
|
+
.awsui_dropdown-content-wrapper_qwoo0_1ea5w_99.awsui_refresh_qwoo0_1ea5w_120:not(#\9) {
|
|
121
121
|
transform-origin: top;
|
|
122
|
-
animation-name: awsui_awsui-motion-fade-in-
|
|
122
|
+
animation-name: awsui_awsui-motion-fade-in-0_qwoo0_1ea5w_1;
|
|
123
123
|
animation-duration: var(--motion-duration-show-quick-aq3ump, 135ms);
|
|
124
124
|
animation-timing-function: var(--motion-easing-show-quick-vc5zgd, ease-out);
|
|
125
125
|
}
|
|
126
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
126
|
+
@keyframes awsui_awsui-motion-fade-in-0_qwoo0_1ea5w_1 {
|
|
127
127
|
from {
|
|
128
128
|
opacity: 0;
|
|
129
129
|
}
|
|
@@ -132,12 +132,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
@media (prefers-reduced-motion: reduce) {
|
|
135
|
-
.awsui_dropdown-content-
|
|
135
|
+
.awsui_dropdown-content-wrapper_qwoo0_1ea5w_99.awsui_refresh_qwoo0_1ea5w_120:not(#\9) {
|
|
136
136
|
animation: none;
|
|
137
137
|
transition: none;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
.awsui-motion-disabled .awsui_dropdown-content-
|
|
140
|
+
.awsui-motion-disabled .awsui_dropdown-content-wrapper_qwoo0_1ea5w_99.awsui_refresh_qwoo0_1ea5w_120:not(#\9), .awsui-mode-entering .awsui_dropdown-content-wrapper_qwoo0_1ea5w_99.awsui_refresh_qwoo0_1ea5w_120:not(#\9) {
|
|
141
141
|
animation: none;
|
|
142
142
|
transition: none;
|
|
143
143
|
}
|
|
@@ -146,7 +146,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
146
146
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
147
147
|
SPDX-License-Identifier: Apache-2.0
|
|
148
148
|
*/
|
|
149
|
-
.
|
|
149
|
+
.awsui_root_qwoo0_1ea5w_149:not(#\9) {
|
|
150
150
|
border-collapse: separate;
|
|
151
151
|
border-spacing: 0;
|
|
152
152
|
box-sizing: border-box;
|
|
@@ -183,11 +183,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
183
183
|
position: relative;
|
|
184
184
|
white-space: inherit;
|
|
185
185
|
}
|
|
186
|
-
.
|
|
186
|
+
.awsui_root_qwoo0_1ea5w_149.awsui_interior_qwoo0_1ea5w_185:not(#\9) {
|
|
187
187
|
position: static;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
.
|
|
190
|
+
.awsui_dropdown_qwoo0_1ea5w_99:not(#\9) {
|
|
191
191
|
position: absolute;
|
|
192
192
|
display: none;
|
|
193
193
|
z-index: 2000;
|
|
@@ -195,24 +195,24 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
195
195
|
user-select: none;
|
|
196
196
|
transform-origin: top;
|
|
197
197
|
}
|
|
198
|
-
.
|
|
198
|
+
.awsui_dropdown_qwoo0_1ea5w_99.awsui_use-portal_qwoo0_1ea5w_196:not(#\9) {
|
|
199
199
|
z-index: 7000;
|
|
200
200
|
}
|
|
201
|
-
.
|
|
201
|
+
.awsui_dropdown_qwoo0_1ea5w_99:not(#\9):not(.awsui_interior_qwoo0_1ea5w_185) {
|
|
202
202
|
transform: translateY(0px);
|
|
203
203
|
transition: transform var(--motion-duration-show-quick-aq3ump, 135ms);
|
|
204
204
|
}
|
|
205
205
|
@media (prefers-reduced-motion: reduce) {
|
|
206
|
-
.
|
|
206
|
+
.awsui_dropdown_qwoo0_1ea5w_99:not(#\9):not(.awsui_interior_qwoo0_1ea5w_185) {
|
|
207
207
|
animation: none;
|
|
208
208
|
transition: none;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
.awsui-motion-disabled .
|
|
211
|
+
.awsui-motion-disabled .awsui_dropdown_qwoo0_1ea5w_99:not(#\9):not(.awsui_interior_qwoo0_1ea5w_185), .awsui-mode-entering .awsui_dropdown_qwoo0_1ea5w_99:not(#\9):not(.awsui_interior_qwoo0_1ea5w_185) {
|
|
212
212
|
animation: none;
|
|
213
213
|
transition: none;
|
|
214
214
|
}
|
|
215
|
-
.awsui_dropdown-content-
|
|
215
|
+
.awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
216
216
|
position: relative;
|
|
217
217
|
background-color: var(--color-background-dropdown-item-default-be16w5, #ffffff);
|
|
218
218
|
outline: none;
|
|
@@ -221,16 +221,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
221
221
|
border-start-end-radius: var(--border-radius-dropdown-0dhh79, 8px);
|
|
222
222
|
border-end-start-radius: var(--border-radius-dropdown-0dhh79, 8px);
|
|
223
223
|
border-end-end-radius: var(--border-radius-dropdown-0dhh79, 8px);
|
|
224
|
-
border-block
|
|
224
|
+
border-block: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-container-top-736buh, transparent);
|
|
225
225
|
box-sizing: border-box;
|
|
226
|
-
border-block-end: none;
|
|
227
226
|
}
|
|
228
|
-
.awsui_dropdown-content-
|
|
227
|
+
.awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9)::after {
|
|
229
228
|
content: "";
|
|
230
229
|
position: absolute;
|
|
231
230
|
z-index: 1;
|
|
232
231
|
inset-block-start: -1px;
|
|
233
|
-
inset-block-end:
|
|
232
|
+
inset-block-end: -1px;
|
|
234
233
|
inset-inline-start: 0px;
|
|
235
234
|
inset-inline-end: 0px;
|
|
236
235
|
background-color: transparent;
|
|
@@ -243,67 +242,70 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
243
242
|
pointer-events: none;
|
|
244
243
|
}
|
|
245
244
|
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
246
|
-
.awsui_dropdown-content-
|
|
245
|
+
.awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
247
246
|
border-block: var(--border-field-width-09w7vk, 2px) solid var(--color-border-container-top-736buh, transparent);
|
|
248
247
|
border-inline: var(--border-field-width-09w7vk, 2px) solid var(--color-border-container-top-736buh, transparent);
|
|
249
248
|
}
|
|
250
249
|
}
|
|
251
|
-
.awsui_dropdown-content-
|
|
250
|
+
.awsui_dropdown-content-wrapper_qwoo0_1ea5w_99.awsui_is-empty_qwoo0_1ea5w_248:not(#\9)::after {
|
|
252
251
|
display: none;
|
|
253
252
|
}
|
|
254
|
-
.
|
|
253
|
+
.awsui_dropdown_qwoo0_1ea5w_99 > .awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
254
|
+
border-block-start: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-container-top-736buh, transparent);
|
|
255
|
+
border-block-end: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-dropdown-group-yakmix, #b6bec9);
|
|
256
|
+
}
|
|
257
|
+
.awsui_dropdown-drop-up_qwoo0_1ea5w_255 > .awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
255
258
|
transform-origin: bottom;
|
|
256
259
|
box-shadow: var(--shadow-dropup-xqkiza, 0px 4px 20px 1px rgba(0, 7, 22, 0.1));
|
|
257
260
|
}
|
|
258
|
-
.awsui_dropdown-drop-
|
|
261
|
+
.awsui_dropdown-drop-up_qwoo0_1ea5w_255.awsui_with-limited-width_qwoo0_1ea5w_259 > .awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
259
262
|
border-block-start: none;
|
|
260
263
|
}
|
|
261
|
-
.awsui_dropdown-drop-
|
|
264
|
+
.awsui_dropdown-drop-left_qwoo0_1ea5w_262:not(#\9) {
|
|
262
265
|
inset-inline-end: 0;
|
|
263
266
|
}
|
|
264
|
-
.awsui_dropdown-drop-
|
|
267
|
+
.awsui_dropdown-drop-left_qwoo0_1ea5w_262:not(#\9):dir(rtl) {
|
|
265
268
|
inset-inline-end: unset;
|
|
266
269
|
}
|
|
267
|
-
.awsui_dropdown-drop-
|
|
270
|
+
.awsui_dropdown-drop-right_qwoo0_1ea5w_268:not(#\9) {
|
|
268
271
|
inset-inline-start: 0;
|
|
269
272
|
}
|
|
270
|
-
.awsui_dropdown-drop-
|
|
273
|
+
.awsui_dropdown-drop-right_qwoo0_1ea5w_268:not(#\9):dir(rtl) {
|
|
271
274
|
inset-inline-start: unset;
|
|
272
275
|
}
|
|
273
|
-
.
|
|
276
|
+
.awsui_dropdown_qwoo0_1ea5w_99.awsui_occupy-entire-width_qwoo0_1ea5w_274:not(#\9) {
|
|
274
277
|
min-inline-size: 100%;
|
|
275
278
|
}
|
|
276
|
-
.
|
|
279
|
+
.awsui_dropdown_qwoo0_1ea5w_99.awsui_stretch-beyond-trigger-width_qwoo0_1ea5w_277:not(#\9) {
|
|
277
280
|
inline-size: max-content;
|
|
278
281
|
max-inline-size: var(--awsui-dropdown-default-max-width-iof9y8, 100%);
|
|
279
282
|
}
|
|
280
|
-
.
|
|
281
|
-
border-block
|
|
283
|
+
.awsui_dropdown_qwoo0_1ea5w_99.awsui_hide-block-border_qwoo0_1ea5w_281 > .awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
284
|
+
border-block: none;
|
|
282
285
|
}
|
|
283
|
-
.
|
|
286
|
+
.awsui_dropdown_qwoo0_1ea5w_99.awsui_interior_qwoo0_1ea5w_185 > .awsui_dropdown-content-wrapper_qwoo0_1ea5w_99:not(#\9) {
|
|
284
287
|
margin-block-start: -1px;
|
|
285
|
-
border-block-start: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-container-top-736buh, transparent);
|
|
286
288
|
}
|
|
287
|
-
.
|
|
289
|
+
.awsui_dropdown_qwoo0_1ea5w_99.awsui_open_qwoo0_1ea5w_287:not(#\9) {
|
|
288
290
|
display: block;
|
|
289
291
|
}
|
|
290
|
-
.
|
|
292
|
+
.awsui_dropdown_qwoo0_1ea5w_99.awsui_open_qwoo0_1ea5w_287:not(#\9):not(.awsui_interior_qwoo0_1ea5w_185).awsui_refresh_qwoo0_1ea5w_120[data-animating=true] {
|
|
291
293
|
transform: translateY(4px);
|
|
292
294
|
}
|
|
293
|
-
.
|
|
295
|
+
.awsui_dropdown_qwoo0_1ea5w_99.awsui_open_qwoo0_1ea5w_287:not(#\9):not(.awsui_interior_qwoo0_1ea5w_185).awsui_refresh_qwoo0_1ea5w_120[data-animating=true].awsui_dropdown-drop-up_qwoo0_1ea5w_255 {
|
|
294
296
|
transform: translateY(-4px);
|
|
295
297
|
}
|
|
296
|
-
.
|
|
298
|
+
.awsui_dropdown_qwoo0_1ea5w_99.awsui_open_qwoo0_1ea5w_287.awsui_nowrap_qwoo0_1ea5w_296:not(#\9) {
|
|
297
299
|
white-space: nowrap;
|
|
298
300
|
overflow: scroll;
|
|
299
301
|
}
|
|
300
302
|
|
|
301
|
-
.awsui_dropdown-
|
|
303
|
+
.awsui_dropdown-content_qwoo0_1ea5w_99:not(#\9) {
|
|
302
304
|
display: flex;
|
|
303
305
|
flex-direction: column;
|
|
304
306
|
inline-size: 100%;
|
|
305
307
|
}
|
|
306
308
|
|
|
307
|
-
.awsui_stretch-trigger-
|
|
309
|
+
.awsui_stretch-trigger-height_qwoo0_1ea5w_307:not(#\9) {
|
|
308
310
|
block-size: 100%;
|
|
309
311
|
}
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"dropdown-content-wrapper": "awsui_dropdown-content-
|
|
6
|
-
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-
|
|
7
|
-
"refresh": "
|
|
8
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
9
|
-
"root": "
|
|
10
|
-
"interior": "
|
|
11
|
-
"dropdown": "
|
|
12
|
-
"use-portal": "awsui_use-
|
|
13
|
-
"is-empty": "awsui_is-
|
|
14
|
-
"dropdown-drop-up": "awsui_dropdown-drop-
|
|
15
|
-
"with-limited-width": "awsui_with-limited-
|
|
16
|
-
"dropdown-drop-left": "awsui_dropdown-drop-
|
|
17
|
-
"dropdown-drop-right": "awsui_dropdown-drop-
|
|
18
|
-
"occupy-entire-width": "awsui_occupy-entire-
|
|
19
|
-
"stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-
|
|
20
|
-
"hide-
|
|
21
|
-
"open": "
|
|
22
|
-
"nowrap": "
|
|
23
|
-
"dropdown-content": "awsui_dropdown-
|
|
24
|
-
"stretch-trigger-height": "awsui_stretch-trigger-
|
|
5
|
+
"dropdown-content-wrapper": "awsui_dropdown-content-wrapper_qwoo0_1ea5w_99",
|
|
6
|
+
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-dropdown_qwoo0_1ea5w_1",
|
|
7
|
+
"refresh": "awsui_refresh_qwoo0_1ea5w_120",
|
|
8
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_qwoo0_1ea5w_1",
|
|
9
|
+
"root": "awsui_root_qwoo0_1ea5w_149",
|
|
10
|
+
"interior": "awsui_interior_qwoo0_1ea5w_185",
|
|
11
|
+
"dropdown": "awsui_dropdown_qwoo0_1ea5w_99",
|
|
12
|
+
"use-portal": "awsui_use-portal_qwoo0_1ea5w_196",
|
|
13
|
+
"is-empty": "awsui_is-empty_qwoo0_1ea5w_248",
|
|
14
|
+
"dropdown-drop-up": "awsui_dropdown-drop-up_qwoo0_1ea5w_255",
|
|
15
|
+
"with-limited-width": "awsui_with-limited-width_qwoo0_1ea5w_259",
|
|
16
|
+
"dropdown-drop-left": "awsui_dropdown-drop-left_qwoo0_1ea5w_262",
|
|
17
|
+
"dropdown-drop-right": "awsui_dropdown-drop-right_qwoo0_1ea5w_268",
|
|
18
|
+
"occupy-entire-width": "awsui_occupy-entire-width_qwoo0_1ea5w_274",
|
|
19
|
+
"stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-width_qwoo0_1ea5w_277",
|
|
20
|
+
"hide-block-border": "awsui_hide-block-border_qwoo0_1ea5w_281",
|
|
21
|
+
"open": "awsui_open_qwoo0_1ea5w_287",
|
|
22
|
+
"nowrap": "awsui_nowrap_qwoo0_1ea5w_296",
|
|
23
|
+
"dropdown-content": "awsui_dropdown-content_qwoo0_1ea5w_99",
|
|
24
|
+
"stretch-trigger-height": "awsui_stretch-trigger-height_qwoo0_1ea5w_307"
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -26,7 +26,7 @@ export interface OptionsListProps extends BaseComponentProps {
|
|
|
26
26
|
ariaLabel?: string;
|
|
27
27
|
ariaLabelledby?: string;
|
|
28
28
|
ariaDescribedby?: string;
|
|
29
|
-
|
|
29
|
+
decreaseBlockMargin?: boolean;
|
|
30
30
|
}
|
|
31
31
|
declare const _default: React.ForwardRefExoticComponent<OptionsListProps & React.RefAttributes<HTMLUListElement>>;
|
|
32
32
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/options-list/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAEL,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EAEd,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,mBAAmB,CAA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K,CAAC,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC;;OAEG;IACH,UAAU,CAAC,EAAE,yBAAyB,CAAC;IACvC,SAAS,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IAClD,MAAM,CAAC,EAAE,yBAAyB,CAAC;QAAE,aAAa,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IACnE,OAAO,CAAC,EAAE,yBAAyB,CAAC;IACpC,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;;AAqFD,wBAA6C"}
|
|
@@ -16,7 +16,7 @@ const getItemIndex = (containerRef, event) => {
|
|
|
16
16
|
return mouseTarget ? parseInt(mouseTarget) : -1;
|
|
17
17
|
};
|
|
18
18
|
const OptionsList = (_a, ref) => {
|
|
19
|
-
var { open, statusType, children, nativeAttributes = {}, onKeyDown, onBlur, onFocus, onLoadMore, onMouseUp, onMouseMove, position = 'relative', role = 'listbox',
|
|
19
|
+
var { open, statusType, children, nativeAttributes = {}, onKeyDown, onBlur, onFocus, onLoadMore, onMouseUp, onMouseMove, position = 'relative', role = 'listbox', decreaseBlockMargin = false, ariaLabel, ariaLabelledby, ariaDescribedby } = _a, restProps = __rest(_a, ["open", "statusType", "children", "nativeAttributes", "onKeyDown", "onBlur", "onFocus", "onLoadMore", "onMouseUp", "onMouseMove", "position", "role", "decreaseBlockMargin", "ariaLabel", "ariaLabelledby", "ariaDescribedby"]);
|
|
20
20
|
const baseProps = getBaseProps(restProps);
|
|
21
21
|
const menuRef = useRef(null);
|
|
22
22
|
const handleScroll = useStableCallback(() => {
|
|
@@ -35,7 +35,7 @@ const OptionsList = (_a, ref) => {
|
|
|
35
35
|
}
|
|
36
36
|
}, [open, statusType, handleScroll]);
|
|
37
37
|
const className = clsx(styles['options-list'], {
|
|
38
|
-
[styles['decrease-
|
|
38
|
+
[styles['decrease-block-margin']]: decreaseBlockMargin,
|
|
39
39
|
});
|
|
40
40
|
const mergedRef = useMergeRefs(ref, menuRef);
|
|
41
41
|
return (React.createElement("ul", Object.assign({}, baseProps, nativeAttributes, { className: className, ref: mergedRef, style: { position }, role: role, onScroll: handleScroll, onKeyDown: event => onKeyDown && fireKeyboardEvent(onKeyDown, event), onMouseMove: event => onMouseMove === null || onMouseMove === void 0 ? void 0 : onMouseMove(getItemIndex(menuRef, event)), onMouseUp: event => onMouseUp === null || onMouseUp === void 0 ? void 0 : onMouseUp(getItemIndex(menuRef, event)), onBlur: event => fireNonCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }), onFocus: () => fireNonCancelableEvent(onFocus), tabIndex: -1, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby }), open && children));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/options-list/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EACL,sBAAsB,EAItB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AA2BlF,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,YAAY,GAAG,CAAC,YAA0C,EAAE,KAAuB,EAAE,EAAE;IAC3F,MAAM,MAAM,GAAG,WAAW,CACxB,KAAK,CAAC,MAAqB,EAC3B,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAC7E,CAAC;IACF,MAAM,WAAW,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,WAAW,CAAC;IAChD,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAClB,EAkBmB,EACnB,GAAgC,EAChC,EAAE;QApBF,EACE,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,gBAAgB,GAAG,EAAE,EACrB,SAAS,EACT,MAAM,EACN,OAAO,EACP,UAAU,EACV,SAAS,EACT,WAAW,EACX,QAAQ,GAAG,UAAU,EACrB,IAAI,GAAG,SAAS,EAChB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/options-list/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CA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EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,EACvF,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAC9C,QAAQ,EAAE,CAAC,CAAC,gBACA,SAAS,qBACJ,cAAc,sBACb,eAAe,KAEhC,IAAI,IAAI,QAAQ,CACd,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useRef } from 'react';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport {\n fireNonCancelableEvent,\n NonCancelableEventHandler,\n CancelableEventHandler,\n BaseKeyDetail,\n fireKeyboardEvent,\n} from '../../events';\nimport { findUpUntil } from '../../utils/dom';\nimport styles from './styles.css.js';\nimport { DropdownStatusProps } from '../dropdown-status';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nexport interface OptionsListProps extends BaseComponentProps {\n open?: boolean;\n statusType: DropdownStatusProps.StatusType;\n /**\n * Options list\n */\n children: React.ReactNode;\n nativeAttributes?: Record<string, any>;\n /**\n * Called when more items need to be loaded.\n */\n onLoadMore?: NonCancelableEventHandler;\n onKeyDown?: CancelableEventHandler<BaseKeyDetail>;\n onBlur?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n onFocus?: NonCancelableEventHandler;\n onMouseUp?: (itemIndex: number) => void;\n onMouseMove?: (itemIndex: number) => void;\n position?: React.CSSProperties['position'];\n role?: 'listbox' | 'list' | 'menu';\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n decreaseBlockMargin?: boolean;\n}\n\nconst BOTTOM_TRIGGER_OFFSET = 80;\n\nconst getItemIndex = (containerRef: React.RefObject<HTMLElement>, event: React.MouseEvent) => {\n const target = findUpUntil(\n event.target as HTMLElement,\n element => element === containerRef.current || !!element.dataset.mouseTarget\n );\n const mouseTarget = target?.dataset.mouseTarget;\n return mouseTarget ? parseInt(mouseTarget) : -1;\n};\n\nconst OptionsList = (\n {\n open,\n statusType,\n children,\n nativeAttributes = {},\n onKeyDown,\n onBlur,\n onFocus,\n onLoadMore,\n onMouseUp,\n onMouseMove,\n position = 'relative',\n role = 'listbox',\n decreaseBlockMargin = false,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n ...restProps\n }: OptionsListProps,\n ref: React.Ref<HTMLUListElement>\n) => {\n const baseProps = getBaseProps(restProps);\n const menuRef = useRef<HTMLUListElement>(null);\n\n const handleScroll = useStableCallback(() => {\n const scrollContainer = menuRef?.current;\n if (scrollContainer) {\n const bottomEdgePosition = scrollContainer.scrollTop + scrollContainer.clientHeight;\n const remainingScrollHeight = scrollContainer.scrollHeight - bottomEdgePosition;\n if (remainingScrollHeight < BOTTOM_TRIGGER_OFFSET) {\n fireNonCancelableEvent(onLoadMore);\n }\n }\n });\n\n useEffect(() => {\n if (open && statusType === 'pending') {\n handleScroll();\n }\n }, [open, statusType, handleScroll]);\n\n const className = clsx(styles['options-list'], {\n [styles['decrease-block-margin']]: decreaseBlockMargin,\n });\n\n const mergedRef = useMergeRefs(ref, menuRef);\n\n return (\n <ul\n {...baseProps}\n {...nativeAttributes}\n className={className}\n ref={mergedRef}\n style={{ position }}\n role={role}\n onScroll={handleScroll}\n onKeyDown={event => onKeyDown && fireKeyboardEvent(onKeyDown, event)}\n onMouseMove={event => onMouseMove?.(getItemIndex(menuRef, event))}\n onMouseUp={event => onMouseUp?.(getItemIndex(menuRef, event))}\n onBlur={event => fireNonCancelableEvent(onBlur, { relatedTarget: event.relatedTarget })}\n onFocus={() => fireNonCancelableEvent(onFocus)}\n tabIndex={-1}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n >\n {open && children}\n </ul>\n );\n};\n\nexport default React.forwardRef(OptionsList);\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"options-list": "awsui_options-
|
|
5
|
-
"decrease-
|
|
4
|
+
"options-list": "awsui_options-list_19gcf_halkh_99",
|
|
5
|
+
"decrease-block-margin": "awsui_decrease-block-margin_19gcf_halkh_149"
|
|
6
6
|
};
|
|
7
7
|
|
|
@@ -96,7 +96,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
96
96
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
97
97
|
SPDX-License-Identifier: Apache-2.0
|
|
98
98
|
*/
|
|
99
|
-
.awsui_options-
|
|
99
|
+
.awsui_options-list_19gcf_halkh_99:not(#\9) {
|
|
100
100
|
padding-block: 0;
|
|
101
101
|
padding-inline: 0;
|
|
102
102
|
margin-block: 0;
|
|
@@ -147,6 +147,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
147
147
|
border-end-end-radius: var(--border-radius-dropdown-0dhh79, 8px);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.awsui_decrease-
|
|
151
|
-
margin-block
|
|
150
|
+
.awsui_decrease-block-margin_19gcf_halkh_149:not(#\9) {
|
|
151
|
+
margin-block: -1px;
|
|
152
152
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"options-list": "awsui_options-
|
|
6
|
-
"decrease-
|
|
5
|
+
"options-list": "awsui_options-list_19gcf_halkh_99",
|
|
6
|
+
"decrease-block-margin": "awsui_decrease-block-margin_19gcf_halkh_149"
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-indexes.d.ts","sourceRoot":"lib/default/","sources":["internal/components/options-list/utils/test-indexes.ts"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,UAAU,WAAW;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAGD,eAAO,MAAM,oBAAoB,0DAA0D,CAAC;AAC5F,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"test-indexes.d.ts","sourceRoot":"lib/default/","sources":["internal/components/options-list/utils/test-indexes.ts"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,UAAU,WAAW;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAGD,eAAO,MAAM,oBAAoB,0DAA0D,CAAC;AAC5F,eAAO,MAAM,mBAAmB,iIA4B/B,CAAC"}
|