@coveord/plasma-mantine 51.1.28 → 51.2.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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +27 -27
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/header/__tests__/__snapshots__/Header.spec.tsx.snap +7 -7
- package/dist/cjs/components/prompt/Prompt.js +15 -11
- package/dist/cjs/components/prompt/Prompt.js.map +1 -1
- package/dist/cjs/components/table/Table.styles.js +1 -0
- package/dist/cjs/components/table/Table.styles.js.map +1 -1
- package/dist/cjs/theme/Theme.js +29 -8
- package/dist/cjs/theme/Theme.js.map +1 -1
- package/dist/definitions/components/prompt/Prompt.d.ts.map +1 -1
- package/dist/definitions/components/table/Table.styles.d.ts.map +1 -1
- package/dist/definitions/theme/Theme.d.ts.map +1 -1
- package/dist/esm/components/header/__tests__/__snapshots__/Header.spec.tsx.snap +7 -7
- package/dist/esm/components/prompt/Prompt.js +15 -11
- package/dist/esm/components/prompt/Prompt.js.map +1 -1
- package/dist/esm/components/table/Table.styles.js +1 -0
- package/dist/esm/components/table/Table.styles.js.map +1 -1
- package/dist/esm/theme/Theme.js +29 -8
- package/dist/esm/theme/Theme.js.map +1 -1
- package/package.json +3 -3
- package/src/components/header/__tests__/Header.spec.tsx +1 -1
- package/src/components/header/__tests__/__snapshots__/Header.spec.tsx.snap +7 -7
- package/src/components/prompt/Prompt.tsx +30 -28
- package/src/components/table/Table.styles.ts +1 -0
- package/src/theme/Theme.tsx +19 -3
|
@@ -12,27 +12,27 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
|
|
|
12
12
|
class="mantine-Breadcrumbs-root mantine-1ujbd2v"
|
|
13
13
|
>
|
|
14
14
|
<a
|
|
15
|
-
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-
|
|
15
|
+
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1yycs9g"
|
|
16
16
|
>
|
|
17
17
|
One
|
|
18
18
|
</a>
|
|
19
19
|
<div
|
|
20
|
-
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-
|
|
20
|
+
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-c5usyo"
|
|
21
21
|
>
|
|
22
22
|
/
|
|
23
23
|
</div>
|
|
24
24
|
<a
|
|
25
|
-
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-
|
|
25
|
+
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1yycs9g"
|
|
26
26
|
>
|
|
27
27
|
Two
|
|
28
28
|
</a>
|
|
29
29
|
<div
|
|
30
|
-
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-
|
|
30
|
+
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-c5usyo"
|
|
31
31
|
>
|
|
32
32
|
/
|
|
33
33
|
</div>
|
|
34
34
|
<a
|
|
35
|
-
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-
|
|
35
|
+
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1yycs9g"
|
|
36
36
|
>
|
|
37
37
|
Three
|
|
38
38
|
</a>
|
|
@@ -41,13 +41,13 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
|
|
|
41
41
|
class="mantine-xg7kom"
|
|
42
42
|
>
|
|
43
43
|
<h1
|
|
44
|
-
class="mantine-Text-root mantine-Title-root mantine-
|
|
44
|
+
class="mantine-Text-root mantine-Title-root mantine-d1yoif"
|
|
45
45
|
>
|
|
46
46
|
Title
|
|
47
47
|
</h1>
|
|
48
48
|
</div>
|
|
49
49
|
<div
|
|
50
|
-
class="mantine-Text-root mantine-
|
|
50
|
+
class="mantine-Text-root mantine-1w25z6f"
|
|
51
51
|
/>
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
@@ -12,11 +12,11 @@ var _objectSpread = require("@swc/helpers/lib/_object_spread.js").default;
|
|
|
12
12
|
var _objectSpreadProps = require("@swc/helpers/lib/_object_spread_props.js").default;
|
|
13
13
|
var _objectWithoutProperties = require("@swc/helpers/lib/_object_without_properties.js").default;
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
var _plasmaTokens = require("@coveord/plasma-tokens");
|
|
15
16
|
var _core = require("@mantine/core");
|
|
16
17
|
var _react = require("react");
|
|
17
18
|
var _promptFooter = require("./PromptFooter");
|
|
18
19
|
var useStyles = (0, _core.createStyles)(function(theme) {
|
|
19
|
-
var white = "#fff";
|
|
20
20
|
return {
|
|
21
21
|
body: {
|
|
22
22
|
padding: 0
|
|
@@ -26,37 +26,40 @@ var useStyles = (0, _core.createStyles)(function(theme) {
|
|
|
26
26
|
width: 550
|
|
27
27
|
},
|
|
28
28
|
innerBody: {
|
|
29
|
-
padding: "".concat(theme.spacing.md, "
|
|
29
|
+
padding: "".concat(theme.spacing.md, " ").concat(theme.spacing.xl, " ").concat(theme.spacing.lg)
|
|
30
30
|
},
|
|
31
31
|
header: {
|
|
32
|
-
padding: "".concat(theme.spacing.md, "
|
|
32
|
+
padding: "".concat(theme.spacing.md, " ").concat(theme.spacing.xl),
|
|
33
33
|
width: "100%",
|
|
34
34
|
borderBottom: "1px solid ".concat(theme.colors.gray[3]),
|
|
35
|
-
fontSize: theme.headings.sizes.
|
|
36
|
-
lineHeight: theme.headings.sizes.
|
|
35
|
+
fontSize: theme.headings.sizes.h3.fontSize,
|
|
36
|
+
lineHeight: theme.headings.sizes.h3.lineHeight
|
|
37
37
|
},
|
|
38
38
|
default: {},
|
|
39
39
|
success: {
|
|
40
40
|
backgroundColor: theme.colors.lime[6],
|
|
41
|
-
color:
|
|
41
|
+
color: _plasmaTokens.color.primary.pureWhite
|
|
42
42
|
},
|
|
43
43
|
warning: {
|
|
44
44
|
backgroundColor: theme.colors.yellow[5],
|
|
45
|
-
color:
|
|
45
|
+
color: _plasmaTokens.color.primary.pureWhite
|
|
46
46
|
},
|
|
47
47
|
critical: {
|
|
48
48
|
backgroundColor: theme.colors.red[6],
|
|
49
|
-
color:
|
|
49
|
+
color: _plasmaTokens.color.primary.pureWhite
|
|
50
50
|
},
|
|
51
51
|
info: {
|
|
52
52
|
backgroundColor: theme.colors.navy[5],
|
|
53
|
-
color:
|
|
53
|
+
color: _plasmaTokens.color.primary.pureWhite
|
|
54
54
|
},
|
|
55
55
|
whiteClose: {
|
|
56
|
-
color:
|
|
56
|
+
color: _plasmaTokens.color.primary.pureWhite,
|
|
57
57
|
"&:hover": {
|
|
58
58
|
backgroundColor: "transparent"
|
|
59
59
|
}
|
|
60
|
+
},
|
|
61
|
+
title: {
|
|
62
|
+
color: _plasmaTokens.color.primary.pureWhite
|
|
60
63
|
}
|
|
61
64
|
};
|
|
62
65
|
});
|
|
@@ -79,7 +82,8 @@ var Prompt = function(_param) {
|
|
|
79
82
|
header: cx(classes.header, classes[variant]),
|
|
80
83
|
close: !defaultVariant && classes.whiteClose,
|
|
81
84
|
body: classes.body,
|
|
82
|
-
modal: !defaultVariant && classes.modalType
|
|
85
|
+
modal: !defaultVariant && classes.modalType,
|
|
86
|
+
title: classes.title
|
|
83
87
|
};
|
|
84
88
|
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_core.Modal, _objectSpreadProps(_objectSpread({
|
|
85
89
|
padding: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {createStyles, Modal, ModalProps} from '@mantine/core';\nimport {Children, ReactElement, ReactNode} from 'react';\nimport {PromptFooter} from './PromptFooter';\n\nconst useStyles = createStyles((theme) => {\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {color} from '@coveord/plasma-tokens';\nimport {createStyles, Modal, ModalProps} from '@mantine/core';\nimport {Children, ReactElement, ReactNode} from 'react';\nimport {PromptFooter} from './PromptFooter';\n\nconst useStyles = createStyles((theme) => ({\n body: {\n padding: 0,\n },\n modalType: {overflow: 'hidden', width: 550},\n innerBody: {\n padding: `${theme.spacing.md} ${theme.spacing.xl} ${theme.spacing.lg}`,\n },\n header: {\n padding: `${theme.spacing.md} ${theme.spacing.xl}`,\n width: '100%',\n borderBottom: `1px solid ${theme.colors.gray[3]}`,\n fontSize: theme.headings.sizes.h3.fontSize,\n lineHeight: theme.headings.sizes.h3.lineHeight,\n },\n default: {},\n success: {backgroundColor: theme.colors.lime[6], color: color.primary.pureWhite},\n warning: {backgroundColor: theme.colors.yellow[5], color: color.primary.pureWhite},\n critical: {\n backgroundColor: theme.colors.red[6],\n color: color.primary.pureWhite,\n },\n info: {backgroundColor: theme.colors.navy[5], color: color.primary.pureWhite},\n whiteClose: {color: color.primary.pureWhite, '&:hover': {backgroundColor: 'transparent'}},\n title: {\n color: color.primary.pureWhite,\n },\n}));\n\nexport interface PromptProps extends ModalProps {\n variant: 'default' | 'success' | 'warning' | 'critical' | 'info';\n children: ReactNode;\n}\ninterface PromptType {\n (props: PromptProps): ReactElement;\n Footer: typeof PromptFooter;\n}\n\nexport const Prompt: PromptType = ({children, variant, size, ...otherProps}) => {\n const {classes, cx} = useStyles();\n const defaultVariant = variant === 'default';\n const convertedChildren = Children.toArray(children) as ReactElement[];\n\n const otherChildren = convertedChildren.filter((child) => child.type !== PromptFooter);\n const footer = convertedChildren.find((child) => child.type === PromptFooter);\n\n const classNames = {\n header: cx(classes.header, classes[variant]),\n close: !defaultVariant && classes.whiteClose,\n body: classes.body,\n modal: !defaultVariant && classes.modalType,\n title: classes.title,\n };\n\n return (\n <Modal padding={0} classNames={classNames} size={defaultVariant ? size : 'sm'} {...otherProps}>\n <div className={classes.innerBody}>{otherChildren}</div>\n {footer}\n </Modal>\n );\n};\n\nPrompt.Footer = PromptFooter;\n"],"names":["Prompt","useStyles","createStyles","theme","body","padding","modalType","overflow","width","innerBody","spacing","md","xl","lg","header","borderBottom","colors","gray","fontSize","headings","sizes","h3","lineHeight","default","success","backgroundColor","lime","color","primary","pureWhite","warning","yellow","critical","red","info","navy","whiteClose","title","children","variant","size","otherProps","classes","cx","defaultVariant","convertedChildren","Children","toArray","otherChildren","filter","child","type","PromptFooter","footer","find","classNames","close","modal","Modal","div","className","Footer"],"mappings":";;;;+BA2CaA;;;eAAAA;;;;;;;4BA3CO;oBAC0B;qBACE;4BACrB;AAE3B,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,MAAM;YACFC,SAAS;QACb;QACAC,WAAW;YAACC,UAAU;YAAUC,OAAO;QAAG;QAC1CC,WAAW;YACPJ,SAAS,AAAC,GAAsBF,OAApBA,MAAMO,OAAO,CAACC,EAAE,EAAC,KAAuBR,OAApBA,MAAMO,OAAO,CAACE,EAAE,EAAC,KAAoB,OAAjBT,MAAMO,OAAO,CAACG,EAAE;QACxE;QACAC,QAAQ;YACJT,SAAS,AAAC,GAAsBF,OAApBA,MAAMO,OAAO,CAACC,EAAE,EAAC,KAAoB,OAAjBR,MAAMO,OAAO,CAACE,EAAE;YAChDJ,OAAO;YACPO,cAAc,AAAC,aAAiC,OAArBZ,MAAMa,MAAM,CAACC,IAAI,CAAC,EAAE;YAC/CC,UAAUf,MAAMgB,QAAQ,CAACC,KAAK,CAACC,EAAE,CAACH,QAAQ;YAC1CI,YAAYnB,MAAMgB,QAAQ,CAACC,KAAK,CAACC,EAAE,CAACC,UAAU;QAClD;QACAC,SAAS,CAAC;QACVC,SAAS;YAACC,iBAAiBtB,MAAMa,MAAM,CAACU,IAAI,CAAC,EAAE;YAAEC,OAAOA,mBAAK,CAACC,OAAO,CAACC,SAAS;QAAA;QAC/EC,SAAS;YAACL,iBAAiBtB,MAAMa,MAAM,CAACe,MAAM,CAAC,EAAE;YAAEJ,OAAOA,mBAAK,CAACC,OAAO,CAACC,SAAS;QAAA;QACjFG,UAAU;YACNP,iBAAiBtB,MAAMa,MAAM,CAACiB,GAAG,CAAC,EAAE;YACp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27,6 +27,7 @@ var useStyles = (0, _core.createStyles)(function(theme, param) {
|
|
|
27
27
|
top: hasHeader ? 69 : 0,
|
|
28
28
|
backgroundColor: theme.colorScheme === "dark" ? theme.black : theme.white,
|
|
29
29
|
transition: "box-shadow 150ms ease",
|
|
30
|
+
zIndex: 1,
|
|
30
31
|
"&::after": {
|
|
31
32
|
content: '""',
|
|
32
33
|
position: "absolute",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/table/Table.styles.ts"],"sourcesContent":["import {createStyles} from '@mantine/core';\n\ninterface TableStylesParams {\n hasHeader: boolean;\n multiRowSelectionEnabled: boolean;\n}\n\nconst useStyles = createStyles<string, TableStylesParams>((theme, {hasHeader, multiRowSelectionEnabled}) => {\n const rowBackgroundColor =\n theme.colorScheme === 'dark'\n ? theme.fn.rgba(theme.colors[theme.primaryColor][7], 0.2)\n : theme.colors[theme.primaryColor][0];\n return {\n table: {\n width: '100%',\n '& td:first-of-type, th:first-of-type > *': {\n paddingLeft: theme.spacing.xl,\n },\n '& tbody td': {\n verticalAlign: 'top',\n },\n },\n\n header: {\n position: 'sticky',\n top: hasHeader ? 69 : 0,\n backgroundColor: theme.colorScheme === 'dark' ? theme.black : theme.white,\n transition: 'box-shadow 150ms ease',\n\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n borderBottom: `1px solid ${theme.colors.gray[2]}`,\n },\n },\n\n rowSelected: {\n backgroundColor: multiRowSelectionEnabled ? undefined : rowBackgroundColor,\n },\n\n rowCollapsibleButtonCell: {\n textAlign: 'right',\n padding: `calc(${theme.spacing.xs}/2) ${theme.spacing.sm} !important`,\n },\n\n row: {\n '&:hover': {\n backgroundColor: rowBackgroundColor,\n },\n },\n };\n});\n\nexport default useStyles;\n"],"names":["useStyles","createStyles","theme","hasHeader","multiRowSelectionEnabled","rowBackgroundColor","colorScheme","fn","rgba","colors","primaryColor","table","width","paddingLeft","spacing","xl","verticalAlign","header","position","top","backgroundColor","black","white","transition","content","left","right","bottom","borderBottom","gray","rowSelected","undefined","rowCollapsibleButtonCell","textAlign","padding","xs","sm","row"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/table/Table.styles.ts"],"sourcesContent":["import {createStyles} from '@mantine/core';\n\ninterface TableStylesParams {\n hasHeader: boolean;\n multiRowSelectionEnabled: boolean;\n}\n\nconst useStyles = createStyles<string, TableStylesParams>((theme, {hasHeader, multiRowSelectionEnabled}) => {\n const rowBackgroundColor =\n theme.colorScheme === 'dark'\n ? theme.fn.rgba(theme.colors[theme.primaryColor][7], 0.2)\n : theme.colors[theme.primaryColor][0];\n return {\n table: {\n width: '100%',\n '& td:first-of-type, th:first-of-type > *': {\n paddingLeft: theme.spacing.xl,\n },\n '& tbody td': {\n verticalAlign: 'top',\n },\n },\n\n header: {\n position: 'sticky',\n top: hasHeader ? 69 : 0,\n backgroundColor: theme.colorScheme === 'dark' ? theme.black : theme.white,\n transition: 'box-shadow 150ms ease',\n zIndex: 1,\n\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n borderBottom: `1px solid ${theme.colors.gray[2]}`,\n },\n },\n\n rowSelected: {\n backgroundColor: multiRowSelectionEnabled ? undefined : rowBackgroundColor,\n },\n\n rowCollapsibleButtonCell: {\n textAlign: 'right',\n padding: `calc(${theme.spacing.xs}/2) ${theme.spacing.sm} !important`,\n },\n\n row: {\n '&:hover': {\n backgroundColor: rowBackgroundColor,\n },\n },\n };\n});\n\nexport default useStyles;\n"],"names":["useStyles","createStyles","theme","hasHeader","multiRowSelectionEnabled","rowBackgroundColor","colorScheme","fn","rgba","colors","primaryColor","table","width","paddingLeft","spacing","xl","verticalAlign","header","position","top","backgroundColor","black","white","transition","zIndex","content","left","right","bottom","borderBottom","gray","rowSelected","undefined","rowCollapsibleButtonCell","textAlign","padding","xs","sm","row"],"mappings":";;;;+BAyDA;;;eAAA;;;oBAzD2B;AAO3B,IAAMA,YAAYC,IAAAA,kBAAY,EAA4B,SAACC,cAAiD;QAAzCC,kBAAAA,WAAWC,iCAAAA;IAC1E,IAAMC,qBACFH,MAAMI,WAAW,KAAK,SAChBJ,MAAMK,EAAE,CAACC,IAAI,CAACN,MAAMO,MAAM,CAACP,MAAMQ,YAAY,CAAC,CAAC,EAAE,EAAE,OACnDR,MAAMO,MAAM,CAACP,MAAMQ,YAAY,CAAC,CAAC,EAAE;IAC7C,OAAO;QACHC,OAAO;YACHC,OAAO;YACP,4CAA4C;gBACxCC,aAAaX,MAAMY,OAAO,CAACC,EAAE;YACjC;YACA,cAAc;gBACVC,eAAe;YACnB;QACJ;QAEAC,QAAQ;YACJC,UAAU;YACVC,KAAKhB,YAAY,KAAK,CAAC;YACvBiB,iBAAiBlB,MAAMI,WAAW,KAAK,SAASJ,MAAMmB,KAAK,GAAGnB,MAAMoB,KAAK;YACzEC,YAAY;YACZC,QAAQ;YAER,YAAY;gBACRC,SAAS;gBACTP,UAAU;gBACVQ,MAAM;gBACNC,OAAO;gBACPC,QAAQ;gBACRC,cAAc,AAAC,aAAiC,OAArB3B,MAAMO,MAAM,CAACqB,IAAI,CAAC,EAAE;YACnD;QACJ;QAEAC,aAAa;YACTX,iBAAiBhB,2BAA2B4B,YAAY3B,kBAAkB;QAC9E;QAEA4B,0BAA0B;YACtBC,WAAW;YACXC,SAAS,AAAC,QAA8BjC,OAAvBA,MAAMY,OAAO,CAACsB,EAAE,EAAC,QAAuB,OAAjBlC,MAAMY,OAAO,CAACuB,EAAE,EAAC;QAC7D;QAEAC,KAAK;YACD,WAAW;gBACPlB,iBAAiBf;YACrB;QACJ;IACJ;AACJ;IAEA,WAAeL"}
|
package/dist/cjs/theme/Theme.js
CHANGED
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "plasmaTheme", {
|
|
|
8
8
|
return plasmaTheme;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
var _objectDestructuringEmpty = require("@swc/helpers/lib/_object_destructuring_empty.js").default;
|
|
11
12
|
var _objectSpread = require("@swc/helpers/lib/_object_spread.js").default;
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
var _plasmaReactIcons = require("@coveord/plasma-react-icons");
|
|
@@ -88,19 +89,28 @@ var plasmaTheme = {
|
|
|
88
89
|
}
|
|
89
90
|
},
|
|
90
91
|
Title: {
|
|
91
|
-
styles:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
letterSpacing: "0.011em"
|
|
96
|
-
}
|
|
92
|
+
styles: {
|
|
93
|
+
root: {
|
|
94
|
+
"&:is(h1,h2,h3,h4,h5,h6)": {
|
|
95
|
+
letterSpacing: "0.011em"
|
|
97
96
|
}
|
|
98
|
-
}
|
|
97
|
+
}
|
|
99
98
|
}
|
|
100
99
|
},
|
|
101
100
|
Text: {
|
|
102
101
|
defaultProps: {
|
|
103
102
|
weight: 300
|
|
103
|
+
},
|
|
104
|
+
styles: function(theme, param, param1) {
|
|
105
|
+
var ref = _objectDestructuringEmpty(param), size = param1.size;
|
|
106
|
+
return {
|
|
107
|
+
root: {
|
|
108
|
+
fontSize: (0, _core.getSize)({
|
|
109
|
+
size: size !== null && size !== void 0 ? size : "sm",
|
|
110
|
+
sizes: theme.fontSizes
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
};
|
|
104
114
|
}
|
|
105
115
|
},
|
|
106
116
|
Button: {
|
|
@@ -139,7 +149,10 @@ var plasmaTheme = {
|
|
|
139
149
|
overflow: "auto"
|
|
140
150
|
},
|
|
141
151
|
title: {
|
|
142
|
-
width: "100%"
|
|
152
|
+
width: "100%",
|
|
153
|
+
fontSize: theme.headings.sizes.h3.fontSize,
|
|
154
|
+
lineHeight: theme.headings.sizes.h3.lineHeight,
|
|
155
|
+
fontWeight: 500
|
|
143
156
|
}
|
|
144
157
|
};
|
|
145
158
|
},
|
|
@@ -216,6 +229,14 @@ var plasmaTheme = {
|
|
|
216
229
|
Checkbox: {
|
|
217
230
|
defaultProps: {
|
|
218
231
|
radius: "sm"
|
|
232
|
+
},
|
|
233
|
+
styles: function(theme) {
|
|
234
|
+
return {
|
|
235
|
+
label: {
|
|
236
|
+
fontSize: theme.fontSizes.sm,
|
|
237
|
+
fontWeight: 300
|
|
238
|
+
}
|
|
239
|
+
};
|
|
219
240
|
}
|
|
220
241
|
},
|
|
221
242
|
List: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {InfoSize24Px} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {getSize, MantineThemeOverride, NotificationProps, rem} from '@mantine/core';\n\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = {\n // These are overrides over https://github.com/mantinedev/mantine/blob/master/src/mantine-styles/src/theme/default-theme.ts\n colorScheme: 'light',\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n lineHeight: 1.5,\n spacing: {\n xs: '8px',\n sm: '16px',\n md: '24px',\n lg: '32px',\n xl: '40px',\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: 500,\n sizes: {\n h1: {fontSize: '48px', lineHeight: undefined, fontWeight: 300},\n h2: {fontSize: '32px', lineHeight: undefined, fontWeight: 500},\n h3: {fontSize: '24px', lineHeight: undefined, fontWeight: 500},\n h4: {fontSize: '18px', lineHeight: undefined, fontWeight: 300},\n h5: {fontSize: '14px', lineHeight: undefined, fontWeight: 500},\n h6: {fontSize: '12px', lineHeight: undefined, fontWeight: 500},\n },\n },\n shadows: {\n xs: '0px 1px 0px rgba(4, 8, 31, 0.08)',\n sm: '0px 2px 4px rgba(4, 8, 31, 0.12)',\n md: '0px 4px 8px rgba(4, 8, 31, 0.08)',\n lg: '0px 8px 16px rgba(7, 12, 41, 0.06)',\n xl: '0px 16px 24px rgba(4, 8, 31, 0.06)',\n },\n colors: PlasmaColors,\n components: {\n Alert: {\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'navy',\n },\n styles: {\n title: {\n fontWeight: 500,\n },\n },\n },\n Title: {\n styles: (theme) => ({\n root: {\n '&:is(h1,h2,h3,h4,h5,h6)': {letterSpacing: '0.011em'},\n },\n }),\n },\n Text: {\n defaultProps: {\n weight: 300,\n },\n },\n Button: {\n styles: () => ({\n root: {\n fontWeight: 400,\n },\n }),\n variants: {\n outline: () => ({\n root: {\n backgroundColor: 'white',\n },\n }),\n },\n },\n Modal: {\n styles: (theme, {fullScreen}, {size}) => ({\n content: {\n flex: fullScreen\n ? '0 0 100%'\n : `0 0 ${getSize({\n size,\n sizes: {\n xs: rem(440),\n sm: rem(550),\n md: rem(800),\n lg: rem(1334),\n xl: rem('85%'),\n },\n })}`,\n overflow: 'auto',\n },\n title: {width: '100%'},\n }),\n defaultProps: {\n overlayProps: {\n color: color.primary.navy[9],\n opacity: 0.9,\n },\n },\n },\n InputWrapper: {\n defaultProps: {\n withAsterisk: false,\n },\n styles: (theme) => ({\n label: {\n marginBottom: theme.spacing.xs,\n },\n description: {\n fontSize: theme.fontSizes.sm,\n color: theme.colors.gray[7],\n marginBottom: theme.spacing.xs,\n },\n invalid: {\n color: theme.colors.red[9],\n borderColor: theme.colors.red[6],\n },\n error: {\n color: theme.colors.red[9],\n },\n }),\n },\n TextInput: {\n defaultProps: {\n radius: 8,\n },\n },\n Tooltip: {\n defaultProps: {\n color: 'navy',\n withArrow: true,\n withinPortal: true,\n multiline: true,\n },\n },\n Loader: {\n defaultProps: {\n variant: 'dots',\n color: 'action',\n },\n },\n DateRangePicker: {\n styles: {\n cell: {\n textAlign: 'center',\n },\n },\n },\n Anchor: {\n defaultProps: {\n color: 'action.6',\n },\n styles: (theme) => ({\n root: {\n ...theme.fn.hover({\n textDecoration: 'underline',\n color: theme.colors.action[8],\n }),\n },\n }),\n },\n Checkbox: {\n defaultProps: {\n radius: 'sm',\n },\n },\n List: {\n styles: () => ({\n root: {\n listStyleType: 'disc',\n },\n }),\n },\n Radio: {\n styles: {\n labelWrapper: {\n display: 'flex',\n alignItems: 'flex-start',\n },\n },\n },\n Popover: {\n defaultProps: {\n shadow: 'md',\n withArrow: true,\n },\n },\n Badge: {\n styles: {\n root: {\n textTransform: 'none',\n padding: '4px 8px',\n fontWeight: 500,\n },\n },\n },\n ColorSwatch: {\n defaultProps: {\n size: 8,\n withShadow: false,\n },\n },\n MenuItem: {\n defaultProps: {\n fw: 300,\n },\n },\n Notification: {\n styles: (theme, {color: notificationType}: NotificationProps) => ({\n root: {\n borderColor: theme.colors.gray[3],\n backgroundColor: theme.colors.gray[0],\n boxShadow: theme.shadows.lg,\n padding: theme.spacing.sm,\n '&[data-with-icon]': {\n paddingLeft: theme.spacing.sm,\n },\n },\n icon: {\n backgroundColor: 'transparent',\n marginRight: theme.spacing.sm,\n color: theme.colors?.[notificationType][6],\n },\n closeButton: {\n margin: theme.spacing.xs,\n color: theme.colors.gray[5],\n },\n }),\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'info',\n },\n },\n Skeleton: {\n styles: {\n visible: {\n '&::before': {zIndex: 'unset'},\n '&::after': {zIndex: 'unset'},\n },\n },\n },\n Segmented: {\n styles: {\n control: {\n zIndex: 'unset',\n },\n },\n },\n },\n};\n"],"names":["plasmaTheme","colorScheme","fontFamily","black","color","primary","gray","defaultRadius","lineHeight","spacing","xs","sm","md","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","undefined","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","Alert","defaultProps","icon","InfoSize24Px","height","styles","title","Title","theme","root","letterSpacing","Text","weight","Button","variants","outline","backgroundColor","Modal","fullScreen","size","content","flex","getSize","rem","overflow","width","overlayProps","navy","opacity","InputWrapper","withAsterisk","label","marginBottom","description","fontSizes","invalid","red","borderColor","error","TextInput","radius","Tooltip","withArrow","withinPortal","multiline","Loader","variant","DateRangePicker","cell","textAlign","Anchor","fn","hover","textDecoration","action","Checkbox","List","listStyleType","Radio","labelWrapper","display","alignItems","Popover","shadow","Badge","textTransform","padding","ColorSwatch","withShadow","MenuItem","fw","Notification","notificationType","boxShadow","paddingLeft","marginRight","closeButton","margin","Skeleton","visible","zIndex","Segmented","control"],"mappings":";;;;+BAMaA;;;eAAAA;;;;;gCANc;4BACP;oBACgD;4BAEzC;AAEpB,IAAMA,cAAoC;IAC7C,2HAA2H;IAC3HC,aAAa;IACbC,YAAY;IACZC,OAAOC,mBAAK,CAACC,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,YAAY;IACZC,SAAS;QACLC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IACdC,UAAU;QACNd,YAAY;QACZe,YAAY;QACZC,OAAO;YACHC,IAAI;gBAACC,UAAU;gBAAQZ,YAAYa;gBAAWJ,YAAY;YAAG;YAC7DK,IAAI;gBAACF,UAAU;gBAAQZ,YAAYa;gBAAWJ,YAAY;YAAG;YAC7DM,IAAI;gBAACH,UAAU;gBAAQZ,YAAYa;gBAAWJ,YAAY;YAAG;YAC7DO,IAAI;gBAACJ,UAAU;gBAAQZ,YAAYa;gBAAWJ,YAAY;YAAG;YAC7DQ,IAAI;gBAACL,UAAU;gBAAQZ,YAAYa;gBAAWJ,YAAY;YAAG;YAC7DS,IAAI;gBAACN,UAAU;gBAAQZ,YAAYa;gBAAWJ,YAAY;YAAG;QACjE;IACJ;IACAU,SAAS;QACLjB,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACR;IACAc,QAAQC,0BAAY;IACpBC,YAAY;QACRC,OAAO;YACHC,cAAc;gBACVC,oBAAM,qBAACC,8BAAY;oBAACC,QAAQ;;gBAC5B/B,OAAO;YACX;YACAgC,QAAQ;gBACJC,OAAO;oBACHpB,YAAY;gBAChB;YACJ;QACJ;QACAqB,OAAO;YACHF,QAAQ,SAACG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QAAQ,SAACG;oBAAQnC,AAAOmG,yBAAPnG;oBAaFmC;gBAbmD,OAAA;oBAC9DC,MAAM;wBACF4B,aAAa7B,MAAMX,MAAM,CAACtB,IAAI,CAAC,EAAE;wBACjCyC,iBAAiBR,MAAMX,MAAM,CAACtB,IAAI,CAAC,EAAE;wBACrCkG,WAAWjE,MAAMZ,OAAO,CAACd,EAAE;wBAC3BoF,SAAS1D,MAAM9B,OAAO,CAACE,EAAE;wBACzB,qBAAqB;4BACjB8F,aAAalE,MAAM9B,OAAO,CAACE,EAAE;wBACjC;oBACJ;oBACAsB,MAAM;wBACFc,iBAAiB;wBACjB2D,aAAanE,MAAM9B,OAAO,CAACE,EAAE;wBAC7BP,KAAK,EAAEmC,CAAAA,gBAAAA,MAAMX,MAAM,cAAZW,2BAAAA,KAAAA,IAAAA,aAAc,CAACgE,iBAAiB,CAAC,EAAE;oBAC9C;oBACAI,aAAa;wBACTC,QAAQrE,MAAM9B,OAAO,CAACC,EAAE;wBACxBN,OAAOmC,MAAMX,MAAM,CAACtB,IAAI,CAAC,EAAE;oBAC/B;gBACJ;;YACA0B,cAAc;gBACVC,oBAAM,qBAACC,8BAAY;oBAACC,QAAQ;;gBAC5B/B,OAAO;YACX;QACJ;QACAyG,UAAU;YACNzE,QAAQ;gBACJ0E,SAAS;oBACL,aAAa;wBAACC,QAAQ;oBAAO;oBAC7B,YAAY;wBAACA,QAAQ;oBAAO;gBAChC;YACJ;QACJ;QACAC,WAAW;YACP5E,QAAQ;gBACJ6E,SAAS;oBACLF,QAAQ;gBACZ;YACJ;QACJ;IACJ;AACJ"}
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {InfoSize24Px} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {getSize, MantineThemeOverride, NotificationProps, rem} from '@mantine/core';\n\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = {\n // These are overrides over https://github.com/mantinedev/mantine/blob/master/src/mantine-styles/src/theme/default-theme.ts\n colorScheme: 'light',\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n lineHeight: 1.5,\n spacing: {\n xs: '8px',\n sm: '16px',\n md: '24px',\n lg: '32px',\n xl: '40px',\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: 500,\n sizes: {\n h1: {fontSize: '48px', lineHeight: undefined, fontWeight: 300},\n h2: {fontSize: '32px', lineHeight: undefined, fontWeight: 500},\n h3: {fontSize: '24px', lineHeight: undefined, fontWeight: 500},\n h4: {fontSize: '18px', lineHeight: undefined, fontWeight: 300},\n h5: {fontSize: '14px', lineHeight: undefined, fontWeight: 500},\n h6: {fontSize: '12px', lineHeight: undefined, fontWeight: 500},\n },\n },\n shadows: {\n xs: '0px 1px 0px rgba(4, 8, 31, 0.08)',\n sm: '0px 2px 4px rgba(4, 8, 31, 0.12)',\n md: '0px 4px 8px rgba(4, 8, 31, 0.08)',\n lg: '0px 8px 16px rgba(7, 12, 41, 0.06)',\n xl: '0px 16px 24px rgba(4, 8, 31, 0.06)',\n },\n colors: PlasmaColors,\n components: {\n Alert: {\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'navy',\n },\n styles: {\n title: {\n fontWeight: 500,\n },\n },\n },\n Title: {\n styles: {\n root: {\n '&:is(h1,h2,h3,h4,h5,h6)': {letterSpacing: '0.011em'},\n },\n },\n },\n Text: {\n defaultProps: {\n weight: 300,\n },\n styles: (theme, {}, {size}) => ({\n root: {\n fontSize: getSize({size: size ?? 'sm', sizes: theme.fontSizes}),\n },\n }),\n },\n Button: {\n styles: () => ({\n root: {\n fontWeight: 400,\n },\n }),\n variants: {\n outline: () => ({\n root: {\n backgroundColor: 'white',\n },\n }),\n },\n },\n Modal: {\n styles: (theme, {fullScreen}, {size}) => ({\n content: {\n flex: fullScreen\n ? '0 0 100%'\n : `0 0 ${getSize({\n size,\n sizes: {\n xs: rem(440),\n sm: rem(550),\n md: rem(800),\n lg: rem(1334),\n xl: rem('85%'),\n },\n })}`,\n overflow: 'auto',\n },\n title: {\n width: '100%',\n fontSize: theme.headings.sizes.h3.fontSize,\n lineHeight: theme.headings.sizes.h3.lineHeight,\n fontWeight: 500,\n },\n }),\n defaultProps: {\n overlayProps: {\n color: color.primary.navy[9],\n opacity: 0.9,\n },\n },\n },\n InputWrapper: {\n defaultProps: {\n withAsterisk: false,\n },\n styles: (theme) => ({\n label: {\n marginBottom: theme.spacing.xs,\n },\n description: {\n fontSize: theme.fontSizes.sm,\n color: theme.colors.gray[7],\n marginBottom: theme.spacing.xs,\n },\n invalid: {\n color: theme.colors.red[9],\n borderColor: theme.colors.red[6],\n },\n error: {\n color: theme.colors.red[9],\n },\n }),\n },\n TextInput: {\n defaultProps: {\n radius: 8,\n },\n },\n Tooltip: {\n defaultProps: {\n color: 'navy',\n withArrow: true,\n withinPortal: true,\n multiline: true,\n },\n },\n Loader: {\n defaultProps: {\n variant: 'dots',\n color: 'action',\n },\n },\n DateRangePicker: {\n styles: {\n cell: {\n textAlign: 'center',\n },\n },\n },\n Anchor: {\n defaultProps: {\n color: 'action.6',\n },\n styles: (theme) => ({\n root: {\n ...theme.fn.hover({\n textDecoration: 'underline',\n color: theme.colors.action[8],\n }),\n },\n }),\n },\n Checkbox: {\n defaultProps: {\n radius: 'sm',\n },\n styles: (theme) => ({\n label: {\n fontSize: theme.fontSizes.sm,\n fontWeight: 300,\n },\n }),\n },\n List: {\n styles: () => ({\n root: {\n listStyleType: 'disc',\n },\n }),\n },\n Radio: {\n styles: {\n labelWrapper: {\n display: 'flex',\n alignItems: 'flex-start',\n },\n },\n },\n Popover: {\n defaultProps: {\n shadow: 'md',\n withArrow: true,\n },\n },\n Badge: {\n styles: {\n root: {\n textTransform: 'none',\n padding: '4px 8px',\n fontWeight: 500,\n },\n },\n },\n ColorSwatch: {\n defaultProps: {\n size: 8,\n withShadow: false,\n },\n },\n MenuItem: {\n defaultProps: {\n fw: 300,\n },\n },\n Notification: {\n styles: (theme, {color: notificationType}: NotificationProps) => ({\n root: {\n borderColor: theme.colors.gray[3],\n backgroundColor: theme.colors.gray[0],\n boxShadow: theme.shadows.lg,\n padding: theme.spacing.sm,\n '&[data-with-icon]': {\n paddingLeft: theme.spacing.sm,\n },\n },\n icon: {\n backgroundColor: 'transparent',\n marginRight: theme.spacing.sm,\n color: theme.colors?.[notificationType][6],\n },\n closeButton: {\n margin: theme.spacing.xs,\n color: theme.colors.gray[5],\n },\n }),\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'info',\n },\n },\n Skeleton: {\n styles: {\n visible: {\n '&::before': {zIndex: 'unset'},\n '&::after': {zIndex: 'unset'},\n },\n },\n },\n Segmented: {\n styles: {\n control: {\n zIndex: 'unset',\n },\n },\n },\n },\n};\n"],"names":["plasmaTheme","colorScheme","fontFamily","black","color","primary","gray","defaultRadius","lineHeight","spacing","xs","sm","md","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","undefined","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","Alert","defaultProps","icon","InfoSize24Px","height","styles","title","Title","root","letterSpacing","Text","weight","theme","size","getSize","fontSizes","Button","variants","outline","backgroundColor","Modal","fullScreen","content","flex","rem","overflow","width","overlayProps","navy","opacity","InputWrapper","withAsterisk","label","marginBottom","description","invalid","red","borderColor","error","TextInput","radius","Tooltip","withArrow","withinPortal","multiline","Loader","variant","DateRangePicker","cell","textAlign","Anchor","fn","hover","textDecoration","action","Checkbox","List","listStyleType","Radio","labelWrapper","display","alignItems","Popover","shadow","Badge","textTransform","padding","ColorSwatch","withShadow","MenuItem","fw","Notification","notificationType","boxShadow","paddingLeft","marginRight","closeButton","margin","Skeleton","visible","zIndex","Segmented","control"],"mappings":";;;;+BAMaA;;;eAAAA;;;;;;gCANc;4BACP;oBACgD;4BAEzC;AAEpB,IAAMA,cAAoC;IAC7C,2HAA2H;IAC3HC,aAAa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src/components/prompt/Prompt.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Prompt.d.ts","sourceRoot":"","sources":["../../../../src/components/prompt/Prompt.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,UAAU,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAW,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AA+B5C,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC3C,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;IACjE,QAAQ,EAAE,SAAS,CAAC;CACvB;AACD,UAAU,UAAU;IAChB,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;IACnC,MAAM,EAAE,OAAO,YAAY,CAAC;CAC/B;AAED,eAAO,MAAM,MAAM,EAAE,UAsBpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/table/Table.styles.ts"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,wBAAwB,EAAE,OAAO,CAAC;CACrC;AAED,QAAA,MAAM,SAAS;;;;;;
|
|
1
|
+
{"version":3,"file":"Table.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/table/Table.styles.ts"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,wBAAwB,EAAE,OAAO,CAAC;CACrC;AAED,QAAA,MAAM,SAAS;;;;;;CAgDb,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,oBAAoB,EAAyB,MAAM,eAAe,CAAC;AAIpF,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,oBAAoB,EAAyB,MAAM,eAAe,CAAC;AAIpF,eAAO,MAAM,WAAW,EAAE,oBAwQzB,CAAC"}
|
|
@@ -12,27 +12,27 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
|
|
|
12
12
|
class="mantine-Breadcrumbs-root mantine-1ujbd2v"
|
|
13
13
|
>
|
|
14
14
|
<a
|
|
15
|
-
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-
|
|
15
|
+
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1yycs9g"
|
|
16
16
|
>
|
|
17
17
|
One
|
|
18
18
|
</a>
|
|
19
19
|
<div
|
|
20
|
-
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-
|
|
20
|
+
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-c5usyo"
|
|
21
21
|
>
|
|
22
22
|
/
|
|
23
23
|
</div>
|
|
24
24
|
<a
|
|
25
|
-
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-
|
|
25
|
+
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1yycs9g"
|
|
26
26
|
>
|
|
27
27
|
Two
|
|
28
28
|
</a>
|
|
29
29
|
<div
|
|
30
|
-
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-
|
|
30
|
+
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-c5usyo"
|
|
31
31
|
>
|
|
32
32
|
/
|
|
33
33
|
</div>
|
|
34
34
|
<a
|
|
35
|
-
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-
|
|
35
|
+
class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1yycs9g"
|
|
36
36
|
>
|
|
37
37
|
Three
|
|
38
38
|
</a>
|
|
@@ -41,13 +41,13 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
|
|
|
41
41
|
class="mantine-xg7kom"
|
|
42
42
|
>
|
|
43
43
|
<h1
|
|
44
|
-
class="mantine-Text-root mantine-Title-root mantine-
|
|
44
|
+
class="mantine-Text-root mantine-Title-root mantine-d1yoif"
|
|
45
45
|
>
|
|
46
46
|
Title
|
|
47
47
|
</h1>
|
|
48
48
|
</div>
|
|
49
49
|
<div
|
|
50
|
-
class="mantine-Text-root mantine-
|
|
50
|
+
class="mantine-Text-root mantine-1w25z6f"
|
|
51
51
|
/>
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
@@ -2,11 +2,11 @@ import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
|
2
2
|
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
3
|
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { color } from "@coveord/plasma-tokens";
|
|
5
6
|
import { createStyles, Modal } from "@mantine/core";
|
|
6
7
|
import { Children } from "react";
|
|
7
8
|
import { PromptFooter } from "./PromptFooter";
|
|
8
9
|
var useStyles = createStyles(function(theme) {
|
|
9
|
-
var white = "#fff";
|
|
10
10
|
return {
|
|
11
11
|
body: {
|
|
12
12
|
padding: 0
|
|
@@ -16,37 +16,40 @@ var useStyles = createStyles(function(theme) {
|
|
|
16
16
|
width: 550
|
|
17
17
|
},
|
|
18
18
|
innerBody: {
|
|
19
|
-
padding: "".concat(theme.spacing.md, "
|
|
19
|
+
padding: "".concat(theme.spacing.md, " ").concat(theme.spacing.xl, " ").concat(theme.spacing.lg)
|
|
20
20
|
},
|
|
21
21
|
header: {
|
|
22
|
-
padding: "".concat(theme.spacing.md, "
|
|
22
|
+
padding: "".concat(theme.spacing.md, " ").concat(theme.spacing.xl),
|
|
23
23
|
width: "100%",
|
|
24
24
|
borderBottom: "1px solid ".concat(theme.colors.gray[3]),
|
|
25
|
-
fontSize: theme.headings.sizes.
|
|
26
|
-
lineHeight: theme.headings.sizes.
|
|
25
|
+
fontSize: theme.headings.sizes.h3.fontSize,
|
|
26
|
+
lineHeight: theme.headings.sizes.h3.lineHeight
|
|
27
27
|
},
|
|
28
28
|
default: {},
|
|
29
29
|
success: {
|
|
30
30
|
backgroundColor: theme.colors.lime[6],
|
|
31
|
-
color:
|
|
31
|
+
color: color.primary.pureWhite
|
|
32
32
|
},
|
|
33
33
|
warning: {
|
|
34
34
|
backgroundColor: theme.colors.yellow[5],
|
|
35
|
-
color:
|
|
35
|
+
color: color.primary.pureWhite
|
|
36
36
|
},
|
|
37
37
|
critical: {
|
|
38
38
|
backgroundColor: theme.colors.red[6],
|
|
39
|
-
color:
|
|
39
|
+
color: color.primary.pureWhite
|
|
40
40
|
},
|
|
41
41
|
info: {
|
|
42
42
|
backgroundColor: theme.colors.navy[5],
|
|
43
|
-
color:
|
|
43
|
+
color: color.primary.pureWhite
|
|
44
44
|
},
|
|
45
45
|
whiteClose: {
|
|
46
|
-
color:
|
|
46
|
+
color: color.primary.pureWhite,
|
|
47
47
|
"&:hover": {
|
|
48
48
|
backgroundColor: "transparent"
|
|
49
49
|
}
|
|
50
|
+
},
|
|
51
|
+
title: {
|
|
52
|
+
color: color.primary.pureWhite
|
|
50
53
|
}
|
|
51
54
|
};
|
|
52
55
|
});
|
|
@@ -69,7 +72,8 @@ export var Prompt = function(_param) {
|
|
|
69
72
|
header: cx(classes.header, classes[variant]),
|
|
70
73
|
close: !defaultVariant && classes.whiteClose,
|
|
71
74
|
body: classes.body,
|
|
72
|
-
modal: !defaultVariant && classes.modalType
|
|
75
|
+
modal: !defaultVariant && classes.modalType,
|
|
76
|
+
title: classes.title
|
|
73
77
|
};
|
|
74
78
|
return /*#__PURE__*/ _jsxs(Modal, _object_spread_props(_object_spread({
|
|
75
79
|
padding: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {createStyles, Modal, ModalProps} from '@mantine/core';\nimport {Children, ReactElement, ReactNode} from 'react';\nimport {PromptFooter} from './PromptFooter';\n\nconst useStyles = createStyles((theme) => {\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {color} from '@coveord/plasma-tokens';\nimport {createStyles, Modal, ModalProps} from '@mantine/core';\nimport {Children, ReactElement, ReactNode} from 'react';\nimport {PromptFooter} from './PromptFooter';\n\nconst useStyles = createStyles((theme) => ({\n body: {\n padding: 0,\n },\n modalType: {overflow: 'hidden', width: 550},\n innerBody: {\n padding: `${theme.spacing.md} ${theme.spacing.xl} ${theme.spacing.lg}`,\n },\n header: {\n padding: `${theme.spacing.md} ${theme.spacing.xl}`,\n width: '100%',\n borderBottom: `1px solid ${theme.colors.gray[3]}`,\n fontSize: theme.headings.sizes.h3.fontSize,\n lineHeight: theme.headings.sizes.h3.lineHeight,\n },\n default: {},\n success: {backgroundColor: theme.colors.lime[6], color: color.primary.pureWhite},\n warning: {backgroundColor: theme.colors.yellow[5], color: color.primary.pureWhite},\n critical: {\n backgroundColor: theme.colors.red[6],\n color: color.primary.pureWhite,\n },\n info: {backgroundColor: theme.colors.navy[5], color: color.primary.pureWhite},\n whiteClose: {color: color.primary.pureWhite, '&:hover': {backgroundColor: 'transparent'}},\n title: {\n color: color.primary.pureWhite,\n },\n}));\n\nexport interface PromptProps extends ModalProps {\n variant: 'default' | 'success' | 'warning' | 'critical' | 'info';\n children: ReactNode;\n}\ninterface PromptType {\n (props: PromptProps): ReactElement;\n Footer: typeof PromptFooter;\n}\n\nexport const Prompt: PromptType = ({children, variant, size, ...otherProps}) => {\n const {classes, cx} = useStyles();\n const defaultVariant = variant === 'default';\n const convertedChildren = Children.toArray(children) as ReactElement[];\n\n const otherChildren = convertedChildren.filter((child) => child.type !== PromptFooter);\n const footer = convertedChildren.find((child) => child.type === PromptFooter);\n\n const classNames = {\n header: cx(classes.header, classes[variant]),\n close: !defaultVariant && classes.whiteClose,\n body: classes.body,\n modal: !defaultVariant && classes.modalType,\n title: classes.title,\n };\n\n return (\n <Modal padding={0} classNames={classNames} size={defaultVariant ? size : 'sm'} {...otherProps}>\n <div className={classes.innerBody}>{otherChildren}</div>\n {footer}\n </Modal>\n );\n};\n\nPrompt.Footer = PromptFooter;\n"],"names":["color","createStyles","Modal","Children","PromptFooter","useStyles","theme","body","padding","modalType","overflow","width","innerBody","spacing","md","xl","lg","header","borderBottom","colors","gray","fontSize","headings","sizes","h3","lineHeight","default","success","backgroundColor","lime","primary","pureWhite","warning","yellow","critical","red","info","navy","whiteClose","title","Prompt","children","variant","size","otherProps","classes","cx","defaultVariant","convertedChildren","toArray","otherChildren","filter","child","type","footer","find","classNames","close","modal","div","className","Footer"],"mappings":";;;;AAAA,SAAQA,KAAK,QAAO,yBAAyB;AAC7C,SAAQC,YAAY,EAAEC,KAAK,QAAmB,gBAAgB;AAC9D,SAAQC,QAAQ,QAAgC,QAAQ;AACxD,SAAQC,YAAY,QAAO,iBAAiB;AAE5C,IAAMC,YAAYJ,aAAa,SAACK;WAAW;QACvCC,MAAM;YACFC,SAAS;QACb;QACAC,WAAW;YAACC,UAAU;YAAUC,OAAO;QAAG;QAC1CC,WAAW;YACPJ,SAAS,AAAC,GAAsBF,OAApBA,MAAMO,OAAO,CAACC,EAAE,EAAC,KAAuBR,OAApBA,MAAMO,OAAO,CAACE,EAAE,EAAC,KAAoB,OAAjBT,MAAMO,OAAO,CAACG,EAAE;QACxE;QACAC,QAAQ;YACJT,SAAS,AAAC,GAAsBF,OAApBA,MAAMO,OAAO,CAACC,EAAE,EAAC,KAAoB,OAAjBR,MAAMO,OAAO,CAACE,EAAE;YAChDJ,OAAO;YACPO,cAAc,AAAC,aAAiC,OAArBZ,MAAMa,MAAM,CAACC,IAAI,CAAC,EAAE;YAC/CC,U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D,QAAQ5B,MAAM,EAAE4B,OAAO,CAACH,QAAQ;QAC3Ce,OAAO,CAACV,kBAAkBF,QAAQP,UAAU;QAC5C/B,MAAMsC,QAAQtC,IAAI;QAClBmD,OAAO,CAACX,kBAAkBF,QAAQpC,SAAS;QAC3C8B,OAAOM,QAAQN,KAAK;IACxB;IAEA,qBACI,MAACrC;QAAMM,SAAS;QAAGgD,YAAYA;QAAYb,MAAMI,iBAAiBJ,OAAO,IAAI;OAAMC;;0BAC/E,KAACe;gBAAIC,WAAWf,QAAQjC,SAAS;0BAAGsC;;YACnCI;;;AAGb,EAAE;AAEFd,OAAOqB,MAAM,GAAGzD"}
|
|
@@ -17,6 +17,7 @@ var useStyles = createStyles(function(theme, param) {
|
|
|
17
17
|
top: hasHeader ? 69 : 0,
|
|
18
18
|
backgroundColor: theme.colorScheme === "dark" ? theme.black : theme.white,
|
|
19
19
|
transition: "box-shadow 150ms ease",
|
|
20
|
+
zIndex: 1,
|
|
20
21
|
"&::after": {
|
|
21
22
|
content: '""',
|
|
22
23
|
position: "absolute",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/table/Table.styles.ts"],"sourcesContent":["import {createStyles} from '@mantine/core';\n\ninterface TableStylesParams {\n hasHeader: boolean;\n multiRowSelectionEnabled: boolean;\n}\n\nconst useStyles = createStyles<string, TableStylesParams>((theme, {hasHeader, multiRowSelectionEnabled}) => {\n const rowBackgroundColor =\n theme.colorScheme === 'dark'\n ? theme.fn.rgba(theme.colors[theme.primaryColor][7], 0.2)\n : theme.colors[theme.primaryColor][0];\n return {\n table: {\n width: '100%',\n '& td:first-of-type, th:first-of-type > *': {\n paddingLeft: theme.spacing.xl,\n },\n '& tbody td': {\n verticalAlign: 'top',\n },\n },\n\n header: {\n position: 'sticky',\n top: hasHeader ? 69 : 0,\n backgroundColor: theme.colorScheme === 'dark' ? theme.black : theme.white,\n transition: 'box-shadow 150ms ease',\n\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n borderBottom: `1px solid ${theme.colors.gray[2]}`,\n },\n },\n\n rowSelected: {\n backgroundColor: multiRowSelectionEnabled ? undefined : rowBackgroundColor,\n },\n\n rowCollapsibleButtonCell: {\n textAlign: 'right',\n padding: `calc(${theme.spacing.xs}/2) ${theme.spacing.sm} !important`,\n },\n\n row: {\n '&:hover': {\n backgroundColor: rowBackgroundColor,\n },\n },\n };\n});\n\nexport default useStyles;\n"],"names":["createStyles","useStyles","theme","hasHeader","multiRowSelectionEnabled","rowBackgroundColor","colorScheme","fn","rgba","colors","primaryColor","table","width","paddingLeft","spacing","xl","verticalAlign","header","position","top","backgroundColor","black","white","transition","content","left","right","bottom","borderBottom","gray","rowSelected","undefined","rowCollapsibleButtonCell","textAlign","padding","xs","sm","row"],"mappings":"AAAA,SAAQA,YAAY,QAAO,gBAAgB;AAO3C,IAAMC,YAAYD,aAAwC,SAACE,cAAiD;QAAzCC,kBAAAA,WAAWC,iCAAAA;IAC1E,IAAMC,qBACFH,MAAMI,WAAW,KAAK,SAChBJ,MAAMK,EAAE,CAACC,IAAI,CAACN,MAAMO,MAAM,CAACP,MAAMQ,YAAY,CAAC,CAAC,EAAE,EAAE,OACnDR,MAAMO,MAAM,CAACP,MAAMQ,YAAY,CAAC,CAAC,EAAE;IAC7C,OAAO;QACHC,OAAO;YACHC,OAAO;YACP,4CAA4C;gBACxCC,aAAaX,MAAMY,OAAO,CAACC,EAAE;YACjC;YACA,cAAc;gBACVC,eAAe;YACnB;QACJ;QAEAC,QAAQ;YACJC,UAAU;YACVC,KAAKhB,YAAY,KAAK,CAAC;YACvBiB,iBAAiBlB,MAAMI,WAAW,KAAK,SAASJ,MAAMmB,KAAK,GAAGnB,MAAMoB,KAAK;YACzEC,YAAY;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/table/Table.styles.ts"],"sourcesContent":["import {createStyles} from '@mantine/core';\n\ninterface TableStylesParams {\n hasHeader: boolean;\n multiRowSelectionEnabled: boolean;\n}\n\nconst useStyles = createStyles<string, TableStylesParams>((theme, {hasHeader, multiRowSelectionEnabled}) => {\n const rowBackgroundColor =\n theme.colorScheme === 'dark'\n ? theme.fn.rgba(theme.colors[theme.primaryColor][7], 0.2)\n : theme.colors[theme.primaryColor][0];\n return {\n table: {\n width: '100%',\n '& td:first-of-type, th:first-of-type > *': {\n paddingLeft: theme.spacing.xl,\n },\n '& tbody td': {\n verticalAlign: 'top',\n },\n },\n\n header: {\n position: 'sticky',\n top: hasHeader ? 69 : 0,\n backgroundColor: theme.colorScheme === 'dark' ? theme.black : theme.white,\n transition: 'box-shadow 150ms ease',\n zIndex: 1,\n\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n borderBottom: `1px solid ${theme.colors.gray[2]}`,\n },\n },\n\n rowSelected: {\n backgroundColor: multiRowSelectionEnabled ? undefined : rowBackgroundColor,\n },\n\n rowCollapsibleButtonCell: {\n textAlign: 'right',\n padding: `calc(${theme.spacing.xs}/2) ${theme.spacing.sm} !important`,\n },\n\n row: {\n '&:hover': {\n backgroundColor: rowBackgroundColor,\n },\n },\n };\n});\n\nexport default useStyles;\n"],"names":["createStyles","useStyles","theme","hasHeader","multiRowSelectionEnabled","rowBackgroundColor","colorScheme","fn","rgba","colors","primaryColor","table","width","paddingLeft","spacing","xl","verticalAlign","header","position","top","backgroundColor","black","white","transition","zIndex","content","left","right","bottom","borderBottom","gray","rowSelected","undefined","rowCollapsibleButtonCell","textAlign","padding","xs","sm","row"],"mappings":"AAAA,SAAQA,YAAY,QAAO,gBAAgB;AAO3C,IAAMC,YAAYD,aAAwC,SAACE,cAAiD;QAAzCC,kBAAAA,WAAWC,iCAAAA;IAC1E,IAAMC,qBACFH,MAAMI,WAAW,KAAK,SAChBJ,MAAMK,EAAE,CAACC,IAAI,CAACN,MAAMO,MAAM,CAACP,MAAMQ,YAAY,CAAC,CAAC,EAAE,EAAE,OACnDR,MAAMO,MAAM,CAACP,MAAMQ,YAAY,CAAC,CAAC,EAAE;IAC7C,OAAO;QACHC,OAAO;YACHC,OAAO;YACP,4CAA4C;gBACxCC,aAAaX,MAAMY,OAAO,CAACC,EAAE;YACjC;YACA,cAAc;gBACVC,eAAe;YACnB;QACJ;QAEAC,QAAQ;YACJC,UAAU;YACVC,KAAKhB,YAAY,KAAK,CAAC;YACvBiB,iBAAiBlB,MAAMI,WAAW,KAAK,SAASJ,MAAMmB,KAAK,GAAGnB,MAAMoB,KAAK;YACzEC,YAAY;YACZC,QAAQ;YAER,YAAY;gBACRC,SAAS;gBACTP,UAAU;gBACVQ,MAAM;gBACNC,OAAO;gBACPC,QAAQ;gBACRC,cAAc,AAAC,aAAiC,OAArB3B,MAAMO,MAAM,CAACqB,IAAI,CAAC,EAAE;YACnD;QACJ;QAEAC,aAAa;YACTX,iBAAiBhB,2BAA2B4B,YAAY3B,kBAAkB;QAC9E;QAEA4B,0BAA0B;YACtBC,WAAW;YACXC,SAAS,AAAC,QAA8BjC,OAAvBA,MAAMY,OAAO,CAACsB,EAAE,EAAC,QAAuB,OAAjBlC,MAAMY,OAAO,CAACuB,EAAE,EAAC;QAC7D;QAEAC,KAAK;YACD,WAAW;gBACPlB,iBAAiBf;YACrB;QACJ;IACJ;AACJ;AAEA,eAAeJ,UAAU"}
|
package/dist/esm/theme/Theme.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _object_destructuring_empty from "@swc/helpers/src/_object_destructuring_empty.mjs";
|
|
1
2
|
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
import { InfoSize24Px } from "@coveord/plasma-react-icons";
|
|
@@ -78,19 +79,28 @@ export var plasmaTheme = {
|
|
|
78
79
|
}
|
|
79
80
|
},
|
|
80
81
|
Title: {
|
|
81
|
-
styles:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
letterSpacing: "0.011em"
|
|
86
|
-
}
|
|
82
|
+
styles: {
|
|
83
|
+
root: {
|
|
84
|
+
"&:is(h1,h2,h3,h4,h5,h6)": {
|
|
85
|
+
letterSpacing: "0.011em"
|
|
87
86
|
}
|
|
88
|
-
}
|
|
87
|
+
}
|
|
89
88
|
}
|
|
90
89
|
},
|
|
91
90
|
Text: {
|
|
92
91
|
defaultProps: {
|
|
93
92
|
weight: 300
|
|
93
|
+
},
|
|
94
|
+
styles: function(theme, param, param1) {
|
|
95
|
+
var ref = _object_destructuring_empty(param), size = param1.size;
|
|
96
|
+
return {
|
|
97
|
+
root: {
|
|
98
|
+
fontSize: getSize({
|
|
99
|
+
size: size !== null && size !== void 0 ? size : "sm",
|
|
100
|
+
sizes: theme.fontSizes
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
};
|
|
94
104
|
}
|
|
95
105
|
},
|
|
96
106
|
Button: {
|
|
@@ -129,7 +139,10 @@ export var plasmaTheme = {
|
|
|
129
139
|
overflow: "auto"
|
|
130
140
|
},
|
|
131
141
|
title: {
|
|
132
|
-
width: "100%"
|
|
142
|
+
width: "100%",
|
|
143
|
+
fontSize: theme.headings.sizes.h3.fontSize,
|
|
144
|
+
lineHeight: theme.headings.sizes.h3.lineHeight,
|
|
145
|
+
fontWeight: 500
|
|
133
146
|
}
|
|
134
147
|
};
|
|
135
148
|
},
|
|
@@ -206,6 +219,14 @@ export var plasmaTheme = {
|
|
|
206
219
|
Checkbox: {
|
|
207
220
|
defaultProps: {
|
|
208
221
|
radius: "sm"
|
|
222
|
+
},
|
|
223
|
+
styles: function(theme) {
|
|
224
|
+
return {
|
|
225
|
+
label: {
|
|
226
|
+
fontSize: theme.fontSizes.sm,
|
|
227
|
+
fontWeight: 300
|
|
228
|
+
}
|
|
229
|
+
};
|
|
209
230
|
}
|
|
210
231
|
},
|
|
211
232
|
List: {
|