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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/lesli_view/view.css +3122 -2430
  3. data/lib/lesli_view/charts/general/general.css +25 -0
  4. data/lib/lesli_view/charts/{general.html.erb → general/general.html.erb} +5 -5
  5. data/lib/lesli_view/components/header/header.css +33 -0
  6. data/lib/lesli_view/components/{header.html.erb → header/header.html.erb} +9 -9
  7. data/lib/lesli_view/components/panel/panel.css +49 -0
  8. data/lib/lesli_view/components/panel/panel.html.erb +55 -0
  9. data/lib/lesli_view/components/tabs/tabs.css +57 -0
  10. data/lib/lesli_view/components/{tabs.html.erb → tabs/tabs.html.erb} +9 -9
  11. data/lib/lesli_view/components/timeline/timeline.css +48 -0
  12. data/lib/lesli_view/components/timeline/timeline.html.erb +42 -0
  13. data/lib/lesli_view/components/{toolbar.css → toolbar/toolbar.css} +8 -5
  14. data/lib/lesli_view/components/{toolbar.html.erb → toolbar/toolbar.html.erb} +2 -2
  15. data/lib/lesli_view/elements/avatar/avatar.css +36 -0
  16. data/lib/lesli_view/elements/avatar/avatar.html.erb +7 -0
  17. data/lib/lesli_view/elements/avatar.rb +6 -6
  18. data/lib/lesli_view/elements/{button.css → button/button.css} +82 -82
  19. data/lib/lesli_view/elements/button.rb +1 -1
  20. data/lib/lesli_view/elements/empty/empty.css +25 -0
  21. data/lib/lesli_view/elements/{empty.html.erb → empty/empty.html.erb} +6 -6
  22. data/lib/lesli_view/elements/table/table-chart.css +9 -0
  23. data/lib/lesli_view/elements/{table-chart.html.erb → table/table-chart.html.erb} +2 -2
  24. data/lib/lesli_view/elements/{table.css → table/table.css} +17 -14
  25. data/lib/lesli_view/elements/{table.html.erb → table/table.html.erb} +1 -1
  26. data/lib/lesli_view/forms/builder.rb +1 -1
  27. data/lib/lesli_view/forms/form.css +26 -23
  28. data/lib/lesli_view/items/actions/actions.css +13 -0
  29. data/lib/lesli_view/items/{actions.html.erb → actions/actions.html.erb} +3 -3
  30. data/lib/lesli_view/items/activities/activities.css +5 -0
  31. data/lib/lesli_view/items/{activities.html.erb → activities/activities.html.erb} +1 -1
  32. data/lib/lesli_view/items/attachment/attachment.css +41 -0
  33. data/lib/lesli_view/items/attachment/attachment.html.erb +45 -0
  34. data/lib/lesli_view/items/attachments/attachments.css +33 -0
  35. data/lib/lesli_view/items/{attachments.html.erb → attachments/attachments.html.erb} +8 -8
  36. data/lib/lesli_view/items/discussion/discussion.css +17 -0
  37. data/lib/lesli_view/items/discussion/discussion.html.erb +12 -0
  38. data/lib/lesli_view/items/discussions/discussions.css +25 -0
  39. data/lib/lesli_view/items/{discussions.html.erb → discussions/discussions.html.erb} +7 -7
  40. data/lib/lesli_view/items/task/task.css +41 -0
  41. data/lib/lesli_view/items/{task.html.erb → task/task.html.erb} +6 -6
  42. data/lib/lesli_view/items/tasks/tasks.css +21 -0
  43. data/lib/lesli_view/items/{tasks.html.erb → tasks/tasks.html.erb} +5 -5
  44. data/lib/lesli_view/layout/container/container.css +13 -0
  45. data/lib/lesli_view/layout/{container.html.erb → container/container.html.erb} +2 -2
  46. data/lib/lesli_view/layout/navigation_sidebar/navigation_sidebar.css +68 -0
  47. data/lib/lesli_view/layout/navigation_sidebar/navigation_sidebar.html.erb +52 -0
  48. data/lib/lesli_view/partials/announcements/announcements.css +50 -0
  49. data/lib/lesli_view/partials/announcements/announcements.html.erb +23 -0
  50. data/lib/lesli_view/partials/announcements.rb +33 -0
  51. data/lib/lesli_view/partials/engine_spec/engine_spec.css +37 -0
  52. data/lib/lesli_view/partials/engine_spec/engine_spec.html.erb +38 -0
  53. data/lib/lesli_view/partials/error/error.css +38 -0
  54. data/lib/lesli_view/partials/error/error.html.erb +14 -0
  55. data/lib/lesli_view/partials/error.rb +24 -0
  56. data/lib/lesli_view/partials/header/header.css +54 -0
  57. data/lib/lesli_view/partials/header/header.html.erb +31 -0
  58. data/lib/lesli_view/partials/header.rb +22 -0
  59. data/lib/lesli_view/partials/notifications/notifications.css +38 -0
  60. data/lib/lesli_view/partials/notifications/notifications.html.erb +7 -0
  61. data/lib/lesli_view/partials/notifications.rb +28 -0
  62. data/lib/lesli_view/version.rb +2 -2
  63. data/lib/lesli_view/widgets/calendar/calendar.css +57 -0
  64. data/lib/lesli_view/widgets/calendar/calendar.html.erb +44 -0
  65. data/lib/lesli_view/widgets/chart/chart.css +21 -0
  66. data/lib/lesli_view/widgets/{chart.html.erb → chart/chart.html.erb} +5 -5
  67. data/lib/lesli_view/widgets/count/count.css +21 -0
  68. data/lib/lesli_view/widgets/count/count.html.erb +18 -0
  69. data/lib/lesli_view/widgets/date/date.css +29 -0
  70. data/lib/lesli_view/widgets/date/date.html.erb +24 -0
  71. data/lib/lesli_view/widgets/weather/weather.css +81 -0
  72. data/lib/lesli_view/widgets/weather/weather.html.erb +46 -0
  73. data/lib/lesli_view.rb +4 -0
  74. data/readme.md +1 -1
  75. metadata +68 -34
  76. data/lib/lesli_view/components/panel.html.erb +0 -55
  77. data/lib/lesli_view/components/timeline.html.erb +0 -42
  78. data/lib/lesli_view/elements/avatar.html.erb +0 -7
  79. data/lib/lesli_view/forms/form.scss +0 -35
  80. data/lib/lesli_view/items/attachment.html.erb +0 -45
  81. data/lib/lesli_view/items/discussion.html.erb +0 -12
  82. data/lib/lesli_view/layout/navigation_sidebar.css +0 -19
  83. data/lib/lesli_view/layout/navigation_sidebar.html.erb +0 -52
  84. data/lib/lesli_view/partials/engine_spec.html.erb +0 -38
  85. data/lib/lesli_view/widgets/calendar.html.erb +0 -44
  86. data/lib/lesli_view/widgets/count.html.erb +0 -18
  87. data/lib/lesli_view/widgets/date.html.erb +0 -24
  88. data/lib/lesli_view/widgets/weather.html.erb +0 -46
  89. /data/lib/lesli_view/elements/{button.html.erb → button/button.html.erb} +0 -0
@@ -27,7 +27,7 @@ Building a better future, one line of code at a time.
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
30
+ // ·
31
31
  */
32
32
 
33
33
 
@@ -101,52 +101,52 @@ Building a better future, one line of code at a time.
101
101
 
102
102
  .lesli-button.is-primary {
103
103
  @apply
104
- border-blue-600
105
- bg-blue-600
104
+ border-primary
105
+ bg-primary
106
106
  text-white
107
- hover:border-blue-700
108
- hover:bg-blue-700
109
- focus-visible:ring-blue-500;
107
+ hover:border-primary-strong
108
+ hover:bg-primary-strong
109
+ focus-visible:ring-primary;
110
110
  }
111
111
 
112
112
  .lesli-button.is-info {
113
113
  @apply
114
- border-sky-600
115
- bg-sky-600
114
+ border-info-500
115
+ bg-info-500
116
116
  text-white
117
- hover:border-sky-700
118
- hover:bg-sky-700
119
- focus-visible:ring-sky-500;
117
+ hover:border-info-600
118
+ hover:bg-info-600
119
+ focus-visible:ring-info-500;
120
120
  }
121
121
 
122
122
  .lesli-button.is-success {
123
123
  @apply
124
- border-emerald-600
125
- bg-emerald-600
124
+ border-success-500
125
+ bg-success-500
126
126
  text-white
127
- hover:border-emerald-700
128
- hover:bg-emerald-700
129
- focus-visible:ring-emerald-500;
127
+ hover:border-success-600
128
+ hover:bg-success-600
129
+ focus-visible:ring-success-500;
130
130
  }
131
131
 
132
132
  .lesli-button.is-warning {
133
133
  @apply
134
- border-amber-500
135
- bg-amber-500
136
- text-amber-950
137
- hover:border-amber-600
138
- hover:bg-amber-600
139
- focus-visible:ring-amber-500;
134
+ border-warning-500
135
+ bg-warning-500
136
+ text-warning-900
137
+ hover:border-warning-600
138
+ hover:bg-warning-600
139
+ focus-visible:ring-warning-500;
140
140
  }
141
141
 
142
142
  .lesli-button.is-danger {
143
143
  @apply
144
- border-rose-600
145
- bg-rose-600
144
+ border-danger-500
145
+ bg-danger-500
146
146
  text-white
147
- hover:border-rose-700
148
- hover:bg-rose-700
149
- focus-visible:ring-rose-500;
147
+ hover:border-danger-600
148
+ hover:bg-danger-600
149
+ focus-visible:ring-danger-500;
150
150
  }
151
151
 
152
152
  /*
@@ -157,52 +157,52 @@ Building a better future, one line of code at a time.
157
157
 
158
158
  .lesli-button.is-primary.is-light {
159
159
  @apply
160
- border-blue-100
161
- bg-blue-50
162
- text-blue-700
163
- hover:border-blue-200
164
- hover:bg-blue-100
165
- focus-visible:ring-blue-500;
160
+ border-primary-soft
161
+ bg-primary-soft
162
+ text-primary-strong
163
+ hover:border-primary-muted
164
+ hover:bg-primary-soft
165
+ focus-visible:ring-primary;
166
166
  }
167
167
 
168
168
  .lesli-button.is-info.is-light {
169
169
  @apply
170
- border-sky-100
171
- bg-sky-50
172
- text-sky-700
173
- hover:border-sky-200
174
- hover:bg-sky-100
175
- focus-visible:ring-sky-500;
170
+ border-info-100
171
+ bg-info-50
172
+ text-info-700
173
+ hover:border-info-200
174
+ hover:bg-info-100
175
+ focus-visible:ring-info-500;
176
176
  }
177
177
 
178
178
  .lesli-button.is-success.is-light {
179
179
  @apply
180
- border-emerald-100
181
- bg-emerald-50
182
- text-emerald-700
183
- hover:border-emerald-200
184
- hover:bg-emerald-100
185
- focus-visible:ring-emerald-500;
180
+ border-success-100
181
+ bg-success-50
182
+ text-success-700
183
+ hover:border-success-200
184
+ hover:bg-success-100
185
+ focus-visible:ring-success-500;
186
186
  }
187
187
 
188
188
  .lesli-button.is-warning.is-light {
189
189
  @apply
190
- border-amber-100
191
- bg-amber-50
192
- text-amber-700
193
- hover:border-amber-200
194
- hover:bg-amber-100
195
- focus-visible:ring-amber-500;
190
+ border-warning-100
191
+ bg-warning-50
192
+ text-warning-700
193
+ hover:border-warning-200
194
+ hover:bg-warning-100
195
+ focus-visible:ring-warning-500;
196
196
  }
197
197
 
198
198
  .lesli-button.is-danger.is-light {
199
199
  @apply
200
- border-rose-100
201
- bg-rose-50
202
- text-rose-700
203
- hover:border-rose-200
204
- hover:bg-rose-100
205
- focus-visible:ring-rose-500;
200
+ border-danger-100
201
+ bg-danger-50
202
+ text-danger-700
203
+ hover:border-danger-200
204
+ hover:bg-danger-100
205
+ focus-visible:ring-danger-500;
206
206
  }
207
207
 
208
208
  /*
@@ -213,52 +213,52 @@ Building a better future, one line of code at a time.
213
213
 
214
214
  .lesli-button.is-primary.is-outlined {
215
215
  @apply
216
- border-blue-300
216
+ border-primary-muted
217
217
  bg-transparent
218
- text-blue-700
219
- hover:border-blue-400
220
- hover:bg-blue-50
221
- focus-visible:ring-blue-500;
218
+ text-primary-strong
219
+ hover:border-primary
220
+ hover:bg-primary-soft
221
+ focus-visible:ring-primary;
222
222
  }
223
223
 
224
224
  .lesli-button.is-info.is-outlined {
225
225
  @apply
226
- border-sky-300
226
+ border-info-300
227
227
  bg-transparent
228
- text-sky-700
229
- hover:border-sky-400
230
- hover:bg-sky-50
231
- focus-visible:ring-sky-500;
228
+ text-info-700
229
+ hover:border-info-400
230
+ hover:bg-info-50
231
+ focus-visible:ring-info-500;
232
232
  }
233
233
 
234
234
  .lesli-button.is-success.is-outlined {
235
235
  @apply
236
- border-emerald-300
236
+ border-success-300
237
237
  bg-transparent
238
- text-emerald-700
239
- hover:border-emerald-400
240
- hover:bg-emerald-50
241
- focus-visible:ring-emerald-500;
238
+ text-success-700
239
+ hover:border-success-400
240
+ hover:bg-success-50
241
+ focus-visible:ring-success-500;
242
242
  }
243
243
 
244
244
  .lesli-button.is-warning.is-outlined {
245
245
  @apply
246
- border-amber-300
246
+ border-warning-300
247
247
  bg-transparent
248
- text-amber-700
249
- hover:border-amber-400
250
- hover:bg-amber-50
251
- focus-visible:ring-amber-500;
248
+ text-warning-700
249
+ hover:border-warning-400
250
+ hover:bg-warning-50
251
+ focus-visible:ring-warning-500;
252
252
  }
253
253
 
254
254
  .lesli-button.is-danger.is-outlined {
255
255
  @apply
256
- border-rose-300
256
+ border-danger-300
257
257
  bg-transparent
258
- text-rose-700
259
- hover:border-rose-400
260
- hover:bg-rose-50
261
- focus-visible:ring-rose-500;
258
+ text-danger-700
259
+ hover:border-danger-400
260
+ hover:bg-danger-50
261
+ focus-visible:ring-danger-500;
262
262
  }
263
263
 
264
264
  /*
@@ -47,7 +47,7 @@ module LesliView
47
47
  loading: false,
48
48
  solid: true,
49
49
  light: false,
50
- info: true,
50
+ info: false,
51
51
  success: false,
52
52
  warning: false,
53
53
  danger: false,
@@ -0,0 +1,25 @@
1
+ @layer components {
2
+ .lesli-empty-state {
3
+ @apply px-6 py-10 sm:py-12 flex w-full flex-col items-center justify-center text-center;
4
+ }
5
+
6
+ .lesli-empty-state-illustration {
7
+ @apply mb-5 flex h-36 w-36 items-center justify-center rounded-full bg-neutral-100/80 sm:h-40 sm:w-40;
8
+ }
9
+
10
+ .lesli-empty-state-icon {
11
+ @apply h-28 w-28 text-neutral-300 sm:h-32 sm:w-32;
12
+ }
13
+
14
+ .lesli-empty-state-title {
15
+ @apply text-base sm:text-lg font-semibold text-neutral-700;
16
+ }
17
+
18
+ .lesli-empty-state-description {
19
+ @apply mt-2 max-w-md text-sm leading-6 text-neutral-500;
20
+ }
21
+
22
+ .lesli-empty-state-actions {
23
+ @apply mt-6 flex flex-wrap items-center justify-center gap-3;
24
+ }
25
+ }
@@ -1,12 +1,12 @@
1
1
 
2
2
  <div
3
- class="lesli-empty-state flex w-full flex-col items-center justify-center px-6 py-10 text-center sm:py-12"
3
+ class="lesli-empty-state"
4
4
  role="region"
5
5
  aria-label="<%= text.presence || "Empty state" %>">
6
6
 
7
- <div class="mb-5 flex h-36 w-36 items-center justify-center rounded-full bg-slate-100/80 sm:h-40 sm:w-40">
7
+ <div class="lesli-empty-state-illustration">
8
8
  <svg
9
- class="h-28 w-28 text-slate-300 sm:h-32 sm:w-32"
9
+ class="lesli-empty-state-icon"
10
10
  viewBox="0 0 184 184"
11
11
  fill="none"
12
12
  xmlns="http://www.w3.org/2000/svg"
@@ -18,15 +18,15 @@
18
18
  </div>
19
19
 
20
20
  <% if text.present? %>
21
- <p class="text-base font-semibold text-slate-700 sm:text-lg"><%= text %></p>
21
+ <p class="lesli-empty-state-title"><%= text %></p>
22
22
  <% end %>
23
23
 
24
24
  <% if description.present? %>
25
- <p class="mt-2 max-w-md text-sm leading-6 text-slate-500"><%= description %></p>
25
+ <p class="lesli-empty-state-description"><%= description %></p>
26
26
  <% end %>
27
27
 
28
28
  <% if content? %>
29
- <div class="mt-6 flex flex-wrap items-center justify-center gap-3">
29
+ <div class="lesli-empty-state-actions">
30
30
  <%= content %>
31
31
  </div>
32
32
  <% end %>
@@ -0,0 +1,9 @@
1
+ @layer components {
2
+ .lesli-table-chart {
3
+ @apply w-full p-0;
4
+ }
5
+
6
+ .lesli-table-chart-heading {
7
+ @apply font-semibold text-neutral-400;
8
+ }
9
+ }
@@ -25,7 +25,7 @@ distribution: [{
25
25
  <% row.with_cell do %>
26
26
  <%= user[:label] %>
27
27
  <% end %>
28
- <% row.with_cell(class_name: "w-full p-0") do %>
28
+ <% row.with_cell(class_name: "lesli-table-chart") do %>
29
29
  <p style="padding:8px;border-radius:4px;background:<%= user[:color] %>;width:<%= user[:percentage] %>%">
30
30
  </p>
31
31
  <% end %>
@@ -33,7 +33,7 @@ distribution: [{
33
33
  <%= user[:value] %>
34
34
  <% end %>
35
35
  <% row.with_cell(align: :right) do %>
36
- <span class="font-semibold text-slate-400">
36
+ <span class="lesli-table-chart-heading">
37
37
  <%= user[:percentage] %>%
38
38
  </span>
39
39
  <% end %>
@@ -2,30 +2,30 @@
2
2
 
3
3
  @layer components {
4
4
  .lesli-table-container {
5
- @apply w-full overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm;
5
+ @apply w-full overflow-x-auto rounded-2xl border border-neutral-200 bg-white shadow-sm;
6
6
  }
7
7
 
8
8
  .lesli-table {
9
9
  width: 100%;
10
10
  min-width: 40rem;
11
11
  border-collapse: collapse;
12
- @apply text-left text-sm text-slate-600;
12
+ @apply text-left text-sm text-neutral-600;
13
13
  }
14
14
 
15
15
  .lesli-table thead {
16
- @apply border-b border-slate-200 bg-slate-50;
16
+ @apply border-b border-neutral-200 bg-neutral-50;
17
17
  }
18
18
 
19
19
  .lesli-table th {
20
- @apply whitespace-nowrap px-4 py-3 text-xs font-semibold uppercase tracking-wide text-slate-600;
20
+ @apply whitespace-nowrap px-4 py-3 text-xs font-semibold uppercase tracking-wide text-neutral-600;
21
21
  }
22
22
 
23
23
  .lesli-table td {
24
- @apply border-b border-slate-100 px-4 py-3 align-middle;
24
+ @apply border-b border-neutral-100 px-4 py-3 align-middle;
25
25
  }
26
26
 
27
27
  .lesli-table tbody tr {
28
- @apply transition-colors hover:bg-sky-50/50;
28
+ @apply transition-colors hover:bg-primary-soft/50;
29
29
  }
30
30
 
31
31
  .lesli-table tbody tr:last-child td {
@@ -33,11 +33,11 @@
33
33
  }
34
34
 
35
35
  .lesli-table--striped tbody tr:nth-child(even) {
36
- @apply bg-slate-50/60;
36
+ @apply bg-neutral-50/60;
37
37
  }
38
38
 
39
39
  .lesli-table--striped tbody tr:nth-child(even):hover {
40
- @apply bg-sky-50/70;
40
+ @apply bg-primary-soft/70;
41
41
  }
42
42
 
43
43
  .lesli-table--compact th,
@@ -62,7 +62,7 @@
62
62
  }
63
63
 
64
64
  .lesli-table__link {
65
- @apply block px-4 py-3 text-slate-700 transition-colors hover:text-sky-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-sky-500/40;
65
+ @apply block px-4 py-3 text-neutral-700 transition-colors hover:text-primary-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary/40;
66
66
  }
67
67
 
68
68
  .lesli-table--compact .lesli-table__link {
@@ -70,22 +70,25 @@
70
70
  }
71
71
 
72
72
  .lesli-table__row--danger {
73
- @apply bg-rose-50 text-rose-900;
73
+ @apply bg-danger-50 text-danger-900;
74
74
  }
75
75
 
76
76
  .lesli-table__row--warning {
77
- @apply bg-amber-50 text-amber-900;
77
+ @apply bg-warning-50 text-warning-900;
78
78
  }
79
79
 
80
80
  .lesli-table__row--info {
81
- @apply bg-sky-50 text-sky-900;
81
+ @apply bg-info-50 text-info-900;
82
82
  }
83
83
 
84
84
  .lesli-table__row--success {
85
- @apply bg-emerald-50 text-emerald-900;
85
+ @apply bg-success-50 text-success-900;
86
86
  }
87
87
 
88
88
  .lesli-table__empty {
89
- @apply py-12 text-center text-sm text-slate-400;
89
+ @apply py-12 text-center text-sm text-neutral-400;
90
+ }
91
+ .lesli-table-accessible-label {
92
+ @apply sr-only;
90
93
  }
91
94
  }
@@ -1,7 +1,7 @@
1
1
  <div class="lesli-table-container">
2
2
  <table id="<%= id %>" class="<%= table_classes %>">
3
3
  <% if caption.present? %>
4
- <caption class="sr-only"><%= caption %></caption>
4
+ <caption class="lesli-table-accessible-label"><%= caption %></caption>
5
5
  <% end %>
6
6
 
7
7
  <% unless headless %>
@@ -38,7 +38,7 @@ module LesliView
38
38
  CATEGORY_ALIASES = {
39
39
  alert: :danger,
40
40
  error: :danger,
41
- notice: :info
41
+ notice: :success
42
42
  }.freeze
43
43
 
44
44
  def css_category(category = nil)
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .lesli-form-label {
13
- @apply block text-sm font-medium leading-5 text-slate-700;
13
+ @apply block text-sm font-medium leading-5 text-neutral-700;
14
14
  }
15
15
 
16
16
  .lesli-form-field-body {
@@ -25,7 +25,7 @@
25
25
  .lesli-form-select,
26
26
  .lesli-form-control textarea,
27
27
  .lesli-form-control trix-editor {
28
- @apply block w-full rounded-xl border border-slate-300 bg-white px-3.5 py-2.5 text-sm text-slate-900 shadow-sm outline-none transition placeholder:text-slate-400 hover:border-slate-400 focus:border-sky-500 focus:ring-4 focus:ring-sky-500/10 disabled:cursor-not-allowed disabled:bg-slate-100 disabled:text-slate-500 disabled:opacity-75;
28
+ @apply block w-full rounded-xl border border-neutral-300 bg-white px-3.5 py-2.5 text-sm text-neutral-900 shadow-sm outline-none transition placeholder:text-neutral-400 hover:border-neutral-400 focus:border-primary focus:ring-4 focus:ring-primary/10 disabled:cursor-not-allowed disabled:bg-neutral-100 disabled:text-neutral-500 disabled:opacity-75;
29
29
  }
30
30
 
31
31
  .lesli-form-input,
@@ -47,15 +47,15 @@
47
47
  }
48
48
 
49
49
  .lesli-form-select-wrapper::after {
50
- @apply pointer-events-none absolute right-3.5 top-1/2 h-2 w-2 -translate-y-2 rotate-45 border-b-2 border-r-2 border-slate-400 content-[''];
50
+ @apply pointer-events-none absolute right-3.5 top-1/2 h-2 w-2 -translate-y-2 rotate-45 border-b-2 border-r-2 border-neutral-400 content-[''];
51
51
  }
52
52
 
53
53
  .lesli-form-checkbox {
54
- @apply h-4 w-4 cursor-pointer rounded border-slate-300 accent-sky-600 focus:ring-2 focus:ring-sky-500/30 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50;
54
+ @apply h-4 w-4 cursor-pointer rounded border-neutral-300 accent-primary focus:ring-2 focus:ring-primary/30 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50;
55
55
  }
56
56
 
57
57
  .lesli-form-checkbox-label {
58
- @apply inline-flex cursor-pointer items-center gap-2.5 text-sm text-slate-600;
58
+ @apply inline-flex cursor-pointer items-center gap-2.5 text-sm text-neutral-600;
59
59
  }
60
60
 
61
61
  .lesli-form-control.has-icon .lesli-form-input,
@@ -64,7 +64,7 @@
64
64
  }
65
65
 
66
66
  .lesli-form-icon {
67
- @apply pointer-events-none absolute left-3.5 top-1/2 inline-flex h-5 w-5 -translate-y-1/2 items-center justify-center text-slate-400;
67
+ @apply pointer-events-none absolute left-3.5 top-1/2 inline-flex h-5 w-5 -translate-y-1/2 items-center justify-center text-neutral-400;
68
68
  }
69
69
 
70
70
  .lesli-form-icon .material-symbols-outlined {
@@ -72,51 +72,54 @@
72
72
  }
73
73
 
74
74
  .lesli-form-help {
75
- @apply mt-2 text-sm leading-5 text-slate-500;
75
+ @apply mt-2 text-sm leading-5 text-neutral-500;
76
76
  }
77
77
 
78
78
  .lesli-form-field.is-danger .lesli-form-input,
79
79
  .lesli-form-field.is-danger .lesli-form-select,
80
80
  .lesli-form-field.is-danger textarea,
81
81
  .lesli-form-field.is-danger trix-editor {
82
- @apply border-rose-400 focus:border-rose-500 focus:ring-rose-500/10;
82
+ @apply border-danger-400 focus:border-danger-500 focus:ring-danger-500/10;
83
83
  }
84
84
 
85
85
  .lesli-form-help.is-danger {
86
- @apply text-rose-700;
86
+ @apply text-danger-700;
87
87
  }
88
88
 
89
89
  .lesli-form-help.is-warning {
90
- @apply text-amber-700;
90
+ @apply text-warning-700;
91
91
  }
92
92
 
93
93
  .lesli-form-help.is-success {
94
- @apply text-emerald-700;
94
+ @apply text-success-700;
95
95
  }
96
96
 
97
97
  .lesli-form-help.is-info {
98
- @apply text-sky-700;
98
+ @apply text-info-700;
99
99
  }
100
100
 
101
101
  .lesli-form-button {
102
102
  @apply inline-flex h-11 cursor-pointer items-center justify-center gap-2 rounded-xl border border-transparent px-4 text-sm font-semibold shadow-sm transition focus:outline-none focus:ring-4 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50;
103
103
  }
104
104
 
105
- .lesli-form-button.is-primary,
105
+ .lesli-form-button.is-primary {
106
+ @apply bg-primary text-white hover:bg-primary-strong focus:ring-primary/20;
107
+ }
108
+
106
109
  .lesli-form-button.is-info {
107
- @apply bg-sky-600 text-white hover:bg-sky-700 focus:ring-sky-500/20;
110
+ @apply bg-info-500 text-white hover:bg-info-600 focus:ring-info-500/20;
108
111
  }
109
112
 
110
113
  .lesli-form-button.is-success {
111
- @apply bg-emerald-600 text-white hover:bg-emerald-700 focus:ring-emerald-500/20;
114
+ @apply bg-success-500 text-white hover:bg-success-600 focus:ring-success-500/20;
112
115
  }
113
116
 
114
117
  .lesli-form-button.is-warning {
115
- @apply bg-amber-500 text-amber-950 hover:bg-amber-600 focus:ring-amber-500/20;
118
+ @apply bg-warning-500 text-warning-900 hover:bg-warning-600 focus:ring-warning-500/20;
116
119
  }
117
120
 
118
121
  .lesli-form-button.is-danger {
119
- @apply bg-rose-600 text-white hover:bg-rose-700 focus:ring-rose-500/20;
122
+ @apply bg-danger-500 text-white hover:bg-danger-600 focus:ring-danger-500/20;
120
123
  }
121
124
 
122
125
  .lesli-form-button.is-fullwidth {
@@ -132,27 +135,27 @@
132
135
  }
133
136
 
134
137
  .lesli-form-fieldset {
135
- @apply mb-6 rounded-2xl border border-slate-200 bg-white p-6 shadow-sm;
138
+ @apply mb-6 rounded-2xl border border-neutral-200 bg-white p-6 shadow-sm;
136
139
  }
137
140
 
138
141
  .lesli-form-legend {
139
- @apply -ml-1 mb-5 px-1 text-lg font-semibold text-slate-800;
142
+ @apply -ml-1 mb-5 px-1 text-lg font-semibold text-neutral-800;
140
143
  }
141
144
 
142
145
  .lesli-form-fieldset.is-info {
143
- @apply border-sky-200 bg-sky-50/40;
146
+ @apply border-info-200 bg-info-50/40;
144
147
  }
145
148
 
146
149
  .lesli-form-fieldset.is-success {
147
- @apply border-emerald-200 bg-emerald-50/40;
150
+ @apply border-success-200 bg-success-50/40;
148
151
  }
149
152
 
150
153
  .lesli-form-fieldset.is-warning {
151
- @apply border-amber-200 bg-amber-50/50;
154
+ @apply border-warning-200 bg-warning-50/50;
152
155
  }
153
156
 
154
157
  .lesli-form-fieldset.is-danger {
155
- @apply border-rose-200 bg-rose-50/40;
158
+ @apply border-danger-200 bg-danger-50/40;
156
159
  }
157
160
 
158
161
  @media (min-width: 768px) {
@@ -0,0 +1,13 @@
1
+ @layer components {
2
+ .lesli-item-actions {
3
+ @apply p-6;
4
+ }
5
+
6
+ .lesli-item-actions-form {
7
+ @apply mt-5;
8
+ }
9
+
10
+ .lesli-item-actions-field {
11
+ @apply mt-3 mb-3;
12
+ }
13
+ }
@@ -38,7 +38,7 @@ Building a better future, one line of code at a time.
38
38
  }
39
39
  }
40
40
  </style>
41
- <article class="lesli-items-actions box p-6" id="lesli-items-actions">
41
+ <article class="lesli-items-actions box lesli-item-actions" id="lesli-items-actions">
42
42
  <div class="lesli-items-actions-form">
43
43
  <%= form_with(
44
44
  url: @path_to_create,
@@ -51,7 +51,7 @@ Building a better future, one line of code at a time.
51
51
  <!--
52
52
  <div class="field is-grouped">
53
53
  <%= form.field_control_text(:title) %>
54
- <%= form.field_control_submit("Add action", {class:"mt-5"}) %>
54
+ <%= form.field_control_submit("Add action", {class:"lesli-item-actions-form"}) %>
55
55
  </div>
56
56
  -->
57
57
  <% end %>
@@ -61,7 +61,7 @@ Building a better future, one line of code at a time.
61
61
  <ul>
62
62
  <% @resource.actions.each do |action| %>
63
63
  <% next unless action.id %>
64
- <li class="lesli-items-actions-actions-action is-flex mt-3 mb-3 <%= "lesli-items-actions-actions-action-done" if action.done %>">
64
+ <li class="lesli-items-actions-actions-action is-flex lesli-item-actions-field <%= "lesli-items-actions-actions-action-done" if action.done %>">
65
65
  <%= form_with(
66
66
  model: action,
67
67
  url: @path_to_update.call(action.id),
@@ -0,0 +1,5 @@
1
+ @layer components {
2
+ .lesli-item-activities {
3
+ @apply p-4 sm:p-8 bg-white;
4
+ }
5
+ }
@@ -30,7 +30,7 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  %>
32
32
  <article
33
- class="lesli-items-activities bg-white p-4 sm:p-8"
33
+ class="lesli-items-activities lesli-item-activities"
34
34
  id="lesli-items-activities">
35
35
  <%= render LesliView::Components::Timeline.new(
36
36
  activities: activities,