@carto/meridian-ds 2.5.5-alpha-translations.1 → 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 (53) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/dist/{Alert-CRVceJ9N.js → Alert-C1VgP3N1.js} +1 -1
  3. package/dist/{Alert-Dyw7Z9wJ.cjs → Alert-F8G9P271.cjs} +7 -7
  4. package/dist/{MenuItem-o51jnNjL.cjs → MenuItem-Bssr5qGq.cjs} +6 -6
  5. package/dist/{MenuItem-h41wtQTz.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 +370 -76
  11. package/dist/components/index.js +309 -15
  12. package/dist/{TablePaginationActions-CMC_ZxDN.cjs → css-utils-CqIN_t7x.cjs} +9 -0
  13. package/dist/{TablePaginationActions-DIFPc_wQ.js → css-utils-hxI-qUxK.js} +13 -4
  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/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +117 -0
  19. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts.map +1 -0
  20. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +66 -0
  21. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +1 -0
  22. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts +2 -0
  23. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts.map +1 -0
  24. package/dist/types/components/EllipsisWithTooltip/index.d.ts +3 -0
  25. package/dist/types/components/EllipsisWithTooltip/index.d.ts.map +1 -0
  26. package/dist/types/components/Link/Link.stories.d.ts +0 -7
  27. package/dist/types/components/Link/Link.stories.d.ts.map +1 -1
  28. package/dist/types/components/SearchField/SearchField.d.ts +32 -0
  29. package/dist/types/components/SearchField/SearchField.d.ts.map +1 -0
  30. package/dist/types/components/SearchField/SearchField.stories.d.ts +123 -0
  31. package/dist/types/components/SearchField/SearchField.stories.d.ts.map +1 -0
  32. package/dist/types/components/SearchField/index.d.ts +3 -0
  33. package/dist/types/components/SearchField/index.d.ts.map +1 -0
  34. package/dist/types/components/Tag/Tag.d.ts +176 -4
  35. package/dist/types/components/Tag/Tag.d.ts.map +1 -1
  36. package/dist/types/components/index.d.ts +4 -0
  37. package/dist/types/components/index.d.ts.map +1 -1
  38. package/dist/types/localization/en.d.ts +1 -0
  39. package/dist/types/localization/en.d.ts.map +1 -1
  40. package/dist/types/localization/es.d.ts +1 -0
  41. package/dist/types/localization/es.d.ts.map +1 -1
  42. package/dist/types/localization/id.d.ts +1 -0
  43. package/dist/types/localization/id.d.ts.map +1 -1
  44. package/dist/types/localization/index.d.ts +3 -0
  45. package/dist/types/localization/index.d.ts.map +1 -1
  46. package/dist/types/theme/components/forms.d.ts.map +1 -1
  47. package/dist/types/utils/css-utils.d.ts +14 -0
  48. package/dist/types/utils/css-utils.d.ts.map +1 -0
  49. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +1 -1
  50. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +1 -1
  51. package/dist/widgets/index.cjs +120 -124
  52. package/dist/widgets/index.js +6 -10
  53. package/package.json +1 -1
@@ -2,14 +2,14 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import React, { forwardRef, useState, useRef, useEffect, useMemo, createElement, Fragment as Fragment$1, useCallback, useImperativeHandle } from "react";
3
3
  import { styled, Box, Button as Button$1, CircularProgress, Popper, Grow, Paper, ClickAwayListener, MenuList as MenuList$1, MenuItem, ButtonGroup as ButtonGroup$1, TextField, InputAdornment, Select, FormControl, InputLabel, FormHelperText, Link, Checkbox, IconButton as IconButton$1, ListItemText, Tooltip, ToggleButtonGroup as ToggleButtonGroup$1, Autocomplete as Autocomplete$1, Divider, ListItemIcon, createFilterOptions, alpha, useTheme, AppBar as AppBar$1, Toolbar, Dialog as Dialog$1, DialogTitle as DialogTitle$1, Chip, DialogContent as DialogContent$1, DialogActions as DialogActions$1, Slide, Accordion, AccordionSummary, AccordionDetails, Avatar as Avatar$1, Menu as Menu$2, useMediaQuery, Snackbar as Snackbar$1, Portal, Fade } from "@mui/material";
4
4
  import { OpenInNewOutlined, VisibilityOffOutlined, VisibilityOutlined, Cancel, ContentCopyOutlined, AddCircleOutlineOutlined, MenuOutlined, MoreVertOutlined, HelpOutline, ErrorOutline, CloseOutlined, Check, TodayOutlined } from "@mui/icons-material";
5
- import { u as useTranslationFallback, S as ScreenReaderOnly, A as Alert$1 } from "../Alert-CRVceJ9N.js";
6
- import { L } from "../Alert-CRVceJ9N.js";
7
- import { T as Typography, c as ICON_SIZE_SMALL, u as useImperativeIntl, h as IconButton, e as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, f as MENU_ITEM_SIZE_EXTENDED, M as MENU_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, N as NOTIFICATION_DURATION_IN_MS } from "../TablePaginationActions-DIFPc_wQ.js";
8
- import { a } from "../TablePaginationActions-DIFPc_wQ.js";
5
+ import { u as useTranslationFallback, S as ScreenReaderOnly, A as Alert$1 } from "../Alert-C1VgP3N1.js";
6
+ import { L } from "../Alert-C1VgP3N1.js";
7
+ import { T as Typography, c as ICON_SIZE_SMALL, u as useImperativeIntl, i as IconButton, f as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, h as MENU_ITEM_SIZE_EXTENDED, M as MENU_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, b as ICON_SIZE_MEDIUM, N as NOTIFICATION_DURATION_IN_MS, e as ellipsisStyles } from "../css-utils-hxI-qUxK.js";
8
+ import { a } from "../css-utils-hxI-qUxK.js";
9
9
  import { A as ArrowDown } from "../ArrowDown-d6bxUL0F.js";
10
10
  import { A as ArrowUp, O as OpenDiagonallyRight, C as CloseDiagonallyRight } from "../OpenDiagonallyRight-CGdCEXlF.js";
11
11
  import { useIntl } from "react-intl";
12
- import { M as MenuItem$1 } from "../MenuItem-h41wtQTz.js";
12
+ import { M as MenuItem$1 } from "../MenuItem-COajCLkS.js";
13
13
  import "cartocolor";
14
14
  import { FixedSizeList } from "react-window";
15
15
  import { Controlled, UnControlled } from "react-codemirror2";
@@ -41,6 +41,7 @@ import { DatePicker as DatePicker$1 } from "@mui/x-date-pickers/DatePicker";
41
41
  import { PickersDay as PickersDay$1 } from "@mui/x-date-pickers";
42
42
  import { TimePicker as TimePicker$1 } from "@mui/x-date-pickers/TimePicker";
43
43
  import { DateTimePicker as DateTimePicker$1 } from "@mui/x-date-pickers/DateTimePicker";
44
+ import { S as Search } from "../Search-C7wkXu3f.js";
44
45
  import DOMPurify from "dompurify";
45
46
  const IndicatorIcon = styled(Box)({
46
47
  position: "absolute",
@@ -1869,7 +1870,7 @@ const BrandElements = styled("div")(({ theme }) => ({
1869
1870
  minWidth: "192px"
1870
1871
  }
1871
1872
  }));
1872
- const Content$4 = styled("div")(({ theme }) => ({
1873
+ const Content$5 = styled("div")(({ theme }) => ({
1873
1874
  display: "flex",
1874
1875
  alignItems: "center",
1875
1876
  justifyContent: "space-between",
@@ -1892,7 +1893,7 @@ function _AppBar({
1892
1893
  brandText && /* @__PURE__ */ jsx(BrandText, { text: brandText }),
1893
1894
  secondaryText && /* @__PURE__ */ jsx(SecondaryText, { text: secondaryText })
1894
1895
  ] }),
1895
- /* @__PURE__ */ jsx(Content$4, { children })
1896
+ /* @__PURE__ */ jsx(Content$5, { children })
1896
1897
  ] }) });
1897
1898
  }
1898
1899
  const AppBar = forwardRef(_AppBar);
@@ -3172,7 +3173,7 @@ function DialogHeader({
3172
3173
  children && /* @__PURE__ */ jsx(DividerBottom, {})
3173
3174
  ] });
3174
3175
  }
3175
- const Content$3 = styled(DialogContent$1, {
3176
+ const Content$4 = styled(DialogContent$1, {
3176
3177
  shouldForwardProp: (prop) => !["scrollableContent", "withGutter", "withBottomGutter"].includes(prop)
3177
3178
  })(({ theme, scrollableContent, withGutter, withBottomGutter }) => ({
3178
3179
  display: "flex",
@@ -3249,7 +3250,7 @@ function _DialogContent({
3249
3250
  return () => resizeObserver.disconnect();
3250
3251
  }, [contentRef, updateBorders]);
3251
3252
  return /* @__PURE__ */ jsx(
3252
- Content$3,
3253
+ Content$4,
3253
3254
  {
3254
3255
  ref: setContentRef,
3255
3256
  onScroll: handleScroll,
@@ -3548,7 +3549,7 @@ function DialogStepper({
3548
3549
  );
3549
3550
  }) }) });
3550
3551
  }
3551
- const Content$2 = styled(DialogContent, {
3552
+ const Content$3 = styled(DialogContent, {
3552
3553
  shouldForwardProp: (prop) => !["error", "withBorder"].includes(prop)
3553
3554
  })(
3554
3555
  ({ error, withBorder, theme }) => ({
@@ -3577,7 +3578,7 @@ function CodeAreaDialogContent({
3577
3578
  withGutter = false
3578
3579
  }) {
3579
3580
  if (!children) return null;
3580
- return /* @__PURE__ */ jsx(Content$2, { withGutter, error, withBorder, children });
3581
+ return /* @__PURE__ */ jsx(Content$3, { withGutter, error, withBorder, children });
3581
3582
  }
3582
3583
  function CodeAreaDialogConfirmation({
3583
3584
  onClose,
@@ -4517,7 +4518,7 @@ function DateTimePicker({
4517
4518
  );
4518
4519
  }
4519
4520
  const DEFAULT_ITEMS = [{ outlinedBullet: false, value: "" }];
4520
- const Content$1 = styled("ul")(({ theme }) => ({
4521
+ const Content$2 = styled("ul")(({ theme }) => ({
4521
4522
  listStyle: "none",
4522
4523
  paddingLeft: 0,
4523
4524
  margin: theme.spacing(0.5, 0, 0, 0)
@@ -4548,7 +4549,7 @@ function TooltipData({
4548
4549
  }) {
4549
4550
  return /* @__PURE__ */ jsxs(Fragment, { children: [
4550
4551
  title && /* @__PURE__ */ jsx(Typography, { color: "inherit", variant: "caption", weight: "medium", children: title }),
4551
- /* @__PURE__ */ jsx(Content$1, { children: items.map((item, index) => /* @__PURE__ */ jsxs(Entry, { children: [
4552
+ /* @__PURE__ */ jsx(Content$2, { children: items.map((item, index) => /* @__PURE__ */ jsxs(Entry, { children: [
4552
4553
  /* @__PURE__ */ jsx(
4553
4554
  Bullet,
4554
4555
  {
@@ -4946,6 +4947,152 @@ function _FilterDropdown({
4946
4947
  const FilterDropdown = forwardRef(
4947
4948
  _FilterDropdown
4948
4949
  );
4950
+ const SearchIcon = styled(Search, {
4951
+ shouldForwardProp: (prop) => prop !== "minimized" && prop !== "disabled"
4952
+ })(
4953
+ ({ theme, minimized, disabled }) => ({
4954
+ cursor: !disabled && minimized ? "pointer" : "inherit",
4955
+ width: ICON_SIZE_MEDIUM,
4956
+ height: ICON_SIZE_MEDIUM,
4957
+ path: {
4958
+ fillOpacity: 1,
4959
+ fill: disabled ? theme.palette.text.disabled : theme.palette.text.secondary
4960
+ }
4961
+ })
4962
+ );
4963
+ const CancelIcon = styled(Cancel)(({ theme }) => ({
4964
+ fill: theme.palette.text.hint,
4965
+ cursor: "pointer"
4966
+ }));
4967
+ const CircularProgressIcon = styled(CircularProgress)(({ theme }) => ({
4968
+ svg: {
4969
+ color: theme.palette.primary.main
4970
+ }
4971
+ }));
4972
+ const SearchFieldBase = styled(TextField, {
4973
+ shouldForwardProp: (prop) => prop !== "minimized" && prop !== "isInputFocused"
4974
+ })(
4975
+ ({ theme, disabled, minimized, isInputFocused }) => ({
4976
+ "& .MuiInputBase-input": {
4977
+ cursor: disabled ? "not-allowed" : "text",
4978
+ pointerEvents: isInputFocused ? "auto" : "none"
4979
+ // Fix Chrome scroll issue https://issues.chromium.org/issues/41245282
4980
+ },
4981
+ "&.MuiTextField-root .MuiInputBase-root": {
4982
+ paddingRight: theme.spacing(1),
4983
+ "&.MuiInputBase-sizeSmall": {
4984
+ paddingRight: theme.spacing(0.5)
4985
+ },
4986
+ "&:before": {
4987
+ border: `none !important`,
4988
+ "&:hover": {
4989
+ border: `none !important`
4990
+ }
4991
+ },
4992
+ width: minimized ? theme.spacing(4) : "100%",
4993
+ transition: theme.transitions.create("width", {
4994
+ easing: theme.transitions.easing.easeInOut,
4995
+ duration: theme.transitions.duration.shortest
4996
+ })
4997
+ },
4998
+ // Input Adornment
4999
+ "& .MuiInputAdornment-positionStart": {
5000
+ marginLeft: minimized ? theme.spacing(0.125) : void 0
5001
+ },
5002
+ "& .MuiInputAdornment-positionEnd": {
5003
+ minWidth: theme.spacing(4),
5004
+ "&.MuiInputAdornment-sizeSmall": {
5005
+ minWidth: theme.spacing(3)
5006
+ }
5007
+ },
5008
+ // Variants
5009
+ "& .MuiFilledInput-root": {
5010
+ transition: theme.transitions.create("background-color", {
5011
+ easing: theme.transitions.easing.easeInOut,
5012
+ duration: theme.transitions.duration.shortest
5013
+ }),
5014
+ backgroundColor: `${minimized ? "inherit" : theme.palette.default.background} !important`,
5015
+ "&:hover": {
5016
+ backgroundColor: `${disabled ? "inherit" : theme.palette.action.hover} !important`
5017
+ }
5018
+ }
5019
+ })
5020
+ );
5021
+ function _SearchField({
5022
+ value,
5023
+ defaultValue,
5024
+ placeholder,
5025
+ onChange,
5026
+ onClick,
5027
+ onResetSearch,
5028
+ disabled,
5029
+ minimized = false,
5030
+ loading = false,
5031
+ variant = "filled",
5032
+ size = "small",
5033
+ InputProps,
5034
+ startAdornment,
5035
+ endAdornment,
5036
+ onFocus,
5037
+ onBlur,
5038
+ clearTextLabel,
5039
+ ...otherProps
5040
+ }, ref) {
5041
+ const [isInputFocused, setIsInputFocused] = useState(false);
5042
+ const clearTextLabelValue = useTranslationFallback(
5043
+ "c4r.button.clear",
5044
+ clearTextLabel
5045
+ );
5046
+ const handleFocus = (event) => {
5047
+ setIsInputFocused(true);
5048
+ onFocus == null ? void 0 : onFocus(event);
5049
+ };
5050
+ const handleBlur = (event) => {
5051
+ setIsInputFocused(false);
5052
+ onBlur == null ? void 0 : onBlur(event);
5053
+ };
5054
+ const handleClearText = () => {
5055
+ onResetSearch == null ? void 0 : onResetSearch();
5056
+ onChange == null ? void 0 : onChange({ target: { value: "" } });
5057
+ };
5058
+ return /* @__PURE__ */ jsx(
5059
+ SearchFieldBase,
5060
+ {
5061
+ value: minimized ? "" : value,
5062
+ defaultValue,
5063
+ placeholder: minimized ? "" : placeholder,
5064
+ onChange,
5065
+ onClick,
5066
+ variant,
5067
+ size,
5068
+ focused: false,
5069
+ isInputFocused,
5070
+ disabled,
5071
+ minimized,
5072
+ InputProps: {
5073
+ onFocus: handleFocus,
5074
+ onBlur: handleBlur,
5075
+ startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx(Box, { sx: { display: "inline-flex", ml: minimized ? -0.75 : 0 }, children: loading && minimized ? /* @__PURE__ */ jsx(CircularProgressIcon, { size: ICON_SIZE_MEDIUM }) : startAdornment || /* @__PURE__ */ jsx(SearchIcon, { disabled, minimized }) }) }),
5076
+ endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: loading ? /* @__PURE__ */ jsx(CircularProgressIcon, { size: ICON_SIZE_MEDIUM }) : !disabled && !minimized && (value ?? defaultValue) ? endAdornment || /* @__PURE__ */ jsx(
5077
+ IconButton,
5078
+ {
5079
+ icon: /* @__PURE__ */ jsx(CancelIcon, {}),
5080
+ onClick: handleClearText,
5081
+ size,
5082
+ color: "default",
5083
+ disabled,
5084
+ tooltip: clearTextLabelValue
5085
+ }
5086
+ ) : void 0 }),
5087
+ ...InputProps
5088
+ },
5089
+ "data-name": "search-field",
5090
+ ref,
5091
+ ...otherProps
5092
+ }
5093
+ );
5094
+ }
5095
+ const SearchField = forwardRef(_SearchField);
4949
5096
  const MAX_WIDTH = 480;
4950
5097
  const SnackbarRoot = styled(Snackbar$1)(({ theme }) => ({
4951
5098
  bottom: theme.spacing(2),
@@ -4959,7 +5106,7 @@ const SnackbarRoot = styled(Snackbar$1)(({ theme }) => ({
4959
5106
  maxWidth: `${MAX_WIDTH}px`
4960
5107
  }
4961
5108
  }));
4962
- const Content = styled(Box, {
5109
+ const Content$1 = styled(Box, {
4963
5110
  shouldForwardProp: (prop) => prop !== "autoWidth"
4964
5111
  })(({ autoWidth, theme }) => ({
4965
5112
  minWidth: "100%",
@@ -5068,7 +5215,7 @@ function Snackbar({
5068
5215
  TransitionComponent: autoWidth ? Fade : Slide,
5069
5216
  "data-auto-width": autoWidth,
5070
5217
  children: /* @__PURE__ */ jsxs(
5071
- Content,
5218
+ Content$1,
5072
5219
  {
5073
5220
  sx: {
5074
5221
  position: "relative"
@@ -5217,6 +5364,7 @@ const TagRoot = styled("div", {
5217
5364
  padding: theme.spacing(0, 0.5),
5218
5365
  borderRadius: theme.spacing(0.25),
5219
5366
  gap: theme.spacing(0.5),
5367
+ maxWidth: "100%",
5220
5368
  height: theme.spacing(2),
5221
5369
  borderWidth: "1px",
5222
5370
  borderStyle: "solid",
@@ -5247,6 +5395,7 @@ const TagLabel = styled("div", {
5247
5395
  })(({ type, theme }) => ({
5248
5396
  display: "flex",
5249
5397
  alignItems: "center",
5398
+ ...ellipsisStyles,
5250
5399
  paddingTop: type === "code" ? theme.spacing(0.25) : void 0
5251
5400
  }));
5252
5401
  function _Tag({
@@ -5575,6 +5724,149 @@ function _UploadField({
5575
5724
  ] });
5576
5725
  }
5577
5726
  const UploadField = forwardRef(_UploadField);
5727
+ const TooltipRoot = styled(Tooltip)(() => ({
5728
+ whiteSpace: "nowrap",
5729
+ maxWidth: 999,
5730
+ pointerEvents: "auto"
5731
+ }));
5732
+ const Content = styled("span", {
5733
+ shouldForwardProp: (prop) => !["ellipsisTarget", "lines", "content"].includes(prop)
5734
+ })(({ ellipsisTarget = "all", lines = 1, content = "block" }) => {
5735
+ if (lines > 1) {
5736
+ return {
5737
+ display: "-webkit-box",
5738
+ ...ellipsisStyles,
5739
+ whiteSpace: "initial !important",
5740
+ WebkitLineClamp: lines,
5741
+ WebkitBoxOrient: "vertical",
5742
+ "& > *": { display: "block" }
5743
+ };
5744
+ }
5745
+ if (ellipsisTarget === "first-child") {
5746
+ return {
5747
+ display: "flex",
5748
+ flex: "1",
5749
+ overflow: "hidden",
5750
+ "& > *:nth-of-type(1)": {
5751
+ display: "block",
5752
+ ...ellipsisStyles,
5753
+ marginRight: "-0.15em"
5754
+ // Prevent ellipsis separation
5755
+ }
5756
+ };
5757
+ }
5758
+ if (content === "flex") {
5759
+ return {
5760
+ display: "flex",
5761
+ flex: "1",
5762
+ "& > *": {
5763
+ display: "block",
5764
+ ...ellipsisStyles
5765
+ }
5766
+ };
5767
+ }
5768
+ return {
5769
+ display: "block",
5770
+ ...ellipsisStyles,
5771
+ fontWeight: "inherit",
5772
+ "& > *": { display: "inline" }
5773
+ };
5774
+ });
5775
+ function _EllipsisWithTooltip({
5776
+ children,
5777
+ tooltipText,
5778
+ alwaysShowTooltip,
5779
+ content = "block",
5780
+ textRef: inputTextRef,
5781
+ ellipsisTarget = "all",
5782
+ lines = 1,
5783
+ "aria-label": ariaLabel,
5784
+ contentProps,
5785
+ ...otherProps
5786
+ }, ref) {
5787
+ var _a;
5788
+ const textElementRef = useRef(null);
5789
+ const [overflowing, setOverflowing] = useState(false);
5790
+ const textRef = useMemo(
5791
+ () => inputTextRef || textElementRef,
5792
+ [inputTextRef, textElementRef]
5793
+ );
5794
+ const getTextContent = (node) => {
5795
+ if (typeof node === "string") return node;
5796
+ if (typeof node === "number") return String(node);
5797
+ if (React.isValidElement(node)) {
5798
+ const props = node.props;
5799
+ if (props.children) {
5800
+ return getTextContent(props.children);
5801
+ }
5802
+ }
5803
+ return "";
5804
+ };
5805
+ const elementTitle = tooltipText || ((_a = textElementRef.current) == null ? void 0 : _a.innerText) || (alwaysShowTooltip || overflowing ? getTextContent(children) : "");
5806
+ useEffect(() => {
5807
+ const container = textRef.current;
5808
+ if (!container || !children) return;
5809
+ if (alwaysShowTooltip) {
5810
+ setOverflowing(true);
5811
+ return;
5812
+ }
5813
+ let isOverflowing = false;
5814
+ if (lines > 1) {
5815
+ isOverflowing = container.scrollHeight > container.clientHeight;
5816
+ } else if (ellipsisTarget === "first-child") {
5817
+ const children2 = Array.from(container.children);
5818
+ const totalWidth = children2.reduce(
5819
+ (sum, child) => sum + ((child == null ? void 0 : child.scrollWidth) || 0),
5820
+ 0
5821
+ );
5822
+ isOverflowing = totalWidth > container.clientWidth;
5823
+ } else {
5824
+ const hasContainerOverflow = container.scrollWidth > container.clientWidth;
5825
+ const children2 = Array.from(container.children);
5826
+ const hasChildOverflow = children2.some(
5827
+ (child) => child.scrollWidth > child.clientWidth
5828
+ );
5829
+ isOverflowing = hasContainerOverflow || hasChildOverflow;
5830
+ }
5831
+ setOverflowing(isOverflowing);
5832
+ }, [textRef, alwaysShowTooltip, children, ellipsisTarget, lines, content]);
5833
+ useEffect(() => {
5834
+ if (typeof ref === "function") {
5835
+ ref(textElementRef.current);
5836
+ } else if (ref) {
5837
+ ref.current = textElementRef.current;
5838
+ }
5839
+ }, [ref]);
5840
+ return /* @__PURE__ */ jsx(
5841
+ TooltipRoot,
5842
+ {
5843
+ disableFocusListener: !overflowing && !alwaysShowTooltip,
5844
+ disableHoverListener: !overflowing && !alwaysShowTooltip,
5845
+ disableTouchListener: !overflowing && !alwaysShowTooltip,
5846
+ title: elementTitle,
5847
+ describeChild: true,
5848
+ ...otherProps,
5849
+ children: /* @__PURE__ */ jsx(
5850
+ Content,
5851
+ {
5852
+ "aria-label": ariaLabel ?? elementTitle,
5853
+ ref: textElementRef,
5854
+ ellipsisTarget,
5855
+ lines,
5856
+ content,
5857
+ "data-name": "ellipsis-with-tooltip",
5858
+ "data-overflowing": overflowing,
5859
+ "data-lines": lines,
5860
+ "data-content": content,
5861
+ "data-ellipsis-target": ellipsisTarget,
5862
+ ...contentProps,
5863
+ children
5864
+ }
5865
+ )
5866
+ }
5867
+ );
5868
+ }
5869
+ const EllipsisWithTooltip = forwardRef(_EllipsisWithTooltip);
5578
5870
  export {
5579
5871
  AUTOCOMPLETE_GROUP_HEADER_PROPERTY,
5580
5872
  AccordionGroup,
@@ -5609,6 +5901,7 @@ export {
5609
5901
  DialogHeader,
5610
5902
  DialogPaper,
5611
5903
  DialogStepper,
5904
+ EllipsisWithTooltip,
5612
5905
  FilterDropdown,
5613
5906
  FilterDropdownMenuItem,
5614
5907
  IconButton,
@@ -5622,6 +5915,7 @@ export {
5622
5915
  MultipleSelectField,
5623
5916
  PasswordField,
5624
5917
  ScreenReaderOnly,
5918
+ SearchField,
5625
5919
  SelectField,
5626
5920
  Snackbar,
5627
5921
  SplitButton,
@@ -818,6 +818,7 @@ const en = {
818
818
  copy: "Copy",
819
819
  save: "Save",
820
820
  add: "Add",
821
+ clear: "Clear",
821
822
  showOptions: "Show options",
822
823
  hide: "Hide",
823
824
  show: "Show",
@@ -967,6 +968,7 @@ const es = {
967
968
  copy: "Copiar",
968
969
  save: "Guardar",
969
970
  add: "Añadir",
971
+ clear: "Borrar",
970
972
  showOptions: "Mostrar opciones",
971
973
  hide: "Ocultar",
972
974
  show: "Mostrar",
@@ -1114,6 +1116,7 @@ const id = {
1114
1116
  copy: "Salin",
1115
1117
  save: "Simpan",
1116
1118
  add: "Tambah",
1119
+ clear: "Bersihkan",
1117
1120
  showOptions: "Tampilkan opsi",
1118
1121
  hide: "Sembunyikan",
1119
1122
  show: "Tampilkan",
@@ -5715,6 +5718,11 @@ function _TablePaginationActions({
5715
5718
  );
5716
5719
  }
5717
5720
  const TablePaginationActions = React.forwardRef(_TablePaginationActions);
5721
+ const ellipsisStyles = {
5722
+ textOverflow: "ellipsis",
5723
+ overflow: "hidden",
5724
+ whiteSpace: "nowrap"
5725
+ };
5718
5726
  exports.APPBAR_SIZE = APPBAR_SIZE;
5719
5727
  exports.BREAKPOINTS = BREAKPOINTS;
5720
5728
  exports.ICON_SIZE_LARGE = ICON_SIZE_LARGE;
@@ -5729,6 +5737,7 @@ exports.NOTIFICATION_DURATION_IN_MS = NOTIFICATION_DURATION_IN_MS;
5729
5737
  exports.SPACING = SPACING;
5730
5738
  exports.TablePaginationActions = TablePaginationActions;
5731
5739
  exports.Typography = Typography;
5740
+ exports.ellipsisStyles = ellipsisStyles;
5732
5741
  exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
5733
5742
  exports.getSpacing = getSpacing;
5734
5743
  exports.useImperativeIntl = useImperativeIntl;
@@ -817,6 +817,7 @@ const en = {
817
817
  copy: "Copy",
818
818
  save: "Save",
819
819
  add: "Add",
820
+ clear: "Clear",
820
821
  showOptions: "Show options",
821
822
  hide: "Hide",
822
823
  show: "Show",
@@ -966,6 +967,7 @@ const es = {
966
967
  copy: "Copiar",
967
968
  save: "Guardar",
968
969
  add: "Añadir",
970
+ clear: "Borrar",
969
971
  showOptions: "Mostrar opciones",
970
972
  hide: "Ocultar",
971
973
  show: "Mostrar",
@@ -1113,6 +1115,7 @@ const id = {
1113
1115
  copy: "Salin",
1114
1116
  save: "Simpan",
1115
1117
  add: "Tambah",
1118
+ clear: "Bersihkan",
1116
1119
  showOptions: "Tampilkan opsi",
1117
1120
  hide: "Sembunyikan",
1118
1121
  show: "Tampilkan",
@@ -5714,6 +5717,11 @@ function _TablePaginationActions({
5714
5717
  );
5715
5718
  }
5716
5719
  const TablePaginationActions = forwardRef(_TablePaginationActions);
5720
+ const ellipsisStyles = {
5721
+ textOverflow: "ellipsis",
5722
+ overflow: "hidden",
5723
+ whiteSpace: "nowrap"
5724
+ };
5717
5725
  export {
5718
5726
  APPBAR_SIZE as A,
5719
5727
  BREAKPOINTS as B,
@@ -5726,10 +5734,11 @@ export {
5726
5734
  ICON_SIZE_MEDIUM as b,
5727
5735
  ICON_SIZE_SMALL as c,
5728
5736
  MENU_LIST_MAX_SIZE as d,
5729
- MENU_ITEM_SIZE_DENSE as e,
5730
- MENU_ITEM_SIZE_EXTENDED as f,
5737
+ ellipsisStyles as e,
5738
+ MENU_ITEM_SIZE_DENSE as f,
5731
5739
  getSpacing as g,
5732
- IconButton as h,
5733
- getDefaultExportFromCjs as i,
5740
+ MENU_ITEM_SIZE_EXTENDED as h,
5741
+ IconButton as i,
5742
+ getDefaultExportFromCjs as j,
5734
5743
  useImperativeIntl as u
5735
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,