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
|
@@ -2,8 +2,8 @@ canvas {
|
|
|
2
2
|
background: var(--element_background_2);
|
|
3
3
|
height: max-content;
|
|
4
4
|
width: max-content;
|
|
5
|
-
border-radius: var(--
|
|
6
|
-
margin: var(--
|
|
5
|
+
border-radius: var(--radius_sm);
|
|
6
|
+
margin: var(--block_margin);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
/* Курсор «можно нажать» ставит компонент классом, когда вешает обработчик указателя:
|
|
@@ -19,6 +19,27 @@ chui_bar_graph {
|
|
|
19
19
|
flex-wrap: wrap;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/* Построение графика читается появлением: полотно встаёт на место, а не вспыхивает.
|
|
23
|
+
Рост столбцов и прорисовку линии кадром не задать — их рисует канвас по данным,
|
|
24
|
+
для этого кадр должен считаться в самом рисовании (следующий шаг для графиков) */
|
|
25
|
+
chui_bar_graph,
|
|
26
|
+
chui_line_graph,
|
|
27
|
+
chui_piechart,
|
|
28
|
+
chui_scatter_graph,
|
|
29
|
+
chui_gauge {
|
|
30
|
+
animation: chui_appear_up var(--motion_base) var(--motion_ease);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Подсказка графика: появляется и гаснет движения — иначе она перескакивала бы с
|
|
34
|
+
одного столбца на другой рывком (кадр ухода общий, время — быстрое) */
|
|
35
|
+
chui_chart_tooltip {
|
|
36
|
+
animation: chui_appear_up var(--motion_fast) var(--motion_ease);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.chui_chart_tooltip_leaving {
|
|
40
|
+
animation: chui_leave_up var(--motion_fast) var(--motion_ease) forwards;
|
|
41
|
+
}
|
|
42
|
+
|
|
22
43
|
/* Обёртка линейного графика и графика с заливкой */
|
|
23
44
|
chui_line_graph {
|
|
24
45
|
position: relative;
|
|
@@ -33,7 +54,7 @@ chui_chart_tooltip {
|
|
|
33
54
|
z-index: 2;
|
|
34
55
|
transform: translate(-50%, -130%);
|
|
35
56
|
padding: var(--control_padding);
|
|
36
|
-
border-radius: var(--
|
|
57
|
+
border-radius: var(--radius_sm);
|
|
37
58
|
background: var(--header_background);
|
|
38
59
|
backdrop-filter: var(--global_blur);
|
|
39
60
|
color: var(--text_color);
|
|
@@ -65,13 +86,13 @@ legend_color {
|
|
|
65
86
|
width: 20px;
|
|
66
87
|
height: 20px;
|
|
67
88
|
flex-shrink: 0;
|
|
68
|
-
border-radius: var(--
|
|
89
|
+
border-radius: var(--radius_sm);
|
|
69
90
|
}
|
|
70
91
|
|
|
71
92
|
legend_label {
|
|
72
93
|
color: var(--text_color);
|
|
73
94
|
font-weight: 400;
|
|
74
|
-
margin: var(--
|
|
95
|
+
margin: var(--block_margin);
|
|
75
96
|
}
|
|
76
97
|
|
|
77
98
|
/* Обёртка диаграммы рассеяния: канвас, легенда серий и скрытая таблица данных */
|
|
@@ -140,4 +161,4 @@ chui_heatmap_graph {
|
|
|
140
161
|
display: flex;
|
|
141
162
|
align-items: center;
|
|
142
163
|
flex-wrap: wrap;
|
|
143
|
-
}
|
|
164
|
+
}
|
|
@@ -1,48 +1,81 @@
|
|
|
1
|
-
const {Icon} = require("../chui_icons/icons");
|
|
2
|
-
const {optionOr} = require("../../modules/chui_functions");
|
|
1
|
+
const { Icon } = require("../chui_icons/icons");
|
|
2
|
+
const { optionOr } = require("../../modules/chui_functions");
|
|
3
|
+
const { animate, tokenTime } = require("../../modules/chui_animations/motion");
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Шапка страницы: значок, заголовок, описание и строка статистики.
|
|
7
|
+
*
|
|
8
|
+
* Подложка — нейтральная заливка с свечением акцентов, сверху акцентная линия, а знак
|
|
9
|
+
* залит градиентом двух акцентов палитры: цвет не заведён мимо таблицы, поэтому обе схемы
|
|
10
|
+
* работают сами. Плитки статистики берут акценты по кругу (`STAT_ACCENTS`) — ряд читается
|
|
11
|
+
* цветным без настройки каждой плитки; цвет идёт заливкой, рамкой и полосой, а число —
|
|
12
|
+
* цветом темы, иначе акцентный текст на тинте дал бы контраст ниже 3.
|
|
13
|
+
*
|
|
14
|
+
* Движение — по системе движения: шапка приходит кадром появления, линия сверху
|
|
15
|
+
* прочерчивается, знак встаёт с перелётом и выпускает кольцо, заголовок → описание → плитки
|
|
16
|
+
* идут по очереди, полосы плиток растут, числа догоняют значения, а замыкает блик по подложке.
|
|
17
|
+
* Все кадры одиночные: у шапки нет задачи ждать — непрерывное движение в ней было бы
|
|
18
|
+
* обещанием процесса, которого нет. При уменьшенном движении всё сжимается общим правилом темы.
|
|
19
|
+
*/
|
|
4
20
|
class Hero {
|
|
5
|
-
|
|
21
|
+
/** Акценты плиток по кругу: порядок задаёт сам компонент, а не вызывающий код */
|
|
22
|
+
static STAT_ACCENTS = ["blue", "purple", "green", "orange"];
|
|
23
|
+
|
|
24
|
+
#chuiHero = document.createElement("chui_hero");
|
|
6
25
|
#head;
|
|
7
26
|
#badge;
|
|
8
27
|
#titles;
|
|
9
28
|
#title;
|
|
10
29
|
#description;
|
|
11
30
|
#stats;
|
|
12
|
-
constructor(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
constructor(
|
|
32
|
+
options = {
|
|
33
|
+
id: String(),
|
|
34
|
+
title: String(),
|
|
35
|
+
description: String(),
|
|
36
|
+
icon: String(),
|
|
37
|
+
stats: [],
|
|
38
|
+
style: String(),
|
|
39
|
+
width: String(),
|
|
40
|
+
height: String(),
|
|
41
|
+
}
|
|
42
|
+
) {
|
|
43
|
+
require("../../modules/chui_functions").setStyles(__dirname + "/styles.css", "chUiJS_Hero");
|
|
44
|
+
if (options.id !== undefined) this.#chuiHero.id = options.id;
|
|
24
45
|
const style = optionOr(options.style, undefined);
|
|
25
|
-
if (style !== undefined) this.#
|
|
26
|
-
if (options.width !== undefined) this.#
|
|
27
|
-
if (options.height !== undefined) this.#
|
|
46
|
+
if (style !== undefined) this.#chuiHero.classList.add(style);
|
|
47
|
+
if (options.width !== undefined) this.#chuiHero.style.width = options.width;
|
|
48
|
+
if (options.height !== undefined) this.#chuiHero.style.height = options.height;
|
|
28
49
|
if (options.icon !== undefined) this.setIcon(options.icon);
|
|
29
50
|
if (options.title !== undefined) this.setTitle(options.title);
|
|
30
51
|
if (options.description !== undefined) this.setDescription(options.description);
|
|
31
|
-
if (options.stats !== undefined) for (
|
|
52
|
+
if (options.stats !== undefined) for (const stat of options.stats) this.addStat(stat.value, stat.label);
|
|
32
53
|
}
|
|
33
54
|
// GET
|
|
34
|
-
getId() {
|
|
35
|
-
|
|
36
|
-
|
|
55
|
+
getId() {
|
|
56
|
+
return this.#chuiHero.id;
|
|
57
|
+
}
|
|
58
|
+
getTitle() {
|
|
59
|
+
return this.#title === undefined ? "" : this.#title.innerText;
|
|
60
|
+
}
|
|
61
|
+
getDescription() {
|
|
62
|
+
return this.#description === undefined ? "" : this.#description.innerText;
|
|
63
|
+
}
|
|
37
64
|
// SET
|
|
38
|
-
setId(id = String()) {
|
|
65
|
+
setId(id = String()) {
|
|
66
|
+
this.#chuiHero.id = id;
|
|
67
|
+
}
|
|
39
68
|
// Пустая строка — «не задана»: `classList.add("")` бросает исключение
|
|
40
69
|
setStyle(style = String()) {
|
|
41
70
|
const known = optionOr(style, undefined);
|
|
42
|
-
if (known !== undefined) this.#
|
|
71
|
+
if (known !== undefined) this.#chuiHero.classList.add(known);
|
|
72
|
+
}
|
|
73
|
+
setWidth(width = String()) {
|
|
74
|
+
this.#chuiHero.style.width = width;
|
|
75
|
+
}
|
|
76
|
+
setHeight(height = String()) {
|
|
77
|
+
this.#chuiHero.style.height = height;
|
|
43
78
|
}
|
|
44
|
-
setWidth(width = String()) { this.#chui_hero.style.width = width; }
|
|
45
|
-
setHeight(height = String()) { this.#chui_hero.style.height = height; }
|
|
46
79
|
setIcon(icon = String()) {
|
|
47
80
|
if (this.#badge === undefined) {
|
|
48
81
|
this.#badge = document.createElement("hero_badge");
|
|
@@ -66,20 +99,46 @@ class Hero {
|
|
|
66
99
|
}
|
|
67
100
|
// FUNCTIONS
|
|
68
101
|
addStat(value = String(), label = String()) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
102
|
+
const stat = document.createElement("hero_stat");
|
|
103
|
+
const statValue = document.createElement("hero_stat_value");
|
|
104
|
+
const statLabel = document.createElement("hero_stat_label");
|
|
105
|
+
// Акцент — по числу уже стоящих плиток: ряд разукрашивается сам, без настройки.
|
|
106
|
+
// Тот же номер даёт ступеньку задержки в CSS (`--hero_stat_index`)
|
|
107
|
+
const index = this.#statsNode().children.length;
|
|
108
|
+
stat.dataset.accent = Hero.STAT_ACCENTS[index % Hero.STAT_ACCENTS.length];
|
|
109
|
+
stat.style.setProperty("--hero_stat_index", String(index));
|
|
110
|
+
statValue.innerText = value;
|
|
111
|
+
statLabel.innerText = label;
|
|
112
|
+
stat.append(statValue, statLabel);
|
|
75
113
|
this.#statsNode().appendChild(stat);
|
|
114
|
+
this.#countUp(statValue, value, index);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Число догоняет значение. Шаг считает общий движок движения (`animate` в
|
|
119
|
+
* `chui_animations/motion`), поэтому время — токен темы, а при уменьшенном движении значение
|
|
120
|
+
* встаёт сразу. Плитка появляется со ступенькой, и счёт начинается той же ступенькой,
|
|
121
|
+
* иначе число менялось бы в уже стоящей плитке. Значение, которое не разбирается как число
|
|
122
|
+
* («12 %», «1,2 тыс.» или текст), остаётся как есть.
|
|
123
|
+
*/
|
|
124
|
+
#countUp(node, value, index) {
|
|
125
|
+
const normalized = String(value).trim().replace(/\s/g, "").replace(",", ".");
|
|
126
|
+
const target = Number(normalized);
|
|
127
|
+
if (normalized === "" || Number.isFinite(target) === false) return;
|
|
128
|
+
// Знаков после запятой столько же, сколько в значении: целое не показываем с десятыми
|
|
129
|
+
const decimals = normalized.includes(".") ? normalized.split(".")[1].length : 0;
|
|
130
|
+
const frame = (growth) => (node.innerText = (target * growth).toFixed(decimals));
|
|
131
|
+
node.innerText = (0).toFixed(decimals);
|
|
132
|
+
setTimeout(() => animate(frame), tokenTime("--motion_base") + tokenTime("--motion_fast") * index);
|
|
133
|
+
}
|
|
134
|
+
clearStats() {
|
|
135
|
+
this.#statsNode().innerHTML = "";
|
|
76
136
|
}
|
|
77
|
-
clearStats() { this.#statsNode().innerHTML = ""; }
|
|
78
137
|
// Шапка и статистика создаются при первом обращении, шапка всегда стоит выше
|
|
79
138
|
#headNode() {
|
|
80
139
|
if (this.#head === undefined) {
|
|
81
140
|
this.#head = document.createElement("hero_head");
|
|
82
|
-
this.#
|
|
141
|
+
this.#chuiHero.prepend(this.#head);
|
|
83
142
|
}
|
|
84
143
|
return this.#head;
|
|
85
144
|
}
|
|
@@ -93,12 +152,14 @@ class Hero {
|
|
|
93
152
|
#statsNode() {
|
|
94
153
|
if (this.#stats === undefined) {
|
|
95
154
|
this.#stats = document.createElement("hero_stats");
|
|
96
|
-
this.#
|
|
155
|
+
this.#chuiHero.appendChild(this.#stats);
|
|
97
156
|
}
|
|
98
157
|
return this.#stats;
|
|
99
158
|
}
|
|
100
159
|
// RENDER
|
|
101
|
-
set() {
|
|
160
|
+
set() {
|
|
161
|
+
return this.#chuiHero;
|
|
162
|
+
}
|
|
102
163
|
}
|
|
103
164
|
|
|
104
|
-
exports.Hero = Hero
|
|
165
|
+
exports.Hero = Hero;
|
|
@@ -1,17 +1,94 @@
|
|
|
1
|
+
/* Шапка страницы: значок, заголовок, описание и строка статистики.
|
|
2
|
+
Украшение — из акцентов палитры, смешанных с нейтральной заливкой и рамкой
|
|
3
|
+
(`color-mix` над токенами), поэтому мимо таблицы цвет не заведён и обе схемы работают
|
|
4
|
+
сами. Движение — по системе движения: шапка приходит кадром появления из
|
|
5
|
+
`global_style.css`, знак и плитки встают со ступенькой задержки, а по подложке один
|
|
6
|
+
раз проходит блик. Непрерывных кадров нет намеренно: шапка — не индикатор ожидания,
|
|
7
|
+
а неподвижная поверхность, по которой не должно бегать движение. */
|
|
1
8
|
chui_hero {
|
|
9
|
+
position: relative;
|
|
2
10
|
display: flex;
|
|
3
11
|
flex-direction: column;
|
|
4
12
|
gap: 16px;
|
|
5
13
|
box-sizing: border-box;
|
|
6
14
|
width: -webkit-fill-available;
|
|
7
15
|
padding: 20px 22px;
|
|
16
|
+
/* Блик проходит по подложке и уходит за край — его и обрезает коробка */
|
|
17
|
+
overflow: hidden;
|
|
8
18
|
border: 1px solid var(--border_color);
|
|
9
19
|
border-radius: var(--radius_md);
|
|
10
|
-
|
|
20
|
+
/* Свечение акцентов лежит на нейтральной заливке: она читается и на карточке,
|
|
21
|
+
и на подложке (вложенная поверхность), а свечение даёт цвет там, где его не хватает */
|
|
22
|
+
background:
|
|
23
|
+
radial-gradient(
|
|
24
|
+
120% 100% at 100% 0%,
|
|
25
|
+
color-mix(in srgb, var(--blue_prime_background) 18%, transparent),
|
|
26
|
+
transparent 62%
|
|
27
|
+
),
|
|
28
|
+
radial-gradient(
|
|
29
|
+
100% 90% at 0% 100%,
|
|
30
|
+
color-mix(in srgb, var(--teal_prime_background) 16%, transparent),
|
|
31
|
+
transparent 66%
|
|
32
|
+
),
|
|
33
|
+
var(--element_background);
|
|
11
34
|
box-shadow: var(--box_shadow_main);
|
|
12
35
|
font-size: var(--font_default_size);
|
|
13
36
|
color: var(--text_color);
|
|
14
37
|
text-align: start;
|
|
38
|
+
animation: chui_appear_up var(--motion_base) var(--motion_ease) both;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Акцентная линия сверху: три акцента палитры одним градиентом — синий, циан, мята.
|
|
42
|
+
Без неё шапка читалась бы обычной карточкой. Линия не появляется готовой, а прочерчивается
|
|
43
|
+
слева направо: это первый кадр шапки, и он задаёт направление всему появлению */
|
|
44
|
+
chui_hero::before {
|
|
45
|
+
content: "";
|
|
46
|
+
position: absolute;
|
|
47
|
+
inset-inline: 0;
|
|
48
|
+
top: 0;
|
|
49
|
+
height: 3px;
|
|
50
|
+
background: linear-gradient(
|
|
51
|
+
90deg,
|
|
52
|
+
var(--blue_prime_background),
|
|
53
|
+
var(--cyan_prime_background) 55%,
|
|
54
|
+
var(--mint_prime_background)
|
|
55
|
+
);
|
|
56
|
+
transform-origin: left center;
|
|
57
|
+
animation: hero_line_in var(--motion_slow) var(--motion_ease) both;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@keyframes hero_line_in {
|
|
61
|
+
from {
|
|
62
|
+
transform: scaleX(0);
|
|
63
|
+
}
|
|
64
|
+
to {
|
|
65
|
+
transform: scaleX(1);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Блик: один раз проходит по подложке и уходит за край. Цвет берётся из текста темы —
|
|
70
|
+
белая полоса на светлой схеме не видна вовсе */
|
|
71
|
+
chui_hero::after {
|
|
72
|
+
content: "";
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: -20%;
|
|
75
|
+
bottom: -20%;
|
|
76
|
+
width: 42%;
|
|
77
|
+
background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text_color) 7%, transparent), transparent);
|
|
78
|
+
transform: translateX(-140%) skewX(-14deg);
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
/* `both` держит конечное положение — блик остаётся за краем, а не возвращается назад.
|
|
81
|
+
Идёт последним: подложка к этому времени уже собралась, и блик не спорит с появлением */
|
|
82
|
+
animation: hero_shine var(--motion_slow) var(--motion_ease) calc(var(--motion_fast) * 2) both;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@keyframes hero_shine {
|
|
86
|
+
from {
|
|
87
|
+
transform: translateX(-140%) skewX(-14deg);
|
|
88
|
+
}
|
|
89
|
+
to {
|
|
90
|
+
transform: translateX(240%) skewX(-14deg);
|
|
91
|
+
}
|
|
15
92
|
}
|
|
16
93
|
|
|
17
94
|
chui_hero hero_head {
|
|
@@ -28,8 +105,46 @@ chui_hero hero_badge {
|
|
|
28
105
|
width: 54px;
|
|
29
106
|
height: 54px;
|
|
30
107
|
border-radius: var(--radius_md);
|
|
31
|
-
|
|
32
|
-
|
|
108
|
+
/* Знак — единственная заливка во весь цвет: он и держит акцент, когда текст
|
|
109
|
+
читается цветом темы */
|
|
110
|
+
background: linear-gradient(135deg, var(--blue_prime_background), var(--indigo_prime_background));
|
|
111
|
+
box-shadow: 0 6px 18px color-mix(in srgb, var(--blue_prime_background) 35%, transparent);
|
|
112
|
+
animation: hero_badge_in var(--motion_base) var(--motion_spring) both;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Знак встаёт с лёгким перелётом и поворотом: он приходит первым в шапке */
|
|
116
|
+
@keyframes hero_badge_in {
|
|
117
|
+
from {
|
|
118
|
+
opacity: 0;
|
|
119
|
+
transform: scale(0.82) rotate(-8deg);
|
|
120
|
+
}
|
|
121
|
+
to {
|
|
122
|
+
opacity: 1;
|
|
123
|
+
transform: scale(1) rotate(0deg);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Отклик знака: от него один раз расходится кольцо — знак «встал на место».
|
|
128
|
+
Не по кругу: шапка — не индикатор ожидания, и непрерывного движения в ней быть не должно */
|
|
129
|
+
chui_hero hero_badge::after {
|
|
130
|
+
content: "";
|
|
131
|
+
position: absolute;
|
|
132
|
+
inset: 0;
|
|
133
|
+
border: 2px solid var(--blue_prime_background);
|
|
134
|
+
border-radius: var(--radius_md);
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
animation: hero_badge_ring var(--motion_slow) var(--motion_ease) var(--motion_fast) both;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@keyframes hero_badge_ring {
|
|
140
|
+
from {
|
|
141
|
+
opacity: 0.45;
|
|
142
|
+
transform: scale(0.86);
|
|
143
|
+
}
|
|
144
|
+
to {
|
|
145
|
+
opacity: 0;
|
|
146
|
+
transform: scale(1.5);
|
|
147
|
+
}
|
|
33
148
|
}
|
|
34
149
|
|
|
35
150
|
chui_hero hero_badge chui_icon {
|
|
@@ -51,7 +166,12 @@ chui_hero hero_title {
|
|
|
51
166
|
font-size: var(--font_title_size);
|
|
52
167
|
font-weight: 600;
|
|
53
168
|
letter-spacing: -0.02em;
|
|
169
|
+
/* Заголовок переносится по смыслу, а не по длине строки */
|
|
170
|
+
text-wrap: balance;
|
|
54
171
|
color: var(--text_color);
|
|
172
|
+
/* Ступенька: линия — знак — заголовок и дальше. Шаг — доля токена движения,
|
|
173
|
+
а не своё число */
|
|
174
|
+
animation: chui_appear_up var(--motion_base) var(--motion_ease) calc(var(--motion_fast) / 2) both;
|
|
55
175
|
}
|
|
56
176
|
|
|
57
177
|
chui_hero hero_description {
|
|
@@ -63,6 +183,7 @@ chui_hero hero_description {
|
|
|
63
183
|
/* Описание героя — обычный текст (было 13px, размера вне шкалы) */
|
|
64
184
|
font-size: var(--font_default_size);
|
|
65
185
|
color: var(--text_color_disabled);
|
|
186
|
+
animation: chui_appear_up var(--motion_base) var(--motion_ease) var(--motion_fast) both;
|
|
66
187
|
}
|
|
67
188
|
|
|
68
189
|
chui_hero hero_stats {
|
|
@@ -71,21 +192,69 @@ chui_hero hero_stats {
|
|
|
71
192
|
gap: 10px;
|
|
72
193
|
}
|
|
73
194
|
|
|
195
|
+
/* Плитка статистики. Свой акцент задаёт `data-accent` (его ставит компонент, ведя список
|
|
196
|
+
по кругу): цвет идёт заливкой, рамкой и полосой, а число читается цветом темы —
|
|
197
|
+
акцентный текст на тинте дал бы контраст ниже 3 даже для крупной строки */
|
|
74
198
|
chui_hero hero_stat {
|
|
199
|
+
--hero_accent: var(--blue_prime_background);
|
|
200
|
+
position: relative;
|
|
75
201
|
display: flex;
|
|
76
202
|
flex-direction: column;
|
|
77
203
|
gap: 1px;
|
|
78
204
|
min-width: 104px;
|
|
79
|
-
padding: 8px 14px;
|
|
80
|
-
border: 1px solid var(--border_color);
|
|
205
|
+
padding: 8px 14px 8px 18px;
|
|
206
|
+
border: 1px solid color-mix(in srgb, var(--hero_accent) 34%, var(--border_color));
|
|
81
207
|
border-radius: var(--radius_md);
|
|
82
|
-
background: var(--element_background_2);
|
|
208
|
+
background: color-mix(in srgb, var(--hero_accent) 12%, var(--element_background_2));
|
|
209
|
+
/* Плитки встают по очереди: номер ставит компонент переменной `--hero_stat_index`,
|
|
210
|
+
а ступенька считается от той же задержки, что у описания, поэтому порядок
|
|
211
|
+
появления один: линия, знак, заголовок, описание, плитки, блик */
|
|
212
|
+
animation: chui_appear_up var(--motion_base) var(--motion_ease) both;
|
|
213
|
+
animation-delay: calc(var(--motion_base) + var(--motion_fast) * var(--hero_stat_index, 0));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Акцентная полоса слева: даже когда плиток много, их ряд читается цветным.
|
|
217
|
+
Она прочерчивается сверху вниз вместе с приходом своей плитки */
|
|
218
|
+
chui_hero hero_stat::before {
|
|
219
|
+
content: "";
|
|
220
|
+
position: absolute;
|
|
221
|
+
inset-block: 8px;
|
|
222
|
+
inset-inline-start: 8px;
|
|
223
|
+
width: 3px;
|
|
224
|
+
border-radius: var(--radius_pill);
|
|
225
|
+
background: var(--hero_accent);
|
|
226
|
+
transform-origin: top center;
|
|
227
|
+
animation: hero_stat_bar_in var(--motion_base) var(--motion_ease) both;
|
|
228
|
+
animation-delay: calc(var(--motion_base) + var(--motion_fast) * var(--hero_stat_index, 0));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@keyframes hero_stat_bar_in {
|
|
232
|
+
from {
|
|
233
|
+
transform: scaleY(0);
|
|
234
|
+
}
|
|
235
|
+
to {
|
|
236
|
+
transform: scaleY(1);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
chui_hero hero_stat[data-accent="purple"] {
|
|
241
|
+
--hero_accent: var(--purple_prime_background);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
chui_hero hero_stat[data-accent="green"] {
|
|
245
|
+
--hero_accent: var(--green_prime_background);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
chui_hero hero_stat[data-accent="orange"] {
|
|
249
|
+
--hero_accent: var(--orange_prime_background);
|
|
83
250
|
}
|
|
84
251
|
|
|
85
252
|
chui_hero hero_stat_value {
|
|
86
253
|
font-size: var(--font_lead_size);
|
|
87
254
|
font-weight: 600;
|
|
88
|
-
|
|
255
|
+
/* Числа не "плывут" при смене значения: ширины цифр равны */
|
|
256
|
+
font-variant-numeric: tabular-nums;
|
|
257
|
+
color: var(--text_color);
|
|
89
258
|
}
|
|
90
259
|
|
|
91
260
|
chui_hero hero_stat_label {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
class HtmlBlock {
|
|
2
|
-
#id = require("randomstring").generate()
|
|
3
|
-
#
|
|
2
|
+
#id = require("randomstring").generate();
|
|
3
|
+
#htmlBlock = document.createElement("chui_html_block");
|
|
4
4
|
constructor(width = String()) {
|
|
5
|
-
require(
|
|
6
|
-
this.#
|
|
7
|
-
this.#
|
|
5
|
+
require("../../modules/chui_functions").setStyles(__dirname + "/styles.css", "chUiJS_HtmlBlock");
|
|
6
|
+
this.#htmlBlock.setAttribute("id", this.#id);
|
|
7
|
+
this.#htmlBlock.style.width = width;
|
|
8
8
|
}
|
|
9
9
|
setHtml(html) {
|
|
10
|
-
this.#
|
|
10
|
+
this.#htmlBlock.innerHTML = html;
|
|
11
11
|
}
|
|
12
12
|
set() {
|
|
13
|
-
return this.#
|
|
13
|
+
return this.#htmlBlock;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
exports.HtmlBlock = HtmlBlock
|
|
17
|
+
exports.HtmlBlock = HtmlBlock;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
class H {
|
|
2
2
|
#h = undefined;
|
|
3
3
|
constructor(num = Number(), text = String()) {
|
|
4
|
-
require(
|
|
5
|
-
this.#h = document.createElement(`h${H.#level(num)}`)
|
|
4
|
+
require("../../modules/chui_functions").setStyles(__dirname + "/styles.css", "chUiJS_HX");
|
|
5
|
+
this.#h = document.createElement(`h${H.#level(num)}`);
|
|
6
6
|
this.#h.innerText = text === undefined || text === null ? "" : String(text);
|
|
7
7
|
}
|
|
8
8
|
/** Уровень заголовка: целое 1…6, иначе — понятная ошибка вместо несуществующего тега `h0`.
|
|
@@ -27,4 +27,4 @@ class H {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
exports.H = H
|
|
30
|
+
exports.H = H;
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
h1,
|
|
1
|
+
h1,
|
|
2
|
+
h2,
|
|
3
|
+
h3,
|
|
4
|
+
h4,
|
|
5
|
+
h5,
|
|
6
|
+
h6 {
|
|
2
7
|
height: max-content;
|
|
3
8
|
/* Ширина по контейнеру: с max-content длинный заголовок не переносился,
|
|
4
|
-
а с margin: var(--
|
|
9
|
+
а с margin: var(--block_margin) уезжал вправо за край родителя */
|
|
5
10
|
width: -webkit-fill-available;
|
|
6
11
|
/* Слово шире строки разрывается, а не вылезает за заголовок */
|
|
7
12
|
overflow-wrap: break-word;
|
|
8
13
|
color: var(--text_color);
|
|
9
|
-
margin: var(--
|
|
14
|
+
margin: var(--block_margin);
|
|
10
15
|
font-weight: 500;
|
|
11
16
|
}
|
|
12
17
|
|
|
13
|
-
h1,
|
|
18
|
+
h1,
|
|
19
|
+
h2 {
|
|
14
20
|
padding: 12px 6px;
|
|
15
21
|
}
|
|
16
22
|
|
|
17
|
-
h3,
|
|
23
|
+
h3,
|
|
24
|
+
h4 {
|
|
18
25
|
padding: 10px 6px;
|
|
19
26
|
}
|
|
20
27
|
|
|
@@ -40,4 +47,4 @@ h4 {
|
|
|
40
47
|
|
|
41
48
|
h5 {
|
|
42
49
|
font-size: 1.2rem;
|
|
43
|
-
}
|
|
50
|
+
}
|