@wavv/ui 1.9.1 → 1.9.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,8 +1,17 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Margin } from './types';
3
- type TabItem = {
3
+ import { IconNames } from './Icon/icons';
4
+ export type TabItem = {
5
+ /** The id of the tab */
4
6
  id: string | number;
7
+ /** The text to be displayed in the tab */
5
8
  label: ReactNode;
9
+ /** Controls whether the tab is visible */
10
+ visible?: boolean;
11
+ /** Adds an icon for the specific icon name to the tab */
12
+ icon?: IconNames;
13
+ /** Positions the icon to the left or right of the tab text */
14
+ iconPosition?: 'left' | 'right';
6
15
  };
7
16
  type Props<ItemType> = {
8
17
  /** The tab items to be rendered */
@@ -10,7 +19,7 @@ type Props<ItemType> = {
10
19
  /** The id of the active tab */
11
20
  activeItem: string | number;
12
21
  /** Controls whether the tabs fill the space of the container */
13
- itemWidth?: 'auto' | 'fill';
22
+ itemWidth?: 'fit' | 'fill';
14
23
  /** The gap between each tab item */
15
24
  itemGap?: string | number;
16
25
  /** The function called with the tab item after the tab is changed */
@@ -43,6 +43,7 @@ export { default as Tabs } from './components/Tabs';
43
43
  export { default as theme } from './theme';
44
44
  export type { ITheme, ThemeProp } from './theme/ThemeTypes';
45
45
  export type { IconNames } from './components/Icon/icons';
46
+ export type { TabItem } from './components/Tabs';
46
47
  export type { DropdownOption } from './components/Dropdown';
47
48
  export type { Item as TransferItem, Action as TransferAction, Next as TransferNext } from './components/TransferList';
48
49
  export type { AudioRef, DraftEditorRef, InputRef, MultiSelectRef, Margin, Padding, Position, MinWidth, MaxWidth, MinHeight, MaxHeight, MinWidthHeight, MaxWidthHeight, Width, Height, WidthHeight, MarginPadding, FlexPosition, As, } from './components/types';
package/build/index.d.ts CHANGED
@@ -2531,8 +2531,16 @@ type ToggleProps = {
2531
2531
  declare const Toggle: ({ id, label, labelPosition, checked, disabled, onChange, margin, marginTop, marginBottom, marginRight, marginLeft, ...props }: ToggleProps) => react_jsx_runtime.JSX.Element;
2532
2532
 
2533
2533
  type TabItem = {
2534
+ /** The id of the tab */
2534
2535
  id: string | number;
2536
+ /** The text to be displayed in the tab */
2535
2537
  label: ReactNode;
2538
+ /** Controls whether the tab is visible */
2539
+ visible?: boolean;
2540
+ /** Adds an icon for the specific icon name to the tab */
2541
+ icon?: IconNames;
2542
+ /** Positions the icon to the left or right of the tab text */
2543
+ iconPosition?: 'left' | 'right';
2536
2544
  };
2537
2545
  type Props$1<ItemType> = {
2538
2546
  /** The tab items to be rendered */
@@ -2540,7 +2548,7 @@ type Props$1<ItemType> = {
2540
2548
  /** The id of the active tab */
2541
2549
  activeItem: string | number;
2542
2550
  /** Controls whether the tabs fill the space of the container */
2543
- itemWidth?: 'auto' | 'fill';
2551
+ itemWidth?: 'fit' | 'fill';
2544
2552
  /** The gap between each tab item */
2545
2553
  itemGap?: string | number;
2546
2554
  /** The function called with the tab item after the tab is changed */
@@ -2646,4 +2654,4 @@ declare const positionProps: ({ position, top, bottom, right, left }: Position)
2646
2654
  left: string | number | undefined;
2647
2655
  };
2648
2656
 
2649
- export { Accordion, As, Audio, AudioRef, BarChart, Button, Calendar, Checkbox, Code, Table$1 as DocTable, DraftEditor, DraftEditorRef, Dropdown, DropdownMenu, OptionItem as DropdownOption, FlexPosition, Form, Grid, Height, ITheme, Icon, IconNames, ImageViewer, InlineCode, Input, InputRef, _default as InputUtils, Label, LineChart, Margin, MarginPadding, MaxHeight, MaxWidth, MaxWidthHeight, Menu, Message, MessageHr, MinHeight, MinWidth, MinWidthHeight, Modal, MultiSelect, MultiSelectRef, Notification, Options, Padding, Pagination, PieChart, Position, Progress, Radio, ResetStyles, ScrollbarStyles, Slider, Spacer, Spinner, Table, Tabs, ThemeProp, ToastStyles, Toggle, Tooltip, Action as TransferAction, Item as TransferItem, TransferList, Next as TransferNext, Width, WidthHeight, copyToClipboard, formatDate, marginProps, numberWithCommas, paddingProps, positionProps, theme, useConfirm, useElementObserver, useEventListener, useOnClickOutside, usePrevious, useSelect, useSelectAll, useWindowSize, widthHeightProps };
2657
+ export { Accordion, As, Audio, AudioRef, BarChart, Button, Calendar, Checkbox, Code, Table$1 as DocTable, DraftEditor, DraftEditorRef, Dropdown, DropdownMenu, OptionItem as DropdownOption, FlexPosition, Form, Grid, Height, ITheme, Icon, IconNames, ImageViewer, InlineCode, Input, InputRef, _default as InputUtils, Label, LineChart, Margin, MarginPadding, MaxHeight, MaxWidth, MaxWidthHeight, Menu, Message, MessageHr, MinHeight, MinWidth, MinWidthHeight, Modal, MultiSelect, MultiSelectRef, Notification, Options, Padding, Pagination, PieChart, Position, Progress, Radio, ResetStyles, ScrollbarStyles, Slider, Spacer, Spinner, TabItem, Table, Tabs, ThemeProp, ToastStyles, Toggle, Tooltip, Action as TransferAction, Item as TransferItem, TransferList, Next as TransferNext, Width, WidthHeight, copyToClipboard, formatDate, marginProps, numberWithCommas, paddingProps, positionProps, theme, useConfirm, useElementObserver, useEventListener, useOnClickOutside, usePrevious, useSelect, useSelectAll, useWindowSize, widthHeightProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavv/ui",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "files": [
5
5
  "build/**/*"
6
6
  ],