@metropolle/design-system 1.2026.0-1.1.1728 → 1.2026.0-1.3.119

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 (42) hide show
  1. package/dist/react/components/react/DataTable/DataTable.d.ts.map +1 -1
  2. package/dist/react/components/react/DataTable/TableHeader.d.ts.map +1 -1
  3. package/dist/react/components/react/DataTable/TableRow.d.ts.map +1 -1
  4. package/dist/react/components/react/DataTable/types.d.ts +1 -0
  5. package/dist/react/components/react/DataTable/types.d.ts.map +1 -1
  6. package/dist/react/components/react/DetailModal/DetailModal.d.ts +55 -0
  7. package/dist/react/components/react/DetailModal/DetailModal.d.ts.map +1 -0
  8. package/dist/react/components/react/DetailModal/index.d.ts +3 -0
  9. package/dist/react/components/react/DetailModal/index.d.ts.map +1 -0
  10. package/dist/react/components/react/FormField/FormField.d.ts +26 -0
  11. package/dist/react/components/react/FormField/FormField.d.ts.map +1 -0
  12. package/dist/react/components/react/FormField/index.d.ts +3 -0
  13. package/dist/react/components/react/FormField/index.d.ts.map +1 -0
  14. package/dist/react/components/react/FormGrid/FormGrid.d.ts +20 -0
  15. package/dist/react/components/react/FormGrid/FormGrid.d.ts.map +1 -0
  16. package/dist/react/components/react/FormGrid/index.d.ts +3 -0
  17. package/dist/react/components/react/FormGrid/index.d.ts.map +1 -0
  18. package/dist/react/components/react/FormModal/FormModal.d.ts +58 -0
  19. package/dist/react/components/react/FormModal/FormModal.d.ts.map +1 -0
  20. package/dist/react/components/react/FormModal/index.d.ts +3 -0
  21. package/dist/react/components/react/FormModal/index.d.ts.map +1 -0
  22. package/dist/react/components/react/FormSection/FormSection.d.ts +20 -0
  23. package/dist/react/components/react/FormSection/FormSection.d.ts.map +1 -0
  24. package/dist/react/components/react/FormSection/index.d.ts +3 -0
  25. package/dist/react/components/react/FormSection/index.d.ts.map +1 -0
  26. package/dist/react/components/react/GlassCard/GlassCard.d.ts +10 -0
  27. package/dist/react/components/react/GlassCard/GlassCard.d.ts.map +1 -1
  28. package/dist/react/components/react/GlassCard/index.d.ts +1 -1
  29. package/dist/react/components/react/GlassCard/index.d.ts.map +1 -1
  30. package/dist/react/components/react/InfoBox/InfoBox.d.ts +46 -0
  31. package/dist/react/components/react/InfoBox/InfoBox.d.ts.map +1 -0
  32. package/dist/react/components/react/InfoBox/index.d.ts +3 -0
  33. package/dist/react/components/react/InfoBox/index.d.ts.map +1 -0
  34. package/dist/react/components/react/Modal/ModalHeader.d.ts.map +1 -1
  35. package/dist/react/components/react/index.d.ts +12 -0
  36. package/dist/react/components/react/index.d.ts.map +1 -1
  37. package/dist/react/index.d.ts +12 -0
  38. package/dist/react/index.esm.js +358 -38
  39. package/dist/react/index.esm.js.map +1 -1
  40. package/dist/react/index.js +364 -37
  41. package/dist/react/index.js.map +1 -1
  42. package/package.json +1 -1
@@ -1385,14 +1385,26 @@ function cn(...classes) {
1385
1385
  * </GlassCard>
1386
1386
  * ```
1387
1387
  */
1388
- const GlassCard = forwardRef(({ glassStyle = 'liquid', intensity = 'md', theme, variant = 'light', blur, opacity, children, className, enableHover = true, style, ...props }, ref) => {
1388
+ const GlassCard = forwardRef(({ glassStyle = 'liquid', intensity = 'md', theme, variant = 'light', blur, opacity, children, className, enableHover = true, cardVariant = 'default', style, ...props }, ref) => {
1389
1389
  // Resolve theme from new prop or deprecated variant
1390
1390
  const resolvedTheme = theme ?? variant;
1391
1391
  // =====================
1392
1392
  // LIQUID GLASS MODE
1393
1393
  // =====================
1394
1394
  if (glassStyle === 'liquid') {
1395
- return (jsxRuntimeExports.jsx("div", { ref: ref, className: cn('mds-liquid-glass', `mds-liquid-glass--${intensity}`, !enableHover && 'mds-liquid-glass--no-hover', className), style: style, ...props, children: children }));
1395
+ // PROC-007: Card variant styles
1396
+ const variantStyles = {
1397
+ default: {},
1398
+ highlight: {
1399
+ borderLeft: '4px solid var(--mds-color-brand-primary, #0055FF)',
1400
+ boxShadow: '0 4px 20px rgba(0, 85, 255, 0.15)'
1401
+ },
1402
+ subtle: {
1403
+ background: 'rgba(255, 255, 255, 0.02)',
1404
+ border: '1px solid rgba(255, 255, 255, 0.05)'
1405
+ }
1406
+ };
1407
+ return (jsxRuntimeExports.jsx("div", { ref: ref, className: cn('mds-liquid-glass', `mds-liquid-glass--${intensity}`, `mds-liquid-glass--${cardVariant}`, !enableHover && 'mds-liquid-glass--no-hover', className), style: { ...variantStyles[cardVariant], ...style }, ...props, children: children }));
1396
1408
  }
1397
1409
  // =====================
1398
1410
  // GLASS MODE (legacy)
@@ -1827,36 +1839,43 @@ function ThemeToggle({ size = 'md', className = '', disabled = false, onChange,
1827
1839
  return (jsxRuntimeExports.jsx("button", { onClick: toggleTheme, className: buttonClasses, disabled: disabled, type: "button", "aria-pressed": isDark, "aria-label": `Switch to ${isDark ? 'light' : 'dark'} mode`, title: `Switch to ${isDark ? 'light' : 'dark'} mode`, "data-theme": isDark ? 'dark' : 'light', style: buttonStyle }));
1828
1840
  }
1829
1841
 
1830
- const TableHeader = ({ columns, gridTemplate, onSort, sortColumn, sortDirection }) => {
1831
- return (jsxRuntimeExports.jsx("div", { role: "rowgroup", style: {
1842
+ const TableHeader = ({ columns, gridTemplate, onSort, sortColumn, sortDirection, hasActions = false }) => {
1843
+ return (jsxRuntimeExports.jsxs("div", { role: "rowgroup", style: {
1832
1844
  display: 'grid',
1833
1845
  gridTemplateColumns: gridTemplate,
1834
1846
  gap: '16px',
1835
1847
  padding: '16px 20px',
1836
1848
  borderBottom: '1px solid var(--border-color)',
1837
1849
  backgroundColor: 'rgba(255, 255, 255, 0.05)'
1838
- }, children: columns.map((column) => (jsxRuntimeExports.jsxs("div", { role: "columnheader", style: {
1839
- color: 'var(--text-primary)',
1840
- fontWeight: '500',
1841
- fontSize: '14px',
1842
- display: 'flex',
1843
- alignItems: 'center',
1844
- justifyContent: column.align === 'center' ? 'center' :
1845
- column.align === 'right' ? 'flex-end' : 'flex-start',
1846
- cursor: column.sortable && onSort ? 'pointer' : 'default',
1847
- gap: '4px',
1848
- transition: 'color 0.2s ease'
1849
- }, onClick: () => column.sortable && onSort && onSort(column.key), onMouseEnter: (e) => {
1850
- if (column.sortable && onSort) {
1851
- e.currentTarget.style.color = '#ffffff';
1852
- }
1853
- }, onMouseLeave: (e) => {
1854
- e.currentTarget.style.color = 'var(--text-primary)';
1855
- }, children: [column.label, column.sortable && onSort && (jsxRuntimeExports.jsx("span", { style: {
1856
- fontSize: '12px',
1857
- opacity: sortColumn === column.key ? 1 : 0.5
1858
- }, children: sortColumn === column.key ?
1859
- (sortDirection === 'asc' ? '↑' : '↓') : '↕' }))] }, column.key))) }));
1850
+ }, children: [columns.map((column) => (jsxRuntimeExports.jsxs("div", { role: "columnheader", style: {
1851
+ color: 'var(--text-primary)',
1852
+ fontWeight: '500',
1853
+ fontSize: '14px',
1854
+ display: 'flex',
1855
+ alignItems: 'center',
1856
+ justifyContent: column.align === 'center' ? 'center' :
1857
+ column.align === 'right' ? 'flex-end' : 'flex-start',
1858
+ cursor: column.sortable && onSort ? 'pointer' : 'default',
1859
+ gap: '4px',
1860
+ transition: 'color 0.2s ease'
1861
+ }, onClick: () => column.sortable && onSort && onSort(column.key), onMouseEnter: (e) => {
1862
+ if (column.sortable && onSort) {
1863
+ e.currentTarget.style.color = '#ffffff';
1864
+ }
1865
+ }, onMouseLeave: (e) => {
1866
+ e.currentTarget.style.color = 'var(--text-primary)';
1867
+ }, children: [column.label, column.sortable && onSort && (jsxRuntimeExports.jsx("span", { style: {
1868
+ fontSize: '12px',
1869
+ opacity: sortColumn === column.key ? 1 : 0.5
1870
+ }, children: sortColumn === column.key ?
1871
+ (sortDirection === 'asc' ? '↑' : '↓') : '↕' }))] }, column.key))), hasActions && (jsxRuntimeExports.jsx("div", { role: "columnheader", style: {
1872
+ color: 'var(--text-primary)',
1873
+ fontWeight: '500',
1874
+ fontSize: '14px',
1875
+ display: 'flex',
1876
+ alignItems: 'center',
1877
+ justifyContent: 'center'
1878
+ }, children: "Actions" }))] }));
1860
1879
  };
1861
1880
 
1862
1881
  const TableRow = ({ item, index, columns, actions = [], gridTemplate, isLast, variant, onActionClick }) => {
@@ -1894,10 +1913,9 @@ const TableRow = ({ item, index, columns, actions = [], gridTemplate, isLast, va
1894
1913
  const isLoading = action.loading?.(item) || false;
1895
1914
  return (jsxRuntimeExports.jsxs("button", { onClick: () => !isDisabled && !isLoading && onActionClick(action, item), disabled: isDisabled || isLoading, style: {
1896
1915
  background: 'none',
1897
- border: action.variant === 'danger' ? '1px solid rgba(239, 68, 68, 0.3)' :
1898
- '1px solid var(--border-color)',
1916
+ border: 'none',
1899
1917
  borderRadius: '6px',
1900
- padding: '6px 12px',
1918
+ padding: '6px 8px',
1901
1919
  color: action.variant === 'danger' ? '#f87171' : 'var(--text-primary)',
1902
1920
  fontSize: '12px',
1903
1921
  cursor: isDisabled || isLoading ? 'not-allowed' : 'pointer',
@@ -1911,18 +1929,14 @@ const TableRow = ({ item, index, columns, actions = [], gridTemplate, isLast, va
1911
1929
  if (!isDisabled && !isLoading) {
1912
1930
  if (action.variant === 'danger') {
1913
1931
  e.currentTarget.style.backgroundColor = 'rgba(239, 68, 68, 0.1)';
1914
- e.currentTarget.style.borderColor = 'rgba(239, 68, 68, 0.5)';
1915
1932
  }
1916
1933
  else {
1917
1934
  e.currentTarget.style.backgroundColor = 'rgba(255, 255, 255, 0.1)';
1918
- e.currentTarget.style.borderColor = 'var(--text-primary)';
1919
1935
  }
1920
1936
  }
1921
1937
  }, onMouseLeave: (e) => {
1922
1938
  if (!isDisabled && !isLoading) {
1923
1939
  e.currentTarget.style.backgroundColor = 'transparent';
1924
- e.currentTarget.style.borderColor = action.variant === 'danger' ?
1925
- 'rgba(239, 68, 68, 0.3)' : 'var(--border-color)';
1926
1940
  }
1927
1941
  }, children: [action.icon && action.icon, action.label] }, action.key));
1928
1942
  }) }))] }));
@@ -2022,7 +2036,7 @@ const DataTable = ({ data, columns, loading = false, searchTerm = '', actions =
2022
2036
  color: 'var(--text-secondary)',
2023
2037
  fontSize: '14px',
2024
2038
  borderBottom: '1px solid var(--border-color)'
2025
- }, children: ["Mostrando", ' ', jsxRuntimeExports.jsx("span", { style: { fontWeight: '500', color: 'var(--text-primary)' }, children: filteredData.length }), ' ', "de", ' ', jsxRuntimeExports.jsx("span", { style: { fontWeight: '500', color: 'var(--text-primary)' }, children: data.length }), ' ', "itens"] })), jsxRuntimeExports.jsx(TableHeader, { columns: columns, gridTemplate: gridTemplate, onSort: onSort ? handleSort : undefined, sortColumn: sortColumn, sortDirection: sortDirection }), jsxRuntimeExports.jsx("div", { role: "rowgroup", style: {
2039
+ }, children: ["Mostrando", ' ', jsxRuntimeExports.jsx("span", { style: { fontWeight: '500', color: 'var(--text-primary)' }, children: filteredData.length }), ' ', "de", ' ', jsxRuntimeExports.jsx("span", { style: { fontWeight: '500', color: 'var(--text-primary)' }, children: data.length }), ' ', "itens"] })), jsxRuntimeExports.jsx(TableHeader, { columns: columns, gridTemplate: gridTemplate, onSort: onSort ? handleSort : undefined, sortColumn: sortColumn, sortDirection: sortDirection, hasActions: actions.length > 0 }), jsxRuntimeExports.jsx("div", { role: "rowgroup", style: {
2026
2040
  maxHeight,
2027
2041
  overflowY: 'auto'
2028
2042
  }, children: filteredData.map((item, index) => (jsxRuntimeExports.jsx(TableRow, { item: item, index: index, columns: columns, actions: actions, gridTemplate: gridTemplate, isLast: index === filteredData.length - 1, variant: variant, onActionClick: handleActionClick }, item.id || index))) })] }));
@@ -2430,6 +2444,157 @@ const getTableConfig = (type) => {
2430
2444
  }
2431
2445
  };
2432
2446
 
2447
+ /**
2448
+ * FormField - Normalized wrapper for form inputs
2449
+ *
2450
+ * Pattern extracted from AdminUserModal.tsx (backoffice/users)
2451
+ * Provides consistent label, error, and helper text styling
2452
+ */
2453
+ function FormField({ label, required = false, error, helper, disabled = false, children, className = '' }) {
2454
+ return (jsxRuntimeExports.jsxs("div", { className: `mds-form-field ${className}`, style: { opacity: disabled ? 0.6 : 1 }, children: [jsxRuntimeExports.jsxs("label", { style: {
2455
+ display: 'block',
2456
+ marginBottom: '6px',
2457
+ color: 'var(--mds-color-text-primary, var(--text-primary))',
2458
+ fontSize: '0.9rem',
2459
+ fontWeight: 500
2460
+ }, children: [label, required && (jsxRuntimeExports.jsx("span", { style: { color: 'var(--mds-color-error, #ef4444)', marginLeft: '4px' }, children: "*" }))] }), children, error && (jsxRuntimeExports.jsx("span", { style: {
2461
+ color: 'var(--mds-color-error, #ef4444)',
2462
+ fontSize: '0.8rem',
2463
+ marginTop: '4px',
2464
+ display: 'block'
2465
+ }, children: error })), helper && !error && (jsxRuntimeExports.jsx("span", { style: {
2466
+ color: 'var(--mds-color-text-secondary, var(--text-secondary))',
2467
+ fontSize: '0.75rem',
2468
+ marginTop: '4px',
2469
+ display: 'block'
2470
+ }, children: helper }))] }));
2471
+ }
2472
+
2473
+ const gapValues = {
2474
+ sm: '12px',
2475
+ md: '16px',
2476
+ lg: '24px'
2477
+ };
2478
+ /**
2479
+ * FormGrid - Normalized grid layout for form fields
2480
+ *
2481
+ * Pattern extracted from AdminUserModal.tsx (backoffice/users)
2482
+ * Provides consistent 1 or 2 column layouts with proper gap
2483
+ */
2484
+ function FormGrid({ columns = 1, gap = 'md', children, className = '' }) {
2485
+ return (jsxRuntimeExports.jsx("div", { className: `mds-form-grid ${className}`, style: {
2486
+ display: 'grid',
2487
+ gridTemplateColumns: columns === 2 ? 'repeat(2, 1fr)' : '1fr',
2488
+ gap: gapValues[gap]
2489
+ }, children: children }));
2490
+ }
2491
+
2492
+ /**
2493
+ * FormSection - Normalized section wrapper for grouping form fields
2494
+ *
2495
+ * Pattern extracted from AdminUserModal.tsx (backoffice/users)
2496
+ * Provides consistent section headers and spacing
2497
+ */
2498
+ function FormSection({ title, description, children, className = '' }) {
2499
+ return (jsxRuntimeExports.jsxs("div", { className: `mds-form-section ${className}`, style: {
2500
+ marginBottom: '24px'
2501
+ }, children: [title && (jsxRuntimeExports.jsx("h4", { style: {
2502
+ margin: '0 0 8px 0',
2503
+ color: 'var(--mds-color-text-primary, var(--text-primary))',
2504
+ fontSize: '1rem',
2505
+ fontWeight: 600,
2506
+ letterSpacing: '-0.02em'
2507
+ }, children: title })), description && (jsxRuntimeExports.jsx("p", { style: {
2508
+ margin: '0 0 16px 0',
2509
+ color: 'var(--mds-color-text-secondary, var(--text-secondary))',
2510
+ fontSize: '0.85rem',
2511
+ lineHeight: 1.5
2512
+ }, children: description })), jsxRuntimeExports.jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: children })] }));
2513
+ }
2514
+
2515
+ const variantColors = {
2516
+ default: {
2517
+ bg: 'rgba(255, 255, 255, 0.03)',
2518
+ border: 'rgba(255, 255, 255, 0.1)',
2519
+ accent: 'var(--mds-color-text-secondary, #888)'
2520
+ },
2521
+ info: {
2522
+ bg: 'rgba(59, 130, 246, 0.1)',
2523
+ border: 'rgba(59, 130, 246, 0.2)',
2524
+ accent: 'var(--mds-color-info, #3b82f6)'
2525
+ },
2526
+ success: {
2527
+ bg: 'rgba(16, 185, 129, 0.1)',
2528
+ border: 'rgba(16, 185, 129, 0.2)',
2529
+ accent: 'var(--mds-color-success, #10b981)'
2530
+ },
2531
+ warning: {
2532
+ bg: 'rgba(245, 158, 11, 0.1)',
2533
+ border: 'rgba(245, 158, 11, 0.2)',
2534
+ accent: 'var(--mds-color-warning, #f59e0b)'
2535
+ },
2536
+ danger: {
2537
+ bg: 'rgba(239, 68, 68, 0.1)',
2538
+ border: 'rgba(239, 68, 68, 0.2)',
2539
+ accent: 'var(--mds-color-error, #ef4444)'
2540
+ }
2541
+ };
2542
+ /**
2543
+ * InfoBox - Normalized info/alert box for read-only information
2544
+ *
2545
+ * Pattern extracted from AdminUserModal.tsx (backoffice/users)
2546
+ * Provides consistent info boxes for alerts, status displays, and read-only data
2547
+ *
2548
+ * @example
2549
+ * // Alert style (with accent)
2550
+ * <InfoBox variant="info" accent>
2551
+ * An invitation email will be sent...
2552
+ * </InfoBox>
2553
+ *
2554
+ * @example
2555
+ * // Status display (default)
2556
+ * <InfoBox title="User Information">
2557
+ * <InfoRow label="Status" value="Active" />
2558
+ * <InfoRow label="Created" value="Jan 1, 2024" />
2559
+ * </InfoBox>
2560
+ */
2561
+ function InfoBox({ title, variant = 'default', accent = false, copyable = false, children, className = '' }) {
2562
+ const colors = variantColors[variant];
2563
+ const handleCopy = () => {
2564
+ if (!copyable)
2565
+ return;
2566
+ const text = typeof children === 'string' ? children : '';
2567
+ if (text) {
2568
+ navigator.clipboard.writeText(text);
2569
+ }
2570
+ };
2571
+ return (jsxRuntimeExports.jsxs("div", { className: `mds-info-box ${className}`, style: {
2572
+ padding: '12px 16px',
2573
+ backgroundColor: colors.bg,
2574
+ borderRadius: '8px',
2575
+ border: `1px solid ${colors.border}`,
2576
+ borderLeft: accent ? `4px solid ${colors.accent}` : `1px solid ${colors.border}`,
2577
+ cursor: copyable ? 'pointer' : 'default'
2578
+ }, onClick: copyable ? handleCopy : undefined, title: copyable ? 'Click to copy' : undefined, children: [title && (jsxRuntimeExports.jsx("div", { style: {
2579
+ color: 'var(--mds-color-text-secondary, var(--text-secondary))',
2580
+ fontSize: '0.85rem',
2581
+ marginBottom: '8px',
2582
+ fontWeight: 500
2583
+ }, children: title })), jsxRuntimeExports.jsx("div", { style: {
2584
+ color: 'var(--mds-color-text-primary, var(--text-primary))',
2585
+ fontSize: '0.9rem',
2586
+ lineHeight: 1.5
2587
+ }, children: children })] }));
2588
+ }
2589
+ function InfoRow({ label, value, valueColor }) {
2590
+ return (jsxRuntimeExports.jsxs("div", { style: {
2591
+ display: 'flex',
2592
+ justifyContent: 'space-between',
2593
+ fontSize: '0.85rem',
2594
+ padding: '2px 0'
2595
+ }, children: [jsxRuntimeExports.jsxs("span", { style: { color: 'var(--mds-color-text-secondary, var(--text-secondary))' }, children: [label, ":"] }), jsxRuntimeExports.jsx("span", { style: { color: valueColor || 'var(--mds-color-text-primary, var(--text-primary))' }, children: value })] }));
2596
+ }
2597
+
2433
2598
  /**
2434
2599
  * Theme-aware styles generator - Liquid Glass pattern
2435
2600
  *
@@ -2464,7 +2629,7 @@ function getStyles(isDark) {
2464
2629
  // Dark theme: subtle glass effect
2465
2630
  background: isDark
2466
2631
  ? 'rgba(255, 255, 255, 0.03)'
2467
- : 'rgba(255, 255, 255, 0.55)',
2632
+ : 'rgba(255, 255, 255, 0.45)',
2468
2633
  // Liquid Glass: Strong blur + saturation
2469
2634
  backdropFilter: 'blur(var(--mds-liquid-blur-xl, 24px)) saturate(var(--mds-liquid-saturate-vibrant, 140%))',
2470
2635
  WebkitBackdropFilter: 'blur(var(--mds-liquid-blur-xl, 24px)) saturate(var(--mds-liquid-saturate-vibrant, 140%))',
@@ -2549,6 +2714,160 @@ function Modal({ open, onClose, closeOnOverlay = true, children, className, styl
2549
2714
  return createPortal(content, document.body);
2550
2715
  }
2551
2716
 
2717
+ const sizeMap$1 = {
2718
+ sm: '400px',
2719
+ md: '480px',
2720
+ lg: '600px',
2721
+ xl: '800px'
2722
+ };
2723
+ /**
2724
+ * FormModal - Normalized template for CRUD modal forms
2725
+ *
2726
+ * Pattern extracted from AdminUserModal.tsx (backoffice/users)
2727
+ * Provides consistent structure for create/edit entity modals
2728
+ *
2729
+ * @example
2730
+ * <FormModal
2731
+ * open={showModal}
2732
+ * onClose={() => setShowModal(false)}
2733
+ * onSubmit={handleSubmit}
2734
+ * title="Edit User"
2735
+ * info="Changes will be saved immediately."
2736
+ * infoVariant="info"
2737
+ * loading={isSaving}
2738
+ * submitText="Save"
2739
+ * >
2740
+ * <FormField label="Name" required error={errors.name}>
2741
+ * <input className="mds-input" value={name} onChange={...} />
2742
+ * </FormField>
2743
+ * </FormModal>
2744
+ */
2745
+ function FormModal({ open, onClose, onSubmit, title, icon, subtitle, info, infoVariant = 'info', children, submitText = 'Save', cancelText = 'Cancel', loading = false, submitDisabled = false, size = 'md', className = '' }) {
2746
+ const handleSubmit = (e) => {
2747
+ e.preventDefault();
2748
+ onSubmit(e);
2749
+ };
2750
+ return (jsxRuntimeExports.jsxs(Modal, { open: open, onClose: onClose, closeOnOverlay: !loading, className: className, style: {
2751
+ maxWidth: sizeMap$1[size],
2752
+ maxHeight: '90vh',
2753
+ overflowY: 'auto',
2754
+ padding: '24px'
2755
+ }, children: [jsxRuntimeExports.jsxs("div", { style: {
2756
+ display: 'flex',
2757
+ alignItems: 'center',
2758
+ justifyContent: 'space-between',
2759
+ marginBottom: subtitle ? '8px' : '24px'
2760
+ }, children: [jsxRuntimeExports.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '12px' }, children: [icon && (jsxRuntimeExports.jsx("div", { style: {
2761
+ display: 'flex',
2762
+ alignItems: 'center',
2763
+ justifyContent: 'center',
2764
+ width: 32,
2765
+ height: 32,
2766
+ fontSize: '1.25rem',
2767
+ lineHeight: 0,
2768
+ opacity: 0.5
2769
+ }, children: icon })), jsxRuntimeExports.jsx(Typography, { variant: "h3", color: "primary", style: { margin: 0 }, children: title })] }), jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, disabled: loading, style: {
2770
+ background: 'none',
2771
+ border: 'none',
2772
+ padding: '8px',
2773
+ cursor: loading ? 'not-allowed' : 'pointer',
2774
+ color: 'var(--mds-color-text-secondary)',
2775
+ opacity: loading ? 0.5 : 1,
2776
+ borderRadius: '6px',
2777
+ display: 'flex',
2778
+ alignItems: 'center',
2779
+ justifyContent: 'center',
2780
+ transition: 'all 0.2s ease'
2781
+ }, onMouseEnter: (e) => {
2782
+ if (!loading)
2783
+ e.currentTarget.style.backgroundColor = 'rgba(255, 255, 255, 0.1)';
2784
+ }, onMouseLeave: (e) => {
2785
+ e.currentTarget.style.backgroundColor = 'transparent';
2786
+ }, "aria-label": "Close modal", children: jsxRuntimeExports.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), jsxRuntimeExports.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) })] }), subtitle && (jsxRuntimeExports.jsx(Typography, { variant: "body", color: "secondary", style: { marginBottom: '24px', fontSize: '0.9rem' }, children: subtitle })), info && (jsxRuntimeExports.jsx("div", { style: { marginBottom: '20px' }, children: jsxRuntimeExports.jsx(InfoBox, { variant: infoVariant, accent: true, children: info }) })), jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: [children, jsxRuntimeExports.jsxs("div", { style: {
2787
+ display: 'flex',
2788
+ gap: '12px',
2789
+ justifyContent: 'flex-end',
2790
+ marginTop: '16px',
2791
+ paddingTop: '16px',
2792
+ borderTop: '1px solid rgba(255, 255, 255, 0.1)'
2793
+ }, children: [jsxRuntimeExports.jsx(Button, { variant: "secondary", size: "sm", type: "button", onClick: onClose, disabled: loading, children: cancelText }), jsxRuntimeExports.jsx(Button, { variant: "primary", size: "sm", type: "submit", disabled: loading || submitDisabled, children: loading ? 'Saving...' : submitText })] })] })] }));
2794
+ }
2795
+
2796
+ const sizeMap = {
2797
+ sm: '400px',
2798
+ md: '480px',
2799
+ lg: '600px',
2800
+ xl: '800px'
2801
+ };
2802
+ /**
2803
+ * DetailModal - Normalized template for read-only detail modals
2804
+ *
2805
+ * Pattern extracted from GeographyDetailsModal, AuditLogDetailModal (backoffice)
2806
+ * Provides consistent structure for viewing entity details
2807
+ *
2808
+ * @example
2809
+ * <DetailModal
2810
+ * open={showDetails}
2811
+ * onClose={() => setShowDetails(false)}
2812
+ * title="User Details"
2813
+ * subtitle="Created on Jan 1, 2024"
2814
+ * action={{
2815
+ * label: 'Edit',
2816
+ * onClick: handleEdit,
2817
+ * variant: 'primary'
2818
+ * }}
2819
+ * >
2820
+ * <InfoBox title="Basic Information">
2821
+ * <InfoRow label="Name" value={user.name} />
2822
+ * <InfoRow label="Email" value={user.email} />
2823
+ * </InfoBox>
2824
+ * </DetailModal>
2825
+ */
2826
+ function DetailModal({ open, onClose, title, icon, subtitle, children, closeText = 'Close', action, size = 'md', className = '' }) {
2827
+ return (jsxRuntimeExports.jsxs(Modal, { open: open, onClose: onClose, closeOnOverlay: true, className: className, style: {
2828
+ maxWidth: sizeMap[size],
2829
+ maxHeight: '90vh',
2830
+ overflowY: 'auto',
2831
+ padding: '24px'
2832
+ }, children: [jsxRuntimeExports.jsxs("div", { style: {
2833
+ display: 'flex',
2834
+ alignItems: 'center',
2835
+ justifyContent: 'space-between',
2836
+ marginBottom: subtitle ? '8px' : '24px'
2837
+ }, children: [jsxRuntimeExports.jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '12px' }, children: [icon && (jsxRuntimeExports.jsx("div", { style: {
2838
+ display: 'flex',
2839
+ alignItems: 'center',
2840
+ justifyContent: 'center',
2841
+ width: 32,
2842
+ height: 32,
2843
+ fontSize: '1.25rem',
2844
+ lineHeight: 0,
2845
+ opacity: 0.5
2846
+ }, children: icon })), jsxRuntimeExports.jsx(Typography, { variant: "h3", color: "primary", style: { margin: 0 }, children: title })] }), jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, style: {
2847
+ background: 'none',
2848
+ border: 'none',
2849
+ padding: '8px',
2850
+ cursor: 'pointer',
2851
+ color: 'var(--mds-color-text-secondary)',
2852
+ borderRadius: '6px',
2853
+ display: 'flex',
2854
+ alignItems: 'center',
2855
+ justifyContent: 'center',
2856
+ transition: 'all 0.2s ease'
2857
+ }, onMouseEnter: (e) => {
2858
+ e.currentTarget.style.backgroundColor = 'rgba(255, 255, 255, 0.1)';
2859
+ }, onMouseLeave: (e) => {
2860
+ e.currentTarget.style.backgroundColor = 'transparent';
2861
+ }, "aria-label": "Close modal", children: jsxRuntimeExports.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), jsxRuntimeExports.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) })] }), subtitle && (jsxRuntimeExports.jsx(Typography, { variant: "body", color: "secondary", style: { marginBottom: '24px', fontSize: '0.9rem' }, children: subtitle })), jsxRuntimeExports.jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: children }), jsxRuntimeExports.jsxs("div", { style: {
2862
+ display: 'flex',
2863
+ gap: '12px',
2864
+ justifyContent: 'flex-end',
2865
+ marginTop: '24px',
2866
+ paddingTop: '16px',
2867
+ borderTop: '1px solid rgba(255, 255, 255, 0.1)'
2868
+ }, children: [jsxRuntimeExports.jsx(Button, { variant: "secondary", size: "sm", onClick: onClose, children: closeText }), action && (jsxRuntimeExports.jsx(Button, { variant: action.variant || 'primary', size: "sm", onClick: action.onClick, disabled: action.disabled, children: action.label }))] })] }));
2869
+ }
2870
+
2552
2871
  function ModalHeader({ title, icon, onClose, closeAriaLabel = 'Fechar', align = 'center' }) {
2553
2872
  const CloseIcon = (jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true, children: jsxRuntimeExports.jsx("path", { d: "M18.3 5.71a1 1 0 00-1.41 0L12 10.59 7.11 5.7A1 1 0 105.7 7.11L10.59 12l-4.9 4.89a1 1 0 101.42 1.42L12 13.41l4.89 4.9a1 1 0 001.42-1.42L13.41 12l4.9-4.89a1 1 0 000-1.4z" }) }));
2554
2873
  if (align === 'center') {
@@ -2563,7 +2882,8 @@ function ModalHeader({ title, icon, onClose, closeAriaLabel = 'Fechar', align =
2563
2882
  alignItems: 'center',
2564
2883
  justifyContent: 'center',
2565
2884
  fontSize: '1.25rem',
2566
- lineHeight: 0
2885
+ lineHeight: 0,
2886
+ opacity: 0.5
2567
2887
  };
2568
2888
  const closeBox = {
2569
2889
  position: 'absolute',
@@ -2595,7 +2915,7 @@ function ModalHeader({ title, icon, onClose, closeAriaLabel = 'Fechar', align =
2595
2915
  padding: '16px 24px',
2596
2916
  marginBottom: 16,
2597
2917
  borderBottom: '1px solid var(--border-color)'
2598
- }, children: [icon && (jsxRuntimeExports.jsx("div", { "aria-hidden": true, style: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 32, height: 32, fontSize: '1.25rem', lineHeight: 0 }, children: icon })), jsxRuntimeExports.jsx("div", { style: { margin: 0, fontSize: '1.125rem', fontWeight: 600, flex: 1 }, children: typeof title === 'string' ? (jsxRuntimeExports.jsx("h3", { style: { margin: 0 }, children: title })) : (title) }), onClose && (jsxRuntimeExports.jsx("button", { type: "button", "aria-label": closeAriaLabel, onClick: onClose, style: { marginLeft: 'auto', background: 'transparent', border: 'none', width: 32, height: 32, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer', lineHeight: 0 }, children: CloseIcon }))] }));
2918
+ }, children: [icon && (jsxRuntimeExports.jsx("div", { "aria-hidden": true, style: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', width: 32, height: 32, fontSize: '1.25rem', lineHeight: 0, opacity: 0.5 }, children: icon })), jsxRuntimeExports.jsx("div", { style: { margin: 0, fontSize: '1.125rem', fontWeight: 600, flex: 1 }, children: typeof title === 'string' ? (jsxRuntimeExports.jsx("h3", { style: { margin: 0 }, children: title })) : (title) }), onClose && (jsxRuntimeExports.jsx("button", { type: "button", "aria-label": closeAriaLabel, onClick: onClose, style: { marginLeft: 'auto', background: 'transparent', border: 'none', width: 32, height: 32, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer', lineHeight: 0 }, children: CloseIcon }))] }));
2599
2919
  }
2600
2920
 
2601
2921
  function ModalBody({ children, style, className }) {
@@ -2621,5 +2941,5 @@ function ConfirmDialog({ open, onClose, title, description, confirmText = 'Confi
2621
2941
  return (jsxRuntimeExports.jsx(Modal, { open: open, onClose: onClose, closeOnOverlay: !disableOverlayClose, children: jsxRuntimeExports.jsxs("div", { className: "mds-modal-card", style: { maxWidth: 480, width: '100%' }, children: [jsxRuntimeExports.jsx(ModalHeader, { title: title, icon: icon ?? toneIcon[tone], onClose: onClose, align: "center" }), description && (jsxRuntimeExports.jsx("div", { style: { padding: '0 24px 16px 24px' }, children: description })), jsxRuntimeExports.jsxs("div", { style: { display: 'flex', gap: 12, justifyContent: 'flex-end', borderTop: '1px solid var(--border-color)', padding: '16px 24px', marginTop: 8 }, children: [jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, className: "mds-button mds-button--secondary", children: cancelText }), jsxRuntimeExports.jsx("button", { type: "button", onClick: onConfirm, disabled: loading, className: "mds-button mds-button--primary", children: loading ? 'Processando...' : confirmText })] })] }) }));
2622
2942
  }
2623
2943
 
2624
- export { ActionIcons, BrandLogo, Button, CellRenderers, ConfirmDialog, DataTable, GlassCard, Modal, ModalBody, ModalFooter, ModalHeader, Select, TableHeader, TableRow, ThemeToggle, Typography, auditLogTableConfig, citiesTableConfig, cn, countriesTableConfig, getTableConfig, parametersTableConfig, regionsTableConfig, statesTableConfig };
2944
+ export { ActionIcons, BrandLogo, Button, CellRenderers, ConfirmDialog, DataTable, DetailModal, FormField, FormGrid, FormModal, FormSection, GlassCard, InfoBox, InfoRow, Modal, ModalBody, ModalFooter, ModalHeader, Select, TableHeader, TableRow, ThemeToggle, Typography, auditLogTableConfig, citiesTableConfig, cn, countriesTableConfig, getTableConfig, parametersTableConfig, regionsTableConfig, statesTableConfig };
2625
2945
  //# sourceMappingURL=index.esm.js.map