css-zero 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +69 -1
- data/app/assets/stylesheets/zutilities.css +16 -1
- data/lib/css_zero/version.rb +1 -1
- data/lib/generators/css_zero/add/USAGE +1 -1
- data/lib/generators/css_zero/add/resources.yml +7 -0
- data/lib/generators/css_zero/add/templates/app/assets/images/chevron-right.svg +1 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/alert.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/avatar.css +31 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/breadcrumb.css +22 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css +1 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/collapsible_controller.js +9 -0
- data/lib/generators/css_zero/install/templates/app/assets/stylesheets/base.css +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92f6b9adffe56fbbd63cc59f9d80869e8fd52f01dc43285e2a4fca1478099a83
|
4
|
+
data.tar.gz: 48bc41e660292ebcd1f9fec79a0c791cbfec06ba9e698711ab211bec155950c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ff2ead3a52606d129f09bc0c9aa9039b4cd155ea0e87d6b2b07ceedb77b346d044004f906376dccd796fa63f2fd28341c6b4339547238e202465fc16c12beb
|
7
|
+
data.tar.gz: e7f2b6b8b2cf02729a57051cdb7d3827ee5803bb6af9257fa8b6e968eafcd40163e671f24f3b8c4fcfebea2663d825bb483a86a7911c8e8425210f3214628010
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ bin/rails generate css_zero:install
|
|
19
19
|
Add only the components you need. (Optional)
|
20
20
|
|
21
21
|
```
|
22
|
-
bin/rails generate css_zero:add accordion alert badge button card dialog input progress switch table
|
22
|
+
bin/rails generate css_zero:add accordion alert avatar badge breadcrumb button card collapsible dialog input progress switch table
|
23
23
|
```
|
24
24
|
|
25
25
|
### Requirements
|
@@ -132,6 +132,24 @@ Check the [CSS files](app/assets/stylesheets) in the repository to see the avail
|
|
132
132
|
```
|
133
133
|
</details>
|
134
134
|
|
135
|
+
### Avatar
|
136
|
+
|
137
|
+
<details>
|
138
|
+
<summary>Show me the code</summary>
|
139
|
+
|
140
|
+
```html+erb
|
141
|
+
<div class="flex item-center gap">
|
142
|
+
<div class="avatar">
|
143
|
+
<%= image_tag "cartoon.jpg", role: "presentation", size: 48 %>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
<div class="avatar">
|
147
|
+
<span class="avatar__fallback">CN</span>
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
```
|
151
|
+
</details>
|
152
|
+
|
135
153
|
### Badge
|
136
154
|
|
137
155
|
<img width="400" alt="image" src="https://github.com/lazaronixon/css-zero/assets/2651240/6a700dc4-0fd5-46f6-9902-a9bde5f7febb">
|
@@ -150,6 +168,24 @@ Check the [CSS files](app/assets/stylesheets) in the repository to see the avail
|
|
150
168
|
```
|
151
169
|
</details>
|
152
170
|
|
171
|
+
### Breadcrumb
|
172
|
+
|
173
|
+
<details>
|
174
|
+
<summary>Show me the code</summary>
|
175
|
+
|
176
|
+
```html+erb
|
177
|
+
<nav class="breadcrumb">
|
178
|
+
<a href="#">Home</a>
|
179
|
+
<%= image_tag "chevron-right.svg", size: 14 %>
|
180
|
+
<a href="#"><%= image_tag "ellipsis.svg", size: 14 %></a>
|
181
|
+
<%= image_tag "chevron-right.svg", size: 14 %>
|
182
|
+
<a href="#">Components</a>
|
183
|
+
<%= image_tag "chevron-right.svg", size: 14 %>
|
184
|
+
<a href="#" class="text-primary">Breadcrumb</a>
|
185
|
+
</nav>
|
186
|
+
```
|
187
|
+
</details>
|
188
|
+
|
153
189
|
### Button
|
154
190
|
|
155
191
|
<img width="500" alt="button" src="https://github.com/lazaronixon/css-zero/assets/2651240/df78c11e-9167-4fd3-a779-24729cb24715">
|
@@ -217,6 +253,38 @@ Check the [CSS files](app/assets/stylesheets) in the repository to see the avail
|
|
217
253
|
```
|
218
254
|
</details>
|
219
255
|
|
256
|
+
### Collapsible
|
257
|
+
|
258
|
+
<details>
|
259
|
+
<summary>Show me the code</summary>
|
260
|
+
|
261
|
+
```html+erb
|
262
|
+
<div data-controller="collapsible" style="max-inline-size: 350px">
|
263
|
+
<div class="flex items-center justify-between gap pi-4 pb-3">
|
264
|
+
<h4 class="text-sm font-semibold">
|
265
|
+
@lazaronixon starred 3 repositories
|
266
|
+
</h4>
|
267
|
+
<button data-action="collapsible#toggle" class="btn btn--plain p-0">
|
268
|
+
<%= image_tag "chevrons-up-down.svg", size: 16 %>
|
269
|
+
<span class="sr-only">Toggle</span>
|
270
|
+
</button>
|
271
|
+
</div>
|
272
|
+
<div class="rounded-md border pi-4 pb-3 mbs-2 text-sm">
|
273
|
+
@rails/rails
|
274
|
+
</div>
|
275
|
+
<details>
|
276
|
+
<summary data-collapsible-target="summary" hidden></summary>
|
277
|
+
<div class="rounded-md border pi-4 pb-3 mbs-2 text-sm">
|
278
|
+
@rails/jbuilder
|
279
|
+
</div>
|
280
|
+
<div class="rounded-md border pi-4 pb-3 mbs-2 text-sm">
|
281
|
+
@rails/jsbundling-rails
|
282
|
+
</div>
|
283
|
+
</details>
|
284
|
+
</div>
|
285
|
+
```
|
286
|
+
</details>
|
287
|
+
|
220
288
|
### Dialog
|
221
289
|
|
222
290
|
#### Alert Dialog
|
@@ -45,7 +45,7 @@
|
|
45
45
|
.whitespace-nowrap { white-space: nowrap; }
|
46
46
|
.whitespace-normal { white-space: normal; }
|
47
47
|
|
48
|
-
.break-words {
|
48
|
+
.break-words { overflow-wrap: break-word; }
|
49
49
|
.break-all { word-break: break-all; }
|
50
50
|
|
51
51
|
.overflow-clip { text-overflow: clip; white-space: nowrap; overflow: hidden; }
|
@@ -96,6 +96,7 @@
|
|
96
96
|
*****************************************************************/
|
97
97
|
.colorize-black { filter: var(--color-filter-text); }
|
98
98
|
.colorize-white { filter: var(--color-filter-text-reversed); }
|
99
|
+
.colorize-shade { filter: var(--color-filter-text-subtle); }
|
99
100
|
.colorize-negative { filter: var(--color-filter-negative); }
|
100
101
|
.colorize-positive { filter: var(--color-filter-positive); }
|
101
102
|
|
@@ -158,6 +159,7 @@
|
|
158
159
|
.m-0\.5 { margin: var(--size-0_5); }
|
159
160
|
.m-1 { margin: var(--size-1); }
|
160
161
|
.m-2 { margin: var(--size-2); }
|
162
|
+
.m-3 { margin: var(--size-3); }
|
161
163
|
.m-4 { margin: var(--size-4); }
|
162
164
|
.m-6 { margin: var(--size-6); }
|
163
165
|
.m-8 { margin: var(--size-8); }
|
@@ -168,6 +170,7 @@
|
|
168
170
|
.mb-0\.5 { margin-block: var(--size-0_5); }
|
169
171
|
.mb-1 { margin-block: var(--size-1); }
|
170
172
|
.mb-2 { margin-block: var(--size-2); }
|
173
|
+
.mb-3 { margin-block: var(--size-3); }
|
171
174
|
.mb-4 { margin-block: var(--size-4); }
|
172
175
|
.mb-6 { margin-block: var(--size-6); }
|
173
176
|
.mb-8 { margin-block: var(--size-8); }
|
@@ -178,6 +181,7 @@
|
|
178
181
|
.mbs-0\.5 { margin-block-start: var(--size-0_5); }
|
179
182
|
.mbs-1 { margin-block-start: var(--size-1); }
|
180
183
|
.mbs-2 { margin-block-start: var(--size-2); }
|
184
|
+
.mbs-3 { margin-block-start: var(--size-3); }
|
181
185
|
.mbs-4 { margin-block-start: var(--size-4); }
|
182
186
|
.mbs-6 { margin-block-start: var(--size-6); }
|
183
187
|
.mbs-8 { margin-block-start: var(--size-8); }
|
@@ -188,6 +192,7 @@
|
|
188
192
|
.mbe-0\.5 { margin-block-end: var(--size-0_5); }
|
189
193
|
.mbe-1 { margin-block-end: var(--size-1); }
|
190
194
|
.mbe-2 { margin-block-end: var(--size-2); }
|
195
|
+
.mbe-3 { margin-block-end: var(--size-3); }
|
191
196
|
.mbe-4 { margin-block-end: var(--size-4); }
|
192
197
|
.mbe-6 { margin-block-end: var(--size-6); }
|
193
198
|
.mbe-8 { margin-block-end: var(--size-8); }
|
@@ -198,6 +203,7 @@
|
|
198
203
|
.mi-0\.5 { margin-inline: var(--size-0_5); }
|
199
204
|
.mi-1 { margin-inline: var(--size-1); }
|
200
205
|
.mi-2 { margin-inline: var(--size-2); }
|
206
|
+
.mi-3 { margin-inline: var(--size-3); }
|
201
207
|
.mi-4 { margin-inline: var(--size-4); }
|
202
208
|
.mi-6 { margin-inline: var(--size-6); }
|
203
209
|
.mi-8 { margin-inline: var(--size-8); }
|
@@ -208,6 +214,7 @@
|
|
208
214
|
.mis-0\.5 { margin-inline-start: var(--size-0_5); }
|
209
215
|
.mis-1 { margin-inline-start: var(--size-1); }
|
210
216
|
.mis-2 { margin-inline-start: var(--size-2); }
|
217
|
+
.mis-3 { margin-inline-start: var(--size-3); }
|
211
218
|
.mis-4 { margin-inline-start: var(--size-4); }
|
212
219
|
.mis-6 { margin-inline-start: var(--size-6); }
|
213
220
|
.mis-8 { margin-inline-start: var(--size-8); }
|
@@ -218,6 +225,7 @@
|
|
218
225
|
.mie-0\.5 { margin-inline-end: var(--size-0_5); }
|
219
226
|
.mie-1 { margin-inline-end: var(--size-1); }
|
220
227
|
.mie-2 { margin-inline-end: var(--size-2); }
|
228
|
+
.mie-3 { margin-inline-end: var(--size-3); }
|
221
229
|
.mie-4 { margin-inline-end: var(--size-4); }
|
222
230
|
.mie-6 { margin-inline-end: var(--size-6); }
|
223
231
|
.mie-8 { margin-inline-end: var(--size-8); }
|
@@ -231,6 +239,7 @@
|
|
231
239
|
.p-0\.5 { padding: var(--size-0_5); }
|
232
240
|
.p-1 { padding: var(--size-1); }
|
233
241
|
.p-2 { padding: var(--size-2); }
|
242
|
+
.p-3 { padding: var(--size-3); }
|
234
243
|
.p-4 { padding: var(--size-4); }
|
235
244
|
.p-6 { padding: var(--size-6); }
|
236
245
|
.p-8 { padding: var(--size-8); }
|
@@ -240,6 +249,7 @@
|
|
240
249
|
.pb-0\.5 { padding-block: var(--size-0_5); }
|
241
250
|
.pb-1 { padding-block: var(--size-1); }
|
242
251
|
.pb-2 { padding-block: var(--size-2); }
|
252
|
+
.pb-3 { padding-block: var(--size-3); }
|
243
253
|
.pb-4 { padding-block: var(--size-4); }
|
244
254
|
.pb-6 { padding-block: var(--size-6); }
|
245
255
|
.pb-8 { padding-block: var(--size-8); }
|
@@ -249,6 +259,7 @@
|
|
249
259
|
.pbs-0\.5 { padding-block-start: var(--size-0_5); }
|
250
260
|
.pbs-1 { padding-block-start: var(--size-1); }
|
251
261
|
.pbs-2 { padding-block-start: var(--size-2); }
|
262
|
+
.pbs-3 { padding-block-start: var(--size-3); }
|
252
263
|
.pbs-4 { padding-block-start: var(--size-4); }
|
253
264
|
.pbs-6 { padding-block-start: var(--size-6); }
|
254
265
|
.pbs-8 { padding-block-start: var(--size-8); }
|
@@ -258,6 +269,7 @@
|
|
258
269
|
.pbe-0\.5 { padding-block-end: var(--size-0_5); }
|
259
270
|
.pbe-1 { padding-block-end: var(--size-1); }
|
260
271
|
.pbe-2 { padding-block-end: var(--size-2); }
|
272
|
+
.pbe-3 { padding-block-end: var(--size-3); }
|
261
273
|
.pbe-4 { padding-block-end: var(--size-4); }
|
262
274
|
.pbe-6 { padding-block-end: var(--size-6); }
|
263
275
|
.pbe-8 { padding-block-end: var(--size-8); }
|
@@ -267,6 +279,7 @@
|
|
267
279
|
.pi-0\.5 { padding-inline: var(--size-0_5); }
|
268
280
|
.pi-1 { padding-inline: var(--size-1); }
|
269
281
|
.pi-2 { padding-inline: var(--size-2); }
|
282
|
+
.pi-3 { padding-inline: var(--size-3); }
|
270
283
|
.pi-4 { padding-inline: var(--size-4); }
|
271
284
|
.pi-6 { padding-inline: var(--size-6); }
|
272
285
|
.pi-8 { padding-inline: var(--size-8); }
|
@@ -276,6 +289,7 @@
|
|
276
289
|
.pis-0\.5 { padding-inline-start: var(--size-0_5); }
|
277
290
|
.pis-1 { padding-inline-start: var(--size-1); }
|
278
291
|
.pis-2 { padding-inline-start: var(--size-2); }
|
292
|
+
.pis-3 { padding-inline-start: var(--size-3); }
|
279
293
|
.pis-4 { padding-inline-start: var(--size-4); }
|
280
294
|
.pis-6 { padding-inline-start: var(--size-6); }
|
281
295
|
.pis-8 { padding-inline-start: var(--size-8); }
|
@@ -285,6 +299,7 @@
|
|
285
299
|
.pie-0\.5 { padding-inline-end: var(--size-0_5); }
|
286
300
|
.pie-1 { padding-inline-end: var(--size-1); }
|
287
301
|
.pie-2 { padding-inline-end: var(--size-2); }
|
302
|
+
.pie-3 { padding-inline-end: var(--size-3); }
|
288
303
|
.pie-4 { padding-inline-end: var(--size-4); }
|
289
304
|
.pie-6 { padding-inline-end: var(--size-6); }
|
290
305
|
.pie-8 { padding-inline-end: var(--size-8); }
|
data/lib/css_zero/version.rb
CHANGED
@@ -2,7 +2,7 @@ Description:
|
|
2
2
|
This will add components into your project.
|
3
3
|
|
4
4
|
Components:
|
5
|
-
accordion alert badge button card dialog input progress switch table
|
5
|
+
accordion alert avatar badge breadcrumb button card collapsible dialog input progress switch table
|
6
6
|
|
7
7
|
Example:
|
8
8
|
bin/rails generate css_zero:add [components...]
|
@@ -3,13 +3,20 @@ accordion:
|
|
3
3
|
- app/assets/images/chevron-down.svg
|
4
4
|
alert:
|
5
5
|
- app/assets/stylesheets/alert.css
|
6
|
+
avatar:
|
7
|
+
- app/assets/stylesheets/avatar.css
|
6
8
|
badge:
|
7
9
|
- app/assets/stylesheets/badge.css
|
10
|
+
breadcrumb:
|
11
|
+
- app/assets/stylesheets/breadcrumb.css
|
12
|
+
- app/assets/images/chevron-right.svg
|
8
13
|
button:
|
9
14
|
- app/assets/stylesheets/button.css
|
10
15
|
- app/assets/images/loader-circle.svg
|
11
16
|
card:
|
12
17
|
- app/assets/stylesheets/card.css
|
18
|
+
collapsible:
|
19
|
+
- app/javascript/controllers/collapsible_controller.js
|
13
20
|
dialog:
|
14
21
|
- app/assets/stylesheets/dialog.css
|
15
22
|
- app/assets/images/x.svg
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
:root {
|
2
|
+
--avatar-size: var(--size-10);
|
3
|
+
}
|
4
|
+
|
5
|
+
.avatar {
|
6
|
+
block-size: var(--avatar-size);
|
7
|
+
border-radius: var(--rounded-full);
|
8
|
+
display: flex;
|
9
|
+
flex-shrink: 0;
|
10
|
+
inline-size: var(--avatar-size);
|
11
|
+
overflow: hidden;
|
12
|
+
|
13
|
+
img {
|
14
|
+
aspect-ratio: 1;
|
15
|
+
block-size: var(--size-full);
|
16
|
+
inline-size: var(--size-full);
|
17
|
+
object-fit: cover;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
.avatar__fallback {
|
22
|
+
align-items: center;
|
23
|
+
background-color: var(--color-secondary);
|
24
|
+
block-size: var(--size-full);
|
25
|
+
border-radius: var(--rounded-full);
|
26
|
+
display: flex;
|
27
|
+
font-size: calc(var(--avatar-size) * .4);
|
28
|
+
inline-size: var(--size-full);
|
29
|
+
justify-content: center;
|
30
|
+
user-select: none;
|
31
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.breadcrumb {
|
2
|
+
align-items: center;
|
3
|
+
color: var(--color-text-subtle);
|
4
|
+
display: flex;
|
5
|
+
flex-wrap: wrap;
|
6
|
+
font-size: var(--text-sm);
|
7
|
+
gap: var(--size-2_5);
|
8
|
+
overflow-wrap: break-word;
|
9
|
+
|
10
|
+
img {
|
11
|
+
filter: var(--color-filter-text-subtle);
|
12
|
+
}
|
13
|
+
|
14
|
+
a:hover {
|
15
|
+
color: var(--color-text);
|
16
|
+
}
|
17
|
+
|
18
|
+
/* Small screens and below */
|
19
|
+
@media (width < 40rem) {
|
20
|
+
gap: var(--size-1_5);
|
21
|
+
}
|
22
|
+
}
|
@@ -16,6 +16,7 @@
|
|
16
16
|
/* SVG color values */
|
17
17
|
--color-filter-text: invert(0);
|
18
18
|
--color-filter-text-reversed: invert(100%);
|
19
|
+
--color-filter-text-subtle: invert(43%) sepia(8%) saturate(340%) hue-rotate(202deg) brightness(99%) contrast(85%);
|
19
20
|
--color-filter-negative: invert(31%) sepia(96%) saturate(4646%) hue-rotate(350deg) brightness(91%) contrast(89%);
|
20
21
|
--color-filter-positive: invert(48%) sepia(74%) saturate(520%) hue-rotate(90deg) brightness(89%) contrast(90%);
|
21
22
|
|
@@ -37,6 +38,7 @@
|
|
37
38
|
/* SVG color values */
|
38
39
|
--color-filter-text: invert(100%);
|
39
40
|
--color-filter-text-reversed: invert(0);
|
41
|
+
--color-filter-text-subtle: invert(55%) sepia(98%) saturate(0%) hue-rotate(299deg) brightness(96%) contrast(94%);
|
40
42
|
--color-filter-negative: invert(15%) sepia(83%) saturate(2066%) hue-rotate(345deg) brightness(87%) contrast(88%);
|
41
43
|
--color-filter-positive: invert(23%) sepia(74%) saturate(495%) hue-rotate(91deg) brightness(88%) contrast(89%);
|
42
44
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lázaro Nixon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: lazaronixon@hotmail.com
|
@@ -37,13 +37,16 @@ files:
|
|
37
37
|
- lib/generators/css_zero/add/add_generator.rb
|
38
38
|
- lib/generators/css_zero/add/resources.yml
|
39
39
|
- lib/generators/css_zero/add/templates/app/assets/images/chevron-down.svg
|
40
|
+
- lib/generators/css_zero/add/templates/app/assets/images/chevron-right.svg
|
40
41
|
- lib/generators/css_zero/add/templates/app/assets/images/circle-alert.svg
|
41
42
|
- lib/generators/css_zero/add/templates/app/assets/images/loader-circle.svg
|
42
43
|
- lib/generators/css_zero/add/templates/app/assets/images/select-arrow.svg
|
43
44
|
- lib/generators/css_zero/add/templates/app/assets/images/x.svg
|
44
45
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/accordion.css
|
45
46
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/alert.css
|
47
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/avatar.css
|
46
48
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/badge.css
|
49
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/breadcrumb.css
|
47
50
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css
|
48
51
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/card.css
|
49
52
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css
|
@@ -51,6 +54,7 @@ files:
|
|
51
54
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/progress.css
|
52
55
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/switch.css
|
53
56
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/table.css
|
57
|
+
- lib/generators/css_zero/add/templates/app/javascript/controllers/collapsible_controller.js
|
54
58
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/dialog_controller.js
|
55
59
|
- lib/generators/css_zero/install/USAGE
|
56
60
|
- lib/generators/css_zero/install/install_generator.rb
|