norma-library 0.5.813 → 0.5.815

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 (77) hide show
  1. package/dist/esm/components/Table/components/header/index.js +23 -10
  2. package/dist/esm/components/Table/components/header/index.js.map +1 -1
  3. package/dist/esm/components/Table/components/header/styles.d.ts +2 -1
  4. package/dist/esm/components/Table/components/header/styles.js +6 -5
  5. package/dist/esm/components/Table/components/header/styles.js.map +1 -1
  6. package/dist/esm/components/Table/components/pagination/index.js +4 -4
  7. package/dist/esm/components/Table/components/pagination/index.js.map +1 -1
  8. package/dist/esm/components/Table/components/pagination/styles.js +1 -1
  9. package/dist/esm/components/Table/components/pagination/styles.js.map +1 -1
  10. package/dist/esm/components/Table/components/tbody/index.js +7 -2
  11. package/dist/esm/components/Table/components/tbody/index.js.map +1 -1
  12. package/dist/esm/components/Table/components/tbody/styles.d.ts +2 -0
  13. package/dist/esm/components/Table/components/tbody/styles.js +4 -1
  14. package/dist/esm/components/Table/components/tbody/styles.js.map +1 -1
  15. package/dist/esm/components/Table/index.js +113 -112
  16. package/dist/esm/components/Table/index.js.map +1 -1
  17. package/dist/esm/components/Table/interface.d.ts +6 -0
  18. package/dist/esm/components/Table/styles.d.ts +2 -1
  19. package/dist/esm/components/Table/styles.js +11 -10
  20. package/dist/esm/components/Table/styles.js.map +1 -1
  21. package/package.json +2 -4
  22. package/src/components/Table/components/header/index.tsx +39 -14
  23. package/src/components/Table/components/header/styles.tsx +8 -3
  24. package/src/components/Table/components/pagination/index.tsx +6 -6
  25. package/src/components/Table/components/pagination/styles.tsx +12 -0
  26. package/src/components/Table/components/tbody/index.tsx +17 -6
  27. package/src/components/Table/components/tbody/styles.tsx +5 -0
  28. package/src/components/Table/index.tsx +172 -163
  29. package/src/components/Table/interface.ts +6 -0
  30. package/src/components/Table/styles.tsx +6 -1
  31. package/src/stories/Table.stories.tsx +204 -159
  32. package/dist/Button/index.d.ts +0 -9
  33. package/dist/Button/types.d.ts +0 -18
  34. package/dist/Card/Card.d.ts +0 -3
  35. package/dist/Card/CardHeader.d.ts +0 -3
  36. package/dist/Card/index.d.ts +0 -4
  37. package/dist/Card/styles.d.ts +0 -546
  38. package/dist/Card/types.d.ts +0 -8
  39. package/dist/esm/components/DataGrid/base/dropdown.d.ts +0 -4
  40. package/dist/esm/components/DataGrid/base/dropdown.js +0 -126
  41. package/dist/esm/components/DataGrid/base/dropdown.js.map +0 -1
  42. package/dist/esm/components/DataGrid/base/number-filter.d.ts +0 -4
  43. package/dist/esm/components/DataGrid/base/number-filter.js +0 -30
  44. package/dist/esm/components/DataGrid/base/number-filter.js.map +0 -1
  45. package/dist/esm/components/DataGrid/base/sorting.d.ts +0 -5
  46. package/dist/esm/components/DataGrid/base/sorting.js +0 -15
  47. package/dist/esm/components/DataGrid/base/sorting.js.map +0 -1
  48. package/dist/esm/components/DataGrid/icons.d.ts +0 -5
  49. package/dist/esm/components/DataGrid/icons.js +0 -20
  50. package/dist/esm/components/DataGrid/icons.js.map +0 -1
  51. package/dist/esm/components/DataGrid/index.d.ts +0 -3
  52. package/dist/esm/components/DataGrid/index.js +0 -214
  53. package/dist/esm/components/DataGrid/index.js.map +0 -1
  54. package/dist/esm/components/DataGrid/shared.d.ts +0 -20
  55. package/dist/esm/components/DataGrid/shared.js +0 -119
  56. package/dist/esm/components/DataGrid/shared.js.map +0 -1
  57. package/dist/esm/components/DataGrid/styled.d.ts +0 -11
  58. package/dist/esm/components/DataGrid/styled.js +0 -86
  59. package/dist/esm/components/DataGrid/styled.js.map +0 -1
  60. package/dist/esm/components/Table/index-old.d.ts +0 -4
  61. package/dist/esm/components/Table/index-old.js +0 -249
  62. package/dist/esm/components/Table/index-old.js.map +0 -1
  63. package/dist/esm/components/Table-old/index.d.ts +0 -3
  64. package/dist/esm/components/Table-old/index.js +0 -71
  65. package/dist/esm/components/Table-old/index.js.map +0 -1
  66. package/dist/esm/components/Table-old/styles.d.ts +0 -3004
  67. package/dist/esm/components/Table-old/styles.js +0 -15
  68. package/dist/esm/components/Table-old/styles.js.map +0 -1
  69. package/dist/esm/interfaces/DataGrid.d.ts +0 -42
  70. package/dist/esm/interfaces/DataGrid.js +0 -2
  71. package/dist/esm/interfaces/DataGrid.js.map +0 -1
  72. package/dist/index.d.ts +0 -2
  73. package/dist/index.es.js +0 -6992
  74. package/dist/index.es.js.map +0 -1
  75. package/dist/index.umd.js +0 -266
  76. package/dist/index.umd.js.map +0 -1
  77. package/dist/vite.svg +0 -1
@@ -1,5 +1,6 @@
1
1
  import React from 'react'
2
2
  import Table from '../components/Table'
3
+ import { Button } from "../components/Button"
3
4
  import { format } from "date-fns"
4
5
 
5
6
  export default {
@@ -21,202 +22,246 @@ export default {
21
22
  argTypes: {},
22
23
  }
23
24
 
24
- const data: any[] = [
25
+ const data = [
25
26
  {
26
- data: format(new Date('10-02-2023 17:00'), "dd/MM/yyyy"),
27
- horario: format(new Date('10-02-2023 17:00'), "HH:mm"),
28
- idade: 30,
29
- sobrenome: 'Lucas',
30
- sobrenome2: 'Jessika',
27
+ "date": format(new Date('8-14-2023 21:29'), "dd/MM/yyyy"),
28
+ "duration": 60,
29
+ "campaign": "Campaign 1",
30
+ "agent": "Maggie Leach",
31
+ "dnis": "dnis",
32
+ "disposition": "Disposition 1",
33
+ "origin": "origin",
34
+ "id": "1",
35
+ "action": (
36
+ <Button
37
+ color="primary"
38
+ disableElevation
39
+ variant="text"
40
+ onClick={() => console.log('click')}
41
+ >
42
+ Editar
43
+ </Button>
44
+ )
31
45
  },
32
46
  {
33
- data: format(new Date('7-12-2023 10:00'), "dd/MM/yyyy"),
34
- horario: format(new Date('7-12-2023 10:00'), "HH:mm"),
35
- idade: 30,
36
- sobrenome: 'Jessika',
37
- sobrenome2: 'Otto',
47
+ "date": format(new Date('8-13-2023 21:29'), "dd/MM/yyyy"),
48
+ "duration": 60,
49
+ "campaign": "Campaign 2",
50
+ "agent": "Christina Harris",
51
+ "ani": "ani",
52
+ "dnis": "dnis",
53
+ "disposition": "Disposition 2",
54
+ "origin": "origin",
55
+ "id": "2",
56
+ "action": (
57
+ <Button
58
+ color="primary"
59
+ disableElevation
60
+ variant="text"
61
+ onClick={() => console.log('click')}
62
+ >
63
+ Editar
64
+ </Button>
65
+ )
38
66
  },
39
67
  {
40
- data: format(new Date('9-26-2023 16:00'), "dd/MM/yyyy"),
41
- horario: format(new Date('9-26-2023 16:00'), "HH:mm"),
42
- idade: 70,
43
- sobrenome: 'Lucas',
44
- sobrenome2: 'Otto',
68
+ "date": format(new Date('8-12-2023 21:29'), "dd/MM/yyyy"),
69
+ "duration": 60,
70
+ "campaign": "Campaign 3",
71
+ "agent": "Alexia Crawford",
72
+ "ani": "ani",
73
+ "dnis": "dnis",
74
+ "disposition": "Disposition 3",
75
+ "origin": "origin",
76
+ "id": "3",
77
+ "action": (
78
+ <Button
79
+ color="primary"
80
+ disableElevation
81
+ variant="text"
82
+ onClick={() => console.log('click')}
83
+ >
84
+ Editar
85
+ </Button>
86
+ )
45
87
  },
46
88
  {
47
- data: format(new Date('11-29-2023 13:00'), "dd/MM/yyyy"),
48
- horario: format(new Date('11-29-2023 13:00'), "HH:mm"),
49
- idade: 40,
50
- sobrenome: 'Luna',
51
- sobrenome2: 'Jessika',
89
+ "date": format(new Date('8-11-2023 21:29'), "dd/MM/yyyy"),
90
+ "duration": 60,
91
+ "campaign": "Campaign 4",
92
+ "agent": "Robyn Phillips",
93
+ "ani": "ani",
94
+ "dnis": "dnis",
95
+ "disposition": "Disposition 4",
96
+ "origin": "origin",
97
+ "id": "4",
98
+ "action": (
99
+ <Button
100
+ color="primary"
101
+ disableElevation
102
+ variant="text"
103
+ onClick={() => console.log('click')}
104
+ >
105
+ Editar
106
+ </Button>
107
+ )
52
108
  },
53
109
  {
54
- data: format(new Date('10-02-2023 17:00'), "dd/MM/yyyy"),
55
- horario: format(new Date('10-02-2023 17:00'), "HH:mm"),
56
- idade: 124,
57
- sobrenome: 'Otto',
58
- sobrenome2: 'Jessika',
110
+ "date": format(new Date('8-10-2023 21:29'), "dd/MM/yyyy"),
111
+ "duration": 60,
112
+ "campaign": "Campaign 5",
113
+ "agent": "Bruce Robinson",
114
+ "ani": "ani",
115
+ "dnis": "dnis",
116
+ "disposition": "Disposition 5",
117
+ "origin": "origin",
118
+ "id": "5",
119
+ "action": (
120
+ <Button
121
+ color="primary"
122
+ disableElevation
123
+ variant="text"
124
+ onClick={() => console.log('click')}
125
+ >
126
+ Editar
127
+ </Button>
128
+ )
59
129
  },
60
130
  {
61
- data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
62
- horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
63
- idade: 50,
64
- sobrenome: 'Otto',
65
- sobrenome2: 'Jessika',
131
+ "date": format(new Date('8-9-2023 21:29'), "dd/MM/yyyy"),
132
+ "duration": 60,
133
+ "campaign": "Campaign 6",
134
+ "agent": "Sophia Fletcher",
135
+ "ani": "ani",
136
+ "dnis": "dnis",
137
+ "disposition": "Disposition 6",
138
+ "origin": "origin",
139
+ "id": "6",
140
+ "action": (
141
+ <Button
142
+ color="primary"
143
+ disableElevation
144
+ variant="text"
145
+ onClick={() => console.log('click')}
146
+ >
147
+ Editar
148
+ </Button>
149
+ )
66
150
  },
67
151
  {
68
- data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
69
- horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
70
- idade: 4,
71
- sobrenome: 'Jessika',
72
- sobrenome2: 'Luna',
152
+ "date": format(new Date('8-8-2023 21:29'), "dd/MM/yyyy"),
153
+ "duration": 60,
154
+ "campaign": "Campaign 7",
155
+ "agent": "Blanca Roberts",
156
+ "ani": "ani",
157
+ "dnis": "dnis",
158
+ "disposition": "Disposition 7",
159
+ "origin": "origin",
160
+ "id": "7",
161
+ "action": (
162
+ <Button
163
+ color="primary"
164
+ disableElevation
165
+ variant="text"
166
+ onClick={() => console.log('click')}
167
+ >
168
+ Editar
169
+ </Button>
170
+ )
73
171
  },
74
- // {
75
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
76
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
77
- // idade: 28,
78
- // sobrenome: 'Lucas 2',
79
- // sobrenome2: 'Jessika',
80
- // },
81
- // {
82
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
83
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
84
- // idade: 40,
85
- // sobrenome: 'Lucas 3',
86
- // sobrenome2: 'Jessika',
87
- // },
88
- // {
89
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
90
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
91
- // idade: 124,
92
- // sobrenome: 'Lucas 4',
93
- // sobrenome2: 'Jessika',
94
- // },
95
- // {
96
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
97
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
98
- // idade: 4,
99
- // sobrenome: 'Lucas 1',
100
- // sobrenome2: 'Jessika',
101
- // },
102
- // {
103
- // data: format(new Date('10-02-2023 17:00'), "dd/MM/yyyy"),
104
- // horario: format(new Date('10-02-2023 17:00'), "HH:mm"),
105
- // idade: 30,
106
- // sobrenome: 'Lucas',
107
- // sobrenome2: 'Jessika',
108
- // },
109
- // {
110
- // data: format(new Date('7-12-2023 10:00'), "dd/MM/yyyy"),
111
- // horario: format(new Date('7-12-2023 10:00'), "HH:mm"),
112
- // idade: 30,
113
- // sobrenome: 'Jessika',
114
- // sobrenome2: 'Otto',
115
- // },
116
- // {
117
- // data: format(new Date('9-26-2023 16:00'), "dd/MM/yyyy"),
118
- // horario: format(new Date('9-26-2023 16:00'), "HH:mm"),
119
- // idade: 70,
120
- // sobrenome: 'Lucas',
121
- // sobrenome2: 'Otto',
122
- // },
123
- // {
124
- // data: format(new Date('11-29-2023 13:00'), "dd/MM/yyyy"),
125
- // horario: format(new Date('11-29-2023 13:00'), "HH:mm"),
126
- // idade: 40,
127
- // sobrenome: 'Luna',
128
- // sobrenome2: 'Jessika',
129
- // },
130
- // {
131
- // data: format(new Date('10-02-2023 17:00'), "dd/MM/yyyy"),
132
- // horario: format(new Date('10-02-2023 17:00'), "HH:mm"),
133
- // idade: 124,
134
- // sobrenome: 'Otto',
135
- // sobrenome2: 'Jessika',
136
- // },
137
- // {
138
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
139
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
140
- // idade: 50,
141
- // sobrenome: 'Otto',
142
- // sobrenome2: 'Jessika',
143
- // },
144
- // {
145
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
146
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
147
- // idade: 4,
148
- // sobrenome: 'Jessika',
149
- // sobrenome2: 'Luna',
150
- // },
151
- // {
152
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
153
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
154
- // idade: 28,
155
- // sobrenome: 'Lucas 2',
156
- // sobrenome2: 'Jessika',
157
- // },
158
- // {
159
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
160
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
161
- // idade: 40,
162
- // sobrenome: 'Lucas 3',
163
- // sobrenome2: 'Jessika',
164
- // },
165
- // {
166
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
167
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
168
- // idade: 124,
169
- // sobrenome: 'Lucas 4',
170
- // sobrenome2: 'Jessika',
171
- // },
172
- // {
173
- // data: format(new Date('1-07-2023 08:00'), "dd/MM/yyyy"),
174
- // horario: format(new Date('1-07-2023 08:00'), "HH:mm"),
175
- // idade: 4,
176
- // sobrenome: 'Lucas 1',
177
- // sobrenome2: 'Jessika',
178
- // }
172
+ {
173
+ "date": format(new Date('8-7-2023 21:29'), "dd/MM/yyyy"),
174
+ "duration": 60,
175
+ "campaign": "Campaign 8",
176
+ "agent": "Peter Warburton",
177
+ "ani": "ani",
178
+ "dnis": "dnis",
179
+ "disposition": "Disposition 8",
180
+ "origin": "origin",
181
+ "id": "8",
182
+ "action": (
183
+ <Button
184
+ color="primary"
185
+ disableElevation
186
+ variant="text"
187
+ onClick={() => console.log('click')}
188
+ >
189
+ Editar
190
+ </Button>
191
+ )
192
+ }
179
193
  ]
180
194
 
181
195
  const columns = [
182
196
  {
183
- header: 'Data',
184
- accessorKey: 'data',
197
+ header: 'data',
198
+ accessorKey: 'date',
185
199
  type: 'date',
186
200
  enableColumnFilter: true,
187
201
  filterFn: 'customFilterText'
188
202
  },
189
203
  {
190
- header: 'Horario',
191
- accessorKey: 'horario',
192
- type: 'time',
204
+ header: 'duration',
205
+ accessorKey: 'duration',
206
+ type: 'number',
193
207
  enableColumnFilter: true,
194
208
  filterFn: 'customFilterText'
195
209
  },
196
210
  {
197
- header: 'Numero',
198
- accessorKey: 'idade',
211
+ header: 'campaign',
212
+ accessorKey: 'campaign',
213
+ type: 'string',
214
+ enableColumnFilter: true,
215
+ filterFn: 'customFilterText'
216
+ },
217
+ {
218
+ header: 'agent',
219
+ accessorKey: 'agent',
220
+ type: 'string',
221
+ enableColumnFilter: true,
222
+ filterFn: 'customFilterText'
223
+ },
224
+ {
225
+ header: 'disposition',
226
+ accessorKey: 'disposition',
227
+ type: 'string',
199
228
  enableColumnFilter: true,
200
- type: 'number',
201
229
  filterFn: 'customFilterText'
202
230
  },
203
231
  {
204
- header: 'sobrenome 1',
205
- accessorKey: 'sobrenome',
232
+ header: 'origin',
233
+ accessorKey: 'origin',
234
+ type: 'string',
206
235
  enableColumnFilter: true,
207
- type: 'text',
208
- filterFn: 'customFilterText',
236
+ filterFn: 'customFilterText'
209
237
  },
210
238
  {
211
- header: 'sobrenome 2',
212
- accessorKey: 'sobrenome2',
239
+ header: 'ID',
240
+ accessorKey: 'id',
241
+ type: 'string',
213
242
  enableColumnFilter: true,
214
- type: 'text',
215
- filterFn: 'customFilterText',
243
+ filterFn: 'customFilterText'
216
244
  },
245
+ {
246
+ header: 'action',
247
+ accessorKey: 'action',
248
+ type: 'action',
249
+ enableColumnFilter: false,
250
+ filterFn: 'customFilterText'
251
+ }
217
252
  ]
218
253
 
219
-
220
- export const Default = (args) => <Table data={data} columns={columns} {...args} />
254
+ export const Default = (args) => (
255
+ <Table
256
+ data={data}
257
+ columns={columns}
258
+ showTotalResults
259
+ showSettings
260
+ onClick={(value) => console.log('onClick line:', value)}
261
+ onMouseOver={(value) => console.log('onMouseOver line:', value)}
262
+ onMouseOut={(value) => console.log('onMouseOut line:', value)}
263
+ {...args}
264
+ />
265
+ )
221
266
 
222
267
  Default.args = {}
@@ -1,9 +0,0 @@
1
- import { ButtonBaseProps } from './types';
2
- export declare const Button: {
3
- ({ label, ...rest }: ButtonBaseProps): import("react/jsx-runtime").JSX.Element;
4
- defaultProps: {
5
- variant: string;
6
- size: string;
7
- color: string;
8
- };
9
- };
@@ -1,18 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Theme } from '@emotion/react';
3
- import { Button } from './index';
4
- import { ButtonPropsColorOverrides, ButtonPropsSizeOverrides, ButtonPropsVariantOverrides, ButtonProps as MuiButtonProps, SxProps } from '@mui/material';
5
- import { OverridableStringUnion } from '@mui/types';
6
- type MuiButtonBaseProps = Pick<MuiButtonProps, 'sx' | 'color' | 'size' | 'variant'>;
7
- export interface ButtonBaseProps extends MuiButtonBaseProps {
8
- label: string;
9
- sx?: SxProps<Theme>;
10
- children?: ReactNode;
11
- onClick?: (event: React.MouseEvent | React.KeyboardEvent | React.TouchEvent) => void;
12
- color?: OverridableStringUnion<'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning', ButtonPropsColorOverrides>;
13
- size?: OverridableStringUnion<'small' | 'medium' | 'large', ButtonPropsSizeOverrides>;
14
- variant?: OverridableStringUnion<'text' | 'outlined' | 'contained', ButtonPropsVariantOverrides>;
15
- style?: React.CSSProperties;
16
- }
17
- export type ButtonType = keyof typeof Button;
18
- export {};
@@ -1,3 +0,0 @@
1
- import { CardBaseProps } from './types';
2
- declare const Card: ({ children, title }: CardBaseProps) => import("react/jsx-runtime").JSX.Element;
3
- export default Card;
@@ -1,3 +0,0 @@
1
- import { CardHeaderBaseProps } from './types';
2
- declare const CardHeader: ({ title }: CardHeaderBaseProps) => import("react/jsx-runtime").JSX.Element;
3
- export default CardHeader;
@@ -1,4 +0,0 @@
1
- export * from './Card';
2
- export * from './CardHeader';
3
- export { default as Card } from './Card';
4
- export { default as CardHeader } from './CardHeader';