@gobolt/genesis 0.4.24 → 0.4.26

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.
@@ -9,6 +9,7 @@ export interface MessageProps {
9
9
  message: string;
10
10
  action?: MessageAction;
11
11
  size?: Extract<keyof typeof SIZE, "small" | "standard">;
12
+ isFullWidth?: boolean;
12
13
  }
13
- declare const Message: ({ state, message, action, size, }: MessageProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const Message: ({ state, message, action, size, isFullWidth, }: MessageProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export default Message;
@@ -1,9 +1,11 @@
1
1
  export declare const MessageRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
2
  state: string;
3
3
  size: string;
4
+ isFullWidth: boolean;
4
5
  }>> & string;
5
6
  export declare const MessageContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
6
7
  size?: string;
7
8
  action?: unknown;
9
+ isFullWidth?: boolean;
8
10
  }>> & string;
9
11
  export declare const ActionButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
@@ -12,6 +12,7 @@ export interface OverflowMenuProps {
12
12
  className?: string;
13
13
  style?: React.CSSProperties;
14
14
  onItemClick?: (item: OverflowMenuItemProps) => void;
15
+ overrideTextColor?: string;
15
16
  }
16
17
  declare const OverflowMenu: React.ForwardRefExoticComponent<OverflowMenuProps & React.RefAttributes<HTMLDivElement>>;
17
18
  export default OverflowMenu;
@@ -1,5 +1,6 @@
1
1
  export type BarData = {
2
2
  text: string;
3
+ overrideTextColor?: string;
3
4
  status: string;
4
5
  value: number;
5
6
  };
@@ -8,13 +9,14 @@ export type Percent = {
8
9
  strokeColor: string;
9
10
  };
10
11
  export interface ProgressProps {
11
- firstBarData: BarData | null;
12
+ firstBarData?: BarData | null;
12
13
  secondBarData?: BarData | null;
13
14
  width?: number;
14
15
  height?: number;
15
16
  isTextBeforeBar?: boolean;
16
17
  isProgressCombined?: boolean;
17
18
  isSingleBarOverallSuccess?: boolean;
19
+ overrideTextColor?: string;
18
20
  }
19
- declare const Progress: ({ firstBarData, secondBarData, width, height, isTextBeforeBar, isProgressCombined, isSingleBarOverallSuccess, }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const Progress: ({ firstBarData, secondBarData, width, height, isTextBeforeBar, isProgressCombined, isSingleBarOverallSuccess, overrideTextColor, }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
20
22
  export default Progress;
@@ -4,6 +4,7 @@ export interface AppointmentWithSimpleAddress {
4
4
  number: string;
5
5
  timerange: string;
6
6
  status: AppointmentStatus;
7
+ isSelected?: boolean;
7
8
  address: {
8
9
  nickname: string;
9
10
  address: string;
@@ -17,6 +17,9 @@ export type UseTableConfig = {
17
17
  dataSource?: any[];
18
18
  };
19
19
  export declare const useTable: <T extends Record<string, any>>(useTableConfig: any) => {
20
+ dataSource: (T & {
21
+ isSelected: boolean;
22
+ })[];
20
23
  isLoading: boolean;
21
24
  hasErrored: boolean;
22
25
  rowSelection: {
@@ -34,7 +37,6 @@ export declare const useTable: <T extends Record<string, any>>(useTableConfig: a
34
37
  hasFilter: boolean;
35
38
  updateDataSource: (newDataSource: T[]) => void;
36
39
  retry: () => void;
37
- dataSource: T[];
38
40
  columns: ColumnsType<T>;
39
41
  error: Error | null;
40
42
  };
package/dist/index.cjs CHANGED
@@ -78958,7 +78958,7 @@ const MessageRow = styled.div`
78958
78958
  gap: ${({ theme }) => theme.sizing.Size4}px;
78959
78959
  padding: ${({ theme }) => theme.sizing.Size3}px;
78960
78960
  background-color: ${({ theme, state }) => theme.colors.status[state].surface};
78961
- width: ${({ theme, state, size }) => size === "standard" ? "320px" : "240px"};
78961
+ width: ${({ theme, state, size, isFullWidth }) => isFullWidth ? "100%" : size === "standard" ? "320px" : "240px"};
78962
78962
  pointer-events: none;
78963
78963
  cursor: default;
78964
78964
  border-radius: ${({ theme }) => theme.borderRadius.BorderRadiusSm}px;
@@ -78968,7 +78968,7 @@ const MessageContent = styled.div`
78968
78968
  align-items: center;
78969
78969
  gap: ${({ theme }) => theme.sizing.Size2}px;
78970
78970
  flex: 1;
78971
- max-width: ${({ size, action }) => size === "standard" || !action ? "320px" : "240px"};
78971
+ max-width: ${({ size, action, isFullWidth }) => isFullWidth ? "100%" : size === "standard" || !action ? "320px" : "240px"};
78972
78972
 
78973
78973
  .ant-typography {
78974
78974
  display: -webkit-box;
@@ -79035,7 +79035,8 @@ const Message = ({
79035
79035
  state = STATE.info,
79036
79036
  message: message2,
79037
79037
  action,
79038
- size = SIZE.standard
79038
+ size = SIZE.standard,
79039
+ isFullWidth = false
79039
79040
  }) => {
79040
79041
  const theme = styled.useTheme();
79041
79042
  const color2 = getIconColor$1(state, theme);
@@ -79043,8 +79044,8 @@ const Message = ({
79043
79044
  const [linkColor, setLinkColor] = React.useState(
79044
79045
  theme.colors.interactive.link.active
79045
79046
  );
79046
- return /* @__PURE__ */ jsxRuntime.jsxs(MessageRow, { state, size, children: [
79047
- /* @__PURE__ */ jsxRuntime.jsxs(MessageContent, { action, size, children: [
79047
+ return /* @__PURE__ */ jsxRuntime.jsxs(MessageRow, { state, size, isFullWidth, children: [
79048
+ /* @__PURE__ */ jsxRuntime.jsxs(MessageContent, { action, size, isFullWidth, children: [
79048
79049
  getIcon(state, color2),
79049
79050
  /* @__PURE__ */ jsxRuntime.jsx(
79050
79051
  Typography,
@@ -81263,6 +81264,11 @@ const OverflowMenuItem = ({ children: children2, onClick }) => {
81263
81264
  const DefaultTrigger = () => {
81264
81265
  return /* @__PURE__ */ jsxRuntime.jsx(Button$1, { isIconButton: true, themeType: "secondary", size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(HiDotsHorizontal, {}) });
81265
81266
  };
81267
+ const DefaultTriggerWithOverrideTextColor = ({
81268
+ overrideTextColor
81269
+ }) => {
81270
+ return /* @__PURE__ */ jsxRuntime.jsx(Button$1, { isIconButton: true, themeType: "secondary", size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(HiDotsHorizontal, { style: { color: overrideTextColor } }) });
81271
+ };
81266
81272
  const OverflowMenu = React.forwardRef(
81267
81273
  ({
81268
81274
  items,
@@ -81275,7 +81281,8 @@ const OverflowMenu = React.forwardRef(
81275
81281
  offset: offset2 = 8,
81276
81282
  className,
81277
81283
  style: style2,
81278
- onItemClick
81284
+ onItemClick,
81285
+ overrideTextColor
81279
81286
  }, ref) => {
81280
81287
  const [internalIsOpen, setInternalIsOpen] = React.useState(false);
81281
81288
  const [isAnimating, setIsAnimating] = React.useState(false);
@@ -81370,7 +81377,12 @@ const OverflowMenu = React.forwardRef(
81370
81377
  );
81371
81378
  if (items && items.length > 0) {
81372
81379
  return /* @__PURE__ */ jsxRuntime.jsxs(OverflowMenuWrapper, { ref, children: [
81373
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: triggerRef, onClick: handleTriggerClick, children: trigger }),
81380
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref: triggerRef, onClick: handleTriggerClick, children: overrideTextColor ? /* @__PURE__ */ jsxRuntime.jsx(
81381
+ DefaultTriggerWithOverrideTextColor,
81382
+ {
81383
+ overrideTextColor
81384
+ }
81385
+ ) : trigger }),
81374
81386
  isOpen && /* @__PURE__ */ jsxRuntime.jsx(
81375
81387
  OverflowMenuContainer,
81376
81388
  {
@@ -81557,7 +81569,8 @@ const Progress = ({
81557
81569
  height = 24,
81558
81570
  isTextBeforeBar = false,
81559
81571
  isProgressCombined = false,
81560
- isSingleBarOverallSuccess = false
81572
+ isSingleBarOverallSuccess = false,
81573
+ overrideTextColor
81561
81574
  }) => {
81562
81575
  const theme = styled.useTheme();
81563
81576
  const percent = firstBarData?.value || 0;
@@ -81591,7 +81604,7 @@ const Progress = ({
81591
81604
  alignItems: "center",
81592
81605
  width: percentDisplayWidth
81593
81606
  },
81594
- children: /* @__PURE__ */ jsxRuntime.jsxs(Typography, { color: textColor, variant: "digits3", children: [
81607
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Typography, { color: overrideTextColor ?? textColor, variant: "digits3", children: [
81595
81608
  overallPercent,
81596
81609
  "%"
81597
81610
  ] })
@@ -81600,7 +81613,7 @@ const Progress = ({
81600
81613
  ] });
81601
81614
  }
81602
81615
  if (isProgressCombined) {
81603
- const combinedPercent = getCombinedPercent(firstBarData, secondBarData);
81616
+ const combinedPercent = getCombinedPercent(firstBarData, secondBarData || null);
81604
81617
  const textColor = Number(combinedPercent) === 100 ? "green" : "black";
81605
81618
  const adjustedFirstBar = secondBarData?.value === 100 ? 100 : firstBarData?.value || 0;
81606
81619
  const firstBarStrokeColor = theme?.colors?.inputs?.progress?.[firstBarData?.status || "info"];
@@ -81650,7 +81663,7 @@ const Progress = ({
81650
81663
  alignItems: "center",
81651
81664
  width: percentDisplayWidth
81652
81665
  },
81653
- children: /* @__PURE__ */ jsxRuntime.jsxs(Typography, { color: textColor, variant: "digits3", children: [
81666
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Typography, { color: overrideTextColor ?? textColor, variant: "digits3", children: [
81654
81667
  combinedPercent,
81655
81668
  "%"
81656
81669
  ] })
@@ -84867,7 +84880,11 @@ const InfiniteScrollTable = ({
84867
84880
  [isFetchingNextPage, hasNextPage, fetchNextPage, scrollableNode]
84868
84881
  );
84869
84882
  const rawDataSource = data?.pages.flatMap((page) => page.docs) ?? [];
84870
- const dataSource = filterFn ? filterFn(rawDataSource) : rawDataSource;
84883
+ const filteredDataSource = filterFn ? filterFn(rawDataSource) : rawDataSource;
84884
+ const dataSource = filteredDataSource.map((record) => ({
84885
+ ...record,
84886
+ isSelected: selectedRowKeys.includes(record.id)
84887
+ }));
84871
84888
  const totalDocs = data?.pages?.[0]?.totalDocs ?? 0;
84872
84889
  React.useEffect(() => {
84873
84890
  if (onRowSelectionChange) {
@@ -85099,7 +85116,7 @@ function Table({
85099
85116
  title: infiniteScrollConfig.title,
85100
85117
  scrollHeight: infiniteScrollConfig.scrollHeight,
85101
85118
  scrollWidth: infiniteScrollConfig.scrollWidth,
85102
- onChange,
85119
+ onChange: isInfiniteScroll ? onChange : onChange,
85103
85120
  onRowSelectionChange,
85104
85121
  onDataChange,
85105
85122
  filterFn: infiniteScrollConfig.filterFn
@@ -85409,7 +85426,6 @@ const useTable = (useTableConfig) => {
85409
85426
  ]);
85410
85427
  const handleRowSelection = React.useCallback(
85411
85428
  (newSelectedRowKeys, newSelectedRows) => {
85412
- console.log("Row Selected:", newSelectedRowKeys, newSelectedRows);
85413
85429
  setSelectedRowKeys(newSelectedRowKeys);
85414
85430
  setSelectedRows(newSelectedRows);
85415
85431
  },
@@ -85434,8 +85450,19 @@ const useTable = (useTableConfig) => {
85434
85450
  onChange: handleRowSelection,
85435
85451
  getCheckboxProps: disableRowSelection
85436
85452
  };
85453
+ const enhancedDataSource = React.useMemo(() => {
85454
+ return data.dataSource.map((record) => {
85455
+ const isSelected = selectedRowKeys.includes(record.id);
85456
+ return {
85457
+ ...record,
85458
+ isSelected
85459
+ };
85460
+ });
85461
+ }, [data.dataSource, selectedRowKeys]);
85437
85462
  return {
85438
85463
  ...data,
85464
+ dataSource: enhancedDataSource,
85465
+ // Use enhanced data source instead of original
85439
85466
  isLoading,
85440
85467
  hasErrored,
85441
85468
  rowSelection,
@@ -86722,11 +86749,14 @@ const mockColumns = [
86722
86749
  {
86723
86750
  key: "address",
86724
86751
  title: "Address",
86725
- render: (appointment) => {
86726
- const {
86727
- address: { nickname, address }
86728
- } = appointment;
86729
- return nickname ? `${nickname} (${address})` : address;
86752
+ render: (appointment, record) => {
86753
+ const { address } = appointment;
86754
+ const textColor = record.isSelected ? "white" : "#6c6c6c";
86755
+ return React.createElement(Typography, {
86756
+ variant: "body2",
86757
+ children: typeof address === "string" ? address : JSON.stringify(address),
86758
+ color: `${textColor}`
86759
+ });
86730
86760
  }
86731
86761
  },
86732
86762
  {
@@ -86746,8 +86776,9 @@ const mockColumns = [
86746
86776
  {
86747
86777
  title: "Progress",
86748
86778
  dataIndex: "progress",
86749
- render: (progress) => {
86779
+ render: (progress, record) => {
86750
86780
  if (!progress) return null;
86781
+ const textColor = record.isSelected ? "white" : void 0;
86751
86782
  let firstBarData, secondBarData;
86752
86783
  if ("firstBarData" in progress) {
86753
86784
  firstBarData = progress.firstBarData;
@@ -86769,37 +86800,42 @@ const mockColumns = [
86769
86800
  secondBarData,
86770
86801
  width: 150,
86771
86802
  height: 20,
86772
- isProgressCombined: true
86803
+ isProgressCombined: true,
86804
+ overrideTextColor: textColor
86773
86805
  });
86774
86806
  }
86775
86807
  },
86776
86808
  {
86777
86809
  title: "Actions",
86778
86810
  key: "actions",
86779
- render: (record) => {
86811
+ render: (value2, record, index2) => {
86780
86812
  const menuItems = [
86781
86813
  {
86782
86814
  id: "edit",
86783
- children: "Edit",
86815
+ children: record.isSelected ? "Edit Selected" : "Edit",
86784
86816
  onClick: () => {
86785
86817
  console.log("Edit clicked for record:", record.id);
86818
+ console.log("Is selected:", record.isSelected);
86786
86819
  }
86787
86820
  },
86788
86821
  {
86789
86822
  id: "delete",
86790
- children: "Delete",
86823
+ children: record.isSelected ? "Delete Selected" : "Delete",
86791
86824
  onClick: () => {
86792
86825
  console.log("Delete clicked for record:", record.id);
86826
+ console.log("Is selected:", record.isSelected);
86793
86827
  }
86794
86828
  }
86795
86829
  ];
86830
+ const textColor = record.isSelected ? "white" : void 0;
86796
86831
  return React.createElement(OverflowMenu, {
86797
86832
  items: menuItems,
86798
86833
  onItemClick: (item) => {
86799
86834
  if (item.onClick) {
86800
86835
  item.onClick();
86801
86836
  }
86802
- }
86837
+ },
86838
+ overrideTextColor: textColor
86803
86839
  });
86804
86840
  }
86805
86841
  }
package/dist/index.js CHANGED
@@ -78940,7 +78940,7 @@ const MessageRow = styled.div`
78940
78940
  gap: ${({ theme }) => theme.sizing.Size4}px;
78941
78941
  padding: ${({ theme }) => theme.sizing.Size3}px;
78942
78942
  background-color: ${({ theme, state }) => theme.colors.status[state].surface};
78943
- width: ${({ theme, state, size }) => size === "standard" ? "320px" : "240px"};
78943
+ width: ${({ theme, state, size, isFullWidth }) => isFullWidth ? "100%" : size === "standard" ? "320px" : "240px"};
78944
78944
  pointer-events: none;
78945
78945
  cursor: default;
78946
78946
  border-radius: ${({ theme }) => theme.borderRadius.BorderRadiusSm}px;
@@ -78950,7 +78950,7 @@ const MessageContent = styled.div`
78950
78950
  align-items: center;
78951
78951
  gap: ${({ theme }) => theme.sizing.Size2}px;
78952
78952
  flex: 1;
78953
- max-width: ${({ size, action }) => size === "standard" || !action ? "320px" : "240px"};
78953
+ max-width: ${({ size, action, isFullWidth }) => isFullWidth ? "100%" : size === "standard" || !action ? "320px" : "240px"};
78954
78954
 
78955
78955
  .ant-typography {
78956
78956
  display: -webkit-box;
@@ -79017,7 +79017,8 @@ const Message = ({
79017
79017
  state = STATE.info,
79018
79018
  message: message2,
79019
79019
  action,
79020
- size = SIZE.standard
79020
+ size = SIZE.standard,
79021
+ isFullWidth = false
79021
79022
  }) => {
79022
79023
  const theme = useTheme$1();
79023
79024
  const color2 = getIconColor$1(state, theme);
@@ -79025,8 +79026,8 @@ const Message = ({
79025
79026
  const [linkColor, setLinkColor] = useState(
79026
79027
  theme.colors.interactive.link.active
79027
79028
  );
79028
- return /* @__PURE__ */ jsxs(MessageRow, { state, size, children: [
79029
- /* @__PURE__ */ jsxs(MessageContent, { action, size, children: [
79029
+ return /* @__PURE__ */ jsxs(MessageRow, { state, size, isFullWidth, children: [
79030
+ /* @__PURE__ */ jsxs(MessageContent, { action, size, isFullWidth, children: [
79030
79031
  getIcon(state, color2),
79031
79032
  /* @__PURE__ */ jsx(
79032
79033
  Typography,
@@ -81245,6 +81246,11 @@ const OverflowMenuItem = ({ children: children2, onClick }) => {
81245
81246
  const DefaultTrigger = () => {
81246
81247
  return /* @__PURE__ */ jsx(Button$1, { isIconButton: true, themeType: "secondary", size: "small", children: /* @__PURE__ */ jsx(HiDotsHorizontal, {}) });
81247
81248
  };
81249
+ const DefaultTriggerWithOverrideTextColor = ({
81250
+ overrideTextColor
81251
+ }) => {
81252
+ return /* @__PURE__ */ jsx(Button$1, { isIconButton: true, themeType: "secondary", size: "small", children: /* @__PURE__ */ jsx(HiDotsHorizontal, { style: { color: overrideTextColor } }) });
81253
+ };
81248
81254
  const OverflowMenu = forwardRef(
81249
81255
  ({
81250
81256
  items,
@@ -81257,7 +81263,8 @@ const OverflowMenu = forwardRef(
81257
81263
  offset: offset2 = 8,
81258
81264
  className,
81259
81265
  style: style2,
81260
- onItemClick
81266
+ onItemClick,
81267
+ overrideTextColor
81261
81268
  }, ref) => {
81262
81269
  const [internalIsOpen, setInternalIsOpen] = useState(false);
81263
81270
  const [isAnimating, setIsAnimating] = useState(false);
@@ -81352,7 +81359,12 @@ const OverflowMenu = forwardRef(
81352
81359
  );
81353
81360
  if (items && items.length > 0) {
81354
81361
  return /* @__PURE__ */ jsxs(OverflowMenuWrapper, { ref, children: [
81355
- /* @__PURE__ */ jsx("div", { ref: triggerRef, onClick: handleTriggerClick, children: trigger }),
81362
+ /* @__PURE__ */ jsx("div", { ref: triggerRef, onClick: handleTriggerClick, children: overrideTextColor ? /* @__PURE__ */ jsx(
81363
+ DefaultTriggerWithOverrideTextColor,
81364
+ {
81365
+ overrideTextColor
81366
+ }
81367
+ ) : trigger }),
81356
81368
  isOpen && /* @__PURE__ */ jsx(
81357
81369
  OverflowMenuContainer,
81358
81370
  {
@@ -81539,7 +81551,8 @@ const Progress = ({
81539
81551
  height = 24,
81540
81552
  isTextBeforeBar = false,
81541
81553
  isProgressCombined = false,
81542
- isSingleBarOverallSuccess = false
81554
+ isSingleBarOverallSuccess = false,
81555
+ overrideTextColor
81543
81556
  }) => {
81544
81557
  const theme = useTheme$1();
81545
81558
  const percent = firstBarData?.value || 0;
@@ -81573,7 +81586,7 @@ const Progress = ({
81573
81586
  alignItems: "center",
81574
81587
  width: percentDisplayWidth
81575
81588
  },
81576
- children: /* @__PURE__ */ jsxs(Typography, { color: textColor, variant: "digits3", children: [
81589
+ children: /* @__PURE__ */ jsxs(Typography, { color: overrideTextColor ?? textColor, variant: "digits3", children: [
81577
81590
  overallPercent,
81578
81591
  "%"
81579
81592
  ] })
@@ -81582,7 +81595,7 @@ const Progress = ({
81582
81595
  ] });
81583
81596
  }
81584
81597
  if (isProgressCombined) {
81585
- const combinedPercent = getCombinedPercent(firstBarData, secondBarData);
81598
+ const combinedPercent = getCombinedPercent(firstBarData, secondBarData || null);
81586
81599
  const textColor = Number(combinedPercent) === 100 ? "green" : "black";
81587
81600
  const adjustedFirstBar = secondBarData?.value === 100 ? 100 : firstBarData?.value || 0;
81588
81601
  const firstBarStrokeColor = theme?.colors?.inputs?.progress?.[firstBarData?.status || "info"];
@@ -81632,7 +81645,7 @@ const Progress = ({
81632
81645
  alignItems: "center",
81633
81646
  width: percentDisplayWidth
81634
81647
  },
81635
- children: /* @__PURE__ */ jsxs(Typography, { color: textColor, variant: "digits3", children: [
81648
+ children: /* @__PURE__ */ jsxs(Typography, { color: overrideTextColor ?? textColor, variant: "digits3", children: [
81636
81649
  combinedPercent,
81637
81650
  "%"
81638
81651
  ] })
@@ -84849,7 +84862,11 @@ const InfiniteScrollTable = ({
84849
84862
  [isFetchingNextPage, hasNextPage, fetchNextPage, scrollableNode]
84850
84863
  );
84851
84864
  const rawDataSource = data?.pages.flatMap((page) => page.docs) ?? [];
84852
- const dataSource = filterFn ? filterFn(rawDataSource) : rawDataSource;
84865
+ const filteredDataSource = filterFn ? filterFn(rawDataSource) : rawDataSource;
84866
+ const dataSource = filteredDataSource.map((record) => ({
84867
+ ...record,
84868
+ isSelected: selectedRowKeys.includes(record.id)
84869
+ }));
84853
84870
  const totalDocs = data?.pages?.[0]?.totalDocs ?? 0;
84854
84871
  useEffect(() => {
84855
84872
  if (onRowSelectionChange) {
@@ -85081,7 +85098,7 @@ function Table({
85081
85098
  title: infiniteScrollConfig.title,
85082
85099
  scrollHeight: infiniteScrollConfig.scrollHeight,
85083
85100
  scrollWidth: infiniteScrollConfig.scrollWidth,
85084
- onChange,
85101
+ onChange: isInfiniteScroll ? onChange : onChange,
85085
85102
  onRowSelectionChange,
85086
85103
  onDataChange,
85087
85104
  filterFn: infiniteScrollConfig.filterFn
@@ -85391,7 +85408,6 @@ const useTable = (useTableConfig) => {
85391
85408
  ]);
85392
85409
  const handleRowSelection = useCallback(
85393
85410
  (newSelectedRowKeys, newSelectedRows) => {
85394
- console.log("Row Selected:", newSelectedRowKeys, newSelectedRows);
85395
85411
  setSelectedRowKeys(newSelectedRowKeys);
85396
85412
  setSelectedRows(newSelectedRows);
85397
85413
  },
@@ -85416,8 +85432,19 @@ const useTable = (useTableConfig) => {
85416
85432
  onChange: handleRowSelection,
85417
85433
  getCheckboxProps: disableRowSelection
85418
85434
  };
85435
+ const enhancedDataSource = useMemo$1(() => {
85436
+ return data.dataSource.map((record) => {
85437
+ const isSelected = selectedRowKeys.includes(record.id);
85438
+ return {
85439
+ ...record,
85440
+ isSelected
85441
+ };
85442
+ });
85443
+ }, [data.dataSource, selectedRowKeys]);
85419
85444
  return {
85420
85445
  ...data,
85446
+ dataSource: enhancedDataSource,
85447
+ // Use enhanced data source instead of original
85421
85448
  isLoading,
85422
85449
  hasErrored,
85423
85450
  rowSelection,
@@ -86704,11 +86731,14 @@ const mockColumns = [
86704
86731
  {
86705
86732
  key: "address",
86706
86733
  title: "Address",
86707
- render: (appointment) => {
86708
- const {
86709
- address: { nickname, address }
86710
- } = appointment;
86711
- return nickname ? `${nickname} (${address})` : address;
86734
+ render: (appointment, record) => {
86735
+ const { address } = appointment;
86736
+ const textColor = record.isSelected ? "white" : "#6c6c6c";
86737
+ return React__default.createElement(Typography, {
86738
+ variant: "body2",
86739
+ children: typeof address === "string" ? address : JSON.stringify(address),
86740
+ color: `${textColor}`
86741
+ });
86712
86742
  }
86713
86743
  },
86714
86744
  {
@@ -86728,8 +86758,9 @@ const mockColumns = [
86728
86758
  {
86729
86759
  title: "Progress",
86730
86760
  dataIndex: "progress",
86731
- render: (progress) => {
86761
+ render: (progress, record) => {
86732
86762
  if (!progress) return null;
86763
+ const textColor = record.isSelected ? "white" : void 0;
86733
86764
  let firstBarData, secondBarData;
86734
86765
  if ("firstBarData" in progress) {
86735
86766
  firstBarData = progress.firstBarData;
@@ -86751,37 +86782,42 @@ const mockColumns = [
86751
86782
  secondBarData,
86752
86783
  width: 150,
86753
86784
  height: 20,
86754
- isProgressCombined: true
86785
+ isProgressCombined: true,
86786
+ overrideTextColor: textColor
86755
86787
  });
86756
86788
  }
86757
86789
  },
86758
86790
  {
86759
86791
  title: "Actions",
86760
86792
  key: "actions",
86761
- render: (record) => {
86793
+ render: (value2, record, index2) => {
86762
86794
  const menuItems = [
86763
86795
  {
86764
86796
  id: "edit",
86765
- children: "Edit",
86797
+ children: record.isSelected ? "Edit Selected" : "Edit",
86766
86798
  onClick: () => {
86767
86799
  console.log("Edit clicked for record:", record.id);
86800
+ console.log("Is selected:", record.isSelected);
86768
86801
  }
86769
86802
  },
86770
86803
  {
86771
86804
  id: "delete",
86772
- children: "Delete",
86805
+ children: record.isSelected ? "Delete Selected" : "Delete",
86773
86806
  onClick: () => {
86774
86807
  console.log("Delete clicked for record:", record.id);
86808
+ console.log("Is selected:", record.isSelected);
86775
86809
  }
86776
86810
  }
86777
86811
  ];
86812
+ const textColor = record.isSelected ? "white" : void 0;
86778
86813
  return React__default.createElement(OverflowMenu, {
86779
86814
  items: menuItems,
86780
86815
  onItemClick: (item) => {
86781
86816
  if (item.onClick) {
86782
86817
  item.onClick();
86783
86818
  }
86784
- }
86819
+ },
86820
+ overrideTextColor: textColor
86785
86821
  });
86786
86822
  }
86787
86823
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.4.24",
3
+ "version": "0.4.26",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",