componenteshospitais 3.6.1 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -16673,7 +16673,7 @@ var TableStandardButtons = function (_a) {
16673
16673
  React.createElement("i", { className: "".concat(styles$2.icon, " ").concat(row[key].iconButton), title: key.charAt(0).toUpperCase() + key.slice(1), onClick: function () { return handleClick(row); }, style: { color: row[key].colorButton ? row[key].colorButton : '' } }),
16674
16674
  row[key].typeColumn && row[key].typeColumn === 'checkbox' &&
16675
16675
  React.createElement("div", { className: styles$2.formGroupRadio },
16676
- React.createElement(InputField, { type: 'checkbox', id: "checkbox_".concat(row[key].value), placeholder: '', value: row[key].initialValue && row[key].initialValue, checked: row[key].initialValue === row[key].value, disabled: !onchange, onChange: function () { return handleClick(row); } })),
16676
+ React.createElement(InputField, { type: 'checkbox', id: "checkbox_".concat(row[key].value), placeholder: '', value: row[key].initialValue && row[key].initialValue, checked: row[key].initialValue === row[key].value, disabled: !row[key].onClick, onChange: function () { return handleClick(row); } })),
16677
16677
  row[key].typeColumn && row[key].typeColumn === 'img' &&
16678
16678
  React.createElement("div", null,
16679
16679
  React.createElement("img", { src: row[key].img && row[key].img, alt: key.charAt(0).toUpperCase() + key.slice(1), className: styles$2.img })),
package/dist/esm/index.js CHANGED
@@ -16671,7 +16671,7 @@ var TableStandardButtons = function (_a) {
16671
16671
  React.createElement("i", { className: "".concat(styles$2.icon, " ").concat(row[key].iconButton), title: key.charAt(0).toUpperCase() + key.slice(1), onClick: function () { return handleClick(row); }, style: { color: row[key].colorButton ? row[key].colorButton : '' } }),
16672
16672
  row[key].typeColumn && row[key].typeColumn === 'checkbox' &&
16673
16673
  React.createElement("div", { className: styles$2.formGroupRadio },
16674
- React.createElement(InputField, { type: 'checkbox', id: "checkbox_".concat(row[key].value), placeholder: '', value: row[key].initialValue && row[key].initialValue, checked: row[key].initialValue === row[key].value, disabled: !onchange, onChange: function () { return handleClick(row); } })),
16674
+ React.createElement(InputField, { type: 'checkbox', id: "checkbox_".concat(row[key].value), placeholder: '', value: row[key].initialValue && row[key].initialValue, checked: row[key].initialValue === row[key].value, disabled: !row[key].onClick, onChange: function () { return handleClick(row); } })),
16675
16675
  row[key].typeColumn && row[key].typeColumn === 'img' &&
16676
16676
  React.createElement("div", null,
16677
16677
  React.createElement("img", { src: row[key].img && row[key].img, alt: key.charAt(0).toUpperCase() + key.slice(1), className: styles$2.img })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -165,7 +165,7 @@ const TableStandardButtons: React.FC<TableStandardButtonsProps> = ({
165
165
  placeholder=''
166
166
  value={row[key].initialValue && row[key].initialValue}
167
167
  checked={row[key].initialValue === row[key].value}
168
- disabled={!onchange}
168
+ disabled={!row[key].onClick}
169
169
  onChange={() => handleClick(row)}
170
170
  />
171
171
  </div>
@@ -7,7 +7,7 @@ interface DetalhesColuna{
7
7
  typeColumn?: 'button' | 'icon' | 'checkbox' | 'img' | ''; // Valores esperados para o tipo da coluna
8
8
  iconButton?: string; // Classe do ícone
9
9
  colorButton?: string; // Cor do botão ou ícone
10
- onclick?: (() => void) | null; // Evento de clique
10
+ onClick?: ((rowId: string) => void) | null; // Evento de clique
11
11
  initialValue?: string; // Valor inicial (usado, por exemplo, para checkboxes)
12
12
  borderRadius?: string; // Bordas arredondadas para botões
13
13
  img?: string; // URL da imagem, caso `typeColumn` seja 'img'
@@ -74,68 +74,68 @@ const Template: StoryFn<TableStandardButtonsProps> = (args) => <TableStandardBut
74
74
  // Definição dos dados de exemplo para a tabela
75
75
  const sampleData: Data[] = [
76
76
  {
77
- id: {value: '1', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
78
- nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
79
- historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
80
- idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
81
- visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '', borderRadius: '5'},
82
- cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
83
- ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '1',},
77
+ id: {value: '1', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
78
+ nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
79
+ historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
80
+ idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
81
+ visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '', borderRadius: '5'},
82
+ cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
83
+ ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '1',},
84
84
 
85
85
  },
86
86
  {
87
- id: {value: '2', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
88
- nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
89
- historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
90
- idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
91
- visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '', borderRadius: '5'},
92
- cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
93
- ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '1',},
87
+ id: {value: '2', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
88
+ nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
89
+ historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
90
+ idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
91
+ visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '', borderRadius: '5'},
92
+ cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
93
+ ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '1',},
94
94
  },
95
95
  {
96
- id: {value: '3', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
97
- nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
98
- historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
99
- idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
100
- visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '', borderRadius: '5'},
101
- cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
102
- ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '1',},
96
+ id: {value: '3', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
97
+ nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
98
+ historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
99
+ idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
100
+ visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '', borderRadius: '5'},
101
+ cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
102
+ ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '1',},
103
103
  },
104
104
  {
105
- id: {value: '4', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
106
- nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
107
- historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
108
- idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
109
- visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '', borderRadius: '5'},
110
- cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
111
- ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '',},
105
+ id: {value: '4', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
106
+ nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
107
+ historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
108
+ idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
109
+ visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '', borderRadius: '5'},
110
+ cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
111
+ ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '',},
112
112
  },
113
113
  {
114
- id: {value: '5', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
115
- nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
116
- historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
117
- idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
118
- visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '', borderRadius: '5'},
119
- cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
120
- ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '', },
114
+ id: {value: '5', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
115
+ nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
116
+ historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
117
+ idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
118
+ visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '', borderRadius: '5'},
119
+ cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
120
+ ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '', },
121
121
  },
122
122
  {
123
- id: {value: '6', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
124
- nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
125
- historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
126
- idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
127
- visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '', borderRadius: '5'},
128
- cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
129
- ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '',},
123
+ id: {value: '6', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
124
+ nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
125
+ historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
126
+ idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
127
+ visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '', borderRadius: '5'},
128
+ cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
129
+ ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '',},
130
130
  },
131
131
  {
132
- id: {value: '7', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
133
- nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
134
- historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
135
- idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
136
- visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '', borderRadius: '5'},
137
- cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--var(--red))', onclick: null, initialValue: ''},
138
- ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: '', },
132
+ id: {value: '7', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
133
+ nome: {value: 'Carlos Souza', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
134
+ historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
135
+ idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
136
+ visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '', borderRadius: '5'},
137
+ cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--var(--red))', onClick: null, initialValue: ''},
138
+ ativo: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: '', },
139
139
  }
140
140
  ];
141
141
 
@@ -162,20 +162,20 @@ NoActionButtons.args = {
162
162
  dados: [
163
163
  ...sampleData,
164
164
  {
165
- id: {value: '8', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
166
- nome: {value: 'Ana Beatriz', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
167
- historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
168
- idade: {value: '28', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
169
- visualizar: {value: '40', typeColumn: 'button', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
170
- cargo: {value: 'Designer', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
165
+ id: {value: '8', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
166
+ nome: {value: 'Ana Beatriz', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
167
+ historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
168
+ idade: {value: '28', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
169
+ visualizar: {value: '40', typeColumn: 'button', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
170
+ cargo: {value: 'Designer', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
171
171
  },
172
172
  {
173
- id: {value: '9', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
174
- nome: {value: 'Lucas Andrade', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
175
- historico: {value: '', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
176
- idade: {value: '50', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
177
- visualizar: {value: '40', typeColumn: 'button', iconButton: 'fa fa-users', colorButton: 'var(--red)', onclick: null, initialValue: ''},
178
- cargo: {value: 'Diretor', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onclick: null, initialValue: ''},
173
+ id: {value: '9', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
174
+ nome: {value: 'Lucas Andrade', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
175
+ historico: {value: '', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
176
+ idade: {value: '50', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
177
+ visualizar: {value: '40', typeColumn: 'button', iconButton: 'fa fa-users', colorButton: 'var(--red)', onClick: null, initialValue: ''},
178
+ cargo: {value: 'Diretor', typeColumn: '', iconButton: '', colorButton: 'var(--red)', onClick: null, initialValue: ''},
179
179
  }
180
180
  ],
181
181
  numeroPaginas: 3,