@cloudscape-design/components 3.0.339 → 3.0.340
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-layout/drawer/index.js +6 -5
- package/app-layout/drawer/index.js.map +1 -1
- package/app-layout/drawer/interfaces.d.ts +6 -3
- package/app-layout/drawer/interfaces.d.ts.map +1 -1
- package/app-layout/drawer/interfaces.js.map +1 -1
- package/app-layout/drawer/styles.css.js +10 -10
- package/app-layout/drawer/styles.scoped.css +32 -35
- package/app-layout/drawer/styles.selectors.js +10 -10
- package/app-layout/mobile-toolbar/index.d.ts.map +1 -1
- package/app-layout/mobile-toolbar/index.js +6 -5
- package/app-layout/mobile-toolbar/index.js.map +1 -1
- package/app-layout/mobile-toolbar/styles.css.js +8 -6
- package/app-layout/mobile-toolbar/styles.scoped.css +11 -23
- package/app-layout/mobile-toolbar/styles.selectors.js +8 -6
- package/app-layout/toggles/index.d.ts +3 -1
- package/app-layout/toggles/index.d.ts.map +1 -1
- package/app-layout/toggles/index.js +6 -3
- package/app-layout/toggles/index.js.map +1 -1
- package/app-layout/toggles/interfaces.d.ts +3 -2
- package/app-layout/toggles/interfaces.d.ts.map +1 -1
- package/app-layout/toggles/interfaces.js.map +1 -1
- package/app-layout/toggles/styles.css.js +2 -1
- package/app-layout/toggles/styles.scoped.css +31 -1
- package/app-layout/toggles/styles.selectors.js +2 -1
- package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
- package/app-layout/visual-refresh/drawers.js +2 -2
- package/app-layout/visual-refresh/drawers.js.map +1 -1
- package/app-layout/visual-refresh/trigger-button.d.ts +1 -0
- package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +2 -2
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/internal/base-component/styles.scoped.css +0 -5
- package/internal/environment.js +1 -1
- package/internal/generated/theming/index.cjs +0 -27
- package/internal/generated/theming/index.js +0 -27
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/test-utils/dom/app-layout/index.d.ts +1 -0
- package/test-utils/dom/app-layout/index.js +3 -0
- package/test-utils/dom/app-layout/index.js.map +1 -1
- package/test-utils/selectors/app-layout/index.d.ts +1 -0
- package/test-utils/selectors/app-layout/index.js +3 -0
- package/test-utils/selectors/app-layout/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { IconProps } from '../../icon/interfaces';
|
|
3
3
|
export interface AppLayoutButtonProps {
|
|
4
4
|
className?: string;
|
|
@@ -6,7 +6,8 @@ export interface AppLayoutButtonProps {
|
|
|
6
6
|
ariaExpanded?: boolean;
|
|
7
7
|
iconName?: IconProps.Name;
|
|
8
8
|
iconSvg?: React.ReactNode;
|
|
9
|
-
onClick
|
|
9
|
+
onClick?: () => void;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
testId?: string;
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["app-layout/toggles/interfaces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["app-layout/toggles/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["app-layout/toggles/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { IconProps } from '../../icon/interfaces';\n\nexport interface AppLayoutButtonProps {\n className?: string;\n ariaLabel: string | undefined;\n ariaExpanded?: boolean;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n onClick
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["app-layout/toggles/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';\nimport { IconProps } from '../../icon/interfaces';\n\nexport interface AppLayoutButtonProps {\n className?: string;\n ariaLabel: string | undefined;\n ariaExpanded?: boolean;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n onClick?: () => void;\n disabled?: boolean;\n testId?: string;\n}\n"]}
|
|
@@ -90,7 +90,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_toggle-button_16w0h_viuea_93:not(#\9) {
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
border: 0;
|
|
96
|
+
padding: calc(var(--space-scaled-xxs-t2t62i, 4px) + 1px) calc(var(--space-xxs-ja5cp8, 4px) + 1px);
|
|
97
|
+
background: transparent;
|
|
98
|
+
color: currentColor;
|
|
99
|
+
}
|
|
100
|
+
.awsui_toggle-button_16w0h_viuea_93:not(#\9):focus {
|
|
101
|
+
outline: none;
|
|
102
|
+
text-decoration: none;
|
|
103
|
+
}
|
|
104
|
+
body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_viuea_93:not(#\9):focus {
|
|
105
|
+
position: relative;
|
|
106
|
+
}
|
|
107
|
+
body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_viuea_93:not(#\9):focus {
|
|
108
|
+
outline: 2px dotted transparent;
|
|
109
|
+
outline-offset: calc(var(--space-button-inline-icon-focus-outline-gutter-0bswpj, 0px) - 1px);
|
|
110
|
+
}
|
|
111
|
+
body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_viuea_93:not(#\9):focus::before {
|
|
112
|
+
content: " ";
|
|
113
|
+
display: block;
|
|
114
|
+
position: absolute;
|
|
115
|
+
left: calc(-1 * var(--space-button-inline-icon-focus-outline-gutter-0bswpj, 0px));
|
|
116
|
+
top: calc(-1 * var(--space-button-inline-icon-focus-outline-gutter-0bswpj, 0px));
|
|
117
|
+
width: calc(100% + 2 * var(--space-button-inline-icon-focus-outline-gutter-0bswpj, 0px));
|
|
118
|
+
height: calc(100% + 2 * var(--space-button-inline-icon-focus-outline-gutter-0bswpj, 0px));
|
|
119
|
+
border-radius: var(--border-radius-control-default-focus-ring-muizvi, 4px);
|
|
120
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-4t19h5, #0972d3);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.awsui_close-button_16w0h_viuea_123:not(#\9) {
|
|
94
124
|
position: absolute;
|
|
95
125
|
outline: none;
|
|
96
126
|
right: var(--space-m-h2th94, 16px);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"
|
|
5
|
+
"toggle-button": "awsui_toggle-button_16w0h_viuea_93",
|
|
6
|
+
"close-button": "awsui_close-button_16w0h_viuea_123"
|
|
6
7
|
};
|
|
7
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawers.d.ts","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/drawers.tsx"],"names":[],"mappings":";AAcA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,uBAuB9B;
|
|
1
|
+
{"version":3,"file":"drawers.d.ts","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/drawers.tsx"],"names":[],"mappings":";AAcA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,uBAuB9B;AAgMD;;;;;GAKG;AACH,wBAAgB,cAAc,uBAuE7B"}
|
|
@@ -103,7 +103,7 @@ function DesktopTriggers() {
|
|
|
103
103
|
return (React.createElement(TriggerButton, { ariaLabel: (_a = item.ariaLabels) === null || _a === void 0 ? void 0 : _a.triggerButton, className: clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger']), iconName: item.trigger.iconName, iconSvg: item.trigger.iconSvg, key: item.id, onClick: () => {
|
|
104
104
|
isToolsOpen && handleToolsClick(!isToolsOpen, true);
|
|
105
105
|
handleDrawersClick(item.id);
|
|
106
|
-
}, ref: item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined, selected: item.id === activeDrawerId }));
|
|
106
|
+
}, ref: item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined, selected: item.id === activeDrawerId, testId: `awsui-app-layout-trigger-${item.id}` }));
|
|
107
107
|
}),
|
|
108
108
|
hasSplitPanel && splitPanelToggle.displayed && (React.createElement(TriggerButton, { ariaLabel: splitPanelToggle.ariaLabel, className: clsx(styles['drawers-trigger'], splitPanelStyles['open-button']), iconName: "view-vertical", onClick: () => handleSplitPanelClick(), selected: hasSplitPanel && isSplitPanelOpen, ref: splitPanelRefs.toggle })))));
|
|
109
109
|
}
|
|
@@ -129,7 +129,7 @@ export function MobileTriggers() {
|
|
|
129
129
|
!toolsHide && tools && (React.createElement(InternalButton, { ariaLabel: (_a = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.toolsToggle) !== null && _a !== void 0 ? _a : undefined, ariaExpanded: isToolsOpen, className: testutilStyles['tools-toggle'], disabled: hasDrawerViewportOverlay, formAction: "none", iconName: "status-info", onClick: () => handleToolsClick(true), ref: toolsRefs.toggle, variant: "icon", __nativeAttributes: { 'aria-haspopup': true } })),
|
|
130
130
|
drawers.items.map(item => {
|
|
131
131
|
var _a;
|
|
132
|
-
return (React.createElement(InternalButton, { ariaExpanded: item.id === activeDrawerId, ariaLabel: (_a = item.ariaLabels) === null || _a === void 0 ? void 0 : _a.triggerButton, className: clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger']), disabled: hasDrawerViewportOverlay, formAction: "none", iconName: item.trigger.iconName, iconSvg: item.trigger.iconSvg, key: item.id, onClick: () => handleDrawersClick(item.id), ref: item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined, variant: "icon", __nativeAttributes: { 'aria-haspopup': true } }));
|
|
132
|
+
return (React.createElement(InternalButton, { ariaExpanded: item.id === activeDrawerId, ariaLabel: (_a = item.ariaLabels) === null || _a === void 0 ? void 0 : _a.triggerButton, className: clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger']), disabled: hasDrawerViewportOverlay, formAction: "none", iconName: item.trigger.iconName, iconSvg: item.trigger.iconSvg, key: item.id, onClick: () => handleDrawersClick(item.id), ref: item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined, variant: "icon", __nativeAttributes: { 'aria-haspopup': true, 'data-testid': `awsui-app-layout-trigger-${item.id}` } }));
|
|
133
133
|
})));
|
|
134
134
|
}
|
|
135
135
|
//# sourceMappingURL=drawers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawers.js","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/drawers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM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copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\nimport customCssProps from '../../internal/generated/custom-css-properties';\nimport { InternalButton } from '../../button/internal';\nimport SplitPanel from './split-panel';\nimport TriggerButton from './trigger-button';\nimport { useAppLayoutInternals } from './context';\nimport splitPanelStyles from '../../split-panel/styles.css.js';\nimport styles from './styles.css.js';\nimport sharedStyles from '../styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\n\n/**\n * The Drawers root component is mounted in the AppLayout index file. It will only\n * render if the drawers are defined, and it will take over the mounting of and\n * rendering of the Tools and SplitPanel (side position) if they exist. If drawers\n * do not exist then the Tools and SplitPanel will be handled by the Tools component.\n */\nexport default function Drawers() {\n const { disableBodyScroll, drawers, hasDrawerViewportOverlay, hasOpenDrawer, isNavigationOpen, navigationHide } =\n useAppLayoutInternals();\n\n const isUnfocusable = hasDrawerViewportOverlay && isNavigationOpen && !navigationHide;\n\n if (!drawers) {\n return null;\n }\n\n return (\n <div\n className={clsx(styles['drawers-container'], {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles['has-open-drawer']]: hasOpenDrawer,\n [styles.unfocusable]: isUnfocusable,\n })}\n >\n <SplitPanel.Side />\n <ActiveDrawer />\n <DesktopTriggers />\n </div>\n );\n}\n\n/**\n * The ActiveDrawer component will render either the drawer content that corresponds\n * to the activeDrawerId or the Tools content if it exists and isToolsOpen is true.\n * The aria labels, click handling, and focus handling will be updated dynamically\n * based on the active drawer or tools content.\n */\nfunction ActiveDrawer() {\n const {\n activeDrawerId,\n ariaLabels,\n drawers,\n drawersRefs,\n handleDrawersClick,\n handleToolsClick,\n hasDrawerViewportOverlay,\n isMobile,\n isNavigationOpen,\n isToolsOpen,\n navigationHide,\n tools,\n toolsRefs,\n loseDrawersFocus,\n resizeHandle,\n drawerSize,\n drawersMaxWidth,\n drawerRef,\n } = useAppLayoutInternals();\n\n const activeDrawer = drawers?.items.find((item: any) => item.id === activeDrawerId) ?? null;\n\n const computedAriaLabels = {\n closeButton: activeDrawerId ? activeDrawer?.ariaLabels?.closeButton : ariaLabels?.toolsClose,\n content: activeDrawerId ? activeDrawer?.ariaLabels?.content : ariaLabels?.tools,\n };\n\n const isHidden = !activeDrawerId && !isToolsOpen;\n const isUnfocusable = isHidden || (hasDrawerViewportOverlay && isNavigationOpen && !navigationHide);\n\n const size = Math.min(drawersMaxWidth, drawerSize);\n\n return (\n <aside\n aria-hidden={isHidden}\n aria-label={computedAriaLabels.content}\n className={clsx(styles.drawer, sharedStyles['with-motion'], {\n [styles['is-drawer-open']]: activeDrawerId || isToolsOpen,\n [styles.unfocusable]: isUnfocusable,\n [testutilStyles['active-drawer']]: activeDrawerId,\n [testutilStyles.tools]: isToolsOpen,\n })}\n style={{\n ...(!isMobile && drawerSize && { [customCssProps.drawerSize]: `${size}px` }),\n }}\n ref={drawerRef}\n onBlur={e => {\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n loseDrawersFocus();\n }\n }}\n >\n {!isMobile && activeDrawer?.resizable && resizeHandle}\n <div className={clsx(styles['drawer-close-button'])}>\n <InternalButton\n ariaLabel={computedAriaLabels.closeButton}\n className={clsx({\n [testutilStyles['active-drawer-close-button']]: activeDrawerId,\n [testutilStyles['tools-close']]: isToolsOpen,\n })}\n formAction=\"none\"\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => (activeDrawerId ? handleDrawersClick(activeDrawerId ?? null) : handleToolsClick(false))}\n ref={isToolsOpen ? toolsRefs.close : drawersRefs.close}\n variant=\"icon\"\n />\n </div>\n\n <div className={styles['drawer-content']}>\n {activeDrawerId && activeDrawer?.content}\n {isToolsOpen && tools}\n </div>\n </aside>\n );\n}\n\n/**\n * The DesktopTriggers will render the trigger buttons for Tools, Drawers, and the\n * SplitPanel in non mobile viewports. Changes to the activeDrawerId need to be\n * tracked by the previousActiveDrawerId property in order to appropriately apply\n * the ref required to manage focus control.\n */\nfunction DesktopTriggers() {\n const {\n activeDrawerId,\n ariaLabels,\n drawers,\n drawersRefs,\n drawersTriggerCount,\n handleDrawersClick,\n handleSplitPanelClick,\n handleToolsClick,\n hasOpenDrawer,\n isMobile,\n isSplitPanelOpen,\n isToolsOpen,\n splitPanel,\n splitPanelDisplayed,\n splitPanelPosition,\n splitPanelRefs,\n splitPanelToggle,\n tools,\n toolsHide,\n toolsRefs,\n } = useAppLayoutInternals();\n\n const hasMultipleTriggers = drawersTriggerCount > 1;\n const hasSplitPanel = splitPanel && splitPanelDisplayed && splitPanelPosition === 'side' ? true : false;\n const previousActiveDrawerId = useRef(activeDrawerId);\n\n if (activeDrawerId) {\n previousActiveDrawerId.current = activeDrawerId;\n }\n\n if (isMobile) {\n return null;\n }\n\n return (\n <aside\n className={clsx(\n styles['drawers-desktop-triggers-container'],\n testutilStyles['drawers-desktop-triggers-container'],\n {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: hasOpenDrawer,\n }\n )}\n aria-label={drawers?.ariaLabel}\n >\n <div\n className={clsx(styles['drawers-trigger-content'], {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: hasOpenDrawer,\n })}\n >\n {!toolsHide && tools && (\n <TriggerButton\n ariaLabel={ariaLabels?.toolsToggle}\n className={clsx(styles['drawers-trigger'], testutilStyles['tools-toggle'])}\n iconName=\"status-info\"\n onClick={() => {\n activeDrawerId && handleDrawersClick(null, true);\n handleToolsClick(!isToolsOpen);\n }}\n ref={toolsRefs.toggle}\n selected={isToolsOpen}\n />\n )}\n\n {drawers?.items.map(item => (\n <TriggerButton\n ariaLabel={item.ariaLabels?.triggerButton}\n className={clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger'])}\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n key={item.id}\n onClick={() => {\n isToolsOpen && handleToolsClick(!isToolsOpen, true);\n handleDrawersClick(item.id);\n }}\n ref={item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined}\n selected={item.id === activeDrawerId}\n />\n ))}\n\n {hasSplitPanel && splitPanelToggle.displayed && (\n <TriggerButton\n ariaLabel={splitPanelToggle.ariaLabel}\n className={clsx(styles['drawers-trigger'], splitPanelStyles['open-button'])}\n iconName=\"view-vertical\"\n onClick={() => handleSplitPanelClick()}\n selected={hasSplitPanel && isSplitPanelOpen}\n ref={splitPanelRefs.toggle}\n />\n )}\n </div>\n </aside>\n );\n}\n\n/**\n * The MobileTriggers will be mounted inside of the AppBar component and\n * only rendered when Drawers are defined in mobile viewports. The same logic\n * will in the AppBar component will suppress the rendering of the legacy\n * trigger button for the Tools drawer.\n */\nexport function MobileTriggers() {\n const {\n activeDrawerId,\n ariaLabels,\n drawers,\n drawersRefs,\n handleDrawersClick,\n handleToolsClick,\n hasDrawerViewportOverlay,\n isMobile,\n isToolsOpen,\n tools,\n toolsHide,\n toolsRefs,\n } = useAppLayoutInternals();\n\n const previousActiveDrawerId = useRef(activeDrawerId);\n\n if (activeDrawerId) {\n previousActiveDrawerId.current = activeDrawerId;\n }\n\n if (!isMobile || !drawers) {\n return null;\n }\n\n return (\n <aside\n aria-hidden={hasDrawerViewportOverlay}\n className={clsx(\n styles['drawers-mobile-triggers-container'],\n testutilStyles['drawers-mobile-triggers-container'],\n {\n [styles.unfocusable]: hasDrawerViewportOverlay,\n }\n )}\n aria-label={drawers.ariaLabel}\n >\n {!toolsHide && tools && (\n <InternalButton\n ariaLabel={ariaLabels?.toolsToggle ?? undefined}\n ariaExpanded={isToolsOpen}\n className={testutilStyles['tools-toggle']}\n disabled={hasDrawerViewportOverlay}\n formAction=\"none\"\n iconName=\"status-info\"\n onClick={() => handleToolsClick(true)}\n ref={toolsRefs.toggle}\n variant=\"icon\"\n __nativeAttributes={{ 'aria-haspopup': true }}\n />\n )}\n\n {drawers.items.map(item => (\n <InternalButton\n ariaExpanded={item.id === activeDrawerId}\n ariaLabel={item.ariaLabels?.triggerButton}\n className={clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger'])}\n disabled={hasDrawerViewportOverlay}\n formAction=\"none\"\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n key={item.id}\n onClick={() => handleDrawersClick(item.id)}\n ref={item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined}\n variant=\"icon\"\n __nativeAttributes={{ 'aria-haspopup': true }}\n />\n ))}\n </aside>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"drawers.js","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/drawers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO;IAC7B,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAC7G,qBAAqB,EAAE,CAAC;IAE1B,MAAM,aAAa,GAAG,wBAAwB,IAAI,gBAAgB,IAAI,CAAC,cAAc,CAAC;IAEtF,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC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EACjB,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAC7B,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,EAC1C,GAAG,EAAE,IAAI,CAAC,EAAE,KAAK,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAChF,OAAO,EAAC,MAAM,EACd,kBAAkB,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,4BAA4B,IAAI,CAAC,EAAE,EAAE,EAAE,GACnG,CACH,CAAA;SAAA,CAAC,CACI,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\nimport customCssProps from '../../internal/generated/custom-css-properties';\nimport { InternalButton } from '../../button/internal';\nimport SplitPanel from './split-panel';\nimport TriggerButton from './trigger-button';\nimport { useAppLayoutInternals } from './context';\nimport splitPanelStyles from '../../split-panel/styles.css.js';\nimport styles from './styles.css.js';\nimport sharedStyles from '../styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\n\n/**\n * The Drawers root component is mounted in the AppLayout index file. It will only\n * render if the drawers are defined, and it will take over the mounting of and\n * rendering of the Tools and SplitPanel (side position) if they exist. If drawers\n * do not exist then the Tools and SplitPanel will be handled by the Tools component.\n */\nexport default function Drawers() {\n const { disableBodyScroll, drawers, hasDrawerViewportOverlay, hasOpenDrawer, isNavigationOpen, navigationHide } =\n useAppLayoutInternals();\n\n const isUnfocusable = hasDrawerViewportOverlay && isNavigationOpen && !navigationHide;\n\n if (!drawers) {\n return null;\n }\n\n return (\n <div\n className={clsx(styles['drawers-container'], {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles['has-open-drawer']]: hasOpenDrawer,\n [styles.unfocusable]: isUnfocusable,\n })}\n >\n <SplitPanel.Side />\n <ActiveDrawer />\n <DesktopTriggers />\n </div>\n );\n}\n\n/**\n * The ActiveDrawer component will render either the drawer content that corresponds\n * to the activeDrawerId or the Tools content if it exists and isToolsOpen is true.\n * The aria labels, click handling, and focus handling will be updated dynamically\n * based on the active drawer or tools content.\n */\nfunction ActiveDrawer() {\n const {\n activeDrawerId,\n ariaLabels,\n drawers,\n drawersRefs,\n handleDrawersClick,\n handleToolsClick,\n hasDrawerViewportOverlay,\n isMobile,\n isNavigationOpen,\n isToolsOpen,\n navigationHide,\n tools,\n toolsRefs,\n loseDrawersFocus,\n resizeHandle,\n drawerSize,\n drawersMaxWidth,\n drawerRef,\n } = useAppLayoutInternals();\n\n const activeDrawer = drawers?.items.find((item: any) => item.id === activeDrawerId) ?? null;\n\n const computedAriaLabels = {\n closeButton: activeDrawerId ? activeDrawer?.ariaLabels?.closeButton : ariaLabels?.toolsClose,\n content: activeDrawerId ? activeDrawer?.ariaLabels?.content : ariaLabels?.tools,\n };\n\n const isHidden = !activeDrawerId && !isToolsOpen;\n const isUnfocusable = isHidden || (hasDrawerViewportOverlay && isNavigationOpen && !navigationHide);\n\n const size = Math.min(drawersMaxWidth, drawerSize);\n\n return (\n <aside\n aria-hidden={isHidden}\n aria-label={computedAriaLabels.content}\n className={clsx(styles.drawer, sharedStyles['with-motion'], {\n [styles['is-drawer-open']]: activeDrawerId || isToolsOpen,\n [styles.unfocusable]: isUnfocusable,\n [testutilStyles['active-drawer']]: activeDrawerId,\n [testutilStyles.tools]: isToolsOpen,\n })}\n style={{\n ...(!isMobile && drawerSize && { [customCssProps.drawerSize]: `${size}px` }),\n }}\n ref={drawerRef}\n onBlur={e => {\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n loseDrawersFocus();\n }\n }}\n >\n {!isMobile && activeDrawer?.resizable && resizeHandle}\n <div className={clsx(styles['drawer-close-button'])}>\n <InternalButton\n ariaLabel={computedAriaLabels.closeButton}\n className={clsx({\n [testutilStyles['active-drawer-close-button']]: activeDrawerId,\n [testutilStyles['tools-close']]: isToolsOpen,\n })}\n formAction=\"none\"\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => (activeDrawerId ? handleDrawersClick(activeDrawerId ?? null) : handleToolsClick(false))}\n ref={isToolsOpen ? toolsRefs.close : drawersRefs.close}\n variant=\"icon\"\n />\n </div>\n\n <div className={styles['drawer-content']}>\n {activeDrawerId && activeDrawer?.content}\n {isToolsOpen && tools}\n </div>\n </aside>\n );\n}\n\n/**\n * The DesktopTriggers will render the trigger buttons for Tools, Drawers, and the\n * SplitPanel in non mobile viewports. Changes to the activeDrawerId need to be\n * tracked by the previousActiveDrawerId property in order to appropriately apply\n * the ref required to manage focus control.\n */\nfunction DesktopTriggers() {\n const {\n activeDrawerId,\n ariaLabels,\n drawers,\n drawersRefs,\n drawersTriggerCount,\n handleDrawersClick,\n handleSplitPanelClick,\n handleToolsClick,\n hasOpenDrawer,\n isMobile,\n isSplitPanelOpen,\n isToolsOpen,\n splitPanel,\n splitPanelDisplayed,\n splitPanelPosition,\n splitPanelRefs,\n splitPanelToggle,\n tools,\n toolsHide,\n toolsRefs,\n } = useAppLayoutInternals();\n\n const hasMultipleTriggers = drawersTriggerCount > 1;\n const hasSplitPanel = splitPanel && splitPanelDisplayed && splitPanelPosition === 'side' ? true : false;\n const previousActiveDrawerId = useRef(activeDrawerId);\n\n if (activeDrawerId) {\n previousActiveDrawerId.current = activeDrawerId;\n }\n\n if (isMobile) {\n return null;\n }\n\n return (\n <aside\n className={clsx(\n styles['drawers-desktop-triggers-container'],\n testutilStyles['drawers-desktop-triggers-container'],\n {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: hasOpenDrawer,\n }\n )}\n aria-label={drawers?.ariaLabel}\n >\n <div\n className={clsx(styles['drawers-trigger-content'], {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: hasOpenDrawer,\n })}\n >\n {!toolsHide && tools && (\n <TriggerButton\n ariaLabel={ariaLabels?.toolsToggle}\n className={clsx(styles['drawers-trigger'], testutilStyles['tools-toggle'])}\n iconName=\"status-info\"\n onClick={() => {\n activeDrawerId && handleDrawersClick(null, true);\n handleToolsClick(!isToolsOpen);\n }}\n ref={toolsRefs.toggle}\n selected={isToolsOpen}\n />\n )}\n\n {drawers?.items.map(item => (\n <TriggerButton\n ariaLabel={item.ariaLabels?.triggerButton}\n className={clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger'])}\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n key={item.id}\n onClick={() => {\n isToolsOpen && handleToolsClick(!isToolsOpen, true);\n handleDrawersClick(item.id);\n }}\n ref={item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined}\n selected={item.id === activeDrawerId}\n testId={`awsui-app-layout-trigger-${item.id}`}\n />\n ))}\n\n {hasSplitPanel && splitPanelToggle.displayed && (\n <TriggerButton\n ariaLabel={splitPanelToggle.ariaLabel}\n className={clsx(styles['drawers-trigger'], splitPanelStyles['open-button'])}\n iconName=\"view-vertical\"\n onClick={() => handleSplitPanelClick()}\n selected={hasSplitPanel && isSplitPanelOpen}\n ref={splitPanelRefs.toggle}\n />\n )}\n </div>\n </aside>\n );\n}\n\n/**\n * The MobileTriggers will be mounted inside of the AppBar component and\n * only rendered when Drawers are defined in mobile viewports. The same logic\n * will in the AppBar component will suppress the rendering of the legacy\n * trigger button for the Tools drawer.\n */\nexport function MobileTriggers() {\n const {\n activeDrawerId,\n ariaLabels,\n drawers,\n drawersRefs,\n handleDrawersClick,\n handleToolsClick,\n hasDrawerViewportOverlay,\n isMobile,\n isToolsOpen,\n tools,\n toolsHide,\n toolsRefs,\n } = useAppLayoutInternals();\n\n const previousActiveDrawerId = useRef(activeDrawerId);\n\n if (activeDrawerId) {\n previousActiveDrawerId.current = activeDrawerId;\n }\n\n if (!isMobile || !drawers) {\n return null;\n }\n\n return (\n <aside\n aria-hidden={hasDrawerViewportOverlay}\n className={clsx(\n styles['drawers-mobile-triggers-container'],\n testutilStyles['drawers-mobile-triggers-container'],\n {\n [styles.unfocusable]: hasDrawerViewportOverlay,\n }\n )}\n aria-label={drawers.ariaLabel}\n >\n {!toolsHide && tools && (\n <InternalButton\n ariaLabel={ariaLabels?.toolsToggle ?? undefined}\n ariaExpanded={isToolsOpen}\n className={testutilStyles['tools-toggle']}\n disabled={hasDrawerViewportOverlay}\n formAction=\"none\"\n iconName=\"status-info\"\n onClick={() => handleToolsClick(true)}\n ref={toolsRefs.toggle}\n variant=\"icon\"\n __nativeAttributes={{ 'aria-haspopup': true }}\n />\n )}\n\n {drawers.items.map(item => (\n <InternalButton\n ariaExpanded={item.id === activeDrawerId}\n ariaLabel={item.ariaLabels?.triggerButton}\n className={clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger'])}\n disabled={hasDrawerViewportOverlay}\n formAction=\"none\"\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n key={item.id}\n onClick={() => handleDrawersClick(item.id)}\n ref={item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined}\n variant=\"icon\"\n __nativeAttributes={{ 'aria-haspopup': true, 'data-testid': `awsui-app-layout-trigger-${item.id}` }}\n />\n ))}\n </aside>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-button.d.ts","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/trigger-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;
|
|
1
|
+
{"version":3,"file":"trigger-button.d.ts","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/trigger-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;AA4BD,wBAA+C"}
|
|
@@ -4,10 +4,10 @@ import React from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import Icon from '../../icon/internal';
|
|
6
6
|
import styles from './styles.css.js';
|
|
7
|
-
function TriggerButton({ ariaLabel, className, iconName, iconSvg, onClick, selected = false }, ref) {
|
|
7
|
+
function TriggerButton({ ariaLabel, className, iconName, iconSvg, onClick, testId, selected = false }, ref) {
|
|
8
8
|
return (React.createElement("button", { "aria-expanded": false, "aria-haspopup": true, "aria-label": ariaLabel, className: clsx(styles.trigger, {
|
|
9
9
|
[styles.selected]: selected,
|
|
10
|
-
}, className), onClick: onClick, ref: ref, type: "button" },
|
|
10
|
+
}, className), onClick: onClick, ref: ref, type: "button", "data-testid": testId },
|
|
11
11
|
React.createElement(Icon, { name: iconName, svg: iconSvg })));
|
|
12
12
|
}
|
|
13
13
|
export default React.forwardRef(TriggerButton);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-button.js","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/trigger-button.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"trigger-button.js","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/trigger-button.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAcrC,SAAS,aAAa,CACpB,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAsB,EAClG,GAA+B;IAE/B,OAAO,CACL,iDACiB,KAAK,mBACL,IAAI,gBACP,SAAS,EACrB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd;YACE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;SAC5B,EACD,SAAS,CACV,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAmC,EACxC,IAAI,EAAC,QAAQ,iBACA,MAAM;QAEnB,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,GAAI,CAC/B,CACV,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport Icon from '../../icon/internal';\nimport styles from './styles.css.js';\nimport { ButtonProps } from '../../button/interfaces';\nimport { IconProps } from '../../icon/interfaces';\n\nexport interface TriggerButtonProps {\n ariaLabel?: string;\n className?: string;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n testId?: string;\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n selected?: boolean;\n}\n\nfunction TriggerButton(\n { ariaLabel, className, iconName, iconSvg, onClick, testId, selected = false }: TriggerButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n) {\n return (\n <button\n aria-expanded={false}\n aria-haspopup={true}\n aria-label={ariaLabel}\n className={clsx(\n styles.trigger,\n {\n [styles.selected]: selected,\n },\n className\n )}\n onClick={onClick}\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n data-testid={testId}\n >\n <Icon name={iconName} svg={iconSvg} />\n </button>\n );\n}\n\nexport default React.forwardRef(TriggerButton);\n"]}
|
|
@@ -273,7 +273,6 @@
|
|
|
273
273
|
--color-foreground-control-default-rsunm6:#ffffff;
|
|
274
274
|
--color-foreground-control-disabled-f2499o:#ffffff;
|
|
275
275
|
--color-shadow-default-ukle9p:rgba(0, 7, 22, 0.12);
|
|
276
|
-
--color-shadow-layout-toggle-u6bbly:#d1d5db;
|
|
277
276
|
--color-stroke-chart-line-7sdstd:#7d8998;
|
|
278
277
|
--color-text-accent-qh8xwn:#0972d3;
|
|
279
278
|
--color-text-body-default-su7kuo:#000716;
|
|
@@ -857,7 +856,6 @@
|
|
|
857
856
|
--color-foreground-control-default-rsunm6:#000716;
|
|
858
857
|
--color-foreground-control-disabled-f2499o:#0f1b2a;
|
|
859
858
|
--color-shadow-default-ukle9p:rgba(0, 7, 22, 1);
|
|
860
|
-
--color-shadow-layout-toggle-u6bbly:#354150;
|
|
861
859
|
--color-text-accent-qh8xwn:#539fe5;
|
|
862
860
|
--color-text-body-default-su7kuo:#d1d5db;
|
|
863
861
|
--color-text-body-secondary-he5d85:#d1d5db;
|
|
@@ -1136,7 +1134,6 @@
|
|
|
1136
1134
|
--color-foreground-control-default-rsunm6:#000716;
|
|
1137
1135
|
--color-foreground-control-disabled-f2499o:#0f1b2a;
|
|
1138
1136
|
--color-shadow-default-ukle9p:rgba(0, 7, 22, 1);
|
|
1139
|
-
--color-shadow-layout-toggle-u6bbly:#354150;
|
|
1140
1137
|
--color-text-accent-qh8xwn:#539fe5;
|
|
1141
1138
|
--color-text-body-default-su7kuo:#d1d5db;
|
|
1142
1139
|
--color-text-body-secondary-he5d85:#d1d5db;
|
|
@@ -1320,7 +1317,6 @@
|
|
|
1320
1317
|
--color-foreground-control-default-rsunm6:#000716;
|
|
1321
1318
|
--color-foreground-control-disabled-f2499o:#0f1b2a;
|
|
1322
1319
|
--color-shadow-default-ukle9p:rgba(0, 7, 22, 1);
|
|
1323
|
-
--color-shadow-layout-toggle-u6bbly:#354150;
|
|
1324
1320
|
--color-text-accent-qh8xwn:#539fe5;
|
|
1325
1321
|
--color-text-body-default-su7kuo:#d1d5db;
|
|
1326
1322
|
--color-text-body-secondary-he5d85:#d1d5db;
|
|
@@ -1557,7 +1553,6 @@
|
|
|
1557
1553
|
--color-foreground-control-default-rsunm6:#000716;
|
|
1558
1554
|
--color-foreground-control-disabled-f2499o:#0f1b2a;
|
|
1559
1555
|
--color-shadow-default-ukle9p:rgba(0, 7, 22, 1);
|
|
1560
|
-
--color-shadow-layout-toggle-u6bbly:#354150;
|
|
1561
1556
|
--color-text-accent-qh8xwn:#539fe5;
|
|
1562
1557
|
--color-text-body-default-su7kuo:#d1d5db;
|
|
1563
1558
|
--color-text-body-secondary-he5d85:#d1d5db;
|
package/internal/environment.js
CHANGED
|
@@ -1216,10 +1216,6 @@ module.exports.preset = {
|
|
|
1216
1216
|
"light": "{colorGreyTransparentHeavy}",
|
|
1217
1217
|
"dark": "{colorGreyTransparentHeavy}"
|
|
1218
1218
|
},
|
|
1219
|
-
"colorShadowLayoutToggle": {
|
|
1220
|
-
"light": "{colorGrey300}",
|
|
1221
|
-
"dark": "{colorGrey650}"
|
|
1222
|
-
},
|
|
1223
1219
|
"colorShadowMedium": {
|
|
1224
1220
|
"light": "{colorGreyTransparent}",
|
|
1225
1221
|
"dark": "{colorGreyTransparent}"
|
|
@@ -3233,10 +3229,6 @@ module.exports.preset = {
|
|
|
3233
3229
|
"light": "{colorGreyTransparentHeavy}",
|
|
3234
3230
|
"dark": "{colorGreyTransparentHeavy}"
|
|
3235
3231
|
},
|
|
3236
|
-
"colorShadowLayoutToggle": {
|
|
3237
|
-
"light": "{colorGrey650}",
|
|
3238
|
-
"dark": "{colorGrey650}"
|
|
3239
|
-
},
|
|
3240
3232
|
"colorShadowMedium": {
|
|
3241
3233
|
"light": "{colorGreyTransparent}",
|
|
3242
3234
|
"dark": "{colorGreyTransparent}"
|
|
@@ -4235,10 +4227,6 @@ module.exports.preset = {
|
|
|
4235
4227
|
"light": "{colorGreyTransparentHeavy}",
|
|
4236
4228
|
"dark": "{colorGreyTransparentHeavy}"
|
|
4237
4229
|
},
|
|
4238
|
-
"colorShadowLayoutToggle": {
|
|
4239
|
-
"light": "{colorGrey650}",
|
|
4240
|
-
"dark": "{colorGrey650}"
|
|
4241
|
-
},
|
|
4242
4230
|
"colorShadowMedium": {
|
|
4243
4231
|
"light": "{colorGreyTransparent}",
|
|
4244
4232
|
"dark": "{colorGreyTransparent}"
|
|
@@ -5169,10 +5157,6 @@ module.exports.preset = {
|
|
|
5169
5157
|
"light": "{colorGreyTransparentHeavy}",
|
|
5170
5158
|
"dark": "{colorGreyTransparentHeavy}"
|
|
5171
5159
|
},
|
|
5172
|
-
"colorShadowLayoutToggle": {
|
|
5173
|
-
"light": "{colorGrey300}",
|
|
5174
|
-
"dark": "{colorGrey650}"
|
|
5175
|
-
},
|
|
5176
5160
|
"colorShadowMedium": {
|
|
5177
5161
|
"light": "{colorGreyTransparent}",
|
|
5178
5162
|
"dark": "{colorGreyTransparent}"
|
|
@@ -6103,10 +6087,6 @@ module.exports.preset = {
|
|
|
6103
6087
|
"light": "{colorGreyTransparentHeavy}",
|
|
6104
6088
|
"dark": "{colorGreyTransparentHeavy}"
|
|
6105
6089
|
},
|
|
6106
|
-
"colorShadowLayoutToggle": {
|
|
6107
|
-
"light": "{colorGrey300}",
|
|
6108
|
-
"dark": "{colorGrey650}"
|
|
6109
|
-
},
|
|
6110
6090
|
"colorShadowMedium": {
|
|
6111
6091
|
"light": "{colorGreyTransparent}",
|
|
6112
6092
|
"dark": "{colorGreyTransparent}"
|
|
@@ -7037,10 +7017,6 @@ module.exports.preset = {
|
|
|
7037
7017
|
"light": "{colorGreyTransparentHeavy}",
|
|
7038
7018
|
"dark": "{colorGreyTransparentHeavy}"
|
|
7039
7019
|
},
|
|
7040
|
-
"colorShadowLayoutToggle": {
|
|
7041
|
-
"light": "{colorGrey650}",
|
|
7042
|
-
"dark": "{colorGrey650}"
|
|
7043
|
-
},
|
|
7044
7020
|
"colorShadowMedium": {
|
|
7045
7021
|
"light": "{colorGreyTransparent}",
|
|
7046
7022
|
"dark": "{colorGreyTransparent}"
|
|
@@ -7736,7 +7712,6 @@ module.exports.preset = {
|
|
|
7736
7712
|
"colorForegroundControlDefault": "color",
|
|
7737
7713
|
"colorForegroundControlDisabled": "color",
|
|
7738
7714
|
"colorShadowDefault": "color",
|
|
7739
|
-
"colorShadowLayoutToggle": "color",
|
|
7740
7715
|
"colorShadowMedium": "color",
|
|
7741
7716
|
"colorShadowSide": "color",
|
|
7742
7717
|
"colorStrokeChartLine": "color",
|
|
@@ -8815,7 +8790,6 @@ module.exports.preset = {
|
|
|
8815
8790
|
"colorForegroundControlDefault": "color-foreground-control-default",
|
|
8816
8791
|
"colorForegroundControlDisabled": "color-foreground-control-disabled",
|
|
8817
8792
|
"colorShadowDefault": "color-shadow-default",
|
|
8818
|
-
"colorShadowLayoutToggle": "color-shadow-layout-toggle",
|
|
8819
8793
|
"colorShadowMedium": "color-shadow-medium",
|
|
8820
8794
|
"colorShadowSide": "color-shadow-side",
|
|
8821
8795
|
"colorStrokeChartLine": "color-stroke-chart-line",
|
|
@@ -9492,7 +9466,6 @@ module.exports.preset = {
|
|
|
9492
9466
|
"colorForegroundControlDefault": "--color-foreground-control-default-rsunm6",
|
|
9493
9467
|
"colorForegroundControlDisabled": "--color-foreground-control-disabled-f2499o",
|
|
9494
9468
|
"colorShadowDefault": "--color-shadow-default-ukle9p",
|
|
9495
|
-
"colorShadowLayoutToggle": "--color-shadow-layout-toggle-u6bbly",
|
|
9496
9469
|
"colorShadowMedium": "--color-shadow-medium-ncb0av",
|
|
9497
9470
|
"colorShadowSide": "--color-shadow-side-priy5p",
|
|
9498
9471
|
"colorStrokeChartLine": "--color-stroke-chart-line-7sdstd",
|
|
@@ -1216,10 +1216,6 @@ export var preset = {
|
|
|
1216
1216
|
"light": "{colorGreyTransparentHeavy}",
|
|
1217
1217
|
"dark": "{colorGreyTransparentHeavy}"
|
|
1218
1218
|
},
|
|
1219
|
-
"colorShadowLayoutToggle": {
|
|
1220
|
-
"light": "{colorGrey300}",
|
|
1221
|
-
"dark": "{colorGrey650}"
|
|
1222
|
-
},
|
|
1223
1219
|
"colorShadowMedium": {
|
|
1224
1220
|
"light": "{colorGreyTransparent}",
|
|
1225
1221
|
"dark": "{colorGreyTransparent}"
|
|
@@ -3233,10 +3229,6 @@ export var preset = {
|
|
|
3233
3229
|
"light": "{colorGreyTransparentHeavy}",
|
|
3234
3230
|
"dark": "{colorGreyTransparentHeavy}"
|
|
3235
3231
|
},
|
|
3236
|
-
"colorShadowLayoutToggle": {
|
|
3237
|
-
"light": "{colorGrey650}",
|
|
3238
|
-
"dark": "{colorGrey650}"
|
|
3239
|
-
},
|
|
3240
3232
|
"colorShadowMedium": {
|
|
3241
3233
|
"light": "{colorGreyTransparent}",
|
|
3242
3234
|
"dark": "{colorGreyTransparent}"
|
|
@@ -4235,10 +4227,6 @@ export var preset = {
|
|
|
4235
4227
|
"light": "{colorGreyTransparentHeavy}",
|
|
4236
4228
|
"dark": "{colorGreyTransparentHeavy}"
|
|
4237
4229
|
},
|
|
4238
|
-
"colorShadowLayoutToggle": {
|
|
4239
|
-
"light": "{colorGrey650}",
|
|
4240
|
-
"dark": "{colorGrey650}"
|
|
4241
|
-
},
|
|
4242
4230
|
"colorShadowMedium": {
|
|
4243
4231
|
"light": "{colorGreyTransparent}",
|
|
4244
4232
|
"dark": "{colorGreyTransparent}"
|
|
@@ -5169,10 +5157,6 @@ export var preset = {
|
|
|
5169
5157
|
"light": "{colorGreyTransparentHeavy}",
|
|
5170
5158
|
"dark": "{colorGreyTransparentHeavy}"
|
|
5171
5159
|
},
|
|
5172
|
-
"colorShadowLayoutToggle": {
|
|
5173
|
-
"light": "{colorGrey300}",
|
|
5174
|
-
"dark": "{colorGrey650}"
|
|
5175
|
-
},
|
|
5176
5160
|
"colorShadowMedium": {
|
|
5177
5161
|
"light": "{colorGreyTransparent}",
|
|
5178
5162
|
"dark": "{colorGreyTransparent}"
|
|
@@ -6103,10 +6087,6 @@ export var preset = {
|
|
|
6103
6087
|
"light": "{colorGreyTransparentHeavy}",
|
|
6104
6088
|
"dark": "{colorGreyTransparentHeavy}"
|
|
6105
6089
|
},
|
|
6106
|
-
"colorShadowLayoutToggle": {
|
|
6107
|
-
"light": "{colorGrey300}",
|
|
6108
|
-
"dark": "{colorGrey650}"
|
|
6109
|
-
},
|
|
6110
6090
|
"colorShadowMedium": {
|
|
6111
6091
|
"light": "{colorGreyTransparent}",
|
|
6112
6092
|
"dark": "{colorGreyTransparent}"
|
|
@@ -7037,10 +7017,6 @@ export var preset = {
|
|
|
7037
7017
|
"light": "{colorGreyTransparentHeavy}",
|
|
7038
7018
|
"dark": "{colorGreyTransparentHeavy}"
|
|
7039
7019
|
},
|
|
7040
|
-
"colorShadowLayoutToggle": {
|
|
7041
|
-
"light": "{colorGrey650}",
|
|
7042
|
-
"dark": "{colorGrey650}"
|
|
7043
|
-
},
|
|
7044
7020
|
"colorShadowMedium": {
|
|
7045
7021
|
"light": "{colorGreyTransparent}",
|
|
7046
7022
|
"dark": "{colorGreyTransparent}"
|
|
@@ -7736,7 +7712,6 @@ export var preset = {
|
|
|
7736
7712
|
"colorForegroundControlDefault": "color",
|
|
7737
7713
|
"colorForegroundControlDisabled": "color",
|
|
7738
7714
|
"colorShadowDefault": "color",
|
|
7739
|
-
"colorShadowLayoutToggle": "color",
|
|
7740
7715
|
"colorShadowMedium": "color",
|
|
7741
7716
|
"colorShadowSide": "color",
|
|
7742
7717
|
"colorStrokeChartLine": "color",
|
|
@@ -8815,7 +8790,6 @@ export var preset = {
|
|
|
8815
8790
|
"colorForegroundControlDefault": "color-foreground-control-default",
|
|
8816
8791
|
"colorForegroundControlDisabled": "color-foreground-control-disabled",
|
|
8817
8792
|
"colorShadowDefault": "color-shadow-default",
|
|
8818
|
-
"colorShadowLayoutToggle": "color-shadow-layout-toggle",
|
|
8819
8793
|
"colorShadowMedium": "color-shadow-medium",
|
|
8820
8794
|
"colorShadowSide": "color-shadow-side",
|
|
8821
8795
|
"colorStrokeChartLine": "color-stroke-chart-line",
|
|
@@ -9492,7 +9466,6 @@ export var preset = {
|
|
|
9492
9466
|
"colorForegroundControlDefault": "--color-foreground-control-default-rsunm6",
|
|
9493
9467
|
"colorForegroundControlDisabled": "--color-foreground-control-disabled-f2499o",
|
|
9494
9468
|
"colorShadowDefault": "--color-shadow-default-ukle9p",
|
|
9495
|
-
"colorShadowLayoutToggle": "--color-shadow-layout-toggle-u6bbly",
|
|
9496
9469
|
"colorShadowMedium": "--color-shadow-medium-ncb0av",
|
|
9497
9470
|
"colorShadowSide": "--color-shadow-side-priy5p",
|
|
9498
9471
|
"colorStrokeChartLine": "--color-stroke-chart-line-7sdstd",
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -17,5 +17,6 @@ export default class AppLayoutWrapper extends ComponentWrapper {
|
|
|
17
17
|
findDrawersDesktopTriggersContainer(): ElementWrapper | null;
|
|
18
18
|
findDrawersMobileTriggersContainer(): ElementWrapper | null;
|
|
19
19
|
findDrawersTriggers(): ElementWrapper<HTMLButtonElement>[];
|
|
20
|
+
findDrawerTriggerById(id: string): ElementWrapper<HTMLButtonElement> | null;
|
|
20
21
|
findDrawersSlider(): ElementWrapper | null;
|
|
21
22
|
}
|
|
@@ -51,6 +51,9 @@ class AppLayoutWrapper extends dom_1.ComponentWrapper {
|
|
|
51
51
|
findDrawersTriggers() {
|
|
52
52
|
return this.findAllByClassName(styles_selectors_js_1.default['drawers-trigger']);
|
|
53
53
|
}
|
|
54
|
+
findDrawerTriggerById(id) {
|
|
55
|
+
return this.find(`.${styles_selectors_js_1.default['drawers-trigger']}[data-testid="awsui-app-layout-trigger-${id}"]`);
|
|
56
|
+
}
|
|
54
57
|
findDrawersSlider() {
|
|
55
58
|
return this.findByClassName(styles_selectors_js_1.default['drawers-slider']);
|
|
56
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/app-layout/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAC1F,gDAA+C;AAC/C,8FAAkF;AAElF,MAAqB,gBAAiB,SAAQ,sBAAgB;IAG5D,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,UAAU,CAAE,CAAC;IAC1D,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAoB,6BAAc,CAAC,mBAAmB,CAAC,CAAE,CAAC;IACvF,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,eAAe,CAAoB,6BAAc,CAAC,kBAAkB,CAAC,CAAE,CAAC;IACtF,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,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Ae,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED,2BAA2B;QACzB,OAAO,IAAI,CAAC,eAAe,CAAoB,6BAAc,CAAC,4BAA4B,CAAC,CAAC,CAAC;IAC/F,CAAC;IAED,mCAAmC;QACjC,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,oCAAoC,CAAC,CAAC,CAAC;IACpF,CAAC;IAED,kCAAkC;QAChC,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,mCAAmC,CAAC,CAAC,CAAC;IACnF,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,kBAAkB,CAAoB,6BAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACvF,CAAC;IAED,qBAAqB,CAAC,EAAU;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAc,CAAC,iBAAiB,CAAC,0CAA0C,EAAE,IAAI,CAAC,CAAC;IAC1G,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAChE,CAAC;;AArEH,mCAsEC;AArEQ,6BAAY,GAAG,6BAAc,CAAC,IAAI,CAAC"}
|
|
@@ -17,5 +17,6 @@ export default class AppLayoutWrapper extends ComponentWrapper {
|
|
|
17
17
|
findDrawersDesktopTriggersContainer(): ElementWrapper;
|
|
18
18
|
findDrawersMobileTriggersContainer(): ElementWrapper;
|
|
19
19
|
findDrawersTriggers(): import("@cloudscape-design/test-utils-core/selectors").MultiElementWrapper<ElementWrapper>;
|
|
20
|
+
findDrawerTriggerById(id: string): ElementWrapper;
|
|
20
21
|
findDrawersSlider(): ElementWrapper;
|
|
21
22
|
}
|
|
@@ -51,6 +51,9 @@ class AppLayoutWrapper extends selectors_1.ComponentWrapper {
|
|
|
51
51
|
findDrawersTriggers() {
|
|
52
52
|
return this.findAllByClassName(styles_selectors_js_1.default['drawers-trigger']);
|
|
53
53
|
}
|
|
54
|
+
findDrawerTriggerById(id) {
|
|
55
|
+
return this.find(`.${styles_selectors_js_1.default['drawers-trigger']}[data-testid="awsui-app-layout-trigger-${id}"]`);
|
|
56
|
+
}
|
|
54
57
|
findDrawersSlider() {
|
|
55
58
|
return this.findByClassName(styles_selectors_js_1.default['drawers-slider']);
|
|
56
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/app-layout/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,gDAA+C;AAC/C,8FAAkF;AAClF,MAAqB,gBAAiB,SAAQ,4BAAgB;IAE5D,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,UAAU,CAAE,CAAC;IAC1D,CAAC;IACD,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,mBAAmB,CAAC,CAAE,CAAC;IACpE,CAAC;IACD,mBAAmB;QACjB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,kBAAkB,CAAC,CAAE,CAAC;IACnE,CAAC;IACD,iBAAiB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,OAAO,CAAE,CAAC;IACvD,CAAC;IACD,iBAAiB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,aAAa,CAAC,CAAC;IAC5D,CAAC;IACD,eAAe;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,WAAW,CAAC,CAAC;IAC1D,CAAC;IACD,SAAS;QACP,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,KAAK,CAAE,CAAC;IACrD,CAAC;IACD,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,aAAa,CAAC,CAAE,CAAC;IAC9D,CAAC;IACD,eAAe;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,cAAc,CAAC,CAAE,CAAC;IAC/D,CAAC;IACD,cAAc;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,qBAAiB,CAAC,YAAY,EAAE,EAAE,qBAAiB,CAAC,CAAC;IACrF,CAAC;IACD,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,eAAe,CAAC,CAAC,CAAC;IAC/D,CAAC;IACD,2BAA2B;QACzB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,4BAA4B,CAAC,CAAC,CAAC;IAC5E,CAAC;IACD,mCAAmC;QACjC,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,oCAAoC,CAAC,CAAC,CAAC;IACpF,CAAC;IACD,kCAAkC;QAChC,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,mCAAmC,CAAC,CAAC,CAAC;IACnF,CAAC;IACD,mBAAmB;QACjB,OAAO,IAAI,CAAC,kBAAkB,CAAC,6BAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACpE,CAAC;IACD,iBAAiB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAChE,CAAC;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/app-layout/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,gDAA+C;AAC/C,8FAAkF;AAClF,MAAqB,gBAAiB,SAAQ,4BAAgB;IAE5D,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,UAAU,CAAE,CAAC;IAC1D,CAAC;IACD,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,mBAAmB,CAAC,CAAE,CAAC;IACpE,CAAC;IACD,mBAAmB;QACjB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,kB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