react-better-html 1.1.257 → 1.1.259

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 CHANGED
@@ -517,6 +517,8 @@ type TabsProps = {
517
517
  name?: string;
518
518
  accentColor?: Color;
519
519
  style?: "default" | "borderRadiusTop" | "box";
520
+ gap?: number;
521
+ noBottomLine?: boolean;
520
522
  onChange?: (tab: Tab) => void;
521
523
  children?: React.ReactNode;
522
524
  } & ComponentMarginProps;
package/dist/index.d.ts CHANGED
@@ -517,6 +517,8 @@ type TabsProps = {
517
517
  name?: string;
518
518
  accentColor?: Color;
519
519
  style?: "default" | "borderRadiusTop" | "box";
520
+ gap?: number;
521
+ noBottomLine?: boolean;
520
522
  onChange?: (tab: Tab) => void;
521
523
  children?: React.ReactNode;
522
524
  } & ComponentMarginProps;
package/dist/index.js CHANGED
@@ -1550,6 +1550,7 @@ Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size
1550
1550
  borderRadius: 999,
1551
1551
  alignItems: "center",
1552
1552
  justifyContent: "center",
1553
+ userSelect: "none",
1553
1554
  ref,
1554
1555
  ...props,
1555
1556
  width: size,
@@ -7492,7 +7493,7 @@ var import_jsx_runtime26 = require("react/jsx-runtime");
7492
7493
  var tabBottomLineWidth = 2;
7493
7494
  var tabDotSize = 6;
7494
7495
  var defaultTabName = "tab";
7495
- var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, accentColor, style = "default", onChange, children, ...props }, ref) {
7496
+ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, accentColor, style = "default", gap, noBottomLine, onChange, children, ...props }, ref) {
7496
7497
  const reactRouterDomPlugin2 = usePlugin("react-router-dom");
7497
7498
  const theme2 = (0, import_react_better_core27.useTheme)();
7498
7499
  const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
@@ -7500,6 +7501,7 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
7500
7501
  const { colorTheme } = (0, import_react_better_core27.useBetterCoreContext)();
7501
7502
  const firstRenderPassedRef = (0, import_react29.useRef)(false);
7502
7503
  const tabsRef = (0, import_react29.useRef)({});
7504
+ const tabsGap = gap ?? (style === "box" ? theme2.styles.gap / 2 : 0);
7503
7505
  const [selectedTab, setSelectedTab] = (0, import_react29.useState)(() => {
7504
7506
  const selectedTabId = tabs[0];
7505
7507
  if (urlQuery) {
@@ -7511,7 +7513,6 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
7511
7513
  return selectedTabId;
7512
7514
  });
7513
7515
  const [rerenderState, setRerenderState] = (0, import_react29.useState)(0);
7514
- const tabsGap = style === "box" ? theme2.styles.gap / 2 : 0;
7515
7516
  const onClickTab = (0, import_react29.useCallback)(
7516
7517
  (tab) => {
7517
7518
  setSelectedTab(tab);
@@ -7595,6 +7596,7 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
7595
7596
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7596
7597
  Div_default,
7597
7598
  {
7599
+ className: `react-better-html-tabs-tab${selected ? " react-better-html-tabs-tab-selected" : ""}`,
7598
7600
  position: "relative",
7599
7601
  width: "fit-content",
7600
7602
  backgroundColor: style === "box" ? selected ? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
@@ -7641,7 +7643,7 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
7641
7643
  tab.id
7642
7644
  );
7643
7645
  }) }),
7644
- style !== "box" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7646
+ style !== "box" && !noBottomLine && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7645
7647
  Div_default,
7646
7648
  {
7647
7649
  position: "absolute",