namirasoft-site-react 1.3.60 → 1.3.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/App.js +2 -2
  2. package/dist/App.js.map +1 -1
  3. package/dist/Validator.d.ts +7 -2
  4. package/dist/Validator.js +57 -15
  5. package/dist/Validator.js.map +1 -1
  6. package/dist/components/NSButton.d.ts +0 -9
  7. package/dist/components/NSButton.js +2 -9
  8. package/dist/components/NSButton.js.map +1 -1
  9. package/dist/components/NSButton.module.css +8 -7
  10. package/dist/components/NSButtonBlue.d.ts +2 -14
  11. package/dist/components/NSButtonBlue.js +7 -13
  12. package/dist/components/NSButtonBlue.js.map +1 -1
  13. package/dist/components/NSButtonBlue.module.css +0 -8
  14. package/dist/components/NSButtonGreen.d.ts +2 -14
  15. package/dist/components/NSButtonGreen.js +7 -13
  16. package/dist/components/NSButtonGreen.js.map +1 -1
  17. package/dist/components/NSButtonGreen.module.css +0 -8
  18. package/dist/components/NSButtonRed.d.ts +2 -14
  19. package/dist/components/NSButtonRed.js +8 -14
  20. package/dist/components/NSButtonRed.js.map +1 -1
  21. package/dist/components/NSButtonRed.module.css +0 -8
  22. package/dist/components/NSCard.d.ts +3 -9
  23. package/dist/components/NSCard.js +12 -16
  24. package/dist/components/NSCard.js.map +1 -1
  25. package/dist/components/NSCopyToClipboard.d.ts +1 -8
  26. package/dist/components/NSCopyToClipboard.js +6 -14
  27. package/dist/components/NSCopyToClipboard.js.map +1 -1
  28. package/dist/components/NSCopyToClipboard.module.css +1 -1
  29. package/dist/components/NSEntityBar.d.ts +3 -9
  30. package/dist/components/NSEntityBar.js +3 -6
  31. package/dist/components/NSEntityBar.js.map +1 -1
  32. package/dist/components/NSEntityBar.module.css +1 -1
  33. package/dist/components/NSEntityCardBackground.d.ts +1 -11
  34. package/dist/components/NSEntityCardBackground.js +4 -23
  35. package/dist/components/NSEntityCardBackground.js.map +1 -1
  36. package/dist/components/NSFooter.js +2 -1
  37. package/dist/components/NSFooter.js.map +1 -1
  38. package/dist/components/NSHeader.d.ts +1 -2
  39. package/dist/components/NSHeader.js +9 -4
  40. package/dist/components/NSHeader.js.map +1 -1
  41. package/dist/components/NSInput.module.css +29 -0
  42. package/dist/components/NSInputDate.d.ts +3 -1
  43. package/dist/components/NSInputDate.js +14 -4
  44. package/dist/components/NSInputDate.js.map +1 -1
  45. package/dist/components/NSInputDate.module.css +4 -1
  46. package/dist/components/NSInputDuration.d.ts +6 -1
  47. package/dist/components/NSInputDuration.js +15 -6
  48. package/dist/components/NSInputDuration.js.map +1 -1
  49. package/dist/components/NSInputEmail.d.ts +1 -1
  50. package/dist/components/NSInputEmail.js +5 -3
  51. package/dist/components/NSInputEmail.js.map +1 -1
  52. package/dist/components/NSInputFloat.d.ts +4 -4
  53. package/dist/components/NSInputFloat.js +8 -9
  54. package/dist/components/NSInputFloat.js.map +1 -1
  55. package/dist/components/NSInputIP.d.ts +5 -1
  56. package/dist/components/NSInputIP.js +17 -7
  57. package/dist/components/NSInputIP.js.map +1 -1
  58. package/dist/components/NSInputInteger.d.ts +9 -5
  59. package/dist/components/NSInputInteger.js +16 -8
  60. package/dist/components/NSInputInteger.js.map +1 -1
  61. package/dist/components/NSInputPassword.d.ts +5 -1
  62. package/dist/components/NSInputPassword.js +15 -6
  63. package/dist/components/NSInputPassword.js.map +1 -1
  64. package/dist/components/NSInputPhone.d.ts +8 -3
  65. package/dist/components/NSInputPhone.js +18 -12
  66. package/dist/components/NSInputPhone.js.map +1 -1
  67. package/dist/components/NSInputPrice.d.ts +7 -2
  68. package/dist/components/NSInputPrice.js +15 -7
  69. package/dist/components/NSInputPrice.js.map +1 -1
  70. package/dist/components/NSInputSearch.d.ts +6 -1
  71. package/dist/components/NSInputSearch.js +15 -6
  72. package/dist/components/NSInputSearch.js.map +1 -1
  73. package/dist/components/NSInputString.d.ts +5 -1
  74. package/dist/components/NSInputString.js +15 -6
  75. package/dist/components/NSInputString.js.map +1 -1
  76. package/dist/components/NSInputText.d.ts +5 -1
  77. package/dist/components/NSInputText.js +15 -6
  78. package/dist/components/NSInputText.js.map +1 -1
  79. package/dist/components/NSInputTime.d.ts +5 -1
  80. package/dist/components/NSInputTime.js +16 -6
  81. package/dist/components/NSInputTime.js.map +1 -1
  82. package/dist/components/NSLayout.js +2 -2
  83. package/dist/components/NSLayout.js.map +1 -1
  84. package/dist/components/NSLayoutHeroBanner.js.map +1 -1
  85. package/dist/components/NSLinkBlue.d.ts +1 -9
  86. package/dist/components/NSLinkBlue.js +3 -17
  87. package/dist/components/NSLinkBlue.js.map +1 -1
  88. package/dist/components/NSLoading.d.ts +1 -6
  89. package/dist/components/NSLoading.js +2 -6
  90. package/dist/components/NSLoading.js.map +1 -1
  91. package/dist/components/NSNotification.js +2 -2
  92. package/dist/components/NSNotification.js.map +1 -1
  93. package/dist/components/NSPagination.d.ts +1 -1
  94. package/dist/components/NSPagination.js +2 -1
  95. package/dist/components/NSPagination.js.map +1 -1
  96. package/dist/components/NSPanel.d.ts +2 -7
  97. package/dist/components/NSPanel.js +3 -9
  98. package/dist/components/NSPanel.js.map +1 -1
  99. package/dist/components/NSSection.d.ts +2 -10
  100. package/dist/components/NSSection.js +6 -25
  101. package/dist/components/NSSection.js.map +1 -1
  102. package/dist/components/NSSectionBars.d.ts +2 -6
  103. package/dist/components/NSSectionBars.js +4 -8
  104. package/dist/components/NSSectionBars.js.map +1 -1
  105. package/dist/components/NSSectionCards.d.ts +4 -14
  106. package/dist/components/NSSectionCards.js +7 -11
  107. package/dist/components/NSSectionCards.js.map +1 -1
  108. package/dist/components/NSSectionTitle.d.ts +3 -10
  109. package/dist/components/NSSectionTitle.js +2 -6
  110. package/dist/components/NSSectionTitle.js.map +1 -1
  111. package/dist/components/NSSelectBox.d.ts +6 -3
  112. package/dist/components/NSSelectBox.js +21 -6
  113. package/dist/components/NSSelectBox.js.map +1 -1
  114. package/dist/components/NSSpace.js +2 -1
  115. package/dist/components/NSSpace.js.map +1 -1
  116. package/dist/components/NSTable.js +2 -1
  117. package/dist/components/NSTable.js.map +1 -1
  118. package/dist/components/NSTitle.d.ts +1 -6
  119. package/dist/components/NSTitle.js +3 -6
  120. package/dist/components/NSTitle.js.map +1 -1
  121. package/dist/main.d.ts +0 -1
  122. package/dist/main.js +0 -1
  123. package/dist/main.js.map +1 -1
  124. package/dist/pages/NSLoginPage.d.ts +2 -3
  125. package/dist/pages/NSLoginPage.js +4 -3
  126. package/dist/pages/NSLoginPage.js.map +1 -1
  127. package/dist/props/BaseComponentProps.d.ts +1 -0
  128. package/dist/props/ValidationNumberProps.d.ts +1 -2
  129. package/dist/props/ValidationProps.d.ts +1 -0
  130. package/dist/props/ValidationStringProps.d.ts +1 -2
  131. package/package.json +3 -4
  132. package/src/App.tsx +14 -4
  133. package/src/Validator.ts +67 -18
  134. package/src/components/NSButton.module.css +8 -7
  135. package/src/components/NSButton.tsx +6 -24
  136. package/src/components/NSButtonBlue.module.css +0 -8
  137. package/src/components/NSButtonBlue.tsx +8 -28
  138. package/src/components/NSButtonGreen.module.css +0 -8
  139. package/src/components/NSButtonGreen.tsx +8 -29
  140. package/src/components/NSButtonRed.module.css +0 -8
  141. package/src/components/NSButtonRed.tsx +9 -30
  142. package/src/components/NSCard.tsx +49 -56
  143. package/src/components/NSCopyToClipboard.module.css +1 -1
  144. package/src/components/NSCopyToClipboard.tsx +21 -35
  145. package/src/components/NSEntityBar.module.css +1 -1
  146. package/src/components/NSEntityBar.tsx +17 -23
  147. package/src/components/NSEntityCardBackground.tsx +22 -56
  148. package/src/components/NSFooter.tsx +4 -1
  149. package/src/components/NSHeader.tsx +16 -7
  150. package/src/components/NSInput.module.css +29 -0
  151. package/src/components/NSInputDate.module.css +4 -1
  152. package/src/components/NSInputDate.tsx +29 -10
  153. package/src/components/NSInputDuration.tsx +44 -23
  154. package/src/components/NSInputEmail.tsx +10 -5
  155. package/src/components/NSInputFloat.tsx +33 -32
  156. package/src/components/NSInputIP.tsx +44 -24
  157. package/src/components/NSInputInteger.tsx +48 -31
  158. package/src/components/NSInputPassword.tsx +42 -23
  159. package/src/components/NSInputPhone.tsx +45 -29
  160. package/src/components/NSInputPrice.tsx +45 -23
  161. package/src/components/NSInputSearch.tsx +43 -21
  162. package/src/components/NSInputString.tsx +42 -23
  163. package/src/components/NSInputText.tsx +42 -23
  164. package/src/components/NSInputTime.tsx +44 -23
  165. package/src/components/NSLayout.tsx +3 -3
  166. package/src/components/NSLayoutHeroBanner.tsx +0 -1
  167. package/src/components/NSLinkBlue.tsx +12 -32
  168. package/src/components/NSLoading.tsx +8 -17
  169. package/src/components/NSNotification.tsx +19 -14
  170. package/src/components/NSPagination.tsx +4 -3
  171. package/src/components/NSPanel.tsx +10 -21
  172. package/src/components/NSSection.tsx +13 -39
  173. package/src/components/NSSectionBars.tsx +13 -22
  174. package/src/components/NSSectionCards.tsx +30 -45
  175. package/src/components/NSSectionTitle.tsx +10 -20
  176. package/src/components/NSSelectBox.tsx +48 -23
  177. package/src/components/NSSpace.tsx +3 -1
  178. package/src/components/NSTable.tsx +6 -4
  179. package/src/components/NSTitle.tsx +10 -15
  180. package/src/main.ts +0 -1
  181. package/src/pages/NSLoginPage.tsx +8 -6
  182. package/src/props/BaseComponentProps.ts +1 -0
  183. package/src/props/ValidationNumberProps.ts +1 -3
  184. package/src/props/ValidationProps.ts +1 -0
  185. package/src/props/ValidationStringProps.ts +1 -3
  186. package/dist/components/NSButtonBlueVector.d.ts +0 -16
  187. package/dist/components/NSButtonBlueVector.js +0 -17
  188. package/dist/components/NSButtonBlueVector.js.map +0 -1
  189. package/dist/components/NSButtonBlueVector.module.css +0 -17
  190. package/dist/components/NSInputDuration.module.css +0 -26
  191. package/dist/components/NSInputEmail.module.css +0 -38
  192. package/dist/components/NSInputFloat.module.css +0 -26
  193. package/dist/components/NSInputIP.module.css +0 -26
  194. package/dist/components/NSInputInteger.module.css +0 -26
  195. package/dist/components/NSInputPassword.module.css +0 -27
  196. package/dist/components/NSInputPhone.module.css +0 -33
  197. package/dist/components/NSInputPrice.module.css +0 -27
  198. package/dist/components/NSInputSearch.module.css +0 -27
  199. package/dist/components/NSInputString.module.css +0 -27
  200. package/dist/components/NSInputText.module.css +0 -28
  201. package/dist/components/NSInputTime.module.css +0 -27
  202. package/dist/props/BackgroundProps.d.ts +0 -6
  203. package/dist/props/BackgroundProps.js +0 -2
  204. package/dist/props/BackgroundProps.js.map +0 -1
  205. package/dist/props/NSButtonProps.d.ts +0 -11
  206. package/dist/props/NSButtonProps.js +0 -2
  207. package/dist/props/NSButtonProps.js.map +0 -1
  208. package/src/components/NSButtonBlueVector.module.css +0 -17
  209. package/src/components/NSButtonBlueVector.tsx +0 -42
  210. package/src/components/NSInputDuration.module.css +0 -26
  211. package/src/components/NSInputEmail.module.css +0 -38
  212. package/src/components/NSInputFloat.module.css +0 -26
  213. package/src/components/NSInputIP.module.css +0 -26
  214. package/src/components/NSInputInteger.module.css +0 -26
  215. package/src/components/NSInputPassword.module.css +0 -27
  216. package/src/components/NSInputPhone.module.css +0 -33
  217. package/src/components/NSInputPrice.module.css +0 -27
  218. package/src/components/NSInputSearch.module.css +0 -27
  219. package/src/components/NSInputString.module.css +0 -27
  220. package/src/components/NSInputText.module.css +0 -28
  221. package/src/components/NSInputTime.module.css +0 -27
  222. package/src/props/BackgroundProps.ts +0 -7
  223. package/src/props/NSButtonProps.ts +0 -12
package/dist/App.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import './App.css';
3
3
  import 'bootstrap/dist/css/bootstrap.min.css';
4
- import { NSFooter, NSHeader, NSTable, NSInputDate, NSCopyToClipboard } from './main';
4
+ import { NSFooter, NSHeader, NSTable, NSButtonBlue, NSButtonGreen, NSButtonRed } from './main';
5
5
  export function App() {
6
6
  let columns = {
7
7
  "id": "ID",
@@ -28,6 +28,6 @@ export function App() {
28
28
  status: "Done"
29
29
  }
30
30
  ];
31
- return (_jsxs(_Fragment, { children: [_jsx(NSHeader, { name: 'Header', scope: 'Namira Software Corporation', logo: 'https://static.namirasoft.com/logo/namirasoft/base.png', account: false, background: { color: "transparent !important" } }), _jsxs("div", { className: "container", children: [_jsx(NSInputDate, { title: "rrt" }), _jsx(NSCopyToClipboard, { title: 'rrt', value: "rrr" }), _jsx(NSTable, { columns: columns, rows: rows, getRowKey: row => row.id.toString() })] }), _jsx(NSFooter, { name: 'Footer', scope: 'Namira Software Corporation', logo: 'https://static.namirasoft.com/logo/namirasoft/base.png' })] }));
31
+ return (_jsxs(_Fragment, { children: [_jsx(NSHeader, { name: 'Header', scope: 'Namira Software Corporation', logo: 'https://static.namirasoft.com/logo/namirasoft/base.png', account: false, style: { backgroundColor: "transparent !important" } }), _jsxs("div", { className: "container", children: [_jsx(NSButtonBlue, { title: "Cancel Deletion", onClick: () => { } }), _jsx(NSButtonGreen, { title: "Cancel Deletion", onClick: () => { } }), _jsx(NSButtonRed, { title: "Cancel Deletion", onClick: () => { } }), _jsx(NSTable, { columns: columns, rows: rows, getRowKey: row => row.id.toString() })] }), _jsx(NSFooter, { name: 'Footer', scope: 'Namira Software Corporation', logo: 'https://static.namirasoft.com/logo/namirasoft/base.png' })] }));
32
32
  }
33
33
  //# sourceMappingURL=App.js.map
package/dist/App.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAErF,MAAM,UAAU,GAAG;IAEf,IAAI,OAAO,GAAG;QACV,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QA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C,QAAQ,EAAC,KAAK,EAAC,6BAA6B,EAAC,IAAI,EAAC,wDAAwD,GAAG,IAC7H,CACN,CAAC;AACN,CAAC"}
@@ -2,8 +2,13 @@ import { ValidationNumberProps } from "./props/ValidationNumberProps";
2
2
  import { ValidationProps } from "./props/ValidationProps";
3
3
  import { ValidationStringProps } from "./props/ValidationStringProps";
4
4
  export declare class Validator {
5
- static getError(name: string, value: string | null | undefined, validator: ValidationProps): string | null;
5
+ static getError(name: string, value: string | number | null | undefined, validator: ValidationProps): string | null;
6
6
  static getErrorString(name: string, value: string | null | undefined, validator: ValidationStringProps): string | null;
7
- static getErrorNumber(name: string, value: string | null | undefined, validator: ValidationNumberProps): string | null;
7
+ static getErrorNumber(name: string, value: number | null | undefined, validator: ValidationNumberProps): string | null;
8
8
  static getErrorEmail(name: string, value: string | null | undefined): string | null;
9
+ static getErrorDate(name: string, value: string | null | undefined): string | null;
10
+ static getErrorTime(name: string, value: string | null | undefined): string | null;
11
+ static getErrorDuration(name: string, value: string | null | undefined): string | null;
12
+ static getErrorIP(name: string, value: string | null | undefined): string | null;
13
+ static getErrorPhone(name: string, value: string | null | undefined): string | null;
9
14
  }
package/dist/Validator.js CHANGED
@@ -1,19 +1,23 @@
1
+ import { PhoneOperation, RegexTemplate } from "namirasoft-core";
1
2
  export class Validator {
2
3
  static getError(name, value, validator) {
3
4
  if (validator.required)
4
5
  if (!value)
5
6
  return `${name} is required.`;
6
- if (value)
7
+ if (value != null)
7
8
  if (validator.regex)
8
- if (!validator.regex.regex.test(value))
9
+ if (!validator.regex.regex.test(value + ""))
9
10
  return `${name} is not a valid ${validator.regex.name}.`;
11
+ if (value != null)
12
+ if (validator.validator) {
13
+ let error = validator.validator(name, value);
14
+ if (error)
15
+ return error;
16
+ }
10
17
  return null;
11
18
  }
12
19
  static getErrorString(name, value, validator) {
13
- let error = this.getError(name, value, validator);
14
- if (error)
15
- return error;
16
- if (value) {
20
+ if (value != null) {
17
21
  if (validator.max_length != null)
18
22
  if (validator.max_length < value.length)
19
23
  return `Max length of ${name} should be ${validator.max_length} characters.`;
@@ -24,18 +28,14 @@ export class Validator {
24
28
  return null;
25
29
  }
26
30
  static getErrorNumber(name, value, validator) {
27
- let error = this.getError(name, value, validator);
28
- if (error)
29
- return error;
30
- if (value) {
31
- let numValue = parseFloat(value);
32
- if (isNaN(numValue))
31
+ if (value != null) {
32
+ if (isNaN(value))
33
33
  return `${name} is not a number.`;
34
34
  if (validator.max != null)
35
- if (validator.max < numValue)
35
+ if (validator.max < value)
36
36
  return `Max value of ${name} should be ${validator.max} characters.`;
37
37
  if (validator.min != null)
38
- if (validator.min > numValue)
38
+ if (validator.min > value)
39
39
  return `Min value of ${name} should be ${validator.min} characters.`;
40
40
  }
41
41
  return null;
@@ -44,7 +44,49 @@ export class Validator {
44
44
  return Validator.getError(name, value, {
45
45
  required: true, regex: {
46
46
  name: "Email",
47
- regex: /^[\w]+@([\w]+\.)+\w{2,}$/gm
47
+ regex: RegexTemplate.Email
48
+ }
49
+ });
50
+ }
51
+ static getErrorDate(name, value) {
52
+ return Validator.getError(name, value, {
53
+ required: true, regex: {
54
+ name: "Date",
55
+ regex: RegexTemplate.Date
56
+ }
57
+ });
58
+ }
59
+ static getErrorTime(name, value) {
60
+ return Validator.getError(name, value, {
61
+ required: true, regex: {
62
+ name: "Time",
63
+ regex: RegexTemplate.Time
64
+ }
65
+ });
66
+ }
67
+ static getErrorDuration(name, value) {
68
+ return Validator.getError(name, value, {
69
+ required: true, regex: {
70
+ name: "Duration",
71
+ regex: RegexTemplate.Duration
72
+ }
73
+ });
74
+ }
75
+ static getErrorIP(name, value) {
76
+ return Validator.getError(name, value, {
77
+ required: true, regex: {
78
+ name: "IP",
79
+ regex: RegexTemplate.IP
80
+ }
81
+ });
82
+ }
83
+ static getErrorPhone(name, value) {
84
+ return Validator.getError(name, value, {
85
+ required: true, validator: () => {
86
+ if (value)
87
+ if (!PhoneOperation.isValid(value))
88
+ return `${name} is not a valid phone number`;
89
+ return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QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE;YACnC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE;gBACnB,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,aAAa,CAAC,EAAE;aAC1B;SACJ,CAAC,CAAC;IACP,CAAC;IACD,MAAM,CAAC,aAAa,CAAC,IAAY,EAAE,KAAgC;QAE/D,OAAO,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE;YACnC,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE;gBAE5B,IAAI,KAAK;oBACL,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC;wBAC9B,OAAO,GAAG,IAAI,8BAA8B,CAAC;gBACrD,OAAO,IAAI,CAAC;YAChB,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -1,18 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { BackgroundProps } from "../props/BackgroundProps";
3
2
  import { BaseComponentProps } from "../props/BaseComponentProps";
4
3
  import { ImageProps } from "../props/ImageProps";
5
4
  export interface NSButtonProps extends BaseComponentProps {
6
5
  title: string;
7
- border?: string;
8
- background?: BackgroundProps;
9
6
  icon?: ImageProps;
10
7
  onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
11
8
  }
12
- export interface NSButtonState {
13
- title: string;
14
- border?: string;
15
- background?: BackgroundProps;
16
- icon?: ImageProps;
17
- }
18
9
  export default function NSButton(props: NSButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,8 @@
1
- "use client";
2
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import Styles from "./NSButton.module.css";
4
3
  export default function NSButton(props) {
5
- var _a, _b, _c, _d;
6
- return (_jsxs("button", { onClick: (e) => { props.onClick(e); }, className: Styles.ns_button, style: {
7
- border: props.border,
8
- backgroundColor: (_a = props.background) === null || _a === void 0 ? void 0 : _a.color,
9
- backgroundImage: (_b = props.background) === null || _b === void 0 ? void 0 : _b.image,
10
- backdropFilter: (_c = props.background) === null || _c === void 0 ? void 0 : _c.filter,
11
- backgroundPosition: (_d = props.background) === null || _d === void 0 ? void 0 : _d.position,
12
- }, children: [props.icon && _jsx("img", { src: props.icon.src, alt: props.icon.alt }), props.title] }));
4
+ var _a;
5
+ return (_jsxs("button", { id: props.id, className: `${Styles.ns_button} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, onClick: (e) => { props.onClick(e); }, children: [props.icon && _jsx("img", Object.assign({}, props.icon)), props.title] }));
13
6
  }
14
7
  ;
15
8
  //# sourceMappingURL=NSButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSButton.js","sourceRoot":"","sources":["../../src/components/NSButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAKb,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAmB3C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;;IAEjD,OAAO,CACH,kBAAQ,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EACrE,KAAK,EAAE;YACH,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,eAAe,EAAE,MAAA,KAAK,CAAC,UAAU,0CAAE,KAAK;YACxC,eAAe,EAAE,MAAA,KAAK,CAAC,UAAU,0CAAE,KAAK;YACxC,cAAc,EAAE,MAAA,KAAK,CAAC,UAAU,0CAAE,MAAM;YACxC,kBAAkB,EAAE,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ;SACjD,aAEG,KAAK,CAAC,IAAI,IAAI,cAAK,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,GAAI,EAElE,KAAK,CAAC,KAAK,IACN,CACb,CAAC;AACN,CAAC;AAAA,CAAC"}
1
+ {"version":3,"file":"NSButton.js","sourceRoot":"","sources":["../../src/components/NSButton.tsx"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAS3C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;;IAEjD,OAAO,CACH,kBAAQ,EAAE,EAAE,KAAK,CAAC,EAAE,EAChB,SAAS,EAAE,GAAG,MAAM,CAAC,SAAS,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAC9D,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA,CAAC,CAAC,aAEnC,KAAK,CAAC,IAAI,IAAI,8BAAS,KAAK,CAAC,IAAI,EAAI,EACrC,KAAK,CAAC,KAAK,IACN,CACb,CAAC;AACN,CAAC;AAAA,CAAC"}
@@ -1,13 +1,14 @@
1
1
  .ns_button {
2
- display: flex;
3
2
  align-items: center;
4
- justify-content: center;
5
- font-size: 16px;
3
+ background-color: transparent;
6
4
  border-radius: 8px;
7
- gap: 10px;
8
- text-decoration: none;
5
+ box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
9
6
  color: black;
10
- background-color: transparent;
11
- width: 128px;
7
+ font-size: 16px;
8
+ font-weight: 400;
12
9
  height: 48px;
10
+ justify-content: center;
11
+ text-decoration: none;
12
+ max-width: 100%;
13
+ width: 128px;
13
14
  }
@@ -1,14 +1,2 @@
1
- import React from "react";
2
- import { BaseComponentProps } from "../props/BaseComponentProps";
3
- export interface NSButtonBlueProps extends BaseComponentProps {
4
- title: string;
5
- onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
6
- }
7
- export interface NSButtonBlueState {
8
- title: string;
9
- }
10
- export declare class NSButtonBlue extends React.Component<NSButtonBlueProps, NSButtonBlueState> {
11
- constructor(props: NSButtonBlueProps);
12
- setTitle(title: string): void;
13
- render(): import("react/jsx-runtime").JSX.Element;
14
- }
1
+ import { NSButtonProps } from "./NSButton";
2
+ export declare function NSButtonBlue(props: NSButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,11 @@
1
- "use client";
2
1
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from "react";
2
+ import NSButton from "./NSButton";
4
3
  import Style from "./NSButtonBlue.module.css";
5
- export class NSButtonBlue extends React.Component {
6
- constructor(props) {
7
- super(props);
8
- this.state = { title: props.title };
9
- }
10
- setTitle(title) {
11
- this.setState({ title });
12
- }
13
- render() {
14
- return _jsx("button", { onClick: e => this.props.onClick(e), className: Style.ns_button_blue, children: this.state.title });
15
- }
4
+ export function NSButtonBlue(props) {
5
+ let classList = [];
6
+ if (props.classList)
7
+ classList.push(...props.classList);
8
+ classList.push(Style.ns_button_blue);
9
+ return _jsx(NSButton, { title: props.title, icon: props.icon, onClick: props.onClick, id: props.id, classList: classList, style: props.style });
16
10
  }
17
11
  //# sourceMappingURL=NSButtonBlue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSButtonBlue.js","sourceRoot":"","sources":["../../src/components/NSButtonBlue.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,2BAA2B,CAAC;AAc9C,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,SAA+C;IAEnF,YAAY,KAAwB;QAEhC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACQ,MAAM;QAEX,OAAO,iBAAQ,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,cAAc,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAU,CAAC;IACrH,CAAC;CACJ"}
1
+ {"version":3,"file":"NSButtonBlue.js","sourceRoot":"","sources":["../../src/components/NSButtonBlue.tsx"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,2BAA2B,CAAC;AAG9C,MAAM,UAAU,YAAY,CAAC,KAAoB;IAE7C,IAAI,SAAS,GAAG,EAAE,CAAA;IAClB,IAAI,KAAK,CAAC,SAAS;QACf,SAAS,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;IACvC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAErC,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,CAAC;AAC9I,CAAC"}
@@ -1,12 +1,4 @@
1
1
  .ns_button_blue {
2
- width: 358px;
3
- max-width: 100%;
4
- height: 48px;
5
- border-radius: 8px;
6
2
  background-color: rgba(3, 119, 255, 1);
7
- color: #fff;
8
- border: 0;
9
3
  box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
10
- font-size: 16px;
11
- font-weight: 400;
12
4
  }
@@ -1,14 +1,2 @@
1
- import React from "react";
2
- import { BaseComponentProps } from "../props/BaseComponentProps";
3
- export interface NSButtonGreenProps extends BaseComponentProps {
4
- title: string;
5
- onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
6
- }
7
- export interface NSButtonGreenState {
8
- title: string;
9
- }
10
- export declare class NSButtonGreen extends React.Component<NSButtonGreenProps, NSButtonGreenState> {
11
- constructor(props: NSButtonGreenProps);
12
- setTitle(title: string): void;
13
- render(): import("react/jsx-runtime").JSX.Element;
14
- }
1
+ import { NSButtonProps } from "./NSButton";
2
+ export declare function NSButtonGreen(props: NSButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,11 @@
1
- "use client";
2
1
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from "react";
2
+ import NSButton from "./NSButton";
4
3
  import Style from "./NSButtonGreen.module.css";
5
- export class NSButtonGreen extends React.Component {
6
- constructor(props) {
7
- super(props);
8
- this.state = { title: props.title };
9
- }
10
- setTitle(title) {
11
- this.setState({ title });
12
- }
13
- render() {
14
- return _jsx("button", { onClick: e => this.props.onClick(e), className: Style.ns_button_green, children: this.state.title });
15
- }
4
+ export function NSButtonGreen(props) {
5
+ let classList = [];
6
+ if (props.classList)
7
+ classList.push(...props.classList);
8
+ classList.push(Style.ns_button_green);
9
+ return _jsx(NSButton, { title: props.title, icon: props.icon, onClick: props.onClick, id: props.id, classList: classList, style: props.style });
16
10
  }
17
11
  //# sourceMappingURL=NSButtonGreen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSButtonGreen.js","sourceRoot":"","sources":["../../src/components/NSButtonGreen.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAc/C,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAEtF,YAAY,KAAyB;QAEjC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACQ,MAAM;QAEX,OAAO,iBAAQ,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,eAAe,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAU,CAAC;IACtH,CAAC;CACJ"}
1
+ {"version":3,"file":"NSButtonGreen.js","sourceRoot":"","sources":["../../src/components/NSButtonGreen.tsx"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAG/C,MAAM,UAAU,aAAa,CAAC,KAAoB;IAE9C,IAAI,SAAS,GAAG,EAAE,CAAA;IAClB,IAAI,KAAK,CAAC,SAAS;QACf,SAAS,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;IACvC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACtC,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,CAAC;AAC9I,CAAC"}
@@ -1,12 +1,4 @@
1
1
  .ns_button_green {
2
- width: 358px;
3
- max-width: 100%;
4
- height: 48px;
5
- border-radius: 8px;
6
2
  background-color: #06D182;
7
- color: #fff;
8
- border: 0;
9
3
  box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
10
- font-size: 16px;
11
- font-weight: 400;
12
4
  }
@@ -1,14 +1,2 @@
1
- import React from "react";
2
- import { BaseComponentProps } from "../props/BaseComponentProps";
3
- export interface NSButtonRedProps extends BaseComponentProps {
4
- title: string;
5
- onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
6
- }
7
- export interface NSButtonRedState {
8
- title: string;
9
- }
10
- export declare class NSButtonRed extends React.Component<NSButtonRedProps, NSButtonRedState> {
11
- constructor(props: NSButtonRedProps);
12
- setTitle(title: string): void;
13
- render(): import("react/jsx-runtime").JSX.Element;
14
- }
1
+ import { NSButtonProps } from "./NSButton";
2
+ export declare function NSButtonRed(props: NSButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,11 @@
1
- "use client";
2
1
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from "react";
4
- import Style from "./NSButtonRed.module.css";
5
- export class NSButtonRed extends React.Component {
6
- constructor(props) {
7
- super(props);
8
- this.state = { title: props.title };
9
- }
10
- setTitle(title) {
11
- this.setState({ title });
12
- }
13
- render() {
14
- return _jsx("button", { onClick: e => this.props.onClick(e), className: Style.ns_button_red, children: this.state.title });
15
- }
2
+ import NSButton from "./NSButton";
3
+ import Style from "./NSButtonGreen.module.css";
4
+ export function NSButtonRed(props) {
5
+ let classList = [];
6
+ if (props.classList)
7
+ classList.push(...props.classList);
8
+ classList.push(Style.ns_button_red);
9
+ return _jsx(NSButton, { title: props.title, icon: props.icon, onClick: props.onClick, id: props.id, classList: classList, style: props.style });
16
10
  }
17
11
  //# sourceMappingURL=NSButtonRed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSButtonRed.js","sourceRoot":"","sources":["../../src/components/NSButtonRed.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,0BAA0B,CAAC;AAc7C,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAA6C;IAEhF,YAAY,KAAuB;QAE/B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACQ,MAAM;QAEX,OAAO,iBAAQ,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,aAAa,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAU,CAAC;IACpH,CAAC;CACJ"}
1
+ {"version":3,"file":"NSButtonRed.js","sourceRoot":"","sources":["../../src/components/NSButtonRed.tsx"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAG/C,MAAM,UAAU,WAAW,CAAC,KAAoB;IAE5C,IAAI,SAAS,GAAG,EAAE,CAAA;IAClB,IAAI,KAAK,CAAC,SAAS;QACf,SAAS,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;IACvC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACpC,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,CAAC;AAC9I,CAAC"}
@@ -1,12 +1,4 @@
1
1
  .ns_button_red {
2
- width: 358px;
3
- max-width: 100%;
4
- height: 48px;
5
- border-radius: 8px;
6
2
  background-color: #FF3F3F;
7
- color: #fff;
8
- border: 0;
9
3
  box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
10
- font-size: 16px;
11
- font-weight: 400;
12
4
  }
@@ -1,20 +1,14 @@
1
- import { Component } from 'react';
2
1
  import { LinkProps } from '../props/LinkProps';
3
2
  import { BaseComponentProps } from "../props/BaseComponentProps";
3
+ import { ImageProps } from '../props/ImageProps';
4
4
  export interface NSCardProps extends BaseComponentProps {
5
- id?: string | number;
6
5
  title?: string;
7
6
  headline?: {
8
7
  color?: string;
9
8
  text: string;
10
9
  };
11
10
  description?: string;
12
- image: {
13
- src: string;
14
- alt: string;
15
- };
11
+ image: ImageProps;
16
12
  link?: LinkProps;
17
13
  }
18
- export declare class NSCard extends Component<NSCardProps> {
19
- render(): import("react/jsx-runtime").JSX.Element;
20
- }
14
+ export declare function NSCard(props: NSCardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,21 +1,17 @@
1
- "use client";
2
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { Component } from 'react';
4
2
  import Styles from './NSCard.module.css';
5
3
  import { NSLinkBlue } from './NSLinkBlue';
6
- export class NSCard extends Component {
7
- render() {
8
- var _a, _b;
9
- return (_jsx(_Fragment, { children: _jsxs("article", { className: Styles.ns_card, children: [_jsxs("div", { className: Styles.ns_card_detail_container, children: [_jsxs("div", { className: Styles.ns_card_title_img, style: {
10
- alignItems: this.props.description ? "flex-start" : "center",
11
- }, children: [_jsx("img", { className: Styles.ns_card_img, src: this.props.image.src, alt: this.props.image.alt }), _jsxs("span", { className: Styles.ns_card_headline, style: { color: (_a = this.props.headline) === null || _a === void 0 ? void 0 : _a.color }, children: [" ", (_b = this.props.headline) === null || _b === void 0 ? void 0 : _b.text, " "] }), _jsx("h3", { className: Styles.ns_card_title, children: this.props.title && this.props.title })] }), this.props.description &&
12
- _jsx("p", { className: Styles.ns_card_description, children: this.props.description })] }), this.props.link ?
13
- this.props.link.title ?
14
- _jsx("div", { className: Styles.ns_card_link_container, children: _jsx(NSLinkBlue, { title: this.props.link.title, href: this.props.link.href, target: this.props.link.target, style: { marginTop: "24px" } }) })
15
- :
16
- _jsx("div", { className: Styles.ns_card_link_container, children: _jsx(NSLinkBlue, { href: this.props.link.href, target: this.props.link.target }) })
17
- :
18
- _jsx(_Fragment, {})] }) }));
19
- }
4
+ export function NSCard(props) {
5
+ var _a, _b, _c;
6
+ return (_jsxs("article", { id: props.id, className: `${Styles.ns_card} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsxs("div", { className: Styles.ns_card_detail_container, children: [_jsxs("div", { className: Styles.ns_card_title_img, style: {
7
+ alignItems: props.description ? "flex-start" : "center",
8
+ }, children: [_jsx("img", Object.assign({ className: Styles.ns_card_img }, props.image)), _jsxs("span", { className: Styles.ns_card_headline, style: { color: (_b = props.headline) === null || _b === void 0 ? void 0 : _b.color }, children: [" ", (_c = props.headline) === null || _c === void 0 ? void 0 : _c.text, " "] }), _jsx("h3", { className: Styles.ns_card_title, children: props.title })] }), props.description &&
9
+ _jsx("p", { className: Styles.ns_card_description, children: props.description })] }), props.link ?
10
+ props.link.title ?
11
+ _jsx("div", { className: Styles.ns_card_link_container, children: _jsx(NSLinkBlue, { title: props.link.title, href: props.link.href, target: props.link.target, style: { marginTop: "24px" } }) })
12
+ :
13
+ _jsx("div", { className: Styles.ns_card_link_container, children: _jsx(NSLinkBlue, { href: props.link.href, target: props.link.target }) })
14
+ :
15
+ _jsx(_Fragment, {})] }));
20
16
  }
21
17
  //# sourceMappingURL=NSCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSCard.js","sourceRoot":"","sources":["../../src/components/NSCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,MAAM,OAAO,MAAO,SAAQ,SAAsB;IAExC,MAAM;;QAEd,OAAO,CACN,4BACC,mBAAS,SAAS,EAAE,MAAM,CAAC,OAAO,aACjC,eAAK,SAAS,EAAE,MAAM,CAAC,wBAAwB,aAC9C,eAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,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ACf,IAEA,EAEL,KAAK,CAAC,IAAI,CAAC,CAAC;gBACX,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBACjB,cAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,YAC5C,KAAC,UAAU,IACV,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,EACvB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EACrB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,EACzB,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAC3B,GACG;oBACN,CAAC;wBACD,cAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,YAC5C,KAAC,UAAU,IACV,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EACrB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,GACxB,GACG;gBACP,CAAC;oBACD,mBAAK,IAEG,CACX,CAAC;AACH,CAAC"}
@@ -1,13 +1,6 @@
1
- import React from "react";
2
1
  import { BaseComponentProps } from "../props/BaseComponentProps";
3
2
  export interface NSCopyToClipboardProps extends BaseComponentProps {
4
3
  title: string;
5
4
  value: string;
6
5
  }
7
- export interface NSCopyToClipboardState {
8
- }
9
- export declare class NSCopyToClipboard extends React.Component<NSCopyToClipboardProps, NSCopyToClipboardState> {
10
- constructor(props: NSCopyToClipboardProps);
11
- copyToClipboard(): void;
12
- render(): import("react/jsx-runtime").JSX.Element;
13
- }
6
+ export declare function NSCopyToClipboard(props: NSCopyToClipboardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,12 @@
1
- "use client";
2
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React from "react";
4
2
  import Styles from "./NSCopyToClipboard.module.css";
5
3
  import IconInputString from '../assets/images/icon-input-copy.svg';
6
- export class NSCopyToClipboard extends React.Component {
7
- constructor(props) {
8
- super(props);
9
- this.copyToClipboard = this.copyToClipboard.bind(this);
10
- }
11
- copyToClipboard() {
12
- if (navigator.clipboard && navigator.clipboard.writeText) {
13
- navigator.clipboard.writeText(this.props.value);
14
- }
15
- }
16
- render() {
17
- return (_jsxs("div", { className: `${Styles.ns_copy_to_clipboard} p-2`, children: [_jsx("span", { className: Styles.ns_copy_to_clipboard_title, children: this.props.title }), _jsxs("div", { className: Styles.ns_copy_to_clipboard_value, children: [_jsx("img", { className: Styles.ns_copy_to_clipboard_icon, src: IconInputString, alt: "icon", width: 16, height: 16, onClick: this.copyToClipboard }), _jsx("span", { children: this.props.value })] })] }));
4
+ export function NSCopyToClipboard(props) {
5
+ var _a;
6
+ function copyToClipboard() {
7
+ if (navigator.clipboard && navigator.clipboard.writeText)
8
+ navigator.clipboard.writeText(props.value);
18
9
  }
10
+ return (_jsxs("div", { id: props.id, className: `${Styles.ns_copy_to_clipboard} p-2 ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsx("span", { className: Styles.ns_copy_to_clipboard_title, children: props.title }), _jsxs("div", { className: Styles.ns_copy_to_clipboard_value, children: [_jsx("img", { className: Styles.ns_copy_to_clipboard_icon, src: IconInputString, alt: "icon", width: 16, height: 16, onClick: copyToClipboard }), _jsx("span", { children: props.value })] })] }));
19
11
  }
20
12
  //# sourceMappingURL=NSCopyToClipboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSCopyToClipboard.js","sourceRoot":"","sources":["../../src/components/NSCopyToClipboard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,gCAAgC,CAAC;AACpD,OAAO,eAAe,MAAM,sCAAsC,CAAC;AAYnE,MAAM,OAAO,iBAAkB,SAAQ,KAAK,CAAC,SAAyD;IAElG,YAAY,KAA6B;QAErC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CA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,CAAC,EAAE,EAC7E,KAAK,EAAE,KAAK,CAAC,KAAK,aAElB,eAAM,SAAS,EAAE,MAAM,CAAC,0BAA0B,YAAG,KAAK,CAAC,KAAK,GAAQ,EACxE,eAAK,SAAS,EAAE,MAAM,CAAC,0BAA0B,aAC7C,cACI,SAAS,EAAE,MAAM,CAAC,yBAAyB,EAC3C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAC,MAAM,EACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,OAAO,EAAE,eAAe,GAC1B,EACF,yBAAO,KAAK,CAAC,KAAK,GAAQ,IACxB,IACJ,CACT,CAAC;AACN,CAAC"}
@@ -27,7 +27,7 @@
27
27
  .ns_copy_to_clipboard_title {
28
28
  font-size: 24px;
29
29
  font-weight: 700;
30
- color:rgba(20, 27, 92, 1);
30
+ color: rgba(20, 27, 92, 1);
31
31
  text-align: center;
32
32
  margin-bottom: 16px;
33
33
  }
@@ -1,14 +1,8 @@
1
- import { Component } from 'react';
2
1
  import { BaseComponentProps } from "../props/BaseComponentProps";
2
+ import { ImageProps } from '../props/ImageProps';
3
3
  export interface NSEntityBarProps extends BaseComponentProps {
4
- id?: string | number;
5
4
  title: string;
6
5
  description: string;
7
- image: {
8
- src: string;
9
- alt: string;
10
- };
11
- }
12
- export declare class NSEntityBar extends Component<NSEntityBarProps> {
13
- render(): import("react/jsx-runtime").JSX.Element;
6
+ image: ImageProps;
14
7
  }
8
+ export declare function NSEntityBar(props: NSEntityBarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,7 @@
1
- "use client";
2
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Component } from 'react';
4
2
  import Styles from './NSEntityBar.module.css';
5
- export class NSEntityBar extends Component {
6
- render() {
7
- return (_jsxs("article", { className: Styles.ns_entity_bar_item, children: [_jsx("figure", { className: Styles.ns_entity_bar_image_container, children: _jsx("img", { className: Styles.ns_entity_bar_image, src: this.props.image.src, alt: this.props.image.alt, width: 310, height: 240 }) }), _jsxs("div", { className: Styles.ns_entity_bar_details_container, children: [_jsxs("h3", { className: Styles.ns_entity_bar_image_title, children: [" ", this.props.title, " "] }), _jsxs("p", { className: Styles.ns_entity_bar_image_description, children: [" ", this.props.description, " "] })] })] }));
8
- }
3
+ export function NSEntityBar(props) {
4
+ var _a;
5
+ return (_jsxs("article", { id: props.id, className: `${Styles.ns_entity_bar_item} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsx("figure", { className: Styles.ns_entity_bar_image_container, children: _jsx("img", Object.assign({ className: Styles.ns_entity_bar_image }, props.image, { width: 256, height: 256 })) }), _jsxs("div", { className: Styles.ns_entity_bar_details_container, children: [_jsxs("h3", { className: Styles.ns_entity_bar_image_title, children: [" ", props.title, " "] }), _jsxs("p", { className: Styles.ns_entity_bar_image_description, children: [" ", props.description, " "] })] })] }));
9
6
  }
10
7
  //# sourceMappingURL=NSEntityBar.js.map