@gobolt/genesis 0.4.25 → 0.4.27

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;
@@ -8,6 +8,7 @@ export interface SecondaryTableControlsRowProps {
8
8
  totalRecords: number | null;
9
9
  onChange?: Change;
10
10
  infiniteScrollData?: InfiniteScrollChangeEvent;
11
+ intialRowTotal?: number;
11
12
  }
12
- declare const SecondaryTableControlsRow: ({ groups, totalRecords, onChange, infiniteScrollData, }: SecondaryTableControlsRowProps) => import("react/jsx-runtime").JSX.Element;
13
+ declare const SecondaryTableControlsRow: ({ groups, totalRecords, onChange, infiniteScrollData, intialRowTotal, }: SecondaryTableControlsRowProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export default SecondaryTableControlsRow;
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,
@@ -81143,41 +81144,41 @@ const Notification = ({
81143
81144
  ] });
81144
81145
  };
81145
81146
  const slideDown = styled.keyframes`
81146
- from {
81147
+ 0% {
81147
81148
  opacity: 0;
81148
- transform: translateY(-4px) scale(0.98);
81149
+ transform: translateY(-6px) scale(0.96);
81149
81150
  }
81150
- to {
81151
+ 100% {
81151
81152
  opacity: 1;
81152
81153
  transform: translateY(0) scale(1);
81153
81154
  }
81154
81155
  `;
81155
81156
  const slideUp = styled.keyframes`
81156
- from {
81157
+ 0% {
81157
81158
  opacity: 0;
81158
- transform: translateY(4px) scale(0.98);
81159
+ transform: translateY(6px) scale(0.96);
81159
81160
  }
81160
- to {
81161
+ 100% {
81161
81162
  opacity: 1;
81162
81163
  transform: translateY(0) scale(1);
81163
81164
  }
81164
81165
  `;
81165
81166
  const slideLeft = styled.keyframes`
81166
- from {
81167
+ 0% {
81167
81168
  opacity: 0;
81168
- transform: translateX(4px) scale(0.98);
81169
+ transform: translateX(6px) scale(0.96);
81169
81170
  }
81170
- to {
81171
+ 100% {
81171
81172
  opacity: 1;
81172
81173
  transform: translateX(0) scale(1);
81173
81174
  }
81174
81175
  `;
81175
81176
  const slideRight = styled.keyframes`
81176
- from {
81177
+ 0% {
81177
81178
  opacity: 0;
81178
- transform: translateX(-4px) scale(0.98);
81179
+ transform: translateX(-6px) scale(0.96);
81179
81180
  }
81180
- to {
81181
+ 100% {
81181
81182
  opacity: 1;
81182
81183
  transform: translateX(0) scale(1);
81183
81184
  }
@@ -81207,7 +81208,7 @@ const OverflowMenuContainer = styled.div`
81207
81208
  margin: 0;
81208
81209
  padding: 0;
81209
81210
 
81210
- /* Animation based on placement */
81211
+ /* Animation based on placement with enhanced smoothness */
81211
81212
  animation: ${({ $placement, $isAnimating }) => {
81212
81213
  if (!$isAnimating) return "none";
81213
81214
  switch ($placement) {
@@ -81228,21 +81229,33 @@ const OverflowMenuContainer = styled.div`
81228
81229
  }
81229
81230
  }
81230
81231
  }}
81231
- 0.15s cubic-bezier(0.4, 0, 0.2, 1);
81232
+ 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
81232
81233
 
81233
- /* Ensure smooth transitions and prevent jank */
81234
+ /* Ensure ultra-smooth transitions without filter */
81234
81235
  transition:
81235
- opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1),
81236
- transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
81236
+ opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
81237
+ transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
81237
81238
 
81238
- /* Hardware acceleration for smoother animations */
81239
+ /* Hardware acceleration and performance optimizations */
81239
81240
  will-change: transform, opacity;
81240
81241
  backface-visibility: hidden;
81241
81242
  transform: translateZ(0);
81243
+ transform-style: preserve-3d;
81244
+
81245
+ /* Initial hidden state to prevent flash */
81246
+ ${({ $isAnimating }) => !$isAnimating && `
81247
+ opacity: 0;
81248
+ transform: scale(0.96) translateY(-6px);
81249
+ pointer-events: none;
81250
+ `}
81242
81251
 
81243
81252
  /* Prevent layout shifts and ensure smooth rendering */
81244
81253
  contain: layout style paint;
81245
81254
  isolation: isolate;
81255
+
81256
+ /* Smooth font rendering */
81257
+ -webkit-font-smoothing: antialiased;
81258
+ -moz-osx-font-smoothing: grayscale;
81246
81259
  `;
81247
81260
  const OverflowMenuItem$1 = styled.div`
81248
81261
  padding: 8px 12px;
@@ -81261,12 +81274,12 @@ const OverflowMenuItem = ({ children: children2, onClick }) => {
81261
81274
  return /* @__PURE__ */ jsxRuntime.jsx(OverflowMenuItem$1, { onClick, children: children2 });
81262
81275
  };
81263
81276
  const DefaultTrigger = () => {
81264
- return /* @__PURE__ */ jsxRuntime.jsx(Button$1, { isIconButton: true, themeType: "secondary", size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(HiDotsHorizontal, {}) });
81277
+ return /* @__PURE__ */ jsxRuntime.jsx(UtilityButton, { isIconButton: true, size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(HiDotsHorizontal, { size: 24 }) });
81265
81278
  };
81266
81279
  const DefaultTriggerWithOverrideTextColor = ({
81267
81280
  overrideTextColor
81268
81281
  }) => {
81269
- return /* @__PURE__ */ jsxRuntime.jsx(Button$1, { isIconButton: true, themeType: "secondary", size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(HiDotsHorizontal, { style: { color: overrideTextColor } }) });
81282
+ return /* @__PURE__ */ jsxRuntime.jsx(UtilityButton, { isIconButton: true, size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(HiDotsHorizontal, { style: { color: overrideTextColor }, size: 24 }) });
81270
81283
  };
81271
81284
  const OverflowMenu = React.forwardRef(
81272
81285
  ({
@@ -81612,7 +81625,7 @@ const Progress = ({
81612
81625
  ] });
81613
81626
  }
81614
81627
  if (isProgressCombined) {
81615
- const combinedPercent = getCombinedPercent(firstBarData, secondBarData);
81628
+ const combinedPercent = getCombinedPercent(firstBarData, secondBarData || null);
81616
81629
  const textColor = Number(combinedPercent) === 100 ? "green" : "black";
81617
81630
  const adjustedFirstBar = secondBarData?.value === 100 ? 100 : firstBarData?.value || 0;
81618
81631
  const firstBarStrokeColor = theme?.colors?.inputs?.progress?.[firstBarData?.status || "info"];
@@ -84223,6 +84236,11 @@ const getGenesisClass$1 = ({ colors: colors2, borderRadius: borderRadius2, sizin
84223
84236
  border-radius: 0 !important;
84224
84237
  }
84225
84238
 
84239
+ .ant-table-header {
84240
+ border-top-left-radius: 0 !important;
84241
+ border-top-right-radius: 0 !important;
84242
+ }
84243
+
84226
84244
  .ant-table {
84227
84245
  // Add your custom table styles here
84228
84246
  border-radius: 0 !important;
@@ -85682,8 +85700,10 @@ const SecondaryTableControlsRow = ({
85682
85700
  groups,
85683
85701
  totalRecords,
85684
85702
  onChange,
85685
- infiniteScrollData
85703
+ infiniteScrollData,
85704
+ intialRowTotal = 40
85686
85705
  }) => {
85706
+ const [hasChanged, setHasChanged] = React__namespace.useState(false);
85687
85707
  const onGroupItemClick = (title, item) => {
85688
85708
  const groupItemClickEvent = {
85689
85709
  event: "groupItemClick",
@@ -85691,19 +85711,71 @@ const SecondaryTableControlsRow = ({
85691
85711
  };
85692
85712
  onChange?.(groupItemClickEvent);
85693
85713
  };
85714
+ const handleClearFilters = () => {
85715
+ const clearFiltersEvent = {
85716
+ event: "clearFilters",
85717
+ payload: {}
85718
+ };
85719
+ onChange?.(clearFiltersEvent);
85720
+ };
85721
+ React__namespace.useEffect(() => {
85722
+ if (infiniteScrollData && infiniteScrollData?.resultsShown > intialRowTotal) {
85723
+ setHasChanged(true);
85724
+ }
85725
+ if (groups) {
85726
+ setHasChanged(true);
85727
+ }
85728
+ return () => {
85729
+ setHasChanged(false);
85730
+ };
85731
+ }, [infiniteScrollData, groups]);
85732
+ const isGroupsEmpty = groups ? Object.values(groups).every((items) => items.length === 0) : true;
85733
+ const isMoreThanInitial = infiniteScrollData && Number(infiniteScrollData?.resultsShown) > intialRowTotal || !isGroupsEmpty;
85694
85734
  return /* @__PURE__ */ jsxRuntime.jsxs(
85695
85735
  "div",
85696
85736
  {
85697
85737
  style: {
85698
85738
  display: "flex",
85699
- justifyContent: groups ? "space-between" : "flex-end",
85739
+ justifyContent: "space-between",
85700
85740
  alignItems: "flex-end",
85701
85741
  marginTop: 8
85702
85742
  },
85703
85743
  children: [
85704
- /* @__PURE__ */ jsxRuntime.jsx(GroupsRow, { groups, onGroupItemClick }),
85744
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { minWidth: 100 }, children: /* @__PURE__ */ jsxRuntime.jsx(GroupsRow, { groups, onGroupItemClick }) }),
85705
85745
  (totalRecords ?? 0) > 0 && !infiniteScrollData ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null,
85706
- infiniteScrollData ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${infiniteScrollData.resultsShown} results` }) : null
85746
+ /* @__PURE__ */ jsxRuntime.jsxs(
85747
+ "div",
85748
+ {
85749
+ style: {
85750
+ display: "flex",
85751
+ alignItems: "center",
85752
+ justifyContent: "center",
85753
+ gap: 16,
85754
+ marginRight: 16
85755
+ },
85756
+ children: [
85757
+ isMoreThanInitial && hasChanged ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", color: "#6C6C6C", children: `${infiniteScrollData?.resultsShown ?? intialRowTotal} results` }) : null,
85758
+ !isGroupsEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
85759
+ "button",
85760
+ {
85761
+ onClick: handleClearFilters,
85762
+ style: {
85763
+ background: "none",
85764
+ border: "none",
85765
+ padding: 0,
85766
+ margin: 0,
85767
+ cursor: "pointer",
85768
+ display: "flex",
85769
+ alignItems: "center",
85770
+ gap: 4
85771
+ },
85772
+ children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", color: "#30606B;", children: "Clear Filters" })
85773
+ }
85774
+ ) : null
85775
+ ]
85776
+ }
85777
+ ),
85778
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: 100, height: 0 } })
85707
85779
  ]
85708
85780
  }
85709
85781
  );
@@ -85719,30 +85791,37 @@ const TableControls = ({
85719
85791
  const onSecondaryChange = (actionEvent) => {
85720
85792
  onChange(actionEvent);
85721
85793
  };
85722
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "TableControls", style: { margin: "16px 0px" }, children: [
85723
- /* @__PURE__ */ jsxRuntime.jsx(
85724
- PrimaryTableControlsRow,
85725
- {
85726
- sortOptions: primaryTableRowData.sortOptions,
85727
- searchByPlaceholder: primaryTableRowData.searchByPlaceholder,
85728
- isSortedAscending: primaryTableRowData.isSortedAscending,
85729
- onChange: onPrimaryChange,
85730
- searchValue: primaryTableRowData.searchValue,
85731
- selectedSortOption: primaryTableRowData.selectedSortOption,
85732
- hasSettings: primaryTableRowData.hasSettings,
85733
- hasFilter: primaryTableRowData.hasFilter
85734
- }
85735
- ),
85736
- secondaryTableRowData ? /* @__PURE__ */ jsxRuntime.jsx(
85737
- SecondaryTableControlsRow,
85738
- {
85739
- groups: secondaryTableRowData.groups,
85740
- totalRecords: secondaryTableRowData.totalRecords,
85741
- onChange: onSecondaryChange,
85742
- infiniteScrollData: secondaryTableRowData.infiniteScrollData
85743
- }
85744
- ) : null
85745
- ] });
85794
+ return /* @__PURE__ */ jsxRuntime.jsxs(
85795
+ "div",
85796
+ {
85797
+ "data-testid": "TableControls",
85798
+ style: { paddingLeft: 20, paddingTop: 18, marginBottom: 16 },
85799
+ children: [
85800
+ /* @__PURE__ */ jsxRuntime.jsx(
85801
+ PrimaryTableControlsRow,
85802
+ {
85803
+ sortOptions: primaryTableRowData.sortOptions,
85804
+ searchByPlaceholder: primaryTableRowData.searchByPlaceholder,
85805
+ isSortedAscending: primaryTableRowData.isSortedAscending,
85806
+ onChange: onPrimaryChange,
85807
+ searchValue: primaryTableRowData.searchValue,
85808
+ selectedSortOption: primaryTableRowData.selectedSortOption,
85809
+ hasSettings: primaryTableRowData.hasSettings,
85810
+ hasFilter: primaryTableRowData.hasFilter
85811
+ }
85812
+ ),
85813
+ secondaryTableRowData ? /* @__PURE__ */ jsxRuntime.jsx(
85814
+ SecondaryTableControlsRow,
85815
+ {
85816
+ groups: secondaryTableRowData.groups,
85817
+ totalRecords: secondaryTableRowData.totalRecords,
85818
+ onChange: onSecondaryChange,
85819
+ infiniteScrollData: secondaryTableRowData.infiniteScrollData
85820
+ }
85821
+ ) : null
85822
+ ]
85823
+ }
85824
+ );
85746
85825
  };
85747
85826
  const TableWithControls = ({
85748
85827
  tableData,
@@ -86718,11 +86797,6 @@ const startCase = (string_) => {
86718
86797
  return string_;
86719
86798
  };
86720
86799
  const mockColumns = [
86721
- {
86722
- key: "number",
86723
- title: "Id",
86724
- dataIndex: "number"
86725
- },
86726
86800
  {
86727
86801
  key: "timeslot",
86728
86802
  title: "Timeslot",
@@ -86753,7 +86827,7 @@ const mockColumns = [
86753
86827
  const textColor = record.isSelected ? "white" : "#6c6c6c";
86754
86828
  return React.createElement(Typography, {
86755
86829
  variant: "body2",
86756
- children: address,
86830
+ children: typeof address === "string" ? address : JSON.stringify(address),
86757
86831
  color: `${textColor}`
86758
86832
  });
86759
86833
  }
@@ -87042,13 +87116,14 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
87042
87116
  float: none; /* Prevent default float behavior */
87043
87117
  position: relative;
87044
87118
 
87119
+
87045
87120
  /* Use single side borders to prevent double borders */
87046
87121
  border-left: 1px solid ${colors2.surface.border};
87047
87122
 
87048
87123
  margin-right: -2px;
87049
87124
  user-select: none;
87050
87125
  color: ${colors2.onsurface.copy};
87051
- font-family: Inter;
87126
+ font-family: 'Inter' !important;
87052
87127
  font-size: 14px;
87053
87128
  font-style: normal;
87054
87129
  font-weight: 500;
@@ -87072,7 +87147,8 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
87072
87147
  }
87073
87148
 
87074
87149
  .ant-tabs-tab-btn {
87075
- color: #3E3E3E;
87150
+ color: ${colors2.onsurface["copy"]} !important;
87151
+ font-weight: 500 !important;
87076
87152
  user-select: none;
87077
87153
  background: transparent;
87078
87154
 
@@ -87092,9 +87168,13 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
87092
87168
  &.ant-tabs-tab-active {
87093
87169
  background: ${colors2.interactive.utility?.active};
87094
87170
  user-select: none;
87171
+ font-weight: 500;
87172
+ font-size: 14px;
87173
+ font-family: 'Inter' !important;
87095
87174
 
87096
87175
  .ant-tabs-tab-btn {
87097
- color: #222222;
87176
+ color: ${colors2.onsurface["copy-dark"]} !important;
87177
+ font-weight: 500 !important;
87098
87178
  }
87099
87179
 
87100
87180
  &:hover {
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,
@@ -81125,41 +81126,41 @@ const Notification = ({
81125
81126
  ] });
81126
81127
  };
81127
81128
  const slideDown = keyframes`
81128
- from {
81129
+ 0% {
81129
81130
  opacity: 0;
81130
- transform: translateY(-4px) scale(0.98);
81131
+ transform: translateY(-6px) scale(0.96);
81131
81132
  }
81132
- to {
81133
+ 100% {
81133
81134
  opacity: 1;
81134
81135
  transform: translateY(0) scale(1);
81135
81136
  }
81136
81137
  `;
81137
81138
  const slideUp = keyframes`
81138
- from {
81139
+ 0% {
81139
81140
  opacity: 0;
81140
- transform: translateY(4px) scale(0.98);
81141
+ transform: translateY(6px) scale(0.96);
81141
81142
  }
81142
- to {
81143
+ 100% {
81143
81144
  opacity: 1;
81144
81145
  transform: translateY(0) scale(1);
81145
81146
  }
81146
81147
  `;
81147
81148
  const slideLeft = keyframes`
81148
- from {
81149
+ 0% {
81149
81150
  opacity: 0;
81150
- transform: translateX(4px) scale(0.98);
81151
+ transform: translateX(6px) scale(0.96);
81151
81152
  }
81152
- to {
81153
+ 100% {
81153
81154
  opacity: 1;
81154
81155
  transform: translateX(0) scale(1);
81155
81156
  }
81156
81157
  `;
81157
81158
  const slideRight = keyframes`
81158
- from {
81159
+ 0% {
81159
81160
  opacity: 0;
81160
- transform: translateX(-4px) scale(0.98);
81161
+ transform: translateX(-6px) scale(0.96);
81161
81162
  }
81162
- to {
81163
+ 100% {
81163
81164
  opacity: 1;
81164
81165
  transform: translateX(0) scale(1);
81165
81166
  }
@@ -81189,7 +81190,7 @@ const OverflowMenuContainer = styled.div`
81189
81190
  margin: 0;
81190
81191
  padding: 0;
81191
81192
 
81192
- /* Animation based on placement */
81193
+ /* Animation based on placement with enhanced smoothness */
81193
81194
  animation: ${({ $placement, $isAnimating }) => {
81194
81195
  if (!$isAnimating) return "none";
81195
81196
  switch ($placement) {
@@ -81210,21 +81211,33 @@ const OverflowMenuContainer = styled.div`
81210
81211
  }
81211
81212
  }
81212
81213
  }}
81213
- 0.15s cubic-bezier(0.4, 0, 0.2, 1);
81214
+ 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
81214
81215
 
81215
- /* Ensure smooth transitions and prevent jank */
81216
+ /* Ensure ultra-smooth transitions without filter */
81216
81217
  transition:
81217
- opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1),
81218
- transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
81218
+ opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
81219
+ transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
81219
81220
 
81220
- /* Hardware acceleration for smoother animations */
81221
+ /* Hardware acceleration and performance optimizations */
81221
81222
  will-change: transform, opacity;
81222
81223
  backface-visibility: hidden;
81223
81224
  transform: translateZ(0);
81225
+ transform-style: preserve-3d;
81226
+
81227
+ /* Initial hidden state to prevent flash */
81228
+ ${({ $isAnimating }) => !$isAnimating && `
81229
+ opacity: 0;
81230
+ transform: scale(0.96) translateY(-6px);
81231
+ pointer-events: none;
81232
+ `}
81224
81233
 
81225
81234
  /* Prevent layout shifts and ensure smooth rendering */
81226
81235
  contain: layout style paint;
81227
81236
  isolation: isolate;
81237
+
81238
+ /* Smooth font rendering */
81239
+ -webkit-font-smoothing: antialiased;
81240
+ -moz-osx-font-smoothing: grayscale;
81228
81241
  `;
81229
81242
  const OverflowMenuItem$1 = styled.div`
81230
81243
  padding: 8px 12px;
@@ -81243,12 +81256,12 @@ const OverflowMenuItem = ({ children: children2, onClick }) => {
81243
81256
  return /* @__PURE__ */ jsx(OverflowMenuItem$1, { onClick, children: children2 });
81244
81257
  };
81245
81258
  const DefaultTrigger = () => {
81246
- return /* @__PURE__ */ jsx(Button$1, { isIconButton: true, themeType: "secondary", size: "small", children: /* @__PURE__ */ jsx(HiDotsHorizontal, {}) });
81259
+ return /* @__PURE__ */ jsx(UtilityButton, { isIconButton: true, size: "small", children: /* @__PURE__ */ jsx(HiDotsHorizontal, { size: 24 }) });
81247
81260
  };
81248
81261
  const DefaultTriggerWithOverrideTextColor = ({
81249
81262
  overrideTextColor
81250
81263
  }) => {
81251
- return /* @__PURE__ */ jsx(Button$1, { isIconButton: true, themeType: "secondary", size: "small", children: /* @__PURE__ */ jsx(HiDotsHorizontal, { style: { color: overrideTextColor } }) });
81264
+ return /* @__PURE__ */ jsx(UtilityButton, { isIconButton: true, size: "small", children: /* @__PURE__ */ jsx(HiDotsHorizontal, { style: { color: overrideTextColor }, size: 24 }) });
81252
81265
  };
81253
81266
  const OverflowMenu = forwardRef(
81254
81267
  ({
@@ -81594,7 +81607,7 @@ const Progress = ({
81594
81607
  ] });
81595
81608
  }
81596
81609
  if (isProgressCombined) {
81597
- const combinedPercent = getCombinedPercent(firstBarData, secondBarData);
81610
+ const combinedPercent = getCombinedPercent(firstBarData, secondBarData || null);
81598
81611
  const textColor = Number(combinedPercent) === 100 ? "green" : "black";
81599
81612
  const adjustedFirstBar = secondBarData?.value === 100 ? 100 : firstBarData?.value || 0;
81600
81613
  const firstBarStrokeColor = theme?.colors?.inputs?.progress?.[firstBarData?.status || "info"];
@@ -84205,6 +84218,11 @@ const getGenesisClass$1 = ({ colors: colors2, borderRadius: borderRadius2, sizin
84205
84218
  border-radius: 0 !important;
84206
84219
  }
84207
84220
 
84221
+ .ant-table-header {
84222
+ border-top-left-radius: 0 !important;
84223
+ border-top-right-radius: 0 !important;
84224
+ }
84225
+
84208
84226
  .ant-table {
84209
84227
  // Add your custom table styles here
84210
84228
  border-radius: 0 !important;
@@ -85664,8 +85682,10 @@ const SecondaryTableControlsRow = ({
85664
85682
  groups,
85665
85683
  totalRecords,
85666
85684
  onChange,
85667
- infiniteScrollData
85685
+ infiniteScrollData,
85686
+ intialRowTotal = 40
85668
85687
  }) => {
85688
+ const [hasChanged, setHasChanged] = React.useState(false);
85669
85689
  const onGroupItemClick = (title, item) => {
85670
85690
  const groupItemClickEvent = {
85671
85691
  event: "groupItemClick",
@@ -85673,19 +85693,71 @@ const SecondaryTableControlsRow = ({
85673
85693
  };
85674
85694
  onChange?.(groupItemClickEvent);
85675
85695
  };
85696
+ const handleClearFilters = () => {
85697
+ const clearFiltersEvent = {
85698
+ event: "clearFilters",
85699
+ payload: {}
85700
+ };
85701
+ onChange?.(clearFiltersEvent);
85702
+ };
85703
+ React.useEffect(() => {
85704
+ if (infiniteScrollData && infiniteScrollData?.resultsShown > intialRowTotal) {
85705
+ setHasChanged(true);
85706
+ }
85707
+ if (groups) {
85708
+ setHasChanged(true);
85709
+ }
85710
+ return () => {
85711
+ setHasChanged(false);
85712
+ };
85713
+ }, [infiniteScrollData, groups]);
85714
+ const isGroupsEmpty = groups ? Object.values(groups).every((items) => items.length === 0) : true;
85715
+ const isMoreThanInitial = infiniteScrollData && Number(infiniteScrollData?.resultsShown) > intialRowTotal || !isGroupsEmpty;
85676
85716
  return /* @__PURE__ */ jsxs(
85677
85717
  "div",
85678
85718
  {
85679
85719
  style: {
85680
85720
  display: "flex",
85681
- justifyContent: groups ? "space-between" : "flex-end",
85721
+ justifyContent: "space-between",
85682
85722
  alignItems: "flex-end",
85683
85723
  marginTop: 8
85684
85724
  },
85685
85725
  children: [
85686
- /* @__PURE__ */ jsx(GroupsRow, { groups, onGroupItemClick }),
85726
+ /* @__PURE__ */ jsx("div", { style: { minWidth: 100 }, children: /* @__PURE__ */ jsx(GroupsRow, { groups, onGroupItemClick }) }),
85687
85727
  (totalRecords ?? 0) > 0 && !infiniteScrollData ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null,
85688
- infiniteScrollData ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${infiniteScrollData.resultsShown} results` }) : null
85728
+ /* @__PURE__ */ jsxs(
85729
+ "div",
85730
+ {
85731
+ style: {
85732
+ display: "flex",
85733
+ alignItems: "center",
85734
+ justifyContent: "center",
85735
+ gap: 16,
85736
+ marginRight: 16
85737
+ },
85738
+ children: [
85739
+ isMoreThanInitial && hasChanged ? /* @__PURE__ */ jsx(Typography, { variant: "body1", color: "#6C6C6C", children: `${infiniteScrollData?.resultsShown ?? intialRowTotal} results` }) : null,
85740
+ !isGroupsEmpty ? /* @__PURE__ */ jsx(
85741
+ "button",
85742
+ {
85743
+ onClick: handleClearFilters,
85744
+ style: {
85745
+ background: "none",
85746
+ border: "none",
85747
+ padding: 0,
85748
+ margin: 0,
85749
+ cursor: "pointer",
85750
+ display: "flex",
85751
+ alignItems: "center",
85752
+ gap: 4
85753
+ },
85754
+ children: /* @__PURE__ */ jsx(Typography, { variant: "body1", color: "#30606B;", children: "Clear Filters" })
85755
+ }
85756
+ ) : null
85757
+ ]
85758
+ }
85759
+ ),
85760
+ /* @__PURE__ */ jsx("div", { style: { width: 100, height: 0 } })
85689
85761
  ]
85690
85762
  }
85691
85763
  );
@@ -85701,30 +85773,37 @@ const TableControls = ({
85701
85773
  const onSecondaryChange = (actionEvent) => {
85702
85774
  onChange(actionEvent);
85703
85775
  };
85704
- return /* @__PURE__ */ jsxs("div", { "data-testid": "TableControls", style: { margin: "16px 0px" }, children: [
85705
- /* @__PURE__ */ jsx(
85706
- PrimaryTableControlsRow,
85707
- {
85708
- sortOptions: primaryTableRowData.sortOptions,
85709
- searchByPlaceholder: primaryTableRowData.searchByPlaceholder,
85710
- isSortedAscending: primaryTableRowData.isSortedAscending,
85711
- onChange: onPrimaryChange,
85712
- searchValue: primaryTableRowData.searchValue,
85713
- selectedSortOption: primaryTableRowData.selectedSortOption,
85714
- hasSettings: primaryTableRowData.hasSettings,
85715
- hasFilter: primaryTableRowData.hasFilter
85716
- }
85717
- ),
85718
- secondaryTableRowData ? /* @__PURE__ */ jsx(
85719
- SecondaryTableControlsRow,
85720
- {
85721
- groups: secondaryTableRowData.groups,
85722
- totalRecords: secondaryTableRowData.totalRecords,
85723
- onChange: onSecondaryChange,
85724
- infiniteScrollData: secondaryTableRowData.infiniteScrollData
85725
- }
85726
- ) : null
85727
- ] });
85776
+ return /* @__PURE__ */ jsxs(
85777
+ "div",
85778
+ {
85779
+ "data-testid": "TableControls",
85780
+ style: { paddingLeft: 20, paddingTop: 18, marginBottom: 16 },
85781
+ children: [
85782
+ /* @__PURE__ */ jsx(
85783
+ PrimaryTableControlsRow,
85784
+ {
85785
+ sortOptions: primaryTableRowData.sortOptions,
85786
+ searchByPlaceholder: primaryTableRowData.searchByPlaceholder,
85787
+ isSortedAscending: primaryTableRowData.isSortedAscending,
85788
+ onChange: onPrimaryChange,
85789
+ searchValue: primaryTableRowData.searchValue,
85790
+ selectedSortOption: primaryTableRowData.selectedSortOption,
85791
+ hasSettings: primaryTableRowData.hasSettings,
85792
+ hasFilter: primaryTableRowData.hasFilter
85793
+ }
85794
+ ),
85795
+ secondaryTableRowData ? /* @__PURE__ */ jsx(
85796
+ SecondaryTableControlsRow,
85797
+ {
85798
+ groups: secondaryTableRowData.groups,
85799
+ totalRecords: secondaryTableRowData.totalRecords,
85800
+ onChange: onSecondaryChange,
85801
+ infiniteScrollData: secondaryTableRowData.infiniteScrollData
85802
+ }
85803
+ ) : null
85804
+ ]
85805
+ }
85806
+ );
85728
85807
  };
85729
85808
  const TableWithControls = ({
85730
85809
  tableData,
@@ -86700,11 +86779,6 @@ const startCase = (string_) => {
86700
86779
  return string_;
86701
86780
  };
86702
86781
  const mockColumns = [
86703
- {
86704
- key: "number",
86705
- title: "Id",
86706
- dataIndex: "number"
86707
- },
86708
86782
  {
86709
86783
  key: "timeslot",
86710
86784
  title: "Timeslot",
@@ -86735,7 +86809,7 @@ const mockColumns = [
86735
86809
  const textColor = record.isSelected ? "white" : "#6c6c6c";
86736
86810
  return React__default.createElement(Typography, {
86737
86811
  variant: "body2",
86738
- children: address,
86812
+ children: typeof address === "string" ? address : JSON.stringify(address),
86739
86813
  color: `${textColor}`
86740
86814
  });
86741
86815
  }
@@ -87024,13 +87098,14 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
87024
87098
  float: none; /* Prevent default float behavior */
87025
87099
  position: relative;
87026
87100
 
87101
+
87027
87102
  /* Use single side borders to prevent double borders */
87028
87103
  border-left: 1px solid ${colors2.surface.border};
87029
87104
 
87030
87105
  margin-right: -2px;
87031
87106
  user-select: none;
87032
87107
  color: ${colors2.onsurface.copy};
87033
- font-family: Inter;
87108
+ font-family: 'Inter' !important;
87034
87109
  font-size: 14px;
87035
87110
  font-style: normal;
87036
87111
  font-weight: 500;
@@ -87054,7 +87129,8 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
87054
87129
  }
87055
87130
 
87056
87131
  .ant-tabs-tab-btn {
87057
- color: #3E3E3E;
87132
+ color: ${colors2.onsurface["copy"]} !important;
87133
+ font-weight: 500 !important;
87058
87134
  user-select: none;
87059
87135
  background: transparent;
87060
87136
 
@@ -87074,9 +87150,13 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
87074
87150
  &.ant-tabs-tab-active {
87075
87151
  background: ${colors2.interactive.utility?.active};
87076
87152
  user-select: none;
87153
+ font-weight: 500;
87154
+ font-size: 14px;
87155
+ font-family: 'Inter' !important;
87077
87156
 
87078
87157
  .ant-tabs-tab-btn {
87079
- color: #222222;
87158
+ color: ${colors2.onsurface["copy-dark"]} !important;
87159
+ font-weight: 500 !important;
87080
87160
  }
87081
87161
 
87082
87162
  &:hover {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.4.25",
3
+ "version": "0.4.27",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",