@availity/mui-transitions 0.1.2 → 0.2.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.
- package/CHANGELOG.md +10 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +11 -2
- package/dist/index.mjs +9 -1
- package/package.json +3 -1
- package/src/index.ts +1 -0
- package/src/lib/Collapse.stories.tsx +1 -1
- package/src/lib/Fade.stories.tsx +34 -0
- package/src/lib/Fade.test.tsx +14 -0
- package/src/lib/Fade.tsx +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.2.0](https://github.com/Availity/element/compare/@availity/mui-transitions@0.1.2...@availity/mui-transitions@0.2.0) (2024-06-21)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-typography` updated to version `0.1.2`
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **mui-transitions:** add Fade component ([0a6e4b9](https://github.com/Availity/element/commit/0a6e4b9b31da786f26f64a66ceef789a57d302fe))
|
|
14
|
+
|
|
5
15
|
## [0.1.2](https://github.com/Availity/element/compare/@availity/mui-transitions@0.1.1...@availity/mui-transitions@0.1.2) (2024-04-19)
|
|
6
16
|
|
|
7
17
|
## [0.1.1](https://github.com/Availity/element/compare/@availity/mui-transitions@0.1.0...@availity/mui-transitions@0.1.1) (2024-04-04)
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { CollapseProps as CollapseProps$1 } from '@mui/material/Collapse';
|
|
2
|
+
import { FadeProps as FadeProps$1 } from '@mui/material/Fade';
|
|
2
3
|
|
|
3
4
|
type CollapseProps = CollapseProps$1;
|
|
4
5
|
declare const Collapse: (props: CollapseProps) => JSX.Element;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
type FadeProps = FadeProps$1;
|
|
8
|
+
declare const Fade: (props: FadeProps) => JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { Collapse, type CollapseProps, Fade, type FadeProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { CollapseProps as CollapseProps$1 } from '@mui/material/Collapse';
|
|
2
|
+
import { FadeProps as FadeProps$1 } from '@mui/material/Fade';
|
|
2
3
|
|
|
3
4
|
type CollapseProps = CollapseProps$1;
|
|
4
5
|
declare const Collapse: (props: CollapseProps) => JSX.Element;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
type FadeProps = FadeProps$1;
|
|
8
|
+
declare const Fade: (props: FadeProps) => JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { Collapse, type CollapseProps, Fade, type FadeProps };
|
package/dist/index.js
CHANGED
|
@@ -44,7 +44,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
44
44
|
// src/index.ts
|
|
45
45
|
var src_exports = {};
|
|
46
46
|
__export(src_exports, {
|
|
47
|
-
Collapse: () => Collapse
|
|
47
|
+
Collapse: () => Collapse,
|
|
48
|
+
Fade: () => Fade
|
|
48
49
|
});
|
|
49
50
|
module.exports = __toCommonJS(src_exports);
|
|
50
51
|
|
|
@@ -54,7 +55,15 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
54
55
|
var Collapse = (props) => {
|
|
55
56
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Collapse.default, __spreadValues({}, props));
|
|
56
57
|
};
|
|
58
|
+
|
|
59
|
+
// src/lib/Fade.tsx
|
|
60
|
+
var import_Fade = __toESM(require("@mui/material/Fade"));
|
|
61
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
62
|
+
var Fade = (props) => {
|
|
63
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Fade.default, __spreadValues({}, props));
|
|
64
|
+
};
|
|
57
65
|
// Annotate the CommonJS export names for ESM import in node:
|
|
58
66
|
0 && (module.exports = {
|
|
59
|
-
Collapse
|
|
67
|
+
Collapse,
|
|
68
|
+
Fade
|
|
60
69
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -21,6 +21,14 @@ import { jsx } from "react/jsx-runtime";
|
|
|
21
21
|
var Collapse = (props) => {
|
|
22
22
|
return /* @__PURE__ */ jsx(MuiCollapse, __spreadValues({}, props));
|
|
23
23
|
};
|
|
24
|
+
|
|
25
|
+
// src/lib/Fade.tsx
|
|
26
|
+
import MuiFade from "@mui/material/Fade";
|
|
27
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
28
|
+
var Fade = (props) => {
|
|
29
|
+
return /* @__PURE__ */ jsx2(MuiFade, __spreadValues({}, props));
|
|
30
|
+
};
|
|
24
31
|
export {
|
|
25
|
-
Collapse
|
|
32
|
+
Collapse,
|
|
33
|
+
Fade
|
|
26
34
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-transitions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Availity MUI Transitions Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
+
"@availity/mui-alert": "^0.5.13",
|
|
36
|
+
"@availity/mui-typography": "^0.2.0",
|
|
35
37
|
"@mui/material": "^5.15.15",
|
|
36
38
|
"react": "18.2.0",
|
|
37
39
|
"react-dom": "18.2.0",
|
package/src/index.ts
CHANGED
|
@@ -13,7 +13,7 @@ import TableHead from '@mui/material/TableHead';
|
|
|
13
13
|
import TableRow from '@mui/material/TableRow';
|
|
14
14
|
import TableCell from '@mui/material/TableCell';
|
|
15
15
|
import TableBody from '@mui/material/TableBody';
|
|
16
|
-
import Alert from '@mui
|
|
16
|
+
import { Alert } from '@availity/mui-alert';
|
|
17
17
|
|
|
18
18
|
/** Expand from the start edge of the child element. */
|
|
19
19
|
const meta: Meta<typeof Collapse> = {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Each exported component in the package should have its own stories file
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
|
+
import { Alert } from '@availity/mui-alert';
|
|
6
|
+
import { Fade, FadeProps } from './Fade';
|
|
7
|
+
|
|
8
|
+
/** Expand from the start edge of the child element. */
|
|
9
|
+
const meta: Meta<typeof Fade> = {
|
|
10
|
+
title: 'Components/Transitions/Fade',
|
|
11
|
+
component: Fade,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
export const _Fade: StoryObj<typeof Fade> = {
|
|
18
|
+
render: (args: FadeProps) => {
|
|
19
|
+
const [visible, setVisible] = useState(true);
|
|
20
|
+
|
|
21
|
+
const onClose = () => {
|
|
22
|
+
setVisible(false);
|
|
23
|
+
setTimeout(() => setVisible(true), 1000);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<Fade in={visible} {...args}>
|
|
28
|
+
<div>
|
|
29
|
+
<Alert onClose={onClose}>Dismissable Alert</Alert>
|
|
30
|
+
</div>
|
|
31
|
+
</Fade>
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { render } from '@testing-library/react';
|
|
2
|
+
import { Typography } from '@availity/mui-typography';
|
|
3
|
+
import { Fade } from './Fade';
|
|
4
|
+
|
|
5
|
+
describe('Fade', () => {
|
|
6
|
+
test('should render successfully', () => {
|
|
7
|
+
const { getByText } = render(
|
|
8
|
+
<Fade>
|
|
9
|
+
<Typography>Test</Typography>
|
|
10
|
+
</Fade>
|
|
11
|
+
);
|
|
12
|
+
expect(getByText('Test')).toBeTruthy();
|
|
13
|
+
});
|
|
14
|
+
});
|