@carto/meridian-ds 2.5.5 → 2.6.0-alpha-searchfield.1

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.
Files changed (100) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{Alert-lLA0z7fX.js → Alert-C1VgP3N1.js} +20 -77
  3. package/dist/{Alert-BdmDjcVc.cjs → Alert-F8G9P271.cjs} +22 -79
  4. package/dist/{MenuItem-nokUtiks.cjs → MenuItem-Bssr5qGq.cjs} +6 -6
  5. package/dist/{MenuItem-ZNdBUBvt.js → MenuItem-COajCLkS.js} +1 -1
  6. package/dist/{SwatchSquare-CaaLsjAC.js → Search-C7wkXu3f.js} +4 -23
  7. package/dist/{SwatchSquare-B8PIY3Rd.cjs → Search-CMWbM9nD.cjs} +3 -22
  8. package/dist/SwatchSquare-B6KYVoqV.js +24 -0
  9. package/dist/SwatchSquare-DuXPIL7t.cjs +23 -0
  10. package/dist/components/index.cjs +457 -112
  11. package/dist/components/index.js +397 -52
  12. package/dist/{TablePaginationActions-DAMGtIub.cjs → css-utils-CqIN_t7x.cjs} +126 -55
  13. package/dist/{TablePaginationActions-C6TVGJM-.js → css-utils-hxI-qUxK.js} +129 -58
  14. package/dist/custom-icons/index.cjs +3 -2
  15. package/dist/custom-icons/index.js +3 -2
  16. package/dist/theme/index.cjs +108 -114
  17. package/dist/theme/index.js +7 -13
  18. package/dist/types/components/AccordionGroup/AccordionGroup.d.ts +4 -1
  19. package/dist/types/components/AccordionGroup/AccordionGroup.d.ts.map +1 -1
  20. package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts +39 -9
  21. package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts.map +1 -1
  22. package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts +2 -0
  23. package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts.map +1 -0
  24. package/dist/types/components/AppBar/AppBar.d.ts +3 -1
  25. package/dist/types/components/AppBar/AppBar.d.ts.map +1 -1
  26. package/dist/types/components/AppBar/AppBar.stories.d.ts +2 -2
  27. package/dist/types/components/AppBar/AppBar.stories.d.ts.map +1 -1
  28. package/dist/types/components/AppBar/AppBar.test.d.ts +2 -0
  29. package/dist/types/components/AppBar/AppBar.test.d.ts.map +1 -0
  30. package/dist/types/components/Avatar/Avatar.d.ts +4 -1
  31. package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
  32. package/dist/types/components/Avatar/Avatar.stories.d.ts +1 -2
  33. package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
  34. package/dist/types/components/Avatar/Avatar.test.d.ts +2 -0
  35. package/dist/types/components/Avatar/Avatar.test.d.ts.map +1 -0
  36. package/dist/types/components/Button/Button.d.ts +5 -0
  37. package/dist/types/components/Button/Button.d.ts.map +1 -1
  38. package/dist/types/components/Button/Button.stories.d.ts +3 -0
  39. package/dist/types/components/Button/Button.stories.d.ts.map +1 -1
  40. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +117 -0
  41. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts.map +1 -0
  42. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +66 -0
  43. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +1 -0
  44. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts +2 -0
  45. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts.map +1 -0
  46. package/dist/types/components/EllipsisWithTooltip/index.d.ts +3 -0
  47. package/dist/types/components/EllipsisWithTooltip/index.d.ts.map +1 -0
  48. package/dist/types/components/Link/Link.d.ts +5 -0
  49. package/dist/types/components/Link/Link.d.ts.map +1 -1
  50. package/dist/types/components/Link/Link.stories.d.ts +9 -27
  51. package/dist/types/components/Link/Link.stories.d.ts.map +1 -1
  52. package/dist/types/components/SearchField/SearchField.d.ts +32 -0
  53. package/dist/types/components/SearchField/SearchField.d.ts.map +1 -0
  54. package/dist/types/components/SearchField/SearchField.stories.d.ts +123 -0
  55. package/dist/types/components/SearchField/SearchField.stories.d.ts.map +1 -0
  56. package/dist/types/components/SearchField/index.d.ts +3 -0
  57. package/dist/types/components/SearchField/index.d.ts.map +1 -0
  58. package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts +5 -2
  59. package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts.map +1 -1
  60. package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts +72 -0
  61. package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts.map +1 -0
  62. package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts +2 -0
  63. package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts.map +1 -0
  64. package/dist/types/components/Tag/Tag.d.ts +176 -4
  65. package/dist/types/components/Tag/Tag.d.ts.map +1 -1
  66. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -2
  67. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -1
  68. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +2 -2
  69. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts.map +1 -1
  70. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts +2 -0
  71. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts.map +1 -0
  72. package/dist/types/components/TooltipData/TooltipData.d.ts.map +1 -1
  73. package/dist/types/components/TooltipData/TooltipData.stories.d.ts +34 -0
  74. package/dist/types/components/TooltipData/TooltipData.stories.d.ts.map +1 -0
  75. package/dist/types/components/TooltipData/TooltipData.test.d.ts +2 -0
  76. package/dist/types/components/TooltipData/TooltipData.test.d.ts.map +1 -0
  77. package/dist/types/components/index.d.ts +4 -0
  78. package/dist/types/components/index.d.ts.map +1 -1
  79. package/dist/types/localization/en.d.ts +1 -0
  80. package/dist/types/localization/en.d.ts.map +1 -1
  81. package/dist/types/localization/es.d.ts +1 -0
  82. package/dist/types/localization/es.d.ts.map +1 -1
  83. package/dist/types/localization/id.d.ts +1 -0
  84. package/dist/types/localization/id.d.ts.map +1 -1
  85. package/dist/types/localization/index.d.ts +3 -0
  86. package/dist/types/localization/index.d.ts.map +1 -1
  87. package/dist/types/theme/components/forms.d.ts.map +1 -1
  88. package/dist/types/theme/components/stories/Tooltip.stories.d.ts +0 -3
  89. package/dist/types/theme/components/stories/Tooltip.stories.d.ts.map +1 -1
  90. package/dist/types/utils/css-utils.d.ts +14 -0
  91. package/dist/types/utils/css-utils.d.ts.map +1 -0
  92. package/dist/types/utils/useTranslationFallback.d.ts +20 -0
  93. package/dist/types/utils/useTranslationFallback.d.ts.map +1 -0
  94. package/dist/types/utils/useTranslationFallback.test.d.ts +2 -0
  95. package/dist/types/utils/useTranslationFallback.test.d.ts.map +1 -0
  96. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +1 -1
  97. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +1 -1
  98. package/dist/widgets/index.cjs +120 -124
  99. package/dist/widgets/index.js +6 -10
  100. package/package.json +1 -1
@@ -782,6 +782,31 @@ const MENU_LIST_MAX_SIZE = 312;
782
782
  const MENU_ITEM_SIZE_DENSE = 24;
783
783
  const MENU_ITEM_SIZE_DEFAULT = 32;
784
784
  const MENU_ITEM_SIZE_EXTENDED = 48;
785
+ const FontWeight = {
786
+ regular: 400,
787
+ medium: 500,
788
+ strong: 600
789
+ };
790
+ function _Typography({ italic, weight, style, children, ...otherProps }, ref) {
791
+ const fontConfiguration = {
792
+ fontWeight: FontWeight[weight],
793
+ fontStyle: italic ? "italic" : void 0
794
+ };
795
+ return /* @__PURE__ */ jsxRuntime.jsx(
796
+ material.Typography,
797
+ {
798
+ ...otherProps,
799
+ ref,
800
+ style: {
801
+ ...fontConfiguration,
802
+ ...style
803
+ },
804
+ "data-name": "typography",
805
+ children
806
+ }
807
+ );
808
+ }
809
+ const Typography = React.forwardRef(_Typography);
785
810
  const en = {
786
811
  c4r: {
787
812
  button: {
@@ -793,10 +818,11 @@ const en = {
793
818
  copy: "Copy",
794
819
  save: "Save",
795
820
  add: "Add",
821
+ clear: "Clear",
796
822
  showOptions: "Show options",
797
823
  hide: "Hide",
798
824
  show: "Show",
799
- opensInNewTab: "Opens in new tab"
825
+ opensInNewTab: "(Opens in new tab)"
800
826
  },
801
827
  form: {
802
828
  selectAll: "Select all",
@@ -942,10 +968,11 @@ const es = {
942
968
  copy: "Copiar",
943
969
  save: "Guardar",
944
970
  add: "Añadir",
971
+ clear: "Borrar",
945
972
  showOptions: "Mostrar opciones",
946
973
  hide: "Ocultar",
947
974
  show: "Mostrar",
948
- opensInNewTab: "Abre en una nueva pestaña"
975
+ opensInNewTab: "(Abre en una nueva pestaña)"
949
976
  },
950
977
  form: {
951
978
  selectAll: "Seleccionar todos",
@@ -1089,10 +1116,11 @@ const id = {
1089
1116
  copy: "Salin",
1090
1117
  save: "Simpan",
1091
1118
  add: "Tambah",
1119
+ clear: "Bersihkan",
1092
1120
  showOptions: "Tampilkan opsi",
1093
1121
  hide: "Sembunyikan",
1094
1122
  show: "Tampilkan",
1095
- opensInNewTab: "Buka di tab baru"
1123
+ opensInNewTab: "(Buka di tab baru)"
1096
1124
  },
1097
1125
  form: {
1098
1126
  selectAll: "Select all",
@@ -5566,48 +5594,78 @@ const getGloballyCachedIntl = (intlConfig) => {
5566
5594
  function useImperativeIntl(intlConfig) {
5567
5595
  return getGloballyCachedIntl(intlConfig);
5568
5596
  }
5569
- const FontWeight = {
5570
- regular: 400,
5571
- medium: 500,
5572
- strong: 600
5573
- };
5574
- function _Typography({ italic, weight, style, children, ...otherProps }, ref) {
5575
- const fontConfiguration = {
5576
- fontWeight: FontWeight[weight],
5577
- fontStyle: italic ? "italic" : void 0
5578
- };
5579
- return /* @__PURE__ */ jsxRuntime.jsx(
5580
- material.Typography,
5597
+ const Option = material.styled("div")(({ theme }) => ({
5598
+ position: "relative",
5599
+ display: "inline-flex",
5600
+ // TODO: Remove this once we have a better way to handle the spacing between icon buttons:
5601
+ // https://app.shortcut.com/cartoteam/story/471284/create-iconbuttongroup-component-to-properly-group-several-icons
5602
+ "& + &, & + .optionIconButton": {
5603
+ marginLeft: theme.spacing(0.5)
5604
+ }
5605
+ }));
5606
+ const StyledIconButton = material.styled(material.IconButton, {
5607
+ shouldForwardProp: (prop) => !["active"].includes(prop)
5608
+ })(({ active, theme }) => ({
5609
+ ...active && {
5610
+ color: theme.palette.primary.main,
5611
+ backgroundColor: theme.palette.primary.background,
5612
+ "& svg:not(.doNotFillIcon) path": {
5613
+ fill: theme.palette.primary.main
5614
+ }
5615
+ }
5616
+ }));
5617
+ function _IconButton({
5618
+ tooltip,
5619
+ tooltipPlacement = "top",
5620
+ icon,
5621
+ size = "medium",
5622
+ variant = "icon",
5623
+ color = "default",
5624
+ sx,
5625
+ className,
5626
+ loading,
5627
+ disabled,
5628
+ active,
5629
+ ...props
5630
+ }, ref) {
5631
+ return /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { placement: tooltipPlacement, title: tooltip ?? "", children: /* @__PURE__ */ jsxRuntime.jsx(
5632
+ Option,
5581
5633
  {
5582
- ...otherProps,
5583
- ref,
5584
- style: {
5585
- ...fontConfiguration,
5586
- ...style
5587
- },
5588
- "data-name": "typography",
5589
- children
5634
+ className: `optionIconButton ${className ?? ""}`,
5635
+ sx,
5636
+ "data-testid": "icon-button",
5637
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5638
+ StyledIconButton,
5639
+ {
5640
+ ...props,
5641
+ ref,
5642
+ size,
5643
+ variant,
5644
+ color,
5645
+ active,
5646
+ disabled: disabled || loading,
5647
+ role: "button",
5648
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : icon
5649
+ }
5650
+ )
5590
5651
  }
5591
- );
5652
+ ) });
5592
5653
  }
5593
- const Typography = React.forwardRef(_Typography);
5654
+ const IconButton = React.forwardRef(_IconButton);
5594
5655
  const Root = material.styled(material.Box)(({ theme }) => ({
5595
5656
  display: "flex",
5596
5657
  gap: theme.spacing(0.5),
5597
5658
  marginLeft: theme.spacing(1)
5598
5659
  }));
5599
- const Button = material.styled("div")(({ theme }) => ({
5600
- "& .MuiIconButton-root:not(.Mui-disabled)": {
5601
- color: theme.palette.text.secondary
5602
- }
5603
- }));
5604
- function TablePaginationActions({
5660
+ function _TablePaginationActions({
5605
5661
  count,
5606
5662
  page,
5607
5663
  rowsPerPage = 10,
5608
5664
  onPageChange,
5609
- lastPageTooltip
5610
- }) {
5665
+ lastPageTooltip,
5666
+ "aria-label": ariaLabel,
5667
+ "data-testid": dataTestId
5668
+ }, ref) {
5611
5669
  const intl = reactIntl.useIntl();
5612
5670
  const intlConfig = useImperativeIntl(intl);
5613
5671
  const handleBackButtonClick = (event) => {
@@ -5627,38 +5685,50 @@ function TablePaginationActions({
5627
5685
  const noMorePagesText = intlConfig.formatMessage({
5628
5686
  id: "c4r.form.pagination.noMorePages"
5629
5687
  });
5630
- return /* @__PURE__ */ jsxRuntime.jsxs(Root, { children: [
5631
- /* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: isFirstPage ? noMorePagesText : prevLabel, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { children: /* @__PURE__ */ jsxRuntime.jsx(
5632
- material.IconButton,
5633
- {
5634
- onClick: handleBackButtonClick,
5635
- disabled: page === 0,
5636
- "aria-label": prevLabel,
5637
- children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.KeyboardArrowLeftOutlined, {})
5638
- }
5639
- ) }) }),
5640
- /* @__PURE__ */ jsxRuntime.jsx(
5641
- material.Tooltip,
5642
- {
5643
- title: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel,
5644
- children: /* @__PURE__ */ jsxRuntime.jsx(Button, { children: /* @__PURE__ */ jsxRuntime.jsx(
5645
- material.IconButton,
5688
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5689
+ Root,
5690
+ {
5691
+ ref,
5692
+ "data-testid": dataTestId,
5693
+ "aria-label": ariaLabel,
5694
+ "data-name": "table-pagination-actions",
5695
+ children: [
5696
+ /* @__PURE__ */ jsxRuntime.jsx(
5697
+ IconButton,
5698
+ {
5699
+ onClick: handleBackButtonClick,
5700
+ disabled: page === 0,
5701
+ "aria-label": prevLabel,
5702
+ icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.KeyboardArrowLeftOutlined, {}),
5703
+ tooltip: isFirstPage ? noMorePagesText : prevLabel
5704
+ }
5705
+ ),
5706
+ /* @__PURE__ */ jsxRuntime.jsx(
5707
+ IconButton,
5646
5708
  {
5647
5709
  onClick: handleNextButtonClick,
5648
5710
  disabled: page >= Math.ceil(count / rowsPerPage) - 1,
5649
- "aria-label": nextLabel.toLocaleLowerCase(),
5650
- children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.KeyboardArrowRightOutlined, {})
5711
+ "aria-label": nextLabel,
5712
+ icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.KeyboardArrowRightOutlined, {}),
5713
+ tooltip: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel
5651
5714
  }
5652
- ) })
5653
- }
5654
- )
5655
- ] });
5715
+ )
5716
+ ]
5717
+ }
5718
+ );
5656
5719
  }
5720
+ const TablePaginationActions = React.forwardRef(_TablePaginationActions);
5721
+ const ellipsisStyles = {
5722
+ textOverflow: "ellipsis",
5723
+ overflow: "hidden",
5724
+ whiteSpace: "nowrap"
5725
+ };
5657
5726
  exports.APPBAR_SIZE = APPBAR_SIZE;
5658
5727
  exports.BREAKPOINTS = BREAKPOINTS;
5659
5728
  exports.ICON_SIZE_LARGE = ICON_SIZE_LARGE;
5660
5729
  exports.ICON_SIZE_MEDIUM = ICON_SIZE_MEDIUM;
5661
5730
  exports.ICON_SIZE_SMALL = ICON_SIZE_SMALL;
5731
+ exports.IconButton = IconButton;
5662
5732
  exports.MENU_ITEM_SIZE_DEFAULT = MENU_ITEM_SIZE_DEFAULT;
5663
5733
  exports.MENU_ITEM_SIZE_DENSE = MENU_ITEM_SIZE_DENSE;
5664
5734
  exports.MENU_ITEM_SIZE_EXTENDED = MENU_ITEM_SIZE_EXTENDED;
@@ -5667,6 +5737,7 @@ exports.NOTIFICATION_DURATION_IN_MS = NOTIFICATION_DURATION_IN_MS;
5667
5737
  exports.SPACING = SPACING;
5668
5738
  exports.TablePaginationActions = TablePaginationActions;
5669
5739
  exports.Typography = Typography;
5740
+ exports.ellipsisStyles = ellipsisStyles;
5670
5741
  exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
5671
5742
  exports.getSpacing = getSpacing;
5672
5743
  exports.useImperativeIntl = useImperativeIntl;
@@ -1,6 +1,6 @@
1
1
  import require$$0 from "react-is";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Typography as Typography$1, Tooltip, IconButton, styled, Box } from "@mui/material";
3
+ import { Typography as Typography$1, styled, IconButton as IconButton$1, Tooltip, CircularProgress, Box } from "@mui/material";
4
4
  import { forwardRef } from "react";
5
5
  import { KeyboardArrowLeftOutlined, KeyboardArrowRightOutlined } from "@mui/icons-material";
6
6
  import { createIntlCache, createIntl, useIntl } from "react-intl";
@@ -781,6 +781,31 @@ const MENU_LIST_MAX_SIZE = 312;
781
781
  const MENU_ITEM_SIZE_DENSE = 24;
782
782
  const MENU_ITEM_SIZE_DEFAULT = 32;
783
783
  const MENU_ITEM_SIZE_EXTENDED = 48;
784
+ const FontWeight = {
785
+ regular: 400,
786
+ medium: 500,
787
+ strong: 600
788
+ };
789
+ function _Typography({ italic, weight, style, children, ...otherProps }, ref) {
790
+ const fontConfiguration = {
791
+ fontWeight: FontWeight[weight],
792
+ fontStyle: italic ? "italic" : void 0
793
+ };
794
+ return /* @__PURE__ */ jsx(
795
+ Typography$1,
796
+ {
797
+ ...otherProps,
798
+ ref,
799
+ style: {
800
+ ...fontConfiguration,
801
+ ...style
802
+ },
803
+ "data-name": "typography",
804
+ children
805
+ }
806
+ );
807
+ }
808
+ const Typography = forwardRef(_Typography);
784
809
  const en = {
785
810
  c4r: {
786
811
  button: {
@@ -792,10 +817,11 @@ const en = {
792
817
  copy: "Copy",
793
818
  save: "Save",
794
819
  add: "Add",
820
+ clear: "Clear",
795
821
  showOptions: "Show options",
796
822
  hide: "Hide",
797
823
  show: "Show",
798
- opensInNewTab: "Opens in new tab"
824
+ opensInNewTab: "(Opens in new tab)"
799
825
  },
800
826
  form: {
801
827
  selectAll: "Select all",
@@ -941,10 +967,11 @@ const es = {
941
967
  copy: "Copiar",
942
968
  save: "Guardar",
943
969
  add: "Añadir",
970
+ clear: "Borrar",
944
971
  showOptions: "Mostrar opciones",
945
972
  hide: "Ocultar",
946
973
  show: "Mostrar",
947
- opensInNewTab: "Abre en una nueva pestaña"
974
+ opensInNewTab: "(Abre en una nueva pestaña)"
948
975
  },
949
976
  form: {
950
977
  selectAll: "Seleccionar todos",
@@ -1088,10 +1115,11 @@ const id = {
1088
1115
  copy: "Salin",
1089
1116
  save: "Simpan",
1090
1117
  add: "Tambah",
1118
+ clear: "Bersihkan",
1091
1119
  showOptions: "Tampilkan opsi",
1092
1120
  hide: "Sembunyikan",
1093
1121
  show: "Tampilkan",
1094
- opensInNewTab: "Buka di tab baru"
1122
+ opensInNewTab: "(Buka di tab baru)"
1095
1123
  },
1096
1124
  form: {
1097
1125
  selectAll: "Select all",
@@ -5565,48 +5593,78 @@ const getGloballyCachedIntl = (intlConfig) => {
5565
5593
  function useImperativeIntl(intlConfig) {
5566
5594
  return getGloballyCachedIntl(intlConfig);
5567
5595
  }
5568
- const FontWeight = {
5569
- regular: 400,
5570
- medium: 500,
5571
- strong: 600
5572
- };
5573
- function _Typography({ italic, weight, style, children, ...otherProps }, ref) {
5574
- const fontConfiguration = {
5575
- fontWeight: FontWeight[weight],
5576
- fontStyle: italic ? "italic" : void 0
5577
- };
5578
- return /* @__PURE__ */ jsx(
5579
- Typography$1,
5596
+ const Option = styled("div")(({ theme }) => ({
5597
+ position: "relative",
5598
+ display: "inline-flex",
5599
+ // TODO: Remove this once we have a better way to handle the spacing between icon buttons:
5600
+ // https://app.shortcut.com/cartoteam/story/471284/create-iconbuttongroup-component-to-properly-group-several-icons
5601
+ "& + &, & + .optionIconButton": {
5602
+ marginLeft: theme.spacing(0.5)
5603
+ }
5604
+ }));
5605
+ const StyledIconButton = styled(IconButton$1, {
5606
+ shouldForwardProp: (prop) => !["active"].includes(prop)
5607
+ })(({ active, theme }) => ({
5608
+ ...active && {
5609
+ color: theme.palette.primary.main,
5610
+ backgroundColor: theme.palette.primary.background,
5611
+ "& svg:not(.doNotFillIcon) path": {
5612
+ fill: theme.palette.primary.main
5613
+ }
5614
+ }
5615
+ }));
5616
+ function _IconButton({
5617
+ tooltip,
5618
+ tooltipPlacement = "top",
5619
+ icon,
5620
+ size = "medium",
5621
+ variant = "icon",
5622
+ color = "default",
5623
+ sx,
5624
+ className,
5625
+ loading,
5626
+ disabled,
5627
+ active,
5628
+ ...props
5629
+ }, ref) {
5630
+ return /* @__PURE__ */ jsx(Tooltip, { placement: tooltipPlacement, title: tooltip ?? "", children: /* @__PURE__ */ jsx(
5631
+ Option,
5580
5632
  {
5581
- ...otherProps,
5582
- ref,
5583
- style: {
5584
- ...fontConfiguration,
5585
- ...style
5586
- },
5587
- "data-name": "typography",
5588
- children
5633
+ className: `optionIconButton ${className ?? ""}`,
5634
+ sx,
5635
+ "data-testid": "icon-button",
5636
+ children: /* @__PURE__ */ jsx(
5637
+ StyledIconButton,
5638
+ {
5639
+ ...props,
5640
+ ref,
5641
+ size,
5642
+ variant,
5643
+ color,
5644
+ active,
5645
+ disabled: disabled || loading,
5646
+ role: "button",
5647
+ children: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" }) : icon
5648
+ }
5649
+ )
5589
5650
  }
5590
- );
5651
+ ) });
5591
5652
  }
5592
- const Typography = forwardRef(_Typography);
5653
+ const IconButton = forwardRef(_IconButton);
5593
5654
  const Root = styled(Box)(({ theme }) => ({
5594
5655
  display: "flex",
5595
5656
  gap: theme.spacing(0.5),
5596
5657
  marginLeft: theme.spacing(1)
5597
5658
  }));
5598
- const Button = styled("div")(({ theme }) => ({
5599
- "& .MuiIconButton-root:not(.Mui-disabled)": {
5600
- color: theme.palette.text.secondary
5601
- }
5602
- }));
5603
- function TablePaginationActions({
5659
+ function _TablePaginationActions({
5604
5660
  count,
5605
5661
  page,
5606
5662
  rowsPerPage = 10,
5607
5663
  onPageChange,
5608
- lastPageTooltip
5609
- }) {
5664
+ lastPageTooltip,
5665
+ "aria-label": ariaLabel,
5666
+ "data-testid": dataTestId
5667
+ }, ref) {
5610
5668
  const intl = useIntl();
5611
5669
  const intlConfig = useImperativeIntl(intl);
5612
5670
  const handleBackButtonClick = (event) => {
@@ -5626,33 +5684,44 @@ function TablePaginationActions({
5626
5684
  const noMorePagesText = intlConfig.formatMessage({
5627
5685
  id: "c4r.form.pagination.noMorePages"
5628
5686
  });
5629
- return /* @__PURE__ */ jsxs(Root, { children: [
5630
- /* @__PURE__ */ jsx(Tooltip, { title: isFirstPage ? noMorePagesText : prevLabel, children: /* @__PURE__ */ jsx(Button, { children: /* @__PURE__ */ jsx(
5631
- IconButton,
5632
- {
5633
- onClick: handleBackButtonClick,
5634
- disabled: page === 0,
5635
- "aria-label": prevLabel,
5636
- children: /* @__PURE__ */ jsx(KeyboardArrowLeftOutlined, {})
5637
- }
5638
- ) }) }),
5639
- /* @__PURE__ */ jsx(
5640
- Tooltip,
5641
- {
5642
- title: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel,
5643
- children: /* @__PURE__ */ jsx(Button, { children: /* @__PURE__ */ jsx(
5687
+ return /* @__PURE__ */ jsxs(
5688
+ Root,
5689
+ {
5690
+ ref,
5691
+ "data-testid": dataTestId,
5692
+ "aria-label": ariaLabel,
5693
+ "data-name": "table-pagination-actions",
5694
+ children: [
5695
+ /* @__PURE__ */ jsx(
5696
+ IconButton,
5697
+ {
5698
+ onClick: handleBackButtonClick,
5699
+ disabled: page === 0,
5700
+ "aria-label": prevLabel,
5701
+ icon: /* @__PURE__ */ jsx(KeyboardArrowLeftOutlined, {}),
5702
+ tooltip: isFirstPage ? noMorePagesText : prevLabel
5703
+ }
5704
+ ),
5705
+ /* @__PURE__ */ jsx(
5644
5706
  IconButton,
5645
5707
  {
5646
5708
  onClick: handleNextButtonClick,
5647
5709
  disabled: page >= Math.ceil(count / rowsPerPage) - 1,
5648
- "aria-label": nextLabel.toLocaleLowerCase(),
5649
- children: /* @__PURE__ */ jsx(KeyboardArrowRightOutlined, {})
5710
+ "aria-label": nextLabel,
5711
+ icon: /* @__PURE__ */ jsx(KeyboardArrowRightOutlined, {}),
5712
+ tooltip: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel
5650
5713
  }
5651
- ) })
5652
- }
5653
- )
5654
- ] });
5714
+ )
5715
+ ]
5716
+ }
5717
+ );
5655
5718
  }
5719
+ const TablePaginationActions = forwardRef(_TablePaginationActions);
5720
+ const ellipsisStyles = {
5721
+ textOverflow: "ellipsis",
5722
+ overflow: "hidden",
5723
+ whiteSpace: "nowrap"
5724
+ };
5656
5725
  export {
5657
5726
  APPBAR_SIZE as A,
5658
5727
  BREAKPOINTS as B,
@@ -5665,9 +5734,11 @@ export {
5665
5734
  ICON_SIZE_MEDIUM as b,
5666
5735
  ICON_SIZE_SMALL as c,
5667
5736
  MENU_LIST_MAX_SIZE as d,
5668
- MENU_ITEM_SIZE_DENSE as e,
5669
- MENU_ITEM_SIZE_EXTENDED as f,
5737
+ ellipsisStyles as e,
5738
+ MENU_ITEM_SIZE_DENSE as f,
5670
5739
  getSpacing as g,
5671
- getDefaultExportFromCjs as h,
5740
+ MENU_ITEM_SIZE_EXTENDED as h,
5741
+ IconButton as i,
5742
+ getDefaultExportFromCjs as j,
5672
5743
  useImperativeIntl as u
5673
5744
  };
@@ -5,7 +5,8 @@ const React = require("react");
5
5
  const material = require("@mui/material");
6
6
  const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
7
7
  const OpenDiagonallyRight = require("../OpenDiagonallyRight-CpL4ROwg.cjs");
8
- const SwatchSquare = require("../SwatchSquare-B8PIY3Rd.cjs");
8
+ const Search = require("../Search-CMWbM9nD.cjs");
9
+ const SwatchSquare = require("../SwatchSquare-DuXPIL7t.cjs");
9
10
  const Icon$38 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
10
11
  "path",
11
12
  {
@@ -6108,7 +6109,7 @@ exports.ArrowDown = ArrowDown.ArrowDown;
6108
6109
  exports.ArrowUp = OpenDiagonallyRight.ArrowUp;
6109
6110
  exports.CloseDiagonallyRight = OpenDiagonallyRight.CloseDiagonallyRight;
6110
6111
  exports.OpenDiagonallyRight = OpenDiagonallyRight.OpenDiagonallyRight;
6111
- exports.Search = SwatchSquare.Search;
6112
+ exports.Search = Search.Search;
6112
6113
  exports.SwatchSquare = SwatchSquare.SwatchSquare;
6113
6114
  exports.AccessIn = AccessIn$1;
6114
6115
  exports.AddApp = AddApp$1;
@@ -3,7 +3,8 @@ import { forwardRef } from "react";
3
3
  import { createSvgIcon } from "@mui/material";
4
4
  import { A } from "../ArrowDown-d6bxUL0F.js";
5
5
  import { A as A2, C, O } from "../OpenDiagonallyRight-CGdCEXlF.js";
6
- import { S, a } from "../SwatchSquare-CaaLsjAC.js";
6
+ import { S } from "../Search-C7wkXu3f.js";
7
+ import { S as S2 } from "../SwatchSquare-B6KYVoqV.js";
7
8
  const Icon$38 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
8
9
  "path",
9
10
  {
@@ -6277,7 +6278,7 @@ export {
6277
6278
  SupplyChain$1 as SupplyChain,
6278
6279
  SwatchCircle$1 as SwatchCircle,
6279
6280
  SwatchCircleNone$1 as SwatchCircleNone,
6280
- a as SwatchSquare,
6281
+ S2 as SwatchSquare,
6281
6282
  TableColumn$1 as TableColumn,
6282
6283
  TableColumnLimited$1 as TableColumnLimited,
6283
6284
  TempTable$1 as TempTable,