lesli_view 1.0.2 → 1.0.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/components/header.html.erb +1 -1
- data/lib/lesli_view/components/panel.html.erb +1 -1
- data/lib/lesli_view/components/tabs.html.erb +4 -2
- data/lib/lesli_view/components/tabs.rb +3 -2
- data/lib/lesli_view/components/tabs.scss +49 -0
- data/lib/lesli_view/components/toolbar.html.erb +1 -1
- data/lib/lesli_view/elements/button.html.erb +6 -4
- data/lib/lesli_view/elements/table.html.erb +1 -1
- data/lib/lesli_view/elements/table.scss +1 -1
- data/lib/lesli_view/forms/fields.rb +2 -2
- data/lib/lesli_view/layout/container.html.erb +1 -1
- data/lib/lesli_view/partials/engine_spec.html.erb +51 -0
- data/lib/lesli_view/partials/engine_spec.rb +45 -0
- data/lib/lesli_view/version.rb +2 -2
- data/lib/lesli_view.rb +13 -9
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9514f6d60ee56ac5ceeb4acfb7cd55a806e52fc27d0eab8819aac0eaf65feca
|
4
|
+
data.tar.gz: c379ab881d6997fcedc908e217a3380c130509cbbf9e303c858f6a173a8d1f0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9b93ec31104ca2763be55561ad2923f11c91c0d776e1c71442be9486bda61b041a7856d36b27a0b0349e0cf27971ca6e4e8366bc8f02974a8935690f255dcbe
|
7
|
+
data.tar.gz: a1dde4c94d1fe576a7ca7b0e0eb7378981ce1ecb43e85ef374326aaa8cb2cb4a96abad92197e7c1f62f780f8e4c0dfbce16b8aaaf85223b4c925ac639536afda
|
@@ -5,7 +5,7 @@
|
|
5
5
|
back || request.referer || root_path,
|
6
6
|
class: "button is-info is-outlined mr-4",
|
7
7
|
data: { turbo_frame: '_top' }) do %>
|
8
|
-
<span class="material-
|
8
|
+
<span class="material-symbols">arrow_back</span>
|
9
9
|
<% end %>
|
10
10
|
<% end %>
|
11
11
|
<% if title.present? %>
|
@@ -1,4 +1,6 @@
|
|
1
|
-
<div
|
1
|
+
<div
|
2
|
+
class="lesli-tabs <%= 'is-vertical' if vertical%>"
|
3
|
+
x-data="{ activeTab: '<%= tabs[0].tab_id %>' }">
|
2
4
|
<div class="tabs mb-0">
|
3
5
|
<ul>
|
4
6
|
<% tabs.each_with_index do |tab, index| %>
|
@@ -7,7 +9,7 @@
|
|
7
9
|
<a @click="activeTab = '<%= tab.tab_id %>'" data-turbo="false">
|
8
10
|
<% if tab.icon %>
|
9
11
|
<span class="icon is-small">
|
10
|
-
<span class="material-
|
12
|
+
<span class="material-symbols-outlined">
|
11
13
|
<%= tab.icon %>
|
12
14
|
</span>
|
13
15
|
</span>
|
@@ -16,10 +16,11 @@ module LesliView
|
|
16
16
|
class Tabs < ViewComponent::Base
|
17
17
|
renders_many :tabs, "TabComponent"
|
18
18
|
|
19
|
-
attr_reader :active_tab
|
19
|
+
attr_reader :active_tab, :vertical
|
20
20
|
|
21
|
-
def initialize(active_tab: nil)
|
21
|
+
def initialize(active_tab: nil, vertical: false)
|
22
22
|
@active_tab = active_tab
|
23
|
+
@vertical = vertical
|
23
24
|
end
|
24
25
|
|
25
26
|
class TabComponent < ViewComponent::Base
|
@@ -0,0 +1,49 @@
|
|
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
|
+
}
|
@@ -15,10 +15,12 @@
|
|
15
15
|
<%= content_tag(tag_name, **attributes) do %>
|
16
16
|
<% if icon %>
|
17
17
|
<span class="icon <%= 'is-small' if small %>">
|
18
|
-
<span class="material-
|
18
|
+
<span class="material-symbols"><%= icon %></span>
|
19
19
|
</span>
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
<% unless icon_only? %>
|
21
|
+
<span><%= label %></span>
|
22
|
+
<% end %>
|
23
|
+
<% else %>
|
24
|
+
<%= label %>
|
23
25
|
<% end %>
|
24
26
|
<% end %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<span class="icon-text">
|
14
14
|
<span><%= column[:label] %></span>
|
15
15
|
<span class="icon">
|
16
|
-
<span class="material-
|
16
|
+
<span class="material-symbols"><%= column[:field] == @current_sort ? (current_sort_dir(column) == "asc" ? "arrow_upward" : "arrow_downward") : "sort" %></span>
|
17
17
|
</span>
|
18
18
|
</span>
|
19
19
|
<% else %>
|
@@ -78,7 +78,7 @@ module LesliView
|
|
78
78
|
html = "".html_safe
|
79
79
|
if icon.present?
|
80
80
|
html << @template.content_tag(:span, class: "icon") do
|
81
|
-
@template.content_tag(:span, icon, class: "material-
|
81
|
+
@template.content_tag(:span, icon, class: "material-symbols")
|
82
82
|
end
|
83
83
|
end
|
84
84
|
html << @template.content_tag(:span, value) if value.present?
|
@@ -136,7 +136,7 @@ module LesliView
|
|
136
136
|
|
137
137
|
@template.content_tag(:span, class: "icon is-small is-#{position}") do
|
138
138
|
#@template.content_tag(:i, '', class: icon_class)
|
139
|
-
@template.content_tag(:span, icon_class, class: "material-
|
139
|
+
@template.content_tag(:span, icon_class, class: "material-symbols-outlined")
|
140
140
|
end
|
141
141
|
end
|
142
142
|
end
|
@@ -2,6 +2,6 @@
|
|
2
2
|
<!-- app/components/lesli_application_container_component.html.erb -->
|
3
3
|
<turbo-frame
|
4
4
|
id="<%= turbo_frame_id %>"
|
5
|
-
class="lesli-application-container container <%= 'is-fluid' if dashboard %>">
|
5
|
+
class="lesli-application-container container <%= 'is-fluid' if dashboard %> px-0">
|
6
6
|
<%= content %>
|
7
7
|
</turbo-frame>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
|
2
|
+
<style>
|
3
|
+
.partial-engine-spec div {
|
4
|
+
border-bottom: 1px solid silver;
|
5
|
+
}
|
6
|
+
.partial-engine-spec li {
|
7
|
+
font-size: 1.1rem;
|
8
|
+
margin-left: .4rem;
|
9
|
+
}
|
10
|
+
</style>
|
11
|
+
<div class="partial-engine-spec">
|
12
|
+
<div class="mb-3 pb-2">
|
13
|
+
<h5 class="is-title is-size-5 has-text-weight-semibold"><%= engine[:name] %></h5>
|
14
|
+
<p class="is-size-5"><%= engine[:summary] %></p>
|
15
|
+
</div>
|
16
|
+
<ul>
|
17
|
+
<li class="mb-2">
|
18
|
+
<span class="icon-text">
|
19
|
+
<span class="material-symbols md-24">
|
20
|
+
pest_control
|
21
|
+
</span>
|
22
|
+
<span></span>
|
23
|
+
</span>
|
24
|
+
Version: <%= engine[:version] %>
|
25
|
+
</li>
|
26
|
+
<li class="mb-2">
|
27
|
+
<span class="icon-text">
|
28
|
+
<span class="material-symbols md-24">
|
29
|
+
schedule
|
30
|
+
</span>
|
31
|
+
<span></span>
|
32
|
+
</span>
|
33
|
+
Build: <%= LesliDate::Formatter.new(Time.at(engine[:build].to_i)).date_time %>
|
34
|
+
</li>
|
35
|
+
<li>
|
36
|
+
<span class="icon-text">
|
37
|
+
<span class="material-symbols md-24">
|
38
|
+
library_books
|
39
|
+
</span>
|
40
|
+
<span></span>
|
41
|
+
</span>
|
42
|
+
<%= link_to_if(
|
43
|
+
engine.dig(:metadata, "documentation_uri"),
|
44
|
+
engine.dig(:metadata, "documentation_uri"),
|
45
|
+
engine.dig(:metadata, "documentation_uri"),
|
46
|
+
target: "_blank",
|
47
|
+
class: "is-family-sans-serif"
|
48
|
+
) %>
|
49
|
+
</li>
|
50
|
+
</ul>
|
51
|
+
</div>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
=begin
|
4
|
+
|
5
|
+
Lesli
|
6
|
+
|
7
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
8
|
+
|
9
|
+
This program is free software: you can redistribute it and/or modify
|
10
|
+
it under the terms of the GNU General Public License as published by
|
11
|
+
the Free Software Foundation, either version 3 of the License, or
|
12
|
+
(at your option) any later version.
|
13
|
+
|
14
|
+
This program is distributed in the hope that it will be useful,
|
15
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
GNU General Public License for more details.
|
18
|
+
|
19
|
+
You should have received a copy of the GNU General Public License
|
20
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
21
|
+
|
22
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
23
|
+
|
24
|
+
Made with ♥ by LesliTech
|
25
|
+
Building a better future, one line of code at a time.
|
26
|
+
|
27
|
+
@contact hello@lesli.tech
|
28
|
+
@website https://www.lesli.tech
|
29
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
30
|
+
|
31
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
32
|
+
// ·
|
33
|
+
=end
|
34
|
+
|
35
|
+
module LesliView
|
36
|
+
module Partials
|
37
|
+
class EngineSpec < ViewComponent::Base
|
38
|
+
attr_reader :engine
|
39
|
+
|
40
|
+
def initialize(engine)
|
41
|
+
@engine = engine
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/lesli_view/version.rb
CHANGED
data/lib/lesli_view.rb
CHANGED
@@ -8,8 +8,10 @@ require "lesli_view/version"
|
|
8
8
|
require "lesli_view/engine"
|
9
9
|
|
10
10
|
|
11
|
-
# loading
|
12
|
-
require "lesli_view/
|
11
|
+
# loading charts
|
12
|
+
require "lesli_view/charts/general"
|
13
|
+
require "lesli_view/charts/bar"
|
14
|
+
require "lesli_view/charts/line"
|
13
15
|
|
14
16
|
|
15
17
|
# loading components
|
@@ -27,20 +29,22 @@ require "lesli_view/elements/avatar"
|
|
27
29
|
require "lesli_view/elements/button"
|
28
30
|
|
29
31
|
|
30
|
-
# loading charts
|
31
|
-
require "lesli_view/charts/general"
|
32
|
-
require "lesli_view/charts/bar"
|
33
|
-
require "lesli_view/charts/line"
|
34
|
-
|
35
|
-
|
36
32
|
# loading forms
|
37
33
|
require "lesli_view/forms/fields"
|
38
34
|
require "lesli_view/forms/inputs"
|
39
35
|
require "lesli_view/forms/fieldset"
|
40
|
-
|
41
36
|
require "lesli_view/forms/builder"
|
42
37
|
require "lesli_view/forms/builder_horizontal"
|
43
38
|
|
39
|
+
|
40
|
+
# loading layout
|
41
|
+
require "lesli_view/layout/container"
|
42
|
+
|
43
|
+
|
44
|
+
# loading partials
|
45
|
+
require "lesli_view/partials/engine_spec"
|
46
|
+
|
47
|
+
|
44
48
|
module LesliView
|
45
49
|
class Error < StandardError; end
|
46
50
|
# Your code goes here...
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lesli_view
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
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: 2025-
|
11
|
+
date: 2025-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: view_component
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 4.0.0
|
27
27
|
description: Web Elements & Components for The Lesli Framework.
|
28
28
|
email:
|
29
29
|
- hello@lesli.tech
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- lib/lesli_view/components/panel.scss
|
46
46
|
- lib/lesli_view/components/tabs.html.erb
|
47
47
|
- lib/lesli_view/components/tabs.rb
|
48
|
+
- lib/lesli_view/components/tabs.scss
|
48
49
|
- lib/lesli_view/components/tabs_spec.rb
|
49
50
|
- lib/lesli_view/components/timeline.html.erb
|
50
51
|
- lib/lesli_view/components/timeline.rb
|
@@ -71,6 +72,8 @@ files:
|
|
71
72
|
- lib/lesli_view/forms/inputs.rb
|
72
73
|
- lib/lesli_view/layout/container.html.erb
|
73
74
|
- lib/lesli_view/layout/container.rb
|
75
|
+
- lib/lesli_view/partials/engine_spec.html.erb
|
76
|
+
- lib/lesli_view/partials/engine_spec.rb
|
74
77
|
- lib/lesli_view/version.rb
|
75
78
|
- license
|
76
79
|
- readme.md
|