namirasoft-site-react 1.3.54 → 1.3.56

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.
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { BaseComponentProps } from "../props/BaseComponentProps";
3
+ export interface NSInputPasswordProps extends BaseComponentProps {
4
+ title: string;
5
+ defaultValue?: string;
6
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
7
+ placeholder?: string;
8
+ }
9
+ export interface NSInputPasswordState {
10
+ value: string;
11
+ }
12
+ export declare class NSInputPassword extends React.Component<NSInputPasswordProps, NSInputPasswordState> {
13
+ constructor(props: NSInputPasswordProps);
14
+ getValue(): string;
15
+ setValue(value: string): void;
16
+ private onChanged;
17
+ render(): import("react/jsx-runtime").JSX.Element;
18
+ }
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import React from "react";
4
+ import Styles from "./NSInputPassword.module.css";
5
+ import IconInputString from '../assets/images/icon-input-string.svg';
6
+ export class NSInputPassword extends React.Component {
7
+ constructor(props) {
8
+ var _a;
9
+ super(props);
10
+ this.state = {
11
+ value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "",
12
+ };
13
+ this.getValue = this.getValue.bind(this);
14
+ this.setValue = this.setValue.bind(this);
15
+ this.onChanged = this.onChanged.bind(this);
16
+ }
17
+ getValue() {
18
+ return this.state.value;
19
+ }
20
+ setValue(value) {
21
+ this.setState({ value });
22
+ }
23
+ onChanged(e) {
24
+ this.setValue(e.target.value);
25
+ if (this.props.onChanged)
26
+ this.props.onChanged(e);
27
+ }
28
+ render() {
29
+ var _a;
30
+ return (_jsxs("div", { className: `${Styles.ns_input_parent} p-2 ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsx("span", { className: Styles.ns_input_title, children: this.props.title }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputString, alt: "icon", width: 24, height: 24 }), _jsx("input", { value: this.state.value, onChange: this.onChanged, type: "password", className: Styles.ns_input, placeholder: this.props.placeholder })] }));
31
+ }
32
+ }
33
+ //# sourceMappingURL=NSInputPassword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSInputPassword.js","sourceRoot":"","sources":["../../src/components/NSInputPassword.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAClD,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAgBrE,MAAM,OAAO,eAAgB,SAAQ,KAAK,CAAC,SAAqD;IAE5F,YAAY,KAA2B;;QAEnC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACT,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,EAAE;SAClC,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,QAAQ;QAEJ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACO,SAAS,CAAC,CAAsC;QAEpD,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;YACpB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;IACQ,MAAM;;QAEX,OAAO,CACH,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,eAAe,QAAQ,MAAA,IAAI,CAAC,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,aAEvG,eAAM,SAAS,EAAE,MAAM,CAAC,cAAc,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAQ,EACjE,cACI,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,GAAG,EAAE,eAAe,EACpB,GAAG,EAAC,MAAM,EACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACZ,EACF,gBACI,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,IAAI,EAAC,UAAU,EACf,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,GACrC,IACA,CACT,CAAC;IACN,CAAC;CACJ"}
@@ -0,0 +1,27 @@
1
+ .ns_input_parent {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+ color: #fff;
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+
10
+ .ns_input {
11
+ border-radius: 8px;
12
+ padding: 10px 12px;
13
+ font-size: 16px;
14
+ font-weight: 400;
15
+ }
16
+
17
+ .ns_input_icon {
18
+ position: absolute;
19
+ right: 20px;
20
+ top: 51%;
21
+ z-index: 1;
22
+ }
23
+
24
+ .ns_input_title {
25
+ font-size: 16px;
26
+ font-weight: 400;
27
+ }
@@ -13,7 +13,7 @@
13
13
  box-shadow: inset 2px 2px 2px 0 #1754F3;
14
14
  color: #fff;
15
15
  font-size: 16px;
16
- font-weight: 400;
16
+ font-weight: 600;
17
17
  line-height: 16px;
18
18
  display: flex;
19
19
  justify-content: center;
@@ -33,4 +33,4 @@
33
33
  top: 0;
34
34
  bottom: 0;
35
35
  cursor: pointer;
36
- }
36
+ }
package/dist/main.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from "./components/NSInputDuration";
14
14
  export * from "./components/NSInputEmail";
15
15
  export * from "./components/NSInputFloat";
16
16
  export * from "./components/NSInputIP";
17
+ export * from "./components/NSInputPassword";
17
18
  export * from "./components/NSInputInteger";
18
19
  export * from "./components/NSInputPhone";
19
20
  export * from "./components/NSInputPrice";
package/dist/main.js CHANGED
@@ -14,6 +14,7 @@ export * from "./components/NSInputDuration";
14
14
  export * from "./components/NSInputEmail";
15
15
  export * from "./components/NSInputFloat";
16
16
  export * from "./components/NSInputIP";
17
+ export * from "./components/NSInputPassword";
17
18
  export * from "./components/NSInputInteger";
18
19
  export * from "./components/NSInputPhone";
19
20
  export * from "./components/NSInputPrice";
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,iCAAiC,CAAC;AAChD,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,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,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;AACz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AAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,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,18 +1,18 @@
1
1
  "use client";
2
2
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Component } from 'react';
4
- import { NSButtonGreen } from "../main";
5
- import { NSLinkGreen } from "../main";
4
+ import { NSButtonGreen, NSSpace, NSSpaceSizeType } from "../main";
6
5
  import Styles from './NSLoginPage.module.css';
6
+ import { NSLinkBlue } from 'namirasoft-site-react';
7
7
  export class NSLoginPage extends Component {
8
8
  render() {
9
9
  var _a;
10
10
  let button = _jsx(_Fragment, {});
11
11
  if (this.props.href)
12
- button = _jsx(NSLinkGreen, { title: "Login", href: (_a = this.props.href) !== null && _a !== void 0 ? _a : "" });
12
+ button = _jsx(NSLinkBlue, { title: "Login", href: (_a = this.props.href) !== null && _a !== void 0 ? _a : "" });
13
13
  else if (this.props.onClick)
14
14
  button = _jsx(NSButtonGreen, { title: "Login", onClick: this.props.onClick });
15
- return (_jsx("div", { style: { backgroundImage: this.props.background, width: "100%", backgroundSize: "cover" }, children: _jsxs("div", { className: `${Styles.login_container}`, style: { marginTop: "100px" }, children: [_jsx("div", { className: "m-auto", children: _jsx("img", { width: 256, height: 256, src: this.props.logo, alt: "logo" }) }), _jsx("div", { children: _jsx("h1", { className: "text-center mb-3", children: this.props.title }) }), _jsx("div", { className: "m-auto", children: button })] }) }));
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: "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 })] }) }));
16
16
  }
17
17
  }
18
18
  //# sourceMappingURL=NSLoginPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSLoginPage.js","sourceRoot":"","sources":["../../src/pages/NSLoginPage.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAU7C,MAAM,OAAO,WAAY,SAAQ,SAAiB;IAErC,MAAM;;QAEX,IAAI,MAAM,GAAG,mBAAK,CAAC;QACnB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI;YACf,MAAM,GAAG,KAAC,WAAW,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,GAAI,CAAC;aACnE,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO;YACvB,MAAM,GAAG,KAAC,aAAa,IAAC,KAAK,EAAC,OAAO,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAI,CAAC;QAC1E,OAAO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AK,EAAC,OAAO,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAI,CAAC;QAC1E,OAAO,CACH,cAAK,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,YAC1F,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,aACzE,cAAK,SAAS,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,YAC/B,cAAK,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAC,MAAM,GAAO,GACnE,EACN,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,wBAAK,aAAI,SAAS,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAM,GAAM,EACvE,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,cAAK,SAAS,EAAE,GAAG,MAAM,CAAC,SAAS,EAAE,YAChC,MAAM,GACL,IACJ,GACJ,CACT,CAAC;IACN,CAAC;CACJ"}
@@ -1,6 +1,23 @@
1
- .login_container {
1
+ .ns_login_container {
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  justify-content: center;
6
+ }
7
+
8
+ .ns_logo {
9
+ text-align: center;
10
+ margin: auto;
11
+ }
12
+
13
+ .ns_title {
14
+ font-size: 32px;
15
+ font-weight: 700;
16
+ margin: auto;
17
+ text-align: center;
18
+ }
19
+
20
+ .ns_button {
21
+ margin: auto;
22
+ text-align: center;
6
23
  }
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.3.54",
11
+ "version": "1.3.56",
12
12
  "author": "Amir Abolhasani, Alireza Esmaeeli, Hooman Shashaeh",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -30,7 +30,7 @@
30
30
  "link-react": "^3.0.0",
31
31
  "namirasoft-api-link": "^1.3.1",
32
32
  "namirasoft-core": "^1.3.18",
33
- "namirasoft-site-react": "^1.3.53",
33
+ "namirasoft-site-react": "^1.3.55",
34
34
  "path-browserify": "^1.0.1",
35
35
  "react": "^18.2.0",
36
36
  "react-app-rewired": "^2.2.1",
@@ -0,0 +1,27 @@
1
+ .ns_input_parent {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 326px;
5
+ color: #fff;
6
+ position: relative;
7
+ max-width: 100%;
8
+ }
9
+
10
+ .ns_input {
11
+ border-radius: 8px;
12
+ padding: 10px 12px;
13
+ font-size: 16px;
14
+ font-weight: 400;
15
+ }
16
+
17
+ .ns_input_icon {
18
+ position: absolute;
19
+ right: 20px;
20
+ top: 51%;
21
+ z-index: 1;
22
+ }
23
+
24
+ .ns_input_title {
25
+ font-size: 16px;
26
+ font-weight: 400;
27
+ }
@@ -0,0 +1,70 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Styles from "./NSInputPassword.module.css";
5
+ import IconInputString from '../assets/images/icon-input-string.svg';
6
+ import { BaseComponentProps } from "../props/BaseComponentProps";
7
+
8
+ export interface NSInputPasswordProps extends BaseComponentProps
9
+ {
10
+ title: string;
11
+ defaultValue?: string;
12
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
13
+ placeholder?: string;
14
+ }
15
+
16
+ export interface NSInputPasswordState
17
+ {
18
+ value: string;
19
+ }
20
+
21
+ export class NSInputPassword extends React.Component<NSInputPasswordProps, NSInputPasswordState>
22
+ {
23
+ constructor(props: NSInputPasswordProps)
24
+ {
25
+ super(props);
26
+ this.state = {
27
+ value: props.defaultValue ?? "",
28
+ };
29
+ this.getValue = this.getValue.bind(this);
30
+ this.setValue = this.setValue.bind(this);
31
+ this.onChanged = this.onChanged.bind(this);
32
+ }
33
+ getValue(): string
34
+ {
35
+ return this.state.value;
36
+ }
37
+ setValue(value: string): void
38
+ {
39
+ this.setState({ value });
40
+ }
41
+ private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
42
+ {
43
+ this.setValue(e.target.value);
44
+ if (this.props.onChanged)
45
+ this.props.onChanged(e);
46
+ }
47
+ override render()
48
+ {
49
+ return (
50
+ <div className={`${Styles.ns_input_parent} p-2 ${this.props.classList?.join(" ")}`} style={this.props.style}>
51
+
52
+ <span className={Styles.ns_input_title}>{this.props.title}</span>
53
+ <img
54
+ className={Styles.ns_input_icon}
55
+ src={IconInputString}
56
+ alt="icon"
57
+ width={24}
58
+ height={24}
59
+ />
60
+ <input
61
+ value={this.state.value}
62
+ onChange={this.onChanged}
63
+ type="password"
64
+ className={Styles.ns_input}
65
+ placeholder={this.props.placeholder}
66
+ />
67
+ </div>
68
+ );
69
+ }
70
+ }
@@ -13,7 +13,7 @@
13
13
  box-shadow: inset 2px 2px 2px 0 #1754F3;
14
14
  color: #fff;
15
15
  font-size: 16px;
16
- font-weight: 400;
16
+ font-weight: 600;
17
17
  line-height: 16px;
18
18
  display: flex;
19
19
  justify-content: center;
@@ -33,4 +33,4 @@
33
33
  top: 0;
34
34
  bottom: 0;
35
35
  cursor: pointer;
36
- }
36
+ }
package/src/main.ts CHANGED
@@ -14,6 +14,7 @@ export * from "./components/NSInputDuration";
14
14
  export * from "./components/NSInputEmail";
15
15
  export * from "./components/NSInputFloat";
16
16
  export * from "./components/NSInputIP";
17
+ export * from "./components/NSInputPassword";
17
18
  export * from "./components/NSInputInteger";
18
19
  export * from "./components/NSInputPhone";
19
20
  export * from "./components/NSInputPrice";
@@ -1,6 +1,23 @@
1
- .login_container {
1
+ .ns_login_container {
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  justify-content: center;
6
+ }
7
+
8
+ .ns_logo {
9
+ text-align: center;
10
+ margin: auto;
11
+ }
12
+
13
+ .ns_title {
14
+ font-size: 32px;
15
+ font-weight: 700;
16
+ margin: auto;
17
+ text-align: center;
18
+ }
19
+
20
+ .ns_button {
21
+ margin: auto;
22
+ text-align: center;
6
23
  }
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { Component } from 'react';
3
- import { NSButtonGreen } from "../main";
4
- import { NSLinkGreen } from "../main";
3
+ import { NSButtonGreen, NSSpace, NSSpaceSizeType } from "../main";
5
4
  import Styles from './NSLoginPage.module.css'
5
+ import { NSLinkBlue } from 'namirasoft-site-react';
6
6
  interface IProps
7
7
  {
8
8
  title: string;
@@ -18,17 +18,19 @@ export class NSLoginPage extends Component<IProps>
18
18
  {
19
19
  let button = <></>;
20
20
  if (this.props.href)
21
- button = <NSLinkGreen title="Login" href={this.props.href ?? ""} />;
21
+ button = <NSLinkBlue title="Login" href={this.props.href ?? ""} />;
22
22
  else if (this.props.onClick)
23
23
  button = <NSButtonGreen title="Login" onClick={this.props.onClick} />;
24
24
  return (
25
25
  <div style={{ backgroundImage: this.props.background, width: "100%", backgroundSize: "cover" }}>
26
- <div className={`${Styles.login_container}`} style={{ marginTop: "100px" }}>
27
- <div className="m-auto">
26
+ <div className={`${Styles.ns_login_container}`} style={{ marginTop: "100px" }}>
27
+ <div className={`${Styles.ns_logo}`}>
28
28
  <img width={256} height={256} src={this.props.logo} alt="logo"></img>
29
29
  </div>
30
- <div><h1 className="text-center mb-3">{this.props.title}</h1></div>
31
- <div className="m-auto">
30
+ <NSSpace size={NSSpaceSizeType.SMALL} />
31
+ <div><h1 className={`${Styles.ns_title}`}>{this.props.title}</h1></div>
32
+ <NSSpace size={NSSpaceSizeType.SMALL} />
33
+ <div className={`${Styles.ns_button}`}>
32
34
  {button}
33
35
  </div>
34
36
  </div>