@team-monolith/cds 1.111.1 → 1.111.2

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.
@@ -1,5 +1,6 @@
1
1
  import { ReactNode, MouseEvent } from "react";
2
- export declare const TabsClasses: {
2
+ export declare const tabsClasses: {
3
+ readonly root: "Tabs";
3
4
  readonly tabBar: "Tabs-tabBar";
4
5
  readonly tab: "Tabs-tab";
5
6
  readonly activeIndicator: "Tabs-activeIndicator";
@@ -3,7 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
3
3
  import { css } from "@emotion/react";
4
4
  import styled from "@emotion/styled";
5
5
  import { HOVER } from "../utils/hover";
6
- export const TabsClasses = {
6
+ export const tabsClasses = {
7
+ root: "Tabs",
7
8
  tabBar: "Tabs-tabBar",
8
9
  tab: "Tabs-tab",
9
10
  activeIndicator: "Tabs-activeIndicator",
@@ -15,7 +16,7 @@ export const TabsClasses = {
15
16
  */
16
17
  export function Tabs({ className, activeKey, onTabClick, items }) {
17
18
  var _a;
18
- return (_jsxs(Wrapper, { className: className, children: [_jsx(TabBar, { className: TabsClasses.tabBar, children: items.map((item) => (_jsxs(Tab, { className: TabsClasses.tab, onClick: (event) => onTabClick === null || onTabClick === void 0 ? void 0 : onTabClick(item.key, event), active: activeKey === item.key, children: [item.label, activeKey === item.key && (_jsx(ActiveIndicator, { className: TabsClasses.activeIndicator }))] }, item.key))) }), (_a = items.find((item) => item.key === activeKey)) === null || _a === void 0 ? void 0 : _a.children] }));
19
+ return (_jsxs(Wrapper, { className: [tabsClasses.root, className].filter(Boolean).join(" "), children: [_jsx(TabBar, { className: tabsClasses.tabBar, children: items.map((item) => (_jsxs(Tab, { className: tabsClasses.tab, onClick: (event) => onTabClick === null || onTabClick === void 0 ? void 0 : onTabClick(item.key, event), active: activeKey === item.key, children: [item.label, activeKey === item.key && (_jsx(ActiveIndicator, { className: tabsClasses.activeIndicator }))] }, item.key))) }), (_a = items.find((item) => item.key === activeKey)) === null || _a === void 0 ? void 0 : _a.children] }));
19
20
  }
20
21
  const Wrapper = styled.div `
21
22
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.111.1",
3
+ "version": "1.111.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,