chuijs 3.6.2 → 3.6.4
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/LICENSE +21 -21
- package/README.md +1203 -162
- package/framework/appLayout/default/chui_app_layout.js +747 -747
- package/framework/appLayout/default/global_style.css +592 -568
- package/framework/appLayout/default/main_theme_style.css +118 -101
- package/framework/components/chui_accordion/accordion.js +63 -63
- package/framework/components/chui_accordion/styles.css +79 -75
- package/framework/components/chui_badge/badge.js +55 -55
- package/framework/components/chui_badge/styles.css +29 -29
- package/framework/components/chui_button/button.js +48 -48
- package/framework/components/chui_button/styles.css +75 -70
- package/framework/components/chui_calendar/calendar.js +97 -97
- package/framework/components/chui_card/card.js +87 -0
- package/framework/components/chui_card/styles.css +72 -0
- package/framework/components/chui_code/code.js +18 -18
- package/framework/components/chui_code/styles.css +9 -9
- package/framework/components/chui_console/console.js +27 -27
- package/framework/components/chui_console/styles.css +31 -31
- package/framework/components/chui_content_block/content_block.js +51 -51
- package/framework/components/chui_content_block/styles.css +2 -2
- package/framework/components/chui_context_menu/context_menu.js +230 -0
- package/framework/components/chui_context_menu/styles.css +136 -0
- package/framework/components/chui_custom_element/custom_element.js +24 -24
- package/framework/components/chui_details/details.js +85 -85
- package/framework/components/chui_details/styles.css +70 -66
- package/framework/components/chui_fieldset/fieldset.js +40 -40
- package/framework/components/chui_fieldset/styles.css +24 -24
- package/framework/components/chui_form/form.js +40 -40
- package/framework/components/chui_form/styles.css +21 -21
- package/framework/components/chui_graphs/graphs.js +234 -190
- package/framework/components/chui_graphs/styles.css +37 -32
- package/framework/components/chui_hero/hero.js +98 -0
- package/framework/components/chui_hero/styles.css +91 -0
- package/framework/components/chui_html_block/html_block.js +16 -16
- package/framework/components/chui_html_block/styles.css +5 -5
- package/framework/components/chui_hx/hx.js +15 -15
- package/framework/components/chui_hx/styles.css +38 -38
- package/framework/components/chui_icons/icons.js +2144 -2144
- package/framework/components/chui_icons/styles.css +13 -13
- package/framework/components/chui_inputs/chui_check_box/check_box.js +32 -32
- package/framework/components/chui_inputs/chui_check_box/styles.css +91 -86
- package/framework/components/chui_inputs/chui_combo_box/combo_box.js +166 -150
- package/framework/components/chui_inputs/chui_combo_box/styles.css +113 -107
- package/framework/components/chui_inputs/chui_date/date.js +177 -174
- package/framework/components/chui_inputs/chui_date/styles.css +163 -128
- package/framework/components/chui_inputs/chui_email/email.js +61 -61
- package/framework/components/chui_inputs/chui_email/styles.css +69 -71
- package/framework/components/chui_inputs/chui_file/file.js +76 -76
- package/framework/components/chui_inputs/chui_file/styles.css +99 -99
- package/framework/components/chui_inputs/chui_multi_combo_box/multi_combo_box.js +295 -295
- package/framework/components/chui_inputs/chui_multi_combo_box/styles.css +212 -235
- package/framework/components/chui_inputs/chui_number/number.js +108 -108
- package/framework/components/chui_inputs/chui_number/styles.css +84 -84
- package/framework/components/chui_inputs/chui_password/password.js +99 -99
- package/framework/components/chui_inputs/chui_password/styles.css +97 -97
- package/framework/components/chui_inputs/chui_radio_button/radio_button.js +45 -45
- package/framework/components/chui_inputs/chui_radio_button/styles.css +76 -73
- package/framework/components/chui_inputs/chui_select_box/select_box.js +187 -170
- package/framework/components/chui_inputs/chui_select_box/styles.css +123 -117
- package/framework/components/chui_inputs/chui_text/styles.css +83 -84
- package/framework/components/chui_inputs/chui_text/text.js +91 -91
- package/framework/components/chui_inputs/chui_text_area/styles.css +57 -57
- package/framework/components/chui_inputs/chui_text_area/text_area.js +61 -61
- package/framework/components/chui_inputs/chui_toggle/styles.css +66 -61
- package/framework/components/chui_inputs/chui_toggle/toggle.js +36 -36
- package/framework/components/chui_label/label.js +54 -54
- package/framework/components/chui_label/styles.css +11 -11
- package/framework/components/chui_media/audio.js +908 -908
- package/framework/components/chui_media/audio_styles.css +458 -458
- package/framework/components/chui_media/image.js +105 -105
- package/framework/components/chui_media/image_styles.css +61 -61
- package/framework/components/chui_media/video.js +248 -248
- package/framework/components/chui_media/video_styles.css +160 -160
- package/framework/components/chui_menu_bar/menu_bar.js +66 -74
- package/framework/components/chui_menu_bar/styles.css +114 -76
- package/framework/components/chui_modal/modal.js +142 -135
- package/framework/components/chui_modal/styles.css +36 -36
- package/framework/components/chui_notification/notification.js +72 -72
- package/framework/components/chui_notification/notification_download.js +78 -78
- package/framework/components/chui_notification/notification_download_progress.css +119 -123
- package/framework/components/chui_notification/notification_download_progress.js +105 -105
- package/framework/components/chui_notification/notification_update.js +54 -54
- package/framework/components/chui_notification/styles.css +91 -91
- package/framework/components/chui_notification/styles_download.css +85 -85
- package/framework/components/chui_notification/styles_update.css +73 -73
- package/framework/components/chui_paragraph/paragraph.js +14 -14
- package/framework/components/chui_paragraph/styles.css +6 -6
- package/framework/components/chui_popups/popups.js +250 -250
- package/framework/components/chui_popups/styles.css +129 -115
- package/framework/components/chui_progress_bar/progress_bar.js +28 -28
- package/framework/components/chui_progress_bar/styles.css +28 -28
- package/framework/components/chui_radio_group/radio_group.js +57 -57
- package/framework/components/chui_radio_group/styles.css +3 -3
- package/framework/components/chui_slideshow/slideshow.js +75 -75
- package/framework/components/chui_slideshow/styles.css +94 -85
- package/framework/components/chui_spinner/spinner.js +45 -45
- package/framework/components/chui_spinner/styles.css +23 -23
- package/framework/components/chui_table/styles.css +42 -42
- package/framework/components/chui_table/table.js +234 -234
- package/framework/components/chui_tabs/chui_tabs.js +77 -77
- package/framework/components/chui_tabs/styles.css +54 -48
- package/framework/components/chui_text_editor/styles.css +217 -217
- package/framework/components/chui_text_editor/text_editor.js +144 -144
- package/framework/components/chui_text_editor/text_editor_panel.js +568 -568
- package/framework/components/chui_tree_view/styles.css +81 -75
- package/framework/components/chui_tree_view/tree_view.js +90 -90
- package/framework/components/chui_webview/styles.css +27 -27
- package/framework/components/chui_webview/webview.js +103 -103
- package/framework/components/telegram_bot/chui_telegram_bot.js +183 -183
- package/framework/modules/chui_animations/animations.js +121 -121
- package/framework/modules/chui_animations/styles.css +79 -79
- package/framework/modules/chui_fonts.js +7129 -6974
- package/framework/modules/chui_functions.js +106 -78
- package/framework/modules/chui_logger/chui_logger.js +53 -53
- package/framework/modules/chui_page/page.js +86 -86
- package/framework/modules/chui_page/styles.css +9 -9
- package/framework/tray_bar/chui_menu_items.js +48 -48
- package/index.js +570 -555
- package/package.json +51 -46
|
@@ -1,161 +1,161 @@
|
|
|
1
|
-
chui_vp_main {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
border-radius: var(--border_radius);
|
|
5
|
-
--seek-before-width: 0%;
|
|
6
|
-
--volume-before-width: 0%;
|
|
7
|
-
border: none;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
chui_vp_block {
|
|
11
|
-
display: block;
|
|
12
|
-
position: absolute;
|
|
13
|
-
width: -webkit-fill-available;
|
|
14
|
-
bottom: 0;
|
|
15
|
-
backdrop-filter: var(--global_blur);
|
|
16
|
-
border-bottom-right-radius: var(--border_radius);
|
|
17
|
-
border-bottom-left-radius: var(--border_radius);
|
|
18
|
-
background: var(--header_background);
|
|
19
|
-
opacity: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/* Блок информация */
|
|
23
|
-
chui_vp_info {
|
|
24
|
-
display: flex;
|
|
25
|
-
margin: 16px 12px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
chui_vp_seek_buf {
|
|
29
|
-
width: 0;
|
|
30
|
-
height: 5px;
|
|
31
|
-
border-radius: 5px;
|
|
32
|
-
background: rgba(255,255,255,0.30);
|
|
33
|
-
position: absolute
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
#chui_vp_seek {
|
|
37
|
-
margin: 0;
|
|
38
|
-
position: relative;
|
|
39
|
-
-webkit-appearance: none;
|
|
40
|
-
border-radius: 5px;
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 5px;
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
outline: none;
|
|
45
|
-
background: rgba(255,255,255,0.15);
|
|
46
|
-
float: left;
|
|
47
|
-
z-index: 1
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
#chui_vp_seek::-webkit-slider-runnable-track {
|
|
51
|
-
width: 100%;
|
|
52
|
-
height: 5px;
|
|
53
|
-
border-radius: 5px
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
#chui_vp_seek::before {
|
|
57
|
-
transition: all 0s;
|
|
58
|
-
position: absolute;
|
|
59
|
-
content: '';
|
|
60
|
-
left: 0;
|
|
61
|
-
width: var(--seek-before-width);
|
|
62
|
-
height: 5px;
|
|
63
|
-
border-radius: 5px;
|
|
64
|
-
background: var(--blue_prime_background);
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
#chui_vp_seek::-webkit-slider-thumb {
|
|
69
|
-
position: relative;
|
|
70
|
-
-webkit-appearance: none;
|
|
71
|
-
border: none;
|
|
72
|
-
height: 16px;
|
|
73
|
-
width: 16px;
|
|
74
|
-
border-radius: 50%;
|
|
75
|
-
background-color: rgba(255,255,255,0);
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
margin: -8px 0 0 0
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
#chui_vp_seek:focus {
|
|
81
|
-
outline: none;
|
|
82
|
-
border: none;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
#chui_vp_seek:focus::-webkit-slider-runnable-track {
|
|
86
|
-
outline: none;
|
|
87
|
-
border: none;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* УПРАВЛЕНИЕ ГРОМКОСТЬЮ */
|
|
91
|
-
chui_vp_volume_block {
|
|
92
|
-
display: flex;
|
|
93
|
-
margin-left: auto
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
#chui_vp_volume {
|
|
97
|
-
position: relative;
|
|
98
|
-
-webkit-appearance: none;
|
|
99
|
-
border-radius: 5px;
|
|
100
|
-
width: 100%;
|
|
101
|
-
height: 5px;
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
outline: none;
|
|
104
|
-
background: rgba(255,255,255,0.15);
|
|
105
|
-
float: left;
|
|
106
|
-
z-index: 1;
|
|
107
|
-
margin: auto 6px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
#chui_vp_volume::-webkit-slider-runnable-track {
|
|
111
|
-
width: 100%;
|
|
112
|
-
height: 5px;
|
|
113
|
-
border-radius: 5px
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
#chui_vp_volume::before {
|
|
117
|
-
transition: all 0s;
|
|
118
|
-
position: absolute;
|
|
119
|
-
content: '';
|
|
120
|
-
left: 0;
|
|
121
|
-
width: var(--volume-before-width);
|
|
122
|
-
height: 5px;
|
|
123
|
-
border-radius: 5px;
|
|
124
|
-
background: var(--blue_prime_background);
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
#chui_vp_volume::-webkit-slider-thumb {
|
|
129
|
-
position: relative;
|
|
130
|
-
-webkit-appearance: none;
|
|
131
|
-
border: none;
|
|
132
|
-
height: 16px;
|
|
133
|
-
width: 16px;
|
|
134
|
-
border-radius: 50%;
|
|
135
|
-
background-color: rgba(255,255,255,0);
|
|
136
|
-
cursor: pointer;
|
|
137
|
-
margin: -8px 0 0 0
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
#chui_vp_volume:focus {
|
|
141
|
-
outline: none;
|
|
142
|
-
border: none;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
#chui_vp_volume:focus::-webkit-slider-runnable-track {
|
|
146
|
-
outline: none;
|
|
147
|
-
border: none;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/* Блок управления */
|
|
151
|
-
chui_vp_controls {
|
|
152
|
-
display: flex;
|
|
153
|
-
justify-content: left;
|
|
154
|
-
margin: var(--margin);
|
|
155
|
-
align-items: center
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/* КНОПКИ */
|
|
159
|
-
chui_vp_play_pause, chui_vp_next, chui_vp_prev {
|
|
160
|
-
display: flex
|
|
1
|
+
chui_vp_main {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
border-radius: var(--border_radius);
|
|
5
|
+
--seek-before-width: 0%;
|
|
6
|
+
--volume-before-width: 0%;
|
|
7
|
+
border: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
chui_vp_block {
|
|
11
|
+
display: block;
|
|
12
|
+
position: absolute;
|
|
13
|
+
width: -webkit-fill-available;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
backdrop-filter: var(--global_blur);
|
|
16
|
+
border-bottom-right-radius: var(--border_radius);
|
|
17
|
+
border-bottom-left-radius: var(--border_radius);
|
|
18
|
+
background: var(--header_background);
|
|
19
|
+
opacity: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Блок информация */
|
|
23
|
+
chui_vp_info {
|
|
24
|
+
display: flex;
|
|
25
|
+
margin: 16px 12px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
chui_vp_seek_buf {
|
|
29
|
+
width: 0;
|
|
30
|
+
height: 5px;
|
|
31
|
+
border-radius: 5px;
|
|
32
|
+
background: rgba(255,255,255,0.30);
|
|
33
|
+
position: absolute
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
#chui_vp_seek {
|
|
37
|
+
margin: 0;
|
|
38
|
+
position: relative;
|
|
39
|
+
-webkit-appearance: none;
|
|
40
|
+
border-radius: 5px;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 5px;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
outline: none;
|
|
45
|
+
background: rgba(255,255,255,0.15);
|
|
46
|
+
float: left;
|
|
47
|
+
z-index: 1
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#chui_vp_seek::-webkit-slider-runnable-track {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 5px;
|
|
53
|
+
border-radius: 5px
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#chui_vp_seek::before {
|
|
57
|
+
transition: all 0s;
|
|
58
|
+
position: absolute;
|
|
59
|
+
content: '';
|
|
60
|
+
left: 0;
|
|
61
|
+
width: var(--seek-before-width);
|
|
62
|
+
height: 5px;
|
|
63
|
+
border-radius: 5px;
|
|
64
|
+
background: var(--blue_prime_background);
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
#chui_vp_seek::-webkit-slider-thumb {
|
|
69
|
+
position: relative;
|
|
70
|
+
-webkit-appearance: none;
|
|
71
|
+
border: none;
|
|
72
|
+
height: 16px;
|
|
73
|
+
width: 16px;
|
|
74
|
+
border-radius: 50%;
|
|
75
|
+
background-color: rgba(255,255,255,0);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
margin: -8px 0 0 0
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
#chui_vp_seek:focus {
|
|
81
|
+
outline: none;
|
|
82
|
+
border: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
#chui_vp_seek:focus::-webkit-slider-runnable-track {
|
|
86
|
+
outline: none;
|
|
87
|
+
border: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* УПРАВЛЕНИЕ ГРОМКОСТЬЮ */
|
|
91
|
+
chui_vp_volume_block {
|
|
92
|
+
display: flex;
|
|
93
|
+
margin-left: auto
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
#chui_vp_volume {
|
|
97
|
+
position: relative;
|
|
98
|
+
-webkit-appearance: none;
|
|
99
|
+
border-radius: 5px;
|
|
100
|
+
width: 100%;
|
|
101
|
+
height: 5px;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
outline: none;
|
|
104
|
+
background: rgba(255,255,255,0.15);
|
|
105
|
+
float: left;
|
|
106
|
+
z-index: 1;
|
|
107
|
+
margin: auto 6px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
#chui_vp_volume::-webkit-slider-runnable-track {
|
|
111
|
+
width: 100%;
|
|
112
|
+
height: 5px;
|
|
113
|
+
border-radius: 5px
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
#chui_vp_volume::before {
|
|
117
|
+
transition: all 0s;
|
|
118
|
+
position: absolute;
|
|
119
|
+
content: '';
|
|
120
|
+
left: 0;
|
|
121
|
+
width: var(--volume-before-width);
|
|
122
|
+
height: 5px;
|
|
123
|
+
border-radius: 5px;
|
|
124
|
+
background: var(--blue_prime_background);
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
#chui_vp_volume::-webkit-slider-thumb {
|
|
129
|
+
position: relative;
|
|
130
|
+
-webkit-appearance: none;
|
|
131
|
+
border: none;
|
|
132
|
+
height: 16px;
|
|
133
|
+
width: 16px;
|
|
134
|
+
border-radius: 50%;
|
|
135
|
+
background-color: rgba(255,255,255,0);
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
margin: -8px 0 0 0
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
#chui_vp_volume:focus {
|
|
141
|
+
outline: none;
|
|
142
|
+
border: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
#chui_vp_volume:focus::-webkit-slider-runnable-track {
|
|
146
|
+
outline: none;
|
|
147
|
+
border: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Блок управления */
|
|
151
|
+
chui_vp_controls {
|
|
152
|
+
display: flex;
|
|
153
|
+
justify-content: left;
|
|
154
|
+
margin: var(--margin);
|
|
155
|
+
align-items: center
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* КНОПКИ */
|
|
159
|
+
chui_vp_play_pause, chui_vp_next, chui_vp_prev {
|
|
160
|
+
display: flex
|
|
161
161
|
}
|
|
@@ -1,75 +1,67 @@
|
|
|
1
|
-
const {Animation} = require("../../modules/chui_animations/animations");
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
#
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
new Animation(this.#mb_dd_dropdown).fadeOut();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
set() {
|
|
71
|
-
return this.#mb_dd_main;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
1
|
+
const {Animation} = require("../../modules/chui_animations/animations");
|
|
2
|
+
|
|
3
|
+
const MENU_BAR_DROP_DOWN_ACTIVE_CLASS = "menu_bar_drop_down_button";
|
|
4
|
+
|
|
5
|
+
class MenuBar {
|
|
6
|
+
#chui_menu_bar_main = document.createElement("chui_menu_bar_main")
|
|
7
|
+
constructor(options = { test: Boolean() }) {
|
|
8
|
+
require('../../modules/chui_functions').setStyles(__dirname + "/styles.css", 'chUiJS_MenuBar');
|
|
9
|
+
if (options.test !== undefined) this.#chui_menu_bar_main.setAttribute("test", options.test)
|
|
10
|
+
}
|
|
11
|
+
addMenuItems(...components) {
|
|
12
|
+
for (let component of components) {
|
|
13
|
+
let element = component.set()
|
|
14
|
+
new Animation(element).fadeIn()
|
|
15
|
+
this.#chui_menu_bar_main.appendChild(element);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
set() {
|
|
19
|
+
return this.#chui_menu_bar_main;
|
|
20
|
+
}
|
|
21
|
+
static DROPDOWN(options = {title: String(), items: []}) {
|
|
22
|
+
return new MenuBarDropDown(options)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
class MenuBarDropDown {
|
|
27
|
+
#mb_dd_main = document.createElement("menu_bar_drop_down_main");
|
|
28
|
+
#mb_dd_button = document.createElement("menu_bar_drop_down_button");
|
|
29
|
+
#mb_dd_dropdown = document.createElement("menu_bar_dropdown");
|
|
30
|
+
#is_open = false;
|
|
31
|
+
constructor(options = {title: String(), items: []}) {
|
|
32
|
+
this.#mb_dd_button.innerText = options.title;
|
|
33
|
+
this.#mb_dd_main.appendChild(this.#mb_dd_button)
|
|
34
|
+
this.#mb_dd_main.appendChild(this.#mb_dd_dropdown)
|
|
35
|
+
for (let item of options.items) this.#mb_dd_dropdown.appendChild(item.set());
|
|
36
|
+
|
|
37
|
+
// Слушатели
|
|
38
|
+
this.#mb_dd_button.addEventListener("click", this.#mb_dd_button_click_event);
|
|
39
|
+
this.#mb_dd_dropdown.addEventListener("click", this.#mb_dd_dropdown_click_event);
|
|
40
|
+
}
|
|
41
|
+
#open() {
|
|
42
|
+
this.#is_open = true;
|
|
43
|
+
this.#mb_dd_button.classList.add(MENU_BAR_DROP_DOWN_ACTIVE_CLASS);
|
|
44
|
+
new Animation(this.#mb_dd_dropdown).fadeIn();
|
|
45
|
+
window.addEventListener('click', this.#window_click_event);
|
|
46
|
+
}
|
|
47
|
+
#close() {
|
|
48
|
+
this.#is_open = false;
|
|
49
|
+
this.#mb_dd_button.classList.remove(MENU_BAR_DROP_DOWN_ACTIVE_CLASS);
|
|
50
|
+
new Animation(this.#mb_dd_dropdown).fadeOut();
|
|
51
|
+
window.removeEventListener('click', this.#window_click_event);
|
|
52
|
+
}
|
|
53
|
+
#mb_dd_button_click_event = () => {
|
|
54
|
+
if (this.#is_open) this.#close(); else this.#open();
|
|
55
|
+
}
|
|
56
|
+
#mb_dd_dropdown_click_event = () => {
|
|
57
|
+
this.#close();
|
|
58
|
+
}
|
|
59
|
+
#window_click_event = (event) => {
|
|
60
|
+
if (this.#is_open && !this.#mb_dd_main.contains(event.target)) this.#close();
|
|
61
|
+
}
|
|
62
|
+
set() {
|
|
63
|
+
return this.#mb_dd_main;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
75
67
|
exports.MenuBar = MenuBar
|
|
@@ -1,77 +1,115 @@
|
|
|
1
|
-
chui_menu_bar_main {
|
|
2
|
-
display: flex;
|
|
3
|
-
width: max-content;
|
|
4
|
-
height: max-content;
|
|
5
|
-
padding: 2px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
chui_menu_bar_button {
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
height: max-content;
|
|
11
|
-
width: max-content;
|
|
12
|
-
border-radius: var(--border_radius);
|
|
13
|
-
padding: var(--main_padding);
|
|
14
|
-
font-size: var(--font_default_size);
|
|
15
|
-
font-weight: 400;
|
|
16
|
-
border: none;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: row;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
color: var(--text_color);
|
|
22
|
-
margin: 2px
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
chui_menu_bar_button:hover {
|
|
26
|
-
background: var(--blue_prime_background);
|
|
27
|
-
color: var(--text_color_hover);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
background: var(--blue_prime_background);
|
|
43
|
-
color: var(--text_color_hover);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
menu_bar_drop_down_button {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
z-index: 1;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
1
|
+
chui_menu_bar_main {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: max-content;
|
|
4
|
+
height: max-content;
|
|
5
|
+
padding: 2px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
chui_menu_bar_button {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
height: max-content;
|
|
11
|
+
width: max-content;
|
|
12
|
+
border-radius: var(--border_radius);
|
|
13
|
+
padding: var(--main_padding);
|
|
14
|
+
font-size: var(--font_default_size);
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
border: none;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
color: var(--text_color);
|
|
22
|
+
margin: 2px
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
chui_menu_bar_button:hover {
|
|
26
|
+
background: var(--blue_prime_background);
|
|
27
|
+
color: var(--text_color_hover);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
chui_menu_bar_button:active {
|
|
31
|
+
background: var(--element_background_prime);
|
|
32
|
+
color: var(--text_color_hover);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
menu_bar_drop_down_main {
|
|
36
|
+
position: relative;
|
|
37
|
+
display: flex;
|
|
38
|
+
margin: auto 6px
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
menu_bar_drop_down_button:hover {
|
|
42
|
+
background: var(--blue_prime_background);
|
|
43
|
+
color: var(--text_color_hover);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.menu_bar_drop_down_button {
|
|
47
|
+
background: var(--blue_prime_background);
|
|
48
|
+
color: var(--text_color_hover);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
menu_bar_drop_down_button {
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
height: max-content;
|
|
54
|
+
width: max-content;
|
|
55
|
+
border-radius: var(--border_radius);
|
|
56
|
+
padding: var(--main_padding);
|
|
57
|
+
font-size: var(--font_default_size);
|
|
58
|
+
font-weight: 400;
|
|
59
|
+
border: none;
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: row;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
color: var(--text_color);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
menu_bar_dropdown {
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: 100%;
|
|
70
|
+
left: 0;
|
|
71
|
+
z-index: 1;
|
|
72
|
+
display: none;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
min-width: max-content;
|
|
75
|
+
padding: var(--margin);
|
|
76
|
+
background: var(--header_background);
|
|
77
|
+
color: var(--text_color);
|
|
78
|
+
border: 1px solid var(--border_color);
|
|
79
|
+
border-radius: var(--border_radius);
|
|
80
|
+
box-shadow: var(--box_shadow_main);
|
|
81
|
+
backdrop-filter: var(--global_blur);
|
|
82
|
+
-webkit-backdrop-filter: var(--global_blur);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Пункты меню — плоские строки в стиле context_menu_item / user_item */
|
|
86
|
+
menu_bar_dropdown chui_button {
|
|
87
|
+
margin: 0;
|
|
88
|
+
width: -webkit-fill-available;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
menu_bar_dropdown .chui_button {
|
|
92
|
+
width: -webkit-fill-available;
|
|
93
|
+
justify-content: flex-start;
|
|
94
|
+
padding: var(--main_padding);
|
|
95
|
+
background: transparent;
|
|
96
|
+
border: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
menu_bar_dropdown .chui_button:hover {
|
|
100
|
+
background: var(--blue_prime_background);
|
|
101
|
+
border: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
menu_bar_dropdown .chui_button:active:not(:disabled) {
|
|
105
|
+
background: var(--element_background_prime);
|
|
106
|
+
border: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
menu_bar_dropdown .chui_button .chui_button_text {
|
|
110
|
+
color: var(--text_color);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
menu_bar_dropdown .chui_button:hover .chui_button_text {
|
|
114
|
+
color: var(--text_color_hover);
|
|
77
115
|
}
|