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.
- package/.gitlab-ci.yml +14 -0
- package/config-overrides.js +66 -0
- package/package.json +45 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/App.css +2 -0
- package/src/App.tsx +71 -0
- package/src/assets/images/arrow.svg +3 -0
- package/src/assets/images/background.svg +9 -0
- package/src/assets/images/danger.svg +3 -0
- package/src/assets/images/exit.svg +3 -0
- package/src/assets/images/icon-input-date.svg +9 -0
- package/src/assets/images/icon-input-duration.svg +9 -0
- package/src/assets/images/icon-input-email.svg +9 -0
- package/src/assets/images/icon-input-float.svg +9 -0
- package/src/assets/images/icon-input-id.svg +9 -0
- package/src/assets/images/icon-input-integer.svg +9 -0
- package/src/assets/images/icon-input-phone.svg +9 -0
- package/src/assets/images/icon-input-price.svg +9 -0
- package/src/assets/images/icon-input-search.svg +4 -0
- package/src/assets/images/icon-input-string.svg +9 -0
- package/src/assets/images/icon-input-text.svg +9 -0
- package/src/assets/images/icon-input-time.svg +9 -0
- package/src/assets/images/logo.svg +9 -0
- package/src/assets/images/menu.svg +3 -0
- package/src/assets/images/namira.svg +9 -0
- package/src/assets/images/rectangle.svg +3 -0
- package/src/components/NSButtonGreen.module.css +12 -0
- package/src/components/NSButtonGreen.tsx +18 -0
- package/src/components/NSButtonRed.module.css +12 -0
- package/src/components/NSButtonRed.tsx +18 -0
- package/src/components/NSFooter.module.css +32 -0
- package/src/components/NSFooter.tsx +126 -0
- package/src/components/NSHeader.module.css +127 -0
- package/src/components/NSHeader.tsx +134 -0
- package/src/components/NSInputDate.module.css +32 -0
- package/src/components/NSInputDate.tsx +54 -0
- package/src/components/NSInputDuration.module.css +26 -0
- package/src/components/NSInputDuration.tsx +63 -0
- package/src/components/NSInputEmail.module.css +38 -0
- package/src/components/NSInputEmail.tsx +90 -0
- package/src/components/NSInputFloat.module.css +23 -0
- package/src/components/NSInputFloat.tsx +63 -0
- package/src/components/NSInputIP.module.css +23 -0
- package/src/components/NSInputIP.tsx +63 -0
- package/src/components/NSInputInteger.module.css +26 -0
- package/src/components/NSInputInteger.tsx +63 -0
- package/src/components/NSInputPhone.module.css +30 -0
- package/src/components/NSInputPhone.tsx +63 -0
- package/src/components/NSInputPrice.module.css +24 -0
- package/src/components/NSInputPrice.tsx +62 -0
- package/src/components/NSInputSearch.module.css +24 -0
- package/src/components/NSInputSearch.tsx +76 -0
- package/src/components/NSInputString.module.css +24 -0
- package/src/components/NSInputString.tsx +62 -0
- package/src/components/NSInputText.module.css +25 -0
- package/src/components/NSInputText.tsx +63 -0
- package/src/components/NSInputTime.module.css +24 -0
- package/src/components/NSInputTime.tsx +63 -0
- package/src/components/NSSelectBox.module.css +25 -0
- package/src/components/NSSelectBox.tsx +60 -0
- package/src/index.css +7 -0
- package/src/index.tsx +8 -0
- package/src/react-app-env.d.ts +1 -0
- package/tsconfig.json +38 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Styles from "./NSInputString.module.css";
|
|
3
|
+
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
4
|
+
|
|
5
|
+
interface IProps
|
|
6
|
+
{
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface IState
|
|
11
|
+
{
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default class NSInputString 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={IconInputString}
|
|
46
|
+
alt="icon"
|
|
47
|
+
width={24}
|
|
48
|
+
height={24}
|
|
49
|
+
/>
|
|
50
|
+
<input
|
|
51
|
+
value={this.state.value}
|
|
52
|
+
onChange={this.setValue}
|
|
53
|
+
type="text"
|
|
54
|
+
className={Styles.ns_input}
|
|
55
|
+
placeholder="12AB34cf"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
.ns_input{
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
padding: 10px 12px;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
.ns_input_icon{
|
|
17
|
+
position: absolute;
|
|
18
|
+
right: 20px;
|
|
19
|
+
top: 51%;
|
|
20
|
+
z-index: 1;
|
|
21
|
+
}
|
|
22
|
+
.ns_input_title {
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
font-weight: 400;
|
|
25
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Styles from "./NSInputText.module.css";
|
|
3
|
+
import IconInputText from '../assets/images/icon-input-text.svg';
|
|
4
|
+
|
|
5
|
+
interface IProps
|
|
6
|
+
{
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface IState
|
|
11
|
+
{
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default class NSInputText 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={IconInputText}
|
|
46
|
+
alt="icon"
|
|
47
|
+
width={24}
|
|
48
|
+
height={24}
|
|
49
|
+
/>
|
|
50
|
+
<input
|
|
51
|
+
value={this.state.value}
|
|
52
|
+
onChange={this.setValue}
|
|
53
|
+
type="text"
|
|
54
|
+
className={Styles.ns_input}
|
|
55
|
+
placeholder="Enter your Text"
|
|
56
|
+
/>
|
|
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,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Styles from "./NSInputTime.module.css";
|
|
3
|
+
import IconInputTime from '../assets/images/icon-input-time.svg';
|
|
4
|
+
|
|
5
|
+
interface IProps
|
|
6
|
+
{
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface IState
|
|
11
|
+
{
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default class NSInputTime 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={IconInputTime}
|
|
46
|
+
alt="icon"
|
|
47
|
+
width={24}
|
|
48
|
+
height={24}
|
|
49
|
+
/>
|
|
50
|
+
<input
|
|
51
|
+
value={this.state.value}
|
|
52
|
+
onChange={this.setValue}
|
|
53
|
+
type="time"
|
|
54
|
+
className={Styles.ns_input}
|
|
55
|
+
placeholder="21:44:06"
|
|
56
|
+
step="2"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.ns_input_parent {
|
|
2
|
+
width: 326px;
|
|
3
|
+
max-width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ns_input_select {
|
|
7
|
+
height: 48px;
|
|
8
|
+
width: 304px !important;
|
|
9
|
+
}
|
|
10
|
+
.ns_input_select span span svg path{
|
|
11
|
+
height: 24px !important;
|
|
12
|
+
width: 24px !important;
|
|
13
|
+
}
|
|
14
|
+
.ns_input_select span span svg {
|
|
15
|
+
height: 24px !important;
|
|
16
|
+
width: 24px !important;
|
|
17
|
+
}
|
|
18
|
+
.ns_input_select span span span svg path{
|
|
19
|
+
height: 12px !important;
|
|
20
|
+
width: 12px !important;
|
|
21
|
+
}
|
|
22
|
+
.ns_input_select span span span svg {
|
|
23
|
+
height: 12px !important;
|
|
24
|
+
width: 12px !important;
|
|
25
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Styles from "./NSSelectBox.module.css";
|
|
3
|
+
import { Select, Space } from 'antd';
|
|
4
|
+
import type { SelectProps } from 'antd';
|
|
5
|
+
import {CaretDownOutlined } from '@ant-design/icons'
|
|
6
|
+
|
|
7
|
+
interface IProps
|
|
8
|
+
{
|
|
9
|
+
title: string;
|
|
10
|
+
options: SelectProps['options'];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface IState
|
|
14
|
+
{
|
|
15
|
+
value: string[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default class NSSelectBox extends React.Component<IProps, IState> {
|
|
19
|
+
constructor(props: IProps)
|
|
20
|
+
{
|
|
21
|
+
super(props);
|
|
22
|
+
this.state = {
|
|
23
|
+
value: [],
|
|
24
|
+
};
|
|
25
|
+
this.setValue = this.setValue.bind(this);
|
|
26
|
+
}
|
|
27
|
+
setValue(value: string[]): void
|
|
28
|
+
{
|
|
29
|
+
this.setState({ value });
|
|
30
|
+
}
|
|
31
|
+
getValue(): string[]
|
|
32
|
+
{
|
|
33
|
+
return this.state.value;
|
|
34
|
+
}
|
|
35
|
+
override render()
|
|
36
|
+
{
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div className={`${Styles.ns_input_parent} p-2`}>
|
|
40
|
+
<Select
|
|
41
|
+
suffixIcon={<CaretDownOutlined />}
|
|
42
|
+
mode="multiple"
|
|
43
|
+
style={{ width: '100%' }}
|
|
44
|
+
className={Styles.ns_input_select}
|
|
45
|
+
placeholder="Combo Box"
|
|
46
|
+
onChange={this.setValue}
|
|
47
|
+
optionLabelProp="label"
|
|
48
|
+
options={this.props.options}
|
|
49
|
+
optionRender={(option) => (
|
|
50
|
+
<Space className={Styles.ns_input_select_option}>
|
|
51
|
+
{option.data.desc}
|
|
52
|
+
</Space>
|
|
53
|
+
)}
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
package/src/index.css
ADDED
package/src/index.tsx
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="react-scripts" />
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES6",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"rootDir": "./src",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"lib": [
|
|
8
|
+
"dom",
|
|
9
|
+
"dom.iterable",
|
|
10
|
+
"esnext"
|
|
11
|
+
],
|
|
12
|
+
"allowJs": false,
|
|
13
|
+
"checkJs": false,
|
|
14
|
+
"strict": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"sourceMap": true,
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"declaration": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"noImplicitAny": true,
|
|
22
|
+
"noImplicitOverride": true,
|
|
23
|
+
"noImplicitReturns": true,
|
|
24
|
+
"noImplicitThis": true,
|
|
25
|
+
"skipLibCheck": true,
|
|
26
|
+
"allowSyntheticDefaultImports": true,
|
|
27
|
+
"forceConsistentCasingInFileNames": true,
|
|
28
|
+
"noFallthroughCasesInSwitch": true,
|
|
29
|
+
"isolatedModules": true,
|
|
30
|
+
"removeComments": true,
|
|
31
|
+
"noEmit": true,
|
|
32
|
+
"moduleResolution": "node",
|
|
33
|
+
"jsx": "react-jsx"
|
|
34
|
+
},
|
|
35
|
+
"include": [
|
|
36
|
+
"src"
|
|
37
|
+
]
|
|
38
|
+
}
|