@pingux/astro 2.149.0 → 2.149.1
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/cjs/components/IconButton/IconButton.styles.d.ts +0 -38
- package/lib/cjs/components/IconButton/IconButton.styles.js +7 -8
- package/lib/cjs/components/Modal/Modal.js +4 -13
- package/lib/cjs/components/Modal/Modal.stories.d.ts +0 -2
- package/lib/cjs/components/Modal/Modal.stories.js +47 -90
- package/lib/cjs/components/Modal/Modal.styles.d.ts +26 -43
- package/lib/cjs/components/Modal/Modal.styles.js +28 -41
- package/lib/cjs/components/Modal/index.d.ts +0 -3
- package/lib/cjs/components/Modal/index.js +1 -22
- package/lib/cjs/components/Modal/tests/Modal.integration.test.js +0 -4
- package/lib/cjs/components/Modal/tests/Modal.unit.test.js +0 -4
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +0 -46
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +0 -3
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +1 -18
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +1 -18
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +18 -59
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +6 -32
- package/lib/cjs/styles/themes/next-gen/variants/button.js +5 -6
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +12 -27
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +13 -28
- package/lib/cjs/types/Modal.d.ts +0 -19
- package/lib/components/IconButton/IconButton.styles.js +8 -9
- package/lib/components/Modal/Modal.js +4 -13
- package/lib/components/Modal/Modal.stories.js +48 -89
- package/lib/components/Modal/Modal.styles.js +27 -39
- package/lib/components/Modal/index.js +1 -4
- package/lib/components/Modal/tests/Modal.integration.test.js +0 -4
- package/lib/components/Modal/tests/Modal.unit.test.js +0 -4
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +0 -3
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +1 -18
- package/lib/styles/themes/next-gen/variants/button.js +5 -6
- package/lib/styles/themes/next-gen/variants/variants.js +13 -28
- package/package.json +1 -1
- package/lib/cjs/components/Modal/Convenience/ModalBody.stories.d.ts +0 -7
- package/lib/cjs/components/Modal/Convenience/ModalBody.stories.js +0 -30
- package/lib/cjs/components/Modal/Convenience/ModalFooter.stories.d.ts +0 -5
- package/lib/cjs/components/Modal/Convenience/ModalFooter.stories.js +0 -35
- package/lib/cjs/components/Modal/Convenience/ModalHeader.stories.d.ts +0 -5
- package/lib/cjs/components/Modal/Convenience/ModalHeader.stories.js +0 -36
- package/lib/cjs/components/Modal/ModalBody.d.ts +0 -9
- package/lib/cjs/components/Modal/ModalBody.js +0 -34
- package/lib/cjs/components/Modal/ModalBody.test.d.ts +0 -1
- package/lib/cjs/components/Modal/ModalBody.test.js +0 -64
- package/lib/cjs/components/Modal/ModalFooter.d.ts +0 -4
- package/lib/cjs/components/Modal/ModalFooter.js +0 -48
- package/lib/cjs/components/Modal/ModalFooter.test.d.ts +0 -1
- package/lib/cjs/components/Modal/ModalFooter.test.js +0 -98
- package/lib/cjs/components/Modal/ModalHeader.d.ts +0 -4
- package/lib/cjs/components/Modal/ModalHeader.js +0 -61
- package/lib/cjs/components/Modal/ModalHeader.test.d.ts +0 -1
- package/lib/cjs/components/Modal/ModalHeader.test.js +0 -96
- package/lib/components/Modal/Convenience/ModalBody.stories.js +0 -20
- package/lib/components/Modal/Convenience/ModalFooter.stories.js +0 -25
- package/lib/components/Modal/Convenience/ModalHeader.stories.js +0 -26
- package/lib/components/Modal/ModalBody.js +0 -20
- package/lib/components/Modal/ModalBody.test.js +0 -61
- package/lib/components/Modal/ModalFooter.js +0 -34
- package/lib/components/Modal/ModalFooter.test.js +0 -95
- package/lib/components/Modal/ModalHeader.js +0 -47
- package/lib/components/Modal/ModalHeader.test.js +0 -93
|
@@ -199,7 +199,6 @@ test('should only hide the top-most overlay', function () {
|
|
|
199
199
|
});
|
|
200
200
|
test('should render a close button if hasCloseButton is true', function () {
|
|
201
201
|
getComponent({
|
|
202
|
-
title: 'Lorem Ipsum',
|
|
203
202
|
hasCloseButton: true
|
|
204
203
|
});
|
|
205
204
|
expect(_testWrapper.screen.queryByRole('button')).toBeInTheDocument();
|
|
@@ -211,7 +210,6 @@ test('should render a custom close button if hasCloseButton is true and custom b
|
|
|
211
210
|
});
|
|
212
211
|
};
|
|
213
212
|
getComponent({
|
|
214
|
-
title: 'Lorem Ipsum',
|
|
215
213
|
hasCloseButton: true,
|
|
216
214
|
closeButton: (0, _react2.jsx)(MyButton, null)
|
|
217
215
|
});
|
|
@@ -220,7 +218,6 @@ test('should render a custom close button if hasCloseButton is true and custom b
|
|
|
220
218
|
});
|
|
221
219
|
test('shouldn\'t auto focus the first tabbable element', function () {
|
|
222
220
|
getComponent({
|
|
223
|
-
title: 'Lorem Ipsum',
|
|
224
221
|
hasCloseButton: true
|
|
225
222
|
});
|
|
226
223
|
var button = _testWrapper.screen.queryByRole('button');
|
|
@@ -228,7 +225,6 @@ test('shouldn\'t auto focus the first tabbable element', function () {
|
|
|
228
225
|
});
|
|
229
226
|
test('should auto focus the first tabbable element if "hasAutoFocus" is true', function () {
|
|
230
227
|
getComponent({
|
|
231
|
-
title: 'Lorem Ipsum',
|
|
232
228
|
hasCloseButton: true,
|
|
233
229
|
hasAutoFocus: true
|
|
234
230
|
});
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -225,5 +225,5 @@ export { default as OnyxDarkTheme } from './styles/themeOverrides/nextGenDarkMod
|
|
|
225
225
|
export { default as NextGenTheme } from './styles/themes/next-gen';
|
|
226
226
|
export { default as OnyxTheme } from './styles/themes/next-gen';
|
|
227
227
|
export * from './types';
|
|
228
|
-
export { OverlayProvider, useOverlayPosition, useOverlayTrigger
|
|
228
|
+
export { OverlayProvider, useOverlayPosition, useOverlayTrigger } from 'react-aria';
|
|
229
229
|
export { Cell, Column, TableBody as DataTableBody, Cell as DataTableCell, Column as DataTableColumn, TableHeader as DataTableHeader, Row as DataTableRow, Item, Row, Section, TableBody as TBody, TableHeader as THead, useOverlayTriggerState, useTreeData, } from 'react-stately';
|
|
@@ -318,29 +318,6 @@ declare const buttons: {
|
|
|
318
318
|
};
|
|
319
319
|
};
|
|
320
320
|
};
|
|
321
|
-
modalHeaderCloseButton: {
|
|
322
|
-
path: {
|
|
323
|
-
fill: string;
|
|
324
|
-
};
|
|
325
|
-
'&.is-focused': {
|
|
326
|
-
outline: string;
|
|
327
|
-
outlineColor: string;
|
|
328
|
-
outlineOffset: string;
|
|
329
|
-
};
|
|
330
|
-
'&.is-hovered': {
|
|
331
|
-
path: {
|
|
332
|
-
fill: string;
|
|
333
|
-
};
|
|
334
|
-
backgroundColor: string;
|
|
335
|
-
};
|
|
336
|
-
'&.is-pressed': {
|
|
337
|
-
backgroundColor: string;
|
|
338
|
-
borderColor: string;
|
|
339
|
-
path: {
|
|
340
|
-
fill: string;
|
|
341
|
-
};
|
|
342
|
-
};
|
|
343
|
-
};
|
|
344
321
|
messageCloseButton: {
|
|
345
322
|
'&.is-hovered': {
|
|
346
323
|
backgroundColor: string;
|
|
@@ -362,29 +339,6 @@ declare const buttons: {
|
|
|
362
339
|
};
|
|
363
340
|
};
|
|
364
341
|
};
|
|
365
|
-
modalCloseButton: {
|
|
366
|
-
path: {
|
|
367
|
-
fill: string;
|
|
368
|
-
};
|
|
369
|
-
'&.is-focused': {
|
|
370
|
-
outline: string;
|
|
371
|
-
outlineColor: string;
|
|
372
|
-
outlineOffset: string;
|
|
373
|
-
};
|
|
374
|
-
'&.is-hovered': {
|
|
375
|
-
path: {
|
|
376
|
-
fill: string;
|
|
377
|
-
};
|
|
378
|
-
backgroundColor: string;
|
|
379
|
-
};
|
|
380
|
-
'&.is-pressed': {
|
|
381
|
-
backgroundColor: string;
|
|
382
|
-
borderColor: string;
|
|
383
|
-
path: {
|
|
384
|
-
fill: string;
|
|
385
|
-
};
|
|
386
|
-
};
|
|
387
|
-
};
|
|
388
342
|
listBoxLink: {
|
|
389
343
|
color: string;
|
|
390
344
|
'&.is-pressed': {
|
|
@@ -42,7 +42,6 @@ var baseIconButton = {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
var hintButton = _objectSpread({}, baseIconButton);
|
|
45
|
-
var modalCloseButton = _objectSpread({}, baseIconButton);
|
|
46
45
|
var iconButtons = {
|
|
47
46
|
base: _objectSpread({}, baseIconButton),
|
|
48
47
|
inverted: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
@@ -86,7 +85,6 @@ var iconButtons = {
|
|
|
86
85
|
}
|
|
87
86
|
}),
|
|
88
87
|
modalCloseButton: _objectSpread({}, baseIconButton),
|
|
89
|
-
modalHeaderCloseButton: _objectSpread({}, baseIconButton),
|
|
90
88
|
messageCloseButton: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
91
89
|
'&.is-hovered': {
|
|
92
90
|
backgroundColor: '#455469'
|
|
@@ -285,7 +283,6 @@ var buttons = {
|
|
|
285
283
|
}
|
|
286
284
|
},
|
|
287
285
|
iconButtons: iconButtons,
|
|
288
|
-
modalCloseButton: modalCloseButton,
|
|
289
286
|
listBoxLink: {
|
|
290
287
|
color: 'blue-400',
|
|
291
288
|
'&.is-pressed': {
|
|
@@ -377,26 +377,9 @@ declare const _default: {
|
|
|
377
377
|
bg: string;
|
|
378
378
|
};
|
|
379
379
|
headingContainer: {
|
|
380
|
-
borderBottom: string;
|
|
381
|
-
borderBottomColor: string;
|
|
382
380
|
bg: string;
|
|
383
381
|
};
|
|
384
|
-
|
|
385
|
-
borderBottom: string;
|
|
386
|
-
borderBottomColor: string;
|
|
387
|
-
bg: string;
|
|
388
|
-
};
|
|
389
|
-
body: {
|
|
390
|
-
bg: string;
|
|
391
|
-
};
|
|
392
|
-
footer: {
|
|
393
|
-
borderTop: string;
|
|
394
|
-
borderTopColor: string;
|
|
395
|
-
bg: string;
|
|
396
|
-
};
|
|
397
|
-
footerContainer: {
|
|
398
|
-
borderTop: string;
|
|
399
|
-
borderTopColor: string;
|
|
382
|
+
buttonsContainer: {
|
|
400
383
|
bg: string;
|
|
401
384
|
};
|
|
402
385
|
};
|
|
@@ -54,26 +54,9 @@ var modal = {
|
|
|
54
54
|
bg: 'background.base'
|
|
55
55
|
},
|
|
56
56
|
headingContainer: {
|
|
57
|
-
borderBottom: '1px solid',
|
|
58
|
-
borderBottomColor: 'border.base',
|
|
59
57
|
bg: 'background.base'
|
|
60
58
|
},
|
|
61
|
-
|
|
62
|
-
borderBottom: '1px solid',
|
|
63
|
-
borderBottomColor: 'border.base',
|
|
64
|
-
bg: 'background.base'
|
|
65
|
-
},
|
|
66
|
-
body: {
|
|
67
|
-
bg: 'background.base'
|
|
68
|
-
},
|
|
69
|
-
footer: {
|
|
70
|
-
borderTop: '1px solid',
|
|
71
|
-
borderTopColor: 'border.base',
|
|
72
|
-
bg: 'background.base'
|
|
73
|
-
},
|
|
74
|
-
footerContainer: {
|
|
75
|
-
borderTop: '1px solid',
|
|
76
|
-
borderTopColor: 'border.base',
|
|
59
|
+
buttonsContainer: {
|
|
77
60
|
bg: 'background.base'
|
|
78
61
|
}
|
|
79
62
|
};
|
|
@@ -1296,38 +1296,9 @@ declare const _default: {
|
|
|
1296
1296
|
};
|
|
1297
1297
|
};
|
|
1298
1298
|
modalCloseButton: {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
borderRadius: string;
|
|
1303
|
-
border: string;
|
|
1304
|
-
borderColor: string;
|
|
1305
|
-
path: {
|
|
1306
|
-
fill: string;
|
|
1307
|
-
};
|
|
1308
|
-
'&.is-focused': {
|
|
1309
|
-
outline: string;
|
|
1310
|
-
outlineColor: string;
|
|
1311
|
-
outlineOffset: string;
|
|
1312
|
-
};
|
|
1313
|
-
'&.is-hovered': {
|
|
1314
|
-
backgroundColor: string;
|
|
1315
|
-
path: {
|
|
1316
|
-
fill: string;
|
|
1317
|
-
};
|
|
1318
|
-
};
|
|
1319
|
-
'&.is-pressed': {
|
|
1320
|
-
backgroundColor: string;
|
|
1321
|
-
borderColor: string;
|
|
1322
|
-
path: {
|
|
1323
|
-
fill: string;
|
|
1324
|
-
};
|
|
1325
|
-
};
|
|
1326
|
-
};
|
|
1327
|
-
modalHeaderCloseButton: {
|
|
1328
|
-
top: string;
|
|
1329
|
-
transform: string;
|
|
1330
|
-
right: string;
|
|
1299
|
+
position: string;
|
|
1300
|
+
top: number;
|
|
1301
|
+
right: number;
|
|
1331
1302
|
cursor: string;
|
|
1332
1303
|
transition: string;
|
|
1333
1304
|
outline: string;
|
|
@@ -1607,6 +1578,9 @@ declare const _default: {
|
|
|
1607
1578
|
};
|
|
1608
1579
|
};
|
|
1609
1580
|
modalCloseButton: {
|
|
1581
|
+
position: string;
|
|
1582
|
+
top: number;
|
|
1583
|
+
right: number;
|
|
1610
1584
|
cursor: string;
|
|
1611
1585
|
transition: string;
|
|
1612
1586
|
outline: string;
|
|
@@ -4269,10 +4243,17 @@ declare const _default: {
|
|
|
4269
4243
|
modal: {
|
|
4270
4244
|
content: {
|
|
4271
4245
|
boxShadow: string;
|
|
4246
|
+
px: string;
|
|
4247
|
+
pb: string;
|
|
4248
|
+
pt: number;
|
|
4272
4249
|
borderRadius: string;
|
|
4273
4250
|
opacity: number;
|
|
4251
|
+
top: string;
|
|
4252
|
+
transform: string;
|
|
4274
4253
|
transition: string;
|
|
4275
4254
|
m: string[];
|
|
4255
|
+
maxHeight: string;
|
|
4256
|
+
overflowY: string;
|
|
4276
4257
|
'&.is-open-no-transition': {
|
|
4277
4258
|
opacity: string;
|
|
4278
4259
|
transform: string;
|
|
@@ -4302,35 +4283,13 @@ declare const _default: {
|
|
|
4302
4283
|
maxWidth: string[];
|
|
4303
4284
|
};
|
|
4304
4285
|
};
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
borderBottomColor: string;
|
|
4308
|
-
bg: string;
|
|
4309
|
-
borderRadius: string;
|
|
4286
|
+
container: {
|
|
4287
|
+
justifyContent: string;
|
|
4310
4288
|
};
|
|
4311
4289
|
header: {
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
px: string;
|
|
4316
|
-
py: string;
|
|
4317
|
-
};
|
|
4318
|
-
bodyContainer: {
|
|
4319
|
-
p: string;
|
|
4320
|
-
};
|
|
4321
|
-
body: {
|
|
4322
|
-
p: string;
|
|
4323
|
-
};
|
|
4324
|
-
footer: {
|
|
4325
|
-
borderTop: string;
|
|
4326
|
-
borderTopColor: string;
|
|
4327
|
-
borderRadius: string;
|
|
4328
|
-
p: string;
|
|
4329
|
-
};
|
|
4330
|
-
footerContainer: {
|
|
4331
|
-
borderTop: string;
|
|
4332
|
-
borderTopColor: string;
|
|
4333
|
-
borderRadius: string;
|
|
4290
|
+
pt: string;
|
|
4291
|
+
bg: string;
|
|
4292
|
+
mb: string;
|
|
4334
4293
|
};
|
|
4335
4294
|
};
|
|
4336
4295
|
navBar: {
|
|
@@ -1003,38 +1003,9 @@ declare const buttons: {
|
|
|
1003
1003
|
};
|
|
1004
1004
|
};
|
|
1005
1005
|
modalCloseButton: {
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
borderRadius: string;
|
|
1010
|
-
border: string;
|
|
1011
|
-
borderColor: string;
|
|
1012
|
-
path: {
|
|
1013
|
-
fill: string;
|
|
1014
|
-
};
|
|
1015
|
-
'&.is-focused': {
|
|
1016
|
-
outline: string;
|
|
1017
|
-
outlineColor: string;
|
|
1018
|
-
outlineOffset: string;
|
|
1019
|
-
};
|
|
1020
|
-
'&.is-hovered': {
|
|
1021
|
-
backgroundColor: string;
|
|
1022
|
-
path: {
|
|
1023
|
-
fill: string;
|
|
1024
|
-
};
|
|
1025
|
-
};
|
|
1026
|
-
'&.is-pressed': {
|
|
1027
|
-
backgroundColor: string;
|
|
1028
|
-
borderColor: string;
|
|
1029
|
-
path: {
|
|
1030
|
-
fill: string;
|
|
1031
|
-
};
|
|
1032
|
-
};
|
|
1033
|
-
};
|
|
1034
|
-
modalHeaderCloseButton: {
|
|
1035
|
-
top: string;
|
|
1036
|
-
transform: string;
|
|
1037
|
-
right: string;
|
|
1006
|
+
position: string;
|
|
1007
|
+
top: number;
|
|
1008
|
+
right: number;
|
|
1038
1009
|
cursor: string;
|
|
1039
1010
|
transition: string;
|
|
1040
1011
|
outline: string;
|
|
@@ -1314,6 +1285,9 @@ declare const buttons: {
|
|
|
1314
1285
|
};
|
|
1315
1286
|
};
|
|
1316
1287
|
modalCloseButton: {
|
|
1288
|
+
position: string;
|
|
1289
|
+
top: number;
|
|
1290
|
+
right: number;
|
|
1317
1291
|
cursor: string;
|
|
1318
1292
|
transition: string;
|
|
1319
1293
|
outline: string;
|
|
@@ -356,7 +356,11 @@ var baseIconButton = {
|
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
};
|
|
359
|
-
var modalCloseButton = _objectSpread({}, baseIconButton)
|
|
359
|
+
var modalCloseButton = _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
360
|
+
position: 'absolute',
|
|
361
|
+
top: 32,
|
|
362
|
+
right: 18
|
|
363
|
+
});
|
|
360
364
|
var onyxIconButton = _objectSpread(_objectSpread(_objectSpread({}, baseIconButton), secondary), {}, {
|
|
361
365
|
path: {
|
|
362
366
|
fill: 'blue'
|
|
@@ -447,11 +451,6 @@ var iconButtons = {
|
|
|
447
451
|
display: 'inline-flex'
|
|
448
452
|
}),
|
|
449
453
|
modalCloseButton: modalCloseButton,
|
|
450
|
-
modalHeaderCloseButton: _objectSpread(_objectSpread({}, modalCloseButton), {}, {
|
|
451
|
-
top: '50%',
|
|
452
|
-
transform: 'translateY(-50%)',
|
|
453
|
-
right: '16px'
|
|
454
|
-
}),
|
|
455
454
|
badge: {
|
|
456
455
|
deleteButton: _objectSpread(_objectSpread({}, baseIconButton), {}, {
|
|
457
456
|
borderRadius: '50%',
|
|
@@ -749,10 +749,17 @@ declare const _default: {
|
|
|
749
749
|
modal: {
|
|
750
750
|
content: {
|
|
751
751
|
boxShadow: string;
|
|
752
|
+
px: string;
|
|
753
|
+
pb: string;
|
|
754
|
+
pt: number;
|
|
752
755
|
borderRadius: string;
|
|
753
756
|
opacity: number;
|
|
757
|
+
top: string;
|
|
758
|
+
transform: string;
|
|
754
759
|
transition: string;
|
|
755
760
|
m: string[];
|
|
761
|
+
maxHeight: string;
|
|
762
|
+
overflowY: string;
|
|
756
763
|
'&.is-open-no-transition': {
|
|
757
764
|
opacity: string;
|
|
758
765
|
transform: string;
|
|
@@ -782,35 +789,13 @@ declare const _default: {
|
|
|
782
789
|
maxWidth: string[];
|
|
783
790
|
};
|
|
784
791
|
};
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
borderBottomColor: string;
|
|
788
|
-
bg: string;
|
|
789
|
-
borderRadius: string;
|
|
792
|
+
container: {
|
|
793
|
+
justifyContent: string;
|
|
790
794
|
};
|
|
791
795
|
header: {
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
px: string;
|
|
796
|
-
py: string;
|
|
797
|
-
};
|
|
798
|
-
bodyContainer: {
|
|
799
|
-
p: string;
|
|
800
|
-
};
|
|
801
|
-
body: {
|
|
802
|
-
p: string;
|
|
803
|
-
};
|
|
804
|
-
footer: {
|
|
805
|
-
borderTop: string;
|
|
806
|
-
borderTopColor: string;
|
|
807
|
-
borderRadius: string;
|
|
808
|
-
p: string;
|
|
809
|
-
};
|
|
810
|
-
footerContainer: {
|
|
811
|
-
borderTop: string;
|
|
812
|
-
borderTopColor: string;
|
|
813
|
-
borderRadius: string;
|
|
796
|
+
pt: string;
|
|
797
|
+
bg: string;
|
|
798
|
+
mb: string;
|
|
814
799
|
};
|
|
815
800
|
};
|
|
816
801
|
navBar: {
|
|
@@ -83,10 +83,17 @@ var modalSize = {
|
|
|
83
83
|
var modal = {
|
|
84
84
|
content: {
|
|
85
85
|
boxShadow: '0px 8px 16px 0px rgba(0, 0, 0, 0.5)',
|
|
86
|
-
|
|
86
|
+
px: 'lg',
|
|
87
|
+
pb: 'lg',
|
|
88
|
+
pt: 0,
|
|
89
|
+
borderRadius: '4px',
|
|
87
90
|
opacity: 0,
|
|
91
|
+
top: '0',
|
|
92
|
+
transform: 'translate(0, -50px)',
|
|
88
93
|
transition: 'opacity 300ms ease, transform 500ms ease-out',
|
|
89
94
|
m: ['sm', 'sm', '1.75rem auto'],
|
|
95
|
+
maxHeight: 'calc(100vh - 3.5rem)',
|
|
96
|
+
overflowY: 'auto',
|
|
90
97
|
'&.is-open-no-transition': {
|
|
91
98
|
opacity: '100%',
|
|
92
99
|
transform: 'none'
|
|
@@ -116,35 +123,13 @@ var modal = {
|
|
|
116
123
|
maxWidth: modalSize.full
|
|
117
124
|
}
|
|
118
125
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
borderBottomColor: 'gray-200',
|
|
122
|
-
bg: 'background.base',
|
|
123
|
-
borderRadius: '1em 1em 0px 0px'
|
|
126
|
+
container: {
|
|
127
|
+
justifyContent: 'start'
|
|
124
128
|
},
|
|
125
129
|
header: {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
px: 'lg',
|
|
130
|
-
py: 'md'
|
|
131
|
-
},
|
|
132
|
-
bodyContainer: {
|
|
133
|
-
p: 'lg'
|
|
134
|
-
},
|
|
135
|
-
body: {
|
|
136
|
-
p: 'lg'
|
|
137
|
-
},
|
|
138
|
-
footer: {
|
|
139
|
-
borderTop: '1px solid',
|
|
140
|
-
borderTopColor: 'gray-200',
|
|
141
|
-
borderRadius: '0px 0px 1em 1em',
|
|
142
|
-
p: 'lg'
|
|
143
|
-
},
|
|
144
|
-
footerContainer: {
|
|
145
|
-
borderTop: '1px solid',
|
|
146
|
-
borderTopColor: 'gray-200',
|
|
147
|
-
borderRadius: '0px 0px 1em 1em'
|
|
130
|
+
pt: 'lg',
|
|
131
|
+
bg: 'background.base',
|
|
132
|
+
mb: 'lg'
|
|
148
133
|
}
|
|
149
134
|
};
|
|
150
135
|
var listBox = {
|
package/lib/cjs/types/Modal.d.ts
CHANGED
|
@@ -33,8 +33,6 @@ export interface ModalProps extends DOMAttributes, TestingAttributes {
|
|
|
33
33
|
* `() => void`
|
|
34
34
|
*/
|
|
35
35
|
onClose?: () => void;
|
|
36
|
-
onSubmit?: () => void;
|
|
37
|
-
onCancel?: () => void;
|
|
38
36
|
/**
|
|
39
37
|
* When a user interacts with the argument element outside of the overlay ref, return true if
|
|
40
38
|
* onClose should be called. This gives you a chance to filter out interaction with elements that
|
|
@@ -61,20 +59,3 @@ export interface ModalProps extends DOMAttributes, TestingAttributes {
|
|
|
61
59
|
containerProps?: object;
|
|
62
60
|
headerContainerProps?: object;
|
|
63
61
|
}
|
|
64
|
-
export type ModalHeaderProps = {
|
|
65
|
-
titleProps?: object;
|
|
66
|
-
containerProps?: object;
|
|
67
|
-
closeButton?: ReactNode;
|
|
68
|
-
hasCloseButton?: boolean;
|
|
69
|
-
onClose?: () => void;
|
|
70
|
-
title?: ReactNode;
|
|
71
|
-
hasNoSeparator?: boolean;
|
|
72
|
-
};
|
|
73
|
-
export type ModalFooterProps = {
|
|
74
|
-
onSubmit?: () => void;
|
|
75
|
-
onCancel?: () => void;
|
|
76
|
-
children?: ReactNode;
|
|
77
|
-
footerProps?: object;
|
|
78
|
-
primaryButtonText?: string;
|
|
79
|
-
secondaryButtonText?: string;
|
|
80
|
-
};
|
|
@@ -17,7 +17,7 @@ import { copyButton } from '../CopyText/CopyText.styles';
|
|
|
17
17
|
import { containedIcon } from '../DatePicker/DatePicker.styles';
|
|
18
18
|
import { hintButton } from '../HelpHint/HelpHint.styles';
|
|
19
19
|
import { messageCloseButton } from '../Messages/Message.styles';
|
|
20
|
-
import {
|
|
20
|
+
import { modalCloseButton } from '../Modal/Modal.styles';
|
|
21
21
|
import { button } from '../TooltipTrigger/Tooltip.styles';
|
|
22
22
|
export var base = {
|
|
23
23
|
justifyContent: 'center',
|
|
@@ -43,7 +43,7 @@ export var base = {
|
|
|
43
43
|
boxShadow: 'standard'
|
|
44
44
|
},
|
|
45
45
|
'&.is-pressed': {
|
|
46
|
-
path: {
|
|
46
|
+
'path': {
|
|
47
47
|
fill: 'white'
|
|
48
48
|
},
|
|
49
49
|
bg: 'active',
|
|
@@ -71,7 +71,7 @@ var bidirectional = {
|
|
|
71
71
|
var inverted = _objectSpread(_objectSpread({}, base), {}, {
|
|
72
72
|
bg: 'active',
|
|
73
73
|
borderColor: 'active',
|
|
74
|
-
path: {
|
|
74
|
+
'path': {
|
|
75
75
|
fill: 'white'
|
|
76
76
|
},
|
|
77
77
|
'&.is-hovered': {
|
|
@@ -108,29 +108,29 @@ var applicationPortal = _objectSpread(_objectSpread({}, base), {}, {
|
|
|
108
108
|
background: 'transparent',
|
|
109
109
|
'&.is-focused': _objectSpread({}, defaultFocus),
|
|
110
110
|
'&.is-hovered': {
|
|
111
|
-
path: {
|
|
111
|
+
'path': {
|
|
112
112
|
fill: 'active'
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
'&.is-pressed': {
|
|
116
|
-
path: {
|
|
116
|
+
'path': {
|
|
117
117
|
fill: 'active'
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
var applicationPortalPinned = _objectSpread(_objectSpread({}, base), {}, {
|
|
122
|
-
path: {
|
|
122
|
+
'path': {
|
|
123
123
|
fill: 'success.bright'
|
|
124
124
|
},
|
|
125
125
|
background: 'transparent',
|
|
126
126
|
'&.is-focused': _objectSpread({}, defaultFocus),
|
|
127
127
|
'&.is-hovered': {
|
|
128
|
-
path: {
|
|
128
|
+
'path': {
|
|
129
129
|
fill: 'active'
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
'&.is-pressed': {
|
|
133
|
-
path: {
|
|
133
|
+
'path': {
|
|
134
134
|
fill: 'active'
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -187,7 +187,6 @@ export default {
|
|
|
187
187
|
inverted: inverted,
|
|
188
188
|
messageCloseButton: _objectSpread(_objectSpread({}, base), messageCloseButton),
|
|
189
189
|
modalCloseButton: _objectSpread(_objectSpread({}, base), modalCloseButton),
|
|
190
|
-
modalHeaderCloseButton: _objectSpread(_objectSpread({}, base), closeButton),
|
|
191
190
|
invertedBadgeDeleteButton: invertedBadgeDeleteButton,
|
|
192
191
|
invertedSquare: invertedSquare,
|
|
193
192
|
square: square,
|
|
@@ -7,11 +7,9 @@ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-st
|
|
|
7
7
|
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
|
8
8
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
9
9
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
10
|
-
import _toArray from "@babel/runtime-corejs3/helpers/esm/toArray";
|
|
11
10
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
12
11
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
13
12
|
var _excluded = ["className", "closeButton", "hasAutoFocus", "hasCloseButton", "id", "isClosedOnBlur", "isDismissable", "isKeyboardDismissDisabled", "isOpen", "role", "size", "state", "title", "onClose", "shouldCloseOnInteractOutside", "children", "contentProps", "containerProps", "headerContainerProps"];
|
|
14
|
-
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
15
13
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
15
|
import React, { forwardRef } from 'react';
|
|
@@ -23,7 +21,6 @@ import Box from '../Box';
|
|
|
23
21
|
import Icon from '../Icon';
|
|
24
22
|
import IconButton from '../IconButton';
|
|
25
23
|
import Text from '../Text';
|
|
26
|
-
import ModalHeader from './ModalHeader';
|
|
27
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
28
25
|
var Modal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
29
26
|
var _useStatusClasses2;
|
|
@@ -87,12 +84,7 @@ var Modal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
87
84
|
var isOpenNoTransition = (state === null || state === void 0 ? void 0 : state.isTransitioning) === undefined && isOpen === true;
|
|
88
85
|
var _useStatusClasses = useStatusClasses(className, (_useStatusClasses2 = {}, _defineProperty(_useStatusClasses2, "is-".concat(size || 'custom'), size), _defineProperty(_useStatusClasses2, "isOpen", isOpen), _defineProperty(_useStatusClasses2, "isTransitioning", state === null || state === void 0 ? void 0 : state.isTransitioning), _defineProperty(_useStatusClasses2, "isOpenNoTransition", isOpenNoTransition), _useStatusClasses2)),
|
|
89
86
|
classNames = _useStatusClasses.classNames;
|
|
90
|
-
var
|
|
91
|
-
_React$Children$toArr2 = _toArray(_React$Children$toArr),
|
|
92
|
-
header = _React$Children$toArr2[0],
|
|
93
|
-
siblings = _sliceInstanceProperty(_React$Children$toArr2).call(_React$Children$toArr2, 1);
|
|
94
|
-
var hasHeaderContent = /*#__PURE__*/React.isValidElement(header) && header.type === ModalHeader;
|
|
95
|
-
var titleContent = !hasHeaderContent && title && (isOnyx ? ___EmotionJSX(Box, {
|
|
87
|
+
var titleContent = title && (isOnyx ? ___EmotionJSX(Box, {
|
|
96
88
|
variant: "modal.header"
|
|
97
89
|
}, ___EmotionJSX(Text, _extends({}, titleProps, {
|
|
98
90
|
variant: "modalTitle",
|
|
@@ -115,7 +107,7 @@ var Modal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
115
107
|
}, propsContentProps, dialogProps, modalProps, {
|
|
116
108
|
ref: modalRef,
|
|
117
109
|
"aria-modal": true
|
|
118
|
-
}),
|
|
110
|
+
}), ___EmotionJSX(Box, _extends({
|
|
119
111
|
variant: "modal.headingContainer"
|
|
120
112
|
}, headerContainerProps), hasCloseButton && (closeButton !== null && closeButton !== void 0 ? closeButton : ___EmotionJSX(IconButton, {
|
|
121
113
|
"aria-label": "Close modal window",
|
|
@@ -127,9 +119,8 @@ var Modal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
127
119
|
title: {
|
|
128
120
|
name: 'Close Icon'
|
|
129
121
|
}
|
|
130
|
-
}))), titleContent),
|
|
131
|
-
pt: "md"
|
|
132
|
-
px: "lg"
|
|
122
|
+
}))), titleContent), ___EmotionJSX(Box, {
|
|
123
|
+
pt: "md"
|
|
133
124
|
}, children)))));
|
|
134
125
|
});
|
|
135
126
|
Modal.defaultProps = {
|