showcase-rails 0.4.6 → 0.5.0
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 +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +9 -2
- data/app/assets/builds/showcase.css +44 -36
- data/app/assets/builds/showcase.highlights.css +8 -0
- data/lib/showcase/version.rb +1 -1
- metadata +5 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 762f93c7afc1ffebdb446132710f91b8070d1dacf388752916195a18de572953
|
|
4
|
+
data.tar.gz: bc98f34767b38cc924aa19088a184d3a2919fe5ec23886dce3b4080cd3200498
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 326043beab9c4e250a882f889c2ae857ae0a0227cb21b416607a0337c85638e5e6ea4304b5b7e062258e9a56179416c08d482c32da31c2aff79884e496671a19
|
|
7
|
+
data.tar.gz: 34a4435d411b1d6a747efe95724f4458b8faa58bd4bf62a005228072682114a73faae29b5122c10bd643c1f23c757017af66a76479fd7c59a26f057b1c8476e3
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Showcase lets you build previews for your partials, components, view helpers, Stimulus controllers and more — Rails engines included!
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
You can see it in action on [https://bullettrain.co/docs/showcase](https://bullettrain.co/docs/showcase).
|
|
6
6
|
|
|
7
7
|
| Light Mode | Dark Mode |
|
|
8
8
|
| --- | --- |
|
|
@@ -12,6 +12,13 @@ Each sample shows the render time in milliseconds and the allocation count so it
|
|
|
12
12
|
|
|
13
13
|
## What can I showcase?
|
|
14
14
|
|
|
15
|
+
Add a partial in `app/views/showcase/previews` and it'll show up in Showcase's sidebar menu.
|
|
16
|
+
|
|
17
|
+
So `app/views/showcase/previews/_button.html.erb` will add top-level Button page. Directories are respected so a `app/views/showcase/previews/deeply/nested/_partial.html.erb` file will create Deeply > Nested > Partial in the sidebar.
|
|
18
|
+
|
|
19
|
+
Within each partial preview file, you get access to a `showcase` local variable.
|
|
20
|
+
Here's some examples of using it, and what you can showcase in your app or engine.
|
|
21
|
+
|
|
15
22
|
### Rails partials
|
|
16
23
|
|
|
17
24
|
Here's how to showcase a standard button component written with standard Rails partials:
|
|
@@ -393,7 +400,7 @@ partials, make sure to include `"showcase"` in your list of assets.
|
|
|
393
400
|
[showcase/engine/_stylesheets.html.erb]: app/views/showcase/engine/_stylesheets.html.erb
|
|
394
401
|
|
|
395
402
|
## Contributing
|
|
396
|
-
|
|
403
|
+
Please open issues and/or pull requests with any feedback, fixes, or potential features you'd like us to look at. Thank you!
|
|
397
404
|
|
|
398
405
|
## License
|
|
399
406
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
! tailwindcss v3.2.7 | MIT License | https://tailwindcss.com
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
7
|
-
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
* {
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
html {
|
|
15
|
-
line-height: 1.5;
|
|
16
|
-
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
body {
|
|
20
|
-
margin: 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
pre {
|
|
24
|
-
margin: 0;
|
|
25
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
26
|
-
font-size: 1em;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
1
|
*, ::before, ::after {
|
|
30
2
|
--tw-border-spacing-x: 0;
|
|
31
3
|
--tw-border-spacing-y: 0;
|
|
@@ -74,6 +46,10 @@ pre {
|
|
|
74
46
|
--tw-backdrop-opacity: ;
|
|
75
47
|
--tw-backdrop-saturate: ;
|
|
76
48
|
--tw-backdrop-sepia: ;
|
|
49
|
+
--tw-contain-size: ;
|
|
50
|
+
--tw-contain-layout: ;
|
|
51
|
+
--tw-contain-paint: ;
|
|
52
|
+
--tw-contain-style: ;
|
|
77
53
|
}
|
|
78
54
|
|
|
79
55
|
::backdrop {
|
|
@@ -124,6 +100,38 @@ pre {
|
|
|
124
100
|
--tw-backdrop-opacity: ;
|
|
125
101
|
--tw-backdrop-saturate: ;
|
|
126
102
|
--tw-backdrop-sepia: ;
|
|
103
|
+
--tw-contain-size: ;
|
|
104
|
+
--tw-contain-layout: ;
|
|
105
|
+
--tw-contain-paint: ;
|
|
106
|
+
--tw-contain-style: ;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/*
|
|
110
|
+
! tailwindcss v3.2.7 | MIT License | https://tailwindcss.com
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/*
|
|
114
|
+
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
115
|
+
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
* {
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
html {
|
|
123
|
+
line-height: 1.5;
|
|
124
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
body {
|
|
128
|
+
margin: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
pre {
|
|
132
|
+
margin: 0;
|
|
133
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
134
|
+
font-size: 1em;
|
|
127
135
|
}
|
|
128
136
|
|
|
129
137
|
.sc-link {
|
|
@@ -487,38 +495,38 @@ pre {
|
|
|
487
495
|
background-color: rgb(238 242 255 / var(--tw-bg-opacity));
|
|
488
496
|
}
|
|
489
497
|
|
|
490
|
-
:is(.sc-dark
|
|
498
|
+
.dark\:sc-block:is(.sc-dark *) {
|
|
491
499
|
display: block;
|
|
492
500
|
}
|
|
493
501
|
|
|
494
|
-
:is(.sc-dark
|
|
502
|
+
.dark\:sc-hidden:is(.sc-dark *) {
|
|
495
503
|
display: none;
|
|
496
504
|
}
|
|
497
505
|
|
|
498
|
-
|
|
506
|
+
.dark\:sc-bg-neutral-700\/50:is(.sc-dark *) {
|
|
499
507
|
background-color: rgb(64 64 64 / 0.5);
|
|
500
508
|
}
|
|
501
509
|
|
|
502
|
-
|
|
510
|
+
.dark\:sc-bg-neutral-800:is(.sc-dark *) {
|
|
503
511
|
--tw-bg-opacity: 1;
|
|
504
512
|
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
|
|
505
513
|
}
|
|
506
514
|
|
|
507
|
-
|
|
515
|
+
.dark\:sc-bg-neutral-900:is(.sc-dark *) {
|
|
508
516
|
--tw-bg-opacity: 1;
|
|
509
517
|
background-color: rgb(23 23 23 / var(--tw-bg-opacity));
|
|
510
518
|
}
|
|
511
519
|
|
|
512
|
-
:is(.sc-dark
|
|
520
|
+
.dark\:sc-text-inherit:is(.sc-dark *) {
|
|
513
521
|
color: inherit;
|
|
514
522
|
}
|
|
515
523
|
|
|
516
|
-
:is(.sc-dark
|
|
524
|
+
.dark\:sc-text-white:is(.sc-dark *) {
|
|
517
525
|
--tw-text-opacity: 1;
|
|
518
526
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
519
527
|
}
|
|
520
528
|
|
|
521
|
-
|
|
529
|
+
.dark\:hover\:sc-bg-neutral-700\/50:hover:is(.sc-dark *) {
|
|
522
530
|
background-color: rgb(64 64 64 / 0.5);
|
|
523
531
|
}
|
|
524
532
|
|
|
@@ -39,6 +39,10 @@
|
|
|
39
39
|
color: #116329;
|
|
40
40
|
background-color: #dafbe1;
|
|
41
41
|
}
|
|
42
|
+
.sc-highlight .ges {
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
font-style: italic;
|
|
45
|
+
}
|
|
42
46
|
.sc-highlight .kc {
|
|
43
47
|
color: #0550ae;
|
|
44
48
|
}
|
|
@@ -153,6 +157,10 @@
|
|
|
153
157
|
color: #aff5b4;
|
|
154
158
|
background-color: #033a16;
|
|
155
159
|
}
|
|
160
|
+
.sc-highlight .ges {
|
|
161
|
+
font-weight: bold;
|
|
162
|
+
font-style: italic;
|
|
163
|
+
}
|
|
156
164
|
.sc-highlight .kc {
|
|
157
165
|
color: #79c0ff;
|
|
158
166
|
}
|
data/lib/showcase/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: showcase-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Pence
|
|
8
8
|
- Kasper Timm Hansen
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rails
|
|
@@ -17,14 +16,14 @@ dependencies:
|
|
|
17
16
|
requirements:
|
|
18
17
|
- - ">="
|
|
19
18
|
- !ruby/object:Gem::Version
|
|
20
|
-
version:
|
|
19
|
+
version: '7.2'
|
|
21
20
|
type: :runtime
|
|
22
21
|
prerelease: false
|
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
23
|
requirements:
|
|
25
24
|
- - ">="
|
|
26
25
|
- !ruby/object:Gem::Version
|
|
27
|
-
version:
|
|
26
|
+
version: '7.2'
|
|
28
27
|
- !ruby/object:Gem::Dependency
|
|
29
28
|
name: tailwindcss-rails
|
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -39,7 +38,6 @@ dependencies:
|
|
|
39
38
|
- - ">="
|
|
40
39
|
- !ruby/object:Gem::Version
|
|
41
40
|
version: '0'
|
|
42
|
-
description:
|
|
43
41
|
email:
|
|
44
42
|
- hey@kaspth.com
|
|
45
43
|
executables: []
|
|
@@ -88,7 +86,6 @@ metadata:
|
|
|
88
86
|
homepage_uri: https://github.com/kaspth/showcase
|
|
89
87
|
source_code_uri: https://github.com/kaspth/showcase
|
|
90
88
|
changelog_uri: https://github.com/kaspth/showcase/blob/main/CHANGELOG.md
|
|
91
|
-
post_install_message:
|
|
92
89
|
rdoc_options: []
|
|
93
90
|
require_paths:
|
|
94
91
|
- lib
|
|
@@ -103,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
103
100
|
- !ruby/object:Gem::Version
|
|
104
101
|
version: '0'
|
|
105
102
|
requirements: []
|
|
106
|
-
rubygems_version: 3.
|
|
107
|
-
signing_key:
|
|
103
|
+
rubygems_version: 3.7.2
|
|
108
104
|
specification_version: 4
|
|
109
105
|
summary: Showcase helps you show off and document your partials, components, view
|
|
110
106
|
helpers and Stimulus controllers.
|