@cloudscape-design/components 3.0.1169 → 3.0.1171
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/copy-to-clipboard/interfaces.d.ts +19 -0
- package/copy-to-clipboard/interfaces.d.ts.map +1 -1
- package/copy-to-clipboard/interfaces.js.map +1 -1
- package/copy-to-clipboard/internal.d.ts +2 -0
- package/copy-to-clipboard/internal.d.ts.map +1 -1
- package/copy-to-clipboard/internal.js +5 -1
- package/copy-to-clipboard/internal.js.map +1 -1
- package/drawer/use-sticky-footer.d.ts.map +1 -1
- package/drawer/use-sticky-footer.js +3 -9
- package/drawer/use-sticky-footer.js.map +1 -1
- package/internal/base-component/styles.scoped.css +2 -2
- package/internal/components/drag-handle-wrapper/styles.css.js +30 -30
- package/internal/components/drag-handle-wrapper/styles.scoped.css +52 -52
- package/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.js +1 -1
- package/internal/generated/theming/index.cjs +5 -5
- package/internal/generated/theming/index.js +5 -5
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/tree-view/tree-item/styles.css.js +9 -9
- package/tree-view/tree-item/styles.scoped.css +14 -13
- package/tree-view/tree-item/styles.selectors.js +9 -9
- package/tree-view/vertical-connector/styles.css.js +3 -3
- package/tree-view/vertical-connector/styles.scoped.css +5 -5
- package/tree-view/vertical-connector/styles.selectors.js +3 -3
- package/tutorial-panel/components/tutorial-list/index.d.ts +3 -1
- package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js +2 -2
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/tutorial-panel/index.d.ts.map +1 -1
- package/tutorial-panel/index.js +14 -2
- package/tutorial-panel/index.js.map +1 -1
- package/tutorial-panel/styles.css.js +1 -1
- package/tutorial-panel/styles.scoped.css +29 -1
- package/tutorial-panel/styles.selectors.js +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseComponentProps } from '../internal/base-component';
|
|
2
|
+
import { NonCancelableEventHandler } from '../internal/events';
|
|
2
3
|
export interface CopyToClipboardProps extends BaseComponentProps {
|
|
3
4
|
/** Determines the general styling of the copy button as follows:
|
|
4
5
|
*
|
|
@@ -52,7 +53,25 @@ export interface CopyToClipboardProps extends BaseComponentProps {
|
|
|
52
53
|
* Applicable for all variants except inline.
|
|
53
54
|
*/
|
|
54
55
|
disabledReason?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Called when the text is successfully copied to the clipboard.
|
|
58
|
+
* The event `detail` contains the text that was copied.
|
|
59
|
+
*/
|
|
60
|
+
onCopySuccess?: NonCancelableEventHandler<CopyToClipboardProps.CopySuccessDetail>;
|
|
61
|
+
/**
|
|
62
|
+
* Called when the copy operation fails.
|
|
63
|
+
* The event `detail` contains the text that failed to copy.
|
|
64
|
+
*/
|
|
65
|
+
onCopyFailure?: NonCancelableEventHandler<CopyToClipboardProps.CopyFailureDetail>;
|
|
55
66
|
}
|
|
56
67
|
export declare namespace CopyToClipboardProps {
|
|
57
68
|
type Variant = 'button' | 'icon' | 'inline';
|
|
69
|
+
interface CopySuccessDetail {
|
|
70
|
+
/** The text that was copied to the clipboard */
|
|
71
|
+
text: string;
|
|
72
|
+
}
|
|
73
|
+
interface CopyFailureDetail {
|
|
74
|
+
/** The text that failed to copy to the clipboard */
|
|
75
|
+
text: string;
|
|
76
|
+
}
|
|
58
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC;IAEvC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAElF;;;OAGG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;CACnF;AAED,yBAAiB,oBAAoB,CAAC;IACpC,KAAY,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IAEnD,UAAiB,iBAAiB;QAChC,gDAAgD;QAChD,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,iBAAiB;QAChC,oDAAoD;QACpD,IAAI,EAAE,MAAM,CAAC;KACd;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/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 { BaseComponentProps } from '../internal/base-component';\n\nexport interface CopyToClipboardProps extends BaseComponentProps {\n /** Determines the general styling of the copy button as follows:\n *\n * * `button` to display a standalone secondary button with an icon, and `copyButtonText` as text.\n * * `icon` to display a standalone icon-only (no text) button.\n * * `inline` to display an icon-only (no text) button within a text context.\n *\n * Defaults to `button`.\n */\n variant?: CopyToClipboardProps.Variant;\n\n /**\n * The text of the copy button (for variant=\"button\").\n */\n copyButtonText?: string;\n\n /**\n * Adds `aria-label` to the copy button. Use this to provide an accessible name for buttons that don't have visible text,\n * and to distinguish between multiple buttons with identical visible text. The text will also be added to the `title` attribute of the button.\n */\n copyButtonAriaLabel?: string;\n\n /**\n * The text content to be copied. It is displayed next to the copy button when `variant=\"inline\"` unless when `content` is specified, and is not shown otherwise.\n */\n textToCopy: string;\n\n /**\n * The text content to display next to the copy button when `variant=\"inline\"`. If not provided, `textToCopy` will be displayed instead.\n */\n textToDisplay?: string;\n\n /**\n * The message shown when the text is copied successfully.\n */\n copySuccessText: string;\n\n /**\n * The message shown when the text is not copied due to an error, see [https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext](https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext).\n */\n copyErrorText: string;\n\n /**\n * By default, the popover is constrained to fit inside its parent\n * [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context).\n * Enabling this property will allow the popover to be rendered in the root stack context using\n * [React Portals](https://reactjs.org/docs/portals.html).\n * Enable this setting if you need the popover to ignore its parent stacking context.\n */\n popoverRenderWithPortal?: boolean;\n\n /**\n * Renders the copy to clipboard button as disabled and prevents clicks.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the copy to clipboard button is disabled (only when `disabled` is `true`).\n * If provided, the copy to clipboard button becomes focusable.\n * Applicable for all variants except inline.\n */\n disabledReason?: string;\n}\n\nexport namespace CopyToClipboardProps {\n export type Variant = 'button' | 'icon' | 'inline';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/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 { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface CopyToClipboardProps extends BaseComponentProps {\n /** Determines the general styling of the copy button as follows:\n *\n * * `button` to display a standalone secondary button with an icon, and `copyButtonText` as text.\n * * `icon` to display a standalone icon-only (no text) button.\n * * `inline` to display an icon-only (no text) button within a text context.\n *\n * Defaults to `button`.\n */\n variant?: CopyToClipboardProps.Variant;\n\n /**\n * The text of the copy button (for variant=\"button\").\n */\n copyButtonText?: string;\n\n /**\n * Adds `aria-label` to the copy button. Use this to provide an accessible name for buttons that don't have visible text,\n * and to distinguish between multiple buttons with identical visible text. The text will also be added to the `title` attribute of the button.\n */\n copyButtonAriaLabel?: string;\n\n /**\n * The text content to be copied. It is displayed next to the copy button when `variant=\"inline\"` unless when `content` is specified, and is not shown otherwise.\n */\n textToCopy: string;\n\n /**\n * The text content to display next to the copy button when `variant=\"inline\"`. If not provided, `textToCopy` will be displayed instead.\n */\n textToDisplay?: string;\n\n /**\n * The message shown when the text is copied successfully.\n */\n copySuccessText: string;\n\n /**\n * The message shown when the text is not copied due to an error, see [https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext](https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext).\n */\n copyErrorText: string;\n\n /**\n * By default, the popover is constrained to fit inside its parent\n * [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context).\n * Enabling this property will allow the popover to be rendered in the root stack context using\n * [React Portals](https://reactjs.org/docs/portals.html).\n * Enable this setting if you need the popover to ignore its parent stacking context.\n */\n popoverRenderWithPortal?: boolean;\n\n /**\n * Renders the copy to clipboard button as disabled and prevents clicks.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the copy to clipboard button is disabled (only when `disabled` is `true`).\n * If provided, the copy to clipboard button becomes focusable.\n * Applicable for all variants except inline.\n */\n disabledReason?: string;\n\n /**\n * Called when the text is successfully copied to the clipboard.\n * The event `detail` contains the text that was copied.\n */\n onCopySuccess?: NonCancelableEventHandler<CopyToClipboardProps.CopySuccessDetail>;\n\n /**\n * Called when the copy operation fails.\n * The event `detail` contains the text that failed to copy.\n */\n onCopyFailure?: NonCancelableEventHandler<CopyToClipboardProps.CopyFailureDetail>;\n}\n\nexport namespace CopyToClipboardProps {\n export type Variant = 'button' | 'icon' | 'inline';\n\n export interface CopySuccessDetail {\n /** The text that was copied to the clipboard */\n text: string;\n }\n\n export interface CopyFailureDetail {\n /** The text that failed to copy to the clipboard */\n text: string;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAKpD,UAAU,4BAA6B,SAAQ,oBAAoB,EAAE,0BAA0B;CAAG;AAElG,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,OAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,uBAAuB,EACvB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,4BAA4B,eAmG9B"}
|
|
@@ -4,11 +4,12 @@ import React, { useEffect, useState } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import InternalButton from '../button/internal';
|
|
6
6
|
import { getBaseProps } from '../internal/base-component';
|
|
7
|
+
import { fireNonCancelableEvent } from '../internal/events';
|
|
7
8
|
import InternalPopover from '../popover/internal';
|
|
8
9
|
import InternalStatusIndicator from '../status-indicator/internal';
|
|
9
10
|
import styles from './styles.css.js';
|
|
10
11
|
import testStyles from './test-classes/styles.css.js';
|
|
11
|
-
export default function InternalCopyToClipboard({ variant = 'button', copyButtonAriaLabel, copyButtonText, copySuccessText, copyErrorText, textToCopy, textToDisplay, popoverRenderWithPortal, disabled, disabledReason, __internalRootRef, ...restProps }) {
|
|
12
|
+
export default function InternalCopyToClipboard({ variant = 'button', copyButtonAriaLabel, copyButtonText, copySuccessText, copyErrorText, textToCopy, textToDisplay, popoverRenderWithPortal, disabled, disabledReason, onCopySuccess, onCopyFailure, __internalRootRef, ...restProps }) {
|
|
12
13
|
const [status, setStatus] = useState('success');
|
|
13
14
|
const [statusText, setStatusText] = useState(copySuccessText);
|
|
14
15
|
useEffect(() => {
|
|
@@ -32,6 +33,7 @@ export default function InternalCopyToClipboard({ variant = 'button', copyButton
|
|
|
32
33
|
// The clipboard API is not available in insecure contexts.
|
|
33
34
|
setStatus('error');
|
|
34
35
|
setStatusText(copyErrorText);
|
|
36
|
+
fireNonCancelableEvent(onCopyFailure, { text: textToCopy });
|
|
35
37
|
return;
|
|
36
38
|
}
|
|
37
39
|
navigator.clipboard
|
|
@@ -39,10 +41,12 @@ export default function InternalCopyToClipboard({ variant = 'button', copyButton
|
|
|
39
41
|
.then(() => {
|
|
40
42
|
setStatus('success');
|
|
41
43
|
setStatusText(copySuccessText);
|
|
44
|
+
fireNonCancelableEvent(onCopySuccess, { text: textToCopy });
|
|
42
45
|
})
|
|
43
46
|
.catch(() => {
|
|
44
47
|
setStatus('error');
|
|
45
48
|
setStatusText(copyErrorText);
|
|
49
|
+
fireNonCancelableEvent(onCopyFailure, { text: textToCopy });
|
|
46
50
|
});
|
|
47
51
|
};
|
|
48
52
|
const triggerVariant = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AAGnE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAItD,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,OAAO,GAAG,QAAQ,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,uBAAuB,EACvB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,GAAG,SAAS,EACiB;IAC7B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAkC,SAAS,CAAC,CAAC;IACjF,MAA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E,MAAM,CAAC,0BAA0B,CAAC,IAAG,OAAO,CAAQ;QACrE,8BAAM,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC,IAC7E,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,UAAU,CACvB,CACF,CACR,CAAC,CAAC,CAAC,CACF,OAAO,CACR,CACI,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalButton from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport InternalPopover from '../popover/internal';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { CopyToClipboardProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\ninterface InternalCopyToClipboardProps extends CopyToClipboardProps, InternalBaseComponentProps {}\n\nexport default function InternalCopyToClipboard({\n variant = 'button',\n copyButtonAriaLabel,\n copyButtonText,\n copySuccessText,\n copyErrorText,\n textToCopy,\n textToDisplay,\n popoverRenderWithPortal,\n disabled,\n disabledReason,\n onCopySuccess,\n onCopyFailure,\n __internalRootRef,\n ...restProps\n}: InternalCopyToClipboardProps) {\n const [status, setStatus] = useState<'pending' | 'success' | 'error'>('success');\n const [statusText, setStatusText] = useState(copySuccessText);\n\n useEffect(() => {\n if (navigator.permissions) {\n navigator.permissions\n .query({ name: 'clipboard-write' as PermissionName })\n .then(result => {\n if (result.state === 'denied') {\n setStatus('error');\n setStatusText(copyErrorText);\n }\n })\n .catch(() => {\n // Permissions API not supported or failed.\n });\n }\n }, [copyErrorText]);\n\n const baseProps = getBaseProps(restProps);\n const onClick = () => {\n if (!navigator.clipboard) {\n // The clipboard API is not available in insecure contexts.\n setStatus('error');\n setStatusText(copyErrorText);\n fireNonCancelableEvent(onCopyFailure, { text: textToCopy });\n return;\n }\n\n navigator.clipboard\n .writeText(textToCopy)\n .then(() => {\n setStatus('success');\n setStatusText(copySuccessText);\n fireNonCancelableEvent(onCopySuccess, { text: textToCopy });\n })\n .catch(() => {\n setStatus('error');\n setStatusText(copyErrorText);\n fireNonCancelableEvent(onCopyFailure, { text: textToCopy });\n });\n };\n\n const triggerVariant = (\n {\n button: 'normal',\n icon: 'icon',\n inline: 'inline-icon',\n } as const\n )[variant];\n\n const isInline = variant === 'inline';\n\n const button = (\n <InternalButton\n ariaLabel={copyButtonAriaLabel ?? copyButtonText}\n iconName=\"copy\"\n variant={triggerVariant}\n wrapText={false}\n formAction=\"none\"\n disabled={disabled}\n disabledReason={disabledReason}\n >\n {copyButtonText}\n </InternalButton>\n );\n\n const trigger = disabled ? (\n button\n ) : (\n <InternalPopover\n isInline={isInline}\n size=\"medium\"\n position=\"top\"\n triggerType=\"custom\"\n dismissButton={false}\n renderWithPortal={popoverRenderWithPortal}\n content={<InternalStatusIndicator type={status}>{statusText}</InternalStatusIndicator>}\n __onOpen={onClick}\n >\n {button}\n </InternalPopover>\n );\n\n return (\n <span {...baseProps} ref={__internalRootRef} className={clsx(baseProps.className, styles.root, testStyles.root)}>\n {isInline ? (\n <span className={styles['inline-container']}>\n <span className={styles['inline-container-trigger']}>{trigger}</span>\n <span className={clsx(testStyles['text-to-display'], testStyles['text-to-copy'])}>\n {textToDisplay ?? textToCopy}\n </span>\n </span>\n ) : (\n trigger\n )}\n </span>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sticky-footer.d.ts","sourceRoot":"","sources":["../../../src/drawer/use-sticky-footer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"use-sticky-footer.d.ts","sourceRoot":"","sources":["../../../src/drawer/use-sticky-footer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AAQzD,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAG5C,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,SAAS,GACV,EAAE;IACD,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAClC,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;CACnC;;EA4BA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { useCallback,
|
|
3
|
+
import { useCallback, useState } from 'react';
|
|
4
|
+
import { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';
|
|
4
5
|
import { throttle } from '../internal/utils/throttle';
|
|
5
6
|
// Minimum scrollable space is the space other than the sticky content, for instance for a sticky footer it's the
|
|
6
7
|
// the space other than that, which would be drawer height minus footer height.
|
|
@@ -22,14 +23,7 @@ export function useStickyFooter({ drawerRef, footerRef, }) {
|
|
|
22
23
|
const hasEnoughSpace = scrollableHeight >= MINIMUM_SCROLLABLE_SPACE;
|
|
23
24
|
setIsSticky(hasEnoughSpace);
|
|
24
25
|
}, [footerRef, drawerRef]), STICKY_STATE_CHECK_THROTTLE_DELAY);
|
|
25
|
-
|
|
26
|
-
window.addEventListener('resize', checkStickyState);
|
|
27
|
-
checkStickyState();
|
|
28
|
-
return () => {
|
|
29
|
-
window.removeEventListener('resize', checkStickyState);
|
|
30
|
-
checkStickyState.cancel();
|
|
31
|
-
};
|
|
32
|
-
}, [checkStickyState]);
|
|
26
|
+
useResizeObserver(() => { var _a, _b; return (_b = (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) !== null && _b !== void 0 ? _b : null; }, checkStickyState);
|
|
33
27
|
return { isSticky };
|
|
34
28
|
}
|
|
35
29
|
//# sourceMappingURL=use-sticky-footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sticky-footer.js","sourceRoot":"","sources":["../../../src/drawer/use-sticky-footer.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAa,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"use-sticky-footer.js","sourceRoot":"","sources":["../../../src/drawer/use-sticky-footer.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAa,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,iHAAiH;AACjH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,MAAM,iCAAiC,GAAG,GAAG,CAAC,CAAC,0BAA0B;AAEzE,MAAM,UAAU,eAAe,CAAC,EAC9B,SAAS,EACT,SAAS,GAIV;IACC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,gBAAgB,GAAG,QAAQ,CAC/B,WAAW,CAAC,GAAG,EAAE;QACf,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;YAC7C,OAAO;QACT,CAAC;QAED,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC;QACtD,MAAM,mBAAmB,GAAG,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,qBAAqB,GAAG,MAAM,CAAC;QAC1E,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;QACtE,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,mBAAmB,aAAnB,mBAAmB,cAAnB,mBAAmB,GAAI,YAAY,EAAE,YAAY,CAAC,CAAC;QAEpF,2CAA2C;QAC3C,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;QAEtE,MAAM,gBAAgB,GAAG,eAAe,GAAG,YAAY,CAAC;QACxD,MAAM,cAAc,GAAG,gBAAgB,IAAI,wBAAwB,CAAC;QAEpE,WAAW,CAAC,cAAc,CAAC,CAAC;IAC9B,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,EAC1B,iCAAiC,CAClC,CAAC;IAEF,iBAAiB,CAAC,GAAG,EAAE,eAAC,OAAA,MAAA,MAAA,SAAS,CAAC,OAAO,0CAAE,aAAa,mCAAI,IAAI,CAAA,EAAA,EAAE,gBAAgB,CAAC,CAAC;IAEpF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACtB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { RefObject, useCallback, useState } from 'react';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { throttle } from '../internal/utils/throttle';\n\n// Minimum scrollable space is the space other than the sticky content, for instance for a sticky footer it's the\n// the space other than that, which would be drawer height minus footer height.\nexport const MINIMUM_SCROLLABLE_SPACE = 148;\nconst STICKY_STATE_CHECK_THROTTLE_DELAY = 100; // every tenth of a second\n\nexport function useStickyFooter({\n drawerRef,\n footerRef,\n}: {\n drawerRef: RefObject<HTMLElement>;\n footerRef: RefObject<HTMLElement>;\n}) {\n const [isSticky, setIsSticky] = useState(true);\n\n const checkStickyState = throttle(\n useCallback(() => {\n if (!drawerRef.current || !footerRef.current) {\n return;\n }\n\n const parentElement = drawerRef.current.parentElement;\n const parentElementHeight = parentElement?.getBoundingClientRect().height;\n const drawerHeight = drawerRef.current.getBoundingClientRect().height;\n const effectiveHeight = Math.min(parentElementHeight ?? drawerHeight, drawerHeight);\n\n // take minimum of drawer and parent height\n const footerHeight = footerRef.current.getBoundingClientRect().height;\n\n const scrollableHeight = effectiveHeight - footerHeight;\n const hasEnoughSpace = scrollableHeight >= MINIMUM_SCROLLABLE_SPACE;\n\n setIsSticky(hasEnoughSpace);\n }, [footerRef, drawerRef]),\n STICKY_STATE_CHECK_THROTTLE_DELAY\n );\n\n useResizeObserver(() => drawerRef.current?.parentElement ?? null, checkStickyState);\n\n return { isSticky };\n}\n"]}
|
|
@@ -701,7 +701,7 @@ body {
|
|
|
701
701
|
--space-table-header-tools-bottom-d9u5kf:0px;
|
|
702
702
|
--space-table-header-tools-full-page-bottom-9m47g6:4px;
|
|
703
703
|
--space-table-horizontal-suurzj:var(--space-container-horizontal-nqrzyh);
|
|
704
|
-
--space-tree-view-indentation-
|
|
704
|
+
--space-tree-view-indentation-xh9kis:var(--space-xl-jfy3x4);
|
|
705
705
|
--space-tile-gutter-bi2bdv:var(--space-xl-jfy3x4);
|
|
706
706
|
--space-scaled-2x-xxs-e79hr1:var(--space-xxs-hwfkai);
|
|
707
707
|
--space-scaled-2x-m-4euqsk:var(--space-m-dsumyt);
|
|
@@ -2004,5 +2004,5 @@ body {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
2006
|
:root {
|
|
2007
|
-
--awsui-version-info-
|
|
2007
|
+
--awsui-version-info-eadf44c3: true;
|
|
2008
2008
|
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"direction-button-wrapper": "awsui_direction-button-
|
|
5
|
-
"direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-
|
|
6
|
-
"direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-
|
|
7
|
-
"direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-
|
|
8
|
-
"direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-
|
|
9
|
-
"drag-handle-entry": "awsui_drag-handle-
|
|
10
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
11
|
-
"drag-handle-exit": "awsui_drag-handle-
|
|
12
|
-
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-
|
|
13
|
-
"direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-
|
|
14
|
-
"direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-
|
|
15
|
-
"direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-
|
|
16
|
-
"direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-
|
|
17
|
-
"contents": "
|
|
18
|
-
"portal-overlay": "awsui_portal-
|
|
19
|
-
"portal-overlay-disabled": "awsui_portal-overlay-
|
|
20
|
-
"portal-overlay-contents": "awsui_portal-overlay-
|
|
21
|
-
"drag-handle": "awsui_drag-
|
|
22
|
-
"direction-button-wrapper-hidden": "awsui_direction-button-wrapper-
|
|
23
|
-
"direction-button-wrapper-forced": "awsui_direction-button-wrapper-
|
|
24
|
-
"direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-
|
|
25
|
-
"direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-
|
|
26
|
-
"direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-
|
|
27
|
-
"direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-
|
|
28
|
-
"direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-
|
|
29
|
-
"direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-
|
|
30
|
-
"direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-
|
|
31
|
-
"direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-
|
|
32
|
-
"direction-button": "awsui_direction-
|
|
33
|
-
"direction-button-disabled": "awsui_direction-button-
|
|
4
|
+
"direction-button-wrapper": "awsui_direction-button-wrapper_155yk_yyyo1_169",
|
|
5
|
+
"direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_yyyo1_189",
|
|
6
|
+
"direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_yyyo1_189",
|
|
7
|
+
"direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_yyyo1_189",
|
|
8
|
+
"direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_yyyo1_189",
|
|
9
|
+
"drag-handle-entry": "awsui_drag-handle-entry_155yk_yyyo1_1",
|
|
10
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_yyyo1_1",
|
|
11
|
+
"drag-handle-exit": "awsui_drag-handle-exit_155yk_yyyo1_1",
|
|
12
|
+
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_yyyo1_1",
|
|
13
|
+
"direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_yyyo1_229",
|
|
14
|
+
"direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_yyyo1_233",
|
|
15
|
+
"direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_yyyo1_237",
|
|
16
|
+
"direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_yyyo1_248",
|
|
17
|
+
"contents": "awsui_contents_155yk_yyyo1_259",
|
|
18
|
+
"portal-overlay": "awsui_portal-overlay_155yk_yyyo1_263",
|
|
19
|
+
"portal-overlay-disabled": "awsui_portal-overlay-disabled_155yk_yyyo1_271",
|
|
20
|
+
"portal-overlay-contents": "awsui_portal-overlay-contents_155yk_yyyo1_275",
|
|
21
|
+
"drag-handle": "awsui_drag-handle_155yk_yyyo1_279",
|
|
22
|
+
"direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_yyyo1_292",
|
|
23
|
+
"direction-button-wrapper-forced": "awsui_direction-button-wrapper-forced_155yk_yyyo1_316",
|
|
24
|
+
"direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-0_155yk_yyyo1_320",
|
|
25
|
+
"direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-1_155yk_yyyo1_324",
|
|
26
|
+
"direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-2_155yk_yyyo1_328",
|
|
27
|
+
"direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-3_155yk_yyyo1_332",
|
|
28
|
+
"direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-0_155yk_yyyo1_336",
|
|
29
|
+
"direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-1_155yk_yyyo1_340",
|
|
30
|
+
"direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-2_155yk_yyyo1_344",
|
|
31
|
+
"direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-3_155yk_yyyo1_348",
|
|
32
|
+
"direction-button": "awsui_direction-button_155yk_yyyo1_169",
|
|
33
|
+
"direction-button-disabled": "awsui_direction-button-disabled_155yk_yyyo1_371"
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -150,7 +150,7 @@ 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
|
-
@keyframes awsui_drag-handle-
|
|
153
|
+
@keyframes awsui_drag-handle-entry_155yk_yyyo1_1 {
|
|
154
154
|
from {
|
|
155
155
|
transform: translate(var(--awsui-drag-handle-animation-inline-offset-rhu47t), var(--awsui-drag-handle-animation-block-offset-rhu47t));
|
|
156
156
|
}
|
|
@@ -158,7 +158,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
158
158
|
transform: translate(0, 0);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
@keyframes awsui_drag-handle-
|
|
161
|
+
@keyframes awsui_drag-handle-exit_155yk_yyyo1_1 {
|
|
162
162
|
from {
|
|
163
163
|
transform: translate(0, 0);
|
|
164
164
|
}
|
|
@@ -166,11 +166,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
166
166
|
transform: translate(var(--awsui-drag-handle-animation-inline-offset-rhu47t), var(--awsui-drag-handle-animation-block-offset-rhu47t));
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
.awsui_direction-button-
|
|
169
|
+
.awsui_direction-button-wrapper_155yk_yyyo1_169:not(#\9) {
|
|
170
170
|
--awsui-drag-handle-animation-inline-offset-rhu47t: 0;
|
|
171
171
|
--awsui-drag-handle-animation-block-offset-rhu47t: 0;
|
|
172
172
|
}
|
|
173
|
-
@keyframes awsui_awsui-motion-fade-
|
|
173
|
+
@keyframes awsui_awsui-motion-fade-in_155yk_yyyo1_1 {
|
|
174
174
|
from {
|
|
175
175
|
opacity: 0.2;
|
|
176
176
|
}
|
|
@@ -178,7 +178,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
178
178
|
opacity: 1;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
@keyframes awsui_awsui-motion-fade-out-
|
|
181
|
+
@keyframes awsui_awsui-motion-fade-out-0_155yk_yyyo1_1 {
|
|
182
182
|
from {
|
|
183
183
|
opacity: 1;
|
|
184
184
|
}
|
|
@@ -186,81 +186,81 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
opacity: 0;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
.awsui_direction-button-wrapper-motion-
|
|
189
|
+
.awsui_direction-button-wrapper-motion-enter_155yk_yyyo1_189:not(#\9), .awsui_direction-button-wrapper-motion-entering_155yk_yyyo1_189:not(#\9), .awsui_direction-button-wrapper-motion-exit_155yk_yyyo1_189:not(#\9), .awsui_direction-button-wrapper-motion-exiting_155yk_yyyo1_189:not(#\9) {
|
|
190
190
|
pointer-events: none;
|
|
191
191
|
}
|
|
192
|
-
.awsui_direction-button-wrapper-motion-
|
|
193
|
-
animation: awsui_drag-handle-
|
|
192
|
+
.awsui_direction-button-wrapper-motion-entering_155yk_yyyo1_189:not(#\9) {
|
|
193
|
+
animation: awsui_drag-handle-entry_155yk_yyyo1_1 var(--motion-duration-complex-tbdo30, 250ms) var(--motion-easing-responsive-hjj3ai, cubic-bezier(0, 0, 0, 1)), awsui_awsui-motion-fade-in_155yk_yyyo1_1 var(--motion-duration-complex-tbdo30, 250ms) var(--motion-easing-responsive-hjj3ai, cubic-bezier(0, 0, 0, 1));
|
|
194
194
|
}
|
|
195
195
|
@media (prefers-reduced-motion: reduce) {
|
|
196
|
-
.awsui_direction-button-wrapper-motion-
|
|
196
|
+
.awsui_direction-button-wrapper-motion-entering_155yk_yyyo1_189:not(#\9) {
|
|
197
197
|
animation: none;
|
|
198
198
|
transition: none;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-
|
|
201
|
+
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-entering_155yk_yyyo1_189:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-entering_155yk_yyyo1_189:not(#\9) {
|
|
202
202
|
animation: none;
|
|
203
203
|
transition: none;
|
|
204
204
|
}
|
|
205
|
-
.awsui_direction-button-wrapper-motion-
|
|
206
|
-
animation: awsui_drag-handle-
|
|
205
|
+
.awsui_direction-button-wrapper-motion-exiting_155yk_yyyo1_189:not(#\9) {
|
|
206
|
+
animation: awsui_drag-handle-exit_155yk_yyyo1_1 var(--motion-duration-complex-tbdo30, 250ms) var(--motion-easing-responsive-hjj3ai, cubic-bezier(0, 0, 0, 1)) forwards, awsui_awsui-motion-fade-out-0_155yk_yyyo1_1 var(--motion-duration-complex-tbdo30, 250ms) var(--motion-easing-responsive-hjj3ai, cubic-bezier(0, 0, 0, 1)) forwards;
|
|
207
207
|
}
|
|
208
208
|
@media (prefers-reduced-motion: reduce) {
|
|
209
|
-
.awsui_direction-button-wrapper-motion-
|
|
209
|
+
.awsui_direction-button-wrapper-motion-exiting_155yk_yyyo1_189:not(#\9) {
|
|
210
210
|
animation: none;
|
|
211
211
|
transition: none;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-
|
|
214
|
+
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-exiting_155yk_yyyo1_189:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-exiting_155yk_yyyo1_189:not(#\9) {
|
|
215
215
|
animation: none;
|
|
216
216
|
transition: none;
|
|
217
217
|
}
|
|
218
218
|
@media (prefers-reduced-motion: reduce) {
|
|
219
|
-
.awsui_direction-button-
|
|
219
|
+
.awsui_direction-button-wrapper_155yk_yyyo1_169:not(#\9) {
|
|
220
220
|
animation: none;
|
|
221
221
|
transition: none;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
.awsui-motion-disabled .awsui_direction-button-
|
|
224
|
+
.awsui-motion-disabled .awsui_direction-button-wrapper_155yk_yyyo1_169:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper_155yk_yyyo1_169:not(#\9) {
|
|
225
225
|
animation: none;
|
|
226
226
|
transition: none;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
.awsui_direction-button-wrapper-block-
|
|
229
|
+
.awsui_direction-button-wrapper-block-start_155yk_yyyo1_229:not(#\9) {
|
|
230
230
|
--awsui-drag-handle-animation-block-offset-rhu47t: 20px;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
.awsui_direction-button-wrapper-block-
|
|
233
|
+
.awsui_direction-button-wrapper-block-end_155yk_yyyo1_233:not(#\9) {
|
|
234
234
|
--awsui-drag-handle-animation-block-offset-rhu47t: -20px;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
.awsui_direction-button-wrapper-inline-
|
|
237
|
+
.awsui_direction-button-wrapper-inline-start_155yk_yyyo1_237:not(#\9) {
|
|
238
238
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
239
239
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
240
240
|
}
|
|
241
|
-
.awsui_direction-button-wrapper-inline-
|
|
241
|
+
.awsui_direction-button-wrapper-inline-start_155yk_yyyo1_237:not(#\9):dir(ltr) {
|
|
242
242
|
--awsui-drag-handle-animation-inline-offset-rhu47t: 20px;
|
|
243
243
|
}
|
|
244
|
-
.awsui_direction-button-wrapper-inline-
|
|
244
|
+
.awsui_direction-button-wrapper-inline-start_155yk_yyyo1_237:not(#\9):dir(rtl) {
|
|
245
245
|
--awsui-drag-handle-animation-inline-offset-rhu47t: -20px;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
.awsui_direction-button-wrapper-inline-
|
|
248
|
+
.awsui_direction-button-wrapper-inline-end_155yk_yyyo1_248:not(#\9) {
|
|
249
249
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
250
250
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
251
251
|
}
|
|
252
|
-
.awsui_direction-button-wrapper-inline-
|
|
252
|
+
.awsui_direction-button-wrapper-inline-end_155yk_yyyo1_248:not(#\9):dir(ltr) {
|
|
253
253
|
--awsui-drag-handle-animation-inline-offset-rhu47t: -20px;
|
|
254
254
|
}
|
|
255
|
-
.awsui_direction-button-wrapper-inline-
|
|
255
|
+
.awsui_direction-button-wrapper-inline-end_155yk_yyyo1_248:not(#\9):dir(rtl) {
|
|
256
256
|
--awsui-drag-handle-animation-inline-offset-rhu47t: 20px;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
.
|
|
259
|
+
.awsui_contents_155yk_yyyo1_259:not(#\9) {
|
|
260
260
|
display: contents;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
.awsui_portal-
|
|
263
|
+
.awsui_portal-overlay_155yk_yyyo1_263:not(#\9) {
|
|
264
264
|
position: absolute;
|
|
265
265
|
inset-block-start: 0;
|
|
266
266
|
inset-inline-start: 0;
|
|
@@ -268,20 +268,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
268
268
|
z-index: 7000;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
.awsui_portal-overlay-
|
|
271
|
+
.awsui_portal-overlay-disabled_155yk_yyyo1_271:not(#\9) {
|
|
272
272
|
display: none;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
.awsui_portal-overlay-
|
|
275
|
+
.awsui_portal-overlay-contents_155yk_yyyo1_275:not(#\9) {
|
|
276
276
|
pointer-events: auto;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
.awsui_drag-
|
|
279
|
+
.awsui_drag-handle_155yk_yyyo1_279:not(#\9) {
|
|
280
280
|
position: relative;
|
|
281
281
|
display: inline-flex;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
.awsui_direction-button-
|
|
284
|
+
.awsui_direction-button-wrapper_155yk_yyyo1_169:not(#\9) {
|
|
285
285
|
position: absolute;
|
|
286
286
|
block-size: var(--space-static-xl-4tedi6, 24px);
|
|
287
287
|
inline-size: var(--space-static-xl-4tedi6, 24px);
|
|
@@ -289,67 +289,67 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
289
289
|
padding-inline: var(--space-static-xxs-ns94dp, 4px);
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
.awsui_direction-button-wrapper-
|
|
292
|
+
.awsui_direction-button-wrapper-hidden_155yk_yyyo1_292:not(#\9) {
|
|
293
293
|
display: none;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.awsui_direction-button-wrapper-block-
|
|
296
|
+
.awsui_direction-button-wrapper-block-start_155yk_yyyo1_229:not(#\9) {
|
|
297
297
|
inset-block-start: calc(-1 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
298
298
|
inset-inline-start: calc(50% - (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)) / 2);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
.awsui_direction-button-wrapper-block-
|
|
301
|
+
.awsui_direction-button-wrapper-block-end_155yk_yyyo1_233:not(#\9) {
|
|
302
302
|
inset-block-end: calc(-1 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
303
303
|
inset-inline-start: calc(50% - (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)) / 2);
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.awsui_direction-button-wrapper-inline-
|
|
306
|
+
.awsui_direction-button-wrapper-inline-start_155yk_yyyo1_237:not(#\9) {
|
|
307
307
|
inset-inline-start: calc(-1 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
308
308
|
inset-block-start: calc(50% - (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)) / 2);
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
.awsui_direction-button-wrapper-inline-
|
|
311
|
+
.awsui_direction-button-wrapper-inline-end_155yk_yyyo1_248:not(#\9) {
|
|
312
312
|
inset-inline-end: calc(-1 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
313
313
|
inset-block-start: calc(50% - (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)) / 2);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
.awsui_direction-button-wrapper-
|
|
316
|
+
.awsui_direction-button-wrapper-forced_155yk_yyyo1_316:not(#\9) {
|
|
317
317
|
inset-inline-start: calc(50% - (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)) / 2);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
.awsui_direction-button-wrapper-forced-top-
|
|
320
|
+
.awsui_direction-button-wrapper-forced-top-0_155yk_yyyo1_320:not(#\9) {
|
|
321
321
|
inset-block-start: calc(-1 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
.awsui_direction-button-wrapper-forced-top-
|
|
324
|
+
.awsui_direction-button-wrapper-forced-top-1_155yk_yyyo1_324:not(#\9) {
|
|
325
325
|
inset-block-start: calc(-2 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
.awsui_direction-button-wrapper-forced-top-
|
|
328
|
+
.awsui_direction-button-wrapper-forced-top-2_155yk_yyyo1_328:not(#\9) {
|
|
329
329
|
inset-block-start: calc(-3 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
.awsui_direction-button-wrapper-forced-top-
|
|
332
|
+
.awsui_direction-button-wrapper-forced-top-3_155yk_yyyo1_332:not(#\9) {
|
|
333
333
|
inset-block-start: calc(-4 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
.awsui_direction-button-wrapper-forced-bottom-
|
|
337
|
-
inset-block-start: calc(1 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px))
|
|
336
|
+
.awsui_direction-button-wrapper-forced-bottom-0_155yk_yyyo1_336:not(#\9) {
|
|
337
|
+
inset-block-start: calc(1 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
.awsui_direction-button-wrapper-forced-bottom-
|
|
341
|
-
inset-block-start: calc(2 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px))
|
|
340
|
+
.awsui_direction-button-wrapper-forced-bottom-1_155yk_yyyo1_340:not(#\9) {
|
|
341
|
+
inset-block-start: calc(2 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
.awsui_direction-button-wrapper-forced-bottom-
|
|
345
|
-
inset-block-start: calc(3 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px))
|
|
344
|
+
.awsui_direction-button-wrapper-forced-bottom-2_155yk_yyyo1_344:not(#\9) {
|
|
345
|
+
inset-block-start: calc(3 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
.awsui_direction-button-wrapper-forced-bottom-
|
|
349
|
-
inset-block-start: calc(4 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px))
|
|
348
|
+
.awsui_direction-button-wrapper-forced-bottom-3_155yk_yyyo1_348:not(#\9) {
|
|
349
|
+
inset-block-start: calc(4 * (var(--space-static-xl-4tedi6, 24px) + 2 * var(--space-static-xxs-ns94dp, 4px)));
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
.awsui_direction-
|
|
352
|
+
.awsui_direction-button_155yk_yyyo1_169:not(#\9) {
|
|
353
353
|
position: absolute;
|
|
354
354
|
border-width: 0;
|
|
355
355
|
cursor: pointer;
|
|
@@ -368,14 +368,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
368
368
|
color: var(--color-text-direction-button-default-p88lvb, #ffffff);
|
|
369
369
|
box-shadow: var(--shadow-dropdown-isf0w4, 0px 4px 20px 1px rgba(0, 7, 22, 0.1));
|
|
370
370
|
}
|
|
371
|
-
.awsui_direction-
|
|
371
|
+
.awsui_direction-button_155yk_yyyo1_169:not(#\9):not(.awsui_direction-button-disabled_155yk_yyyo1_371):hover {
|
|
372
372
|
background-color: var(--color-background-direction-button-hover-74n5o1, #333843);
|
|
373
373
|
}
|
|
374
|
-
.awsui_direction-
|
|
374
|
+
.awsui_direction-button_155yk_yyyo1_169:not(#\9):not(.awsui_direction-button-disabled_155yk_yyyo1_371):active {
|
|
375
375
|
background-color: var(--color-background-direction-button-active-lvo0dy, #232b37);
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
.awsui_direction-button-
|
|
378
|
+
.awsui_direction-button-disabled_155yk_yyyo1_371:not(#\9) {
|
|
379
379
|
cursor: default;
|
|
380
380
|
background-color: var(--color-background-direction-button-disabled-s9x4zq, #ebebf0);
|
|
381
381
|
color: var(--color-text-direction-button-disabled-2jds36, #b4b4bb);
|
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"direction-button-wrapper": "awsui_direction-button-
|
|
6
|
-
"direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-
|
|
7
|
-
"direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-
|
|
8
|
-
"direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-
|
|
9
|
-
"direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-
|
|
10
|
-
"drag-handle-entry": "awsui_drag-handle-
|
|
11
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
12
|
-
"drag-handle-exit": "awsui_drag-handle-
|
|
13
|
-
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-
|
|
14
|
-
"direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-
|
|
15
|
-
"direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-
|
|
16
|
-
"direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-
|
|
17
|
-
"direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-
|
|
18
|
-
"contents": "
|
|
19
|
-
"portal-overlay": "awsui_portal-
|
|
20
|
-
"portal-overlay-disabled": "awsui_portal-overlay-
|
|
21
|
-
"portal-overlay-contents": "awsui_portal-overlay-
|
|
22
|
-
"drag-handle": "awsui_drag-
|
|
23
|
-
"direction-button-wrapper-hidden": "awsui_direction-button-wrapper-
|
|
24
|
-
"direction-button-wrapper-forced": "awsui_direction-button-wrapper-
|
|
25
|
-
"direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-
|
|
26
|
-
"direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-
|
|
27
|
-
"direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-
|
|
28
|
-
"direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-
|
|
29
|
-
"direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-
|
|
30
|
-
"direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-
|
|
31
|
-
"direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-
|
|
32
|
-
"direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-
|
|
33
|
-
"direction-button": "awsui_direction-
|
|
34
|
-
"direction-button-disabled": "awsui_direction-button-
|
|
5
|
+
"direction-button-wrapper": "awsui_direction-button-wrapper_155yk_yyyo1_169",
|
|
6
|
+
"direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_yyyo1_189",
|
|
7
|
+
"direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_yyyo1_189",
|
|
8
|
+
"direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_yyyo1_189",
|
|
9
|
+
"direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_yyyo1_189",
|
|
10
|
+
"drag-handle-entry": "awsui_drag-handle-entry_155yk_yyyo1_1",
|
|
11
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_yyyo1_1",
|
|
12
|
+
"drag-handle-exit": "awsui_drag-handle-exit_155yk_yyyo1_1",
|
|
13
|
+
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_yyyo1_1",
|
|
14
|
+
"direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_yyyo1_229",
|
|
15
|
+
"direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_yyyo1_233",
|
|
16
|
+
"direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_yyyo1_237",
|
|
17
|
+
"direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_yyyo1_248",
|
|
18
|
+
"contents": "awsui_contents_155yk_yyyo1_259",
|
|
19
|
+
"portal-overlay": "awsui_portal-overlay_155yk_yyyo1_263",
|
|
20
|
+
"portal-overlay-disabled": "awsui_portal-overlay-disabled_155yk_yyyo1_271",
|
|
21
|
+
"portal-overlay-contents": "awsui_portal-overlay-contents_155yk_yyyo1_275",
|
|
22
|
+
"drag-handle": "awsui_drag-handle_155yk_yyyo1_279",
|
|
23
|
+
"direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_yyyo1_292",
|
|
24
|
+
"direction-button-wrapper-forced": "awsui_direction-button-wrapper-forced_155yk_yyyo1_316",
|
|
25
|
+
"direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-0_155yk_yyyo1_320",
|
|
26
|
+
"direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-1_155yk_yyyo1_324",
|
|
27
|
+
"direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-2_155yk_yyyo1_328",
|
|
28
|
+
"direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-3_155yk_yyyo1_332",
|
|
29
|
+
"direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-0_155yk_yyyo1_336",
|
|
30
|
+
"direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-1_155yk_yyyo1_340",
|
|
31
|
+
"direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-2_155yk_yyyo1_344",
|
|
32
|
+
"direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-3_155yk_yyyo1_348",
|
|
33
|
+
"direction-button": "awsui_direction-button_155yk_yyyo1_169",
|
|
34
|
+
"direction-button-disabled": "awsui_direction-button-disabled_155yk_yyyo1_371"
|
|
35
35
|
};
|
|
36
36
|
|
package/internal/environment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (eadf44c3)";
|
|
3
|
+
export var GIT_SHA = "eadf44c3";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "core";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -752,7 +752,7 @@ export var spaceTableHeaderHorizontal = "var(--space-table-header-horizontal-kb5
|
|
|
752
752
|
export var spaceTableHeaderToolsBottom = "var(--space-table-header-tools-bottom-d9u5kf, 0px)";
|
|
753
753
|
export var spaceTableHeaderToolsFullPageBottom = "var(--space-table-header-tools-full-page-bottom-9m47g6, 4px)";
|
|
754
754
|
export var spaceTableHorizontal = "var(--space-table-horizontal-suurzj, 20px)";
|
|
755
|
-
export var spaceTreeViewIndentation = "var(--space-tree-view-indentation-
|
|
755
|
+
export var spaceTreeViewIndentation = "var(--space-tree-view-indentation-xh9kis, 24px)";
|
|
756
756
|
export var spaceTileGutter = "var(--space-tile-gutter-bi2bdv, 24px)";
|
|
757
757
|
export var spaceScaled2xNone = "var(--space-scaled-2x-none-987dp7, 0px)";
|
|
758
758
|
export var spaceScaled2xXxxs = "var(--space-scaled-2x-xxxs-reumxj, 2px)";
|
|
@@ -2765,8 +2765,8 @@ module.exports.preset = {
|
|
|
2765
2765
|
"compact": "{spaceContainerHorizontal}"
|
|
2766
2766
|
},
|
|
2767
2767
|
"spaceTreeViewIndentation": {
|
|
2768
|
-
"comfortable": "{
|
|
2769
|
-
"compact": "{
|
|
2768
|
+
"comfortable": "{spaceXl}",
|
|
2769
|
+
"compact": "{spaceXl}"
|
|
2770
2770
|
},
|
|
2771
2771
|
"spaceTileGutter": {
|
|
2772
2772
|
"comfortable": "{spaceXl}",
|
|
@@ -3235,8 +3235,8 @@ module.exports.preset = {
|
|
|
3235
3235
|
"compact": "{spaceContainerHorizontal}"
|
|
3236
3236
|
},
|
|
3237
3237
|
"spaceTreeViewIndentation": {
|
|
3238
|
-
"comfortable": "{
|
|
3239
|
-
"compact": "{
|
|
3238
|
+
"comfortable": "{spaceXl}",
|
|
3239
|
+
"compact": "{spaceXl}"
|
|
3240
3240
|
},
|
|
3241
3241
|
"spaceTileGutter": {
|
|
3242
3242
|
"comfortable": "{spaceXl}",
|
|
@@ -13577,7 +13577,7 @@ module.exports.preset = {
|
|
|
13577
13577
|
"spaceTableHeaderToolsBottom": "--space-table-header-tools-bottom-d9u5kf",
|
|
13578
13578
|
"spaceTableHeaderToolsFullPageBottom": "--space-table-header-tools-full-page-bottom-9m47g6",
|
|
13579
13579
|
"spaceTableHorizontal": "--space-table-horizontal-suurzj",
|
|
13580
|
-
"spaceTreeViewIndentation": "--space-tree-view-indentation-
|
|
13580
|
+
"spaceTreeViewIndentation": "--space-tree-view-indentation-xh9kis",
|
|
13581
13581
|
"spaceTileGutter": "--space-tile-gutter-bi2bdv",
|
|
13582
13582
|
"spaceScaled2xNone": "--space-scaled-2x-none-987dp7",
|
|
13583
13583
|
"spaceScaled2xXxxs": "--space-scaled-2x-xxxs-reumxj",
|
|
@@ -2765,8 +2765,8 @@ export var preset = {
|
|
|
2765
2765
|
"compact": "{spaceContainerHorizontal}"
|
|
2766
2766
|
},
|
|
2767
2767
|
"spaceTreeViewIndentation": {
|
|
2768
|
-
"comfortable": "{
|
|
2769
|
-
"compact": "{
|
|
2768
|
+
"comfortable": "{spaceXl}",
|
|
2769
|
+
"compact": "{spaceXl}"
|
|
2770
2770
|
},
|
|
2771
2771
|
"spaceTileGutter": {
|
|
2772
2772
|
"comfortable": "{spaceXl}",
|
|
@@ -3235,8 +3235,8 @@ export var preset = {
|
|
|
3235
3235
|
"compact": "{spaceContainerHorizontal}"
|
|
3236
3236
|
},
|
|
3237
3237
|
"spaceTreeViewIndentation": {
|
|
3238
|
-
"comfortable": "{
|
|
3239
|
-
"compact": "{
|
|
3238
|
+
"comfortable": "{spaceXl}",
|
|
3239
|
+
"compact": "{spaceXl}"
|
|
3240
3240
|
},
|
|
3241
3241
|
"spaceTileGutter": {
|
|
3242
3242
|
"comfortable": "{spaceXl}",
|
|
@@ -13577,7 +13577,7 @@ export var preset = {
|
|
|
13577
13577
|
"spaceTableHeaderToolsBottom": "--space-table-header-tools-bottom-d9u5kf",
|
|
13578
13578
|
"spaceTableHeaderToolsFullPageBottom": "--space-table-header-tools-full-page-bottom-9m47g6",
|
|
13579
13579
|
"spaceTableHorizontal": "--space-table-horizontal-suurzj",
|
|
13580
|
-
"spaceTreeViewIndentation": "--space-tree-view-indentation-
|
|
13580
|
+
"spaceTreeViewIndentation": "--space-tree-view-indentation-xh9kis",
|
|
13581
13581
|
"spaceTileGutter": "--space-tile-gutter-bi2bdv",
|
|
13582
13582
|
"spaceScaled2xNone": "--space-scaled-2x-none-987dp7",
|
|
13583
13583
|
"spaceScaled2xXxxs": "--space-scaled-2x-xxxs-reumxj",
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"./internal/base-component/index.js",
|
|
159
159
|
"./internal/base-component/styles.css.js"
|
|
160
160
|
],
|
|
161
|
-
"version": "3.0.
|
|
161
|
+
"version": "3.0.1171",
|
|
162
162
|
"repository": {
|
|
163
163
|
"type": "git",
|
|
164
164
|
"url": "https://github.com/cloudscape-design/components.git"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"treeitem-group": "awsui_treeitem-
|
|
5
|
-
"treeitem": "
|
|
6
|
-
"offset": "
|
|
7
|
-
"treeitem-content-wrapper": "awsui_treeitem-content-
|
|
8
|
-
"tree-item-focus-target": "awsui_tree-item-focus-
|
|
9
|
-
"expand-toggle-wrapper": "awsui_expand-toggle-
|
|
10
|
-
"toggle": "
|
|
11
|
-
"structured-item-wrapper": "awsui_structured-item-
|
|
12
|
-
"tree-item-structured-item": "awsui_tree-item-structured-
|
|
4
|
+
"treeitem-group": "awsui_treeitem-group_1agpu_c0a59_185",
|
|
5
|
+
"treeitem": "awsui_treeitem_1agpu_c0a59_185",
|
|
6
|
+
"offset": "awsui_offset_1agpu_c0a59_202",
|
|
7
|
+
"treeitem-content-wrapper": "awsui_treeitem-content-wrapper_1agpu_c0a59_205",
|
|
8
|
+
"tree-item-focus-target": "awsui_tree-item-focus-target_1agpu_c0a59_210",
|
|
9
|
+
"expand-toggle-wrapper": "awsui_expand-toggle-wrapper_1agpu_c0a59_231",
|
|
10
|
+
"toggle": "awsui_toggle_1agpu_c0a59_236",
|
|
11
|
+
"structured-item-wrapper": "awsui_structured-item-wrapper_1agpu_c0a59_242",
|
|
12
|
+
"tree-item-structured-item": "awsui_tree-item-structured-item_1agpu_c0a59_249"
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -182,7 +182,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
182
182
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
183
183
|
SPDX-License-Identifier: Apache-2.0
|
|
184
184
|
*/
|
|
185
|
-
.awsui_treeitem-
|
|
185
|
+
.awsui_treeitem-group_1agpu_c0a59_185:not(#\9) {
|
|
186
186
|
list-style: none;
|
|
187
187
|
margin-block: 0;
|
|
188
188
|
margin-inline: 0;
|
|
@@ -191,7 +191,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
191
191
|
position: relative;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
.
|
|
194
|
+
.awsui_treeitem_1agpu_c0a59_185:not(#\9) {
|
|
195
195
|
list-style: none;
|
|
196
196
|
margin-block: 0;
|
|
197
197
|
margin-inline: 0;
|
|
@@ -199,22 +199,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
199
199
|
padding-inline: 0;
|
|
200
200
|
position: relative;
|
|
201
201
|
}
|
|
202
|
-
.
|
|
203
|
-
margin-inline-start: var(--space-tree-view-indentation-
|
|
202
|
+
.awsui_treeitem_1agpu_c0a59_185.awsui_offset_1agpu_c0a59_202:not(#\9) {
|
|
203
|
+
margin-inline-start: var(--space-tree-view-indentation-xh9kis, 24px);
|
|
204
204
|
}
|
|
205
|
-
.
|
|
205
|
+
.awsui_treeitem_1agpu_c0a59_185 > .awsui_treeitem-content-wrapper_1agpu_c0a59_205:not(#\9) {
|
|
206
206
|
display: grid;
|
|
207
207
|
grid-template-columns: 28px 1fr;
|
|
208
208
|
align-items: baseline;
|
|
209
209
|
}
|
|
210
|
-
body[data-awsui-focus-visible=true] .
|
|
210
|
+
body[data-awsui-focus-visible=true] .awsui_treeitem_1agpu_c0a59_185 > .awsui_treeitem-content-wrapper_1agpu_c0a59_205:not(#\9):has(.awsui_tree-item-focus-target_1agpu_c0a59_210:focus) {
|
|
211
211
|
position: relative;
|
|
212
212
|
}
|
|
213
|
-
body[data-awsui-focus-visible=true] .
|
|
213
|
+
body[data-awsui-focus-visible=true] .awsui_treeitem_1agpu_c0a59_185 > .awsui_treeitem-content-wrapper_1agpu_c0a59_205:not(#\9):has(.awsui_tree-item-focus-target_1agpu_c0a59_210:focus) {
|
|
214
214
|
outline: 2px dotted transparent;
|
|
215
215
|
outline-offset: calc(0px - 1px);
|
|
216
216
|
}
|
|
217
|
-
body[data-awsui-focus-visible=true] .
|
|
217
|
+
body[data-awsui-focus-visible=true] .awsui_treeitem_1agpu_c0a59_185 > .awsui_treeitem-content-wrapper_1agpu_c0a59_205:not(#\9):has(.awsui_tree-item-focus-target_1agpu_c0a59_210:focus)::before {
|
|
218
218
|
content: " ";
|
|
219
219
|
display: block;
|
|
220
220
|
position: absolute;
|
|
@@ -228,27 +228,28 @@ body[data-awsui-focus-visible=true] .awsui_treeitem_1agpu_rc23v_185 > .awsui_tre
|
|
|
228
228
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
229
229
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
|
|
230
230
|
}
|
|
231
|
-
.
|
|
231
|
+
.awsui_treeitem_1agpu_c0a59_185 > .awsui_treeitem-content-wrapper_1agpu_c0a59_205 > .awsui_expand-toggle-wrapper_1agpu_c0a59_231:not(#\9) {
|
|
232
232
|
display: grid;
|
|
233
233
|
grid-column: 1;
|
|
234
234
|
grid-row: 1;
|
|
235
235
|
}
|
|
236
|
-
.
|
|
236
|
+
.awsui_treeitem_1agpu_c0a59_185 > .awsui_treeitem-content-wrapper_1agpu_c0a59_205 > .awsui_expand-toggle-wrapper_1agpu_c0a59_231 > .awsui_toggle_1agpu_c0a59_236:not(#\9) {
|
|
237
237
|
justify-self: center;
|
|
238
238
|
position: relative;
|
|
239
239
|
inset-block-start: 2px;
|
|
240
|
+
inset-inline-start: -2px;
|
|
240
241
|
}
|
|
241
|
-
.
|
|
242
|
+
.awsui_treeitem_1agpu_c0a59_185 > .awsui_treeitem-content-wrapper_1agpu_c0a59_205 > .awsui_structured-item-wrapper_1agpu_c0a59_242:not(#\9) {
|
|
242
243
|
grid-column: 2;
|
|
243
244
|
grid-row: 1/span 2;
|
|
244
245
|
padding-block: var(--space-scaled-xxxs-oo06c7, 2px);
|
|
245
246
|
position: relative;
|
|
246
247
|
}
|
|
247
248
|
|
|
248
|
-
.awsui_tree-item-structured-
|
|
249
|
+
.awsui_tree-item-structured-item_1agpu_c0a59_249:not(#\9) {
|
|
249
250
|
/* used in keyboard navigation */
|
|
250
251
|
}
|
|
251
252
|
|
|
252
|
-
.awsui_tree-item-focus-
|
|
253
|
+
.awsui_tree-item-focus-target_1agpu_c0a59_210:not(#\9) {
|
|
253
254
|
outline: none;
|
|
254
255
|
}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"treeitem-group": "awsui_treeitem-
|
|
6
|
-
"treeitem": "
|
|
7
|
-
"offset": "
|
|
8
|
-
"treeitem-content-wrapper": "awsui_treeitem-content-
|
|
9
|
-
"tree-item-focus-target": "awsui_tree-item-focus-
|
|
10
|
-
"expand-toggle-wrapper": "awsui_expand-toggle-
|
|
11
|
-
"toggle": "
|
|
12
|
-
"structured-item-wrapper": "awsui_structured-item-
|
|
13
|
-
"tree-item-structured-item": "awsui_tree-item-structured-
|
|
5
|
+
"treeitem-group": "awsui_treeitem-group_1agpu_c0a59_185",
|
|
6
|
+
"treeitem": "awsui_treeitem_1agpu_c0a59_185",
|
|
7
|
+
"offset": "awsui_offset_1agpu_c0a59_202",
|
|
8
|
+
"treeitem-content-wrapper": "awsui_treeitem-content-wrapper_1agpu_c0a59_205",
|
|
9
|
+
"tree-item-focus-target": "awsui_tree-item-focus-target_1agpu_c0a59_210",
|
|
10
|
+
"expand-toggle-wrapper": "awsui_expand-toggle-wrapper_1agpu_c0a59_231",
|
|
11
|
+
"toggle": "awsui_toggle_1agpu_c0a59_236",
|
|
12
|
+
"structured-item-wrapper": "awsui_structured-item-wrapper_1agpu_c0a59_242",
|
|
13
|
+
"tree-item-structured-item": "awsui_tree-item-structured-item_1agpu_c0a59_249"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"vertical-connector": "awsui_vertical-
|
|
5
|
-
"grid": "
|
|
6
|
-
"absolute": "
|
|
4
|
+
"vertical-connector": "awsui_vertical-connector_1r2pu_1pql1_9",
|
|
5
|
+
"grid": "awsui_grid_1r2pu_1pql1_13",
|
|
6
|
+
"absolute": "awsui_absolute_1r2pu_1pql1_20"
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
7
|
SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
9
|
-
.awsui_vertical-
|
|
9
|
+
.awsui_vertical-connector_1r2pu_1pql1_9:not(#\9) {
|
|
10
10
|
background-color: var(--color-tree-view-connector-line-1usxvn, #8c8c94);
|
|
11
11
|
inline-size: var(--border-divider-list-width-tdfx1x, 1px);
|
|
12
12
|
}
|
|
13
|
-
.awsui_vertical-
|
|
13
|
+
.awsui_vertical-connector_1r2pu_1pql1_9.awsui_grid_1r2pu_1pql1_13:not(#\9) {
|
|
14
14
|
grid-row: 2/span 3;
|
|
15
15
|
grid-column: 1;
|
|
16
16
|
block-size: 100%;
|
|
17
17
|
position: relative;
|
|
18
|
-
inset-inline-start: calc((28px - var(--border-divider-list-width-tdfx1x, 1px)) / 2);
|
|
18
|
+
inset-inline-start: calc((28px - var(--border-divider-list-width-tdfx1x, 1px)) / 2 - 2px);
|
|
19
19
|
}
|
|
20
|
-
.awsui_vertical-
|
|
20
|
+
.awsui_vertical-connector_1r2pu_1pql1_9.awsui_absolute_1r2pu_1pql1_20:not(#\9) {
|
|
21
21
|
position: absolute;
|
|
22
22
|
inset: 0;
|
|
23
23
|
inset-block-end: var(--space-scaled-xs-xwoogq, 8px);
|
|
24
|
-
inset-inline-start: calc((28px - var(--border-divider-list-width-tdfx1x, 1px)) / 2);
|
|
24
|
+
inset-inline-start: calc((28px - var(--border-divider-list-width-tdfx1x, 1px)) / 2 - 2px);
|
|
25
25
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"vertical-connector": "awsui_vertical-
|
|
6
|
-
"grid": "
|
|
7
|
-
"absolute": "
|
|
5
|
+
"vertical-connector": "awsui_vertical-connector_1r2pu_1pql1_9",
|
|
6
|
+
"grid": "awsui_grid_1r2pu_1pql1_13",
|
|
7
|
+
"absolute": "awsui_absolute_1r2pu_1pql1_20"
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -6,12 +6,14 @@ interface TutorialListProps {
|
|
|
6
6
|
onStartTutorial: HotspotContext['onStartTutorial'];
|
|
7
7
|
i18nStrings: TutorialPanelProps['i18nStrings'];
|
|
8
8
|
downloadUrl: TutorialPanelProps['downloadUrl'];
|
|
9
|
+
headingId?: string;
|
|
9
10
|
}
|
|
10
11
|
export default function TutorialList({
|
|
11
12
|
i18nStrings,
|
|
12
13
|
tutorials,
|
|
13
14
|
loading,
|
|
14
15
|
onStartTutorial,
|
|
15
|
-
downloadUrl
|
|
16
|
+
downloadUrl,
|
|
17
|
+
headingId
|
|
16
18
|
}: TutorialListProps): JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tutorial-panel/components/tutorial-list/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAWxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAItD,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC3C,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACnD,WAAW,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC/C,WAAW,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tutorial-panel/components/tutorial-list/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAWxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAItD,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC3C,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACnD,WAAW,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC/C,WAAW,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,WAAW,EACX,SAAS,EACT,OAAe,EACf,eAAe,EACf,WAAW,EACX,SAAS,GACV,EAAE,iBAAiB,eAmDnB"}
|
|
@@ -16,13 +16,13 @@ import InternalLiveRegion from '../../../live-region/internal';
|
|
|
16
16
|
import InternalSpaceBetween from '../../../space-between/internal';
|
|
17
17
|
import InternalStatusIndicator from '../../../status-indicator/internal';
|
|
18
18
|
import styles from './styles.css.js';
|
|
19
|
-
export default function TutorialList({ i18nStrings, tutorials, loading = false, onStartTutorial, downloadUrl, }) {
|
|
19
|
+
export default function TutorialList({ i18nStrings, tutorials, loading = false, onStartTutorial, downloadUrl, headingId, }) {
|
|
20
20
|
checkSafeUrl('TutorialPanel', downloadUrl);
|
|
21
21
|
const isRefresh = useVisualRefresh();
|
|
22
22
|
return (React.createElement(React.Fragment, null,
|
|
23
23
|
React.createElement(InternalSpaceBetween, { size: "s" },
|
|
24
24
|
React.createElement(InternalSpaceBetween, { size: "m" },
|
|
25
|
-
React.createElement(InternalBox, { variant: "h2", fontSize: isRefresh ? 'heading-m' : 'heading-l', padding: { bottom: 'n' } }, i18nStrings.tutorialListTitle),
|
|
25
|
+
React.createElement(InternalBox, { variant: "h2", fontSize: isRefresh ? 'heading-m' : 'heading-l', padding: { bottom: 'n' }, id: headingId }, i18nStrings.tutorialListTitle),
|
|
26
26
|
React.createElement(InternalBox, { variant: "p", color: "text-body-secondary", padding: "n" }, i18nStrings.tutorialListDescription)),
|
|
27
27
|
React.createElement(InternalSpaceBetween, { size: "l" },
|
|
28
28
|
downloadUrl && (React.createElement("a", { href: downloadUrl, target: "_blank", rel: "noopener noreferrer", className: styles['download-link'], "aria-label": i18nStrings.labelTutorialListDownloadLink },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tutorial-panel/components/tutorial-list/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAEpD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3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C7D,SAAS,EAAE,WAAW,CAAC,kBAAkB,EACzC,QAAQ,EAAE,IAAI,EACd,OAAO,EAAC,SAAS,IAEhB,WAAW,CAAC,iBAAiB,CACjB,CAChB,CACoB,CACF;wBAEvB,oBAAC,WAAW,IAAC,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;4BACpC,oBAAC,cAAc,IACb,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,MAAA,QAAQ,CAAC,mBAAmB,mCAAI,KAAK,EAC/C,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,MAAM,CAAC,KAAK,IAEtB,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC,CAAC,WAAW,CAAC,uBAAuB,CAClF,CACL,CACO,CACnB,CACQ,CACZ,CACH,CACN,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useState } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalAlert from '../../../alert/internal';\nimport { HotspotContext } from '../../../annotation-context/context.js';\nimport InternalBox from '../../../box/internal';\nimport { InternalButton } from '../../../button/internal';\nimport InternalIcon from '../../../icon/internal';\nimport { fireNonCancelableEvent } from '../../../internal/events/index.js';\nimport { useVisualRefresh } from '../../../internal/hooks/use-visual-mode';\nimport { checkSafeUrl } from '../../../internal/utils/check-safe-url';\nimport InternalLink from '../../../link/internal';\nimport InternalLiveRegion from '../../../live-region/internal';\nimport InternalSpaceBetween from '../../../space-between/internal';\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport { TutorialPanelProps } from '../../interfaces';\n\nimport styles from './styles.css.js';\n\ninterface TutorialListProps {\n loading?: boolean;\n tutorials: TutorialPanelProps['tutorials'];\n onStartTutorial: HotspotContext['onStartTutorial'];\n i18nStrings: TutorialPanelProps['i18nStrings'];\n downloadUrl: TutorialPanelProps['downloadUrl'];\n}\n\nexport default function TutorialList({\n i18nStrings,\n tutorials,\n loading = false,\n onStartTutorial,\n downloadUrl,\n}: TutorialListProps) {\n checkSafeUrl('TutorialPanel', downloadUrl);\n\n const isRefresh = useVisualRefresh();\n\n return (\n <>\n <InternalSpaceBetween size=\"s\">\n <InternalSpaceBetween size=\"m\">\n <InternalBox variant=\"h2\" fontSize={isRefresh ? 'heading-m' : 'heading-l'} padding={{ bottom: 'n' }}>\n {i18nStrings.tutorialListTitle}\n </InternalBox>\n <InternalBox variant=\"p\" color=\"text-body-secondary\" padding=\"n\">\n {i18nStrings.tutorialListDescription}\n </InternalBox>\n </InternalSpaceBetween>\n <InternalSpaceBetween size=\"l\">\n {downloadUrl && (\n <a\n href={downloadUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={styles['download-link']}\n aria-label={i18nStrings.labelTutorialListDownloadLink}\n >\n <InternalIcon name=\"download\" />\n <InternalBox padding={{ left: 'xs' }} color=\"inherit\" fontWeight=\"bold\" display=\"inline\">\n {i18nStrings.tutorialListDownloadLinkText}\n </InternalBox>\n </a>\n )}\n {loading ? (\n <InternalStatusIndicator type=\"loading\">\n <InternalLiveRegion tagName=\"span\">{i18nStrings.loadingText}</InternalLiveRegion>\n </InternalStatusIndicator>\n ) : (\n <ul className={styles['tutorial-list']} role=\"list\">\n {tutorials.map((tutorial, index) => (\n <Tutorial tutorial={tutorial} key={index} onStartTutorial={onStartTutorial} i18nStrings={i18nStrings} />\n ))}\n </ul>\n )}\n </InternalSpaceBetween>\n </InternalSpaceBetween>\n </>\n );\n}\n\nfunction Tutorial({\n tutorial,\n onStartTutorial: onStartTutorialEventHandler,\n i18nStrings,\n}: {\n tutorial: TutorialPanelProps.Tutorial;\n onStartTutorial: HotspotContext['onStartTutorial'];\n i18nStrings: TutorialPanelProps['i18nStrings'];\n}) {\n checkSafeUrl('TutorialPanel', tutorial.learnMoreUrl);\n const controlId = useUniqueId();\n const triggerControldId = useUniqueId();\n const headerId = useUniqueId();\n\n const isRefresh = useVisualRefresh();\n\n const onStartTutorial = useCallback(() => {\n fireNonCancelableEvent(onStartTutorialEventHandler, { tutorial });\n }, [onStartTutorialEventHandler, tutorial]);\n\n const [expanded, setExpanded] = useState(!tutorial.prerequisitesNeeded && !tutorial.completed);\n\n const onClick = useCallback(() => {\n setExpanded(expanded => !expanded);\n }, []);\n\n return (\n <li className={styles['tutorial-box']} role=\"listitem\">\n <InternalSpaceBetween size=\"xs\">\n <div className={styles['tutorial-box-title']}>\n <InternalBox\n variant=\"h3\"\n fontSize={isRefresh ? 'heading-s' : 'heading-m'}\n id={headerId}\n margin={{ right: 'xs' }}\n padding=\"n\"\n className={styles.title}\n >\n {tutorial.title}\n </InternalBox>\n <div className={styles['button-wrapper']}>\n <InternalButton\n id={triggerControldId}\n variant=\"icon\"\n ariaExpanded={expanded}\n nativeButtonAttributes={{\n 'aria-controls': controlId,\n 'aria-labelledby': headerId,\n }}\n formAction=\"none\"\n onClick={onClick}\n className={expanded ? styles['collapse-button'] : styles['expand-button']}\n iconName={expanded ? 'angle-up' : 'angle-down'}\n />\n </div>\n </div>\n\n {tutorial.completed ? (\n <InternalStatusIndicator __size=\"inherit\" type=\"success\" className={styles.completed} wrapText={true}>\n {i18nStrings.tutorialCompletedText}\n </InternalStatusIndicator>\n ) : null}\n </InternalSpaceBetween>\n\n <div aria-live=\"polite\">\n <CSSTransition in={expanded} timeout={30} classNames={{ enter: styles['content-enter'] }}>\n <div className={clsx(styles['expandable-section'], expanded && styles.expanded)} id={controlId}>\n <InternalSpaceBetween size=\"l\">\n <InternalSpaceBetween size=\"m\">\n {tutorial.prerequisitesNeeded && tutorial.prerequisitesAlert && (\n <InternalAlert type=\"info\" className={styles['prerequisites-alert']}>\n {tutorial.prerequisitesAlert}\n </InternalAlert>\n )}\n <InternalSpaceBetween size=\"s\">\n <InternalBox color=\"text-body-secondary\">\n <div\n className={clsx(\n styles['tutorial-description'],\n typeof tutorial.description === 'string' && styles['tutorial-description-plaintext']\n )}\n >\n {tutorial.description}\n </div>\n </InternalBox>\n {tutorial.learnMoreUrl && (\n <InternalLink\n href={tutorial.learnMoreUrl}\n className={styles['learn-more-link']}\n externalIconAriaLabel={i18nStrings.labelLearnMoreExternalIcon}\n ariaLabel={i18nStrings.labelLearnMoreLink}\n external={true}\n variant=\"primary\"\n >\n {i18nStrings.learnMoreLinkText}\n </InternalLink>\n )}\n </InternalSpaceBetween>\n </InternalSpaceBetween>\n\n <InternalBox margin={{ bottom: 'xxs' }}>\n <InternalButton\n onClick={onStartTutorial}\n disabled={tutorial.prerequisitesNeeded ?? false}\n formAction=\"none\"\n className={styles.start}\n >\n {tutorial.completed ? i18nStrings.restartTutorialButtonText : i18nStrings.startTutorialButtonText}\n </InternalButton>\n </InternalBox>\n </InternalSpaceBetween>\n </div>\n </CSSTransition>\n </div>\n </li>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tutorial-panel/components/tutorial-list/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAEpD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,YAAY,E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zC,QAAQ,EAAE,IAAI,EACd,OAAO,EAAC,SAAS,IAEhB,WAAW,CAAC,iBAAiB,CACjB,CAChB,CACoB,CACF;wBAEvB,oBAAC,WAAW,IAAC,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;4BACpC,oBAAC,cAAc,IACb,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,MAAA,QAAQ,CAAC,mBAAmB,mCAAI,KAAK,EAC/C,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,MAAM,CAAC,KAAK,IAEtB,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC,CAAC,WAAW,CAAC,uBAAuB,CAClF,CACL,CACO,CACnB,CACQ,CACZ,CACH,CACN,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useState } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalAlert from '../../../alert/internal';\nimport { HotspotContext } from '../../../annotation-context/context.js';\nimport InternalBox from '../../../box/internal';\nimport { InternalButton } from '../../../button/internal';\nimport InternalIcon from '../../../icon/internal';\nimport { fireNonCancelableEvent } from '../../../internal/events/index.js';\nimport { useVisualRefresh } from '../../../internal/hooks/use-visual-mode';\nimport { checkSafeUrl } from '../../../internal/utils/check-safe-url';\nimport InternalLink from '../../../link/internal';\nimport InternalLiveRegion from '../../../live-region/internal';\nimport InternalSpaceBetween from '../../../space-between/internal';\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport { TutorialPanelProps } from '../../interfaces';\n\nimport styles from './styles.css.js';\n\ninterface TutorialListProps {\n loading?: boolean;\n tutorials: TutorialPanelProps['tutorials'];\n onStartTutorial: HotspotContext['onStartTutorial'];\n i18nStrings: TutorialPanelProps['i18nStrings'];\n downloadUrl: TutorialPanelProps['downloadUrl'];\n headingId?: string;\n}\n\nexport default function TutorialList({\n i18nStrings,\n tutorials,\n loading = false,\n onStartTutorial,\n downloadUrl,\n headingId,\n}: TutorialListProps) {\n checkSafeUrl('TutorialPanel', downloadUrl);\n\n const isRefresh = useVisualRefresh();\n\n return (\n <>\n <InternalSpaceBetween size=\"s\">\n <InternalSpaceBetween size=\"m\">\n <InternalBox\n variant=\"h2\"\n fontSize={isRefresh ? 'heading-m' : 'heading-l'}\n padding={{ bottom: 'n' }}\n id={headingId}\n >\n {i18nStrings.tutorialListTitle}\n </InternalBox>\n <InternalBox variant=\"p\" color=\"text-body-secondary\" padding=\"n\">\n {i18nStrings.tutorialListDescription}\n </InternalBox>\n </InternalSpaceBetween>\n <InternalSpaceBetween size=\"l\">\n {downloadUrl && (\n <a\n href={downloadUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={styles['download-link']}\n aria-label={i18nStrings.labelTutorialListDownloadLink}\n >\n <InternalIcon name=\"download\" />\n <InternalBox padding={{ left: 'xs' }} color=\"inherit\" fontWeight=\"bold\" display=\"inline\">\n {i18nStrings.tutorialListDownloadLinkText}\n </InternalBox>\n </a>\n )}\n {loading ? (\n <InternalStatusIndicator type=\"loading\">\n <InternalLiveRegion tagName=\"span\">{i18nStrings.loadingText}</InternalLiveRegion>\n </InternalStatusIndicator>\n ) : (\n <ul className={styles['tutorial-list']} role=\"list\">\n {tutorials.map((tutorial, index) => (\n <Tutorial tutorial={tutorial} key={index} onStartTutorial={onStartTutorial} i18nStrings={i18nStrings} />\n ))}\n </ul>\n )}\n </InternalSpaceBetween>\n </InternalSpaceBetween>\n </>\n );\n}\n\nfunction Tutorial({\n tutorial,\n onStartTutorial: onStartTutorialEventHandler,\n i18nStrings,\n}: {\n tutorial: TutorialPanelProps.Tutorial;\n onStartTutorial: HotspotContext['onStartTutorial'];\n i18nStrings: TutorialPanelProps['i18nStrings'];\n}) {\n checkSafeUrl('TutorialPanel', tutorial.learnMoreUrl);\n const controlId = useUniqueId();\n const triggerControldId = useUniqueId();\n const headerId = useUniqueId();\n\n const isRefresh = useVisualRefresh();\n\n const onStartTutorial = useCallback(() => {\n fireNonCancelableEvent(onStartTutorialEventHandler, { tutorial });\n }, [onStartTutorialEventHandler, tutorial]);\n\n const [expanded, setExpanded] = useState(!tutorial.prerequisitesNeeded && !tutorial.completed);\n\n const onClick = useCallback(() => {\n setExpanded(expanded => !expanded);\n }, []);\n\n return (\n <li className={styles['tutorial-box']} role=\"listitem\">\n <InternalSpaceBetween size=\"xs\">\n <div className={styles['tutorial-box-title']}>\n <InternalBox\n variant=\"h3\"\n fontSize={isRefresh ? 'heading-s' : 'heading-m'}\n id={headerId}\n margin={{ right: 'xs' }}\n padding=\"n\"\n className={styles.title}\n >\n {tutorial.title}\n </InternalBox>\n <div className={styles['button-wrapper']}>\n <InternalButton\n id={triggerControldId}\n variant=\"icon\"\n ariaExpanded={expanded}\n nativeButtonAttributes={{\n 'aria-controls': controlId,\n 'aria-labelledby': headerId,\n }}\n formAction=\"none\"\n onClick={onClick}\n className={expanded ? styles['collapse-button'] : styles['expand-button']}\n iconName={expanded ? 'angle-up' : 'angle-down'}\n />\n </div>\n </div>\n\n {tutorial.completed ? (\n <InternalStatusIndicator __size=\"inherit\" type=\"success\" className={styles.completed} wrapText={true}>\n {i18nStrings.tutorialCompletedText}\n </InternalStatusIndicator>\n ) : null}\n </InternalSpaceBetween>\n\n <div aria-live=\"polite\">\n <CSSTransition in={expanded} timeout={30} classNames={{ enter: styles['content-enter'] }}>\n <div className={clsx(styles['expandable-section'], expanded && styles.expanded)} id={controlId}>\n <InternalSpaceBetween size=\"l\">\n <InternalSpaceBetween size=\"m\">\n {tutorial.prerequisitesNeeded && tutorial.prerequisitesAlert && (\n <InternalAlert type=\"info\" className={styles['prerequisites-alert']}>\n {tutorial.prerequisitesAlert}\n </InternalAlert>\n )}\n <InternalSpaceBetween size=\"s\">\n <InternalBox color=\"text-body-secondary\">\n <div\n className={clsx(\n styles['tutorial-description'],\n typeof tutorial.description === 'string' && styles['tutorial-description-plaintext']\n )}\n >\n {tutorial.description}\n </div>\n </InternalBox>\n {tutorial.learnMoreUrl && (\n <InternalLink\n href={tutorial.learnMoreUrl}\n className={styles['learn-more-link']}\n externalIconAriaLabel={i18nStrings.labelLearnMoreExternalIcon}\n ariaLabel={i18nStrings.labelLearnMoreLink}\n external={true}\n variant=\"primary\"\n >\n {i18nStrings.learnMoreLinkText}\n </InternalLink>\n )}\n </InternalSpaceBetween>\n </InternalSpaceBetween>\n\n <InternalBox margin={{ bottom: 'xxs' }}>\n <InternalButton\n onClick={onStartTutorial}\n disabled={tutorial.prerequisitesNeeded ?? false}\n formAction=\"none\"\n className={styles.start}\n >\n {tutorial.completed ? i18nStrings.restartTutorialButtonText : i18nStrings.startTutorialButtonText}\n </InternalButton>\n </InternalBox>\n </InternalSpaceBetween>\n </div>\n </CSSTransition>\n </div>\n </li>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tutorial-panel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tutorial-panel/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIlD,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,WAAW,EACX,OAAO,EACP,SAAS,EACT,eAAe,EACf,WAAW,EACX,GAAG,SAAS,EACb,EAAE,kBAAkB,eAkDpB"}
|
package/tutorial-panel/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
'use client';
|
|
4
|
-
import React, { useContext } from 'react';
|
|
4
|
+
import React, { useContext, useRef } from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
+
import { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';
|
|
6
7
|
import { hotspotContext } from '../annotation-context/context';
|
|
7
8
|
import { getBaseProps } from '../internal/base-component';
|
|
8
9
|
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
@@ -12,10 +13,21 @@ import TutorialList from './components/tutorial-list';
|
|
|
12
13
|
import styles from './styles.css.js';
|
|
13
14
|
export default function TutorialPanel({ i18nStrings, loading, tutorials, onFeedbackClick, downloadUrl, ...restProps }) {
|
|
14
15
|
const { __internalRootRef } = useBaseComponent('TutorialPanel');
|
|
16
|
+
const panelRef = useRef(null);
|
|
17
|
+
const headingId = useUniqueId();
|
|
15
18
|
const baseProps = getBaseProps(restProps);
|
|
16
19
|
const context = useContext(hotspotContext);
|
|
20
|
+
function handleExitTutorial(event) {
|
|
21
|
+
var _a;
|
|
22
|
+
context.onExitTutorial(event);
|
|
23
|
+
(_a = panelRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
24
|
+
}
|
|
25
|
+
const mergedRef = useMergeRefs(panelRef, __internalRootRef);
|
|
17
26
|
return (React.createElement(React.Fragment, null,
|
|
18
|
-
React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles['tutorial-panel']), ref:
|
|
27
|
+
React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles['tutorial-panel']), ref: mergedRef, tabIndex: -1, ...(!context.currentTutorial && {
|
|
28
|
+
role: 'region',
|
|
29
|
+
'aria-labelledby': headingId,
|
|
30
|
+
}) }, context.currentTutorial ? (React.createElement(TutorialDetailView, { i18nStrings: i18nStrings, tutorial: context.currentTutorial, onExitTutorial: handleExitTutorial, currentStepIndex: context.currentStepIndex, onFeedbackClick: onFeedbackClick })) : (React.createElement(TutorialList, { i18nStrings: i18nStrings, tutorials: tutorials, loading: loading, onStartTutorial: context.onStartTutorial, downloadUrl: downloadUrl, headingId: headingId })))));
|
|
19
31
|
}
|
|
20
32
|
applyDisplayName(TutorialPanel, 'TutorialPanel');
|
|
21
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tutorial-panel/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tutorial-panel/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE1F,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAGtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,WAAW,EACX,OAAO,EACP,SAAS,EACT,eAAe,EACf,WAAW,EACX,GAAG,SAAS,EACO;IACnB,MAAM,EAAE,iBAAiB,EAAE,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,WAAW,EAAE,CAAC;IAEhC,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE3C,SAAS,kBAAkB,CAAC,KAAkE;;QAC5F,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC9B,MAAA,QAAQ,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAE5D,OAAO,CACL;QACE,gCACM,SAAS,EACb,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC,EAC9D,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,CAAC,CAAC,KAGR,CAAC,CAAC,OAAO,CAAC,eAAe,IAAI;gBAC/B,IAAI,EAAE,QAAQ;gBACd,iBAAiB,EAAE,SAAS;aAC7B,CAAC,IAED,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CACzB,oBAAC,kBAAkB,IACjB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,CAAC,eAAe,EACjC,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,EAC1C,eAAe,EAAE,eAAe,GAChC,CACH,CAAC,CAAC,CAAC,CACF,oBAAC,YAAY,IACX,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,OAAO,CAAC,eAAe,EACxC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACpB,CACH,CACG,CACL,CACJ,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React, { useContext, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { hotspotContext } from '../annotation-context/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { NonCancelableCustomEvent } from '../internal/events';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport TutorialDetailView from './components/tutorial-detail-view';\nimport TutorialList from './components/tutorial-list';\nimport { TutorialPanelProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport { TutorialPanelProps };\n\nexport default function TutorialPanel({\n i18nStrings,\n loading,\n tutorials,\n onFeedbackClick,\n downloadUrl,\n ...restProps\n}: TutorialPanelProps) {\n const { __internalRootRef } = useBaseComponent('TutorialPanel');\n const panelRef = useRef<HTMLDivElement>(null);\n const headingId = useUniqueId();\n\n const baseProps = getBaseProps(restProps);\n const context = useContext(hotspotContext);\n\n function handleExitTutorial(event: NonCancelableCustomEvent<TutorialPanelProps.TutorialDetail>) {\n context.onExitTutorial(event);\n panelRef.current?.focus();\n }\n\n const mergedRef = useMergeRefs(panelRef, __internalRootRef);\n\n return (\n <>\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles['tutorial-panel'])}\n ref={mergedRef}\n tabIndex={-1}\n // Adding attributes conditionally since we don't want to point to\n // a non existent header in the aria-labelledby\n {...(!context.currentTutorial && {\n role: 'region',\n 'aria-labelledby': headingId,\n })}\n >\n {context.currentTutorial ? (\n <TutorialDetailView\n i18nStrings={i18nStrings}\n tutorial={context.currentTutorial}\n onExitTutorial={handleExitTutorial}\n currentStepIndex={context.currentStepIndex}\n onFeedbackClick={onFeedbackClick}\n />\n ) : (\n <TutorialList\n i18nStrings={i18nStrings}\n tutorials={tutorials}\n loading={loading}\n onStartTutorial={context.onStartTutorial}\n downloadUrl={downloadUrl}\n headingId={headingId}\n />\n )}\n </div>\n </>\n );\n}\n\napplyDisplayName(TutorialPanel, 'TutorialPanel');\n"]}
|
|
@@ -178,7 +178,11 @@
|
|
|
178
178
|
*/
|
|
179
179
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
180
180
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
181
|
-
|
|
181
|
+
/*
|
|
182
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
183
|
+
SPDX-License-Identifier: Apache-2.0
|
|
184
|
+
*/
|
|
185
|
+
.awsui_tutorial-panel_1oin5_18e3n_185:not(#\9) {
|
|
182
186
|
border-collapse: separate;
|
|
183
187
|
border-spacing: 0;
|
|
184
188
|
box-sizing: border-box;
|
|
@@ -211,4 +215,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
211
215
|
padding-block-start: 0;
|
|
212
216
|
padding-block-end: var(--space-m-dsumyt, 16px);
|
|
213
217
|
padding-inline: var(--space-l-2ud1p3, 20px);
|
|
218
|
+
}
|
|
219
|
+
.awsui_tutorial-panel_1oin5_18e3n_185:not(#\9):focus {
|
|
220
|
+
outline: none;
|
|
221
|
+
}
|
|
222
|
+
body[data-awsui-focus-visible=true] .awsui_tutorial-panel_1oin5_18e3n_185:not(#\9):focus {
|
|
223
|
+
position: relative;
|
|
224
|
+
}
|
|
225
|
+
body[data-awsui-focus-visible=true] .awsui_tutorial-panel_1oin5_18e3n_185:not(#\9):focus {
|
|
226
|
+
outline: 2px dotted transparent;
|
|
227
|
+
outline-offset: calc(0px - 1px);
|
|
228
|
+
}
|
|
229
|
+
body[data-awsui-focus-visible=true] .awsui_tutorial-panel_1oin5_18e3n_185:not(#\9):focus::before {
|
|
230
|
+
content: " ";
|
|
231
|
+
display: block;
|
|
232
|
+
position: absolute;
|
|
233
|
+
inset-inline-start: calc(-1 * 0px);
|
|
234
|
+
inset-block-start: calc(-1 * 0px);
|
|
235
|
+
inline-size: calc(100% + 0px + 0px);
|
|
236
|
+
block-size: calc(100% + 0px + 0px);
|
|
237
|
+
border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
238
|
+
border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
239
|
+
border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
240
|
+
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
241
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
|
|
214
242
|
}
|