@moderneinc/design-system-components 7.7.0-next.c204d5 → 7.7.0-next.c4ad8d

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.
package/dist/index.js CHANGED
@@ -3394,6 +3394,13 @@ const ModLoadingSpinner = ({
3394
3394
  };
3395
3395
  ModLoadingSpinner.displayName = "ModLoadingSpinner";
3396
3396
 
3397
+ const formatCount = (value, locales) => new Intl.NumberFormat(locales).format(value);
3398
+ const paginationRangeLabel = (page, pageSize, rowCount, locales) => {
3399
+ const start = page * pageSize + 1;
3400
+ const end = Math.min((page + 1) * pageSize, rowCount);
3401
+ return `${formatCount(start, locales)}-${formatCount(end, locales)} of ${formatCount(rowCount, locales)}`;
3402
+ };
3403
+
3397
3404
  const StyledFooter = styles.styled(Box, {
3398
3405
  shouldForwardProp: (prop) => prop !== "showShadow"
3399
3406
  })(({ theme, showShadow = false }) => ({
@@ -3517,10 +3524,7 @@ const ModFooter = ({
3517
3524
  return paginationInfo;
3518
3525
  }
3519
3526
  if (paginationModel && rowCount > 0) {
3520
- const { page, pageSize } = paginationModel;
3521
- const start = page * pageSize + 1;
3522
- const end = Math.min((page + 1) * pageSize, rowCount);
3523
- return `${start}-${end} of ${rowCount}`;
3527
+ return paginationRangeLabel(paginationModel.page, paginationModel.pageSize, rowCount);
3524
3528
  }
3525
3529
  return "0-0 of 0";
3526
3530
  };
@@ -3600,7 +3604,7 @@ const ModFooter = ({
3600
3604
  }
3601
3605
  return /* @__PURE__ */ jsxRuntime.jsxs(StyledFooter, { showShadow, sx: { justifyContent: "space-between" }, children: [
3602
3606
  showSelected ? /* @__PURE__ */ jsxRuntime.jsxs(SelectedText, { children: [
3603
- selectedCount,
3607
+ formatCount(selectedCount),
3604
3608
  " selected"
3605
3609
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(Box, {}),
3606
3610
  /* @__PURE__ */ jsxRuntime.jsxs(PaginationContainer, { children: [
@@ -4870,8 +4874,10 @@ const ModTooltip = ({
4870
4874
  children,
4871
4875
  arrow = false,
4872
4876
  placement,
4877
+ describeChild,
4873
4878
  ...props
4874
4879
  }) => {
4880
+ const accessibleName = typeof title === "string" && !description && !describeChild ? title : void 0;
4875
4881
  const titleContent = description ? /* @__PURE__ */ jsxRuntime.jsxs(Stack, { sx: { gap: `${designSystemTokens.spacing.spacing_1_4}px` }, children: [
4876
4882
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "inherit", sx: { fontWeight: designSystemTokens.typography.fontWeight.semiBold }, children: title }),
4877
4883
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "inherit", children: description })
@@ -4883,6 +4889,8 @@ const ModTooltip = ({
4883
4889
  title: titleContent,
4884
4890
  arrow,
4885
4891
  placement,
4892
+ describeChild,
4893
+ "aria-label": accessibleName,
4886
4894
  ...props,
4887
4895
  children
4888
4896
  }