lesli_view 1.1.2 → 1.1.4
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/tabs.html.erb +59 -26
- data/lib/lesli_view/components/tabs.rb +7 -7
- data/lib/lesli_view/components/timeline.html.erb +28 -25
- 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/avatar.html.erb +3 -3
- data/lib/lesli_view/elements/avatar.rb +8 -8
- 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/items/activities.html.erb +4 -6
- data/lib/lesli_view/items/discussion.html.erb +6 -5
- data/lib/lesli_view/items/discussions.html.erb +8 -6
- data/lib/lesli_view/items/task.html.erb +16 -11
- data/lib/lesli_view/items/tasks.html.erb +8 -13
- data/lib/lesli_view/layout/container.html.erb +8 -2
- data/lib/lesli_view/partials/engine_spec.html.erb +28 -41
- 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 +185 -29
- metadata +6 -10
- data/lib/lesli_view/components/header.scss +0 -69
- data/lib/lesli_view/components/tabs.scss +0 -49
- data/lib/lesli_view/components/tabs_spec.rb +0 -0
- data/lib/lesli_view/components/timeline.scss +0 -216
- data/lib/lesli_view/components/toolbar.scss +0 -54
- data/lib/lesli_view/elements/avatar.scss +0 -50
- data/lib/lesli_view/elements/table.scss +0 -153
- data/lib/lesli_view/items/activities.scss +0 -39
- data/lib/lesli_view/items/discussions.scss +0 -47
|
@@ -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,201 @@
|
|
|
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
|
+
## Introduction
|
|
30
|
+
|
|
31
|
+
LesliView is the official user-interface library for the [Lesli Framework](https://github.com/LesliTech/Lesli). It packages the framework's shared interface patterns as ViewComponent-powered components, Rails form builders, and domain-oriented views.
|
|
32
|
+
|
|
33
|
+
Use LesliView to build consistent server-rendered interfaces without recreating common layouts, controls, forms, and application states in every Lesli engine.
|
|
34
|
+
|
|
35
|
+
<br />
|
|
36
|
+
|
|
37
|
+
## Why LesliView?
|
|
38
|
+
|
|
39
|
+
LesliView provides:
|
|
40
|
+
|
|
41
|
+
- A shared visual language across Lesli applications and engines
|
|
42
|
+
- Composable, testable components built with ViewComponent
|
|
43
|
+
- Rails-native form builders with consistent labels, controls, messages, and actions
|
|
44
|
+
- Reusable views for common product concepts such as activities, attachments, discussions, and tasks
|
|
45
|
+
- Responsive presentation based on Tailwind CSS utility classes
|
|
46
|
+
- Accessible defaults for labels, button states, navigation, and page actions
|
|
47
|
+
|
|
48
|
+
<br />
|
|
49
|
+
|
|
50
|
+
## Quick Start
|
|
51
|
+
|
|
52
|
+
### Requirements
|
|
53
|
+
|
|
54
|
+
The current development baseline is:
|
|
55
|
+
|
|
56
|
+
- Ruby 3.2 or newer
|
|
57
|
+
- Rails 8.1
|
|
58
|
+
- LesliAssets, configured in the host application's asset build
|
|
59
|
+
|
|
60
|
+
ViewComponent and Lexxy are installed as runtime dependencies of LesliView.
|
|
61
|
+
|
|
62
|
+
### Install with Lesli
|
|
63
|
+
|
|
64
|
+
LesliView and LesliAssets are installed automatically with the main `lesli` gem. No additional gem or asset configuration is required in a standard Lesli application.
|
|
18
65
|
|
|
19
|
-
###
|
|
66
|
+
### Install in another Rails application
|
|
67
|
+
|
|
68
|
+
Add LesliView to the application:
|
|
20
69
|
|
|
21
70
|
```shell
|
|
22
|
-
# Add LesliAdmin engine gem
|
|
23
71
|
bundle add lesli_view
|
|
24
72
|
```
|
|
25
73
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
74
|
+
For the complete Lesli presentation layer, also install the shared assets package:
|
|
75
|
+
|
|
76
|
+
```shell
|
|
77
|
+
bundle add lesli_assets
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The host application must configure LesliAssets in its asset build so the Lesli styles and icon fonts are available before rendering the components.
|
|
81
|
+
|
|
82
|
+
<br />
|
|
83
|
+
|
|
84
|
+
## Usage
|
|
85
|
+
|
|
86
|
+
### Build a page header
|
|
87
|
+
|
|
88
|
+
Compose a layout and header directly from an ERB template:
|
|
89
|
+
|
|
90
|
+
```erb
|
|
91
|
+
<%= render LesliView::Layout::Container.new("tickets") do %>
|
|
92
|
+
<%= render LesliView::Components::Header.new(
|
|
93
|
+
"Tickets",
|
|
94
|
+
"Manage customer requests and follow-up work.",
|
|
95
|
+
new_path: new_ticket_path,
|
|
96
|
+
new_label: "Create ticket"
|
|
97
|
+
) %>
|
|
98
|
+
<% end %>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Render an action
|
|
102
|
+
|
|
103
|
+
Elements provide focused interface primitives with consistent behavior and styling:
|
|
104
|
+
|
|
105
|
+
```erb
|
|
106
|
+
<%= render LesliView::Elements::Button.new(
|
|
107
|
+
"Create ticket",
|
|
108
|
+
icon: "add",
|
|
109
|
+
url: new_ticket_path
|
|
110
|
+
) %>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Build a form
|
|
114
|
+
|
|
115
|
+
Pass the LesliView builder to the standard Rails form helpers:
|
|
116
|
+
|
|
117
|
+
```erb
|
|
118
|
+
<%= form_with(model: @ticket, builder: LesliView::Forms::Builder) do |form| %>
|
|
119
|
+
<%= form.field_control_text :subject %>
|
|
120
|
+
<%= form.field_control_textarea :description %>
|
|
121
|
+
<%= form.field_control_submit "Save ticket" %>
|
|
122
|
+
<% end %>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
<br />
|
|
126
|
+
|
|
127
|
+
## Library
|
|
29
128
|
|
|
129
|
+
LesliView organizes its public interface into focused groups:
|
|
130
|
+
|
|
131
|
+
| Group | Included building blocks |
|
|
132
|
+
| --- | --- |
|
|
133
|
+
| Charts | Bar, line, and general chart rendering |
|
|
134
|
+
| Components | Headers, panels, tabs, timelines, and toolbars |
|
|
135
|
+
| Elements | Avatars, buttons, empty states, and tables |
|
|
136
|
+
| Forms | Standard and horizontal builders, fields, inputs, and fieldsets |
|
|
137
|
+
| Items | Actions, activities, attachments, discussions, and tasks |
|
|
138
|
+
| Layouts | Shared application containers |
|
|
139
|
+
| Partials | Reusable engine information |
|
|
140
|
+
| Widgets | Calendars, charts, counters, dates, and weather |
|
|
141
|
+
|
|
142
|
+
See the [LesliView documentation](https://www.lesli.dev/gems/view/) for component options and additional examples.
|
|
143
|
+
|
|
144
|
+
- [Installation](https://www.lesli.dev/gems/view/about/installation)
|
|
145
|
+
- [Components](https://www.lesli.dev/gems/view/components)
|
|
146
|
+
- [Elements](https://www.lesli.dev/gems/view/elements)
|
|
147
|
+
- [Forms](https://www.lesli.dev/gems/view/forms)
|
|
148
|
+
- [Charts](https://www.lesli.dev/gems/view/charts)
|
|
149
|
+
- [Widgets](https://www.lesli.dev/gems/view/widgets)
|
|
150
|
+
|
|
151
|
+
<br />
|
|
30
152
|
|
|
31
|
-
|
|
153
|
+
## Development
|
|
32
154
|
|
|
33
|
-
|
|
34
|
-
* [Email: hello@lesli.tech](hello@lesli.tech)
|
|
35
|
-
* [Website: https://www.lesli.tech](https://www.lesli.tech)
|
|
155
|
+
Clone the repository and install its dependencies:
|
|
36
156
|
|
|
157
|
+
```shell
|
|
158
|
+
git clone https://github.com/LesliTech/LesliView.git
|
|
159
|
+
cd LesliView
|
|
160
|
+
bundle install
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Run the default test suite:
|
|
164
|
+
|
|
165
|
+
```shell
|
|
166
|
+
bundle exec rake
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
To develop LesliView inside a local Lesli workspace, reference the repository from the host application's `Gemfile`:
|
|
170
|
+
|
|
171
|
+
```ruby
|
|
172
|
+
gem "lesli_view", path: "gems/LesliView"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Then run `bundle install` from the host application so changes to the local gem are loaded immediately.
|
|
176
|
+
|
|
177
|
+
<br />
|
|
178
|
+
|
|
179
|
+
## Documentation
|
|
180
|
+
|
|
181
|
+
- [Lesli website](https://www.lesli.dev/)
|
|
182
|
+
- [LesliView documentation](https://www.lesli.dev/gems/view/)
|
|
183
|
+
- [Releases and changelog](https://github.com/LesliTech/LesliView/releases)
|
|
184
|
+
- [Issue tracker](https://github.com/LesliTech/LesliView/issues)
|
|
185
|
+
- [Source code](https://github.com/LesliTech/LesliView)
|
|
186
|
+
|
|
187
|
+
<br />
|
|
188
|
+
|
|
189
|
+
## Community
|
|
190
|
+
|
|
191
|
+
- [X: @LesliTech](https://x.com/LesliTech)
|
|
192
|
+
- [hello@lesli.tech](mailto:hello@lesli.tech)
|
|
193
|
+
- [https://www.lesli.tech](https://www.lesli.tech)
|
|
194
|
+
|
|
195
|
+
<br />
|
|
196
|
+
|
|
197
|
+
## License
|
|
37
198
|
|
|
38
|
-
### License
|
|
39
|
-
-------
|
|
40
199
|
Copyright (c) 2026, Lesli Technologies, S. A.
|
|
41
200
|
|
|
42
201
|
This program is free software: you can redistribute it and/or modify
|
|
@@ -50,19 +209,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
50
209
|
GNU General Public License for more details.
|
|
51
210
|
|
|
52
211
|
You should have received a copy of the GNU General Public License
|
|
53
|
-
along with this program. If not, see
|
|
212
|
+
along with this program. If not, see [https://www.gnu.org/licenses/](https://www.gnu.org/licenses/).
|
|
54
213
|
|
|
55
|
-
|
|
56
|
-
<hr />
|
|
57
|
-
<br />
|
|
58
|
-
<br />
|
|
214
|
+
The complete license text is available in the [license file](./license).
|
|
59
215
|
|
|
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>
|
|
216
|
+
---
|
|
66
217
|
|
|
67
218
|
<br />
|
|
68
219
|
<br />
|
|
220
|
+
|
|
221
|
+
<div align="center">
|
|
222
|
+
<img width="80" alt="Lesli icon" src="https://cdn.lesli.tech/lesli/brand/app-icon.svg" />
|
|
223
|
+
<h3 align="center">The Open-Source SaaS Development Framework for Ruby on Rails.</h3>
|
|
224
|
+
</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.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Lesli Development Team
|
|
@@ -54,49 +54,45 @@ 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
|
|
61
60
|
- lib/lesli_view/components/tabs.html.erb
|
|
62
61
|
- lib/lesli_view/components/tabs.rb
|
|
63
|
-
- lib/lesli_view/components/tabs.scss
|
|
64
|
-
- lib/lesli_view/components/tabs_spec.rb
|
|
65
62
|
- lib/lesli_view/components/timeline.html.erb
|
|
66
63
|
- lib/lesli_view/components/timeline.rb
|
|
67
|
-
- lib/lesli_view/components/
|
|
64
|
+
- lib/lesli_view/components/toolbar.css
|
|
68
65
|
- lib/lesli_view/components/toolbar.html.erb
|
|
69
66
|
- lib/lesli_view/components/toolbar.rb
|
|
70
|
-
- lib/lesli_view/components/toolbar.scss
|
|
71
67
|
- lib/lesli_view/elements/avatar.html.erb
|
|
72
68
|
- lib/lesli_view/elements/avatar.rb
|
|
73
|
-
- lib/lesli_view/elements/
|
|
69
|
+
- lib/lesli_view/elements/button.css
|
|
74
70
|
- lib/lesli_view/elements/button.html.erb
|
|
75
71
|
- lib/lesli_view/elements/button.rb
|
|
76
72
|
- lib/lesli_view/elements/empty.html.erb
|
|
77
73
|
- lib/lesli_view/elements/empty.rb
|
|
74
|
+
- lib/lesli_view/elements/table-chart.html.erb
|
|
75
|
+
- lib/lesli_view/elements/table.css
|
|
78
76
|
- lib/lesli_view/elements/table.html.erb
|
|
79
77
|
- lib/lesli_view/elements/table.rb
|
|
80
|
-
- lib/lesli_view/elements/table.scss
|
|
81
78
|
- lib/lesli_view/engine.rb
|
|
82
79
|
- lib/lesli_view/forms/builder.rb
|
|
83
80
|
- lib/lesli_view/forms/builder_horizontal.rb
|
|
84
81
|
- lib/lesli_view/forms/fields.rb
|
|
85
82
|
- lib/lesli_view/forms/fieldset.rb
|
|
83
|
+
- lib/lesli_view/forms/form.css
|
|
86
84
|
- lib/lesli_view/forms/form.scss
|
|
87
85
|
- lib/lesli_view/forms/inputs.rb
|
|
88
86
|
- lib/lesli_view/items/actions.html.erb
|
|
89
87
|
- lib/lesli_view/items/actions.rb
|
|
90
88
|
- lib/lesli_view/items/activities.html.erb
|
|
91
89
|
- lib/lesli_view/items/activities.rb
|
|
92
|
-
- lib/lesli_view/items/activities.scss
|
|
93
90
|
- lib/lesli_view/items/attachments.html.erb
|
|
94
91
|
- lib/lesli_view/items/attachments.rb
|
|
95
92
|
- lib/lesli_view/items/discussion.html.erb
|
|
96
93
|
- lib/lesli_view/items/discussion.rb
|
|
97
94
|
- lib/lesli_view/items/discussions.html.erb
|
|
98
95
|
- lib/lesli_view/items/discussions.rb
|
|
99
|
-
- lib/lesli_view/items/discussions.scss
|
|
100
96
|
- lib/lesli_view/items/task.html.erb
|
|
101
97
|
- lib/lesli_view/items/task.rb
|
|
102
98
|
- lib/lesli_view/items/tasks.html.erb
|
|
@@ -1,69 +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 platform.
|
|
21
|
-
|
|
22
|
-
Made with ♥ by https://www.lesli.tech
|
|
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
|
-
// ·
|
|
35
|
-
@use "lesli-css/sass/helpers/breakpoint";
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// ·
|
|
39
|
-
.lesli-element-header {
|
|
40
|
-
margin: 30px auto 30px;
|
|
41
|
-
|
|
42
|
-
.lesli-element-header-items {
|
|
43
|
-
gap: 0.5rem;
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// ·
|
|
51
|
-
@include breakpoint.lesli-breakpoint-mobile {
|
|
52
|
-
section.lesli-element-header {
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
|
|
55
|
-
.lesli-element-header-title {
|
|
56
|
-
width: 100%;
|
|
57
|
-
margin-bottom: 1rem;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@include breakpoint.lesli-breakpoint-small {
|
|
63
|
-
section.lesli-element-header {
|
|
64
|
-
.lesli-element-header-title,
|
|
65
|
-
.lesli-element-header-items {
|
|
66
|
-
justify-content: center !important;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.lesli-tabs.is-vertical {
|
|
3
|
-
display: flex;
|
|
4
|
-
|
|
5
|
-
.tabs {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
align-items: flex-start;
|
|
9
|
-
|
|
10
|
-
ul {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
border-bottom: none;
|
|
14
|
-
border-right: 1px solid #dbdbdb;
|
|
15
|
-
margin-right: 1.5rem;
|
|
16
|
-
min-width: 150px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
li {
|
|
20
|
-
width: 100%;
|
|
21
|
-
margin-bottom: 0.5rem;
|
|
22
|
-
|
|
23
|
-
&:last-child {
|
|
24
|
-
margin-bottom: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
a {
|
|
28
|
-
justify-content: flex-start;
|
|
29
|
-
padding: 0.75em 1em;
|
|
30
|
-
border-bottom: none;
|
|
31
|
-
border-right: 2px solid transparent;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&.is-active a {
|
|
35
|
-
border-right-color: var(--color-primary);
|
|
36
|
-
border-bottom-color: transparent;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.tab-content {
|
|
41
|
-
flex-grow: 1;
|
|
42
|
-
padding: 1rem;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.tab-items {
|
|
47
|
-
flex: 1;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
File without changes
|