react-better-html 1.1.269 → 1.1.271
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 +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7525,6 +7525,7 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
|
|
|
7525
7525
|
const tabsGap = gap ?? (style === "box" ? theme2.styles.gap / 2 : 0);
|
|
7526
7526
|
const [selectedTabId, setSelectedTabId] = (0, import_react29.useState)(() => {
|
|
7527
7527
|
const selectedTabId2 = tabs[0];
|
|
7528
|
+
if (!selectedTabId2) return "";
|
|
7528
7529
|
if (urlQuery) {
|
|
7529
7530
|
const tabQueryValue = urlQuery.getQuery(name ?? defaultTabName);
|
|
7530
7531
|
if (!tabQueryValue) return selectedTabId2.id;
|
|
@@ -7620,12 +7621,13 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
|
|
|
7620
7621
|
className: `react-better-html-tabs-tab${selected ? " react-better-html-tabs-tab-selected" : ""}`,
|
|
7621
7622
|
position: "relative",
|
|
7622
7623
|
width: "fit-content",
|
|
7623
|
-
backgroundColor: style === "box" ? selected ? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
|
|
7624
|
+
backgroundColor: style === "box" ? selected ? accentColor ?? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
|
|
7624
7625
|
borderRadius: style === "box" ? theme2.styles.borderRadius : void 0,
|
|
7625
7626
|
borderTopLeftRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
|
|
7626
7627
|
borderTopRightRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
|
|
7627
7628
|
border: style === "box" ? `${theme2.styles.borderWidth}px solid ${selected ? "transparent" : theme2.colors.border}` : void 0,
|
|
7628
|
-
|
|
7629
|
+
borderColorHover: style === "box" ? accentColor ?? theme2.colors.primary : void 0,
|
|
7630
|
+
filterHover: style !== "box" ? filterHover().z1 : void 0,
|
|
7629
7631
|
paddingInline: theme2.styles.space,
|
|
7630
7632
|
paddingBlock: theme2.styles.gap,
|
|
7631
7633
|
value: tab.id,
|