ui_components 0.1.1 → 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/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
@@ -0,0 +1,247 @@
|
|
1
|
+
<% component = UiComponents::DaisyUi::DataDisplay::ListComponent %>
|
2
|
+
|
3
|
+
<div class="grid grid-cols gap-16 p-2 mt-6 mb-36">
|
4
|
+
<div class="mb-2">
|
5
|
+
<h1 class="font-bold mb-2"># Data display > List</h1>
|
6
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
7
|
+
<%= link_to "< Kbd", daisy_ui_kbd_path, class: "link link-primary m-2" %>
|
8
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
9
|
+
<%= link_to "Stat >", daisy_ui_stat_path, class: "link link-primary m-2" %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="divider"></div>
|
14
|
+
|
15
|
+
<%= render DocumentationComponent.new do |doc| %>
|
16
|
+
<%= doc.with_header { "# List (second column grows - default)" } %>
|
17
|
+
<%= doc.with_body(preview_options: { css_class: "p-4 bg-base-200 w-lg" }) do |body| %>
|
18
|
+
<%= body.with_preview_example(
|
19
|
+
source: <<~ERB
|
20
|
+
<$= render #{component}.new do |list| $>
|
21
|
+
<$= list.with_item(row: false, css_class: "p-4 pb-2 text-xs opacity-60 tracking-wide").with_content("Most played songs this week") $>
|
22
|
+
<$= list.with_item do $>
|
23
|
+
<div>
|
24
|
+
<img class="size-10 rounded-box" src="https://img.daisyui.com/images/profile/demo/1@94.webp"/>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div>
|
28
|
+
<div>Dio Lupa</div>
|
29
|
+
<div class="text-xs uppercase font-semibold opacity-60">Remaining Reason</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
33
|
+
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>
|
34
|
+
<$ end $>
|
35
|
+
|
36
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
37
|
+
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
38
|
+
<$ end $>
|
39
|
+
<$ end $>
|
40
|
+
|
41
|
+
<$= list.with_item do $>
|
42
|
+
<div>
|
43
|
+
<img class="size-10 rounded-box" src="https://img.daisyui.com/images/profile/demo/4@94.webp"/>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div>
|
47
|
+
<div>Ellie Beilish</div>
|
48
|
+
<div class="text-xs uppercase font-semibold opacity-60">Bears of a fever</div>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
52
|
+
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>
|
53
|
+
<$ end $>
|
54
|
+
|
55
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
56
|
+
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
57
|
+
<$ end $>
|
58
|
+
<$ end $>
|
59
|
+
|
60
|
+
<$= list.with_item do $>
|
61
|
+
<div>
|
62
|
+
<img class="size-10 rounded-box" src="https://img.daisyui.com/images/profile/demo/3@94.webp"/>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<div>
|
66
|
+
<div>Sabrino Gardener</div>
|
67
|
+
<div class="text-xs uppercase font-semibold opacity-60">Cappuccino</div>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
71
|
+
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>
|
72
|
+
<$ end $>
|
73
|
+
|
74
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
75
|
+
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
76
|
+
<$ end $>
|
77
|
+
<$ end $>
|
78
|
+
<$ end $>
|
79
|
+
ERB
|
80
|
+
) %>
|
81
|
+
<% end %>
|
82
|
+
<% end %>
|
83
|
+
|
84
|
+
<%= render DocumentationComponent.new do |doc| %>
|
85
|
+
<%= doc.with_header { "# List (third column grows)" } %>
|
86
|
+
<%= doc.with_body(preview_options: { css_class: "p-4 bg-base-200 w-lg" }) do |body| %>
|
87
|
+
<%= body.with_preview_example(
|
88
|
+
source: <<~ERB
|
89
|
+
<$= render #{component}.new do |list| $>
|
90
|
+
<$= list.with_item(row: false, css_class: "p-4 pb-2 text-xs opacity-60 tracking-wide").with_content("Most played songs this week") $>
|
91
|
+
<$= list.with_item do $>
|
92
|
+
<div class="text-4xl font-thin opacity-30 tabular-nums">01</div>
|
93
|
+
<div>
|
94
|
+
<img class="size-10 rounded-box" src="https://img.daisyui.com/images/profile/demo/1@94.webp"/>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
<div class="list-col-grow">
|
98
|
+
<div>Dio Lupa</div>
|
99
|
+
<div class="text-xs uppercase font-semibold opacity-60">Remaining Reason</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
103
|
+
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>
|
104
|
+
<$ end $>
|
105
|
+
|
106
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
107
|
+
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
108
|
+
<$ end $>
|
109
|
+
<$ end $>
|
110
|
+
|
111
|
+
<$= list.with_item do $>
|
112
|
+
<div class="text-4xl font-thin opacity-30 tabular-nums">02</div>
|
113
|
+
<div>
|
114
|
+
<img class="size-10 rounded-box" src="https://img.daisyui.com/images/profile/demo/4@94.webp"/>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<div class="list-col-grow">
|
118
|
+
<div>Ellie Beilish</div>
|
119
|
+
<div class="text-xs uppercase font-semibold opacity-60">Bears of a fever</div>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
123
|
+
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>
|
124
|
+
<$ end $>
|
125
|
+
|
126
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
127
|
+
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
128
|
+
<$ end $>
|
129
|
+
<$ end $>
|
130
|
+
|
131
|
+
<$= list.with_item do $>
|
132
|
+
<div class="text-4xl font-thin opacity-30 tabular-nums">03</div>
|
133
|
+
<div>
|
134
|
+
<img class="size-10 rounded-box" src="https://img.daisyui.com/images/profile/demo/3@94.webp"/>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div class="list-col-grow">
|
138
|
+
<div>Sabrino Gardener</div>
|
139
|
+
<div class="text-xs uppercase font-semibold opacity-60">Cappuccino</div>
|
140
|
+
</div>
|
141
|
+
|
142
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
143
|
+
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>
|
144
|
+
<$ end $>
|
145
|
+
|
146
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
147
|
+
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
148
|
+
<$ end $>
|
149
|
+
<$ end $>
|
150
|
+
<$ end $>
|
151
|
+
ERB
|
152
|
+
) %>
|
153
|
+
<% end %>
|
154
|
+
<% end %>
|
155
|
+
|
156
|
+
<%= render DocumentationComponent.new do |doc| %>
|
157
|
+
<%= doc.with_header { "# List (third column wraps to next row)" } %>
|
158
|
+
<%= doc.with_body(preview_options: { css_class: "p-4 bg-base-200 w-lg" }) do |body| %>
|
159
|
+
<%= body.with_preview_example(
|
160
|
+
source: <<~ERB
|
161
|
+
<$= render #{component}.new do |list| $>
|
162
|
+
<$= list.with_item(row: false, css_class: "p-4 pb-2 text-xs opacity-60 tracking-wide").with_content("Most played songs this week") $>
|
163
|
+
<$= list.with_item do $>
|
164
|
+
<div>
|
165
|
+
<img class="size-10 rounded-box" src="https://img.daisyui.com/images/profile/demo/1@94.webp"/>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
<div>
|
169
|
+
<div>Dio Lupa</div>
|
170
|
+
<div class="text-xs uppercase font-semibold opacity-60">Remaining Reason</div>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<p class="list-col-wrap text-xs">
|
174
|
+
"Remaining Reason" became an instant hit, praised for its haunting sound and emotional depth. A viral performance brought it widespread recognition, making it one of Dio Lupa’s most iconic tracks.
|
175
|
+
</p>
|
176
|
+
|
177
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
178
|
+
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>
|
179
|
+
<$ end $>
|
180
|
+
|
181
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
182
|
+
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
183
|
+
<$ end $>
|
184
|
+
<$ end $>
|
185
|
+
|
186
|
+
<$= list.with_item do $>
|
187
|
+
<div>
|
188
|
+
<img class="size-10 rounded-box" src="https://img.daisyui.com/images/profile/demo/4@94.webp"/>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
<div>
|
192
|
+
<div>Ellie Beilish</div>
|
193
|
+
<div class="text-xs uppercase font-semibold opacity-60">Bears of a fever</div>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
<p class="list-col-wrap text-xs">
|
197
|
+
"Bears of a Fever" captivated audiences with its intense energy and mysterious lyrics. Its popularity skyrocketed after fans shared it widely online, earning Ellie critical acclaim.
|
198
|
+
</p>
|
199
|
+
|
200
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
201
|
+
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>
|
202
|
+
<$ end $>
|
203
|
+
|
204
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
205
|
+
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
206
|
+
<$ end $>
|
207
|
+
<$ end $>
|
208
|
+
|
209
|
+
<$= list.with_item do $>
|
210
|
+
<div>
|
211
|
+
<img class="size-10 rounded-box" src="https://img.daisyui.com/images/profile/demo/3@94.webp"/>
|
212
|
+
</div>
|
213
|
+
|
214
|
+
<div>
|
215
|
+
<div>Sabrino Gardener</div>
|
216
|
+
<div class="text-xs uppercase font-semibold opacity-60">Cappuccino</div>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
<p class="list-col-wrap text-xs">
|
220
|
+
"Cappuccino" quickly gained attention for its smooth melody and relatable themes. The song’s success propelled Sabrino into the spotlight, solidifying their status as a rising star.
|
221
|
+
</p>
|
222
|
+
|
223
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
224
|
+
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M320-200v-560l440 280-440 280Zm80-280Zm0 134 210-134-210-134v268Z"/></svg>
|
225
|
+
<$ end $>
|
226
|
+
|
227
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(kind: "ghost", shape: "square") do $>
|
228
|
+
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
229
|
+
<$ end $>
|
230
|
+
<$ end $>
|
231
|
+
<$ end $>
|
232
|
+
ERB
|
233
|
+
) %>
|
234
|
+
<% end %>
|
235
|
+
<% end %>
|
236
|
+
|
237
|
+
<div class="divider"></div>
|
238
|
+
|
239
|
+
<div class="mb-2">
|
240
|
+
<h1 class="font-bold mb-2"># Data display > List</h1>
|
241
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
242
|
+
<%= link_to "< Kbd", daisy_ui_kbd_path, class: "link link-primary m-2" %>
|
243
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
244
|
+
<%= link_to "Stat >", daisy_ui_stat_path, class: "link link-primary m-2" %>
|
245
|
+
</ul>
|
246
|
+
</div>
|
247
|
+
</div>
|
@@ -0,0 +1,208 @@
|
|
1
|
+
<% component = UiComponents::DaisyUi::DataDisplay::StatComponent %>
|
2
|
+
|
3
|
+
<div class="grid grid-cols gap-16 p-2 mt-6 mb-36">
|
4
|
+
<div class="mb-2">
|
5
|
+
<h1 class="font-bold mb-2"># Data display > Stat</h1>
|
6
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
7
|
+
<%= link_to "< List", daisy_ui_list_path, class: "link link-primary m-2" %>
|
8
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
9
|
+
<%= link_to "Status >", daisy_ui_status_path, class: "link link-primary m-2" %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="divider"></div>
|
14
|
+
|
15
|
+
<%= render DocumentationComponent.new do |doc| %>
|
16
|
+
<%= doc.with_header { "# Stat" } %>
|
17
|
+
<%= doc.with_body do |body| %>
|
18
|
+
<%= body.with_preview_example(
|
19
|
+
source: <<~ERB
|
20
|
+
<$= render #{component}.new do |stat| $>
|
21
|
+
<$= stat.with_item do |item| $>
|
22
|
+
<$= item.with_title_content("Total Page Views") $>
|
23
|
+
<$= item.with_value_content("89,400") $>
|
24
|
+
<$= item.with_description_content("21% more than last month") $>
|
25
|
+
<$ end $>
|
26
|
+
<$ end $>
|
27
|
+
ERB
|
28
|
+
) %>
|
29
|
+
<% end %>
|
30
|
+
<% end %>
|
31
|
+
|
32
|
+
<%= render DocumentationComponent.new do |doc| %>
|
33
|
+
<%= doc.with_header { "# Stat with icons or image" } %>
|
34
|
+
<%= doc.with_body do |body| %>
|
35
|
+
<%= body.with_preview_example(
|
36
|
+
source: <<~ERB
|
37
|
+
<$= render #{component}.new do |stat| $>
|
38
|
+
<$= stat.with_item do |item| $>
|
39
|
+
<$= item.with_figure(css_class: "text-primary") do $>
|
40
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="32px" viewBox="0 -960 960 960" width="32px" fill="currentColor"><path d="m480-120-58-52q-101-91-167-157T150-447.5Q111-500 95.5-544T80-634q0-94 63-157t157-63q52 0 99 22t81 62q34-40 81-62t99-22q94 0 157 63t63 157q0 46-15.5 90T810-447.5Q771-395 705-329T538-172l-58 52Zm0-108q96-86 158-147.5t98-107q36-45.5 50-81t14-70.5q0-60-40-100t-100-40q-47 0-87 26.5T518-680h-76q-15-41-55-67.5T300-774q-60 0-100 40t-40 100q0 35 14 70.5t50 81q36 45.5 98 107T480-228Zm0-273Z"/></svg>
|
41
|
+
<$ end $>
|
42
|
+
<$= item.with_title_content("Total Likes") $>
|
43
|
+
<$= item.with_value(css_class: "text-primary").with_content("25.6K") $>
|
44
|
+
<$= item.with_description_content("21% more than last month") $>
|
45
|
+
<$ end $>
|
46
|
+
|
47
|
+
<$= stat.with_item do |item| $>
|
48
|
+
<$= item.with_figure(css_class: "text-secondary") do $>
|
49
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="32px" viewBox="0 -960 960 960" width="32px" fill="currentColor"><path d="m422-232 207-248H469l29-227-185 267h139l-30 208ZM320-80l40-280H160l360-520h80l-40 320h240L400-80h-80Zm151-390Z"/></svg>
|
50
|
+
<$ end $>
|
51
|
+
<$= item.with_title_content("Page Views") $>
|
52
|
+
<$= item.with_value(css_class: "text-secondary").with_content("2.6M") $>
|
53
|
+
<$= item.with_description_content("21% more than last month") $>
|
54
|
+
<$ end $>
|
55
|
+
|
56
|
+
<$= stat.with_item do |item| $>
|
57
|
+
<$= item.with_figure(css_class: "text-primary") do |figure| $>
|
58
|
+
<$= figure.with_avatar do |avatar| $>
|
59
|
+
<$= avatar.with_box(css_class: "w-16 rounded-full") do $>
|
60
|
+
<img src="https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp" />
|
61
|
+
<$ end $>
|
62
|
+
<$ end $>
|
63
|
+
<$ end $>
|
64
|
+
<$= item.with_value_content("86%") $>
|
65
|
+
<$= item.with_title_content("Tasks done") $>
|
66
|
+
<$= item.with_description(css_class: "text-secondary").with_content("31 tasks remaining") $>
|
67
|
+
<$ end $>
|
68
|
+
<$ end $>
|
69
|
+
ERB
|
70
|
+
) %>
|
71
|
+
<% end %>
|
72
|
+
<% end %>
|
73
|
+
|
74
|
+
<%= render DocumentationComponent.new do |doc| %>
|
75
|
+
<%= doc.with_header { "# Stat" } %>
|
76
|
+
<%= doc.with_body do |body| %>
|
77
|
+
<%= body.with_preview_example(
|
78
|
+
source: <<~ERB
|
79
|
+
<$= render #{component}.new do |stat| $>
|
80
|
+
<$= stat.with_item do |item| $>
|
81
|
+
<$= item.with_figure(css_class: "text-secondary") do $>
|
82
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="32px" viewBox="0 -960 960 960" width="32px" fill="currentColor"><path d="M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>
|
83
|
+
<$ end $>
|
84
|
+
<$= item.with_title_content("Downloads") $>
|
85
|
+
<$= item.with_value_content("31K") $>
|
86
|
+
<$= item.with_description_content("Jan 1st - Feb 1st") $>
|
87
|
+
<$ end $>
|
88
|
+
|
89
|
+
<$= stat.with_item do |item| $>
|
90
|
+
<$= item.with_figure(css_class: "text-secondary") do $>
|
91
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="32px" viewBox="0 -960 960 960" width="32px" fill="currentColor"><path d="M200-160v-280h-80v-80h240v80h-80v280h-80Zm0-440v-200h80v200h-80Zm160 0v-80h80v-120h80v120h80v80H360Zm80 440v-360h80v360h-80Zm240 0v-120h-80v-80h240v80h-80v120h-80Zm0-280v-360h80v360h-80Z"/></svg>
|
92
|
+
<$ end $>
|
93
|
+
<$= item.with_title_content("New Users") $>
|
94
|
+
<$= item.with_value_content("4,200") $>
|
95
|
+
<$= item.with_description_content("↗︎ 400 (22%)") $>
|
96
|
+
<$ end $>
|
97
|
+
|
98
|
+
<$= stat.with_item do |item| $>
|
99
|
+
<$= item.with_figure(css_class: "text-secondary") do $>
|
100
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="32px" viewBox="0 -960 960 960" width="32px" fill="currentColor"><path d="M200-80q-33 0-56.5-23.5T120-160v-451q-18-11-29-28.5T80-680v-120q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v120q0 23-11 40.5T840-611v451q0 33-23.5 56.5T760-80H200Zm0-520v440h560v-440H200Zm-40-80h640v-120H160v120Zm200 280h240v-80H360v80Zm120 20Z"/></svg>
|
101
|
+
<$ end $>
|
102
|
+
<$= item.with_title_content("New Registers") $>
|
103
|
+
<$= item.with_value_content("1,200") $>
|
104
|
+
<$= item.with_description_content("↘︎ 90 (14%)") $>
|
105
|
+
<$ end $>
|
106
|
+
<$ end $>
|
107
|
+
ERB
|
108
|
+
) %>
|
109
|
+
<% end %>
|
110
|
+
<% end %>
|
111
|
+
|
112
|
+
<%= render DocumentationComponent.new do |doc| %>
|
113
|
+
<%= doc.with_header { "# Centered items" } %>
|
114
|
+
<%= doc.with_body do |body| %>
|
115
|
+
<%= body.with_preview_example(
|
116
|
+
source: <<~ERB
|
117
|
+
<$= render #{component}.new do |stat| $>
|
118
|
+
<$= stat.with_item(css_class: "place-items-center") do |item| $>
|
119
|
+
<$= item.with_title_content("Downloads") $>
|
120
|
+
<$= item.with_value_content("31K") $>
|
121
|
+
<$= item.with_description_content("From January 1st to February 1st") $>
|
122
|
+
<$ end $>
|
123
|
+
|
124
|
+
<$= stat.with_item(css_class: "place-items-center") do |item| $>
|
125
|
+
<$= item.with_title_content("Users") $>
|
126
|
+
<$= item.with_value(css_class: "text-secondary").with_content("4,200") $>
|
127
|
+
<$= item.with_description(css_class: "text-secondary").with_content("↗︎ 40 (2%)") $>
|
128
|
+
<$ end $>
|
129
|
+
|
130
|
+
<$= stat.with_item(css_class: "place-items-center") do |item| $>
|
131
|
+
<$= item.with_title_content("New Registers") $>
|
132
|
+
<$= item.with_value_content("1,200") $>
|
133
|
+
<$= item.with_description_content("↘︎ 90 (14%)") $>
|
134
|
+
<$ end $>
|
135
|
+
<$ end $>
|
136
|
+
ERB
|
137
|
+
) %>
|
138
|
+
<% end %>
|
139
|
+
<% end %>
|
140
|
+
|
141
|
+
<%= render DocumentationComponent.new do |doc| %>
|
142
|
+
<%= doc.with_header { "# Vertical" } %>
|
143
|
+
<%= doc.with_body do |body| %>
|
144
|
+
<%= body.with_preview_example(
|
145
|
+
source: <<~ERB
|
146
|
+
<$= render #{component}.new(vertical: true) do |stat| $>
|
147
|
+
<$= stat.with_item do |item| $>
|
148
|
+
<$= item.with_title_content("Downloads") $>
|
149
|
+
<$= item.with_value_content("31K") $>
|
150
|
+
<$= item.with_description_content("Jan 1st - Feb 1st") $>
|
151
|
+
<$ end $>
|
152
|
+
|
153
|
+
<$= stat.with_item do |item| $>
|
154
|
+
<$= item.with_title_content("New Users") $>
|
155
|
+
<$= item.with_value_content("4,200") $>
|
156
|
+
<$= item.with_description_content("↗︎ 400 (22%)") $>
|
157
|
+
<$ end $>
|
158
|
+
|
159
|
+
<$= stat.with_item do |item| $>
|
160
|
+
<$= item.with_title_content("New Registers") $>
|
161
|
+
<$= item.with_value_content("1,200") $>
|
162
|
+
<$= item.with_description_content("↘︎ 90 (14%)") $>
|
163
|
+
<$ end $>
|
164
|
+
<$ end $>
|
165
|
+
ERB
|
166
|
+
) %>
|
167
|
+
<% end %>
|
168
|
+
<% end %>
|
169
|
+
|
170
|
+
<%= render DocumentationComponent.new do |doc| %>
|
171
|
+
<%= doc.with_header { "# With custom colors and button" } %>
|
172
|
+
<%= doc.with_body do |body| %>
|
173
|
+
<%= body.with_preview_example(
|
174
|
+
source: <<~ERB
|
175
|
+
<$= render #{component}.new do |stat| $>
|
176
|
+
<$= stat.with_item do |item| $>
|
177
|
+
<$= item.with_title_content("Account balance") $>
|
178
|
+
<$= item.with_value_content("$89,400") $>
|
179
|
+
<$= item.with_action do $>
|
180
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(size: "xs", color: "success").with_content("Add funds") $>
|
181
|
+
<$ end $>
|
182
|
+
<$ end $>
|
183
|
+
|
184
|
+
<$= stat.with_item do |item| $>
|
185
|
+
<$= item.with_title_content("Current balance") $>
|
186
|
+
<$= item.with_value_content("$89,400") $>
|
187
|
+
<$= item.with_action do $>
|
188
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(size: "xs").with_content("Withdrawal") $>
|
189
|
+
<$= render UiComponents::DaisyUi::Action::ButtonComponent.new(size: "xs").with_content("Deposit") $>
|
190
|
+
<$ end $>
|
191
|
+
<$ end $>
|
192
|
+
<$ end $>
|
193
|
+
ERB
|
194
|
+
) %>
|
195
|
+
<% end %>
|
196
|
+
<% end %>
|
197
|
+
|
198
|
+
<div class="divider"></div>
|
199
|
+
|
200
|
+
<div class="mb-2">
|
201
|
+
<h1 class="font-bold mb-2"># Data display > Stat</h1>
|
202
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
203
|
+
<%= link_to "< List", daisy_ui_list_path, class: "link link-primary m-2" %>
|
204
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
205
|
+
<%= link_to "Status >", daisy_ui_status_path, class: "link link-primary m-2" %>
|
206
|
+
</ul>
|
207
|
+
</div>
|
208
|
+
</div>
|
@@ -0,0 +1,93 @@
|
|
1
|
+
<% component = UiComponents::DaisyUi::DataDisplay::StatusComponent %>
|
2
|
+
|
3
|
+
<div class="grid grid-cols gap-16 p-2 mt-6 mb-36">
|
4
|
+
<div class="mb-2">
|
5
|
+
<h1 class="font-bold mb-2"># Data display > Status</h1>
|
6
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
7
|
+
<%= link_to "< Stat", daisy_ui_stat_path, class: "link link-primary m-2" %>
|
8
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
9
|
+
<%= link_to "Table >", daisy_ui_table_path, class: "link link-primary m-2" %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="divider"></div>
|
14
|
+
|
15
|
+
<%= render DocumentationComponent.new do |doc| %>
|
16
|
+
<%= doc.with_header { "# Status" } %>
|
17
|
+
<%= doc.with_body do |body| %>
|
18
|
+
<%= body.with_preview_example(
|
19
|
+
source: <<~ERB
|
20
|
+
<$= render #{component}.new $>
|
21
|
+
ERB
|
22
|
+
) %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<% sizes = %w[xs sm md lg xl] %>
|
27
|
+
|
28
|
+
<%= render DocumentationComponent.new do |doc| %>
|
29
|
+
<%= doc.with_header { "# Status sizes" } %>
|
30
|
+
<%= doc.with_body do |body| %>
|
31
|
+
<% sizes.each do |value| %>
|
32
|
+
<%= body.with_preview_example(
|
33
|
+
source: <<~ERB
|
34
|
+
<$= render #{component}.new(size: "#{value}") $>
|
35
|
+
ERB
|
36
|
+
) %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
<% colors = %w[neutral primary secondary accent info success warning error] %>
|
42
|
+
|
43
|
+
<%= render DocumentationComponent.new do |doc| %>
|
44
|
+
<%= doc.with_header { "# Status with colors" } %>
|
45
|
+
<%= doc.with_body do |body| %>
|
46
|
+
<% colors.each do |value| %>
|
47
|
+
<%= body.with_preview_example(
|
48
|
+
source: <<~ERB
|
49
|
+
<$= render #{component}.new(color: "#{value}") $>
|
50
|
+
ERB
|
51
|
+
) %>
|
52
|
+
<% end %>
|
53
|
+
<% end %>
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
<%= render DocumentationComponent.new do |doc| %>
|
57
|
+
<%= doc.with_header { "# Status with ping animation" } %>
|
58
|
+
<%= doc.with_body(preview_options: { css_class: "flex items-center gap-2" }) do |body| %>
|
59
|
+
<%= body.with_preview_example(
|
60
|
+
source: <<~ERB
|
61
|
+
<div class="inline-grid *:[grid-area:1/1]">
|
62
|
+
<$= render #{component}.new(color: "error", animate: "ping") $>
|
63
|
+
<$= render #{component}.new(color: "error") $>
|
64
|
+
</div>
|
65
|
+
Server is down
|
66
|
+
ERB
|
67
|
+
) %>
|
68
|
+
<% end %>
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
<%= render DocumentationComponent.new do |doc| %>
|
72
|
+
<%= doc.with_header { "# Status with bounce animation" } %>
|
73
|
+
<%= doc.with_body(preview_options: { css_class: "flex items-center gap-2" }) do |body| %>
|
74
|
+
<%= body.with_preview_example(
|
75
|
+
source: <<~ERB
|
76
|
+
<$= render #{component}.new(color: "info", animate: "bounce") $>
|
77
|
+
Unread messages
|
78
|
+
ERB
|
79
|
+
) %>
|
80
|
+
<% end %>
|
81
|
+
<% end %>
|
82
|
+
|
83
|
+
<div class="divider"></div>
|
84
|
+
|
85
|
+
<div class="mb-2">
|
86
|
+
<h1 class="font-bold mb-2"># Data display > Status</h1>
|
87
|
+
<ul class="bg-base-100 rounded-box shadow-md p-2">
|
88
|
+
<%= link_to "< Stat", daisy_ui_stat_path, class: "link link-primary m-2" %>
|
89
|
+
<%= link_to "Home", daisy_ui_path, class: "link link-primary m-2" %>
|
90
|
+
<%= link_to "Table >", daisy_ui_table_path, class: "link link-primary m-2" %>
|
91
|
+
</ul>
|
92
|
+
</div>
|
93
|
+
</div>
|