namirasoft-site-react 1.3.58 → 1.3.60
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/dist/App.js +2 -2
- package/dist/App.js.map +1 -1
- package/dist/components/NSButton.d.ts +4 -3
- package/dist/components/NSButton.js.map +1 -1
- package/dist/components/NSButtonBlue.d.ts +2 -1
- package/dist/components/NSButtonBlue.js.map +1 -1
- package/dist/components/NSButtonBlueVector.d.ts +2 -1
- package/dist/components/NSButtonBlueVector.js.map +1 -1
- package/dist/components/NSButtonGreen.d.ts +2 -1
- package/dist/components/NSButtonGreen.js.map +1 -1
- package/dist/components/NSButtonRed.d.ts +2 -1
- package/dist/components/NSButtonRed.js.map +1 -1
- package/dist/components/NSCard.d.ts +2 -1
- package/dist/components/NSCard.js.map +1 -1
- package/dist/components/NSCopyToClipboard.d.ts +13 -0
- package/dist/components/NSCopyToClipboard.js +20 -0
- package/dist/components/NSCopyToClipboard.js.map +1 -0
- package/{src/components/NSInputCopy.module.css → dist/components/NSCopyToClipboard.module.css} +4 -4
- package/dist/components/NSEntityBar.d.ts +2 -1
- package/dist/components/NSEntityBar.js.map +1 -1
- package/dist/components/NSEntityCardBackground.d.ts +2 -1
- package/dist/components/NSFooter.d.ts +2 -1
- package/dist/components/NSFooter.js.map +1 -1
- package/dist/components/NSHeader.d.ts +2 -1
- package/dist/components/NSHeader.js.map +1 -1
- package/dist/components/NSInputDate.d.ts +1 -0
- package/dist/components/NSInputDate.js +4 -3
- package/dist/components/NSInputDate.js.map +1 -1
- package/dist/components/NSInputDate.module.css +9 -0
- package/dist/components/NSInputDuration.js.map +1 -1
- package/dist/components/NSInputEmail.js +2 -2
- package/dist/components/NSInputEmail.js.map +1 -1
- package/dist/components/NSInputErrorNotifier.d.ts +5 -0
- package/dist/components/NSInputErrorNotifier.js +7 -0
- package/dist/components/NSInputErrorNotifier.js.map +1 -0
- package/dist/components/NSInputErrorNotifier.module.css +3 -0
- package/dist/components/NSInputIP.js.map +1 -1
- package/dist/components/NSInputInteger.js.map +1 -1
- package/dist/components/NSInputPhone.js.map +1 -1
- package/dist/components/NSInputPrice.js.map +1 -1
- package/dist/components/NSInputSearch.js.map +1 -1
- package/dist/components/NSInputText.js.map +1 -1
- package/dist/components/NSInputTime.js.map +1 -1
- package/dist/components/NSLayout.d.ts +4 -1
- package/dist/components/NSLayout.js +2 -1
- package/dist/components/NSLayout.js.map +1 -1
- package/dist/components/NSLayoutHeroBanner.d.ts +3 -3
- package/dist/components/NSLayoutHeroBanner.js +1 -1
- package/dist/components/NSLayoutHeroBanner.js.map +1 -1
- package/dist/components/NSLayoutTitle.d.ts +3 -4
- package/dist/components/NSLayoutTitle.js +2 -2
- package/dist/components/NSLayoutTitle.js.map +1 -1
- package/dist/components/NSLinkBlue.d.ts +2 -2
- package/dist/components/NSLinkBlue.js.map +1 -1
- package/dist/components/NSLinkGreen.d.ts +2 -1
- package/dist/components/NSLinkGreen.js.map +1 -1
- package/dist/components/NSLinkRed.d.ts +2 -1
- package/dist/components/NSLinkRed.js.map +1 -1
- package/dist/components/NSLoading.d.ts +2 -2
- package/dist/components/NSLoading.js.map +1 -1
- package/dist/components/NSNotification.d.ts +22 -0
- package/dist/components/NSNotification.js +32 -0
- package/dist/components/NSNotification.js.map +1 -0
- package/dist/components/NSNotification.module.css +32 -0
- package/dist/components/NSPagination.d.ts +2 -1
- package/dist/components/NSPagination.js.map +1 -1
- package/dist/components/NSPanel.d.ts +2 -1
- package/dist/components/NSPanel.js.map +1 -1
- package/dist/components/NSSection.d.ts +2 -1
- package/dist/components/NSSection.js.map +1 -1
- package/dist/components/NSSectionBars.d.ts +2 -1
- package/dist/components/NSSectionBars.js.map +1 -1
- package/dist/components/NSSectionCards.d.ts +2 -1
- package/dist/components/NSSectionCards.js.map +1 -1
- package/dist/components/NSSectionTitle.d.ts +2 -1
- package/dist/components/NSSectionTitle.js.map +1 -1
- package/dist/components/NSSelectBox.d.ts +8 -4
- package/dist/components/NSSelectBox.js +11 -3
- package/dist/components/NSSelectBox.js.map +1 -1
- package/dist/components/NSSpace.d.ts +2 -1
- package/dist/components/NSSpace.js.map +1 -1
- package/dist/components/NSTable.d.ts +2 -1
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTitle.d.ts +2 -1
- package/dist/components/NSTitle.js.map +1 -1
- package/dist/main.d.ts +3 -2
- package/dist/main.js +3 -2
- package/dist/main.js.map +1 -1
- package/dist/props/NSButtonProps.d.ts +2 -1
- package/package.json +3 -3
- package/src/App.tsx +3 -2
- package/src/components/NSButton.tsx +5 -3
- package/src/components/NSButtonBlue.tsx +2 -1
- package/src/components/NSButtonBlueVector.tsx +2 -1
- package/src/components/NSButtonGreen.tsx +2 -1
- package/src/components/NSButtonRed.tsx +2 -1
- package/src/components/NSCard.tsx +2 -1
- package/{dist/components/NSInputCopy.module.css → src/components/NSCopyToClipboard.module.css} +4 -4
- package/src/components/NSCopyToClipboard.tsx +51 -0
- package/src/components/NSEntityBar.tsx +4 -2
- package/src/components/NSEntityCardBackground.tsx +2 -2
- package/src/components/NSFooter.tsx +9 -8
- package/src/components/NSHeader.tsx +9 -8
- package/src/components/NSInputDate.module.css +9 -0
- package/src/components/NSInputDate.tsx +20 -13
- package/src/components/NSInputDuration.tsx +10 -9
- package/src/components/NSInputEmail.tsx +2 -17
- package/src/components/NSInputErrorNotifier.module.css +3 -0
- package/src/components/NSInputErrorNotifier.tsx +28 -0
- package/src/components/NSInputFloat.tsx +1 -1
- package/src/components/NSInputIP.tsx +4 -3
- package/src/components/NSInputInteger.tsx +2 -1
- package/src/components/NSInputPhone.tsx +2 -1
- package/src/components/NSInputPrice.tsx +2 -1
- package/src/components/NSInputSearch.tsx +3 -3
- package/src/components/NSInputText.tsx +2 -1
- package/src/components/NSInputTime.tsx +2 -1
- package/src/components/NSLayout.tsx +5 -1
- package/src/components/NSLayoutHeroBanner.tsx +4 -6
- package/src/components/NSLayoutTitle.tsx +4 -6
- package/src/components/NSLinkBlue.tsx +2 -3
- package/src/components/NSLinkGreen.tsx +2 -1
- package/src/components/NSLinkRed.tsx +2 -1
- package/src/components/NSLoading.tsx +2 -1
- package/src/components/NSNotification.module.css +32 -0
- package/src/components/{NSMessenger.tsx → NSNotification.tsx} +18 -7
- package/src/components/NSPagination.tsx +14 -13
- package/src/components/NSPanel.tsx +7 -5
- package/src/components/NSSection.tsx +2 -1
- package/src/components/NSSectionBars.tsx +2 -1
- package/src/components/NSSectionCards.tsx +3 -2
- package/src/components/NSSectionTitle.tsx +2 -1
- package/src/components/NSSelectBox.tsx +21 -8
- package/src/components/NSSpace.tsx +3 -1
- package/src/components/NSTable.tsx +2 -1
- package/src/components/NSTitle.tsx +2 -1
- package/src/main.ts +3 -2
- package/src/props/NSButtonProps.ts +2 -1
- package/dist/components/NSInputCopy.d.ts +0 -17
- package/dist/components/NSInputCopy.js +0 -38
- package/dist/components/NSInputCopy.js.map +0 -1
- package/dist/components/NSMessenger.d.ts +0 -14
- package/dist/components/NSMessenger.js +0 -23
- package/dist/components/NSMessenger.js.map +0 -1
- package/dist/components/NSMessenger.module.css +0 -16
- package/src/components/NSInputCopy.tsx +0 -77
- package/src/components/NSMessenger.module.css +0 -16
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Style from "./NSButtonBlueVector.module.css";
|
|
5
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
5
6
|
|
|
6
|
-
export interface NSButtonBlueVectorProps
|
|
7
|
+
export interface NSButtonBlueVectorProps extends BaseComponentProps
|
|
7
8
|
{
|
|
8
9
|
title: string;
|
|
9
10
|
vector: string;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Style from "./NSButtonGreen.module.css";
|
|
5
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
5
6
|
|
|
6
|
-
export interface NSButtonGreenProps
|
|
7
|
+
export interface NSButtonGreenProps extends BaseComponentProps
|
|
7
8
|
{
|
|
8
9
|
title: string;
|
|
9
10
|
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Style from "./NSButtonRed.module.css";
|
|
5
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
5
6
|
|
|
6
|
-
export interface NSButtonRedProps
|
|
7
|
+
export interface NSButtonRedProps extends BaseComponentProps
|
|
7
8
|
{
|
|
8
9
|
title: string;
|
|
9
10
|
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
@@ -3,8 +3,9 @@ import { Component } from 'react';
|
|
|
3
3
|
import Styles from './NSCard.module.css'
|
|
4
4
|
import { NSLinkBlue } from './NSLinkBlue';
|
|
5
5
|
import { LinkProps } from '../props/LinkProps';
|
|
6
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
6
7
|
|
|
7
|
-
export interface NSCardProps
|
|
8
|
+
export interface NSCardProps extends BaseComponentProps
|
|
8
9
|
{
|
|
9
10
|
id?: string | number;
|
|
10
11
|
title?: string;
|
package/{dist/components/NSInputCopy.module.css → src/components/NSCopyToClipboard.module.css}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.ns_copy_to_clipboard {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 326px;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
max-width: 100%;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.ns_copy_to_clipboard_value {
|
|
11
11
|
border-radius: 8px;
|
|
12
12
|
padding: 10px 12px;
|
|
13
13
|
font-size: 16px;
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
border: 1px solid rgba(20, 27, 92, 1);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.
|
|
20
|
+
.ns_copy_to_clipboard_icon {
|
|
21
21
|
position: absolute;
|
|
22
22
|
right: 20px;
|
|
23
23
|
top: 67%;
|
|
24
24
|
z-index: 1;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.
|
|
27
|
+
.ns_copy_to_clipboard_title {
|
|
28
28
|
font-size: 24px;
|
|
29
29
|
font-weight: 700;
|
|
30
30
|
color:rgba(20, 27, 92, 1);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Styles from "./NSCopyToClipboard.module.css";
|
|
5
|
+
import IconInputString from '../assets/images/icon-input-copy.svg';
|
|
6
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
7
|
+
|
|
8
|
+
export interface NSCopyToClipboardProps extends BaseComponentProps
|
|
9
|
+
{
|
|
10
|
+
title: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface NSCopyToClipboardState
|
|
15
|
+
{ }
|
|
16
|
+
|
|
17
|
+
export class NSCopyToClipboard extends React.Component<NSCopyToClipboardProps, NSCopyToClipboardState>
|
|
18
|
+
{
|
|
19
|
+
constructor(props: NSCopyToClipboardProps)
|
|
20
|
+
{
|
|
21
|
+
super(props);
|
|
22
|
+
this.copyToClipboard = this.copyToClipboard.bind(this);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
copyToClipboard(): void
|
|
26
|
+
{
|
|
27
|
+
if (navigator.clipboard && navigator.clipboard.writeText)
|
|
28
|
+
{
|
|
29
|
+
navigator.clipboard.writeText(this.props.value);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
override render()
|
|
33
|
+
{
|
|
34
|
+
return (
|
|
35
|
+
<div className={`${Styles.ns_copy_to_clipboard} p-2`}>
|
|
36
|
+
<span className={Styles.ns_copy_to_clipboard_title}>{this.props.title}</span>
|
|
37
|
+
<div className={Styles.ns_copy_to_clipboard_value}>
|
|
38
|
+
<img
|
|
39
|
+
className={Styles.ns_copy_to_clipboard_icon}
|
|
40
|
+
src={IconInputString}
|
|
41
|
+
alt="icon"
|
|
42
|
+
width={16}
|
|
43
|
+
height={16}
|
|
44
|
+
onClick={this.copyToClipboard}
|
|
45
|
+
/>
|
|
46
|
+
<span>{this.props.value}</span>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import Styles from './NSEntityBar.module.css'
|
|
5
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
5
6
|
|
|
6
|
-
export interface NSEntityBarProps
|
|
7
|
+
export interface NSEntityBarProps extends BaseComponentProps
|
|
7
8
|
{
|
|
8
9
|
id?: string | number;
|
|
9
10
|
title: string;
|
|
@@ -14,7 +15,8 @@ export interface NSEntityBarProps
|
|
|
14
15
|
},
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
export class NSEntityBar extends Component<NSEntityBarProps>
|
|
18
|
+
export class NSEntityBar extends Component<NSEntityBarProps>
|
|
19
|
+
{
|
|
18
20
|
override render()
|
|
19
21
|
{
|
|
20
22
|
return (
|
|
@@ -5,9 +5,9 @@ import Styles from './NSEntityCardBackground.module.css'
|
|
|
5
5
|
import { BackgroundProps } from '../props/BackgroundProps';
|
|
6
6
|
import { NSLinkBlue } from './NSLinkBlue';
|
|
7
7
|
import { LinkProps } from '../props/LinkProps';
|
|
8
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
export interface NSEntityCardBackgroundProps
|
|
10
|
+
export interface NSEntityCardBackgroundProps extends BaseComponentProps
|
|
11
11
|
{
|
|
12
12
|
id?: string | number;
|
|
13
13
|
title: string;
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSFooter.module.css";
|
|
5
5
|
import { NamirasoftAPILinkServer, FilterLinkRow } from 'namirasoft-api-link';
|
|
6
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
6
7
|
|
|
7
|
-
export interface NSFooterProps
|
|
8
|
+
export interface NSFooterProps extends BaseComponentProps
|
|
8
9
|
{
|
|
9
10
|
scope: string;
|
|
10
11
|
name: string;
|
|
@@ -108,8 +109,8 @@ export class NSFooter extends React.Component<NSFooterProps, NSFooterState>
|
|
|
108
109
|
else if (level === 0)
|
|
109
110
|
{
|
|
110
111
|
return (<>
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
<ul
|
|
113
|
+
key={filter.id}
|
|
113
114
|
id={`dropdown_parent${filter.id}`}>
|
|
114
115
|
{filter.name}
|
|
115
116
|
</ul>
|
|
@@ -119,11 +120,11 @@ export class NSFooter extends React.Component<NSFooterProps, NSFooterState>
|
|
|
119
120
|
else
|
|
120
121
|
{
|
|
121
122
|
return (
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
<li className="mb-2">
|
|
124
|
+
<a key={filter.id} href={filter.link?.url}>
|
|
125
|
+
{filter.name}
|
|
126
|
+
</a>
|
|
127
|
+
</li>
|
|
127
128
|
);
|
|
128
129
|
}
|
|
129
130
|
}
|
|
@@ -5,8 +5,9 @@ import Styles from "./NSHeader.module.css";
|
|
|
5
5
|
import NavDropdown from 'react-bootstrap/NavDropdown';
|
|
6
6
|
import { NamirasoftAPILinkServer, FilterLinkRow } from 'namirasoft-api-link';
|
|
7
7
|
import { BackgroundProps } from "../props/BackgroundProps";
|
|
8
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
8
9
|
|
|
9
|
-
export interface NSHeaderProps
|
|
10
|
+
export interface NSHeaderProps extends BaseComponentProps
|
|
10
11
|
{
|
|
11
12
|
scope: string;
|
|
12
13
|
name: string;
|
|
@@ -93,12 +94,12 @@ export class NSHeader extends React.Component<NSHeaderProps, NSHeaderState>
|
|
|
93
94
|
}
|
|
94
95
|
<div className={Styles.ns_navbar_menu_icon} onClick={this.handleShowNavbar}>
|
|
95
96
|
<img
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
src=
|
|
98
|
+
{
|
|
99
|
+
this.state.showNavbar ?
|
|
100
|
+
"https://static.namirasoft.com/icons/base/close-menu.svg"
|
|
101
|
+
: "https://static.namirasoft.com/icons/base/menu.svg"
|
|
102
|
+
}
|
|
102
103
|
alt="Menu"
|
|
103
104
|
width={19}
|
|
104
105
|
height={17}
|
|
@@ -147,7 +148,7 @@ export class NSHeader extends React.Component<NSHeaderProps, NSHeaderState>
|
|
|
147
148
|
} else
|
|
148
149
|
{
|
|
149
150
|
return (
|
|
150
|
-
|
|
151
|
+
<a key={filter.id} className={`${Styles.ns_navbar_items_link} ${level === 0 ? Styles.ns_navbar_first_level_item : Styles.ns_navbar_second_level_item}`} href={filter.link?.url}>{filter.name}</a>
|
|
151
152
|
);
|
|
152
153
|
}
|
|
153
154
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSInputDate.module.css";
|
|
5
5
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
6
|
+
import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
|
|
6
7
|
|
|
7
8
|
export interface NSInputDateProps extends BaseComponentProps
|
|
8
9
|
{
|
|
@@ -15,14 +16,16 @@ export interface NSInputDateProps extends BaseComponentProps
|
|
|
15
16
|
export interface NSInputDateState
|
|
16
17
|
{
|
|
17
18
|
value: string;
|
|
19
|
+
error?: string;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
export class NSInputDate extends React.Component<NSInputDateProps, NSInputDateState>
|
|
22
|
+
export class NSInputDate extends React.Component<NSInputDateProps, NSInputDateState>
|
|
23
|
+
{
|
|
21
24
|
constructor(props: NSInputDateProps)
|
|
22
25
|
{
|
|
23
26
|
super(props);
|
|
24
27
|
this.state = {
|
|
25
|
-
value: ""
|
|
28
|
+
value: ""
|
|
26
29
|
};
|
|
27
30
|
this.setValue = this.setValue.bind(this);
|
|
28
31
|
this.getValue = this.getValue.bind(this);
|
|
@@ -45,17 +48,21 @@ export class NSInputDate extends React.Component<NSInputDateProps, NSInputDateSt
|
|
|
45
48
|
override render()
|
|
46
49
|
{
|
|
47
50
|
return (
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
<>
|
|
52
|
+
<div className={`${Styles.ns_parent_input} p-2 ${this.props.classList?.join(" ")}`} style={this.props.style}>
|
|
53
|
+
<span className={Styles.ns_input_title}>{this.props.title}</span>
|
|
54
|
+
<input
|
|
55
|
+
value={this.state.value}
|
|
56
|
+
onChange={this.onChanged}
|
|
57
|
+
type="date"
|
|
58
|
+
className={Styles.ns_input}
|
|
59
|
+
placeholder={this.props.placeholder}
|
|
60
|
+
id="ns-input-date"
|
|
61
|
+
onClick={() => { }}
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
<NSInputErrorNotifier error={this.state.error} />
|
|
65
|
+
</>
|
|
59
66
|
);
|
|
60
67
|
}
|
|
61
68
|
}
|
|
@@ -7,8 +7,8 @@ import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
|
7
7
|
|
|
8
8
|
export interface NSInputDurationProps extends BaseComponentProps
|
|
9
9
|
{
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
title: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
12
|
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
13
|
placeholder?: string;
|
|
14
14
|
}
|
|
@@ -18,7 +18,8 @@ export interface NSInputDurationState
|
|
|
18
18
|
value: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export class NSInputDuration extends React.Component<NSInputDurationProps, NSInputDurationState>
|
|
21
|
+
export class NSInputDuration extends React.Component<NSInputDurationProps, NSInputDurationState>
|
|
22
|
+
{
|
|
22
23
|
constructor(props: NSInputDurationProps)
|
|
23
24
|
{
|
|
24
25
|
super(props);
|
|
@@ -28,11 +29,11 @@ export class NSInputDuration extends React.Component<NSInputDurationProps, NSInp
|
|
|
28
29
|
this.getValue = this.getValue.bind(this);
|
|
29
30
|
this.setValue = this.setValue.bind(this);
|
|
30
31
|
this.onChanged = this.onChanged.bind(this);
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
}
|
|
33
|
+
getValue(): string
|
|
33
34
|
{
|
|
34
35
|
return this.state.value;
|
|
35
|
-
|
|
36
|
+
}
|
|
36
37
|
setValue(value: string): void
|
|
37
38
|
{
|
|
38
39
|
this.setState({ value });
|
|
@@ -42,8 +43,8 @@ export class NSInputDuration extends React.Component<NSInputDurationProps, NSInp
|
|
|
42
43
|
this.setValue(e.target.value);
|
|
43
44
|
if (this.props.onChanged)
|
|
44
45
|
this.props.onChanged(e);
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
}
|
|
47
|
+
override render()
|
|
47
48
|
{
|
|
48
49
|
return (
|
|
49
50
|
<div className={`${Styles.ns_input_parent} p-2 ${this.props.classList?.join(" ")}`} style={this.props.style}>
|
|
@@ -57,7 +58,7 @@ export class NSInputDuration extends React.Component<NSInputDurationProps, NSInp
|
|
|
57
58
|
/>
|
|
58
59
|
<input
|
|
59
60
|
value={this.state.value}
|
|
60
|
-
|
|
61
|
+
onChange={this.onChanged}
|
|
61
62
|
type="time"
|
|
62
63
|
className={Styles.ns_input}
|
|
63
64
|
placeholder={this.props.placeholder}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSInputEmail.module.css";
|
|
5
5
|
import IconInputEmail from '../assets/images/icon-input-email.svg';
|
|
6
|
-
import Danger from '../assets/images/danger.svg';
|
|
7
6
|
import { Validator } from "../Validator";
|
|
8
7
|
import { ValidationProps } from "../props/ValidationProps";
|
|
9
8
|
import { ValidationStringProps } from "../props/ValidationStringProps";
|
|
10
9
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
10
|
+
import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
|
|
11
11
|
|
|
12
12
|
export interface NSInputEmailProps extends BaseComponentProps, ValidationProps, ValidationStringProps
|
|
13
13
|
{
|
|
@@ -78,22 +78,7 @@ export class NSInputEmail extends React.Component<NSInputEmailProps, NSInputEmai
|
|
|
78
78
|
placeholder={this.props.placeholder}
|
|
79
79
|
/>
|
|
80
80
|
</div>
|
|
81
|
-
{
|
|
82
|
-
// todo make it a component
|
|
83
|
-
this.state.error && (
|
|
84
|
-
<>
|
|
85
|
-
<div className="d-flex justify-content-start align-items-center gap-2 ms-2">
|
|
86
|
-
<img
|
|
87
|
-
className={""}
|
|
88
|
-
src={Danger}
|
|
89
|
-
alt="Error Icon"
|
|
90
|
-
width={13}
|
|
91
|
-
height={13}
|
|
92
|
-
/>
|
|
93
|
-
<span className={Styles.ns_input_error}>{this.state.error}</span>
|
|
94
|
-
</div>
|
|
95
|
-
</>)
|
|
96
|
-
}
|
|
81
|
+
<NSInputErrorNotifier error={this.state.error} />
|
|
97
82
|
</>
|
|
98
83
|
);
|
|
99
84
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import Styles from "./NSInputErrorNotifier.module.css";
|
|
2
|
+
import Danger from '../assets/images/danger.svg';
|
|
3
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
4
|
+
|
|
5
|
+
export interface NSInputErrorNotifierProps extends BaseComponentProps
|
|
6
|
+
{
|
|
7
|
+
error?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function NSInputErrorNotifier(props: NSInputErrorNotifierProps)
|
|
11
|
+
{
|
|
12
|
+
return <>
|
|
13
|
+
{
|
|
14
|
+
props.error && (
|
|
15
|
+
<div className="d-flex justify-content-start align-items-center gap-2 ms-2">
|
|
16
|
+
<img
|
|
17
|
+
className={""}
|
|
18
|
+
src={Danger}
|
|
19
|
+
alt="Error Icon"
|
|
20
|
+
width={13}
|
|
21
|
+
height={13}
|
|
22
|
+
/>
|
|
23
|
+
<span className={Styles.ns_input_error}>{props.error}</span>
|
|
24
|
+
</div >
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
</>;
|
|
28
|
+
}
|
|
@@ -8,7 +8,7 @@ import { ValidationProps } from "../props/ValidationProps";
|
|
|
8
8
|
import { ValidationNumberProps } from "../props/ValidationNumberProps";
|
|
9
9
|
import { Validator } from "../Validator";
|
|
10
10
|
|
|
11
|
-
export interface NSInputFloatProps extends BaseComponentProps, ValidationProps, ValidationNumberProps
|
|
11
|
+
export interface NSInputFloatProps extends BaseComponentProps, ValidationProps, ValidationNumberProps
|
|
12
12
|
{
|
|
13
13
|
title: string;
|
|
14
14
|
defaultValue?: string;
|
|
@@ -7,8 +7,8 @@ import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
|
7
7
|
|
|
8
8
|
export interface NSInputIPProps extends BaseComponentProps
|
|
9
9
|
{
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
title: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
12
|
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
13
|
placeholder?: string;
|
|
14
14
|
}
|
|
@@ -18,7 +18,8 @@ export interface NSInputIPState
|
|
|
18
18
|
value: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export class NSInputIP extends React.Component<NSInputIPProps, NSInputIPState>
|
|
21
|
+
export class NSInputIP extends React.Component<NSInputIPProps, NSInputIPState>
|
|
22
|
+
{
|
|
22
23
|
constructor(props: NSInputIPProps)
|
|
23
24
|
{
|
|
24
25
|
super(props);
|
|
@@ -18,7 +18,8 @@ export interface NSInputIntegerState
|
|
|
18
18
|
value: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export class NSInputInteger extends React.Component<NSInputIntegerProps, NSInputIntegerState>
|
|
21
|
+
export class NSInputInteger extends React.Component<NSInputIntegerProps, NSInputIntegerState>
|
|
22
|
+
{
|
|
22
23
|
constructor(props: NSInputIntegerProps)
|
|
23
24
|
{
|
|
24
25
|
super(props);
|
|
@@ -18,7 +18,8 @@ export interface NSInputPhoneState
|
|
|
18
18
|
value: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export class NSInputPhone extends React.Component<NSInputPhoneProps, NSInputPhoneState>
|
|
21
|
+
export class NSInputPhone extends React.Component<NSInputPhoneProps, NSInputPhoneState>
|
|
22
|
+
{
|
|
22
23
|
constructor(props: NSInputPhoneProps)
|
|
23
24
|
{
|
|
24
25
|
super(props);
|
|
@@ -17,7 +17,8 @@ export interface NSInputPriceState
|
|
|
17
17
|
value: number | undefined;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export class NSInputPrice extends React.Component<NSInputPriceProps, NSInputPriceState>
|
|
20
|
+
export class NSInputPrice extends React.Component<NSInputPriceProps, NSInputPriceState>
|
|
21
|
+
{
|
|
21
22
|
constructor(props: NSInputPriceProps)
|
|
22
23
|
{
|
|
23
24
|
super(props);
|
|
@@ -6,7 +6,7 @@ import IconInputSearch from '../assets/images/icon-input-search.svg';
|
|
|
6
6
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
7
7
|
|
|
8
8
|
export interface NSInputSearchProps extends BaseComponentProps
|
|
9
|
-
{
|
|
9
|
+
{
|
|
10
10
|
defaultValue?: string;
|
|
11
11
|
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
12
|
placeholder?: string;
|
|
@@ -26,8 +26,8 @@ export class NSInputSearch extends React.Component<NSInputSearchProps, NSInputSe
|
|
|
26
26
|
value: props.defaultValue ?? "",
|
|
27
27
|
};
|
|
28
28
|
this.getValue = this.getValue.bind(this);
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
this.setValue = this.setValue.bind(this);
|
|
30
|
+
this.onChanged = this.onChanged.bind(this);
|
|
31
31
|
}
|
|
32
32
|
getValue(): string
|
|
33
33
|
{
|
|
@@ -18,7 +18,8 @@ export interface NSInputTextState
|
|
|
18
18
|
value: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export class NSInputText extends React.Component<NSInputTextProps, NSInputTextState>
|
|
21
|
+
export class NSInputText extends React.Component<NSInputTextProps, NSInputTextState>
|
|
22
|
+
{
|
|
22
23
|
constructor(props: NSInputTextProps)
|
|
23
24
|
{
|
|
24
25
|
super(props);
|
|
@@ -18,7 +18,8 @@ export interface NSInputTimeState
|
|
|
18
18
|
value: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export class NSInputTime extends React.Component<NSInputTimeProps, NSInputTimeState>
|
|
21
|
+
export class NSInputTime extends React.Component<NSInputTimeProps, NSInputTimeState>
|
|
22
|
+
{
|
|
22
23
|
constructor(props: NSInputTimeProps)
|
|
23
24
|
{
|
|
24
25
|
super(props);
|
|
@@ -4,12 +4,15 @@ import Styles from './NSLayout.module.css';
|
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { NSHeader } from './NSHeader';
|
|
6
6
|
import { NSFooter } from './NSFooter';
|
|
7
|
+
import { BaseComponentProps } from '../props/BaseComponentProps';
|
|
8
|
+
import { NSNotification, NSNotificationProps } from './NSNotification';
|
|
7
9
|
|
|
8
|
-
export interface NSLayoutProps
|
|
10
|
+
export interface NSLayoutProps extends BaseComponentProps
|
|
9
11
|
{
|
|
10
12
|
scope: string;
|
|
11
13
|
logo: string;
|
|
12
14
|
background?: string;
|
|
15
|
+
notifications: NSNotificationProps[];
|
|
13
16
|
children: ReactNode;
|
|
14
17
|
}
|
|
15
18
|
|
|
@@ -18,6 +21,7 @@ export function NSLayout(props: NSLayoutProps)
|
|
|
18
21
|
return (
|
|
19
22
|
<div className={Styles.ns_container}>
|
|
20
23
|
<NSHeader scope={props.scope} name="Header" logo={props.logo} />
|
|
24
|
+
{props.notifications.map(props => <NSNotification {...props}></NSNotification>)}
|
|
21
25
|
<main className="d-flex flex-column text-white" style={{ background: props.background }}>
|
|
22
26
|
{props.children}
|
|
23
27
|
</main>
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { NSLayout } from './NSLayout';
|
|
4
|
+
import { NSLayout, NSLayoutProps } from './NSLayout';
|
|
5
5
|
import Styles from './NSLayoutHeroBanner.module.css'
|
|
6
6
|
import { Link } from 'react-router-dom';
|
|
7
|
-
|
|
7
|
+
import { BaseComponentProps } from '../props/BaseComponentProps';
|
|
8
8
|
|
|
9
|
-
export interface NSLayoutHeroBannerProps
|
|
9
|
+
export interface NSLayoutHeroBannerProps extends NSLayoutProps, BaseComponentProps
|
|
10
10
|
{
|
|
11
|
-
scope: string;
|
|
12
|
-
logo: string;
|
|
13
11
|
title: string;
|
|
14
12
|
description?: string;
|
|
15
13
|
description_last?: string;
|
|
@@ -20,7 +18,7 @@ export interface NSLayoutHeroBannerProps
|
|
|
20
18
|
export function NSLayoutHeroBanner(props: NSLayoutHeroBannerProps)
|
|
21
19
|
{
|
|
22
20
|
return (
|
|
23
|
-
<NSLayout
|
|
21
|
+
<NSLayout {...props} >
|
|
24
22
|
<div className={Styles.hero_holder}>
|
|
25
23
|
{/* <NSHeader name='Header' scope='Namira Software Corporation' logo='https://static.namirasoft.com/logo/namirasoft/base.png' /> */}
|
|
26
24
|
<section className={Styles.hero_wraper}>
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
import Styles from './NSLayoutTitle.module.css';
|
|
4
4
|
import { Component } from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
|
-
import { NSLayout } from './NSLayout';
|
|
6
|
+
import { NSLayout, NSLayoutProps } from './NSLayout';
|
|
7
7
|
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
8
|
+
import { BaseComponentProps } from '../props/BaseComponentProps';
|
|
8
9
|
|
|
9
|
-
export interface NSLayoutTitleProps
|
|
10
|
+
export interface NSLayoutTitleProps extends NSLayoutProps, BaseComponentProps
|
|
10
11
|
{
|
|
11
|
-
scope: string;
|
|
12
|
-
logo: string;
|
|
13
|
-
background?: string;
|
|
14
12
|
title: string;
|
|
15
13
|
description?: string;
|
|
16
14
|
children: ReactNode;
|
|
@@ -22,7 +20,7 @@ export class NSLayoutTitle extends Component<NSLayoutTitleProps>
|
|
|
22
20
|
{
|
|
23
21
|
let lines = (this.props.description ?? "").split(/(\n|\\n|<br>|<br\s*\/>)/gm);
|
|
24
22
|
return (
|
|
25
|
-
<NSLayout
|
|
23
|
+
<NSLayout {...this.props}>
|
|
26
24
|
<NSSpace size={NSSpaceSizeType.SMALL}></NSSpace>
|
|
27
25
|
<div>
|
|
28
26
|
<h1 className={Styles.title}>{this.props.title}</h1>
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
3
4
|
import { LinkProps } from "../props/LinkProps";
|
|
4
5
|
import Styles from "./NSLinkBlue.module.css";
|
|
5
6
|
import React from "react";
|
|
6
7
|
|
|
7
|
-
export interface NSLinkBlueProps extends LinkProps
|
|
8
|
+
export interface NSLinkBlueProps extends LinkProps, BaseComponentProps
|
|
8
9
|
{
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface NSLinkBlueState extends LinkProps
|
|
13
13
|
{
|
|
14
|
-
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
export class NSLinkBlue extends React.Component<NSLinkBlueProps, NSLinkBlueState>
|