namirasoft-site-react 1.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.
Files changed (69) hide show
  1. package/.gitlab-ci.yml +14 -0
  2. package/config-overrides.js +66 -0
  3. package/package.json +45 -0
  4. package/public/favicon.ico +0 -0
  5. package/public/index.html +43 -0
  6. package/public/logo192.png +0 -0
  7. package/public/logo512.png +0 -0
  8. package/public/manifest.json +25 -0
  9. package/public/robots.txt +3 -0
  10. package/src/App.css +2 -0
  11. package/src/App.tsx +71 -0
  12. package/src/assets/images/arrow.svg +3 -0
  13. package/src/assets/images/background.svg +9 -0
  14. package/src/assets/images/danger.svg +3 -0
  15. package/src/assets/images/exit.svg +3 -0
  16. package/src/assets/images/icon-input-date.svg +9 -0
  17. package/src/assets/images/icon-input-duration.svg +9 -0
  18. package/src/assets/images/icon-input-email.svg +9 -0
  19. package/src/assets/images/icon-input-float.svg +9 -0
  20. package/src/assets/images/icon-input-id.svg +9 -0
  21. package/src/assets/images/icon-input-integer.svg +9 -0
  22. package/src/assets/images/icon-input-phone.svg +9 -0
  23. package/src/assets/images/icon-input-price.svg +9 -0
  24. package/src/assets/images/icon-input-search.svg +4 -0
  25. package/src/assets/images/icon-input-string.svg +9 -0
  26. package/src/assets/images/icon-input-text.svg +9 -0
  27. package/src/assets/images/icon-input-time.svg +9 -0
  28. package/src/assets/images/logo.svg +9 -0
  29. package/src/assets/images/menu.svg +3 -0
  30. package/src/assets/images/namira.svg +9 -0
  31. package/src/assets/images/rectangle.svg +3 -0
  32. package/src/components/NSButtonGreen.module.css +12 -0
  33. package/src/components/NSButtonGreen.tsx +18 -0
  34. package/src/components/NSButtonRed.module.css +12 -0
  35. package/src/components/NSButtonRed.tsx +18 -0
  36. package/src/components/NSFooter.module.css +32 -0
  37. package/src/components/NSFooter.tsx +126 -0
  38. package/src/components/NSHeader.module.css +127 -0
  39. package/src/components/NSHeader.tsx +134 -0
  40. package/src/components/NSInputDate.module.css +32 -0
  41. package/src/components/NSInputDate.tsx +54 -0
  42. package/src/components/NSInputDuration.module.css +26 -0
  43. package/src/components/NSInputDuration.tsx +63 -0
  44. package/src/components/NSInputEmail.module.css +38 -0
  45. package/src/components/NSInputEmail.tsx +90 -0
  46. package/src/components/NSInputFloat.module.css +23 -0
  47. package/src/components/NSInputFloat.tsx +63 -0
  48. package/src/components/NSInputIP.module.css +23 -0
  49. package/src/components/NSInputIP.tsx +63 -0
  50. package/src/components/NSInputInteger.module.css +26 -0
  51. package/src/components/NSInputInteger.tsx +63 -0
  52. package/src/components/NSInputPhone.module.css +30 -0
  53. package/src/components/NSInputPhone.tsx +63 -0
  54. package/src/components/NSInputPrice.module.css +24 -0
  55. package/src/components/NSInputPrice.tsx +62 -0
  56. package/src/components/NSInputSearch.module.css +24 -0
  57. package/src/components/NSInputSearch.tsx +76 -0
  58. package/src/components/NSInputString.module.css +24 -0
  59. package/src/components/NSInputString.tsx +62 -0
  60. package/src/components/NSInputText.module.css +25 -0
  61. package/src/components/NSInputText.tsx +63 -0
  62. package/src/components/NSInputTime.module.css +24 -0
  63. package/src/components/NSInputTime.tsx +63 -0
  64. package/src/components/NSSelectBox.module.css +25 -0
  65. package/src/components/NSSelectBox.tsx +60 -0
  66. package/src/index.css +7 -0
  67. package/src/index.tsx +8 -0
  68. package/src/react-app-env.d.ts +1 -0
  69. package/tsconfig.json +38 -0
@@ -0,0 +1,38 @@
1
+ .ns_input_parent {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+ color: #fff;
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+
10
+ .ns_input {
11
+ border-radius: 8px;
12
+ padding: 10px 12px;
13
+ }
14
+
15
+ .ns_input_icon {
16
+ position: absolute;
17
+ right: 20px;
18
+ top: 51%;
19
+ font-size: 16px;
20
+ font-weight: 400;
21
+ }
22
+
23
+ .ns_input_title {
24
+ font-size: 16px;
25
+ font-weight: 400;
26
+ }
27
+
28
+ .ns_input_error {
29
+ color: #FF3F3F !important;
30
+ }
31
+
32
+ .ns_input_error:focus {
33
+ color: #FF3F3F !important;
34
+ }
35
+
36
+ .ns_input_red {
37
+ border: 2px solid #FF3F3F;
38
+ }
@@ -0,0 +1,90 @@
1
+ import React from "react";
2
+ import Styles from "./NSInputEmail.module.css";
3
+ import IconInputEmail from '../assets/images/icon-input-email.svg';
4
+ import Danger from '../assets/images/danger.svg';
5
+
6
+ interface IProps
7
+ {
8
+ title: string;
9
+ }
10
+
11
+ interface IState
12
+ {
13
+ value: string;
14
+ error: boolean;
15
+ }
16
+
17
+ export default class NSInputEmail extends React.Component<IProps, IState> {
18
+ constructor(props: IProps)
19
+ {
20
+ super(props);
21
+ this.state = {
22
+ value: "",
23
+ error: false,
24
+ };
25
+ this.setValue = this.setValue.bind(this);
26
+ this.getValue = this.getValue.bind(this);
27
+ this.setDefaultValue = this.setDefaultValue.bind(this);
28
+ }
29
+ setValue(e: React.ChangeEvent<HTMLInputElement>): void
30
+ {
31
+ let email = /^(([^<>()[]\\.,;:\s@"]+(\.[^<>()[]\\.,;:\s@"]+)*)|(".+"))@(([[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
32
+ if (!email.test(e.target.value))
33
+ {
34
+ this.setState({ error: true, value: e.target.value });
35
+ }
36
+ else
37
+ {
38
+ this.setState({ error: false, value: e.target.value });
39
+ }
40
+ }
41
+ setDefaultValue(value: string): void
42
+ {
43
+ this.setState({ value });
44
+ }
45
+ getValue(): string
46
+ {
47
+ return this.state.value;
48
+ }
49
+ override render()
50
+ {
51
+ return (
52
+ <>
53
+ <div className={`${Styles.ns_input_parent} p-2`}>
54
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
55
+ <img
56
+ className={Styles.ns_input_icon}
57
+ src={IconInputEmail}
58
+ alt="icon"
59
+ width={24}
60
+ height={24}
61
+ />
62
+ <input
63
+ value={this.state.value}
64
+ onChange={this.setValue}
65
+ type="email"
66
+ className={`${this.state.error === true ? Styles.ns_input_red : ""} ${Styles.ns_input}`}
67
+ placeholder="Sample@gmail.com"
68
+ />
69
+ </div>
70
+
71
+ {this.state.error === true ? (
72
+ <>
73
+ <div className="d-flex justify-content-start align-items-center gap-2 ms-2 ">
74
+ <img
75
+ className={""}
76
+ src={Danger}
77
+ alt="icon"
78
+ width={13}
79
+ height={13}
80
+ />
81
+ <span className={Styles.ns_input_error}>Enter a valid email. </span>
82
+ </div>
83
+ </>) : null}
84
+
85
+ </>
86
+ );
87
+ }
88
+ }
89
+
90
+
@@ -0,0 +1,23 @@
1
+ .ns_input_parent{
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+ color: #fff;
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+ .ns_input{
10
+ border-radius: 8px;
11
+ padding: 10px 12px;
12
+ font-size: 16px;
13
+ font-weight: 400;
14
+ }
15
+ .ns_input_icon{
16
+ position: absolute;
17
+ right: 20px;
18
+ top: 51%;
19
+ }
20
+ .ns_input_title{
21
+ font-size: 16px;
22
+ font-weight: 400;
23
+ }
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import Styles from "./NSInputFloat.module.css";
3
+ import IconInputFloat from '../assets/images/icon-input-float.svg';
4
+
5
+ interface IProps
6
+ {
7
+ title: string;
8
+ }
9
+
10
+ interface IState
11
+ {
12
+ value: string;
13
+ }
14
+
15
+ export default class NSInputFloat extends React.Component<IProps, IState> {
16
+ constructor(props: IProps)
17
+ {
18
+ super(props);
19
+ this.state = {
20
+ value: "",
21
+ };
22
+ this.setValue = this.setValue.bind(this);
23
+ this.getValue = this.getValue.bind(this);
24
+ this.setDefaultValue = this.setDefaultValue.bind(this);
25
+ }
26
+ setValue(e: React.ChangeEvent<HTMLInputElement>): void
27
+ {
28
+ this.setState({ value: e.target.value });
29
+ }
30
+ setDefaultValue(value: string): void
31
+ {
32
+ this.setState({ value });
33
+ }
34
+ getValue(): string
35
+ {
36
+ return this.state.value;
37
+ }
38
+ override render()
39
+ {
40
+ return (
41
+ <div className={`${Styles.ns_input_parent} p-2`}>
42
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
43
+ <img
44
+ className={Styles.ns_input_icon}
45
+ src={IconInputFloat}
46
+ alt="icon"
47
+ width={24}
48
+ height={24}
49
+ />
50
+ <input
51
+ value={this.state.value}
52
+ onChange={this.setValue}
53
+ type="number"
54
+ className={Styles.ns_input}
55
+ placeholder="1.2"
56
+ />
57
+
58
+ </div>
59
+ );
60
+ }
61
+ }
62
+
63
+
@@ -0,0 +1,23 @@
1
+ .ns_input_parent{
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+ color: #fff;
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+ .ns_input{
10
+ border-radius: 8px;
11
+ padding: 10px 12px;
12
+ font-size: 16px;
13
+ font-weight: 400;
14
+ }
15
+ .ns_input_icon{
16
+ position: absolute;
17
+ right: 20px;
18
+ top: 51%;
19
+ }
20
+ .ns_input_title {
21
+ font-size: 16px;
22
+ font-weight: 400;
23
+ }
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import Styles from "./NSInputIP.module.css";
3
+ import IconInputId from '../assets/images/icon-input-id.svg';
4
+
5
+ interface IProps
6
+ {
7
+ title: string;
8
+ }
9
+
10
+ interface IState
11
+ {
12
+ value: string;
13
+ }
14
+
15
+ export default class NSInputIP extends React.Component<IProps, IState> {
16
+ constructor(props: IProps)
17
+ {
18
+ super(props);
19
+ this.state = {
20
+ value: "",
21
+ };
22
+ this.setValue = this.setValue.bind(this);
23
+ this.getValue = this.getValue.bind(this);
24
+ this.setDefaultValue = this.setDefaultValue.bind(this);
25
+ }
26
+ setValue(e: React.ChangeEvent<HTMLInputElement>): void
27
+ {
28
+ this.setState({ value: e.target.value });
29
+ }
30
+ setDefaultValue(value: string): void
31
+ {
32
+ this.setState({ value });
33
+ }
34
+ getValue(): string
35
+ {
36
+ return this.state.value;
37
+ }
38
+ override render()
39
+ {
40
+ return (
41
+ <div className={`${Styles.ns_input_parent} p-2`}>
42
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
43
+ <img
44
+ className={Styles.ns_input_icon}
45
+ src={IconInputId}
46
+ alt="icon"
47
+ width={24}
48
+ height={24}
49
+ />
50
+ <input
51
+ value={this.state.value}
52
+ onChange={this.setValue}
53
+ type="number"
54
+ className={Styles.ns_input}
55
+ placeholder="192.158.1.38"
56
+ />
57
+
58
+ </div>
59
+ );
60
+ }
61
+ }
62
+
63
+
@@ -0,0 +1,26 @@
1
+ .ns_input_parent {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+ color: #fff;
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+
10
+ .ns_input {
11
+ border-radius: 8px;
12
+ padding: 10px 12px;
13
+ font-size: 16px;
14
+ font-weight: 400;
15
+ }
16
+
17
+ .ns_input_icon {
18
+ position: absolute;
19
+ right: 20px;
20
+ top: 51%;
21
+ }
22
+
23
+ .ns_input_title {
24
+ font-size: 16px;
25
+ font-weight: 400;
26
+ }
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import Styles from "./NSInputInteger.module.css";
3
+ import IconInputInteger from '../assets/images/icon-input-integer.svg';
4
+
5
+ interface IProps
6
+ {
7
+ title: string;
8
+ }
9
+
10
+ interface IState
11
+ {
12
+ value: string;
13
+ }
14
+
15
+ export default class NSInputInteger extends React.Component<IProps, IState> {
16
+ constructor(props: IProps)
17
+ {
18
+ super(props);
19
+ this.state = {
20
+ value: "",
21
+ };
22
+ this.setValue = this.setValue.bind(this);
23
+ this.getValue = this.getValue.bind(this);
24
+ this.setDefaultValue = this.setDefaultValue.bind(this);
25
+ }
26
+ setValue(e: React.ChangeEvent<HTMLInputElement>): void
27
+ {
28
+ this.setState({ value: e.target.value });
29
+ }
30
+ setDefaultValue(value: string): void
31
+ {
32
+ this.setState({ value });
33
+ }
34
+ getValue(): string
35
+ {
36
+ return this.state.value;
37
+ }
38
+ override render()
39
+ {
40
+ return (
41
+ <div className={`${Styles.ns_input_parent} p-2`}>
42
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
43
+ <img
44
+ className={Styles.ns_input_icon}
45
+ src={IconInputInteger}
46
+ alt="icon"
47
+ width={24}
48
+ height={24}
49
+ />
50
+ <input
51
+ value={this.state.value}
52
+ onChange={this.setValue}
53
+ type="number"
54
+ className={Styles.ns_input}
55
+ placeholder="1234"
56
+ />
57
+
58
+ </div>
59
+ );
60
+ }
61
+ }
62
+
63
+
@@ -0,0 +1,30 @@
1
+ .ns_input_parent{
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+ .ns_input{
10
+ height: 48px !important;
11
+ font-size: 16px !important;
12
+ font-weight: 400;
13
+ width: 310px !important;
14
+ }
15
+ .ns_input span{
16
+ color: #000 !important;
17
+
18
+ }
19
+ .ns_input_icon{
20
+ position: absolute;
21
+ right: 20px;
22
+ top: 51%;
23
+ z-index: 1;
24
+ }
25
+ .ns_input_title{
26
+ color: #fff;
27
+ font-size: 16px;
28
+ font-weight: 400;
29
+ }
30
+
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import Styles from "./NSInputPhone.module.css";
3
+ import IconInputPhone from '../assets/images/icon-input-phone.svg';
4
+ import PhoneInput from 'react-phone-input-2'
5
+ import 'react-phone-input-2/lib/style.css'
6
+
7
+ interface IProps
8
+ {
9
+ title: string;
10
+ }
11
+
12
+ interface IState
13
+ {
14
+ value: string;
15
+ }
16
+
17
+ export default class NSInputPhone extends React.Component<IProps, IState> {
18
+ constructor(props: IProps)
19
+ {
20
+ super(props);
21
+ this.state = {
22
+ value: "",
23
+ };
24
+ this.setValue = this.setValue.bind(this);
25
+ this.getValue = this.getValue.bind(this);
26
+ this.setDefaultValue = this.setDefaultValue.bind(this);
27
+ }
28
+ setValue(value: string): void
29
+ {
30
+ this.setState({ value });
31
+ }
32
+ setDefaultValue(value: string): void
33
+ {
34
+ this.setState({ value });
35
+ }
36
+ getValue(): string
37
+ {
38
+ return this.state.value;
39
+ }
40
+ override render()
41
+ {
42
+ return (
43
+ <div className={`${Styles.ns_input_parent} p-2`}>
44
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
45
+ <img
46
+ className={Styles.ns_input_icon}
47
+ src={IconInputPhone}
48
+ alt="icon"
49
+ width={24}
50
+ height={24}
51
+ />
52
+ <PhoneInput
53
+ inputClass={Styles.ns_input}
54
+ country={'us'}
55
+ value={this.state.value}
56
+ onChange={this.setValue}
57
+ />
58
+ </div>
59
+ );
60
+ }
61
+ }
62
+
63
+
@@ -0,0 +1,24 @@
1
+ .ns_input_parent{
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+ color: #fff;
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+ .ns_input{
10
+ border-radius: 8px;
11
+ padding: 10px 12px;
12
+ font-size: 16px;
13
+ font-weight: 400;
14
+ }
15
+ .ns_input_icon{
16
+ position: absolute;
17
+ right: 20px;
18
+ top: 51%;
19
+ z-index: 1;
20
+ }
21
+ .ns_input_title {
22
+ font-size: 16px;
23
+ font-weight: 400;
24
+ }
@@ -0,0 +1,62 @@
1
+ import React from "react";
2
+ import Styles from "./NSInputPrice.module.css";
3
+ import IconInputPrice from '../assets/images/icon-input-price.svg';
4
+
5
+ interface IProps
6
+ {
7
+ title: string;
8
+ }
9
+
10
+ interface IState
11
+ {
12
+ value: string;
13
+ }
14
+
15
+ export default class NSInputPrice extends React.Component<IProps, IState> {
16
+ constructor(props: IProps)
17
+ {
18
+ super(props);
19
+ this.state = {
20
+ value: "",
21
+ };
22
+ this.setValue = this.setValue.bind(this);
23
+ this.getValue = this.getValue.bind(this);
24
+ this.setDefaultValue = this.setDefaultValue.bind(this);
25
+ }
26
+ setValue(e: React.ChangeEvent<HTMLInputElement>): void
27
+ {
28
+ this.setState({ value: e.target.value });
29
+ }
30
+ setDefaultValue(value: string): void
31
+ {
32
+ this.setState({ value });
33
+ }
34
+ getValue(): string
35
+ {
36
+ return this.state.value;
37
+ }
38
+ override render()
39
+ {
40
+ return (
41
+ <div className={`${Styles.ns_input_parent} p-2`}>
42
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
43
+ <img
44
+ className={Styles.ns_input_icon}
45
+ src={IconInputPrice}
46
+ alt="icon"
47
+ width={24}
48
+ height={24}
49
+ />
50
+ <input
51
+ value={this.state.value}
52
+ onChange={this.setValue}
53
+ type="number"
54
+ className={Styles.ns_input}
55
+ placeholder="$1000"
56
+ />
57
+ </div>
58
+ );
59
+ }
60
+ }
61
+
62
+
@@ -0,0 +1,24 @@
1
+ .ns_input_form{
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+ color: #fff;
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+ .ns_input{
10
+ border-radius: 8px;
11
+ padding: 10px 12px;
12
+ font-size: 16px;
13
+ font-weight: 400;
14
+ }
15
+ .ns_input_icon{
16
+ position: absolute;
17
+ right: 20px;
18
+ top: 47%;
19
+ z-index: 1;
20
+ }
21
+ .ns_input_title {
22
+ font-size: 16px;
23
+ font-weight: 400;
24
+ }
@@ -0,0 +1,76 @@
1
+ import React from "react";
2
+ import Styles from "./NSInputSearch.module.css";
3
+ import IconInputSearch from '../assets/images/icon-input-search.svg';
4
+
5
+ interface IProps
6
+ {
7
+ title: string;
8
+ }
9
+
10
+ interface IState
11
+ {
12
+ value: string;
13
+ }
14
+
15
+ export default class NSInputSearch extends React.Component<IProps, IState> {
16
+ constructor(props: IProps)
17
+ {
18
+ super(props);
19
+ this.state = {
20
+ value: "",
21
+ };
22
+ this.setValue = this.setValue.bind(this);
23
+ this.getValue = this.getValue.bind(this);
24
+ this.setDefaultValue = this.setDefaultValue.bind(this);
25
+ this.keyDownEvent = this.keyDownEvent.bind(this);
26
+ }
27
+ setValue(e: React.ChangeEvent<HTMLInputElement>): void
28
+ {
29
+ this.setState({ value: e.target.value });
30
+ }
31
+ setDefaultValue(value: string): void
32
+ {
33
+ this.setState({ value });
34
+ }
35
+ getValue(): string
36
+ {
37
+ return this.state.value;
38
+ }
39
+ onChanged(e: React.ChangeEvent<HTMLInputElement>): void
40
+ {
41
+ this.setValue(e);
42
+ }
43
+ keyDownEvent(event: React.KeyboardEvent<HTMLDivElement>)
44
+ {
45
+ if (event.code === "Enter")
46
+ {
47
+ //todo
48
+ console.log("function")
49
+ }
50
+ }
51
+ override render()
52
+ {
53
+ return (
54
+ <div className={`${Styles.ns_input_form} p-2`}>
55
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
56
+ <img
57
+ className={Styles.ns_input_icon}
58
+ src={IconInputSearch}
59
+ alt="icon"
60
+ width={32}
61
+ height={32}
62
+ />
63
+ <input
64
+ value={this.state.value}
65
+ onChange={this.setValue}
66
+ onKeyDown={this.keyDownEvent}
67
+ type="text"
68
+ className={Styles.ns_input}
69
+ placeholder="Search"
70
+ />
71
+ </div>
72
+ );
73
+ }
74
+ }
75
+
76
+
@@ -0,0 +1,24 @@
1
+ .ns_input_parent{
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+ color: #fff;
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+ .ns_input{
10
+ border-radius: 8px;
11
+ padding: 10px 12px;
12
+ font-size: 16px;
13
+ font-weight: 400;
14
+ }
15
+ .ns_input_icon{
16
+ position: absolute;
17
+ right: 20px;
18
+ top: 51%;
19
+ z-index: 1;
20
+ }
21
+ .ns_input_title {
22
+ font-size: 16px;
23
+ font-weight: 400;
24
+ }