@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.
- package/CHANGELOG.md +3 -1
- package/dist/{Alert-wE4A0ify.js → Alert-CRVceJ9N.js} +20 -77
- package/dist/{Alert-CaashKPj.cjs → Alert-Dyw7Z9wJ.cjs} +22 -79
- package/dist/{MenuItem-BUe4eJZH.js → MenuItem-h41wtQTz.js} +1 -1
- package/dist/{MenuItem-BZWWJptW.cjs → MenuItem-o51jnNjL.cjs} +6 -6
- package/dist/{css-utils-W9dzgcXq.cjs → TablePaginationActions-CMC_ZxDN.cjs} +117 -61
- package/dist/{css-utils-CTJjJR0x.js → TablePaginationActions-DIFPc_wQ.js} +119 -63
- package/dist/components/index.cjs +163 -259
- package/dist/components/index.js +103 -199
- package/dist/theme/index.cjs +114 -108
- package/dist/theme/index.js +13 -7
- 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/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 -20
- 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 +4 -176
- 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 +0 -2
- 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/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 +119 -114
- package/dist/widgets/index.js +9 -4
- package/package.json +1 -1
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +0 -117
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts.map +0 -1
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +0 -66
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +0 -1
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts +0 -2
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts.map +0 -1
- package/dist/types/components/EllipsisWithTooltip/index.d.ts +0 -3
- package/dist/types/components/EllipsisWithTooltip/index.d.ts.map +0 -1
- package/dist/types/utils/css-utils.d.ts +0 -14
- package/dist/types/utils/css-utils.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import require$$0 from "react-is";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Typography as Typography$1,
|
|
3
|
+
import { Typography as Typography$1, styled, IconButton as IconButton$1, Tooltip, CircularProgress, Box } from "@mui/material";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { KeyboardArrowLeftOutlined, KeyboardArrowRightOutlined } from "@mui/icons-material";
|
|
6
6
|
import { createIntlCache, createIntl, useIntl } from "react-intl";
|
|
@@ -781,6 +781,31 @@ const MENU_LIST_MAX_SIZE = 312;
|
|
|
781
781
|
const MENU_ITEM_SIZE_DENSE = 24;
|
|
782
782
|
const MENU_ITEM_SIZE_DEFAULT = 32;
|
|
783
783
|
const MENU_ITEM_SIZE_EXTENDED = 48;
|
|
784
|
+
const FontWeight = {
|
|
785
|
+
regular: 400,
|
|
786
|
+
medium: 500,
|
|
787
|
+
strong: 600
|
|
788
|
+
};
|
|
789
|
+
function _Typography({ italic, weight, style, children, ...otherProps }, ref) {
|
|
790
|
+
const fontConfiguration = {
|
|
791
|
+
fontWeight: FontWeight[weight],
|
|
792
|
+
fontStyle: italic ? "italic" : void 0
|
|
793
|
+
};
|
|
794
|
+
return /* @__PURE__ */ jsx(
|
|
795
|
+
Typography$1,
|
|
796
|
+
{
|
|
797
|
+
...otherProps,
|
|
798
|
+
ref,
|
|
799
|
+
style: {
|
|
800
|
+
...fontConfiguration,
|
|
801
|
+
...style
|
|
802
|
+
},
|
|
803
|
+
"data-name": "typography",
|
|
804
|
+
children
|
|
805
|
+
}
|
|
806
|
+
);
|
|
807
|
+
}
|
|
808
|
+
const Typography = forwardRef(_Typography);
|
|
784
809
|
const en = {
|
|
785
810
|
c4r: {
|
|
786
811
|
button: {
|
|
@@ -795,7 +820,7 @@ const en = {
|
|
|
795
820
|
showOptions: "Show options",
|
|
796
821
|
hide: "Hide",
|
|
797
822
|
show: "Show",
|
|
798
|
-
opensInNewTab: "Opens in new tab"
|
|
823
|
+
opensInNewTab: "(Opens in new tab)"
|
|
799
824
|
},
|
|
800
825
|
form: {
|
|
801
826
|
selectAll: "Select all",
|
|
@@ -944,7 +969,7 @@ const es = {
|
|
|
944
969
|
showOptions: "Mostrar opciones",
|
|
945
970
|
hide: "Ocultar",
|
|
946
971
|
show: "Mostrar",
|
|
947
|
-
opensInNewTab: "Abre en una nueva pestaña"
|
|
972
|
+
opensInNewTab: "(Abre en una nueva pestaña)"
|
|
948
973
|
},
|
|
949
974
|
form: {
|
|
950
975
|
selectAll: "Seleccionar todos",
|
|
@@ -1091,7 +1116,7 @@ const id = {
|
|
|
1091
1116
|
showOptions: "Tampilkan opsi",
|
|
1092
1117
|
hide: "Sembunyikan",
|
|
1093
1118
|
show: "Tampilkan",
|
|
1094
|
-
opensInNewTab: "Buka di tab baru"
|
|
1119
|
+
opensInNewTab: "(Buka di tab baru)"
|
|
1095
1120
|
},
|
|
1096
1121
|
form: {
|
|
1097
1122
|
selectAll: "Select all",
|
|
@@ -5565,48 +5590,78 @@ const getGloballyCachedIntl = (intlConfig) => {
|
|
|
5565
5590
|
function useImperativeIntl(intlConfig) {
|
|
5566
5591
|
return getGloballyCachedIntl(intlConfig);
|
|
5567
5592
|
}
|
|
5568
|
-
const
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5593
|
+
const Option = styled("div")(({ theme }) => ({
|
|
5594
|
+
position: "relative",
|
|
5595
|
+
display: "inline-flex",
|
|
5596
|
+
// TODO: Remove this once we have a better way to handle the spacing between icon buttons:
|
|
5597
|
+
// https://app.shortcut.com/cartoteam/story/471284/create-iconbuttongroup-component-to-properly-group-several-icons
|
|
5598
|
+
"& + &, & + .optionIconButton": {
|
|
5599
|
+
marginLeft: theme.spacing(0.5)
|
|
5600
|
+
}
|
|
5601
|
+
}));
|
|
5602
|
+
const StyledIconButton = styled(IconButton$1, {
|
|
5603
|
+
shouldForwardProp: (prop) => !["active"].includes(prop)
|
|
5604
|
+
})(({ active, theme }) => ({
|
|
5605
|
+
...active && {
|
|
5606
|
+
color: theme.palette.primary.main,
|
|
5607
|
+
backgroundColor: theme.palette.primary.background,
|
|
5608
|
+
"& svg:not(.doNotFillIcon) path": {
|
|
5609
|
+
fill: theme.palette.primary.main
|
|
5610
|
+
}
|
|
5611
|
+
}
|
|
5612
|
+
}));
|
|
5613
|
+
function _IconButton({
|
|
5614
|
+
tooltip,
|
|
5615
|
+
tooltipPlacement = "top",
|
|
5616
|
+
icon,
|
|
5617
|
+
size = "medium",
|
|
5618
|
+
variant = "icon",
|
|
5619
|
+
color = "default",
|
|
5620
|
+
sx,
|
|
5621
|
+
className,
|
|
5622
|
+
loading,
|
|
5623
|
+
disabled,
|
|
5624
|
+
active,
|
|
5625
|
+
...props
|
|
5626
|
+
}, ref) {
|
|
5627
|
+
return /* @__PURE__ */ jsx(Tooltip, { placement: tooltipPlacement, title: tooltip ?? "", children: /* @__PURE__ */ jsx(
|
|
5628
|
+
Option,
|
|
5580
5629
|
{
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5630
|
+
className: `optionIconButton ${className ?? ""}`,
|
|
5631
|
+
sx,
|
|
5632
|
+
"data-testid": "icon-button",
|
|
5633
|
+
children: /* @__PURE__ */ jsx(
|
|
5634
|
+
StyledIconButton,
|
|
5635
|
+
{
|
|
5636
|
+
...props,
|
|
5637
|
+
ref,
|
|
5638
|
+
size,
|
|
5639
|
+
variant,
|
|
5640
|
+
color,
|
|
5641
|
+
active,
|
|
5642
|
+
disabled: disabled || loading,
|
|
5643
|
+
role: "button",
|
|
5644
|
+
children: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" }) : icon
|
|
5645
|
+
}
|
|
5646
|
+
)
|
|
5589
5647
|
}
|
|
5590
|
-
);
|
|
5648
|
+
) });
|
|
5591
5649
|
}
|
|
5592
|
-
const
|
|
5650
|
+
const IconButton = forwardRef(_IconButton);
|
|
5593
5651
|
const Root = styled(Box)(({ theme }) => ({
|
|
5594
5652
|
display: "flex",
|
|
5595
5653
|
gap: theme.spacing(0.5),
|
|
5596
5654
|
marginLeft: theme.spacing(1)
|
|
5597
5655
|
}));
|
|
5598
|
-
|
|
5599
|
-
"& .MuiIconButton-root:not(.Mui-disabled)": {
|
|
5600
|
-
color: theme.palette.text.secondary
|
|
5601
|
-
}
|
|
5602
|
-
}));
|
|
5603
|
-
function TablePaginationActions({
|
|
5656
|
+
function _TablePaginationActions({
|
|
5604
5657
|
count,
|
|
5605
5658
|
page,
|
|
5606
5659
|
rowsPerPage = 10,
|
|
5607
5660
|
onPageChange,
|
|
5608
|
-
lastPageTooltip
|
|
5609
|
-
|
|
5661
|
+
lastPageTooltip,
|
|
5662
|
+
"aria-label": ariaLabel,
|
|
5663
|
+
"data-testid": dataTestId
|
|
5664
|
+
}, ref) {
|
|
5610
5665
|
const intl = useIntl();
|
|
5611
5666
|
const intlConfig = useImperativeIntl(intl);
|
|
5612
5667
|
const handleBackButtonClick = (event) => {
|
|
@@ -5626,38 +5681,39 @@ function TablePaginationActions({
|
|
|
5626
5681
|
const noMorePagesText = intlConfig.formatMessage({
|
|
5627
5682
|
id: "c4r.form.pagination.noMorePages"
|
|
5628
5683
|
});
|
|
5629
|
-
return /* @__PURE__ */ jsxs(
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5684
|
+
return /* @__PURE__ */ jsxs(
|
|
5685
|
+
Root,
|
|
5686
|
+
{
|
|
5687
|
+
ref,
|
|
5688
|
+
"data-testid": dataTestId,
|
|
5689
|
+
"aria-label": ariaLabel,
|
|
5690
|
+
"data-name": "table-pagination-actions",
|
|
5691
|
+
children: [
|
|
5692
|
+
/* @__PURE__ */ jsx(
|
|
5693
|
+
IconButton,
|
|
5694
|
+
{
|
|
5695
|
+
onClick: handleBackButtonClick,
|
|
5696
|
+
disabled: page === 0,
|
|
5697
|
+
"aria-label": prevLabel,
|
|
5698
|
+
icon: /* @__PURE__ */ jsx(KeyboardArrowLeftOutlined, {}),
|
|
5699
|
+
tooltip: isFirstPage ? noMorePagesText : prevLabel
|
|
5700
|
+
}
|
|
5701
|
+
),
|
|
5702
|
+
/* @__PURE__ */ jsx(
|
|
5644
5703
|
IconButton,
|
|
5645
5704
|
{
|
|
5646
5705
|
onClick: handleNextButtonClick,
|
|
5647
5706
|
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
5648
|
-
"aria-label": nextLabel
|
|
5649
|
-
|
|
5707
|
+
"aria-label": nextLabel,
|
|
5708
|
+
icon: /* @__PURE__ */ jsx(KeyboardArrowRightOutlined, {}),
|
|
5709
|
+
tooltip: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel
|
|
5650
5710
|
}
|
|
5651
|
-
)
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5711
|
+
)
|
|
5712
|
+
]
|
|
5713
|
+
}
|
|
5714
|
+
);
|
|
5655
5715
|
}
|
|
5656
|
-
const
|
|
5657
|
-
textOverflow: "ellipsis",
|
|
5658
|
-
overflow: "hidden",
|
|
5659
|
-
whiteSpace: "nowrap"
|
|
5660
|
-
};
|
|
5716
|
+
const TablePaginationActions = forwardRef(_TablePaginationActions);
|
|
5661
5717
|
export {
|
|
5662
5718
|
APPBAR_SIZE as A,
|
|
5663
5719
|
BREAKPOINTS as B,
|
|
@@ -5670,10 +5726,10 @@ export {
|
|
|
5670
5726
|
ICON_SIZE_MEDIUM as b,
|
|
5671
5727
|
ICON_SIZE_SMALL as c,
|
|
5672
5728
|
MENU_LIST_MAX_SIZE as d,
|
|
5673
|
-
|
|
5674
|
-
|
|
5729
|
+
MENU_ITEM_SIZE_DENSE as e,
|
|
5730
|
+
MENU_ITEM_SIZE_EXTENDED as f,
|
|
5675
5731
|
getSpacing as g,
|
|
5676
|
-
|
|
5732
|
+
IconButton as h,
|
|
5677
5733
|
getDefaultExportFromCjs as i,
|
|
5678
5734
|
useImperativeIntl as u
|
|
5679
5735
|
};
|