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
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import Style from "./NSLinkGreen.module.css";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { Link } from "react-router-dom";
|
|
6
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
6
7
|
|
|
7
|
-
export interface NSLinkGreenProps
|
|
8
|
+
export interface NSLinkGreenProps extends BaseComponentProps
|
|
8
9
|
{
|
|
9
10
|
title: string;
|
|
10
11
|
href: string;
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import Style from "./NSLinkRed.module.css";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { Link } from "react-router-dom";
|
|
6
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
6
7
|
|
|
7
|
-
export interface NSLinkRedProps
|
|
8
|
+
export interface NSLinkRedProps extends BaseComponentProps
|
|
8
9
|
{
|
|
9
10
|
title: string;
|
|
10
11
|
href: string;
|
|
@@ -4,8 +4,9 @@ import { Component } from 'react';
|
|
|
4
4
|
import Styles from './NSLoading.module.css';
|
|
5
5
|
import { NSSection } from './NSSection';
|
|
6
6
|
import { BackgroundProps } from '../props/BackgroundProps';
|
|
7
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
7
8
|
|
|
8
|
-
interface NSLoadingProps
|
|
9
|
+
export interface NSLoadingProps extends BaseComponentProps
|
|
9
10
|
{
|
|
10
11
|
background?: BackgroundProps;
|
|
11
12
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.ns_messenger {
|
|
2
|
+
background-color: #fff;
|
|
3
|
+
padding: 12px 15px;
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ns_gray {
|
|
10
|
+
border: 3px solid gray;
|
|
11
|
+
box-shadow: 1px 1px 8px 0px gray;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ns_blue {
|
|
15
|
+
border: 3px solid blue;
|
|
16
|
+
box-shadow: 1px 1px 8px 0px blue;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ns_green {
|
|
20
|
+
border: 3px solid rgba(112, 224, 0, 1);
|
|
21
|
+
box-shadow: 1px 1px 8px 0px rgba(112, 224, 0, 1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ns_yellow {
|
|
25
|
+
border: 3px solid yellow;
|
|
26
|
+
box-shadow: 1px 1px 8px 0px yellow;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ns_red {
|
|
30
|
+
border: 3px solid red;
|
|
31
|
+
box-shadow: 1px 1px 8px 0px red;
|
|
32
|
+
}
|
|
@@ -2,22 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Exit from '../assets/images/close-vector.png';
|
|
5
|
-
import Styles from "./
|
|
5
|
+
import Styles from "./NSNotification.module.css";
|
|
6
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
6
7
|
|
|
7
|
-
export interface
|
|
8
|
+
export interface NSNotificationProps extends BaseComponentProps
|
|
8
9
|
{
|
|
9
10
|
title: string;
|
|
10
|
-
|
|
11
|
+
type: NSNotificationType;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export interface
|
|
14
|
+
export interface NSNotificationState
|
|
14
15
|
{
|
|
15
16
|
show: boolean;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
export
|
|
19
|
+
export enum NSNotificationType
|
|
19
20
|
{
|
|
20
|
-
|
|
21
|
+
GRAY = "GRAY",
|
|
22
|
+
BLUE = "BLUE",
|
|
23
|
+
GREEN = "GREEN",
|
|
24
|
+
YELLOW = "YELLOW",
|
|
25
|
+
RED = "RED",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class NSNotification extends React.Component<NSNotificationProps, NSNotificationState>
|
|
29
|
+
{
|
|
30
|
+
constructor(props: NSNotificationProps)
|
|
21
31
|
{
|
|
22
32
|
super(props);
|
|
23
33
|
this.state = {
|
|
@@ -37,9 +47,10 @@ export class NSMessenger extends React.Component<NSMessengerProps, NSMessengerSt
|
|
|
37
47
|
|
|
38
48
|
override render()
|
|
39
49
|
{
|
|
50
|
+
let style = Styles["ns_" + this.props.type.toString().toLowerCase];
|
|
40
51
|
return <>
|
|
41
52
|
{this.state.show && (
|
|
42
|
-
<div className={`${Styles.ns_messenger}
|
|
53
|
+
<div className={`${Styles.ns_messenger} ${style}`}>
|
|
43
54
|
<p className={`mb-0 ns-font-16-normal`}>{this.props.title}</p>
|
|
44
55
|
<img
|
|
45
56
|
className={Styles.ns_exit_icon}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import { BaseComponentProps } from '../props/BaseComponentProps';
|
|
3
4
|
import Styles from './NSPagination.module.css';
|
|
4
5
|
import { Component } from 'react';
|
|
5
6
|
|
|
6
|
-
export interface NSPaginationProps
|
|
7
|
+
export interface NSPaginationProps extends BaseComponentProps
|
|
7
8
|
{
|
|
8
9
|
size: number;
|
|
9
10
|
page: number;
|
|
@@ -48,12 +49,12 @@ export class NSPagination extends Component<NSPaginationState, NSPaginationProps
|
|
|
48
49
|
arr.push(
|
|
49
50
|
<div>
|
|
50
51
|
<a href='#'>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
<img
|
|
53
|
+
src='https://static.namirasoft.com/icons/base/circle-chevron-left.png'
|
|
54
|
+
alt='left_vector'
|
|
55
|
+
width={32}
|
|
56
|
+
height={32}
|
|
57
|
+
/>
|
|
57
58
|
</a>
|
|
58
59
|
</div>
|
|
59
60
|
);
|
|
@@ -76,12 +77,12 @@ export class NSPagination extends Component<NSPaginationState, NSPaginationProps
|
|
|
76
77
|
arr.push(
|
|
77
78
|
<div>
|
|
78
79
|
<a href='#'>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
<img
|
|
81
|
+
src='https://static.namirasoft.com/icons/base/circle-chevron-right.png'
|
|
82
|
+
width={32}
|
|
83
|
+
height={32}
|
|
84
|
+
alt='right_vector'
|
|
85
|
+
/>
|
|
85
86
|
</a>
|
|
86
87
|
</div>
|
|
87
88
|
);
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { Component, ReactNode } from "react";
|
|
4
|
-
import Styles from './NSPanel.module.css'
|
|
4
|
+
import Styles from './NSPanel.module.css';
|
|
5
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
5
6
|
|
|
6
|
-
export interface NSSectionProps
|
|
7
|
+
export interface NSSectionProps extends BaseComponentProps
|
|
7
8
|
{
|
|
8
9
|
children: ReactNode;
|
|
9
10
|
grid: boolean;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export interface NSSectionState
|
|
13
|
-
{}
|
|
14
|
+
{ }
|
|
14
15
|
|
|
15
|
-
export class NSPanel extends Component<NSSectionProps, NSSectionState>
|
|
16
|
+
export class NSPanel extends Component<NSSectionProps, NSSectionState>
|
|
17
|
+
{
|
|
16
18
|
constructor(props: NSSectionProps)
|
|
17
19
|
{
|
|
18
20
|
super(props);
|
|
@@ -21,7 +23,7 @@ export class NSPanel extends Component<NSSectionProps, NSSectionState> {
|
|
|
21
23
|
{
|
|
22
24
|
return (
|
|
23
25
|
<section
|
|
24
|
-
className={this.props.grid ? Styles.ns_panel_grid : Styles.ns_panel_column
|
|
26
|
+
className={this.props.grid ? Styles.ns_panel_grid : Styles.ns_panel_column} >
|
|
25
27
|
{this.props.children}
|
|
26
28
|
</section>
|
|
27
29
|
);
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import { Component, ReactNode } from "react";
|
|
4
4
|
import Styles from './NSSection.module.css'
|
|
5
5
|
import { BackgroundProps } from "../props/BackgroundProps";
|
|
6
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
6
7
|
|
|
7
|
-
export interface NSSectionProps
|
|
8
|
+
export interface NSSectionProps extends BaseComponentProps
|
|
8
9
|
{
|
|
9
10
|
children: ReactNode;
|
|
10
11
|
background?: BackgroundProps;
|
|
@@ -6,8 +6,9 @@ import { NSEntityBar, NSEntityBarProps } from './NSEntityBar';
|
|
|
6
6
|
import { NSSection } from './NSSection';
|
|
7
7
|
import { BackgroundProps } from '../props/BackgroundProps';
|
|
8
8
|
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
9
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
9
10
|
|
|
10
|
-
export interface NSSectionBarsProps
|
|
11
|
+
export interface NSSectionBarsProps extends BaseComponentProps
|
|
11
12
|
{
|
|
12
13
|
background?: BackgroundProps;
|
|
13
14
|
bars: NSEntityBarProps[]
|
|
@@ -8,8 +8,9 @@ import { NSSection } from './NSSection';
|
|
|
8
8
|
import { NSLinkBlue } from './NSLinkBlue';
|
|
9
9
|
import { BackgroundProps } from '../props/BackgroundProps';
|
|
10
10
|
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
11
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
11
12
|
|
|
12
|
-
export interface NSSectionCardsProps
|
|
13
|
+
export interface NSSectionCardsProps extends BaseComponentProps
|
|
13
14
|
{
|
|
14
15
|
title?: {
|
|
15
16
|
text: string,
|
|
@@ -39,7 +40,7 @@ export class NSSectionCards extends Component<NSSectionCardsProps>
|
|
|
39
40
|
{
|
|
40
41
|
this.props.title &&
|
|
41
42
|
<div className={Styles.ns_section_cards_title_container}>
|
|
42
|
-
|
|
43
|
+
<NSTitle color={this.props.title?.color} title={this.props.title?.text} />
|
|
43
44
|
{
|
|
44
45
|
this.props.description &&
|
|
45
46
|
<p style={{ color: this.props.description?.color }} className={Styles.ns_description}> {this.props.description.text} </p>
|
|
@@ -5,8 +5,9 @@ import { NSSection } from './NSSection';
|
|
|
5
5
|
import { NSTitle } from './NSTitle';
|
|
6
6
|
import { BackgroundProps } from '../props/BackgroundProps';
|
|
7
7
|
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
8
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
8
9
|
|
|
9
|
-
export interface NSSectionTitleProps
|
|
10
|
+
export interface NSSectionTitleProps extends BaseComponentProps
|
|
10
11
|
{
|
|
11
12
|
title: {
|
|
12
13
|
text: string,
|
|
@@ -5,8 +5,9 @@ import Styles from "./NSSelectBox.module.css";
|
|
|
5
5
|
import { Select, Space } from 'antd';
|
|
6
6
|
import type { SelectProps } from 'antd';
|
|
7
7
|
import IconSelectBox from '../assets/images/icon-select-box.svg';
|
|
8
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
8
9
|
|
|
9
|
-
export interface NSSelectBoxProps
|
|
10
|
+
export interface NSSelectBoxProps extends BaseComponentProps
|
|
10
11
|
{
|
|
11
12
|
title: string;
|
|
12
13
|
options: SelectProps['options'];
|
|
@@ -14,26 +15,38 @@ export interface NSSelectBoxProps
|
|
|
14
15
|
|
|
15
16
|
export interface NSSelectBoxState
|
|
16
17
|
{
|
|
17
|
-
value: string
|
|
18
|
+
value: string | null;
|
|
19
|
+
values: string[];
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
export class NSSelectBox extends React.Component<NSSelectBoxProps, NSSelectBoxState>
|
|
22
|
+
export class NSSelectBox extends React.Component<NSSelectBoxProps, NSSelectBoxState>
|
|
23
|
+
{
|
|
21
24
|
constructor(props: NSSelectBoxProps)
|
|
22
25
|
{
|
|
23
26
|
super(props);
|
|
24
27
|
this.state = {
|
|
25
|
-
value:
|
|
28
|
+
value: null,
|
|
29
|
+
values: [],
|
|
26
30
|
};
|
|
27
|
-
this.
|
|
31
|
+
this.getValues = this.getValues.bind(this);
|
|
32
|
+
this.setValues = this.setValues.bind(this);
|
|
28
33
|
}
|
|
29
|
-
setValue(value: string
|
|
34
|
+
setValue(value: string | null): void
|
|
30
35
|
{
|
|
31
36
|
this.setState({ value });
|
|
32
37
|
}
|
|
33
|
-
getValue(): string
|
|
38
|
+
getValue(): string | null
|
|
34
39
|
{
|
|
35
40
|
return this.state.value;
|
|
36
41
|
}
|
|
42
|
+
setValues(values: string[]): void
|
|
43
|
+
{
|
|
44
|
+
this.setState({ values });
|
|
45
|
+
}
|
|
46
|
+
getValues(): string[]
|
|
47
|
+
{
|
|
48
|
+
return this.state.values;
|
|
49
|
+
}
|
|
37
50
|
override render()
|
|
38
51
|
{
|
|
39
52
|
return (
|
|
@@ -44,7 +57,7 @@ export class NSSelectBox extends React.Component<NSSelectBoxProps, NSSelectBoxSt
|
|
|
44
57
|
style={{ width: '100%' }}
|
|
45
58
|
className={Styles.ns_input_select}
|
|
46
59
|
placeholder="Combo Box"
|
|
47
|
-
onChange={this.
|
|
60
|
+
onChange={this.setValues}
|
|
48
61
|
optionLabelProp="label"
|
|
49
62
|
options={this.props.options}
|
|
50
63
|
optionRender={(option) => (
|
|
@@ -6,8 +6,9 @@ import { NSPagination } from './NSPagination';
|
|
|
6
6
|
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
7
7
|
import Styles from './NSTable.module.css';
|
|
8
8
|
import { Component } from 'react';
|
|
9
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
9
10
|
|
|
10
|
-
export interface NSTableProps<RowType>
|
|
11
|
+
export interface NSTableProps<RowType> extends BaseComponentProps
|
|
11
12
|
{
|
|
12
13
|
columns: { [key: string]: string };
|
|
13
14
|
rows: RowType[];
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import Styles from './NSTitle.module.css';
|
|
5
|
+
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
5
6
|
|
|
6
|
-
export interface NSTitleProps
|
|
7
|
+
export interface NSTitleProps extends BaseComponentProps
|
|
7
8
|
{
|
|
8
9
|
title: string;
|
|
9
10
|
color?: string;
|
package/src/main.ts
CHANGED
|
@@ -6,9 +6,10 @@ export * from "./components/NSButtonRed";
|
|
|
6
6
|
export * from "./components/NSCard";
|
|
7
7
|
export * from "./components/NSEntityCardBackground";
|
|
8
8
|
export * from "./components/NSEntityBar";
|
|
9
|
+
export * from "./components/NSInputErrorNotifier";
|
|
9
10
|
export * from "./components/NSFooter";
|
|
10
11
|
export * from "./components/NSHeader";
|
|
11
|
-
export * from "./components/
|
|
12
|
+
export * from "./components/NSCopyToClipboard";
|
|
12
13
|
export * from "./components/NSInputDate";
|
|
13
14
|
export * from "./components/NSInputDuration";
|
|
14
15
|
export * from "./components/NSInputEmail";
|
|
@@ -26,7 +27,7 @@ export * from "./components/NSLayout";
|
|
|
26
27
|
export * from "./components/NSLayoutHeroBanner";
|
|
27
28
|
export * from "./components/NSLayoutTitle";
|
|
28
29
|
export * from "./components/NSLoading";
|
|
29
|
-
export * from "./components/
|
|
30
|
+
export * from "./components/NSNotification";
|
|
30
31
|
export * from "./components/NSSelectBox";
|
|
31
32
|
export * from "./components/NSSpace";
|
|
32
33
|
export * from "./components/NSSection";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BackgroundProps } from "./BackgroundProps";
|
|
2
|
+
import { BaseComponentProps } from "./BaseComponentProps";
|
|
2
3
|
import { ImageProps } from "./ImageProps";
|
|
3
4
|
|
|
4
|
-
export interface NSButtonProps
|
|
5
|
+
export interface NSButtonProps extends BaseComponentProps // todo
|
|
5
6
|
{
|
|
6
7
|
title: string;
|
|
7
8
|
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface NSNSInputCopyProps {
|
|
3
|
-
title: string;
|
|
4
|
-
defaultValue?: string;
|
|
5
|
-
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
-
}
|
|
7
|
-
export interface NSNSInputCopyState {
|
|
8
|
-
value: string;
|
|
9
|
-
}
|
|
10
|
-
export declare class NSInputCopy extends React.Component<NSNSInputCopyProps, NSNSInputCopyState> {
|
|
11
|
-
constructor(props: NSNSInputCopyProps);
|
|
12
|
-
getValue(): string;
|
|
13
|
-
setValue(value: string): void;
|
|
14
|
-
private onChanged;
|
|
15
|
-
copyToClipboard(): void;
|
|
16
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSInputCopy.module.css";
|
|
5
|
-
import IconInputString from '../assets/images/icon-input-copy.svg';
|
|
6
|
-
export class NSInputCopy extends React.Component {
|
|
7
|
-
constructor(props) {
|
|
8
|
-
var _a;
|
|
9
|
-
super(props);
|
|
10
|
-
this.state = {
|
|
11
|
-
value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "",
|
|
12
|
-
};
|
|
13
|
-
this.getValue = this.getValue.bind(this);
|
|
14
|
-
this.setValue = this.setValue.bind(this);
|
|
15
|
-
this.onChanged = this.onChanged.bind(this);
|
|
16
|
-
this.copyToClipboard = this.copyToClipboard.bind(this);
|
|
17
|
-
}
|
|
18
|
-
getValue() {
|
|
19
|
-
return this.state.value;
|
|
20
|
-
}
|
|
21
|
-
setValue(value) {
|
|
22
|
-
this.setState({ value });
|
|
23
|
-
}
|
|
24
|
-
onChanged(e) {
|
|
25
|
-
this.setValue(e.target.value);
|
|
26
|
-
if (this.props.onChanged)
|
|
27
|
-
this.props.onChanged(e);
|
|
28
|
-
}
|
|
29
|
-
copyToClipboard() {
|
|
30
|
-
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
31
|
-
navigator.clipboard.writeText(this.getValue());
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return (_jsxs("div", { className: `${Styles.ns_input_parent} p-2`, children: [_jsx("span", { className: Styles.ns_input_title, children: this.props.title }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputString, alt: "icon", width: 16, height: 16, onClick: this.copyToClipboard }), _jsx("input", { value: this.state.value, onChange: this.onChanged, type: "text", className: Styles.ns_input, placeholder: "12AB34cf" })] }));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=NSInputCopy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSInputCopy.js","sourceRoot":"","sources":["../../src/components/NSInputCopy.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,eAAe,MAAM,sCAAsC,CAAC;AAenE,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAAiD;IAEpF,YAAY,KAAyB;;QAEjC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACT,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,EAAE;SAClC,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IACD,QAAQ;QAEJ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACO,SAAS,CAAC,CAAsC;QAEpD,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;YACpB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;IACD,eAAe;QAEX,IAAI,SAAS,CAAC,SAAS,IAAI,SAAS,CAAC,SAAS,CAAC,SAAS,EACxD,CAAC;YACG,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;IACQ,MAAM;QAEX,OAAO,CACH,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,eAAe,MAAM,aAC3C,eAAM,SAAS,EAAE,MAAM,CAAC,cAAc,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAQ,EACjE,cACI,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,GAAG,EAAE,eAAe,EACpB,GAAG,EAAC,MAAM,EACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,OAAO,EAAE,IAAI,CAAC,eAAe,GAC/B,EACF,gBACI,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAC,UAAU,GACxB,IACA,CACT,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface NSMessengerProps {
|
|
3
|
-
title: string;
|
|
4
|
-
success: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface NSMessengerState {
|
|
7
|
-
show: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare class NSMessenger extends React.Component<NSMessengerProps, NSMessengerState> {
|
|
10
|
-
constructor(props: NSMessengerProps);
|
|
11
|
-
componentDidMount(): void;
|
|
12
|
-
handleDestroy: () => void;
|
|
13
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Exit from '../assets/images/close-vector.png';
|
|
5
|
-
import Styles from "./NSMessenger.module.css";
|
|
6
|
-
export class NSMessenger extends React.Component {
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(props);
|
|
9
|
-
this.handleDestroy = () => {
|
|
10
|
-
this.setState({ show: false });
|
|
11
|
-
};
|
|
12
|
-
this.state = {
|
|
13
|
-
show: true,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
componentDidMount() {
|
|
17
|
-
setTimeout(() => { this.handleDestroy(); }, 8000);
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return _jsx(_Fragment, { children: this.state.show && (_jsxs("div", { className: `${Styles.ns_messenger} "" ${this.props.success == true ? Styles.ns_green : Styles.ns_red}`, children: [_jsx("p", { className: `mb-0 ns-font-16-normal`, children: this.props.title }), _jsx("img", { className: Styles.ns_exit_icon, src: Exit, alt: "exit", width: 32, height: 32, onClick: () => this.handleDestroy() })] })) });
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=NSMessenger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSMessenger.js","sourceRoot":"","sources":["../../src/components/NSMessenger.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,mCAAmC,CAAC;AACrD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAa9C,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAA6C;IAEhF,YAAY,KAAuB;QAE/B,KAAK,CAAC,KAAK,CAAC,CAAC;QAWjB,kBAAa,GAAG,GAAG,EAAE;YAEjB,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC;QAbE,IAAI,CAAC,KAAK,GAAG;YACT,IAAI,EAAE,IAAI;SACb,CAAC;IACN,CAAC;IAEQ,iBAAiB;QAEtB,UAAU,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,CAAA,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;IAOQ,MAAM;QAEX,OAAO,4BACF,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAChB,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,YAAY,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,aACvG,YAAG,SAAS,EAAE,wBAAwB,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAK,EAC9D,cACI,SAAS,EAAE,MAAM,CAAC,YAAY,EAC9B,GAAG,EAAE,IAAI,EACT,GAAG,EAAC,MAAM,EACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,GACrC,IACA,CACT,GACF,CAAA;IACP,CAAC;CACJ"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
.ns_messenger {
|
|
2
|
-
background-color: #fff;
|
|
3
|
-
padding: 12px 15px;
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: space-between;
|
|
6
|
-
align-items: center;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.ns_green {
|
|
10
|
-
border: 3px solid rgba(112, 224, 0, 1);
|
|
11
|
-
box-shadow: 1px 1px 8px 0px rgba(112, 224, 0, 1);
|
|
12
|
-
}
|
|
13
|
-
.ns_red {
|
|
14
|
-
border: 3px solid red;
|
|
15
|
-
box-shadow: 1px 1px 8px 0px red;
|
|
16
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSInputCopy.module.css";
|
|
5
|
-
import IconInputString from '../assets/images/icon-input-copy.svg';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export interface NSNSInputCopyProps
|
|
9
|
-
{
|
|
10
|
-
title: string;
|
|
11
|
-
defaultValue?: string;
|
|
12
|
-
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface NSNSInputCopyState
|
|
16
|
-
{
|
|
17
|
-
value: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export class NSInputCopy extends React.Component<NSNSInputCopyProps, NSNSInputCopyState>
|
|
21
|
-
{
|
|
22
|
-
constructor(props: NSNSInputCopyProps)
|
|
23
|
-
{
|
|
24
|
-
super(props);
|
|
25
|
-
this.state = {
|
|
26
|
-
value: props.defaultValue ?? "",
|
|
27
|
-
};
|
|
28
|
-
this.getValue = this.getValue.bind(this);
|
|
29
|
-
this.setValue = this.setValue.bind(this);
|
|
30
|
-
this.onChanged = this.onChanged.bind(this);
|
|
31
|
-
this.copyToClipboard = this.copyToClipboard.bind(this);
|
|
32
|
-
}
|
|
33
|
-
getValue(): string
|
|
34
|
-
{
|
|
35
|
-
return this.state.value;
|
|
36
|
-
}
|
|
37
|
-
setValue(value: string): void
|
|
38
|
-
{
|
|
39
|
-
this.setState({ value });
|
|
40
|
-
}
|
|
41
|
-
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
42
|
-
{
|
|
43
|
-
this.setValue(e.target.value);
|
|
44
|
-
if (this.props.onChanged)
|
|
45
|
-
this.props.onChanged(e);
|
|
46
|
-
}
|
|
47
|
-
copyToClipboard(): void
|
|
48
|
-
{
|
|
49
|
-
if (navigator.clipboard && navigator.clipboard.writeText)
|
|
50
|
-
{
|
|
51
|
-
navigator.clipboard.writeText(this.getValue());
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
override render()
|
|
55
|
-
{
|
|
56
|
-
return (
|
|
57
|
-
<div className={`${Styles.ns_input_parent} p-2`}>
|
|
58
|
-
<span className={Styles.ns_input_title}>{this.props.title}</span>
|
|
59
|
-
<img
|
|
60
|
-
className={Styles.ns_input_icon}
|
|
61
|
-
src={IconInputString}
|
|
62
|
-
alt="icon"
|
|
63
|
-
width={16}
|
|
64
|
-
height={16}
|
|
65
|
-
onClick={this.copyToClipboard}
|
|
66
|
-
/>
|
|
67
|
-
<input
|
|
68
|
-
value={this.state.value}
|
|
69
|
-
onChange={this.onChanged}
|
|
70
|
-
type="text"
|
|
71
|
-
className={Styles.ns_input}
|
|
72
|
-
placeholder="12AB34cf"
|
|
73
|
-
/>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
.ns_messenger {
|
|
2
|
-
background-color: #fff;
|
|
3
|
-
padding: 12px 15px;
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: space-between;
|
|
6
|
-
align-items: center;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.ns_green {
|
|
10
|
-
border: 3px solid rgba(112, 224, 0, 1);
|
|
11
|
-
box-shadow: 1px 1px 8px 0px rgba(112, 224, 0, 1);
|
|
12
|
-
}
|
|
13
|
-
.ns_red {
|
|
14
|
-
border: 3px solid red;
|
|
15
|
-
box-shadow: 1px 1px 8px 0px red;
|
|
16
|
-
}
|