@edifice.io/react 2.2.11-develop-pedago.20250702150822 → 2.2.11-develop-pedago.20250702151750

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.
@@ -38,7 +38,7 @@ export declare const Tabs: {
38
38
  displayName: string;
39
39
  };
40
40
  List: {
41
- (props: import('react').ComponentPropsWithoutRef<"div">): import("react/jsx-runtime").JSX.Element;
41
+ (props: import('./TabsList').TabsListProps): import("react/jsx-runtime").JSX.Element;
42
42
  displayName: string;
43
43
  };
44
44
  displayName: string;
@@ -5,7 +5,6 @@ import { useTabs } from "../hooks/useTabs.js";
5
5
  import TabsItem from "./TabsItem.js";
6
6
  import TabsList from "./TabsList.js";
7
7
  import TabsPanel from "./TabsPanel.js";
8
- import clsx from "clsx";
9
8
  const Tabs = ({
10
9
  defaultId,
11
10
  items,
@@ -32,11 +31,9 @@ const Tabs = ({
32
31
  tabUnderlineLeft,
33
32
  tabUnderlineWidth,
34
33
  onKeyDown
35
- }), [activeTab, items, onKeyDown, setSelectedTab, tabUnderlineLeft, tabUnderlineWidth, tabsRef]), currentItem = items.find((item) => item.id === activeTab), tabListClasses = clsx({
36
- "w-100": fullWidth
37
- });
34
+ }), [activeTab, items, onKeyDown, setSelectedTab, tabUnderlineLeft, tabUnderlineWidth, tabsRef]), currentItem = items.find((item) => item.id === activeTab);
38
35
  return /* @__PURE__ */ jsx(TabsContext.Provider, { value, children: typeof children == "function" ? children(currentItem) : /* @__PURE__ */ jsxs(Fragment, { children: [
39
- /* @__PURE__ */ jsx(Tabs.List, { className: tabListClasses }),
36
+ /* @__PURE__ */ jsx(Tabs.List, { fullWidth }),
40
37
  /* @__PURE__ */ jsx(Tabs.Panel, { currentItem, children: currentItem == null ? void 0 : currentItem.content })
41
38
  ] }) });
42
39
  };
@@ -1,6 +1,12 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
+ export interface TabsListProps extends ComponentPropsWithoutRef<'div'> {
3
+ /**
4
+ * Whether tabs should take full available width
5
+ */
6
+ fullWidth?: boolean;
7
+ }
2
8
  declare const TabsList: {
3
- (props: ComponentPropsWithoutRef<"div">): import("react/jsx-runtime").JSX.Element;
9
+ (props: TabsListProps): import("react/jsx-runtime").JSX.Element;
4
10
  displayName: string;
5
11
  };
6
12
  export default TabsList;
@@ -10,9 +10,11 @@ const TabsList = (props) => {
10
10
  } = useTabsContext(), {
11
11
  className,
12
12
  ...restProps
13
- } = props, tabslist = clsx("position-relative flex-shrink-0 overflow-x-auto", className);
13
+ } = props, ulClasses = clsx("nav nav-tabs flex-nowrap", {
14
+ "w-100": props.fullWidth
15
+ }), tabslist = clsx("position-relative flex-shrink-0 overflow-x-auto", className);
14
16
  return /* @__PURE__ */ jsxs("div", { className: tabslist, ...restProps, children: [
15
- /* @__PURE__ */ jsx("ul", { className: "nav nav-tabs flex-nowrap", role: "tablist", children: items.map((item, order) => /* @__PURE__ */ jsx(Tabs.Item, { order, ...item }, item.id)) }),
17
+ /* @__PURE__ */ jsx("ul", { className: ulClasses, role: "tablist", children: items.map((item, order) => /* @__PURE__ */ jsx(Tabs.Item, { order, ...item }, item.id)) }),
16
18
  /* @__PURE__ */ jsx("span", { className: "nav-slide", style: {
17
19
  left: tabUnderlineLeft,
18
20
  width: tabUnderlineWidth
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.2.11-develop-pedago.20250702150822",
3
+ "version": "2.2.11-develop-pedago.20250702151750",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -130,9 +130,9 @@
130
130
  "react-slugify": "^3.0.3",
131
131
  "swiper": "^10.1.0",
132
132
  "ua-parser-js": "^1.0.36",
133
- "@edifice.io/bootstrap": "2.2.11-develop-pedago.20250702150822",
134
- "@edifice.io/tiptap-extensions": "2.2.11-develop-pedago.20250702150822",
135
- "@edifice.io/utilities": "2.2.11-develop-pedago.20250702150822"
133
+ "@edifice.io/bootstrap": "2.2.11-develop-pedago.20250702151750",
134
+ "@edifice.io/tiptap-extensions": "2.2.11-develop-pedago.20250702151750",
135
+ "@edifice.io/utilities": "2.2.11-develop-pedago.20250702151750"
136
136
  },
137
137
  "devDependencies": {
138
138
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -163,8 +163,8 @@
163
163
  "vite": "^5.4.11",
164
164
  "vite-plugin-dts": "^4.1.0",
165
165
  "vite-tsconfig-paths": "^5.0.1",
166
- "@edifice.io/client": "2.2.11-develop-pedago.20250702150822",
167
- "@edifice.io/config": "2.2.11-develop-pedago.20250702150822"
166
+ "@edifice.io/client": "2.2.11-develop-pedago.20250702151750",
167
+ "@edifice.io/config": "2.2.11-develop-pedago.20250702151750"
168
168
  },
169
169
  "peerDependencies": {
170
170
  "@react-spring/web": "^9.7.5",