@cloudscape-design/components-themeable 3.0.1341 → 3.0.1343
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.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/expandable-section/styles.scss +142 -0
- package/lib/internal/scss/input/styles.scss +2 -5
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/multiselect/styles.scss +14 -0
- package/lib/internal/scss/pagination/styles.scss +9 -2
- package/lib/internal/scss/pagination/test-classes/styles.scss +8 -0
- package/lib/internal/scss/select/styles.scss +14 -1
- package/lib/internal/scss/side-navigation/styles.scss +62 -24
- package/lib/internal/scss/textarea/styles.scss +21 -2
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts +2 -1
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js +57 -13
- package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
- package/lib/internal/template/expandable-section/interfaces.d.ts +1 -1
- package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
- package/lib/internal/template/expandable-section/internal.d.ts +14 -1
- package/lib/internal/template/expandable-section/internal.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/internal.js +3 -3
- package/lib/internal/template/expandable-section/internal.js.map +1 -1
- package/lib/internal/template/expandable-section/styles.css.js +42 -35
- package/lib/internal/template/expandable-section/styles.scoped.css +177 -69
- package/lib/internal/template/expandable-section/styles.selectors.js +42 -35
- package/lib/internal/template/i18n/messages/all.all.js +1 -1
- package/lib/internal/template/i18n/messages/all.all.json +1 -1
- package/lib/internal/template/i18n/messages/all.ar.js +1 -1
- package/lib/internal/template/i18n/messages/all.ar.json +1 -1
- package/lib/internal/template/i18n/messages/all.de.js +1 -1
- package/lib/internal/template/i18n/messages/all.de.json +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
- package/lib/internal/template/i18n/messages/all.en.js +1 -1
- package/lib/internal/template/i18n/messages/all.en.json +1 -1
- package/lib/internal/template/i18n/messages/all.es.js +1 -1
- package/lib/internal/template/i18n/messages/all.es.json +1 -1
- package/lib/internal/template/i18n/messages/all.fr.js +1 -1
- package/lib/internal/template/i18n/messages/all.fr.json +1 -1
- package/lib/internal/template/i18n/messages/all.id.js +1 -1
- package/lib/internal/template/i18n/messages/all.id.json +1 -1
- package/lib/internal/template/i18n/messages/all.it.js +1 -1
- package/lib/internal/template/i18n/messages/all.it.json +1 -1
- package/lib/internal/template/i18n/messages/all.ja.js +1 -1
- package/lib/internal/template/i18n/messages/all.ja.json +1 -1
- package/lib/internal/template/i18n/messages/all.ko.js +1 -1
- package/lib/internal/template/i18n/messages/all.ko.json +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
- package/lib/internal/template/i18n/messages/all.tr.js +1 -1
- package/lib/internal/template/i18n/messages/all.tr.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
- package/lib/internal/template/i18n/messages-types.d.ts +5 -0
- package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
- package/lib/internal/template/i18n/messages-types.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +28 -28
- package/lib/internal/template/input/styles.scoped.css +70 -70
- package/lib/internal/template/input/styles.selectors.js +28 -28
- package/lib/internal/template/internal/base-component/styles.scoped.css +305 -297
- package/lib/internal/template/internal/components/cartesian-chart/styles.css.js +28 -28
- package/lib/internal/template/internal/components/cartesian-chart/styles.scoped.css +35 -35
- package/lib/internal/template/internal/components/cartesian-chart/styles.selectors.js +28 -28
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +1 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +2 -1
- package/lib/internal/template/internal/generated/theming/index.cjs +46 -15
- package/lib/internal/template/internal/generated/theming/index.js +46 -15
- package/lib/internal/template/multiselect/index.d.ts.map +1 -1
- package/lib/internal/template/multiselect/index.js +4 -0
- package/lib/internal/template/multiselect/index.js.map +1 -1
- package/lib/internal/template/multiselect/interfaces.d.ts +8 -1
- package/lib/internal/template/multiselect/interfaces.d.ts.map +1 -1
- package/lib/internal/template/multiselect/interfaces.js.map +1 -1
- package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
- package/lib/internal/template/multiselect/internal.js +22 -2
- package/lib/internal/template/multiselect/internal.js.map +1 -1
- package/lib/internal/template/multiselect/styles.css.js +5 -3
- package/lib/internal/template/multiselect/styles.scoped.css +13 -3
- package/lib/internal/template/multiselect/styles.selectors.js +5 -3
- package/lib/internal/template/multiselect/use-multiselect.d.ts +3 -2
- package/lib/internal/template/multiselect/use-multiselect.d.ts.map +1 -1
- package/lib/internal/template/multiselect/use-multiselect.js +5 -3
- package/lib/internal/template/multiselect/use-multiselect.js.map +1 -1
- package/lib/internal/template/package.json +94 -0
- package/lib/internal/template/pagination/index.d.ts.map +1 -1
- package/lib/internal/template/pagination/index.js +3 -3
- package/lib/internal/template/pagination/index.js.map +1 -1
- package/lib/internal/template/pagination/interfaces.d.ts +19 -3
- package/lib/internal/template/pagination/interfaces.d.ts.map +1 -1
- package/lib/internal/template/pagination/interfaces.js.map +1 -1
- package/lib/internal/template/pagination/internal.d.ts.map +1 -1
- package/lib/internal/template/pagination/internal.js +18 -6
- package/lib/internal/template/pagination/internal.js.map +1 -1
- package/lib/internal/template/pagination/styles.css.js +12 -11
- package/lib/internal/template/pagination/styles.scoped.css +34 -25
- package/lib/internal/template/pagination/styles.selectors.js +12 -11
- package/lib/internal/template/pagination/test-classes/styles.css.js +6 -0
- package/lib/internal/template/pagination/test-classes/styles.scoped.css +7 -0
- package/lib/internal/template/pagination/test-classes/styles.selectors.js +7 -0
- package/lib/internal/template/prompt-input/internal.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/internal.js +14 -2
- package/lib/internal/template/prompt-input/internal.js.map +1 -1
- package/lib/internal/template/select/index.d.ts.map +1 -1
- package/lib/internal/template/select/index.js +4 -0
- package/lib/internal/template/select/index.js.map +1 -1
- package/lib/internal/template/select/interfaces.d.ts +39 -0
- package/lib/internal/template/select/interfaces.d.ts.map +1 -1
- package/lib/internal/template/select/interfaces.js.map +1 -1
- package/lib/internal/template/select/internal.d.ts.map +1 -1
- package/lib/internal/template/select/internal.js +20 -4
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/select/styles.css.js +3 -1
- package/lib/internal/template/select/styles.scoped.css +11 -1
- package/lib/internal/template/select/styles.selectors.js +3 -1
- package/lib/internal/template/select/utils/dropdown-customization.d.ts +20 -0
- package/lib/internal/template/select/utils/dropdown-customization.d.ts.map +1 -0
- package/lib/internal/template/select/utils/dropdown-customization.js +22 -0
- package/lib/internal/template/select/utils/dropdown-customization.js.map +1 -0
- package/lib/internal/template/select/utils/use-select.d.ts +4 -1
- package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-select.js +21 -4
- package/lib/internal/template/select/utils/use-select.js.map +1 -1
- package/lib/internal/template/side-navigation/parts.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/parts.js +3 -2
- package/lib/internal/template/side-navigation/parts.js.map +1 -1
- package/lib/internal/template/side-navigation/styles.css.js +50 -48
- package/lib/internal/template/side-navigation/styles.scoped.css +106 -93
- package/lib/internal/template/side-navigation/styles.selectors.js +50 -48
- package/lib/internal/template/skeleton/styles.css.js +15 -15
- package/lib/internal/template/skeleton/styles.scoped.css +26 -26
- package/lib/internal/template/skeleton/styles.selectors.js +15 -15
- package/lib/internal/template/test-utils/dom/multiselect/index.d.ts +16 -0
- package/lib/internal/template/test-utils/dom/multiselect/index.js +16 -0
- package/lib/internal/template/test-utils/dom/multiselect/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/pagination/index.d.ts +5 -1
- package/lib/internal/template/test-utils/dom/pagination/index.js +7 -0
- package/lib/internal/template/test-utils/dom/pagination/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/select/index.d.ts +16 -0
- package/lib/internal/template/test-utils/dom/select/index.js +16 -0
- package/lib/internal/template/test-utils/dom/select/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/multiselect/index.d.ts +16 -0
- package/lib/internal/template/test-utils/selectors/multiselect/index.js +20 -0
- package/lib/internal/template/test-utils/selectors/multiselect/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/pagination/index.d.ts +5 -1
- package/lib/internal/template/test-utils/selectors/pagination/index.js +7 -0
- package/lib/internal/template/test-utils/selectors/pagination/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/select/index.d.ts +16 -0
- package/lib/internal/template/test-utils/selectors/select/index.js +20 -0
- package/lib/internal/template/test-utils/selectors/select/index.js.map +1 -1
- package/lib/internal/template/textarea/index.d.ts.map +1 -1
- package/lib/internal/template/textarea/index.js +11 -3
- package/lib/internal/template/textarea/index.js.map +1 -1
- package/lib/internal/template/textarea/interfaces.d.ts +12 -0
- package/lib/internal/template/textarea/interfaces.d.ts.map +1 -1
- package/lib/internal/template/textarea/interfaces.js.map +1 -1
- package/lib/internal/template/textarea/styles.css.js +9 -5
- package/lib/internal/template/textarea/styles.scoped.css +26 -14
- package/lib/internal/template/textarea/styles.selectors.js +9 -5
- package/package.json +1 -1
|
@@ -198,6 +198,8 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
|
|
|
198
198
|
flex-direction: row;
|
|
199
199
|
justify-content: space-between;
|
|
200
200
|
align-items: center;
|
|
201
|
+
flex: 1;
|
|
202
|
+
min-inline-size: 0;
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
&-button,
|
|
@@ -285,6 +287,20 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
|
|
|
285
287
|
}
|
|
286
288
|
}
|
|
287
289
|
|
|
290
|
+
// Internal-only class: zeros header wrapper padding when __disableHeaderPaddings is set.
|
|
291
|
+
// Allows parent components to control spacing without brittle positional selectors.
|
|
292
|
+
.disable-header-paddings {
|
|
293
|
+
padding-block: 0;
|
|
294
|
+
padding-inline: 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// Internal-only class: zeros content wrapper padding when the disableContentPaddings prop is set.
|
|
298
|
+
// Paired with disable-header-paddings for consistent zero-padding on both wrapper divs.
|
|
299
|
+
.disable-content-paddings {
|
|
300
|
+
padding-block: 0;
|
|
301
|
+
padding-inline: 0;
|
|
302
|
+
}
|
|
303
|
+
|
|
288
304
|
.focusable {
|
|
289
305
|
&:focus {
|
|
290
306
|
outline: none;
|
|
@@ -302,3 +318,129 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
|
|
|
302
318
|
color: awsui.$color-text-expandable-section-hover;
|
|
303
319
|
}
|
|
304
320
|
}
|
|
321
|
+
|
|
322
|
+
// When the expand/collapse icon is rendered at the end of the header.
|
|
323
|
+
// For non-container variants the icon is rendered at the end of the headerButton
|
|
324
|
+
// (taking the full width of the header). For the container variant the icon is
|
|
325
|
+
// rendered as a sibling of the InternalHeader so it appears past any actions.
|
|
326
|
+
.header-icon-end {
|
|
327
|
+
&.wrapper-default,
|
|
328
|
+
&.wrapper-inline,
|
|
329
|
+
&.wrapper-footer,
|
|
330
|
+
&.wrapper-compact {
|
|
331
|
+
padding-inline-start: 0;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
&.wrapper-navigation {
|
|
335
|
+
justify-content: space-between;
|
|
336
|
+
align-items: flex-start;
|
|
337
|
+
column-gap: awsui.$space-xs;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
&.wrapper-container,
|
|
341
|
+
&.wrapper-default {
|
|
342
|
+
display: flex;
|
|
343
|
+
align-items: flex-start;
|
|
344
|
+
column-gap: awsui.$space-m;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
&.wrapper-container {
|
|
348
|
+
&:not(.header-deprecated) {
|
|
349
|
+
padding-inline-start: container.$header-padding-horizontal;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.header-button-icon-end {
|
|
355
|
+
margin-inline-start: 0;
|
|
356
|
+
column-gap: awsui.$space-xs;
|
|
357
|
+
justify-content: space-between;
|
|
358
|
+
|
|
359
|
+
// For non-container variants the icon lives inside this button, so it
|
|
360
|
+
// needs to be a full-width flex row to push the icon to the inline-end.
|
|
361
|
+
// The container variant renders the icon outside InternalHeader, so
|
|
362
|
+
// making this element a block-level flex container with 100% width would
|
|
363
|
+
// force the title to consume all available space and push the info slot
|
|
364
|
+
// (rendered as a sibling inside InternalHeader) to a new line.
|
|
365
|
+
&:not(.header-container-button) {
|
|
366
|
+
display: flex;
|
|
367
|
+
inline-size: 100%;
|
|
368
|
+
|
|
369
|
+
> .header-text {
|
|
370
|
+
flex: 1;
|
|
371
|
+
min-inline-size: 0;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.icon-container-end {
|
|
377
|
+
margin-inline-start: auto;
|
|
378
|
+
margin-inline-end: 0;
|
|
379
|
+
flex-shrink: 0;
|
|
380
|
+
|
|
381
|
+
// Stretch the button to fill the parent's block-size so the entire caret
|
|
382
|
+
// column is clickable/hoverable, matching start-position behavior.
|
|
383
|
+
align-self: stretch;
|
|
384
|
+
align-items: flex-start;
|
|
385
|
+
|
|
386
|
+
// Reset native <button> chrome for the outside caret in end-icon-position.
|
|
387
|
+
// The navigation variant already has its own reset via .header-navigation > .icon-container
|
|
388
|
+
// so this is harmless-but-redundant for that path, and necessary for default/container.
|
|
389
|
+
border-block: none;
|
|
390
|
+
border-inline: none;
|
|
391
|
+
background: none;
|
|
392
|
+
padding-block: 0;
|
|
393
|
+
padding-inline: 0;
|
|
394
|
+
cursor: pointer;
|
|
395
|
+
font: inherit;
|
|
396
|
+
color: inherit;
|
|
397
|
+
|
|
398
|
+
@include focus-visible.when-visible {
|
|
399
|
+
@include styles.focus-highlight(2px);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// Align the navigation end-layout caret to the first line of header text.
|
|
403
|
+
// The header link has padding-block equal to (item-height - line-height) / 2
|
|
404
|
+
// (set by side-navigation). Mirror that on the caret so it sits at the same
|
|
405
|
+
// vertical position as the first text line — identical to the start layout.
|
|
406
|
+
.header-icon-end.wrapper-navigation > & {
|
|
407
|
+
padding-block-start: calc((#{awsui.$size-side-navigation-item-height} - #{awsui.$line-height-body-m}) / 2);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// In the end layout the icon is a flex child governed by the parent's
|
|
411
|
+
// align-items: flex-start. Reset the inset-block-start offsets that the
|
|
412
|
+
// start layout uses (they assume relative positioning within text flow)
|
|
413
|
+
// so the icon aligns with the first line of header text via flex.
|
|
414
|
+
@include theming.one-theme-only {
|
|
415
|
+
// Override the base .icon-container one-theme rule that re-introduces
|
|
416
|
+
// margin-inline-end via the margin-inline shorthand (equal specificity,
|
|
417
|
+
// later source order wins).
|
|
418
|
+
margin-inline-end: 0;
|
|
419
|
+
&:not(.icon-container-container) {
|
|
420
|
+
inset-block-start: $icon-offset-block;
|
|
421
|
+
}
|
|
422
|
+
> .icon {
|
|
423
|
+
inset-block-start: 0;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// Semantic wrapper around HeadingTag + actions in non-container variants
|
|
429
|
+
.header-icon-end > .header-content {
|
|
430
|
+
flex: 1;
|
|
431
|
+
min-inline-size: 0;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.header-icon-end > .header-navigation-content {
|
|
435
|
+
flex: 1;
|
|
436
|
+
min-inline-size: 0;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// Navigation variant, start icon: align the expand caret to the first line of text
|
|
440
|
+
// when header paddings are disabled (side-navigation use case).
|
|
441
|
+
// Mirrors the end-icon alignment at .icon-container-end (same formula).
|
|
442
|
+
.disable-header-paddings.wrapper-navigation:not(.header-icon-end) > .icon-container {
|
|
443
|
+
display: grid;
|
|
444
|
+
align-items: flex-start;
|
|
445
|
+
padding-block: calc((#{awsui.$size-side-navigation-item-height} - #{awsui.$line-height-body-m}) / 2);
|
|
446
|
+
}
|
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
display: flex;
|
|
323
323
|
align-items: center;
|
|
324
324
|
flex-shrink: 1;
|
|
325
|
-
max-inline-size:
|
|
325
|
+
max-inline-size: calc(50% - 6rem);
|
|
326
326
|
min-inline-size: 0;
|
|
327
327
|
padding-block: styles.$control-padding-vertical;
|
|
328
328
|
padding-inline: styles.$control-padding-horizontal;
|
|
@@ -412,9 +412,6 @@
|
|
|
412
412
|
|
|
413
413
|
> .input-prefix,
|
|
414
414
|
> .input-suffix {
|
|
415
|
-
max-inline-size:
|
|
416
|
-
0px,
|
|
417
|
-
calc((100% - 12rem + #{styles.$invalid-control-left-border} - #{awsui.$border-width-field}) / 2)
|
|
418
|
-
);
|
|
415
|
+
max-inline-size: calc(50% - 6rem + (#{styles.$invalid-control-left-border} - #{awsui.$border-width-field}) / 2);
|
|
419
416
|
}
|
|
420
417
|
}
|
|
@@ -18,3 +18,17 @@
|
|
|
18
18
|
.tokens {
|
|
19
19
|
margin-block-start: awsui.$space-scaled-xs;
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
// Custom dropdown header/footer regions (renderDropdownHeader / renderDropdownFooter). Duplicated in the
|
|
23
|
+
// Select stylesheet. The header can sit directly above the options list, so it is lifted with z-index to
|
|
24
|
+
// keep focusable content's focus ring above the list; the footer sits below the list with natural
|
|
25
|
+
// clearance and needs no lift.
|
|
26
|
+
.dropdown-header {
|
|
27
|
+
inline-size: 100%;
|
|
28
|
+
position: relative;
|
|
29
|
+
z-index: 4;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dropdown-footer {
|
|
33
|
+
inline-size: 100%;
|
|
34
|
+
}
|
|
@@ -98,8 +98,14 @@
|
|
|
98
98
|
color: awsui.$color-text-interactive-default;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
.pages-compact {
|
|
102
|
+
color: awsui.$color-text-pagination-page-number-default;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
}
|
|
105
|
+
|
|
101
106
|
.page-item,
|
|
102
|
-
.dots
|
|
107
|
+
.dots,
|
|
108
|
+
.pages-compact {
|
|
103
109
|
margin-block: styles.$control-padding-vertical;
|
|
104
110
|
margin-inline: awsui.$space-xxs;
|
|
105
111
|
text-align: center;
|
|
@@ -114,6 +120,7 @@
|
|
|
114
120
|
}
|
|
115
121
|
}
|
|
116
122
|
|
|
117
|
-
.root-disabled > .dots
|
|
123
|
+
.root-disabled > .dots,
|
|
124
|
+
.root-disabled > .pages-compact {
|
|
118
125
|
color: awsui.$color-text-interactive-disabled;
|
|
119
126
|
}
|
|
@@ -4,8 +4,21 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use '../internal/styles' as styles;
|
|
7
|
-
@use '../internal/styles/tokens' as awsui;
|
|
8
7
|
|
|
9
8
|
.root {
|
|
10
9
|
@include styles.styles-reset;
|
|
11
10
|
}
|
|
11
|
+
|
|
12
|
+
// Custom dropdown header/footer regions (renderDropdownHeader / renderDropdownFooter). Duplicated in the
|
|
13
|
+
// Multiselect stylesheet. The header can sit directly above the options list, so it is lifted with z-index
|
|
14
|
+
// to keep focusable content's focus ring above the list; the footer sits below the list with natural
|
|
15
|
+
// clearance and needs no lift.
|
|
16
|
+
.dropdown-header {
|
|
17
|
+
inline-size: 100%;
|
|
18
|
+
position: relative;
|
|
19
|
+
z-index: 4;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dropdown-footer {
|
|
23
|
+
inline-size: 100%;
|
|
24
|
+
}
|
|
@@ -19,7 +19,7 @@ $item-padding-inline: awsui.$space-xs;
|
|
|
19
19
|
$item-indent: calc(awsui.$size-icon-normal + #{$item-icon-text-gap} - #{$item-padding-inline});
|
|
20
20
|
$expandable-icon-negative-margin: awsui.$space-l;
|
|
21
21
|
|
|
22
|
-
@mixin item-radius($radius: awsui.$border-radius-item) {
|
|
22
|
+
@mixin item-radius($radius: awsui.$border-radius-side-navigation-item) {
|
|
23
23
|
border-start-start-radius: $radius;
|
|
24
24
|
border-start-end-radius: $radius;
|
|
25
25
|
border-end-start-radius: $radius;
|
|
@@ -122,14 +122,27 @@ $expandable-icon-negative-margin: awsui.$space-l;
|
|
|
122
122
|
padding-inline-start: 0;
|
|
123
123
|
padding-inline-end: 0;
|
|
124
124
|
}
|
|
125
|
+
|
|
126
|
+
&.list--with-icons:not(.list-variant-root--collapsed) {
|
|
127
|
+
padding-inline-start: calc(#{awsui.$space-panel-side-right} - #{$item-padding-inline});
|
|
128
|
+
}
|
|
125
129
|
}
|
|
126
130
|
|
|
127
131
|
.list-variant-expandable-link-group {
|
|
128
132
|
padding-inline-start: calc(#{$item-indent} + #{$expandable-icon-negative-margin});
|
|
133
|
+
|
|
134
|
+
&.list--with-icons {
|
|
135
|
+
padding-inline-start: $item-indent;
|
|
136
|
+
}
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
.list-variant-section {
|
|
132
140
|
padding-inline-start: calc(#{$expandable-icon-negative-margin} - #{$item-padding-inline});
|
|
141
|
+
|
|
142
|
+
&.list--with-icons {
|
|
143
|
+
padding-inline-start: 0;
|
|
144
|
+
margin-inline-start: calc(-1 * #{awsui.$space-xs});
|
|
145
|
+
}
|
|
133
146
|
}
|
|
134
147
|
|
|
135
148
|
.list-variant-link-group {
|
|
@@ -206,31 +219,13 @@ $expandable-icon-negative-margin: awsui.$space-l;
|
|
|
206
219
|
.expandable-link-group {
|
|
207
220
|
margin-inline-start: calc(-1 * #{$expandable-icon-negative-margin});
|
|
208
221
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
// (.wrapper-footer / .header-footer) and the content (.content-footer).
|
|
212
|
-
/* stylelint-disable-next-line selector-max-type */
|
|
213
|
-
& > div {
|
|
214
|
-
padding-block: 0;
|
|
215
|
-
padding-inline: 0;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// Hits the header's first child only — the .icon-container inside the
|
|
219
|
-
// ExpandableSection header — to vertically align the icon with the text.
|
|
220
|
-
// Must NOT match the content div's first child (our <ul>); turning the <ul>
|
|
221
|
-
// into a grid container breaks sibling margin collapse on the .list-item children.
|
|
222
|
-
/* stylelint-disable-next-line selector-max-type */
|
|
223
|
-
& > div:first-child > :first-child {
|
|
224
|
-
display: grid;
|
|
225
|
-
align-items: flex-start;
|
|
226
|
-
padding-block: $item-padding-block;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
&--no-ident {
|
|
222
|
+
&--no-ident,
|
|
223
|
+
&--expand-icon-end {
|
|
230
224
|
margin-inline-start: 0;
|
|
231
225
|
}
|
|
232
226
|
}
|
|
233
227
|
|
|
228
|
+
// Targets the ExpandableSection header wrapper (first child div of the component root).
|
|
234
229
|
.expandable-link-group > div:first-child {
|
|
235
230
|
@include item-radius;
|
|
236
231
|
display: flex;
|
|
@@ -239,6 +234,7 @@ $expandable-icon-negative-margin: awsui.$space-l;
|
|
|
239
234
|
box-sizing: content-box;
|
|
240
235
|
}
|
|
241
236
|
|
|
237
|
+
// Targets the ExpandableSection header wrapper (first child div of the component root).
|
|
242
238
|
.expandable-link-group--active > div:first-child {
|
|
243
239
|
background-color: awsui.$color-background-side-navigation-item-active;
|
|
244
240
|
}
|
|
@@ -264,7 +260,6 @@ $expandable-icon-negative-margin: awsui.$space-l;
|
|
|
264
260
|
// Section groups
|
|
265
261
|
// ==========================================================================
|
|
266
262
|
.section-group {
|
|
267
|
-
@include styles.font-heading-m;
|
|
268
263
|
margin-block: calc(#{awsui.$space-scaled-xs} - #{awsui.$border-divider-section-width});
|
|
269
264
|
margin-inline: 0;
|
|
270
265
|
|
|
@@ -291,7 +286,7 @@ $expandable-icon-negative-margin: awsui.$space-l;
|
|
|
291
286
|
padding-inline: $item-padding-inline;
|
|
292
287
|
margin-inline: calc(-1 * #{$item-padding-inline});
|
|
293
288
|
align-items: flex-start;
|
|
294
|
-
@include item-radius
|
|
289
|
+
@include item-radius;
|
|
295
290
|
font-weight: styles.$font-weight-normal;
|
|
296
291
|
-webkit-font-smoothing: auto;
|
|
297
292
|
-moz-osx-font-smoothing: auto;
|
|
@@ -385,3 +380,46 @@ $expandable-icon-negative-margin: awsui.$space-l;
|
|
|
385
380
|
}
|
|
386
381
|
}
|
|
387
382
|
}
|
|
383
|
+
|
|
384
|
+
// ==========================================================================
|
|
385
|
+
// Icon-layout hover states
|
|
386
|
+
// When icons are present, nav rows show a full-width hover background
|
|
387
|
+
// connecting the item text/icon to the end-positioned caret.
|
|
388
|
+
// ==========================================================================
|
|
389
|
+
|
|
390
|
+
// Shared hover background for icon-layout rows (expanded with-icons AND collapsed rail).
|
|
391
|
+
@mixin icon-layout-hover-background {
|
|
392
|
+
background-color: awsui.$color-background-side-navigation-item-icon-hover;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// --- Expanded icon layout (gated by .list--with-icons) ---
|
|
396
|
+
.list--with-icons {
|
|
397
|
+
// Plain links: hover background (exclude active collapsed links to preserve their active background).
|
|
398
|
+
> .list-item > .link:not(.link-active.link--collapsed):hover {
|
|
399
|
+
@include icon-layout-hover-background;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// Expandable-link-group header: hover background.
|
|
403
|
+
> .list-item > .expandable-link-group > div:first-child:hover {
|
|
404
|
+
@include icon-layout-hover-background;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// Section (footer-variant expandable) header: full-width hover geometry + background.
|
|
408
|
+
// :first-child targets the ExpandableSection header wrapper (positional cross-component coupling).
|
|
409
|
+
> .list-item > .section > :first-child {
|
|
410
|
+
@include item-radius;
|
|
411
|
+
display: flex;
|
|
412
|
+
padding-inline: $item-padding-inline;
|
|
413
|
+
margin-inline: calc(-1 * #{$item-padding-inline});
|
|
414
|
+
box-sizing: content-box;
|
|
415
|
+
|
|
416
|
+
&:hover {
|
|
417
|
+
@include icon-layout-hover-background;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// --- Collapsed rail items (always have icons; gated by collapsed classes) ---
|
|
423
|
+
.link--collapsed:not(.link-active):hover {
|
|
424
|
+
@include icon-layout-hover-background;
|
|
425
|
+
}
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
.textarea {
|
|
16
16
|
@include styles.styles-reset;
|
|
17
|
-
//
|
|
18
|
-
resize:
|
|
17
|
+
// Matches browsers' default for textarea; overridden by the resize modifiers below
|
|
18
|
+
resize: both;
|
|
19
19
|
// Restore default text cursor
|
|
20
20
|
cursor: text;
|
|
21
21
|
// Allow multi-line placeholders
|
|
@@ -44,6 +44,25 @@
|
|
|
44
44
|
|
|
45
45
|
@include styles.font-body-m;
|
|
46
46
|
|
|
47
|
+
// Physical axes are used here rather than logical ones: resize axes follow
|
|
48
|
+
// `writing-mode`, which is always horizontal-tb, so `block`/`inline` would
|
|
49
|
+
// resolve identically in both LTR and RTL.
|
|
50
|
+
&.textarea-resize-both {
|
|
51
|
+
resize: both;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.textarea-resize-horizontal {
|
|
55
|
+
resize: horizontal;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.textarea-resize-vertical {
|
|
59
|
+
resize: vertical;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.textarea-resize-none {
|
|
63
|
+
resize: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
47
66
|
&:hover {
|
|
48
67
|
border-color: var(
|
|
49
68
|
#{custom-props.$styleBorderColorHover},
|
|
@@ -14,6 +14,7 @@ interface ExpandableDefaultHeaderProps {
|
|
|
14
14
|
onClick: MouseEventHandler;
|
|
15
15
|
icon: JSX.Element;
|
|
16
16
|
variant: InternalVariant;
|
|
17
|
+
expandIconPosition: 'start' | 'end';
|
|
17
18
|
}
|
|
18
19
|
interface ExpandableSectionHeaderProps extends Omit<ExpandableDefaultHeaderProps, 'children' | 'icon'> {
|
|
19
20
|
header?: ReactNode;
|
|
@@ -25,6 +26,6 @@ interface ExpandableSectionHeaderProps extends Omit<ExpandableDefaultHeaderProps
|
|
|
25
26
|
headingTagOverride?: ExpandableSectionProps.HeadingTag;
|
|
26
27
|
ariaLabelledBy?: string;
|
|
27
28
|
}
|
|
28
|
-
export declare const ExpandableSectionHeader: ({ id, descriptionId, className, variant, header, headerText, headerDescription, headerCounter, headerInfo, headerActions, headingTagOverride, expanded, ariaControls, ariaLabel, ariaLabelledBy, onKeyUp, onKeyDown, onClick, }: ExpandableSectionHeaderProps) => JSX.Element;
|
|
29
|
+
export declare const ExpandableSectionHeader: ({ id, descriptionId, className, variant, header, headerText, headerDescription, headerCounter, headerInfo, headerActions, headingTagOverride, expanded, ariaControls, ariaLabel, ariaLabelledBy, onKeyUp, onKeyDown, onClick, expandIconPosition, }: ExpandableSectionHeaderProps) => JSX.Element;
|
|
29
30
|
export {};
|
|
30
31
|
//# sourceMappingURL=expandable-section-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandable-section-header.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAalF,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"expandable-section-header.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAalF,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAwExD,UAAU,4BAA4B;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;IAClB,OAAO,EAAE,eAAe,CAAC;IACzB,kBAAkB,EAAE,OAAO,GAAG,KAAK,CAAC;CACrC;AAcD,UAAU,4BAA6B,SAAQ,IAAI,CAAC,4BAA4B,EAAE,UAAU,GAAG,MAAM,CAAC;IACpG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAkQD,eAAO,MAAM,uBAAuB,GAAI,qPAoBrC,4BAA4B,gBA6F9B,CAAC"}
|
|
@@ -11,6 +11,27 @@ import { variantRequiresActionsDivider, variantSupportsActions, variantSupportsD
|
|
|
11
11
|
import analyticsSelectors from './analytics-metadata/styles.css.js';
|
|
12
12
|
import styles from './styles.css.js';
|
|
13
13
|
const componentName = 'ExpandableSection';
|
|
14
|
+
/**
|
|
15
|
+
* Standalone expand/collapse caret button used when the icon renders OUTSIDE
|
|
16
|
+
* the main clickable header area (navigation variant) or outside the headerButton
|
|
17
|
+
* (end-position with actions/container). This is always an independent interactive
|
|
18
|
+
* element with its own ARIA attributes.
|
|
19
|
+
*/
|
|
20
|
+
const ExpandIconButton = ({ icon, ariaLabel, ariaLabelledBy, ariaControls, expanded, onClick, stopPropagation, className, }) => {
|
|
21
|
+
const stopKeyPropagation = stopPropagation
|
|
22
|
+
? (event) => {
|
|
23
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
24
|
+
event.stopPropagation();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
: undefined;
|
|
28
|
+
return (React.createElement("button", { className: clsx(styles['icon-container'], styles['expand-button'], className), type: "button", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-controls": ariaControls, "aria-expanded": expanded, onClick: stopPropagation
|
|
29
|
+
? event => {
|
|
30
|
+
event.stopPropagation();
|
|
31
|
+
onClick(event);
|
|
32
|
+
}
|
|
33
|
+
: onClick, onKeyUp: stopKeyPropagation, onKeyDown: stopKeyPropagation, ...getExpandActionAnalyticsMetadataAttribute(expanded) }, icon));
|
|
34
|
+
};
|
|
14
35
|
const getExpandActionAnalyticsMetadataAttribute = (expanded) => {
|
|
15
36
|
const metadata = {
|
|
16
37
|
action: !expanded ? 'expand' : 'collapse',
|
|
@@ -25,12 +46,15 @@ const ExpandableDeprecatedHeader = ({ id, className, onClick, ariaLabel, ariaCon
|
|
|
25
46
|
React.createElement("div", { className: clsx(styles['icon-container'], styles[`icon-container-${variant}`]) }, icon),
|
|
26
47
|
children));
|
|
27
48
|
};
|
|
28
|
-
const ExpandableNavigationHeader = ({ id, className, onClick, ariaLabelledBy, ariaLabel, ariaControls, expanded, children, icon, }) => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
children
|
|
49
|
+
const ExpandableNavigationHeader = ({ id, className, onClick, ariaLabelledBy, ariaLabel, ariaControls, expanded, children, icon, expandIconPosition, }) => {
|
|
50
|
+
const expandButton = (React.createElement(ExpandIconButton, { icon: icon, ariaLabelledBy: ariaLabelledBy, ariaLabel: ariaLabel, ariaControls: ariaControls, expanded: expanded, onClick: onClick, className: expandIconPosition === 'end' ? styles['icon-container-end'] : undefined }));
|
|
51
|
+
return (React.createElement("div", { id: id, className: clsx(className, styles['click-target'], analyticsSelectors['header-label'], expandIconPosition === 'end' && styles['header-icon-end']) }, expandIconPosition === 'end' ? (React.createElement(React.Fragment, null,
|
|
52
|
+
children,
|
|
53
|
+
expandButton)) : (React.createElement(React.Fragment, null,
|
|
54
|
+
expandButton,
|
|
55
|
+
children))));
|
|
32
56
|
};
|
|
33
|
-
const ExpandableHeaderTextWrapper = ({ id, descriptionId, className, onClick, ariaLabel, ariaControls, expanded, children, icon, headerDescription, headerCounter, headerInfo, headerActions, variant, headingTagOverride, onKeyUp, onKeyDown, }) => {
|
|
57
|
+
const ExpandableHeaderTextWrapper = ({ id, descriptionId, className, onClick, ariaLabel, ariaControls, expanded, children, icon, headerDescription, headerCounter, headerInfo, headerActions, variant, headingTagOverride, onKeyUp, onKeyDown, expandIconPosition, }) => {
|
|
34
58
|
const isContainer = variant === 'container';
|
|
35
59
|
const HeadingTag = headingTagOverride || 'div';
|
|
36
60
|
const supportsInteractiveElements = variantSupportsActions(variant);
|
|
@@ -38,6 +62,11 @@ const ExpandableHeaderTextWrapper = ({ id, descriptionId, className, onClick, ar
|
|
|
38
62
|
const actions = supportsInteractiveElements && headerActions;
|
|
39
63
|
const description = variantSupportsDescription(variant) && headerDescription && (React.createElement("span", { id: descriptionId, className: styles[`description-${variant}`] }, headerDescription));
|
|
40
64
|
const listeners = { onClick, onKeyDown, onKeyUp };
|
|
65
|
+
const iconAtEnd = expandIconPosition === 'end';
|
|
66
|
+
// For the variants that allow actions, when end placement is active, the icon is rendered outside the
|
|
67
|
+
// InternalHeader so it appears at the inline-end of the wrapper, past any header actions.
|
|
68
|
+
// Other variants render the icon at the end of the headerButton itself.
|
|
69
|
+
const renderIconOutsideHeader = iconAtEnd && (isContainer || !!actions);
|
|
41
70
|
// If interactive elements are present, constrain the clickable area to only the icon and the header text
|
|
42
71
|
// to prevent nesting interactive elements.
|
|
43
72
|
const headerButtonListeners = restrictClickableArea ? listeners : undefined;
|
|
@@ -47,16 +76,29 @@ const ExpandableHeaderTextWrapper = ({ id, descriptionId, className, onClick, ar
|
|
|
47
76
|
const headingTagListeners = !headerButtonListeners && !isContainer && description ? listeners : undefined;
|
|
48
77
|
// For all other cases, make the entire header clickable for backwards compatibility.
|
|
49
78
|
const wrapperListeners = !headerButtonListeners && !headingTagListeners ? listeners : undefined;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
79
|
+
// Standalone caret button — used when the icon is rendered OUTSIDE the headerButton
|
|
80
|
+
// (end-position with container or actions). Must be its own <button> for accessibility.
|
|
81
|
+
const expandButton = (React.createElement(ExpandIconButton, { icon: icon, ariaLabel: ariaLabel, ariaLabelledBy: !ariaLabel ? id : undefined, ariaControls: ariaControls, expanded: expanded, onClick: onClick, stopPropagation: true, className: clsx(styles[`icon-container-${variant}`], styles['icon-container-end']) }));
|
|
82
|
+
// Decorative inline icon — used when the caret is INSIDE the headerButton
|
|
83
|
+
// (which itself is the interactive element). A nested <button> would be illegal.
|
|
84
|
+
const expandIcon = (React.createElement("span", { className: clsx(styles['icon-container'], styles[`icon-container-${variant}`], iconAtEnd && styles['icon-container-end']) }, icon));
|
|
85
|
+
const outsideIcon = renderIconOutsideHeader ? expandButton : null;
|
|
86
|
+
const textElement = (React.createElement("span", { id: id, className: clsx(styles['header-text'], analyticsSelectors['header-label']) }, children));
|
|
87
|
+
const headerButton = (React.createElement("span", { className: clsx(styles['expand-button'], isContainer ? styles['header-container-button'] : styles['header-button'], iconAtEnd && styles['header-button-icon-end'], headerButtonListeners && styles['click-target']), role: "button", tabIndex: 0, "aria-label": ariaLabel, "aria-labelledby": !ariaLabel && description ? id : undefined, "aria-describedby": description ? descriptionId : undefined, "aria-controls": ariaControls, "aria-expanded": expanded, ...headerButtonListeners, ...(headerButtonListeners ? getExpandActionAnalyticsMetadataAttribute(expanded) : {}) }, renderIconOutsideHeader ? (textElement) : iconAtEnd ? (React.createElement(React.Fragment, null,
|
|
88
|
+
textElement,
|
|
89
|
+
expandIcon)) : (React.createElement(React.Fragment, null,
|
|
90
|
+
expandIcon,
|
|
91
|
+
textElement))));
|
|
92
|
+
return (React.createElement("div", { className: clsx(className, wrapperListeners && styles['click-target'], iconAtEnd && styles['header-icon-end']), ...wrapperListeners, ...(wrapperListeners ? getExpandActionAnalyticsMetadataAttribute(expanded) : {}) }, isContainer ? (React.createElement(React.Fragment, null,
|
|
93
|
+
React.createElement(InternalHeader, { variant: "h2", description: description, counter: headerCounter, info: headerInfo, actions: actions, headingTagOverride: headingTagOverride, __inExpandableSection: true }, headerButton),
|
|
94
|
+
outsideIcon)) : (React.createElement(React.Fragment, null,
|
|
95
|
+
React.createElement("div", { className: clsx(styles['header-content'], actions && styles['header-actions-wrapper']) },
|
|
55
96
|
React.createElement(HeadingTag, { className: clsx(styles['header-wrapper'], headingTagListeners && styles['click-target']), ...headingTagListeners, ...(headingTagListeners ? getExpandActionAnalyticsMetadataAttribute(expanded) : {}) }, headerButton),
|
|
56
97
|
actions),
|
|
57
|
-
description && React.createElement(HeaderDescription, { variantOverride: "h3" }, description)
|
|
98
|
+
description && React.createElement(HeaderDescription, { variantOverride: "h3" }, description),
|
|
99
|
+
outsideIcon))));
|
|
58
100
|
};
|
|
59
|
-
export const ExpandableSectionHeader = ({ id, descriptionId, className, variant, header, headerText, headerDescription, headerCounter, headerInfo, headerActions, headingTagOverride, expanded, ariaControls, ariaLabel, ariaLabelledBy, onKeyUp, onKeyDown, onClick, }) => {
|
|
101
|
+
export const ExpandableSectionHeader = ({ id, descriptionId, className, variant, header, headerText, headerDescription, headerCounter, headerInfo, headerActions, headingTagOverride, expanded, ariaControls, ariaLabel, ariaLabelledBy, onKeyUp, onKeyDown, onClick, expandIconPosition, }) => {
|
|
60
102
|
const alwaysShowDivider = variantRequiresActionsDivider(variant) && headerActions;
|
|
61
103
|
const icon = (React.createElement(InternalIcon, { size: isThemeActive(Theme.OneTheme) ? 'x-small' : variant === 'container' ? 'medium' : 'normal', className: clsx(styles.icon, expanded && styles.expanded), name: isThemeActive(Theme.OneTheme) ? 'angle-down' : 'caret-down-filled' }));
|
|
62
104
|
const defaultHeaderProps = {
|
|
@@ -67,6 +109,7 @@ export const ExpandableSectionHeader = ({ id, descriptionId, className, variant,
|
|
|
67
109
|
ariaLabel: ariaLabel,
|
|
68
110
|
onClick: onClick,
|
|
69
111
|
variant,
|
|
112
|
+
expandIconPosition,
|
|
70
113
|
};
|
|
71
114
|
if ((headerCounter || headerInfo) && !variantSupportsInfoLink(variant) && isDevelopment) {
|
|
72
115
|
warnOnce(componentName, 'The `headerCounter` and `headerInfo` props are only supported for the "container" variant.');
|
|
@@ -79,7 +122,8 @@ export const ExpandableSectionHeader = ({ id, descriptionId, className, variant,
|
|
|
79
122
|
}
|
|
80
123
|
const wrapperClassName = clsx(styles.wrapper, styles[`wrapper-${variant}`], (expanded || alwaysShowDivider) && styles['wrapper-expanded']);
|
|
81
124
|
if (variant === 'navigation') {
|
|
82
|
-
return (React.createElement(ExpandableNavigationHeader, { className: clsx(className, wrapperClassName), ariaLabelledBy: ariaLabelledBy, ...defaultHeaderProps },
|
|
125
|
+
return (React.createElement(ExpandableNavigationHeader, { className: clsx(className, wrapperClassName), ariaLabelledBy: ariaLabelledBy, ...defaultHeaderProps },
|
|
126
|
+
React.createElement("span", { className: styles['header-navigation-content'] }, headerText !== null && headerText !== void 0 ? headerText : header)));
|
|
83
127
|
}
|
|
84
128
|
if (headerText || variant === 'inline') {
|
|
85
129
|
if (!headerText && header && variant === 'inline') {
|