css-zero 0.0.12 → 0.0.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 945da122c69f2e0e60107ec644977720638f884d8df7090b4c1d32a4f4c960d9
4
- data.tar.gz: 28777cbfd808aaafe8a3401c34d987fc989b4ae13580361682414341f87b1e32
3
+ metadata.gz: 9fa9b5a675b170c1792a89b840dea6339ee14768644531ec3a1d2b465068e4f5
4
+ data.tar.gz: 165ee0886c7f61ffe76c06545b367c6b1c5a3cb883a49345433dd6965b748e6b
5
5
  SHA512:
6
- metadata.gz: e426c0ab8a1dd0223bc6a789720bb82c1ae41f3041371618dd647433e0b052dcd7f00ef28a0881837c7dc2c20d0e590fef18df35281dc6b0bd8c7431388b7ddd
7
- data.tar.gz: 42efd1be6dea0b6493e501c637b2b8c3a07ad68af08a95cc5086ca2a3580b34d6d81354a1be861503d70eac1f62c19a6608b20e9dc4002443a6c6860ee72cb7f
6
+ metadata.gz: f6c36eb3cc7eb625ee8ed8255bac1aaa409e30ae6202a3e1e6683df5f3be36c74f052d011ba49ed7fda0a1d91dc5fea3ef24aa15392e9ccf0b7c3b1431280dcb
7
+ data.tar.gz: 52f6d8133c48e4b9e6fd0e6c57f844a7121a516d6cbef6fefac54a0db69759cf42224d9963431eabb05158d802b6a4f1271d869abf056988d034b9bced5d2120
data/README.md CHANGED
@@ -4,12 +4,6 @@ An opinionated CSS starter kit for your application. You can think of it like a
4
4
 
5
5
  ## Installation
6
6
 
7
- Is recommended to use [Propshaft](https://github.com/rails/propshaft), make sure to load all the CSS files in your `layout.html.erb`.
8
-
9
- ```html+erb
10
- <%= stylesheet_link_tag :all, "data-turbo-track": "reload" %>
11
- ```
12
-
13
7
  Add this gem to your project.
14
8
 
15
9
  ```
@@ -28,6 +22,45 @@ Add only the components you need. (Optional)
28
22
  bin/rails generate css_zero:add accordion alert alert_dialog badge button card dialog input progress switch table
29
23
  ```
30
24
 
25
+ ### Requirements
26
+
27
+ If you are using [Propshaft](https://github.com/rails/propshaft) (recommended) make sure to load all the CSS files in your layout.html.erb.
28
+
29
+ <details>
30
+ <summary>Click here to see how</summary>
31
+
32
+ ```html+erb
33
+ <%= stylesheet_link_tag :all, "data-turbo-track": "reload" %>
34
+ ```
35
+ </details>
36
+
37
+ If you are using [Sprockets](https://github.com/rails/sprockets) make sure to load all the CSS files in your application.css.
38
+
39
+ <details>
40
+ <summary>Click here to see how</summary>
41
+
42
+ ```
43
+ /*
44
+ *= require _reset
45
+ *= require animations
46
+ *= require borders
47
+ *= require colors
48
+ *= require effects
49
+ *= require filters
50
+ *= require grid
51
+ *= require sizes
52
+ *= require transform
53
+ *= require transition
54
+ *= require typography
55
+ *= require_tree .
56
+ *= require_self
57
+ *= require zutilities
58
+ */
59
+ ```
60
+ </details>
61
+
62
+ Some icons in the examples are not copied to the project. If you are looking for good ones, I recommend [Lucide](https://lucide.dev).
63
+
31
64
  ## Usage
32
65
 
33
66
  ```html
@@ -145,7 +178,7 @@ Check the [CSS files](app/assets/stylesheets) in the repository to see the avail
145
178
 
146
179
  ### Button
147
180
 
148
- <img width="500" alt="button" src="https://github.com/lazaronixon/css-zero/assets/2651240/0c2ee625-9e6b-4f9c-8437-8d6751e4e508">
181
+ <img width="500" alt="button" src="https://github.com/lazaronixon/css-zero/assets/2651240/df78c11e-9167-4fd3-a779-24729cb24715">
149
182
 
150
183
  <details>
151
184
  <summary>Show me the code</summary>
@@ -156,10 +189,11 @@ Check the [CSS files](app/assets/stylesheets) in the repository to see the avail
156
189
  <button class="btn btn--secondary">Secondary</button>
157
190
  <button class="btn btn--outline">Outline</button>
158
191
  <button class="btn btn--plain">Plain</button>
192
+ <button class="btn btn--positive">Positive</button>
159
193
  <button class="btn btn--negative">Negative</button>
160
194
 
161
195
  <button class="btn">
162
- <%= image_tag "circle-alert.svg", role: "presentation", size: 16 %>
196
+ <%= image_tag "circle-plus.svg", role: "presentation", size: 16 %>
163
197
  <span>With icon</span>
164
198
  </button>
165
199
 
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
@@ -3,7 +3,6 @@ accordion:
3
3
  - app/assets/images/chevron-down.svg
4
4
  alert:
5
5
  - app/assets/stylesheets/alert.css
6
- - app/assets/images/circle-alert.svg
7
6
  alert_dialog:
8
7
  - app/assets/stylesheets/alert_dialog.css
9
8
  - app/javascript/controllers/dialog_control_controller.js
@@ -11,6 +11,12 @@
11
11
  }
12
12
  }
13
13
 
14
+ .alert--positive {
15
+ --alert-border-color: var(--color-positive);
16
+ --alert-color: var(--color-positive);
17
+ --alert-icon-color: var(--color-filter-positive);
18
+ }
19
+
14
20
  .alert--negative {
15
21
  --alert-border-color: var(--color-negative);
16
22
  --alert-color: var(--color-negative);
@@ -49,9 +49,16 @@
49
49
  --btn-icon-color: var(--color-filter-text);
50
50
  }
51
51
 
52
+ .btn--positive {
53
+ --btn-background: var(--color-positive);
54
+ --btn-color: white;
55
+ --btn-icon-color: var(--color-filter-positive);
56
+ }
57
+
52
58
  .btn--negative {
53
59
  --btn-background: var(--color-negative);
54
60
  --btn-color: white;
61
+ --btn-icon-color: var(--color-filter-negative);
55
62
  }
56
63
 
57
64
  .btn--loading {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lázaro Nixon