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.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -7493,7 +7493,7 @@ var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
|
7493
7493
|
var tabBottomLineWidth = 2;
|
|
7494
7494
|
var tabDotSize = 6;
|
|
7495
7495
|
var defaultTabName = "tab";
|
|
7496
|
-
var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, accentColor, style = "default", gap, onChange, children, ...props }, ref) {
|
|
7496
|
+
var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, accentColor, style = "default", gap, noBottomLine, onChange, children, ...props }, ref) {
|
|
7497
7497
|
const reactRouterDomPlugin2 = usePlugin("react-router-dom");
|
|
7498
7498
|
const theme2 = (0, import_react_better_core27.useTheme)();
|
|
7499
7499
|
const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
|
|
@@ -7596,7 +7596,7 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
|
|
|
7596
7596
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
7597
7597
|
Div_default,
|
|
7598
7598
|
{
|
|
7599
|
-
className: "react-better-html-tabs-tab"
|
|
7599
|
+
className: `react-better-html-tabs-tab${selected ? " react-better-html-tabs-tab-selected" : ""}`,
|
|
7600
7600
|
position: "relative",
|
|
7601
7601
|
width: "fit-content",
|
|
7602
7602
|
backgroundColor: style === "box" ? selected ? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
|
|
@@ -7643,7 +7643,7 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
|
|
|
7643
7643
|
tab.id
|
|
7644
7644
|
);
|
|
7645
7645
|
}) }),
|
|
7646
|
-
style !== "box" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
7646
|
+
style !== "box" && !noBottomLine && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
7647
7647
|
Div_default,
|
|
7648
7648
|
{
|
|
7649
7649
|
position: "absolute",
|
|
@@ -7973,10 +7973,10 @@ var MenuItemComponent = (0, import_react31.memo)(function MenuItemComponent2({
|
|
|
7973
7973
|
const isActive2 = location.pathname === "/" ? location.pathname === item.href : location.pathname.startsWith(item.href) && item.href !== "/";
|
|
7974
7974
|
if (!isActive2) return;
|
|
7975
7975
|
setActiveItem(
|
|
7976
|
-
(oldValue) => item.href
|
|
7976
|
+
(oldValue) => item.href && item.href !== oldValue?.href ? {
|
|
7977
7977
|
href: item.href,
|
|
7978
7978
|
length: item.href.length
|
|
7979
|
-
} :
|
|
7979
|
+
} : oldValue
|
|
7980
7980
|
);
|
|
7981
7981
|
}, [location.pathname]);
|
|
7982
7982
|
(0, import_react31.useEffect)(() => {
|