chuijs 4.0.2 → 4.0.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/CHANGELOG.md +597 -0
- package/README.md +43 -644
- package/framework/appLayout/default/chui_app_layout.js +602 -496
- package/framework/appLayout/default/global_style.css +288 -97
- package/framework/appLayout/default/main_theme_style.css +188 -101
- package/framework/components/chui_accordion/accordion.js +38 -35
- package/framework/components/chui_accordion/styles.css +13 -12
- package/framework/components/chui_action_sheet/action_sheet.js +93 -64
- package/framework/components/chui_action_sheet/styles.css +12 -5
- package/framework/components/chui_actions_bar/actions_bar.js +338 -0
- package/framework/components/chui_actions_bar/styles.css +139 -0
- package/framework/components/chui_affix/affix.js +16 -11
- package/framework/components/chui_affix/styles.css +5 -0
- package/framework/components/chui_alert/alert.js +34 -19
- package/framework/components/chui_alert/styles.css +7 -0
- package/framework/components/chui_avatar/avatar.js +36 -35
- package/framework/components/chui_avatar/styles.css +1 -1
- package/framework/components/chui_avatar_group/avatar_group.js +25 -23
- package/framework/components/chui_avatar_group/styles.css +1 -1
- package/framework/components/chui_backtop/backtop.js +60 -21
- package/framework/components/chui_backtop/styles.css +21 -0
- package/framework/components/chui_badge/badge.js +30 -28
- package/framework/components/chui_badge/styles.css +6 -6
- package/framework/components/chui_banner/banner.js +222 -0
- package/framework/components/chui_banner/styles.css +170 -0
- package/framework/components/chui_breadcrumb/breadcrumb.js +15 -13
- package/framework/components/chui_breadcrumb/styles.css +1 -1
- package/framework/components/chui_button/button.js +52 -36
- package/framework/components/chui_button/styles.css +7 -7
- package/framework/components/chui_calendar/calendar.js +18 -16
- package/framework/components/chui_card/card.js +52 -32
- package/framework/components/chui_card_scroll/card_scroll.js +169 -0
- package/framework/components/chui_card_scroll/styles.css +86 -0
- package/framework/components/chui_chat/chat.js +140 -79
- package/framework/components/chui_chat/styles.css +18 -7
- package/framework/components/chui_clipboard_history/clipboard_history.js +53 -39
- package/framework/components/chui_clipboard_history/styles.css +13 -9
- package/framework/components/chui_code/code.js +10 -10
- package/framework/components/chui_code/styles.css +4 -4
- package/framework/components/chui_code_editor/code_editor.js +73 -57
- package/framework/components/chui_code_editor/styles.css +6 -5
- package/framework/components/chui_command_palette/command_palette.js +87 -64
- package/framework/components/chui_command_palette/styles.css +5 -5
- package/framework/components/chui_console/console.js +13 -13
- package/framework/components/chui_console/styles.css +6 -3
- package/framework/components/chui_content_block/content_block.js +35 -21
- package/framework/components/chui_content_block/styles.css +2 -2
- package/framework/components/chui_context_menu/context_menu.js +171 -58
- package/framework/components/chui_context_menu/styles.css +82 -8
- package/framework/components/chui_custom_element/custom_element.js +25 -18
- package/framework/components/chui_data_grid/data_grid.js +633 -471
- package/framework/components/chui_data_grid/styles.css +24 -22
- package/framework/components/chui_descriptions/descriptions.js +34 -17
- package/framework/components/chui_descriptions/styles.css +1 -1
- package/framework/components/chui_details/details.js +42 -36
- package/framework/components/chui_details/styles.css +12 -11
- package/framework/components/chui_diff_viewer/diff_viewer.js +172 -147
- package/framework/components/chui_diff_viewer/styles.css +10 -10
- package/framework/components/chui_divider/divider.js +19 -17
- package/framework/components/chui_divider/styles.css +2 -2
- package/framework/components/chui_drawer/drawer.js +63 -38
- package/framework/components/chui_drawer/styles.css +18 -4
- package/framework/components/chui_drop_zone/drop_zone.js +37 -27
- package/framework/components/chui_drop_zone/styles.css +10 -6
- package/framework/components/chui_empty_state/empty_state.js +20 -15
- package/framework/components/chui_fieldset/fieldset.js +40 -23
- package/framework/components/chui_fieldset/styles.css +6 -6
- package/framework/components/chui_file_explorer/file_explorer.js +260 -189
- package/framework/components/chui_file_explorer/styles.css +8 -7
- package/framework/components/chui_form/form.js +40 -28
- package/framework/components/chui_form/styles.css +1 -1
- package/framework/components/chui_gantt/gantt.js +102 -78
- package/framework/components/chui_gantt/styles.css +5 -5
- package/framework/components/chui_graphs/graphs.js +376 -239
- package/framework/components/chui_graphs/styles.css +27 -6
- package/framework/components/chui_hero/hero.js +98 -37
- package/framework/components/chui_hero/styles.css +176 -7
- package/framework/components/chui_html_block/html_block.js +8 -8
- package/framework/components/chui_html_block/styles.css +3 -3
- package/framework/components/chui_hx/hx.js +3 -3
- package/framework/components/chui_hx/styles.css +13 -6
- package/framework/components/chui_icons/icons.js +2115 -2115
- package/framework/components/chui_icons/styles.css +4 -3
- package/framework/components/chui_inputs/chui_check_box/check_box.js +31 -19
- package/framework/components/chui_inputs/chui_check_box/styles.css +30 -21
- package/framework/components/chui_inputs/chui_chips/chips.js +141 -70
- package/framework/components/chui_inputs/chui_chips/styles.css +32 -7
- package/framework/components/chui_inputs/chui_color_picker/color_picker.js +55 -38
- package/framework/components/chui_inputs/chui_color_picker/styles.css +7 -7
- package/framework/components/chui_inputs/chui_combo_box/combo_box.js +127 -109
- package/framework/components/chui_inputs/chui_combo_box/styles.css +23 -21
- package/framework/components/chui_inputs/chui_date/date.js +161 -127
- package/framework/components/chui_inputs/chui_date/styles.css +20 -19
- package/framework/components/chui_inputs/chui_date_range/date_range.js +61 -50
- package/framework/components/chui_inputs/chui_date_range/styles.css +3 -3
- package/framework/components/chui_inputs/chui_datetime/datetime.js +47 -39
- package/framework/components/chui_inputs/chui_datetime/styles.css +3 -3
- package/framework/components/chui_inputs/chui_email/email.js +48 -36
- package/framework/components/chui_inputs/chui_email/styles.css +11 -11
- package/framework/components/chui_inputs/chui_file/file.js +71 -44
- package/framework/components/chui_inputs/chui_file/styles.css +23 -19
- package/framework/components/chui_inputs/chui_hotkey/hotkey.js +101 -76
- package/framework/components/chui_inputs/chui_hotkey/styles.css +6 -6
- package/framework/components/chui_inputs/chui_masked/masked.js +83 -72
- package/framework/components/chui_inputs/chui_masked/styles.css +5 -5
- package/framework/components/chui_inputs/chui_mention/mention.js +87 -40
- package/framework/components/chui_inputs/chui_mention/styles.css +14 -8
- package/framework/components/chui_inputs/chui_multi_combo_box/multi_combo_box.js +242 -212
- package/framework/components/chui_inputs/chui_multi_combo_box/styles.css +23 -15
- package/framework/components/chui_inputs/chui_number/number.js +84 -70
- package/framework/components/chui_inputs/chui_number/styles.css +13 -13
- package/framework/components/chui_inputs/chui_otp/otp.js +71 -62
- package/framework/components/chui_inputs/chui_otp/styles.css +5 -5
- package/framework/components/chui_inputs/chui_password/password.js +72 -56
- package/framework/components/chui_inputs/chui_password/styles.css +15 -15
- package/framework/components/chui_inputs/chui_radio_button/radio_button.js +37 -25
- package/framework/components/chui_inputs/chui_radio_button/styles.css +22 -22
- package/framework/components/chui_inputs/chui_rating/rating.js +54 -50
- package/framework/components/chui_inputs/chui_rating/styles.css +3 -3
- package/framework/components/chui_inputs/chui_select_box/select_box.js +132 -108
- package/framework/components/chui_inputs/chui_select_box/styles.css +21 -21
- package/framework/components/chui_inputs/chui_slider/slider.js +41 -38
- package/framework/components/chui_inputs/chui_slider/styles.css +7 -5
- package/framework/components/chui_inputs/chui_text/styles.css +14 -14
- package/framework/components/chui_inputs/chui_text/text.js +69 -52
- package/framework/components/chui_inputs/chui_text_area/styles.css +14 -14
- package/framework/components/chui_inputs/chui_text_area/text_area.js +59 -36
- package/framework/components/chui_inputs/chui_time/styles.css +18 -20
- package/framework/components/chui_inputs/chui_time/time.js +71 -49
- package/framework/components/chui_inputs/chui_toggle/styles.css +13 -6
- package/framework/components/chui_inputs/chui_toggle/toggle.js +27 -27
- package/framework/components/chui_json_editor/json_editor.js +137 -127
- package/framework/components/chui_json_editor/styles.css +5 -5
- package/framework/components/chui_json_viewer/json_viewer.js +133 -114
- package/framework/components/chui_json_viewer/styles.css +9 -8
- package/framework/components/chui_kanban/kanban.js +78 -60
- package/framework/components/chui_kanban/styles.css +8 -4
- package/framework/components/chui_kbd/kbd.js +12 -10
- package/framework/components/chui_kbd/styles.css +1 -1
- package/framework/components/chui_label/label.js +31 -29
- package/framework/components/chui_label/styles.css +3 -3
- package/framework/components/chui_link/link.js +36 -29
- package/framework/components/chui_link/styles.css +11 -4
- package/framework/components/chui_list/list.js +42 -38
- package/framework/components/chui_list/styles.css +4 -3
- package/framework/components/chui_markdown_editor/markdown_editor.js +125 -109
- package/framework/components/chui_markdown_editor/styles.css +5 -5
- package/framework/components/chui_media/audio.js +457 -364
- package/framework/components/chui_media/audio_styles.css +74 -37
- package/framework/components/chui_media/image.js +99 -64
- package/framework/components/chui_media/image_compare.js +86 -55
- package/framework/components/chui_media/image_compare_styles.css +5 -5
- package/framework/components/chui_media/image_styles.css +4 -4
- package/framework/components/chui_media/video.js +264 -171
- package/framework/components/chui_media/video_styles.css +57 -24
- package/framework/components/chui_menu_bar/menu_bar.js +67 -65
- package/framework/components/chui_menu_bar/styles.css +14 -12
- package/framework/components/chui_message_bar/message_bar.js +551 -0
- package/framework/components/chui_message_bar/styles.css +248 -0
- package/framework/components/chui_modal/modal.js +81 -56
- package/framework/components/chui_modal/styles.css +3 -2
- package/framework/components/chui_notification/notification.js +107 -69
- package/framework/components/chui_notification/notification_download.js +28 -77
- package/framework/components/chui_notification/notification_download_card.js +115 -0
- package/framework/components/chui_notification/notification_download_progress.css +5 -4
- package/framework/components/chui_notification/notification_download_progress.js +73 -105
- package/framework/components/chui_notification/notification_update.js +44 -37
- package/framework/components/chui_notification/status_plate.css +3 -3
- package/framework/components/chui_notification/status_plate.js +2 -2
- package/framework/components/chui_notification/styles.css +6 -1
- package/framework/components/chui_notification/styles_download.css +2 -2
- package/framework/components/chui_notification/styles_update.css +3 -3
- package/framework/components/chui_org_chart/org_chart.js +101 -62
- package/framework/components/chui_org_chart/styles.css +2 -2
- package/framework/components/chui_pagination/pagination.js +65 -30
- package/framework/components/chui_pagination/styles.css +1 -1
- package/framework/components/chui_paragraph/paragraph.js +2 -2
- package/framework/components/chui_paragraph/styles.css +3 -3
- package/framework/components/chui_popover/popover.js +77 -50
- package/framework/components/chui_popover/styles.css +1 -1
- package/framework/components/chui_popups/popups.js +210 -181
- package/framework/components/chui_popups/styles.css +7 -7
- package/framework/components/chui_print_button/print_button.js +48 -33
- package/framework/components/chui_progress_bar/progress_bar.js +49 -19
- package/framework/components/chui_progress_bar/styles.css +6 -6
- package/framework/components/chui_progress_ring/progress_ring.js +32 -30
- package/framework/components/chui_progress_ring/styles.css +1 -1
- package/framework/components/chui_qrcode/qrcode.js +85 -41
- package/framework/components/chui_query_builder/query_builder.js +263 -170
- package/framework/components/chui_query_builder/styles.css +4 -4
- package/framework/components/chui_radio_group/radio_group.js +36 -26
- package/framework/components/chui_radio_group/styles.css +2 -2
- package/framework/components/chui_result/result.js +41 -31
- package/framework/components/chui_result/styles.css +3 -3
- package/framework/components/chui_scheduler/scheduler.js +126 -104
- package/framework/components/chui_scheduler/styles.css +11 -7
- package/framework/components/chui_screen_spinner/screen_spinner.js +167 -0
- package/framework/components/chui_screen_spinner/styles.css +49 -0
- package/framework/components/chui_segmented_control/segmented_control.js +90 -27
- package/framework/components/chui_segmented_control/styles.css +32 -6
- package/framework/components/chui_settings/settings.js +160 -87
- package/framework/components/chui_settings/styles.css +4 -4
- package/framework/components/chui_shortcut_help/shortcut_help.js +82 -61
- package/framework/components/chui_sidebar_nav/sidebar_nav.js +132 -53
- package/framework/components/chui_sidebar_nav/styles.css +9 -3
- package/framework/components/chui_skeleton/skeleton.js +29 -24
- package/framework/components/chui_slideshow/slideshow.js +122 -103
- package/framework/components/chui_slideshow/styles.css +22 -16
- package/framework/components/chui_spinner/spinner.js +17 -17
- package/framework/components/chui_spinner/styles.css +0 -1
- package/framework/components/chui_split_button/split_button.js +53 -30
- package/framework/components/chui_split_button/styles.css +22 -6
- package/framework/components/chui_splitter/splitter.js +46 -39
- package/framework/components/chui_splitter/styles.css +2 -2
- package/framework/components/chui_statistic/statistic.js +111 -84
- package/framework/components/chui_status_bar/status_bar.js +11 -9
- package/framework/components/chui_status_bar/styles.css +2 -2
- package/framework/components/chui_stepper/stepper.js +230 -54
- package/framework/components/chui_stepper/styles.css +79 -14
- package/framework/components/chui_sticky_bar/sticky_bar.js +53 -17
- package/framework/components/chui_sticky_bar/styles.css +11 -7
- package/framework/components/chui_tabs/chui_tabs.js +100 -46
- package/framework/components/chui_tabs/styles.css +43 -15
- package/framework/components/chui_text_editor/styles.css +24 -23
- package/framework/components/chui_text_editor/text_editor.js +103 -79
- package/framework/components/chui_text_editor/text_editor_panel.js +428 -367
- package/framework/components/chui_theme_toggle/theme_toggle.js +46 -25
- package/framework/components/chui_timeline/styles.css +3 -1
- package/framework/components/chui_timeline/timeline.js +14 -12
- package/framework/components/chui_toast_queue/styles.css +11 -11
- package/framework/components/chui_toast_queue/toast_queue.js +82 -73
- package/framework/components/chui_toolbar/styles.css +2 -2
- package/framework/components/chui_toolbar/toolbar.js +20 -13
- package/framework/components/chui_tooltip/styles.css +2 -2
- package/framework/components/chui_tooltip/tooltip.js +40 -27
- package/framework/components/chui_tour/styles.css +12 -7
- package/framework/components/chui_tour/tour.js +132 -98
- package/framework/components/chui_transfer/styles.css +8 -7
- package/framework/components/chui_transfer/transfer.js +143 -123
- package/framework/components/chui_tree_table/styles.css +4 -4
- package/framework/components/chui_tree_table/tree_table.js +88 -74
- package/framework/components/chui_tree_view/styles.css +14 -10
- package/framework/components/chui_tree_view/tree_view.js +298 -253
- package/framework/components/chui_user_bar/styles.css +145 -0
- package/framework/components/chui_user_bar/user_bar.js +402 -0
- package/framework/components/chui_user_list_bar/styles.css +173 -0
- package/framework/components/chui_user_list_bar/user_list_bar.js +485 -0
- package/framework/components/chui_watermark/watermark.js +41 -33
- package/framework/components/chui_webview/styles.css +2 -2
- package/framework/components/chui_webview/webview.js +64 -52
- package/framework/components/chui_write_bar/styles.css +172 -0
- package/framework/components/chui_write_bar/write_bar.js +320 -0
- package/framework/main_window.js +1234 -0
- package/framework/modules/chui_a11y/chui_a11y.js +153 -123
- package/framework/modules/chui_animations/animations.js +105 -43
- package/framework/modules/chui_animations/motion.js +120 -0
- package/framework/modules/chui_animations/styles.css +37 -4
- package/framework/modules/chui_bridge/preload.js +36 -25
- package/framework/modules/chui_functions.js +69 -63
- package/framework/modules/chui_highlight/chui_highlight.js +25 -22
- package/framework/modules/chui_highlight/styles.css +13 -10
- package/framework/modules/chui_i18n/chui_i18n.js +12 -10
- package/framework/modules/chui_i18n/locales/a11y.js +5 -5
- package/framework/modules/chui_i18n/locales/app_layout.js +5 -5
- package/framework/modules/chui_i18n/locales/calendar.js +3 -3
- package/framework/modules/chui_i18n/locales/common.js +3 -3
- package/framework/modules/chui_i18n/locales/data.js +36 -26
- package/framework/modules/chui_i18n/locales/editors.js +40 -13
- package/framework/modules/chui_i18n/locales/feedback.js +65 -3
- package/framework/modules/chui_i18n/locales/forms.js +8 -8
- package/framework/modules/chui_i18n/locales/graphics.js +8 -8
- package/framework/modules/chui_i18n/locales/media.js +4 -4
- package/framework/modules/chui_i18n/locales/navigation.js +12 -8
- package/framework/modules/chui_i18n/locales/validate.js +3 -3
- package/framework/modules/chui_json/chui_json.js +11 -11
- package/framework/modules/chui_layout/chui_layout.js +12 -10
- package/framework/modules/chui_logger/chui_logger.js +47 -28
- package/framework/modules/chui_page/page.js +39 -33
- package/framework/modules/chui_palette/palette.js +61 -0
- package/framework/modules/chui_qr/chui_qr.js +179 -88
- package/framework/modules/chui_scrollbar/chui_scrollbar.js +79 -68
- package/framework/modules/chui_scrollbar/styles.css +4 -2
- package/framework/modules/chui_services/chui_channels.js +27 -13
- package/framework/modules/chui_services/chui_services.js +47 -39
- package/framework/modules/chui_services/desktop.js +108 -101
- package/framework/modules/chui_sortable/chui_sortable.js +33 -28
- package/framework/modules/chui_validate/chui_validate.js +10 -7
- package/framework/tray_bar/chui_menu_items.js +136 -46
- package/index.d.ts +5046 -0
- package/index.js +199 -1254
- package/package.json +81 -68
- package/framework/components/telegram_bot/chui_telegram_bot.js +0 -184
|
@@ -9,11 +9,11 @@ chui_ap_main {
|
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
border-radius: var(--radius_md);
|
|
12
|
-
background: var(--
|
|
12
|
+
background: var(--player_background);
|
|
13
13
|
border: 1px solid var(--border_color);
|
|
14
14
|
overflow: hidden;
|
|
15
|
-
--
|
|
16
|
-
--
|
|
15
|
+
--seek_before_width: 0%;
|
|
16
|
+
--volume_before_width: 0%;
|
|
17
17
|
min-width: 460px;
|
|
18
18
|
height: max-content;
|
|
19
19
|
}
|
|
@@ -40,21 +40,21 @@ chui_ap_main[data_pin] {
|
|
|
40
40
|
chui_ap_main[data_pin="bottom"] {
|
|
41
41
|
inset-inline: 0;
|
|
42
42
|
bottom: 0;
|
|
43
|
-
margin: var(--
|
|
43
|
+
margin: var(--block_margin);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
chui_ap_main[data_pin="top"] {
|
|
47
47
|
inset-inline: 0;
|
|
48
48
|
top: 0;
|
|
49
|
-
margin: var(--
|
|
49
|
+
margin: var(--block_margin);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/* Боковые закрепления — компактная полоса у края, по центру высоты окна */
|
|
53
53
|
chui_ap_main[data_pin="left"],
|
|
54
54
|
chui_ap_main[data_pin="right"] {
|
|
55
55
|
inset-block: 0;
|
|
56
|
-
width: min(460px, calc(100% - 2 * var(--
|
|
57
|
-
margin: auto var(--
|
|
56
|
+
width: min(460px, calc(100% - 2 * var(--block_margin)));
|
|
57
|
+
margin: auto var(--block_margin);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
chui_ap_main[data_pin="left"] {
|
|
@@ -112,7 +112,7 @@ chui_ap_seek_buf {
|
|
|
112
112
|
width: 0;
|
|
113
113
|
height: var(--player_track_height);
|
|
114
114
|
border-radius: var(--radius_pill);
|
|
115
|
-
background: var(--
|
|
115
|
+
background: var(--player_slider_buffer_background);
|
|
116
116
|
position: absolute;
|
|
117
117
|
inset-inline-start: 6px;
|
|
118
118
|
max-width: calc(100% - 12px);
|
|
@@ -125,7 +125,8 @@ chui_ap_info chui_label {
|
|
|
125
125
|
font-variant-numeric: tabular-nums;
|
|
126
126
|
flex: none;
|
|
127
127
|
}
|
|
128
|
-
#chui_ap_seek,
|
|
128
|
+
#chui_ap_seek,
|
|
129
|
+
#chui_ap_volume {
|
|
129
130
|
margin: 0;
|
|
130
131
|
-webkit-appearance: none;
|
|
131
132
|
border-radius: var(--radius_pill);
|
|
@@ -145,23 +146,29 @@ chui_ap_info chui_label {
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
#chui_ap_seek {
|
|
148
|
-
background-image: linear-gradient(
|
|
149
|
-
|
|
150
|
-
var(--
|
|
149
|
+
background-image: linear-gradient(
|
|
150
|
+
to right,
|
|
151
|
+
var(--blue_prime_background) 0 var(--seek_before_width, 0%),
|
|
152
|
+
var(--player_slider_background) var(--seek_before_width, 0%) 100%
|
|
153
|
+
);
|
|
151
154
|
}
|
|
152
155
|
|
|
153
156
|
/* Громкость — ступень звука, а не время: заливка нейтральная, чтобы не читалась второй
|
|
154
157
|
полосой прогресса */
|
|
155
158
|
#chui_ap_volume {
|
|
156
|
-
background-image: linear-gradient(
|
|
157
|
-
|
|
158
|
-
var(--
|
|
159
|
+
background-image: linear-gradient(
|
|
160
|
+
to right,
|
|
161
|
+
var(--text_color) 0 var(--volume_before_width, 0%),
|
|
162
|
+
var(--player_slider_background) var(--volume_before_width, 0%) 100%
|
|
163
|
+
);
|
|
159
164
|
}
|
|
160
165
|
|
|
161
166
|
#chui_ap_volume:disabled {
|
|
162
|
-
background-image: linear-gradient(
|
|
163
|
-
|
|
164
|
-
var(--
|
|
167
|
+
background-image: linear-gradient(
|
|
168
|
+
to right,
|
|
169
|
+
var(--player_slider_buffer_background) 0 var(--volume_before_width, 0%),
|
|
170
|
+
var(--player_slider_background) var(--volume_before_width, 0%) 100%
|
|
171
|
+
);
|
|
165
172
|
}
|
|
166
173
|
|
|
167
174
|
#chui_ap_seek::-webkit-slider-runnable-track,
|
|
@@ -176,16 +183,25 @@ chui_ap_info chui_label {
|
|
|
176
183
|
курсором, и в покое полоса прогресса на нуле читалась пустой серой чертой,
|
|
177
184
|
а громкость в 100 % — сплошной белой линией: два разных элемента, а не
|
|
178
185
|
одинаковые ползунки. Ободок цвета подложки нужен там, где заливка белая. */
|
|
179
|
-
#chui_ap_seek::-webkit-slider-thumb,
|
|
186
|
+
#chui_ap_seek::-webkit-slider-thumb,
|
|
187
|
+
#chui_ap_volume::-webkit-slider-thumb {
|
|
180
188
|
-webkit-appearance: none;
|
|
181
189
|
border: none;
|
|
182
190
|
height: 9px;
|
|
183
191
|
width: 9px;
|
|
184
192
|
border-radius: 50%;
|
|
185
193
|
background-color: var(--player_thumb_background);
|
|
186
|
-
box-shadow: 0 0 0 2px var(--
|
|
194
|
+
box-shadow: 0 0 0 2px var(--player_background);
|
|
187
195
|
cursor: pointer;
|
|
188
196
|
margin-top: calc((var(--player_track_height) - 9px) / 2);
|
|
197
|
+
/* Рост под курсором — тот же переход: своё время у ручки есть только здесь,
|
|
198
|
+
общее правило до псевдоэлементов бегунка не достаёт */
|
|
199
|
+
transition:
|
|
200
|
+
height var(--motion_fast) var(--motion_ease),
|
|
201
|
+
width var(--motion_fast) var(--motion_ease),
|
|
202
|
+
margin-top var(--motion_fast) var(--motion_ease),
|
|
203
|
+
background-color var(--motion_fast) var(--motion_ease),
|
|
204
|
+
box-shadow var(--motion_fast) var(--motion_ease);
|
|
189
205
|
}
|
|
190
206
|
|
|
191
207
|
/* У выключенной полосы ползунка нет: она и так приглушена заливкой */
|
|
@@ -206,10 +222,13 @@ chui_ap_main:hover #chui_ap_volume:not(:disabled)::-webkit-slider-thumb,
|
|
|
206
222
|
width: 12px;
|
|
207
223
|
margin-top: calc((var(--player_track_height) - 12px) / 2);
|
|
208
224
|
background-color: var(--player_thumb_background);
|
|
209
|
-
box-shadow:
|
|
225
|
+
box-shadow:
|
|
226
|
+
0 0 0 2px var(--player_background),
|
|
227
|
+
var(--box_shadow_main);
|
|
210
228
|
}
|
|
211
229
|
|
|
212
|
-
#chui_ap_seek:focus,
|
|
230
|
+
#chui_ap_seek:focus,
|
|
231
|
+
#chui_ap_volume:focus,
|
|
213
232
|
#chui_ap_seek:focus::-webkit-slider-runnable-track,
|
|
214
233
|
#chui_ap_volume:focus::-webkit-slider-runnable-track {
|
|
215
234
|
outline: none;
|
|
@@ -217,7 +236,8 @@ chui_ap_main:hover #chui_ap_volume:not(:disabled)::-webkit-slider-thumb,
|
|
|
217
236
|
}
|
|
218
237
|
|
|
219
238
|
/* Клавиатурный фокус возвращаем точечно: правило выше снимает UA-обводку */
|
|
220
|
-
#chui_ap_seek:focus-visible,
|
|
239
|
+
#chui_ap_seek:focus-visible,
|
|
240
|
+
#chui_ap_volume:focus-visible {
|
|
221
241
|
outline: var(--focus_outline);
|
|
222
242
|
outline-offset: var(--focus_outline_offset);
|
|
223
243
|
}
|
|
@@ -244,7 +264,8 @@ chui_ap_volume_block {
|
|
|
244
264
|
/* КНОПКИ: площадка 32px с глифом 18px. Прежде глиф занимал почти всю кнопку
|
|
245
265
|
(30px в 34px), и она читалась рамкой вокруг значка */
|
|
246
266
|
chui_ap_play_pause,
|
|
247
|
-
chui_ap_fx_icon,
|
|
267
|
+
chui_ap_fx_icon,
|
|
268
|
+
chui_ap_volume_icon {
|
|
248
269
|
display: flex;
|
|
249
270
|
align-items: center;
|
|
250
271
|
justify-content: center;
|
|
@@ -256,6 +277,14 @@ chui_ap_fx_icon, chui_ap_volume_icon {
|
|
|
256
277
|
cursor: pointer;
|
|
257
278
|
}
|
|
258
279
|
|
|
280
|
+
/* Кегль глифа — ключом плеера: у `chui_icon` есть своё правило (размер шапки),
|
|
281
|
+
поэтому размер задаётся значку, а не кнопке. Прежде число стояло в коде (пять мест) */
|
|
282
|
+
chui_ap_play_pause chui_icon,
|
|
283
|
+
chui_ap_fx_icon chui_icon,
|
|
284
|
+
chui_ap_volume_icon chui_icon {
|
|
285
|
+
font-size: var(--player_icon_size);
|
|
286
|
+
}
|
|
287
|
+
|
|
259
288
|
/* Главная кнопка — светлый круг с глифом цвета подложки, как у Spotify: роль акцента
|
|
260
289
|
в плеере занята полосами прогресса, а круг читается кнопкой воспроизведения */
|
|
261
290
|
chui_ap_play_pause {
|
|
@@ -278,7 +307,7 @@ chui_ap_play_pause:hover {
|
|
|
278
307
|
}
|
|
279
308
|
|
|
280
309
|
chui_ap_play_pause:active {
|
|
281
|
-
transform: scale(.96);
|
|
310
|
+
transform: scale(0.96);
|
|
282
311
|
}
|
|
283
312
|
|
|
284
313
|
/* === ЭКВАЛАЙЗЕР === */
|
|
@@ -300,6 +329,8 @@ chui_ap_fx_dropdown {
|
|
|
300
329
|
|
|
301
330
|
chui_ap_fx_dropdown.fx_open {
|
|
302
331
|
display: block;
|
|
332
|
+
/* Раскрытие панели — общим кадром: прежде секция вставала на место рывком */
|
|
333
|
+
animation: chui_panel_in var(--motion_base) var(--motion_spring);
|
|
303
334
|
}
|
|
304
335
|
|
|
305
336
|
/* Открытая кнопка — как у прочих выпадающих: состояние держит тонировка акцента */
|
|
@@ -320,7 +351,7 @@ chui_ap_equalizer_main {
|
|
|
320
351
|
/* === ПРЕСЕТЫ И ВЫКЛЮЧАТЕЛЬ ЭКВАЛАЙЗЕРА === */
|
|
321
352
|
/* Поле пресетов и выключатель — общекитовые `Select` и `Toggle`, вложенные в полосу панели:
|
|
322
353
|
клавиатура, роли и состояния у них свои, а здесь только размеры. У `Select` ширина взята
|
|
323
|
-
токеном страницы (`--control_width`), у `Toggle` — свои поля `--
|
|
354
|
+
токеном страницы (`--control_width`), у `Toggle` — свои поля `--block_margin`, из-за которых
|
|
324
355
|
выключатель не вставал к краю */
|
|
325
356
|
chui_ap_equalizer_controls chui_selectbox {
|
|
326
357
|
flex: 0 1 260px;
|
|
@@ -406,7 +437,7 @@ chui_eq_slider_main slider_label:first-child {
|
|
|
406
437
|
color: var(--text_color);
|
|
407
438
|
text-align: center;
|
|
408
439
|
opacity: 0;
|
|
409
|
-
transition: opacity
|
|
440
|
+
transition: opacity var(--motion_fast) var(--motion_ease);
|
|
410
441
|
pointer-events: none;
|
|
411
442
|
}
|
|
412
443
|
|
|
@@ -422,7 +453,7 @@ chui_eq_slider_main:focus-within slider_label:first-child {
|
|
|
422
453
|
|
|
423
454
|
.chui_ap_equalizer_disabled slider_label {
|
|
424
455
|
color: var(--text_color_disabled);
|
|
425
|
-
opacity: .5;
|
|
456
|
+
opacity: 0.5;
|
|
426
457
|
}
|
|
427
458
|
|
|
428
459
|
/*
|
|
@@ -457,12 +488,14 @@ chui_eq_slider_main:focus-within slider_label:first-child {
|
|
|
457
488
|
background-repeat: no-repeat;
|
|
458
489
|
/* Заливка идёт от низа до ручки: полоса заливки короче рельса ровно на размер ручки
|
|
459
490
|
и стоит по центру, поэтому её края совпадают с крайними положениями ручки при любом
|
|
460
|
-
значении (`--
|
|
491
|
+
значении (`--fx_before_width` считает скрипт, как у полос прогресса и громкости) */
|
|
461
492
|
background-size: 100% calc(100% - var(--fx_knob));
|
|
462
493
|
background-position: center;
|
|
463
|
-
background-image: linear-gradient(
|
|
464
|
-
|
|
465
|
-
|
|
494
|
+
background-image: linear-gradient(
|
|
495
|
+
to top,
|
|
496
|
+
var(--blue_prime_background) 0 var(--fx_before_width),
|
|
497
|
+
transparent var(--fx_before_width)
|
|
498
|
+
);
|
|
466
499
|
}
|
|
467
500
|
|
|
468
501
|
/* Дорожка не рисуется: рельс — само поле */
|
|
@@ -488,9 +521,11 @@ chui_eq_slider_main:focus-within slider_label:first-child {
|
|
|
488
521
|
.eq_slider_test:disabled {
|
|
489
522
|
cursor: not-allowed;
|
|
490
523
|
accent-color: var(--text_color_disabled);
|
|
491
|
-
background-image: linear-gradient(
|
|
492
|
-
|
|
493
|
-
|
|
524
|
+
background-image: linear-gradient(
|
|
525
|
+
to top,
|
|
526
|
+
var(--text_color_disabled) 0 var(--fx_before_width),
|
|
527
|
+
transparent var(--fx_before_width)
|
|
528
|
+
);
|
|
494
529
|
}
|
|
495
530
|
|
|
496
531
|
.eq_slider_test:disabled::-webkit-slider-thumb {
|
|
@@ -514,11 +549,13 @@ chui_ap_fx_icon:focus-visible,
|
|
|
514
549
|
}
|
|
515
550
|
|
|
516
551
|
/* Наведение: нейтральная площадка — у всех, кроме главной кнопки: она уже светлая */
|
|
517
|
-
chui_ap_fx_icon:hover,
|
|
552
|
+
chui_ap_fx_icon:hover,
|
|
553
|
+
chui_ap_volume_icon:hover {
|
|
518
554
|
background: var(--element_background_hover);
|
|
519
555
|
}
|
|
520
556
|
|
|
521
|
-
chui_ap_fx_icon:hover chui_icon,
|
|
557
|
+
chui_ap_fx_icon:hover chui_icon,
|
|
558
|
+
chui_ap_volume_icon:hover chui_icon {
|
|
522
559
|
color: var(--text_color);
|
|
523
560
|
}
|
|
524
561
|
|
|
@@ -1,87 +1,120 @@
|
|
|
1
|
-
const {Animation} = require("../../modules/chui_animations/animations");
|
|
2
|
-
const {optionOr} = require("../../modules/chui_functions");
|
|
3
|
-
const {I18n} = require("../../modules/chui_i18n/chui_i18n");
|
|
4
|
-
const {makeKeyboardButton} = require("../../modules/chui_a11y/chui_a11y");
|
|
1
|
+
const { Animation } = require("../../modules/chui_animations/animations");
|
|
2
|
+
const { optionOr } = require("../../modules/chui_functions");
|
|
3
|
+
const { I18n } = require("../../modules/chui_i18n/chui_i18n");
|
|
4
|
+
const { makeKeyboardButton } = require("../../modules/chui_a11y/chui_a11y");
|
|
5
5
|
// image-size 2.x отдаёт объект с функцией внутри (сборка ESM + CJS-обёртка), а 1.x — саму
|
|
6
6
|
// функцию: разворачиваем оба варианта, чтобы модуль не зависел от установленной версии
|
|
7
|
-
const
|
|
8
|
-
const sizeOf = typeof
|
|
9
|
-
const {Icon, Icons} = require("../chui_icons/icons");
|
|
7
|
+
const imageSizeModule = require("image-size");
|
|
8
|
+
const sizeOf = typeof imageSizeModule === "function" ? imageSizeModule : imageSizeModule.imageSize;
|
|
9
|
+
const { Icon, Icons } = require("../chui_icons/icons");
|
|
10
10
|
|
|
11
11
|
class Image {
|
|
12
|
-
#
|
|
13
|
-
#image = document.createElement(
|
|
12
|
+
#chuiImage = document.createElement("chui_image");
|
|
13
|
+
#image = document.createElement("img");
|
|
14
14
|
#alt = "";
|
|
15
15
|
#decorative = false;
|
|
16
|
-
constructor(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
constructor(
|
|
17
|
+
options = {
|
|
18
|
+
path: String(),
|
|
19
|
+
base64: String(),
|
|
20
|
+
httpPath: String(),
|
|
21
|
+
width: String(),
|
|
22
|
+
height: String(),
|
|
23
|
+
openPopup: Boolean(),
|
|
24
|
+
disableMargin: Boolean(),
|
|
25
|
+
alt: String(),
|
|
26
|
+
decorative: Boolean(),
|
|
27
|
+
}
|
|
28
|
+
) {
|
|
29
|
+
require("../../modules/chui_functions").setStyles(__dirname + "/image_styles.css", "chUiJS_Image");
|
|
23
30
|
// Внешний отступ снимает класс: его читает CSS
|
|
24
|
-
if (options.disableMargin) this.#
|
|
31
|
+
if (options.disableMargin) this.#chuiImage.classList.add("image_no_margin");
|
|
25
32
|
// Источник — необязательная опция: пустая заготовка пути раньше читалась как файл (ENOENT)
|
|
26
33
|
const path = optionOr(options.path, undefined);
|
|
27
34
|
const base64 = optionOr(options.base64, undefined);
|
|
28
|
-
const
|
|
29
|
-
if (path !== undefined)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
const httpPath = optionOr(options.httpPath, undefined);
|
|
36
|
+
if (path !== undefined)
|
|
37
|
+
this.#image.setAttribute(
|
|
38
|
+
"src",
|
|
39
|
+
`data:image/png;base64,${require("fs").readFileSync(path).toString("base64")}`
|
|
40
|
+
);
|
|
41
|
+
if (base64 !== undefined) this.#image.setAttribute("src", `data:image/png;base64,${base64}`);
|
|
42
|
+
if (httpPath !== undefined) this.#image.setAttribute("src", httpPath);
|
|
43
|
+
if (options.width !== undefined) this.#chuiImage.style.width = options.width;
|
|
44
|
+
if (options.height !== undefined) this.#chuiImage.style.height = options.height;
|
|
34
45
|
if (options.width !== undefined) this.#image.style.width = options.width;
|
|
35
46
|
if (options.height !== undefined) this.#image.style.height = options.height;
|
|
36
|
-
this.#
|
|
47
|
+
this.#chuiImage.appendChild(this.#image);
|
|
37
48
|
// Alt по умолчанию пустой: без атрибута скринридер читал бы вместо подписи data-URL картинки
|
|
38
49
|
this.setAlt(options.alt === undefined ? "" : options.alt);
|
|
39
50
|
if (options.decorative !== undefined) this.setDecorative(options.decorative === true);
|
|
40
51
|
|
|
41
52
|
if (options.openPopup) {
|
|
42
|
-
this.#
|
|
53
|
+
this.#chuiImage.addEventListener("click", () => {
|
|
43
54
|
let popup;
|
|
44
|
-
|
|
55
|
+
const windowSize = document.body.getBoundingClientRect();
|
|
45
56
|
if (options.path !== undefined) {
|
|
46
57
|
//
|
|
47
58
|
let imageSet;
|
|
48
59
|
// image-size 2.x размеры файла по пути не считает (строку он читал бы как байты),
|
|
49
60
|
// поэтому файл читаем сами и отдаём буфер — как в ветке base64 ниже
|
|
50
|
-
const dimensions = sizeOf(require(
|
|
61
|
+
const dimensions = sizeOf(require("fs").readFileSync(options.path));
|
|
51
62
|
if (dimensions.height > dimensions.width) {
|
|
52
|
-
imageSet = new Image({
|
|
63
|
+
imageSet = new Image({
|
|
64
|
+
disableMargin: true,
|
|
65
|
+
openPopup: false,
|
|
66
|
+
path: options.path,
|
|
67
|
+
width: "auto",
|
|
68
|
+
height: "-webkit-fill-available",
|
|
69
|
+
});
|
|
53
70
|
popup = new ImagePopup(imageSet.set(), "auto", "-webkit-fill-available");
|
|
54
71
|
} else {
|
|
55
|
-
imageSet = new Image({
|
|
72
|
+
imageSet = new Image({
|
|
73
|
+
disableMargin: true,
|
|
74
|
+
openPopup: false,
|
|
75
|
+
path: options.path,
|
|
76
|
+
width: "auto",
|
|
77
|
+
height: "auto",
|
|
78
|
+
});
|
|
56
79
|
popup = new ImagePopup(imageSet.set(), "auto", "-webkit-fill-available");
|
|
57
80
|
}
|
|
58
81
|
}
|
|
59
82
|
if (options.base64 !== undefined) {
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
83
|
+
let imageSize;
|
|
84
|
+
const img = Buffer.from(options.base64, "base64");
|
|
85
|
+
const dimensions = sizeOf(img);
|
|
86
|
+
// Картинка вписывается в окно по той стороне, которой не хватает: высокая
|
|
87
|
+
// ограничивается высотой окна, широкая — шириной. Прежде в широкой ветке
|
|
88
|
+
// стояла высота окна (опечатка): картинка 1600×400 в окне 1000×800
|
|
89
|
+
// получала ширину 800 px вместо 1000
|
|
90
|
+
if (dimensions.height > windowSize.height) {
|
|
91
|
+
imageSize = ["auto", `${windowSize.height}px`];
|
|
92
|
+
} else if (dimensions.width > windowSize.width) {
|
|
93
|
+
imageSize = [`${windowSize.width}px`, "auto"];
|
|
65
94
|
} else {
|
|
66
|
-
|
|
95
|
+
imageSize = ["auto", "auto"];
|
|
67
96
|
}
|
|
68
97
|
//
|
|
69
|
-
imageSet = new Image({
|
|
98
|
+
const imageSet = new Image({
|
|
99
|
+
disableMargin: true,
|
|
100
|
+
openPopup: false,
|
|
101
|
+
base64: options.base64,
|
|
102
|
+
width: imageSize[0],
|
|
103
|
+
height: imageSize[1],
|
|
104
|
+
});
|
|
70
105
|
popup = new ImagePopup(imageSet.set(), "max-content", "max-content");
|
|
71
|
-
|
|
72
|
-
|
|
73
106
|
}
|
|
74
|
-
document.body.appendChild(popup.set())
|
|
107
|
+
document.body.appendChild(popup.set());
|
|
75
108
|
popup.open();
|
|
76
|
-
})
|
|
109
|
+
});
|
|
77
110
|
}
|
|
78
111
|
}
|
|
79
112
|
setWidth(value) {
|
|
80
|
-
this.#
|
|
113
|
+
this.#chuiImage.style.width = value;
|
|
81
114
|
this.#image.style.width = value;
|
|
82
115
|
}
|
|
83
116
|
setHeight(value) {
|
|
84
|
-
this.#
|
|
117
|
+
this.#chuiImage.style.height = value;
|
|
85
118
|
this.#image.style.height = value;
|
|
86
119
|
}
|
|
87
120
|
/** Подпись изображения (пустая строка — декоративное) */
|
|
@@ -99,51 +132,53 @@ class Image {
|
|
|
99
132
|
/** Декоративное изображение прячется от скринридера целиком (`aria-hidden`) */
|
|
100
133
|
setDecorative(boolean = Boolean()) {
|
|
101
134
|
this.#decorative = boolean;
|
|
102
|
-
if (this.#decorative) this.#
|
|
103
|
-
else this.#
|
|
135
|
+
if (this.#decorative) this.#chuiImage.setAttribute("aria-hidden", "true");
|
|
136
|
+
else this.#chuiImage.removeAttribute("aria-hidden");
|
|
104
137
|
this.#image.setAttribute("alt", this.#decorative ? "" : this.#alt);
|
|
105
138
|
return this;
|
|
106
139
|
}
|
|
107
|
-
set() {
|
|
140
|
+
set() {
|
|
141
|
+
return this.#chuiImage;
|
|
142
|
+
}
|
|
108
143
|
}
|
|
109
144
|
|
|
110
145
|
class ImagePopup {
|
|
111
146
|
#id = require("randomstring").generate();
|
|
112
|
-
#
|
|
113
|
-
#
|
|
114
|
-
#
|
|
115
|
-
#
|
|
147
|
+
#chuiImagePopup = document.createElement(`chui_image_popup`);
|
|
148
|
+
#popupContent = document.createElement("popup_content_test");
|
|
149
|
+
#imagePopupContent = document.createElement("image_popup_content");
|
|
150
|
+
#closePopup = document.createElement("image_popup_close");
|
|
116
151
|
constructor(image, width, height) {
|
|
117
|
-
this.#
|
|
152
|
+
this.#chuiImagePopup.id = this.#id;
|
|
118
153
|
//ADDS
|
|
119
|
-
this.#
|
|
120
|
-
this.#
|
|
121
|
-
this.#
|
|
154
|
+
this.#imagePopupContent.style.width = width;
|
|
155
|
+
this.#imagePopupContent.style.height = height;
|
|
156
|
+
this.#imagePopupContent.appendChild(image);
|
|
122
157
|
|
|
123
|
-
this.#
|
|
158
|
+
this.#closePopup.innerHTML = new Icon(Icons.NAVIGATION.CLOSE, "30px", "").getHTML();
|
|
124
159
|
// Крестик без подписи читался бы как «кнопка» без имени: значок помечен aria-hidden,
|
|
125
160
|
// а роль и Enter/Space даёт общий хелпер — клавиатурой слой тоже закрывается
|
|
126
|
-
makeKeyboardButton(this.#
|
|
127
|
-
this.#
|
|
128
|
-
this.#
|
|
161
|
+
makeKeyboardButton(this.#closePopup);
|
|
162
|
+
this.#closePopup.setAttribute("aria-label", I18n.t("common.close"));
|
|
163
|
+
this.#closePopup.addEventListener("click", () => this.close());
|
|
129
164
|
|
|
130
|
-
this.#
|
|
131
|
-
this.#
|
|
132
|
-
this.#
|
|
165
|
+
this.#popupContent.appendChild(this.#imagePopupContent);
|
|
166
|
+
this.#popupContent.appendChild(this.#closePopup);
|
|
167
|
+
this.#chuiImagePopup.appendChild(this.#popupContent);
|
|
133
168
|
}
|
|
134
169
|
open() {
|
|
135
|
-
|
|
170
|
+
const dialog = this.#chuiImagePopup;
|
|
136
171
|
new Animation(dialog).fadeIn();
|
|
137
172
|
new Animation(dialog.firstChild).scaleIn();
|
|
138
173
|
}
|
|
139
174
|
close() {
|
|
140
|
-
|
|
175
|
+
const dialog = this.#chuiImagePopup;
|
|
141
176
|
new Animation(dialog.firstChild).scaleOut();
|
|
142
177
|
new Animation(dialog).fadeOutAndRemove();
|
|
143
178
|
}
|
|
144
179
|
set() {
|
|
145
|
-
return this.#
|
|
180
|
+
return this.#chuiImagePopup;
|
|
146
181
|
}
|
|
147
182
|
}
|
|
148
183
|
|
|
149
|
-
exports.Image = Image;
|
|
184
|
+
exports.Image = Image;
|