@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionGroup.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AccordionGroup/AccordionGroup.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { AppBarProps as MUIAppBarProps } from '@mui/material';
|
|
2
3
|
export type AppBarProps = MUIAppBarProps & {
|
|
3
4
|
children: React.ReactNode;
|
|
@@ -7,5 +8,6 @@ export type AppBarProps = MUIAppBarProps & {
|
|
|
7
8
|
onClickMenu?: (ev: React.MouseEvent) => void;
|
|
8
9
|
showBurgerMenu?: boolean;
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
+
declare const AppBar: React.ForwardRefExoticComponent<Omit<AppBarProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
12
|
+
export default AppBar;
|
|
11
13
|
//# sourceMappingURL=AppBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../../../src/components/AppBar/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,IAAI,cAAc,EAG9B,MAAM,eAAe,CAAA;AAMtB,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAA;IAC5C,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;
|
|
1
|
+
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../../../src/components/AppBar/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAA;AACvD,OAAO,EAEL,WAAW,IAAI,cAAc,EAG9B,MAAM,eAAe,CAAA;AAMtB,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAA;IAC5C,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AA8DD,QAAA,MAAM,MAAM,8FAAsB,CAAA;AAClC,eAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AppBarProps } from './AppBar';
|
|
2
2
|
declare const options: {
|
|
3
3
|
title: string;
|
|
4
|
-
component:
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<Omit<AppBarProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
5
5
|
args: {
|
|
6
6
|
showBurgerMenu: boolean;
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBar.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/AppBar/AppBar.stories.tsx"],"names":[],"mappings":"AAaA,
|
|
1
|
+
{"version":3,"file":"AppBar.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/AppBar/AppBar.stories.tsx"],"names":[],"mappings":"AAaA,OAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAY9C,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCG,CAAA;AAChB,eAAe,OAAO,CAAA;AAmHtB,eAAO,MAAM,KAAK;mBAjHM,WAAW;;;;;;;CAoHlC,CAAA;AAED,eAAO,MAAM,WAAW;mBA3GM,WAAW;;;;;;;CA8GxC,CAAA;AAED,eAAO,MAAM,cAAc;mBAzEK,WAAW;;;;;;;CA+E1C,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;CAKjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppBar.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AppBar/AppBar.test.tsx"],"names":[],"mappings":""}
|
|
@@ -2,6 +2,9 @@ import { AvatarProps as MUIAvatarProps } from '@mui/material';
|
|
|
2
2
|
export type AvatarProps = MUIAvatarProps & {
|
|
3
3
|
size?: 'xsmall' | 'small' | 'medium' | 'large';
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
'aria-label'?: string;
|
|
6
|
+
'data-testid'?: string;
|
|
5
7
|
};
|
|
6
|
-
|
|
8
|
+
declare const Avatar: import('react').ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export default Avatar;
|
|
7
10
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,WAAW,IAAI,cAAc,EAE9B,MAAM,eAAe,CAAA;AAEtB,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;IACzC,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAgED,QAAA,MAAM,MAAM,qHAAsB,CAAA;AAClC,eAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { default as Avatar } from './Avatar';
|
|
2
1
|
declare const options: {
|
|
3
2
|
title: string;
|
|
4
|
-
component:
|
|
3
|
+
component: import('react').ForwardRefExoticComponent<Omit<import('..').AvatarProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
4
|
args: {
|
|
6
5
|
disabled: boolean;
|
|
7
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.stories.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCG,CAAA;AAChB,eAAe,OAAO,CAAA;AA8VtB,eAAO,MAAM,UAAU;;;;;;;;;CAKtB,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;CAKjB,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;CAGjB,CAAA;AAED,eAAO,MAAM,OAAO;;;;CAEnB,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;CAGtB,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;CAGvB,CAAA;AAED,eAAO,MAAM,eAAe;;;;CAE3B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.test.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.test.tsx"],"names":[],"mappings":""}
|
|
@@ -19,6 +19,11 @@ export type ButtonProps = MUIButtonProps<React.ElementType, {
|
|
|
19
19
|
* Needs to have a href prop to be considered external.
|
|
20
20
|
*/
|
|
21
21
|
showExternalIcon?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Text to display for screen readers when the button is external.
|
|
24
|
+
* Defaults to the intl token 'c4r.button.opensInNewTab' if not provided.
|
|
25
|
+
*/
|
|
26
|
+
screenReaderText?: string | React.ReactNode;
|
|
22
27
|
'aria-describedby'?: string;
|
|
23
28
|
}>;
|
|
24
29
|
declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,IAAI,cAAc,EAK9B,MAAM,eAAe,CAAA;AAuBtB,MAAM,MAAM,WAAW,GAAG,cAAc,CACtC,KAAK,CAAC,WAAW,EACjB;IACE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;IAC3C,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CACF,CAAA;AAqGD,QAAA,MAAM,MAAM,wHAAsB,CAAA;AAClC,eAAe,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,WAAW,EAAc,MAAM,cAAc,CAAA;AAY9D,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,WAAW,EAAc,MAAM,cAAc,CAAA;AAY9D,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EG,CAAA;AAChB,eAAe,OAAO,CAAA;AAqTtB,eAAO,MAAM,UAAU;gCA7QwB,WAAW;;;;;;;;;CAmRzD,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;CAKjB,CAAA;AAED,eAAO,MAAM,SAAS;oCAtR0B,WAAW;;;;CAyR1D,CAAA;AAED,eAAO,MAAM,QAAQ;oCA3R2B,WAAW;;;;CA8R1D,CAAA;AAED,eAAO,MAAM,IAAI;oCAhS+B,WAAW;;;;CAmS1D,CAAA;AAED,eAAO,MAAM,YAAY;oCA7QqB,WAAW;;;;CAgRxD,CAAA;AAED,eAAO,MAAM,cAAc;oCAlRmB,WAAW;;;;CAqRxD,CAAA;AAED,eAAO,MAAM,UAAU;oCAvRuB,WAAW;;;;CA0RxD,CAAA;AAED,eAAO,MAAM,YAAY;oCA5RqB,WAAW;;;;CA+RxD,CAAA;AAED,eAAO,MAAM,QAAQ;oCA7Q4B,WAAW;;;;CAgR3D,CAAA;AAED,eAAO,MAAM,YAAY;oCAhM4B,WAAW;;;;;;CAuM/D,CAAA"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { default as React, ReactNode, MutableRefObject, ComponentProps } 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={{ style: { display: 'flex' } }}>
|
|
96
|
+
* <Typography>Content</Typography>
|
|
97
|
+
* </EllipsisWithTooltip>
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
contentProps?: ComponentProps<'span'>;
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EllipsisWithTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/EllipsisWithTooltip/EllipsisWithTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAMZ,SAAS,EACT,gBAAgB,EAChB,cAAc,EACf,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,cAAc,CAAC,MAAM,CAAC,CAAA;IAErC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CAC/C,CAAA;AA6LD,QAAA,MAAM,mBAAmB,8GAAmC,CAAA;AAE5D,eAAe,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;AA8OhB,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EllipsisWithTooltip.test.d.ts","sourceRoot":"","sources":["../../../../src/components/EllipsisWithTooltip/EllipsisWithTooltip.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -10,6 +10,11 @@ export type LinkProps = MUILinkProps<React.ElementType, {
|
|
|
10
10
|
* Whether to show the external icon when external is true. Defaults to true.
|
|
11
11
|
*/
|
|
12
12
|
showExternalIcon?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Text to display for screen readers when the link is external.
|
|
15
|
+
* Uses 'c4r.button.opensInNewTab' as fallback if not provided.
|
|
16
|
+
*/
|
|
17
|
+
screenReaderText?: string | React.ReactNode;
|
|
13
18
|
/**
|
|
14
19
|
* For target="_blank", use the `external` prop instead for better consistency and accessibility.
|
|
15
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/Link.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,IAAI,YAAY,EAG1B,MAAM,eAAe,CAAA;AA2DtB,MAAM,MAAM,SAAS,GAAG,YAAY,CAClC,KAAK,CAAC,WAAW,EACjB;IACE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;IAC3C;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;;;;OASG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CACF,CAAA;AA8DD,QAAA,MAAM,IAAI,sHAAoB,CAAA;AAC9B,eAAe,IAAI,CAAA"}
|
|
@@ -28,6 +28,9 @@ declare const options: {
|
|
|
28
28
|
control: "select";
|
|
29
29
|
options: number[];
|
|
30
30
|
};
|
|
31
|
+
screenReaderText: {
|
|
32
|
+
control: "text";
|
|
33
|
+
};
|
|
31
34
|
};
|
|
32
35
|
args: {
|
|
33
36
|
href: string;
|
|
@@ -78,30 +81,16 @@ export declare const LongUrl: {
|
|
|
78
81
|
};
|
|
79
82
|
};
|
|
80
83
|
export declare const ExternalLink: {
|
|
81
|
-
render: ({ ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
args: {
|
|
83
|
-
external: boolean;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
export declare const ExternalLinkVariant: {
|
|
87
84
|
render: ({ children, ...rest }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
88
85
|
args: {
|
|
89
|
-
external: boolean;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
export declare const ExternalLinkLongUrl: {
|
|
93
|
-
render: ({ ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
94
|
-
args: {
|
|
95
|
-
external: boolean;
|
|
96
|
-
href: string;
|
|
97
86
|
children: string;
|
|
98
87
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
88
|
+
parameters: {
|
|
89
|
+
docs: {
|
|
90
|
+
description: {
|
|
91
|
+
story: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
105
94
|
};
|
|
106
95
|
};
|
|
107
96
|
export declare const InlineLink: {
|
|
@@ -114,11 +103,4 @@ export declare const InlineLink: {
|
|
|
114
103
|
};
|
|
115
104
|
};
|
|
116
105
|
};
|
|
117
|
-
export declare const ButtonLink: {
|
|
118
|
-
render: ({ ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
119
|
-
args: {
|
|
120
|
-
component: string;
|
|
121
|
-
children: string;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
106
|
//# sourceMappingURL=Link.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/Link.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,OAAO,EAAQ,SAAS,EAA+B,MAAM,cAAc,CAAA;AAK3E,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/Link.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,OAAO,EAAQ,SAAS,EAA+B,MAAM,cAAc,CAAA;AAK3E,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CG,CAAA;AAChB,eAAe,OAAO,CAAA;AAmFtB,eAAO,MAAM,UAAU;2BAjFmB,SAAS;;;;;;CAsFlD,CAAA;AAED,eAAO,MAAM,OAAO;oCAlF4B,SAAS;;;;;;;;CA4FxD,CAAA;AAED,eAAO,MAAM,KAAK;oCA7E4B,SAAS;CA+EtD,CAAA;AAED,eAAO,MAAM,IAAI;oCAhE4B,SAAS;CAkErD,CAAA;AAED,eAAO,MAAM,OAAO;2BA5GsB,SAAS;;;;;CAkHlD,CAAA;AA+HD,eAAO,MAAM,YAAY;oCA7H4B,SAAS;;;;;;;;;;;CA0I7D,CAAA;AAED,eAAO,MAAM,UAAU;mCA3LuB,SAAS;;;;;;;;CAkMtD,CAAA"}
|
|
@@ -2,8 +2,11 @@ export type TablePaginationActionsParams = {
|
|
|
2
2
|
count: number;
|
|
3
3
|
page: number;
|
|
4
4
|
rowsPerPage: number;
|
|
5
|
-
onPageChange: (event: React.MouseEvent<HTMLButtonElement
|
|
5
|
+
onPageChange: (event: React.MouseEvent<HTMLButtonElement> | null, newPage: number) => void;
|
|
6
6
|
lastPageTooltip?: string;
|
|
7
|
+
'aria-label'?: string;
|
|
8
|
+
'data-testid'?: string;
|
|
7
9
|
};
|
|
8
|
-
|
|
10
|
+
declare const TablePaginationActions: import('react').ForwardRefExoticComponent<TablePaginationActionsParams & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default TablePaginationActions;
|
|
9
12
|
//# sourceMappingURL=TablePaginationActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePaginationActions.d.ts","sourceRoot":"","sources":["../../../../src/components/TablePaginationActions/TablePaginationActions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TablePaginationActions.d.ts","sourceRoot":"","sources":["../../../../src/components/TablePaginationActions/TablePaginationActions.tsx"],"names":[],"mappings":"AAgBA,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,CACZ,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,IAAI,EACjD,OAAO,EAAE,MAAM,KACZ,IAAI,CAAA;IACT,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAoED,QAAA,MAAM,sBAAsB,yHAAsC,CAAA;AAClE,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { TablePaginationActionsParams } from './TablePaginationActions';
|
|
2
|
+
declare const options: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<TablePaginationActionsParams & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
tags: string[];
|
|
6
|
+
argTypes: {
|
|
7
|
+
count: {
|
|
8
|
+
control: "number";
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
page: {
|
|
12
|
+
control: "number";
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
rowsPerPage: {
|
|
16
|
+
control: "number";
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
onPageChange: {
|
|
20
|
+
action: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
lastPageTooltip: {
|
|
24
|
+
control: "text";
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
'aria-label': {
|
|
28
|
+
control: "text";
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
'data-testid': {
|
|
32
|
+
control: "text";
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
args: {
|
|
37
|
+
count: number;
|
|
38
|
+
page: number;
|
|
39
|
+
rowsPerPage: number;
|
|
40
|
+
onPageChange: () => undefined;
|
|
41
|
+
};
|
|
42
|
+
parameters: {
|
|
43
|
+
design: {
|
|
44
|
+
type: string;
|
|
45
|
+
url: string;
|
|
46
|
+
};
|
|
47
|
+
status: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export default options;
|
|
53
|
+
export declare const Playground: {
|
|
54
|
+
render: (args: TablePaginationActionsParams) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
parameters: {
|
|
56
|
+
chromatic: {
|
|
57
|
+
disableSnapshot: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export declare const States: {
|
|
62
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
};
|
|
64
|
+
export declare const CustomTooltip: {
|
|
65
|
+
render: (args: TablePaginationActionsParams) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
args: {
|
|
67
|
+
count: number;
|
|
68
|
+
page: number;
|
|
69
|
+
rowsPerPage: number;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=TablePaginationActions.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePaginationActions.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/TablePaginationActions/TablePaginationActions.stories.tsx"],"names":[],"mappings":"AAGA,OAA+B,EAC7B,4BAA4B,EAC7B,MAAM,0BAA0B,CAAA;AAGjC,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDkC,CAAA;AAE/C,eAAe,OAAO,CAAA;AA4EtB,eAAO,MAAM,UAAU;mBA1EW,4BAA4B;;;;;;CA+E7D,CAAA;AAED,eAAO,MAAM,MAAM;;CAElB,CAAA;AAED,eAAO,MAAM,aAAa;mBArCW,4BAA4B;;;;;;CA4ChE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePaginationActions.test.d.ts","sourceRoot":"","sources":["../../../../src/components/TablePaginationActions/TablePaginationActions.test.tsx"],"names":[],"mappings":""}
|