@elliemae/ds-dialog 2.3.0-alpha.6 → 2.3.0-next.0
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/cjs/DSDialog.js +124 -0
- package/cjs/DSDialogDatatestid.js +10 -0
- package/cjs/defaultProps.js +19 -0
- package/cjs/index.js +70 -0
- package/cjs/propTypes.js +32 -0
- package/cjs/sharedTypes.js +7 -0
- package/cjs/styles.js +145 -0
- package/cjs/utils.js +35 -0
- package/esm/DSDialog.js +112 -0
- package/esm/DSDialogDatatestid.js +6 -0
- package/esm/defaultProps.js +15 -0
- package/{dist/esm → esm}/index.js +19 -48
- package/esm/propTypes.js +24 -0
- package/esm/sharedTypes.js +5 -0
- package/esm/styles.js +125 -0
- package/esm/utils.js +28 -0
- package/package.json +35 -41
- package/types/DSDialog.d.ts +376 -0
- package/types/DSDialogDatatestid.d.ts +4 -0
- package/types/defaultProps.d.ts +2 -0
- package/types/index.d.ts +52 -0
- package/types/propTypes.d.ts +387 -0
- package/types/sharedTypes.d.ts +6 -0
- package/types/styles.d.ts +27 -0
- package/types/utils.d.ts +20 -0
- package/dist/cjs/DSDialog.js +0 -99
- package/dist/cjs/DSDialog.js.map +0 -7
- package/dist/cjs/DSDialogDatatestid.js +0 -38
- package/dist/cjs/DSDialogDatatestid.js.map +0 -7
- package/dist/cjs/DSDialogInternalTypes.js +0 -27
- package/dist/cjs/DSDialogInternalTypes.js.map +0 -7
- package/dist/cjs/DSDialogTypes.js +0 -27
- package/dist/cjs/DSDialogTypes.js.map +0 -7
- package/dist/cjs/defaultProps.js +0 -45
- package/dist/cjs/defaultProps.js.map +0 -7
- package/dist/cjs/index.js +0 -94
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/propTypes.js +0 -46
- package/dist/cjs/propTypes.js.map +0 -7
- package/dist/cjs/styles.js +0 -151
- package/dist/cjs/styles.js.map +0 -7
- package/dist/cjs/utils.js +0 -55
- package/dist/cjs/utils.js.map +0 -7
- package/dist/esm/DSDialog.js +0 -75
- package/dist/esm/DSDialog.js.map +0 -7
- package/dist/esm/DSDialogDatatestid.js +0 -9
- package/dist/esm/DSDialogDatatestid.js.map +0 -7
- package/dist/esm/DSDialogInternalTypes.js +0 -2
- package/dist/esm/DSDialogInternalTypes.js.map +0 -7
- package/dist/esm/DSDialogTypes.js +0 -2
- package/dist/esm/DSDialogTypes.js.map +0 -7
- package/dist/esm/defaultProps.js +0 -16
- package/dist/esm/defaultProps.js.map +0 -7
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/propTypes.js +0 -17
- package/dist/esm/propTypes.js.map +0 -7
- package/dist/esm/styles.js +0 -122
- package/dist/esm/styles.js.map +0 -7
- package/dist/esm/utils.js +0 -26
- package/dist/esm/utils.js.map +0 -7
package/dist/esm/defaultProps.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { DSDialogSizes } from "./utils";
|
|
3
|
-
const noop = () => {
|
|
4
|
-
};
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
isOpen: false,
|
|
7
|
-
centered: false,
|
|
8
|
-
size: DSDialogSizes.DEFAULT,
|
|
9
|
-
removeAutoFocus: false,
|
|
10
|
-
onClickOutside: noop,
|
|
11
|
-
zIndex: 10
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
defaultProps
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=defaultProps.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/defaultProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSDialogSizes } from './utils';\nimport type { DSDialogDefaultPropsT } from './DSDialogInternalTypes';\n\nconst noop = () => {};\n\nexport const defaultProps: DSDialogDefaultPropsT = {\n isOpen: false,\n centered: false,\n size: DSDialogSizes.DEFAULT,\n removeAutoFocus: false,\n onClickOutside: noop,\n zIndex: 10,\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAGA,MAAM,OAAO,MAAM;AAAA;AAEZ,MAAM,eAAsC;AAAA,EACjD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM,cAAc;AAAA,EACpB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,QAAQ;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/esm/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe } from 'react-desc';\nimport { globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n} from './styles';\n\nDSDialogBody.propTypes = globalAttributesPropTypes;\nDSDialogHeader.propTypes = globalAttributesPropTypes;\nDSDialogFooter.propTypes = globalAttributesPropTypes;\nDSDialogSeparator.propTypes = globalAttributesPropTypes;\nDSDialogTitle.propTypes = globalAttributesPropTypes;\nDSDialogAddon.propTypes = globalAttributesPropTypes;\nDSDialogDefaultLayout.propTypes = globalAttributesPropTypes;\nDSDialogPrimaryMessage.propTypes = globalAttributesPropTypes;\nDSDialogSecondaryMessage.propTypes = globalAttributesPropTypes;\nDSDialogBody.displayName = 'DSDialogBody';\nDSDialogHeader.displayName = 'DSDialogHeader';\nDSDialogFooter.displayName = 'DSDialogFooter';\nDSDialogSeparator.displayName = 'DSDialogSeparator';\nDSDialogTitle.displayName = 'DSDialogTitle';\nDSDialogAddon.displayName = 'DSDialogAddon';\nDSDialogDefaultLayout.displayName = 'DSDialogDefaultLayout';\nDSDialogPrimaryMessage.displayName = 'DSDialogPrimaryMessage';\nDSDialogSecondaryMessage.displayName = 'DSDialogSecondaryMessage';\n\nconst DSDialogBodyWithSchema = describe(DSDialogBody);\nconst DSDialogHeaderWithSchema = describe(DSDialogHeader);\nconst DSDialogFooterWithSchema = describe(DSDialogFooter);\nconst DSDialogSeparatorWithSchema = describe(DSDialogSeparator);\nconst DSDialogTitleWithSchema = describe(DSDialogTitle);\nconst DSDialogAddonWithSchema = describe(DSDialogAddon);\nconst DSDialogDefaultLayoutWithSchema = describe(DSDialogDefaultLayout);\nconst DSDialogPrimaryMessageWithSchema = describe(DSDialogPrimaryMessage);\nconst DSDialogSecondaryMessageWithSchema = describe(DSDialogSecondaryMessage);\n\nDSDialogBodyWithSchema.propTypes = globalAttributesPropTypes;\nDSDialogHeaderWithSchema.propTypes = globalAttributesPropTypes;\nDSDialogFooterWithSchema.propTypes = globalAttributesPropTypes;\nDSDialogSeparatorWithSchema.propTypes = globalAttributesPropTypes;\nDSDialogTitleWithSchema.propTypes = globalAttributesPropTypes;\nDSDialogAddonWithSchema.propTypes = globalAttributesPropTypes;\nDSDialogDefaultLayoutWithSchema.propTypes = globalAttributesPropTypes;\nDSDialogPrimaryMessageWithSchema.propTypes = globalAttributesPropTypes;\nDSDialogSecondaryMessageWithSchema.propTypes = globalAttributesPropTypes;\n\nexport * from './DSDialog';\nexport * from './DSDialogDatatestid';\nexport { DSDialogSizes } from './utils';\nexport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n DSDialogBodyWithSchema,\n DSDialogHeaderWithSchema,\n DSDialogFooterWithSchema,\n DSDialogSeparatorWithSchema,\n DSDialogTitleWithSchema,\n DSDialogAddonWithSchema,\n DSDialogDefaultLayoutWithSchema,\n DSDialogPrimaryMessageWithSchema,\n DSDialogSecondaryMessageWithSchema,\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,aAAa,YAAY;AACzB,eAAe,YAAY;AAC3B,eAAe,YAAY;AAC3B,kBAAkB,YAAY;AAC9B,cAAc,YAAY;AAC1B,cAAc,YAAY;AAC1B,sBAAsB,YAAY;AAClC,uBAAuB,YAAY;AACnC,yBAAyB,YAAY;AACrC,aAAa,cAAc;AAC3B,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,kBAAkB,cAAc;AAChC,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,sBAAsB,cAAc;AACpC,uBAAuB,cAAc;AACrC,yBAAyB,cAAc;AAEvC,MAAM,yBAAyB,SAAS;AACxC,MAAM,2BAA2B,SAAS;AAC1C,MAAM,2BAA2B,SAAS;AAC1C,MAAM,8BAA8B,SAAS;AAC7C,MAAM,0BAA0B,SAAS;AACzC,MAAM,0BAA0B,SAAS;AACzC,MAAM,kCAAkC,SAAS;AACjD,MAAM,mCAAmC,SAAS;AAClD,MAAM,qCAAqC,SAAS;AAEpD,uBAAuB,YAAY;AACnC,yBAAyB,YAAY;AACrC,yBAAyB,YAAY;AACrC,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;AACpC,wBAAwB,YAAY;AACpC,gCAAgC,YAAY;AAC5C,iCAAiC,YAAY;AAC7C,mCAAmC,YAAY;AAE/C;AACA;AACA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/esm/propTypes.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { globalAttributesPropTypes, PropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
-
import { DSDialogSizes, DSDialogSizesArrayValues } from "./utils";
|
|
4
|
-
const propTypes = {
|
|
5
|
-
isOpen: PropTypes.bool.description("Whether the Dialog is open or not.").defaultValue(false),
|
|
6
|
-
children: PropTypes.node.description("Nested components.").isRequired,
|
|
7
|
-
centered: PropTypes.bool.description("Centers the Dialog.").defaultValue(false),
|
|
8
|
-
removeAutoFocus: PropTypes.bool.description("Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.").defaultValue(false),
|
|
9
|
-
onClickOutside: PropTypes.func.description("Callback that should be used to close the modal when the user clicks outside. Cb also triggers when the user press ESC key for accessibility purposes.").defaultValue(() => {
|
|
10
|
-
}),
|
|
11
|
-
...globalAttributesPropTypes,
|
|
12
|
-
size: PropTypes.oneOf(DSDialogSizesArrayValues).description(`Dialog's width size.`).defaultValue(DSDialogSizes.DEFAULT)
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
propTypes
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=propTypes.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/propTypes.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-len */\nimport { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport { WeakValidationMap } from 'react';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils';\n\nexport const propTypes = {\n isOpen: PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),\n children: PropTypes.node.description('Nested components.').isRequired,\n centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),\n removeAutoFocus: PropTypes.bool\n .description(\n 'Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.',\n )\n .defaultValue(false),\n onClickOutside: PropTypes.func\n .description(\n 'Callback that should be used to close the modal when the user clicks outside. Cb also triggers when the user press ESC key for accessibility purposes.',\n )\n .defaultValue(() => {}),\n ...globalAttributesPropTypes,\n size: PropTypes.oneOf(DSDialogSizesArrayValues)\n .description(`Dialog's width size.`)\n .defaultValue(DSDialogSizes.DEFAULT),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AAEA;AAEO,MAAM,YAAY;AAAA,EACvB,QAAQ,UAAU,KAAK,YAAY,sCAAsC,aAAa;AAAA,EACtF,UAAU,UAAU,KAAK,YAAY,sBAAsB;AAAA,EAC3D,UAAU,UAAU,KAAK,YAAY,uBAAuB,aAAa;AAAA,EACzE,iBAAiB,UAAU,KACxB,YACC,yIAED,aAAa;AAAA,EAChB,gBAAgB,UAAU,KACvB,YACC,0JAED,aAAa,MAAM;AAAA;AAAA,KACnB;AAAA,EACH,MAAM,UAAU,MAAM,0BACnB,YAAY,wBACZ,aAAa,cAAc;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/esm/styles.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { createGlobalStyle } from "@elliemae/ds-system";
|
|
4
|
-
import { space, flexboxes, layout, sizing } from "@xstyled/styled-components";
|
|
5
|
-
import { allSizes } from "./utils";
|
|
6
|
-
const FixedBody = createGlobalStyle`
|
|
7
|
-
body {
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
|
|
10
|
-
${({ bodyInfo }) => bodyInfo.overflow ? `padding-right: calc( ${bodyInfo.padding} + 15px ) !important;` : ``}
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
const StyledDialogBackground = styled.div`
|
|
14
|
-
position: fixed;
|
|
15
|
-
top: 0;
|
|
16
|
-
bottom: 0;
|
|
17
|
-
width: 100%;
|
|
18
|
-
height: 100%;
|
|
19
|
-
background: rgba(37, 41, 47, 50%);
|
|
20
|
-
overflow-y: auto;
|
|
21
|
-
z-index: ${({ zIndex }) => zIndex};
|
|
22
|
-
`;
|
|
23
|
-
const StyledDialogContainer = styled.div`
|
|
24
|
-
height: fit-content;
|
|
25
|
-
position: absolute;
|
|
26
|
-
top: 0;
|
|
27
|
-
bottom: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
right: 0;
|
|
30
|
-
margin: ${({ centered }) => centered ? "auto" : "20vh auto auto auto"};
|
|
31
|
-
width: ${({ size }) => allSizes[size]};
|
|
32
|
-
min-width: 300px;
|
|
33
|
-
box-shadow: 0 10px 20px 0 ${({ theme }) => theme.colors.neutral[500]};
|
|
34
|
-
background: ${({ theme }) => theme.colors.neutral["000"]};
|
|
35
|
-
overflow-y: auto;
|
|
36
|
-
${space}
|
|
37
|
-
&:focus {
|
|
38
|
-
outline: none;
|
|
39
|
-
}
|
|
40
|
-
`;
|
|
41
|
-
const DSDialogTitle = styled.h3`
|
|
42
|
-
font-size: ${({ theme }) => theme.fontSizes.title[700]};
|
|
43
|
-
display: -webkit-box;
|
|
44
|
-
-webkit-line-clamp: 2;
|
|
45
|
-
-webkit-box-orient: vertical;
|
|
46
|
-
overflow: hidden;
|
|
47
|
-
margin: 0;
|
|
48
|
-
`;
|
|
49
|
-
const DSDialogAddon = styled.div``;
|
|
50
|
-
const DSDialogHeader = styled.div`
|
|
51
|
-
display: grid;
|
|
52
|
-
align-items: center;
|
|
53
|
-
grid-auto-flow: column;
|
|
54
|
-
min-height: ${({ theme }) => theme.space.m};
|
|
55
|
-
padding: 10px ${({ theme }) => theme.space.xs};
|
|
56
|
-
& ${DSDialogTitle} + ${DSDialogAddon} {
|
|
57
|
-
align-self: flex-start;
|
|
58
|
-
justify-self: flex-end;
|
|
59
|
-
}
|
|
60
|
-
& ${DSDialogAddon}:only-child {
|
|
61
|
-
justify-self: flex-end;
|
|
62
|
-
}
|
|
63
|
-
${space}
|
|
64
|
-
`;
|
|
65
|
-
const DSDialogSeparator = styled.hr.attrs(() => ({ "aria-hidden": true }))`
|
|
66
|
-
margin: 0;
|
|
67
|
-
border-top: 1px solid ${({ theme }) => theme.colors.neutral["080"]};
|
|
68
|
-
`;
|
|
69
|
-
const DSDialogBody = styled.div`
|
|
70
|
-
padding: ${({ theme }) => theme.space.xs};
|
|
71
|
-
overflow-y: auto;
|
|
72
|
-
|
|
73
|
-
${layout}
|
|
74
|
-
${space}
|
|
75
|
-
${flexboxes}
|
|
76
|
-
${sizing}
|
|
77
|
-
`;
|
|
78
|
-
const DSDialogPrimaryMessage = styled.h3`
|
|
79
|
-
margin: 0;
|
|
80
|
-
`;
|
|
81
|
-
const DSDialogSecondaryMessage = styled.p`
|
|
82
|
-
margin: 0;
|
|
83
|
-
color: ${({ theme }) => theme.colors.neutral[500]};
|
|
84
|
-
`;
|
|
85
|
-
const DSDialogDefaultLayout = styled.div`
|
|
86
|
-
display: grid;
|
|
87
|
-
grid-auto-flow: row;
|
|
88
|
-
justify-items: center;
|
|
89
|
-
align-items: center;
|
|
90
|
-
grid-gap: ${({ theme }) => theme.space.xxs};
|
|
91
|
-
|
|
92
|
-
${DSDialogSecondaryMessage} {
|
|
93
|
-
text-align: center;
|
|
94
|
-
}
|
|
95
|
-
`;
|
|
96
|
-
const DSDialogFooter = styled.div`
|
|
97
|
-
display: grid;
|
|
98
|
-
grid-auto-flow: column;
|
|
99
|
-
align-items: center;
|
|
100
|
-
justify-content: flex-end;
|
|
101
|
-
grid-gap: ${({ theme }) => theme.space.xxs};
|
|
102
|
-
min-height: ${({ theme }) => theme.space.m};
|
|
103
|
-
padding: 0 ${({ theme }) => theme.space.xs};
|
|
104
|
-
${space}
|
|
105
|
-
${flexboxes}
|
|
106
|
-
${sizing}
|
|
107
|
-
`;
|
|
108
|
-
export {
|
|
109
|
-
DSDialogAddon,
|
|
110
|
-
DSDialogBody,
|
|
111
|
-
DSDialogDefaultLayout,
|
|
112
|
-
DSDialogFooter,
|
|
113
|
-
DSDialogHeader,
|
|
114
|
-
DSDialogPrimaryMessage,
|
|
115
|
-
DSDialogSecondaryMessage,
|
|
116
|
-
DSDialogSeparator,
|
|
117
|
-
DSDialogTitle,
|
|
118
|
-
FixedBody,
|
|
119
|
-
StyledDialogBackground,
|
|
120
|
-
StyledDialogContainer
|
|
121
|
-
};
|
|
122
|
-
//# sourceMappingURL=styles.js.map
|
package/dist/esm/styles.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport styled from 'styled-components';\nimport { createGlobalStyle } from '@elliemae/ds-system';\nimport { space, flexboxes, layout, sizing } from '@xstyled/styled-components';\nimport { allSizes } from './utils';\nimport type { StyledDialogContainerT, StyledDialogBackgroundT, FixedBodyT } from './DSDialogInternalTypes';\n\nexport const FixedBody = createGlobalStyle<FixedBodyT>`\n body {\n overflow: hidden;\n \n ${({ bodyInfo }) => (bodyInfo.overflow ? `padding-right: calc( ${bodyInfo.padding} + 15px ) !important;` : ``)}\n }\n`;\n\nexport const StyledDialogBackground = styled.div<StyledDialogBackgroundT>`\n position: fixed;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgba(37, 41, 47, 50%);\n overflow-y: auto;\n z-index: ${({ zIndex }) => zIndex};\n`;\n\nexport const StyledDialogContainer = styled.div<StyledDialogContainerPropsT>`\n height: fit-content;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: ${({ centered }) => (centered ? 'auto' : '20vh auto auto auto')};\n width: ${({ size }) => allSizes[size]};\n min-width: 300px;\n box-shadow: 0 10px 20px 0 ${({ theme }) => theme.colors.neutral[500]};\n background: ${({ theme }) => theme.colors.neutral['000']};\n overflow-y: auto;\n ${space}\n &:focus {\n outline: none;\n }\n`;\n\nexport const DSDialogTitle = styled.h3`\n font-size: ${({ theme }) => theme.fontSizes.title[700]};\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n margin: 0;\n`;\n\nexport const DSDialogAddon = styled.div``;\n\nexport const DSDialogHeader = styled.div`\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n min-height: ${({ theme }) => theme.space.m};\n padding: 10px ${({ theme }) => theme.space.xs};\n & ${DSDialogTitle} + ${DSDialogAddon} {\n align-self: flex-start;\n justify-self: flex-end;\n }\n & ${DSDialogAddon}:only-child {\n justify-self: flex-end;\n }\n ${space}\n`;\n\nexport const DSDialogSeparator = styled.hr.attrs(() => ({ 'aria-hidden': true }))`\n margin: 0;\n border-top: 1px solid ${({ theme }) => theme.colors.neutral['080']};\n`;\n\nexport const DSDialogBody = styled.div`\n padding: ${({ theme }) => theme.space.xs};\n overflow-y: auto;\n\n ${layout}\n ${space}\n ${flexboxes}\n ${sizing}\n`;\n\nexport const DSDialogPrimaryMessage = styled.h3`\n margin: 0;\n`;\n\nexport const DSDialogSecondaryMessage = styled.p`\n margin: 0;\n color: ${({ theme }) => theme.colors.neutral[500]};\n`;\n\nexport const DSDialogDefaultLayout = styled.div`\n display: grid;\n grid-auto-flow: row;\n justify-items: center;\n align-items: center;\n grid-gap: ${({ theme }) => theme.space.xxs};\n\n ${DSDialogSecondaryMessage} {\n text-align: center;\n }\n`;\n\nexport const DSDialogFooter = styled.div`\n display: grid;\n grid-auto-flow: column;\n align-items: center;\n justify-content: flex-end;\n grid-gap: ${({ theme }) => theme.space.xxs};\n min-height: ${({ theme }) => theme.space.m};\n padding: 0 ${({ theme }) => theme.space.xs};\n ${space}\n ${flexboxes}\n ${sizing}\n`;\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AAGO,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA,MAInB,CAAC,EAAE,eAAgB,SAAS,WAAW,wBAAwB,SAAS,iCAAiC;AAAA;AAAA;AAIxG,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAQhC,CAAC,EAAE,aAAa;AAAA;AAGtB,MAAM,wBAAwB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOhC,CAAC,EAAE,eAAgB,WAAW,SAAS;AAAA,WACxC,CAAC,EAAE,WAAW,SAAS;AAAA;AAAA,8BAEJ,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA,gBAClD,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA,IAEhD;AAAA;AAAA;AAAA;AAAA;AAMG,MAAM,gBAAgB,OAAO;AAAA,eACrB,CAAC,EAAE,YAAY,MAAM,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ7C,MAAM,gBAAgB,OAAO;AAE7B,MAAM,iBAAiB,OAAO;AAAA;AAAA;AAAA;AAAA,gBAIrB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,kBACzB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,MACvC,mBAAmB;AAAA;AAAA;AAAA;AAAA,MAInB;AAAA;AAAA;AAAA,IAGF;AAAA;AAGG,MAAM,oBAAoB,OAAO,GAAG,MAAM,MAAO,GAAE,eAAe;AAAA;AAAA,0BAE/C,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAGvD,MAAM,eAAe,OAAO;AAAA,aACtB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAAA,IAGpC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAItC,MAAM,2BAA2B,OAAO;AAAA;AAAA,WAEpC,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAGxC,MAAM,wBAAwB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,cAK9B,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA,IAErC;AAAA;AAAA;AAAA;AAKG,MAAM,iBAAiB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,cAKvB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,gBACzB,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,eAC5B,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/esm/utils.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const getSpaceProps = (props) => Object.fromEntries(Object.entries(props).filter(([key]) => /^[pm][xytblr]?$/.exec(key)));
|
|
3
|
-
const DSDialogSizes = {
|
|
4
|
-
DEFAULT: "default",
|
|
5
|
-
SMALL: "small",
|
|
6
|
-
MEDIUM: "medium",
|
|
7
|
-
LARGE: "large",
|
|
8
|
-
XLARGE: "x-large",
|
|
9
|
-
XXLARGE: "xx-large"
|
|
10
|
-
};
|
|
11
|
-
const DSDialogSizesArrayValues = Object.values(DSDialogSizes);
|
|
12
|
-
const allSizes = {
|
|
13
|
-
default: "576px",
|
|
14
|
-
small: "320px",
|
|
15
|
-
medium: "656px",
|
|
16
|
-
large: "848px",
|
|
17
|
-
"x-large": "1042px",
|
|
18
|
-
"xx-large": "1440px"
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
DSDialogSizes,
|
|
22
|
-
DSDialogSizesArrayValues,
|
|
23
|
-
allSizes,
|
|
24
|
-
getSpaceProps
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/esm/utils.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/utils.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GetSpaceArgsT } from './DSDialogInternalTypes';\n\nexport const getSpaceProps = (props: GetSpaceArgsT): GetSpaceArgsT =>\n Object.fromEntries(Object.entries(props).filter(([key]) => /^[pm][xytblr]?$/.exec(key)));\n\nexport const DSDialogSizes = {\n DEFAULT: 'default' as const,\n SMALL: 'small' as const,\n MEDIUM: 'medium' as const,\n LARGE: 'large' as const,\n XLARGE: 'x-large' as const,\n XXLARGE: 'xx-large' as const,\n};\n\nexport const DSDialogSizesArrayValues = Object.values(DSDialogSizes);\n\nexport const allSizes = {\n default: '576px',\n small: '320px',\n medium: '656px',\n large: '848px',\n 'x-large': '1042px',\n 'xx-large': '1440px',\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACEO,MAAM,gBAAgB,CAAC,UAC5B,OAAO,YAAY,OAAO,QAAQ,OAAO,OAAO,CAAC,CAAC,SAAS,kBAAkB,KAAK;AAE7E,MAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA;AAGJ,MAAM,2BAA2B,OAAO,OAAO;AAE/C,MAAM,WAAW;AAAA,EACtB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|