@availity/mui-tabs 1.1.0 → 1.2.1
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.
- package/CHANGELOG.md +13 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +4 -3
- package/src/lib/Tab.tsx +0 -2
- package/src/lib/TabList.stories.tsx +21 -0
- package/src/lib/Tabs.stories.tsx +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.2.1](https://github.com/Availity/element/compare/@availity/mui-tabs@1.2.0...@availity/mui-tabs@1.2.1) (2025-04-11)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-divider` updated to version `1.2.0`
|
|
10
|
+
* `mui-icon` updated to version `1.2.0`
|
|
11
|
+
## [1.2.0](https://github.com/Availity/element/compare/@availity/mui-tabs@1.1.0...@availity/mui-tabs@1.2.0) (2025-03-24)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **mui-tabs:** add icon and examples ([af6172d](https://github.com/Availity/element/commit/af6172d25882c03b543fff108424a6875027a5a0))
|
|
17
|
+
|
|
5
18
|
## [1.1.0](https://github.com/Availity/element/compare/@availity/mui-tabs@1.0.1...@availity/mui-tabs@1.1.0) (2025-03-13)
|
|
6
19
|
|
|
7
20
|
|
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { TabListProps as TabListProps$1 } from '@mui/lab/TabList';
|
|
|
4
4
|
import { TabsProps as TabsProps$1 } from '@mui/material/Tabs';
|
|
5
5
|
import { TabPanelProps as TabPanelProps$1 } from '@mui/lab/TabPanel';
|
|
6
6
|
|
|
7
|
-
type TabProps = Omit<TabProps$1, 'centerRipple' | 'disableFocusRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | '
|
|
7
|
+
type TabProps = Omit<TabProps$1, 'centerRipple' | 'disableFocusRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'touchRippleRef' | 'TouchRippleProps'>;
|
|
8
8
|
declare const Tab: (props: TabProps) => JSX.Element;
|
|
9
9
|
|
|
10
10
|
interface TabContextProps extends TabContextProps$1 {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { TabListProps as TabListProps$1 } from '@mui/lab/TabList';
|
|
|
4
4
|
import { TabsProps as TabsProps$1 } from '@mui/material/Tabs';
|
|
5
5
|
import { TabPanelProps as TabPanelProps$1 } from '@mui/lab/TabPanel';
|
|
6
6
|
|
|
7
|
-
type TabProps = Omit<TabProps$1, 'centerRipple' | 'disableFocusRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | '
|
|
7
|
+
type TabProps = Omit<TabProps$1, 'centerRipple' | 'disableFocusRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'touchRippleRef' | 'TouchRippleProps'>;
|
|
8
8
|
declare const Tab: (props: TabProps) => JSX.Element;
|
|
9
9
|
|
|
10
10
|
interface TabContextProps extends TabContextProps$1 {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-tabs",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Availity MUI Tabs Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,11 +43,12 @@
|
|
|
43
43
|
"@mui/lab": "6.0.0-beta.12"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@availity/mui-divider": "^1.0.
|
|
46
|
+
"@availity/mui-divider": "^1.0.2",
|
|
47
|
+
"@availity/mui-icon": "^1.0.2",
|
|
47
48
|
"@mui/material": "^6.4.5",
|
|
48
49
|
"react": "18.2.0",
|
|
49
50
|
"react-dom": "18.2.0",
|
|
50
|
-
"tsup": "^8.
|
|
51
|
+
"tsup": "^8.4.0",
|
|
51
52
|
"typescript": "^5.4.5"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
package/src/lib/Tab.tsx
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
|
+
import { LinkIcon, UserIcon } from '@availity/mui-icon';
|
|
5
6
|
import { TabList, TabListProps } from './TabList';
|
|
6
7
|
import { Tab } from './Tab';
|
|
7
8
|
import { TabContext } from './TabContext';
|
|
@@ -43,3 +44,23 @@ export const _TabList: StoryObj<typeof TabList> = {
|
|
|
43
44
|
},
|
|
44
45
|
args: {},
|
|
45
46
|
};
|
|
47
|
+
|
|
48
|
+
export const _WithIcons: StoryObj<typeof TabList> = {
|
|
49
|
+
render: () => {
|
|
50
|
+
const [value, setValue] = useState('1');
|
|
51
|
+
|
|
52
|
+
const handleChange = (event: React.SyntheticEvent, newValue: string) => {
|
|
53
|
+
setValue(newValue);
|
|
54
|
+
};
|
|
55
|
+
return (
|
|
56
|
+
<TabContext value={value}>
|
|
57
|
+
<TabList onChange={handleChange} aria-label="lab API tabs example">
|
|
58
|
+
<Tab value="1" icon={<LinkIcon/>} label="Links" />
|
|
59
|
+
<Tab value="2" icon={<UserIcon/>} label="My Account" />
|
|
60
|
+
</TabList>
|
|
61
|
+
<TabPanel value="1" children={`Hello from Panel ${value}`} />
|
|
62
|
+
<TabPanel value="2" children={`Hello from Panel ${value}`} />
|
|
63
|
+
</TabContext>
|
|
64
|
+
);
|
|
65
|
+
},
|
|
66
|
+
};
|
package/src/lib/Tabs.stories.tsx
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
5
|
import Box from '@mui/material/Box';
|
|
6
6
|
import Typography from '@mui/material/Typography';
|
|
7
|
+
import { LinkIcon, UserIcon } from '@availity/mui-icon';
|
|
7
8
|
import { Tabs, TabsProps } from './Tabs';
|
|
8
9
|
import { Tab } from './Tab';
|
|
10
|
+
import { useState } from 'react';
|
|
9
11
|
|
|
10
12
|
const meta: Meta<typeof Tabs> = {
|
|
11
13
|
title: 'Components/Tabs/Tabs',
|
|
@@ -134,3 +136,24 @@ export const _Levels: StoryObj<typeof Tabs> = {
|
|
|
134
136
|
);
|
|
135
137
|
},
|
|
136
138
|
};
|
|
139
|
+
|
|
140
|
+
export const _WithIcons: StoryObj<typeof Tabs> = {
|
|
141
|
+
render: () => {
|
|
142
|
+
const [value, setValue] = useState(0);
|
|
143
|
+
|
|
144
|
+
const handleChange = (event: React.SyntheticEvent, newValue: number) => {
|
|
145
|
+
setValue(newValue);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<>
|
|
150
|
+
<Tabs value={value} onChange={handleChange}>
|
|
151
|
+
<Tab icon={<LinkIcon/>} label="Links" {...a11yProps(0)} />
|
|
152
|
+
<Tab icon={<UserIcon/>} label="My Account" {...a11yProps(1)} />
|
|
153
|
+
</Tabs>
|
|
154
|
+
<CustomTabPanel value={value} index={0} />
|
|
155
|
+
<CustomTabPanel value={value} index={1} />
|
|
156
|
+
</>
|
|
157
|
+
);
|
|
158
|
+
},
|
|
159
|
+
};
|