ariadne_view_components 0.0.71 → 0.0.73
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/app/components/ariadne/layout/grid/component.html.erb +2 -4
- data/app/components/ariadne/layout/grid/component.rb +15 -2
- data/app/components/ariadne/layout/grid/item/component.html.erb +12 -0
- data/app/components/ariadne/layout/grid/item/component.rb +41 -0
- data/app/components/ariadne/turbo/frame/component.rb +1 -1
- data/app/components/ariadne/turbo/stream_action/component.rb +1 -1
- data/lib/ariadne/view_components/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a463fe5b62ac0fc252374f7053c81cd5a7a598d89dfa6b270632296e0f21c359
|
4
|
+
data.tar.gz: 4bd1f06bd664c31d4da6e69b1ad84a71afd8ef8c85c6b96f9d38f2b3fa75323d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21e0419395be13fba9b2c9704a5ba80c7630bca497a2cad91115bd9bb6f0184adee8238518374f32c47bbf64af5714127f22dc9818c6357a9907da7d4ac8edf9
|
7
|
+
data.tar.gz: 7ae3ed92d9408ef991f0bd644e63822eb0bc5708cd032637c5e3d53845e9f20928f67751db5c315fe96ab1ed25ec4c67123c2fd0c269282e6ff6f9dd01fcc4da
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [v0.0.72] - 17-04-2024
|
2
|
+
**Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.71...v0.0.72
|
3
|
+
## [v0.0.71] - 17-04-2024
|
4
|
+
## What's Changed
|
5
|
+
* [auto-browserslist] Update Browserslist db by @sisyphusbot in https://github.com/yettoapp/ariadne/pull/479
|
6
|
+
|
7
|
+
|
8
|
+
**Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.70...v0.0.71
|
1
9
|
## [v0.0.70] - 09-04-2024
|
2
10
|
**Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.69...v0.0.70
|
3
11
|
## [v0.0.69] - 05-04-2024
|
@@ -1,7 +1,5 @@
|
|
1
|
-
<ul class="
|
1
|
+
<ul class="<%= html_attrs[:class] %>" <%= html_attributes %>>
|
2
2
|
<% items.each do |item| %>
|
3
|
-
|
4
|
-
<%= item %>
|
5
|
-
</li>
|
3
|
+
<%= render item %>
|
6
4
|
<% end %>
|
7
5
|
</ul>
|
@@ -5,10 +5,23 @@ module Ariadne
|
|
5
5
|
module Layout
|
6
6
|
module Grid
|
7
7
|
class Component < Ariadne::BaseComponent
|
8
|
-
renders_many :items,
|
8
|
+
renders_many :items, Ariadne::Layout::Grid::Item::Component
|
9
9
|
|
10
10
|
accepts_html_attributes do |html_attrs|
|
11
|
-
html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style(:
|
11
|
+
html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style(:grid), html_attrs[:class]].join(" "))
|
12
|
+
end
|
13
|
+
|
14
|
+
style :grid do
|
15
|
+
base do
|
16
|
+
[
|
17
|
+
"ariadne-grid",
|
18
|
+
"ariadne-grid-cols-1",
|
19
|
+
"ariadne-gap-6",
|
20
|
+
"sm:ariadne-grid-cols-2",
|
21
|
+
"md:ariadne-grid-cols-3",
|
22
|
+
"lg:ariadne-grid-cols-4",
|
23
|
+
]
|
24
|
+
end
|
12
25
|
end
|
13
26
|
|
14
27
|
style :item do
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
<% if html_attrs[:class].present? %>
|
3
|
+
<li class="ariadne-contents">
|
4
|
+
<div class="<%= html_attrs[:class] %>" <%= html_attributes %>>
|
5
|
+
<%= content %>
|
6
|
+
</div>
|
7
|
+
</li>
|
8
|
+
<% else %>
|
9
|
+
<li class="ariadne-contents" <%= html_attributes %>>
|
10
|
+
<%= content %>
|
11
|
+
</li>
|
12
|
+
<% end %>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Ariadne
|
5
|
+
module Layout
|
6
|
+
module Grid
|
7
|
+
module Item
|
8
|
+
class Component < Ariadne::BaseComponent
|
9
|
+
# TODO: make this standard
|
10
|
+
accepts_html_attributes do |html_attrs|
|
11
|
+
html_attrs[:class] = if html_attrs[:class] == :remove
|
12
|
+
"" # user asked for no styling
|
13
|
+
else
|
14
|
+
Ariadne::ViewComponents.tailwind_merger.merge([style(:item), html_attrs[:class]].join(" "))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
style :item do
|
19
|
+
base do
|
20
|
+
[
|
21
|
+
"ariadne-flex",
|
22
|
+
"ariadne-flex-col",
|
23
|
+
"ariadne-gap-3",
|
24
|
+
"ariadne-p-3",
|
25
|
+
"ariadne-ps-4",
|
26
|
+
"ariadne-rounded-xl",
|
27
|
+
"ariadne-border",
|
28
|
+
"ariadne-border-black/10",
|
29
|
+
"dark:ariadne-border-white/10",
|
30
|
+
"ariadne-bg-white",
|
31
|
+
"dark:ariadne-bg-zinc-950",
|
32
|
+
"hover:ariadne-shadow-lg",
|
33
|
+
"ariadne-transition-shadow",
|
34
|
+
]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ariadne_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.73
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tailwind_merge
|
@@ -159,6 +159,8 @@ files:
|
|
159
159
|
- app/components/ariadne/form/validation_message/component.rb
|
160
160
|
- app/components/ariadne/layout/grid/component.html.erb
|
161
161
|
- app/components/ariadne/layout/grid/component.rb
|
162
|
+
- app/components/ariadne/layout/grid/item/component.html.erb
|
163
|
+
- app/components/ariadne/layout/grid/item/component.rb
|
162
164
|
- app/components/ariadne/layout/narrow/component.html.erb
|
163
165
|
- app/components/ariadne/layout/narrow/component.rb
|
164
166
|
- app/components/ariadne/layout/nav_bar/component.css
|