hakumi_components 0.1.18.pre → 0.1.19.pre
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -2
- data/README.md +208 -381
- data/app/assets/javascripts/hakumi_components.js +40 -34
- data/app/assets/stylesheets/hakumi_components.css +1 -1
- data/app/components/hakumi_components/admin_panel/component.rb +19 -9
- data/app/components/hakumi_components/affix/component.rb +54 -30
- data/app/components/hakumi_components/alert/component.html.erb +2 -2
- data/app/components/hakumi_components/alert/component.rb +68 -18
- data/app/components/hakumi_components/anchor/component.rb +35 -27
- data/app/components/hakumi_components/anchor/link/component.html.erb +1 -1
- data/app/components/hakumi_components/anchor/link/component.rb +28 -9
- data/app/components/hakumi_components/autocomplete/component.html.erb +86 -66
- data/app/components/hakumi_components/autocomplete/component.rb +115 -89
- data/app/components/hakumi_components/avatar/component.rb +45 -12
- data/app/components/hakumi_components/badge/component.rb +99 -45
- data/app/components/hakumi_components/base_component.rb +290 -91
- data/app/components/hakumi_components/breadcrumb/component.rb +16 -5
- data/app/components/hakumi_components/breadcrumb/item/component.html.erb +5 -5
- data/app/components/hakumi_components/breadcrumb/item/component.rb +56 -8
- data/app/components/hakumi_components/breadcrumb/item/menu_entry.rb +71 -0
- data/app/components/hakumi_components/button/component.rb +62 -20
- data/app/components/hakumi_components/calendar/component.html.erb +19 -19
- data/app/components/hakumi_components/calendar/component.rb +225 -202
- data/app/components/hakumi_components/calendar/day_cell.rb +62 -0
- data/app/components/hakumi_components/calendar/display_model.rb +237 -0
- data/app/components/hakumi_components/calendar/event_entry.rb +54 -0
- data/app/components/hakumi_components/calendar/locale_pack.rb +28 -0
- data/app/components/hakumi_components/calendar/panel_entry.rb +48 -0
- data/app/components/hakumi_components/calendar/week_row.rb +28 -0
- data/app/components/hakumi_components/card/component.html.erb +2 -2
- data/app/components/hakumi_components/card/component.rb +76 -49
- data/app/components/hakumi_components/card/grid/component.html.erb +1 -1
- data/app/components/hakumi_components/card/grid/component.rb +23 -17
- data/app/components/hakumi_components/card/meta/component.html.erb +8 -8
- data/app/components/hakumi_components/card/meta/component.rb +42 -24
- data/app/components/hakumi_components/carousel/autoplay_config.rb +27 -0
- data/app/components/hakumi_components/carousel/component.rb +85 -67
- data/app/components/hakumi_components/carousel/dots_config.rb +36 -0
- data/app/components/hakumi_components/cascader/component.html.erb +54 -36
- data/app/components/hakumi_components/cascader/component.rb +111 -62
- data/app/components/hakumi_components/checkbox/component.html.erb +5 -5
- data/app/components/hakumi_components/checkbox/component.rb +40 -6
- data/app/components/hakumi_components/checkbox/group/component.html.erb +4 -4
- data/app/components/hakumi_components/checkbox/group/component.rb +40 -13
- data/app/components/hakumi_components/checkbox/group/option.rb +34 -0
- data/app/components/hakumi_components/collapse/component.rb +64 -48
- data/app/components/hakumi_components/collapse/panel/component.rb +64 -21
- data/app/components/hakumi_components/color_picker/component.html.erb +21 -22
- data/app/components/hakumi_components/color_picker/component.rb +159 -49
- data/app/components/hakumi_components/color_picker/preset_group.rb +27 -0
- data/app/components/hakumi_components/concerns/form_field.rb +169 -68
- data/app/components/hakumi_components/concerns/form_field_contract.rb +57 -0
- data/app/components/hakumi_components/concerns/form_field_interface.rb +16 -0
- data/app/components/hakumi_components/concerns/input_control.rb +111 -0
- data/app/components/hakumi_components/concerns/input_control_contract.rb +47 -0
- data/app/components/hakumi_components/concerns/input_control_interface.rb +34 -0
- data/app/components/hakumi_components/concerns/selection_control.rb +122 -0
- data/app/components/hakumi_components/concerns/selection_control_contract.rb +47 -0
- data/app/components/hakumi_components/concerns/selection_control_interface.rb +34 -0
- data/app/components/hakumi_components/container/component.rb +29 -14
- data/app/components/hakumi_components/date_picker/component.html.erb +1 -3
- data/app/components/hakumi_components/date_picker/component.rb +130 -16
- data/app/components/hakumi_components/date_picker/range_picker.rb +159 -28
- data/app/components/hakumi_components/date_picker/shared_rendering.rb +151 -61
- data/app/components/hakumi_components/descriptions/component.html.erb +6 -6
- data/app/components/hakumi_components/descriptions/component.rb +98 -61
- data/app/components/hakumi_components/descriptions/item/component.rb +32 -8
- data/app/components/hakumi_components/divider/component.rb +36 -16
- data/app/components/hakumi_components/drawer/component.html.erb +2 -2
- data/app/components/hakumi_components/drawer/component.rb +112 -29
- data/app/components/hakumi_components/dropdown/component.rb +32 -35
- data/app/components/hakumi_components/dropdown/divider/component.rb +4 -0
- data/app/components/hakumi_components/dropdown/item/component.rb +42 -16
- data/app/components/hakumi_components/empty/component.rb +66 -31
- data/app/components/hakumi_components/flex/component.rb +39 -21
- data/app/components/hakumi_components/float_button/back_top/component.rb +35 -28
- data/app/components/hakumi_components/float_button/component.rb +161 -75
- data/app/components/hakumi_components/float_button/group/component.rb +85 -98
- data/app/components/hakumi_components/float_button/group_cluster/component.rb +46 -54
- data/app/components/hakumi_components/float_button/group_spec.rb +259 -0
- data/app/components/hakumi_components/float_button/item_spec.rb +115 -0
- data/app/components/hakumi_components/float_button/position_config.rb +68 -0
- data/app/components/hakumi_components/form/item/component.rb +34 -27
- data/app/components/hakumi_components/grid/col/component.rb +88 -17
- data/app/components/hakumi_components/grid/row/component.rb +35 -17
- data/app/components/hakumi_components/icon/component.rb +49 -49
- data/app/components/hakumi_components/image/component.html.erb +7 -7
- data/app/components/hakumi_components/image/component.rb +103 -40
- data/app/components/hakumi_components/image/preview_group/component.html.erb +1 -1
- data/app/components/hakumi_components/image/preview_group/component.rb +41 -36
- data/app/components/hakumi_components/image/preview_group/item.rb +48 -0
- data/app/components/hakumi_components/input/component.html.erb +1 -1
- data/app/components/hakumi_components/input/component.rb +142 -66
- data/app/components/hakumi_components/input/password/component.rb +30 -41
- data/app/components/hakumi_components/input/text_area/component.html.erb +2 -2
- data/app/components/hakumi_components/input/text_area/component.rb +89 -42
- data/app/components/hakumi_components/input_number/component.html.erb +5 -5
- data/app/components/hakumi_components/input_number/component.rb +137 -55
- data/app/components/hakumi_components/layout/component.html.erb +1 -1
- data/app/components/hakumi_components/layout/component.rb +23 -16
- data/app/components/hakumi_components/layout/content/component.html.erb +1 -1
- data/app/components/hakumi_components/layout/content/component.rb +24 -14
- data/app/components/hakumi_components/layout/footer/component.html.erb +1 -1
- data/app/components/hakumi_components/layout/footer/component.rb +24 -14
- data/app/components/hakumi_components/layout/header/component.html.erb +1 -1
- data/app/components/hakumi_components/layout/header/component.rb +24 -14
- data/app/components/hakumi_components/layout/sider/component.html.erb +1 -1
- data/app/components/hakumi_components/layout/sider/component.rb +83 -49
- data/app/components/hakumi_components/mentions/coercion.rb +46 -0
- data/app/components/hakumi_components/mentions/component.html.erb +6 -6
- data/app/components/hakumi_components/mentions/component.rb +131 -67
- data/app/components/hakumi_components/mentions/option.rb +30 -0
- data/app/components/hakumi_components/menu/component.rb +50 -59
- data/app/components/hakumi_components/menu/divider/component.rb +4 -0
- data/app/components/hakumi_components/menu/group/component.rb +16 -15
- data/app/components/hakumi_components/menu/item/component.rb +42 -19
- data/app/components/hakumi_components/menu/sub_menu/component.rb +49 -37
- data/app/components/hakumi_components/message/component.rb +62 -27
- data/app/components/hakumi_components/modal/component.html.erb +6 -6
- data/app/components/hakumi_components/modal/component.rb +93 -40
- data/app/components/hakumi_components/modal/confirm/component.html.erb +2 -2
- data/app/components/hakumi_components/modal/confirm/component.rb +49 -8
- data/app/components/hakumi_components/modal/error/component.rb +8 -39
- data/app/components/hakumi_components/modal/info/component.rb +6 -40
- data/app/components/hakumi_components/modal/status_component.rb +150 -0
- data/app/components/hakumi_components/modal/success/component.rb +6 -40
- data/app/components/hakumi_components/modal/warning/component.rb +14 -44
- data/app/components/hakumi_components/notification/component.rb +72 -38
- data/app/components/hakumi_components/pagination/component.html.erb +7 -11
- data/app/components/hakumi_components/pagination/component.rb +105 -72
- data/app/components/hakumi_components/pagination/page_item.rb +49 -0
- data/app/components/hakumi_components/popconfirm/component.rb +67 -19
- data/app/components/hakumi_components/popover/component.html.erb +2 -2
- data/app/components/hakumi_components/popover/component.rb +102 -38
- data/app/components/hakumi_components/progress/attribute_renderer.rb +354 -0
- data/app/components/hakumi_components/progress/circle_geometry.rb +76 -0
- data/app/components/hakumi_components/progress/component.html.erb +18 -17
- data/app/components/hakumi_components/progress/component.rb +230 -402
- data/app/components/hakumi_components/progress/controller_locals_parser.rb +130 -0
- data/app/components/hakumi_components/progress/info_tooltip_policy.rb +39 -0
- data/app/components/hakumi_components/progress/info_value.rb +75 -0
- data/app/components/hakumi_components/progress/status_state.rb +31 -0
- data/app/components/hakumi_components/progress/steps_renderer.rb +149 -0
- data/app/components/hakumi_components/progress/stroke_gradient_value.rb +90 -0
- data/app/components/hakumi_components/qr_code/component.rb +138 -72
- data/app/components/hakumi_components/radio/component.html.erb +3 -3
- data/app/components/hakumi_components/radio/component.rb +42 -9
- data/app/components/hakumi_components/radio/group/component.html.erb +9 -9
- data/app/components/hakumi_components/radio/group/component.rb +76 -27
- data/app/components/hakumi_components/radio/group/option.rb +43 -0
- data/app/components/hakumi_components/rate/component.html.erb +1 -1
- data/app/components/hakumi_components/rate/component.rb +55 -9
- data/app/components/hakumi_components/result/component.rb +87 -37
- data/app/components/hakumi_components/segmented/component.html.erb +1 -1
- data/app/components/hakumi_components/segmented/component.rb +81 -118
- data/app/components/hakumi_components/segmented/option.rb +191 -0
- data/app/components/hakumi_components/select/component.html.erb +19 -19
- data/app/components/hakumi_components/select/component.rb +88 -37
- data/app/components/hakumi_components/selection_control/coercion.rb +161 -0
- data/app/components/hakumi_components/selection_control/entry.rb +22 -0
- data/app/components/hakumi_components/selection_control/option.rb +42 -0
- data/app/components/hakumi_components/selection_control/option_group.rb +34 -0
- data/app/components/hakumi_components/selection_control/tree_node.rb +123 -0
- data/app/components/hakumi_components/skeleton/avatar/component.rb +36 -14
- data/app/components/hakumi_components/skeleton/avatar_config.rb +79 -0
- data/app/components/hakumi_components/skeleton/button/component.rb +32 -14
- data/app/components/hakumi_components/skeleton/component.rb +79 -93
- data/app/components/hakumi_components/skeleton/image/component.rb +46 -22
- data/app/components/hakumi_components/skeleton/input/component.rb +25 -10
- data/app/components/hakumi_components/skeleton/node/component.rb +23 -7
- data/app/components/hakumi_components/skeleton/paragraph_config.rb +92 -0
- data/app/components/hakumi_components/skeleton/title_config.rb +31 -0
- data/app/components/hakumi_components/slider/component.html.erb +11 -11
- data/app/components/hakumi_components/slider/component.rb +172 -53
- data/app/components/hakumi_components/slider/mark.rb +27 -0
- data/app/components/hakumi_components/space/compact/component.html.erb +1 -3
- data/app/components/hakumi_components/space/compact/component.rb +35 -19
- data/app/components/hakumi_components/space/component.html.erb +1 -1
- data/app/components/hakumi_components/space/component.rb +75 -39
- data/app/components/hakumi_components/spin/component.rb +92 -31
- data/app/components/hakumi_components/splitter/component.html.erb +9 -3
- data/app/components/hakumi_components/splitter/component.rb +55 -22
- data/app/components/hakumi_components/splitter/panel/component.html.erb +1 -3
- data/app/components/hakumi_components/splitter/panel/component.rb +64 -39
- data/app/components/hakumi_components/statistic/component.rb +143 -59
- data/app/components/hakumi_components/steps/component.rb +87 -55
- data/app/components/hakumi_components/steps/item/component.rb +59 -20
- data/app/components/hakumi_components/switch/component.html.erb +2 -3
- data/app/components/hakumi_components/switch/component.rb +62 -36
- data/app/components/hakumi_components/table/column/component.rb +80 -23
- data/app/components/hakumi_components/table/column_definition.rb +181 -0
- data/app/components/hakumi_components/table/column_group/component.rb +32 -21
- data/app/components/hakumi_components/table/component.html.erb +22 -31
- data/app/components/hakumi_components/table/component.rb +248 -509
- data/app/components/hakumi_components/table/concerns/attribute_helpers.rb +22 -0
- data/app/components/hakumi_components/table/concerns/cell_rendering.rb +277 -0
- data/app/components/hakumi_components/table/concerns/columns.rb +293 -91
- data/app/components/hakumi_components/table/concerns/editable.rb +36 -89
- data/app/components/hakumi_components/table/concerns/ellipsis.rb +31 -30
- data/app/components/hakumi_components/table/concerns/fixed_columns.rb +26 -19
- data/app/components/hakumi_components/table/concerns/surface_rendering.rb +365 -0
- data/app/components/hakumi_components/table/configs.rb +518 -0
- data/app/components/hakumi_components/table/definition_types.rb +40 -0
- data/app/components/hakumi_components/table/display_rows.rb +56 -0
- data/app/components/hakumi_components/table/ellipsis_config.rb +143 -0
- data/app/components/hakumi_components/table/fixed_offset.rb +36 -0
- data/app/components/hakumi_components/table/header_cell.rb +23 -0
- data/app/components/hakumi_components/table/row_record.rb +60 -0
- data/app/components/hakumi_components/table/row_render_state.rb +85 -0
- data/app/components/hakumi_components/tabs/component.html.erb +8 -8
- data/app/components/hakumi_components/tabs/component.rb +114 -64
- data/app/components/hakumi_components/tabs/indicator_config.rb +34 -0
- data/app/components/hakumi_components/tabs/item/component.rb +73 -13
- data/app/components/hakumi_components/tag/component.rb +142 -47
- data/app/components/hakumi_components/tag/group/component.rb +18 -6
- data/app/components/hakumi_components/time_picker/component.html.erb +8 -8
- data/app/components/hakumi_components/time_picker/component.rb +71 -17
- data/app/components/hakumi_components/timeline/component.html.erb +3 -2
- data/app/components/hakumi_components/timeline/component.rb +188 -55
- data/app/components/hakumi_components/timeline/item/component.html.erb +2 -2
- data/app/components/hakumi_components/timeline/item/component.rb +121 -60
- data/app/components/hakumi_components/tooltip/component.html.erb +1 -1
- data/app/components/hakumi_components/tooltip/component.rb +89 -64
- data/app/components/hakumi_components/tour/component.rb +74 -49
- data/app/components/hakumi_components/tour/step.rb +86 -0
- data/app/components/hakumi_components/transfer/coercion.rb +66 -0
- data/app/components/hakumi_components/transfer/component.html.erb +171 -140
- data/app/components/hakumi_components/transfer/component.rb +232 -82
- data/app/components/hakumi_components/transfer/item.rb +54 -0
- data/app/components/hakumi_components/transfer/operations.rb +31 -0
- data/app/components/hakumi_components/tree/component.rb +219 -400
- data/app/components/hakumi_components/tree/concerns/node_rendering.rb +365 -0
- data/app/components/hakumi_components/tree/node.rb +276 -0
- data/app/components/hakumi_components/tree_select/component.html.erb +23 -9
- data/app/components/hakumi_components/tree_select/component.rb +116 -107
- data/app/components/hakumi_components/typography/base_component.rb +69 -36
- data/app/components/hakumi_components/typography/link/component.rb +63 -6
- data/app/components/hakumi_components/typography/paragraph/component.rb +6 -0
- data/app/components/hakumi_components/typography/text/component.rb +4 -0
- data/app/components/hakumi_components/typography/title/component.rb +61 -6
- data/app/components/hakumi_components/upload/component.html.erb +106 -88
- data/app/components/hakumi_components/upload/component.rb +222 -48
- data/app/components/hakumi_components/upload/file_entry.rb +53 -0
- data/app/controllers/hakumi_components/components_controller.rb +2 -1
- data/app/form_builders/hakumi_components/form_builder/contracts.rb +55 -0
- data/app/form_builders/hakumi_components/form_builder/field_context.rb +43 -0
- data/app/form_builders/hakumi_components/form_builder/model_binding.rb +163 -0
- data/app/form_builders/hakumi_components/form_builder.rb +238 -317
- data/app/helpers/hakumi_components/form_helper.rb +27 -23
- data/app/javascript/hakumi_components/controllers/hakumi/admin_panel_controller.js +5 -7
- data/app/javascript/hakumi_components/controllers/hakumi/back_top_controller.js +1 -1
- data/app/javascript/hakumi_components/controllers/hakumi/button_controller.js +108 -2
- data/app/javascript/hakumi_components/controllers/hakumi/calendar_controller.js +183 -95
- data/app/javascript/hakumi_components/controllers/hakumi/color_picker_controller.js +23 -285
- data/app/javascript/hakumi_components/controllers/hakumi/date_picker_controller.js +274 -262
- data/app/javascript/hakumi_components/controllers/hakumi/float_button_group_controller.js +2 -2
- data/app/javascript/hakumi_components/controllers/hakumi/message_controller.js +4 -2
- data/app/javascript/hakumi_components/controllers/hakumi/modal_controller.js +119 -125
- data/app/javascript/hakumi_components/controllers/hakumi/table/editable.js +291 -0
- data/app/javascript/hakumi_components/controllers/hakumi/table_controller.js +166 -366
- data/app/javascript/hakumi_components/controllers/hakumi/tabs_controller.js +8 -2
- data/app/javascript/hakumi_components/controllers/hakumi/tag_controller.js +27 -25
- data/app/javascript/hakumi_components/controllers/hakumi/tag_group_controller.js +19 -18
- data/app/javascript/hakumi_components/controllers/hakumi/theme_controller.js +116 -117
- data/app/javascript/hakumi_components/controllers/hakumi/transfer_controller.js +17 -1
- data/app/javascript/hakumi_components/controllers/hakumi/tree_controller.js +363 -78
- data/app/javascript/hakumi_components/controllers/hakumi/typography_controller.js +3 -3
- data/app/javascript/hakumi_components/controllers/hakumi/upload_controller.js +320 -204
- data/app/javascript/hakumi_components/core/render_component.js +37 -11
- data/app/javascript/hakumi_components/utils/color_helper.js +262 -0
- data/app/javascript/stylesheets/_base.scss +9 -0
- data/app/javascript/stylesheets/_hakumi_components.scss +1 -0
- data/app/javascript/stylesheets/components/_breadcrumb.scss +2 -2
- data/app/javascript/stylesheets/components/_calendar.scss +13 -13
- data/app/javascript/stylesheets/components/_cascader.scss +5 -5
- data/app/javascript/stylesheets/components/_checkbox.scss +9 -11
- data/app/javascript/stylesheets/components/_color_picker.scss +11 -11
- data/app/javascript/stylesheets/components/_date_picker.scss +4 -4
- data/app/javascript/stylesheets/components/_descriptions.scss +2 -2
- data/app/javascript/stylesheets/components/_drawer.scss +3 -3
- data/app/javascript/stylesheets/components/_dropdown.scss +2 -2
- data/app/javascript/stylesheets/components/_flex.scss +1 -1
- data/app/javascript/stylesheets/components/_float_button.scss +5 -5
- data/app/javascript/stylesheets/components/_form_item.scss +92 -0
- data/app/javascript/stylesheets/components/_image.scss +15 -15
- data/app/javascript/stylesheets/components/_input.scss +23 -113
- data/app/javascript/stylesheets/components/_layout.scss +27 -26
- data/app/javascript/stylesheets/components/_menu.scss +15 -15
- data/app/javascript/stylesheets/components/_modal.scss +13 -13
- data/app/javascript/stylesheets/components/_notification.scss +3 -3
- data/app/javascript/stylesheets/components/_popover.scss +1 -1
- data/app/javascript/stylesheets/components/_segmented.scss +3 -3
- data/app/javascript/stylesheets/components/_select.scss +6 -6
- data/app/javascript/stylesheets/components/_slider.scss +1 -1
- data/app/javascript/stylesheets/components/_spin.scss +2 -2
- data/app/javascript/stylesheets/components/_steps.scss +10 -10
- data/app/javascript/stylesheets/components/_switch.scss +11 -10
- data/app/javascript/stylesheets/components/_table.scss +6 -6
- data/app/javascript/stylesheets/components/_tag.scss +2 -2
- data/app/javascript/stylesheets/components/_tooltip.scss +4 -4
- data/app/javascript/stylesheets/components/_tree_select.scss +3 -3
- data/app/javascript/stylesheets/components/_typography.scss +3 -3
- data/app/javascript/stylesheets/components/_upload.scss +4 -4
- data/app/services/hakumi_components/component_handler.rb +95 -24
- data/app/services/hakumi_components/icon/loader.rb +84 -67
- data/app/services/hakumi_components/illustrations/loader.rb +35 -27
- data/app/views/hakumi/_alert.html.erb +4 -1
- data/app/views/hakumi/_drawer.html.erb +1 -1
- data/app/views/hakumi/_statistic.html.erb +11 -11
- data/lib/generators/hakumi_components/install_generator.rb +14 -1
- data/lib/hakumi_components/documentation/models.rb +290 -0
- data/lib/hakumi_components/documentation/node.rb +73 -0
- data/lib/hakumi_components/documentation.rb +139 -62
- data/lib/hakumi_components/engine.rb +17 -11
- data/lib/hakumi_components/file_size_checker.rb +215 -0
- data/lib/hakumi_components/locales/en.yml +115 -0
- data/lib/hakumi_components/rails/attribute_introspection.rb +39 -107
- data/lib/hakumi_components/rails/model_reflection.rb +154 -0
- data/lib/hakumi_components/rails/validation_introspection.rb +25 -73
- data/lib/hakumi_components/rails/validation_mapper.rb +148 -201
- data/lib/hakumi_components/rails.rb +2 -0
- data/lib/hakumi_components/stylesheet_ownership_checker.rb +191 -0
- data/lib/hakumi_components/types/form_field.rb +24 -0
- data/lib/hakumi_components/types/html.rb +28 -0
- data/lib/hakumi_components/types/rendering.rb +10 -0
- data/lib/hakumi_components/types/stimulus.rb +19 -0
- data/lib/hakumi_components/types/validation.rb +22 -0
- data/lib/hakumi_components/types.rb +13 -0
- data/lib/hakumi_components/version.rb +2 -1
- data/lib/hakumi_components.rb +26 -6
- data/lib/tasks/coverage.rake +1 -0
- metadata +100 -136
- data/sig/action_view/tag_builder.rbs +0 -24
- data/sig/active_support/concern_patch.rbs +0 -7
- data/sig/generators/hakumi_components/install_generator.rbs +0 -11
- data/sig/hakumi_components/admin_panel/component.rbs +0 -28
- data/sig/hakumi_components/affix/component.rbs +0 -44
- data/sig/hakumi_components/alert/component.rbs +0 -64
- data/sig/hakumi_components/anchor/component.rbs +0 -45
- data/sig/hakumi_components/anchor/link/component.rbs +0 -31
- data/sig/hakumi_components/autocomplete/component.rbs +0 -68
- data/sig/hakumi_components/avatar/component.rbs +0 -44
- data/sig/hakumi_components/badge/component.rbs +0 -41
- data/sig/hakumi_components/base_component.rbs +0 -82
- data/sig/hakumi_components/breadcrumb/component.rbs +0 -21
- data/sig/hakumi_components/breadcrumb/item/component.rbs +0 -36
- data/sig/hakumi_components/button/component.rbs +0 -56
- data/sig/hakumi_components/calendar/component.rbs +0 -41
- data/sig/hakumi_components/card/component.rbs +0 -50
- data/sig/hakumi_components/card/grid/component.rbs +0 -21
- data/sig/hakumi_components/card/meta/component.rbs +0 -25
- data/sig/hakumi_components/carousel/component.rbs +0 -88
- data/sig/hakumi_components/cascader/component.rbs +0 -52
- data/sig/hakumi_components/checkbox/component.rbs +0 -46
- data/sig/hakumi_components/checkbox/group/component.rbs +0 -34
- data/sig/hakumi_components/collapse/component.rbs +0 -57
- data/sig/hakumi_components/collapse/panel/component.rbs +0 -47
- data/sig/hakumi_components/color_picker/component.rbs +0 -80
- data/sig/hakumi_components/concerns/form_field.rbs +0 -89
- data/sig/hakumi_components/container/component.rbs +0 -37
- data/sig/hakumi_components/date_picker/component.rbs +0 -72
- data/sig/hakumi_components/date_picker/range_picker.rbs +0 -68
- data/sig/hakumi_components/date_picker/shared_rendering.rbs +0 -41
- data/sig/hakumi_components/descriptions/component.rbs +0 -59
- data/sig/hakumi_components/descriptions/item/component.rbs +0 -31
- data/sig/hakumi_components/divider/component.rbs +0 -39
- data/sig/hakumi_components/drawer/component.rbs +0 -66
- data/sig/hakumi_components/dropdown/component.rbs +0 -45
- data/sig/hakumi_components/dropdown/divider/component.rbs +0 -11
- data/sig/hakumi_components/dropdown/item/component.rbs +0 -45
- data/sig/hakumi_components/empty/component.rbs +0 -40
- data/sig/hakumi_components/flex/component.rbs +0 -47
- data/sig/hakumi_components/float_button/back_top/component.rbs +0 -45
- data/sig/hakumi_components/float_button/component.rbs +0 -80
- data/sig/hakumi_components/float_button/group/component.rbs +0 -95
- data/sig/hakumi_components/float_button/group_cluster/component.rbs +0 -60
- data/sig/hakumi_components/form/item/component.rbs +0 -39
- data/sig/hakumi_components/form_builder.rbs +0 -37
- data/sig/hakumi_components/grid/col/component.rbs +0 -50
- data/sig/hakumi_components/grid/row/component.rbs +0 -46
- data/sig/hakumi_components/icon/component.rbs +0 -56
- data/sig/hakumi_components/image/component.rbs +0 -56
- data/sig/hakumi_components/image/preview_group/component.rbs +0 -28
- data/sig/hakumi_components/input/component.rbs +0 -71
- data/sig/hakumi_components/input/password/component.rbs +0 -27
- data/sig/hakumi_components/input/text_area/component.rbs +0 -42
- data/sig/hakumi_components/input_number/component.rbs +0 -85
- data/sig/hakumi_components/layout/component.rbs +0 -21
- data/sig/hakumi_components/layout/content/component.rbs +0 -19
- data/sig/hakumi_components/layout/footer/component.rbs +0 -19
- data/sig/hakumi_components/layout/header/component.rbs +0 -19
- data/sig/hakumi_components/layout/sider/component.rbs +0 -19
- data/sig/hakumi_components/mentions/component.rbs +0 -75
- data/sig/hakumi_components/menu/component.rbs +0 -52
- data/sig/hakumi_components/menu/divider/component.rbs +0 -11
- data/sig/hakumi_components/menu/group/component.rbs +0 -20
- data/sig/hakumi_components/menu/item/component.rbs +0 -42
- data/sig/hakumi_components/menu/sub_menu/component.rbs +0 -37
- data/sig/hakumi_components/message/component.rbs +0 -50
- data/sig/hakumi_components/modal/component.rbs +0 -76
- data/sig/hakumi_components/modal/confirm/component.rbs +0 -32
- data/sig/hakumi_components/modal/error/component.rbs +0 -27
- data/sig/hakumi_components/modal/info/component.rbs +0 -27
- data/sig/hakumi_components/modal/success/component.rbs +0 -27
- data/sig/hakumi_components/modal/warning/component.rbs +0 -27
- data/sig/hakumi_components/notification/component.rbs +0 -64
- data/sig/hakumi_components/pagination/component.rbs +0 -113
- data/sig/hakumi_components/popconfirm/component.rbs +0 -52
- data/sig/hakumi_components/popover/component.rbs +0 -66
- data/sig/hakumi_components/progress/component.rbs +0 -201
- data/sig/hakumi_components/qr_code/component.rbs +0 -111
- data/sig/hakumi_components/radio/component.rbs +0 -55
- data/sig/hakumi_components/radio/group/component.rbs +0 -71
- data/sig/hakumi_components/rails/attribute_introspection.rbs +0 -16
- data/sig/hakumi_components/rails/validation_introspection.rbs +0 -18
- data/sig/hakumi_components/rails/validation_mapper.rbs +0 -53
- data/sig/hakumi_components/rails.rbs +0 -6
- data/sig/hakumi_components/rate/component.rbs +0 -56
- data/sig/hakumi_components/result/component.rbs +0 -65
- data/sig/hakumi_components/segmented/component.rbs +0 -72
- data/sig/hakumi_components/select/component.rbs +0 -73
- data/sig/hakumi_components/skeleton/avatar/component.rbs +0 -23
- data/sig/hakumi_components/skeleton/button/component.rbs +0 -24
- data/sig/hakumi_components/skeleton/component.rbs +0 -76
- data/sig/hakumi_components/skeleton/image/component.rbs +0 -22
- data/sig/hakumi_components/skeleton/input/component.rbs +0 -23
- data/sig/hakumi_components/skeleton/node/component.rbs +0 -21
- data/sig/hakumi_components/slider/component.rbs +0 -85
- data/sig/hakumi_components/space/compact/component.rbs +0 -21
- data/sig/hakumi_components/space/component.rbs +0 -47
- data/sig/hakumi_components/spin/component.rbs +0 -77
- data/sig/hakumi_components/splitter/component.rbs +0 -27
- data/sig/hakumi_components/splitter/panel/component.rbs +0 -36
- data/sig/hakumi_components/statistic/component.rbs +0 -97
- data/sig/hakumi_components/steps/component.rbs +0 -82
- data/sig/hakumi_components/steps/item/component.rbs +0 -29
- data/sig/hakumi_components/switch/component.rbs +0 -52
- data/sig/hakumi_components/table/column/component.rbs +0 -57
- data/sig/hakumi_components/table/column_group/component.rbs +0 -20
- data/sig/hakumi_components/table/component.rbs +0 -279
- data/sig/hakumi_components/table/concerns/columns.rbs +0 -95
- data/sig/hakumi_components/table/concerns/editable.rbs +0 -40
- data/sig/hakumi_components/table/concerns/ellipsis.rbs +0 -27
- data/sig/hakumi_components/table/concerns/fixed_columns.rbs +0 -33
- data/sig/hakumi_components/tabs/component.rbs +0 -66
- data/sig/hakumi_components/tabs/item/component.rbs +0 -29
- data/sig/hakumi_components/tag/component.rbs +0 -86
- data/sig/hakumi_components/tag/group/component.rbs +0 -24
- data/sig/hakumi_components/time_picker/component.rbs +0 -72
- data/sig/hakumi_components/timeline/component.rbs +0 -61
- data/sig/hakumi_components/timeline/item/component.rbs +0 -70
- data/sig/hakumi_components/tooltip/component.rbs +0 -73
- data/sig/hakumi_components/tour/component.rbs +0 -84
- data/sig/hakumi_components/transfer/component.rbs +0 -75
- data/sig/hakumi_components/tree/component.rbs +0 -126
- data/sig/hakumi_components/tree_select/component.rbs +0 -122
- data/sig/hakumi_components/typography/base_component.rbs +0 -57
- data/sig/hakumi_components/typography/link/component.rbs +0 -28
- data/sig/hakumi_components/typography/paragraph/component.rbs +0 -13
- data/sig/hakumi_components/typography/text/component.rbs +0 -10
- data/sig/hakumi_components/typography/title/component.rbs +0 -28
- data/sig/hakumi_components/upload/component.rbs +0 -78
- data/sig/hakumi_components.rbs +0 -96
- data/sig/rails/active_model/validations/comparison_validator.rbs +0 -6
- data/sig/rails.rbs +0 -18
- data/sig/view_component/base.rbs +0 -28
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Grid
|
|
5
|
-
module Col
|
|
6
|
-
class Component < HakumiComponents::BaseComponent
|
|
7
|
-
type col_span = Integer
|
|
8
|
-
type col_flex = Numeric | String
|
|
9
|
-
type col_breakpoint = Numeric | Hash[Symbol, untyped]
|
|
10
|
-
|
|
11
|
-
@span: col_span?
|
|
12
|
-
@offset: Integer?
|
|
13
|
-
@order: Integer?
|
|
14
|
-
@pull: Integer?
|
|
15
|
-
@push: Integer?
|
|
16
|
-
@flex: col_flex?
|
|
17
|
-
@breakpoints: Hash[Symbol, col_breakpoint?]
|
|
18
|
-
@component: Symbol
|
|
19
|
-
@html_options: hakumi_html_options
|
|
20
|
-
|
|
21
|
-
def initialize: (
|
|
22
|
-
?span: col_span?,
|
|
23
|
-
?offset: Integer?,
|
|
24
|
-
?order: Integer?,
|
|
25
|
-
?pull: Integer?,
|
|
26
|
-
?push: Integer?,
|
|
27
|
-
?flex: col_flex?,
|
|
28
|
-
?xs: col_breakpoint?,
|
|
29
|
-
?sm: col_breakpoint?,
|
|
30
|
-
?md: col_breakpoint?,
|
|
31
|
-
?lg: col_breakpoint?,
|
|
32
|
-
?xl: col_breakpoint?,
|
|
33
|
-
?xxl: col_breakpoint?,
|
|
34
|
-
?component: Symbol,
|
|
35
|
-
**hakumi_html_options html_options
|
|
36
|
-
) -> void
|
|
37
|
-
|
|
38
|
-
def call: () -> String
|
|
39
|
-
|
|
40
|
-
private
|
|
41
|
-
|
|
42
|
-
def wrapper_classes: () -> String
|
|
43
|
-
|
|
44
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
45
|
-
|
|
46
|
-
def flex_style: () -> String?
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Grid
|
|
5
|
-
module Row
|
|
6
|
-
class Component < HakumiComponents::BaseComponent
|
|
7
|
-
type row_justify = :start | :end | :center | :"space-around" | :"space-between"
|
|
8
|
-
type row_align = :top | :middle | :bottom
|
|
9
|
-
type row_gutter = Numeric | Array[Numeric]
|
|
10
|
-
|
|
11
|
-
JUSTIFY_OPTIONS: Array[row_justify]
|
|
12
|
-
ALIGN_OPTIONS: Array[row_align]
|
|
13
|
-
|
|
14
|
-
@gutter: Array[Numeric]
|
|
15
|
-
@justify: row_justify
|
|
16
|
-
@align: row_align
|
|
17
|
-
@wrap: bool
|
|
18
|
-
@component: Symbol
|
|
19
|
-
@html_options: hakumi_html_options
|
|
20
|
-
|
|
21
|
-
def initialize: (
|
|
22
|
-
?gutter: row_gutter?,
|
|
23
|
-
?justify: row_justify,
|
|
24
|
-
?align: row_align,
|
|
25
|
-
?wrap: bool,
|
|
26
|
-
?component: Symbol,
|
|
27
|
-
**hakumi_html_options html_options
|
|
28
|
-
) -> void
|
|
29
|
-
|
|
30
|
-
def call: () -> String
|
|
31
|
-
|
|
32
|
-
private
|
|
33
|
-
|
|
34
|
-
def validate_props!: () -> void
|
|
35
|
-
|
|
36
|
-
def normalize_gutter: (row_gutter? gutter) -> Array[Numeric]
|
|
37
|
-
|
|
38
|
-
def wrapper_classes: () -> String
|
|
39
|
-
|
|
40
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
41
|
-
|
|
42
|
-
def gutter_styles: () -> String
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Icon
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
type icon_theme = :outlined | :filled | :two_tone
|
|
7
|
-
type icon_rotation = 0 | 90 | 180 | 270
|
|
8
|
-
|
|
9
|
-
THEMES: Array[icon_theme]
|
|
10
|
-
DEFAULT_SIZE: Integer
|
|
11
|
-
DEFAULT_COLOR: String
|
|
12
|
-
|
|
13
|
-
@name: (String | Symbol)?
|
|
14
|
-
@theme: icon_theme
|
|
15
|
-
@size: Integer?
|
|
16
|
-
@svg: String?
|
|
17
|
-
@color: String
|
|
18
|
-
@spin: bool
|
|
19
|
-
@rotate: icon_rotation?
|
|
20
|
-
@fallback_to_outlined: bool
|
|
21
|
-
@html_options: hakumi_html_options
|
|
22
|
-
|
|
23
|
-
def initialize: (
|
|
24
|
-
?name: (String | Symbol)?,
|
|
25
|
-
?theme: icon_theme,
|
|
26
|
-
?size: Integer?,
|
|
27
|
-
?svg: String?,
|
|
28
|
-
?color: String?,
|
|
29
|
-
?spin: bool,
|
|
30
|
-
?rotate: icon_rotation?,
|
|
31
|
-
?fallback_to_outlined: bool,
|
|
32
|
-
**hakumi_html_options html_options
|
|
33
|
-
) -> void
|
|
34
|
-
|
|
35
|
-
private
|
|
36
|
-
|
|
37
|
-
def validate_props!: () -> void
|
|
38
|
-
|
|
39
|
-
def wrapper_classes: () -> String
|
|
40
|
-
|
|
41
|
-
def wrapper_styles: () -> String?
|
|
42
|
-
|
|
43
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
44
|
-
|
|
45
|
-
def svg_content: () -> String
|
|
46
|
-
|
|
47
|
-
def sanitize_svg: (String svg_string) -> String
|
|
48
|
-
|
|
49
|
-
def icon_svg: () -> String
|
|
50
|
-
|
|
51
|
-
def placeholder_icon_svg: () -> String
|
|
52
|
-
|
|
53
|
-
def fallback_enabled?: () -> bool
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Image
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
@src: String
|
|
7
|
-
@alt: String?
|
|
8
|
-
@width: (Integer | String)?
|
|
9
|
-
@height: (Integer | String)?
|
|
10
|
-
@fallback: String?
|
|
11
|
-
@placeholder: bool
|
|
12
|
-
@preview: bool
|
|
13
|
-
@preview_src: String?
|
|
14
|
-
@mask_closable: bool
|
|
15
|
-
@html_options: hakumi_html_options
|
|
16
|
-
|
|
17
|
-
attr_reader src: String
|
|
18
|
-
attr_reader alt: String?
|
|
19
|
-
attr_reader fallback: String?
|
|
20
|
-
attr_reader preview_src: String?
|
|
21
|
-
|
|
22
|
-
def initialize: (
|
|
23
|
-
src: String,
|
|
24
|
-
?alt: String?,
|
|
25
|
-
?width: (Integer | String)?,
|
|
26
|
-
?height: (Integer | String)?,
|
|
27
|
-
?fallback: String?,
|
|
28
|
-
?placeholder: bool,
|
|
29
|
-
?preview: bool,
|
|
30
|
-
?preview_src: String?,
|
|
31
|
-
?mask_closable: bool,
|
|
32
|
-
**hakumi_html_options html_options
|
|
33
|
-
) -> void
|
|
34
|
-
|
|
35
|
-
def preview_enabled?: () -> bool
|
|
36
|
-
|
|
37
|
-
def preview_image_src: () -> String
|
|
38
|
-
|
|
39
|
-
def placeholder?: () -> bool
|
|
40
|
-
|
|
41
|
-
private
|
|
42
|
-
|
|
43
|
-
def wrapper_classes: () -> String
|
|
44
|
-
|
|
45
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
46
|
-
|
|
47
|
-
def data_attributes: () -> hakumi_html_options
|
|
48
|
-
|
|
49
|
-
def img_attributes: () -> hakumi_html_options
|
|
50
|
-
|
|
51
|
-
def size_style: () -> String
|
|
52
|
-
|
|
53
|
-
def normalize_size: ((Integer | String) size) -> String
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Image
|
|
5
|
-
module PreviewGroup
|
|
6
|
-
class Component < HakumiComponents::BaseComponent
|
|
7
|
-
# items can be array of strings (URLs) or hashes with src/alt
|
|
8
|
-
@items: Array[String | Hash[Symbol, untyped]]?
|
|
9
|
-
@preview: bool
|
|
10
|
-
@html_options: hakumi_html_options
|
|
11
|
-
|
|
12
|
-
def initialize: (?items: Array[String | Hash[Symbol, untyped]]?, ?preview: bool, **hakumi_html_options html_options) -> void
|
|
13
|
-
|
|
14
|
-
attr_reader items: Array[String | Hash[Symbol, untyped]]?
|
|
15
|
-
|
|
16
|
-
def preview_enabled?: () -> bool
|
|
17
|
-
# Returns normalized array of hashes with :src and :alt keys
|
|
18
|
-
def preview_items: () -> Array[Hash[Symbol, String?]]
|
|
19
|
-
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
def wrapper_classes: () -> String
|
|
23
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
24
|
-
def data_attributes: () -> hakumi_html_options
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Input
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
include HakumiComponents::Concerns::FormField
|
|
7
|
-
|
|
8
|
-
type input_type = :text | :email | :url | :tel | :password | :search | :number
|
|
9
|
-
type numeric_or_string = Numeric | String
|
|
10
|
-
|
|
11
|
-
SIZES: Array[hakumi_size_standard]
|
|
12
|
-
|
|
13
|
-
@name: String
|
|
14
|
-
@label: String?
|
|
15
|
-
@caption: String?
|
|
16
|
-
@value: untyped
|
|
17
|
-
@placeholder: String?
|
|
18
|
-
@type: input_type
|
|
19
|
-
@size: hakumi_size_standard
|
|
20
|
-
@disabled: bool
|
|
21
|
-
@readonly: bool
|
|
22
|
-
@required: bool
|
|
23
|
-
@prefix: String?
|
|
24
|
-
@suffix: String?
|
|
25
|
-
@prefix_icon: hakumi_icon?
|
|
26
|
-
@suffix_icon: hakumi_icon?
|
|
27
|
-
@allow_clear: bool
|
|
28
|
-
@maxlength: Integer?
|
|
29
|
-
@standalone: bool
|
|
30
|
-
@rules: untyped
|
|
31
|
-
@errors: Array[String]
|
|
32
|
-
@html_options: hakumi_html_options
|
|
33
|
-
|
|
34
|
-
def initialize: (
|
|
35
|
-
name: String,
|
|
36
|
-
?label: String?,
|
|
37
|
-
?caption: String?,
|
|
38
|
-
?value: untyped,
|
|
39
|
-
?placeholder: String?,
|
|
40
|
-
?type: input_type,
|
|
41
|
-
?size: hakumi_size_standard,
|
|
42
|
-
?disabled: bool,
|
|
43
|
-
?readonly: bool,
|
|
44
|
-
?required: bool,
|
|
45
|
-
?prefix: String?,
|
|
46
|
-
?suffix: String?,
|
|
47
|
-
?prefix_icon: hakumi_icon?,
|
|
48
|
-
?suffix_icon: hakumi_icon?,
|
|
49
|
-
?allow_clear: bool,
|
|
50
|
-
?maxlength: Integer?,
|
|
51
|
-
?standalone: bool,
|
|
52
|
-
?rules: untyped,
|
|
53
|
-
?errors: (Array[String] | String),
|
|
54
|
-
**hakumi_html_options html_options
|
|
55
|
-
) -> void
|
|
56
|
-
|
|
57
|
-
private
|
|
58
|
-
|
|
59
|
-
def validate_props!: () -> void
|
|
60
|
-
def has_affix?: () -> bool
|
|
61
|
-
def wrapper_classes: () -> String
|
|
62
|
-
def input_classes: () -> String
|
|
63
|
-
def input_attributes: () -> hakumi_html_options
|
|
64
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
65
|
-
def prefix_element: () -> String?
|
|
66
|
-
def suffix_element: () -> String?
|
|
67
|
-
def suffix_content: () -> String?
|
|
68
|
-
def clear_button: () -> String?
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
end
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Input
|
|
5
|
-
module Password
|
|
6
|
-
class Component < HakumiComponents::Input::Component
|
|
7
|
-
# Password component inherits all instance variables from Input::Component
|
|
8
|
-
# It forces type: :password and adds visibility toggle functionality
|
|
9
|
-
@user_suffix: untyped
|
|
10
|
-
|
|
11
|
-
# Accepts all Input::Component options via **options
|
|
12
|
-
def initialize: (**untyped options) -> void
|
|
13
|
-
|
|
14
|
-
def call: () -> String
|
|
15
|
-
|
|
16
|
-
private
|
|
17
|
-
|
|
18
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
19
|
-
def suffix_element: () -> String
|
|
20
|
-
def has_affix?: () -> bool
|
|
21
|
-
def user_suffix_content: () -> untyped
|
|
22
|
-
def visibility_toggle_button: () -> String
|
|
23
|
-
def input_attributes: () -> hakumi_html_options
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Input
|
|
5
|
-
module TextArea
|
|
6
|
-
class Component < HakumiComponents::BaseComponent
|
|
7
|
-
# value can be any type (gets converted to_s for character count)
|
|
8
|
-
@value: untyped
|
|
9
|
-
@rows: Integer
|
|
10
|
-
# autosize can be bool or hash with minRows/maxRows config
|
|
11
|
-
@autosize: (bool | Hash[Symbol, untyped])
|
|
12
|
-
@html_options: hakumi_html_options
|
|
13
|
-
|
|
14
|
-
def initialize: (
|
|
15
|
-
name: String,
|
|
16
|
-
?label: String?,
|
|
17
|
-
?caption: String?,
|
|
18
|
-
?value: untyped,
|
|
19
|
-
?placeholder: String?,
|
|
20
|
-
?size: Symbol,
|
|
21
|
-
?rows: Integer,
|
|
22
|
-
?disabled: bool,
|
|
23
|
-
?readonly: bool,
|
|
24
|
-
?required: bool,
|
|
25
|
-
?show_count: bool,
|
|
26
|
-
?maxlength: Integer?,
|
|
27
|
-
?autosize: (bool | Hash[Symbol, untyped]),
|
|
28
|
-
?standalone: bool,
|
|
29
|
-
?errors: Array[String],
|
|
30
|
-
**hakumi_html_options html_options
|
|
31
|
-
) -> void
|
|
32
|
-
|
|
33
|
-
def call: () -> String
|
|
34
|
-
|
|
35
|
-
private
|
|
36
|
-
|
|
37
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
38
|
-
def input_attributes: () -> hakumi_html_options
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module InputNumber
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
include HakumiComponents::Concerns::FormField
|
|
7
|
-
|
|
8
|
-
type input_number_variant = :default | :filled | :borderless
|
|
9
|
-
type input_number_status = :default | :success | :warning | :error
|
|
10
|
-
type numeric_or_string = Numeric | String
|
|
11
|
-
type formatter_options = Hash[Symbol, untyped]
|
|
12
|
-
|
|
13
|
-
SIZES: Array[hakumi_size_standard]
|
|
14
|
-
VARIANTS: Array[input_number_variant]
|
|
15
|
-
STATUSES: Array[input_number_status]
|
|
16
|
-
|
|
17
|
-
@name: String
|
|
18
|
-
@label: String?
|
|
19
|
-
@caption: String?
|
|
20
|
-
@value: untyped
|
|
21
|
-
@placeholder: String?
|
|
22
|
-
@min: numeric_or_string?
|
|
23
|
-
@max: numeric_or_string?
|
|
24
|
-
@step: numeric_or_string
|
|
25
|
-
@precision: numeric_or_string?
|
|
26
|
-
@size: hakumi_size_standard
|
|
27
|
-
@variant: input_number_variant
|
|
28
|
-
@status: input_number_status
|
|
29
|
-
@disabled: bool
|
|
30
|
-
@readonly: bool
|
|
31
|
-
@required: bool
|
|
32
|
-
@prefix: String?
|
|
33
|
-
@suffix: String?
|
|
34
|
-
@controls: bool
|
|
35
|
-
@keyboard: bool
|
|
36
|
-
@wheel: bool
|
|
37
|
-
@formatter: formatter_options?
|
|
38
|
-
@standalone: bool
|
|
39
|
-
@rules: untyped
|
|
40
|
-
@errors: Array[String]
|
|
41
|
-
@html_attrs: hakumi_html_options
|
|
42
|
-
|
|
43
|
-
def initialize: (
|
|
44
|
-
name: String,
|
|
45
|
-
?label: String?,
|
|
46
|
-
?caption: String?,
|
|
47
|
-
?value: untyped,
|
|
48
|
-
?placeholder: String?,
|
|
49
|
-
?min: numeric_or_string?,
|
|
50
|
-
?max: numeric_or_string?,
|
|
51
|
-
?step: numeric_or_string,
|
|
52
|
-
?precision: numeric_or_string?,
|
|
53
|
-
?size: hakumi_size_standard,
|
|
54
|
-
?variant: input_number_variant,
|
|
55
|
-
?status: input_number_status,
|
|
56
|
-
?disabled: bool,
|
|
57
|
-
?readonly: bool,
|
|
58
|
-
?required: bool,
|
|
59
|
-
?prefix: String?,
|
|
60
|
-
?suffix: String?,
|
|
61
|
-
?controls: bool,
|
|
62
|
-
?keyboard: bool,
|
|
63
|
-
?wheel: bool,
|
|
64
|
-
?formatter: formatter_options?,
|
|
65
|
-
?standalone: bool,
|
|
66
|
-
?rules: untyped,
|
|
67
|
-
?errors: (Array[String] | String),
|
|
68
|
-
**hakumi_html_options html_attrs
|
|
69
|
-
) -> void
|
|
70
|
-
|
|
71
|
-
private
|
|
72
|
-
|
|
73
|
-
def validate_props!: () -> void
|
|
74
|
-
def validate_numeric_like!: (untyped value, String name) -> void
|
|
75
|
-
def component_html_class: () -> String
|
|
76
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
77
|
-
def input_classes: () -> String
|
|
78
|
-
def input_attributes: () -> hakumi_html_options
|
|
79
|
-
def prefix_element: () -> String?
|
|
80
|
-
def suffix_element: () -> String?
|
|
81
|
-
def controls?: () -> bool
|
|
82
|
-
def formatter_options_json: () -> String?
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Layout
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
@has_sider: bool
|
|
7
|
-
@html_options: hakumi_html_options
|
|
8
|
-
|
|
9
|
-
def initialize: (
|
|
10
|
-
?has_sider: bool,
|
|
11
|
-
**hakumi_html_options html_options
|
|
12
|
-
) -> void
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
|
|
16
|
-
def html_attributes: () -> hakumi_html_options
|
|
17
|
-
|
|
18
|
-
def css_classes: () -> String
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Layout
|
|
5
|
-
module Content
|
|
6
|
-
class Component < HakumiComponents::BaseComponent
|
|
7
|
-
@html_options: hakumi_html_options
|
|
8
|
-
|
|
9
|
-
def initialize: (**hakumi_html_options html_options) -> void
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
def html_attributes: () -> hakumi_html_options
|
|
14
|
-
|
|
15
|
-
def css_classes: () -> String
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Layout
|
|
5
|
-
module Footer
|
|
6
|
-
class Component < HakumiComponents::BaseComponent
|
|
7
|
-
@html_options: hakumi_html_options
|
|
8
|
-
|
|
9
|
-
def initialize: (**hakumi_html_options html_options) -> void
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
def html_attributes: () -> hakumi_html_options
|
|
14
|
-
|
|
15
|
-
def css_classes: () -> String
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Layout
|
|
5
|
-
module Header
|
|
6
|
-
class Component < HakumiComponents::BaseComponent
|
|
7
|
-
@html_options: hakumi_html_options
|
|
8
|
-
|
|
9
|
-
def initialize: (**hakumi_html_options html_options) -> void
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
def html_attributes: () -> hakumi_html_options
|
|
14
|
-
|
|
15
|
-
def css_classes: () -> String
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Layout
|
|
5
|
-
module Sider
|
|
6
|
-
class Component < HakumiComponents::BaseComponent
|
|
7
|
-
@html_options: hakumi_html_options
|
|
8
|
-
|
|
9
|
-
def initialize: (**hakumi_html_options html_options) -> void
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
def html_attributes: () -> hakumi_html_options
|
|
14
|
-
|
|
15
|
-
def css_classes: () -> String
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Mentions
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
include HakumiComponents::Concerns::FormField
|
|
7
|
-
|
|
8
|
-
type mention_size = :small | :default | :large
|
|
9
|
-
type mention_status = :error | :warning | nil
|
|
10
|
-
type mention_variant = :outlined | :borderless | :filled
|
|
11
|
-
type filter_option = :contains | Symbol
|
|
12
|
-
|
|
13
|
-
SIZES: Array[mention_size]
|
|
14
|
-
STATUSES: Array[mention_status]
|
|
15
|
-
VARIANTS: Array[mention_variant]
|
|
16
|
-
|
|
17
|
-
@name: String
|
|
18
|
-
@label: String?
|
|
19
|
-
@caption: String?
|
|
20
|
-
@value: String?
|
|
21
|
-
@default_value: String?
|
|
22
|
-
@options: Array[untyped]
|
|
23
|
-
@prefix: (String | Array[String])
|
|
24
|
-
@split: String
|
|
25
|
-
@filter_option: filter_option
|
|
26
|
-
@placeholder: String?
|
|
27
|
-
@disabled: bool
|
|
28
|
-
@readonly: bool
|
|
29
|
-
@required: bool
|
|
30
|
-
@rows: Integer?
|
|
31
|
-
@auto_size: bool
|
|
32
|
-
@size: mention_size
|
|
33
|
-
@variant: mention_variant
|
|
34
|
-
@status: mention_status
|
|
35
|
-
@standalone: bool
|
|
36
|
-
@errors: Array[String]
|
|
37
|
-
@html_options: hakumi_html_options
|
|
38
|
-
|
|
39
|
-
def initialize: (
|
|
40
|
-
name: String,
|
|
41
|
-
?label: String?,
|
|
42
|
-
?caption: String?,
|
|
43
|
-
?value: String?,
|
|
44
|
-
?default_value: String?,
|
|
45
|
-
?options: Array[untyped],
|
|
46
|
-
?prefix: (String | Array[String]),
|
|
47
|
-
?split: String,
|
|
48
|
-
?filter_option: filter_option,
|
|
49
|
-
?placeholder: String?,
|
|
50
|
-
?disabled: bool,
|
|
51
|
-
?readonly: bool,
|
|
52
|
-
?required: bool,
|
|
53
|
-
?rows: Integer?,
|
|
54
|
-
?auto_size: bool,
|
|
55
|
-
?size: mention_size,
|
|
56
|
-
?variant: mention_variant,
|
|
57
|
-
?status: mention_status,
|
|
58
|
-
?standalone: bool,
|
|
59
|
-
?errors: (Array[String] | String),
|
|
60
|
-
**hakumi_html_options html_options
|
|
61
|
-
) -> void
|
|
62
|
-
|
|
63
|
-
private
|
|
64
|
-
|
|
65
|
-
def single_line?: () -> bool
|
|
66
|
-
def multiline?: () -> bool
|
|
67
|
-
def wrapper_classes: () -> String
|
|
68
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
69
|
-
def field_attributes: () -> hakumi_html_options
|
|
70
|
-
def field_classes: () -> String
|
|
71
|
-
def normalized_options: () -> Array[Hash[Symbol, String]]
|
|
72
|
-
def filter_option_value: () -> String
|
|
73
|
-
end
|
|
74
|
-
end
|
|
75
|
-
end
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Menu
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
type menu_mode = :horizontal | :vertical | :inline
|
|
7
|
-
type menu_trigger_action = :hover | :click
|
|
8
|
-
|
|
9
|
-
MODES: Array[menu_mode]
|
|
10
|
-
TRIGGER_SUBMENU_ACTIONS: Array[menu_trigger_action]
|
|
11
|
-
|
|
12
|
-
@mode: menu_mode
|
|
13
|
-
@selectable: bool
|
|
14
|
-
@multiple: bool
|
|
15
|
-
@inline_collapsed: bool
|
|
16
|
-
@inline_indent: Integer
|
|
17
|
-
@default_selected_keys: Array[String]
|
|
18
|
-
@default_open_keys: Array[String]
|
|
19
|
-
@trigger_submenu_action: menu_trigger_action
|
|
20
|
-
@html_options: hakumi_html_options
|
|
21
|
-
|
|
22
|
-
def initialize: (
|
|
23
|
-
?mode: menu_mode,
|
|
24
|
-
?selectable: bool,
|
|
25
|
-
?multiple: bool,
|
|
26
|
-
?inline_collapsed: bool,
|
|
27
|
-
?inline_indent: Integer,
|
|
28
|
-
?default_selected_keys: (String | Array[String]),
|
|
29
|
-
?default_open_keys: (String | Array[String]),
|
|
30
|
-
?trigger_submenu_action: menu_trigger_action,
|
|
31
|
-
**hakumi_html_options html_options
|
|
32
|
-
) -> void
|
|
33
|
-
|
|
34
|
-
attr_reader mode: menu_mode
|
|
35
|
-
attr_reader inline_indent: Integer
|
|
36
|
-
|
|
37
|
-
def menu_classes: () -> String
|
|
38
|
-
|
|
39
|
-
def stimulus_controller: () -> String
|
|
40
|
-
|
|
41
|
-
def stimulus_values: () -> Hash[Symbol, untyped]
|
|
42
|
-
|
|
43
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
44
|
-
|
|
45
|
-
private
|
|
46
|
-
|
|
47
|
-
def stimulus_data_attributes: () -> Hash[String, untyped]
|
|
48
|
-
|
|
49
|
-
def validate_props!: () -> void
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|