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.
- package/dist/App.js +2 -2
- package/dist/App.js.map +1 -1
- package/dist/Validator.d.ts +7 -2
- package/dist/Validator.js +57 -15
- package/dist/Validator.js.map +1 -1
- package/dist/components/NSButton.d.ts +0 -9
- package/dist/components/NSButton.js +2 -9
- package/dist/components/NSButton.js.map +1 -1
- package/dist/components/NSButton.module.css +8 -7
- package/dist/components/NSButtonBlue.d.ts +2 -14
- package/dist/components/NSButtonBlue.js +7 -13
- package/dist/components/NSButtonBlue.js.map +1 -1
- package/dist/components/NSButtonBlue.module.css +0 -8
- package/dist/components/NSButtonGreen.d.ts +2 -14
- package/dist/components/NSButtonGreen.js +7 -13
- package/dist/components/NSButtonGreen.js.map +1 -1
- package/dist/components/NSButtonGreen.module.css +0 -8
- package/dist/components/NSButtonRed.d.ts +2 -14
- package/dist/components/NSButtonRed.js +8 -14
- package/dist/components/NSButtonRed.js.map +1 -1
- package/dist/components/NSButtonRed.module.css +0 -8
- package/dist/components/NSCard.d.ts +3 -9
- package/dist/components/NSCard.js +12 -16
- package/dist/components/NSCard.js.map +1 -1
- package/dist/components/NSCopyToClipboard.d.ts +1 -8
- package/dist/components/NSCopyToClipboard.js +6 -14
- package/dist/components/NSCopyToClipboard.js.map +1 -1
- package/dist/components/NSCopyToClipboard.module.css +1 -1
- package/dist/components/NSEntityBar.d.ts +3 -9
- package/dist/components/NSEntityBar.js +3 -6
- package/dist/components/NSEntityBar.js.map +1 -1
- package/dist/components/NSEntityBar.module.css +1 -1
- package/dist/components/NSEntityCardBackground.d.ts +1 -11
- package/dist/components/NSEntityCardBackground.js +4 -23
- package/dist/components/NSEntityCardBackground.js.map +1 -1
- package/dist/components/NSFooter.js +2 -1
- package/dist/components/NSFooter.js.map +1 -1
- package/dist/components/NSHeader.d.ts +1 -2
- package/dist/components/NSHeader.js +9 -4
- package/dist/components/NSHeader.js.map +1 -1
- package/dist/components/NSInput.module.css +29 -0
- package/dist/components/NSInputDate.d.ts +3 -1
- package/dist/components/NSInputDate.js +14 -4
- package/dist/components/NSInputDate.js.map +1 -1
- package/dist/components/NSInputDate.module.css +4 -1
- package/dist/components/NSInputDuration.d.ts +6 -1
- package/dist/components/NSInputDuration.js +15 -6
- package/dist/components/NSInputDuration.js.map +1 -1
- package/dist/components/NSInputEmail.d.ts +1 -1
- package/dist/components/NSInputEmail.js +5 -3
- package/dist/components/NSInputEmail.js.map +1 -1
- package/dist/components/NSInputFloat.d.ts +4 -4
- package/dist/components/NSInputFloat.js +8 -9
- package/dist/components/NSInputFloat.js.map +1 -1
- package/dist/components/NSInputIP.d.ts +5 -1
- package/dist/components/NSInputIP.js +17 -7
- package/dist/components/NSInputIP.js.map +1 -1
- package/dist/components/NSInputInteger.d.ts +9 -5
- package/dist/components/NSInputInteger.js +16 -8
- package/dist/components/NSInputInteger.js.map +1 -1
- package/dist/components/NSInputPassword.d.ts +5 -1
- package/dist/components/NSInputPassword.js +15 -6
- package/dist/components/NSInputPassword.js.map +1 -1
- package/dist/components/NSInputPhone.d.ts +8 -3
- package/dist/components/NSInputPhone.js +18 -12
- package/dist/components/NSInputPhone.js.map +1 -1
- package/dist/components/NSInputPrice.d.ts +7 -2
- package/dist/components/NSInputPrice.js +15 -7
- package/dist/components/NSInputPrice.js.map +1 -1
- package/dist/components/NSInputSearch.d.ts +6 -1
- package/dist/components/NSInputSearch.js +15 -6
- package/dist/components/NSInputSearch.js.map +1 -1
- package/dist/components/NSInputString.d.ts +5 -1
- package/dist/components/NSInputString.js +15 -6
- package/dist/components/NSInputString.js.map +1 -1
- package/dist/components/NSInputText.d.ts +5 -1
- package/dist/components/NSInputText.js +15 -6
- package/dist/components/NSInputText.js.map +1 -1
- package/dist/components/NSInputTime.d.ts +5 -1
- package/dist/components/NSInputTime.js +16 -6
- package/dist/components/NSInputTime.js.map +1 -1
- package/dist/components/NSLayout.js +2 -2
- package/dist/components/NSLayout.js.map +1 -1
- package/dist/components/NSLayoutHeroBanner.js.map +1 -1
- package/dist/components/NSLinkBlue.d.ts +1 -9
- package/dist/components/NSLinkBlue.js +3 -17
- package/dist/components/NSLinkBlue.js.map +1 -1
- package/dist/components/NSLoading.d.ts +1 -6
- package/dist/components/NSLoading.js +2 -6
- package/dist/components/NSLoading.js.map +1 -1
- package/dist/components/NSNotification.js +2 -2
- package/dist/components/NSNotification.js.map +1 -1
- package/dist/components/NSPagination.d.ts +1 -1
- package/dist/components/NSPagination.js +2 -1
- package/dist/components/NSPagination.js.map +1 -1
- package/dist/components/NSPanel.d.ts +2 -7
- package/dist/components/NSPanel.js +3 -9
- package/dist/components/NSPanel.js.map +1 -1
- package/dist/components/NSSection.d.ts +2 -10
- package/dist/components/NSSection.js +6 -25
- package/dist/components/NSSection.js.map +1 -1
- package/dist/components/NSSectionBars.d.ts +2 -6
- package/dist/components/NSSectionBars.js +4 -8
- package/dist/components/NSSectionBars.js.map +1 -1
- package/dist/components/NSSectionCards.d.ts +4 -14
- package/dist/components/NSSectionCards.js +7 -11
- package/dist/components/NSSectionCards.js.map +1 -1
- package/dist/components/NSSectionTitle.d.ts +3 -10
- package/dist/components/NSSectionTitle.js +2 -6
- package/dist/components/NSSectionTitle.js.map +1 -1
- package/dist/components/NSSelectBox.d.ts +6 -3
- package/dist/components/NSSelectBox.js +21 -6
- package/dist/components/NSSelectBox.js.map +1 -1
- package/dist/components/NSSpace.js +2 -1
- package/dist/components/NSSpace.js.map +1 -1
- package/dist/components/NSTable.js +2 -1
- package/dist/components/NSTable.js.map +1 -1
- package/dist/components/NSTitle.d.ts +1 -6
- package/dist/components/NSTitle.js +3 -6
- package/dist/components/NSTitle.js.map +1 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -1
- package/dist/main.js.map +1 -1
- package/dist/pages/NSLoginPage.d.ts +2 -3
- package/dist/pages/NSLoginPage.js +4 -3
- package/dist/pages/NSLoginPage.js.map +1 -1
- package/dist/props/BaseComponentProps.d.ts +1 -0
- package/dist/props/ValidationNumberProps.d.ts +1 -2
- package/dist/props/ValidationProps.d.ts +1 -0
- package/dist/props/ValidationStringProps.d.ts +1 -2
- package/package.json +3 -4
- package/src/App.tsx +14 -4
- package/src/Validator.ts +67 -18
- package/src/components/NSButton.module.css +8 -7
- package/src/components/NSButton.tsx +6 -24
- package/src/components/NSButtonBlue.module.css +0 -8
- package/src/components/NSButtonBlue.tsx +8 -28
- package/src/components/NSButtonGreen.module.css +0 -8
- package/src/components/NSButtonGreen.tsx +8 -29
- package/src/components/NSButtonRed.module.css +0 -8
- package/src/components/NSButtonRed.tsx +9 -30
- package/src/components/NSCard.tsx +49 -56
- package/src/components/NSCopyToClipboard.module.css +1 -1
- package/src/components/NSCopyToClipboard.tsx +21 -35
- package/src/components/NSEntityBar.module.css +1 -1
- package/src/components/NSEntityBar.tsx +17 -23
- package/src/components/NSEntityCardBackground.tsx +22 -56
- package/src/components/NSFooter.tsx +4 -1
- package/src/components/NSHeader.tsx +16 -7
- package/src/components/NSInput.module.css +29 -0
- package/src/components/NSInputDate.module.css +4 -1
- package/src/components/NSInputDate.tsx +29 -10
- package/src/components/NSInputDuration.tsx +44 -23
- package/src/components/NSInputEmail.tsx +10 -5
- package/src/components/NSInputFloat.tsx +33 -32
- package/src/components/NSInputIP.tsx +44 -24
- package/src/components/NSInputInteger.tsx +48 -31
- package/src/components/NSInputPassword.tsx +42 -23
- package/src/components/NSInputPhone.tsx +45 -29
- package/src/components/NSInputPrice.tsx +45 -23
- package/src/components/NSInputSearch.tsx +43 -21
- package/src/components/NSInputString.tsx +42 -23
- package/src/components/NSInputText.tsx +42 -23
- package/src/components/NSInputTime.tsx +44 -23
- package/src/components/NSLayout.tsx +3 -3
- package/src/components/NSLayoutHeroBanner.tsx +0 -1
- package/src/components/NSLinkBlue.tsx +12 -32
- package/src/components/NSLoading.tsx +8 -17
- package/src/components/NSNotification.tsx +19 -14
- package/src/components/NSPagination.tsx +4 -3
- package/src/components/NSPanel.tsx +10 -21
- package/src/components/NSSection.tsx +13 -39
- package/src/components/NSSectionBars.tsx +13 -22
- package/src/components/NSSectionCards.tsx +30 -45
- package/src/components/NSSectionTitle.tsx +10 -20
- package/src/components/NSSelectBox.tsx +48 -23
- package/src/components/NSSpace.tsx +3 -1
- package/src/components/NSTable.tsx +6 -4
- package/src/components/NSTitle.tsx +10 -15
- package/src/main.ts +0 -1
- package/src/pages/NSLoginPage.tsx +8 -6
- package/src/props/BaseComponentProps.ts +1 -0
- package/src/props/ValidationNumberProps.ts +1 -3
- package/src/props/ValidationProps.ts +1 -0
- package/src/props/ValidationStringProps.ts +1 -3
- package/dist/components/NSButtonBlueVector.d.ts +0 -16
- package/dist/components/NSButtonBlueVector.js +0 -17
- package/dist/components/NSButtonBlueVector.js.map +0 -1
- package/dist/components/NSButtonBlueVector.module.css +0 -17
- package/dist/components/NSInputDuration.module.css +0 -26
- package/dist/components/NSInputEmail.module.css +0 -38
- package/dist/components/NSInputFloat.module.css +0 -26
- package/dist/components/NSInputIP.module.css +0 -26
- package/dist/components/NSInputInteger.module.css +0 -26
- package/dist/components/NSInputPassword.module.css +0 -27
- package/dist/components/NSInputPhone.module.css +0 -33
- package/dist/components/NSInputPrice.module.css +0 -27
- package/dist/components/NSInputSearch.module.css +0 -27
- package/dist/components/NSInputString.module.css +0 -27
- package/dist/components/NSInputText.module.css +0 -28
- package/dist/components/NSInputTime.module.css +0 -27
- package/dist/props/BackgroundProps.d.ts +0 -6
- package/dist/props/BackgroundProps.js +0 -2
- package/dist/props/BackgroundProps.js.map +0 -1
- package/dist/props/NSButtonProps.d.ts +0 -11
- package/dist/props/NSButtonProps.js +0 -2
- package/dist/props/NSButtonProps.js.map +0 -1
- package/src/components/NSButtonBlueVector.module.css +0 -17
- package/src/components/NSButtonBlueVector.tsx +0 -42
- package/src/components/NSInputDuration.module.css +0 -26
- package/src/components/NSInputEmail.module.css +0 -38
- package/src/components/NSInputFloat.module.css +0 -26
- package/src/components/NSInputIP.module.css +0 -26
- package/src/components/NSInputInteger.module.css +0 -26
- package/src/components/NSInputPassword.module.css +0 -27
- package/src/components/NSInputPhone.module.css +0 -33
- package/src/components/NSInputPrice.module.css +0 -27
- package/src/components/NSInputSearch.module.css +0 -27
- package/src/components/NSInputString.module.css +0 -27
- package/src/components/NSInputText.module.css +0 -28
- package/src/components/NSInputTime.module.css +0 -27
- package/src/props/BackgroundProps.ts +0 -7
- 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,
|
|
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,
|
|
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,
|
|
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,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE/F,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,QAAQ;KACrB,CAAA;IACD,IAAI,IAAI,GAAG,CAAC;YACR,EAAE,EAAE,CAAC;YACL,OAAO,EAAE,oBAAoB;YAC7B,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,yCAAyC;YAClD,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM;SACjB;QACD;YACI,EAAE,EAAE,CAAC;YACL,OAAO,EAAE,oBAAoB;YAC7B,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,yCAAyC;YAClD,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM;SACjB;KACA,CAAA;IAUD,OAAO,CACH,8BACI,KAAC,QAAQ,IACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,6BAA6B,EACnC,IAAI,EAAC,wDAAwD,EAC7D,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,EAAE,eAAe,EAAE,wBAAwB,EAAE,GACtD,EACF,eAAK,SAAS,EAAC,WAAW,aACtB,KAAC,YAAY,IACT,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAE,GAAE,EAAE,GAAC,CAAC,GACjB,EACF,KAAC,aAAa,IACV,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAE,GAAE,EAAE,GAAC,CAAC,GACjB,EACF,KAAC,WAAW,IACR,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAE,GAAE,EAAE,GAAC,CAAC,GACjB,EACF,KAAC,OAAO,IAAM,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAI,IACjF,EACN,KAAC,QAAQ,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,6BAA6B,EAAC,IAAI,EAAC,wDAAwD,GAAG,IAC7H,CACN,CAAC;AACN,CAAC"}
|
package/dist/Validator.d.ts
CHANGED
|
@@ -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:
|
|
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
|
-
|
|
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
|
-
|
|
28
|
-
|
|
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 <
|
|
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 >
|
|
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:
|
|
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 null;
|
|
48
90
|
}
|
|
49
91
|
});
|
|
50
92
|
}
|
package/dist/Validator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Validator.js","sourceRoot":"","sources":["../src/Validator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Validator.js","sourceRoot":"","sources":["../src/Validator.ts"],"names":[],"mappings":"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"}
|
|
@@ -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
|
|
6
|
-
return (_jsxs("button", { onClick: (e) => { props.onClick(e); },
|
|
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":"
|
|
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
|
-
|
|
5
|
-
font-size: 16px;
|
|
3
|
+
background-color: transparent;
|
|
6
4
|
border-radius: 8px;
|
|
7
|
-
|
|
8
|
-
text-decoration: none;
|
|
5
|
+
box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
|
|
9
6
|
color: black;
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
2
|
-
|
|
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
|
|
2
|
+
import NSButton from "./NSButton";
|
|
4
3
|
import Style from "./NSButtonBlue.module.css";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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,
|
|
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
|
|
2
|
-
|
|
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
|
|
2
|
+
import NSButton from "./NSButton";
|
|
4
3
|
import Style from "./NSButtonGreen.module.css";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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,
|
|
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,14 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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
|
|
4
|
-
import Style from "./
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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,
|
|
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,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
|
|
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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"NSCard.js","sourceRoot":"","sources":["../../src/components/NSCard.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C,MAAM,UAAU,MAAM,CAAC,KAAkB;;IAExC,OAAO,CACN,mBAAS,EAAE,EAAE,KAAK,CAAC,EAAE,EACpB,SAAS,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAC5D,KAAK,EAAE,KAAK,CAAC,KAAK,aAElB,eAAK,SAAS,EAAE,MAAM,CAAC,wBAAwB,aAC9C,eAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,EACvC,KAAK,EAAE;4BACN,UAAU,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ;yBACvD,aAED,4BAAK,SAAS,EAAE,MAAM,CAAC,WAAW,IAAM,KAAK,CAAC,KAAK,EAAI,EACvD,gBAAM,SAAS,EAAE,MAAM,CAAC,gBAAgB,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAA,KAAK,CAAC,QAAQ,0CAAE,KAAK,EAAE,kBAAI,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,SAAS,EAClH,aAAI,SAAS,EAAE,MAAM,CAAC,aAAa,YACjC,KAAK,CAAC,KAAK,GACR,IACA,EAEL,KAAK,CAAC,WAAW;wBACjB,YAAG,SAAS,EAAE,MAAM,CAAC,mBAAmB,YACtC,KAAK,CAAC,WAAW,GACf,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
|
|
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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"NSCopyToClipboard.js","sourceRoot":"","sources":["../../src/components/NSCopyToClipboard.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,gCAAgC,CAAC;AACpD,OAAO,eAAe,MAAM,sCAAsC,CAAC;AASnE,MAAM,UAAU,iBAAiB,CAAC,KAA6B;;IAE3D,SAAS,eAAe;QAEpB,IAAI,SAAS,CAAC,SAAS,IAAI,SAAS,CAAC,SAAS,CAAC,SAAS;YACpD,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,CACH,eAAK,EAAE,EAAE,KAAK,CAAC,EAAE,EACb,SAAS,EAAE,GAAG,MAAM,CAAC,oBAAoB,QAAQ,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,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"}
|
|
@@ -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
|
|
6
|
-
|
|
7
|
-
|
|
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
|