@carto/meridian-ds 2.0.0-alpha-external-link.8 → 2.0.0-alpha-external-link.9
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/dist/{Alert-a_Y9ZK5R.cjs → Alert--4zcBs2d.cjs} +0 -9
- package/dist/{Alert-Cw9nu2Pw.js → Alert-Dgmjgdl8.js} +0 -9
- package/dist/components/index.cjs +3 -2
- package/dist/components/index.js +4 -3
- package/dist/types/components/atoms/Button.d.ts +1 -0
- package/dist/types/components/atoms/Button.d.ts.map +1 -1
- package/dist/types/components/atoms/Link.d.ts.map +1 -1
- package/dist/widgets/index.cjs +1 -1
- package/dist/widgets/index.js +1 -1
- package/package.json +1 -1
|
@@ -132,15 +132,6 @@ function _Link({
|
|
|
132
132
|
const intl = reactIntl.useIntl();
|
|
133
133
|
const intlConfig = TablePaginationActions.useImperativeIntl(intl);
|
|
134
134
|
const isButtonLink = otherProps.component === "button";
|
|
135
|
-
if (process.env.NODE_ENV !== "production") {
|
|
136
|
-
const hasTargetBlank = target === "_blank";
|
|
137
|
-
const hasNoopenerRel = rel === "noopener noreferrer";
|
|
138
|
-
if (hasTargetBlank || hasNoopenerRel) {
|
|
139
|
-
console.error(
|
|
140
|
-
'Link: You are using target="_blank" and/or rel="noopener noreferrer" directly. Please use the `external` prop instead for better consistency and accessibility:\n\nInstead of:\n<Link target="_blank" rel="noopener noreferrer" href="...">Link text</Link>\n\nUse:\n<Link external href="...">Link text</Link>\n\nThe `external` prop automatically handles target="_blank", rel="noopener noreferrer", and adds proper accessibility attributes and visual indicators.'
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
135
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
145
136
|
StyledLink,
|
|
146
137
|
{
|
|
@@ -131,15 +131,6 @@ function _Link({
|
|
|
131
131
|
const intl = useIntl();
|
|
132
132
|
const intlConfig = useImperativeIntl(intl);
|
|
133
133
|
const isButtonLink = otherProps.component === "button";
|
|
134
|
-
if (process.env.NODE_ENV !== "production") {
|
|
135
|
-
const hasTargetBlank = target === "_blank";
|
|
136
|
-
const hasNoopenerRel = rel === "noopener noreferrer";
|
|
137
|
-
if (hasTargetBlank || hasNoopenerRel) {
|
|
138
|
-
console.error(
|
|
139
|
-
'Link: You are using target="_blank" and/or rel="noopener noreferrer" directly. Please use the `external` prop instead for better consistency and accessibility:\n\nInstead of:\n<Link target="_blank" rel="noopener noreferrer" href="...">Link text</Link>\n\nUse:\n<Link external href="...">Link text</Link>\n\nThe `external` prop automatically handles target="_blank", rel="noopener noreferrer", and adds proper accessibility attributes and visual indicators.'
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
134
|
return /* @__PURE__ */ jsxs(
|
|
144
135
|
StyledLink,
|
|
145
136
|
{
|
|
@@ -6,7 +6,7 @@ const reactIntl = require("react-intl");
|
|
|
6
6
|
const material = require("@mui/material");
|
|
7
7
|
const iconsMaterial = require("@mui/icons-material");
|
|
8
8
|
const TablePaginationActions = require("../TablePaginationActions-MwqZJoRm.cjs");
|
|
9
|
-
const Alert$1 = require("../Alert
|
|
9
|
+
const Alert$1 = require("../Alert--4zcBs2d.cjs");
|
|
10
10
|
const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
|
|
11
11
|
const OpenDiagonallyRight = require("../OpenDiagonallyRight-CpL4ROwg.cjs");
|
|
12
12
|
require("cartocolor");
|
|
@@ -64,6 +64,7 @@ function _Button({
|
|
|
64
64
|
loadingPosition,
|
|
65
65
|
external,
|
|
66
66
|
showExternalIcon = true,
|
|
67
|
+
"aria-describedby": ariaDescribedby,
|
|
67
68
|
...otherProps
|
|
68
69
|
}, ref) {
|
|
69
70
|
const intl = reactIntl.useIntl();
|
|
@@ -117,7 +118,7 @@ function _Button({
|
|
|
117
118
|
rel: "noopener noreferrer"
|
|
118
119
|
},
|
|
119
120
|
ref,
|
|
120
|
-
"aria-describedby": isExternalLink ? "external-hint" :
|
|
121
|
+
"aria-describedby": isExternalLink ? "external-hint" : ariaDescribedby,
|
|
121
122
|
children: /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
|
|
122
123
|
}
|
|
123
124
|
);
|
package/dist/components/index.js
CHANGED
|
@@ -5,8 +5,8 @@ import { styled, Box, Button as Button$1, CircularProgress, Popper, Grow, Paper,
|
|
|
5
5
|
import { OpenInNewOutlined, VisibilityOffOutlined, VisibilityOutlined, Cancel, AddCircleOutlineOutlined, ContentCopyOutlined, CloseOutlined, MenuOutlined, HelpOutline, TodayOutlined, MoreVertOutlined, ErrorOutline, Check } from "@mui/icons-material";
|
|
6
6
|
import { u as useImperativeIntl, T as Typography, c as ICON_SIZE_SMALL, f as MENU_ITEM_SIZE_EXTENDED, e as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, M as MENU_ITEM_SIZE_DEFAULT, N as NOTIFICATION_DURATION_IN_MS, A as APPBAR_SIZE } from "../TablePaginationActions-BWer8cmX.js";
|
|
7
7
|
import { a } from "../TablePaginationActions-BWer8cmX.js";
|
|
8
|
-
import { S as ScreenReaderOnly, I as IconButton$1, A as Alert$1 } from "../Alert-
|
|
9
|
-
import { L } from "../Alert-
|
|
8
|
+
import { S as ScreenReaderOnly, I as IconButton$1, A as Alert$1 } from "../Alert-Dgmjgdl8.js";
|
|
9
|
+
import { L } from "../Alert-Dgmjgdl8.js";
|
|
10
10
|
import { A as ArrowDown } from "../ArrowDown-d6bxUL0F.js";
|
|
11
11
|
import { A as ArrowUp, O as OpenDiagonallyRight, C as CloseDiagonallyRight } from "../OpenDiagonallyRight-CGdCEXlF.js";
|
|
12
12
|
import "cartocolor";
|
|
@@ -64,6 +64,7 @@ function _Button({
|
|
|
64
64
|
loadingPosition,
|
|
65
65
|
external,
|
|
66
66
|
showExternalIcon = true,
|
|
67
|
+
"aria-describedby": ariaDescribedby,
|
|
67
68
|
...otherProps
|
|
68
69
|
}, ref) {
|
|
69
70
|
const intl = useIntl();
|
|
@@ -117,7 +118,7 @@ function _Button({
|
|
|
117
118
|
rel: "noopener noreferrer"
|
|
118
119
|
},
|
|
119
120
|
ref,
|
|
120
|
-
"aria-describedby": isExternalLink ? "external-hint" :
|
|
121
|
+
"aria-describedby": isExternalLink ? "external-hint" : ariaDescribedby,
|
|
121
122
|
children: /* @__PURE__ */ jsx(Typography, { variant: "inherit", color: "inherit", noWrap: true, component: "span", children: renderContent() })
|
|
122
123
|
}
|
|
123
124
|
);
|
|
@@ -19,6 +19,7 @@ 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
|
+
'aria-describedby'?: string;
|
|
22
23
|
}>;
|
|
23
24
|
declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
24
25
|
export default Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button.tsx"],"names":[],"mappings":"AAEA,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;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button.tsx"],"names":[],"mappings":"AAEA,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,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CACF,CAAA;AAoGD,QAAA,MAAM,MAAM,wHAAsB,CAAA;AAClC,eAAe,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,SAAS,IAAI,YAAY,EAG1B,MAAM,eAAe,CAAA;AAqDtB,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;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;;;;OASG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Link.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,SAAS,IAAI,YAAY,EAG1B,MAAM,eAAe,CAAA;AAqDtB,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;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;;;;OASG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CACF,CAAA;AA6DD,QAAA,MAAM,IAAI,sHAAoB,CAAA;AAC9B,eAAe,IAAI,CAAA"}
|
package/dist/widgets/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ const _ReactEcharts = require("echarts-for-react");
|
|
|
9
9
|
const reactWindow = require("react-window");
|
|
10
10
|
const SwatchSquare = require("../SwatchSquare-B8PIY3Rd.cjs");
|
|
11
11
|
const iconsMaterial = require("@mui/icons-material");
|
|
12
|
-
const Alert = require("../Alert
|
|
12
|
+
const Alert = require("../Alert--4zcBs2d.cjs");
|
|
13
13
|
const paletteUtils = require("../paletteUtils-B9ybmwiI.cjs");
|
|
14
14
|
function detectTouchscreen() {
|
|
15
15
|
let result = false;
|
package/dist/widgets/index.js
CHANGED
|
@@ -7,7 +7,7 @@ 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
9
|
import { ChevronLeft, ChevronRight, KeyboardArrowDown, ErrorOutline, Cancel, VisibilityOutlined, VisibilityOffOutlined, ExpandLess, ExpandMore, Close, LayersOutlined, MoreVert } from "@mui/icons-material";
|
|
10
|
-
import { I as IconButton, L as Link$1, A as Alert } from "../Alert-
|
|
10
|
+
import { I as IconButton, L as Link$1, A as Alert } from "../Alert-Dgmjgdl8.js";
|
|
11
11
|
import { a as getColorByCategory, c as commonPalette, b as getPalette } from "../paletteUtils-BHqJlHm9.js";
|
|
12
12
|
function detectTouchscreen() {
|
|
13
13
|
let result = false;
|