selective-ui 1.0.2 → 1.0.3

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 (67) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +7 -2
  3. package/dist/selective-ui.css +567 -567
  4. package/dist/selective-ui.css.map +1 -1
  5. package/dist/selective-ui.esm.js +6046 -6046
  6. package/dist/selective-ui.esm.js.map +1 -1
  7. package/dist/selective-ui.esm.min.js +1 -1
  8. package/dist/selective-ui.esm.min.js.br +0 -0
  9. package/dist/selective-ui.min.js +1 -1
  10. package/dist/selective-ui.min.js.br +0 -0
  11. package/dist/selective-ui.umd.js +6046 -6046
  12. package/dist/selective-ui.umd.js.map +1 -1
  13. package/package.json +68 -68
  14. package/src/css/components/accessorybox.css +63 -63
  15. package/src/css/components/directive.css +19 -19
  16. package/src/css/components/empty-state.css +25 -25
  17. package/src/css/components/loading-state.css +25 -25
  18. package/src/css/components/optgroup.css +61 -61
  19. package/src/css/components/option-handle.css +33 -33
  20. package/src/css/components/option.css +129 -129
  21. package/src/css/components/placeholder.css +14 -14
  22. package/src/css/components/popup.css +38 -38
  23. package/src/css/components/searchbox.css +28 -28
  24. package/src/css/components/selectbox.css +53 -53
  25. package/src/css/index.css +74 -74
  26. package/src/js/adapter/mixed-adapter.js +434 -434
  27. package/src/js/components/accessorybox.js +124 -124
  28. package/src/js/components/directive.js +37 -37
  29. package/src/js/components/empty-state.js +67 -67
  30. package/src/js/components/loading-state.js +59 -59
  31. package/src/js/components/option-handle.js +113 -113
  32. package/src/js/components/placeholder.js +56 -56
  33. package/src/js/components/popup.js +470 -470
  34. package/src/js/components/searchbox.js +167 -167
  35. package/src/js/components/selectbox.js +692 -692
  36. package/src/js/core/base/adapter.js +162 -162
  37. package/src/js/core/base/model.js +59 -59
  38. package/src/js/core/base/recyclerview.js +82 -82
  39. package/src/js/core/base/view.js +62 -62
  40. package/src/js/core/model-manager.js +286 -286
  41. package/src/js/core/search-controller.js +521 -521
  42. package/src/js/index.js +136 -136
  43. package/src/js/models/group-model.js +142 -142
  44. package/src/js/models/option-model.js +236 -236
  45. package/src/js/services/dataset-observer.js +73 -73
  46. package/src/js/services/ea-observer.js +87 -87
  47. package/src/js/services/effector.js +403 -403
  48. package/src/js/services/refresher.js +39 -39
  49. package/src/js/services/resize-observer.js +151 -151
  50. package/src/js/services/select-observer.js +60 -60
  51. package/src/js/types/adapter.type.js +32 -32
  52. package/src/js/types/effector.type.js +23 -23
  53. package/src/js/types/ievents.type.js +10 -10
  54. package/src/js/types/libs.type.js +27 -27
  55. package/src/js/types/model.type.js +11 -11
  56. package/src/js/types/recyclerview.type.js +11 -11
  57. package/src/js/types/resize-observer.type.js +18 -18
  58. package/src/js/types/view.group.type.js +12 -12
  59. package/src/js/types/view.option.type.js +14 -14
  60. package/src/js/types/view.type.js +10 -10
  61. package/src/js/utils/guard.js +46 -46
  62. package/src/js/utils/ievents.js +83 -83
  63. package/src/js/utils/istorage.js +60 -60
  64. package/src/js/utils/libs.js +618 -618
  65. package/src/js/utils/selective.js +385 -385
  66. package/src/js/views/group-view.js +102 -102
  67. package/src/js/views/option-view.js +152 -152
@@ -1,130 +1,130 @@
1
- .selective-ui-option-view {
2
- display: flex;
3
- width: auto;
4
- flex-direction: row;
5
- align-items: center !important;
6
- position: relative;
7
- border-radius: 4px;
8
- line-height: normal;
9
- padding: 5px;
10
- gap: 7px;
11
- transition: all 180ms;
12
-
13
- background-color: var(--seui-transparent-color);
14
- border: solid 1px var(--seui-transparent-color);
15
- }
16
-
17
- .selective-ui-option-view.checked {
18
- background-color: var(--seui-chkbox-checked-background-color);
19
- border-color: var(--seui-chkbox-checked-border-color);
20
- }
21
-
22
- .selective-ui-option-view > input {
23
- display: none;
24
- }
25
-
26
- .selective-ui-option-view > label {
27
- width: 100%;
28
- height: 100%;
29
- display: flex;
30
- gap: 7px;
31
- font-family: var(--seui-view-text-style);
32
- font-size: var(--seui-view-text-size);
33
- color: var(--seui-view-text-color);
34
- align-items: center;
35
- }
36
-
37
- .selective-ui-option-view.multiple > label::before {
38
- content: "";
39
- display: block;
40
- width: 17px;
41
- min-width: 17px;
42
- height: 17px;
43
- min-height: 17px;
44
- background: var(--seui-chkbox-background-color);
45
- border: 1px solid var(--seui-chkbox-border-color);
46
- border-radius: 0.2em;
47
- -webkit-transition: all 200ms, background 200ms ease-in-out;
48
- transition: all 200ms, background 200ms ease-in-out;
49
- }
50
-
51
- .selective-ui-option-view.multiple.checked > label::before {
52
- color: var(--seui-view-background-color);
53
- background: var(--seui-chkbox-checked-color) url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNyAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04LjE2ODQ3IDEyLjM4MDhDNy43Nzc3OCAxMi43NzIyIDcuMTQzNTMgMTIuNzcyMiA2Ljc1Mjg0IDEyLjM4MDhMMi43NDQ5OCA4LjM2NDlDMi4zNTU0IDcuOTc0NTQgMi4zNTU0IDcuMzQyNDcgMi43NDQ5OCA2Ljk1MjFMMy4xNjQ1MiA2LjUzMTczQzMuNTU1MiA2LjE0MDI3IDQuMTg5NDYgNi4xNDAyNyA0LjU4MDE0IDYuNTMxNzNMNi43NTI4NCA4LjcwODc4QzcuMTQzNTIgOS4xMDAyNCA3Ljc3Nzc4IDkuMTAwMjQgOC4xNjg0NiA4LjcwODc4TDEyLjI0OTggNC42MTkyM0MxMi42NDA1IDQuMjI3NzcgMTMuMjc0OCA0LjIyNzc3IDEzLjY2NTUgNC42MTkyM0wxNC4wODUgNS4wMzk2QzE0LjQ3NDYgNS40Mjk5NyAxNC40NzQ2IDYuMDYyMDQgMTQuMDg1IDYuNDUyNEw4LjE2ODQ3IDEyLjM4MDhaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K) 50% 40% no-repeat;
54
- border: 1px solid var(--seui-chkbox-checked-color);
55
- }
56
-
57
- .selective-ui-option-view > label > div {
58
- width: 100%;
59
- height: 100%;
60
-
61
- display: flex;
62
- overflow: hidden;
63
- text-overflow: ellipsis;
64
- white-space: nowrap;
65
- }
66
-
67
- .selective-ui-option-view > label.align-horizontal-left > div {
68
- justify-content: flex-start;
69
- }
70
-
71
- .selective-ui-option-view > label.align-horizontal-center > div {
72
- justify-content: center;
73
- }
74
-
75
- .selective-ui-option-view > label.align-horizontal-right > div {
76
- justify-content: flex-end;
77
- }
78
-
79
- .selective-ui-option-view > label.align-vertical-left > div {
80
- align-items: flex-start;
81
- }
82
-
83
- .selective-ui-option-view > label.align-vertical-center > div {
84
- align-items: center;
85
- }
86
-
87
- .selective-ui-option-view > label.align-vertical-right > div {
88
- align-items: flex-end;
89
- }
90
-
91
- .selective-ui-option-view.hide {
92
- display: none;
93
- }
94
-
95
- .selective-ui-option-view.highlight {
96
- background-color: var(--seui-chkbox-hover-background-color);
97
- border-color: var(--seui-chkbox-hover-border-color);
98
- }
99
-
100
- .selective-ui-option-view.highlight.checked {
101
- background-color: var(--seui-chkbox-checked-hover-background-color);
102
- border-color: var(--seui-chkbox-checked-hover-border-color);
103
- }
104
-
105
- .selective-ui-option-view.has-image {
106
- gap: 10px;
107
- }
108
-
109
- .selective-ui-option-view.has-image.image-top {
110
- flex-direction: column;
111
- align-items: center;
112
- text-align: center;
113
- }
114
-
115
- .selective-ui-option-view.has-image.image-right {
116
- flex-direction: row-reverse;
117
- }
118
-
119
- .selective-ui-option-view.has-image.image-bottom {
120
- flex-direction: column-reverse;
121
- }
122
-
123
- .selective-ui-option-view .option-image {
124
- object-fit: cover;
125
- flex-shrink: 0;
126
- }
127
-
128
- .selective-ui-option-view.multiple.has-image > label::before {
129
- order: -1;
1
+ .selective-ui-option-view {
2
+ display: flex;
3
+ width: auto;
4
+ flex-direction: row;
5
+ align-items: center !important;
6
+ position: relative;
7
+ border-radius: 4px;
8
+ line-height: normal;
9
+ padding: 5px;
10
+ gap: 7px;
11
+ transition: all 180ms;
12
+
13
+ background-color: var(--seui-transparent-color);
14
+ border: solid 1px var(--seui-transparent-color);
15
+ }
16
+
17
+ .selective-ui-option-view.checked {
18
+ background-color: var(--seui-chkbox-checked-background-color);
19
+ border-color: var(--seui-chkbox-checked-border-color);
20
+ }
21
+
22
+ .selective-ui-option-view > input {
23
+ display: none;
24
+ }
25
+
26
+ .selective-ui-option-view > label {
27
+ width: 100%;
28
+ height: 100%;
29
+ display: flex;
30
+ gap: 7px;
31
+ font-family: var(--seui-view-text-style);
32
+ font-size: var(--seui-view-text-size);
33
+ color: var(--seui-view-text-color);
34
+ align-items: center;
35
+ }
36
+
37
+ .selective-ui-option-view.multiple > label::before {
38
+ content: "";
39
+ display: block;
40
+ width: 17px;
41
+ min-width: 17px;
42
+ height: 17px;
43
+ min-height: 17px;
44
+ background: var(--seui-chkbox-background-color);
45
+ border: 1px solid var(--seui-chkbox-border-color);
46
+ border-radius: 0.2em;
47
+ -webkit-transition: all 200ms, background 200ms ease-in-out;
48
+ transition: all 200ms, background 200ms ease-in-out;
49
+ }
50
+
51
+ .selective-ui-option-view.multiple.checked > label::before {
52
+ color: var(--seui-view-background-color);
53
+ background: var(--seui-chkbox-checked-color) url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNyAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04LjE2ODQ3IDEyLjM4MDhDNy43Nzc3OCAxMi43NzIyIDcuMTQzNTMgMTIuNzcyMiA2Ljc1Mjg0IDEyLjM4MDhMMi43NDQ5OCA4LjM2NDlDMi4zNTU0IDcuOTc0NTQgMi4zNTU0IDcuMzQyNDcgMi43NDQ5OCA2Ljk1MjFMMy4xNjQ1MiA2LjUzMTczQzMuNTU1MiA2LjE0MDI3IDQuMTg5NDYgNi4xNDAyNyA0LjU4MDE0IDYuNTMxNzNMNi43NTI4NCA4LjcwODc4QzcuMTQzNTIgOS4xMDAyNCA3Ljc3Nzc4IDkuMTAwMjQgOC4xNjg0NiA4LjcwODc4TDEyLjI0OTggNC42MTkyM0MxMi42NDA1IDQuMjI3NzcgMTMuMjc0OCA0LjIyNzc3IDEzLjY2NTUgNC42MTkyM0wxNC4wODUgNS4wMzk2QzE0LjQ3NDYgNS40Mjk5NyAxNC40NzQ2IDYuMDYyMDQgMTQuMDg1IDYuNDUyNEw4LjE2ODQ3IDEyLjM4MDhaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K) 50% 40% no-repeat;
54
+ border: 1px solid var(--seui-chkbox-checked-color);
55
+ }
56
+
57
+ .selective-ui-option-view > label > div {
58
+ width: 100%;
59
+ height: 100%;
60
+
61
+ display: flex;
62
+ overflow: hidden;
63
+ text-overflow: ellipsis;
64
+ white-space: nowrap;
65
+ }
66
+
67
+ .selective-ui-option-view > label.align-horizontal-left > div {
68
+ justify-content: flex-start;
69
+ }
70
+
71
+ .selective-ui-option-view > label.align-horizontal-center > div {
72
+ justify-content: center;
73
+ }
74
+
75
+ .selective-ui-option-view > label.align-horizontal-right > div {
76
+ justify-content: flex-end;
77
+ }
78
+
79
+ .selective-ui-option-view > label.align-vertical-left > div {
80
+ align-items: flex-start;
81
+ }
82
+
83
+ .selective-ui-option-view > label.align-vertical-center > div {
84
+ align-items: center;
85
+ }
86
+
87
+ .selective-ui-option-view > label.align-vertical-right > div {
88
+ align-items: flex-end;
89
+ }
90
+
91
+ .selective-ui-option-view.hide {
92
+ display: none;
93
+ }
94
+
95
+ .selective-ui-option-view.highlight {
96
+ background-color: var(--seui-chkbox-hover-background-color);
97
+ border-color: var(--seui-chkbox-hover-border-color);
98
+ }
99
+
100
+ .selective-ui-option-view.highlight.checked {
101
+ background-color: var(--seui-chkbox-checked-hover-background-color);
102
+ border-color: var(--seui-chkbox-checked-hover-border-color);
103
+ }
104
+
105
+ .selective-ui-option-view.has-image {
106
+ gap: 10px;
107
+ }
108
+
109
+ .selective-ui-option-view.has-image.image-top {
110
+ flex-direction: column;
111
+ align-items: center;
112
+ text-align: center;
113
+ }
114
+
115
+ .selective-ui-option-view.has-image.image-right {
116
+ flex-direction: row-reverse;
117
+ }
118
+
119
+ .selective-ui-option-view.has-image.image-bottom {
120
+ flex-direction: column-reverse;
121
+ }
122
+
123
+ .selective-ui-option-view .option-image {
124
+ object-fit: cover;
125
+ flex-shrink: 0;
126
+ }
127
+
128
+ .selective-ui-option-view.multiple.has-image > label::before {
129
+ order: -1;
130
130
  }
@@ -1,15 +1,15 @@
1
- .selective-ui-placeholder {
2
- display: flex;
3
- align-items: center;
4
-
5
- margin-left: 10px;
6
- max-width: calc(100% - 30px);
7
- height: calc(100% - 10px);
8
- text-overflow: ellipsis;
9
- white-space: nowrap;
10
- pointer-events: none;
11
- font-family: var(--seui-view-text-style);
12
- font-size: var(--seui-view-text-size) !important;
13
- overflow: hidden;
14
- color: var(--seui-view-text-color);
1
+ .selective-ui-placeholder {
2
+ display: flex;
3
+ align-items: center;
4
+
5
+ margin-left: 10px;
6
+ max-width: calc(100% - 30px);
7
+ height: calc(100% - 10px);
8
+ text-overflow: ellipsis;
9
+ white-space: nowrap;
10
+ pointer-events: none;
11
+ font-family: var(--seui-view-text-style);
12
+ font-size: var(--seui-view-text-size) !important;
13
+ overflow: hidden;
14
+ color: var(--seui-view-text-color);
15
15
  }
@@ -1,39 +1,39 @@
1
- .selective-ui-popup, .selective-ui-popup * {
2
- -webkit-box-sizing: border-box;
3
- -moz-box-sizing: border-box;
4
- box-sizing: border-box;
5
-
6
- line-height: normal;
7
- }
8
-
9
- .selective-ui-popup {
10
- display: none;
11
- position: fixed;
12
- z-index: 9999;
13
- overflow: none;
14
- flex-direction: column;
15
-
16
- height: 0px;
17
- padding: 2px;
18
- gap: 2px;
19
-
20
- background-color: var(--seui-popup-background-color);
21
- border-color: var(--seui-popup-border-color);
22
- border-style: var(--seui-popup-border-style);
23
- border-width: var(--seui-popup-border-width);
24
- border-radius: var(--seui-popup-border-radius);
25
- }
26
-
27
- .selective-ui-options-container {
28
- display: flex;
29
- flex-direction: column;
30
- width: 100%;
31
- gap: 2px;
32
-
33
- -webkit-overflow-scrolling: touch;
34
- touch-action: pan-y;
35
- }
36
-
37
- .selective-ui-options-container.hide {
38
- display: none;
1
+ .selective-ui-popup, .selective-ui-popup * {
2
+ -webkit-box-sizing: border-box;
3
+ -moz-box-sizing: border-box;
4
+ box-sizing: border-box;
5
+
6
+ line-height: normal;
7
+ }
8
+
9
+ .selective-ui-popup {
10
+ display: none;
11
+ position: fixed;
12
+ z-index: 9999;
13
+ overflow: none;
14
+ flex-direction: column;
15
+
16
+ height: 0px;
17
+ padding: 2px;
18
+ gap: 2px;
19
+
20
+ background-color: var(--seui-popup-background-color);
21
+ border-color: var(--seui-popup-border-color);
22
+ border-style: var(--seui-popup-border-style);
23
+ border-width: var(--seui-popup-border-width);
24
+ border-radius: var(--seui-popup-border-radius);
25
+ }
26
+
27
+ .selective-ui-options-container {
28
+ display: flex;
29
+ flex-direction: column;
30
+ width: 100%;
31
+ gap: 2px;
32
+
33
+ -webkit-overflow-scrolling: touch;
34
+ touch-action: pan-y;
35
+ }
36
+
37
+ .selective-ui-options-container.hide {
38
+ display: none;
39
39
  }
@@ -1,29 +1,29 @@
1
- .selective-ui-searchbox {
2
- display: flex;
3
- flex-direction: row;
4
- align-items: center;
5
- position: absolute;
6
-
7
- background-color: var(--seui-view-background-color);
8
- border-radius: 5px;
9
- z-index: 2;
10
- width: calc(100% - 30px);
11
- height: 100%;
12
- }
13
-
14
- .selective-ui-searchbox-input {
15
- width: 100%;
16
- height: calc(100% - 10px);
17
- border: 0;
18
- outline: none !important;
19
- background: var(--seui-transparent-color);
20
- color: var(--seui-view-text-color);
21
- padding: 0 !important;
22
- margin-left: 10px;
23
- text-indent: 0px;
24
- font-family: var(--seui-view-text-style);
25
- font-size: var(--seui-view-text-size) !important;
26
- overflow: hidden;
27
- text-overflow: ellipsis;
28
- white-space: nowrap;
1
+ .selective-ui-searchbox {
2
+ display: flex;
3
+ flex-direction: row;
4
+ align-items: center;
5
+ position: absolute;
6
+
7
+ background-color: var(--seui-view-background-color);
8
+ border-radius: 5px;
9
+ z-index: 2;
10
+ width: calc(100% - 30px);
11
+ height: 100%;
12
+ }
13
+
14
+ .selective-ui-searchbox-input {
15
+ width: 100%;
16
+ height: calc(100% - 10px);
17
+ border: 0;
18
+ outline: none !important;
19
+ background: var(--seui-transparent-color);
20
+ color: var(--seui-view-text-color);
21
+ padding: 0 !important;
22
+ margin-left: 10px;
23
+ text-indent: 0px;
24
+ font-family: var(--seui-view-text-style);
25
+ font-size: var(--seui-view-text-size) !important;
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ white-space: nowrap;
29
29
  }
@@ -1,54 +1,54 @@
1
- .selective-ui-MAIN {
2
- display: inline-block;
3
- max-width: min-content;
4
- }
5
- .selective-ui-MAIN, .selective-ui-MAIN * {
6
- -webkit-box-sizing: border-box;
7
- -moz-box-sizing: border-box;
8
- box-sizing: border-box;
9
-
10
- -ms-touch-action: manipulation;
11
- touch-action: manipulation;
12
-
13
- margin: 0;
14
- padding: 0;
15
-
16
- line-height: normal;
17
- }
18
- .selective-ui-MAIN > select.init {
19
- display: none;
20
- }
21
- .selective-ui-MAIN > .selective-ui-view {
22
- position: relative;
23
- width: 100%;
24
- height: 100%;
25
-
26
- display: flex;
27
- flex-direction: row;
28
- align-items: center;
29
-
30
- background-color: var(--seui-view-background-color);
31
- border: var(--seui-view-border-style) var(--seui-view-border-size) var(--seui-view-border-color);
32
- border-radius: var(--seui-view-border-radius);
33
- }
34
-
35
- .selective-ui-MAIN.invisible {
36
- display: none;
37
- }
38
-
39
- .selective-ui-MAIN.disabled {
40
- --seui-view-background-color: var(--seui-view-ro-background-color);
41
- --seui-view-border-color: var(--seui-view-ro-border-color);
42
- --seui-view-text-color: var(--seui-view-ro-text-color);
43
- --seui-directive-color: var(--seui-directive-ro-color);
44
- }
45
-
46
- .selective-ui-MAIN .hide {
47
- display: none;
48
- }
49
-
50
- @supports (-webkit-touch-callout: none) {
51
- :root {
52
- --seui-view-text-size: var(--seui-view-mobile-text-size);
53
- }
1
+ .selective-ui-MAIN {
2
+ display: inline-block;
3
+ max-width: min-content;
4
+ }
5
+ .selective-ui-MAIN, .selective-ui-MAIN * {
6
+ -webkit-box-sizing: border-box;
7
+ -moz-box-sizing: border-box;
8
+ box-sizing: border-box;
9
+
10
+ -ms-touch-action: manipulation;
11
+ touch-action: manipulation;
12
+
13
+ margin: 0;
14
+ padding: 0;
15
+
16
+ line-height: normal;
17
+ }
18
+ .selective-ui-MAIN > select.init {
19
+ display: none;
20
+ }
21
+ .selective-ui-MAIN > .selective-ui-view {
22
+ position: relative;
23
+ width: 100%;
24
+ height: 100%;
25
+
26
+ display: flex;
27
+ flex-direction: row;
28
+ align-items: center;
29
+
30
+ background-color: var(--seui-view-background-color);
31
+ border: var(--seui-view-border-style) var(--seui-view-border-size) var(--seui-view-border-color);
32
+ border-radius: var(--seui-view-border-radius);
33
+ }
34
+
35
+ .selective-ui-MAIN.invisible {
36
+ display: none;
37
+ }
38
+
39
+ .selective-ui-MAIN.disabled {
40
+ --seui-view-background-color: var(--seui-view-ro-background-color);
41
+ --seui-view-border-color: var(--seui-view-ro-border-color);
42
+ --seui-view-text-color: var(--seui-view-ro-text-color);
43
+ --seui-directive-color: var(--seui-directive-ro-color);
44
+ }
45
+
46
+ .selective-ui-MAIN .hide {
47
+ display: none;
48
+ }
49
+
50
+ @supports (-webkit-touch-callout: none) {
51
+ :root {
52
+ --seui-view-text-size: var(--seui-view-mobile-text-size);
53
+ }
54
54
  }