@cloudscape-design/components-themeable 3.0.1344 → 3.0.1345
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/app-layout/constants.scss +0 -3
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/drawer/styles.scss +2 -0
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/navigation/styles.scss +1 -1
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/skeleton/styles.scss +1 -1
- package/lib/internal/scss/expandable-section/styles.scss +102 -14
- package/lib/internal/scss/flashbar/collapsible.scss +1 -1
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/internal/styles/motion/mixins.scss +9 -0
- package/lib/internal/scss/side-navigation/styles.scss +420 -40
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +90 -87
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +6 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +11 -11
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +6 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +30 -30
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +60 -60
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +30 -30
- package/lib/internal/template/app-layout-toolbar/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout-toolbar/index.js +1 -0
- package/lib/internal/template/app-layout-toolbar/index.js.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-container.d.ts +1 -2
- package/lib/internal/template/expandable-section/expandable-section-container.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-container.js +2 -2
- package/lib/internal/template/expandable-section/expandable-section-container.js.map +1 -1
- 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 +4 -4
- package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
- package/lib/internal/template/expandable-section/internal.d.ts +8 -3
- package/lib/internal/template/expandable-section/internal.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/internal.js +24 -10
- package/lib/internal/template/expandable-section/internal.js.map +1 -1
- package/lib/internal/template/expandable-section/styles.css.js +43 -42
- package/lib/internal/template/expandable-section/styles.scoped.css +198 -143
- package/lib/internal/template/expandable-section/styles.selectors.js +43 -42
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +153 -153
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/internal/base-component/styles.scoped.css +19 -9
- package/lib/internal/template/internal/components/transition/index.d.ts +6 -6
- package/lib/internal/template/internal/components/transition/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/transition/index.js +4 -4
- package/lib/internal/template/internal/components/transition/index.js.map +1 -1
- 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 +9 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +10 -1
- package/lib/internal/template/internal/generated/theming/index.cjs +106 -15
- package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +18 -0
- package/lib/internal/template/internal/generated/theming/index.d.ts +18 -0
- package/lib/internal/template/internal/generated/theming/index.js +106 -15
- package/lib/internal/template/side-navigation/implementation.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/implementation.js +6 -3
- package/lib/internal/template/side-navigation/implementation.js.map +1 -1
- package/lib/internal/template/side-navigation/parts.d.ts +2 -1
- package/lib/internal/template/side-navigation/parts.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/parts.js +86 -76
- package/lib/internal/template/side-navigation/parts.js.map +1 -1
- package/lib/internal/template/side-navigation/styles.css.js +64 -50
- package/lib/internal/template/side-navigation/styles.scoped.css +550 -106
- package/lib/internal/template/side-navigation/styles.selectors.js +64 -50
- package/lib/internal/template/side-navigation/util.d.ts +10 -0
- package/lib/internal/template/side-navigation/util.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/util.js +48 -0
- package/lib/internal/template/side-navigation/util.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/scss/expandable-section/motion.scss +0 -30
|
@@ -35,8 +35,5 @@ $toolbar-z-index: 1000;
|
|
|
35
35
|
// Shared toolbar drawer component values
|
|
36
36
|
$toolbar-vertical-panel-icon-offset: 14px;
|
|
37
37
|
|
|
38
|
-
// Default collapsed navigation rail width
|
|
39
|
-
$navigation-collapsed-width-default: 54px;
|
|
40
|
-
|
|
41
38
|
$ai-drawer-background: #161d26;
|
|
42
39
|
$ai-drawer-background: awsui.$color-background-layout-ai-drawer;
|
|
@@ -329,6 +329,8 @@ $ai-drawer-heider-height: 42px;
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
@include theming.dark-mode-only {
|
|
332
|
+
border-block-start: awsui.$border-divider-section-width solid awsui.$color-border-layout;
|
|
333
|
+
|
|
332
334
|
@include desktop-only {
|
|
333
335
|
&:has(+ .drawer-back-to-console-slot) {
|
|
334
336
|
border-inline-end: awsui.$border-divider-section-width solid awsui.$color-border-layout;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@use '../../../internal/generated/custom-css-properties/index.scss' as custom-props;
|
|
9
9
|
@use '../../constants.scss' as constants;
|
|
10
10
|
|
|
11
|
-
$collapsed-width: var(#{custom-props.$navigationCollapsedWidth},
|
|
11
|
+
$collapsed-width: var(#{custom-props.$navigationCollapsedWidth}, awsui.$size-side-navigation-collapsed-width);
|
|
12
12
|
|
|
13
13
|
.hide-navigation {
|
|
14
14
|
position: absolute;
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
|
|
156
156
|
&.navigation-collapsed {
|
|
157
157
|
@include desktop-only {
|
|
158
|
-
inline-size: var(#{custom-props.$navigationCollapsedWidth},
|
|
158
|
+
inline-size: var(#{custom-props.$navigationCollapsedWidth}, awsui.$size-side-navigation-collapsed-width);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
@use '../container/shared' as container;
|
|
9
9
|
@use '../internal/styles/utils/theming';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// Show/hide animation (show = height leads, opacity trails; hide = equal, no delay).
|
|
12
|
+
$reveal-enter-duration: awsui.$motion-duration-expandable-content-enter;
|
|
13
|
+
$reveal-enter-easing: awsui.$motion-easing-expandable-content-enter;
|
|
14
|
+
$reveal-enter-delay: calc(#{$reveal-enter-duration} / 3);
|
|
15
|
+
$reveal-enter-motion: $reveal-enter-duration $reveal-enter-easing;
|
|
16
|
+
$reveal-enter-delayed-motion: $reveal-enter-motion $reveal-enter-delay;
|
|
17
|
+
$reveal-exit-motion: awsui.$motion-duration-show-quick $reveal-enter-easing;
|
|
12
18
|
|
|
13
19
|
$icon-width-normal: awsui.$size-icon-normal;
|
|
14
20
|
$icon-width-medium: awsui.$size-icon-medium;
|
|
@@ -38,6 +44,10 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
|
|
|
38
44
|
.icon {
|
|
39
45
|
transform: rotate(-90deg);
|
|
40
46
|
|
|
47
|
+
@include styles.with-motion {
|
|
48
|
+
transition: transform awsui.$motion-duration-rotate-90 awsui.$motion-easing-rotate-90;
|
|
49
|
+
}
|
|
50
|
+
|
|
41
51
|
&.expanded {
|
|
42
52
|
transform: rotate(0deg);
|
|
43
53
|
}
|
|
@@ -126,9 +136,20 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
|
|
|
126
136
|
&:not(.header-deprecated) {
|
|
127
137
|
padding-inline-start: $icon-total-space-normal;
|
|
128
138
|
}
|
|
139
|
+
|
|
140
|
+
// HIDE (collapsed): quick collapse, no delay
|
|
141
|
+
@include styles.with-motion {
|
|
142
|
+
transition: border-block-end-color $reveal-exit-motion;
|
|
143
|
+
}
|
|
144
|
+
|
|
129
145
|
&.wrapper-expanded {
|
|
130
146
|
padding-block-end: awsui.$space-scaled-xxs;
|
|
131
147
|
border-block-end-color: awsui.$color-border-expandable-section-default;
|
|
148
|
+
|
|
149
|
+
// SHOW (expanded): border fades in with the same delay as content opacity so both appear together
|
|
150
|
+
@include styles.with-motion {
|
|
151
|
+
transition: border-block-end-color $reveal-enter-delayed-motion;
|
|
152
|
+
}
|
|
132
153
|
}
|
|
133
154
|
}
|
|
134
155
|
|
|
@@ -151,6 +172,11 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
|
|
|
151
172
|
padding-block: awsui.$space-container-header-top awsui.$space-container-header-bottom;
|
|
152
173
|
padding-inline-end: container.$header-padding-horizontal;
|
|
153
174
|
|
|
175
|
+
// HIDE (collapsed state): padding settles back to symmetric top/bottom.
|
|
176
|
+
@include styles.with-motion {
|
|
177
|
+
transition: padding-block-end $reveal-exit-motion;
|
|
178
|
+
}
|
|
179
|
+
|
|
154
180
|
&:not(.wrapper-expanded) {
|
|
155
181
|
// Equal top and bottom padding so standalone header has vertical symmetry.
|
|
156
182
|
padding-block-end: awsui.$space-container-header-top;
|
|
@@ -267,23 +293,82 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
|
|
|
267
293
|
.content {
|
|
268
294
|
display: none;
|
|
269
295
|
|
|
296
|
+
&-expanded {
|
|
297
|
+
display: block;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&-compact {
|
|
301
|
+
padding-inline-start: $icon-total-space-normal;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// One-theme only: animated grid-template-rows reveal instead of the true/false display:none. VR keeps
|
|
305
|
+
// instantaneous display toggling, to prevent breaking reliance on synchronous isDisplayed()/isExisting() checks.
|
|
306
|
+
@include theming.one-theme-only {
|
|
307
|
+
display: grid;
|
|
308
|
+
grid-template-rows: 0fr;
|
|
309
|
+
|
|
310
|
+
// HIDE (collapsed state): quick collapse, no delay
|
|
311
|
+
@include styles.with-motion {
|
|
312
|
+
transition: grid-template-rows $reveal-exit-motion;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&-expanded {
|
|
316
|
+
grid-template-rows: 1fr;
|
|
317
|
+
|
|
318
|
+
// SHOW (expanded state): paced height opening, no delay — height leads.
|
|
319
|
+
@include styles.with-motion {
|
|
320
|
+
transition: grid-template-rows $reveal-enter-motion;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// One-theme only: inner wrapper that collapses to 0 height via the grid-row track.
|
|
327
|
+
.content-inner {
|
|
328
|
+
@include theming.one-theme-only {
|
|
329
|
+
// overflow: visible lets negative-margin backgrounds (e.g. side-navigation
|
|
330
|
+
// active/hover/focus states) bleed past the inline edges.
|
|
331
|
+
overflow-x: visible;
|
|
332
|
+
// overflow: clip (not hidden, which would coerce x-axis to auto) still lets the grid-row track collapse.
|
|
333
|
+
overflow-y: clip;
|
|
334
|
+
min-block-size: 0;
|
|
335
|
+
opacity: 0;
|
|
336
|
+
|
|
337
|
+
// HIDE (collapsed state): quick opacity collapse, no delay.
|
|
338
|
+
@include styles.with-motion {
|
|
339
|
+
transition: opacity $reveal-exit-motion;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&-expanded {
|
|
343
|
+
opacity: 1;
|
|
344
|
+
|
|
345
|
+
// SHOW (expanded state): opacity fades in AFTER height has partially
|
|
346
|
+
// opened, creating a perceptible fade in the revealed space.
|
|
347
|
+
@include styles.with-motion {
|
|
348
|
+
transition: opacity $reveal-enter-delayed-motion;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
&-settled {
|
|
353
|
+
overflow-y: visible;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// Padding lives here rather than outer content wrapper so the grid track can fully collapse to zero at 0fr.
|
|
359
|
+
.content-inner-body {
|
|
270
360
|
&-default,
|
|
271
361
|
&-inline {
|
|
272
362
|
padding-block: awsui.$space-scaled-xs;
|
|
273
|
-
padding-inline: 0;
|
|
274
363
|
}
|
|
275
364
|
|
|
276
365
|
&-footer {
|
|
277
366
|
padding-block: awsui.$space-xs;
|
|
278
|
-
padding-inline: 0;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
&-expanded {
|
|
282
|
-
display: block;
|
|
283
367
|
}
|
|
284
368
|
|
|
285
|
-
&-
|
|
286
|
-
padding-
|
|
369
|
+
&-container {
|
|
370
|
+
padding-block: awsui.$space-container-content-top awsui.$space-scaled-l;
|
|
371
|
+
padding-inline: awsui.$space-container-horizontal;
|
|
287
372
|
}
|
|
288
373
|
}
|
|
289
374
|
|
|
@@ -319,7 +404,6 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
|
|
|
319
404
|
}
|
|
320
405
|
}
|
|
321
406
|
|
|
322
|
-
// When the expand/collapse icon is rendered at the end of the header.
|
|
323
407
|
// For non-container variants the icon is rendered at the end of the headerButton
|
|
324
408
|
// (taking the full width of the header). For the container variant the icon is
|
|
325
409
|
// rendered as a sibling of the InternalHeader so it appears past any actions.
|
|
@@ -425,12 +509,16 @@ $icon-total-space-medium: calc(#{$icon-width-medium} + #{$icon-margin-left} + #{
|
|
|
425
509
|
}
|
|
426
510
|
}
|
|
427
511
|
|
|
428
|
-
//
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
512
|
+
// min-block-size: 0 lets this grid item collapse to zero height when an ancestor
|
|
513
|
+
// uses grid-template-rows: 0fr (side-navigation section header collapse).
|
|
514
|
+
// Must remain global (not scoped to .header-icon-end) because the side-nav
|
|
515
|
+
// collapse targets the header wrapper regardless of icon position.
|
|
516
|
+
.header-content {
|
|
517
|
+
min-block-size: 0;
|
|
432
518
|
}
|
|
433
519
|
|
|
520
|
+
// In the end-icon layout, header content elements must shrink without overflowing.
|
|
521
|
+
.header-icon-end > .header-content,
|
|
434
522
|
.header-icon-end > .header-navigation-content {
|
|
435
523
|
flex: 1;
|
|
436
524
|
min-inline-size: 0;
|
|
@@ -304,7 +304,7 @@ the grid layout will be:
|
|
|
304
304
|
padding-block: 0;
|
|
305
305
|
#{custom-props.$styleFocusRingBoxShadow}: 0 0 0
|
|
306
306
|
var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width)
|
|
307
|
-
var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-
|
|
307
|
+
var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-notification-stack-bar-focused);
|
|
308
308
|
|
|
309
309
|
> .icon {
|
|
310
310
|
@include styles.with-motion {
|
|
@@ -21,3 +21,12 @@
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
24
|
+
|
|
25
|
+
// A wrapper for animation related styles that should be applied to one-theme only.
|
|
26
|
+
@mixin one-theme-with-motion($selector: '') {
|
|
27
|
+
@include theming.one-theme-only($selector) {
|
|
28
|
+
@include with-motion {
|
|
29
|
+
@content;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|