draft-components 2.7.0 → 2.8.0

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,7 +1,14 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
2
  import { TabName, TabSetter } from './types.js';
3
+ import { TabList } from './tab-list.js';
4
+ import { TabPanel } from './tab-panel.js';
3
5
  export interface TabsProps extends ComponentPropsWithoutRef<'div'> {
4
6
  selectedTab: TabName;
5
7
  onSelectTab: TabSetter;
6
8
  }
7
9
  export declare function Tabs({ className, children, selectedTab, onSelectTab, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare namespace Tabs {
11
+ var List: typeof TabList;
12
+ var Tab: typeof import("./tab.js").Tab;
13
+ var Panel: typeof TabPanel;
14
+ }
@@ -1,6 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { classNames } from '../../lib/react-helpers.js';
3
3
  import { TabsContextProvider } from './tabs-context.js';
4
+ import { TabList } from './tab-list.js';
5
+ import { Tab } from './tab.js';
6
+ import { TabPanel } from './tab-panel.js';
4
7
  export function Tabs({ className, children, selectedTab, onSelectTab, ...props }) {
5
8
  return (_jsx(TabsContextProvider, { selectedTab: selectedTab, setSelectedTab: onSelectTab, children: _jsx("div", { ...props, className: classNames('dc-tabs', className), children: children }) }));
6
9
  }
10
+ Tabs.List = TabList;
11
+ Tabs.Tab = Tab;
12
+ Tabs.Panel = TabPanel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "draft-components",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "The React based UI components library.",
5
5
  "type": "module",
6
6
  "exports": {