@bsol-oss/react-datatable5 1.0.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 (69) hide show
  1. package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-3920d97c51b8ad2521918fb1205babd22b0ed3d7 +1 -0
  2. package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-43fdebe5fc35e4e9fabee9a83c7faea931b05ea0 +1 -0
  3. package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-f086b87885981c04ce7a583ff90a49313de83de7 +1 -0
  4. package/.eslintrc.cjs +19 -0
  5. package/.prettierignore +4 -0
  6. package/.storybook/main.ts +20 -0
  7. package/.storybook/preview.ts +14 -0
  8. package/README.md +42 -0
  9. package/package.json +59 -0
  10. package/prettier.json +6 -0
  11. package/rollup.config.js +10 -0
  12. package/src/assets/react.svg +1 -0
  13. package/src/components/ChakraDataTable.tsx +279 -0
  14. package/src/components/DataTable.tsx +97 -0
  15. package/src/components/DataTableContext.tsx +13 -0
  16. package/src/components/EditFilterButton.tsx +37 -0
  17. package/src/components/EditSortingButton.tsx +37 -0
  18. package/src/components/EditViewButton.tsx +46 -0
  19. package/src/components/PageSizeControl.tsx +29 -0
  20. package/src/components/ResetFilteringButton.tsx +18 -0
  21. package/src/components/ResetSortingButton.tsx +18 -0
  22. package/src/components/Table.tsx +20 -0
  23. package/src/components/TableBody.tsx +23 -0
  24. package/src/components/TableCardContainer.tsx +22 -0
  25. package/src/components/TableCards.tsx +36 -0
  26. package/src/components/TableFilter.tsx +34 -0
  27. package/src/components/TableFooter.tsx +27 -0
  28. package/src/components/TableHeader.tsx +106 -0
  29. package/src/components/TablePagination.tsx +57 -0
  30. package/src/components/TableSorter.tsx +62 -0
  31. package/src/components/TextCell.tsx +18 -0
  32. package/src/components/useDataFromUrl.tsx +52 -0
  33. package/src/components/useDataTable.tsx +7 -0
  34. package/src/index.tsx +27 -0
  35. package/src/stories/Button.stories.ts +52 -0
  36. package/src/stories/Button.tsx +52 -0
  37. package/src/stories/CardViewShowcase.tsx +103 -0
  38. package/src/stories/Configure.mdx +369 -0
  39. package/src/stories/DataTable-test.stories.tsx +83 -0
  40. package/src/stories/DataTable.stories.tsx +57 -0
  41. package/src/stories/DefaultDataTable.tsx +141 -0
  42. package/src/stories/Header.stories.ts +33 -0
  43. package/src/stories/Header.tsx +71 -0
  44. package/src/stories/Page.stories.ts +32 -0
  45. package/src/stories/Page.tsx +91 -0
  46. package/src/stories/TableViewShowcase.tsx +105 -0
  47. package/src/stories/assets/accessibility.png +0 -0
  48. package/src/stories/assets/accessibility.svg +5 -0
  49. package/src/stories/assets/addon-library.png +0 -0
  50. package/src/stories/assets/assets.png +0 -0
  51. package/src/stories/assets/avif-test-image.avif +0 -0
  52. package/src/stories/assets/context.png +0 -0
  53. package/src/stories/assets/discord.svg +15 -0
  54. package/src/stories/assets/docs.png +0 -0
  55. package/src/stories/assets/figma-plugin.png +0 -0
  56. package/src/stories/assets/github.svg +3 -0
  57. package/src/stories/assets/share.png +0 -0
  58. package/src/stories/assets/styling.png +0 -0
  59. package/src/stories/assets/testing.png +0 -0
  60. package/src/stories/assets/theming.png +0 -0
  61. package/src/stories/assets/tutorials.svg +12 -0
  62. package/src/stories/assets/youtube.svg +4 -0
  63. package/src/stories/button.css +30 -0
  64. package/src/stories/header.css +32 -0
  65. package/src/stories/page.css +69 -0
  66. package/src/vite-env.d.ts +1 -0
  67. package/tsconfig.json +25 -0
  68. package/tsconfig.node.json +11 -0
  69. package/vite.config.ts +7 -0
@@ -0,0 +1,69 @@
1
+ .storybook-page {
2
+ font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
3
+ font-size: 14px;
4
+ line-height: 24px;
5
+ padding: 48px 20px;
6
+ margin: 0 auto;
7
+ max-width: 600px;
8
+ color: #333;
9
+ }
10
+
11
+ .storybook-page h2 {
12
+ font-weight: 700;
13
+ font-size: 32px;
14
+ line-height: 1;
15
+ margin: 0 0 4px;
16
+ display: inline-block;
17
+ vertical-align: top;
18
+ }
19
+
20
+ .storybook-page p {
21
+ margin: 1em 0;
22
+ }
23
+
24
+ .storybook-page a {
25
+ text-decoration: none;
26
+ color: #1ea7fd;
27
+ }
28
+
29
+ .storybook-page ul {
30
+ padding-left: 30px;
31
+ margin: 1em 0;
32
+ }
33
+
34
+ .storybook-page li {
35
+ margin-bottom: 8px;
36
+ }
37
+
38
+ .storybook-page .tip {
39
+ display: inline-block;
40
+ border-radius: 1em;
41
+ font-size: 11px;
42
+ line-height: 12px;
43
+ font-weight: 700;
44
+ background: #e7fdd8;
45
+ color: #66bf3c;
46
+ padding: 4px 12px;
47
+ margin-right: 10px;
48
+ vertical-align: top;
49
+ }
50
+
51
+ .storybook-page .tip-wrapper {
52
+ font-size: 13px;
53
+ line-height: 20px;
54
+ margin-top: 40px;
55
+ margin-bottom: 40px;
56
+ }
57
+
58
+ .storybook-page .tip-wrapper svg {
59
+ display: inline-block;
60
+ height: 12px;
61
+ width: 12px;
62
+ margin-right: 4px;
63
+ vertical-align: top;
64
+ margin-top: 3px;
65
+ }
66
+
67
+ .storybook-page .tip-wrapper svg path {
68
+ fill: #1ea7fd;
69
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
package/tsconfig.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "noEmit": true,
15
+ "jsx": "react-jsx",
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true
22
+ },
23
+ "include": ["src"],
24
+ "references": [{ "path": "./tsconfig.node.json" }]
25
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true,
8
+ "strict": true
9
+ },
10
+ "include": ["vite.config.ts"]
11
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+
4
+ // https://vitejs.dev/config/
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ });