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,201 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Progress
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
type progress_type = :line | :circle | :dashboard
|
|
7
|
-
type progress_status = :normal | :success | :exception | :active
|
|
8
|
-
type progress_line_size = :small | :default
|
|
9
|
-
type progress_linecap = :round | :square | :butt
|
|
10
|
-
type progress_gap_position = :top | :bottom | :left | :right
|
|
11
|
-
type progress_info_tooltip = :auto | :always | bool
|
|
12
|
-
type progress_stroke_color = String | Hash[Symbol | String, untyped]
|
|
13
|
-
type progress_format_proc = Proc
|
|
14
|
-
type progress_size = progress_line_size | Numeric
|
|
15
|
-
|
|
16
|
-
TYPES: Array[progress_type]
|
|
17
|
-
STATUSES: Array[progress_status]
|
|
18
|
-
LINE_SIZES: Array[progress_line_size]
|
|
19
|
-
LINECAPS: Array[progress_linecap]
|
|
20
|
-
CIRCLE_STEP_GAP: Integer
|
|
21
|
-
|
|
22
|
-
# Extracts locals from controller params for dynamic rendering
|
|
23
|
-
def self.extract_controller_locals: (untyped params) -> Hash[Symbol, untyped]
|
|
24
|
-
|
|
25
|
-
# Parse number from various input types
|
|
26
|
-
def self.parse_number: (untyped value) -> Numeric?
|
|
27
|
-
|
|
28
|
-
# Parse size (symbol or numeric)
|
|
29
|
-
def self.parse_size: (untyped value) -> (Symbol | Numeric)?
|
|
30
|
-
|
|
31
|
-
# Parse stroke color (hash or string)
|
|
32
|
-
def self.parse_stroke_color: (untyped value) -> progress_stroke_color?
|
|
33
|
-
|
|
34
|
-
@type: progress_type
|
|
35
|
-
@status: progress_status?
|
|
36
|
-
@show_info: bool
|
|
37
|
-
@size: progress_size?
|
|
38
|
-
@stroke_width: Numeric?
|
|
39
|
-
@stroke_color: progress_stroke_color?
|
|
40
|
-
@trail_color: String?
|
|
41
|
-
@stroke_linecap: progress_linecap
|
|
42
|
-
@steps: Integer?
|
|
43
|
-
@gap_degree: Numeric?
|
|
44
|
-
@gap_position: progress_gap_position?
|
|
45
|
-
@format: progress_format_proc?
|
|
46
|
-
@html_options: hakumi_html_options
|
|
47
|
-
@info_tooltip_mode: (:auto | :always | false)?
|
|
48
|
-
@info_tooltip_threshold: Numeric
|
|
49
|
-
@info_tooltip_options: Hash[Symbol, untyped]
|
|
50
|
-
@percent: Numeric
|
|
51
|
-
@success_percent: Numeric?
|
|
52
|
-
|
|
53
|
-
def initialize: (
|
|
54
|
-
?percent: Numeric,
|
|
55
|
-
?success_percent: Numeric?,
|
|
56
|
-
?type: progress_type,
|
|
57
|
-
?status: progress_status?,
|
|
58
|
-
?show_info: bool?,
|
|
59
|
-
?size: progress_size?,
|
|
60
|
-
?stroke_width: Numeric?,
|
|
61
|
-
?stroke_color: progress_stroke_color?,
|
|
62
|
-
?trail_color: String?,
|
|
63
|
-
?stroke_linecap: progress_linecap,
|
|
64
|
-
?steps: Integer?,
|
|
65
|
-
?gap_degree: Numeric?,
|
|
66
|
-
?gap_position: progress_gap_position?,
|
|
67
|
-
?format: progress_format_proc?,
|
|
68
|
-
?info_tooltip: progress_info_tooltip,
|
|
69
|
-
?info_tooltip_threshold: Numeric,
|
|
70
|
-
?info_tooltip_options: Hash[Symbol, untyped],
|
|
71
|
-
**hakumi_html_options html_options
|
|
72
|
-
) -> void
|
|
73
|
-
|
|
74
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
75
|
-
|
|
76
|
-
def formatted_info: () -> String?
|
|
77
|
-
|
|
78
|
-
def show_info?: () -> bool
|
|
79
|
-
|
|
80
|
-
def inline_info?: () -> bool
|
|
81
|
-
|
|
82
|
-
def wrap_with_tooltip?: () -> bool
|
|
83
|
-
|
|
84
|
-
def tooltip_component_options: () -> Hash[Symbol, untyped]
|
|
85
|
-
|
|
86
|
-
def info_tooltip_threshold_value: () -> Integer
|
|
87
|
-
|
|
88
|
-
def tooltip_label: () -> String
|
|
89
|
-
|
|
90
|
-
def tooltip_enabled?: () -> (bool | nil)
|
|
91
|
-
|
|
92
|
-
def line?: () -> bool
|
|
93
|
-
|
|
94
|
-
def circle?: () -> bool
|
|
95
|
-
|
|
96
|
-
def dashboard?: () -> bool
|
|
97
|
-
|
|
98
|
-
def steps?: () -> bool
|
|
99
|
-
|
|
100
|
-
def line_style: () -> String?
|
|
101
|
-
|
|
102
|
-
def line_bar_style: () -> String?
|
|
103
|
-
|
|
104
|
-
def line_success_style: () -> String?
|
|
105
|
-
|
|
106
|
-
def line_steps: () -> Array[Hash[Symbol, untyped]]
|
|
107
|
-
|
|
108
|
-
def circle_size: () -> Integer
|
|
109
|
-
|
|
110
|
-
def circle_inner_style: () -> String?
|
|
111
|
-
|
|
112
|
-
def circle_trail_attributes: () -> hakumi_html_options
|
|
113
|
-
|
|
114
|
-
def circle_path_attributes: () -> hakumi_html_options
|
|
115
|
-
|
|
116
|
-
def circle_trail_style: () -> String?
|
|
117
|
-
|
|
118
|
-
def circle_gradient_attributes: () -> hakumi_html_options?
|
|
119
|
-
|
|
120
|
-
def gradient_id: () -> String
|
|
121
|
-
|
|
122
|
-
def circle_stroke: () -> (String | progress_stroke_color)?
|
|
123
|
-
|
|
124
|
-
def gradient?: () -> bool
|
|
125
|
-
|
|
126
|
-
def gradient_css: () -> String?
|
|
127
|
-
|
|
128
|
-
def gradient_svg_direction: () -> Hash[Symbol, String]
|
|
129
|
-
|
|
130
|
-
def status: () -> progress_status?
|
|
131
|
-
|
|
132
|
-
def data_attributes: () -> hakumi_html_options
|
|
133
|
-
|
|
134
|
-
private
|
|
135
|
-
|
|
136
|
-
def info_text: () -> String?
|
|
137
|
-
|
|
138
|
-
def validate_props!: () -> void
|
|
139
|
-
|
|
140
|
-
def wrapper_classes: () -> String
|
|
141
|
-
|
|
142
|
-
def accessibility_label: () -> String
|
|
143
|
-
|
|
144
|
-
def clamp_percent: (Numeric value) -> Numeric
|
|
145
|
-
|
|
146
|
-
def line_stroke_width: () -> Numeric?
|
|
147
|
-
|
|
148
|
-
def steps_custom_color: () -> (String | progress_stroke_color)?
|
|
149
|
-
|
|
150
|
-
def circle_stroke_width: () -> Numeric?
|
|
151
|
-
|
|
152
|
-
def circle_radius: () -> Numeric
|
|
153
|
-
|
|
154
|
-
def circle_total_length: () -> Numeric
|
|
155
|
-
|
|
156
|
-
def circle_gap_degree: () -> Numeric?
|
|
157
|
-
|
|
158
|
-
def circle_gap_position: () -> progress_gap_position?
|
|
159
|
-
|
|
160
|
-
def circle_gap_length: () -> Numeric
|
|
161
|
-
|
|
162
|
-
def circle_effective_length: () -> Numeric
|
|
163
|
-
|
|
164
|
-
def circle_path_length: () -> Numeric
|
|
165
|
-
|
|
166
|
-
def circle_trail_length: () -> Numeric
|
|
167
|
-
|
|
168
|
-
def circle_dashoffset: () -> String
|
|
169
|
-
|
|
170
|
-
def circle_path_dasharray: () -> String
|
|
171
|
-
|
|
172
|
-
def circle_trail_dasharray: () -> String
|
|
173
|
-
|
|
174
|
-
def circle_transform: () -> String
|
|
175
|
-
|
|
176
|
-
def circle_rotation: () -> Integer
|
|
177
|
-
|
|
178
|
-
def format_float: (Numeric value) -> String
|
|
179
|
-
|
|
180
|
-
def gradient_stops: () -> Hash[Symbol, untyped]?
|
|
181
|
-
|
|
182
|
-
def gradient_stop_list: (Array[[String, String]] stops) -> String
|
|
183
|
-
|
|
184
|
-
def stroke_width_value: () -> Numeric?
|
|
185
|
-
|
|
186
|
-
def custom_info?: () -> bool
|
|
187
|
-
|
|
188
|
-
def circle_steps?: () -> bool
|
|
189
|
-
|
|
190
|
-
def circle_steps: () -> Array[Hash[Symbol, untyped]]
|
|
191
|
-
|
|
192
|
-
def circle_step_gap: () -> Integer
|
|
193
|
-
|
|
194
|
-
def circle_step_stroke: (bool active) -> (String | progress_stroke_color)?
|
|
195
|
-
|
|
196
|
-
def normalize_info_tooltip: (untyped value) -> (:auto | :always | false)
|
|
197
|
-
|
|
198
|
-
def normalize_tooltip_options: (untyped value) -> Hash[Symbol, untyped]
|
|
199
|
-
end
|
|
200
|
-
end
|
|
201
|
-
end
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module QrCode
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
type qr_code_type = :canvas | :svg
|
|
7
|
-
type qr_code_status = :active | :expired | :loading | :scanned
|
|
8
|
-
type qr_code_error_level = :L | :M | :Q | :H
|
|
9
|
-
|
|
10
|
-
TYPES: Array[qr_code_type]
|
|
11
|
-
STATUSES: Array[qr_code_status]
|
|
12
|
-
ERROR_LEVELS: Array[qr_code_error_level]
|
|
13
|
-
|
|
14
|
-
@value: String
|
|
15
|
-
@size: Integer
|
|
16
|
-
@type: qr_code_type
|
|
17
|
-
@color: String?
|
|
18
|
-
@bg_color: String?
|
|
19
|
-
@icon_input: untyped
|
|
20
|
-
@icon_size: Integer
|
|
21
|
-
@icon_component: untyped
|
|
22
|
-
@icon_url: String?
|
|
23
|
-
@status: qr_code_status
|
|
24
|
-
@status_render: untyped
|
|
25
|
-
@bordered: bool
|
|
26
|
-
@error_level: qr_code_error_level
|
|
27
|
-
@download_name: String?
|
|
28
|
-
@aria_label: String?
|
|
29
|
-
@html_options: hakumi_html_options
|
|
30
|
-
|
|
31
|
-
def self.extract_controller_locals: (untyped params) -> Hash[Symbol, untyped]
|
|
32
|
-
|
|
33
|
-
def self.parse_number: (untyped value) -> Numeric?
|
|
34
|
-
|
|
35
|
-
def self.parse_error_level: (untyped value) -> Symbol?
|
|
36
|
-
|
|
37
|
-
def initialize: (
|
|
38
|
-
value: String,
|
|
39
|
-
?size: Integer,
|
|
40
|
-
?type: qr_code_type,
|
|
41
|
-
?color: String?,
|
|
42
|
-
?bg_color: String?,
|
|
43
|
-
?icon: untyped,
|
|
44
|
-
?icon_size: Integer,
|
|
45
|
-
?status: qr_code_status,
|
|
46
|
-
?status_render: untyped,
|
|
47
|
-
?bordered: bool,
|
|
48
|
-
?error_level: qr_code_error_level,
|
|
49
|
-
?download_name: String?,
|
|
50
|
-
?aria_label: String?,
|
|
51
|
-
**hakumi_html_options html_options
|
|
52
|
-
) -> void
|
|
53
|
-
|
|
54
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
55
|
-
|
|
56
|
-
def renderer_attributes: () -> hakumi_html_options
|
|
57
|
-
|
|
58
|
-
def icon?: () -> bool
|
|
59
|
-
|
|
60
|
-
def icon_markup: () -> String?
|
|
61
|
-
|
|
62
|
-
def icon_image_attributes: () -> hakumi_html_options
|
|
63
|
-
|
|
64
|
-
def status_overlay?: () -> bool
|
|
65
|
-
|
|
66
|
-
def status_overlay_markup: () -> String?
|
|
67
|
-
|
|
68
|
-
def status_text: () -> String
|
|
69
|
-
|
|
70
|
-
def status_description: () -> String?
|
|
71
|
-
|
|
72
|
-
private
|
|
73
|
-
|
|
74
|
-
def validate_props!: () -> void
|
|
75
|
-
|
|
76
|
-
def wrapper_classes: () -> String
|
|
77
|
-
|
|
78
|
-
def wrapper_styles: () -> String
|
|
79
|
-
|
|
80
|
-
def size_css_value: () -> String?
|
|
81
|
-
|
|
82
|
-
def icon_css_value: () -> String?
|
|
83
|
-
|
|
84
|
-
def resolve_icon!: () -> void
|
|
85
|
-
|
|
86
|
-
def icon_component?: () -> bool
|
|
87
|
-
|
|
88
|
-
def icon_image?: () -> bool
|
|
89
|
-
|
|
90
|
-
def data_attributes: () -> hakumi_html_options
|
|
91
|
-
|
|
92
|
-
def loading?: () -> bool
|
|
93
|
-
|
|
94
|
-
def custom_status_render?: () -> bool
|
|
95
|
-
|
|
96
|
-
def custom_status_overlay: () -> untyped
|
|
97
|
-
|
|
98
|
-
def default_status_overlay: () -> String
|
|
99
|
-
|
|
100
|
-
def normalize_symbol: (untyped value) -> Symbol?
|
|
101
|
-
|
|
102
|
-
def normalize_error_level: (untyped value) -> Symbol?
|
|
103
|
-
|
|
104
|
-
def normalize_string: (untyped value) -> String?
|
|
105
|
-
|
|
106
|
-
def extract_icon_name: (untyped value) -> Symbol?
|
|
107
|
-
|
|
108
|
-
def icon_component_size: () -> Integer
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
end
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Radio
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
include HakumiComponents::Concerns::FormField
|
|
7
|
-
|
|
8
|
-
SIZES: Array[hakumi_size_standard]
|
|
9
|
-
|
|
10
|
-
@name: String
|
|
11
|
-
@value: (String | Integer | Float)?
|
|
12
|
-
@text: String?
|
|
13
|
-
@label: String?
|
|
14
|
-
@caption: String?
|
|
15
|
-
@checked: bool
|
|
16
|
-
@disabled: bool
|
|
17
|
-
@size: hakumi_size_standard
|
|
18
|
-
@id: String
|
|
19
|
-
@auto_focus: bool
|
|
20
|
-
@required: bool
|
|
21
|
-
@standalone: bool
|
|
22
|
-
@errors: Array[String]
|
|
23
|
-
@html_options: hakumi_html_options
|
|
24
|
-
|
|
25
|
-
def initialize: (
|
|
26
|
-
name: String,
|
|
27
|
-
?value: (String | Integer | Float)?,
|
|
28
|
-
?text: String?,
|
|
29
|
-
?label: String?,
|
|
30
|
-
?caption: String?,
|
|
31
|
-
?checked: bool,
|
|
32
|
-
?disabled: bool,
|
|
33
|
-
?size: hakumi_size_standard,
|
|
34
|
-
?id: String?,
|
|
35
|
-
?auto_focus: bool,
|
|
36
|
-
?required: bool,
|
|
37
|
-
?standalone: bool,
|
|
38
|
-
?errors: (Array[String] | String)?,
|
|
39
|
-
**hakumi_html_options html_options
|
|
40
|
-
) -> void
|
|
41
|
-
|
|
42
|
-
def wrapper_classes: () -> String
|
|
43
|
-
|
|
44
|
-
def radio_classes: () -> String
|
|
45
|
-
|
|
46
|
-
def data_controllers: () -> String
|
|
47
|
-
|
|
48
|
-
def label_text: () -> String?
|
|
49
|
-
|
|
50
|
-
private
|
|
51
|
-
|
|
52
|
-
def validate_props!: () -> void
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
end
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Radio
|
|
5
|
-
module Group
|
|
6
|
-
class Component < HakumiComponents::BaseComponent
|
|
7
|
-
include HakumiComponents::Concerns::FormField
|
|
8
|
-
|
|
9
|
-
type radio_variant = :default | :button | :solid
|
|
10
|
-
type radio_direction = :horizontal | :vertical
|
|
11
|
-
type radio_option = { label: String, value: (String | Integer | Float), disabled: bool }
|
|
12
|
-
|
|
13
|
-
SIZES: Array[hakumi_size_standard]
|
|
14
|
-
VARIANTS: Array[radio_variant]
|
|
15
|
-
DIRECTIONS: Array[radio_direction]
|
|
16
|
-
|
|
17
|
-
@name: String
|
|
18
|
-
@value: (String | Integer | Float)?
|
|
19
|
-
@options: Array[radio_option]
|
|
20
|
-
@label: String?
|
|
21
|
-
@caption: String?
|
|
22
|
-
@variant: radio_variant
|
|
23
|
-
@direction: radio_direction
|
|
24
|
-
@size: hakumi_size_standard
|
|
25
|
-
@disabled: bool
|
|
26
|
-
@standalone: bool
|
|
27
|
-
@required: bool
|
|
28
|
-
@errors: Array[String]
|
|
29
|
-
@html_options: hakumi_html_options
|
|
30
|
-
|
|
31
|
-
def initialize: (
|
|
32
|
-
?name: String?,
|
|
33
|
-
?value: (String | Integer | Float)?,
|
|
34
|
-
?options: Array[Hash[Symbol, untyped] | String],
|
|
35
|
-
?label: String?,
|
|
36
|
-
?caption: String?,
|
|
37
|
-
?variant: radio_variant,
|
|
38
|
-
?direction: radio_direction,
|
|
39
|
-
?size: hakumi_size_standard,
|
|
40
|
-
?disabled: bool,
|
|
41
|
-
?standalone: bool,
|
|
42
|
-
?required: bool,
|
|
43
|
-
?errors: (Array[String] | String)?,
|
|
44
|
-
**hakumi_html_options html_options
|
|
45
|
-
) -> void
|
|
46
|
-
|
|
47
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
48
|
-
|
|
49
|
-
def normalized_options: () -> Array[radio_option]
|
|
50
|
-
|
|
51
|
-
def option_checked?: ((String | Integer | Float) option_value) -> bool
|
|
52
|
-
|
|
53
|
-
def option_disabled?: (radio_option option) -> bool
|
|
54
|
-
|
|
55
|
-
def button_wrapper_classes: (radio_option option) -> String
|
|
56
|
-
|
|
57
|
-
def option_id: (Integer index) -> String
|
|
58
|
-
|
|
59
|
-
def button_group?: () -> bool
|
|
60
|
-
|
|
61
|
-
private
|
|
62
|
-
|
|
63
|
-
def wrapper_classes: () -> String
|
|
64
|
-
|
|
65
|
-
def normalize_options: (Array[Hash[Symbol, untyped] | String] options) -> Array[radio_option]
|
|
66
|
-
|
|
67
|
-
def validate_props!: () -> void
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Rails
|
|
5
|
-
class AttributeIntrospection
|
|
6
|
-
def self.human_attribute_name: (Object object, Symbol attribute) -> String?
|
|
7
|
-
def self.placeholder: (Object object, Symbol attribute) -> String?
|
|
8
|
-
def self.hint: (Object object, Symbol attribute) -> String?
|
|
9
|
-
def self.input_type_from_column: (Object object, Symbol attribute) -> Symbol
|
|
10
|
-
def self.column_for: (Object object, Symbol attribute) -> Object?
|
|
11
|
-
def self.numeric_column?: (Object object, Symbol attribute) -> bool
|
|
12
|
-
def self.text_column?: (Object object, Symbol attribute) -> bool
|
|
13
|
-
def self.column_limit: (Object object, Symbol attribute) -> Integer?
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Rails
|
|
5
|
-
class ValidationIntrospection
|
|
6
|
-
def self.required?: (Object object, Symbol attribute) -> bool
|
|
7
|
-
def self.maxlength: (Object object, Symbol attribute) -> Integer?
|
|
8
|
-
def self.minlength: (Object object, Symbol attribute) -> Integer?
|
|
9
|
-
def self.pattern: (Object object, Symbol attribute) -> String?
|
|
10
|
-
def self.numericality_constraints: (Object object, Symbol attribute) -> Hash[Symbol, Object]
|
|
11
|
-
def self.email_field?: (Object object, Symbol attribute) -> bool
|
|
12
|
-
def self.url_field?: (Object object, Symbol attribute) -> bool
|
|
13
|
-
def self.has_validators?: (Object object) -> bool
|
|
14
|
-
def self.validators_for: (Object object, Symbol attribute) -> Array[Object]
|
|
15
|
-
def self.validator_options: (Object validator) -> Hash[Symbol, Object]
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Rails
|
|
5
|
-
class ValidationMapper
|
|
6
|
-
type validator = _Validator
|
|
7
|
-
type model_object = _ModelObject
|
|
8
|
-
|
|
9
|
-
interface _Validator
|
|
10
|
-
def options: () -> Hash[Symbol, untyped]
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
interface _ModelObject
|
|
14
|
-
def errors: () -> _Errors
|
|
15
|
-
def class: () -> Class
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
interface _Errors
|
|
19
|
-
def generate_message: (Symbol attribute, Symbol type, Hash[Symbol, untyped] options) -> String
|
|
20
|
-
def full_message: (Symbol attribute, String message) -> String
|
|
21
|
-
def respond_to?: (Symbol method) -> bool
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# Public methods
|
|
25
|
-
def self.to_frontend_rules: (untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
26
|
-
def self.merge_rules: (Array[Hash[Symbol, untyped]]? manual_rules, Array[Hash[Symbol, untyped]] auto_rules) -> Array[Hash[Symbol, untyped]]
|
|
27
|
-
|
|
28
|
-
# Private methods
|
|
29
|
-
def self.extract_rule_type: (Hash[Symbol, untyped] rule) -> Symbol?
|
|
30
|
-
def self.map_validator: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]?
|
|
31
|
-
def self.map_presence: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
32
|
-
def self.map_length: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
33
|
-
def self.map_numericality: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
34
|
-
def self.map_format: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
35
|
-
def self.map_confirmation: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
36
|
-
def self.map_comparison: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
37
|
-
def self.map_inclusion: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
38
|
-
def self.map_exclusion: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
39
|
-
def self.map_acceptance: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
40
|
-
def self.map_absence: (validator validator, untyped object, Symbol attribute) -> Array[Hash[Symbol, untyped]]
|
|
41
|
-
def self.email_regex?: (String regex_source) -> bool
|
|
42
|
-
def self.url_regex?: (String regex_source) -> bool
|
|
43
|
-
def self.humanize: (Symbol attribute) -> String
|
|
44
|
-
def self.validation_message: (untyped object, Symbol attribute, Symbol type, Hash[Symbol, untyped] options, Hash[Symbol, untyped] validator_options) -> String
|
|
45
|
-
def self.anonymous_class?: (untyped object) -> bool
|
|
46
|
-
def self.build_comparison_target: (untyped target, untyped object) -> Hash[Symbol, untyped]?
|
|
47
|
-
def self.comparison_message_options: (untyped target, untyped object, Hash[Symbol, untyped] comparison) -> Hash[Symbol, untyped]
|
|
48
|
-
def self.resolve_comparison_value: (untyped target, untyped object) -> untyped
|
|
49
|
-
def self.fallback_message: (Symbol attribute, Symbol type, Hash[Symbol, untyped] options, Hash[Symbol, untyped] validator_options) -> String
|
|
50
|
-
def self.fallback_message_text: (Symbol type, Hash[Symbol, untyped] options) -> String
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Rate
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
include HakumiComponents::Concerns::FormField
|
|
7
|
-
|
|
8
|
-
type star_state = :full | :half | :zero
|
|
9
|
-
|
|
10
|
-
@name: String
|
|
11
|
-
@label: String?
|
|
12
|
-
@caption: String?
|
|
13
|
-
@value: untyped
|
|
14
|
-
@default_value: Numeric
|
|
15
|
-
@count: Integer
|
|
16
|
-
@allow_half: bool
|
|
17
|
-
@allow_clear: bool
|
|
18
|
-
@disabled: bool
|
|
19
|
-
@readonly: bool
|
|
20
|
-
@tooltips: Array[String]
|
|
21
|
-
@character: String?
|
|
22
|
-
@required: bool
|
|
23
|
-
@standalone: bool
|
|
24
|
-
@errors: Array[String]
|
|
25
|
-
@html_options: hakumi_html_options
|
|
26
|
-
|
|
27
|
-
def initialize: (
|
|
28
|
-
?name: String?,
|
|
29
|
-
?label: String?,
|
|
30
|
-
?caption: String?,
|
|
31
|
-
?value: untyped,
|
|
32
|
-
?default_value: Numeric,
|
|
33
|
-
?count: Integer,
|
|
34
|
-
?allow_half: bool,
|
|
35
|
-
?allow_clear: bool,
|
|
36
|
-
?disabled: bool,
|
|
37
|
-
?readonly: bool,
|
|
38
|
-
?tooltips: Array[String],
|
|
39
|
-
?character: String?,
|
|
40
|
-
?required: bool,
|
|
41
|
-
?standalone: bool,
|
|
42
|
-
?errors: (Array[String] | String),
|
|
43
|
-
**hakumi_html_options html_options
|
|
44
|
-
) -> void
|
|
45
|
-
|
|
46
|
-
def current_value: () -> Float
|
|
47
|
-
def rate_classes: () -> String
|
|
48
|
-
def rate_wrapper_attributes: () -> hakumi_html_options
|
|
49
|
-
def star_state: (Integer index) -> star_state
|
|
50
|
-
def star_classes: (star_state state) -> String
|
|
51
|
-
def tooltip_for: (Integer index) -> String?
|
|
52
|
-
def character_content: () -> String?
|
|
53
|
-
def input_attributes: () -> hakumi_html_options
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module HakumiComponents
|
|
4
|
-
module Result
|
|
5
|
-
class Component < HakumiComponents::BaseComponent
|
|
6
|
-
type result_status = :success | :info | :warning | :error
|
|
7
|
-
|
|
8
|
-
STATUSES: Array[String]
|
|
9
|
-
DEFAULT_TITLES: Hash[String, String]
|
|
10
|
-
DEFAULT_ICON_NAME: String
|
|
11
|
-
STATUS_ICON_MAP: Hash[String, Hash[Symbol, (String | Symbol)]]
|
|
12
|
-
STATUS_ICON_SIZE: Integer
|
|
13
|
-
|
|
14
|
-
# Extracts locals from controller params for dynamic rendering
|
|
15
|
-
# Params is typically ActionController::Parameters but we use untyped for flexibility
|
|
16
|
-
def self.extract_controller_locals: (untyped params) -> Hash[Symbol, untyped]
|
|
17
|
-
|
|
18
|
-
@status: String
|
|
19
|
-
@title: String?
|
|
20
|
-
@sub_title: String?
|
|
21
|
-
@icon: (hakumi_icon | false)?
|
|
22
|
-
@extra: untyped # Can be String, ViewComponent, or any renderable content
|
|
23
|
-
@html_options: hakumi_html_options
|
|
24
|
-
|
|
25
|
-
def initialize: (
|
|
26
|
-
?status: result_status?,
|
|
27
|
-
?title: String?,
|
|
28
|
-
?sub_title: String?,
|
|
29
|
-
?icon: (hakumi_icon | false)?,
|
|
30
|
-
?extra: untyped, # Extra content slot - can be any renderable
|
|
31
|
-
**hakumi_html_options html_options
|
|
32
|
-
) -> void
|
|
33
|
-
|
|
34
|
-
def wrapper_attributes: () -> hakumi_html_options
|
|
35
|
-
|
|
36
|
-
def icon_present?: () -> bool
|
|
37
|
-
|
|
38
|
-
def icon_content: () -> String?
|
|
39
|
-
|
|
40
|
-
def title_content: () -> String?
|
|
41
|
-
|
|
42
|
-
def sub_title_content: () -> String?
|
|
43
|
-
|
|
44
|
-
def extra_content: () -> String?
|
|
45
|
-
|
|
46
|
-
def content_present?: () -> bool
|
|
47
|
-
|
|
48
|
-
def extra_present?: () -> bool
|
|
49
|
-
|
|
50
|
-
def title_present?: () -> bool
|
|
51
|
-
|
|
52
|
-
def sub_title_present?: () -> bool
|
|
53
|
-
|
|
54
|
-
private
|
|
55
|
-
|
|
56
|
-
def validate_props!: () -> void
|
|
57
|
-
|
|
58
|
-
def wrapper_classes: () -> String
|
|
59
|
-
|
|
60
|
-
def status_icon_component: () -> HakumiComponents::Icon::Component?
|
|
61
|
-
|
|
62
|
-
def default_icon: () -> String
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
end
|