loco_motion-rails 0.4.0 → 0.5.0
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/README.md +6 -1
- data/app/components/daisy/actions/button_component.html.haml +2 -2
- data/app/components/daisy/actions/button_component.rb +98 -59
- data/app/components/daisy/actions/dropdown_component.html.haml +1 -2
- data/app/components/daisy/actions/dropdown_component.rb +7 -10
- data/app/components/daisy/actions/modal_component.html.haml +10 -8
- data/app/components/daisy/actions/modal_component.rb +6 -6
- data/app/components/daisy/actions/swap_component.rb +13 -9
- data/app/components/daisy/actions/theme_controller.js +113 -0
- data/app/components/daisy/actions/theme_controller_component.rb +58 -17
- data/app/components/daisy/actions/theme_preview_component.html.haml +5 -0
- data/app/components/daisy/actions/theme_preview_component.rb +68 -0
- data/app/components/daisy/data_display/accordion_component.html.haml +0 -1
- data/app/components/daisy/data_display/accordion_component.rb +10 -3
- data/app/components/daisy/data_display/avatar_component.html.haml +1 -1
- data/app/components/daisy/data_display/avatar_component.rb +17 -7
- data/app/components/daisy/data_display/badge_component.rb +122 -4
- data/app/components/daisy/data_display/card_component.html.haml +1 -1
- data/app/components/daisy/data_display/card_component.rb +20 -6
- data/app/components/daisy/data_display/chat_component.rb +2 -2
- data/app/components/daisy/data_display/collapse_component.rb +9 -5
- data/app/components/daisy/data_display/countdown_component.rb +15 -5
- data/app/components/daisy/data_display/figure_component.rb +8 -3
- data/app/components/daisy/data_display/kbd_component.rb +13 -4
- data/app/components/daisy/data_display/list_component.html.haml +5 -0
- data/app/components/daisy/data_display/list_component.rb +82 -0
- data/app/components/daisy/data_display/list_item_component.rb +39 -0
- data/app/components/daisy/data_display/stat_component.html.haml +5 -6
- data/app/components/daisy/data_display/stat_component.rb +21 -8
- data/app/components/daisy/data_display/status_component.rb +47 -0
- data/app/components/daisy/data_display/timeline_component.rb +1 -1
- data/app/components/daisy/data_input/cally_component.html.haml +14 -0
- data/app/components/daisy/data_input/cally_component.rb +182 -0
- data/app/components/daisy/data_input/cally_input_component.html.haml +5 -0
- data/app/components/daisy/data_input/cally_input_component.rb +165 -0
- data/app/components/daisy/data_input/cally_input_controller.js +235 -0
- data/app/components/daisy/data_input/checkbox_component.html.haml +20 -0
- data/app/components/daisy/data_input/checkbox_component.rb +21 -7
- data/app/components/daisy/data_input/fieldset_component.html.haml +8 -0
- data/app/components/daisy/data_input/fieldset_component.rb +57 -0
- data/app/components/daisy/data_input/file_input_component.rb +6 -0
- data/app/components/daisy/data_input/filter_component.html.haml +3 -0
- data/app/components/daisy/data_input/filter_component.rb +221 -0
- data/app/components/daisy/data_input/label_component.rb +2 -2
- data/app/components/daisy/data_input/radio_button_component.rb +1 -1
- data/app/components/daisy/data_input/rating_component.html.haml +0 -2
- data/app/components/daisy/data_input/rating_component.rb +3 -2
- data/app/components/daisy/data_input/select_component.html.haml +27 -15
- data/app/components/daisy/data_input/select_component.rb +152 -10
- data/app/components/daisy/data_input/text_area_component.rb +11 -8
- data/app/components/daisy/data_input/text_input_component.html.haml +25 -4
- data/app/components/daisy/data_input/text_input_component.rb +38 -36
- data/app/components/daisy/data_input/toggle_component.rb +12 -0
- data/app/components/daisy/feedback/alert_component.html.haml +1 -1
- data/app/components/daisy/feedback/alert_component.rb +86 -2
- data/app/components/daisy/feedback/loading_component.rb +10 -3
- data/app/components/daisy/feedback/skeleton_component.rb +1 -1
- data/app/components/daisy/layout/divider_component.rb +4 -2
- data/app/components/daisy/layout/drawer_component.html.haml +0 -1
- data/app/components/daisy/layout/footer_component.rb +6 -6
- data/app/components/daisy/mockup/device_component.rb +15 -18
- data/app/components/daisy/navigation/breadcrumbs_component.html.haml +0 -1
- data/app/components/daisy/navigation/breadcrumbs_component.rb +84 -9
- data/app/components/daisy/navigation/dock_component.rb +146 -0
- data/app/components/daisy/navigation/link_component.rb +18 -9
- data/app/components/daisy/navigation/menu_component.rb +15 -9
- data/app/components/daisy/navigation/navbar_component.html.haml +1 -1
- data/app/components/daisy/navigation/navbar_component.rb +2 -13
- data/app/components/daisy/navigation/steps_component.rb +6 -6
- data/app/components/daisy/navigation/tabs_component.html.haml +0 -1
- data/app/components/daisy/navigation/tabs_component.rb +26 -16
- data/app/components/hero/icon_component.rb +15 -5
- data/app/helpers/daisy/form_builder_helper.rb +30 -3
- data/app/views/examples/daisy/data_input/filters.html.haml +62 -0
- data/lib/hero.rb +1 -1
- data/lib/loco_motion/base_component.rb +44 -1
- data/lib/loco_motion/component_config.rb +1 -0
- data/lib/loco_motion/concerns/iconable_component.rb +134 -0
- data/lib/loco_motion/concerns/labelable_component.rb +142 -0
- data/lib/loco_motion/concerns/linkable_component.rb +40 -0
- data/lib/loco_motion/concerns/tippable_component.rb +25 -10
- data/lib/loco_motion/helpers.rb +27 -18
- data/lib/loco_motion/patches/view_component/slot_loco_parent_patch.rb +37 -0
- data/lib/loco_motion/patches/view_component/slotable_default_patch.rb +21 -0
- data/lib/loco_motion/version.rb +1 -1
- data/lib/loco_motion.rb +12 -2
- metadata +65 -19
- data/app/components/daisy/actions/theme_controller_component.html.haml +0 -5
- data/app/components/daisy/layout/artboard_component.rb +0 -59
- data/app/components/daisy/navigation/bottom_nav_component.rb +0 -138
@@ -0,0 +1,40 @@
|
|
1
|
+
require "active_support/concern"
|
2
|
+
|
3
|
+
module LocoMotion
|
4
|
+
module Concerns
|
5
|
+
#
|
6
|
+
# Include this module to enable link functionality in a component.
|
7
|
+
# When an href is provided, the component will render as an <a> tag.
|
8
|
+
#
|
9
|
+
module LinkableComponent
|
10
|
+
extend ActiveSupport::Concern
|
11
|
+
|
12
|
+
included do |base|
|
13
|
+
base.register_component_initializer(:_initialize_linkable_component)
|
14
|
+
base.register_component_setup(:_setup_linkable_component)
|
15
|
+
end
|
16
|
+
|
17
|
+
protected
|
18
|
+
|
19
|
+
#
|
20
|
+
# Initialize link-related options.
|
21
|
+
#
|
22
|
+
def _initialize_linkable_component
|
23
|
+
@href = config_option(:href)
|
24
|
+
@target = config_option(:target)
|
25
|
+
@title = config_option(:title)
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# Sets the component's tag to <a> if an href is provided and configures the
|
30
|
+
# appropriate HTML attributes.
|
31
|
+
#
|
32
|
+
def _setup_linkable_component
|
33
|
+
if @href
|
34
|
+
set_tag_name(:component, :a)
|
35
|
+
add_html(:component, { href: @href, target: @target, title: @title })
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -1,24 +1,39 @@
|
|
1
|
+
require "active_support/concern"
|
2
|
+
|
1
3
|
module LocoMotion
|
2
4
|
module Concerns
|
3
5
|
#
|
4
|
-
# Can be included in relevant components to allow a
|
6
|
+
# Can be included in relevant components to allow a `tip` attribute that
|
5
7
|
# automatically adds the `tooltip` CSS class and the `data-tip` attribute
|
6
8
|
# to the component.
|
7
9
|
#
|
8
10
|
module TippableComponent
|
11
|
+
extend ActiveSupport::Concern
|
12
|
+
|
13
|
+
included do |base|
|
14
|
+
base.register_component_initializer(:_initialize_tippable_component)
|
15
|
+
base.register_component_setup(:_setup_tippable_component)
|
16
|
+
end
|
17
|
+
|
18
|
+
protected
|
19
|
+
|
9
20
|
#
|
10
|
-
#
|
11
|
-
# the `data-tip` attribute to the component if the `tip` attribute is
|
12
|
-
# present.
|
21
|
+
# Initialize tooltip-related options.
|
13
22
|
#
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
tip = config_option(:tip)
|
23
|
+
# @option kws tip [String] The tooltip text to display when hovering
|
24
|
+
#
|
25
|
+
def _initialize_tippable_component
|
26
|
+
@tip = config_option(:tip)
|
27
|
+
end
|
18
28
|
|
19
|
-
|
29
|
+
#
|
30
|
+
# Configure tooltip functionality for the component.
|
31
|
+
# Adds the `tooltip` CSS class and the `data-tip` attribute if a tip is provided.
|
32
|
+
#
|
33
|
+
def _setup_tippable_component
|
34
|
+
if @tip
|
20
35
|
add_css(:component, "tooltip")
|
21
|
-
add_html(:component, { data: { tip: tip } })
|
36
|
+
add_html(:component, { data: { tip: @tip } })
|
22
37
|
end
|
23
38
|
end
|
24
39
|
end
|
data/lib/loco_motion/helpers.rb
CHANGED
@@ -14,36 +14,42 @@ module LocoMotion
|
|
14
14
|
"Daisy::Actions::ThemeControllerComponent" => { names: "theme_controller", group: "Actions", title: "Theme Controllers", example: "theme_controllers" },
|
15
15
|
|
16
16
|
# Data
|
17
|
-
"Daisy::DataDisplay::AccordionComponent" => { names: "accordion", group: "Data", title: "Accordions", example: "accordions" },
|
18
|
-
"Daisy::DataDisplay::AvatarComponent" => { names: "avatar", group: "Data", title: "Avatars", example: "avatars" },
|
19
|
-
"Daisy::DataDisplay::BadgeComponent" => { names: "badge", group: "Data", title: "Badges", example: "badges" },
|
20
|
-
"Daisy::DataDisplay::CardComponent" => { names: "card", group: "Data", title: "Cards", example: "cards" },
|
21
|
-
"Daisy::DataDisplay::CarouselComponent" => { names: "carousel", group: "Data", title: "Carousels", example: "carousels" },
|
22
|
-
"Daisy::DataDisplay::ChatComponent" => { names: "chat", group: "Data", title: "Chat Bubbles", example: "chat_bubbles" },
|
23
|
-
"Daisy::DataDisplay::CollapseComponent" => { names: "collapse", group: "Data", title: "Collapses", example: "collapses" },
|
24
|
-
"Daisy::DataDisplay::CountdownComponent" => { names: "countdown", group: "Data", title: "Countdowns", example: "countdowns" },
|
25
|
-
"Daisy::DataDisplay::DiffComponent" => { names: "diff", group: "Data", title: "Diffs", example: "diffs" },
|
26
|
-
"Daisy::DataDisplay::FigureComponent" => { names: "figure", group: "Data", title: "Figures", example: "figures" },
|
27
|
-
"Daisy::DataDisplay::KbdComponent" => { names: "kbd", group: "Data", title: "Keyboard (KBD)", example: "kbds" },
|
28
|
-
"Daisy::DataDisplay::
|
29
|
-
"Daisy::DataDisplay::
|
30
|
-
"Daisy::DataDisplay::
|
17
|
+
"Daisy::DataDisplay::AccordionComponent" => { names: "accordion", group: "Data Display", title: "Accordions", example: "accordions" },
|
18
|
+
"Daisy::DataDisplay::AvatarComponent" => { names: "avatar", group: "Data Display", title: "Avatars", example: "avatars" },
|
19
|
+
"Daisy::DataDisplay::BadgeComponent" => { names: "badge", group: "Data Display", title: "Badges", example: "badges" },
|
20
|
+
"Daisy::DataDisplay::CardComponent" => { names: "card", group: "Data Display", title: "Cards", example: "cards" },
|
21
|
+
"Daisy::DataDisplay::CarouselComponent" => { names: "carousel", group: "Data Display", title: "Carousels", example: "carousels" },
|
22
|
+
"Daisy::DataDisplay::ChatComponent" => { names: "chat", group: "Data Display", title: "Chat Bubbles", example: "chat_bubbles" },
|
23
|
+
"Daisy::DataDisplay::CollapseComponent" => { names: "collapse", group: "Data Display", title: "Collapses", example: "collapses" },
|
24
|
+
"Daisy::DataDisplay::CountdownComponent" => { names: "countdown", group: "Data Display", title: "Countdowns", example: "countdowns" },
|
25
|
+
"Daisy::DataDisplay::DiffComponent" => { names: "diff", group: "Data Display", title: "Diffs", example: "diffs" },
|
26
|
+
"Daisy::DataDisplay::FigureComponent" => { names: "figure", group: "Data Display", title: "Figures", example: "figures" },
|
27
|
+
"Daisy::DataDisplay::KbdComponent" => { names: "kbd", group: "Data Display", title: "Keyboard (KBD)", example: "kbds" },
|
28
|
+
"Daisy::DataDisplay::ListComponent" => { names: "list", group: "Data Display", title: "Lists", example: "lists" },
|
29
|
+
"Daisy::DataDisplay::StatComponent" => { names: "stat", group: "Data Display", title: "Stats", example: "stats" },
|
30
|
+
"Daisy::DataDisplay::StatusComponent" => { names: "status", group: "Data Display", title: "Statuses", example: "statuses" },
|
31
|
+
"Daisy::DataDisplay::TableComponent" => { names: "table", group: "Data Display", title: "Tables", example: "tables" },
|
32
|
+
"Daisy::DataDisplay::TimelineComponent" => { names: "timeline", group: "Data Display", title: "Timelines", example: "timelines" },
|
31
33
|
|
32
34
|
# Data Input
|
35
|
+
"Daisy::DataInput::CallyComponent" => { names: "cally", group: "Data Input", title: "Calendars", example: "calendars" },
|
36
|
+
"Daisy::DataInput::CallyInputComponent" => { names: "cally_input", group: "Data Input", title: "Cally Inputs", example: "cally_inputs" },
|
33
37
|
"Daisy::DataInput::CheckboxComponent" => { names: "checkbox", group: "Data Input", title: "Checkboxes", example: "checkboxes" },
|
34
38
|
"Daisy::DataInput::FileInputComponent" => { names: "file_input", group: "Data Input", title: "File Inputs", example: "file_inputs" },
|
39
|
+
"Daisy::DataInput::FieldsetComponent" => { names: "fieldset", group: "Data Input", title: "Fieldsets", example: "fieldsets" },
|
40
|
+
"Daisy::DataInput::FilterComponent" => { names: "filter", group: "Data Input", title: "Filters", example: "filters" },
|
35
41
|
"Daisy::DataInput::LabelComponent" => { names: "label", group: "Data Input", title: "Labels", example: "labels" },
|
36
42
|
"Daisy::DataInput::RadioButtonComponent" => { names: "radio", group: "Data Input", title: "Radio Buttons", example: "radio_buttons" },
|
37
43
|
"Daisy::DataInput::RangeComponent" => { names: "range", group: "Data Input", title: "Ranges", example: "ranges" },
|
38
44
|
"Daisy::DataInput::RatingComponent" => { names: "rating", group: "Data Input", title: "Ratings", example: "ratings" },
|
39
45
|
"Daisy::DataInput::SelectComponent" => { names: "select", group: "Data Input", title: "Selects", example: "selects" },
|
40
|
-
"Daisy::DataInput::TextInputComponent" => { names: "text_input", group: "Data Input", title: "Text Inputs", example: "text_inputs" },
|
46
|
+
"Daisy::DataInput::TextInputComponent" => { names: ["input", "text_input"], group: "Data Input", title: "Text Inputs", example: "text_inputs" },
|
41
47
|
"Daisy::DataInput::TextAreaComponent" => { names: "text_area", group: "Data Input", title: "Text Areas", example: "text_areas" },
|
42
48
|
"Daisy::DataInput::ToggleComponent" => { names: "toggle", group: "Data Input", title: "Toggles", example: "toggles" },
|
43
49
|
|
44
50
|
# Navigation
|
45
51
|
"Daisy::Navigation::BreadcrumbsComponent" => { names: "breadcrumbs", group: "Navigation", title: "Breadcrumbs", example: "breadcrumbs" },
|
46
|
-
"Daisy::Navigation::
|
52
|
+
"Daisy::Navigation::DockComponent" => { names: "dock", group: "Navigation", title: "Dock", example: "docks" },
|
47
53
|
"Daisy::Navigation::LinkComponent" => { names: "link", group: "Navigation", title: "Links", example: "links" },
|
48
54
|
"Daisy::Navigation::MenuComponent" => { names: "menu", group: "Navigation", title: "Menus", example: "menus" },
|
49
55
|
"Daisy::Navigation::NavbarComponent" => { names: "navbar", group: "Navigation", title: "Navbars", example: "navbars" },
|
@@ -61,7 +67,6 @@ module LocoMotion
|
|
61
67
|
"Daisy::Feedback::TooltipComponent" => { names: ["tooltip", "tip"], group: "Feedback", title: "Tooltips", example: "tooltips" },
|
62
68
|
|
63
69
|
# Layout
|
64
|
-
"Daisy::Layout::ArtboardComponent" => { names: "artboard", group: "Layout", title: "Artboards", example: "artboards" },
|
65
70
|
"Daisy::Layout::DividerComponent" => { names: "divider", group: "Layout", title: "Dividers", example: "dividers" },
|
66
71
|
"Daisy::Layout::DrawerComponent" => { names: "drawer", group: "Layout", title: "Drawers", example: "drawers" },
|
67
72
|
"Daisy::Layout::FooterComponent" => { names: "footer", group: "Layout", title: "Footers", example: "footers" },
|
@@ -92,6 +97,10 @@ module LocoMotion
|
|
92
97
|
end
|
93
98
|
|
94
99
|
def component_example_path(component_name)
|
100
|
+
"/examples/#{component_name}"
|
101
|
+
end
|
102
|
+
|
103
|
+
def component_partial_path(component_name)
|
95
104
|
comp = COMPONENTS[component_name]
|
96
105
|
|
97
106
|
comp_split = component_name.split("::")
|
@@ -103,6 +112,6 @@ module LocoMotion
|
|
103
112
|
"/examples/#{framework}/#{section_path}#{example}"
|
104
113
|
end
|
105
114
|
|
106
|
-
module_function :component_example_path
|
115
|
+
module_function :component_example_path, :component_partial_path
|
107
116
|
end
|
108
117
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Monkey patch ViewComponent::Slot to save the parent component
|
2
|
+
|
3
|
+
module LocoMotion
|
4
|
+
module Patches
|
5
|
+
module ViewComponent
|
6
|
+
module SlotPatch
|
7
|
+
|
8
|
+
# Set the loco parent any time the instance changes
|
9
|
+
def __vc_component_instance=(instance)
|
10
|
+
# Call the original implementation
|
11
|
+
super
|
12
|
+
|
13
|
+
# And set the Loco parent
|
14
|
+
set_loco_parent
|
15
|
+
end
|
16
|
+
|
17
|
+
def to_s
|
18
|
+
set_loco_parent
|
19
|
+
|
20
|
+
super
|
21
|
+
end
|
22
|
+
|
23
|
+
def set_loco_parent(parent = @parent)
|
24
|
+
return if parent.nil?
|
25
|
+
return if @__vc_component_instance.nil?
|
26
|
+
return if @__vc_component_instance.loco_parent.present?
|
27
|
+
|
28
|
+
@__vc_component_instance.set_loco_parent(parent)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Apply the patch
|
37
|
+
::ViewComponent::Slot.prepend(LocoMotion::Patches::ViewComponent::SlotPatch)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Monkey patch ViewComponent::SlotableDefault to modify get_slot behavior
|
2
|
+
|
3
|
+
module LocoMotion
|
4
|
+
module Patches
|
5
|
+
module ViewComponent
|
6
|
+
module SlotableDefaultPatch
|
7
|
+
# Override get_slot method
|
8
|
+
def get_slot(slot_name)
|
9
|
+
# ensure content is loaded so slots will be defined
|
10
|
+
content unless content_evaluated?
|
11
|
+
|
12
|
+
# Call the original implementation
|
13
|
+
super
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# Apply the patch
|
21
|
+
::ViewComponent::SlotableDefault.prepend(LocoMotion::Patches::ViewComponent::SlotableDefaultPatch)
|
data/lib/loco_motion/version.rb
CHANGED
data/lib/loco_motion.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require "rails"
|
2
2
|
require "haml-rails"
|
3
|
-
require "
|
3
|
+
require "rails_heroicon"
|
4
4
|
|
5
|
-
require Gem::Specification.find_by_name("
|
5
|
+
require Gem::Specification.find_by_name("rails_heroicon").gem_dir + "/lib/rails_heroicon/helper.rb"
|
6
6
|
|
7
7
|
require "view_component"
|
8
8
|
|
@@ -14,5 +14,15 @@ require "loco_motion/basic_component"
|
|
14
14
|
require "loco_motion/engine"
|
15
15
|
require "loco_motion/helpers"
|
16
16
|
|
17
|
+
# Load patches
|
18
|
+
require "loco_motion/patches/view_component/slotable_default_patch"
|
19
|
+
require "loco_motion/patches/view_component/slot_loco_parent_patch"
|
20
|
+
|
17
21
|
require "hero"
|
18
22
|
require "daisy"
|
23
|
+
|
24
|
+
begin
|
25
|
+
require "pry" if Rails.env.development?
|
26
|
+
rescue LoadError
|
27
|
+
# Don't throw an error, pry should really only be used while debugging locally
|
28
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loco_motion-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topher Fangio
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: benchmark
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0.4'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - "~>"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0.4'
|
13
26
|
- !ruby/object:Gem::Dependency
|
14
27
|
name: haml-rails
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -25,19 +38,19 @@ dependencies:
|
|
25
38
|
- !ruby/object:Gem::Version
|
26
39
|
version: '2.1'
|
27
40
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
41
|
+
name: rails_heroicon
|
29
42
|
requirement: !ruby/object:Gem::Requirement
|
30
43
|
requirements:
|
31
44
|
- - "~>"
|
32
45
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
46
|
+
version: 2.3.0
|
34
47
|
type: :runtime
|
35
48
|
prerelease: false
|
36
49
|
version_requirements: !ruby/object:Gem::Requirement
|
37
50
|
requirements:
|
38
51
|
- - "~>"
|
39
52
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
53
|
+
version: 2.3.0
|
41
54
|
- !ruby/object:Gem::Dependency
|
42
55
|
name: rails
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -47,7 +60,7 @@ dependencies:
|
|
47
60
|
version: '6.1'
|
48
61
|
- - "<"
|
49
62
|
- !ruby/object:Gem::Version
|
50
|
-
version: '8.
|
63
|
+
version: '8.1'
|
51
64
|
type: :runtime
|
52
65
|
prerelease: false
|
53
66
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,21 +70,21 @@ dependencies:
|
|
57
70
|
version: '6.1'
|
58
71
|
- - "<"
|
59
72
|
- !ruby/object:Gem::Version
|
60
|
-
version: '8.
|
73
|
+
version: '8.1'
|
61
74
|
- !ruby/object:Gem::Dependency
|
62
75
|
name: view_component
|
63
76
|
requirement: !ruby/object:Gem::Requirement
|
64
77
|
requirements:
|
65
78
|
- - "~>"
|
66
79
|
- !ruby/object:Gem::Version
|
67
|
-
version: '3.
|
80
|
+
version: '3.22'
|
68
81
|
type: :runtime
|
69
82
|
prerelease: false
|
70
83
|
version_requirements: !ruby/object:Gem::Requirement
|
71
84
|
requirements:
|
72
85
|
- - "~>"
|
73
86
|
- !ruby/object:Gem::Version
|
74
|
-
version: '3.
|
87
|
+
version: '3.22'
|
75
88
|
- !ruby/object:Gem::Dependency
|
76
89
|
name: base64
|
77
90
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,19 +226,19 @@ dependencies:
|
|
213
226
|
- !ruby/object:Gem::Version
|
214
227
|
version: '1.3'
|
215
228
|
- !ruby/object:Gem::Dependency
|
216
|
-
name:
|
229
|
+
name: rails_heroicon
|
217
230
|
requirement: !ruby/object:Gem::Requirement
|
218
231
|
requirements:
|
219
232
|
- - "~>"
|
220
233
|
- !ruby/object:Gem::Version
|
221
|
-
version:
|
234
|
+
version: 2.3.0
|
222
235
|
type: :development
|
223
236
|
prerelease: false
|
224
237
|
version_requirements: !ruby/object:Gem::Requirement
|
225
238
|
requirements:
|
226
239
|
- - "~>"
|
227
240
|
- !ruby/object:Gem::Version
|
228
|
-
version:
|
241
|
+
version: 2.3.0
|
229
242
|
- !ruby/object:Gem::Dependency
|
230
243
|
name: pry
|
231
244
|
requirement: !ruby/object:Gem::Requirement
|
@@ -350,6 +363,20 @@ dependencies:
|
|
350
363
|
- - "~>"
|
351
364
|
- !ruby/object:Gem::Version
|
352
365
|
version: 0.9.34
|
366
|
+
- !ruby/object:Gem::Dependency
|
367
|
+
name: algoliasearch-rails
|
368
|
+
requirement: !ruby/object:Gem::Requirement
|
369
|
+
requirements:
|
370
|
+
- - "~>"
|
371
|
+
- !ruby/object:Gem::Version
|
372
|
+
version: '2.2'
|
373
|
+
type: :development
|
374
|
+
prerelease: false
|
375
|
+
version_requirements: !ruby/object:Gem::Requirement
|
376
|
+
requirements:
|
377
|
+
- - "~>"
|
378
|
+
- !ruby/object:Gem::Version
|
379
|
+
version: '2.2'
|
353
380
|
description: Advanced components and Rails management with LocoMotion.
|
354
381
|
email: topher@profoundry.us
|
355
382
|
executables: []
|
@@ -366,8 +393,10 @@ files:
|
|
366
393
|
- app/components/daisy/actions/modal_component.rb
|
367
394
|
- app/components/daisy/actions/swap_component.html.haml
|
368
395
|
- app/components/daisy/actions/swap_component.rb
|
369
|
-
- app/components/daisy/actions/
|
396
|
+
- app/components/daisy/actions/theme_controller.js
|
370
397
|
- app/components/daisy/actions/theme_controller_component.rb
|
398
|
+
- app/components/daisy/actions/theme_preview_component.html.haml
|
399
|
+
- app/components/daisy/actions/theme_preview_component.rb
|
371
400
|
- app/components/daisy/data_display/accordion_component.html.haml
|
372
401
|
- app/components/daisy/data_display/accordion_component.rb
|
373
402
|
- app/components/daisy/data_display/avatar_component.html.haml
|
@@ -388,16 +417,30 @@ files:
|
|
388
417
|
- app/components/daisy/data_display/diff_component.rb
|
389
418
|
- app/components/daisy/data_display/figure_component.rb
|
390
419
|
- app/components/daisy/data_display/kbd_component.rb
|
420
|
+
- app/components/daisy/data_display/list_component.html.haml
|
421
|
+
- app/components/daisy/data_display/list_component.rb
|
422
|
+
- app/components/daisy/data_display/list_item_component.rb
|
391
423
|
- app/components/daisy/data_display/stat_component.html.haml
|
392
424
|
- app/components/daisy/data_display/stat_component.rb
|
425
|
+
- app/components/daisy/data_display/status_component.rb
|
393
426
|
- app/components/daisy/data_display/table_component.html.haml
|
394
427
|
- app/components/daisy/data_display/table_component.rb
|
395
428
|
- app/components/daisy/data_display/timeline_component.html.haml
|
396
429
|
- app/components/daisy/data_display/timeline_component.rb
|
397
430
|
- app/components/daisy/data_display/timeline_event_component.html.haml
|
398
431
|
- app/components/daisy/data_display/timeline_event_component.rb
|
432
|
+
- app/components/daisy/data_input/cally_component.html.haml
|
433
|
+
- app/components/daisy/data_input/cally_component.rb
|
434
|
+
- app/components/daisy/data_input/cally_input_component.html.haml
|
435
|
+
- app/components/daisy/data_input/cally_input_component.rb
|
436
|
+
- app/components/daisy/data_input/cally_input_controller.js
|
437
|
+
- app/components/daisy/data_input/checkbox_component.html.haml
|
399
438
|
- app/components/daisy/data_input/checkbox_component.rb
|
439
|
+
- app/components/daisy/data_input/fieldset_component.html.haml
|
440
|
+
- app/components/daisy/data_input/fieldset_component.rb
|
400
441
|
- app/components/daisy/data_input/file_input_component.rb
|
442
|
+
- app/components/daisy/data_input/filter_component.html.haml
|
443
|
+
- app/components/daisy/data_input/filter_component.rb
|
401
444
|
- app/components/daisy/data_input/label_component.rb
|
402
445
|
- app/components/daisy/data_input/radio_button_component.rb
|
403
446
|
- app/components/daisy/data_input/range_component.rb
|
@@ -417,7 +460,6 @@ files:
|
|
417
460
|
- app/components/daisy/feedback/skeleton_component.rb
|
418
461
|
- app/components/daisy/feedback/toast_component.rb
|
419
462
|
- app/components/daisy/feedback/tooltip_component.rb
|
420
|
-
- app/components/daisy/layout/artboard_component.rb
|
421
463
|
- app/components/daisy/layout/divider_component.rb
|
422
464
|
- app/components/daisy/layout/drawer_component.html.haml
|
423
465
|
- app/components/daisy/layout/drawer_component.rb
|
@@ -431,9 +473,9 @@ files:
|
|
431
473
|
- app/components/daisy/mockup/code_component.rb
|
432
474
|
- app/components/daisy/mockup/device_component.rb
|
433
475
|
- app/components/daisy/mockup/frame_component.rb
|
434
|
-
- app/components/daisy/navigation/bottom_nav_component.rb
|
435
476
|
- app/components/daisy/navigation/breadcrumbs_component.html.haml
|
436
477
|
- app/components/daisy/navigation/breadcrumbs_component.rb
|
478
|
+
- app/components/daisy/navigation/dock_component.rb
|
437
479
|
- app/components/daisy/navigation/link_component.rb
|
438
480
|
- app/components/daisy/navigation/menu_component.html.haml
|
439
481
|
- app/components/daisy/navigation/menu_component.rb
|
@@ -444,23 +486,28 @@ files:
|
|
444
486
|
- app/components/daisy/navigation/tabs_component.rb
|
445
487
|
- app/components/hero/icon_component.rb
|
446
488
|
- app/helpers/daisy/form_builder_helper.rb
|
489
|
+
- app/views/examples/daisy/data_input/filters.html.haml
|
447
490
|
- lib/daisy.rb
|
448
491
|
- lib/hero.rb
|
449
492
|
- lib/loco_motion.rb
|
450
493
|
- lib/loco_motion/base_component.rb
|
451
494
|
- lib/loco_motion/basic_component.rb
|
452
495
|
- lib/loco_motion/component_config.rb
|
496
|
+
- lib/loco_motion/concerns/iconable_component.rb
|
497
|
+
- lib/loco_motion/concerns/labelable_component.rb
|
498
|
+
- lib/loco_motion/concerns/linkable_component.rb
|
453
499
|
- lib/loco_motion/concerns/tippable_component.rb
|
454
500
|
- lib/loco_motion/configuration.rb
|
455
501
|
- lib/loco_motion/engine.rb
|
456
502
|
- lib/loco_motion/errors.rb
|
457
503
|
- lib/loco_motion/helpers.rb
|
504
|
+
- lib/loco_motion/patches/view_component/slot_loco_parent_patch.rb
|
505
|
+
- lib/loco_motion/patches/view_component/slotable_default_patch.rb
|
458
506
|
- lib/loco_motion/version.rb
|
459
507
|
homepage: https://rubygems.org/gems/loco_motion-rails
|
460
508
|
licenses:
|
461
509
|
- MIT
|
462
510
|
metadata: {}
|
463
|
-
post_install_message:
|
464
511
|
rdoc_options: []
|
465
512
|
require_paths:
|
466
513
|
- lib
|
@@ -476,8 +523,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
476
523
|
- !ruby/object:Gem::Version
|
477
524
|
version: '0'
|
478
525
|
requirements: []
|
479
|
-
rubygems_version: 3.
|
480
|
-
signing_key:
|
526
|
+
rubygems_version: 3.6.7
|
481
527
|
specification_version: 4
|
482
528
|
summary: Ruby on Rails, loco fast!
|
483
529
|
test_files: []
|
@@ -1,59 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# The ArtboardComponent provides a fixed-size container that mimics mobile
|
3
|
-
# device screens. It's particularly useful for:
|
4
|
-
# - Prototyping mobile interfaces.
|
5
|
-
# - Displaying responsive design examples.
|
6
|
-
# - Creating device-specific mockups.
|
7
|
-
#
|
8
|
-
# The component includes preset sizes for common mobile devices and supports
|
9
|
-
# both portrait and landscape orientations.
|
10
|
-
#
|
11
|
-
# @loco_example Portrait Mode
|
12
|
-
# = daisy_artboard(css: "phone-4") do
|
13
|
-
# = daisy_hero do
|
14
|
-
# iPhone 13 (375×812)
|
15
|
-
#
|
16
|
-
# @loco_example Landscape Mode
|
17
|
-
# = daisy_artboard(css: "phone-4 artboard-horizontal") do
|
18
|
-
# = daisy_hero do
|
19
|
-
# iPhone 13 (812×375)
|
20
|
-
#
|
21
|
-
# @loco_example Custom Demo Style
|
22
|
-
# = daisy_artboard(css: "phone-1 artboard-demo") do
|
23
|
-
# iPhone SE (320×568)
|
24
|
-
#
|
25
|
-
class Daisy::Layout::ArtboardComponent < LocoMotion::BaseComponent
|
26
|
-
|
27
|
-
#
|
28
|
-
# Creates a new Artboard component.
|
29
|
-
#
|
30
|
-
# @param args [Array] Positional arguments passed to the parent class.
|
31
|
-
# @param kws [Hash] Keyword arguments for customizing the artboard.
|
32
|
-
#
|
33
|
-
# @option kws css [String] Additional CSS classes for styling. Common
|
34
|
-
# options include:
|
35
|
-
# - Device sizes: `phone-1` (320×568), `phone-2` (375×667),
|
36
|
-
# `phone-3` (414×736), `phone-4` (375×812), `phone-5` (414×896),
|
37
|
-
# `phone-6` (320×1024)
|
38
|
-
# - Orientation: `artboard-horizontal` for landscape mode
|
39
|
-
# - Demo style: `artboard-demo` for visible borders and background
|
40
|
-
#
|
41
|
-
def initialize(*args, **kws, &block)
|
42
|
-
super
|
43
|
-
end
|
44
|
-
|
45
|
-
#
|
46
|
-
# Sets up the component's CSS classes.
|
47
|
-
#
|
48
|
-
def before_render
|
49
|
-
add_css(:component, "artboard")
|
50
|
-
end
|
51
|
-
|
52
|
-
#
|
53
|
-
# Renders the component and its content.
|
54
|
-
#
|
55
|
-
def call
|
56
|
-
part(:component) { content }
|
57
|
-
end
|
58
|
-
|
59
|
-
end
|