@cloudscape-design/components 3.0.750 → 3.0.752

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 (131) hide show
  1. package/alert/actions-wrapper/index.d.ts +1 -1
  2. package/alert/actions-wrapper/index.d.ts.map +1 -1
  3. package/alert/actions-wrapper/index.js +2 -2
  4. package/alert/actions-wrapper/index.js.map +1 -1
  5. package/alert/internal.d.ts.map +1 -1
  6. package/alert/internal.js +15 -5
  7. package/alert/internal.js.map +1 -1
  8. package/alert/styles.css.js +27 -25
  9. package/alert/styles.scoped.css +45 -39
  10. package/alert/styles.selectors.js +27 -25
  11. package/app-layout/drawer/styles.css.js +13 -13
  12. package/app-layout/drawer/styles.scoped.css +22 -22
  13. package/app-layout/drawer/styles.selectors.js +13 -13
  14. package/app-layout/mobile-toolbar/styles.css.js +8 -8
  15. package/app-layout/mobile-toolbar/styles.scoped.css +10 -10
  16. package/app-layout/mobile-toolbar/styles.selectors.js +8 -8
  17. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +16 -16
  18. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +34 -34
  19. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +16 -16
  20. package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +12 -12
  21. package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +17 -17
  22. package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +12 -12
  23. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.css.js +6 -6
  24. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.scoped.css +24 -24
  25. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.selectors.js +6 -6
  26. package/breadcrumb-group/implementation.d.ts.map +1 -1
  27. package/breadcrumb-group/implementation.js +1 -1
  28. package/breadcrumb-group/implementation.js.map +1 -1
  29. package/breadcrumb-group/interfaces.d.ts +1 -1
  30. package/breadcrumb-group/interfaces.js.map +1 -1
  31. package/button-dropdown/interfaces.d.ts +7 -0
  32. package/button-dropdown/interfaces.d.ts.map +1 -1
  33. package/button-dropdown/interfaces.js.map +1 -1
  34. package/button-dropdown/internal.d.ts.map +1 -1
  35. package/button-dropdown/internal.js +2 -2
  36. package/button-dropdown/internal.js.map +1 -1
  37. package/button-dropdown/item-element/index.d.ts +1 -1
  38. package/button-dropdown/item-element/index.d.ts.map +1 -1
  39. package/button-dropdown/item-element/index.js +4 -4
  40. package/button-dropdown/item-element/index.js.map +1 -1
  41. package/button-dropdown/item-element/styles.css.js +13 -12
  42. package/button-dropdown/item-element/styles.scoped.css +52 -14
  43. package/button-dropdown/item-element/styles.selectors.js +13 -12
  44. package/button-dropdown/items-list.d.ts +1 -1
  45. package/button-dropdown/items-list.d.ts.map +1 -1
  46. package/button-dropdown/items-list.js +2 -2
  47. package/button-dropdown/items-list.js.map +1 -1
  48. package/flashbar/analytics-metadata/interfaces.d.ts +36 -0
  49. package/flashbar/analytics-metadata/interfaces.d.ts.map +1 -0
  50. package/flashbar/analytics-metadata/interfaces.js +4 -0
  51. package/flashbar/analytics-metadata/interfaces.js.map +1 -0
  52. package/flashbar/analytics-metadata/styles.css.js +6 -0
  53. package/flashbar/analytics-metadata/styles.scoped.css +7 -0
  54. package/flashbar/analytics-metadata/styles.selectors.js +7 -0
  55. package/flashbar/analytics-metadata/utils.d.ts +7 -0
  56. package/flashbar/analytics-metadata/utils.d.ts.map +1 -0
  57. package/flashbar/analytics-metadata/utils.js +33 -0
  58. package/flashbar/analytics-metadata/utils.js.map +1 -0
  59. package/flashbar/collapsible-flashbar.d.ts.map +1 -1
  60. package/flashbar/collapsible-flashbar.js +13 -5
  61. package/flashbar/collapsible-flashbar.js.map +1 -1
  62. package/flashbar/flash.d.ts.map +1 -1
  63. package/flashbar/flash.js +19 -7
  64. package/flashbar/flash.js.map +1 -1
  65. package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  66. package/flashbar/non-collapsible-flashbar.js +4 -2
  67. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  68. package/flashbar/styles.css.js +50 -47
  69. package/flashbar/styles.scoped.css +152 -146
  70. package/flashbar/styles.selectors.js +50 -47
  71. package/internal/base-component/styles.scoped.css +5 -10
  72. package/internal/components/tooltip/index.d.ts +3 -1
  73. package/internal/components/tooltip/index.d.ts.map +1 -1
  74. package/internal/components/tooltip/index.js +2 -2
  75. package/internal/components/tooltip/index.js.map +1 -1
  76. package/internal/components/tooltip/registry.d.ts +4 -0
  77. package/internal/components/tooltip/registry.d.ts.map +1 -0
  78. package/internal/components/tooltip/registry.js +28 -0
  79. package/internal/components/tooltip/registry.js.map +1 -0
  80. package/internal/environment.js +1 -1
  81. package/internal/environment.json +1 -1
  82. package/internal/generated/styles/tokens.js +1 -1
  83. package/internal/generated/theming/index.cjs +15 -15
  84. package/internal/generated/theming/index.js +15 -15
  85. package/internal/manifest.json +1 -1
  86. package/internal/plugins/api.d.ts +9 -0
  87. package/internal/plugins/api.d.ts.map +1 -1
  88. package/internal/plugins/api.js +7 -0
  89. package/internal/plugins/api.js.map +1 -1
  90. package/internal/plugins/controllers/alert-flash-content.d.ts +46 -0
  91. package/internal/plugins/controllers/alert-flash-content.d.ts.map +1 -0
  92. package/internal/plugins/controllers/alert-flash-content.js +59 -0
  93. package/internal/plugins/controllers/alert-flash-content.js.map +1 -0
  94. package/internal/plugins/helpers/index.d.ts +1 -0
  95. package/internal/plugins/helpers/index.d.ts.map +1 -1
  96. package/internal/plugins/helpers/index.js +1 -0
  97. package/internal/plugins/helpers/index.js.map +1 -1
  98. package/internal/plugins/helpers/use-discovered-action.d.ts +2 -2
  99. package/internal/plugins/helpers/use-discovered-action.d.ts.map +1 -1
  100. package/internal/plugins/helpers/use-discovered-action.js.map +1 -1
  101. package/internal/plugins/helpers/use-discovered-content.d.ts +15 -0
  102. package/internal/plugins/helpers/use-discovered-content.d.ts.map +1 -0
  103. package/internal/plugins/helpers/use-discovered-content.js +82 -0
  104. package/internal/plugins/helpers/use-discovered-content.js.map +1 -0
  105. package/package.json +1 -1
  106. package/popover/styles.css.js +52 -52
  107. package/popover/styles.scoped.css +72 -72
  108. package/popover/styles.selectors.js +52 -52
  109. package/property-filter/styles.css.js +38 -38
  110. package/property-filter/styles.scoped.css +40 -44
  111. package/property-filter/styles.selectors.js +38 -38
  112. package/side-navigation/implementation.d.ts +1 -1
  113. package/side-navigation/implementation.d.ts.map +1 -1
  114. package/side-navigation/implementation.js +2 -1
  115. package/side-navigation/implementation.js.map +1 -1
  116. package/side-navigation/interfaces.d.ts +4 -0
  117. package/side-navigation/interfaces.d.ts.map +1 -1
  118. package/side-navigation/interfaces.js.map +1 -1
  119. package/side-navigation/styles.css.js +30 -29
  120. package/side-navigation/styles.scoped.css +46 -41
  121. package/side-navigation/styles.selectors.js +30 -29
  122. package/test-utils/dom/side-navigation/index.d.ts +1 -0
  123. package/test-utils/dom/side-navigation/index.js +3 -0
  124. package/test-utils/dom/side-navigation/index.js.map +1 -1
  125. package/test-utils/selectors/side-navigation/index.d.ts +1 -0
  126. package/test-utils/selectors/side-navigation/index.js +3 -0
  127. package/test-utils/selectors/side-navigation/index.js.map +1 -1
  128. package/test-utils/tsconfig.tsbuildinfo +1 -1
  129. package/wizard/styles.css.js +30 -30
  130. package/wizard/styles.scoped.css +59 -59
  131. package/wizard/styles.selectors.js +30 -30
@@ -138,7 +138,7 @@
138
138
  */
139
139
  /* Style used for links in slots/components that are text heavy, to help links stand out among
140
140
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
141
- .awsui_universal-toolbar_1kzri_1n996_141:not(#\9) {
141
+ .awsui_universal-toolbar_1kzri_scjlm_141:not(#\9) {
142
142
  background-color: var(--color-background-layout-panel-content-t82vgh, #ffffff);
143
143
  box-sizing: border-box;
144
144
  padding-block: 0;
@@ -150,40 +150,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
150
150
  transition-property: inset-block-start, opacity;
151
151
  }
152
152
  @media (prefers-reduced-motion: reduce) {
153
- .awsui_universal-toolbar_1kzri_1n996_141:not(#\9) {
153
+ .awsui_universal-toolbar_1kzri_scjlm_141:not(#\9) {
154
154
  animation: none;
155
155
  transition: none;
156
156
  }
157
157
  }
158
- .awsui-motion-disabled .awsui_universal-toolbar_1kzri_1n996_141:not(#\9), .awsui-mode-entering .awsui_universal-toolbar_1kzri_1n996_141:not(#\9) {
158
+ .awsui-motion-disabled .awsui_universal-toolbar_1kzri_scjlm_141:not(#\9), .awsui-mode-entering .awsui_universal-toolbar_1kzri_scjlm_141:not(#\9) {
159
159
  animation: none;
160
160
  transition: none;
161
161
  }
162
- .awsui_universal-toolbar_1kzri_1n996_141.awsui_disable-body-scroll_1kzri_1n996_162:not(#\9) {
162
+ .awsui_universal-toolbar_1kzri_scjlm_141.awsui_disable-body-scroll_1kzri_scjlm_162:not(#\9) {
163
163
  inset-block-start: 0px;
164
164
  }
165
- .awsui_universal-toolbar_1kzri_1n996_141.awsui_toolbar-hidden_1kzri_1n996_165:not(#\9) {
165
+ .awsui_universal-toolbar_1kzri_scjlm_141.awsui_toolbar-hidden_1kzri_scjlm_165:not(#\9) {
166
166
  opacity: 0;
167
167
  }
168
- .awsui_universal-toolbar_1kzri_1n996_141 > .awsui_toolbar-container_1kzri_1n996_168:not(#\9) {
169
- block-size: 48px;
168
+ .awsui_universal-toolbar_1kzri_scjlm_141 > .awsui_toolbar-container_1kzri_scjlm_168:not(#\9) {
169
+ block-size: 100%;
170
170
  align-items: center;
171
171
  display: grid;
172
172
  column-gap: var(--space-static-xs-7sfb63, 8px);
173
173
  inline-size: 100%;
174
- grid-template-columns: min-content auto minmax(140px, 1fr);
174
+ grid-template-columns: min-content minmax(0, 3fr) minmax(auto, 1fr);
175
175
  grid-template-rows: 1fr;
176
176
  }
177
- .awsui_universal-toolbar_1kzri_1n996_141 > .awsui_toolbar-container_1kzri_1n996_168 > .awsui_universal-toolbar-nav_1kzri_1n996_177:not(#\9) {
177
+ .awsui_universal-toolbar_1kzri_scjlm_141 > .awsui_toolbar-container_1kzri_scjlm_168 > .awsui_universal-toolbar-nav_1kzri_scjlm_177:not(#\9) {
178
178
  grid-column: 1;
179
179
  padding-inline-end: var(--space-static-xxs-82cdfi, 4px);
180
180
  }
181
- .awsui_universal-toolbar_1kzri_1n996_141 > .awsui_toolbar-container_1kzri_1n996_168 > .awsui_universal-toolbar-breadcrumbs_1kzri_1n996_181:not(#\9) {
181
+ .awsui_universal-toolbar_1kzri_scjlm_141 > .awsui_toolbar-container_1kzri_scjlm_168 > .awsui_universal-toolbar-breadcrumbs_1kzri_scjlm_181:not(#\9) {
182
182
  grid-column: 2;
183
183
  background-color: transparent;
184
184
  flex: 1 0;
185
185
  }
186
- .awsui_universal-toolbar_1kzri_1n996_141 > .awsui_toolbar-container_1kzri_1n996_168 > .awsui_universal-toolbar-drawers_1kzri_1n996_186:not(#\9) {
186
+ .awsui_universal-toolbar_1kzri_scjlm_141 > .awsui_toolbar-container_1kzri_scjlm_168 > .awsui_universal-toolbar-drawers_1kzri_scjlm_186:not(#\9) {
187
187
  grid-column: 3;
188
188
  column-gap: var(--space-static-xs-7sfb63, 8px);
189
189
  display: flex;
@@ -191,8 +191,8 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
191
191
  block-size: 100%;
192
192
  }
193
193
 
194
- .awsui_drawers-desktop-triggers-container_1kzri_1n996_194:not(#\9),
195
- .awsui_drawers-mobile-triggers-container_1kzri_1n996_195:not(#\9) {
194
+ .awsui_drawers-desktop-triggers-container_1kzri_scjlm_194:not(#\9),
195
+ .awsui_drawers-mobile-triggers-container_1kzri_scjlm_195:not(#\9) {
196
196
  border-collapse: separate;
197
197
  border-spacing: 0;
198
198
  box-sizing: border-box;
@@ -239,7 +239,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
239
239
  inline-size: 100%;
240
240
  }
241
241
 
242
- .awsui_drawers-trigger-content_1kzri_1n996_241:not(#\9) {
242
+ .awsui_drawers-trigger-content_1kzri_scjlm_241:not(#\9) {
243
243
  block-size: 100%;
244
244
  align-items: center;
245
245
  display: flex;
@@ -248,13 +248,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
248
248
  justify-content: flex-end;
249
249
  }
250
250
 
251
- .awsui_group-divider_1kzri_1n996_250:not(#\9) {
252
- border-inline-end: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-layout-1zovx9, #b6bec9);
251
+ .awsui_group-divider_1kzri_scjlm_250:not(#\9) {
252
+ border-inline-end: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
253
253
  block-size: 60%;
254
254
  }
255
255
 
256
256
  @media (max-width: 688px) {
257
- .awsui_drawers-trigger_1kzri_1n996_241:not(#\9) {
257
+ .awsui_drawers-trigger_1kzri_scjlm_241:not(#\9) {
258
258
  display: flex;
259
259
  justify-content: center;
260
260
  align-items: center;
@@ -2,17 +2,17 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "universal-toolbar": "awsui_universal-toolbar_1kzri_1n996_141",
6
- "disable-body-scroll": "awsui_disable-body-scroll_1kzri_1n996_162",
7
- "toolbar-hidden": "awsui_toolbar-hidden_1kzri_1n996_165",
8
- "toolbar-container": "awsui_toolbar-container_1kzri_1n996_168",
9
- "universal-toolbar-nav": "awsui_universal-toolbar-nav_1kzri_1n996_177",
10
- "universal-toolbar-breadcrumbs": "awsui_universal-toolbar-breadcrumbs_1kzri_1n996_181",
11
- "universal-toolbar-drawers": "awsui_universal-toolbar-drawers_1kzri_1n996_186",
12
- "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_1kzri_1n996_194",
13
- "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_1kzri_1n996_195",
14
- "drawers-trigger-content": "awsui_drawers-trigger-content_1kzri_1n996_241",
15
- "group-divider": "awsui_group-divider_1kzri_1n996_250",
16
- "drawers-trigger": "awsui_drawers-trigger_1kzri_1n996_241"
5
+ "universal-toolbar": "awsui_universal-toolbar_1kzri_scjlm_141",
6
+ "disable-body-scroll": "awsui_disable-body-scroll_1kzri_scjlm_162",
7
+ "toolbar-hidden": "awsui_toolbar-hidden_1kzri_scjlm_165",
8
+ "toolbar-container": "awsui_toolbar-container_1kzri_scjlm_168",
9
+ "universal-toolbar-nav": "awsui_universal-toolbar-nav_1kzri_scjlm_177",
10
+ "universal-toolbar-breadcrumbs": "awsui_universal-toolbar-breadcrumbs_1kzri_scjlm_181",
11
+ "universal-toolbar-drawers": "awsui_universal-toolbar-drawers_1kzri_scjlm_186",
12
+ "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_1kzri_scjlm_194",
13
+ "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_1kzri_scjlm_195",
14
+ "drawers-trigger-content": "awsui_drawers-trigger-content_1kzri_scjlm_241",
15
+ "group-divider": "awsui_group-divider_1kzri_scjlm_250",
16
+ "drawers-trigger": "awsui_drawers-trigger_1kzri_scjlm_241"
17
17
  };
18
18
 
@@ -1,11 +1,11 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_lpshu_132o9_141",
5
- "trigger": "awsui_trigger_lpshu_132o9_141",
6
- "selected": "awsui_selected_lpshu_132o9_230",
7
- "badge": "awsui_badge_lpshu_132o9_250",
8
- "trigger-wrapper": "awsui_trigger-wrapper_lpshu_132o9_254",
9
- "dot": "awsui_dot_lpshu_132o9_262"
4
+ "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_lpshu_1fc5q_141",
5
+ "trigger": "awsui_trigger_lpshu_1fc5q_141",
6
+ "selected": "awsui_selected_lpshu_1fc5q_230",
7
+ "badge": "awsui_badge_lpshu_1fc5q_250",
8
+ "trigger-wrapper": "awsui_trigger-wrapper_lpshu_1fc5q_254",
9
+ "dot": "awsui_dot_lpshu_1fc5q_262"
10
10
  };
11
11
 
@@ -138,15 +138,15 @@
138
138
  */
139
139
  /* Style used for links in slots/components that are text heavy, to help links stand out among
140
140
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
141
- .awsui_trigger-badge-wrapper_lpshu_132o9_141:not(#\9) {
141
+ .awsui_trigger-badge-wrapper_lpshu_1fc5q_141:not(#\9) {
142
142
  background: transparent;
143
143
  color: var(--color-text-interactive-default-lnx6lk, #414d5c);
144
144
  border-start-start-radius: 50%;
145
145
  border-start-end-radius: 50%;
146
146
  border-end-start-radius: 50%;
147
147
  border-end-end-radius: 50%;
148
- block-size: 34px;
149
- inline-size: 34px;
148
+ block-size: 30px;
149
+ inline-size: 30px;
150
150
  display: flex;
151
151
  align-items: center;
152
152
  justify-content: center;
@@ -160,15 +160,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
160
160
  clip-path: path("M32.185 9.34876C31.1913 10.1916 29.905 10.7 28.4999 10.7C25.3519 10.7 22.7999 8.14803 22.7999 5C22.7999 3.68192 23.2473 2.46833 23.9985 1.50281C21.8642 0.537421 19.4948 0 17 0C7.61116 0 0 7.61116 0 17C0 26.3888 7.61116 34 17 34C26.3888 34 34 26.3888 34 17C34 14.2479 33.346 11.6485 32.185 9.34876Z");
161
161
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
162
162
  }
163
- .awsui_trigger-badge-wrapper_lpshu_132o9_141:not(#\9):hover {
163
+ .awsui_trigger-badge-wrapper_lpshu_1fc5q_141:not(#\9):hover {
164
164
  background: var(--color-background-input-disabled-ab59a3, #e9ebed);
165
165
  color: var(--color-text-interactive-hover-mj8add, #000716);
166
166
  }
167
- .awsui_trigger-badge-wrapper_lpshu_132o9_141:not(#\9):active {
167
+ .awsui_trigger-badge-wrapper_lpshu_1fc5q_141:not(#\9):active {
168
168
  background: var(--color-background-control-disabled-pwkvgd, #d1d5db);
169
169
  color: var(--color-text-interactive-hover-mj8add, #000716);
170
170
  }
171
- .awsui_trigger-badge-wrapper_lpshu_132o9_141:not(#\9):dir(rtl) {
171
+ .awsui_trigger-badge-wrapper_lpshu_1fc5q_141:not(#\9):dir(rtl) {
172
172
  clip-path: path("M1.81502 9.34876C2.80869 10.1916 4.09501 10.7 5.50007 10.7C8.6481 10.7 11.2001 8.14803 11.2001 5C11.2001 3.68192 10.7527 2.46833 10.0015 1.50281C12.1358 0.537421 14.5052 0 17 0C26.3888 0 34 7.61116 34 17C34 26.3888 26.3888 34 17 34C7.61116 34 0 26.3888 0 17C0 14.2479 0.653984 11.6485 1.81502 9.34876Z");
173
173
  }
174
174
 
@@ -177,15 +177,15 @@ Warning! If these design tokens for width change it will adversely impact
177
177
  the calculation used to determine the Split Panel maximum width in the
178
178
  handleSplitPanelMaxWidth function in the context.
179
179
  */
180
- .awsui_trigger_lpshu_132o9_141:not(#\9) {
180
+ .awsui_trigger_lpshu_1fc5q_141:not(#\9) {
181
181
  background: transparent;
182
182
  color: var(--color-text-interactive-default-lnx6lk, #414d5c);
183
183
  border-start-start-radius: 50%;
184
184
  border-start-end-radius: 50%;
185
185
  border-end-start-radius: 50%;
186
186
  border-end-end-radius: 50%;
187
- block-size: 34px;
188
- inline-size: 34px;
187
+ block-size: 30px;
188
+ inline-size: 30px;
189
189
  display: flex;
190
190
  align-items: center;
191
191
  justify-content: center;
@@ -195,22 +195,22 @@ handleSplitPanelMaxWidth function in the context.
195
195
  cursor: pointer;
196
196
  pointer-events: auto;
197
197
  }
198
- .awsui_trigger_lpshu_132o9_141:not(#\9):hover {
198
+ .awsui_trigger_lpshu_1fc5q_141:not(#\9):hover {
199
199
  background: var(--color-background-input-disabled-ab59a3, #e9ebed);
200
200
  color: var(--color-text-interactive-hover-mj8add, #000716);
201
201
  }
202
- .awsui_trigger_lpshu_132o9_141:not(#\9):active {
202
+ .awsui_trigger_lpshu_1fc5q_141:not(#\9):active {
203
203
  background: var(--color-background-control-disabled-pwkvgd, #d1d5db);
204
204
  color: var(--color-text-interactive-hover-mj8add, #000716);
205
205
  }
206
- body[data-awsui-focus-visible=true] .awsui_trigger_lpshu_132o9_141:not(#\9):focus {
206
+ body[data-awsui-focus-visible=true] .awsui_trigger_lpshu_1fc5q_141:not(#\9):focus {
207
207
  position: relative;
208
208
  }
209
- body[data-awsui-focus-visible=true] .awsui_trigger_lpshu_132o9_141:not(#\9):focus {
209
+ body[data-awsui-focus-visible=true] .awsui_trigger_lpshu_1fc5q_141:not(#\9):focus {
210
210
  outline: 2px dotted transparent;
211
211
  outline-offset: calc(3px - 1px);
212
212
  }
213
- body[data-awsui-focus-visible=true] .awsui_trigger_lpshu_132o9_141:not(#\9):focus::before {
213
+ body[data-awsui-focus-visible=true] .awsui_trigger_lpshu_1fc5q_141:not(#\9):focus::before {
214
214
  content: " ";
215
215
  display: block;
216
216
  position: absolute;
@@ -224,34 +224,34 @@ body[data-awsui-focus-visible=true] .awsui_trigger_lpshu_132o9_141:not(#\9):focu
224
224
  border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
225
225
  box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
226
226
  }
227
- .awsui_trigger_lpshu_132o9_141:not(#\9):focus {
227
+ .awsui_trigger_lpshu_1fc5q_141:not(#\9):focus {
228
228
  outline: none;
229
229
  }
230
- .awsui_trigger_lpshu_132o9_141.awsui_selected_lpshu_132o9_230:not(#\9) {
230
+ .awsui_trigger_lpshu_1fc5q_141.awsui_selected_lpshu_1fc5q_230:not(#\9) {
231
231
  background: var(--color-background-layout-toggle-selected-default-caco0q, #0972d3);
232
232
  color: var(--color-text-layout-toggle-selected-b93usl, #ffffff);
233
233
  }
234
- .awsui_trigger_lpshu_132o9_141.awsui_selected_lpshu_132o9_230:not(#\9):hover {
234
+ .awsui_trigger_lpshu_1fc5q_141.awsui_selected_lpshu_1fc5q_230:not(#\9):hover {
235
235
  background: var(--color-background-layout-toggle-selected-hover-kjak2q, #065299);
236
236
  }
237
- .awsui_trigger_lpshu_132o9_141.awsui_selected_lpshu_132o9_230:not(#\9):active {
237
+ .awsui_trigger_lpshu_1fc5q_141.awsui_selected_lpshu_1fc5q_230:not(#\9):active {
238
238
  background: var(--color-background-layout-toggle-selected-active-xfk480, #0972d3);
239
239
  }
240
- .awsui_trigger_lpshu_132o9_141.awsui_selected_lpshu_132o9_230 > .awsui_trigger-badge-wrapper_lpshu_132o9_141:not(#\9) {
240
+ .awsui_trigger_lpshu_1fc5q_141.awsui_selected_lpshu_1fc5q_230 > .awsui_trigger-badge-wrapper_lpshu_1fc5q_141:not(#\9) {
241
241
  background: var(--color-background-layout-toggle-selected-default-caco0q, #0972d3);
242
242
  color: var(--color-text-layout-toggle-selected-b93usl, #ffffff);
243
243
  }
244
- .awsui_trigger_lpshu_132o9_141.awsui_selected_lpshu_132o9_230 > .awsui_trigger-badge-wrapper_lpshu_132o9_141:not(#\9):hover {
244
+ .awsui_trigger_lpshu_1fc5q_141.awsui_selected_lpshu_1fc5q_230 > .awsui_trigger-badge-wrapper_lpshu_1fc5q_141:not(#\9):hover {
245
245
  background: var(--color-background-layout-toggle-selected-hover-kjak2q, #065299);
246
246
  }
247
- .awsui_trigger_lpshu_132o9_141.awsui_selected_lpshu_132o9_230 > .awsui_trigger-badge-wrapper_lpshu_132o9_141:not(#\9):active {
247
+ .awsui_trigger_lpshu_1fc5q_141.awsui_selected_lpshu_1fc5q_230 > .awsui_trigger-badge-wrapper_lpshu_1fc5q_141:not(#\9):active {
248
248
  background: var(--color-background-layout-toggle-selected-active-xfk480, #0972d3);
249
249
  }
250
- .awsui_trigger_lpshu_132o9_141.awsui_badge_lpshu_132o9_250:not(#\9), .awsui_trigger_lpshu_132o9_141.awsui_badge_lpshu_132o9_250:not(#\9):hover, .awsui_trigger_lpshu_132o9_141.awsui_badge_lpshu_132o9_250:not(#\9):active {
250
+ .awsui_trigger_lpshu_1fc5q_141.awsui_badge_lpshu_1fc5q_250:not(#\9), .awsui_trigger_lpshu_1fc5q_141.awsui_badge_lpshu_1fc5q_250:not(#\9):hover, .awsui_trigger_lpshu_1fc5q_141.awsui_badge_lpshu_1fc5q_250:not(#\9):active {
251
251
  background: transparent;
252
252
  }
253
253
 
254
- .awsui_trigger-wrapper_lpshu_132o9_254:not(#\9) {
254
+ .awsui_trigger-wrapper_lpshu_1fc5q_254:not(#\9) {
255
255
  position: relative;
256
256
  border-start-start-radius: 50%;
257
257
  border-start-end-radius: 50%;
@@ -259,7 +259,7 @@ body[data-awsui-focus-visible=true] .awsui_trigger_lpshu_132o9_141:not(#\9):focu
259
259
  border-end-end-radius: 50%;
260
260
  }
261
261
 
262
- .awsui_dot_lpshu_132o9_262:not(#\9) {
262
+ .awsui_dot_lpshu_1fc5q_262:not(#\9) {
263
263
  position: absolute;
264
264
  inline-size: 8px;
265
265
  block-size: 8px;
@@ -2,11 +2,11 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_lpshu_132o9_141",
6
- "trigger": "awsui_trigger_lpshu_132o9_141",
7
- "selected": "awsui_selected_lpshu_132o9_230",
8
- "badge": "awsui_badge_lpshu_132o9_250",
9
- "trigger-wrapper": "awsui_trigger-wrapper_lpshu_132o9_254",
10
- "dot": "awsui_dot_lpshu_132o9_262"
5
+ "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_lpshu_1fc5q_141",
6
+ "trigger": "awsui_trigger_lpshu_1fc5q_141",
7
+ "selected": "awsui_selected_lpshu_1fc5q_230",
8
+ "badge": "awsui_badge_lpshu_1fc5q_250",
9
+ "trigger-wrapper": "awsui_trigger-wrapper_lpshu_1fc5q_254",
10
+ "dot": "awsui_dot_lpshu_1fc5q_262"
11
11
  };
12
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/implementation.tsx"],"names":[],"mappings":";AAqBA,OAAO,EAAE,oBAAoB,EAAyB,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAyEzG,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,EAC7G,KAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,kCAAkC,EAClC,GAAG,KAAK,EACT,EAAE,4BAA4B,CAAC,CAAC,CAAC,eA4FjC;AAED,eAAO,MAAM,+BAA+B,qGAA2D,CAAC"}
1
+ {"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/implementation.tsx"],"names":[],"mappings":";AAqBA,OAAO,EAAE,oBAAoB,EAAyB,4BAA4B,EAAE,MAAM,cAAc,CAAC;AA0EzG,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,EAC7G,KAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,kCAAkC,EAClC,GAAG,KAAK,EACT,EAAE,4BAA4B,CAAC,CAAC,CAAC,eA4FjC;AAED,eAAO,MAAM,+BAA+B,qGAA2D,CAAC"}
@@ -31,7 +31,7 @@ const EllipsisDropdown = ({ ariaLabel, dropdownItems, onDropdownItemClick, onDro
31
31
  var _a;
32
32
  const i18n = useInternalI18n('breadcrumb-group');
33
33
  return (React.createElement("li", { className: styles.ellipsis },
34
- React.createElement(InternalButtonDropdown, { ariaLabel: (_a = i18n('expandAriaLabel', ariaLabel)) !== null && _a !== void 0 ? _a : DEFAULT_EXPAND_ARIA_LABEL, items: dropdownItems, onItemClick: onDropdownItemClick, onItemFollow: onDropdownItemFollow, customTriggerBuilder: getDropdownTrigger, analyticsMetadataTransformer: metadata => {
34
+ React.createElement(InternalButtonDropdown, { ariaLabel: (_a = i18n('expandAriaLabel', ariaLabel)) !== null && _a !== void 0 ? _a : DEFAULT_EXPAND_ARIA_LABEL, items: dropdownItems, onItemClick: onDropdownItemClick, onItemFollow: onDropdownItemFollow, customTriggerBuilder: getDropdownTrigger, linkStyle: true, analyticsMetadataTransformer: metadata => {
35
35
  var _a, _b;
36
36
  if ((_a = metadata.detail) === null || _a === void 0 ? void 0 : _a.id) {
37
37
  delete metadata.detail.id;
@@ -1 +1 @@
1
- {"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAMhE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC;;GAEG;AACH,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAE9C,MAAM,kBAAkB,GAAG,CAAC,EAC1B,SAA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M,0BAA0B,GAAuD;QACrF,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACxB,CAAC;IAEF,OAAO,CACL,6CACM,SAAS,IACb,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,kBAAkB,CAAC,EAC1B,QAAQ,IAAI,MAAM,CAAC,MAAM,EACzB,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,EAC3C,SAAS,CAAC,SAAS,CACpB,gBACW,SAAS,IAAI,SAAS,EAClC,GAAG,EAAE,iBAAiB,IAClB,CAAC,kCAAkC;QACrC,CAAC,mBACM,6BAA6B,CAAC;YAC/B,SAAS,EAAE,0BAA0B;SACtC,CAAC,EAEN,CAAC,CAAC,EAAE,CAAC;QAEP,4BAAI,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,IAAG,eAAe,CAAM,CAClE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,yBAAyB,CAAC,6BAA6B,CAAC,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 { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { CustomTriggerProps, LinkItem } from '../button-dropdown/interfaces';\nimport InternalButtonDropdown from '../button-dropdown/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent } from '../internal/events';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport {\n GeneratedAnalyticsMetadataBreadcrumbGroupClick,\n GeneratedAnalyticsMetadataBreadcrumbGroupComponent,\n} from './analytics-metadata/interfaces';\nimport { BreadcrumbGroupProps, EllipsisDropdownProps, InternalBreadcrumbGroupProps } from './interfaces';\nimport { BreadcrumbItem } from './item/item';\nimport { getEventDetail } from './utils';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\n/**\n * Provided for backwards compatibility\n */\nconst DEFAULT_EXPAND_ARIA_LABEL = 'Show path';\n\nconst getDropdownTrigger = ({\n ariaLabel,\n triggerRef,\n disabled,\n testUtilsClass,\n isOpen,\n onClick,\n}: CustomTriggerProps) => {\n return (\n <InternalButton\n ref={triggerRef}\n className={testUtilsClass}\n disabled={disabled}\n onClick={event => {\n event.preventDefault();\n onClick();\n }}\n ariaExpanded={isOpen}\n aria-haspopup={true}\n ariaLabel={ariaLabel}\n variant=\"breadcrumb-group\"\n formAction=\"none\"\n >\n ...\n </InternalButton>\n );\n};\n\nconst EllipsisDropdown = ({\n ariaLabel,\n dropdownItems,\n onDropdownItemClick,\n onDropdownItemFollow,\n}: EllipsisDropdownProps) => {\n const i18n = useInternalI18n('breadcrumb-group');\n\n return (\n <li className={styles.ellipsis}>\n <InternalButtonDropdown\n ariaLabel={i18n('expandAriaLabel', ariaLabel) ?? DEFAULT_EXPAND_ARIA_LABEL}\n items={dropdownItems}\n onItemClick={onDropdownItemClick}\n onItemFollow={onDropdownItemFollow}\n customTriggerBuilder={getDropdownTrigger}\n analyticsMetadataTransformer={metadata => {\n if (metadata.detail?.id) {\n delete metadata.detail.id;\n }\n if (metadata.detail?.position) {\n metadata.detail.position = `${parseInt(metadata.detail.position as string, 10) + 1}`;\n }\n return metadata;\n }}\n />\n <span className={styles.icon}>\n <InternalIcon name=\"angle-right\" />\n </span>\n </li>\n );\n};\n\nexport function BreadcrumbGroupImplementation<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>({\n items = [],\n ariaLabel,\n expandAriaLabel,\n onClick,\n onFollow,\n __internalRootRef,\n __injectAnalyticsComponentMetadata,\n ...props\n}: InternalBreadcrumbGroupProps<T>) {\n for (const item of items) {\n checkSafeUrl('BreadcrumbGroup', item.href);\n }\n const baseProps = getBaseProps(props);\n const isMobile = useMobile();\n\n let breadcrumbItems = items.map((item, index) => {\n const isLast = index === items.length - 1;\n\n const clickAnalyticsMetadata: GeneratedAnalyticsMetadataBreadcrumbGroupClick = {\n action: 'click',\n detail: {\n position: `${index + 1}`,\n label: `.${analyticsSelectors['breadcrumb-item']}`,\n href: item.href || '',\n },\n };\n\n return (\n <li\n className={styles.item}\n key={index}\n {...(isLast ? {} : getAnalyticsMetadataAttribute(clickAnalyticsMetadata))}\n >\n <BreadcrumbItem\n item={item}\n onClick={onClick}\n onFollow={onFollow}\n isCompressed={isMobile}\n isLast={isLast}\n isDisplayed={!isMobile || isLast || index === 0}\n />\n </li>\n );\n });\n\n const getEventItem = (e: CustomEvent<{ id: string }>) => {\n const { id } = e.detail;\n return items[parseInt(id)];\n };\n\n // Add ellipsis\n if (breadcrumbItems.length >= 2) {\n const dropdownItems: Array<LinkItem> = items\n .slice(1, items.length - 1)\n .map((item: BreadcrumbGroupProps.Item, index: number) => ({\n id: (index + 1).toString(), // the first item doesn't get inside dropdown\n text: item.text,\n href: item.href || '#',\n }));\n\n breadcrumbItems = [\n breadcrumbItems[0],\n <EllipsisDropdown\n key={'ellipsis'}\n ariaLabel={expandAriaLabel}\n dropdownItems={dropdownItems}\n onDropdownItemClick={e => fireCancelableEvent(onClick, getEventDetail(getEventItem(e)), e)}\n onDropdownItemFollow={e => fireCancelableEvent(onFollow, getEventDetail(getEventItem(e)), e)}\n />,\n ...breadcrumbItems.slice(1),\n ];\n }\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataBreadcrumbGroupComponent = {\n name: 'awsui.BreadcrumbGroup',\n label: { root: 'self' },\n };\n\n return (\n <nav\n {...baseProps}\n className={clsx(\n styles['breadcrumb-group'],\n isMobile && styles.mobile,\n items.length <= 2 && styles['mobile-short'],\n baseProps.className\n )}\n aria-label={ariaLabel || undefined}\n ref={__internalRootRef}\n {...(__injectAnalyticsComponentMetadata\n ? {\n ...getAnalyticsMetadataAttribute({\n component: componentAnalyticsMetadata,\n }),\n }\n : {})}\n >\n <ol className={styles['breadcrumb-group-list']}>{breadcrumbItems}</ol>\n </nav>\n );\n}\n\nexport const createWidgetizedBreadcrumbGroup = createWidgetizedComponent(BreadcrumbGroupImplementation);\n"]}
1
+ {"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAMhE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC;;GAEG;AACH,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAE9C,MAAM,kBAAkB,GAAG,CAAC,EAC1B,SAAS,EACT,UAAU,EACV,QAAQ,EACR,cAAc,EACd,MAA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F,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACxB,CAAC;IAEF,OAAO,CACL,6CACM,SAAS,IACb,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,kBAAkB,CAAC,EAC1B,QAAQ,IAAI,MAAM,CAAC,MAAM,EACzB,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,EAC3C,SAAS,CAAC,SAAS,CACpB,gBACW,SAAS,IAAI,SAAS,EAClC,GAAG,EAAE,iBAAiB,IAClB,CAAC,kCAAkC;QACrC,CAAC,mBACM,6BAA6B,CAAC;YAC/B,SAAS,EAAE,0BAA0B;SACtC,CAAC,EAEN,CAAC,CAAC,EAAE,CAAC;QAEP,4BAAI,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,IAAG,eAAe,CAAM,CAClE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,yBAAyB,CAAC,6BAA6B,CAAC,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 { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { CustomTriggerProps, LinkItem } from '../button-dropdown/interfaces';\nimport InternalButtonDropdown from '../button-dropdown/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent } from '../internal/events';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport {\n GeneratedAnalyticsMetadataBreadcrumbGroupClick,\n GeneratedAnalyticsMetadataBreadcrumbGroupComponent,\n} from './analytics-metadata/interfaces';\nimport { BreadcrumbGroupProps, EllipsisDropdownProps, InternalBreadcrumbGroupProps } from './interfaces';\nimport { BreadcrumbItem } from './item/item';\nimport { getEventDetail } from './utils';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\n/**\n * Provided for backwards compatibility\n */\nconst DEFAULT_EXPAND_ARIA_LABEL = 'Show path';\n\nconst getDropdownTrigger = ({\n ariaLabel,\n triggerRef,\n disabled,\n testUtilsClass,\n isOpen,\n onClick,\n}: CustomTriggerProps) => {\n return (\n <InternalButton\n ref={triggerRef}\n className={testUtilsClass}\n disabled={disabled}\n onClick={event => {\n event.preventDefault();\n onClick();\n }}\n ariaExpanded={isOpen}\n aria-haspopup={true}\n ariaLabel={ariaLabel}\n variant=\"breadcrumb-group\"\n formAction=\"none\"\n >\n ...\n </InternalButton>\n );\n};\n\nconst EllipsisDropdown = ({\n ariaLabel,\n dropdownItems,\n onDropdownItemClick,\n onDropdownItemFollow,\n}: EllipsisDropdownProps) => {\n const i18n = useInternalI18n('breadcrumb-group');\n\n return (\n <li className={styles.ellipsis}>\n <InternalButtonDropdown\n ariaLabel={i18n('expandAriaLabel', ariaLabel) ?? DEFAULT_EXPAND_ARIA_LABEL}\n items={dropdownItems}\n onItemClick={onDropdownItemClick}\n onItemFollow={onDropdownItemFollow}\n customTriggerBuilder={getDropdownTrigger}\n linkStyle={true}\n analyticsMetadataTransformer={metadata => {\n if (metadata.detail?.id) {\n delete metadata.detail.id;\n }\n if (metadata.detail?.position) {\n metadata.detail.position = `${parseInt(metadata.detail.position as string, 10) + 1}`;\n }\n return metadata;\n }}\n />\n <span className={styles.icon}>\n <InternalIcon name=\"angle-right\" />\n </span>\n </li>\n );\n};\n\nexport function BreadcrumbGroupImplementation<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>({\n items = [],\n ariaLabel,\n expandAriaLabel,\n onClick,\n onFollow,\n __internalRootRef,\n __injectAnalyticsComponentMetadata,\n ...props\n}: InternalBreadcrumbGroupProps<T>) {\n for (const item of items) {\n checkSafeUrl('BreadcrumbGroup', item.href);\n }\n const baseProps = getBaseProps(props);\n const isMobile = useMobile();\n\n let breadcrumbItems = items.map((item, index) => {\n const isLast = index === items.length - 1;\n\n const clickAnalyticsMetadata: GeneratedAnalyticsMetadataBreadcrumbGroupClick = {\n action: 'click',\n detail: {\n position: `${index + 1}`,\n label: `.${analyticsSelectors['breadcrumb-item']}`,\n href: item.href || '',\n },\n };\n\n return (\n <li\n className={styles.item}\n key={index}\n {...(isLast ? {} : getAnalyticsMetadataAttribute(clickAnalyticsMetadata))}\n >\n <BreadcrumbItem\n item={item}\n onClick={onClick}\n onFollow={onFollow}\n isCompressed={isMobile}\n isLast={isLast}\n isDisplayed={!isMobile || isLast || index === 0}\n />\n </li>\n );\n });\n\n const getEventItem = (e: CustomEvent<{ id: string }>) => {\n const { id } = e.detail;\n return items[parseInt(id)];\n };\n\n // Add ellipsis\n if (breadcrumbItems.length >= 2) {\n const dropdownItems: Array<LinkItem> = items\n .slice(1, items.length - 1)\n .map((item: BreadcrumbGroupProps.Item, index: number) => ({\n id: (index + 1).toString(), // the first item doesn't get inside dropdown\n text: item.text,\n href: item.href || '#',\n }));\n\n breadcrumbItems = [\n breadcrumbItems[0],\n <EllipsisDropdown\n key={'ellipsis'}\n ariaLabel={expandAriaLabel}\n dropdownItems={dropdownItems}\n onDropdownItemClick={e => fireCancelableEvent(onClick, getEventDetail(getEventItem(e)), e)}\n onDropdownItemFollow={e => fireCancelableEvent(onFollow, getEventDetail(getEventItem(e)), e)}\n />,\n ...breadcrumbItems.slice(1),\n ];\n }\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataBreadcrumbGroupComponent = {\n name: 'awsui.BreadcrumbGroup',\n label: { root: 'self' },\n };\n\n return (\n <nav\n {...baseProps}\n className={clsx(\n styles['breadcrumb-group'],\n isMobile && styles.mobile,\n items.length <= 2 && styles['mobile-short'],\n baseProps.className\n )}\n aria-label={ariaLabel || undefined}\n ref={__internalRootRef}\n {...(__injectAnalyticsComponentMetadata\n ? {\n ...getAnalyticsMetadataAttribute({\n component: componentAnalyticsMetadata,\n }),\n }\n : {})}\n >\n <ol className={styles['breadcrumb-group-list']}>{breadcrumbItems}</ol>\n </nav>\n );\n}\n\nexport const createWidgetizedBreadcrumbGroup = createWidgetizedComponent(BreadcrumbGroupImplementation);\n"]}
@@ -13,7 +13,7 @@ export interface BreadcrumbGroupProps<T extends BreadcrumbGroupProps.Item = Brea
13
13
  * to ensure that valid markup is generated.
14
14
 
15
15
  * Note: The last breadcrumb item is automatically considered the current item, and it's
16
- * attributed with the proper `aria-current` value and rendered as inactive.
16
+ * not a link.
17
17
  */
18
18
  items: ReadonlyArray<T>;
19
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { LinkItem } from '../button-dropdown/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface BreadcrumbGroupProps<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>\n extends BaseComponentProps {\n /**\n * An array of breadcrumb items that describes the link hierarchy for this navigation.\n * Each option has the following properties:\n\n * * `text` (string) - Specifies the title text of the breadcrumb item.\n * * `href` (string) - Specifies the URL for the link in the breadcrumb item.\n * You should specify the link even if you have a click handler for a breadcrumb item\n * to ensure that valid markup is generated.\n\n * Note: The last breadcrumb item is automatically considered the current item, and it's\n * attributed with the proper `aria-current` value and rendered as inactive.\n */\n items: ReadonlyArray<T>;\n /**\n * Provides an `aria-label` to the breadcrumb group that screen readers can read (for accessibility).\n */\n ariaLabel?: string;\n\n /**\n * Provides an `aria-label` to the ellipsis button that screen readers can read (for accessibility).\n * @i18n\n */\n expandAriaLabel?: string;\n /**\n * Called when the user clicks on a breadcrumb item.\n */\n onClick?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n /**\n * Called when the user clicks on a breadcrumb item with the left mouse button\n * without pressing modifier keys (that is, CTRL, ALT, SHIFT, META).\n */\n onFollow?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n}\n\nexport namespace BreadcrumbGroupProps {\n export interface Item {\n text: string;\n href: string;\n }\n\n export interface ClickDetail<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>\n extends BaseNavigationDetail {\n item: T;\n text: string;\n href: string;\n }\n}\n\nexport type InternalBreadcrumbGroupProps<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item> =\n BreadcrumbGroupProps<T> &\n InternalBaseComponentProps & {\n __injectAnalyticsComponentMetadata?: boolean;\n };\n\nexport interface BreadcrumbItemProps<T extends BreadcrumbGroupProps.Item> {\n item: T;\n isDisplayed: boolean;\n isLast?: boolean;\n isCompressed?: boolean;\n onClick?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n onFollow?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n}\n\nexport interface EllipsisDropdownProps {\n ariaLabel?: BreadcrumbGroupProps['expandAriaLabel'];\n dropdownItems: ReadonlyArray<LinkItem>;\n onDropdownItemClick: CancelableEventHandler<{ id: string }>;\n onDropdownItemFollow: CancelableEventHandler<{ id: string }>;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { LinkItem } from '../button-dropdown/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface BreadcrumbGroupProps<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>\n extends BaseComponentProps {\n /**\n * An array of breadcrumb items that describes the link hierarchy for this navigation.\n * Each option has the following properties:\n\n * * `text` (string) - Specifies the title text of the breadcrumb item.\n * * `href` (string) - Specifies the URL for the link in the breadcrumb item.\n * You should specify the link even if you have a click handler for a breadcrumb item\n * to ensure that valid markup is generated.\n\n * Note: The last breadcrumb item is automatically considered the current item, and it's\n * not a link.\n */\n items: ReadonlyArray<T>;\n /**\n * Provides an `aria-label` to the breadcrumb group that screen readers can read (for accessibility).\n */\n ariaLabel?: string;\n\n /**\n * Provides an `aria-label` to the ellipsis button that screen readers can read (for accessibility).\n * @i18n\n */\n expandAriaLabel?: string;\n /**\n * Called when the user clicks on a breadcrumb item.\n */\n onClick?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n /**\n * Called when the user clicks on a breadcrumb item with the left mouse button\n * without pressing modifier keys (that is, CTRL, ALT, SHIFT, META).\n */\n onFollow?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n}\n\nexport namespace BreadcrumbGroupProps {\n export interface Item {\n text: string;\n href: string;\n }\n\n export interface ClickDetail<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>\n extends BaseNavigationDetail {\n item: T;\n text: string;\n href: string;\n }\n}\n\nexport type InternalBreadcrumbGroupProps<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item> =\n BreadcrumbGroupProps<T> &\n InternalBaseComponentProps & {\n __injectAnalyticsComponentMetadata?: boolean;\n };\n\nexport interface BreadcrumbItemProps<T extends BreadcrumbGroupProps.Item> {\n item: T;\n isDisplayed: boolean;\n isLast?: boolean;\n isCompressed?: boolean;\n onClick?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n onFollow?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n}\n\nexport interface EllipsisDropdownProps {\n ariaLabel?: BreadcrumbGroupProps['expandAriaLabel'];\n dropdownItems: ReadonlyArray<LinkItem>;\n onDropdownItemClick: CancelableEventHandler<{ id: string }>;\n onDropdownItemFollow: CancelableEventHandler<{ id: string }>;\n}\n"]}
@@ -208,6 +208,7 @@ export interface ItemListProps extends HighlightProps {
208
208
  variant?: InternalButtonDropdownProps['variant'];
209
209
  position?: string;
210
210
  analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];
211
+ linkStyle?: boolean;
211
212
  }
212
213
  export interface LinkItem extends ButtonDropdownProps.Item {
213
214
  href: string;
@@ -224,6 +225,7 @@ export interface ItemProps {
224
225
  variant?: ItemListProps['variant'];
225
226
  position?: string;
226
227
  analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];
228
+ linkStyle?: boolean;
227
229
  }
228
230
  export interface InternalItem extends ButtonDropdownProps.Item {
229
231
  badge?: boolean;
@@ -255,6 +257,11 @@ export interface InternalButtonDropdownProps extends Omit<ButtonDropdownProps, '
255
257
  * instead of dropping left or right.
256
258
  */
257
259
  preferCenter?: boolean;
260
+ /**
261
+ * Determines whether simple items should be displayed with the link styles.
262
+ * Used in Breadcrumb group component for collapsed breadcrumbs
263
+ */
264
+ linkStyle?: boolean;
258
265
  analyticsMetadataTransformer?: (input: GeneratedAnalyticsMetadataFragment) => GeneratedAnalyticsMetadataFragment;
259
266
  }
260
267
  export interface CustomTriggerProps {
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kCAAkC,EAAE,MAAM,kEAAkE,CAAC;AAEtH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAA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AC;IAEvB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,4BAA4B,CAAC,EAAE,CAAC,KAAK,EAAE,kCAAkC,KAAK,kCAAkC,CAAC;CAClH;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/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';\n\nimport { GeneratedAnalyticsMetadataFragment } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewport {\n /**\n * Array of objects with a number of supported types.\n *\n * The following properties are supported across all types:\n *\n * - `type` (string) - The type of the item. Can be `action`, `group`, `checkbox`. Defaults to `action` if `items` undefined and `group` otherwise.\n * - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories.\n * - `text` (string) - description shown in the menu for this item. Mandatory for individual items, optional for categories.\n * - `lang` (string) - (Optional) The language of the item, provided as a BCP 47 language tag.\n * - `disabled` (boolean) - whether the item is disabled. Disabled items are not clickable, but they can be highlighted with the keyboard to make them accessible.\n * - `disabledReason` (string) - (Optional) Displays text near the `text` property when item is disabled. Use to provide additional context.\n * - `description` (string) - additional data that will be passed to a `data-description` attribute.\n * - `ariaLabel` (string) - (Optional) - ARIA label of the item element.\n *\n * ### action\n *\n * - `href` (string) - (Optional) Defines the target URL of the menu item, turning it into a link.\n * - `external` (boolean) - Marks a menu item as external by adding an icon after the menu item text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * - `externalIconAriaLabel` (string) - Adds an `aria-label` to the external icon.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * ### checkbox\n *\n * When `type` is set to \"checkbox\", the values set to `href`, `external` and `externalIconAriaLabel` will be ignored.\n *\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * ### group\n *\n * - `items` (ReadonlyArray<Item>) - an array of item objects. Items will be rendered as nested menu items but only for the first nesting level, multi-nesting is not supported.\n * An item which belongs to nested group has the following properties: `id`, `text`, `disabled`, and `description`.\n *\n */\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n /**\n * Determines whether the button dropdown is disabled. Users cannot interact with the control if it's disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button dropdown is disabled (only when `disabled` is `true`).\n * If provided, the disabled button becomes focusable.\n */\n disabledReason?: string;\n /**\n * Renders the button as being in a loading state. It takes precedence over the `disabled` if both are set to `true`.\n * It prevents clicks.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button dropdown is in a loading state.\n */\n loadingText?: string;\n /** Determines the general styling of the button dropdown.\n * * `primary` for primary buttons\n * * `normal` for secondary buttons\n * * `icon` for icon buttons\n * * `inline-icon` for icon buttons with no outer padding\n */\n variant?: ButtonDropdownProps.Variant;\n /**\n * Controls expandability of the item groups.\n */\n expandableGroups?: boolean;\n /**\n * Adds `aria-label` to the button dropdown trigger.\n * Use this to provide an accessible name for buttons that don't have visible text.\n */\n ariaLabel?: string;\n /**\n * Text displayed in the button dropdown trigger.\n * @displayname text\n */\n children?: React.ReactNode;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * Called when the user clicks on an item with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the item has an `href` set.\n */\n onItemFollow?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * A standalone action that is shown prior to the dropdown trigger.\n * Use it with \"primary\" and \"normal\" variant only.\n *\n * Main action properties:\n * * `text` (string) - Specifies the text shown in the main action.\n * * `external` (boolean) - Marks the main action as external by adding an icon after the text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * * `externalIconAriaLabel` (string) - Adds an ARIA label to the external icon.\n *\n * The main action also supports the following properties of the [button](/components/button/?tabId=api) component:\n * `ariaLabel`, `disabled`, `loading`, `loadingText`, `href`, `target`, `rel`, `download`, `iconAlt`, `iconName`, `iconUrl`, `iconSvg`, `onClick`, `onFollow`.\n */\n mainAction?: ButtonDropdownProps.MainAction;\n}\n\nexport namespace ButtonDropdownProps {\n export type Variant = 'normal' | 'primary' | 'icon' | 'inline-icon';\n export type ItemType = 'action' | 'group';\n\n export interface MainAction {\n text?: string;\n ariaLabel?: string;\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface Item {\n itemType?: ItemType;\n id: string;\n text: string;\n ariaLabel?: string;\n lang?: string;\n disabled?: boolean;\n disabledReason?: string;\n description?: string;\n href?: string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface CheckboxItem\n extends Omit<ButtonDropdownProps.Item, 'href' | 'external' | 'externalIconAriaLabel' | 'itemType'> {\n itemType: 'checkbox';\n checked: boolean;\n }\n\n export interface ItemGroup extends Omit<Item, 'id' | 'text' | 'itemType'> {\n itemType?: 'group';\n id?: string;\n text?: string;\n items: Items;\n }\n\n export type ItemOrGroup = Item | CheckboxItem | ItemGroup;\n\n export type Items = ReadonlyArray<ItemOrGroup>;\n\n export interface ItemClickDetails extends BaseNavigationDetail {\n id: string;\n checked?: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button.\n */\n focus(): void;\n }\n}\n\nexport interface ButtonDropdownSettings {\n // this means whether action is required to make group expand\n hasExpandableGroups: boolean;\n // on smaller screens expandable groups are integrated into parent dropdown\n // this changes keyboard navigation, highlight and activation behavior for parent dropdown\n isInRestrictedView?: boolean;\n}\n\nexport interface HighlightProps {\n targetItem: ButtonDropdownProps.ItemOrGroup | null;\n isHighlighted: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isKeyboardHighlight: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isExpanded: (group: ButtonDropdownProps.ItemGroup) => boolean;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n}\n\nexport type GroupToggle = (item: ButtonDropdownProps.ItemGroup, event: React.SyntheticEvent) => void;\nexport type ItemActivate = (\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem,\n event: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface CategoryProps extends HighlightProps {\n item: ButtonDropdownProps.ItemGroup;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n disabled: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n}\n\nexport interface ItemListProps extends HighlightProps {\n items: ButtonDropdownProps.Items;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n categoryDisabled?: boolean;\n hasExpandableGroups?: boolean;\n hasCategoryHeader?: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: InternalButtonDropdownProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n}\n\nexport interface LinkItem extends ButtonDropdownProps.Item {\n href: string;\n}\n\nexport interface ItemProps {\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem | LinkItem;\n disabled: boolean;\n highlighted: boolean;\n onItemActivate: ItemActivate;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n showDivider: boolean;\n hasCategoryHeader: boolean;\n isKeyboardHighlighted?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n}\n\nexport interface InternalItem extends ButtonDropdownProps.Item {\n badge?: boolean;\n}\n\nexport interface InternalItemGroup extends Omit<ButtonDropdownProps.ItemGroup, 'items'> {\n items: InternalItems;\n}\n\nexport type InternalItems = ReadonlyArray<InternalItemOrGroup>;\n\nexport type InternalItemOrGroup = InternalItem | ButtonDropdownProps.CheckboxItem | InternalItemGroup;\n\nexport interface InternalButtonDropdownProps\n extends Omit<ButtonDropdownProps, 'variant' | 'items'>,\n InternalBaseComponentProps {\n customTriggerBuilder?: (props: CustomTriggerProps) => React.ReactNode;\n variant?: ButtonDropdownProps['variant'] | 'navigation';\n items: ReadonlyArray<InternalItemOrGroup>;\n\n /**\n * Optional text that is displayed as the title at the top of the dropdown.\n */\n title?: string;\n\n /**\n * Optional text that is displayed underneath the title at the top of the dropdown.\n */\n description?: string;\n\n /**\n * Only show main action button as a regular, non-split button.\n * That is needed so that button dropdown test utils wrapper can still be used.\n */\n showMainActionOnly?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n analyticsMetadataTransformer?: (input: GeneratedAnalyticsMetadataFragment) => GeneratedAnalyticsMetadataFragment;\n}\n\nexport interface CustomTriggerProps {\n triggerRef: React.Ref<HTMLElement>;\n testUtilsClass: string;\n ariaLabel: string | undefined;\n disabled: boolean;\n disabledReason?: string;\n isOpen: boolean;\n onClick: () => void;\n ariaExpanded: boolean;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/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';\n\nimport { GeneratedAnalyticsMetadataFragment } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewport {\n /**\n * Array of objects with a number of supported types.\n *\n * The following properties are supported across all types:\n *\n * - `type` (string) - The type of the item. Can be `action`, `group`, `checkbox`. Defaults to `action` if `items` undefined and `group` otherwise.\n * - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories.\n * - `text` (string) - description shown in the menu for this item. Mandatory for individual items, optional for categories.\n * - `lang` (string) - (Optional) The language of the item, provided as a BCP 47 language tag.\n * - `disabled` (boolean) - whether the item is disabled. Disabled items are not clickable, but they can be highlighted with the keyboard to make them accessible.\n * - `disabledReason` (string) - (Optional) Displays text near the `text` property when item is disabled. Use to provide additional context.\n * - `description` (string) - additional data that will be passed to a `data-description` attribute.\n * - `ariaLabel` (string) - (Optional) - ARIA label of the item element.\n *\n * ### action\n *\n * - `href` (string) - (Optional) Defines the target URL of the menu item, turning it into a link.\n * - `external` (boolean) - Marks a menu item as external by adding an icon after the menu item text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * - `externalIconAriaLabel` (string) - Adds an `aria-label` to the external icon.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * ### checkbox\n *\n * When `type` is set to \"checkbox\", the values set to `href`, `external` and `externalIconAriaLabel` will be ignored.\n *\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * ### group\n *\n * - `items` (ReadonlyArray<Item>) - an array of item objects. Items will be rendered as nested menu items but only for the first nesting level, multi-nesting is not supported.\n * An item which belongs to nested group has the following properties: `id`, `text`, `disabled`, and `description`.\n *\n */\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n /**\n * Determines whether the button dropdown is disabled. Users cannot interact with the control if it's disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button dropdown is disabled (only when `disabled` is `true`).\n * If provided, the disabled button becomes focusable.\n */\n disabledReason?: string;\n /**\n * Renders the button as being in a loading state. It takes precedence over the `disabled` if both are set to `true`.\n * It prevents clicks.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button dropdown is in a loading state.\n */\n loadingText?: string;\n /** Determines the general styling of the button dropdown.\n * * `primary` for primary buttons\n * * `normal` for secondary buttons\n * * `icon` for icon buttons\n * * `inline-icon` for icon buttons with no outer padding\n */\n variant?: ButtonDropdownProps.Variant;\n /**\n * Controls expandability of the item groups.\n */\n expandableGroups?: boolean;\n /**\n * Adds `aria-label` to the button dropdown trigger.\n * Use this to provide an accessible name for buttons that don't have visible text.\n */\n ariaLabel?: string;\n /**\n * Text displayed in the button dropdown trigger.\n * @displayname text\n */\n children?: React.ReactNode;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * Called when the user clicks on an item with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the item has an `href` set.\n */\n onItemFollow?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * A standalone action that is shown prior to the dropdown trigger.\n * Use it with \"primary\" and \"normal\" variant only.\n *\n * Main action properties:\n * * `text` (string) - Specifies the text shown in the main action.\n * * `external` (boolean) - Marks the main action as external by adding an icon after the text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * * `externalIconAriaLabel` (string) - Adds an ARIA label to the external icon.\n *\n * The main action also supports the following properties of the [button](/components/button/?tabId=api) component:\n * `ariaLabel`, `disabled`, `loading`, `loadingText`, `href`, `target`, `rel`, `download`, `iconAlt`, `iconName`, `iconUrl`, `iconSvg`, `onClick`, `onFollow`.\n */\n mainAction?: ButtonDropdownProps.MainAction;\n}\n\nexport namespace ButtonDropdownProps {\n export type Variant = 'normal' | 'primary' | 'icon' | 'inline-icon';\n export type ItemType = 'action' | 'group';\n\n export interface MainAction {\n text?: string;\n ariaLabel?: string;\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface Item {\n itemType?: ItemType;\n id: string;\n text: string;\n ariaLabel?: string;\n lang?: string;\n disabled?: boolean;\n disabledReason?: string;\n description?: string;\n href?: string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface CheckboxItem\n extends Omit<ButtonDropdownProps.Item, 'href' | 'external' | 'externalIconAriaLabel' | 'itemType'> {\n itemType: 'checkbox';\n checked: boolean;\n }\n\n export interface ItemGroup extends Omit<Item, 'id' | 'text' | 'itemType'> {\n itemType?: 'group';\n id?: string;\n text?: string;\n items: Items;\n }\n\n export type ItemOrGroup = Item | CheckboxItem | ItemGroup;\n\n export type Items = ReadonlyArray<ItemOrGroup>;\n\n export interface ItemClickDetails extends BaseNavigationDetail {\n id: string;\n checked?: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button.\n */\n focus(): void;\n }\n}\n\nexport interface ButtonDropdownSettings {\n // this means whether action is required to make group expand\n hasExpandableGroups: boolean;\n // on smaller screens expandable groups are integrated into parent dropdown\n // this changes keyboard navigation, highlight and activation behavior for parent dropdown\n isInRestrictedView?: boolean;\n}\n\nexport interface HighlightProps {\n targetItem: ButtonDropdownProps.ItemOrGroup | null;\n isHighlighted: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isKeyboardHighlight: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isExpanded: (group: ButtonDropdownProps.ItemGroup) => boolean;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n}\n\nexport type GroupToggle = (item: ButtonDropdownProps.ItemGroup, event: React.SyntheticEvent) => void;\nexport type ItemActivate = (\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem,\n event: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface CategoryProps extends HighlightProps {\n item: ButtonDropdownProps.ItemGroup;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n disabled: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n}\n\nexport interface ItemListProps extends HighlightProps {\n items: ButtonDropdownProps.Items;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n categoryDisabled?: boolean;\n hasExpandableGroups?: boolean;\n hasCategoryHeader?: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: InternalButtonDropdownProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n}\n\nexport interface LinkItem extends ButtonDropdownProps.Item {\n href: string;\n}\n\nexport interface ItemProps {\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem | LinkItem;\n disabled: boolean;\n highlighted: boolean;\n onItemActivate: ItemActivate;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n showDivider: boolean;\n hasCategoryHeader: boolean;\n isKeyboardHighlighted?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n}\n\nexport interface InternalItem extends ButtonDropdownProps.Item {\n badge?: boolean;\n}\n\nexport interface InternalItemGroup extends Omit<ButtonDropdownProps.ItemGroup, 'items'> {\n items: InternalItems;\n}\n\nexport type InternalItems = ReadonlyArray<InternalItemOrGroup>;\n\nexport type InternalItemOrGroup = InternalItem | ButtonDropdownProps.CheckboxItem | InternalItemGroup;\n\nexport interface InternalButtonDropdownProps\n extends Omit<ButtonDropdownProps, 'variant' | 'items'>,\n InternalBaseComponentProps {\n customTriggerBuilder?: (props: CustomTriggerProps) => React.ReactNode;\n variant?: ButtonDropdownProps['variant'] | 'navigation';\n items: ReadonlyArray<InternalItemOrGroup>;\n\n /**\n * Optional text that is displayed as the title at the top of the dropdown.\n */\n title?: string;\n\n /**\n * Optional text that is displayed underneath the title at the top of the dropdown.\n */\n description?: string;\n\n /**\n * Only show main action button as a regular, non-split button.\n * That is needed so that button dropdown test utils wrapper can still be used.\n */\n showMainActionOnly?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Determines whether simple items should be displayed with the link styles.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n linkStyle?: boolean;\n\n analyticsMetadataTransformer?: (input: GeneratedAnalyticsMetadataFragment) => GeneratedAnalyticsMetadataFragment;\n}\n\nexport interface CustomTriggerProps {\n triggerRef: React.Ref<HTMLElement>;\n testUtilsClass: string;\n ariaLabel: string | undefined;\n disabled: boolean;\n disabledReason?: string;\n isOpen: boolean;\n onClick: () => void;\n ariaExpanded: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAoBjD,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAQhF,QAAA,MAAM,sBAAsB,6GAsV3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAoBjD,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAQhF,QAAA,MAAM,sBAAsB,6GAwV3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -24,7 +24,7 @@ import analyticsSelectors from './analytics-metadata/styles.css.js';
24
24
  import styles from './styles.css.js';
25
25
  const InternalButtonDropdown = React.forwardRef((_a, ref) => {
26
26
  var _b;
27
- var { items, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, expandableGroups = false, children, onItemClick, onItemFollow, customTriggerBuilder, expandToViewport, ariaLabel, title, description, preferCenter, mainAction, showMainActionOnly, __internalRootRef, analyticsMetadataTransformer } = _a, props = __rest(_a, ["items", "variant", "loading", "loadingText", "disabled", "disabledReason", "expandableGroups", "children", "onItemClick", "onItemFollow", "customTriggerBuilder", "expandToViewport", "ariaLabel", "title", "description", "preferCenter", "mainAction", "showMainActionOnly", "__internalRootRef", "analyticsMetadataTransformer"]);
27
+ var { items, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, expandableGroups = false, children, onItemClick, onItemFollow, customTriggerBuilder, expandToViewport, ariaLabel, title, description, preferCenter, mainAction, showMainActionOnly, __internalRootRef, analyticsMetadataTransformer, linkStyle } = _a, props = __rest(_a, ["items", "variant", "loading", "loadingText", "disabled", "disabledReason", "expandableGroups", "children", "onItemClick", "onItemFollow", "customTriggerBuilder", "expandToViewport", "ariaLabel", "title", "description", "preferCenter", "mainAction", "showMainActionOnly", "__internalRootRef", "analyticsMetadataTransformer", "linkStyle"]);
28
28
  const isInRestrictedView = useMobile();
29
29
  const dropdownId = useUniqueId('dropdown');
30
30
  for (const item of items) {
@@ -171,7 +171,7 @@ const InternalButtonDropdown = React.forwardRef((_a, ref) => {
171
171
  description && (React.createElement(InternalBox, { fontSize: "body-s" },
172
172
  React.createElement("span", { className: styles.description }, description))))),
173
173
  React.createElement(OptionsList, { open: canBeOpened && isOpen, position: "static", role: "menu", decreaseBlockMargin: true, ariaLabel: ariaLabel, ariaLabelledby: hasHeader ? headerId : shouldLabelWithTrigger ? triggerId : undefined, statusType: "finished" },
174
- React.createElement(ItemsList, { items: items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, hasExpandableGroups: expandableGroups, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, lastInDropdown: true, highlightItem: highlightItem, expandToViewport: expandToViewport, variant: variant, analyticsMetadataTransformer: analyticsMetadataTransformer })))));
174
+ React.createElement(ItemsList, { items: items, onItemActivate: onItemActivate, onGroupToggle: onGroupToggle, hasExpandableGroups: expandableGroups, targetItem: targetItem, isHighlighted: isHighlighted, isKeyboardHighlight: isKeyboardHighlight, isExpanded: isExpanded, lastInDropdown: true, highlightItem: highlightItem, expandToViewport: expandToViewport, variant: variant, analyticsMetadataTransformer: analyticsMetadataTransformer, linkStyle: linkStyle })))));
175
175
  });
176
176
  export default InternalButtonDropdown;
177
177
  //# sourceMappingURL=internal.js.map