lesli_view 1.1.7 → 1.1.8

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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/lesli_view/view.css +3122 -2430
  3. data/lib/lesli_view/charts/general/general.css +25 -0
  4. data/lib/lesli_view/charts/{general.html.erb → general/general.html.erb} +5 -5
  5. data/lib/lesli_view/components/header/header.css +33 -0
  6. data/lib/lesli_view/components/{header.html.erb → header/header.html.erb} +9 -9
  7. data/lib/lesli_view/components/panel/panel.css +49 -0
  8. data/lib/lesli_view/components/panel/panel.html.erb +55 -0
  9. data/lib/lesli_view/components/tabs/tabs.css +57 -0
  10. data/lib/lesli_view/components/{tabs.html.erb → tabs/tabs.html.erb} +9 -9
  11. data/lib/lesli_view/components/timeline/timeline.css +48 -0
  12. data/lib/lesli_view/components/timeline/timeline.html.erb +42 -0
  13. data/lib/lesli_view/components/{toolbar.css → toolbar/toolbar.css} +8 -5
  14. data/lib/lesli_view/components/{toolbar.html.erb → toolbar/toolbar.html.erb} +2 -2
  15. data/lib/lesli_view/elements/avatar/avatar.css +36 -0
  16. data/lib/lesli_view/elements/avatar/avatar.html.erb +7 -0
  17. data/lib/lesli_view/elements/avatar.rb +6 -6
  18. data/lib/lesli_view/elements/{button.css → button/button.css} +82 -82
  19. data/lib/lesli_view/elements/button.rb +1 -1
  20. data/lib/lesli_view/elements/empty/empty.css +25 -0
  21. data/lib/lesli_view/elements/{empty.html.erb → empty/empty.html.erb} +6 -6
  22. data/lib/lesli_view/elements/table/table-chart.css +9 -0
  23. data/lib/lesli_view/elements/{table-chart.html.erb → table/table-chart.html.erb} +2 -2
  24. data/lib/lesli_view/elements/{table.css → table/table.css} +17 -14
  25. data/lib/lesli_view/elements/{table.html.erb → table/table.html.erb} +1 -1
  26. data/lib/lesli_view/forms/builder.rb +1 -1
  27. data/lib/lesli_view/forms/form.css +26 -23
  28. data/lib/lesli_view/items/actions/actions.css +13 -0
  29. data/lib/lesli_view/items/{actions.html.erb → actions/actions.html.erb} +3 -3
  30. data/lib/lesli_view/items/activities/activities.css +5 -0
  31. data/lib/lesli_view/items/{activities.html.erb → activities/activities.html.erb} +1 -1
  32. data/lib/lesli_view/items/attachment/attachment.css +41 -0
  33. data/lib/lesli_view/items/attachment/attachment.html.erb +45 -0
  34. data/lib/lesli_view/items/attachments/attachments.css +33 -0
  35. data/lib/lesli_view/items/{attachments.html.erb → attachments/attachments.html.erb} +8 -8
  36. data/lib/lesli_view/items/discussion/discussion.css +17 -0
  37. data/lib/lesli_view/items/discussion/discussion.html.erb +12 -0
  38. data/lib/lesli_view/items/discussions/discussions.css +25 -0
  39. data/lib/lesli_view/items/{discussions.html.erb → discussions/discussions.html.erb} +7 -7
  40. data/lib/lesli_view/items/task/task.css +41 -0
  41. data/lib/lesli_view/items/{task.html.erb → task/task.html.erb} +6 -6
  42. data/lib/lesli_view/items/tasks/tasks.css +21 -0
  43. data/lib/lesli_view/items/{tasks.html.erb → tasks/tasks.html.erb} +5 -5
  44. data/lib/lesli_view/layout/container/container.css +13 -0
  45. data/lib/lesli_view/layout/{container.html.erb → container/container.html.erb} +2 -2
  46. data/lib/lesli_view/layout/navigation_sidebar/navigation_sidebar.css +68 -0
  47. data/lib/lesli_view/layout/navigation_sidebar/navigation_sidebar.html.erb +52 -0
  48. data/lib/lesli_view/partials/announcements/announcements.css +50 -0
  49. data/lib/lesli_view/partials/announcements/announcements.html.erb +23 -0
  50. data/lib/lesli_view/partials/announcements.rb +33 -0
  51. data/lib/lesli_view/partials/engine_spec/engine_spec.css +37 -0
  52. data/lib/lesli_view/partials/engine_spec/engine_spec.html.erb +38 -0
  53. data/lib/lesli_view/partials/error/error.css +38 -0
  54. data/lib/lesli_view/partials/error/error.html.erb +14 -0
  55. data/lib/lesli_view/partials/error.rb +24 -0
  56. data/lib/lesli_view/partials/header/header.css +54 -0
  57. data/lib/lesli_view/partials/header/header.html.erb +31 -0
  58. data/lib/lesli_view/partials/header.rb +22 -0
  59. data/lib/lesli_view/partials/notifications/notifications.css +38 -0
  60. data/lib/lesli_view/partials/notifications/notifications.html.erb +7 -0
  61. data/lib/lesli_view/partials/notifications.rb +28 -0
  62. data/lib/lesli_view/version.rb +2 -2
  63. data/lib/lesli_view/widgets/calendar/calendar.css +57 -0
  64. data/lib/lesli_view/widgets/calendar/calendar.html.erb +44 -0
  65. data/lib/lesli_view/widgets/chart/chart.css +21 -0
  66. data/lib/lesli_view/widgets/{chart.html.erb → chart/chart.html.erb} +5 -5
  67. data/lib/lesli_view/widgets/count/count.css +21 -0
  68. data/lib/lesli_view/widgets/count/count.html.erb +18 -0
  69. data/lib/lesli_view/widgets/date/date.css +29 -0
  70. data/lib/lesli_view/widgets/date/date.html.erb +24 -0
  71. data/lib/lesli_view/widgets/weather/weather.css +81 -0
  72. data/lib/lesli_view/widgets/weather/weather.html.erb +46 -0
  73. data/lib/lesli_view.rb +4 -0
  74. data/readme.md +1 -1
  75. metadata +68 -34
  76. data/lib/lesli_view/components/panel.html.erb +0 -55
  77. data/lib/lesli_view/components/timeline.html.erb +0 -42
  78. data/lib/lesli_view/elements/avatar.html.erb +0 -7
  79. data/lib/lesli_view/forms/form.scss +0 -35
  80. data/lib/lesli_view/items/attachment.html.erb +0 -45
  81. data/lib/lesli_view/items/discussion.html.erb +0 -12
  82. data/lib/lesli_view/layout/navigation_sidebar.css +0 -19
  83. data/lib/lesli_view/layout/navigation_sidebar.html.erb +0 -52
  84. data/lib/lesli_view/partials/engine_spec.html.erb +0 -38
  85. data/lib/lesli_view/widgets/calendar.html.erb +0 -44
  86. data/lib/lesli_view/widgets/count.html.erb +0 -18
  87. data/lib/lesli_view/widgets/date.html.erb +0 -24
  88. data/lib/lesli_view/widgets/weather.html.erb +0 -46
  89. /data/lib/lesli_view/elements/{button.html.erb → button/button.html.erb} +0 -0
@@ -1,44 +0,0 @@
1
- <section
2
- class="lesli-calendar-widget h-full rounded-2xl border border-slate-200 bg-white p-3 shadow-sm sm:p-4"
3
- aria-label="<%= calendar_title %>">
4
-
5
- <div class="grid grid-cols-7 gap-0.5">
6
- <% weekdays.each do |abbreviated_name, full_name| %>
7
- <div class="py-0.5 text-center text-[11px] font-semibold uppercase tracking-wide text-slate-400">
8
- <abbr class="no-underline" title="<%= full_name %>"><%= abbreviated_name %></abbr>
9
- </div>
10
- <% end %>
11
- </div>
12
-
13
- <div class="mt-0.5 grid grid-cols-7 gap-0.5">
14
- <% calendar_days.each do |day| %>
15
- <% if day.nil? %>
16
- <span class="h-8 sm:h-9" aria-hidden="true"></span>
17
- <% else %>
18
- <% day_date = date_for(day) %>
19
- <div
20
- class="relative flex h-8 items-center justify-center rounded-lg text-sm font-medium sm:h-9
21
- <%= if selected?(day)
22
- "bg-sky-600 text-white shadow-sm"
23
- elsif today?(day)
24
- "bg-sky-50 text-sky-700 ring-1 ring-inset ring-sky-200"
25
- else
26
- "text-slate-600"
27
- end %>">
28
-
29
- <time
30
- datetime="<%= day_date.iso8601 %>"
31
- aria-label="<%= I18n.l(day_date, format: :long) %>"
32
- <% if today?(day) %>aria-current="date"<% end %>><%= day %></time>
33
-
34
- <% if event?(day) %>
35
- <span
36
- class="absolute bottom-1 h-1 w-1 rounded-full <%= selected?(day) ? 'bg-white' : 'bg-rose-400' %>"
37
- aria-hidden="true"></span>
38
- <span class="sr-only"><%= I18n.t("date.has_events", default: "Has events") %></span>
39
- <% end %>
40
- </div>
41
- <% end %>
42
- <% end %>
43
- </div>
44
- </section>
@@ -1,18 +0,0 @@
1
- <section
2
- class="lesli-count-widget h-full rounded-2xl border border-slate-200 bg-white p-4 shadow-sm"
3
- <% if title.present? %>aria-labelledby="<%= title_id %>"<% else %>aria-label="<%= I18n.t('metrics.count', default: 'Count') %>"<% end %>>
4
-
5
- <div class="flex h-full min-h-40 flex-col">
6
- <% if title.present? %>
7
- <h2 id="<%= title_id %>" class="text-sm font-medium leading-5 text-slate-500">
8
- <%= title %>
9
- </h2>
10
- <% end %>
11
-
12
- <div class="flex flex-1 items-center justify-center py-4">
13
- <p class="break-all text-center text-5xl font-semibold leading-none tracking-tight text-sky-600 tabular-nums sm:text-6xl">
14
- <%= display_number %>
15
- </p>
16
- </div>
17
- </div>
18
- </section>
@@ -1,24 +0,0 @@
1
- <section
2
- class="lesli-date-widget h-full rounded-2xl border border-slate-200 bg-white p-4 shadow-sm"
3
- aria-label="<%= accessible_date %>">
4
-
5
- <time
6
- class="flex h-full min-h-40 items-center justify-center"
7
- datetime="<%= date.iso8601 %>">
8
-
9
- <span class="text-6xl font-light leading-none tracking-tight text-sky-600">
10
- <%= date.day %>
11
- </span>
12
-
13
- <span class="mx-5 h-20 w-px shrink-0 bg-slate-200 sm:mx-6" aria-hidden="true"></span>
14
-
15
- <span class="min-w-0 text-left">
16
- <span class="block text-lg font-semibold capitalize tracking-tight text-slate-700">
17
- <%= weekday_name %>
18
- </span>
19
- <span class="mt-1 block text-base font-medium capitalize text-slate-400">
20
- <%= month_name %> <%= date.year %>
21
- </span>
22
- </span>
23
- </time>
24
- </section>
@@ -1,46 +0,0 @@
1
- <section
2
- class="lesli-weather-widget h-full rounded-2xl border border-slate-200 bg-white p-4 shadow-sm"
3
- aria-label="<%= accessible_label %>">
4
-
5
- <%
6
- # Give each common weather family its own restrained accent color.
7
- icon_colors, halo_color = case icon.to_s
8
- when /sun|clear/
9
- ["from-amber-50 to-yellow-100 text-amber-500 shadow-amber-100", "bg-amber-200"]
10
- when /cloud|fog/
11
- ["from-slate-50 to-slate-200 text-slate-500 shadow-slate-200", "bg-slate-300"]
12
- when /snow/
13
- ["from-cyan-50 to-sky-100 text-cyan-500 shadow-cyan-100", "bg-cyan-200"]
14
- else
15
- ["from-sky-50 to-blue-100 text-sky-600 shadow-sky-100", "bg-sky-200"]
16
- end
17
- %>
18
-
19
- <div class="flex h-full min-h-40 items-center justify-center">
20
- <div class="shrink-0 text-6xl font-light leading-none tracking-tight text-sky-600">
21
- <%= display_temperature %>
22
- </div>
23
-
24
- <div class="mx-5 h-20 w-px shrink-0 bg-slate-200 sm:mx-6" aria-hidden="true"></div>
25
-
26
- <div class="flex min-w-0 items-center gap-3">
27
- <div class="relative flex h-14 w-14 shrink-0 items-center justify-center">
28
- <span
29
- class="absolute inset-0 rounded-full opacity-30 blur-sm motion-safe:animate-pulse <%= halo_color %>"
30
- aria-hidden="true"></span>
31
- <span class="relative flex h-14 w-14 items-center justify-center rounded-full bg-gradient-to-br shadow-lg <%= icon_colors %>">
32
- <span class="material-symbols text-3xl leading-none" aria-hidden="true"><%= icon %></span>
33
- </span>
34
- </div>
35
-
36
- <div class="min-w-0">
37
- <p class="truncate text-lg font-semibold tracking-tight text-slate-700">
38
- <%= location %>
39
- </p>
40
- <p class="mt-1 truncate text-sm font-medium text-slate-400">
41
- <%= condition_text %> · °<%= unit %>
42
- </p>
43
- </div>
44
- </div>
45
- </div>
46
- </section>