@cloudscape-design/components 3.0.704 → 3.0.705
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/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +9 -5
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/interfaces.d.ts +1 -1
- package/expandable-section/interfaces.js.map +1 -1
- package/expandable-section/styles.css.js +32 -32
- package/expandable-section/styles.scoped.css +71 -64
- package/expandable-section/styles.selectors.js +32 -32
- package/expandable-section/utils.d.ts +2 -1
- package/expandable-section/utils.d.ts.map +1 -1
- package/expandable-section/utils.js +4 -1
- package/expandable-section/utils.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandable-section-header.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQlF,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAKvE,eAAO,MAAM,aAAa,sBAAsB,CAAC;AAEjD,UAAU,4BAA4B;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;IAClB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAcD,UAAU,4BAA6B,SAAQ,IAAI,CAAC,4BAA4B,EAAE,UAAU,GAAG,MAAM,CAAC;IACpG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA6JD,eAAO,MAAM,uBAAuB,oOAmBjC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"expandable-section-header.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQlF,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAKvE,eAAO,MAAM,aAAa,sBAAsB,CAAC;AAEjD,UAAU,4BAA4B;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;IAClB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAcD,UAAU,4BAA6B,SAAQ,IAAI,CAAC,4BAA4B,EAAE,UAAU,GAAG,MAAM,CAAC;IACpG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA6JD,eAAO,MAAM,uBAAuB,oOAmBjC,4BAA4B,gBAoF9B,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
|
6
6
|
import InternalHeader, { Description as HeaderDescription } from '../header/internal';
|
|
7
7
|
import InternalIcon from '../icon/internal';
|
|
8
8
|
import { isDevelopment } from '../internal/is-development';
|
|
9
|
-
import { variantSupportsDescription,
|
|
9
|
+
import { variantSupportsActions, variantSupportsDescription, variantSupportsInfoLink } from './utils';
|
|
10
10
|
import styles from './styles.css.js';
|
|
11
11
|
export const componentName = 'ExpandableSection';
|
|
12
12
|
const ExpandableDeprecatedHeader = ({ id, className, onClick, ariaLabel, ariaControls, expanded, children, icon, onKeyUp, onKeyDown, variant, }) => {
|
|
@@ -22,7 +22,7 @@ const ExpandableNavigationHeader = ({ id, className, onClick, ariaLabelledBy, ar
|
|
|
22
22
|
const ExpandableHeaderTextWrapper = ({ id, descriptionId, className, onClick, ariaLabel, ariaControls, expanded, children, icon, headerDescription, headerCounter, headerInfo, headerActions, variant, headingTagOverride, onKeyUp, onKeyDown, }) => {
|
|
23
23
|
const isContainer = variant === 'container';
|
|
24
24
|
const HeadingTag = headingTagOverride || 'div';
|
|
25
|
-
const supportsInteractiveElements =
|
|
25
|
+
const supportsInteractiveElements = variantSupportsActions(variant);
|
|
26
26
|
const restrictClickableArea = supportsInteractiveElements && (headerInfo || headerActions);
|
|
27
27
|
const actions = supportsInteractiveElements && headerActions;
|
|
28
28
|
const description = variantSupportsDescription(variant) && headerDescription && (React.createElement("span", { id: descriptionId, className: styles[`description-${variant}`] }, headerDescription));
|
|
@@ -46,6 +46,7 @@ const ExpandableHeaderTextWrapper = ({ id, descriptionId, className, onClick, ar
|
|
|
46
46
|
description && React.createElement(HeaderDescription, { variantOverride: "h3" }, description)))));
|
|
47
47
|
};
|
|
48
48
|
export const ExpandableSectionHeader = ({ id, descriptionId, className, variant, header, headerText, headerDescription, headerCounter, headerInfo, headerActions, headingTagOverride, expanded, ariaControls, ariaLabel, ariaLabelledBy, onKeyUp, onKeyDown, onClick, }) => {
|
|
49
|
+
const alwaysShowDivider = variant === 'default' && headerActions;
|
|
49
50
|
const icon = (React.createElement(InternalIcon, { size: variant === 'container' ? 'medium' : 'normal', className: clsx(styles.icon, expanded && styles.expanded), name: "caret-down-filled" }));
|
|
50
51
|
const defaultHeaderProps = {
|
|
51
52
|
id: id,
|
|
@@ -56,13 +57,16 @@ export const ExpandableSectionHeader = ({ id, descriptionId, className, variant,
|
|
|
56
57
|
onClick: onClick,
|
|
57
58
|
variant,
|
|
58
59
|
};
|
|
59
|
-
if ((headerCounter || headerInfo
|
|
60
|
-
warnOnce(componentName, 'The `headerCounter
|
|
60
|
+
if ((headerCounter || headerInfo) && !variantSupportsInfoLink(variant) && isDevelopment) {
|
|
61
|
+
warnOnce(componentName, 'The `headerCounter` and `headerInfo` props are only supported for the "container" variant.');
|
|
62
|
+
}
|
|
63
|
+
if (headerActions && !variantSupportsActions(variant) && isDevelopment) {
|
|
64
|
+
warnOnce(componentName, `The \`headerActions\` prop is only supported for the "container" and "default" variants.`);
|
|
61
65
|
}
|
|
62
66
|
if (headerDescription && !variantSupportsDescription(variant) && isDevelopment) {
|
|
63
67
|
warnOnce(componentName, `The \`headerDescription\` prop is not supported for the ${variant} variant.`);
|
|
64
68
|
}
|
|
65
|
-
const wrapperClassName = clsx(styles.wrapper, styles[`wrapper-${variant}`], expanded && styles['wrapper-expanded']);
|
|
69
|
+
const wrapperClassName = clsx(styles.wrapper, styles[`wrapper-${variant}`], (expanded || alwaysShowDivider) && styles['wrapper-expanded']);
|
|
66
70
|
if (variant === 'navigation') {
|
|
67
71
|
return (React.createElement(ExpandableNavigationHeader, Object.assign({ className: clsx(className, wrapperClassName), ariaLabelledBy: ariaLabelledBy }, defaultHeaderProps), headerText !== null && headerText !== void 0 ? headerText : header));
|
|
68
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandable-section-header.js","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAA6D,MAAM,OAAO,CAAC;AAClF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,cAAc,EAAE,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,0BAA0B,EAAE,kCAAkC,EAAE,MAAM,SAAS,CAAC;AAEzF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAwCjD,MAAM,0BAA0B,GAAG,CAAC,EAClC,EAAE,EACF,SAAS,EACT,OAAO,EACP,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,EACT,OAAO,GACsB,EAAE,EAAE;IACjC,OAAO,CACL,6BACE,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC,EA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AErB,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,MAAM,CACM,CAC9B,CAAC;KACH;IAED,IAAI,UAAU,EAAE;QACd,OAAO,CACL,oBAAC,2BAA2B,kBAC1B,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EACzE,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,IAChB,kBAAkB,GAErB,UAAU,CACiB,CAC/B,CAAC;KACH;IAED,IAAI,OAAO,KAAK,WAAW,IAAI,MAAM,IAAI,aAAa,EAAE;QACtD,QAAQ,CAAC,aAAa,EAAE,yFAAyF,CAAC,CAAC;KACpH;IAED,OAAO,CACL,oBAAC,0BAA0B,kBACzB,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EAC3F,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,IAChB,kBAAkB,GAErB,MAAM,CACoB,CAC9B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalHeader, { Description as HeaderDescription } from '../header/internal';\nimport InternalIcon from '../icon/internal';\nimport { isDevelopment } from '../internal/is-development';\nimport { ExpandableSectionProps, InternalVariant } from './interfaces';\nimport { variantSupportsDescription, variantSupportsInteractiveElements } from './utils';\n\nimport styles from './styles.css.js';\n\nexport const componentName = 'ExpandableSection';\n\ninterface ExpandableDefaultHeaderProps {\n id: string;\n descriptionId?: string;\n className?: string;\n children?: ReactNode;\n expanded: boolean;\n ariaControls: string;\n ariaLabel?: string;\n onKeyUp: KeyboardEventHandler;\n onKeyDown: KeyboardEventHandler;\n onClick: MouseEventHandler;\n icon: JSX.Element;\n variant: InternalVariant;\n}\n\ninterface ExpandableNavigationHeaderProps extends Omit<ExpandableDefaultHeaderProps, 'onKeyUp' | 'onKeyDown'> {\n ariaLabelledBy?: string;\n}\n\ninterface ExpandableHeaderTextWrapperProps extends ExpandableDefaultHeaderProps {\n headerDescription?: ReactNode;\n headerCounter?: string;\n headerInfo?: ReactNode;\n headerActions?: ReactNode;\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n}\n\ninterface ExpandableSectionHeaderProps extends Omit<ExpandableDefaultHeaderProps, 'children' | 'icon'> {\n header?: ReactNode;\n headerText?: ReactNode;\n headerDescription?: ReactNode;\n headerCounter?: string;\n headerInfo?: ReactNode;\n headerActions?: ReactNode;\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n ariaLabelledBy?: string;\n}\n\nconst ExpandableDeprecatedHeader = ({\n id,\n className,\n onClick,\n ariaLabel,\n ariaControls,\n expanded,\n children,\n icon,\n onKeyUp,\n onKeyDown,\n variant,\n}: ExpandableDefaultHeaderProps) => {\n return (\n <div\n id={id}\n role=\"button\"\n className={clsx(className, styles['expand-button'], styles['click-target'], styles['header-deprecated'])}\n tabIndex={0}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n onClick={onClick}\n aria-label={ariaLabel}\n aria-controls={ariaControls}\n aria-expanded={expanded}\n >\n <div className={clsx(styles['icon-container'], styles[`icon-container-${variant}`])}>{icon}</div>\n {children}\n </div>\n );\n};\n\nconst ExpandableNavigationHeader = ({\n id,\n className,\n onClick,\n ariaLabelledBy,\n ariaLabel,\n ariaControls,\n expanded,\n children,\n icon,\n}: ExpandableNavigationHeaderProps) => {\n return (\n <div id={id} className={clsx(className, styles['click-target'])}>\n <button\n className={clsx(styles['icon-container'], styles['expand-button'])}\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n aria-controls={ariaControls}\n aria-expanded={expanded}\n type=\"button\"\n onClick={onClick}\n >\n {icon}\n </button>\n {children}\n </div>\n );\n};\n\nconst ExpandableHeaderTextWrapper = ({\n id,\n descriptionId,\n className,\n onClick,\n ariaLabel,\n ariaControls,\n expanded,\n children,\n icon,\n headerDescription,\n headerCounter,\n headerInfo,\n headerActions,\n variant,\n headingTagOverride,\n onKeyUp,\n onKeyDown,\n}: ExpandableHeaderTextWrapperProps) => {\n const isContainer = variant === 'container';\n const HeadingTag = headingTagOverride || 'div';\n const supportsInteractiveElements = variantSupportsInteractiveElements(variant);\n const restrictClickableArea = supportsInteractiveElements && (headerInfo || headerActions);\n const actions = supportsInteractiveElements && headerActions;\n const description = variantSupportsDescription(variant) && headerDescription && (\n <span id={descriptionId} className={styles[`description-${variant}`]}>\n {headerDescription}\n </span>\n );\n const listeners = { onClick, onKeyDown, onKeyUp };\n\n // If interactive elements are present, constrain the clickable area to only the icon and the header text\n // to prevent nesting interactive elements.\n const headerButtonListeners = restrictClickableArea ? listeners : undefined;\n // For the default and footer variants with description,\n // include also the immediate wrapper around it to include the entire row for backwards compatibility,\n // but exclude the description.\n const headingTagListeners = !headerButtonListeners && !isContainer && description ? listeners : undefined;\n // For all other cases, make the entire header clickable for backwards compatibility.\n const wrapperListeners = !headerButtonListeners && !headingTagListeners ? listeners : undefined;\n const headerButton = (\n <span\n className={clsx(\n styles['expand-button'],\n isContainer ? styles['header-container-button'] : styles['header-button'],\n headerButtonListeners && styles['click-target']\n )}\n role=\"button\"\n tabIndex={0}\n aria-label={ariaLabel}\n aria-labelledby={!ariaLabel && description ? id : undefined}\n aria-describedby={description ? descriptionId : undefined}\n aria-controls={ariaControls}\n aria-expanded={expanded}\n {...headerButtonListeners}\n >\n <span className={clsx(styles['icon-container'], styles[`icon-container-${variant}`])}>{icon}</span>\n <span id={id} className={styles['header-text']}>\n {children}\n </span>\n </span>\n );\n\n return (\n <div className={clsx(className, wrapperListeners && styles['click-target'])} {...wrapperListeners}>\n {isContainer ? (\n <InternalHeader\n variant=\"h2\"\n description={description}\n counter={headerCounter}\n info={headerInfo}\n actions={actions}\n headingTagOverride={headingTagOverride}\n >\n {headerButton}\n </InternalHeader>\n ) : (\n <>\n <div className={clsx(actions && styles['header-actions-wrapper'])}>\n <HeadingTag\n className={clsx(styles['header-wrapper'], headingTagListeners && styles['click-target'])}\n {...headingTagListeners}\n >\n {headerButton}\n </HeadingTag>\n {actions}\n </div>\n {description && <HeaderDescription variantOverride=\"h3\">{description}</HeaderDescription>}\n </>\n )}\n </div>\n );\n};\n\nexport const ExpandableSectionHeader = ({\n id,\n descriptionId,\n className,\n variant,\n header,\n headerText,\n headerDescription,\n headerCounter,\n headerInfo,\n headerActions,\n headingTagOverride,\n expanded,\n ariaControls,\n ariaLabel,\n ariaLabelledBy,\n onKeyUp,\n onKeyDown,\n onClick,\n}: ExpandableSectionHeaderProps) => {\n const icon = (\n <InternalIcon\n size={variant === 'container' ? 'medium' : 'normal'}\n className={clsx(styles.icon, expanded && styles.expanded)}\n name=\"caret-down-filled\"\n />\n );\n const defaultHeaderProps = {\n id: id,\n icon: icon,\n expanded: expanded,\n ariaControls: ariaControls,\n ariaLabel: ariaLabel,\n onClick: onClick,\n variant,\n };\n\n if ((headerCounter || headerInfo || headerActions) && !variantSupportsInteractiveElements(variant) && isDevelopment) {\n warnOnce(\n componentName,\n 'The `headerCounter`, `headerInfo` and `headerActions` props are only supported for the \"container\" variant.'\n );\n }\n\n if (headerDescription && !variantSupportsDescription(variant) && isDevelopment) {\n warnOnce(componentName, `The \\`headerDescription\\` prop is not supported for the ${variant} variant.`);\n }\n\n const wrapperClassName = clsx(styles.wrapper, styles[`wrapper-${variant}`], expanded && styles['wrapper-expanded']);\n if (variant === 'navigation') {\n return (\n <ExpandableNavigationHeader\n className={clsx(className, wrapperClassName)}\n ariaLabelledBy={ariaLabelledBy}\n {...defaultHeaderProps}\n >\n {headerText ?? header}\n </ExpandableNavigationHeader>\n );\n }\n\n if (headerText) {\n return (\n <ExpandableHeaderTextWrapper\n className={clsx(className, wrapperClassName, expanded && styles.expanded)}\n descriptionId={descriptionId}\n headerDescription={headerDescription}\n headerCounter={headerCounter}\n headerInfo={headerInfo}\n headerActions={headerActions}\n headingTagOverride={headingTagOverride}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n {...defaultHeaderProps}\n >\n {headerText}\n </ExpandableHeaderTextWrapper>\n );\n }\n\n if (variant === 'container' && header && isDevelopment) {\n warnOnce(componentName, 'Use `headerText` instead of `header` to provide the button within the heading for a11y.');\n }\n\n return (\n <ExpandableDeprecatedHeader\n className={clsx(className, wrapperClassName, styles.focusable, expanded && styles.expanded)}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n {...defaultHeaderProps}\n >\n {header}\n </ExpandableDeprecatedHeader>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"expandable-section-header.js","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAA6D,MAAM,OAAO,CAAC;AAClF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,cAAc,EAAE,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEtG,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAwCjD,MAAM,0BAA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EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EAC3F,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,IAChB,kBAAkB,GAErB,MAAM,CACoB,CAC9B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalHeader, { Description as HeaderDescription } from '../header/internal';\nimport InternalIcon from '../icon/internal';\nimport { isDevelopment } from '../internal/is-development';\nimport { ExpandableSectionProps, InternalVariant } from './interfaces';\nimport { variantSupportsActions, variantSupportsDescription, variantSupportsInfoLink } from './utils';\n\nimport styles from './styles.css.js';\n\nexport const componentName = 'ExpandableSection';\n\ninterface ExpandableDefaultHeaderProps {\n id: string;\n descriptionId?: string;\n className?: string;\n children?: ReactNode;\n expanded: boolean;\n ariaControls: string;\n ariaLabel?: string;\n onKeyUp: KeyboardEventHandler;\n onKeyDown: KeyboardEventHandler;\n onClick: MouseEventHandler;\n icon: JSX.Element;\n variant: InternalVariant;\n}\n\ninterface ExpandableNavigationHeaderProps extends Omit<ExpandableDefaultHeaderProps, 'onKeyUp' | 'onKeyDown'> {\n ariaLabelledBy?: string;\n}\n\ninterface ExpandableHeaderTextWrapperProps extends ExpandableDefaultHeaderProps {\n headerDescription?: ReactNode;\n headerCounter?: string;\n headerInfo?: ReactNode;\n headerActions?: ReactNode;\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n}\n\ninterface ExpandableSectionHeaderProps extends Omit<ExpandableDefaultHeaderProps, 'children' | 'icon'> {\n header?: ReactNode;\n headerText?: ReactNode;\n headerDescription?: ReactNode;\n headerCounter?: string;\n headerInfo?: ReactNode;\n headerActions?: ReactNode;\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n ariaLabelledBy?: string;\n}\n\nconst ExpandableDeprecatedHeader = ({\n id,\n className,\n onClick,\n ariaLabel,\n ariaControls,\n expanded,\n children,\n icon,\n onKeyUp,\n onKeyDown,\n variant,\n}: ExpandableDefaultHeaderProps) => {\n return (\n <div\n id={id}\n role=\"button\"\n className={clsx(className, styles['expand-button'], styles['click-target'], styles['header-deprecated'])}\n tabIndex={0}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n onClick={onClick}\n aria-label={ariaLabel}\n aria-controls={ariaControls}\n aria-expanded={expanded}\n >\n <div className={clsx(styles['icon-container'], styles[`icon-container-${variant}`])}>{icon}</div>\n {children}\n </div>\n );\n};\n\nconst ExpandableNavigationHeader = ({\n id,\n className,\n onClick,\n ariaLabelledBy,\n ariaLabel,\n ariaControls,\n expanded,\n children,\n icon,\n}: ExpandableNavigationHeaderProps) => {\n return (\n <div id={id} className={clsx(className, styles['click-target'])}>\n <button\n className={clsx(styles['icon-container'], styles['expand-button'])}\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n aria-controls={ariaControls}\n aria-expanded={expanded}\n type=\"button\"\n onClick={onClick}\n >\n {icon}\n </button>\n {children}\n </div>\n );\n};\n\nconst ExpandableHeaderTextWrapper = ({\n id,\n descriptionId,\n className,\n onClick,\n ariaLabel,\n ariaControls,\n expanded,\n children,\n icon,\n headerDescription,\n headerCounter,\n headerInfo,\n headerActions,\n variant,\n headingTagOverride,\n onKeyUp,\n onKeyDown,\n}: ExpandableHeaderTextWrapperProps) => {\n const isContainer = variant === 'container';\n const HeadingTag = headingTagOverride || 'div';\n const supportsInteractiveElements = variantSupportsActions(variant);\n const restrictClickableArea = supportsInteractiveElements && (headerInfo || headerActions);\n const actions = supportsInteractiveElements && headerActions;\n const description = variantSupportsDescription(variant) && headerDescription && (\n <span id={descriptionId} className={styles[`description-${variant}`]}>\n {headerDescription}\n </span>\n );\n const listeners = { onClick, onKeyDown, onKeyUp };\n\n // If interactive elements are present, constrain the clickable area to only the icon and the header text\n // to prevent nesting interactive elements.\n const headerButtonListeners = restrictClickableArea ? listeners : undefined;\n // For the default and footer variants with description,\n // include also the immediate wrapper around it to include the entire row for backwards compatibility,\n // but exclude the description.\n const headingTagListeners = !headerButtonListeners && !isContainer && description ? listeners : undefined;\n // For all other cases, make the entire header clickable for backwards compatibility.\n const wrapperListeners = !headerButtonListeners && !headingTagListeners ? listeners : undefined;\n const headerButton = (\n <span\n className={clsx(\n styles['expand-button'],\n isContainer ? styles['header-container-button'] : styles['header-button'],\n headerButtonListeners && styles['click-target']\n )}\n role=\"button\"\n tabIndex={0}\n aria-label={ariaLabel}\n aria-labelledby={!ariaLabel && description ? id : undefined}\n aria-describedby={description ? descriptionId : undefined}\n aria-controls={ariaControls}\n aria-expanded={expanded}\n {...headerButtonListeners}\n >\n <span className={clsx(styles['icon-container'], styles[`icon-container-${variant}`])}>{icon}</span>\n <span id={id} className={styles['header-text']}>\n {children}\n </span>\n </span>\n );\n\n return (\n <div className={clsx(className, wrapperListeners && styles['click-target'])} {...wrapperListeners}>\n {isContainer ? (\n <InternalHeader\n variant=\"h2\"\n description={description}\n counter={headerCounter}\n info={headerInfo}\n actions={actions}\n headingTagOverride={headingTagOverride}\n >\n {headerButton}\n </InternalHeader>\n ) : (\n <>\n <div className={clsx(actions && styles['header-actions-wrapper'])}>\n <HeadingTag\n className={clsx(styles['header-wrapper'], headingTagListeners && styles['click-target'])}\n {...headingTagListeners}\n >\n {headerButton}\n </HeadingTag>\n {actions}\n </div>\n {description && <HeaderDescription variantOverride=\"h3\">{description}</HeaderDescription>}\n </>\n )}\n </div>\n );\n};\n\nexport const ExpandableSectionHeader = ({\n id,\n descriptionId,\n className,\n variant,\n header,\n headerText,\n headerDescription,\n headerCounter,\n headerInfo,\n headerActions,\n headingTagOverride,\n expanded,\n ariaControls,\n ariaLabel,\n ariaLabelledBy,\n onKeyUp,\n onKeyDown,\n onClick,\n}: ExpandableSectionHeaderProps) => {\n const alwaysShowDivider = variant === 'default' && headerActions;\n const icon = (\n <InternalIcon\n size={variant === 'container' ? 'medium' : 'normal'}\n className={clsx(styles.icon, expanded && styles.expanded)}\n name=\"caret-down-filled\"\n />\n );\n const defaultHeaderProps = {\n id: id,\n icon: icon,\n expanded: expanded,\n ariaControls: ariaControls,\n ariaLabel: ariaLabel,\n onClick: onClick,\n variant,\n };\n\n if ((headerCounter || headerInfo) && !variantSupportsInfoLink(variant) && isDevelopment) {\n warnOnce(\n componentName,\n 'The `headerCounter` and `headerInfo` props are only supported for the \"container\" variant.'\n );\n }\n\n if (headerActions && !variantSupportsActions(variant) && isDevelopment) {\n warnOnce(componentName, `The \\`headerActions\\` prop is only supported for the \"container\" and \"default\" variants.`);\n }\n\n if (headerDescription && !variantSupportsDescription(variant) && isDevelopment) {\n warnOnce(componentName, `The \\`headerDescription\\` prop is not supported for the ${variant} variant.`);\n }\n\n const wrapperClassName = clsx(\n styles.wrapper,\n styles[`wrapper-${variant}`],\n (expanded || alwaysShowDivider) && styles['wrapper-expanded']\n );\n if (variant === 'navigation') {\n return (\n <ExpandableNavigationHeader\n className={clsx(className, wrapperClassName)}\n ariaLabelledBy={ariaLabelledBy}\n {...defaultHeaderProps}\n >\n {headerText ?? header}\n </ExpandableNavigationHeader>\n );\n }\n\n if (headerText) {\n return (\n <ExpandableHeaderTextWrapper\n className={clsx(className, wrapperClassName, expanded && styles.expanded)}\n descriptionId={descriptionId}\n headerDescription={headerDescription}\n headerCounter={headerCounter}\n headerInfo={headerInfo}\n headerActions={headerActions}\n headingTagOverride={headingTagOverride}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n {...defaultHeaderProps}\n >\n {headerText}\n </ExpandableHeaderTextWrapper>\n );\n }\n\n if (variant === 'container' && header && isDevelopment) {\n warnOnce(componentName, 'Use `headerText` instead of `header` to provide the button within the heading for a11y.');\n }\n\n return (\n <ExpandableDeprecatedHeader\n className={clsx(className, wrapperClassName, styles.focusable, expanded && styles.expanded)}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n {...defaultHeaderProps}\n >\n {header}\n </ExpandableDeprecatedHeader>\n );\n};\n"]}
|
|
@@ -78,7 +78,7 @@ export interface ExpandableSectionProps extends BaseComponentProps {
|
|
|
78
78
|
*/
|
|
79
79
|
headerInfo?: React.ReactNode;
|
|
80
80
|
/**
|
|
81
|
-
* Actions for the header. Use with the container variant.
|
|
81
|
+
* Actions for the header. Use with the default or container variant.
|
|
82
82
|
*/
|
|
83
83
|
headerActions?: React.ReactNode;
|
|
84
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/expandable-section/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation' | 'stacked';\n export interface ChangeDetail {\n expanded: boolean;\n }\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n\nexport type InternalVariant = ExpandableSectionProps.Variant | 'compact';\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * * `stacked` - Use this variant directly adjacent to other stacked containers (such as a container, table).\n * @visualrefresh `stacked` variant\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * @deprecated Use `headerText` instead.\n */\n header?: React.ReactNode;\n\n /**\n * The heading text. Use plain text. When using the container variant, you can use additional header props like `headerDescription` and `headerCounter` to display other elements in the header.\n */\n headerText?: React.ReactNode;\n\n /**\n * Supplementary text below the heading. Use with the container, default or footer variants.\n */\n headerDescription?: string;\n\n /**\n * Specifies secondary text that's displayed to the right of the heading title. Use with the container variant.\n * Behaves similar to the Header component counter.\n */\n headerCounter?: string;\n\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements).\n * Use with the container variant (which defaults to H2) or default/footer variants (which default to DIV). Using this\n * property does not change the visual appearance of the component. Note that this only works with the `headerText`\n * slot (not with the deprecated `header`), and not with the navigation variant.\n */\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n\n /**\n * The area next to the heading, used to display an Info link. Use with the container variant.\n */\n headerInfo?: React.ReactNode;\n\n /**\n * Actions for the header. Use with the container variant.\n */\n headerActions?: React.ReactNode;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/expandable-section/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation' | 'stacked';\n export interface ChangeDetail {\n expanded: boolean;\n }\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n\nexport type InternalVariant = ExpandableSectionProps.Variant | 'compact';\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * * `stacked` - Use this variant directly adjacent to other stacked containers (such as a container, table).\n * @visualrefresh `stacked` variant\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * @deprecated Use `headerText` instead.\n */\n header?: React.ReactNode;\n\n /**\n * The heading text. Use plain text. When using the container variant, you can use additional header props like `headerDescription` and `headerCounter` to display other elements in the header.\n */\n headerText?: React.ReactNode;\n\n /**\n * Supplementary text below the heading. Use with the container, default or footer variants.\n */\n headerDescription?: string;\n\n /**\n * Specifies secondary text that's displayed to the right of the heading title. Use with the container variant.\n * Behaves similar to the Header component counter.\n */\n headerCounter?: string;\n\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements).\n * Use with the container variant (which defaults to H2) or default/footer variants (which default to DIV). Using this\n * property does not change the visual appearance of the component. Note that this only works with the `headerText`\n * slot (not with the deprecated `header`), and not with the navigation variant.\n */\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n\n /**\n * The area next to the heading, used to display an Info link. Use with the container variant.\n */\n headerInfo?: React.ReactNode;\n\n /**\n * Actions for the header. Use with the default or container variant.\n */\n headerActions?: React.ReactNode;\n}\n"]}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"content-enter": "awsui_content-
|
|
5
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
6
|
-
"trigger-expanded": "awsui_trigger-
|
|
7
|
-
"icon": "
|
|
8
|
-
"root": "
|
|
9
|
-
"expand-button": "awsui_expand-
|
|
10
|
-
"expanded": "
|
|
11
|
-
"icon-container": "awsui_icon-
|
|
12
|
-
"icon-container-container": "awsui_icon-container-
|
|
13
|
-
"wrapper": "
|
|
14
|
-
"wrapper-default": "awsui_wrapper-
|
|
15
|
-
"wrapper-footer": "awsui_wrapper-
|
|
16
|
-
"wrapper-navigation": "awsui_wrapper-
|
|
17
|
-
"wrapper-container": "awsui_wrapper-
|
|
18
|
-
"wrapper-compact": "awsui_wrapper-
|
|
19
|
-
"header-deprecated": "awsui_header-
|
|
20
|
-
"wrapper-expanded": "awsui_wrapper-
|
|
21
|
-
"header": "
|
|
22
|
-
"header-wrapper": "awsui_header-
|
|
23
|
-
"header-actions-wrapper": "awsui_header-actions-
|
|
24
|
-
"header-button": "awsui_header-
|
|
25
|
-
"header-container-button": "awsui_header-container-
|
|
26
|
-
"header-container": "awsui_header-
|
|
27
|
-
"header-navigation": "awsui_header-
|
|
28
|
-
"header-text": "awsui_header-
|
|
29
|
-
"content": "
|
|
30
|
-
"content-default": "awsui_content-
|
|
31
|
-
"content-footer": "awsui_content-
|
|
32
|
-
"content-expanded": "awsui_content-
|
|
33
|
-
"content-compact": "awsui_content-
|
|
34
|
-
"focusable": "
|
|
35
|
-
"click-target": "awsui_click-
|
|
4
|
+
"content-enter": "awsui_content-enter_gwq0h_16fk7_101",
|
|
5
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_16fk7_1",
|
|
6
|
+
"trigger-expanded": "awsui_trigger-expanded_gwq0h_16fk7_123",
|
|
7
|
+
"icon": "awsui_icon_gwq0h_16fk7_137",
|
|
8
|
+
"root": "awsui_root_gwq0h_16fk7_155",
|
|
9
|
+
"expand-button": "awsui_expand-button_gwq0h_16fk7_193",
|
|
10
|
+
"expanded": "awsui_expanded_gwq0h_16fk7_201",
|
|
11
|
+
"icon-container": "awsui_icon-container_gwq0h_16fk7_211",
|
|
12
|
+
"icon-container-container": "awsui_icon-container-container_gwq0h_16fk7_215",
|
|
13
|
+
"wrapper": "awsui_wrapper_gwq0h_16fk7_219",
|
|
14
|
+
"wrapper-default": "awsui_wrapper-default_gwq0h_16fk7_227",
|
|
15
|
+
"wrapper-footer": "awsui_wrapper-footer_gwq0h_16fk7_227",
|
|
16
|
+
"wrapper-navigation": "awsui_wrapper-navigation_gwq0h_16fk7_231",
|
|
17
|
+
"wrapper-container": "awsui_wrapper-container_gwq0h_16fk7_234",
|
|
18
|
+
"wrapper-compact": "awsui_wrapper-compact_gwq0h_16fk7_238",
|
|
19
|
+
"header-deprecated": "awsui_header-deprecated_gwq0h_16fk7_251",
|
|
20
|
+
"wrapper-expanded": "awsui_wrapper-expanded_gwq0h_16fk7_273",
|
|
21
|
+
"header": "awsui_header_gwq0h_16fk7_251",
|
|
22
|
+
"header-wrapper": "awsui_header-wrapper_gwq0h_16fk7_293",
|
|
23
|
+
"header-actions-wrapper": "awsui_header-actions-wrapper_gwq0h_16fk7_305",
|
|
24
|
+
"header-button": "awsui_header-button_gwq0h_16fk7_311",
|
|
25
|
+
"header-container-button": "awsui_header-container-button_gwq0h_16fk7_311",
|
|
26
|
+
"header-container": "awsui_header-container_gwq0h_16fk7_311",
|
|
27
|
+
"header-navigation": "awsui_header-navigation_gwq0h_16fk7_346",
|
|
28
|
+
"header-text": "awsui_header-text_gwq0h_16fk7_383",
|
|
29
|
+
"content": "awsui_content_gwq0h_16fk7_101",
|
|
30
|
+
"content-default": "awsui_content-default_gwq0h_16fk7_396",
|
|
31
|
+
"content-footer": "awsui_content-footer_gwq0h_16fk7_400",
|
|
32
|
+
"content-expanded": "awsui_content-expanded_gwq0h_16fk7_404",
|
|
33
|
+
"content-compact": "awsui_content-compact_gwq0h_16fk7_407",
|
|
34
|
+
"focusable": "awsui_focusable_gwq0h_16fk7_411",
|
|
35
|
+
"click-target": "awsui_click-target_gwq0h_16fk7_426"
|
|
36
36
|
};
|
|
37
37
|
|
|
@@ -98,10 +98,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
98
98
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
99
99
|
SPDX-License-Identifier: Apache-2.0
|
|
100
100
|
*/
|
|
101
|
-
.awsui_content-
|
|
102
|
-
animation: awsui_awsui-motion-fade-
|
|
101
|
+
.awsui_content-enter_gwq0h_16fk7_101:not(#\9) {
|
|
102
|
+
animation: awsui_awsui-motion-fade-in_gwq0h_16fk7_1 var(--motion-duration-show-paced-q2lo2h, 180ms) var(--motion-easing-show-paced-ne2o0s, ease-out);
|
|
103
103
|
}
|
|
104
|
-
@keyframes awsui_awsui-motion-fade-
|
|
104
|
+
@keyframes awsui_awsui-motion-fade-in_gwq0h_16fk7_1 {
|
|
105
105
|
from {
|
|
106
106
|
opacity: 0.2;
|
|
107
107
|
}
|
|
@@ -110,40 +110,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
@media (prefers-reduced-motion: reduce) {
|
|
113
|
-
.awsui_content-
|
|
113
|
+
.awsui_content-enter_gwq0h_16fk7_101:not(#\9) {
|
|
114
114
|
animation: none;
|
|
115
115
|
transition: none;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
.awsui-motion-disabled .awsui_content-
|
|
118
|
+
.awsui-motion-disabled .awsui_content-enter_gwq0h_16fk7_101:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_16fk7_101:not(#\9) {
|
|
119
119
|
animation: none;
|
|
120
120
|
transition: none;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
.awsui_trigger-
|
|
123
|
+
.awsui_trigger-expanded_gwq0h_16fk7_123:not(#\9) {
|
|
124
124
|
transition: border-bottom-color var(--motion-duration-show-paced-q2lo2h, 180ms) var(--motion-easing-show-paced-ne2o0s, ease-out);
|
|
125
125
|
}
|
|
126
126
|
@media (prefers-reduced-motion: reduce) {
|
|
127
|
-
.awsui_trigger-
|
|
127
|
+
.awsui_trigger-expanded_gwq0h_16fk7_123:not(#\9) {
|
|
128
128
|
animation: none;
|
|
129
129
|
transition: none;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
.awsui-motion-disabled .awsui_trigger-
|
|
132
|
+
.awsui-motion-disabled .awsui_trigger-expanded_gwq0h_16fk7_123:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_16fk7_123:not(#\9) {
|
|
133
133
|
animation: none;
|
|
134
134
|
transition: none;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
.
|
|
137
|
+
.awsui_icon_gwq0h_16fk7_137:not(#\9) {
|
|
138
138
|
transition: transform var(--motion-duration-rotate-90-4ry26y, 135ms) var(--motion-easing-rotate-90-sb4dk7, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
139
139
|
}
|
|
140
140
|
@media (prefers-reduced-motion: reduce) {
|
|
141
|
-
.
|
|
141
|
+
.awsui_icon_gwq0h_16fk7_137:not(#\9) {
|
|
142
142
|
animation: none;
|
|
143
143
|
transition: none;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
.awsui-motion-disabled .
|
|
146
|
+
.awsui-motion-disabled .awsui_icon_gwq0h_16fk7_137:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_16fk7_137:not(#\9) {
|
|
147
147
|
animation: none;
|
|
148
148
|
transition: none;
|
|
149
149
|
}
|
|
@@ -152,7 +152,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
152
152
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
153
153
|
SPDX-License-Identifier: Apache-2.0
|
|
154
154
|
*/
|
|
155
|
-
.
|
|
155
|
+
.awsui_root_gwq0h_16fk7_155:not(#\9) {
|
|
156
156
|
border-collapse: separate;
|
|
157
157
|
border-spacing: 0;
|
|
158
158
|
box-sizing: border-box;
|
|
@@ -191,33 +191,33 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
191
191
|
display: block;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
.awsui_expand-
|
|
194
|
+
.awsui_expand-button_gwq0h_16fk7_193:not(#\9) {
|
|
195
195
|
outline: none;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
.
|
|
198
|
+
.awsui_icon_gwq0h_16fk7_137:not(#\9) {
|
|
199
199
|
transform: rotate(-90deg);
|
|
200
200
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
201
201
|
}
|
|
202
|
-
.
|
|
202
|
+
.awsui_icon_gwq0h_16fk7_137.awsui_expanded_gwq0h_16fk7_201:not(#\9) {
|
|
203
203
|
transform: rotate(0deg);
|
|
204
204
|
}
|
|
205
|
-
.
|
|
205
|
+
.awsui_icon_gwq0h_16fk7_137:not(#\9):dir(rtl) {
|
|
206
206
|
transform: rotate(90deg);
|
|
207
207
|
}
|
|
208
|
-
.
|
|
208
|
+
.awsui_icon_gwq0h_16fk7_137:not(#\9):dir(rtl).awsui_expanded_gwq0h_16fk7_201 {
|
|
209
209
|
transform: rotate(0deg);
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
.awsui_icon-
|
|
212
|
+
.awsui_icon-container_gwq0h_16fk7_211:not(#\9) {
|
|
213
213
|
position: relative;
|
|
214
214
|
margin-inline: calc((var(--line-height-body-m-30ar75, 20px) - var(--size-icon-normal-0m1722, 16px)) / -2) calc(var(--space-xxs-p8yyaw, 4px) + var(--border-divider-list-width-27y3k5, 1px));
|
|
215
215
|
}
|
|
216
|
-
.awsui_icon-container-
|
|
216
|
+
.awsui_icon-container-container_gwq0h_16fk7_215:not(#\9) {
|
|
217
217
|
margin-inline-end: var(--space-xs-zb16t3, 8px);
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.
|
|
220
|
+
.awsui_wrapper_gwq0h_16fk7_219:not(#\9) {
|
|
221
221
|
box-sizing: border-box;
|
|
222
222
|
border-block: none;
|
|
223
223
|
border-inline: none;
|
|
@@ -225,77 +225,77 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
225
225
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
226
226
|
text-align: start;
|
|
227
227
|
}
|
|
228
|
-
.awsui_wrapper-
|
|
228
|
+
.awsui_wrapper-default_gwq0h_16fk7_227:not(#\9), .awsui_wrapper-footer_gwq0h_16fk7_227:not(#\9) {
|
|
229
229
|
border-block: var(--border-divider-section-width-1061zr, 1px) solid transparent;
|
|
230
230
|
border-inline: var(--border-divider-section-width-1061zr, 1px) solid transparent;
|
|
231
231
|
}
|
|
232
|
-
.awsui_wrapper-
|
|
232
|
+
.awsui_wrapper-navigation_gwq0h_16fk7_231:not(#\9) {
|
|
233
233
|
border-inline-start: var(--border-divider-section-width-1061zr, 1px) solid transparent;
|
|
234
234
|
}
|
|
235
|
-
.awsui_wrapper-
|
|
235
|
+
.awsui_wrapper-navigation_gwq0h_16fk7_231:not(#\9), .awsui_wrapper-container_gwq0h_16fk7_234:not(#\9) {
|
|
236
236
|
display: flex;
|
|
237
237
|
font-weight: var(--font-weight-heading-s-cwn6wc, 700);
|
|
238
238
|
}
|
|
239
|
-
.awsui_wrapper-
|
|
239
|
+
.awsui_wrapper-default_gwq0h_16fk7_227:not(#\9), .awsui_wrapper-navigation_gwq0h_16fk7_231:not(#\9), .awsui_wrapper-footer_gwq0h_16fk7_227:not(#\9), .awsui_wrapper-compact_gwq0h_16fk7_238:not(#\9) {
|
|
240
240
|
color: var(--color-text-expandable-section-default-djhi83, #000716);
|
|
241
241
|
-webkit-font-smoothing: var(--font-smoothing-webkit-m8nc84, antialiased);
|
|
242
242
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-foywby, grayscale);
|
|
243
243
|
}
|
|
244
|
-
.awsui_wrapper-
|
|
244
|
+
.awsui_wrapper-default_gwq0h_16fk7_227:not(#\9), .awsui_wrapper-navigation_gwq0h_16fk7_231:not(#\9), .awsui_wrapper-footer_gwq0h_16fk7_227:not(#\9) {
|
|
245
245
|
font-size: var(--font-expandable-heading-size-smdiul, 16px);
|
|
246
246
|
letter-spacing: var(--letter-spacing-heading-s-jr3mor, -0.005em);
|
|
247
247
|
}
|
|
248
|
-
.awsui_wrapper-
|
|
248
|
+
.awsui_wrapper-default_gwq0h_16fk7_227:not(#\9) {
|
|
249
249
|
padding-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
250
250
|
padding-inline-end: var(--space-xxs-p8yyaw, 4px);
|
|
251
251
|
}
|
|
252
|
-
.awsui_wrapper-
|
|
252
|
+
.awsui_wrapper-default_gwq0h_16fk7_227.awsui_header-deprecated_gwq0h_16fk7_251:not(#\9) {
|
|
253
253
|
padding-inline-start: var(--space-xxs-p8yyaw, 4px);
|
|
254
254
|
}
|
|
255
|
-
.awsui_wrapper-
|
|
255
|
+
.awsui_wrapper-default_gwq0h_16fk7_227:not(#\9):not(.awsui_header-deprecated_gwq0h_16fk7_251) {
|
|
256
256
|
padding-inline-start: calc(var(--size-icon-normal-0m1722, 16px) + (var(--line-height-body-m-30ar75, 20px) - var(--size-icon-normal-0m1722, 16px)) / -2 + var(--space-xxs-p8yyaw, 4px) + var(--border-divider-list-width-27y3k5, 1px));
|
|
257
257
|
}
|
|
258
|
-
.awsui_wrapper-
|
|
258
|
+
.awsui_wrapper-footer_gwq0h_16fk7_227:not(#\9) {
|
|
259
259
|
padding-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
260
260
|
}
|
|
261
|
-
.awsui_wrapper-
|
|
261
|
+
.awsui_wrapper-footer_gwq0h_16fk7_227:not(#\9), .awsui_wrapper-compact_gwq0h_16fk7_238:not(#\9) {
|
|
262
262
|
padding-inline-end: 0;
|
|
263
263
|
}
|
|
264
|
-
.awsui_wrapper-
|
|
264
|
+
.awsui_wrapper-footer_gwq0h_16fk7_227.awsui_header-deprecated_gwq0h_16fk7_251:not(#\9), .awsui_wrapper-compact_gwq0h_16fk7_238.awsui_header-deprecated_gwq0h_16fk7_251:not(#\9) {
|
|
265
265
|
padding-inline-start: 0;
|
|
266
266
|
}
|
|
267
|
-
.awsui_wrapper-
|
|
267
|
+
.awsui_wrapper-footer_gwq0h_16fk7_227:not(#\9):not(.awsui_header-deprecated_gwq0h_16fk7_251), .awsui_wrapper-compact_gwq0h_16fk7_238:not(#\9):not(.awsui_header-deprecated_gwq0h_16fk7_251) {
|
|
268
268
|
padding-inline-start: calc(var(--size-icon-normal-0m1722, 16px) + (var(--line-height-body-m-30ar75, 20px) - var(--size-icon-normal-0m1722, 16px)) / -2 + var(--space-xxs-p8yyaw, 4px) + var(--border-divider-list-width-27y3k5, 1px));
|
|
269
269
|
}
|
|
270
|
-
.awsui_wrapper-
|
|
270
|
+
.awsui_wrapper-container_gwq0h_16fk7_234:not(#\9) {
|
|
271
271
|
padding-block: var(--space-container-header-top-5qav00, 12px) var(--space-container-header-bottom-vj01hn, 8px);
|
|
272
272
|
padding-inline-end: var(--space-container-horizontal-wfukh3, 20px);
|
|
273
273
|
}
|
|
274
|
-
.awsui_wrapper-
|
|
274
|
+
.awsui_wrapper-container_gwq0h_16fk7_234:not(#\9):not(.awsui_wrapper-expanded_gwq0h_16fk7_273) {
|
|
275
275
|
padding-block-end: var(--space-container-header-top-5qav00, 12px);
|
|
276
276
|
}
|
|
277
|
-
.awsui_wrapper-
|
|
277
|
+
.awsui_wrapper-container_gwq0h_16fk7_234.awsui_header-deprecated_gwq0h_16fk7_251:not(#\9) {
|
|
278
278
|
padding-inline-start: var(--space-container-horizontal-wfukh3, 20px);
|
|
279
279
|
}
|
|
280
|
-
.awsui_wrapper-
|
|
280
|
+
.awsui_wrapper-container_gwq0h_16fk7_234:not(#\9):not(.awsui_header-deprecated_gwq0h_16fk7_251) {
|
|
281
281
|
padding-inline-start: calc(var(--space-container-horizontal-wfukh3, 20px) + calc(var(--size-icon-medium-y9xuoq, 20px) + (var(--line-height-body-m-30ar75, 20px) - var(--size-icon-normal-0m1722, 16px)) / -2 + var(--space-xs-zb16t3, 8px)));
|
|
282
282
|
}
|
|
283
|
-
body[data-awsui-focus-visible=true] .awsui_wrapper-
|
|
283
|
+
body[data-awsui-focus-visible=true] .awsui_wrapper-container_gwq0h_16fk7_234:not(#\9):focus {
|
|
284
284
|
padding-block: calc(var(--space-scaled-s-aqzyko, 12px) - var(--border-divider-section-width-1061zr, 1px));
|
|
285
285
|
padding-inline: calc(var(--space-l-t419sm, 20px) - var(--border-divider-section-width-1061zr, 1px));
|
|
286
286
|
}
|
|
287
|
-
.awsui_wrapper-
|
|
287
|
+
.awsui_wrapper-default_gwq0h_16fk7_227.awsui_wrapper-expanded_gwq0h_16fk7_273:not(#\9) {
|
|
288
288
|
border-block-end-color: var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
.
|
|
291
|
+
.awsui_header_gwq0h_16fk7_251:not(#\9) {
|
|
292
292
|
/* used in test-utils */
|
|
293
293
|
}
|
|
294
|
-
.awsui_header-
|
|
294
|
+
.awsui_header-wrapper_gwq0h_16fk7_293:not(#\9), .awsui_header-deprecated_gwq0h_16fk7_251:not(#\9) {
|
|
295
295
|
display: flex;
|
|
296
296
|
font-weight: var(--font-weight-heading-s-cwn6wc, 700);
|
|
297
297
|
}
|
|
298
|
-
.awsui_header-
|
|
298
|
+
.awsui_header-wrapper_gwq0h_16fk7_293:not(#\9) {
|
|
299
299
|
font-size: inherit;
|
|
300
300
|
letter-spacing: inherit;
|
|
301
301
|
margin-block: 0;
|
|
@@ -303,19 +303,20 @@ body[data-awsui-focus-visible=true] .awsui_wrapper-container_gwq0h_8rjzz_234:not
|
|
|
303
303
|
padding-block: 0;
|
|
304
304
|
padding-inline: 0;
|
|
305
305
|
}
|
|
306
|
-
.awsui_header-actions-
|
|
306
|
+
.awsui_header-actions-wrapper_gwq0h_16fk7_305:not(#\9) {
|
|
307
307
|
display: flex;
|
|
308
308
|
flex-direction: row;
|
|
309
309
|
justify-content: space-between;
|
|
310
|
+
align-items: center;
|
|
310
311
|
}
|
|
311
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
312
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_16fk7_311:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_16fk7_311:not(#\9):focus {
|
|
312
313
|
position: relative;
|
|
313
314
|
}
|
|
314
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
315
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_16fk7_311:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_16fk7_311:not(#\9):focus {
|
|
315
316
|
outline: 2px dotted transparent;
|
|
316
317
|
outline-offset: calc(0px - 1px);
|
|
317
318
|
}
|
|
318
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
319
|
+
body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_16fk7_311:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_16fk7_311:not(#\9):focus::before {
|
|
319
320
|
content: " ";
|
|
320
321
|
display: block;
|
|
321
322
|
position: absolute;
|
|
@@ -329,21 +330,21 @@ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_8rjzz_310:not(#\9
|
|
|
329
330
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
330
331
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
331
332
|
}
|
|
332
|
-
.awsui_header-
|
|
333
|
+
.awsui_header-button_gwq0h_16fk7_311:not(#\9) {
|
|
333
334
|
box-sizing: border-box;
|
|
334
335
|
display: flex;
|
|
335
336
|
margin-inline-start: calc(-1 * calc(var(--size-icon-normal-0m1722, 16px) + (var(--line-height-body-m-30ar75, 20px) - var(--size-icon-normal-0m1722, 16px)) / -2 + var(--space-xxs-p8yyaw, 4px) + var(--border-divider-list-width-27y3k5, 1px)));
|
|
336
337
|
}
|
|
337
|
-
.awsui_header-container-
|
|
338
|
+
.awsui_header-container-button_gwq0h_16fk7_311:not(#\9) {
|
|
338
339
|
margin-inline-start: calc(-1 * calc(var(--size-icon-medium-y9xuoq, 20px) + (var(--line-height-body-m-30ar75, 20px) - var(--size-icon-normal-0m1722, 16px)) / -2 + var(--space-xs-zb16t3, 8px)));
|
|
339
340
|
}
|
|
340
|
-
.awsui_header-
|
|
341
|
+
.awsui_header-container_gwq0h_16fk7_311:not(#\9) {
|
|
341
342
|
inline-size: 100%;
|
|
342
343
|
}
|
|
343
|
-
.awsui_header-
|
|
344
|
+
.awsui_header-container_gwq0h_16fk7_311 > .awsui_icon-container_gwq0h_16fk7_211:not(#\9) {
|
|
344
345
|
margin-block-start: var(--space-expandable-section-icon-offset-top-ekk5vc, 4px);
|
|
345
346
|
}
|
|
346
|
-
.awsui_header-
|
|
347
|
+
.awsui_header-navigation_gwq0h_16fk7_346 > .awsui_icon-container_gwq0h_16fk7_211:not(#\9) {
|
|
347
348
|
display: inline-flex;
|
|
348
349
|
cursor: pointer;
|
|
349
350
|
color: var(--color-text-expandable-section-navigation-icon-default-htcovl, #414d5c);
|
|
@@ -356,17 +357,17 @@ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_8rjzz_310:not(#\9
|
|
|
356
357
|
text-decoration: none;
|
|
357
358
|
flex-direction: column;
|
|
358
359
|
}
|
|
359
|
-
.awsui_header-
|
|
360
|
+
.awsui_header-navigation_gwq0h_16fk7_346 > .awsui_icon-container_gwq0h_16fk7_211:not(#\9):hover {
|
|
360
361
|
color: var(--color-text-expandable-section-hover-2d1zpj, #0972d3);
|
|
361
362
|
}
|
|
362
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
363
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_16fk7_346 > .awsui_icon-container_gwq0h_16fk7_211:not(#\9):focus {
|
|
363
364
|
position: relative;
|
|
364
365
|
}
|
|
365
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
366
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_16fk7_346 > .awsui_icon-container_gwq0h_16fk7_211:not(#\9):focus {
|
|
366
367
|
outline: 2px dotted transparent;
|
|
367
368
|
outline-offset: calc(2px - 1px);
|
|
368
369
|
}
|
|
369
|
-
body[data-awsui-focus-visible=true] .awsui_header-
|
|
370
|
+
body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_16fk7_346 > .awsui_icon-container_gwq0h_16fk7_211:not(#\9):focus::before {
|
|
370
371
|
content: " ";
|
|
371
372
|
display: block;
|
|
372
373
|
position: absolute;
|
|
@@ -380,33 +381,39 @@ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_8rjzz_345 > .
|
|
|
380
381
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
381
382
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
382
383
|
}
|
|
383
|
-
.awsui_header-
|
|
384
|
+
.awsui_header-text_gwq0h_16fk7_383:not(#\9) {
|
|
384
385
|
/* used in test-utils */
|
|
385
386
|
}
|
|
386
387
|
|
|
387
|
-
|
|
388
|
+
:not(#\9):not(.awsui_wrapper-compact_gwq0h_16fk7_238) > .awsui_header-actions-wrapper_gwq0h_16fk7_305 {
|
|
389
|
+
flex-wrap: wrap;
|
|
390
|
+
column-gap: var(--space-xs-zb16t3, 8px);
|
|
391
|
+
row-gap: var(--space-scaled-xxxs-27y4hv, 2px);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.awsui_content_gwq0h_16fk7_101:not(#\9) {
|
|
388
395
|
display: none;
|
|
389
396
|
}
|
|
390
|
-
.awsui_content-
|
|
397
|
+
.awsui_content-default_gwq0h_16fk7_396:not(#\9) {
|
|
391
398
|
padding-block: var(--space-scaled-xs-26e2du, 8px);
|
|
392
399
|
padding-inline: 0;
|
|
393
400
|
}
|
|
394
|
-
.awsui_content-
|
|
401
|
+
.awsui_content-footer_gwq0h_16fk7_400:not(#\9) {
|
|
395
402
|
padding-block: var(--space-xs-zb16t3, 8px);
|
|
396
403
|
padding-inline: 0;
|
|
397
404
|
}
|
|
398
|
-
.awsui_content-
|
|
405
|
+
.awsui_content-expanded_gwq0h_16fk7_404:not(#\9) {
|
|
399
406
|
display: block;
|
|
400
407
|
}
|
|
401
|
-
.awsui_content-
|
|
408
|
+
.awsui_content-compact_gwq0h_16fk7_407:not(#\9) {
|
|
402
409
|
padding-inline-start: calc(var(--size-icon-normal-0m1722, 16px) + (var(--line-height-body-m-30ar75, 20px) - var(--size-icon-normal-0m1722, 16px)) / -2 + var(--space-xxs-p8yyaw, 4px) + var(--border-divider-list-width-27y3k5, 1px));
|
|
403
410
|
}
|
|
404
411
|
|
|
405
|
-
.
|
|
412
|
+
.awsui_focusable_gwq0h_16fk7_411:not(#\9):focus {
|
|
406
413
|
outline: none;
|
|
407
414
|
text-decoration: none;
|
|
408
415
|
}
|
|
409
|
-
body[data-awsui-focus-visible=true] .
|
|
416
|
+
body[data-awsui-focus-visible=true] .awsui_focusable_gwq0h_16fk7_411:not(#\9):focus {
|
|
410
417
|
outline: 2px dotted transparent;
|
|
411
418
|
border-block: var(--border-field-width-09w7vk, 2px) solid var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
412
419
|
border-inline: var(--border-field-width-09w7vk, 2px) solid var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
@@ -417,9 +424,9 @@ body[data-awsui-focus-visible=true] .awsui_focusable_gwq0h_8rjzz_404:not(#\9):fo
|
|
|
417
424
|
box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-0ctpjf, 0px) var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
418
425
|
}
|
|
419
426
|
|
|
420
|
-
.awsui_click-
|
|
427
|
+
.awsui_click-target_gwq0h_16fk7_426:not(#\9) {
|
|
421
428
|
cursor: pointer;
|
|
422
429
|
}
|
|
423
|
-
.awsui_click-
|
|
430
|
+
.awsui_click-target_gwq0h_16fk7_426:not(#\9):not(.awsui_wrapper-container_gwq0h_16fk7_234):not(.awsui_header-container-button_gwq0h_16fk7_311):hover {
|
|
424
431
|
color: var(--color-text-expandable-section-hover-2d1zpj, #0972d3);
|
|
425
432
|
}
|
|
@@ -2,37 +2,37 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"content-enter": "awsui_content-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"trigger-expanded": "awsui_trigger-
|
|
8
|
-
"icon": "
|
|
9
|
-
"root": "
|
|
10
|
-
"expand-button": "awsui_expand-
|
|
11
|
-
"expanded": "
|
|
12
|
-
"icon-container": "awsui_icon-
|
|
13
|
-
"icon-container-container": "awsui_icon-container-
|
|
14
|
-
"wrapper": "
|
|
15
|
-
"wrapper-default": "awsui_wrapper-
|
|
16
|
-
"wrapper-footer": "awsui_wrapper-
|
|
17
|
-
"wrapper-navigation": "awsui_wrapper-
|
|
18
|
-
"wrapper-container": "awsui_wrapper-
|
|
19
|
-
"wrapper-compact": "awsui_wrapper-
|
|
20
|
-
"header-deprecated": "awsui_header-
|
|
21
|
-
"wrapper-expanded": "awsui_wrapper-
|
|
22
|
-
"header": "
|
|
23
|
-
"header-wrapper": "awsui_header-
|
|
24
|
-
"header-actions-wrapper": "awsui_header-actions-
|
|
25
|
-
"header-button": "awsui_header-
|
|
26
|
-
"header-container-button": "awsui_header-container-
|
|
27
|
-
"header-container": "awsui_header-
|
|
28
|
-
"header-navigation": "awsui_header-
|
|
29
|
-
"header-text": "awsui_header-
|
|
30
|
-
"content": "
|
|
31
|
-
"content-default": "awsui_content-
|
|
32
|
-
"content-footer": "awsui_content-
|
|
33
|
-
"content-expanded": "awsui_content-
|
|
34
|
-
"content-compact": "awsui_content-
|
|
35
|
-
"focusable": "
|
|
36
|
-
"click-target": "awsui_click-
|
|
5
|
+
"content-enter": "awsui_content-enter_gwq0h_16fk7_101",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_16fk7_1",
|
|
7
|
+
"trigger-expanded": "awsui_trigger-expanded_gwq0h_16fk7_123",
|
|
8
|
+
"icon": "awsui_icon_gwq0h_16fk7_137",
|
|
9
|
+
"root": "awsui_root_gwq0h_16fk7_155",
|
|
10
|
+
"expand-button": "awsui_expand-button_gwq0h_16fk7_193",
|
|
11
|
+
"expanded": "awsui_expanded_gwq0h_16fk7_201",
|
|
12
|
+
"icon-container": "awsui_icon-container_gwq0h_16fk7_211",
|
|
13
|
+
"icon-container-container": "awsui_icon-container-container_gwq0h_16fk7_215",
|
|
14
|
+
"wrapper": "awsui_wrapper_gwq0h_16fk7_219",
|
|
15
|
+
"wrapper-default": "awsui_wrapper-default_gwq0h_16fk7_227",
|
|
16
|
+
"wrapper-footer": "awsui_wrapper-footer_gwq0h_16fk7_227",
|
|
17
|
+
"wrapper-navigation": "awsui_wrapper-navigation_gwq0h_16fk7_231",
|
|
18
|
+
"wrapper-container": "awsui_wrapper-container_gwq0h_16fk7_234",
|
|
19
|
+
"wrapper-compact": "awsui_wrapper-compact_gwq0h_16fk7_238",
|
|
20
|
+
"header-deprecated": "awsui_header-deprecated_gwq0h_16fk7_251",
|
|
21
|
+
"wrapper-expanded": "awsui_wrapper-expanded_gwq0h_16fk7_273",
|
|
22
|
+
"header": "awsui_header_gwq0h_16fk7_251",
|
|
23
|
+
"header-wrapper": "awsui_header-wrapper_gwq0h_16fk7_293",
|
|
24
|
+
"header-actions-wrapper": "awsui_header-actions-wrapper_gwq0h_16fk7_305",
|
|
25
|
+
"header-button": "awsui_header-button_gwq0h_16fk7_311",
|
|
26
|
+
"header-container-button": "awsui_header-container-button_gwq0h_16fk7_311",
|
|
27
|
+
"header-container": "awsui_header-container_gwq0h_16fk7_311",
|
|
28
|
+
"header-navigation": "awsui_header-navigation_gwq0h_16fk7_346",
|
|
29
|
+
"header-text": "awsui_header-text_gwq0h_16fk7_383",
|
|
30
|
+
"content": "awsui_content_gwq0h_16fk7_101",
|
|
31
|
+
"content-default": "awsui_content-default_gwq0h_16fk7_396",
|
|
32
|
+
"content-footer": "awsui_content-footer_gwq0h_16fk7_400",
|
|
33
|
+
"content-expanded": "awsui_content-expanded_gwq0h_16fk7_404",
|
|
34
|
+
"content-compact": "awsui_content-compact_gwq0h_16fk7_407",
|
|
35
|
+
"focusable": "awsui_focusable_gwq0h_16fk7_411",
|
|
36
|
+
"click-target": "awsui_click-target_gwq0h_16fk7_426"
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InternalVariant } from './interfaces';
|
|
2
2
|
export declare function variantSupportsDescription(variant: InternalVariant): boolean;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function variantSupportsActions(variant: InternalVariant): boolean;
|
|
4
|
+
export declare function variantSupportsInfoLink(variant: InternalVariant): boolean;
|
|
4
5
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,eAAe,WAElE;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,eAAe,WAElE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,WAE9D;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,WAE/D"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export function variantSupportsDescription(variant) {
|
|
2
2
|
return ['container', 'default', 'footer'].includes(variant);
|
|
3
3
|
}
|
|
4
|
-
export function
|
|
4
|
+
export function variantSupportsActions(variant) {
|
|
5
|
+
return ['container', 'compact', 'default'].includes(variant);
|
|
6
|
+
}
|
|
7
|
+
export function variantSupportsInfoLink(variant) {
|
|
5
8
|
return ['container', 'compact'].includes(variant);
|
|
6
9
|
}
|
|
7
10
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/expandable-section/utils.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,0BAA0B,CAAC,OAAwB;IACjE,OAAO,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/expandable-section/utils.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,0BAA0B,CAAC,OAAwB;IACjE,OAAO,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAAwB;IAC7D,OAAO,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAwB;IAC9D,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACpD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InternalVariant } from './interfaces';\n\nexport function variantSupportsDescription(variant: InternalVariant) {\n return ['container', 'default', 'footer'].includes(variant);\n}\n\nexport function variantSupportsActions(variant: InternalVariant) {\n return ['container', 'compact', 'default'].includes(variant);\n}\n\nexport function variantSupportsInfoLink(variant: InternalVariant) {\n return ['container', 'compact'].includes(variant);\n}\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
package/package.json
CHANGED