@carto/meridian-ds 2.5.5 → 2.6.0
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/CHANGELOG.md +7 -0
- package/dist/{Alert-lLA0z7fX.js → Alert-DHd9hCGz.js} +20 -77
- package/dist/{Alert-BdmDjcVc.cjs → Alert-DOeOwxOe.cjs} +22 -79
- package/dist/{MenuItem-nokUtiks.cjs → MenuItem-CYJN2OVU.cjs} +6 -6
- package/dist/{MenuItem-ZNdBUBvt.js → MenuItem-MUmADf3e.js} +1 -1
- package/dist/components/index.cjs +309 -112
- package/dist/components/index.js +249 -52
- package/dist/{TablePaginationActions-DAMGtIub.cjs → css-utils-CCi3p7os.cjs} +123 -55
- package/dist/{TablePaginationActions-C6TVGJM-.js → css-utils-WejOmkiI.js} +126 -58
- package/dist/theme/index.cjs +108 -114
- package/dist/theme/index.js +7 -13
- package/dist/types/components/AccordionGroup/AccordionGroup.d.ts +4 -1
- package/dist/types/components/AccordionGroup/AccordionGroup.d.ts.map +1 -1
- package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts +39 -9
- package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts.map +1 -1
- package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts +2 -0
- package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts.map +1 -0
- package/dist/types/components/AppBar/AppBar.d.ts +3 -1
- package/dist/types/components/AppBar/AppBar.d.ts.map +1 -1
- package/dist/types/components/AppBar/AppBar.stories.d.ts +2 -2
- package/dist/types/components/AppBar/AppBar.stories.d.ts.map +1 -1
- package/dist/types/components/AppBar/AppBar.test.d.ts +2 -0
- package/dist/types/components/AppBar/AppBar.test.d.ts.map +1 -0
- package/dist/types/components/Avatar/Avatar.d.ts +4 -1
- package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/Avatar/Avatar.stories.d.ts +1 -2
- package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/types/components/Avatar/Avatar.test.d.ts +2 -0
- package/dist/types/components/Avatar/Avatar.test.d.ts.map +1 -0
- package/dist/types/components/Button/Button.d.ts +5 -0
- package/dist/types/components/Button/Button.d.ts.map +1 -1
- package/dist/types/components/Button/Button.stories.d.ts +3 -0
- package/dist/types/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +117 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts.map +1 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +66 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +1 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts +2 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts.map +1 -0
- package/dist/types/components/EllipsisWithTooltip/index.d.ts +3 -0
- package/dist/types/components/EllipsisWithTooltip/index.d.ts.map +1 -0
- package/dist/types/components/Link/Link.d.ts +5 -0
- package/dist/types/components/Link/Link.d.ts.map +1 -1
- package/dist/types/components/Link/Link.stories.d.ts +9 -27
- package/dist/types/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts +5 -2
- package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts.map +1 -1
- package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts +72 -0
- package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts.map +1 -0
- package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts +2 -0
- package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts.map +1 -0
- package/dist/types/components/Tag/Tag.d.ts +176 -4
- package/dist/types/components/Tag/Tag.d.ts.map +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -2
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +2 -2
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts.map +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts +2 -0
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts.map +1 -0
- package/dist/types/components/TooltipData/TooltipData.d.ts.map +1 -1
- package/dist/types/components/TooltipData/TooltipData.stories.d.ts +34 -0
- package/dist/types/components/TooltipData/TooltipData.stories.d.ts.map +1 -0
- package/dist/types/components/TooltipData/TooltipData.test.d.ts +2 -0
- package/dist/types/components/TooltipData/TooltipData.test.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/theme/components/forms.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Tooltip.stories.d.ts +0 -3
- package/dist/types/theme/components/stories/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/utils/css-utils.d.ts +14 -0
- package/dist/types/utils/css-utils.d.ts.map +1 -0
- package/dist/types/utils/useTranslationFallback.d.ts +20 -0
- package/dist/types/utils/useTranslationFallback.d.ts.map +1 -0
- package/dist/types/utils/useTranslationFallback.test.d.ts +2 -0
- package/dist/types/utils/useTranslationFallback.test.d.ts.map +1 -0
- package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +1 -1
- package/dist/widgets/index.cjs +114 -119
- package/dist/widgets/index.js +4 -9
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
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
|
-
import {
|
|
4
|
-
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, Toolbar, AppBar as AppBar$1, 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";
|
|
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";
|
|
5
4
|
import { OpenInNewOutlined, VisibilityOffOutlined, VisibilityOutlined, Cancel, ContentCopyOutlined, AddCircleOutlineOutlined, MenuOutlined, MoreVertOutlined, HelpOutline, ErrorOutline, CloseOutlined, Check, TodayOutlined } from "@mui/icons-material";
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { u as useTranslationFallback, S as ScreenReaderOnly, A as Alert$1 } from "../Alert-DHd9hCGz.js";
|
|
6
|
+
import { L } from "../Alert-DHd9hCGz.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, N as NOTIFICATION_DURATION_IN_MS, e as ellipsisStyles } from "../css-utils-WejOmkiI.js";
|
|
8
|
+
import { a } from "../css-utils-WejOmkiI.js";
|
|
10
9
|
import { A as ArrowDown } from "../ArrowDown-d6bxUL0F.js";
|
|
11
10
|
import { A as ArrowUp, O as OpenDiagonallyRight, C as CloseDiagonallyRight } from "../OpenDiagonallyRight-CGdCEXlF.js";
|
|
12
|
-
import {
|
|
11
|
+
import { useIntl } from "react-intl";
|
|
12
|
+
import { M as MenuItem$1 } from "../MenuItem-MUmADf3e.js";
|
|
13
13
|
import "cartocolor";
|
|
14
14
|
import { FixedSizeList } from "react-window";
|
|
15
15
|
import { Controlled, UnControlled } from "react-codemirror2";
|
|
@@ -65,11 +65,14 @@ function _Button({
|
|
|
65
65
|
loadingPosition,
|
|
66
66
|
external,
|
|
67
67
|
showExternalIcon = true,
|
|
68
|
+
screenReaderText,
|
|
68
69
|
"aria-describedby": ariaDescribedby,
|
|
69
70
|
...otherProps
|
|
70
71
|
}, ref) {
|
|
71
|
-
const
|
|
72
|
-
|
|
72
|
+
const screenReaderTextValue = useTranslationFallback(
|
|
73
|
+
"c4r.button.opensInNewTab",
|
|
74
|
+
screenReaderText
|
|
75
|
+
);
|
|
73
76
|
const defaultIconLoader = /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" });
|
|
74
77
|
const isDefaultLoading = loading && loadingPosition === void 0;
|
|
75
78
|
const isExternalLink = otherProps.href && external;
|
|
@@ -83,9 +86,7 @@ function _Button({
|
|
|
83
86
|
if (isExternalLink) {
|
|
84
87
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
85
88
|
children,
|
|
86
|
-
/* @__PURE__ */ jsx(ScreenReaderOnly, { id: "external-hint", children:
|
|
87
|
-
id: "c4r.button.opensInNewTab"
|
|
88
|
-
})})` })
|
|
89
|
+
/* @__PURE__ */ jsx(ScreenReaderOnly, { id: "external-hint", children: screenReaderTextValue })
|
|
89
90
|
] });
|
|
90
91
|
}
|
|
91
92
|
return children;
|
|
@@ -816,24 +817,36 @@ const StyledToggleButtonGroup = styled(ToggleButtonGroup$1, {
|
|
|
816
817
|
backgroundColor: "transparent"
|
|
817
818
|
}
|
|
818
819
|
}));
|
|
819
|
-
function
|
|
820
|
+
function _ToggleButtonGroup({
|
|
820
821
|
children,
|
|
821
822
|
variant = "floating",
|
|
822
823
|
backgroundColor,
|
|
824
|
+
orientation,
|
|
825
|
+
size,
|
|
823
826
|
...rest
|
|
824
|
-
}) {
|
|
827
|
+
}, ref) {
|
|
825
828
|
const isUnbounded = variant === "unbounded";
|
|
826
829
|
const defaultColor = isUnbounded ? "transparent" : "primary";
|
|
830
|
+
const resolvedBackgroundColor = backgroundColor ?? defaultColor;
|
|
827
831
|
return /* @__PURE__ */ jsx(
|
|
828
832
|
StyledToggleButtonGroup,
|
|
829
833
|
{
|
|
830
834
|
...rest,
|
|
831
835
|
variant,
|
|
832
|
-
backgroundColor:
|
|
836
|
+
backgroundColor: resolvedBackgroundColor,
|
|
837
|
+
orientation,
|
|
838
|
+
size,
|
|
839
|
+
"data-orientation": orientation,
|
|
840
|
+
"data-variant": variant,
|
|
841
|
+
"data-size": size,
|
|
842
|
+
"data-background-color": resolvedBackgroundColor,
|
|
843
|
+
"data-name": "toggle-button-group",
|
|
844
|
+
ref,
|
|
833
845
|
children
|
|
834
846
|
}
|
|
835
847
|
);
|
|
836
848
|
}
|
|
849
|
+
const ToggleButtonGroup = forwardRef(_ToggleButtonGroup);
|
|
837
850
|
async function copyString(value) {
|
|
838
851
|
return await navigator.clipboard.writeText(value);
|
|
839
852
|
}
|
|
@@ -1856,14 +1869,14 @@ const BrandElements = styled("div")(({ theme }) => ({
|
|
|
1856
1869
|
minWidth: "192px"
|
|
1857
1870
|
}
|
|
1858
1871
|
}));
|
|
1859
|
-
const Content$
|
|
1872
|
+
const Content$5 = styled("div")(({ theme }) => ({
|
|
1860
1873
|
display: "flex",
|
|
1861
1874
|
alignItems: "center",
|
|
1862
1875
|
justifyContent: "space-between",
|
|
1863
1876
|
flex: 1,
|
|
1864
1877
|
marginLeft: theme.spacing(1)
|
|
1865
1878
|
}));
|
|
1866
|
-
function
|
|
1879
|
+
function _AppBar({
|
|
1867
1880
|
children,
|
|
1868
1881
|
brandLogo,
|
|
1869
1882
|
brandText,
|
|
@@ -1871,17 +1884,18 @@ function AppBar({
|
|
|
1871
1884
|
showBurgerMenu = false,
|
|
1872
1885
|
onClickMenu,
|
|
1873
1886
|
...otherProps
|
|
1874
|
-
}) {
|
|
1875
|
-
return /* @__PURE__ */ jsx(Root$4, { ...otherProps, children: /* @__PURE__ */ jsxs(Toolbar, { children: [
|
|
1887
|
+
}, ref) {
|
|
1888
|
+
return /* @__PURE__ */ jsx(Root$4, { ...otherProps, ref, "data-name": "app-bar", children: /* @__PURE__ */ jsxs(Toolbar, { children: [
|
|
1876
1889
|
/* @__PURE__ */ jsxs(BrandElements, { children: [
|
|
1877
1890
|
showBurgerMenu && /* @__PURE__ */ jsx(BurgerMenu, { onClickMenu }),
|
|
1878
1891
|
brandLogo && /* @__PURE__ */ jsx(BrandLogo, { logo: brandLogo }),
|
|
1879
1892
|
brandText && /* @__PURE__ */ jsx(BrandText, { text: brandText }),
|
|
1880
1893
|
secondaryText && /* @__PURE__ */ jsx(SecondaryText, { text: secondaryText })
|
|
1881
1894
|
] }),
|
|
1882
|
-
/* @__PURE__ */ jsx(Content$
|
|
1895
|
+
/* @__PURE__ */ jsx(Content$5, { children })
|
|
1883
1896
|
] }) });
|
|
1884
1897
|
}
|
|
1898
|
+
const AppBar = forwardRef(_AppBar);
|
|
1885
1899
|
const Footer = styled(Box, {
|
|
1886
1900
|
shouldForwardProp: (prop) => !["withGutter", "disabled"].includes(prop)
|
|
1887
1901
|
})(
|
|
@@ -3158,7 +3172,7 @@ function DialogHeader({
|
|
|
3158
3172
|
children && /* @__PURE__ */ jsx(DividerBottom, {})
|
|
3159
3173
|
] });
|
|
3160
3174
|
}
|
|
3161
|
-
const Content$
|
|
3175
|
+
const Content$4 = styled(DialogContent$1, {
|
|
3162
3176
|
shouldForwardProp: (prop) => !["scrollableContent", "withGutter", "withBottomGutter"].includes(prop)
|
|
3163
3177
|
})(({ theme, scrollableContent, withGutter, withBottomGutter }) => ({
|
|
3164
3178
|
display: "flex",
|
|
@@ -3235,7 +3249,7 @@ function _DialogContent({
|
|
|
3235
3249
|
return () => resizeObserver.disconnect();
|
|
3236
3250
|
}, [contentRef, updateBorders]);
|
|
3237
3251
|
return /* @__PURE__ */ jsx(
|
|
3238
|
-
Content$
|
|
3252
|
+
Content$4,
|
|
3239
3253
|
{
|
|
3240
3254
|
ref: setContentRef,
|
|
3241
3255
|
onScroll: handleScroll,
|
|
@@ -3534,7 +3548,7 @@ function DialogStepper({
|
|
|
3534
3548
|
);
|
|
3535
3549
|
}) }) });
|
|
3536
3550
|
}
|
|
3537
|
-
const Content$
|
|
3551
|
+
const Content$3 = styled(DialogContent, {
|
|
3538
3552
|
shouldForwardProp: (prop) => !["error", "withBorder"].includes(prop)
|
|
3539
3553
|
})(
|
|
3540
3554
|
({ error, withBorder, theme }) => ({
|
|
@@ -3563,7 +3577,7 @@ function CodeAreaDialogContent({
|
|
|
3563
3577
|
withGutter = false
|
|
3564
3578
|
}) {
|
|
3565
3579
|
if (!children) return null;
|
|
3566
|
-
return /* @__PURE__ */ jsx(Content$
|
|
3580
|
+
return /* @__PURE__ */ jsx(Content$3, { withGutter, error, withBorder, children });
|
|
3567
3581
|
}
|
|
3568
3582
|
function CodeAreaDialogConfirmation({
|
|
3569
3583
|
onClose,
|
|
@@ -4503,7 +4517,7 @@ function DateTimePicker({
|
|
|
4503
4517
|
);
|
|
4504
4518
|
}
|
|
4505
4519
|
const DEFAULT_ITEMS = [{ outlinedBullet: false, value: "" }];
|
|
4506
|
-
const Content$
|
|
4520
|
+
const Content$2 = styled("ul")(({ theme }) => ({
|
|
4507
4521
|
listStyle: "none",
|
|
4508
4522
|
paddingLeft: 0,
|
|
4509
4523
|
margin: theme.spacing(0.5, 0, 0, 0)
|
|
@@ -4534,14 +4548,16 @@ function TooltipData({
|
|
|
4534
4548
|
}) {
|
|
4535
4549
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4536
4550
|
title && /* @__PURE__ */ jsx(Typography, { color: "inherit", variant: "caption", weight: "medium", children: title }),
|
|
4537
|
-
/* @__PURE__ */ jsx(Content$
|
|
4551
|
+
/* @__PURE__ */ jsx(Content$2, { children: items.map((item, index) => /* @__PURE__ */ jsxs(Entry, { children: [
|
|
4538
4552
|
/* @__PURE__ */ jsx(
|
|
4539
4553
|
Bullet,
|
|
4540
4554
|
{
|
|
4541
4555
|
style: {
|
|
4542
4556
|
backgroundColor: `${item.outlinedBullet ? "transparent" : item.color}`,
|
|
4543
4557
|
borderColor: item.color
|
|
4544
|
-
}
|
|
4558
|
+
},
|
|
4559
|
+
role: "presentation",
|
|
4560
|
+
"data-bullet": item.outlinedBullet ? "outlined" : "filled"
|
|
4545
4561
|
}
|
|
4546
4562
|
),
|
|
4547
4563
|
item.category && /* @__PURE__ */ jsx(Category, { color: "inherit", variant: "caption", children: item.category }),
|
|
@@ -4559,32 +4575,47 @@ const AccordionContainer = styled("div", {
|
|
|
4559
4575
|
boxShadow: `inset 0 0 0 1px ${theme.palette.divider}`
|
|
4560
4576
|
}
|
|
4561
4577
|
}));
|
|
4562
|
-
function
|
|
4578
|
+
function _AccordionGroup({
|
|
4563
4579
|
variant = "standard",
|
|
4564
4580
|
items,
|
|
4581
|
+
"aria-label": ariaLabel,
|
|
4582
|
+
"data-testid": dataTestId,
|
|
4565
4583
|
...otherProps
|
|
4566
|
-
}) {
|
|
4567
|
-
return /* @__PURE__ */ jsx(
|
|
4568
|
-
|
|
4584
|
+
}, ref) {
|
|
4585
|
+
return /* @__PURE__ */ jsx(
|
|
4586
|
+
AccordionContainer,
|
|
4569
4587
|
{
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4588
|
+
...otherProps,
|
|
4589
|
+
variant,
|
|
4590
|
+
"aria-label": ariaLabel,
|
|
4591
|
+
"data-testid": dataTestId,
|
|
4592
|
+
"data-variant": variant,
|
|
4593
|
+
"data-name": "accordion-group",
|
|
4594
|
+
ref,
|
|
4595
|
+
children: items.map((item, index) => /* @__PURE__ */ jsxs(
|
|
4596
|
+
Accordion,
|
|
4597
|
+
{
|
|
4598
|
+
disabled: item.disabled,
|
|
4599
|
+
defaultExpanded: item.defaultExpanded,
|
|
4600
|
+
onChange: item.onChange,
|
|
4601
|
+
children: [
|
|
4602
|
+
/* @__PURE__ */ jsx(
|
|
4603
|
+
AccordionSummary,
|
|
4604
|
+
{
|
|
4605
|
+
"aria-controls": `${index}-content`,
|
|
4606
|
+
id: `${index}-header`,
|
|
4607
|
+
children: item.summary
|
|
4608
|
+
}
|
|
4609
|
+
),
|
|
4610
|
+
/* @__PURE__ */ jsx(AccordionDetails, { children: item.content })
|
|
4611
|
+
]
|
|
4612
|
+
},
|
|
4613
|
+
index
|
|
4614
|
+
))
|
|
4615
|
+
}
|
|
4616
|
+
);
|
|
4587
4617
|
}
|
|
4618
|
+
const AccordionGroup = forwardRef(_AccordionGroup);
|
|
4588
4619
|
const sizes = {
|
|
4589
4620
|
large: 5,
|
|
4590
4621
|
medium: 4,
|
|
@@ -4616,9 +4647,29 @@ const StyledAvatar = styled(Avatar$1, {
|
|
|
4616
4647
|
opacity: 0.6
|
|
4617
4648
|
}
|
|
4618
4649
|
}));
|
|
4619
|
-
function
|
|
4620
|
-
|
|
4650
|
+
function _Avatar({
|
|
4651
|
+
size,
|
|
4652
|
+
disabled,
|
|
4653
|
+
"aria-label": ariaLabel,
|
|
4654
|
+
"data-testid": dataTestId,
|
|
4655
|
+
...otherProps
|
|
4656
|
+
}, ref) {
|
|
4657
|
+
return /* @__PURE__ */ jsx(
|
|
4658
|
+
StyledAvatar,
|
|
4659
|
+
{
|
|
4660
|
+
...otherProps,
|
|
4661
|
+
ref,
|
|
4662
|
+
size,
|
|
4663
|
+
"aria-disabled": disabled,
|
|
4664
|
+
disabled,
|
|
4665
|
+
"aria-label": ariaLabel,
|
|
4666
|
+
"data-testid": dataTestId,
|
|
4667
|
+
"data-size": size,
|
|
4668
|
+
"data-name": "avatar"
|
|
4669
|
+
}
|
|
4670
|
+
);
|
|
4621
4671
|
}
|
|
4672
|
+
const Avatar = forwardRef(_Avatar);
|
|
4622
4673
|
const StyledMenu = styled(Menu$2, {
|
|
4623
4674
|
shouldForwardProp: (prop) => !["extended", "width", "height"].includes(prop)
|
|
4624
4675
|
})(({ extended, width, height }) => ({
|
|
@@ -4908,7 +4959,7 @@ const SnackbarRoot = styled(Snackbar$1)(({ theme }) => ({
|
|
|
4908
4959
|
maxWidth: `${MAX_WIDTH}px`
|
|
4909
4960
|
}
|
|
4910
4961
|
}));
|
|
4911
|
-
const Content = styled(Box, {
|
|
4962
|
+
const Content$1 = styled(Box, {
|
|
4912
4963
|
shouldForwardProp: (prop) => prop !== "autoWidth"
|
|
4913
4964
|
})(({ autoWidth, theme }) => ({
|
|
4914
4965
|
minWidth: "100%",
|
|
@@ -5017,7 +5068,7 @@ function Snackbar({
|
|
|
5017
5068
|
TransitionComponent: autoWidth ? Fade : Slide,
|
|
5018
5069
|
"data-auto-width": autoWidth,
|
|
5019
5070
|
children: /* @__PURE__ */ jsxs(
|
|
5020
|
-
Content,
|
|
5071
|
+
Content$1,
|
|
5021
5072
|
{
|
|
5022
5073
|
sx: {
|
|
5023
5074
|
position: "relative"
|
|
@@ -5166,6 +5217,7 @@ const TagRoot = styled("div", {
|
|
|
5166
5217
|
padding: theme.spacing(0, 0.5),
|
|
5167
5218
|
borderRadius: theme.spacing(0.25),
|
|
5168
5219
|
gap: theme.spacing(0.5),
|
|
5220
|
+
maxWidth: "100%",
|
|
5169
5221
|
height: theme.spacing(2),
|
|
5170
5222
|
borderWidth: "1px",
|
|
5171
5223
|
borderStyle: "solid",
|
|
@@ -5196,6 +5248,7 @@ const TagLabel = styled("div", {
|
|
|
5196
5248
|
})(({ type, theme }) => ({
|
|
5197
5249
|
display: "flex",
|
|
5198
5250
|
alignItems: "center",
|
|
5251
|
+
...ellipsisStyles,
|
|
5199
5252
|
paddingTop: type === "code" ? theme.spacing(0.25) : void 0
|
|
5200
5253
|
}));
|
|
5201
5254
|
function _Tag({
|
|
@@ -5524,6 +5577,149 @@ function _UploadField({
|
|
|
5524
5577
|
] });
|
|
5525
5578
|
}
|
|
5526
5579
|
const UploadField = forwardRef(_UploadField);
|
|
5580
|
+
const TooltipRoot = styled(Tooltip)(() => ({
|
|
5581
|
+
whiteSpace: "nowrap",
|
|
5582
|
+
maxWidth: 999,
|
|
5583
|
+
pointerEvents: "auto"
|
|
5584
|
+
}));
|
|
5585
|
+
const Content = styled("span", {
|
|
5586
|
+
shouldForwardProp: (prop) => !["ellipsisTarget", "lines", "content"].includes(prop)
|
|
5587
|
+
})(({ ellipsisTarget = "all", lines = 1, content = "block" }) => {
|
|
5588
|
+
if (lines > 1) {
|
|
5589
|
+
return {
|
|
5590
|
+
display: "-webkit-box",
|
|
5591
|
+
...ellipsisStyles,
|
|
5592
|
+
whiteSpace: "initial !important",
|
|
5593
|
+
WebkitLineClamp: lines,
|
|
5594
|
+
WebkitBoxOrient: "vertical",
|
|
5595
|
+
"& > *": { display: "block" }
|
|
5596
|
+
};
|
|
5597
|
+
}
|
|
5598
|
+
if (ellipsisTarget === "first-child") {
|
|
5599
|
+
return {
|
|
5600
|
+
display: "flex",
|
|
5601
|
+
flex: "1",
|
|
5602
|
+
overflow: "hidden",
|
|
5603
|
+
"& > *:nth-of-type(1)": {
|
|
5604
|
+
display: "block",
|
|
5605
|
+
...ellipsisStyles,
|
|
5606
|
+
marginRight: "-0.15em"
|
|
5607
|
+
// Prevent ellipsis separation
|
|
5608
|
+
}
|
|
5609
|
+
};
|
|
5610
|
+
}
|
|
5611
|
+
if (content === "flex") {
|
|
5612
|
+
return {
|
|
5613
|
+
display: "flex",
|
|
5614
|
+
flex: "1",
|
|
5615
|
+
"& > *": {
|
|
5616
|
+
display: "block",
|
|
5617
|
+
...ellipsisStyles
|
|
5618
|
+
}
|
|
5619
|
+
};
|
|
5620
|
+
}
|
|
5621
|
+
return {
|
|
5622
|
+
display: "block",
|
|
5623
|
+
...ellipsisStyles,
|
|
5624
|
+
fontWeight: "inherit",
|
|
5625
|
+
"& > *": { display: "inline" }
|
|
5626
|
+
};
|
|
5627
|
+
});
|
|
5628
|
+
function _EllipsisWithTooltip({
|
|
5629
|
+
children,
|
|
5630
|
+
tooltipText,
|
|
5631
|
+
alwaysShowTooltip,
|
|
5632
|
+
content = "block",
|
|
5633
|
+
textRef: inputTextRef,
|
|
5634
|
+
ellipsisTarget = "all",
|
|
5635
|
+
lines = 1,
|
|
5636
|
+
"aria-label": ariaLabel,
|
|
5637
|
+
contentProps,
|
|
5638
|
+
...otherProps
|
|
5639
|
+
}, ref) {
|
|
5640
|
+
var _a;
|
|
5641
|
+
const textElementRef = useRef(null);
|
|
5642
|
+
const [overflowing, setOverflowing] = useState(false);
|
|
5643
|
+
const textRef = useMemo(
|
|
5644
|
+
() => inputTextRef || textElementRef,
|
|
5645
|
+
[inputTextRef, textElementRef]
|
|
5646
|
+
);
|
|
5647
|
+
const getTextContent = (node) => {
|
|
5648
|
+
if (typeof node === "string") return node;
|
|
5649
|
+
if (typeof node === "number") return String(node);
|
|
5650
|
+
if (React.isValidElement(node)) {
|
|
5651
|
+
const props = node.props;
|
|
5652
|
+
if (props.children) {
|
|
5653
|
+
return getTextContent(props.children);
|
|
5654
|
+
}
|
|
5655
|
+
}
|
|
5656
|
+
return "";
|
|
5657
|
+
};
|
|
5658
|
+
const elementTitle = tooltipText || ((_a = textElementRef.current) == null ? void 0 : _a.innerText) || (alwaysShowTooltip || overflowing ? getTextContent(children) : "");
|
|
5659
|
+
useEffect(() => {
|
|
5660
|
+
const container = textRef.current;
|
|
5661
|
+
if (!container || !children) return;
|
|
5662
|
+
if (alwaysShowTooltip) {
|
|
5663
|
+
setOverflowing(true);
|
|
5664
|
+
return;
|
|
5665
|
+
}
|
|
5666
|
+
let isOverflowing = false;
|
|
5667
|
+
if (lines > 1) {
|
|
5668
|
+
isOverflowing = container.scrollHeight > container.clientHeight;
|
|
5669
|
+
} else if (ellipsisTarget === "first-child") {
|
|
5670
|
+
const children2 = Array.from(container.children);
|
|
5671
|
+
const totalWidth = children2.reduce(
|
|
5672
|
+
(sum, child) => sum + ((child == null ? void 0 : child.scrollWidth) || 0),
|
|
5673
|
+
0
|
|
5674
|
+
);
|
|
5675
|
+
isOverflowing = totalWidth > container.clientWidth;
|
|
5676
|
+
} else {
|
|
5677
|
+
const hasContainerOverflow = container.scrollWidth > container.clientWidth;
|
|
5678
|
+
const children2 = Array.from(container.children);
|
|
5679
|
+
const hasChildOverflow = children2.some(
|
|
5680
|
+
(child) => child.scrollWidth > child.clientWidth
|
|
5681
|
+
);
|
|
5682
|
+
isOverflowing = hasContainerOverflow || hasChildOverflow;
|
|
5683
|
+
}
|
|
5684
|
+
setOverflowing(isOverflowing);
|
|
5685
|
+
}, [textRef, alwaysShowTooltip, children, ellipsisTarget, lines, content]);
|
|
5686
|
+
useEffect(() => {
|
|
5687
|
+
if (typeof ref === "function") {
|
|
5688
|
+
ref(textElementRef.current);
|
|
5689
|
+
} else if (ref) {
|
|
5690
|
+
ref.current = textElementRef.current;
|
|
5691
|
+
}
|
|
5692
|
+
}, [ref]);
|
|
5693
|
+
return /* @__PURE__ */ jsx(
|
|
5694
|
+
TooltipRoot,
|
|
5695
|
+
{
|
|
5696
|
+
disableFocusListener: !overflowing && !alwaysShowTooltip,
|
|
5697
|
+
disableHoverListener: !overflowing && !alwaysShowTooltip,
|
|
5698
|
+
disableTouchListener: !overflowing && !alwaysShowTooltip,
|
|
5699
|
+
title: elementTitle,
|
|
5700
|
+
describeChild: true,
|
|
5701
|
+
...otherProps,
|
|
5702
|
+
children: /* @__PURE__ */ jsx(
|
|
5703
|
+
Content,
|
|
5704
|
+
{
|
|
5705
|
+
"aria-label": ariaLabel ?? elementTitle,
|
|
5706
|
+
ref: textElementRef,
|
|
5707
|
+
ellipsisTarget,
|
|
5708
|
+
lines,
|
|
5709
|
+
content,
|
|
5710
|
+
"data-name": "ellipsis-with-tooltip",
|
|
5711
|
+
"data-overflowing": overflowing,
|
|
5712
|
+
"data-lines": lines,
|
|
5713
|
+
"data-content": content,
|
|
5714
|
+
"data-ellipsis-target": ellipsisTarget,
|
|
5715
|
+
...contentProps,
|
|
5716
|
+
children
|
|
5717
|
+
}
|
|
5718
|
+
)
|
|
5719
|
+
}
|
|
5720
|
+
);
|
|
5721
|
+
}
|
|
5722
|
+
const EllipsisWithTooltip = forwardRef(_EllipsisWithTooltip);
|
|
5527
5723
|
export {
|
|
5528
5724
|
AUTOCOMPLETE_GROUP_HEADER_PROPERTY,
|
|
5529
5725
|
AccordionGroup,
|
|
@@ -5558,6 +5754,7 @@ export {
|
|
|
5558
5754
|
DialogHeader,
|
|
5559
5755
|
DialogPaper,
|
|
5560
5756
|
DialogStepper,
|
|
5757
|
+
EllipsisWithTooltip,
|
|
5561
5758
|
FilterDropdown,
|
|
5562
5759
|
FilterDropdownMenuItem,
|
|
5563
5760
|
IconButton,
|