@cloudscape-design/components 3.0.1043 → 3.0.1044
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/button-dropdown/internal.d.ts.map +1 -1
- package/button-dropdown/internal.js +2 -2
- package/button-dropdown/internal.js.map +1 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/button-trigger/styles.css.js +13 -13
- package/internal/components/button-trigger/styles.scoped.css +36 -31
- package/internal/components/button-trigger/styles.selectors.js +13 -13
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/manifest.json +1 -1
- package/package.json +1 -2
- package/test-utils/dom/top-navigation/1.0-beta/index.d.ts +0 -28
- package/test-utils/dom/top-navigation/1.0-beta/index.js +0 -72
- package/test-utils/dom/top-navigation/1.0-beta/index.js.map +0 -1
- package/test-utils/selectors/top-navigation/1.0-beta/index.d.ts +0 -28
- package/test-utils/selectors/top-navigation/1.0-beta/index.js +0 -72
- package/test-utils/selectors/top-navigation/1.0-beta/index.js.map +0 -1
- package/top-navigation/1.0-beta/index.d.ts +0 -12
- package/top-navigation/1.0-beta/index.d.ts.map +0 -1
- package/top-navigation/1.0-beta/index.js +0 -19
- package/top-navigation/1.0-beta/index.js.map +0 -1
- package/top-navigation/1.0-beta/interfaces.d.ts +0 -102
- package/top-navigation/1.0-beta/interfaces.d.ts.map +0 -1
- package/top-navigation/1.0-beta/interfaces.js +0 -2
- package/top-navigation/1.0-beta/interfaces.js.map +0 -1
- package/top-navigation/1.0-beta/internal.d.ts +0 -13
- package/top-navigation/1.0-beta/internal.d.ts.map +0 -1
- package/top-navigation/1.0-beta/internal.js +0 -93
- package/top-navigation/1.0-beta/internal.js.map +0 -1
- package/top-navigation/1.0-beta/parts/overflow-menu.d.ts +0 -20
- package/top-navigation/1.0-beta/parts/overflow-menu.d.ts.map +0 -1
- package/top-navigation/1.0-beta/parts/overflow-menu.js +0 -54
- package/top-navigation/1.0-beta/parts/overflow-menu.js.map +0 -1
- package/top-navigation/1.0-beta/parts/utility.d.ts +0 -14
- package/top-navigation/1.0-beta/parts/utility.d.ts.map +0 -1
- package/top-navigation/1.0-beta/parts/utility.js +0 -56
- package/top-navigation/1.0-beta/parts/utility.js.map +0 -1
- package/top-navigation/1.0-beta/styles.css.js +0 -28
- package/top-navigation/1.0-beta/styles.scoped.css +0 -360
- package/top-navigation/1.0-beta/styles.selectors.js +0 -29
- package/top-navigation/1.0-beta/use-top-navigation.d.ts +0 -29
- package/top-navigation/1.0-beta/use-top-navigation.d.ts.map +0 -1
- package/top-navigation/1.0-beta/use-top-navigation.js +0 -154
- package/top-navigation/1.0-beta/use-top-navigation.js.map +0 -1
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TopNavigationMenuDropdownWrapper = exports.TopNavigationUtilityWrapper = exports.MenuDropdownWrapper = void 0;
|
|
4
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
const selectors_1 = require("@cloudscape-design/test-utils-core/selectors");
|
|
7
|
-
const button_1 = require("../../button");
|
|
8
|
-
const button_dropdown_1 = require("../../button-dropdown");
|
|
9
|
-
const link_1 = require("../../link");
|
|
10
|
-
const styles_selectors_js_1 = require("../../../../button-dropdown/styles.selectors.js");
|
|
11
|
-
const styles_selectors_js_2 = require("../../../../internal/components/menu-dropdown/styles.selectors.js");
|
|
12
|
-
const styles_selectors_js_3 = require("../../../../top-navigation/1.0-beta/styles.selectors.js");
|
|
13
|
-
class TopNavigationWrapper extends selectors_1.ComponentWrapper {
|
|
14
|
-
findIdentityLink() {
|
|
15
|
-
return this.find(`.${styles_selectors_js_3.default.identity} a`);
|
|
16
|
-
}
|
|
17
|
-
findLogo() {
|
|
18
|
-
return this.find(`.${styles_selectors_js_3.default.logo}`);
|
|
19
|
-
}
|
|
20
|
-
findTitle() {
|
|
21
|
-
return this.find(`.${styles_selectors_js_3.default.title}`);
|
|
22
|
-
}
|
|
23
|
-
findSearch() {
|
|
24
|
-
return this.find(`.${styles_selectors_js_3.default.search}`);
|
|
25
|
-
}
|
|
26
|
-
findUtilities() {
|
|
27
|
-
return this.findAll(`.${styles_selectors_js_3.default['utility-wrapper']}[data-utility-index]`).map(i => new TopNavigationUtilityWrapper(i.getElement()));
|
|
28
|
-
}
|
|
29
|
-
findUtility(index) {
|
|
30
|
-
return this.findComponent(`.${styles_selectors_js_3.default['utility-wrapper']}[data-utility-index="${index - 1}"]`, TopNavigationUtilityWrapper);
|
|
31
|
-
}
|
|
32
|
-
findSearchButton() {
|
|
33
|
-
return this.find(`.${styles_selectors_js_3.default['utility-wrapper']}[data-utility-special="search"] a`);
|
|
34
|
-
}
|
|
35
|
-
findOverflowMenuButtonDropdown() {
|
|
36
|
-
return this.findComponent(`.${styles_selectors_js_3.default.trigger}`, MenuDropdownWrapper);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.default = TopNavigationWrapper;
|
|
40
|
-
TopNavigationWrapper.rootSelector = `${styles_selectors_js_3.default['top-navigation']}:not(.${styles_selectors_js_3.default.hidden})`;
|
|
41
|
-
class MenuDropdownWrapper extends button_dropdown_1.default {
|
|
42
|
-
findNativeButton() {
|
|
43
|
-
// ButtonDropdown always has a button
|
|
44
|
-
return this.find(`button.${styles_selectors_js_2.default.button}`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.MenuDropdownWrapper = MenuDropdownWrapper;
|
|
48
|
-
class TopNavigationUtilityWrapper extends selectors_1.ComponentWrapper {
|
|
49
|
-
findButtonLinkType() {
|
|
50
|
-
return this.findComponent(`.${link_1.default.rootSelector}`, link_1.default);
|
|
51
|
-
}
|
|
52
|
-
findPrimaryButtonType() {
|
|
53
|
-
return this.findComponent(`.${button_1.default.rootSelector}`, button_1.default);
|
|
54
|
-
}
|
|
55
|
-
findMenuDropdownType() {
|
|
56
|
-
return this.findComponent(`.${button_dropdown_1.default.rootSelector}`, TopNavigationMenuDropdownWrapper);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.TopNavigationUtilityWrapper = TopNavigationUtilityWrapper;
|
|
60
|
-
class TopNavigationMenuDropdownWrapper extends button_dropdown_1.default {
|
|
61
|
-
findNativeButton() {
|
|
62
|
-
return this.find(`.${styles_selectors_js_2.default.button}`);
|
|
63
|
-
}
|
|
64
|
-
findTitle() {
|
|
65
|
-
return this.findByClassName(styles_selectors_js_1.default.title);
|
|
66
|
-
}
|
|
67
|
-
findDescription() {
|
|
68
|
-
return this.findByClassName(styles_selectors_js_1.default.description);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.TopNavigationMenuDropdownWrapper = TopNavigationMenuDropdownWrapper;
|
|
72
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/test-utils/selectors/top-navigation/1.0-beta/index.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,yCAAyC;AACzC,2DAA0D;AAC1D,qCAAqC;AACrC,yFAAmF;AACnF,2GAAmG;AACnG,iGAA6E;AAC7E,MAAqB,oBAAqB,SAAQ,4BAAgB;IAEhE,gBAAgB;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,QAAQ,IAAI,CAAE,CAAC;IAC7C,CAAC;IACD,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,SAAS;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,UAAU;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,MAAM,EAAE,CAA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,CAAC,IAAI,yBAAqB,CAAC,YAAY,EAAE,EAAE,gCAAgC,CAAC,CAAC;IACxG,CAAC;CACF;AAVD,kEAUC;AACD,MAAa,gCAAiC,SAAQ,yBAAqB;IACzE,gBAAgB;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAkB,CAAC,MAAM,EAAE,CAAE,CAAC;IACrD,CAAC;IACD,SAAS;QACP,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAoB,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IACD,eAAe;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAoB,CAAC,WAAW,CAAC,CAAC;IAChE,CAAC;CACF;AAVD,4EAUC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TopNavigationProps } from './interfaces';
|
|
3
|
-
export { TopNavigationProps };
|
|
4
|
-
/**
|
|
5
|
-
* @beta
|
|
6
|
-
* @version 1.0-beta
|
|
7
|
-
* @deprecated The beta version is unsupported. Use the stable version of the component instead.
|
|
8
|
-
*/
|
|
9
|
-
export default function TopNavigation({
|
|
10
|
-
utilities,
|
|
11
|
-
...restProps
|
|
12
|
-
}: TopNavigationProps): JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/top-navigation/1.0-beta/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAc,EAAE,GAAG,SAAS,EAAE,EAAE,kBAAkB,eAGzF"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import useBaseComponent from '../../internal/hooks/use-base-component';
|
|
6
|
-
import { applyDisplayName } from '../../internal/utils/apply-display-name';
|
|
7
|
-
import InternalTopNavigation from './internal';
|
|
8
|
-
/**
|
|
9
|
-
* @beta
|
|
10
|
-
* @version 1.0-beta
|
|
11
|
-
* @deprecated The beta version is unsupported. Use the stable version of the component instead.
|
|
12
|
-
*/
|
|
13
|
-
export default function TopNavigation(_a) {
|
|
14
|
-
var { utilities = [] } = _a, restProps = __rest(_a, ["utilities"]);
|
|
15
|
-
const baseComponentProps = useBaseComponent('TopNavigation');
|
|
16
|
-
return React.createElement(InternalTopNavigation, Object.assign({}, baseComponentProps, { utilities: utilities }, restProps));
|
|
17
|
-
}
|
|
18
|
-
applyDisplayName(TopNavigation, 'TopNavigation');
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/top-navigation/1.0-beta/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,qBAAqB,MAAM,YAAY,CAAC;AAI/C;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAoD;QAApD,EAAE,SAAS,GAAG,EAAE,OAAoC,EAA/B,SAAS,cAA9B,aAAgC,CAAF;IAClE,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC7D,OAAO,oBAAC,qBAAqB,oBAAK,kBAAkB,IAAE,SAAS,EAAE,SAAS,IAAM,SAAS,EAAI,CAAC;AAChG,CAAC;AAED,gBAAgB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport useBaseComponent from '../../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../../internal/utils/apply-display-name';\nimport { TopNavigationProps } from './interfaces';\nimport InternalTopNavigation from './internal';\n\nexport { TopNavigationProps };\n\n/**\n * @beta\n * @version 1.0-beta\n * @deprecated The beta version is unsupported. Use the stable version of the component instead.\n */\nexport default function TopNavigation({ utilities = [], ...restProps }: TopNavigationProps) {\n const baseComponentProps = useBaseComponent('TopNavigation');\n return <InternalTopNavigation {...baseComponentProps} utilities={utilities} {...restProps} />;\n}\n\napplyDisplayName(TopNavigation, 'TopNavigation');\n"]}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ButtonDropdownProps } from '../../button-dropdown/interfaces';
|
|
3
|
-
import { IconProps } from '../../icon/interfaces';
|
|
4
|
-
import { BaseComponentProps } from '../../internal/base-component';
|
|
5
|
-
import { CancelableEventHandler } from '../../internal/events';
|
|
6
|
-
export interface TopNavigationProps extends BaseComponentProps {
|
|
7
|
-
/**
|
|
8
|
-
* Properties describing the product identity. They are as follows:
|
|
9
|
-
*
|
|
10
|
-
* * `title` (string) - Specifies the title text.
|
|
11
|
-
* * `logo` ({ src: string, alt: string }) - Specifies the logo for the product.
|
|
12
|
-
* * `href` (string) - Specifies the `href` that the header links to.
|
|
13
|
-
* * `onFollow` (() => void) - Specifies the event handler called when the identity is clicked without any modifier keys.
|
|
14
|
-
*/
|
|
15
|
-
identity: TopNavigationProps.Identity;
|
|
16
|
-
/**
|
|
17
|
-
* Use with an input or autosuggest control for a global search query.
|
|
18
|
-
*/
|
|
19
|
-
search?: React.ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* A list of utility navigation elements.
|
|
22
|
-
* The supported utility types are: `button` and `menu-dropdown`.
|
|
23
|
-
*
|
|
24
|
-
* The following properties are supported across all utility types:
|
|
25
|
-
*
|
|
26
|
-
* * `type` (string) - The type of the utility. Can be `button` or `menu-dropdown`.
|
|
27
|
-
* * `text` (string) - Specifies the text shown in the top navigation or the title inside the dropdown if no explicit `title` property is set.
|
|
28
|
-
* * `title` (string) - The title displayed inside the dropdown.
|
|
29
|
-
* * `iconName` (string) - The name of an existing icon to display next to the utility.
|
|
30
|
-
* * `iconUrl` (string) - Specifies the URL of a custom icon. Use this property if the icon you want isn't available.
|
|
31
|
-
* * `iconAlt` (string) - Specifies alternate text for a custom icon provided using `iconUrl`. We recommend that you provide this for accessibility.
|
|
32
|
-
* * `iconSvg` (string) - Specifies the SVG of a custom icon.
|
|
33
|
-
* * `ariaLabel` (string) - Adds `aria-label` to the button or dropdown trigger. This is recommended for accessibility if a text is not provided.
|
|
34
|
-
* * `badge` (boolean) - Adds a badge to the corner of the icon to indicate a state change. For example: Unread notifications.
|
|
35
|
-
* * `disableTextCollapse` (boolean) - Prevents the utility text from being hidden on smaller screens.
|
|
36
|
-
* * `disableUtilityCollapse` (boolean) - Prevents the utility from being moved to an overflow menu on smaller screens.
|
|
37
|
-
*
|
|
38
|
-
* ### button
|
|
39
|
-
*
|
|
40
|
-
* * `variant` ('primary-button' | 'link') - The visual appearance of the button. The default value is 'link'.
|
|
41
|
-
* * `href` (string) - Specifies the `href` for a link styled as a button.
|
|
42
|
-
* * `external` (boolean) - Marks the link as external by adding an icon after the text. When clicked, the link opens in a new tab.
|
|
43
|
-
* * `externalIconAriaLabel` (string) - Adds an `aria-label` for the external icon.
|
|
44
|
-
* * `onClick` (() => void) - Specifies the event handler called when the utility is clicked.
|
|
45
|
-
*
|
|
46
|
-
* ### menu-dropdown
|
|
47
|
-
*
|
|
48
|
-
* * `description` (string) - The description displayed inside the dropdown.
|
|
49
|
-
* * `items` (ButtonDropdownProps.Items) - An array of dropdown items. This follows the same structure as the `items` property of the [button dropdown component](/components/button-dropdown), with the exception of the checkbox item type.
|
|
50
|
-
* * `onItemClick` (NonCancelableEventHandler<ButtonDropdownProps.ItemClickDetails>) - Specifies the event handler called when a dropdown item is selected.
|
|
51
|
-
*/
|
|
52
|
-
utilities?: ReadonlyArray<TopNavigationProps.Utility>;
|
|
53
|
-
/**
|
|
54
|
-
* An object containing all the localized strings required by the component.
|
|
55
|
-
*/
|
|
56
|
-
i18nStrings: TopNavigationProps.I18nStrings;
|
|
57
|
-
}
|
|
58
|
-
export declare namespace TopNavigationProps {
|
|
59
|
-
export interface Identity {
|
|
60
|
-
title?: string;
|
|
61
|
-
logo?: Logo;
|
|
62
|
-
href: string;
|
|
63
|
-
onFollow?: CancelableEventHandler;
|
|
64
|
-
}
|
|
65
|
-
export interface Logo {
|
|
66
|
-
src: string;
|
|
67
|
-
alt?: string;
|
|
68
|
-
}
|
|
69
|
-
interface BaseUtility {
|
|
70
|
-
text?: string;
|
|
71
|
-
title?: string;
|
|
72
|
-
iconName?: IconProps.Name;
|
|
73
|
-
iconUrl?: string;
|
|
74
|
-
iconAlt?: string;
|
|
75
|
-
iconSvg?: React.ReactNode;
|
|
76
|
-
ariaLabel?: string;
|
|
77
|
-
badge?: boolean;
|
|
78
|
-
disableUtilityCollapse?: boolean;
|
|
79
|
-
disableTextCollapse?: boolean;
|
|
80
|
-
}
|
|
81
|
-
export interface MenuDropdownUtility extends BaseUtility {
|
|
82
|
-
type: 'menu-dropdown';
|
|
83
|
-
description?: string;
|
|
84
|
-
items: ButtonDropdownProps.Items;
|
|
85
|
-
onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;
|
|
86
|
-
}
|
|
87
|
-
export interface ButtonUtility extends BaseUtility {
|
|
88
|
-
type: 'button';
|
|
89
|
-
variant?: 'primary-button' | 'link';
|
|
90
|
-
onClick?: CancelableEventHandler;
|
|
91
|
-
href?: string;
|
|
92
|
-
external?: boolean;
|
|
93
|
-
externalIconAriaLabel?: string;
|
|
94
|
-
}
|
|
95
|
-
export type Utility = MenuDropdownUtility | ButtonUtility;
|
|
96
|
-
export interface I18nStrings {
|
|
97
|
-
searchIconAriaLabel?: string;
|
|
98
|
-
searchDismissIconAriaLabel?: string;
|
|
99
|
-
overflowMenuTriggerText: string;
|
|
100
|
-
}
|
|
101
|
-
export {};
|
|
102
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/top-navigation/1.0-beta/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D;;;;;;;OAOG;IACH,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,CAAC;IAEtC;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAEtD;;OAEG;IACH,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC;CAC7C;AAED,yBAAiB,kBAAkB,CAAC;IAClC,MAAM,WAAW,QAAQ;QACvB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,IAAI,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,sBAAsB,CAAC;KACnC;IAED,MAAM,WAAW,IAAI;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;IAED,UAAU,WAAW;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;QAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B;IAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;QACtD,IAAI,EAAE,eAAe,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC;QACjC,WAAW,CAAC,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;KAC5E;IAED,MAAM,WAAW,aAAc,SAAQ,WAAW;QAChD,IAAI,EAAE,QAAQ,CAAC;QACf,OAAO,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAAC;QACpC,OAAO,CAAC,EAAE,sBAAsB,CAAC;QACjC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC;IAED,MAAM,MAAM,OAAO,GAAG,mBAAmB,GAAG,aAAa,CAAC;IAE1D,MAAM,WAAW,WAAW;QAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,0BAA0B,CAAC,EAAE,MAAM,CAAC;QACpC,uBAAuB,EAAE,MAAM,CAAC;KACjC;;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/top-navigation/1.0-beta/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonDropdownProps } from '../../button-dropdown/interfaces';\nimport { IconProps } from '../../icon/interfaces';\nimport { BaseComponentProps } from '../../internal/base-component';\nimport { CancelableEventHandler } from '../../internal/events';\n\nexport interface TopNavigationProps extends BaseComponentProps {\n /**\n * Properties describing the product identity. They are as follows:\n *\n * * `title` (string) - Specifies the title text.\n * * `logo` ({ src: string, alt: string }) - Specifies the logo for the product.\n * * `href` (string) - Specifies the `href` that the header links to.\n * * `onFollow` (() => void) - Specifies the event handler called when the identity is clicked without any modifier keys.\n */\n identity: TopNavigationProps.Identity;\n\n /**\n * Use with an input or autosuggest control for a global search query.\n */\n search?: React.ReactNode;\n\n /**\n * A list of utility navigation elements.\n * The supported utility types are: `button` and `menu-dropdown`.\n *\n * The following properties are supported across all utility types:\n *\n * * `type` (string) - The type of the utility. Can be `button` or `menu-dropdown`.\n * * `text` (string) - Specifies the text shown in the top navigation or the title inside the dropdown if no explicit `title` property is set.\n * * `title` (string) - The title displayed inside the dropdown.\n * * `iconName` (string) - The name of an existing icon to display next to the utility.\n * * `iconUrl` (string) - Specifies the URL of a custom icon. Use this property if the icon you want isn't available.\n * * `iconAlt` (string) - Specifies alternate text for a custom icon provided using `iconUrl`. We recommend that you provide this for accessibility.\n * * `iconSvg` (string) - Specifies the SVG of a custom icon.\n * * `ariaLabel` (string) - Adds `aria-label` to the button or dropdown trigger. This is recommended for accessibility if a text is not provided.\n * * `badge` (boolean) - Adds a badge to the corner of the icon to indicate a state change. For example: Unread notifications.\n * * `disableTextCollapse` (boolean) - Prevents the utility text from being hidden on smaller screens.\n * * `disableUtilityCollapse` (boolean) - Prevents the utility from being moved to an overflow menu on smaller screens.\n *\n * ### button\n *\n * * `variant` ('primary-button' | 'link') - The visual appearance of the button. The default value is 'link'.\n * * `href` (string) - Specifies the `href` for a link styled as a button.\n * * `external` (boolean) - Marks the link as external by adding an icon after the text. When clicked, the link opens in a new tab.\n * * `externalIconAriaLabel` (string) - Adds an `aria-label` for the external icon.\n * * `onClick` (() => void) - Specifies the event handler called when the utility is clicked.\n *\n * ### menu-dropdown\n *\n * * `description` (string) - The description displayed inside the dropdown.\n * * `items` (ButtonDropdownProps.Items) - An array of dropdown items. This follows the same structure as the `items` property of the [button dropdown component](/components/button-dropdown), with the exception of the checkbox item type.\n * * `onItemClick` (NonCancelableEventHandler<ButtonDropdownProps.ItemClickDetails>) - Specifies the event handler called when a dropdown item is selected.\n */\n utilities?: ReadonlyArray<TopNavigationProps.Utility>;\n\n /**\n * An object containing all the localized strings required by the component.\n */\n i18nStrings: TopNavigationProps.I18nStrings;\n}\n\nexport namespace TopNavigationProps {\n export interface Identity {\n title?: string;\n logo?: Logo;\n href: string;\n onFollow?: CancelableEventHandler;\n }\n\n export interface Logo {\n src: string;\n alt?: string;\n }\n\n interface BaseUtility {\n text?: string;\n title?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconAlt?: string;\n iconSvg?: React.ReactNode;\n ariaLabel?: string;\n\n badge?: boolean;\n disableUtilityCollapse?: boolean;\n disableTextCollapse?: boolean;\n }\n\n export interface MenuDropdownUtility extends BaseUtility {\n type: 'menu-dropdown';\n description?: string;\n items: ButtonDropdownProps.Items;\n onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n }\n\n export interface ButtonUtility extends BaseUtility {\n type: 'button';\n variant?: 'primary-button' | 'link';\n onClick?: CancelableEventHandler;\n href?: string;\n external?: boolean;\n externalIconAriaLabel?: string;\n }\n\n export type Utility = MenuDropdownUtility | ButtonUtility;\n\n export interface I18nStrings {\n searchIconAriaLabel?: string;\n searchDismissIconAriaLabel?: string;\n overflowMenuTriggerText: string;\n }\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { InternalBaseComponentProps } from '../../internal/hooks/use-base-component';
|
|
3
|
-
import { TopNavigationProps } from './interfaces';
|
|
4
|
-
type InternalTopNavigationProps = TopNavigationProps & InternalBaseComponentProps;
|
|
5
|
-
export default function InternalTopNavigation({
|
|
6
|
-
__internalRootRef,
|
|
7
|
-
identity,
|
|
8
|
-
i18nStrings,
|
|
9
|
-
utilities,
|
|
10
|
-
search,
|
|
11
|
-
...restProps
|
|
12
|
-
}: InternalTopNavigationProps): JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/top-navigation/1.0-beta/internal.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAOlD,KAAK,0BAA0B,GAAG,kBAAkB,GAAG,0BAA0B,CAAC;AAElF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,SAAc,EACd,MAAM,EACN,GAAG,SAAS,EACb,EAAE,0BAA0B,eAgL5B"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { Portal } from '@cloudscape-design/component-toolkit/internal';
|
|
7
|
-
import { getBaseProps } from '../../internal/base-component';
|
|
8
|
-
import VisualContext from '../../internal/components/visual-context';
|
|
9
|
-
import { fireCancelableEvent, isPlainLeftClick } from '../../internal/events';
|
|
10
|
-
import { checkSafeUrl } from '../../internal/utils/check-safe-url';
|
|
11
|
-
import OverflowMenu from './parts/overflow-menu';
|
|
12
|
-
import Utility from './parts/utility';
|
|
13
|
-
import { useTopNavigation } from './use-top-navigation.js';
|
|
14
|
-
import styles from './styles.css.js';
|
|
15
|
-
export default function InternalTopNavigation(_a) {
|
|
16
|
-
var { __internalRootRef, identity, i18nStrings, utilities = [], search } = _a, restProps = __rest(_a, ["__internalRootRef", "identity", "i18nStrings", "utilities", "search"]);
|
|
17
|
-
checkSafeUrl('TopNavigation', identity.href);
|
|
18
|
-
const baseProps = getBaseProps(restProps);
|
|
19
|
-
const { ref, virtualRef, breakpoint, responsiveState, isSearchExpanded, onSearchUtilityClick } = useTopNavigation({
|
|
20
|
-
__internalRootRef,
|
|
21
|
-
identity,
|
|
22
|
-
search,
|
|
23
|
-
utilities,
|
|
24
|
-
});
|
|
25
|
-
const isNarrowViewport = breakpoint === 'default';
|
|
26
|
-
const isMediumViewport = breakpoint === 'xxs';
|
|
27
|
-
const onIdentityClick = (event) => {
|
|
28
|
-
if (isPlainLeftClick(event)) {
|
|
29
|
-
fireCancelableEvent(identity.onFollow, {}, event);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
// Render the top nav twice; once as the top nav that users can see, and another
|
|
33
|
-
// "virtual" top nav used just for calculations. The virtual top nav doesn't react to
|
|
34
|
-
// layout changes and renders two sets of utilities: one with labels and one without.
|
|
35
|
-
const content = (isVirtual) => {
|
|
36
|
-
var _a, _b, _c, _d;
|
|
37
|
-
const Wrapper = isVirtual ? 'div' : 'header';
|
|
38
|
-
const showIdentity = isVirtual || !isSearchExpanded;
|
|
39
|
-
const showTitle = isVirtual || !responsiveState.hideTitle;
|
|
40
|
-
const showSearchSlot = search && (isVirtual || !responsiveState.hideSearch || isSearchExpanded);
|
|
41
|
-
const showSearchUtility = isVirtual || (search && responsiveState.hideSearch);
|
|
42
|
-
const showUtilities = isVirtual || !isSearchExpanded;
|
|
43
|
-
const showMenuTrigger = isVirtual || (!isSearchExpanded && responsiveState.hideUtilities);
|
|
44
|
-
return (React.createElement(Wrapper, { ref: isVirtual ? virtualRef : ref, "aria-hidden": isVirtual ? true : undefined, className: clsx(styles['top-navigation'], {
|
|
45
|
-
[styles.hidden]: isVirtual,
|
|
46
|
-
[styles.narrow]: isNarrowViewport,
|
|
47
|
-
[styles.medium]: isMediumViewport,
|
|
48
|
-
}) },
|
|
49
|
-
React.createElement("div", { className: styles['padding-box'] },
|
|
50
|
-
showIdentity && (React.createElement("div", { className: clsx(styles.identity, !identity.logo && styles['no-logo']) },
|
|
51
|
-
React.createElement("a", { className: styles['identity-link'], href: identity.href, onClick: onIdentityClick },
|
|
52
|
-
identity.logo && (React.createElement("img", { role: "img", src: (_a = identity.logo) === null || _a === void 0 ? void 0 : _a.src, alt: (_b = identity.logo) === null || _b === void 0 ? void 0 : _b.alt, className: clsx(styles.logo, {
|
|
53
|
-
[styles.narrow]: isNarrowViewport,
|
|
54
|
-
}) })),
|
|
55
|
-
showTitle && React.createElement("span", { className: styles.title }, identity.title)))),
|
|
56
|
-
React.createElement("div", { className: styles.inputs }, showSearchSlot && (React.createElement("div", { className: clsx(styles.search, !isVirtual && isSearchExpanded && styles['search-expanded']) }, search))),
|
|
57
|
-
React.createElement("div", { className: styles.utilities },
|
|
58
|
-
showSearchUtility && (React.createElement("div", { className: clsx(styles['utility-wrapper'], styles['utility-type-button'], styles['utility-type-button-link']), "data-utility-special": "search" },
|
|
59
|
-
React.createElement(Utility, { hideText: true, isNarrowViewport: isNarrowViewport, definition: {
|
|
60
|
-
type: 'button',
|
|
61
|
-
iconName: isSearchExpanded ? 'close' : 'search',
|
|
62
|
-
ariaLabel: isSearchExpanded
|
|
63
|
-
? i18nStrings.searchDismissIconAriaLabel
|
|
64
|
-
: i18nStrings.searchIconAriaLabel,
|
|
65
|
-
onClick: onSearchUtilityClick,
|
|
66
|
-
} }))),
|
|
67
|
-
showUtilities &&
|
|
68
|
-
utilities
|
|
69
|
-
.filter((_utility, i) => isVirtual || !responsiveState.hideUtilities || responsiveState.hideUtilities.indexOf(i) === -1)
|
|
70
|
-
.map((utility, i) => {
|
|
71
|
-
var _a;
|
|
72
|
-
const hideText = !!responsiveState.hideUtilityText;
|
|
73
|
-
const last = (isVirtual || !showMenuTrigger) && i === utilities.length - 1;
|
|
74
|
-
return (React.createElement("div", { key: i, className: clsx(styles['utility-wrapper'], styles[`utility-type-${utility.type}`], last && styles['utility-wrapper-last'], utility.type === 'button' && styles[`utility-type-button-${(_a = utility.variant) !== null && _a !== void 0 ? _a : 'link'}`]), "data-utility-index": i, "data-utility-hide": `${hideText}` },
|
|
75
|
-
React.createElement(Utility, { hideText: hideText, definition: utility, last: last, isNarrowViewport: isNarrowViewport })));
|
|
76
|
-
}),
|
|
77
|
-
isVirtual &&
|
|
78
|
-
utilities.map((utility, i) => {
|
|
79
|
-
var _a;
|
|
80
|
-
const hideText = !responsiveState.hideUtilityText;
|
|
81
|
-
const last = !showMenuTrigger && i === utilities.length - 1;
|
|
82
|
-
return (React.createElement("div", { key: i, className: clsx(styles['utility-wrapper'], styles[`utility-type-${utility.type}`], last && styles['utility-wrapper-last'], utility.type === 'button' && styles[`utility-type-button-${(_a = utility.variant) !== null && _a !== void 0 ? _a : 'link'}`]), "data-utility-index": i, "data-utility-hide": `${hideText}` },
|
|
83
|
-
React.createElement(Utility, { hideText: hideText, definition: utility, last: last, isNarrowViewport: isNarrowViewport })));
|
|
84
|
-
}),
|
|
85
|
-
showMenuTrigger && (React.createElement("div", { className: clsx(styles['utility-wrapper'], styles['utility-type-menu-dropdown'], styles['utility-wrapper-last']), "data-utility-special": "menu-trigger" },
|
|
86
|
-
React.createElement(OverflowMenu, { utilities: (_d = (_c = responsiveState.hideUtilities) === null || _c === void 0 ? void 0 : _c.map(i => utilities[i])) !== null && _d !== void 0 ? _d : [], isNarrowViewport: isNarrowViewport }, i18nStrings.overflowMenuTriggerText)))))));
|
|
87
|
-
};
|
|
88
|
-
return (React.createElement("div", Object.assign({}, baseProps, { ref: __internalRootRef }),
|
|
89
|
-
React.createElement(VisualContext, { contextName: "top-navigation" },
|
|
90
|
-
content(false),
|
|
91
|
-
React.createElement(Portal, null, content(true)))));
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=internal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../../src/top-navigation/1.0-beta/internal.ts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CAAC,IAAI,CAAC,CAAU,CAClB,CACZ,CACP,CAAC;AACJ,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';\n\nimport { Portal } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../../internal/base-component';\nimport VisualContext from '../../internal/components/visual-context';\nimport { fireCancelableEvent, isPlainLeftClick } from '../../internal/events';\nimport { InternalBaseComponentProps } from '../../internal/hooks/use-base-component';\nimport { checkSafeUrl } from '../../internal/utils/check-safe-url';\nimport { TopNavigationProps } from './interfaces';\nimport OverflowMenu from './parts/overflow-menu';\nimport Utility from './parts/utility';\nimport { useTopNavigation } from './use-top-navigation.js';\n\nimport styles from './styles.css.js';\n\ntype InternalTopNavigationProps = TopNavigationProps & InternalBaseComponentProps;\n\nexport default function InternalTopNavigation({\n __internalRootRef,\n identity,\n i18nStrings,\n utilities = [],\n search,\n ...restProps\n}: InternalTopNavigationProps) {\n checkSafeUrl('TopNavigation', identity.href);\n const baseProps = getBaseProps(restProps);\n const { ref, virtualRef, breakpoint, responsiveState, isSearchExpanded, onSearchUtilityClick } = useTopNavigation({\n __internalRootRef,\n identity,\n search,\n utilities,\n });\n\n const isNarrowViewport = breakpoint === 'default';\n const isMediumViewport = breakpoint === 'xxs';\n\n const onIdentityClick = (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireCancelableEvent(identity.onFollow, {}, event);\n }\n };\n\n // Render the top nav twice; once as the top nav that users can see, and another\n // \"virtual\" top nav used just for calculations. The virtual top nav doesn't react to\n // layout changes and renders two sets of utilities: one with labels and one without.\n const content = (isVirtual: boolean) => {\n const Wrapper = isVirtual ? 'div' : 'header';\n const showIdentity = isVirtual || !isSearchExpanded;\n const showTitle = isVirtual || !responsiveState.hideTitle;\n const showSearchSlot = search && (isVirtual || !responsiveState.hideSearch || isSearchExpanded);\n const showSearchUtility = isVirtual || (search && responsiveState.hideSearch);\n const showUtilities = isVirtual || !isSearchExpanded;\n const showMenuTrigger = isVirtual || (!isSearchExpanded && responsiveState.hideUtilities);\n\n return (\n <Wrapper\n ref={isVirtual ? virtualRef : ref}\n aria-hidden={isVirtual ? true : undefined}\n className={clsx(styles['top-navigation'], {\n [styles.hidden]: isVirtual,\n [styles.narrow]: isNarrowViewport,\n [styles.medium]: isMediumViewport,\n })}\n >\n <div className={styles['padding-box']}>\n {showIdentity && (\n <div className={clsx(styles.identity, !identity.logo && styles['no-logo'])}>\n <a className={styles['identity-link']} href={identity.href} onClick={onIdentityClick}>\n {identity.logo && (\n <img\n role=\"img\"\n src={identity.logo?.src}\n alt={identity.logo?.alt}\n className={clsx(styles.logo, {\n [styles.narrow]: isNarrowViewport,\n })}\n />\n )}\n {showTitle && <span className={styles.title}>{identity.title}</span>}\n </a>\n </div>\n )}\n\n <div className={styles.inputs}>\n {showSearchSlot && (\n <div className={clsx(styles.search, !isVirtual && isSearchExpanded && styles['search-expanded'])}>\n {search}\n </div>\n )}\n </div>\n\n <div className={styles.utilities}>\n {showSearchUtility && (\n <div\n className={clsx(\n styles['utility-wrapper'],\n styles['utility-type-button'],\n styles['utility-type-button-link']\n )}\n data-utility-special=\"search\"\n >\n <Utility\n hideText={true}\n isNarrowViewport={isNarrowViewport}\n definition={{\n type: 'button',\n iconName: isSearchExpanded ? 'close' : 'search',\n ariaLabel: isSearchExpanded\n ? i18nStrings.searchDismissIconAriaLabel\n : i18nStrings.searchIconAriaLabel,\n onClick: onSearchUtilityClick,\n }}\n />\n </div>\n )}\n\n {showUtilities &&\n utilities\n .filter(\n (_utility, i) =>\n isVirtual || !responsiveState.hideUtilities || responsiveState.hideUtilities.indexOf(i) === -1\n )\n .map((utility, i) => {\n const hideText = !!responsiveState.hideUtilityText;\n const last = (isVirtual || !showMenuTrigger) && i === utilities.length - 1;\n return (\n <div\n key={i}\n className={clsx(\n styles['utility-wrapper'],\n styles[`utility-type-${utility.type}`],\n last && styles['utility-wrapper-last'],\n utility.type === 'button' && styles[`utility-type-button-${utility.variant ?? 'link'}`]\n )}\n data-utility-index={i}\n data-utility-hide={`${hideText}`}\n >\n <Utility\n hideText={hideText}\n definition={utility}\n last={last}\n isNarrowViewport={isNarrowViewport}\n />\n </div>\n );\n })}\n\n {isVirtual &&\n utilities.map((utility, i) => {\n const hideText = !responsiveState.hideUtilityText;\n const last = !showMenuTrigger && i === utilities.length - 1;\n return (\n <div\n key={i}\n className={clsx(\n styles['utility-wrapper'],\n styles[`utility-type-${utility.type}`],\n last && styles['utility-wrapper-last'],\n utility.type === 'button' && styles[`utility-type-button-${utility.variant ?? 'link'}`]\n )}\n data-utility-index={i}\n data-utility-hide={`${hideText}`}\n >\n <Utility hideText={hideText} definition={utility} last={last} isNarrowViewport={isNarrowViewport} />\n </div>\n );\n })}\n\n {showMenuTrigger && (\n <div\n className={clsx(\n styles['utility-wrapper'],\n styles['utility-type-menu-dropdown'],\n styles['utility-wrapper-last']\n )}\n data-utility-special=\"menu-trigger\"\n >\n <OverflowMenu\n utilities={responsiveState.hideUtilities?.map(i => utilities[i]) ?? []}\n isNarrowViewport={isNarrowViewport}\n >\n {i18nStrings.overflowMenuTriggerText}\n </OverflowMenu>\n </div>\n )}\n </div>\n </div>\n </Wrapper>\n );\n };\n\n return (\n <div {...baseProps} ref={__internalRootRef}>\n <VisualContext contextName=\"top-navigation\">\n {content(false)}\n <Portal>{content(true)}</Portal>\n </VisualContext>\n </div>\n );\n}\n"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ButtonDropdownProps } from '../../../button-dropdown/interfaces';
|
|
3
|
-
import { BaseComponentProps } from '../../../internal/base-component';
|
|
4
|
-
import { TopNavigationProps } from '../interfaces';
|
|
5
|
-
interface OverflowMenuProps extends BaseComponentProps {
|
|
6
|
-
utilities: ReadonlyArray<TopNavigationProps.Utility>;
|
|
7
|
-
isNarrowViewport?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Text displayed in the button dropdown trigger.
|
|
10
|
-
* @displayname text
|
|
11
|
-
*/
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
export declare function transformUtility(utility: TopNavigationProps.Utility, index: number): ButtonDropdownProps.ItemOrGroup;
|
|
15
|
-
export default function OverflowMenu({
|
|
16
|
-
children,
|
|
17
|
-
utilities,
|
|
18
|
-
isNarrowViewport
|
|
19
|
-
}: OverflowMenuProps): JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overflow-menu.d.ts","sourceRoot":"","sources":["../../../../../src/top-navigation/1.0-beta/parts/overflow-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAInD,UAAU,iBAAkB,SAAQ,kBAAkB;IACpD,SAAS,EAAE,aAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAErD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAYD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAAC,WAAW,CA2BpH;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,iBAAiB,eA6BhG"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import MenuDropdown from '../../../internal/components/menu-dropdown';
|
|
6
|
-
import { fireCancelableEvent } from '../../../internal/events';
|
|
7
|
-
import styles from '../styles.css.js';
|
|
8
|
-
function transformButtonDropdownItems(items, index) {
|
|
9
|
-
return items.map(item => {
|
|
10
|
-
const itemCopy = Object.assign(Object.assign({}, item), { id: `${index}__${item.id || ''}` });
|
|
11
|
-
if ('items' in itemCopy) {
|
|
12
|
-
itemCopy.items = transformButtonDropdownItems(itemCopy.items, index);
|
|
13
|
-
}
|
|
14
|
-
return itemCopy;
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
export function transformUtility(utility, index) {
|
|
18
|
-
const title = utility.title || utility.text || '';
|
|
19
|
-
const commonProps = {
|
|
20
|
-
// Encode index into the ID, so we can pick out the right handler.
|
|
21
|
-
id: `${index}__`,
|
|
22
|
-
text: title,
|
|
23
|
-
iconName: utility.iconName,
|
|
24
|
-
iconUrl: utility.iconUrl,
|
|
25
|
-
iconAlt: utility.iconAlt,
|
|
26
|
-
iconSvg: utility.iconSvg,
|
|
27
|
-
};
|
|
28
|
-
if (utility.type === 'menu-dropdown') {
|
|
29
|
-
return Object.assign(Object.assign({}, commonProps), { items: transformButtonDropdownItems(utility.items, index), description: utility.description });
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return Object.assign(Object.assign({}, commonProps), { href: utility.href, external: utility.external, externalIconAriaLabel: utility.externalIconAriaLabel });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export default function OverflowMenu({ children, utilities, isNarrowViewport }) {
|
|
36
|
-
const onClick = (isFollow, event) => {
|
|
37
|
-
const [index, ...rest] = event.detail.id.split('__');
|
|
38
|
-
const utility = utilities[parseInt(index)];
|
|
39
|
-
let defaultPrevented = false;
|
|
40
|
-
if ('onItemClick' in utility) {
|
|
41
|
-
defaultPrevented = fireCancelableEvent(utility.onItemClick, Object.assign(Object.assign({}, event.detail), { id: rest.join('__') }));
|
|
42
|
-
}
|
|
43
|
-
else if ('onClick' in utility && (isFollow || !utility.href)) {
|
|
44
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
45
|
-
const _a = event.detail, { id } = _a, baseNavigationalDetail = __rest(_a, ["id"]);
|
|
46
|
-
defaultPrevented = fireCancelableEvent(utility.onClick, baseNavigationalDetail);
|
|
47
|
-
}
|
|
48
|
-
if (defaultPrevented) {
|
|
49
|
-
event.preventDefault();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
return (React.createElement(MenuDropdown, { items: utilities.map(transformUtility), offsetRight: isNarrowViewport ? 'l' : 'xxl', className: styles.trigger, expandableGroups: true, onItemClick: onClick.bind(null, false), onItemFollow: onClick.bind(null, true) }, children));
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=overflow-menu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overflow-menu.js","sourceRoot":"","sources":["../../../../../src/top-navigation/1.0-beta/parts/overflow-menu.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,OAAO,MAAM,MAAM,kBAAkB,CAAC;AActC,SAAS,4BAA4B,CAAC,KAAgC,EAAE,KAAa;IACnF,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACtB,MAAM,QAAQ,mCAAQ,IAAI,KAAE,EAAE,EAAE,GAAG,KAAK,KAAK,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,GAAE,CAAC;QAC/D,IAAI,OAAO,IAAI,QAAQ,EAAE;YACvB,QAAQ,CAAC,KAAK,GAAG,4BAA4B,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACtE;QACD,OAAO,QAAQ,CAAC;IAClB,CA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,mBAAmB,CAAC,OAAO,CAAC,WAAW,kCAAO,KAAK,CAAC,MAAM,KAAE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAG,CAAC;SACvG;aAAM,IAAI,SAAS,IAAI,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9D,6DAA6D;YAC7D,MAAM,KAAoC,KAAK,CAAC,MAAM,EAAhD,EAAE,EAAE,OAA4C,EAAvC,sBAAsB,cAA/B,MAAiC,CAAe,CAAC;YACvD,gBAAgB,GAAG,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC;SACjF;QACD,IAAI,gBAAgB,EAAE;YACpB,KAAK,CAAC,cAAc,EAAE,CAAC;SACxB;IACH,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,YAAY,IACX,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,EACtC,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAC3C,SAAS,EAAE,MAAM,CAAC,OAAO,EACzB,gBAAgB,EAAE,IAAI,EACtB,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EACtC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAErC,QAAQ,CACI,CAChB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonDropdownProps } from '../../../button-dropdown/interfaces';\nimport { BaseComponentProps } from '../../../internal/base-component';\nimport MenuDropdown from '../../../internal/components/menu-dropdown';\nimport { fireCancelableEvent } from '../../../internal/events';\nimport { TopNavigationProps } from '../interfaces';\n\nimport styles from '../styles.css.js';\n\ninterface OverflowMenuProps extends BaseComponentProps {\n utilities: ReadonlyArray<TopNavigationProps.Utility>;\n\n isNarrowViewport?: boolean;\n\n /**\n * Text displayed in the button dropdown trigger.\n * @displayname text\n */\n children?: React.ReactNode;\n}\n\nfunction transformButtonDropdownItems(items: ButtonDropdownProps.Items, index: number): ButtonDropdownProps.Items {\n return items.map(item => {\n const itemCopy = { ...item, id: `${index}__${item.id || ''}` };\n if ('items' in itemCopy) {\n itemCopy.items = transformButtonDropdownItems(itemCopy.items, index);\n }\n return itemCopy;\n });\n}\n\nexport function transformUtility(utility: TopNavigationProps.Utility, index: number): ButtonDropdownProps.ItemOrGroup {\n const title = utility.title || utility.text || '';\n\n const commonProps: Partial<ButtonDropdownProps.ItemOrGroup> = {\n // Encode index into the ID, so we can pick out the right handler.\n id: `${index}__`,\n text: title,\n iconName: utility.iconName,\n iconUrl: utility.iconUrl,\n iconAlt: utility.iconAlt,\n iconSvg: utility.iconSvg,\n };\n\n if (utility.type === 'menu-dropdown') {\n return {\n ...commonProps,\n items: transformButtonDropdownItems(utility.items, index),\n description: utility.description,\n } as ButtonDropdownProps.ItemGroup;\n } else {\n return {\n ...commonProps,\n href: utility.href,\n external: utility.external,\n externalIconAriaLabel: utility.externalIconAriaLabel,\n } as ButtonDropdownProps.Item;\n }\n}\n\nexport default function OverflowMenu({ children, utilities, isNarrowViewport }: OverflowMenuProps) {\n const onClick = (isFollow: boolean, event: CustomEvent<ButtonDropdownProps.ItemClickDetails>) => {\n const [index, ...rest] = event.detail.id.split('__');\n const utility = utilities[parseInt(index)];\n let defaultPrevented = false;\n if ('onItemClick' in utility) {\n defaultPrevented = fireCancelableEvent(utility.onItemClick, { ...event.detail, id: rest.join('__') });\n } else if ('onClick' in utility && (isFollow || !utility.href)) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { id, ...baseNavigationalDetail } = event.detail;\n defaultPrevented = fireCancelableEvent(utility.onClick, baseNavigationalDetail);\n }\n if (defaultPrevented) {\n event.preventDefault();\n }\n };\n\n return (\n <MenuDropdown\n items={utilities.map(transformUtility)}\n offsetRight={isNarrowViewport ? 'l' : 'xxl'}\n className={styles.trigger}\n expandableGroups={true}\n onItemClick={onClick.bind(null, false)}\n onItemFollow={onClick.bind(null, true)}\n >\n {children}\n </MenuDropdown>\n );\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TopNavigationProps } from '../interfaces';
|
|
3
|
-
export interface UtilityProps {
|
|
4
|
-
hideText: boolean;
|
|
5
|
-
definition: TopNavigationProps.Utility;
|
|
6
|
-
last?: boolean;
|
|
7
|
-
isNarrowViewport?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export default function Utility({
|
|
10
|
-
hideText,
|
|
11
|
-
definition,
|
|
12
|
-
last,
|
|
13
|
-
isNarrowViewport
|
|
14
|
-
}: UtilityProps): JSX.Element | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../../../src/top-navigation/1.0-beta/parts/utility.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAInD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,kBAAkB,CAAC,OAAO,CAAC;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,YAAY,sBAuF7F"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { InternalButton } from '../../../button/internal';
|
|
6
|
-
import { isLinkItem } from '../../../button-dropdown/utils/utils';
|
|
7
|
-
import InternalIcon from '../../../icon/internal';
|
|
8
|
-
import MenuDropdown from '../../../internal/components/menu-dropdown';
|
|
9
|
-
import { checkSafeUrl } from '../../../internal/utils/check-safe-url';
|
|
10
|
-
import InternalLink from '../../../link/internal';
|
|
11
|
-
import styles from '../styles.css.js';
|
|
12
|
-
export default function Utility({ hideText, definition, last, isNarrowViewport }) {
|
|
13
|
-
var _a;
|
|
14
|
-
const shouldHideText = hideText && !definition.disableTextCollapse && hasIcon(definition);
|
|
15
|
-
const ariaLabel = (_a = definition.ariaLabel) !== null && _a !== void 0 ? _a : definition.text;
|
|
16
|
-
if (definition.type === 'button') {
|
|
17
|
-
checkSafeUrl('TopNavigation', definition.href);
|
|
18
|
-
if (definition.variant === 'primary-button') {
|
|
19
|
-
return (React.createElement(InternalButton, { variant: "primary", href: definition.href, target: definition.external ? '_blank' : undefined, onClick: definition.onClick, ariaLabel: ariaLabel, iconName: definition.iconName, iconUrl: definition.iconUrl, iconAlt: definition.iconAlt, iconSvg: definition.iconSvg, className: clsx(last && styles['last-utility']) }, shouldHideText ? null : (React.createElement(React.Fragment, null,
|
|
20
|
-
definition.text,
|
|
21
|
-
definition.external && (React.createElement(React.Fragment, null,
|
|
22
|
-
' ',
|
|
23
|
-
React.createElement("span", { className: styles['utility-button-external-icon'], "aria-label": definition.externalIconAriaLabel, role: definition.externalIconAriaLabel ? 'img' : undefined },
|
|
24
|
-
React.createElement(InternalIcon, { name: "external" }))))))));
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
// Link
|
|
28
|
-
return (React.createElement(InternalLink, { variant: "top-navigation", href: definition.href, external: definition.external, externalIconAriaLabel: definition.externalIconAriaLabel, onFollow: definition.onClick, ariaLabel: ariaLabel, className: clsx(last && styles['last-utility']) },
|
|
29
|
-
hasIcon(definition) && (React.createElement("span", { className: styles['utility-link-icon'] },
|
|
30
|
-
React.createElement(InternalIcon, { name: definition.iconName, url: definition.iconUrl, alt: definition.iconAlt, svg: definition.iconSvg, badge: definition.badge }))),
|
|
31
|
-
!shouldHideText && definition.text));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
else if (definition.type === 'menu-dropdown') {
|
|
35
|
-
const paddingRight = isNarrowViewport ? 'l' : 'xxl';
|
|
36
|
-
const title = definition.title || definition.text;
|
|
37
|
-
const shouldShowTitle = shouldHideText || !definition.text;
|
|
38
|
-
checkSafeUrlRecursively(definition.items);
|
|
39
|
-
return (React.createElement(MenuDropdown, Object.assign({}, definition, { title: shouldShowTitle ? title : '', ariaLabel: ariaLabel, className: styles['utility-dropdown'], offsetRight: last ? paddingRight : undefined }), !shouldHideText && definition.text));
|
|
40
|
-
}
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
function hasIcon(definition) {
|
|
44
|
-
return !!definition.iconName || !!definition.iconUrl || !!definition.iconAlt || !!definition.iconSvg;
|
|
45
|
-
}
|
|
46
|
-
function checkSafeUrlRecursively(itemOrGroup) {
|
|
47
|
-
for (const item of itemOrGroup) {
|
|
48
|
-
if (isLinkItem(item)) {
|
|
49
|
-
checkSafeUrl('TopNavigation', item.href);
|
|
50
|
-
}
|
|
51
|
-
if ('items' in item) {
|
|
52
|
-
checkSafeUrlRecursively(item.items);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=utility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../../../../src/top-navigation/1.0-beta/parts/utility.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,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C,UAAU,CAAC,KAAK,CAAC,CAAC;QAE1C,OAAO,CACL,oBAAC,YAAY,oBACP,UAAU,IACd,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EACnC,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,EACrC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,KAE3C,CAAC,cAAc,IAAI,UAAU,CAAC,IAAI,CACtB,CAChB,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,OAAO,CAAC,UAAsC;IACrD,OAAO,CAAC,CAAC,UAAU,CAAC,QAAQ,IAAI,CAAC,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;AACvG,CAAC;AAED,SAAS,uBAAuB,CAAC,WAAuC;IACtE,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE;QAC9B,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;YACpB,YAAY,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;SAC1C;QAED,IAAI,OAAO,IAAI,IAAI,EAAE;YACnB,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACrC;KACF;AACH,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';\n\nimport { InternalButton } from '../../../button/internal';\nimport { isLinkItem } from '../../../button-dropdown/utils/utils';\nimport InternalIcon from '../../../icon/internal';\nimport MenuDropdown, { MenuDropdownProps } from '../../../internal/components/menu-dropdown';\nimport { checkSafeUrl } from '../../../internal/utils/check-safe-url';\nimport InternalLink from '../../../link/internal';\nimport { TopNavigationProps } from '../interfaces';\n\nimport styles from '../styles.css.js';\n\nexport interface UtilityProps {\n hideText: boolean;\n definition: TopNavigationProps.Utility;\n last?: boolean;\n isNarrowViewport?: boolean;\n}\n\nexport default function Utility({ hideText, definition, last, isNarrowViewport }: UtilityProps) {\n const shouldHideText = hideText && !definition.disableTextCollapse && hasIcon(definition);\n const ariaLabel = definition.ariaLabel ?? definition.text;\n\n if (definition.type === 'button') {\n checkSafeUrl('TopNavigation', definition.href);\n if (definition.variant === 'primary-button') {\n return (\n <InternalButton\n variant=\"primary\"\n href={definition.href}\n target={definition.external ? '_blank' : undefined}\n onClick={definition.onClick}\n ariaLabel={ariaLabel}\n iconName={definition.iconName}\n iconUrl={definition.iconUrl}\n iconAlt={definition.iconAlt}\n iconSvg={definition.iconSvg}\n className={clsx(last && styles['last-utility'])}\n >\n {shouldHideText ? null : (\n <>\n {definition.text}\n {definition.external && (\n <>\n {' '}\n <span\n className={styles['utility-button-external-icon']}\n aria-label={definition.externalIconAriaLabel}\n role={definition.externalIconAriaLabel ? 'img' : undefined}\n >\n <InternalIcon name=\"external\" />\n </span>\n </>\n )}\n </>\n )}\n </InternalButton>\n );\n } else {\n // Link\n return (\n <InternalLink\n variant=\"top-navigation\"\n href={definition.href}\n external={definition.external}\n externalIconAriaLabel={definition.externalIconAriaLabel}\n onFollow={definition.onClick}\n ariaLabel={ariaLabel}\n className={clsx(last && styles['last-utility'])}\n >\n {hasIcon(definition) && (\n <span className={styles['utility-link-icon']}>\n <InternalIcon\n name={definition.iconName}\n url={definition.iconUrl}\n alt={definition.iconAlt}\n svg={definition.iconSvg}\n badge={definition.badge}\n />\n </span>\n )}\n {!shouldHideText && definition.text}\n </InternalLink>\n );\n }\n } else if (definition.type === 'menu-dropdown') {\n const paddingRight = isNarrowViewport ? 'l' : 'xxl';\n const title = definition.title || definition.text;\n const shouldShowTitle = shouldHideText || !definition.text;\n\n checkSafeUrlRecursively(definition.items);\n\n return (\n <MenuDropdown\n {...definition}\n title={shouldShowTitle ? title : ''}\n ariaLabel={ariaLabel}\n className={styles['utility-dropdown']}\n offsetRight={last ? paddingRight : undefined}\n >\n {!shouldHideText && definition.text}\n </MenuDropdown>\n );\n }\n\n return null;\n}\n\nfunction hasIcon(definition: TopNavigationProps.Utility): boolean {\n return !!definition.iconName || !!definition.iconUrl || !!definition.iconAlt || !!definition.iconSvg;\n}\n\nfunction checkSafeUrlRecursively(itemOrGroup: MenuDropdownProps['items']) {\n for (const item of itemOrGroup) {\n if (isLinkItem(item)) {\n checkSafeUrl('TopNavigation', item.href);\n }\n\n if ('items' in item) {\n checkSafeUrlRecursively(item.items);\n }\n }\n}\n"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import './styles.scoped.css';
|
|
3
|
-
export default {
|
|
4
|
-
"top-navigation": "awsui_top-navigation_1ca1i_scbs0_145",
|
|
5
|
-
"padding-box": "awsui_padding-box_1ca1i_scbs0_177",
|
|
6
|
-
"medium": "awsui_medium_1ca1i_scbs0_189",
|
|
7
|
-
"narrow": "awsui_narrow_1ca1i_scbs0_189",
|
|
8
|
-
"hidden": "awsui_hidden_1ca1i_scbs0_199",
|
|
9
|
-
"\t": "awsui_\t_1ca1i_scbs0_1",
|
|
10
|
-
"identity": "awsui_identity_1ca1i_scbs0_212",
|
|
11
|
-
"identity-link": "awsui_identity-link_1ca1i_scbs0_212",
|
|
12
|
-
"no-logo": "awsui_no-logo_1ca1i_scbs0_232",
|
|
13
|
-
"logo": "awsui_logo_1ca1i_scbs0_236",
|
|
14
|
-
"title": "awsui_title_1ca1i_scbs0_247",
|
|
15
|
-
"inputs": "awsui_inputs_1ca1i_scbs0_263",
|
|
16
|
-
"search": "awsui_search_1ca1i_scbs0_270",
|
|
17
|
-
"search-expanded": "awsui_search-expanded_1ca1i_scbs0_275",
|
|
18
|
-
"utilities": "awsui_utilities_1ca1i_scbs0_280",
|
|
19
|
-
"utility-wrapper": "awsui_utility-wrapper_1ca1i_scbs0_292",
|
|
20
|
-
"utility-wrapper-last": "awsui_utility-wrapper-last_1ca1i_scbs0_307",
|
|
21
|
-
"utility-type-button-primary-button": "awsui_utility-type-button-primary-button_1ca1i_scbs0_307",
|
|
22
|
-
"utility-type-menu-dropdown": "awsui_utility-type-menu-dropdown_1ca1i_scbs0_320",
|
|
23
|
-
"utility-type-button-link": "awsui_utility-type-button-link_1ca1i_scbs0_336",
|
|
24
|
-
"utility-link-icon": "awsui_utility-link-icon_1ca1i_scbs0_350",
|
|
25
|
-
"utility-button-external-icon": "awsui_utility-button-external-icon_1ca1i_scbs0_354",
|
|
26
|
-
"trigger": "awsui_trigger_1ca1i_scbs0_358"
|
|
27
|
-
};
|
|
28
|
-
|