@cloudscape-design/components 3.0.872 → 3.0.874
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/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js +4 -4
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js.map +1 -1
- package/button-group/item-element.js +4 -4
- package/button-group/item-element.js.map +1 -1
- package/code-editor/resizable-box/index.js +4 -4
- package/code-editor/resizable-box/index.js.map +1 -1
- package/container/use-sticky-header.js +4 -4
- package/container/use-sticky-header.js.map +1 -1
- package/file-dropzone/use-files-dragging.d.ts.map +1 -1
- package/file-dropzone/use-files-dragging.js +5 -6
- package/file-dropzone/use-files-dragging.js.map +1 -1
- package/form-field/styles.css.js +24 -24
- package/form-field/styles.scoped.css +40 -38
- package/form-field/styles.selectors.js +24 -24
- package/internal/analytics/components/analytics-funnel.js +4 -4
- package/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/internal/animate.js +1 -1
- package/internal/animate.js.map +1 -1
- package/internal/components/chart-plot/focus-outline.js +4 -4
- package/internal/components/chart-plot/focus-outline.js.map +1 -1
- package/internal/components/dropdown/index.js +4 -4
- package/internal/components/dropdown/index.js.map +1 -1
- package/internal/components/transition/index.js +4 -4
- package/internal/components/transition/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/focus-tracker.d.ts +1 -0
- package/internal/focus-tracker.d.ts.map +1 -1
- package/internal/focus-tracker.js +4 -4
- package/internal/focus-tracker.js.map +1 -1
- package/internal/hooks/use-mouse-down-target.js +4 -4
- package/internal/hooks/use-mouse-down-target.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/popover/container.d.ts.map +1 -1
- package/popover/container.js +5 -6
- package/popover/container.js.map +1 -1
- package/table/resizer/index.d.ts.map +1 -1
- package/table/resizer/index.js +5 -6
- package/table/resizer/index.js.map +1 -1
- package/table/table-role/grid-navigation.js +5 -6
- package/table/table-role/grid-navigation.js.map +1 -1
- package/test-utils/dom/index.d.ts +78 -78
- package/test-utils/dom/index.js +9 -3
- package/test-utils/dom/index.js.map +1 -1
- package/test-utils/selectors/index.d.ts +78 -78
- package/test-utils/selectors/index.js +5 -1
- package/test-utils/selectors/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
|
@@ -84,11 +84,11 @@ function TriggerButton({ ariaLabel, className, iconName, iconSvg, ariaExpanded,
|
|
|
84
84
|
};
|
|
85
85
|
const wrapperDiv = containerRef.current;
|
|
86
86
|
if (wrapperDiv) {
|
|
87
|
-
|
|
88
|
-
wrapperDiv.addEventListener('
|
|
87
|
+
const controller = new AbortController();
|
|
88
|
+
wrapperDiv.addEventListener('pointerdown', handlePointerDownEvent, { signal: controller.signal });
|
|
89
|
+
wrapperDiv.addEventListener('keydown', handleKeyDownEvent, { signal: controller.signal });
|
|
89
90
|
return () => {
|
|
90
|
-
|
|
91
|
-
wrapperDiv.removeEventListener('keydown', handleKeyDownEvent);
|
|
91
|
+
controller.abort();
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtF,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,OAAO,IAAI,MAAM,2BAA2B,CAAC;AAC7C,OAAO,OAAO,MAAM,yCAAyC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,cAAc,MAAM,qCAAqC,CAAC;AACjE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoDrC,SAAS,aAA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IAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,CAAC,iBAAiB,CAAC,GAAI,CACvG,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { ButtonProps } from '../../../../button/interfaces';\nimport { IconProps } from '../../../../icon/interfaces';\nimport Icon from '../../../../icon/internal';\nimport Tooltip from '../../../../internal/components/tooltip';\nimport { registerTooltip } from '../../../../internal/components/tooltip/registry';\n\nimport testutilStyles from '../../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface TriggerButtonProps {\n ariaLabel?: string;\n className?: string;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n ariaExpanded: boolean | undefined;\n ariaControls?: string;\n disabled?: boolean;\n /**\n * Ovewrwrites any internal testIds when provided\n */\n testId?: string;\n /**\n * If button is selected. Used only for desktop and applies a selected class\n */\n selected?: boolean;\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n\n badge?: boolean;\n /**\n * If the button is expected to have a tooltip. When false it will not set the event listeners\n *\n * defaults to false\n */\n hasTooltip?: boolean;\n /**\n * This text allows for a customized tooltip.\n *\n * When falsy, the tooltip will parse the tooltip form the aria-lable\n */\n tooltipText?: string;\n hasOpenDrawer?: boolean;\n /**\n * If the AppLayout is in mobile mode\n * Used to determine if and where to render tooltips\n */\n isMobile?: boolean;\n /**\n * set to true if the trigger button was used to open the last active drawer\n * this is also used to hide the tooltip should the focus be set programmatically\n * on focus from a drawer close using this\n */\n isForPreviousActiveDrawer?: boolean;\n /**\n * if the trigger button is for the split panel\n */\n isForSplitPanel?: boolean;\n tabIndex?: number | undefined;\n}\n\nfunction TriggerButton(\n {\n ariaLabel,\n className,\n iconName,\n iconSvg,\n ariaExpanded,\n ariaControls,\n onClick,\n testId,\n disabled = false,\n badge,\n selected = false,\n hasTooltip = false,\n tooltipText,\n hasOpenDrawer = false,\n isMobile = false,\n isForPreviousActiveDrawer = false,\n isForSplitPanel = false,\n }: TriggerButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n) {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const tooltipValue = tooltipText ? tooltipText : ariaLabel ? ariaLabel : '';\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\n const [suppressTooltip, setSupressTooltip] = useState<boolean>(false);\n\n const handleTriggerClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation(); // Stop the event from propagating to the badge icon\n setShowTooltip(false);\n setSupressTooltip(true);\n onClick(event);\n };\n\n const handleBlur = (keepSupressed = false) => {\n setSupressTooltip(keepSupressed);\n setShowTooltip(false);\n };\n\n const handlePointerEnter = () => {\n setSupressTooltip(false);\n setShowTooltip(true);\n };\n\n /**\n * Takes the drawer being closed and the data-shift-focus value from a close button on that drawer that persists\n * on the event relatedTarget to determine not to show the tooltip\n * @param event\n */\n const handleOnFocus = useCallback(\n (event: FocusEvent) => {\n let shouldShowTooltip = false;\n const eventWithRelatedTarget = event as any;\n const relatedTarget = eventWithRelatedTarget?.relatedTarget;\n const isFromAnotherTrigger = relatedTarget?.dataset?.shiftFocus === 'awsui-layout-drawer-trigger';\n if (\n (isForSplitPanel && !!relatedTarget) || // relatedTarget is null when split panel is closed\n (!isForSplitPanel &&\n (isFromAnotherTrigger || // for key navigation from another trigger button\n !isForPreviousActiveDrawer)) // for when the drawer was not opened recently\n ) {\n shouldShowTooltip = true;\n }\n setSupressTooltip(!shouldShowTooltip);\n setShowTooltip(true);\n },\n [\n // To assert reference equality check\n isForPreviousActiveDrawer,\n isForSplitPanel,\n ]\n );\n\n const tooltipVisible = useMemo(() => {\n return (\n hasTooltip &&\n showTooltip &&\n !suppressTooltip &&\n !!containerRef?.current &&\n tooltipValue &&\n !(isMobile && hasOpenDrawer)\n );\n }, [hasTooltip, showTooltip, containerRef, tooltipValue, isMobile, hasOpenDrawer, suppressTooltip]);\n\n useEffect(() => {\n if (hasTooltip && tooltipValue) {\n const close = () => {\n setShowTooltip(false);\n setSupressTooltip(false);\n };\n\n const shouldCloseTooltip = (event: PointerEvent) => {\n if (event.target && containerRef && (containerRef.current as any)?.contains(event.target as HTMLElement)) {\n return false;\n }\n return true;\n };\n\n const handlePointerDownEvent = (event: PointerEvent) => {\n if (shouldCloseTooltip(event)) {\n close();\n }\n };\n\n const handleKeyDownEvent = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n close();\n }\n };\n\n const wrapperDiv = containerRef.current;\n if (wrapperDiv) {\n wrapperDiv.addEventListener('pointerdown', handlePointerDownEvent);\n wrapperDiv.addEventListener('keydown', handleKeyDownEvent);\n\n return () => {\n wrapperDiv.removeEventListener('pointerdown', handlePointerDownEvent);\n wrapperDiv.removeEventListener('keydown', handleKeyDownEvent);\n };\n }\n }\n }, [containerRef, hasTooltip, tooltipValue]);\n\n useEffect(() => {\n if (tooltipVisible) {\n return registerTooltip(() => {\n setShowTooltip(false);\n setSupressTooltip(false);\n });\n }\n }, [tooltipVisible]);\n\n return (\n <div\n ref={containerRef}\n {...(hasTooltip && {\n onPointerEnter: () => handlePointerEnter(),\n onPointerLeave: () => handleBlur(true),\n onFocus: e => handleOnFocus(e as any),\n onBlur: () => handleBlur(true),\n })}\n className={styles['trigger-wrapper']}\n >\n <button\n aria-expanded={ariaExpanded}\n aria-controls={ariaControls}\n aria-haspopup={true}\n aria-label={ariaLabel}\n aria-disabled={disabled}\n disabled={disabled}\n className={clsx(\n styles.trigger,\n styles['trigger-button-styles'],\n {\n [styles.selected]: selected,\n [styles.badge]: badge,\n [testutilStyles['drawers-trigger-with-badge']]: badge,\n },\n className\n )}\n onClick={handleTriggerClick}\n ref={ref as Ref<HTMLButtonElement>}\n type=\"button\"\n data-testid={testId}\n data-shift-focus=\"awsui-layout-drawer-trigger\"\n >\n <span className={clsx(badge && clsx(styles['trigger-badge-wrapper'], styles['trigger-button-styles']))}>\n {(iconName || iconSvg) && <Icon name={iconName} svg={iconSvg} />}\n </span>\n </button>\n {badge && <div className={styles.dot} />}\n {tooltipVisible && (\n <Tooltip trackRef={containerRef} value={tooltipValue} className={testutilStyles['trigger-tooltip']} />\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(TriggerButton);\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtF,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,OAAO,IAAI,MAAM,2BAA2B,CAAC;AAC7C,OAAO,OAAO,MAAM,yCAAyC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,cAAc,MAAM,qCAAqC,CAAC;AACjE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoDrC,SAAS,aAAa,CACpB,EACE,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,aAAa,GAAG,KAAK,EACrB,QAAQ,GAAG,KAAK,EAChB,yBAAyB,GAAG,KAAK,EACjC,eAAe,GAAG,KAAK,GACJ,EACrB,GAA+B;IAE/B,MAAM,YAAY,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,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AM,CAAC,iBAAiB,CAAC;QAEpC,iDACiB,YAAY,mBACZ,YAAY,mBACZ,IAAI,gBACP,SAAS,mBACN,QAAQ,EACvB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,uBAAuB,CAAC,EAC/B;gBACE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;gBAC3B,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK;gBACrB,CAAC,cAAc,CAAC,4BAA4B,CAAC,CAAC,EAAE,KAAK;aACtD,EACD,SAAS,CACV,EACD,OAAO,EAAE,kBAAkB,EAC3B,GAAG,EAAE,GAA6B,EAClC,IAAI,EAAC,QAAQ,iBACA,MAAM,sBACF,6BAA6B;YAE9C,8BAAM,SAAS,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,IACnG,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,GAAI,CAC3D,CACA;QACR,KAAK,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG,GAAI;QACvC,cAAc,IAAI,CACjB,oBAAC,OAAO,IAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,CAAC,iBAAiB,CAAC,GAAI,CACvG,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { ButtonProps } from '../../../../button/interfaces';\nimport { IconProps } from '../../../../icon/interfaces';\nimport Icon from '../../../../icon/internal';\nimport Tooltip from '../../../../internal/components/tooltip';\nimport { registerTooltip } from '../../../../internal/components/tooltip/registry';\n\nimport testutilStyles from '../../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface TriggerButtonProps {\n ariaLabel?: string;\n className?: string;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n ariaExpanded: boolean | undefined;\n ariaControls?: string;\n disabled?: boolean;\n /**\n * Ovewrwrites any internal testIds when provided\n */\n testId?: string;\n /**\n * If button is selected. Used only for desktop and applies a selected class\n */\n selected?: boolean;\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n\n badge?: boolean;\n /**\n * If the button is expected to have a tooltip. When false it will not set the event listeners\n *\n * defaults to false\n */\n hasTooltip?: boolean;\n /**\n * This text allows for a customized tooltip.\n *\n * When falsy, the tooltip will parse the tooltip form the aria-lable\n */\n tooltipText?: string;\n hasOpenDrawer?: boolean;\n /**\n * If the AppLayout is in mobile mode\n * Used to determine if and where to render tooltips\n */\n isMobile?: boolean;\n /**\n * set to true if the trigger button was used to open the last active drawer\n * this is also used to hide the tooltip should the focus be set programmatically\n * on focus from a drawer close using this\n */\n isForPreviousActiveDrawer?: boolean;\n /**\n * if the trigger button is for the split panel\n */\n isForSplitPanel?: boolean;\n tabIndex?: number | undefined;\n}\n\nfunction TriggerButton(\n {\n ariaLabel,\n className,\n iconName,\n iconSvg,\n ariaExpanded,\n ariaControls,\n onClick,\n testId,\n disabled = false,\n badge,\n selected = false,\n hasTooltip = false,\n tooltipText,\n hasOpenDrawer = false,\n isMobile = false,\n isForPreviousActiveDrawer = false,\n isForSplitPanel = false,\n }: TriggerButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n) {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const tooltipValue = tooltipText ? tooltipText : ariaLabel ? ariaLabel : '';\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\n const [suppressTooltip, setSupressTooltip] = useState<boolean>(false);\n\n const handleTriggerClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation(); // Stop the event from propagating to the badge icon\n setShowTooltip(false);\n setSupressTooltip(true);\n onClick(event);\n };\n\n const handleBlur = (keepSupressed = false) => {\n setSupressTooltip(keepSupressed);\n setShowTooltip(false);\n };\n\n const handlePointerEnter = () => {\n setSupressTooltip(false);\n setShowTooltip(true);\n };\n\n /**\n * Takes the drawer being closed and the data-shift-focus value from a close button on that drawer that persists\n * on the event relatedTarget to determine not to show the tooltip\n * @param event\n */\n const handleOnFocus = useCallback(\n (event: FocusEvent) => {\n let shouldShowTooltip = false;\n const eventWithRelatedTarget = event as any;\n const relatedTarget = eventWithRelatedTarget?.relatedTarget;\n const isFromAnotherTrigger = relatedTarget?.dataset?.shiftFocus === 'awsui-layout-drawer-trigger';\n if (\n (isForSplitPanel && !!relatedTarget) || // relatedTarget is null when split panel is closed\n (!isForSplitPanel &&\n (isFromAnotherTrigger || // for key navigation from another trigger button\n !isForPreviousActiveDrawer)) // for when the drawer was not opened recently\n ) {\n shouldShowTooltip = true;\n }\n setSupressTooltip(!shouldShowTooltip);\n setShowTooltip(true);\n },\n [\n // To assert reference equality check\n isForPreviousActiveDrawer,\n isForSplitPanel,\n ]\n );\n\n const tooltipVisible = useMemo(() => {\n return (\n hasTooltip &&\n showTooltip &&\n !suppressTooltip &&\n !!containerRef?.current &&\n tooltipValue &&\n !(isMobile && hasOpenDrawer)\n );\n }, [hasTooltip, showTooltip, containerRef, tooltipValue, isMobile, hasOpenDrawer, suppressTooltip]);\n\n useEffect(() => {\n if (hasTooltip && tooltipValue) {\n const close = () => {\n setShowTooltip(false);\n setSupressTooltip(false);\n };\n\n const shouldCloseTooltip = (event: PointerEvent) => {\n if (event.target && containerRef && (containerRef.current as any)?.contains(event.target as HTMLElement)) {\n return false;\n }\n return true;\n };\n\n const handlePointerDownEvent = (event: PointerEvent) => {\n if (shouldCloseTooltip(event)) {\n close();\n }\n };\n\n const handleKeyDownEvent = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n close();\n }\n };\n\n const wrapperDiv = containerRef.current;\n if (wrapperDiv) {\n const controller = new AbortController();\n wrapperDiv.addEventListener('pointerdown', handlePointerDownEvent, { signal: controller.signal });\n wrapperDiv.addEventListener('keydown', handleKeyDownEvent, { signal: controller.signal });\n\n return () => {\n controller.abort();\n };\n }\n }\n }, [containerRef, hasTooltip, tooltipValue]);\n\n useEffect(() => {\n if (tooltipVisible) {\n return registerTooltip(() => {\n setShowTooltip(false);\n setSupressTooltip(false);\n });\n }\n }, [tooltipVisible]);\n\n return (\n <div\n ref={containerRef}\n {...(hasTooltip && {\n onPointerEnter: () => handlePointerEnter(),\n onPointerLeave: () => handleBlur(true),\n onFocus: e => handleOnFocus(e as any),\n onBlur: () => handleBlur(true),\n })}\n className={styles['trigger-wrapper']}\n >\n <button\n aria-expanded={ariaExpanded}\n aria-controls={ariaControls}\n aria-haspopup={true}\n aria-label={ariaLabel}\n aria-disabled={disabled}\n disabled={disabled}\n className={clsx(\n styles.trigger,\n styles['trigger-button-styles'],\n {\n [styles.selected]: selected,\n [styles.badge]: badge,\n [testutilStyles['drawers-trigger-with-badge']]: badge,\n },\n className\n )}\n onClick={handleTriggerClick}\n ref={ref as Ref<HTMLButtonElement>}\n type=\"button\"\n data-testid={testId}\n data-shift-focus=\"awsui-layout-drawer-trigger\"\n >\n <span className={clsx(badge && clsx(styles['trigger-badge-wrapper'], styles['trigger-button-styles']))}>\n {(iconName || iconSvg) && <Icon name={iconName} svg={iconSvg} />}\n </span>\n </button>\n {badge && <div className={styles.dot} />}\n {tooltipVisible && (\n <Tooltip trackRef={containerRef} value={tooltipValue} className={testutilStyles['trigger-tooltip']} />\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(TriggerButton);\n"]}
|
|
@@ -36,11 +36,11 @@ const ItemElement = forwardRef(({ item, dropdownExpandToViewport, tooltip, setTo
|
|
|
36
36
|
close();
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
window.addEventListener('
|
|
39
|
+
const controller = new AbortController();
|
|
40
|
+
window.addEventListener('pointerdown', handlePointerDownEvent, { signal: controller.signal });
|
|
41
|
+
window.addEventListener('keydown', handleKeyDownEvent, { signal: controller.signal });
|
|
41
42
|
return () => {
|
|
42
|
-
|
|
43
|
-
window.removeEventListener('keydown', handleKeyDownEvent);
|
|
43
|
+
controller.abort();
|
|
44
44
|
};
|
|
45
45
|
}, [item.id, tooltip, setTooltip]);
|
|
46
46
|
const onShowTooltipSoft = (show) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-element.js","sourceRoot":"","sources":["../../../src/button-group/item-element.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGlF,OAAO,EAAE,mBAAmB,EAA6B,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAEhE,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAWrC,MAAM,WAAW,GAAG,UAAU,CAC5B,CACE,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAoB,EACrG,GAA+B,EAC/B,EAAE;IACF,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,MAAM,CAAuC,IAAI,CAAC,CAAC;IAEnE,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC9B,KAAK,EAAE,GAAG,EAAE;;YACV,MAAA,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ACV,WAAW,EAAE,cAAc,EAC3B,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,IAAI,CAAC,EAAE,EACtC,YAAY,EAAE,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAA,GACjC,CACH;QACA,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,CAClC,oBAAC,aAAa,IACZ,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,oBAAoB,EACnC,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,IAAI,CAAC,EAAE,GACtC,CACH;QACA,IAAI,CAAC,IAAI,KAAK,eAAe,IAAI,CAChC,oBAAC,gBAAgB,IACf,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,IAAI,CAAC,EAAE,EACtC,WAAW,EAAE,cAAc,EAC3B,gBAAgB,EAAE,wBAAwB,GAC1C,CACH,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport { ButtonProps } from '../button/interfaces.js';\nimport { fireCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport FileInputItem from './file-input-item';\nimport IconButtonItem from './icon-button-item';\nimport IconToggleButtonItem from './icon-toggle-button-item.js';\nimport { ButtonGroupProps } from './interfaces';\nimport MenuDropdownItem from './menu-dropdown-item';\n\nimport styles from './styles.css.js';\n\ninterface ItemElementProps {\n item: ButtonGroupProps.Item;\n dropdownExpandToViewport?: boolean;\n tooltip: null | { item: string; feedback: boolean };\n setTooltip: (tooltip: null | { item: string; feedback: boolean }) => void;\n onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails> | undefined;\n onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails> | undefined;\n}\n\nconst ItemElement = forwardRef(\n (\n { item, dropdownExpandToViewport, tooltip, setTooltip, onItemClick, onFilesChange }: ItemElementProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const itemRef = useRef<HTMLButtonElement | HTMLInputElement>(null);\n\n useImperativeHandle(ref, () => ({\n focus: () => {\n itemRef.current?.focus();\n },\n }));\n\n useEffect(() => {\n if (tooltip?.item !== item.id) {\n return;\n }\n\n const close = () => {\n setTooltip(null);\n };\n\n const handlePointerDownEvent = (event: PointerEvent) => {\n if (event.target && containerRef.current?.contains(event.target as HTMLElement)) {\n return;\n }\n\n close();\n };\n\n const handleKeyDownEvent = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n close();\n }\n };\n\n const controller = new AbortController();\n window.addEventListener('pointerdown', handlePointerDownEvent, { signal: controller.signal });\n window.addEventListener('keydown', handleKeyDownEvent, { signal: controller.signal });\n\n return () => {\n controller.abort();\n };\n }, [item.id, tooltip, setTooltip]);\n\n const onShowTooltipSoft = (show: boolean) => {\n if (!tooltip?.feedback) {\n setTooltip(show ? { item: item.id, feedback: false } : null);\n }\n };\n\n const onShowTooltipHard = (show: boolean) => {\n if (!show && item.id !== tooltip?.item) {\n return;\n }\n\n setTooltip(show ? { item: item.id, feedback: false } : null);\n };\n\n const onClickHandler = (event: CustomEvent<ButtonGroupProps.ItemClickDetails>) => {\n const hasPopoverFeedback = 'popoverFeedback' in item && item.popoverFeedback;\n\n if (hasPopoverFeedback) {\n setTooltip({ item: item.id, feedback: true });\n }\n\n fireCancelableEvent(onItemClick, event.detail, event);\n };\n\n const onFilesChangeHandler = (event: CustomEvent<ButtonGroupProps.FilesChangeDetails>) => {\n fireCancelableEvent(onFilesChange, event.detail, event);\n\n setTooltip(null);\n };\n\n return (\n <div\n key={item.id}\n className={styles['item-wrapper']}\n ref={containerRef}\n onPointerEnter={() => onShowTooltipSoft(true)}\n onPointerLeave={() => onShowTooltipSoft(false)}\n onFocus={event => {\n // Showing no tooltip when the focus comes from inside the container.\n // This is needed to prevent the tooltip after a menu closes with item selection or Escape.\n if (event && event.relatedTarget && nodeBelongs(containerRef.current, event.relatedTarget)) {\n return;\n }\n onShowTooltipHard(true);\n }}\n onBlur={() => onShowTooltipHard(false)}\n >\n {item.type === 'icon-button' && (\n <IconButtonItem\n ref={itemRef}\n item={item}\n onItemClick={onClickHandler}\n showTooltip={tooltip?.item === item.id}\n showFeedback={!!tooltip?.feedback}\n />\n )}\n {item.type === 'icon-toggle-button' && (\n <IconToggleButtonItem\n ref={itemRef}\n item={item}\n onItemClick={onClickHandler}\n showTooltip={tooltip?.item === item.id}\n showFeedback={!!tooltip?.feedback}\n />\n )}\n {item.type === 'icon-file-input' && (\n <FileInputItem\n ref={itemRef}\n item={item}\n onFilesChange={onFilesChangeHandler}\n showTooltip={tooltip?.item === item.id}\n />\n )}\n {item.type === 'menu-dropdown' && (\n <MenuDropdownItem\n ref={itemRef}\n item={item}\n showTooltip={tooltip?.item === item.id}\n onItemClick={onClickHandler}\n expandToViewport={dropdownExpandToViewport}\n />\n )}\n </div>\n );\n }\n);\n\nexport default ItemElement;\n"]}
|
|
@@ -27,12 +27,12 @@ export function ResizableBox({ children, height, minHeight, onResize }) {
|
|
|
27
27
|
const onMouseUp = () => {
|
|
28
28
|
setDragOffset(null);
|
|
29
29
|
};
|
|
30
|
+
const controller = new AbortController();
|
|
30
31
|
document.body.classList.add(styles['resize-active']);
|
|
31
|
-
document.addEventListener('mousemove', onMouseMove);
|
|
32
|
-
document.addEventListener('mouseup', onMouseUp);
|
|
32
|
+
document.addEventListener('mousemove', onMouseMove, { signal: controller.signal });
|
|
33
|
+
document.addEventListener('mouseup', onMouseUp, { signal: controller.signal });
|
|
33
34
|
return () => {
|
|
34
|
-
|
|
35
|
-
document.removeEventListener('mouseup', onMouseUp);
|
|
35
|
+
controller.abort();
|
|
36
36
|
document.body.classList.remove(styles['resize-active']);
|
|
37
37
|
};
|
|
38
38
|
}, [dragOffset, minHeight, onResizeStable]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/code-editor/resizable-box/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AASrC,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAkB;IACpF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAClE,MAAM,cAAc,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,MAAM,WAAW,GAA4B,KAAK,CAAC,EAAE;QACnD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;YAC/C,OAAO;SACR;QACD,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;QAC5E,aAAa,CAAC,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;YAChD,OAAO;SACR;QACD,MAAM,SAAS,GAAG,YAAY,CAA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,CAAC;QAC1D,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAE5C,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE;QAC1E,QAAQ;QACT,8BAAM,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC,EAAE,WAAW,EAAE,WAAW,GAAI,CACzE,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nimport styles from './styles.css.js';\n\nexport interface ResizeBoxProps {\n children: React.ReactNode;\n height: number;\n minHeight: number;\n onResize: (newHeight: number) => void;\n}\n\nexport function ResizableBox({ children, height, minHeight, onResize }: ResizeBoxProps) {\n const [dragOffset, setDragOffset] = useState<null | number>(null);\n const onResizeStable = useStableCallback(onResize);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const onMouseDown: React.MouseEventHandler = event => {\n if (event.button !== 0 || !containerRef.current) {\n return;\n }\n const containerBottom = containerRef.current.getBoundingClientRect().bottom;\n setDragOffset(containerBottom - event.clientY);\n };\n\n useEffect(() => {\n if (dragOffset === null || !containerRef.current) {\n return;\n }\n const container = containerRef.current;\n\n const onMouseMove = (event: MouseEvent) => {\n const { top } = container.getBoundingClientRect();\n const cursor = event.clientY;\n onResizeStable(Math.max(cursor + dragOffset - top, minHeight));\n };\n const onMouseUp = () => {\n setDragOffset(null);\n };\n const controller = new AbortController();\n document.body.classList.add(styles['resize-active']);\n document.addEventListener('mousemove', onMouseMove, { signal: controller.signal });\n document.addEventListener('mouseup', onMouseUp, { signal: controller.signal });\n return () => {\n controller.abort();\n document.body.classList.remove(styles['resize-active']);\n };\n }, [dragOffset, minHeight, onResizeStable]);\n\n return (\n <div ref={containerRef} className={styles['resizable-box']} style={{ height }}>\n {children}\n <span className={styles['resizable-box-handle']} onMouseDown={onMouseDown} />\n </div>\n );\n}\n"]}
|
|
@@ -70,11 +70,11 @@ export const useStickyHeader = (rootRef, headerRef, __stickyHeader, __stickyOffs
|
|
|
70
70
|
}, [rootRef, headerRef]);
|
|
71
71
|
useEffect(() => {
|
|
72
72
|
if (isSticky) {
|
|
73
|
-
|
|
74
|
-
window.addEventListener('
|
|
73
|
+
const controller = new AbortController();
|
|
74
|
+
window.addEventListener('scroll', checkIfStuck, { capture: true, signal: controller.signal });
|
|
75
|
+
window.addEventListener('resize', checkIfStuck, { signal: controller.signal });
|
|
75
76
|
return () => {
|
|
76
|
-
|
|
77
|
-
window.removeEventListener('resize', checkIfStuck);
|
|
77
|
+
controller.abort();
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
}, [isSticky, checkIfStuck]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sticky-header.js","sourceRoot":"","sources":["../../../src/container/use-sticky-header.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAa,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpG,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,KAAK,MAAM,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,UAAU,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAc7E,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,GACC;IACnB,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,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QAAQ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;YAC/E,OAAO,GAAG,EAAE;gBACV,UAAU,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC,CAAC;SACH;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAC7B,OAAO;QACL,QAAQ;QACR,OAAO;QACP,YAAY;KACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createContext, RefObject, useCallback, useEffect, useLayoutEffect, useState } from 'react';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport * as tokens from '../internal/generated/styles/tokens';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport globalVars from '../internal/styles/global-vars';\nimport { getOverflowParents } from '../internal/utils/scrollable-containers';\n\ninterface StickyHeaderContextProps {\n isStuck: boolean;\n}\n\ninterface ComputeOffsetProps {\n isMobile: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n hasInnerOverflowParents: boolean;\n __additionalOffset?: boolean;\n}\n\nexport function computeOffset({\n isMobile,\n __stickyOffset,\n __mobileStickyOffset,\n hasInnerOverflowParents,\n __additionalOffset,\n}: ComputeOffsetProps): string {\n const localOffset = isMobile ? (__stickyOffset ?? 0) - (__mobileStickyOffset ?? 0) : __stickyOffset ?? 0;\n if (hasInnerOverflowParents || __stickyOffset !== undefined) {\n return `${localOffset}px`;\n }\n const globalOffset = `var(${globalVars.stickyVerticalTopOffset}, 0px)`;\n\n return `calc(${globalOffset} + ${localOffset}px + ${__additionalOffset ? tokens.spaceScaledS : '0px'})`;\n}\n\nexport const StickyHeaderContext = createContext<StickyHeaderContextProps>({\n isStuck: false,\n});\n\nexport const useStickyHeader = (\n rootRef: RefObject<HTMLDivElement>,\n headerRef: RefObject<HTMLDivElement>,\n __stickyHeader?: boolean,\n __stickyOffset?: number,\n __mobileStickyOffset?: number,\n __disableMobile?: boolean,\n __additionalOffset = false\n) => {\n const isMobile = useMobile();\n const disableSticky = isMobile && __disableMobile;\n const isSticky = !disableSticky && !!__stickyHeader;\n\n // If it has overflow parents inside the app layout, we shouldn't apply a sticky offset.\n const [hasInnerOverflowParents, setHasInnerOverflowParents] = useState(false);\n const [isStuck, setIsStuck] = useState(false);\n useLayoutEffect(() => {\n if (rootRef.current) {\n const overflowParents = getOverflowParents(rootRef.current);\n const mainElement = findUpUntil(rootRef.current, elem => elem.tagName === 'MAIN');\n // In both versions of the app layout, the scrolling element for disableBodyScroll\n // is the <main>. If the closest overflow parent is also the closest <main> and we have\n // offset values, it's safe to assume that it's the app layout scroll root and we\n // should stop there.\n setHasInnerOverflowParents(overflowParents.length > 0 && overflowParents[0] !== mainElement);\n }\n }, [rootRef]);\n\n const computedOffset = computeOffset({\n isMobile,\n __stickyOffset,\n __mobileStickyOffset,\n hasInnerOverflowParents,\n __additionalOffset,\n });\n\n const stickyStyles = isSticky\n ? {\n style: {\n top: computedOffset,\n },\n }\n : {};\n\n // \"stuck\" state, when the header has moved from its original posititon has a\n // box-shadow, applied here by a \"header-stuck\" className\n const checkIfStuck = useCallback(\n ({ isTrusted, target, type }) => {\n if (type === 'resize' && target === window && !isTrusted) {\n // The window size didn't actually change, it was a synthetic event\n return;\n }\n if (rootRef.current && headerRef.current) {\n const rootTopBorderWidth = parseFloat(getComputedStyle(rootRef.current).borderTopWidth) || 0;\n const rootTop = rootRef.current.getBoundingClientRect().top + rootTopBorderWidth;\n const headerTop = headerRef.current.getBoundingClientRect().top;\n\n if (rootTop < headerTop) {\n setIsStuck(true);\n } else {\n setIsStuck(false);\n }\n }\n },\n [rootRef, headerRef]\n );\n useEffect(() => {\n if (isSticky) {\n const controller = new AbortController();\n window.addEventListener('scroll', checkIfStuck, { capture: true, signal: controller.signal });\n window.addEventListener('resize', checkIfStuck, { signal: controller.signal });\n return () => {\n controller.abort();\n };\n }\n }, [isSticky, checkIfStuck]);\n return {\n isSticky,\n isStuck,\n stickyStyles,\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-files-dragging.d.ts","sourceRoot":"","sources":["../../../src/file-dropzone/use-files-dragging.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"use-files-dragging.d.ts","sourceRoot":"","sources":["../../../src/file-dropzone/use-files-dragging.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,gBAAgB;;EAmD/B"}
|
|
@@ -38,14 +38,13 @@ export function useFilesDragging() {
|
|
|
38
38
|
event.preventDefault();
|
|
39
39
|
dragTimer = setTimeout(() => setFilesDragging(false), 25);
|
|
40
40
|
};
|
|
41
|
-
|
|
42
|
-
document.addEventListener('
|
|
43
|
-
document.addEventListener('
|
|
41
|
+
const controller = new AbortController();
|
|
42
|
+
document.addEventListener('dragover', onDocumentDragOver, { signal: controller.signal });
|
|
43
|
+
document.addEventListener('dragleave', onDocumentDragLeave, { signal: controller.signal });
|
|
44
|
+
document.addEventListener('drop', onDocumentDrop, { signal: controller.signal });
|
|
44
45
|
return () => {
|
|
45
46
|
dragTimer && clearTimeout(dragTimer);
|
|
46
|
-
|
|
47
|
-
document.removeEventListener('dragleave', onDocumentDragLeave);
|
|
48
|
-
document.removeEventListener('drop', onDocumentDrop);
|
|
47
|
+
controller.abort();
|
|
49
48
|
};
|
|
50
49
|
}, []);
|
|
51
50
|
return { areFilesDragging };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-files-dragging.js","sourceRoot":"","sources":["../../../src/file-dropzone/use-files-dragging.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAA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EF,qDAAqD;QACrD,MAAM,cAAc,GAAG,CAAC,KAAgB,EAAE,EAAE;YAC1C,KAAK,CAAC,cAAc,EAAE,CAAC;YAEvB,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5D,CAAC,CAAC;QAEF,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QACzF,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,mBAAmB,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAC3F,QAAQ,CAAC,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAEjF,OAAO,GAAG,EAAE;YACV,SAAS,IAAI,YAAY,CAAC,SAAS,CAAC,CAAC;YACrC,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useEffect, useState } from 'react';\n\n/**\n * A utility to determine whether or not a file is being currently dragged into the window.\n *\n * @returns An object with the following arguments:\n * `areFilesDragging`: True if a file is being dragged over the current window, false otherwise.\n */\nexport function useFilesDragging() {\n const [areFilesDragging, setFilesDragging] = useState(false);\n\n // Registering global drag events listeners.\n useEffect(() => {\n // The timer helps avoiding dropzone blinking.\n let dragTimer: null | ReturnType<typeof setTimeout> = null;\n\n // The file-upload dropzone is shown when the user drags files over to the browser.\n const onDocumentDragOver = (event: DragEvent) => {\n event.preventDefault();\n\n let files = 0;\n for (let item = 0; item < (event.dataTransfer?.types.length || 0); item++) {\n if (event.dataTransfer?.types[item] === 'Files') {\n files++;\n }\n }\n\n if (files > 0) {\n setFilesDragging(true);\n dragTimer && clearTimeout(dragTimer);\n }\n };\n\n // When the files are no longer dragged over the browser the state must be reset.\n const onDocumentDragLeave = (event: DragEvent) => {\n event.preventDefault();\n\n dragTimer = setTimeout(() => setFilesDragging(false), 25);\n };\n\n // If the files were dropped the state must be reset.\n const onDocumentDrop = (event: DragEvent) => {\n event.preventDefault();\n\n dragTimer = setTimeout(() => setFilesDragging(false), 25);\n };\n\n const controller = new AbortController();\n document.addEventListener('dragover', onDocumentDragOver, { signal: controller.signal });\n document.addEventListener('dragleave', onDocumentDragLeave, { signal: controller.signal });\n document.addEventListener('drop', onDocumentDrop, { signal: controller.signal });\n\n return () => {\n dragTimer && clearTimeout(dragTimer);\n controller.abort();\n };\n }, []);\n\n return { areFilesDragging };\n}\n"]}
|
package/form-field/styles.css.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"error-icon-shake-wrapper": "awsui_error-icon-shake-
|
|
5
|
-
"warning-icon-shake-wrapper": "awsui_warning-icon-shake-
|
|
6
|
-
"awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-
|
|
7
|
-
"error-icon-scale-wrapper": "awsui_error-icon-scale-
|
|
8
|
-
"warning-icon-scale-wrapper": "awsui_warning-icon-scale-
|
|
9
|
-
"awsui-motion-scale-popup": "awsui_awsui-motion-scale-
|
|
10
|
-
"warning": "
|
|
11
|
-
"error": "
|
|
12
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
13
|
-
"root": "
|
|
14
|
-
"label": "
|
|
15
|
-
"info": "
|
|
16
|
-
"description": "
|
|
17
|
-
"constraint": "
|
|
18
|
-
"hints": "
|
|
19
|
-
"constraint-has-validation-text": "awsui_constraint-has-validation-
|
|
20
|
-
"secondary-control": "awsui_secondary-
|
|
21
|
-
"controls": "
|
|
22
|
-
"label-hidden": "awsui_label-
|
|
23
|
-
"label-wrapper": "awsui_label-
|
|
24
|
-
"control": "
|
|
25
|
-
"error__message": "
|
|
26
|
-
"warning__message": "
|
|
27
|
-
"visually-hidden": "awsui_visually-
|
|
4
|
+
"error-icon-shake-wrapper": "awsui_error-icon-shake-wrapper_14mhv_11w8y_153",
|
|
5
|
+
"warning-icon-shake-wrapper": "awsui_warning-icon-shake-wrapper_14mhv_11w8y_154",
|
|
6
|
+
"awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_14mhv_11w8y_1",
|
|
7
|
+
"error-icon-scale-wrapper": "awsui_error-icon-scale-wrapper_14mhv_11w8y_184",
|
|
8
|
+
"warning-icon-scale-wrapper": "awsui_warning-icon-scale-wrapper_14mhv_11w8y_185",
|
|
9
|
+
"awsui-motion-scale-popup": "awsui_awsui-motion-scale-popup_14mhv_11w8y_1",
|
|
10
|
+
"warning": "awsui_warning_14mhv_11w8y_154",
|
|
11
|
+
"error": "awsui_error_14mhv_11w8y_153",
|
|
12
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_14mhv_11w8y_1",
|
|
13
|
+
"root": "awsui_root_14mhv_11w8y_236",
|
|
14
|
+
"label": "awsui_label_14mhv_11w8y_269",
|
|
15
|
+
"info": "awsui_info_14mhv_11w8y_285",
|
|
16
|
+
"description": "awsui_description_14mhv_11w8y_291",
|
|
17
|
+
"constraint": "awsui_constraint_14mhv_11w8y_292",
|
|
18
|
+
"hints": "awsui_hints_14mhv_11w8y_299",
|
|
19
|
+
"constraint-has-validation-text": "awsui_constraint-has-validation-text_14mhv_11w8y_300",
|
|
20
|
+
"secondary-control": "awsui_secondary-control_14mhv_11w8y_304",
|
|
21
|
+
"controls": "awsui_controls_14mhv_11w8y_308",
|
|
22
|
+
"label-hidden": "awsui_label-hidden_14mhv_11w8y_308",
|
|
23
|
+
"label-wrapper": "awsui_label-wrapper_14mhv_11w8y_311",
|
|
24
|
+
"control": "awsui_control_14mhv_11w8y_308",
|
|
25
|
+
"error__message": "awsui_error__message_14mhv_11w8y_338",
|
|
26
|
+
"warning__message": "awsui_warning__message_14mhv_11w8y_339",
|
|
27
|
+
"visually-hidden": "awsui_visually-hidden_14mhv_11w8y_343"
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -150,11 +150,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
150
150
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
151
151
|
SPDX-License-Identifier: Apache-2.0
|
|
152
152
|
*/
|
|
153
|
-
.awsui_error-icon-shake-
|
|
154
|
-
.awsui_warning-icon-shake-
|
|
155
|
-
animation: awsui_awsui-motion-shake-
|
|
153
|
+
.awsui_error-icon-shake-wrapper_14mhv_11w8y_153:not(#\9),
|
|
154
|
+
.awsui_warning-icon-shake-wrapper_14mhv_11w8y_154:not(#\9) {
|
|
155
|
+
animation: awsui_awsui-motion-shake-horizontally_14mhv_11w8y_1 var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
156
156
|
}
|
|
157
|
-
@keyframes awsui_awsui-motion-shake-
|
|
157
|
+
@keyframes awsui_awsui-motion-shake-horizontally_14mhv_11w8y_1 {
|
|
158
158
|
0% {
|
|
159
159
|
transform: translateX(-5px);
|
|
160
160
|
animation-timing-function: linear;
|
|
@@ -168,22 +168,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
@media (prefers-reduced-motion: reduce) {
|
|
171
|
-
.awsui_error-icon-shake-
|
|
172
|
-
.awsui_warning-icon-shake-
|
|
171
|
+
.awsui_error-icon-shake-wrapper_14mhv_11w8y_153:not(#\9),
|
|
172
|
+
.awsui_warning-icon-shake-wrapper_14mhv_11w8y_154:not(#\9) {
|
|
173
173
|
animation: none;
|
|
174
174
|
transition: none;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
.awsui-motion-disabled .awsui_error-icon-shake-
|
|
177
|
+
.awsui-motion-disabled .awsui_error-icon-shake-wrapper_14mhv_11w8y_153:not(#\9), .awsui-mode-entering .awsui_error-icon-shake-wrapper_14mhv_11w8y_153:not(#\9), .awsui-motion-disabled .awsui_warning-icon-shake-wrapper_14mhv_11w8y_154:not(#\9), .awsui-mode-entering .awsui_warning-icon-shake-wrapper_14mhv_11w8y_154:not(#\9) {
|
|
178
178
|
animation: none;
|
|
179
179
|
transition: none;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
.awsui_error-icon-scale-
|
|
183
|
-
.awsui_warning-icon-scale-
|
|
184
|
-
animation: awsui_awsui-motion-scale-
|
|
182
|
+
.awsui_error-icon-scale-wrapper_14mhv_11w8y_184:not(#\9),
|
|
183
|
+
.awsui_warning-icon-scale-wrapper_14mhv_11w8y_185:not(#\9) {
|
|
184
|
+
animation: awsui_awsui-motion-scale-popup_14mhv_11w8y_1 var(--motion-duration-refresh-only-medium-nf6485, 165ms) var(--motion-easing-refresh-only-a-8flf9q, cubic-bezier(0, 0, 0, 1));
|
|
185
185
|
}
|
|
186
|
-
@keyframes awsui_awsui-motion-scale-
|
|
186
|
+
@keyframes awsui_awsui-motion-scale-popup_14mhv_11w8y_1 {
|
|
187
187
|
0% {
|
|
188
188
|
transform: scale(0.95);
|
|
189
189
|
}
|
|
@@ -192,22 +192,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
@media (prefers-reduced-motion: reduce) {
|
|
195
|
-
.awsui_error-icon-scale-
|
|
196
|
-
.awsui_warning-icon-scale-
|
|
195
|
+
.awsui_error-icon-scale-wrapper_14mhv_11w8y_184:not(#\9),
|
|
196
|
+
.awsui_warning-icon-scale-wrapper_14mhv_11w8y_185:not(#\9) {
|
|
197
197
|
animation: none;
|
|
198
198
|
transition: none;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
.awsui-motion-disabled .awsui_error-icon-scale-
|
|
201
|
+
.awsui-motion-disabled .awsui_error-icon-scale-wrapper_14mhv_11w8y_184:not(#\9), .awsui-mode-entering .awsui_error-icon-scale-wrapper_14mhv_11w8y_184:not(#\9), .awsui-motion-disabled .awsui_warning-icon-scale-wrapper_14mhv_11w8y_185:not(#\9), .awsui-mode-entering .awsui_warning-icon-scale-wrapper_14mhv_11w8y_185:not(#\9) {
|
|
202
202
|
animation: none;
|
|
203
203
|
transition: none;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
.
|
|
207
|
-
.
|
|
208
|
-
animation: awsui_awsui-motion-fade-in-
|
|
206
|
+
.awsui_warning_14mhv_11w8y_154:not(#\9),
|
|
207
|
+
.awsui_error_14mhv_11w8y_153:not(#\9) {
|
|
208
|
+
animation: awsui_awsui-motion-fade-in-0_14mhv_11w8y_1 var(--motion-duration-refresh-only-medium-nf6485, 165ms) var(--motion-easing-refresh-only-a-8flf9q, cubic-bezier(0, 0, 0, 1));
|
|
209
209
|
}
|
|
210
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
210
|
+
@keyframes awsui_awsui-motion-fade-in-0_14mhv_11w8y_1 {
|
|
211
211
|
from {
|
|
212
212
|
opacity: 0;
|
|
213
213
|
}
|
|
@@ -216,18 +216,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
@media (prefers-reduced-motion: reduce) {
|
|
219
|
-
.
|
|
220
|
-
.
|
|
219
|
+
.awsui_warning_14mhv_11w8y_154:not(#\9),
|
|
220
|
+
.awsui_error_14mhv_11w8y_153:not(#\9) {
|
|
221
221
|
animation: none;
|
|
222
222
|
transition: none;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
.awsui-motion-disabled .
|
|
225
|
+
.awsui-motion-disabled .awsui_warning_14mhv_11w8y_154:not(#\9), .awsui-mode-entering .awsui_warning_14mhv_11w8y_154:not(#\9), .awsui-motion-disabled .awsui_error_14mhv_11w8y_153:not(#\9), .awsui-mode-entering .awsui_error_14mhv_11w8y_153:not(#\9) {
|
|
226
226
|
animation: none;
|
|
227
227
|
transition: none;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
.
|
|
230
|
+
.awsui_root_14mhv_11w8y_236:not(#\9) {
|
|
231
231
|
border-collapse: separate;
|
|
232
232
|
border-spacing: 0;
|
|
233
233
|
box-sizing: border-box;
|
|
@@ -261,56 +261,58 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
261
261
|
box-sizing: border-box;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
.
|
|
264
|
+
.awsui_label_14mhv_11w8y_269:not(#\9) {
|
|
265
265
|
box-sizing: border-box;
|
|
266
266
|
color: var(--color-text-form-label-5nbxa6, #0f141a);
|
|
267
267
|
display: inline;
|
|
268
|
+
-webkit-font-smoothing: var(--font-smoothing-webkit-m8nc84, antialiased);
|
|
269
|
+
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-foywby, grayscale);
|
|
268
270
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
269
271
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
270
272
|
font-weight: var(--font-display-label-weight-815ja9, 700);
|
|
271
273
|
margin-inline-end: var(--space-xs-zb16t3, 8px);
|
|
272
274
|
}
|
|
273
|
-
.
|
|
275
|
+
.awsui_label_14mhv_11w8y_269:not(#\9):only-child {
|
|
274
276
|
margin-block: 0;
|
|
275
277
|
margin-inline: 0;
|
|
276
278
|
}
|
|
277
279
|
|
|
278
|
-
.
|
|
280
|
+
.awsui_info_14mhv_11w8y_285:not(#\9) {
|
|
279
281
|
display: inline-flex;
|
|
280
282
|
padding-inline-start: var(--space-xs-zb16t3, 8px);
|
|
281
283
|
border-inline-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
282
284
|
}
|
|
283
285
|
|
|
284
|
-
.
|
|
285
|
-
.
|
|
286
|
+
.awsui_description_14mhv_11w8y_291:not(#\9),
|
|
287
|
+
.awsui_constraint_14mhv_11w8y_292:not(#\9) {
|
|
286
288
|
color: var(--color-text-form-secondary-54emib, #656871);
|
|
287
289
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
288
290
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
289
291
|
letter-spacing: var(--letter-spacing-body-s-z9jkwp, 0.005em);
|
|
290
292
|
}
|
|
291
293
|
|
|
292
|
-
.
|
|
293
|
-
.awsui_constraint-has-validation-
|
|
294
|
+
.awsui_hints_14mhv_11w8y_299:not(#\9),
|
|
295
|
+
.awsui_constraint-has-validation-text_14mhv_11w8y_300:not(#\9) {
|
|
294
296
|
padding-block-start: var(--space-xxs-p8yyaw, 4px);
|
|
295
297
|
}
|
|
296
298
|
|
|
297
|
-
.awsui_secondary-
|
|
299
|
+
.awsui_secondary-control_14mhv_11w8y_304:not(#\9) {
|
|
298
300
|
/* used in test-utils */
|
|
299
301
|
}
|
|
300
302
|
|
|
301
|
-
.
|
|
303
|
+
.awsui_controls_14mhv_11w8y_308:not(#\9):not(.awsui_label-hidden_14mhv_11w8y_308) {
|
|
302
304
|
padding-block-start: var(--space-xxs-p8yyaw, 4px);
|
|
303
305
|
}
|
|
304
|
-
.awsui_label-
|
|
306
|
+
.awsui_label-wrapper_14mhv_11w8y_311:not(#\9):empty + .awsui_controls_14mhv_11w8y_308 {
|
|
305
307
|
padding-block-start: 0;
|
|
306
308
|
}
|
|
307
309
|
|
|
308
|
-
.
|
|
310
|
+
.awsui_control_14mhv_11w8y_308:not(#\9) {
|
|
309
311
|
min-inline-size: 0;
|
|
310
312
|
word-break: break-word;
|
|
311
313
|
}
|
|
312
314
|
|
|
313
|
-
.
|
|
315
|
+
.awsui_error_14mhv_11w8y_153:not(#\9) {
|
|
314
316
|
color: var(--color-text-status-error-5676bj, #db0000);
|
|
315
317
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
316
318
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
@@ -319,7 +321,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
319
321
|
align-items: flex-start;
|
|
320
322
|
}
|
|
321
323
|
|
|
322
|
-
.
|
|
324
|
+
.awsui_warning_14mhv_11w8y_154:not(#\9) {
|
|
323
325
|
color: var(--color-text-status-warning-csaw41, #855900);
|
|
324
326
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
325
327
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
@@ -328,12 +330,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
328
330
|
align-items: flex-start;
|
|
329
331
|
}
|
|
330
332
|
|
|
331
|
-
.
|
|
332
|
-
.
|
|
333
|
+
.awsui_error__message_14mhv_11w8y_338:not(#\9),
|
|
334
|
+
.awsui_warning__message_14mhv_11w8y_339:not(#\9) {
|
|
333
335
|
margin-inline-start: var(--space-xxs-p8yyaw, 4px);
|
|
334
336
|
}
|
|
335
337
|
|
|
336
|
-
.awsui_visually-
|
|
338
|
+
.awsui_visually-hidden_14mhv_11w8y_343:not(#\9) {
|
|
337
339
|
position: absolute !important;
|
|
338
340
|
inset-block-start: -9999px !important;
|
|
339
341
|
inset-inline-start: -9999px !important;
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"error-icon-shake-wrapper": "awsui_error-icon-shake-
|
|
6
|
-
"warning-icon-shake-wrapper": "awsui_warning-icon-shake-
|
|
7
|
-
"awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-
|
|
8
|
-
"error-icon-scale-wrapper": "awsui_error-icon-scale-
|
|
9
|
-
"warning-icon-scale-wrapper": "awsui_warning-icon-scale-
|
|
10
|
-
"awsui-motion-scale-popup": "awsui_awsui-motion-scale-
|
|
11
|
-
"warning": "
|
|
12
|
-
"error": "
|
|
13
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
14
|
-
"root": "
|
|
15
|
-
"label": "
|
|
16
|
-
"info": "
|
|
17
|
-
"description": "
|
|
18
|
-
"constraint": "
|
|
19
|
-
"hints": "
|
|
20
|
-
"constraint-has-validation-text": "awsui_constraint-has-validation-
|
|
21
|
-
"secondary-control": "awsui_secondary-
|
|
22
|
-
"controls": "
|
|
23
|
-
"label-hidden": "awsui_label-
|
|
24
|
-
"label-wrapper": "awsui_label-
|
|
25
|
-
"control": "
|
|
26
|
-
"error__message": "
|
|
27
|
-
"warning__message": "
|
|
28
|
-
"visually-hidden": "awsui_visually-
|
|
5
|
+
"error-icon-shake-wrapper": "awsui_error-icon-shake-wrapper_14mhv_11w8y_153",
|
|
6
|
+
"warning-icon-shake-wrapper": "awsui_warning-icon-shake-wrapper_14mhv_11w8y_154",
|
|
7
|
+
"awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_14mhv_11w8y_1",
|
|
8
|
+
"error-icon-scale-wrapper": "awsui_error-icon-scale-wrapper_14mhv_11w8y_184",
|
|
9
|
+
"warning-icon-scale-wrapper": "awsui_warning-icon-scale-wrapper_14mhv_11w8y_185",
|
|
10
|
+
"awsui-motion-scale-popup": "awsui_awsui-motion-scale-popup_14mhv_11w8y_1",
|
|
11
|
+
"warning": "awsui_warning_14mhv_11w8y_154",
|
|
12
|
+
"error": "awsui_error_14mhv_11w8y_153",
|
|
13
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_14mhv_11w8y_1",
|
|
14
|
+
"root": "awsui_root_14mhv_11w8y_236",
|
|
15
|
+
"label": "awsui_label_14mhv_11w8y_269",
|
|
16
|
+
"info": "awsui_info_14mhv_11w8y_285",
|
|
17
|
+
"description": "awsui_description_14mhv_11w8y_291",
|
|
18
|
+
"constraint": "awsui_constraint_14mhv_11w8y_292",
|
|
19
|
+
"hints": "awsui_hints_14mhv_11w8y_299",
|
|
20
|
+
"constraint-has-validation-text": "awsui_constraint-has-validation-text_14mhv_11w8y_300",
|
|
21
|
+
"secondary-control": "awsui_secondary-control_14mhv_11w8y_304",
|
|
22
|
+
"controls": "awsui_controls_14mhv_11w8y_308",
|
|
23
|
+
"label-hidden": "awsui_label-hidden_14mhv_11w8y_308",
|
|
24
|
+
"label-wrapper": "awsui_label-wrapper_14mhv_11w8y_311",
|
|
25
|
+
"control": "awsui_control_14mhv_11w8y_308",
|
|
26
|
+
"error__message": "awsui_error__message_14mhv_11w8y_338",
|
|
27
|
+
"warning__message": "awsui_warning__message_14mhv_11w8y_339",
|
|
28
|
+
"visually-hidden": "awsui_visually-hidden_14mhv_11w8y_343"
|
|
29
29
|
};
|
|
30
30
|
|