namirasoft-site-react 1.3.258 → 1.3.260

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.
@@ -25,6 +25,7 @@ export default class NSGroupedList extends Component<INSGroupedListProps, INSGro
25
25
  componentWillUnmount(): void;
26
26
  handleClickOutside(event: MouseEvent): void;
27
27
  hide(): void;
28
+ show(): void;
28
29
  render(): import("react/jsx-runtime").JSX.Element | null;
29
30
  }
30
31
  export {};
@@ -11,6 +11,7 @@ export default class NSGroupedList extends Component {
11
11
  };
12
12
  this.handleClickOutside = this.handleClickOutside.bind(this);
13
13
  this.hide = this.hide.bind(this);
14
+ this.show = this.show.bind(this);
14
15
  }
15
16
  componentDidMount() {
16
17
  document.addEventListener('mousedown', this.handleClickOutside);
@@ -26,11 +27,14 @@ export default class NSGroupedList extends Component {
26
27
  hide() {
27
28
  this.setState({ isVisible: false });
28
29
  }
30
+ show() {
31
+ this.setState({ isVisible: false });
32
+ }
29
33
  render() {
30
34
  if (!this.state.isVisible) {
31
35
  return null;
32
36
  }
33
- return (_jsxs("div", { ref: this.wrapperRef, className: Styles.ns_group_list_parent, children: [_jsx("p", { children: "2" }), this.props.groups.map((group, index) => (_jsxs("ul", { className: Styles.ns_group_list, children: [_jsxs("div", { className: 'd-flex', children: [_jsx("figure", { className: Styles.ns_input_close_icon, onClick: this.hide, children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/close/blue.svg", alt: "input-icon", width: 24, height: 24 }) }), _jsx("span", { className: Styles.ns_group_category, children: group.text })] }), group.items.map((item, index) => (_jsx("li", { onClick: () => this.props.onClick(group.name, item.name), children: _jsxs("div", { className: Styles.ns_group_item, children: [_jsx("span", { children: item.text && _jsx("span", { children: item.text }) }), _jsx("span", { style: item.text_bold ? { fontWeight: 'bold' } : {}, children: _jsxs("b", { children: [" ", item.text_bold] }) }), item.description && _jsx("span", { className: Styles.ns_block, children: item.description })] }) }, index)))] }, index)))] }));
37
+ return (_jsx("div", { ref: this.wrapperRef, className: Styles.ns_group_list_parent, children: this.props.groups.map((group, index) => (_jsxs("ul", { className: Styles.ns_group_list, children: [_jsx("div", { className: 'd-flex w-100 justify-content-between align-items-center', children: _jsxs("span", { className: Styles.ns_group_category, children: [group.text, _jsx("img", { onClick: this.hide, src: "https://static.namirasoft.com/image/concept/close/blue.svg", alt: "input-icon", width: 24, height: 24 })] }) }), group.items.map((item, index) => (_jsx("li", { onClick: () => this.props.onClick(group.name, item.name), children: _jsxs("div", { className: Styles.ns_group_item, children: [_jsx("span", { children: item.text && _jsx("span", { children: item.text }) }), _jsx("span", { style: item.text_bold ? { fontWeight: 'bold' } : {}, children: _jsxs("b", { children: [" ", item.text_bold] }) }), item.description && _jsx("span", { className: Styles.ns_block, children: item.description })] }) }, index)))] }, index))) }));
34
38
  }
35
39
  }
36
40
  //# sourceMappingURL=NSGroupedList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSGroupedList.js","sourceRoot":"","sources":["../../src/components/NSGroupedList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AACZ,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,MAAM,MAAM,4BAA4B,CAAC;AA4BhD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAmD;IAG7F,YAAY,KAA0B;QAErC,KAAK,CAAC,KAAK,CAAC,CAAC;QAJN,eAAU,GAAG,SAAS,EAAkB,CAAC;QAKhD,IAAI,CAAC,KAAK,GAAG;YACZ,SAAS,EAAE,IAAI;SACf,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAEQ,iBAAiB;QAEzB,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC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GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACjC,aAAgB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,YACvE,eAAK,SAAS,EAAE,MAAM,CAAC,aAAa,aACnC,yBAAO,IAAI,CAAC,IAAI,IAAI,yBAAO,IAAI,CAAC,IAAI,GAAQ,GAAQ,EACpD,eAAM,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,YACxD,6BAAK,IAAI,CAAC,SAAS,IAAK,GAClB,EACN,IAAI,CAAC,WAAW,IAAI,eAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,YAAG,IAAI,CAAC,WAAW,GAAQ,IAC3E,IAPE,KAAK,CAQT,CACL,CAAC,KAtBM,KAAK,CAuBT,CACL,CAAC,GACG,CACN,CAAC;IACH,CAAC;CACD"}
@@ -40,12 +40,11 @@
40
40
  }
41
41
 
42
42
  .ns_group_category {
43
- display: inline-block;
44
- padding-top: 10px;
45
- padding-bottom: 10px;
46
- padding-left: 8px;
47
43
  border-bottom: solid 1px currentColor;
48
44
  width: 100%;
45
+ display: flex;
46
+ justify-content: space-between;
47
+ padding: 10px 8px;
49
48
  }
50
49
 
51
50
  .ns_group_list li {
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.3.258",
11
+ "version": "1.3.260",
12
12
  "author": "Amir Abolhasani, Alireza Esmaeeli, Sepideh Mazloumi, Hooman Shashaeh",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -40,12 +40,11 @@
40
40
  }
41
41
 
42
42
  .ns_group_category {
43
- display: inline-block;
44
- padding-top: 10px;
45
- padding-bottom: 10px;
46
- padding-left: 8px;
47
43
  border-bottom: solid 1px currentColor;
48
44
  width: 100%;
45
+ display: flex;
46
+ justify-content: space-between;
47
+ padding: 10px 8px;
49
48
  }
50
49
 
51
50
  .ns_group_list li {
@@ -40,6 +40,7 @@ export default class NSGroupedList extends Component<INSGroupedListProps, INSGro
40
40
  };
41
41
  this.handleClickOutside = this.handleClickOutside.bind(this);
42
42
  this.hide = this.hide.bind(this);
43
+ this.show = this.show.bind(this);
43
44
  }
44
45
 
45
46
  override componentDidMount()
@@ -59,10 +60,14 @@ export default class NSGroupedList extends Component<INSGroupedListProps, INSGro
59
60
  this.hide();
60
61
  }
61
62
  }
62
- hide(){
63
+ hide()
64
+ {
65
+ this.setState({ isVisible: false });
66
+ }
67
+ show()
68
+ {
63
69
  this.setState({ isVisible: false });
64
70
  }
65
-
66
71
  override render()
67
72
  {
68
73
  if (!this.state.isVisible)
@@ -72,21 +77,18 @@ export default class NSGroupedList extends Component<INSGroupedListProps, INSGro
72
77
 
73
78
  return (
74
79
  <div ref={this.wrapperRef} className={Styles.ns_group_list_parent}>
75
- <p>2</p>
76
80
  {this.props.groups.map((group, index) => (
77
81
  <ul key={index} className={Styles.ns_group_list}>
78
- <div className='d-flex'>
79
- <figure className={Styles.ns_input_close_icon}
80
- onClick={this.hide}
81
- >
82
+ <div className='d-flex w-100 justify-content-between align-items-center'>
83
+ <span className={Styles.ns_group_category}>{group.text}
82
84
  <img
85
+ onClick={this.hide}
83
86
  src="https://static.namirasoft.com/image/concept/close/blue.svg"
84
87
  alt="input-icon"
85
88
  width={24}
86
89
  height={24}
87
90
  />
88
- </figure>
89
- <span className={Styles.ns_group_category}>{group.text}</span>
91
+ </span>
90
92
  </div>
91
93
  {group.items.map((item, index) => (
92
94
  <li key={index} onClick={() => this.props.onClick(group.name, item.name)}>