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
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
<span class="hakumi-steps-icon hakumi-steps-icon-dot"></span>
|
|
11
11
|
<% elsif item.icon %>
|
|
12
12
|
<span class="hakumi-steps-icon">
|
|
13
|
-
<%= render
|
|
13
|
+
<%= render HakumiComponents::Icon::Component.new(name: item.icon, spin: item.icon_spin) %>
|
|
14
14
|
</span>
|
|
15
15
|
<% elsif computed_status == :finish %>
|
|
16
16
|
<span class="hakumi-steps-icon">
|
|
17
|
-
<%= render
|
|
17
|
+
<%= render HakumiComponents::Icon::Component.new(name: :check) %>
|
|
18
18
|
</span>
|
|
19
19
|
<% elsif computed_status == :error %>
|
|
20
20
|
<span class="hakumi-steps-icon">
|
|
21
|
-
<%= render
|
|
21
|
+
<%= render HakumiComponents::Icon::Component.new(name: :close) %>
|
|
22
22
|
</span>
|
|
23
23
|
<% else %>
|
|
24
24
|
<span class="hakumi-steps-icon"><%= index + 1 %></span>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
</div>
|
|
47
47
|
<% end %>
|
|
48
48
|
<% if item.tooltip.present? %>
|
|
49
|
-
<%= render
|
|
49
|
+
<%= render HakumiComponents::Tooltip::Component.new(title: item.tooltip) do %>
|
|
50
50
|
<div class="hakumi-steps-item-container"><%= container_content %></div>
|
|
51
51
|
<% end %>
|
|
52
52
|
<% else %>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Steps
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
DIRECTIONS = %i[horizontal vertical].freeze
|
|
7
7
|
TYPES = %i[default navigation inline].freeze
|
|
8
8
|
SIZES = %i[default small].freeze
|
|
@@ -21,7 +21,7 @@ module Hakumi
|
|
|
21
21
|
disabled: false,
|
|
22
22
|
**options
|
|
23
23
|
) do
|
|
24
|
-
|
|
24
|
+
HakumiComponents::Steps::Item::Component.new(
|
|
25
25
|
title: title,
|
|
26
26
|
subtitle: subtitle,
|
|
27
27
|
description: description,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Steps
|
|
5
5
|
module Item
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
STATUSES = %i[wait process finish error].freeze
|
|
8
8
|
|
|
9
9
|
def initialize(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Switch
|
|
5
|
-
class Component <
|
|
6
|
-
include
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
|
+
include HakumiComponents::Concerns::FormField
|
|
7
7
|
|
|
8
8
|
SIZES = [ :small, :middle, :large ].freeze
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Table
|
|
5
5
|
module ColumnGroup
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
renders_many :columns, types: {
|
|
8
8
|
column: {
|
|
9
9
|
renders: lambda do |title:, data_index: nil, key: nil, align: nil, width: nil, ellipsis: false,
|
|
@@ -11,7 +11,7 @@ module Hakumi
|
|
|
11
11
|
filters: nil, filter_multiple: true, filtered_value: nil, default_filtered_value: nil,
|
|
12
12
|
filter_mode: nil, filter_search: nil, hidden: false, on_cell: nil, class_name: nil,
|
|
13
13
|
**options, &block|
|
|
14
|
-
|
|
14
|
+
HakumiComponents::Table::Column::Component.new(
|
|
15
15
|
title: title,
|
|
16
16
|
data_index: data_index,
|
|
17
17
|
key: key,
|
|
@@ -39,7 +39,7 @@ module Hakumi
|
|
|
39
39
|
},
|
|
40
40
|
group: {
|
|
41
41
|
renders: lambda do |title:, key: nil, align: nil, width: nil, hidden: false, **options, &block|
|
|
42
|
-
|
|
42
|
+
HakumiComponents::Table::ColumnGroup::Component.new(
|
|
43
43
|
title: title,
|
|
44
44
|
key: key,
|
|
45
45
|
align: align,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Table
|
|
5
5
|
# A complex Table component supporting sorting, filtering, selection, expansion, and editing.
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
include Concerns::Columns
|
|
8
8
|
include Concerns::Editable
|
|
9
9
|
include Concerns::FixedColumns
|
|
@@ -28,7 +28,7 @@ module Hakumi
|
|
|
28
28
|
filters: nil, filter_multiple: true, filtered_value: nil, default_filtered_value: nil,
|
|
29
29
|
filter_mode: nil, filter_search: nil, hidden: false, on_cell: nil, class_name: nil,
|
|
30
30
|
**options, &block|
|
|
31
|
-
|
|
31
|
+
HakumiComponents::Table::Column::Component.new(
|
|
32
32
|
title: title,
|
|
33
33
|
data_index: data_index,
|
|
34
34
|
key: key,
|
|
@@ -56,7 +56,7 @@ module Hakumi
|
|
|
56
56
|
},
|
|
57
57
|
group: {
|
|
58
58
|
renders: lambda do |title:, key: nil, align: nil, width: nil, hidden: false, **options, &block|
|
|
59
|
-
|
|
59
|
+
HakumiComponents::Table::ColumnGroup::Component.new(
|
|
60
60
|
title: title,
|
|
61
61
|
key: key,
|
|
62
62
|
align: align,
|
|
@@ -400,7 +400,7 @@ module Hakumi
|
|
|
400
400
|
@empty_text
|
|
401
401
|
end
|
|
402
402
|
else
|
|
403
|
-
render(
|
|
403
|
+
render(HakumiComponents::Empty::Component.new)
|
|
404
404
|
end
|
|
405
405
|
end
|
|
406
406
|
|
|
@@ -413,14 +413,14 @@ module Hakumi
|
|
|
413
413
|
normalized = normalize_pagination_options(options)
|
|
414
414
|
return nil unless normalized
|
|
415
415
|
|
|
416
|
-
|
|
416
|
+
HakumiComponents::Pagination::Component.new(**normalized)
|
|
417
417
|
end
|
|
418
418
|
|
|
419
419
|
def ajax_pagination_component
|
|
420
420
|
return nil unless @data_url && @pagination
|
|
421
421
|
|
|
422
422
|
options = @pagination.is_a?(Hash) ? @pagination : {}
|
|
423
|
-
|
|
423
|
+
HakumiComponents::Pagination::Component.new(
|
|
424
424
|
current: 1,
|
|
425
425
|
page_size: options[:page_size] || 10,
|
|
426
426
|
total: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Table
|
|
5
5
|
module Concerns
|
|
6
6
|
# Column normalization and management for Table component
|
|
@@ -51,9 +51,9 @@ module Hakumi
|
|
|
51
51
|
def normalize_columns(columns)
|
|
52
52
|
Array(columns).filter_map do |column|
|
|
53
53
|
column = column.public_send(:to_h) if column.respond_to?(:to_h)
|
|
54
|
-
if column ==
|
|
54
|
+
if column == HakumiComponents::Table::Component::SELECTION_COLUMN
|
|
55
55
|
selection_column_definition
|
|
56
|
-
elsif column ==
|
|
56
|
+
elsif column == HakumiComponents::Table::Component::EXPAND_COLUMN
|
|
57
57
|
expand_column_definition
|
|
58
58
|
elsif column.is_a?(Hash)
|
|
59
59
|
normalize_column(column)
|
|
@@ -71,7 +71,7 @@ module Hakumi
|
|
|
71
71
|
normalized[:responsive] = normalize_responsive_breakpoints(normalized[:responsive])
|
|
72
72
|
normalized[:width] = dimension_to_css(normalized[:width])
|
|
73
73
|
normalized[:fixed] = normalized[:fixed]&.to_sym if normalized[:fixed]
|
|
74
|
-
normalized[:fixed] = nil unless
|
|
74
|
+
normalized[:fixed] = nil unless HakumiComponents::Table::Component::FIXED_SIDES.include?(normalized[:fixed])
|
|
75
75
|
normalized[:editable] = normalize_column_editable(normalized[:editable])
|
|
76
76
|
normalized[:should_cell_update] = normalize_should_cell_update(normalized[:should_cell_update])
|
|
77
77
|
if normalized[:children]
|
|
@@ -97,8 +97,8 @@ module Hakumi
|
|
|
97
97
|
|
|
98
98
|
if columns.any? { |col| col.is_a?(Hash) && col[:selection] }
|
|
99
99
|
columns
|
|
100
|
-
elsif columns.any? { |col| col ==
|
|
101
|
-
columns.map { |col| col ==
|
|
100
|
+
elsif columns.any? { |col| col == HakumiComponents::Table::Component::SELECTION_COLUMN }
|
|
101
|
+
columns.map { |col| col == HakumiComponents::Table::Component::SELECTION_COLUMN ? selection_column_definition : col }
|
|
102
102
|
else
|
|
103
103
|
[ selection_column_definition, *columns ]
|
|
104
104
|
end
|
|
@@ -110,8 +110,8 @@ module Hakumi
|
|
|
110
110
|
|
|
111
111
|
if columns.any? { |col| col.is_a?(Hash) && col[:expand] }
|
|
112
112
|
columns
|
|
113
|
-
elsif columns.any? { |col| col ==
|
|
114
|
-
columns.map { |col| col ==
|
|
113
|
+
elsif columns.any? { |col| col == HakumiComponents::Table::Component::EXPAND_COLUMN }
|
|
114
|
+
columns.map { |col| col == HakumiComponents::Table::Component::EXPAND_COLUMN ? expand_column_definition : col }
|
|
115
115
|
else
|
|
116
116
|
[ expand_column_definition, *columns ]
|
|
117
117
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Table
|
|
5
5
|
module Concerns
|
|
6
6
|
# Text ellipsis and tooltip handling for Table cells
|
|
@@ -55,7 +55,7 @@ module Hakumi
|
|
|
55
55
|
title = title.to_s if title.respond_to?(:to_s)
|
|
56
56
|
return nil if title.blank?
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
HakumiComponents::Tooltip::Component.new(**{ title: title }.merge(options))
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
<%= tag.div(class: "hakumi-tabs-tab-btn") do %>
|
|
15
15
|
<% if item.icon %>
|
|
16
16
|
<%= tag.span(class: "hakumi-tabs-tab-icon") do %>
|
|
17
|
-
<%= render
|
|
17
|
+
<%= render HakumiComponents::Icon::Component.new(name: item.icon) %>
|
|
18
18
|
<% end %>
|
|
19
19
|
<% end %>
|
|
20
20
|
<%= tag.span(item.label || item.key, class: "hakumi-tabs-tab-label") %>
|
|
21
21
|
<% end %>
|
|
22
22
|
<% if item.closable %>
|
|
23
|
-
<%= render
|
|
23
|
+
<%= render HakumiComponents::Button::Component.new(
|
|
24
24
|
type: :text,
|
|
25
25
|
size: :small,
|
|
26
26
|
icon: item.render_close_icon,
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<% if add_icon %>
|
|
42
42
|
<%= add_icon %>
|
|
43
43
|
<% else %>
|
|
44
|
-
<%= render
|
|
44
|
+
<%= render HakumiComponents::Icon::Component.new(name: :plus) %>
|
|
45
45
|
<% end %>
|
|
46
46
|
</div>
|
|
47
47
|
<% end %>
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<% end %>
|
|
53
53
|
|
|
54
54
|
<%= tag.div(class: "hakumi-tabs-nav-operations", style: "display: none;", data: { "hakumi--tabs-target": "operations" }) do %>
|
|
55
|
-
<%= render
|
|
55
|
+
<%= render HakumiComponents::Select::Component.new(
|
|
56
56
|
name: "tabs_overflow_select",
|
|
57
57
|
options: items.map { |item| [item.label || item.key, item.key] },
|
|
58
58
|
variant: :borderless,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Tabs
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
TYPES = %i[line card editable_card].freeze
|
|
7
7
|
SIZES = %i[large middle small].freeze
|
|
8
8
|
TAB_POSITIONS = %i[top bottom left right].freeze
|
|
@@ -19,7 +19,7 @@ module Hakumi
|
|
|
19
19
|
**options,
|
|
20
20
|
&block
|
|
21
21
|
) do
|
|
22
|
-
item =
|
|
22
|
+
item = HakumiComponents::Tabs::Item::Component.new(
|
|
23
23
|
key: key,
|
|
24
24
|
label: label,
|
|
25
25
|
icon: icon,
|
|
@@ -148,7 +148,7 @@ module Hakumi
|
|
|
148
148
|
|
|
149
149
|
def close_button_template_html
|
|
150
150
|
@close_button_template_html ||= ApplicationController.render(
|
|
151
|
-
|
|
151
|
+
HakumiComponents::Button::Component.new(
|
|
152
152
|
type: :text,
|
|
153
153
|
size: :small,
|
|
154
154
|
icon: :close,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Tag
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
COLORS = %i[magenta red volcano orange gold lime green cyan blue geekblue purple].freeze
|
|
7
7
|
STATUSES = %i[success processing error default warning].freeze
|
|
8
8
|
VARIANTS = %i[filled outlined borderless].freeze
|
|
@@ -94,7 +94,7 @@ module Hakumi
|
|
|
94
94
|
|
|
95
95
|
icon_name = @close_icon || "close"
|
|
96
96
|
tag.span(class: "hakumi-tag-close-icon", data: { action: "click->hakumi--tag#close" }) do
|
|
97
|
-
render
|
|
97
|
+
render HakumiComponents::Icon::Component.new(name: icon_name, size: 12)
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
data-hakumi--time-picker-target="clearBtn"
|
|
9
9
|
data-action="click->hakumi--time-picker#clear"
|
|
10
10
|
style="<%= current_value.present? ? '' : 'display: none;' %>">
|
|
11
|
-
<%= render
|
|
11
|
+
<%= render HakumiComponents::Icon::Component.new(name: :close_circle, theme: :filled) %>
|
|
12
12
|
</span>
|
|
13
13
|
<% end %>
|
|
14
14
|
|
|
15
15
|
<span class="hakumi-time-picker-suffix">
|
|
16
|
-
<%= render
|
|
16
|
+
<%= render HakumiComponents::Icon::Component.new(name: :clock_circle, fallback_to_outlined: true) %>
|
|
17
17
|
</span>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module TimePicker
|
|
5
5
|
# Hakumi TimePicker component
|
|
6
6
|
# A time selection input with dropdown panels for hours, minutes, seconds, and period.
|
|
7
|
-
class Component <
|
|
8
|
-
include
|
|
7
|
+
class Component < HakumiComponents::BaseComponent
|
|
8
|
+
include HakumiComponents::Concerns::FormField
|
|
9
9
|
|
|
10
10
|
SIZES = [ :small, :middle, :large ].freeze
|
|
11
11
|
VARIANTS = [ :default, :borderless, :filled ].freeze
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Timeline
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
DIRECTIONS = %i[vertical horizontal].freeze
|
|
7
7
|
MODES = %i[left right alternate].freeze
|
|
8
8
|
VARIANTS = %i[filled outlined].freeze
|
|
@@ -18,7 +18,7 @@ module Hakumi
|
|
|
18
18
|
&block
|
|
19
19
|
) do
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
HakumiComponents::Timeline::Item::Component.new(
|
|
22
22
|
title: title,
|
|
23
23
|
body: body,
|
|
24
24
|
color: color,
|
|
@@ -111,7 +111,7 @@ module Hakumi
|
|
|
111
111
|
def pending_item
|
|
112
112
|
return if pending.nil?
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
HakumiComponents::Timeline::Item::Component.new(
|
|
115
115
|
title: nil,
|
|
116
116
|
body: pending.is_a?(String) ? pending : nil,
|
|
117
117
|
loading: true,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Timeline
|
|
5
5
|
module Item
|
|
6
|
-
class Component <
|
|
6
|
+
class Component < HakumiComponents::BaseComponent
|
|
7
7
|
COLORS = {
|
|
8
8
|
blue: "var(--color-primary)",
|
|
9
9
|
red: "var(--color-error)",
|
|
@@ -90,7 +90,7 @@ module Hakumi
|
|
|
90
90
|
elsif dot.present?
|
|
91
91
|
dot
|
|
92
92
|
elsif loading
|
|
93
|
-
render(
|
|
93
|
+
render(HakumiComponents::Icon::Component.new(name: :loading, spin: true, size: 12))
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Tooltip
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
TRIGGERS = %i[hover focus click].freeze
|
|
7
7
|
PLACEMENTS = %i[
|
|
8
8
|
top top_left top_right
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Tour
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
SIZES = %w[small default large].freeze
|
|
7
7
|
TYPES = %w[default primary].freeze
|
|
8
8
|
PLACEMENTS = %w[
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<% if show_search? %>
|
|
25
25
|
<div class="hakumi-transfer-search">
|
|
26
26
|
<span class="hakumi-transfer-search-icon">
|
|
27
|
-
<%= render
|
|
27
|
+
<%= render HakumiComponents::Icon::Component.new(name: :search) %>
|
|
28
28
|
</span>
|
|
29
29
|
<input
|
|
30
30
|
type="search"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
data-action="click->hakumi--transfer#moveToTarget"
|
|
81
81
|
<%= "disabled" if disabled? %>>
|
|
82
82
|
<span class="hakumi-transfer-control-icon">
|
|
83
|
-
<%= render
|
|
83
|
+
<%= render HakumiComponents::Icon::Component.new(name: operations[:to_target]) %>
|
|
84
84
|
</span>
|
|
85
85
|
</button>
|
|
86
86
|
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
data-action="click->hakumi--transfer#moveToSource"
|
|
93
93
|
<%= "disabled" if disabled? %>>
|
|
94
94
|
<span class="hakumi-transfer-control-icon">
|
|
95
|
-
<%= render
|
|
95
|
+
<%= render HakumiComponents::Icon::Component.new(name: operations[:to_source]) %>
|
|
96
96
|
</span>
|
|
97
97
|
</button>
|
|
98
98
|
<% end %>
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
<% if show_search? %>
|
|
124
124
|
<div class="hakumi-transfer-search">
|
|
125
125
|
<span class="hakumi-transfer-search-icon">
|
|
126
|
-
<%= render
|
|
126
|
+
<%= render HakumiComponents::Icon::Component.new(name: :search) %>
|
|
127
127
|
</span>
|
|
128
128
|
<input
|
|
129
129
|
type="search"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Transfer
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
DEFAULT_TITLES = [ "Source", "Target" ].freeze
|
|
7
7
|
|
|
8
8
|
def self.extract_controller_locals(params)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module HakumiComponents
|
|
4
4
|
module Tree
|
|
5
|
-
class Component <
|
|
5
|
+
class Component < HakumiComponents::BaseComponent
|
|
6
6
|
DEFAULT_INDENT = 24
|
|
7
7
|
|
|
8
8
|
def self.extract_controller_locals(params)
|
|
@@ -128,13 +128,13 @@ module Hakumi
|
|
|
128
128
|
|
|
129
129
|
switcher_content = if switcher_conf[:default]
|
|
130
130
|
content_tag(:span, class: "hakumi-tree-switcher-icon") do
|
|
131
|
-
render
|
|
131
|
+
render HakumiComponents::Icon::Component.new(name: switcher_conf[:default])
|
|
132
132
|
end
|
|
133
133
|
else
|
|
134
134
|
content_tag(:span, class: "hakumi-tree-switcher-icon hakumi-tree-switcher-dual") do
|
|
135
135
|
safe_join([
|
|
136
|
-
content_tag(:span, class: "hakumi-tree-icon-collapse") { render
|
|
137
|
-
content_tag(:span, class: "hakumi-tree-icon-expand") { render
|
|
136
|
+
content_tag(:span, class: "hakumi-tree-icon-collapse") { render HakumiComponents::Icon::Component.new(name: switcher_conf[:collapse]) },
|
|
137
|
+
content_tag(:span, class: "hakumi-tree-icon-expand") { render HakumiComponents::Icon::Component.new(name: switcher_conf[:expand]) }
|
|
138
138
|
])
|
|
139
139
|
end
|
|
140
140
|
end
|
|
@@ -151,7 +151,7 @@ module Hakumi
|
|
|
151
151
|
|
|
152
152
|
# Icon handling
|
|
153
153
|
icon_content = if @icon.present?
|
|
154
|
-
render
|
|
154
|
+
render HakumiComponents::Icon::Component.new(name: @icon)
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
icon_style = @icon.present? ? nil : "display: none"
|
|
@@ -392,13 +392,13 @@ module Hakumi
|
|
|
392
392
|
content_tag(:span, "", class: "hakumi-tree-switcher-noop")
|
|
393
393
|
elsif switcher_conf[:default]
|
|
394
394
|
content_tag(:span, class: "hakumi-tree-switcher-icon") do
|
|
395
|
-
render
|
|
395
|
+
render HakumiComponents::Icon::Component.new(name: switcher_conf[:default])
|
|
396
396
|
end
|
|
397
397
|
else
|
|
398
398
|
content_tag(:span, class: "hakumi-tree-switcher-icon hakumi-tree-switcher-dual") do
|
|
399
399
|
safe_join([
|
|
400
|
-
content_tag(:span, class: "hakumi-tree-icon-collapse") { render
|
|
401
|
-
content_tag(:span, class: "hakumi-tree-icon-expand") { render
|
|
400
|
+
content_tag(:span, class: "hakumi-tree-icon-collapse") { render HakumiComponents::Icon::Component.new(name: switcher_conf[:collapse]) },
|
|
401
|
+
content_tag(:span, class: "hakumi-tree-icon-expand") { render HakumiComponents::Icon::Component.new(name: switcher_conf[:expand]) }
|
|
402
402
|
])
|
|
403
403
|
end
|
|
404
404
|
end
|
|
@@ -445,7 +445,7 @@ module Hakumi
|
|
|
445
445
|
return if icon_name.blank?
|
|
446
446
|
|
|
447
447
|
content_tag(:span, class: "hakumi-tree-icon") do
|
|
448
|
-
render
|
|
448
|
+
render HakumiComponents::Icon::Component.new(name: icon_name)
|
|
449
449
|
end
|
|
450
450
|
end
|
|
451
451
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<% if has_prefix? %>
|
|
13
13
|
<span class="hakumi-tree-select-prefix">
|
|
14
14
|
<% if prefix_icon %>
|
|
15
|
-
<%= render
|
|
15
|
+
<%= render HakumiComponents::Icon::Component.new(name: prefix_icon) %>
|
|
16
16
|
<% else %>
|
|
17
17
|
<%= prefix %>
|
|
18
18
|
<% end %>
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
data-action="click->hakumi--tree-select#clear"
|
|
40
40
|
data-hakumi--tree-select-target="clearBtn"
|
|
41
41
|
style="<%= has_value? ? '' : 'display: none;' %>">
|
|
42
|
-
<%= render
|
|
42
|
+
<%= render HakumiComponents::Icon::Component.new(name: :close_circle, theme: :filled) %>
|
|
43
43
|
</span>
|
|
44
44
|
<% end %>
|
|
45
45
|
|
|
46
46
|
<span class="hakumi-tree-select-arrow">
|
|
47
|
-
<%= render
|
|
47
|
+
<%= render HakumiComponents::Icon::Component.new(name: :down) %>
|
|
48
48
|
</span>
|
|
49
49
|
|
|
50
50
|
<div class="hakumi-tree-select-dropdown hakumi-tree-select-dropdown-hidden" data-hakumi--tree-select-target="dropdown">
|
|
51
51
|
<% if empty_options? %>
|
|
52
|
-
<%= render
|
|
52
|
+
<%= render HakumiComponents::Empty::Component.new(description: "No Data") %>
|
|
53
53
|
<% else %>
|
|
54
|
-
<%= render
|
|
54
|
+
<%= render HakumiComponents::Tree::Component.new(**tree_component_options) %>
|
|
55
55
|
<% end %>
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|