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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lesli_view/charts/bar.rb +10 -0
  3. data/lib/lesli_view/charts/general.html.erb +38 -52
  4. data/lib/lesli_view/charts/general.rb +69 -30
  5. data/lib/lesli_view/charts/line.rb +16 -0
  6. data/lib/lesli_view/components/header.html.erb +48 -23
  7. data/lib/lesli_view/components/header.rb +35 -2
  8. data/lib/lesli_view/components/toolbar.css +52 -0
  9. data/lib/lesli_view/components/toolbar.html.erb +36 -21
  10. data/lib/lesli_view/components/toolbar.rb +41 -4
  11. data/lib/lesli_view/elements/button.css +357 -0
  12. data/lib/lesli_view/elements/button.html.erb +15 -12
  13. data/lib/lesli_view/elements/button.rb +74 -34
  14. data/lib/lesli_view/elements/empty.html.erb +31 -6
  15. data/lib/lesli_view/elements/empty.rb +8 -1
  16. data/lib/lesli_view/elements/table-chart.html.erb +42 -0
  17. data/lib/lesli_view/elements/table.css +91 -0
  18. data/lib/lesli_view/elements/table.html.erb +24 -21
  19. data/lib/lesli_view/elements/table.rb +67 -17
  20. data/lib/lesli_view/forms/builder.rb +16 -3
  21. data/lib/lesli_view/forms/builder_horizontal.rb +34 -10
  22. data/lib/lesli_view/forms/fields.rb +103 -70
  23. data/lib/lesli_view/forms/fieldset.rb +3 -3
  24. data/lib/lesli_view/forms/form.css +171 -0
  25. data/lib/lesli_view/forms/form.scss +2 -54
  26. data/lib/lesli_view/forms/inputs.rb +27 -15
  27. data/lib/lesli_view/layout/container.html.erb +8 -2
  28. data/lib/lesli_view/version.rb +2 -2
  29. data/lib/lesli_view/widgets/calendar.html.erb +42 -133
  30. data/lib/lesli_view/widgets/calendar.rb +77 -3
  31. data/lib/lesli_view/widgets/chart.html.erb +25 -26
  32. data/lib/lesli_view/widgets/chart.rb +46 -3
  33. data/lib/lesli_view/widgets/count.html.erb +17 -15
  34. data/lib/lesli_view/widgets/count.rb +13 -1
  35. data/lib/lesli_view/widgets/date.html.erb +23 -21
  36. data/lib/lesli_view/widgets/date.rb +27 -2
  37. data/lib/lesli_view/widgets/weather.html.erb +40 -38
  38. data/lib/lesli_view/widgets/weather.rb +41 -2
  39. data/readme.md +158 -29
  40. metadata +6 -4
  41. data/lib/lesli_view/components/header.scss +0 -69
  42. data/lib/lesli_view/components/toolbar.scss +0 -54
  43. data/lib/lesli_view/elements/table.scss +0 -153
@@ -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,54 +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
- //@import "../../scss/component";
36
-
37
-
38
- // ·
39
- .lesli-toolbar {
40
-
41
- // General styles
42
- input,
43
- .select select {
44
- border-radius: 6px;
45
- border: 1px solid lesli-css-color(silver);
46
- }
47
-
48
- // search input
49
- input::placeholder {
50
- color: lesli-css-color(silver, 500);
51
- opacity: 1;
52
- }
53
-
54
- }
@@ -1,153 +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" as lesli;
36
-
37
-
38
- // ·
39
- table.lesli-table {
40
- display: table;
41
- @include lesli.lesli-shadow();
42
-
43
- // standard padding
44
- // normally used in tables for index views
45
- --table-cell-padding: 1rem;
46
-
47
- // narrow padding
48
- // normally used in panels or components where the table is secondary
49
- &.is-narrow {
50
- --table-cell-padding: 0.25em 0.5em;
51
- }
52
-
53
- thead {
54
- border-radius: 10px 10px 0 0;
55
- background-color: #E2E6F6;
56
-
57
- th {
58
- border: none;
59
- font-weight: 700;
60
- vertical-align: middle;
61
- }
62
-
63
- // keep text and icons in the same line
64
- .icon-text {
65
- flex-wrap: nowrap;
66
- span {
67
- white-space: nowrap;
68
- }
69
- &:hover {
70
- cursor: pointer;
71
- }
72
- }
73
- }
74
-
75
- tbody {
76
-
77
- tr.is-danger {
78
- --bulma-table-cell-background-color: var(--bulma-danger-90);
79
- }
80
-
81
- tr.is-warning {
82
- --bulma-table-cell-background-color: var(--bulma-warning-90);
83
- }
84
-
85
- tr.is-info {
86
- --bulma-table-cell-background-color: var(--bulma-info-90);
87
- }
88
-
89
- // default styles for cell containers
90
- td {
91
- vertical-align: middle;
92
-
93
- // if cell has a child link, remove padding
94
- // due <a> will include the corresponding padding
95
- // currently only supported by webkit, bug this is part
96
- // of the standard so other engines will support soon
97
- // ** currently not supported by firefox **
98
- &:has(a) {
99
- padding: 0 !important;
100
-
101
- // apply styles only to direct anchor elements
102
- & > a {
103
- display: block;
104
- padding: var(--table-cell-padding);
105
- }
106
- }
107
- }
108
- }
109
-
110
- // icon to show detail row if detail slot is provided
111
- td.detail-row {
112
- width: 40px;
113
- }
114
-
115
- td.options {
116
- .dropdown {
117
- .button {
118
- background-color: transparent;
119
- border: none;
120
- }
121
- .dropdown-content {
122
- padding: 0;
123
- }
124
- .dropdown-item {
125
- display: flex;
126
- padding: .8rem;
127
- .material-symbols {
128
- margin-right: 8px;
129
- }
130
- }
131
- }
132
- }
133
- }
134
-
135
-
136
- @include lesli.lesli-breakpoint-until-tablet {
137
- .lesli-table-container {
138
- overflow: auto;
139
- overflow-y: auto;
140
- overflow-y: hidden;
141
- max-width: 100%;
142
- margin-bottom: .8rem;
143
- }
144
- }
145
-
146
- /*
147
- td:has(~ td:hover), / * previous sibling cells * /
148
- table:has(td:nth-of-type(3):hover) / * column cells * /
149
- tr:not(:first-of-type):has(~ tr:hover)
150
- td:nth-of-type(3) {
151
- background: silver !important;
152
- }
153
- */