@cloudscape-design/components 3.0.125 → 3.0.127
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/annotation-context/annotation/annotation-popover.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-popover.js +8 -2
- package/annotation-context/annotation/annotation-popover.js.map +1 -1
- package/annotation-context/annotation/annotation-trigger.d.ts +2 -0
- package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-trigger.js +2 -2
- package/annotation-context/annotation/annotation-trigger.js.map +1 -1
- package/annotation-context/annotation/closed-annotation.d.ts +3 -1
- package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
- package/annotation-context/annotation/closed-annotation.js +2 -2
- package/annotation-context/annotation/closed-annotation.js.map +1 -1
- package/annotation-context/annotation/open-annotation.d.ts.map +1 -1
- package/annotation-context/annotation/open-annotation.js +1 -1
- package/annotation-context/annotation/open-annotation.js.map +1 -1
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +30 -30
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/annotation-context/index.d.ts.map +1 -1
- package/annotation-context/index.js +3 -1
- package/annotation-context/index.js.map +1 -1
- package/annotation-context/interfaces.d.ts +1 -1
- package/annotation-context/interfaces.d.ts.map +1 -1
- package/annotation-context/interfaces.js.map +1 -1
- package/app-layout/visual-refresh/main.d.ts.map +1 -1
- package/app-layout/visual-refresh/main.js +8 -3
- package/app-layout/visual-refresh/main.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +60 -60
- package/app-layout/visual-refresh/styles.scoped.css +255 -237
- package/app-layout/visual-refresh/styles.selectors.js +60 -60
- package/area-chart/internal.d.ts.map +1 -1
- package/area-chart/internal.js +5 -0
- package/area-chart/internal.js.map +1 -1
- package/area-chart/model/index.d.ts +1 -0
- package/area-chart/model/index.d.ts.map +1 -1
- package/area-chart/model/index.js.map +1 -1
- package/area-chart/model/use-chart-model.d.ts.map +1 -1
- package/area-chart/model/use-chart-model.js +8 -1
- package/area-chart/model/use-chart-model.js.map +1 -1
- package/attribute-editor/row.d.ts.map +1 -1
- package/attribute-editor/row.js +4 -3
- package/attribute-editor/row.js.map +1 -1
- package/attribute-editor/styles.css.js +13 -12
- package/attribute-editor/styles.scoped.css +27 -23
- package/attribute-editor/styles.selectors.js +13 -12
- package/breadcrumb-group/interfaces.d.ts +1 -0
- package/breadcrumb-group/interfaces.d.ts.map +1 -1
- package/breadcrumb-group/interfaces.js.map +1 -1
- package/breadcrumb-group/internal.d.ts.map +1 -1
- package/breadcrumb-group/internal.js +1 -1
- package/breadcrumb-group/internal.js.map +1 -1
- package/breadcrumb-group/item/item.d.ts +1 -1
- package/breadcrumb-group/item/item.d.ts.map +1 -1
- package/breadcrumb-group/item/item.js +68 -8
- package/breadcrumb-group/item/item.js.map +1 -1
- package/breadcrumb-group/item/styles.css.js +9 -7
- package/breadcrumb-group/item/styles.scoped.css +26 -16
- package/breadcrumb-group/item/styles.selectors.js +9 -7
- package/code-editor/index.d.ts.map +1 -1
- package/code-editor/index.js +11 -16
- package/code-editor/index.js.map +1 -1
- package/code-editor/interfaces.d.ts +12 -1
- package/code-editor/interfaces.d.ts.map +1 -1
- package/code-editor/interfaces.js.map +1 -1
- package/code-editor/status-bar.d.ts.map +1 -1
- package/code-editor/status-bar.js +7 -1
- package/code-editor/status-bar.js.map +1 -1
- package/code-editor/util.js +1 -1
- package/code-editor/util.js.map +1 -1
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +7 -4
- package/container/internal.js.map +1 -1
- package/date-range-picker/calendar/grids/index.d.ts +0 -1
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js +2 -14
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/index.d.ts +6 -4
- package/date-range-picker/calendar/index.d.ts.map +1 -1
- package/date-range-picker/calendar/index.js +111 -123
- package/date-range-picker/calendar/index.js.map +1 -1
- package/date-range-picker/calendar/utils.d.ts +4 -0
- package/date-range-picker/calendar/utils.d.ts.map +1 -0
- package/date-range-picker/calendar/utils.js +31 -0
- package/date-range-picker/calendar/utils.js.map +1 -0
- package/date-range-picker/dropdown.d.ts +2 -1
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +8 -6
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/index.d.ts.map +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/interfaces.d.ts +14 -4
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/date-range-picker/styles.css.js +38 -38
- package/date-range-picker/styles.scoped.css +45 -50
- package/date-range-picker/styles.selectors.js +38 -38
- package/date-range-picker/utils.d.ts +2 -8
- package/date-range-picker/utils.d.ts.map +1 -1
- package/date-range-picker/utils.js +17 -12
- package/date-range-picker/utils.js.map +1 -1
- package/flashbar/styles.css.js +33 -33
- package/flashbar/styles.scoped.css +121 -121
- package/flashbar/styles.selectors.js +33 -33
- package/internal/components/dropdown/index.d.ts.map +1 -1
- package/internal/components/dropdown/index.js +2 -9
- package/internal/components/dropdown/index.js.map +1 -1
- package/internal/components/dropdown-status/index.d.ts +1 -4
- package/internal/components/dropdown-status/index.d.ts.map +1 -1
- package/internal/components/dropdown-status/index.js +3 -5
- package/internal/components/dropdown-status/index.js.map +1 -1
- package/internal/components/filtering-token/index.d.ts +2 -1
- package/internal/components/filtering-token/index.d.ts.map +1 -1
- package/internal/components/filtering-token/index.js +2 -2
- package/internal/components/filtering-token/index.js.map +1 -1
- package/internal/components/option/index.js +4 -4
- package/internal/components/option/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +27 -26
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/hooks/use-analytics/index.d.ts +2 -0
- package/internal/hooks/use-analytics/index.d.ts.map +1 -0
- package/internal/hooks/use-analytics/index.js +16 -0
- package/internal/hooks/use-analytics/index.js.map +1 -0
- package/internal/manifest.json +1 -1
- package/internal/utils/date-time/format-date-time.d.ts +2 -0
- package/internal/utils/date-time/format-date-time.d.ts.map +1 -0
- package/internal/utils/date-time/format-date-time.js +8 -0
- package/internal/utils/date-time/format-date-time.js.map +1 -0
- package/internal/utils/date-time/index.d.ts +2 -1
- package/internal/utils/date-time/index.d.ts.map +1 -1
- package/internal/utils/date-time/index.js +2 -1
- package/internal/utils/date-time/index.js.map +1 -1
- package/internal/utils/date-time/join-date-time.d.ts +4 -0
- package/internal/utils/date-time/join-date-time.d.ts.map +1 -1
- package/internal/utils/date-time/join-date-time.js +4 -0
- package/internal/utils/date-time/join-date-time.js.map +1 -1
- package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
- package/mixed-line-bar-chart/chart-container.js +14 -5
- package/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/package.json +1 -1
- package/pie-chart/pie-chart.d.ts.map +1 -1
- package/pie-chart/pie-chart.js +10 -1
- package/pie-chart/pie-chart.js.map +1 -1
- package/popover/body.d.ts +2 -1
- package/popover/body.d.ts.map +1 -1
- package/popover/body.js +2 -2
- package/popover/body.js.map +1 -1
- package/property-filter/interfaces.d.ts +1 -0
- package/property-filter/interfaces.d.ts.map +1 -1
- package/property-filter/interfaces.js.map +1 -1
- package/property-filter/token.d.ts.map +1 -1
- package/property-filter/token.js +1 -1
- package/property-filter/token.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/select/utils/use-select.d.ts +1 -7
- package/select/utils/use-select.d.ts.map +1 -1
- package/select/utils/use-select.js +1 -1
- package/select/utils/use-select.js.map +1 -1
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +11 -9
- package/split-panel/index.js.map +1 -1
- package/table/styles.css.js +34 -34
- package/table/styles.scoped.css +42 -40
- package/table/styles.selectors.js +34 -34
- package/tabs/index.d.ts.map +1 -1
- package/tabs/index.js +9 -11
- package/tabs/index.js.map +1 -1
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +48 -41
- package/tabs/styles.selectors.js +21 -21
- package/tabs/tab-header-bar.d.ts +4 -0
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +5 -1
- package/tabs/tab-header-bar.js.map +1 -1
- package/tag-editor/internal.d.ts.map +1 -1
- package/tag-editor/internal.js +6 -7
- package/tag-editor/internal.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/index.js +3 -1
- package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task.js +2 -1
- package/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js +2 -2
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/tutorial-panel/interfaces.d.ts +2 -0
- package/tutorial-panel/interfaces.d.ts.map +1 -1
- package/tutorial-panel/interfaces.js.map +1 -1
- package/wizard/index.d.ts.map +1 -1
- package/wizard/index.js +9 -5
- package/wizard/index.js.map +1 -1
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +7 -2
- package/wizard/wizard-form.js.map +1 -1
- package/date-range-picker/calendar/use-date-time.d.ts +0 -9
- package/date-range-picker/calendar/use-date-time.d.ts.map +0 -1
- package/date-range-picker/calendar/use-date-time.js +0 -16
- package/date-range-picker/calendar/use-date-time.js.map +0 -1
|
@@ -90,10 +90,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
94
|
-
animation: awsui_awsui-motion-fade-
|
|
93
|
+
.awsui_empty_n4qlp_19053_93:not(#\9) {
|
|
94
|
+
animation: awsui_awsui-motion-fade-in_n4qlp_19053_1 var(--motion-duration-transition-show-paced-ai4wlf, 180ms) var(--motion-easing-transition-show-paced-bg1hyg, ease-out);
|
|
95
95
|
}
|
|
96
|
-
@keyframes awsui_awsui-motion-fade-
|
|
96
|
+
@keyframes awsui_awsui-motion-fade-in_n4qlp_19053_1 {
|
|
97
97
|
from {
|
|
98
98
|
opacity: 0.2;
|
|
99
99
|
}
|
|
@@ -102,12 +102,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
@media (prefers-reduced-motion: reduce) {
|
|
105
|
-
.
|
|
105
|
+
.awsui_empty_n4qlp_19053_93:not(#\9) {
|
|
106
106
|
animation: none;
|
|
107
107
|
transition: none;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
.awsui-motion-disabled .
|
|
110
|
+
.awsui-motion-disabled .awsui_empty_n4qlp_19053_93:not(#\9), .awsui-mode-entering .awsui_empty_n4qlp_19053_93:not(#\9) {
|
|
111
111
|
animation: none;
|
|
112
112
|
transition: none;
|
|
113
113
|
}
|
|
@@ -116,7 +116,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
116
116
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
117
117
|
SPDX-License-Identifier: Apache-2.0
|
|
118
118
|
*/
|
|
119
|
-
.
|
|
119
|
+
.awsui_root_n4qlp_19053_119:not(#\9) {
|
|
120
120
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
121
121
|
border-collapse: separate;
|
|
122
122
|
border-spacing: 0;
|
|
@@ -154,41 +154,45 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
display: block;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
.
|
|
157
|
+
.awsui_empty_n4qlp_19053_93:not(#\9) {
|
|
158
158
|
font-size: var(--font-body-m-size-sregvd, 14px);
|
|
159
159
|
line-height: var(--font-body-m-line-height-i7xxvv, 22px);
|
|
160
160
|
color: var(--color-text-empty-fjv325, #5f6b7a);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
.
|
|
163
|
+
.awsui_row_n4qlp_19053_137:not(#\9) {
|
|
164
164
|
/* used in test-utils */
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
.awsui_row-
|
|
167
|
+
.awsui_row-control_n4qlp_19053_141:not(#\9) {
|
|
168
168
|
/* used in test-utils */
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.
|
|
171
|
+
.awsui_field_n4qlp_19053_145:not(#\9) {
|
|
172
172
|
/* used in test-utils */
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
.awsui_add-
|
|
175
|
+
.awsui_add-button_n4qlp_19053_149:not(#\9) {
|
|
176
176
|
/* used in test-utils */
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
.awsui_remove-
|
|
179
|
+
.awsui_remove-button_n4qlp_19053_153:not(#\9) {
|
|
180
180
|
/* used in test-utils */
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
.awsui_button-
|
|
183
|
+
.awsui_button-container-haslabel_n4qlp_19053_157:not(#\9) {
|
|
184
184
|
padding-top: calc(var(--space-xxs-ynfts5, 4px) + var(--font-body-m-line-height-i7xxvv, 22px));
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
.
|
|
187
|
+
.awsui_button-container-nolabel_n4qlp_19053_161:not(#\9) {
|
|
188
|
+
padding-top: var(--space-xxs-ynfts5, 4px);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.awsui_divider_n4qlp_19053_165:not(#\9) {
|
|
188
192
|
border-bottom: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
189
193
|
}
|
|
190
194
|
|
|
191
|
-
.awsui_additional-
|
|
195
|
+
.awsui_additional-info_n4qlp_19053_169:not(#\9) {
|
|
192
196
|
color: var(--color-text-form-secondary-ih9x7l, #5f6b7a);
|
|
193
197
|
font-size: var(--font-body-s-size-ukw2p9, 12px);
|
|
194
198
|
line-height: var(--font-body-s-line-height-kdsbrl, 16px);
|
|
@@ -198,7 +202,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
198
202
|
margin-top: var(--space-xxs-ynfts5, 4px);
|
|
199
203
|
/* stylelint-disable-next-line selector-max-type */
|
|
200
204
|
}
|
|
201
|
-
.awsui_additional-
|
|
205
|
+
.awsui_additional-info_n4qlp_19053_169 > a:not(#\9) {
|
|
202
206
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
203
207
|
font-weight: var(--font-link-primary-weight-91pybi, "inherit");
|
|
204
208
|
letter-spacing: var(--font-link-primary-letter-spacing-vmsgcx, "inherit");
|
|
@@ -212,31 +216,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
212
216
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
213
217
|
}
|
|
214
218
|
@media (prefers-reduced-motion: reduce) {
|
|
215
|
-
.awsui_additional-
|
|
219
|
+
.awsui_additional-info_n4qlp_19053_169 > a:not(#\9) {
|
|
216
220
|
animation: none;
|
|
217
221
|
transition: none;
|
|
218
222
|
}
|
|
219
223
|
}
|
|
220
|
-
.awsui-motion-disabled .awsui_additional-
|
|
224
|
+
.awsui-motion-disabled .awsui_additional-info_n4qlp_19053_169 > a:not(#\9), .awsui-mode-entering .awsui_additional-info_n4qlp_19053_169 > a:not(#\9) {
|
|
221
225
|
animation: none;
|
|
222
226
|
transition: none;
|
|
223
227
|
}
|
|
224
|
-
.awsui_additional-
|
|
228
|
+
.awsui_additional-info_n4qlp_19053_169 > a:not(#\9):hover {
|
|
225
229
|
cursor: pointer;
|
|
226
230
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
227
231
|
}
|
|
228
|
-
.awsui_additional-
|
|
232
|
+
.awsui_additional-info_n4qlp_19053_169 > a:not(#\9):focus {
|
|
229
233
|
outline: none;
|
|
230
234
|
}
|
|
231
|
-
.awsui_additional-
|
|
235
|
+
.awsui_additional-info_n4qlp_19053_169 > a:not(#\9):active {
|
|
232
236
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
233
237
|
}
|
|
234
|
-
.awsui_additional-
|
|
238
|
+
.awsui_additional-info_n4qlp_19053_169 > a:not(#\9):active, .awsui_additional-info_n4qlp_19053_169 > a:not(#\9):focus, .awsui_additional-info_n4qlp_19053_169 > a:not(#\9):hover {
|
|
235
239
|
text-decoration: underline;
|
|
236
240
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
237
241
|
text-decoration-color: currentColor;
|
|
238
242
|
}
|
|
239
243
|
|
|
240
|
-
.awsui_right-
|
|
244
|
+
.awsui_right-align_n4qlp_19053_215:not(#\9) {
|
|
241
245
|
float: right;
|
|
242
246
|
}
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"empty": "
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"root": "
|
|
8
|
-
"row": "
|
|
9
|
-
"row-control": "awsui_row-
|
|
10
|
-
"field": "
|
|
11
|
-
"add-button": "awsui_add-
|
|
12
|
-
"remove-button": "awsui_remove-
|
|
13
|
-
"button-container": "awsui_button-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
5
|
+
"empty": "awsui_empty_n4qlp_19053_93",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_n4qlp_19053_1",
|
|
7
|
+
"root": "awsui_root_n4qlp_19053_119",
|
|
8
|
+
"row": "awsui_row_n4qlp_19053_137",
|
|
9
|
+
"row-control": "awsui_row-control_n4qlp_19053_141",
|
|
10
|
+
"field": "awsui_field_n4qlp_19053_145",
|
|
11
|
+
"add-button": "awsui_add-button_n4qlp_19053_149",
|
|
12
|
+
"remove-button": "awsui_remove-button_n4qlp_19053_153",
|
|
13
|
+
"button-container-haslabel": "awsui_button-container-haslabel_n4qlp_19053_157",
|
|
14
|
+
"button-container-nolabel": "awsui_button-container-nolabel_n4qlp_19053_161",
|
|
15
|
+
"divider": "awsui_divider_n4qlp_19053_165",
|
|
16
|
+
"additional-info": "awsui_additional-info_n4qlp_19053_169",
|
|
17
|
+
"right-align": "awsui_right-align_n4qlp_19053_215"
|
|
17
18
|
};
|
|
18
19
|
|
|
@@ -46,6 +46,7 @@ export declare namespace BreadcrumbGroupProps {
|
|
|
46
46
|
}
|
|
47
47
|
export interface BreadcrumbItemProps<T extends BreadcrumbGroupProps.Item> {
|
|
48
48
|
item: T;
|
|
49
|
+
isDisplayed: boolean;
|
|
49
50
|
isLast?: boolean;
|
|
50
51
|
isCompressed?: boolean;
|
|
51
52
|
onClick?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,C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,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI;IACtE,IAAI,EAAE,CAAC,CAAC;IACR,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACtE,QAAQ,CAAC,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;CACxE;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IACpD,aAAa,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACvC,mBAAmB,EAAE,sBAAsB,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;IACzE,oBAAoB,EAAE,sBAAsB,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;CAC3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { LinkItem } from '../button-dropdown/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface BreadcrumbGroupProps<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>\n extends BaseComponentProps {\n /**\n * An array of breadcrumb items that describes the link hierarchy for this navigation.\n * Each option has the following properties:\n\n * * `text` (string) - Specifies the title text of the breadcrumb item.\n * * `href` (string) - Specifies the URL for the link in the breadcrumb item.\n * You should specify the link even if you have a click handler for a breadcrumb item\n * to ensure that valid markup is generated.\n\n * Note: The last breadcrumb item is automatically considered the current item, and it's\n * attributed with the proper `aria-current` value and rendered as inactive.\n */\n items: ReadonlyArray<T>;\n /**\n * Provides an `aria-label` to the breadcrumb group that screen readers can read (for accessibility).\n */\n ariaLabel?: string;\n\n /**\n * Provides an `aria-label` to the ellipsis button that screen readers can read (for accessibility).\n */\n expandAriaLabel?: string;\n /**\n * Called when the user clicks on a breadcrumb item.\n */\n onClick?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n /**\n * Called when the user clicks on a breadcrumb item with the left mouse button\n * without pressing modifier keys (that is, CTRL, ALT, SHIFT, META).\n */\n onFollow?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n}\n\nexport namespace BreadcrumbGroupProps {\n export interface Item {\n text: string;\n href: string;\n }\n\n export interface ClickDetail<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>\n extends BaseNavigationDetail {\n item: T;\n text: string;\n href: string;\n }\n}\n\nexport interface BreadcrumbItemProps<T extends BreadcrumbGroupProps.Item> {\n item: T;\n isLast?: boolean;\n isCompressed?: boolean;\n onClick?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n onFollow?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n}\n\nexport interface EllipsisDropdownProps {\n ariaLabel?: BreadcrumbGroupProps['expandAriaLabel'];\n dropdownItems: ReadonlyArray<LinkItem>;\n onDropdownItemClick: CancelableEventHandler<{ id: string; event?: any }>;\n onDropdownItemFollow: CancelableEventHandler<{ id: string; event?: any }>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { LinkItem } from '../button-dropdown/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface BreadcrumbGroupProps<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>\n extends BaseComponentProps {\n /**\n * An array of breadcrumb items that describes the link hierarchy for this navigation.\n * Each option has the following properties:\n\n * * `text` (string) - Specifies the title text of the breadcrumb item.\n * * `href` (string) - Specifies the URL for the link in the breadcrumb item.\n * You should specify the link even if you have a click handler for a breadcrumb item\n * to ensure that valid markup is generated.\n\n * Note: The last breadcrumb item is automatically considered the current item, and it's\n * attributed with the proper `aria-current` value and rendered as inactive.\n */\n items: ReadonlyArray<T>;\n /**\n * Provides an `aria-label` to the breadcrumb group that screen readers can read (for accessibility).\n */\n ariaLabel?: string;\n\n /**\n * Provides an `aria-label` to the ellipsis button that screen readers can read (for accessibility).\n */\n expandAriaLabel?: string;\n /**\n * Called when the user clicks on a breadcrumb item.\n */\n onClick?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n /**\n * Called when the user clicks on a breadcrumb item with the left mouse button\n * without pressing modifier keys (that is, CTRL, ALT, SHIFT, META).\n */\n onFollow?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n}\n\nexport namespace BreadcrumbGroupProps {\n export interface Item {\n text: string;\n href: string;\n }\n\n export interface ClickDetail<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>\n extends BaseNavigationDetail {\n item: T;\n text: string;\n href: string;\n }\n}\n\nexport interface BreadcrumbItemProps<T extends BreadcrumbGroupProps.Item> {\n item: T;\n isDisplayed: boolean;\n isLast?: boolean;\n isCompressed?: boolean;\n onClick?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n onFollow?: CancelableEventHandler<BreadcrumbGroupProps.ClickDetail<T>>;\n}\n\nexport interface EllipsisDropdownProps {\n ariaLabel?: BreadcrumbGroupProps['expandAriaLabel'];\n dropdownItems: ReadonlyArray<LinkItem>;\n onDropdownItemClick: CancelableEventHandler<{ id: string; event?: any }>;\n onDropdownItemFollow: CancelableEventHandler<{ id: string; event?: any }>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/internal.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AAI3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAkDpD,eAAO,MAAM,cAAc;;;;CAIzB,CAAC;AAEH,aAAK,4BAA4B,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,IAAI,YAAY,CAC/G,oBAAoB,CAAC,CAAC,CAAC,EACvB,iBAAiB,CAClB,GACC,0BAA0B,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,EAC/G,KAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,4BAA4B,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/internal.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AAI3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAkDpD,eAAO,MAAM,cAAc;;;;CAIzB,CAAC;AAEH,aAAK,4BAA4B,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,IAAI,YAAY,CAC/G,oBAAoB,CAAC,CAAC,CAAC,EACvB,iBAAiB,CAClB,GACC,0BAA0B,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,EAC/G,KAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,4BAA4B,CAAC,CAAC,CAAC,eA4DjC"}
|
|
@@ -40,7 +40,7 @@ export default function InternalBreadcrumbGroup(_a) {
|
|
|
40
40
|
var isMobile = useMobile();
|
|
41
41
|
var breadcrumbItems = items.map(function (item, index) {
|
|
42
42
|
return (React.createElement("li", { className: styles.item, key: index },
|
|
43
|
-
React.createElement(BreadcrumbItem, { item: item, onClick: onClick, onFollow: onFollow, isCompressed: isMobile, isLast: index === items.length - 1 })));
|
|
43
|
+
React.createElement(BreadcrumbItem, { item: item, onClick: onClick, onFollow: onFollow, isCompressed: isMobile, isLast: index === items.length - 1, isDisplayed: !isMobile || index === items.length - 1 || index === 0 })));
|
|
44
44
|
});
|
|
45
45
|
var getEventItem = function (e) {
|
|
46
46
|
var id = e.detail.id;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,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or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport InternalIcon from '../icon/internal';\nimport InternalButtonDropdown from '../button-dropdown/internal';\nimport { LinkItem } from '../button-dropdown/interfaces';\nimport { InternalButton } from '../button/internal';\nimport { ButtonProps } from '../button/interfaces';\nimport { BreadcrumbItem } from './item/item';\nimport { BreadcrumbGroupProps, EllipsisDropdownProps } from './interfaces';\nimport { fireCancelableEvent } from '../internal/events';\nimport { getBaseProps } from '../internal/base-component';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { SomeRequired } from '../internal/types.js';\n\nconst DropdownTrigger = (\n clickHandler: () => void,\n ref: React.Ref<ButtonProps.Ref>,\n isDisabled: boolean,\n isExpanded: boolean,\n ariaLabel?: string\n) => {\n return (\n <InternalButton\n disabled={isDisabled}\n onClick={event => {\n event.preventDefault();\n clickHandler();\n }}\n ref={ref}\n ariaExpanded={isExpanded}\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}: EllipsisDropdownProps) => {\n return (\n <li className={styles.ellipsis}>\n <InternalButtonDropdown\n ariaLabel={ariaLabel}\n items={dropdownItems}\n onItemClick={onDropdownItemClick}\n onItemFollow={onDropdownItemFollow}\n customTriggerBuilder={DropdownTrigger}\n />\n <span className={styles.icon}>\n <InternalIcon name=\"angle-right\" />\n </span>\n </li>\n );\n};\n\nexport const getEventDetail = <T extends BreadcrumbGroupProps.Item>(item: T) => ({\n item,\n text: item.text,\n href: item.href,\n});\n\ntype InternalBreadcrumbGroupProps<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item> = SomeRequired<\n BreadcrumbGroupProps<T>,\n 'expandAriaLabel'\n> &\n InternalBaseComponentProps;\n\nexport default function InternalBreadcrumbGroup<T extends BreadcrumbGroupProps.Item = BreadcrumbGroupProps.Item>({\n items = [],\n ariaLabel,\n expandAriaLabel,\n onClick,\n onFollow,\n __internalRootRef,\n ...props\n}: InternalBreadcrumbGroupProps<T>) {\n for (const item of items) {\n checkSafeUrl('BreadcrumbGroup', item.href);\n }\n const baseProps = getBaseProps(props);\n const isMobile = useMobile();\n\n let breadcrumbItems = items.map((item, index) => {\n return (\n <li className={styles.item} key={index}>\n <BreadcrumbItem\n item={item}\n onClick={onClick}\n onFollow={onFollow}\n isCompressed={isMobile}\n isLast={index === items.length - 1}\n isDisplayed={!isMobile || index === items.length - 1 || index === 0}\n />\n </li>\n );\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 >= 3) {\n const dropdownItems: Array<LinkItem> = items\n .slice(1, items.length - 1)\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 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 return (\n <nav\n {...baseProps}\n className={clsx(styles['breadcrumb-group'], isMobile && styles.mobile, baseProps.className)}\n aria-label={ariaLabel || undefined}\n ref={__internalRootRef}\n >\n <ol className={styles['breadcrumb-group-list']}>{breadcrumbItems}</ol>\n </nav>\n );\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BreadcrumbGroupProps, BreadcrumbItemProps } from '../interfaces';
|
|
2
|
-
export declare function BreadcrumbItem<T extends BreadcrumbGroupProps.Item>({ item, onClick, onFollow, isLast, isCompressed, }: BreadcrumbItemProps<T>): JSX.Element;
|
|
2
|
+
export declare function BreadcrumbItem<T extends BreadcrumbGroupProps.Item>({ item, onClick, onFollow, isDisplayed, isLast, isCompressed, }: BreadcrumbItemProps<T>): JSX.Element;
|
|
3
3
|
//# sourceMappingURL=item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/breadcrumb-group/item/item.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/breadcrumb-group/item/item.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA0G1E,wBAAgB,cAAc,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,EAAE,EAClE,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,MAAc,EACd,YAAoB,GACrB,EAAE,mBAAmB,CAAC,CAAC,CAAC,eAqCxB"}
|
|
@@ -1,16 +1,67 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import InternalIcon from '../../icon/internal';
|
|
6
6
|
import styles from './styles.css.js';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import useFocusVisible from '../../internal/hooks/focus-visible';
|
|
9
9
|
import { fireCancelableEvent, isPlainLeftClick } from '../../internal/events';
|
|
10
10
|
import { getEventDetail } from '../internal';
|
|
11
|
+
import { Transition } from '../../internal/components/transition';
|
|
12
|
+
import PopoverContainer from '../../popover/container';
|
|
13
|
+
import PopoverBody from '../../popover/body';
|
|
14
|
+
import Portal from '../../internal/components/portal';
|
|
15
|
+
import popoverStyles from '../../popover/styles.css.js';
|
|
16
|
+
var BreadcrumbItemWithPopover = function (_a) {
|
|
17
|
+
var item = _a.item, anchorAttributes = __rest(_a, ["item"]);
|
|
18
|
+
var focusVisible = useFocusVisible();
|
|
19
|
+
var _b = useState(false), showPopover = _b[0], setShowPopover = _b[1];
|
|
20
|
+
var textRef = useRef(null);
|
|
21
|
+
var virtualTextRef = useRef(null);
|
|
22
|
+
var isTruncated = function (textRef, virtualTextRef) {
|
|
23
|
+
if (!textRef || !virtualTextRef || !textRef.current || !virtualTextRef.current) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
var virtualTextWidth = virtualTextRef.current.getBoundingClientRect().width;
|
|
27
|
+
var textWidth = textRef.current.getBoundingClientRect().width;
|
|
28
|
+
if (virtualTextWidth > textWidth) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
};
|
|
33
|
+
var popoverContent = (React.createElement(Portal, null,
|
|
34
|
+
React.createElement("div", { className: styles['item-popover'] },
|
|
35
|
+
React.createElement(Transition, { "in": true }, function () { return (React.createElement(PopoverContainer, { trackRef: textRef, size: "small", fixedWidth: false, position: "bottom", arrow: function (position) { return (React.createElement("div", { className: clsx(popoverStyles.arrow, popoverStyles["arrow-position-".concat(position)]) },
|
|
36
|
+
React.createElement("div", { className: popoverStyles['arrow-outer'] }),
|
|
37
|
+
React.createElement("div", { className: popoverStyles['arrow-inner'] }))); } },
|
|
38
|
+
React.createElement(PopoverBody, { dismissButton: false, dismissAriaLabel: undefined, onDismiss: function () { }, header: undefined }, item.text))); }))));
|
|
39
|
+
useEffect(function () {
|
|
40
|
+
var onKeyDown = function (event) {
|
|
41
|
+
if (event.key === 'Escape') {
|
|
42
|
+
setShowPopover(false);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
if (showPopover) {
|
|
46
|
+
document.addEventListener('keydown', onKeyDown);
|
|
47
|
+
}
|
|
48
|
+
return function () {
|
|
49
|
+
document.removeEventListener('keydown', onKeyDown);
|
|
50
|
+
};
|
|
51
|
+
}, [showPopover]);
|
|
52
|
+
return (React.createElement(React.Fragment, null,
|
|
53
|
+
React.createElement("a", __assign({}, focusVisible, anchorAttributes, { onFocus: function () {
|
|
54
|
+
isTruncated(textRef, virtualTextRef) && setShowPopover(true);
|
|
55
|
+
}, onBlur: function () { return setShowPopover(false); }, onMouseEnter: function () {
|
|
56
|
+
isTruncated(textRef, virtualTextRef) && setShowPopover(true);
|
|
57
|
+
}, onMouseLeave: function () { return setShowPopover(false); } }),
|
|
58
|
+
React.createElement("span", { className: styles.text, ref: textRef }, item.text),
|
|
59
|
+
React.createElement("span", { className: styles['virtual-item'], ref: virtualTextRef }, item.text)),
|
|
60
|
+
showPopover && popoverContent));
|
|
61
|
+
};
|
|
11
62
|
export function BreadcrumbItem(_a) {
|
|
12
63
|
var _b;
|
|
13
|
-
var item = _a.item, onClick = _a.onClick, onFollow = _a.onFollow, _c = _a.isLast, isLast = _c === void 0 ? false : _c, _d = _a.isCompressed, isCompressed = _d === void 0 ? false : _d;
|
|
64
|
+
var item = _a.item, onClick = _a.onClick, onFollow = _a.onFollow, isDisplayed = _a.isDisplayed, _c = _a.isLast, isLast = _c === void 0 ? false : _c, _d = _a.isCompressed, isCompressed = _d === void 0 ? false : _d;
|
|
14
65
|
var focusVisible = useFocusVisible();
|
|
15
66
|
var preventDefault = function (event) { return event.preventDefault(); };
|
|
16
67
|
var onClickHandler = function (event) {
|
|
@@ -19,10 +70,19 @@ export function BreadcrumbItem(_a) {
|
|
|
19
70
|
}
|
|
20
71
|
fireCancelableEvent(onClick, getEventDetail(item), event);
|
|
21
72
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
73
|
+
var anchorAttributes = {
|
|
74
|
+
href: isLast ? undefined : item.href || '#',
|
|
75
|
+
className: clsx(styles.anchor, (_b = {}, _b[styles.compressed] = isCompressed, _b)),
|
|
76
|
+
'aria-current': isLast ? 'page' : undefined,
|
|
77
|
+
'aria-disabled': isLast && 'true',
|
|
78
|
+
onClick: isLast ? preventDefault : onClickHandler,
|
|
79
|
+
tabIndex: isLast ? 0 : undefined
|
|
80
|
+
};
|
|
81
|
+
return (React.createElement(React.Fragment, null,
|
|
82
|
+
React.createElement("div", { className: clsx(styles.breadcrumb, isLast && styles.last) },
|
|
83
|
+
isDisplayed && isCompressed ? (React.createElement(BreadcrumbItemWithPopover, __assign({ item: item }, anchorAttributes))) : (React.createElement("a", __assign({}, focusVisible, anchorAttributes),
|
|
84
|
+
React.createElement("span", { className: styles.text }, item.text))),
|
|
85
|
+
!isLast ? (React.createElement("span", { className: styles.icon },
|
|
86
|
+
React.createElement(InternalIcon, { name: "angle-right" }))) : null)));
|
|
27
87
|
}
|
|
28
88
|
//# sourceMappingURL=item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.js","sourceRoot":"","sources":["../../../../src/breadcrumb-group/item/item.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"item.js","sourceRoot":"","sources":["../../../../src/breadcrumb-group/item/item.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,eAAe,MAAM,oCAAoC,C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C,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,YAAI,GAAC,MAAM,CAAC,UAAU,IAAG,YAAY,MAAG;QACrE,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QAC3C,eAAe,EAAE,MAAM,IAAI,MAAM;QACjC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc;QACjD,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;KACjC,CAAC;IAEF,OAAO,CACL;QACE,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC;YAC3D,WAAW,IAAI,YAAY,CAAC,CAAC,CAAC,CAC7B,oBAAC,yBAAyB,aAAC,IAAI,EAAE,IAAI,IAAM,gBAAgB,EAAI,CAChE,CAAC,CAAC,CAAC,CACF,sCAAO,YAAY,EAAM,gBAAgB;gBACvC,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,IAAI,CAAC,IAAI,CAAQ,CAC9C,CACL;YACA,CAAC,MAAM,CAAC,CAAC,CAAC,CACT,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI;gBAC1B,oBAAC,YAAY,IAAC,IAAI,EAAC,aAAa,GAAG,CAC9B,CACR,CAAC,CAAC,CAAC,IAAI,CACJ,CACL,CACJ,CAAC;AACJ,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 { BreadcrumbGroupProps, BreadcrumbItemProps } from '../interfaces';\nimport InternalIcon from '../../icon/internal';\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport useFocusVisible from '../../internal/hooks/focus-visible';\nimport { fireCancelableEvent, isPlainLeftClick } from '../../internal/events';\nimport { getEventDetail } from '../internal';\nimport { Transition } from '../../internal/components/transition';\nimport PopoverContainer from '../../popover/container';\nimport PopoverBody from '../../popover/body';\nimport Portal from '../../internal/components/portal';\nimport popoverStyles from '../../popover/styles.css.js';\n\ntype BreadcrumbItemWithPopoverProps<T extends BreadcrumbGroupProps.Item> =\n React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n item: T;\n };\n\nconst BreadcrumbItemWithPopover = <T extends BreadcrumbGroupProps.Item>({\n item,\n ...anchorAttributes\n}: BreadcrumbItemWithPopoverProps<T>) => {\n const focusVisible = useFocusVisible();\n const [showPopover, setShowPopover] = useState(false);\n const textRef = useRef<HTMLElement>(null);\n const virtualTextRef = useRef<HTMLElement>(null);\n\n const isTruncated = (textRef: React.RefObject<HTMLElement>, virtualTextRef: React.RefObject<HTMLElement>) => {\n if (!textRef || !virtualTextRef || !textRef.current || !virtualTextRef.current) {\n return false;\n }\n const virtualTextWidth = virtualTextRef.current.getBoundingClientRect().width;\n const textWidth = textRef.current.getBoundingClientRect().width;\n if (virtualTextWidth > textWidth) {\n return true;\n }\n return false;\n };\n\n const popoverContent = (\n <Portal>\n <div className={styles['item-popover']}>\n <Transition in={true}>\n {() => (\n <PopoverContainer\n trackRef={textRef}\n size=\"small\"\n fixedWidth={false}\n position=\"bottom\"\n arrow={position => (\n <div className={clsx(popoverStyles.arrow, popoverStyles[`arrow-position-${position}`])}>\n <div className={popoverStyles['arrow-outer']} />\n <div className={popoverStyles['arrow-inner']} />\n </div>\n )}\n >\n <PopoverBody dismissButton={false} dismissAriaLabel={undefined} onDismiss={() => {}} header={undefined}>\n {item.text}\n </PopoverBody>\n </PopoverContainer>\n )}\n </Transition>\n </div>\n </Portal>\n );\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setShowPopover(false);\n }\n };\n if (showPopover) {\n document.addEventListener('keydown', onKeyDown);\n }\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n };\n }, [showPopover]);\n\n return (\n <>\n <a\n {...focusVisible}\n {...anchorAttributes}\n onFocus={() => {\n isTruncated(textRef, virtualTextRef) && setShowPopover(true);\n }}\n onBlur={() => setShowPopover(false)}\n onMouseEnter={() => {\n isTruncated(textRef, virtualTextRef) && setShowPopover(true);\n }}\n onMouseLeave={() => setShowPopover(false)}\n >\n <span className={styles.text} ref={textRef}>\n {item.text}\n </span>\n <span className={styles['virtual-item']} ref={virtualTextRef}>\n {item.text}\n </span>\n </a>\n {showPopover && popoverContent}\n </>\n );\n};\n\nexport function BreadcrumbItem<T extends BreadcrumbGroupProps.Item>({\n item,\n onClick,\n onFollow,\n isDisplayed,\n isLast = false,\n isCompressed = false,\n}: BreadcrumbItemProps<T>) {\n const focusVisible = useFocusVisible();\n const preventDefault = (event: React.MouseEvent) => event.preventDefault();\n const onClickHandler = (event: React.MouseEvent) => {\n if (isPlainLeftClick(event)) {\n fireCancelableEvent(onFollow, getEventDetail(item), event);\n }\n fireCancelableEvent(onClick, getEventDetail(item), event);\n };\n\n const anchorAttributes: React.AnchorHTMLAttributes<HTMLAnchorElement> = {\n href: isLast ? undefined : item.href || '#',\n className: clsx(styles.anchor, { [styles.compressed]: isCompressed }),\n 'aria-current': isLast ? 'page' : undefined, // Active breadcrumb item is implemented according to WAI-ARIA 1.1\n 'aria-disabled': isLast && 'true',\n onClick: isLast ? preventDefault : onClickHandler,\n tabIndex: isLast ? 0 : undefined, // tabIndex is added to the last crumb to keep it in the index without an href\n };\n\n return (\n <>\n <div className={clsx(styles.breadcrumb, isLast && styles.last)}>\n {isDisplayed && isCompressed ? (\n <BreadcrumbItemWithPopover item={item} {...anchorAttributes} />\n ) : (\n <a {...focusVisible} {...anchorAttributes}>\n <span className={styles.text}>{item.text}</span>\n </a>\n )}\n {!isLast ? (\n <span className={styles.icon}>\n <InternalIcon name=\"angle-right\" />\n </span>\n ) : null}\n </div>\n </>\n );\n}\n"]}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"link": "
|
|
5
|
-
"breadcrumb": "
|
|
6
|
-
"icon": "
|
|
7
|
-
"anchor": "
|
|
8
|
-
"last": "
|
|
9
|
-
"compressed": "
|
|
10
|
-
"text": "
|
|
4
|
+
"link": "awsui_link_1kosq_zkw11_93",
|
|
5
|
+
"breadcrumb": "awsui_breadcrumb_1kosq_zkw11_97",
|
|
6
|
+
"icon": "awsui_icon_1kosq_zkw11_100",
|
|
7
|
+
"anchor": "awsui_anchor_1kosq_zkw11_104",
|
|
8
|
+
"last": "awsui_last_1kosq_zkw11_147",
|
|
9
|
+
"compressed": "awsui_compressed_1kosq_zkw11_157",
|
|
10
|
+
"text": "awsui_text_1kosq_zkw11_161",
|
|
11
|
+
"virtual-item": "awsui_virtual-item_1kosq_zkw11_168",
|
|
12
|
+
"item-popover": "awsui_item-popover_1kosq_zkw11_175"
|
|
11
13
|
};
|
|
12
14
|
|
|
@@ -90,18 +90,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_link_1kosq_zkw11_93:not(#\9):after {
|
|
94
94
|
display: none;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.
|
|
97
|
+
.awsui_breadcrumb_1kosq_zkw11_97:not(#\9) {
|
|
98
98
|
display: flex;
|
|
99
99
|
}
|
|
100
|
-
.
|
|
100
|
+
.awsui_breadcrumb_1kosq_zkw11_97 > .awsui_icon_1kosq_zkw11_100:not(#\9) {
|
|
101
101
|
margin: 0 var(--space-xs-rsr2qu, 8px);
|
|
102
102
|
color: var(--color-text-breadcrumb-icon-mlugp6, #7d8998);
|
|
103
103
|
}
|
|
104
|
-
.
|
|
104
|
+
.awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9) {
|
|
105
105
|
color: var(--color-text-link-default-5f186r, #0972d3);
|
|
106
106
|
font-weight: inherit;
|
|
107
107
|
letter-spacing: normal;
|
|
@@ -114,31 +114,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
114
114
|
transition-duration: var(--motion-duration-refresh-only-medium-5flen2, 165ms);
|
|
115
115
|
}
|
|
116
116
|
@media (prefers-reduced-motion: reduce) {
|
|
117
|
-
.
|
|
117
|
+
.awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9) {
|
|
118
118
|
animation: none;
|
|
119
119
|
transition: none;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
.awsui-motion-disabled .
|
|
122
|
+
.awsui-motion-disabled .awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9), .awsui-mode-entering .awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9) {
|
|
123
123
|
animation: none;
|
|
124
124
|
transition: none;
|
|
125
125
|
}
|
|
126
|
-
.
|
|
126
|
+
.awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9):hover {
|
|
127
127
|
cursor: pointer;
|
|
128
128
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
129
129
|
}
|
|
130
|
-
.
|
|
130
|
+
.awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9):focus {
|
|
131
131
|
outline: none;
|
|
132
132
|
}
|
|
133
|
-
.
|
|
133
|
+
.awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9):active {
|
|
134
134
|
color: var(--color-text-link-hover-kololx, #033160);
|
|
135
135
|
}
|
|
136
|
-
.
|
|
136
|
+
.awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9):active, .awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9):focus, .awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104:not(#\9):hover {
|
|
137
137
|
text-decoration: underline;
|
|
138
138
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
139
139
|
text-decoration-color: currentColor;
|
|
140
140
|
}
|
|
141
|
-
.
|
|
141
|
+
.awsui_breadcrumb_1kosq_zkw11_97 > .awsui_anchor_1kosq_zkw11_104[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
142
142
|
outline: thin dotted;
|
|
143
143
|
outline: var(--border-link-focus-ring-outline-k2wccv, 0);
|
|
144
144
|
outline-offset: 2px;
|
|
@@ -146,24 +146,34 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
146
146
|
border-radius: var(--border-radius-control-default-focus-ring-7661kz, 4px);
|
|
147
147
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-nv4ahb, 2px) var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
148
148
|
}
|
|
149
|
-
.
|
|
149
|
+
.awsui_breadcrumb_1kosq_zkw11_97.awsui_last_1kosq_zkw11_147 > .awsui_icon_1kosq_zkw11_100:not(#\9) {
|
|
150
150
|
display: none;
|
|
151
151
|
}
|
|
152
|
-
.
|
|
152
|
+
.awsui_breadcrumb_1kosq_zkw11_97.awsui_last_1kosq_zkw11_147 > .awsui_anchor_1kosq_zkw11_104:not(#\9) {
|
|
153
153
|
color: var(--color-text-breadcrumb-current-mum16s, #5f6b7a);
|
|
154
154
|
font-weight: 700;
|
|
155
155
|
text-decoration: none;
|
|
156
156
|
cursor: default;
|
|
157
|
-
pointer-events: none;
|
|
158
157
|
}
|
|
159
158
|
|
|
160
|
-
.
|
|
159
|
+
.awsui_compressed_1kosq_zkw11_157:not(#\9) {
|
|
161
160
|
min-width: 0;
|
|
162
161
|
overflow: hidden;
|
|
163
162
|
}
|
|
164
|
-
.
|
|
163
|
+
.awsui_compressed_1kosq_zkw11_157 > .awsui_text_1kosq_zkw11_161:not(#\9) {
|
|
165
164
|
overflow: hidden;
|
|
166
165
|
text-overflow: ellipsis;
|
|
167
166
|
white-space: nowrap;
|
|
168
167
|
display: block;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.awsui_virtual-item_1kosq_zkw11_168:not(#\9) {
|
|
171
|
+
position: absolute !important;
|
|
172
|
+
top: -9999px !important;
|
|
173
|
+
left: -9999px !important;
|
|
174
|
+
visibility: hidden;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.awsui_item-popover_1kosq_zkw11_175:not(#\9) {
|
|
178
|
+
/* used in tests */
|
|
169
179
|
}
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"link": "
|
|
6
|
-
"breadcrumb": "
|
|
7
|
-
"icon": "
|
|
8
|
-
"anchor": "
|
|
9
|
-
"last": "
|
|
10
|
-
"compressed": "
|
|
11
|
-
"text": "
|
|
5
|
+
"link": "awsui_link_1kosq_zkw11_93",
|
|
6
|
+
"breadcrumb": "awsui_breadcrumb_1kosq_zkw11_97",
|
|
7
|
+
"icon": "awsui_icon_1kosq_zkw11_100",
|
|
8
|
+
"anchor": "awsui_anchor_1kosq_zkw11_104",
|
|
9
|
+
"last": "awsui_last_1kosq_zkw11_147",
|
|
10
|
+
"compressed": "awsui_compressed_1kosq_zkw11_157",
|
|
11
|
+
"text": "awsui_text_1kosq_zkw11_161",
|
|
12
|
+
"virtual-item": "awsui_virtual-item_1kosq_zkw11_168",
|
|
13
|
+
"item-popover": "awsui_item-popover_1kosq_zkw11_175"
|
|
12
14
|
};
|
|
13
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/code-editor/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/code-editor/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AA+B/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,eA0TxD"}
|