@coveord/plasma-mantine 52.14.0 → 52.15.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 +31 -31
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/prompt/Prompt.d.ts.map +1 -1
- package/dist/cjs/components/prompt/Prompt.js +2 -1
- package/dist/cjs/components/prompt/Prompt.js.map +1 -1
- package/dist/cjs/components/table/TablePredicate.d.ts +1 -0
- package/dist/cjs/components/table/TablePredicate.d.ts.map +1 -1
- package/dist/cjs/components/table/TablePredicate.js +4 -2
- package/dist/cjs/components/table/TablePredicate.js.map +1 -1
- package/dist/esm/components/prompt/Prompt.d.ts.map +1 -1
- package/dist/esm/components/prompt/Prompt.js +2 -1
- package/dist/esm/components/prompt/Prompt.js.map +1 -1
- package/dist/esm/components/table/TablePredicate.d.ts +1 -0
- package/dist/esm/components/table/TablePredicate.d.ts.map +1 -1
- package/dist/esm/components/table/TablePredicate.js +4 -2
- package/dist/esm/components/table/TablePredicate.js.map +1 -1
- package/package.json +22 -22
- package/src/components/button/__tests__/Button.spec.tsx +7 -5
- package/src/components/prompt/Prompt.tsx +1 -0
- package/src/components/table/TablePredicate.tsx +2 -0
- package/src/components/table/__tests__/Th.spec.tsx +4 -3
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;IACtD,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,UAqBpB,CAAC"}
|
|
@@ -33,7 +33,8 @@ var useStyles = (0, _core.createStyles)(function(theme) {
|
|
|
33
33
|
width: "100%",
|
|
34
34
|
borderBottom: "1px solid ".concat(theme.colors.gray[3]),
|
|
35
35
|
fontSize: theme.headings.sizes.h3.fontSize,
|
|
36
|
-
lineHeight: theme.headings.sizes.h3.lineHeight
|
|
36
|
+
lineHeight: theme.headings.sizes.h3.lineHeight,
|
|
37
|
+
overflowWrap: "anywhere"
|
|
37
38
|
},
|
|
38
39
|
success: {
|
|
39
40
|
backgroundColor: theme.colors.lime[6],
|
|
@@ -1 +1 @@
|
|
|
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 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 /**\n * Controls prompt appearance\n *\n * @default \"info\"\n */\n variant?: '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 = 'info', ...otherProps}) => {\n const {classes, cx} = useStyles();\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: classes.whiteClose,\n body: classes.body,\n modal: classes.modalType,\n title: classes.title,\n };\n\n return (\n <Modal variant=\"prompt\" padding={0} classNames={classNames} 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","success","backgroundColor","lime","color","primary","pureWhite","warning","yellow","critical","red","info","navy","whiteClose","title","children","variant","otherProps","classes","cx","convertedChildren","Children","toArray","otherChildren","filter","child","type","PromptFooter","footer","find","classNames","close","modal","Modal","size","div","className","Footer"],"mappings":";;;;+
|
|
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 overflowWrap: 'anywhere',\n },\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 /**\n * Controls prompt appearance\n *\n * @default \"info\"\n */\n variant?: '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 = 'info', ...otherProps}) => {\n const {classes, cx} = useStyles();\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: classes.whiteClose,\n body: classes.body,\n modal: classes.modalType,\n title: classes.title,\n };\n\n return (\n <Modal variant=\"prompt\" padding={0} classNames={classNames} 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","overflowWrap","success","backgroundColor","lime","color","primary","pureWhite","warning","yellow","critical","red","info","navy","whiteClose","title","children","variant","otherProps","classes","cx","convertedChildren","Children","toArray","otherChildren","filter","child","type","PromptFooter","footer","find","classNames","close","modal","Modal","size","div","className","Footer"],"mappings":";;;;+BAgDaA;;;eAAAA;;;;;;;4BAhDO;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;YAC9CC,cAAc;QAClB;QACAC,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;YACpCN,OAAOA,mBAAK,CAACC,OAAO,CAACC,SAAS;QAClC;QACAK,MAAM;YAACT,iBAAiBtB,MAAMa,MAAM,CAACmB,IAAI,CAAC,EAAE;YAAER,OAAOA,mBAAK,CAACC,OAAO,CAACC,SAAS;QAAA;QAC5EO,YAAY;YAACT,OAAOA,mBAAK,CAACC,OAAO,CAACC,SAAS;YAAE,WAAW;gBAACJ,iBAAiB;YAAa;QAAC;QACxFY,OAAO;YACHV,OAAOA,mBAAK,CAACC,OAAO,CAACC,SAAS;QAClC;IACJ;;AAgBO,IAAM7B,SAAqB;QAAEsC,kBAAAA,kCAAUC,SAAAA,sCAAU,yBAAWC;QAA/BF;QAAUC;;IAC1C,IAAsBtC,aAAAA,aAAfwC,UAAexC,WAAfwC,SAASC,KAAMzC,WAANyC;IAChB,IAAMC,oBAAoBC,eAAQ,CAACC,OAAO,CAACP;IAE3C,IAAMQ,gBAAgBH,kBAAkBI,MAAM,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKC,0BAAY;;IACrF,IAAMC,SAASR,kBAAkBS,IAAI,CAAC,SAACJ;eAAUA,MAAMC,IAAI,KAAKC,0BAAY;;IAE5E,IAAMG,aAAa;QACfvC,QAAQ4B,GAAGD,QAAQ3B,MAAM,EAAE2B,OAAO,CAACF,QAAQ;QAC3Ce,OAAOb,QAAQL,UAAU;QACzBhC,MAAMqC,QAAQrC,IAAI;QAClBmD,OAAOd,QAAQnC,SAAS;QACxB+B,OAAOI,QAAQJ,KAAK;IACxB;IAEA,qBACI,sBAACmB,WAAK;QAACjB,SAAQ;QAASlC,SAAS;QAAGgD,YAAYA;QAAYI,MAAM;OAAUjB;;0BACxE,qBAACkB;gBAAIC,WAAWlB,QAAQhC,SAAS;0BAAGqC;;YACnCK;;;AAGb;AAEAnD,OAAO4D,MAAM,GAAGV,0BAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAuB,UAAU,EAAE,SAAS,EAAO,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAuB,UAAU,EAAE,SAAS,EAAO,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,SAAS;;;;;;;;;CAKZ,CAAC;AAEJ,KAAK,yBAAyB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAE7D,UAAU,mBAAoB,SAAQ,YAAY,CAAC,yBAAyB,CAAC;IACzE;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAgCjE,CAAC"}
|
|
@@ -20,7 +20,8 @@ var useStyles = (0, _core.createStyles)(function(theme) {
|
|
|
20
20
|
return {
|
|
21
21
|
root: {},
|
|
22
22
|
wrapper: {},
|
|
23
|
-
label: {}
|
|
23
|
+
label: {},
|
|
24
|
+
select: {}
|
|
24
25
|
};
|
|
25
26
|
});
|
|
26
27
|
var TablePredicate = function(_param) {
|
|
@@ -65,7 +66,8 @@ var TablePredicate = function(_param) {
|
|
|
65
66
|
onChange: onUpdate,
|
|
66
67
|
data: data,
|
|
67
68
|
"aria-label": label !== null && label !== void 0 ? label : id,
|
|
68
|
-
searchable: data.length > 7
|
|
69
|
+
searchable: data.length > 7,
|
|
70
|
+
className: classes.select
|
|
69
71
|
})
|
|
70
72
|
]
|
|
71
73
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/table/TablePredicate.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Grid, Group, Select, SelectItem, Selectors, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {},\n label: {},\n}));\n\ntype TablePredicateStylesNames = Selectors<typeof useStyles>;\n\ninterface TablePredicateProps extends DefaultProps<TablePredicateStylesNames> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: SelectItem[];\n /**\n * Input label (not displayed for now)\n *\n * @default default to the predicate id\n */\n label?: string;\n}\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = ({\n id,\n data,\n label,\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TablePredicate', classNames, styles, unstyled});\n const {form} = useTable();\n\n const onUpdate = (newValue: string) => {\n form.setFieldValue('predicates', {...form.values.predicates, [id]: newValue});\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Predicate} py=\"sm\" className={classes.root} {...others}>\n <Group spacing=\"xs\" className={classes.wrapper}>\n {label ? <Text className={classes.label}>{label}:</Text> : null}\n <Select\n withinPortal\n value={form.values.predicates[id]}\n onChange={onUpdate}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n />\n </Group>\n </Grid.Col>\n );\n};\n"],"names":["TablePredicate","useStyles","createStyles","theme","root","wrapper","label","id","data","classNames","styles","unstyled","others","classes","name","form","useTable","onUpdate","newValue","setFieldValue","values","predicates","Grid","Col","span","order","TableComponentsOrder","Predicate","py","className","Group","spacing","Text","Select","withinPortal","value","onChange","aria-label","searchable","length"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/table/TablePredicate.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Grid, Group, Select, SelectItem, Selectors, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {},\n label: {},\n select: {}\n}));\n\ntype TablePredicateStylesNames = Selectors<typeof useStyles>;\n\ninterface TablePredicateProps extends DefaultProps<TablePredicateStylesNames> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: SelectItem[];\n /**\n * Input label (not displayed for now)\n *\n * @default default to the predicate id\n */\n label?: string;\n}\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = ({\n id,\n data,\n label,\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TablePredicate', classNames, styles, unstyled});\n const {form} = useTable();\n\n const onUpdate = (newValue: string) => {\n form.setFieldValue('predicates', {...form.values.predicates, [id]: newValue});\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Predicate} py=\"sm\" className={classes.root} {...others}>\n <Group spacing=\"xs\" className={classes.wrapper}>\n {label ? <Text className={classes.label}>{label}:</Text> : null}\n <Select\n withinPortal\n value={form.values.predicates[id]}\n onChange={onUpdate}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n className={classes.select}\n />\n </Group>\n </Grid.Col>\n );\n};\n"],"names":["TablePredicate","useStyles","createStyles","theme","root","wrapper","label","select","id","data","classNames","styles","unstyled","others","classes","name","form","useTable","onUpdate","newValue","setFieldValue","values","predicates","Grid","Col","span","order","TableComponentsOrder","Predicate","py","className","Group","spacing","Text","Select","withinPortal","value","onChange","aria-label","searchable","length"],"mappings":";;;;+BAgCaA;;;eAAAA;;;;;;;;oBAhC8E;2BAGxD;4BACZ;AAEvB,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,MAAM,CAAC;QACPC,SAAS,CAAC;QACVC,OAAO,CAAC;QACRC,QAAQ,CAAC;IACb;;AAqBO,IAAMP,iBAAyD;QAClEQ,YAAAA,IACAC,cAAAA,MACAH,eAAAA,OACAI,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACGC;QANHL;QACAC;QACAH;QACAI;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWb,UAAU,MAAM;QAACc,MAAM;QAAkBL,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAAhFE;IACP,IAAM,AAACE,OAAQC,IAAAA,sBAAQ,IAAhBD;IAEP,IAAME,WAAW,SAACC;QACdH,KAAKI,aAAa,CAAC,cAAc,4CAAIJ,KAAKK,MAAM,CAACC,UAAU,GAAE,uBAACd,IAAKW;IACvE;IAEA,qBACI,qBAACI,UAAI,CAACC,GAAG;QAACC,MAAK;QAAUC,OAAOC,iCAAoB,CAACC,SAAS;QAAEC,IAAG;QAAKC,WAAWhB,QAAQV,IAAI;OAAMS;kBACjG,cAAA,sBAACkB,WAAK;YAACC,SAAQ;YAAKF,WAAWhB,QAAQT,OAAO;;gBACzCC,sBAAQ,sBAAC2B,UAAI;oBAACH,WAAWhB,QAAQR,KAAK;;wBAAGA;wBAAM;;qBAAW;8BAC3D,qBAAC4B,YAAM;oBACHC,YAAY;oBACZC,OAAOpB,KAAKK,MAAM,CAACC,UAAU,CAACd,GAAG;oBACjC6B,UAAUnB;oBACVT,MAAMA;oBACN6B,cAAYhC,kBAAAA,mBAAAA,QAASE;oBACrB+B,YAAY9B,KAAK+B,MAAM,GAAG;oBAC1BV,WAAWhB,QAAQP,MAAM;;;;;AAK7C"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;IACtD,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,UAqBpB,CAAC"}
|
|
@@ -23,7 +23,8 @@ var useStyles = createStyles(function(theme) {
|
|
|
23
23
|
width: "100%",
|
|
24
24
|
borderBottom: "1px solid ".concat(theme.colors.gray[3]),
|
|
25
25
|
fontSize: theme.headings.sizes.h3.fontSize,
|
|
26
|
-
lineHeight: theme.headings.sizes.h3.lineHeight
|
|
26
|
+
lineHeight: theme.headings.sizes.h3.lineHeight,
|
|
27
|
+
overflowWrap: "anywhere"
|
|
27
28
|
},
|
|
28
29
|
success: {
|
|
29
30
|
backgroundColor: theme.colors.lime[6],
|
|
@@ -1 +1 @@
|
|
|
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 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 /**\n * Controls prompt appearance\n *\n * @default \"info\"\n */\n variant?: '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 = 'info', ...otherProps}) => {\n const {classes, cx} = useStyles();\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: classes.whiteClose,\n body: classes.body,\n modal: classes.modalType,\n title: classes.title,\n };\n\n return (\n <Modal variant=\"prompt\" padding={0} classNames={classNames} 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","success","backgroundColor","lime","primary","pureWhite","warning","yellow","critical","red","info","navy","whiteClose","title","Prompt","children","variant","otherProps","classes","cx","convertedChildren","toArray","otherChildren","filter","child","type","footer","find","classNames","close","modal","size","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,UAAUf,MAAMgB,QAAQ,CAACC,KAAK,CAACC,EAAE,CAACH,QAAQ;YAC1CI,YAAYnB,MAAMgB,QAAQ,CAACC,KAAK,CAACC,EAAE,CAACC,UAAU;
|
|
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 overflowWrap: 'anywhere',\n },\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 /**\n * Controls prompt appearance\n *\n * @default \"info\"\n */\n variant?: '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 = 'info', ...otherProps}) => {\n const {classes, cx} = useStyles();\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: classes.whiteClose,\n body: classes.body,\n modal: classes.modalType,\n title: classes.title,\n };\n\n return (\n <Modal variant=\"prompt\" padding={0} classNames={classNames} 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","overflowWrap","success","backgroundColor","lime","primary","pureWhite","warning","yellow","critical","red","info","navy","whiteClose","title","Prompt","children","variant","otherProps","classes","cx","convertedChildren","toArray","otherChildren","filter","child","type","footer","find","classNames","close","modal","size","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,UAAUf,MAAMgB,QAAQ,CAACC,KAAK,CAACC,EAAE,CAACH,QAAQ;YAC1CI,YAAYnB,MAAMgB,QAAQ,CAACC,KAAK,CAACC,EAAE,CAACC,UAAU;YAC9CC,cAAc;QAClB;QACAC,SAAS;YAACC,iBAAiBtB,MAAMa,MAAM,CAACU,IAAI,CAAC,EAAE;YAAE7B,OAAOA,MAAM8B,OAAO,CAACC,SAAS;QAAA;QAC/EC,SAAS;YAACJ,iBAAiBtB,MAAMa,MAAM,CAACc,MAAM,CAAC,EAAE;YAAEjC,OAAOA,MAAM8B,OAAO,CAACC,SAAS;QAAA;QACjFG,UAAU;YACNN,iBAAiBtB,MAAMa,MAAM,CAACgB,GAAG,CAAC,EAAE;YACpCnC,OAAOA,MAAM8B,OAAO,CAACC,SAAS;QAClC;QACAK,MAAM;YAACR,iBAAiBtB,MAAMa,MAAM,CAACkB,IAAI,CAAC,EAAE;YAAErC,OAAOA,MAAM8B,OAAO,CAACC,SAAS;QAAA;QAC5EO,YAAY;YAACtC,OAAOA,MAAM8B,OAAO,CAACC,SAAS;YAAE,WAAW;gBAACH,iBAAiB;YAAa;QAAC;QACxFW,OAAO;YACHvC,OAAOA,MAAM8B,OAAO,CAACC,SAAS;QAClC;IACJ;;AAgBA,OAAO,IAAMS,SAAqB;QAAEC,kBAAAA,kCAAUC,SAAAA,sCAAU,yBAAWC;QAA/BF;QAAUC;;IAC1C,IAAsBrC,aAAAA,aAAfuC,UAAevC,WAAfuC,SAASC,KAAMxC,WAANwC;IAChB,IAAMC,oBAAoB3C,SAAS4C,OAAO,CAACN;IAE3C,IAAMO,gBAAgBF,kBAAkBG,MAAM,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAK/C;;IACzE,IAAMgD,SAASN,kBAAkBO,IAAI,CAAC,SAACH;eAAUA,MAAMC,IAAI,KAAK/C;;IAEhE,IAAMkD,aAAa;QACfrC,QAAQ4B,GAAGD,QAAQ3B,MAAM,EAAE2B,OAAO,CAACF,QAAQ;QAC3Ca,OAAOX,QAAQN,UAAU;QACzB/B,MAAMqC,QAAQrC,IAAI;QAClBiD,OAAOZ,QAAQnC,SAAS;QACxB8B,OAAOK,QAAQL,KAAK;IACxB;IAEA,qBACI,MAACrC;QAAMwC,SAAQ;QAASlC,SAAS;QAAG8C,YAAYA;QAAYG,MAAM;OAAUd;;0BACxE,KAACe;gBAAIC,WAAWf,QAAQhC,SAAS;0BAAGoC;;YACnCI;;;AAGb,EAAE;AAEFZ,OAAOoB,MAAM,GAAGxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAuB,UAAU,EAAE,SAAS,EAAO,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAuB,UAAU,EAAE,SAAS,EAAO,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,SAAS;;;;;;;;;CAKZ,CAAC;AAEJ,KAAK,yBAAyB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAE7D,UAAU,mBAAoB,SAAQ,YAAY,CAAC,yBAAyB,CAAC;IACzE;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAgCjE,CAAC"}
|
|
@@ -10,7 +10,8 @@ var useStyles = createStyles(function(theme) {
|
|
|
10
10
|
return {
|
|
11
11
|
root: {},
|
|
12
12
|
wrapper: {},
|
|
13
|
-
label: {}
|
|
13
|
+
label: {},
|
|
14
|
+
select: {}
|
|
14
15
|
};
|
|
15
16
|
});
|
|
16
17
|
export var TablePredicate = function(_param) {
|
|
@@ -55,7 +56,8 @@ export var TablePredicate = function(_param) {
|
|
|
55
56
|
onChange: onUpdate,
|
|
56
57
|
data: data,
|
|
57
58
|
"aria-label": label !== null && label !== void 0 ? label : id,
|
|
58
|
-
searchable: data.length > 7
|
|
59
|
+
searchable: data.length > 7,
|
|
60
|
+
className: classes.select
|
|
59
61
|
})
|
|
60
62
|
]
|
|
61
63
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/table/TablePredicate.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Grid, Group, Select, SelectItem, Selectors, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {},\n label: {},\n}));\n\ntype TablePredicateStylesNames = Selectors<typeof useStyles>;\n\ninterface TablePredicateProps extends DefaultProps<TablePredicateStylesNames> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: SelectItem[];\n /**\n * Input label (not displayed for now)\n *\n * @default default to the predicate id\n */\n label?: string;\n}\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = ({\n id,\n data,\n label,\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TablePredicate', classNames, styles, unstyled});\n const {form} = useTable();\n\n const onUpdate = (newValue: string) => {\n form.setFieldValue('predicates', {...form.values.predicates, [id]: newValue});\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Predicate} py=\"sm\" className={classes.root} {...others}>\n <Group spacing=\"xs\" className={classes.wrapper}>\n {label ? <Text className={classes.label}>{label}:</Text> : null}\n <Select\n withinPortal\n value={form.values.predicates[id]}\n onChange={onUpdate}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n />\n </Group>\n </Grid.Col>\n );\n};\n"],"names":["createStyles","Grid","Group","Select","Text","TableComponentsOrder","useTable","useStyles","theme","root","wrapper","label","TablePredicate","id","data","classNames","styles","unstyled","others","classes","name","form","onUpdate","newValue","setFieldValue","values","predicates","Col","span","order","Predicate","py","className","spacing","withinPortal","value","onChange","aria-label","searchable","length"],"mappings":";;;;;AAAA,SAAQA,YAAY,EAAgBC,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAyBC,IAAI,QAAO,gBAAgB;AAG3G,SAAQC,oBAAoB,QAAO,iBAAiB;AACpD,SAAQC,QAAQ,QAAO,iBAAiB;AAExC,IAAMC,YAAYP,aAAa,SAACQ;WAAW;QACvCC,MAAM,CAAC;QACPC,SAAS,CAAC;QACVC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/table/TablePredicate.tsx"],"sourcesContent":["import {createStyles, DefaultProps, Grid, Group, Select, SelectItem, Selectors, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {},\n label: {},\n select: {}\n}));\n\ntype TablePredicateStylesNames = Selectors<typeof useStyles>;\n\ninterface TablePredicateProps extends DefaultProps<TablePredicateStylesNames> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: SelectItem[];\n /**\n * Input label (not displayed for now)\n *\n * @default default to the predicate id\n */\n label?: string;\n}\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = ({\n id,\n data,\n label,\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TablePredicate', classNames, styles, unstyled});\n const {form} = useTable();\n\n const onUpdate = (newValue: string) => {\n form.setFieldValue('predicates', {...form.values.predicates, [id]: newValue});\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Predicate} py=\"sm\" className={classes.root} {...others}>\n <Group spacing=\"xs\" className={classes.wrapper}>\n {label ? <Text className={classes.label}>{label}:</Text> : null}\n <Select\n withinPortal\n value={form.values.predicates[id]}\n onChange={onUpdate}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n className={classes.select}\n />\n </Group>\n </Grid.Col>\n );\n};\n"],"names":["createStyles","Grid","Group","Select","Text","TableComponentsOrder","useTable","useStyles","theme","root","wrapper","label","select","TablePredicate","id","data","classNames","styles","unstyled","others","classes","name","form","onUpdate","newValue","setFieldValue","values","predicates","Col","span","order","Predicate","py","className","spacing","withinPortal","value","onChange","aria-label","searchable","length"],"mappings":";;;;;AAAA,SAAQA,YAAY,EAAgBC,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAyBC,IAAI,QAAO,gBAAgB;AAG3G,SAAQC,oBAAoB,QAAO,iBAAiB;AACpD,SAAQC,QAAQ,QAAO,iBAAiB;AAExC,IAAMC,YAAYP,aAAa,SAACQ;WAAW;QACvCC,MAAM,CAAC;QACPC,SAAS,CAAC;QACVC,OAAO,CAAC;QACRC,QAAQ,CAAC;IACb;;AAqBA,OAAO,IAAMC,iBAAyD;QAClEC,YAAAA,IACAC,cAAAA,MACAJ,eAAAA,OACAK,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACGC;QANHL;QACAC;QACAJ;QACAK;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWb,UAAU,MAAM;QAACc,MAAM;QAAkBL,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAAhFE;IACP,IAAM,AAACE,OAAQhB,WAARgB;IAEP,IAAMC,WAAW,SAACC;QACdF,KAAKG,aAAa,CAAC,cAAc,wCAAIH,KAAKI,MAAM,CAACC,UAAU,GAAE,qBAACb,IAAKU;IACvE;IAEA,qBACI,KAACvB,KAAK2B,GAAG;QAACC,MAAK;QAAUC,OAAOzB,qBAAqB0B,SAAS;QAAEC,IAAG;QAAKC,WAAWb,QAAQX,IAAI;OAAMU;kBACjG,cAAA,MAACjB;YAAMgC,SAAQ;YAAKD,WAAWb,QAAQV,OAAO;;gBACzCC,sBAAQ,MAACP;oBAAK6B,WAAWb,QAAQT,KAAK;;wBAAGA;wBAAM;;qBAAW;8BAC3D,KAACR;oBACGgC,YAAY;oBACZC,OAAOd,KAAKI,MAAM,CAACC,UAAU,CAACb,GAAG;oBACjCuB,UAAUd;oBACVR,MAAMA;oBACNuB,cAAY3B,kBAAAA,mBAAAA,QAASG;oBACrByB,YAAYxB,KAAKyB,MAAM,GAAG;oBAC1BP,WAAWb,QAAQR,MAAM;;;;;AAK7C,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveord/plasma-mantine",
|
|
3
|
-
"version": "52.
|
|
3
|
+
"version": "52.15.0",
|
|
4
4
|
"description": "A Plasma flavoured Mantine theme",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plasma",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@dnd-kit/modifiers": "6.0.1",
|
|
32
32
|
"@dnd-kit/sortable": "7.0.2",
|
|
33
33
|
"@dnd-kit/utilities": "3.2.1",
|
|
34
|
-
"@mantine/utils": "6.0.
|
|
34
|
+
"@mantine/utils": "6.0.19",
|
|
35
35
|
"@monaco-editor/react": "4.5.1",
|
|
36
36
|
"@swc/helpers": "0.5.1",
|
|
37
37
|
"@tanstack/react-table": "8.9.3",
|
|
@@ -41,48 +41,48 @@
|
|
|
41
41
|
"lodash.debounce": "4.0.8",
|
|
42
42
|
"lodash.defaultsdeep": "4.6.1",
|
|
43
43
|
"monaco-editor": "0.41.0",
|
|
44
|
-
"@coveord/plasma-react-icons": "52.
|
|
45
|
-
"@coveord/plasma-tokens": "52.
|
|
44
|
+
"@coveord/plasma-react-icons": "52.15.0",
|
|
45
|
+
"@coveord/plasma-tokens": "52.15.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@emotion/react": "11.11.1",
|
|
49
|
-
"@mantine/carousel": "6.0.
|
|
50
|
-
"@mantine/core": "6.0.
|
|
51
|
-
"@mantine/dates": "6.0.
|
|
52
|
-
"@mantine/form": "6.0.
|
|
53
|
-
"@mantine/hooks": "6.0.
|
|
54
|
-
"@mantine/modals": "6.0.
|
|
55
|
-
"@mantine/notifications": "6.0.
|
|
49
|
+
"@mantine/carousel": "6.0.19",
|
|
50
|
+
"@mantine/core": "6.0.19",
|
|
51
|
+
"@mantine/dates": "6.0.19",
|
|
52
|
+
"@mantine/form": "6.0.19",
|
|
53
|
+
"@mantine/hooks": "6.0.19",
|
|
54
|
+
"@mantine/modals": "6.0.19",
|
|
55
|
+
"@mantine/notifications": "6.0.19",
|
|
56
56
|
"@swc/cli": "0.1.62",
|
|
57
|
-
"@swc/core": "1.3.
|
|
58
|
-
"@swc/jest": "0.2.
|
|
59
|
-
"@testing-library/jest-dom": "
|
|
57
|
+
"@swc/core": "1.3.78",
|
|
58
|
+
"@swc/jest": "0.2.29",
|
|
59
|
+
"@testing-library/jest-dom": "6.0.1",
|
|
60
60
|
"@testing-library/react": "14.0.0",
|
|
61
61
|
"@testing-library/user-event": "14.4.3",
|
|
62
62
|
"@types/jest": "29.5.3",
|
|
63
63
|
"@types/lodash.debounce": "^4.0.7",
|
|
64
64
|
"@types/lodash.defaultsdeep": "4.6.7",
|
|
65
|
-
"@types/react": "18.2.
|
|
65
|
+
"@types/react": "18.2.20",
|
|
66
66
|
"@types/react-dom": "18.2.7",
|
|
67
67
|
"@types/testing-library__jest-dom": "5.14.9",
|
|
68
68
|
"csstype": "3.1.2",
|
|
69
69
|
"embla-carousel-react": "7.1.0",
|
|
70
|
-
"eslint-plugin-testing-library": "
|
|
70
|
+
"eslint-plugin-testing-library": "6.0.0",
|
|
71
71
|
"eslint-plugin-vitest": "0.2.8",
|
|
72
72
|
"eslint-plugin-vitest-globals": "1.4.0",
|
|
73
73
|
"identity-obj-proxy": "3.0.0",
|
|
74
|
-
"jest": "29.6.
|
|
75
|
-
"jest-environment-jsdom": "29.6.
|
|
74
|
+
"jest": "29.6.3",
|
|
75
|
+
"jest-environment-jsdom": "29.6.3",
|
|
76
76
|
"jest-junit": "16.0.0",
|
|
77
77
|
"npm-run-all": "4.1.5",
|
|
78
|
-
"publint": "0.2.
|
|
78
|
+
"publint": "0.2.1",
|
|
79
79
|
"react": "18.2.0",
|
|
80
80
|
"react-dom": "18.2.0",
|
|
81
81
|
"rimraf": "5.0.1",
|
|
82
|
-
"tslib": "2.6.
|
|
82
|
+
"tslib": "2.6.2",
|
|
83
83
|
"typescript": "5.1.6",
|
|
84
|
-
"vitest": "0.34.
|
|
85
|
-
"eslint-config-plasma": "52.
|
|
84
|
+
"vitest": "0.34.2",
|
|
85
|
+
"eslint-config-plasma": "52.15.0"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"@emotion/react": "^11.10.0",
|
|
@@ -20,11 +20,12 @@ describe('Button', () => {
|
|
|
20
20
|
);
|
|
21
21
|
expect(within(screen.getByRole('button', {name: /I am loading/i})).getByRole('presentation')).toBeVisible();
|
|
22
22
|
expect(
|
|
23
|
-
within(screen.
|
|
23
|
+
within(screen.getByRole('button', {name: /I am not loading/i})).queryByRole('presentation'),
|
|
24
24
|
).not.toBeInTheDocument();
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
it('shows a loader while the promise is waiting to be resolved', async () => {
|
|
28
|
+
const user = userEvent.setup();
|
|
28
29
|
let resolve: () => void;
|
|
29
30
|
let isResolved = false;
|
|
30
31
|
|
|
@@ -37,7 +38,7 @@ describe('Button', () => {
|
|
|
37
38
|
|
|
38
39
|
render(<Button onClick={promise}>promise handler</Button>);
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
await user.click(screen.getByRole('button', {name: /promise handler/i}));
|
|
41
42
|
|
|
42
43
|
expect(
|
|
43
44
|
await within(screen.getByRole('button', {name: /promise handler/i})).findByRole('presentation'),
|
|
@@ -50,11 +51,12 @@ describe('Button', () => {
|
|
|
50
51
|
});
|
|
51
52
|
|
|
52
53
|
expect(
|
|
53
|
-
within(screen.
|
|
54
|
+
within(screen.getByRole('button', {name: /promise handler/i})).queryByRole('presentation'),
|
|
54
55
|
).not.toBeInTheDocument();
|
|
55
56
|
});
|
|
56
57
|
|
|
57
58
|
it('removes the loading if a promise is rejected', async () => {
|
|
59
|
+
const user = userEvent.setup();
|
|
58
60
|
let reject: () => void;
|
|
59
61
|
let isRejected = false;
|
|
60
62
|
|
|
@@ -67,7 +69,7 @@ describe('Button', () => {
|
|
|
67
69
|
|
|
68
70
|
render(<Button onClick={promise}>promise handler</Button>);
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
await user.click(screen.getByRole('button', {name: /promise handler/i}));
|
|
71
73
|
|
|
72
74
|
expect(
|
|
73
75
|
await within(screen.getByRole('button', {name: /promise handler/i})).findByRole('presentation'),
|
|
@@ -80,7 +82,7 @@ describe('Button', () => {
|
|
|
80
82
|
});
|
|
81
83
|
|
|
82
84
|
expect(
|
|
83
|
-
within(screen.
|
|
85
|
+
within(screen.getByRole('button', {name: /promise handler/i})).queryByRole('presentation'),
|
|
84
86
|
).not.toBeInTheDocument();
|
|
85
87
|
});
|
|
86
88
|
});
|
|
@@ -17,6 +17,7 @@ const useStyles = createStyles((theme) => ({
|
|
|
17
17
|
borderBottom: `1px solid ${theme.colors.gray[3]}`,
|
|
18
18
|
fontSize: theme.headings.sizes.h3.fontSize,
|
|
19
19
|
lineHeight: theme.headings.sizes.h3.lineHeight,
|
|
20
|
+
overflowWrap: 'anywhere',
|
|
20
21
|
},
|
|
21
22
|
success: {backgroundColor: theme.colors.lime[6], color: color.primary.pureWhite},
|
|
22
23
|
warning: {backgroundColor: theme.colors.yellow[5], color: color.primary.pureWhite},
|
|
@@ -8,6 +8,7 @@ const useStyles = createStyles((theme) => ({
|
|
|
8
8
|
root: {},
|
|
9
9
|
wrapper: {},
|
|
10
10
|
label: {},
|
|
11
|
+
select: {}
|
|
11
12
|
}));
|
|
12
13
|
|
|
13
14
|
type TablePredicateStylesNames = Selectors<typeof useStyles>;
|
|
@@ -56,6 +57,7 @@ export const TablePredicate: FunctionComponent<TablePredicateProps> = ({
|
|
|
56
57
|
data={data}
|
|
57
58
|
aria-label={label ?? id}
|
|
58
59
|
searchable={data.length > 7}
|
|
60
|
+
className={classes.select}
|
|
59
61
|
/>
|
|
60
62
|
</Group>
|
|
61
63
|
</Grid.Col>
|
|
@@ -30,6 +30,7 @@ describe('Th', () => {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
it('changes the sort icon when clicking on a table header', async () => {
|
|
33
|
+
const user = userEvent.setup();
|
|
33
34
|
const data: RowData[] = [
|
|
34
35
|
{name: 'apple', type: 'fruit', colors: ['red', 'green']},
|
|
35
36
|
{name: 'potato', type: 'vegetable', colors: ['brown', 'blue', 'yellow']},
|
|
@@ -37,17 +38,17 @@ describe('Th', () => {
|
|
|
37
38
|
const onChange = vi.fn();
|
|
38
39
|
render(<Table data={data} columns={columns} onChange={onChange} />);
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
await user.click(screen.getByRole('button', {name: /name doubleArrowHead/i}));
|
|
41
42
|
await waitFor(() => {
|
|
42
43
|
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({sorting: [{id: 'name', desc: false}]}));
|
|
43
44
|
});
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
await user.click(screen.getByRole('button', {name: /name arrowUp/i}));
|
|
46
47
|
await waitFor(() => {
|
|
47
48
|
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({sorting: [{id: 'name', desc: true}]}));
|
|
48
49
|
});
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
await user.click(screen.getByRole('button', {name: /name arrowDown/i}));
|
|
51
52
|
await waitFor(() => {
|
|
52
53
|
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({sorting: [{id: 'name', desc: false}]}));
|
|
53
54
|
});
|