namirasoft-site-react 1.2.39 → 1.2.40
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/.gitlab-ci.yml +14 -14
- package/config-overrides.js +65 -65
- package/dist/App.css +0 -0
- package/dist/App.js +1 -1
- package/dist/App.js.map +1 -1
- package/dist/assets/images/arrow.svg +3 -3
- package/dist/assets/images/background.svg +9 -0
- package/dist/assets/images/danger.svg +3 -3
- package/dist/assets/images/exit.svg +3 -3
- package/dist/assets/images/icon-input-date.svg +9 -9
- package/dist/assets/images/icon-input-duration.svg +9 -9
- package/dist/assets/images/icon-input-email.svg +9 -9
- package/dist/assets/images/icon-input-float.svg +9 -9
- package/dist/assets/images/icon-input-id.svg +9 -9
- package/dist/assets/images/icon-input-integer.svg +9 -9
- package/dist/assets/images/icon-input-phone.svg +9 -9
- package/dist/assets/images/icon-input-price.svg +9 -9
- package/dist/assets/images/icon-input-search.svg +4 -4
- package/dist/assets/images/icon-input-string.svg +9 -9
- package/dist/assets/images/icon-input-text.svg +9 -9
- package/dist/assets/images/icon-input-time.svg +9 -9
- package/dist/assets/images/left-vector.png +0 -0
- package/dist/assets/images/left_vector.png +0 -0
- package/dist/assets/images/logo.svg +9 -9
- package/dist/assets/images/menu.svg +3 -3
- package/dist/assets/images/namira.svg +9 -9
- package/dist/assets/images/rectangle.svg +3 -3
- package/dist/assets/images/right-vector.png +0 -0
- package/dist/assets/images/right_vector.png +0 -0
- package/dist/components/NSButtonGreen.js +1 -1
- package/dist/components/NSButtonGreen.js.map +1 -1
- package/dist/components/NSButtonRed.js +1 -1
- package/dist/components/NSButtonRed.js.map +1 -1
- package/dist/components/NSCard.js +2 -2
- package/dist/components/NSCard.js.map +1 -1
- package/dist/components/NSFooter.js +4 -4
- package/dist/components/NSFooter.js.map +1 -1
- package/dist/components/NSHeader.d.ts +1 -1
- package/dist/components/NSHeader.js +48 -43
- package/dist/components/NSHeader.js.map +1 -1
- package/dist/components/NSInputDate.js +1 -1
- package/dist/components/NSInputDate.js.map +1 -1
- package/dist/components/NSInputDuration.js +1 -1
- package/dist/components/NSInputDuration.js.map +1 -1
- package/dist/components/NSInputEmail.js +1 -1
- package/dist/components/NSInputEmail.js.map +1 -1
- package/dist/components/NSInputEmail.module.css +37 -37
- package/dist/components/NSInputFloat.js +1 -1
- package/dist/components/NSInputFloat.js.map +1 -1
- package/dist/components/NSInputFloat.module.css +25 -25
- package/dist/components/NSInputIP.js +1 -1
- package/dist/components/NSInputIP.js.map +1 -1
- package/dist/components/NSInputIP.module.css +25 -25
- package/dist/components/NSInputInteger.js +1 -1
- package/dist/components/NSInputInteger.js.map +1 -1
- package/dist/components/NSInputInteger.module.css +25 -25
- package/dist/components/NSInputPhone.js +1 -1
- package/dist/components/NSInputPhone.js.map +1 -1
- package/dist/components/NSInputPhone.module.css +32 -32
- package/dist/components/NSInputPrice.js +1 -1
- package/dist/components/NSInputPrice.js.map +1 -1
- package/dist/components/NSInputPrice.module.css +26 -26
- package/dist/components/NSInputSearch.js +1 -1
- package/dist/components/NSInputSearch.js.map +1 -1
- package/dist/components/NSInputSearch.module.css +25 -25
- package/dist/components/NSInputString.js +1 -1
- package/dist/components/NSInputString.js.map +1 -1
- package/dist/components/NSInputString.module.css +26 -26
- package/dist/components/NSInputText.js +1 -1
- package/dist/components/NSInputText.js.map +1 -1
- package/dist/components/NSInputText.module.css +27 -27
- package/dist/components/NSInputTime.js +1 -1
- package/dist/components/NSInputTime.js.map +1 -1
- package/dist/components/NSInputTime.module.css +26 -26
- package/dist/components/NSLayout.js +1 -1
- package/dist/components/NSLayout.js.map +1 -1
- package/dist/components/NSLayout.module.css +16 -16
- package/dist/components/NSLayoutHeroBanner.js +1 -1
- package/dist/components/NSLayoutHeroBanner.js.map +1 -1
- package/dist/components/NSLayoutHeroBanner.module.css +43 -43
- package/dist/components/NSLayoutTitle.js +1 -1
- package/dist/components/NSLayoutTitle.js.map +1 -1
- package/dist/components/NSLinkGreen.js +1 -1
- package/dist/components/NSLinkGreen.js.map +1 -1
- package/dist/components/NSLinkGreen.module.css +15 -15
- package/dist/components/NSLinkRed.js +1 -1
- package/dist/components/NSLinkRed.js.map +1 -1
- package/dist/components/NSLinkRed.module.css +15 -15
- package/dist/components/NSPagination.js +7 -7
- package/dist/components/NSPagination.js.map +1 -1
- package/dist/components/NSPagination.module.css +24 -24
- package/dist/components/NSParentCard.d.ts +0 -0
- package/dist/components/NSParentCard.js +2 -0
- package/dist/components/NSParentCard.js.map +1 -0
- package/dist/components/NSParentCard.module.css +34 -34
- package/dist/components/NSSelectBox.js +1 -1
- package/dist/components/NSSelectBox.js.map +1 -1
- package/dist/components/NSSelectBox.module.css +28 -28
- package/dist/components/NSTable.js +1 -1
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTable.modules.css +76 -76
- package/dist/index.css +6 -0
- package/dist/main.js.map +1 -1
- package/dist/pages/NSLoginPage.js +1 -1
- package/dist/pages/NSLoginPage.js.map +1 -1
- package/package.json +52 -52
- package/public/index.html +42 -42
- package/public/manifest.json +25 -25
- package/public/robots.txt +3 -3
- package/src/App.tsx +70 -70
- package/src/assets/images/arrow.svg +3 -3
- package/src/assets/images/danger.svg +3 -3
- package/src/assets/images/exit.svg +3 -3
- package/src/assets/images/icon-input-date.svg +9 -9
- package/src/assets/images/icon-input-duration.svg +9 -9
- package/src/assets/images/icon-input-email.svg +9 -9
- package/src/assets/images/icon-input-float.svg +9 -9
- package/src/assets/images/icon-input-id.svg +9 -9
- package/src/assets/images/icon-input-integer.svg +9 -9
- package/src/assets/images/icon-input-phone.svg +9 -9
- package/src/assets/images/icon-input-price.svg +9 -9
- package/src/assets/images/icon-input-search.svg +4 -4
- package/src/assets/images/icon-input-string.svg +9 -9
- package/src/assets/images/icon-input-text.svg +9 -9
- package/src/assets/images/icon-input-time.svg +9 -9
- package/src/assets/images/logo.svg +9 -9
- package/src/assets/images/menu.svg +3 -3
- package/src/assets/images/namira.svg +9 -9
- package/src/assets/images/rectangle.svg +3 -3
- package/src/components/NSButtonGreen.tsx +33 -33
- package/src/components/NSButtonRed.tsx +33 -33
- package/src/components/NSCard.tsx +54 -54
- package/src/components/NSFooter.tsx +123 -123
- package/src/components/NSHeader.tsx +122 -130
- package/src/components/NSInputDate.tsx +57 -57
- package/src/components/NSInputDuration.tsx +65 -65
- package/src/components/NSInputEmail.module.css +37 -37
- package/src/components/NSInputEmail.tsx +92 -92
- package/src/components/NSInputFloat.module.css +25 -25
- package/src/components/NSInputFloat.tsx +61 -61
- package/src/components/NSInputIP.module.css +25 -25
- package/src/components/NSInputIP.tsx +65 -65
- package/src/components/NSInputInteger.module.css +25 -25
- package/src/components/NSInputInteger.tsx +65 -65
- package/src/components/NSInputPhone.module.css +32 -32
- package/src/components/NSInputPhone.tsx +65 -65
- package/src/components/NSInputPrice.module.css +26 -26
- package/src/components/NSInputPrice.tsx +68 -68
- package/src/components/NSInputSearch.module.css +25 -25
- package/src/components/NSInputSearch.tsx +78 -78
- package/src/components/NSInputString.module.css +26 -26
- package/src/components/NSInputString.tsx +66 -66
- package/src/components/NSInputText.module.css +27 -27
- package/src/components/NSInputText.tsx +69 -69
- package/src/components/NSInputTime.module.css +26 -26
- package/src/components/NSInputTime.tsx +65 -65
- package/src/components/NSLayout.module.css +16 -16
- package/src/components/NSLayout.tsx +31 -29
- package/src/components/NSLayoutHeroBanner.module.css +43 -43
- package/src/components/NSLayoutHeroBanner.tsx +85 -85
- package/src/components/NSLayoutTitle.tsx +25 -25
- package/src/components/NSLinkGreen.module.css +15 -15
- package/src/components/NSLinkGreen.tsx +43 -43
- package/src/components/NSLinkRed.module.css +15 -15
- package/src/components/NSLinkRed.tsx +43 -43
- package/src/components/NSPagination.module.css +24 -24
- package/src/components/NSPagination.tsx +54 -54
- package/src/components/NSParentCard.module.css +34 -34
- package/src/components/NSParentCard.tsx.temp +58 -58
- package/src/components/NSSelectBox.module.css +28 -28
- package/src/components/NSSelectBox.tsx +62 -62
- package/src/components/NSTable.modules.css +76 -76
- package/src/components/NSTable.tsx +64 -64
- package/src/index.tsx +7 -7
- package/src/main.ts +25 -26
- package/src/pages/NSLoginPage.tsx +39 -39
- package/src/react-app-env.d.ts +1 -1
- package/tsconfig.json +37 -37
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSInputSearch.module.css";
|
|
5
|
-
import IconInputSearch from '../assets/images/icon-input-search.svg';
|
|
6
|
-
|
|
7
|
-
interface IProps
|
|
8
|
-
{
|
|
9
|
-
title: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface IState
|
|
13
|
-
{
|
|
14
|
-
value: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export class NSInputSearch 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
|
-
this.keyDownEvent = this.keyDownEvent.bind(this);
|
|
28
|
-
}
|
|
29
|
-
setValue(e: React.ChangeEvent<HTMLInputElement>): void
|
|
30
|
-
{
|
|
31
|
-
this.setState({ value: e.target.value });
|
|
32
|
-
}
|
|
33
|
-
setDefaultValue(value: string): void
|
|
34
|
-
{
|
|
35
|
-
this.setState({ value });
|
|
36
|
-
}
|
|
37
|
-
getValue(): string
|
|
38
|
-
{
|
|
39
|
-
return this.state.value;
|
|
40
|
-
}
|
|
41
|
-
onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
42
|
-
{
|
|
43
|
-
this.setValue(e);
|
|
44
|
-
}
|
|
45
|
-
keyDownEvent(event: React.KeyboardEvent<HTMLDivElement>)
|
|
46
|
-
{
|
|
47
|
-
if (event.code === "Enter")
|
|
48
|
-
{
|
|
49
|
-
//todo
|
|
50
|
-
console.log("function")
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
override render()
|
|
54
|
-
{
|
|
55
|
-
return (
|
|
56
|
-
<div className={`${Styles.ns_input_form} p-2`}>
|
|
57
|
-
<span className={Styles.ns_input_title}>{this.props.title}</span>
|
|
58
|
-
<img
|
|
59
|
-
className={Styles.ns_input_icon}
|
|
60
|
-
src={IconInputSearch}
|
|
61
|
-
alt="icon"
|
|
62
|
-
width={32}
|
|
63
|
-
height={32}
|
|
64
|
-
/>
|
|
65
|
-
<input
|
|
66
|
-
value={this.state.value}
|
|
67
|
-
onChange={this.setValue}
|
|
68
|
-
onKeyDown={this.keyDownEvent}
|
|
69
|
-
type="text"
|
|
70
|
-
className={Styles.ns_input}
|
|
71
|
-
placeholder="Search"
|
|
72
|
-
/>
|
|
73
|
-
</div>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Styles from "./NSInputSearch.module.css";
|
|
5
|
+
import IconInputSearch from '../assets/images/icon-input-search.svg';
|
|
6
|
+
|
|
7
|
+
interface IProps
|
|
8
|
+
{
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IState
|
|
13
|
+
{
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class NSInputSearch 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
|
+
this.keyDownEvent = this.keyDownEvent.bind(this);
|
|
28
|
+
}
|
|
29
|
+
setValue(e: React.ChangeEvent<HTMLInputElement>): void
|
|
30
|
+
{
|
|
31
|
+
this.setState({ value: e.target.value });
|
|
32
|
+
}
|
|
33
|
+
setDefaultValue(value: string): void
|
|
34
|
+
{
|
|
35
|
+
this.setState({ value });
|
|
36
|
+
}
|
|
37
|
+
getValue(): string
|
|
38
|
+
{
|
|
39
|
+
return this.state.value;
|
|
40
|
+
}
|
|
41
|
+
onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
42
|
+
{
|
|
43
|
+
this.setValue(e);
|
|
44
|
+
}
|
|
45
|
+
keyDownEvent(event: React.KeyboardEvent<HTMLDivElement>)
|
|
46
|
+
{
|
|
47
|
+
if (event.code === "Enter")
|
|
48
|
+
{
|
|
49
|
+
//todo
|
|
50
|
+
console.log("function")
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
override render()
|
|
54
|
+
{
|
|
55
|
+
return (
|
|
56
|
+
<div className={`${Styles.ns_input_form} p-2`}>
|
|
57
|
+
<span className={Styles.ns_input_title}>{this.props.title}</span>
|
|
58
|
+
<img
|
|
59
|
+
className={Styles.ns_input_icon}
|
|
60
|
+
src={IconInputSearch}
|
|
61
|
+
alt="icon"
|
|
62
|
+
width={32}
|
|
63
|
+
height={32}
|
|
64
|
+
/>
|
|
65
|
+
<input
|
|
66
|
+
value={this.state.value}
|
|
67
|
+
onChange={this.setValue}
|
|
68
|
+
onKeyDown={this.keyDownEvent}
|
|
69
|
+
type="text"
|
|
70
|
+
className={Styles.ns_input}
|
|
71
|
+
placeholder="Search"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
@@ -1,27 +1,27 @@
|
|
|
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
|
-
z-index: 1;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.ns_input_title {
|
|
25
|
-
font-size: 16px;
|
|
26
|
-
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
|
+
z-index: 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ns_input_title {
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
font-weight: 400;
|
|
27
27
|
}
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSInputString.module.css";
|
|
5
|
-
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
6
|
-
|
|
7
|
-
interface IProps
|
|
8
|
-
{
|
|
9
|
-
title: string;
|
|
10
|
-
defaultValue?: string;
|
|
11
|
-
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface IState
|
|
15
|
-
{
|
|
16
|
-
value: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class NSInputString extends React.Component<IProps, IState>
|
|
20
|
-
{
|
|
21
|
-
constructor(props: IProps)
|
|
22
|
-
{
|
|
23
|
-
super(props);
|
|
24
|
-
this.state = {
|
|
25
|
-
value: props.defaultValue ?? "",
|
|
26
|
-
};
|
|
27
|
-
this.getValue = this.getValue.bind(this);
|
|
28
|
-
this.setValue = this.setValue.bind(this);
|
|
29
|
-
this.onChanged = this.onChanged.bind(this);
|
|
30
|
-
}
|
|
31
|
-
getValue(): string
|
|
32
|
-
{
|
|
33
|
-
return this.state.value;
|
|
34
|
-
}
|
|
35
|
-
setValue(value: string): void
|
|
36
|
-
{
|
|
37
|
-
this.setState({ value });
|
|
38
|
-
}
|
|
39
|
-
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
40
|
-
{
|
|
41
|
-
this.setValue(e.target.value);
|
|
42
|
-
if (this.props.onChanged)
|
|
43
|
-
this.props.onChanged(e);
|
|
44
|
-
}
|
|
45
|
-
override render()
|
|
46
|
-
{
|
|
47
|
-
return (
|
|
48
|
-
<div className={`${Styles.ns_input_parent} p-2`}>
|
|
49
|
-
<span className={Styles.ns_input_title}>{this.props.title}</span>
|
|
50
|
-
<img
|
|
51
|
-
className={Styles.ns_input_icon}
|
|
52
|
-
src={IconInputString}
|
|
53
|
-
alt="icon"
|
|
54
|
-
width={24}
|
|
55
|
-
height={24}
|
|
56
|
-
/>
|
|
57
|
-
<input
|
|
58
|
-
value={this.state.value}
|
|
59
|
-
onChange={this.onChanged}
|
|
60
|
-
type="text"
|
|
61
|
-
className={Styles.ns_input}
|
|
62
|
-
placeholder="12AB34cf"
|
|
63
|
-
/>
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Styles from "./NSInputString.module.css";
|
|
5
|
+
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
6
|
+
|
|
7
|
+
interface IProps
|
|
8
|
+
{
|
|
9
|
+
title: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface IState
|
|
15
|
+
{
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class NSInputString extends React.Component<IProps, IState>
|
|
20
|
+
{
|
|
21
|
+
constructor(props: IProps)
|
|
22
|
+
{
|
|
23
|
+
super(props);
|
|
24
|
+
this.state = {
|
|
25
|
+
value: props.defaultValue ?? "",
|
|
26
|
+
};
|
|
27
|
+
this.getValue = this.getValue.bind(this);
|
|
28
|
+
this.setValue = this.setValue.bind(this);
|
|
29
|
+
this.onChanged = this.onChanged.bind(this);
|
|
30
|
+
}
|
|
31
|
+
getValue(): string
|
|
32
|
+
{
|
|
33
|
+
return this.state.value;
|
|
34
|
+
}
|
|
35
|
+
setValue(value: string): void
|
|
36
|
+
{
|
|
37
|
+
this.setState({ value });
|
|
38
|
+
}
|
|
39
|
+
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
40
|
+
{
|
|
41
|
+
this.setValue(e.target.value);
|
|
42
|
+
if (this.props.onChanged)
|
|
43
|
+
this.props.onChanged(e);
|
|
44
|
+
}
|
|
45
|
+
override render()
|
|
46
|
+
{
|
|
47
|
+
return (
|
|
48
|
+
<div className={`${Styles.ns_input_parent} p-2`}>
|
|
49
|
+
<span className={Styles.ns_input_title}>{this.props.title}</span>
|
|
50
|
+
<img
|
|
51
|
+
className={Styles.ns_input_icon}
|
|
52
|
+
src={IconInputString}
|
|
53
|
+
alt="icon"
|
|
54
|
+
width={24}
|
|
55
|
+
height={24}
|
|
56
|
+
/>
|
|
57
|
+
<input
|
|
58
|
+
value={this.state.value}
|
|
59
|
+
onChange={this.onChanged}
|
|
60
|
+
type="text"
|
|
61
|
+
className={Styles.ns_input}
|
|
62
|
+
placeholder="12AB34cf"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
67
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
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
|
-
padding: 8px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.ns_input {
|
|
12
|
-
border-radius: 8px;
|
|
13
|
-
padding: 10px 12px;
|
|
14
|
-
font-size: 16px;
|
|
15
|
-
font-weight: 400;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.ns_input_icon {
|
|
19
|
-
position: absolute;
|
|
20
|
-
right: 20px;
|
|
21
|
-
top: 51%;
|
|
22
|
-
z-index: 1;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.ns_input_title {
|
|
26
|
-
font-size: 16px;
|
|
27
|
-
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
|
+
padding: 8px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ns_input {
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
padding: 10px 12px;
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ns_input_icon {
|
|
19
|
+
position: absolute;
|
|
20
|
+
right: 20px;
|
|
21
|
+
top: 51%;
|
|
22
|
+
z-index: 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ns_input_title {
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
font-weight: 400;
|
|
28
28
|
}
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSInputText.module.css";
|
|
5
|
-
import IconInputText from '../assets/images/icon-input-text.svg';
|
|
6
|
-
|
|
7
|
-
interface IProps
|
|
8
|
-
{
|
|
9
|
-
title: string;
|
|
10
|
-
defaultValue?: string;
|
|
11
|
-
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface IState
|
|
15
|
-
{
|
|
16
|
-
value: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class NSInputText extends React.Component<IProps, IState> {
|
|
20
|
-
constructor(props: IProps)
|
|
21
|
-
{
|
|
22
|
-
super(props);
|
|
23
|
-
this.state = {
|
|
24
|
-
value: props.defaultValue ?? "",
|
|
25
|
-
};
|
|
26
|
-
this.getValue = this.getValue.bind(this);
|
|
27
|
-
this.setValue = this.setValue.bind(this);
|
|
28
|
-
this.onChanged = this.onChanged.bind(this);
|
|
29
|
-
}
|
|
30
|
-
getValue(): string
|
|
31
|
-
{
|
|
32
|
-
return this.state.value;
|
|
33
|
-
}
|
|
34
|
-
setValue(value: string): void
|
|
35
|
-
{
|
|
36
|
-
this.setState({ value });
|
|
37
|
-
}
|
|
38
|
-
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
39
|
-
{
|
|
40
|
-
this.setValue(e.target.value);
|
|
41
|
-
if (this.props.onChanged)
|
|
42
|
-
this.props.onChanged(e);
|
|
43
|
-
}
|
|
44
|
-
override render()
|
|
45
|
-
{
|
|
46
|
-
return (
|
|
47
|
-
<div className={`${Styles.ns_input_parent} p-2`}>
|
|
48
|
-
<span className={Styles.ns_input_title}>{this.props.title}</span>
|
|
49
|
-
<img
|
|
50
|
-
className={Styles.ns_input_icon}
|
|
51
|
-
src={IconInputText}
|
|
52
|
-
alt="icon"
|
|
53
|
-
width={24}
|
|
54
|
-
height={24}
|
|
55
|
-
/>
|
|
56
|
-
<input
|
|
57
|
-
value={this.state.value}
|
|
58
|
-
onChange={this.onChanged}
|
|
59
|
-
type="text"
|
|
60
|
-
className={Styles.ns_input}
|
|
61
|
-
placeholder="Enter your Text"
|
|
62
|
-
/>
|
|
63
|
-
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Styles from "./NSInputText.module.css";
|
|
5
|
+
import IconInputText from '../assets/images/icon-input-text.svg';
|
|
6
|
+
|
|
7
|
+
interface IProps
|
|
8
|
+
{
|
|
9
|
+
title: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface IState
|
|
15
|
+
{
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class NSInputText extends React.Component<IProps, IState> {
|
|
20
|
+
constructor(props: IProps)
|
|
21
|
+
{
|
|
22
|
+
super(props);
|
|
23
|
+
this.state = {
|
|
24
|
+
value: props.defaultValue ?? "",
|
|
25
|
+
};
|
|
26
|
+
this.getValue = this.getValue.bind(this);
|
|
27
|
+
this.setValue = this.setValue.bind(this);
|
|
28
|
+
this.onChanged = this.onChanged.bind(this);
|
|
29
|
+
}
|
|
30
|
+
getValue(): string
|
|
31
|
+
{
|
|
32
|
+
return this.state.value;
|
|
33
|
+
}
|
|
34
|
+
setValue(value: string): void
|
|
35
|
+
{
|
|
36
|
+
this.setState({ value });
|
|
37
|
+
}
|
|
38
|
+
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
39
|
+
{
|
|
40
|
+
this.setValue(e.target.value);
|
|
41
|
+
if (this.props.onChanged)
|
|
42
|
+
this.props.onChanged(e);
|
|
43
|
+
}
|
|
44
|
+
override render()
|
|
45
|
+
{
|
|
46
|
+
return (
|
|
47
|
+
<div className={`${Styles.ns_input_parent} p-2`}>
|
|
48
|
+
<span className={Styles.ns_input_title}>{this.props.title}</span>
|
|
49
|
+
<img
|
|
50
|
+
className={Styles.ns_input_icon}
|
|
51
|
+
src={IconInputText}
|
|
52
|
+
alt="icon"
|
|
53
|
+
width={24}
|
|
54
|
+
height={24}
|
|
55
|
+
/>
|
|
56
|
+
<input
|
|
57
|
+
value={this.state.value}
|
|
58
|
+
onChange={this.onChanged}
|
|
59
|
+
type="text"
|
|
60
|
+
className={Styles.ns_input}
|
|
61
|
+
placeholder="Enter your Text"
|
|
62
|
+
/>
|
|
63
|
+
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
@@ -1,27 +1,27 @@
|
|
|
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
|
-
z-index: 1;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.ns_input_title {
|
|
25
|
-
font-size: 16px;
|
|
26
|
-
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
|
+
z-index: 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ns_input_title {
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
font-weight: 400;
|
|
27
27
|
}
|