@cloudscape-design/components 3.0.1043 → 3.0.1045

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 (58) hide show
  1. package/button-dropdown/internal.d.ts.map +1 -1
  2. package/button-dropdown/internal.js +2 -2
  3. package/button-dropdown/internal.js.map +1 -1
  4. package/flashbar/collapsible-flashbar.d.ts.map +1 -1
  5. package/flashbar/collapsible-flashbar.js +23 -10
  6. package/flashbar/collapsible-flashbar.js.map +1 -1
  7. package/flashbar/common.d.ts +3 -0
  8. package/flashbar/common.d.ts.map +1 -1
  9. package/flashbar/common.js +50 -1
  10. package/flashbar/common.js.map +1 -1
  11. package/flashbar/flash.d.ts +3 -0
  12. package/flashbar/flash.d.ts.map +1 -1
  13. package/flashbar/flash.js +40 -18
  14. package/flashbar/flash.js.map +1 -1
  15. package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  16. package/flashbar/non-collapsible-flashbar.js +14 -2
  17. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  18. package/internal/base-component/styles.scoped.css +1 -1
  19. package/internal/components/button-trigger/styles.css.js +13 -13
  20. package/internal/components/button-trigger/styles.scoped.css +36 -31
  21. package/internal/components/button-trigger/styles.selectors.js +13 -13
  22. package/internal/environment.js +2 -2
  23. package/internal/environment.json +2 -2
  24. package/internal/manifest.json +1 -1
  25. package/package.json +1 -2
  26. package/test-utils/dom/top-navigation/1.0-beta/index.d.ts +0 -28
  27. package/test-utils/dom/top-navigation/1.0-beta/index.js +0 -72
  28. package/test-utils/dom/top-navigation/1.0-beta/index.js.map +0 -1
  29. package/test-utils/selectors/top-navigation/1.0-beta/index.d.ts +0 -28
  30. package/test-utils/selectors/top-navigation/1.0-beta/index.js +0 -72
  31. package/test-utils/selectors/top-navigation/1.0-beta/index.js.map +0 -1
  32. package/top-navigation/1.0-beta/index.d.ts +0 -12
  33. package/top-navigation/1.0-beta/index.d.ts.map +0 -1
  34. package/top-navigation/1.0-beta/index.js +0 -19
  35. package/top-navigation/1.0-beta/index.js.map +0 -1
  36. package/top-navigation/1.0-beta/interfaces.d.ts +0 -102
  37. package/top-navigation/1.0-beta/interfaces.d.ts.map +0 -1
  38. package/top-navigation/1.0-beta/interfaces.js +0 -2
  39. package/top-navigation/1.0-beta/interfaces.js.map +0 -1
  40. package/top-navigation/1.0-beta/internal.d.ts +0 -13
  41. package/top-navigation/1.0-beta/internal.d.ts.map +0 -1
  42. package/top-navigation/1.0-beta/internal.js +0 -93
  43. package/top-navigation/1.0-beta/internal.js.map +0 -1
  44. package/top-navigation/1.0-beta/parts/overflow-menu.d.ts +0 -20
  45. package/top-navigation/1.0-beta/parts/overflow-menu.d.ts.map +0 -1
  46. package/top-navigation/1.0-beta/parts/overflow-menu.js +0 -54
  47. package/top-navigation/1.0-beta/parts/overflow-menu.js.map +0 -1
  48. package/top-navigation/1.0-beta/parts/utility.d.ts +0 -14
  49. package/top-navigation/1.0-beta/parts/utility.d.ts.map +0 -1
  50. package/top-navigation/1.0-beta/parts/utility.js +0 -56
  51. package/top-navigation/1.0-beta/parts/utility.js.map +0 -1
  52. package/top-navigation/1.0-beta/styles.css.js +0 -28
  53. package/top-navigation/1.0-beta/styles.scoped.css +0 -360
  54. package/top-navigation/1.0-beta/styles.selectors.js +0 -29
  55. package/top-navigation/1.0-beta/use-top-navigation.d.ts +0 -29
  56. package/top-navigation/1.0-beta/use-top-navigation.d.ts.map +0 -1
  57. package/top-navigation/1.0-beta/use-top-navigation.js +0 -154
  58. package/top-navigation/1.0-beta/use-top-navigation.js.map +0 -1
@@ -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,YAAmC,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAGlD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAStC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAgB;;IAC5F,MAAM,cAAc,GAAG,QAAQ,IAAI,CAAC,UAAU,CAAC,mBAAmB,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IAC1F,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,SAAS,mCAAI,UAAU,CAAC,IAAI,CAAC;IAE1D,IAAI,UAAU,CAAC,IAAI,KAAK,QAAQ,EAAE;QAChC,YAAY,CAAC,eAAe,EAAE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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
-
@@ -1,360 +0,0 @@
1
- /*
2
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- SPDX-License-Identifier: Apache-2.0
4
- */
5
- /*
6
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
- SPDX-License-Identifier: Apache-2.0
8
- */
9
- /*
10
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
11
- SPDX-License-Identifier: Apache-2.0
12
- */
13
- /*
14
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
15
- SPDX-License-Identifier: Apache-2.0
16
- */
17
- /*
18
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
19
- SPDX-License-Identifier: Apache-2.0
20
- */
21
- /*
22
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
23
- SPDX-License-Identifier: Apache-2.0
24
- */
25
- /*
26
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
27
- SPDX-License-Identifier: Apache-2.0
28
- */
29
- /*
30
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
31
- SPDX-License-Identifier: Apache-2.0
32
- */
33
- /*
34
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
35
- SPDX-License-Identifier: Apache-2.0
36
- */
37
- /*
38
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
39
- SPDX-License-Identifier: Apache-2.0
40
- */
41
- /*
42
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
43
- SPDX-License-Identifier: Apache-2.0
44
- */
45
- /*
46
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
47
- SPDX-License-Identifier: Apache-2.0
48
- */
49
- /*
50
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
51
- SPDX-License-Identifier: Apache-2.0
52
- */
53
- /*
54
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
55
- SPDX-License-Identifier: Apache-2.0
56
- */
57
- /*
58
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
59
- SPDX-License-Identifier: Apache-2.0
60
- */
61
- /*
62
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
63
- SPDX-License-Identifier: Apache-2.0
64
- */
65
- /*
66
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
67
- SPDX-License-Identifier: Apache-2.0
68
- */
69
- /*
70
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
71
- SPDX-License-Identifier: Apache-2.0
72
- */
73
- /*
74
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
75
- SPDX-License-Identifier: Apache-2.0
76
- */
77
- /*
78
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
79
- SPDX-License-Identifier: Apache-2.0
80
- */
81
- /*
82
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
83
- SPDX-License-Identifier: Apache-2.0
84
- */
85
- /*
86
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
87
- SPDX-License-Identifier: Apache-2.0
88
- */
89
- /*
90
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
- SPDX-License-Identifier: Apache-2.0
92
- */
93
- /*
94
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
- SPDX-License-Identifier: Apache-2.0
96
- */
97
- /*
98
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
99
- SPDX-License-Identifier: Apache-2.0
100
- */
101
- /*
102
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
103
- SPDX-License-Identifier: Apache-2.0
104
- */
105
- /*
106
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
107
- SPDX-License-Identifier: Apache-2.0
108
- */
109
- /*
110
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
111
- SPDX-License-Identifier: Apache-2.0
112
- */
113
- /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
114
- /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
115
- /*
116
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
117
- SPDX-License-Identifier: Apache-2.0
118
- */
119
- /*
120
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
121
- SPDX-License-Identifier: Apache-2.0
122
- */
123
- /*
124
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
125
- SPDX-License-Identifier: Apache-2.0
126
- */
127
- /*
128
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
129
- SPDX-License-Identifier: Apache-2.0
130
- */
131
- /*
132
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
133
- SPDX-License-Identifier: Apache-2.0
134
- */
135
- /*
136
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
137
- SPDX-License-Identifier: Apache-2.0
138
- */
139
- /*
140
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
141
- SPDX-License-Identifier: Apache-2.0
142
- */
143
- /* Style used for links in slots/components that are text heavy, to help links stand out among
144
- surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
- .awsui_top-navigation_1ca1i_scbs0_145:not(#\9) {
146
- border-collapse: separate;
147
- border-spacing: 0;
148
- box-sizing: border-box;
149
- caption-side: top;
150
- cursor: auto;
151
- direction: inherit;
152
- empty-cells: show;
153
- font-family: serif;
154
- font-style: normal;
155
- font-variant: normal;
156
- font-stretch: normal;
157
- hyphens: none;
158
- letter-spacing: normal;
159
- list-style: disc outside none;
160
- tab-size: 8;
161
- text-align: start;
162
- text-indent: 0;
163
- text-shadow: none;
164
- text-transform: none;
165
- visibility: visible;
166
- white-space: normal;
167
- word-spacing: normal;
168
- font-size: var(--font-size-body-m-a7nh2n, 14px);
169
- line-height: var(--line-height-body-m-2mh3ke, 20px);
170
- color: var(--color-text-body-default-vvtq8u, #0f141a);
171
- font-weight: 400;
172
- font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
173
- -webkit-font-smoothing: auto;
174
- -moz-osx-font-smoothing: auto;
175
- background: var(--color-background-container-content-6u8rvp, #ffffff);
176
- }
177
- .awsui_top-navigation_1ca1i_scbs0_145 > .awsui_padding-box_1ca1i_scbs0_177:not(#\9) {
178
- display: flex;
179
- flex-direction: row;
180
- flex-wrap: nowrap;
181
- justify-content: space-between;
182
- align-items: center;
183
- box-sizing: border-box;
184
- block-size: calc(var(--space-xxxl-aut1u7, 40px) + var(--space-scaled-m-m892r9, 16px));
185
- padding-block: 0;
186
- padding-inline-start: var(--space-l-2ud1p3, 20px);
187
- padding-inline-end: 0;
188
- }
189
- .awsui_top-navigation_1ca1i_scbs0_145.awsui_medium_1ca1i_scbs0_189 > .awsui_padding-box_1ca1i_scbs0_177:not(#\9), .awsui_top-navigation_1ca1i_scbs0_145.awsui_narrow_1ca1i_scbs0_189 > .awsui_padding-box_1ca1i_scbs0_177:not(#\9) {
190
- block-size: calc(var(--space-xxxl-aut1u7, 40px) + var(--space-scaled-xs-xwoogq, 8px));
191
- }
192
- .awsui_top-navigation_1ca1i_scbs0_145.awsui_narrow_1ca1i_scbs0_189 > .awsui_padding-box_1ca1i_scbs0_177:not(#\9) {
193
- block-size: var(--space-xxxl-aut1u7, 40px);
194
- padding-block: 0;
195
- padding-inline-start: var(--space-xs-ymlm0b, 8px);
196
- padding-inline-end: 0;
197
- }
198
-
199
- .awsui_hidden_1ca1i_scbs0_199:not(#\9) {
200
- position: absolute !important;
201
- inset-block-start: -9999px !important;
202
- inset-inline-start: -9999px !important;
203
- visibility: hidden;
204
- inline-size: 9000px;
205
- }
206
-
207
- /* stylelint-disable-next-line selector-combinator-disallowed-list, selector-max-universal */
208
- .awsui_hidden_1ca1i_scbs0_199 *:not(#\9):not(#awsui_\9 _1ca1i_scbs0_1) {
209
- visibility: hidden;
210
- }
211
-
212
- .awsui_identity_1ca1i_scbs0_212 > .awsui_identity-link_1ca1i_scbs0_212:not(#\9) {
213
- display: flex;
214
- align-items: center;
215
- text-decoration: none;
216
- color: var(--color-text-top-navigation-title-en0v40, #0f141a);
217
- }
218
- .awsui_identity_1ca1i_scbs0_212 > .awsui_identity-link_1ca1i_scbs0_212:not(#\9):hover {
219
- color: var(--color-text-accent-n1kmht, #006ce0);
220
- }
221
- body[data-awsui-focus-visible=true] .awsui_identity_1ca1i_scbs0_212 > .awsui_identity-link_1ca1i_scbs0_212:not(#\9):focus {
222
- outline: thin dotted;
223
- outline: var(--border-link-focus-ring-outline-1p0hnu, 0);
224
- outline-offset: 2px;
225
- outline-color: var(--color-border-item-focused-uk47pl, #006ce0);
226
- border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
227
- border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
228
- border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
229
- border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
230
- box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-39uvxr, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
231
- }
232
- .awsui_identity_1ca1i_scbs0_212.awsui_no-logo_1ca1i_scbs0_232:not(#\9) {
233
- min-inline-size: 100px;
234
- }
235
-
236
- .awsui_logo_1ca1i_scbs0_236:not(#\9) {
237
- display: block;
238
- max-block-size: var(--space-xxl-32srm4, 32px);
239
- margin-inline-start: var(--space-s-tvghoh, 12px);
240
- inline-size: auto;
241
- min-inline-size: 10px;
242
- }
243
- .awsui_logo_1ca1i_scbs0_236.awsui_narrow_1ca1i_scbs0_189:not(#\9) {
244
- max-block-size: var(--space-xl-jfy3x4, 24px);
245
- }
246
-
247
- .awsui_title_1ca1i_scbs0_247:not(#\9) {
248
- font-size: var(--font-size-heading-m-170yiy, 18px);
249
- line-height: var(--line-height-heading-m-uoaqdh, 22px);
250
- letter-spacing: var(--letter-spacing-heading-m-29ewnk, -0.01em);
251
- font-weight: var(--font-weight-heading-m-zf82dr, 700);
252
- -webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
253
- -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
254
- margin-inline-start: var(--space-s-tvghoh, 12px);
255
- white-space: nowrap;
256
- overflow: hidden;
257
- text-overflow: ellipsis;
258
- }
259
- .awsui_no-logo_1ca1i_scbs0_232 > .awsui_identity-link_1ca1i_scbs0_212 > .awsui_title_1ca1i_scbs0_247:not(#\9) {
260
- font-weight: 700;
261
- }
262
-
263
- .awsui_inputs_1ca1i_scbs0_263:not(#\9) {
264
- flex: 1;
265
- min-inline-size: 0;
266
- display: flex;
267
- justify-content: center;
268
- }
269
-
270
- .awsui_search_1ca1i_scbs0_270:not(#\9) {
271
- inline-size: 100%;
272
- max-inline-size: 340px;
273
- padding-inline-start: var(--space-xxxl-aut1u7, 40px);
274
- }
275
- .awsui_search-expanded_1ca1i_scbs0_275:not(#\9) {
276
- max-inline-size: none;
277
- padding-inline-start: var(--space-s-tvghoh, 12px);
278
- }
279
-
280
- .awsui_utilities_1ca1i_scbs0_280:not(#\9) {
281
- display: flex;
282
- flex-shrink: 0;
283
- flex-direction: row;
284
- align-items: stretch;
285
- padding-inline-start: var(--space-m-dsumyt, 16px);
286
- block-size: 100%;
287
- }
288
- .awsui_medium_1ca1i_scbs0_189 > .awsui_padding-box_1ca1i_scbs0_177 > .awsui_utilities_1ca1i_scbs0_280:not(#\9), .awsui_narrow_1ca1i_scbs0_189 > .awsui_padding-box_1ca1i_scbs0_177 > .awsui_utilities_1ca1i_scbs0_280:not(#\9) {
289
- padding-inline-start: 0;
290
- }
291
-
292
- .awsui_utility-wrapper_1ca1i_scbs0_292:not(#\9) {
293
- display: flex;
294
- position: relative;
295
- flex-shrink: 0;
296
- align-items: center;
297
- }
298
- .awsui_utility-wrapper_1ca1i_scbs0_292:not(#\9)::after {
299
- display: block;
300
- position: absolute;
301
- content: "";
302
- inline-size: 1px;
303
- inset-inline-end: 0;
304
- inset-block: var(--space-s-tvghoh, 12px);
305
- background: var(--color-border-divider-default-nr68jt, #c6c6cd);
306
- }
307
- .awsui_utility-wrapper_1ca1i_scbs0_292.awsui_utility-wrapper-last_1ca1i_scbs0_307:not(#\9):not(.awsui_utility-type-button-primary-button_1ca1i_scbs0_307) {
308
- padding-inline-end: 0;
309
- }
310
- .awsui_utility-wrapper_1ca1i_scbs0_292.awsui_utility-wrapper-last_1ca1i_scbs0_307:not(#\9):not(.awsui_utility-type-button-primary-button_1ca1i_scbs0_307)::after {
311
- display: none;
312
- }
313
- .awsui_medium_1ca1i_scbs0_189 > .awsui_padding-box_1ca1i_scbs0_177 > .awsui_utilities_1ca1i_scbs0_280 > .awsui_utility-wrapper_1ca1i_scbs0_292:not(#\9)::after, .awsui_narrow_1ca1i_scbs0_189 > .awsui_padding-box_1ca1i_scbs0_177 > .awsui_utilities_1ca1i_scbs0_280 > .awsui_utility-wrapper_1ca1i_scbs0_292:not(#\9)::after {
314
- inset-block: var(--space-xs-ymlm0b, 8px);
315
- }
316
-
317
- .awsui_utility-wrapper-last_1ca1i_scbs0_307:not(#\9) {
318
- margin-inline-end: var(--space-s-tvghoh, 12px);
319
- }
320
- .awsui_utility-wrapper-last_1ca1i_scbs0_307.awsui_utility-type-menu-dropdown_1ca1i_scbs0_320:not(#\9) {
321
- margin-inline-end: 0;
322
- }
323
- .awsui_narrow_1ca1i_scbs0_189 > .awsui_padding-box_1ca1i_scbs0_177 > .awsui_utilities_1ca1i_scbs0_280 > .awsui_utility-wrapper-last_1ca1i_scbs0_307:not(#\9) {
324
- margin-inline-end: 0;
325
- }
326
- .awsui_narrow_1ca1i_scbs0_189 > .awsui_padding-box_1ca1i_scbs0_177 > .awsui_utilities_1ca1i_scbs0_280 > .awsui_utility-wrapper-last_1ca1i_scbs0_307.awsui_utility-type-button-primary-button_1ca1i_scbs0_307:not(#\9) {
327
- padding-inline-end: var(--space-l-2ud1p3, 20px);
328
- }
329
-
330
- .awsui_utility-type-menu-dropdown_1ca1i_scbs0_320:not(#\9) {
331
- padding-block: 0;
332
- padding-inline: var(--space-s-tvghoh, 12px);
333
- align-items: stretch;
334
- }
335
-
336
- .awsui_utility-type-button-link_1ca1i_scbs0_336:not(#\9),
337
- .awsui_utility-type-button-primary-button_1ca1i_scbs0_307:not(#\9) {
338
- padding-block: 0;
339
- padding-inline: var(--space-m-dsumyt, 16px);
340
- }
341
-
342
- .awsui_utility-type-button-primary-button_1ca1i_scbs0_307:not(#\9) {
343
- inset-inline-start: -1px;
344
- border-inline-start: 1px solid var(--color-background-container-content-6u8rvp, #ffffff);
345
- }
346
- .awsui_utility-type-button-primary-button_1ca1i_scbs0_307:not(#\9)::after {
347
- display: none;
348
- }
349
-
350
- .awsui_utility-link-icon_1ca1i_scbs0_350:not(#\9) {
351
- margin-inline-end: var(--space-xxs-hwfkai, 4px);
352
- }
353
-
354
- .awsui_utility-button-external-icon_1ca1i_scbs0_354:not(#\9) {
355
- display: inline-block;
356
- }
357
-
358
- .awsui_trigger_1ca1i_scbs0_358:not(#\9) {
359
- /*used in test-utils*/
360
- }
@@ -1,29 +0,0 @@
1
-
2
- // es-module interop with Babel and Typescript
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- module.exports.default = {
5
- "top-navigation": "awsui_top-navigation_1ca1i_scbs0_145",
6
- "padding-box": "awsui_padding-box_1ca1i_scbs0_177",
7
- "medium": "awsui_medium_1ca1i_scbs0_189",
8
- "narrow": "awsui_narrow_1ca1i_scbs0_189",
9
- "hidden": "awsui_hidden_1ca1i_scbs0_199",
10
- "\t": "awsui_\t_1ca1i_scbs0_1",
11
- "identity": "awsui_identity_1ca1i_scbs0_212",
12
- "identity-link": "awsui_identity-link_1ca1i_scbs0_212",
13
- "no-logo": "awsui_no-logo_1ca1i_scbs0_232",
14
- "logo": "awsui_logo_1ca1i_scbs0_236",
15
- "title": "awsui_title_1ca1i_scbs0_247",
16
- "inputs": "awsui_inputs_1ca1i_scbs0_263",
17
- "search": "awsui_search_1ca1i_scbs0_270",
18
- "search-expanded": "awsui_search-expanded_1ca1i_scbs0_275",
19
- "utilities": "awsui_utilities_1ca1i_scbs0_280",
20
- "utility-wrapper": "awsui_utility-wrapper_1ca1i_scbs0_292",
21
- "utility-wrapper-last": "awsui_utility-wrapper-last_1ca1i_scbs0_307",
22
- "utility-type-button-primary-button": "awsui_utility-type-button-primary-button_1ca1i_scbs0_307",
23
- "utility-type-menu-dropdown": "awsui_utility-type-menu-dropdown_1ca1i_scbs0_320",
24
- "utility-type-button-link": "awsui_utility-type-button-link_1ca1i_scbs0_336",
25
- "utility-link-icon": "awsui_utility-link-icon_1ca1i_scbs0_350",
26
- "utility-button-external-icon": "awsui_utility-button-external-icon_1ca1i_scbs0_354",
27
- "trigger": "awsui_trigger_1ca1i_scbs0_358"
28
- };
29
-
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { TopNavigationProps } from './interfaces';
3
- interface UseTopNavigationParams {
4
- __internalRootRef?: React.MutableRefObject<HTMLElement> | null;
5
- identity: TopNavigationProps['identity'];
6
- search: TopNavigationProps['search'];
7
- utilities: NonNullable<TopNavigationProps['utilities']>;
8
- }
9
- interface ResponsiveState {
10
- hideUtilityText?: boolean;
11
- hideSearch?: boolean;
12
- hideUtilities?: number[];
13
- hideTitle?: boolean;
14
- }
15
- interface UseTopNavigation {
16
- ref: React.Ref<HTMLDivElement>;
17
- virtualRef: React.Ref<HTMLDivElement>;
18
- responsiveState: ResponsiveState;
19
- breakpoint: 'default' | 'xxs' | 's';
20
- isSearchExpanded: boolean;
21
- onSearchUtilityClick: () => void;
22
- }
23
- export declare function useTopNavigation({
24
- __internalRootRef: mainRef,
25
- identity,
26
- search,
27
- utilities
28
- }: UseTopNavigationParams): UseTopNavigation;
29
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-top-navigation.d.ts","sourceRoot":"","sources":["../../../../src/top-navigation/1.0-beta/use-top-navigation.ts"],"names":[],"mappings":"AAEA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAMpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIlD,UAAU,sBAAsB;IAC9B,iBAAiB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IAC/D,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrC,SAAS,EAAE,WAAW,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC;CACzD;AAED,UAAU,eAAe;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAeD,UAAU,gBAAgB;IACxB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC/B,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEtC,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,SAAS,GAAG,KAAK,GAAG,GAAG,CAAC;IACpC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,MAAM,IAAI,CAAC;CAClC;AAKD,wBAAgB,gBAAgB,CAAC,EAC/B,iBAAiB,EAAE,OAAO,EAC1B,QAAQ,EACR,MAAM,EACN,SAAS,GACV,EAAE,sBAAsB,GAAG,gBAAgB,CA0F3C"}