namirasoft-site-react 1.3.59 → 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.
Files changed (141) hide show
  1. package/dist/App.js +2 -15
  2. package/dist/App.js.map +1 -1
  3. package/dist/components/NSButton.d.ts +4 -3
  4. package/dist/components/NSButton.js.map +1 -1
  5. package/dist/components/NSButtonBlue.d.ts +2 -1
  6. package/dist/components/NSButtonBlue.js.map +1 -1
  7. package/dist/components/NSButtonBlueVector.d.ts +2 -1
  8. package/dist/components/NSButtonBlueVector.js.map +1 -1
  9. package/dist/components/NSButtonGreen.d.ts +2 -1
  10. package/dist/components/NSButtonGreen.js.map +1 -1
  11. package/dist/components/NSButtonRed.d.ts +2 -1
  12. package/dist/components/NSButtonRed.js.map +1 -1
  13. package/dist/components/NSCard.d.ts +2 -1
  14. package/dist/components/NSCard.js.map +1 -1
  15. package/dist/components/NSCopyToClipboard.d.ts +2 -1
  16. package/dist/components/NSEntityBar.d.ts +2 -1
  17. package/dist/components/NSEntityBar.js.map +1 -1
  18. package/dist/components/NSEntityCardBackground.d.ts +2 -1
  19. package/dist/components/NSFooter.d.ts +2 -1
  20. package/dist/components/NSFooter.js.map +1 -1
  21. package/dist/components/NSHeader.d.ts +2 -1
  22. package/dist/components/NSHeader.js.map +1 -1
  23. package/dist/components/NSInputDate.d.ts +1 -0
  24. package/dist/components/NSInputDate.js +4 -3
  25. package/dist/components/NSInputDate.js.map +1 -1
  26. package/dist/components/NSInputDuration.js.map +1 -1
  27. package/dist/components/NSInputEmail.js +2 -1
  28. package/dist/components/NSInputEmail.js.map +1 -1
  29. package/dist/components/NSInputErrorNotifier.d.ts +5 -0
  30. package/dist/components/NSInputErrorNotifier.js +7 -0
  31. package/dist/components/NSInputErrorNotifier.js.map +1 -0
  32. package/dist/components/NSInputIP.js.map +1 -1
  33. package/dist/components/NSInputInteger.js.map +1 -1
  34. package/dist/components/NSInputPhone.js.map +1 -1
  35. package/dist/components/NSInputPrice.js.map +1 -1
  36. package/dist/components/NSInputSearch.js.map +1 -1
  37. package/dist/components/NSInputText.js.map +1 -1
  38. package/dist/components/NSInputTime.js.map +1 -1
  39. package/dist/components/NSLayout.d.ts +4 -1
  40. package/dist/components/NSLayout.js +2 -1
  41. package/dist/components/NSLayout.js.map +1 -1
  42. package/dist/components/NSLayoutHeroBanner.d.ts +3 -3
  43. package/dist/components/NSLayoutHeroBanner.js +1 -1
  44. package/dist/components/NSLayoutHeroBanner.js.map +1 -1
  45. package/dist/components/NSLayoutTitle.d.ts +3 -4
  46. package/dist/components/NSLayoutTitle.js +2 -2
  47. package/dist/components/NSLayoutTitle.js.map +1 -1
  48. package/dist/components/NSLinkBlue.d.ts +2 -2
  49. package/dist/components/NSLinkBlue.js.map +1 -1
  50. package/dist/components/NSLinkGreen.d.ts +2 -1
  51. package/dist/components/NSLinkGreen.js.map +1 -1
  52. package/dist/components/NSLinkRed.d.ts +2 -1
  53. package/dist/components/NSLinkRed.js.map +1 -1
  54. package/dist/components/NSLoading.d.ts +2 -2
  55. package/dist/components/NSLoading.js.map +1 -1
  56. package/dist/components/NSNotification.d.ts +22 -0
  57. package/dist/components/NSNotification.js +32 -0
  58. package/dist/components/NSNotification.js.map +1 -0
  59. package/dist/components/NSNotification.module.css +32 -0
  60. package/dist/components/NSPagination.d.ts +2 -1
  61. package/dist/components/NSPagination.js.map +1 -1
  62. package/dist/components/NSPanel.d.ts +2 -1
  63. package/dist/components/NSPanel.js.map +1 -1
  64. package/dist/components/NSSection.d.ts +2 -1
  65. package/dist/components/NSSection.js.map +1 -1
  66. package/dist/components/NSSectionBars.d.ts +2 -1
  67. package/dist/components/NSSectionBars.js.map +1 -1
  68. package/dist/components/NSSectionCards.d.ts +2 -1
  69. package/dist/components/NSSectionCards.js.map +1 -1
  70. package/dist/components/NSSectionTitle.d.ts +2 -1
  71. package/dist/components/NSSectionTitle.js.map +1 -1
  72. package/dist/components/NSSelectBox.d.ts +8 -4
  73. package/dist/components/NSSelectBox.js +11 -3
  74. package/dist/components/NSSelectBox.js.map +1 -1
  75. package/dist/components/NSSpace.d.ts +2 -1
  76. package/dist/components/NSSpace.js.map +1 -1
  77. package/dist/components/NSTable.d.ts +2 -1
  78. package/dist/components/NSTable.js.map +1 -1
  79. package/dist/components/NSTitle.d.ts +2 -1
  80. package/dist/components/NSTitle.js.map +1 -1
  81. package/dist/main.d.ts +2 -2
  82. package/dist/main.js +2 -2
  83. package/dist/main.js.map +1 -1
  84. package/dist/props/NSButtonProps.d.ts +2 -1
  85. package/package.json +3 -3
  86. package/src/App.tsx +3 -24
  87. package/src/components/NSButton.tsx +5 -3
  88. package/src/components/NSButtonBlue.tsx +2 -1
  89. package/src/components/NSButtonBlueVector.tsx +2 -1
  90. package/src/components/NSButtonGreen.tsx +2 -1
  91. package/src/components/NSButtonRed.tsx +2 -1
  92. package/src/components/NSCard.tsx +2 -1
  93. package/src/components/NSCopyToClipboard.tsx +3 -3
  94. package/src/components/NSEntityBar.tsx +4 -2
  95. package/src/components/NSEntityCardBackground.tsx +2 -2
  96. package/src/components/NSFooter.tsx +9 -8
  97. package/src/components/NSHeader.tsx +9 -8
  98. package/src/components/NSInputDate.tsx +20 -15
  99. package/src/components/NSInputDuration.tsx +10 -9
  100. package/src/components/NSInputEmail.tsx +2 -0
  101. package/src/components/NSInputErrorNotifier.tsx +28 -0
  102. package/src/components/NSInputFloat.tsx +1 -1
  103. package/src/components/NSInputIP.tsx +4 -3
  104. package/src/components/NSInputInteger.tsx +2 -1
  105. package/src/components/NSInputPhone.tsx +2 -1
  106. package/src/components/NSInputPrice.tsx +2 -1
  107. package/src/components/NSInputSearch.tsx +3 -3
  108. package/src/components/NSInputText.tsx +2 -1
  109. package/src/components/NSInputTime.tsx +2 -1
  110. package/src/components/NSLayout.tsx +5 -1
  111. package/src/components/NSLayoutHeroBanner.tsx +4 -6
  112. package/src/components/NSLayoutTitle.tsx +4 -6
  113. package/src/components/NSLinkBlue.tsx +2 -3
  114. package/src/components/NSLinkGreen.tsx +2 -1
  115. package/src/components/NSLinkRed.tsx +2 -1
  116. package/src/components/NSLoading.tsx +2 -1
  117. package/src/components/NSNotification.module.css +32 -0
  118. package/src/components/{NSMessenger.tsx → NSNotification.tsx} +18 -7
  119. package/src/components/NSPagination.tsx +14 -13
  120. package/src/components/NSPanel.tsx +7 -5
  121. package/src/components/NSSection.tsx +2 -1
  122. package/src/components/NSSectionBars.tsx +2 -1
  123. package/src/components/NSSectionCards.tsx +3 -2
  124. package/src/components/NSSectionTitle.tsx +2 -1
  125. package/src/components/NSSelectBox.tsx +21 -8
  126. package/src/components/NSSpace.tsx +3 -1
  127. package/src/components/NSTable.tsx +2 -1
  128. package/src/components/NSTitle.tsx +2 -1
  129. package/src/main.ts +2 -2
  130. package/src/props/NSButtonProps.ts +2 -1
  131. package/dist/components/NSError.d.ts +0 -11
  132. package/dist/components/NSError.js +0 -14
  133. package/dist/components/NSError.js.map +0 -1
  134. package/dist/components/NSMessenger.d.ts +0 -14
  135. package/dist/components/NSMessenger.js +0 -23
  136. package/dist/components/NSMessenger.js.map +0 -1
  137. package/dist/components/NSMessenger.module.css +0 -16
  138. package/src/components/NSError.tsx +0 -42
  139. package/src/components/NSMessenger.module.css +0 -16
  140. /package/dist/components/{NSError.module.css → NSInputErrorNotifier.module.css} +0 -0
  141. /package/src/components/{NSError.module.css → NSInputErrorNotifier.module.css} +0 -0
@@ -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
- <ul
112
- key={filter.id}
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
- <li className="mb-2">
123
- <a key={filter.id} href={filter.link?.url}>
124
- {filter.name}
125
- </a>
126
- </li>
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
- src=
97
- {
98
- this.state.showNavbar ?
99
- "https://static.namirasoft.com/icons/base/close-menu.svg"
100
- : "https://static.namirasoft.com/icons/base/menu.svg"
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
- <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
+ <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);
@@ -42,22 +45,24 @@ export class NSInputDate extends React.Component<NSInputDateProps, NSInputDateSt
42
45
  if (this.props.onChanged)
43
46
  this.props.onChanged(e);
44
47
  }
45
-
46
48
  override render()
47
49
  {
48
50
  return (
49
- <div className={`${Styles.ns_parent_input} p-2 ${this.props.classList?.join(" ")}`} style={this.props.style}>
50
- <span className={Styles.ns_input_title}>{this.props.title}</span>
51
- <input
52
- value={this.state.value}
53
- onChange={this.onChanged}
54
- type="date"
55
- className={Styles.ns_input}
56
- placeholder={this.props.placeholder}
57
- id="ns-input-date"
58
- onClick={()=>{}}
59
- />
60
- </div>
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
+ </>
61
66
  );
62
67
  }
63
68
  }
@@ -7,8 +7,8 @@ import { BaseComponentProps } from "../props/BaseComponentProps";
7
7
 
8
8
  export interface NSInputDurationProps extends BaseComponentProps
9
9
  {
10
- title: string;
11
- defaultValue?: string;
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
- getValue(): string
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
- override render()
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
- onChange={this.onChanged}
61
+ onChange={this.onChanged}
61
62
  type="time"
62
63
  className={Styles.ns_input}
63
64
  placeholder={this.props.placeholder}
@@ -7,6 +7,7 @@ import { Validator } from "../Validator";
7
7
  import { ValidationProps } from "../props/ValidationProps";
8
8
  import { ValidationStringProps } from "../props/ValidationStringProps";
9
9
  import { BaseComponentProps } from "../props/BaseComponentProps";
10
+ import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
10
11
 
11
12
  export interface NSInputEmailProps extends BaseComponentProps, ValidationProps, ValidationStringProps
12
13
  {
@@ -77,6 +78,7 @@ export class NSInputEmail extends React.Component<NSInputEmailProps, NSInputEmai
77
78
  placeholder={this.props.placeholder}
78
79
  />
79
80
  </div>
81
+ <NSInputErrorNotifier error={this.state.error} />
80
82
  </>
81
83
  );
82
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
- title: string;
11
- defaultValue?: string;
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
- this.setValue = this.setValue.bind(this);
30
- this.onChanged = this.onChanged.bind(this);
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
- // import { NSHeader } from './NSHeader';
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 scope={props.scope} logo={props.logo} >
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 scope={this.props.scope} logo={this.props.logo} background={this.props.background}>
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>
@@ -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 "./NSMessenger.module.css";
5
+ import Styles from "./NSNotification.module.css";
6
+ import { BaseComponentProps } from "../props/BaseComponentProps";
6
7
 
7
- export interface NSMessengerProps
8
+ export interface NSNotificationProps extends BaseComponentProps
8
9
  {
9
10
  title: string;
10
- success: boolean;
11
+ type: NSNotificationType;
11
12
  }
12
13
 
13
- export interface NSMessengerState
14
+ export interface NSNotificationState
14
15
  {
15
16
  show: boolean;
16
17
  }
17
18
 
18
- export class NSMessenger extends React.Component<NSMessengerProps, NSMessengerState>
19
+ export enum NSNotificationType
19
20
  {
20
- constructor(props: NSMessengerProps)
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} "" ${this.props.success == true ? Styles.ns_green : Styles.ns_red}`}>
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
- <img
52
- src='https://static.namirasoft.com/icons/base/circle-chevron-left.png'
53
- alt='left_vector'
54
- width={32}
55
- height={32}
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
- <img
80
- src='https://static.namirasoft.com/icons/base/circle-chevron-right.png'
81
- width={32}
82
- height={32}
83
- alt='right_vector'
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
  );