@cloudscape-design/components-themeable 3.0.984 → 3.0.986
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/app-layout/test-classes/styles.scss +2 -1
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/drawer/styles.scss +147 -1
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/skeleton/styles.scss +21 -0
- package/lib/internal/scss/drawer/styles.scss +22 -6
- package/lib/internal/scss/internal/components/chart-popover/test-classes/styles.scss +1 -1
- package/lib/internal/scss/internal/components/panel-resize-handle/styles.scss +2 -1
- package/lib/internal/template/app-layout/test-classes/styles.css.js +24 -23
- package/lib/internal/template/app-layout/test-classes/styles.scoped.css +24 -23
- package/lib/internal/template/app-layout/test-classes/styles.selectors.js +24 -23
- package/lib/internal/template/app-layout/utils/use-drawers.d.ts +2 -0
- package/lib/internal/template/app-layout/utils/use-drawers.d.ts.map +1 -1
- package/lib/internal/template/app-layout/utils/use-drawers.js +6 -0
- package/lib/internal/template/app-layout/utils/use-drawers.js.map +1 -1
- 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 +27 -15
- 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/global-drawers.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawers.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +17 -10
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +145 -11
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +17 -10
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +10 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts +6 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts +2 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.js +4 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts +2 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js +6 -5
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +21 -19
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +45 -35
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +21 -19
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +3 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +33 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +2 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +12 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/lib/internal/template/code-editor/index.d.ts.map +1 -1
- package/lib/internal/template/code-editor/index.js +3 -0
- package/lib/internal/template/code-editor/index.js.map +1 -1
- package/lib/internal/template/code-editor/interfaces.d.ts +1 -0
- package/lib/internal/template/code-editor/interfaces.d.ts.map +1 -1
- package/lib/internal/template/code-editor/interfaces.js.map +1 -1
- package/lib/internal/template/code-editor/preferences-modal.d.ts +1 -0
- package/lib/internal/template/code-editor/preferences-modal.d.ts.map +1 -1
- package/lib/internal/template/code-editor/preferences-modal.js +1 -1
- package/lib/internal/template/code-editor/preferences-modal.js.map +1 -1
- package/lib/internal/template/collection-preferences/index.d.ts +1 -1
- package/lib/internal/template/collection-preferences/index.d.ts.map +1 -1
- package/lib/internal/template/collection-preferences/index.js +2 -2
- package/lib/internal/template/collection-preferences/index.js.map +1 -1
- package/lib/internal/template/collection-preferences/interfaces.d.ts +5 -0
- package/lib/internal/template/collection-preferences/interfaces.d.ts.map +1 -1
- package/lib/internal/template/collection-preferences/interfaces.js.map +1 -1
- package/lib/internal/template/drawer/implementation.d.ts.map +1 -1
- package/lib/internal/template/drawer/implementation.js +4 -1
- package/lib/internal/template/drawer/implementation.js.map +1 -1
- package/lib/internal/template/drawer/styles.css.js +8 -6
- package/lib/internal/template/drawer/styles.scoped.css +32 -17
- package/lib/internal/template/drawer/styles.selectors.js +8 -6
- package/lib/internal/template/icon/generated/icons.js +1 -1
- package/lib/internal/template/icon/generated/icons.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +11 -0
- package/lib/internal/template/internal/components/drag-handle/resize-icon.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/resize-icon.js +1 -2
- package/lib/internal/template/internal/components/drag-handle/resize-icon.js.map +1 -1
- package/lib/internal/template/internal/components/panel-resize-handle/styles.css.js +2 -2
- package/lib/internal/template/internal/components/panel-resize-handle/styles.scoped.css +8 -7
- package/lib/internal/template/internal/components/panel-resize-handle/styles.selectors.js +2 -2
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +1 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +1 -0
- package/lib/internal/template/internal/generated/theming/index.cjs +31 -0
- package/lib/internal/template/internal/generated/theming/index.js +31 -0
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +2 -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/split-panel/implementation.d.ts.map +1 -1
- package/lib/internal/template/split-panel/implementation.js +1 -0
- 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 +2 -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/split-panel/preferences-modal.d.ts +1 -0
- package/lib/internal/template/split-panel/preferences-modal.d.ts.map +1 -1
- package/lib/internal/template/split-panel/preferences-modal.js +1 -1
- package/lib/internal/template/split-panel/preferences-modal.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +0 -1
|
@@ -5,7 +5,6 @@ import clsx from 'clsx';
|
|
|
5
5
|
import styles from './styles.css.js';
|
|
6
6
|
export function ResizeIcon({ variant }) {
|
|
7
7
|
return (React.createElement("svg", { focusable: false, className: clsx(styles['resize-icon'], styles[`resize-icon-${variant}`]), xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": true },
|
|
8
|
-
React.createElement("
|
|
9
|
-
React.createElement("line", { strokeWidth: "2", x1: "14", y1: "10", x2: "2", y2: "10" })));
|
|
8
|
+
React.createElement("path", { d: "M2 8H14", strokeWidth: "2", strokeLinecap: "round" })));
|
|
10
9
|
}
|
|
11
10
|
//# sourceMappingURL=resize-icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-icon.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/resize-icon.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAMrC,MAAM,UAAU,UAAU,CAAC,EAAE,OAAO,EAAmB;IACrD,OAAO,CACL,6BACE,SAAS,EAAE,KAAK,EAChB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,eAAe,OAAO,EAAE,CAAC,CAAC,EACxE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,iBACN,IAAI;QAEjB,8BAAM,
|
|
1
|
+
{"version":3,"file":"resize-icon.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/resize-icon.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAMrC,MAAM,UAAU,UAAU,CAAC,EAAE,OAAO,EAAmB;IACrD,OAAO,CACL,6BACE,SAAS,EAAE,KAAK,EAChB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,eAAe,OAAO,EAAE,CAAC,CAAC,EACxE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,iBACN,IAAI;QAEjB,8BAAM,CAAC,EAAC,SAAS,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,GAAG,CACtD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\n\ninterface ResizeIconProps {\n variant: 'horizontal' | 'vertical';\n}\n\nexport function ResizeIcon({ variant }: ResizeIconProps) {\n return (\n <svg\n focusable={false}\n className={clsx(styles['resize-icon'], styles[`resize-icon-${variant}`])}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n aria-hidden={true}\n >\n <path d=\"M2 8H14\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n );\n}\n"]}
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_slider_cqzlk_1nvie_145:not(#\9) {
|
|
146
146
|
padding-block: 0;
|
|
147
147
|
padding-inline: 0;
|
|
148
148
|
cursor: ns-resize;
|
|
@@ -151,17 +151,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
151
151
|
block-size: 18px;
|
|
152
152
|
touch-action: none;
|
|
153
153
|
}
|
|
154
|
-
.
|
|
154
|
+
.awsui_slider_cqzlk_1nvie_145:not(#\9):focus {
|
|
155
155
|
outline: none;
|
|
156
156
|
}
|
|
157
|
-
body[data-awsui-focus-visible=true] .
|
|
157
|
+
body[data-awsui-focus-visible=true] .awsui_slider_cqzlk_1nvie_145:not(#\9):focus {
|
|
158
158
|
position: relative;
|
|
159
159
|
}
|
|
160
|
-
body[data-awsui-focus-visible=true] .
|
|
160
|
+
body[data-awsui-focus-visible=true] .awsui_slider_cqzlk_1nvie_145:not(#\9):focus {
|
|
161
161
|
outline: 2px dotted transparent;
|
|
162
162
|
outline-offset: calc(0px - 1px);
|
|
163
163
|
}
|
|
164
|
-
body[data-awsui-focus-visible=true] .
|
|
164
|
+
body[data-awsui-focus-visible=true] .awsui_slider_cqzlk_1nvie_145:not(#\9):focus::before {
|
|
165
165
|
content: " ";
|
|
166
166
|
display: block;
|
|
167
167
|
position: absolute;
|
|
@@ -176,7 +176,8 @@ body[data-awsui-focus-visible=true] .awsui_slider_cqzlk_1b9k5_145:not(#\9):focus
|
|
|
176
176
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-vx5mpq, #0073bb);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
.awsui_slider-
|
|
179
|
+
.awsui_slider-side_cqzlk_1nvie_179:not(#\9) {
|
|
180
180
|
cursor: ew-resize;
|
|
181
|
-
|
|
181
|
+
margin-block: 0;
|
|
182
|
+
margin-inline-end: 0;
|
|
182
183
|
}
|
|
@@ -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
|
-
"slider": "
|
|
6
|
-
"slider-side": "awsui_slider-
|
|
5
|
+
"slider": "awsui_slider_cqzlk_1nvie_145",
|
|
6
|
+
"slider-side": "awsui_slider-side_cqzlk_1nvie_179"
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -495,6 +495,7 @@ export const colorDropzoneTextDefault: string;
|
|
|
495
495
|
export const colorDropzoneTextHover: string;
|
|
496
496
|
export const colorDropzoneBorderDefault: string;
|
|
497
497
|
export const colorDropzoneBorderHover: string;
|
|
498
|
+
export const colorGapGlobalDrawer: string;
|
|
498
499
|
export const fontBoxValueLargeWeight: string;
|
|
499
500
|
export const fontButtonLetterSpacing: string;
|
|
500
501
|
export const fontChartDetailSize: string;
|
|
@@ -495,6 +495,7 @@ export var colorDropzoneTextDefault = "var(--color-dropzone-text-default-m7ucyv,
|
|
|
495
495
|
export var colorDropzoneTextHover = "var(--color-dropzone-text-hover-yjnvhw, #424650)";
|
|
496
496
|
export var colorDropzoneBorderDefault = "var(--color-dropzone-border-default-lohkzd, #8c8c94)";
|
|
497
497
|
export var colorDropzoneBorderHover = "var(--color-dropzone-border-hover-ejc85p, #002b66)";
|
|
498
|
+
export var colorGapGlobalDrawer = "var(--color-gap-global-drawer-w5yxw2, #ebebf0)";
|
|
498
499
|
export var fontBoxValueLargeWeight = "var(--font-box-value-large-weight-wr00sw, 700)";
|
|
499
500
|
export var fontButtonLetterSpacing = "var(--font-button-letter-spacing-ufowe3, 0.005em)";
|
|
500
501
|
export var fontChartDetailSize = "var(--font-chart-detail-size-9qr25q, 12px)";
|
|
@@ -1862,6 +1862,10 @@ module.exports.preset = {
|
|
|
1862
1862
|
"light": "{colorBlue800}",
|
|
1863
1863
|
"dark": "{colorBlue400}"
|
|
1864
1864
|
},
|
|
1865
|
+
"colorGapGlobalDrawer": {
|
|
1866
|
+
"light": "{colorGrey200}",
|
|
1867
|
+
"dark": "{colorGrey900}"
|
|
1868
|
+
},
|
|
1865
1869
|
"fontBoxValueLargeWeight": "700",
|
|
1866
1870
|
"fontButtonLetterSpacing": "0.005em",
|
|
1867
1871
|
"fontChartDetailSize": "{fontSizeBodyS}",
|
|
@@ -4129,6 +4133,10 @@ module.exports.preset = {
|
|
|
4129
4133
|
"colorDropzoneBorderHover": {
|
|
4130
4134
|
"light": "{colorBlue400}",
|
|
4131
4135
|
"dark": "{colorBlue400}"
|
|
4136
|
+
},
|
|
4137
|
+
"colorGapGlobalDrawer": {
|
|
4138
|
+
"light": "{colorGrey900}",
|
|
4139
|
+
"dark": "{colorGrey900}"
|
|
4132
4140
|
}
|
|
4133
4141
|
}
|
|
4134
4142
|
},
|
|
@@ -5295,6 +5303,10 @@ module.exports.preset = {
|
|
|
5295
5303
|
"colorDropzoneBorderHover": {
|
|
5296
5304
|
"light": "{colorBlue400}",
|
|
5297
5305
|
"dark": "{colorBlue400}"
|
|
5306
|
+
},
|
|
5307
|
+
"colorGapGlobalDrawer": {
|
|
5308
|
+
"light": "{colorGrey900}",
|
|
5309
|
+
"dark": "{colorGrey900}"
|
|
5298
5310
|
}
|
|
5299
5311
|
}
|
|
5300
5312
|
},
|
|
@@ -6393,6 +6405,10 @@ module.exports.preset = {
|
|
|
6393
6405
|
"colorDropzoneBorderHover": {
|
|
6394
6406
|
"light": "{colorBlue800}",
|
|
6395
6407
|
"dark": "{colorBlue400}"
|
|
6408
|
+
},
|
|
6409
|
+
"colorGapGlobalDrawer": {
|
|
6410
|
+
"light": "{colorGrey200}",
|
|
6411
|
+
"dark": "{colorGrey900}"
|
|
6396
6412
|
}
|
|
6397
6413
|
}
|
|
6398
6414
|
},
|
|
@@ -7491,6 +7507,10 @@ module.exports.preset = {
|
|
|
7491
7507
|
"colorDropzoneBorderHover": {
|
|
7492
7508
|
"light": "{colorBlue800}",
|
|
7493
7509
|
"dark": "{colorBlue400}"
|
|
7510
|
+
},
|
|
7511
|
+
"colorGapGlobalDrawer": {
|
|
7512
|
+
"light": "{colorGrey200}",
|
|
7513
|
+
"dark": "{colorGrey900}"
|
|
7494
7514
|
}
|
|
7495
7515
|
}
|
|
7496
7516
|
},
|
|
@@ -8590,6 +8610,10 @@ module.exports.preset = {
|
|
|
8590
8610
|
"light": "{colorBlue800}",
|
|
8591
8611
|
"dark": "{colorBlue400}"
|
|
8592
8612
|
},
|
|
8613
|
+
"colorGapGlobalDrawer": {
|
|
8614
|
+
"light": "{colorGrey200}",
|
|
8615
|
+
"dark": "{colorGrey900}"
|
|
8616
|
+
},
|
|
8593
8617
|
"fontExpandableHeadingSize": "14px",
|
|
8594
8618
|
"borderDividerSectionWidth": "1px"
|
|
8595
8619
|
}
|
|
@@ -9699,6 +9723,10 @@ module.exports.preset = {
|
|
|
9699
9723
|
"colorDropzoneBorderHover": {
|
|
9700
9724
|
"light": "{colorBlue400}",
|
|
9701
9725
|
"dark": "{colorBlue400}"
|
|
9726
|
+
},
|
|
9727
|
+
"colorGapGlobalDrawer": {
|
|
9728
|
+
"light": "{colorGrey900}",
|
|
9729
|
+
"dark": "{colorGrey900}"
|
|
9702
9730
|
}
|
|
9703
9731
|
}
|
|
9704
9732
|
}
|
|
@@ -10146,6 +10174,7 @@ module.exports.preset = {
|
|
|
10146
10174
|
"colorDropzoneTextHover": "color",
|
|
10147
10175
|
"colorDropzoneBorderDefault": "color",
|
|
10148
10176
|
"colorDropzoneBorderHover": "color",
|
|
10177
|
+
"colorGapGlobalDrawer": "color",
|
|
10149
10178
|
"motionDurationExtraFast": "motion",
|
|
10150
10179
|
"motionDurationExtraSlow": "motion",
|
|
10151
10180
|
"motionDurationFast": "motion",
|
|
@@ -11459,6 +11488,7 @@ module.exports.preset = {
|
|
|
11459
11488
|
"colorDropzoneTextHover": "color-dropzone-text-hover",
|
|
11460
11489
|
"colorDropzoneBorderDefault": "color-dropzone-border-default",
|
|
11461
11490
|
"colorDropzoneBorderHover": "color-dropzone-border-hover",
|
|
11491
|
+
"colorGapGlobalDrawer": "color-gap-global-drawer",
|
|
11462
11492
|
"fontBoxValueLargeWeight": "font-box-value-large-weight",
|
|
11463
11493
|
"fontButtonLetterSpacing": "font-button-letter-spacing",
|
|
11464
11494
|
"fontChartDetailSize": "font-chart-detail-size",
|
|
@@ -12217,6 +12247,7 @@ module.exports.preset = {
|
|
|
12217
12247
|
"colorDropzoneTextHover": "--color-dropzone-text-hover-yjnvhw",
|
|
12218
12248
|
"colorDropzoneBorderDefault": "--color-dropzone-border-default-lohkzd",
|
|
12219
12249
|
"colorDropzoneBorderHover": "--color-dropzone-border-hover-ejc85p",
|
|
12250
|
+
"colorGapGlobalDrawer": "--color-gap-global-drawer-w5yxw2",
|
|
12220
12251
|
"fontBoxValueLargeWeight": "--font-box-value-large-weight-wr00sw",
|
|
12221
12252
|
"fontButtonLetterSpacing": "--font-button-letter-spacing-ufowe3",
|
|
12222
12253
|
"fontChartDetailSize": "--font-chart-detail-size-9qr25q",
|
|
@@ -1862,6 +1862,10 @@ export var preset = {
|
|
|
1862
1862
|
"light": "{colorBlue800}",
|
|
1863
1863
|
"dark": "{colorBlue400}"
|
|
1864
1864
|
},
|
|
1865
|
+
"colorGapGlobalDrawer": {
|
|
1866
|
+
"light": "{colorGrey200}",
|
|
1867
|
+
"dark": "{colorGrey900}"
|
|
1868
|
+
},
|
|
1865
1869
|
"fontBoxValueLargeWeight": "700",
|
|
1866
1870
|
"fontButtonLetterSpacing": "0.005em",
|
|
1867
1871
|
"fontChartDetailSize": "{fontSizeBodyS}",
|
|
@@ -4129,6 +4133,10 @@ export var preset = {
|
|
|
4129
4133
|
"colorDropzoneBorderHover": {
|
|
4130
4134
|
"light": "{colorBlue400}",
|
|
4131
4135
|
"dark": "{colorBlue400}"
|
|
4136
|
+
},
|
|
4137
|
+
"colorGapGlobalDrawer": {
|
|
4138
|
+
"light": "{colorGrey900}",
|
|
4139
|
+
"dark": "{colorGrey900}"
|
|
4132
4140
|
}
|
|
4133
4141
|
}
|
|
4134
4142
|
},
|
|
@@ -5295,6 +5303,10 @@ export var preset = {
|
|
|
5295
5303
|
"colorDropzoneBorderHover": {
|
|
5296
5304
|
"light": "{colorBlue400}",
|
|
5297
5305
|
"dark": "{colorBlue400}"
|
|
5306
|
+
},
|
|
5307
|
+
"colorGapGlobalDrawer": {
|
|
5308
|
+
"light": "{colorGrey900}",
|
|
5309
|
+
"dark": "{colorGrey900}"
|
|
5298
5310
|
}
|
|
5299
5311
|
}
|
|
5300
5312
|
},
|
|
@@ -6393,6 +6405,10 @@ export var preset = {
|
|
|
6393
6405
|
"colorDropzoneBorderHover": {
|
|
6394
6406
|
"light": "{colorBlue800}",
|
|
6395
6407
|
"dark": "{colorBlue400}"
|
|
6408
|
+
},
|
|
6409
|
+
"colorGapGlobalDrawer": {
|
|
6410
|
+
"light": "{colorGrey200}",
|
|
6411
|
+
"dark": "{colorGrey900}"
|
|
6396
6412
|
}
|
|
6397
6413
|
}
|
|
6398
6414
|
},
|
|
@@ -7491,6 +7507,10 @@ export var preset = {
|
|
|
7491
7507
|
"colorDropzoneBorderHover": {
|
|
7492
7508
|
"light": "{colorBlue800}",
|
|
7493
7509
|
"dark": "{colorBlue400}"
|
|
7510
|
+
},
|
|
7511
|
+
"colorGapGlobalDrawer": {
|
|
7512
|
+
"light": "{colorGrey200}",
|
|
7513
|
+
"dark": "{colorGrey900}"
|
|
7494
7514
|
}
|
|
7495
7515
|
}
|
|
7496
7516
|
},
|
|
@@ -8590,6 +8610,10 @@ export var preset = {
|
|
|
8590
8610
|
"light": "{colorBlue800}",
|
|
8591
8611
|
"dark": "{colorBlue400}"
|
|
8592
8612
|
},
|
|
8613
|
+
"colorGapGlobalDrawer": {
|
|
8614
|
+
"light": "{colorGrey200}",
|
|
8615
|
+
"dark": "{colorGrey900}"
|
|
8616
|
+
},
|
|
8593
8617
|
"fontExpandableHeadingSize": "14px",
|
|
8594
8618
|
"borderDividerSectionWidth": "1px"
|
|
8595
8619
|
}
|
|
@@ -9699,6 +9723,10 @@ export var preset = {
|
|
|
9699
9723
|
"colorDropzoneBorderHover": {
|
|
9700
9724
|
"light": "{colorBlue400}",
|
|
9701
9725
|
"dark": "{colorBlue400}"
|
|
9726
|
+
},
|
|
9727
|
+
"colorGapGlobalDrawer": {
|
|
9728
|
+
"light": "{colorGrey900}",
|
|
9729
|
+
"dark": "{colorGrey900}"
|
|
9702
9730
|
}
|
|
9703
9731
|
}
|
|
9704
9732
|
}
|
|
@@ -10146,6 +10174,7 @@ export var preset = {
|
|
|
10146
10174
|
"colorDropzoneTextHover": "color",
|
|
10147
10175
|
"colorDropzoneBorderDefault": "color",
|
|
10148
10176
|
"colorDropzoneBorderHover": "color",
|
|
10177
|
+
"colorGapGlobalDrawer": "color",
|
|
10149
10178
|
"motionDurationExtraFast": "motion",
|
|
10150
10179
|
"motionDurationExtraSlow": "motion",
|
|
10151
10180
|
"motionDurationFast": "motion",
|
|
@@ -11459,6 +11488,7 @@ export var preset = {
|
|
|
11459
11488
|
"colorDropzoneTextHover": "color-dropzone-text-hover",
|
|
11460
11489
|
"colorDropzoneBorderDefault": "color-dropzone-border-default",
|
|
11461
11490
|
"colorDropzoneBorderHover": "color-dropzone-border-hover",
|
|
11491
|
+
"colorGapGlobalDrawer": "color-gap-global-drawer",
|
|
11462
11492
|
"fontBoxValueLargeWeight": "font-box-value-large-weight",
|
|
11463
11493
|
"fontButtonLetterSpacing": "font-button-letter-spacing",
|
|
11464
11494
|
"fontChartDetailSize": "font-chart-detail-size",
|
|
@@ -12217,6 +12247,7 @@ export var preset = {
|
|
|
12217
12247
|
"colorDropzoneTextHover": "--color-dropzone-text-hover-yjnvhw",
|
|
12218
12248
|
"colorDropzoneBorderDefault": "--color-dropzone-border-default-lohkzd",
|
|
12219
12249
|
"colorDropzoneBorderHover": "--color-dropzone-border-hover-ejc85p",
|
|
12250
|
+
"colorGapGlobalDrawer": "--color-gap-global-drawer-w5yxw2",
|
|
12220
12251
|
"fontBoxValueLargeWeight": "--font-box-value-large-weight-wr00sw",
|
|
12221
12252
|
"fontButtonLetterSpacing": "--font-button-letter-spacing-ufowe3",
|
|
12222
12253
|
"fontChartDetailSize": "--font-chart-detail-size-9qr25q",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawers.d.ts","sourceRoot":"","sources":["../../../../../src/internal/plugins/controllers/drawers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAGzD,KAAK,sBAAsB,GAAG,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC;AAE/E,UAAU,mBAAmB;IAC3B,kBAAkB,EAAE,sBAAsB,CAAC;CAC5C;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC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CACF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport debounce from '../../debounce';\nimport { NonCancelableEventHandler } from '../../events';\nimport { reportRuntimeApiWarning } from '../helpers/metrics';\n\ntype DrawerVisibilityChange = (callback: (isVisible: boolean) => void) => void;\n\ninterface MountContentContext {\n onVisibilityChange: DrawerVisibilityChange;\n}\n\nexport interface DrawerStateChangeParams {\n isOpen: boolean;\n initiatedByUserAction?: boolean;\n}\n\nexport interface DrawerConfig {\n id: string;\n type?: 'local' | 'global';\n ariaLabels: {\n content?: string;\n closeButton?: string;\n triggerButton?: string;\n resizeHandle?: string;\n resizeHandleTooltipText?: string;\n };\n badge?: boolean;\n resizable?: boolean;\n defaultSize?: number;\n onResize?: NonCancelableEventHandler<{ size: number; id: string }>;\n orderPriority?: number;\n defaultActive?: boolean;\n trigger?: {\n iconSvg: string;\n };\n mountContent: (container: HTMLElement, mountContext: MountContentContext) => void;\n unmountContent: (container: HTMLElement) => void;\n preserveInactiveContent?: boolean;\n onToggle?: NonCancelableEventHandler<DrawerStateChangeParams>;\n}\n\nconst updatableProperties = [\n 'badge',\n 'resizable',\n 'defaultSize',\n 'orderPriority',\n 'defaultActive',\n 'onResize',\n] as const;\n\nexport type UpdateDrawerConfig = { id: DrawerConfig['id'] } & Partial<\n Pick<DrawerConfig, (typeof updatableProperties)[number]>\n>;\n\ntype DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;\ntype DrawersUpdateListener = (drawers: Array<DrawerConfig>) => void;\n\nexport type DrawersToggledListener = (drawerId: string, params?: OpenCloseDrawerParams) => void;\n\ninterface OpenCloseDrawerParams {\n initiatedByUserAction: boolean;\n}\n\nexport interface DrawersApiPublic {\n registerDrawer(config: DrawerConfig): void;\n updateDrawer(config: UpdateDrawerConfig): void;\n openDrawer(drawerId: string, params?: OpenCloseDrawerParams): void;\n closeDrawer(drawerId: string, params?: OpenCloseDrawerParams): void;\n}\n\nexport interface DrawersApiInternal {\n clearRegisteredDrawers(): void;\n onDrawersRegistered(listener: DrawersRegistrationListener): () => void;\n onDrawerOpened(listener: DrawersToggledListener): () => void;\n onDrawerClosed(listener: DrawersToggledListener): () => void;\n onDrawersUpdated(listener: DrawersUpdateListener): void;\n getDrawersState(): Array<DrawerConfig>;\n}\n\nexport class DrawersController {\n private drawers: Array<DrawerConfig> = [];\n private drawersRegistrationListener: DrawersRegistrationListener | null = null;\n private drawerOpenedListener: DrawersToggledListener | null = null;\n private drawerClosedListener: DrawersToggledListener | null = null;\n private drawersUpdateListeners: Array<DrawersUpdateListener> = [];\n\n scheduleUpdate = debounce(() => {\n this.drawersRegistrationListener?.(this.drawers);\n this.drawersUpdateListeners.forEach(drawersUpdateListeners => {\n drawersUpdateListeners?.(this.drawers);\n });\n }, 0);\n\n registerDrawer = (config: DrawerConfig) => {\n if (this.drawers.find(drawer => drawer.id === config.id)) {\n reportRuntimeApiWarning('app-layout-drawers', `drawer with id \"${config.id}\" is already registered`);\n }\n this.drawers = this.drawers.concat(config);\n this.scheduleUpdate();\n };\n\n updateDrawer = ({ id: drawerId, ...rest }: UpdateDrawerConfig) => {\n const drawerIndex = this.drawers.findIndex(({ id }) => id === drawerId);\n const oldDrawerConfig = this.drawers?.[drawerIndex];\n if (!oldDrawerConfig) {\n throw new Error(`[AwsUi] [runtime drawers] drawer with id ${drawerId} not found`);\n }\n const drawers = this.drawers.slice();\n const updatedDrawer = { ...oldDrawerConfig };\n for (const key of updatableProperties) {\n if (key in rest) {\n updatedDrawer[key] = (rest as any)[key];\n }\n }\n drawers[drawerIndex] = updatedDrawer;\n this.drawers = drawers;\n this.scheduleUpdate();\n };\n\n onDrawersRegistered = (listener: DrawersRegistrationListener) => {\n if (this.drawersRegistrationListener !== null) {\n reportRuntimeApiWarning(\n 'app-layout-drawers',\n 'multiple app layout instances detected when calling onDrawersRegistered'\n );\n }\n this.drawersRegistrationListener = listener;\n this.scheduleUpdate();\n return () => {\n this.drawersRegistrationListener = null;\n this.drawersUpdateListeners = [];\n };\n };\n\n clearRegisteredDrawers = () => {\n this.drawers = [];\n };\n\n onDrawerOpened = (listener: DrawersToggledListener) => {\n if (this.drawerOpenedListener !== null) {\n reportRuntimeApiWarning(\n 'app-layout-drawers',\n 'multiple app layout instances detected when calling onDrawerOpened'\n );\n }\n\n this.drawerOpenedListener = listener;\n\n return () => {\n this.drawerOpenedListener = null;\n };\n };\n\n onDrawerClosed = (listener: DrawersToggledListener) => {\n if (this.drawerClosedListener !== null) {\n reportRuntimeApiWarning(\n 'app-layout-drawers',\n 'multiple app layout instances detected when calling onDrawerClosed'\n );\n }\n\n this.drawerClosedListener = listener;\n\n return () => {\n this.drawerClosedListener = null;\n };\n };\n\n openDrawer = (drawerId: string, params?: OpenCloseDrawerParams) => {\n this.drawerOpenedListener?.(drawerId, params);\n };\n\n closeDrawer = (drawerId: string, params?: OpenCloseDrawerParams) => {\n this.drawerClosedListener?.(drawerId, params);\n };\n\n onDrawersUpdated = (listener: DrawersUpdateListener) => {\n this.drawersUpdateListeners.push(listener);\n\n return () => {\n this.drawersUpdateListeners = this.drawersUpdateListeners.filter(item => item !== listener);\n };\n };\n\n getDrawersState = () => {\n return this.drawers;\n };\n\n installPublic(api: Partial<DrawersApiPublic> = {}): DrawersApiPublic {\n api.registerDrawer ??= this.registerDrawer;\n api.updateDrawer ??= this.updateDrawer;\n api.openDrawer ??= this.openDrawer;\n api.closeDrawer ??= this.closeDrawer;\n return api as DrawersApiPublic;\n }\n\n installInternal(internalApi: Partial<DrawersApiInternal> = {}): DrawersApiInternal {\n internalApi.clearRegisteredDrawers ??= this.clearRegisteredDrawers;\n internalApi.onDrawersRegistered ??= this.onDrawersRegistered;\n internalApi.onDrawerOpened ??= this.onDrawerOpened;\n internalApi.onDrawerClosed ??= this.onDrawerClosed;\n internalApi.onDrawersUpdated ??= this.onDrawersUpdated;\n internalApi.getDrawersState ??= this.getDrawersState;\n return internalApi as DrawersApiInternal;\n }\n}\n"]}
|
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yright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport debounce from '../../debounce';\nimport { NonCancelableEventHandler } from '../../events';\nimport { reportRuntimeApiWarning } from '../helpers/metrics';\n\ntype DrawerVisibilityChange = (callback: (isVisible: boolean) => void) => void;\n\ninterface MountContentContext {\n onVisibilityChange: DrawerVisibilityChange;\n}\n\nexport interface DrawerStateChangeParams {\n isOpen: boolean;\n initiatedByUserAction?: boolean;\n}\n\nexport interface DrawerConfig {\n id: string;\n type?: 'local' | 'global';\n ariaLabels: {\n content?: string;\n closeButton?: string;\n triggerButton?: string;\n resizeHandle?: string;\n resizeHandleTooltipText?: string;\n expandedModeButton?: string;\n };\n isExpandable?: boolean;\n badge?: boolean;\n resizable?: boolean;\n defaultSize?: number;\n onResize?: NonCancelableEventHandler<{ size: number; id: string }>;\n orderPriority?: number;\n defaultActive?: boolean;\n trigger?: {\n iconSvg: string;\n };\n mountContent: (container: HTMLElement, mountContext: MountContentContext) => void;\n unmountContent: (container: HTMLElement) => void;\n preserveInactiveContent?: boolean;\n onToggle?: NonCancelableEventHandler<DrawerStateChangeParams>;\n}\n\nconst updatableProperties = [\n 'badge',\n 'resizable',\n 'defaultSize',\n 'orderPriority',\n 'defaultActive',\n 'onResize',\n] as const;\n\nexport type UpdateDrawerConfig = { id: DrawerConfig['id'] } & Partial<\n Pick<DrawerConfig, (typeof updatableProperties)[number]>\n>;\n\ntype DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;\ntype DrawersUpdateListener = (drawers: Array<DrawerConfig>) => void;\n\nexport type DrawersToggledListener = (drawerId: string, params?: OpenCloseDrawerParams) => void;\n\ninterface OpenCloseDrawerParams {\n initiatedByUserAction: boolean;\n}\n\nexport interface DrawersApiPublic {\n registerDrawer(config: DrawerConfig): void;\n updateDrawer(config: UpdateDrawerConfig): void;\n openDrawer(drawerId: string, params?: OpenCloseDrawerParams): void;\n closeDrawer(drawerId: string, params?: OpenCloseDrawerParams): void;\n}\n\nexport interface DrawersApiInternal {\n clearRegisteredDrawers(): void;\n onDrawersRegistered(listener: DrawersRegistrationListener): () => void;\n onDrawerOpened(listener: DrawersToggledListener): () => void;\n onDrawerClosed(listener: DrawersToggledListener): () => void;\n onDrawersUpdated(listener: DrawersUpdateListener): void;\n getDrawersState(): Array<DrawerConfig>;\n}\n\nexport class DrawersController {\n private drawers: Array<DrawerConfig> = [];\n private drawersRegistrationListener: DrawersRegistrationListener | null = null;\n private drawerOpenedListener: DrawersToggledListener | null = null;\n private drawerClosedListener: DrawersToggledListener | null = null;\n private drawersUpdateListeners: Array<DrawersUpdateListener> = [];\n\n scheduleUpdate = debounce(() => {\n this.drawersRegistrationListener?.(this.drawers);\n this.drawersUpdateListeners.forEach(drawersUpdateListeners => {\n drawersUpdateListeners?.(this.drawers);\n });\n }, 0);\n\n registerDrawer = (config: DrawerConfig) => {\n if (this.drawers.find(drawer => drawer.id === config.id)) {\n reportRuntimeApiWarning('app-layout-drawers', `drawer with id \"${config.id}\" is already registered`);\n }\n this.drawers = this.drawers.concat(config);\n this.scheduleUpdate();\n };\n\n updateDrawer = ({ id: drawerId, ...rest }: UpdateDrawerConfig) => {\n const drawerIndex = this.drawers.findIndex(({ id }) => id === drawerId);\n const oldDrawerConfig = this.drawers?.[drawerIndex];\n if (!oldDrawerConfig) {\n throw new Error(`[AwsUi] [runtime drawers] drawer with id ${drawerId} not found`);\n }\n const drawers = this.drawers.slice();\n const updatedDrawer = { ...oldDrawerConfig };\n for (const key of updatableProperties) {\n if (key in rest) {\n updatedDrawer[key] = (rest as any)[key];\n }\n }\n drawers[drawerIndex] = updatedDrawer;\n this.drawers = drawers;\n this.scheduleUpdate();\n };\n\n onDrawersRegistered = (listener: DrawersRegistrationListener) => {\n if (this.drawersRegistrationListener !== null) {\n reportRuntimeApiWarning(\n 'app-layout-drawers',\n 'multiple app layout instances detected when calling onDrawersRegistered'\n );\n }\n this.drawersRegistrationListener = listener;\n this.scheduleUpdate();\n return () => {\n this.drawersRegistrationListener = null;\n this.drawersUpdateListeners = [];\n };\n };\n\n clearRegisteredDrawers = () => {\n this.drawers = [];\n };\n\n onDrawerOpened = (listener: DrawersToggledListener) => {\n if (this.drawerOpenedListener !== null) {\n reportRuntimeApiWarning(\n 'app-layout-drawers',\n 'multiple app layout instances detected when calling onDrawerOpened'\n );\n }\n\n this.drawerOpenedListener = listener;\n\n return () => {\n this.drawerOpenedListener = null;\n };\n };\n\n onDrawerClosed = (listener: DrawersToggledListener) => {\n if (this.drawerClosedListener !== null) {\n reportRuntimeApiWarning(\n 'app-layout-drawers',\n 'multiple app layout instances detected when calling onDrawerClosed'\n );\n }\n\n this.drawerClosedListener = listener;\n\n return () => {\n this.drawerClosedListener = null;\n };\n };\n\n openDrawer = (drawerId: string, params?: OpenCloseDrawerParams) => {\n this.drawerOpenedListener?.(drawerId, params);\n };\n\n closeDrawer = (drawerId: string, params?: OpenCloseDrawerParams) => {\n this.drawerClosedListener?.(drawerId, params);\n };\n\n onDrawersUpdated = (listener: DrawersUpdateListener) => {\n this.drawersUpdateListeners.push(listener);\n\n return () => {\n this.drawersUpdateListeners = this.drawersUpdateListeners.filter(item => item !== listener);\n };\n };\n\n getDrawersState = () => {\n return this.drawers;\n };\n\n installPublic(api: Partial<DrawersApiPublic> = {}): DrawersApiPublic {\n api.registerDrawer ??= this.registerDrawer;\n api.updateDrawer ??= this.updateDrawer;\n api.openDrawer ??= this.openDrawer;\n api.closeDrawer ??= this.closeDrawer;\n return api as DrawersApiPublic;\n }\n\n installInternal(internalApi: Partial<DrawersApiInternal> = {}): DrawersApiInternal {\n internalApi.clearRegisteredDrawers ??= this.clearRegisteredDrawers;\n internalApi.onDrawersRegistered ??= this.onDrawersRegistered;\n internalApi.onDrawerOpened ??= this.onDrawerOpened;\n internalApi.onDrawerClosed ??= this.onDrawerClosed;\n internalApi.onDrawersUpdated ??= this.onDrawersUpdated;\n internalApi.getDrawersState ??= this.getDrawersState;\n return internalApi as DrawersApiInternal;\n }\n}\n"]}
|
|
@@ -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,eAgO/B;AAED,eAAO,MAAM,0BAA0B,2FAAsD,CAAC"}
|
|
@@ -101,6 +101,7 @@ export function SplitPanelImplementation(_a) {
|
|
|
101
101
|
header: i18nStrings.preferencesTitle,
|
|
102
102
|
confirm: i18nStrings.preferencesConfirm,
|
|
103
103
|
cancel: i18nStrings.preferencesCancel,
|
|
104
|
+
close: i18nStrings.preferencesCloseAriaLabel,
|
|
104
105
|
positionLabel: i18nStrings.preferencesPositionLabel,
|
|
105
106
|
positionDescription: i18nStrings.preferencesPositionDescription,
|
|
106
107
|
positionBottom: i18nStrings.preferencesPositionBottom,
|
|
@@ -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;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,MAA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,IAAI,CACxB,oBAAC,uBAAuB,IACtB,KAAK,EAAE,YAAY,EACnB,YAAY,EAAE,YAAY,EAC1B,SAAS,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
|
+
{"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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iBAAiB;gBACrC,KAAK,EAAE,WAAW,CAAC,yBAAyB;gBAC5C,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 close: i18nStrings.preferencesCloseAriaLabel,\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,eAqCjB"}
|
|
@@ -12,7 +12,8 @@ export default function SplitPanel(_a) {
|
|
|
12
12
|
props: { closeBehavior, hidePreferencesButton },
|
|
13
13
|
});
|
|
14
14
|
const i18n = useInternalI18n('split-panel');
|
|
15
|
-
|
|
15
|
+
const i18nModal = useInternalI18n('modal');
|
|
16
|
+
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), preferencesCloseAriaLabel: i18nModal('closeAriaLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.preferencesCloseAriaLabel) || (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
17
|
}
|
|
17
18
|
applyDisplayName(SplitPanel, 'SplitPanel');
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/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AA8B,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 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
|
+
{"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,E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AC,gBAAgB,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,yBAAyB,CAAC,KAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,iBAAiB,CAAA,EACvG,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 const i18nModal = useInternalI18n('modal');\n\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 preferencesCloseAriaLabel:\n i18nModal('closeAriaLabel', i18nStrings?.preferencesCloseAriaLabel) || 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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AAE,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 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
|
+
{"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 preferencesCloseAriaLabel?: 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":"preferences-modal.d.ts","sourceRoot":"","sources":["../../../src/split-panel/preferences-modal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AASlF,UAAU,2BAA2B;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,qBAAsB,SAAQ,0BAA0B;IAChE,OAAO,EAAE,OAAO,CAAC;IAEjB,WAAW,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,CAAC;IAE7C,WAAW,EAAE,2BAA2B,CAAC;IAEzC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IAEnB,SAAS,EAAE,CAAC,WAAW,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;gCAEsB,qBAAqB;AAA5C,wBAuDE"}
|
|
1
|
+
{"version":3,"file":"preferences-modal.d.ts","sourceRoot":"","sources":["../../../src/split-panel/preferences-modal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AASlF,UAAU,2BAA2B;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,qBAAsB,SAAQ,0BAA0B;IAChE,OAAO,EAAE,OAAO,CAAC;IAEjB,WAAW,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,CAAC;IAE7C,WAAW,EAAE,2BAA2B,CAAC;IAEzC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IAEnB,SAAS,EAAE,CAAC,WAAW,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;gCAEsB,qBAAqB;AAA5C,wBAuDE"}
|
|
@@ -20,7 +20,7 @@ export default (props) => {
|
|
|
20
20
|
const onConfirm = () => {
|
|
21
21
|
props.onConfirm({ position });
|
|
22
22
|
};
|
|
23
|
-
return (React.createElement(InternalModal, { size: "medium", visible: props.visible, onDismiss: props.onDismiss, header: props.i18nStrings.header, closeAriaLabel: props.i18nStrings.
|
|
23
|
+
return (React.createElement(InternalModal, { size: "medium", visible: props.visible, onDismiss: props.onDismiss, header: props.i18nStrings.header, closeAriaLabel: props.i18nStrings.close, footer: React.createElement(InternalBox, { float: "right" },
|
|
24
24
|
React.createElement(InternalSpaceBetween, { direction: "horizontal", size: "xs" },
|
|
25
25
|
React.createElement(InternalButton, { onClick: onCancel, formAction: "none", variant: "link" }, props.i18nStrings.cancel),
|
|
26
26
|
React.createElement(InternalButton, { onClick: onConfirm, variant: "primary" }, props.i18nStrings.confirm))), __internalRootRef: props.__internalRootRef },
|