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
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import Styles from "./NSSelectBox.module.css";
|
|
5
5
|
import { Select, Space } from 'antd';
|
|
6
6
|
import IconSelectBox from '../assets/images/icon-select-box.svg';
|
|
7
|
+
import { Validator } from "../Validator";
|
|
8
|
+
import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
|
|
7
9
|
export class NSSelectBox extends React.Component {
|
|
8
10
|
constructor(props) {
|
|
9
11
|
super(props);
|
|
@@ -14,20 +16,33 @@ export class NSSelectBox extends React.Component {
|
|
|
14
16
|
this.getValues = this.getValues.bind(this);
|
|
15
17
|
this.setValues = this.setValues.bind(this);
|
|
16
18
|
}
|
|
17
|
-
|
|
18
|
-
this.
|
|
19
|
+
getError() {
|
|
20
|
+
return (Validator.getError(this.props.title, this.state.value, this.props));
|
|
19
21
|
}
|
|
20
22
|
getValue() {
|
|
23
|
+
let error = this.getError();
|
|
24
|
+
if (error) {
|
|
25
|
+
this.setState({ error });
|
|
26
|
+
throw new Error(error);
|
|
27
|
+
}
|
|
21
28
|
return this.state.value;
|
|
22
29
|
}
|
|
23
|
-
|
|
24
|
-
this.setState({
|
|
30
|
+
setValue(value) {
|
|
31
|
+
this.setState({ value });
|
|
25
32
|
}
|
|
26
33
|
getValues() {
|
|
34
|
+
let error = this.getError();
|
|
35
|
+
if (error) {
|
|
36
|
+
this.setState({ error });
|
|
37
|
+
throw new Error(error);
|
|
38
|
+
}
|
|
27
39
|
return this.state.values;
|
|
28
40
|
}
|
|
41
|
+
setValues(values) {
|
|
42
|
+
this.setState({ values });
|
|
43
|
+
}
|
|
29
44
|
render() {
|
|
30
|
-
return (_jsxs("div", { className: `${Styles.ns_input_parent} p-2`, children: [
|
|
45
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} p-2`, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx(Select, { mode: "multiple", style: { width: '100%' }, className: Styles.ns_input_select, placeholder: "Combo Box", onChange: this.setValues, optionLabelProp: "label", options: this.props.options, optionRender: (option) => (_jsx(Space, { className: Styles.ns_input_select_option, children: option.data.desc })), suffixIcon: _jsx("img", { src: IconSelectBox, alt: "SelectBox Icon" }) })] }), _jsx(NSInputErrorNotifier, { error: this.state.error })] }));
|
|
31
46
|
}
|
|
32
47
|
}
|
|
33
48
|
//# sourceMappingURL=NSSelectBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSSelectBox.js","sourceRoot":"","sources":["../../src/components/NSSelectBox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,aAAa,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"NSSelectBox.js","sourceRoot":"","sources":["../../src/components/NSSelectBox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM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ceSizeType["XXXLARGE"] = "128px";
|
|
14
14
|
})(NSSpaceSizeType || (NSSpaceSizeType = {}));
|
|
15
15
|
export function NSSpace(props) {
|
|
16
|
-
|
|
16
|
+
var _a;
|
|
17
|
+
return (_jsx("hr", { id: props.id, className: (_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" "), style: Object.assign(Object.assign({}, props.style), { width: "100%", height: props.size, margin: "0px", padding: "0px", background: "transparent", color: "transparent", border: 0 }) }));
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=NSSpace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSSpace.js","sourceRoot":"","sources":["../../src/components/NSSpace.tsx"],"names":[],"mappings":";AAOA,MAAM,CAAN,IAAY,eAYX;AAZD,WAAY,eAAe;IAEvB,+BAAY,CAAA;IACZ,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,iCAAc,CAAA;IACd,kCAAe,CAAA;IACf,kCAAe,CAAA;IACf,iCAAc,CAAA;IACd,kCAAe,CAAA;IACf,mCAAgB,CAAA;IAChB,qCAAkB,CAAA;AACtB,CAAC,EAZW,eAAe,KAAf,eAAe,QAY1B;AAED,MAAM,UAAU,OAAO,CAAC,KAAmB
|
|
1
|
+
{"version":3,"file":"NSSpace.js","sourceRoot":"","sources":["../../src/components/NSSpace.tsx"],"names":[],"mappings":";AAOA,MAAM,CAAN,IAAY,eAYX;AAZD,WAAY,eAAe;IAEvB,+BAAY,CAAA;IACZ,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,iCAAc,CAAA;IACd,kCAAe,CAAA;IACf,kCAAe,CAAA;IACf,iCAAc,CAAA;IACd,kCAAe,CAAA;IACf,mCAAgB,CAAA;IAChB,qCAAkB,CAAA;AACtB,CAAC,EAZW,eAAe,KAAf,eAAe,QAY1B;AAED,MAAM,UAAU,OAAO,CAAC,KAAmB;;IAEvC,OAAO,CACH,aAAI,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,SAAS,EAAE,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EACrC,KAAK,kCAAO,KAAK,CAAC,KAAK,KAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,MAAM,CAClK,CAAC;AACN,CAAC"}
|
|
@@ -18,6 +18,7 @@ export class NSTable extends Component {
|
|
|
18
18
|
this.setState({ rows });
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
+
var _a;
|
|
21
22
|
let column_keys = Object.keys(this.state.columns);
|
|
22
23
|
let getColumnAttributes = (column, columnIndex) => {
|
|
23
24
|
if (this.props.getColumnAttributes)
|
|
@@ -29,7 +30,7 @@ export class NSTable extends Component {
|
|
|
29
30
|
return this.props.getCell(row, column, rowIndex, columnIndex);
|
|
30
31
|
return row[column];
|
|
31
32
|
};
|
|
32
|
-
return (_jsxs("div", { className: `container ${Styles.ns_project_list_container}`, children: [_jsx("section", { className: Styles.ns_search_input, children: _jsx(NSInputSearch, {}) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("table", { className: Styles.ns_table, children: [_jsx("thead", { className: Styles.ns_thead, children: _jsx("tr", { children: column_keys.map(column_key => _jsx("th", { scope: "col", children: this.state.columns[column_key] }, column_key)) }) }), _jsx("tbody", { className: Styles.ns_tbody, children: this.state.rows.map((row, rowIndex) => _jsx("tr", { onClick: () => this.setState({ modalState: !this.state.modalState }), children: column_keys.map((column, columnIndex) => (_jsx("td", Object.assign({}, getColumnAttributes(column, columnIndex), { "data-label": `${this.state.columns[column]} : `, children: getCell(row, column, rowIndex, columnIndex) })))) }, this.props.getRowKey(row, rowIndex))) })] }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsxs("section", { className: Styles.ns_pagination_button, children: [_jsx(NSPagination, { size: 50, page: 5 }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("div", { className: Styles.ns_button, children: [_jsx(NSButton, { title: 'Export', icon: { src: "/assets/images/export-vector.png" }, onClick: () => { }, border: '1px solid rgba(255, 148, 50, 1)' }), _jsx(NSButton, { title: 'Refresh', icon: { src: "/assets/images/export-vector.png" }, onClick: () => { }, border: '1px solid rgba(3, 119, 255, 1)' })] })] }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("section", { onClick: () => this.setState({ modalState: !this.state.modalState }), className: Styles.ns_modal, style: { display: this.state.modalState ? "block" : "none" }, children: [_jsx("a", { children: _jsx("img", { src: '/assets/images/close-vector.png' }) }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur vitae diam non enim vestibulum interdum. Duis condimentum augue id magna semper rutrum. Nullam sit amet magna in magna gravida vehicula. Vestibulum erat nulla, ullamcorper nec, rutrum non, nonummy ac, erat. In laoreet, magna id viverra tincidunt, sem odio bibendum justo, vel imperdiet sapien wisi sed libero. Phasellus enim erat, vestibulum vel, aliquam a, posuere eu, velit. Morbi imperdiet, mauris ac auctor dictum, nisl ligula egestas nulla, et sollicitudin sem purus in lacus. Mauris dictum facilisis augue. Phasellus faucibus molestie nisl. Aliquam ante. Nulla accumsan, elit sit amet varius semper, nulla mauris mollis quam, tempor suscipit diam nulla vel leo. In convallis. Phasellus rhoncus.." })] })] }));
|
|
33
|
+
return (_jsxs("div", { id: this.props.id, className: `container ${Styles.ns_project_list_container} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsx("section", { className: Styles.ns_search_input, children: _jsx(NSInputSearch, { title: '', required: false }) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("table", { className: Styles.ns_table, children: [_jsx("thead", { className: Styles.ns_thead, children: _jsx("tr", { children: column_keys.map(column_key => _jsx("th", { scope: "col", children: this.state.columns[column_key] }, column_key)) }) }), _jsx("tbody", { className: Styles.ns_tbody, children: this.state.rows.map((row, rowIndex) => _jsx("tr", { onClick: () => this.setState({ modalState: !this.state.modalState }), children: column_keys.map((column, columnIndex) => (_jsx("td", Object.assign({}, getColumnAttributes(column, columnIndex), { "data-label": `${this.state.columns[column]} : `, children: getCell(row, column, rowIndex, columnIndex) })))) }, this.props.getRowKey(row, rowIndex))) })] }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsxs("section", { className: Styles.ns_pagination_button, children: [_jsx(NSPagination, { size: 50, page: 5 }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("div", { className: Styles.ns_button, children: [_jsx(NSButton, { title: 'Export', icon: { src: "/assets/images/export-vector.png" }, onClick: () => { }, style: { border: '1px solid rgba(255, 148, 50, 1)' } }), _jsx(NSButton, { title: 'Refresh', icon: { src: "/assets/images/export-vector.png" }, onClick: () => { }, style: { border: '1px solid rgba(3, 119, 255, 1)' } })] })] }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsxs("section", { onClick: () => this.setState({ modalState: !this.state.modalState }), className: Styles.ns_modal, style: { display: this.state.modalState ? "block" : "none" }, children: [_jsx("a", { children: _jsx("img", { src: '/assets/images/close-vector.png' }) }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur vitae diam non enim vestibulum interdum. Duis condimentum augue id magna semper rutrum. Nullam sit amet magna in magna gravida vehicula. Vestibulum erat nulla, ullamcorper nec, rutrum non, nonummy ac, erat. In laoreet, magna id viverra tincidunt, sem odio bibendum justo, vel imperdiet sapien wisi sed libero. Phasellus enim erat, vestibulum vel, aliquam a, posuere eu, velit. Morbi imperdiet, mauris ac auctor dictum, nisl ligula egestas nulla, et sollicitudin sem purus in lacus. Mauris dictum facilisis augue. Phasellus faucibus molestie nisl. Aliquam ante. Nulla accumsan, elit sit amet varius semper, nulla mauris mollis quam, tempor suscipit diam nulla vel leo. In convallis. Phasellus rhoncus.." })] })] }));
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
//# sourceMappingURL=NSTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSTable.js","sourceRoot":"","sources":["../../src/components/NSTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBlC,MAAM,OAAO,OAAiB,SAAQ,SAAuD;IAEzF,YAAY,KAA4B;QAEpC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;IACjF,CAAC;IACD,UAAU,CAAC,OAAkC;QAEzC,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,CAAC,IAAe;QAEnB,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5B,CAAC;IACQ,MAAM
|
|
1
|
+
{"version":3,"file":"NSTable.js","sourceRoot":"","sources":["../../src/components/NSTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW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2
1
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
3
2
|
export interface NSTitleProps extends BaseComponentProps {
|
|
4
3
|
title: string;
|
|
5
|
-
color?: string;
|
|
6
|
-
text_align?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class NSTitle extends Component<NSTitleProps> {
|
|
9
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
10
4
|
}
|
|
5
|
+
export declare function NSTitle(props: NSTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Component } from 'react';
|
|
4
2
|
import Styles from './NSTitle.module.css';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
3
|
+
export function NSTitle(props) {
|
|
4
|
+
var _a;
|
|
5
|
+
return (_jsx("h2", { id: props.id, className: `${Styles.ns_title} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: props.title }));
|
|
9
6
|
}
|
|
10
7
|
//# sourceMappingURL=NSTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSTitle.js","sourceRoot":"","sources":["../../src/components/NSTitle.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"NSTitle.js","sourceRoot":"","sources":["../../src/components/NSTitle.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAQ1C,MAAM,UAAU,OAAO,CAAC,KAAmB;;IAE1C,OAAO,CACN,aACC,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,SAAS,EAAE,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAC7D,KAAK,EAAE,KAAK,CAAC,KAAK,YAEjB,KAAK,CAAC,KAAK,GACR,CACL,CAAC;AACH,CAAC"}
|
package/dist/main.d.ts
CHANGED
package/dist/main.js
CHANGED
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
interface
|
|
2
|
+
export interface NSLoginPageProps {
|
|
3
3
|
title: string;
|
|
4
4
|
logo: string;
|
|
5
5
|
background: string;
|
|
6
6
|
href?: string;
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
}
|
|
9
|
-
export declare class NSLoginPage extends Component<
|
|
9
|
+
export declare class NSLoginPage extends Component<NSLoginPageProps> {
|
|
10
10
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
}
|
|
12
|
-
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { Component } from 'react';
|
|
4
|
-
import { NSLinkBlue, NSButtonGreen, NSSpace, NSSpaceSizeType } from "../main";
|
|
5
3
|
import Styles from './NSLoginPage.module.css';
|
|
4
|
+
import { NSButtonGreen } from '../components/NSButtonGreen';
|
|
5
|
+
import { NSLinkBlue } from '../components/NSLinkBlue';
|
|
6
|
+
import { NSSpace, NSSpaceSizeType } from '../components/NSSpace';
|
|
6
7
|
export class NSLoginPage extends Component {
|
|
7
8
|
render() {
|
|
8
9
|
var _a;
|
|
@@ -11,7 +12,7 @@ export class NSLoginPage extends Component {
|
|
|
11
12
|
button = _jsx(NSLinkBlue, { title: "Login", href: (_a = this.props.href) !== null && _a !== void 0 ? _a : "" });
|
|
12
13
|
else if (this.props.onClick)
|
|
13
14
|
button = _jsx(NSButtonGreen, { title: "Login", onClick: this.props.onClick });
|
|
14
|
-
return (_jsx("div", { style: { backgroundImage: this.props.background, width: "100%", backgroundSize: "cover" }, children: _jsxs("div", { className: `${Styles.ns_login_container}`, style: { marginTop: "100px" }, children: [_jsx("div", { className: `${Styles.ns_logo}`, children: _jsx("img", { width: 256, height: 256, src: this.props.logo, alt:
|
|
15
|
+
return (_jsx("div", { style: { backgroundImage: this.props.background, width: "100%", backgroundSize: "cover" }, children: _jsxs("div", { className: `${Styles.ns_login_container}`, style: { marginTop: "100px" }, children: [_jsx("div", { className: `${Styles.ns_logo}`, children: _jsx("img", { width: 256, height: 256, src: this.props.logo, alt: `${this.props.title} Logo` }) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx("div", { children: _jsx("h1", { className: `${Styles.ns_title}`, children: this.props.title }) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx("div", { className: `${Styles.ns_button}`, children: button })] }) }));
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=NSLoginPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSLoginPage.js","sourceRoot":"","sources":["../../src/pages/NSLoginPage.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"NSLoginPage.js","sourceRoot":"","sources":["../../src/pages/NSLoginPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAWjE,MAAM,OAAO,WAAY,SAAQ,SAA2B;IAE/C,MAAM;;QAEX,IAAI,MAAM,GAAG,mBAAK,CAAC;QACnB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI;YACf,MAAM,GAAG,KAAC,UAAU,IAAC,KAAK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eli, Hooman Shashaeh",
|
|
11
|
+
"version": "1.3.62",
|
|
12
|
+
"author": "Amir Abolhasani, Alireza Esmaeeli, Sepideh Mazloumi, Hooman Shashaeh",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
15
15
|
"types": "./dist/main.d.ts",
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
"copyfiles": "^2.4.1",
|
|
30
30
|
"link-react": "^3.0.0",
|
|
31
31
|
"namirasoft-api-link": "^1.3.1",
|
|
32
|
-
"namirasoft-core": "^1.3.
|
|
33
|
-
"namirasoft-site-react": "^1.3.59",
|
|
32
|
+
"namirasoft-core": "^1.3.19",
|
|
34
33
|
"path-browserify": "^1.0.1",
|
|
35
34
|
"react": "^18.2.0",
|
|
36
35
|
"react-app-rewired": "^2.2.1",
|
package/src/App.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './App.css';
|
|
2
2
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
3
|
-
import { NSFooter, NSHeader, NSTable,
|
|
3
|
+
import { NSFooter, NSHeader, NSTable, NSButtonBlue, NSButtonGreen, NSButtonRed } from './main';
|
|
4
4
|
|
|
5
5
|
export function App()
|
|
6
6
|
{
|
|
@@ -45,11 +45,21 @@ export function App()
|
|
|
45
45
|
scope='Namira Software Corporation'
|
|
46
46
|
logo='https://static.namirasoft.com/logo/namirasoft/base.png'
|
|
47
47
|
account={false}
|
|
48
|
-
|
|
48
|
+
style={{ backgroundColor: "transparent !important" }}
|
|
49
49
|
/>
|
|
50
50
|
<div className="container">
|
|
51
|
-
<
|
|
52
|
-
|
|
51
|
+
<NSButtonBlue
|
|
52
|
+
title="Cancel Deletion"
|
|
53
|
+
onClick={()=>{}}
|
|
54
|
+
/>
|
|
55
|
+
<NSButtonGreen
|
|
56
|
+
title="Cancel Deletion"
|
|
57
|
+
onClick={()=>{}}
|
|
58
|
+
/>
|
|
59
|
+
<NSButtonRed
|
|
60
|
+
title="Cancel Deletion"
|
|
61
|
+
onClick={()=>{}}
|
|
62
|
+
/>
|
|
53
63
|
<NSTable<Row> columns={columns} rows={rows} getRowKey={row => row.id.toString()} />
|
|
54
64
|
</div>
|
|
55
65
|
<NSFooter name='Footer' scope='Namira Software Corporation' logo='https://static.namirasoft.com/logo/namirasoft/base.png' />
|
package/src/Validator.ts
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
|
+
import { PhoneOperation, RegexTemplate } from "namirasoft-core";
|
|
1
2
|
import { ValidationNumberProps } from "./props/ValidationNumberProps";
|
|
2
3
|
import { ValidationProps } from "./props/ValidationProps";
|
|
3
4
|
import { ValidationStringProps } from "./props/ValidationStringProps";
|
|
4
5
|
|
|
5
6
|
export class Validator
|
|
6
7
|
{
|
|
7
|
-
static getError(name: string, value: string | null | undefined, validator: ValidationProps): string | null
|
|
8
|
+
static getError(name: string, value: string | number | null | undefined, validator: ValidationProps): string | null
|
|
8
9
|
{
|
|
9
10
|
if (validator.required)
|
|
10
11
|
if (!value)
|
|
11
12
|
return `${name} is required.`;
|
|
12
|
-
if (value)
|
|
13
|
+
if (value != null)
|
|
13
14
|
if (validator.regex)
|
|
14
|
-
if (!validator.regex.regex.test(value))
|
|
15
|
+
if (!validator.regex.regex.test(value + ""))
|
|
15
16
|
return `${name} is not a valid ${validator.regex.name}.`;
|
|
17
|
+
if (value != null)
|
|
18
|
+
if (validator.validator)
|
|
19
|
+
{
|
|
20
|
+
let error = validator.validator(name, value);
|
|
21
|
+
if (error)
|
|
22
|
+
return error;
|
|
23
|
+
}
|
|
16
24
|
return null;
|
|
17
25
|
}
|
|
18
26
|
static getErrorString(name: string, value: string | null | undefined, validator: ValidationStringProps): string | null
|
|
19
27
|
{
|
|
20
|
-
|
|
21
|
-
if (error)
|
|
22
|
-
return error;
|
|
23
|
-
if (value)
|
|
28
|
+
if (value != null)
|
|
24
29
|
{
|
|
25
30
|
if (validator.max_length != null)
|
|
26
31
|
if (validator.max_length < value.length)
|
|
@@ -31,21 +36,17 @@ export class Validator
|
|
|
31
36
|
}
|
|
32
37
|
return null;
|
|
33
38
|
}
|
|
34
|
-
static getErrorNumber(name: string, value:
|
|
39
|
+
static getErrorNumber(name: string, value: number | null | undefined, validator: ValidationNumberProps): string | null
|
|
35
40
|
{
|
|
36
|
-
|
|
37
|
-
if (error)
|
|
38
|
-
return error;
|
|
39
|
-
if (value)
|
|
41
|
+
if (value != null)
|
|
40
42
|
{
|
|
41
|
-
|
|
42
|
-
if (isNaN(numValue))
|
|
43
|
+
if (isNaN(value))
|
|
43
44
|
return `${name} is not a number.`;
|
|
44
45
|
if (validator.max != null)
|
|
45
|
-
if (validator.max <
|
|
46
|
+
if (validator.max < value)
|
|
46
47
|
return `Max value of ${name} should be ${validator.max} characters.`;
|
|
47
48
|
if (validator.min != null)
|
|
48
|
-
if (validator.min >
|
|
49
|
+
if (validator.min > value)
|
|
49
50
|
return `Min value of ${name} should be ${validator.min} characters.`;
|
|
50
51
|
}
|
|
51
52
|
return null;
|
|
@@ -55,8 +56,56 @@ export class Validator
|
|
|
55
56
|
return Validator.getError(name, value, {
|
|
56
57
|
required: true, regex: {
|
|
57
58
|
name: "Email",
|
|
58
|
-
regex:
|
|
59
|
+
regex: RegexTemplate.Email
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
static getErrorDate(name: string, value: string | null | undefined): string | null
|
|
64
|
+
{
|
|
65
|
+
return Validator.getError(name, value, {
|
|
66
|
+
required: true, regex: {
|
|
67
|
+
name: "Date",
|
|
68
|
+
regex: RegexTemplate.Date
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
static getErrorTime(name: string, value: string | null | undefined): string | null
|
|
73
|
+
{
|
|
74
|
+
return Validator.getError(name, value, {
|
|
75
|
+
required: true, regex: {
|
|
76
|
+
name: "Time",
|
|
77
|
+
regex: RegexTemplate.Time
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
static getErrorDuration(name: string, value: string | null | undefined): string | null
|
|
82
|
+
{
|
|
83
|
+
return Validator.getError(name, value, {
|
|
84
|
+
required: true, regex: {
|
|
85
|
+
name: "Duration",
|
|
86
|
+
regex: RegexTemplate.Duration
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
static getErrorIP(name: string, value: string | null | undefined): string | null
|
|
91
|
+
{
|
|
92
|
+
return Validator.getError(name, value, {
|
|
93
|
+
required: true, regex: {
|
|
94
|
+
name: "IP",
|
|
95
|
+
regex: RegexTemplate.IP
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
static getErrorPhone(name: string, value: string | null | undefined): string | null
|
|
100
|
+
{
|
|
101
|
+
return Validator.getError(name, value, {
|
|
102
|
+
required: true, validator: () =>
|
|
103
|
+
{
|
|
104
|
+
if (value)
|
|
105
|
+
if (!PhoneOperation.isValid(value))
|
|
106
|
+
return `${name} is not a valid phone number`;
|
|
107
|
+
return null;
|
|
59
108
|
}
|
|
60
|
-
})
|
|
109
|
+
});
|
|
61
110
|
}
|
|
62
111
|
}
|
|
@@ -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,6 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { BackgroundProps } from "../props/BackgroundProps";
|
|
4
1
|
import { BaseComponentProps } from "../props/BaseComponentProps";
|
|
5
2
|
import { ImageProps } from "../props/ImageProps";
|
|
6
3
|
import Styles from "./NSButton.module.css";
|
|
@@ -8,34 +5,19 @@ import Styles from "./NSButton.module.css";
|
|
|
8
5
|
export interface NSButtonProps extends BaseComponentProps
|
|
9
6
|
{
|
|
10
7
|
title: string;
|
|
11
|
-
border?: string;
|
|
12
|
-
background?: BackgroundProps;
|
|
13
8
|
icon?: ImageProps;
|
|
14
9
|
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
15
10
|
}
|
|
16
11
|
|
|
17
|
-
export interface NSButtonState
|
|
18
|
-
{
|
|
19
|
-
title: string;
|
|
20
|
-
border?: string;
|
|
21
|
-
background?: BackgroundProps;
|
|
22
|
-
icon?: ImageProps;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
12
|
export default function NSButton(props: NSButtonProps)
|
|
26
13
|
{
|
|
27
14
|
return (
|
|
28
|
-
<button
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
backgroundPosition: props.background?.position,
|
|
35
|
-
}}>
|
|
36
|
-
{
|
|
37
|
-
props.icon && <img src={props.icon.src} alt={props.icon.alt} />
|
|
38
|
-
}
|
|
15
|
+
<button id={props.id}
|
|
16
|
+
className={`${Styles.ns_button} ${props.classList?.join(" ")}`}
|
|
17
|
+
style={props.style}
|
|
18
|
+
onClick={(e) => { props.onClick(e) }}
|
|
19
|
+
>
|
|
20
|
+
{props.icon && <img {...props.icon} />}
|
|
39
21
|
{props.title}
|
|
40
22
|
</button >
|
|
41
23
|
);
|
|
@@ -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,33 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
1
|
+
import NSButton from "./NSButton";
|
|
4
2
|
import Style from "./NSButtonBlue.module.css";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export interface NSButtonBlueProps extends BaseComponentProps
|
|
8
|
-
{
|
|
9
|
-
title: string;
|
|
10
|
-
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
11
|
-
}
|
|
3
|
+
import { NSButtonProps } from "./NSButton";
|
|
12
4
|
|
|
13
|
-
export
|
|
5
|
+
export function NSButtonBlue(props: NSButtonProps)
|
|
14
6
|
{
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
let classList = []
|
|
8
|
+
if (props.classList)
|
|
9
|
+
classList.push(...props.classList);
|
|
10
|
+
classList.push(Style.ns_button_blue);
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
{
|
|
20
|
-
constructor(props: NSButtonBlueProps)
|
|
21
|
-
{
|
|
22
|
-
super(props);
|
|
23
|
-
this.state = { title: props.title };
|
|
24
|
-
}
|
|
25
|
-
setTitle(title: string)
|
|
26
|
-
{
|
|
27
|
-
this.setState({ title });
|
|
28
|
-
}
|
|
29
|
-
override render()
|
|
30
|
-
{
|
|
31
|
-
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_blue}>{this.state.title}</button>;
|
|
32
|
-
}
|
|
12
|
+
return <NSButton title={props.title} icon={props.icon} onClick={props.onClick} id={props.id} classList={classList} style={props.style} />;
|
|
33
13
|
}
|
|
@@ -1,33 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
1
|
+
import NSButton from "./NSButton";
|
|
4
2
|
import Style from "./NSButtonGreen.module.css";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export interface NSButtonGreenProps extends BaseComponentProps
|
|
8
|
-
{
|
|
9
|
-
title: string;
|
|
10
|
-
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface NSButtonGreenState
|
|
14
|
-
{
|
|
15
|
-
title: string;
|
|
16
|
-
}
|
|
3
|
+
import { NSButtonProps } from "./NSButton";
|
|
17
4
|
|
|
18
|
-
export
|
|
5
|
+
export function NSButtonGreen(props: NSButtonProps)
|
|
19
6
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
setTitle(title: string)
|
|
26
|
-
{
|
|
27
|
-
this.setState({ title });
|
|
28
|
-
}
|
|
29
|
-
override render()
|
|
30
|
-
{
|
|
31
|
-
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_green}>{this.state.title}</button>;
|
|
32
|
-
}
|
|
7
|
+
let classList = []
|
|
8
|
+
if (props.classList)
|
|
9
|
+
classList.push(...props.classList);
|
|
10
|
+
classList.push(Style.ns_button_green);
|
|
11
|
+
return <NSButton title={props.title} icon={props.icon} onClick={props.onClick} id={props.id} classList={classList} style={props.style} />;
|
|
33
12
|
}
|