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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/lesli_view/view.css +3122 -2430
- data/lib/lesli_view/charts/general/general.css +25 -0
- data/lib/lesli_view/charts/{general.html.erb → general/general.html.erb} +5 -5
- data/lib/lesli_view/components/header/header.css +33 -0
- data/lib/lesli_view/components/{header.html.erb → header/header.html.erb} +9 -9
- data/lib/lesli_view/components/panel/panel.css +49 -0
- data/lib/lesli_view/components/panel/panel.html.erb +55 -0
- data/lib/lesli_view/components/tabs/tabs.css +57 -0
- data/lib/lesli_view/components/{tabs.html.erb → tabs/tabs.html.erb} +9 -9
- data/lib/lesli_view/components/timeline/timeline.css +48 -0
- data/lib/lesli_view/components/timeline/timeline.html.erb +42 -0
- data/lib/lesli_view/components/{toolbar.css → toolbar/toolbar.css} +8 -5
- data/lib/lesli_view/components/{toolbar.html.erb → toolbar/toolbar.html.erb} +2 -2
- data/lib/lesli_view/elements/avatar/avatar.css +36 -0
- data/lib/lesli_view/elements/avatar/avatar.html.erb +7 -0
- data/lib/lesli_view/elements/avatar.rb +6 -6
- data/lib/lesli_view/elements/{button.css → button/button.css} +82 -82
- data/lib/lesli_view/elements/button.rb +1 -1
- data/lib/lesli_view/elements/empty/empty.css +25 -0
- data/lib/lesli_view/elements/{empty.html.erb → empty/empty.html.erb} +6 -6
- data/lib/lesli_view/elements/table/table-chart.css +9 -0
- data/lib/lesli_view/elements/{table-chart.html.erb → table/table-chart.html.erb} +2 -2
- data/lib/lesli_view/elements/{table.css → table/table.css} +17 -14
- data/lib/lesli_view/elements/{table.html.erb → table/table.html.erb} +1 -1
- data/lib/lesli_view/forms/builder.rb +1 -1
- data/lib/lesli_view/forms/form.css +26 -23
- data/lib/lesli_view/items/actions/actions.css +13 -0
- data/lib/lesli_view/items/{actions.html.erb → actions/actions.html.erb} +3 -3
- data/lib/lesli_view/items/activities/activities.css +5 -0
- data/lib/lesli_view/items/{activities.html.erb → activities/activities.html.erb} +1 -1
- data/lib/lesli_view/items/attachment/attachment.css +41 -0
- data/lib/lesli_view/items/attachment/attachment.html.erb +45 -0
- data/lib/lesli_view/items/attachments/attachments.css +33 -0
- data/lib/lesli_view/items/{attachments.html.erb → attachments/attachments.html.erb} +8 -8
- data/lib/lesli_view/items/discussion/discussion.css +17 -0
- data/lib/lesli_view/items/discussion/discussion.html.erb +12 -0
- data/lib/lesli_view/items/discussions/discussions.css +25 -0
- data/lib/lesli_view/items/{discussions.html.erb → discussions/discussions.html.erb} +7 -7
- data/lib/lesli_view/items/task/task.css +41 -0
- data/lib/lesli_view/items/{task.html.erb → task/task.html.erb} +6 -6
- data/lib/lesli_view/items/tasks/tasks.css +21 -0
- data/lib/lesli_view/items/{tasks.html.erb → tasks/tasks.html.erb} +5 -5
- data/lib/lesli_view/layout/container/container.css +13 -0
- data/lib/lesli_view/layout/{container.html.erb → container/container.html.erb} +2 -2
- data/lib/lesli_view/layout/navigation_sidebar/navigation_sidebar.css +68 -0
- data/lib/lesli_view/layout/navigation_sidebar/navigation_sidebar.html.erb +52 -0
- data/lib/lesli_view/partials/announcements/announcements.css +50 -0
- data/lib/lesli_view/partials/announcements/announcements.html.erb +23 -0
- data/lib/lesli_view/partials/announcements.rb +33 -0
- data/lib/lesli_view/partials/engine_spec/engine_spec.css +37 -0
- data/lib/lesli_view/partials/engine_spec/engine_spec.html.erb +38 -0
- data/lib/lesli_view/partials/error/error.css +38 -0
- data/lib/lesli_view/partials/error/error.html.erb +14 -0
- data/lib/lesli_view/partials/error.rb +24 -0
- data/lib/lesli_view/partials/header/header.css +54 -0
- data/lib/lesli_view/partials/header/header.html.erb +31 -0
- data/lib/lesli_view/partials/header.rb +22 -0
- data/lib/lesli_view/partials/notifications/notifications.css +38 -0
- data/lib/lesli_view/partials/notifications/notifications.html.erb +7 -0
- data/lib/lesli_view/partials/notifications.rb +28 -0
- data/lib/lesli_view/version.rb +2 -2
- data/lib/lesli_view/widgets/calendar/calendar.css +57 -0
- data/lib/lesli_view/widgets/calendar/calendar.html.erb +44 -0
- data/lib/lesli_view/widgets/chart/chart.css +21 -0
- data/lib/lesli_view/widgets/{chart.html.erb → chart/chart.html.erb} +5 -5
- data/lib/lesli_view/widgets/count/count.css +21 -0
- data/lib/lesli_view/widgets/count/count.html.erb +18 -0
- data/lib/lesli_view/widgets/date/date.css +29 -0
- data/lib/lesli_view/widgets/date/date.html.erb +24 -0
- data/lib/lesli_view/widgets/weather/weather.css +81 -0
- data/lib/lesli_view/widgets/weather/weather.html.erb +46 -0
- data/lib/lesli_view.rb +4 -0
- data/readme.md +1 -1
- metadata +68 -34
- data/lib/lesli_view/components/panel.html.erb +0 -55
- data/lib/lesli_view/components/timeline.html.erb +0 -42
- data/lib/lesli_view/elements/avatar.html.erb +0 -7
- data/lib/lesli_view/forms/form.scss +0 -35
- data/lib/lesli_view/items/attachment.html.erb +0 -45
- data/lib/lesli_view/items/discussion.html.erb +0 -12
- data/lib/lesli_view/layout/navigation_sidebar.css +0 -19
- data/lib/lesli_view/layout/navigation_sidebar.html.erb +0 -52
- data/lib/lesli_view/partials/engine_spec.html.erb +0 -38
- data/lib/lesli_view/widgets/calendar.html.erb +0 -44
- data/lib/lesli_view/widgets/count.html.erb +0 -18
- data/lib/lesli_view/widgets/date.html.erb +0 -24
- data/lib/lesli_view/widgets/weather.html.erb +0 -46
- /data/lib/lesli_view/elements/{button.html.erb → button/button.html.erb} +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.lesli-weather-widget {
|
|
3
|
+
@apply h-full rounded-2xl border border-neutral-200 bg-white p-4 shadow-sm;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.lesli-weather-widget-sunny {
|
|
7
|
+
@apply from-maize-100 to-maize-100 text-maize-500 shadow-maize-100;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.lesli-weather-widget-sunny-halo {
|
|
11
|
+
@apply bg-maize-100;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.lesli-weather-widget-cloudy {
|
|
15
|
+
@apply from-neutral-50 to-neutral-200 text-neutral-500 shadow-neutral-200;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.lesli-weather-widget-cloudy-halo {
|
|
19
|
+
@apply bg-neutral-300;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.lesli-weather-widget-rainy {
|
|
23
|
+
@apply from-cenote-100 to-cenote-100 text-cenote-500 shadow-cenote-100;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.lesli-weather-widget-rainy-halo {
|
|
27
|
+
@apply bg-cenote-100;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.lesli-weather-widget-default {
|
|
31
|
+
@apply from-cenote-100 to-cenote-100 text-cenote-500 shadow-cenote-100;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.lesli-weather-widget-default-halo {
|
|
35
|
+
@apply bg-cenote-100;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.lesli-weather-widget-body {
|
|
39
|
+
@apply flex h-full min-h-40 items-center justify-center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.lesli-weather-widget-temperature {
|
|
43
|
+
@apply shrink-0 text-6xl font-light leading-none tracking-tight text-primary;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.lesli-weather-widget-divider {
|
|
47
|
+
@apply mx-5 h-20 w-px shrink-0 bg-neutral-200 sm:mx-6;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.lesli-weather-widget-details {
|
|
51
|
+
@apply flex min-w-0 items-center gap-3;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.lesli-weather-widget-illustration {
|
|
55
|
+
@apply relative flex h-14 w-14 shrink-0 items-center justify-center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.lesli-weather-widget-halo {
|
|
59
|
+
@apply absolute inset-0 rounded-full opacity-30 blur-sm motion-safe:animate-pulse;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.lesli-weather-widget-symbol {
|
|
63
|
+
@apply relative flex h-14 w-14 items-center justify-center rounded-full bg-gradient-to-br shadow-lg;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.lesli-weather-widget-icon {
|
|
67
|
+
@apply text-3xl leading-none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.lesli-weather-widget-text {
|
|
71
|
+
@apply min-w-0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.lesli-weather-widget-condition {
|
|
75
|
+
@apply truncate text-lg font-semibold tracking-tight text-neutral-700;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.lesli-weather-widget-description {
|
|
79
|
+
@apply mt-1 truncate text-sm font-medium text-neutral-400;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<section
|
|
2
|
+
class="lesli-weather-widget"
|
|
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
|
+
["lesli-weather-widget-sunny", "lesli-weather-widget-sunny-halo"]
|
|
10
|
+
when /cloud|fog/
|
|
11
|
+
["lesli-weather-widget-cloudy", "lesli-weather-widget-cloudy-halo"]
|
|
12
|
+
when /snow/
|
|
13
|
+
["lesli-weather-widget-rainy", "lesli-weather-widget-rainy-halo"]
|
|
14
|
+
else
|
|
15
|
+
["lesli-weather-widget-default", "lesli-weather-widget-default-halo"]
|
|
16
|
+
end
|
|
17
|
+
%>
|
|
18
|
+
|
|
19
|
+
<div class="lesli-weather-widget-body">
|
|
20
|
+
<div class="lesli-weather-widget-temperature">
|
|
21
|
+
<%= display_temperature %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="lesli-weather-widget-divider" aria-hidden="true"></div>
|
|
25
|
+
|
|
26
|
+
<div class="lesli-weather-widget-details">
|
|
27
|
+
<div class="lesli-weather-widget-illustration">
|
|
28
|
+
<span
|
|
29
|
+
class="lesli-weather-widget-halo <%= halo_color %>"
|
|
30
|
+
aria-hidden="true"></span>
|
|
31
|
+
<span class="lesli-weather-widget-symbol <%= icon_colors %>">
|
|
32
|
+
<span class="material-symbols lesli-weather-widget-icon" aria-hidden="true"><%= icon %></span>
|
|
33
|
+
</span>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="lesli-weather-widget-text">
|
|
37
|
+
<p class="lesli-weather-widget-condition">
|
|
38
|
+
<%= location %>
|
|
39
|
+
</p>
|
|
40
|
+
<p class="lesli-weather-widget-description">
|
|
41
|
+
<%= condition_text %> · °<%= unit %>
|
|
42
|
+
</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</section>
|
data/lib/lesli_view.rb
CHANGED
|
@@ -54,6 +54,10 @@ require "lesli_view/layout/navigation_sidebar"
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
# loading partials
|
|
57
|
+
require "lesli_view/partials/error"
|
|
58
|
+
require "lesli_view/partials/announcements"
|
|
59
|
+
require "lesli_view/partials/header"
|
|
60
|
+
require "lesli_view/partials/notifications"
|
|
57
61
|
require "lesli_view/partials/engine_spec"
|
|
58
62
|
|
|
59
63
|
|
data/readme.md
CHANGED
|
@@ -42,7 +42,7 @@ LesliView provides:
|
|
|
42
42
|
- Composable, testable components built with ViewComponent
|
|
43
43
|
- Rails-native form builders with consistent labels, controls, messages, and actions
|
|
44
44
|
- Reusable views for common product concepts such as activities, attachments, discussions, and tasks
|
|
45
|
-
- Responsive presentation
|
|
45
|
+
- Responsive presentation through component classes compiled with Tailwind CSS
|
|
46
46
|
- Accessible defaults for labels, button states, navigation, and page actions
|
|
47
47
|
|
|
48
48
|
<br />
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lesli_view
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Lesli Development Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: view_component
|
|
@@ -51,73 +51,107 @@ files:
|
|
|
51
51
|
- app/assets/stylesheets/lesli_view/view.css
|
|
52
52
|
- lib/lesli_view.rb
|
|
53
53
|
- lib/lesli_view/charts/bar.rb
|
|
54
|
-
- lib/lesli_view/charts/general.html.erb
|
|
55
54
|
- lib/lesli_view/charts/general.rb
|
|
55
|
+
- lib/lesli_view/charts/general/general.css
|
|
56
|
+
- lib/lesli_view/charts/general/general.html.erb
|
|
56
57
|
- lib/lesli_view/charts/line.rb
|
|
57
|
-
- lib/lesli_view/components/header.html.erb
|
|
58
58
|
- lib/lesli_view/components/header.rb
|
|
59
|
-
- lib/lesli_view/components/
|
|
59
|
+
- lib/lesli_view/components/header/header.css
|
|
60
|
+
- lib/lesli_view/components/header/header.html.erb
|
|
60
61
|
- lib/lesli_view/components/panel.rb
|
|
61
|
-
- lib/lesli_view/components/
|
|
62
|
+
- lib/lesli_view/components/panel/panel.css
|
|
63
|
+
- lib/lesli_view/components/panel/panel.html.erb
|
|
62
64
|
- lib/lesli_view/components/tabs.rb
|
|
63
|
-
- lib/lesli_view/components/
|
|
65
|
+
- lib/lesli_view/components/tabs/tabs.css
|
|
66
|
+
- lib/lesli_view/components/tabs/tabs.html.erb
|
|
64
67
|
- lib/lesli_view/components/timeline.rb
|
|
65
|
-
- lib/lesli_view/components/
|
|
66
|
-
- lib/lesli_view/components/
|
|
68
|
+
- lib/lesli_view/components/timeline/timeline.css
|
|
69
|
+
- lib/lesli_view/components/timeline/timeline.html.erb
|
|
67
70
|
- lib/lesli_view/components/toolbar.rb
|
|
68
|
-
- lib/lesli_view/
|
|
71
|
+
- lib/lesli_view/components/toolbar/toolbar.css
|
|
72
|
+
- lib/lesli_view/components/toolbar/toolbar.html.erb
|
|
69
73
|
- lib/lesli_view/elements/avatar.rb
|
|
70
|
-
- lib/lesli_view/elements/
|
|
71
|
-
- lib/lesli_view/elements/
|
|
74
|
+
- lib/lesli_view/elements/avatar/avatar.css
|
|
75
|
+
- lib/lesli_view/elements/avatar/avatar.html.erb
|
|
72
76
|
- lib/lesli_view/elements/button.rb
|
|
73
|
-
- lib/lesli_view/elements/
|
|
77
|
+
- lib/lesli_view/elements/button/button.css
|
|
78
|
+
- lib/lesli_view/elements/button/button.html.erb
|
|
74
79
|
- lib/lesli_view/elements/empty.rb
|
|
75
|
-
- lib/lesli_view/elements/
|
|
76
|
-
- lib/lesli_view/elements/
|
|
77
|
-
- lib/lesli_view/elements/table.html.erb
|
|
80
|
+
- lib/lesli_view/elements/empty/empty.css
|
|
81
|
+
- lib/lesli_view/elements/empty/empty.html.erb
|
|
78
82
|
- lib/lesli_view/elements/table.rb
|
|
83
|
+
- lib/lesli_view/elements/table/table-chart.css
|
|
84
|
+
- lib/lesli_view/elements/table/table-chart.html.erb
|
|
85
|
+
- lib/lesli_view/elements/table/table.css
|
|
86
|
+
- lib/lesli_view/elements/table/table.html.erb
|
|
79
87
|
- lib/lesli_view/engine.rb
|
|
80
88
|
- lib/lesli_view/forms/builder.rb
|
|
81
89
|
- lib/lesli_view/forms/builder_horizontal.rb
|
|
82
90
|
- lib/lesli_view/forms/fields.rb
|
|
83
91
|
- lib/lesli_view/forms/fieldset.rb
|
|
84
92
|
- lib/lesli_view/forms/form.css
|
|
85
|
-
- lib/lesli_view/forms/form.scss
|
|
86
93
|
- lib/lesli_view/forms/inputs.rb
|
|
87
|
-
- lib/lesli_view/items/actions.html.erb
|
|
88
94
|
- lib/lesli_view/items/actions.rb
|
|
89
|
-
- lib/lesli_view/items/
|
|
95
|
+
- lib/lesli_view/items/actions/actions.css
|
|
96
|
+
- lib/lesli_view/items/actions/actions.html.erb
|
|
90
97
|
- lib/lesli_view/items/activities.rb
|
|
91
|
-
- lib/lesli_view/items/
|
|
98
|
+
- lib/lesli_view/items/activities/activities.css
|
|
99
|
+
- lib/lesli_view/items/activities/activities.html.erb
|
|
92
100
|
- lib/lesli_view/items/attachment.rb
|
|
93
|
-
- lib/lesli_view/items/
|
|
101
|
+
- lib/lesli_view/items/attachment/attachment.css
|
|
102
|
+
- lib/lesli_view/items/attachment/attachment.html.erb
|
|
94
103
|
- lib/lesli_view/items/attachments.rb
|
|
95
|
-
- lib/lesli_view/items/
|
|
104
|
+
- lib/lesli_view/items/attachments/attachments.css
|
|
105
|
+
- lib/lesli_view/items/attachments/attachments.html.erb
|
|
96
106
|
- lib/lesli_view/items/discussion.rb
|
|
97
|
-
- lib/lesli_view/items/
|
|
107
|
+
- lib/lesli_view/items/discussion/discussion.css
|
|
108
|
+
- lib/lesli_view/items/discussion/discussion.html.erb
|
|
98
109
|
- lib/lesli_view/items/discussions.rb
|
|
99
|
-
- lib/lesli_view/items/
|
|
110
|
+
- lib/lesli_view/items/discussions/discussions.css
|
|
111
|
+
- lib/lesli_view/items/discussions/discussions.html.erb
|
|
100
112
|
- lib/lesli_view/items/task.rb
|
|
101
|
-
- lib/lesli_view/items/
|
|
113
|
+
- lib/lesli_view/items/task/task.css
|
|
114
|
+
- lib/lesli_view/items/task/task.html.erb
|
|
102
115
|
- lib/lesli_view/items/tasks.rb
|
|
103
|
-
- lib/lesli_view/
|
|
116
|
+
- lib/lesli_view/items/tasks/tasks.css
|
|
117
|
+
- lib/lesli_view/items/tasks/tasks.html.erb
|
|
104
118
|
- lib/lesli_view/layout/container.rb
|
|
105
|
-
- lib/lesli_view/layout/
|
|
106
|
-
- lib/lesli_view/layout/
|
|
119
|
+
- lib/lesli_view/layout/container/container.css
|
|
120
|
+
- lib/lesli_view/layout/container/container.html.erb
|
|
107
121
|
- lib/lesli_view/layout/navigation_sidebar.rb
|
|
108
|
-
- lib/lesli_view/
|
|
122
|
+
- lib/lesli_view/layout/navigation_sidebar/navigation_sidebar.css
|
|
123
|
+
- lib/lesli_view/layout/navigation_sidebar/navigation_sidebar.html.erb
|
|
124
|
+
- lib/lesli_view/partials/announcements.rb
|
|
125
|
+
- lib/lesli_view/partials/announcements/announcements.css
|
|
126
|
+
- lib/lesli_view/partials/announcements/announcements.html.erb
|
|
109
127
|
- lib/lesli_view/partials/engine_spec.rb
|
|
128
|
+
- lib/lesli_view/partials/engine_spec/engine_spec.css
|
|
129
|
+
- lib/lesli_view/partials/engine_spec/engine_spec.html.erb
|
|
130
|
+
- lib/lesli_view/partials/error.rb
|
|
131
|
+
- lib/lesli_view/partials/error/error.css
|
|
132
|
+
- lib/lesli_view/partials/error/error.html.erb
|
|
133
|
+
- lib/lesli_view/partials/header.rb
|
|
134
|
+
- lib/lesli_view/partials/header/header.css
|
|
135
|
+
- lib/lesli_view/partials/header/header.html.erb
|
|
136
|
+
- lib/lesli_view/partials/notifications.rb
|
|
137
|
+
- lib/lesli_view/partials/notifications/notifications.css
|
|
138
|
+
- lib/lesli_view/partials/notifications/notifications.html.erb
|
|
110
139
|
- lib/lesli_view/version.rb
|
|
111
|
-
- lib/lesli_view/widgets/calendar.html.erb
|
|
112
140
|
- lib/lesli_view/widgets/calendar.rb
|
|
113
|
-
- lib/lesli_view/widgets/
|
|
141
|
+
- lib/lesli_view/widgets/calendar/calendar.css
|
|
142
|
+
- lib/lesli_view/widgets/calendar/calendar.html.erb
|
|
114
143
|
- lib/lesli_view/widgets/chart.rb
|
|
115
|
-
- lib/lesli_view/widgets/
|
|
144
|
+
- lib/lesli_view/widgets/chart/chart.css
|
|
145
|
+
- lib/lesli_view/widgets/chart/chart.html.erb
|
|
116
146
|
- lib/lesli_view/widgets/count.rb
|
|
117
|
-
- lib/lesli_view/widgets/
|
|
147
|
+
- lib/lesli_view/widgets/count/count.css
|
|
148
|
+
- lib/lesli_view/widgets/count/count.html.erb
|
|
118
149
|
- lib/lesli_view/widgets/date.rb
|
|
119
|
-
- lib/lesli_view/widgets/
|
|
150
|
+
- lib/lesli_view/widgets/date/date.css
|
|
151
|
+
- lib/lesli_view/widgets/date/date.html.erb
|
|
120
152
|
- lib/lesli_view/widgets/weather.rb
|
|
153
|
+
- lib/lesli_view/widgets/weather/weather.css
|
|
154
|
+
- lib/lesli_view/widgets/weather/weather.html.erb
|
|
121
155
|
- license
|
|
122
156
|
- readme.md
|
|
123
157
|
homepage: https://www.lesli.dev/
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<%
|
|
3
|
-
panel_title_id = "#{id}-title"
|
|
4
|
-
attributes = {
|
|
5
|
-
id: "#{id}-panel",
|
|
6
|
-
class: "lesli-panel relative z-50",
|
|
7
|
-
"x-data": "{ open: false, trigger: null, openPanel() { this.trigger = document.activeElement; this.open = true; this.$nextTick(() => this.$refs.closeButton.focus()) }, closePanel() { this.open = false; this.$nextTick(() => this.trigger?.focus()) } }",
|
|
8
|
-
"x-cloak": true,
|
|
9
|
-
"@#{id}.window": "openPanel()",
|
|
10
|
-
"@keydown.escape.window": "if (open) closePanel()"
|
|
11
|
-
}
|
|
12
|
-
%>
|
|
13
|
-
|
|
14
|
-
<%= content_tag(:section, **attributes) do %>
|
|
15
|
-
<% if overlay %>
|
|
16
|
-
<div
|
|
17
|
-
class="fixed inset-0 z-40 bg-slate-950/25"
|
|
18
|
-
aria-hidden="true"
|
|
19
|
-
x-show="open"
|
|
20
|
-
x-transition.opacity
|
|
21
|
-
@click="closePanel()">
|
|
22
|
-
</div>
|
|
23
|
-
<% end %>
|
|
24
|
-
|
|
25
|
-
<div
|
|
26
|
-
class="fixed inset-y-0 right-0 z-50 flex h-dvh max-h-dvh w-full flex-col overflow-y-auto overscroll-contain bg-white shadow-2xl sm:max-w-2xl lg:max-w-3xl"
|
|
27
|
-
role="dialog"
|
|
28
|
-
aria-modal="<%= overlay %>"
|
|
29
|
-
aria-labelledby="<%= panel_title_id %>"
|
|
30
|
-
x-show="open"
|
|
31
|
-
x-transition:enter="transform transition ease-out duration-150"
|
|
32
|
-
x-transition:enter-start="translate-x-8 opacity-0"
|
|
33
|
-
x-transition:enter-end="translate-x-0 opacity-100"
|
|
34
|
-
x-transition:leave="transform transition ease-in duration-100"
|
|
35
|
-
x-transition:leave-start="translate-x-0 opacity-100"
|
|
36
|
-
x-transition:leave-end="translate-x-8 opacity-0">
|
|
37
|
-
<div class="sticky top-0 z-10 flex items-center justify-between gap-4 border-b border-slate-200 bg-white px-4 py-3 sm:px-6">
|
|
38
|
-
<h2 id="<%= panel_title_id %>" class="min-w-0 truncate text-lg font-semibold text-slate-900">
|
|
39
|
-
<%= title %>
|
|
40
|
-
</h2>
|
|
41
|
-
<button
|
|
42
|
-
type="button"
|
|
43
|
-
class="inline-flex size-11 shrink-0 items-center justify-center rounded-lg text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-700 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-sky-500/20"
|
|
44
|
-
aria-label="Close panel"
|
|
45
|
-
x-ref="closeButton"
|
|
46
|
-
@click="closePanel()">
|
|
47
|
-
<span class="material-symbols text-xl leading-none" aria-hidden="true">arrow_forward_ios</span>
|
|
48
|
-
</button>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
<div class="min-w-0 flex-1 p-4 sm:p-6">
|
|
52
|
-
<%= content %>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
<% end %>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<div class="lesli-timelines py-6">
|
|
2
|
-
<% if activities.any? %>
|
|
3
|
-
<ul class="m-0 w-full list-none p-0">
|
|
4
|
-
<% activities.each do |activity| %>
|
|
5
|
-
<li class="group grid grid-cols-[1.5rem_minmax(0,1fr)] gap-x-4 md:grid-cols-[minmax(8rem,auto)_1.5rem_minmax(0,1fr)] md:gap-x-6">
|
|
6
|
-
<div class="col-start-2 mb-2 min-w-0 text-xs font-bold uppercase tracking-[0.2em] text-slate-500 md:col-start-1 md:row-start-1 md:mb-0 md:pt-1 md:text-right">
|
|
7
|
-
<time><%= activity["date"] %></time>
|
|
8
|
-
|
|
9
|
-
<% if activity["actor"].present? %>
|
|
10
|
-
<span class="mt-1 block font-normal normal-case tracking-normal text-slate-400">
|
|
11
|
-
<%= activity["actor"] %>
|
|
12
|
-
</span>
|
|
13
|
-
<% end %>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<div class="relative col-start-1 row-span-2 row-start-1 flex justify-center md:col-start-2">
|
|
17
|
-
<span
|
|
18
|
-
class="material-symbols-outlined relative z-10 bg-white text-xl leading-none text-[var(--lesli-color-primary)]"
|
|
19
|
-
aria-hidden="true">
|
|
20
|
-
<%= icon_for(activity) %>
|
|
21
|
-
</span>
|
|
22
|
-
<span class="absolute top-7 bottom-0 left-1/2 w-px -translate-x-1/2 bg-slate-300 group-last:hidden" aria-hidden="true"></span>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<div class="col-start-2 row-start-2 min-w-0 pb-10 md:col-start-3 md:row-start-1">
|
|
26
|
-
<h6 class="text-base font-semibold text-slate-800">
|
|
27
|
-
<%= activity["operation"] %>
|
|
28
|
-
</h6>
|
|
29
|
-
|
|
30
|
-
<% if activity["description"].present? %>
|
|
31
|
-
<p class="mt-1 text-sm leading-6 text-slate-600">
|
|
32
|
-
<%= activity["description"] %>
|
|
33
|
-
</p>
|
|
34
|
-
<% end %>
|
|
35
|
-
</div>
|
|
36
|
-
</li>
|
|
37
|
-
<% end %>
|
|
38
|
-
</ul>
|
|
39
|
-
<% else %>
|
|
40
|
-
<%= render LesliView::Elements::Empty.new(text: empty_text) %>
|
|
41
|
-
<% end %>
|
|
42
|
-
</div>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<figure class="lesli-element-avatar <%= avatar_size %> flex shrink-0 items-center justify-center overflow-hidden rounded-full border-[0.1px] border-slate-400 bg-slate-100">
|
|
2
|
-
<% if image %>
|
|
3
|
-
<img class="h-full w-full object-cover" src="<%= image %>" alt="Avatar image">
|
|
4
|
-
<% else %>
|
|
5
|
-
<span class="font-bold text-slate-700 <%= font_size %>"><%= letter %></span>
|
|
6
|
-
<% end %>
|
|
7
|
-
</figure>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
Lesli
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
6
|
-
|
|
7
|
-
This program is free software: you can redistribute it and/or modify
|
|
8
|
-
it under the terms of the GNU General Public License as published by
|
|
9
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
-
(at your option) any later version.
|
|
11
|
-
|
|
12
|
-
This program is distributed in the hope that it will be useful,
|
|
13
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
-
GNU General Public License for more details.
|
|
16
|
-
|
|
17
|
-
You should have received a copy of the GNU General Public License
|
|
18
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
|
-
|
|
20
|
-
Lesli · Ruby on Rails SaaS Development Framework.
|
|
21
|
-
|
|
22
|
-
Made with ♥ by LesliTech
|
|
23
|
-
Building a better future, one line of code at a time.
|
|
24
|
-
|
|
25
|
-
@contact hello@lesli.tech
|
|
26
|
-
@website https://www.lesli.tech
|
|
27
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
28
|
-
|
|
29
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
-
// ·
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// LesliView forms have migrated to Tailwind.
|
|
35
|
-
// See lib/lesli_view/forms/form.css.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<li
|
|
2
|
-
id="<%= dom_id(resource) %>"
|
|
3
|
-
class="flex flex-col gap-4 rounded-xl border border-slate-200 bg-white p-4 sm:flex-row sm:items-center sm:justify-between">
|
|
4
|
-
<div class="flex min-w-0 items-center gap-3">
|
|
5
|
-
<span
|
|
6
|
-
class="material-symbols-outlined shrink-0 text-3xl text-[var(--lesli-color-primary)]"
|
|
7
|
-
aria-hidden="true">
|
|
8
|
-
attach_file
|
|
9
|
-
</span>
|
|
10
|
-
|
|
11
|
-
<div class="min-w-0">
|
|
12
|
-
<p class="truncate text-sm font-medium text-slate-900" title="<%= filename %>">
|
|
13
|
-
<%= display_name %>
|
|
14
|
-
</p>
|
|
15
|
-
<p class="mt-1 text-xs text-slate-500">
|
|
16
|
-
<%= details %>
|
|
17
|
-
</p>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<div class="flex shrink-0 items-center gap-2">
|
|
22
|
-
<%= link_to(
|
|
23
|
-
I18n.t("lesli.items.attachments_download", default: "Download"),
|
|
24
|
-
path,
|
|
25
|
-
class: "inline-flex items-center gap-2 rounded-lg border border-slate-300 px-3 py-2 text-sm font-medium text-slate-700 transition-colors hover:border-slate-400 hover:bg-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--lesli-color-primary)]",
|
|
26
|
-
data: { turbo: false }
|
|
27
|
-
) %>
|
|
28
|
-
|
|
29
|
-
<%= button_to(
|
|
30
|
-
I18n.t("lesli.items.attachments_remove", default: "Remove"),
|
|
31
|
-
path,
|
|
32
|
-
method: :delete,
|
|
33
|
-
class: "inline-flex items-center rounded-lg px-3 py-2 text-sm font-medium text-red-600 transition-colors hover:bg-red-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500/40",
|
|
34
|
-
form: {
|
|
35
|
-
class: "inline-flex",
|
|
36
|
-
data: {
|
|
37
|
-
turbo_confirm: I18n.t(
|
|
38
|
-
"lesli.items.attachments_confirm_remove",
|
|
39
|
-
default: "Remove this file?"
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
) %>
|
|
44
|
-
</div>
|
|
45
|
-
</li>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<li class="lesli-items-discussions-comments-comment flex flex-col gap-3 border-b border-slate-200 pb-6 last:border-b-0 last:pb-0 sm:flex-row sm:gap-4">
|
|
2
|
-
<div class="shrink-0 text-sm leading-5 text-slate-500 sm:w-40 sm:text-right">
|
|
3
|
-
<strong class="block font-semibold text-slate-800">
|
|
4
|
-
<%= author_name %>
|
|
5
|
-
</strong>
|
|
6
|
-
<time datetime="<%= created_at_iso8601 %>">
|
|
7
|
-
<%= created_at_label %>
|
|
8
|
-
</time>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div class="min-w-0 flex-1 whitespace-pre-wrap break-words text-slate-700"><%= discussion.message %></div>
|
|
12
|
-
</li>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* Component-owned visibility avoids collisions with engine utility bundles,
|
|
2
|
-
which load after LesliView and may redefine .hidden or .block. */
|
|
3
|
-
.lesli-navigation-sidebar-mobile {
|
|
4
|
-
display: block;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.lesli-navigation-sidebar-desktop {
|
|
8
|
-
display: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@media (min-width: 64rem) {
|
|
12
|
-
.lesli-navigation-sidebar-mobile {
|
|
13
|
-
display: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.lesli-navigation-sidebar-desktop {
|
|
17
|
-
display: block;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
selected_icon = items.find { |item| item[:selected] }&.dig(:icon) || "ri-folder-line"
|
|
3
|
-
|
|
4
|
-
navigation_items = capture do
|
|
5
|
-
items.each do |item|
|
|
6
|
-
selected = item[:selected]
|
|
7
|
-
%>
|
|
8
|
-
<li>
|
|
9
|
-
<%= link_to item[:path],
|
|
10
|
-
class: class_names(
|
|
11
|
-
"flex min-h-11 items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-sky-500/20",
|
|
12
|
-
"bg-sky-50 text-sky-700" => selected,
|
|
13
|
-
"text-slate-700 hover:bg-slate-100" => !selected
|
|
14
|
-
),
|
|
15
|
-
aria: { current: ("page" if selected) },
|
|
16
|
-
data: { turbo_frame: "_top" } do %>
|
|
17
|
-
<span class="<%= item[:icon] || 'ri-folder-line' %> text-lg" aria-hidden="true"></span>
|
|
18
|
-
<span class="min-w-0 flex-1 truncate"><%= item[:label] %></span>
|
|
19
|
-
<% if item[:count] %><span class="text-xs text-slate-500"><%= item[:count] %></span><% end %>
|
|
20
|
-
<% end %>
|
|
21
|
-
</li>
|
|
22
|
-
<%
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
%>
|
|
26
|
-
|
|
27
|
-
<details class="lesli-navigation-sidebar-mobile group overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm">
|
|
28
|
-
<summary
|
|
29
|
-
class="flex min-h-11 cursor-pointer list-none items-center justify-between gap-3 px-4 py-2.5 text-sm font-semibold text-slate-700 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-inset focus-visible:ring-sky-500/20 [&::-webkit-details-marker]:hidden"
|
|
30
|
-
aria-label="<%= selected_label %>">
|
|
31
|
-
<span class="flex min-w-0 items-center gap-3">
|
|
32
|
-
<span class="<%= selected_icon %> shrink-0 text-lg text-slate-400" aria-hidden="true"></span>
|
|
33
|
-
<span class="truncate"><%= selected_label %></span>
|
|
34
|
-
</span>
|
|
35
|
-
<span class="material-symbols shrink-0 text-xl text-slate-400 transition-transform group-open:rotate-180" aria-hidden="true">expand_more</span>
|
|
36
|
-
</summary>
|
|
37
|
-
|
|
38
|
-
<nav class="max-h-72 overflow-y-auto border-t border-slate-200 p-2" aria-label="<%= label %>">
|
|
39
|
-
<ul class="space-y-1">
|
|
40
|
-
<%= navigation_items %>
|
|
41
|
-
</ul>
|
|
42
|
-
</nav>
|
|
43
|
-
</details>
|
|
44
|
-
|
|
45
|
-
<nav class="lesli-navigation-sidebar-desktop rounded-xl border border-slate-200 bg-white p-3 shadow-sm lg:sticky lg:top-4 lg:w-60 lg:shrink-0" aria-label="<%= label %>">
|
|
46
|
-
<p class="px-3 pb-2 text-xs font-semibold uppercase tracking-wide text-slate-500">
|
|
47
|
-
<%= label %>
|
|
48
|
-
</p>
|
|
49
|
-
<ul class="space-y-1">
|
|
50
|
-
<%= navigation_items %>
|
|
51
|
-
</ul>
|
|
52
|
-
</nav>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<div class="partial-engine-spec">
|
|
2
|
-
<div class="mb-4 border-b border-slate-300 pb-3">
|
|
3
|
-
<h5 class="text-xl font-semibold text-slate-800"><%= engine[:name] %></h5>
|
|
4
|
-
<p class="mt-1 text-xl leading-7 text-slate-600"><%= engine[:summary] %></p>
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<ul class="m-0 list-none space-y-2 p-0">
|
|
8
|
-
<li class="ml-1.5 flex items-center gap-2 text-[1.1rem] text-slate-600">
|
|
9
|
-
<span class="material-symbols shrink-0 text-2xl leading-none text-slate-400" aria-hidden="true">
|
|
10
|
-
pest_control
|
|
11
|
-
</span>
|
|
12
|
-
<span>Version: <%= engine[:version] %></span>
|
|
13
|
-
</li>
|
|
14
|
-
|
|
15
|
-
<li class="ml-1.5 flex items-center gap-2 text-[1.1rem] text-slate-600">
|
|
16
|
-
<span class="material-symbols shrink-0 text-2xl leading-none text-slate-400" aria-hidden="true">
|
|
17
|
-
schedule
|
|
18
|
-
</span>
|
|
19
|
-
<span>Build: <%= LesliDate::Formatter.new(Time.at(engine[:build].to_i)).date_time %></span>
|
|
20
|
-
</li>
|
|
21
|
-
|
|
22
|
-
<li class="ml-1.5 flex min-w-0 items-center gap-2 text-[1.1rem] text-slate-600">
|
|
23
|
-
<span class="material-symbols shrink-0 text-2xl leading-none text-slate-400" aria-hidden="true">
|
|
24
|
-
library_books
|
|
25
|
-
</span>
|
|
26
|
-
<span class="min-w-0 break-all">
|
|
27
|
-
<%= link_to_if(
|
|
28
|
-
engine.dig(:metadata, "documentation_uri"),
|
|
29
|
-
engine.dig(:metadata, "documentation_uri"),
|
|
30
|
-
engine.dig(:metadata, "documentation_uri"),
|
|
31
|
-
target: "_blank",
|
|
32
|
-
rel: "noopener noreferrer",
|
|
33
|
-
class: "font-sans text-[var(--lesli-color-primary)] underline-offset-4 hover:underline focus-visible:rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--lesli-color-primary)]"
|
|
34
|
-
) %>
|
|
35
|
-
</span>
|
|
36
|
-
</li>
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|