gov-layout 1.2.14 → 1.2.15
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/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -306,6 +306,12 @@ function TrashIcon({ size = 20, className, style } = {}) {
|
|
|
306
306
|
/* @__PURE__ */ jsx("line", { x1: "14", y1: "11", x2: "14", y2: "17" })
|
|
307
307
|
] });
|
|
308
308
|
}
|
|
309
|
+
var safeCssEscape = (value) => {
|
|
310
|
+
if (typeof CSS !== "undefined" && CSS.escape) {
|
|
311
|
+
return CSS.escape(value);
|
|
312
|
+
}
|
|
313
|
+
return value.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
314
|
+
};
|
|
309
315
|
var ICON_MAP = {
|
|
310
316
|
home: HomeIcon,
|
|
311
317
|
dashboard: HomeIcon,
|
|
@@ -458,11 +464,11 @@ function MenuItemComponent({
|
|
|
458
464
|
const hoverBg = isDark ? "#334155" : "var(--color-foundations-fuji-pallet-light, #ebedf5)";
|
|
459
465
|
if (collapsed && depth === 0) {
|
|
460
466
|
return /* @__PURE__ */ jsxs("li", { children: [
|
|
461
|
-
/* @__PURE__ */ jsx("style", { children: `@media(hover:hover){.sidebar-btn-${
|
|
467
|
+
/* @__PURE__ */ jsx("style", { children: `@media(hover:hover){.sidebar-btn-${safeCssEscape(btnId)}:not([data-active='true']):hover{background-color:${hoverBg}!important}}` }),
|
|
462
468
|
/* @__PURE__ */ jsx(
|
|
463
469
|
"button",
|
|
464
470
|
{
|
|
465
|
-
className: `sidebar-btn-${
|
|
471
|
+
className: `sidebar-btn-${safeCssEscape(btnId)}`,
|
|
466
472
|
"data-active": isActive || isChildActive,
|
|
467
473
|
onClick: handleClick,
|
|
468
474
|
title: item.title,
|
|
@@ -498,11 +504,11 @@ function MenuItemComponent({
|
|
|
498
504
|
}
|
|
499
505
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
500
506
|
/* @__PURE__ */ jsxs("li", { children: [
|
|
501
|
-
/* @__PURE__ */ jsx("style", { children: `@media(hover:hover){.sidebar-btn-${
|
|
507
|
+
/* @__PURE__ */ jsx("style", { children: `@media(hover:hover){.sidebar-btn-${safeCssEscape(btnId)}:not([data-active='true']):hover{background-color:${hoverBg}!important}}` }),
|
|
502
508
|
/* @__PURE__ */ jsxs(
|
|
503
509
|
"button",
|
|
504
510
|
{
|
|
505
|
-
className: `sidebar-btn-${
|
|
511
|
+
className: `sidebar-btn-${safeCssEscape(btnId)}`,
|
|
506
512
|
"data-active": isActive,
|
|
507
513
|
onClick: handleClick,
|
|
508
514
|
style: {
|