@cloudscape-design/components 3.0.1298 → 3.0.1300

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 (123) hide show
  1. package/attribute-editor/styles.css.js +15 -15
  2. package/attribute-editor/styles.scoped.css +29 -28
  3. package/attribute-editor/styles.selectors.js +15 -15
  4. package/autosuggest/interfaces.d.ts +0 -2
  5. package/autosuggest/interfaces.d.ts.map +1 -1
  6. package/autosuggest/interfaces.js.map +1 -1
  7. package/breadcrumb-group/item/styles.css.js +7 -7
  8. package/breadcrumb-group/item/styles.scoped.css +30 -29
  9. package/breadcrumb-group/item/styles.selectors.js +7 -7
  10. package/breadcrumb-group/styles.css.js +14 -14
  11. package/breadcrumb-group/styles.scoped.css +25 -25
  12. package/breadcrumb-group/styles.selectors.js +14 -14
  13. package/button-dropdown/category-elements/category-element.js +1 -1
  14. package/button-dropdown/category-elements/category-element.js.map +1 -1
  15. package/button-dropdown/category-elements/expandable-category-element.js +1 -1
  16. package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  17. package/button-dropdown/category-elements/mobile-expandable-category-element.js +1 -1
  18. package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  19. package/button-dropdown/item-element/index.js +1 -1
  20. package/button-dropdown/item-element/index.js.map +1 -1
  21. package/button-dropdown/item-element/styles.css.js +21 -21
  22. package/button-dropdown/item-element/styles.scoped.css +38 -37
  23. package/button-dropdown/item-element/styles.selectors.js +21 -21
  24. package/copy-to-clipboard/index.d.ts +1 -0
  25. package/copy-to-clipboard/index.d.ts.map +1 -1
  26. package/copy-to-clipboard/index.js +2 -2
  27. package/copy-to-clipboard/index.js.map +1 -1
  28. package/copy-to-clipboard/interfaces.d.ts +5 -0
  29. package/copy-to-clipboard/interfaces.d.ts.map +1 -1
  30. package/copy-to-clipboard/interfaces.js.map +1 -1
  31. package/copy-to-clipboard/internal.d.ts +1 -0
  32. package/copy-to-clipboard/internal.d.ts.map +1 -1
  33. package/copy-to-clipboard/internal.js +3 -3
  34. package/copy-to-clipboard/internal.js.map +1 -1
  35. package/copy-to-clipboard/styles.css.js +5 -3
  36. package/copy-to-clipboard/styles.scoped.css +18 -3
  37. package/copy-to-clipboard/styles.selectors.js +5 -3
  38. package/drawer/implementation.d.ts +3 -3
  39. package/drawer/implementation.d.ts.map +1 -1
  40. package/drawer/implementation.js +3 -2
  41. package/drawer/implementation.js.map +1 -1
  42. package/drawer/index.d.ts +2 -10
  43. package/drawer/index.d.ts.map +1 -1
  44. package/drawer/index.js +21 -9
  45. package/drawer/index.js.map +1 -1
  46. package/drawer/interfaces.d.ts +45 -18
  47. package/drawer/interfaces.d.ts.map +1 -1
  48. package/drawer/interfaces.js.map +1 -1
  49. package/drawer/styles.css.js +29 -25
  50. package/drawer/styles.scoped.css +43 -34
  51. package/drawer/styles.selectors.js +29 -25
  52. package/drawer/utils.d.ts +2 -2
  53. package/drawer/utils.d.ts.map +1 -1
  54. package/drawer/utils.js +6 -5
  55. package/drawer/utils.js.map +1 -1
  56. package/form-field/styles.css.js +24 -24
  57. package/form-field/styles.scoped.css +41 -41
  58. package/form-field/styles.selectors.js +24 -24
  59. package/help-panel/styles.css.js +6 -6
  60. package/help-panel/styles.scoped.css +73 -71
  61. package/help-panel/styles.selectors.js +6 -6
  62. package/internal/base-component/styles.scoped.css +31 -13
  63. package/internal/components/token-list/styles.css.js +10 -10
  64. package/internal/components/token-list/styles.scoped.css +24 -23
  65. package/internal/components/token-list/styles.selectors.js +10 -10
  66. package/internal/environment.js +2 -2
  67. package/internal/environment.json +2 -2
  68. package/internal/generated/styles/tokens.d.ts +25 -12
  69. package/internal/generated/styles/tokens.js +25 -12
  70. package/internal/generated/theming/index.cjs +196 -58
  71. package/internal/generated/theming/index.cjs.d.ts +234 -99
  72. package/internal/generated/theming/index.d.ts +234 -99
  73. package/internal/generated/theming/index.js +196 -58
  74. package/internal/manifest.json +1 -1
  75. package/key-value-pairs/styles.css.js +8 -8
  76. package/key-value-pairs/styles.scoped.css +13 -12
  77. package/key-value-pairs/styles.selectors.js +8 -8
  78. package/link/internal.js +1 -1
  79. package/link/internal.js.map +1 -1
  80. package/link/styles.css.js +21 -21
  81. package/link/styles.scoped.css +94 -84
  82. package/link/styles.selectors.js +21 -21
  83. package/manifest.json +5 -0
  84. package/multiselect/interfaces.d.ts +0 -2
  85. package/multiselect/interfaces.d.ts.map +1 -1
  86. package/multiselect/interfaces.js.map +1 -1
  87. package/package.json +1 -1
  88. package/pagination/index.d.ts.map +1 -1
  89. package/pagination/index.js +4 -1
  90. package/pagination/index.js.map +1 -1
  91. package/prompt-input/interfaces.d.ts +0 -2
  92. package/prompt-input/interfaces.d.ts.map +1 -1
  93. package/prompt-input/interfaces.js.map +1 -1
  94. package/select/interfaces.d.ts +0 -2
  95. package/select/interfaces.d.ts.map +1 -1
  96. package/select/interfaces.js.map +1 -1
  97. package/status-indicator/internal.js +1 -1
  98. package/status-indicator/internal.js.map +1 -1
  99. package/table/body-cell/td-element.js +1 -1
  100. package/table/body-cell/td-element.js.map +1 -1
  101. package/tag-editor/styles.css.js +3 -3
  102. package/tag-editor/styles.scoped.css +12 -11
  103. package/tag-editor/styles.selectors.js +3 -3
  104. package/test-utils/dom/drawer/index.d.ts +2 -0
  105. package/test-utils/dom/drawer/index.js +6 -0
  106. package/test-utils/dom/drawer/index.js.map +1 -1
  107. package/test-utils/selectors/drawer/index.d.ts +2 -0
  108. package/test-utils/selectors/drawer/index.js +6 -0
  109. package/test-utils/selectors/drawer/index.js.map +1 -1
  110. package/text-content/styles.css.js +1 -1
  111. package/text-content/styles.scoped.css +68 -66
  112. package/text-content/styles.selectors.js +1 -1
  113. package/tooltip/index.d.ts +0 -3
  114. package/tooltip/index.d.ts.map +1 -1
  115. package/tooltip/index.js +0 -3
  116. package/tooltip/index.js.map +1 -1
  117. package/wizard/interfaces.d.ts +0 -2
  118. package/wizard/interfaces.d.ts.map +1 -1
  119. package/wizard/interfaces.js.map +1 -1
  120. package/drawer/next.d.ts +0 -5
  121. package/drawer/next.d.ts.map +0 -1
  122. package/drawer/next.js +0 -38
  123. package/drawer/next.js.map +0 -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_item-element_93a1u_ahwla_145:not(#\9) {
145
+ .awsui_item-element_93a1u_34t16_145:not(#\9) {
146
146
  position: relative;
147
147
  z-index: 1;
148
148
  border-block: var(--border-item-width-miijiw, 2px) solid transparent;
@@ -154,22 +154,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
154
  margin-block-start: calc(-1 * var(--border-width-dropdown-youcay, 2px));
155
155
  cursor: pointer;
156
156
  }
157
- .awsui_item-element_93a1u_ahwla_145.awsui_no-content-styling_93a1u_ahwla_157:not(#\9) {
157
+ .awsui_item-element_93a1u_34t16_145.awsui_no-content-styling_93a1u_34t16_157:not(#\9) {
158
158
  padding-block: 0;
159
159
  padding-inline: 0;
160
160
  color: var(--color-text-dropdown-item-default-f1jr9u, #0f141a);
161
161
  }
162
- .awsui_item-element_93a1u_ahwla_145.awsui_disabled_93a1u_ahwla_162:not(#\9) {
162
+ .awsui_item-element_93a1u_34t16_145.awsui_disabled_93a1u_34t16_162:not(#\9) {
163
163
  cursor: default;
164
164
  color: var(--color-text-dropdown-item-disabled-8m65hf, #b4b4bb);
165
165
  }
166
- .awsui_item-element_93a1u_ahwla_145:not(#\9):first-child {
166
+ .awsui_item-element_93a1u_34t16_145:not(#\9):first-child {
167
167
  margin-block-start: 0;
168
168
  }
169
- .awsui_item-element_93a1u_ahwla_145.awsui_show-divider_93a1u_ahwla_169:not(#\9) {
169
+ .awsui_item-element_93a1u_34t16_145.awsui_show-divider_93a1u_34t16_169:not(#\9) {
170
170
  border-block-end: var(--border-item-width-miijiw, 2px) solid var(--color-border-dropdown-group-ylcnh8, #c6c6cd);
171
171
  }
172
- .awsui_item-element_93a1u_ahwla_145.awsui_highlighted_93a1u_ahwla_172:not(#\9) {
172
+ .awsui_item-element_93a1u_34t16_145.awsui_highlighted_93a1u_34t16_172:not(#\9) {
173
173
  color: var(--color-text-dropdown-item-highlighted-yr1px8, #0f141a);
174
174
  z-index: 2;
175
175
  background-color: var(--color-background-dropdown-item-hover-yunepc, #f3f3f7);
@@ -179,19 +179,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
179
179
  border-end-start-radius: var(--border-radius-item-iwaia5, 8px);
180
180
  border-end-end-radius: var(--border-radius-item-iwaia5, 8px);
181
181
  }
182
- .awsui_item-element_93a1u_ahwla_145.awsui_highlighted_93a1u_ahwla_172.awsui_disabled_93a1u_ahwla_162:not(#\9) {
182
+ .awsui_item-element_93a1u_34t16_145.awsui_highlighted_93a1u_34t16_172.awsui_disabled_93a1u_34t16_162:not(#\9) {
183
183
  color: var(--color-text-dropdown-item-dimmed-tq8vh3, #b4b4bb);
184
184
  border-color: var(--color-border-dropdown-item-dimmed-hover-ga9sch, #8c8c94);
185
185
  background-color: var(--color-background-dropdown-item-dimmed-dhho03, transparent);
186
186
  }
187
- .awsui_item-element_93a1u_ahwla_145.awsui_highlighted_93a1u_ahwla_172.awsui_is-focused_93a1u_ahwla_187:not(#\9) {
187
+ .awsui_item-element_93a1u_34t16_145.awsui_highlighted_93a1u_34t16_172.awsui_is-focused_93a1u_34t16_187:not(#\9) {
188
188
  border-color: var(--color-border-dropdown-item-focused-zacqlp, #424650);
189
189
  }
190
- .awsui_item-element_93a1u_ahwla_145.awsui_highlighted_93a1u_ahwla_172.awsui_is-focused_93a1u_ahwla_187:not(#\9):not(.awsui_visual-refresh_93a1u_ahwla_190) {
190
+ .awsui_item-element_93a1u_34t16_145.awsui_highlighted_93a1u_34t16_172.awsui_is-focused_93a1u_34t16_187:not(#\9):not(.awsui_visual-refresh_93a1u_34t16_190) {
191
191
  box-shadow: inset 0 0 0 var(--border-control-focus-ring-shadow-spread-9mjajk, 1px) var(--color-border-item-focused-uk47pl, #006ce0);
192
192
  }
193
193
 
194
- .awsui_menu-item_93a1u_ahwla_194:not(#\9) {
194
+ .awsui_menu-item_93a1u_34t16_194:not(#\9) {
195
195
  min-inline-size: 0;
196
196
  word-break: break-word;
197
197
  display: flex;
@@ -203,50 +203,51 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
203
203
  /* stylelint-disable selector-max-type */
204
204
  /* stylelint-enable selector-max-type */
205
205
  }
206
- .awsui_menu-item_93a1u_ahwla_194.awsui_no-content-styling_93a1u_ahwla_157:not(#\9) {
206
+ .awsui_menu-item_93a1u_34t16_194.awsui_no-content-styling_93a1u_34t16_157:not(#\9) {
207
207
  padding-block: 0;
208
208
  padding-inline: 0;
209
209
  color: var(--color-text-dropdown-item-default-f1jr9u, #0f141a);
210
210
  }
211
- .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9) {
211
+ .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9) {
212
212
  padding-block-end: calc(var(--space-option-padding-vertical-d2srv9, 4px) + var(--space-xxxs-pajhad, 2px));
213
213
  text-underline-offset: 0.25em;
214
- text-decoration-thickness: 1px;
214
+ text-decoration-thickness: var(--font-decoration-thickness-link-uesuo7, 1px);
215
+ text-decoration-style: var(--font-decoration-style-link-pk2xmp, solid);
215
216
  color: var(--awsui-style-color-default-6b9ypa, var(--color-text-link-default-hude44, #006ce0));
216
217
  font-weight: inherit;
217
218
  letter-spacing: normal;
218
219
  text-decoration-line: underline;
219
- text-decoration-color: currentColor;
220
+ text-decoration-color: var(--color-text-link-decoration-default-0x8fhu, currentColor);
220
221
  transition-property: color, -webkit-text-decoration;
221
222
  transition-property: color, text-decoration;
222
223
  transition-property: color, text-decoration, -webkit-text-decoration;
223
224
  transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
224
225
  }
225
226
  @media (prefers-reduced-motion: reduce) {
226
- .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9) {
227
+ .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9) {
227
228
  animation: none;
228
229
  transition: none;
229
230
  }
230
231
  }
231
- .awsui-motion-disabled .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9), .awsui-mode-entering .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9) {
232
+ .awsui-motion-disabled .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9), .awsui-mode-entering .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9) {
232
233
  animation: none;
233
234
  transition: none;
234
235
  }
235
- .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9):hover {
236
+ .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9):hover {
236
237
  cursor: pointer;
237
238
  color: var(--awsui-style-color-hover-6b9ypa, var(--color-text-link-hover-2hfec2, #002b66));
238
239
  }
239
- .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9):focus {
240
+ .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9):focus {
240
241
  outline: none;
241
242
  }
242
- .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9):active {
243
+ .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9):active {
243
244
  color: var(--awsui-style-color-active-6b9ypa, var(--color-text-link-hover-2hfec2, #002b66));
244
245
  }
245
- .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9):active, .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9):focus, .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211:not(#\9):hover {
246
+ .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9):active, .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9):focus, .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211:not(#\9):hover {
246
247
  text-decoration-line: underline;
247
- text-decoration-color: currentColor;
248
+ text-decoration-color: var(--color-text-link-decoration-hover-kui2t9, currentColor);
248
249
  }
249
- .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211.awsui_current-breadcrumb_93a1u_ahwla_247:not(#\9) {
250
+ .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211.awsui_current-breadcrumb_93a1u_34t16_248:not(#\9) {
250
251
  font-weight: var(--font-weight-button-0eg20c, 700);
251
252
  -webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
252
253
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
@@ -254,63 +255,63 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
254
255
  font-weight: var(--font-weight-bold-fo1afg, 700);
255
256
  text-decoration: none;
256
257
  }
257
- .awsui_menu-item_93a1u_ahwla_194.awsui_link-style_93a1u_ahwla_211.awsui_link-style-highlighted_93a1u_ahwla_255:not(#\9) {
258
+ .awsui_menu-item_93a1u_34t16_194.awsui_link-style_93a1u_34t16_211.awsui_link-style-highlighted_93a1u_34t16_256:not(#\9) {
258
259
  color: var(--color-text-link-hover-2hfec2, #002b66);
259
260
  }
260
- .awsui_menu-item_93a1u_ahwla_194:not(#\9):focus {
261
+ .awsui_menu-item_93a1u_34t16_194:not(#\9):focus {
261
262
  outline: none;
262
263
  }
263
- .awsui_has-category-header_93a1u_ahwla_261 > .awsui_menu-item_93a1u_ahwla_194:not(#\9), .awsui_has-category-header_93a1u_ahwla_261 > .awsui_item-tooltip-wrapper_93a1u_ahwla_261 > .awsui_menu-item_93a1u_ahwla_194:not(#\9), .awsui_has-category-header_93a1u_ahwla_261:not(#\9):not(.awsui_has-checkmark_93a1u_ahwla_261) > span > .awsui_menu-item_93a1u_ahwla_194 {
264
+ .awsui_has-category-header_93a1u_34t16_262 > .awsui_menu-item_93a1u_34t16_194:not(#\9), .awsui_has-category-header_93a1u_34t16_262 > .awsui_item-tooltip-wrapper_93a1u_34t16_262 > .awsui_menu-item_93a1u_34t16_194:not(#\9), .awsui_has-category-header_93a1u_34t16_262:not(#\9):not(.awsui_has-checkmark_93a1u_34t16_262) > span > .awsui_menu-item_93a1u_34t16_194 {
264
265
  padding-inline-start: calc(var(--space-xs-ymlm0b, 8px) + var(--space-option-padding-horizontal-4taa4b, 20px));
265
266
  }
266
- .awsui_has-category-header_93a1u_ahwla_261 > .awsui_menu-item_93a1u_ahwla_194.awsui_no-content-styling_93a1u_ahwla_157:not(#\9), .awsui_has-category-header_93a1u_ahwla_261 > .awsui_item-tooltip-wrapper_93a1u_ahwla_261 > .awsui_menu-item_93a1u_ahwla_194.awsui_no-content-styling_93a1u_ahwla_157:not(#\9), .awsui_has-category-header_93a1u_ahwla_261:not(#\9):not(.awsui_has-checkmark_93a1u_ahwla_261) > span > .awsui_menu-item_93a1u_ahwla_194.awsui_no-content-styling_93a1u_ahwla_157 {
267
+ .awsui_has-category-header_93a1u_34t16_262 > .awsui_menu-item_93a1u_34t16_194.awsui_no-content-styling_93a1u_34t16_157:not(#\9), .awsui_has-category-header_93a1u_34t16_262 > .awsui_item-tooltip-wrapper_93a1u_34t16_262 > .awsui_menu-item_93a1u_34t16_194.awsui_no-content-styling_93a1u_34t16_157:not(#\9), .awsui_has-category-header_93a1u_34t16_262:not(#\9):not(.awsui_has-checkmark_93a1u_34t16_262) > span > .awsui_menu-item_93a1u_34t16_194.awsui_no-content-styling_93a1u_34t16_157 {
267
268
  padding-inline-start: 0;
268
269
  }
269
270
 
270
- .awsui_icon_93a1u_ahwla_268:not(#\9) {
271
+ .awsui_icon_93a1u_34t16_269:not(#\9) {
271
272
  padding-inline-end: var(--space-xxs-hwfkai, 4px);
272
273
  flex-shrink: 0;
273
274
  }
274
- .awsui_icon_93a1u_ahwla_268.awsui_checkmark_93a1u_ahwla_272:not(#\9) {
275
+ .awsui_icon_93a1u_34t16_269.awsui_checkmark_93a1u_34t16_273:not(#\9) {
275
276
  color: var(--color-item-selected-72rnwy, #006ce0);
276
277
  }
277
- .awsui_icon_93a1u_ahwla_268.awsui_disabled_93a1u_ahwla_162:not(#\9) {
278
+ .awsui_icon_93a1u_34t16_269.awsui_disabled_93a1u_34t16_162:not(#\9) {
278
279
  color: var(--color-text-interactive-disabled-1bqmrl, #b4b4bb);
279
280
  }
280
281
 
281
- .awsui_external-icon_93a1u_ahwla_279:not(#\9) {
282
+ .awsui_external-icon_93a1u_34t16_280:not(#\9) {
282
283
  margin-inline-start: var(--space-xxs-hwfkai, 4px);
283
284
  }
284
285
 
285
- .awsui_content-wrapper_93a1u_ahwla_283:not(#\9) {
286
+ .awsui_content-wrapper_93a1u_34t16_284:not(#\9) {
286
287
  flex: 1;
287
288
  display: flex;
288
289
  flex-direction: column;
289
290
  }
290
291
 
291
- .awsui_main-row_93a1u_ahwla_289:not(#\9) {
292
+ .awsui_main-row_93a1u_34t16_290:not(#\9) {
292
293
  display: flex;
293
294
  justify-content: space-between;
294
295
  align-items: center;
295
296
  gap: var(--space-s-tvghoh, 12px);
296
297
  }
297
298
 
298
- .awsui_label-tag_93a1u_ahwla_296:not(#\9) {
299
+ .awsui_label-tag_93a1u_34t16_297:not(#\9) {
299
300
  color: var(--color-text-body-default-vvtq8u, #0f141a);
300
301
  }
301
- .awsui_label-tag_93a1u_ahwla_296.awsui_disabled_93a1u_ahwla_162:not(#\9) {
302
+ .awsui_label-tag_93a1u_34t16_297.awsui_disabled_93a1u_34t16_162:not(#\9) {
302
303
  color: var(--color-text-interactive-disabled-1bqmrl, #b4b4bb);
303
304
  }
304
305
 
305
- .awsui_secondary-text_93a1u_ahwla_303:not(#\9) {
306
+ .awsui_secondary-text_93a1u_34t16_304:not(#\9) {
306
307
  font-size: var(--font-size-body-s-smc8cv, 12px);
307
308
  line-height: var(--line-height-body-s-nu5hx1, 16px);
308
309
  letter-spacing: var(--letter-spacing-body-s-gq78ok, 0.005em);
309
310
  color: var(--color-text-dropdown-item-secondary-v12lfh, #656871);
310
311
  }
311
- .awsui_secondary-text_93a1u_ahwla_303.awsui_highlighted_93a1u_ahwla_172:not(#\9) {
312
+ .awsui_secondary-text_93a1u_34t16_304.awsui_highlighted_93a1u_34t16_172:not(#\9) {
312
313
  color: var(--color-text-dropdown-item-highlighted-yr1px8, #0f141a);
313
314
  }
314
- .awsui_secondary-text_93a1u_ahwla_303.awsui_disabled_93a1u_ahwla_162:not(#\9) {
315
+ .awsui_secondary-text_93a1u_34t16_304.awsui_disabled_93a1u_34t16_162:not(#\9) {
315
316
  color: var(--color-text-interactive-disabled-1bqmrl, #b4b4bb);
316
317
  }
@@ -2,26 +2,26 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "item-element": "awsui_item-element_93a1u_ahwla_145",
6
- "no-content-styling": "awsui_no-content-styling_93a1u_ahwla_157",
7
- "disabled": "awsui_disabled_93a1u_ahwla_162",
8
- "show-divider": "awsui_show-divider_93a1u_ahwla_169",
9
- "highlighted": "awsui_highlighted_93a1u_ahwla_172",
10
- "is-focused": "awsui_is-focused_93a1u_ahwla_187",
11
- "visual-refresh": "awsui_visual-refresh_93a1u_ahwla_190",
12
- "menu-item": "awsui_menu-item_93a1u_ahwla_194",
13
- "link-style": "awsui_link-style_93a1u_ahwla_211",
14
- "current-breadcrumb": "awsui_current-breadcrumb_93a1u_ahwla_247",
15
- "link-style-highlighted": "awsui_link-style-highlighted_93a1u_ahwla_255",
16
- "has-category-header": "awsui_has-category-header_93a1u_ahwla_261",
17
- "item-tooltip-wrapper": "awsui_item-tooltip-wrapper_93a1u_ahwla_261",
18
- "has-checkmark": "awsui_has-checkmark_93a1u_ahwla_261",
19
- "icon": "awsui_icon_93a1u_ahwla_268",
20
- "checkmark": "awsui_checkmark_93a1u_ahwla_272",
21
- "external-icon": "awsui_external-icon_93a1u_ahwla_279",
22
- "content-wrapper": "awsui_content-wrapper_93a1u_ahwla_283",
23
- "main-row": "awsui_main-row_93a1u_ahwla_289",
24
- "label-tag": "awsui_label-tag_93a1u_ahwla_296",
25
- "secondary-text": "awsui_secondary-text_93a1u_ahwla_303"
5
+ "item-element": "awsui_item-element_93a1u_34t16_145",
6
+ "no-content-styling": "awsui_no-content-styling_93a1u_34t16_157",
7
+ "disabled": "awsui_disabled_93a1u_34t16_162",
8
+ "show-divider": "awsui_show-divider_93a1u_34t16_169",
9
+ "highlighted": "awsui_highlighted_93a1u_34t16_172",
10
+ "is-focused": "awsui_is-focused_93a1u_34t16_187",
11
+ "visual-refresh": "awsui_visual-refresh_93a1u_34t16_190",
12
+ "menu-item": "awsui_menu-item_93a1u_34t16_194",
13
+ "link-style": "awsui_link-style_93a1u_34t16_211",
14
+ "current-breadcrumb": "awsui_current-breadcrumb_93a1u_34t16_248",
15
+ "link-style-highlighted": "awsui_link-style-highlighted_93a1u_34t16_256",
16
+ "has-category-header": "awsui_has-category-header_93a1u_34t16_262",
17
+ "item-tooltip-wrapper": "awsui_item-tooltip-wrapper_93a1u_34t16_262",
18
+ "has-checkmark": "awsui_has-checkmark_93a1u_34t16_262",
19
+ "icon": "awsui_icon_93a1u_34t16_269",
20
+ "checkmark": "awsui_checkmark_93a1u_34t16_273",
21
+ "external-icon": "awsui_external-icon_93a1u_34t16_280",
22
+ "content-wrapper": "awsui_content-wrapper_93a1u_34t16_284",
23
+ "main-row": "awsui_main-row_93a1u_34t16_290",
24
+ "label-tag": "awsui_label-tag_93a1u_34t16_297",
25
+ "secondary-text": "awsui_secondary-text_93a1u_34t16_304"
26
26
  };
27
27
 
@@ -3,5 +3,6 @@ export { CopyToClipboardProps };
3
3
  export default function CopyToClipboard({
4
4
  variant,
5
5
  popoverRenderWithPortal,
6
+ wrapText,
6
7
  ...restProps
7
8
  }: CopyToClipboardProps): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,OAAkB,EAClB,uBAA+B,EAC/B,GAAG,SAAS,EACb,EAAE,oBAAoB,eActB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,OAAkB,EAClB,uBAA+B,EAC/B,QAAe,EACf,GAAG,SAAS,EACb,EAAE,oBAAoB,eAetB"}
@@ -6,12 +6,12 @@ import useBaseComponent from '../internal/hooks/use-base-component';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
7
  import { getExternalProps } from '../internal/utils/external-props';
8
8
  import InternalCopyToClipboard from './internal';
9
- export default function CopyToClipboard({ variant = 'button', popoverRenderWithPortal = false, ...restProps }) {
9
+ export default function CopyToClipboard({ variant = 'button', popoverRenderWithPortal = false, wrapText = true, ...restProps }) {
10
10
  const baseProps = useBaseComponent('CopyToClipboard', {
11
11
  props: { variant },
12
12
  });
13
13
  const filteredProps = getExternalProps(restProps);
14
- return (React.createElement(InternalCopyToClipboard, { variant: variant, popoverRenderWithPortal: popoverRenderWithPortal, ...baseProps, ...filteredProps }));
14
+ return (React.createElement(InternalCopyToClipboard, { variant: variant, popoverRenderWithPortal: popoverRenderWithPortal, wrapText: wrapText, ...baseProps, ...filteredProps }));
15
15
  }
16
16
  applyDisplayName(CopyToClipboard, 'CopyToClipboard');
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,uBAAuB,MAAM,YAAY,CAAC;AAIjD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,OAAO,GAAG,QAAQ,EAClB,uBAAuB,GAAG,KAAK,EAC/B,GAAG,SAAS,EACS;IACrB,MAAM,SAAS,GAAG,gBAAgB,CAAC,iBAAiB,EAAE;QACpD,KAAK,EAAE,EAAE,OAAO,EAAE;KACnB,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAElD,OAAO,CACL,oBAAC,uBAAuB,IACtB,OAAO,EAAE,OAAO,EAChB,uBAAuB,EAAE,uBAAuB,KAC5C,SAAS,KACT,aAAa,GACjB,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,eAAe,EAAE,iBAAiB,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 useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { CopyToClipboardProps } from './interfaces';\nimport InternalCopyToClipboard from './internal';\n\nexport { CopyToClipboardProps };\n\nexport default function CopyToClipboard({\n variant = 'button',\n popoverRenderWithPortal = false,\n ...restProps\n}: CopyToClipboardProps) {\n const baseProps = useBaseComponent('CopyToClipboard', {\n props: { variant },\n });\n const filteredProps = getExternalProps(restProps);\n\n return (\n <InternalCopyToClipboard\n variant={variant}\n popoverRenderWithPortal={popoverRenderWithPortal}\n {...baseProps}\n {...filteredProps}\n />\n );\n}\n\napplyDisplayName(CopyToClipboard, 'CopyToClipboard');\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,uBAAuB,MAAM,YAAY,CAAC;AAIjD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,OAAO,GAAG,QAAQ,EAClB,uBAAuB,GAAG,KAAK,EAC/B,QAAQ,GAAG,IAAI,EACf,GAAG,SAAS,EACS;IACrB,MAAM,SAAS,GAAG,gBAAgB,CAAC,iBAAiB,EAAE;QACpD,KAAK,EAAE,EAAE,OAAO,EAAE;KACnB,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAElD,OAAO,CACL,oBAAC,uBAAuB,IACtB,OAAO,EAAE,OAAO,EAChB,uBAAuB,EAAE,uBAAuB,EAChD,QAAQ,EAAE,QAAQ,KACd,SAAS,KACT,aAAa,GACjB,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,eAAe,EAAE,iBAAiB,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 useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { CopyToClipboardProps } from './interfaces';\nimport InternalCopyToClipboard from './internal';\n\nexport { CopyToClipboardProps };\n\nexport default function CopyToClipboard({\n variant = 'button',\n popoverRenderWithPortal = false,\n wrapText = true,\n ...restProps\n}: CopyToClipboardProps) {\n const baseProps = useBaseComponent('CopyToClipboard', {\n props: { variant },\n });\n const filteredProps = getExternalProps(restProps);\n\n return (\n <InternalCopyToClipboard\n variant={variant}\n popoverRenderWithPortal={popoverRenderWithPortal}\n wrapText={wrapText}\n {...baseProps}\n {...filteredProps}\n />\n );\n}\n\napplyDisplayName(CopyToClipboard, 'CopyToClipboard');\n"]}
@@ -27,6 +27,11 @@ export interface CopyToClipboardProps extends BaseComponentProps {
27
27
  * The content to display next to the copy button when `variant="inline"`. If not provided, `textToCopy` will be displayed instead.
28
28
  */
29
29
  textToDisplay?: React.ReactNode;
30
+ /**
31
+ * Specifies if the `textToDisplay` content should wrap. If you set it to false, it prevents the text
32
+ * from wrapping and truncates it with an ellipsis. Only applies to `variant="inline"`.
33
+ */
34
+ wrapText?: boolean;
30
35
  /**
31
36
  * The message shown when the text is copied successfully.
32
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC;IAEvC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;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ACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEhC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAElF;;;OAGG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;CACnF;AAED,yBAAiB,oBAAoB,CAAC;IACpC,KAAY,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IAEnD,UAAiB,iBAAiB;QAChC,gDAAgD;QAChD,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,iBAAiB;QAChC,oDAAoD;QACpD,IAAI,EAAE,MAAM,CAAC;KACd;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/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 { NonCancelableEventHandler } from '../internal/events';\n\nexport interface CopyToClipboardProps extends BaseComponentProps {\n /** Determines the general styling of the copy button as follows:\n *\n * * `button` to display a standalone secondary button with an icon, and `copyButtonText` as text.\n * * `icon` to display a standalone icon-only (no text) button.\n * * `inline` to display an icon-only (no text) button within a text context.\n *\n * Defaults to `button`.\n */\n variant?: CopyToClipboardProps.Variant;\n\n /**\n * The text of the copy button (for variant=\"button\").\n */\n copyButtonText?: string;\n\n /**\n * Adds `aria-label` to the copy button. Use this to provide an accessible name for buttons that don't have visible text,\n * and to distinguish between multiple buttons with identical visible text. The text will also be added to the `title` attribute of the button.\n */\n copyButtonAriaLabel?: string;\n\n /**\n * The text content to be copied. It is displayed next to the copy button when `variant=\"inline\"` unless when `content` is specified, and is not shown otherwise.\n */\n textToCopy: string;\n\n /**\n * The content to display next to the copy button when `variant=\"inline\"`. If not provided, `textToCopy` will be displayed instead.\n */\n textToDisplay?: React.ReactNode;\n\n /**\n * The message shown when the text is copied successfully.\n */\n copySuccessText: string;\n\n /**\n * The message shown when the text is not copied due to an error, see [https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext](https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext).\n */\n copyErrorText: string;\n\n /**\n * By default, the popover is constrained to fit inside its parent\n * [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context).\n * Enabling this property will allow the popover to be rendered in the root stack context using\n * [React Portals](https://reactjs.org/docs/portals.html).\n * Enable this setting if you need the popover to ignore its parent stacking context.\n */\n popoverRenderWithPortal?: boolean;\n\n /**\n * Renders the copy to clipboard button as disabled and prevents clicks.\n */\n disabled?: boolean;\n\n /**\n * Provides a reason why the copy to clipboard button is disabled (only when `disabled` is `true`).\n * If provided, the copy to clipboard button becomes focusable.\n * Applicable for all variants except inline.\n */\n disabledReason?: string;\n\n /**\n * Called when the text is successfully copied to the clipboard.\n * The event `detail` contains the text that was copied.\n */\n onCopySuccess?: NonCancelableEventHandler<CopyToClipboardProps.CopySuccessDetail>;\n\n /**\n * Called when the copy operation fails.\n * The event `detail` contains the text that failed to copy.\n */\n onCopyFailure?: NonCancelableEventHandler<CopyToClipboardProps.CopyFailureDetail>;\n}\n\nexport namespace CopyToClipboardProps {\n export type Variant = 'button' | 'icon' | 'inline';\n\n export interface CopySuccessDetail {\n /** The text that was copied to the clipboard */\n text: string;\n }\n\n export interface CopyFailureDetail {\n /** The text that failed to copy to the clipboard */\n text: string;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/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 { NonCancelableEventHandler } from '../internal/events';\n\nexport interface CopyToClipboardProps extends BaseComponentProps {\n /** Determines the general styling of the copy button as follows:\n *\n * * `button` to display a standalone secondary button with an icon, and `copyButtonText` as text.\n * * `icon` to display a standalone icon-only (no text) button.\n * * `inline` to display an icon-only (no text) button within a text context.\n *\n * Defaults to `button`.\n */\n variant?: CopyToClipboardProps.Variant;\n\n /**\n * The text of the copy button (for variant=\"button\").\n */\n copyButtonText?: string;\n\n /**\n * Adds `aria-label` to the copy button. Use this to provide an accessible name for buttons that don't have visible text,\n * and to distinguish between multiple buttons with identical visible text. The text will also be added to the `title` attribute of the button.\n */\n copyButtonAriaLabel?: string;\n\n /**\n * The text content to be copied. It is displayed next to the copy button when `variant=\"inline\"` unless when `content` is specified, and is not shown otherwise.\n */\n textToCopy: string;\n\n /**\n * The content to display next to the copy button when `variant=\"inline\"`. If not provided, `textToCopy` will be displayed instead.\n */\n textToDisplay?: React.ReactNode;\n\n /**\n * Specifies if the `textToDisplay` content should wrap. If you set it to false, it prevents the text\n * from wrapping and truncates it with an ellipsis. Only applies to `variant=\"inline\"`.\n */\n wrapText?: boolean;\n\n /**\n * The message shown when the text is copied successfully.\n */\n copySuccessText: string;\n\n /**\n * The message shown when the text is not copied due to an error, see [https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext](https://w3c.github.io/clipboard-apis/#dom-clipboard-writetext).\n */\n copyErrorText: string;\n\n /**\n * By default, the popover is constrained to fit inside its parent\n * [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context).\n * Enabling this property will allow the popover to be rendered in the root stack context using\n * [React Portals](https://reactjs.org/docs/portals.html).\n * Enable this setting if you need the popover to ignore its parent stacking context.\n */\n popoverRenderWithPortal?: boolean;\n\n /**\n * Renders the copy to clipboard button as disabled and prevents clicks.\n */\n disabled?: boolean;\n\n /**\n * Provides a reason why the copy to clipboard button is disabled (only when `disabled` is `true`).\n * If provided, the copy to clipboard button becomes focusable.\n * Applicable for all variants except inline.\n */\n disabledReason?: string;\n\n /**\n * Called when the text is successfully copied to the clipboard.\n * The event `detail` contains the text that was copied.\n */\n onCopySuccess?: NonCancelableEventHandler<CopyToClipboardProps.CopySuccessDetail>;\n\n /**\n * Called when the copy operation fails.\n * The event `detail` contains the text that failed to copy.\n */\n onCopyFailure?: NonCancelableEventHandler<CopyToClipboardProps.CopyFailureDetail>;\n}\n\nexport namespace CopyToClipboardProps {\n export type Variant = 'button' | 'icon' | 'inline';\n\n export interface CopySuccessDetail {\n /** The text that was copied to the clipboard */\n text: string;\n }\n\n export interface CopyFailureDetail {\n /** The text that failed to copy to the clipboard */\n text: string;\n }\n}\n"]}
@@ -9,6 +9,7 @@ export default function InternalCopyToClipboard({
9
9
  copyErrorText,
10
10
  textToCopy,
11
11
  textToDisplay,
12
+ wrapText,
12
13
  popoverRenderWithPortal,
13
14
  disabled,
14
15
  disabledReason,
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAKpD,UAAU,4BAA6B,SAAQ,oBAAoB,EAAE,0BAA0B;CAAG;AAElG,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,OAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,uBAAuB,EACvB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,4BAA4B,eAmG9B"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAKpD,UAAU,4BAA6B,SAAQ,oBAAoB,EAAE,0BAA0B;CAAG;AAElG,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,OAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,QAAe,EACf,uBAAuB,EACvB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,4BAA4B,eAmG9B"}
@@ -9,7 +9,7 @@ import InternalPopover from '../popover/internal';
9
9
  import InternalStatusIndicator from '../status-indicator/internal';
10
10
  import styles from './styles.css.js';
11
11
  import testStyles from './test-classes/styles.css.js';
12
- export default function InternalCopyToClipboard({ variant = 'button', copyButtonAriaLabel, copyButtonText, copySuccessText, copyErrorText, textToCopy, textToDisplay, popoverRenderWithPortal, disabled, disabledReason, onCopySuccess, onCopyFailure, __internalRootRef, ...restProps }) {
12
+ export default function InternalCopyToClipboard({ variant = 'button', copyButtonAriaLabel, copyButtonText, copySuccessText, copyErrorText, textToCopy, textToDisplay, wrapText = true, popoverRenderWithPortal, disabled, disabledReason, onCopySuccess, onCopyFailure, __internalRootRef, ...restProps }) {
13
13
  const [status, setStatus] = useState('success');
14
14
  const [statusText, setStatusText] = useState(copySuccessText);
15
15
  useEffect(() => {
@@ -57,8 +57,8 @@ export default function InternalCopyToClipboard({ variant = 'button', copyButton
57
57
  const isInline = variant === 'inline';
58
58
  const button = (React.createElement(InternalButton, { ariaLabel: copyButtonAriaLabel !== null && copyButtonAriaLabel !== void 0 ? copyButtonAriaLabel : copyButtonText, iconName: "copy", variant: triggerVariant, wrapText: false, formAction: "none", disabled: disabled, disabledReason: disabledReason }, copyButtonText));
59
59
  const trigger = disabled ? (button) : (React.createElement(InternalPopover, { isInline: isInline, size: "medium", position: "top", triggerType: "custom", dismissButton: false, renderWithPortal: popoverRenderWithPortal, content: React.createElement(InternalStatusIndicator, { type: status }, statusText), __onOpen: onClick }, button));
60
- return (React.createElement("span", { ...baseProps, ref: __internalRootRef, className: clsx(baseProps.className, styles.root, testStyles.root) }, isInline ? (React.createElement("span", { className: styles['inline-container'] },
60
+ return (React.createElement("span", { ...baseProps, ref: __internalRootRef, className: clsx(baseProps.className, styles.root, testStyles.root) }, isInline ? (React.createElement("span", { className: clsx(styles['inline-container'], !wrapText && styles['inline-container-no-wrap']) },
61
61
  React.createElement("span", { className: styles['inline-container-trigger'] }, trigger),
62
- React.createElement("span", { className: clsx(testStyles['text-to-display'], testStyles['text-to-copy']) }, textToDisplay !== undefined ? textToDisplay : textToCopy))) : (trigger)));
62
+ React.createElement("span", { className: clsx(testStyles['text-to-display'], testStyles['text-to-copy'], styles['text-to-display']) }, textToDisplay !== undefined ? textToDisplay : textToCopy))) : (trigger)));
63
63
  }
64
64
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MA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QAAQ,EACb,QAAQ,EAAC,KAAK,EACd,WAAW,EAAC,QAAQ,EACpB,aAAa,EAAE,KAAK,EACpB,gBAAgB,EAAE,uBAAuB,EACzC,OAAO,EAAE,oBAAC,uBAAuB,IAAC,IAAI,EAAE,MAAM,IAAG,UAAU,CAA2B,EACtF,QAAQ,EAAE,OAAO,IAEhB,MAAM,CACS,CACnB,CAAC;IAEF,OAAO,CACL,iCAAU,SAAS,EAAE,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAC5G,QAAQ,CAAC,CAAC,CAAC,CACV,8BAAM,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC;QACzC,8BAAM,SAAS,EAAE,MAAM,CAAC,0BAA0B,CAAC,IAAG,OAAO,CAAQ;QACrE,8BAAM,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC,IAC7E,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CACpD,CACF,CACR,CAAC,CAAC,CAAC,CACF,OAAO,CACR,CACI,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalButton from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport InternalPopover from '../popover/internal';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { CopyToClipboardProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\ninterface InternalCopyToClipboardProps extends CopyToClipboardProps, InternalBaseComponentProps {}\n\nexport default function InternalCopyToClipboard({\n variant = 'button',\n copyButtonAriaLabel,\n copyButtonText,\n copySuccessText,\n copyErrorText,\n textToCopy,\n textToDisplay,\n popoverRenderWithPortal,\n disabled,\n disabledReason,\n onCopySuccess,\n onCopyFailure,\n __internalRootRef,\n ...restProps\n}: InternalCopyToClipboardProps) {\n const [status, setStatus] = useState<'pending' | 'success' | 'error'>('success');\n const [statusText, setStatusText] = useState(copySuccessText);\n\n useEffect(() => {\n if (navigator.permissions) {\n navigator.permissions\n .query({ name: 'clipboard-write' as PermissionName })\n .then(result => {\n if (result.state === 'denied') {\n setStatus('error');\n setStatusText(copyErrorText);\n }\n })\n .catch(() => {\n // Permissions API not supported or failed.\n });\n }\n }, [copyErrorText]);\n\n const baseProps = getBaseProps(restProps);\n const onClick = () => {\n if (!navigator.clipboard) {\n // The clipboard API is not available in insecure contexts.\n setStatus('error');\n setStatusText(copyErrorText);\n fireNonCancelableEvent(onCopyFailure, { text: textToCopy });\n return;\n }\n\n navigator.clipboard\n .writeText(textToCopy)\n .then(() => {\n setStatus('success');\n setStatusText(copySuccessText);\n fireNonCancelableEvent(onCopySuccess, { text: textToCopy });\n })\n .catch(() => {\n setStatus('error');\n setStatusText(copyErrorText);\n fireNonCancelableEvent(onCopyFailure, { text: textToCopy });\n });\n };\n\n const triggerVariant = (\n {\n button: 'normal',\n icon: 'icon',\n inline: 'inline-icon',\n } as const\n )[variant];\n\n const isInline = variant === 'inline';\n\n const button = (\n <InternalButton\n ariaLabel={copyButtonAriaLabel ?? copyButtonText}\n iconName=\"copy\"\n variant={triggerVariant}\n wrapText={false}\n formAction=\"none\"\n disabled={disabled}\n disabledReason={disabledReason}\n >\n {copyButtonText}\n </InternalButton>\n );\n\n const trigger = disabled ? (\n button\n ) : (\n <InternalPopover\n isInline={isInline}\n size=\"medium\"\n position=\"top\"\n triggerType=\"custom\"\n dismissButton={false}\n renderWithPortal={popoverRenderWithPortal}\n content={<InternalStatusIndicator type={status}>{statusText}</InternalStatusIndicator>}\n __onOpen={onClick}\n >\n {button}\n </InternalPopover>\n );\n\n return (\n <span {...baseProps} ref={__internalRootRef} className={clsx(baseProps.className, styles.root, testStyles.root)}>\n {isInline ? (\n <span className={styles['inline-container']}>\n <span className={styles['inline-container-trigger']}>{trigger}</span>\n <span className={clsx(testStyles['text-to-display'], testStyles['text-to-copy'])}>\n {textToDisplay !== undefined ? textToDisplay : textToCopy}\n </span>\n </span>\n ) : (\n trigger\n )}\n </span>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/copy-to-clipboard/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AAGnE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAItD,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,OAAO,GAAG,QAAQ,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,QAAQ,GAAG,IAAI,EACf,uBAAuB,EACvB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,GAAG,SAAS,EACiB;IAC7B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAkC,SAAS,CAAC,CAAC;IACjF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,eAAe,CA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SAAS,EAAE,MAAM,CAAC,0BAA0B,CAAC,IAAG,OAAO,CAAQ;QACrE,8BAAM,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC,IACxG,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CACpD,CACF,CACR,CAAC,CAAC,CAAC,CACF,OAAO,CACR,CACI,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalButton from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport InternalPopover from '../popover/internal';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { CopyToClipboardProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\ninterface InternalCopyToClipboardProps extends CopyToClipboardProps, InternalBaseComponentProps {}\n\nexport default function InternalCopyToClipboard({\n variant = 'button',\n copyButtonAriaLabel,\n copyButtonText,\n copySuccessText,\n copyErrorText,\n textToCopy,\n textToDisplay,\n wrapText = true,\n popoverRenderWithPortal,\n disabled,\n disabledReason,\n onCopySuccess,\n onCopyFailure,\n __internalRootRef,\n ...restProps\n}: InternalCopyToClipboardProps) {\n const [status, setStatus] = useState<'pending' | 'success' | 'error'>('success');\n const [statusText, setStatusText] = useState(copySuccessText);\n\n useEffect(() => {\n if (navigator.permissions) {\n navigator.permissions\n .query({ name: 'clipboard-write' as PermissionName })\n .then(result => {\n if (result.state === 'denied') {\n setStatus('error');\n setStatusText(copyErrorText);\n }\n })\n .catch(() => {\n // Permissions API not supported or failed.\n });\n }\n }, [copyErrorText]);\n\n const baseProps = getBaseProps(restProps);\n const onClick = () => {\n if (!navigator.clipboard) {\n // The clipboard API is not available in insecure contexts.\n setStatus('error');\n setStatusText(copyErrorText);\n fireNonCancelableEvent(onCopyFailure, { text: textToCopy });\n return;\n }\n\n navigator.clipboard\n .writeText(textToCopy)\n .then(() => {\n setStatus('success');\n setStatusText(copySuccessText);\n fireNonCancelableEvent(onCopySuccess, { text: textToCopy });\n })\n .catch(() => {\n setStatus('error');\n setStatusText(copyErrorText);\n fireNonCancelableEvent(onCopyFailure, { text: textToCopy });\n });\n };\n\n const triggerVariant = (\n {\n button: 'normal',\n icon: 'icon',\n inline: 'inline-icon',\n } as const\n )[variant];\n\n const isInline = variant === 'inline';\n\n const button = (\n <InternalButton\n ariaLabel={copyButtonAriaLabel ?? copyButtonText}\n iconName=\"copy\"\n variant={triggerVariant}\n wrapText={false}\n formAction=\"none\"\n disabled={disabled}\n disabledReason={disabledReason}\n >\n {copyButtonText}\n </InternalButton>\n );\n\n const trigger = disabled ? (\n button\n ) : (\n <InternalPopover\n isInline={isInline}\n size=\"medium\"\n position=\"top\"\n triggerType=\"custom\"\n dismissButton={false}\n renderWithPortal={popoverRenderWithPortal}\n content={<InternalStatusIndicator type={status}>{statusText}</InternalStatusIndicator>}\n __onOpen={onClick}\n >\n {button}\n </InternalPopover>\n );\n\n return (\n <span {...baseProps} ref={__internalRootRef} className={clsx(baseProps.className, styles.root, testStyles.root)}>\n {isInline ? (\n <span className={clsx(styles['inline-container'], !wrapText && styles['inline-container-no-wrap'])}>\n <span className={styles['inline-container-trigger']}>{trigger}</span>\n <span className={clsx(testStyles['text-to-display'], testStyles['text-to-copy'], styles['text-to-display'])}>\n {textToDisplay !== undefined ? textToDisplay : textToCopy}\n </span>\n </span>\n ) : (\n trigger\n )}\n </span>\n );\n}\n"]}
@@ -1,8 +1,10 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_5a145_19zbi_9",
5
- "inline-container": "awsui_inline-container_5a145_19zbi_13",
6
- "inline-container-trigger": "awsui_inline-container-trigger_5a145_19zbi_16"
4
+ "root": "awsui_root_5a145_8b4wa_9",
5
+ "inline-container": "awsui_inline-container_5a145_8b4wa_13",
6
+ "inline-container-trigger": "awsui_inline-container-trigger_5a145_8b4wa_16",
7
+ "inline-container-no-wrap": "awsui_inline-container-no-wrap_5a145_8b4wa_19",
8
+ "text-to-display": "awsui_text-to-display_5a145_8b4wa_28"
7
9
  };
8
10
 
@@ -6,13 +6,28 @@
6
6
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
7
  SPDX-License-Identifier: Apache-2.0
8
8
  */
9
- .awsui_root_5a145_19zbi_9:not(#\9) {
9
+ .awsui_root_5a145_8b4wa_9:not(#\9) {
10
10
  display: contents;
11
11
  }
12
12
 
13
- .awsui_inline-container_5a145_19zbi_13:not(#\9) {
13
+ .awsui_inline-container_5a145_8b4wa_13:not(#\9) {
14
14
  word-break: break-all;
15
15
  }
16
- .awsui_inline-container-trigger_5a145_19zbi_16:not(#\9) {
16
+ .awsui_inline-container-trigger_5a145_8b4wa_16:not(#\9) {
17
17
  margin-inline-end: var(--space-scaled-xxs-pfm1nx, 4px);
18
+ }
19
+ .awsui_inline-container-no-wrap_5a145_8b4wa_19:not(#\9) {
20
+ display: inline-flex;
21
+ align-items: flex-start;
22
+ max-inline-size: 100%;
23
+ word-break: normal;
24
+ }
25
+ .awsui_inline-container-no-wrap_5a145_8b4wa_19 > .awsui_inline-container-trigger_5a145_8b4wa_16:not(#\9) {
26
+ flex-shrink: 0;
27
+ }
28
+ .awsui_inline-container-no-wrap_5a145_8b4wa_19 > .awsui_text-to-display_5a145_8b4wa_28:not(#\9) {
29
+ overflow: hidden;
30
+ text-overflow: ellipsis;
31
+ white-space: nowrap;
32
+ min-inline-size: 0;
18
33
  }
@@ -2,8 +2,10 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_5a145_19zbi_9",
6
- "inline-container": "awsui_inline-container_5a145_19zbi_13",
7
- "inline-container-trigger": "awsui_inline-container-trigger_5a145_19zbi_16"
5
+ "root": "awsui_root_5a145_8b4wa_9",
6
+ "inline-container": "awsui_inline-container_5a145_8b4wa_13",
7
+ "inline-container-trigger": "awsui_inline-container-trigger_5a145_8b4wa_16",
8
+ "inline-container-no-wrap": "awsui_inline-container-no-wrap_5a145_8b4wa_19",
9
+ "text-to-display": "awsui_text-to-display_5a145_8b4wa_28"
8
10
  };
9
11
 
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
3
- import { NextDrawerProps } from './interfaces';
4
- type DrawerInternalProps = NextDrawerProps & InternalBaseComponentProps & {
5
- __ref?: React.Ref<NextDrawerProps.Ref>;
3
+ import { DrawerProps } from './interfaces';
4
+ type DrawerInternalProps = DrawerProps & InternalBaseComponentProps & {
5
+ __ref?: React.Ref<DrawerProps.Ref>;
6
6
  };
7
7
  export declare function DrawerImplementation({
8
8
  header,
@@ -1 +1 @@
1
- {"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/drawer/implementation.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAcjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAKlF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAO/C,KAAK,mBAAmB,GAAG,eAAe,GACxC,0BAA0B,GAAG;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;CACxC,CAAC;AAEJ,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,EACL,aAAa,EACb,QAAmB,EACnB,SAAiB,EACjB,MAAM,EACN,YAAY,EACZ,MAAM,EACN,WAAW,EACX,eAAuB,EACvB,QAAgB,EAChB,IAAI,EACJ,OAAO,EACP,SAAS,EACT,cAAc,EACd,aAAa,EACb,IAAI,EACJ,GAAG,SAAS,EACb,EAAE,mBAAmB,eAwKrB;AAED,eAAO,MAAM,sBAAsB,mFAAkD,CAAC"}
1
+ {"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/drawer/implementation.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAcjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAKlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAO3C,KAAK,mBAAmB,GAAG,WAAW,GACpC,0BAA0B,GAAG;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;CACpC,CAAC;AAEJ,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,EACL,aAAa,EACb,QAAmB,EACnB,SAAiB,EACjB,MAAM,EACN,YAAY,EACZ,MAAM,EACN,WAAW,EACX,eAAuB,EACvB,QAAgB,EAChB,IAAI,EACJ,OAAO,EACP,SAAS,EACT,cAAc,EACd,aAAa,EACb,IAAI,EACJ,GAAG,SAAS,EACb,EAAE,mBAAmB,eA0KrB;AAED,eAAO,MAAM,sBAAsB,mFAAkD,CAAC"}
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React, { useEffect, useImperativeHandle, useRef } from 'react';
4
4
  import clsx from 'clsx';
5
- import { useStableCallback, useUniqueId } from '@cloudscape-design/component-toolkit/internal';
5
+ import { Portal, useStableCallback, useUniqueId } from '@cloudscape-design/component-toolkit/internal';
6
6
  import { useRuntimeDrawerContext } from '../app-layout/runtime-drawer/use-runtime-drawer-context';
7
7
  import { useAppLayoutToolbarDesignEnabled } from '../app-layout/utils/feature-flags';
8
8
  import InternalButton from '../button/internal';
@@ -99,7 +99,7 @@ export function DrawerImplementation({ header, footer, children, loading, i18nSt
99
99
  document.addEventListener('keydown', onKeyDown);
100
100
  return () => document.removeEventListener('keydown', onKeyDown);
101
101
  }, [showBackdrop, handleClose]);
102
- return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles.root, testClasses.root, open === false && styles.hidden), ref: __internalRootRef },
102
+ const drawer = (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles.root, testClasses.root, open === false && styles.hidden), ref: __internalRootRef },
103
103
  showBackdrop && (React.createElement("div", { className: clsx(styles.backdrop, testClasses.backdrop, styles[`backdrop-${position}`]), style: { zIndex }, onClick: () => handleClose('backdrop-click') })),
104
104
  React.createElement(FocusLock, { disabled: !trapFocus, className: styles['focus-trap'] },
105
105
  React.createElement("div", { ...containerProps }, loading ? (React.createElement(InternalStatusIndicator, { type: "loading" },
@@ -114,6 +114,7 @@ export function DrawerImplementation({ header, footer, children, loading, i18nSt
114
114
  footer && (React.createElement("div", { ref: footerRef, className: clsx(styles.footer, {
115
115
  [styles['is-sticky']]: isFooterSticky,
116
116
  }) }, footer))))))));
117
+ return position === 'fixed' ? React.createElement(Portal, null, drawer) : drawer;
117
118
  }
118
119
  export const createWidgetizedDrawer = createWidgetizedComponent(DrawerImplementation);
119
120
  //# sourceMappingURL=implementation.js.map