@cloudscape-design/components 3.0.1276 → 3.0.1277
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/date-range-picker/index.d.ts.map +1 -1
- package/date-range-picker/index.js +6 -7
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/interfaces.d.ts +0 -8
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/drawer/implementation.d.ts +2 -7
- package/drawer/implementation.d.ts.map +1 -1
- package/drawer/implementation.js +2 -5
- package/drawer/implementation.js.map +1 -1
- package/drawer/index.d.ts +1 -11
- package/drawer/index.d.ts.map +1 -1
- package/drawer/index.js +4 -16
- package/drawer/index.js.map +1 -1
- package/drawer/interfaces.d.ts +7 -72
- package/drawer/interfaces.d.ts.map +1 -1
- package/drawer/interfaces.js +0 -2
- package/drawer/interfaces.js.map +1 -1
- package/drawer/styles.css.js +12 -16
- package/drawer/styles.scoped.css +17 -23
- package/drawer/styles.selectors.js +12 -16
- package/internal/base-component/styles.scoped.css +1 -5
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.d.ts +0 -1
- package/internal/generated/styles/tokens.js +0 -1
- package/internal/generated/theming/index.cjs +0 -31
- package/internal/generated/theming/index.js +0 -31
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/drawer/next.d.ts +0 -16
- package/drawer/next.d.ts.map +0 -1
- package/drawer/next.js +0 -31
- package/drawer/next.js.map +0 -1
- package/drawer/utils.d.ts +0 -12
- package/drawer/utils.d.ts.map +0 -1
- package/drawer/utils.js +0 -74
- package/drawer/utils.js.map +0 -1
package/drawer/styles.css.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"drawer": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"with-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"header": "
|
|
12
|
-
"with-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"content-with-paddings": "awsui_content-with-paddings_1sxt8_zqi16_289",
|
|
17
|
-
"footer": "awsui_footer_1sxt8_zqi16_296",
|
|
18
|
-
"is-sticky": "awsui_is-sticky_1sxt8_zqi16_302",
|
|
19
|
-
"test-utils-drawer-content": "awsui_test-utils-drawer-content_1sxt8_zqi16_310"
|
|
4
|
+
"drawer": "awsui_drawer_1sxt8_1gt83_189",
|
|
5
|
+
"with-footer": "awsui_with-footer_1sxt8_1gt83_221",
|
|
6
|
+
"content": "awsui_content_1sxt8_1gt83_226",
|
|
7
|
+
"header": "awsui_header_1sxt8_1gt83_230",
|
|
8
|
+
"with-additional-action": "awsui_with-additional-action_1sxt8_1gt83_247",
|
|
9
|
+
"with-runtime-context": "awsui_with-runtime-context_1sxt8_1gt83_255",
|
|
10
|
+
"with-toolbar": "awsui_with-toolbar_1sxt8_1gt83_258",
|
|
11
|
+
"header-actions": "awsui_header-actions_1sxt8_1gt83_277",
|
|
12
|
+
"content-with-paddings": "awsui_content-with-paddings_1sxt8_1gt83_283",
|
|
13
|
+
"footer": "awsui_footer_1sxt8_1gt83_290",
|
|
14
|
+
"is-sticky": "awsui_is-sticky_1sxt8_1gt83_296",
|
|
15
|
+
"test-utils-drawer-content": "awsui_test-utils-drawer-content_1sxt8_1gt83_304"
|
|
20
16
|
};
|
|
21
17
|
|
package/drawer/styles.scoped.css
CHANGED
|
@@ -186,7 +186,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
187
187
|
SPDX-License-Identifier: Apache-2.0
|
|
188
188
|
*/
|
|
189
|
-
.
|
|
189
|
+
.awsui_drawer_1sxt8_1gt83_189:not(#\9) {
|
|
190
190
|
border-collapse: separate;
|
|
191
191
|
border-spacing: 0;
|
|
192
192
|
box-sizing: border-box;
|
|
@@ -217,23 +217,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
217
217
|
-webkit-font-smoothing: auto;
|
|
218
218
|
-moz-osx-font-smoothing: auto;
|
|
219
219
|
word-wrap: break-word;
|
|
220
|
-
background-color: var(--color-background-drawer-5hs0eh, #ffffff);
|
|
221
220
|
}
|
|
222
|
-
.
|
|
223
|
-
box-shadow: var(--shadow-panel-vk7iea, 0px 0px 0px 1px #b6bec9);
|
|
224
|
-
}
|
|
225
|
-
.awsui_drawer_1sxt8_zqi16_189.awsui_with-footer_1sxt8_zqi16_225:not(#\9) {
|
|
221
|
+
.awsui_drawer_1sxt8_1gt83_189.awsui_with-footer_1sxt8_1gt83_221:not(#\9) {
|
|
226
222
|
display: flex;
|
|
227
223
|
flex-direction: column;
|
|
228
|
-
}
|
|
229
|
-
.awsui_drawer_1sxt8_zqi16_189.awsui_with-footer_1sxt8_zqi16_225.awsui_position-static_1sxt8_zqi16_229:not(#\9) {
|
|
230
224
|
min-block-size: 100%;
|
|
231
225
|
}
|
|
232
|
-
.
|
|
226
|
+
.awsui_drawer_1sxt8_1gt83_189.awsui_with-footer_1sxt8_1gt83_221 > .awsui_content_1sxt8_1gt83_226:not(#\9) {
|
|
233
227
|
flex: 1;
|
|
234
228
|
}
|
|
235
229
|
|
|
236
|
-
.
|
|
230
|
+
.awsui_header_1sxt8_1gt83_230:not(#\9) {
|
|
237
231
|
font-size: var(--font-panel-header-size-33h9j8, 18px);
|
|
238
232
|
letter-spacing: var(--letter-spacing-heading-m-29ewnk, -0.01em);
|
|
239
233
|
line-height: var(--font-panel-header-line-height-8xb2qj, 22px);
|
|
@@ -250,7 +244,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
250
244
|
/* stylelint-enable @cloudscape-design/no-implicit-descendant, selector-max-type */
|
|
251
245
|
}
|
|
252
246
|
@media (min-width: 689px) {
|
|
253
|
-
.
|
|
247
|
+
.awsui_header_1sxt8_1gt83_230.awsui_with-additional-action_1sxt8_1gt83_247:not(#\9) {
|
|
254
248
|
/*
|
|
255
249
|
this padding is needed when the drawer renders inside a runtime drawer and the runtime drawer has an additional action
|
|
256
250
|
on the right (or left in rtl). in this case this padding ensures that the drawer's content does not overlap with runtime actions
|
|
@@ -258,18 +252,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
258
252
|
padding-inline: var(--space-panel-side-left-u1m3s9, 28px) calc(var(--space-xxxl-aut1u7, 40px) + var(--space-scaled-xxl-6wgq96, 32px));
|
|
259
253
|
}
|
|
260
254
|
}
|
|
261
|
-
.
|
|
255
|
+
.awsui_header_1sxt8_1gt83_230.awsui_with-runtime-context_1sxt8_1gt83_255:not(#\9) {
|
|
262
256
|
padding-block: 14px;
|
|
263
257
|
}
|
|
264
|
-
.awsui_with-
|
|
258
|
+
.awsui_with-toolbar_1sxt8_1gt83_258 > .awsui_header_1sxt8_1gt83_230:not(#\9) {
|
|
265
259
|
border-color: transparent;
|
|
266
260
|
margin-block-end: 0px;
|
|
267
261
|
}
|
|
268
|
-
.
|
|
269
|
-
.
|
|
270
|
-
.
|
|
271
|
-
.
|
|
272
|
-
.
|
|
262
|
+
.awsui_header_1sxt8_1gt83_230 h2:not(#\9),
|
|
263
|
+
.awsui_header_1sxt8_1gt83_230 h3:not(#\9),
|
|
264
|
+
.awsui_header_1sxt8_1gt83_230 h4:not(#\9),
|
|
265
|
+
.awsui_header_1sxt8_1gt83_230 h5:not(#\9),
|
|
266
|
+
.awsui_header_1sxt8_1gt83_230 h6:not(#\9) {
|
|
273
267
|
font-size: var(--font-panel-header-size-33h9j8, 18px);
|
|
274
268
|
letter-spacing: var(--letter-spacing-heading-m-29ewnk, -0.01em);
|
|
275
269
|
line-height: var(--font-panel-header-line-height-8xb2qj, 22px);
|
|
@@ -280,26 +274,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
280
274
|
margin-block: 0;
|
|
281
275
|
}
|
|
282
276
|
|
|
283
|
-
.awsui_header-
|
|
277
|
+
.awsui_header-actions_1sxt8_1gt83_277:not(#\9) {
|
|
284
278
|
display: inline-flex;
|
|
285
279
|
align-items: flex-start;
|
|
286
280
|
z-index: 1;
|
|
287
281
|
}
|
|
288
282
|
|
|
289
|
-
.awsui_content-with-
|
|
283
|
+
.awsui_content-with-paddings_1sxt8_1gt83_283:not(#\9):not(:empty) {
|
|
290
284
|
padding-block-start: var(--space-panel-content-top-qvd1dr, 20px);
|
|
291
285
|
padding-inline-start: var(--space-panel-side-left-u1m3s9, 28px);
|
|
292
286
|
padding-inline-end: var(--space-panel-side-right-8wwirc, 24px);
|
|
293
287
|
padding-block-end: var(--space-panel-content-bottom-24c6lu, 40px);
|
|
294
288
|
}
|
|
295
289
|
|
|
296
|
-
.
|
|
290
|
+
.awsui_footer_1sxt8_1gt83_290:not(#\9) {
|
|
297
291
|
background-color: var(--color-background-container-content-6u8rvp, #ffffff);
|
|
298
292
|
border-block-start: var(--border-divider-section-width-uwo8my, 1px) solid var(--color-border-panel-header-ygztvl, #c6c6cd);
|
|
299
293
|
padding-block: var(--space-panel-content-top-qvd1dr, 20px);
|
|
300
294
|
padding-inline: var(--space-panel-side-left-u1m3s9, 28px) var(--space-panel-side-right-8wwirc, 24px);
|
|
301
295
|
}
|
|
302
|
-
.
|
|
296
|
+
.awsui_footer_1sxt8_1gt83_290.awsui_is-sticky_1sxt8_1gt83_296:not(#\9) {
|
|
303
297
|
position: sticky;
|
|
304
298
|
inset-block-end: 0;
|
|
305
299
|
inset-inline-start: 0;
|
|
@@ -307,6 +301,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
307
301
|
z-index: 810;
|
|
308
302
|
}
|
|
309
303
|
|
|
310
|
-
.awsui_test-utils-drawer-
|
|
304
|
+
.awsui_test-utils-drawer-content_1sxt8_1gt83_304:not(#\9) {
|
|
311
305
|
/* used in test-utils */
|
|
312
306
|
}
|
|
@@ -2,21 +2,17 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"drawer": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"with-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"header": "
|
|
13
|
-
"with-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"content-with-paddings": "awsui_content-with-paddings_1sxt8_zqi16_289",
|
|
18
|
-
"footer": "awsui_footer_1sxt8_zqi16_296",
|
|
19
|
-
"is-sticky": "awsui_is-sticky_1sxt8_zqi16_302",
|
|
20
|
-
"test-utils-drawer-content": "awsui_test-utils-drawer-content_1sxt8_zqi16_310"
|
|
5
|
+
"drawer": "awsui_drawer_1sxt8_1gt83_189",
|
|
6
|
+
"with-footer": "awsui_with-footer_1sxt8_1gt83_221",
|
|
7
|
+
"content": "awsui_content_1sxt8_1gt83_226",
|
|
8
|
+
"header": "awsui_header_1sxt8_1gt83_230",
|
|
9
|
+
"with-additional-action": "awsui_with-additional-action_1sxt8_1gt83_247",
|
|
10
|
+
"with-runtime-context": "awsui_with-runtime-context_1sxt8_1gt83_255",
|
|
11
|
+
"with-toolbar": "awsui_with-toolbar_1sxt8_1gt83_258",
|
|
12
|
+
"header-actions": "awsui_header-actions_1sxt8_1gt83_277",
|
|
13
|
+
"content-with-paddings": "awsui_content-with-paddings_1sxt8_1gt83_283",
|
|
14
|
+
"footer": "awsui_footer_1sxt8_1gt83_290",
|
|
15
|
+
"is-sticky": "awsui_is-sticky_1sxt8_1gt83_296",
|
|
16
|
+
"test-utils-drawer-content": "awsui_test-utils-drawer-content_1sxt8_1gt83_304"
|
|
21
17
|
};
|
|
22
18
|
|
|
@@ -283,7 +283,6 @@ body {
|
|
|
283
283
|
--color-background-input-disabled-dihaja:var(--color-neutral-250-vs1is4);
|
|
284
284
|
--color-background-item-selected-9gppru:var(--color-primary-50-1y05xv);
|
|
285
285
|
--color-background-layout-main-5ilwcb:var(--color-white-p1zlvy);
|
|
286
|
-
--color-background-drawer-5hs0eh:var(--color-background-layout-panel-content-xto15e);
|
|
287
286
|
--color-background-layout-mobile-panel-ed0ava:var(--color-neutral-950-lxybh8);
|
|
288
287
|
--color-background-layout-panel-content-xto15e:var(--color-background-container-content-6u8rvp);
|
|
289
288
|
--color-background-layout-panel-hover-tguulw:var(--color-neutral-250-vs1is4);
|
|
@@ -1402,7 +1401,6 @@ body {
|
|
|
1402
1401
|
--color-background-card-p5vrq0:var(--color-background-container-content-6u8rvp);
|
|
1403
1402
|
--color-background-item-card-ww2wfv:var(--color-background-card-p5vrq0);
|
|
1404
1403
|
--color-background-dropdown-item-selected-f3v6te:var(--color-background-item-selected-9gppru);
|
|
1405
|
-
--color-background-drawer-5hs0eh:var(--color-background-layout-panel-content-xto15e);
|
|
1406
1404
|
--color-background-layout-panel-content-xto15e:var(--color-background-container-content-6u8rvp);
|
|
1407
1405
|
--color-background-modal-overlay-d7uby0:var(--color-grey-opaque-70-p0svy7);
|
|
1408
1406
|
--color-background-segment-default-b0r494:var(--color-background-button-normal-default-7f99mv);
|
|
@@ -1670,7 +1668,6 @@ body {
|
|
|
1670
1668
|
--color-background-card-p5vrq0:var(--color-background-container-content-6u8rvp);
|
|
1671
1669
|
--color-background-item-card-ww2wfv:var(--color-background-card-p5vrq0);
|
|
1672
1670
|
--color-background-dropdown-item-selected-f3v6te:var(--color-background-item-selected-9gppru);
|
|
1673
|
-
--color-background-drawer-5hs0eh:var(--color-background-layout-panel-content-xto15e);
|
|
1674
1671
|
--color-background-layout-panel-content-xto15e:var(--color-background-container-content-6u8rvp);
|
|
1675
1672
|
--color-background-modal-overlay-d7uby0:var(--color-grey-opaque-70-p0svy7);
|
|
1676
1673
|
--color-background-segment-hover-800sl4:var(--color-background-button-normal-hover-53op9s);
|
|
@@ -2070,7 +2067,6 @@ body {
|
|
|
2070
2067
|
--color-background-card-p5vrq0:var(--color-background-container-content-6u8rvp);
|
|
2071
2068
|
--color-background-item-card-ww2wfv:var(--color-background-card-p5vrq0);
|
|
2072
2069
|
--color-background-dropdown-item-selected-f3v6te:var(--color-background-item-selected-9gppru);
|
|
2073
|
-
--color-background-drawer-5hs0eh:var(--color-background-layout-panel-content-xto15e);
|
|
2074
2070
|
--color-background-layout-panel-content-xto15e:var(--color-background-container-content-6u8rvp);
|
|
2075
2071
|
--color-background-modal-overlay-d7uby0:var(--color-grey-opaque-70-p0svy7);
|
|
2076
2072
|
--color-background-segment-default-b0r494:var(--color-background-button-normal-default-7f99mv);
|
|
@@ -2236,5 +2232,5 @@ body {
|
|
|
2236
2232
|
}
|
|
2237
2233
|
}
|
|
2238
2234
|
:root {
|
|
2239
|
-
--awsui-version-info-
|
|
2235
|
+
--awsui-version-info-52ff00f9: true;
|
|
2240
2236
|
}
|
package/internal/environment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (52ff00f9)";
|
|
3
|
+
export var GIT_SHA = "52ff00f9";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "core";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -325,7 +325,6 @@ export const colorBackgroundInputDefault: string;
|
|
|
325
325
|
export const colorBackgroundInputDisabled: string;
|
|
326
326
|
export const colorBackgroundItemSelected: string;
|
|
327
327
|
export const colorBackgroundLayoutMain: string;
|
|
328
|
-
export const colorBackgroundDrawer: string;
|
|
329
328
|
export const colorBackgroundLayoutMobilePanel: string;
|
|
330
329
|
export const colorBackgroundLayoutPanelContent: string;
|
|
331
330
|
export const colorBackgroundLayoutPanelHover: string;
|
|
@@ -325,7 +325,6 @@ export var colorBackgroundInputDefault = "var(--color-background-input-default-i
|
|
|
325
325
|
export var colorBackgroundInputDisabled = "var(--color-background-input-disabled-dihaja, #ebebf0)";
|
|
326
326
|
export var colorBackgroundItemSelected = "var(--color-background-item-selected-9gppru, #f0fbff)";
|
|
327
327
|
export var colorBackgroundLayoutMain = "var(--color-background-layout-main-5ilwcb, #ffffff)";
|
|
328
|
-
export var colorBackgroundDrawer = "var(--color-background-drawer-5hs0eh, #ffffff)";
|
|
329
328
|
export var colorBackgroundLayoutMobilePanel = "var(--color-background-layout-mobile-panel-ed0ava, #0f141a)";
|
|
330
329
|
export var colorBackgroundLayoutPanelContent = "var(--color-background-layout-panel-content-xto15e, #ffffff)";
|
|
331
330
|
export var colorBackgroundLayoutPanelHover = "var(--color-background-layout-panel-hover-tguulw, #ebebf0)";
|
|
@@ -1347,10 +1347,6 @@ module.exports.preset = {
|
|
|
1347
1347
|
"light": "{colorWhite}",
|
|
1348
1348
|
"dark": "{colorNeutral850}"
|
|
1349
1349
|
},
|
|
1350
|
-
"colorBackgroundDrawer": {
|
|
1351
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
1352
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
1353
|
-
},
|
|
1354
1350
|
"colorBackgroundLayoutMobilePanel": {
|
|
1355
1351
|
"light": "{colorNeutral950}",
|
|
1356
1352
|
"dark": "{colorNeutral950}"
|
|
@@ -3925,10 +3921,6 @@ module.exports.preset = {
|
|
|
3925
3921
|
"light": "{colorNeutral850}",
|
|
3926
3922
|
"dark": "{colorNeutral850}"
|
|
3927
3923
|
},
|
|
3928
|
-
"colorBackgroundDrawer": {
|
|
3929
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
3930
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
3931
|
-
},
|
|
3932
3924
|
"colorBackgroundLayoutMobilePanel": {
|
|
3933
3925
|
"light": "{colorNeutral950}",
|
|
3934
3926
|
"dark": "{colorNeutral950}"
|
|
@@ -5374,10 +5366,6 @@ module.exports.preset = {
|
|
|
5374
5366
|
"light": "{colorNeutral950}",
|
|
5375
5367
|
"dark": "{colorNeutral950}"
|
|
5376
5368
|
},
|
|
5377
|
-
"colorBackgroundDrawer": {
|
|
5378
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
5379
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
5380
|
-
},
|
|
5381
5369
|
"colorBackgroundLayoutMobilePanel": {
|
|
5382
5370
|
"light": "{colorNeutral950}",
|
|
5383
5371
|
"dark": "{colorNeutral950}"
|
|
@@ -6751,10 +6739,6 @@ module.exports.preset = {
|
|
|
6751
6739
|
"light": "{colorWhite}",
|
|
6752
6740
|
"dark": "{colorNeutral850}"
|
|
6753
6741
|
},
|
|
6754
|
-
"colorBackgroundDrawer": {
|
|
6755
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
6756
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
6757
|
-
},
|
|
6758
6742
|
"colorBackgroundLayoutMobilePanel": {
|
|
6759
6743
|
"light": "{colorNeutral950}",
|
|
6760
6744
|
"dark": "{colorNeutral950}"
|
|
@@ -8013,10 +7997,6 @@ module.exports.preset = {
|
|
|
8013
7997
|
"light": "{colorWhite}",
|
|
8014
7998
|
"dark": "{colorNeutral850}"
|
|
8015
7999
|
},
|
|
8016
|
-
"colorBackgroundDrawer": {
|
|
8017
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
8018
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
8019
|
-
},
|
|
8020
8000
|
"colorBackgroundLayoutMobilePanel": {
|
|
8021
8001
|
"light": "{colorNeutral950}",
|
|
8022
8002
|
"dark": "{colorNeutral950}"
|
|
@@ -9275,10 +9255,6 @@ module.exports.preset = {
|
|
|
9275
9255
|
"light": "{colorWhite}",
|
|
9276
9256
|
"dark": "{colorNeutral850}"
|
|
9277
9257
|
},
|
|
9278
|
-
"colorBackgroundDrawer": {
|
|
9279
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
9280
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
9281
|
-
},
|
|
9282
9258
|
"colorBackgroundLayoutMobilePanel": {
|
|
9283
9259
|
"light": "{colorNeutral950}",
|
|
9284
9260
|
"dark": "{colorNeutral950}"
|
|
@@ -10539,10 +10515,6 @@ module.exports.preset = {
|
|
|
10539
10515
|
"light": "{colorNeutral850}",
|
|
10540
10516
|
"dark": "{colorNeutral850}"
|
|
10541
10517
|
},
|
|
10542
|
-
"colorBackgroundDrawer": {
|
|
10543
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
10544
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
10545
|
-
},
|
|
10546
10518
|
"colorBackgroundLayoutMobilePanel": {
|
|
10547
10519
|
"light": "{colorNeutral950}",
|
|
10548
10520
|
"dark": "{colorNeutral950}"
|
|
@@ -11912,7 +11884,6 @@ module.exports.preset = {
|
|
|
11912
11884
|
"colorBackgroundInputDisabled": "color",
|
|
11913
11885
|
"colorBackgroundItemSelected": "color",
|
|
11914
11886
|
"colorBackgroundLayoutMain": "color",
|
|
11915
|
-
"colorBackgroundDrawer": "color",
|
|
11916
11887
|
"colorBackgroundLayoutMobilePanel": "color",
|
|
11917
11888
|
"colorBackgroundLayoutPanelContent": "color",
|
|
11918
11889
|
"colorBackgroundLayoutPanelHover": "color",
|
|
@@ -13693,7 +13664,6 @@ module.exports.preset = {
|
|
|
13693
13664
|
"colorBackgroundInputDisabled": "color-background-input-disabled",
|
|
13694
13665
|
"colorBackgroundItemSelected": "color-background-item-selected",
|
|
13695
13666
|
"colorBackgroundLayoutMain": "color-background-layout-main",
|
|
13696
|
-
"colorBackgroundDrawer": "color-background-drawer",
|
|
13697
13667
|
"colorBackgroundLayoutMobilePanel": "color-background-layout-mobile-panel",
|
|
13698
13668
|
"colorBackgroundLayoutPanelContent": "color-background-layout-panel-content",
|
|
13699
13669
|
"colorBackgroundLayoutPanelHover": "color-background-layout-panel-hover",
|
|
@@ -14584,7 +14554,6 @@ module.exports.preset = {
|
|
|
14584
14554
|
"colorBackgroundInputDisabled": "--color-background-input-disabled-dihaja",
|
|
14585
14555
|
"colorBackgroundItemSelected": "--color-background-item-selected-9gppru",
|
|
14586
14556
|
"colorBackgroundLayoutMain": "--color-background-layout-main-5ilwcb",
|
|
14587
|
-
"colorBackgroundDrawer": "--color-background-drawer-5hs0eh",
|
|
14588
14557
|
"colorBackgroundLayoutMobilePanel": "--color-background-layout-mobile-panel-ed0ava",
|
|
14589
14558
|
"colorBackgroundLayoutPanelContent": "--color-background-layout-panel-content-xto15e",
|
|
14590
14559
|
"colorBackgroundLayoutPanelHover": "--color-background-layout-panel-hover-tguulw",
|
|
@@ -1347,10 +1347,6 @@ export var preset = {
|
|
|
1347
1347
|
"light": "{colorWhite}",
|
|
1348
1348
|
"dark": "{colorNeutral850}"
|
|
1349
1349
|
},
|
|
1350
|
-
"colorBackgroundDrawer": {
|
|
1351
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
1352
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
1353
|
-
},
|
|
1354
1350
|
"colorBackgroundLayoutMobilePanel": {
|
|
1355
1351
|
"light": "{colorNeutral950}",
|
|
1356
1352
|
"dark": "{colorNeutral950}"
|
|
@@ -3925,10 +3921,6 @@ export var preset = {
|
|
|
3925
3921
|
"light": "{colorNeutral850}",
|
|
3926
3922
|
"dark": "{colorNeutral850}"
|
|
3927
3923
|
},
|
|
3928
|
-
"colorBackgroundDrawer": {
|
|
3929
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
3930
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
3931
|
-
},
|
|
3932
3924
|
"colorBackgroundLayoutMobilePanel": {
|
|
3933
3925
|
"light": "{colorNeutral950}",
|
|
3934
3926
|
"dark": "{colorNeutral950}"
|
|
@@ -5374,10 +5366,6 @@ export var preset = {
|
|
|
5374
5366
|
"light": "{colorNeutral950}",
|
|
5375
5367
|
"dark": "{colorNeutral950}"
|
|
5376
5368
|
},
|
|
5377
|
-
"colorBackgroundDrawer": {
|
|
5378
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
5379
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
5380
|
-
},
|
|
5381
5369
|
"colorBackgroundLayoutMobilePanel": {
|
|
5382
5370
|
"light": "{colorNeutral950}",
|
|
5383
5371
|
"dark": "{colorNeutral950}"
|
|
@@ -6751,10 +6739,6 @@ export var preset = {
|
|
|
6751
6739
|
"light": "{colorWhite}",
|
|
6752
6740
|
"dark": "{colorNeutral850}"
|
|
6753
6741
|
},
|
|
6754
|
-
"colorBackgroundDrawer": {
|
|
6755
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
6756
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
6757
|
-
},
|
|
6758
6742
|
"colorBackgroundLayoutMobilePanel": {
|
|
6759
6743
|
"light": "{colorNeutral950}",
|
|
6760
6744
|
"dark": "{colorNeutral950}"
|
|
@@ -8013,10 +7997,6 @@ export var preset = {
|
|
|
8013
7997
|
"light": "{colorWhite}",
|
|
8014
7998
|
"dark": "{colorNeutral850}"
|
|
8015
7999
|
},
|
|
8016
|
-
"colorBackgroundDrawer": {
|
|
8017
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
8018
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
8019
|
-
},
|
|
8020
8000
|
"colorBackgroundLayoutMobilePanel": {
|
|
8021
8001
|
"light": "{colorNeutral950}",
|
|
8022
8002
|
"dark": "{colorNeutral950}"
|
|
@@ -9275,10 +9255,6 @@ export var preset = {
|
|
|
9275
9255
|
"light": "{colorWhite}",
|
|
9276
9256
|
"dark": "{colorNeutral850}"
|
|
9277
9257
|
},
|
|
9278
|
-
"colorBackgroundDrawer": {
|
|
9279
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
9280
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
9281
|
-
},
|
|
9282
9258
|
"colorBackgroundLayoutMobilePanel": {
|
|
9283
9259
|
"light": "{colorNeutral950}",
|
|
9284
9260
|
"dark": "{colorNeutral950}"
|
|
@@ -10539,10 +10515,6 @@ export var preset = {
|
|
|
10539
10515
|
"light": "{colorNeutral850}",
|
|
10540
10516
|
"dark": "{colorNeutral850}"
|
|
10541
10517
|
},
|
|
10542
|
-
"colorBackgroundDrawer": {
|
|
10543
|
-
"light": "{colorBackgroundLayoutPanelContent}",
|
|
10544
|
-
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
10545
|
-
},
|
|
10546
10518
|
"colorBackgroundLayoutMobilePanel": {
|
|
10547
10519
|
"light": "{colorNeutral950}",
|
|
10548
10520
|
"dark": "{colorNeutral950}"
|
|
@@ -11912,7 +11884,6 @@ export var preset = {
|
|
|
11912
11884
|
"colorBackgroundInputDisabled": "color",
|
|
11913
11885
|
"colorBackgroundItemSelected": "color",
|
|
11914
11886
|
"colorBackgroundLayoutMain": "color",
|
|
11915
|
-
"colorBackgroundDrawer": "color",
|
|
11916
11887
|
"colorBackgroundLayoutMobilePanel": "color",
|
|
11917
11888
|
"colorBackgroundLayoutPanelContent": "color",
|
|
11918
11889
|
"colorBackgroundLayoutPanelHover": "color",
|
|
@@ -13693,7 +13664,6 @@ export var preset = {
|
|
|
13693
13664
|
"colorBackgroundInputDisabled": "color-background-input-disabled",
|
|
13694
13665
|
"colorBackgroundItemSelected": "color-background-item-selected",
|
|
13695
13666
|
"colorBackgroundLayoutMain": "color-background-layout-main",
|
|
13696
|
-
"colorBackgroundDrawer": "color-background-drawer",
|
|
13697
13667
|
"colorBackgroundLayoutMobilePanel": "color-background-layout-mobile-panel",
|
|
13698
13668
|
"colorBackgroundLayoutPanelContent": "color-background-layout-panel-content",
|
|
13699
13669
|
"colorBackgroundLayoutPanelHover": "color-background-layout-panel-hover",
|
|
@@ -14584,7 +14554,6 @@ export var preset = {
|
|
|
14584
14554
|
"colorBackgroundInputDisabled": "--color-background-input-disabled-dihaja",
|
|
14585
14555
|
"colorBackgroundItemSelected": "--color-background-item-selected-9gppru",
|
|
14586
14556
|
"colorBackgroundLayoutMain": "--color-background-layout-main-5ilwcb",
|
|
14587
|
-
"colorBackgroundDrawer": "--color-background-drawer-5hs0eh",
|
|
14588
14557
|
"colorBackgroundLayoutMobilePanel": "--color-background-layout-mobile-panel-ed0ava",
|
|
14589
14558
|
"colorBackgroundLayoutPanelContent": "--color-background-layout-panel-content-xto15e",
|
|
14590
14559
|
"colorBackgroundLayoutPanelHover": "--color-background-layout-panel-hover-tguulw",
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"./internal/base-component/index.js",
|
|
165
165
|
"./internal/base-component/styles.css.js"
|
|
166
166
|
],
|
|
167
|
-
"version": "3.0.
|
|
167
|
+
"version": "3.0.1277",
|
|
168
168
|
"repository": {
|
|
169
169
|
"type": "git",
|
|
170
170
|
"url": "https://github.com/cloudscape-design/components.git"
|
package/drawer/next.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NextDrawerProps } from './interfaces';
|
|
2
|
-
export { NextDrawerProps };
|
|
3
|
-
declare const Drawer: ({
|
|
4
|
-
header,
|
|
5
|
-
headerActions,
|
|
6
|
-
footer,
|
|
7
|
-
disableContentPaddings,
|
|
8
|
-
loading,
|
|
9
|
-
position,
|
|
10
|
-
placement,
|
|
11
|
-
offset,
|
|
12
|
-
stickyOffset,
|
|
13
|
-
zIndex,
|
|
14
|
-
...props
|
|
15
|
-
}: NextDrawerProps) => JSX.Element;
|
|
16
|
-
export default Drawer;
|
package/drawer/next.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../src/drawer/next.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,QAAA,MAAM,MAAM,GAAmB,iIAY5B,eAAe,gBAiCjB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/drawer/next.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
// eslint-disable-next-line @cloudscape-design/build-tools/react-server-components-directive
|
|
4
|
-
'use client';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
7
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
8
|
-
import { getExternalProps } from '../internal/utils/external-props';
|
|
9
|
-
import { InternalDrawer } from './internal';
|
|
10
|
-
const Drawer = function Drawer({ header, headerActions, footer, disableContentPaddings = false, loading = false, position = 'static', placement = 'end', offset, stickyOffset, zIndex, ...props }) {
|
|
11
|
-
const baseComponentProps = useBaseComponent('Drawer', {
|
|
12
|
-
props: {
|
|
13
|
-
disableContentPaddings,
|
|
14
|
-
loading,
|
|
15
|
-
placement,
|
|
16
|
-
position,
|
|
17
|
-
zIndex,
|
|
18
|
-
},
|
|
19
|
-
metadata: {
|
|
20
|
-
hasHeader: !!header,
|
|
21
|
-
hasHeaderActions: !!headerActions,
|
|
22
|
-
hasFooter: !!footer,
|
|
23
|
-
hasOffset: !!offset,
|
|
24
|
-
hasStickyOffset: !!stickyOffset,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
return (React.createElement(InternalDrawer, { ...getExternalProps(props), ...baseComponentProps, header: header, headerActions: headerActions, footer: footer, disableContentPaddings: disableContentPaddings, loading: loading, placement: placement, position: position, offset: offset, stickyOffset: stickyOffset, zIndex: zIndex }));
|
|
28
|
-
};
|
|
29
|
-
export default Drawer;
|
|
30
|
-
applyDisplayName(Drawer, 'Drawer');
|
|
31
|
-
//# sourceMappingURL=next.js.map
|
package/drawer/next.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next.js","sourceRoot":"","sources":["../../../src/drawer/next.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,4FAA4F;AAC5F,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAI5C,MAAM,MAAM,GAAG,SAAS,MAAM,CAAC,EAC7B,MAAM,EACN,aAAa,EACb,MAAM,EACN,sBAAsB,GAAG,KAAK,EAC9B,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,QAAQ,EACnB,SAAS,GAAG,KAAK,EACjB,MAAM,EACN,YAAY,EACZ,MAAM,EACN,GAAG,KAAK,EACQ;IAChB,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,QAAQ,EAAE;QACpD,KAAK,EAAE;YACL,sBAAsB;YACtB,OAAO;YACP,SAAS;YACT,QAAQ;YACR,MAAM;SACP;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,CAAC,CAAC,MAAM;YACnB,gBAAgB,EAAE,CAAC,CAAC,aAAa;YACjC,SAAS,EAAE,CAAC,CAAC,MAAM;YACnB,SAAS,EAAE,CAAC,CAAC,MAAM;YACnB,eAAe,EAAE,CAAC,CAAC,YAAY;SAChC;KACF,CAAC,CAAC;IACH,OAAO,CACL,oBAAC,cAAc,OACT,gBAAgB,CAAC,KAAK,CAAC,KACvB,kBAAkB,EACtB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,EACd,sBAAsB,EAAE,sBAAsB,EAC9C,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,GACd,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC;AAEtB,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// eslint-disable-next-line @cloudscape-design/build-tools/react-server-components-directive\n'use client';\nimport React from 'react';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { NextDrawerProps } from './interfaces';\nimport { InternalDrawer } from './internal';\n\nexport { NextDrawerProps };\n\nconst Drawer = function Drawer({\n header,\n headerActions,\n footer,\n disableContentPaddings = false,\n loading = false,\n position = 'static',\n placement = 'end',\n offset,\n stickyOffset,\n zIndex,\n ...props\n}: NextDrawerProps) {\n const baseComponentProps = useBaseComponent('Drawer', {\n props: {\n disableContentPaddings,\n loading,\n placement,\n position,\n zIndex,\n },\n metadata: {\n hasHeader: !!header,\n hasHeaderActions: !!headerActions,\n hasFooter: !!footer,\n hasOffset: !!offset,\n hasStickyOffset: !!stickyOffset,\n },\n });\n return (\n <InternalDrawer\n {...getExternalProps(props)}\n {...baseComponentProps}\n header={header}\n headerActions={headerActions}\n footer={footer}\n disableContentPaddings={disableContentPaddings}\n loading={loading}\n placement={placement}\n position={position}\n offset={offset}\n stickyOffset={stickyOffset}\n zIndex={zIndex}\n />\n );\n};\n\nexport default Drawer;\n\napplyDisplayName(Drawer, 'Drawer');\n"]}
|
package/drawer/utils.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NextDrawerProps } from './interfaces';
|
|
3
|
-
type PositionProps = Pick<NextDrawerProps, 'position' | 'placement' | 'offset' | 'stickyOffset' | 'zIndex'>;
|
|
4
|
-
export declare function getPositionStyles({
|
|
5
|
-
position,
|
|
6
|
-
zIndex,
|
|
7
|
-
...props
|
|
8
|
-
}: PositionProps): {
|
|
9
|
-
className: string;
|
|
10
|
-
style: React.CSSProperties;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
package/drawer/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/drawer/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/C,KAAK,aAAa,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,cAAc,GAAG,QAAQ,CAAC,CAAC;AAE5G,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,GAAG;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;CAC5B,CAmBA"}
|
package/drawer/utils.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
4
|
-
import styles from './styles.css.js';
|
|
5
|
-
export function getPositionStyles({ position, zIndex, ...props }) {
|
|
6
|
-
if (position === 'sticky' && (props.placement === 'start' || props.placement === 'end')) {
|
|
7
|
-
warnOnce('Drawer', `position="sticky" is not supported with placement="${props.placement}" and falls back to position="static".`);
|
|
8
|
-
position = 'static';
|
|
9
|
-
}
|
|
10
|
-
switch (position) {
|
|
11
|
-
case 'absolute':
|
|
12
|
-
return getStyles(position, { position: 'absolute', zIndex, ...computeAbsoluteOffsets(props) });
|
|
13
|
-
case 'sticky':
|
|
14
|
-
return getStyles(position, { position: 'sticky', zIndex, ...computeStickyOffsets(props) });
|
|
15
|
-
case 'fixed':
|
|
16
|
-
return getStyles(position, { position: 'fixed', zIndex, ...computeAbsoluteOffsets(props) });
|
|
17
|
-
case 'static':
|
|
18
|
-
default:
|
|
19
|
-
return getStyles(position);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
function getStyles(position = 'static', style = {}) {
|
|
23
|
-
return { className: styles[`position-${position}`], style };
|
|
24
|
-
}
|
|
25
|
-
function computeAbsoluteOffsets({ placement, offset: { top, bottom, start, end } = {}, }) {
|
|
26
|
-
const style = {};
|
|
27
|
-
const offset = { top: top !== null && top !== void 0 ? top : 0, bottom: bottom !== null && bottom !== void 0 ? bottom : 0, start: start !== null && start !== void 0 ? start : 0, end: end !== null && end !== void 0 ? end : 0 };
|
|
28
|
-
switch (placement) {
|
|
29
|
-
case 'top':
|
|
30
|
-
style.insetBlockStart = offset.top;
|
|
31
|
-
style.insetInlineStart = offset.start;
|
|
32
|
-
style.insetInlineEnd = offset.end;
|
|
33
|
-
break;
|
|
34
|
-
case 'bottom':
|
|
35
|
-
style.insetBlockEnd = offset.bottom;
|
|
36
|
-
style.insetInlineStart = offset.start;
|
|
37
|
-
style.insetInlineEnd = offset.end;
|
|
38
|
-
break;
|
|
39
|
-
case 'start':
|
|
40
|
-
style.insetInlineStart = offset.start;
|
|
41
|
-
style.insetBlockStart = offset.top;
|
|
42
|
-
style.insetBlockEnd = offset.bottom;
|
|
43
|
-
break;
|
|
44
|
-
case 'end':
|
|
45
|
-
style.insetInlineEnd = offset.end;
|
|
46
|
-
style.insetBlockStart = offset.top;
|
|
47
|
-
style.insetBlockEnd = offset.bottom;
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
return style;
|
|
51
|
-
}
|
|
52
|
-
function computeStickyOffsets({ placement, offset: { top, bottom, start, end } = {}, stickyOffset: { top: stickyTop, bottom: stickyBottom } = {}, }) {
|
|
53
|
-
const style = {};
|
|
54
|
-
const offset = { top: top !== null && top !== void 0 ? top : 0, bottom: bottom !== null && bottom !== void 0 ? bottom : 0, start: start !== null && start !== void 0 ? start : 0, end: end !== null && end !== void 0 ? end : 0 };
|
|
55
|
-
const stickyOffset = { top: stickyTop !== null && stickyTop !== void 0 ? stickyTop : 0, bottom: stickyBottom !== null && stickyBottom !== void 0 ? stickyBottom : 0 };
|
|
56
|
-
switch (placement) {
|
|
57
|
-
case 'top':
|
|
58
|
-
style.insetBlockStart = stickyOffset.top;
|
|
59
|
-
style.marginBlockStart = offset.top;
|
|
60
|
-
style.marginInlineStart = offset.start;
|
|
61
|
-
style.marginInlineEnd = offset.end;
|
|
62
|
-
style.inlineSize = `calc(100% - ${offset.start + offset.end}px)`;
|
|
63
|
-
break;
|
|
64
|
-
case 'bottom':
|
|
65
|
-
style.insetBlockEnd = stickyOffset.bottom;
|
|
66
|
-
style.marginBlockEnd = offset.bottom;
|
|
67
|
-
style.marginInlineStart = offset.start;
|
|
68
|
-
style.marginInlineEnd = offset.end;
|
|
69
|
-
style.inlineSize = `calc(100% - ${offset.start + offset.end}px)`;
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
return style;
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=utils.js.map
|