@cloudscape-design/components-themeable 3.0.972 → 3.0.974
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/internal/components/drag-handle-wrapper/motion.scss +53 -161
- package/lib/internal/scss/internal/components/panel-resize-handle/styles.scss +3 -20
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +59 -57
- package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +32 -32
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
- package/lib/internal/template/app-layout/classic.d.ts.map +1 -1
- package/lib/internal/template/app-layout/classic.js +3 -2
- package/lib/internal/template/app-layout/classic.js.map +1 -1
- package/lib/internal/template/app-layout/drawer/interfaces.d.ts +1 -0
- package/lib/internal/template/app-layout/drawer/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/drawer/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/drawer/resizable-drawer.js +6 -6
- package/lib/internal/template/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/interfaces.d.ts +1 -0
- package/lib/internal/template/app-layout/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/utils/use-keyboard-events.d.ts +5 -1
- package/lib/internal/template/app-layout/utils/use-keyboard-events.d.ts.map +1 -1
- package/lib/internal/template/app-layout/utils/use-keyboard-events.js +65 -42
- package/lib/internal/template/app-layout/utils/use-keyboard-events.js.map +1 -1
- package/lib/internal/template/app-layout/utils/use-resize.d.ts.map +1 -1
- package/lib/internal/template/app-layout/utils/use-resize.js +3 -3
- package/lib/internal/template/app-layout/utils/use-resize.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +10 -10
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +12 -12
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +10 -10
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +19 -19
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +43 -43
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +19 -19
- package/lib/internal/template/content-layout/styles.css.js +14 -14
- package/lib/internal/template/content-layout/styles.scoped.css +27 -27
- package/lib/internal/template/content-layout/styles.selectors.js +14 -14
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +166 -166
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/i18n/messages/all.all.js +1 -1
- package/lib/internal/template/i18n/messages/all.all.json +1 -1
- package/lib/internal/template/i18n/messages/all.ar.js +1 -1
- package/lib/internal/template/i18n/messages/all.ar.json +1 -1
- package/lib/internal/template/i18n/messages/all.de.js +1 -1
- package/lib/internal/template/i18n/messages/all.de.json +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
- package/lib/internal/template/i18n/messages/all.en.js +1 -1
- package/lib/internal/template/i18n/messages/all.en.json +1 -1
- package/lib/internal/template/i18n/messages/all.es.js +1 -1
- package/lib/internal/template/i18n/messages/all.es.json +1 -1
- package/lib/internal/template/i18n/messages/all.fr.js +1 -1
- package/lib/internal/template/i18n/messages/all.fr.json +1 -1
- package/lib/internal/template/i18n/messages/all.id.js +1 -1
- package/lib/internal/template/i18n/messages/all.id.json +1 -1
- package/lib/internal/template/i18n/messages/all.it.js +1 -1
- package/lib/internal/template/i18n/messages/all.it.json +1 -1
- package/lib/internal/template/i18n/messages/all.ja.js +1 -1
- package/lib/internal/template/i18n/messages/all.ja.json +1 -1
- package/lib/internal/template/i18n/messages/all.ko.js +1 -1
- package/lib/internal/template/i18n/messages/all.ko.json +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
- package/lib/internal/template/i18n/messages/all.tr.js +1 -1
- package/lib/internal/template/i18n/messages/all.tr.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
- package/lib/internal/template/i18n/messages-types.d.ts +1 -0
- package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
- package/lib/internal/template/i18n/messages-types.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/button.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle/button.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/button.js +2 -3
- package/lib/internal/template/internal/components/drag-handle/button.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts +0 -3
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js +8 -6
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +21 -27
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -235
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +21 -27
- package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
- package/lib/internal/template/internal/components/dropdown/styles.scoped.css +38 -38
- package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/internal/components/panel-resize-handle/index.d.ts +3 -0
- package/lib/internal/template/internal/components/panel-resize-handle/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/panel-resize-handle/index.js +11 -4
- package/lib/internal/template/internal/components/panel-resize-handle/index.js.map +1 -1
- package/lib/internal/template/internal/components/panel-resize-handle/styles.css.js +2 -5
- package/lib/internal/template/internal/components/panel-resize-handle/styles.scoped.css +9 -26
- package/lib/internal/template/internal/components/panel-resize-handle/styles.selectors.js +2 -5
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +2 -0
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +59 -57
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +1 -0
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.js.map +1 -1
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +86 -86
- package/lib/internal/template/slider/styles.selectors.js +26 -26
- package/lib/internal/template/spinner/styles.css.js +13 -13
- package/lib/internal/template/spinner/styles.scoped.css +39 -39
- package/lib/internal/template/spinner/styles.selectors.js +13 -13
- package/lib/internal/template/split-panel/implementation.d.ts.map +1 -1
- package/lib/internal/template/split-panel/implementation.js +3 -3
- package/lib/internal/template/split-panel/implementation.js.map +1 -1
- package/lib/internal/template/split-panel/index.d.ts.map +1 -1
- package/lib/internal/template/split-panel/index.js +1 -1
- package/lib/internal/template/split-panel/index.js.map +1 -1
- package/lib/internal/template/split-panel/interfaces.d.ts +1 -0
- package/lib/internal/template/split-panel/interfaces.d.ts.map +1 -1
- package/lib/internal/template/split-panel/interfaces.js.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.d.ts.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.js +1 -0
- package/lib/internal/template/tabs/tab-header-bar.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/template/internal/components/panel-resize-handle/icon.d.ts +0 -5
- package/lib/internal/template/internal/components/panel-resize-handle/icon.d.ts.map +0 -1
- package/lib/internal/template/internal/components/panel-resize-handle/icon.js +0 -9
- package/lib/internal/template/internal/components/panel-resize-handle/icon.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"spinner-rotator": "awsui_spinner-
|
|
6
|
-
"size-normal": "awsui_size-
|
|
7
|
-
"size-big": "awsui_size-
|
|
8
|
-
"size-large": "awsui_size-
|
|
9
|
-
"variant-normal": "awsui_variant-
|
|
10
|
-
"variant-disabled": "awsui_variant-
|
|
11
|
-
"variant-inverted": "awsui_variant-
|
|
12
|
-
"circle": "
|
|
13
|
-
"circle-left": "awsui_circle-
|
|
14
|
-
"spinner-line-left": "awsui_spinner-line-
|
|
15
|
-
"circle-right": "awsui_circle-
|
|
16
|
-
"spinner-line-right": "awsui_spinner-line-
|
|
4
|
+
"root": "awsui_root_1612d_15gnh_183",
|
|
5
|
+
"spinner-rotator": "awsui_spinner-rotator_1612d_15gnh_1",
|
|
6
|
+
"size-normal": "awsui_size-normal_1612d_15gnh_198",
|
|
7
|
+
"size-big": "awsui_size-big_1612d_15gnh_206",
|
|
8
|
+
"size-large": "awsui_size-large_1612d_15gnh_214",
|
|
9
|
+
"variant-normal": "awsui_variant-normal_1612d_15gnh_222",
|
|
10
|
+
"variant-disabled": "awsui_variant-disabled_1612d_15gnh_225",
|
|
11
|
+
"variant-inverted": "awsui_variant-inverted_1612d_15gnh_228",
|
|
12
|
+
"circle": "awsui_circle_1612d_15gnh_240",
|
|
13
|
+
"circle-left": "awsui_circle-left_1612d_15gnh_268",
|
|
14
|
+
"spinner-line-left": "awsui_spinner-line-left_1612d_15gnh_1",
|
|
15
|
+
"circle-right": "awsui_circle-right_1612d_15gnh_273",
|
|
16
|
+
"spinner-line-right": "awsui_spinner-line-right_1612d_15gnh_1"
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -150,52 +150,52 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
150
150
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
151
151
|
SPDX-License-Identifier: Apache-2.0
|
|
152
152
|
*/
|
|
153
|
-
@keyframes awsui_spinner-
|
|
153
|
+
@keyframes awsui_spinner-rotator_1612d_15gnh_1 {
|
|
154
154
|
0% {
|
|
155
|
-
transform: rotate(var(--awsui-spinner-rotator-from-
|
|
155
|
+
transform: rotate(var(--awsui-spinner-rotator-from-xgujsu));
|
|
156
156
|
}
|
|
157
157
|
100% {
|
|
158
|
-
transform: rotate(var(--awsui-spinner-rotator-to-
|
|
158
|
+
transform: rotate(var(--awsui-spinner-rotator-to-xgujsu));
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
@keyframes awsui_spinner-line-
|
|
161
|
+
@keyframes awsui_spinner-line-left_1612d_15gnh_1 {
|
|
162
162
|
0% {
|
|
163
|
-
transform: rotate(var(--awsui-spinner-line-left-from-
|
|
163
|
+
transform: rotate(var(--awsui-spinner-line-left-from-xgujsu));
|
|
164
164
|
}
|
|
165
165
|
50% {
|
|
166
|
-
transform: rotate(var(--awsui-spinner-line-left-to-
|
|
166
|
+
transform: rotate(var(--awsui-spinner-line-left-to-xgujsu));
|
|
167
167
|
}
|
|
168
168
|
100% {
|
|
169
|
-
transform: rotate(var(--awsui-spinner-line-left-from-
|
|
169
|
+
transform: rotate(var(--awsui-spinner-line-left-from-xgujsu));
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
@keyframes awsui_spinner-line-
|
|
172
|
+
@keyframes awsui_spinner-line-right_1612d_15gnh_1 {
|
|
173
173
|
0% {
|
|
174
|
-
transform: rotate(var(--awsui-spinner-line-right-from-
|
|
174
|
+
transform: rotate(var(--awsui-spinner-line-right-from-xgujsu));
|
|
175
175
|
}
|
|
176
176
|
50% {
|
|
177
|
-
transform: rotate(var(--awsui-spinner-line-right-to-
|
|
177
|
+
transform: rotate(var(--awsui-spinner-line-right-to-xgujsu));
|
|
178
178
|
}
|
|
179
179
|
100% {
|
|
180
|
-
transform: rotate(var(--awsui-spinner-line-right-from-
|
|
180
|
+
transform: rotate(var(--awsui-spinner-line-right-from-xgujsu));
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
.
|
|
184
|
-
--awsui-spinner-rotator-from-
|
|
185
|
-
--awsui-spinner-rotator-to-
|
|
186
|
-
--awsui-spinner-line-left-from-
|
|
187
|
-
--awsui-spinner-line-left-to-
|
|
188
|
-
--awsui-spinner-line-right-from-
|
|
189
|
-
--awsui-spinner-line-right-to-
|
|
183
|
+
.awsui_root_1612d_15gnh_183:not(#\9) {
|
|
184
|
+
--awsui-spinner-rotator-from-xgujsu: 0deg;
|
|
185
|
+
--awsui-spinner-rotator-to-xgujsu: 360deg;
|
|
186
|
+
--awsui-spinner-line-left-from-xgujsu: 0deg;
|
|
187
|
+
--awsui-spinner-line-left-to-xgujsu: 120deg;
|
|
188
|
+
--awsui-spinner-line-right-from-xgujsu: 90deg;
|
|
189
|
+
--awsui-spinner-line-right-to-xgujsu: -30deg;
|
|
190
190
|
display: inline-block;
|
|
191
191
|
vertical-align: top;
|
|
192
192
|
/*stylelint-disable-next-line @cloudscape-design/no-motion-outside-of-mixin */
|
|
193
|
-
animation: awsui_spinner-
|
|
193
|
+
animation: awsui_spinner-rotator_1612d_15gnh_1 0.7s linear infinite;
|
|
194
194
|
box-sizing: border-box;
|
|
195
195
|
line-height: 0;
|
|
196
196
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
197
197
|
}
|
|
198
|
-
.
|
|
198
|
+
.awsui_root_1612d_15gnh_183.awsui_size-normal_1612d_15gnh_198:not(#\9) {
|
|
199
199
|
inline-size: var(--size-icon-normal-2f5zkr, 16px);
|
|
200
200
|
block-size: var(--size-icon-normal-2f5zkr, 16px);
|
|
201
201
|
padding-block: calc((var(--size-icon-normal-2f5zkr, 16px) - 12px) / 2);
|
|
@@ -203,7 +203,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
203
203
|
margin-block: calc((var(--line-height-body-m-bedeoh, 22px) - var(--size-icon-normal-2f5zkr, 16px)) / 2);
|
|
204
204
|
box-sizing: border-box;
|
|
205
205
|
}
|
|
206
|
-
.
|
|
206
|
+
.awsui_root_1612d_15gnh_183.awsui_size-big_1612d_15gnh_206:not(#\9) {
|
|
207
207
|
inline-size: var(--size-icon-big-hnqj8f, 32px);
|
|
208
208
|
block-size: var(--size-icon-big-hnqj8f, 32px);
|
|
209
209
|
padding-block: calc((var(--size-icon-big-hnqj8f, 32px) - 24px) / 2);
|
|
@@ -211,7 +211,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
211
211
|
margin-block: calc((var(--line-height-heading-xl-vs1f23, 36px) - var(--size-icon-big-hnqj8f, 32px)) / 2);
|
|
212
212
|
box-sizing: border-box;
|
|
213
213
|
}
|
|
214
|
-
.
|
|
214
|
+
.awsui_root_1612d_15gnh_183.awsui_size-large_1612d_15gnh_214:not(#\9) {
|
|
215
215
|
inline-size: var(--size-icon-large-gj7xfw, 48px);
|
|
216
216
|
block-size: var(--size-icon-large-gj7xfw, 48px);
|
|
217
217
|
padding-block: calc((var(--size-icon-large-gj7xfw, 48px) - 36px) / 2);
|
|
@@ -219,32 +219,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
219
219
|
margin-block: calc((var(--line-height-display-l-3zghmm, 56px) - var(--size-icon-large-gj7xfw, 48px)) / 2);
|
|
220
220
|
box-sizing: border-box;
|
|
221
221
|
}
|
|
222
|
-
.
|
|
222
|
+
.awsui_root_1612d_15gnh_183.awsui_variant-normal_1612d_15gnh_222:not(#\9) {
|
|
223
223
|
color: currentColor;
|
|
224
224
|
}
|
|
225
|
-
.
|
|
225
|
+
.awsui_root_1612d_15gnh_183.awsui_variant-disabled_1612d_15gnh_225:not(#\9) {
|
|
226
226
|
color: var(--color-text-interactive-disabled-i9f2yj, #aab7b8);
|
|
227
227
|
}
|
|
228
|
-
.
|
|
228
|
+
.awsui_root_1612d_15gnh_183.awsui_variant-inverted_1612d_15gnh_228:not(#\9) {
|
|
229
229
|
color: var(--color-text-inverted-vkqxd7, #ffffff);
|
|
230
230
|
}
|
|
231
|
-
.
|
|
232
|
-
--awsui-spinner-rotator-from-
|
|
233
|
-
--awsui-spinner-rotator-to-
|
|
234
|
-
--awsui-spinner-line-left-from-
|
|
235
|
-
--awsui-spinner-line-left-to-
|
|
236
|
-
--awsui-spinner-line-right-from-
|
|
237
|
-
--awsui-spinner-line-right-to-
|
|
231
|
+
.awsui_root_1612d_15gnh_183:not(#\9):dir(rtl) {
|
|
232
|
+
--awsui-spinner-rotator-from-xgujsu: 360deg;
|
|
233
|
+
--awsui-spinner-rotator-to-xgujsu: 0deg;
|
|
234
|
+
--awsui-spinner-line-left-from-xgujsu: 0deg;
|
|
235
|
+
--awsui-spinner-line-left-to-xgujsu: -120deg;
|
|
236
|
+
--awsui-spinner-line-right-from-xgujsu: -90deg;
|
|
237
|
+
--awsui-spinner-line-right-to-xgujsu: 30deg;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
.
|
|
240
|
+
.awsui_circle_1612d_15gnh_240:not(#\9) {
|
|
241
241
|
display: inline-block;
|
|
242
242
|
inline-size: 50%;
|
|
243
243
|
block-size: 100%;
|
|
244
244
|
overflow: hidden;
|
|
245
245
|
position: relative;
|
|
246
246
|
}
|
|
247
|
-
.
|
|
247
|
+
.awsui_circle_1612d_15gnh_240:not(#\9):after {
|
|
248
248
|
position: absolute;
|
|
249
249
|
box-sizing: border-box;
|
|
250
250
|
content: "";
|
|
@@ -257,7 +257,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
257
257
|
border-inline-end-color: transparent;
|
|
258
258
|
border-block-end-color: transparent;
|
|
259
259
|
}
|
|
260
|
-
.
|
|
260
|
+
.awsui_circle_1612d_15gnh_240:not(#\9):after {
|
|
261
261
|
/*stylelint-disable-next-line @cloudscape-design/no-motion-outside-of-mixin */
|
|
262
262
|
animation: 1.5s ease-in-out infinite;
|
|
263
263
|
inset-block-start: 0;
|
|
@@ -265,13 +265,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
265
265
|
block-size: 100%;
|
|
266
266
|
inline-size: 200%;
|
|
267
267
|
}
|
|
268
|
-
.
|
|
268
|
+
.awsui_circle_1612d_15gnh_240.awsui_circle-left_1612d_15gnh_268:not(#\9):after {
|
|
269
269
|
inset-inline-start: 0;
|
|
270
270
|
/*stylelint-disable-next-line @cloudscape-design/no-motion-outside-of-mixin */
|
|
271
|
-
animation-name: awsui_spinner-line-
|
|
271
|
+
animation-name: awsui_spinner-line-left_1612d_15gnh_1;
|
|
272
272
|
}
|
|
273
|
-
.
|
|
273
|
+
.awsui_circle_1612d_15gnh_240.awsui_circle-right_1612d_15gnh_273:not(#\9):after {
|
|
274
274
|
inset-inline-start: -100%;
|
|
275
275
|
/*stylelint-disable-next-line @cloudscape-design/no-motion-outside-of-mixin */
|
|
276
|
-
animation-name: awsui_spinner-line-
|
|
276
|
+
animation-name: awsui_spinner-line-right_1612d_15gnh_1;
|
|
277
277
|
}
|
|
@@ -2,18 +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
|
-
"root": "
|
|
6
|
-
"spinner-rotator": "awsui_spinner-
|
|
7
|
-
"size-normal": "awsui_size-
|
|
8
|
-
"size-big": "awsui_size-
|
|
9
|
-
"size-large": "awsui_size-
|
|
10
|
-
"variant-normal": "awsui_variant-
|
|
11
|
-
"variant-disabled": "awsui_variant-
|
|
12
|
-
"variant-inverted": "awsui_variant-
|
|
13
|
-
"circle": "
|
|
14
|
-
"circle-left": "awsui_circle-
|
|
15
|
-
"spinner-line-left": "awsui_spinner-line-
|
|
16
|
-
"circle-right": "awsui_circle-
|
|
17
|
-
"spinner-line-right": "awsui_spinner-line-
|
|
5
|
+
"root": "awsui_root_1612d_15gnh_183",
|
|
6
|
+
"spinner-rotator": "awsui_spinner-rotator_1612d_15gnh_1",
|
|
7
|
+
"size-normal": "awsui_size-normal_1612d_15gnh_198",
|
|
8
|
+
"size-big": "awsui_size-big_1612d_15gnh_206",
|
|
9
|
+
"size-large": "awsui_size-large_1612d_15gnh_214",
|
|
10
|
+
"variant-normal": "awsui_variant-normal_1612d_15gnh_222",
|
|
11
|
+
"variant-disabled": "awsui_variant-disabled_1612d_15gnh_225",
|
|
12
|
+
"variant-inverted": "awsui_variant-inverted_1612d_15gnh_228",
|
|
13
|
+
"circle": "awsui_circle_1612d_15gnh_240",
|
|
14
|
+
"circle-left": "awsui_circle-left_1612d_15gnh_268",
|
|
15
|
+
"spinner-line-left": "awsui_spinner-line-left_1612d_15gnh_1",
|
|
16
|
+
"circle-right": "awsui_circle-right_1612d_15gnh_273",
|
|
17
|
+
"spinner-line-right": "awsui_spinner-line-right_1612d_15gnh_1"
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/split-panel/implementation.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAKlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAO/C,MAAM,MAAM,6BAA6B,GAAG,YAAY,CAAC,eAAe,EAAE,uBAAuB,GAAG,eAAe,CAAC,GAClH,0BAA0B,CAAC;AAE7B,wBAAgB,wBAAwB,CAAC,EACvC,iBAAiB,EACjB,MAAM,EACN,QAAQ,EACR,qBAAqB,EACrB,aAAa,EACb,WAAgB,EAChB,GAAG,SAAS,EACb,EAAE,6BAA6B,
|
|
1
|
+
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/split-panel/implementation.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAKlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAO/C,MAAM,MAAM,6BAA6B,GAAG,YAAY,CAAC,eAAe,EAAE,uBAAuB,GAAG,eAAe,CAAC,GAClH,0BAA0B,CAAC;AAE7B,wBAAgB,wBAAwB,CAAC,EACvC,iBAAiB,EACjB,MAAM,EACN,QAAQ,EACR,qBAAqB,EACrB,aAAa,EACb,WAAgB,EAChB,GAAG,SAAS,EACb,EAAE,6BAA6B,eA+N/B;AAED,eAAO,MAAM,0BAA0B,2FAAsD,CAAC"}
|
|
@@ -43,7 +43,7 @@ export function SplitPanelImplementation(_a) {
|
|
|
43
43
|
onResize,
|
|
44
44
|
};
|
|
45
45
|
const onSliderPointerDown = usePointerEvents(sizeControlProps);
|
|
46
|
-
const onKeyDown = useKeyboardEvents(sizeControlProps);
|
|
46
|
+
const { onKeyDown, onDirectionClick } = useKeyboardEvents(sizeControlProps);
|
|
47
47
|
const contentStyle = {
|
|
48
48
|
[globalVars.stickyVerticalTopOffset]: topOffset,
|
|
49
49
|
[globalVars.stickyVerticalBottomOffset]: bottomOffset,
|
|
@@ -56,11 +56,11 @@ export function SplitPanelImplementation(_a) {
|
|
|
56
56
|
React.createElement(InternalButton, { className: testUtilStyles['preferences-button'], iconName: "settings", variant: "icon", onClick: () => setPreferencesOpen(true), formAction: "none", ariaLabel: i18nStrings.preferencesTitle, ref: refs.preferences }),
|
|
57
57
|
React.createElement("span", { className: styles.divider }))),
|
|
58
58
|
isOpen ? (React.createElement(InternalButton, { className: testUtilStyles['close-button'], iconName: isRefresh && closeBehavior === 'collapse' ? (position === 'side' ? 'angle-right' : 'angle-down') : 'close', variant: "icon", onClick: onToggle, formAction: "none", ariaLabel: i18nStrings.closeButtonAriaLabel, ariaExpanded: isOpen })) : position === 'side' || closeBehavior === 'hide' ? null : (React.createElement(InternalButton, { className: testUtilStyles['open-button'], iconName: "angle-up", variant: "icon", formAction: "none", ariaLabel: i18nStrings.openButtonAriaLabel, ref: refs.toggle, ariaExpanded: isOpen })))));
|
|
59
|
-
const resizeHandle = (React.createElement(PanelResizeHandle, { ref: refs.slider, className: testUtilStyles.slider, ariaLabel: i18nStrings.resizeHandleAriaLabel,
|
|
59
|
+
const resizeHandle = (React.createElement(PanelResizeHandle, { ref: refs.slider, className: testUtilStyles.slider, tooltipText: i18nStrings.resizeHandleTooltipText, ariaLabel: i18nStrings.resizeHandleAriaLabel,
|
|
60
60
|
// Allows us to use the logical left/right keys to move the slider left/right,
|
|
61
61
|
// but match aria keyboard behavior of using left/right to decrease/increase
|
|
62
62
|
// the slider value.
|
|
63
|
-
ariaValuenow: position === 'bottom' ? relativeSize : 100 - relativeSize, position: position, onKeyDown: onKeyDown, onPointerDown: onSliderPointerDown }));
|
|
63
|
+
ariaValuenow: position === 'bottom' ? relativeSize : 100 - relativeSize, position: position, onKeyDown: onKeyDown, onPointerDown: onSliderPointerDown, onDirectionClick: onDirectionClick }));
|
|
64
64
|
/*
|
|
65
65
|
This effect forces the browser to recalculate the layout
|
|
66
66
|
whenever the split panel might have moved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/split-panel/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AAErF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;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AAE,WAAW,CAAC,iBAAiB;gBACrC,aAAa,EAAE,WAAW,CAAC,wBAAwB;gBACnD,mBAAmB,EAAE,WAAW,CAAC,8BAA8B;gBAC/D,cAAc,EAAE,WAAW,CAAC,yBAAyB;gBACrD,YAAY,EAAE,WAAW,CAAC,uBAAuB;aAClD,EACD,SAAS,EAAE,WAAW,CAAC,EAAE;gBACvB,mBAAmB,mBAAM,WAAW,EAAG,CAAC;gBACxC,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,GACD,CACH,CACA,CACJ,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC,wBAAwB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useAppLayoutToolbarDesignEnabled } from '../app-layout/utils/feature-flags';\nimport { SizeControlProps } from '../app-layout/utils/interfaces';\nimport { useKeyboardEvents } from '../app-layout/utils/use-keyboard-events';\nimport { usePointerEvents } from '../app-layout/utils/use-pointer-events';\nimport { InternalButton } from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport PanelResizeHandle from '../internal/components/panel-resize-handle';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport globalVars from '../internal/styles/global-vars';\nimport { SomeRequired } from '../internal/types';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport { SplitPanelContentBottom } from './bottom';\nimport { SplitPanelProps } from './interfaces';\nimport PreferencesModal from './preferences-modal';\nimport { SplitPanelContentSide } from './side';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport type SplitPanelImplementationProps = SomeRequired<SplitPanelProps, 'hidePreferencesButton' | 'closeBehavior'> &\n InternalBaseComponentProps;\n\nexport function SplitPanelImplementation({\n __internalRootRef,\n header,\n children,\n hidePreferencesButton,\n closeBehavior,\n i18nStrings = {},\n ...restProps\n}: SplitPanelImplementationProps) {\n const isRefresh = useVisualRefresh();\n const isToolbar = useAppLayoutToolbarDesignEnabled();\n\n const {\n position,\n topOffset,\n bottomOffset,\n rightOffset,\n contentWidthStyles,\n isOpen,\n isForcedPosition,\n onPreferencesChange,\n onResize,\n onToggle,\n size,\n relativeSize,\n setSplitPanelToggle,\n refs,\n animationDisabled,\n } = useSplitPanelContext();\n const baseProps = getBaseProps(restProps);\n const [isPreferencesOpen, setPreferencesOpen] = useState<boolean>(false);\n\n const appLayoutMaxWidth = isRefresh && position === 'bottom' ? contentWidthStyles : undefined;\n\n const openButtonAriaLabel = i18nStrings.openButtonAriaLabel;\n useEffect(() => {\n setSplitPanelToggle({ displayed: closeBehavior === 'collapse', ariaLabel: openButtonAriaLabel });\n\n return () => {\n setSplitPanelToggle({ displayed: false, ariaLabel: undefined });\n };\n }, [setSplitPanelToggle, openButtonAriaLabel, closeBehavior]);\n\n const splitPanelRefObject = useRef<HTMLDivElement>(null);\n\n const sizeControlProps: SizeControlProps = {\n position,\n panelRef: splitPanelRefObject,\n handleRef: refs.slider,\n onResize,\n };\n const onSliderPointerDown = usePointerEvents(sizeControlProps);\n const onKeyDown = useKeyboardEvents(sizeControlProps);\n\n const contentStyle = {\n [globalVars.stickyVerticalTopOffset]: topOffset,\n [globalVars.stickyVerticalBottomOffset]: bottomOffset,\n };\n\n const panelHeaderId = useUniqueId('split-panel-header');\n\n const wrappedHeader = (\n <div className={clsx(styles.header, isToolbar && styles['with-toolbar'])} style={appLayoutMaxWidth}>\n <h2 className={clsx(styles['header-text'], testUtilStyles['header-text'])} id={panelHeaderId}>\n {header}\n </h2>\n <div className={styles['header-actions']}>\n {!hidePreferencesButton && isOpen && (\n <>\n <InternalButton\n className={testUtilStyles['preferences-button']}\n iconName=\"settings\"\n variant=\"icon\"\n onClick={() => setPreferencesOpen(true)}\n formAction=\"none\"\n ariaLabel={i18nStrings.preferencesTitle}\n ref={refs.preferences}\n />\n <span className={styles.divider} />\n </>\n )}\n\n {isOpen ? (\n <InternalButton\n className={testUtilStyles['close-button']}\n iconName={\n isRefresh && closeBehavior === 'collapse' ? (position === 'side' ? 'angle-right' : 'angle-down') : 'close'\n }\n variant=\"icon\"\n onClick={onToggle}\n formAction=\"none\"\n ariaLabel={i18nStrings.closeButtonAriaLabel}\n ariaExpanded={isOpen}\n />\n ) : position === 'side' || closeBehavior === 'hide' ? null : (\n <InternalButton\n className={testUtilStyles['open-button']}\n iconName=\"angle-up\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={i18nStrings.openButtonAriaLabel}\n ref={refs.toggle}\n ariaExpanded={isOpen}\n />\n )}\n </div>\n </div>\n );\n\n const resizeHandle = (\n <PanelResizeHandle\n ref={refs.slider}\n className={testUtilStyles.slider}\n ariaLabel={i18nStrings.resizeHandleAriaLabel}\n // Allows us to use the logical left/right keys to move the slider left/right,\n // but match aria keyboard behavior of using left/right to decrease/increase\n // the slider value.\n ariaValuenow={position === 'bottom' ? relativeSize : 100 - relativeSize}\n position={position}\n onKeyDown={onKeyDown}\n onPointerDown={onSliderPointerDown}\n />\n );\n\n /*\n This effect forces the browser to recalculate the layout\n whenever the split panel might have moved.\n\n This is needed as a workaround for a bug in Safari, which does\n not automatically calculate the new position of the split panel\n _content_ when the split panel moves.\n */\n useLayoutEffect(() => {\n const root = splitPanelRefObject.current;\n\n if (root) {\n const property = 'transform';\n const temporaryValue = 'translateZ(0)';\n\n const valueBefore = root.style[property];\n root.style[property] = temporaryValue;\n\n // This line forces the browser to recalculate the layout\n void root.offsetHeight;\n\n root.style[property] = valueBefore;\n }\n }, [rightOffset, __internalRootRef]);\n\n const mergedRef = useMergeRefs(splitPanelRefObject, __internalRootRef);\n\n if (closeBehavior === 'hide' && !isOpen && (animationDisabled || !isRefresh)) {\n return <></>;\n }\n\n /**\n * The AppLayout factor moved the circular buttons out of the\n * SplitPanel and into the Tools component. This conditional\n * is still needed for the early return to prevent execution\n * of the following code.\n */\n if (isRefresh && !isToolbar && !isOpen && position === 'side') {\n return <></>;\n }\n\n return (\n <>\n {position === 'side' && (\n <SplitPanelContentSide\n style={contentStyle}\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={size}\n onToggle={onToggle}\n openButtonAriaLabel={openButtonAriaLabel}\n toggleRef={refs.toggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n closeBehavior={closeBehavior}\n >\n {children}\n </SplitPanelContentSide>\n )}\n\n {position === 'bottom' && (\n <SplitPanelContentBottom\n style={contentStyle}\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={size}\n onToggle={onToggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n appLayoutMaxWidth={appLayoutMaxWidth}\n closeBehavior={closeBehavior}\n >\n {children}\n </SplitPanelContentBottom>\n )}\n {isPreferencesOpen && (\n <PreferencesModal\n visible={true}\n preferences={{ position }}\n disabledSidePosition={position === 'bottom' && isForcedPosition}\n isRefresh={isRefresh}\n i18nStrings={{\n header: i18nStrings.preferencesTitle,\n confirm: i18nStrings.preferencesConfirm,\n cancel: i18nStrings.preferencesCancel,\n positionLabel: i18nStrings.preferencesPositionLabel,\n positionDescription: i18nStrings.preferencesPositionDescription,\n positionBottom: i18nStrings.preferencesPositionBottom,\n positionSide: i18nStrings.preferencesPositionSide,\n }}\n onConfirm={preferences => {\n onPreferencesChange({ ...preferences });\n setPreferencesOpen(false);\n }}\n onDismiss={() => {\n setPreferencesOpen(false);\n }}\n />\n )}\n </>\n );\n}\n\nexport const createWidgetizedSplitPanel = createWidgetizedComponent(SplitPanelImplementation);\n"]}
|
|
1
|
+
{"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/split-panel/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AAErF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAExD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAE/C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAK1D,MAAM,UAAU,wBAAwB,CAAC,EAQT;QARS,EACvC,iBAAiB,EACjB,MAAM,EAC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EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,SAAS,EACxB,UAAU,EAAE,IAAI,EAChB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,aAAa,EACrB,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,aAAa,IAE3B,QAAQ,CACe,CAC3B;QACA,iBAAiB,IAAI,CACpB,oBAAC,gBAAgB,IACf,OAAO,EAAE,IAAI,EACb,WAAW,EAAE,EAAE,QAAQ,EAAE,EACzB,oBAAoB,EAAE,QAAQ,KAAK,QAAQ,IAAI,gBAAgB,EAC/D,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE;gBACX,MAAM,EAAE,WAAW,CAAC,gBAAgB;gBACpC,OAAO,EAAE,WAAW,CAAC,kBAAkB;gBACvC,MAAM,EAAE,WAAW,CAAC,iBAAiB;gBACrC,aAAa,EAAE,WAAW,CAAC,wBAAwB;gBACnD,mBAAmB,EAAE,WAAW,CAAC,8BAA8B;gBAC/D,cAAc,EAAE,WAAW,CAAC,yBAAyB;gBACrD,YAAY,EAAE,WAAW,CAAC,uBAAuB;aAClD,EACD,SAAS,EAAE,WAAW,CAAC,EAAE;gBACvB,mBAAmB,mBAAM,WAAW,EAAG,CAAC;gBACxC,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,GACD,CACH,CACA,CACJ,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC,wBAAwB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useAppLayoutToolbarDesignEnabled } from '../app-layout/utils/feature-flags';\nimport { SizeControlProps } from '../app-layout/utils/interfaces';\nimport { useKeyboardEvents } from '../app-layout/utils/use-keyboard-events';\nimport { usePointerEvents } from '../app-layout/utils/use-pointer-events';\nimport { InternalButton } from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport PanelResizeHandle from '../internal/components/panel-resize-handle';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport globalVars from '../internal/styles/global-vars';\nimport { SomeRequired } from '../internal/types';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport { SplitPanelContentBottom } from './bottom';\nimport { SplitPanelProps } from './interfaces';\nimport PreferencesModal from './preferences-modal';\nimport { SplitPanelContentSide } from './side';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport type SplitPanelImplementationProps = SomeRequired<SplitPanelProps, 'hidePreferencesButton' | 'closeBehavior'> &\n InternalBaseComponentProps;\n\nexport function SplitPanelImplementation({\n __internalRootRef,\n header,\n children,\n hidePreferencesButton,\n closeBehavior,\n i18nStrings = {},\n ...restProps\n}: SplitPanelImplementationProps) {\n const isRefresh = useVisualRefresh();\n const isToolbar = useAppLayoutToolbarDesignEnabled();\n\n const {\n position,\n topOffset,\n bottomOffset,\n rightOffset,\n contentWidthStyles,\n isOpen,\n isForcedPosition,\n onPreferencesChange,\n onResize,\n onToggle,\n size,\n relativeSize,\n setSplitPanelToggle,\n refs,\n animationDisabled,\n } = useSplitPanelContext();\n const baseProps = getBaseProps(restProps);\n const [isPreferencesOpen, setPreferencesOpen] = useState<boolean>(false);\n\n const appLayoutMaxWidth = isRefresh && position === 'bottom' ? contentWidthStyles : undefined;\n\n const openButtonAriaLabel = i18nStrings.openButtonAriaLabel;\n useEffect(() => {\n setSplitPanelToggle({ displayed: closeBehavior === 'collapse', ariaLabel: openButtonAriaLabel });\n\n return () => {\n setSplitPanelToggle({ displayed: false, ariaLabel: undefined });\n };\n }, [setSplitPanelToggle, openButtonAriaLabel, closeBehavior]);\n\n const splitPanelRefObject = useRef<HTMLDivElement>(null);\n\n const sizeControlProps: SizeControlProps = {\n position,\n panelRef: splitPanelRefObject,\n handleRef: refs.slider,\n onResize,\n };\n const onSliderPointerDown = usePointerEvents(sizeControlProps);\n const { onKeyDown, onDirectionClick } = useKeyboardEvents(sizeControlProps);\n\n const contentStyle = {\n [globalVars.stickyVerticalTopOffset]: topOffset,\n [globalVars.stickyVerticalBottomOffset]: bottomOffset,\n };\n\n const panelHeaderId = useUniqueId('split-panel-header');\n\n const wrappedHeader = (\n <div className={clsx(styles.header, isToolbar && styles['with-toolbar'])} style={appLayoutMaxWidth}>\n <h2 className={clsx(styles['header-text'], testUtilStyles['header-text'])} id={panelHeaderId}>\n {header}\n </h2>\n <div className={styles['header-actions']}>\n {!hidePreferencesButton && isOpen && (\n <>\n <InternalButton\n className={testUtilStyles['preferences-button']}\n iconName=\"settings\"\n variant=\"icon\"\n onClick={() => setPreferencesOpen(true)}\n formAction=\"none\"\n ariaLabel={i18nStrings.preferencesTitle}\n ref={refs.preferences}\n />\n <span className={styles.divider} />\n </>\n )}\n\n {isOpen ? (\n <InternalButton\n className={testUtilStyles['close-button']}\n iconName={\n isRefresh && closeBehavior === 'collapse' ? (position === 'side' ? 'angle-right' : 'angle-down') : 'close'\n }\n variant=\"icon\"\n onClick={onToggle}\n formAction=\"none\"\n ariaLabel={i18nStrings.closeButtonAriaLabel}\n ariaExpanded={isOpen}\n />\n ) : position === 'side' || closeBehavior === 'hide' ? null : (\n <InternalButton\n className={testUtilStyles['open-button']}\n iconName=\"angle-up\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={i18nStrings.openButtonAriaLabel}\n ref={refs.toggle}\n ariaExpanded={isOpen}\n />\n )}\n </div>\n </div>\n );\n\n const resizeHandle = (\n <PanelResizeHandle\n ref={refs.slider}\n className={testUtilStyles.slider}\n tooltipText={i18nStrings.resizeHandleTooltipText}\n ariaLabel={i18nStrings.resizeHandleAriaLabel}\n // Allows us to use the logical left/right keys to move the slider left/right,\n // but match aria keyboard behavior of using left/right to decrease/increase\n // the slider value.\n ariaValuenow={position === 'bottom' ? relativeSize : 100 - relativeSize}\n position={position}\n onKeyDown={onKeyDown}\n onPointerDown={onSliderPointerDown}\n onDirectionClick={onDirectionClick}\n />\n );\n\n /*\n This effect forces the browser to recalculate the layout\n whenever the split panel might have moved.\n\n This is needed as a workaround for a bug in Safari, which does\n not automatically calculate the new position of the split panel\n _content_ when the split panel moves.\n */\n useLayoutEffect(() => {\n const root = splitPanelRefObject.current;\n\n if (root) {\n const property = 'transform';\n const temporaryValue = 'translateZ(0)';\n\n const valueBefore = root.style[property];\n root.style[property] = temporaryValue;\n\n // This line forces the browser to recalculate the layout\n void root.offsetHeight;\n\n root.style[property] = valueBefore;\n }\n }, [rightOffset, __internalRootRef]);\n\n const mergedRef = useMergeRefs(splitPanelRefObject, __internalRootRef);\n\n if (closeBehavior === 'hide' && !isOpen && (animationDisabled || !isRefresh)) {\n return <></>;\n }\n\n /**\n * The AppLayout factor moved the circular buttons out of the\n * SplitPanel and into the Tools component. This conditional\n * is still needed for the early return to prevent execution\n * of the following code.\n */\n if (isRefresh && !isToolbar && !isOpen && position === 'side') {\n return <></>;\n }\n\n return (\n <>\n {position === 'side' && (\n <SplitPanelContentSide\n style={contentStyle}\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={size}\n onToggle={onToggle}\n openButtonAriaLabel={openButtonAriaLabel}\n toggleRef={refs.toggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n closeBehavior={closeBehavior}\n >\n {children}\n </SplitPanelContentSide>\n )}\n\n {position === 'bottom' && (\n <SplitPanelContentBottom\n style={contentStyle}\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={size}\n onToggle={onToggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n appLayoutMaxWidth={appLayoutMaxWidth}\n closeBehavior={closeBehavior}\n >\n {children}\n </SplitPanelContentBottom>\n )}\n {isPreferencesOpen && (\n <PreferencesModal\n visible={true}\n preferences={{ position }}\n disabledSidePosition={position === 'bottom' && isForcedPosition}\n isRefresh={isRefresh}\n i18nStrings={{\n header: i18nStrings.preferencesTitle,\n confirm: i18nStrings.preferencesConfirm,\n cancel: i18nStrings.preferencesCancel,\n positionLabel: i18nStrings.preferencesPositionLabel,\n positionDescription: i18nStrings.preferencesPositionDescription,\n positionBottom: i18nStrings.preferencesPositionBottom,\n positionSide: i18nStrings.preferencesPositionSide,\n }}\n onConfirm={preferences => {\n onPreferencesChange({ ...preferences });\n setPreferencesOpen(false);\n }}\n onDismiss={() => {\n setPreferencesOpen(false);\n }}\n />\n )}\n </>\n );\n}\n\nexport const createWidgetizedSplitPanel = createWidgetizedComponent(SplitPanelImplementation);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/split-panel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,qBAA6B,EAC7B,aAA0B,EAC1B,WAAgB,EAChB,GAAG,SAAS,EACb,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/split-panel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,qBAA6B,EAC7B,aAA0B,EAC1B,WAAgB,EAChB,GAAG,SAAS,EACb,EAAE,eAAe,eAiCjB"}
|
|
@@ -12,7 +12,7 @@ export default function SplitPanel(_a) {
|
|
|
12
12
|
props: { closeBehavior, hidePreferencesButton },
|
|
13
13
|
});
|
|
14
14
|
const i18n = useInternalI18n('split-panel');
|
|
15
|
-
return (React.createElement(SplitPanelInternal, Object.assign({}, restProps, { __internalRootRef: __internalRootRef, hidePreferencesButton: hidePreferencesButton, closeBehavior: closeBehavior, i18nStrings: Object.assign(Object.assign({}, i18nStrings), { closeButtonAriaLabel: i18n('i18nStrings.closeButtonAriaLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.closeButtonAriaLabel), openButtonAriaLabel: i18n('i18nStrings.openButtonAriaLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.openButtonAriaLabel), resizeHandleAriaLabel: i18n('i18nStrings.resizeHandleAriaLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.resizeHandleAriaLabel), preferencesTitle: i18n('i18nStrings.preferencesTitle', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesTitle), preferencesConfirm: i18n('i18nStrings.preferencesConfirm', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesConfirm), preferencesCancel: i18n('i18nStrings.preferencesCancel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesCancel), preferencesPositionLabel: i18n('i18nStrings.preferencesPositionLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesPositionLabel), preferencesPositionDescription: i18n('i18nStrings.preferencesPositionDescription', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesPositionDescription), preferencesPositionBottom: i18n('i18nStrings.preferencesPositionBottom', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesPositionBottom), preferencesPositionSide: i18n('i18nStrings.preferencesPositionSide', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesPositionSide) }) })));
|
|
15
|
+
return (React.createElement(SplitPanelInternal, Object.assign({}, restProps, { __internalRootRef: __internalRootRef, hidePreferencesButton: hidePreferencesButton, closeBehavior: closeBehavior, i18nStrings: Object.assign(Object.assign({}, i18nStrings), { closeButtonAriaLabel: i18n('i18nStrings.closeButtonAriaLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.closeButtonAriaLabel), openButtonAriaLabel: i18n('i18nStrings.openButtonAriaLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.openButtonAriaLabel), resizeHandleAriaLabel: i18n('i18nStrings.resizeHandleAriaLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.resizeHandleAriaLabel), resizeHandleTooltipText: i18n('i18nStrings.resizeHandleTooltipText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.resizeHandleTooltipText), preferencesTitle: i18n('i18nStrings.preferencesTitle', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesTitle), preferencesConfirm: i18n('i18nStrings.preferencesConfirm', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesConfirm), preferencesCancel: i18n('i18nStrings.preferencesCancel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesCancel), preferencesPositionLabel: i18n('i18nStrings.preferencesPositionLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesPositionLabel), preferencesPositionDescription: i18n('i18nStrings.preferencesPositionDescription', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesPositionDescription), preferencesPositionBottom: i18n('i18nStrings.preferencesPositionBottom', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesPositionBottom), preferencesPositionSide: i18n('i18nStrings.preferencesPositionSide', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesPositionSide) }) })));
|
|
16
16
|
}
|
|
17
17
|
applyDisplayName(SplitPanel, 'SplitPanel');
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/split-panel/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIhD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAKjB;QALiB,EACjC,qBAAqB,GAAG,KAAK,EAC7B,aAAa,GAAG,UAAU,EAC1B,WAAW,GAAG,EAAE,OAEA,EADb,SAAS,cAJqB,yDAKlC,CADa;IAEZ,MAAM,EAAE,iBAAiB,EAAE,GAAG,gBAAgB,CAAC,YAAY,EAAE;QAC3D,KAAK,EAAE,EAAE,aAAa,EAAE,qBAAqB,EAAE;KAChD,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC;IAC5C,OAAO,CACL,oBAAC,kBAAkB,oBACb,SAAS,IACb,iBAAiB,EAAE,iBAAiB,EACpC,qBAAqB,EAAE,qBAAqB,EAC5C,aAAa,EAAE,aAAa,EAC5B,WAAW,kCACN,WAAW,KACd,oBAAoB,EAAE,IAAI,CAAC,kCAAkC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,oBAAoB,CAAC,EACjG,mBAAmB,EAAE,IAAI,CAAC,iCAAiC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,mBAAmB,CAAC,EAC9F,qBAAqB,EAAE,IAAI,CAAC,mCAAmC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,qBAAqB,CAAC,EACpG,gBAAgB,EAAE,IAAI,CAAC,8BAA8B,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,gBAAgB,CAAC,EACrF,kBAAkB,EAAE,IAAI,CAAC,gCAAgC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,kBAAkB,CAAC,EAC3F,iBAAiB,EAAE,IAAI,CAAC,+BAA+B,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,iBAAiB,CAAC,EACxF,wBAAwB,EAAE,IAAI,CAAC,sCAAsC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,wBAAwB,CAAC,EAC7G,8BAA8B,EAAE,IAAI,CAClC,4CAA4C,EAC5C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,8BAA8B,CAC5C,EACD,yBAAyB,EAAE,IAAI,CAC7B,uCAAuC,EACvC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,yBAAyB,CACvC,EACD,uBAAuB,EAAE,IAAI,CAAC,qCAAqC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,uBAAuB,CAAC,OAE5G,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { useInternalI18n } from '../i18n/context';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { SplitPanelProps } from './interfaces';\nimport { SplitPanelInternal } from './internal';\n\nexport { SplitPanelProps };\n\nexport default function SplitPanel({\n hidePreferencesButton = false,\n closeBehavior = 'collapse',\n i18nStrings = {},\n ...restProps\n}: SplitPanelProps) {\n const { __internalRootRef } = useBaseComponent('SplitPanel', {\n props: { closeBehavior, hidePreferencesButton },\n });\n const i18n = useInternalI18n('split-panel');\n return (\n <SplitPanelInternal\n {...restProps}\n __internalRootRef={__internalRootRef}\n hidePreferencesButton={hidePreferencesButton}\n closeBehavior={closeBehavior}\n i18nStrings={{\n ...i18nStrings,\n closeButtonAriaLabel: i18n('i18nStrings.closeButtonAriaLabel', i18nStrings?.closeButtonAriaLabel),\n openButtonAriaLabel: i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel),\n resizeHandleAriaLabel: i18n('i18nStrings.resizeHandleAriaLabel', i18nStrings?.resizeHandleAriaLabel),\n preferencesTitle: i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle),\n preferencesConfirm: i18n('i18nStrings.preferencesConfirm', i18nStrings?.preferencesConfirm),\n preferencesCancel: i18n('i18nStrings.preferencesCancel', i18nStrings?.preferencesCancel),\n preferencesPositionLabel: i18n('i18nStrings.preferencesPositionLabel', i18nStrings?.preferencesPositionLabel),\n preferencesPositionDescription: i18n(\n 'i18nStrings.preferencesPositionDescription',\n i18nStrings?.preferencesPositionDescription\n ),\n preferencesPositionBottom: i18n(\n 'i18nStrings.preferencesPositionBottom',\n i18nStrings?.preferencesPositionBottom\n ),\n preferencesPositionSide: i18n('i18nStrings.preferencesPositionSide', i18nStrings?.preferencesPositionSide),\n }}\n />\n );\n}\n\napplyDisplayName(SplitPanel, 'SplitPanel');\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/split-panel/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIhD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAKjB;QALiB,EACjC,qBAAqB,GAAG,KAAK,EAC7B,aAAa,GAAG,UAAU,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AA4C,EAC5C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,8BAA8B,CAC5C,EACD,yBAAyB,EAAE,IAAI,CAC7B,uCAAuC,EACvC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,yBAAyB,CACvC,EACD,uBAAuB,EAAE,IAAI,CAAC,qCAAqC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,uBAAuB,CAAC,OAE5G,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { useInternalI18n } from '../i18n/context';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { SplitPanelProps } from './interfaces';\nimport { SplitPanelInternal } from './internal';\n\nexport { SplitPanelProps };\n\nexport default function SplitPanel({\n hidePreferencesButton = false,\n closeBehavior = 'collapse',\n i18nStrings = {},\n ...restProps\n}: SplitPanelProps) {\n const { __internalRootRef } = useBaseComponent('SplitPanel', {\n props: { closeBehavior, hidePreferencesButton },\n });\n const i18n = useInternalI18n('split-panel');\n return (\n <SplitPanelInternal\n {...restProps}\n __internalRootRef={__internalRootRef}\n hidePreferencesButton={hidePreferencesButton}\n closeBehavior={closeBehavior}\n i18nStrings={{\n ...i18nStrings,\n closeButtonAriaLabel: i18n('i18nStrings.closeButtonAriaLabel', i18nStrings?.closeButtonAriaLabel),\n openButtonAriaLabel: i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel),\n resizeHandleAriaLabel: i18n('i18nStrings.resizeHandleAriaLabel', i18nStrings?.resizeHandleAriaLabel),\n resizeHandleTooltipText: i18n('i18nStrings.resizeHandleTooltipText', i18nStrings?.resizeHandleTooltipText),\n preferencesTitle: i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle),\n preferencesConfirm: i18n('i18nStrings.preferencesConfirm', i18nStrings?.preferencesConfirm),\n preferencesCancel: i18n('i18nStrings.preferencesCancel', i18nStrings?.preferencesCancel),\n preferencesPositionLabel: i18n('i18nStrings.preferencesPositionLabel', i18nStrings?.preferencesPositionLabel),\n preferencesPositionDescription: i18n(\n 'i18nStrings.preferencesPositionDescription',\n i18nStrings?.preferencesPositionDescription\n ),\n preferencesPositionBottom: i18n(\n 'i18nStrings.preferencesPositionBottom',\n i18nStrings?.preferencesPositionBottom\n ),\n preferencesPositionSide: i18n('i18nStrings.preferencesPositionSide', i18nStrings?.preferencesPositionSide),\n }}\n />\n );\n}\n\napplyDisplayName(SplitPanel, 'SplitPanel');\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/split-panel/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC;CAC3C;AAED,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,WAAW;QAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAClC,8BAA8B,CAAC,EAAE,MAAM,CAAC;QACxC,uBAAuB,CAAC,EAAE,MAAM,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AE,kBAAkB,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/split-panel/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface SplitPanelProps extends BaseComponentProps {\n /**\n * Header of the split panel.\n */\n header: string;\n children: React.ReactNode;\n /**\n * Determines whether the split panel collapses or hides completely when closed.\n */\n closeBehavior?: 'collapse' | 'hide';\n /**\n * When set to `true`, the preferences button is not displayed.\n */\n hidePreferencesButton?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n * - `closeButtonAriaLabel` - The text of the panel close button aria label.\n * - `openButtonAriaLabel` - The text of the panel open button aria label.\n * - `preferencesTitle` - The text of the preferences modal header.\n * - `preferencesPositionLabel` - The text of the position preference label.\n * - `preferencesPositionDescription` - The text of the position preference description.\n * - `preferencesPositionSide` - The text of the side position preference label.\n * - `preferencesPositionBottom` - The text of the bottom position preference label.\n * - `preferencesConfirm` - The text of the preference modal confirm button.\n * - `preferencesCancel` - The text of the preference modal cancel button.\n * - `resizeHandleAriaLabel` - The label of the resize handle aria label.\n * @i18n\n */\n i18nStrings?: SplitPanelProps.I18nStrings;\n}\n\nexport namespace SplitPanelProps {\n export interface I18nStrings {\n closeButtonAriaLabel?: string;\n openButtonAriaLabel?: string;\n preferencesTitle?: string;\n preferencesPositionLabel?: string;\n preferencesPositionDescription?: string;\n preferencesPositionSide?: string;\n preferencesPositionBottom?: string;\n preferencesConfirm?: string;\n preferencesCancel?: string;\n resizeHandleAriaLabel?: string;\n }\n}\n\nexport interface SplitPanelContentProps {\n style: React.CSSProperties;\n baseProps: BaseComponentProps;\n isOpen?: boolean;\n splitPanelRef?: React.Ref<any>;\n cappedSize: number;\n panelHeaderId: string;\n resizeHandle: React.ReactNode;\n header: React.ReactNode;\n children: React.ReactNode;\n onToggle: () => void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/split-panel/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface SplitPanelProps extends BaseComponentProps {\n /**\n * Header of the split panel.\n */\n header: string;\n children: React.ReactNode;\n /**\n * Determines whether the split panel collapses or hides completely when closed.\n */\n closeBehavior?: 'collapse' | 'hide';\n /**\n * When set to `true`, the preferences button is not displayed.\n */\n hidePreferencesButton?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n * - `closeButtonAriaLabel` - The text of the panel close button aria label.\n * - `openButtonAriaLabel` - The text of the panel open button aria label.\n * - `preferencesTitle` - The text of the preferences modal header.\n * - `preferencesPositionLabel` - The text of the position preference label.\n * - `preferencesPositionDescription` - The text of the position preference description.\n * - `preferencesPositionSide` - The text of the side position preference label.\n * - `preferencesPositionBottom` - The text of the bottom position preference label.\n * - `preferencesConfirm` - The text of the preference modal confirm button.\n * - `preferencesCancel` - The text of the preference modal cancel button.\n * - `resizeHandleAriaLabel` - The label of the resize handle aria label.\n * @i18n\n */\n i18nStrings?: SplitPanelProps.I18nStrings;\n}\n\nexport namespace SplitPanelProps {\n export interface I18nStrings {\n closeButtonAriaLabel?: string;\n openButtonAriaLabel?: string;\n preferencesTitle?: string;\n preferencesPositionLabel?: string;\n preferencesPositionDescription?: string;\n preferencesPositionSide?: string;\n preferencesPositionBottom?: string;\n preferencesConfirm?: string;\n preferencesCancel?: string;\n resizeHandleAriaLabel?: string;\n resizeHandleTooltipText?: string;\n }\n}\n\nexport interface SplitPanelContentProps {\n style: React.CSSProperties;\n baseProps: BaseComponentProps;\n isOpen?: boolean;\n splitPanelRef?: React.Ref<any>;\n cappedSize: number;\n panelHeaderId: string;\n resizeHandle: React.ReactNode;\n header: React.ReactNode;\n children: React.ReactNode;\n onToggle: () => void;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-header-bar.d.ts","sourceRoot":"","sources":["../../../src/tabs/tab-header-bar.tsx"],"names":[],"mappings":";AA8BA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA0CzC,UAAU,iBAAiB;IACzB,QAAQ,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,YAAY,KAAK,IAAI,CAAC;IACzD,WAAW,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IACtC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC;IACpC,sBAAsB,EAAE,QAAQ,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,OAAO,EACP,WAAW,EACX,SAAS,EACT,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,OAAO,GACR,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"tab-header-bar.d.ts","sourceRoot":"","sources":["../../../src/tabs/tab-header-bar.tsx"],"names":[],"mappings":";AA8BA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA0CzC,UAAU,iBAAiB;IACzB,QAAQ,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,YAAY,KAAK,IAAI,CAAC;IACzD,WAAW,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IACtC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC;IACpC,sBAAsB,EAAE,QAAQ,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,OAAO,EACP,WAAW,EACX,SAAS,EACT,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,OAAO,GACR,EAAE,iBAAiB,eAsanB;AA6ED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,UAEzF"}
|
|
@@ -326,6 +326,7 @@ export function TabHeaderBar({ onChange, activeTabId, tabs, variant, idNamespace
|
|
|
326
326
|
}
|
|
327
327
|
if (nextActive && nextActive.dataset.testid) {
|
|
328
328
|
onChange({ activeTabId: nextActive.dataset.testid });
|
|
329
|
+
setPreviousActiveTabId(nextActive.dataset.testid);
|
|
329
330
|
nextActive.focus();
|
|
330
331
|
}
|
|
331
332
|
onDismiss(event);
|