ui_components 0.1.1 → 0.1.3
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/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 +3 -6
- 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,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>
|
@@ -10,9 +10,11 @@
|
|
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 { "# Avatar" } %>
|
17
|
+
<%= doc.with_body do |body| %>
|
16
18
|
<%= body.with_preview_example(
|
17
19
|
source: <<~ERB
|
18
20
|
<$= render #{component}.new do |avatar| $>
|
@@ -27,9 +29,9 @@
|
|
27
29
|
<% end %>
|
28
30
|
<% end %>
|
29
31
|
|
30
|
-
<%= render DocumentationComponent.new do |
|
31
|
-
<%=
|
32
|
-
<%=
|
32
|
+
<%= render DocumentationComponent.new do |doc| %>
|
33
|
+
<%= doc.with_header { "# Avatar in custom sizes" } %>
|
34
|
+
<%= doc.with_body do |body| %>
|
33
35
|
<%= body.with_preview_example(
|
34
36
|
source: <<~ERB
|
35
37
|
<$= render #{component}.new do |avatar| $>
|
@@ -62,9 +64,9 @@
|
|
62
64
|
<% end %>
|
63
65
|
<% end %>
|
64
66
|
|
65
|
-
<%= render DocumentationComponent.new do |
|
66
|
-
<%=
|
67
|
-
<%=
|
67
|
+
<%= render DocumentationComponent.new do |doc| %>
|
68
|
+
<%= doc.with_header { "# Avatar rounded" } %>
|
69
|
+
<%= doc.with_body do |body| %>
|
68
70
|
<%= body.with_preview_example(
|
69
71
|
source: <<~ERB
|
70
72
|
<$= render #{component}.new do |avatar| $>
|
@@ -85,9 +87,9 @@
|
|
85
87
|
<% end %>
|
86
88
|
<% end %>
|
87
89
|
|
88
|
-
<%= render DocumentationComponent.new do |
|
89
|
-
<%=
|
90
|
-
<%=
|
90
|
+
<%= render DocumentationComponent.new do |doc| %>
|
91
|
+
<%= doc.with_header { "# Avatar with mask" } %>
|
92
|
+
<%= doc.with_body do |body| %>
|
91
93
|
<%= body.with_preview_example(
|
92
94
|
source: <<~ERB
|
93
95
|
<$= render #{component}.new do |avatar| $>
|
@@ -114,9 +116,9 @@
|
|
114
116
|
<% end %>
|
115
117
|
<% end %>
|
116
118
|
|
117
|
-
<%= render DocumentationComponent.new do |
|
118
|
-
<%=
|
119
|
-
<%=
|
119
|
+
<%= render DocumentationComponent.new do |doc| %>
|
120
|
+
<%= doc.with_header { "# Avatar group" } %>
|
121
|
+
<%= doc.with_body do |body| %>
|
120
122
|
<%= body.with_preview_example(
|
121
123
|
source: <<~ERB
|
122
124
|
<$= render #{component}.new(css_class: "avatar-group -space-x-6") do |avatar| $>
|
@@ -149,9 +151,9 @@
|
|
149
151
|
<% end %>
|
150
152
|
<% end %>
|
151
153
|
|
152
|
-
<%= render DocumentationComponent.new do |
|
153
|
-
<%=
|
154
|
-
<%=
|
154
|
+
<%= render DocumentationComponent.new do |doc| %>
|
155
|
+
<%= doc.with_header { "# Avatar group with counter" } %>
|
156
|
+
<%= doc.with_body do |body| %>
|
155
157
|
<%= body.with_preview_example(
|
156
158
|
source: <<~ERB
|
157
159
|
<$= render #{component}.new(css_class: "avatar-group -space-x-6") do |avatar| $>
|
@@ -184,9 +186,9 @@
|
|
184
186
|
<% end %>
|
185
187
|
<% end %>
|
186
188
|
|
187
|
-
<%= render DocumentationComponent.new do |
|
188
|
-
<%=
|
189
|
-
<%=
|
189
|
+
<%= render DocumentationComponent.new do |doc| %>
|
190
|
+
<%= doc.with_header { "# Avatar with ring" } %>
|
191
|
+
<%= doc.with_body do |body| %>
|
190
192
|
<%= body.with_preview_example(
|
191
193
|
source: <<~ERB
|
192
194
|
<$= render #{component}.new do |avatar| $>
|
@@ -201,9 +203,9 @@
|
|
201
203
|
<% end %>
|
202
204
|
<% end %>
|
203
205
|
|
204
|
-
<%= render DocumentationComponent.new do |
|
205
|
-
<%=
|
206
|
-
<%=
|
206
|
+
<%= render DocumentationComponent.new do |doc| %>
|
207
|
+
<%= doc.with_header { "# Avatar with presence indicator" } %>
|
208
|
+
<%= doc.with_body do |body| %>
|
207
209
|
<%= body.with_preview_example(
|
208
210
|
source: <<~ERB
|
209
211
|
<$= render #{component}.new do |avatar| $>
|
@@ -224,9 +226,9 @@
|
|
224
226
|
<% end %>
|
225
227
|
<% end %>
|
226
228
|
|
227
|
-
<%= render DocumentationComponent.new do |
|
228
|
-
<%=
|
229
|
-
<%=
|
229
|
+
<%= render DocumentationComponent.new do |doc| %>
|
230
|
+
<%= doc.with_header { "# Avatar placeholder" } %>
|
231
|
+
<%= doc.with_body do |body| %>
|
230
232
|
<%= body.with_preview_example(
|
231
233
|
source: <<~ERB
|
232
234
|
<$= render #{component}.new do |avatar| $>
|
@@ -258,4 +260,15 @@
|
|
258
260
|
) %>
|
259
261
|
<% end %>
|
260
262
|
<% end %>
|
263
|
+
|
264
|
+
<div class="divider"></div>
|
265
|
+
|
266
|
+
<div class="mb-2">
|
267
|
+
<h1 class="font-bold mb-2"># Data display > Avatar</h1>
|
268
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
269
|
+
<%= link_to "< Accordion", daisy_ui_accordion_path, class: "link link-primary m-2" %>
|
270
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
271
|
+
<%= link_to "Badge >", daisy_ui_badge_path, class: "link link-primary m-2" %>
|
272
|
+
</ul>
|
273
|
+
</div>
|
261
274
|
</div>
|