carconnect-gatherleads-ui-lib 3.7.0-GL-1700-Modulo-Rendimiento-ROI.1 → 3.7.0-GL-1700-Modulo-Rendimiento-ROI.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.
@@ -673,22 +673,52 @@ export declare const GATHER_CONVERSION_CHIP_DEFAULT_NULL_LABEL = "N/A";
673
673
  export declare const GATHER_CONVERSION_CHIP_DEFAULT_THRESHOLDS: GatherConversionChipThresholds;
674
674
 
675
675
  /**
676
- * `GatherBadge` — A label/badge component with color variants.
676
+ * GatherBadge — A label/badge component with color variants and full external customization
677
677
  *
678
- * Available variants: system, package, custom, identity, catalog, active, default.
678
+ * Supports predefined semantic intents (success, warning, danger, info) and a fully
679
+ * customizable `intent="custom"` mode where colors are controlled via inline style props
680
+ * or Tailwind className overrides.
679
681
  *
680
682
  * @example
681
683
  * ```tsx
682
- * <GatherBadge label="System" variant="system" />
683
- * <GatherBadge label="Active" variant="active" size="sm" />
684
- * <GatherBadge label="Identity" variant="identity" icon={<KeyIcon />} />
684
+ * // Predefined intent
685
+ * <GatherBadge label="Active" intent="success" appearance="outline" />
686
+ *
687
+ * // Fully custom colors via inline styles
688
+ * <GatherBadge
689
+ * label="Vigente"
690
+ * intent="custom"
691
+ * appearance="outline"
692
+ * customColor="#ecfdf5"
693
+ * customTextColor="#047857"
694
+ * customBorderColor="#a7f3d0"
695
+ * icon={<span className="h-1.5 w-1.5 rounded-full bg-emerald-500" />}
696
+ * />
697
+ *
698
+ * // Custom via className overrides (Tailwind)
699
+ * <GatherBadge
700
+ * label="Digital"
701
+ * intent="custom"
702
+ * appearance="outline"
703
+ * className="bg-sky-50 text-sky-700 border-sky-200"
704
+ * />
685
705
  * ```
686
706
  */
687
707
  export declare const GatherBadge: default_2.ForwardRefExoticComponent<GatherBadgeProps & default_2.RefAttributes<HTMLSpanElement>>;
688
708
 
689
709
  export declare type GatherBadgeAppearance = 'subtle' | 'outline' | 'solid';
690
710
 
691
- export declare type GatherBadgeIntent = 'neutral' | 'success' | 'warning' | 'info' | 'danger' | 'brand' | 'muted' | 'accent' | 'identity';
711
+ /** Granular CSS class overrides for internal badge elements */
712
+ export declare interface GatherBadgeClassNames {
713
+ /** Override for the root span element */
714
+ root?: string;
715
+ /** Override for the icon wrapper span */
716
+ icon?: string;
717
+ /** Override for the label text (when using labelClassName shortcut) */
718
+ label?: string;
719
+ }
720
+
721
+ export declare type GatherBadgeIntent = 'neutral' | 'success' | 'warning' | 'info' | 'danger' | 'brand' | 'muted' | 'accent' | 'identity' | 'custom';
692
722
 
693
723
  export declare interface GatherBadgeProps {
694
724
  /** Badge text label */
@@ -703,10 +733,16 @@ export declare interface GatherBadgeProps {
703
733
  size?: GatherBadgeSize;
704
734
  /** Icon rendered to the left of the label */
705
735
  icon?: React.ReactNode;
706
- /** Prop to define custom badge color */
736
+ /** Prop to define custom badge background color (inline style) */
707
737
  customColor?: string;
708
- /** Additional CSS classes */
738
+ /** Custom text color (inline style) — used with customColor or intent="custom" */
739
+ customTextColor?: string;
740
+ /** Custom border color (inline style) — used with appearance="outline" and intent="custom" */
741
+ customBorderColor?: string;
742
+ /** Additional CSS classes for the root element */
709
743
  className?: string;
744
+ /** Granular CSS class overrides for internal elements */
745
+ classNames?: GatherBadgeClassNames;
710
746
  }
711
747
 
712
748
  export declare type GatherBadgeShape = 'pill' | 'circle';
@@ -1087,13 +1123,13 @@ export declare interface GatherCheckboxGroupFieldConfig extends BaseFieldConfig
1087
1123
  }
1088
1124
 
1089
1125
  /**
1090
- * `GatherCheckboxList` — A scrollable checkbox list with support for
1091
- * labels, sublabels, badges and disabled states.
1092
- *
1093
- * Uses the primitive `Checkbox` component internally for consistent styling.
1126
+ * GatherCheckboxList — A scrollable checkbox list with support for
1127
+ * labels, sublabels, badges, startContent, and disabled states.
1128
+ * Includes optional select-all/deselect-all header and full style customization.
1094
1129
  *
1095
1130
  * @example
1096
1131
  * ```tsx
1132
+ * // Basic usage
1097
1133
  * <GatherCheckboxList
1098
1134
  * items={[
1099
1135
  * { id: '1', label: 'Name', sublabel: 'name', checked: true },
@@ -1102,10 +1138,38 @@ export declare interface GatherCheckboxGroupFieldConfig extends BaseFieldConfig
1102
1138
  * onChange={(id, checked) => console.log(id, checked)}
1103
1139
  * maxHeight="300px"
1104
1140
  * />
1141
+ *
1142
+ * // With colored dots and select-all header
1143
+ * <GatherCheckboxList
1144
+ * items={[
1145
+ * { id: 'digital', label: 'Digital', checked: true, startContent: <span className="h-2.5 w-2.5 rounded-full bg-sky-500" /> },
1146
+ * { id: 'showroom', label: 'Showroom', checked: false, startContent: <span className="h-2.5 w-2.5 rounded-full bg-emerald-500" /> },
1147
+ * ]}
1148
+ * onChange={handleChange}
1149
+ * showSelectAll
1150
+ * onSelectAll={handleSelectAll}
1151
+ * onDeselectAll={handleDeselectAll}
1152
+ * />
1105
1153
  * ```
1106
1154
  */
1107
1155
  export declare const GatherCheckboxList: default_2.ForwardRefExoticComponent<GatherCheckboxListProps & default_2.RefAttributes<HTMLDivElement>>;
1108
1156
 
1157
+ /** Granular CSS class overrides for internal checkbox list elements */
1158
+ export declare interface GatherCheckboxListClassNames {
1159
+ /** Override for the root container */
1160
+ root?: string;
1161
+ /** Override for the <ul> list element */
1162
+ list?: string;
1163
+ /** Override for each list item <li> */
1164
+ item?: string;
1165
+ /** Override for the label text */
1166
+ label?: string;
1167
+ /** Override for the sublabel text */
1168
+ sublabel?: string;
1169
+ /** Override for the select-all header container */
1170
+ header?: string;
1171
+ }
1172
+
1109
1173
  export declare interface GatherCheckboxListItem {
1110
1174
  /** Unique identifier */
1111
1175
  id: string;
@@ -1117,6 +1181,8 @@ export declare interface GatherCheckboxListItem {
1117
1181
  checked: boolean;
1118
1182
  /** Whether the checkbox is disabled */
1119
1183
  disabled?: boolean;
1184
+ /** Additional content rendered on the left before the label (dots, icons) */
1185
+ startContent?: React.ReactNode;
1120
1186
  /** Additional content rendered on the right (badges, icons) */
1121
1187
  endContent?: React.ReactNode;
1122
1188
  }
@@ -1130,8 +1196,20 @@ export declare interface GatherCheckboxListProps {
1130
1196
  maxHeight?: string;
1131
1197
  /** Whether to show dividers between items. Defaults to true. */
1132
1198
  showDividers?: boolean;
1133
- /** Additional CSS classes */
1199
+ /** Whether to show a "Select all / Deselect all" header. Defaults to false. */
1200
+ showSelectAll?: boolean;
1201
+ /** Label for "Select all" action (default: "Seleccionar todo") */
1202
+ selectAllLabel?: string;
1203
+ /** Label for "Deselect all" action (default: "Deseleccionar todo") */
1204
+ deselectAllLabel?: string;
1205
+ /** Callback when "Select all" is clicked */
1206
+ onSelectAll?: () => void;
1207
+ /** Callback when "Deselect all" is clicked */
1208
+ onDeselectAll?: () => void;
1209
+ /** Additional CSS classes for the root container */
1134
1210
  className?: string;
1211
+ /** Granular CSS class overrides for internal elements */
1212
+ classNames?: GatherCheckboxListClassNames;
1135
1213
  /** data-testid for testing */
1136
1214
  'data-testid'?: string;
1137
1215
  }
@@ -1391,6 +1469,117 @@ export declare interface GatherComingSoonPageProps {
1391
1469
  'data-testid'?: string;
1392
1470
  }
1393
1471
 
1472
+ /**
1473
+ * Reusable confirmation dialog with multiple visual intents (error, warning, success, info)
1474
+ * Self-contained portal-based dialog with overlay, keyboard handling, and focus trap.
1475
+ *
1476
+ * @param {GatherConfirmDialogProps} props - Component configuration
1477
+ *
1478
+ * @returns {JSX.Element | null} Rendered dialog or null when closed
1479
+ *
1480
+ * @example
1481
+ * ```tsx
1482
+ * // Destructive confirmation (delete)
1483
+ * <GatherConfirmDialog
1484
+ * open={isOpen}
1485
+ * onOpenChange={setIsOpen}
1486
+ * variant="error"
1487
+ * title="¿Estás seguro?"
1488
+ * description="Esta acción no se puede deshacer."
1489
+ * confirmLabel="Eliminar"
1490
+ * onConfirm={handleDelete}
1491
+ * />
1492
+ *
1493
+ * // Success confirmation
1494
+ * <GatherConfirmDialog
1495
+ * open={isOpen}
1496
+ * onOpenChange={setIsOpen}
1497
+ * variant="success"
1498
+ * title="Período activado"
1499
+ * description="El período fue activado correctamente."
1500
+ * onConfirm={() => setIsOpen(false)}
1501
+ * hideCancelButton
1502
+ * />
1503
+ *
1504
+ * // Custom icon override
1505
+ * <GatherConfirmDialog
1506
+ * open={isOpen}
1507
+ * onOpenChange={setIsOpen}
1508
+ * variant="warning"
1509
+ * icon={<Trash2 className="h-6 w-6" />}
1510
+ * title="Eliminar período"
1511
+ * description="Se perderá todo el historial de métricas."
1512
+ * onConfirm={handleDelete}
1513
+ * />
1514
+ * ```
1515
+ */
1516
+ export declare const GatherConfirmDialog: default_2.FC<GatherConfirmDialogProps>;
1517
+
1518
+ export declare interface GatherConfirmDialogProps {
1519
+ /** Whether the dialog is currently open */
1520
+ open: boolean;
1521
+ /** Callback fired when the dialog requests to close (overlay click, Escape, cancel button) */
1522
+ onOpenChange: (open: boolean) => void;
1523
+ /** Dialog title — if omitted, the title section is not rendered */
1524
+ title?: string;
1525
+ /** Dialog description/body text — rendered below the title */
1526
+ description?: string;
1527
+ /** Custom content rendered below description (for advanced use cases) */
1528
+ children?: default_2.ReactNode;
1529
+ /** Visual intent variant — controls icon, colors, and default confirm button style */
1530
+ variant?: GatherConfirmDialogVariant;
1531
+ /** Override the default icon for the variant — pass `null` to hide the icon entirely */
1532
+ icon?: default_2.ReactNode | null;
1533
+ /** Additional CSS classes for the icon container circle */
1534
+ iconContainerClassName?: string;
1535
+ /** Whether to show the icon section (default: true) */
1536
+ showIcon?: boolean;
1537
+ /** Dialog size preset */
1538
+ size?: GatherConfirmDialogSize;
1539
+ /** Text for the confirm/accept button */
1540
+ confirmLabel?: string;
1541
+ /** Text for the cancel button */
1542
+ cancelLabel?: string;
1543
+ /** Callback fired when the confirm button is clicked */
1544
+ onConfirm: () => void;
1545
+ /** Callback fired when the cancel button is clicked (defaults to onOpenChange(false)) */
1546
+ onCancel?: () => void;
1547
+ /** Variant style for the confirm button — overrides the variant-based default */
1548
+ confirmVariant?: GatherModalVariantType;
1549
+ /** Whether the confirm button is disabled */
1550
+ disableConfirm?: boolean;
1551
+ /** Whether to hide the cancel button */
1552
+ hideCancelButton?: boolean;
1553
+ /** Whether to hide the confirm button */
1554
+ hideConfirmButton?: boolean;
1555
+ /** Whether the dialog is in a loading state */
1556
+ isLoading?: boolean;
1557
+ /** Text displayed on the confirm button while loading (defaults to confirmLabel) */
1558
+ loadingText?: string;
1559
+ /** Whether clicking the overlay closes the dialog (default: true) */
1560
+ closeOnOverlayClick?: boolean;
1561
+ /** Whether pressing Escape closes the dialog (default: true) */
1562
+ closeOnEsc?: boolean;
1563
+ /** Additional CSS classes for the dialog container */
1564
+ className?: string;
1565
+ /** Inline styles for the dialog container */
1566
+ style?: default_2.CSSProperties;
1567
+ /** Additional CSS classes for the overlay/backdrop */
1568
+ overlayClassName?: string;
1569
+ /** Additional CSS classes for the body/content area */
1570
+ bodyClassName?: string;
1571
+ /** Additional CSS classes for the buttons wrapper */
1572
+ buttonsClassName?: string;
1573
+ /** Z-index for the dialog (default: 50) */
1574
+ zIndex?: number;
1575
+ }
1576
+
1577
+ /** Size presets for the confirm dialog */
1578
+ export declare type GatherConfirmDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
1579
+
1580
+ /** Visual intent/variant of the confirm dialog */
1581
+ export declare type GatherConfirmDialogVariant = 'default' | 'error' | 'warning' | 'success' | 'info';
1582
+
1394
1583
  /**
1395
1584
  * Generic conversion percentage chip with traffic-light color coding.
1396
1585
  * Displays a percentage with green (good), yellow (warning), or red (danger) styling
@@ -1810,21 +1999,49 @@ export declare const GatherDonutChartSkeleton: default_2.FC<{
1810
1999
  }>;
1811
2000
 
1812
2001
  /**
1813
- * `GatherEmptyState` — A generic empty state component.
2002
+ * GatherEmptyState — A generic empty state component with full style customization
2003
+ *
1814
2004
  * Displays an icon, primary message, description and optional action.
2005
+ * Every internal element can be customized via the `classNames` prop.
1815
2006
  *
1816
2007
  * @example
1817
2008
  * ```tsx
2009
+ * // Basic usage
1818
2010
  * <GatherEmptyState
1819
2011
  * icon={<InboxIcon className="h-10 w-10" />}
1820
2012
  * title="No custom properties"
1821
2013
  * description="Create your first custom property"
1822
2014
  * action={<button>Create property</button>}
1823
2015
  * />
2016
+ *
2017
+ * // Fully customized (e.g., icon with colored circle background)
2018
+ * <GatherEmptyState
2019
+ * icon={<Target className="h-5 w-5" />}
2020
+ * title="No periods configured"
2021
+ * description="Set up your first budget period to start tracking CPL."
2022
+ * action={<GatherButton variant="gather-primary">Configure period</GatherButton>}
2023
+ * classNames={{
2024
+ * icon: 'h-10 w-10 rounded-full bg-emerald-50 text-emerald-600 flex items-center justify-center',
2025
+ * title: 'text-sm font-bold text-slate-900',
2026
+ * description: 'text-xs text-slate-500 max-w-md',
2027
+ * }}
2028
+ * />
1824
2029
  * ```
1825
2030
  */
1826
2031
  export declare const GatherEmptyState: default_2.ForwardRefExoticComponent<GatherEmptyStateProps & default_2.RefAttributes<HTMLDivElement>>;
1827
2032
 
2033
+ /** Granular CSS class overrides for internal empty state elements */
2034
+ export declare interface GatherEmptyStateClassNames {
2035
+ /** Override for the icon wrapper div */
2036
+ icon?: string;
2037
+ /** Override for the title paragraph */
2038
+ title?: string;
2039
+ /** Override for the description paragraph */
2040
+ description?: string;
2041
+ /** Override for the action wrapper div */
2042
+ action?: string;
2043
+ }
2044
+
1828
2045
  export declare interface GatherEmptyStateProps {
1829
2046
  /** Main icon */
1830
2047
  icon?: React.ReactNode;
@@ -1834,8 +2051,10 @@ export declare interface GatherEmptyStateProps {
1834
2051
  description?: string;
1835
2052
  /** Optional action (button, link, etc.) */
1836
2053
  action?: React.ReactNode;
1837
- /** Additional CSS classes */
2054
+ /** Additional CSS classes for the root container */
1838
2055
  className?: string;
2056
+ /** Granular CSS class overrides for internal elements */
2057
+ classNames?: GatherEmptyStateClassNames;
1839
2058
  /** data-testid for testing */
1840
2059
  'data-testid'?: string;
1841
2060
  }
@@ -3853,6 +4072,37 @@ export declare interface GatherTableBodyProps<T = any> extends Omit<React.HTMLAt
3853
4072
  * Contenido personalizado para mostrar cuando no hay columnas definidas.
3854
4073
  */
3855
4074
  children?: React.ReactNode;
4075
+ /**
4076
+ * Set of row indices or data IDs that are currently expanded.
4077
+ * When provided, rows can render expanded content below them.
4078
+ */
4079
+ expandedRowIds?: Set<string | number>;
4080
+ /**
4081
+ * Callback when a row's expand/collapse state is toggled.
4082
+ *
4083
+ * @param rowId - The ID or index of the toggled row
4084
+ */
4085
+ onRowExpand?: (rowId: string | number) => void;
4086
+ /**
4087
+ * Function to render expanded content below a row.
4088
+ * Only called for rows present in `expandedRowIds`.
4089
+ *
4090
+ * @param row - The data item of the expanded row
4091
+ * @param rowIndex - Index of the row
4092
+ *
4093
+ * @returns Content to render in a full-width colspan cell below the row
4094
+ */
4095
+ renderExpandedContent?: (row: T, rowIndex: number) => React.ReactNode;
4096
+ /**
4097
+ * Function to determine the unique ID for a row (used with expandedRowIds).
4098
+ * If not provided, the row index is used.
4099
+ *
4100
+ * @param row - The data item
4101
+ * @param rowIndex - Index of the row
4102
+ *
4103
+ * @returns Unique identifier for the row
4104
+ */
4105
+ getRowId?: (row: T, rowIndex: number) => string | number;
3856
4106
  }
3857
4107
 
3858
4108
  /**
@@ -3878,6 +4128,16 @@ export declare const GatherTableCaption: default_2.ForwardRefExoticComponent<Gat
3878
4128
  export declare interface GatherTableCaptionProps extends default_2.HTMLAttributes<HTMLTableCaptionElement> {
3879
4129
  }
3880
4130
 
4131
+ /** CSS class overrides for internal table elements */
4132
+ export declare interface GatherTableClassNames {
4133
+ /** Override for the outer container div */
4134
+ container?: string;
4135
+ /** Override for the <table> element */
4136
+ table?: string;
4137
+ /** Override for the header banner wrapper */
4138
+ headerBanner?: string;
4139
+ }
4140
+
3881
4141
  /**
3882
4142
  * Interfaz principal para columnas con type safety completo.
3883
4143
  *
@@ -4011,6 +4271,12 @@ export declare interface GatherTableProps extends React.HTMLAttributes<HTMLTable
4011
4271
  maxHeight?: string;
4012
4272
  /** It leads to indicate if the table is embedded with his parent or not */
4013
4273
  embedded?: boolean;
4274
+ /**
4275
+ * Content rendered between the table header and body.
4276
+ * Useful for informational banners, warnings, or filter summaries.
4277
+ * Rendered outside the table element (above the scrollable area) to avoid layout issues.
4278
+ */
4279
+ headerBanner?: React.ReactNode;
4014
4280
  }
4015
4281
 
4016
4282
  /**
@@ -4979,4 +5245,12 @@ export declare interface ValidationRule<T = unknown> {
4979
5245
  */
4980
5246
  export declare const VARIANT_BORDER_COLORS: Record<MetricCardVariant, string>;
4981
5247
 
5248
+ export declare const VARIANT_CONFIRM_BUTTON: Record<GatherConfirmDialogVariant, GatherModalVariantType>;
5249
+
5250
+ export declare const VARIANT_DEFAULT_CONFIRM_LABEL: Record<GatherConfirmDialogVariant, string>;
5251
+
5252
+ export declare const VARIANT_ICON_BG: Record<GatherConfirmDialogVariant, string>;
5253
+
5254
+ export declare const VARIANT_ICON_FG: Record<GatherConfirmDialogVariant, string>;
5255
+
4982
5256
  export { }