@cloudscape-design/components 3.0.745 → 3.0.746
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/actions-wrapper/index.d.ts.map +1 -1
- package/alert/actions-wrapper/index.js +5 -1
- package/alert/actions-wrapper/index.js.map +1 -1
- package/alert/analytics-metadata/interfaces.d.ts +20 -0
- package/alert/analytics-metadata/interfaces.d.ts.map +1 -0
- package/alert/analytics-metadata/interfaces.js +4 -0
- package/alert/analytics-metadata/interfaces.js.map +1 -0
- package/alert/analytics-metadata/styles.css.js +6 -0
- package/alert/analytics-metadata/styles.scoped.css +7 -0
- package/alert/analytics-metadata/styles.selectors.js +7 -0
- package/alert/index.d.ts.map +1 -1
- package/alert/index.js +10 -1
- package/alert/index.js.map +1 -1
- package/alert/internal.d.ts.map +1 -1
- package/alert/internal.js +6 -2
- package/alert/internal.js.map +1 -1
- package/internal/base-component/styles.scoped.css +4 -2
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.d.ts +1 -0
- package/internal/generated/styles/tokens.js +3 -2
- package/internal/generated/theming/index.cjs +37 -6
- package/internal/generated/theming/index.js +37 -6
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/popover/body.d.ts +2 -1
- package/popover/body.d.ts.map +1 -1
- package/popover/body.js +3 -2
- package/popover/body.js.map +1 -1
- package/popover/internal.d.ts +1 -0
- package/popover/internal.d.ts.map +1 -1
- package/popover/internal.js +2 -2
- package/popover/internal.js.map +1 -1
- package/progress-bar/styles.css.js +19 -19
- package/progress-bar/styles.scoped.css +35 -53
- package/progress-bar/styles.selectors.js +19 -19
- package/property-filter/analytics-metadata/interfaces.d.ts +47 -0
- package/property-filter/analytics-metadata/interfaces.d.ts.map +1 -0
- package/property-filter/analytics-metadata/interfaces.js +4 -0
- package/property-filter/analytics-metadata/interfaces.js.map +1 -0
- package/property-filter/analytics-metadata/styles.css.js +7 -0
- package/property-filter/analytics-metadata/styles.scoped.css +8 -0
- package/property-filter/analytics-metadata/styles.selectors.js +8 -0
- package/property-filter/filtering-token/index.d.ts +1 -1
- package/property-filter/filtering-token/index.d.ts.map +1 -1
- package/property-filter/filtering-token/index.js +16 -8
- package/property-filter/filtering-token/index.js.map +1 -1
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +11 -1
- package/property-filter/index.js.map +1 -1
- package/property-filter/internal.d.ts.map +1 -1
- package/property-filter/internal.js +11 -6
- package/property-filter/internal.js.map +1 -1
- package/property-filter/token-editor-inputs.js +2 -2
- package/property-filter/token-editor-inputs.js.map +1 -1
- package/property-filter/token-editor.d.ts.map +1 -1
- package/property-filter/token-editor.js +9 -2
- package/property-filter/token-editor.js.map +1 -1
- package/property-filter/token.d.ts.map +1 -1
- package/property-filter/token.js +13 -5
- package/property-filter/token.js.map +1 -1
package/popover/body.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface PopoverBodyProps {
|
|
|
9
9
|
overflowVisible?: 'content' | 'both';
|
|
10
10
|
className?: string;
|
|
11
11
|
ariaLabelledby?: string;
|
|
12
|
+
closeAnalyticsAction?: string;
|
|
12
13
|
}
|
|
13
|
-
export default function PopoverBody({ dismissButton: showDismissButton, dismissAriaLabel, header, children, onDismiss, variant, overflowVisible, className, ariaLabelledby, }: PopoverBodyProps): JSX.Element;
|
|
14
|
+
export default function PopoverBody({ dismissButton: showDismissButton, dismissAriaLabel, header, children, onDismiss, variant, overflowVisible, className, ariaLabelledby, closeAnalyticsAction, }: PopoverBodyProps): JSX.Element;
|
|
14
15
|
//# sourceMappingURL=body.d.ts.map
|
package/popover/body.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/popover/body.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/popover/body.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAc9D,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,SAAS,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAEpC,MAAM,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAErC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,aAAa,EAAE,iBAAiB,EAChC,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,OAAO,EACP,eAAe,EACf,SAAS,EACT,cAAc,EACd,oBAAoB,GACrB,EAAE,gBAAgB,eAgFlB"}
|
package/popover/body.js
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
+
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
5
6
|
import { InternalButton } from '../button/internal';
|
|
6
7
|
import { useInternalI18n } from '../i18n/context';
|
|
7
8
|
import FocusLock from '../internal/components/focus-lock';
|
|
8
9
|
import { useUniqueId } from '../internal/hooks/use-unique-id';
|
|
9
10
|
import { KeyCode } from '../internal/keycode';
|
|
10
11
|
import styles from './styles.css.js';
|
|
11
|
-
export default function PopoverBody({ dismissButton: showDismissButton, dismissAriaLabel, header, children, onDismiss, variant, overflowVisible, className, ariaLabelledby, }) {
|
|
12
|
+
export default function PopoverBody({ dismissButton: showDismissButton, dismissAriaLabel, header, children, onDismiss, variant, overflowVisible, className, ariaLabelledby, closeAnalyticsAction, }) {
|
|
12
13
|
const i18n = useInternalI18n('popover');
|
|
13
14
|
const labelledById = useUniqueId('awsui-popover-');
|
|
14
15
|
const dismissButtonFocused = useRef(false);
|
|
@@ -29,7 +30,7 @@ export default function PopoverBody({ dismissButton: showDismissButton, dismissA
|
|
|
29
30
|
}
|
|
30
31
|
dismissButtonFocused.current = showDismissButton;
|
|
31
32
|
}, [showDismissButton]);
|
|
32
|
-
const dismissButton = (showDismissButton !== null && showDismissButton !== void 0 ? showDismissButton : null) && (React.createElement("div", { className: styles.dismiss },
|
|
33
|
+
const dismissButton = (showDismissButton !== null && showDismissButton !== void 0 ? showDismissButton : null) && (React.createElement("div", Object.assign({ className: styles.dismiss }, (closeAnalyticsAction ? getAnalyticsMetadataAttribute({ action: closeAnalyticsAction }) : {})),
|
|
33
34
|
React.createElement(InternalButton, { variant: "icon", formAction: "none", iconName: "close", className: styles['dismiss-control'], ariaLabel: i18n('dismissAriaLabel', dismissAriaLabel), onClick: () => onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss(), ref: dismissButtonRef })));
|
|
34
35
|
const isDialog = showDismissButton;
|
|
35
36
|
const shouldTrapFocus = showDismissButton && variant !== 'annotation';
|
package/popover/body.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../src/popover/body.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../src/popover/body.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,O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AAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE;YACtC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,eAAe,KAAK,MAAM;SAC9D,CAAC,EACF,SAAS,EAAE,SAAS,IAChB,WAAW;QAEf,oBAAC,SAAS,IAAC,QAAQ,EAAE,CAAC,eAAe,EAAE,SAAS,EAAE,KAAK;YACpD,MAAM,IAAI,CACT,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,iBAAiB,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC;gBACnF,aAAa;gBACd,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY;oBAC7C,gCAAK,MAAM,CAAM,CACb,CACF,CACP;YACD,6BAAK,SAAS,EAAE,CAAC,MAAM,IAAI,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS;gBAC7E,CAAC,MAAM,IAAI,aAAa;gBACzB,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC,IAC9F,QAAQ,CACL,CACF,CACI,CACR,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport FocusLock from '../internal/components/focus-lock';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { KeyCode } from '../internal/keycode';\n\nimport styles from './styles.css.js';\n\nexport interface PopoverBodyProps {\n dismissButton: boolean;\n dismissAriaLabel: string | undefined;\n onDismiss: (() => void) | undefined;\n\n header: React.ReactNode | undefined;\n children: React.ReactNode;\n variant?: 'annotation';\n overflowVisible?: 'content' | 'both';\n\n className?: string;\n ariaLabelledby?: string;\n\n closeAnalyticsAction?: string;\n}\n\nexport default function PopoverBody({\n dismissButton: showDismissButton,\n dismissAriaLabel,\n header,\n children,\n onDismiss,\n variant,\n overflowVisible,\n className,\n ariaLabelledby,\n closeAnalyticsAction,\n}: PopoverBodyProps) {\n const i18n = useInternalI18n('popover');\n const labelledById = useUniqueId('awsui-popover-');\n const dismissButtonFocused = useRef(false);\n const dismissButtonRef = useRef<ButtonProps.Ref>(null);\n\n const onKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.escape) {\n event.stopPropagation();\n onDismiss?.();\n }\n },\n [onDismiss]\n );\n\n // Implement our own auto-focus rather than using FocusLock's,\n // because we also want to focus the dismiss button when it\n // is added dynamically (e.g. in chart popovers)\n useEffect(() => {\n if (showDismissButton && !dismissButtonFocused.current) {\n dismissButtonRef.current?.focus({ preventScroll: true });\n }\n dismissButtonFocused.current = showDismissButton;\n }, [showDismissButton]);\n\n const dismissButton = (showDismissButton ?? null) && (\n <div\n className={styles.dismiss}\n {...(closeAnalyticsAction ? getAnalyticsMetadataAttribute({ action: closeAnalyticsAction }) : {})}\n >\n <InternalButton\n variant=\"icon\"\n formAction=\"none\"\n iconName=\"close\"\n className={styles['dismiss-control']}\n ariaLabel={i18n('dismissAriaLabel', dismissAriaLabel)}\n onClick={() => onDismiss?.()}\n ref={dismissButtonRef}\n />\n </div>\n );\n\n const isDialog = showDismissButton;\n const shouldTrapFocus = showDismissButton && variant !== 'annotation';\n\n const dialogProps = isDialog\n ? {\n role: 'dialog',\n 'aria-modal': shouldTrapFocus ? true : undefined,\n 'aria-labelledby': ariaLabelledby ?? (header ? labelledById : undefined),\n }\n : {};\n\n return (\n <div\n className={clsx(styles.body, className, {\n [styles['body-overflow-visible']]: overflowVisible === 'both',\n })}\n onKeyDown={onKeyDown}\n {...dialogProps}\n >\n <FocusLock disabled={!shouldTrapFocus} autoFocus={false}>\n {header && (\n <div className={clsx(styles['header-row'], showDismissButton && styles['has-dismiss'])}>\n {dismissButton}\n <div className={styles.header} id={labelledById}>\n <h2>{header}</h2>\n </div>\n </div>\n )}\n <div className={!header && showDismissButton ? styles['has-dismiss'] : undefined}>\n {!header && dismissButton}\n <div className={clsx(styles.content, { [styles['content-overflow-visible']]: !!overflowVisible })}>\n {children}\n </div>\n </div>\n </FocusLock>\n </div>\n );\n}\n"]}
|
package/popover/internal.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface InternalPopoverProps extends Omit<PopoverProps, 'triggerType' |
|
|
|
6
6
|
__onOpen?: NonCancelableEventHandler<null>;
|
|
7
7
|
triggerType?: PopoverProps.TriggerType | 'filtering-token';
|
|
8
8
|
size: PopoverProps.Size | 'content';
|
|
9
|
+
__closeAnalyticsAction?: string;
|
|
9
10
|
}
|
|
10
11
|
export interface InternalPopoverRef {
|
|
11
12
|
dismissPopover: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAU7F,OAAO,EAA0B,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAQlF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI5C,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,MAAM,CAAC,EAAE,0BAA0B;IAClH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,YAAY,CAAC,WAAW,GAAG,iBAAiB,CAAC;IAC3D,IAAI,EAAE,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAU7F,OAAO,EAA0B,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAQlF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI5C,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,MAAM,CAAC,EAAE,0BAA0B;IAClH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,YAAY,CAAC,WAAW,GAAG,iBAAiB,CAAC;IAC3D,IAAI,EAAE,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAC7B;;AAED,wBAAiD"}
|
package/popover/internal.js
CHANGED
|
@@ -21,7 +21,7 @@ import PopoverContainer from './container';
|
|
|
21
21
|
import styles from './styles.css.js';
|
|
22
22
|
export default React.forwardRef(InternalPopover);
|
|
23
23
|
function InternalPopover(_a, ref) {
|
|
24
|
-
var { position = 'right', size = 'medium', fixedWidth = false, triggerType = 'text', dismissButton = true, children, header, content, triggerAriaLabel, wrapTriggerText = true, renderWithPortal = false, __onOpen, __internalRootRef = null } = _a, restProps = __rest(_a, ["position", "size", "fixedWidth", "triggerType", "dismissButton", "children", "header", "content", "triggerAriaLabel", "wrapTriggerText", "renderWithPortal", "__onOpen", "__internalRootRef"]);
|
|
24
|
+
var { position = 'right', size = 'medium', fixedWidth = false, triggerType = 'text', dismissButton = true, children, header, content, triggerAriaLabel, wrapTriggerText = true, renderWithPortal = false, __onOpen, __internalRootRef = null, __closeAnalyticsAction } = _a, restProps = __rest(_a, ["position", "size", "fixedWidth", "triggerType", "dismissButton", "children", "header", "content", "triggerAriaLabel", "wrapTriggerText", "renderWithPortal", "__onOpen", "__internalRootRef", "__closeAnalyticsAction"]);
|
|
25
25
|
const baseProps = getBaseProps(restProps);
|
|
26
26
|
const triggerRef = useRef(null);
|
|
27
27
|
const popoverRef = useRef(null);
|
|
@@ -92,7 +92,7 @@ function InternalPopover(_a, ref) {
|
|
|
92
92
|
const referrerId = useUniqueId();
|
|
93
93
|
const popoverContent = (React.createElement("div", { "aria-live": dismissButton ? undefined : 'polite', "aria-atomic": dismissButton ? undefined : true, className: clsx(popoverClasses, !renderWithPortal && styles['popover-inline-content']), "data-awsui-referrer-id": referrerId }, visible && (React.createElement(PopoverContainer, { size: size, fixedWidth: fixedWidth, position: position, trackRef: triggerRef, arrow: position => React.createElement(Arrow, { position: position }), renderWithPortal: renderWithPortal, zIndex: renderWithPortal ? 7000 : undefined },
|
|
94
94
|
React.createElement(LinkDefaultVariantContext.Provider, { value: { defaultVariant: 'primary' } },
|
|
95
|
-
React.createElement(PopoverBody, { dismissButton: dismissButton, dismissAriaLabel: dismissAriaLabel, header: header, onDismiss: onDismiss, overflowVisible: "both" }, content))))));
|
|
95
|
+
React.createElement(PopoverBody, { dismissButton: dismissButton, dismissAriaLabel: dismissAriaLabel, header: header, onDismiss: onDismiss, overflowVisible: "both", closeAnalyticsAction: __closeAnalyticsAction }, content))))));
|
|
96
96
|
const mergedRef = useMergeRefs(popoverRef, __internalRootRef);
|
|
97
97
|
return (React.createElement("span", Object.assign({}, baseProps, { className: clsx(styles.root, baseProps.className, triggerType === 'filtering-token' && styles['root-filtering-token']), ref: mergedRef, onMouseDown: () => {
|
|
98
98
|
// Indicate there was a click inside popover recently, including nested portals.
|
package/popover/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{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EF,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAE9D,OAAO,CACL,8CACM,SAAS,IACb,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,IAAI,EACX,SAAS,CAAC,SAAS,EACnB,WAAW,KAAK,iBAAiB,IAAI,MAAM,CAAC,sBAAsB,CAAC,CACpE,EACD,GAAG,EAAE,SAAS,EACd,WAAW,EAAE,GAAG,EAAE;YAChB,gFAAgF;YAChF,YAAY,CAAC,OAAO,GAAG,qBAAqB,CAAC,GAAG,EAAE;gBAChD,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;QAEA,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,CACxB,gDACM,YAAY,IAChB,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,eAAe,KAAK,KAAK,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC,EACjG,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAC,QAAQ,mBACC,QAAQ,EACtB,EAAE,EAAE,UAAU,gBACF,gBAAgB,KAE3B,QAAQ,CACF,CACV,CAAC,CAAC,CAAC,CACF,8CAAU,YAAY,IAAE,EAAE,EAAE,UAAU,KACnC,QAAQ,CACJ,CACR;QACD,oBAAC,qBAAqB,QACnB,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAChD,CACnB,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\nimport Portal from '../internal/components/portal';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { KeyCode } from '../internal/keycode';\nimport Arrow from './arrow';\nimport PopoverBody from './body';\nimport PopoverContainer from './container';\nimport { PopoverProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface InternalPopoverProps extends Omit<PopoverProps, 'triggerType' | 'size'>, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n triggerType?: PopoverProps.TriggerType | 'filtering-token';\n size: PopoverProps.Size | 'content';\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n focus: HTMLElement['focus'];\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n\n children,\n header,\n content,\n triggerAriaLabel,\n\n wrapTriggerText = true,\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const i18n = useInternalI18n('popover');\n const dismissAriaLabel = i18n('dismissAriaLabel', restProps.dismissAriaLabel);\n\n const [visible, setVisible] = useState(false);\n\n const focusTrigger = useCallback(() => {\n if (triggerType === 'text') {\n triggerRef.current?.focus();\n } else {\n triggerRef.current && getFirstFocusable(triggerRef.current)?.focus();\n }\n }, [triggerType]);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n focusTrigger();\n }, [focusTrigger]);\n\n const onTriggerKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const isEscapeKey = event.keyCode === KeyCode.escape;\n const isTabKey = event.keyCode === KeyCode.tab;\n if (isEscapeKey && visible) {\n event.stopPropagation();\n }\n if (isTabKey || isEscapeKey) {\n setVisible(false);\n }\n },\n [visible]\n );\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n focus: () => {\n setVisible(false);\n focusTrigger();\n },\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n document.addEventListener('mousedown', onDocumentClick);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n const { tabIndex: triggerTabIndex } = useSingleTabStopNavigation(triggerRef);\n\n const referrerId = useUniqueId();\n\n const popoverContent = (\n <div\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={clsx(popoverClasses, !renderWithPortal && styles['popover-inline-content'])}\n data-awsui-referrer-id={referrerId}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n >\n {content}\n </PopoverBody>\n </LinkDefaultVariantContext.Provider>\n </PopoverContainer>\n )}\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n triggerType === 'filtering-token' && styles['root-filtering-token']\n )}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button\n {...triggerProps}\n className={clsx(triggerProps.className, wrapTriggerText === false && styles['overflow-ellipsis'])}\n tabIndex={triggerTabIndex}\n type=\"button\"\n aria-haspopup=\"dialog\"\n id={referrerId}\n aria-label={triggerAriaLabel}\n >\n {children}\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n <ResetContextsForModal>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </ResetContextsForModal>\n </span>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,MAAM,MAAM,+BAA+B,CAAC;AACnD,OAAO,EAAE,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C,CAAC;QACL,CAAC;QAEA,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,CACxB,gDACM,YAAY,IAChB,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,eAAe,KAAK,KAAK,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC,EACjG,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAC,QAAQ,mBACC,QAAQ,EACtB,EAAE,EAAE,UAAU,gBACF,gBAAgB,KAE3B,QAAQ,CACF,CACV,CAAC,CAAC,CAAC,CACF,8CAAU,YAAY,IAAE,EAAE,EAAE,UAAU,KACnC,QAAQ,CACJ,CACR;QACD,oBAAC,qBAAqB,QACnB,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAChD,CACnB,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\nimport Portal from '../internal/components/portal';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { KeyCode } from '../internal/keycode';\nimport Arrow from './arrow';\nimport PopoverBody from './body';\nimport PopoverContainer from './container';\nimport { PopoverProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface InternalPopoverProps extends Omit<PopoverProps, 'triggerType' | 'size'>, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n triggerType?: PopoverProps.TriggerType | 'filtering-token';\n size: PopoverProps.Size | 'content';\n __closeAnalyticsAction?: string;\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n focus: HTMLElement['focus'];\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n\n children,\n header,\n content,\n triggerAriaLabel,\n\n wrapTriggerText = true,\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n __closeAnalyticsAction,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const i18n = useInternalI18n('popover');\n const dismissAriaLabel = i18n('dismissAriaLabel', restProps.dismissAriaLabel);\n\n const [visible, setVisible] = useState(false);\n\n const focusTrigger = useCallback(() => {\n if (triggerType === 'text') {\n triggerRef.current?.focus();\n } else {\n triggerRef.current && getFirstFocusable(triggerRef.current)?.focus();\n }\n }, [triggerType]);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n focusTrigger();\n }, [focusTrigger]);\n\n const onTriggerKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const isEscapeKey = event.keyCode === KeyCode.escape;\n const isTabKey = event.keyCode === KeyCode.tab;\n if (isEscapeKey && visible) {\n event.stopPropagation();\n }\n if (isTabKey || isEscapeKey) {\n setVisible(false);\n }\n },\n [visible]\n );\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n focus: () => {\n setVisible(false);\n focusTrigger();\n },\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n document.addEventListener('mousedown', onDocumentClick);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n const { tabIndex: triggerTabIndex } = useSingleTabStopNavigation(triggerRef);\n\n const referrerId = useUniqueId();\n\n const popoverContent = (\n <div\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={clsx(popoverClasses, !renderWithPortal && styles['popover-inline-content'])}\n data-awsui-referrer-id={referrerId}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n closeAnalyticsAction={__closeAnalyticsAction}\n >\n {content}\n </PopoverBody>\n </LinkDefaultVariantContext.Provider>\n </PopoverContainer>\n )}\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n triggerType === 'filtering-token' && styles['root-filtering-token']\n )}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button\n {...triggerProps}\n className={clsx(triggerProps.className, wrapTriggerText === false && styles['overflow-ellipsis'])}\n tabIndex={triggerTabIndex}\n type=\"button\"\n aria-haspopup=\"dialog\"\n id={referrerId}\n aria-label={triggerAriaLabel}\n >\n {children}\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n <ResetContextsForModal>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </ResetContextsForModal>\n </span>\n );\n}\n"]}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"progress": "
|
|
5
|
-
"result-state": "awsui_result-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"root": "
|
|
8
|
-
"with-result-button": "awsui_with-result-
|
|
9
|
-
"result-text": "awsui_result-
|
|
10
|
-
"result-container-error": "awsui_result-container-
|
|
11
|
-
"result-container-success": "awsui_result-container-
|
|
12
|
-
"result-button": "awsui_result-
|
|
13
|
-
"word-wrap": "awsui_word-
|
|
14
|
-
"label-flash": "awsui_label-
|
|
15
|
-
"label-key-value": "awsui_label-key-
|
|
16
|
-
"flash": "
|
|
17
|
-
"progress-container": "awsui_progress-
|
|
18
|
-
"percentage-container": "awsui_percentage-
|
|
19
|
-
"percentage": "
|
|
20
|
-
"complete": "
|
|
21
|
-
"progress-in-flash": "awsui_progress-in-
|
|
22
|
-
"additional-info": "awsui_additional-
|
|
4
|
+
"progress": "awsui_progress_11huc_pv5bx_353",
|
|
5
|
+
"result-state": "awsui_result-state_11huc_pv5bx_367",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_pv5bx_1",
|
|
7
|
+
"root": "awsui_root_11huc_pv5bx_389",
|
|
8
|
+
"with-result-button": "awsui_with-result-button_11huc_pv5bx_424",
|
|
9
|
+
"result-text": "awsui_result-text_11huc_pv5bx_428",
|
|
10
|
+
"result-container-error": "awsui_result-container-error_11huc_pv5bx_432",
|
|
11
|
+
"result-container-success": "awsui_result-container-success_11huc_pv5bx_432",
|
|
12
|
+
"result-button": "awsui_result-button_11huc_pv5bx_436",
|
|
13
|
+
"word-wrap": "awsui_word-wrap_11huc_pv5bx_442",
|
|
14
|
+
"label-flash": "awsui_label-flash_11huc_pv5bx_447",
|
|
15
|
+
"label-key-value": "awsui_label-key-value_11huc_pv5bx_451",
|
|
16
|
+
"flash": "awsui_flash_11huc_pv5bx_459",
|
|
17
|
+
"progress-container": "awsui_progress-container_11huc_pv5bx_463",
|
|
18
|
+
"percentage-container": "awsui_percentage-container_11huc_pv5bx_470",
|
|
19
|
+
"percentage": "awsui_percentage_11huc_pv5bx_470",
|
|
20
|
+
"complete": "awsui_complete_11huc_pv5bx_516",
|
|
21
|
+
"progress-in-flash": "awsui_progress-in-flash_11huc_pv5bx_529",
|
|
22
|
+
"additional-info": "awsui_additional-info_11huc_pv5bx_542"
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -350,27 +350,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
350
350
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
351
351
|
SPDX-License-Identifier: Apache-2.0
|
|
352
352
|
*/
|
|
353
|
-
.
|
|
353
|
+
.awsui_progress_11huc_pv5bx_353:not(#\9)::-webkit-progress-value {
|
|
354
354
|
-webkit-transition: width var(--motion-duration-moderate-5k1phv, 135ms) linear;
|
|
355
355
|
transition: width var(--motion-duration-moderate-5k1phv, 135ms) linear;
|
|
356
356
|
}
|
|
357
357
|
@media (prefers-reduced-motion: reduce) {
|
|
358
|
-
.
|
|
358
|
+
.awsui_progress_11huc_pv5bx_353:not(#\9)::-webkit-progress-value {
|
|
359
359
|
animation: none;
|
|
360
360
|
-webkit-transition: none;
|
|
361
361
|
transition: none;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
.awsui-motion-disabled .
|
|
364
|
+
.awsui-motion-disabled .awsui_progress_11huc_pv5bx_353:not(#\9)::-webkit-progress-value, .awsui-mode-entering .awsui_progress_11huc_pv5bx_353:not(#\9)::-webkit-progress-value {
|
|
365
365
|
animation: none;
|
|
366
366
|
-webkit-transition: none;
|
|
367
367
|
transition: none;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
.awsui_result-
|
|
371
|
-
animation: awsui_awsui-motion-fade-
|
|
370
|
+
.awsui_result-state_11huc_pv5bx_367:not(#\9) {
|
|
371
|
+
animation: awsui_awsui-motion-fade-in_11huc_pv5bx_1 var(--motion-duration-transition-show-paced-9s9l5z, 180ms) var(--motion-easing-transition-show-paced-eobwvi, ease-out);
|
|
372
372
|
}
|
|
373
|
-
@keyframes awsui_awsui-motion-fade-
|
|
373
|
+
@keyframes awsui_awsui-motion-fade-in_11huc_pv5bx_1 {
|
|
374
374
|
from {
|
|
375
375
|
opacity: 0.2;
|
|
376
376
|
}
|
|
@@ -379,17 +379,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
@media (prefers-reduced-motion: reduce) {
|
|
382
|
-
.awsui_result-
|
|
382
|
+
.awsui_result-state_11huc_pv5bx_367:not(#\9) {
|
|
383
383
|
animation: none;
|
|
384
384
|
transition: none;
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
.awsui-motion-disabled .awsui_result-
|
|
387
|
+
.awsui-motion-disabled .awsui_result-state_11huc_pv5bx_367:not(#\9), .awsui-mode-entering .awsui_result-state_11huc_pv5bx_367:not(#\9) {
|
|
388
388
|
animation: none;
|
|
389
389
|
transition: none;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
.
|
|
392
|
+
.awsui_root_11huc_pv5bx_389:not(#\9) {
|
|
393
393
|
border-collapse: separate;
|
|
394
394
|
border-spacing: 0;
|
|
395
395
|
box-sizing: border-box;
|
|
@@ -425,34 +425,34 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
425
425
|
-moz-osx-font-smoothing: auto;
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
-
.awsui_with-result-
|
|
428
|
+
.awsui_with-result-button_11huc_pv5bx_424:not(#\9) {
|
|
429
429
|
padding-inline-end: var(--space-m-udix3p, 16px);
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
.awsui_result-
|
|
432
|
+
.awsui_result-text_11huc_pv5bx_428:not(#\9) {
|
|
433
433
|
/* used in test-utils */
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
-
.awsui_result-container-
|
|
436
|
+
.awsui_result-container-error_11huc_pv5bx_432:not(#\9), .awsui_result-container-success_11huc_pv5bx_432:not(#\9) {
|
|
437
437
|
/* used in test-utils */
|
|
438
438
|
}
|
|
439
439
|
|
|
440
|
-
.awsui_result-
|
|
440
|
+
.awsui_result-button_11huc_pv5bx_436:not(#\9) {
|
|
441
441
|
display: inline-block;
|
|
442
442
|
margin-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
443
443
|
margin-inline: 0;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
.awsui_word-
|
|
446
|
+
.awsui_word-wrap_11huc_pv5bx_442:not(#\9) {
|
|
447
447
|
min-inline-size: 0;
|
|
448
448
|
word-break: break-word;
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
.awsui_label-
|
|
452
|
-
color:
|
|
451
|
+
.awsui_label-flash_11huc_pv5bx_447:not(#\9) {
|
|
452
|
+
color: inherit;
|
|
453
453
|
font-weight: 700;
|
|
454
454
|
}
|
|
455
|
-
.awsui_label-key-
|
|
455
|
+
.awsui_label-key-value_11huc_pv5bx_451:not(#\9) {
|
|
456
456
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
457
457
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
458
458
|
font-weight: var(--font-display-label-weight-815ja9, 700);
|
|
@@ -460,18 +460,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
460
460
|
margin-block-end: var(--space-scaled-xxxs-27y4hv, 2px);
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
.
|
|
463
|
+
.awsui_flash_11huc_pv5bx_459:not(#\9) {
|
|
464
464
|
color: inherit;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
.awsui_progress-
|
|
467
|
+
.awsui_progress-container_11huc_pv5bx_463:not(#\9) {
|
|
468
468
|
display: flex;
|
|
469
469
|
align-items: center;
|
|
470
470
|
max-inline-size: 800px;
|
|
471
471
|
block-size: var(--line-height-body-m-30ar75, 20px);
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
-
.awsui_percentage-
|
|
474
|
+
.awsui_percentage-container_11huc_pv5bx_470:not(#\9) {
|
|
475
475
|
inline-size: 33px;
|
|
476
476
|
flex-shrink: 0;
|
|
477
477
|
white-space: nowrap;
|
|
@@ -481,11 +481,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
481
481
|
letter-spacing: var(--letter-spacing-body-s-z9jkwp, 0.005em);
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
.
|
|
484
|
+
.awsui_percentage_11huc_pv5bx_470:not(#\9) {
|
|
485
485
|
/* used in test-utils */
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
.
|
|
488
|
+
.awsui_progress_11huc_pv5bx_353:not(#\9) {
|
|
489
489
|
inline-size: 100%;
|
|
490
490
|
margin-inline-end: var(--space-s-34lx8l, 12px);
|
|
491
491
|
min-inline-size: 0;
|
|
@@ -499,7 +499,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
499
499
|
border-end-end-radius: 10px;
|
|
500
500
|
background-color: var(--color-background-progress-bar-layout-default-ktc0zl, #e9ebed);
|
|
501
501
|
}
|
|
502
|
-
.
|
|
502
|
+
.awsui_progress_11huc_pv5bx_353:not(#\9)::-webkit-progress-bar {
|
|
503
503
|
block-size: 4px;
|
|
504
504
|
border-block: 0;
|
|
505
505
|
border-inline: none;
|
|
@@ -510,57 +510,39 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
510
510
|
border-end-end-radius: 10px;
|
|
511
511
|
background-color: var(--color-background-progress-bar-layout-default-ktc0zl, #e9ebed);
|
|
512
512
|
}
|
|
513
|
-
.
|
|
513
|
+
.awsui_progress_11huc_pv5bx_353:not(#\9)::-webkit-progress-value {
|
|
514
514
|
border-start-start-radius: 10px;
|
|
515
515
|
border-start-end-radius: 0;
|
|
516
516
|
border-end-start-radius: 10px;
|
|
517
517
|
border-end-end-radius: 0;
|
|
518
518
|
background-color: var(--color-background-progress-bar-content-default-yvwdkl, #0972d3);
|
|
519
519
|
}
|
|
520
|
-
.
|
|
520
|
+
.awsui_progress_11huc_pv5bx_353.awsui_complete_11huc_pv5bx_516:not(#\9)::-webkit-progress-value {
|
|
521
521
|
border-start-start-radius: 10px;
|
|
522
522
|
border-start-end-radius: 10px;
|
|
523
523
|
border-end-start-radius: 10px;
|
|
524
524
|
border-end-end-radius: 10px;
|
|
525
525
|
}
|
|
526
|
-
.
|
|
526
|
+
.awsui_progress_11huc_pv5bx_353:not(#\9)::-moz-progress-bar {
|
|
527
527
|
border-start-start-radius: 10px;
|
|
528
528
|
border-start-end-radius: 0;
|
|
529
529
|
border-end-start-radius: 10px;
|
|
530
530
|
border-end-end-radius: 0;
|
|
531
531
|
background-color: var(--color-background-progress-bar-content-default-yvwdkl, #0972d3);
|
|
532
532
|
}
|
|
533
|
-
.
|
|
534
|
-
|
|
535
|
-
border-start-end-radius: 0;
|
|
536
|
-
border-end-start-radius: 10px;
|
|
537
|
-
border-end-end-radius: 0;
|
|
538
|
-
background-color: #0073bb;
|
|
539
|
-
border-block: none;
|
|
540
|
-
border-inline: none;
|
|
541
|
-
}
|
|
542
|
-
.awsui_progress_11huc_15662_353.awsui_complete_11huc_15662_516:not(#\9)::-ms-fill {
|
|
543
|
-
border-start-start-radius: 10px;
|
|
544
|
-
border-start-end-radius: 10px;
|
|
545
|
-
border-end-start-radius: 10px;
|
|
546
|
-
border-end-end-radius: 10px;
|
|
547
|
-
}
|
|
548
|
-
.awsui_progress_11huc_15662_353.awsui_progress-in-flash_11huc_15662_544:not(#\9) {
|
|
549
|
-
background-color: var(--color-background-progress-bar-layout-in-flash-rlu77n, rgba(255, 255, 255, 0.25));
|
|
550
|
-
}
|
|
551
|
-
.awsui_progress_11huc_15662_353.awsui_progress-in-flash_11huc_15662_544:not(#\9)::-webkit-progress-bar {
|
|
552
|
-
background-color: var(--color-background-progress-bar-layout-in-flash-rlu77n, rgba(255, 255, 255, 0.25));
|
|
533
|
+
.awsui_progress_11huc_pv5bx_353.awsui_progress-in-flash_11huc_pv5bx_529:not(#\9) {
|
|
534
|
+
background-color: var(--color-background-progress-bar-layout-in-flash-d3q12s, rgba(255, 255, 255, 0.25));
|
|
553
535
|
}
|
|
554
|
-
.
|
|
555
|
-
background-color: var(--color-background-progress-bar-content-in-flash-
|
|
536
|
+
.awsui_progress_11huc_pv5bx_353.awsui_progress-in-flash_11huc_pv5bx_529:not(#\9)::-moz-progress-bar {
|
|
537
|
+
background-color: var(--color-background-progress-bar-content-in-flash-qj6j8l, #ffffff);
|
|
556
538
|
}
|
|
557
|
-
.
|
|
558
|
-
background-color: var(--color-background-progress-bar-
|
|
539
|
+
.awsui_progress_11huc_pv5bx_353.awsui_progress-in-flash_11huc_pv5bx_529:not(#\9)::-webkit-progress-bar {
|
|
540
|
+
background-color: var(--color-background-progress-bar-layout-in-flash-d3q12s, rgba(255, 255, 255, 0.25));
|
|
559
541
|
}
|
|
560
|
-
.
|
|
561
|
-
background-color:
|
|
542
|
+
.awsui_progress_11huc_pv5bx_353.awsui_progress-in-flash_11huc_pv5bx_529:not(#\9)::-webkit-progress-value {
|
|
543
|
+
background-color: var(--color-background-progress-bar-content-in-flash-qj6j8l, #ffffff);
|
|
562
544
|
}
|
|
563
545
|
|
|
564
|
-
.awsui_additional-
|
|
546
|
+
.awsui_additional-info_11huc_pv5bx_542:not(#\9) {
|
|
565
547
|
/* used in test-utils */
|
|
566
548
|
}
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"progress": "
|
|
6
|
-
"result-state": "awsui_result-
|
|
7
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
8
|
-
"root": "
|
|
9
|
-
"with-result-button": "awsui_with-result-
|
|
10
|
-
"result-text": "awsui_result-
|
|
11
|
-
"result-container-error": "awsui_result-container-
|
|
12
|
-
"result-container-success": "awsui_result-container-
|
|
13
|
-
"result-button": "awsui_result-
|
|
14
|
-
"word-wrap": "awsui_word-
|
|
15
|
-
"label-flash": "awsui_label-
|
|
16
|
-
"label-key-value": "awsui_label-key-
|
|
17
|
-
"flash": "
|
|
18
|
-
"progress-container": "awsui_progress-
|
|
19
|
-
"percentage-container": "awsui_percentage-
|
|
20
|
-
"percentage": "
|
|
21
|
-
"complete": "
|
|
22
|
-
"progress-in-flash": "awsui_progress-in-
|
|
23
|
-
"additional-info": "awsui_additional-
|
|
5
|
+
"progress": "awsui_progress_11huc_pv5bx_353",
|
|
6
|
+
"result-state": "awsui_result-state_11huc_pv5bx_367",
|
|
7
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_pv5bx_1",
|
|
8
|
+
"root": "awsui_root_11huc_pv5bx_389",
|
|
9
|
+
"with-result-button": "awsui_with-result-button_11huc_pv5bx_424",
|
|
10
|
+
"result-text": "awsui_result-text_11huc_pv5bx_428",
|
|
11
|
+
"result-container-error": "awsui_result-container-error_11huc_pv5bx_432",
|
|
12
|
+
"result-container-success": "awsui_result-container-success_11huc_pv5bx_432",
|
|
13
|
+
"result-button": "awsui_result-button_11huc_pv5bx_436",
|
|
14
|
+
"word-wrap": "awsui_word-wrap_11huc_pv5bx_442",
|
|
15
|
+
"label-flash": "awsui_label-flash_11huc_pv5bx_447",
|
|
16
|
+
"label-key-value": "awsui_label-key-value_11huc_pv5bx_451",
|
|
17
|
+
"flash": "awsui_flash_11huc_pv5bx_459",
|
|
18
|
+
"progress-container": "awsui_progress-container_11huc_pv5bx_463",
|
|
19
|
+
"percentage-container": "awsui_percentage-container_11huc_pv5bx_470",
|
|
20
|
+
"percentage": "awsui_percentage_11huc_pv5bx_470",
|
|
21
|
+
"complete": "awsui_complete_11huc_pv5bx_516",
|
|
22
|
+
"progress-in-flash": "awsui_progress-in-flash_11huc_pv5bx_529",
|
|
23
|
+
"additional-info": "awsui_additional-info_11huc_pv5bx_542"
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { GeneratedAnalyticsMetadataButtonTriggerExpand } from '../../internal/components/button-trigger/analytics-metadata/interfaces';
|
|
2
|
+
import { GeneratedAnalyticsMetadataSelectableItemSelect } from '../../internal/components/selectable-item/analytics-metadata/interfaces';
|
|
3
|
+
import { GeneratedAnalyticsMetadataTokenListShowMore } from '../../internal/components/token-list/analytics-metadata/interfaces';
|
|
4
|
+
export interface GeneratedAnalyticsMetadataPropertyFilterClearFilters {
|
|
5
|
+
action: 'clearFilters';
|
|
6
|
+
detail: {
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export type GeneratedAnalyticsMetadataPropertyFilterSelect = GeneratedAnalyticsMetadataSelectableItemSelect;
|
|
11
|
+
export interface GeneratedAnalyticsMetadataPropertyFilterExpand extends GeneratedAnalyticsMetadataButtonTriggerExpand {
|
|
12
|
+
tokenLabel: string;
|
|
13
|
+
tokenPosition: string;
|
|
14
|
+
}
|
|
15
|
+
interface TokenAction {
|
|
16
|
+
detail: {
|
|
17
|
+
tokenLabel: string;
|
|
18
|
+
tokenPosition: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface GeneratedAnalyticsMetadataPropertyFilterDismiss extends TokenAction {
|
|
23
|
+
action: 'dismiss';
|
|
24
|
+
}
|
|
25
|
+
export interface GeneratedAnalyticsMetadataPropertyEditStart extends TokenAction {
|
|
26
|
+
action: 'editStart';
|
|
27
|
+
}
|
|
28
|
+
export interface GeneratedAnalyticsMetadataPropertyEditClose extends TokenAction {
|
|
29
|
+
action: 'editClose';
|
|
30
|
+
}
|
|
31
|
+
export interface GeneratedAnalyticsMetadataPropertyEditCancel extends TokenAction {
|
|
32
|
+
action: 'editCancel';
|
|
33
|
+
}
|
|
34
|
+
export interface GeneratedAnalyticsMetadataPropertyEditConfirm extends TokenAction {
|
|
35
|
+
action: 'editConfirm';
|
|
36
|
+
}
|
|
37
|
+
export type GeneratedAnalyticsMetadataPropertyShowMore = GeneratedAnalyticsMetadataTokenListShowMore;
|
|
38
|
+
export interface GeneratedAnalyticsMetadataPropertyFilterComponent {
|
|
39
|
+
name: 'awsui.PropertyFilter';
|
|
40
|
+
label: string;
|
|
41
|
+
properties: {
|
|
42
|
+
disabled: string;
|
|
43
|
+
queryTokensCount: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/property-filter/analytics-metadata/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6CAA6C,EAAE,MAAM,wEAAwE,CAAC;AACvI,OAAO,EAAE,8CAA8C,EAAE,MAAM,yEAAyE,CAAC;AACzI,OAAO,EAAE,2CAA2C,EAAE,MAAM,oEAAoE,CAAC;AAEjI,MAAM,WAAW,oDAAoD;IACnE,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,MAAM,8CAA8C,GAAG,8CAA8C,CAAC;AAE5G,MAAM,WAAW,8CAA+C,SAAQ,6CAA6C;IACnH,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,WAAW;IACnB,MAAM,EAAE;QACN,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AACD,MAAM,WAAW,+CAAgD,SAAQ,WAAW;IAClF,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,2CAA4C,SAAQ,WAAW;IAC9E,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,2CAA4C,SAAQ,WAAW;IAC9E,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,4CAA6C,SAAQ,WAAW;IAC/E,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,6CAA8C,SAAQ,WAAW;IAChF,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,MAAM,0CAA0C,GAAG,2CAA2C,CAAC;AAErG,MAAM,WAAW,iDAAiD;IAChE,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/property-filter/analytics-metadata/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { GeneratedAnalyticsMetadataButtonTriggerExpand } from '../../internal/components/button-trigger/analytics-metadata/interfaces';\nimport { GeneratedAnalyticsMetadataSelectableItemSelect } from '../../internal/components/selectable-item/analytics-metadata/interfaces';\nimport { GeneratedAnalyticsMetadataTokenListShowMore } from '../../internal/components/token-list/analytics-metadata/interfaces';\n\nexport interface GeneratedAnalyticsMetadataPropertyFilterClearFilters {\n action: 'clearFilters';\n detail: {\n label: string;\n };\n}\n\nexport type GeneratedAnalyticsMetadataPropertyFilterSelect = GeneratedAnalyticsMetadataSelectableItemSelect;\n\nexport interface GeneratedAnalyticsMetadataPropertyFilterExpand extends GeneratedAnalyticsMetadataButtonTriggerExpand {\n tokenLabel: string;\n tokenPosition: string;\n}\n\ninterface TokenAction {\n detail: {\n tokenLabel: string;\n tokenPosition: string;\n label?: string;\n };\n}\nexport interface GeneratedAnalyticsMetadataPropertyFilterDismiss extends TokenAction {\n action: 'dismiss';\n}\n\nexport interface GeneratedAnalyticsMetadataPropertyEditStart extends TokenAction {\n action: 'editStart';\n}\n\nexport interface GeneratedAnalyticsMetadataPropertyEditClose extends TokenAction {\n action: 'editClose';\n}\n\nexport interface GeneratedAnalyticsMetadataPropertyEditCancel extends TokenAction {\n action: 'editCancel';\n}\n\nexport interface GeneratedAnalyticsMetadataPropertyEditConfirm extends TokenAction {\n action: 'editConfirm';\n}\n\nexport type GeneratedAnalyticsMetadataPropertyShowMore = GeneratedAnalyticsMetadataTokenListShowMore;\n\nexport interface GeneratedAnalyticsMetadataPropertyFilterComponent {\n name: 'awsui.PropertyFilter';\n label: string;\n properties: {\n disabled: string;\n queryTokensCount: string;\n };\n}\n"]}
|
|
@@ -19,7 +19,7 @@ export interface FilteringTokenProps {
|
|
|
19
19
|
onDismissToken: (tokenIndex: number) => void;
|
|
20
20
|
editorContent: React.ReactNode;
|
|
21
21
|
editorHeader: string;
|
|
22
|
-
editorDismissAriaLabel
|
|
22
|
+
editorDismissAriaLabel?: string;
|
|
23
23
|
editorExpandToViewport: boolean;
|
|
24
24
|
onEditorOpen?: () => void;
|
|
25
25
|
hasGroups: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/property-filter/filtering-token/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/property-filter/filtering-token/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAYjF,OAAwB,EAAE,oBAAoB,EAAsB,MAAM,wBAAwB,CAAC;AAOnG,yBAAiB,mBAAmB,CAAC;IACnC,KAAY,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC;IACzC,cAAc,EAAE,mBAAmB,CAAC,SAAS,CAAC;IAC9C,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC,SAAS,KAAK,IAAI,CAAC;IACtE,sBAAsB,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC,SAAS,KAAK,IAAI,CAAC;IAC3E,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sBAAsB,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