css-zero 0.0.91 → 0.0.93

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 505f9164bb640731c87c44793614216aecbcf0c1ee49bab64e50bdc2396c1d03
4
- data.tar.gz: 307d9f6232bf9052f19f7febd32514c85b59b1fa539ae0c88d44bff9dbd193d2
3
+ metadata.gz: 32342c2b786487ee68c9b3a1d894d94b85b89607da1abb1d2f5a75ed9effc53c
4
+ data.tar.gz: '02517761054609b9014ef3fb4194a8d4405b7875c87dc42abe000b085577dddc'
5
5
  SHA512:
6
- metadata.gz: 9882fa069c2578c5dce25ab8e3e072c051ac7cdad6b7fc0a4e012f55496af4636e56b9b4716f0aac47e3c8acef0db3308610683225a2a4a4067ffa1aceb1fe82
7
- data.tar.gz: dabd34f0d5f6aae6ad981ec6e7dcaae17f034c747d31da81eedd455df40baa33a5d80d507bda4c999f8a5c382f9fe0f730f23d130c9d299be2ee966e662eac6a
6
+ metadata.gz: 75bdcf3780aac15921ccead84e9abec3629b6dd9f84751aa21d15e82781050e3cedb924925db75c1a1bd1387986dde849a02734be9e20873dfa44cf2b4f48751
7
+ data.tar.gz: 7fd76a723cb4be4d92243f1ed3faa5882fb96f76dfe2e184d7708bf1da9b6141925d0875cf12ccfe8a46bf924daeea117eda7d157ba235ef50a44beaada385e2
data/README.md CHANGED
@@ -24,41 +24,27 @@ bin/rails generate css_zero:add --help
24
24
 
25
25
  ## Usage
26
26
 
27
- ```html
28
- <h1 class="text-xl font-bold mb-4">
29
- Write most page content using utility classes.
30
- </h1>
31
-
32
- <div class="custom-component">
33
- Create components using CSS variables.
34
- </div>
35
-
36
- <div class="card">
37
- Optionally, copy pre-built components into your application.
38
- </div>
39
- ```
40
-
41
- ```css
42
- .custom-component {
43
- background-color: var(--red-500);
44
- border-radius: var(--rounded);
45
- block-size: var(--size-4);
46
- }
47
- ```
48
-
49
27
  Check the [CSS files](app/assets/stylesheets) in the repository to see the available variables and utility classes.
50
28
 
51
29
  ## Components
52
30
 
53
31
  [<img src="https://github.com/user-attachments/assets/3a7fbd1e-5cc8-4476-a60c-52bc28efca29">](https://csszero.lazaronixon.com)
54
32
 
33
+ ## Scaffold
34
+
35
+ This gem implements custom templates for scaffolds and authentication.
36
+
37
+ ```
38
+ bin/rails generate scaffold contacts name email phone
39
+ ```
40
+
55
41
  ## Icons
56
42
 
57
43
  Some icons in the examples are not copied to the project. If you are looking for good ones, I recommend [Lucide](https://lucide.dev).
58
44
 
59
- ## Scaffold
45
+ ## Figma
60
46
 
61
- This gem implements custom templates for scaffolds and authentication.
47
+ [shadcn/ui design system](https://www.figma.com/community/file/1203061493325953101) by [Pietro Schirano](https://twitter.com/skirano) - A design companion for shadcn/ui. Each component was painstakingly crafted to perfectly match the code implementation.
62
48
 
63
49
  ## Development
64
50
 
@@ -1,3 +1,3 @@
1
1
  module CssZero
2
- VERSION = "0.0.91"
2
+ VERSION = "0.0.93"
3
3
  end
@@ -48,7 +48,8 @@
48
48
  content: "";
49
49
  filter: var(--color-filter-text);
50
50
  inline-size: var(--size-4);
51
- transition: transform var(--time-200);
51
+ transition-duration: var(--time-200);
52
+ transition-property: transform;
52
53
  }
53
54
  }
54
55
  }
@@ -10,8 +10,9 @@
10
10
  overflow: hidden;
11
11
 
12
12
  &:is(.btn) {
13
- --btn-padding: 0;
13
+ --btn-block-size: auto;
14
14
  --btn-icon-color: none;
15
+ --btn-padding: 0;
15
16
  --btn-radius: var(--radius);
16
17
  }
17
18
 
@@ -14,6 +14,7 @@
14
14
  gap: var(--size-2);
15
15
  inline-size: var(--btn-inline-size, auto);
16
16
  justify-content: var(--btn-justify-content, center);
17
+ min-block-size: var(--btn-block-size, var(--size-9));
17
18
  padding: var(--btn-padding, 0.375rem 1rem);
18
19
  text-align: center;
19
20
  white-space: nowrap;
@@ -70,6 +71,7 @@
70
71
 
71
72
  .btn--plain {
72
73
  --btn-background: transparent;
74
+ --btn-block-size: auto;
73
75
  --btn-border-color: transparent;
74
76
  --btn-hover-color: transparent;
75
77
  --btn-padding: 0;
@@ -26,7 +26,7 @@
26
26
  transition-property: display, overlay, opacity;
27
27
  }
28
28
 
29
- /* In animation */
29
+ /* Animation end */
30
30
  &[open] {
31
31
  opacity: 1; transform: var(--scale-100);
32
32
  }
@@ -35,7 +35,7 @@
35
35
  opacity: 1;
36
36
  }
37
37
 
38
- /* Out animation */
38
+ /* Animation start */
39
39
  @starting-style {
40
40
  &[open] {
41
41
  opacity: 0; transform: var(--scale-95);
@@ -60,7 +60,7 @@
60
60
  }
61
61
 
62
62
  .dialog__close {
63
- inset-block-start: var(--size-4);
64
- inset-inline-end: var(--size-4);
63
+ inset-block-start: var(--size-3);
64
+ inset-inline-end: var(--size-3);
65
65
  position: absolute;
66
66
  }
@@ -13,19 +13,15 @@
13
13
  transition-duration: var(--time-150);
14
14
  transition-property: display, overlay, opacity, transform;
15
15
 
16
- /* In animation */
16
+ /* Animation end */
17
17
  &:popover-open {
18
18
  opacity: 1; transform: var(--scale-100);
19
19
  }
20
20
 
21
- /* Out animation */
21
+ /* Animation start */
22
22
  @starting-style {
23
23
  &:popover-open {
24
24
  opacity: 0; transform: var(--scale-95);
25
25
  }
26
26
  }
27
27
  }
28
-
29
- .popover--tooltip {
30
- font-size: var(--text-sm); padding: var(--size-1_5) var(--size-3);
31
- }
@@ -25,7 +25,7 @@
25
25
  transition-property: display, overlay, opacity;
26
26
  }
27
27
 
28
- /* In animation */
28
+ /* Animation end */
29
29
  &[open] {
30
30
  transform: translateX(0);
31
31
  }
@@ -34,7 +34,7 @@
34
34
  opacity: 1;
35
35
  }
36
36
 
37
- /* Out animation */
37
+ /* Animation start */
38
38
  @starting-style {
39
39
  &[open] {
40
40
  transform: var(--sheet-transform);
@@ -66,7 +66,7 @@
66
66
  }
67
67
 
68
68
  .sheet__close {
69
- inset-block-start: var(--size-4);
70
- inset-inline-end: var(--size-4);
69
+ inset-block-start: var(--size-3);
70
+ inset-inline-end: var(--size-3);
71
71
  position: absolute;
72
72
  }
@@ -25,7 +25,8 @@
25
25
  border-radius: var(--rounded-full);
26
26
  content: "";
27
27
  display: block;
28
- transition: margin var(--time-150);
28
+ transition-duration: var(--time-150);
29
+ transition-property: margin;
29
30
  }
30
31
 
31
32
  &:focus-visible {
@@ -1,7 +1,13 @@
1
1
  :where(.table) {
2
+ caption-side: bottom;
2
3
  font-size: var(--text-sm);
3
4
  inline-size: var(--size-full);
4
5
 
6
+ caption {
7
+ color: var(--color-text-subtle);
8
+ margin-block-start: var(--size-4);
9
+ }
10
+
5
11
  thead {
6
12
  color: var(--color-text-subtle);
7
13
  }
@@ -10,6 +10,7 @@
10
10
 
11
11
  .btn--tab {
12
12
  --btn-background: transparent;
13
+ --btn-block-size: auto;
13
14
  --btn-border-color: transparent;
14
15
  --btn-box-shadow: none;
15
16
  --btn-hover-color: transparent;
@@ -32,13 +32,12 @@
32
32
  transition-duration: var(--time-150);
33
33
  transition-property: display, opacity, transform;
34
34
 
35
- /* In animation */
35
+ /* Animation end */
36
36
  .dropdown-active & {
37
- opacity: 1;
38
- transform: var(--scale-100);
37
+ opacity: 1; transform: var(--scale-100);
39
38
  }
40
39
 
41
- /* Out animation */
40
+ /* Animation start */
42
41
  @starting-style {
43
42
  .dropdown-active & {
44
43
  opacity: 0; transform: var(--scale-95);
@@ -119,3 +118,7 @@
119
118
  .invalid .ts-control {
120
119
  border-color: var(--color-negative);
121
120
  }
121
+
122
+ [data-controller*="combobox"] {
123
+ clip: rect(0 0 0 0); position: absolute;
124
+ }
@@ -55,7 +55,7 @@ trix-toolbar {
55
55
  color: var(--color-text-reversed);
56
56
  }
57
57
 
58
- @media (max-width: 768px) {
58
+ @media (max-width: 48rem) {
59
59
  .trix-button-group--history-tools { display: none; }
60
60
  }
61
61
  }
@@ -5,6 +5,8 @@ export default class extends Controller {
5
5
  static targets = [ "button", "menu" ]
6
6
  static values = { placement: { type: String, default: "bottom" } }
7
7
 
8
+ #showTimer = null
9
+
8
10
  initialize() {
9
11
  this.orient = this.orient.bind(this)
10
12
  }
@@ -21,12 +23,12 @@ export default class extends Controller {
21
23
  this.menuTarget.showPopover()
22
24
  }
23
25
 
24
- showLater() {
25
- setTimeout(() => this.show(), 700)
26
+ hide() {
27
+ clearTimeout(this.#showTimer); this.menuTarget.hidePopover()
26
28
  }
27
29
 
28
- hide() {
29
- this.menuTarget.hidePopover()
30
+ showLater() {
31
+ this.#showTimer = setTimeout(() => this.show(), 700)
30
32
  }
31
33
 
32
34
  orient() {
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.91
4
+ version: 0.0.93
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: 2025-01-16 00:00:00.000000000 Z
11
+ date: 2025-01-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: lazaronixon@hotmail.com