rox-react-components 0.0.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/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Rox-React-Components
2
+
3
+ # Usage & Components
4
+
5
+ [Demo](https://stackblitz.com/edit/stackblitz-starters-wftsic?file=src%2FApp.tsx)
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Button: () => React.JSX.Element;
3
+ export default Button;
@@ -0,0 +1,2 @@
1
+ import Button from './Button';
2
+ export default Button;
@@ -0,0 +1,4 @@
1
+ declare const styles: {
2
+ red: object;
3
+ };
4
+ export default styles;
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ interface CardProps extends PropsWithChildren {
3
+ expand?: boolean;
4
+ duration?: number;
5
+ }
6
+ declare const Card: FC<CardProps>;
7
+ export default Card;
@@ -0,0 +1,17 @@
1
+ import { css } from 'aphrodite';
2
+ import React, { useMemo } from 'react';
3
+ import styles from './styles.js';
4
+
5
+ var Card = function (_a) {
6
+ var _b = _a.expand, expand = _b === void 0 ? false : _b, children = _a.children, _c = _a.duration, duration = _c === void 0 ? 200 : _c;
7
+ var transitionDuration = useMemo(function () { return ({
8
+ transitionDuration: "".concat(duration, "ms"),
9
+ msTransitionDuration: "".concat(duration, "ms"),
10
+ MozTransitionDuration: "".concat(duration, "ms"),
11
+ WebkitTransitionDuration: "".concat(duration, "ms"),
12
+ }); }, [duration]);
13
+ return (React.createElement("div", { style: transitionDuration, className: "".concat(css(styles.collapse), " ").concat(expand ? css(styles.expand) : '') },
14
+ React.createElement("div", { className: css(styles.hide0) }, children)));
15
+ };
16
+
17
+ export { Card as default };
@@ -0,0 +1,2 @@
1
+ import Card from './Card';
2
+ export default Card;
@@ -0,0 +1,5 @@
1
+ import Card from './Card.js';
2
+
3
+
4
+
5
+ export { Card as default };
@@ -0,0 +1,6 @@
1
+ declare const styles: {
2
+ collapse: object;
3
+ expand: object;
4
+ hide0: object;
5
+ };
6
+ export default styles;
@@ -0,0 +1,17 @@
1
+ import { StyleSheet } from 'aphrodite';
2
+
3
+ var styles = StyleSheet.create({
4
+ collapse: {
5
+ display: 'grid',
6
+ gridTemplateRows: '0fr',
7
+ overflow: 'hidden',
8
+ },
9
+ expand: {
10
+ gridTemplateRows: '1fr',
11
+ },
12
+ hide0: {
13
+ minHeight: 0,
14
+ },
15
+ });
16
+
17
+ export { styles as default };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Slide: () => React.JSX.Element;
3
+ export default Slide;
@@ -0,0 +1,2 @@
1
+ import Slide from './Slide';
2
+ export default Slide;
@@ -0,0 +1 @@
1
+ export { default as Card } from './Card';
@@ -0,0 +1 @@
1
+ export { default as Card } from './Card/Card.js';
@@ -0,0 +1,9 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+
3
+ interface CardProps extends PropsWithChildren {
4
+ expand?: boolean;
5
+ duration?: number;
6
+ }
7
+ declare const Card: FC<CardProps>;
8
+
9
+ export { Card };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Button: () => React.JSX.Element;
3
+ export default Button;
@@ -0,0 +1,2 @@
1
+ import Button from './Button';
2
+ export default Button;
@@ -0,0 +1,4 @@
1
+ declare const styles: {
2
+ red: object;
3
+ };
4
+ export default styles;
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ interface CardProps extends PropsWithChildren {
3
+ expand?: boolean;
4
+ duration?: number;
5
+ }
6
+ declare const Card: FC<CardProps>;
7
+ export default Card;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var aphrodite = require('aphrodite');
4
+ var React = require('react');
5
+ var styles = require('./styles.js');
6
+
7
+ var Card = function (_a) {
8
+ var _b = _a.expand, expand = _b === void 0 ? false : _b, children = _a.children, _c = _a.duration, duration = _c === void 0 ? 200 : _c;
9
+ var transitionDuration = React.useMemo(function () { return ({
10
+ transitionDuration: "".concat(duration, "ms"),
11
+ msTransitionDuration: "".concat(duration, "ms"),
12
+ MozTransitionDuration: "".concat(duration, "ms"),
13
+ WebkitTransitionDuration: "".concat(duration, "ms"),
14
+ }); }, [duration]);
15
+ return (React.createElement("div", { style: transitionDuration, className: "".concat(aphrodite.css(styles.collapse), " ").concat(expand ? aphrodite.css(styles.expand) : '') },
16
+ React.createElement("div", { className: aphrodite.css(styles.hide0) }, children)));
17
+ };
18
+
19
+ module.exports = Card;
@@ -0,0 +1,2 @@
1
+ import Card from './Card';
2
+ export default Card;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var Card = require('./Card.js');
4
+
5
+
6
+
7
+ module.exports = Card;
@@ -0,0 +1,6 @@
1
+ declare const styles: {
2
+ collapse: object;
3
+ expand: object;
4
+ hide0: object;
5
+ };
6
+ export default styles;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var aphrodite = require('aphrodite');
4
+
5
+ var styles = aphrodite.StyleSheet.create({
6
+ collapse: {
7
+ display: 'grid',
8
+ gridTemplateRows: '0fr',
9
+ overflow: 'hidden',
10
+ },
11
+ expand: {
12
+ gridTemplateRows: '1fr',
13
+ },
14
+ hide0: {
15
+ minHeight: 0,
16
+ },
17
+ });
18
+
19
+ module.exports = styles;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Slide: () => React.JSX.Element;
3
+ export default Slide;
@@ -0,0 +1,2 @@
1
+ import Slide from './Slide';
2
+ export default Slide;
@@ -0,0 +1 @@
1
+ export { default as Card } from './Card';
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var Card = require('./Card/Card.js');
4
+
5
+
6
+
7
+ exports.Card = Card;
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "rox-react-components",
3
+ "version": "0.0.1",
4
+ "main": "dist/lib/index.js",
5
+ "module": "dist/es/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "README.md",
10
+ "pakcage.json"
11
+ ],
12
+ "author": "YangSu.Zhou",
13
+ "scripts": {
14
+ "dev": "cross-env NODE_ENV=development rollup -c",
15
+ "build": "cross-env NODE_ENV=production rollup -c -w"
16
+ },
17
+ "license": "MIT",
18
+ "devDependencies": {
19
+ "@rollup/plugin-commonjs": "^25.0.7",
20
+ "@rollup/plugin-node-resolve": "^15.2.3",
21
+ "@rollup/plugin-strip": "^3.0.4",
22
+ "@rollup/plugin-terser": "^0.4.4",
23
+ "@rollup/plugin-typescript": "^11.1.5",
24
+ "@types/node": "^20.8.10",
25
+ "@types/react": "^18.2.35",
26
+ "@types/react-dom": "^18.2.14",
27
+ "cross-env": "^7.0.3",
28
+ "rollup": "^4.3.0",
29
+ "rollup-plugin-dts": "^6.1.0",
30
+ "rollup-plugin-node-externals": "^6.1.2"
31
+ },
32
+ "peerDependencies": {
33
+ "react": "^18.2.0",
34
+ "react-dom": "^18.2.0"
35
+ },
36
+ "dependencies": {
37
+ "aphrodite": "^2.4.0",
38
+ "tslib": "^2.6.2"
39
+ }
40
+ }