react-better-html 1.1.258 → 1.1.260
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7454,7 +7454,7 @@ import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
|
7454
7454
|
var tabBottomLineWidth = 2;
|
|
7455
7455
|
var tabDotSize = 6;
|
|
7456
7456
|
var defaultTabName = "tab";
|
|
7457
|
-
var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style = "default", gap, onChange, children, ...props }, ref) {
|
|
7457
|
+
var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style = "default", gap, noBottomLine, onChange, children, ...props }, ref) {
|
|
7458
7458
|
const reactRouterDomPlugin2 = usePlugin("react-router-dom");
|
|
7459
7459
|
const theme2 = useTheme27();
|
|
7460
7460
|
const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
|
|
@@ -7557,7 +7557,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
|
|
|
7557
7557
|
return /* @__PURE__ */ jsxs22(
|
|
7558
7558
|
Div_default,
|
|
7559
7559
|
{
|
|
7560
|
-
className: "react-better-html-tabs-tab"
|
|
7560
|
+
className: `react-better-html-tabs-tab${selected ? " react-better-html-tabs-tab-selected" : ""}`,
|
|
7561
7561
|
position: "relative",
|
|
7562
7562
|
width: "fit-content",
|
|
7563
7563
|
backgroundColor: style === "box" ? selected ? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
|
|
@@ -7604,7 +7604,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
|
|
|
7604
7604
|
tab.id
|
|
7605
7605
|
);
|
|
7606
7606
|
}) }),
|
|
7607
|
-
style !== "box" && /* @__PURE__ */ jsx25(
|
|
7607
|
+
style !== "box" && !noBottomLine && /* @__PURE__ */ jsx25(
|
|
7608
7608
|
Div_default,
|
|
7609
7609
|
{
|
|
7610
7610
|
position: "absolute",
|
|
@@ -7940,10 +7940,10 @@ var MenuItemComponent = memo27(function MenuItemComponent2({
|
|
|
7940
7940
|
const isActive2 = location.pathname === "/" ? location.pathname === item.href : location.pathname.startsWith(item.href) && item.href !== "/";
|
|
7941
7941
|
if (!isActive2) return;
|
|
7942
7942
|
setActiveItem(
|
|
7943
|
-
(oldValue) => item.href
|
|
7943
|
+
(oldValue) => item.href && item.href !== oldValue?.href ? {
|
|
7944
7944
|
href: item.href,
|
|
7945
7945
|
length: item.href.length
|
|
7946
|
-
} :
|
|
7946
|
+
} : oldValue
|
|
7947
7947
|
);
|
|
7948
7948
|
}, [location.pathname]);
|
|
7949
7949
|
useEffect16(() => {
|