kiso 0.2.0.pre → 0.2.2.pre
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/CHANGELOG.md +16 -1
- data/app/helpers/kiso/component_helper.rb +10 -0
- data/lib/kiso/engine.rb +45 -0
- data/lib/kiso/propshaft_tailwind_stub_filter.rb +13 -0
- data/lib/kiso/themes/dashboard.rb +3 -3
- data/lib/kiso/themes/input_otp.rb +1 -1
- data/lib/kiso/version.rb +1 -1
- data/lib/kiso.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cfca4f2a1e45d61e45de52c22a96428de18c04643860ea07c0913d2c29d3c397
|
|
4
|
+
data.tar.gz: e46ba40a7fe00c0818958742e745058e6cec5990e2b195df085cc2b3e8242477
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ca9dcd4857e5f4eb41086239901a6c347314432ba75189372642dba08d6975fe9caa5466635e94e013f26c858a84ff5af64e2701dd75a3ef946e560b3025011
|
|
7
|
+
data.tar.gz: 75689ce3b7a06d3377d74ed37f7d5fe1d44c95d19549b6992e5c66bd3b78a8b07e924bbc2ba26a15f02b861f74986565c124369fb7648de5b5655b060dd2d4f6
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.2.pre] - 2026-03-03
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Dashboard layout rendering — components called without a block inside a layout (e.g., sidebar toggle, collapse) would capture the entire page template via ERB yield bubbling, breaking the dashboard grid. The `kui()` helper now passes an empty proc to prevent yield from reaching the layout.
|
|
15
|
+
- Dashboard toggle and collapse icon sizing — SVG icons now render at the correct size via `[&>svg]:size-4`.
|
|
16
|
+
|
|
17
|
+
## [0.2.1.pre] - 2026-03-03
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Propshaft `stylesheet_link_tag :app` compatibility — the Rails 8.1 default `:app` symbol caused Propshaft to serve `tailwindcss-rails` engine CSS stubs directly to the browser, resulting in 404 errors for absolute filesystem paths. Kiso now filters these build-time intermediates from Propshaft's stylesheet resolution automatically. Host apps using either `:app` or explicit `"tailwind"` work correctly.
|
|
22
|
+
|
|
10
23
|
## [0.2.0.pre] - 2026-03-03
|
|
11
24
|
|
|
12
25
|
### Added
|
|
@@ -55,7 +68,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
55
68
|
- Lookbook component previews
|
|
56
69
|
- Bridgetown documentation site
|
|
57
70
|
|
|
58
|
-
[Unreleased]: https://github.com/steveclarke/kiso/compare/v0.2.
|
|
71
|
+
[Unreleased]: https://github.com/steveclarke/kiso/compare/v0.2.2.pre...HEAD
|
|
72
|
+
[0.2.2.pre]: https://github.com/steveclarke/kiso/releases/tag/v0.2.2.pre
|
|
73
|
+
[0.2.1.pre]: https://github.com/steveclarke/kiso/releases/tag/v0.2.1.pre
|
|
59
74
|
[0.2.0.pre]: https://github.com/steveclarke/kiso/releases/tag/v0.2.0.pre
|
|
60
75
|
[0.1.1.pre]: https://github.com/steveclarke/kiso/releases/tag/v0.1.1.pre
|
|
61
76
|
[0.1.0.pre]: https://github.com/steveclarke/kiso/releases/tag/v0.1.0.pre
|
|
@@ -30,6 +30,16 @@ module Kiso
|
|
|
30
30
|
"kiso/components/#{component}"
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# Prevent yield from bubbling up the ERB rendering chain when no block
|
|
34
|
+
# is passed. Without this, partials that use `capture { yield }.presence`
|
|
35
|
+
# to support optional block overrides (e.g., toggle/collapse/separator)
|
|
36
|
+
# would have their `yield` bubble through nested content_tag blocks all
|
|
37
|
+
# the way to the layout's `<%= yield %>`, capturing the entire page
|
|
38
|
+
# template content. An explicit empty proc gives `yield` something to
|
|
39
|
+
# call, returning empty string → `.presence` returns nil → default
|
|
40
|
+
# content renders correctly.
|
|
41
|
+
block ||= proc {}
|
|
42
|
+
|
|
33
43
|
if collection
|
|
34
44
|
render partial: path, collection: collection, locals: kwargs, &block
|
|
35
45
|
else
|
data/lib/kiso/engine.rb
CHANGED
|
@@ -51,6 +51,51 @@ module Kiso
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
# Filters tailwindcss-rails engine CSS stubs from Propshaft's :app stylesheet
|
|
55
|
+
# resolution so they are never served to the browser.
|
|
56
|
+
#
|
|
57
|
+
# Background: tailwindcss-rails generates intermediate stub files in the host
|
|
58
|
+
# app at app/assets/builds/tailwind/<engine_name>.css. Each stub contains a
|
|
59
|
+
# single @import with an absolute filesystem path:
|
|
60
|
+
#
|
|
61
|
+
# @import "/path/to/gems/kiso-0.2.0/app/assets/tailwind/kiso/engine.css";
|
|
62
|
+
#
|
|
63
|
+
# The Tailwind CLI resolves this @import at build time and inlines the engine
|
|
64
|
+
# CSS into the compiled output (app/assets/builds/tailwind.css). The stubs are
|
|
65
|
+
# build-time intermediates — they should never reach the browser.
|
|
66
|
+
#
|
|
67
|
+
# The problem: Propshaft's stylesheet_link_tag :app (the Rails 8.1 default)
|
|
68
|
+
# globs app/assets/**/*.css and generates a <link> tag for every match. This
|
|
69
|
+
# picks up the stubs alongside the compiled tailwind.css. The browser then
|
|
70
|
+
# receives a stub, encounters the @import with a filesystem path, interprets
|
|
71
|
+
# it as a URL, and gets a 404.
|
|
72
|
+
#
|
|
73
|
+
# Propshaft's excluded_paths config only removes top-level directories from
|
|
74
|
+
# the load path — it can't exclude files within a load path directory. The
|
|
75
|
+
# stubs live inside app/assets/builds/ (a single load path entry), so
|
|
76
|
+
# excluded_paths can't help.
|
|
77
|
+
#
|
|
78
|
+
# This fix prepends a filter onto Propshaft::Helper#app_stylesheets_paths to
|
|
79
|
+
# reject any asset whose logical path starts with "tailwind/" — these are
|
|
80
|
+
# always engine stubs generated by tailwindcss-rails, never user CSS.
|
|
81
|
+
# The compiled output is "tailwind.css" (no slash), so it passes through.
|
|
82
|
+
#
|
|
83
|
+
# This affects ALL engine stubs, not just Kiso's, because the problem is
|
|
84
|
+
# systemic to how tailwindcss-rails engine bundling interacts with Propshaft's
|
|
85
|
+
# :app resolution.
|
|
86
|
+
#
|
|
87
|
+
# See: propshaft-1.3.1 lib/propshaft/helper.rb#app_stylesheets_paths
|
|
88
|
+
# See: tailwindcss-rails lib/tailwindcss/engines.rb (stub generation)
|
|
89
|
+
# See: tailwindcss-rails lib/tailwindcss/engine.rb (excludes app/assets/tailwind
|
|
90
|
+
# but not app/assets/builds/tailwind)
|
|
91
|
+
initializer "kiso.filter_tailwind_stubs" do
|
|
92
|
+
ActiveSupport.on_load(:action_view) do
|
|
93
|
+
if defined?(Propshaft::Helper)
|
|
94
|
+
Propshaft::Helper.prepend(Kiso::PropshaftTailwindStubFilter)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
54
99
|
# Registers Kiso's component previews with Lookbook when available.
|
|
55
100
|
initializer "kiso.lookbook", after: :load_config_initializers do
|
|
56
101
|
if defined?(Lookbook)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Kiso
|
|
2
|
+
# Filters tailwindcss-rails engine CSS stubs from Propshaft's :app stylesheet
|
|
3
|
+
# resolution. Prepended onto Propshaft::Helper by the engine initializer.
|
|
4
|
+
#
|
|
5
|
+
# Engine stubs have logical paths like "tailwind/kiso.css" — always under the
|
|
6
|
+
# "tailwind/" prefix. The compiled output is "tailwind.css" (no slash) and
|
|
7
|
+
# passes through unaffected.
|
|
8
|
+
module PropshaftTailwindStubFilter
|
|
9
|
+
def app_stylesheets_paths
|
|
10
|
+
super.reject { |path| path.start_with?("tailwind/") }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -9,7 +9,7 @@ module Kiso
|
|
|
9
9
|
)
|
|
10
10
|
|
|
11
11
|
DashboardNavbarToggle = ClassVariants.build(
|
|
12
|
-
base: "flex items-center justify-center w-8 h-8 rounded-md text-foreground/50 hover:text-foreground hover:bg-accent transition-colors duration-150 shrink-0"
|
|
12
|
+
base: "flex items-center justify-center w-8 h-8 rounded-md text-foreground/50 hover:text-foreground hover:bg-accent transition-colors duration-150 shrink-0 [&>svg]:size-4"
|
|
13
13
|
)
|
|
14
14
|
|
|
15
15
|
DashboardSidebar = ClassVariants.build(
|
|
@@ -29,11 +29,11 @@ module Kiso
|
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
DashboardSidebarToggle = ClassVariants.build(
|
|
32
|
-
base: "lg:hidden flex items-center justify-center w-8 h-8 rounded-md text-foreground/50 hover:text-foreground hover:bg-accent transition-colors duration-150 shrink-0 cursor-pointer"
|
|
32
|
+
base: "lg:hidden flex items-center justify-center w-8 h-8 rounded-md text-foreground/50 hover:text-foreground hover:bg-accent transition-colors duration-150 shrink-0 cursor-pointer [&>svg]:size-4"
|
|
33
33
|
)
|
|
34
34
|
|
|
35
35
|
DashboardSidebarCollapse = ClassVariants.build(
|
|
36
|
-
base: "hidden lg:flex items-center justify-center w-8 h-8 rounded-md text-foreground/50 hover:text-foreground hover:bg-accent transition-colors duration-150 shrink-0 cursor-pointer"
|
|
36
|
+
base: "hidden lg:flex items-center justify-center w-8 h-8 rounded-md text-foreground/50 hover:text-foreground hover:bg-accent transition-colors duration-150 shrink-0 cursor-pointer [&>svg]:size-4"
|
|
37
37
|
)
|
|
38
38
|
|
|
39
39
|
DashboardToolbar = ClassVariants.build(
|
|
@@ -20,7 +20,7 @@ module Kiso
|
|
|
20
20
|
# @example
|
|
21
21
|
# InputOtpSlot.render(size: :md)
|
|
22
22
|
InputOtpSlot = ClassVariants.build(
|
|
23
|
-
base: "border-
|
|
23
|
+
base: "border-border relative flex items-center justify-center " \
|
|
24
24
|
"border-y border-r shadow-xs transition-all outline-none " \
|
|
25
25
|
"first:rounded-l-md first:border-l last:rounded-r-md " \
|
|
26
26
|
"data-[active=true]:z-10 data-[active=true]:border-primary " \
|
data/lib/kiso/version.rb
CHANGED
data/lib/kiso.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kiso
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2.pre
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steve Clarke
|
|
@@ -268,6 +268,7 @@ files:
|
|
|
268
268
|
- lib/kiso/cli/make.rb
|
|
269
269
|
- lib/kiso/configuration.rb
|
|
270
270
|
- lib/kiso/engine.rb
|
|
271
|
+
- lib/kiso/propshaft_tailwind_stub_filter.rb
|
|
271
272
|
- lib/kiso/theme_overrides.rb
|
|
272
273
|
- lib/kiso/themes/alert.rb
|
|
273
274
|
- lib/kiso/themes/avatar.rb
|