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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const {Animation} = require(
|
|
2
|
-
const {Calendar} = require(
|
|
3
|
-
const {Icon, Icons} = require(
|
|
4
|
-
const {makeKeyboardButton} = require(
|
|
5
|
-
const {I18n} = require(
|
|
6
|
-
const {dropdownPlacement} = require(
|
|
7
|
-
const {Validate} = require(
|
|
1
|
+
const { Animation } = require("../../../modules/chui_animations/animations");
|
|
2
|
+
const { Calendar } = require("../../chui_calendar/calendar");
|
|
3
|
+
const { Icon, Icons } = require("../../chui_icons/icons");
|
|
4
|
+
const { makeKeyboardButton } = require("../../../modules/chui_a11y/chui_a11y");
|
|
5
|
+
const { I18n } = require("../../../modules/chui_i18n/chui_i18n");
|
|
6
|
+
const { dropdownPlacement } = require("../../../modules/chui_functions");
|
|
7
|
+
const { Validate } = require("../../../modules/chui_validate/chui_validate");
|
|
8
8
|
|
|
9
9
|
const MONTHS_IN_YEAR = 12;
|
|
10
10
|
/** Сколько лет на одной странице выбора года */
|
|
@@ -13,64 +13,82 @@ const isDayNumber = (cell) => /^\d+$/.test(String(cell).trim());
|
|
|
13
13
|
|
|
14
14
|
class DateInput {
|
|
15
15
|
#id = require("randomstring").generate();
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#input = document.createElement(
|
|
19
|
-
#label = document.createElement(
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#dropdown = document.createElement(
|
|
16
|
+
#chuiDateInput = document.createElement("chui_date_input");
|
|
17
|
+
#dateMainBlock = document.createElement("date_main_block");
|
|
18
|
+
#input = document.createElement("input");
|
|
19
|
+
#label = document.createElement("label");
|
|
20
|
+
#dateDropdownOpen = document.createElement("date_dropdown_open");
|
|
21
|
+
#dateDropdownOpenDisabled = document.createElement("date_dropdown_open");
|
|
22
|
+
#dropdown = document.createElement("date_select_dropdown");
|
|
23
23
|
// Слушатель окна храним полем, чтобы можно было снять в destroy()
|
|
24
|
-
#
|
|
25
|
-
if (!this.#
|
|
24
|
+
#windowClickEvent = (event) => {
|
|
25
|
+
if (!this.#dateMainBlock.contains(event.target)) this.#closeDropdown();
|
|
26
26
|
};
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
27
|
+
#dropdownId = require("randomstring").generate();
|
|
28
|
+
#dateNow = new Date();
|
|
29
|
+
#dateMonthList = document.createElement("date_month_list");
|
|
30
|
+
#dateYearList = document.createElement("date_year_list");
|
|
31
|
+
#dateCalendarTitle = document.createElement("date_calendar_title");
|
|
32
|
+
#calendarYear = this.#dateNow.getFullYear();
|
|
33
|
+
#calendarMonth = this.#dateNow.getMonth();
|
|
34
34
|
// Экран календаря: месяцы (по умолчанию) или выбор года
|
|
35
35
|
#view = "months";
|
|
36
36
|
constructor(options = { name: String(), title: String(), required: Boolean() }) {
|
|
37
|
-
require(
|
|
38
|
-
this.#input.type =
|
|
37
|
+
require("../../../modules/chui_functions").setStyles(__dirname + "/styles.css", "chUiJS_DateInput");
|
|
38
|
+
this.#input.type = "date";
|
|
39
39
|
this.#input.className = "date_input";
|
|
40
40
|
this.#input.id = this.#id;
|
|
41
41
|
if (options.name !== undefined) this.#input.name = options.name;
|
|
42
42
|
if (options.required !== undefined) this.#input.required = options.required;
|
|
43
43
|
// Валидация и показ ошибки: правила из options (required/pattern/…). Текст ошибки — в корень
|
|
44
44
|
// поля (под контролом), рамку получает сам контрол: подпись и поле — две строки одной колонки
|
|
45
|
-
Validate.installField(
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
Validate.installField(
|
|
46
|
+
this,
|
|
47
|
+
options,
|
|
48
|
+
this.#chuiDateInput,
|
|
49
|
+
undefined,
|
|
50
|
+
() => this.#input.value,
|
|
51
|
+
this.#dateMainBlock
|
|
52
|
+
);
|
|
53
|
+
this.#dateDropdownOpen.innerHTML = new Icon(
|
|
54
|
+
Icons.HARDWARE.KEYBOARD_ARROW_DOWN,
|
|
55
|
+
undefined,
|
|
56
|
+
"var(--blue_prime_background)"
|
|
57
|
+
).getHTML();
|
|
58
|
+
this.#dateDropdownOpenDisabled.innerHTML = new Icon(
|
|
59
|
+
Icons.HARDWARE.KEYBOARD_ARROW_DOWN,
|
|
60
|
+
undefined,
|
|
61
|
+
"var(--text_color_disabled)"
|
|
62
|
+
).getHTML();
|
|
48
63
|
// Курсор выключенного поля даёт его контейнер (`.date_main_block_disabled`),
|
|
49
64
|
// курсор наследуется и на стрелку
|
|
50
65
|
if (options.title !== undefined) {
|
|
51
|
-
this.#label.classList.add(
|
|
66
|
+
this.#label.classList.add("date_input_label");
|
|
52
67
|
this.#label.innerText = options.title;
|
|
53
|
-
this.#label.setAttribute(
|
|
54
|
-
this.#
|
|
68
|
+
this.#label.setAttribute("for", this.#id);
|
|
69
|
+
this.#chuiDateInput.appendChild(this.#label);
|
|
55
70
|
}
|
|
56
71
|
// Рамку с кольцом при фокусе рисует общее правило темы (`date_main_block:hover`,
|
|
57
72
|
// `:focus-within`), а не компонент: прежде он ставил то же самое инлайном,
|
|
58
73
|
// а на `blur` снимал весь атрибут `style`
|
|
59
|
-
this.#dropdown.setAttribute(
|
|
74
|
+
this.#dropdown.setAttribute("id", this.#dropdownId);
|
|
60
75
|
// Доступность: поле — combobox, календарь — диалог с состоянием раскрытия
|
|
61
76
|
this.#input.setAttribute("role", "combobox");
|
|
62
77
|
this.#input.setAttribute("aria-haspopup", "dialog");
|
|
63
78
|
this.#input.setAttribute("aria-expanded", "false");
|
|
64
|
-
this.#input.setAttribute("aria-controls", this.#
|
|
79
|
+
this.#input.setAttribute("aria-controls", this.#dropdownId);
|
|
65
80
|
this.#dropdown.setAttribute("role", "dialog");
|
|
66
81
|
this.#dropdown.setAttribute("aria-label", I18n.t("date.calendar"));
|
|
67
82
|
// Клавиатура календаря: стрелки по дням, Enter выбирает, Escape закрывает
|
|
68
83
|
this.#dropdown.addEventListener("keydown", (event) => {
|
|
69
84
|
// Заголовок и список годов — свои кнопки: у них своя обработка Enter/Space
|
|
70
|
-
if (
|
|
71
|
-
|
|
85
|
+
if (
|
|
86
|
+
event.target instanceof Element &&
|
|
87
|
+
(event.target === this.#dateCalendarTitle || event.target.closest("date_year") !== null)
|
|
88
|
+
)
|
|
89
|
+
return;
|
|
72
90
|
const days = this.#visibleDays();
|
|
73
|
-
const current = days.findIndex(day => day === document.activeElement);
|
|
91
|
+
const current = days.findIndex((day) => day === document.activeElement);
|
|
74
92
|
if (event.key === "Escape") {
|
|
75
93
|
event.preventDefault();
|
|
76
94
|
this.#closeDropdown();
|
|
@@ -97,59 +115,59 @@ class DateInput {
|
|
|
97
115
|
if (next >= 0 && next < days.length) days[next].focus();
|
|
98
116
|
});
|
|
99
117
|
this.#dropdown.appendChild(this.#buildCalendarHeader());
|
|
100
|
-
this.#dropdown.appendChild(this.#
|
|
101
|
-
this.#dropdown.appendChild(this.#
|
|
102
|
-
this.#
|
|
103
|
-
this.#buildYear(this.#
|
|
104
|
-
this.#showMonth(this.#
|
|
118
|
+
this.#dropdown.appendChild(this.#dateMonthList);
|
|
119
|
+
this.#dropdown.appendChild(this.#dateYearList);
|
|
120
|
+
this.#dateYearList.hidden = true;
|
|
121
|
+
this.#buildYear(this.#calendarYear);
|
|
122
|
+
this.#showMonth(this.#calendarMonth);
|
|
105
123
|
//LISTENERS
|
|
106
|
-
this.#
|
|
124
|
+
this.#chuiDateInput.addEventListener("click", (event) => {
|
|
107
125
|
if (!this.#input.disabled) {
|
|
108
|
-
if (event.target.parentNode === this.#
|
|
109
|
-
this.#input.focus()
|
|
126
|
+
if (event.target.parentNode === this.#dateMainBlock) {
|
|
127
|
+
this.#input.focus();
|
|
110
128
|
this.#openDropdown();
|
|
111
129
|
}
|
|
112
130
|
}
|
|
113
131
|
});
|
|
114
|
-
window.addEventListener(
|
|
115
|
-
this.#
|
|
116
|
-
this.#
|
|
117
|
-
this.#
|
|
118
|
-
this.#
|
|
132
|
+
window.addEventListener("click", this.#windowClickEvent);
|
|
133
|
+
this.#dateMainBlock.appendChild(this.#input);
|
|
134
|
+
this.#dateMainBlock.appendChild(this.#dateDropdownOpen);
|
|
135
|
+
this.#dateMainBlock.appendChild(this.#dropdown);
|
|
136
|
+
this.#chuiDateInput.appendChild(this.#dateMainBlock);
|
|
119
137
|
}
|
|
120
138
|
#buildCalendarHeader() {
|
|
121
|
-
const header = document.createElement(
|
|
122
|
-
const previous = document.createElement(
|
|
139
|
+
const header = document.createElement("date_calendar_header");
|
|
140
|
+
const previous = document.createElement("date_calendar_nav");
|
|
123
141
|
previous.setAttribute("role", "button");
|
|
124
142
|
previous.setAttribute("tabindex", "0");
|
|
125
143
|
previous.setAttribute("aria-label", I18n.t("date.previous"));
|
|
126
144
|
previous.innerHTML = new Icon(Icons.HARDWARE.KEYBOARD_ARROW_LEFT, undefined, "var(--text_color)").getHTML();
|
|
127
|
-
previous.addEventListener(
|
|
145
|
+
previous.addEventListener("click", (event) => {
|
|
128
146
|
event.stopPropagation();
|
|
129
147
|
this.#goBack();
|
|
130
148
|
});
|
|
131
149
|
makeKeyboardButton(previous);
|
|
132
|
-
const next = document.createElement(
|
|
150
|
+
const next = document.createElement("date_calendar_nav");
|
|
133
151
|
next.setAttribute("role", "button");
|
|
134
152
|
next.setAttribute("tabindex", "0");
|
|
135
153
|
next.setAttribute("aria-label", I18n.t("date.next"));
|
|
136
154
|
next.innerHTML = new Icon(Icons.HARDWARE.KEYBOARD_ARROW_RIGHT, undefined, "var(--text_color)").getHTML();
|
|
137
|
-
next.addEventListener(
|
|
155
|
+
next.addEventListener("click", (event) => {
|
|
138
156
|
event.stopPropagation();
|
|
139
157
|
this.#goForward();
|
|
140
158
|
});
|
|
141
159
|
makeKeyboardButton(next);
|
|
142
160
|
// Заголовок — кнопка: по нажатию открывается выбор года (см. #showYears)
|
|
143
|
-
this.#
|
|
144
|
-
this.#
|
|
145
|
-
this.#
|
|
146
|
-
this.#
|
|
161
|
+
this.#dateCalendarTitle.id = this.#id + "_title";
|
|
162
|
+
this.#dateCalendarTitle.setAttribute("title", I18n.t("date.selectYear"));
|
|
163
|
+
this.#dateCalendarTitle.setAttribute("aria-label", I18n.t("date.selectYear"));
|
|
164
|
+
this.#dateCalendarTitle.addEventListener("click", (event) => {
|
|
147
165
|
event.stopPropagation();
|
|
148
166
|
this.#toggleView();
|
|
149
167
|
});
|
|
150
|
-
makeKeyboardButton(this.#
|
|
168
|
+
makeKeyboardButton(this.#dateCalendarTitle);
|
|
151
169
|
header.appendChild(previous);
|
|
152
|
-
header.appendChild(this.#
|
|
170
|
+
header.appendChild(this.#dateCalendarTitle);
|
|
153
171
|
header.appendChild(next);
|
|
154
172
|
return header;
|
|
155
173
|
}
|
|
@@ -164,35 +182,35 @@ class DateInput {
|
|
|
164
182
|
#showYears() {
|
|
165
183
|
this.#view = "years";
|
|
166
184
|
this.#buildYears();
|
|
167
|
-
this.#
|
|
168
|
-
this.#
|
|
169
|
-
const current = this.#yearButton(this.#
|
|
185
|
+
this.#dateMonthList.hidden = true;
|
|
186
|
+
this.#dateYearList.hidden = false;
|
|
187
|
+
const current = this.#yearButton(this.#calendarYear);
|
|
170
188
|
if (current !== null) current.focus();
|
|
171
189
|
}
|
|
172
190
|
|
|
173
191
|
#showMonths() {
|
|
174
192
|
this.#view = "months";
|
|
175
|
-
this.#
|
|
176
|
-
this.#
|
|
177
|
-
this.#showMonth(this.#
|
|
193
|
+
this.#dateYearList.hidden = true;
|
|
194
|
+
this.#dateMonthList.hidden = false;
|
|
195
|
+
this.#showMonth(this.#calendarMonth);
|
|
178
196
|
}
|
|
179
197
|
|
|
180
198
|
#yearPageStart() {
|
|
181
|
-
return Math.floor(this.#
|
|
199
|
+
return Math.floor(this.#calendarYear / YEARS_PER_PAGE) * YEARS_PER_PAGE;
|
|
182
200
|
}
|
|
183
201
|
|
|
184
202
|
#yearButton(year) {
|
|
185
|
-
return [...this.#
|
|
203
|
+
return [...this.#dateYearList.children].find((item) => item.innerText === String(year)) || null;
|
|
186
204
|
}
|
|
187
205
|
|
|
188
206
|
#buildYears() {
|
|
189
207
|
const start = this.#yearPageStart();
|
|
190
|
-
this.#
|
|
208
|
+
this.#dateYearList.innerHTML = "";
|
|
191
209
|
for (let index = 0; index < YEARS_PER_PAGE; index++) {
|
|
192
210
|
const year = start + index;
|
|
193
211
|
const item = document.createElement("date_year");
|
|
194
212
|
item.innerText = String(year);
|
|
195
|
-
if (year === this.#
|
|
213
|
+
if (year === this.#calendarYear) item.classList.add("date_year_current");
|
|
196
214
|
item.addEventListener("click", (event) => {
|
|
197
215
|
event.stopPropagation();
|
|
198
216
|
this.#selectYear(year);
|
|
@@ -200,16 +218,16 @@ class DateInput {
|
|
|
200
218
|
makeKeyboardButton(item);
|
|
201
219
|
// Годы доступны с клавиатуры, но не растягивают общий порядок обхода
|
|
202
220
|
item.setAttribute("tabindex", "-1");
|
|
203
|
-
this.#
|
|
221
|
+
this.#dateYearList.appendChild(item);
|
|
204
222
|
}
|
|
205
|
-
this.#
|
|
223
|
+
this.#dateCalendarTitle.innerText = `${start}—${start + YEARS_PER_PAGE - 1}`;
|
|
206
224
|
}
|
|
207
225
|
|
|
208
226
|
#selectYear(year) {
|
|
209
|
-
this.#
|
|
227
|
+
this.#calendarYear = year;
|
|
210
228
|
this.#buildYear(year);
|
|
211
229
|
this.#showMonths();
|
|
212
|
-
this.#
|
|
230
|
+
this.#dateCalendarTitle.focus();
|
|
213
231
|
}
|
|
214
232
|
|
|
215
233
|
// Стрелки: в месяцах — соседний месяц, в списке годов — соседняя страница
|
|
@@ -224,55 +242,55 @@ class DateInput {
|
|
|
224
242
|
}
|
|
225
243
|
|
|
226
244
|
#goToYearPage(delta) {
|
|
227
|
-
this.#
|
|
245
|
+
this.#calendarYear += delta * YEARS_PER_PAGE;
|
|
228
246
|
// Календарь перестраиваем сразу: выбранный год и список остаются согласованными
|
|
229
|
-
this.#buildYear(this.#
|
|
247
|
+
this.#buildYear(this.#calendarYear);
|
|
230
248
|
this.#buildYears();
|
|
231
249
|
}
|
|
232
250
|
#buildYear(year) {
|
|
233
|
-
this.#
|
|
251
|
+
this.#dateMonthList.innerHTML = "";
|
|
234
252
|
for (let i = 0; i < MONTHS_IN_YEAR; i++) {
|
|
235
253
|
const cal = new Calendar(year, i + 1);
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
for (
|
|
241
|
-
const
|
|
254
|
+
const dateMonthMain = document.createElement("date_month_main");
|
|
255
|
+
dateMonthMain.setAttribute("month-name", cal.getMonthName());
|
|
256
|
+
dateMonthMain.setAttribute("month-index", String(cal.getMonth()));
|
|
257
|
+
dateMonthMain.style.width = "fit-content";
|
|
258
|
+
for (const row of cal.getCalendar()) {
|
|
259
|
+
const dateWeek = document.createElement("date_week");
|
|
242
260
|
let index = 0;
|
|
243
|
-
for (
|
|
244
|
-
const
|
|
261
|
+
for (const cell of row) {
|
|
262
|
+
const dateDay = document.createElement("date_day");
|
|
245
263
|
if (cell !== undefined) {
|
|
246
|
-
|
|
264
|
+
dateDay.innerText = cell;
|
|
247
265
|
if (isDayNumber(cell)) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
266
|
+
dateDay.classList = "date_day";
|
|
267
|
+
dateDay.setAttribute("tabindex", "-1");
|
|
268
|
+
dateDay.setAttribute("role", "button");
|
|
269
|
+
dateDay.addEventListener("click", () => {
|
|
252
270
|
const selected = new Date(cal.getYear(), cal.getMonth(), Number(cell));
|
|
253
271
|
this.#input.value = formatLocalDate(selected);
|
|
254
272
|
// Выбор в календаре — такое же изменение значения, как правка в поле:
|
|
255
273
|
// без события слушатели (в том числе составные поля вроде
|
|
256
274
|
// DateTimeInput и DateRangeInput) о нём не узнали бы
|
|
257
|
-
this.#input.dispatchEvent(new Event("change", {bubbles: true}));
|
|
275
|
+
this.#input.dispatchEvent(new Event("change", { bubbles: true }));
|
|
258
276
|
this.#closeDropdown();
|
|
259
277
|
});
|
|
260
278
|
}
|
|
261
279
|
} else {
|
|
262
280
|
index++;
|
|
263
281
|
}
|
|
264
|
-
|
|
282
|
+
dateWeek.appendChild(dateDay);
|
|
265
283
|
}
|
|
266
284
|
if (index !== 7) {
|
|
267
|
-
|
|
285
|
+
dateMonthMain.appendChild(dateWeek);
|
|
268
286
|
}
|
|
269
287
|
}
|
|
270
|
-
this.#
|
|
288
|
+
this.#dateMonthList.appendChild(dateMonthMain);
|
|
271
289
|
}
|
|
272
290
|
}
|
|
273
291
|
// Открытие дропдауна: показ, направление и высота по свободному месту рядом с полем
|
|
274
292
|
#openDropdown() {
|
|
275
|
-
new Animation(this.#dropdown).
|
|
293
|
+
new Animation(this.#dropdown).panelIn();
|
|
276
294
|
this.#placeDropdown();
|
|
277
295
|
this.#input.setAttribute("aria-expanded", "true");
|
|
278
296
|
}
|
|
@@ -282,7 +300,7 @@ class DateInput {
|
|
|
282
300
|
* уходит в прокрутку самого календаря.
|
|
283
301
|
*/
|
|
284
302
|
#placeDropdown() {
|
|
285
|
-
const placement = dropdownPlacement(this.#dropdown, this.#
|
|
303
|
+
const placement = dropdownPlacement(this.#dropdown, this.#dateMainBlock);
|
|
286
304
|
this.#dropdown.style.top = placement.up ? "auto" : "-2px";
|
|
287
305
|
this.#dropdown.style.bottom = placement.up ? "-2px" : "auto";
|
|
288
306
|
if (placement.maxHeight > 0) this.#dropdown.style.maxHeight = `${placement.maxHeight}px`;
|
|
@@ -295,27 +313,29 @@ class DateInput {
|
|
|
295
313
|
}
|
|
296
314
|
/** Полное удаление: снять слушатели окна */
|
|
297
315
|
destroy() {
|
|
298
|
-
window.removeEventListener(
|
|
316
|
+
window.removeEventListener("click", this.#windowClickEvent);
|
|
299
317
|
this.#closeDropdown();
|
|
300
318
|
}
|
|
301
319
|
// Дни текущего видимого месяца (по ним ходят стрелки)
|
|
302
320
|
#visibleDays() {
|
|
303
|
-
const month = this.#
|
|
321
|
+
const month = this.#dateMonthList.querySelector('date_month_main[month-index="' + this.#calendarMonth + '"]');
|
|
304
322
|
if (month === null) return [];
|
|
305
|
-
return [...month.querySelectorAll("date_day")].filter(day => day.classList.contains("date_day"));
|
|
323
|
+
return [...month.querySelectorAll("date_day")].filter((day) => day.classList.contains("date_day"));
|
|
306
324
|
}
|
|
307
325
|
#showMonth(index) {
|
|
308
|
-
this.#
|
|
309
|
-
const months = this.#
|
|
310
|
-
for (
|
|
311
|
-
month.style.display = Number(month.getAttribute(
|
|
326
|
+
this.#calendarMonth = index;
|
|
327
|
+
const months = this.#dateMonthList.querySelectorAll("date_month_main");
|
|
328
|
+
for (const month of months) {
|
|
329
|
+
month.style.display = Number(month.getAttribute("month-index")) === index ? "block" : "none";
|
|
312
330
|
}
|
|
313
|
-
this.#
|
|
314
|
-
.toLocaleString(I18n.getLocale(), {month:
|
|
331
|
+
this.#dateCalendarTitle.innerText =
|
|
332
|
+
new Date(this.#calendarYear, index).toLocaleString(I18n.getLocale(), { month: "long" }).toUpperCase() +
|
|
333
|
+
" " +
|
|
334
|
+
this.#calendarYear;
|
|
315
335
|
}
|
|
316
336
|
#goToMonth(delta) {
|
|
317
|
-
let month = this.#
|
|
318
|
-
let year = this.#
|
|
337
|
+
let month = this.#calendarMonth + delta;
|
|
338
|
+
let year = this.#calendarYear;
|
|
319
339
|
if (month < 0) {
|
|
320
340
|
month = MONTHS_IN_YEAR - 1;
|
|
321
341
|
year--;
|
|
@@ -323,36 +343,50 @@ class DateInput {
|
|
|
323
343
|
month = 0;
|
|
324
344
|
year++;
|
|
325
345
|
}
|
|
326
|
-
if (year !== this.#
|
|
327
|
-
this.#
|
|
346
|
+
if (year !== this.#calendarYear) {
|
|
347
|
+
this.#calendarYear = year;
|
|
328
348
|
this.#buildYear(year);
|
|
329
349
|
}
|
|
330
350
|
this.#showMonth(month);
|
|
331
351
|
}
|
|
332
|
-
getName() {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
352
|
+
getName() {
|
|
353
|
+
return this.#input.name;
|
|
354
|
+
}
|
|
355
|
+
getTitle() {
|
|
356
|
+
return this.#label.innerText;
|
|
357
|
+
}
|
|
358
|
+
getValue() {
|
|
359
|
+
return this.#input.value;
|
|
360
|
+
}
|
|
361
|
+
setValue(date = String()) {
|
|
362
|
+
this.#input.value = date;
|
|
363
|
+
}
|
|
336
364
|
setDisabled(boolean = Boolean()) {
|
|
337
|
-
this.#input.disabled = boolean
|
|
365
|
+
this.#input.disabled = boolean;
|
|
338
366
|
if (boolean) {
|
|
339
|
-
this.#
|
|
340
|
-
this.#input.className = "date_input_disabled"
|
|
341
|
-
this.#label.className = "date_input_label_disabled"
|
|
342
|
-
this.#
|
|
343
|
-
this.#
|
|
367
|
+
this.#dateMainBlock.classList.add("date_main_block_disabled");
|
|
368
|
+
this.#input.className = "date_input_disabled";
|
|
369
|
+
this.#label.className = "date_input_label_disabled";
|
|
370
|
+
this.#dateDropdownOpen.remove();
|
|
371
|
+
this.#dateMainBlock.appendChild(this.#dateDropdownOpenDisabled);
|
|
344
372
|
} else {
|
|
345
|
-
this.#
|
|
346
|
-
this.#input.className = "date_input"
|
|
347
|
-
this.#label.className = "date_input_label"
|
|
348
|
-
this.#
|
|
349
|
-
this.#
|
|
373
|
+
this.#dateMainBlock.classList.remove("date_main_block_disabled");
|
|
374
|
+
this.#input.className = "date_input";
|
|
375
|
+
this.#label.className = "date_input_label";
|
|
376
|
+
this.#dateDropdownOpenDisabled.remove();
|
|
377
|
+
this.#dateMainBlock.appendChild(this.#dateDropdownOpen);
|
|
350
378
|
}
|
|
351
379
|
}
|
|
352
|
-
set() {
|
|
380
|
+
set() {
|
|
381
|
+
return this.#chuiDateInput;
|
|
382
|
+
}
|
|
353
383
|
}
|
|
354
384
|
|
|
355
385
|
const formatLocalDate = (date) =>
|
|
356
|
-
date.getFullYear() +
|
|
386
|
+
date.getFullYear() +
|
|
387
|
+
"-" +
|
|
388
|
+
String(date.getMonth() + 1).padStart(2, "0") +
|
|
389
|
+
"-" +
|
|
390
|
+
String(date.getDate()).padStart(2, "0");
|
|
357
391
|
|
|
358
|
-
exports.DateInput = DateInput
|
|
392
|
+
exports.DateInput = DateInput;
|
|
@@ -4,24 +4,24 @@ chui_date_input {
|
|
|
4
4
|
карточку. Токены переопределены у корня поля, поэтому действуют только внутри него
|
|
5
5
|
(тот же приём у полосы меню-бара). */
|
|
6
6
|
--control_padding: var(--control_padding_sm);
|
|
7
|
-
--
|
|
7
|
+
--block_padding: var(--block_padding_sm);
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
width: max-content;
|
|
11
11
|
height: max-content;
|
|
12
|
-
margin: var(--
|
|
12
|
+
margin: var(--block_margin);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* Нативные части поля даты: индикатор календаря не нужен (календарь свой, значок — тоже),
|
|
16
16
|
а поля ввода даты собираются в одну строку. Правила только для своего поля: без области
|
|
17
17
|
они прятали бы чужие нативные поля ввода во всём приложении. */
|
|
18
|
-
chui_date_input input[type=date]::-webkit-calendar-picker-indicator {
|
|
19
|
-
display: none
|
|
18
|
+
chui_date_input input[type="date"]::-webkit-calendar-picker-indicator {
|
|
19
|
+
display: none;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
chui_date_input input[type=date]::-webkit-datetime-edit-text {
|
|
22
|
+
chui_date_input input[type="date"]::-webkit-datetime-edit-text {
|
|
23
23
|
padding: 0;
|
|
24
|
-
width: 100
|
|
24
|
+
width: 100%;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
date_select_dropdown {
|
|
@@ -33,7 +33,7 @@ date_select_dropdown {
|
|
|
33
33
|
backdrop-filter: var(--global_blur);
|
|
34
34
|
-webkit-backdrop-filter: var(--global_blur);
|
|
35
35
|
border: 1px solid var(--border_color);
|
|
36
|
-
border-radius: var(--
|
|
36
|
+
border-radius: var(--radius_sm);
|
|
37
37
|
position: absolute;
|
|
38
38
|
top: -2px;
|
|
39
39
|
inset-inline-start: -2px;
|
|
@@ -111,7 +111,7 @@ date_year {
|
|
|
111
111
|
cursor: pointer;
|
|
112
112
|
text-align: center;
|
|
113
113
|
padding: 7px 4px;
|
|
114
|
-
border-radius: var(--
|
|
114
|
+
border-radius: var(--radius_sm);
|
|
115
115
|
color: var(--text_color);
|
|
116
116
|
user-select: none;
|
|
117
117
|
}
|
|
@@ -135,9 +135,9 @@ date_day {
|
|
|
135
135
|
cursor: pointer;
|
|
136
136
|
display: block;
|
|
137
137
|
width: 20px;
|
|
138
|
-
border-radius: var(--
|
|
138
|
+
border-radius: var(--radius_sm);
|
|
139
139
|
padding: var(--control_padding);
|
|
140
|
-
text-align: center
|
|
140
|
+
text-align: center;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
.date_day:hover {
|
|
@@ -154,12 +154,13 @@ date_dropdown_open {
|
|
|
154
154
|
cursor: pointer;
|
|
155
155
|
box-sizing: border-box;
|
|
156
156
|
height: 100%;
|
|
157
|
-
padding-block: 0 0;
|
|
157
|
+
padding-block: 0 0;
|
|
158
|
+
padding-inline: 0 10px;
|
|
158
159
|
margin: 0;
|
|
159
160
|
display: inline-flex;
|
|
160
161
|
justify-content: center;
|
|
161
162
|
align-items: center;
|
|
162
|
-
color: var(--badge_cancel_text)
|
|
163
|
+
color: var(--badge_cancel_text);
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
date_main_block {
|
|
@@ -169,7 +170,7 @@ date_main_block {
|
|
|
169
170
|
box-sizing: border-box;
|
|
170
171
|
width: max-content;
|
|
171
172
|
height: var(--control_height);
|
|
172
|
-
border-radius: var(--
|
|
173
|
+
border-radius: var(--radius_sm);
|
|
173
174
|
font-size: var(--font_default_size);
|
|
174
175
|
color: var(--text_color);
|
|
175
176
|
position: relative;
|
|
@@ -194,10 +195,10 @@ date_main_block {
|
|
|
194
195
|
.date_input_label {
|
|
195
196
|
height: max-content;
|
|
196
197
|
width: max-content;
|
|
197
|
-
margin: 0 0 var(--
|
|
198
|
+
margin: 0 0 var(--block_margin);
|
|
198
199
|
font-size: var(--font_labels_size);
|
|
199
|
-
font-weight:500;
|
|
200
|
-
color: var(--text_color)
|
|
200
|
+
font-weight: 500;
|
|
201
|
+
color: var(--text_color);
|
|
201
202
|
}
|
|
202
203
|
|
|
203
204
|
/* DISABLED STYLES */
|
|
@@ -212,9 +213,9 @@ date_main_block {
|
|
|
212
213
|
color: var(--text_color_disabled);
|
|
213
214
|
height: max-content;
|
|
214
215
|
width: max-content;
|
|
215
|
-
margin: 0 0 var(--
|
|
216
|
+
margin: 0 0 var(--block_margin);
|
|
216
217
|
font-size: var(--font_labels_size);
|
|
217
|
-
font-weight:500
|
|
218
|
+
font-weight: 500;
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
.date_input_disabled {
|
|
@@ -230,4 +231,4 @@ date_main_block {
|
|
|
230
231
|
background: transparent;
|
|
231
232
|
border: none;
|
|
232
233
|
font-size: var(--font_default_size);
|
|
233
|
-
}
|
|
234
|
+
}
|