math-main-components 0.0.1 → 0.0.3

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.
Files changed (29) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/types/components/Accordeon/Accordeon.d.ts +3 -0
  3. package/dist/cjs/types/components/Accordeon/index.d.ts +1 -3
  4. package/dist/cjs/types/components/Dialog/Dialog.d.ts +3 -0
  5. package/dist/cjs/types/components/Dialog/index.d.ts +1 -3
  6. package/dist/cjs/types/components/Gap/Gap.d.ts +3 -0
  7. package/dist/cjs/types/components/Gap/index.d.ts +1 -3
  8. package/dist/cjs/types/components/SvgIcon/SvgIcon.d.ts +4 -0
  9. package/dist/cjs/types/components/SvgIcon/index.d.ts +1 -4
  10. package/dist/esm/index.js +1 -1
  11. package/dist/esm/types/components/Accordeon/Accordeon.d.ts +3 -0
  12. package/dist/esm/types/components/Accordeon/index.d.ts +1 -3
  13. package/dist/esm/types/components/Dialog/Dialog.d.ts +3 -0
  14. package/dist/esm/types/components/Dialog/index.d.ts +1 -3
  15. package/dist/esm/types/components/Gap/Gap.d.ts +3 -0
  16. package/dist/esm/types/components/Gap/index.d.ts +1 -3
  17. package/dist/esm/types/components/SvgIcon/SvgIcon.d.ts +4 -0
  18. package/dist/esm/types/components/SvgIcon/index.d.ts +1 -4
  19. package/package.json +10 -8
  20. package/src/components/Accordeon/Accordeon.tsx +24 -0
  21. package/src/components/Accordeon/index.tsx +1 -24
  22. package/src/components/Dialog/Dialog.tsx +26 -0
  23. package/src/components/Dialog/index.tsx +1 -26
  24. package/src/components/Gap/Gap.tsx +9 -0
  25. package/src/components/Gap/index.tsx +1 -9
  26. package/src/components/SvgIcon/{index.tsx → SvgIcon.tsx} +1 -1
  27. package/src/components/SvgIcon/index.ts +2 -0
  28. package/src/components/index.d.ts +1 -0
  29. package/src/index.d.ts +1 -0
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";require("react");
1
+ "use strict";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { AccordeonProps } from './Accordeon.types';
3
+ export declare function Accordeon({ title, children }: AccordeonProps): React.JSX.Element;
@@ -1,3 +1 @@
1
- import React from 'react';
2
- import { AccordeonProps } from './Accordeon.types';
3
- export default function Accordeon({ title, children }: AccordeonProps): React.JSX.Element;
1
+ export * from './Accordeon';
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { DialogProps } from "./Dialog.types";
3
+ export declare function Dialog({ active, onClose, children }: DialogProps): React.JSX.Element;
@@ -1,3 +1 @@
1
- import React from "react";
2
- import { DialogProps } from "./Dialog.types";
3
- export default function Dialog({ active, onClose, children }: DialogProps): React.JSX.Element;
1
+ export * from './Dialog';
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { GapProps } from "./Gap.types";
3
+ export declare function Gap({ size }: GapProps): React.JSX.Element;
@@ -1,3 +1 @@
1
- import React from "react";
2
- import { GapProps } from "./Gap.types";
3
- export default function Gap({ size }: GapProps): React.JSX.Element;
1
+ export * from './';
@@ -0,0 +1,4 @@
1
+ import "external-svg-loader";
2
+ import React from 'react';
3
+ import { SvgIconProps } from "./SvgIcon.types";
4
+ export declare function SvgIcon({ iconName, size, className, onClick }: SvgIconProps): React.JSX.Element;
@@ -1,4 +1 @@
1
- import "external-svg-loader";
2
- import React from 'react';
3
- import { SvgIconProps } from "./SvgIcon.types";
4
- export default function SvgIcon({ iconName, size, className, onClick }: SvgIconProps): React.JSX.Element;
1
+ export * from './SvgIcon';
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import"react";
1
+
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { AccordeonProps } from './Accordeon.types';
3
+ export declare function Accordeon({ title, children }: AccordeonProps): React.JSX.Element;
@@ -1,3 +1 @@
1
- import React from 'react';
2
- import { AccordeonProps } from './Accordeon.types';
3
- export default function Accordeon({ title, children }: AccordeonProps): React.JSX.Element;
1
+ export * from './Accordeon';
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { DialogProps } from "./Dialog.types";
3
+ export declare function Dialog({ active, onClose, children }: DialogProps): React.JSX.Element;
@@ -1,3 +1 @@
1
- import React from "react";
2
- import { DialogProps } from "./Dialog.types";
3
- export default function Dialog({ active, onClose, children }: DialogProps): React.JSX.Element;
1
+ export * from './Dialog';
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { GapProps } from "./Gap.types";
3
+ export declare function Gap({ size }: GapProps): React.JSX.Element;
@@ -1,3 +1 @@
1
- import React from "react";
2
- import { GapProps } from "./Gap.types";
3
- export default function Gap({ size }: GapProps): React.JSX.Element;
1
+ export * from './';
@@ -0,0 +1,4 @@
1
+ import "external-svg-loader";
2
+ import React from 'react';
3
+ import { SvgIconProps } from "./SvgIcon.types";
4
+ export declare function SvgIcon({ iconName, size, className, onClick }: SvgIconProps): React.JSX.Element;
@@ -1,4 +1 @@
1
- import "external-svg-loader";
2
- import React from 'react';
3
- import { SvgIconProps } from "./SvgIcon.types";
4
- export default function SvgIcon({ iconName, size, className, onClick }: SvgIconProps): React.JSX.Element;
1
+ export * from './SvgIcon';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-main-components",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "author": "Emilian Scheel",
5
5
  "license": "MIT",
6
6
  "main": "dist/cjs/index.js",
@@ -10,27 +10,29 @@
10
10
  "build": "rollup -c --bundleConfigAsCjs"
11
11
  },
12
12
  "dependencies": {
13
+ "prop-types": "^15.8.1",
14
+ "tsc": "^2.0.4"
15
+ },
16
+ "devDependencies": {
13
17
  "@rollup/plugin-commonjs": "^25.0.4",
14
18
  "@rollup/plugin-node-resolve": "^15.2.1",
15
19
  "@rollup/plugin-typescript": "^11.1.3",
16
- "rollup-plugin-dts": "^6.0.2",
17
- "rollup-plugin-peer-deps-external": "^2.2.4",
18
- "rollup-plugin-terser": "^7.0.2",
19
- "tslib": "^2.6.2"
20
- },
21
- "devDependencies": {
22
20
  "@types/node-sass": "^4.11.4",
23
21
  "@types/react": "^18.2.22",
24
22
  "css-loader": "^6.8.1",
25
23
  "css-modules-typescript-loader": "^4.0.1",
26
24
  "node-sass": "^9.0.0",
27
25
  "rollup": "^3.29.2",
26
+ "rollup-plugin-dts": "^6.0.2",
27
+ "rollup-plugin-peer-deps-external": "^2.2.4",
28
+ "rollup-plugin-terser": "^7.0.2",
28
29
  "sass": "^1.67.0",
29
30
  "sass-loader": "^13.3.2",
31
+ "tslib": "^2.6.2",
30
32
  "typescript": "^5.2.2"
31
33
  },
32
34
  "peerDependencies": {
33
35
  "react": "^18.2.0",
34
36
  "react-dom": "^18.2.0"
35
37
  }
36
- }
38
+ }
@@ -0,0 +1,24 @@
1
+ import React, { useState } from 'react'
2
+ import { SvgIcon } from '../SvgIcon'
3
+ import { AccordeonProps } from './Accordeon.types'
4
+ import styles from './styles.module.scss'
5
+
6
+ export function Accordeon({
7
+ title,
8
+ children
9
+ }: AccordeonProps) {
10
+
11
+ const [isActive, setActive] = useState(false)
12
+
13
+ return (
14
+ <div className={[styles.container, isActive ? styles.active : styles.not_active].join(" ")}>
15
+ <div className={styles.head} onClick={() => setActive(!isActive)}>
16
+ <SvgIcon iconName="expand_more" />
17
+ <h3>{title}</h3>
18
+ </div>
19
+ <div className={styles.content}>
20
+ {children}
21
+ </div>
22
+ </div>
23
+ )
24
+ }
@@ -1,24 +1 @@
1
- import React, { useState } from 'react'
2
- import SvgIcon from '../SvgIcon'
3
- import { AccordeonProps } from './Accordeon.types'
4
- import styles from './styles.module.scss'
5
-
6
- export default function Accordeon({
7
- title,
8
- children
9
- }: AccordeonProps) {
10
-
11
- const [isActive, setActive] = useState(false)
12
-
13
- return (
14
- <div className={[styles.container, isActive ? styles.active : styles.not_active].join(" ")}>
15
- <div className={styles.head} onClick={() => setActive(!isActive)}>
16
- <SvgIcon iconName="expand_more" />
17
- <h3>{title}</h3>
18
- </div>
19
- <div className={styles.content}>
20
- {children}
21
- </div>
22
- </div>
23
- )
24
- }
1
+ export * from './Accordeon';
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { DialogProps } from "./Dialog.types";
3
+ import styles from './styles.module.scss';
4
+
5
+
6
+
7
+ export function Dialog({
8
+ active = false,
9
+ onClose = (event: any) => { },
10
+ children = null
11
+ }: DialogProps) {
12
+
13
+ function onClick(event: any) {
14
+ if (event.target.id == 'dialog-backdrop') {
15
+ onClose(event)
16
+ }
17
+ }
18
+
19
+ return (
20
+ <div id="dialog-backdrop" className={`${styles.container} ${active ? styles.active : styles.disabled}`} onClick={onClick}>
21
+ <div className={styles.dialog_window}>
22
+ {children}
23
+ </div>
24
+ </div>
25
+ )
26
+ }
@@ -1,26 +1 @@
1
- import React from "react";
2
- import { DialogProps } from "./Dialog.types";
3
- import styles from './styles.module.scss';
4
-
5
-
6
-
7
- export default function Dialog({
8
- active = false,
9
- onClose = (event: any) => { },
10
- children = null
11
- }: DialogProps) {
12
-
13
- function onClick(event: any) {
14
- if (event.target.id == 'dialog-backdrop') {
15
- onClose(event)
16
- }
17
- }
18
-
19
- return (
20
- <div id="dialog-backdrop" className={`${styles.container} ${active ? styles.active : styles.disabled}`} onClick={onClick}>
21
- <div className={styles.dialog_window}>
22
- {children}
23
- </div>
24
- </div>
25
- )
26
- }
1
+ export * from './Dialog';
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { GapProps } from "./Gap.types";
3
+
4
+
5
+ export function Gap({ size }: GapProps) {
6
+ return (
7
+ <div style={{ height: size }}></div>
8
+ )
9
+ }
@@ -1,9 +1 @@
1
- import React from "react";
2
- import { GapProps } from "./Gap.types";
3
-
4
-
5
- export default function Gap({ size }: GapProps) {
6
- return (
7
- <div style={{ height: size }}></div>
8
- )
9
- }
1
+ export * from './';
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { SvgIconProps } from "./SvgIcon.types";
4
4
 
5
5
 
6
- export default function SvgIcon({
6
+ export function SvgIcon({
7
7
  iconName,
8
8
  size = "24px",
9
9
  className = "",
@@ -0,0 +1,2 @@
1
+
2
+ export * from './SvgIcon';
@@ -0,0 +1 @@
1
+ export * from './Gap';
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './components';