componenteshospitais 3.8.2 → 3.8.3
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 +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/types/stories/Button.stories.d.ts +1 -0
- package/dist/types/stories/Header.stories.d.ts +1 -0
- package/dist/types/stories/Page.stories.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/TableStandard.tsx +3 -2
- package/src/stories/TableStandard.stories.tsx +2 -4
package/dist/cjs/index.js
CHANGED
|
@@ -16409,7 +16409,7 @@ var TableStandard = function (_a) {
|
|
|
16409
16409
|
borderRadius: borderRadius ? "".concat(borderRadius, "px") : '7px',
|
|
16410
16410
|
borderColor: borderColor || '',
|
|
16411
16411
|
} }, key.charAt(0).toUpperCase() + key.slice(1))); }),
|
|
16412
|
-
(showActionColumn || showDownloadButton || showViewButton) && (React.createElement("th", { className: styles$2.header, style: {
|
|
16412
|
+
(showActionColumn || showDownloadButton || showViewButton || showTrash) && (React.createElement("th", { className: styles$2.header, style: {
|
|
16413
16413
|
borderRadius: borderRadius ? "".concat(borderRadius, "px") : '7px',
|
|
16414
16414
|
borderColor: borderColor || '',
|
|
16415
16415
|
} }, "A\u00E7\u00F5es")))),
|
|
@@ -16419,7 +16419,7 @@ var TableStandard = function (_a) {
|
|
|
16419
16419
|
borderRadius: borderRadius ? "".concat(borderRadius, "px") : '7px',
|
|
16420
16420
|
borderColor: borderColor || '',
|
|
16421
16421
|
}, title: row[key] }, row[key])); }),
|
|
16422
|
-
(showActionColumn || showDownloadButton || showViewButton) && (React.createElement("td", { className: styles$2.cell, style: {
|
|
16422
|
+
(showActionColumn || showDownloadButton || showViewButton || showTrash) && (React.createElement("td", { className: styles$2.cell, style: {
|
|
16423
16423
|
padding: cellsPadding ? "".concat(cellsPadding, "px") : '1rem',
|
|
16424
16424
|
borderRadius: borderRadius ? "".concat(borderRadius, "px") : '7px',
|
|
16425
16425
|
borderColor: borderColor || '',
|
package/dist/esm/index.js
CHANGED
|
@@ -16407,7 +16407,7 @@ var TableStandard = function (_a) {
|
|
|
16407
16407
|
borderRadius: borderRadius ? "".concat(borderRadius, "px") : '7px',
|
|
16408
16408
|
borderColor: borderColor || '',
|
|
16409
16409
|
} }, key.charAt(0).toUpperCase() + key.slice(1))); }),
|
|
16410
|
-
(showActionColumn || showDownloadButton || showViewButton) && (React.createElement("th", { className: styles$2.header, style: {
|
|
16410
|
+
(showActionColumn || showDownloadButton || showViewButton || showTrash) && (React.createElement("th", { className: styles$2.header, style: {
|
|
16411
16411
|
borderRadius: borderRadius ? "".concat(borderRadius, "px") : '7px',
|
|
16412
16412
|
borderColor: borderColor || '',
|
|
16413
16413
|
} }, "A\u00E7\u00F5es")))),
|
|
@@ -16417,7 +16417,7 @@ var TableStandard = function (_a) {
|
|
|
16417
16417
|
borderRadius: borderRadius ? "".concat(borderRadius, "px") : '7px',
|
|
16418
16418
|
borderColor: borderColor || '',
|
|
16419
16419
|
}, title: row[key] }, row[key])); }),
|
|
16420
|
-
(showActionColumn || showDownloadButton || showViewButton) && (React.createElement("td", { className: styles$2.cell, style: {
|
|
16420
|
+
(showActionColumn || showDownloadButton || showViewButton || showTrash) && (React.createElement("td", { className: styles$2.cell, style: {
|
|
16421
16421
|
padding: cellsPadding ? "".concat(cellsPadding, "px") : '1rem',
|
|
16422
16422
|
borderRadius: borderRadius ? "".concat(borderRadius, "px") : '7px',
|
|
16423
16423
|
borderColor: borderColor || '',
|
package/package.json
CHANGED
|
@@ -133,7 +133,7 @@ const TableStandard: React.FC<TableStandardProps> = ({
|
|
|
133
133
|
{key.charAt(0).toUpperCase() + key.slice(1)}
|
|
134
134
|
</th>
|
|
135
135
|
))}
|
|
136
|
-
{(showActionColumn || showDownloadButton || showViewButton) && (
|
|
136
|
+
{(showActionColumn || showDownloadButton || showViewButton || showTrash) && (
|
|
137
137
|
<th
|
|
138
138
|
className={styles.header}
|
|
139
139
|
style={{
|
|
@@ -168,7 +168,7 @@ const TableStandard: React.FC<TableStandardProps> = ({
|
|
|
168
168
|
{row[key]}
|
|
169
169
|
</td>
|
|
170
170
|
))}
|
|
171
|
-
{(showActionColumn || showDownloadButton || showViewButton) && (
|
|
171
|
+
{(showActionColumn || showDownloadButton || showViewButton || showTrash) && (
|
|
172
172
|
<td
|
|
173
173
|
className={styles.cell}
|
|
174
174
|
style={{
|
|
@@ -197,6 +197,7 @@ const TableStandard: React.FC<TableStandardProps> = ({
|
|
|
197
197
|
<FaPen />
|
|
198
198
|
</button>
|
|
199
199
|
)}
|
|
200
|
+
|
|
200
201
|
{showDownloadButton && shouldShowDownloadButton(row[idColumn]) && (
|
|
201
202
|
<button
|
|
202
203
|
onClick={e => {
|
|
@@ -86,7 +86,7 @@ const meta: Meta<TableStandardProps> = {
|
|
|
86
86
|
|
|
87
87
|
export default meta;
|
|
88
88
|
|
|
89
|
-
const Template: StoryFn<TableStandardProps> = (args) => <TableStandard {...args} hiddenColumns={['cargo']}
|
|
89
|
+
const Template: StoryFn<TableStandardProps> = (args) => <TableStandard {...args} hiddenColumns={['cargo']} />;
|
|
90
90
|
|
|
91
91
|
// Definição dos dados de exemplo para a tabela
|
|
92
92
|
const sampleData = [
|
|
@@ -153,11 +153,9 @@ const sampleData = [
|
|
|
153
153
|
export const Primary = Template.bind({});
|
|
154
154
|
Primary.args = {
|
|
155
155
|
dados: sampleData,
|
|
156
|
-
showActionColumn: true,
|
|
157
|
-
showDownloadButton: true,
|
|
158
|
-
showViewButton: true,
|
|
159
156
|
numeroPaginas: 2,
|
|
160
157
|
empresa: '1',
|
|
158
|
+
showTrash: true,
|
|
161
159
|
};
|
|
162
160
|
|
|
163
161
|
// História com botão de download do Excel
|