@metropolle/design-system 1.0.0-beta.20250821024300.dfbe136 → 1.0.0-beta.2026.1.10.2327.6729fca
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/README.md +1 -0
- package/dist/css/compat/back.css +478 -0
- package/dist/css/components.css +3638 -8
- package/dist/css/liquid-glass.css +468 -0
- package/dist/css/mermaid.css +163 -0
- package/dist/css/tokens.css +67 -0
- package/dist/react/components/react/Button/Button.d.ts +1 -1
- package/dist/react/components/react/Button/Button.d.ts.map +1 -1
- package/dist/react/components/react/DataTable/DataTable.d.ts +4 -0
- package/dist/react/components/react/DataTable/DataTable.d.ts.map +1 -0
- package/dist/react/components/react/DataTable/TableHeader.d.ts +4 -0
- package/dist/react/components/react/DataTable/TableHeader.d.ts.map +1 -0
- package/dist/react/components/react/DataTable/TableRow.d.ts +4 -0
- package/dist/react/components/react/DataTable/TableRow.d.ts.map +1 -0
- package/dist/react/components/react/DataTable/examples.d.ts +28 -0
- package/dist/react/components/react/DataTable/examples.d.ts.map +1 -0
- package/dist/react/components/react/DataTable/index.d.ts +7 -0
- package/dist/react/components/react/DataTable/index.d.ts.map +1 -0
- package/dist/react/components/react/DataTable/migration-example.d.ts +46 -0
- package/dist/react/components/react/DataTable/migration-example.d.ts.map +1 -0
- package/dist/react/components/react/DataTable/renderers.d.ts +24 -0
- package/dist/react/components/react/DataTable/renderers.d.ts.map +1 -0
- package/dist/react/components/react/DataTable/types.d.ts +58 -0
- package/dist/react/components/react/DataTable/types.d.ts.map +1 -0
- package/dist/react/components/react/DetailModal/DetailModal.d.ts +55 -0
- package/dist/react/components/react/DetailModal/DetailModal.d.ts.map +1 -0
- package/dist/react/components/react/DetailModal/index.d.ts +3 -0
- package/dist/react/components/react/DetailModal/index.d.ts.map +1 -0
- package/dist/react/components/react/FormField/FormField.d.ts +26 -0
- package/dist/react/components/react/FormField/FormField.d.ts.map +1 -0
- package/dist/react/components/react/FormField/index.d.ts +3 -0
- package/dist/react/components/react/FormField/index.d.ts.map +1 -0
- package/dist/react/components/react/FormGrid/FormGrid.d.ts +20 -0
- package/dist/react/components/react/FormGrid/FormGrid.d.ts.map +1 -0
- package/dist/react/components/react/FormGrid/index.d.ts +3 -0
- package/dist/react/components/react/FormGrid/index.d.ts.map +1 -0
- package/dist/react/components/react/FormModal/FormModal.d.ts +58 -0
- package/dist/react/components/react/FormModal/FormModal.d.ts.map +1 -0
- package/dist/react/components/react/FormModal/index.d.ts +3 -0
- package/dist/react/components/react/FormModal/index.d.ts.map +1 -0
- package/dist/react/components/react/FormSection/FormSection.d.ts +20 -0
- package/dist/react/components/react/FormSection/FormSection.d.ts.map +1 -0
- package/dist/react/components/react/FormSection/index.d.ts +3 -0
- package/dist/react/components/react/FormSection/index.d.ts.map +1 -0
- package/dist/react/components/react/GlassCard/GlassCard.d.ts +56 -6
- package/dist/react/components/react/GlassCard/GlassCard.d.ts.map +1 -1
- package/dist/react/components/react/GlassCard/index.d.ts +1 -1
- package/dist/react/components/react/GlassCard/index.d.ts.map +1 -1
- package/dist/react/components/react/InfoBox/InfoBox.d.ts +46 -0
- package/dist/react/components/react/InfoBox/InfoBox.d.ts.map +1 -0
- package/dist/react/components/react/InfoBox/index.d.ts +3 -0
- package/dist/react/components/react/InfoBox/index.d.ts.map +1 -0
- package/dist/react/components/react/Modal/ConfirmDialog.d.ts +17 -0
- package/dist/react/components/react/Modal/ConfirmDialog.d.ts.map +1 -0
- package/dist/react/components/react/Modal/Modal.d.ts +12 -0
- package/dist/react/components/react/Modal/Modal.d.ts.map +1 -0
- package/dist/react/components/react/Modal/ModalBody.d.ts +9 -0
- package/dist/react/components/react/Modal/ModalBody.d.ts.map +1 -0
- package/dist/react/components/react/Modal/ModalFooter.d.ts +8 -0
- package/dist/react/components/react/Modal/ModalFooter.d.ts.map +1 -0
- package/dist/react/components/react/Modal/ModalHeader.d.ts +11 -0
- package/dist/react/components/react/Modal/ModalHeader.d.ts.map +1 -0
- package/dist/react/components/react/Modal/index.d.ts +6 -0
- package/dist/react/components/react/Modal/index.d.ts.map +1 -0
- package/dist/react/components/react/ProfileCard/ProfileCard.d.ts +55 -0
- package/dist/react/components/react/ProfileCard/ProfileCard.d.ts.map +1 -0
- package/dist/react/components/react/ProfileCard/index.d.ts +3 -0
- package/dist/react/components/react/ProfileCard/index.d.ts.map +1 -0
- package/dist/react/components/react/Select/Select.d.ts +71 -0
- package/dist/react/components/react/Select/Select.d.ts.map +1 -0
- package/dist/react/components/react/Select/index.d.ts +2 -0
- package/dist/react/components/react/Select/index.d.ts.map +1 -0
- package/dist/react/components/react/ThemeToggle/ThemeToggle.d.ts +28 -0
- package/dist/react/components/react/ThemeToggle/ThemeToggle.d.ts.map +1 -0
- package/dist/react/components/react/ThemeToggle/index.d.ts +3 -0
- package/dist/react/components/react/ThemeToggle/index.d.ts.map +1 -0
- package/dist/react/components/react/Typography/Typography.d.ts.map +1 -1
- package/dist/react/components/react/index.d.ts +25 -0
- package/dist/react/components/react/index.d.ts.map +1 -1
- package/dist/react/index.d.ts +32 -7
- package/dist/react/index.esm.js +1586 -14
- package/dist/react/index.esm.js.map +1 -1
- package/dist/react/index.js +1611 -12
- package/dist/react/index.js.map +1 -1
- package/dist/tokens/colors.json +100 -18
- package/dist/tokens/index.d.ts +19 -24
- package/dist/tokens/index.js +69 -2
- package/dist/tokens/index.json +100 -18
- package/package.json +24 -13
package/dist/css/tokens.css
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
/* Metropolle Design System Tokens */
|
|
3
3
|
|
|
4
|
+
/* COLORS */
|
|
5
|
+
--mds-colors-color-brand-primary-default: #0055FF;
|
|
6
|
+
--mds-colors-color-brand-primary-hover: #0044CC;
|
|
7
|
+
--mds-colors-color-brand-primary-active: #003399;
|
|
8
|
+
--mds-colors-color-brand-primary-disabled: #80AAFF;
|
|
9
|
+
--mds-colors-color-brand-secondary-default: #FF9900;
|
|
10
|
+
--mds-colors-color-brand-secondary-hover: #E68A00;
|
|
11
|
+
--mds-colors-color-brand-secondary-active: #CC7A00;
|
|
12
|
+
--mds-colors-color-brand-secondary-disabled: #FFCC80;
|
|
13
|
+
--mds-colors-color-brand-neutral: #333333;
|
|
14
|
+
--mds-colors-color-semantic-success-default: #10B981;
|
|
15
|
+
--mds-colors-color-semantic-success-light: #D1FAE5;
|
|
16
|
+
--mds-colors-color-semantic-success-dark: #065F46;
|
|
17
|
+
--mds-colors-color-semantic-warning-default: #F59E0B;
|
|
18
|
+
--mds-colors-color-semantic-warning-light: #FEF3C7;
|
|
19
|
+
--mds-colors-color-semantic-warning-dark: #92400E;
|
|
20
|
+
--mds-colors-color-semantic-error-default: #EF4444;
|
|
21
|
+
--mds-colors-color-semantic-error-light: #FEE2E2;
|
|
22
|
+
--mds-colors-color-semantic-error-dark: #991B1B;
|
|
23
|
+
--mds-colors-color-semantic-info-default: #3B82F6;
|
|
24
|
+
--mds-colors-color-semantic-info-light: #DBEAFE;
|
|
25
|
+
--mds-colors-color-semantic-info-dark: #1E40AF;
|
|
26
|
+
--mds-colors-color-background-primary: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
|
|
27
|
+
--mds-colors-color-background-secondary: rgba(255, 255, 255, 0.05);
|
|
28
|
+
--mds-colors-color-background-glass-light: rgba(255, 255, 255, 0.15);
|
|
29
|
+
--mds-colors-color-background-glass-dark: rgba(60, 60, 60, 0.8);
|
|
30
|
+
--mds-colors-color-text-primary: #ffffff;
|
|
31
|
+
--mds-colors-color-text-secondary: rgba(255, 255, 255, 0.7);
|
|
32
|
+
--mds-colors-color-text-muted: rgba(255, 255, 255, 0.5);
|
|
33
|
+
--mds-colors-color-border-light: rgba(255, 255, 255, 0.1);
|
|
34
|
+
--mds-colors-color-border-medium: rgba(255, 255, 255, 0.2);
|
|
35
|
+
--mds-colors-color-border-strong: rgba(255, 255, 255, 0.3);
|
|
36
|
+
|
|
4
37
|
/* TYPOGRAPHY */
|
|
5
38
|
--mds-typography-fontFamily-brand: Helvetica, Inter Tight, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
6
39
|
--mds-typography-fontFamily-mono: 'SF Mono', Monaco, 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
|
|
@@ -33,6 +66,40 @@
|
|
|
33
66
|
--mds-spacing-xl: 2rem;
|
|
34
67
|
--mds-spacing-2xl: 3rem;
|
|
35
68
|
--mds-spacing-3xl: 4rem;
|
|
69
|
+
--mds-spacing-borderRadius-sm: 0.25rem;
|
|
70
|
+
--mds-spacing-borderRadius-md: 0.5rem;
|
|
71
|
+
--mds-spacing-borderRadius-lg: 1rem;
|
|
72
|
+
--mds-spacing-borderRadius-xl: 1.25rem;
|
|
73
|
+
--mds-spacing-borderRadius-full: 50%;
|
|
74
|
+
--mds-spacing-shadow-glass-light: 0 8px 32px rgba(0, 0, 0, 0.1);
|
|
75
|
+
--mds-spacing-shadow-glass-lightHover: 0 12px 40px rgba(0, 0, 0, 0.15);
|
|
76
|
+
--mds-spacing-shadow-glass-dark: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
77
|
+
--mds-spacing-shadow-glass-darkHover: 0 12px 40px rgba(0, 0, 0, 0.4);
|
|
78
|
+
--mds-spacing-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
79
|
+
--mds-spacing-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
|
|
80
|
+
--mds-spacing-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
|
|
81
|
+
--mds-spacing-blur-glass-default: 20px;
|
|
82
|
+
--mds-spacing-blur-glass-light: 15px;
|
|
83
|
+
--mds-spacing-blur-glass-heavy: 30px;
|
|
84
|
+
|
|
85
|
+
/* EFFECTS */
|
|
86
|
+
--mds-effects-transition-fast: 0.15s ease;
|
|
87
|
+
--mds-effects-transition-normal: 0.3s ease;
|
|
88
|
+
--mds-effects-transition-slow: 0.5s ease;
|
|
89
|
+
--mds-effects-animation-fadeIn: fadeIn 0.3s ease-in-out;
|
|
90
|
+
--mds-effects-animation-slideUp: slideUp 0.3s ease-out;
|
|
91
|
+
--mds-effects-animation-bounce: bounce 0.6s ease-in-out;
|
|
92
|
+
--mds-effects-backdrop-glass-filter: blur(var(--blur, 20px));
|
|
93
|
+
--mds-effects-backdrop-glass-webkitFilter: blur(var(--blur, 20px));
|
|
94
|
+
--mds-effects-transform-hoverUp: translateY(-2px);
|
|
95
|
+
--mds-effects-transform-scale-hover: scale(1.02);
|
|
96
|
+
--mds-effects-transform-scale-active: scale(0.98);
|
|
97
|
+
--mds-effects-opacity-glass-light-default: 0.15;
|
|
98
|
+
--mds-effects-opacity-glass-light-hover: 0.2;
|
|
99
|
+
--mds-effects-opacity-glass-dark-default: 0.8;
|
|
100
|
+
--mds-effects-opacity-glass-dark-hover: 0.85;
|
|
101
|
+
--mds-effects-opacity-disabled: 0.5;
|
|
102
|
+
--mds-effects-opacity-muted: 0.7;
|
|
36
103
|
|
|
37
104
|
}
|
|
38
105
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
3
|
/** Variante visual do botão */
|
|
4
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'glass';
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'subtle' | 'glass' | 'danger';
|
|
5
5
|
/** Tamanho do botão */
|
|
6
6
|
size?: 'sm' | 'md' | 'lg';
|
|
7
7
|
/** Estado de loading */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGhE,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,+BAA+B;IAC/B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGhE,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,+BAA+B;IAC/B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACxF,uBAAuB;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,wBAAwB;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,+BAA+B;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,uFA4DjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DataTable/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,cAAc,EAAe,MAAM,SAAS,CAAC;AAItD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAsM9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DataTable/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA4ElD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DataTable/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAe,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAgH5C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TableColumn, TableAction } from './types';
|
|
2
|
+
export declare const parametersTableConfig: {
|
|
3
|
+
columns: TableColumn[];
|
|
4
|
+
actions: TableAction[];
|
|
5
|
+
};
|
|
6
|
+
export declare const regionsTableConfig: {
|
|
7
|
+
columns: TableColumn[];
|
|
8
|
+
actions: TableAction[];
|
|
9
|
+
};
|
|
10
|
+
export declare const countriesTableConfig: {
|
|
11
|
+
columns: TableColumn[];
|
|
12
|
+
actions: TableAction[];
|
|
13
|
+
};
|
|
14
|
+
export declare const auditLogTableConfig: {
|
|
15
|
+
columns: TableColumn[];
|
|
16
|
+
};
|
|
17
|
+
export declare const statesTableConfig: {
|
|
18
|
+
columns: TableColumn[];
|
|
19
|
+
actions: TableAction[];
|
|
20
|
+
};
|
|
21
|
+
export declare const citiesTableConfig: {
|
|
22
|
+
columns: TableColumn[];
|
|
23
|
+
actions: TableAction[];
|
|
24
|
+
};
|
|
25
|
+
export declare const getTableConfig: (type: string) => {
|
|
26
|
+
columns: TableColumn[];
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=examples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DataTable/examples.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAInD,eAAO,MAAM,qBAAqB;aAyB3B,WAAW,EAAE;aAkBb,WAAW,EAAE;CACnB,CAAC;AAGF,eAAO,MAAM,kBAAkB;aAgCxB,WAAW,EAAE;aAgBb,WAAW,EAAE;CACnB,CAAC;AAGF,eAAO,MAAM,oBAAoB;aAmC1B,WAAW,EAAE;aAeb,WAAW,EAAE;CACnB,CAAC;AAGF,eAAO,MAAM,mBAAmB;aA8DzB,WAAW,EAAE;CACnB,CAAC;AAGF,eAAO,MAAM,iBAAiB;aA0BvB,WAAW,EAAE;aAeb,WAAW,EAAE;CACnB,CAAC;AAGF,eAAO,MAAM,iBAAiB;aAoCvB,WAAW,EAAE;aAeb,WAAW,EAAE;CACnB,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM;aAxGpC,WAAW,EAAE;CAyHnB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { DataTable } from './DataTable';
|
|
2
|
+
export { TableHeader } from './TableHeader';
|
|
3
|
+
export { TableRow } from './TableRow';
|
|
4
|
+
export { CellRenderers, ActionIcons } from './renderers';
|
|
5
|
+
export { parametersTableConfig, regionsTableConfig, countriesTableConfig, statesTableConfig, citiesTableConfig, auditLogTableConfig, getTableConfig } from './examples';
|
|
6
|
+
export type { DataTableProps, TableColumn, TableAction, TableRowProps, TableHeaderProps } from './types';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DataTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACf,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,cAAc,EACd,WAAW,EACX,WAAW,EACX,aAAa,EACb,gBAAgB,EACjB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exemplo de Migração: ParametersTable → DataTable
|
|
3
|
+
*
|
|
4
|
+
* Este arquivo mostra como migrar a tabela de parâmetros existente
|
|
5
|
+
* para usar o novo componente DataTable padronizado.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
interface Parameter {
|
|
9
|
+
name: string;
|
|
10
|
+
value: string;
|
|
11
|
+
type: 'String' | 'SecureString' | 'StringList';
|
|
12
|
+
description: string;
|
|
13
|
+
}
|
|
14
|
+
interface ParametersDataTableProps {
|
|
15
|
+
parameters: Parameter[];
|
|
16
|
+
loading: boolean;
|
|
17
|
+
onEdit: (parameter: Parameter) => void;
|
|
18
|
+
onDelete: (parameter: Parameter) => void;
|
|
19
|
+
deletingParameterName?: string;
|
|
20
|
+
searchTerm?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const ParametersTableOld: ({ parameters, loading, onEdit, onDelete }: any) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const ParametersDataTable: React.FC<ParametersDataTableProps>;
|
|
24
|
+
export declare const ExampleUsage: () => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
26
|
+
/**
|
|
27
|
+
* VANTAGENS DA MIGRAÇÃO:
|
|
28
|
+
*
|
|
29
|
+
* 1. ✅ Código reduzido: De ~280 linhas para ~50 linhas
|
|
30
|
+
* 2. ✅ Responsividade automática: Mobile/tablet otimizados
|
|
31
|
+
* 3. ✅ Estilos consistentes: Mesmo visual em toda plataforma
|
|
32
|
+
* 4. ✅ Manutenção centralizada: Updates no design system
|
|
33
|
+
* 5. ✅ Acessibilidade: ARIA roles automáticos
|
|
34
|
+
* 6. ✅ Performance: Renderização otimizada
|
|
35
|
+
* 7. ✅ TypeScript: Tipagem completa e IntelliSense
|
|
36
|
+
*
|
|
37
|
+
* PASSOS DA MIGRAÇÃO:
|
|
38
|
+
*
|
|
39
|
+
* 1. Substituir import: ParametersTable → DataTable
|
|
40
|
+
* 2. Configurar columns array com render functions
|
|
41
|
+
* 3. Configurar actions array com handlers
|
|
42
|
+
* 4. Remover código inline de estilo/layout
|
|
43
|
+
* 5. Testar responsividade mobile
|
|
44
|
+
* 6. Remover componente antigo após validação
|
|
45
|
+
*/
|
|
46
|
+
//# sourceMappingURL=migration-example.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-example.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DataTable/migration-example.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,cAAc,GAAG,YAAY,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,wBAAwB;IAChC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACzC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,eAAO,MAAM,kBAAkB,GAAI,2CAA2C,GAAG,4CAehF,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAwElE,CAAC;AAGF,eAAO,MAAM,YAAY,+CAqCxB,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;GAmBG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const CellRenderers: {
|
|
2
|
+
id: (value: any) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
name: (value: any) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
parameterValue: (value: any, item: any) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
badge: (value: any, variant?: "primary" | "success" | "warning" | "danger" | "info") => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
parameterType: (value: any) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
environment: (value: any, item: any) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
actionType: (value: any) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
date: (value: any) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
description: (value: any) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
jsonPreview: (value: any) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
combined: (mainValue: any, description: any) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
combinedWithBadges: (mainValue: any, badges: Array<{
|
|
14
|
+
value: any;
|
|
15
|
+
variant?: string;
|
|
16
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export declare const ActionIcons: {
|
|
19
|
+
edit: import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
delete: import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
view: import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
loading: import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=renderers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DataTable/renderers.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;gBAEZ,GAAG;kBAeD,GAAG;4BAcO,GAAG,QAAQ,GAAG;mBAqBvB,GAAG,YAAW,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM;2BAO3D,GAAG;yBAOL,GAAG,QAAQ,GAAG;wBAOf,GAAG;kBAOT,GAAG;yBAUI,GAAG;yBAcH,GAAG;0BAoBF,GAAG,eAAe,GAAG;oCAQX,GAAG,UAAU,KAAK,CAAC;QAAC,KAAK,EAAE,GAAG,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;CAYnF,CAAC;AAGF,eAAO,MAAM,WAAW;;;;;CAqBvB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface TableColumn {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
width?: string;
|
|
5
|
+
align?: 'left' | 'center' | 'right';
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
render?: (value: any, item: any, index: number) => React.ReactNode;
|
|
8
|
+
responsive?: {
|
|
9
|
+
mobile?: 'hide' | 'stack' | 'show';
|
|
10
|
+
tablet?: 'hide' | 'stack' | 'show';
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface TableAction {
|
|
14
|
+
key: string;
|
|
15
|
+
label: React.ReactNode;
|
|
16
|
+
icon?: React.ReactNode;
|
|
17
|
+
variant?: 'primary' | 'secondary' | 'danger';
|
|
18
|
+
disabled?: (item: any) => boolean;
|
|
19
|
+
loading?: (item: any) => boolean;
|
|
20
|
+
onClick: (item: any) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface DataTableProps {
|
|
23
|
+
data: any[];
|
|
24
|
+
columns: TableColumn[];
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
searchTerm?: string;
|
|
27
|
+
actions?: TableAction[];
|
|
28
|
+
variant?: 'default' | 'compact' | 'audit';
|
|
29
|
+
responsive?: 'stack' | 'scroll' | 'hide-columns';
|
|
30
|
+
onSort?: (column: string, direction: 'asc' | 'desc') => void;
|
|
31
|
+
emptyMessage?: string;
|
|
32
|
+
loadingMessage?: string;
|
|
33
|
+
className?: string;
|
|
34
|
+
style?: React.CSSProperties;
|
|
35
|
+
maxHeight?: string;
|
|
36
|
+
showSearchCount?: boolean;
|
|
37
|
+
rowHover?: boolean;
|
|
38
|
+
striped?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface TableRowProps {
|
|
41
|
+
item: any;
|
|
42
|
+
index: number;
|
|
43
|
+
columns: TableColumn[];
|
|
44
|
+
actions?: TableAction[];
|
|
45
|
+
gridTemplate: string;
|
|
46
|
+
isLast: boolean;
|
|
47
|
+
variant: 'default' | 'compact' | 'audit';
|
|
48
|
+
onActionClick: (action: TableAction, item: any) => void;
|
|
49
|
+
}
|
|
50
|
+
export interface TableHeaderProps {
|
|
51
|
+
columns: TableColumn[];
|
|
52
|
+
gridTemplate: string;
|
|
53
|
+
onSort?: (column: string) => void;
|
|
54
|
+
sortColumn?: string;
|
|
55
|
+
sortDirection?: 'asc' | 'desc';
|
|
56
|
+
hasActions?: boolean;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DataTable/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IACnE,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;QACnC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;KACpC,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC7C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;IACjC,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,cAAc,CAAC;IACjD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,aAAa,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CACzD;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DetailModalProps {
|
|
3
|
+
/** Modal open state */
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Close handler */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** Modal title */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Header icon (left side, contextual to content) */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** Optional subtitle/description */
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
/** Content (InfoBox, tables, data displays) */
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
/** Close button text */
|
|
16
|
+
closeText?: string;
|
|
17
|
+
/** Optional action button */
|
|
18
|
+
action?: {
|
|
19
|
+
label: string;
|
|
20
|
+
onClick: () => void;
|
|
21
|
+
variant?: 'primary' | 'secondary' | 'ghost';
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
};
|
|
24
|
+
/** Modal size */
|
|
25
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
26
|
+
/** Additional className */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* DetailModal - Normalized template for read-only detail modals
|
|
31
|
+
*
|
|
32
|
+
* Pattern extracted from GeographyDetailsModal, AuditLogDetailModal (backoffice)
|
|
33
|
+
* Provides consistent structure for viewing entity details
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <DetailModal
|
|
37
|
+
* open={showDetails}
|
|
38
|
+
* onClose={() => setShowDetails(false)}
|
|
39
|
+
* title="User Details"
|
|
40
|
+
* subtitle="Created on Jan 1, 2024"
|
|
41
|
+
* action={{
|
|
42
|
+
* label: 'Edit',
|
|
43
|
+
* onClick: handleEdit,
|
|
44
|
+
* variant: 'primary'
|
|
45
|
+
* }}
|
|
46
|
+
* >
|
|
47
|
+
* <InfoBox title="Basic Information">
|
|
48
|
+
* <InfoRow label="Name" value={user.name} />
|
|
49
|
+
* <InfoRow label="Email" value={user.email} />
|
|
50
|
+
* </InfoBox>
|
|
51
|
+
* </DetailModal>
|
|
52
|
+
*/
|
|
53
|
+
export declare function DetailModal({ open, onClose, title, icon, subtitle, children, closeText, action, size, className }: DetailModalProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export default DetailModal;
|
|
55
|
+
//# sourceMappingURL=DetailModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DetailModal/DetailModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,oBAAoB;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;QAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,iBAAiB;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,OAAO,EACP,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAmB,EACnB,MAAM,EACN,IAAW,EACX,SAAc,EACf,EAAE,gBAAgB,2CAoHlB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/DetailModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FormFieldProps {
|
|
3
|
+
/** Label text */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Whether the field is required */
|
|
6
|
+
required?: boolean;
|
|
7
|
+
/** Error message to display */
|
|
8
|
+
error?: string;
|
|
9
|
+
/** Helper text below the input */
|
|
10
|
+
helper?: string;
|
|
11
|
+
/** Whether the field is disabled */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Children (input element) */
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
/** Additional className */
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* FormField - Normalized wrapper for form inputs
|
|
20
|
+
*
|
|
21
|
+
* Pattern extracted from AdminUserModal.tsx (backoffice/users)
|
|
22
|
+
* Provides consistent label, error, and helper text styling
|
|
23
|
+
*/
|
|
24
|
+
export declare function FormField({ label, required, error, helper, disabled, children, className }: FormFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default FormField;
|
|
26
|
+
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/FormField/FormField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,cAAc;IAC7B,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAgB,EAChB,KAAK,EACL,MAAM,EACN,QAAgB,EAChB,QAAQ,EACR,SAAc,EACf,EAAE,cAAc,2CA+ChB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/FormField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FormGridProps {
|
|
3
|
+
/** Number of columns (1 or 2) */
|
|
4
|
+
columns?: 1 | 2;
|
|
5
|
+
/** Gap between fields */
|
|
6
|
+
gap?: 'sm' | 'md' | 'lg';
|
|
7
|
+
/** Children (FormField components) */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/** Additional className */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* FormGrid - Normalized grid layout for form fields
|
|
14
|
+
*
|
|
15
|
+
* Pattern extracted from AdminUserModal.tsx (backoffice/users)
|
|
16
|
+
* Provides consistent 1 or 2 column layouts with proper gap
|
|
17
|
+
*/
|
|
18
|
+
export declare function FormGrid({ columns, gap, children, className }: FormGridProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default FormGrid;
|
|
20
|
+
//# sourceMappingURL=FormGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormGrid.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/FormGrid/FormGrid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB,yBAAyB;IACzB,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB,sCAAsC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAW,EACX,GAAU,EACV,QAAQ,EACR,SAAc,EACf,EAAE,aAAa,2CAaf;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/FormGrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FormModalProps {
|
|
3
|
+
/** Modal open state */
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Close handler */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** Form submit handler */
|
|
8
|
+
onSubmit: (e: React.FormEvent) => void;
|
|
9
|
+
/** Modal title */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Header icon (left side, contextual to action) */
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
/** Optional subtitle/description */
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
/** Info box content (shown above form) */
|
|
16
|
+
info?: React.ReactNode;
|
|
17
|
+
/** Info box variant */
|
|
18
|
+
infoVariant?: 'info' | 'warning' | 'success' | 'danger';
|
|
19
|
+
/** Form content (FormField, FormGrid, FormSection) */
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
/** Submit button text */
|
|
22
|
+
submitText?: string;
|
|
23
|
+
/** Cancel button text */
|
|
24
|
+
cancelText?: string;
|
|
25
|
+
/** Loading state */
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
/** Disable submit button */
|
|
28
|
+
submitDisabled?: boolean;
|
|
29
|
+
/** Modal size */
|
|
30
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
31
|
+
/** Additional className */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* FormModal - Normalized template for CRUD modal forms
|
|
36
|
+
*
|
|
37
|
+
* Pattern extracted from AdminUserModal.tsx (backoffice/users)
|
|
38
|
+
* Provides consistent structure for create/edit entity modals
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <FormModal
|
|
42
|
+
* open={showModal}
|
|
43
|
+
* onClose={() => setShowModal(false)}
|
|
44
|
+
* onSubmit={handleSubmit}
|
|
45
|
+
* title="Edit User"
|
|
46
|
+
* info="Changes will be saved immediately."
|
|
47
|
+
* infoVariant="info"
|
|
48
|
+
* loading={isSaving}
|
|
49
|
+
* submitText="Save"
|
|
50
|
+
* >
|
|
51
|
+
* <FormField label="Name" required error={errors.name}>
|
|
52
|
+
* <input className="mds-input" value={name} onChange={...} />
|
|
53
|
+
* </FormField>
|
|
54
|
+
* </FormModal>
|
|
55
|
+
*/
|
|
56
|
+
export declare function FormModal({ open, onClose, onSubmit, title, icon, subtitle, info, infoVariant, children, submitText, cancelText, loading, submitDisabled, size, className }: FormModalProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export default FormModal;
|
|
58
|
+
//# sourceMappingURL=FormModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/FormModal/FormModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,cAAc;IAC7B,uBAAuB;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,oBAAoB;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0BAA0B;IAC1B,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IACvC,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxD,sDAAsD;IACtD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,WAAoB,EACpB,QAAQ,EACR,UAAmB,EACnB,UAAqB,EACrB,OAAe,EACf,cAAsB,EACtB,IAAW,EACX,SAAc,EACf,EAAE,cAAc,2CA0IhB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/FormModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FormSectionProps {
|
|
3
|
+
/** Section title */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Section description */
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Children (FormField or FormGrid components) */
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/** Additional className */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* FormSection - Normalized section wrapper for grouping form fields
|
|
14
|
+
*
|
|
15
|
+
* Pattern extracted from AdminUserModal.tsx (backoffice/users)
|
|
16
|
+
* Provides consistent section headers and spacing
|
|
17
|
+
*/
|
|
18
|
+
export declare function FormSection({ title, description, children, className }: FormSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default FormSection;
|
|
20
|
+
//# sourceMappingURL=FormSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/FormSection/FormSection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAc,EACf,EAAE,gBAAgB,2CAsClB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/react/FormSection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|