@cloudscape-design/components 3.0.1332 → 3.0.1334

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 (216) hide show
  1. package/alert/styles.css.js +27 -27
  2. package/alert/styles.scoped.css +50 -50
  3. package/alert/styles.selectors.js +27 -27
  4. package/annotation-context/annotation/styles.css.js +13 -13
  5. package/annotation-context/annotation/styles.scoped.css +21 -21
  6. package/annotation-context/annotation/styles.selectors.js +13 -13
  7. package/app-layout/classic.d.ts +1 -0
  8. package/app-layout/classic.d.ts.map +1 -1
  9. package/app-layout/index.d.ts.map +1 -1
  10. package/app-layout/index.js +2 -1
  11. package/app-layout/index.js.map +1 -1
  12. package/app-layout/interfaces.d.ts +16 -1
  13. package/app-layout/interfaces.d.ts.map +1 -1
  14. package/app-layout/interfaces.js.map +1 -1
  15. package/app-layout/internal.d.ts +1 -0
  16. package/app-layout/internal.d.ts.map +1 -1
  17. package/app-layout/notifications/styles.css.js +3 -3
  18. package/app-layout/notifications/styles.scoped.css +7 -7
  19. package/app-layout/notifications/styles.selectors.js +3 -3
  20. package/app-layout/visual-refresh/index.d.ts +1 -0
  21. package/app-layout/visual-refresh/index.d.ts.map +1 -1
  22. package/app-layout/visual-refresh/styles.css.js +86 -86
  23. package/app-layout/visual-refresh/styles.scoped.css +262 -262
  24. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  25. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts +4 -0
  26. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
  27. package/app-layout/visual-refresh-toolbar/compute-layout.js +2 -2
  28. package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
  29. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
  30. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +93 -93
  31. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
  32. package/app-layout/visual-refresh-toolbar/interfaces.d.ts +2 -0
  33. package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  34. package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  35. package/app-layout/visual-refresh-toolbar/navigation/index.d.ts +3 -1
  36. package/app-layout/visual-refresh-toolbar/navigation/index.d.ts.map +1 -1
  37. package/app-layout/visual-refresh-toolbar/navigation/index.js +11 -5
  38. package/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
  39. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +6 -4
  40. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +34 -15
  41. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +6 -4
  42. package/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.d.ts.map +1 -1
  43. package/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js +4 -2
  44. package/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js.map +1 -1
  45. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +30 -29
  46. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +72 -67
  47. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +30 -29
  48. package/app-layout/visual-refresh-toolbar/state/interfaces.d.ts +1 -0
  49. package/app-layout/visual-refresh-toolbar/state/interfaces.d.ts.map +1 -1
  50. package/app-layout/visual-refresh-toolbar/state/interfaces.js.map +1 -1
  51. package/app-layout/visual-refresh-toolbar/state/props-merger.d.ts.map +1 -1
  52. package/app-layout/visual-refresh-toolbar/state/props-merger.js +2 -0
  53. package/app-layout/visual-refresh-toolbar/state/props-merger.js.map +1 -1
  54. package/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts +2 -0
  55. package/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -1
  56. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +26 -3
  57. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
  58. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.d.ts.map +1 -1
  59. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js +2 -1
  60. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js.map +1 -1
  61. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +1 -0
  62. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  63. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  64. package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +14 -14
  65. package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +36 -36
  66. package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +14 -14
  67. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts.map +1 -1
  68. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +3 -3
  69. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -1
  70. package/app-layout-toolbar/index.d.ts.map +1 -1
  71. package/app-layout-toolbar/index.js +2 -1
  72. package/app-layout-toolbar/index.js.map +1 -1
  73. package/attribute-editor/styles.css.js +15 -15
  74. package/attribute-editor/styles.scoped.css +29 -29
  75. package/attribute-editor/styles.selectors.js +15 -15
  76. package/breadcrumb-group/item/styles.css.js +7 -7
  77. package/breadcrumb-group/item/styles.scoped.css +30 -30
  78. package/breadcrumb-group/item/styles.selectors.js +7 -7
  79. package/button/styles.css.js +22 -22
  80. package/button/styles.scoped.css +256 -256
  81. package/button/styles.selectors.js +22 -22
  82. package/button-dropdown/item-element/styles.css.js +21 -21
  83. package/button-dropdown/item-element/styles.scoped.css +37 -37
  84. package/button-dropdown/item-element/styles.selectors.js +21 -21
  85. package/checkbox/styles.css.js +3 -3
  86. package/checkbox/styles.scoped.css +11 -11
  87. package/checkbox/styles.selectors.js +3 -3
  88. package/content-layout/styles.css.js +14 -14
  89. package/content-layout/styles.scoped.css +27 -27
  90. package/content-layout/styles.selectors.js +14 -14
  91. package/dropdown/styles.css.js +20 -20
  92. package/dropdown/styles.scoped.css +49 -49
  93. package/dropdown/styles.selectors.js +20 -20
  94. package/file-token-group/styles.css.js +23 -23
  95. package/file-token-group/styles.scoped.css +36 -36
  96. package/file-token-group/styles.selectors.js +23 -23
  97. package/flashbar/styles.css.js +50 -50
  98. package/flashbar/styles.scoped.css +192 -192
  99. package/flashbar/styles.selectors.js +50 -50
  100. package/help-panel/styles.css.js +6 -6
  101. package/help-panel/styles.scoped.css +72 -72
  102. package/help-panel/styles.selectors.js +6 -6
  103. package/input/styles.css.js +18 -18
  104. package/input/styles.scoped.css +82 -82
  105. package/input/styles.selectors.js +18 -18
  106. package/internal/base-component/styles.scoped.css +6 -1
  107. package/internal/components/abstract-switch/index.d.ts.map +1 -1
  108. package/internal/components/abstract-switch/index.js +7 -1
  109. package/internal/components/abstract-switch/index.js.map +1 -1
  110. package/internal/components/drag-handle-wrapper/styles.css.js +30 -30
  111. package/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
  112. package/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
  113. package/internal/components/option/styles.css.js +17 -17
  114. package/internal/components/option/styles.scoped.css +31 -31
  115. package/internal/components/option/styles.selectors.js +17 -17
  116. package/internal/components/radio-button/styles.css.js +7 -7
  117. package/internal/components/radio-button/styles.scoped.css +18 -18
  118. package/internal/components/radio-button/styles.selectors.js +7 -7
  119. package/internal/components/selectable-item/styles.css.js +22 -22
  120. package/internal/components/selectable-item/styles.scoped.css +57 -57
  121. package/internal/components/selectable-item/styles.selectors.js +22 -22
  122. package/internal/components/token-list/styles.css.js +10 -10
  123. package/internal/components/token-list/styles.scoped.css +25 -25
  124. package/internal/components/token-list/styles.selectors.js +10 -10
  125. package/internal/environment.js +2 -2
  126. package/internal/environment.json +2 -2
  127. package/internal/generated/custom-css-properties/index.d.ts +1 -0
  128. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  129. package/internal/generated/custom-css-properties/index.js +173 -172
  130. package/internal/generated/custom-css-properties/index.js.map +1 -1
  131. package/internal/generated/styles/tokens.d.ts +2 -0
  132. package/internal/generated/styles/tokens.js +2 -0
  133. package/internal/generated/theming/index.cjs +40 -0
  134. package/internal/generated/theming/index.cjs.d.ts +27 -0
  135. package/internal/generated/theming/index.d.ts +27 -0
  136. package/internal/generated/theming/index.js +40 -0
  137. package/internal/manifest.json +1 -1
  138. package/item-card/styles.css.js +14 -14
  139. package/item-card/styles.scoped.css +63 -63
  140. package/item-card/styles.selectors.js +14 -14
  141. package/link/styles.css.js +21 -21
  142. package/link/styles.scoped.css +117 -117
  143. package/link/styles.selectors.js +21 -21
  144. package/manifest.json +2 -2
  145. package/modal/styles.css.js +31 -31
  146. package/modal/styles.scoped.css +48 -48
  147. package/modal/styles.selectors.js +31 -31
  148. package/package.json +95 -1
  149. package/progress-bar/styles.css.js +18 -18
  150. package/progress-bar/styles.scoped.css +48 -48
  151. package/progress-bar/styles.selectors.js +18 -18
  152. package/prompt-input/styles.css.js +26 -26
  153. package/prompt-input/styles.scoped.css +105 -105
  154. package/prompt-input/styles.selectors.js +26 -26
  155. package/segmented-control/styles.css.js +16 -16
  156. package/segmented-control/styles.scoped.css +46 -46
  157. package/segmented-control/styles.selectors.js +16 -16
  158. package/side-navigation/implementation.d.ts.map +1 -1
  159. package/side-navigation/implementation.js +4 -3
  160. package/side-navigation/implementation.js.map +1 -1
  161. package/side-navigation/parts.d.ts +5 -1
  162. package/side-navigation/parts.d.ts.map +1 -1
  163. package/side-navigation/parts.js +38 -26
  164. package/side-navigation/parts.js.map +1 -1
  165. package/side-navigation/styles.css.js +47 -47
  166. package/side-navigation/styles.scoped.css +74 -76
  167. package/side-navigation/styles.selectors.js +47 -47
  168. package/slider/styles.css.js +26 -26
  169. package/slider/styles.scoped.css +165 -165
  170. package/slider/styles.selectors.js +26 -26
  171. package/spinner/styles.css.js +13 -13
  172. package/spinner/styles.scoped.css +39 -39
  173. package/spinner/styles.selectors.js +13 -13
  174. package/status-indicator/internal-interfaces.d.ts +2 -0
  175. package/status-indicator/internal-interfaces.d.ts.map +1 -0
  176. package/status-indicator/internal-interfaces.js +2 -0
  177. package/status-indicator/internal-interfaces.js.map +1 -0
  178. package/status-indicator/internal.d.ts +6 -2
  179. package/status-indicator/internal.d.ts.map +1 -1
  180. package/status-indicator/internal.js +1 -0
  181. package/status-indicator/internal.js.map +1 -1
  182. package/status-indicator/styles.css.js +25 -24
  183. package/status-indicator/styles.scoped.css +59 -53
  184. package/status-indicator/styles.selectors.js +25 -24
  185. package/steps/index.d.ts +2 -0
  186. package/steps/index.d.ts.map +1 -1
  187. package/steps/index.js +5 -3
  188. package/steps/index.js.map +1 -1
  189. package/steps/interfaces.d.ts +9 -2
  190. package/steps/interfaces.d.ts.map +1 -1
  191. package/steps/interfaces.js.map +1 -1
  192. package/steps/internal.d.ts +2 -1
  193. package/steps/internal.d.ts.map +1 -1
  194. package/steps/internal.js +12 -8
  195. package/steps/internal.js.map +1 -1
  196. package/steps/styles.css.js +13 -12
  197. package/steps/styles.scoped.css +27 -22
  198. package/steps/styles.selectors.js +13 -12
  199. package/tabs/styles.css.js +30 -30
  200. package/tabs/styles.scoped.css +76 -76
  201. package/tabs/styles.selectors.js +30 -30
  202. package/tag-editor/styles.css.js +3 -3
  203. package/tag-editor/styles.scoped.css +13 -13
  204. package/tag-editor/styles.selectors.js +3 -3
  205. package/text-content/styles.css.js +1 -1
  206. package/text-content/styles.scoped.css +66 -66
  207. package/text-content/styles.selectors.js +1 -1
  208. package/textarea/styles.css.js +5 -5
  209. package/textarea/styles.scoped.css +45 -45
  210. package/textarea/styles.selectors.js +5 -5
  211. package/toggle/styles.css.js +10 -10
  212. package/toggle/styles.scoped.css +23 -23
  213. package/toggle/styles.selectors.js +10 -10
  214. package/token/styles.css.js +14 -14
  215. package/token/styles.scoped.css +47 -47
  216. package/token/styles.selectors.js +14 -14
@@ -158,7 +158,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
158
158
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
159
159
  SPDX-License-Identifier: Apache-2.0
160
160
  */
161
- .awsui_segment_8cbea_1q3xy_161:not(#\9) {
161
+ .awsui_segment_8cbea_1yunu_161:not(#\9) {
162
162
  font-size: var(--font-size-body-m-a7nh2n, 14px);
163
163
  line-height: var(--line-height-body-m-2mh3ke, 20px);
164
164
  word-wrap: break-word;
@@ -170,8 +170,8 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
170
170
  letter-spacing: 0.25px;
171
171
  padding-block: calc(var(--space-field-vertical-vm99qz, 5px) - var(--border-width-field-2xc78x, 1px));
172
172
  padding-inline: calc(var(--space-button-horizontal-k0c786, 20px) - var(--space-static-xxs-ns94dp, 4px));
173
- background: var(--awsui-style-background-default-z17rmd, var(--color-background-segment-default-b0r494, #ffffff));
174
- color: var(--awsui-style-color-default-z17rmd, var(--color-text-segment-default-vi2vn9, #424650));
173
+ background: var(--awsui-style-background-default-esndbs, var(--color-background-segment-default-b0r494, #ffffff));
174
+ color: var(--awsui-style-color-default-esndbs, var(--color-text-segment-default-vi2vn9, #424650));
175
175
  overflow: visible;
176
176
  border-start-start-radius: calc(var(--border-radius-button-7bgkcs, 20px) - 3px);
177
177
  border-start-end-radius: calc(var(--border-radius-button-7bgkcs, 20px) - 3px);
@@ -183,26 +183,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
183
183
  align-items: center;
184
184
  border-inline: none;
185
185
  border-block: none;
186
- --awsui-style-focus-ring-box-shadow-z17rmd: 0 0 0 var(--awsui-style-focus-ring-border-width-z17rmd, 2px) var(--awsui-style-focus-ring-border-color-z17rmd, var(--color-border-item-focused-uk47pl, #006ce0));
186
+ --awsui-style-focus-ring-box-shadow-esndbs: 0 0 0 var(--awsui-style-focus-ring-border-width-esndbs, 2px) var(--awsui-style-focus-ring-border-color-esndbs, var(--color-border-item-focused-uk47pl, #006ce0));
187
187
  }
188
- .awsui_segment_8cbea_1q3xy_161:not(#\9):not(.awsui_refresh_8cbea_1q3xy_188) {
188
+ .awsui_segment_8cbea_1yunu_161:not(#\9):not(.awsui_refresh_8cbea_1yunu_188) {
189
189
  block-size: calc(100% - var(--space-static-xxs-ns94dp, 4px) - 2 * var(--border-width-field-2xc78x, 1px));
190
190
  }
191
- .awsui_segment_8cbea_1q3xy_161:not(#\9):focus {
191
+ .awsui_segment_8cbea_1yunu_161:not(#\9):focus {
192
192
  outline: none;
193
193
  }
194
- .awsui_segment_8cbea_1q3xy_161.awsui_disabled_8cbea_1q3xy_194:not(#\9) {
195
- background: var(--awsui-style-background-disabled-z17rmd, var(--color-background-segment-disabled-m2a5t7, #ffffff));
196
- color: var(--awsui-style-color-disabled-z17rmd, var(--color-text-interactive-disabled-1bqmrl, #b4b4bb));
194
+ .awsui_segment_8cbea_1yunu_161.awsui_disabled_8cbea_1yunu_194:not(#\9) {
195
+ background: var(--awsui-style-background-disabled-esndbs, var(--color-background-segment-disabled-m2a5t7, #ffffff));
196
+ color: var(--awsui-style-color-disabled-esndbs, var(--color-text-interactive-disabled-1bqmrl, #b4b4bb));
197
197
  }
198
- body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1q3xy_161:not(#\9):focus {
198
+ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1yunu_161:not(#\9):focus {
199
199
  position: relative;
200
200
  }
201
- body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1q3xy_161:not(#\9):focus {
201
+ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1yunu_161:not(#\9):focus {
202
202
  outline: 2px dotted transparent;
203
203
  outline-offset: calc(var(--space-segmented-control-focus-outline-gutter-x1ywqb, 6px) - 1px);
204
204
  }
205
- body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1q3xy_161:not(#\9):focus::before {
205
+ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1yunu_161:not(#\9):focus::before {
206
206
  content: " ";
207
207
  display: block;
208
208
  position: absolute;
@@ -210,14 +210,14 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1q3xy_161:not(#\9):focu
210
210
  inset-block-start: calc(-1 * var(--space-segmented-control-focus-outline-gutter-x1ywqb, 6px));
211
211
  inline-size: calc(100% + var(--space-segmented-control-focus-outline-gutter-x1ywqb, 6px) + var(--space-segmented-control-focus-outline-gutter-x1ywqb, 6px));
212
212
  block-size: calc(100% + var(--space-segmented-control-focus-outline-gutter-x1ywqb, 6px) + var(--space-segmented-control-focus-outline-gutter-x1ywqb, 6px));
213
- border-start-start-radius: var(--awsui-style-focus-ring-border-radius-z17rmd, var(--border-radius-control-default-focus-ring-1uabki, 4px));
214
- border-start-end-radius: var(--awsui-style-focus-ring-border-radius-z17rmd, var(--border-radius-control-default-focus-ring-1uabki, 4px));
215
- border-end-start-radius: var(--awsui-style-focus-ring-border-radius-z17rmd, var(--border-radius-control-default-focus-ring-1uabki, 4px));
216
- border-end-end-radius: var(--awsui-style-focus-ring-border-radius-z17rmd, var(--border-radius-control-default-focus-ring-1uabki, 4px));
217
- box-shadow: var(--awsui-style-focus-ring-box-shadow-z17rmd);
213
+ border-start-start-radius: var(--awsui-style-focus-ring-border-radius-esndbs, var(--border-radius-control-default-focus-ring-1uabki, 4px));
214
+ border-start-end-radius: var(--awsui-style-focus-ring-border-radius-esndbs, var(--border-radius-control-default-focus-ring-1uabki, 4px));
215
+ border-end-start-radius: var(--awsui-style-focus-ring-border-radius-esndbs, var(--border-radius-control-default-focus-ring-1uabki, 4px));
216
+ border-end-end-radius: var(--awsui-style-focus-ring-border-radius-esndbs, var(--border-radius-control-default-focus-ring-1uabki, 4px));
217
+ box-shadow: var(--awsui-style-focus-ring-box-shadow-esndbs);
218
218
  z-index: 1;
219
219
  }
220
- .awsui_segment_8cbea_1q3xy_161:not(#\9):not(:last-child)::after {
220
+ .awsui_segment_8cbea_1yunu_161:not(#\9):not(:last-child)::after {
221
221
  content: "";
222
222
  position: absolute;
223
223
  inset-inline-end: calc(-1 * (var(--space-static-xxs-ns94dp, 4px) + 1px));
@@ -227,53 +227,53 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1q3xy_161:not(#\9):focu
227
227
  background: var(--color-border-input-default-317xk5, #8c8c94);
228
228
  z-index: 1;
229
229
  }
230
- .awsui_segment_8cbea_1q3xy_161:not(#\9):not(.awsui_refresh_8cbea_1q3xy_188):not(:last-child)::after {
230
+ .awsui_segment_8cbea_1yunu_161:not(#\9):not(.awsui_refresh_8cbea_1yunu_188):not(:last-child)::after {
231
231
  inset-inline-end: calc(-1 * var(--space-static-xxs-ns94dp, 4px));
232
232
  }
233
- .awsui_segment_8cbea_1q3xy_161:not(#\9):nth-child(1) {
233
+ .awsui_segment_8cbea_1yunu_161:not(#\9):nth-child(1) {
234
234
  grid-column: 1;
235
235
  }
236
- .awsui_segment_8cbea_1q3xy_161:not(#\9):nth-child(2) {
236
+ .awsui_segment_8cbea_1yunu_161:not(#\9):nth-child(2) {
237
237
  grid-column: 2;
238
238
  }
239
- .awsui_segment_8cbea_1q3xy_161:not(#\9):nth-child(3) {
239
+ .awsui_segment_8cbea_1yunu_161:not(#\9):nth-child(3) {
240
240
  grid-column: 3;
241
241
  }
242
- .awsui_segment_8cbea_1q3xy_161:not(#\9):nth-child(4) {
242
+ .awsui_segment_8cbea_1yunu_161:not(#\9):nth-child(4) {
243
243
  grid-column: 4;
244
244
  }
245
- .awsui_segment_8cbea_1q3xy_161:not(#\9):nth-child(5) {
245
+ .awsui_segment_8cbea_1yunu_161:not(#\9):nth-child(5) {
246
246
  grid-column: 5;
247
247
  }
248
- .awsui_segment_8cbea_1q3xy_161:not(#\9):nth-child(6) {
248
+ .awsui_segment_8cbea_1yunu_161:not(#\9):nth-child(6) {
249
249
  grid-column: 6;
250
250
  }
251
- .awsui_segment_8cbea_1q3xy_161.awsui_selected_8cbea_1q3xy_251:not(#\9) {
252
- background: var(--awsui-style-background-active-z17rmd, var(--color-background-segment-active-1u2ldl, #006ce0));
253
- color: var(--awsui-style-color-active-z17rmd, var(--color-text-segment-active-hlorbe, #ffffff));
251
+ .awsui_segment_8cbea_1yunu_161.awsui_selected_8cbea_1yunu_251:not(#\9) {
252
+ background: var(--awsui-style-background-active-esndbs, var(--color-background-segment-active-1u2ldl, #006ce0));
253
+ color: var(--awsui-style-color-active-esndbs, var(--color-text-segment-active-hlorbe, #ffffff));
254
254
  }
255
- .awsui_segment_8cbea_1q3xy_161:not(#\9):hover:not(.awsui_selected_8cbea_1q3xy_251):not(.awsui_disabled_8cbea_1q3xy_194):not(:focus) {
256
- background: var(--awsui-style-background-hover-z17rmd, var(--color-background-segment-hover-800sl4, #f0fbff));
257
- color: var(--awsui-style-color-hover-z17rmd, var(--color-text-segment-hover-65a2x8, #002b66));
255
+ .awsui_segment_8cbea_1yunu_161:not(#\9):hover:not(.awsui_selected_8cbea_1yunu_251):not(.awsui_disabled_8cbea_1yunu_194):not(:focus) {
256
+ background: var(--awsui-style-background-hover-esndbs, var(--color-background-segment-hover-800sl4, #f0fbff));
257
+ color: var(--awsui-style-color-hover-esndbs, var(--color-text-segment-hover-65a2x8, #002b66));
258
258
  cursor: pointer;
259
259
  }
260
260
 
261
- .awsui_icon_8cbea_1q3xy_261:not(#\9) {
261
+ .awsui_icon_8cbea_1yunu_261:not(#\9) {
262
262
  /* used in test-utils */
263
263
  }
264
264
 
265
- .awsui_with-text_8cbea_1q3xy_265:not(#\9) {
265
+ .awsui_with-text_8cbea_1yunu_265:not(#\9) {
266
266
  position: relative;
267
267
  inset-inline-start: calc(-1 * var(--space-xxs-hwfkai, 4px));
268
268
  margin-inline-end: var(--space-xxs-hwfkai, 4px);
269
269
  }
270
270
 
271
- .awsui_with-no-text_8cbea_1q3xy_271:not(#\9) {
271
+ .awsui_with-no-text_8cbea_1yunu_271:not(#\9) {
272
272
  margin-inline: auto;
273
273
  inset-inline: 0;
274
274
  }
275
275
 
276
- .awsui_root_8cbea_1q3xy_276:not(#\9) {
276
+ .awsui_root_8cbea_1yunu_276:not(#\9) {
277
277
  border-collapse: separate;
278
278
  border-spacing: 0;
279
279
  box-sizing: border-box;
@@ -305,7 +305,7 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1q3xy_161:not(#\9):focu
305
305
  -moz-osx-font-smoothing: auto;
306
306
  }
307
307
 
308
- .awsui_segment-part_8cbea_1q3xy_308:not(#\9) {
308
+ .awsui_segment-part_8cbea_1yunu_308:not(#\9) {
309
309
  display: inline-grid;
310
310
  border-inline: solid var(--border-width-field-2xc78x, 1px) var(--color-border-segment-wrapper-mvxnza, #8c8c94);
311
311
  border-block: solid var(--border-width-field-2xc78x, 1px) var(--color-border-segment-wrapper-mvxnza, #8c8c94);
@@ -320,46 +320,46 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_1q3xy_161:not(#\9):focu
320
320
  padding-inline: calc(var(--space-static-xxs-ns94dp, 4px) - var(--border-width-field-2xc78x, 1px));
321
321
  gap: calc(var(--space-static-xxs-ns94dp, 4px) * 2 + 1px);
322
322
  }
323
- .awsui_segment-part_8cbea_1q3xy_308:not(#\9):not(.awsui_refresh_8cbea_1q3xy_188) {
323
+ .awsui_segment-part_8cbea_1yunu_308:not(#\9):not(.awsui_refresh_8cbea_1yunu_188) {
324
324
  padding-inline: calc(var(--space-static-xxxs-yidks1, 2px) + var(--border-width-field-2xc78x, 1px));
325
325
  padding-block: 0;
326
326
  gap: calc(var(--space-static-xxs-ns94dp, 4px) * 2 - 1px);
327
327
  }
328
328
  @media (max-width: 688px) {
329
- .awsui_segment-part_8cbea_1q3xy_308:not(#\9) {
329
+ .awsui_segment-part_8cbea_1yunu_308:not(#\9) {
330
330
  display: none;
331
331
  }
332
332
  }
333
333
 
334
- .awsui_select_8cbea_1q3xy_251:not(#\9) {
334
+ .awsui_select_8cbea_1yunu_251:not(#\9) {
335
335
  display: none;
336
336
  }
337
337
  @media (max-width: 688px) {
338
- .awsui_select_8cbea_1q3xy_251:not(#\9) {
338
+ .awsui_select_8cbea_1yunu_251:not(#\9) {
339
339
  display: block;
340
340
  }
341
341
  }
342
342
 
343
- .awsui_segment-count-2_8cbea_1q3xy_343:not(#\9) {
343
+ .awsui_segment-count-2_8cbea_1yunu_343:not(#\9) {
344
344
  grid-template-columns: repeat(2, auto);
345
345
  }
346
346
 
347
- .awsui_segment-count-3_8cbea_1q3xy_347:not(#\9) {
347
+ .awsui_segment-count-3_8cbea_1yunu_347:not(#\9) {
348
348
  grid-template-columns: repeat(3, auto);
349
349
  }
350
350
 
351
- .awsui_segment-count-4_8cbea_1q3xy_351:not(#\9) {
351
+ .awsui_segment-count-4_8cbea_1yunu_351:not(#\9) {
352
352
  grid-template-columns: repeat(4, auto);
353
353
  }
354
354
 
355
- .awsui_segment-count-5_8cbea_1q3xy_355:not(#\9) {
355
+ .awsui_segment-count-5_8cbea_1yunu_355:not(#\9) {
356
356
  grid-template-columns: repeat(5, auto);
357
357
  }
358
358
 
359
- .awsui_segment-count-6_8cbea_1q3xy_359:not(#\9) {
359
+ .awsui_segment-count-6_8cbea_1yunu_359:not(#\9) {
360
360
  grid-template-columns: repeat(6, auto);
361
361
  }
362
362
 
363
- .awsui_disabled-reason-tooltip_8cbea_1q3xy_363:not(#\9) {
363
+ .awsui_disabled-reason-tooltip_8cbea_1yunu_363:not(#\9) {
364
364
  /* used in test-utils or tests */
365
365
  }
@@ -2,21 +2,21 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "segment": "awsui_segment_8cbea_1q3xy_161",
6
- "refresh": "awsui_refresh_8cbea_1q3xy_188",
7
- "disabled": "awsui_disabled_8cbea_1q3xy_194",
8
- "selected": "awsui_selected_8cbea_1q3xy_251",
9
- "icon": "awsui_icon_8cbea_1q3xy_261",
10
- "with-text": "awsui_with-text_8cbea_1q3xy_265",
11
- "with-no-text": "awsui_with-no-text_8cbea_1q3xy_271",
12
- "root": "awsui_root_8cbea_1q3xy_276",
13
- "segment-part": "awsui_segment-part_8cbea_1q3xy_308",
14
- "select": "awsui_select_8cbea_1q3xy_251",
15
- "segment-count-2": "awsui_segment-count-2_8cbea_1q3xy_343",
16
- "segment-count-3": "awsui_segment-count-3_8cbea_1q3xy_347",
17
- "segment-count-4": "awsui_segment-count-4_8cbea_1q3xy_351",
18
- "segment-count-5": "awsui_segment-count-5_8cbea_1q3xy_355",
19
- "segment-count-6": "awsui_segment-count-6_8cbea_1q3xy_359",
20
- "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_8cbea_1q3xy_363"
5
+ "segment": "awsui_segment_8cbea_1yunu_161",
6
+ "refresh": "awsui_refresh_8cbea_1yunu_188",
7
+ "disabled": "awsui_disabled_8cbea_1yunu_194",
8
+ "selected": "awsui_selected_8cbea_1yunu_251",
9
+ "icon": "awsui_icon_8cbea_1yunu_261",
10
+ "with-text": "awsui_with-text_8cbea_1yunu_265",
11
+ "with-no-text": "awsui_with-no-text_8cbea_1yunu_271",
12
+ "root": "awsui_root_8cbea_1yunu_276",
13
+ "segment-part": "awsui_segment-part_8cbea_1yunu_308",
14
+ "select": "awsui_select_8cbea_1yunu_251",
15
+ "segment-count-2": "awsui_segment-count-2_8cbea_1yunu_343",
16
+ "segment-count-3": "awsui_segment-count-3_8cbea_1yunu_347",
17
+ "segment-count-4": "awsui_segment-count-4_8cbea_1yunu_351",
18
+ "segment-count-5": "awsui_segment-count-5_8cbea_1yunu_355",
19
+ "segment-count-6": "awsui_segment-count-6_8cbea_1yunu_359",
20
+ "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_8cbea_1yunu_363"
21
21
  };
22
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/side-navigation/implementation.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMnD,KAAK,2BAA2B,GAAG,mBAAmB,GAAG,0BAA0B,CAAC;AAEpF,wBAAgB,4BAA4B,CAAC,EAC3C,MAAM,EACN,YAAY,EACZ,UAAU,EACV,KAAU,EACV,QAAQ,EACR,QAAQ,EACR,SAAiB,EACjB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,2BAA2B,eA+D7B;AAED,eAAO,MAAM,8BAA8B,mGAA0D,CAAC"}
1
+ {"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/side-navigation/implementation.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMnD,KAAK,2BAA2B,GAAG,mBAAmB,GAAG,0BAA0B,CAAC;AAEpF,wBAAgB,4BAA4B,CAAC,EAC3C,MAAM,EACN,YAAY,EACZ,UAAU,EACV,KAAU,EACV,QAAQ,EACR,QAAQ,EACR,SAAiB,EACjB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,2BAA2B,eAuE7B;AAED,eAAO,MAAM,8BAA8B,mGAA0D,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import React, { useCallback, useEffect, useMemo } from 'react';
3
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
4
4
  import clsx from 'clsx';
5
5
  import { useAppLayoutToolbarDesignEnabled } from '../app-layout/utils/feature-flags';
6
6
  import { getBaseProps } from '../internal/base-component';
@@ -14,6 +14,7 @@ export function SideNavigationImplementation({ header, itemsControl, activeHref,
14
14
  const baseProps = getBaseProps(props);
15
15
  const isToolbar = useAppLayoutToolbarDesignEnabled();
16
16
  const parentMap = useMemo(() => generateExpandableItemsMapping(items), [items]);
17
+ const [activeTooltip, setActiveTooltip] = useState(null);
17
18
  if (isDevelopment) {
18
19
  // This code should be wiped in production anyway.
19
20
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -26,11 +27,11 @@ export function SideNavigationImplementation({ header, itemsControl, activeHref,
26
27
  const onFollowHandler = useCallback((item, sourceEvent) => {
27
28
  fireCancelableEvent(onFollow, item, sourceEvent);
28
29
  }, [onFollow]);
29
- return (React.createElement("div", { ...baseProps, className: clsx(styles.root, baseProps.className, isToolbar && styles['with-toolbar']), ref: __internalRootRef },
30
+ return (React.createElement("div", { ...baseProps, className: clsx(styles.root, baseProps.className, isToolbar && styles['with-toolbar'], collapsed && styles['root--collapsed']), ref: __internalRootRef },
30
31
  header && (React.createElement(Header, { definition: header, activeHref: activeHref, fireChange: onChangeHandler, fireFollow: onFollowHandler, collapsed: collapsed })),
31
32
  !collapsed && itemsControl && React.createElement("div", { className: styles['items-control'] }, itemsControl),
32
33
  items && (React.createElement("div", { className: styles['list-container'] },
33
- React.createElement(NavigationItemsList, { variant: "root", items: items, fireFollow: onFollowHandler, fireChange: onChangeHandler, activeHref: activeHref, collapsed: collapsed })))));
34
+ React.createElement(NavigationItemsList, { variant: "root", items: items, fireFollow: onFollowHandler, fireChange: onChangeHandler, activeHref: activeHref, collapsed: collapsed, activeTooltip: activeTooltip, setActiveTooltip: setActiveTooltip })))));
34
35
  }
35
36
  export const createWidgetizedSideNavigation = createWidgetizedComponent(SideNavigationImplementation);
36
37
  //# sourceMappingURL=implementation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/side-navigation/implementation.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport clsx from 'clsx';\n\nimport { useAppLayoutToolbarDesignEnabled } from '../app-layout/utils/feature-flags';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent, fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport { SideNavigationProps } from './interfaces';\nimport { Header, NavigationItemsList } from './parts';\nimport { checkDuplicateHrefs, generateExpandableItemsMapping } from './util';\n\nimport styles from './styles.css.js';\n\ntype SideNavigationInternalProps = SideNavigationProps & InternalBaseComponentProps;\n\nexport function SideNavigationImplementation({\n header,\n itemsControl,\n activeHref,\n items = [],\n onFollow,\n onChange,\n collapsed = false,\n __internalRootRef,\n ...props\n}: SideNavigationInternalProps) {\n const baseProps = getBaseProps(props);\n const isToolbar = useAppLayoutToolbarDesignEnabled();\n const parentMap = useMemo(() => generateExpandableItemsMapping(items), [items]);\n\n if (isDevelopment) {\n // This code should be wiped in production anyway.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => checkDuplicateHrefs(items), [items]);\n }\n\n const onChangeHandler = useCallback(\n (item: SideNavigationProps.Section | SideNavigationProps.ExpandableLinkGroup, expanded: boolean) => {\n // generateExpandableItemsMapping walks through the entire tree, so we're certain about getting a value.\n fireNonCancelableEvent(onChange, { item, expanded: expanded, expandableParents: parentMap.get(item)! });\n },\n [onChange, parentMap]\n );\n\n const onFollowHandler = useCallback(\n (\n item:\n | SideNavigationProps.Link\n | SideNavigationProps.Header\n | SideNavigationProps.LinkGroup\n | SideNavigationProps.ExpandableLinkGroup,\n sourceEvent: React.SyntheticEvent | Event\n ) => {\n fireCancelableEvent(onFollow, item, sourceEvent);\n },\n [onFollow]\n );\n\n return (\n <div\n {...baseProps}\n className={clsx(styles.root, baseProps.className, isToolbar && styles['with-toolbar'])}\n ref={__internalRootRef}\n >\n {header && (\n <Header\n definition={header}\n activeHref={activeHref}\n fireChange={onChangeHandler}\n fireFollow={onFollowHandler}\n collapsed={collapsed}\n />\n )}\n {!collapsed && itemsControl && <div className={styles['items-control']}>{itemsControl}</div>}\n {items && (\n <div className={styles['list-container']}>\n <NavigationItemsList\n variant=\"root\"\n items={items}\n fireFollow={onFollowHandler}\n fireChange={onChangeHandler}\n activeHref={activeHref}\n collapsed={collapsed}\n />\n </div>\n )}\n </div>\n );\n}\n\nexport const createWidgetizedSideNavigation = createWidgetizedComponent(SideNavigationImplementation);\n"]}
1
+ {"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/side-navigation/implementation.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useAppLayoutToolbarDesignEnabled } from '../app-layout/utils/feature-flags';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent, fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport { SideNavigationProps } from './interfaces';\nimport { Header, NavigationItemsList } from './parts';\nimport { checkDuplicateHrefs, generateExpandableItemsMapping } from './util';\n\nimport styles from './styles.css.js';\n\ntype SideNavigationInternalProps = SideNavigationProps & InternalBaseComponentProps;\n\nexport function SideNavigationImplementation({\n header,\n itemsControl,\n activeHref,\n items = [],\n onFollow,\n onChange,\n collapsed = false,\n __internalRootRef,\n ...props\n}: SideNavigationInternalProps) {\n const baseProps = getBaseProps(props);\n const isToolbar = useAppLayoutToolbarDesignEnabled();\n const parentMap = useMemo(() => generateExpandableItemsMapping(items), [items]);\n const [activeTooltip, setActiveTooltip] = useState<string | null>(null);\n\n if (isDevelopment) {\n // This code should be wiped in production anyway.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => checkDuplicateHrefs(items), [items]);\n }\n\n const onChangeHandler = useCallback(\n (item: SideNavigationProps.Section | SideNavigationProps.ExpandableLinkGroup, expanded: boolean) => {\n // generateExpandableItemsMapping walks through the entire tree, so we're certain about getting a value.\n fireNonCancelableEvent(onChange, { item, expanded: expanded, expandableParents: parentMap.get(item)! });\n },\n [onChange, parentMap]\n );\n\n const onFollowHandler = useCallback(\n (\n item:\n | SideNavigationProps.Link\n | SideNavigationProps.Header\n | SideNavigationProps.LinkGroup\n | SideNavigationProps.ExpandableLinkGroup,\n sourceEvent: React.SyntheticEvent | Event\n ) => {\n fireCancelableEvent(onFollow, item, sourceEvent);\n },\n [onFollow]\n );\n\n return (\n <div\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n isToolbar && styles['with-toolbar'],\n collapsed && styles['root--collapsed']\n )}\n ref={__internalRootRef}\n >\n {header && (\n <Header\n definition={header}\n activeHref={activeHref}\n fireChange={onChangeHandler}\n fireFollow={onFollowHandler}\n collapsed={collapsed}\n />\n )}\n {!collapsed && itemsControl && <div className={styles['items-control']}>{itemsControl}</div>}\n {items && (\n <div className={styles['list-container']}>\n <NavigationItemsList\n variant=\"root\"\n items={items}\n fireFollow={onFollowHandler}\n fireChange={onChangeHandler}\n activeHref={activeHref}\n collapsed={collapsed}\n activeTooltip={activeTooltip}\n setActiveTooltip={setActiveTooltip}\n />\n </div>\n )}\n </div>\n );\n}\n\nexport const createWidgetizedSideNavigation = createWidgetizedComponent(SideNavigationImplementation);\n"]}
@@ -6,6 +6,8 @@ interface BaseItemComponentProps {
6
6
  fireFollow: (item: SideNavigationProps.Link | SideNavigationProps.Header | SideNavigationProps.LinkGroup | SideNavigationProps.ExpandableLinkGroup, event: React.SyntheticEvent | Event) => void;
7
7
  position?: string;
8
8
  collapsed?: boolean;
9
+ activeTooltip?: string | null;
10
+ setActiveTooltip?: (position: string | null) => void;
9
11
  }
10
12
  interface HeaderProps extends BaseItemComponentProps {
11
13
  definition: SideNavigationProps.Header;
@@ -27,6 +29,8 @@ export declare function NavigationItemsList({
27
29
  fireChange,
28
30
  fireFollow,
29
31
  position,
30
- collapsed
32
+ collapsed,
33
+ activeTooltip,
34
+ setActiveTooltip
31
35
  }: NavigationItemsListProps): JSX.Element;
32
36
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/side-navigation/parts.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuE,MAAM,OAAO,CAAC;AAgB5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAOnD,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,mBAAmB,CAAC,OAAO,GAAG,mBAAmB,CAAC,mBAAmB,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACrH,UAAU,EAAE,CACV,IAAI,EACA,mBAAmB,CAAC,IAAI,GACxB,mBAAmB,CAAC,MAAM,GAC1B,mBAAmB,CAAC,SAAS,GAC7B,mBAAmB,CAAC,mBAAmB,EAC3C,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,KAChC,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,WAAY,SAAQ,sBAAsB;IAClD,UAAU,EAAE,mBAAmB,CAAC,MAAM,CAAC;CACxC;AAED,wBAAgB,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,WAAW,eA4DpF;AAED,UAAU,wBAAyB,SAAQ,sBAAsB;IAC/D,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,EAAE,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,uBAAuB,GAAG,MAAM,CAAC;CACxF;AAQD,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAa,EACb,SAAS,GACV,EAAE,wBAAwB,eA8Q1B"}
1
+ {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/side-navigation/parts.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuE,MAAM,OAAO,CAAC;AAgB5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAOnD,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,mBAAmB,CAAC,OAAO,GAAG,mBAAmB,CAAC,mBAAmB,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACrH,UAAU,EAAE,CACV,IAAI,EACA,mBAAmB,CAAC,IAAI,GACxB,mBAAmB,CAAC,MAAM,GAC1B,mBAAmB,CAAC,SAAS,GAC7B,mBAAmB,CAAC,mBAAmB,EAC3C,KAAK,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,KAChC,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACtD;AAED,UAAU,WAAY,SAAQ,sBAAsB;IAClD,UAAU,EAAE,mBAAmB,CAAC,MAAM,CAAC;CACxC;AAED,wBAAgB,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,WAAW,eA2DpF;AAED,UAAU,wBAAyB,SAAQ,sBAAsB;IAC/D,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,EAAE,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,uBAAuB,GAAG,MAAM,CAAC;CACxF;AAQD,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAa,EACb,SAAS,EACT,aAAa,EACb,gBAAgB,GACjB,EAAE,wBAAwB,eA0R1B"}
@@ -32,18 +32,18 @@ export function Header({ definition, activeHref, fireFollow, collapsed }) {
32
32
  },
33
33
  };
34
34
  return (React.createElement(React.Fragment, null,
35
- React.createElement("h2", { className: clsx(styles.header, collapsed && styles['header--collapsed']) },
36
- React.createElement("a", { href: definition.href, className: clsx(styles['header-link'], { [styles['header-link--has-logo']]: !!definition.logo }), "aria-current": definition.href === activeHref ? 'page' : undefined, "aria-label": collapsed ? definition.text : undefined, onClick: onClick, ...getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata) },
35
+ !collapsed && (React.createElement("h2", { className: styles.header },
36
+ React.createElement("a", { href: definition.href, className: clsx(styles['header-link'], { [styles['header-link--has-logo']]: !!definition.logo }), "aria-current": definition.href === activeHref ? 'page' : undefined, onClick: onClick, ...getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata) },
37
37
  definition.logo &&
38
38
  (definition.logo.svg ? (React.createElement("span", { className: clsx(styles['header-logo'], {
39
- [styles['header-logo--stretched']]: !definition.text || collapsed,
39
+ [styles['header-logo--stretched']]: !definition.text,
40
40
  }) }, definition.logo.svg)) : (React.createElement("img", { className: clsx(styles['header-logo'], {
41
- [styles['header-logo--stretched']]: !definition.text || collapsed,
41
+ [styles['header-logo--stretched']]: !definition.text,
42
42
  }), src: definition.logo.src, alt: definition.logo.alt }))),
43
- !collapsed && (React.createElement("span", { className: clsx(styles['header-link-text'], analyticsSelectors['header-link-text']) }, definition.text)))),
44
- React.createElement(Divider, { isPresentational: true, variant: "header" })));
43
+ React.createElement("span", { className: clsx(styles['header-link-text'], analyticsSelectors['header-link-text']) }, definition.text)))),
44
+ !collapsed && React.createElement(Divider, { isPresentational: true, variant: "header" })));
45
45
  }
46
- export function NavigationItemsList({ items, variant, activeHref, fireChange, fireFollow, position = '', collapsed, }) {
46
+ export function NavigationItemsList({ items, variant, activeHref, fireChange, fireFollow, position = '', collapsed, activeTooltip, setActiveTooltip, }) {
47
47
  const lists = [];
48
48
  let currentListIndex = 0;
49
49
  lists[currentListIndex] = {
@@ -83,7 +83,7 @@ export function NavigationItemsList({ items, variant, activeHref, fireChange, fi
83
83
  const groupElements = iconChildren.map((child, childIndex) => {
84
84
  const childPosition = `${position ? `${position},` : ''}${itemid},${childIndex + 1}`;
85
85
  return (React.createElement("li", { key: childPosition, className: clsx(styles['list-item'], styles['list-item--collapsed']) },
86
- React.createElement(Link, { definition: child, activeHref: activeHref, fireFollow: fireFollow, fireChange: fireChange, position: childPosition, collapsed: collapsed })));
86
+ React.createElement(Link, { definition: child, activeHref: activeHref, fireFollow: fireFollow, fireChange: fireChange, position: childPosition, collapsed: collapsed, activeTooltip: activeTooltip, setActiveTooltip: setActiveTooltip })));
87
87
  });
88
88
  const prevItem = index > 0 ? items[index - 1] : null;
89
89
  const nextItem = index < items.length - 1 ? items[index + 1] : null;
@@ -120,35 +120,35 @@ export function NavigationItemsList({ items, variant, activeHref, fireChange, fi
120
120
  case 'link': {
121
121
  (_a = lists[currentListIndex].items) === null || _a === void 0 ? void 0 : _a.push({
122
122
  element: (React.createElement("li", { key: index, "data-itemid": `item-${itemid}`, className: clsx(styles['list-item'], collapsed && styles['list-item--collapsed']) },
123
- React.createElement(Link, { definition: item, activeHref: activeHref, fireChange: fireChange, fireFollow: fireFollow, position: itemPosition, collapsed: collapsed }))),
123
+ React.createElement(Link, { definition: item, activeHref: activeHref, fireChange: fireChange, fireFollow: fireFollow, position: itemPosition, collapsed: collapsed, activeTooltip: activeTooltip, setActiveTooltip: setActiveTooltip }))),
124
124
  });
125
125
  return;
126
126
  }
127
127
  case 'section': {
128
128
  (_b = lists[currentListIndex].items) === null || _b === void 0 ? void 0 : _b.push({
129
129
  element: (React.createElement("li", { key: index, "data-itemid": `item-${itemid}`, className: clsx(styles['list-item'], collapsed && styles['list-item--collapsed']) },
130
- React.createElement(Section, { definition: item, activeHref: activeHref, variant: variant, fireChange: fireChange, fireFollow: fireFollow, position: itemPosition, collapsed: collapsed }))),
130
+ React.createElement(Section, { definition: item, activeHref: activeHref, variant: variant, fireChange: fireChange, fireFollow: fireFollow, position: itemPosition, collapsed: collapsed, activeTooltip: activeTooltip, setActiveTooltip: setActiveTooltip }))),
131
131
  });
132
132
  return;
133
133
  }
134
134
  case 'section-group': {
135
135
  (_c = lists[currentListIndex].items) === null || _c === void 0 ? void 0 : _c.push({
136
136
  element: (React.createElement("li", { key: index, "data-itemid": `item-${itemid}`, className: clsx(styles['list-item'], collapsed && styles['list-item--collapsed']) },
137
- React.createElement(SectionGroup, { definition: item, activeHref: activeHref, fireChange: fireChange, fireFollow: fireFollow, position: itemPosition, collapsed: collapsed }))),
137
+ React.createElement(SectionGroup, { definition: item, activeHref: activeHref, fireChange: fireChange, fireFollow: fireFollow, position: itemPosition, collapsed: collapsed, activeTooltip: activeTooltip, setActiveTooltip: setActiveTooltip }))),
138
138
  });
139
139
  return;
140
140
  }
141
141
  case 'link-group': {
142
142
  (_d = lists[currentListIndex].items) === null || _d === void 0 ? void 0 : _d.push({
143
143
  element: (React.createElement("li", { key: index, "data-itemid": `item-${itemid}`, className: clsx(styles['list-item'], collapsed && styles['list-item--collapsed']) },
144
- React.createElement(LinkGroup, { definition: item, activeHref: activeHref, fireChange: fireChange, fireFollow: fireFollow, position: itemPosition, collapsed: collapsed }))),
144
+ React.createElement(LinkGroup, { definition: item, activeHref: activeHref, fireChange: fireChange, fireFollow: fireFollow, position: itemPosition, collapsed: collapsed, activeTooltip: activeTooltip, setActiveTooltip: setActiveTooltip }))),
145
145
  });
146
146
  return;
147
147
  }
148
148
  case 'expandable-link-group': {
149
149
  (_e = lists[currentListIndex].items) === null || _e === void 0 ? void 0 : _e.push({
150
150
  element: (React.createElement("li", { key: index, "data-itemid": `item-${itemid}`, className: clsx(styles['list-item'], collapsed && styles['list-item--collapsed']) },
151
- React.createElement(ExpandableLinkGroup, { definition: item, activeHref: activeHref, fireChange: fireChange, fireFollow: fireFollow, variant: variant, position: itemPosition, collapsed: collapsed }))),
151
+ React.createElement(ExpandableLinkGroup, { definition: item, activeHref: activeHref, fireChange: fireChange, fireFollow: fireFollow, variant: variant, position: itemPosition, collapsed: collapsed, activeTooltip: activeTooltip, setActiveTooltip: setActiveTooltip }))),
152
152
  });
153
153
  return;
154
154
  }
@@ -199,23 +199,35 @@ const ItemIcon = React.forwardRef(function ItemIcon({ icon, collapsed, className
199
199
  // Used in the collapsed state, where the visible labels are hidden, to give
200
200
  // pointer and keyboard users a way to identify each item without relying on
201
201
  // their browser's native title popup.
202
- function useCollapsedTooltip(label) {
203
- const [show, setShow] = useState(false);
202
+ function useCollapsedTooltip({ label, position, activeTooltip, setActiveTooltip, }) {
204
203
  const triggerRef = useRef(null);
204
+ const id = position !== null && position !== void 0 ? position : '';
205
+ const show = activeTooltip === id;
206
+ const claim = () => setActiveTooltip === null || setActiveTooltip === void 0 ? void 0 : setActiveTooltip(id);
207
+ const release = () => {
208
+ if (activeTooltip === id) {
209
+ setActiveTooltip === null || setActiveTooltip === void 0 ? void 0 : setActiveTooltip(null);
210
+ }
211
+ };
205
212
  const triggerProps = {
206
- onFocus: () => setShow(true),
207
- onBlur: () => setShow(false),
208
- onMouseEnter: () => setShow(true),
209
- onMouseLeave: () => setShow(false),
213
+ onFocus: claim,
214
+ onBlur: release,
215
+ onMouseEnter: claim,
216
+ onMouseLeave: release,
210
217
  };
211
- const tooltip = show ? (React.createElement(Tooltip, { getTrack: () => triggerRef.current, content: label, position: "right", onEscape: () => setShow(false) })) : null;
218
+ const tooltip = show ? (React.createElement(Tooltip, { getTrack: () => triggerRef.current, content: label, position: "right", onEscape: release })) : null;
212
219
  return { triggerRef, triggerProps, tooltip };
213
220
  }
214
- function Link({ definition, activeHref, fireFollow, position, collapsed }) {
221
+ function Link({ definition, activeHref, fireFollow, position, collapsed, activeTooltip, setActiveTooltip }) {
215
222
  checkSafeUrl('SideNavigation', definition.href);
216
223
  const isActive = definition.href === activeHref;
217
224
  const i18n = useInternalI18n('link');
218
- const collapsedTooltip = useCollapsedTooltip(definition.text);
225
+ const collapsedTooltip = useCollapsedTooltip({
226
+ label: definition.text,
227
+ position,
228
+ activeTooltip,
229
+ setActiveTooltip,
230
+ });
219
231
  const onClick = useCallback((event) => {
220
232
  if (isPlainLeftClick(event)) {
221
233
  fireFollow(definition, event);
@@ -274,7 +286,7 @@ function SectionGroup({ definition, activeHref, fireFollow, fireChange, position
274
286
  React.createElement(InternalBox, { className: styles['section-group-title'], variant: "h3", fontSize: isOneTheme ? 'heading-s' : undefined }, definition.title),
275
287
  React.createElement(NavigationItemsList, { variant: "section-group", items: definition.items, fireFollow: fireFollow, fireChange: fireChange, activeHref: activeHref, position: position })));
276
288
  }
277
- function LinkGroup({ definition, activeHref, fireFollow, fireChange, position, collapsed }) {
289
+ function LinkGroup({ definition, activeHref, fireFollow, fireChange, position, collapsed, activeTooltip, setActiveTooltip, }) {
278
290
  checkSafeUrl('SideNavigation', definition.href);
279
291
  return (React.createElement(React.Fragment, null,
280
292
  React.createElement(Link, { definition: {
@@ -283,10 +295,10 @@ function LinkGroup({ definition, activeHref, fireFollow, fireChange, position, c
283
295
  text: definition.text,
284
296
  info: definition.info,
285
297
  icon: definition.icon,
286
- }, fireFollow: (_, event) => fireFollow(definition, event), fireChange: fireChange, activeHref: activeHref, position: position, collapsed: collapsed }),
298
+ }, fireFollow: (_, event) => fireFollow(definition, event), fireChange: fireChange, activeHref: activeHref, position: position, collapsed: collapsed, activeTooltip: activeTooltip, setActiveTooltip: setActiveTooltip }),
287
299
  !collapsed && (React.createElement(NavigationItemsList, { variant: "link-group", items: definition.items, fireFollow: fireFollow, fireChange: fireChange, activeHref: activeHref, position: position }))));
288
300
  }
289
- function ExpandableLinkGroup({ definition, fireFollow, fireChange, activeHref, variant, position, collapsed, }) {
301
+ function ExpandableLinkGroup({ definition, fireFollow, fireChange, activeHref, variant, position, collapsed, activeTooltip, setActiveTooltip, }) {
290
302
  // Check whether the definition contains an active link and memoize it to avoid
291
303
  // rechecking every time.
292
304
  const containsActiveLink = useMemo(() => {
@@ -321,7 +333,7 @@ function ExpandableLinkGroup({ definition, fireFollow, fireChange, activeHref, v
321
333
  }
322
334
  };
323
335
  if (collapsed) {
324
- return (React.createElement(Link, { definition: { type: 'link', href: definition.href, text: definition.text, icon: definition.icon }, fireFollow: onHeaderFollow, fireChange: fireChange, activeHref: activeHref, position: position, collapsed: collapsed }));
336
+ return (React.createElement(Link, { definition: { type: 'link', href: definition.href, text: definition.text, icon: definition.icon }, fireFollow: onHeaderFollow, fireChange: fireChange, activeHref: activeHref, position: position, collapsed: collapsed, activeTooltip: activeTooltip, setActiveTooltip: setActiveTooltip }));
325
337
  }
326
338
  return (React.createElement(InternalExpandableSection, { className: clsx(styles['expandable-link-group'], variant === 'section-group' && styles['expandable-link-group--no-ident'], definition.href === activeHref && styles['expandable-link-group--active']), variant: "navigation", expanded: userExpanded !== null && userExpanded !== void 0 ? userExpanded : expanded, onChange: onExpandedChange, headerText: React.createElement(Link, { definition: { type: 'link', href: definition.href, text: definition.text, icon: definition.icon }, fireFollow: onHeaderFollow, fireChange: fireChange, activeHref: activeHref, position: position }) },
327
339
  React.createElement(NavigationItemsList, { variant: "expandable-link-group", items: definition.items, fireFollow: fireFollow, fireChange: fireChange, activeHref: activeHref, position: position })));