@bodynarf/react.components 1.0.1 → 1.1.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/anchor.ts ADDED
@@ -0,0 +1,10 @@
1
+ import Anchor, { AnchorProps } from "src/components/anchor";
2
+ import { AnchorWithIconProps, SimpleAnchorProps } from "src/components/anchor/types";
3
+
4
+ export default Anchor;
5
+
6
+ export {
7
+ AnchorProps,
8
+ AnchorWithIconProps,
9
+ SimpleAnchorProps
10
+ };
package/button.ts ADDED
@@ -0,0 +1,11 @@
1
+ import Button, { ButtonProps } from "src/components/button";
2
+ import { ButtonType, ButtonWithIconProps, SimpleButtonProps } from "src/components/button/types";
3
+
4
+ export default Button;
5
+
6
+ export {
7
+ ButtonProps,
8
+ ButtonType,
9
+ ButtonWithIconProps,
10
+ SimpleButtonProps,
11
+ };
package/date.ts ADDED
@@ -0,0 +1,7 @@
1
+ import Date, { DateProps } from "src/components/primitives/date";
2
+
3
+ export default Date;
4
+
5
+ export {
6
+ DateProps,
7
+ };
package/dropdown.ts ADDED
@@ -0,0 +1,9 @@
1
+ import Dropdown, { DropdownProps } from "src/components/dropdown";
2
+ import { SelectableItem } from "src/components/dropdown/types";
3
+
4
+ export default Dropdown;
5
+
6
+ export {
7
+ DropdownProps,
8
+ SelectableItem,
9
+ };
package/hooks.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { useComponentOutsideClick } from "src/hooks/useComponentOutsideClick";
2
+
3
+ export {
4
+ useComponentOutsideClick,
5
+ };
package/icon.ts ADDED
@@ -0,0 +1,7 @@
1
+ import Icon, { IconProps } from "src/components/icon";
2
+
3
+ export default Icon;
4
+
5
+ export {
6
+ IconProps,
7
+ };
package/index.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { BaseInputElementProps, InputColor, InputLabel, InputSize } from "src/components/primitives/types";
2
+ import { BaseElementProps, ElementIcon, IconPosition, IconSize } from "src/components/types";
3
+
4
+ export {
5
+ BaseInputElementProps,
6
+ InputColor,
7
+ InputLabel,
8
+ InputSize,
9
+
10
+ BaseElementProps,
11
+ ElementIcon,
12
+ IconPosition,
13
+ IconSize,
14
+ };
package/multiline.ts ADDED
@@ -0,0 +1,7 @@
1
+ import Multiline, { MultilineProps } from "src/components/primitives/multiline";
2
+
3
+ export default Multiline;
4
+
5
+ export {
6
+ MultilineProps,
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodynarf/react.components",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "author": {
5
5
  "name": "Artem",
6
6
  "email": "bodynar@gmail.com"
@@ -32,6 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@bodynarf/utils": "^1.0.0",
35
+ "@types/babel__core": "^7.1.19",
35
36
  "@types/node": "^17.0.25",
36
37
  "@types/react": "^18.0.5",
37
38
  "@types/react-dom": "^18.0.1",
@@ -41,4 +42,4 @@
41
42
  "typescript": "^4.6.3",
42
43
  "vite": "^2.9.2"
43
44
  }
44
- }
45
+ }
package/search.ts ADDED
@@ -0,0 +1,7 @@
1
+ import Search, { SearchProps } from "src/components/search";
2
+
3
+ export default Search;
4
+
5
+ export {
6
+ SearchProps,
7
+ };
@@ -1,6 +1,6 @@
1
1
  import { isNullOrEmpty } from '@bodynarf/utils/common';
2
2
 
3
- import Icon from '@app/components/icon';
3
+ import Icon from 'src/components/icon';
4
4
 
5
5
  import { AnchorWithIconProps } from "../../types";
6
6
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { isNullOrEmpty } from '@bodynarf/utils/common';
3
3
 
4
- import Icon from '@app/components/icon';
4
+ import Icon from 'src/components/icon';
5
5
 
6
6
  import { ButtonWithIconProps } from '../../types';
7
7
 
@@ -8,7 +8,7 @@ import { ButtonType } from './types';
8
8
  import { ButtonWithIcon } from './components/buttonWithIcon/buttonWithIcon';
9
9
  import { SimpleButton } from './components/simpleButton/simpleButton';
10
10
 
11
- type ButtonProps = {
11
+ export type ButtonProps = {
12
12
  /** Button displaying text */
13
13
  caption?: string;
14
14
 
@@ -2,7 +2,7 @@ import { MouseEvent } from 'react';
2
2
 
3
3
  import { isNullOrEmpty, isNullOrUndefined } from "@bodynarf/utils/common";
4
4
 
5
- import Icon from '@app/components/icon';
5
+ import Icon from 'src/components/icon';
6
6
 
7
7
  import { SelectableItem } from "../../types";
8
8
 
@@ -4,7 +4,7 @@ import './dropdown.scss';
4
4
 
5
5
  import { isNullOrEmpty, isNullOrUndefined } from '@bodynarf/utils/common';
6
6
 
7
- import { useComponentOutsideClick } from '@app/hooks/useComponentOutsideClick';
7
+ import { useComponentOutsideClick } from 'src/hooks/useComponentOutsideClick';
8
8
 
9
9
  import { SelectableItem } from './types';
10
10
  import { BaseElementProps } from '../types';
@@ -12,7 +12,7 @@ import { BaseElementProps } from '../types';
12
12
  import DropdownItem from './components/dropdownItem/dropdownItem';
13
13
  import DropdownLabel from './components/dropdownLabel/dropdownLabel';
14
14
 
15
- type DropdownProps = BaseElementProps & {
15
+ export type DropdownProps = BaseElementProps & {
16
16
  /** Items which can be selected */
17
17
  items: Array<SelectableItem>;
18
18
 
@@ -3,7 +3,7 @@ import './icon.scss';
3
3
  import { IconSize } from '../types';
4
4
 
5
5
  /** Icon component props */
6
- type IconProps = {
6
+ export type IconProps = {
7
7
  /**
8
8
  * Class name for icon.
9
9
  * Used to display icon from bootstrap-icons
@@ -7,7 +7,7 @@ import { isStringEmpty } from '@bodynarf/utils/common';
7
7
  import { BaseInputElementProps, InputLabel } from '../types';
8
8
 
9
9
  /** Date input conponent props type */
10
- type DateProps = Omit<BaseInputElementProps<Date | undefined>, 'placeholder'> & {
10
+ export type DateProps = Omit<BaseInputElementProps<Date | undefined>, 'placeholder'> & {
11
11
  /** Label configuration */
12
12
  label: InputLabel;
13
13
  }
@@ -5,9 +5,9 @@ import './search.scss';
5
5
  import { generateGuid } from '@bodynarf/utils/guid';
6
6
  import { isNullOrUndefined } from '@bodynarf/utils/common';
7
7
 
8
- import Button from '@app/components/button';
8
+ import Button from 'src/components/button';
9
9
 
10
- type SearchProps = {
10
+ export type SearchProps = {
11
11
  /** Search caption */
12
12
  caption: string;
13
13
 
package/text.ts ADDED
@@ -0,0 +1,7 @@
1
+ import Text, { TextProps } from "src/components/primitives/text";
2
+
3
+ export default Text;
4
+
5
+ export {
6
+ TextProps,
7
+ };
package/tsconfig.json CHANGED
@@ -12,33 +12,24 @@
12
12
  "esModuleInterop": false,
13
13
  "allowSyntheticDefaultImports": true,
14
14
  "strict": true,
15
- "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
16
- "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
17
- "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
15
+ "noImplicitAny": true,
16
+ "noImplicitThis": true,
17
+ "alwaysStrict": true,
18
18
  "forceConsistentCasingInFileNames": true,
19
19
  "module": "ESNext",
20
20
  "moduleResolution": "Node",
21
21
  "resolveJsonModule": true,
22
- // "isolatedModules": true,
23
22
  "noEmit": true,
24
23
  "jsx": "react-jsx",
25
24
  "downlevelIteration": true,
26
- "noUnusedLocals": true, /* Report errors on unused locals. */
27
- "noUnusedParameters": true, /* Report errors on unused parameters. */
28
- "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
29
- "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
30
- "paths": {
31
- "@app/components/*": [
32
- "src/components/*",
33
- "src/components/primitives/*"
34
- ],
35
- "@app/hooks/*": [
36
- "src/hooks/*"
37
- ],
38
- },
25
+ "noUnusedLocals": true,
26
+ "noUnusedParameters": true,
27
+ "noImplicitReturns": true,
28
+ "baseUrl": "./",
39
29
  },
40
30
  "include": [
41
- "src"
31
+ "src",
32
+ "./"
42
33
  ],
43
34
  "references": [
44
35
  {