hakumi_components 0.1.17.pre → 0.1.18.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 +1 -1
- data/README.md +92 -70
- data/app/components/{hakumi → hakumi_components}/admin_panel/component.html.erb +2 -2
- data/app/components/{hakumi → hakumi_components}/admin_panel/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/affix/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/alert/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/alert/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/anchor/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/anchor/link/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/autocomplete/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/autocomplete/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/avatar/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/badge/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/base_component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/breadcrumb/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/breadcrumb/item/component.html.erb +2 -2
- data/app/components/{hakumi → hakumi_components}/breadcrumb/item/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/button/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/calendar/component.html.erb +5 -5
- data/app/components/{hakumi → hakumi_components}/calendar/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/card/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/card/grid/component.rb +5 -5
- data/app/components/{hakumi → hakumi_components}/card/meta/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/carousel/component.html.erb +2 -2
- data/app/components/{hakumi → hakumi_components}/carousel/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/cascader/component.html.erb +2 -2
- data/app/components/{hakumi → hakumi_components}/cascader/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/checkbox/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/checkbox/group/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/checkbox/group/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/collapse/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/collapse/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/collapse/panel/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/color_picker/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/concerns/form_field.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/container/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/date_picker/component.html.erb +3 -3
- data/app/components/{hakumi → hakumi_components}/date_picker/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/date_picker/range_picker.html.erb +4 -4
- data/app/components/{hakumi → hakumi_components}/date_picker/range_picker.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/date_picker/shared_rendering.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/descriptions/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/descriptions/item/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/divider/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/drawer/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/drawer/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/dropdown/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/dropdown/divider/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/dropdown/item/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/empty/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/flex/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/float_button/back_top/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/float_button/component.rb +5 -5
- data/app/components/{hakumi → hakumi_components}/float_button/group/component.rb +7 -7
- data/app/components/{hakumi → hakumi_components}/float_button/group_cluster/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/form/item/component.rb +6 -6
- data/app/components/{hakumi → hakumi_components}/grid/col/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/grid/row/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/icon/component.rb +8 -8
- data/app/components/{hakumi → hakumi_components}/image/component.html.erb +10 -10
- data/app/components/{hakumi → hakumi_components}/image/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/image/preview_group/component.html.erb +9 -9
- data/app/components/{hakumi → hakumi_components}/image/preview_group/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/input/component.rb +9 -9
- data/app/components/{hakumi → hakumi_components}/input/password/component.rb +5 -5
- data/app/components/{hakumi → hakumi_components}/input/text_area/component.rb +5 -5
- data/app/components/{hakumi → hakumi_components}/input_number/component.html.erb +4 -4
- data/app/components/{hakumi → hakumi_components}/input_number/component.rb +5 -5
- data/app/components/{hakumi → hakumi_components}/layout/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/layout/content/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/layout/footer/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/layout/header/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/layout/sider/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/mentions/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/menu/component.rb +6 -6
- data/app/components/{hakumi → hakumi_components}/menu/divider/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/menu/group/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/menu/item/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/menu/sub_menu/component.rb +7 -7
- data/app/components/{hakumi → hakumi_components}/message/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/modal/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/modal/component.rb +2 -2
- data/app/components/hakumi_components/modal/confirm/component.html.erb +23 -0
- data/app/components/{hakumi → hakumi_components}/modal/confirm/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/modal/error/component.rb +5 -5
- data/app/components/{hakumi → hakumi_components}/modal/info/component.rb +5 -5
- data/app/components/{hakumi → hakumi_components}/modal/success/component.rb +5 -5
- data/app/components/{hakumi → hakumi_components}/modal/warning/component.rb +6 -6
- data/app/components/{hakumi → hakumi_components}/notification/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/pagination/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/pagination/component.rb +7 -7
- data/app/components/{hakumi → hakumi_components}/popconfirm/component.html.erb +2 -2
- data/app/components/{hakumi → hakumi_components}/popconfirm/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/popover/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/progress/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/progress/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/qr_code/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/radio/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/radio/group/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/radio/group/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/rate/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/rate/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/result/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/segmented/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/select/component.html.erb +3 -3
- data/app/components/{hakumi → hakumi_components}/select/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/skeleton/avatar/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/skeleton/button/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/skeleton/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/skeleton/image/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/skeleton/image/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/skeleton/input/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/skeleton/node/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/slider/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/space/compact/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/space/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/spin/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/splitter/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/splitter/panel/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/statistic/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/steps/component.html.erb +4 -4
- data/app/components/{hakumi → hakumi_components}/steps/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/steps/item/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/switch/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/table/column/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/table/column_group/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/table/component.rb +7 -7
- data/app/components/{hakumi → hakumi_components}/table/concerns/columns.rb +8 -8
- data/app/components/{hakumi → hakumi_components}/table/concerns/editable.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/table/concerns/ellipsis.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/table/concerns/fixed_columns.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/tabs/component.html.erb +4 -4
- data/app/components/{hakumi → hakumi_components}/tabs/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/tabs/item/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/tag/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/tag/group/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/time_picker/component.html.erb +2 -2
- data/app/components/{hakumi → hakumi_components}/time_picker/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/timeline/component.rb +4 -4
- data/app/components/{hakumi → hakumi_components}/timeline/item/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/tooltip/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/tour/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/transfer/component.html.erb +4 -4
- data/app/components/{hakumi → hakumi_components}/transfer/component.rb +2 -2
- data/app/components/{hakumi → hakumi_components}/tree/component.html.erb +1 -1
- data/app/components/{hakumi → hakumi_components}/tree/component.rb +10 -10
- data/app/components/{hakumi → hakumi_components}/tree_select/component.html.erb +5 -5
- data/app/components/{hakumi → hakumi_components}/tree_select/component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/typography/base_component.rb +3 -3
- data/app/components/{hakumi → hakumi_components}/typography/link/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/typography/paragraph/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/typography/text/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/typography/title/component.rb +1 -1
- data/app/components/{hakumi → hakumi_components}/upload/component.html.erb +10 -10
- data/app/components/{hakumi → hakumi_components}/upload/component.rb +2 -2
- data/app/controllers/{hakumi → hakumi_components}/components_controller.rb +1 -1
- data/app/form_builders/{hakumi → hakumi_components}/form_builder.rb +31 -31
- data/app/helpers/{hakumi → hakumi_components}/form_helper.rb +4 -4
- data/app/services/hakumi_components/component_handler.rb +53 -0
- data/app/services/{hakumi → hakumi_components}/icon/loader.rb +4 -4
- data/app/services/{hakumi → hakumi_components}/illustrations/loader.rb +4 -4
- data/app/views/hakumi/_admin_panel.html.erb +1 -1
- data/app/views/hakumi/_affix.html.erb +1 -1
- data/app/views/hakumi/_alert.html.erb +1 -1
- data/app/views/hakumi/_confirm.html.erb +1 -1
- data/app/views/hakumi/_drawer.html.erb +1 -1
- data/app/views/hakumi/_message.html.erb +1 -1
- data/app/views/hakumi/_modal.html.erb +1 -1
- data/app/views/hakumi/_notification.html.erb +1 -1
- data/app/views/hakumi/_popconfirm.html.erb +1 -1
- data/app/views/hakumi/_popover.html.erb +1 -1
- data/app/views/hakumi/_qr_code.html.erb +1 -1
- data/app/views/hakumi/_result.html.erb +1 -1
- data/app/views/hakumi/_segmented.html.erb +1 -1
- data/app/views/hakumi/_skeleton.html.erb +1 -1
- data/app/views/hakumi/_spin.html.erb +1 -1
- data/app/views/hakumi/_statistic.html.erb +1 -1
- data/app/views/hakumi/_table.html.erb +1 -1
- data/app/views/hakumi/_tag.html.erb +1 -1
- data/app/views/hakumi/_timeline.html.erb +1 -1
- data/app/views/hakumi/_tree.html.erb +1 -1
- data/lib/generators/{hakumi → hakumi_components}/install_generator.rb +3 -3
- data/lib/hakumi_components/documentation.rb +6 -6
- data/lib/hakumi_components/engine.rb +9 -3
- data/lib/hakumi_components/rails/attribute_introspection.rb +1 -1
- data/lib/hakumi_components/rails/validation_introspection.rb +1 -1
- data/lib/hakumi_components/rails/validation_mapper.rb +1 -1
- data/lib/hakumi_components/rails.rb +1 -1
- data/lib/hakumi_components/version.rb +2 -2
- data/lib/hakumi_components.rb +3 -2
- data/sig/generators/{hakumi → hakumi_components}/install_generator.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/admin_panel/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/affix/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/alert/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/anchor/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/anchor/link/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/autocomplete/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/avatar/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/badge/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/base_component.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/breadcrumb/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/breadcrumb/item/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/button/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/calendar/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/card/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/card/grid/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/card/meta/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/carousel/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/cascader/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/checkbox/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/checkbox/group/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/collapse/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/collapse/panel/component.rbs +4 -4
- data/sig/{hakumi → hakumi_components}/color_picker/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/concerns/form_field.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/container/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/date_picker/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/date_picker/range_picker.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/date_picker/shared_rendering.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/descriptions/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/descriptions/item/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/divider/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/drawer/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/dropdown/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/dropdown/divider/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/dropdown/item/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/empty/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/flex/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/float_button/back_top/component.rbs +6 -6
- data/sig/{hakumi → hakumi_components}/float_button/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/float_button/group/component.rbs +13 -13
- data/sig/{hakumi → hakumi_components}/float_button/group_cluster/component.rbs +7 -7
- data/sig/{hakumi → hakumi_components}/form/item/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/form_builder.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/grid/col/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/grid/row/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/icon/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/image/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/image/preview_group/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/input/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/input/password/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/input/text_area/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/input_number/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/layout/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/layout/content/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/layout/footer/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/layout/header/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/layout/sider/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/mentions/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/menu/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/menu/divider/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/menu/group/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/menu/item/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/menu/sub_menu/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/message/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/modal/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/modal/confirm/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/modal/error/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/modal/info/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/modal/success/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/modal/warning/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/notification/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/pagination/component.rbs +7 -7
- data/sig/{hakumi → hakumi_components}/popconfirm/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/popover/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/progress/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/qr_code/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/radio/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/radio/group/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/rails/attribute_introspection.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/rails/validation_introspection.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/rails/validation_mapper.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/rails.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/rate/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/result/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/segmented/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/select/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/skeleton/avatar/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/skeleton/button/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/skeleton/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/skeleton/image/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/skeleton/input/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/skeleton/node/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/slider/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/space/compact/component.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/space/component.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/spin/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/splitter/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/splitter/panel/component.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/statistic/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/steps/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/steps/item/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/switch/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/table/column/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/table/column_group/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/table/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/table/concerns/columns.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/table/concerns/editable.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/table/concerns/ellipsis.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/table/concerns/fixed_columns.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/tabs/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/tabs/item/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/tag/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/tag/group/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/time_picker/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/timeline/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/timeline/item/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/tooltip/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/tour/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/transfer/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/tree/component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/tree_select/component.rbs +3 -3
- data/sig/{hakumi → hakumi_components}/typography/base_component.rbs +2 -2
- data/sig/{hakumi → hakumi_components}/typography/link/component.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/typography/paragraph/component.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/typography/text/component.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/typography/title/component.rbs +1 -1
- data/sig/{hakumi → hakumi_components}/upload/component.rbs +2 -2
- data/sig/{hakumi.rbs → hakumi_components.rbs} +3 -3
- metadata +340 -340
- data/app/components/hakumi/modal/confirm/component.html.erb +0 -23
- data/app/services/hakumi/component_handler.rb +0 -53
- /data/app/components/{hakumi → hakumi_components}/affix/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/anchor/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/anchor/link/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/breadcrumb/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/card/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/card/grid/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/card/meta/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/checkbox/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/color_picker/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/descriptions/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/dropdown/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/dropdown/item/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/icon/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/input/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/input/text_area/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/layout/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/layout/content/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/layout/footer/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/layout/header/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/layout/sider/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/mentions/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/menu/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/menu/group/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/menu/item/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/menu/sub_menu/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/message/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/popover/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/qr_code/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/radio/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/result/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/segmented/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/skeleton/avatar/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/skeleton/button/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/skeleton/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/skeleton/input/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/skeleton/node/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/slider/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/space/compact/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/space/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/spin/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/splitter/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/splitter/panel/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/statistic/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/steps/item/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/switch/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/table/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/timeline/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/timeline/item/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/tooltip/component.html.erb +0 -0
- /data/app/components/{hakumi → hakumi_components}/tour/component.html.erb +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Card
|
|
5
5
|
module Meta
|
|
6
6
|
# Hakumi Card Meta component
|
|
7
7
|
# A flexible content container for card metadata (title, description, avatar)
|
|
8
8
|
#
|
|
9
9
|
# @example Basic usage
|
|
10
|
-
# <%= render
|
|
10
|
+
# <%= render HakumiComponents::Card::Meta::Component.new(
|
|
11
11
|
# title: "Europe Street beat",
|
|
12
12
|
# description: "www.instagram.com"
|
|
13
13
|
# ) %>
|
|
14
14
|
#
|
|
15
15
|
# @example With avatar
|
|
16
|
-
# <%= render
|
|
16
|
+
# <%= render HakumiComponents::Card::Meta::Component.new(
|
|
17
17
|
# avatar: image_tag("avatar.png"),
|
|
18
18
|
# title: "Card title",
|
|
19
19
|
# description: "This is the description"
|
|
20
20
|
# ) %>
|
|
21
|
-
class Component <
|
|
21
|
+
class Component < HakumiComponents::BaseComponent
|
|
22
22
|
def initialize(
|
|
23
23
|
title: nil,
|
|
24
24
|
description: nil,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
data-action="click->hakumi--carousel#prev"
|
|
17
17
|
data-hakumi--carousel-target="prevArrow">
|
|
18
18
|
<span class="hakumi-carousel-arrow-icon hakumi-carousel-arrow-icon-prev">
|
|
19
|
-
<%= render
|
|
19
|
+
<%= render HakumiComponents::Icon::Component.new(name: :left) %>
|
|
20
20
|
</span>
|
|
21
21
|
</button>
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
data-action="click->hakumi--carousel#next"
|
|
27
27
|
data-hakumi--carousel-target="nextArrow">
|
|
28
28
|
<span class="hakumi-carousel-arrow-icon hakumi-carousel-arrow-icon-next">
|
|
29
|
-
<%= render
|
|
29
|
+
<%= render HakumiComponents::Icon::Component.new(name: :right) %>
|
|
30
30
|
</span>
|
|
31
31
|
</button>
|
|
32
32
|
<% end %>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Carousel
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
EFFECTS = %i[scrollx fade].freeze
|
|
7
7
|
DOT_PLACEMENTS = %i[top bottom start end].freeze
|
|
8
8
|
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
|
|
24
24
|
<% if @allow_clear %>
|
|
25
25
|
<span class="hakumi-cascader-clear" data-hakumi--cascader-target="clearBtn" data-action="click->hakumi--cascader#clear">
|
|
26
|
-
<%= render
|
|
26
|
+
<%= render HakumiComponents::Icon::Component.new(name: "close-circle", theme: :filled) %>
|
|
27
27
|
</span>
|
|
28
28
|
<% end %>
|
|
29
29
|
|
|
30
30
|
<span class="hakumi-cascader-arrow">
|
|
31
|
-
<%= render
|
|
31
|
+
<%= render HakumiComponents::Icon::Component.new(name: "down") %>
|
|
32
32
|
</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Cascader
|
|
5
5
|
# Public API
|
|
6
6
|
#
|
|
7
7
|
# ```erb
|
|
8
|
-
# <%= render
|
|
8
|
+
# <%= render HakumiComponents::Cascader::Component.new(
|
|
9
9
|
# options: [
|
|
10
10
|
# { value: "spain", label: "Spain", children: [
|
|
11
11
|
# { value: "madrid", label: "Madrid", children: [
|
|
@@ -40,7 +40,7 @@ module Hakumi
|
|
|
40
40
|
# - `expand_trigger` (`:click`, `:hover`, default: `:click`).
|
|
41
41
|
# - `display_render` (callable, optional) for custom label rendering.
|
|
42
42
|
# - Additional `html_options` are merged into the wrapper div.
|
|
43
|
-
class Component <
|
|
43
|
+
class Component < HakumiComponents::BaseComponent
|
|
44
44
|
SIZES = [ :small, :middle, :large ].freeze
|
|
45
45
|
TRIGGERS = [ :click, :hover ].freeze
|
|
46
46
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Checkbox
|
|
5
|
-
class Component <
|
|
6
|
-
include
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
|
+
include HakumiComponents::Concerns::FormField
|
|
7
7
|
|
|
8
8
|
def initialize(
|
|
9
9
|
checked: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%= tag.div(**wrapper_attributes) do %>
|
|
2
2
|
<% normalized_options.each do |option| %>
|
|
3
|
-
<%= render
|
|
3
|
+
<%= render HakumiComponents::Checkbox::Component.new(
|
|
4
4
|
name: "#{@name}[]",
|
|
5
5
|
value: option[:value],
|
|
6
6
|
checked: option_checked?(option[:value]),
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<% if item.show_arrow %>
|
|
9
9
|
<span class="hakumi-collapse-arrow" aria-hidden="true" data-hakumi--collapse-target="arrow" data-key="<%= item.key %>"
|
|
10
10
|
<% if mode.nil? || mode == :icon %>data-action="click->hakumi--collapse#toggle"<% end %>>
|
|
11
|
-
<%= render
|
|
11
|
+
<%= render HakumiComponents::Icon::Component.new(name: :caret_right, size: 12) %>
|
|
12
12
|
</span>
|
|
13
13
|
<% end %>
|
|
14
14
|
<span class="hakumi-collapse-header-text">
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Collapse
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
SIZES = %i[default small large].freeze
|
|
7
7
|
COLLAPSIBLES = [ nil, :header, :icon, :disabled ].freeze
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ module Hakumi
|
|
|
17
17
|
**options,
|
|
18
18
|
&block
|
|
19
19
|
) do
|
|
20
|
-
item =
|
|
20
|
+
item = HakumiComponents::Collapse::Panel::Component.new(
|
|
21
21
|
key: key,
|
|
22
22
|
header: header,
|
|
23
23
|
extra: extra,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module ColorPicker
|
|
5
5
|
# Hakumi Color Picker component
|
|
6
6
|
# A comprehensive color picker with saturation/brightness panel, hue and alpha sliders.
|
|
7
7
|
# Inspired by Ant Design's ColorPicker component.
|
|
8
|
-
class Component <
|
|
9
|
-
include
|
|
8
|
+
class Component < HakumiComponents::BaseComponent
|
|
9
|
+
include HakumiComponents::Concerns::FormField
|
|
10
10
|
|
|
11
11
|
SIZES = [ :small, :middle, :large ].freeze
|
|
12
12
|
TRIGGERS = [ :click, :hover ].freeze
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
data-action="click->hakumi--date-picker#clear"
|
|
14
14
|
data-hakumi--date-picker-target="clear"
|
|
15
15
|
style="<%= @value.present? ? '' : 'display: none;' %>">
|
|
16
|
-
<%= render
|
|
16
|
+
<%= render HakumiComponents::Icon::Component.new(name: :close_circle, theme: :filled) %>
|
|
17
17
|
</button>
|
|
18
18
|
<% end %>
|
|
19
19
|
|
|
20
20
|
<span class="hakumi-date-picker-suffix">
|
|
21
|
-
<%= render
|
|
21
|
+
<%= render HakumiComponents::Icon::Component.new(name: :calendar) %>
|
|
22
22
|
</span>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
25
|
<div class="hakumi-date-picker-panel-wrapper <%= @show_time ? 'hakumi-date-picker-panel-wrapper-with-time' : '' %> hakumi-date-picker-panel-hidden" data-hakumi--date-picker-target="panel">
|
|
26
26
|
<div class="hakumi-date-picker-panel">
|
|
27
|
-
<%= render
|
|
27
|
+
<%= render HakumiComponents::Calendar::Component.new(**calendar_component_options(value: parse_date(@value) || parse_date(@default_value))) %>
|
|
28
28
|
|
|
29
29
|
<% if @show_time %>
|
|
30
30
|
<div class="hakumi-date-picker-time-panel">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module DatePicker
|
|
5
|
-
class Component <
|
|
6
|
-
include
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
|
+
include HakumiComponents::Concerns::FormField
|
|
7
7
|
include SharedRendering
|
|
8
8
|
|
|
9
9
|
def initialize(
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
data-action="click->hakumi--date-picker#clear"
|
|
12
12
|
data-hakumi--date-picker-target="clear"
|
|
13
13
|
style="<%= @start_value.present? || @end_value.present? ? '' : 'display: none;' %>">
|
|
14
|
-
<%= render
|
|
14
|
+
<%= render HakumiComponents::Icon::Component.new(name: :close_circle, theme: :filled) %>
|
|
15
15
|
</button>
|
|
16
16
|
<% end %>
|
|
17
17
|
|
|
18
18
|
<span class="hakumi-date-picker-suffix">
|
|
19
|
-
<%= render
|
|
19
|
+
<%= render HakumiComponents::Icon::Component.new(name: :calendar) %>
|
|
20
20
|
</span>
|
|
21
21
|
</div>
|
|
22
22
|
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
<div class="hakumi-date-picker-panel">
|
|
25
25
|
<div class="hakumi-range-picker-panel">
|
|
26
26
|
<div class="hakumi-range-picker-panel-section">
|
|
27
|
-
<%= render
|
|
27
|
+
<%= render HakumiComponents::Calendar::Component.new(**calendar_component_options(value: parse_date(@start_value), range: "start")) %>
|
|
28
28
|
</div>
|
|
29
29
|
<div class="hakumi-range-picker-panel-section">
|
|
30
|
-
<%= render
|
|
30
|
+
<%= render HakumiComponents::Calendar::Component.new(**calendar_component_options(value: parse_date(@end_value), range: "end")) %>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module DatePicker
|
|
5
|
-
class RangePicker <
|
|
6
|
-
include
|
|
5
|
+
class RangePicker < HakumiComponents::BaseComponent
|
|
6
|
+
include HakumiComponents::Concerns::FormField
|
|
7
7
|
include SharedRendering
|
|
8
8
|
|
|
9
9
|
def initialize(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Descriptions
|
|
5
5
|
# Hakumi Descriptions component
|
|
6
6
|
# Displays multiple read-only fields in a group.
|
|
7
|
-
class Component <
|
|
7
|
+
class Component < HakumiComponents::BaseComponent
|
|
8
8
|
SIZE_OPTIONS = [ :default, :middle, :small ].freeze
|
|
9
9
|
LAYOUT_OPTIONS = [ :horizontal, :vertical ].freeze
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ module Hakumi
|
|
|
19
19
|
**options,
|
|
20
20
|
&block
|
|
21
21
|
) do
|
|
22
|
-
item =
|
|
22
|
+
item = HakumiComponents::Descriptions::Item::Component.new(
|
|
23
23
|
label: label,
|
|
24
24
|
content: content,
|
|
25
25
|
span: span,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Descriptions
|
|
5
5
|
module Item
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
attr_accessor :content
|
|
8
8
|
attr_reader :label, :span, :label_style, :content_style
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Divider
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
ORIENTATIONS = [ :horizontal, :vertical ].freeze
|
|
7
7
|
PLACEMENTS = [ :left, :center, :right ].freeze
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<% if @closable %>
|
|
20
20
|
<button type="button" class="hakumi-drawer-close" aria-label="Close" data-hakumi-action="close">
|
|
21
21
|
<span class="hakumi-drawer-close-x">
|
|
22
|
-
<%= render
|
|
22
|
+
<%= render HakumiComponents::Icon::Component.new(name: :close) %>
|
|
23
23
|
</span>
|
|
24
24
|
</button>
|
|
25
25
|
<% end %>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Dropdown
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
TRIGGERS = %i[hover click context_menu].freeze
|
|
7
7
|
PLACEMENTS = %i[bottom bottom_left bottom_right top top_left top_right].freeze
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ module Hakumi
|
|
|
10
10
|
renders_many :items, types: {
|
|
11
11
|
item: {
|
|
12
12
|
renders: ->(key:, label: nil, href: nil, target: nil, icon: nil, disabled: false, danger: false, **options, &block) do
|
|
13
|
-
|
|
13
|
+
HakumiComponents::Dropdown::Item::Component.new(
|
|
14
14
|
key: key,
|
|
15
15
|
label: label,
|
|
16
16
|
href: href,
|
|
@@ -25,7 +25,7 @@ module Hakumi
|
|
|
25
25
|
as: :item
|
|
26
26
|
},
|
|
27
27
|
divider: {
|
|
28
|
-
renders: -> {
|
|
28
|
+
renders: -> { HakumiComponents::Dropdown::Divider::Component.new },
|
|
29
29
|
as: :divider
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Dropdown
|
|
5
5
|
module Divider
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
def call
|
|
8
8
|
tag.li(class: "hakumi-dropdown-menu-item-divider", role: "separator")
|
|
9
9
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Dropdown
|
|
5
5
|
module Item
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
def initialize(key:, label: nil, href: nil, target: nil, icon: nil, disabled: false, danger: false, **html_options)
|
|
8
8
|
@key = key
|
|
9
9
|
@label = label
|
|
@@ -36,7 +36,7 @@ module Hakumi
|
|
|
36
36
|
return nil unless icon
|
|
37
37
|
|
|
38
38
|
if icon.is_a?(Symbol)
|
|
39
|
-
|
|
39
|
+
HakumiComponents::Icon::Component.new(name: icon)
|
|
40
40
|
else
|
|
41
41
|
icon
|
|
42
42
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Empty
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
BUILT_IN_IMAGES = [ :default, :simple ].freeze
|
|
7
7
|
|
|
8
8
|
# Default SVG image matching Ant Design's PRESENTED_IMAGE_DEFAULT
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Flex
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
WRAP_OPTIONS = [ :wrap, :nowrap, :"wrap-reverse" ].freeze
|
|
7
7
|
JUSTIFY_OPTIONS = [ :start, :end, :center, :"space-between", :"space-around", :"space-evenly" ].freeze
|
|
8
8
|
ALIGN_OPTIONS = [ :start, :end, :center, :baseline, :stretch ].freeze
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module FloatButton
|
|
5
5
|
module BackTop
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
DEFAULT_VISIBILITY = 400
|
|
8
8
|
|
|
9
9
|
def initialize(
|
|
@@ -29,7 +29,7 @@ module Hakumi
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def call
|
|
32
|
-
render
|
|
32
|
+
render HakumiComponents::FloatButton::Component.new(
|
|
33
33
|
icon: @icon,
|
|
34
34
|
tooltip: @tooltip,
|
|
35
35
|
floating: @floating,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module FloatButton
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
TYPES = [ :default, :primary ].freeze
|
|
7
7
|
SHAPES = [ :circle, :square ].freeze
|
|
8
8
|
PLACEMENTS = {
|
|
@@ -85,7 +85,7 @@ module Hakumi
|
|
|
85
85
|
return nil unless @icon
|
|
86
86
|
|
|
87
87
|
icon_markup = if @icon.is_a?(String) || @icon.is_a?(Symbol)
|
|
88
|
-
render
|
|
88
|
+
render HakumiComponents::Icon::Component.new(name: @icon)
|
|
89
89
|
else
|
|
90
90
|
@icon
|
|
91
91
|
end
|
|
@@ -186,9 +186,9 @@ module Hakumi
|
|
|
186
186
|
if @floating
|
|
187
187
|
badge_options[:style] = merge_styles(badge_options[:style], floating_style)
|
|
188
188
|
button_markup = float_button_markup(floating: false)
|
|
189
|
-
render(
|
|
189
|
+
render(HakumiComponents::Badge::Component.new(**badge_options)) { button_markup }
|
|
190
190
|
else
|
|
191
|
-
render(
|
|
191
|
+
render(HakumiComponents::Badge::Component.new(**badge_options)) { markup }
|
|
192
192
|
end
|
|
193
193
|
end
|
|
194
194
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module FloatButton
|
|
5
5
|
module Group
|
|
6
|
-
class Component <
|
|
7
|
-
SHAPES =
|
|
8
|
-
TYPES =
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
|
+
SHAPES = HakumiComponents::FloatButton::Component::SHAPES
|
|
8
|
+
TYPES = HakumiComponents::FloatButton::Component::TYPES
|
|
9
9
|
TRIGGERS = [ :click, :hover ].freeze
|
|
10
10
|
EXPAND_DIRECTIONS = [ :top, :right, :bottom, :left ].freeze
|
|
11
|
-
PLACEMENTS =
|
|
11
|
+
PLACEMENTS = HakumiComponents::FloatButton::Component::PLACEMENTS
|
|
12
12
|
|
|
13
13
|
def initialize(
|
|
14
14
|
icon: :plus,
|
|
@@ -97,7 +97,7 @@ module Hakumi
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
def trigger_button
|
|
100
|
-
render
|
|
100
|
+
render HakumiComponents::FloatButton::Component.new(
|
|
101
101
|
icon: @icon,
|
|
102
102
|
tooltip: @tooltip,
|
|
103
103
|
shape: @shape,
|
|
@@ -163,7 +163,7 @@ module Hakumi
|
|
|
163
163
|
|
|
164
164
|
merged_html_options = { class: "hakumi-float-button-group-item" }.merge(item_html_options)
|
|
165
165
|
|
|
166
|
-
render
|
|
166
|
+
render HakumiComponents::FloatButton::Component.new(**component_options, **merged_html_options)
|
|
167
167
|
end
|
|
168
168
|
|
|
169
169
|
def floating_style
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module FloatButton
|
|
5
5
|
module GroupCluster
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
DIRECTIONS = [ :horizontal, :vertical ].freeze
|
|
8
8
|
GAP_SIZES = {
|
|
9
9
|
small: "8px",
|
|
@@ -11,7 +11,7 @@ module Hakumi
|
|
|
11
11
|
large: "24px"
|
|
12
12
|
}.freeze
|
|
13
13
|
|
|
14
|
-
PLACEMENTS =
|
|
14
|
+
PLACEMENTS = HakumiComponents::FloatButton::Component::PLACEMENTS
|
|
15
15
|
|
|
16
16
|
def initialize(
|
|
17
17
|
groups:,
|
|
@@ -121,7 +121,7 @@ module Hakumi
|
|
|
121
121
|
|
|
122
122
|
normalized[:floating] = false unless normalized.key?(:floating)
|
|
123
123
|
|
|
124
|
-
component =
|
|
124
|
+
component = HakumiComponents::FloatButton::Group::Component.new(**normalized)
|
|
125
125
|
content_block ? render(component, &content_block) : render(component)
|
|
126
126
|
end
|
|
127
127
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Form
|
|
5
5
|
module Item
|
|
6
6
|
# Hakumi Form Item component
|
|
@@ -8,18 +8,18 @@ module Hakumi
|
|
|
8
8
|
# This is the central component that all form inputs should use or delegate to
|
|
9
9
|
#
|
|
10
10
|
# @example Basic usage
|
|
11
|
-
# <%= render
|
|
12
|
-
# <%= render
|
|
11
|
+
# <%= render HakumiComponents::Form::Item::Component.new(label: "Email") do %>
|
|
12
|
+
# <%= render HakumiComponents::Input::Component.new(name: "email", standalone: true) %>
|
|
13
13
|
# <% end %>
|
|
14
14
|
#
|
|
15
15
|
# @example With error
|
|
16
|
-
# <%= render
|
|
16
|
+
# <%= render HakumiComponents::Form::Item::Component.new(
|
|
17
17
|
# label: "Email",
|
|
18
18
|
# errors: ["can't be blank"]
|
|
19
19
|
# ) do %>
|
|
20
|
-
# <%= render
|
|
20
|
+
# <%= render HakumiComponents::Input::Component.new(name: "email", standalone: true) %>
|
|
21
21
|
# <% end %>
|
|
22
|
-
class Component <
|
|
22
|
+
class Component < HakumiComponents::BaseComponent
|
|
23
23
|
def initialize(
|
|
24
24
|
label: nil,
|
|
25
25
|
caption: nil,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Grid
|
|
5
5
|
module Row
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
JUSTIFY_OPTIONS = [ :start, :end, :center, :"space-around", :"space-between" ].freeze
|
|
8
8
|
ALIGN_OPTIONS = [ :top, :middle, :bottom ].freeze
|
|
9
9
|
|