@edifice.io/react 2.2.11-develop-pedago.20250702162053 → 2.2.11-develop-pedago.20250702172334

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
  Panel: {
41
- ({ children, currentItem }: import('./TabsPanel').TabsPanelProps): import("react/jsx-runtime").JSX.Element;
41
+ ({ children, currentItem, fullHeight }: import('./TabsPanel').TabsPanelProps): import("react/jsx-runtime").JSX.Element;
42
42
  displayName: string;
43
43
  };
44
44
  List: {
@@ -34,8 +34,8 @@ const Tabs = ({
34
34
  onKeyDown
35
35
  }), [activeTab, items, onKeyDown, setSelectedTab, tabUnderlineLeft, tabUnderlineWidth, tabsRef]), currentItem = items.find((item) => item.id === activeTab);
36
36
  return /* @__PURE__ */ jsx(TabsContext.Provider, { value, children: typeof children == "function" ? children(currentItem) : /* @__PURE__ */ jsxs(Fragment, { children: [
37
- /* @__PURE__ */ jsx(Tabs.List, { fullWidth, fullHeight }),
38
- /* @__PURE__ */ jsx(Tabs.Panel, { currentItem, children: currentItem == null ? void 0 : currentItem.content })
37
+ /* @__PURE__ */ jsx(Tabs.List, { fullWidth }),
38
+ /* @__PURE__ */ jsx(Tabs.Panel, { currentItem, fullHeight, children: currentItem == null ? void 0 : currentItem.content })
39
39
  ] }) });
40
40
  };
41
41
  Tabs.Item = TabsItem;
@@ -4,10 +4,6 @@ export interface TabsListProps extends ComponentPropsWithoutRef<'div'> {
4
4
  * Whether tabs should take full available width
5
5
  */
6
6
  fullWidth?: boolean;
7
- /**
8
- * Whether tabs should take full available height
9
- */
10
- fullHeight?: boolean;
11
7
  }
12
8
  declare const TabsList: {
13
9
  (props: TabsListProps): import("react/jsx-runtime").JSX.Element;
@@ -11,8 +11,7 @@ const TabsList = (props) => {
11
11
  className,
12
12
  ...restProps
13
13
  } = props, ulClasses = clsx("nav nav-tabs flex-nowrap", {
14
- "w-100": props.fullWidth,
15
- "position-relative h-100": props.fullHeight
14
+ "w-100": props.fullWidth
16
15
  }), tabslist = clsx("position-relative flex-shrink-0 overflow-x-auto", className);
17
16
  return /* @__PURE__ */ jsxs("div", { className: tabslist, ...restProps, children: [
18
17
  /* @__PURE__ */ jsx("ul", { className: ulClasses, role: "tablist", children: items.map((item, order) => /* @__PURE__ */ jsx(Tabs.Item, { order, ...item }, item.id)) }),
@@ -9,9 +9,13 @@ export interface TabsPanelProps {
9
9
  * Current Item
10
10
  */
11
11
  currentItem: TabsItemProps | undefined;
12
+ /**
13
+ * Whether tabs should take full available height
14
+ */
15
+ fullHeight?: boolean;
12
16
  }
13
17
  declare const TabsPanel: {
14
- ({ children, currentItem }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
18
+ ({ children, currentItem, fullHeight }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
15
19
  displayName: string;
16
20
  };
17
21
  export default TabsPanel;
@@ -1,13 +1,17 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useTabsContext } from "../context/TabsContext.js";
3
+ import clsx from "clsx";
3
4
  const TabsPanel = ({
4
5
  children,
5
- currentItem
6
+ currentItem,
7
+ fullHeight
6
8
  }) => {
7
9
  const {
8
10
  activeTab
9
- } = useTabsContext();
10
- return /* @__PURE__ */ jsx("div", { className: "tab-content d-flex flex-fill w-100", children: /* @__PURE__ */ jsx("div", { className: `tab-pane flex-fill w-100 fade ${activeTab === (currentItem == null ? void 0 : currentItem.id) ? "show active" : ""}`, id: `tabpanel-${currentItem == null ? void 0 : currentItem.id}`, role: "tabpanel", "aria-labelledby": `tab-${currentItem == null ? void 0 : currentItem.id}`, tabIndex: 0, children }) });
11
+ } = useTabsContext(), contentClasses = clsx("tab-content d-flex flex-fill w-100", {
12
+ "position-relative h-100": fullHeight
13
+ });
14
+ return /* @__PURE__ */ jsx("div", { className: contentClasses, children: /* @__PURE__ */ jsx("div", { className: `tab-pane flex-fill w-100 fade ${activeTab === (currentItem == null ? void 0 : currentItem.id) ? "show active" : ""}`, id: `tabpanel-${currentItem == null ? void 0 : currentItem.id}`, role: "tabpanel", "aria-labelledby": `tab-${currentItem == null ? void 0 : currentItem.id}`, tabIndex: 0, children }) });
11
15
  };
12
16
  export {
13
17
  TabsPanel as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.2.11-develop-pedago.20250702162053",
3
+ "version": "2.2.11-develop-pedago.20250702172334",
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.20250702162053",
134
- "@edifice.io/tiptap-extensions": "2.2.11-develop-pedago.20250702162053",
135
- "@edifice.io/utilities": "2.2.11-develop-pedago.20250702162053"
133
+ "@edifice.io/tiptap-extensions": "2.2.11-develop-pedago.20250702172334",
134
+ "@edifice.io/utilities": "2.2.11-develop-pedago.20250702172334",
135
+ "@edifice.io/bootstrap": "2.2.11-develop-pedago.20250702172334"
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.20250702162053",
167
- "@edifice.io/config": "2.2.11-develop-pedago.20250702162053"
166
+ "@edifice.io/client": "2.2.11-develop-pedago.20250702172334",
167
+ "@edifice.io/config": "2.2.11-develop-pedago.20250702172334"
168
168
  },
169
169
  "peerDependencies": {
170
170
  "@react-spring/web": "^9.7.5",