namirasoft-site-react 1.3.60 → 1.3.62
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/Validator.d.ts +7 -2
- package/dist/Validator.js +57 -15
- package/dist/Validator.js.map +1 -1
- package/dist/components/NSButton.d.ts +0 -9
- package/dist/components/NSButton.js +2 -9
- package/dist/components/NSButton.js.map +1 -1
- package/dist/components/NSButton.module.css +8 -7
- package/dist/components/NSButtonBlue.d.ts +2 -14
- package/dist/components/NSButtonBlue.js +7 -13
- package/dist/components/NSButtonBlue.js.map +1 -1
- package/dist/components/NSButtonBlue.module.css +0 -8
- package/dist/components/NSButtonGreen.d.ts +2 -14
- package/dist/components/NSButtonGreen.js +7 -13
- package/dist/components/NSButtonGreen.js.map +1 -1
- package/dist/components/NSButtonGreen.module.css +0 -8
- package/dist/components/NSButtonRed.d.ts +2 -14
- package/dist/components/NSButtonRed.js +8 -14
- package/dist/components/NSButtonRed.js.map +1 -1
- package/dist/components/NSButtonRed.module.css +0 -8
- package/dist/components/NSCard.d.ts +3 -9
- package/dist/components/NSCard.js +12 -16
- package/dist/components/NSCard.js.map +1 -1
- package/dist/components/NSCopyToClipboard.d.ts +1 -8
- package/dist/components/NSCopyToClipboard.js +6 -14
- package/dist/components/NSCopyToClipboard.js.map +1 -1
- package/dist/components/NSCopyToClipboard.module.css +1 -1
- package/dist/components/NSEntityBar.d.ts +3 -9
- package/dist/components/NSEntityBar.js +3 -6
- package/dist/components/NSEntityBar.js.map +1 -1
- package/dist/components/NSEntityBar.module.css +1 -1
- package/dist/components/NSEntityCardBackground.d.ts +1 -11
- package/dist/components/NSEntityCardBackground.js +4 -23
- package/dist/components/NSEntityCardBackground.js.map +1 -1
- package/dist/components/NSFooter.js +2 -1
- package/dist/components/NSFooter.js.map +1 -1
- package/dist/components/NSHeader.d.ts +1 -2
- package/dist/components/NSHeader.js +9 -4
- package/dist/components/NSHeader.js.map +1 -1
- package/dist/components/NSInput.module.css +29 -0
- package/dist/components/NSInputDate.d.ts +3 -1
- package/dist/components/NSInputDate.js +14 -4
- package/dist/components/NSInputDate.js.map +1 -1
- package/dist/components/NSInputDate.module.css +4 -1
- package/dist/components/NSInputDuration.d.ts +6 -1
- package/dist/components/NSInputDuration.js +15 -6
- package/dist/components/NSInputDuration.js.map +1 -1
- package/dist/components/NSInputEmail.d.ts +1 -1
- package/dist/components/NSInputEmail.js +5 -3
- package/dist/components/NSInputEmail.js.map +1 -1
- package/dist/components/NSInputFloat.d.ts +4 -4
- package/dist/components/NSInputFloat.js +8 -9
- package/dist/components/NSInputFloat.js.map +1 -1
- package/dist/components/NSInputIP.d.ts +5 -1
- package/dist/components/NSInputIP.js +17 -7
- package/dist/components/NSInputIP.js.map +1 -1
- package/dist/components/NSInputInteger.d.ts +9 -5
- package/dist/components/NSInputInteger.js +16 -8
- package/dist/components/NSInputInteger.js.map +1 -1
- package/dist/components/NSInputPassword.d.ts +5 -1
- package/dist/components/NSInputPassword.js +15 -6
- package/dist/components/NSInputPassword.js.map +1 -1
- package/dist/components/NSInputPhone.d.ts +8 -3
- package/dist/components/NSInputPhone.js +18 -12
- package/dist/components/NSInputPhone.js.map +1 -1
- package/dist/components/NSInputPrice.d.ts +7 -2
- package/dist/components/NSInputPrice.js +15 -7
- package/dist/components/NSInputPrice.js.map +1 -1
- package/dist/components/NSInputSearch.d.ts +6 -1
- package/dist/components/NSInputSearch.js +15 -6
- package/dist/components/NSInputSearch.js.map +1 -1
- package/dist/components/NSInputString.d.ts +5 -1
- package/dist/components/NSInputString.js +15 -6
- package/dist/components/NSInputString.js.map +1 -1
- package/dist/components/NSInputText.d.ts +5 -1
- package/dist/components/NSInputText.js +15 -6
- package/dist/components/NSInputText.js.map +1 -1
- package/dist/components/NSInputTime.d.ts +5 -1
- package/dist/components/NSInputTime.js +16 -6
- package/dist/components/NSInputTime.js.map +1 -1
- package/dist/components/NSLayout.js +2 -2
- package/dist/components/NSLayout.js.map +1 -1
- package/dist/components/NSLayoutHeroBanner.js.map +1 -1
- package/dist/components/NSLinkBlue.d.ts +1 -9
- package/dist/components/NSLinkBlue.js +3 -17
- package/dist/components/NSLinkBlue.js.map +1 -1
- package/dist/components/NSLoading.d.ts +1 -6
- package/dist/components/NSLoading.js +2 -6
- package/dist/components/NSLoading.js.map +1 -1
- package/dist/components/NSNotification.js +2 -2
- package/dist/components/NSNotification.js.map +1 -1
- package/dist/components/NSPagination.d.ts +1 -1
- package/dist/components/NSPagination.js +2 -1
- package/dist/components/NSPagination.js.map +1 -1
- package/dist/components/NSPanel.d.ts +2 -7
- package/dist/components/NSPanel.js +3 -9
- package/dist/components/NSPanel.js.map +1 -1
- package/dist/components/NSSection.d.ts +2 -10
- package/dist/components/NSSection.js +6 -25
- package/dist/components/NSSection.js.map +1 -1
- package/dist/components/NSSectionBars.d.ts +2 -6
- package/dist/components/NSSectionBars.js +4 -8
- package/dist/components/NSSectionBars.js.map +1 -1
- package/dist/components/NSSectionCards.d.ts +4 -14
- package/dist/components/NSSectionCards.js +7 -11
- package/dist/components/NSSectionCards.js.map +1 -1
- package/dist/components/NSSectionTitle.d.ts +3 -10
- package/dist/components/NSSectionTitle.js +2 -6
- package/dist/components/NSSectionTitle.js.map +1 -1
- package/dist/components/NSSelectBox.d.ts +6 -3
- package/dist/components/NSSelectBox.js +21 -6
- package/dist/components/NSSelectBox.js.map +1 -1
- package/dist/components/NSSpace.js +2 -1
- package/dist/components/NSSpace.js.map +1 -1
- package/dist/components/NSTable.js +2 -1
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTitle.d.ts +1 -6
- package/dist/components/NSTitle.js +3 -6
- package/dist/components/NSTitle.js.map +1 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -1
- package/dist/main.js.map +1 -1
- package/dist/pages/NSLoginPage.d.ts +2 -3
- package/dist/pages/NSLoginPage.js +4 -3
- package/dist/pages/NSLoginPage.js.map +1 -1
- package/dist/props/BaseComponentProps.d.ts +1 -0
- package/dist/props/ValidationNumberProps.d.ts +1 -2
- package/dist/props/ValidationProps.d.ts +1 -0
- package/dist/props/ValidationStringProps.d.ts +1 -2
- package/package.json +3 -4
- package/src/App.tsx +14 -4
- package/src/Validator.ts +67 -18
- package/src/components/NSButton.module.css +8 -7
- package/src/components/NSButton.tsx +6 -24
- package/src/components/NSButtonBlue.module.css +0 -8
- package/src/components/NSButtonBlue.tsx +8 -28
- package/src/components/NSButtonGreen.module.css +0 -8
- package/src/components/NSButtonGreen.tsx +8 -29
- package/src/components/NSButtonRed.module.css +0 -8
- package/src/components/NSButtonRed.tsx +9 -30
- package/src/components/NSCard.tsx +49 -56
- package/src/components/NSCopyToClipboard.module.css +1 -1
- package/src/components/NSCopyToClipboard.tsx +21 -35
- package/src/components/NSEntityBar.module.css +1 -1
- package/src/components/NSEntityBar.tsx +17 -23
- package/src/components/NSEntityCardBackground.tsx +22 -56
- package/src/components/NSFooter.tsx +4 -1
- package/src/components/NSHeader.tsx +16 -7
- package/src/components/NSInput.module.css +29 -0
- package/src/components/NSInputDate.module.css +4 -1
- package/src/components/NSInputDate.tsx +29 -10
- package/src/components/NSInputDuration.tsx +44 -23
- package/src/components/NSInputEmail.tsx +10 -5
- package/src/components/NSInputFloat.tsx +33 -32
- package/src/components/NSInputIP.tsx +44 -24
- package/src/components/NSInputInteger.tsx +48 -31
- package/src/components/NSInputPassword.tsx +42 -23
- package/src/components/NSInputPhone.tsx +45 -29
- package/src/components/NSInputPrice.tsx +45 -23
- package/src/components/NSInputSearch.tsx +43 -21
- package/src/components/NSInputString.tsx +42 -23
- package/src/components/NSInputText.tsx +42 -23
- package/src/components/NSInputTime.tsx +44 -23
- package/src/components/NSLayout.tsx +3 -3
- package/src/components/NSLayoutHeroBanner.tsx +0 -1
- package/src/components/NSLinkBlue.tsx +12 -32
- package/src/components/NSLoading.tsx +8 -17
- package/src/components/NSNotification.tsx +19 -14
- package/src/components/NSPagination.tsx +4 -3
- package/src/components/NSPanel.tsx +10 -21
- package/src/components/NSSection.tsx +13 -39
- package/src/components/NSSectionBars.tsx +13 -22
- package/src/components/NSSectionCards.tsx +30 -45
- package/src/components/NSSectionTitle.tsx +10 -20
- package/src/components/NSSelectBox.tsx +48 -23
- package/src/components/NSSpace.tsx +3 -1
- package/src/components/NSTable.tsx +6 -4
- package/src/components/NSTitle.tsx +10 -15
- package/src/main.ts +0 -1
- package/src/pages/NSLoginPage.tsx +8 -6
- package/src/props/BaseComponentProps.ts +1 -0
- package/src/props/ValidationNumberProps.ts +1 -3
- package/src/props/ValidationProps.ts +1 -0
- package/src/props/ValidationStringProps.ts +1 -3
- package/dist/components/NSButtonBlueVector.d.ts +0 -16
- package/dist/components/NSButtonBlueVector.js +0 -17
- package/dist/components/NSButtonBlueVector.js.map +0 -1
- package/dist/components/NSButtonBlueVector.module.css +0 -17
- package/dist/components/NSInputDuration.module.css +0 -26
- package/dist/components/NSInputEmail.module.css +0 -38
- package/dist/components/NSInputFloat.module.css +0 -26
- package/dist/components/NSInputIP.module.css +0 -26
- package/dist/components/NSInputInteger.module.css +0 -26
- package/dist/components/NSInputPassword.module.css +0 -27
- package/dist/components/NSInputPhone.module.css +0 -33
- package/dist/components/NSInputPrice.module.css +0 -27
- package/dist/components/NSInputSearch.module.css +0 -27
- package/dist/components/NSInputString.module.css +0 -27
- package/dist/components/NSInputText.module.css +0 -28
- package/dist/components/NSInputTime.module.css +0 -27
- package/dist/props/BackgroundProps.d.ts +0 -6
- package/dist/props/BackgroundProps.js +0 -2
- package/dist/props/BackgroundProps.js.map +0 -1
- package/dist/props/NSButtonProps.d.ts +0 -11
- package/dist/props/NSButtonProps.js +0 -2
- package/dist/props/NSButtonProps.js.map +0 -1
- package/src/components/NSButtonBlueVector.module.css +0 -17
- package/src/components/NSButtonBlueVector.tsx +0 -42
- package/src/components/NSInputDuration.module.css +0 -26
- package/src/components/NSInputEmail.module.css +0 -38
- package/src/components/NSInputFloat.module.css +0 -26
- package/src/components/NSInputIP.module.css +0 -26
- package/src/components/NSInputInteger.module.css +0 -26
- package/src/components/NSInputPassword.module.css +0 -27
- package/src/components/NSInputPhone.module.css +0 -33
- package/src/components/NSInputPrice.module.css +0 -27
- package/src/components/NSInputSearch.module.css +0 -27
- package/src/components/NSInputString.module.css +0 -27
- package/src/components/NSInputText.module.css +0 -28
- package/src/components/NSInputTime.module.css +0 -27
- package/src/props/BackgroundProps.ts +0 -7
- package/src/props/NSButtonProps.ts +0 -12
|
@@ -1,33 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import NSButton from "./NSButton";
|
|
2
|
+
import Style from "./NSButtonGreen.module.css";
|
|
3
|
+
import { NSButtonProps } from "./NSButton";
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
import Style from "./NSButtonRed.module.css";
|
|
5
|
-
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
6
|
-
|
|
7
|
-
export interface NSButtonRedProps extends BaseComponentProps
|
|
8
|
-
{
|
|
9
|
-
title: string;
|
|
10
|
-
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface NSButtonRedState
|
|
14
|
-
{
|
|
15
|
-
title: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export class NSButtonRed extends React.Component<NSButtonRedProps, NSButtonRedState>
|
|
5
|
+
export function NSButtonRed(props: NSButtonProps)
|
|
19
6
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
setTitle(title: string)
|
|
26
|
-
{
|
|
27
|
-
this.setState({ title });
|
|
28
|
-
}
|
|
29
|
-
override render()
|
|
30
|
-
{
|
|
31
|
-
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_red}>{this.state.title}</button>;
|
|
32
|
-
}
|
|
7
|
+
let classList = []
|
|
8
|
+
if (props.classList)
|
|
9
|
+
classList.push(...props.classList);
|
|
10
|
+
classList.push(Style.ns_button_red);
|
|
11
|
+
return <NSButton title={props.title} icon={props.icon} onClick={props.onClick} id={props.id} classList={classList} style={props.style} />;
|
|
33
12
|
}
|
|
@@ -1,75 +1,68 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Component } from 'react';
|
|
3
1
|
import Styles from './NSCard.module.css'
|
|
4
2
|
import { NSLinkBlue } from './NSLinkBlue';
|
|
5
3
|
import { LinkProps } from '../props/LinkProps';
|
|
6
4
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
5
|
+
import { ImageProps } from '../props/ImageProps';
|
|
7
6
|
|
|
8
7
|
export interface NSCardProps extends BaseComponentProps
|
|
9
8
|
{
|
|
10
|
-
id?: string | number;
|
|
11
9
|
title?: string;
|
|
12
10
|
headline?: {
|
|
13
11
|
color?: string;
|
|
14
12
|
text: string;
|
|
15
13
|
}
|
|
16
14
|
description?: string;
|
|
17
|
-
image:
|
|
18
|
-
|
|
19
|
-
alt: string;
|
|
20
|
-
};
|
|
21
|
-
link?: LinkProps
|
|
15
|
+
image: ImageProps;
|
|
16
|
+
link?: LinkProps;
|
|
22
17
|
}
|
|
23
18
|
|
|
24
|
-
export
|
|
19
|
+
export function NSCard(props: NSCardProps)
|
|
25
20
|
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
21
|
+
return (
|
|
22
|
+
<article id={props.id}
|
|
23
|
+
className={`${Styles.ns_card} ${props.classList?.join(" ")}`}
|
|
24
|
+
style={props.style}
|
|
25
|
+
>
|
|
26
|
+
<div className={Styles.ns_card_detail_container}>
|
|
27
|
+
<div className={Styles.ns_card_title_img}
|
|
28
|
+
style={{
|
|
29
|
+
alignItems: props.description ? "flex-start" : "center",
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<img className={Styles.ns_card_img} {...props.image} />
|
|
33
|
+
<span className={Styles.ns_card_headline} style={{ color: props.headline?.color }}> {props.headline?.text} </span>
|
|
34
|
+
<h3 className={Styles.ns_card_title}>
|
|
35
|
+
{props.title}
|
|
36
|
+
</h3>
|
|
37
|
+
</div>
|
|
38
|
+
{
|
|
39
|
+
props.description &&
|
|
40
|
+
<p className={Styles.ns_card_description}>
|
|
41
|
+
{props.description}
|
|
42
|
+
</p>
|
|
43
|
+
}
|
|
44
|
+
</div>
|
|
45
|
+
{
|
|
46
|
+
props.link ?
|
|
47
|
+
props.link.title ?
|
|
48
|
+
<div className={Styles.ns_card_link_container}>
|
|
49
|
+
<NSLinkBlue
|
|
50
|
+
title={props.link.title}
|
|
51
|
+
href={props.link.href}
|
|
52
|
+
target={props.link.target}
|
|
53
|
+
style={{ marginTop: "24px" }}
|
|
54
|
+
/>
|
|
42
55
|
</div>
|
|
43
|
-
|
|
44
|
-
{this.props.description &&
|
|
45
|
-
<p className={Styles.ns_card_description}>
|
|
46
|
-
{this.props.description}
|
|
47
|
-
</p>
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
</div>
|
|
51
|
-
{this.props.link ?
|
|
52
|
-
this.props.link.title ?
|
|
53
|
-
<div className={Styles.ns_card_link_container}>
|
|
54
|
-
<NSLinkBlue
|
|
55
|
-
title={this.props.link.title}
|
|
56
|
-
href={this.props.link.href}
|
|
57
|
-
target={this.props.link.target}
|
|
58
|
-
style={{ marginTop: "24px" }}
|
|
59
|
-
/>
|
|
60
|
-
</div>
|
|
61
|
-
:
|
|
62
|
-
<div className={Styles.ns_card_link_container}>
|
|
63
|
-
<NSLinkBlue
|
|
64
|
-
href={this.props.link.href}
|
|
65
|
-
target={this.props.link.target}
|
|
66
|
-
/>
|
|
67
|
-
</div>
|
|
68
56
|
:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
<div className={Styles.ns_card_link_container}>
|
|
58
|
+
<NSLinkBlue
|
|
59
|
+
href={props.link.href}
|
|
60
|
+
target={props.link.target}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
:
|
|
64
|
+
<></>
|
|
65
|
+
}
|
|
66
|
+
</article >
|
|
67
|
+
);
|
|
75
68
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
1
|
import Styles from "./NSCopyToClipboard.module.css";
|
|
5
2
|
import IconInputString from '../assets/images/icon-input-copy.svg';
|
|
6
3
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
@@ -11,41 +8,30 @@ export interface NSCopyToClipboardProps extends BaseComponentProps
|
|
|
11
8
|
value: string;
|
|
12
9
|
}
|
|
13
10
|
|
|
14
|
-
export
|
|
15
|
-
{ }
|
|
16
|
-
|
|
17
|
-
export class NSCopyToClipboard extends React.Component<NSCopyToClipboardProps, NSCopyToClipboardState>
|
|
11
|
+
export function NSCopyToClipboard(props: NSCopyToClipboardProps)
|
|
18
12
|
{
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
super(props);
|
|
22
|
-
this.copyToClipboard = this.copyToClipboard.bind(this);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
copyToClipboard(): void
|
|
13
|
+
function copyToClipboard(): void
|
|
26
14
|
{
|
|
27
15
|
if (navigator.clipboard && navigator.clipboard.writeText)
|
|
28
|
-
|
|
29
|
-
navigator.clipboard.writeText(this.props.value);
|
|
30
|
-
}
|
|
16
|
+
navigator.clipboard.writeText(props.value);
|
|
31
17
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</
|
|
18
|
+
return (
|
|
19
|
+
<div id={props.id}
|
|
20
|
+
className={`${Styles.ns_copy_to_clipboard} p-2 ${props.classList?.join(" ")}`}
|
|
21
|
+
style={props.style}
|
|
22
|
+
>
|
|
23
|
+
<span className={Styles.ns_copy_to_clipboard_title}>{props.title}</span>
|
|
24
|
+
<div className={Styles.ns_copy_to_clipboard_value}>
|
|
25
|
+
<img
|
|
26
|
+
className={Styles.ns_copy_to_clipboard_icon}
|
|
27
|
+
src={IconInputString}
|
|
28
|
+
alt="icon"
|
|
29
|
+
width={16}
|
|
30
|
+
height={16}
|
|
31
|
+
onClick={copyToClipboard}
|
|
32
|
+
/>
|
|
33
|
+
<span>{props.value}</span>
|
|
48
34
|
</div>
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
51
37
|
}
|
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Component } from 'react';
|
|
4
1
|
import Styles from './NSEntityBar.module.css'
|
|
5
2
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
3
|
+
import { ImageProps } from '../props/ImageProps';
|
|
6
4
|
|
|
7
5
|
export interface NSEntityBarProps extends BaseComponentProps
|
|
8
6
|
{
|
|
9
|
-
id?: string | number;
|
|
10
7
|
title: string;
|
|
11
8
|
description: string;
|
|
12
|
-
image:
|
|
13
|
-
src: string;
|
|
14
|
-
alt: string;
|
|
15
|
-
},
|
|
9
|
+
image: ImageProps;
|
|
16
10
|
}
|
|
17
11
|
|
|
18
|
-
export
|
|
12
|
+
export function NSEntityBar(props: NSEntityBarProps)
|
|
19
13
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</
|
|
31
|
-
</
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
return (
|
|
15
|
+
<article id={props.id}
|
|
16
|
+
className={`${Styles.ns_entity_bar_item} ${props.classList?.join(" ")}`}
|
|
17
|
+
style={props.style}
|
|
18
|
+
>
|
|
19
|
+
<figure className={Styles.ns_entity_bar_image_container}>
|
|
20
|
+
<img className={Styles.ns_entity_bar_image} {...props.image} width={256} height={256} />
|
|
21
|
+
</figure>
|
|
22
|
+
<div className={Styles.ns_entity_bar_details_container}>
|
|
23
|
+
<h3 className={Styles.ns_entity_bar_image_title}> {props.title} </h3>
|
|
24
|
+
<p className={Styles.ns_entity_bar_image_description} > {props.description} </p>
|
|
25
|
+
</div>
|
|
26
|
+
</article>
|
|
27
|
+
);
|
|
34
28
|
}
|
|
@@ -1,69 +1,35 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Component } from 'react';
|
|
4
1
|
import Styles from './NSEntityCardBackground.module.css'
|
|
5
|
-
import { BackgroundProps } from '../props/BackgroundProps';
|
|
6
2
|
import { NSLinkBlue } from './NSLinkBlue';
|
|
7
3
|
import { LinkProps } from '../props/LinkProps';
|
|
8
4
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
9
5
|
|
|
10
6
|
export interface NSEntityCardBackgroundProps extends BaseComponentProps
|
|
11
7
|
{
|
|
12
|
-
id?: string | number;
|
|
13
8
|
title: string;
|
|
14
9
|
link?: LinkProps
|
|
15
|
-
|
|
16
|
-
background?: BackgroundProps;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface NSEntityCardBackgroundState
|
|
20
|
-
{
|
|
21
|
-
background?: BackgroundProps;
|
|
22
10
|
}
|
|
23
11
|
|
|
24
|
-
export
|
|
12
|
+
export function NSEntityCardBackground(props: NSEntityCardBackgroundProps)
|
|
25
13
|
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
backgroundColor: this.state.background?.color,
|
|
48
|
-
backgroundPosition: this.state.background?.position
|
|
49
|
-
}}
|
|
50
|
-
>
|
|
51
|
-
|
|
52
|
-
<p className={Styles.card_background_text}>
|
|
53
|
-
{this.props.title}
|
|
54
|
-
</p>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
{this.props.link &&
|
|
58
|
-
<div className={Styles.ns_card_link_container}>
|
|
59
|
-
<NSLinkBlue
|
|
60
|
-
href={this.props.link.href}
|
|
61
|
-
target={this.props.link.target}
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
64
|
-
}
|
|
65
|
-
</article >
|
|
66
|
-
</>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<article id={props.id}
|
|
17
|
+
className={`${Styles.card_background} ${props.classList?.join(" ")}`}
|
|
18
|
+
style={props.style}
|
|
19
|
+
>
|
|
20
|
+
<p className={Styles.card_background_text}>
|
|
21
|
+
{props.title}
|
|
22
|
+
</p>
|
|
23
|
+
{
|
|
24
|
+
props.link &&
|
|
25
|
+
<div className={Styles.ns_card_link_container}>
|
|
26
|
+
<NSLinkBlue
|
|
27
|
+
href={props.link.href}
|
|
28
|
+
target={props.link.target}
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
}
|
|
32
|
+
</article >
|
|
33
|
+
</>
|
|
34
|
+
);
|
|
69
35
|
}
|
|
@@ -46,7 +46,10 @@ export class NSFooter extends React.Component<NSFooterProps, NSFooterState>
|
|
|
46
46
|
override render()
|
|
47
47
|
{
|
|
48
48
|
return (
|
|
49
|
-
<footer
|
|
49
|
+
<footer id={this.props.id}
|
|
50
|
+
className={`${Styles.ns_footer} ${this.props.classList?.join(" ")}`}
|
|
51
|
+
style={this.props.style}
|
|
52
|
+
>
|
|
50
53
|
<div className={`container ${Styles.ns_package_footer}`}>
|
|
51
54
|
<div className={`${Styles.ns_footer_parent_items}`}>
|
|
52
55
|
<div className={`${Styles.ns_footer_project_logo_tablet}`}>
|
|
@@ -4,7 +4,6 @@ import React from "react";
|
|
|
4
4
|
import Styles from "./NSHeader.module.css";
|
|
5
5
|
import NavDropdown from 'react-bootstrap/NavDropdown';
|
|
6
6
|
import { NamirasoftAPILinkServer, FilterLinkRow } from 'namirasoft-api-link';
|
|
7
|
-
import { BackgroundProps } from "../props/BackgroundProps";
|
|
8
7
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
9
8
|
|
|
10
9
|
export interface NSHeaderProps extends BaseComponentProps
|
|
@@ -13,7 +12,7 @@ export interface NSHeaderProps extends BaseComponentProps
|
|
|
13
12
|
name: string;
|
|
14
13
|
logo: string;
|
|
15
14
|
account?: boolean;
|
|
16
|
-
|
|
15
|
+
nav?: BaseComponentProps
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
export interface NSHeaderState
|
|
@@ -62,12 +61,22 @@ export class NSHeader extends React.Component<NSHeaderProps, NSHeaderState>
|
|
|
62
61
|
}
|
|
63
62
|
override render()
|
|
64
63
|
{
|
|
64
|
+
let nav: BaseComponentProps | undefined = this.props.nav;
|
|
65
|
+
if (!nav)
|
|
66
|
+
nav = { style: {} };
|
|
67
|
+
if (!nav.style)
|
|
68
|
+
nav.style = {};
|
|
69
|
+
if (!nav.style?.backgroundColor)
|
|
70
|
+
nav.style.backgroundColor = "rgba(20, 27, 92, 1)";
|
|
65
71
|
return (
|
|
66
|
-
<header
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
<header id={this.props.id}
|
|
73
|
+
className={`${Styles.ns_header} ${this.props.classList?.join(" ")}`}
|
|
74
|
+
style={this.props.style}
|
|
75
|
+
>
|
|
76
|
+
<nav
|
|
77
|
+
id={this.props.nav?.id}
|
|
78
|
+
className={`${Styles.ns_navbar} ${this.props.nav?.classList?.join(" ")}`}
|
|
79
|
+
style={nav?.style}
|
|
71
80
|
>
|
|
72
81
|
<div className={`${Styles.ns_navbar_parent_content} container`}>
|
|
73
82
|
<a href="/">
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
border: 1px solid rgba(47, 0, 236, 0.6);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ns_input_icon {
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: 20px;
|
|
22
|
+
top: 51%;
|
|
23
|
+
z-index: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ns_input_title {
|
|
27
|
+
font-size: 16px;
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
.
|
|
1
|
+
.ns_input_parent {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 326px;
|
|
5
5
|
color: #fff;
|
|
6
6
|
position: relative;
|
|
7
7
|
max-width: 100%;
|
|
8
|
+
padding: 8px;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.ns_input {
|
|
@@ -12,12 +13,14 @@
|
|
|
12
13
|
padding: 10px 12px;
|
|
13
14
|
font-size: 16px;
|
|
14
15
|
font-weight: 400;
|
|
16
|
+
border: 1px solid rgba(47, 0, 236, 0.6);
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.ns_input_icon {
|
|
18
20
|
position: absolute;
|
|
19
21
|
right: 20px;
|
|
20
22
|
top: 51%;
|
|
23
|
+
z-index: 1;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
.ns_input_title {
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSInputDate.module.css";
|
|
5
|
+
import IconInputDate from '../assets/images/icon-input-date.svg';
|
|
5
6
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
6
7
|
import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
|
|
8
|
+
import { ValidationProps } from "../props/ValidationProps";
|
|
9
|
+
import { Validator } from "../Validator";
|
|
7
10
|
|
|
8
|
-
export interface NSInputDateProps extends BaseComponentProps
|
|
11
|
+
export interface NSInputDateProps extends BaseComponentProps, ValidationProps
|
|
9
12
|
{
|
|
10
13
|
title: string;
|
|
11
14
|
defaultValue?: string;
|
|
@@ -24,15 +27,26 @@ export class NSInputDate extends React.Component<NSInputDateProps, NSInputDateSt
|
|
|
24
27
|
constructor(props: NSInputDateProps)
|
|
25
28
|
{
|
|
26
29
|
super(props);
|
|
27
|
-
this.state = {
|
|
28
|
-
value: ""
|
|
29
|
-
};
|
|
30
|
+
this.state = { value: props.defaultValue ?? "" };
|
|
30
31
|
this.setValue = this.setValue.bind(this);
|
|
31
32
|
this.getValue = this.getValue.bind(this);
|
|
32
33
|
this.onChanged = this.onChanged.bind(this);
|
|
33
34
|
}
|
|
35
|
+
getError(): string | null
|
|
36
|
+
{
|
|
37
|
+
return (
|
|
38
|
+
Validator.getError(this.props.title, this.state.value, this.props) &&
|
|
39
|
+
Validator.getErrorDate(this.props.title, this.state.value)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
34
42
|
getValue(): string
|
|
35
43
|
{
|
|
44
|
+
let error = this.getError();
|
|
45
|
+
if (error)
|
|
46
|
+
{
|
|
47
|
+
this.setState({ error });
|
|
48
|
+
throw new Error(error);
|
|
49
|
+
}
|
|
36
50
|
return this.state.value;
|
|
37
51
|
}
|
|
38
52
|
setValue(value: string): void
|
|
@@ -49,15 +63,22 @@ export class NSInputDate extends React.Component<NSInputDateProps, NSInputDateSt
|
|
|
49
63
|
{
|
|
50
64
|
return (
|
|
51
65
|
<>
|
|
52
|
-
<div className={`${Styles.
|
|
53
|
-
<span className={Styles.ns_input_title}>{this.props.title}</span>
|
|
66
|
+
<div className={`${Styles.ns_input_parent} p-2 ${this.props.classList?.join(" ")}`} style={this.props.style}>
|
|
67
|
+
<span className={Styles.ns_input_title}> {this.props.required && <span style={{ color: "red" }} >*</span>} {this.props.title} </span>
|
|
68
|
+
<img
|
|
69
|
+
className={Styles.ns_input_icon}
|
|
70
|
+
src={IconInputDate}
|
|
71
|
+
alt="Date Icon"
|
|
72
|
+
width={24}
|
|
73
|
+
height={24}
|
|
74
|
+
/>
|
|
54
75
|
<input
|
|
76
|
+
id={this.props.id}
|
|
55
77
|
value={this.state.value}
|
|
56
78
|
onChange={this.onChanged}
|
|
57
79
|
type="date"
|
|
58
80
|
className={Styles.ns_input}
|
|
59
81
|
placeholder={this.props.placeholder}
|
|
60
|
-
id="ns-input-date"
|
|
61
82
|
onClick={() => { }}
|
|
62
83
|
/>
|
|
63
84
|
</div>
|
|
@@ -65,6 +86,4 @@ export class NSInputDate extends React.Component<NSInputDateProps, NSInputDateSt
|
|
|
65
86
|
</>
|
|
66
87
|
);
|
|
67
88
|
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
89
|
+
}
|