@cloudscape-design/components 3.0.1383 → 3.0.1384
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-layout/visual-refresh-toolbar/contexts.d.ts +5 -3
- package/app-layout/visual-refresh-toolbar/contexts.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/contexts.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts +3 -0
- package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts +4 -1
- package/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/slots.js +8 -5
- package/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts +5 -0
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js +3 -3
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +27 -3
- package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.d.ts +6 -0
- package/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.d.ts.map +1 -0
- package/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.js +16 -0
- package/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.js.map +1 -0
- package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +5 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js +2 -2
- package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +15 -14
- package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +35 -31
- package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +15 -14
- package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +2 -2
- package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -1
- package/breadcrumb-group/implementation.d.ts.map +1 -1
- package/breadcrumb-group/implementation.js +30 -1
- package/breadcrumb-group/implementation.js.map +1 -1
- package/container/index.d.ts +3 -7
- package/container/index.d.ts.map +1 -1
- package/container/index.js +4 -3
- package/container/index.js.map +1 -1
- package/container/interfaces.d.ts +7 -0
- package/container/interfaces.d.ts.map +1 -1
- package/container/interfaces.js.map +1 -1
- package/container/internal.d.ts +3 -26
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +37 -8
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +34 -33
- package/container/styles.scoped.css +77 -56
- package/container/styles.selectors.js +34 -33
- package/copy-to-clipboard/internal.d.ts.map +1 -1
- package/copy-to-clipboard/internal.js +3 -1
- package/copy-to-clipboard/internal.js.map +1 -1
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +160 -200
- package/flashbar/styles.selectors.js +50 -50
- package/icon/generated/icons.d.ts +1 -0
- package/icon/generated/icons.d.ts.map +1 -1
- package/icon/generated/icons.js +3 -0
- package/icon/generated/icons.js.map +1 -1
- package/icon-provider/interfaces.d.ts +1 -1
- package/icon-provider/interfaces.d.ts.map +1 -1
- package/icon-provider/interfaces.js.map +1 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/base-theme/styles.scoped.css +3 -0
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.d.ts +3 -0
- package/internal/generated/styles/tokens.js +3 -0
- package/internal/generated/theming/index.cjs +65 -0
- package/internal/generated/theming/index.js +65 -0
- package/internal/manifest.json +1 -1
- package/internal/plugins/widget/index.d.ts +5 -1
- package/internal/plugins/widget/index.d.ts.map +1 -1
- package/internal/plugins/widget/index.js +26 -1
- package/internal/plugins/widget/index.js.map +1 -1
- package/internal/plugins/widget/interfaces.d.ts +12 -2
- package/internal/plugins/widget/interfaces.d.ts.map +1 -1
- package/internal/plugins/widget/interfaces.js.map +1 -1
- package/internal/plugins/widget.d.ts +1 -1
- package/internal/plugins/widget.d.ts.map +1 -1
- package/internal/plugins/widget.js +1 -1
- package/internal/plugins/widget.js.map +1 -1
- package/manifest.json +2 -2
- package/package.json +1 -1
- package/plugins/index.d.ts +2 -1
- package/plugins/index.d.ts.map +1 -1
- package/plugins/index.js +2 -1
- package/plugins/index.js.map +1 -1
- package/table/header-cell/styles.css.js +38 -38
- package/table/header-cell/styles.scoped.css +80 -81
- package/table/header-cell/styles.selectors.js +38 -38
- package/table/sticky-columns/interfaces.d.ts +2 -0
- package/table/sticky-columns/interfaces.d.ts.map +1 -1
- package/table/sticky-columns/interfaces.js.map +1 -1
- package/table/sticky-columns/use-sticky-columns.d.ts.map +1 -1
- package/table/sticky-columns/use-sticky-columns.js +11 -5
- package/table/sticky-columns/use-sticky-columns.js.map +1 -1
- package/table/sticky-columns/utils.d.ts.map +1 -1
- package/table/sticky-columns/utils.js +2 -0
- package/table/sticky-columns/utils.js.map +1 -1
- package/table/utils.d.ts +1 -3
- package/table/utils.d.ts.map +1 -1
- package/table/utils.js +12 -5
- package/table/utils.js.map +1 -1
- package/internal/generated/theming/index.cjs.d.ts +0 -4785
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useStableCallback } from '@cloudscape-design/component-toolkit/internal';
|
|
5
|
+
export function useOwnBreadcrumbsProps() {
|
|
6
|
+
const [breadcrumbs, setBreadcrumbs] = useState(null);
|
|
7
|
+
const reportOwnBreadcrumbsProps = useStableCallback((props) => {
|
|
8
|
+
setBreadcrumbs(props);
|
|
9
|
+
return {
|
|
10
|
+
update: setBreadcrumbs,
|
|
11
|
+
cleanup: () => setBreadcrumbs(null),
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
return { breadcrumbs, reportOwnBreadcrumbsProps };
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=use-own-breadcrumbs-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-own-breadcrumbs-props.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAKlF,MAAM,UAAU,sBAAsB;IACpC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAA8B,IAAI,CAAC,CAAC;IAElF,MAAM,yBAAyB,GAAG,iBAAiB,CACjD,CAAC,KAA2B,EAAuD,EAAE;QACnF,cAAc,CAAC,KAAK,CAAC,CAAC;QAEtB,OAAO;YACL,MAAM,EAAE,cAAc;YACtB,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC;SACpC,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,OAAO,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;AACpD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useState } from 'react';\n\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nimport { BreadcrumbGroupProps } from '../../../breadcrumb-group/interfaces';\nimport { BreadcrumbsGlobalRegistration } from '../../../internal/plugins/controllers/breadcrumbs';\n\nexport function useOwnBreadcrumbsProps() {\n const [breadcrumbs, setBreadcrumbs] = useState<BreadcrumbGroupProps | null>(null);\n\n const reportOwnBreadcrumbsProps = useStableCallback(\n (props: BreadcrumbGroupProps): BreadcrumbsGlobalRegistration<BreadcrumbGroupProps> => {\n setBreadcrumbs(props);\n\n return {\n update: setBreadcrumbs,\n cleanup: () => setBreadcrumbs(null),\n };\n }\n );\n\n return { breadcrumbs, reportOwnBreadcrumbsProps };\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { AppLayoutProps } from '../../interfaces';
|
|
3
3
|
import { OnChangeParams } from '../../utils/use-drawers';
|
|
4
4
|
import { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';
|
|
5
|
-
import { AppLayoutInternals } from '../interfaces';
|
|
5
|
+
import { AppLayoutInternals, AppLayoutWidgetizedState } from '../interfaces';
|
|
6
6
|
import { FeatureNotificationsProps } from '../state/use-feature-notifications';
|
|
7
7
|
import { SplitPanelToggleProps } from './drawer-triggers';
|
|
8
8
|
export { SplitPanelToggleProps };
|
|
@@ -39,11 +39,15 @@ export interface ToolbarProps {
|
|
|
39
39
|
}
|
|
40
40
|
export interface AppLayoutToolbarImplementationProps {
|
|
41
41
|
appLayoutInternals: AppLayoutInternals;
|
|
42
|
+
breadcrumbsExternallyOwned?: AppLayoutWidgetizedState['breadcrumbsExternallyOwned'];
|
|
43
|
+
reportOwnBreadcrumbsProps?: AppLayoutWidgetizedState['reportOwnBreadcrumbsProps'];
|
|
42
44
|
toolbarProps: ToolbarProps;
|
|
43
45
|
featureNotificationsProps?: FeatureNotificationsProps;
|
|
44
46
|
}
|
|
45
47
|
export declare function AppLayoutToolbarImplementation({
|
|
46
48
|
appLayoutInternals,
|
|
49
|
+
breadcrumbsExternallyOwned,
|
|
50
|
+
reportOwnBreadcrumbsProps,
|
|
47
51
|
toolbarProps,
|
|
48
52
|
featureNotificationsProps
|
|
49
53
|
}: AppLayoutToolbarImplementationProps): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAQjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAQjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAI7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAkB,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAO1E,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC;IAEnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7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I,CAAC;IACjC,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAErD,QAAQ,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC;IACjC,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,mCAAmC;IAClD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,0BAA0B,CAAC,EAAE,wBAAwB,CAAC,4BAA4B,CAAC,CAAC;IACpF,yBAAyB,CAAC,EAAE,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;IAClF,YAAY,EAAE,YAAY,CAAC;IAC3B,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;CACvD;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EAGzB,YAAiB,EACjB,yBAAyB,GAC1B,EAAE,mCAAmC,eAiMrC;AAED,eAAO,MAAM,gBAAgB,uGAA6E,CAAC"}
|
|
@@ -14,7 +14,7 @@ import TriggerButton from './trigger-button';
|
|
|
14
14
|
import sharedStyles from '../../resize/styles.css.js';
|
|
15
15
|
import testutilStyles from '../../test-classes/styles.css.js';
|
|
16
16
|
import styles from './styles.css.js';
|
|
17
|
-
export function AppLayoutToolbarImplementation({ appLayoutInternals,
|
|
17
|
+
export function AppLayoutToolbarImplementation({ appLayoutInternals, breadcrumbsExternallyOwned, reportOwnBreadcrumbsProps,
|
|
18
18
|
// the value could be undefined if this component is loaded as a widget by a different app layout version
|
|
19
19
|
// not testable in a single-version setup
|
|
20
20
|
toolbarProps = {}, featureNotificationsProps, }) {
|
|
@@ -87,7 +87,7 @@ toolbarProps = {}, featureNotificationsProps, }) {
|
|
|
87
87
|
onNavigationToggle === null || onNavigationToggle === void 0 ? void 0 : onNavigationToggle(!navigationOpen);
|
|
88
88
|
}, ref: navigationFocusRef, selected: !drawerExpandedMode && navigationOpen, disabled: anyPanelOpenInMobile })))),
|
|
89
89
|
(breadcrumbs || discoveredBreadcrumbs) && (React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "breadcrumbs" },
|
|
90
|
-
React.createElement(ToolbarBreadcrumbsSection, { ownBreadcrumbs: appLayoutInternals.breadcrumbs, discoveredBreadcrumbs: appLayoutInternals.discoveredBreadcrumbs, includeTestUtils: true }))),
|
|
90
|
+
React.createElement(ToolbarBreadcrumbsSection, { ownBreadcrumbs: appLayoutInternals.breadcrumbs, discoveredBreadcrumbs: appLayoutInternals.discoveredBreadcrumbs, breadcrumbsExternallyOwned: breadcrumbsExternallyOwned, reportOwnBreadcrumbsProps: reportOwnBreadcrumbsProps, includeTestUtils: true }))),
|
|
91
91
|
((drawers === null || drawers === void 0 ? void 0 : drawers.length) ||
|
|
92
92
|
(globalDrawers === null || globalDrawers === void 0 ? void 0 : globalDrawers.length) ||
|
|
93
93
|
(bottomDrawers === null || bottomDrawers === void 0 ? void 0 : bottomDrawers.length) ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAKtE,OAAO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AE,UAAU,EACtB,cAAc,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,IAAI,EACtC,OAAO,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,EAAE,EACtD,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAC1C,qBAAqB,EAAE,CAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,SAAS,EAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,EAC3F,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,oBAAoB,EAC9B,yBAAyB,EAAE,yBAAyB,EACpD,qBAAqB,EAAE,qBAAqB,EAC5C,aAAa,EAAE,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,EAAE,EAClE,sBAAsB,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE,EACpD,2BAA2B,EAAE,2BAA2B,EACxD,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAoB,EACzC,aAAa,EAAE,aAAa,EAC5B,gCAAgC,EAAE,gCAAgC,EAClE,0BAA0B,EAAE,0BAA0B,EACtD,yBAAyB,EAAE,yBAAyB,GACpD,CAC4B,CAC5B,CACP,CACgB,CACP,CACf,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,8BAA8B,EAAE,eAAe,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutProps } from '../../interfaces';\nimport { OnChangeParams } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { AppLayoutInternals } from '../interfaces';\nimport { ToolbarSkeleton } from '../skeleton/skeleton-parts';\nimport { ToolbarSlot } from '../skeleton/slots';\nimport { ToolbarBreadcrumbsSection, ToolbarContainer } from '../skeleton/toolbar-container';\nimport { FeatureNotificationsProps } from '../state/use-feature-notifications';\nimport { DrawerTriggers, SplitPanelToggleProps } from './drawer-triggers';\nimport TriggerButton from './trigger-button';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { SplitPanelToggleProps };\n\nexport interface ToolbarProps {\n ariaLabels?: AppLayoutProps.Labels;\n // navigation\n hasNavigation?: boolean;\n navigationOpen?: boolean;\n navigationCollapsible?: boolean;\n onNavigationToggle?: (open: boolean) => void;\n navigationFocusRef?: React.Ref<Focusable>;\n\n // breadcrumbs\n hasBreadcrumbsPortal?: boolean;\n\n // split panel\n hasSplitPanel?: boolean;\n splitPanelToggleProps?: SplitPanelToggleProps;\n splitPanelFocusRef?: React.Ref<Focusable>;\n onSplitPanelToggle?: () => void;\n\n // drawers\n activeDrawerId?: string | null;\n drawers?: ReadonlyArray<AppLayoutProps.Drawer>;\n drawersFocusRef?: React.Ref<Focusable>;\n bottomDrawersFocusRef?: React.Ref<Focusable>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n onActiveDrawerChange?: (drawerId: string | null, params: OnChangeParams) => void;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: ReadonlyArray<string>;\n onActiveGlobalDrawersChange?: ((drawerId: string, params: OnChangeParams) => void) | undefined;\n bottomDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalBottomDrawerId?: string | null;\n onActiveGlobalBottomDrawerChange?: (value: string | null, params: OnChangeParams) => void;\n\n expandedDrawerId?: string | null;\n setExpandedDrawerId?: (value: string | null) => void;\n\n aiDrawer?: AppLayoutProps.Drawer;\n onActiveAiDrawerChange?: (value: string | null) => void;\n activeAiDrawerId?: string | null;\n aiDrawerFocusRef?: React.Ref<Focusable>;\n}\n\nexport interface AppLayoutToolbarImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n toolbarProps: ToolbarProps;\n featureNotificationsProps?: FeatureNotificationsProps;\n}\n\nexport function AppLayoutToolbarImplementation({\n appLayoutInternals,\n // the value could be undefined if this component is loaded as a widget by a different app layout version\n // not testable in a single-version setup\n toolbarProps = {},\n featureNotificationsProps,\n}: AppLayoutToolbarImplementationProps) {\n const {\n breadcrumbs,\n discoveredBreadcrumbs,\n verticalOffsets,\n isMobile,\n setToolbarHeight,\n aiDrawer,\n activeAiDrawer,\n onActiveAiDrawerChange,\n } = appLayoutInternals;\n const {\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n globalDrawersFocusControl,\n globalDrawers,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n hasNavigation,\n navigationOpen,\n navigationFocusRef,\n onNavigationToggle,\n hasSplitPanel,\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n expandedDrawerId,\n setExpandedDrawerId,\n aiDrawerFocusRef,\n onActiveGlobalBottomDrawerChange,\n activeGlobalBottomDrawerId,\n bottomDrawersFocusRef,\n bottomDrawers,\n } = toolbarProps;\n const drawerExpandedMode = !!expandedDrawerId;\n const ref = useRef<HTMLElement>(null);\n const aiDrawerTransitionRef = useRef<HTMLDivElement>(null);\n const activeAiDrawerId = activeAiDrawer?.id;\n useResizeObserver(ref, entry => setToolbarHeight(entry.borderBoxHeight));\n useEffect(() => {\n return () => {\n setToolbarHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const anyPanelOpenInMobile =\n !!isMobile &&\n (!!activeDrawerId ||\n !!activeGlobalDrawersIds?.length ||\n !!activeAiDrawerId ||\n !!activeGlobalBottomDrawerId ||\n (!!navigationOpen && !!hasNavigation));\n useEffect(() => {\n if (anyPanelOpenInMobile) {\n document.body.classList.add(styles['block-body-scroll']);\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n }, [anyPanelOpenInMobile]);\n\n const navLandmarkAttributes = navigationOpen\n ? { role: 'presentation' }\n : { role: 'navigation', 'aria-label': ariaLabels?.navigation };\n\n return (\n <ToolbarSlot\n ref={ref}\n className={clsx((aiDrawer?.trigger || !!activeAiDrawerId) && styles['with-ai-drawer'], {\n [testutilStyles['mobile-bar']]: isMobile,\n })}\n style={{\n insetBlockStart: verticalOffsets.toolbar,\n }}\n >\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"left-drawer-trigger\">\n <Transition\n in={!!(aiDrawer?.trigger && !activeAiDrawerId)}\n timeout={{ enter: 0, exit: 165 }}\n mountOnEnter={true}\n unmountOnExit={true}\n nodeRef={aiDrawerTransitionRef}\n >\n {state => (\n <div\n className={clsx(!!aiDrawer?.trigger?.customIcon && styles['universal-toolbar-ai-custom'], [\n sharedStyles['with-motion-horizontal'],\n ])}\n style={{\n opacity: ['entering', 'exiting'].includes(state) ? 0 : 1,\n }}\n >\n <TriggerButton\n ariaLabel={aiDrawer?.ariaLabels?.triggerButton}\n ariaExpanded={!!activeAiDrawerId}\n iconName={aiDrawer?.trigger!.iconName}\n iconSvg={aiDrawer?.trigger!.iconSvg}\n customSvg={aiDrawer?.trigger!.customIcon}\n className={testutilStyles['ai-drawer-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n onActiveAiDrawerChange?.(aiDrawer?.id ?? null, { initiatedByUserAction: true });\n }}\n ref={aiDrawerFocusRef}\n selected={!drawerExpandedMode && !!activeAiDrawerId}\n disabled={anyPanelOpenInMobile}\n variant={aiDrawer?.trigger?.customIcon ? 'custom' : 'default'}\n testId={`awsui-app-layout-trigger-${aiDrawer?.id}`}\n isForPreviousActiveDrawer={true}\n />\n </div>\n )}\n </Transition>\n </AppLayoutBuiltInErrorBoundary>\n <ToolbarContainer hasAiDrawer={!!activeAiDrawerId}>\n {hasNavigation && (\n <nav {...navLandmarkAttributes} className={clsx(styles['universal-toolbar-nav'])}>\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"toolbar-trigger-nav\">\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={!drawerExpandedMode && navigationOpen}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n if (navigationOpen && expandedDrawerId) {\n return;\n }\n onNavigationToggle?.(!navigationOpen);\n }}\n ref={navigationFocusRef}\n selected={!drawerExpandedMode && navigationOpen}\n disabled={anyPanelOpenInMobile}\n />\n </AppLayoutBuiltInErrorBoundary>\n </nav>\n )}\n {(breadcrumbs || discoveredBreadcrumbs) && (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"breadcrumbs\">\n <ToolbarBreadcrumbsSection\n ownBreadcrumbs={appLayoutInternals.breadcrumbs}\n discoveredBreadcrumbs={appLayoutInternals.discoveredBreadcrumbs}\n includeTestUtils={true}\n />\n </AppLayoutBuiltInErrorBoundary>\n )}\n {(drawers?.length ||\n globalDrawers?.length ||\n bottomDrawers?.length ||\n (hasSplitPanel && splitPanelToggleProps?.displayed)) && (\n <div className={clsx(styles['universal-toolbar-drawers'])}>\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"toolbar-triggers\">\n <DrawerTriggers\n ariaLabels={ariaLabels}\n activeDrawerId={activeDrawerId ?? null}\n drawers={drawers?.filter(item => !!item.trigger) ?? []}\n drawersFocusRef={drawersFocusRef}\n onActiveDrawerChange={onActiveDrawerChange}\n splitPanelToggleProps={splitPanelToggleProps?.displayed ? splitPanelToggleProps : undefined}\n splitPanelFocusRef={splitPanelFocusRef}\n onSplitPanelToggle={onSplitPanelToggle}\n disabled={anyPanelOpenInMobile}\n globalDrawersFocusControl={globalDrawersFocusControl}\n bottomDrawersFocusRef={bottomDrawersFocusRef}\n globalDrawers={globalDrawers?.filter(item => !!item.trigger) ?? []}\n activeGlobalDrawersIds={activeGlobalDrawersIds ?? []}\n onActiveGlobalDrawersChange={onActiveGlobalDrawersChange}\n expandedDrawerId={expandedDrawerId}\n setExpandedDrawerId={setExpandedDrawerId!}\n bottomDrawers={bottomDrawers}\n onActiveGlobalBottomDrawerChange={onActiveGlobalBottomDrawerChange}\n activeGlobalBottomDrawerId={activeGlobalBottomDrawerId}\n featureNotificationsProps={featureNotificationsProps}\n />\n </AppLayoutBuiltInErrorBoundary>\n </div>\n )}\n </ToolbarContainer>\n </ToolbarSlot>\n );\n}\n\nexport const AppLayoutToolbar = createWidgetizedComponent(AppLayoutToolbarImplementation, ToolbarSkeleton);\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAKtE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;A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React, { useEffect, useRef } from 'react';\nimport { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutProps } from '../../interfaces';\nimport { OnChangeParams } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { AppLayoutInternals, AppLayoutWidgetizedState } from '../interfaces';\nimport { ToolbarSkeleton } from '../skeleton/skeleton-parts';\nimport { ToolbarSlot } from '../skeleton/slots';\nimport { ToolbarBreadcrumbsSection, ToolbarContainer } from '../skeleton/toolbar-container';\nimport { FeatureNotificationsProps } from '../state/use-feature-notifications';\nimport { DrawerTriggers, SplitPanelToggleProps } from './drawer-triggers';\nimport TriggerButton from './trigger-button';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { SplitPanelToggleProps };\n\nexport interface ToolbarProps {\n ariaLabels?: AppLayoutProps.Labels;\n // navigation\n hasNavigation?: boolean;\n navigationOpen?: boolean;\n navigationCollapsible?: boolean;\n onNavigationToggle?: (open: boolean) => void;\n navigationFocusRef?: React.Ref<Focusable>;\n\n // breadcrumbs\n hasBreadcrumbsPortal?: boolean;\n\n // split panel\n hasSplitPanel?: boolean;\n splitPanelToggleProps?: SplitPanelToggleProps;\n splitPanelFocusRef?: React.Ref<Focusable>;\n onSplitPanelToggle?: () => void;\n\n // drawers\n activeDrawerId?: string | null;\n drawers?: ReadonlyArray<AppLayoutProps.Drawer>;\n drawersFocusRef?: React.Ref<Focusable>;\n bottomDrawersFocusRef?: React.Ref<Focusable>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n onActiveDrawerChange?: (drawerId: string | null, params: OnChangeParams) => void;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: ReadonlyArray<string>;\n onActiveGlobalDrawersChange?: ((drawerId: string, params: OnChangeParams) => void) | undefined;\n bottomDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalBottomDrawerId?: string | null;\n onActiveGlobalBottomDrawerChange?: (value: string | null, params: OnChangeParams) => void;\n\n expandedDrawerId?: string | null;\n setExpandedDrawerId?: (value: string | null) => void;\n\n aiDrawer?: AppLayoutProps.Drawer;\n onActiveAiDrawerChange?: (value: string | null) => void;\n activeAiDrawerId?: string | null;\n aiDrawerFocusRef?: React.Ref<Focusable>;\n}\n\nexport interface AppLayoutToolbarImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n breadcrumbsExternallyOwned?: AppLayoutWidgetizedState['breadcrumbsExternallyOwned'];\n reportOwnBreadcrumbsProps?: AppLayoutWidgetizedState['reportOwnBreadcrumbsProps'];\n toolbarProps: ToolbarProps;\n featureNotificationsProps?: FeatureNotificationsProps;\n}\n\nexport function AppLayoutToolbarImplementation({\n appLayoutInternals,\n breadcrumbsExternallyOwned,\n reportOwnBreadcrumbsProps,\n // the value could be undefined if this component is loaded as a widget by a different app layout version\n // not testable in a single-version setup\n toolbarProps = {},\n featureNotificationsProps,\n}: AppLayoutToolbarImplementationProps) {\n const {\n breadcrumbs,\n discoveredBreadcrumbs,\n verticalOffsets,\n isMobile,\n setToolbarHeight,\n aiDrawer,\n activeAiDrawer,\n onActiveAiDrawerChange,\n } = appLayoutInternals;\n const {\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n globalDrawersFocusControl,\n globalDrawers,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n hasNavigation,\n navigationOpen,\n navigationFocusRef,\n onNavigationToggle,\n hasSplitPanel,\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n expandedDrawerId,\n setExpandedDrawerId,\n aiDrawerFocusRef,\n onActiveGlobalBottomDrawerChange,\n activeGlobalBottomDrawerId,\n bottomDrawersFocusRef,\n bottomDrawers,\n } = toolbarProps;\n const drawerExpandedMode = !!expandedDrawerId;\n const ref = useRef<HTMLElement>(null);\n const aiDrawerTransitionRef = useRef<HTMLDivElement>(null);\n const activeAiDrawerId = activeAiDrawer?.id;\n useResizeObserver(ref, entry => setToolbarHeight(entry.borderBoxHeight));\n useEffect(() => {\n return () => {\n setToolbarHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const anyPanelOpenInMobile =\n !!isMobile &&\n (!!activeDrawerId ||\n !!activeGlobalDrawersIds?.length ||\n !!activeAiDrawerId ||\n !!activeGlobalBottomDrawerId ||\n (!!navigationOpen && !!hasNavigation));\n useEffect(() => {\n if (anyPanelOpenInMobile) {\n document.body.classList.add(styles['block-body-scroll']);\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n }, [anyPanelOpenInMobile]);\n\n const navLandmarkAttributes = navigationOpen\n ? { role: 'presentation' }\n : { role: 'navigation', 'aria-label': ariaLabels?.navigation };\n\n return (\n <ToolbarSlot\n ref={ref}\n className={clsx((aiDrawer?.trigger || !!activeAiDrawerId) && styles['with-ai-drawer'], {\n [testutilStyles['mobile-bar']]: isMobile,\n })}\n style={{\n insetBlockStart: verticalOffsets.toolbar,\n }}\n >\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"left-drawer-trigger\">\n <Transition\n in={!!(aiDrawer?.trigger && !activeAiDrawerId)}\n timeout={{ enter: 0, exit: 165 }}\n mountOnEnter={true}\n unmountOnExit={true}\n nodeRef={aiDrawerTransitionRef}\n >\n {state => (\n <div\n className={clsx(!!aiDrawer?.trigger?.customIcon && styles['universal-toolbar-ai-custom'], [\n sharedStyles['with-motion-horizontal'],\n ])}\n style={{\n opacity: ['entering', 'exiting'].includes(state) ? 0 : 1,\n }}\n >\n <TriggerButton\n ariaLabel={aiDrawer?.ariaLabels?.triggerButton}\n ariaExpanded={!!activeAiDrawerId}\n iconName={aiDrawer?.trigger!.iconName}\n iconSvg={aiDrawer?.trigger!.iconSvg}\n customSvg={aiDrawer?.trigger!.customIcon}\n className={testutilStyles['ai-drawer-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n onActiveAiDrawerChange?.(aiDrawer?.id ?? null, { initiatedByUserAction: true });\n }}\n ref={aiDrawerFocusRef}\n selected={!drawerExpandedMode && !!activeAiDrawerId}\n disabled={anyPanelOpenInMobile}\n variant={aiDrawer?.trigger?.customIcon ? 'custom' : 'default'}\n testId={`awsui-app-layout-trigger-${aiDrawer?.id}`}\n isForPreviousActiveDrawer={true}\n />\n </div>\n )}\n </Transition>\n </AppLayoutBuiltInErrorBoundary>\n <ToolbarContainer hasAiDrawer={!!activeAiDrawerId}>\n {hasNavigation && (\n <nav {...navLandmarkAttributes} className={clsx(styles['universal-toolbar-nav'])}>\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"toolbar-trigger-nav\">\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={!drawerExpandedMode && navigationOpen}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n if (navigationOpen && expandedDrawerId) {\n return;\n }\n onNavigationToggle?.(!navigationOpen);\n }}\n ref={navigationFocusRef}\n selected={!drawerExpandedMode && navigationOpen}\n disabled={anyPanelOpenInMobile}\n />\n </AppLayoutBuiltInErrorBoundary>\n </nav>\n )}\n {(breadcrumbs || discoveredBreadcrumbs) && (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"breadcrumbs\">\n <ToolbarBreadcrumbsSection\n ownBreadcrumbs={appLayoutInternals.breadcrumbs}\n discoveredBreadcrumbs={appLayoutInternals.discoveredBreadcrumbs}\n breadcrumbsExternallyOwned={breadcrumbsExternallyOwned}\n reportOwnBreadcrumbsProps={reportOwnBreadcrumbsProps}\n includeTestUtils={true}\n />\n </AppLayoutBuiltInErrorBoundary>\n )}\n {(drawers?.length ||\n globalDrawers?.length ||\n bottomDrawers?.length ||\n (hasSplitPanel && splitPanelToggleProps?.displayed)) && (\n <div className={clsx(styles['universal-toolbar-drawers'])}>\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"toolbar-triggers\">\n <DrawerTriggers\n ariaLabels={ariaLabels}\n activeDrawerId={activeDrawerId ?? null}\n drawers={drawers?.filter(item => !!item.trigger) ?? []}\n drawersFocusRef={drawersFocusRef}\n onActiveDrawerChange={onActiveDrawerChange}\n splitPanelToggleProps={splitPanelToggleProps?.displayed ? splitPanelToggleProps : undefined}\n splitPanelFocusRef={splitPanelFocusRef}\n onSplitPanelToggle={onSplitPanelToggle}\n disabled={anyPanelOpenInMobile}\n globalDrawersFocusControl={globalDrawersFocusControl}\n bottomDrawersFocusRef={bottomDrawersFocusRef}\n globalDrawers={globalDrawers?.filter(item => !!item.trigger) ?? []}\n activeGlobalDrawersIds={activeGlobalDrawersIds ?? []}\n onActiveGlobalDrawersChange={onActiveGlobalDrawersChange}\n expandedDrawerId={expandedDrawerId}\n setExpandedDrawerId={setExpandedDrawerId!}\n bottomDrawers={bottomDrawers}\n onActiveGlobalBottomDrawerChange={onActiveGlobalBottomDrawerChange}\n activeGlobalBottomDrawerId={activeGlobalBottomDrawerId}\n featureNotificationsProps={featureNotificationsProps}\n />\n </AppLayoutBuiltInErrorBoundary>\n </div>\n )}\n </ToolbarContainer>\n </ToolbarSlot>\n );\n}\n\nexport const AppLayoutToolbar = createWidgetizedComponent(AppLayoutToolbarImplementation, ToolbarSkeleton);\n"]}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"universal-toolbar": "awsui_universal-
|
|
5
|
-
"with-ai-drawer": "awsui_with-ai-
|
|
6
|
-
"universal-toolbar-ai-custom": "awsui_universal-toolbar-ai-
|
|
7
|
-
"disable-body-scroll": "awsui_disable-body-
|
|
8
|
-
"toolbar-container": "awsui_toolbar-
|
|
9
|
-
"universal-toolbar-nav": "awsui_universal-toolbar-
|
|
10
|
-
"universal-toolbar-breadcrumbs": "awsui_universal-toolbar-
|
|
11
|
-
"universal-toolbar-drawers": "awsui_universal-toolbar-
|
|
12
|
-
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-
|
|
13
|
-
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-
|
|
14
|
-
"drawers-trigger-content": "awsui_drawers-trigger-
|
|
15
|
-
"group-divider": "awsui_group-
|
|
16
|
-
"drawers-trigger": "awsui_drawers-
|
|
17
|
-
"block-body-scroll": "awsui_block-body-
|
|
4
|
+
"universal-toolbar": "awsui_universal-toolbar_1kzri_7i1bc_13",
|
|
5
|
+
"with-ai-drawer": "awsui_with-ai-drawer_1kzri_7i1bc_32",
|
|
6
|
+
"universal-toolbar-ai-custom": "awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32",
|
|
7
|
+
"disable-body-scroll": "awsui_disable-body-scroll_1kzri_7i1bc_71",
|
|
8
|
+
"toolbar-container": "awsui_toolbar-container_1kzri_7i1bc_124",
|
|
9
|
+
"universal-toolbar-nav": "awsui_universal-toolbar-nav_1kzri_7i1bc_144",
|
|
10
|
+
"universal-toolbar-breadcrumbs": "awsui_universal-toolbar-breadcrumbs_1kzri_7i1bc_149",
|
|
11
|
+
"universal-toolbar-drawers": "awsui_universal-toolbar-drawers_1kzri_7i1bc_158",
|
|
12
|
+
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_1kzri_7i1bc_166",
|
|
13
|
+
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_1kzri_7i1bc_167",
|
|
14
|
+
"drawers-trigger-content": "awsui_drawers-trigger-content_1kzri_7i1bc_209",
|
|
15
|
+
"group-divider": "awsui_group-divider_1kzri_7i1bc_219",
|
|
16
|
+
"drawers-trigger": "awsui_drawers-trigger_1kzri_7i1bc_209",
|
|
17
|
+
"block-body-scroll": "awsui_block-body-scroll_1kzri_7i1bc_232",
|
|
18
|
+
"external-breadcrumbs": "awsui_external-breadcrumbs_1kzri_7i1bc_236"
|
|
18
19
|
};
|
|
19
20
|
|
|
@@ -10,7 +10,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
10
10
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
11
|
SPDX-License-Identifier: Apache-2.0
|
|
12
12
|
*/
|
|
13
|
-
.awsui_universal-
|
|
13
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13:not(#\9) {
|
|
14
14
|
background-color: var(--color-background-layout-toolbar-1jwzza, #ffffff);
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
position: sticky;
|
|
@@ -20,16 +20,16 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
20
20
|
transition-property: inset-block-start, opacity;
|
|
21
21
|
}
|
|
22
22
|
@media (prefers-reduced-motion: reduce) {
|
|
23
|
-
.awsui_universal-
|
|
23
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13:not(#\9) {
|
|
24
24
|
animation: none;
|
|
25
25
|
transition: none;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
.awsui-motion-disabled .awsui_universal-
|
|
28
|
+
.awsui-motion-disabled .awsui_universal-toolbar_1kzri_7i1bc_13:not(#\9), .awsui-mode-entering .awsui_universal-toolbar_1kzri_7i1bc_13:not(#\9) {
|
|
29
29
|
animation: none;
|
|
30
30
|
transition: none;
|
|
31
31
|
}
|
|
32
|
-
.awsui_universal-
|
|
32
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):before, .awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):after {
|
|
33
33
|
content: "";
|
|
34
34
|
position: absolute;
|
|
35
35
|
inset-block-start: 0;
|
|
@@ -46,32 +46,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
46
46
|
*/
|
|
47
47
|
}
|
|
48
48
|
@media not print {
|
|
49
|
-
.awsui_universal-
|
|
49
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):before, .awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):after {
|
|
50
50
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
51
51
|
}
|
|
52
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
52
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):before, .awsui-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):before, .awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):after, .awsui-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):after {
|
|
53
53
|
inset-block-start: 42px;
|
|
54
54
|
inline-size: var(--border-divider-section-width-dlkb8v, 1px);
|
|
55
55
|
block-size: calc(100vh - 42px);
|
|
56
56
|
background: var(--color-border-layout-h5yp20, #c6c6cd);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
.awsui_universal-
|
|
59
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):after {
|
|
60
60
|
background-color: var(--color-background-layout-toolbar-1jwzza, #ffffff);
|
|
61
61
|
border-start-start-radius: var(--space-xxs-3o1yoq, 4px);
|
|
62
62
|
}
|
|
63
63
|
@media not print {
|
|
64
|
-
.awsui_universal-
|
|
64
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):after {
|
|
65
65
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
66
66
|
}
|
|
67
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
67
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):after, .awsui-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32)):after {
|
|
68
68
|
display: none;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
.awsui_universal-
|
|
71
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13.awsui_disable-body-scroll_1kzri_7i1bc_71:not(#\9) {
|
|
72
72
|
inset-block-start: 0px;
|
|
73
73
|
}
|
|
74
|
-
.awsui_universal-
|
|
74
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9) {
|
|
75
75
|
grid-column: 1;
|
|
76
76
|
position: relative;
|
|
77
77
|
display: flex;
|
|
@@ -93,14 +93,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
93
93
|
background: var(--color-background-layout-ai-drawer-u8ll44, #161d26);
|
|
94
94
|
}
|
|
95
95
|
@media not print {
|
|
96
|
-
.awsui_universal-
|
|
96
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9) {
|
|
97
97
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
98
98
|
}
|
|
99
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
99
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9), .awsui-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9) {
|
|
100
100
|
block-size: 100%;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
.awsui_universal-
|
|
103
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9):before, .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9):after {
|
|
104
104
|
content: "";
|
|
105
105
|
position: absolute;
|
|
106
106
|
inset-block-start: 0;
|
|
@@ -110,18 +110,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
110
110
|
background: var(--color-background-layout-ai-drawer-u8ll44, #161d26);
|
|
111
111
|
}
|
|
112
112
|
@media not print {
|
|
113
|
-
.awsui_universal-
|
|
113
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9):before, .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9):after {
|
|
114
114
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
115
115
|
}
|
|
116
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
116
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9):before, .awsui-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9):before, .awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9):after, .awsui-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9):after {
|
|
117
117
|
display: none;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
.awsui_universal-
|
|
120
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32:not(#\9):after {
|
|
121
121
|
background-color: var(--color-background-layout-toolbar-1jwzza, #ffffff);
|
|
122
122
|
border-start-start-radius: var(--space-xxs-3o1yoq, 4px);
|
|
123
123
|
}
|
|
124
|
-
.awsui_universal-
|
|
124
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124:not(#\9) {
|
|
125
125
|
block-size: 100%;
|
|
126
126
|
align-items: center;
|
|
127
127
|
display: grid;
|
|
@@ -130,32 +130,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
130
130
|
grid-template-rows: 1fr;
|
|
131
131
|
}
|
|
132
132
|
@media not print {
|
|
133
|
-
.awsui_universal-
|
|
133
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124:not(#\9) {
|
|
134
134
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
135
135
|
}
|
|
136
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
136
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124:not(#\9), .awsui-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124:not(#\9) {
|
|
137
137
|
border-block-start: var(--border-divider-section-width-dlkb8v, 1px) solid var(--color-border-layout-h5yp20, #c6c6cd);
|
|
138
138
|
}
|
|
139
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
139
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9), .awsui-dark-mode .awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124.awsui_with-ai-drawer_1kzri_7i1bc_32:not(#\9) {
|
|
140
140
|
border-start-start-radius: var(--space-xxs-3o1yoq, 4px);
|
|
141
141
|
border-inline-start: var(--border-divider-section-width-dlkb8v, 1px) solid var(--color-border-layout-h5yp20, #c6c6cd);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
.awsui_universal-
|
|
144
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124 > .awsui_universal-toolbar-nav_1kzri_7i1bc_144:not(#\9) {
|
|
145
145
|
grid-column: 2;
|
|
146
146
|
padding-inline-start: var(--space-s-kll7oj, 12px);
|
|
147
147
|
padding-inline-end: var(--space-static-xxs-vzto3j, 4px);
|
|
148
148
|
}
|
|
149
|
-
.awsui_universal-
|
|
149
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124 > .awsui_universal-toolbar-breadcrumbs_1kzri_7i1bc_149:not(#\9) {
|
|
150
150
|
grid-column: 3;
|
|
151
151
|
padding-inline: var(--space-static-xs-789l1l, 8px);
|
|
152
152
|
background-color: transparent;
|
|
153
153
|
flex: 1 0;
|
|
154
154
|
}
|
|
155
|
-
.awsui_universal-
|
|
155
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124 > .awsui_universal-toolbar-breadcrumbs_1kzri_7i1bc_149:not(#\9):first-child {
|
|
156
156
|
padding-inline: calc(var(--space-static-xs-789l1l, 8px) + var(--space-static-m-0gdnhk, 16px));
|
|
157
157
|
}
|
|
158
|
-
.awsui_universal-
|
|
158
|
+
.awsui_universal-toolbar_1kzri_7i1bc_13 > .awsui_toolbar-container_1kzri_7i1bc_124 > .awsui_universal-toolbar-drawers_1kzri_7i1bc_158:not(#\9) {
|
|
159
159
|
grid-column: 4;
|
|
160
160
|
column-gap: var(--space-static-xs-789l1l, 8px);
|
|
161
161
|
display: flex;
|
|
@@ -163,8 +163,8 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
163
163
|
block-size: 100%;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
.awsui_drawers-desktop-triggers-
|
|
167
|
-
.awsui_drawers-mobile-triggers-
|
|
166
|
+
.awsui_drawers-desktop-triggers-container_1kzri_7i1bc_166:not(#\9),
|
|
167
|
+
.awsui_drawers-mobile-triggers-container_1kzri_7i1bc_167:not(#\9) {
|
|
168
168
|
border-collapse: separate;
|
|
169
169
|
border-spacing: 0;
|
|
170
170
|
box-sizing: border-box;
|
|
@@ -206,7 +206,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
206
206
|
inline-size: 100%;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
.awsui_drawers-trigger-
|
|
209
|
+
.awsui_drawers-trigger-content_1kzri_7i1bc_209:not(#\9) {
|
|
210
210
|
block-size: 100%;
|
|
211
211
|
align-items: center;
|
|
212
212
|
display: flex;
|
|
@@ -216,19 +216,23 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
216
216
|
padding-inline-start: var(--space-xs-m9b7jf, 8px);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
.awsui_group-
|
|
219
|
+
.awsui_group-divider_1kzri_7i1bc_219:not(#\9) {
|
|
220
220
|
border-inline-end: var(--border-divider-section-width-dlkb8v, 1px) solid var(--color-border-divider-default-diwd4w, #c6c6cd);
|
|
221
221
|
block-size: 60%;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
@media (max-width: 688px) {
|
|
225
|
-
.awsui_drawers-
|
|
225
|
+
.awsui_drawers-trigger_1kzri_7i1bc_209:not(#\9) {
|
|
226
226
|
display: flex;
|
|
227
227
|
justify-content: center;
|
|
228
228
|
align-items: center;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
.awsui_block-body-
|
|
232
|
+
.awsui_block-body-scroll_1kzri_7i1bc_232:not(#\9) {
|
|
233
233
|
overflow: hidden;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.awsui_external-breadcrumbs_1kzri_7i1bc_236:not(#\9) {
|
|
237
|
+
display: none;
|
|
234
238
|
}
|
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"universal-toolbar": "awsui_universal-
|
|
6
|
-
"with-ai-drawer": "awsui_with-ai-
|
|
7
|
-
"universal-toolbar-ai-custom": "awsui_universal-toolbar-ai-
|
|
8
|
-
"disable-body-scroll": "awsui_disable-body-
|
|
9
|
-
"toolbar-container": "awsui_toolbar-
|
|
10
|
-
"universal-toolbar-nav": "awsui_universal-toolbar-
|
|
11
|
-
"universal-toolbar-breadcrumbs": "awsui_universal-toolbar-
|
|
12
|
-
"universal-toolbar-drawers": "awsui_universal-toolbar-
|
|
13
|
-
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-
|
|
14
|
-
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-
|
|
15
|
-
"drawers-trigger-content": "awsui_drawers-trigger-
|
|
16
|
-
"group-divider": "awsui_group-
|
|
17
|
-
"drawers-trigger": "awsui_drawers-
|
|
18
|
-
"block-body-scroll": "awsui_block-body-
|
|
5
|
+
"universal-toolbar": "awsui_universal-toolbar_1kzri_7i1bc_13",
|
|
6
|
+
"with-ai-drawer": "awsui_with-ai-drawer_1kzri_7i1bc_32",
|
|
7
|
+
"universal-toolbar-ai-custom": "awsui_universal-toolbar-ai-custom_1kzri_7i1bc_32",
|
|
8
|
+
"disable-body-scroll": "awsui_disable-body-scroll_1kzri_7i1bc_71",
|
|
9
|
+
"toolbar-container": "awsui_toolbar-container_1kzri_7i1bc_124",
|
|
10
|
+
"universal-toolbar-nav": "awsui_universal-toolbar-nav_1kzri_7i1bc_144",
|
|
11
|
+
"universal-toolbar-breadcrumbs": "awsui_universal-toolbar-breadcrumbs_1kzri_7i1bc_149",
|
|
12
|
+
"universal-toolbar-drawers": "awsui_universal-toolbar-drawers_1kzri_7i1bc_158",
|
|
13
|
+
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_1kzri_7i1bc_166",
|
|
14
|
+
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_1kzri_7i1bc_167",
|
|
15
|
+
"drawers-trigger-content": "awsui_drawers-trigger-content_1kzri_7i1bc_209",
|
|
16
|
+
"group-divider": "awsui_group-divider_1kzri_7i1bc_219",
|
|
17
|
+
"drawers-trigger": "awsui_drawers-trigger_1kzri_7i1bc_209",
|
|
18
|
+
"block-body-scroll": "awsui_block-body-scroll_1kzri_7i1bc_232",
|
|
19
|
+
"external-breadcrumbs": "awsui_external-breadcrumbs_1kzri_7i1bc_236"
|
|
19
20
|
};
|
|
20
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"before-main-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQ3D,eAAO,MAAM,oCAAoC,GAAI,mDAIlD,iBAAiB,
|
|
1
|
+
{"version":3,"file":"before-main-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQ3D,eAAO,MAAM,oCAAoC,GAAI,mDAIlD,iBAAiB,gBAwHnB,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,OAAO,iBAAiB,gBAIpE,CAAC;AAEF,eAAO,MAAM,uCAAuC,qBANA,iBAAiB,0CAAjB,iBAAiB,gBASpE,CAAC"}
|
|
@@ -18,14 +18,14 @@ export const BeforeMainSlotImplementationInternal = ({ toolbarProps, appLayoutSt
|
|
|
18
18
|
if (!isWidgetReady(appLayoutState)) {
|
|
19
19
|
return (React.createElement(BeforeMainSlotSkeleton, { toolbarProps: toolbarProps, appLayoutProps: appLayoutProps, appLayoutState: appLayoutState }));
|
|
20
20
|
}
|
|
21
|
-
const { activeDrawer, navigationOpen, navigationCollapsible, navigation, expandedDrawerId, setExpandedDrawerId, navigationAnimationDisabled, activeAiDrawerId, aiDrawerExpandedMode, aiDrawer, activeAiDrawerSize, minAiDrawerSize, maxAiDrawerSize, onActiveAiDrawerResize, aiDrawerFocusControl, ariaLabels, isMobile, drawersOpenQueue, onActiveAiDrawerChange, activeAiDrawer, bottomDrawerReportedSize, featureNotificationsProps, } = appLayoutState.widgetizedState;
|
|
21
|
+
const { activeDrawer, navigationOpen, navigationCollapsible, navigation, expandedDrawerId, setExpandedDrawerId, navigationAnimationDisabled, activeAiDrawerId, aiDrawerExpandedMode, aiDrawer, activeAiDrawerSize, minAiDrawerSize, maxAiDrawerSize, onActiveAiDrawerResize, aiDrawerFocusControl, ariaLabels, isMobile, drawersOpenQueue, onActiveAiDrawerChange, activeAiDrawer, bottomDrawerReportedSize, featureNotificationsProps, breadcrumbsExternallyOwned, reportOwnBreadcrumbsProps, } = appLayoutState.widgetizedState;
|
|
22
22
|
const drawerExpandedMode = !!expandedDrawerId;
|
|
23
23
|
const toolsOpen = !!activeDrawer;
|
|
24
24
|
// Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar
|
|
25
25
|
const drawerExpandedModeInChildLayout = !!(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.expandedDrawerId);
|
|
26
26
|
const { __embeddedViewMode: embeddedViewMode } = appLayoutProps;
|
|
27
27
|
return (React.createElement(React.Fragment, null,
|
|
28
|
-
!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (React.createElement(AppLayoutToolbar, { appLayoutInternals: appLayoutState.appLayoutInternals, toolbarProps: toolbarProps, featureNotificationsProps: featureNotificationsProps })),
|
|
28
|
+
!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (React.createElement(AppLayoutToolbar, { appLayoutInternals: appLayoutState.appLayoutInternals, breadcrumbsExternallyOwned: breadcrumbsExternallyOwned, reportOwnBreadcrumbsProps: reportOwnBreadcrumbsProps, toolbarProps: toolbarProps, featureNotificationsProps: featureNotificationsProps })),
|
|
29
29
|
!toolbarProps && !!activeAiDrawerId && (React.createElement("div", { className: styles['pseudo-toolbar'], style: {
|
|
30
30
|
insetBlockStart: (_b = (_a = appLayoutState.appLayoutInternals) === null || _a === void 0 ? void 0 : _a.verticalOffsets) === null || _b === void 0 ? void 0 : _b.toolbar,
|
|
31
31
|
} },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"before-main-slot.js","sourceRoot":"","sources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,EAAE,cAAc,CAAC,kBAAkB,EACrD,wBAAwB,EAAE,wBAAwB,EAClD,qBAAqB,EAAE,qBAAqB,GAC5C,CAC4B,CAC5B,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAwB,EAAE,EAAE,CAAC,CACxE,oBAAC,6BAA6B,IAAC,aAAa,EAAC,kBAAkB;IAC7D,oBAAC,oCAAoC,OAAK,KAAK,GAAI,CACrB,CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,yBAAyB,CAC9E,4BAA4B,EAC5B,sBAAsB,CACvB,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';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport { AppLayoutGlobalAiDrawerImplementation } from '../drawer/global-ai-drawer';\nimport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';\nimport { isWidgetReady } from '../state/invariants';\nimport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BeforeMainSlotImplementationInternal = ({\n toolbarProps,\n appLayoutState,\n appLayoutProps,\n}: SkeletonPartProps) => {\n const wasAiDrawerOpenRef = useRef(false);\n if (!isWidgetReady(appLayoutState)) {\n return (\n <BeforeMainSlotSkeleton\n toolbarProps={toolbarProps}\n appLayoutProps={appLayoutProps}\n appLayoutState={appLayoutState}\n />\n );\n }\n const {\n activeDrawer,\n navigationOpen,\n navigationCollapsible,\n navigation,\n expandedDrawerId,\n setExpandedDrawerId,\n navigationAnimationDisabled,\n activeAiDrawerId,\n aiDrawerExpandedMode,\n aiDrawer,\n activeAiDrawerSize,\n minAiDrawerSize,\n maxAiDrawerSize,\n onActiveAiDrawerResize,\n aiDrawerFocusControl,\n ariaLabels,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n activeAiDrawer,\n bottomDrawerReportedSize,\n featureNotificationsProps,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar\n const drawerExpandedModeInChildLayout = !!toolbarProps?.expandedDrawerId;\n const { __embeddedViewMode: embeddedViewMode } = appLayoutProps as any;\n return (\n <>\n {!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (\n <AppLayoutToolbar\n appLayoutInternals={appLayoutState.appLayoutInternals}\n toolbarProps={toolbarProps}\n featureNotificationsProps={featureNotificationsProps}\n />\n )}\n {!toolbarProps && !!activeAiDrawerId && (\n <div\n className={styles['pseudo-toolbar']}\n style={{\n insetBlockStart: appLayoutState.appLayoutInternals?.verticalOffsets?.toolbar,\n }}\n >\n <div className={styles['pseudo-toolbar-content']} />\n </div>\n )}\n {aiDrawer && (\n <div\n className={clsx(\n styles['ai-drawer'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && !aiDrawerExpandedMode && styles.hidden\n )}\n >\n <ActiveDrawersContext.Provider value={activeAiDrawer ? [activeAiDrawer.id] : []}>\n {(!!activeAiDrawerId || (aiDrawer?.preserveInactiveContent && wasAiDrawerOpenRef.current)) && (\n <>\n {(wasAiDrawerOpenRef.current = true)}\n <AppLayoutGlobalAiDrawerImplementation\n show={!!activeAiDrawerId}\n activeAiDrawer={aiDrawer ?? null}\n appLayoutInternals={appLayoutState.appLayoutInternals}\n aiDrawerProps={{\n activeAiDrawerSize: activeAiDrawerSize!,\n minAiDrawerSize: minAiDrawerSize!,\n maxAiDrawerSize: maxAiDrawerSize!,\n aiDrawer: aiDrawer!,\n ariaLabels,\n aiDrawerFocusControl,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n onActiveDrawerResize: ({ size }) => onActiveAiDrawerResize(size),\n expandedDrawerId,\n setExpandedDrawerId,\n }}\n />\n </>\n )}\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && (!navigationCollapsible || isMobile) && styles['panel-hidden'],\n !navigationOpen && navigationCollapsible && !isMobile && styles['navigation-collapsed'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"nav\">\n <AppLayoutNavigation\n appLayoutInternals={appLayoutState.appLayoutInternals}\n bottomDrawerReportedSize={bottomDrawerReportedSize}\n navigationCollapsible={navigationCollapsible}\n />\n </AppLayoutBuiltInErrorBoundary>\n </div>\n )}\n </>\n );\n};\n\nexport const BeforeMainSlotImplementation = (props: SkeletonPartProps) => (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"before-main-slot\">\n <BeforeMainSlotImplementationInternal {...props} />\n </AppLayoutBuiltInErrorBoundary>\n);\n\nexport const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(\n BeforeMainSlotImplementation,\n BeforeMainSlotSkeleton\n);\n"]}
|
|
1
|
+
{"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE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AA4B,GAAG,CAAC,KAAwB,EAAE,EAAE,CAAC,CACxE,oBAAC,6BAA6B,IAAC,aAAa,EAAC,kBAAkB;IAC7D,oBAAC,oCAAoC,OAAK,KAAK,GAAI,CACrB,CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,yBAAyB,CAC9E,4BAA4B,EAC5B,sBAAsB,CACvB,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';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport { AppLayoutGlobalAiDrawerImplementation } from '../drawer/global-ai-drawer';\nimport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';\nimport { isWidgetReady } from '../state/invariants';\nimport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BeforeMainSlotImplementationInternal = ({\n toolbarProps,\n appLayoutState,\n appLayoutProps,\n}: SkeletonPartProps) => {\n const wasAiDrawerOpenRef = useRef(false);\n if (!isWidgetReady(appLayoutState)) {\n return (\n <BeforeMainSlotSkeleton\n toolbarProps={toolbarProps}\n appLayoutProps={appLayoutProps}\n appLayoutState={appLayoutState}\n />\n );\n }\n const {\n activeDrawer,\n navigationOpen,\n navigationCollapsible,\n navigation,\n expandedDrawerId,\n setExpandedDrawerId,\n navigationAnimationDisabled,\n activeAiDrawerId,\n aiDrawerExpandedMode,\n aiDrawer,\n activeAiDrawerSize,\n minAiDrawerSize,\n maxAiDrawerSize,\n onActiveAiDrawerResize,\n aiDrawerFocusControl,\n ariaLabels,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n activeAiDrawer,\n bottomDrawerReportedSize,\n featureNotificationsProps,\n breadcrumbsExternallyOwned,\n reportOwnBreadcrumbsProps,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar\n const drawerExpandedModeInChildLayout = !!toolbarProps?.expandedDrawerId;\n const { __embeddedViewMode: embeddedViewMode } = appLayoutProps as any;\n return (\n <>\n {!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (\n <AppLayoutToolbar\n appLayoutInternals={appLayoutState.appLayoutInternals}\n breadcrumbsExternallyOwned={breadcrumbsExternallyOwned}\n reportOwnBreadcrumbsProps={reportOwnBreadcrumbsProps}\n toolbarProps={toolbarProps}\n featureNotificationsProps={featureNotificationsProps}\n />\n )}\n {!toolbarProps && !!activeAiDrawerId && (\n <div\n className={styles['pseudo-toolbar']}\n style={{\n insetBlockStart: appLayoutState.appLayoutInternals?.verticalOffsets?.toolbar,\n }}\n >\n <div className={styles['pseudo-toolbar-content']} />\n </div>\n )}\n {aiDrawer && (\n <div\n className={clsx(\n styles['ai-drawer'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && !aiDrawerExpandedMode && styles.hidden\n )}\n >\n <ActiveDrawersContext.Provider value={activeAiDrawer ? [activeAiDrawer.id] : []}>\n {(!!activeAiDrawerId || (aiDrawer?.preserveInactiveContent && wasAiDrawerOpenRef.current)) && (\n <>\n {(wasAiDrawerOpenRef.current = true)}\n <AppLayoutGlobalAiDrawerImplementation\n show={!!activeAiDrawerId}\n activeAiDrawer={aiDrawer ?? null}\n appLayoutInternals={appLayoutState.appLayoutInternals}\n aiDrawerProps={{\n activeAiDrawerSize: activeAiDrawerSize!,\n minAiDrawerSize: minAiDrawerSize!,\n maxAiDrawerSize: maxAiDrawerSize!,\n aiDrawer: aiDrawer!,\n ariaLabels,\n aiDrawerFocusControl,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n onActiveDrawerResize: ({ size }) => onActiveAiDrawerResize(size),\n expandedDrawerId,\n setExpandedDrawerId,\n }}\n />\n </>\n )}\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && (!navigationCollapsible || isMobile) && styles['panel-hidden'],\n !navigationOpen && navigationCollapsible && !isMobile && styles['navigation-collapsed'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"nav\">\n <AppLayoutNavigation\n appLayoutInternals={appLayoutState.appLayoutInternals}\n bottomDrawerReportedSize={bottomDrawerReportedSize}\n navigationCollapsible={navigationCollapsible}\n />\n </AppLayoutBuiltInErrorBoundary>\n </div>\n )}\n </>\n );\n};\n\nexport const BeforeMainSlotImplementation = (props: SkeletonPartProps) => (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"before-main-slot\">\n <BeforeMainSlotImplementationInternal {...props} />\n </AppLayoutBuiltInErrorBoundary>\n);\n\nexport const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(\n BeforeMainSlotImplementation,\n BeforeMainSlotSkeleton\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/implementation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/implementation.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAqFrE,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,EAC7G,KAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,kCAAkC,EAClC,GAAG,KAAK,EACT,EAAE,4BAA4B,CAAC,CAAC,CAAC,eAmLjC;AAED,eAAO,MAAM,+BAA+B,qGAG3C,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useContainerQuery } from '@cloudscape-design/component-toolkit';
|
|
6
6
|
import { getLogicalBoundingClientRect, isThemeActive, Theme, useMergeRefs, } from '@cloudscape-design/component-toolkit/internal';
|
|
7
7
|
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
8
|
+
import { BreadcrumbsSlotContext } from '../app-layout/visual-refresh-toolbar/contexts';
|
|
8
9
|
import { InternalButton } from '../button/internal';
|
|
9
10
|
import InternalButtonDropdown from '../button-dropdown/internal';
|
|
10
11
|
import { useInternalI18n } from '../i18n/context';
|
|
@@ -53,6 +54,34 @@ const areArrayEqual = (first, second) => {
|
|
|
53
54
|
return first.every((item, index) => item === second[index]);
|
|
54
55
|
};
|
|
55
56
|
export function BreadcrumbGroupImplementation({ items = [], ariaLabel, expandAriaLabel, onClick, onFollow, __internalRootRef, __injectAnalyticsComponentMetadata, ...props }) {
|
|
57
|
+
var _a;
|
|
58
|
+
const { reportOwnBreadcrumbsProps } = (_a = useContext(BreadcrumbsSlotContext)) !== null && _a !== void 0 ? _a : {};
|
|
59
|
+
const reportedProps = {
|
|
60
|
+
...props,
|
|
61
|
+
items,
|
|
62
|
+
ariaLabel,
|
|
63
|
+
expandAriaLabel,
|
|
64
|
+
onClick,
|
|
65
|
+
onFollow,
|
|
66
|
+
};
|
|
67
|
+
const breadcrumbsReportingRef = useRef(null);
|
|
68
|
+
useLayoutEffect(() => {
|
|
69
|
+
if (!reportOwnBreadcrumbsProps) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const reporting = reportOwnBreadcrumbsProps(reportedProps);
|
|
73
|
+
breadcrumbsReportingRef.current = reporting;
|
|
74
|
+
return () => {
|
|
75
|
+
breadcrumbsReportingRef.current = null;
|
|
76
|
+
reporting.cleanup();
|
|
77
|
+
};
|
|
78
|
+
// Prop updates are handled by the following layout effect.
|
|
79
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
80
|
+
}, [reportOwnBreadcrumbsProps]);
|
|
81
|
+
useLayoutEffect(() => {
|
|
82
|
+
var _a;
|
|
83
|
+
(_a = breadcrumbsReportingRef.current) === null || _a === void 0 ? void 0 : _a.update(reportedProps);
|
|
84
|
+
});
|
|
56
85
|
for (const item of items) {
|
|
57
86
|
checkSafeUrl('BreadcrumbGroup', item.href);
|
|
58
87
|
}
|