@gobolt/genesis 0.4.38 → 0.4.40

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.
@@ -12,6 +12,7 @@ export interface SecondaryTableControlsRowProps {
12
12
  intialRowTotal?: number;
13
13
  hasExternalFilters?: boolean;
14
14
  getCustomIcon?: (title: string) => React.ReactNode | null;
15
+ filteredResultsCount?: number;
15
16
  }
16
- declare const SecondaryTableControlsRow: ({ groups, totalRecords, onChange, infiniteScrollData, intialRowTotal, hasExternalFilters, getCustomIcon, }: SecondaryTableControlsRowProps) => import("react/jsx-runtime").JSX.Element;
17
+ declare const SecondaryTableControlsRow: ({ groups, totalRecords, onChange, infiniteScrollData, intialRowTotal, hasExternalFilters, getCustomIcon, filteredResultsCount, }: SecondaryTableControlsRowProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export default SecondaryTableControlsRow;
package/dist/index.cjs CHANGED
@@ -59296,12 +59296,17 @@ const Avatar$1 = styled(Avatar$2)`
59296
59296
  return getGenesisClass$d(theme, type4, state);
59297
59297
  }}
59298
59298
  `;
59299
+ const getBreakpoint = (breakpoint) => {
59300
+ {
59301
+ return "medium";
59302
+ }
59303
+ };
59299
59304
  const getVariant$2 = (typography2, variant, breakpoint) => {
59300
59305
  return `
59301
- font-size: ${typography2[breakpoint][variant].fontSize}px !important;
59302
- line-height: ${typography2[breakpoint][variant].lineHeight};
59303
- letter-spacing: ${typography2[breakpoint][variant].letterSpacing}px;
59304
- font-weight: ${typography2[breakpoint][variant].fontWeight};
59306
+ font-size: ${typography2[getBreakpoint()][variant].fontSize}px !important;
59307
+ line-height: ${typography2[getBreakpoint()][variant].lineHeight};
59308
+ letter-spacing: ${typography2[getBreakpoint()][variant].letterSpacing}px;
59309
+ font-weight: ${typography2[getBreakpoint()][variant].fontWeight};
59305
59310
  `;
59306
59311
  };
59307
59312
  const getColor = (color2, colors2, $themeType) => {
@@ -59319,7 +59324,7 @@ const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 },
59319
59324
  &.ant-typography {
59320
59325
  font-family: ${getFontFamily(variant)};
59321
59326
  color: ${getColor(color2, colors2, $themeType)} !important;
59322
- ${getVariant$2(typography2, variant, breakpoint)}
59327
+ ${getVariant$2(typography2, variant)}
59323
59328
  margin-bottom: 0 !important;
59324
59329
  width: ${$isFullWidth ? "100%" : "auto"};
59325
59330
  line-height: 1;
@@ -85797,7 +85802,8 @@ const SecondaryTableControlsRow = ({
85797
85802
  infiniteScrollData,
85798
85803
  intialRowTotal = 40,
85799
85804
  hasExternalFilters = false,
85800
- getCustomIcon
85805
+ getCustomIcon,
85806
+ filteredResultsCount
85801
85807
  }) => {
85802
85808
  const [hasChanged, setHasChanged] = React__namespace.useState(false);
85803
85809
  const onGroupItemClick = (title, item) => {
@@ -85829,7 +85835,7 @@ const SecondaryTableControlsRow = ({
85829
85835
  };
85830
85836
  }, [infiniteScrollData, groups, hasExternalFilters]);
85831
85837
  const isGroupsEmpty = groups ? Object.values(groups).every((items) => items.length === 0) : true;
85832
- const isMoreThanInitial = infiniteScrollData && Number(infiniteScrollData?.resultsShown) > intialRowTotal || !isGroupsEmpty;
85838
+ infiniteScrollData && Number(infiniteScrollData?.resultsShown) > intialRowTotal || !isGroupsEmpty;
85833
85839
  return /* @__PURE__ */ jsxRuntime.jsxs(
85834
85840
  "div",
85835
85841
  {
@@ -85848,7 +85854,6 @@ const SecondaryTableControlsRow = ({
85848
85854
  getCustomIcon
85849
85855
  }
85850
85856
  ) }),
85851
- (totalRecords ?? 0) > 0 && !infiniteScrollData ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null,
85852
85857
  /* @__PURE__ */ jsxRuntime.jsxs(
85853
85858
  "div",
85854
85859
  {
@@ -85860,7 +85865,7 @@ const SecondaryTableControlsRow = ({
85860
85865
  marginRight: 16
85861
85866
  },
85862
85867
  children: [
85863
- isMoreThanInitial && hasChanged ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body3", color: "#6C6C6C", children: `${infiniteScrollData?.resultsShown ?? intialRowTotal} results` }) : null,
85868
+ filteredResultsCount && hasChanged ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body3", color: "#6C6C6C", children: `${filteredResultsCount} results` }) : null,
85864
85869
  !isGroupsEmpty || hasExternalFilters ? /* @__PURE__ */ jsxRuntime.jsx(
85865
85870
  "button",
85866
85871
  {
@@ -85923,7 +85928,9 @@ const TableControls = ({
85923
85928
  onChange: onSecondaryChange,
85924
85929
  infiniteScrollData: secondaryTableRowData.infiniteScrollData,
85925
85930
  hasExternalFilters: secondaryTableRowData.hasExternalFilters,
85926
- intialRowTotal: secondaryTableRowData.intialRowTotal
85931
+ intialRowTotal: secondaryTableRowData.intialRowTotal,
85932
+ filteredResultsCount: secondaryTableRowData.filteredResultsCount,
85933
+ getCustomIcon: secondaryTableRowData.getCustomIcon
85927
85934
  }
85928
85935
  ) : null
85929
85936
  ]
package/dist/index.js CHANGED
@@ -59278,12 +59278,17 @@ const Avatar$1 = styled(Avatar$2)`
59278
59278
  return getGenesisClass$d(theme, type4, state);
59279
59279
  }}
59280
59280
  `;
59281
+ const getBreakpoint = (breakpoint) => {
59282
+ {
59283
+ return "medium";
59284
+ }
59285
+ };
59281
59286
  const getVariant$2 = (typography2, variant, breakpoint) => {
59282
59287
  return `
59283
- font-size: ${typography2[breakpoint][variant].fontSize}px !important;
59284
- line-height: ${typography2[breakpoint][variant].lineHeight};
59285
- letter-spacing: ${typography2[breakpoint][variant].letterSpacing}px;
59286
- font-weight: ${typography2[breakpoint][variant].fontWeight};
59288
+ font-size: ${typography2[getBreakpoint()][variant].fontSize}px !important;
59289
+ line-height: ${typography2[getBreakpoint()][variant].lineHeight};
59290
+ letter-spacing: ${typography2[getBreakpoint()][variant].letterSpacing}px;
59291
+ font-weight: ${typography2[getBreakpoint()][variant].fontWeight};
59287
59292
  `;
59288
59293
  };
59289
59294
  const getColor = (color2, colors2, $themeType) => {
@@ -59301,7 +59306,7 @@ const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 },
59301
59306
  &.ant-typography {
59302
59307
  font-family: ${getFontFamily(variant)};
59303
59308
  color: ${getColor(color2, colors2, $themeType)} !important;
59304
- ${getVariant$2(typography2, variant, breakpoint)}
59309
+ ${getVariant$2(typography2, variant)}
59305
59310
  margin-bottom: 0 !important;
59306
59311
  width: ${$isFullWidth ? "100%" : "auto"};
59307
59312
  line-height: 1;
@@ -85779,7 +85784,8 @@ const SecondaryTableControlsRow = ({
85779
85784
  infiniteScrollData,
85780
85785
  intialRowTotal = 40,
85781
85786
  hasExternalFilters = false,
85782
- getCustomIcon
85787
+ getCustomIcon,
85788
+ filteredResultsCount
85783
85789
  }) => {
85784
85790
  const [hasChanged, setHasChanged] = React.useState(false);
85785
85791
  const onGroupItemClick = (title, item) => {
@@ -85811,7 +85817,7 @@ const SecondaryTableControlsRow = ({
85811
85817
  };
85812
85818
  }, [infiniteScrollData, groups, hasExternalFilters]);
85813
85819
  const isGroupsEmpty = groups ? Object.values(groups).every((items) => items.length === 0) : true;
85814
- const isMoreThanInitial = infiniteScrollData && Number(infiniteScrollData?.resultsShown) > intialRowTotal || !isGroupsEmpty;
85820
+ infiniteScrollData && Number(infiniteScrollData?.resultsShown) > intialRowTotal || !isGroupsEmpty;
85815
85821
  return /* @__PURE__ */ jsxs(
85816
85822
  "div",
85817
85823
  {
@@ -85830,7 +85836,6 @@ const SecondaryTableControlsRow = ({
85830
85836
  getCustomIcon
85831
85837
  }
85832
85838
  ) }),
85833
- (totalRecords ?? 0) > 0 && !infiniteScrollData ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null,
85834
85839
  /* @__PURE__ */ jsxs(
85835
85840
  "div",
85836
85841
  {
@@ -85842,7 +85847,7 @@ const SecondaryTableControlsRow = ({
85842
85847
  marginRight: 16
85843
85848
  },
85844
85849
  children: [
85845
- isMoreThanInitial && hasChanged ? /* @__PURE__ */ jsx(Typography, { variant: "body3", color: "#6C6C6C", children: `${infiniteScrollData?.resultsShown ?? intialRowTotal} results` }) : null,
85850
+ filteredResultsCount && hasChanged ? /* @__PURE__ */ jsx(Typography, { variant: "body3", color: "#6C6C6C", children: `${filteredResultsCount} results` }) : null,
85846
85851
  !isGroupsEmpty || hasExternalFilters ? /* @__PURE__ */ jsx(
85847
85852
  "button",
85848
85853
  {
@@ -85905,7 +85910,9 @@ const TableControls = ({
85905
85910
  onChange: onSecondaryChange,
85906
85911
  infiniteScrollData: secondaryTableRowData.infiniteScrollData,
85907
85912
  hasExternalFilters: secondaryTableRowData.hasExternalFilters,
85908
- intialRowTotal: secondaryTableRowData.intialRowTotal
85913
+ intialRowTotal: secondaryTableRowData.intialRowTotal,
85914
+ filteredResultsCount: secondaryTableRowData.filteredResultsCount,
85915
+ getCustomIcon: secondaryTableRowData.getCustomIcon
85909
85916
  }
85910
85917
  ) : null
85911
85918
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.4.38",
3
+ "version": "0.4.40",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",