@coveord/plasma-mantine 56.16.0 → 56.18.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.
Files changed (116) hide show
  1. package/.turbo/turbo-build.log +4 -4
  2. package/.turbo/turbo-test.log +114 -117
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/cjs/components/Accordion/Accordion.d.ts.map +1 -1
  5. package/dist/cjs/components/Accordion/Accordion.js +5 -0
  6. package/dist/cjs/components/Accordion/Accordion.js.map +1 -1
  7. package/dist/cjs/components/ActionIcon/ActionIcon.d.ts +1 -1
  8. package/dist/cjs/components/ActionIcon/ActionIcon.d.ts.map +1 -1
  9. package/dist/cjs/components/ActionIcon/ActionIcon.js +10 -0
  10. package/dist/cjs/components/ActionIcon/ActionIcon.js.map +1 -1
  11. package/dist/cjs/components/Alert/Alert.d.ts.map +1 -1
  12. package/dist/cjs/components/Alert/Alert.js +5 -0
  13. package/dist/cjs/components/Alert/Alert.js.map +1 -1
  14. package/dist/cjs/components/Button/Button.d.ts.map +1 -1
  15. package/dist/cjs/components/Button/Button.js +10 -0
  16. package/dist/cjs/components/Button/Button.js.map +1 -1
  17. package/dist/cjs/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  18. package/dist/cjs/components/CodeEditor/CodeEditor.js +1 -0
  19. package/dist/cjs/components/CodeEditor/CodeEditor.js.map +1 -1
  20. package/dist/cjs/components/LastUpdated/LastUpdated.js +1 -0
  21. package/dist/cjs/components/LastUpdated/LastUpdated.js.map +1 -1
  22. package/dist/cjs/components/StickyFooter/StickyFooter.d.ts.map +1 -1
  23. package/dist/cjs/components/StickyFooter/StickyFooter.js +1 -0
  24. package/dist/cjs/components/StickyFooter/StickyFooter.js.map +1 -1
  25. package/dist/cjs/components/Table/Table.module.css +0 -4
  26. package/dist/cjs/components/Table/table-date-range-picker/TableDateRangePicker.d.ts.map +1 -1
  27. package/dist/cjs/components/Table/table-date-range-picker/TableDateRangePicker.js +1 -0
  28. package/dist/cjs/components/Table/table-date-range-picker/TableDateRangePicker.js.map +1 -1
  29. package/dist/cjs/components/Table/table-filter/TableFilter.js +1 -0
  30. package/dist/cjs/components/Table/table-filter/TableFilter.js.map +1 -1
  31. package/dist/cjs/components/Table/table-footer/TableFooter.js +1 -0
  32. package/dist/cjs/components/Table/table-footer/TableFooter.js.map +1 -1
  33. package/dist/cjs/components/Table/table-header/TableHeader.d.ts.map +1 -1
  34. package/dist/cjs/components/Table/table-header/TableHeader.js +2 -1
  35. package/dist/cjs/components/Table/table-header/TableHeader.js.map +1 -1
  36. package/dist/cjs/components/Table/table-last-updated/TableLastUpdated.d.ts.map +1 -1
  37. package/dist/cjs/components/Table/table-last-updated/TableLastUpdated.js +1 -0
  38. package/dist/cjs/components/Table/table-last-updated/TableLastUpdated.js.map +1 -1
  39. package/dist/cjs/components/Table/table-loading/TableLoading.js +1 -0
  40. package/dist/cjs/components/Table/table-loading/TableLoading.js.map +1 -1
  41. package/dist/cjs/components/Table/table-no-data/TableNoData.js +1 -0
  42. package/dist/cjs/components/Table/table-no-data/TableNoData.js.map +1 -1
  43. package/dist/cjs/components/Table/table-pagination/TablePagination.d.ts.map +1 -1
  44. package/dist/cjs/components/Table/table-pagination/TablePagination.js +1 -0
  45. package/dist/cjs/components/Table/table-pagination/TablePagination.js.map +1 -1
  46. package/dist/cjs/components/Table/table-per-page/TablePerPage.js +1 -0
  47. package/dist/cjs/components/Table/table-per-page/TablePerPage.js.map +1 -1
  48. package/dist/cjs/components/Table/table-predicate/TablePredicate.d.ts.map +1 -1
  49. package/dist/cjs/components/Table/table-predicate/TablePredicate.js +1 -0
  50. package/dist/cjs/components/Table/table-predicate/TablePredicate.js.map +1 -1
  51. package/dist/esm/components/Accordion/Accordion.d.ts.map +1 -1
  52. package/dist/esm/components/Accordion/Accordion.js +5 -0
  53. package/dist/esm/components/Accordion/Accordion.js.map +1 -1
  54. package/dist/esm/components/ActionIcon/ActionIcon.d.ts +1 -1
  55. package/dist/esm/components/ActionIcon/ActionIcon.d.ts.map +1 -1
  56. package/dist/esm/components/ActionIcon/ActionIcon.js +10 -0
  57. package/dist/esm/components/ActionIcon/ActionIcon.js.map +1 -1
  58. package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
  59. package/dist/esm/components/Alert/Alert.js +5 -0
  60. package/dist/esm/components/Alert/Alert.js.map +1 -1
  61. package/dist/esm/components/Button/Button.d.ts.map +1 -1
  62. package/dist/esm/components/Button/Button.js +10 -0
  63. package/dist/esm/components/Button/Button.js.map +1 -1
  64. package/dist/esm/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  65. package/dist/esm/components/CodeEditor/CodeEditor.js +1 -0
  66. package/dist/esm/components/CodeEditor/CodeEditor.js.map +1 -1
  67. package/dist/esm/components/LastUpdated/LastUpdated.js +1 -0
  68. package/dist/esm/components/LastUpdated/LastUpdated.js.map +1 -1
  69. package/dist/esm/components/StickyFooter/StickyFooter.d.ts.map +1 -1
  70. package/dist/esm/components/StickyFooter/StickyFooter.js +1 -0
  71. package/dist/esm/components/StickyFooter/StickyFooter.js.map +1 -1
  72. package/dist/esm/components/Table/Table.module.css +0 -4
  73. package/dist/esm/components/Table/table-date-range-picker/TableDateRangePicker.d.ts.map +1 -1
  74. package/dist/esm/components/Table/table-date-range-picker/TableDateRangePicker.js +1 -0
  75. package/dist/esm/components/Table/table-date-range-picker/TableDateRangePicker.js.map +1 -1
  76. package/dist/esm/components/Table/table-filter/TableFilter.js +1 -0
  77. package/dist/esm/components/Table/table-filter/TableFilter.js.map +1 -1
  78. package/dist/esm/components/Table/table-footer/TableFooter.js +1 -0
  79. package/dist/esm/components/Table/table-footer/TableFooter.js.map +1 -1
  80. package/dist/esm/components/Table/table-header/TableHeader.d.ts.map +1 -1
  81. package/dist/esm/components/Table/table-header/TableHeader.js +2 -1
  82. package/dist/esm/components/Table/table-header/TableHeader.js.map +1 -1
  83. package/dist/esm/components/Table/table-last-updated/TableLastUpdated.d.ts.map +1 -1
  84. package/dist/esm/components/Table/table-last-updated/TableLastUpdated.js +1 -0
  85. package/dist/esm/components/Table/table-last-updated/TableLastUpdated.js.map +1 -1
  86. package/dist/esm/components/Table/table-loading/TableLoading.js +1 -0
  87. package/dist/esm/components/Table/table-loading/TableLoading.js.map +1 -1
  88. package/dist/esm/components/Table/table-no-data/TableNoData.js +1 -0
  89. package/dist/esm/components/Table/table-no-data/TableNoData.js.map +1 -1
  90. package/dist/esm/components/Table/table-pagination/TablePagination.d.ts.map +1 -1
  91. package/dist/esm/components/Table/table-pagination/TablePagination.js +1 -0
  92. package/dist/esm/components/Table/table-pagination/TablePagination.js.map +1 -1
  93. package/dist/esm/components/Table/table-per-page/TablePerPage.js +1 -0
  94. package/dist/esm/components/Table/table-per-page/TablePerPage.js.map +1 -1
  95. package/dist/esm/components/Table/table-predicate/TablePredicate.d.ts.map +1 -1
  96. package/dist/esm/components/Table/table-predicate/TablePredicate.js +1 -0
  97. package/dist/esm/components/Table/table-predicate/TablePredicate.js.map +1 -1
  98. package/package.json +3 -3
  99. package/src/components/Accordion/Accordion.tsx +5 -0
  100. package/src/components/ActionIcon/ActionIcon.tsx +15 -4
  101. package/src/components/Alert/Alert.tsx +7 -0
  102. package/src/components/Button/Button.tsx +12 -1
  103. package/src/components/CodeEditor/CodeEditor.tsx +4 -4
  104. package/src/components/LastUpdated/LastUpdated.tsx +2 -0
  105. package/src/components/StickyFooter/StickyFooter.tsx +3 -2
  106. package/src/components/Table/Table.module.css +0 -4
  107. package/src/components/Table/table-date-range-picker/TableDateRangePicker.tsx +4 -1
  108. package/src/components/Table/table-filter/TableFilter.tsx +2 -0
  109. package/src/components/Table/table-footer/TableFooter.tsx +2 -0
  110. package/src/components/Table/table-header/TableHeader.tsx +4 -3
  111. package/src/components/Table/table-last-updated/TableLastUpdated.tsx +3 -3
  112. package/src/components/Table/table-loading/TableLoading.tsx +2 -0
  113. package/src/components/Table/table-no-data/TableNoData.tsx +2 -0
  114. package/src/components/Table/table-pagination/TablePagination.tsx +3 -1
  115. package/src/components/Table/table-per-page/TablePerPage.tsx +1 -0
  116. package/src/components/Table/table-predicate/TablePredicate.tsx +4 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/LastUpdated/LastUpdated.tsx"],"sourcesContent":["import {BoxProps, factory, Factory, Group, GroupProps, StylesApiProps, Text, useProps, useStyles} from '@mantine/core';\nimport dayjs from 'dayjs';\nimport React from 'react';\n\nexport type LastUpdatedStylesNames = 'root' | 'label';\n\nexport interface LastUpdatedProps extends BoxProps, Pick<GroupProps, 'justify'>, StylesApiProps<LastUpdatedFactory> {\n /**\n * Optional formatter function to format the time value.\n * Receives the time prop and should return a string.\n * @default (time) => dayjs(time).format('h:mm:ss A')\n */\n formatter?: (time: dayjs.ConfigType) => string;\n /**\n * The unformatted time to display that can be parsed by dayjs.\n * @default The current time via dayjs().valueOf()\n */\n time?: dayjs.ConfigType;\n /**\n * Label to contextualize the time.\n *\n * @default \"Last update:\"\n */\n label?: string;\n}\n\nexport type LastUpdatedFactory = Factory<{\n props: LastUpdatedProps;\n ref: HTMLDivElement;\n stylesNames: LastUpdatedStylesNames;\n}>;\n\nconst defaultProps: Partial<LastUpdatedProps> = {\n label: 'Last update:',\n formatter: (time) => dayjs(time).format('h:mm:ss A'),\n};\n\nexport const LastUpdated = factory<LastUpdatedFactory>(\n (props: LastUpdatedProps, ref: React.ForwardedRef<HTMLDivElement>) => {\n const {formatter, label, time, classNames, className, styles, style, vars, unstyled, ...others} = useProps(\n 'PlasmaLastUpdated',\n defaultProps as Partial<LastUpdatedProps>,\n props,\n );\n\n const resolvedTime = time ?? dayjs().valueOf();\n\n const getStyles = useStyles<LastUpdatedFactory>({\n name: 'LastUpdated',\n classes: {},\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n });\n const stylesApiProps = {classNames, styles};\n\n return (\n <Group\n justify={props.justify}\n ref={ref}\n {...getStyles('root', {className, style, ...stylesApiProps})}\n {...others}\n >\n <Text size=\"xs\" {...getStyles('label', {className, style, ...stylesApiProps})}>\n {label}\n <span role=\"timer\">{formatter(resolvedTime)}</span>\n </Text>\n </Group>\n );\n },\n);\n"],"names":["factory","Group","Text","useProps","useStyles","dayjs","React","defaultProps","label","formatter","time","format","LastUpdated","props","ref","classNames","className","styles","style","vars","unstyled","others","resolvedTime","valueOf","getStyles","name","classes","stylesApiProps","justify","size","span","role"],"mappings":";AAAA,SAAkBA,OAAO,EAAWC,KAAK,EAA8BC,IAAI,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AACvH,OAAOC,WAAW,QAAQ;AAC1B,OAAOC,WAAW,QAAQ;AA8B1B,MAAMC,eAA0C;IAC5CC,OAAO;IACPC,WAAW,CAACC,OAASL,MAAMK,MAAMC,MAAM,CAAC;AAC5C;AAEA,OAAO,MAAMC,cAAcZ,QACvB,CAACa,OAAyBC;IACtB,MAAM,EAACL,SAAS,EAAED,KAAK,EAAEE,IAAI,EAAEK,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGC,QAAO,GAAGlB,SAC9F,qBACAI,cACAM;IAGJ,MAAMS,eAAeZ,QAAQL,QAAQkB,OAAO;IAE5C,MAAMC,YAAYpB,UAA8B;QAC5CqB,MAAM;QACNC,SAAS,CAAC;QACVb;QACAG;QACAE;QACAH;QACAE;QACAG;QACAD;IACJ;IACA,MAAMQ,iBAAiB;QAACZ;QAAYE;IAAM;IAE1C,qBACI,KAAChB;QACG2B,SAASf,MAAMe,OAAO;QACtBd,KAAKA;QACJ,GAAGU,UAAU,QAAQ;YAACR;YAAWE;YAAO,GAAGS,cAAc;QAAA,EAAE;QAC3D,GAAGN,MAAM;kBAEV,cAAA,MAACnB;YAAK2B,MAAK;YAAM,GAAGL,UAAU,SAAS;gBAACR;gBAAWE;gBAAO,GAAGS,cAAc;YAAA,EAAE;;gBACxEnB;8BACD,KAACsB;oBAAKC,MAAK;8BAAStB,UAAUa;;;;;AAI9C,GACF"}
1
+ {"version":3,"sources":["../../../../src/components/LastUpdated/LastUpdated.tsx"],"sourcesContent":["import {BoxProps, factory, Factory, Group, GroupProps, StylesApiProps, Text, useProps, useStyles} from '@mantine/core';\nimport dayjs from 'dayjs';\nimport React from 'react';\n\nexport type LastUpdatedStylesNames = 'root' | 'label';\n\nexport interface LastUpdatedProps extends BoxProps, Pick<GroupProps, 'justify'>, StylesApiProps<LastUpdatedFactory> {\n /**\n * Optional formatter function to format the time value.\n * Receives the time prop and should return a string.\n * @default (time) => dayjs(time).format('h:mm:ss A')\n */\n formatter?: (time: dayjs.ConfigType) => string;\n /**\n * The unformatted time to display that can be parsed by dayjs.\n * @default The current time via dayjs().valueOf()\n */\n time?: dayjs.ConfigType;\n /**\n * Label to contextualize the time.\n *\n * @default \"Last update:\"\n */\n label?: string;\n}\n\nexport type LastUpdatedFactory = Factory<{\n props: LastUpdatedProps;\n ref: HTMLDivElement;\n stylesNames: LastUpdatedStylesNames;\n}>;\n\nconst defaultProps: Partial<LastUpdatedProps> = {\n label: 'Last update:',\n formatter: (time) => dayjs(time).format('h:mm:ss A'),\n};\n\nexport const LastUpdated = factory<LastUpdatedFactory>(\n (props: LastUpdatedProps, ref: React.ForwardedRef<HTMLDivElement>) => {\n const {formatter, label, time, classNames, className, styles, style, vars, unstyled, ...others} = useProps(\n 'PlasmaLastUpdated',\n defaultProps as Partial<LastUpdatedProps>,\n props,\n );\n\n const resolvedTime = time ?? dayjs().valueOf();\n\n const getStyles = useStyles<LastUpdatedFactory>({\n name: 'LastUpdated',\n classes: {},\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n });\n const stylesApiProps = {classNames, styles};\n\n return (\n <Group\n justify={props.justify}\n ref={ref}\n {...getStyles('root', {className, style, ...stylesApiProps})}\n {...others}\n >\n <Text size=\"xs\" {...getStyles('label', {className, style, ...stylesApiProps})}>\n {label}\n <span role=\"timer\">{formatter(resolvedTime)}</span>\n </Text>\n </Group>\n );\n },\n);\n\nLastUpdated.displayName = 'LastUpdated';\n"],"names":["factory","Group","Text","useProps","useStyles","dayjs","React","defaultProps","label","formatter","time","format","LastUpdated","props","ref","classNames","className","styles","style","vars","unstyled","others","resolvedTime","valueOf","getStyles","name","classes","stylesApiProps","justify","size","span","role","displayName"],"mappings":";AAAA,SAAkBA,OAAO,EAAWC,KAAK,EAA8BC,IAAI,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AACvH,OAAOC,WAAW,QAAQ;AAC1B,OAAOC,WAAW,QAAQ;AA8B1B,MAAMC,eAA0C;IAC5CC,OAAO;IACPC,WAAW,CAACC,OAASL,MAAMK,MAAMC,MAAM,CAAC;AAC5C;AAEA,OAAO,MAAMC,cAAcZ,QACvB,CAACa,OAAyBC;IACtB,MAAM,EAACL,SAAS,EAAED,KAAK,EAAEE,IAAI,EAAEK,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGC,QAAO,GAAGlB,SAC9F,qBACAI,cACAM;IAGJ,MAAMS,eAAeZ,QAAQL,QAAQkB,OAAO;IAE5C,MAAMC,YAAYpB,UAA8B;QAC5CqB,MAAM;QACNC,SAAS,CAAC;QACVb;QACAG;QACAE;QACAH;QACAE;QACAG;QACAD;IACJ;IACA,MAAMQ,iBAAiB;QAACZ;QAAYE;IAAM;IAE1C,qBACI,KAAChB;QACG2B,SAASf,MAAMe,OAAO;QACtBd,KAAKA;QACJ,GAAGU,UAAU,QAAQ;YAACR;YAAWE;YAAO,GAAGS,cAAc;QAAA,EAAE;QAC3D,GAAGN,MAAM;kBAEV,cAAA,MAACnB;YAAK2B,MAAK;YAAM,GAAGL,UAAU,SAAS;gBAACR;gBAAWE;gBAAO,GAAGS,cAAc;YAAA,EAAE;;gBACxEnB;8BACD,KAACsB;oBAAKC,MAAK;8BAAStB,UAAUa;;;;;AAI9C,GACF;AAEFV,YAAYoB,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/StickyFooter/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAS,UAAU,EAAE,cAAc,EAA+B,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhC,MAAM,WAAW,iBACb,SAAQ,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,EAClE,cAAc,CAAC,mBAAmB,CAAC;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC;CACxC;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IACtC,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,uBAAuB,CAAC;CACxC,CAAC,CAAC;AAOH,eAAO,MAAM,YAAY;WAVd,iBAAiB;SACnB,cAAc;iBACN,uBAAuB;EAoCtC,CAAC"}
1
+ {"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/StickyFooter/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAS,UAAU,EAAE,cAAc,EAA+B,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhC,MAAM,WAAW,iBACb,SAAQ,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC;IAC3G;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC;CACxC;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IACtC,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,uBAAuB,CAAC;CACxC,CAAC,CAAC;AAOH,eAAO,MAAM,YAAY;WAVd,iBAAiB;SACnB,cAAc;iBACN,uBAAuB;EAoCtC,CAAC"}
@@ -31,5 +31,6 @@ export const StickyFooter = factory((props, ref)=>{
31
31
  children: children
32
32
  });
33
33
  });
34
+ StickyFooter.displayName = 'StickyFooter';
34
35
 
35
36
  //# sourceMappingURL=StickyFooter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/StickyFooter/StickyFooter.tsx"],"sourcesContent":["import {Factory, Group, GroupProps, StylesApiProps, factory, useProps, useStyles} from '@mantine/core';\nimport clsx from 'clsx';\nimport {ReactNode} from 'react';\nimport classes from './StickyFooter.module.css';\n\nexport interface StickyFooterProps\n extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'>,\n StylesApiProps<StickyFooterFactory> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n /**\n * Use variant 'modal-footer' when rendering the `StickyFooter` inside `Modal`.\n *\n * The 'modal-footer' removes the modal's default padding so that the footer properly hugs the bottom of the modal.\n * It also adds a border on top of the footer.\n *\n * @deprecated Use Modal.Footer from @coveord/plasma-mantine/Modal for modal footers. For other cases, the 'default' variant should suffice.\n */\n variant?: 'default' | 'modal-footer';\n}\n\nexport type StickyFooterStylesNames = 'root';\n\nexport type StickyFooterFactory = Factory<{\n props: StickyFooterProps;\n ref: HTMLDivElement;\n stylesNames: StickyFooterStylesNames;\n}>;\n\nconst defaultProps: Partial<StickyFooterProps> = {\n gap: 'sm',\n justify: 'flex-end',\n};\n\nexport const StickyFooter = factory<StickyFooterFactory>((props, ref) => {\n const {borderTop, justify, gap, children, className, classNames, style, styles, unstyled, vars, ...others} =\n useProps('StickyFooter', defaultProps, props);\n const getStyles = useStyles<StickyFooterFactory>({\n name: 'StickyFooter',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const css = getStyles('root');\n\n return (\n <Group\n justify={justify}\n gap={gap}\n className={clsx(css.className, {[classes.border]: !!borderTop})}\n style={css.style}\n ref={ref}\n {...others}\n >\n {children}\n </Group>\n );\n});\n"],"names":["Group","factory","useProps","useStyles","clsx","classes","defaultProps","gap","justify","StickyFooter","props","ref","borderTop","children","className","classNames","style","styles","unstyled","vars","others","getStyles","name","css","border"],"mappings":";AAAA,SAAiBA,KAAK,EAA8BC,OAAO,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AACvG,OAAOC,UAAU,OAAO;AAExB,OAAOC,aAAa,4BAA4B;AAgChD,MAAMC,eAA2C;IAC7CC,KAAK;IACLC,SAAS;AACb;AAEA,OAAO,MAAMC,eAAeR,QAA6B,CAACS,OAAOC;IAC7D,MAAM,EAACC,SAAS,EAAEJ,OAAO,EAAED,GAAG,EAAEM,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,QAAO,GACtGlB,SAAS,gBAAgBI,cAAcI;IAC3C,MAAMW,YAAYlB,UAA+B;QAC7CmB,MAAM;QACNjB;QACAK;QACAI;QACAE;QACAD;QACAE;QACAC;IACJ;IAEA,MAAMK,MAAMF,UAAU;IAEtB,qBACI,KAACrB;QACGQ,SAASA;QACTD,KAAKA;QACLO,WAAWV,KAAKmB,IAAIT,SAAS,EAAE;YAAC,CAACT,QAAQmB,MAAM,CAAC,EAAE,CAAC,CAACZ;QAAS;QAC7DI,OAAOO,IAAIP,KAAK;QAChBL,KAAKA;QACJ,GAAGS,MAAM;kBAETP;;AAGb,GAAG"}
1
+ {"version":3,"sources":["../../../../src/components/StickyFooter/StickyFooter.tsx"],"sourcesContent":["import {Factory, Group, GroupProps, StylesApiProps, factory, useProps, useStyles} from '@mantine/core';\nimport clsx from 'clsx';\nimport {ReactNode} from 'react';\nimport classes from './StickyFooter.module.css';\n\nexport interface StickyFooterProps\n extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'>, StylesApiProps<StickyFooterFactory> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n /**\n * Use variant 'modal-footer' when rendering the `StickyFooter` inside `Modal`.\n *\n * The 'modal-footer' removes the modal's default padding so that the footer properly hugs the bottom of the modal.\n * It also adds a border on top of the footer.\n *\n * @deprecated Use Modal.Footer from @coveord/plasma-mantine/Modal for modal footers. For other cases, the 'default' variant should suffice.\n */\n variant?: 'default' | 'modal-footer';\n}\n\nexport type StickyFooterStylesNames = 'root';\n\nexport type StickyFooterFactory = Factory<{\n props: StickyFooterProps;\n ref: HTMLDivElement;\n stylesNames: StickyFooterStylesNames;\n}>;\n\nconst defaultProps: Partial<StickyFooterProps> = {\n gap: 'sm',\n justify: 'flex-end',\n};\n\nexport const StickyFooter = factory<StickyFooterFactory>((props, ref) => {\n const {borderTop, justify, gap, children, className, classNames, style, styles, unstyled, vars, ...others} =\n useProps('StickyFooter', defaultProps, props);\n const getStyles = useStyles<StickyFooterFactory>({\n name: 'StickyFooter',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const css = getStyles('root');\n\n return (\n <Group\n justify={justify}\n gap={gap}\n className={clsx(css.className, {[classes.border]: !!borderTop})}\n style={css.style}\n ref={ref}\n {...others}\n >\n {children}\n </Group>\n );\n});\n\nStickyFooter.displayName = 'StickyFooter';\n"],"names":["Group","factory","useProps","useStyles","clsx","classes","defaultProps","gap","justify","StickyFooter","props","ref","borderTop","children","className","classNames","style","styles","unstyled","vars","others","getStyles","name","css","border","displayName"],"mappings":";AAAA,SAAiBA,KAAK,EAA8BC,OAAO,EAAEC,QAAQ,EAAEC,SAAS,QAAO,gBAAgB;AACvG,OAAOC,UAAU,OAAO;AAExB,OAAOC,aAAa,4BAA4B;AA+BhD,MAAMC,eAA2C;IAC7CC,KAAK;IACLC,SAAS;AACb;AAEA,OAAO,MAAMC,eAAeR,QAA6B,CAACS,OAAOC;IAC7D,MAAM,EAACC,SAAS,EAAEJ,OAAO,EAAED,GAAG,EAAEM,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,QAAO,GACtGlB,SAAS,gBAAgBI,cAAcI;IAC3C,MAAMW,YAAYlB,UAA+B;QAC7CmB,MAAM;QACNjB;QACAK;QACAI;QACAE;QACAD;QACAE;QACAC;IACJ;IAEA,MAAMK,MAAMF,UAAU;IAEtB,qBACI,KAACrB;QACGQ,SAASA;QACTD,KAAKA;QACLO,WAAWV,KAAKmB,IAAIT,SAAS,EAAE;YAAC,CAACT,QAAQmB,MAAM,CAAC,EAAE,CAAC,CAACZ;QAAS;QAC7DI,OAAOO,IAAIP,KAAK;QAChBL,KAAKA;QACJ,GAAGS,MAAM;kBAETP;;AAGb,GAAG;AAEHJ,aAAagB,WAAW,GAAG"}
@@ -114,10 +114,6 @@
114
114
  }
115
115
  }
116
116
 
117
- .lastUpdatedRoot {
118
- min-height: 98px;
119
- }
120
-
121
117
  .lastUpdatedLabel {
122
118
  color: var(--mantine-color-text);
123
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TableDateRangePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-date-range-picker/TableDateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAE,OAAO,EAA0B,MAAM,eAAe,CAAC;AAEjG,OAAO,EAAkB,KAAK,oBAAoB,EAAC,MAAM,0CAA0C,CAAC;AACpG,OAAO,EAAC,qBAAqB,EAAC,MAAM,sDAAsD,CAAC;AAI3F,MAAM,MAAM,+BAA+B,GAAG,eAAe,CAAC;AAE9D,MAAM,WAAW,yBACb,SAAQ,QAAQ,EACZ,sBAAsB,CAAC,2BAA2B,CAAC,EACnD,IAAI,CAAC,oBAAoB,EAAE,aAAa,GAAG,YAAY,GAAG,UAAU,GAAG,oBAAoB,CAAC;IAChG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CACnD;AAED,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;IAC9C,KAAK,EAAE,yBAAyB,CAAC;IACjC,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,+BAA+B,CAAC;IAC7C,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAMH,eAAO,MAAM,oBAAoB;WAVtB,yBAAyB;SAC3B,cAAc;iBACN,+BAA+B;cAClC,IAAI;EAkDhB,CAAC"}
1
+ {"version":3,"file":"TableDateRangePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-date-range-picker/TableDateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAE,OAAO,EAA0B,MAAM,eAAe,CAAC;AAEjG,OAAO,EAAkB,KAAK,oBAAoB,EAAC,MAAM,0CAA0C,CAAC;AACpG,OAAO,EAAC,qBAAqB,EAAC,MAAM,sDAAsD,CAAC;AAI3F,MAAM,MAAM,+BAA+B,GAAG,eAAe,CAAC;AAE9D,MAAM,WAAW,yBACb,SACI,QAAQ,EACR,sBAAsB,CAAC,2BAA2B,CAAC,EACnD,IAAI,CAAC,oBAAoB,EAAE,aAAa,GAAG,YAAY,GAAG,UAAU,GAAG,oBAAoB,CAAC;IAChG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CACnD;AAED,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC;IAC9C,KAAK,EAAE,yBAAyB,CAAC;IACjC,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,+BAA+B,CAAC;IAC7C,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAMH,eAAO,MAAM,oBAAoB;WAVtB,yBAAyB;SAC3B,cAAc;iBACN,+BAA+B;cAClC,IAAI;EAkDhB,CAAC"}
@@ -42,5 +42,6 @@ export const TableDateRangePicker = factory((props, ref)=>{
42
42
  })
43
43
  });
44
44
  });
45
+ TableDateRangePicker.displayName = 'Table.DateRangePicker';
45
46
 
46
47
  //# sourceMappingURL=TableDateRangePicker.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-date-range-picker/TableDateRangePicker.tsx"],"sourcesContent":["import {BoxProps, CompoundStylesApiProps, Factory, factory, Grid, useProps} from '@mantine/core';\nimport {type DatesRangeValue, type DateStringValue} from '@mantine/dates';\nimport {DateRangePicker, type DateRangePickerProps} from '../../DateRangePicker/DateRangePicker.js';\nimport {DateRangePickerPreset} from '../../DateRangePicker/DateRangePickerPresetSelect.js';\nimport {TableComponentsOrder} from '../Table.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TableDateRangePickerStylesNames = 'dateRangeRoot';\n\nexport interface TableDateRangePickerProps\n extends BoxProps,\n CompoundStylesApiProps<TableDateRangePickerFactory>,\n Pick<DateRangePickerProps, 'placeholder' | 'startProps' | 'endProps' | 'rangeCalendarProps'> {\n /**\n * An object containing date presets.\n * If empty the preset dropdown won't be shown\n *\n * @example\n * {\n * january: {label: 'January', range: [new Date(2022, 0, 1), new Date(2022, 0, 31)]},\n * february: {label: 'February', range: [new Date(2022, 1, 1), new Date(2022, 1, 28)]}\n * }\n * @default {}\n */\n presets?: Record<string, DateRangePickerPreset>;\n}\n\nexport type TableDateRangePickerFactory = Factory<{\n props: TableDateRangePickerProps;\n ref: HTMLDivElement;\n stylesNames: TableDateRangePickerStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableDateRangePickerProps> = {\n presets: {},\n};\n\nexport const TableDateRangePicker = factory<TableDateRangePickerFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {\n presets,\n rangeCalendarProps,\n startProps,\n endProps,\n placeholder,\n classNames,\n className,\n styles,\n style,\n vars,\n ...others\n } = useProps('PlasmaTableDateRangePicker', defaultProps, props);\n\n const onChange = (dates: DatesRangeValue<DateStringValue | null>) => {\n store.setDateRange(dates);\n store.setPagination({pageIndex: 0, pageSize: store.state.pagination.pageSize});\n };\n\n const stylesApiProps = {classNames, styles};\n\n return (\n <Grid.Col\n span=\"content\"\n order={TableComponentsOrder.DateRangePicker}\n ref={ref}\n {...getStyles('dateRangeRoot', {className, style, ...stylesApiProps})}\n {...others}\n >\n <DateRangePicker\n value={store.state.dateRange}\n onChange={onChange}\n presets={presets}\n rangeCalendarProps={rangeCalendarProps}\n startProps={startProps}\n endProps={endProps}\n placeholder={placeholder}\n miw={220}\n />\n </Grid.Col>\n );\n});\n"],"names":["factory","Grid","useProps","DateRangePicker","TableComponentsOrder","useTableContext","defaultProps","presets","TableDateRangePicker","props","ref","store","getStyles","rangeCalendarProps","startProps","endProps","placeholder","classNames","className","styles","style","vars","others","onChange","dates","setDateRange","setPagination","pageIndex","pageSize","state","pagination","stylesApiProps","Col","span","order","value","dateRange","miw"],"mappings":";AAAA,SAAmDA,OAAO,EAAEC,IAAI,EAAEC,QAAQ,QAAO,gBAAgB;AAEjG,SAAQC,eAAe,QAAkC,2CAA2C;AAEpG,SAAQC,oBAAoB,QAAO,cAAc;AACjD,SAAQC,eAAe,QAAO,qBAAqB;AA6BnD,MAAMC,eAAmD;IACrDC,SAAS,CAAC;AACd;AAEA,OAAO,MAAMC,uBAAuBR,QAAqC,CAACS,OAAOC;IAC7E,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGP;IAC3B,MAAM,EACFE,OAAO,EACPM,kBAAkB,EAClBC,UAAU,EACVC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,KAAK,EACLC,IAAI,EACJ,GAAGC,QACN,GAAGpB,SAAS,8BAA8BI,cAAcG;IAEzD,MAAMc,WAAW,CAACC;QACdb,MAAMc,YAAY,CAACD;QACnBb,MAAMe,aAAa,CAAC;YAACC,WAAW;YAAGC,UAAUjB,MAAMkB,KAAK,CAACC,UAAU,CAACF,QAAQ;QAAA;IAChF;IAEA,MAAMG,iBAAiB;QAACd;QAAYE;IAAM;IAE1C,qBACI,KAAClB,KAAK+B,GAAG;QACLC,MAAK;QACLC,OAAO9B,qBAAqBD,eAAe;QAC3CO,KAAKA;QACJ,GAAGE,UAAU,iBAAiB;YAACM;YAAWE;YAAO,GAAGW,cAAc;QAAA,EAAE;QACpE,GAAGT,MAAM;kBAEV,cAAA,KAACnB;YACGgC,OAAOxB,MAAMkB,KAAK,CAACO,SAAS;YAC5Bb,UAAUA;YACVhB,SAASA;YACTM,oBAAoBA;YACpBC,YAAYA;YACZC,UAAUA;YACVC,aAAaA;YACbqB,KAAK;;;AAIrB,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-date-range-picker/TableDateRangePicker.tsx"],"sourcesContent":["import {BoxProps, CompoundStylesApiProps, Factory, factory, Grid, useProps} from '@mantine/core';\nimport {type DatesRangeValue, type DateStringValue} from '@mantine/dates';\nimport {DateRangePicker, type DateRangePickerProps} from '../../DateRangePicker/DateRangePicker.js';\nimport {DateRangePickerPreset} from '../../DateRangePicker/DateRangePickerPresetSelect.js';\nimport {TableComponentsOrder} from '../Table.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TableDateRangePickerStylesNames = 'dateRangeRoot';\n\nexport interface TableDateRangePickerProps\n extends\n BoxProps,\n CompoundStylesApiProps<TableDateRangePickerFactory>,\n Pick<DateRangePickerProps, 'placeholder' | 'startProps' | 'endProps' | 'rangeCalendarProps'> {\n /**\n * An object containing date presets.\n * If empty the preset dropdown won't be shown\n *\n * @example\n * {\n * january: {label: 'January', range: [new Date(2022, 0, 1), new Date(2022, 0, 31)]},\n * february: {label: 'February', range: [new Date(2022, 1, 1), new Date(2022, 1, 28)]}\n * }\n * @default {}\n */\n presets?: Record<string, DateRangePickerPreset>;\n}\n\nexport type TableDateRangePickerFactory = Factory<{\n props: TableDateRangePickerProps;\n ref: HTMLDivElement;\n stylesNames: TableDateRangePickerStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableDateRangePickerProps> = {\n presets: {},\n};\n\nexport const TableDateRangePicker = factory<TableDateRangePickerFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {\n presets,\n rangeCalendarProps,\n startProps,\n endProps,\n placeholder,\n classNames,\n className,\n styles,\n style,\n vars,\n ...others\n } = useProps('PlasmaTableDateRangePicker', defaultProps, props);\n\n const onChange = (dates: DatesRangeValue<DateStringValue | null>) => {\n store.setDateRange(dates);\n store.setPagination({pageIndex: 0, pageSize: store.state.pagination.pageSize});\n };\n\n const stylesApiProps = {classNames, styles};\n\n return (\n <Grid.Col\n span=\"content\"\n order={TableComponentsOrder.DateRangePicker}\n ref={ref}\n {...getStyles('dateRangeRoot', {className, style, ...stylesApiProps})}\n {...others}\n >\n <DateRangePicker\n value={store.state.dateRange}\n onChange={onChange}\n presets={presets}\n rangeCalendarProps={rangeCalendarProps}\n startProps={startProps}\n endProps={endProps}\n placeholder={placeholder}\n miw={220}\n />\n </Grid.Col>\n );\n});\n\nTableDateRangePicker.displayName = 'Table.DateRangePicker';\n"],"names":["factory","Grid","useProps","DateRangePicker","TableComponentsOrder","useTableContext","defaultProps","presets","TableDateRangePicker","props","ref","store","getStyles","rangeCalendarProps","startProps","endProps","placeholder","classNames","className","styles","style","vars","others","onChange","dates","setDateRange","setPagination","pageIndex","pageSize","state","pagination","stylesApiProps","Col","span","order","value","dateRange","miw","displayName"],"mappings":";AAAA,SAAmDA,OAAO,EAAEC,IAAI,EAAEC,QAAQ,QAAO,gBAAgB;AAEjG,SAAQC,eAAe,QAAkC,2CAA2C;AAEpG,SAAQC,oBAAoB,QAAO,cAAc;AACjD,SAAQC,eAAe,QAAO,qBAAqB;AA8BnD,MAAMC,eAAmD;IACrDC,SAAS,CAAC;AACd;AAEA,OAAO,MAAMC,uBAAuBR,QAAqC,CAACS,OAAOC;IAC7E,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGP;IAC3B,MAAM,EACFE,OAAO,EACPM,kBAAkB,EAClBC,UAAU,EACVC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,KAAK,EACLC,IAAI,EACJ,GAAGC,QACN,GAAGpB,SAAS,8BAA8BI,cAAcG;IAEzD,MAAMc,WAAW,CAACC;QACdb,MAAMc,YAAY,CAACD;QACnBb,MAAMe,aAAa,CAAC;YAACC,WAAW;YAAGC,UAAUjB,MAAMkB,KAAK,CAACC,UAAU,CAACF,QAAQ;QAAA;IAChF;IAEA,MAAMG,iBAAiB;QAACd;QAAYE;IAAM;IAE1C,qBACI,KAAClB,KAAK+B,GAAG;QACLC,MAAK;QACLC,OAAO9B,qBAAqBD,eAAe;QAC3CO,KAAKA;QACJ,GAAGE,UAAU,iBAAiB;YAACM;YAAWE;YAAO,GAAGW,cAAc;QAAA,EAAE;QACpE,GAAGT,MAAM;kBAEV,cAAA,KAACnB;YACGgC,OAAOxB,MAAMkB,KAAK,CAACO,SAAS;YAC5Bb,UAAUA;YACVhB,SAASA;YACTM,oBAAoBA;YACpBC,YAAYA;YACZC,UAAUA;YACVC,aAAaA;YACbqB,KAAK;;;AAIrB,GAAG;AAEH7B,qBAAqB8B,WAAW,GAAG"}
@@ -69,5 +69,6 @@ export const TableFilter = factory((props, ref)=>{
69
69
  })
70
70
  });
71
71
  });
72
+ TableFilter.displayName = 'Table.Filter';
72
73
 
73
74
  //# sourceMappingURL=TableFilter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-filter/TableFilter.tsx"],"sourcesContent":["import {IconSearch, IconX} from '@coveord/plasma-react-icons';\nimport {BoxProps, CompoundStylesApiProps, Factory, factory, Grid, TextInput, useProps} from '@mantine/core';\nimport {useDebouncedValue, useDidUpdate} from '@mantine/hooks';\nimport {ChangeEventHandler, MouseEventHandler, useEffect, useState} from 'react';\n\nimport {ActionIcon} from '../../ActionIcon/ActionIcon.js';\nimport {TableComponentsOrder} from '../Table.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TableFilterStylesNames = 'filterRoot' | 'filterWrapper' | 'filterEmpty';\n\nexport interface TableFilterProps extends BoxProps, CompoundStylesApiProps<TableFilterFactory> {\n /**\n * The placeholder for the filter input\n *\n * @default \"Search by any field\"\n */\n placeholder?: string;\n}\n\nexport type TableFilterFactory = Factory<{\n props: TableFilterProps;\n ref: HTMLDivElement;\n stylesNames: TableFilterStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableFilterProps> = {\n placeholder: 'Search by any field',\n};\n\nexport const TableFilter = factory<TableFilterFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {placeholder, classNames, className, styles, style, vars, ...others} = useProps(\n 'PlasmaTableFilter',\n defaultProps,\n props,\n );\n const [filter, setFilter] = useState(store.state.globalFilter);\n const [debounced, cancel] = useDebouncedValue(filter, 300);\n\n useDidUpdate(() => {\n store.setGlobalFilter(debounced);\n store.setPagination({pageIndex: 0, pageSize: store.state.pagination.pageSize});\n\n return cancel;\n }, [debounced]);\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const {value} = event.currentTarget;\n setFilter(value);\n };\n\n const handleClear: MouseEventHandler<HTMLButtonElement> = () => {\n setFilter('');\n };\n\n useEffect(() => {\n setFilter(store.state.globalFilter);\n }, [store.state.globalFilter]);\n\n const stylesApiProps = {classNames, styles};\n\n return (\n <Grid.Col\n span=\"content\"\n order={TableComponentsOrder.Filter}\n ref={ref}\n {...getStyles('filterRoot', {className, style, ...stylesApiProps})}\n {...others}\n >\n <TextInput\n {...getStyles('filterWrapper', stylesApiProps)}\n placeholder={placeholder}\n autoComplete=\"off\"\n rightSection={\n filter ? (\n <ActionIcon.Quaternary onClick={handleClear}>\n <IconX aria-label=\"clear\" size={16} />\n </ActionIcon.Quaternary>\n ) : (\n <IconSearch size={16} {...getStyles('filterEmpty', stylesApiProps)} />\n )\n }\n value={filter}\n onChange={handleChange}\n />\n </Grid.Col>\n );\n});\n"],"names":["IconSearch","IconX","factory","Grid","TextInput","useProps","useDebouncedValue","useDidUpdate","useEffect","useState","ActionIcon","TableComponentsOrder","useTableContext","defaultProps","placeholder","TableFilter","props","ref","store","getStyles","classNames","className","styles","style","vars","others","filter","setFilter","state","globalFilter","debounced","cancel","setGlobalFilter","setPagination","pageIndex","pageSize","pagination","handleChange","event","value","currentTarget","handleClear","stylesApiProps","Col","span","order","Filter","autoComplete","rightSection","Quaternary","onClick","aria-label","size","onChange"],"mappings":";AAAA,SAAQA,UAAU,EAAEC,KAAK,QAAO,8BAA8B;AAC9D,SAAmDC,OAAO,EAAEC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAO,gBAAgB;AAC5G,SAAQC,iBAAiB,EAAEC,YAAY,QAAO,iBAAiB;AAC/D,SAA+CC,SAAS,EAAEC,QAAQ,QAAO,QAAQ;AAEjF,SAAQC,UAAU,QAAO,iCAAiC;AAC1D,SAAQC,oBAAoB,QAAO,cAAc;AACjD,SAAQC,eAAe,QAAO,qBAAqB;AAoBnD,MAAMC,eAA0C;IAC5CC,aAAa;AACjB;AAEA,OAAO,MAAMC,cAAcb,QAA4B,CAACc,OAAOC;IAC3D,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGP;IAC3B,MAAM,EAACE,WAAW,EAAEM,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGC,QAAO,GAAGpB,SACzE,qBACAQ,cACAG;IAEJ,MAAM,CAACU,QAAQC,UAAU,GAAGlB,SAASS,MAAMU,KAAK,CAACC,YAAY;IAC7D,MAAM,CAACC,WAAWC,OAAO,GAAGzB,kBAAkBoB,QAAQ;IAEtDnB,aAAa;QACTW,MAAMc,eAAe,CAACF;QACtBZ,MAAMe,aAAa,CAAC;YAACC,WAAW;YAAGC,UAAUjB,MAAMU,KAAK,CAACQ,UAAU,CAACD,QAAQ;QAAA;QAE5E,OAAOJ;IACX,GAAG;QAACD;KAAU;IAEd,MAAMO,eAAqD,CAACC;QACxD,MAAM,EAACC,KAAK,EAAC,GAAGD,MAAME,aAAa;QACnCb,UAAUY;IACd;IAEA,MAAME,cAAoD;QACtDd,UAAU;IACd;IAEAnB,UAAU;QACNmB,UAAUT,MAAMU,KAAK,CAACC,YAAY;IACtC,GAAG;QAACX,MAAMU,KAAK,CAACC,YAAY;KAAC;IAE7B,MAAMa,iBAAiB;QAACtB;QAAYE;IAAM;IAE1C,qBACI,KAACnB,KAAKwC,GAAG;QACLC,MAAK;QACLC,OAAOlC,qBAAqBmC,MAAM;QAClC7B,KAAKA;QACJ,GAAGE,UAAU,cAAc;YAACE;YAAWE;YAAO,GAAGmB,cAAc;QAAA,EAAE;QACjE,GAAGjB,MAAM;kBAEV,cAAA,KAACrB;YACI,GAAGe,UAAU,iBAAiBuB,eAAe;YAC9C5B,aAAaA;YACbiC,cAAa;YACbC,cACItB,uBACI,KAAChB,WAAWuC,UAAU;gBAACC,SAAST;0BAC5B,cAAA,KAACxC;oBAAMkD,cAAW;oBAAQC,MAAM;;+BAGpC,KAACpD;gBAAWoD,MAAM;gBAAK,GAAGjC,UAAU,eAAeuB,eAAe;;YAG1EH,OAAOb;YACP2B,UAAUhB;;;AAI1B,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-filter/TableFilter.tsx"],"sourcesContent":["import {IconSearch, IconX} from '@coveord/plasma-react-icons';\nimport {BoxProps, CompoundStylesApiProps, Factory, factory, Grid, TextInput, useProps} from '@mantine/core';\nimport {useDebouncedValue, useDidUpdate} from '@mantine/hooks';\nimport {ChangeEventHandler, MouseEventHandler, useEffect, useState} from 'react';\n\nimport {ActionIcon} from '../../ActionIcon/ActionIcon.js';\nimport {TableComponentsOrder} from '../Table.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TableFilterStylesNames = 'filterRoot' | 'filterWrapper' | 'filterEmpty';\n\nexport interface TableFilterProps extends BoxProps, CompoundStylesApiProps<TableFilterFactory> {\n /**\n * The placeholder for the filter input\n *\n * @default \"Search by any field\"\n */\n placeholder?: string;\n}\n\nexport type TableFilterFactory = Factory<{\n props: TableFilterProps;\n ref: HTMLDivElement;\n stylesNames: TableFilterStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableFilterProps> = {\n placeholder: 'Search by any field',\n};\n\nexport const TableFilter = factory<TableFilterFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {placeholder, classNames, className, styles, style, vars, ...others} = useProps(\n 'PlasmaTableFilter',\n defaultProps,\n props,\n );\n const [filter, setFilter] = useState(store.state.globalFilter);\n const [debounced, cancel] = useDebouncedValue(filter, 300);\n\n useDidUpdate(() => {\n store.setGlobalFilter(debounced);\n store.setPagination({pageIndex: 0, pageSize: store.state.pagination.pageSize});\n\n return cancel;\n }, [debounced]);\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const {value} = event.currentTarget;\n setFilter(value);\n };\n\n const handleClear: MouseEventHandler<HTMLButtonElement> = () => {\n setFilter('');\n };\n\n useEffect(() => {\n setFilter(store.state.globalFilter);\n }, [store.state.globalFilter]);\n\n const stylesApiProps = {classNames, styles};\n\n return (\n <Grid.Col\n span=\"content\"\n order={TableComponentsOrder.Filter}\n ref={ref}\n {...getStyles('filterRoot', {className, style, ...stylesApiProps})}\n {...others}\n >\n <TextInput\n {...getStyles('filterWrapper', stylesApiProps)}\n placeholder={placeholder}\n autoComplete=\"off\"\n rightSection={\n filter ? (\n <ActionIcon.Quaternary onClick={handleClear}>\n <IconX aria-label=\"clear\" size={16} />\n </ActionIcon.Quaternary>\n ) : (\n <IconSearch size={16} {...getStyles('filterEmpty', stylesApiProps)} />\n )\n }\n value={filter}\n onChange={handleChange}\n />\n </Grid.Col>\n );\n});\n\nTableFilter.displayName = 'Table.Filter';\n"],"names":["IconSearch","IconX","factory","Grid","TextInput","useProps","useDebouncedValue","useDidUpdate","useEffect","useState","ActionIcon","TableComponentsOrder","useTableContext","defaultProps","placeholder","TableFilter","props","ref","store","getStyles","classNames","className","styles","style","vars","others","filter","setFilter","state","globalFilter","debounced","cancel","setGlobalFilter","setPagination","pageIndex","pageSize","pagination","handleChange","event","value","currentTarget","handleClear","stylesApiProps","Col","span","order","Filter","autoComplete","rightSection","Quaternary","onClick","aria-label","size","onChange","displayName"],"mappings":";AAAA,SAAQA,UAAU,EAAEC,KAAK,QAAO,8BAA8B;AAC9D,SAAmDC,OAAO,EAAEC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAO,gBAAgB;AAC5G,SAAQC,iBAAiB,EAAEC,YAAY,QAAO,iBAAiB;AAC/D,SAA+CC,SAAS,EAAEC,QAAQ,QAAO,QAAQ;AAEjF,SAAQC,UAAU,QAAO,iCAAiC;AAC1D,SAAQC,oBAAoB,QAAO,cAAc;AACjD,SAAQC,eAAe,QAAO,qBAAqB;AAoBnD,MAAMC,eAA0C;IAC5CC,aAAa;AACjB;AAEA,OAAO,MAAMC,cAAcb,QAA4B,CAACc,OAAOC;IAC3D,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGP;IAC3B,MAAM,EAACE,WAAW,EAAEM,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGC,QAAO,GAAGpB,SACzE,qBACAQ,cACAG;IAEJ,MAAM,CAACU,QAAQC,UAAU,GAAGlB,SAASS,MAAMU,KAAK,CAACC,YAAY;IAC7D,MAAM,CAACC,WAAWC,OAAO,GAAGzB,kBAAkBoB,QAAQ;IAEtDnB,aAAa;QACTW,MAAMc,eAAe,CAACF;QACtBZ,MAAMe,aAAa,CAAC;YAACC,WAAW;YAAGC,UAAUjB,MAAMU,KAAK,CAACQ,UAAU,CAACD,QAAQ;QAAA;QAE5E,OAAOJ;IACX,GAAG;QAACD;KAAU;IAEd,MAAMO,eAAqD,CAACC;QACxD,MAAM,EAACC,KAAK,EAAC,GAAGD,MAAME,aAAa;QACnCb,UAAUY;IACd;IAEA,MAAME,cAAoD;QACtDd,UAAU;IACd;IAEAnB,UAAU;QACNmB,UAAUT,MAAMU,KAAK,CAACC,YAAY;IACtC,GAAG;QAACX,MAAMU,KAAK,CAACC,YAAY;KAAC;IAE7B,MAAMa,iBAAiB;QAACtB;QAAYE;IAAM;IAE1C,qBACI,KAACnB,KAAKwC,GAAG;QACLC,MAAK;QACLC,OAAOlC,qBAAqBmC,MAAM;QAClC7B,KAAKA;QACJ,GAAGE,UAAU,cAAc;YAACE;YAAWE;YAAO,GAAGmB,cAAc;QAAA,EAAE;QACjE,GAAGjB,MAAM;kBAEV,cAAA,KAACrB;YACI,GAAGe,UAAU,iBAAiBuB,eAAe;YAC9C5B,aAAaA;YACbiC,cAAa;YACbC,cACItB,uBACI,KAAChB,WAAWuC,UAAU;gBAACC,SAAST;0BAC5B,cAAA,KAACxC;oBAAMkD,cAAW;oBAAQC,MAAM;;+BAGpC,KAACpD;gBAAWoD,MAAM;gBAAK,GAAGjC,UAAU,eAAeuB,eAAe;;YAG1EH,OAAOb;YACP2B,UAAUhB;;;AAI1B,GAAG;AAEHtB,YAAYuC,WAAW,GAAG"}
@@ -6,5 +6,6 @@ export const TableFooter = ({ ...others })=>/*#__PURE__*/ _jsx(Group, {
6
6
  py: "md",
7
7
  ...others
8
8
  });
9
+ TableFooter.displayName = 'Table.Footer';
9
10
 
10
11
  //# sourceMappingURL=TableFooter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-footer/TableFooter.tsx"],"sourcesContent":["import {Group, GroupProps} from '@mantine/core';\nimport {FunctionComponent, ReactNode} from 'react';\n\nexport interface TableFooterProps extends GroupProps {\n children?: ReactNode;\n}\n\nexport const TableFooter: FunctionComponent<TableFooterProps> = ({...others}) => (\n <Group justify=\"space-between\" px=\"xl\" py=\"md\" {...others} />\n);\n"],"names":["Group","TableFooter","others","justify","px","py"],"mappings":";AAAA,SAAQA,KAAK,QAAmB,gBAAgB;AAOhD,OAAO,MAAMC,cAAmD,CAAC,EAAC,GAAGC,QAAO,iBACxE,KAACF;QAAMG,SAAQ;QAAgBC,IAAG;QAAKC,IAAG;QAAM,GAAGH,MAAM;OAC3D"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-footer/TableFooter.tsx"],"sourcesContent":["import {Group, GroupProps} from '@mantine/core';\nimport {FunctionComponent, ReactNode} from 'react';\n\nexport interface TableFooterProps extends GroupProps {\n children?: ReactNode;\n}\n\nexport const TableFooter: FunctionComponent<TableFooterProps> = ({...others}) => (\n <Group justify=\"space-between\" px=\"xl\" py=\"md\" {...others} />\n);\n\nTableFooter.displayName = 'Table.Footer';\n"],"names":["Group","TableFooter","others","justify","px","py","displayName"],"mappings":";AAAA,SAAQA,KAAK,QAAmB,gBAAgB;AAOhD,OAAO,MAAMC,cAAmD,CAAC,EAAC,GAAGC,QAAO,iBACxE,KAACF;QAAMG,SAAQ;QAAgBC,IAAG;QAAKC,IAAG;QAAM,GAAGH,MAAM;OAC3D;AAEFD,YAAYK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-header/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAM,QAAQ,EAAE,sBAAsB,EAAW,OAAO,EAA0B,MAAM,eAAe,CAAC;AAC/G,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAQhC,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,YAAY,GAAG,iBAAiB,GAAG,WAAW,CAAC;AAEnG,MAAM,WAAW,gBACb,SAAQ,IAAI,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC,EACpD,sBAAsB,CAAC,kBAAkB,CAAC;IAE9C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,sBAAsB,CAAC;IACpC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AASH,eAAO,MAAM,WAAW;WAbb,gBAAgB;SAClB,cAAc;iBACN,sBAAsB;cACzB,IAAI;EAmEhB,CAAC"}
1
+ {"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-header/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAM,QAAQ,EAAE,sBAAsB,EAAW,OAAO,EAA0B,MAAM,eAAe,CAAC;AAC/G,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAQhC,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,YAAY,GAAG,iBAAiB,GAAG,WAAW,CAAC;AAEnG,MAAM,WAAW,gBACb,SAAQ,IAAI,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC;IAEpG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,sBAAsB,CAAC;IACpC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AASH,eAAO,MAAM,WAAW;WAbb,gBAAgB;SAClB,cAAc;iBACN,sBAAsB;cACzB,IAAI;EAmEhB,CAAC"}
@@ -3,8 +3,8 @@ import { CrossSize16Px } from '@coveord/plasma-react-icons';
3
3
  import { Box, factory, Grid, Tooltip, useProps } from '@mantine/core';
4
4
  import { Button } from '../../Button/Button.js';
5
5
  import { TableLayoutControl } from '../layouts/TableLayoutControl.js';
6
- import { TableComponentsOrder } from '../Table.js';
7
6
  import { TableHeaderActions } from '../table-actions/TableHeaderActions.js';
7
+ import { TableComponentsOrder } from '../Table.js';
8
8
  import { useTableContext } from '../TableContext.js';
9
9
  const defaultProps = {
10
10
  unselectAllLabel: 'Unselect all',
@@ -68,5 +68,6 @@ export const TableHeader = factory((props, ref)=>{
68
68
  })
69
69
  });
70
70
  });
71
+ TableHeader.displayName = 'Table.Header';
71
72
 
72
73
  //# sourceMappingURL=TableHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-header/TableHeader.tsx"],"sourcesContent":["import {CrossSize16Px} from '@coveord/plasma-react-icons';\nimport {Box, BoxProps, CompoundStylesApiProps, factory, Factory, Grid, Tooltip, useProps} from '@mantine/core';\nimport {ReactNode} from 'react';\n\nimport {Button} from '../../Button/Button.js';\nimport {TableLayoutControl} from '../layouts/TableLayoutControl.js';\nimport {TableComponentsOrder} from '../Table.js';\nimport {TableHeaderActions} from '../table-actions/TableHeaderActions.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TableHeaderStylesNames = 'headerRoot' | 'headerGrid' | 'headerGridInner' | 'headerCol';\n\nexport interface TableHeaderProps\n extends Omit<BoxProps, 'classNames' | 'styles' | 'vars'>,\n CompoundStylesApiProps<TableHeaderFactory> {\n /* Children of header (ie: actions, datepicker, etc.) */\n children?: ReactNode;\n unselectAllLabel?: string;\n selectedCountLabel?: (count: number) => string;\n /**\n * Whether to show actions when rows are selected\n *\n * default true\n */\n showActions?: boolean;\n /**\n * Whether to show a border on top of the header\n *\n * default true\n */\n borderTop?: boolean;\n}\n\nexport type TableHeaderFactory = Factory<{\n props: TableHeaderProps;\n ref: HTMLDivElement;\n stylesNames: TableHeaderStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableHeaderProps> = {\n unselectAllLabel: 'Unselect all',\n selectedCountLabel: (count) => `${count} selected`,\n showActions: true,\n borderTop: true,\n};\n\nexport const TableHeader = factory<TableHeaderFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {\n showActions,\n unselectAllLabel,\n selectedCountLabel,\n borderTop,\n children,\n classNames,\n className,\n styles,\n style,\n vars: _vars,\n ...others\n } = useProps('PlasmaTableHeader', defaultProps, props);\n const selectedRows = store.getSelectedRows();\n\n const stylesApiProps = {classNames, styles};\n const innerStyles = getStyles('headerGridInner', stylesApiProps);\n const gridStyles = getStyles('headerGrid', stylesApiProps);\n\n return (\n <Box\n ref={ref}\n {...getStyles('headerRoot', {className, style, ...stylesApiProps})}\n {...others}\n mod={{'with-border-top': borderTop}}\n >\n <Grid\n justify=\"flex-start\"\n align=\"center\"\n classNames={{inner: innerStyles.className, root: gridStyles.className}}\n styles={{inner: innerStyles.style, root: gridStyles.style}}\n >\n {store.multiRowSelectionEnabled && selectedRows.length > 0 ? (\n <Grid.Col\n span=\"auto\"\n {...getStyles('headerCol', stylesApiProps)}\n order={TableComponentsOrder.MultiSelectInfo}\n >\n <Tooltip label={unselectAllLabel}>\n <Button.Quaternary\n onClick={store.clearRowSelection}\n disabled={!store.rowSelectionEnabled}\n leftSection={<CrossSize16Px height={16} />}\n >\n {selectedCountLabel(selectedRows.length)}\n </Button.Quaternary>\n </Tooltip>\n </Grid.Col>\n ) : null}\n {children}\n {showActions ? <TableHeaderActions /> : null}\n <TableLayoutControl />\n </Grid>\n </Box>\n );\n});\n"],"names":["CrossSize16Px","Box","factory","Grid","Tooltip","useProps","Button","TableLayoutControl","TableComponentsOrder","TableHeaderActions","useTableContext","defaultProps","unselectAllLabel","selectedCountLabel","count","showActions","borderTop","TableHeader","props","ref","store","getStyles","children","classNames","className","styles","style","vars","_vars","others","selectedRows","getSelectedRows","stylesApiProps","innerStyles","gridStyles","mod","justify","align","inner","root","multiRowSelectionEnabled","length","Col","span","order","MultiSelectInfo","label","Quaternary","onClick","clearRowSelection","disabled","rowSelectionEnabled","leftSection","height"],"mappings":";AAAA,SAAQA,aAAa,QAAO,8BAA8B;AAC1D,SAAQC,GAAG,EAAoCC,OAAO,EAAWC,IAAI,EAAEC,OAAO,EAAEC,QAAQ,QAAO,gBAAgB;AAG/G,SAAQC,MAAM,QAAO,yBAAyB;AAC9C,SAAQC,kBAAkB,QAAO,mCAAmC;AACpE,SAAQC,oBAAoB,QAAO,cAAc;AACjD,SAAQC,kBAAkB,QAAO,yCAAyC;AAC1E,SAAQC,eAAe,QAAO,qBAAqB;AAgCnD,MAAMC,eAA0C;IAC5CC,kBAAkB;IAClBC,oBAAoB,CAACC,QAAU,GAAGA,MAAM,SAAS,CAAC;IAClDC,aAAa;IACbC,WAAW;AACf;AAEA,OAAO,MAAMC,cAAcf,QAA4B,CAACgB,OAAOC;IAC3D,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGX;IAC3B,MAAM,EACFK,WAAW,EACXH,gBAAgB,EAChBC,kBAAkB,EAClBG,SAAS,EACTM,QAAQ,EACRC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,KAAK,EACLC,MAAMC,KAAK,EACX,GAAGC,QACN,GAAGxB,SAAS,qBAAqBM,cAAcO;IAChD,MAAMY,eAAeV,MAAMW,eAAe;IAE1C,MAAMC,iBAAiB;QAACT;QAAYE;IAAM;IAC1C,MAAMQ,cAAcZ,UAAU,mBAAmBW;IACjD,MAAME,aAAab,UAAU,cAAcW;IAE3C,qBACI,KAAC/B;QACGkB,KAAKA;QACJ,GAAGE,UAAU,cAAc;YAACG;YAAWE;YAAO,GAAGM,cAAc;QAAA,EAAE;QACjE,GAAGH,MAAM;QACVM,KAAK;YAAC,mBAAmBnB;QAAS;kBAElC,cAAA,MAACb;YACGiC,SAAQ;YACRC,OAAM;YACNd,YAAY;gBAACe,OAAOL,YAAYT,SAAS;gBAAEe,MAAML,WAAWV,SAAS;YAAA;YACrEC,QAAQ;gBAACa,OAAOL,YAAYP,KAAK;gBAAEa,MAAML,WAAWR,KAAK;YAAA;;gBAExDN,MAAMoB,wBAAwB,IAAIV,aAAaW,MAAM,GAAG,kBACrD,KAACtC,KAAKuC,GAAG;oBACLC,MAAK;oBACJ,GAAGtB,UAAU,aAAaW,eAAe;oBAC1CY,OAAOpC,qBAAqBqC,eAAe;8BAE3C,cAAA,KAACzC;wBAAQ0C,OAAOlC;kCACZ,cAAA,KAACN,OAAOyC,UAAU;4BACdC,SAAS5B,MAAM6B,iBAAiB;4BAChCC,UAAU,CAAC9B,MAAM+B,mBAAmB;4BACpCC,2BAAa,KAACpD;gCAAcqD,QAAQ;;sCAEnCxC,mBAAmBiB,aAAaW,MAAM;;;qBAInD;gBACHnB;gBACAP,4BAAc,KAACN,0BAAwB;8BACxC,KAACF;;;;AAIjB,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-header/TableHeader.tsx"],"sourcesContent":["import {CrossSize16Px} from '@coveord/plasma-react-icons';\nimport {Box, BoxProps, CompoundStylesApiProps, factory, Factory, Grid, Tooltip, useProps} from '@mantine/core';\nimport {ReactNode} from 'react';\n\nimport {Button} from '../../Button/Button.js';\nimport {TableLayoutControl} from '../layouts/TableLayoutControl.js';\nimport {TableHeaderActions} from '../table-actions/TableHeaderActions.js';\nimport {TableComponentsOrder} from '../Table.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TableHeaderStylesNames = 'headerRoot' | 'headerGrid' | 'headerGridInner' | 'headerCol';\n\nexport interface TableHeaderProps\n extends Omit<BoxProps, 'classNames' | 'styles' | 'vars'>, CompoundStylesApiProps<TableHeaderFactory> {\n /* Children of header (ie: actions, datepicker, etc.) */\n children?: ReactNode;\n unselectAllLabel?: string;\n selectedCountLabel?: (count: number) => string;\n /**\n * Whether to show actions when rows are selected\n *\n * default true\n */\n showActions?: boolean;\n /**\n * Whether to show a border on top of the header\n *\n * default true\n */\n borderTop?: boolean;\n}\n\nexport type TableHeaderFactory = Factory<{\n props: TableHeaderProps;\n ref: HTMLDivElement;\n stylesNames: TableHeaderStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableHeaderProps> = {\n unselectAllLabel: 'Unselect all',\n selectedCountLabel: (count) => `${count} selected`,\n showActions: true,\n borderTop: true,\n};\n\nexport const TableHeader = factory<TableHeaderFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {\n showActions,\n unselectAllLabel,\n selectedCountLabel,\n borderTop,\n children,\n classNames,\n className,\n styles,\n style,\n vars: _vars,\n ...others\n } = useProps('PlasmaTableHeader', defaultProps, props);\n const selectedRows = store.getSelectedRows();\n\n const stylesApiProps = {classNames, styles};\n const innerStyles = getStyles('headerGridInner', stylesApiProps);\n const gridStyles = getStyles('headerGrid', stylesApiProps);\n\n return (\n <Box\n ref={ref}\n {...getStyles('headerRoot', {className, style, ...stylesApiProps})}\n {...others}\n mod={{'with-border-top': borderTop}}\n >\n <Grid\n justify=\"flex-start\"\n align=\"center\"\n classNames={{inner: innerStyles.className, root: gridStyles.className}}\n styles={{inner: innerStyles.style, root: gridStyles.style}}\n >\n {store.multiRowSelectionEnabled && selectedRows.length > 0 ? (\n <Grid.Col\n span=\"auto\"\n {...getStyles('headerCol', stylesApiProps)}\n order={TableComponentsOrder.MultiSelectInfo}\n >\n <Tooltip label={unselectAllLabel}>\n <Button.Quaternary\n onClick={store.clearRowSelection}\n disabled={!store.rowSelectionEnabled}\n leftSection={<CrossSize16Px height={16} />}\n >\n {selectedCountLabel(selectedRows.length)}\n </Button.Quaternary>\n </Tooltip>\n </Grid.Col>\n ) : null}\n {children}\n {showActions ? <TableHeaderActions /> : null}\n <TableLayoutControl />\n </Grid>\n </Box>\n );\n});\n\nTableHeader.displayName = 'Table.Header';\n"],"names":["CrossSize16Px","Box","factory","Grid","Tooltip","useProps","Button","TableLayoutControl","TableHeaderActions","TableComponentsOrder","useTableContext","defaultProps","unselectAllLabel","selectedCountLabel","count","showActions","borderTop","TableHeader","props","ref","store","getStyles","children","classNames","className","styles","style","vars","_vars","others","selectedRows","getSelectedRows","stylesApiProps","innerStyles","gridStyles","mod","justify","align","inner","root","multiRowSelectionEnabled","length","Col","span","order","MultiSelectInfo","label","Quaternary","onClick","clearRowSelection","disabled","rowSelectionEnabled","leftSection","height","displayName"],"mappings":";AAAA,SAAQA,aAAa,QAAO,8BAA8B;AAC1D,SAAQC,GAAG,EAAoCC,OAAO,EAAWC,IAAI,EAAEC,OAAO,EAAEC,QAAQ,QAAO,gBAAgB;AAG/G,SAAQC,MAAM,QAAO,yBAAyB;AAC9C,SAAQC,kBAAkB,QAAO,mCAAmC;AACpE,SAAQC,kBAAkB,QAAO,yCAAyC;AAC1E,SAAQC,oBAAoB,QAAO,cAAc;AACjD,SAAQC,eAAe,QAAO,qBAAqB;AA+BnD,MAAMC,eAA0C;IAC5CC,kBAAkB;IAClBC,oBAAoB,CAACC,QAAU,GAAGA,MAAM,SAAS,CAAC;IAClDC,aAAa;IACbC,WAAW;AACf;AAEA,OAAO,MAAMC,cAAcf,QAA4B,CAACgB,OAAOC;IAC3D,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGX;IAC3B,MAAM,EACFK,WAAW,EACXH,gBAAgB,EAChBC,kBAAkB,EAClBG,SAAS,EACTM,QAAQ,EACRC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,KAAK,EACLC,MAAMC,KAAK,EACX,GAAGC,QACN,GAAGxB,SAAS,qBAAqBM,cAAcO;IAChD,MAAMY,eAAeV,MAAMW,eAAe;IAE1C,MAAMC,iBAAiB;QAACT;QAAYE;IAAM;IAC1C,MAAMQ,cAAcZ,UAAU,mBAAmBW;IACjD,MAAME,aAAab,UAAU,cAAcW;IAE3C,qBACI,KAAC/B;QACGkB,KAAKA;QACJ,GAAGE,UAAU,cAAc;YAACG;YAAWE;YAAO,GAAGM,cAAc;QAAA,EAAE;QACjE,GAAGH,MAAM;QACVM,KAAK;YAAC,mBAAmBnB;QAAS;kBAElC,cAAA,MAACb;YACGiC,SAAQ;YACRC,OAAM;YACNd,YAAY;gBAACe,OAAOL,YAAYT,SAAS;gBAAEe,MAAML,WAAWV,SAAS;YAAA;YACrEC,QAAQ;gBAACa,OAAOL,YAAYP,KAAK;gBAAEa,MAAML,WAAWR,KAAK;YAAA;;gBAExDN,MAAMoB,wBAAwB,IAAIV,aAAaW,MAAM,GAAG,kBACrD,KAACtC,KAAKuC,GAAG;oBACLC,MAAK;oBACJ,GAAGtB,UAAU,aAAaW,eAAe;oBAC1CY,OAAOnC,qBAAqBoC,eAAe;8BAE3C,cAAA,KAACzC;wBAAQ0C,OAAOlC;kCACZ,cAAA,KAACN,OAAOyC,UAAU;4BACdC,SAAS5B,MAAM6B,iBAAiB;4BAChCC,UAAU,CAAC9B,MAAM+B,mBAAmB;4BACpCC,2BAAa,KAACpD;gCAAcqD,QAAQ;;sCAEnCxC,mBAAmBiB,aAAaW,MAAM;;;qBAInD;gBACHnB;gBACAP,4BAAc,KAACP,0BAAwB;8BACxC,KAACD;;;;AAIjB,GAAG;AAEHU,YAAYqC,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableLastUpdated.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-last-updated/TableLastUpdated.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAW,OAAO,EAAC,MAAM,eAAe,CAAC;AAGjF,OAAO,EAAc,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAG/E,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAEjF,MAAM,WAAW,qBACb,SAAQ,QAAQ,EACZ,sBAAsB,CAAC,uBAAuB,CAAC,EAC/C,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC;CAAG;AAE1C,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC;IAC1C,KAAK,EAAE,qBAAqB,CAAC;IAC7B,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,2BAA2B,CAAC;IACzC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,gBAAgB;WANlB,qBAAqB;SACvB,cAAc;iBACN,2BAA2B;cAC9B,IAAI;EAiChB,CAAC"}
1
+ {"version":3,"file":"TableLastUpdated.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-last-updated/TableLastUpdated.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAW,OAAO,EAAC,MAAM,eAAe,CAAC;AAGjF,OAAO,EAAc,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAG/E,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAEjF,MAAM,WAAW,qBACb,SAAQ,QAAQ,EAAE,sBAAsB,CAAC,uBAAuB,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC;CAAG;AAEzG,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC;IAC1C,KAAK,EAAE,qBAAqB,CAAC;IAC7B,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,2BAA2B,CAAC;IACzC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,gBAAgB;WANlB,qBAAqB;SACvB,cAAc;iBACN,2BAA2B;cAC9B,IAAI;EAiChB,CAAC"}
@@ -37,5 +37,6 @@ export const TableLastUpdated = factory((props, ref)=>{
37
37
  ...lastUpdatedProps
38
38
  });
39
39
  });
40
+ TableLastUpdated.displayName = 'Table.LastUpdated';
40
41
 
41
42
  //# sourceMappingURL=TableLastUpdated.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-last-updated/TableLastUpdated.tsx"],"sourcesContent":["import {BoxProps, CompoundStylesApiProps, factory, Factory} from '@mantine/core';\nimport {useDidUpdate} from '@mantine/hooks';\nimport {useState} from 'react';\nimport {LastUpdated, LastUpdatedProps} from '../../LastUpdated/LastUpdated.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TableLastUpdatedStylesNames = 'lastUpdatedRoot' | 'lastUpdatedLabel';\n\nexport interface TableLastUpdatedProps\n extends BoxProps,\n CompoundStylesApiProps<TableLastUpdatedFactory>,\n Pick<LastUpdatedProps, 'label'> {}\n\nexport type TableLastUpdatedFactory = Factory<{\n props: TableLastUpdatedProps;\n ref: HTMLDivElement;\n stylesNames: TableLastUpdatedStylesNames;\n compound: true;\n}>;\n\nexport const TableLastUpdated = factory<TableLastUpdatedFactory>((props, ref) => {\n const {table, getStyles} = useTableContext();\n const {classNames: _classNames, styles: _styles, vars: _vars, ...lastUpdatedProps} = props;\n const [time, setTime] = useState(new Date());\n\n const {className: rootClassName, style: rootStyle} = getStyles('lastUpdatedRoot', {\n classNames: _classNames,\n styles: _styles,\n });\n\n const {className: labelClassName, style: labelStyle} = getStyles('lastUpdatedLabel', {\n classNames: _classNames,\n styles: _styles,\n });\n\n useDidUpdate(() => {\n setTime(new Date());\n }, [table.options.data]);\n\n return (\n <LastUpdated\n time={time}\n ref={ref}\n justify=\"right\"\n px=\"lg\"\n classNames={{root: rootClassName, label: labelClassName}}\n styles={{root: rootStyle, label: labelStyle}}\n {...lastUpdatedProps}\n />\n );\n});\n"],"names":["factory","useDidUpdate","useState","LastUpdated","useTableContext","TableLastUpdated","props","ref","table","getStyles","classNames","_classNames","styles","_styles","vars","_vars","lastUpdatedProps","time","setTime","Date","className","rootClassName","style","rootStyle","labelClassName","labelStyle","options","data","justify","px","root","label"],"mappings":";AAAA,SAA0CA,OAAO,QAAgB,gBAAgB;AACjF,SAAQC,YAAY,QAAO,iBAAiB;AAC5C,SAAQC,QAAQ,QAAO,QAAQ;AAC/B,SAAQC,WAAW,QAAyB,mCAAmC;AAC/E,SAAQC,eAAe,QAAO,qBAAqB;AAgBnD,OAAO,MAAMC,mBAAmBL,QAAiC,CAACM,OAAOC;IACrE,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGL;IAC3B,MAAM,EAACM,YAAYC,WAAW,EAAEC,QAAQC,OAAO,EAAEC,MAAMC,KAAK,EAAE,GAAGC,kBAAiB,GAAGV;IACrF,MAAM,CAACW,MAAMC,QAAQ,GAAGhB,SAAS,IAAIiB;IAErC,MAAM,EAACC,WAAWC,aAAa,EAAEC,OAAOC,SAAS,EAAC,GAAGd,UAAU,mBAAmB;QAC9EC,YAAYC;QACZC,QAAQC;IACZ;IAEA,MAAM,EAACO,WAAWI,cAAc,EAAEF,OAAOG,UAAU,EAAC,GAAGhB,UAAU,oBAAoB;QACjFC,YAAYC;QACZC,QAAQC;IACZ;IAEAZ,aAAa;QACTiB,QAAQ,IAAIC;IAChB,GAAG;QAACX,MAAMkB,OAAO,CAACC,IAAI;KAAC;IAEvB,qBACI,KAACxB;QACGc,MAAMA;QACNV,KAAKA;QACLqB,SAAQ;QACRC,IAAG;QACHnB,YAAY;YAACoB,MAAMT;YAAeU,OAAOP;QAAc;QACvDZ,QAAQ;YAACkB,MAAMP;YAAWQ,OAAON;QAAU;QAC1C,GAAGT,gBAAgB;;AAGhC,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-last-updated/TableLastUpdated.tsx"],"sourcesContent":["import {BoxProps, CompoundStylesApiProps, factory, Factory} from '@mantine/core';\nimport {useDidUpdate} from '@mantine/hooks';\nimport {useState} from 'react';\nimport {LastUpdated, LastUpdatedProps} from '../../LastUpdated/LastUpdated.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TableLastUpdatedStylesNames = 'lastUpdatedRoot' | 'lastUpdatedLabel';\n\nexport interface TableLastUpdatedProps\n extends BoxProps, CompoundStylesApiProps<TableLastUpdatedFactory>, Pick<LastUpdatedProps, 'label'> {}\n\nexport type TableLastUpdatedFactory = Factory<{\n props: TableLastUpdatedProps;\n ref: HTMLDivElement;\n stylesNames: TableLastUpdatedStylesNames;\n compound: true;\n}>;\n\nexport const TableLastUpdated = factory<TableLastUpdatedFactory>((props, ref) => {\n const {table, getStyles} = useTableContext();\n const {classNames: _classNames, styles: _styles, vars: _vars, ...lastUpdatedProps} = props;\n const [time, setTime] = useState(new Date());\n\n const {className: rootClassName, style: rootStyle} = getStyles('lastUpdatedRoot', {\n classNames: _classNames,\n styles: _styles,\n });\n\n const {className: labelClassName, style: labelStyle} = getStyles('lastUpdatedLabel', {\n classNames: _classNames,\n styles: _styles,\n });\n\n useDidUpdate(() => {\n setTime(new Date());\n }, [table.options.data]);\n\n return (\n <LastUpdated\n time={time}\n ref={ref}\n justify=\"right\"\n px=\"lg\"\n classNames={{root: rootClassName, label: labelClassName}}\n styles={{root: rootStyle, label: labelStyle}}\n {...lastUpdatedProps}\n />\n );\n});\n\nTableLastUpdated.displayName = 'Table.LastUpdated';\n"],"names":["factory","useDidUpdate","useState","LastUpdated","useTableContext","TableLastUpdated","props","ref","table","getStyles","classNames","_classNames","styles","_styles","vars","_vars","lastUpdatedProps","time","setTime","Date","className","rootClassName","style","rootStyle","labelClassName","labelStyle","options","data","justify","px","root","label","displayName"],"mappings":";AAAA,SAA0CA,OAAO,QAAgB,gBAAgB;AACjF,SAAQC,YAAY,QAAO,iBAAiB;AAC5C,SAAQC,QAAQ,QAAO,QAAQ;AAC/B,SAAQC,WAAW,QAAyB,mCAAmC;AAC/E,SAAQC,eAAe,QAAO,qBAAqB;AAcnD,OAAO,MAAMC,mBAAmBL,QAAiC,CAACM,OAAOC;IACrE,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGL;IAC3B,MAAM,EAACM,YAAYC,WAAW,EAAEC,QAAQC,OAAO,EAAEC,MAAMC,KAAK,EAAE,GAAGC,kBAAiB,GAAGV;IACrF,MAAM,CAACW,MAAMC,QAAQ,GAAGhB,SAAS,IAAIiB;IAErC,MAAM,EAACC,WAAWC,aAAa,EAAEC,OAAOC,SAAS,EAAC,GAAGd,UAAU,mBAAmB;QAC9EC,YAAYC;QACZC,QAAQC;IACZ;IAEA,MAAM,EAACO,WAAWI,cAAc,EAAEF,OAAOG,UAAU,EAAC,GAAGhB,UAAU,oBAAoB;QACjFC,YAAYC;QACZC,QAAQC;IACZ;IAEAZ,aAAa;QACTiB,QAAQ,IAAIC;IAChB,GAAG;QAACX,MAAMkB,OAAO,CAACC,IAAI;KAAC;IAEvB,qBACI,KAACxB;QACGc,MAAMA;QACNV,KAAKA;QACLqB,SAAQ;QACRC,IAAG;QACHnB,YAAY;YAACoB,MAAMT;YAAeU,OAAOP;QAAc;QACvDZ,QAAQ;YAACkB,MAAMP;YAAWQ,OAAON;QAAU;QAC1C,GAAGT,gBAAgB;;AAGhC,GAAG;AAEHX,iBAAiB2B,WAAW,GAAG"}
@@ -7,5 +7,6 @@ export const TableLoading = (props)=>/*#__PURE__*/ _jsx(Skeleton, {
7
7
  } : undefined,
8
8
  children: props.children
9
9
  });
10
+ TableLoading.displayName = 'Table.Loading';
10
11
 
11
12
  //# sourceMappingURL=TableLoading.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-loading/TableLoading.tsx"],"sourcesContent":["import {Skeleton, SkeletonProps} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nexport const TableLoading: FunctionComponent<SkeletonProps> = (props) => (\n <Skeleton {...props} style={!props.visible ? {borderRadius: 0} : undefined}>\n {props.children}\n </Skeleton>\n);\n"],"names":["Skeleton","TableLoading","props","style","visible","borderRadius","undefined","children"],"mappings":";AAAA,SAAQA,QAAQ,QAAsB,gBAAgB;AAGtD,OAAO,MAAMC,eAAiD,CAACC,sBAC3D,KAACF;QAAU,GAAGE,KAAK;QAAEC,OAAO,CAACD,MAAME,OAAO,GAAG;YAACC,cAAc;QAAC,IAAIC;kBAC5DJ,MAAMK,QAAQ;OAErB"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-loading/TableLoading.tsx"],"sourcesContent":["import {Skeleton, SkeletonProps} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nexport const TableLoading: FunctionComponent<SkeletonProps> = (props) => (\n <Skeleton {...props} style={!props.visible ? {borderRadius: 0} : undefined}>\n {props.children}\n </Skeleton>\n);\n\nTableLoading.displayName = 'Table.Loading';\n"],"names":["Skeleton","TableLoading","props","style","visible","borderRadius","undefined","children","displayName"],"mappings":";AAAA,SAAQA,QAAQ,QAAsB,gBAAgB;AAGtD,OAAO,MAAMC,eAAiD,CAACC,sBAC3D,KAACF;QAAU,GAAGE,KAAK;QAAEC,OAAO,CAACD,MAAME,OAAO,GAAG;YAACC,cAAc;QAAC,IAAIC;kBAC5DJ,MAAMK,QAAQ;OAErB;AAEFN,aAAaO,WAAW,GAAG"}
@@ -2,5 +2,6 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  export const TableNoData = ({ children })=>/*#__PURE__*/ _jsx(_Fragment, {
3
3
  children: children
4
4
  });
5
+ TableNoData.displayName = 'Table.NoData';
5
6
 
6
7
  //# sourceMappingURL=TableNoData.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-no-data/TableNoData.tsx"],"sourcesContent":["import {FunctionComponent, ReactNode} from 'react';\n\nexport interface TableNoDataProps {\n children: ReactNode;\n}\n\nexport const TableNoData: FunctionComponent<TableNoDataProps> = ({children}) => <>{children}</>;\n"],"names":["TableNoData","children"],"mappings":";AAMA,OAAO,MAAMA,cAAmD,CAAC,EAACC,QAAQ,EAAC,iBAAK;kBAAGA;OAAa"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-no-data/TableNoData.tsx"],"sourcesContent":["import {FunctionComponent, ReactNode} from 'react';\n\nexport interface TableNoDataProps {\n children: ReactNode;\n}\n\nexport const TableNoData: FunctionComponent<TableNoDataProps> = ({children}) => <>{children}</>;\n\nTableNoData.displayName = 'Table.NoData';\n"],"names":["TableNoData","children","displayName"],"mappings":";AAMA,OAAO,MAAMA,cAAmD,CAAC,EAACC,QAAQ,EAAC,iBAAK;kBAAGA;OAAa;AAEhGD,YAAYE,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-pagination/TablePagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAExC,OAAO,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAGhE,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CAwCnE,CAAC"}
1
+ {"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-pagination/TablePagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAEhE,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CAwCnE,CAAC"}
@@ -48,5 +48,6 @@ export const TablePagination = ({ onPageChange })=>{
48
48
  }
49
49
  });
50
50
  };
51
+ TablePagination.displayName = 'Table.Pagination';
51
52
 
52
53
  //# sourceMappingURL=TablePagination.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-pagination/TablePagination.tsx"],"sourcesContent":["import {Pagination} from '@mantine/core';\nimport {useDidUpdate} from '@mantine/hooks';\nimport {FunctionComponent} from 'react';\n\nimport {TablePaginationProps} from './TablePagination.types.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport const TablePagination: FunctionComponent<TablePaginationProps> = ({onPageChange}) => {\n const {store, table, containerRef} = useTableContext();\n\n const updatePage = (newPage: number) => {\n onPageChange?.(newPage - 1);\n store.setPagination((prev) => ({...prev, pageIndex: newPage - 1}));\n containerRef.current.scrollIntoView({behavior: 'smooth'});\n };\n\n const total = table.getPageCount();\n\n useDidUpdate(() => {\n if (store.state.pagination.pageIndex + 1 > total && total > 0) {\n updatePage(total);\n }\n }, [store.state.pagination.pageIndex, total]);\n\n return (\n <Pagination\n value={store.state.pagination.pageIndex + 1}\n onChange={updatePage}\n total={total}\n boundaries={1}\n size=\"md\"\n gap=\"xs\"\n getControlProps={(control) => {\n switch (control) {\n case 'previous':\n return {\n component: 'button',\n 'aria-label': 'previous page',\n };\n case 'next':\n return {component: 'button', 'aria-label': 'next page'};\n default:\n return {};\n }\n }}\n />\n );\n};\n"],"names":["Pagination","useDidUpdate","useTableContext","TablePagination","onPageChange","store","table","containerRef","updatePage","newPage","setPagination","prev","pageIndex","current","scrollIntoView","behavior","total","getPageCount","state","pagination","value","onChange","boundaries","size","gap","getControlProps","control","component"],"mappings":";AAAA,SAAQA,UAAU,QAAO,gBAAgB;AACzC,SAAQC,YAAY,QAAO,iBAAiB;AAI5C,SAAQC,eAAe,QAAO,qBAAqB;AAEnD,OAAO,MAAMC,kBAA2D,CAAC,EAACC,YAAY,EAAC;IACnF,MAAM,EAACC,KAAK,EAAEC,KAAK,EAAEC,YAAY,EAAC,GAAGL;IAErC,MAAMM,aAAa,CAACC;QAChBL,eAAeK,UAAU;QACzBJ,MAAMK,aAAa,CAAC,CAACC,OAAU,CAAA;gBAAC,GAAGA,IAAI;gBAAEC,WAAWH,UAAU;YAAC,CAAA;QAC/DF,aAAaM,OAAO,CAACC,cAAc,CAAC;YAACC,UAAU;QAAQ;IAC3D;IAEA,MAAMC,QAAQV,MAAMW,YAAY;IAEhChB,aAAa;QACT,IAAII,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS,GAAG,IAAII,SAASA,QAAQ,GAAG;YAC3DR,WAAWQ;QACf;IACJ,GAAG;QAACX,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS;QAAEI;KAAM;IAE5C,qBACI,KAAChB;QACGoB,OAAOf,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS,GAAG;QAC1CS,UAAUb;QACVQ,OAAOA;QACPM,YAAY;QACZC,MAAK;QACLC,KAAI;QACJC,iBAAiB,CAACC;YACd,OAAQA;gBACJ,KAAK;oBACD,OAAO;wBACHC,WAAW;wBACX,cAAc;oBAClB;gBACJ,KAAK;oBACD,OAAO;wBAACA,WAAW;wBAAU,cAAc;oBAAW;gBAC1D;oBACI,OAAO,CAAC;YAChB;QACJ;;AAGZ,EAAE"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-pagination/TablePagination.tsx"],"sourcesContent":["import {Pagination} from '@mantine/core';\nimport {useDidUpdate} from '@mantine/hooks';\nimport {FunctionComponent} from 'react';\n\nimport {useTableContext} from '../TableContext.js';\nimport {TablePaginationProps} from './TablePagination.types.js';\n\nexport const TablePagination: FunctionComponent<TablePaginationProps> = ({onPageChange}) => {\n const {store, table, containerRef} = useTableContext();\n\n const updatePage = (newPage: number) => {\n onPageChange?.(newPage - 1);\n store.setPagination((prev) => ({...prev, pageIndex: newPage - 1}));\n containerRef.current.scrollIntoView({behavior: 'smooth'});\n };\n\n const total = table.getPageCount();\n\n useDidUpdate(() => {\n if (store.state.pagination.pageIndex + 1 > total && total > 0) {\n updatePage(total);\n }\n }, [store.state.pagination.pageIndex, total]);\n\n return (\n <Pagination\n value={store.state.pagination.pageIndex + 1}\n onChange={updatePage}\n total={total}\n boundaries={1}\n size=\"md\"\n gap=\"xs\"\n getControlProps={(control) => {\n switch (control) {\n case 'previous':\n return {\n component: 'button',\n 'aria-label': 'previous page',\n };\n case 'next':\n return {component: 'button', 'aria-label': 'next page'};\n default:\n return {};\n }\n }}\n />\n );\n};\n\nTablePagination.displayName = 'Table.Pagination';\n"],"names":["Pagination","useDidUpdate","useTableContext","TablePagination","onPageChange","store","table","containerRef","updatePage","newPage","setPagination","prev","pageIndex","current","scrollIntoView","behavior","total","getPageCount","state","pagination","value","onChange","boundaries","size","gap","getControlProps","control","component","displayName"],"mappings":";AAAA,SAAQA,UAAU,QAAO,gBAAgB;AACzC,SAAQC,YAAY,QAAO,iBAAiB;AAG5C,SAAQC,eAAe,QAAO,qBAAqB;AAGnD,OAAO,MAAMC,kBAA2D,CAAC,EAACC,YAAY,EAAC;IACnF,MAAM,EAACC,KAAK,EAAEC,KAAK,EAAEC,YAAY,EAAC,GAAGL;IAErC,MAAMM,aAAa,CAACC;QAChBL,eAAeK,UAAU;QACzBJ,MAAMK,aAAa,CAAC,CAACC,OAAU,CAAA;gBAAC,GAAGA,IAAI;gBAAEC,WAAWH,UAAU;YAAC,CAAA;QAC/DF,aAAaM,OAAO,CAACC,cAAc,CAAC;YAACC,UAAU;QAAQ;IAC3D;IAEA,MAAMC,QAAQV,MAAMW,YAAY;IAEhChB,aAAa;QACT,IAAII,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS,GAAG,IAAII,SAASA,QAAQ,GAAG;YAC3DR,WAAWQ;QACf;IACJ,GAAG;QAACX,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS;QAAEI;KAAM;IAE5C,qBACI,KAAChB;QACGoB,OAAOf,MAAMa,KAAK,CAACC,UAAU,CAACP,SAAS,GAAG;QAC1CS,UAAUb;QACVQ,OAAOA;QACPM,YAAY;QACZC,MAAK;QACLC,KAAI;QACJC,iBAAiB,CAACC;YACd,OAAQA;gBACJ,KAAK;oBACD,OAAO;wBACHC,WAAW;wBACX,cAAc;oBAClB;gBACJ,KAAK;oBACD,OAAO;wBAACA,WAAW;wBAAU,cAAc;oBAAW;gBAC1D;oBACI,OAAO,CAAC;YAChB;QACJ;;AAGZ,EAAE;AAEFxB,gBAAgByB,WAAW,GAAG"}
@@ -34,6 +34,7 @@ export const TablePerPage = ({ label = 'Results per page', values = [
34
34
  ]
35
35
  }) : null;
36
36
  };
37
+ TablePerPage.displayName = 'Table.PerPage';
37
38
  TablePerPage.DEFAULT_SIZE = 50;
38
39
 
39
40
  //# sourceMappingURL=TablePerPage.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-per-page/TablePerPage.tsx"],"sourcesContent":["import {Group, SegmentedControl, Text} from '@mantine/core';\nimport {FunctionComponent, useMemo} from 'react';\n\nimport {useTableContext} from '../TableContext.js';\nimport {TablePerPageProps} from './TablePerPage.types.js';\n\nexport const TablePerPage: FunctionComponent<TablePerPageProps> & {DEFAULT_SIZE: number} = ({\n label = 'Results per page',\n values = [25, 50, 100],\n onPerPageChange,\n}) => {\n const {store, table} = useTableContext();\n const choices = useMemo(() => values.map((value) => value.toString()), [values]);\n\n const updatePerPage = (newPerPage: string) => {\n onPerPageChange?.(Number(newPerPage));\n store.setPagination({pageIndex: 0, pageSize: parseInt(newPerPage, 10)});\n };\n\n return table.getPageCount() > 0 ? (\n <Group gap=\"sm\">\n <Text fw={500}>{label}</Text>\n <SegmentedControl\n value={store.state.pagination.pageSize.toString() ?? choices[1] ?? choices[0]}\n onChange={updatePerPage}\n data={choices}\n size=\"sm\"\n />\n </Group>\n ) : null;\n};\n\nTablePerPage.DEFAULT_SIZE = 50;\n"],"names":["Group","SegmentedControl","Text","useMemo","useTableContext","TablePerPage","label","values","onPerPageChange","store","table","choices","map","value","toString","updatePerPage","newPerPage","Number","setPagination","pageIndex","pageSize","parseInt","getPageCount","gap","fw","state","pagination","onChange","data","size","DEFAULT_SIZE"],"mappings":";AAAA,SAAQA,KAAK,EAAEC,gBAAgB,EAAEC,IAAI,QAAO,gBAAgB;AAC5D,SAA2BC,OAAO,QAAO,QAAQ;AAEjD,SAAQC,eAAe,QAAO,qBAAqB;AAGnD,OAAO,MAAMC,eAA8E,CAAC,EACxFC,QAAQ,kBAAkB,EAC1BC,SAAS;IAAC;IAAI;IAAI;CAAI,EACtBC,eAAe,EAClB;IACG,MAAM,EAACC,KAAK,EAAEC,KAAK,EAAC,GAAGN;IACvB,MAAMO,UAAUR,QAAQ,IAAMI,OAAOK,GAAG,CAAC,CAACC,QAAUA,MAAMC,QAAQ,KAAK;QAACP;KAAO;IAE/E,MAAMQ,gBAAgB,CAACC;QACnBR,kBAAkBS,OAAOD;QACzBP,MAAMS,aAAa,CAAC;YAACC,WAAW;YAAGC,UAAUC,SAASL,YAAY;QAAG;IACzE;IAEA,OAAON,MAAMY,YAAY,KAAK,kBAC1B,MAACtB;QAAMuB,KAAI;;0BACP,KAACrB;gBAAKsB,IAAI;0BAAMlB;;0BAChB,KAACL;gBACGY,OAAOJ,MAAMgB,KAAK,CAACC,UAAU,CAACN,QAAQ,CAACN,QAAQ,MAAMH,OAAO,CAAC,EAAE,IAAIA,OAAO,CAAC,EAAE;gBAC7EgB,UAAUZ;gBACVa,MAAMjB;gBACNkB,MAAK;;;SAGb;AACR,EAAE;AAEFxB,aAAayB,YAAY,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-per-page/TablePerPage.tsx"],"sourcesContent":["import {Group, SegmentedControl, Text} from '@mantine/core';\nimport {FunctionComponent, useMemo} from 'react';\n\nimport {useTableContext} from '../TableContext.js';\nimport {TablePerPageProps} from './TablePerPage.types.js';\n\nexport const TablePerPage: FunctionComponent<TablePerPageProps> & {DEFAULT_SIZE: number} = ({\n label = 'Results per page',\n values = [25, 50, 100],\n onPerPageChange,\n}) => {\n const {store, table} = useTableContext();\n const choices = useMemo(() => values.map((value) => value.toString()), [values]);\n\n const updatePerPage = (newPerPage: string) => {\n onPerPageChange?.(Number(newPerPage));\n store.setPagination({pageIndex: 0, pageSize: parseInt(newPerPage, 10)});\n };\n\n return table.getPageCount() > 0 ? (\n <Group gap=\"sm\">\n <Text fw={500}>{label}</Text>\n <SegmentedControl\n value={store.state.pagination.pageSize.toString() ?? choices[1] ?? choices[0]}\n onChange={updatePerPage}\n data={choices}\n size=\"sm\"\n />\n </Group>\n ) : null;\n};\n\nTablePerPage.displayName = 'Table.PerPage';\nTablePerPage.DEFAULT_SIZE = 50;\n"],"names":["Group","SegmentedControl","Text","useMemo","useTableContext","TablePerPage","label","values","onPerPageChange","store","table","choices","map","value","toString","updatePerPage","newPerPage","Number","setPagination","pageIndex","pageSize","parseInt","getPageCount","gap","fw","state","pagination","onChange","data","size","displayName","DEFAULT_SIZE"],"mappings":";AAAA,SAAQA,KAAK,EAAEC,gBAAgB,EAAEC,IAAI,QAAO,gBAAgB;AAC5D,SAA2BC,OAAO,QAAO,QAAQ;AAEjD,SAAQC,eAAe,QAAO,qBAAqB;AAGnD,OAAO,MAAMC,eAA8E,CAAC,EACxFC,QAAQ,kBAAkB,EAC1BC,SAAS;IAAC;IAAI;IAAI;CAAI,EACtBC,eAAe,EAClB;IACG,MAAM,EAACC,KAAK,EAAEC,KAAK,EAAC,GAAGN;IACvB,MAAMO,UAAUR,QAAQ,IAAMI,OAAOK,GAAG,CAAC,CAACC,QAAUA,MAAMC,QAAQ,KAAK;QAACP;KAAO;IAE/E,MAAMQ,gBAAgB,CAACC;QACnBR,kBAAkBS,OAAOD;QACzBP,MAAMS,aAAa,CAAC;YAACC,WAAW;YAAGC,UAAUC,SAASL,YAAY;QAAG;IACzE;IAEA,OAAON,MAAMY,YAAY,KAAK,kBAC1B,MAACtB;QAAMuB,KAAI;;0BACP,KAACrB;gBAAKsB,IAAI;0BAAMlB;;0BAChB,KAACL;gBACGY,OAAOJ,MAAMgB,KAAK,CAACC,UAAU,CAACN,QAAQ,CAACN,QAAQ,MAAMH,OAAO,CAAC,EAAE,IAAIA,OAAO,CAAC,EAAE;gBAC7EgB,UAAUZ;gBACVa,MAAMjB;gBACNkB,MAAK;;;SAGb;AACR,EAAE;AAEFxB,aAAayB,WAAW,GAAG;AAC3BzB,aAAa0B,YAAY,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-predicate/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,YAAY,EACZ,sBAAsB,EAEtB,OAAO,EAIP,WAAW,EAGd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAEhH,MAAM,WAAW,mBACb,SAAQ,QAAQ,EACZ,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,eAAe,CAAC,EACnD,sBAAsB,CAAC,qBAAqB,CAAC;IACjD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC;IACxC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,yBAAyB,CAAC;IACvC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAIH,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAoChE,CAAC"}
1
+ {"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/table-predicate/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,YAAY,EACZ,sBAAsB,EAEtB,OAAO,EAIP,WAAW,EAGd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAEhH,MAAM,WAAW,mBACb,SACI,QAAQ,EACR,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,eAAe,CAAC,EACnD,sBAAsB,CAAC,qBAAqB,CAAC;IACjD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC;IACxC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,yBAAyB,CAAC;IACvC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAIH,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAoChE,CAAC"}
@@ -62,5 +62,6 @@ export const TablePredicate = factory((props, ref)=>{
62
62
  })
63
63
  });
64
64
  });
65
+ TablePredicate.displayName = 'Table.Predicate';
65
66
 
66
67
  //# sourceMappingURL=TablePredicate.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/Table/table-predicate/TablePredicate.tsx"],"sourcesContent":["import {\n BoxProps,\n ComboboxData,\n CompoundStylesApiProps,\n factory,\n Factory,\n Grid,\n Group,\n Select,\n SelectProps,\n Text,\n useProps,\n} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from '../Table.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TablePredicateStylesNames = 'predicate' | 'predicateWrapper' | 'predicateLabel' | 'predicateSelect';\n\nexport interface TablePredicateProps\n extends BoxProps,\n Pick<SelectProps, 'renderOption' | 'comboboxProps'>,\n CompoundStylesApiProps<TablePredicateFactory> {\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: ComboboxData;\n /**\n * The label to display next to the Select\n *\n */\n label: string;\n}\n\nexport type TablePredicateFactory = Factory<{\n props: TablePredicateProps;\n ref: HTMLDivElement;\n stylesNames: TablePredicateStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TablePredicateProps> = {};\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = factory<TablePredicateFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {id, data, label, classNames, className, styles, style, renderOption, comboboxProps, vars, ...others} =\n useProps('PlasmaTablePredicate', defaultProps, props);\n\n const handleChange = (newValue: string) => {\n store.setPredicates((prev) => ({...prev, [id]: newValue}));\n store.setPagination((prev) => ({...prev, pageIndex: 0}));\n };\n\n const stylesApiProps = {classNames, styles};\n\n return (\n <Grid.Col\n span=\"content\"\n order={TableComponentsOrder.Predicate}\n ref={ref}\n {...getStyles('predicate', {className, style, ...stylesApiProps})}\n {...others}\n >\n <Group gap=\"xs\" wrap=\"nowrap\" {...getStyles('predicateWrapper', stylesApiProps)}>\n {label ? <Text {...getStyles('predicateLabel', stylesApiProps)}>{label}:</Text> : null}\n <Select\n comboboxProps={{withinPortal: true, ...comboboxProps}}\n value={store.state.predicates[id]}\n onChange={handleChange}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n renderOption={renderOption}\n scrollAreaProps={{type: 'always'}}\n {...getStyles('predicateSelect', stylesApiProps)}\n />\n </Group>\n </Grid.Col>\n );\n});\n"],"names":["factory","Grid","Group","Select","Text","useProps","TableComponentsOrder","useTableContext","defaultProps","TablePredicate","props","ref","store","getStyles","id","data","label","classNames","className","styles","style","renderOption","comboboxProps","vars","others","handleChange","newValue","setPredicates","prev","setPagination","pageIndex","stylesApiProps","Col","span","order","Predicate","gap","wrap","withinPortal","value","state","predicates","onChange","aria-label","searchable","length","scrollAreaProps","type"],"mappings":";AAAA,SAIIA,OAAO,EAEPC,IAAI,EACJC,KAAK,EACLC,MAAM,EAENC,IAAI,EACJC,QAAQ,QACL,gBAAgB;AAGvB,SAAQC,oBAAoB,QAAO,cAAc;AACjD,SAAQC,eAAe,QAAO,qBAAqB;AA8BnD,MAAMC,eAA6C,CAAC;AAEpD,OAAO,MAAMC,iBAAyDT,QAA+B,CAACU,OAAOC;IACzG,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGN;IAC3B,MAAM,EAACO,EAAE,EAAEC,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAEC,YAAY,EAAEC,aAAa,EAAEC,IAAI,EAAE,GAAGC,QAAO,GACvGnB,SAAS,wBAAwBG,cAAcE;IAEnD,MAAMe,eAAe,CAACC;QAClBd,MAAMe,aAAa,CAAC,CAACC,OAAU,CAAA;gBAAC,GAAGA,IAAI;gBAAE,CAACd,GAAG,EAAEY;YAAQ,CAAA;QACvDd,MAAMiB,aAAa,CAAC,CAACD,OAAU,CAAA;gBAAC,GAAGA,IAAI;gBAAEE,WAAW;YAAC,CAAA;IACzD;IAEA,MAAMC,iBAAiB;QAACd;QAAYE;IAAM;IAE1C,qBACI,KAAClB,KAAK+B,GAAG;QACLC,MAAK;QACLC,OAAO5B,qBAAqB6B,SAAS;QACrCxB,KAAKA;QACJ,GAAGE,UAAU,aAAa;YAACK;YAAWE;YAAO,GAAGW,cAAc;QAAA,EAAE;QAChE,GAAGP,MAAM;kBAEV,cAAA,MAACtB;YAAMkC,KAAI;YAAKC,MAAK;YAAU,GAAGxB,UAAU,oBAAoBkB,eAAe;;gBAC1Ef,sBAAQ,MAACZ;oBAAM,GAAGS,UAAU,kBAAkBkB,eAAe;;wBAAGf;wBAAM;;qBAAW;8BAClF,KAACb;oBACGmB,eAAe;wBAACgB,cAAc;wBAAM,GAAGhB,aAAa;oBAAA;oBACpDiB,OAAO3B,MAAM4B,KAAK,CAACC,UAAU,CAAC3B,GAAG;oBACjC4B,UAAUjB;oBACVV,MAAMA;oBACN4B,cAAY3B,SAASF;oBACrB8B,YAAY7B,KAAK8B,MAAM,GAAG;oBAC1BxB,cAAcA;oBACdyB,iBAAiB;wBAACC,MAAM;oBAAQ;oBAC/B,GAAGlC,UAAU,mBAAmBkB,eAAe;;;;;AAKpE,GAAG"}
1
+ {"version":3,"sources":["../../../../../src/components/Table/table-predicate/TablePredicate.tsx"],"sourcesContent":["import {\n BoxProps,\n ComboboxData,\n CompoundStylesApiProps,\n factory,\n Factory,\n Grid,\n Group,\n Select,\n SelectProps,\n Text,\n useProps,\n} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from '../Table.js';\nimport {useTableContext} from '../TableContext.js';\n\nexport type TablePredicateStylesNames = 'predicate' | 'predicateWrapper' | 'predicateLabel' | 'predicateSelect';\n\nexport interface TablePredicateProps\n extends\n BoxProps,\n Pick<SelectProps, 'renderOption' | 'comboboxProps'>,\n CompoundStylesApiProps<TablePredicateFactory> {\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: ComboboxData;\n /**\n * The label to display next to the Select\n *\n */\n label: string;\n}\n\nexport type TablePredicateFactory = Factory<{\n props: TablePredicateProps;\n ref: HTMLDivElement;\n stylesNames: TablePredicateStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TablePredicateProps> = {};\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = factory<TablePredicateFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {id, data, label, classNames, className, styles, style, renderOption, comboboxProps, vars, ...others} =\n useProps('PlasmaTablePredicate', defaultProps, props);\n\n const handleChange = (newValue: string) => {\n store.setPredicates((prev) => ({...prev, [id]: newValue}));\n store.setPagination((prev) => ({...prev, pageIndex: 0}));\n };\n\n const stylesApiProps = {classNames, styles};\n\n return (\n <Grid.Col\n span=\"content\"\n order={TableComponentsOrder.Predicate}\n ref={ref}\n {...getStyles('predicate', {className, style, ...stylesApiProps})}\n {...others}\n >\n <Group gap=\"xs\" wrap=\"nowrap\" {...getStyles('predicateWrapper', stylesApiProps)}>\n {label ? <Text {...getStyles('predicateLabel', stylesApiProps)}>{label}:</Text> : null}\n <Select\n comboboxProps={{withinPortal: true, ...comboboxProps}}\n value={store.state.predicates[id]}\n onChange={handleChange}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n renderOption={renderOption}\n scrollAreaProps={{type: 'always'}}\n {...getStyles('predicateSelect', stylesApiProps)}\n />\n </Group>\n </Grid.Col>\n );\n});\n\nTablePredicate.displayName = 'Table.Predicate';\n"],"names":["factory","Grid","Group","Select","Text","useProps","TableComponentsOrder","useTableContext","defaultProps","TablePredicate","props","ref","store","getStyles","id","data","label","classNames","className","styles","style","renderOption","comboboxProps","vars","others","handleChange","newValue","setPredicates","prev","setPagination","pageIndex","stylesApiProps","Col","span","order","Predicate","gap","wrap","withinPortal","value","state","predicates","onChange","aria-label","searchable","length","scrollAreaProps","type","displayName"],"mappings":";AAAA,SAIIA,OAAO,EAEPC,IAAI,EACJC,KAAK,EACLC,MAAM,EAENC,IAAI,EACJC,QAAQ,QACL,gBAAgB;AAGvB,SAAQC,oBAAoB,QAAO,cAAc;AACjD,SAAQC,eAAe,QAAO,qBAAqB;AA+BnD,MAAMC,eAA6C,CAAC;AAEpD,OAAO,MAAMC,iBAAyDT,QAA+B,CAACU,OAAOC;IACzG,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGN;IAC3B,MAAM,EAACO,EAAE,EAAEC,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAEC,YAAY,EAAEC,aAAa,EAAEC,IAAI,EAAE,GAAGC,QAAO,GACvGnB,SAAS,wBAAwBG,cAAcE;IAEnD,MAAMe,eAAe,CAACC;QAClBd,MAAMe,aAAa,CAAC,CAACC,OAAU,CAAA;gBAAC,GAAGA,IAAI;gBAAE,CAACd,GAAG,EAAEY;YAAQ,CAAA;QACvDd,MAAMiB,aAAa,CAAC,CAACD,OAAU,CAAA;gBAAC,GAAGA,IAAI;gBAAEE,WAAW;YAAC,CAAA;IACzD;IAEA,MAAMC,iBAAiB;QAACd;QAAYE;IAAM;IAE1C,qBACI,KAAClB,KAAK+B,GAAG;QACLC,MAAK;QACLC,OAAO5B,qBAAqB6B,SAAS;QACrCxB,KAAKA;QACJ,GAAGE,UAAU,aAAa;YAACK;YAAWE;YAAO,GAAGW,cAAc;QAAA,EAAE;QAChE,GAAGP,MAAM;kBAEV,cAAA,MAACtB;YAAMkC,KAAI;YAAKC,MAAK;YAAU,GAAGxB,UAAU,oBAAoBkB,eAAe;;gBAC1Ef,sBAAQ,MAACZ;oBAAM,GAAGS,UAAU,kBAAkBkB,eAAe;;wBAAGf;wBAAM;;qBAAW;8BAClF,KAACb;oBACGmB,eAAe;wBAACgB,cAAc;wBAAM,GAAGhB,aAAa;oBAAA;oBACpDiB,OAAO3B,MAAM4B,KAAK,CAACC,UAAU,CAAC3B,GAAG;oBACjC4B,UAAUjB;oBACVV,MAAMA;oBACN4B,cAAY3B,SAASF;oBACrB8B,YAAY7B,KAAK8B,MAAM,GAAG;oBAC1BxB,cAAcA;oBACdyB,iBAAiB;wBAACC,MAAM;oBAAQ;oBAC/B,GAAGlC,UAAU,mBAAmBkB,eAAe;;;;;AAKpE,GAAG;AAEHtB,eAAeuC,WAAW,GAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveord/plasma-mantine",
3
- "version": "56.16.0",
3
+ "version": "56.18.0",
4
4
  "description": "A Plasma flavoured Mantine theme",
5
5
  "keywords": [
6
6
  "plasma",
@@ -81,8 +81,8 @@
81
81
  "fast-deep-equal": "3.1.3",
82
82
  "lodash.defaultsdeep": "4.6.1",
83
83
  "monaco-editor": "0.55.1",
84
- "@coveord/plasma-react-icons": "56.16.0",
85
- "@coveord/plasma-tokens": "56.8.1"
84
+ "@coveord/plasma-tokens": "56.8.1",
85
+ "@coveord/plasma-react-icons": "56.18.0"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@mantine/carousel": "8.3.10",
@@ -19,4 +19,9 @@ declare module '@mantine/core' {
19
19
  }
20
20
 
21
21
  Accordion.ControlDisabled = DisabledControl;
22
+ Accordion.displayName = 'Accordion';
23
+ Accordion.Control.displayName = 'Accordion.Control';
24
+ Accordion.Panel.displayName = 'Accordion.Panel';
25
+ Accordion.Item.displayName = 'Accordion.Item';
26
+ Accordion.ControlDisabled.displayName = 'Accordion.ControlDisabled';
22
27
  export {Accordion};
@@ -1,14 +1,14 @@
1
1
  import {
2
- ActionIcon as MantineActionIcon,
3
2
  ActionIconCssVariables,
4
- type ActionIconGroup,
5
- type ActionIconProps as MantineActionIconProps,
6
3
  ActionIconStylesNames,
7
4
  ActionIconVariant,
8
5
  Factory,
6
+ ActionIcon as MantineActionIcon,
9
7
  polymorphicFactory,
8
+ type ActionIconGroup,
9
+ type ActionIconProps as MantineActionIconProps,
10
10
  } from '@mantine/core';
11
- import {MouseEventHandler} from 'react';
11
+ import {ComponentType, MouseEventHandler} from 'react';
12
12
  import {useClickWithLoading} from '../../hooks/useClickWithLoading.js';
13
13
  import {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from '../Button/ButtonWithDisabledTooltip.js';
14
14
 
@@ -93,3 +93,14 @@ ActionIcon.DestructivePrimary = ActionIconDestructive;
93
93
  ActionIcon.DestructiveSecondary = ActionIconDestructiveSecondary;
94
94
  ActionIcon.DestructiveTertiary = ActionIconDestructiveTertiary;
95
95
  ActionIcon.DestructiveQuaternary = ActionIconDestructiveQuaternary;
96
+
97
+ ActionIcon.displayName = 'ActionIcon';
98
+ ActionIcon.Group.displayName = 'ActionIcon.Group';
99
+ (ActionIconPrimary as ComponentType).displayName = 'ActionIcon.Primary';
100
+ (ActionIconSecondary as ComponentType).displayName = 'ActionIcon.Secondary';
101
+ (ActionIconTertiary as ComponentType).displayName = 'ActionIcon.Tertiary';
102
+ (ActionIconQuaternary as ComponentType).displayName = 'ActionIcon.Quaternary';
103
+ (ActionIconDestructive as ComponentType).displayName = 'ActionIcon.DestructivePrimary';
104
+ (ActionIconDestructiveSecondary as ComponentType).displayName = 'ActionIcon.DestructiveSecondary';
105
+ (ActionIconDestructiveTertiary as ComponentType).displayName = 'ActionIcon.DestructiveTertiary';
106
+ (ActionIconDestructiveQuaternary as ComponentType).displayName = 'ActionIcon.DestructiveQuaternary';
@@ -7,6 +7,7 @@ import {
7
7
  Alert as MantineAlert,
8
8
  polymorphicFactory,
9
9
  } from '@mantine/core';
10
+ import {type ComponentType} from 'react';
10
11
  import {InfoToken} from '../InfoToken/InfoToken.js';
11
12
 
12
13
  type AlertOverloadFactory = Factory<{
@@ -25,6 +26,7 @@ type AlertOverloadFactory = Factory<{
25
26
  }>;
26
27
 
27
28
  export const Alert = polymorphicFactory<AlertOverloadFactory>((props, ref) => <MantineAlert {...props} ref={ref} />);
29
+ Alert.displayName = 'Alert';
28
30
 
29
31
  const AlertInformation = Alert.withProps({
30
32
  color: 'gray',
@@ -36,6 +38,7 @@ const AlertInformation = Alert.withProps({
36
38
  },
37
39
  }),
38
40
  });
41
+ (AlertInformation as ComponentType).displayName = 'Alert.Information';
39
42
 
40
43
  const AlertAdvice = Alert.withProps({
41
44
  icon: <InfoToken variant="advice" />,
@@ -46,6 +49,7 @@ const AlertAdvice = Alert.withProps({
46
49
  },
47
50
  }),
48
51
  });
52
+ (AlertAdvice as ComponentType).displayName = 'Alert.Advice';
49
53
 
50
54
  const AlertWarning = Alert.withProps({
51
55
  color: 'warning',
@@ -57,6 +61,8 @@ const AlertWarning = Alert.withProps({
57
61
  },
58
62
  }),
59
63
  });
64
+ (AlertWarning as ComponentType).displayName = 'Alert.Warning';
65
+
60
66
  const AlertCritical = Alert.withProps({
61
67
  icon: <InfoToken variant="error" />,
62
68
  vars: () => ({
@@ -66,6 +72,7 @@ const AlertCritical = Alert.withProps({
66
72
  },
67
73
  }),
68
74
  });
75
+ (AlertCritical as ComponentType).displayName = 'Alert.Critical';
69
76
 
70
77
  Alert.Information = AlertInformation;
71
78
  Alert.Advice = AlertAdvice;
@@ -8,7 +8,7 @@ import {
8
8
  ButtonProps as MantineButtonProps,
9
9
  polymorphicFactory,
10
10
  } from '@mantine/core';
11
- import {MouseEventHandler} from 'react';
11
+ import {ComponentType, MouseEventHandler} from 'react';
12
12
  import {useClickWithLoading} from '../../hooks/useClickWithLoading.js';
13
13
  import {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from './ButtonWithDisabledTooltip.js';
14
14
 
@@ -99,6 +99,7 @@ const ButtonDestructiveTertiary = Button.withProps({
99
99
  const ButtonDestructiveQuaternary = Button.withProps({variant: 'subtle', color: 'var(--mantine-color-error)'});
100
100
 
101
101
  Button.Group = MantineButton.Group;
102
+ Button.Group.displayName = 'Button.Group';
102
103
  Button.Primary = ButtonPrimary;
103
104
  Button.Secondary = ButtonSecondary;
104
105
  Button.Tertiary = ButtonTertiary;
@@ -107,3 +108,13 @@ Button.DestructivePrimary = ButtonDestructive;
107
108
  Button.DestructiveSecondary = ButtonDestructiveSecondary;
108
109
  Button.DestructiveTertiary = ButtonDestructiveTertiary;
109
110
  Button.DestructiveQuaternary = ButtonDestructiveQuaternary;
111
+ (ButtonPrimary as ComponentType).displayName = 'Button.Primary';
112
+ (ButtonSecondary as ComponentType).displayName = 'Button.Secondary';
113
+ (ButtonTertiary as ComponentType).displayName = 'Button.Tertiary';
114
+ (ButtonQuaternary as ComponentType).displayName = 'Button.Quaternary';
115
+ (ButtonDestructive as ComponentType).displayName = 'Button.DestructivePrimary';
116
+ (ButtonDestructiveSecondary as ComponentType).displayName = 'Button.DestructiveSecondary';
117
+ (ButtonDestructiveTertiary as ComponentType).displayName = 'Button.DestructiveTertiary';
118
+ (ButtonDestructiveQuaternary as ComponentType).displayName = 'Button.DestructiveQuaternary';
119
+
120
+ Button.displayName = 'Button';
@@ -25,10 +25,8 @@ import CodeEditorClasses from './CodeEditor.module.css';
25
25
  import {XML} from './languages/xml.js';
26
26
  import {Search} from './search/Search.js';
27
27
  interface CodeEditorProps
28
- extends Omit<
29
- InputWrapperProps,
30
- 'inputContainer' | 'inputWrapperOrder' | 'classNames' | 'styles' | 'vars' | 'onChange'
31
- >,
28
+ extends
29
+ Omit<InputWrapperProps, 'inputContainer' | 'inputWrapperOrder' | 'classNames' | 'styles' | 'vars' | 'onChange'>,
32
30
  Omit<StackProps, 'onChange' | 'attributes'> {
33
31
  /**
34
32
  * The language syntax of the editor
@@ -278,3 +276,5 @@ export const CodeEditor: FunctionComponent<CodeEditorProps> = (props) => {
278
276
  </Stack>
279
277
  );
280
278
  };
279
+
280
+ CodeEditor.displayName = 'CodeEditor';
@@ -73,3 +73,5 @@ export const LastUpdated = factory<LastUpdatedFactory>(
73
73
  );
74
74
  },
75
75
  );
76
+
77
+ LastUpdated.displayName = 'LastUpdated';
@@ -4,8 +4,7 @@ import {ReactNode} from 'react';
4
4
  import classes from './StickyFooter.module.css';
5
5
 
6
6
  export interface StickyFooterProps
7
- extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'>,
8
- StylesApiProps<StickyFooterFactory> {
7
+ extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'>, StylesApiProps<StickyFooterFactory> {
9
8
  /**
10
9
  * Whether a border is render on top of the footer
11
10
  */
@@ -67,3 +66,5 @@ export const StickyFooter = factory<StickyFooterFactory>((props, ref) => {
67
66
  </Group>
68
67
  );
69
68
  });
69
+
70
+ StickyFooter.displayName = 'StickyFooter';