@cloudscape-design/components-themeable 3.0.1092 → 3.0.1093

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 (116) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/internal/components/selectable-item/styles.scss +2 -1
  3. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  4. package/lib/internal/scss/navigable-group/styles.scss +8 -0
  5. package/lib/internal/scss/navigable-group/test-classes/styles.scss +8 -0
  6. package/lib/internal/scss/select/parts/styles.scss +7 -0
  7. package/lib/internal/template/autosuggest/plain-list.js +1 -1
  8. package/lib/internal/template/autosuggest/plain-list.js.map +1 -1
  9. package/lib/internal/template/autosuggest/virtual-list.js +1 -1
  10. package/lib/internal/template/autosuggest/virtual-list.js.map +1 -1
  11. package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
  12. package/lib/internal/template/button-dropdown/internal.js +1 -1
  13. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  14. package/lib/internal/template/button-group/internal.d.ts.map +1 -1
  15. package/lib/internal/template/button-group/internal.js +5 -87
  16. package/lib/internal/template/button-group/internal.js.map +1 -1
  17. package/lib/internal/template/index.d.ts +1 -0
  18. package/lib/internal/template/index.d.ts.map +1 -1
  19. package/lib/internal/template/index.js +1 -0
  20. package/lib/internal/template/index.js.map +1 -1
  21. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  22. package/lib/internal/template/internal/components/option/index.d.ts +1 -1
  23. package/lib/internal/template/internal/components/option/index.d.ts.map +1 -1
  24. package/lib/internal/template/internal/components/option/index.js +2 -11
  25. package/lib/internal/template/internal/components/option/index.js.map +1 -1
  26. package/lib/internal/template/internal/components/option/interfaces.d.ts +0 -1
  27. package/lib/internal/template/internal/components/option/interfaces.d.ts.map +1 -1
  28. package/lib/internal/template/internal/components/option/interfaces.js.map +1 -1
  29. package/lib/internal/template/internal/components/option/option-parts.d.ts.map +1 -1
  30. package/lib/internal/template/internal/components/option/option-parts.js +1 -1
  31. package/lib/internal/template/internal/components/option/option-parts.js.map +1 -1
  32. package/lib/internal/template/internal/components/option/utils/unflatten-options.d.ts +16 -0
  33. package/lib/internal/template/internal/components/option/utils/unflatten-options.d.ts.map +1 -0
  34. package/lib/internal/template/internal/components/option/utils/unflatten-options.js +23 -0
  35. package/lib/internal/template/internal/components/option/utils/unflatten-options.js.map +1 -0
  36. package/lib/internal/template/internal/components/options-list/index.d.ts +2 -1
  37. package/lib/internal/template/internal/components/options-list/index.d.ts.map +1 -1
  38. package/lib/internal/template/internal/components/options-list/index.js +2 -2
  39. package/lib/internal/template/internal/components/options-list/index.js.map +1 -1
  40. package/lib/internal/template/internal/components/selectable-item/index.d.ts.map +1 -1
  41. package/lib/internal/template/internal/components/selectable-item/index.js +23 -20
  42. package/lib/internal/template/internal/components/selectable-item/index.js.map +1 -1
  43. package/lib/internal/template/internal/components/selectable-item/interfaces.d.ts +1 -0
  44. package/lib/internal/template/internal/components/selectable-item/interfaces.d.ts.map +1 -1
  45. package/lib/internal/template/internal/components/selectable-item/interfaces.js.map +1 -1
  46. package/lib/internal/template/internal/components/selectable-item/styles.css.js +22 -21
  47. package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +42 -42
  48. package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +22 -21
  49. package/lib/internal/template/internal/environment.js +2 -2
  50. package/lib/internal/template/internal/environment.json +2 -2
  51. package/lib/internal/template/multiselect/use-multiselect.d.ts +2 -1
  52. package/lib/internal/template/multiselect/use-multiselect.d.ts.map +1 -1
  53. package/lib/internal/template/navigable-group/index.d.ts +9 -0
  54. package/lib/internal/template/navigable-group/index.d.ts.map +1 -0
  55. package/lib/internal/template/navigable-group/index.js +23 -0
  56. package/lib/internal/template/navigable-group/index.js.map +1 -0
  57. package/lib/internal/template/navigable-group/interfaces.d.ts +39 -0
  58. package/lib/internal/template/navigable-group/interfaces.d.ts.map +1 -0
  59. package/lib/internal/template/navigable-group/interfaces.js +4 -0
  60. package/lib/internal/template/navigable-group/interfaces.js.map +1 -0
  61. package/lib/internal/template/navigable-group/internal.d.ts +5 -0
  62. package/lib/internal/template/navigable-group/internal.d.ts.map +1 -0
  63. package/lib/internal/template/navigable-group/internal.js +125 -0
  64. package/lib/internal/template/navigable-group/internal.js.map +1 -0
  65. package/lib/internal/template/navigable-group/styles.css.js +6 -0
  66. package/lib/internal/template/navigable-group/styles.scoped.css +7 -0
  67. package/lib/internal/template/navigable-group/styles.selectors.js +7 -0
  68. package/lib/internal/template/navigable-group/test-classes/styles.css.js +6 -0
  69. package/lib/internal/template/navigable-group/test-classes/styles.scoped.css +7 -0
  70. package/lib/internal/template/navigable-group/test-classes/styles.selectors.js +7 -0
  71. package/lib/internal/template/package.json +1 -0
  72. package/lib/internal/template/select/internal.js +1 -1
  73. package/lib/internal/template/select/internal.js.map +1 -1
  74. package/lib/internal/template/select/parts/item.d.ts +1 -0
  75. package/lib/internal/template/select/parts/item.d.ts.map +1 -1
  76. package/lib/internal/template/select/parts/item.js +2 -2
  77. package/lib/internal/template/select/parts/item.js.map +1 -1
  78. package/lib/internal/template/select/parts/multiselect-item.d.ts.map +1 -1
  79. package/lib/internal/template/select/parts/multiselect-item.js +2 -2
  80. package/lib/internal/template/select/parts/multiselect-item.js.map +1 -1
  81. package/lib/internal/template/select/parts/option-group.d.ts +10 -0
  82. package/lib/internal/template/select/parts/option-group.d.ts.map +1 -0
  83. package/lib/internal/template/select/parts/option-group.js +9 -0
  84. package/lib/internal/template/select/parts/option-group.js.map +1 -0
  85. package/lib/internal/template/select/parts/plain-list.d.ts.map +1 -1
  86. package/lib/internal/template/select/parts/plain-list.js +4 -2
  87. package/lib/internal/template/select/parts/plain-list.js.map +1 -1
  88. package/lib/internal/template/select/parts/styles.css.js +22 -21
  89. package/lib/internal/template/select/parts/styles.scoped.css +26 -22
  90. package/lib/internal/template/select/parts/styles.selectors.js +22 -21
  91. package/lib/internal/template/select/parts/virtual-list.d.ts.map +1 -1
  92. package/lib/internal/template/select/parts/virtual-list.js +5 -3
  93. package/lib/internal/template/select/parts/virtual-list.js.map +1 -1
  94. package/lib/internal/template/select/utils/render-options.d.ts +2 -1
  95. package/lib/internal/template/select/utils/render-options.d.ts.map +1 -1
  96. package/lib/internal/template/select/utils/render-options.js +23 -3
  97. package/lib/internal/template/select/utils/render-options.js.map +1 -1
  98. package/lib/internal/template/select/utils/use-select.d.ts +1 -1
  99. package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
  100. package/lib/internal/template/select/utils/use-select.js +6 -1
  101. package/lib/internal/template/select/utils/use-select.js.map +1 -1
  102. package/lib/internal/template/test-utils/dom/index.d.ts +20 -0
  103. package/lib/internal/template/test-utils/dom/index.js +12 -1
  104. package/lib/internal/template/test-utils/dom/index.js.map +1 -1
  105. package/lib/internal/template/test-utils/dom/navigable-group/index.d.ts +5 -0
  106. package/lib/internal/template/test-utils/dom/navigable-group/index.js +14 -0
  107. package/lib/internal/template/test-utils/dom/navigable-group/index.js.map +1 -0
  108. package/lib/internal/template/test-utils/selectors/index.d.ts +18 -0
  109. package/lib/internal/template/test-utils/selectors/index.js +12 -1
  110. package/lib/internal/template/test-utils/selectors/index.js.map +1 -1
  111. package/lib/internal/template/test-utils/selectors/navigable-group/index.d.ts +5 -0
  112. package/lib/internal/template/test-utils/selectors/navigable-group/index.js +14 -0
  113. package/lib/internal/template/test-utils/selectors/navigable-group/index.js.map +1 -0
  114. package/lib/internal/template/token-group/internal.js +1 -1
  115. package/lib/internal/template/token-group/internal.js.map +1 -1
  116. package/package.json +1 -1
@@ -142,7 +142,7 @@
142
142
  */
143
143
  /* Style used for links in slots/components that are text heavy, to help links stand out among
144
144
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
- .awsui_selectable-item_15o6u_178gi_145:not(#\9) {
145
+ .awsui_selectable-item_15o6u_k1eqb_145:not(#\9) {
146
146
  font-size: var(--font-size-body-m-vv54cm, 14px);
147
147
  line-height: var(--line-height-body-m-bedeoh, 22px);
148
148
  color: var(--color-text-body-default-5qid0u, #16191f);
@@ -164,17 +164,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
164
164
  padding-block: calc(var(--space-xxs-jnczic, 4px) + var(--border-item-width-acvlhx, 1px) - var(--border-divider-list-width-8ggz94, 1px));
165
165
  padding-inline: calc(var(--space-field-horizontal-n5peob, 8px) + var(--border-item-width-acvlhx, 1px));
166
166
  }
167
- .awsui_selectable-item_15o6u_178gi_145.awsui_pad-bottom_15o6u_178gi_167:not(#\9) {
167
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_pad-bottom_15o6u_k1eqb_167:not(#\9) {
168
168
  padding-block-end: calc(calc(var(--space-xxs-jnczic, 4px) + var(--border-item-width-acvlhx, 1px) - var(--border-divider-list-width-8ggz94, 1px)) + var(--space-xxxs-3w1kr2, 2px));
169
169
  border-block-end-color: transparent;
170
170
  }
171
- .awsui_selectable-item_15o6u_178gi_145:not(#\9):not(:first-child), .awsui_selectable-item_15o6u_178gi_145.awsui_virtual_15o6u_178gi_171:not(#\9) {
171
+ .awsui_selectable-item_15o6u_k1eqb_145:not(#\9):not(:first-child), .awsui_selectable-item_15o6u_k1eqb_145.awsui_virtual_15o6u_k1eqb_171:not(#\9) {
172
172
  margin-block-start: calc(-1 * var(--border-item-width-acvlhx, 1px));
173
173
  }
174
- .awsui_selectable-item_15o6u_178gi_145.awsui_has-background_15o6u_178gi_174:not(#\9) {
174
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_has-background_15o6u_k1eqb_174:not(#\9) {
175
175
  background-color: var(--color-background-dropdown-item-hover-353r6f, #f2f3f3);
176
176
  }
177
- .awsui_selectable-item_15o6u_178gi_145.awsui_highlighted_15o6u_178gi_177:not(#\9), .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177:not(#\9) {
177
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_highlighted_15o6u_k1eqb_177:not(#\9), .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177:not(#\9) {
178
178
  color: var(--color-text-dropdown-item-highlighted-bchk26, #16191f);
179
179
  border-width: var(--border-item-width-acvlhx, 1px);
180
180
  border-start-start-radius: var(--border-radius-item-xggxkd, 0px);
@@ -184,135 +184,135 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
184
184
  padding-block: var(--space-xxs-jnczic, 4px);
185
185
  padding-inline: var(--space-field-horizontal-n5peob, 8px);
186
186
  }
187
- .awsui_selectable-item_15o6u_178gi_145.awsui_highlighted_15o6u_178gi_177.awsui_pad-bottom_15o6u_178gi_167:not(#\9), .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177.awsui_pad-bottom_15o6u_178gi_167:not(#\9) {
187
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_highlighted_15o6u_k1eqb_177.awsui_pad-bottom_15o6u_k1eqb_167:not(#\9), .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177.awsui_pad-bottom_15o6u_k1eqb_167:not(#\9) {
188
188
  padding-block-end: calc(var(--space-xxs-jnczic, 4px) + var(--space-xxxs-3w1kr2, 2px));
189
189
  }
190
- .awsui_selectable-item_15o6u_178gi_145.awsui_highlighted_15o6u_178gi_177:not(#\9) {
190
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_highlighted_15o6u_k1eqb_177:not(#\9) {
191
191
  z-index: 3;
192
192
  background-color: var(--color-background-dropdown-item-hover-353r6f, #f2f3f3);
193
193
  border-color: var(--color-border-dropdown-item-hover-vony6u, #879596);
194
194
  }
195
- .awsui_selectable-item_15o6u_178gi_145.awsui_highlighted_15o6u_178gi_177.awsui_disabled_15o6u_178gi_195:not(#\9) {
195
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_highlighted_15o6u_k1eqb_177.awsui_disabled_15o6u_k1eqb_195:not(#\9) {
196
196
  color: var(--color-text-dropdown-item-dimmed-0xf8v3, #aab7b8);
197
197
  border-color: var(--color-border-dropdown-item-dimmed-hover-twsd8z, #879596);
198
198
  background-color: var(--color-background-dropdown-item-dimmed-2hwvu9, transparent);
199
199
  }
200
- .awsui_selectable-item_15o6u_178gi_145.awsui_highlighted_15o6u_178gi_177.awsui_is-keyboard_15o6u_178gi_200:not(#\9) {
200
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_highlighted_15o6u_k1eqb_177.awsui_is-keyboard_15o6u_k1eqb_200:not(#\9) {
201
201
  border-color: var(--color-border-dropdown-item-focused-xty1zx, #0073bb);
202
202
  }
203
- .awsui_selectable-item_15o6u_178gi_145.awsui_highlighted_15o6u_178gi_177.awsui_is-keyboard_15o6u_178gi_200:not(#\9):not(.awsui_visual-refresh_15o6u_178gi_203) {
203
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_highlighted_15o6u_k1eqb_177.awsui_is-keyboard_15o6u_k1eqb_200:not(#\9):not(.awsui_visual-refresh_15o6u_k1eqb_203) {
204
204
  box-shadow: inset 0 0 0 var(--border-control-focus-ring-shadow-spread-ql2vj7, 1px) var(--color-border-item-focused-r5f6xl, #0073bb);
205
205
  }
206
- .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177:not(#\9) {
206
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177:not(#\9) {
207
207
  z-index: 2;
208
208
  background-color: var(--color-background-dropdown-item-selected-1c9k0x, #f1faff);
209
209
  border-color: var(--color-border-dropdown-item-selected-88v7h2, #eaeded);
210
210
  }
211
- .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177.awsui_next-item-selected_15o6u_178gi_211:not(#\9) {
211
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177.awsui_next-item-selected_15o6u_k1eqb_211:not(#\9) {
212
212
  border-end-start-radius: 0;
213
213
  border-end-end-radius: 0;
214
214
  }
215
- .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177.awsui_highlighted_15o6u_178gi_177:not(#\9) {
215
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177.awsui_highlighted_15o6u_k1eqb_177:not(#\9) {
216
216
  border-color: var(--color-border-dropdown-item-selected-88v7h2, #eaeded);
217
217
  z-index: 3;
218
218
  outline: var(--border-item-width-acvlhx, 1px) solid var(--color-border-dropdown-item-hover-vony6u, #879596);
219
219
  outline-offset: calc(-2 * var(--border-item-width-acvlhx, 1px));
220
220
  }
221
- .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177.awsui_highlighted_15o6u_178gi_177.awsui_is-keyboard_15o6u_178gi_200:not(#\9) {
221
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177.awsui_highlighted_15o6u_k1eqb_177.awsui_is-keyboard_15o6u_k1eqb_200:not(#\9) {
222
222
  border-color: var(--color-border-dropdown-item-selected-88v7h2, #eaeded);
223
223
  outline-color: var(--color-border-dropdown-item-focused-xty1zx, #0073bb);
224
224
  }
225
- .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177.awsui_highlighted_15o6u_178gi_177:not(#\9):not(.awsui_visual-refresh_15o6u_178gi_203) {
225
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177.awsui_highlighted_15o6u_k1eqb_177:not(#\9):not(.awsui_visual-refresh_15o6u_k1eqb_203) {
226
226
  border-color: var(--color-border-dropdown-item-hover-vony6u, #879596);
227
227
  outline: none;
228
228
  }
229
- .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177.awsui_highlighted_15o6u_178gi_177:not(#\9):not(.awsui_visual-refresh_15o6u_178gi_203).awsui_is-keyboard_15o6u_178gi_200 {
229
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177.awsui_highlighted_15o6u_k1eqb_177:not(#\9):not(.awsui_visual-refresh_15o6u_k1eqb_203).awsui_is-keyboard_15o6u_k1eqb_200 {
230
230
  border-color: var(--color-border-dropdown-item-focused-xty1zx, #0073bb);
231
231
  }
232
- .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177 + .awsui_selectable-item_15o6u_178gi_145.awsui_selected_15o6u_178gi_177:not(#\9) {
232
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177 + .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177:not(#\9), .awsui_selectable-item_15o6u_k1eqb_145.awsui_selected_15o6u_k1eqb_177.awsui_previous-item-selected_15o6u_k1eqb_232:not(#\9) {
233
233
  border-start-start-radius: 0;
234
234
  border-start-end-radius: 0;
235
235
  }
236
- .awsui_selectable-item_15o6u_178gi_145.awsui_parent_15o6u_178gi_236:not(#\9) {
236
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_parent_15o6u_k1eqb_236:not(#\9) {
237
237
  font-weight: bold;
238
238
  color: var(--color-text-dropdown-group-label-7pa4nd, #545b64);
239
239
  }
240
- .awsui_selectable-item_15o6u_178gi_145.awsui_parent_15o6u_178gi_236:not(#\9):not(.awsui_interactiveGroups_15o6u_178gi_240) {
240
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_parent_15o6u_k1eqb_236:not(#\9):not(.awsui_interactiveGroups_15o6u_k1eqb_240) {
241
241
  border-block-start-color: var(--color-border-dropdown-group-dg9zg5, #eaeded);
242
242
  padding-block: var(--space-xs-kw7k3v, 8px);
243
243
  padding-inline: var(--space-xs-kw7k3v, 8px);
244
244
  }
245
- .awsui_selectable-item_15o6u_178gi_145.awsui_parent_15o6u_178gi_236.awsui_interactiveGroups_15o6u_178gi_240:not(#\9) {
245
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_parent_15o6u_k1eqb_236.awsui_interactiveGroups_15o6u_k1eqb_240:not(#\9) {
246
246
  padding-block: calc(var(--space-xs-kw7k3v, 8px) + var(--border-item-width-acvlhx, 1px) - var(--border-divider-list-width-8ggz94, 1px));
247
247
  padding-inline: calc(var(--space-field-horizontal-n5peob, 8px) + var(--border-item-width-acvlhx, 1px));
248
248
  }
249
- .awsui_selectable-item_15o6u_178gi_145.awsui_parent_15o6u_178gi_236.awsui_interactiveGroups_15o6u_178gi_240.awsui_highlighted_15o6u_178gi_177:not(#\9) {
249
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_parent_15o6u_k1eqb_236.awsui_interactiveGroups_15o6u_k1eqb_240.awsui_highlighted_15o6u_k1eqb_177:not(#\9) {
250
250
  color: var(--color-text-dropdown-item-highlighted-bchk26, #16191f);
251
251
  }
252
- .awsui_selectable-item_15o6u_178gi_145.awsui_parent_15o6u_178gi_236.awsui_interactiveGroups_15o6u_178gi_240.awsui_highlighted_15o6u_178gi_177:not(#\9), .awsui_selectable-item_15o6u_178gi_145.awsui_parent_15o6u_178gi_236.awsui_interactiveGroups_15o6u_178gi_240.awsui_selected_15o6u_178gi_177:not(#\9) {
252
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_parent_15o6u_k1eqb_236.awsui_interactiveGroups_15o6u_k1eqb_240.awsui_highlighted_15o6u_k1eqb_177:not(#\9), .awsui_selectable-item_15o6u_k1eqb_145.awsui_parent_15o6u_k1eqb_236.awsui_interactiveGroups_15o6u_k1eqb_240.awsui_selected_15o6u_k1eqb_177:not(#\9) {
253
253
  padding-block: var(--space-xs-kw7k3v, 8px);
254
254
  padding-inline: var(--space-field-horizontal-n5peob, 8px);
255
255
  }
256
- .awsui_selectable-item_15o6u_178gi_145.awsui_child_15o6u_178gi_256:not(#\9) {
256
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_child_15o6u_k1eqb_256:not(#\9) {
257
257
  padding-inline-start: calc(var(--space-xxl-q0lyvp, 32px) + var(--border-item-width-acvlhx, 1px));
258
258
  }
259
- .awsui_selectable-item_15o6u_178gi_145.awsui_child_15o6u_178gi_256.awsui_highlighted_15o6u_178gi_177:not(#\9), .awsui_selectable-item_15o6u_178gi_145.awsui_child_15o6u_178gi_256.awsui_selected_15o6u_178gi_177:not(#\9) {
259
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_child_15o6u_k1eqb_256.awsui_highlighted_15o6u_k1eqb_177:not(#\9), .awsui_selectable-item_15o6u_k1eqb_145.awsui_child_15o6u_k1eqb_256.awsui_selected_15o6u_k1eqb_177:not(#\9) {
260
260
  padding-inline-start: var(--space-xxl-q0lyvp, 32px);
261
261
  }
262
- .awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262:not(#\9) {
262
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262:not(#\9) {
263
263
  position: sticky;
264
264
  inset-block-start: 0;
265
265
  margin-block-end: calc(var(--border-item-width-acvlhx, 1px) - var(--border-divider-list-width-8ggz94, 1px));
266
266
  z-index: 4;
267
267
  }
268
- .awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262:not(#\9):not(.awsui_highlighted_15o6u_178gi_177):not(.awsui_selected_15o6u_178gi_177) {
268
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262:not(#\9):not(.awsui_highlighted_15o6u_k1eqb_177):not(.awsui_selected_15o6u_k1eqb_177) {
269
269
  border-inline-start-width: var(--border-item-width-acvlhx, 1px);
270
270
  border-inline-start-color: var(--color-border-dropdown-container-w99bbi, transparent);
271
271
  border-inline-end-color: var(--color-border-dropdown-container-w99bbi, transparent);
272
272
  padding-inline: var(--space-field-horizontal-n5peob, 8px);
273
273
  }
274
- .awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262:not(#\9):not(.awsui_highlighted_15o6u_178gi_177):not(.awsui_selected_15o6u_178gi_177):not(.awsui_with-scrollbar_15o6u_178gi_274) {
274
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262:not(#\9):not(.awsui_highlighted_15o6u_k1eqb_177):not(.awsui_selected_15o6u_k1eqb_177):not(.awsui_with-scrollbar_15o6u_k1eqb_274) {
275
275
  border-inline-end-width: var(--border-item-width-acvlhx, 1px);
276
276
  }
277
- .awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262:not(#\9):not(.awsui_highlighted_15o6u_178gi_177):not(.awsui_selected_15o6u_178gi_177).awsui_with-scrollbar_15o6u_178gi_274 {
277
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262:not(#\9):not(.awsui_highlighted_15o6u_k1eqb_177):not(.awsui_selected_15o6u_k1eqb_177).awsui_with-scrollbar_15o6u_k1eqb_274 {
278
278
  border-inline-end-width: 0;
279
279
  }
280
- .awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262:not(#\9):not(.awsui_highlighted_15o6u_178gi_177):not(.awsui_selected_15o6u_178gi_177):not(.awsui_after-header_15o6u_178gi_280) {
280
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262:not(#\9):not(.awsui_highlighted_15o6u_k1eqb_177):not(.awsui_selected_15o6u_k1eqb_177):not(.awsui_after-header_15o6u_k1eqb_280) {
281
281
  border-start-start-radius: var(--border-radius-item-xggxkd, 0px);
282
282
  }
283
- .awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262:not(#\9):not(.awsui_highlighted_15o6u_178gi_177):not(.awsui_selected_15o6u_178gi_177):not(.awsui_after-header_15o6u_178gi_280):not(.awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262:not(.awsui_highlighted_15o6u_178gi_177):not(.awsui_selected_15o6u_178gi_177):not(.awsui_after-header_15o6u_178gi_280).awsui_with-scrollbar_15o6u_178gi_274) {
283
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262:not(#\9):not(.awsui_highlighted_15o6u_k1eqb_177):not(.awsui_selected_15o6u_k1eqb_177):not(.awsui_after-header_15o6u_k1eqb_280):not(.awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262:not(.awsui_highlighted_15o6u_k1eqb_177):not(.awsui_selected_15o6u_k1eqb_177):not(.awsui_after-header_15o6u_k1eqb_280).awsui_with-scrollbar_15o6u_k1eqb_274) {
284
284
  border-start-end-radius: var(--border-radius-item-xggxkd, 0px);
285
285
  }
286
- .awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262:not(#\9):not(.awsui_highlighted_15o6u_178gi_177):not(.awsui_selected_15o6u_178gi_177).awsui_after-header_15o6u_178gi_280 {
286
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262:not(#\9):not(.awsui_highlighted_15o6u_k1eqb_177):not(.awsui_selected_15o6u_k1eqb_177).awsui_after-header_15o6u_k1eqb_280 {
287
287
  border-block-start-color: var(--color-background-dropdown-item-default-fhmksr, #ffffff);
288
288
  }
289
- .awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262.awsui_disabled_15o6u_178gi_195.awsui_highlighted_15o6u_178gi_177:not(#\9), .awsui_selectable-item_15o6u_178gi_145.awsui_sticky_15o6u_178gi_262.awsui_disabled_15o6u_178gi_195.awsui_selected_15o6u_178gi_177:not(#\9) {
289
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262.awsui_disabled_15o6u_k1eqb_195.awsui_highlighted_15o6u_k1eqb_177:not(#\9), .awsui_selectable-item_15o6u_k1eqb_145.awsui_sticky_15o6u_k1eqb_262.awsui_disabled_15o6u_k1eqb_195.awsui_selected_15o6u_k1eqb_177:not(#\9) {
290
290
  border-block-end-color: transparent;
291
291
  border-block-start-color: transparent;
292
292
  border-inline-start-color: transparent;
293
293
  border-inline-end-color: transparent;
294
294
  }
295
- .awsui_selectable-item_15o6u_178gi_145.awsui_disabled_15o6u_178gi_195:not(#\9) {
295
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_disabled_15o6u_k1eqb_195:not(#\9) {
296
296
  color: var(--color-text-dropdown-item-disabled-oysy8n, #aab7b8);
297
297
  }
298
- .awsui_selectable-item_15o6u_178gi_145:not(#\9):not(.awsui_disabled_15o6u_178gi_195):not(.awsui_parent_15o6u_178gi_236) {
298
+ .awsui_selectable-item_15o6u_k1eqb_145:not(#\9):not(.awsui_disabled_15o6u_k1eqb_195):not(.awsui_parent_15o6u_k1eqb_236) {
299
299
  cursor: pointer;
300
300
  }
301
- .awsui_selectable-item_15o6u_178gi_145.awsui_interactiveGroups_15o6u_178gi_240:not(#\9):not(.awsui_disabled_15o6u_178gi_195) {
301
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_interactiveGroups_15o6u_k1eqb_240:not(#\9):not(.awsui_disabled_15o6u_k1eqb_195) {
302
302
  cursor: pointer;
303
303
  }
304
- .awsui_selectable-item_15o6u_178gi_145.awsui_virtual_15o6u_178gi_171:not(#\9) {
304
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_virtual_15o6u_k1eqb_171:not(#\9) {
305
305
  position: absolute;
306
306
  inset-block-start: var(--border-dropdown-virtual-offset-width-1fzwg5, 0px);
307
307
  inset-inline-start: 0;
308
308
  inline-size: 100%;
309
309
  box-sizing: border-box;
310
310
  }
311
- .awsui_selectable-item_15o6u_178gi_145.awsui_virtual_15o6u_178gi_171:not(#\9):first-of-type:not(.awsui_selected_15o6u_178gi_177, .awsui_highlighted_15o6u_178gi_177) {
311
+ .awsui_selectable-item_15o6u_k1eqb_145.awsui_virtual_15o6u_k1eqb_171:not(#\9):first-of-type:not(.awsui_selected_15o6u_k1eqb_177, .awsui_highlighted_15o6u_k1eqb_177) {
312
312
  border-block-start-color: var(--color-border-dropdown-item-top-znzfoj, #eaeded);
313
313
  }
314
314
 
315
- .awsui_measure-strut_15o6u_178gi_315:not(#\9) {
315
+ .awsui_measure-strut_15o6u_k1eqb_315:not(#\9) {
316
316
  position: absolute;
317
317
  pointer-events: none;
318
318
  block-size: 100%;
@@ -321,20 +321,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
321
321
  inset-inline-start: 0;
322
322
  padding-block-start: var(--border-divider-list-width-8ggz94, 1px);
323
323
  }
324
- .awsui_measure-strut-first_15o6u_178gi_324:not(#\9) {
324
+ .awsui_measure-strut-first_15o6u_k1eqb_324:not(#\9) {
325
325
  padding-block-end: var(--border-divider-list-width-8ggz94, 1px);
326
326
  }
327
327
 
328
- .awsui_screenreader-content_15o6u_178gi_328:not(#\9) {
328
+ .awsui_screenreader-content_15o6u_k1eqb_328:not(#\9) {
329
329
  position: absolute !important;
330
330
  inset-block-start: -9999px !important;
331
331
  inset-inline-start: -9999px !important;
332
332
  }
333
333
 
334
- .awsui_option-content_15o6u_178gi_334:not(#\9) {
334
+ .awsui_option-content_15o6u_k1eqb_334:not(#\9) {
335
335
  /* used in test-utils */
336
336
  }
337
337
 
338
- .awsui_select-all_15o6u_178gi_338:not(#\9) {
338
+ .awsui_select-all_15o6u_k1eqb_338:not(#\9) {
339
339
  /* used in test-utils */
340
340
  }
@@ -2,26 +2,27 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "selectable-item": "awsui_selectable-item_15o6u_178gi_145",
6
- "pad-bottom": "awsui_pad-bottom_15o6u_178gi_167",
7
- "virtual": "awsui_virtual_15o6u_178gi_171",
8
- "has-background": "awsui_has-background_15o6u_178gi_174",
9
- "highlighted": "awsui_highlighted_15o6u_178gi_177",
10
- "selected": "awsui_selected_15o6u_178gi_177",
11
- "disabled": "awsui_disabled_15o6u_178gi_195",
12
- "is-keyboard": "awsui_is-keyboard_15o6u_178gi_200",
13
- "visual-refresh": "awsui_visual-refresh_15o6u_178gi_203",
14
- "next-item-selected": "awsui_next-item-selected_15o6u_178gi_211",
15
- "parent": "awsui_parent_15o6u_178gi_236",
16
- "interactiveGroups": "awsui_interactiveGroups_15o6u_178gi_240",
17
- "child": "awsui_child_15o6u_178gi_256",
18
- "sticky": "awsui_sticky_15o6u_178gi_262",
19
- "with-scrollbar": "awsui_with-scrollbar_15o6u_178gi_274",
20
- "after-header": "awsui_after-header_15o6u_178gi_280",
21
- "measure-strut": "awsui_measure-strut_15o6u_178gi_315",
22
- "measure-strut-first": "awsui_measure-strut-first_15o6u_178gi_324",
23
- "screenreader-content": "awsui_screenreader-content_15o6u_178gi_328",
24
- "option-content": "awsui_option-content_15o6u_178gi_334",
25
- "select-all": "awsui_select-all_15o6u_178gi_338"
5
+ "selectable-item": "awsui_selectable-item_15o6u_k1eqb_145",
6
+ "pad-bottom": "awsui_pad-bottom_15o6u_k1eqb_167",
7
+ "virtual": "awsui_virtual_15o6u_k1eqb_171",
8
+ "has-background": "awsui_has-background_15o6u_k1eqb_174",
9
+ "highlighted": "awsui_highlighted_15o6u_k1eqb_177",
10
+ "selected": "awsui_selected_15o6u_k1eqb_177",
11
+ "disabled": "awsui_disabled_15o6u_k1eqb_195",
12
+ "is-keyboard": "awsui_is-keyboard_15o6u_k1eqb_200",
13
+ "visual-refresh": "awsui_visual-refresh_15o6u_k1eqb_203",
14
+ "next-item-selected": "awsui_next-item-selected_15o6u_k1eqb_211",
15
+ "previous-item-selected": "awsui_previous-item-selected_15o6u_k1eqb_232",
16
+ "parent": "awsui_parent_15o6u_k1eqb_236",
17
+ "interactiveGroups": "awsui_interactiveGroups_15o6u_k1eqb_240",
18
+ "child": "awsui_child_15o6u_k1eqb_256",
19
+ "sticky": "awsui_sticky_15o6u_k1eqb_262",
20
+ "with-scrollbar": "awsui_with-scrollbar_15o6u_k1eqb_274",
21
+ "after-header": "awsui_after-header_15o6u_k1eqb_280",
22
+ "measure-strut": "awsui_measure-strut_15o6u_k1eqb_315",
23
+ "measure-strut-first": "awsui_measure-strut-first_15o6u_k1eqb_324",
24
+ "screenreader-content": "awsui_screenreader-content_15o6u_k1eqb_328",
25
+ "option-content": "awsui_option-content_15o6u_k1eqb_334",
26
+ "select-all": "awsui_select-all_15o6u_k1eqb_338"
26
27
  };
27
28
 
@@ -1,6 +1,6 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (52c36f0c)";
3
- export var GIT_SHA = "52c36f0c";
2
+ export var PACKAGE_VERSION = "3.0.0 (9f816a3e)";
3
+ export var GIT_SHA = "9f816a3e";
4
4
  export var THEME = "open-source-visual-refresh";
5
5
  export var SYSTEM = "console";
6
6
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (52c36f0c)",
4
- "GIT_SHA": "52c36f0c",
3
+ "PACKAGE_VERSION": "3.0.0 (9f816a3e)",
4
+ "GIT_SHA": "9f816a3e",
5
5
  "THEME": "default",
6
6
  "SYSTEM": "core",
7
7
  "ALWAYS_VISUAL_REFRESH": false
@@ -45,10 +45,11 @@ export declare function useMultiselect({ options, filteringType, filteringResult
45
45
  onMouseUp?: ((itemIndex: number) => void) | undefined;
46
46
  nativeAttributes?: Record<string, any> | undefined;
47
47
  ariaLabel?: string | undefined;
48
+ tagOverride?: "div" | "ul" | undefined;
48
49
  statusType: DropdownStatusProps.StatusType;
49
50
  decreaseBlockMargin?: boolean | undefined;
50
51
  stickyItemBlockSize?: number | null | undefined;
51
- ref: React.RefObject<HTMLUListElement>;
52
+ ref: React.RefObject<HTMLDivElement>;
52
53
  };
53
54
  getOptionProps: (option: DropdownOption, index: number) => any;
54
55
  getTokenProps: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"use-multiselect.d.ts","sourceRoot":"","sources":["../../../src/multiselect/use-multiselect.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,mBAAmB,EAAqB,MAAM,wCAAwC,CAAC;AAChG,OAAO,EAAE,cAAc,EAAiC,MAAM,0CAA0C,CAAC;AAIzG,OA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CAAC;AAE3B,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,aAAa,EACb,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,OAAO,EACP,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,eAAe,EACf,WAAW,EACX,GAAG,SAAS,EACb,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAuLc,gBAAgB;;;;;;;;;;EA0CrD"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { NavigableGroupProps } from './interfaces';
3
+ export { NavigableGroupProps };
4
+ /**
5
+ * @awsuiSystem core
6
+ */
7
+ declare const NavigableGroup: React.ForwardRefExoticComponent<NavigableGroupProps & React.RefAttributes<NavigableGroupProps.Ref>>;
8
+ export default NavigableGroup;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigable-group/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;GAEG;AACH,QAAA,MAAM,cAAc,qGAMlB,CAAC;AAGH,eAAe,cAAc,CAAC"}
@@ -0,0 +1,23 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ 'use client';
4
+ import { __rest } from "tslib";
5
+ import React from 'react';
6
+ import { getBaseProps } from '../internal/base-component';
7
+ import useBaseComponent from '../internal/hooks/use-base-component';
8
+ import { applyDisplayName } from '../internal/utils/apply-display-name';
9
+ import { getExternalProps } from '../internal/utils/external-props';
10
+ import InternalNavigableGroup from './internal';
11
+ /**
12
+ * @awsuiSystem core
13
+ */
14
+ const NavigableGroup = React.forwardRef((_a, ref) => {
15
+ var rest = __rest(_a, []);
16
+ const baseProps = getBaseProps(rest);
17
+ const baseComponentProps = useBaseComponent('NavigableGroup');
18
+ const externalProps = getExternalProps(rest);
19
+ return React.createElement(InternalNavigableGroup, Object.assign({}, baseProps, baseComponentProps, externalProps, { ref: ref }));
20
+ });
21
+ applyDisplayName(NavigableGroup, 'NavigableGroup');
22
+ export default NavigableGroup;
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/navigable-group/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,sBAAsB,MAAM,YAAY,CAAC;AAIhD;;GAEG;AACH,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAgC,EAAE,GAAuC,EAAE,EAAE;QAAxE,IAAI,cAAT,EAAW,CAAF;IAChD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC9D,MAAM,aAAa,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAE7C,OAAO,oBAAC,sBAAsB,oBAAK,SAAS,EAAM,kBAAkB,EAAM,aAAa,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACxG,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AACnD,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getBaseProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { NavigableGroupProps } from './interfaces';\nimport InternalNavigableGroup from './internal';\n\nexport { NavigableGroupProps };\n\n/**\n * @awsuiSystem core\n */\nconst NavigableGroup = React.forwardRef(({ ...rest }: NavigableGroupProps, ref: React.Ref<NavigableGroupProps.Ref>) => {\n const baseProps = getBaseProps(rest);\n const baseComponentProps = useBaseComponent('NavigableGroup');\n const externalProps = getExternalProps(rest);\n\n return <InternalNavigableGroup {...baseProps} {...baseComponentProps} {...externalProps} ref={ref} />;\n});\n\napplyDisplayName(NavigableGroup, 'NavigableGroup');\nexport default NavigableGroup;\n"]}
@@ -0,0 +1,39 @@
1
+ /// <reference types="react" />
2
+ import { BaseComponentProps } from '../internal/base-component';
3
+ import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
4
+ export interface NavigableGroupProps extends BaseComponentProps {
5
+ /**
6
+ * The children that will be rendered inside the navigation group.
7
+ *
8
+ * The following Cloudscape components are supported, but do not
9
+ * need to be direct children of the group:
10
+ * - Button
11
+ * - Button dropdown
12
+ * - Toggle button
13
+ * - Link
14
+ */
15
+ children: React.ReactNode;
16
+ /**
17
+ * A method that should return a unique identifier for a given element.
18
+ * The element passed will be the first focusable descendent of a child component.
19
+ */
20
+ getItemKey: (element: HTMLElement) => string;
21
+ /**
22
+ * Determines which arrow keys move focus sequentially within the group:
23
+ * - `horizontal` - left and right arrow keys
24
+ * - `vertical` - up and down arrow keys
25
+ * - `both` - all arrow keys
26
+ */
27
+ navigationDirection?: 'horizontal' | 'vertical' | 'both';
28
+ }
29
+ export interface InternalNavigableGroupProps extends NavigableGroupProps, InternalBaseComponentProps {
30
+ }
31
+ export declare namespace NavigableGroupProps {
32
+ interface Ref {
33
+ /**
34
+ * Focuses the first focusable element (or previously focused element) in the navigation group.
35
+ */
36
+ focus(): void;
37
+ }
38
+ }
39
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/navigable-group/interfaces.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D;;;;;;;;;OASG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,CAAC;IAC7C;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;CAC1D;AAED,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB,EAAE,0BAA0B;CAAG;AAEvG,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
@@ -0,0 +1,4 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ export {};
4
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/navigable-group/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface NavigableGroupProps extends BaseComponentProps {\n /**\n * The children that will be rendered inside the navigation group.\n *\n * The following Cloudscape components are supported, but do not\n * need to be direct children of the group:\n * - Button\n * - Button dropdown\n * - Toggle button\n * - Link\n */\n children: React.ReactNode;\n /**\n * A method that should return a unique identifier for a given element.\n * The element passed will be the first focusable descendent of a child component.\n */\n getItemKey: (element: HTMLElement) => string;\n /**\n * Determines which arrow keys move focus sequentially within the group:\n * - `horizontal` - left and right arrow keys\n * - `vertical` - up and down arrow keys\n * - `both` - all arrow keys\n */\n navigationDirection?: 'horizontal' | 'vertical' | 'both';\n}\n\nexport interface InternalNavigableGroupProps extends NavigableGroupProps, InternalBaseComponentProps {}\n\nexport namespace NavigableGroupProps {\n export interface Ref {\n /**\n * Focuses the first focusable element (or previously focused element) in the navigation group.\n */\n focus(): void;\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { InternalNavigableGroupProps, NavigableGroupProps } from './interfaces';
3
+ declare const InternalNavigableGroup: React.ForwardRefExoticComponent<InternalNavigableGroupProps & React.RefAttributes<NavigableGroupProps.Ref>>;
4
+ export default InternalNavigableGroup;
5
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/navigable-group/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAelF,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKhF,QAAA,MAAM,sBAAsB,6GA+I3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,125 @@
1
+ import { __rest } from "tslib";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ import React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';
5
+ import clsx from 'clsx';
6
+ import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
7
+ import { SingleTabStopNavigationProvider, } from '@cloudscape-design/component-toolkit/internal';
8
+ import { getBaseProps } from '../internal/base-component';
9
+ import { getAllFocusables } from '../internal/components/focus-lock/utils';
10
+ import { hasModifierKeys } from '../internal/events';
11
+ import { KeyCode } from '../internal/keycode';
12
+ import { circleIndex } from '../internal/utils/circle-index';
13
+ import handleKey from '../internal/utils/handle-key';
14
+ import styles from './styles.css.js';
15
+ import testUtilStyles from './test-classes/styles.css.js';
16
+ const InternalNavigableGroup = forwardRef((_a, ref) => {
17
+ var { children, getItemKey, navigationDirection = 'horizontal', __internalRootRef } = _a, props = __rest(_a, ["children", "getItemKey", "navigationDirection", "__internalRootRef"]);
18
+ const baseProps = getBaseProps(props);
19
+ const navigationAPI = useRef(null);
20
+ const containerObjectRef = useRef(null);
21
+ const containerRef = useMergeRefs(containerObjectRef, __internalRootRef);
22
+ const focusedIdRef = useRef();
23
+ useImperativeHandle(ref, () => ({
24
+ focus: () => {
25
+ const target = getNextFocusTarget();
26
+ if (target) {
27
+ target.focus();
28
+ }
29
+ },
30
+ }));
31
+ function getNextFocusTarget() {
32
+ var _a, _b;
33
+ if (containerObjectRef.current) {
34
+ const focusables = getFocusablesFrom(containerObjectRef.current);
35
+ return (_b = (_a = focusables.find(el => getItemKey(el) === focusedIdRef.current)) !== null && _a !== void 0 ? _a : focusables[0]) !== null && _b !== void 0 ? _b : null;
36
+ }
37
+ return null;
38
+ }
39
+ function onUnregisterActive(focusableElement) {
40
+ var _a;
41
+ // Only refocus when the node is actually removed (no such element anymore).
42
+ const target = (_a = navigationAPI.current) === null || _a === void 0 ? void 0 : _a.getFocusTarget();
43
+ if (target && getItemKey(target) !== getItemKey(focusableElement)) {
44
+ target.focus();
45
+ }
46
+ }
47
+ useEffect(() => {
48
+ var _a;
49
+ (_a = navigationAPI.current) === null || _a === void 0 ? void 0 : _a.updateFocusTarget();
50
+ });
51
+ function onFocus(event) {
52
+ var _a, _b;
53
+ if (event.target instanceof HTMLElement && ((_a = navigationAPI.current) === null || _a === void 0 ? void 0 : _a.isRegistered(event.target))) {
54
+ focusedIdRef.current = getItemKey(event.target);
55
+ }
56
+ (_b = navigationAPI.current) === null || _b === void 0 ? void 0 : _b.updateFocusTarget();
57
+ }
58
+ function onBlur() {
59
+ var _a;
60
+ (_a = navigationAPI.current) === null || _a === void 0 ? void 0 : _a.updateFocusTarget();
61
+ }
62
+ function onKeyDown(event) {
63
+ var _a, _b;
64
+ const focusTarget = (_a = navigationAPI.current) === null || _a === void 0 ? void 0 : _a.getFocusTarget();
65
+ let specialKeys = [];
66
+ switch (navigationDirection) {
67
+ case 'horizontal':
68
+ specialKeys = [KeyCode.right, KeyCode.left];
69
+ break;
70
+ case 'vertical':
71
+ specialKeys = [KeyCode.down, KeyCode.up];
72
+ break;
73
+ case 'both':
74
+ specialKeys = [KeyCode.right, KeyCode.left, KeyCode.down, KeyCode.up];
75
+ break;
76
+ }
77
+ specialKeys.push(KeyCode.end, KeyCode.home, KeyCode.pageUp, KeyCode.pageDown);
78
+ if (hasModifierKeys(event) || specialKeys.indexOf(event.keyCode) === -1) {
79
+ return;
80
+ }
81
+ if (!containerObjectRef.current || !focusTarget) {
82
+ return;
83
+ }
84
+ // Ignore navigation when the focused element is not a registered focusable.
85
+ if (document.activeElement && !((_b = navigationAPI.current) === null || _b === void 0 ? void 0 : _b.isRegistered(document.activeElement))) {
86
+ return;
87
+ }
88
+ event.preventDefault();
89
+ const focusables = getFocusablesFrom(containerObjectRef.current);
90
+ const activeIndex = focusables.indexOf(focusTarget);
91
+ const getNextIndex = (delta) => {
92
+ const newIndex = activeIndex + delta;
93
+ return circleIndex(newIndex, [0, focusables.length - 1]);
94
+ };
95
+ handleKey(event, {
96
+ onHome: () => focusElement(focusables[0]),
97
+ onEnd: () => focusElement(focusables[focusables.length - 1]),
98
+ onInlineStart: () => focusElement(focusables[getNextIndex(-1)]),
99
+ onBlockStart: () => focusElement(focusables[getNextIndex(-1)]),
100
+ onInlineEnd: () => focusElement(focusables[getNextIndex(1)]),
101
+ onBlockEnd: () => focusElement(focusables[getNextIndex(1)]),
102
+ });
103
+ }
104
+ function focusElement(element) {
105
+ element.focus();
106
+ }
107
+ // List all non-disabled and registered focusables: those are eligible for keyboard navigation.
108
+ function getFocusablesFrom(target) {
109
+ function isElementRegistered(element) {
110
+ var _a, _b;
111
+ return (_b = (_a = navigationAPI.current) === null || _a === void 0 ? void 0 : _a.isRegistered(element)) !== null && _b !== void 0 ? _b : false;
112
+ }
113
+ function isElementDisabled(element) {
114
+ if ('disabled' in element) {
115
+ return element.disabled;
116
+ }
117
+ return false;
118
+ }
119
+ return getAllFocusables(target).filter(el => isElementRegistered(el) && !isElementDisabled(el));
120
+ }
121
+ return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(styles.root, testUtilStyles.root, baseProps.className), ref: containerRef, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown }),
122
+ React.createElement(SingleTabStopNavigationProvider, { ref: navigationAPI, navigationActive: true, getNextFocusTarget: getNextFocusTarget, onUnregisterActive: onUnregisterActive }, children)));
123
+ });
124
+ export default InternalNavigableGroup;
125
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/navigable-group/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAEL,+BAA+B,GAChC,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM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AAE,YAAY,EACjB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS;QAEpB,oBAAC,+BAA+B,IAC9B,GAAG,EAAE,aAAa,EAClB,gBAAgB,EAAE,IAAI,EACtB,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,EAAE,kBAAkB,IAErC,QAAQ,CACuB,CAC9B,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\nimport {\n SingleTabStopNavigationAPI,\n SingleTabStopNavigationProvider,\n} from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { getAllFocusables } from '../internal/components/focus-lock/utils';\nimport { hasModifierKeys } from '../internal/events';\nimport { KeyCode } from '../internal/keycode';\nimport { circleIndex } from '../internal/utils/circle-index';\nimport handleKey from '../internal/utils/handle-key';\nimport { InternalNavigableGroupProps, NavigableGroupProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nconst InternalNavigableGroup = forwardRef(\n (\n {\n children,\n getItemKey,\n navigationDirection = 'horizontal',\n __internalRootRef,\n ...props\n }: InternalNavigableGroupProps,\n ref: React.Ref<NavigableGroupProps.Ref>\n ) => {\n const baseProps = getBaseProps(props);\n const navigationAPI = useRef<SingleTabStopNavigationAPI>(null);\n const containerObjectRef = useRef<HTMLDivElement>(null);\n const containerRef = useMergeRefs(containerObjectRef, __internalRootRef);\n const focusedIdRef = useRef<string>();\n\n useImperativeHandle(ref, () => ({\n focus: () => {\n const target = getNextFocusTarget();\n if (target) {\n target.focus();\n }\n },\n }));\n\n function getNextFocusTarget(): null | HTMLElement {\n if (containerObjectRef.current) {\n const focusables = getFocusablesFrom(containerObjectRef.current);\n return focusables.find(el => getItemKey(el) === focusedIdRef.current) ?? focusables[0] ?? null;\n }\n return null;\n }\n\n function onUnregisterActive(focusableElement: HTMLElement) {\n // Only refocus when the node is actually removed (no such element anymore).\n const target = navigationAPI.current?.getFocusTarget();\n\n if (target && getItemKey(target) !== getItemKey(focusableElement)) {\n target.focus();\n }\n }\n\n useEffect(() => {\n navigationAPI.current?.updateFocusTarget();\n });\n\n function onFocus(event: React.FocusEvent) {\n if (event.target instanceof HTMLElement && navigationAPI.current?.isRegistered(event.target)) {\n focusedIdRef.current = getItemKey(event.target);\n }\n navigationAPI.current?.updateFocusTarget();\n }\n\n function onBlur() {\n navigationAPI.current?.updateFocusTarget();\n }\n\n function onKeyDown(event: React.KeyboardEvent) {\n const focusTarget = navigationAPI.current?.getFocusTarget();\n let specialKeys = [];\n switch (navigationDirection) {\n case 'horizontal':\n specialKeys = [KeyCode.right, KeyCode.left];\n break;\n case 'vertical':\n specialKeys = [KeyCode.down, KeyCode.up];\n break;\n case 'both':\n specialKeys = [KeyCode.right, KeyCode.left, KeyCode.down, KeyCode.up];\n break;\n }\n specialKeys.push(KeyCode.end, KeyCode.home, KeyCode.pageUp, KeyCode.pageDown);\n if (hasModifierKeys(event) || specialKeys.indexOf(event.keyCode) === -1) {\n return;\n }\n if (!containerObjectRef.current || !focusTarget) {\n return;\n }\n // Ignore navigation when the focused element is not a registered focusable.\n if (document.activeElement && !navigationAPI.current?.isRegistered(document.activeElement)) {\n return;\n }\n event.preventDefault();\n\n const focusables = getFocusablesFrom(containerObjectRef.current);\n const activeIndex = focusables.indexOf(focusTarget);\n const getNextIndex = (delta: number) => {\n const newIndex = activeIndex + delta;\n return circleIndex(newIndex, [0, focusables.length - 1]);\n };\n\n handleKey(event as any, {\n onHome: () => focusElement(focusables[0]),\n onEnd: () => focusElement(focusables[focusables.length - 1]),\n onInlineStart: () => focusElement(focusables[getNextIndex(-1)]),\n onBlockStart: () => focusElement(focusables[getNextIndex(-1)]),\n onInlineEnd: () => focusElement(focusables[getNextIndex(1)]),\n onBlockEnd: () => focusElement(focusables[getNextIndex(1)]),\n });\n }\n\n function focusElement(element: HTMLElement) {\n element.focus();\n }\n\n // List all non-disabled and registered focusables: those are eligible for keyboard navigation.\n function getFocusablesFrom(target: HTMLElement) {\n function isElementRegistered(element: HTMLElement) {\n return navigationAPI.current?.isRegistered(element) ?? false;\n }\n\n function isElementDisabled(element: HTMLElement) {\n if ('disabled' in element) {\n return element.disabled;\n }\n\n return false;\n }\n\n return getAllFocusables(target).filter(el => isElementRegistered(el) && !isElementDisabled(el));\n }\n\n return (\n <div\n {...baseProps}\n className={clsx(styles.root, testUtilStyles.root, baseProps.className)}\n ref={containerRef}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n >\n <SingleTabStopNavigationProvider\n ref={navigationAPI}\n navigationActive={true}\n getNextFocusTarget={getNextFocusTarget}\n onUnregisterActive={onUnregisterActive}\n >\n {children}\n </SingleTabStopNavigationProvider>\n </div>\n );\n }\n);\n\nexport default InternalNavigableGroup;\n"]}
@@ -0,0 +1,6 @@
1
+
2
+ import './styles.scoped.css';
3
+ export default {
4
+ "root": "awsui_root_ghvqw_1g0cx_5"
5
+ };
6
+
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ .awsui_root_ghvqw_1g0cx_5:not(#\9) {
6
+ display: contents;
7
+ }
@@ -0,0 +1,7 @@
1
+
2
+ // es-module interop with Babel and Typescript
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ module.exports.default = {
5
+ "root": "awsui_root_ghvqw_1g0cx_5"
6
+ };
7
+