ariadne_view_components 0.0.86.3 → 0.0.86.5
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 +4 -0
- data/app/components/ariadne/form/toggle/component.html.erb +1 -1
- data/app/components/ariadne/form/toggle/component.rb +3 -3
- data/app/components/ariadne/ui/list/component.html.erb +1 -6
- data/app/components/ariadne/ui/list/component.rb +8 -31
- data/app/components/ariadne/ui/list/item/component.html.erb +5 -0
- data/app/components/ariadne/ui/list/item/component.rb +45 -0
- 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: 2c7bf1abd34d8698af4024945595f8d401d56ee7dd8cdccfc045ce94ebbc4b25
|
4
|
+
data.tar.gz: 073f3ca79494ed5c6860ccdae73a27e5ba9150983c22bf36791248f71e47653b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30ab3ee33eea24f06a3d8999ffddee8d118f92fe5bc05a8ffd7c1490724b04f1ecfb66b316c64fb4bdc939a65c817785a0b8d87d7f31af9bae3c199323e4d134
|
7
|
+
data.tar.gz: 22cec4f4a337d2386d958d2e271647a21366783db32142d96883edaa2a48bc47f6789d7188c2bebaba13d68252a43e00d6bd970bf465ce4bc248c7fff9e7a359
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# [v0.0.86.5] - 11-08-2024
|
2
|
+
**Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.86.4...v0.0.86.5
|
3
|
+
# [v0.0.86.4] - 09-08-2024
|
4
|
+
**Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.86.3...v0.0.86.4
|
1
5
|
# [v0.0.86.3] - 08-08-2024
|
2
6
|
**Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.86.2...v0.0.86.3
|
3
7
|
# [v0.0.86.2] - 08-08-2024
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<label class="<%= style(:label, reversed:) %>">
|
2
|
-
<input type="checkbox" class="
|
2
|
+
<input type="checkbox" class="<%= html_attrs[:class] %>" <%= html_attributes %>>
|
3
3
|
<span class="<%= style(size:) %>"></span>
|
4
4
|
<span class="ariadne-text-sm ariadne-font-medium ariadne-text-gray-900 dark:ariadne-text-gray-300">
|
5
5
|
<%= content %>
|
@@ -20,7 +20,7 @@ module Ariadne
|
|
20
20
|
option :enabled, default: proc { true }
|
21
21
|
|
22
22
|
accepts_html_attributes do |html_attrs|
|
23
|
-
html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([
|
23
|
+
html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge(["ariadne-sr-only ariadne-peer", html_attrs[:class]].join(" "))
|
24
24
|
|
25
25
|
if @checked
|
26
26
|
html_attrs[:checked] = @checked
|
@@ -29,9 +29,9 @@ module Ariadne
|
|
29
29
|
|
30
30
|
html_attrs[:data] ||= {}
|
31
31
|
html_attrs[:data] = {
|
32
|
-
controller: "#{stimulus_name} #{html_attrs[:data]
|
32
|
+
controller: "#{stimulus_name} #{html_attrs[:data][:controller]}".rstrip,
|
33
33
|
"#{stimulus_name}-target": "toggle",
|
34
|
-
action: "click->#{stimulus_name}#toggle #{html_attrs[:data]
|
34
|
+
action: "click->#{stimulus_name}#toggle #{html_attrs[:data][:action]}".rstrip,
|
35
35
|
}.merge(html_attrs[:data])
|
36
36
|
end
|
37
37
|
|
@@ -23,12 +23,7 @@
|
|
23
23
|
</div>
|
24
24
|
<% end %>
|
25
25
|
<% items.each do |item| %>
|
26
|
-
|
27
|
-
<%= 'role="menuitem"' if as_menu %>
|
28
|
-
class="<%= style(:item) %>"
|
29
|
-
data-<%= stimulus_name %>-target="searchString">
|
30
|
-
<div class="ariadne-relative ariadne-flex ariadne-w-full"><%= item %></div>
|
31
|
-
</div>
|
26
|
+
<%= item %>
|
32
27
|
<% end %>
|
33
28
|
<div class="ariadne-text-center ariadne-hidden" data-<%= stimulus_name %>-target="emptyRoot">
|
34
29
|
<span class="ariadne-py-3 ariadne-text-md ariadne-text-zinc-600 dark:ariadne-text-zinc-400"><%= @empty_placeholder %> </span>
|
@@ -5,8 +5,6 @@ module Ariadne
|
|
5
5
|
module UI
|
6
6
|
module List
|
7
7
|
class Component < Ariadne::BaseComponent
|
8
|
-
option :as_menu, default: proc { false }
|
9
|
-
|
10
8
|
option :size, default: proc { :md }
|
11
9
|
|
12
10
|
renders_one :filter_field, lambda { |**options|
|
@@ -59,7 +57,7 @@ module Ariadne
|
|
59
57
|
Ariadne::UI::Link::Component.new(**options)
|
60
58
|
}
|
61
59
|
|
62
|
-
renders_many :items,
|
60
|
+
renders_many :items, Ariadne::UI::List::Item::Component
|
63
61
|
|
64
62
|
accepts_html_attributes do |html_attrs|
|
65
63
|
html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style, html_attrs[:class]].join(" "))
|
@@ -68,6 +66,13 @@ module Ariadne
|
|
68
66
|
}
|
69
67
|
end
|
70
68
|
|
69
|
+
SHARED_BACKGROUND_COLORS = [
|
70
|
+
"hover:ariadne-bg-blue-100",
|
71
|
+
"hover:dark:ariadne-bg-blue-800",
|
72
|
+
"focus-within:ariadne-bg-blue-100",
|
73
|
+
"focus-within:dark:ariadne-bg-blue-800",
|
74
|
+
]
|
75
|
+
|
71
76
|
style do
|
72
77
|
base do
|
73
78
|
[
|
@@ -95,34 +100,6 @@ module Ariadne
|
|
95
100
|
]
|
96
101
|
end
|
97
102
|
end
|
98
|
-
|
99
|
-
SHARED_BACKGROUND_COLORS = [
|
100
|
-
"hover:ariadne-bg-blue-100",
|
101
|
-
"hover:dark:ariadne-bg-blue-800",
|
102
|
-
"focus-within:ariadne-bg-blue-100",
|
103
|
-
"focus-within:dark:ariadne-bg-blue-800",
|
104
|
-
]
|
105
|
-
style :item do
|
106
|
-
base do
|
107
|
-
[
|
108
|
-
# "ariadne-gap-0.5",
|
109
|
-
"ariadne-items-center",
|
110
|
-
"ariadne-rounded",
|
111
|
-
"!ariadne-ring-0",
|
112
|
-
"ariadne-cursor-default",
|
113
|
-
"ariadne-select-none",
|
114
|
-
"ariadne-items-center",
|
115
|
-
"ariadne-rounded-sm",
|
116
|
-
"ariadne-px-2",
|
117
|
-
# "ariadne-py-1.5",
|
118
|
-
"ariadne-text-sm",
|
119
|
-
"ariadne-outline-none",
|
120
|
-
"ariadne-transition-colors",
|
121
|
-
"disabled:ariadne-pointer-events-none",
|
122
|
-
"disabled:ariadne-opacity-50",
|
123
|
-
].concat(SHARED_BACKGROUND_COLORS)
|
124
|
-
end
|
125
|
-
end
|
126
103
|
end
|
127
104
|
end
|
128
105
|
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Ariadne
|
5
|
+
module UI
|
6
|
+
module List
|
7
|
+
module Item
|
8
|
+
class Component < Ariadne::BaseComponent
|
9
|
+
option :as_menu, default: proc { false }
|
10
|
+
|
11
|
+
accepts_html_attributes do |html_attrs|
|
12
|
+
html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style(:item), html_attrs[:class]].join(" "))
|
13
|
+
|
14
|
+
html_attrs[:data] ||= {}
|
15
|
+
html_attrs[:data] = {
|
16
|
+
"#{stimulus_name}-target": "searchString",
|
17
|
+
}.merge(html_attrs[:data])
|
18
|
+
end
|
19
|
+
|
20
|
+
style :item do
|
21
|
+
base do
|
22
|
+
[
|
23
|
+
# "ariadne-gap-0.5",
|
24
|
+
"ariadne-items-center",
|
25
|
+
"ariadne-rounded",
|
26
|
+
"!ariadne-ring-0",
|
27
|
+
"ariadne-cursor-default",
|
28
|
+
"ariadne-select-none",
|
29
|
+
"ariadne-items-center",
|
30
|
+
"ariadne-rounded-sm",
|
31
|
+
"ariadne-px-2",
|
32
|
+
# "ariadne-py-1.5",
|
33
|
+
"ariadne-text-sm",
|
34
|
+
"ariadne-outline-none",
|
35
|
+
"ariadne-transition-colors",
|
36
|
+
"disabled:ariadne-pointer-events-none",
|
37
|
+
"disabled:ariadne-opacity-50",
|
38
|
+
].concat(Ariadne::UI::List::Component::SHARED_BACKGROUND_COLORS)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
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.86.
|
4
|
+
version: 0.0.86.5
|
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-08-
|
11
|
+
date: 2024-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tailwind_merge
|
@@ -236,6 +236,8 @@ files:
|
|
236
236
|
- app/components/ariadne/ui/list/component.html.erb
|
237
237
|
- app/components/ariadne/ui/list/component.rb
|
238
238
|
- app/components/ariadne/ui/list/component.ts
|
239
|
+
- app/components/ariadne/ui/list/item/component.html.erb
|
240
|
+
- app/components/ariadne/ui/list/item/component.rb
|
239
241
|
- app/components/ariadne/ui/overlay/component.html.erb
|
240
242
|
- app/components/ariadne/ui/overlay/component.rb
|
241
243
|
- app/components/ariadne/ui/overlay/component.ts
|