@cloudscape-design/components-themeable 3.0.1374 → 3.0.1375
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/visual-refresh-toolbar/toolbar/styles.scss +4 -0
- package/lib/internal/scss/container/styles.scss +10 -0
- package/lib/internal/scss/expandable-section/styles.scss +16 -0
- package/lib/internal/scss/flashbar/collapsible.scss +22 -45
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/table/body-cell/styles.scss +7 -0
- package/lib/internal/scss/table/header-cell/styles.scss +12 -0
- package/lib/internal/scss/table/sticky-columns/sticky-boundary.scss +24 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/contexts.d.ts +4 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/contexts.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/contexts.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts +3 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts +3 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.js +8 -5
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts +4 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.js +27 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.d.ts +7 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.js +16 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-own-breadcrumbs-props.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +4 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +15 -14
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +35 -31
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +15 -14
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/implementation.d.ts.map +1 -1
- package/lib/internal/template/breadcrumb-group/implementation.js +30 -1
- package/lib/internal/template/breadcrumb-group/implementation.js.map +1 -1
- package/lib/internal/template/container/index.d.ts +3 -1
- package/lib/internal/template/container/index.d.ts.map +1 -1
- package/lib/internal/template/container/index.js +4 -3
- package/lib/internal/template/container/index.js.map +1 -1
- package/lib/internal/template/container/interfaces.d.ts +7 -0
- package/lib/internal/template/container/interfaces.d.ts.map +1 -1
- package/lib/internal/template/container/interfaces.js.map +1 -1
- package/lib/internal/template/container/internal.d.ts +3 -2
- package/lib/internal/template/container/internal.d.ts.map +1 -1
- package/lib/internal/template/container/internal.js +37 -8
- package/lib/internal/template/container/internal.js.map +1 -1
- package/lib/internal/template/container/styles.css.js +34 -33
- package/lib/internal/template/container/styles.scoped.css +77 -56
- package/lib/internal/template/container/styles.selectors.js +34 -33
- package/lib/internal/template/copy-to-clipboard/internal.d.ts.map +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.js +3 -1
- package/lib/internal/template/copy-to-clipboard/internal.js.map +1 -1
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +160 -200
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/icon/generated/icons.d.ts +1 -0
- package/lib/internal/template/icon/generated/icons.d.ts.map +1 -1
- package/lib/internal/template/icon/generated/icons.js +3 -0
- package/lib/internal/template/icon/generated/icons.js.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/base-theme/styles.scoped.css +6 -0
- 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 +3 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +3 -0
- package/lib/internal/template/internal/generated/theming/index.cjs +65 -0
- package/lib/internal/template/internal/generated/theming/index.js +65 -0
- package/lib/internal/template/internal/plugins/widget/index.d.ts +5 -1
- package/lib/internal/template/internal/plugins/widget/index.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/widget/index.js +26 -1
- package/lib/internal/template/internal/plugins/widget/index.js.map +1 -1
- package/lib/internal/template/internal/plugins/widget/interfaces.d.ts +12 -2
- package/lib/internal/template/internal/plugins/widget/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/widget/interfaces.js.map +1 -1
- package/lib/internal/template/internal/plugins/widget.d.ts +1 -1
- package/lib/internal/template/internal/plugins/widget.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/widget.js +1 -1
- package/lib/internal/template/internal/plugins/widget.js.map +1 -1
- package/lib/internal/template/plugins/index.d.ts +2 -1
- package/lib/internal/template/plugins/index.d.ts.map +1 -1
- package/lib/internal/template/plugins/index.js +2 -1
- package/lib/internal/template/plugins/index.js.map +1 -1
- package/lib/internal/template/table/header-cell/styles.css.js +38 -38
- package/lib/internal/template/table/header-cell/styles.scoped.css +80 -81
- package/lib/internal/template/table/header-cell/styles.selectors.js +38 -38
- package/lib/internal/template/table/sticky-columns/interfaces.d.ts +2 -0
- package/lib/internal/template/table/sticky-columns/interfaces.d.ts.map +1 -1
- package/lib/internal/template/table/sticky-columns/interfaces.js.map +1 -1
- package/lib/internal/template/table/sticky-columns/use-sticky-columns.d.ts.map +1 -1
- package/lib/internal/template/table/sticky-columns/use-sticky-columns.js +11 -5
- package/lib/internal/template/table/sticky-columns/use-sticky-columns.js.map +1 -1
- package/lib/internal/template/table/sticky-columns/utils.d.ts.map +1 -1
- package/lib/internal/template/table/sticky-columns/utils.js +2 -0
- package/lib/internal/template/table/sticky-columns/utils.js.map +1 -1
- package/lib/internal/template/table/utils.d.ts +1 -3
- package/lib/internal/template/table/utils.d.ts.map +1 -1
- package/lib/internal/template/table/utils.js +12 -5
- package/lib/internal/template/table/utils.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +0 -4785
|
@@ -10,7 +10,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
10
10
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
11
|
SPDX-License-Identifier: Apache-2.0
|
|
12
12
|
*/
|
|
13
|
-
.awsui_universal-
|
|
13
|
+
.awsui_universal-toolbar_1kzri_3aah1_13:not(#\9) {
|
|
14
14
|
background-color: var(--color-background-layout-toolbar-1jwzza, #ffffff);
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
position: sticky;
|
|
@@ -20,16 +20,16 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
20
20
|
transition-property: inset-block-start, opacity;
|
|
21
21
|
}
|
|
22
22
|
@media (prefers-reduced-motion: reduce) {
|
|
23
|
-
.awsui_universal-
|
|
23
|
+
.awsui_universal-toolbar_1kzri_3aah1_13:not(#\9) {
|
|
24
24
|
animation: none;
|
|
25
25
|
transition: none;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
.awsui-motion-disabled .awsui_universal-
|
|
28
|
+
.awsui-motion-disabled .awsui_universal-toolbar_1kzri_3aah1_13:not(#\9), .awsui-mode-entering .awsui_universal-toolbar_1kzri_3aah1_13:not(#\9) {
|
|
29
29
|
animation: none;
|
|
30
30
|
transition: none;
|
|
31
31
|
}
|
|
32
|
-
.awsui_universal-
|
|
32
|
+
.awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):before, .awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):after {
|
|
33
33
|
content: "";
|
|
34
34
|
position: absolute;
|
|
35
35
|
inset-block-start: 0;
|
|
@@ -46,32 +46,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
46
46
|
*/
|
|
47
47
|
}
|
|
48
48
|
@media not print {
|
|
49
|
-
.awsui_universal-
|
|
49
|
+
.awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):before, .awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):after {
|
|
50
50
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
51
51
|
}
|
|
52
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
52
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):before, .awsui-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):before, .awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):after, .awsui-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):after {
|
|
53
53
|
inset-block-start: 42px;
|
|
54
54
|
inline-size: var(--border-divider-section-width-dlkb8v, 1px);
|
|
55
55
|
block-size: calc(100vh - 42px);
|
|
56
56
|
background: var(--color-border-layout-h5yp20, #d5dbdb);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
.awsui_universal-
|
|
59
|
+
.awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):after {
|
|
60
60
|
background-color: var(--color-background-layout-toolbar-1jwzza, #ffffff);
|
|
61
61
|
border-start-start-radius: var(--space-xxs-3o1yoq, 4px);
|
|
62
62
|
}
|
|
63
63
|
@media not print {
|
|
64
|
-
.awsui_universal-
|
|
64
|
+
.awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):after {
|
|
65
65
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
66
66
|
}
|
|
67
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
67
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):after, .awsui-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9):not(:has(.awsui_universal-toolbar-ai-custom_1kzri_3aah1_32)):after {
|
|
68
68
|
display: none;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
.awsui_universal-
|
|
71
|
+
.awsui_universal-toolbar_1kzri_3aah1_13.awsui_disable-body-scroll_1kzri_3aah1_71:not(#\9) {
|
|
72
72
|
inset-block-start: 0px;
|
|
73
73
|
}
|
|
74
|
-
.awsui_universal-
|
|
74
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9) {
|
|
75
75
|
grid-column: 1;
|
|
76
76
|
position: relative;
|
|
77
77
|
display: flex;
|
|
@@ -93,14 +93,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
93
93
|
background: var(--color-background-layout-ai-drawer-u8ll44, #1a2029);
|
|
94
94
|
}
|
|
95
95
|
@media not print {
|
|
96
|
-
.awsui_universal-
|
|
96
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9) {
|
|
97
97
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
98
98
|
}
|
|
99
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
99
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9), .awsui-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9) {
|
|
100
100
|
block-size: 100%;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
.awsui_universal-
|
|
103
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9):before, .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9):after {
|
|
104
104
|
content: "";
|
|
105
105
|
position: absolute;
|
|
106
106
|
inset-block-start: 0;
|
|
@@ -110,18 +110,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
110
110
|
background: var(--color-background-layout-ai-drawer-u8ll44, #1a2029);
|
|
111
111
|
}
|
|
112
112
|
@media not print {
|
|
113
|
-
.awsui_universal-
|
|
113
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9):before, .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9):after {
|
|
114
114
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
115
115
|
}
|
|
116
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
116
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9):before, .awsui-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9):before, .awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9):after, .awsui-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9):after {
|
|
117
117
|
display: none;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
.awsui_universal-
|
|
120
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_universal-toolbar-ai-custom_1kzri_3aah1_32:not(#\9):after {
|
|
121
121
|
background-color: var(--color-background-layout-toolbar-1jwzza, #ffffff);
|
|
122
122
|
border-start-start-radius: var(--space-xxs-3o1yoq, 4px);
|
|
123
123
|
}
|
|
124
|
-
.awsui_universal-
|
|
124
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124:not(#\9) {
|
|
125
125
|
block-size: 100%;
|
|
126
126
|
align-items: center;
|
|
127
127
|
display: grid;
|
|
@@ -130,32 +130,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
130
130
|
grid-template-rows: 1fr;
|
|
131
131
|
}
|
|
132
132
|
@media not print {
|
|
133
|
-
.awsui_universal-
|
|
133
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124:not(#\9) {
|
|
134
134
|
/* stylelint-disable selector-combinator-disallowed-list, selector-class-pattern */
|
|
135
135
|
}
|
|
136
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
136
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124:not(#\9), .awsui-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124:not(#\9) {
|
|
137
137
|
border-block-start: var(--border-divider-section-width-dlkb8v, 1px) solid var(--color-border-layout-h5yp20, #d5dbdb);
|
|
138
138
|
}
|
|
139
|
-
.awsui-polaris-dark-mode .awsui_universal-
|
|
139
|
+
.awsui-polaris-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9), .awsui-dark-mode .awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124.awsui_with-ai-drawer_1kzri_3aah1_32:not(#\9) {
|
|
140
140
|
border-start-start-radius: var(--space-xxs-3o1yoq, 4px);
|
|
141
141
|
border-inline-start: var(--border-divider-section-width-dlkb8v, 1px) solid var(--color-border-layout-h5yp20, #d5dbdb);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
.awsui_universal-
|
|
144
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124 > .awsui_universal-toolbar-nav_1kzri_3aah1_144:not(#\9) {
|
|
145
145
|
grid-column: 2;
|
|
146
146
|
padding-inline-start: var(--space-s-kll7oj, 12px);
|
|
147
147
|
padding-inline-end: var(--space-static-xxs-vzto3j, 4px);
|
|
148
148
|
}
|
|
149
|
-
.awsui_universal-
|
|
149
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124 > .awsui_universal-toolbar-breadcrumbs_1kzri_3aah1_149:not(#\9) {
|
|
150
150
|
grid-column: 3;
|
|
151
151
|
padding-inline: var(--space-static-xs-789l1l, 8px);
|
|
152
152
|
background-color: transparent;
|
|
153
153
|
flex: 1 0;
|
|
154
154
|
}
|
|
155
|
-
.awsui_universal-
|
|
155
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124 > .awsui_universal-toolbar-breadcrumbs_1kzri_3aah1_149:not(#\9):first-child {
|
|
156
156
|
padding-inline: calc(var(--space-static-xs-789l1l, 8px) + var(--space-static-m-0gdnhk, 16px));
|
|
157
157
|
}
|
|
158
|
-
.awsui_universal-
|
|
158
|
+
.awsui_universal-toolbar_1kzri_3aah1_13 > .awsui_toolbar-container_1kzri_3aah1_124 > .awsui_universal-toolbar-drawers_1kzri_3aah1_158:not(#\9) {
|
|
159
159
|
grid-column: 4;
|
|
160
160
|
column-gap: var(--space-static-xs-789l1l, 8px);
|
|
161
161
|
display: flex;
|
|
@@ -163,8 +163,8 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
163
163
|
block-size: 100%;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
.awsui_drawers-desktop-triggers-
|
|
167
|
-
.awsui_drawers-mobile-triggers-
|
|
166
|
+
.awsui_drawers-desktop-triggers-container_1kzri_3aah1_166:not(#\9),
|
|
167
|
+
.awsui_drawers-mobile-triggers-container_1kzri_3aah1_167:not(#\9) {
|
|
168
168
|
border-collapse: separate;
|
|
169
169
|
border-spacing: 0;
|
|
170
170
|
box-sizing: border-box;
|
|
@@ -206,7 +206,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
206
206
|
inline-size: 100%;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
.awsui_drawers-trigger-
|
|
209
|
+
.awsui_drawers-trigger-content_1kzri_3aah1_209:not(#\9) {
|
|
210
210
|
block-size: 100%;
|
|
211
211
|
align-items: center;
|
|
212
212
|
display: flex;
|
|
@@ -216,19 +216,23 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
216
216
|
padding-inline-start: var(--space-xs-m9b7jf, 8px);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
.awsui_group-
|
|
219
|
+
.awsui_group-divider_1kzri_3aah1_219:not(#\9) {
|
|
220
220
|
border-inline-end: var(--border-divider-section-width-dlkb8v, 1px) solid var(--color-border-divider-default-diwd4w, #eaeded);
|
|
221
221
|
block-size: 60%;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
@media (max-width: 688px) {
|
|
225
|
-
.awsui_drawers-
|
|
225
|
+
.awsui_drawers-trigger_1kzri_3aah1_209:not(#\9) {
|
|
226
226
|
display: flex;
|
|
227
227
|
justify-content: center;
|
|
228
228
|
align-items: center;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
.awsui_block-body-
|
|
232
|
+
.awsui_block-body-scroll_1kzri_3aah1_232:not(#\9) {
|
|
233
233
|
overflow: hidden;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.awsui_external-breadcrumbs_1kzri_3aah1_236:not(#\9) {
|
|
237
|
+
display: none;
|
|
234
238
|
}
|
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"universal-toolbar": "awsui_universal-
|
|
6
|
-
"with-ai-drawer": "awsui_with-ai-
|
|
7
|
-
"universal-toolbar-ai-custom": "awsui_universal-toolbar-ai-
|
|
8
|
-
"disable-body-scroll": "awsui_disable-body-
|
|
9
|
-
"toolbar-container": "awsui_toolbar-
|
|
10
|
-
"universal-toolbar-nav": "awsui_universal-toolbar-
|
|
11
|
-
"universal-toolbar-breadcrumbs": "awsui_universal-toolbar-
|
|
12
|
-
"universal-toolbar-drawers": "awsui_universal-toolbar-
|
|
13
|
-
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-
|
|
14
|
-
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-
|
|
15
|
-
"drawers-trigger-content": "awsui_drawers-trigger-
|
|
16
|
-
"group-divider": "awsui_group-
|
|
17
|
-
"drawers-trigger": "awsui_drawers-
|
|
18
|
-
"block-body-scroll": "awsui_block-body-
|
|
5
|
+
"universal-toolbar": "awsui_universal-toolbar_1kzri_3aah1_13",
|
|
6
|
+
"with-ai-drawer": "awsui_with-ai-drawer_1kzri_3aah1_32",
|
|
7
|
+
"universal-toolbar-ai-custom": "awsui_universal-toolbar-ai-custom_1kzri_3aah1_32",
|
|
8
|
+
"disable-body-scroll": "awsui_disable-body-scroll_1kzri_3aah1_71",
|
|
9
|
+
"toolbar-container": "awsui_toolbar-container_1kzri_3aah1_124",
|
|
10
|
+
"universal-toolbar-nav": "awsui_universal-toolbar-nav_1kzri_3aah1_144",
|
|
11
|
+
"universal-toolbar-breadcrumbs": "awsui_universal-toolbar-breadcrumbs_1kzri_3aah1_149",
|
|
12
|
+
"universal-toolbar-drawers": "awsui_universal-toolbar-drawers_1kzri_3aah1_158",
|
|
13
|
+
"drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_1kzri_3aah1_166",
|
|
14
|
+
"drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_1kzri_3aah1_167",
|
|
15
|
+
"drawers-trigger-content": "awsui_drawers-trigger-content_1kzri_3aah1_209",
|
|
16
|
+
"group-divider": "awsui_group-divider_1kzri_3aah1_219",
|
|
17
|
+
"drawers-trigger": "awsui_drawers-trigger_1kzri_3aah1_209",
|
|
18
|
+
"block-body-scroll": "awsui_block-body-scroll_1kzri_3aah1_232",
|
|
19
|
+
"external-breadcrumbs": "awsui_external-breadcrumbs_1kzri_3aah1_236"
|
|
19
20
|
};
|
|
20
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"before-main-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQ3D,eAAO,MAAM,oCAAoC,GAAI,mDAIlD,iBAAiB,
|
|
1
|
+
{"version":3,"file":"before-main-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQ3D,eAAO,MAAM,oCAAoC,GAAI,mDAIlD,iBAAiB,gBAwHnB,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,OAAO,iBAAiB,gBAIpE,CAAC;AAEF,eAAO,MAAM,uCAAuC,qBANA,iBAAiB,0CAAjB,iBAAiB,gBASpE,CAAC"}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js
CHANGED
|
@@ -18,14 +18,14 @@ export const BeforeMainSlotImplementationInternal = ({ toolbarProps, appLayoutSt
|
|
|
18
18
|
if (!isWidgetReady(appLayoutState)) {
|
|
19
19
|
return (React.createElement(BeforeMainSlotSkeleton, { toolbarProps: toolbarProps, appLayoutProps: appLayoutProps, appLayoutState: appLayoutState }));
|
|
20
20
|
}
|
|
21
|
-
const { activeDrawer, navigationOpen, navigationCollapsible, navigation, expandedDrawerId, setExpandedDrawerId, navigationAnimationDisabled, activeAiDrawerId, aiDrawerExpandedMode, aiDrawer, activeAiDrawerSize, minAiDrawerSize, maxAiDrawerSize, onActiveAiDrawerResize, aiDrawerFocusControl, ariaLabels, isMobile, drawersOpenQueue, onActiveAiDrawerChange, activeAiDrawer, bottomDrawerReportedSize, featureNotificationsProps, } = appLayoutState.widgetizedState;
|
|
21
|
+
const { activeDrawer, navigationOpen, navigationCollapsible, navigation, expandedDrawerId, setExpandedDrawerId, navigationAnimationDisabled, activeAiDrawerId, aiDrawerExpandedMode, aiDrawer, activeAiDrawerSize, minAiDrawerSize, maxAiDrawerSize, onActiveAiDrawerResize, aiDrawerFocusControl, ariaLabels, isMobile, drawersOpenQueue, onActiveAiDrawerChange, activeAiDrawer, bottomDrawerReportedSize, featureNotificationsProps, breadcrumbsExternallyOwned, reportOwnBreadcrumbsProps, } = appLayoutState.widgetizedState;
|
|
22
22
|
const drawerExpandedMode = !!expandedDrawerId;
|
|
23
23
|
const toolsOpen = !!activeDrawer;
|
|
24
24
|
// Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar
|
|
25
25
|
const drawerExpandedModeInChildLayout = !!(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.expandedDrawerId);
|
|
26
26
|
const { __embeddedViewMode: embeddedViewMode } = appLayoutProps;
|
|
27
27
|
return (React.createElement(React.Fragment, null,
|
|
28
|
-
!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (React.createElement(AppLayoutToolbar, { appLayoutInternals: appLayoutState.appLayoutInternals, toolbarProps: toolbarProps, featureNotificationsProps: featureNotificationsProps })),
|
|
28
|
+
!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (React.createElement(AppLayoutToolbar, { appLayoutInternals: appLayoutState.appLayoutInternals, breadcrumbsExternallyOwned: breadcrumbsExternallyOwned, reportOwnBreadcrumbsProps: reportOwnBreadcrumbsProps, toolbarProps: toolbarProps, featureNotificationsProps: featureNotificationsProps })),
|
|
29
29
|
!toolbarProps && !!activeAiDrawerId && (React.createElement("div", { className: styles['pseudo-toolbar'], style: {
|
|
30
30
|
insetBlockStart: (_b = (_a = appLayoutState.appLayoutInternals) === null || _a === void 0 ? void 0 : _a.verticalOffsets) === null || _b === void 0 ? void 0 : _b.toolbar,
|
|
31
31
|
} },
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gC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AC,MAAM,uCAAuC,GAAG,yBAAyB,CAC9E,4BAA4B,EAC5B,sBAAsB,CACvB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport { AppLayoutGlobalAiDrawerImplementation } from '../drawer/global-ai-drawer';\nimport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';\nimport { isWidgetReady } from '../state/invariants';\nimport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BeforeMainSlotImplementationInternal = ({\n toolbarProps,\n appLayoutState,\n appLayoutProps,\n}: SkeletonPartProps) => {\n const wasAiDrawerOpenRef = useRef(false);\n if (!isWidgetReady(appLayoutState)) {\n return (\n <BeforeMainSlotSkeleton\n toolbarProps={toolbarProps}\n appLayoutProps={appLayoutProps}\n appLayoutState={appLayoutState}\n />\n );\n }\n const {\n activeDrawer,\n navigationOpen,\n navigationCollapsible,\n navigation,\n expandedDrawerId,\n setExpandedDrawerId,\n navigationAnimationDisabled,\n activeAiDrawerId,\n aiDrawerExpandedMode,\n aiDrawer,\n activeAiDrawerSize,\n minAiDrawerSize,\n maxAiDrawerSize,\n onActiveAiDrawerResize,\n aiDrawerFocusControl,\n ariaLabels,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n activeAiDrawer,\n bottomDrawerReportedSize,\n featureNotificationsProps,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar\n const drawerExpandedModeInChildLayout = !!toolbarProps?.expandedDrawerId;\n const { __embeddedViewMode: embeddedViewMode } = appLayoutProps as any;\n return (\n <>\n {!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (\n <AppLayoutToolbar\n appLayoutInternals={appLayoutState.appLayoutInternals}\n toolbarProps={toolbarProps}\n featureNotificationsProps={featureNotificationsProps}\n />\n )}\n {!toolbarProps && !!activeAiDrawerId && (\n <div\n className={styles['pseudo-toolbar']}\n style={{\n insetBlockStart: appLayoutState.appLayoutInternals?.verticalOffsets?.toolbar,\n }}\n >\n <div className={styles['pseudo-toolbar-content']} />\n </div>\n )}\n {aiDrawer && (\n <div\n className={clsx(\n styles['ai-drawer'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && !aiDrawerExpandedMode && styles.hidden\n )}\n >\n <ActiveDrawersContext.Provider value={activeAiDrawer ? [activeAiDrawer.id] : []}>\n {(!!activeAiDrawerId || (aiDrawer?.preserveInactiveContent && wasAiDrawerOpenRef.current)) && (\n <>\n {(wasAiDrawerOpenRef.current = true)}\n <AppLayoutGlobalAiDrawerImplementation\n show={!!activeAiDrawerId}\n activeAiDrawer={aiDrawer ?? null}\n appLayoutInternals={appLayoutState.appLayoutInternals}\n aiDrawerProps={{\n activeAiDrawerSize: activeAiDrawerSize!,\n minAiDrawerSize: minAiDrawerSize!,\n maxAiDrawerSize: maxAiDrawerSize!,\n aiDrawer: aiDrawer!,\n ariaLabels,\n aiDrawerFocusControl,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n onActiveDrawerResize: ({ size }) => onActiveAiDrawerResize(size),\n expandedDrawerId,\n setExpandedDrawerId,\n }}\n />\n </>\n )}\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && (!navigationCollapsible || isMobile) && styles['panel-hidden'],\n !navigationOpen && navigationCollapsible && !isMobile && styles['navigation-collapsed'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"nav\">\n <AppLayoutNavigation\n appLayoutInternals={appLayoutState.appLayoutInternals}\n bottomDrawerReportedSize={bottomDrawerReportedSize}\n navigationCollapsible={navigationCollapsible}\n />\n </AppLayoutBuiltInErrorBoundary>\n </div>\n )}\n </>\n );\n};\n\nexport const BeforeMainSlotImplementation = (props: SkeletonPartProps) => (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"before-main-slot\">\n <BeforeMainSlotImplementationInternal {...props} />\n </AppLayoutBuiltInErrorBoundary>\n);\n\nexport const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(\n BeforeMainSlotImplementation,\n BeforeMainSlotSkeleton\n);\n"]}
|
|
1
|
+
{"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,8BAA8B,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U;wBACV,oBAAoB;wBACpB,QAAQ;wBACR,gBAAgB;wBAChB,sBAAsB;wBACtB,oBAAoB,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC;wBAChE,gBAAgB;wBAChB,mBAAmB;qBACpB,GACD,CACD,CACJ,CAC6B,CAC5B,CACP;QACA,UAAU,IAAI,CACb,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,UAAU,EACjB,CAAC,cAAc,IAAI,CAAC,CAAC,qBAAqB,IAAI,QAAQ,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,EACjF,CAAC,cAAc,IAAI,qBAAqB,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,sBAAsB,CAAC,EACvF,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,CAAC,2BAA2B,IAAI,YAAY,CAAC,wBAAwB,CAAC,EACtE,CAAC,kBAAkB,IAAI,+BAA+B,CAAC,IAAI,MAAM,CAAC,MAAM,CACzE;YAED,oBAAC,6BAA6B,IAAC,aAAa,EAAC,KAAK;gBAChD,oBAAC,mBAAmB,IAClB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,wBAAwB,EAAE,wBAAwB,EAClD,qBAAqB,EAAE,qBAAqB,GAC5C,CAC4B,CAC5B,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAwB,EAAE,EAAE,CAAC,CACxE,oBAAC,6BAA6B,IAAC,aAAa,EAAC,kBAAkB;IAC7D,oBAAC,oCAAoC,OAAK,KAAK,GAAI,CACrB,CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,yBAAyB,CAC9E,4BAA4B,EAC5B,sBAAsB,CACvB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport { AppLayoutGlobalAiDrawerImplementation } from '../drawer/global-ai-drawer';\nimport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';\nimport { isWidgetReady } from '../state/invariants';\nimport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BeforeMainSlotImplementationInternal = ({\n toolbarProps,\n appLayoutState,\n appLayoutProps,\n}: SkeletonPartProps) => {\n const wasAiDrawerOpenRef = useRef(false);\n if (!isWidgetReady(appLayoutState)) {\n return (\n <BeforeMainSlotSkeleton\n toolbarProps={toolbarProps}\n appLayoutProps={appLayoutProps}\n appLayoutState={appLayoutState}\n />\n );\n }\n const {\n activeDrawer,\n navigationOpen,\n navigationCollapsible,\n navigation,\n expandedDrawerId,\n setExpandedDrawerId,\n navigationAnimationDisabled,\n activeAiDrawerId,\n aiDrawerExpandedMode,\n aiDrawer,\n activeAiDrawerSize,\n minAiDrawerSize,\n maxAiDrawerSize,\n onActiveAiDrawerResize,\n aiDrawerFocusControl,\n ariaLabels,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n activeAiDrawer,\n bottomDrawerReportedSize,\n featureNotificationsProps,\n breadcrumbsExternallyOwned,\n reportOwnBreadcrumbsProps,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar\n const drawerExpandedModeInChildLayout = !!toolbarProps?.expandedDrawerId;\n const { __embeddedViewMode: embeddedViewMode } = appLayoutProps as any;\n return (\n <>\n {!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (\n <AppLayoutToolbar\n appLayoutInternals={appLayoutState.appLayoutInternals}\n breadcrumbsExternallyOwned={breadcrumbsExternallyOwned}\n reportOwnBreadcrumbsProps={reportOwnBreadcrumbsProps}\n toolbarProps={toolbarProps}\n featureNotificationsProps={featureNotificationsProps}\n />\n )}\n {!toolbarProps && !!activeAiDrawerId && (\n <div\n className={styles['pseudo-toolbar']}\n style={{\n insetBlockStart: appLayoutState.appLayoutInternals?.verticalOffsets?.toolbar,\n }}\n >\n <div className={styles['pseudo-toolbar-content']} />\n </div>\n )}\n {aiDrawer && (\n <div\n className={clsx(\n styles['ai-drawer'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && !aiDrawerExpandedMode && styles.hidden\n )}\n >\n <ActiveDrawersContext.Provider value={activeAiDrawer ? [activeAiDrawer.id] : []}>\n {(!!activeAiDrawerId || (aiDrawer?.preserveInactiveContent && wasAiDrawerOpenRef.current)) && (\n <>\n {(wasAiDrawerOpenRef.current = true)}\n <AppLayoutGlobalAiDrawerImplementation\n show={!!activeAiDrawerId}\n activeAiDrawer={aiDrawer ?? null}\n appLayoutInternals={appLayoutState.appLayoutInternals}\n aiDrawerProps={{\n activeAiDrawerSize: activeAiDrawerSize!,\n minAiDrawerSize: minAiDrawerSize!,\n maxAiDrawerSize: maxAiDrawerSize!,\n aiDrawer: aiDrawer!,\n ariaLabels,\n aiDrawerFocusControl,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n onActiveDrawerResize: ({ size }) => onActiveAiDrawerResize(size),\n expandedDrawerId,\n setExpandedDrawerId,\n }}\n />\n </>\n )}\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && (!navigationCollapsible || isMobile) && styles['panel-hidden'],\n !navigationOpen && navigationCollapsible && !isMobile && styles['navigation-collapsed'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"nav\">\n <AppLayoutNavigation\n appLayoutInternals={appLayoutState.appLayoutInternals}\n bottomDrawerReportedSize={bottomDrawerReportedSize}\n navigationCollapsible={navigationCollapsible}\n />\n </AppLayoutBuiltInErrorBoundary>\n </div>\n )}\n </>\n );\n};\n\nexport const BeforeMainSlotImplementation = (props: SkeletonPartProps) => (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"before-main-slot\">\n <BeforeMainSlotImplementationInternal {...props} />\n </AppLayoutBuiltInErrorBoundary>\n);\n\nexport const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(\n BeforeMainSlotImplementation,\n BeforeMainSlotSkeleton\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/implementation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/implementation.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAqFrE,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,EAC7G,KAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,kCAAkC,EAClC,GAAG,KAAK,EACT,EAAE,4BAA4B,CAAC,CAAC,CAAC,eAmLjC;AAED,eAAO,MAAM,+BAA+B,qGAG3C,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useContainerQuery } from '@cloudscape-design/component-toolkit';
|
|
6
6
|
import { getLogicalBoundingClientRect, isThemeActive, Theme, useMergeRefs, } from '@cloudscape-design/component-toolkit/internal';
|
|
7
7
|
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
8
|
+
import { BreadcrumbsSlotContext } from '../app-layout/visual-refresh-toolbar/contexts';
|
|
8
9
|
import { InternalButton } from '../button/internal';
|
|
9
10
|
import InternalButtonDropdown from '../button-dropdown/internal';
|
|
10
11
|
import { useInternalI18n } from '../i18n/context';
|
|
@@ -53,6 +54,34 @@ const areArrayEqual = (first, second) => {
|
|
|
53
54
|
return first.every((item, index) => item === second[index]);
|
|
54
55
|
};
|
|
55
56
|
export function BreadcrumbGroupImplementation({ items = [], ariaLabel, expandAriaLabel, onClick, onFollow, __internalRootRef, __injectAnalyticsComponentMetadata, ...props }) {
|
|
57
|
+
var _a;
|
|
58
|
+
const { reportOwnBreadcrumbsProps } = (_a = useContext(BreadcrumbsSlotContext)) !== null && _a !== void 0 ? _a : {};
|
|
59
|
+
const reportedProps = {
|
|
60
|
+
...props,
|
|
61
|
+
items,
|
|
62
|
+
ariaLabel,
|
|
63
|
+
expandAriaLabel,
|
|
64
|
+
onClick,
|
|
65
|
+
onFollow,
|
|
66
|
+
};
|
|
67
|
+
const breadcrumbsReportingRef = useRef(null);
|
|
68
|
+
useLayoutEffect(() => {
|
|
69
|
+
if (!reportOwnBreadcrumbsProps) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const reporting = reportOwnBreadcrumbsProps(reportedProps);
|
|
73
|
+
breadcrumbsReportingRef.current = reporting;
|
|
74
|
+
return () => {
|
|
75
|
+
breadcrumbsReportingRef.current = null;
|
|
76
|
+
reporting.cleanup();
|
|
77
|
+
};
|
|
78
|
+
// Prop updates are handled by the following layout effect.
|
|
79
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
80
|
+
}, [reportOwnBreadcrumbsProps]);
|
|
81
|
+
useLayoutEffect(() => {
|
|
82
|
+
var _a;
|
|
83
|
+
(_a = breadcrumbsReportingRef.current) === null || _a === void 0 ? void 0 : _a.update(reportedProps);
|
|
84
|
+
});
|
|
56
85
|
for (const item of items) {
|
|
57
86
|
checkSafeUrl('BreadcrumbGroup', item.href);
|
|
58
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/implementation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EACL,4BAA4B,EAC5B,aAAa,EACb,KAAK,EACL,YAAY,GACb,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,gBAAgB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E,GAAG,6BAA6B,CAAC;oBAC/B,SAAS,EAAE,0BAA0B;iBACtC,CAAC;aACH;YACH,CAAC,CAAC,EAAE,CAAC;QAEN,SAAS,GAAG,CAAC,IAAI,SAAS,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACjD,oBAAC,gBAAgB,IACf,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,CAAC,CAAC,EAAE,CACf,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE;gBAC7C,mBAAmB,CAAC,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAElE,YAAY,EAAE,CAAC,CAAC,EAAE,CAChB,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE;gBAC7C,mBAAmB,CAAC,QAAQ,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAEnE,CACH,CAAC,CAAC,CAAC,CACF,4BAAI,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,IAAG,eAAe,CAAM,CACvE;QACD,4BAAI,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,iBAAe,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,IAChG,qBAAqB,CACnB,CACD,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,yBAAyB,CACtE,6BAA6B,EAC7B,uBAAuB,CACxB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport {\n getLogicalBoundingClientRect,\n isThemeActive,\n Theme,\n useMergeRefs,\n} from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { CustomTriggerProps, LinkItem } from '../button-dropdown/interfaces';\nimport InternalButtonDropdown from '../button-dropdown/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent } from '../internal/events';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport { AllItemsDropdown } from './all-items-dropdown';\nimport {\n GeneratedAnalyticsMetadataBreadcrumbGroupClick,\n GeneratedAnalyticsMetadataBreadcrumbGroupComponent,\n} from './analytics-metadata/interfaces';\nimport { BreadcrumbGroupProps, EllipsisDropdownProps } from './interfaces';\nimport { InternalBreadcrumbGroupProps } from './internal-interfaces';\nimport { BreadcrumbItem } from './item/item';\nimport { BreadcrumbGroupSkeleton } from './skeleton';\nimport { getEventDetail, getItemsDisplayProperties } from './utils';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\n/**\n * Provided for backwards compatibility\n */\nconst DEFAULT_EXPAND_ARIA_LABEL = 'Show path';\n\nconst getEllipsisDropdownTrigger = ({ ariaLabel, triggerRef, testUtilsClass, isOpen, onClick }: CustomTriggerProps) => {\n return (\n <InternalButton\n ref={triggerRef}\n className={testUtilsClass}\n onClick={event => {\n event.preventDefault();\n onClick();\n }}\n ariaExpanded={isOpen}\n aria-haspopup={true}\n ariaLabel={ariaLabel}\n variant=\"breadcrumb-group\"\n formAction=\"none\"\n >\n ...\n </InternalButton>\n );\n};\n\nconst EllipsisDropdown = ({\n ariaLabel,\n dropdownItems,\n onDropdownItemClick,\n onDropdownItemFollow,\n visible,\n}: EllipsisDropdownProps) => {\n const i18n = useInternalI18n('breadcrumb-group');\n\n return (\n <li className={clsx(styles.ellipsis, visible && styles.visible)}>\n <InternalButtonDropdown\n ariaLabel={i18n('expandAriaLabel', ariaLabel) ?? DEFAULT_EXPAND_ARIA_LABEL}\n items={dropdownItems}\n onItemClick={onDropdownItemClick}\n onItemFollow={onDropdownItemFollow}\n customTriggerBuilder={getEllipsisDropdownTrigger}\n linkStyle={true}\n analyticsMetadataTransformer={metadata => {\n if (metadata.detail?.id) {\n delete metadata.detail.id;\n }\n if (metadata.detail?.position) {\n metadata.detail.position = `${parseInt(metadata.detail.position as string, 10) + 1}`;\n }\n return metadata;\n }}\n />\n <span className={styles.icon}>\n <InternalIcon name={isThemeActive(Theme.OneTheme) ? 'slash-divider' : 'angle-right'} />\n </span>\n </li>\n );\n};\n\ninterface ItemsRefsType {\n ghost: Record<string, HTMLLIElement>;\n real: Record<string, HTMLLIElement>;\n}\n\ninterface ItemsWidthsType {\n ghost: Array<number>;\n real: Array<number>;\n}\n\nconst areArrayEqual = (first: Array<number>, second: Array<number>) => {\n if (first.length !== second.length) {\n return false;\n }\n return first.every((item, index) => item === second[index]);\n};\n\nexport function BreadcrumbGroupImplementation<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>({\n items = [],\n ariaLabel,\n expandAriaLabel,\n onClick,\n onFollow,\n __internalRootRef,\n __injectAnalyticsComponentMetadata,\n ...props\n}: InternalBreadcrumbGroupProps<T>) {\n for (const item of items) {\n checkSafeUrl('BreadcrumbGroup', item.href);\n }\n const baseProps = getBaseProps(props);\n const [navWidth, navRef] = useContainerQuery<number>(rect => rect.borderBoxWidth);\n const mergedRef = useMergeRefs(navRef, __internalRootRef);\n\n const itemsRefs = useRef<ItemsRefsType>({ ghost: {}, real: {} });\n const setBreadcrumb = (type: keyof ItemsRefsType, index: string, node: null | HTMLLIElement) => {\n if (node) {\n itemsRefs.current[type][index] = node;\n } else {\n delete itemsRefs.current[type][index];\n }\n };\n\n const [itemsWidths, setItemsWidths] = useState<ItemsWidthsType>({ ghost: [], real: [] });\n\n useEffect(() => {\n if (itemsRefs.current) {\n const newItemsWidths: ItemsWidthsType = { ghost: [], real: [] };\n for (const node of Object.values(itemsRefs.current.ghost)) {\n const width = getLogicalBoundingClientRect(node).inlineSize;\n newItemsWidths.ghost.push(width);\n }\n for (const node of Object.values(itemsRefs.current.real)) {\n const width = getLogicalBoundingClientRect(node).inlineSize;\n newItemsWidths.real.push(width);\n }\n setItemsWidths(oldWidths => {\n if (\n !areArrayEqual(newItemsWidths.ghost, oldWidths.ghost) ||\n !areArrayEqual(newItemsWidths.real, oldWidths.real)\n ) {\n return newItemsWidths;\n } else {\n return oldWidths;\n }\n });\n }\n }, [items, navWidth]);\n\n const { collapsed } = getItemsDisplayProperties(itemsWidths.ghost, navWidth);\n\n let breadcrumbItems = items.map((item, index) => {\n const isLast = index === items.length - 1;\n const isDisplayed = index === 0 || index > collapsed;\n\n const clickAnalyticsMetadata: GeneratedAnalyticsMetadataBreadcrumbGroupClick = {\n action: 'click',\n detail: {\n position: `${index + 1}`,\n label: `.${analyticsSelectors['breadcrumb-item']}`,\n href: item.href || '',\n },\n };\n return (\n <li\n className={clsx(styles.item, !isDisplayed && styles.hide)}\n key={index}\n {...(isLast ? {} : getAnalyticsMetadataAttribute(clickAnalyticsMetadata))}\n ref={node => setBreadcrumb('real', `${index}`, node)}\n >\n <BreadcrumbItem\n item={item}\n onClick={onClick}\n onFollow={onFollow}\n itemIndex={index}\n totalCount={items.length}\n isTruncated={itemsWidths.ghost[index] - itemsWidths.real[index] > 0}\n />\n </li>\n );\n });\n\n const hiddenBreadcrumbItems = items.map((item, index) => (\n <li className={styles['ghost-item']} key={index} ref={node => setBreadcrumb('ghost', `${index}`, node)}>\n <BreadcrumbItem item={item} itemIndex={index} totalCount={items.length} isGhost={true} />\n </li>\n ));\n\n const getEventItem = (e: CustomEvent<{ id: string }>) => {\n const { id } = e.detail;\n return items[parseInt(id)];\n };\n\n // Add ellipsis\n if (breadcrumbItems.length >= 2) {\n const dropdownItems: Array<LinkItem> = items\n .slice(1, 1 + collapsed)\n .map((item: BreadcrumbGroupProps.Item, index: number) => ({\n id: (index + 1).toString(), // the first item doesn't get inside dropdown\n text: item.text,\n href: item.href || '#',\n }));\n\n breadcrumbItems = [\n breadcrumbItems[0],\n <EllipsisDropdown\n key={'ellipsis'}\n visible={collapsed > 0}\n ariaLabel={expandAriaLabel}\n dropdownItems={dropdownItems}\n onDropdownItemClick={e => fireCancelableEvent(onClick, getEventDetail(getEventItem(e)), e)}\n onDropdownItemFollow={e => fireCancelableEvent(onFollow, getEventDetail(getEventItem(e)), e)}\n />,\n ...breadcrumbItems.slice(1),\n ];\n }\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataBreadcrumbGroupComponent = {\n name: 'awsui.BreadcrumbGroup',\n label: { root: 'self' },\n };\n\n return (\n <nav\n {...baseProps}\n className={clsx(styles['breadcrumb-group'], baseProps.className)}\n aria-label={ariaLabel || undefined}\n ref={mergedRef}\n {...(__injectAnalyticsComponentMetadata\n ? {\n ...getAnalyticsMetadataAttribute({\n component: componentAnalyticsMetadata,\n }),\n }\n : {})}\n >\n {collapsed > 0 && collapsed === items.length - 1 ? (\n <AllItemsDropdown\n items={items}\n onItemClick={e =>\n e.detail.id !== (items.length - 1).toString() &&\n fireCancelableEvent(onClick, getEventDetail(getEventItem(e)), e)\n }\n onItemFollow={e =>\n e.detail.id !== (items.length - 1).toString() &&\n fireCancelableEvent(onFollow, getEventDetail(getEventItem(e)), e)\n }\n />\n ) : (\n <ol className={styles['breadcrumb-group-list']}>{breadcrumbItems}</ol>\n )}\n <ol className={clsx(styles['breadcrumb-group-list'], styles.ghost)} aria-hidden={true} tabIndex={-1}>\n {hiddenBreadcrumbItems}\n </ol>\n </nav>\n );\n}\n\nexport const createWidgetizedBreadcrumbGroup = createWidgetizedComponent(\n BreadcrumbGroupImplementation,\n BreadcrumbGroupSkeleton\n);\n"]}
|
|
1
|
+
{"version":3,"file":"implementation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AAG,eAAe,CAAM,CACvE;QACD,4BAAI,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,iBAAe,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,IAChG,qBAAqB,CACnB,CACD,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,yBAAyB,CACtE,6BAA6B,EAC7B,uBAAuB,CACxB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport {\n getLogicalBoundingClientRect,\n isThemeActive,\n Theme,\n useMergeRefs,\n} from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { BreadcrumbsSlotContext } from '../app-layout/visual-refresh-toolbar/contexts';\nimport { InternalButton } from '../button/internal';\nimport { CustomTriggerProps, LinkItem } from '../button-dropdown/interfaces';\nimport InternalButtonDropdown from '../button-dropdown/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent } from '../internal/events';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport { AllItemsDropdown } from './all-items-dropdown';\nimport {\n GeneratedAnalyticsMetadataBreadcrumbGroupClick,\n GeneratedAnalyticsMetadataBreadcrumbGroupComponent,\n} from './analytics-metadata/interfaces';\nimport { BreadcrumbGroupProps, EllipsisDropdownProps } from './interfaces';\nimport { InternalBreadcrumbGroupProps } from './internal-interfaces';\nimport { BreadcrumbItem } from './item/item';\nimport { BreadcrumbGroupSkeleton } from './skeleton';\nimport { getEventDetail, getItemsDisplayProperties } from './utils';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\n/**\n * Provided for backwards compatibility\n */\nconst DEFAULT_EXPAND_ARIA_LABEL = 'Show path';\n\nconst getEllipsisDropdownTrigger = ({ ariaLabel, triggerRef, testUtilsClass, isOpen, onClick }: CustomTriggerProps) => {\n return (\n <InternalButton\n ref={triggerRef}\n className={testUtilsClass}\n onClick={event => {\n event.preventDefault();\n onClick();\n }}\n ariaExpanded={isOpen}\n aria-haspopup={true}\n ariaLabel={ariaLabel}\n variant=\"breadcrumb-group\"\n formAction=\"none\"\n >\n ...\n </InternalButton>\n );\n};\n\nconst EllipsisDropdown = ({\n ariaLabel,\n dropdownItems,\n onDropdownItemClick,\n onDropdownItemFollow,\n visible,\n}: EllipsisDropdownProps) => {\n const i18n = useInternalI18n('breadcrumb-group');\n\n return (\n <li className={clsx(styles.ellipsis, visible && styles.visible)}>\n <InternalButtonDropdown\n ariaLabel={i18n('expandAriaLabel', ariaLabel) ?? DEFAULT_EXPAND_ARIA_LABEL}\n items={dropdownItems}\n onItemClick={onDropdownItemClick}\n onItemFollow={onDropdownItemFollow}\n customTriggerBuilder={getEllipsisDropdownTrigger}\n linkStyle={true}\n analyticsMetadataTransformer={metadata => {\n if (metadata.detail?.id) {\n delete metadata.detail.id;\n }\n if (metadata.detail?.position) {\n metadata.detail.position = `${parseInt(metadata.detail.position as string, 10) + 1}`;\n }\n return metadata;\n }}\n />\n <span className={styles.icon}>\n <InternalIcon name={isThemeActive(Theme.OneTheme) ? 'slash-divider' : 'angle-right'} />\n </span>\n </li>\n );\n};\n\ninterface ItemsRefsType {\n ghost: Record<string, HTMLLIElement>;\n real: Record<string, HTMLLIElement>;\n}\n\ninterface ItemsWidthsType {\n ghost: Array<number>;\n real: Array<number>;\n}\n\nconst areArrayEqual = (first: Array<number>, second: Array<number>) => {\n if (first.length !== second.length) {\n return false;\n }\n return first.every((item, index) => item === second[index]);\n};\n\nexport function BreadcrumbGroupImplementation<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>({\n items = [],\n ariaLabel,\n expandAriaLabel,\n onClick,\n onFollow,\n __internalRootRef,\n __injectAnalyticsComponentMetadata,\n ...props\n}: InternalBreadcrumbGroupProps<T>) {\n const { reportOwnBreadcrumbsProps } = useContext(BreadcrumbsSlotContext) ?? {};\n const reportedProps = {\n ...props,\n items,\n ariaLabel,\n expandAriaLabel,\n onClick,\n onFollow,\n } as BreadcrumbGroupProps;\n const breadcrumbsReportingRef = useRef<ReturnType<NonNullable<typeof reportOwnBreadcrumbsProps>> | null>(null);\n\n useLayoutEffect(() => {\n if (!reportOwnBreadcrumbsProps) {\n return;\n }\n const reporting = reportOwnBreadcrumbsProps(reportedProps);\n breadcrumbsReportingRef.current = reporting;\n return () => {\n breadcrumbsReportingRef.current = null;\n reporting.cleanup();\n };\n // Prop updates are handled by the following layout effect.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [reportOwnBreadcrumbsProps]);\n\n useLayoutEffect(() => {\n breadcrumbsReportingRef.current?.update(reportedProps);\n });\n\n for (const item of items) {\n checkSafeUrl('BreadcrumbGroup', item.href);\n }\n const baseProps = getBaseProps(props);\n const [navWidth, navRef] = useContainerQuery<number>(rect => rect.borderBoxWidth);\n const mergedRef = useMergeRefs(navRef, __internalRootRef);\n\n const itemsRefs = useRef<ItemsRefsType>({ ghost: {}, real: {} });\n const setBreadcrumb = (type: keyof ItemsRefsType, index: string, node: null | HTMLLIElement) => {\n if (node) {\n itemsRefs.current[type][index] = node;\n } else {\n delete itemsRefs.current[type][index];\n }\n };\n\n const [itemsWidths, setItemsWidths] = useState<ItemsWidthsType>({ ghost: [], real: [] });\n\n useEffect(() => {\n if (itemsRefs.current) {\n const newItemsWidths: ItemsWidthsType = { ghost: [], real: [] };\n for (const node of Object.values(itemsRefs.current.ghost)) {\n const width = getLogicalBoundingClientRect(node).inlineSize;\n newItemsWidths.ghost.push(width);\n }\n for (const node of Object.values(itemsRefs.current.real)) {\n const width = getLogicalBoundingClientRect(node).inlineSize;\n newItemsWidths.real.push(width);\n }\n setItemsWidths(oldWidths => {\n if (\n !areArrayEqual(newItemsWidths.ghost, oldWidths.ghost) ||\n !areArrayEqual(newItemsWidths.real, oldWidths.real)\n ) {\n return newItemsWidths;\n } else {\n return oldWidths;\n }\n });\n }\n }, [items, navWidth]);\n\n const { collapsed } = getItemsDisplayProperties(itemsWidths.ghost, navWidth);\n\n let breadcrumbItems = items.map((item, index) => {\n const isLast = index === items.length - 1;\n const isDisplayed = index === 0 || index > collapsed;\n\n const clickAnalyticsMetadata: GeneratedAnalyticsMetadataBreadcrumbGroupClick = {\n action: 'click',\n detail: {\n position: `${index + 1}`,\n label: `.${analyticsSelectors['breadcrumb-item']}`,\n href: item.href || '',\n },\n };\n return (\n <li\n className={clsx(styles.item, !isDisplayed && styles.hide)}\n key={index}\n {...(isLast ? {} : getAnalyticsMetadataAttribute(clickAnalyticsMetadata))}\n ref={node => setBreadcrumb('real', `${index}`, node)}\n >\n <BreadcrumbItem\n item={item}\n onClick={onClick}\n onFollow={onFollow}\n itemIndex={index}\n totalCount={items.length}\n isTruncated={itemsWidths.ghost[index] - itemsWidths.real[index] > 0}\n />\n </li>\n );\n });\n\n const hiddenBreadcrumbItems = items.map((item, index) => (\n <li className={styles['ghost-item']} key={index} ref={node => setBreadcrumb('ghost', `${index}`, node)}>\n <BreadcrumbItem item={item} itemIndex={index} totalCount={items.length} isGhost={true} />\n </li>\n ));\n\n const getEventItem = (e: CustomEvent<{ id: string }>) => {\n const { id } = e.detail;\n return items[parseInt(id)];\n };\n\n // Add ellipsis\n if (breadcrumbItems.length >= 2) {\n const dropdownItems: Array<LinkItem> = items\n .slice(1, 1 + collapsed)\n .map((item: BreadcrumbGroupProps.Item, index: number) => ({\n id: (index + 1).toString(), // the first item doesn't get inside dropdown\n text: item.text,\n href: item.href || '#',\n }));\n\n breadcrumbItems = [\n breadcrumbItems[0],\n <EllipsisDropdown\n key={'ellipsis'}\n visible={collapsed > 0}\n ariaLabel={expandAriaLabel}\n dropdownItems={dropdownItems}\n onDropdownItemClick={e => fireCancelableEvent(onClick, getEventDetail(getEventItem(e)), e)}\n onDropdownItemFollow={e => fireCancelableEvent(onFollow, getEventDetail(getEventItem(e)), e)}\n />,\n ...breadcrumbItems.slice(1),\n ];\n }\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataBreadcrumbGroupComponent = {\n name: 'awsui.BreadcrumbGroup',\n label: { root: 'self' },\n };\n\n return (\n <nav\n {...baseProps}\n className={clsx(styles['breadcrumb-group'], baseProps.className)}\n aria-label={ariaLabel || undefined}\n ref={mergedRef}\n {...(__injectAnalyticsComponentMetadata\n ? {\n ...getAnalyticsMetadataAttribute({\n component: componentAnalyticsMetadata,\n }),\n }\n : {})}\n >\n {collapsed > 0 && collapsed === items.length - 1 ? (\n <AllItemsDropdown\n items={items}\n onItemClick={e =>\n e.detail.id !== (items.length - 1).toString() &&\n fireCancelableEvent(onClick, getEventDetail(getEventItem(e)), e)\n }\n onItemFollow={e =>\n e.detail.id !== (items.length - 1).toString() &&\n fireCancelableEvent(onFollow, getEventDetail(getEventItem(e)), e)\n }\n />\n ) : (\n <ol className={styles['breadcrumb-group-list']}>{breadcrumbItems}</ol>\n )}\n <ol className={clsx(styles['breadcrumb-group-list'], styles.ghost)} aria-hidden={true} tabIndex={-1}>\n {hiddenBreadcrumbItems}\n </ol>\n </nav>\n );\n}\n\nexport const createWidgetizedBreadcrumbGroup = createWidgetizedComponent(\n BreadcrumbGroupImplementation,\n BreadcrumbGroupSkeleton\n);\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ContainerProps } from './interfaces';
|
|
2
3
|
export { ContainerProps };
|
|
3
|
-
|
|
4
|
+
declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<ContainerProps.Ref>>;
|
|
5
|
+
export default Container;
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,QAAA,MAAM,SAAS,2FAqDd,CAAC;AAGF,eAAe,SAAS,CAAC"}
|
|
@@ -9,7 +9,7 @@ import useBaseComponent from '../internal/hooks/use-base-component';
|
|
|
9
9
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
10
10
|
import { getExternalProps } from '../internal/utils/external-props';
|
|
11
11
|
import { InternalContainerAsSubstep } from './internal';
|
|
12
|
-
|
|
12
|
+
const Container = React.forwardRef(({ variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, fitHeight = false, ...props }, ref) => {
|
|
13
13
|
const analyticsMetadata = getAnalyticsMetadataProps(props);
|
|
14
14
|
const baseComponentProps = useBaseComponent('Container', {
|
|
15
15
|
props: {
|
|
@@ -28,7 +28,8 @@ export default function Container({ variant = 'default', disableHeaderPaddings =
|
|
|
28
28
|
label: { root: 'self' },
|
|
29
29
|
};
|
|
30
30
|
return (React.createElement(AnalyticsFunnelSubStep, { subStepIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, subStepErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext },
|
|
31
|
-
React.createElement(InternalContainerAsSubstep, { variant: variant, disableContentPaddings: disableContentPaddings, disableHeaderPaddings: disableHeaderPaddings, fitHeight: fitHeight, ...props, ...externalProps, ...baseComponentProps, ...getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata }) })));
|
|
32
|
-
}
|
|
31
|
+
React.createElement(InternalContainerAsSubstep, { ref: ref, variant: variant, disableContentPaddings: disableContentPaddings, disableHeaderPaddings: disableHeaderPaddings, fitHeight: fitHeight, ...props, ...externalProps, ...baseComponentProps, ...getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata }) })));
|
|
32
|
+
});
|
|
33
33
|
applyDisplayName(Container, 'Container');
|
|
34
|
+
export default Container;
|
|
34
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/container/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAkC,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvG,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAIxD,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/container/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAkC,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvG,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCA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,0BAA0B,EAAE,CAAC,GAC5E,CACqB,CAC1B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACzC,eAAe,SAAS,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 { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { GeneratedAnalyticsMetadataContainerComponent } from './analytics-metadata/interfaces';\nimport { ContainerProps } from './interfaces';\nimport { InternalContainerAsSubstep } from './internal';\n\nexport { ContainerProps };\n\nconst Container = React.forwardRef(\n (\n {\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n fitHeight = false,\n ...props\n }: ContainerProps,\n ref: React.Ref<ContainerProps.Ref>\n ) => {\n const analyticsMetadata = getAnalyticsMetadataProps(props as BasePropsWithAnalyticsMetadata);\n const baseComponentProps = useBaseComponent(\n 'Container',\n {\n props: {\n disableContentPaddings,\n disableHeaderPaddings,\n fitHeight,\n variant,\n },\n metadata: {\n hasInstanceIdentifier: Boolean(analyticsMetadata?.instanceIdentifier),\n },\n },\n analyticsMetadata\n );\n const externalProps = getExternalProps(props);\n\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataContainerComponent = {\n name: 'awsui.Container',\n label: { root: 'self' },\n };\n\n return (\n <AnalyticsFunnelSubStep\n subStepIdentifier={analyticsMetadata?.instanceIdentifier}\n subStepErrorContext={analyticsMetadata?.errorContext}\n >\n <InternalContainerAsSubstep\n ref={ref}\n variant={variant}\n disableContentPaddings={disableContentPaddings}\n disableHeaderPaddings={disableHeaderPaddings}\n fitHeight={fitHeight}\n {...props}\n {...externalProps}\n {...baseComponentProps}\n {...getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata })}\n />\n </AnalyticsFunnelSubStep>\n );\n }\n);\n\napplyDisplayName(Container, 'Container');\nexport default Container;\n"]}
|
|
@@ -75,6 +75,13 @@ export interface ContainerProps extends BaseComponentProps {
|
|
|
75
75
|
style?: ContainerProps.Style;
|
|
76
76
|
}
|
|
77
77
|
export declare namespace ContainerProps {
|
|
78
|
+
interface Ref {
|
|
79
|
+
/**
|
|
80
|
+
* Sets focus on the container and scrolls it into view. Use this to move the user's focus to a
|
|
81
|
+
* container programmatically, for example in "jump to item" or deep-linking patterns.
|
|
82
|
+
*/
|
|
83
|
+
focus(): void;
|
|
84
|
+
}
|
|
78
85
|
interface AnalyticsMetadata {
|
|
79
86
|
instanceIdentifier?: string;
|
|
80
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CA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AAO,EAAE,KAAK,CAAC,SAAS,CAAC;QAEzB;;WAEG;QACH,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;QAE1B;;;;;;WAMG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAExB;;;;;;WAMG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC1B;IAED,UAAiB,KAAK;QACpB,IAAI,CAAC,EAAE;YACL,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;QACF,OAAO,CAAC,EAAE;YACR,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,MAAM,CAAC,EAAE;YACP,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,MAAM,CAAC,EAAE;YACP,IAAI,EAAE;gBACJ,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,aAAa,CAAC,EAAE,MAAM,CAAC;aACxB,CAAC;YACF,OAAO,EAAE;gBACP,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;SACH,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../types/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n\n /**\n * An object containing CSS properties to customize the container's visual appearance.\n * Refer to the [style](/components/container/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: ContainerProps.Style;\n}\n\nexport namespace ContainerProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: string;\n color?: string;\n };\n content?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n header?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n footer?: {\n root: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n divider: {\n borderColor?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../types/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n\n /**\n * An object containing CSS properties to customize the container's visual appearance.\n * Refer to the [style](/components/container/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: ContainerProps.Style;\n}\n\nexport namespace ContainerProps {\n export interface Ref {\n /**\n * Sets focus on the container and scrolls it into view. Use this to move the user's focus to a\n * container programmatically, for example in \"jump to item\" or deep-linking patterns.\n */\n focus(): void;\n }\n\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: string;\n color?: string;\n };\n content?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n header?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n footer?: {\n root: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n divider: {\n borderColor?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
|
|
@@ -27,6 +27,7 @@ export interface InternalContainerProps extends Omit<ContainerProps, 'variant'>,
|
|
|
27
27
|
*/
|
|
28
28
|
__contentKey?: string;
|
|
29
29
|
}
|
|
30
|
-
export declare
|
|
31
|
-
|
|
30
|
+
export declare const InternalContainerAsSubstep: React.ForwardRefExoticComponent<InternalContainerProps & React.RefAttributes<ContainerProps.Ref>>;
|
|
31
|
+
declare const InternalContainer: React.ForwardRefExoticComponent<InternalContainerProps & React.RefAttributes<ContainerProps.Ref>>;
|
|
32
|
+
export default InternalContainer;
|
|
32
33
|
//# sourceMappingURL=internal.d.ts.map
|