namirasoft-site-react 1.3.140 → 1.3.141

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.
Files changed (31) hide show
  1. package/dist/App.js +109 -55
  2. package/dist/App.js.map +1 -1
  3. package/dist/components/NSButtonRed.module.css +1 -1
  4. package/dist/components/NSFilterBox.d.ts +44 -1
  5. package/dist/components/NSFilterBox.js +112 -2
  6. package/dist/components/NSFilterBox.js.map +1 -1
  7. package/dist/components/NSFilterBox.module.css +10 -0
  8. package/dist/components/NSFilterBoxDialog.d.ts +1 -0
  9. package/dist/components/NSFilterBoxDialog.js +2 -2
  10. package/dist/components/NSFilterBoxDialog.js.map +1 -1
  11. package/dist/components/NSFilterItem.d.ts +17 -0
  12. package/dist/components/NSFilterItem.js +29 -0
  13. package/dist/components/NSFilterItem.js.map +1 -0
  14. package/dist/components/NSFilterItem.module.css +24 -0
  15. package/dist/components/NSGroupedList.d.ts +21 -0
  16. package/dist/components/NSGroupedList.js +12 -0
  17. package/dist/components/NSGroupedList.js.map +1 -0
  18. package/dist/components/NSGroupedList.module.css +71 -0
  19. package/dist/components/NSLayoutAction.js +4 -4
  20. package/dist/components/NSLayoutAction.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/App.tsx +110 -92
  23. package/src/components/NSButtonRed.module.css +1 -1
  24. package/src/components/NSFilterBox.module.css +10 -0
  25. package/src/components/NSFilterBox.tsx +204 -20
  26. package/src/components/NSFilterBoxDialog.tsx +5 -3
  27. package/src/components/NSFilterItem.module.css +24 -0
  28. package/src/components/NSFilterItem.tsx +72 -0
  29. package/src/components/NSGroupedList.module.css +71 -0
  30. package/src/components/NSGroupedList.tsx +59 -0
  31. package/src/components/NSLayoutAction.tsx +23 -21
@@ -0,0 +1,71 @@
1
+ .ns_group_list_parent {
2
+ width: 100%;
3
+ max-width: 560px;
4
+ border-radius: 8px;
5
+ border: solid 1px #B2BBD9;
6
+ background-color: #fff;
7
+ padding-bottom: 16px;
8
+ height: 250px;
9
+ overflow: auto;
10
+ }
11
+
12
+ .ns_group_list_parent::-webkit-scrollbar {
13
+ width: 1rem;
14
+ }
15
+
16
+ .ns_group_list_parent::-webkit-scrollbar-track {
17
+ box-shadow: inset 0 0 6px #E8EBF6;
18
+ }
19
+
20
+ .ns_group_list_parent::-webkit-scrollbar-thumb {
21
+ background-color: #A1A4B0;
22
+ border-radius: 8px;
23
+ }
24
+
25
+ .ns_group_list {
26
+ list-style-type: none;
27
+ color: #141B5C;
28
+ padding: 0;
29
+ margin: 0;
30
+ display: flex;
31
+ flex-direction: column;
32
+ align-items: flex-start;
33
+ justify-content: flex-start;
34
+ font-size: 16px;
35
+ font-weight: 700;
36
+ width: 100%;
37
+ }
38
+
39
+ .ns_group_category {
40
+ display: inline-block;
41
+ padding-top: 10px;
42
+ padding-bottom: 10px;
43
+ padding-left: 8px;
44
+ border-bottom: solid 1px currentColor;
45
+ width: 100%;
46
+ }
47
+
48
+ .ns_group_list li {
49
+ width: 100%;
50
+ }
51
+
52
+ .ns_group_item {
53
+ cursor: pointer;
54
+ padding: 6px 0 6px 24px;
55
+ font-size: 16px;
56
+ font-weight: 300;
57
+ color: #141B5C;
58
+ border-bottom: solid 1px currentColor;
59
+ width: 100%;
60
+ display: inline-block;
61
+ transition: all 0.1s;
62
+ }
63
+
64
+ .ns_group_item:hover {
65
+ background-color: #B2BBD9;
66
+ font-weight: 700;
67
+ }
68
+
69
+ .ns_block {
70
+ display: block;
71
+ }
@@ -0,0 +1,59 @@
1
+ "use client"
2
+ import { Component } from 'react';
3
+ import { IBaseComponentProps } from '../main';
4
+ import Styles from "./NSGroupedList.module.css"
5
+
6
+ interface INSGroupedListProps extends IBaseComponentProps
7
+ {
8
+ groups: {
9
+ name: string;
10
+ text: string;
11
+ sign?: string;
12
+ operator_name?: string;
13
+ items: {
14
+ name: string;
15
+ text: string;
16
+ }[];
17
+ }[];
18
+ onClick: (group: string, item: string) => void;
19
+ }
20
+
21
+ interface INSGroupedListState
22
+ {
23
+
24
+ }
25
+
26
+ class NSGroupedList extends Component<INSGroupedListProps, INSGroupedListState>
27
+ {
28
+ override render()
29
+ {
30
+ return (
31
+ <div className={Styles.ns_group_list_parent}>
32
+ {this.props.groups.map((group, index) =>
33
+ <ul key={index} className={Styles.ns_group_list}>
34
+ <span className={Styles.ns_group_category}> {group.name} </span>
35
+ {
36
+ group.items.map((item, index) =>
37
+ <li key={index} onClick={() => this.props.onClick(group.name, item.name)}>
38
+ <div className={Styles.ns_group_item}>
39
+ <span>
40
+ {item.name} {" "}
41
+ {group.sign && <span> {group.sign} </span>}
42
+ </span>
43
+ {
44
+ group.operator_name &&
45
+ <span className={Styles.ns_block}> {group.operator_name} </span>
46
+ }
47
+ </div>
48
+ </li>
49
+ )
50
+ }
51
+ </ul>
52
+ )}
53
+ </div>
54
+
55
+ );
56
+ }
57
+ }
58
+
59
+ export default NSGroupedList;
@@ -48,27 +48,7 @@ export function NSLayoutAction(props: INSLayoutActionProps)
48
48
  />
49
49
  </div>
50
50
 
51
- {/* Mobile */}
52
- <div className={`d-block d-lg-none ${Styles.ns_mobile_action_bar_title}`}>
53
- <h1 className={Styles.title}>{props.title}</h1>
54
- {
55
- props.description && lines &&
56
- <>
57
- <p className={Styles.description}>
58
- {
59
- lines.map((line, index) =>
60
- {
61
- return <>
62
- {line.trim()}
63
- {index != lines.length - 1 && <br />}
64
- </>
65
- })
66
- }
67
- </p>
68
- <NSSpace size={NSSpaceSizeType.MINI} />
69
- </>
70
- }
71
- </div>
51
+
72
52
 
73
53
  <div className={Styles.ns_actions_hodler}>
74
54
  {filtered_actions.map((action) =>
@@ -82,6 +62,28 @@ export function NSLayoutAction(props: INSLayoutActionProps)
82
62
 
83
63
  </div>
84
64
  <NSSpace size={NSSpaceSizeType.SMALL} />
65
+ {/* Mobile */}
66
+ <div className={`container d-block d-lg-none ${Styles.ns_mobile_action_bar_title}`}>
67
+ <h1 className={Styles.title}>{props.title}</h1>
68
+ {
69
+ props.description && lines &&
70
+ <>
71
+ <p className={Styles.description}>
72
+ {
73
+ lines.map((line, index) =>
74
+ {
75
+ return <>
76
+ {line.trim()}
77
+ {index != lines.length - 1 && <br />}
78
+ </>
79
+ })
80
+ }
81
+ </p>
82
+ <NSSpace size={NSSpaceSizeType.MINI} />
83
+ </>
84
+ }
85
+ </div>
86
+ <NSSpace size={NSSpaceSizeType.SMALL} />
85
87
  {props.children}
86
88
  </NSLayout>
87
89
  );