norma-library 0.4.8 → 0.4.9

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 (51) hide show
  1. package/dist/esm/components/DataGrid/base/dropdown.d.ts +4 -0
  2. package/dist/esm/components/DataGrid/base/dropdown.js +126 -0
  3. package/dist/esm/components/DataGrid/base/dropdown.js.map +1 -0
  4. package/dist/esm/components/DataGrid/base/number-filter.d.ts +4 -0
  5. package/dist/esm/components/DataGrid/base/number-filter.js +30 -0
  6. package/dist/esm/components/DataGrid/base/number-filter.js.map +1 -0
  7. package/dist/esm/components/DataGrid/base/sorting.d.ts +5 -0
  8. package/dist/esm/components/DataGrid/base/sorting.js +15 -0
  9. package/dist/esm/components/DataGrid/base/sorting.js.map +1 -0
  10. package/dist/esm/components/DataGrid/icons.d.ts +4 -0
  11. package/dist/esm/components/DataGrid/icons.js +15 -0
  12. package/dist/esm/components/DataGrid/icons.js.map +1 -0
  13. package/dist/esm/components/DataGrid/index.d.ts +5 -0
  14. package/dist/esm/components/DataGrid/index.js +146 -0
  15. package/dist/esm/components/DataGrid/index.js.map +1 -0
  16. package/dist/esm/components/DataGrid/shared.d.ts +20 -0
  17. package/dist/esm/components/DataGrid/shared.js +141 -0
  18. package/dist/esm/components/DataGrid/shared.js.map +1 -0
  19. package/dist/esm/components/DataGrid/styled.d.ts +10 -0
  20. package/dist/esm/components/DataGrid/styled.js +73 -0
  21. package/dist/esm/components/DataGrid/styled.js.map +1 -0
  22. package/dist/esm/components/index.d.ts +2 -1
  23. package/dist/esm/components/index.js +2 -1
  24. package/dist/esm/components/index.js.map +1 -1
  25. package/dist/esm/interfaces/DataGrid.d.ts +40 -0
  26. package/dist/esm/interfaces/DataGrid.js +2 -0
  27. package/dist/esm/interfaces/DataGrid.js.map +1 -0
  28. package/dist/esm/interfaces/index.d.ts +2 -1
  29. package/dist/esm/interfaces/index.js +2 -1
  30. package/dist/esm/interfaces/index.js.map +1 -1
  31. package/dist/esm/types/index.d.ts +2 -1
  32. package/dist/esm/types/index.js.map +1 -1
  33. package/norma-library.tar +0 -0
  34. package/package.json +2 -2
  35. package/src/components/DataGrid/allData.json +2918 -0
  36. package/src/components/DataGrid/base/dropdown.tsx +235 -0
  37. package/src/components/DataGrid/base/number-filter.tsx +43 -0
  38. package/src/components/DataGrid/base/sorting.tsx +35 -0
  39. package/src/components/DataGrid/icons.tsx +61 -0
  40. package/src/components/DataGrid/index.tsx +319 -0
  41. package/src/components/DataGrid/shared.ts +179 -0
  42. package/src/components/DataGrid/styled.ts +102 -0
  43. package/src/components/DataGrid/styles/dropdown.module.css +86 -0
  44. package/src/components/DataGrid/styles/number-filter.module.css +16 -0
  45. package/src/components/DataGrid/styles/styles.module.css +107 -0
  46. package/src/components/index.ts +2 -1
  47. package/src/interfaces/DataGrid.ts +51 -0
  48. package/src/interfaces/index.ts +2 -1
  49. package/src/sample-data.json +178 -0
  50. package/src/stories/DataGrid.stories.tsx +28 -0
  51. package/src/types/index.ts +3 -0
@@ -0,0 +1,178 @@
1
+ [
2
+ {
3
+ "columns": [
4
+ {
5
+ "allowFiltering": true,
6
+ "allowFiltering": true,
7
+ "allowSorting": true,
8
+ "field": "data",
9
+ "format": "date",
10
+ "headerText": "Data",
11
+ "textAlign": "left",
12
+ "width": "100%"
13
+ },
14
+ {
15
+ "allowFiltering": true,
16
+ "allowSorting": true,
17
+ "field": "duration",
18
+ "format": "time",
19
+ "headerText": "Duração",
20
+ "textAlign": "left",
21
+ "width": "100%"
22
+ },
23
+ {
24
+ "allowFiltering": true,
25
+ "allowSorting": true,
26
+ "field": "campanha",
27
+ "format": "string",
28
+ "headerText": "Campanha",
29
+ "textAlign": "left",
30
+ "width": "100%"
31
+ },
32
+ {
33
+ "allowFiltering": true,
34
+ "allowSorting": true,
35
+ "field": "agente",
36
+ "format": "string",
37
+ "headerText": "Agente",
38
+ "textAlign": "left",
39
+ "width": "100%"
40
+ },
41
+ {
42
+ "allowFiltering": true,
43
+ "allowSorting": true,
44
+ "field": "ani",
45
+ "format": "number",
46
+ "headerText": "ANI",
47
+ "textAlign": "left",
48
+ "width": "100%"
49
+ },
50
+ {
51
+ "allowFiltering": true,
52
+ "allowSorting": true,
53
+ "field": "dnis",
54
+ "format": "number",
55
+ "headerText": "DNIS",
56
+ "textAlign": "left",
57
+ "width": "100%"
58
+ },
59
+ {
60
+ "allowFiltering": true,
61
+ "allowSorting": true,
62
+ "field": "disposition",
63
+ "format": "string",
64
+ "headerText": "Tabulação",
65
+ "textAlign": "left",
66
+ "width": "100%"
67
+ },
68
+ {
69
+ "allowFiltering": true,
70
+ "allowSorting": true,
71
+ "field": "origem",
72
+ "format": "number",
73
+ "headerText": "Origem",
74
+ "textAlign": "left",
75
+ "width": "100%"
76
+ },
77
+ {
78
+ "allowFiltering": true,
79
+ "allowSorting": true,
80
+ "field": "id",
81
+ "format": "number",
82
+ "headerText": "ID",
83
+ "textAlign": "left",
84
+ "width": "100%"
85
+ }
86
+ ],
87
+ "dataSource": [
88
+ {
89
+ "data": "01/05/2022",
90
+ "duration": "08:18",
91
+ "campanha": "Campanha 1",
92
+ "agente": 16321,
93
+ "ani": 50364908,
94
+ "dnis": 123456,
95
+ "disposition": "Tabulação 1",
96
+ "origin": 12723,
97
+ "id": 1
98
+ },
99
+ {
100
+ "data": "01/05/2022",
101
+ "duration": "00:18",
102
+ "campanha": "Campanha 2",
103
+ "agente": "16322",
104
+ "ani": "50364909",
105
+ "dnis": "123457",
106
+ "disposition": "Tabulação 2",
107
+ "origin": "12721",
108
+ "id": 2
109
+ },
110
+ {
111
+ "data": "03/05/2022",
112
+ "duration": "03:13",
113
+ "campanha": "Campanha 1",
114
+ "agente": "16321",
115
+ "ani": "50364908",
116
+ "dnis": "123456",
117
+ "disposition": "Tabulação 1",
118
+ "origin": "12723",
119
+ "id": 3
120
+ },
121
+ {
122
+ "data": "01/05/2022",
123
+ "duration": "09:19",
124
+ "campanha": "Campanha 1",
125
+ "agente": "16321",
126
+ "ani": "50364908",
127
+ "dnis": "123456",
128
+ "disposition": "Tabulação 1",
129
+ "origin": "12723",
130
+ "id": 4
131
+ },
132
+ {
133
+ "data": "02/05/2022",
134
+ "duration": "02:59",
135
+ "campanha": "Campanha 1",
136
+ "agente": "16321",
137
+ "ani": "50364908",
138
+ "dnis": "123456",
139
+ "disposition": "Tabulação 1",
140
+ "origin": "12723",
141
+ "id": 5
142
+ },
143
+ {
144
+ "data": "04/05/2022",
145
+ "duration": "05:02",
146
+ "campanha": "Campanha 1",
147
+ "agente": "16321",
148
+ "ani": "50364908",
149
+ "dnis": "123456",
150
+ "disposition": "Tabulação 1",
151
+ "origin": "12723",
152
+ "id": 6
153
+ },
154
+ {
155
+ "data": "21/05/2022",
156
+ "duration": "06:02",
157
+ "campanha": "Campanha 7",
158
+ "agente": "16315",
159
+ "ani": "50364909",
160
+ "dnis": "123456",
161
+ "disposition": "Tabulação 7",
162
+ "origin": "12754",
163
+ "id": 7
164
+ },
165
+ {
166
+ "data": "23/05/2022",
167
+ "duration": "04:04",
168
+ "campanha": "Campanha 8",
169
+ "agente": "16321",
170
+ "ani": "50364908",
171
+ "dnis": "123456",
172
+ "disposition": "Tabulação 8",
173
+ "origin": "12752",
174
+ "id": 8
175
+ }
176
+ ]
177
+ }
178
+ ]
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+
3
+ import type { Meta } from "@storybook/react";
4
+ import { DataGrid } from "../components";
5
+ import dataSource from "../components/DataGrid/allData.json";
6
+ import data from "../sample-data.json";
7
+
8
+ const meta = {
9
+ title: "Display/DataGrid",
10
+ component: DataGrid,
11
+ parameters: {
12
+ layout: "centered",
13
+ },
14
+ tags: ["autodocs"],
15
+ argTypes: {},
16
+ } satisfies Meta<typeof DataGrid>;
17
+
18
+ export default meta;
19
+
20
+ export const DataGridBasic = () => {
21
+ return (
22
+ <>
23
+ <DataGrid data={data} />
24
+ </>
25
+ );
26
+ };
27
+
28
+ DataGridBasic.storyName = "DataGrid Basic";
@@ -16,6 +16,7 @@ import {
16
16
  SvgIconProps,
17
17
  ModalProps,
18
18
  CardProps as MuiCardProps,
19
+ TableProps as MuiTableProps,
19
20
  } from "@mui/material";
20
21
 
21
22
  import { TimelineProps as MuiTimeLineProps } from "@mui/lab";
@@ -152,6 +153,8 @@ export type MuiPaperBaseProps = Omit<MuiPaperProps, "sx">;
152
153
 
153
154
  export type MuiDatePickerBaseProps = Omit<MuiTextFieldProps, "sx">;
154
155
 
156
+ export type MuiDataGridBaseProps = Omit<MuiTableProps, "sx">;
157
+
155
158
  export type MuiAvatarBaseProps = Omit<
156
159
  MuiAvatarProps,
157
160
  "sx" | "src" | "children" | "variant" | "sizes"