@primer/react 0.0.0-20260302220808 → 0.0.0-20260303012527
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
CHANGED
package/dist/ActionList/Item.js
CHANGED
|
@@ -24,34 +24,31 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
24
24
|
* For non-button-semantic items, renders children directly.
|
|
25
25
|
*/
|
|
26
26
|
function ConditionalTooltip(t0) {
|
|
27
|
-
const $ = c(
|
|
27
|
+
const $ = c(3);
|
|
28
28
|
const {
|
|
29
29
|
text,
|
|
30
30
|
enabled,
|
|
31
31
|
children
|
|
32
32
|
} = t0;
|
|
33
|
-
if (!enabled) {
|
|
33
|
+
if (!enabled || !text) {
|
|
34
34
|
return children;
|
|
35
35
|
}
|
|
36
36
|
const t1 = text || "";
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
t3 = /*#__PURE__*/jsx(Tooltip, {
|
|
37
|
+
let t2;
|
|
38
|
+
if ($[0] !== children || $[1] !== t1) {
|
|
39
|
+
t2 = /*#__PURE__*/jsx(Tooltip, {
|
|
41
40
|
text: t1,
|
|
42
41
|
direction: "e",
|
|
43
42
|
delay: "medium",
|
|
44
|
-
_privateDisableTooltip: t2,
|
|
45
43
|
children: children
|
|
46
44
|
});
|
|
47
45
|
$[0] = children;
|
|
48
46
|
$[1] = t1;
|
|
49
47
|
$[2] = t2;
|
|
50
|
-
$[3] = t3;
|
|
51
48
|
} else {
|
|
52
|
-
|
|
49
|
+
t2 = $[2];
|
|
53
50
|
}
|
|
54
|
-
return
|
|
51
|
+
return t2;
|
|
55
52
|
}
|
|
56
53
|
const SubItem = t0 => {
|
|
57
54
|
const $ = c(2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/TooltipV2/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAA;AAChF,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACjD,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,aAAa,CAAA;IAC9B,cAAc,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAC5C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IACnC;;;;;;;;OAQG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACjC,CAAC,GACA,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AAiEnC,eAAO,MAAM,cAAc;gBAAoC,MAAM;EAAM,CAAA;AAE3E,eAAO,MAAM,OAAO,EAAE,yBAAyB,CAC7C,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CACvE,GACC,UAsRD,CAAA"}
|
|
@@ -212,6 +212,12 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
212
212
|
return child.props['aria-describedby'];
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
// When the tooltip is disabled, don't add its ID to aria-describedby
|
|
216
|
+
// to avoid an empty string polluting the accessible description
|
|
217
|
+
if (_privateDisableTooltip) {
|
|
218
|
+
return child.props['aria-describedby'];
|
|
219
|
+
}
|
|
220
|
+
|
|
215
221
|
// If tooltip is a description type, append our tooltipId
|
|
216
222
|
const existingDescribedBy = child.props['aria-describedby'];
|
|
217
223
|
if (existingDescribedBy) {
|
package/package.json
CHANGED