@carto/meridian-ds 2.5.5-alpha-ellipsis.1 → 2.5.5-alpha-translations.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 (80) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/dist/{Alert-wE4A0ify.js → Alert-CRVceJ9N.js} +20 -77
  3. package/dist/{Alert-CaashKPj.cjs → Alert-Dyw7Z9wJ.cjs} +22 -79
  4. package/dist/{MenuItem-BUe4eJZH.js → MenuItem-h41wtQTz.js} +1 -1
  5. package/dist/{MenuItem-BZWWJptW.cjs → MenuItem-o51jnNjL.cjs} +6 -6
  6. package/dist/{css-utils-W9dzgcXq.cjs → TablePaginationActions-CMC_ZxDN.cjs} +117 -61
  7. package/dist/{css-utils-CTJjJR0x.js → TablePaginationActions-DIFPc_wQ.js} +119 -63
  8. package/dist/components/index.cjs +163 -259
  9. package/dist/components/index.js +103 -199
  10. package/dist/theme/index.cjs +114 -108
  11. package/dist/theme/index.js +13 -7
  12. package/dist/types/components/AccordionGroup/AccordionGroup.d.ts +4 -1
  13. package/dist/types/components/AccordionGroup/AccordionGroup.d.ts.map +1 -1
  14. package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts +39 -9
  15. package/dist/types/components/AccordionGroup/AccordionGroup.stories.d.ts.map +1 -1
  16. package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts +2 -0
  17. package/dist/types/components/AccordionGroup/AccordionGroup.test.d.ts.map +1 -0
  18. package/dist/types/components/AppBar/AppBar.d.ts +3 -1
  19. package/dist/types/components/AppBar/AppBar.d.ts.map +1 -1
  20. package/dist/types/components/AppBar/AppBar.stories.d.ts +2 -2
  21. package/dist/types/components/AppBar/AppBar.stories.d.ts.map +1 -1
  22. package/dist/types/components/AppBar/AppBar.test.d.ts +2 -0
  23. package/dist/types/components/AppBar/AppBar.test.d.ts.map +1 -0
  24. package/dist/types/components/Avatar/Avatar.d.ts +4 -1
  25. package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
  26. package/dist/types/components/Avatar/Avatar.stories.d.ts +1 -2
  27. package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
  28. package/dist/types/components/Avatar/Avatar.test.d.ts +2 -0
  29. package/dist/types/components/Avatar/Avatar.test.d.ts.map +1 -0
  30. package/dist/types/components/Button/Button.d.ts +5 -0
  31. package/dist/types/components/Button/Button.d.ts.map +1 -1
  32. package/dist/types/components/Button/Button.stories.d.ts +3 -0
  33. package/dist/types/components/Button/Button.stories.d.ts.map +1 -1
  34. package/dist/types/components/Link/Link.d.ts +5 -0
  35. package/dist/types/components/Link/Link.d.ts.map +1 -1
  36. package/dist/types/components/Link/Link.stories.d.ts +9 -20
  37. package/dist/types/components/Link/Link.stories.d.ts.map +1 -1
  38. package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts +5 -2
  39. package/dist/types/components/TablePaginationActions/TablePaginationActions.d.ts.map +1 -1
  40. package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts +72 -0
  41. package/dist/types/components/TablePaginationActions/TablePaginationActions.stories.d.ts.map +1 -0
  42. package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts +2 -0
  43. package/dist/types/components/TablePaginationActions/TablePaginationActions.test.d.ts.map +1 -0
  44. package/dist/types/components/Tag/Tag.d.ts +4 -176
  45. package/dist/types/components/Tag/Tag.d.ts.map +1 -1
  46. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -2
  47. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -1
  48. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +2 -2
  49. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts.map +1 -1
  50. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts +2 -0
  51. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.test.d.ts.map +1 -0
  52. package/dist/types/components/TooltipData/TooltipData.d.ts.map +1 -1
  53. package/dist/types/components/TooltipData/TooltipData.stories.d.ts +34 -0
  54. package/dist/types/components/TooltipData/TooltipData.stories.d.ts.map +1 -0
  55. package/dist/types/components/TooltipData/TooltipData.test.d.ts +2 -0
  56. package/dist/types/components/TooltipData/TooltipData.test.d.ts.map +1 -0
  57. package/dist/types/components/index.d.ts +0 -2
  58. package/dist/types/components/index.d.ts.map +1 -1
  59. package/dist/types/theme/components/forms.d.ts.map +1 -1
  60. package/dist/types/theme/components/stories/Tooltip.stories.d.ts +0 -3
  61. package/dist/types/theme/components/stories/Tooltip.stories.d.ts.map +1 -1
  62. package/dist/types/utils/useTranslationFallback.d.ts +20 -0
  63. package/dist/types/utils/useTranslationFallback.d.ts.map +1 -0
  64. package/dist/types/utils/useTranslationFallback.test.d.ts +2 -0
  65. package/dist/types/utils/useTranslationFallback.test.d.ts.map +1 -0
  66. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +1 -1
  67. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +1 -1
  68. package/dist/widgets/index.cjs +119 -114
  69. package/dist/widgets/index.js +9 -4
  70. package/package.json +1 -1
  71. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +0 -117
  72. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts.map +0 -1
  73. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +0 -66
  74. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +0 -1
  75. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts +0 -2
  76. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts.map +0 -1
  77. package/dist/types/components/EllipsisWithTooltip/index.d.ts +0 -3
  78. package/dist/types/components/EllipsisWithTooltip/index.d.ts.map +0 -1
  79. package/dist/types/utils/css-utils.d.ts +0 -14
  80. package/dist/types/utils/css-utils.d.ts.map +0 -1
@@ -2,11 +2,11 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import React, { useMemo, useState, useEffect, useCallback, useRef, createContext, useContext, useLayoutEffect, createRef } from "react";
3
3
  import { useTheme, styled, Box, Skeleton, Grid, Link, darken, Button, Divider, TextField, InputAdornment, Checkbox, Tooltip, debounce, Slider, TableCell, Table, TableHead, TableRow, TableBody, TableContainer, TableSortLabel, TablePagination, IconButton as IconButton$1, Menu, MenuItem, SvgIcon, Icon, Collapse, LinearProgress, Typography as Typography$1, lighten, ClickAwayListener, ToggleButton, capitalize, ListItem, Chip, List, Paper, Popover, Select, ListItemText, Drawer } from "@mui/material";
4
4
  import { useIntl } from "react-intl";
5
- import { i as getDefaultExportFromCjs, u as useImperativeIntl, T as Typography, S as SPACING, B as BREAKPOINTS, a as TablePaginationActions, e as ellipsisStyles, b as ICON_SIZE_MEDIUM } from "../css-utils-CTJjJR0x.js";
5
+ import { i as getDefaultExportFromCjs, u as useImperativeIntl, T as Typography, S as SPACING, h as IconButton, B as BREAKPOINTS, a as TablePaginationActions, b as ICON_SIZE_MEDIUM } from "../TablePaginationActions-DIFPc_wQ.js";
6
6
  import _ReactEcharts from "echarts-for-react";
7
7
  import { FixedSizeList } from "react-window";
8
8
  import { S as Search, a as SwatchSquare } from "../SwatchSquare-CaaLsjAC.js";
9
- import { A as Alert, I as IconButton, L as Link$1 } from "../Alert-wE4A0ify.js";
9
+ import { A as Alert, L as Link$1 } from "../Alert-CRVceJ9N.js";
10
10
  import { ChevronLeft, ChevronRight, ExpandLess, ExpandMore, MoreVert, KeyboardArrowDown, ErrorOutline, Cancel, VisibilityOutlined, VisibilityOffOutlined, Close, LayersOutlined } from "@mui/icons-material";
11
11
  import { a as getColorByCategory, c as commonPalette, b as getPalette } from "../palette-utils-BHqJlHm9.js";
12
12
  function detectTouchscreen() {
@@ -2967,7 +2967,9 @@ const TableCellStyled = styled(TableCell)(() => ({
2967
2967
  overflow: "hidden",
2968
2968
  "& p": {
2969
2969
  maxWidth: "100%",
2970
- ...ellipsisStyles
2970
+ whiteSpace: "nowrap",
2971
+ overflow: "hidden",
2972
+ textOverflow: "ellipsis"
2971
2973
  }
2972
2974
  }));
2973
2975
  const StyledTablePagination = styled(TablePagination)(({ theme }) => ({
@@ -4915,7 +4917,10 @@ const Text = styled(Typography$1, {
4915
4917
  WebkitLineClamp: 2,
4916
4918
  WebkitBoxOrient: "vertical"
4917
4919
  },
4918
- ...!expanded && ellipsisStyles
4920
+ ...!expanded && {
4921
+ whiteSpace: "nowrap",
4922
+ textOverflow: "ellipsis"
4923
+ }
4919
4924
  }));
4920
4925
  const HeaderItems = styled(Grid)(({ theme }) => ({
4921
4926
  display: "flex",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carto/meridian-ds",
3
- "version": "2.5.5-alpha-ellipsis.1",
3
+ "version": "2.5.5-alpha-translations.1",
4
4
  "description": "CARTO Meridian Design System",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,117 +0,0 @@
1
- import { default as React, ReactNode, MutableRefObject } from 'react';
2
- import { TooltipProps } from '@mui/material';
3
- /**
4
- * Props for the EllipsisWithTooltip component.
5
- *
6
- * @interface EllipsisWithTooltipProps
7
- * @extends Omit<TooltipProps, 'title' | 'children'>
8
- */
9
- export type EllipsisWithTooltipProps = Omit<TooltipProps, 'title' | 'children'> & {
10
- /**
11
- * The content to be wrapped with ellipsis and tooltip functionality.
12
- * Can be any ReactNode (text, components, etc.).
13
- *
14
- * @example
15
- * ```tsx
16
- * <EllipsisWithTooltip>
17
- * <Typography>Long text that might overflow</Typography>
18
- * </EllipsisWithTooltip>
19
- * ```
20
- */
21
- children: ReactNode;
22
- /**
23
- * Custom tooltip text. If not provided, uses the text content of children.
24
- *
25
- * @example
26
- * ```tsx
27
- * <EllipsisWithTooltip tooltipText="Custom tooltip text">
28
- * <Typography>Some content</Typography>
29
- * </EllipsisWithTooltip>
30
- * ```
31
- */
32
- tooltipText?: string;
33
- /**
34
- * Content display mode for styling.
35
- *
36
- * @default 'block'
37
- * @example
38
- * ```tsx
39
- * <EllipsisWithTooltip content="flex">
40
- * <div>Flex content</div>
41
- * </EllipsisWithTooltip>
42
- * ```
43
- */
44
- content?: 'block' | 'flex';
45
- /**
46
- * Always show the tooltip, regardless of overflow detection.
47
- * Useful for testing or when you always want to display the tooltip.
48
- *
49
- * @default false
50
- * @example
51
- * ```tsx
52
- * <EllipsisWithTooltip alwaysShowTooltip={true}>
53
- * <Typography>Always show tooltip</Typography>
54
- * </EllipsisWithTooltip>
55
- * ```
56
- */
57
- alwaysShowTooltip?: boolean;
58
- /**
59
- * Controls which children should have ellipsis applied.
60
- * - 'first-child': Apply ellipsis only to the first child element
61
- * - 'all': Apply ellipsis to all children (default behavior)
62
- *
63
- * This is useful for layouts where you want to preserve the visibility of
64
- * secondary elements while truncating the primary content.
65
- *
66
- * @default 'all'
67
- * @example
68
- * ```tsx
69
- * <EllipsisWithTooltip ellipsisTarget="first-child">
70
- * <Typography>This long text will be ellipsed</Typography>
71
- * <Typography>This secondary text remains fully visible</Typography>
72
- * </EllipsisWithTooltip>
73
- * ```
74
- */
75
- ellipsisTarget?: 'first-child' | 'all';
76
- /**
77
- * Number of lines to display before showing ellipsis.
78
- * When greater than 1, uses CSS line-clamp for multi-line ellipsis.
79
- *
80
- * @default 1
81
- * @example
82
- * ```tsx
83
- * <EllipsisWithTooltip lines={3}>
84
- * <Typography>Long text that can wrap to multiple lines</Typography>
85
- * </EllipsisWithTooltip>
86
- * ```
87
- */
88
- lines?: number;
89
- /**
90
- * Additional props to pass to the content wrapper element.
91
- * Useful for styling or adding custom attributes.
92
- *
93
- * @example
94
- * ```tsx
95
- * <EllipsisWithTooltip contentProps={{ className: 'custom-class' }}>
96
- * <Typography>Content</Typography>
97
- * </EllipsisWithTooltip>
98
- * ```
99
- */
100
- contentProps?: object;
101
- /**
102
- * Ref to the text element for manual overflow detection.
103
- * Useful when you need to control which element is used for overflow detection.
104
- *
105
- * @example
106
- * ```tsx
107
- * const textRef = useRef<HTMLElement>(null);
108
- * <EllipsisWithTooltip textRef={textRef}>
109
- * <Typography ref={textRef}>Content</Typography>
110
- * </EllipsisWithTooltip>
111
- * ```
112
- */
113
- textRef?: MutableRefObject<HTMLElement | null>;
114
- };
115
- declare const EllipsisWithTooltip: React.ForwardRefExoticComponent<Omit<EllipsisWithTooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
116
- export default EllipsisWithTooltip;
117
- //# sourceMappingURL=EllipsisWithTooltip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EllipsisWithTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/EllipsisWithTooltip/EllipsisWithTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAMZ,SAAS,EACT,gBAAgB,EACjB,MAAM,OAAO,CAAA;AACd,OAAO,EAAW,YAAY,EAAU,MAAM,eAAe,CAAA;AAG7D;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,YAAY,EACZ,OAAO,GAAG,UAAU,CACrB,GAAG;IACF;;;;;;;;;;OAUG;IACH,QAAQ,EAAE,SAAS,CAAA;IAEnB;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAE1B;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAE3B;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,CAAC,EAAE,aAAa,GAAG,KAAK,CAAA;IAEtC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CAC/C,CAAA;AA8LD,QAAA,MAAM,mBAAmB,8GAAmC,CAAA;AAE5D,eAAe,mBAAmB,CAAA"}
@@ -1,66 +0,0 @@
1
- import { default as React } from 'react';
2
- declare const options: {
3
- title: string;
4
- component: React.ForwardRefExoticComponent<Omit<import('..').EllipsisWithTooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
- argTypes: {
6
- ellipsisTarget: {
7
- control: "select";
8
- options: string[];
9
- description: string;
10
- };
11
- content: {
12
- control: "select";
13
- options: string[];
14
- description: string;
15
- };
16
- alwaysShowTooltip: {
17
- control: "boolean";
18
- description: string;
19
- };
20
- lines: {
21
- control: "number";
22
- description: string;
23
- };
24
- tooltipText: {
25
- control: "text";
26
- };
27
- children: {
28
- control: "text";
29
- description: string;
30
- };
31
- };
32
- args: {
33
- children: import("react/jsx-runtime").JSX.Element;
34
- };
35
- };
36
- export default options;
37
- export declare const Playground: {
38
- render: import('@storybook/core/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, Omit<import('..').EllipsisWithTooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
39
- };
40
- export declare const EllipsisTarget: {
41
- render: import('@storybook/core/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, Omit<import('..').EllipsisWithTooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
42
- };
43
- export declare const Lines: {
44
- render: import('@storybook/core/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, Omit<import('..').EllipsisWithTooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
45
- argTypes: {
46
- ellipsisTarget: {
47
- table: {
48
- disable: boolean;
49
- };
50
- };
51
- };
52
- };
53
- export declare const Content: {
54
- render: import('@storybook/core/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, Omit<import('..').EllipsisWithTooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
55
- };
56
- export declare const AlwaysShowTooltip: {
57
- render: import('@storybook/core/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, Omit<import('..').EllipsisWithTooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
58
- args: {
59
- alwaysShowTooltip: boolean;
60
- children: import("react/jsx-runtime").JSX.Element;
61
- };
62
- };
63
- export declare const Composition: {
64
- render: import('@storybook/core/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, Omit<import('..').EllipsisWithTooltipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
65
- };
66
- //# sourceMappingURL=EllipsisWithTooltip.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EllipsisWithTooltip.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAUrC,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCG,CAAA;AA0OhB,eAAe,OAAO,CAAA;AAEtB,eAAO,MAAM,UAAU;;CAEtB,CAAA;AAED,eAAO,MAAM,cAAc;;CAE1B,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;CAMjB,CAAA;AAED,eAAO,MAAM,OAAO;;CAEnB,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;;CAU7B,CAAA;AAED,eAAO,MAAM,WAAW;;CAEvB,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=EllipsisWithTooltip.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EllipsisWithTooltip.test.d.ts","sourceRoot":"","sources":["../../../../src/components/EllipsisWithTooltip/EllipsisWithTooltip.test.tsx"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export { default as EllipsisWithTooltip } from './EllipsisWithTooltip';
2
- export type * from './EllipsisWithTooltip';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/EllipsisWithTooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACtE,mBAAmB,uBAAuB,CAAA"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Common CSS utility styles for the design system.
3
- * These styles can be reused across components to ensure consistency.
4
- */
5
- /**
6
- * Standard ellipsis styles for text truncation.
7
- * Used for single-line text overflow with ellipsis.
8
- */
9
- export declare const ellipsisStyles: {
10
- readonly textOverflow: "ellipsis";
11
- readonly overflow: "hidden";
12
- readonly whiteSpace: "nowrap";
13
- };
14
- //# sourceMappingURL=css-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"css-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/css-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;CAIjB,CAAA"}