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.
Files changed (292) hide show
  1. package/CHANGELOG.md +597 -0
  2. package/README.md +43 -644
  3. package/framework/appLayout/default/chui_app_layout.js +602 -496
  4. package/framework/appLayout/default/global_style.css +288 -97
  5. package/framework/appLayout/default/main_theme_style.css +188 -101
  6. package/framework/components/chui_accordion/accordion.js +38 -35
  7. package/framework/components/chui_accordion/styles.css +13 -12
  8. package/framework/components/chui_action_sheet/action_sheet.js +93 -64
  9. package/framework/components/chui_action_sheet/styles.css +12 -5
  10. package/framework/components/chui_actions_bar/actions_bar.js +338 -0
  11. package/framework/components/chui_actions_bar/styles.css +139 -0
  12. package/framework/components/chui_affix/affix.js +16 -11
  13. package/framework/components/chui_affix/styles.css +5 -0
  14. package/framework/components/chui_alert/alert.js +34 -19
  15. package/framework/components/chui_alert/styles.css +7 -0
  16. package/framework/components/chui_avatar/avatar.js +36 -35
  17. package/framework/components/chui_avatar/styles.css +1 -1
  18. package/framework/components/chui_avatar_group/avatar_group.js +25 -23
  19. package/framework/components/chui_avatar_group/styles.css +1 -1
  20. package/framework/components/chui_backtop/backtop.js +60 -21
  21. package/framework/components/chui_backtop/styles.css +21 -0
  22. package/framework/components/chui_badge/badge.js +30 -28
  23. package/framework/components/chui_badge/styles.css +6 -6
  24. package/framework/components/chui_banner/banner.js +222 -0
  25. package/framework/components/chui_banner/styles.css +170 -0
  26. package/framework/components/chui_breadcrumb/breadcrumb.js +15 -13
  27. package/framework/components/chui_breadcrumb/styles.css +1 -1
  28. package/framework/components/chui_button/button.js +52 -36
  29. package/framework/components/chui_button/styles.css +7 -7
  30. package/framework/components/chui_calendar/calendar.js +18 -16
  31. package/framework/components/chui_card/card.js +52 -32
  32. package/framework/components/chui_card_scroll/card_scroll.js +169 -0
  33. package/framework/components/chui_card_scroll/styles.css +86 -0
  34. package/framework/components/chui_chat/chat.js +140 -79
  35. package/framework/components/chui_chat/styles.css +18 -7
  36. package/framework/components/chui_clipboard_history/clipboard_history.js +53 -39
  37. package/framework/components/chui_clipboard_history/styles.css +13 -9
  38. package/framework/components/chui_code/code.js +10 -10
  39. package/framework/components/chui_code/styles.css +4 -4
  40. package/framework/components/chui_code_editor/code_editor.js +73 -57
  41. package/framework/components/chui_code_editor/styles.css +6 -5
  42. package/framework/components/chui_command_palette/command_palette.js +87 -64
  43. package/framework/components/chui_command_palette/styles.css +5 -5
  44. package/framework/components/chui_console/console.js +13 -13
  45. package/framework/components/chui_console/styles.css +6 -3
  46. package/framework/components/chui_content_block/content_block.js +35 -21
  47. package/framework/components/chui_content_block/styles.css +2 -2
  48. package/framework/components/chui_context_menu/context_menu.js +171 -58
  49. package/framework/components/chui_context_menu/styles.css +82 -8
  50. package/framework/components/chui_custom_element/custom_element.js +25 -18
  51. package/framework/components/chui_data_grid/data_grid.js +633 -471
  52. package/framework/components/chui_data_grid/styles.css +24 -22
  53. package/framework/components/chui_descriptions/descriptions.js +34 -17
  54. package/framework/components/chui_descriptions/styles.css +1 -1
  55. package/framework/components/chui_details/details.js +42 -36
  56. package/framework/components/chui_details/styles.css +12 -11
  57. package/framework/components/chui_diff_viewer/diff_viewer.js +172 -147
  58. package/framework/components/chui_diff_viewer/styles.css +10 -10
  59. package/framework/components/chui_divider/divider.js +19 -17
  60. package/framework/components/chui_divider/styles.css +2 -2
  61. package/framework/components/chui_drawer/drawer.js +63 -38
  62. package/framework/components/chui_drawer/styles.css +18 -4
  63. package/framework/components/chui_drop_zone/drop_zone.js +37 -27
  64. package/framework/components/chui_drop_zone/styles.css +10 -6
  65. package/framework/components/chui_empty_state/empty_state.js +20 -15
  66. package/framework/components/chui_fieldset/fieldset.js +40 -23
  67. package/framework/components/chui_fieldset/styles.css +6 -6
  68. package/framework/components/chui_file_explorer/file_explorer.js +260 -189
  69. package/framework/components/chui_file_explorer/styles.css +8 -7
  70. package/framework/components/chui_form/form.js +40 -28
  71. package/framework/components/chui_form/styles.css +1 -1
  72. package/framework/components/chui_gantt/gantt.js +102 -78
  73. package/framework/components/chui_gantt/styles.css +5 -5
  74. package/framework/components/chui_graphs/graphs.js +376 -239
  75. package/framework/components/chui_graphs/styles.css +27 -6
  76. package/framework/components/chui_hero/hero.js +98 -37
  77. package/framework/components/chui_hero/styles.css +176 -7
  78. package/framework/components/chui_html_block/html_block.js +8 -8
  79. package/framework/components/chui_html_block/styles.css +3 -3
  80. package/framework/components/chui_hx/hx.js +3 -3
  81. package/framework/components/chui_hx/styles.css +13 -6
  82. package/framework/components/chui_icons/icons.js +2115 -2115
  83. package/framework/components/chui_icons/styles.css +4 -3
  84. package/framework/components/chui_inputs/chui_check_box/check_box.js +31 -19
  85. package/framework/components/chui_inputs/chui_check_box/styles.css +30 -21
  86. package/framework/components/chui_inputs/chui_chips/chips.js +141 -70
  87. package/framework/components/chui_inputs/chui_chips/styles.css +32 -7
  88. package/framework/components/chui_inputs/chui_color_picker/color_picker.js +55 -38
  89. package/framework/components/chui_inputs/chui_color_picker/styles.css +7 -7
  90. package/framework/components/chui_inputs/chui_combo_box/combo_box.js +127 -109
  91. package/framework/components/chui_inputs/chui_combo_box/styles.css +23 -21
  92. package/framework/components/chui_inputs/chui_date/date.js +161 -127
  93. package/framework/components/chui_inputs/chui_date/styles.css +20 -19
  94. package/framework/components/chui_inputs/chui_date_range/date_range.js +61 -50
  95. package/framework/components/chui_inputs/chui_date_range/styles.css +3 -3
  96. package/framework/components/chui_inputs/chui_datetime/datetime.js +47 -39
  97. package/framework/components/chui_inputs/chui_datetime/styles.css +3 -3
  98. package/framework/components/chui_inputs/chui_email/email.js +48 -36
  99. package/framework/components/chui_inputs/chui_email/styles.css +11 -11
  100. package/framework/components/chui_inputs/chui_file/file.js +71 -44
  101. package/framework/components/chui_inputs/chui_file/styles.css +23 -19
  102. package/framework/components/chui_inputs/chui_hotkey/hotkey.js +101 -76
  103. package/framework/components/chui_inputs/chui_hotkey/styles.css +6 -6
  104. package/framework/components/chui_inputs/chui_masked/masked.js +83 -72
  105. package/framework/components/chui_inputs/chui_masked/styles.css +5 -5
  106. package/framework/components/chui_inputs/chui_mention/mention.js +87 -40
  107. package/framework/components/chui_inputs/chui_mention/styles.css +14 -8
  108. package/framework/components/chui_inputs/chui_multi_combo_box/multi_combo_box.js +242 -212
  109. package/framework/components/chui_inputs/chui_multi_combo_box/styles.css +23 -15
  110. package/framework/components/chui_inputs/chui_number/number.js +84 -70
  111. package/framework/components/chui_inputs/chui_number/styles.css +13 -13
  112. package/framework/components/chui_inputs/chui_otp/otp.js +71 -62
  113. package/framework/components/chui_inputs/chui_otp/styles.css +5 -5
  114. package/framework/components/chui_inputs/chui_password/password.js +72 -56
  115. package/framework/components/chui_inputs/chui_password/styles.css +15 -15
  116. package/framework/components/chui_inputs/chui_radio_button/radio_button.js +37 -25
  117. package/framework/components/chui_inputs/chui_radio_button/styles.css +22 -22
  118. package/framework/components/chui_inputs/chui_rating/rating.js +54 -50
  119. package/framework/components/chui_inputs/chui_rating/styles.css +3 -3
  120. package/framework/components/chui_inputs/chui_select_box/select_box.js +132 -108
  121. package/framework/components/chui_inputs/chui_select_box/styles.css +21 -21
  122. package/framework/components/chui_inputs/chui_slider/slider.js +41 -38
  123. package/framework/components/chui_inputs/chui_slider/styles.css +7 -5
  124. package/framework/components/chui_inputs/chui_text/styles.css +14 -14
  125. package/framework/components/chui_inputs/chui_text/text.js +69 -52
  126. package/framework/components/chui_inputs/chui_text_area/styles.css +14 -14
  127. package/framework/components/chui_inputs/chui_text_area/text_area.js +59 -36
  128. package/framework/components/chui_inputs/chui_time/styles.css +18 -20
  129. package/framework/components/chui_inputs/chui_time/time.js +71 -49
  130. package/framework/components/chui_inputs/chui_toggle/styles.css +13 -6
  131. package/framework/components/chui_inputs/chui_toggle/toggle.js +27 -27
  132. package/framework/components/chui_json_editor/json_editor.js +137 -127
  133. package/framework/components/chui_json_editor/styles.css +5 -5
  134. package/framework/components/chui_json_viewer/json_viewer.js +133 -114
  135. package/framework/components/chui_json_viewer/styles.css +9 -8
  136. package/framework/components/chui_kanban/kanban.js +78 -60
  137. package/framework/components/chui_kanban/styles.css +8 -4
  138. package/framework/components/chui_kbd/kbd.js +12 -10
  139. package/framework/components/chui_kbd/styles.css +1 -1
  140. package/framework/components/chui_label/label.js +31 -29
  141. package/framework/components/chui_label/styles.css +3 -3
  142. package/framework/components/chui_link/link.js +36 -29
  143. package/framework/components/chui_link/styles.css +11 -4
  144. package/framework/components/chui_list/list.js +42 -38
  145. package/framework/components/chui_list/styles.css +4 -3
  146. package/framework/components/chui_markdown_editor/markdown_editor.js +125 -109
  147. package/framework/components/chui_markdown_editor/styles.css +5 -5
  148. package/framework/components/chui_media/audio.js +457 -364
  149. package/framework/components/chui_media/audio_styles.css +74 -37
  150. package/framework/components/chui_media/image.js +99 -64
  151. package/framework/components/chui_media/image_compare.js +86 -55
  152. package/framework/components/chui_media/image_compare_styles.css +5 -5
  153. package/framework/components/chui_media/image_styles.css +4 -4
  154. package/framework/components/chui_media/video.js +264 -171
  155. package/framework/components/chui_media/video_styles.css +57 -24
  156. package/framework/components/chui_menu_bar/menu_bar.js +67 -65
  157. package/framework/components/chui_menu_bar/styles.css +14 -12
  158. package/framework/components/chui_message_bar/message_bar.js +551 -0
  159. package/framework/components/chui_message_bar/styles.css +248 -0
  160. package/framework/components/chui_modal/modal.js +81 -56
  161. package/framework/components/chui_modal/styles.css +3 -2
  162. package/framework/components/chui_notification/notification.js +107 -69
  163. package/framework/components/chui_notification/notification_download.js +28 -77
  164. package/framework/components/chui_notification/notification_download_card.js +115 -0
  165. package/framework/components/chui_notification/notification_download_progress.css +5 -4
  166. package/framework/components/chui_notification/notification_download_progress.js +73 -105
  167. package/framework/components/chui_notification/notification_update.js +44 -37
  168. package/framework/components/chui_notification/status_plate.css +3 -3
  169. package/framework/components/chui_notification/status_plate.js +2 -2
  170. package/framework/components/chui_notification/styles.css +6 -1
  171. package/framework/components/chui_notification/styles_download.css +2 -2
  172. package/framework/components/chui_notification/styles_update.css +3 -3
  173. package/framework/components/chui_org_chart/org_chart.js +101 -62
  174. package/framework/components/chui_org_chart/styles.css +2 -2
  175. package/framework/components/chui_pagination/pagination.js +65 -30
  176. package/framework/components/chui_pagination/styles.css +1 -1
  177. package/framework/components/chui_paragraph/paragraph.js +2 -2
  178. package/framework/components/chui_paragraph/styles.css +3 -3
  179. package/framework/components/chui_popover/popover.js +77 -50
  180. package/framework/components/chui_popover/styles.css +1 -1
  181. package/framework/components/chui_popups/popups.js +210 -181
  182. package/framework/components/chui_popups/styles.css +7 -7
  183. package/framework/components/chui_print_button/print_button.js +48 -33
  184. package/framework/components/chui_progress_bar/progress_bar.js +49 -19
  185. package/framework/components/chui_progress_bar/styles.css +6 -6
  186. package/framework/components/chui_progress_ring/progress_ring.js +32 -30
  187. package/framework/components/chui_progress_ring/styles.css +1 -1
  188. package/framework/components/chui_qrcode/qrcode.js +85 -41
  189. package/framework/components/chui_query_builder/query_builder.js +263 -170
  190. package/framework/components/chui_query_builder/styles.css +4 -4
  191. package/framework/components/chui_radio_group/radio_group.js +36 -26
  192. package/framework/components/chui_radio_group/styles.css +2 -2
  193. package/framework/components/chui_result/result.js +41 -31
  194. package/framework/components/chui_result/styles.css +3 -3
  195. package/framework/components/chui_scheduler/scheduler.js +126 -104
  196. package/framework/components/chui_scheduler/styles.css +11 -7
  197. package/framework/components/chui_screen_spinner/screen_spinner.js +167 -0
  198. package/framework/components/chui_screen_spinner/styles.css +49 -0
  199. package/framework/components/chui_segmented_control/segmented_control.js +90 -27
  200. package/framework/components/chui_segmented_control/styles.css +32 -6
  201. package/framework/components/chui_settings/settings.js +160 -87
  202. package/framework/components/chui_settings/styles.css +4 -4
  203. package/framework/components/chui_shortcut_help/shortcut_help.js +82 -61
  204. package/framework/components/chui_sidebar_nav/sidebar_nav.js +132 -53
  205. package/framework/components/chui_sidebar_nav/styles.css +9 -3
  206. package/framework/components/chui_skeleton/skeleton.js +29 -24
  207. package/framework/components/chui_slideshow/slideshow.js +122 -103
  208. package/framework/components/chui_slideshow/styles.css +22 -16
  209. package/framework/components/chui_spinner/spinner.js +17 -17
  210. package/framework/components/chui_spinner/styles.css +0 -1
  211. package/framework/components/chui_split_button/split_button.js +53 -30
  212. package/framework/components/chui_split_button/styles.css +22 -6
  213. package/framework/components/chui_splitter/splitter.js +46 -39
  214. package/framework/components/chui_splitter/styles.css +2 -2
  215. package/framework/components/chui_statistic/statistic.js +111 -84
  216. package/framework/components/chui_status_bar/status_bar.js +11 -9
  217. package/framework/components/chui_status_bar/styles.css +2 -2
  218. package/framework/components/chui_stepper/stepper.js +230 -54
  219. package/framework/components/chui_stepper/styles.css +79 -14
  220. package/framework/components/chui_sticky_bar/sticky_bar.js +53 -17
  221. package/framework/components/chui_sticky_bar/styles.css +11 -7
  222. package/framework/components/chui_tabs/chui_tabs.js +100 -46
  223. package/framework/components/chui_tabs/styles.css +43 -15
  224. package/framework/components/chui_text_editor/styles.css +24 -23
  225. package/framework/components/chui_text_editor/text_editor.js +103 -79
  226. package/framework/components/chui_text_editor/text_editor_panel.js +428 -367
  227. package/framework/components/chui_theme_toggle/theme_toggle.js +46 -25
  228. package/framework/components/chui_timeline/styles.css +3 -1
  229. package/framework/components/chui_timeline/timeline.js +14 -12
  230. package/framework/components/chui_toast_queue/styles.css +11 -11
  231. package/framework/components/chui_toast_queue/toast_queue.js +82 -73
  232. package/framework/components/chui_toolbar/styles.css +2 -2
  233. package/framework/components/chui_toolbar/toolbar.js +20 -13
  234. package/framework/components/chui_tooltip/styles.css +2 -2
  235. package/framework/components/chui_tooltip/tooltip.js +40 -27
  236. package/framework/components/chui_tour/styles.css +12 -7
  237. package/framework/components/chui_tour/tour.js +132 -98
  238. package/framework/components/chui_transfer/styles.css +8 -7
  239. package/framework/components/chui_transfer/transfer.js +143 -123
  240. package/framework/components/chui_tree_table/styles.css +4 -4
  241. package/framework/components/chui_tree_table/tree_table.js +88 -74
  242. package/framework/components/chui_tree_view/styles.css +14 -10
  243. package/framework/components/chui_tree_view/tree_view.js +298 -253
  244. package/framework/components/chui_user_bar/styles.css +145 -0
  245. package/framework/components/chui_user_bar/user_bar.js +402 -0
  246. package/framework/components/chui_user_list_bar/styles.css +173 -0
  247. package/framework/components/chui_user_list_bar/user_list_bar.js +485 -0
  248. package/framework/components/chui_watermark/watermark.js +41 -33
  249. package/framework/components/chui_webview/styles.css +2 -2
  250. package/framework/components/chui_webview/webview.js +64 -52
  251. package/framework/components/chui_write_bar/styles.css +172 -0
  252. package/framework/components/chui_write_bar/write_bar.js +320 -0
  253. package/framework/main_window.js +1234 -0
  254. package/framework/modules/chui_a11y/chui_a11y.js +153 -123
  255. package/framework/modules/chui_animations/animations.js +105 -43
  256. package/framework/modules/chui_animations/motion.js +120 -0
  257. package/framework/modules/chui_animations/styles.css +37 -4
  258. package/framework/modules/chui_bridge/preload.js +36 -25
  259. package/framework/modules/chui_functions.js +69 -63
  260. package/framework/modules/chui_highlight/chui_highlight.js +25 -22
  261. package/framework/modules/chui_highlight/styles.css +13 -10
  262. package/framework/modules/chui_i18n/chui_i18n.js +12 -10
  263. package/framework/modules/chui_i18n/locales/a11y.js +5 -5
  264. package/framework/modules/chui_i18n/locales/app_layout.js +5 -5
  265. package/framework/modules/chui_i18n/locales/calendar.js +3 -3
  266. package/framework/modules/chui_i18n/locales/common.js +3 -3
  267. package/framework/modules/chui_i18n/locales/data.js +36 -26
  268. package/framework/modules/chui_i18n/locales/editors.js +40 -13
  269. package/framework/modules/chui_i18n/locales/feedback.js +65 -3
  270. package/framework/modules/chui_i18n/locales/forms.js +8 -8
  271. package/framework/modules/chui_i18n/locales/graphics.js +8 -8
  272. package/framework/modules/chui_i18n/locales/media.js +4 -4
  273. package/framework/modules/chui_i18n/locales/navigation.js +12 -8
  274. package/framework/modules/chui_i18n/locales/validate.js +3 -3
  275. package/framework/modules/chui_json/chui_json.js +11 -11
  276. package/framework/modules/chui_layout/chui_layout.js +12 -10
  277. package/framework/modules/chui_logger/chui_logger.js +47 -28
  278. package/framework/modules/chui_page/page.js +39 -33
  279. package/framework/modules/chui_palette/palette.js +61 -0
  280. package/framework/modules/chui_qr/chui_qr.js +179 -88
  281. package/framework/modules/chui_scrollbar/chui_scrollbar.js +79 -68
  282. package/framework/modules/chui_scrollbar/styles.css +4 -2
  283. package/framework/modules/chui_services/chui_channels.js +27 -13
  284. package/framework/modules/chui_services/chui_services.js +47 -39
  285. package/framework/modules/chui_services/desktop.js +108 -101
  286. package/framework/modules/chui_sortable/chui_sortable.js +33 -28
  287. package/framework/modules/chui_validate/chui_validate.js +10 -7
  288. package/framework/tray_bar/chui_menu_items.js +136 -46
  289. package/index.d.ts +5046 -0
  290. package/index.js +199 -1254
  291. package/package.json +81 -68
  292. package/framework/components/telegram_bot/chui_telegram_bot.js +0 -184
@@ -1,10 +1,10 @@
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');
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
- #chui_date_input = document.createElement('chui_date_input');
17
- #date_main_block = document.createElement('date_main_block');
18
- #input = document.createElement('input');
19
- #label = document.createElement('label');
20
- #date_dropdown_open = document.createElement('date_dropdown_open');
21
- #date_dropdown_open_disabled = document.createElement('date_dropdown_open');
22
- #dropdown = document.createElement('date_select_dropdown');
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
- #window_click_event = (event) => {
25
- if (!this.#date_main_block.contains(event.target)) this.#closeDropdown();
24
+ #windowClickEvent = (event) => {
25
+ if (!this.#dateMainBlock.contains(event.target)) this.#closeDropdown();
26
26
  };
27
- #dropdown_id = require("randomstring").generate();
28
- #date_now = new Date();
29
- #date_month_list = document.createElement('date_month_list');
30
- #date_year_list = document.createElement('date_year_list');
31
- #date_calendar_title = document.createElement('date_calendar_title');
32
- #calendar_year = this.#date_now.getFullYear();
33
- #calendar_month = this.#date_now.getMonth();
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('../../../modules/chui_functions').setStyles(__dirname + "/styles.css", 'chUiJS_DateInput');
38
- this.#input.type = 'date';
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(this, options, this.#chui_date_input, undefined, () => this.#input.value, this.#date_main_block);
46
- this.#date_dropdown_open.innerHTML = new Icon(Icons.HARDWARE.KEYBOARD_ARROW_DOWN, undefined, "var(--blue_prime_background)").getHTML();
47
- this.#date_dropdown_open_disabled.innerHTML = new Icon(Icons.HARDWARE.KEYBOARD_ARROW_DOWN, undefined, "var(--text_color_disabled)").getHTML();
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('date_input_label')
66
+ this.#label.classList.add("date_input_label");
52
67
  this.#label.innerText = options.title;
53
- this.#label.setAttribute('for', this.#id);
54
- this.#chui_date_input.appendChild(this.#label);
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('id', this.#dropdown_id);
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.#dropdown_id);
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 (event.target instanceof Element &&
71
- (event.target === this.#date_calendar_title || event.target.closest("date_year") !== null)) return;
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.#date_month_list);
101
- this.#dropdown.appendChild(this.#date_year_list);
102
- this.#date_year_list.hidden = true;
103
- this.#buildYear(this.#calendar_year);
104
- this.#showMonth(this.#calendar_month);
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.#chui_date_input.addEventListener('click', (event) => {
124
+ this.#chuiDateInput.addEventListener("click", (event) => {
107
125
  if (!this.#input.disabled) {
108
- if (event.target.parentNode === this.#date_main_block) {
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('click', this.#window_click_event);
115
- this.#date_main_block.appendChild(this.#input);
116
- this.#date_main_block.appendChild(this.#date_dropdown_open);
117
- this.#date_main_block.appendChild(this.#dropdown);
118
- this.#chui_date_input.appendChild(this.#date_main_block);
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('date_calendar_header');
122
- const previous = document.createElement('date_calendar_nav');
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('click', (event) => {
145
+ previous.addEventListener("click", (event) => {
128
146
  event.stopPropagation();
129
147
  this.#goBack();
130
148
  });
131
149
  makeKeyboardButton(previous);
132
- const next = document.createElement('date_calendar_nav');
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('click', (event) => {
155
+ next.addEventListener("click", (event) => {
138
156
  event.stopPropagation();
139
157
  this.#goForward();
140
158
  });
141
159
  makeKeyboardButton(next);
142
160
  // Заголовок — кнопка: по нажатию открывается выбор года (см. #showYears)
143
- this.#date_calendar_title.id = this.#id + "_title";
144
- this.#date_calendar_title.setAttribute("title", I18n.t("date.selectYear"));
145
- this.#date_calendar_title.setAttribute("aria-label", I18n.t("date.selectYear"));
146
- this.#date_calendar_title.addEventListener("click", (event) => {
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.#date_calendar_title);
168
+ makeKeyboardButton(this.#dateCalendarTitle);
151
169
  header.appendChild(previous);
152
- header.appendChild(this.#date_calendar_title);
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.#date_month_list.hidden = true;
168
- this.#date_year_list.hidden = false;
169
- const current = this.#yearButton(this.#calendar_year);
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.#date_year_list.hidden = true;
176
- this.#date_month_list.hidden = false;
177
- this.#showMonth(this.#calendar_month);
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.#calendar_year / YEARS_PER_PAGE) * YEARS_PER_PAGE;
199
+ return Math.floor(this.#calendarYear / YEARS_PER_PAGE) * YEARS_PER_PAGE;
182
200
  }
183
201
 
184
202
  #yearButton(year) {
185
- return [...this.#date_year_list.children].find((item) => item.innerText === String(year)) || null;
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.#date_year_list.innerHTML = "";
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.#calendar_year) item.classList.add("date_year_current");
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.#date_year_list.appendChild(item);
221
+ this.#dateYearList.appendChild(item);
204
222
  }
205
- this.#date_calendar_title.innerText = `${start}—${start + YEARS_PER_PAGE - 1}`;
223
+ this.#dateCalendarTitle.innerText = `${start}—${start + YEARS_PER_PAGE - 1}`;
206
224
  }
207
225
 
208
226
  #selectYear(year) {
209
- this.#calendar_year = year;
227
+ this.#calendarYear = year;
210
228
  this.#buildYear(year);
211
229
  this.#showMonths();
212
- this.#date_calendar_title.focus();
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.#calendar_year += delta * YEARS_PER_PAGE;
245
+ this.#calendarYear += delta * YEARS_PER_PAGE;
228
246
  // Календарь перестраиваем сразу: выбранный год и список остаются согласованными
229
- this.#buildYear(this.#calendar_year);
247
+ this.#buildYear(this.#calendarYear);
230
248
  this.#buildYears();
231
249
  }
232
250
  #buildYear(year) {
233
- this.#date_month_list.innerHTML = '';
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 date_month_main = document.createElement('date_month_main');
237
- date_month_main.setAttribute('month-name', cal.getMonthName());
238
- date_month_main.setAttribute('month-index', String(cal.getMonth()));
239
- date_month_main.style.width = 'fit-content';
240
- for (let row of cal.getCalendar()) {
241
- const date_week = document.createElement('date_week');
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 (let cell of row) {
244
- const date_day = document.createElement('date_day');
261
+ for (const cell of row) {
262
+ const dateDay = document.createElement("date_day");
245
263
  if (cell !== undefined) {
246
- date_day.innerText = cell;
264
+ dateDay.innerText = cell;
247
265
  if (isDayNumber(cell)) {
248
- date_day.classList = 'date_day';
249
- date_day.setAttribute("tabindex", "-1");
250
- date_day.setAttribute("role", "button");
251
- date_day.addEventListener("click", () => {
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
- date_week.appendChild(date_day);
282
+ dateWeek.appendChild(dateDay);
265
283
  }
266
284
  if (index !== 7) {
267
- date_month_main.appendChild(date_week);
285
+ dateMonthMain.appendChild(dateWeek);
268
286
  }
269
287
  }
270
- this.#date_month_list.appendChild(date_month_main);
288
+ this.#dateMonthList.appendChild(dateMonthMain);
271
289
  }
272
290
  }
273
291
  // Открытие дропдауна: показ, направление и высота по свободному месту рядом с полем
274
292
  #openDropdown() {
275
- new Animation(this.#dropdown).fadeIn();
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.#date_main_block);
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('click', this.#window_click_event);
316
+ window.removeEventListener("click", this.#windowClickEvent);
299
317
  this.#closeDropdown();
300
318
  }
301
319
  // Дни текущего видимого месяца (по ним ходят стрелки)
302
320
  #visibleDays() {
303
- const month = this.#date_month_list.querySelector('date_month_main[month-index="' + this.#calendar_month + '"]');
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.#calendar_month = index;
309
- const months = this.#date_month_list.querySelectorAll('date_month_main');
310
- for (let month of months) {
311
- month.style.display = Number(month.getAttribute('month-index')) === index ? 'block' : 'none';
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.#date_calendar_title.innerText = new Date(this.#calendar_year, index)
314
- .toLocaleString(I18n.getLocale(), {month: 'long'}).toUpperCase() + ' ' + this.#calendar_year;
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.#calendar_month + delta;
318
- let year = this.#calendar_year;
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.#calendar_year) {
327
- this.#calendar_year = year;
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() { return this.#input.name; }
333
- getTitle() { return this.#label.innerText; }
334
- getValue() { return this.#input.value; }
335
- setValue(date = String()) { this.#input.value = date; }
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.#date_main_block.classList.add("date_main_block_disabled")
340
- this.#input.className = "date_input_disabled"
341
- this.#label.className = "date_input_label_disabled"
342
- this.#date_dropdown_open.remove();
343
- this.#date_main_block.appendChild(this.#date_dropdown_open_disabled);
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.#date_main_block.classList.remove("date_main_block_disabled")
346
- this.#input.className = "date_input"
347
- this.#label.className = "date_input_label"
348
- this.#date_dropdown_open_disabled.remove();
349
- this.#date_main_block.appendChild(this.#date_dropdown_open);
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() { return this.#chui_date_input; }
380
+ set() {
381
+ return this.#chuiDateInput;
382
+ }
353
383
  }
354
384
 
355
385
  const formatLocalDate = (date) =>
356
- date.getFullYear() + "-" + String(date.getMonth() + 1).padStart(2, "0") + "-" + String(date.getDate()).padStart(2, "0");
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
- --main_padding: var(--main_padding_sm);
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(--margin);
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(--border_radius);
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(--border_radius);
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(--border_radius);
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; padding-inline: 0 10px;
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(--border_radius);
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(--margin);
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(--margin);
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
+ }