@cloudscape-design/components-themeable 3.0.349 → 3.0.351

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/app-layout/constants.scss +3 -8
  3. package/lib/internal/scss/app-layout/drawer/styles.scss +26 -35
  4. package/lib/internal/scss/app-layout/mobile-toolbar/styles.scss +9 -22
  5. package/lib/internal/scss/app-layout/toggles/styles.scss +18 -0
  6. package/lib/internal/scss/table/body-cell/styles.scss +27 -8
  7. package/lib/internal/template/alert/index.d.ts.map +1 -1
  8. package/lib/internal/template/alert/index.js +36 -1
  9. package/lib/internal/template/alert/index.js.map +1 -1
  10. package/lib/internal/template/app-layout/drawer/index.js +6 -5
  11. package/lib/internal/template/app-layout/drawer/index.js.map +1 -1
  12. package/lib/internal/template/app-layout/drawer/interfaces.d.ts +6 -3
  13. package/lib/internal/template/app-layout/drawer/interfaces.d.ts.map +1 -1
  14. package/lib/internal/template/app-layout/drawer/interfaces.js.map +1 -1
  15. package/lib/internal/template/app-layout/drawer/styles.css.js +10 -10
  16. package/lib/internal/template/app-layout/drawer/styles.scoped.css +32 -35
  17. package/lib/internal/template/app-layout/drawer/styles.selectors.js +10 -10
  18. package/lib/internal/template/app-layout/mobile-toolbar/index.d.ts.map +1 -1
  19. package/lib/internal/template/app-layout/mobile-toolbar/index.js +6 -5
  20. package/lib/internal/template/app-layout/mobile-toolbar/index.js.map +1 -1
  21. package/lib/internal/template/app-layout/mobile-toolbar/styles.css.js +8 -6
  22. package/lib/internal/template/app-layout/mobile-toolbar/styles.scoped.css +11 -23
  23. package/lib/internal/template/app-layout/mobile-toolbar/styles.selectors.js +8 -6
  24. package/lib/internal/template/app-layout/toggles/index.d.ts +3 -1
  25. package/lib/internal/template/app-layout/toggles/index.d.ts.map +1 -1
  26. package/lib/internal/template/app-layout/toggles/index.js +6 -3
  27. package/lib/internal/template/app-layout/toggles/index.js.map +1 -1
  28. package/lib/internal/template/app-layout/toggles/interfaces.d.ts +3 -2
  29. package/lib/internal/template/app-layout/toggles/interfaces.d.ts.map +1 -1
  30. package/lib/internal/template/app-layout/toggles/interfaces.js.map +1 -1
  31. package/lib/internal/template/app-layout/toggles/styles.css.js +2 -1
  32. package/lib/internal/template/app-layout/toggles/styles.scoped.css +31 -1
  33. package/lib/internal/template/app-layout/toggles/styles.selectors.js +2 -1
  34. package/lib/internal/template/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  35. package/lib/internal/template/app-layout/visual-refresh/drawers.js +2 -2
  36. package/lib/internal/template/app-layout/visual-refresh/drawers.js.map +1 -1
  37. package/lib/internal/template/app-layout/visual-refresh/trigger-button.d.ts +1 -0
  38. package/lib/internal/template/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
  39. package/lib/internal/template/app-layout/visual-refresh/trigger-button.js +2 -2
  40. package/lib/internal/template/app-layout/visual-refresh/trigger-button.js.map +1 -1
  41. package/lib/internal/template/internal/analytics/components/analytics-funnel.js +2 -2
  42. package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
  43. package/lib/internal/template/internal/analytics/hooks/use-funnel.js +1 -1
  44. package/lib/internal/template/internal/analytics/hooks/use-funnel.js.map +1 -1
  45. package/lib/internal/template/internal/base-component/styles.scoped.css +0 -11
  46. package/lib/internal/template/internal/environment.js +1 -1
  47. package/lib/internal/template/internal/generated/theming/index.cjs +0 -27
  48. package/lib/internal/template/internal/generated/theming/index.js +0 -27
  49. package/lib/internal/template/table/body-cell/index.d.ts.map +1 -1
  50. package/lib/internal/template/table/body-cell/index.js +22 -3
  51. package/lib/internal/template/table/body-cell/index.js.map +1 -1
  52. package/lib/internal/template/table/body-cell/styles.css.js +28 -28
  53. package/lib/internal/template/table/body-cell/styles.scoped.css +93 -77
  54. package/lib/internal/template/table/body-cell/styles.selectors.js +28 -28
  55. package/lib/internal/template/test-utils/dom/app-layout/index.d.ts +1 -0
  56. package/lib/internal/template/test-utils/dom/app-layout/index.js +3 -0
  57. package/lib/internal/template/test-utils/dom/app-layout/index.js.map +1 -1
  58. package/lib/internal/template/test-utils/selectors/app-layout/index.d.ts +1 -0
  59. package/lib/internal/template/test-utils/selectors/app-layout/index.js +3 -0
  60. package/lib/internal/template/test-utils/selectors/app-layout/index.js.map +1 -1
  61. package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +1 -1
@@ -94,79 +94,76 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
94
94
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
95
  SPDX-License-Identifier: Apache-2.0
96
96
  */
97
- .awsui_toggle_1uo6m_dsezo_97:not(#\9) {
97
+ .awsui_toggle_1uo6m_1fg2f_97:not(#\9) {
98
98
  box-sizing: border-box;
99
99
  padding: var(--space-xxs-xx079q, 4px) 7px;
100
100
  }
101
101
 
102
- .awsui_drawer-triggers_1uo6m_dsezo_102:not(#\9) {
102
+ .awsui_drawer-triggers_1uo6m_1fg2f_102:not(#\9) {
103
103
  box-sizing: border-box;
104
104
  }
105
105
 
106
- .awsui_drawer_1uo6m_dsezo_102:not(#\9) {
106
+ .awsui_drawer_1uo6m_1fg2f_102:not(#\9) {
107
107
  flex-shrink: 0;
108
108
  position: relative;
109
109
  word-wrap: break-word;
110
110
  box-shadow: var(--shadow-panel-5eimfm, 0 1px 1px 0 rgba(0, 28, 36, 0.3), 1px 1px 1px 0 rgba(0, 28, 36, 0.15), -1px 1px 1px 0 rgba(0, 28, 36, 0.15));
111
111
  }
112
- .awsui_drawer_1uo6m_dsezo_102:not(#\9):not(.awsui_drawer-mobile_1uo6m_dsezo_112) {
112
+ .awsui_drawer_1uo6m_1fg2f_102:not(#\9):not(.awsui_drawer-mobile_1uo6m_1fg2f_112) {
113
113
  z-index: 830;
114
114
  }
115
- .awsui_drawer-closed_1uo6m_dsezo_115:not(#\9) {
115
+ .awsui_drawer-closed_1uo6m_1fg2f_115:not(#\9) {
116
116
  min-width: 40px;
117
- cursor: pointer;
118
117
  }
119
- .awsui_drawer-closed_1uo6m_dsezo_115.awsui_drawer-mobile_1uo6m_dsezo_112:not(#\9) {
118
+ .awsui_drawer-closed_1uo6m_1fg2f_115.awsui_drawer-mobile_1uo6m_1fg2f_112:not(#\9) {
120
119
  display: none;
121
120
  }
122
121
 
123
- .awsui_drawer-content_1uo6m_dsezo_123:not(#\9) {
122
+ .awsui_drawer-content_1uo6m_1fg2f_122:not(#\9) {
124
123
  position: fixed;
125
124
  overflow: auto;
126
125
  background-color: var(--color-background-layout-panel-content-jx4wcr, #ffffff);
127
126
  }
128
- .awsui_drawer-mobile_1uo6m_dsezo_112 > .awsui_drawer-content_1uo6m_dsezo_123:not(#\9) {
127
+ .awsui_drawer-mobile_1uo6m_1fg2f_112 > .awsui_drawer-content_1uo6m_1fg2f_122:not(#\9) {
129
128
  z-index: 1001;
130
129
  top: 0;
131
130
  bottom: 0;
132
131
  left: 0;
133
132
  right: 0;
134
133
  }
135
- .awsui_drawer-closed_1uo6m_dsezo_115 > .awsui_drawer-content_1uo6m_dsezo_123:not(#\9) {
134
+ .awsui_drawer-closed_1uo6m_1fg2f_115 > .awsui_drawer-content_1uo6m_1fg2f_122:not(#\9) {
136
135
  width: 40px;
137
136
  }
138
- .awsui_drawer-closed_1uo6m_dsezo_115 > .awsui_drawer-content_1uo6m_dsezo_123:not(#\9):hover {
139
- background: var(--color-background-layout-panel-hover-yn48lk, #eaeded);
137
+ .awsui_drawer-closed_1uo6m_1fg2f_115 > .awsui_drawer-content_1uo6m_1fg2f_122.awsui_drawer-content-clickable_1uo6m_1fg2f_137:not(#\9) {
138
+ cursor: pointer;
139
+ color: var(--color-text-interactive-default-9x433a, #545b64);
140
140
  }
141
- .awsui_drawer-closed_1uo6m_dsezo_115 > .awsui_drawer-content_1uo6m_dsezo_123.awsui_non-interactive_1uo6m_dsezo_141:not(#\9):hover {
142
- background: var(--color-background-layout-panel-content-jx4wcr, #ffffff);
143
- cursor: default;
141
+ .awsui_drawer-closed_1uo6m_1fg2f_115 > .awsui_drawer-content_1uo6m_1fg2f_122.awsui_drawer-content-clickable_1uo6m_1fg2f_137:not(#\9):hover {
142
+ background: var(--color-background-layout-panel-hover-yn48lk, #eaeded);
144
143
  }
145
- .awsui_drawer-content_1uo6m_dsezo_123 > [aria-hidden=true]:not(#\9) {
144
+ .awsui_drawer-content_1uo6m_1fg2f_122 > [aria-hidden=true]:not(#\9) {
146
145
  display: none;
147
146
  }
148
147
 
149
- .awsui_drawer-content_1uo6m_dsezo_123 > .awsui_drawer-triggers_1uo6m_dsezo_102 > .awsui_trigger_1uo6m_dsezo_149:not(#\9) {
150
- background: var(--color-background-layout-toggle-default-ra31l6, transparent);
151
- border: 0;
152
- border-radius: 0;
153
- color: var(--color-text-layout-toggle-hg4zdn, #545b64);
154
- padding: var(--space-scaled-xs-sg3tfb, 8px) var(--space-s-o95p2n, 12px);
155
- margin-top: 1px;
156
- }
157
- .awsui_drawer-content_1uo6m_dsezo_123 > .awsui_drawer-triggers_1uo6m_dsezo_102 > .awsui_trigger_1uo6m_dsezo_149:not(#\9):not(:last-child) {
158
- box-shadow: 0px 1px var(--color-shadow-layout-toggle-67ezos, #d5dbdb);
159
- }
160
- .awsui_drawer-content_1uo6m_dsezo_123 > .awsui_drawer-triggers_1uo6m_dsezo_102 > .awsui_trigger-drawer_1uo6m_dsezo_160:not(#\9):hover:not(.awsui_selected_1uo6m_dsezo_160) {
161
- color: var(--color-text-layout-toggle-hover-x3sh37, #0073bb);
148
+ .awsui_drawer-triggers-wrapper_1uo6m_1fg2f_148:not(#\9) {
149
+ display: flex;
150
+ flex-direction: column;
151
+ text-align: center;
152
+ align-items: stretch;
162
153
  }
163
- .awsui_drawer-content_1uo6m_dsezo_123 > .awsui_drawer-triggers_1uo6m_dsezo_102 > .awsui_trigger-drawer_1uo6m_dsezo_160:not(#\9):hover:not(.awsui_selected_1uo6m_dsezo_160):not(:last-child) {
164
- box-shadow: 0px 1px var(--color-shadow-layout-toggle-67ezos, #d5dbdb);
154
+
155
+ .awsui_drawer-trigger_1uo6m_1fg2f_102:not(#\9) {
156
+ padding: var(--space-xxs-xx079q, 4px) 7px;
157
+ cursor: pointer;
158
+ color: var(--color-text-interactive-default-9x433a, #545b64);
159
+ }
160
+ .awsui_drawer-trigger_1uo6m_1fg2f_102:not(#\9):not(:first-child) {
161
+ border-top: 1px solid var(--color-border-layout-rmnayj, #d5dbdb);
162
+ }
163
+ .awsui_drawer-trigger_1uo6m_1fg2f_102:not(#\9):hover {
164
+ color: var(--color-text-layout-toggle-hover-x3sh37, #0073bb);
165
165
  }
166
- .awsui_drawer-content_1uo6m_dsezo_123 > .awsui_drawer-triggers_1uo6m_dsezo_102 > .awsui_trigger_1uo6m_dsezo_149.awsui_selected_1uo6m_dsezo_160:not(#\9), .awsui_drawer-content_1uo6m_dsezo_123 > .awsui_drawer-triggers_1uo6m_dsezo_102 > .awsui_trigger_1uo6m_dsezo_149.awsui_selected_1uo6m_dsezo_160:not(#\9):hover {
166
+ .awsui_drawer-trigger-active_1uo6m_1fg2f_166:not(#\9), .awsui_drawer-trigger-active_1uo6m_1fg2f_166:not(#\9):hover {
167
167
  background-color: var(--color-background-layout-toggle-selected-default-ksjxnl, #0073bb);
168
- border-top: 1px solid var(--color-background-layout-toggle-selected-default-ksjxnl, #0073bb);
169
- box-shadow: none;
170
168
  color: var(--color-text-layout-toggle-active-xajvuf, #ffffff);
171
- margin: 0;
172
169
  }
@@ -2,15 +2,15 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "toggle": "awsui_toggle_1uo6m_dsezo_97",
6
- "drawer-triggers": "awsui_drawer-triggers_1uo6m_dsezo_102",
7
- "drawer": "awsui_drawer_1uo6m_dsezo_102",
8
- "drawer-mobile": "awsui_drawer-mobile_1uo6m_dsezo_112",
9
- "drawer-closed": "awsui_drawer-closed_1uo6m_dsezo_115",
10
- "drawer-content": "awsui_drawer-content_1uo6m_dsezo_123",
11
- "non-interactive": "awsui_non-interactive_1uo6m_dsezo_141",
12
- "trigger": "awsui_trigger_1uo6m_dsezo_149",
13
- "trigger-drawer": "awsui_trigger-drawer_1uo6m_dsezo_160",
14
- "selected": "awsui_selected_1uo6m_dsezo_160"
5
+ "toggle": "awsui_toggle_1uo6m_1fg2f_97",
6
+ "drawer-triggers": "awsui_drawer-triggers_1uo6m_1fg2f_102",
7
+ "drawer": "awsui_drawer_1uo6m_1fg2f_102",
8
+ "drawer-mobile": "awsui_drawer-mobile_1uo6m_1fg2f_112",
9
+ "drawer-closed": "awsui_drawer-closed_1uo6m_1fg2f_115",
10
+ "drawer-content": "awsui_drawer-content_1uo6m_1fg2f_122",
11
+ "drawer-content-clickable": "awsui_drawer-content-clickable_1uo6m_1fg2f_137",
12
+ "drawer-triggers-wrapper": "awsui_drawer-triggers-wrapper_1uo6m_1fg2f_148",
13
+ "drawer-trigger": "awsui_drawer-trigger_1uo6m_1fg2f_102",
14
+ "drawer-trigger-active": "awsui_drawer-trigger-active_1uo6m_1fg2f_166"
15
15
  };
16
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["app-layout/mobile-toolbar/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAqClD,UAAU,kBAAkB;IAC1B,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,UAAU,EAAE;QACV,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvC,KAAK,EAAE,KAAK,CAAC,G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G,SAAS,CAAC;IACjC,UAAU,EAAE;QACV,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;KACnC,CAAC;IACF,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC;IACnC,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACxC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE;QACR,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QACzB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;QACnC,QAAQ,EAAE,CAAC,YAAY,EAAE;YAAE,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;SAAE,KAAK,IAAI,CAAC;QACzE,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAe,EACf,UAAU,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,YAAoB,EACpB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,OAAO,EACP,YAAY,GACb,EAAE,kBAAkB,eA8DpB"}
@@ -2,15 +2,15 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import clsx from 'clsx';
4
4
  import React, { useEffect } from 'react';
5
- import { AppLayoutButton, togglesConfig } from '../toggles';
5
+ import { ToggleButton, togglesConfig } from '../toggles';
6
6
  import styles from './styles.css.js';
7
7
  import sharedStyles from '../styles.css.js';
8
8
  import testutilStyles from '../test-classes/styles.css.js';
9
9
  const MobileToggle = React.forwardRef(({ className, ariaLabels, type, disabled, onClick }, ref) => {
10
10
  const { TagName, iconName, getLabels } = togglesConfig[type];
11
11
  const { mainLabel, openLabel } = getLabels(ariaLabels);
12
- return (React.createElement(TagName, { className: clsx(styles['mobile-toggle']), "aria-hidden": disabled, "aria-label": mainLabel, onClick: e => e.target === e.currentTarget && onClick() },
13
- React.createElement(AppLayoutButton, { ref: ref, className: className, iconName: iconName, onClick: onClick, ariaLabel: openLabel, disabled: disabled, ariaExpanded: disabled })));
12
+ return (React.createElement(TagName, { className: clsx(styles['mobile-toggle'], styles[`mobile-toggle-type-${type}`]), "aria-hidden": disabled, "aria-label": mainLabel, onClick: e => e.target === e.currentTarget && onClick() },
13
+ React.createElement(ToggleButton, { ref: ref, className: className, iconName: iconName, onClick: onClick, ariaLabel: openLabel, disabled: disabled, ariaExpanded: disabled })));
14
14
  });
15
15
  export function MobileToolbar({ ariaLabels = {}, toggleRefs, topOffset, navigationHide, toolsHide, anyPanelOpen = false, unfocusable, children, onNavigationOpen, onToolsOpen, drawers, mobileBarRef, }) {
16
16
  useEffect(() => {
@@ -28,9 +28,10 @@ export function MobileToolbar({ ariaLabels = {}, toggleRefs, topOffset, navigati
28
28
  !navigationHide && (React.createElement(MobileToggle, { ref: toggleRefs.navigation, type: "navigation", className: testutilStyles['navigation-toggle'], ariaLabels: ariaLabels, disabled: anyPanelOpen, onClick: onNavigationOpen })),
29
29
  React.createElement("div", { className: styles['mobile-bar-breadcrumbs'] }, children && React.createElement("div", { className: testutilStyles.breadcrumbs }, children)),
30
30
  !toolsHide && !drawers && (React.createElement(MobileToggle, { ref: toggleRefs.tools, type: "tools", className: testutilStyles['tools-toggle'], ariaLabels: ariaLabels, disabled: anyPanelOpen, onClick: onToolsOpen })),
31
- drawers && (React.createElement("aside", { "aria-label": drawers.ariaLabel, className: clsx(styles['mobile-toggle'], styles['mobile-toggle-with-drawers'], testutilStyles['drawers-mobile-triggers-container']) }, drawers.items.map((item, index) => {
31
+ drawers && (React.createElement("aside", { "aria-label": drawers.ariaLabel, className: clsx(styles['drawers-container'], testutilStyles['drawers-mobile-triggers-container']) }, drawers.items.map((item, index) => {
32
32
  var _a;
33
- return (React.createElement(AppLayoutButton, { className: clsx(styles['mobile-trigger-with-drawers'], testutilStyles['drawers-trigger']), key: `drawer-trigger-${index}`, iconName: item.trigger.iconName, iconSvg: item.trigger.iconSvg, ariaLabel: (_a = item.ariaLabels) === null || _a === void 0 ? void 0 : _a.triggerButton, onClick: () => drawers.onChange({ activeDrawerId: item.id }), ariaExpanded: drawers.activeDrawerId !== undefined }));
33
+ return (React.createElement("span", { className: clsx(styles['mobile-toggle'], styles['mobile-toggle-type-drawer']), key: index },
34
+ React.createElement(ToggleButton, { className: testutilStyles['drawers-trigger'], iconName: item.trigger.iconName, iconSvg: item.trigger.iconSvg, ariaLabel: (_a = item.ariaLabels) === null || _a === void 0 ? void 0 : _a.triggerButton, onClick: () => drawers.onChange({ activeDrawerId: item.id }), ariaExpanded: drawers.activeDrawerId !== undefined, testId: `awsui-app-layout-trigger-${item.id}` })));
34
35
  })))));
35
36
  }
36
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["app-layout/mobile-toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAQ3D,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,E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EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC,EACzF,GAAG,EAAE,kBAAkB,KAAK,EAAE,EAC9B,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAC7B,SAAS,EAAE,MAAA,IAAI,CAAC,UAAU,0CAAE,aAAa,EACzC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,EAC5D,YAAY,EAAE,OAAO,CAAC,cAAc,KAAK,SAAS,GAClD,CACH,CAAA;SAAA,CAAC,CACI,CACT,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useEffect } from 'react';\nimport { ButtonProps } from '../../button/interfaces';\nimport { AppLayoutProps } from '../interfaces';\nimport { DrawerItem } from '../drawer/interfaces';\nimport { AppLayoutButton, togglesConfig } from '../toggles';\nimport styles from './styles.css.js';\nimport sharedStyles from '../styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\ninterface MobileToggleProps {\n className?: string;\n ariaLabels?: AppLayoutProps.Labels;\n type: keyof typeof togglesConfig;\n disabled?: boolean;\n onClick: () => void;\n}\nconst MobileToggle = React.forwardRef(\n ({ className, ariaLabels, type, disabled, onClick }: MobileToggleProps, ref: React.Ref<ButtonProps.Ref>) => {\n const { TagName, iconName, getLabels } = togglesConfig[type];\n const { mainLabel, openLabel } = getLabels(ariaLabels);\n\n return (\n <TagName\n className={clsx(styles['mobile-toggle'])}\n aria-hidden={disabled}\n aria-label={mainLabel}\n onClick={e => e.target === e.currentTarget && onClick()}\n >\n <AppLayoutButton\n ref={ref}\n className={className}\n iconName={iconName}\n onClick={onClick}\n ariaLabel={openLabel}\n disabled={disabled}\n ariaExpanded={disabled}\n />\n </TagName>\n );\n }\n);\ninterface MobileToolbarProps {\n anyPanelOpen: boolean | undefined;\n unfocusable: boolean | undefined;\n toggleRefs: {\n navigation: React.Ref<ButtonProps.Ref>;\n tools: React.Ref<ButtonProps.Ref>;\n };\n navigationHide: boolean | undefined;\n toolsHide: boolean | undefined;\n topOffset?: number;\n ariaLabels?: AppLayoutProps.Labels;\n mobileBarRef: React.Ref<HTMLDivElement>;\n children: React.ReactNode;\n onNavigationOpen: () => void;\n onToolsOpen: () => void;\n drawers?: {\n items: Array<DrawerItem>;\n activeDrawerId: string | undefined;\n onChange: (changeDetail: { activeDrawerId: string | undefined }) => void;\n ariaLabel?: string;\n };\n}\n\nexport function MobileToolbar({\n ariaLabels = {},\n toggleRefs,\n topOffset,\n navigationHide,\n toolsHide,\n anyPanelOpen = false,\n unfocusable,\n children,\n onNavigationOpen,\n onToolsOpen,\n drawers,\n mobileBarRef,\n}: MobileToolbarProps) {\n useEffect(() => {\n if (anyPanelOpen) {\n document.body.classList.add(styles['block-body-scroll']);\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n }, [anyPanelOpen]);\n return (\n <div\n ref={mobileBarRef}\n className={clsx(styles['mobile-bar'], unfocusable && sharedStyles.unfocusable)}\n style={{ top: topOffset }}\n >\n {!navigationHide && (\n <MobileToggle\n ref={toggleRefs.navigation}\n type=\"navigation\"\n className={testutilStyles['navigation-toggle']}\n ariaLabels={ariaLabels}\n disabled={anyPanelOpen}\n onClick={onNavigationOpen}\n />\n )}\n <div className={styles['mobile-bar-breadcrumbs']}>\n {children && <div className={testutilStyles.breadcrumbs}>{children}</div>}\n </div>\n {!toolsHide && !drawers && (\n <MobileToggle\n ref={toggleRefs.tools}\n type=\"tools\"\n className={testutilStyles['tools-toggle']}\n ariaLabels={ariaLabels}\n disabled={anyPanelOpen}\n onClick={onToolsOpen}\n />\n )}\n {drawers && (\n <aside\n aria-label={drawers.ariaLabel}\n className={clsx(\n styles['mobile-toggle'],\n styles['mobile-toggle-with-drawers'],\n testutilStyles['drawers-mobile-triggers-container']\n )}\n >\n {drawers.items.map((item: DrawerItem, index: number) => (\n <AppLayoutButton\n className={clsx(styles['mobile-trigger-with-drawers'], testutilStyles['drawers-trigger'])}\n key={`drawer-trigger-${index}`}\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n ariaLabel={item.ariaLabels?.triggerButton}\n onClick={() => drawers.onChange({ activeDrawerId: item.id })}\n ariaExpanded={drawers.activeDrawerId !== undefined}\n />\n ))}\n </aside>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["app-layout/mobile-toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAQ3D,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAqB,EAAE,GAA+B,EAAE,EAAE;IACzG,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7D,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;IAEvD,OAAO,CACL,oBAAC,OAAO,IACN,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC,iBACjE,QA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,CAAC,EAAE,EAAE,CAAC,EAC5D,YAAY,EAAE,OAAO,CAAC,cAAc,KAAK,SAAS,EAClD,MAAM,EAAE,4BAA4B,IAAI,CAAC,EAAE,EAAE,GAC7C,CACG,CACR,CAAA;SAAA,CAAC,CACI,CACT,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useEffect } from 'react';\nimport { ButtonProps } from '../../button/interfaces';\nimport { AppLayoutProps } from '../interfaces';\nimport { DrawerItem } from '../drawer/interfaces';\nimport { ToggleButton, togglesConfig } from '../toggles';\nimport styles from './styles.css.js';\nimport sharedStyles from '../styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\ninterface MobileToggleProps {\n className?: string;\n ariaLabels?: AppLayoutProps.Labels;\n type: keyof typeof togglesConfig;\n disabled?: boolean;\n onClick: () => void;\n}\nconst MobileToggle = React.forwardRef(\n ({ className, ariaLabels, type, disabled, onClick }: MobileToggleProps, ref: React.Ref<ButtonProps.Ref>) => {\n const { TagName, iconName, getLabels } = togglesConfig[type];\n const { mainLabel, openLabel } = getLabels(ariaLabels);\n\n return (\n <TagName\n className={clsx(styles['mobile-toggle'], styles[`mobile-toggle-type-${type}`])}\n aria-hidden={disabled}\n aria-label={mainLabel}\n onClick={e => e.target === e.currentTarget && onClick()}\n >\n <ToggleButton\n ref={ref}\n className={className}\n iconName={iconName}\n onClick={onClick}\n ariaLabel={openLabel}\n disabled={disabled}\n ariaExpanded={disabled}\n />\n </TagName>\n );\n }\n);\ninterface MobileToolbarProps {\n anyPanelOpen: boolean | undefined;\n unfocusable: boolean | undefined;\n toggleRefs: {\n navigation: React.Ref<ButtonProps.Ref>;\n tools: React.Ref<ButtonProps.Ref>;\n };\n navigationHide: boolean | undefined;\n toolsHide: boolean | undefined;\n topOffset?: number;\n ariaLabels?: AppLayoutProps.Labels;\n mobileBarRef: React.Ref<HTMLDivElement>;\n children: React.ReactNode;\n onNavigationOpen: () => void;\n onToolsOpen: () => void;\n drawers?: {\n items: Array<DrawerItem>;\n activeDrawerId: string | undefined;\n onChange: (changeDetail: { activeDrawerId: string | undefined }) => void;\n ariaLabel?: string;\n };\n}\n\nexport function MobileToolbar({\n ariaLabels = {},\n toggleRefs,\n topOffset,\n navigationHide,\n toolsHide,\n anyPanelOpen = false,\n unfocusable,\n children,\n onNavigationOpen,\n onToolsOpen,\n drawers,\n mobileBarRef,\n}: MobileToolbarProps) {\n useEffect(() => {\n if (anyPanelOpen) {\n document.body.classList.add(styles['block-body-scroll']);\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n }, [anyPanelOpen]);\n return (\n <div\n ref={mobileBarRef}\n className={clsx(styles['mobile-bar'], unfocusable && sharedStyles.unfocusable)}\n style={{ top: topOffset }}\n >\n {!navigationHide && (\n <MobileToggle\n ref={toggleRefs.navigation}\n type=\"navigation\"\n className={testutilStyles['navigation-toggle']}\n ariaLabels={ariaLabels}\n disabled={anyPanelOpen}\n onClick={onNavigationOpen}\n />\n )}\n <div className={styles['mobile-bar-breadcrumbs']}>\n {children && <div className={testutilStyles.breadcrumbs}>{children}</div>}\n </div>\n {!toolsHide && !drawers && (\n <MobileToggle\n ref={toggleRefs.tools}\n type=\"tools\"\n className={testutilStyles['tools-toggle']}\n ariaLabels={ariaLabels}\n disabled={anyPanelOpen}\n onClick={onToolsOpen}\n />\n )}\n {drawers && (\n <aside\n aria-label={drawers.ariaLabel}\n className={clsx(styles['drawers-container'], testutilStyles['drawers-mobile-triggers-container'])}\n >\n {drawers.items.map((item: DrawerItem, index: number) => (\n <span className={clsx(styles['mobile-toggle'], styles['mobile-toggle-type-drawer'])} key={index}>\n <ToggleButton\n className={testutilStyles['drawers-trigger']}\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n ariaLabel={item.ariaLabels?.triggerButton}\n onClick={() => drawers.onChange({ activeDrawerId: item.id })}\n ariaExpanded={drawers.activeDrawerId !== undefined}\n testId={`awsui-app-layout-trigger-${item.id}`}\n />\n </span>\n ))}\n </aside>\n )}\n </div>\n );\n}\n"]}
@@ -1,11 +1,13 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "block-body-scroll": "awsui_block-body-scroll_19d8l_ldjmq_97",
5
- "mobile-bar": "awsui_mobile-bar_19d8l_ldjmq_101",
6
- "mobile-bar-breadcrumbs": "awsui_mobile-bar-breadcrumbs_19d8l_ldjmq_115",
7
- "mobile-trigger-with-drawers": "awsui_mobile-trigger-with-drawers_19d8l_ldjmq_122",
8
- "mobile-toggle": "awsui_mobile-toggle_19d8l_ldjmq_128",
9
- "mobile-toggle-with-drawers": "awsui_mobile-toggle-with-drawers_19d8l_ldjmq_138"
4
+ "block-body-scroll": "awsui_block-body-scroll_19d8l_1363s_97",
5
+ "mobile-bar": "awsui_mobile-bar_19d8l_1363s_101",
6
+ "mobile-bar-breadcrumbs": "awsui_mobile-bar-breadcrumbs_19d8l_1363s_114",
7
+ "mobile-toggle": "awsui_mobile-toggle_19d8l_1363s_121",
8
+ "mobile-toggle-type-navigation": "awsui_mobile-toggle-type-navigation_19d8l_1363s_129",
9
+ "mobile-toggle-type-tools": "awsui_mobile-toggle-type-tools_19d8l_1363s_132",
10
+ "mobile-toggle-type-drawer": "awsui_mobile-toggle-type-drawer_19d8l_1363s_132",
11
+ "drawers-container": "awsui_drawers-container_19d8l_1363s_139"
10
12
  };
11
13
 
@@ -94,12 +94,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
94
94
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
95
  SPDX-License-Identifier: Apache-2.0
96
96
  */
97
- .awsui_block-body-scroll_19d8l_ldjmq_97:not(#\9) {
97
+ .awsui_block-body-scroll_19d8l_1363s_97:not(#\9) {
98
98
  overflow: hidden;
99
99
  }
100
100
 
101
- .awsui_mobile-bar_19d8l_ldjmq_101:not(#\9) {
102
- /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
101
+ .awsui_mobile-bar_19d8l_1363s_101:not(#\9) {
103
102
  position: sticky;
104
103
  display: flex;
105
104
  align-items: center;
@@ -112,43 +111,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
112
111
  height: calc(2 * var(--space-m-2wfcpy, 16px) + var(--space-scaled-xs-sg3tfb, 8px));
113
112
  }
114
113
 
115
- .awsui_mobile-bar-breadcrumbs_19d8l_ldjmq_115:not(#\9) {
114
+ .awsui_mobile-bar-breadcrumbs_19d8l_1363s_114:not(#\9) {
116
115
  min-width: 0;
117
116
  flex: 1;
118
117
  margin-left: var(--space-m-2wfcpy, 16px);
119
118
  margin-right: var(--space-m-2wfcpy, 16px);
120
119
  }
121
120
 
122
- .awsui_mobile-trigger-with-drawers_19d8l_ldjmq_122:not(#\9) {
123
- width: 40px;
124
- display: flex;
125
- justify-content: center;
126
- }
127
-
128
- .awsui_mobile-toggle_19d8l_ldjmq_128:not(#\9) {
121
+ .awsui_mobile-toggle_19d8l_1363s_121:not(#\9) {
129
122
  box-sizing: border-box;
130
123
  cursor: pointer;
131
124
  z-index: 1;
132
125
  padding: var(--space-xxs-xx079q, 4px) 7px;
133
126
  width: 40px;
127
+ color: var(--color-text-interactive-default-9x433a, #545b64);
134
128
  }
135
- .awsui_mobile-toggle_19d8l_ldjmq_128:not(#\9):first-child {
129
+ .awsui_mobile-toggle-type-navigation_19d8l_1363s_129:not(#\9) {
136
130
  border-right: 1px solid var(--color-border-layout-rmnayj, #d5dbdb);
137
131
  }
138
- .awsui_mobile-toggle_19d8l_ldjmq_128:not(#\9):last-child:not(.awsui_mobile-toggle-with-drawers_19d8l_ldjmq_138) {
132
+ .awsui_mobile-toggle-type-tools_19d8l_1363s_132:not(#\9), .awsui_mobile-toggle-type-drawer_19d8l_1363s_132:not(#\9) {
139
133
  border-left: 1px solid var(--color-border-layout-rmnayj, #d5dbdb);
140
134
  }
141
- .awsui_mobile-toggle_19d8l_ldjmq_128:not(#\9):hover:not(.awsui_mobile-toggle-with-drawers_19d8l_ldjmq_138) {
135
+ .awsui_mobile-toggle_19d8l_1363s_121:not(#\9):hover {
142
136
  background: var(--color-background-layout-panel-hover-yn48lk, #eaeded);
143
137
  }
144
- .awsui_mobile-toggle-with-drawers_19d8l_ldjmq_138:not(#\9) {
145
- display: flex;
146
- width: auto;
147
- padding: 0;
148
- height: 100%;
149
- }
150
- .awsui_mobile-toggle-with-drawers_19d8l_ldjmq_138 > .awsui_mobile-trigger-with-drawers_19d8l_ldjmq_122:not(#\9) {
151
- border-left: 1px solid var(--color-border-layout-rmnayj, #d5dbdb);
138
+
139
+ .awsui_drawers-container_19d8l_1363s_139:not(#\9) {
152
140
  display: flex;
153
- align-items: center;
141
+ align-items: stretch;
154
142
  }
@@ -2,11 +2,13 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "block-body-scroll": "awsui_block-body-scroll_19d8l_ldjmq_97",
6
- "mobile-bar": "awsui_mobile-bar_19d8l_ldjmq_101",
7
- "mobile-bar-breadcrumbs": "awsui_mobile-bar-breadcrumbs_19d8l_ldjmq_115",
8
- "mobile-trigger-with-drawers": "awsui_mobile-trigger-with-drawers_19d8l_ldjmq_122",
9
- "mobile-toggle": "awsui_mobile-toggle_19d8l_ldjmq_128",
10
- "mobile-toggle-with-drawers": "awsui_mobile-toggle-with-drawers_19d8l_ldjmq_138"
5
+ "block-body-scroll": "awsui_block-body-scroll_19d8l_1363s_97",
6
+ "mobile-bar": "awsui_mobile-bar_19d8l_1363s_101",
7
+ "mobile-bar-breadcrumbs": "awsui_mobile-bar-breadcrumbs_19d8l_1363s_114",
8
+ "mobile-toggle": "awsui_mobile-toggle_19d8l_1363s_121",
9
+ "mobile-toggle-type-navigation": "awsui_mobile-toggle-type-navigation_19d8l_1363s_129",
10
+ "mobile-toggle-type-tools": "awsui_mobile-toggle-type-tools_19d8l_1363s_132",
11
+ "mobile-toggle-type-drawer": "awsui_mobile-toggle-type-drawer_19d8l_1363s_132",
12
+ "drawers-container": "awsui_drawers-container_19d8l_1363s_139"
11
13
  };
12
14
 
@@ -22,7 +22,9 @@ export declare const togglesConfig: {
22
22
  };
23
23
  };
24
24
  };
25
- export declare const AppLayoutButton: React.ForwardRefExoticComponent<AppLayoutButtonProps & React.RefAttributes<ButtonProps.Ref>>;
25
+ export declare const ToggleButton: React.ForwardRefExoticComponent<AppLayoutButtonProps & React.RefAttributes<{
26
+ focus(): void;
27
+ }>>;
26
28
  interface CloseButtonProps {
27
29
  className?: string;
28
30
  ariaLabel: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["app-layout/toggles/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD,eAAO,MAAM,aAAa;;;;sCAIF,eAAe,MAAM;;;;;;;;;sCASrB,eAAe,MAAM;;;;;;CAMnC,CAAC;AAEX,eAAO,MAAM,eAAe,8FAqB3B,CAAC;AAEF,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,0FAevB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["app-layout/toggles/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD,eAAO,MAAM,aAAa;;;;sCAIF,eAAe,MAAM;;;;;;;;;sCASrB,eAAe,MAAM;;;;;;CAMnC,CAAC;AAEX,eAAO,MAAM,YAAY;aAGK,IAAI;GAkBjC,CAAC;AAEF,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,0FAgBvB,CAAC"}
@@ -1,7 +1,9 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
+ import clsx from 'clsx';
3
4
  import React from 'react';
4
5
  import { InternalButton } from '../../button/internal';
6
+ import InternalIcon from '../../icon/internal';
5
7
  import styles from './styles.css.js';
6
8
  export const togglesConfig = {
7
9
  navigation: {
@@ -23,11 +25,12 @@ export const togglesConfig = {
23
25
  }),
24
26
  },
25
27
  };
26
- export const AppLayoutButton = React.forwardRef(({ className, ariaLabel, ariaExpanded, iconName, iconSvg, disabled, onClick }, ref) => {
27
- return (React.createElement(InternalButton, { ref: ref, className: className, ariaLabel: ariaLabel, variant: "icon", formAction: "none", onClick: onClick, iconName: iconName, iconSvg: iconSvg, disabled: disabled, ariaExpanded: ariaExpanded ? undefined : false, __nativeAttributes: { 'aria-haspopup': ariaExpanded ? undefined : true } }));
28
+ export const ToggleButton = React.forwardRef(({ className, ariaLabel, ariaExpanded, iconName, iconSvg, disabled, testId, onClick }, ref) => {
29
+ return (React.createElement("button", { ref: ref, className: clsx(className, styles['toggle-button']), "aria-label": ariaLabel, type: "button", onClick: onClick, disabled: disabled, "aria-expanded": ariaExpanded ? undefined : false, "aria-haspopup": ariaExpanded ? undefined : true, "data-testid": testId },
30
+ React.createElement(InternalIcon, { svg: iconSvg, name: iconName })));
28
31
  });
29
32
  export const CloseButton = React.forwardRef(({ className, ariaLabel, onClick }, ref) => {
30
33
  return (React.createElement("span", { className: styles['close-button'] },
31
- React.createElement(AppLayoutButton, { ref: ref, className: className, ariaExpanded: true, ariaLabel: ariaLabel, iconName: "close", onClick: onClick })));
34
+ React.createElement(InternalButton, { ref: ref, className: className, ariaLabel: ariaLabel, variant: "icon", formAction: "none", iconName: "close", onClick: onClick })));
32
35
  });
33
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["app-layout/toggles/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,CAAC,SAAgC,EAAE,EAAE,EAAE,CAAC,CAAC;YAClD,SAAS,EAAE,MAAM,CAAC,UAAU;YAC5B,SAAS,EAAE,MAAM,CAAC,gBAAgB;YAClC,UAAU,EAAE,MAAM,CAAC,eAAe;SACnC,CAAC;KACH;IACD,KAAK,EAAE;QACL,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,aAAa;QACvB,SAAS,EAAE,CAAC,SAAgC,EAAE,EAAE,EAAE,CAAC,CAAC;YAClD,SAAS,EAAE,MAAM,CAAC,KAAK;YACvB,SAAS,EAAE,MAAM,CAAC,WAAW;YAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC;KACH;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAC7C,CACE,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAwB,EAClG,GAA+B,EAC/B,EAAE;IACF,OAAO,CACL,oBAAC,cAAc,IACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EAC9C,kBAAkB,EAAE,EAAE,eAAe,EAAE,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,GACxE,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAQF,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CACzC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAoB,EAAE,GAA+B,EAAE,EAAE;IACvF,OAAO,CACL,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC;QACrC,oBAAC,eAAe,IACd,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,IAAI,EAClB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAC,OAAO,EAChB,OAAO,EAAE,OAAO,GAChB,CACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { ButtonProps } from '../../button/interfaces';\nimport { InternalButton } from '../../button/internal';\nimport { AppLayoutProps } from '../interfaces';\nimport { AppLayoutButtonProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport const togglesConfig = {\n navigation: {\n TagName: 'nav',\n iconName: 'menu',\n getLabels: (labels: AppLayoutProps.Labels = {}) => ({\n mainLabel: labels.navigation,\n openLabel: labels.navigationToggle,\n closeLabel: labels.navigationClose,\n }),\n },\n tools: {\n TagName: 'aside',\n iconName: 'status-info',\n getLabels: (labels: AppLayoutProps.Labels = {}) => ({\n mainLabel: labels.tools,\n openLabel: labels.toolsToggle,\n closeLabel: labels.toolsClose,\n }),\n },\n} as const;\n\nexport const AppLayoutButton = React.forwardRef(\n (\n { className, ariaLabel, ariaExpanded, iconName, iconSvg, disabled, onClick }: AppLayoutButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n return (\n <InternalButton\n ref={ref}\n className={className}\n ariaLabel={ariaLabel}\n variant=\"icon\"\n formAction=\"none\"\n onClick={onClick}\n iconName={iconName}\n iconSvg={iconSvg}\n disabled={disabled}\n ariaExpanded={ariaExpanded ? undefined : false}\n __nativeAttributes={{ 'aria-haspopup': ariaExpanded ? undefined : true }}\n />\n );\n }\n);\n\ninterface CloseButtonProps {\n className?: string;\n ariaLabel: string | undefined;\n onClick: () => void;\n}\n\nexport const CloseButton = React.forwardRef(\n ({ className, ariaLabel, onClick }: CloseButtonProps, ref: React.Ref<ButtonProps.Ref>) => {\n return (\n <span className={styles['close-button']}>\n <AppLayoutButton\n ref={ref}\n className={className}\n ariaExpanded={true}\n ariaLabel={ariaLabel}\n iconName=\"close\"\n onClick={onClick}\n />\n </span>\n );\n }\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["app-layout/toggles/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAG/C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,UAAU,EAAE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AAE,SAAS,EAAE,OAAO,EAAoB,EAAE,GAA+B,EAAE,EAAE;IACvF,OAAO,CACL,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC;QACrC,oBAAC,cAAc,IACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAC,OAAO,EAChB,OAAO,EAAE,OAAO,GAChB,CACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport { ButtonProps } from '../../button/interfaces';\nimport { InternalButton } from '../../button/internal';\nimport InternalIcon from '../../icon/internal';\nimport { AppLayoutProps } from '../interfaces';\nimport { AppLayoutButtonProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport const togglesConfig = {\n navigation: {\n TagName: 'nav',\n iconName: 'menu',\n getLabels: (labels: AppLayoutProps.Labels = {}) => ({\n mainLabel: labels.navigation,\n openLabel: labels.navigationToggle,\n closeLabel: labels.navigationClose,\n }),\n },\n tools: {\n TagName: 'aside',\n iconName: 'status-info',\n getLabels: (labels: AppLayoutProps.Labels = {}) => ({\n mainLabel: labels.tools,\n openLabel: labels.toolsToggle,\n closeLabel: labels.toolsClose,\n }),\n },\n} as const;\n\nexport const ToggleButton = React.forwardRef(\n (\n { className, ariaLabel, ariaExpanded, iconName, iconSvg, disabled, testId, onClick }: AppLayoutButtonProps,\n ref: React.Ref<{ focus(): void }>\n ) => {\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n className={clsx(className, styles['toggle-button'])}\n aria-label={ariaLabel}\n type=\"button\"\n onClick={onClick}\n disabled={disabled}\n aria-expanded={ariaExpanded ? undefined : false}\n aria-haspopup={ariaExpanded ? undefined : true}\n data-testid={testId}\n >\n <InternalIcon svg={iconSvg} name={iconName} />\n </button>\n );\n }\n);\n\ninterface CloseButtonProps {\n className?: string;\n ariaLabel: string | undefined;\n onClick: () => void;\n}\n\nexport const CloseButton = React.forwardRef(\n ({ className, ariaLabel, onClick }: CloseButtonProps, ref: React.Ref<ButtonProps.Ref>) => {\n return (\n <span className={styles['close-button']}>\n <InternalButton\n ref={ref}\n className={className}\n ariaLabel={ariaLabel}\n variant=\"icon\"\n formAction=\"none\"\n iconName=\"close\"\n onClick={onClick}\n />\n </span>\n );\n }\n);\n"]}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { IconProps } from '../../icon/interfaces';
3
3
  export interface AppLayoutButtonProps {
4
4
  className?: string;
@@ -6,7 +6,8 @@ export interface AppLayoutButtonProps {
6
6
  ariaExpanded?: boolean;
7
7
  iconName?: IconProps.Name;
8
8
  iconSvg?: React.ReactNode;
9
- onClick: () => void;
9
+ onClick?: () => void;
10
10
  disabled?: boolean;
11
+ testId?: string;
11
12
  }
12
13
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["app-layout/toggles/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["app-layout/toggles/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["app-layout/toggles/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { IconProps } from '../../icon/interfaces';\n\nexport interface AppLayoutButtonProps {\n className?: string;\n ariaLabel: string | undefined;\n ariaExpanded?: boolean;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n onClick: () => void;\n disabled?: boolean;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["app-layout/toggles/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { IconProps } from '../../icon/interfaces';\n\nexport interface AppLayoutButtonProps {\n className?: string;\n ariaLabel: string | undefined;\n ariaExpanded?: boolean;\n iconName?: IconProps.Name;\n iconSvg?: React.ReactNode;\n onClick?: () => void;\n disabled?: boolean;\n testId?: string;\n}\n"]}
@@ -1,6 +1,7 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "close-button": "awsui_close-button_16w0h_ln6p9_93"
4
+ "toggle-button": "awsui_toggle-button_16w0h_pbc0z_93",
5
+ "close-button": "awsui_close-button_16w0h_pbc0z_123"
5
6
  };
6
7
 
@@ -90,7 +90,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
90
90
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
- .awsui_close-button_16w0h_ln6p9_93:not(#\9) {
93
+ .awsui_toggle-button_16w0h_pbc0z_93:not(#\9) {
94
+ cursor: pointer;
95
+ border: 0;
96
+ padding: calc(var(--space-scaled-xxs-gmgwxk, 4px) + 1px) calc(var(--space-xxs-xx079q, 4px) + 1px);
97
+ background: transparent;
98
+ color: currentColor;
99
+ }
100
+ .awsui_toggle-button_16w0h_pbc0z_93:not(#\9):focus {
101
+ outline: none;
102
+ text-decoration: none;
103
+ }
104
+ body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_pbc0z_93:not(#\9):focus {
105
+ position: relative;
106
+ }
107
+ body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_pbc0z_93:not(#\9):focus {
108
+ outline: 2px dotted transparent;
109
+ outline-offset: calc(var(--space-button-inline-icon-focus-outline-gutter-v7tn85, 3px) - 1px);
110
+ }
111
+ body[data-awsui-focus-visible=true] .awsui_toggle-button_16w0h_pbc0z_93:not(#\9):focus::before {
112
+ content: " ";
113
+ display: block;
114
+ position: absolute;
115
+ left: calc(-1 * var(--space-button-inline-icon-focus-outline-gutter-v7tn85, 3px));
116
+ top: calc(-1 * var(--space-button-inline-icon-focus-outline-gutter-v7tn85, 3px));
117
+ width: calc(100% + 2 * var(--space-button-inline-icon-focus-outline-gutter-v7tn85, 3px));
118
+ height: calc(100% + 2 * var(--space-button-inline-icon-focus-outline-gutter-v7tn85, 3px));
119
+ border-radius: var(--border-radius-control-default-focus-ring-uu8qi4, 2px);
120
+ box-shadow: 0 0 0 2px var(--color-border-item-focused-4clyb1, #0073bb);
121
+ }
122
+
123
+ .awsui_close-button_16w0h_pbc0z_123:not(#\9) {
94
124
  position: absolute;
95
125
  outline: none;
96
126
  right: var(--space-m-2wfcpy, 16px);
@@ -2,6 +2,7 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "close-button": "awsui_close-button_16w0h_ln6p9_93"
5
+ "toggle-button": "awsui_toggle-button_16w0h_pbc0z_93",
6
+ "close-button": "awsui_close-button_16w0h_pbc0z_123"
6
7
  };
7
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"drawers.d.ts","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/drawers.tsx"],"names":[],"mappings":";AAcA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,uBAuB9B;AA+LD;;;;;GAKG;AACH,wBAAgB,cAAc,uBAuE7B"}
1
+ {"version":3,"file":"drawers.d.ts","sourceRoot":"lib/default/","sources":["app-layout/visual-refresh/drawers.tsx"],"names":[],"mappings":";AAcA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,uBAuB9B;AAgMD;;;;;GAKG;AACH,wBAAgB,cAAc,uBAuE7B"}
@@ -103,7 +103,7 @@ function DesktopTriggers() {
103
103
  return (React.createElement(TriggerButton, { ariaLabel: (_a = item.ariaLabels) === null || _a === void 0 ? void 0 : _a.triggerButton, className: clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger']), iconName: item.trigger.iconName, iconSvg: item.trigger.iconSvg, key: item.id, onClick: () => {
104
104
  isToolsOpen && handleToolsClick(!isToolsOpen, true);
105
105
  handleDrawersClick(item.id);
106
- }, ref: item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined, selected: item.id === activeDrawerId }));
106
+ }, ref: item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined, selected: item.id === activeDrawerId, testId: `awsui-app-layout-trigger-${item.id}` }));
107
107
  }),
108
108
  hasSplitPanel && splitPanelToggle.displayed && (React.createElement(TriggerButton, { ariaLabel: splitPanelToggle.ariaLabel, className: clsx(styles['drawers-trigger'], splitPanelStyles['open-button']), iconName: "view-vertical", onClick: () => handleSplitPanelClick(), selected: hasSplitPanel && isSplitPanelOpen, ref: splitPanelRefs.toggle })))));
109
109
  }
@@ -129,7 +129,7 @@ export function MobileTriggers() {
129
129
  !toolsHide && tools && (React.createElement(InternalButton, { ariaLabel: (_a = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.toolsToggle) !== null && _a !== void 0 ? _a : undefined, ariaExpanded: isToolsOpen, className: testutilStyles['tools-toggle'], disabled: hasDrawerViewportOverlay, formAction: "none", iconName: "status-info", onClick: () => handleToolsClick(true), ref: toolsRefs.toggle, variant: "icon", __nativeAttributes: { 'aria-haspopup': true } })),
130
130
  drawers.items.map(item => {
131
131
  var _a;
132
- return (React.createElement(InternalButton, { ariaExpanded: item.id === activeDrawerId, ariaLabel: (_a = item.ariaLabels) === null || _a === void 0 ? void 0 : _a.triggerButton, className: clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger']), disabled: hasDrawerViewportOverlay, formAction: "none", iconName: item.trigger.iconName, iconSvg: item.trigger.iconSvg, key: item.id, onClick: () => handleDrawersClick(item.id), ref: item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined, variant: "icon", __nativeAttributes: { 'aria-haspopup': true } }));
132
+ return (React.createElement(InternalButton, { ariaExpanded: item.id === activeDrawerId, ariaLabel: (_a = item.ariaLabels) === null || _a === void 0 ? void 0 : _a.triggerButton, className: clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger']), disabled: hasDrawerViewportOverlay, formAction: "none", iconName: item.trigger.iconName, iconSvg: item.trigger.iconSvg, key: item.id, onClick: () => handleDrawersClick(item.id), ref: item.id === previousActiveDrawerId.current ? drawersRefs.toggle : undefined, variant: "icon", __nativeAttributes: { 'aria-haspopup': true, 'data-testid': `awsui-app-layout-trigger-${item.id}` } }));
133
133
  })));
134
134
  }
135
135
  //# sourceMappingURL=drawers.js.map