namirasoft-site-react 1.3.62 → 1.3.64

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.
Files changed (81) hide show
  1. package/dist/Validator.js.map +1 -1
  2. package/dist/components/NSButton.module.css +1 -1
  3. package/dist/components/NSCard.module.css +2 -3
  4. package/dist/components/NSCopyToClipboard.js +1 -1
  5. package/dist/components/NSCopyToClipboard.js.map +1 -1
  6. package/dist/components/NSCopyToClipboard.module.css +1 -1
  7. package/dist/components/NSEntityBar.module.css +2 -2
  8. package/dist/components/NSEntityCardBackground.module.css +2 -2
  9. package/dist/components/NSFooter.js.map +1 -1
  10. package/dist/components/NSHeader.js +1 -1
  11. package/dist/components/NSHeader.js.map +1 -1
  12. package/dist/components/NSInput.module.css +1 -1
  13. package/dist/components/NSInputDate.js.map +1 -1
  14. package/dist/components/NSInputDate.module.css +1 -1
  15. package/dist/components/NSInputDuration.js.map +1 -1
  16. package/dist/components/NSInputEmail.js.map +1 -1
  17. package/dist/components/NSInputFloat.js.map +1 -1
  18. package/dist/components/NSInputIP.js.map +1 -1
  19. package/dist/components/NSInputInteger.js.map +1 -1
  20. package/dist/components/NSInputPassword.js.map +1 -1
  21. package/dist/components/NSInputPhone.js.map +1 -1
  22. package/dist/components/NSInputPrice.js.map +1 -1
  23. package/dist/components/NSInputSearch.js.map +1 -1
  24. package/dist/components/NSInputString.js.map +1 -1
  25. package/dist/components/NSInputText.js.map +1 -1
  26. package/dist/components/NSInputTime.js.map +1 -1
  27. package/dist/components/NSLayoutTitle.d.ts +1 -4
  28. package/dist/components/NSLayoutTitle.js +7 -11
  29. package/dist/components/NSLayoutTitle.js.map +1 -1
  30. package/dist/components/NSLink.d.ts +5 -0
  31. package/dist/components/NSLink.js +7 -0
  32. package/dist/components/NSLink.js.map +1 -0
  33. package/dist/components/{NSLinkBlue.module.css → NSLink.module.css} +3 -3
  34. package/dist/components/NSLinkBlue.d.ts +2 -5
  35. package/dist/components/NSLinkBlue.js +2 -3
  36. package/dist/components/NSLinkBlue.js.map +1 -1
  37. package/dist/components/NSLinkGreen.d.ts +2 -16
  38. package/dist/components/NSLinkGreen.js +3 -18
  39. package/dist/components/NSLinkGreen.js.map +1 -1
  40. package/dist/components/NSLinkRed.d.ts +2 -16
  41. package/dist/components/NSLinkRed.js +3 -18
  42. package/dist/components/NSLinkRed.js.map +1 -1
  43. package/dist/components/NSNotification.d.ts +11 -12
  44. package/dist/components/NSNotification.js +19 -28
  45. package/dist/components/NSNotification.js.map +1 -1
  46. package/dist/components/NSPagination.d.ts +1 -9
  47. package/dist/components/NSPagination.js +25 -33
  48. package/dist/components/NSPagination.js.map +1 -1
  49. package/dist/components/NSSelectBox.js.map +1 -1
  50. package/dist/components/NSSelectBox.module.css +3 -3
  51. package/dist/pages/NSLoginPage.d.ts +1 -4
  52. package/dist/pages/NSLoginPage.js +8 -11
  53. package/dist/pages/NSLoginPage.js.map +1 -1
  54. package/dist/pages/NSNotFoundPage.d.ts +1 -4
  55. package/dist/pages/NSNotFoundPage.js +2 -6
  56. package/dist/pages/NSNotFoundPage.js.map +1 -1
  57. package/package.json +2 -2
  58. package/src/components/NSButton.module.css +1 -1
  59. package/src/components/NSCard.module.css +2 -3
  60. package/src/components/NSCopyToClipboard.module.css +1 -1
  61. package/src/components/NSCopyToClipboard.tsx +3 -3
  62. package/src/components/NSEntityBar.module.css +2 -2
  63. package/src/components/NSEntityCardBackground.module.css +2 -2
  64. package/src/components/NSHeader.tsx +3 -3
  65. package/src/components/NSInput.module.css +1 -1
  66. package/src/components/NSInputDate.module.css +1 -1
  67. package/src/components/NSLayoutTitle.tsx +24 -30
  68. package/src/components/{NSLinkBlue.module.css → NSLink.module.css} +3 -3
  69. package/src/components/NSLink.tsx +22 -0
  70. package/src/components/NSLinkBlue.tsx +3 -19
  71. package/src/components/NSLinkGreen.tsx +3 -42
  72. package/src/components/NSLinkRed.tsx +3 -42
  73. package/src/components/NSNotification.tsx +30 -53
  74. package/src/components/NSPagination.tsx +56 -72
  75. package/src/components/NSSelectBox.module.css +3 -3
  76. package/src/pages/NSLoginPage.tsx +20 -24
  77. package/src/pages/NSNotFoundPage.tsx +7 -13
  78. package/dist/components/NSLinkGreen.module.css +0 -16
  79. package/dist/components/NSLinkRed.module.css +0 -16
  80. package/src/components/NSLinkGreen.module.css +0 -16
  81. package/src/components/NSLinkRed.module.css +0 -16
@@ -1,45 +1,6 @@
1
- "use client";
1
+ import { NSLink, NSLinkProps } from "./NSLink";
2
2
 
3
- import Style from "./NSLinkGreen.module.css";
4
- import React from "react";
5
- import { Link } from "react-router-dom";
6
- import { BaseComponentProps } from "../props/BaseComponentProps";
7
-
8
- export interface NSLinkGreenProps extends BaseComponentProps
9
- {
10
- title: string;
11
- href: string;
12
- }
13
-
14
- export interface NSLinkGreenState
15
- {
16
- title: string;
17
- href: string;
18
- }
19
-
20
- export class NSLinkGreen extends React.Component<NSLinkGreenProps, NSLinkGreenState>
3
+ export function NSLinkGreen(props: NSLinkProps)
21
4
  {
22
- constructor(props: NSLinkGreenProps)
23
- {
24
- super(props);
25
- this.state = { title: props.title, href: props.href };
26
- }
27
- setTitle(title: string)
28
- {
29
- this.setState({ title });
30
- }
31
- setHRef(href: string)
32
- {
33
- this.setState({ href });
34
- }
35
- override render()
36
- {
37
- return (
38
- <Link className="text-white text-decoration-none" to={this.state.href}>
39
- <div className={Style.ns_link_green}>
40
- {this.state.title}
41
- </div>
42
- </Link>
43
- )
44
- }
5
+ return <NSLink id={props.id} classList={props.classList} style={{ ...props.style, backgroundColor: "#06D182" }} title={props.title} href={props.href} target={props.target} />;
45
6
  }
@@ -1,45 +1,6 @@
1
- "use client";
1
+ import { NSLink, NSLinkProps } from "./NSLink";
2
2
 
3
- import Style from "./NSLinkRed.module.css";
4
- import React from "react";
5
- import { Link } from "react-router-dom";
6
- import { BaseComponentProps } from "../props/BaseComponentProps";
7
-
8
- export interface NSLinkRedProps extends BaseComponentProps
9
- {
10
- title: string;
11
- href: string;
12
- }
13
-
14
- export interface NSLinkRedState
15
- {
16
- title: string;
17
- href: string;
18
- }
19
-
20
- export class NSLinkRed extends React.Component<NSLinkRedProps, NSLinkRedState>
3
+ export function NSLinkRed(props: NSLinkProps)
21
4
  {
22
- constructor(props: NSLinkRedProps)
23
- {
24
- super(props);
25
- this.state = { title: props.title, href: props.href };
26
- }
27
- setTitle(title: string)
28
- {
29
- this.setState({ title });
30
- }
31
- setHRef(href: string)
32
- {
33
- this.setState({ href });
34
- }
35
- override render()
36
- {
37
- return (
38
- <Link className="text-white text-decoration-none" to={this.state.href}>
39
- <div className={Style.ns_link_red}>
40
- {this.state.title}
41
- </div>
42
- </Link>
43
- )
44
- }
5
+ return <NSLink id={props.id} classList={props.classList} style={{ ...props.style, backgroundColor: "rgb(265, 63, 63, 1)" }} title={props.title} href={props.href} target={props.target} />;
45
6
  }
@@ -1,22 +1,16 @@
1
- "use client";
2
-
3
- import React from "react";
4
1
  import Exit from '../assets/images/close-vector.png';
5
2
  import Styles from "./NSNotification.module.css";
6
3
  import { BaseComponentProps } from "../props/BaseComponentProps";
7
4
 
8
5
  export interface NSNotificationProps extends BaseComponentProps
9
6
  {
10
- title: string;
11
- type: NSNotificationType;
12
- }
13
-
14
- export interface NSNotificationState
15
- {
16
- show: boolean;
7
+ text: string;
8
+ type: NotificationType;
9
+ color: NSNotificationColor;
10
+ onClose: () => void;
17
11
  }
18
12
 
19
- export enum NSNotificationType
13
+ export enum NSNotificationColor
20
14
  {
21
15
  GRAY = "GRAY",
22
16
  BLUE = "BLUE",
@@ -25,48 +19,31 @@ export enum NSNotificationType
25
19
  RED = "RED",
26
20
  }
27
21
 
28
- export class NSNotification extends React.Component<NSNotificationProps, NSNotificationState>
22
+ export enum NotificationType
29
23
  {
30
- constructor(props: NSNotificationProps)
31
- {
32
- super(props);
33
- this.state = {
34
- show: true,
35
- };
36
- }
37
-
38
- override componentDidMount(): void
39
- {
40
- setTimeout(() => { this.handleDestroy() }, 8000);
41
- }
42
-
43
- handleDestroy = () =>
44
- {
45
- this.setState({ show: false });
46
- };
24
+ Information = "Information",
25
+ Warning = "Warning",
26
+ Success = "Success",
27
+ Error = "Error",
28
+ }
47
29
 
48
- override render()
49
- {
50
- let className = Styles["ns_" + this.props.type.toString().toLowerCase];
51
- return <>
52
- {
53
- this.state.show && (
54
- <div id={this.props.id}
55
- className={`${Styles.ns_messenger} ${className}`}
56
- style={this.props.style}
57
- >
58
- <p className={`mb-0 ns-font-16-normal`}>{this.props.title}</p>
59
- <img
60
- className={Styles.ns_exit_icon}
61
- src={Exit}
62
- alt="exit"
63
- width={32}
64
- height={32}
65
- onClick={() => this.handleDestroy()}
66
- />
67
- </div>
68
- )
69
- }
70
- </>
71
- }
30
+ export function NSNotification(props: NSNotificationProps)
31
+ {
32
+ let className = Styles["ns_" + props.color.toString().toLowerCase];
33
+ return (
34
+ <div id={props.id}
35
+ className={`${Styles.ns_messenger} ${className}`}
36
+ style={props.style}
37
+ >
38
+ <p className={`mb-0 ns-font-16-normal`}>{props.text}</p>
39
+ <img
40
+ className={Styles.ns_exit_icon}
41
+ src={Exit}
42
+ alt="exit"
43
+ width={32}
44
+ height={32}
45
+ onClick={props.onClose}
46
+ />
47
+ </div>
48
+ );
72
49
  }
@@ -1,8 +1,5 @@
1
- "use client";
2
-
3
1
  import { BaseComponentProps } from '../props/BaseComponentProps';
4
2
  import Styles from './NSPagination.module.css';
5
- import { Component } from 'react';
6
3
 
7
4
  export interface NSPaginationProps extends BaseComponentProps
8
5
  {
@@ -10,88 +7,75 @@ export interface NSPaginationProps extends BaseComponentProps
10
7
  page: number;
11
8
  }
12
9
 
13
- export interface NSPaginationState
14
- {
15
- size: number;
16
- page: number;
17
- }
18
- export class NSPagination extends Component<NSPaginationProps, NSPaginationState>
10
+ export function NSPagination(props: NSPaginationProps)
19
11
  {
20
- constructor(props: NSPaginationProps)
21
- {
22
- super(props);
23
- this.state = { size: props.size, page: props.page }
24
- }
25
- override render()
12
+ let page = props.page;
13
+ let size = props.size;
14
+ let window = 2;
15
+ let min = Math.max(2, page - window);
16
+ let max = Math.min(page + window, size - 1);
17
+ let arr = [];
18
+ let pushPage = (index: number) =>
26
19
  {
27
- let page = this.props.page;
28
- let size = this.props.size;
29
- let window = 2;
30
- let min = Math.max(2, page - window);
31
- let max = Math.min(page + window, size - 1);
32
- let arr = [];
33
- let pushPage = (index: number) =>
34
- {
35
- if (index == page)
36
- arr.push(
37
- <div className={`${Styles.ns_select_number_parent}`}>
38
- <a href='#' className={`${Styles.ns_paginate_link} ${Styles.ns_select_number}`}>{index}</a>
39
- </div>
40
- );
41
- else
42
- arr.push(
43
- <div>
44
- <a href='#' className={`${Styles.ns_paginate_link}`}>{index}</a>
45
- </div>
46
- );
47
- };
48
- arr.push(
49
- <div>
50
- <a href='#'>
51
- <img
52
- src='https://static.namirasoft.com/icons/base/circle-chevron-left.png'
53
- alt='left_vector'
54
- width={32}
55
- height={32}
56
- />
57
- </a>
58
- </div>
59
- );
60
- pushPage(1);
61
- if (page > window * 2)
20
+ if (index == page)
62
21
  arr.push(
63
- <div>
64
- <a href='#' className={`${Styles.ns_paginate_link}`}>...</a>
22
+ <div className={`${Styles.ns_select_number_parent}`}>
23
+ <a href='#' className={`${Styles.ns_paginate_link} ${Styles.ns_select_number}`}>{index}</a>
65
24
  </div>
66
25
  );
67
- for (let i = min; i <= max; i++)
68
- pushPage(i);
69
- if (page <= size - window * 2)
26
+ else
70
27
  arr.push(
71
28
  <div>
72
- <a href='#' className={`${Styles.ns_paginate_link}`}>...</a>
29
+ <a href='#' className={`${Styles.ns_paginate_link}`}>{index}</a>
73
30
  </div>
74
31
  );
75
- pushPage(size);
32
+ };
33
+ arr.push(
34
+ <div>
35
+ <a href='#'>
36
+ <img
37
+ src='https://static.namirasoft.com/icons/base/circle-chevron-left.png'
38
+ alt='left_vector'
39
+ width={32}
40
+ height={32}
41
+ />
42
+ </a>
43
+ </div>
44
+ );
45
+ pushPage(1);
46
+ if (page > window * 2)
76
47
  arr.push(
77
48
  <div>
78
- <a href='#'>
79
- <img
80
- src='https://static.namirasoft.com/icons/base/circle-chevron-right.png'
81
- width={32}
82
- height={32}
83
- alt='right_vector'
84
- />
85
- </a>
49
+ <a href='#' className={`${Styles.ns_paginate_link}`}>...</a>
86
50
  </div>
87
51
  );
88
-
89
- return (
90
- <div id={this.props.id}
91
- className={`${Styles.ns_pagination_container} ${this.props.classList?.join(" ")}`}
92
- style={this.props.style}>
93
- {arr.map(x => (x))}
52
+ for (let i = min; i <= max; i++)
53
+ pushPage(i);
54
+ if (page <= size - window * 2)
55
+ arr.push(
56
+ <div>
57
+ <a href='#' className={`${Styles.ns_paginate_link}`}>...</a>
94
58
  </div>
95
59
  );
96
- }
60
+ pushPage(size);
61
+ arr.push(
62
+ <div>
63
+ <a href='#'>
64
+ <img
65
+ src='https://static.namirasoft.com/icons/base/circle-chevron-right.png'
66
+ width={32}
67
+ height={32}
68
+ alt='right_vector'
69
+ />
70
+ </a>
71
+ </div>
72
+ );
73
+
74
+ return (
75
+ <div id={props.id}
76
+ className={`${Styles.ns_pagination_container} ${props.classList?.join(" ")}`}
77
+ style={props.style}>
78
+ {arr.map(x => (x))}
79
+ </div>
80
+ );
97
81
  }
@@ -1,11 +1,11 @@
1
1
  .ns_input_parent {
2
- width: 326px;
2
+ width: 272px;
3
3
  max-width: 100%;
4
4
  }
5
5
 
6
6
  .ns_input_select {
7
- height: 45px;
8
- width: 304px !important;
7
+ height: 48px;
8
+ width: 272px !important;
9
9
  }
10
10
 
11
11
  .ns_input_select span span svg path {
@@ -1,4 +1,3 @@
1
- import { Component } from 'react';
2
1
  import Styles from './NSLoginPage.module.css'
3
2
  import { NSButtonGreen } from '../components/NSButtonGreen';
4
3
  import { NSLinkBlue } from '../components/NSLinkBlue';
@@ -13,29 +12,26 @@ export interface NSLoginPageProps
13
12
  onClick?: () => void;
14
13
  }
15
14
 
16
- export class NSLoginPage extends Component<NSLoginPageProps>
15
+ export function NSLoginPage(props: NSLoginPageProps)
17
16
  {
18
- override render()
19
- {
20
- let button = <></>;
21
- if (this.props.href)
22
- button = <NSLinkBlue title="Login" href={this.props.href ?? ""} />;
23
- else if (this.props.onClick)
24
- button = <NSButtonGreen title="Login" onClick={this.props.onClick} />;
25
- return (
26
- <div style={{ backgroundImage: this.props.background, width: "100%", backgroundSize: "cover" }}>
27
- <div className={`${Styles.ns_login_container}`} style={{ marginTop: "100px" }}>
28
- <div className={`${Styles.ns_logo}`}>
29
- <img width={256} height={256} src={this.props.logo} alt={`${this.props.title} Logo`}></img>
30
- </div>
31
- <NSSpace size={NSSpaceSizeType.SMALL} />
32
- <div><h1 className={`${Styles.ns_title}`}>{this.props.title}</h1></div>
33
- <NSSpace size={NSSpaceSizeType.SMALL} />
34
- <div className={`${Styles.ns_button}`}>
35
- {button}
36
- </div>
17
+ let button = <></>;
18
+ if (props.href)
19
+ button = <NSLinkBlue title="Login" href={props.href ?? ""} />;
20
+ else if (props.onClick)
21
+ button = <NSButtonGreen title="Login" onClick={props.onClick} />;
22
+ return (
23
+ <div style={{ backgroundImage: props.background, width: "100%", backgroundSize: "cover" }}>
24
+ <div className={`${Styles.ns_login_container}`} style={{ marginTop: "100px" }}>
25
+ <div className={`${Styles.ns_logo}`}>
26
+ <img width={256} height={256} src={props.logo} alt={`${props.title} Logo`}></img>
37
27
  </div>
38
- </div >
39
- );
40
- }
28
+ <NSSpace size={NSSpaceSizeType.SMALL} />
29
+ <div><h1 className={`${Styles.ns_title}`}>{props.title}</h1></div>
30
+ <NSSpace size={NSSpaceSizeType.SMALL} />
31
+ <div className={`${Styles.ns_button}`}>
32
+ {button}
33
+ </div>
34
+ </div>
35
+ </div >
36
+ );
41
37
  }
@@ -1,18 +1,12 @@
1
- "use client";
2
-
3
- import { Component } from 'react';
4
1
  import Styles from './NSNotFoundPage.module.css'
5
2
  import { NSLinkBlue } from '../main';
6
3
 
7
- export class NSNotFoundPage extends Component
4
+ export function NSNotFoundPage()
8
5
  {
9
- override render()
10
- {
11
- return (
12
- <>
13
- <div className={Styles.ns_not_found_page}></div>
14
- <NSLinkBlue href='/' target='_self' title='Back To Home'/>``
15
- </>
16
- );
17
- }
6
+ return (
7
+ <>
8
+ <div className={Styles.ns_not_found_page}></div>
9
+ <NSLinkBlue href='/' target='_self' title='Back To Home' />``
10
+ </>
11
+ );
18
12
  }
@@ -1,16 +0,0 @@
1
- .ns_link_green {
2
- display: flex;
3
- border-radius: 8px;
4
- background-color: #06D182;
5
- color: #ffffff;
6
- border: 0;
7
- box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
8
- font-size: 16px;
9
- text-decoration: none;
10
- width: 358px;
11
- height: 48px;
12
- text-align: center;
13
- align-items: center;
14
- justify-content: center;
15
- font-weight: 400;
16
- }
@@ -1,16 +0,0 @@
1
- .ns_link_red {
2
- display: flex;
3
- border-radius: 8px;
4
- background-color: rgb(265, 63, 63, 1);
5
- color: #ffffff;
6
- border: 0;
7
- box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
8
- font-size: 16px;
9
- text-decoration: none;
10
- width: 358px;
11
- height: 48px;
12
- text-align: center;
13
- align-items: center;
14
- justify-content: center;
15
- font-weight: 400;
16
- }
@@ -1,16 +0,0 @@
1
- .ns_link_green {
2
- display: flex;
3
- border-radius: 8px;
4
- background-color: #06D182;
5
- color: #ffffff;
6
- border: 0;
7
- box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
8
- font-size: 16px;
9
- text-decoration: none;
10
- width: 358px;
11
- height: 48px;
12
- text-align: center;
13
- align-items: center;
14
- justify-content: center;
15
- font-weight: 400;
16
- }
@@ -1,16 +0,0 @@
1
- .ns_link_red {
2
- display: flex;
3
- border-radius: 8px;
4
- background-color: rgb(265, 63, 63, 1);
5
- color: #ffffff;
6
- border: 0;
7
- box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
8
- font-size: 16px;
9
- text-decoration: none;
10
- width: 358px;
11
- height: 48px;
12
- text-align: center;
13
- align-items: center;
14
- justify-content: center;
15
- font-weight: 400;
16
- }