@cloudscape-design/components-themeable 3.0.1052 → 3.0.1054

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.
Files changed (62) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/internal/components/button-trigger/styles.scss +4 -2
  3. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  4. package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
  5. package/lib/internal/template/button-dropdown/internal.js +2 -2
  6. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  7. package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
  8. package/lib/internal/template/flashbar/collapsible-flashbar.js +23 -10
  9. package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
  10. package/lib/internal/template/flashbar/common.d.ts +3 -0
  11. package/lib/internal/template/flashbar/common.d.ts.map +1 -1
  12. package/lib/internal/template/flashbar/common.js +50 -1
  13. package/lib/internal/template/flashbar/common.js.map +1 -1
  14. package/lib/internal/template/flashbar/flash.d.ts +3 -0
  15. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  16. package/lib/internal/template/flashbar/flash.js +40 -18
  17. package/lib/internal/template/flashbar/flash.js.map +1 -1
  18. package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  19. package/lib/internal/template/flashbar/non-collapsible-flashbar.js +14 -2
  20. package/lib/internal/template/flashbar/non-collapsible-flashbar.js.map +1 -1
  21. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  22. package/lib/internal/template/internal/components/button-trigger/styles.css.js +13 -13
  23. package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +36 -31
  24. package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +13 -13
  25. package/lib/internal/template/internal/environment.js +2 -2
  26. package/lib/internal/template/internal/environment.json +2 -2
  27. package/lib/internal/template/package.json +0 -1
  28. package/package.json +1 -1
  29. package/lib/internal/scss/top-navigation/1.0-beta/styles.scss +0 -219
  30. package/lib/internal/template/test-utils/dom/top-navigation/1.0-beta/index.d.ts +0 -28
  31. package/lib/internal/template/test-utils/dom/top-navigation/1.0-beta/index.js +0 -72
  32. package/lib/internal/template/test-utils/dom/top-navigation/1.0-beta/index.js.map +0 -1
  33. package/lib/internal/template/test-utils/selectors/top-navigation/1.0-beta/index.d.ts +0 -28
  34. package/lib/internal/template/test-utils/selectors/top-navigation/1.0-beta/index.js +0 -72
  35. package/lib/internal/template/test-utils/selectors/top-navigation/1.0-beta/index.js.map +0 -1
  36. package/lib/internal/template/top-navigation/1.0-beta/index.d.ts +0 -10
  37. package/lib/internal/template/top-navigation/1.0-beta/index.d.ts.map +0 -1
  38. package/lib/internal/template/top-navigation/1.0-beta/index.js +0 -19
  39. package/lib/internal/template/top-navigation/1.0-beta/index.js.map +0 -1
  40. package/lib/internal/template/top-navigation/1.0-beta/interfaces.d.ts +0 -103
  41. package/lib/internal/template/top-navigation/1.0-beta/interfaces.d.ts.map +0 -1
  42. package/lib/internal/template/top-navigation/1.0-beta/interfaces.js +0 -2
  43. package/lib/internal/template/top-navigation/1.0-beta/interfaces.js.map +0 -1
  44. package/lib/internal/template/top-navigation/1.0-beta/internal.d.ts +0 -7
  45. package/lib/internal/template/top-navigation/1.0-beta/internal.d.ts.map +0 -1
  46. package/lib/internal/template/top-navigation/1.0-beta/internal.js +0 -93
  47. package/lib/internal/template/top-navigation/1.0-beta/internal.js.map +0 -1
  48. package/lib/internal/template/top-navigation/1.0-beta/parts/overflow-menu.d.ts +0 -17
  49. package/lib/internal/template/top-navigation/1.0-beta/parts/overflow-menu.d.ts.map +0 -1
  50. package/lib/internal/template/top-navigation/1.0-beta/parts/overflow-menu.js +0 -54
  51. package/lib/internal/template/top-navigation/1.0-beta/parts/overflow-menu.js.map +0 -1
  52. package/lib/internal/template/top-navigation/1.0-beta/parts/utility.d.ts +0 -10
  53. package/lib/internal/template/top-navigation/1.0-beta/parts/utility.d.ts.map +0 -1
  54. package/lib/internal/template/top-navigation/1.0-beta/parts/utility.js +0 -56
  55. package/lib/internal/template/top-navigation/1.0-beta/parts/utility.js.map +0 -1
  56. package/lib/internal/template/top-navigation/1.0-beta/styles.css.js +0 -28
  57. package/lib/internal/template/top-navigation/1.0-beta/styles.scoped.css +0 -360
  58. package/lib/internal/template/top-navigation/1.0-beta/styles.selectors.js +0 -29
  59. package/lib/internal/template/top-navigation/1.0-beta/use-top-navigation.d.ts +0 -25
  60. package/lib/internal/template/top-navigation/1.0-beta/use-top-navigation.d.ts.map +0 -1
  61. package/lib/internal/template/top-navigation/1.0-beta/use-top-navigation.js +0 -154
  62. package/lib/internal/template/top-navigation/1.0-beta/use-top-navigation.js.map +0 -1
@@ -1,219 +0,0 @@
1
- /*
2
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- SPDX-License-Identifier: Apache-2.0
4
- */
5
-
6
- @use '../../internal/styles' as styles;
7
- @use '../../internal/styles/tokens' as awsui;
8
- @use '@cloudscape-design/component-toolkit/internal/focus-visible' as focus-visible;
9
-
10
- .top-navigation {
11
- @include styles.styles-reset;
12
- background: awsui.$color-background-container-content;
13
-
14
- > .padding-box {
15
- display: flex;
16
- flex-direction: row;
17
- flex-wrap: nowrap;
18
- justify-content: space-between;
19
- align-items: center;
20
- box-sizing: border-box;
21
- block-size: calc(#{awsui.$space-xxxl} + #{awsui.$space-scaled-m});
22
- padding-block: 0;
23
- padding-inline-start: awsui.$space-l;
24
- padding-inline-end: 0;
25
- }
26
-
27
- &.medium > .padding-box,
28
- &.narrow > .padding-box {
29
- block-size: calc(#{awsui.$space-xxxl} + #{awsui.$space-scaled-xs});
30
- }
31
-
32
- &.narrow > .padding-box {
33
- block-size: awsui.$space-xxxl;
34
- padding-block: 0;
35
- padding-inline-start: awsui.$space-xs;
36
- padding-inline-end: 0;
37
- }
38
- }
39
-
40
- .hidden {
41
- @include styles.awsui-util-hide;
42
- visibility: hidden;
43
- inline-size: 9000px;
44
- }
45
-
46
- // Ensures that tabbable child elements are hidden to a11y software.
47
- // ":not(#\9)" manually added because we want to override the default
48
- // visibility set by styles-reset, and "*" has a specificity of 0.
49
- /* stylelint-disable-next-line selector-combinator-disallowed-list, selector-max-universal */
50
- .hidden *:not(#\9) {
51
- visibility: hidden;
52
- }
53
-
54
- .identity {
55
- > .identity-link {
56
- display: flex;
57
- align-items: center;
58
- text-decoration: none;
59
- color: awsui.$color-text-top-navigation-title;
60
-
61
- &:hover {
62
- color: awsui.$color-text-accent;
63
- }
64
- @include focus-visible.when-visible {
65
- @include styles.link-focus;
66
- }
67
- }
68
-
69
- &.no-logo {
70
- // Prevent responsiveness from completely hiding the title.
71
- min-inline-size: 100px;
72
- }
73
- }
74
-
75
- .logo {
76
- display: block;
77
- max-block-size: awsui.$space-xxl;
78
- margin-inline-start: awsui.$space-s;
79
- inline-size: auto;
80
-
81
- // Setting an arbitrary min-width here discourages browser from lazy rendering
82
- min-inline-size: 10px;
83
-
84
- &.narrow {
85
- max-block-size: awsui.$space-xl;
86
- }
87
- }
88
-
89
- .title {
90
- @include styles.font-heading-m;
91
- margin-inline-start: awsui.$space-s;
92
- white-space: nowrap;
93
- overflow: hidden;
94
- text-overflow: ellipsis;
95
-
96
- .no-logo > .identity-link > & {
97
- font-weight: styles.$font-weight-bold;
98
- }
99
- }
100
-
101
- .inputs {
102
- flex: 1;
103
- min-inline-size: 0;
104
- display: flex;
105
- justify-content: center;
106
- }
107
-
108
- .search {
109
- inline-size: 100%;
110
- max-inline-size: 340px;
111
- padding-inline-start: awsui.$space-xxxl;
112
-
113
- &-expanded {
114
- max-inline-size: none;
115
- padding-inline-start: awsui.$space-s;
116
- }
117
- }
118
-
119
- .utilities {
120
- display: flex;
121
- flex-shrink: 0;
122
- flex-direction: row;
123
- align-items: stretch;
124
- padding-inline-start: awsui.$space-m;
125
-
126
- // Expand height of utilies fully so that the dropdown is anchored directly underneath it.
127
- block-size: 100%;
128
-
129
- .medium > .padding-box > &,
130
- .narrow > .padding-box > & {
131
- padding-inline-start: 0;
132
- }
133
- }
134
-
135
- .utility-wrapper {
136
- display: flex;
137
- position: relative;
138
- flex-shrink: 0;
139
- align-items: center;
140
-
141
- &::after {
142
- display: block;
143
- position: absolute;
144
- content: '';
145
-
146
- inline-size: 1px;
147
- inset-inline-end: 0;
148
- inset-block: awsui.$space-s;
149
-
150
- background: awsui.$color-border-divider-default;
151
- }
152
-
153
- &.utility-wrapper-last:not(.utility-type-button-primary-button) {
154
- padding-inline-end: 0;
155
-
156
- &::after {
157
- display: none;
158
- }
159
- }
160
-
161
- .medium > .padding-box > .utilities > &::after,
162
- .narrow > .padding-box > .utilities > &::after {
163
- inset-block: awsui.$space-xs;
164
- }
165
- }
166
-
167
- .utility-wrapper-last {
168
- // Add appropriate space to the right for the last utility
169
- margin-inline-end: awsui.$space-s;
170
-
171
- &.utility-type-menu-dropdown {
172
- // Remove the margin in case of a dropdown, because it's added as padding to the trigger.
173
- // This makes sure that the dropdown trigger (and therefore the dropdown itself)
174
- // will expand completely to the right edge of the top nav.
175
- margin-inline-end: 0;
176
- }
177
-
178
- // Adjust spacing in the smaller variant
179
- .narrow > .padding-box > .utilities > & {
180
- margin-inline-end: 0;
181
-
182
- &.utility-type-button-primary-button {
183
- padding-inline-end: awsui.$space-l;
184
- }
185
- }
186
- }
187
-
188
- .utility-type-menu-dropdown {
189
- padding-block: 0;
190
- padding-inline: awsui.$space-s;
191
- align-items: stretch;
192
- }
193
-
194
- .utility-type-button-link,
195
- .utility-type-button-primary-button {
196
- padding-block: 0;
197
- padding-inline: awsui.$space-m;
198
- }
199
-
200
- .utility-type-button-primary-button {
201
- // Hide dividers around primary buttons.
202
- inset-inline-start: -1px;
203
- border-inline-start: 1px solid awsui.$color-background-container-content;
204
- &::after {
205
- display: none;
206
- }
207
- }
208
-
209
- .utility-link-icon {
210
- margin-inline-end: awsui.$space-xxs;
211
- }
212
-
213
- .utility-button-external-icon {
214
- display: inline-block;
215
- }
216
-
217
- .trigger {
218
- /*used in test-utils*/
219
- }
@@ -1,28 +0,0 @@
1
- import { ComponentWrapper, ElementWrapper } from '@cloudscape-design/test-utils-core/dom';
2
- import ButtonWrapper from '../../button';
3
- import ButtonDropdownWrapper from '../../button-dropdown';
4
- import LinkWrapper from '../../link';
5
- export default class TopNavigationWrapper extends ComponentWrapper {
6
- static rootSelector: string;
7
- findIdentityLink(): ElementWrapper;
8
- findLogo(): ElementWrapper | null;
9
- findTitle(): ElementWrapper | null;
10
- findSearch(): ElementWrapper | null;
11
- findUtilities(): Array<TopNavigationUtilityWrapper>;
12
- findUtility(index: number): TopNavigationUtilityWrapper | null;
13
- findSearchButton(): ElementWrapper | null;
14
- findOverflowMenuButtonDropdown(): MenuDropdownWrapper | null;
15
- }
16
- export declare class MenuDropdownWrapper extends ButtonDropdownWrapper {
17
- findNativeButton(): ElementWrapper<HTMLButtonElement>;
18
- }
19
- export declare class TopNavigationUtilityWrapper extends ComponentWrapper {
20
- findButtonLinkType(): LinkWrapper | null;
21
- findPrimaryButtonType(): ButtonWrapper | null;
22
- findMenuDropdownType(): TopNavigationMenuDropdownWrapper | null;
23
- }
24
- export declare class TopNavigationMenuDropdownWrapper extends ButtonDropdownWrapper {
25
- findNativeButton(): ElementWrapper<HTMLButtonElement>;
26
- findTitle(): ElementWrapper | null;
27
- findDescription(): ElementWrapper | null;
28
- }
@@ -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 dom_1 = require("@cloudscape-design/test-utils-core/dom");
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 dom_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 dom_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/dom/top-navigation/1.0-beta/index.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAE1F,yCAAyC;AACzC,2DAA0D;AAC1D,qCAAqC;AAErC,yFAAmF;AACnF,2GAAmG;AACnG,iGAA6E;AAE7E,MAAqB,oBAAqB,SAAQ,sBAAgB;IAGhE,gBAAgB;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,QAAQ,IAAI,CAAE,CAAC;IAC7C,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IACvC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IACxC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,6BAAM,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAC1E,CAAC,CAAC,EAAE,CAAC,IAAI,2BAA2B,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CACrD,CAAC;IACJ,CAAC;IAED,WAAW,CAAC,KAAa;QACvB,OAAO,IAAI,CAAC,aAAa,CACvB,IAAI,6BAAM,CAAC,iBAAiB,CAAC,wBAAwB,KAAK,GAAG,CAAC,IAAI,EAClE,2BAA2B,CAC5B,CAAC;IACJ,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,iBAAiB,CAAC,mCAAmC,CAAC,CAAC;IACrF,CAAC;IAED,8BAA8B;QAC5B,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAM,CAAC,OAAO,EAAE,EAAE,mBAAmB,CAAC,CAAC;IACvE,CAAC;;AAtCH,uCAuCC;AAtCQ,iCAAY,GAAG,GAAG,6BAAM,CAAC,gBAAgB,CAAC,SAAS,6BAAM,CAAC,MAAM,GAAG,CAAC;AAwC7E,MAAa,mBAAoB,SAAQ,yBAAqB;IAC5D,gBAAgB;QACd,qCAAqC;QACrC,OAAO,IAAI,CAAC,IAAI,CAAoB,UAAU,6BAAkB,CAAC,MAAM,EAAE,CAAE,CAAC;IAC9E,CAAC;CACF;AALD,kDAKC;AAED,MAAa,2BAA4B,SAAQ,sBAAgB;IAC/D,kBAAkB;QAChB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,cAAW,CAAC,YAAY,EAAE,EAAE,cAAW,CAAC,CAAC;IACzE,CAAC;IAED,qBAAqB;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,gBAAa,CAAC,YAAY,EAAE,EAAE,gBAAa,CAAC,CAAC;IAC7E,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,yBAAqB,CAAC,YAAY,EAAE,EAAE,gCAAgC,CAAC,CAAC;IACxG,CAAC;CACF;AAZD,kEAYC;AAED,MAAa,gCAAiC,SAAQ,yBAAqB;IACzE,gBAAgB;QACd,OAAO,IAAI,CAAC,IAAI,CAAoB,IAAI,6BAAkB,CAAC,MAAM,EAAE,CAAE,CAAC;IACxE,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAoB,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAoB,CAAC,WAAW,CAAC,CAAC;IAChE,CAAC;CACF;AAZD,4EAYC"}
@@ -1,28 +0,0 @@
1
- import { ComponentWrapper, ElementWrapper } from "@cloudscape-design/test-utils-core/selectors";
2
- import ButtonWrapper from '../../button';
3
- import ButtonDropdownWrapper from '../../button-dropdown';
4
- import LinkWrapper from '../../link';
5
- export default class TopNavigationWrapper extends ComponentWrapper {
6
- static rootSelector: string;
7
- findIdentityLink(): ElementWrapper;
8
- findLogo(): ElementWrapper;
9
- findTitle(): ElementWrapper;
10
- findSearch(): ElementWrapper;
11
- findUtilities(): import("@cloudscape-design/test-utils-core/selectors").MultiElementWrapper<TopNavigationUtilityWrapper>;
12
- findUtility(index: number): TopNavigationUtilityWrapper;
13
- findSearchButton(): ElementWrapper;
14
- findOverflowMenuButtonDropdown(): MenuDropdownWrapper;
15
- }
16
- export declare class MenuDropdownWrapper extends ButtonDropdownWrapper {
17
- findNativeButton(): ElementWrapper;
18
- }
19
- export declare class TopNavigationUtilityWrapper extends ComponentWrapper {
20
- findButtonLinkType(): LinkWrapper;
21
- findPrimaryButtonType(): ButtonWrapper;
22
- findMenuDropdownType(): TopNavigationMenuDropdownWrapper;
23
- }
24
- export declare class TopNavigationMenuDropdownWrapper extends ButtonDropdownWrapper {
25
- findNativeButton(): ElementWrapper;
26
- findTitle(): ElementWrapper;
27
- findDescription(): ElementWrapper;
28
- }
@@ -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,CAAC,CAAC;IACxC,CAAC;IACD,aAAa;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,6BAAM,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,2BAA2B,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACrI,CAAC;IACD,WAAW,CAAC,KAAa;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAM,CAAC,iBAAiB,CAAC,wBAAwB,KAAK,GAAG,CAAC,IAAI,EAAE,2BAA2B,CAAC,CAAC;IAC7H,CAAC;IACD,gBAAgB;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,iBAAiB,CAAC,mCAAmC,CAAC,CAAC;IACrF,CAAC;IACD,8BAA8B;QAC5B,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAM,CAAC,OAAO,EAAE,EAAE,mBAAmB,CAAC,CAAC;IACvE,CAAC;;AAzBH,uCA0BC;AAzBQ,iCAAY,GAAG,GAAG,6BAAM,CAAC,gBAAgB,CAAC,SAAS,6BAAM,CAAC,MAAM,GAAG,CAAC;AA0B7E,MAAa,mBAAoB,SAAQ,yBAAqB;IAC5D,gBAAgB;QACd,qCAAqC;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,6BAAkB,CAAC,MAAM,EAAE,CAAE,CAAC;IAC3D,CAAC;CACF;AALD,kDAKC;AACD,MAAa,2BAA4B,SAAQ,4BAAgB;IAC/D,kBAAkB;QAChB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,cAAW,CAAC,YAAY,EAAE,EAAE,cAAW,CAAC,CAAC;IACzE,CAAC;IACD,qBAAqB;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,gBAAa,CAAC,YAAY,EAAE,EAAE,gBAAa,CAAC,CAAC;IAC7E,CAAC;IACD,oBAAoB;QAClB,OAAO,IAAI,CAAC,aAAa,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,10 +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({ utilities, ...restProps }: TopNavigationProps): JSX.Element;
10
- //# sourceMappingURL=index.d.ts.map
@@ -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,103 +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
- }
103
- //# sourceMappingURL=interfaces.d.ts.map
@@ -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,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=interfaces.js.map
@@ -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,7 +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({ __internalRootRef, identity, i18nStrings, utilities, search, ...restProps }: InternalTopNavigationProps): JSX.Element;
6
- export {};
7
- //# sourceMappingURL=internal.d.ts.map
@@ -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"}