@cloudscape-design/components 3.0.494 → 3.0.496
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/alert/styles.css.js +25 -25
- package/alert/styles.scoped.css +45 -51
- package/alert/styles.selectors.js +25 -25
- package/anchor-navigation/styles.css.js +8 -8
- package/anchor-navigation/styles.scoped.css +21 -24
- package/anchor-navigation/styles.selectors.js +8 -8
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +32 -35
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/visual-refresh/styles.css.js +80 -80
- package/app-layout/visual-refresh/styles.scoped.css +175 -181
- package/app-layout/visual-refresh/styles.selectors.js +80 -80
- package/attribute-editor/styles.css.js +14 -14
- package/attribute-editor/styles.scoped.css +27 -30
- package/attribute-editor/styles.selectors.js +14 -14
- package/badge/styles.css.js +5 -5
- package/badge/styles.scoped.css +8 -11
- package/badge/styles.selectors.js +5 -5
- package/breadcrumb-group/styles.css.js +7 -7
- package/breadcrumb-group/styles.scoped.css +18 -24
- package/breadcrumb-group/styles.selectors.js +7 -7
- package/button/styles.css.js +20 -20
- package/button/styles.scoped.css +154 -157
- package/button/styles.selectors.js +20 -20
- package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
- package/button-dropdown/mobile-expandable-group/styles.scoped.css +8 -11
- package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
- package/calendar/styles.css.js +18 -18
- package/calendar/styles.scoped.css +41 -44
- package/calendar/styles.selectors.js +18 -18
- package/cards/styles.css.js +39 -39
- package/cards/styles.scoped.css +52 -55
- package/cards/styles.selectors.js +39 -39
- package/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +8 -11
- package/checkbox/styles.selectors.js +3 -3
- package/code-editor/styles.css.js +32 -32
- package/code-editor/styles.scoped.css +132 -135
- package/code-editor/styles.selectors.js +32 -32
- package/collection-preferences/content-display/styles.css.js +11 -11
- package/collection-preferences/content-display/styles.scoped.css +20 -23
- package/collection-preferences/content-display/styles.selectors.js +11 -11
- package/collection-preferences/styles.css.js +37 -37
- package/collection-preferences/styles.scoped.css +47 -50
- package/collection-preferences/styles.selectors.js +37 -37
- package/column-layout/styles.css.js +13 -13
- package/column-layout/styles.scoped.css +46 -49
- package/column-layout/styles.selectors.js +13 -13
- package/container/styles.css.js +29 -29
- package/container/styles.scoped.css +55 -58
- package/container/styles.selectors.js +29 -29
- package/date-picker/styles.css.js +7 -7
- package/date-picker/styles.scoped.css +12 -15
- package/date-picker/styles.selectors.js +7 -7
- package/date-range-picker/styles.css.js +38 -38
- package/date-range-picker/styles.scoped.css +49 -52
- package/date-range-picker/styles.selectors.js +38 -38
- package/drawer/styles.css.js +3 -3
- package/drawer/styles.scoped.css +11 -14
- package/drawer/styles.selectors.js +3 -3
- package/expandable-section/styles.css.js +32 -32
- package/expandable-section/styles.scoped.css +65 -68
- package/expandable-section/styles.selectors.js +32 -32
- package/flashbar/styles.css.js +47 -47
- package/flashbar/styles.scoped.css +149 -152
- package/flashbar/styles.selectors.js +47 -47
- package/form/styles.css.js +9 -9
- package/form/styles.scoped.css +11 -14
- package/form/styles.selectors.js +9 -9
- package/form-field/styles.css.js +19 -19
- package/form-field/styles.scoped.css +32 -35
- package/form-field/styles.selectors.js +19 -19
- package/grid/styles.css.js +53 -53
- package/grid/styles.scoped.css +57 -60
- package/grid/styles.selectors.js +53 -53
- package/header/styles.css.js +34 -34
- package/header/styles.scoped.css +53 -56
- package/header/styles.selectors.js +34 -34
- package/help-panel/styles.css.js +4 -4
- package/help-panel/styles.scoped.css +66 -69
- package/help-panel/styles.selectors.js +4 -4
- package/input/styles.css.js +12 -12
- package/input/styles.scoped.css +33 -36
- package/input/styles.selectors.js +12 -12
- package/internal/components/button-trigger/styles.css.js +10 -10
- package/internal/components/button-trigger/styles.scoped.css +27 -30
- package/internal/components/button-trigger/styles.selectors.js +10 -10
- package/internal/components/chart-filter/styles.css.js +3 -3
- package/internal/components/chart-filter/styles.scoped.css +6 -9
- package/internal/components/chart-filter/styles.selectors.js +3 -3
- package/internal/components/chart-legend/styles.css.js +6 -6
- package/internal/components/chart-legend/styles.scoped.css +18 -21
- package/internal/components/chart-legend/styles.selectors.js +6 -6
- package/internal/components/chart-popover/styles.css.js +3 -3
- package/internal/components/chart-popover/styles.scoped.css +6 -9
- package/internal/components/chart-popover/styles.selectors.js +3 -3
- package/internal/components/chart-series-details/styles.css.js +20 -20
- package/internal/components/chart-series-details/styles.scoped.css +42 -51
- package/internal/components/chart-series-details/styles.selectors.js +20 -20
- package/internal/components/chart-series-marker/styles.css.js +5 -5
- package/internal/components/chart-series-marker/styles.scoped.css +10 -13
- package/internal/components/chart-series-marker/styles.selectors.js +5 -5
- package/internal/components/chart-wrapper/styles.css.js +9 -9
- package/internal/components/chart-wrapper/styles.scoped.css +12 -15
- package/internal/components/chart-wrapper/styles.selectors.js +9 -9
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +38 -41
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/dropdown-footer/styles.css.js +3 -3
- package/internal/components/dropdown-footer/styles.scoped.css +6 -9
- package/internal/components/dropdown-footer/styles.selectors.js +3 -3
- package/internal/components/dropdown-status/styles.css.js +2 -2
- package/internal/components/dropdown-status/styles.scoped.css +5 -8
- package/internal/components/dropdown-status/styles.selectors.js +2 -2
- package/internal/components/focus-lock/utils.d.ts +1 -0
- package/internal/components/focus-lock/utils.d.ts.map +1 -1
- package/internal/components/focus-lock/utils.js +4 -3
- package/internal/components/focus-lock/utils.js.map +1 -1
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +16 -19
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/components/option/styles.css.js +17 -17
- package/internal/components/option/styles.scoped.css +32 -35
- package/internal/components/option/styles.selectors.js +17 -17
- package/internal/components/options-list/styles.css.js +2 -2
- package/internal/components/options-list/styles.scoped.css +5 -8
- package/internal/components/options-list/styles.selectors.js +2 -2
- package/internal/components/token-list/styles.css.js +9 -9
- package/internal/components/token-list/styles.scoped.css +23 -26
- package/internal/components/token-list/styles.selectors.js +9 -9
- package/internal/context/single-tab-stop-navigation-context.d.ts +9 -4
- package/internal/context/single-tab-stop-navigation-context.d.ts.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.js +15 -5
- package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/scrollable-containers.d.ts +2 -1
- package/internal/utils/scrollable-containers.d.ts.map +1 -1
- package/internal/utils/scrollable-containers.js +11 -2
- package/internal/utils/scrollable-containers.js.map +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +74 -77
- package/link/styles.selectors.js +20 -20
- package/modal/styles.css.js +23 -23
- package/modal/styles.scoped.css +44 -50
- package/modal/styles.selectors.js +23 -23
- package/multiselect/styles.css.js +2 -2
- package/multiselect/styles.scoped.css +5 -8
- package/multiselect/styles.selectors.js +2 -2
- package/package.json +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +26 -29
- package/pagination/styles.selectors.js +9 -9
- package/popover/styles.css.js +50 -50
- package/popover/styles.scoped.css +72 -81
- package/popover/styles.selectors.js +50 -50
- package/popover/use-popover-position.d.ts.map +1 -1
- package/popover/use-popover-position.js +4 -2
- package/popover/use-popover-position.js.map +1 -1
- package/progress-bar/styles.css.js +18 -18
- package/progress-bar/styles.scoped.css +35 -38
- package/progress-bar/styles.selectors.js +18 -18
- package/property-filter/styles.css.js +31 -31
- package/property-filter/styles.scoped.css +36 -39
- package/property-filter/styles.selectors.js +31 -31
- package/radio-group/styles.css.js +9 -9
- package/radio-group/styles.scoped.css +18 -21
- package/radio-group/styles.selectors.js +9 -9
- package/segmented-control/styles.css.js +14 -14
- package/segmented-control/styles.scoped.css +36 -39
- package/segmented-control/styles.selectors.js +14 -14
- package/select/styles.css.js +1 -1
- package/select/styles.scoped.css +4 -7
- package/select/styles.selectors.js +1 -1
- package/side-navigation/styles.css.js +28 -28
- package/side-navigation/styles.scoped.css +41 -44
- package/side-navigation/styles.selectors.js +28 -28
- package/split-panel/styles.css.js +55 -55
- package/split-panel/styles.scoped.css +78 -81
- package/split-panel/styles.selectors.js +55 -55
- package/table/resizer/styles.css.js +8 -8
- package/table/resizer/styles.scoped.css +17 -20
- package/table/resizer/styles.selectors.js +8 -8
- package/table/table-role/grid-navigation.d.ts.map +1 -1
- package/table/table-role/grid-navigation.js +73 -41
- package/table/table-role/grid-navigation.js.map +1 -1
- package/table/table-role/utils.d.ts +1 -16
- package/table/table-role/utils.d.ts.map +1 -1
- package/table/table-role/utils.js +0 -53
- package/table/table-role/utils.js.map +1 -1
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +42 -45
- package/tabs/styles.selectors.js +21 -21
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +63 -66
- package/text-content/styles.selectors.js +1 -1
- package/text-filter/styles.css.js +3 -3
- package/text-filter/styles.scoped.css +6 -9
- package/text-filter/styles.selectors.js +3 -3
- package/textarea/styles.css.js +4 -4
- package/textarea/styles.scoped.css +15 -18
- package/textarea/styles.selectors.js +4 -4
- package/tiles/styles.css.js +29 -29
- package/tiles/styles.scoped.css +76 -82
- package/tiles/styles.selectors.js +29 -29
- package/toggle/styles.css.js +8 -8
- package/toggle/styles.scoped.css +16 -19
- package/toggle/styles.selectors.js +8 -8
- package/token-group/styles.css.js +8 -8
- package/token-group/styles.scoped.css +19 -22
- package/token-group/styles.selectors.js +8 -8
- package/top-navigation/1.0-beta/styles.css.js +25 -25
- package/top-navigation/1.0-beta/styles.scoped.css +45 -48
- package/top-navigation/1.0-beta/styles.selectors.js +25 -25
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +75 -84
- package/top-navigation/styles.selectors.js +47 -47
- package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
- package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +24 -27
- package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +36 -45
- package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
- package/tutorial-panel/styles.css.js +1 -1
- package/tutorial-panel/styles.scoped.css +4 -7
- package/tutorial-panel/styles.selectors.js +1 -1
- package/wizard/styles.css.js +31 -31
- package/wizard/styles.scoped.css +65 -68
- package/wizard/styles.selectors.js +31 -31
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"option": "
|
|
5
|
-
"disabled": "
|
|
6
|
-
"parent": "
|
|
7
|
-
"highlighted": "
|
|
8
|
-
"content": "
|
|
9
|
-
"label-content": "awsui_label-
|
|
10
|
-
"label": "
|
|
11
|
-
"tag": "
|
|
12
|
-
"label-tag": "awsui_label-
|
|
13
|
-
"label-prefix": "awsui_label-
|
|
14
|
-
"tags": "
|
|
15
|
-
"description": "
|
|
16
|
-
"selected": "
|
|
17
|
-
"icon": "
|
|
18
|
-
"icon-size-big": "awsui_icon-size-
|
|
19
|
-
"filtering-match-highlight": "awsui_filtering-match-
|
|
20
|
-
"trigger-variant": "awsui_trigger-
|
|
4
|
+
"option": "awsui_option_1p2cx_m6mr2_97",
|
|
5
|
+
"disabled": "awsui_disabled_1p2cx_m6mr2_137",
|
|
6
|
+
"parent": "awsui_parent_1p2cx_m6mr2_140",
|
|
7
|
+
"highlighted": "awsui_highlighted_1p2cx_m6mr2_143",
|
|
8
|
+
"content": "awsui_content_1p2cx_m6mr2_147",
|
|
9
|
+
"label-content": "awsui_label-content_1p2cx_m6mr2_154",
|
|
10
|
+
"label": "awsui_label_1p2cx_m6mr2_154",
|
|
11
|
+
"tag": "awsui_tag_1p2cx_m6mr2_161",
|
|
12
|
+
"label-tag": "awsui_label-tag_1p2cx_m6mr2_162",
|
|
13
|
+
"label-prefix": "awsui_label-prefix_1p2cx_m6mr2_172",
|
|
14
|
+
"tags": "awsui_tags_1p2cx_m6mr2_185",
|
|
15
|
+
"description": "awsui_description_1p2cx_m6mr2_186",
|
|
16
|
+
"selected": "awsui_selected_1p2cx_m6mr2_197",
|
|
17
|
+
"icon": "awsui_icon_1p2cx_m6mr2_211",
|
|
18
|
+
"icon-size-big": "awsui_icon-size-big_1p2cx_m6mr2_218",
|
|
19
|
+
"filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_m6mr2_222",
|
|
20
|
+
"trigger-variant": "awsui_trigger-variant_1p2cx_m6mr2_237"
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -94,19 +94,19 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.
|
|
98
|
-
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
97
|
+
.awsui_option_1p2cx_m6mr2_97:not(#\9) {
|
|
99
98
|
border-collapse: separate;
|
|
100
99
|
border-spacing: 0;
|
|
100
|
+
box-sizing: border-box;
|
|
101
101
|
caption-side: top;
|
|
102
102
|
cursor: auto;
|
|
103
|
-
direction:
|
|
103
|
+
direction: inherit;
|
|
104
104
|
empty-cells: show;
|
|
105
105
|
font-family: serif;
|
|
106
106
|
font-size: medium;
|
|
107
107
|
font-style: normal;
|
|
108
108
|
font-variant: normal;
|
|
109
|
-
font-weight:
|
|
109
|
+
font-weight: 400;
|
|
110
110
|
font-stretch: normal;
|
|
111
111
|
line-height: normal;
|
|
112
112
|
-webkit-hyphens: none;
|
|
@@ -115,15 +115,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
115
115
|
list-style: disc outside none;
|
|
116
116
|
tab-size: 8;
|
|
117
117
|
text-align: left;
|
|
118
|
-
text-align-last: auto;
|
|
119
118
|
text-indent: 0;
|
|
120
119
|
text-shadow: none;
|
|
121
120
|
text-transform: none;
|
|
122
121
|
visibility: visible;
|
|
123
122
|
white-space: normal;
|
|
124
|
-
widows: 2;
|
|
125
123
|
word-spacing: normal;
|
|
126
|
-
box-sizing: border-box;
|
|
127
124
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
128
125
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
129
126
|
color: var(--color-text-body-default-at06ol, #000716);
|
|
@@ -138,107 +135,107 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
138
135
|
box-sizing: border-box;
|
|
139
136
|
color: inherit;
|
|
140
137
|
}
|
|
141
|
-
.
|
|
138
|
+
.awsui_option_1p2cx_m6mr2_97:not(#\9):not(.awsui_disabled_1p2cx_m6mr2_137) {
|
|
142
139
|
cursor: inherit;
|
|
143
140
|
}
|
|
144
|
-
.
|
|
141
|
+
.awsui_option_1p2cx_m6mr2_97.awsui_parent_1p2cx_m6mr2_140:not(#\9) {
|
|
145
142
|
font-weight: bold;
|
|
146
143
|
}
|
|
147
|
-
.
|
|
144
|
+
.awsui_option_1p2cx_m6mr2_97.awsui_parent_1p2cx_m6mr2_140:not(#\9):not(.awsui_disabled_1p2cx_m6mr2_137):not(.awsui_highlighted_1p2cx_m6mr2_143) {
|
|
148
145
|
color: var(--color-text-dropdown-group-label-4x4uyw, #414d5c);
|
|
149
146
|
}
|
|
150
147
|
|
|
151
|
-
.
|
|
148
|
+
.awsui_content_1p2cx_m6mr2_147:not(#\9) {
|
|
152
149
|
width: 100%;
|
|
153
150
|
display: flex;
|
|
154
151
|
flex-direction: column;
|
|
155
152
|
min-width: 0;
|
|
156
153
|
}
|
|
157
154
|
|
|
158
|
-
.awsui_label-
|
|
155
|
+
.awsui_label-content_1p2cx_m6mr2_154:not(#\9) {
|
|
159
156
|
display: flex;
|
|
160
157
|
justify-content: space-between;
|
|
161
158
|
flex-wrap: wrap;
|
|
162
159
|
}
|
|
163
160
|
|
|
164
|
-
.
|
|
165
|
-
.
|
|
166
|
-
.awsui_label-
|
|
161
|
+
.awsui_label_1p2cx_m6mr2_154:not(#\9),
|
|
162
|
+
.awsui_tag_1p2cx_m6mr2_161:not(#\9),
|
|
163
|
+
.awsui_label-tag_1p2cx_m6mr2_162:not(#\9) {
|
|
167
164
|
min-width: 0;
|
|
168
165
|
word-break: break-word;
|
|
169
166
|
}
|
|
170
167
|
|
|
171
|
-
.
|
|
172
|
-
.
|
|
168
|
+
.awsui_label_1p2cx_m6mr2_154:not(#\9),
|
|
169
|
+
.awsui_tag_1p2cx_m6mr2_161:not(#\9) {
|
|
173
170
|
flex-wrap: wrap;
|
|
174
171
|
}
|
|
175
172
|
|
|
176
|
-
.awsui_label-
|
|
173
|
+
.awsui_label-prefix_1p2cx_m6mr2_172:not(#\9) {
|
|
177
174
|
font-weight: 700;
|
|
178
175
|
}
|
|
179
176
|
|
|
180
|
-
.awsui_label-
|
|
177
|
+
.awsui_label-tag_1p2cx_m6mr2_162:not(#\9) {
|
|
181
178
|
padding-left: var(--space-s-34lx8l, 12px);
|
|
182
179
|
flex: auto;
|
|
183
180
|
text-align: right;
|
|
184
181
|
}
|
|
185
|
-
.awsui_label-
|
|
182
|
+
.awsui_label-tag_1p2cx_m6mr2_162:not(#\9):empty {
|
|
186
183
|
display: none;
|
|
187
184
|
}
|
|
188
185
|
|
|
189
|
-
.
|
|
190
|
-
.
|
|
186
|
+
.awsui_tags_1p2cx_m6mr2_185:not(#\9),
|
|
187
|
+
.awsui_description_1p2cx_m6mr2_186:not(#\9) {
|
|
191
188
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
192
189
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
193
190
|
letter-spacing: var(--letter-spacing-body-s-z9jkwp, 0.005em);
|
|
194
191
|
color: var(--color-text-dropdown-item-secondary-jho0ju, #5f6b7a);
|
|
195
192
|
flex-wrap: wrap;
|
|
196
193
|
}
|
|
197
|
-
.
|
|
198
|
-
.
|
|
194
|
+
.awsui_tags_1p2cx_m6mr2_185.awsui_highlighted_1p2cx_m6mr2_143:not(#\9),
|
|
195
|
+
.awsui_description_1p2cx_m6mr2_186.awsui_highlighted_1p2cx_m6mr2_143:not(#\9) {
|
|
199
196
|
color: var(--color-text-dropdown-item-secondary-hover-zfmqjr, #5f6b7a);
|
|
200
197
|
}
|
|
201
|
-
.
|
|
202
|
-
.
|
|
198
|
+
.awsui_tags_1p2cx_m6mr2_185.awsui_selected_1p2cx_m6mr2_197:not(#\9),
|
|
199
|
+
.awsui_description_1p2cx_m6mr2_186.awsui_selected_1p2cx_m6mr2_197:not(#\9) {
|
|
203
200
|
color: var(--color-text-dropdown-item-secondary-jho0ju, #5f6b7a);
|
|
204
201
|
}
|
|
205
202
|
|
|
206
|
-
.
|
|
203
|
+
.awsui_tags_1p2cx_m6mr2_185:not(#\9) {
|
|
207
204
|
display: flex;
|
|
208
205
|
align-items: stretch;
|
|
209
206
|
}
|
|
210
207
|
|
|
211
|
-
.
|
|
208
|
+
.awsui_tag_1p2cx_m6mr2_161:not(#\9):not(:last-child) {
|
|
212
209
|
padding-right: var(--space-m-udix3p, 16px);
|
|
213
210
|
}
|
|
214
211
|
|
|
215
|
-
.
|
|
212
|
+
.awsui_icon_1p2cx_m6mr2_211:not(#\9) {
|
|
216
213
|
padding-right: var(--space-xs-zb16t3, 8px);
|
|
217
214
|
align-content: center;
|
|
218
215
|
display: flex;
|
|
219
216
|
flex-shrink: 0;
|
|
220
217
|
}
|
|
221
218
|
|
|
222
|
-
.awsui_icon-size-
|
|
219
|
+
.awsui_icon-size-big_1p2cx_m6mr2_218:not(#\9) {
|
|
223
220
|
padding-top: var(--space-option-icon-big-top-hybljv, 0px);
|
|
224
221
|
}
|
|
225
222
|
|
|
226
|
-
.awsui_filtering-match-
|
|
223
|
+
.awsui_filtering-match-highlight_1p2cx_m6mr2_222:not(#\9) {
|
|
227
224
|
background-color: var(--color-background-dropdown-item-filter-match-h5rjsp, #f2f8fd);
|
|
228
225
|
color: var(--color-text-dropdown-item-filter-match-6moumb, #0972d3);
|
|
229
226
|
font-weight: bold;
|
|
230
227
|
}
|
|
231
228
|
|
|
232
|
-
.
|
|
229
|
+
.awsui_disabled_1p2cx_m6mr2_137:not(#\9) {
|
|
233
230
|
color: var(--color-text-dropdown-item-disabled-6oq3n6, #9ba7b6);
|
|
234
231
|
pointer-events: none;
|
|
235
232
|
}
|
|
236
|
-
.
|
|
237
|
-
.
|
|
233
|
+
.awsui_disabled_1p2cx_m6mr2_137 > .awsui_content_1p2cx_m6mr2_147 > .awsui_tags_1p2cx_m6mr2_185:not(#\9),
|
|
234
|
+
.awsui_disabled_1p2cx_m6mr2_137 > .awsui_content_1p2cx_m6mr2_147 > .awsui_description_1p2cx_m6mr2_186:not(#\9) {
|
|
238
235
|
color: currentColor;
|
|
239
236
|
}
|
|
240
237
|
|
|
241
|
-
.awsui_trigger-
|
|
238
|
+
.awsui_trigger-variant_1p2cx_m6mr2_237:not(#\9) {
|
|
242
239
|
white-space: nowrap;
|
|
243
240
|
overflow: hidden;
|
|
244
241
|
text-overflow: ellipsis;
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"option": "
|
|
6
|
-
"disabled": "
|
|
7
|
-
"parent": "
|
|
8
|
-
"highlighted": "
|
|
9
|
-
"content": "
|
|
10
|
-
"label-content": "awsui_label-
|
|
11
|
-
"label": "
|
|
12
|
-
"tag": "
|
|
13
|
-
"label-tag": "awsui_label-
|
|
14
|
-
"label-prefix": "awsui_label-
|
|
15
|
-
"tags": "
|
|
16
|
-
"description": "
|
|
17
|
-
"selected": "
|
|
18
|
-
"icon": "
|
|
19
|
-
"icon-size-big": "awsui_icon-size-
|
|
20
|
-
"filtering-match-highlight": "awsui_filtering-match-
|
|
21
|
-
"trigger-variant": "awsui_trigger-
|
|
5
|
+
"option": "awsui_option_1p2cx_m6mr2_97",
|
|
6
|
+
"disabled": "awsui_disabled_1p2cx_m6mr2_137",
|
|
7
|
+
"parent": "awsui_parent_1p2cx_m6mr2_140",
|
|
8
|
+
"highlighted": "awsui_highlighted_1p2cx_m6mr2_143",
|
|
9
|
+
"content": "awsui_content_1p2cx_m6mr2_147",
|
|
10
|
+
"label-content": "awsui_label-content_1p2cx_m6mr2_154",
|
|
11
|
+
"label": "awsui_label_1p2cx_m6mr2_154",
|
|
12
|
+
"tag": "awsui_tag_1p2cx_m6mr2_161",
|
|
13
|
+
"label-tag": "awsui_label-tag_1p2cx_m6mr2_162",
|
|
14
|
+
"label-prefix": "awsui_label-prefix_1p2cx_m6mr2_172",
|
|
15
|
+
"tags": "awsui_tags_1p2cx_m6mr2_185",
|
|
16
|
+
"description": "awsui_description_1p2cx_m6mr2_186",
|
|
17
|
+
"selected": "awsui_selected_1p2cx_m6mr2_197",
|
|
18
|
+
"icon": "awsui_icon_1p2cx_m6mr2_211",
|
|
19
|
+
"icon-size-big": "awsui_icon-size-big_1p2cx_m6mr2_218",
|
|
20
|
+
"filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_m6mr2_222",
|
|
21
|
+
"trigger-variant": "awsui_trigger-variant_1p2cx_m6mr2_237"
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"options-list": "awsui_options-
|
|
5
|
-
"decrease-top-margin": "awsui_decrease-top-
|
|
4
|
+
"options-list": "awsui_options-list_19gcf_fx7kx_93",
|
|
5
|
+
"decrease-top-margin": "awsui_decrease-top-margin_19gcf_fx7kx_137"
|
|
6
6
|
};
|
|
7
7
|
|
|
@@ -90,23 +90,23 @@ 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
|
-
.awsui_options-
|
|
93
|
+
.awsui_options-list_19gcf_fx7kx_93:not(#\9) {
|
|
94
94
|
padding: 0;
|
|
95
95
|
margin: 0;
|
|
96
96
|
outline: none;
|
|
97
97
|
border: none;
|
|
98
|
-
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
99
98
|
border-collapse: separate;
|
|
100
99
|
border-spacing: 0;
|
|
100
|
+
box-sizing: border-box;
|
|
101
101
|
caption-side: top;
|
|
102
102
|
cursor: auto;
|
|
103
|
-
direction:
|
|
103
|
+
direction: inherit;
|
|
104
104
|
empty-cells: show;
|
|
105
105
|
font-family: serif;
|
|
106
106
|
font-size: medium;
|
|
107
107
|
font-style: normal;
|
|
108
108
|
font-variant: normal;
|
|
109
|
-
font-weight:
|
|
109
|
+
font-weight: 400;
|
|
110
110
|
font-stretch: normal;
|
|
111
111
|
line-height: normal;
|
|
112
112
|
-webkit-hyphens: none;
|
|
@@ -115,15 +115,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
115
115
|
list-style: disc outside none;
|
|
116
116
|
tab-size: 8;
|
|
117
117
|
text-align: left;
|
|
118
|
-
text-align-last: auto;
|
|
119
118
|
text-indent: 0;
|
|
120
119
|
text-shadow: none;
|
|
121
120
|
text-transform: none;
|
|
122
121
|
visibility: visible;
|
|
123
122
|
white-space: normal;
|
|
124
|
-
widows: 2;
|
|
125
123
|
word-spacing: normal;
|
|
126
|
-
box-sizing: border-box;
|
|
127
124
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
128
125
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
129
126
|
color: var(--color-text-body-default-at06ol, #000716);
|
|
@@ -138,6 +135,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
138
135
|
border-radius: var(--border-radius-dropdown-0dhh79, 8px);
|
|
139
136
|
}
|
|
140
137
|
|
|
141
|
-
.awsui_decrease-top-
|
|
138
|
+
.awsui_decrease-top-margin_19gcf_fx7kx_137:not(#\9) {
|
|
142
139
|
margin-top: -1px;
|
|
143
140
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"options-list": "awsui_options-
|
|
6
|
-
"decrease-top-margin": "awsui_decrease-top-
|
|
5
|
+
"options-list": "awsui_options-list_19gcf_fx7kx_93",
|
|
6
|
+
"decrease-top-margin": "awsui_decrease-top-margin_19gcf_fx7kx_137"
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"horizontal": "
|
|
6
|
-
"vertical": "
|
|
7
|
-
"list": "
|
|
8
|
-
"list-item": "awsui_list-
|
|
9
|
-
"toggle-container-inline": "awsui_toggle-container-
|
|
10
|
-
"toggle": "
|
|
11
|
-
"description": "
|
|
12
|
-
"separator": "
|
|
4
|
+
"root": "awsui_root_gfwv3_1xf4n_93",
|
|
5
|
+
"horizontal": "awsui_horizontal_gfwv3_1xf4n_98",
|
|
6
|
+
"vertical": "awsui_vertical_gfwv3_1xf4n_102",
|
|
7
|
+
"list": "awsui_list_gfwv3_1xf4n_106",
|
|
8
|
+
"list-item": "awsui_list-item_gfwv3_1xf4n_124",
|
|
9
|
+
"toggle-container-inline": "awsui_toggle-container-inline_gfwv3_1xf4n_129",
|
|
10
|
+
"toggle": "awsui_toggle_gfwv3_1xf4n_129",
|
|
11
|
+
"description": "awsui_description_gfwv3_1xf4n_219",
|
|
12
|
+
"separator": "awsui_separator_gfwv3_1xf4n_223"
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -90,61 +90,61 @@ 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_root_gfwv3_1xf4n_93:not(#\9) {
|
|
94
94
|
display: flex;
|
|
95
95
|
flex-wrap: wrap;
|
|
96
96
|
gap: var(--space-scaled-xs-26e2du, 8px);
|
|
97
97
|
}
|
|
98
|
-
.
|
|
98
|
+
.awsui_root_gfwv3_1xf4n_93.awsui_horizontal_gfwv3_1xf4n_98:not(#\9) {
|
|
99
99
|
gap: var(--space-xs-zb16t3, 8px);
|
|
100
100
|
flex-direction: row;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
.awsui_root_gfwv3_1xf4n_93.awsui_vertical_gfwv3_1xf4n_102:not(#\9) {
|
|
103
103
|
flex-direction: column;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.
|
|
106
|
+
.awsui_list_gfwv3_1xf4n_106:not(#\9) {
|
|
107
107
|
display: contents;
|
|
108
108
|
list-style: none;
|
|
109
109
|
padding: 0;
|
|
110
110
|
margin: 0;
|
|
111
111
|
}
|
|
112
|
-
.
|
|
112
|
+
.awsui_list_gfwv3_1xf4n_106.awsui_horizontal_gfwv3_1xf4n_98:not(#\9), .awsui_list_gfwv3_1xf4n_106.awsui_vertical_gfwv3_1xf4n_102:not(#\9) {
|
|
113
113
|
display: flex;
|
|
114
114
|
flex-wrap: wrap;
|
|
115
115
|
gap: var(--space-xs-zb16t3, 8px);
|
|
116
116
|
}
|
|
117
|
-
.
|
|
117
|
+
.awsui_list_gfwv3_1xf4n_106.awsui_horizontal_gfwv3_1xf4n_98:not(#\9) {
|
|
118
118
|
flex-direction: row;
|
|
119
119
|
}
|
|
120
|
-
.
|
|
120
|
+
.awsui_list_gfwv3_1xf4n_106.awsui_vertical_gfwv3_1xf4n_102:not(#\9) {
|
|
121
121
|
flex-direction: column;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
.awsui_list-
|
|
124
|
+
.awsui_list-item_gfwv3_1xf4n_124:not(#\9) {
|
|
125
125
|
padding: 0;
|
|
126
126
|
margin: 0;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.awsui_toggle-container-
|
|
129
|
+
.awsui_toggle-container-inline_gfwv3_1xf4n_129:not(#\9) {
|
|
130
130
|
padding-left: var(--space-xs-zb16t3, 8px);
|
|
131
131
|
display: flex;
|
|
132
132
|
align-items: center;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
.
|
|
136
|
-
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
135
|
+
.awsui_toggle_gfwv3_1xf4n_129:not(#\9) {
|
|
137
136
|
border-collapse: separate;
|
|
138
137
|
border-spacing: 0;
|
|
138
|
+
box-sizing: border-box;
|
|
139
139
|
caption-side: top;
|
|
140
140
|
cursor: auto;
|
|
141
|
-
direction:
|
|
141
|
+
direction: inherit;
|
|
142
142
|
empty-cells: show;
|
|
143
143
|
font-family: serif;
|
|
144
144
|
font-size: medium;
|
|
145
145
|
font-style: normal;
|
|
146
146
|
font-variant: normal;
|
|
147
|
-
font-weight:
|
|
147
|
+
font-weight: 400;
|
|
148
148
|
font-stretch: normal;
|
|
149
149
|
line-height: normal;
|
|
150
150
|
-webkit-hyphens: none;
|
|
@@ -153,15 +153,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
153
153
|
list-style: disc outside none;
|
|
154
154
|
tab-size: 8;
|
|
155
155
|
text-align: left;
|
|
156
|
-
text-align-last: auto;
|
|
157
156
|
text-indent: 0;
|
|
158
157
|
text-shadow: none;
|
|
159
158
|
text-transform: none;
|
|
160
159
|
visibility: visible;
|
|
161
160
|
white-space: normal;
|
|
162
|
-
widows: 2;
|
|
163
161
|
word-spacing: normal;
|
|
164
|
-
box-sizing: border-box;
|
|
165
162
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
166
163
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
167
164
|
color: var(--color-text-body-default-at06ol, #000716);
|
|
@@ -188,45 +185,45 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
188
185
|
margin-left: -1px;
|
|
189
186
|
}
|
|
190
187
|
@media (prefers-reduced-motion: reduce) {
|
|
191
|
-
.
|
|
188
|
+
.awsui_toggle_gfwv3_1xf4n_129:not(#\9) {
|
|
192
189
|
animation: none;
|
|
193
190
|
transition: none;
|
|
194
191
|
}
|
|
195
192
|
}
|
|
196
|
-
.awsui-motion-disabled .
|
|
193
|
+
.awsui-motion-disabled .awsui_toggle_gfwv3_1xf4n_129:not(#\9), .awsui-mode-entering .awsui_toggle_gfwv3_1xf4n_129:not(#\9) {
|
|
197
194
|
animation: none;
|
|
198
195
|
transition: none;
|
|
199
196
|
}
|
|
200
|
-
.
|
|
197
|
+
.awsui_toggle_gfwv3_1xf4n_129:not(#\9):hover {
|
|
201
198
|
cursor: pointer;
|
|
202
199
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
203
200
|
}
|
|
204
|
-
.
|
|
201
|
+
.awsui_toggle_gfwv3_1xf4n_129:not(#\9):focus {
|
|
205
202
|
outline: none;
|
|
206
203
|
}
|
|
207
|
-
.
|
|
204
|
+
.awsui_toggle_gfwv3_1xf4n_129:not(#\9):active {
|
|
208
205
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
209
206
|
}
|
|
210
|
-
.
|
|
207
|
+
.awsui_toggle_gfwv3_1xf4n_129:not(#\9):active, .awsui_toggle_gfwv3_1xf4n_129:not(#\9):focus, .awsui_toggle_gfwv3_1xf4n_129:not(#\9):hover {
|
|
211
208
|
text-decoration-line: underline;
|
|
212
209
|
text-decoration-color: currentColor;
|
|
213
210
|
}
|
|
214
|
-
.
|
|
211
|
+
.awsui_toggle_gfwv3_1xf4n_129:not(#\9):active, .awsui_toggle_gfwv3_1xf4n_129:not(#\9):focus, .awsui_toggle_gfwv3_1xf4n_129:not(#\9):hover {
|
|
215
212
|
text-decoration: none;
|
|
216
213
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
217
214
|
text-decoration-color: transparent;
|
|
218
215
|
}
|
|
219
|
-
body[data-awsui-focus-visible=true] .
|
|
216
|
+
body[data-awsui-focus-visible=true] .awsui_toggle_gfwv3_1xf4n_129:not(#\9):focus {
|
|
220
217
|
outline: 2px dotted transparent;
|
|
221
218
|
border: var(--border-field-width-09w7vk, 2px) solid var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
222
219
|
border-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
223
220
|
box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-0ctpjf, 0px) var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
224
221
|
}
|
|
225
|
-
.
|
|
222
|
+
.awsui_toggle_gfwv3_1xf4n_129 > .awsui_description_gfwv3_1xf4n_219:not(#\9) {
|
|
226
223
|
margin-left: var(--space-xxs-p8yyaw, 4px);
|
|
227
224
|
}
|
|
228
225
|
|
|
229
|
-
.
|
|
226
|
+
.awsui_separator_gfwv3_1xf4n_223:not(#\9) {
|
|
230
227
|
margin: 0px var(--space-scaled-m-mo5yse, 16px);
|
|
231
228
|
width: var(--border-divider-section-width-1061zr, 1px);
|
|
232
229
|
background-color: var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
@@ -2,14 +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
|
-
"root": "
|
|
6
|
-
"horizontal": "
|
|
7
|
-
"vertical": "
|
|
8
|
-
"list": "
|
|
9
|
-
"list-item": "awsui_list-
|
|
10
|
-
"toggle-container-inline": "awsui_toggle-container-
|
|
11
|
-
"toggle": "
|
|
12
|
-
"description": "
|
|
13
|
-
"separator": "
|
|
5
|
+
"root": "awsui_root_gfwv3_1xf4n_93",
|
|
6
|
+
"horizontal": "awsui_horizontal_gfwv3_1xf4n_98",
|
|
7
|
+
"vertical": "awsui_vertical_gfwv3_1xf4n_102",
|
|
8
|
+
"list": "awsui_list_gfwv3_1xf4n_106",
|
|
9
|
+
"list-item": "awsui_list-item_gfwv3_1xf4n_124",
|
|
10
|
+
"toggle-container-inline": "awsui_toggle-container-inline_gfwv3_1xf4n_129",
|
|
11
|
+
"toggle": "awsui_toggle_gfwv3_1xf4n_129",
|
|
12
|
+
"description": "awsui_description_gfwv3_1xf4n_219",
|
|
13
|
+
"separator": "awsui_separator_gfwv3_1xf4n_223"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type FocusableDefinition = React.RefObject<Element>;
|
|
3
|
+
export type FocusableChangeHandler = (focusTarget: null | Element, suppressed: boolean) => void;
|
|
4
|
+
export interface SingleTabStopNavigationOptions {
|
|
5
|
+
tabIndex?: number;
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Single tab stop navigation context is used together with keyboard navigation that requires a single tab stop.
|
|
4
9
|
* It instructs interactive elements to override tab indices for just a single one to remain user-focusable.
|
|
5
10
|
*/
|
|
6
|
-
export declare const SingleTabStopNavigationContext:
|
|
7
|
-
focusTarget: null | Element;
|
|
11
|
+
export declare const SingleTabStopNavigationContext: React.Context<{
|
|
8
12
|
navigationActive: boolean;
|
|
13
|
+
registerFocusable(focusable: FocusableDefinition, handler: FocusableChangeHandler): () => void;
|
|
9
14
|
}>;
|
|
10
|
-
export declare function useSingleTabStopNavigation(focusable: null |
|
|
15
|
+
export declare function useSingleTabStopNavigation(focusable: null | FocusableDefinition, options?: {
|
|
11
16
|
tabIndex?: number;
|
|
12
17
|
}): {
|
|
13
18
|
navigationActive: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-tab-stop-navigation-context.d.ts","sourceRoot":"lib/default/","sources":["internal/context/single-tab-stop-navigation-context.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"single-tab-stop-navigation-context.d.ts","sourceRoot":"lib/default/","sources":["internal/context/single-tab-stop-navigation-context.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAE3F,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAE3D,MAAM,MAAM,sBAAsB,GAAG,CAAC,WAAW,EAAE,IAAI,GAAG,OAAO,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;AAEhG,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,8BAA8B;sBACvB,OAAO;+DACkC,sBAAsB,GAAG,MAAM,IAAI;EAI9F,CAAC;AAEH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,IAAI,GAAG,mBAAmB,EAAE,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE;;;EA2BhH"}
|
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { createContext, useContext } from 'react';
|
|
3
|
+
import { createContext, useCallback, useContext, useEffect, useState } from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* Single tab stop navigation context is used together with keyboard navigation that requires a single tab stop.
|
|
6
6
|
* It instructs interactive elements to override tab indices for just a single one to remain user-focusable.
|
|
7
7
|
*/
|
|
8
8
|
export const SingleTabStopNavigationContext = createContext({
|
|
9
|
-
focusTarget: null,
|
|
10
9
|
navigationActive: false,
|
|
10
|
+
registerFocusable: () => () => { },
|
|
11
11
|
});
|
|
12
12
|
export function useSingleTabStopNavigation(focusable, options) {
|
|
13
|
-
|
|
14
|
-
const
|
|
13
|
+
var _a;
|
|
14
|
+
const { navigationActive: contextNavigationActive, registerFocusable: contextRegisterFocusable } = useContext(SingleTabStopNavigationContext);
|
|
15
|
+
const [focusTargetActive, setFocusTargetActive] = useState(false);
|
|
16
|
+
const navigationActive = contextNavigationActive && (!(options === null || options === void 0 ? void 0 : options.tabIndex) || (options === null || options === void 0 ? void 0 : options.tabIndex) >= 0);
|
|
17
|
+
const registerFocusable = useCallback((focusable, changeHandler) => navigationActive ? contextRegisterFocusable(focusable, changeHandler) : () => { }, [navigationActive, contextRegisterFocusable]);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (focusable) {
|
|
20
|
+
const changeHandler = (element, suppressed) => setFocusTargetActive(focusable.current === element || suppressed);
|
|
21
|
+
const unregister = registerFocusable(focusable, changeHandler);
|
|
22
|
+
return () => unregister();
|
|
23
|
+
}
|
|
24
|
+
}, [focusable, registerFocusable]);
|
|
15
25
|
let tabIndex = options === null || options === void 0 ? void 0 : options.tabIndex;
|
|
16
26
|
if (navigationActive) {
|
|
17
|
-
tabIndex = !focusTargetActive ? -1 : tabIndex !== null &&
|
|
27
|
+
tabIndex = !focusTargetActive ? -1 : (_a = options === null || options === void 0 ? void 0 : options.tabIndex) !== null && _a !== void 0 ? _a : 0;
|
|
18
28
|
}
|
|
19
29
|
return { navigationActive, tabIndex };
|
|
20
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-tab-stop-navigation-context.js","sourceRoot":"lib/default/","sources":["internal/context/single-tab-stop-navigation-context.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,
|
|
1
|
+
{"version":3,"file":"single-tab-stop-navigation-context.js","sourceRoot":"lib/default/","sources":["internal/context/single-tab-stop-navigation-context.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAc,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAU3F;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,aAAa,CAGxD;IACD,gBAAgB,EAAE,KAAK;IACvB,iBAAiB,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B,CAAC,SAAqC,EAAE,OAA+B;;IAC/G,MAAM,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,GAC9F,UAAU,CAAC,8BAA8B,CAAC,CAAC;IAC7C,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElE,MAAM,gBAAgB,GAAG,uBAAuB,IAAI,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAA,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,KAAI,CAAC,CAAC,CAAC;IACnG,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,SAA8B,EAAE,aAAqC,EAAE,EAAE,CACxE,gBAAgB,CAAC,CAAC,CAAC,wBAAwB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,EAClF,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,CAC7C,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,EAAE;YACb,MAAM,aAAa,GAAG,CAAC,OAAuB,EAAE,UAAmB,EAAE,EAAE,CACrE,oBAAoB,CAAC,SAAS,CAAC,OAAO,KAAK,OAAO,IAAI,UAAU,CAAC,CAAC;YACpE,MAAM,UAAU,GAAG,iBAAiB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;YAC/D,OAAO,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC;SAC3B;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAEnC,IAAI,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC;IACjC,IAAI,gBAAgB,EAAE;QACpB,QAAQ,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,CAAC,CAAC;KAC7D;IAED,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC;AACxC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { createContext, useCallback, useContext, useEffect, useState } from 'react';\n\nexport type FocusableDefinition = React.RefObject<Element>;\n\nexport type FocusableChangeHandler = (focusTarget: null | Element, suppressed: boolean) => void;\n\nexport interface SingleTabStopNavigationOptions {\n tabIndex?: number;\n}\n\n/**\n * Single tab stop navigation context is used together with keyboard navigation that requires a single tab stop.\n * It instructs interactive elements to override tab indices for just a single one to remain user-focusable.\n */\nexport const SingleTabStopNavigationContext = createContext<{\n navigationActive: boolean;\n registerFocusable(focusable: FocusableDefinition, handler: FocusableChangeHandler): () => void;\n}>({\n navigationActive: false,\n registerFocusable: () => () => {},\n});\n\nexport function useSingleTabStopNavigation(focusable: null | FocusableDefinition, options?: { tabIndex?: number }) {\n const { navigationActive: contextNavigationActive, registerFocusable: contextRegisterFocusable } =\n useContext(SingleTabStopNavigationContext);\n const [focusTargetActive, setFocusTargetActive] = useState(false);\n\n const navigationActive = contextNavigationActive && (!options?.tabIndex || options?.tabIndex >= 0);\n const registerFocusable = useCallback(\n (focusable: FocusableDefinition, changeHandler: FocusableChangeHandler) =>\n navigationActive ? contextRegisterFocusable(focusable, changeHandler) : () => {},\n [navigationActive, contextRegisterFocusable]\n );\n\n useEffect(() => {\n if (focusable) {\n const changeHandler = (element: null | Element, suppressed: boolean) =>\n setFocusTargetActive(focusable.current === element || suppressed);\n const unregister = registerFocusable(focusable, changeHandler);\n return () => unregister();\n }\n }, [focusable, registerFocusable]);\n\n let tabIndex = options?.tabIndex;\n if (navigationActive) {\n tabIndex = !focusTargetActive ? -1 : options?.tabIndex ?? 0;\n }\n\n return { navigationActive, tabIndex };\n}\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED