ariadne_view_components 0.0.71 → 0.0.73

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: 266cf76e3cfee14a8c29480e5f77d694158b509daefef6f2d0d2aa0fa84ea5f9
4
- data.tar.gz: 3b02dddcef359c630f2c313ba588dcaaafacd28b555e2039102c33ff71cf34b0
3
+ metadata.gz: a463fe5b62ac0fc252374f7053c81cd5a7a598d89dfa6b270632296e0f21c359
4
+ data.tar.gz: 4bd1f06bd664c31d4da6e69b1ad84a71afd8ef8c85c6b96f9d38f2b3fa75323d
5
5
  SHA512:
6
- metadata.gz: d483cf4c463f700b8806825fff0564d8c349b14760f0f6b036cd382e4d4e860c09f2ab1c30199c59f42068167fe7c0857c8f2151681ee21a7f4cc1e9312d5630
7
- data.tar.gz: 3c9ed87a47f37aa6e3cb03ee813fcc9159bab2f573b96e1d0a0fef9b3132ca0ab56594f29d68ecef561db903d40ca29683b9501081cd6dd306924d1818b0bb89
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="ariadne-grid ariadne-grid-cols-1 ariadne-gap-6 sm:ariadne-grid-cols-2 md:ariadne-grid-cols-3 lg:ariadne-grid-cols-4">
1
+ <ul class="<%= html_attrs[:class] %>" <%= html_attributes %>>
2
2
  <% items.each do |item| %>
3
- <li class="<%= html_attrs[:class] %>" <%= html_attributes %>>
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, BaseComponent::ACCEPT_ANYTHING
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(:item), html_attrs[:class]].join(" "))
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
@@ -1,7 +1,7 @@
1
1
  # typed: false
2
2
  # frozen_string_literal: true
3
3
 
4
- module UI
4
+ module Ariadne
5
5
  module Turbo
6
6
  module Frame
7
7
  class Component < ApplicationViewComponent
@@ -1,7 +1,7 @@
1
1
  # typed: false
2
2
  # frozen_string_literal: true
3
3
 
4
- module UI
4
+ module Ariadne
5
5
  module Turbo
6
6
  module StreamAction
7
7
  class Component < ApplicationViewComponent
@@ -3,6 +3,6 @@
3
3
  # :nocov:
4
4
  module Ariadne
5
5
  module ViewComponents
6
- VERSION = "0.0.71"
6
+ VERSION = "0.0.73"
7
7
  end
8
8
  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.71
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-17 00:00:00.000000000 Z
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