carconnect-gatherleads-ui-lib 3.5.0-GL-1521-Modulo-Rendimiento.3 → 3.5.0-GL-1521-Modulo-Rendimiento.4

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';
@@ -1085,13 +1121,13 @@ export declare interface GatherCheckboxGroupFieldConfig extends BaseFieldConfig
1085
1121
  }
1086
1122
 
1087
1123
  /**
1088
- * `GatherCheckboxList` — A scrollable checkbox list with support for
1089
- * labels, sublabels, badges and disabled states.
1090
- *
1091
- * Uses the primitive `Checkbox` component internally for consistent styling.
1124
+ * GatherCheckboxList — A scrollable checkbox list with support for
1125
+ * labels, sublabels, badges, startContent, and disabled states.
1126
+ * Includes optional select-all/deselect-all header and full style customization.
1092
1127
  *
1093
1128
  * @example
1094
1129
  * ```tsx
1130
+ * // Basic usage
1095
1131
  * <GatherCheckboxList
1096
1132
  * items={[
1097
1133
  * { id: '1', label: 'Name', sublabel: 'name', checked: true },
@@ -1100,10 +1136,38 @@ export declare interface GatherCheckboxGroupFieldConfig extends BaseFieldConfig
1100
1136
  * onChange={(id, checked) => console.log(id, checked)}
1101
1137
  * maxHeight="300px"
1102
1138
  * />
1139
+ *
1140
+ * // With colored dots and select-all header
1141
+ * <GatherCheckboxList
1142
+ * items={[
1143
+ * { id: 'digital', label: 'Digital', checked: true, startContent: <span className="h-2.5 w-2.5 rounded-full bg-sky-500" /> },
1144
+ * { id: 'showroom', label: 'Showroom', checked: false, startContent: <span className="h-2.5 w-2.5 rounded-full bg-emerald-500" /> },
1145
+ * ]}
1146
+ * onChange={handleChange}
1147
+ * showSelectAll
1148
+ * onSelectAll={handleSelectAll}
1149
+ * onDeselectAll={handleDeselectAll}
1150
+ * />
1103
1151
  * ```
1104
1152
  */
1105
1153
  export declare const GatherCheckboxList: default_2.ForwardRefExoticComponent<GatherCheckboxListProps & default_2.RefAttributes<HTMLDivElement>>;
1106
1154
 
1155
+ /** Granular CSS class overrides for internal checkbox list elements */
1156
+ export declare interface GatherCheckboxListClassNames {
1157
+ /** Override for the root container */
1158
+ root?: string;
1159
+ /** Override for the <ul> list element */
1160
+ list?: string;
1161
+ /** Override for each list item <li> */
1162
+ item?: string;
1163
+ /** Override for the label text */
1164
+ label?: string;
1165
+ /** Override for the sublabel text */
1166
+ sublabel?: string;
1167
+ /** Override for the select-all header container */
1168
+ header?: string;
1169
+ }
1170
+
1107
1171
  export declare interface GatherCheckboxListItem {
1108
1172
  /** Unique identifier */
1109
1173
  id: string;
@@ -1115,6 +1179,8 @@ export declare interface GatherCheckboxListItem {
1115
1179
  checked: boolean;
1116
1180
  /** Whether the checkbox is disabled */
1117
1181
  disabled?: boolean;
1182
+ /** Additional content rendered on the left before the label (dots, icons) */
1183
+ startContent?: React.ReactNode;
1118
1184
  /** Additional content rendered on the right (badges, icons) */
1119
1185
  endContent?: React.ReactNode;
1120
1186
  }
@@ -1128,8 +1194,20 @@ export declare interface GatherCheckboxListProps {
1128
1194
  maxHeight?: string;
1129
1195
  /** Whether to show dividers between items. Defaults to true. */
1130
1196
  showDividers?: boolean;
1131
- /** Additional CSS classes */
1197
+ /** Whether to show a "Select all / Deselect all" header. Defaults to false. */
1198
+ showSelectAll?: boolean;
1199
+ /** Label for "Select all" action (default: "Seleccionar todo") */
1200
+ selectAllLabel?: string;
1201
+ /** Label for "Deselect all" action (default: "Deseleccionar todo") */
1202
+ deselectAllLabel?: string;
1203
+ /** Callback when "Select all" is clicked */
1204
+ onSelectAll?: () => void;
1205
+ /** Callback when "Deselect all" is clicked */
1206
+ onDeselectAll?: () => void;
1207
+ /** Additional CSS classes for the root container */
1132
1208
  className?: string;
1209
+ /** Granular CSS class overrides for internal elements */
1210
+ classNames?: GatherCheckboxListClassNames;
1133
1211
  /** data-testid for testing */
1134
1212
  'data-testid'?: string;
1135
1213
  }
@@ -1919,21 +1997,49 @@ export declare const GatherDonutChartSkeleton: default_2.FC<{
1919
1997
  }>;
1920
1998
 
1921
1999
  /**
1922
- * `GatherEmptyState` — A generic empty state component.
2000
+ * GatherEmptyState — A generic empty state component with full style customization
2001
+ *
1923
2002
  * Displays an icon, primary message, description and optional action.
2003
+ * Every internal element can be customized via the `classNames` prop.
1924
2004
  *
1925
2005
  * @example
1926
2006
  * ```tsx
2007
+ * // Basic usage
1927
2008
  * <GatherEmptyState
1928
2009
  * icon={<InboxIcon className="h-10 w-10" />}
1929
2010
  * title="No custom properties"
1930
2011
  * description="Create your first custom property"
1931
2012
  * action={<button>Create property</button>}
1932
2013
  * />
2014
+ *
2015
+ * // Fully customized (e.g., icon with colored circle background)
2016
+ * <GatherEmptyState
2017
+ * icon={<Target className="h-5 w-5" />}
2018
+ * title="No periods configured"
2019
+ * description="Set up your first budget period to start tracking CPL."
2020
+ * action={<GatherButton variant="gather-primary">Configure period</GatherButton>}
2021
+ * classNames={{
2022
+ * icon: 'h-10 w-10 rounded-full bg-emerald-50 text-emerald-600 flex items-center justify-center',
2023
+ * title: 'text-sm font-bold text-slate-900',
2024
+ * description: 'text-xs text-slate-500 max-w-md',
2025
+ * }}
2026
+ * />
1933
2027
  * ```
1934
2028
  */
1935
2029
  export declare const GatherEmptyState: default_2.ForwardRefExoticComponent<GatherEmptyStateProps & default_2.RefAttributes<HTMLDivElement>>;
1936
2030
 
2031
+ /** Granular CSS class overrides for internal empty state elements */
2032
+ export declare interface GatherEmptyStateClassNames {
2033
+ /** Override for the icon wrapper div */
2034
+ icon?: string;
2035
+ /** Override for the title paragraph */
2036
+ title?: string;
2037
+ /** Override for the description paragraph */
2038
+ description?: string;
2039
+ /** Override for the action wrapper div */
2040
+ action?: string;
2041
+ }
2042
+
1937
2043
  export declare interface GatherEmptyStateProps {
1938
2044
  /** Main icon */
1939
2045
  icon?: React.ReactNode;
@@ -1943,8 +2049,10 @@ export declare interface GatherEmptyStateProps {
1943
2049
  description?: string;
1944
2050
  /** Optional action (button, link, etc.) */
1945
2051
  action?: React.ReactNode;
1946
- /** Additional CSS classes */
2052
+ /** Additional CSS classes for the root container */
1947
2053
  className?: string;
2054
+ /** Granular CSS class overrides for internal elements */
2055
+ classNames?: GatherEmptyStateClassNames;
1948
2056
  /** data-testid for testing */
1949
2057
  'data-testid'?: string;
1950
2058
  }
@@ -3947,6 +4055,37 @@ export declare interface GatherTableBodyProps<T = any> extends Omit<React.HTMLAt
3947
4055
  * Contenido personalizado para mostrar cuando no hay columnas definidas.
3948
4056
  */
3949
4057
  children?: React.ReactNode;
4058
+ /**
4059
+ * Set of row indices or data IDs that are currently expanded.
4060
+ * When provided, rows can render expanded content below them.
4061
+ */
4062
+ expandedRowIds?: Set<string | number>;
4063
+ /**
4064
+ * Callback when a row's expand/collapse state is toggled.
4065
+ *
4066
+ * @param rowId - The ID or index of the toggled row
4067
+ */
4068
+ onRowExpand?: (rowId: string | number) => void;
4069
+ /**
4070
+ * Function to render expanded content below a row.
4071
+ * Only called for rows present in `expandedRowIds`.
4072
+ *
4073
+ * @param row - The data item of the expanded row
4074
+ * @param rowIndex - Index of the row
4075
+ *
4076
+ * @returns Content to render in a full-width colspan cell below the row
4077
+ */
4078
+ renderExpandedContent?: (row: T, rowIndex: number) => React.ReactNode;
4079
+ /**
4080
+ * Function to determine the unique ID for a row (used with expandedRowIds).
4081
+ * If not provided, the row index is used.
4082
+ *
4083
+ * @param row - The data item
4084
+ * @param rowIndex - Index of the row
4085
+ *
4086
+ * @returns Unique identifier for the row
4087
+ */
4088
+ getRowId?: (row: T, rowIndex: number) => string | number;
3950
4089
  }
3951
4090
 
3952
4091
  /**
@@ -3972,6 +4111,16 @@ export declare const GatherTableCaption: default_2.ForwardRefExoticComponent<Gat
3972
4111
  export declare interface GatherTableCaptionProps extends default_2.HTMLAttributes<HTMLTableCaptionElement> {
3973
4112
  }
3974
4113
 
4114
+ /** CSS class overrides for internal table elements */
4115
+ export declare interface GatherTableClassNames {
4116
+ /** Override for the outer container div */
4117
+ container?: string;
4118
+ /** Override for the <table> element */
4119
+ table?: string;
4120
+ /** Override for the header banner wrapper */
4121
+ headerBanner?: string;
4122
+ }
4123
+
3975
4124
  /**
3976
4125
  * Interfaz principal para columnas con type safety completo.
3977
4126
  *
@@ -4105,6 +4254,12 @@ export declare interface GatherTableProps extends React.HTMLAttributes<HTMLTable
4105
4254
  maxHeight?: string;
4106
4255
  /** It leads to indicate if the table is embedded with his parent or not */
4107
4256
  embedded?: boolean;
4257
+ /**
4258
+ * Content rendered between the table header and body.
4259
+ * Useful for informational banners, warnings, or filter summaries.
4260
+ * Rendered outside the table element (above the scrollable area) to avoid layout issues.
4261
+ */
4262
+ headerBanner?: React.ReactNode;
4108
4263
  }
4109
4264
 
4110
4265
  /**