@coveord/plasma-mantine 48.10.0 → 48.12.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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +6 -6
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/table/TableHeader.js +22 -8
- package/dist/cjs/components/table/TableHeader.js.map +1 -1
- package/dist/cjs/theme/PlasmaColors.js +26 -16
- package/dist/cjs/theme/PlasmaColors.js.map +1 -1
- package/dist/cjs/theme/Theme.js +9 -0
- package/dist/cjs/theme/Theme.js.map +1 -1
- package/dist/definitions/components/table/TableHeader.d.ts +13 -2
- package/dist/definitions/components/table/TableHeader.d.ts.map +1 -1
- package/dist/definitions/theme/PlasmaColors.d.ts +5 -0
- package/dist/definitions/theme/PlasmaColors.d.ts.map +1 -1
- package/dist/definitions/theme/Theme.d.ts.map +1 -1
- package/dist/esm/components/table/TableHeader.js +22 -8
- package/dist/esm/components/table/TableHeader.js.map +1 -1
- package/dist/esm/theme/PlasmaColors.js +26 -16
- package/dist/esm/theme/PlasmaColors.js.map +1 -1
- package/dist/esm/theme/Theme.js +9 -0
- package/dist/esm/theme/Theme.js.map +1 -1
- package/package.json +1 -1
- package/src/components/table/TableHeader.tsx +17 -6
- package/src/theme/PlasmaColors.ts +27 -16
- package/src/theme/Theme.tsx +9 -0
|
@@ -8,11 +8,14 @@ Object.defineProperty(exports, "TableHeader", {
|
|
|
8
8
|
return TableHeader;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
var _objectSpread = require("@swc/helpers/lib/_object_spread.js").default;
|
|
12
|
+
var _objectSpreadProps = require("@swc/helpers/lib/_object_spread_props.js").default;
|
|
13
|
+
var _objectWithoutProperties = require("@swc/helpers/lib/_object_without_properties.js").default;
|
|
11
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
15
|
var _core = require("@mantine/core");
|
|
13
16
|
var useStyles = (0, _core.createStyles)(function(theme) {
|
|
14
17
|
return {
|
|
15
|
-
|
|
18
|
+
root: {
|
|
16
19
|
position: "sticky",
|
|
17
20
|
top: 0,
|
|
18
21
|
zIndex: 13,
|
|
@@ -21,17 +24,28 @@ var useStyles = (0, _core.createStyles)(function(theme) {
|
|
|
21
24
|
}
|
|
22
25
|
};
|
|
23
26
|
});
|
|
24
|
-
var TableHeader = function(
|
|
25
|
-
var children =
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
var TableHeader = function(_param) {
|
|
28
|
+
var classNames = _param.classNames, styles = _param.styles, unstyled = _param.unstyled, children = _param.children, others = _objectWithoutProperties(_param, [
|
|
29
|
+
"classNames",
|
|
30
|
+
"styles",
|
|
31
|
+
"unstyled",
|
|
32
|
+
"children"
|
|
33
|
+
]);
|
|
34
|
+
var classes = useStyles(null, {
|
|
35
|
+
name: "TableHeader",
|
|
36
|
+
classNames: classNames,
|
|
37
|
+
styles: styles,
|
|
38
|
+
unstyled: unstyled
|
|
39
|
+
}).classes;
|
|
40
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_core.Group, _objectSpreadProps(_objectSpread({
|
|
28
41
|
position: "right",
|
|
29
42
|
spacing: "lg",
|
|
30
|
-
className: classes.
|
|
43
|
+
className: classes.root,
|
|
31
44
|
px: "md",
|
|
32
|
-
py: "sm"
|
|
45
|
+
py: "sm"
|
|
46
|
+
}, others), {
|
|
33
47
|
children: children
|
|
34
|
-
});
|
|
48
|
+
}));
|
|
35
49
|
};
|
|
36
50
|
|
|
37
51
|
//# sourceMappingURL=TableHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/table/TableHeader.tsx"],"sourcesContent":["import {createStyles, Group} from '@mantine/core';\nimport {FunctionComponent,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/table/TableHeader.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Group, Selectors} from '@mantine/core';\nimport {FunctionComponent, ReactNode} from 'react';\n\nconst useStyles = createStyles((theme) => ({\n root: {\n position: 'sticky',\n top: 0,\n zIndex: 13, // skeleton is 11\n backgroundColor: theme.colors.gray[1],\n borderBottom: `1px solid ${theme.colors.gray[4]}`,\n },\n}));\n\ntype TableHeaderStylesNames = Selectors<typeof useStyles>;\ninterface TableHeaderProps extends DefaultProps<TableHeaderStylesNames> {\n /* Children of header (ie: actions, datepicker, etc.) */\n children?: ReactNode;\n}\nexport const TableHeader: FunctionComponent<TableHeaderProps> = ({\n classNames,\n styles,\n unstyled,\n children,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TableHeader', classNames, styles, unstyled});\n return (\n <Group position=\"right\" spacing=\"lg\" className={classes.root} px=\"md\" py=\"sm\" {...others}>\n {children}\n </Group>\n );\n};\n"],"names":["TableHeader","useStyles","createStyles","theme","root","position","top","zIndex","backgroundColor","colors","gray","borderBottom","classNames","styles","unstyled","children","others","classes","name","Group","spacing","className","px","py"],"mappings":"AAAA;;;;+BAkBaA;;;eAAAA;;;;;;;oBAlB8C;AAG3D,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,MAAM;YACFC,UAAU;YACVC,KAAK;YACLC,QAAQ;YACRC,iBAAiBL,MAAMM,MAAM,CAACC,IAAI,CAAC,EAAE;YACrCC,cAAc,AAAC,aAAiC,OAArBR,MAAMM,MAAM,CAACC,IAAI,CAAC,EAAE;QACnD;IACJ;;AAOO,IAAMV,cAAmD,iBAM1D;QALFY,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACAC,kBAAAA,UACGC;QAJHJ;QACAC;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWhB,UAAU,IAAI,EAAE;QAACiB,MAAM;QAAeN,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAA7EG;IACP,qBACI,qBAACE,WAAK;QAACd,UAAS;QAAQe,SAAQ;QAAKC,WAAWJ,QAAQb,IAAI;QAAEkB,IAAG;QAAKC,IAAG;OAASP;kBAC7ED;;AAGb"}
|
|
@@ -12,6 +12,22 @@ var _plasmaTokens = require("@coveord/plasma-tokens");
|
|
|
12
12
|
var toMantineColor = function(plasmaColor) {
|
|
13
13
|
return Object.values(plasmaColor);
|
|
14
14
|
};
|
|
15
|
+
var navy = toMantineColor(_plasmaTokens.color.primary.navy);
|
|
16
|
+
var red = toMantineColor(_plasmaTokens.color.accent.red);
|
|
17
|
+
var yellow = toMantineColor(_plasmaTokens.color.accent.yellow);
|
|
18
|
+
var teal = toMantineColor(_plasmaTokens.color.accent.teal);
|
|
19
|
+
var lime = [
|
|
20
|
+
_plasmaTokens.color.secondary.lime[0],
|
|
21
|
+
_plasmaTokens.color.secondary.lime[0],
|
|
22
|
+
_plasmaTokens.color.secondary.lime[0],
|
|
23
|
+
_plasmaTokens.color.secondary.lime[0],
|
|
24
|
+
_plasmaTokens.color.secondary.lime[6],
|
|
25
|
+
_plasmaTokens.color.secondary.lime[6],
|
|
26
|
+
_plasmaTokens.color.secondary.lime[6],
|
|
27
|
+
_plasmaTokens.color.secondary.lime[9],
|
|
28
|
+
_plasmaTokens.color.secondary.lime[9],
|
|
29
|
+
_plasmaTokens.color.secondary.lime[9]
|
|
30
|
+
];
|
|
15
31
|
var PlasmaColors = {
|
|
16
32
|
// Primary
|
|
17
33
|
gray: toMantineColor(_plasmaTokens.color.primary.gray),
|
|
@@ -27,27 +43,21 @@ var PlasmaColors = {
|
|
|
27
43
|
_plasmaTokens.color.primary.action[8],
|
|
28
44
|
_plasmaTokens.color.primary.action[9]
|
|
29
45
|
],
|
|
30
|
-
navy:
|
|
46
|
+
navy: navy,
|
|
47
|
+
info: navy,
|
|
31
48
|
// Accent
|
|
32
49
|
blue: toMantineColor(_plasmaTokens.color.accent.blue),
|
|
33
|
-
red:
|
|
34
|
-
|
|
35
|
-
|
|
50
|
+
red: red,
|
|
51
|
+
critical: red,
|
|
52
|
+
teal: teal,
|
|
53
|
+
new: teal,
|
|
54
|
+
yellow: yellow,
|
|
55
|
+
warning: yellow,
|
|
36
56
|
// Secondary
|
|
37
57
|
green: toMantineColor(_plasmaTokens.color.secondary.green),
|
|
38
58
|
indigo: toMantineColor(_plasmaTokens.color.secondary.indigo),
|
|
39
|
-
lime:
|
|
40
|
-
|
|
41
|
-
_plasmaTokens.color.secondary.lime[0],
|
|
42
|
-
_plasmaTokens.color.secondary.lime[0],
|
|
43
|
-
_plasmaTokens.color.secondary.lime[0],
|
|
44
|
-
_plasmaTokens.color.secondary.lime[6],
|
|
45
|
-
_plasmaTokens.color.secondary.lime[6],
|
|
46
|
-
_plasmaTokens.color.secondary.lime[6],
|
|
47
|
-
_plasmaTokens.color.secondary.lime[9],
|
|
48
|
-
_plasmaTokens.color.secondary.lime[9],
|
|
49
|
-
_plasmaTokens.color.secondary.lime[9]
|
|
50
|
-
],
|
|
59
|
+
lime: lime,
|
|
60
|
+
success: lime,
|
|
51
61
|
purple: toMantineColor(_plasmaTokens.color.secondary.purple)
|
|
52
62
|
};
|
|
53
63
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/PlasmaColors.ts"],"sourcesContent":["import {color} from '@coveord/plasma-tokens';\nimport {Tuple} from '@mantine/core';\n\nconst toMantineColor = (plasmaColor: Record<string, string>): Tuple<string, 10> =>\n Object.values(plasmaColor) as Tuple<string, 10>;\n\nexport const PlasmaColors = {\n // Primary\n gray: toMantineColor(color.primary.gray),\n action: [\n color.primary.action[1],\n color.primary.action[1],\n color.primary.action[2],\n color.primary.action[3],\n color.primary.action[4],\n color.primary.action[6],\n color.primary.action[6],\n color.primary.action[8],\n color.primary.action[8],\n color.primary.action[9],\n ] as Tuple<string, 10>,\n navy:
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/PlasmaColors.ts"],"sourcesContent":["import {color} from '@coveord/plasma-tokens';\nimport {Tuple} from '@mantine/core';\n\nconst toMantineColor = (plasmaColor: Record<string, string>): Tuple<string, 10> =>\n Object.values(plasmaColor) as Tuple<string, 10>;\n\nconst navy = toMantineColor(color.primary.navy);\nconst red = toMantineColor(color.accent.red);\nconst yellow = toMantineColor(color.accent.yellow);\nconst teal = toMantineColor(color.accent.teal);\nconst lime = [\n color.secondary.lime[0],\n color.secondary.lime[0],\n color.secondary.lime[0],\n color.secondary.lime[0],\n color.secondary.lime[6],\n color.secondary.lime[6],\n color.secondary.lime[6],\n color.secondary.lime[9],\n color.secondary.lime[9],\n color.secondary.lime[9],\n] as Tuple<string, 10>;\n\nexport const PlasmaColors = {\n // Primary\n gray: toMantineColor(color.primary.gray),\n action: [\n color.primary.action[1],\n color.primary.action[1],\n color.primary.action[2],\n color.primary.action[3],\n color.primary.action[4],\n color.primary.action[6],\n color.primary.action[6],\n color.primary.action[8],\n color.primary.action[8],\n color.primary.action[9],\n ] as Tuple<string, 10>,\n navy,\n info: navy,\n // Accent\n blue: toMantineColor(color.accent.blue),\n red,\n critical: red,\n teal,\n new: teal,\n yellow,\n warning: yellow,\n // Secondary\n green: toMantineColor(color.secondary.green),\n indigo: toMantineColor(color.secondary.indigo),\n lime,\n success: lime,\n purple: toMantineColor(color.secondary.purple),\n};\n"],"names":["PlasmaColors","toMantineColor","plasmaColor","Object","values","navy","color","primary","red","accent","yellow","teal","lime","secondary","gray","action","info","blue","critical","new","warning","green","indigo","success","purple"],"mappings":"AAAA;;;;+BAuBaA;;;eAAAA;;;4BAvBO;AAGpB,IAAMC,iBAAiB,SAACC;WACpBC,OAAOC,MAAM,CAACF;;AAElB,IAAMG,OAAOJ,eAAeK,mBAAK,CAACC,OAAO,CAACF,IAAI;AAC9C,IAAMG,MAAMP,eAAeK,mBAAK,CAACG,MAAM,CAACD,GAAG;AAC3C,IAAME,SAAST,eAAeK,mBAAK,CAACG,MAAM,CAACC,MAAM;AACjD,IAAMC,OAAOV,eAAeK,mBAAK,CAACG,MAAM,CAACE,IAAI;AAC7C,IAAMC,OAAO;IACTN,mBAAK,CAACO,SAAS,CAACD,IAAI,CAAC,EAAE;IACvBN,mBAAK,CAACO,SAAS,CAACD,IA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IACZW,OAAOpB,eAAeK,mBAAK,CAACO,SAAS,CAACQ,KAAK;IAC3CC,QAAQrB,eAAeK,mBAAK,CAACO,SAAS,CAACS,MAAM;IAC7CV,MAAAA;IACAW,SAASX;IACTY,QAAQvB,eAAeK,mBAAK,CAACO,SAAS,CAACW,MAAM;AACjD"}
|
package/dist/cjs/theme/Theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {ArrowHeadRightSize24Px, InfoSize24Px} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {ButtonStylesParams, MantineThemeOverride, ModalStylesParams} from '@mantine/core';\n\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = {\n colorScheme: 'light',\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n spacing: {\n xs: 8,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 40,\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: 500,\n sizes: {\n h1: {fontSize: 48, lineHeight: '56px', fontWeight: undefined},\n h2: {fontSize: 32, lineHeight: '40px', fontWeight: undefined},\n h3: {fontSize: 28, lineHeight: '40px', fontWeight: undefined},\n h4: {fontSize: 24, lineHeight: '32px', fontWeight: undefined},\n h5: {fontSize: 18, lineHeight: '28px', fontWeight: undefined},\n h6: {fontSize: 16, lineHeight: '24px', fontWeight: undefined},\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', color: theme.colors.gray[9]},\n },\n }),\n },\n Button: {\n styles: (theme, params: ButtonStylesParams) => ({\n root: {\n '&': {fontWeight: 400},\n backgroundColor: params.variant === 'outline' ? 'white' : undefined,\n },\n }),\n },\n Modal: {\n styles: (theme, {size, fullScreen}: ModalStylesParams) => ({\n modal: {\n width: fullScreen\n ? undefined\n : theme.fn.size({size, sizes: {xs: 320, sm: 440, md: '45%', lg: 1334, xl: '85%'}}),\n },\n }),\n defaultProps: {\n overlayColor: color.primary.navy[9],\n overlayOpacity: 0.9,\n },\n },\n InputWrapper: {\n defaultProps: {\n withAsterisk: false,\n },\n },\n TextInput: {\n defaultProps: {\n radius: 8,\n },\n styles: (theme) => ({\n description: {\n fontSize: 'inherit',\n paddingBottom: theme.spacing.xs,\n },\n }),\n },\n Tooltip: {\n defaultProps: {\n color: 'navy',\n withArrow: true,\n withinPortal: true,\n },\n },\n Breadcrumbs: {\n defaultProps: {\n separator: <ArrowHeadRightSize24Px height={24} />,\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',\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 },\n};\n"],"names":["plasmaTheme","colorScheme","fontFamily","black","color","primary","gray","defaultRadius","spacing","xs","sm","md","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","undefined","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","Alert","defaultProps","icon","InfoSize24Px","height","styles","title","Title","theme","root","letterSpacing","Button","params","backgroundColor","variant","Modal","size","fullScreen","modal","width","fn","overlayColor","navy","overlayOpacity","InputWrapper","withAsterisk","TextInput","radius","description","paddingBottom","Tooltip","withArrow","withinPortal","Breadcrumbs","separator","ArrowHeadRightSize24Px","Loader","DateRangePicker","cell","textAlign","Anchor","hover","textDecoration","action","Checkbox","List","listStyleType","Radio","labelWrapper","display","alignItems","Popover","shadow"],"mappings":"AAAA;;;;+BAMaA;;;eAAAA;;;;;gCANsC;4BAC/B;4BAGO;AAEpB,IAAMA,cAAoC;IAC7CC,aAAa;IACbC,YAAY;IACZC,OAAOC,mBAAK,CAACC,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,SAAS;QACLC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IACdC,UAAU;QACNb,YAAY;QACZc,YAAY;QACZC,OAAO;YACHC,IAAI;gBAACC,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DC,IAAI;gBAACH,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DE,IAAI;gBAACJ,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DG,IAAI;gBAACL,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DI,IAAI;gBAACN,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DK,IAAI;gBAACP,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;QAChE;IACJ;IACAM,SAAS;QACLlB,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACR;IACAe,QAAQC,0BAAY;IACpBC,YAAY;QACRC,OA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AAW,qBAACC,wCAAsB;oBAAC/B,QAAQ;;YAC/C;QACJ;QACAgC,QAAQ;YACJnC,cAAc;gBACVa,SAAS;gBACTzC,OAAO;YACX;QACJ;QACAgE,iBAAiB;YACbhC,QAAQ;gBACJiC,MAAM;oBACFC,WAAW;gBACf;YACJ;QACJ;QACAC,QAAQ;YACJvC,cAAc;gBACV5B,OAAO;YACX;YACAgC,QAAQ,SAACG;uBAAW;oBAChBC,MAAM,kBACCD,MAAMY,EAAE,CAACqB,KAAK,CAAC;wBACdC,gBAAgB;wBAChBrE,OAAOmC,MAAMX,MAAM,CAAC8C,MAAM,CAAC,EAAE;oBACjC;gBAER;;QACJ;QACAC,UAAU;YACN3C,cAAc;gBACV0B,QAAQ;YACZ;QACJ;QACAkB,MAAM;YACFxC,QAAQ;uBAAO;oBACXI,MAAM;wBACFqC,eAAe;oBACnB;gBACJ;;QACJ;QACAC,OAAO;YACH1C,QAAQ;gBACJ2C,cAAc;oBACVC,SAAS;oBACTC,YAAY;gBAChB;YACJ;QACJ;QACAC,SAAS;YACLlD,cAAc;gBACVmD,QAAQ;gBACRrB,WAAW,IAAI;YACnB;QACJ;IACJ;AACJ"}
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {ArrowHeadRightSize24Px, InfoSize24Px} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {ButtonStylesParams, MantineThemeOverride, ModalStylesParams} from '@mantine/core';\n\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = {\n colorScheme: 'light',\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n spacing: {\n xs: 8,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 40,\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: 500,\n sizes: {\n h1: {fontSize: 48, lineHeight: '56px', fontWeight: undefined},\n h2: {fontSize: 32, lineHeight: '40px', fontWeight: undefined},\n h3: {fontSize: 28, lineHeight: '40px', fontWeight: undefined},\n h4: {fontSize: 24, lineHeight: '32px', fontWeight: undefined},\n h5: {fontSize: 18, lineHeight: '28px', fontWeight: undefined},\n h6: {fontSize: 16, lineHeight: '24px', fontWeight: undefined},\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', color: theme.colors.gray[9]},\n },\n }),\n },\n Button: {\n styles: (theme, params: ButtonStylesParams) => ({\n root: {\n '&': {fontWeight: 400},\n backgroundColor: params.variant === 'outline' ? 'white' : undefined,\n },\n }),\n },\n Modal: {\n styles: (theme, {size, fullScreen}: ModalStylesParams) => ({\n modal: {\n width: fullScreen\n ? undefined\n : theme.fn.size({size, sizes: {xs: 320, sm: 440, md: '45%', lg: 1334, xl: '85%'}}),\n },\n }),\n defaultProps: {\n overlayColor: color.primary.navy[9],\n overlayOpacity: 0.9,\n },\n },\n InputWrapper: {\n defaultProps: {\n withAsterisk: false,\n },\n },\n TextInput: {\n defaultProps: {\n radius: 8,\n },\n styles: (theme) => ({\n description: {\n fontSize: 'inherit',\n paddingBottom: theme.spacing.xs,\n },\n }),\n },\n Tooltip: {\n defaultProps: {\n color: 'navy',\n withArrow: true,\n withinPortal: true,\n },\n },\n Breadcrumbs: {\n defaultProps: {\n separator: <ArrowHeadRightSize24Px height={24} />,\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',\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 },\n};\n"],"names":["plasmaTheme","colorScheme","fontFamily","black","color","primary","gray","defaultRadius","spacing","xs","sm","md","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","undefined","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","Alert","defaultProps","icon","InfoSize24Px","height","styles","title","Title","theme","root","letterSpacing","Button","params","backgroundColor","variant","Modal","size","fullScreen","modal","width","fn","overlayColor","navy","overlayOpacity","InputWrapper","withAsterisk","TextInput","radius","description","paddingBottom","Tooltip","withArrow","withinPortal","Breadcrumbs","separator","ArrowHeadRightSize24Px","Loader","DateRangePicker","cell","textAlign","Anchor","hover","textDecoration","action","Checkbox","List","listStyleType","Radio","labelWrapper","display","alignItems","Popover","shadow","Badge","textTransform","padding"],"mappings":"AAAA;;;;+BAMaA;;;eAAAA;;;;;gCANsC;4BAC/B;4BAGO;AAEpB,IAAMA,cAAoC;IAC7CC,aAAa;IACbC,YAAY;IACZC,OAAOC,mBAAK,CAACC,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,SAAS;QACLC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IAC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gBACVmD,QAAQ;gBACRrB,WAAW,IAAI;YACnB;QACJ;QACAsB,OAAO;YACHhD,QAAQ;gBACJI,MAAM;oBACF6C,eAAe;oBACfC,SAAS;oBACTtE,YAAY;gBAChB;YACJ;QACJ;IACJ;AACJ"}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { DefaultProps, Selectors } from '@mantine/core';
|
|
2
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
3
|
+
declare const useStyles: (params: void, options?: import("@mantine/core").UseStylesOptions<"root">) => {
|
|
4
|
+
classes: Record<"root", string>;
|
|
5
|
+
cx: (...args: any) => string;
|
|
6
|
+
theme: import("@mantine/core").MantineTheme;
|
|
7
|
+
};
|
|
8
|
+
declare type TableHeaderStylesNames = Selectors<typeof useStyles>;
|
|
9
|
+
interface TableHeaderProps extends DefaultProps<TableHeaderStylesNames> {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const TableHeader: FunctionComponent<TableHeaderProps>;
|
|
13
|
+
export {};
|
|
3
14
|
//# sourceMappingURL=TableHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAS,SAAS,EAAC,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAC,iBAAiB,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAEnD,QAAA,MAAM,SAAS;;;;CAQZ,CAAC;AAEJ,aAAK,sBAAsB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAC1D,UAAU,gBAAiB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IAEnE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AACD,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CAa3D,CAAC"}
|
|
@@ -2,13 +2,18 @@ export declare const PlasmaColors: {
|
|
|
2
2
|
gray: [string, string, string, string, string, string, string, string, string, string];
|
|
3
3
|
action: [string, string, string, string, string, string, string, string, string, string];
|
|
4
4
|
navy: [string, string, string, string, string, string, string, string, string, string];
|
|
5
|
+
info: [string, string, string, string, string, string, string, string, string, string];
|
|
5
6
|
blue: [string, string, string, string, string, string, string, string, string, string];
|
|
6
7
|
red: [string, string, string, string, string, string, string, string, string, string];
|
|
8
|
+
critical: [string, string, string, string, string, string, string, string, string, string];
|
|
7
9
|
teal: [string, string, string, string, string, string, string, string, string, string];
|
|
10
|
+
new: [string, string, string, string, string, string, string, string, string, string];
|
|
8
11
|
yellow: [string, string, string, string, string, string, string, string, string, string];
|
|
12
|
+
warning: [string, string, string, string, string, string, string, string, string, string];
|
|
9
13
|
green: [string, string, string, string, string, string, string, string, string, string];
|
|
10
14
|
indigo: [string, string, string, string, string, string, string, string, string, string];
|
|
11
15
|
lime: [string, string, string, string, string, string, string, string, string, string];
|
|
16
|
+
success: [string, string, string, string, string, string, string, string, string, string];
|
|
12
17
|
purple: [string, string, string, string, string, string, string, string, string, string];
|
|
13
18
|
};
|
|
14
19
|
//# sourceMappingURL=PlasmaColors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlasmaColors.d.ts","sourceRoot":"","sources":["../../../src/theme/PlasmaColors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlasmaColors.d.ts","sourceRoot":"","sources":["../../../src/theme/PlasmaColors.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CA+BxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqB,oBAAoB,EAAoB,MAAM,eAAe,CAAC;AAI1F,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqB,oBAAoB,EAAoB,MAAM,eAAe,CAAC;AAI1F,eAAO,MAAM,WAAW,EAAE,oBAmKzB,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
1
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
5
|
import { createStyles, Group } from "@mantine/core";
|
|
3
6
|
var useStyles = createStyles(function(theme) {
|
|
4
7
|
return {
|
|
5
|
-
|
|
8
|
+
root: {
|
|
6
9
|
position: "sticky",
|
|
7
10
|
top: 0,
|
|
8
11
|
zIndex: 13,
|
|
@@ -11,17 +14,28 @@ var useStyles = createStyles(function(theme) {
|
|
|
11
14
|
}
|
|
12
15
|
};
|
|
13
16
|
});
|
|
14
|
-
export var TableHeader = function(
|
|
15
|
-
var children =
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
export var TableHeader = function(_param) {
|
|
18
|
+
var classNames = _param.classNames, styles = _param.styles, unstyled = _param.unstyled, children = _param.children, others = _object_without_properties(_param, [
|
|
19
|
+
"classNames",
|
|
20
|
+
"styles",
|
|
21
|
+
"unstyled",
|
|
22
|
+
"children"
|
|
23
|
+
]);
|
|
24
|
+
var classes = useStyles(null, {
|
|
25
|
+
name: "TableHeader",
|
|
26
|
+
classNames: classNames,
|
|
27
|
+
styles: styles,
|
|
28
|
+
unstyled: unstyled
|
|
29
|
+
}).classes;
|
|
30
|
+
return /*#__PURE__*/ _jsx(Group, _object_spread_props(_object_spread({
|
|
18
31
|
position: "right",
|
|
19
32
|
spacing: "lg",
|
|
20
|
-
className: classes.
|
|
33
|
+
className: classes.root,
|
|
21
34
|
px: "md",
|
|
22
|
-
py: "sm"
|
|
35
|
+
py: "sm"
|
|
36
|
+
}, others), {
|
|
23
37
|
children: children
|
|
24
|
-
});
|
|
38
|
+
}));
|
|
25
39
|
};
|
|
26
40
|
|
|
27
41
|
//# sourceMappingURL=TableHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/table/TableHeader.tsx"],"sourcesContent":["import {createStyles, Group} from '@mantine/core';\nimport {FunctionComponent,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/table/TableHeader.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Group, Selectors} from '@mantine/core';\nimport {FunctionComponent, ReactNode} from 'react';\n\nconst useStyles = createStyles((theme) => ({\n root: {\n position: 'sticky',\n top: 0,\n zIndex: 13, // skeleton is 11\n backgroundColor: theme.colors.gray[1],\n borderBottom: `1px solid ${theme.colors.gray[4]}`,\n },\n}));\n\ntype TableHeaderStylesNames = Selectors<typeof useStyles>;\ninterface TableHeaderProps extends DefaultProps<TableHeaderStylesNames> {\n /* Children of header (ie: actions, datepicker, etc.) */\n children?: ReactNode;\n}\nexport const TableHeader: FunctionComponent<TableHeaderProps> = ({\n classNames,\n styles,\n unstyled,\n children,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TableHeader', classNames, styles, unstyled});\n return (\n <Group position=\"right\" spacing=\"lg\" className={classes.root} px=\"md\" py=\"sm\" {...others}>\n {children}\n </Group>\n );\n};\n"],"names":["createStyles","Group","useStyles","theme","root","position","top","zIndex","backgroundColor","colors","gray","borderBottom","TableHeader","classNames","styles","unstyled","children","others","classes","name","spacing","className","px","py"],"mappings":"AAAA;;;;AAAA,SAAQA,YAAY,EAAgBC,KAAK,QAAkB,gBAAgB;AAG3E,IAAMC,YAAYF,aAAa,SAACG;WAAW;QACvCC,MAAM;YACFC,UAAU;YACVC,KAAK;YACLC,QAAQ;YACRC,iBAAiBL,MAAMM,MAAM,CAACC,IAAI,CAAC,EAAE;YACrCC,cAAc,AAAC,aAAiC,OAArBR,MAAMM,MAAM,CAACC,IAAI,CAAC,EAAE;QACnD;IACJ;;AAOA,OAAO,IAAME,cAAmD,iBAM1D;QALFC,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACAC,kBAAAA,UACGC;QAJHJ;QACAC;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWhB,UAAU,IAAI,EAAE;QAACiB,MAAM;QAAeN,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAA7EG;IACP,qBACI,KAACjB;QAAMI,UAAS;QAAQe,SAAQ;QAAKC,WAAWH,QAAQd,IAAI;QAAEkB,IAAG;QAAKC,IAAG;OAASN;kBAC7ED;;AAGb,EAAE"}
|
|
@@ -2,6 +2,22 @@ import { color } from "@coveord/plasma-tokens";
|
|
|
2
2
|
var toMantineColor = function(plasmaColor) {
|
|
3
3
|
return Object.values(plasmaColor);
|
|
4
4
|
};
|
|
5
|
+
var navy = toMantineColor(color.primary.navy);
|
|
6
|
+
var red = toMantineColor(color.accent.red);
|
|
7
|
+
var yellow = toMantineColor(color.accent.yellow);
|
|
8
|
+
var teal = toMantineColor(color.accent.teal);
|
|
9
|
+
var lime = [
|
|
10
|
+
color.secondary.lime[0],
|
|
11
|
+
color.secondary.lime[0],
|
|
12
|
+
color.secondary.lime[0],
|
|
13
|
+
color.secondary.lime[0],
|
|
14
|
+
color.secondary.lime[6],
|
|
15
|
+
color.secondary.lime[6],
|
|
16
|
+
color.secondary.lime[6],
|
|
17
|
+
color.secondary.lime[9],
|
|
18
|
+
color.secondary.lime[9],
|
|
19
|
+
color.secondary.lime[9]
|
|
20
|
+
];
|
|
5
21
|
export var PlasmaColors = {
|
|
6
22
|
// Primary
|
|
7
23
|
gray: toMantineColor(color.primary.gray),
|
|
@@ -17,27 +33,21 @@ export var PlasmaColors = {
|
|
|
17
33
|
color.primary.action[8],
|
|
18
34
|
color.primary.action[9]
|
|
19
35
|
],
|
|
20
|
-
navy:
|
|
36
|
+
navy: navy,
|
|
37
|
+
info: navy,
|
|
21
38
|
// Accent
|
|
22
39
|
blue: toMantineColor(color.accent.blue),
|
|
23
|
-
red:
|
|
24
|
-
|
|
25
|
-
|
|
40
|
+
red: red,
|
|
41
|
+
critical: red,
|
|
42
|
+
teal: teal,
|
|
43
|
+
new: teal,
|
|
44
|
+
yellow: yellow,
|
|
45
|
+
warning: yellow,
|
|
26
46
|
// Secondary
|
|
27
47
|
green: toMantineColor(color.secondary.green),
|
|
28
48
|
indigo: toMantineColor(color.secondary.indigo),
|
|
29
|
-
lime:
|
|
30
|
-
|
|
31
|
-
color.secondary.lime[0],
|
|
32
|
-
color.secondary.lime[0],
|
|
33
|
-
color.secondary.lime[0],
|
|
34
|
-
color.secondary.lime[6],
|
|
35
|
-
color.secondary.lime[6],
|
|
36
|
-
color.secondary.lime[6],
|
|
37
|
-
color.secondary.lime[9],
|
|
38
|
-
color.secondary.lime[9],
|
|
39
|
-
color.secondary.lime[9]
|
|
40
|
-
],
|
|
49
|
+
lime: lime,
|
|
50
|
+
success: lime,
|
|
41
51
|
purple: toMantineColor(color.secondary.purple)
|
|
42
52
|
};
|
|
43
53
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/PlasmaColors.ts"],"sourcesContent":["import {color} from '@coveord/plasma-tokens';\nimport {Tuple} from '@mantine/core';\n\nconst toMantineColor = (plasmaColor: Record<string, string>): Tuple<string, 10> =>\n Object.values(plasmaColor) as Tuple<string, 10>;\n\nexport const PlasmaColors = {\n // Primary\n gray: toMantineColor(color.primary.gray),\n action: [\n color.primary.action[1],\n color.primary.action[1],\n color.primary.action[2],\n color.primary.action[3],\n color.primary.action[4],\n color.primary.action[6],\n color.primary.action[6],\n color.primary.action[8],\n color.primary.action[8],\n color.primary.action[9],\n ] as Tuple<string, 10>,\n navy:
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/PlasmaColors.ts"],"sourcesContent":["import {color} from '@coveord/plasma-tokens';\nimport {Tuple} from '@mantine/core';\n\nconst toMantineColor = (plasmaColor: Record<string, string>): Tuple<string, 10> =>\n Object.values(plasmaColor) as Tuple<string, 10>;\n\nconst navy = toMantineColor(color.primary.navy);\nconst red = toMantineColor(color.accent.red);\nconst yellow = toMantineColor(color.accent.yellow);\nconst teal = toMantineColor(color.accent.teal);\nconst lime = [\n color.secondary.lime[0],\n color.secondary.lime[0],\n color.secondary.lime[0],\n color.secondary.lime[0],\n color.secondary.lime[6],\n color.secondary.lime[6],\n color.secondary.lime[6],\n color.secondary.lime[9],\n color.secondary.lime[9],\n color.secondary.lime[9],\n] as Tuple<string, 10>;\n\nexport const PlasmaColors = {\n // Primary\n gray: toMantineColor(color.primary.gray),\n action: [\n color.primary.action[1],\n color.primary.action[1],\n color.primary.action[2],\n color.primary.action[3],\n color.primary.action[4],\n color.primary.action[6],\n color.primary.action[6],\n color.primary.action[8],\n color.primary.action[8],\n color.primary.action[9],\n ] as Tuple<string, 10>,\n navy,\n info: navy,\n // Accent\n blue: toMantineColor(color.accent.blue),\n red,\n critical: red,\n teal,\n new: teal,\n yellow,\n warning: yellow,\n // Secondary\n green: toMantineColor(color.secondary.green),\n indigo: toMantineColor(color.secondary.indigo),\n lime,\n success: lime,\n purple: toMantineColor(color.secondary.purple),\n};\n"],"names":["color","toMantineColor","plasmaColor","Object","values","navy","primary","red","accent","yellow","teal","lime","secondary","PlasmaColors","gray","action","info","blue","critical","new","warning","green","indigo","success","purple"],"mappings":"AAAA,SAAQA,KAAK,QAAO,yBAAyB;AAG7C,IAAMC,iBAAiB,SAACC;WACpBC,OAAOC,MAAM,CAACF;;AAElB,IAAMG,OAAOJ,eAAeD,MAAMM,OAAO,CAACD,IAAI;AAC9C,IAAME,MAAMN,eAAeD,MAAMQ,MAAM,CAACD,GAAG;AAC3C,IAAME,SAASR,eAAeD,MAAMQ,MAAM,CAACC,MAA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W,SAASX;IACT,YAAY;IACZY,OAAOpB,eAAeD,MAAMY,SAAS,CAACS,KAAK;IAC3CC,QAAQrB,eAAeD,MAAMY,SAAS,CAACU,MAAM;IAC7CX,MAAAA;IACAY,SAASZ;IACTa,QAAQvB,eAAeD,MAAMY,SAAS,CAACY,MAAM;AACjD,EAAE"}
|
package/dist/esm/theme/Theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {ArrowHeadRightSize24Px, InfoSize24Px} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {ButtonStylesParams, MantineThemeOverride, ModalStylesParams} from '@mantine/core';\n\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = {\n colorScheme: 'light',\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n spacing: {\n xs: 8,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 40,\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: 500,\n sizes: {\n h1: {fontSize: 48, lineHeight: '56px', fontWeight: undefined},\n h2: {fontSize: 32, lineHeight: '40px', fontWeight: undefined},\n h3: {fontSize: 28, lineHeight: '40px', fontWeight: undefined},\n h4: {fontSize: 24, lineHeight: '32px', fontWeight: undefined},\n h5: {fontSize: 18, lineHeight: '28px', fontWeight: undefined},\n h6: {fontSize: 16, lineHeight: '24px', fontWeight: undefined},\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', color: theme.colors.gray[9]},\n },\n }),\n },\n Button: {\n styles: (theme, params: ButtonStylesParams) => ({\n root: {\n '&': {fontWeight: 400},\n backgroundColor: params.variant === 'outline' ? 'white' : undefined,\n },\n }),\n },\n Modal: {\n styles: (theme, {size, fullScreen}: ModalStylesParams) => ({\n modal: {\n width: fullScreen\n ? undefined\n : theme.fn.size({size, sizes: {xs: 320, sm: 440, md: '45%', lg: 1334, xl: '85%'}}),\n },\n }),\n defaultProps: {\n overlayColor: color.primary.navy[9],\n overlayOpacity: 0.9,\n },\n },\n InputWrapper: {\n defaultProps: {\n withAsterisk: false,\n },\n },\n TextInput: {\n defaultProps: {\n radius: 8,\n },\n styles: (theme) => ({\n description: {\n fontSize: 'inherit',\n paddingBottom: theme.spacing.xs,\n },\n }),\n },\n Tooltip: {\n defaultProps: {\n color: 'navy',\n withArrow: true,\n withinPortal: true,\n },\n },\n Breadcrumbs: {\n defaultProps: {\n separator: <ArrowHeadRightSize24Px height={24} />,\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',\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 },\n};\n"],"names":["ArrowHeadRightSize24Px","InfoSize24Px","color","PlasmaColors","plasmaTheme","colorScheme","fontFamily","black","primary","gray","defaultRadius","spacing","xs","sm","md","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","undefined","h2","h3","h4","h5","h6","shadows","colors","components","Alert","defaultProps","icon","height","styles","title","Title","theme","root","letterSpacing","Button","params","backgroundColor","variant","Modal","size","fullScreen","modal","width","fn","overlayColor","navy","overlayOpacity","InputWrapper","withAsterisk","TextInput","radius","description","paddingBottom","Tooltip","withArrow","withinPortal","Breadcrumbs","separator","Loader","DateRangePicker","cell","textAlign","Anchor","hover","textDecoration","action","Checkbox","List","listStyleType","Radio","labelWrapper","display","alignItems","Popover","shadow"],"mappings":"AAAA;;AAAA,SAAQA,sBAAsB,EAAEC,YAAY,QAAO,8BAA8B;AACjF,SAAQC,KAAK,QAAO,yBAAyB;AAG7C,SAAQC,YAAY,QAAO,iBAAiB;AAE5C,OAAO,IAAMC,cAAoC;IAC7CC,aAAa;IACbC,YAAY;IACZC,OAAOL,MAAMM,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,SAAS;QACLC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IACdC,UAAU;QACNZ,YAAY;QACZa,YAAY;QACZC,OAAO;YACHC,IAAI;gBAACC,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DC,IAAI;gBAACH,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DE,IAAI;gBAACJ,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DG,IAAI;gBAACL,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DI,IAAI;gBAACN,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DK,IAAI;gBAACP,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;QAChE;IACJ;IACAM,SAAS;QACLlB,IAAI;QACJC,IAAI;QACJC,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ACfC,cAAc,IAAI;YACtB;QACJ;QACAC,aAAa;YACT/B,cAAc;gBACVgC,yBAAW,KAAClE;oBAAuBoC,QAAQ;;YAC/C;QACJ;QACA+B,QAAQ;YACJjC,cAAc;gBACVY,SAAS;gBACT5C,OAAO;YACX;QACJ;QACAkE,iBAAiB;YACb/B,QAAQ;gBACJgC,MAAM;oBACFC,WAAW;gBACf;YACJ;QACJ;QACAC,QAAQ;YACJrC,cAAc;gBACVhC,OAAO;YACX;YACAmC,QAAQ,SAACG;uBAAW;oBAChBC,MAAM,mBACCD,MAAMY,EAAE,CAACoB,KAAK,CAAC;wBACdC,gBAAgB;wBAChBvE,OAAOsC,MAAMT,MAAM,CAAC2C,MAAM,CAAC,EAAE;oBACjC;gBAER;;QACJ;QACAC,UAAU;YACNzC,cAAc;gBACVyB,QAAQ;YACZ;QACJ;QACAiB,MAAM;YACFvC,QAAQ;uBAAO;oBACXI,MAAM;wBACFoC,eAAe;oBACnB;gBACJ;;QACJ;QACAC,OAAO;YACHzC,QAAQ;gBACJ0C,cAAc;oBACVC,SAAS;oBACTC,YAAY;gBAChB;YACJ;QACJ;QACAC,SAAS;YACLhD,cAAc;gBACViD,QAAQ;gBACRpB,WAAW,IAAI;YACnB;QACJ;IACJ;AACJ,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {ArrowHeadRightSize24Px, InfoSize24Px} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {ButtonStylesParams, MantineThemeOverride, ModalStylesParams} from '@mantine/core';\n\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = {\n colorScheme: 'light',\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n spacing: {\n xs: 8,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 40,\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: 500,\n sizes: {\n h1: {fontSize: 48, lineHeight: '56px', fontWeight: undefined},\n h2: {fontSize: 32, lineHeight: '40px', fontWeight: undefined},\n h3: {fontSize: 28, lineHeight: '40px', fontWeight: undefined},\n h4: {fontSize: 24, lineHeight: '32px', fontWeight: undefined},\n h5: {fontSize: 18, lineHeight: '28px', fontWeight: undefined},\n h6: {fontSize: 16, lineHeight: '24px', fontWeight: undefined},\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', color: theme.colors.gray[9]},\n },\n }),\n },\n Button: {\n styles: (theme, params: ButtonStylesParams) => ({\n root: {\n '&': {fontWeight: 400},\n backgroundColor: params.variant === 'outline' ? 'white' : undefined,\n },\n }),\n },\n Modal: {\n styles: (theme, {size, fullScreen}: ModalStylesParams) => ({\n modal: {\n width: fullScreen\n ? undefined\n : theme.fn.size({size, sizes: {xs: 320, sm: 440, md: '45%', lg: 1334, xl: '85%'}}),\n },\n }),\n defaultProps: {\n overlayColor: color.primary.navy[9],\n overlayOpacity: 0.9,\n },\n },\n InputWrapper: {\n defaultProps: {\n withAsterisk: false,\n },\n },\n TextInput: {\n defaultProps: {\n radius: 8,\n },\n styles: (theme) => ({\n description: {\n fontSize: 'inherit',\n paddingBottom: theme.spacing.xs,\n },\n }),\n },\n Tooltip: {\n defaultProps: {\n color: 'navy',\n withArrow: true,\n withinPortal: true,\n },\n },\n Breadcrumbs: {\n defaultProps: {\n separator: <ArrowHeadRightSize24Px height={24} />,\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',\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 },\n};\n"],"names":["ArrowHeadRightSize24Px","InfoSize24Px","color","PlasmaColors","plasmaTheme","colorScheme","fontFamily","black","primary","gray","defaultRadius","spacing","xs","sm","md","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","undefined","h2","h3","h4","h5","h6","shadows","colors","components","Alert","defaultProps","icon","height","styles","title","Title","theme","root","letterSpacing","Button","params","backgroundColor","variant","Modal","size","fullScreen","modal","width","fn","overlayColor","navy","overlayOpacity","InputWrapper","withAsterisk","TextInput","radius","description","paddingBottom","Tooltip","withArrow","withinPortal","Breadcrumbs","separator","Loader","DateRangePicker","cell","textAlign","Anchor","hover","textDecoration","action","Checkbox","List","listStyleType","Radio","labelWrapper","display","alignItems","Popover","shadow","Badge","textTransform","padding"],"mappings":"AAAA;;AAAA,SAAQA,sBAAsB,EAAEC,YAAY,QAAO,8BAA8B;AACjF,SAAQC,KAAK,QAAO,yBAAyB;AAG7C,SAAQC,YAAY,QAAO,iBAAiB;AAE5C,OAAO,IAAMC,cAAoC;IAC7CC,aAAa;IACbC,YAAY;IACZC,OAAOL,MAAMM,OAA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;QACAC,OAAO;YACHzC,QAAQ;gBACJ0C,cAAc;oBACVC,SAAS;oBACTC,YAAY;gBAChB;YACJ;QACJ;QACAC,SAAS;YACLhD,cAAc;gBACViD,QAAQ;gBACRpB,WAAW,IAAI;YACnB;QACJ;QACAqB,OAAO;YACH/C,QAAQ;gBACJI,MAAM;oBACF4C,eAAe;oBACfC,SAAS;oBACTnE,YAAY;gBAChB;YACJ;QACJ;IACJ;AACJ,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {createStyles, Group} from '@mantine/core';
|
|
2
|
-
import {FunctionComponent,
|
|
1
|
+
import {createStyles, DefaultProps, Group, Selectors} from '@mantine/core';
|
|
2
|
+
import {FunctionComponent, ReactNode} from 'react';
|
|
3
3
|
|
|
4
4
|
const useStyles = createStyles((theme) => ({
|
|
5
|
-
|
|
5
|
+
root: {
|
|
6
6
|
position: 'sticky',
|
|
7
7
|
top: 0,
|
|
8
8
|
zIndex: 13, // skeleton is 11
|
|
@@ -11,10 +11,21 @@ const useStyles = createStyles((theme) => ({
|
|
|
11
11
|
},
|
|
12
12
|
}));
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
type TableHeaderStylesNames = Selectors<typeof useStyles>;
|
|
15
|
+
interface TableHeaderProps extends DefaultProps<TableHeaderStylesNames> {
|
|
16
|
+
/* Children of header (ie: actions, datepicker, etc.) */
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export const TableHeader: FunctionComponent<TableHeaderProps> = ({
|
|
20
|
+
classNames,
|
|
21
|
+
styles,
|
|
22
|
+
unstyled,
|
|
23
|
+
children,
|
|
24
|
+
...others
|
|
25
|
+
}) => {
|
|
26
|
+
const {classes} = useStyles(null, {name: 'TableHeader', classNames, styles, unstyled});
|
|
16
27
|
return (
|
|
17
|
-
<Group position="right" spacing="lg" className={classes.
|
|
28
|
+
<Group position="right" spacing="lg" className={classes.root} px="md" py="sm" {...others}>
|
|
18
29
|
{children}
|
|
19
30
|
</Group>
|
|
20
31
|
);
|
|
@@ -4,6 +4,23 @@ import {Tuple} from '@mantine/core';
|
|
|
4
4
|
const toMantineColor = (plasmaColor: Record<string, string>): Tuple<string, 10> =>
|
|
5
5
|
Object.values(plasmaColor) as Tuple<string, 10>;
|
|
6
6
|
|
|
7
|
+
const navy = toMantineColor(color.primary.navy);
|
|
8
|
+
const red = toMantineColor(color.accent.red);
|
|
9
|
+
const yellow = toMantineColor(color.accent.yellow);
|
|
10
|
+
const teal = toMantineColor(color.accent.teal);
|
|
11
|
+
const lime = [
|
|
12
|
+
color.secondary.lime[0],
|
|
13
|
+
color.secondary.lime[0],
|
|
14
|
+
color.secondary.lime[0],
|
|
15
|
+
color.secondary.lime[0],
|
|
16
|
+
color.secondary.lime[6],
|
|
17
|
+
color.secondary.lime[6],
|
|
18
|
+
color.secondary.lime[6],
|
|
19
|
+
color.secondary.lime[9],
|
|
20
|
+
color.secondary.lime[9],
|
|
21
|
+
color.secondary.lime[9],
|
|
22
|
+
] as Tuple<string, 10>;
|
|
23
|
+
|
|
7
24
|
export const PlasmaColors = {
|
|
8
25
|
// Primary
|
|
9
26
|
gray: toMantineColor(color.primary.gray),
|
|
@@ -19,26 +36,20 @@ export const PlasmaColors = {
|
|
|
19
36
|
color.primary.action[8],
|
|
20
37
|
color.primary.action[9],
|
|
21
38
|
] as Tuple<string, 10>,
|
|
22
|
-
navy
|
|
39
|
+
navy,
|
|
40
|
+
info: navy,
|
|
23
41
|
// Accent
|
|
24
42
|
blue: toMantineColor(color.accent.blue),
|
|
25
|
-
red
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
red,
|
|
44
|
+
critical: red,
|
|
45
|
+
teal,
|
|
46
|
+
new: teal,
|
|
47
|
+
yellow,
|
|
48
|
+
warning: yellow,
|
|
28
49
|
// Secondary
|
|
29
50
|
green: toMantineColor(color.secondary.green),
|
|
30
51
|
indigo: toMantineColor(color.secondary.indigo),
|
|
31
|
-
lime
|
|
32
|
-
|
|
33
|
-
color.secondary.lime[0],
|
|
34
|
-
color.secondary.lime[0],
|
|
35
|
-
color.secondary.lime[0],
|
|
36
|
-
color.secondary.lime[6],
|
|
37
|
-
color.secondary.lime[6],
|
|
38
|
-
color.secondary.lime[6],
|
|
39
|
-
color.secondary.lime[9],
|
|
40
|
-
color.secondary.lime[9],
|
|
41
|
-
color.secondary.lime[9],
|
|
42
|
-
] as Tuple<string, 10>,
|
|
52
|
+
lime,
|
|
53
|
+
success: lime,
|
|
43
54
|
purple: toMantineColor(color.secondary.purple),
|
|
44
55
|
};
|
package/src/theme/Theme.tsx
CHANGED