namirasoft-site-react 1.3.59 → 1.3.61

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 (192) hide show
  1. package/dist/App.js +2 -15
  2. package/dist/App.js.map +1 -1
  3. package/dist/components/NSButton.d.ts +2 -10
  4. package/dist/components/NSButton.js +2 -9
  5. package/dist/components/NSButton.js.map +1 -1
  6. package/dist/components/NSButton.module.css +8 -7
  7. package/dist/components/NSButtonBlue.d.ts +2 -13
  8. package/dist/components/NSButtonBlue.js +6 -13
  9. package/dist/components/NSButtonBlue.js.map +1 -1
  10. package/dist/components/NSButtonBlue.module.css +0 -8
  11. package/dist/components/NSButtonGreen.d.ts +2 -13
  12. package/dist/components/NSButtonGreen.js +6 -13
  13. package/dist/components/NSButtonGreen.js.map +1 -1
  14. package/dist/components/NSButtonGreen.module.css +0 -8
  15. package/dist/components/NSButtonRed.d.ts +2 -13
  16. package/dist/components/NSButtonRed.js +7 -14
  17. package/dist/components/NSButtonRed.js.map +1 -1
  18. package/dist/components/NSButtonRed.module.css +0 -8
  19. package/dist/components/NSCard.d.ts +5 -10
  20. package/dist/components/NSCard.js +12 -16
  21. package/dist/components/NSCard.js.map +1 -1
  22. package/dist/components/NSCopyToClipboard.d.ts +3 -9
  23. package/dist/components/NSCopyToClipboard.js +6 -14
  24. package/dist/components/NSCopyToClipboard.js.map +1 -1
  25. package/dist/components/NSCopyToClipboard.module.css +1 -1
  26. package/dist/components/NSEntityBar.d.ts +5 -10
  27. package/dist/components/NSEntityBar.js +3 -6
  28. package/dist/components/NSEntityBar.js.map +1 -1
  29. package/dist/components/NSEntityBar.module.css +1 -1
  30. package/dist/components/NSEntityCardBackground.d.ts +3 -12
  31. package/dist/components/NSEntityCardBackground.js +4 -23
  32. package/dist/components/NSEntityCardBackground.js.map +1 -1
  33. package/dist/components/NSFooter.d.ts +2 -1
  34. package/dist/components/NSFooter.js +2 -1
  35. package/dist/components/NSFooter.js.map +1 -1
  36. package/dist/components/NSHeader.d.ts +3 -3
  37. package/dist/components/NSHeader.js +9 -4
  38. package/dist/components/NSHeader.js.map +1 -1
  39. package/dist/components/NSInputDate.d.ts +1 -0
  40. package/dist/components/NSInputDate.js +4 -3
  41. package/dist/components/NSInputDate.js.map +1 -1
  42. package/dist/components/NSInputDuration.js.map +1 -1
  43. package/dist/components/NSInputEmail.js +2 -1
  44. package/dist/components/NSInputEmail.js.map +1 -1
  45. package/dist/components/NSInputErrorNotifier.d.ts +5 -0
  46. package/dist/components/NSInputErrorNotifier.js +7 -0
  47. package/dist/components/NSInputErrorNotifier.js.map +1 -0
  48. package/dist/components/NSInputIP.js.map +1 -1
  49. package/dist/components/NSInputInteger.js.map +1 -1
  50. package/dist/components/NSInputPhone.js.map +1 -1
  51. package/dist/components/NSInputPrice.js.map +1 -1
  52. package/dist/components/NSInputSearch.js.map +1 -1
  53. package/dist/components/NSInputText.js.map +1 -1
  54. package/dist/components/NSInputTime.js.map +1 -1
  55. package/dist/components/NSLayout.d.ts +4 -1
  56. package/dist/components/NSLayout.js +3 -2
  57. package/dist/components/NSLayout.js.map +1 -1
  58. package/dist/components/NSLayoutHeroBanner.d.ts +3 -3
  59. package/dist/components/NSLayoutHeroBanner.js +1 -1
  60. package/dist/components/NSLayoutHeroBanner.js.map +1 -1
  61. package/dist/components/NSLayoutTitle.d.ts +3 -4
  62. package/dist/components/NSLayoutTitle.js +2 -2
  63. package/dist/components/NSLayoutTitle.js.map +1 -1
  64. package/dist/components/NSLinkBlue.d.ts +3 -11
  65. package/dist/components/NSLinkBlue.js +3 -17
  66. package/dist/components/NSLinkBlue.js.map +1 -1
  67. package/dist/components/NSLinkGreen.d.ts +2 -1
  68. package/dist/components/NSLinkGreen.js.map +1 -1
  69. package/dist/components/NSLinkRed.d.ts +2 -1
  70. package/dist/components/NSLinkRed.js.map +1 -1
  71. package/dist/components/NSLoading.d.ts +3 -8
  72. package/dist/components/NSLoading.js +2 -6
  73. package/dist/components/NSLoading.js.map +1 -1
  74. package/dist/components/NSNotification.d.ts +22 -0
  75. package/dist/components/NSNotification.js +32 -0
  76. package/dist/components/NSNotification.js.map +1 -0
  77. package/dist/components/NSNotification.module.css +32 -0
  78. package/dist/components/NSPagination.d.ts +3 -2
  79. package/dist/components/NSPagination.js +2 -1
  80. package/dist/components/NSPagination.js.map +1 -1
  81. package/dist/components/NSPanel.d.ts +4 -8
  82. package/dist/components/NSPanel.js +3 -9
  83. package/dist/components/NSPanel.js.map +1 -1
  84. package/dist/components/NSSection.d.ts +4 -11
  85. package/dist/components/NSSection.js +6 -25
  86. package/dist/components/NSSection.js.map +1 -1
  87. package/dist/components/NSSectionBars.d.ts +3 -7
  88. package/dist/components/NSSectionBars.js +4 -8
  89. package/dist/components/NSSectionBars.js.map +1 -1
  90. package/dist/components/NSSectionCards.d.ts +7 -15
  91. package/dist/components/NSSectionCards.js +7 -11
  92. package/dist/components/NSSectionCards.js.map +1 -1
  93. package/dist/components/NSSectionTitle.d.ts +6 -11
  94. package/dist/components/NSSectionTitle.js +2 -6
  95. package/dist/components/NSSectionTitle.js.map +1 -1
  96. package/dist/components/NSSelectBox.d.ts +8 -4
  97. package/dist/components/NSSelectBox.js +11 -3
  98. package/dist/components/NSSelectBox.js.map +1 -1
  99. package/dist/components/NSSpace.d.ts +2 -1
  100. package/dist/components/NSSpace.js +2 -1
  101. package/dist/components/NSSpace.js.map +1 -1
  102. package/dist/components/NSTable.d.ts +2 -1
  103. package/dist/components/NSTable.js +2 -1
  104. package/dist/components/NSTable.js.map +1 -1
  105. package/dist/components/NSTitle.d.ts +3 -7
  106. package/dist/components/NSTitle.js +3 -6
  107. package/dist/components/NSTitle.js.map +1 -1
  108. package/dist/main.d.ts +2 -3
  109. package/dist/main.js +2 -3
  110. package/dist/main.js.map +1 -1
  111. package/dist/pages/NSLoginPage.d.ts +2 -3
  112. package/dist/pages/NSLoginPage.js +4 -3
  113. package/dist/pages/NSLoginPage.js.map +1 -1
  114. package/dist/props/BaseComponentProps.d.ts +1 -0
  115. package/package.json +2 -3
  116. package/src/App.tsx +4 -25
  117. package/src/components/NSButton.module.css +8 -7
  118. package/src/components/NSButton.tsx +8 -24
  119. package/src/components/NSButtonBlue.module.css +0 -8
  120. package/src/components/NSButtonBlue.tsx +7 -28
  121. package/src/components/NSButtonGreen.module.css +0 -8
  122. package/src/components/NSButtonGreen.tsx +7 -28
  123. package/src/components/NSButtonRed.module.css +0 -8
  124. package/src/components/NSButtonRed.tsx +8 -29
  125. package/src/components/NSCard.tsx +51 -57
  126. package/src/components/NSCopyToClipboard.module.css +1 -1
  127. package/src/components/NSCopyToClipboard.tsx +23 -37
  128. package/src/components/NSEntityBar.module.css +1 -1
  129. package/src/components/NSEntityBar.tsx +20 -24
  130. package/src/components/NSEntityCardBackground.tsx +24 -58
  131. package/src/components/NSFooter.tsx +13 -9
  132. package/src/components/NSHeader.tsx +25 -15
  133. package/src/components/NSInputDate.tsx +22 -15
  134. package/src/components/NSInputDuration.tsx +10 -9
  135. package/src/components/NSInputEmail.tsx +2 -0
  136. package/src/components/NSInputErrorNotifier.tsx +28 -0
  137. package/src/components/NSInputFloat.tsx +1 -1
  138. package/src/components/NSInputIP.tsx +4 -3
  139. package/src/components/NSInputInteger.tsx +2 -1
  140. package/src/components/NSInputPhone.tsx +2 -1
  141. package/src/components/NSInputPrice.tsx +2 -1
  142. package/src/components/NSInputSearch.tsx +3 -3
  143. package/src/components/NSInputText.tsx +2 -1
  144. package/src/components/NSInputTime.tsx +2 -1
  145. package/src/components/NSLayout.tsx +8 -4
  146. package/src/components/NSLayoutHeroBanner.tsx +4 -7
  147. package/src/components/NSLayoutTitle.tsx +4 -6
  148. package/src/components/NSLinkBlue.tsx +14 -35
  149. package/src/components/NSLinkGreen.tsx +2 -1
  150. package/src/components/NSLinkRed.tsx +2 -1
  151. package/src/components/NSLoading.tsx +10 -18
  152. package/src/components/NSNotification.module.css +32 -0
  153. package/src/components/NSNotification.tsx +72 -0
  154. package/src/components/NSPagination.tsx +18 -16
  155. package/src/components/NSPanel.tsx +14 -23
  156. package/src/components/NSSection.tsx +15 -40
  157. package/src/components/NSSectionBars.tsx +14 -23
  158. package/src/components/NSSectionCards.tsx +33 -47
  159. package/src/components/NSSectionTitle.tsx +13 -22
  160. package/src/components/NSSelectBox.tsx +21 -8
  161. package/src/components/NSSpace.tsx +6 -2
  162. package/src/components/NSTable.tsx +7 -4
  163. package/src/components/NSTitle.tsx +12 -16
  164. package/src/main.ts +2 -3
  165. package/src/pages/NSLoginPage.tsx +8 -6
  166. package/src/props/BaseComponentProps.ts +1 -0
  167. package/dist/components/NSButtonBlueVector.d.ts +0 -15
  168. package/dist/components/NSButtonBlueVector.js +0 -17
  169. package/dist/components/NSButtonBlueVector.js.map +0 -1
  170. package/dist/components/NSButtonBlueVector.module.css +0 -17
  171. package/dist/components/NSError.d.ts +0 -11
  172. package/dist/components/NSError.js +0 -14
  173. package/dist/components/NSError.js.map +0 -1
  174. package/dist/components/NSMessenger.d.ts +0 -14
  175. package/dist/components/NSMessenger.js +0 -23
  176. package/dist/components/NSMessenger.js.map +0 -1
  177. package/dist/components/NSMessenger.module.css +0 -16
  178. package/dist/props/BackgroundProps.d.ts +0 -6
  179. package/dist/props/BackgroundProps.js +0 -2
  180. package/dist/props/BackgroundProps.js.map +0 -1
  181. package/dist/props/NSButtonProps.d.ts +0 -10
  182. package/dist/props/NSButtonProps.js +0 -2
  183. package/dist/props/NSButtonProps.js.map +0 -1
  184. package/src/components/NSButtonBlueVector.module.css +0 -17
  185. package/src/components/NSButtonBlueVector.tsx +0 -41
  186. package/src/components/NSError.tsx +0 -42
  187. package/src/components/NSMessenger.module.css +0 -16
  188. package/src/components/NSMessenger.tsx +0 -56
  189. package/src/props/BackgroundProps.ts +0 -7
  190. package/src/props/NSButtonProps.ts +0 -11
  191. /package/dist/components/{NSError.module.css → NSInputErrorNotifier.module.css} +0 -0
  192. /package/src/components/{NSError.module.css → NSInputErrorNotifier.module.css} +0 -0
@@ -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';
4
+ import { BaseComponentProps } from "../props/BaseComponentProps";
8
5
 
9
-
10
- export interface NSEntityCardBackgroundProps
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 class NSEntityCardBackground extends Component<NSEntityCardBackgroundProps, NSEntityCardBackgroundState>
12
+ export function NSEntityCardBackground(props: NSEntityCardBackgroundProps)
25
13
  {
26
-
27
- constructor(props: NSEntityCardBackgroundProps)
28
- {
29
- super(props);
30
- this.state = {
31
- background: {
32
- image: `url(${props.background?.image})`,
33
- color: props.background?.color,
34
- position: props.background?.position
35
- }
36
- }
37
- }
38
-
39
- override render()
40
- {
41
- return (
42
- <>
43
- <article className={Styles.card_background}
44
- style=
45
- {{
46
- backgroundImage: this.state.background?.image,
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
  }
@@ -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;
@@ -45,7 +46,10 @@ export class NSFooter extends React.Component<NSFooterProps, NSFooterState>
45
46
  override render()
46
47
  {
47
48
  return (
48
- <footer className={Styles.ns_footer}>
49
+ <footer id={this.props.id}
50
+ className={`${Styles.ns_footer} ${this.props.classList?.join(" ")}`}
51
+ style={this.props.style}
52
+ >
49
53
  <div className={`container ${Styles.ns_package_footer}`}>
50
54
  <div className={`${Styles.ns_footer_parent_items}`}>
51
55
  <div className={`${Styles.ns_footer_project_logo_tablet}`}>
@@ -108,8 +112,8 @@ export class NSFooter extends React.Component<NSFooterProps, NSFooterState>
108
112
  else if (level === 0)
109
113
  {
110
114
  return (<>
111
- <ul
112
- key={filter.id}
115
+ <ul
116
+ key={filter.id}
113
117
  id={`dropdown_parent${filter.id}`}>
114
118
  {filter.name}
115
119
  </ul>
@@ -119,11 +123,11 @@ export class NSFooter extends React.Component<NSFooterProps, NSFooterState>
119
123
  else
120
124
  {
121
125
  return (
122
- <li className="mb-2">
123
- <a key={filter.id} href={filter.link?.url}>
124
- {filter.name}
125
- </a>
126
- </li>
126
+ <li className="mb-2">
127
+ <a key={filter.id} href={filter.link?.url}>
128
+ {filter.name}
129
+ </a>
130
+ </li>
127
131
  );
128
132
  }
129
133
  }
@@ -4,15 +4,15 @@ 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";
7
+ import { BaseComponentProps } from "../props/BaseComponentProps";
8
8
 
9
- export interface NSHeaderProps
9
+ export interface NSHeaderProps extends BaseComponentProps
10
10
  {
11
11
  scope: string;
12
12
  name: string;
13
13
  logo: string;
14
14
  account?: boolean;
15
- background?: BackgroundProps;
15
+ nav?: BaseComponentProps
16
16
  }
17
17
 
18
18
  export interface NSHeaderState
@@ -61,12 +61,22 @@ export class NSHeader extends React.Component<NSHeaderProps, NSHeaderState>
61
61
  }
62
62
  override render()
63
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)";
64
71
  return (
65
- <header className={Styles.ns_header}>
66
- <nav className={Styles.ns_navbar}
67
- style={{
68
- backgroundColor: this.props.background?.color ? this.props.background?.color : "rgba(20, 27, 92, 1)"
69
- }}
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}
70
80
  >
71
81
  <div className={`${Styles.ns_navbar_parent_content} container`}>
72
82
  <a href="/">
@@ -93,12 +103,12 @@ export class NSHeader extends React.Component<NSHeaderProps, NSHeaderState>
93
103
  }
94
104
  <div className={Styles.ns_navbar_menu_icon} onClick={this.handleShowNavbar}>
95
105
  <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
- }
106
+ src=
107
+ {
108
+ this.state.showNavbar ?
109
+ "https://static.namirasoft.com/icons/base/close-menu.svg"
110
+ : "https://static.namirasoft.com/icons/base/menu.svg"
111
+ }
102
112
  alt="Menu"
103
113
  width={19}
104
114
  height={17}
@@ -147,7 +157,7 @@ export class NSHeader extends React.Component<NSHeaderProps, NSHeaderState>
147
157
  } else
148
158
  {
149
159
  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>
160
+ <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
161
  );
152
162
  }
153
163
  }
@@ -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,26 @@ 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(" ")}`}
53
+ style={this.props.style}
54
+ >
55
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
56
+ <input
57
+ value={this.state.value}
58
+ onChange={this.onChanged}
59
+ type="date"
60
+ className={Styles.ns_input}
61
+ placeholder={this.props.placeholder}
62
+ id={this.props.id}
63
+ onClick={() => { }}
64
+ />
65
+ </div>
66
+ <NSInputErrorNotifier error={this.state.error} />
67
+ </>
61
68
  );
62
69
  }
63
70
  }
@@ -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);
@@ -1,23 +1,27 @@
1
- "use client";
2
-
3
1
  import Styles from './NSLayout.module.css';
4
2
  import { ReactNode } from 'react';
5
3
  import { NSHeader } from './NSHeader';
6
4
  import { NSFooter } from './NSFooter';
5
+ import { BaseComponentProps } from '../props/BaseComponentProps';
6
+ import { NSNotification, NSNotificationProps } from './NSNotification';
7
7
 
8
- export interface NSLayoutProps
8
+ export interface NSLayoutProps extends BaseComponentProps
9
9
  {
10
10
  scope: string;
11
11
  logo: string;
12
12
  background?: string;
13
+ notifications: NSNotificationProps[];
13
14
  children: ReactNode;
14
15
  }
15
16
 
16
17
  export function NSLayout(props: NSLayoutProps)
17
18
  {
18
19
  return (
19
- <div className={Styles.ns_container}>
20
+ <div id={props.id}
21
+ className={`${Styles.ns_container} ${props.classList?.join(" ")}`}
22
+ style={props.style}>
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,9 +18,8 @@ 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
- {/* <NSHeader name='Header' scope='Namira Software Corporation' logo='https://static.namirasoft.com/logo/namirasoft/base.png' /> */}
26
23
  <section className={Styles.hero_wraper}>
27
24
  <div className="container mx-auto px-4 lg:px-12">
28
25
  <div className="flex flex-wrap lg:flex-nowrap justify-center lg:justify-between">
@@ -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,43 +1,22 @@
1
- "use client";
2
-
1
+ import { BaseComponentProps } from "../props/BaseComponentProps";
3
2
  import { LinkProps } from "../props/LinkProps";
4
3
  import Styles from "./NSLinkBlue.module.css";
5
- import React from "react";
6
-
7
- export interface NSLinkBlueProps extends LinkProps
8
- {
9
- style?: React.CSSProperties;
10
- }
11
4
 
12
- export interface NSLinkBlueState extends LinkProps
5
+ export interface NSLinkBlueProps extends LinkProps, BaseComponentProps
13
6
  {
14
-
15
7
  }
16
8
 
17
- export class NSLinkBlue extends React.Component<NSLinkBlueProps, NSLinkBlueState>
9
+ export function NSLinkBlue(props: NSLinkBlueProps)
18
10
  {
19
- constructor(props: NSLinkBlueProps)
20
- {
21
- super(props);
22
- this.state = { title: props.title, href: props.href, target: props.target };
23
- }
24
- setTitle(title: string)
25
- {
26
- this.setState({ title });
27
- }
28
- setHRef(href: string)
29
- {
30
- this.setState({ href });
31
- }
32
- override render()
33
- {
34
- return (
35
-
36
- <div className={Styles.ns_link_parent} style={this.props.style}>
37
- <a className={`text-white text-decoration-none ${this.props.title ? Styles.ns_link : Styles.ns_link_absolute}`} href={this.state.href} target={this.state?.target ?? "_self"} >
38
- {this.state.title}
39
- </a>
40
- </div>
41
- )
42
- }
11
+ return (
12
+ <div
13
+ id={props.id}
14
+ className={Styles.ns_link_parent}
15
+ style={props.style}
16
+ >
17
+ <a className={`text-white text-decoration-none ${props.title ? Styles.ns_link : Styles.ns_link_absolute}`} href={props.href} target={props?.target ?? "_self"} >
18
+ {props.title}
19
+ </a>
20
+ </div>
21
+ )
43
22
  }
@@ -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;