lesli_view 1.1.2 → 1.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/lib/lesli_view/charts/bar.rb +10 -0
- data/lib/lesli_view/charts/general.html.erb +38 -52
- data/lib/lesli_view/charts/general.rb +69 -30
- data/lib/lesli_view/charts/line.rb +16 -0
- data/lib/lesli_view/components/header.html.erb +48 -23
- data/lib/lesli_view/components/header.rb +35 -2
- data/lib/lesli_view/components/toolbar.css +52 -0
- data/lib/lesli_view/components/toolbar.html.erb +36 -21
- data/lib/lesli_view/components/toolbar.rb +41 -4
- data/lib/lesli_view/elements/button.css +357 -0
- data/lib/lesli_view/elements/button.html.erb +15 -12
- data/lib/lesli_view/elements/button.rb +74 -34
- data/lib/lesli_view/elements/empty.html.erb +31 -6
- data/lib/lesli_view/elements/empty.rb +8 -1
- data/lib/lesli_view/elements/table-chart.html.erb +42 -0
- data/lib/lesli_view/elements/table.css +91 -0
- data/lib/lesli_view/elements/table.html.erb +24 -21
- data/lib/lesli_view/elements/table.rb +67 -17
- data/lib/lesli_view/forms/builder.rb +16 -3
- data/lib/lesli_view/forms/builder_horizontal.rb +34 -10
- data/lib/lesli_view/forms/fields.rb +103 -70
- data/lib/lesli_view/forms/fieldset.rb +3 -3
- data/lib/lesli_view/forms/form.css +171 -0
- data/lib/lesli_view/forms/form.scss +2 -54
- data/lib/lesli_view/forms/inputs.rb +27 -15
- data/lib/lesli_view/layout/container.html.erb +8 -2
- data/lib/lesli_view/version.rb +2 -2
- data/lib/lesli_view/widgets/calendar.html.erb +42 -133
- data/lib/lesli_view/widgets/calendar.rb +77 -3
- data/lib/lesli_view/widgets/chart.html.erb +25 -26
- data/lib/lesli_view/widgets/chart.rb +46 -3
- data/lib/lesli_view/widgets/count.html.erb +17 -15
- data/lib/lesli_view/widgets/count.rb +13 -1
- data/lib/lesli_view/widgets/date.html.erb +23 -21
- data/lib/lesli_view/widgets/date.rb +27 -2
- data/lib/lesli_view/widgets/weather.html.erb +40 -38
- data/lib/lesli_view/widgets/weather.rb +41 -2
- data/readme.md +158 -29
- metadata +6 -4
- data/lib/lesli_view/components/header.scss +0 -69
- data/lib/lesli_view/components/toolbar.scss +0 -54
- data/lib/lesli_view/elements/table.scss +0 -153
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
=begin
|
|
2
4
|
|
|
3
5
|
Lesli
|
|
@@ -33,12 +35,53 @@ Building a better future, one line of code at a time.
|
|
|
33
35
|
module LesliView
|
|
34
36
|
module Widgets
|
|
35
37
|
class Chart < ViewComponent::Base
|
|
38
|
+
CHART_COMPONENTS = {
|
|
39
|
+
bar: LesliView::Charts::Bar,
|
|
40
|
+
line: LesliView::Charts::Line
|
|
41
|
+
}.freeze
|
|
42
|
+
|
|
36
43
|
attr_reader :title, :data, :type
|
|
37
44
|
|
|
38
|
-
def initialize(title=nil, data=nil, type: :bar)
|
|
45
|
+
def initialize(title = nil, data = nil, type: :bar)
|
|
39
46
|
@title = title
|
|
40
|
-
@data = data
|
|
41
|
-
@type = type
|
|
47
|
+
@data = normalize_data(data)
|
|
48
|
+
@type = normalize_type(type)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def chart_component
|
|
52
|
+
CHART_COMPONENTS.fetch(type)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def labels
|
|
56
|
+
data.map(&:first)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def dataset
|
|
60
|
+
data.map(&:last)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def data?
|
|
64
|
+
data.any?
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def title_id
|
|
68
|
+
@title_id ||= "lesli-chart-widget-title-#{object_id}"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
private
|
|
72
|
+
|
|
73
|
+
def normalize_data(value)
|
|
74
|
+
return [] if value.nil?
|
|
75
|
+
return value.to_a if value.respond_to?(:to_a)
|
|
76
|
+
|
|
77
|
+
[]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def normalize_type(value)
|
|
81
|
+
value = value.to_s.downcase.to_sym
|
|
82
|
+
return value if CHART_COMPONENTS.key?(value)
|
|
83
|
+
|
|
84
|
+
:bar
|
|
42
85
|
end
|
|
43
86
|
end
|
|
44
87
|
end
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
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>
|
|
15
17
|
</div>
|
|
16
|
-
</
|
|
18
|
+
</section>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
=begin
|
|
2
4
|
|
|
3
5
|
Lesli
|
|
@@ -35,10 +37,20 @@ module LesliView
|
|
|
35
37
|
class Count < ViewComponent::Base
|
|
36
38
|
attr_reader :title, :number
|
|
37
39
|
|
|
38
|
-
def initialize(title=nil, number=nil)
|
|
40
|
+
def initialize(title = nil, number = nil)
|
|
39
41
|
@title = title
|
|
40
42
|
@number = number
|
|
41
43
|
end
|
|
44
|
+
|
|
45
|
+
def display_number
|
|
46
|
+
return "—" if number.nil?
|
|
47
|
+
|
|
48
|
+
number
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def title_id
|
|
52
|
+
@title_id ||= "lesli-count-title-#{object_id}"
|
|
53
|
+
end
|
|
42
54
|
end
|
|
43
55
|
end
|
|
44
56
|
end
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
font-size: 4.2rem;
|
|
5
|
-
}
|
|
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 %>">
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
=begin
|
|
2
4
|
|
|
3
5
|
Lesli
|
|
@@ -35,8 +37,31 @@ module LesliView
|
|
|
35
37
|
class Date < ViewComponent::Base
|
|
36
38
|
attr_reader :date
|
|
37
39
|
|
|
38
|
-
def initialize(date = Time.
|
|
39
|
-
@date = date
|
|
40
|
+
def initialize(date = Time.current)
|
|
41
|
+
@date = normalize_date(date) || ::Date.current
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def month_name
|
|
45
|
+
I18n.l(date, format: "%B")
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def weekday_name
|
|
49
|
+
I18n.l(date, format: "%A")
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def accessible_date
|
|
53
|
+
I18n.l(date, format: :long)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
private
|
|
57
|
+
|
|
58
|
+
def normalize_date(value)
|
|
59
|
+
return if value.nil?
|
|
60
|
+
return value.to_date if value.respond_to?(:to_date)
|
|
61
|
+
|
|
62
|
+
::Date.parse(value.to_s)
|
|
63
|
+
rescue ArgumentError, TypeError
|
|
64
|
+
nil
|
|
40
65
|
end
|
|
41
66
|
end
|
|
42
67
|
end
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
<
|
|
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 %>">
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
%>
|
|
7
18
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
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>
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
width: 50px;
|
|
16
|
-
height: 50px;
|
|
17
|
-
float: right;
|
|
18
|
-
font-size: 1.8rem;
|
|
19
|
-
margin: 20px 20px 0 0;
|
|
20
|
-
border-radius: 50%;
|
|
21
|
-
}
|
|
24
|
+
<div class="mx-5 h-20 w-px shrink-0 bg-slate-200 sm:mx-6" aria-hidden="true"></div>
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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>
|
|
28
35
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<span class="icon cloud">
|
|
39
|
-
<span class="ri-showers-line"></span>
|
|
40
|
-
</span>
|
|
41
|
-
<p class="temperature">26º</p>
|
|
42
|
-
<p class="city">Guatemala</p>
|
|
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>
|
|
43
45
|
</div>
|
|
44
|
-
</
|
|
46
|
+
</section>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
=begin
|
|
2
4
|
|
|
3
5
|
Lesli
|
|
@@ -33,10 +35,47 @@ Building a better future, one line of code at a time.
|
|
|
33
35
|
module LesliView
|
|
34
36
|
module Widgets
|
|
35
37
|
class Weather < ViewComponent::Base
|
|
36
|
-
attr_reader :date
|
|
38
|
+
attr_reader :date, :temperature, :location, :condition, :unit, :icon
|
|
37
39
|
|
|
38
|
-
def initialize(
|
|
40
|
+
def initialize(
|
|
41
|
+
date = Time.current,
|
|
42
|
+
temperature: 26,
|
|
43
|
+
location: "Guatemala",
|
|
44
|
+
condition: nil,
|
|
45
|
+
unit: "C",
|
|
46
|
+
icon: "rainy"
|
|
47
|
+
)
|
|
39
48
|
@date = date
|
|
49
|
+
@temperature = temperature
|
|
50
|
+
@location = location
|
|
51
|
+
@condition = condition
|
|
52
|
+
@unit = normalize_unit(unit)
|
|
53
|
+
@icon = icon.presence || "rainy"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def display_temperature
|
|
57
|
+
"#{temperature.presence || "—"}°"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def condition_text
|
|
61
|
+
condition.presence || I18n.t("weather.conditions.showers", default: "Showers")
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def accessible_label
|
|
65
|
+
[
|
|
66
|
+
location.presence,
|
|
67
|
+
"#{display_temperature}#{unit}",
|
|
68
|
+
condition_text
|
|
69
|
+
].compact.join(", ")
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
private
|
|
73
|
+
|
|
74
|
+
def normalize_unit(value)
|
|
75
|
+
value = value.to_s.upcase
|
|
76
|
+
return value if %w[C F].include?(value)
|
|
77
|
+
|
|
78
|
+
"C"
|
|
40
79
|
end
|
|
41
80
|
end
|
|
42
81
|
end
|
data/readme.md
CHANGED
|
@@ -1,42 +1,174 @@
|
|
|
1
|
-
<div align="center"
|
|
2
|
-
<
|
|
3
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1 align="center">
|
|
3
|
+
<img width="100" alt="LesliView" src="./docs/images/view-logo.svg" />
|
|
4
|
+
</h1>
|
|
5
|
+
<h3 align="center">Reusable Rails components and form builders for the Lesli Framework.</h3>
|
|
4
6
|
</div>
|
|
5
7
|
|
|
6
8
|
<br />
|
|
7
|
-
<hr/>
|
|
8
9
|
|
|
9
|
-
<div align="center"
|
|
10
|
-
<a target="
|
|
10
|
+
<div align="center">
|
|
11
|
+
<a target="_blank" href="https://github.com/LesliTech/LesliView/actions/workflows/main.yml">
|
|
12
|
+
<img
|
|
13
|
+
alt="LesliView test status"
|
|
14
|
+
src="https://img.shields.io/github/actions/workflow/status/LesliTech/LesliView/main.yml?branch=main&style=for-the-badge&logo=github&label=tests">
|
|
15
|
+
</a>
|
|
16
|
+
<a target="_blank" href="https://rubygems.org/gems/lesli_view">
|
|
11
17
|
<img alt="Gem Version" src="https://img.shields.io/gem/v/lesli_view?style=for-the-badge&logo=ruby">
|
|
12
18
|
</a>
|
|
19
|
+
<a target="_blank" href="https://codecov.io/github/LesliTech/LesliView">
|
|
20
|
+
<img alt="Codecov" src="https://img.shields.io/codecov/c/github/LesliTech/LesliView?style=for-the-badge&logo=codecov">
|
|
21
|
+
</a>
|
|
22
|
+
<a target="_blank" href="https://sonarcloud.io/project/overview?id=LesliTech_LesliView">
|
|
23
|
+
<img alt="Sonar Quality Gate" src="https://img.shields.io/sonar/quality_gate/LesliTech_LesliView?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonarqubecloud&label=Quality">
|
|
24
|
+
</a>
|
|
13
25
|
</div>
|
|
14
26
|
|
|
15
|
-
<hr/>
|
|
16
27
|
<br />
|
|
17
28
|
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
<br />
|
|
32
|
+
|
|
33
|
+
## Introduction
|
|
34
|
+
|
|
35
|
+
LesliView is the official user-interface library for the [Lesli Framework](https://github.com/LesliTech/Lesli).
|
|
36
|
+
|
|
37
|
+
It combines ViewComponent-powered building blocks, Rails form builders, and shared interface patterns to help Lesli applications remain consistent, reusable, and maintainable.
|
|
38
|
+
|
|
39
|
+
<br />
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- Reusable Rails ViewComponents
|
|
44
|
+
- Form builders with consistent fields, inputs, and fieldsets
|
|
45
|
+
- Application layout and navigation components
|
|
46
|
+
- Buttons, tables, avatars, and empty states
|
|
47
|
+
- Charts, calendars, counters, dates, and weather widgets
|
|
48
|
+
- Tasks, discussions, activities, and attachment interfaces
|
|
49
|
+
- Shared Tailwind-based presentation for Lesli applications
|
|
50
|
+
|
|
51
|
+
<br />
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
18
54
|
|
|
19
|
-
|
|
55
|
+
Add LesliView to the Rails application:
|
|
20
56
|
|
|
21
57
|
```shell
|
|
22
|
-
# Add LesliAdmin engine gem
|
|
23
58
|
bundle add lesli_view
|
|
24
59
|
```
|
|
25
60
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
61
|
+
Bundler installs ViewComponent and the other required runtime dependencies automatically.
|
|
62
|
+
|
|
63
|
+
<br />
|
|
64
|
+
|
|
65
|
+
## Usage
|
|
66
|
+
|
|
67
|
+
### Render a component
|
|
68
|
+
|
|
69
|
+
Render LesliView components from any Rails template:
|
|
70
|
+
|
|
71
|
+
```erb
|
|
72
|
+
<%= render(LesliView::Layout::Container.new("tickets")) do %>
|
|
73
|
+
<%= render(LesliView::Components::Header.new("Tickets")) %>
|
|
74
|
+
<% end %>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Render an element
|
|
78
|
+
|
|
79
|
+
Elements provide smaller interface building blocks:
|
|
80
|
+
|
|
81
|
+
```erb
|
|
82
|
+
<%= render(
|
|
83
|
+
LesliView::Elements::Button.new(
|
|
84
|
+
"Create ticket",
|
|
85
|
+
icon: "add",
|
|
86
|
+
solid: true,
|
|
87
|
+
url: new_ticket_path
|
|
88
|
+
)
|
|
89
|
+
) %>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Use the form builder
|
|
93
|
+
|
|
94
|
+
Pass the LesliView builder to Rails form helpers:
|
|
95
|
+
|
|
96
|
+
```erb
|
|
97
|
+
<%= form_with(
|
|
98
|
+
model: @ticket,
|
|
99
|
+
builder: LesliView::Forms::Builder
|
|
100
|
+
) do |form| %>
|
|
101
|
+
<%= form.field_control_text :subject %>
|
|
102
|
+
<%= form.field_control_textarea :description %>
|
|
103
|
+
<%= form.field_control_submit "Save ticket" %>
|
|
104
|
+
<% end %>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
<br />
|
|
108
|
+
|
|
109
|
+
## Library
|
|
110
|
+
|
|
111
|
+
LesliView organizes its interface building blocks into focused groups:
|
|
112
|
+
|
|
113
|
+
- **Charts:** bar, line, and general chart rendering
|
|
114
|
+
- **Components:** headers, panels, tabs, timelines, and toolbars
|
|
115
|
+
- **Elements:** avatars, buttons, empty states, and tables
|
|
116
|
+
- **Forms:** standard and horizontal builders, fields, inputs, and fieldsets
|
|
117
|
+
- **Items:** actions, activities, attachments, discussions, and tasks
|
|
118
|
+
- **Layouts:** shared application containers
|
|
119
|
+
- **Partials:** reusable engine information
|
|
120
|
+
- **Widgets:** calendars, charts, counters, dates, and weather
|
|
121
|
+
|
|
122
|
+
Detailed examples and available options are maintained in the [LesliView documentation](https://www.lesli.dev/gems/view/).
|
|
123
|
+
|
|
124
|
+
<br />
|
|
125
|
+
|
|
126
|
+
## Development
|
|
127
|
+
|
|
128
|
+
Clone the repository and install its dependencies:
|
|
129
|
+
|
|
130
|
+
```shell
|
|
131
|
+
git clone https://github.com/LesliTech/LesliView.git
|
|
132
|
+
cd LesliView
|
|
133
|
+
bundle install
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
To develop LesliView inside a Rails workspace, reference the local source from the host application's `Gemfile`:
|
|
137
|
+
|
|
138
|
+
```ruby
|
|
139
|
+
gem "lesli_view", path: "gems/LesliView"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Tests
|
|
143
|
+
|
|
144
|
+
Run the default test task from the LesliView directory:
|
|
145
|
+
|
|
146
|
+
```shell
|
|
147
|
+
bundle exec rake
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
<br />
|
|
151
|
+
|
|
152
|
+
## Documentation
|
|
153
|
+
|
|
154
|
+
- [Lesli website](https://www.lesli.dev/)
|
|
155
|
+
- [Documentation](https://www.lesli.dev/gems/view/)
|
|
156
|
+
- [Release notes](https://github.com/LesliTech/LesliView/releases)
|
|
157
|
+
- [Issue tracker](https://github.com/LesliTech/LesliView/issues)
|
|
158
|
+
- [Source code](https://github.com/LesliTech/LesliView)
|
|
159
|
+
|
|
160
|
+
<br />
|
|
29
161
|
|
|
162
|
+
## Community
|
|
30
163
|
|
|
31
|
-
|
|
164
|
+
- [X: @LesliTech](https://x.com/LesliTech)
|
|
165
|
+
- [hello@lesli.tech](mailto:hello@lesli.tech)
|
|
166
|
+
- [https://www.lesli.tech](https://www.lesli.tech)
|
|
32
167
|
|
|
33
|
-
|
|
34
|
-
* [Email: hello@lesli.tech](hello@lesli.tech)
|
|
35
|
-
* [Website: https://www.lesli.tech](https://www.lesli.tech)
|
|
168
|
+
<br />
|
|
36
169
|
|
|
170
|
+
## License
|
|
37
171
|
|
|
38
|
-
### License
|
|
39
|
-
-------
|
|
40
172
|
Copyright (c) 2026, Lesli Technologies, S. A.
|
|
41
173
|
|
|
42
174
|
This program is free software: you can redistribute it and/or modify
|
|
@@ -50,19 +182,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
50
182
|
GNU General Public License for more details.
|
|
51
183
|
|
|
52
184
|
You should have received a copy of the GNU General Public License
|
|
53
|
-
along with this program. If not, see
|
|
185
|
+
along with this program. If not, see [https://www.gnu.org/licenses/](https://www.gnu.org/licenses/).
|
|
54
186
|
|
|
55
|
-
|
|
56
|
-
<hr />
|
|
57
|
-
<br />
|
|
58
|
-
<br />
|
|
187
|
+
The complete license text is available in the [license file](./license).
|
|
59
188
|
|
|
60
|
-
|
|
61
|
-
<img width="200" alt="Lesli logo" src="https://cdn.lesli.tech/lesli/brand/app-logo.svg" />
|
|
62
|
-
<h3 align="center" class="mt-0">
|
|
63
|
-
The Open-Source SaaS Development Framework for Ruby on Rails.
|
|
64
|
-
</h3>
|
|
65
|
-
</div>
|
|
189
|
+
---
|
|
66
190
|
|
|
67
191
|
<br />
|
|
68
192
|
<br />
|
|
193
|
+
|
|
194
|
+
<div align="center">
|
|
195
|
+
<img width="80" alt="Lesli icon" src="https://cdn.lesli.tech/lesli/brand/app-icon.svg" />
|
|
196
|
+
<h3 align="center">The Open-Source SaaS Development Framework for Ruby on Rails.</h3>
|
|
197
|
+
</div>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Lesli Development Team
|
|
@@ -54,7 +54,6 @@ files:
|
|
|
54
54
|
- lib/lesli_view/charts/line.rb
|
|
55
55
|
- lib/lesli_view/components/header.html.erb
|
|
56
56
|
- lib/lesli_view/components/header.rb
|
|
57
|
-
- lib/lesli_view/components/header.scss
|
|
58
57
|
- lib/lesli_view/components/panel.html.erb
|
|
59
58
|
- lib/lesli_view/components/panel.rb
|
|
60
59
|
- lib/lesli_view/components/panel.scss
|
|
@@ -65,24 +64,27 @@ files:
|
|
|
65
64
|
- lib/lesli_view/components/timeline.html.erb
|
|
66
65
|
- lib/lesli_view/components/timeline.rb
|
|
67
66
|
- lib/lesli_view/components/timeline.scss
|
|
67
|
+
- lib/lesli_view/components/toolbar.css
|
|
68
68
|
- lib/lesli_view/components/toolbar.html.erb
|
|
69
69
|
- lib/lesli_view/components/toolbar.rb
|
|
70
|
-
- lib/lesli_view/components/toolbar.scss
|
|
71
70
|
- lib/lesli_view/elements/avatar.html.erb
|
|
72
71
|
- lib/lesli_view/elements/avatar.rb
|
|
73
72
|
- lib/lesli_view/elements/avatar.scss
|
|
73
|
+
- lib/lesli_view/elements/button.css
|
|
74
74
|
- lib/lesli_view/elements/button.html.erb
|
|
75
75
|
- lib/lesli_view/elements/button.rb
|
|
76
76
|
- lib/lesli_view/elements/empty.html.erb
|
|
77
77
|
- lib/lesli_view/elements/empty.rb
|
|
78
|
+
- lib/lesli_view/elements/table-chart.html.erb
|
|
79
|
+
- lib/lesli_view/elements/table.css
|
|
78
80
|
- lib/lesli_view/elements/table.html.erb
|
|
79
81
|
- lib/lesli_view/elements/table.rb
|
|
80
|
-
- lib/lesli_view/elements/table.scss
|
|
81
82
|
- lib/lesli_view/engine.rb
|
|
82
83
|
- lib/lesli_view/forms/builder.rb
|
|
83
84
|
- lib/lesli_view/forms/builder_horizontal.rb
|
|
84
85
|
- lib/lesli_view/forms/fields.rb
|
|
85
86
|
- lib/lesli_view/forms/fieldset.rb
|
|
87
|
+
- lib/lesli_view/forms/form.css
|
|
86
88
|
- lib/lesli_view/forms/form.scss
|
|
87
89
|
- lib/lesli_view/forms/inputs.rb
|
|
88
90
|
- lib/lesli_view/items/actions.html.erb
|