namirasoft-site-react 1.3.158 → 1.3.160
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.map +1 -1
- package/dist/assets/images/verify.png +0 -0
- package/dist/components/NSActionMenu.js +14 -2
- package/dist/components/NSActionMenu.js.map +1 -1
- package/dist/components/NSBoxOTP.d.ts +3 -0
- package/dist/components/NSBoxOTP.js +28 -0
- package/dist/components/NSBoxOTP.js.map +1 -0
- package/dist/components/NSBoxOTP.module.css +11 -0
- package/dist/components/NSHeader.module.css +10 -4
- package/dist/components/NSVerification.d.ts +7 -0
- package/dist/components/NSVerification.js +10 -0
- package/dist/components/NSVerification.js.map +1 -0
- package/dist/components/NSVerification.module.css +23 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +2 -0
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +0 -1
- package/src/assets/images/verify.png +0 -0
- package/src/components/NSActionMenu.tsx +23 -4
- package/src/components/NSBoxOTP.module.css +11 -0
- package/src/components/NSBoxOTP.tsx +45 -0
- package/src/components/NSHeader.module.css +10 -4
- package/src/components/NSVerification.module.css +23 -0
- package/src/components/NSVerification.tsx +28 -0
- package/src/main.ts +2 -0
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,aAAa,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,MAAM,UAAU,GAAG;IAGlB,IAAI,KAAK,GAAG,MAAM,CAAe,IAAI,CAAC,CAAC;IACvC,IAAI,OAAO,GAAG;QACb,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,SAAS;QACpB,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AAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,CAAA,CAAC,CAAC,EACxC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,EACnC,SAAS,EAAE,QAAQ,EACnB,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,GAAG,EACf,OAAO,EAAE,OAAO,GACf,EACF,KAAC,aAAa,IACb,KAAK,EAAC,aAAa,EACnB,WAAW,EAAC,EAAE,EACd,QAAQ,EAAE,KAAK,GACd,IACA,CACH,CAAC;AACH,CAAC"}
|
|
Binary file
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
2
|
+
import { useState, useEffect, useRef } from 'react';
|
|
3
3
|
import { NSButtonBlue } from '../main';
|
|
4
4
|
import Styles from './NSActionMenu.module.css';
|
|
5
5
|
export function NSActionMenu(props) {
|
|
6
6
|
const [state, setState] = useState({
|
|
7
7
|
isShow: false
|
|
8
8
|
});
|
|
9
|
+
const menuRef = useRef(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
function handleClickOutside(event) {
|
|
12
|
+
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
13
|
+
setState({ isShow: false });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
17
|
+
return () => {
|
|
18
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
19
|
+
};
|
|
20
|
+
}, [menuRef]);
|
|
9
21
|
return (_jsx(_Fragment, { children: props.items.length >= 1 ?
|
|
10
|
-
_jsxs("div", { className: Styles.ns_action_bar, children: [_jsxs("button", { onClick: () => setState((prevState) => (Object.assign(Object.assign({}, prevState), { isShow: !state.isShow }))), children: ["Action Menu", _jsx("img", { className: Styles.ns_action_menu_icon, src: "https://static.namirasoft.com/image/concept/ellipsis/vertical-blue.png", alt: "Icon", width: 8, height: 24 })] }), _jsx("ul", { className: `${Styles.ns_action_item_holder} ${state.isShow ? Styles.ns_show : Styles.ns_hide} `, children: props.items.map((item) => _jsx("li", { onClick: item.handler, className: `${Styles.ns_action_item}
|
|
22
|
+
_jsxs("div", { className: Styles.ns_action_bar, ref: menuRef, children: [_jsxs("button", { onClick: () => setState((prevState) => (Object.assign(Object.assign({}, prevState), { isShow: !state.isShow }))), children: ["Action Menu", _jsx("img", { className: Styles.ns_action_menu_icon, src: "https://static.namirasoft.com/image/concept/ellipsis/vertical-blue.png", alt: "Icon", width: 8, height: 24 })] }), _jsx("ul", { className: `${Styles.ns_action_item_holder} ${state.isShow ? Styles.ns_show : Styles.ns_hide} `, children: props.items.map((item) => _jsx("li", { onClick: item.handler, className: `${Styles.ns_action_item}
|
|
11
23
|
${item.isActive() ? Styles.ns_active_item : Styles.ns_deActive_item}
|
|
12
24
|
`, children: item.menu_item }, item.id)) })] })
|
|
13
25
|
:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSActionMenu.js","sourceRoot":"","sources":["../../src/components/NSActionMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NSActionMenu.js","sourceRoot":"","sources":["../../src/components/NSActionMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAuB,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAkB/C,MAAM,UAAU,YAAY,CAAC,KAAyB;IAErD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAqB;QACtD,MAAM,EAAE,KAAK;KACb,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,CAAiB,IAA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,CAAC,cAAc;UACjC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB;SAClE,YAEA,IAAI,CAAC,SAAS,IANV,IAAI,CAAC,EAAE,CAOR,CACL,GACG,IACA;YACN,CAAC;gBACD,4BACC,KAAC,YAAY,IACZ,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAC/B,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,GAC9B,GACA,GAEF,CACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef } from 'react';
|
|
3
|
+
import Styles from './NSBoxOTP.module.css';
|
|
4
|
+
const NSBoxOTP = () => {
|
|
5
|
+
const [values, setValues] = useState(Array(6).fill(''));
|
|
6
|
+
const inputsRef = useRef([]);
|
|
7
|
+
const handleChange = (index) => (event) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const newValue = event.target.value;
|
|
10
|
+
if (/^\d?$/.test(newValue)) {
|
|
11
|
+
const updatedValues = [...values];
|
|
12
|
+
updatedValues[index] = newValue;
|
|
13
|
+
setValues(updatedValues);
|
|
14
|
+
if (newValue && index < 5) {
|
|
15
|
+
(_a = inputsRef.current[index + 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const handleKeyDown = (index) => (event) => {
|
|
20
|
+
var _a;
|
|
21
|
+
if (event.key === 'Backspace' && !values[index] && index > 0) {
|
|
22
|
+
(_a = inputsRef.current[index - 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return (_jsx("div", { style: { display: 'flex', gap: '10px' }, children: values.map((value, index) => (_jsx("input", { ref: el => inputsRef.current[index] = el, type: "text", value: value, onChange: handleChange(index), onKeyDown: handleKeyDown(index), maxLength: 1, style: { width: '30px', textAlign: 'center' }, className: Styles.ns_otp_input }, index))) }));
|
|
26
|
+
};
|
|
27
|
+
export default NSBoxOTP;
|
|
28
|
+
//# sourceMappingURL=NSBoxOTP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSBoxOTP.js","sourceRoot":"","sources":["../../src/components/NSBoxOTP.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAe,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,MAAM,MAAM,uBAAuB,CAAA;AAE1C,MAAM,QAAQ,GAAa,GAAG,EAAE;IAC5B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAW,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,MAAM,CAA8B,EAAE,CAAC,CAAC;IAE1D,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,KAAoC,EAAE,EAAE;;QAC7E,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QACpC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACxB,MAAM,aAAa,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;YAClC,aAAa,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;YAChC,SAAS,CAAC,aAAa,CAAC,CAAC;YACzB,IAAI,QAAQ,IAAI,KAAK,GAAG,CAAC,EAAE;gBACvB,MAAA,SAAS,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,0CAAE,KAAK,EAAE,CAAC;aACzC;SACJ;IACL,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,KAA4C,EAAE,EAAE;;QACtF,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE;YAC1D,MAAA,SAAS,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,0CAAE,KAAK,EAAE,CAAC;SACzC;IACL,CAAC,CAAC;IAEF,OAAO,CACH,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,YACvC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,gBAEI,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,EACxC,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC,EAC/B,SAAS,EAAE,CAAC,EACZ,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAC7C,SAAS,EAAE,MAAM,CAAC,YAAY,IARzB,KAAK,CASZ,CACL,CAAC,GACA,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -95,7 +95,9 @@
|
|
|
95
95
|
border: 0;
|
|
96
96
|
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
.ns_navbar_first_level_item {
|
|
99
|
+
color: #fff;
|
|
100
|
+
}
|
|
99
101
|
@media (max-width: 768px) {
|
|
100
102
|
.ns_navbar_elements ul li:not(:last-child) {
|
|
101
103
|
margin-right: 30px;
|
|
@@ -112,6 +114,7 @@
|
|
|
112
114
|
border-bottom: 0.5px solid transparent;
|
|
113
115
|
border-image: linear-gradient(90deg, #ffffff00 0%, rgb(0, 0, 0, 40%), #ffffff00 100%);
|
|
114
116
|
border-image-slice: 1;
|
|
117
|
+
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
.ns_navbar_menu_icon {
|
|
@@ -155,6 +158,11 @@
|
|
|
155
158
|
transform: translate3d(0px, 0, 0px) !important;
|
|
156
159
|
position: relative !important;
|
|
157
160
|
}
|
|
161
|
+
|
|
162
|
+
.ns_navbar_second_level_item {
|
|
163
|
+
color: #fff !important;
|
|
164
|
+
|
|
165
|
+
}
|
|
158
166
|
}
|
|
159
167
|
|
|
160
168
|
.ns_navbar_parent_content {
|
|
@@ -204,9 +212,7 @@
|
|
|
204
212
|
padding: 10px;
|
|
205
213
|
}
|
|
206
214
|
|
|
207
|
-
|
|
208
|
-
color: #fff;
|
|
209
|
-
}
|
|
215
|
+
|
|
210
216
|
|
|
211
217
|
.ns_navbar_second_level_item {
|
|
212
218
|
color: #000 !important;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IBaseComponentProps, IImageProps } from '../main';
|
|
2
|
+
interface INSVerificationProps extends IBaseComponentProps {
|
|
3
|
+
verificationType: string;
|
|
4
|
+
image?: IImageProps;
|
|
5
|
+
}
|
|
6
|
+
declare function NSVerification(props: INSVerificationProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default NSVerification;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import vector from '../assets/images/verify.png';
|
|
3
|
+
import NSBoxOTP from './NSBoxOTP';
|
|
4
|
+
import Styles from './NSVerification.module.css';
|
|
5
|
+
function NSVerification(props) {
|
|
6
|
+
var _a, _b, _c, _d, _e;
|
|
7
|
+
return (_jsxs("div", { className: `${Styles.ns_verification_container} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsx("img", { src: (_c = (_b = props.image) === null || _b === void 0 ? void 0 : _b.src) !== null && _c !== void 0 ? _c : vector, alt: (_e = (_d = props.image) === null || _d === void 0 ? void 0 : _d.alt) !== null && _e !== void 0 ? _e : 'verification vector', className: Styles.ns_verification_vector }), _jsxs("p", { children: ["Please enter code sent to ", props.verificationType] }), _jsx(NSBoxOTP, {})] }));
|
|
8
|
+
}
|
|
9
|
+
export default NSVerification;
|
|
10
|
+
//# sourceMappingURL=NSVerification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSVerification.js","sourceRoot":"","sources":["../../src/components/NSVerification.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAEhD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAOhD,SAAS,cAAc,CAAC,KAA0B;;IAC9C,OAAO,CACH,eACI,SAAS,EAAE,GAAG,MAAM,CAAC,yBAAyB,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EACpF,KAAK,EAAE,KAAK,CAAC,KAAK,aAEZ,cACA,GAAG,EAAE,MAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,GAAG,mCAAI,MAAM,EAC/B,GAAG,EAAE,MAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,GAAG,mCAAI,qBAAqB,EAC9C,SAAS,EAAE,MAAM,CAAC,sBAAsB,GACtC,EACF,sDAA8B,KAAK,CAAC,gBAAgB,IAAK,EACzD,KAAC,QAAQ,KAAG,IACV,CACT,CAAC;AACN,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.ns_verification_container {
|
|
2
|
+
background-color: #FFF;
|
|
3
|
+
border: 1px solid #A1A4B0;
|
|
4
|
+
backdrop-filter: blur(5px);
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: 594px;
|
|
8
|
+
padding: 16px;
|
|
9
|
+
color: #141B5C !important;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: 16px;
|
|
13
|
+
align-items: center;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ns_verification_container p{
|
|
17
|
+
text-align: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ns_verification_vector{
|
|
21
|
+
width: 224px;
|
|
22
|
+
height: 224px;
|
|
23
|
+
}
|
package/dist/main.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./components/NSBoxEmail";
|
|
|
7
7
|
export * from "./components/NSBoxEntity";
|
|
8
8
|
export * from "./components/NSBoxEnum";
|
|
9
9
|
export * from "./components/NSBoxErrorNotifier";
|
|
10
|
+
export * from "./components/NSBoxOTP";
|
|
10
11
|
export * from "./components/NSBoxInteger";
|
|
11
12
|
export * from "./components/NSBoxIPV4";
|
|
12
13
|
export * from "./components/NSBoxIPV6";
|
|
@@ -48,6 +49,7 @@ export * from "./components/NSPagination";
|
|
|
48
49
|
export * from "./components/NSTable";
|
|
49
50
|
export * from "./components/NSTabPage";
|
|
50
51
|
export * from "./components/NSTitle";
|
|
52
|
+
export * from "./components/NSVerification";
|
|
51
53
|
export * from "./pages/NSLoginPage";
|
|
52
54
|
export * from "./pages/NSNotFoundPage";
|
|
53
55
|
export * from "./components/NSModal";
|
package/dist/main.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./components/NSBoxEmail";
|
|
|
7
7
|
export * from "./components/NSBoxEntity";
|
|
8
8
|
export * from "./components/NSBoxEnum";
|
|
9
9
|
export * from "./components/NSBoxErrorNotifier";
|
|
10
|
+
export * from "./components/NSBoxOTP";
|
|
10
11
|
export * from "./components/NSBoxInteger";
|
|
11
12
|
export * from "./components/NSBoxIPV4";
|
|
12
13
|
export * from "./components/NSBoxIPV6";
|
|
@@ -48,6 +49,7 @@ export * from "./components/NSPagination";
|
|
|
48
49
|
export * from "./components/NSTable";
|
|
49
50
|
export * from "./components/NSTabPage";
|
|
50
51
|
export * from "./components/NSTitle";
|
|
52
|
+
export * from "./components/NSVerification";
|
|
51
53
|
export * from "./pages/NSLoginPage";
|
|
52
54
|
export * from "./pages/NSNotFoundPage";
|
|
53
55
|
export * from "./components/NSModal";
|
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,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AA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C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { useState, useEffect, useRef } from 'react';
|
|
2
2
|
import { IBaseComponentProps, NSButtonBlue } from '../main';
|
|
3
3
|
import Styles from './NSActionMenu.module.css';
|
|
4
4
|
|
|
@@ -22,12 +22,31 @@ export function NSActionMenu(props: INSActionMenuProps)
|
|
|
22
22
|
{
|
|
23
23
|
const [state, setState] = useState<INSActionMenuState>({
|
|
24
24
|
isShow: false
|
|
25
|
-
})
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const menuRef = useRef<HTMLDivElement>(null);
|
|
28
|
+
|
|
29
|
+
useEffect(() =>
|
|
30
|
+
{
|
|
31
|
+
function handleClickOutside(event: MouseEvent)
|
|
32
|
+
{
|
|
33
|
+
if (menuRef.current && !menuRef.current.contains(event.target as Node))
|
|
34
|
+
{
|
|
35
|
+
setState({ isShow: false });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
40
|
+
return () =>
|
|
41
|
+
{
|
|
42
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
43
|
+
};
|
|
44
|
+
}, [menuRef]);
|
|
45
|
+
|
|
26
46
|
return (
|
|
27
47
|
<>
|
|
28
48
|
{props.items.length >= 1 ?
|
|
29
|
-
|
|
30
|
-
<div className={Styles.ns_action_bar}>
|
|
49
|
+
<div className={Styles.ns_action_bar} ref={menuRef}>
|
|
31
50
|
<button onClick={() => setState((prevState) => ({
|
|
32
51
|
...prevState, isShow: !state.isShow
|
|
33
52
|
}))}>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { useState, ChangeEvent, useRef } from 'react';
|
|
2
|
+
import Styles from './NSBoxOTP.module.css'
|
|
3
|
+
|
|
4
|
+
const NSBoxOTP: React.FC = () => {
|
|
5
|
+
const [values, setValues] = useState<string[]>(Array(6).fill(''));
|
|
6
|
+
const inputsRef = useRef<(HTMLInputElement | null)[]>([]);
|
|
7
|
+
|
|
8
|
+
const handleChange = (index: number) => (event: ChangeEvent<HTMLInputElement>) => {
|
|
9
|
+
const newValue = event.target.value;
|
|
10
|
+
if (/^\d?$/.test(newValue)) {
|
|
11
|
+
const updatedValues = [...values];
|
|
12
|
+
updatedValues[index] = newValue;
|
|
13
|
+
setValues(updatedValues);
|
|
14
|
+
if (newValue && index < 5) {
|
|
15
|
+
inputsRef.current[index + 1]?.focus();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const handleKeyDown = (index: number) => (event: React.KeyboardEvent<HTMLInputElement>) => {
|
|
21
|
+
if (event.key === 'Backspace' && !values[index] && index > 0) {
|
|
22
|
+
inputsRef.current[index - 1]?.focus();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div style={{ display: 'flex', gap: '10px' }}>
|
|
28
|
+
{values.map((value, index) => (
|
|
29
|
+
<input
|
|
30
|
+
key={index}
|
|
31
|
+
ref={el => inputsRef.current[index] = el}
|
|
32
|
+
type="text"
|
|
33
|
+
value={value}
|
|
34
|
+
onChange={handleChange(index)}
|
|
35
|
+
onKeyDown={handleKeyDown(index)}
|
|
36
|
+
maxLength={1}
|
|
37
|
+
style={{ width: '30px', textAlign: 'center' }}
|
|
38
|
+
className={Styles.ns_otp_input}
|
|
39
|
+
/>
|
|
40
|
+
))}
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default NSBoxOTP;
|
|
@@ -95,7 +95,9 @@
|
|
|
95
95
|
border: 0;
|
|
96
96
|
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
.ns_navbar_first_level_item {
|
|
99
|
+
color: #fff;
|
|
100
|
+
}
|
|
99
101
|
@media (max-width: 768px) {
|
|
100
102
|
.ns_navbar_elements ul li:not(:last-child) {
|
|
101
103
|
margin-right: 30px;
|
|
@@ -112,6 +114,7 @@
|
|
|
112
114
|
border-bottom: 0.5px solid transparent;
|
|
113
115
|
border-image: linear-gradient(90deg, #ffffff00 0%, rgb(0, 0, 0, 40%), #ffffff00 100%);
|
|
114
116
|
border-image-slice: 1;
|
|
117
|
+
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
.ns_navbar_menu_icon {
|
|
@@ -155,6 +158,11 @@
|
|
|
155
158
|
transform: translate3d(0px, 0, 0px) !important;
|
|
156
159
|
position: relative !important;
|
|
157
160
|
}
|
|
161
|
+
|
|
162
|
+
.ns_navbar_second_level_item {
|
|
163
|
+
color: #fff !important;
|
|
164
|
+
|
|
165
|
+
}
|
|
158
166
|
}
|
|
159
167
|
|
|
160
168
|
.ns_navbar_parent_content {
|
|
@@ -204,9 +212,7 @@
|
|
|
204
212
|
padding: 10px;
|
|
205
213
|
}
|
|
206
214
|
|
|
207
|
-
|
|
208
|
-
color: #fff;
|
|
209
|
-
}
|
|
215
|
+
|
|
210
216
|
|
|
211
217
|
.ns_navbar_second_level_item {
|
|
212
218
|
color: #000 !important;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.ns_verification_container {
|
|
2
|
+
background-color: #FFF;
|
|
3
|
+
border: 1px solid #A1A4B0;
|
|
4
|
+
backdrop-filter: blur(5px);
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: 594px;
|
|
8
|
+
padding: 16px;
|
|
9
|
+
color: #141B5C !important;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: 16px;
|
|
13
|
+
align-items: center;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ns_verification_container p{
|
|
17
|
+
text-align: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ns_verification_vector{
|
|
21
|
+
width: 224px;
|
|
22
|
+
height: 224px;
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import vector from '../assets/images/verify.png'
|
|
2
|
+
import { IBaseComponentProps, IImageProps } from '../main';
|
|
3
|
+
import NSBoxOTP from './NSBoxOTP';
|
|
4
|
+
import Styles from './NSVerification.module.css'
|
|
5
|
+
|
|
6
|
+
interface INSVerificationProps extends IBaseComponentProps {
|
|
7
|
+
verificationType : string;
|
|
8
|
+
image ?: IImageProps;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function NSVerification(props:INSVerificationProps) {
|
|
12
|
+
return (
|
|
13
|
+
<div
|
|
14
|
+
className={`${Styles.ns_verification_container} ${props.classList?.join(" ")}`}
|
|
15
|
+
style={props.style}
|
|
16
|
+
>
|
|
17
|
+
<img
|
|
18
|
+
src={props.image?.src ?? vector}
|
|
19
|
+
alt={props.image?.alt ?? 'verification vector'}
|
|
20
|
+
className={Styles.ns_verification_vector}
|
|
21
|
+
/>
|
|
22
|
+
<p>Please enter code sent to {props.verificationType}</p>
|
|
23
|
+
<NSBoxOTP />
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default NSVerification;
|
package/src/main.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./components/NSBoxEmail";
|
|
|
7
7
|
export * from "./components/NSBoxEntity";
|
|
8
8
|
export * from "./components/NSBoxEnum";
|
|
9
9
|
export * from "./components/NSBoxErrorNotifier";
|
|
10
|
+
export * from "./components/NSBoxOTP";
|
|
10
11
|
export * from "./components/NSBoxInteger";
|
|
11
12
|
export * from "./components/NSBoxIPV4";
|
|
12
13
|
export * from "./components/NSBoxIPV6";
|
|
@@ -48,6 +49,7 @@ export * from "./components/NSPagination";
|
|
|
48
49
|
export * from "./components/NSTable";
|
|
49
50
|
export * from "./components/NSTabPage";
|
|
50
51
|
export * from "./components/NSTitle";
|
|
52
|
+
export * from "./components/NSVerification";
|
|
51
53
|
export * from "./pages/NSLoginPage";
|
|
52
54
|
export * from "./pages/NSNotFoundPage";
|
|
53
55
|
export * from "./components/NSModal";
|