ui_components 0.1.0 → 0.1.2
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 +18 -11
- data/app/assets/javascripts/ui_components/controllers/countdown_controller.js +55 -0
- data/app/components/documentation/body/example_preview_component.rb +1 -1
- data/app/components/documentation/body_component.html.erb +1 -1
- data/app/components/documentation/body_component.rb +4 -4
- data/app/components/ui_components/daisy_ui/action/button_component.rb +13 -13
- data/app/components/ui_components/daisy_ui/action/dropdown/anchor_component.rb +1 -11
- data/app/components/ui_components/daisy_ui/action/dropdown/card/item_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/action/dropdown/card_component.rb +4 -14
- data/app/components/ui_components/daisy_ui/action/dropdown/menu/item_component.rb +32 -0
- data/app/components/ui_components/daisy_ui/action/dropdown/menu_component.rb +2 -12
- data/app/components/ui_components/daisy_ui/action/dropdown_component.rb +12 -12
- data/app/components/ui_components/daisy_ui/action/modal/anchor_component.rb +1 -11
- data/app/components/ui_components/daisy_ui/action/modal/dialog/box/action/item_component.rb +0 -9
- data/app/components/ui_components/daisy_ui/action/modal/dialog/box/action_component.rb +0 -9
- data/app/components/ui_components/daisy_ui/action/modal/dialog/box/body_component.rb +0 -9
- data/app/components/ui_components/daisy_ui/action/modal/dialog/box/close_component.rb +0 -9
- data/app/components/ui_components/daisy_ui/action/modal/dialog/box/title_component.rb +0 -9
- data/app/components/ui_components/daisy_ui/action/modal/dialog/box_component.rb +0 -9
- data/app/components/ui_components/daisy_ui/action/modal/dialog_component.rb +2 -12
- data/app/components/ui_components/daisy_ui/action/swap/off_component.rb +0 -9
- data/app/components/ui_components/daisy_ui/action/swap/on_component.rb +0 -9
- data/app/components/ui_components/daisy_ui/action/swap_component.rb +6 -6
- data/app/components/ui_components/daisy_ui/base_component.rb +24 -3
- data/app/components/ui_components/daisy_ui/data_display/accordion/item/anchor_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/accordion/item/body_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/accordion/item_component.rb +15 -15
- data/app/components/ui_components/daisy_ui/data_display/avatar/item/box_component.rb +63 -0
- data/app/components/ui_components/daisy_ui/data_display/avatar/item_component.rb +8 -8
- data/app/components/ui_components/daisy_ui/data_display/badge_component.rb +7 -7
- data/app/components/ui_components/daisy_ui/data_display/card/body/action_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/card/body/context_component.rb +17 -0
- data/app/components/ui_components/daisy_ui/data_display/card/body/title_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/card/body_component.rb +34 -0
- data/app/components/ui_components/daisy_ui/data_display/card/figure_component.rb +15 -0
- data/app/components/ui_components/daisy_ui/data_display/card_component.rb +83 -0
- data/app/components/ui_components/daisy_ui/data_display/carousel/indicator_component.rb +18 -0
- data/app/components/ui_components/daisy_ui/data_display/carousel/item/passer_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/carousel/item_component.rb +26 -0
- data/app/components/ui_components/daisy_ui/data_display/carousel_component.rb +63 -0
- data/app/components/ui_components/daisy_ui/data_display/chat/bubble_component.rb +42 -0
- data/app/components/ui_components/daisy_ui/data_display/chat/footer_component.rb +18 -0
- data/app/components/ui_components/daisy_ui/data_display/chat/header_component.rb +18 -0
- data/app/components/ui_components/daisy_ui/data_display/chat_component.rb +58 -0
- data/app/components/ui_components/daisy_ui/data_display/countdown/item_component.rb +49 -0
- data/app/components/ui_components/daisy_ui/data_display/countdown_component.rb +37 -0
- data/app/components/ui_components/daisy_ui/data_display/{accordion/anchor_component.rb → diff/item1_component.rb} +5 -8
- data/app/components/ui_components/daisy_ui/data_display/{accordion/body_component.rb → diff/item2_component.rb} +6 -8
- data/app/components/ui_components/daisy_ui/data_display/diff/resizer_component.rb +25 -0
- data/app/components/ui_components/daisy_ui/data_display/diff_component.rb +35 -0
- data/app/components/ui_components/daisy_ui/data_display/kbd_component.rb +40 -0
- data/app/components/ui_components/daisy_ui/data_display/list/item_component.rb +40 -0
- data/app/components/ui_components/daisy_ui/data_display/list_component.rb +22 -0
- data/app/components/ui_components/daisy_ui/data_display/stat/item/action_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/stat/item/description_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/stat/item/figure_component.rb +24 -0
- data/app/components/ui_components/daisy_ui/data_display/stat/item/title_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/stat/item/value_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/stat/item_component.rb +39 -0
- data/app/components/ui_components/daisy_ui/data_display/stat_component.rb +50 -0
- data/app/components/ui_components/daisy_ui/data_display/status_component.rb +59 -0
- data/app/components/ui_components/daisy_ui/data_display/table/item/body_component.rb +23 -0
- data/app/components/ui_components/daisy_ui/data_display/table/item/foot_component.rb +23 -0
- data/app/components/ui_components/daisy_ui/data_display/table/item/head_component.rb +23 -0
- data/app/components/ui_components/daisy_ui/data_display/table/item/row/data_component.rb +19 -0
- data/app/components/ui_components/daisy_ui/data_display/table/item/row/header_component.rb +19 -0
- data/app/components/ui_components/daisy_ui/data_display/table/item/row_component.rb +32 -0
- data/app/components/ui_components/daisy_ui/data_display/table/item_component.rb +29 -0
- data/app/components/ui_components/daisy_ui/data_display/table_component.rb +72 -0
- data/app/components/ui_components/daisy_ui/data_display/timeline/item/item_end_component.rb +44 -0
- data/app/components/ui_components/daisy_ui/data_display/timeline/item/item_middle_component.rb +20 -0
- data/app/components/ui_components/daisy_ui/data_display/timeline/item/item_start_component.rb +44 -0
- data/app/components/ui_components/daisy_ui/data_display/timeline/item/line_component.rb +17 -0
- data/app/components/ui_components/daisy_ui/data_display/timeline/item_component.rb +40 -0
- data/app/components/ui_components/daisy_ui/data_display/timeline_component.rb +50 -0
- data/app/controllers/ui_components/daisy_ui/data_display_components_controller.rb +22 -0
- data/app/helpers/data_display/carousel_helper.rb +13 -0
- data/app/views/ui_components/daisy_ui/action_components/button.html.erb +35 -33
- data/app/views/ui_components/daisy_ui/action_components/dropdown.html.erb +38 -25
- data/app/views/ui_components/daisy_ui/action_components/modal.html.erb +31 -18
- data/app/views/ui_components/daisy_ui/action_components/swap.html.erb +31 -17
- data/app/views/ui_components/daisy_ui/data_display_components/accordion.html.erb +59 -105
- data/app/views/ui_components/daisy_ui/data_display_components/avatar.html.erb +40 -27
- data/app/views/ui_components/daisy_ui/data_display_components/badge.html.erb +45 -42
- data/app/views/ui_components/daisy_ui/data_display_components/card.html.erb +302 -0
- data/app/views/ui_components/daisy_ui/data_display_components/carousel.html.erb +303 -0
- data/app/views/ui_components/daisy_ui/data_display_components/chat.html.erb +190 -0
- data/app/views/ui_components/daisy_ui/data_display_components/countdown.html.erb +211 -0
- data/app/views/ui_components/daisy_ui/data_display_components/diff.html.erb +69 -0
- data/app/views/ui_components/daisy_ui/data_display_components/kbd.html.erb +157 -0
- data/app/views/ui_components/daisy_ui/data_display_components/list.html.erb +247 -0
- data/app/views/ui_components/daisy_ui/data_display_components/stat.html.erb +208 -0
- data/app/views/ui_components/daisy_ui/data_display_components/status.html.erb +93 -0
- data/app/views/ui_components/daisy_ui/data_display_components/table.html.erb +358 -0
- data/app/views/ui_components/daisy_ui/data_display_components/timeline.html.erb +431 -0
- data/app/views/ui_components/daisy_ui/home/index.html.erb +11 -0
- data/config/routes.rb +13 -2
- data/lib/tasks/ui_components_tasks.rake +0 -3
- data/lib/ui_components/config/daisy_ui_class_names.rb +3 -2
- data/lib/ui_components/config/tailwind_class_names.rb +27 -4
- data/lib/ui_components/version.rb +1 -1
- metadata +65 -7
- data/app/components/ui_components/daisy_ui/action/dropdown/card_item_component.rb +0 -29
- data/app/components/ui_components/daisy_ui/action/dropdown/list_item_component.rb +0 -30
- data/app/components/ui_components/daisy_ui/data_display/avatar/box_component.rb +0 -61
@@ -10,16 +10,18 @@
|
|
10
10
|
</ul>
|
11
11
|
</div>
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
<div class="divider"></div>
|
14
|
+
|
15
|
+
<%= render DocumentationComponent.new do |doc| %>
|
16
|
+
<%= doc.with_header { "# Dropdown" } %>
|
17
|
+
<%= doc.with_body(preview_options: { css_class: "text-center" }) do |body| %>
|
16
18
|
<%= body.with_preview_example(
|
17
19
|
source: <<~ERB
|
18
20
|
<$= render #{component}.new do |dropdown| $>
|
19
|
-
<$= dropdown.
|
21
|
+
<$= dropdown.with_anchor_content("Click") $>
|
20
22
|
<$= dropdown.with_menu do |menu| $>
|
21
|
-
<$= menu.
|
22
|
-
<$= menu.
|
23
|
+
<$= menu.with_item_content("Item 1") $>
|
24
|
+
<$= menu.with_item_content("Item 2") $>
|
23
25
|
<$ end $>
|
24
26
|
<$ end $>
|
25
27
|
ERB
|
@@ -32,18 +34,18 @@
|
|
32
34
|
|
33
35
|
<% axes.each do |axis_key| %>
|
34
36
|
<% aligns.each do |align_key| %>
|
35
|
-
<%= render DocumentationComponent.new do |
|
36
|
-
<%=
|
37
|
-
<%=
|
37
|
+
<%= render DocumentationComponent.new do |doc| %>
|
38
|
+
<%= doc.with_header { action_dropdown_handle_component_title(axis_key:, align_key:) } %>
|
39
|
+
<%= doc.with_body(preview_options: { css_class: "text-center" }) do |body| %>
|
38
40
|
<% component_params = action_dropdown_handle_component_params(axis_key:, align_key:) %>
|
39
41
|
|
40
42
|
<%= body.with_preview_example(
|
41
43
|
source: <<~ERB
|
42
44
|
<$= render #{component}.new#{"(#{component_params})" if component_params.present?} do |dropdown| $>
|
43
|
-
<$= dropdown.
|
45
|
+
<$= dropdown.with_anchor_content("Click") $>
|
44
46
|
<$= dropdown.with_menu do |menu| $>
|
45
|
-
<$= menu.
|
46
|
-
<$= menu.
|
47
|
+
<$= menu.with_item_content("Item 1") $>
|
48
|
+
<$= menu.with_item_content("Item 2") $>
|
47
49
|
<$ end $>
|
48
50
|
<$ end $>
|
49
51
|
ERB
|
@@ -56,16 +58,16 @@
|
|
56
58
|
<% events = %w[hover opened] %>
|
57
59
|
|
58
60
|
<% events.each do |key| %>
|
59
|
-
<%= render DocumentationComponent.new do |
|
60
|
-
<%=
|
61
|
-
<%=
|
61
|
+
<%= render DocumentationComponent.new do |doc| %>
|
62
|
+
<%= doc.with_header { "# Dropdown - #{key}" } %>
|
63
|
+
<%= doc.with_body(preview_options: { css_class: "text-center" }) do |body| %>
|
62
64
|
<%= body.with_preview_example(
|
63
65
|
source: <<~ERB
|
64
66
|
<$= render #{component}.new(#{key}: true) do |dropdown| $>
|
65
|
-
<$= dropdown.
|
67
|
+
<$= dropdown.with_anchor_content("Click") $>
|
66
68
|
<$= dropdown.with_menu do |menu| $>
|
67
|
-
<$= menu.
|
68
|
-
<$= menu.
|
69
|
+
<$= menu.with_item_content("Item 1") $>
|
70
|
+
<$= menu.with_item_content("Item 2") $>
|
69
71
|
<$ end $>
|
70
72
|
<$ end $>
|
71
73
|
ERB
|
@@ -74,13 +76,13 @@
|
|
74
76
|
<% end %>
|
75
77
|
<% end %>
|
76
78
|
|
77
|
-
<%= render DocumentationComponent.new do |
|
78
|
-
<%=
|
79
|
-
<%=
|
79
|
+
<%= render DocumentationComponent.new do |doc| %>
|
80
|
+
<%= doc.with_header { "# Card as dropdown" } %>
|
81
|
+
<%= doc.with_body(preview_options: { css_class: "text-center" }) do |body| %>
|
80
82
|
<%= body.with_preview_example(
|
81
83
|
source: <<~ERB
|
82
84
|
<$= render #{component}.new do |dropdown| $>
|
83
|
-
<$= dropdown.with_anchor(css_class: "m-1")
|
85
|
+
<$= dropdown.with_anchor(css_class: "m-1").with_content("Click") $>
|
84
86
|
<$= dropdown.with_card do |card| $>
|
85
87
|
<$= card.with_item do $>
|
86
88
|
<p>This is a card. You can use any element as a dropdown.</p>
|
@@ -92,9 +94,9 @@
|
|
92
94
|
<% end %>
|
93
95
|
<% end %>
|
94
96
|
|
95
|
-
<%= render DocumentationComponent.new do |
|
96
|
-
<%=
|
97
|
-
<%=
|
97
|
+
<%= render DocumentationComponent.new do |doc| %>
|
98
|
+
<%= doc.with_header { "# Helper dropdown" } %>
|
99
|
+
<%= doc.with_body(preview_options: { css_class: "text-center" }) do |body| %>
|
98
100
|
<%= body.with_preview_example(
|
99
101
|
source: <<~ERB
|
100
102
|
A normal text and a helper dropdown
|
@@ -114,4 +116,15 @@
|
|
114
116
|
) %>
|
115
117
|
<% end %>
|
116
118
|
<% end %>
|
119
|
+
|
120
|
+
<div class="divider"></div>
|
121
|
+
|
122
|
+
<div class="mb-2">
|
123
|
+
<h1 class="font-bold mb-2"># Actions > Dropdown</h1>
|
124
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
125
|
+
<%= link_to "< Button", daisy_ui_button_path, class: "link link-primary m-2" %>
|
126
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
127
|
+
<%= link_to "Modal >", daisy_ui_modal_path, class: "link link-primary m-2" %>
|
128
|
+
</ul>
|
129
|
+
</div>
|
117
130
|
</div>
|
@@ -10,17 +10,19 @@
|
|
10
10
|
</ul>
|
11
11
|
</div>
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
<div class="divider"></div>
|
14
|
+
|
15
|
+
<%= render DocumentationComponent.new do |doc| %>
|
16
|
+
<%= doc.with_header { "# Dialog modal" } %>
|
17
|
+
<%= doc.with_body do |body| %>
|
16
18
|
<%= body.with_preview_example(
|
17
19
|
source: <<~ERB
|
18
20
|
<$= render #{component}.new(opener: "my_modal_1") do |modal| $>
|
19
|
-
<$= modal.
|
21
|
+
<$= modal.with_anchor_content("open modal") $>
|
20
22
|
<$= modal.with_dialog do |dialog| $>
|
21
23
|
<$= dialog.with_box do |box| $>
|
22
|
-
<$= box.
|
23
|
-
<$= box.
|
24
|
+
<$= box.with_title_content("Hello!") $>
|
25
|
+
<$= box.with_body_content("Press ESC key or click the button below to close") $>
|
24
26
|
<$= box.with_action do |action| $>
|
25
27
|
<$= action.with_item { "Close" } $>
|
26
28
|
<$ end $>
|
@@ -32,17 +34,17 @@
|
|
32
34
|
<% end %>
|
33
35
|
<% end %>
|
34
36
|
|
35
|
-
<%= render DocumentationComponent.new do |
|
36
|
-
<%=
|
37
|
-
<%=
|
37
|
+
<%= render DocumentationComponent.new do |doc| %>
|
38
|
+
<%= doc.with_header { "# Dialog modal, closes when clicked outside" } %>
|
39
|
+
<%= doc.with_body do |body| %>
|
38
40
|
<%= body.with_preview_example(
|
39
41
|
source: <<~ERB
|
40
42
|
<$= render #{component}.new(opener: "my_modal_2") do |modal| $>
|
41
|
-
<$= modal.
|
43
|
+
<$= modal.with_anchor_content("open modal") $>
|
42
44
|
<$= modal.with_dialog(backdrop: true) do |dialog| $>
|
43
45
|
<$= dialog.with_box do |box| $>
|
44
|
-
<$= box.
|
45
|
-
<$= box.
|
46
|
+
<$= box.with_title_content("Hello!") $>
|
47
|
+
<$= box.with_body_content("Press ESC key or click outside to close") $>
|
46
48
|
<$ end $>
|
47
49
|
<$ end $>
|
48
50
|
<$ end $>
|
@@ -51,17 +53,17 @@
|
|
51
53
|
<% end %>
|
52
54
|
<% end %>
|
53
55
|
|
54
|
-
<%= render DocumentationComponent.new do |
|
55
|
-
<%=
|
56
|
-
<%=
|
56
|
+
<%= render DocumentationComponent.new do |doc| %>
|
57
|
+
<%= doc.with_header { "# Dialog modal with a close button at corner" } %>
|
58
|
+
<%= doc.with_body do |body| %>
|
57
59
|
<%= body.with_preview_example(
|
58
60
|
source: <<~ERB
|
59
61
|
<$= render #{component}.new(opener: "my_modal_3") do |modal| $>
|
60
|
-
<$= modal.
|
62
|
+
<$= modal.with_anchor_content("open modal") $>
|
61
63
|
<$= modal.with_dialog do |dialog| $>
|
62
64
|
<$= dialog.with_box do |box| $>
|
63
|
-
<$= box.
|
64
|
-
<$= box.
|
65
|
+
<$= box.with_title_content("Hello!") $>
|
66
|
+
<$= box.with_body_content("Press ESC key or click on ✕ button to close") $>
|
65
67
|
<$= box.with_close { "X" } $>
|
66
68
|
<$ end $>
|
67
69
|
<$ end $>
|
@@ -70,4 +72,15 @@
|
|
70
72
|
) %>
|
71
73
|
<% end %>
|
72
74
|
<% end %>
|
75
|
+
|
76
|
+
<div class="divider"></div>
|
77
|
+
|
78
|
+
<div class="mb-2">
|
79
|
+
<h1 class="font-bold mb-2"># Actions > Modal</h1>
|
80
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
81
|
+
<%= link_to "< Dropdown", daisy_ui_dropdown_path, class: "link link-primary m-2" %>
|
82
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
83
|
+
<%= link_to "Swap >", daisy_ui_swap_path, class: "link link-primary m-2" %>
|
84
|
+
</ul>
|
85
|
+
</div>
|
73
86
|
</div>
|
@@ -6,26 +6,29 @@
|
|
6
6
|
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
7
7
|
<%= link_to "< Modal", daisy_ui_modal_path, class: "link link-primary m-2" %>
|
8
8
|
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
9
|
+
<%= link_to "Data display#Accordion >", daisy_ui_accordion_path, class: "link link-primary m-2" %>
|
9
10
|
</ul>
|
10
11
|
</div>
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
13
|
+
<div class="divider"></div>
|
14
|
+
|
15
|
+
<%= render DocumentationComponent.new do |doc| %>
|
16
|
+
<%= doc.with_header { "# Swap text" } %>
|
17
|
+
<%= doc.with_body do |body| %>
|
15
18
|
<%= body.with_preview_example(
|
16
19
|
source: <<~ERB
|
17
20
|
<$= render #{component}.new do |swap| $>
|
18
|
-
<$= swap.
|
19
|
-
<$= swap.
|
21
|
+
<$= swap.with_on_content("ON") $>
|
22
|
+
<$= swap.with_off_content("OFF") $>
|
20
23
|
<$ end $>
|
21
24
|
ERB
|
22
25
|
) %>
|
23
26
|
<% end %>
|
24
27
|
<% end %>
|
25
28
|
|
26
|
-
<%= render DocumentationComponent.new do |
|
27
|
-
<%=
|
28
|
-
<%=
|
29
|
+
<%= render DocumentationComponent.new do |doc| %>
|
30
|
+
<%= doc.with_header { "# Swap volume icons" } %>
|
31
|
+
<%= doc.with_body do |body| %>
|
29
32
|
<%= body.with_preview_example(
|
30
33
|
source: <<~ERB
|
31
34
|
<$= render #{component}.new do |swap| $>
|
@@ -41,9 +44,9 @@
|
|
41
44
|
<% end %>
|
42
45
|
<% end %>
|
43
46
|
|
44
|
-
<%= render DocumentationComponent.new do |
|
45
|
-
<%=
|
46
|
-
<%=
|
47
|
+
<%= render DocumentationComponent.new do |doc| %>
|
48
|
+
<%= doc.with_header { "# Swap icons with rotate effect" } %>
|
49
|
+
<%= doc.with_body do |body| %>
|
47
50
|
<%= body.with_preview_example(
|
48
51
|
source: <<~ERB
|
49
52
|
<$= render #{component}.new(effect: "rotate") do |swap| $>
|
@@ -59,9 +62,9 @@
|
|
59
62
|
<% end %>
|
60
63
|
<% end %>
|
61
64
|
|
62
|
-
<%= render DocumentationComponent.new do |
|
63
|
-
<%=
|
64
|
-
<%=
|
65
|
+
<%= render DocumentationComponent.new do |doc| %>
|
66
|
+
<%= doc.with_header { "# Swap icons with flip effect" } %>
|
67
|
+
<%= doc.with_body do |body| %>
|
65
68
|
<%= body.with_preview_example(
|
66
69
|
source: <<~ERB
|
67
70
|
<$= render #{component}.new(effect: "flip") do |swap| $>
|
@@ -77,9 +80,9 @@
|
|
77
80
|
<% end %>
|
78
81
|
<% end %>
|
79
82
|
|
80
|
-
<%= render DocumentationComponent.new do |
|
81
|
-
<%=
|
82
|
-
<%=
|
83
|
+
<%= render DocumentationComponent.new do |doc| %>
|
84
|
+
<%= doc.with_header { "# Activate using class name instead of checkbox" } %>
|
85
|
+
<%= doc.with_body do |body| %>
|
83
86
|
<%= body.with_preview_example(
|
84
87
|
source: <<~ERB
|
85
88
|
<$= render #{component}.new(active: true) do |swap| $>
|
@@ -94,4 +97,15 @@
|
|
94
97
|
) %>
|
95
98
|
<% end %>
|
96
99
|
<% end %>
|
100
|
+
|
101
|
+
<div class="divider"></div>
|
102
|
+
|
103
|
+
<div class="mb-2">
|
104
|
+
<h1 class="font-bold mb-2"># Actions > Swap</h1>
|
105
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
106
|
+
<%= link_to "< Modal", daisy_ui_modal_path, class: "link link-primary m-2" %>
|
107
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
108
|
+
<%= link_to "Data display#Accordion >", daisy_ui_accordion_path, class: "link link-primary m-2" %>
|
109
|
+
</ul>
|
110
|
+
</div>
|
97
111
|
</div>
|
@@ -4,42 +4,33 @@
|
|
4
4
|
<div class="mb-2">
|
5
5
|
<h1 class="font-bold mb-2"># Data display > Accordion</h1>
|
6
6
|
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
7
|
+
<%= link_to "< Actions#Swap", daisy_ui_swap_path, class: "link link-primary m-2" %>
|
7
8
|
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
8
9
|
<%= link_to "Avatar >", daisy_ui_avatar_path, class: "link link-primary m-2" %>
|
9
10
|
</ul>
|
10
11
|
</div>
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
13
|
+
<div class="divider"></div>
|
14
|
+
|
15
|
+
<%= render DocumentationComponent.new do |doc| %>
|
16
|
+
<%= doc.with_header { "# Accordion using radio inputs" } %>
|
17
|
+
<%= doc.with_body do |body| %>
|
15
18
|
<%= body.with_preview_example(
|
16
19
|
source: <<~ERB
|
17
20
|
<$= render #{component}.new do |accordion| $>
|
18
21
|
<$= accordion.with_item do |item| $>
|
19
|
-
<$ item.
|
20
|
-
|
21
|
-
<$ end $>
|
22
|
-
<$ item.with_body do $>
|
23
|
-
Click the "Sign Up" button in the top right corner and follow the registration process.
|
24
|
-
<$ end $>
|
22
|
+
<$ item.with_anchor_content("How do I create an account?") $>
|
23
|
+
<$ item.with_body_content('Click the "Sign Up" button in the top right corner and follow the registration process.') $>
|
25
24
|
<$ end $>
|
26
25
|
|
27
26
|
<$= accordion.with_item do |item| $>
|
28
|
-
<$ item.
|
29
|
-
|
30
|
-
<$ end $>
|
31
|
-
<$ item.with_body do $>
|
32
|
-
Click on "Forgot Password" on the login page and follow the instructions sent to your email.
|
33
|
-
<$ end $>
|
27
|
+
<$ item.with_anchor_content("I forgot my password. What should I do?") $>
|
28
|
+
<$ item.with_body_content('Click on "Forgot Password" on the login page and follow the instructions sent to your email.') $>
|
34
29
|
<$ end $>
|
35
30
|
|
36
31
|
<$= accordion.with_item do |item| $>
|
37
|
-
<$ item.
|
38
|
-
|
39
|
-
<$ end $>
|
40
|
-
<$ item.with_body do $>
|
41
|
-
Go to "My Account" settings and select "Edit Profile" to make changes.
|
42
|
-
<$ end $>
|
32
|
+
<$ item.with_anchor_content("How do I update my profile information?") $>
|
33
|
+
<$ item.with_body_content('Go to "My Account" settings and select "Edit Profile" to make changes.') $>
|
43
34
|
<$ end $>
|
44
35
|
<$ end $>
|
45
36
|
ERB
|
@@ -50,37 +41,25 @@
|
|
50
41
|
<% icons = %w[arrow plus] %>
|
51
42
|
|
52
43
|
<% icons.each_with_index do |key, index| %>
|
53
|
-
<%= render DocumentationComponent.new do |
|
54
|
-
<%=
|
55
|
-
<%=
|
44
|
+
<%= render DocumentationComponent.new do |doc| %>
|
45
|
+
<%= doc.with_header { "# Accordion with #{key == "plus" ? "plus/minus" : key} icon" } %>
|
46
|
+
<%= doc.with_body do |body| %>
|
56
47
|
<%= body.with_preview_example(
|
57
48
|
source: <<~ERB
|
58
49
|
<$= render #{component}.new(opener: "my_accordion_#{index+1}") do |accordion| $>
|
59
50
|
<$= accordion.with_item(icon: "#{key}") do |item| $>
|
60
|
-
<$ item.
|
61
|
-
|
62
|
-
<$ end $>
|
63
|
-
<$ item.with_body do $>
|
64
|
-
Click the "Sign Up" button in the top right corner and follow the registration process.
|
65
|
-
<$ end $>
|
51
|
+
<$ item.with_anchor_content("How do I create an account?") $>
|
52
|
+
<$ item.with_body_content('Click the "Sign Up" button in the top right corner and follow the registration process.') $>
|
66
53
|
<$ end $>
|
67
54
|
|
68
55
|
<$= accordion.with_item(icon: "#{key}") do |item| $>
|
69
|
-
<$ item.
|
70
|
-
|
71
|
-
<$ end $>
|
72
|
-
<$ item.with_body do $>
|
73
|
-
Click on "Forgot Password" on the login page and follow the instructions sent to your email.
|
74
|
-
<$ end $>
|
56
|
+
<$ item.with_anchor_content("I forgot my password. What should I do?") $>
|
57
|
+
<$ item.with_body_content('Click on "Forgot Password" on the login page and follow the instructions sent to your email.') $>
|
75
58
|
<$ end $>
|
76
59
|
|
77
60
|
<$= accordion.with_item(icon: "#{key}") do |item| $>
|
78
|
-
<$ item.
|
79
|
-
|
80
|
-
<$ end $>
|
81
|
-
<$ item.with_body do $>
|
82
|
-
Go to "My Account" settings and select "Edit Profile" to make changes.
|
83
|
-
<$ end $>
|
61
|
+
<$ item.with_anchor_content("How do I update my profile information?") $>
|
62
|
+
<$ item.with_body_content('Go to "My Account" settings and select "Edit Profile" to make changes.') $>
|
84
63
|
<$ end $>
|
85
64
|
<$ end $>
|
86
65
|
ERB
|
@@ -89,37 +68,25 @@
|
|
89
68
|
<% end %>
|
90
69
|
<% end %>
|
91
70
|
|
92
|
-
<%= render DocumentationComponent.new do |
|
93
|
-
<%=
|
94
|
-
<%=
|
71
|
+
<%= render DocumentationComponent.new do |doc| %>
|
72
|
+
<%= doc.with_header { "# Accordion using checkbox inputs" } %>
|
73
|
+
<%= doc.with_body do |body| %>
|
95
74
|
<%= body.with_preview_example(
|
96
75
|
source: <<~ERB
|
97
76
|
<$= render #{component}.new(opener: "my_accordion_3", toggle: true) do |accordion| $>
|
98
77
|
<$= accordion.with_item do |item| $>
|
99
|
-
<$ item.
|
100
|
-
|
101
|
-
<$ end $>
|
102
|
-
<$ item.with_body do $>
|
103
|
-
Click the "Sign Up" button in the top right corner and follow the registration process.
|
104
|
-
<$ end $>
|
78
|
+
<$ item.with_anchor_content("How do I create an account?") $>
|
79
|
+
<$ item.with_body_content('Click the "Sign Up" button in the top right corner and follow the registration process.') $>
|
105
80
|
<$ end $>
|
106
81
|
|
107
82
|
<$= accordion.with_item do |item| $>
|
108
|
-
<$ item.
|
109
|
-
|
110
|
-
<$ end $>
|
111
|
-
<$ item.with_body do $>
|
112
|
-
Click on "Forgot Password" on the login page and follow the instructions sent to your email.
|
113
|
-
<$ end $>
|
83
|
+
<$ item.with_anchor_content("I forgot my password. What should I do?") $>
|
84
|
+
<$ item.with_body_content('Click on "Forgot Password" on the login page and follow the instructions sent to your email.') $>
|
114
85
|
<$ end $>
|
115
86
|
|
116
87
|
<$= accordion.with_item do |item| $>
|
117
|
-
<$ item.
|
118
|
-
|
119
|
-
<$ end $>
|
120
|
-
<$ item.with_body do $>
|
121
|
-
Go to "My Account" settings and select "Edit Profile" to make changes.
|
122
|
-
<$ end $>
|
88
|
+
<$ item.with_anchor_content("How do I update my profile information?") $>
|
89
|
+
<$ item.with_body_content('Go to "My Account" settings and select "Edit Profile" to make changes.') $>
|
123
90
|
<$ end $>
|
124
91
|
<$ end $>
|
125
92
|
ERB
|
@@ -127,37 +94,25 @@
|
|
127
94
|
<% end %>
|
128
95
|
<% end %>
|
129
96
|
|
130
|
-
<%= render DocumentationComponent.new do |
|
131
|
-
<%=
|
132
|
-
<%=
|
97
|
+
<%= render DocumentationComponent.new do |doc| %>
|
98
|
+
<%= doc.with_header { "# Accordion opened" } %>
|
99
|
+
<%= doc.with_body do |body| %>
|
133
100
|
<%= body.with_preview_example(
|
134
101
|
source: <<~ERB
|
135
102
|
<$= render #{component}.new(opener: "my_accordion_4") do |accordion| $>
|
136
103
|
<$= accordion.with_item(opened: true) do |item| $>
|
137
|
-
<$ item.
|
138
|
-
|
139
|
-
<$ end $>
|
140
|
-
<$ item.with_body do $>
|
141
|
-
Click the "Sign Up" button in the top right corner and follow the registration process.
|
142
|
-
<$ end $>
|
104
|
+
<$ item.with_anchor_content("How do I create an account?") $>
|
105
|
+
<$ item.with_body_content('Click the "Sign Up" button in the top right corner and follow the registration process.') $>
|
143
106
|
<$ end $>
|
144
107
|
|
145
108
|
<$= accordion.with_item do |item| $>
|
146
|
-
<$ item.
|
147
|
-
|
148
|
-
<$ end $>
|
149
|
-
<$ item.with_body do $>
|
150
|
-
Click on "Forgot Password" on the login page and follow the instructions sent to your email.
|
151
|
-
<$ end $>
|
109
|
+
<$ item.with_anchor_content("I forgot my password. What should I do?") $>
|
110
|
+
<$ item.with_body_content('Click on "Forgot Password" on the login page and follow the instructions sent to your email.') $>
|
152
111
|
<$ end $>
|
153
112
|
|
154
113
|
<$= accordion.with_item do |item| $>
|
155
|
-
<$ item.
|
156
|
-
|
157
|
-
<$ end $>
|
158
|
-
<$ item.with_body do $>
|
159
|
-
Go to "My Account" settings and select "Edit Profile" to make changes.
|
160
|
-
<$ end $>
|
114
|
+
<$ item.with_anchor_content("How do I update my profile information?") $>
|
115
|
+
<$ item.with_body_content('Go to "My Account" settings and select "Edit Profile" to make changes.') $>
|
161
116
|
<$ end $>
|
162
117
|
<$ end $>
|
163
118
|
ERB
|
@@ -165,41 +120,40 @@
|
|
165
120
|
<% end %>
|
166
121
|
<% end %>
|
167
122
|
|
168
|
-
<%= render DocumentationComponent.new do |
|
169
|
-
<%=
|
170
|
-
<%=
|
123
|
+
<%= render DocumentationComponent.new do |doc| %>
|
124
|
+
<%= doc.with_header { "# Using Accordion and Join together" } %>
|
125
|
+
<%= doc.with_body do |body| %>
|
171
126
|
<%= body.with_preview_example(
|
172
127
|
source: <<~ERB
|
173
128
|
<$= render #{component}.new(opener: "my_accordion_5", css_class: "join join-vertical bg-base-100") do |accordion| $>
|
174
129
|
<$= accordion.with_item(css_class: "join-item") do |item| $>
|
175
|
-
<$ item.
|
176
|
-
|
177
|
-
<$ end $>
|
178
|
-
<$ item.with_body do $>
|
179
|
-
Click the "Sign Up" button in the top right corner and follow the registration process.
|
180
|
-
<$ end $>
|
130
|
+
<$ item.with_anchor_content("How do I create an account?") $>
|
131
|
+
<$ item.with_body_content('Click the "Sign Up" button in the top right corner and follow the registration process.') $>
|
181
132
|
<$ end $>
|
182
133
|
|
183
134
|
<$= accordion.with_item(css_class: "join-item") do |item| $>
|
184
|
-
<$ item.
|
185
|
-
|
186
|
-
<$ end $>
|
187
|
-
<$ item.with_body do $>
|
188
|
-
Click on "Forgot Password" on the login page and follow the instructions sent to your email.
|
189
|
-
<$ end $>
|
135
|
+
<$ item.with_anchor_content("I forgot my password. What should I do?") $>
|
136
|
+
<$ item.with_body_content('Click on "Forgot Password" on the login page and follow the instructions sent to your email.') $>
|
190
137
|
<$ end $>
|
191
138
|
|
192
139
|
<$= accordion.with_item(css_class: "join-item") do |item| $>
|
193
|
-
<$ item.
|
194
|
-
|
195
|
-
<$ end $>
|
196
|
-
<$ item.with_body do $>
|
197
|
-
Go to "My Account" settings and select "Edit Profile" to make changes.
|
198
|
-
<$ end $>
|
140
|
+
<$ item.with_anchor_content("How do I update my profile information?") $>
|
141
|
+
<$ item.with_body_content('Go to "My Account" settings and select "Edit Profile" to make changes.') $>
|
199
142
|
<$ end $>
|
200
143
|
<$ end $>
|
201
144
|
ERB
|
202
145
|
) %>
|
203
146
|
<% end %>
|
204
147
|
<% end %>
|
148
|
+
|
149
|
+
<div class="divider"></div>
|
150
|
+
|
151
|
+
<div class="mb-2">
|
152
|
+
<h1 class="font-bold mb-2"># Data display > Accordion</h1>
|
153
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
154
|
+
<%= link_to "< Actions#Swap", daisy_ui_swap_path, class: "link link-primary m-2" %>
|
155
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
156
|
+
<%= link_to "Avatar >", daisy_ui_avatar_path, class: "link link-primary m-2" %>
|
157
|
+
</ul>
|
158
|
+
</div>
|
205
159
|
</div>
|