namirasoft-site-react 1.2.40 → 1.2.42

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 (177) hide show
  1. package/.gitlab-ci.yml +14 -14
  2. package/config-overrides.js +65 -65
  3. package/dist/App.js +1 -1
  4. package/dist/App.js.map +1 -1
  5. package/dist/assets/images/arrow.svg +3 -3
  6. package/dist/assets/images/danger.svg +3 -3
  7. package/dist/assets/images/exit.svg +3 -3
  8. package/dist/assets/images/icon-input-date.svg +9 -9
  9. package/dist/assets/images/icon-input-duration.svg +9 -9
  10. package/dist/assets/images/icon-input-email.svg +9 -9
  11. package/dist/assets/images/icon-input-float.svg +9 -9
  12. package/dist/assets/images/icon-input-id.svg +9 -9
  13. package/dist/assets/images/icon-input-integer.svg +9 -9
  14. package/dist/assets/images/icon-input-phone.svg +9 -9
  15. package/dist/assets/images/icon-input-price.svg +9 -9
  16. package/dist/assets/images/icon-input-search.svg +4 -4
  17. package/dist/assets/images/icon-input-string.svg +9 -9
  18. package/dist/assets/images/icon-input-text.svg +9 -9
  19. package/dist/assets/images/icon-input-time.svg +9 -9
  20. package/dist/assets/images/logo.svg +9 -9
  21. package/dist/assets/images/menu.svg +3 -3
  22. package/dist/assets/images/namira.svg +9 -9
  23. package/dist/assets/images/rectangle.svg +3 -3
  24. package/dist/components/NSButtonGreen.js +1 -1
  25. package/dist/components/NSButtonGreen.js.map +1 -1
  26. package/dist/components/NSButtonRed.js +1 -1
  27. package/dist/components/NSButtonRed.js.map +1 -1
  28. package/dist/components/NSCard.js +2 -2
  29. package/dist/components/NSCard.js.map +1 -1
  30. package/dist/components/NSFooter.js +4 -4
  31. package/dist/components/NSFooter.js.map +1 -1
  32. package/dist/components/NSHeader.d.ts +17 -1
  33. package/dist/components/NSHeader.js +50 -47
  34. package/dist/components/NSHeader.js.map +1 -1
  35. package/dist/components/NSInputDate.js +1 -1
  36. package/dist/components/NSInputDate.js.map +1 -1
  37. package/dist/components/NSInputDuration.js +1 -1
  38. package/dist/components/NSInputDuration.js.map +1 -1
  39. package/dist/components/NSInputEmail.js +1 -1
  40. package/dist/components/NSInputEmail.js.map +1 -1
  41. package/dist/components/NSInputEmail.module.css +37 -37
  42. package/dist/components/NSInputFloat.js +1 -1
  43. package/dist/components/NSInputFloat.js.map +1 -1
  44. package/dist/components/NSInputFloat.module.css +25 -25
  45. package/dist/components/NSInputIP.js +1 -1
  46. package/dist/components/NSInputIP.js.map +1 -1
  47. package/dist/components/NSInputIP.module.css +25 -25
  48. package/dist/components/NSInputInteger.js +1 -1
  49. package/dist/components/NSInputInteger.js.map +1 -1
  50. package/dist/components/NSInputInteger.module.css +25 -25
  51. package/dist/components/NSInputPhone.js +1 -1
  52. package/dist/components/NSInputPhone.js.map +1 -1
  53. package/dist/components/NSInputPhone.module.css +32 -32
  54. package/dist/components/NSInputPrice.js +1 -1
  55. package/dist/components/NSInputPrice.js.map +1 -1
  56. package/dist/components/NSInputPrice.module.css +26 -26
  57. package/dist/components/NSInputSearch.js +1 -1
  58. package/dist/components/NSInputSearch.js.map +1 -1
  59. package/dist/components/NSInputSearch.module.css +25 -25
  60. package/dist/components/NSInputString.js +1 -1
  61. package/dist/components/NSInputString.js.map +1 -1
  62. package/dist/components/NSInputString.module.css +26 -26
  63. package/dist/components/NSInputText.js +1 -1
  64. package/dist/components/NSInputText.js.map +1 -1
  65. package/dist/components/NSInputText.module.css +27 -27
  66. package/dist/components/NSInputTime.js +1 -1
  67. package/dist/components/NSInputTime.js.map +1 -1
  68. package/dist/components/NSInputTime.module.css +26 -26
  69. package/dist/components/NSLayout.js +1 -1
  70. package/dist/components/NSLayout.js.map +1 -1
  71. package/dist/components/NSLayout.module.css +16 -16
  72. package/dist/components/NSLayoutHeroBanner.js +1 -1
  73. package/dist/components/NSLayoutHeroBanner.js.map +1 -1
  74. package/dist/components/NSLayoutHeroBanner.module.css +43 -43
  75. package/dist/components/NSLayoutTitle.js +1 -1
  76. package/dist/components/NSLayoutTitle.js.map +1 -1
  77. package/dist/components/NSLinkGreen.js +1 -1
  78. package/dist/components/NSLinkGreen.js.map +1 -1
  79. package/dist/components/NSLinkGreen.module.css +15 -15
  80. package/dist/components/NSLinkRed.js +1 -1
  81. package/dist/components/NSLinkRed.js.map +1 -1
  82. package/dist/components/NSLinkRed.module.css +15 -15
  83. package/dist/components/NSPagination.js +7 -7
  84. package/dist/components/NSPagination.js.map +1 -1
  85. package/dist/components/NSPagination.module.css +24 -24
  86. package/dist/components/NSParentCard.module.css +34 -34
  87. package/dist/components/NSSelectBox.js +1 -1
  88. package/dist/components/NSSelectBox.js.map +1 -1
  89. package/dist/components/NSSelectBox.module.css +28 -28
  90. package/dist/components/NSTable.js +1 -1
  91. package/dist/components/NSTable.js.map +1 -1
  92. package/dist/components/NSTable.modules.css +76 -76
  93. package/dist/pages/NSLoginPage.js +1 -1
  94. package/dist/pages/NSLoginPage.js.map +1 -1
  95. package/package.json +52 -52
  96. package/public/index.html +42 -42
  97. package/public/manifest.json +25 -25
  98. package/public/robots.txt +3 -3
  99. package/src/App.tsx +70 -70
  100. package/src/assets/images/arrow.svg +3 -3
  101. package/src/assets/images/danger.svg +3 -3
  102. package/src/assets/images/exit.svg +3 -3
  103. package/src/assets/images/icon-input-date.svg +9 -9
  104. package/src/assets/images/icon-input-duration.svg +9 -9
  105. package/src/assets/images/icon-input-email.svg +9 -9
  106. package/src/assets/images/icon-input-float.svg +9 -9
  107. package/src/assets/images/icon-input-id.svg +9 -9
  108. package/src/assets/images/icon-input-integer.svg +9 -9
  109. package/src/assets/images/icon-input-phone.svg +9 -9
  110. package/src/assets/images/icon-input-price.svg +9 -9
  111. package/src/assets/images/icon-input-search.svg +4 -4
  112. package/src/assets/images/icon-input-string.svg +9 -9
  113. package/src/assets/images/icon-input-text.svg +9 -9
  114. package/src/assets/images/icon-input-time.svg +9 -9
  115. package/src/assets/images/logo.svg +9 -9
  116. package/src/assets/images/menu.svg +3 -3
  117. package/src/assets/images/namira.svg +9 -9
  118. package/src/assets/images/rectangle.svg +3 -3
  119. package/src/components/NSButtonGreen.tsx +33 -33
  120. package/src/components/NSButtonRed.tsx +33 -33
  121. package/src/components/NSCard.tsx +54 -54
  122. package/src/components/NSFooter.tsx +123 -123
  123. package/src/components/NSHeader.tsx +134 -122
  124. package/src/components/NSInputDate.tsx +57 -57
  125. package/src/components/NSInputDuration.tsx +65 -65
  126. package/src/components/NSInputEmail.module.css +37 -37
  127. package/src/components/NSInputEmail.tsx +92 -92
  128. package/src/components/NSInputFloat.module.css +25 -25
  129. package/src/components/NSInputFloat.tsx +61 -61
  130. package/src/components/NSInputIP.module.css +25 -25
  131. package/src/components/NSInputIP.tsx +65 -65
  132. package/src/components/NSInputInteger.module.css +25 -25
  133. package/src/components/NSInputInteger.tsx +65 -65
  134. package/src/components/NSInputPhone.module.css +32 -32
  135. package/src/components/NSInputPhone.tsx +65 -65
  136. package/src/components/NSInputPrice.module.css +26 -26
  137. package/src/components/NSInputPrice.tsx +68 -68
  138. package/src/components/NSInputSearch.module.css +25 -25
  139. package/src/components/NSInputSearch.tsx +78 -78
  140. package/src/components/NSInputString.module.css +26 -26
  141. package/src/components/NSInputString.tsx +66 -66
  142. package/src/components/NSInputText.module.css +27 -27
  143. package/src/components/NSInputText.tsx +69 -69
  144. package/src/components/NSInputTime.module.css +26 -26
  145. package/src/components/NSInputTime.tsx +65 -65
  146. package/src/components/NSLayout.module.css +16 -16
  147. package/src/components/NSLayout.tsx +30 -31
  148. package/src/components/NSLayoutHeroBanner.module.css +43 -43
  149. package/src/components/NSLayoutHeroBanner.tsx +85 -85
  150. package/src/components/NSLayoutTitle.tsx +25 -25
  151. package/src/components/NSLinkGreen.module.css +15 -15
  152. package/src/components/NSLinkGreen.tsx +43 -43
  153. package/src/components/NSLinkRed.module.css +15 -15
  154. package/src/components/NSLinkRed.tsx +43 -43
  155. package/src/components/NSPagination.module.css +24 -24
  156. package/src/components/NSPagination.tsx +54 -54
  157. package/src/components/NSParentCard.module.css +34 -34
  158. package/src/components/NSParentCard.tsx.temp +58 -58
  159. package/src/components/NSSelectBox.module.css +28 -28
  160. package/src/components/NSSelectBox.tsx +62 -62
  161. package/src/components/NSTable.modules.css +76 -76
  162. package/src/components/NSTable.tsx +64 -64
  163. package/src/index.tsx +7 -7
  164. package/src/main.ts +25 -25
  165. package/src/pages/NSLoginPage.tsx +39 -39
  166. package/src/react-app-env.d.ts +1 -1
  167. package/tsconfig.json +37 -37
  168. package/dist/App.css +0 -0
  169. package/dist/assets/images/background.svg +0 -9
  170. package/dist/assets/images/left-vector.png +0 -0
  171. package/dist/assets/images/left_vector.png +0 -0
  172. package/dist/assets/images/right-vector.png +0 -0
  173. package/dist/assets/images/right_vector.png +0 -0
  174. package/dist/components/NSParentCard.d.ts +0 -0
  175. package/dist/components/NSParentCard.js +0 -2
  176. package/dist/components/NSParentCard.js.map +0 -1
  177. package/dist/index.css +0 -6
@@ -1,92 +1,92 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import Styles from "./NSInputEmail.module.css";
5
- import IconInputEmail from '../assets/images/icon-input-email.svg';
6
- import Danger from '../assets/images/danger.svg';
7
-
8
- interface IProps
9
- {
10
- title: string;
11
- }
12
-
13
- interface IState
14
- {
15
- value: string;
16
- error: boolean;
17
- }
18
-
19
- export class NSInputEmail extends React.Component<IProps, IState> {
20
- constructor(props: IProps)
21
- {
22
- super(props);
23
- this.state = {
24
- value: "",
25
- error: false,
26
- };
27
- this.setValue = this.setValue.bind(this);
28
- this.getValue = this.getValue.bind(this);
29
- this.setDefaultValue = this.setDefaultValue.bind(this);
30
- }
31
- setValue(e: React.ChangeEvent<HTMLInputElement>): void
32
- {
33
- 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,}))$/;
34
- if (!email.test(e.target.value))
35
- {
36
- this.setState({ error: true, value: e.target.value });
37
- }
38
- else
39
- {
40
- this.setState({ error: false, value: e.target.value });
41
- }
42
- }
43
- setDefaultValue(value: string): void
44
- {
45
- this.setState({ value });
46
- }
47
- getValue(): string
48
- {
49
- return this.state.value;
50
- }
51
- override render()
52
- {
53
- return (
54
- <>
55
- <div className={`${Styles.ns_input_parent} p-2`}>
56
- <span className={Styles.ns_input_title}>{this.props.title}</span>
57
- <img
58
- className={Styles.ns_input_icon}
59
- src={IconInputEmail}
60
- alt="icon"
61
- width={24}
62
- height={24}
63
- />
64
- <input
65
- value={this.state.value}
66
- onChange={this.setValue}
67
- type="email"
68
- className={`${this.state.error === true ? Styles.ns_input_red : ""} ${Styles.ns_input}`}
69
- placeholder="Sample@gmail.com"
70
- />
71
- </div>
72
-
73
- {this.state.error === true ? (
74
- <>
75
- <div className="d-flex justify-content-start align-items-center gap-2 ms-2 ">
76
- <img
77
- className={""}
78
- src={Danger}
79
- alt="icon"
80
- width={13}
81
- height={13}
82
- />
83
- <span className={Styles.ns_input_error}>Enter a valid email. </span>
84
- </div>
85
- </>) : null}
86
-
87
- </>
88
- );
89
- }
90
- }
91
-
92
-
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Styles from "./NSInputEmail.module.css";
5
+ import IconInputEmail from '../assets/images/icon-input-email.svg';
6
+ import Danger from '../assets/images/danger.svg';
7
+
8
+ interface IProps
9
+ {
10
+ title: string;
11
+ }
12
+
13
+ interface IState
14
+ {
15
+ value: string;
16
+ error: boolean;
17
+ }
18
+
19
+ export class NSInputEmail extends React.Component<IProps, IState> {
20
+ constructor(props: IProps)
21
+ {
22
+ super(props);
23
+ this.state = {
24
+ value: "",
25
+ error: false,
26
+ };
27
+ this.setValue = this.setValue.bind(this);
28
+ this.getValue = this.getValue.bind(this);
29
+ this.setDefaultValue = this.setDefaultValue.bind(this);
30
+ }
31
+ setValue(e: React.ChangeEvent<HTMLInputElement>): void
32
+ {
33
+ 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,}))$/;
34
+ if (!email.test(e.target.value))
35
+ {
36
+ this.setState({ error: true, value: e.target.value });
37
+ }
38
+ else
39
+ {
40
+ this.setState({ error: false, value: e.target.value });
41
+ }
42
+ }
43
+ setDefaultValue(value: string): void
44
+ {
45
+ this.setState({ value });
46
+ }
47
+ getValue(): string
48
+ {
49
+ return this.state.value;
50
+ }
51
+ override render()
52
+ {
53
+ return (
54
+ <>
55
+ <div className={`${Styles.ns_input_parent} p-2`}>
56
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
57
+ <img
58
+ className={Styles.ns_input_icon}
59
+ src={IconInputEmail}
60
+ alt="icon"
61
+ width={24}
62
+ height={24}
63
+ />
64
+ <input
65
+ value={this.state.value}
66
+ onChange={this.setValue}
67
+ type="email"
68
+ className={`${this.state.error === true ? Styles.ns_input_red : ""} ${Styles.ns_input}`}
69
+ placeholder="Sample@gmail.com"
70
+ />
71
+ </div>
72
+
73
+ {this.state.error === true ? (
74
+ <>
75
+ <div className="d-flex justify-content-start align-items-center gap-2 ms-2 ">
76
+ <img
77
+ className={""}
78
+ src={Danger}
79
+ alt="icon"
80
+ width={13}
81
+ height={13}
82
+ />
83
+ <span className={Styles.ns_input_error}>Enter a valid email. </span>
84
+ </div>
85
+ </>) : null}
86
+
87
+ </>
88
+ );
89
+ }
90
+ }
91
+
92
+
@@ -1,26 +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;
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
26
  }
@@ -1,62 +1,62 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import Styles from "./NSInputFloat.module.css";
5
- import IconInputFloat from '../assets/images/icon-input-float.svg';
6
-
7
- interface IProps
8
- {
9
- title: string;
10
- }
11
-
12
- interface IState
13
- {
14
- value: string;
15
- }
16
-
17
- export class NSInputFloat 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(e: React.ChangeEvent<HTMLInputElement>): void
29
- {
30
- this.setState({ value: e.target.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={IconInputFloat}
48
- alt="icon"
49
- width={24}
50
- height={24}
51
- />
52
- <input
53
- value={this.state.value}
54
- onChange={this.setValue}
55
- type="number"
56
- className={Styles.ns_input}
57
- placeholder="1.2"
58
- />
59
- </div>
60
- );
61
- }
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Styles from "./NSInputFloat.module.css";
5
+ import IconInputFloat from '../assets/images/icon-input-float.svg';
6
+
7
+ interface IProps
8
+ {
9
+ title: string;
10
+ }
11
+
12
+ interface IState
13
+ {
14
+ value: string;
15
+ }
16
+
17
+ export class NSInputFloat 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(e: React.ChangeEvent<HTMLInputElement>): void
29
+ {
30
+ this.setState({ value: e.target.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={IconInputFloat}
48
+ alt="icon"
49
+ width={24}
50
+ height={24}
51
+ />
52
+ <input
53
+ value={this.state.value}
54
+ onChange={this.setValue}
55
+ type="number"
56
+ className={Styles.ns_input}
57
+ placeholder="1.2"
58
+ />
59
+ </div>
60
+ );
61
+ }
62
62
  }
@@ -1,26 +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;
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
26
  }
@@ -1,65 +1,65 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import Styles from "./NSInputIP.module.css";
5
- import IconInputId from '../assets/images/icon-input-id.svg';
6
-
7
- interface IProps
8
- {
9
- title: string;
10
- }
11
-
12
- interface IState
13
- {
14
- value: string;
15
- }
16
-
17
- export class NSInputIP 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(e: React.ChangeEvent<HTMLInputElement>): void
29
- {
30
- this.setState({ value: e.target.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={IconInputId}
48
- alt="icon"
49
- width={24}
50
- height={24}
51
- />
52
- <input
53
- value={this.state.value}
54
- onChange={this.setValue}
55
- type="number"
56
- className={Styles.ns_input}
57
- placeholder="192.158.1.38"
58
- />
59
-
60
- </div>
61
- );
62
- }
63
- }
64
-
65
-
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Styles from "./NSInputIP.module.css";
5
+ import IconInputId from '../assets/images/icon-input-id.svg';
6
+
7
+ interface IProps
8
+ {
9
+ title: string;
10
+ }
11
+
12
+ interface IState
13
+ {
14
+ value: string;
15
+ }
16
+
17
+ export class NSInputIP 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(e: React.ChangeEvent<HTMLInputElement>): void
29
+ {
30
+ this.setState({ value: e.target.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={IconInputId}
48
+ alt="icon"
49
+ width={24}
50
+ height={24}
51
+ />
52
+ <input
53
+ value={this.state.value}
54
+ onChange={this.setValue}
55
+ type="number"
56
+ className={Styles.ns_input}
57
+ placeholder="192.158.1.38"
58
+ />
59
+
60
+ </div>
61
+ );
62
+ }
63
+ }
64
+
65
+
@@ -1,26 +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;
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
26
  }