ariadne_view_components 0.0.29-x86_64-linux → 0.0.31-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc6ed83f9a44753fd90b2b8a9ae677aa82b6e9499572f8f29ac48064e0a39eb0
4
- data.tar.gz: bc09ad181c28aa2c03d33e10b79a6128ba5883a3d606be3d128b08bcd39302ec
3
+ metadata.gz: 0bb08a3cb641be48fc91f086ec364d48d6d244d63945a24d0b90e8d6ffcc2280
4
+ data.tar.gz: 3864b2f1f98785b794f5551f809a8cb14aac57822ec21b15e321b9279931fc7d
5
5
  SHA512:
6
- metadata.gz: b18dfa530b1627078c14cbe3e1c8e7294c17defc81389ed421045eb861b7515bdfb2a27e1967d7ce6f316ead815b984bc54e8c9d54893752574a1aae20c4aa0a
7
- data.tar.gz: 86436e686524a383c11f2769a29eac1479aac084621c54ebb08ad0ae52cf9803764d009b8d19417c450f2240729081c6aab34cef078349f9bbad92eec9c7ecd0
6
+ metadata.gz: 79f8f3716a9dede5e4b68d60aa668a8264b1740c5075b1589e35c12bd1309c88b202016cbf65327930b894b36f3bbc57d72f2e0b2d55e43e8dfb90840c7153bf
7
+ data.tar.gz: 66fdb7777c490f46150707996745e1bd34e74145f951acbda2b2187e231132b2c55799163881df5be042a936ba9725759040be1d26607fee320915606f3d3bab
data/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.0.31](https://github.com/yettoapp/ariadne/tree/v0.0.31) (2023-03-21)
4
+
5
+ [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.30...v0.0.31)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Fix form attrs [\#172](https://github.com/yettoapp/ariadne/pull/172) ([gjtorikian](https://github.com/gjtorikian))
10
+
11
+ ## [v0.0.30](https://github.com/yettoapp/ariadne/tree/v0.0.30) (2023-03-08)
12
+
13
+ [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.29...v0.0.30)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - build\(deps\): update puma requirement from ~\> 5.6.4 to ~\> 6.1.1 [\#171](https://github.com/yettoapp/ariadne/pull/171) ([dependabot[bot]](https://github.com/apps/dependabot))
18
+ - Fix grids [\#170](https://github.com/yettoapp/ariadne/pull/170) ([gjtorikian](https://github.com/gjtorikian))
19
+ - Upgrade to VC3 [\#169](https://github.com/yettoapp/ariadne/pull/169) ([gjtorikian](https://github.com/gjtorikian))
20
+ - build\(deps\): bump @tiptap/extension-dropcursor from 2.0.0-beta.219 to 2.0.0-beta.220 [\#168](https://github.com/yettoapp/ariadne/pull/168) ([dependabot[bot]](https://github.com/apps/dependabot))
21
+ - build\(deps\): bump @tiptap/extension-gapcursor from 2.0.0-beta.219 to 2.0.0-beta.220 [\#167](https://github.com/yettoapp/ariadne/pull/167) ([dependabot[bot]](https://github.com/apps/dependabot))
22
+ - build\(deps\): bump @tiptap/extension-text from 2.0.0-beta.219 to 2.0.0-beta.220 [\#166](https://github.com/yettoapp/ariadne/pull/166) ([dependabot[bot]](https://github.com/apps/dependabot))
23
+ - build\(deps\): bump @tiptap/extension-paragraph from 2.0.0-beta.219 to 2.0.0-beta.220 [\#165](https://github.com/yettoapp/ariadne/pull/165) ([dependabot[bot]](https://github.com/apps/dependabot))
24
+ - build\(deps\): bump @tiptap/extension-hard-break from 2.0.0-beta.219 to 2.0.0-beta.220 [\#164](https://github.com/yettoapp/ariadne/pull/164) ([dependabot[bot]](https://github.com/apps/dependabot))
25
+ - build\(deps\): bump @tiptap/extension-document from 2.0.0-beta.219 to 2.0.0-beta.220 [\#163](https://github.com/yettoapp/ariadne/pull/163) ([dependabot[bot]](https://github.com/apps/dependabot))
26
+ - build\(deps\): bump @tiptap/core from 2.0.0-beta.219 to 2.0.0-beta.220 [\#162](https://github.com/yettoapp/ariadne/pull/162) ([dependabot[bot]](https://github.com/apps/dependabot))
27
+ - build\(deps\): bump @tiptap/extension-history from 2.0.0-beta.219 to 2.0.0-beta.220 [\#161](https://github.com/yettoapp/ariadne/pull/161) ([dependabot[bot]](https://github.com/apps/dependabot))
28
+ - build\(deps\): bump @tiptap/extension-dropcursor from 2.0.0-beta.218 to 2.0.0-beta.219 [\#160](https://github.com/yettoapp/ariadne/pull/160) ([dependabot[bot]](https://github.com/apps/dependabot))
29
+ - build\(deps\): bump @tiptap/extension-hard-break from 2.0.0-beta.218 to 2.0.0-beta.219 [\#159](https://github.com/yettoapp/ariadne/pull/159) ([dependabot[bot]](https://github.com/apps/dependabot))
30
+ - build\(deps\): bump @tiptap/extension-history from 2.0.0-beta.218 to 2.0.0-beta.219 [\#158](https://github.com/yettoapp/ariadne/pull/158) ([dependabot[bot]](https://github.com/apps/dependabot))
31
+ - build\(deps\): bump @tiptap/core from 2.0.0-beta.218 to 2.0.0-beta.219 [\#157](https://github.com/yettoapp/ariadne/pull/157) ([dependabot[bot]](https://github.com/apps/dependabot))
32
+ - build\(deps\): bump @tiptap/extension-paragraph from 2.0.0-beta.218 to 2.0.0-beta.219 [\#156](https://github.com/yettoapp/ariadne/pull/156) ([dependabot[bot]](https://github.com/apps/dependabot))
33
+ - build\(deps\): bump @tiptap/extension-gapcursor from 2.0.0-beta.218 to 2.0.0-beta.219 [\#155](https://github.com/yettoapp/ariadne/pull/155) ([dependabot[bot]](https://github.com/apps/dependabot))
34
+ - build\(deps\): bump @tiptap/extension-document from 2.0.0-beta.218 to 2.0.0-beta.219 [\#154](https://github.com/yettoapp/ariadne/pull/154) ([dependabot[bot]](https://github.com/apps/dependabot))
35
+ - build\(deps\): bump @tiptap/extension-text from 2.0.0-beta.218 to 2.0.0-beta.219 [\#153](https://github.com/yettoapp/ariadne/pull/153) ([dependabot[bot]](https://github.com/apps/dependabot))
36
+
3
37
  ## [v0.0.29](https://github.com/yettoapp/ariadne/tree/v0.0.29) (2023-02-21)
4
38
 
5
39
  [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.28...v0.0.29)
@@ -83,12 +83,14 @@ module Ariadne
83
83
  attributes[:href] = href
84
84
  attributes[:method] = method
85
85
 
86
- Ariadne::ButtonComponent.new(tag: tag,
86
+ Ariadne::ButtonComponent.new(
87
+ tag: tag,
87
88
  type: Ariadne::BaseButton::DEFAULT_TYPE,
88
89
  scheme: scheme,
89
90
  size: size,
90
91
  classes: classes,
91
- attributes: attributes)
92
+ attributes: attributes,
93
+ )
92
94
  }
93
95
 
94
96
  # Optional secondary action
@@ -1,8 +1,8 @@
1
1
  <%= render Ariadne::BaseComponent.new(tag: :ul, classes: @classes, attributes: @attributes) do |grid| %>
2
2
  <% items.each do |item| %>
3
3
  <li class="<%= item.classes %>">
4
- <% if item.has_href? %>
5
- <%= render Ariadne::LinkComponent.new(href: item.href, classes: Ariadne::GridComponent::GridItem::DEFAULT_ACTION_LINK_COLORS) do %>
4
+ <% if item.link? %>
5
+ <%= render(item.link) do %>
6
6
  <%= item.entry %>
7
7
  <% end %>
8
8
  <% if item.actions.any? %>
@@ -48,18 +48,17 @@ module Ariadne
48
48
  end
49
49
  }
50
50
 
51
- attr_reader :href, :classes, :attributes
51
+ renders_one :link, lambda { |href:, classes: "", attributes: {}|
52
+ Ariadne::LinkComponent.new(href: href, classes: classes, attributes: attributes)
53
+ }
54
+
55
+ attr_reader :classes, :attributes
52
56
 
53
- def initialize(href: nil, classes: "", attributes: {})
54
- @href = href
57
+ def initialize(classes: "", attributes: {})
55
58
  @classes = class_names(DEFAULT_ITEM_CLASSES, classes)
56
59
  @attributes = attributes
57
60
  end
58
61
 
59
- def has_href?
60
- @href.present?
61
- end
62
-
63
62
  def call
64
63
  render(Ariadne::BaseComponent.new(tag: :div, classes: @classes, attributes: @attributes))
65
64
  end
@@ -25,42 +25,78 @@ module Ariadne
25
25
  SIZE_OPTIONS = SIZE_MAPPINGS.keys
26
26
 
27
27
  PRELOADED_ICONS = [
28
- { name: "bell",
29
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
30
- { name: "check",
31
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
32
- { name: "chevron-down",
33
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
34
- { name: "clipboard",
35
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
36
- { name: "clock",
37
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
38
- { name: "information-circle",
39
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
40
- { name: "dots-horizontal",
41
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
42
- { name: "link",
43
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
44
- { name: "lock-closed",
45
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
46
- { name: "mail",
47
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
48
- { name: "menu",
49
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
50
- { name: "pencil",
51
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
52
- { name: "plus-sm",
53
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
54
- { name: "question-mark-circle",
55
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
56
- { name: "search",
57
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
58
- { name: "search",
59
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
60
- { name: "trash",
61
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
62
- { name: "x-mark",
63
- variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, },
28
+ {
29
+ name: "bell",
30
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
31
+ },
32
+ {
33
+ name: "check",
34
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
35
+ },
36
+ {
37
+ name: "chevron-down",
38
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
39
+ },
40
+ {
41
+ name: "clipboard",
42
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
43
+ },
44
+ {
45
+ name: "clock",
46
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
47
+ },
48
+ {
49
+ name: "information-circle",
50
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
51
+ },
52
+ {
53
+ name: "dots-horizontal",
54
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
55
+ },
56
+ {
57
+ name: "link",
58
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
59
+ },
60
+ {
61
+ name: "lock-closed",
62
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
63
+ },
64
+ {
65
+ name: "mail",
66
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
67
+ },
68
+ {
69
+ name: "menu",
70
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
71
+ },
72
+ {
73
+ name: "pencil",
74
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
75
+ },
76
+ {
77
+ name: "plus-sm",
78
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
79
+ },
80
+ {
81
+ name: "question-mark-circle",
82
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
83
+ },
84
+ {
85
+ name: "search",
86
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
87
+ },
88
+ {
89
+ name: "search",
90
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
91
+ },
92
+ {
93
+ name: "trash",
94
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
95
+ },
96
+ {
97
+ name: "x-mark",
98
+ variant: HeroiconsHelper::Icon::VARIANT_OUTLINE,
99
+ },
64
100
  ].freeze
65
101
 
66
102
  # @example Default
@@ -10,26 +10,16 @@ module Ariadne
10
10
  def ariadne_form_with(model: nil, scope: nil, url: nil, format: nil, classes: "", attributes: {}, **options, &block)
11
11
  options[:class] = class_names(DEFAULT_FORM_CLASSES, options[:class])
12
12
  options[:builder] ||= Ariadne::FormBuilder
13
- options[:html] ||= {}
13
+ options[:html] = attributes
14
14
 
15
- data = options.delete(:data) || {}
16
- attributes = attributes.delete_if do |key, value|
17
- key_name = key.to_s
18
- if key_name.start_with?("data-")
19
- data[key_name.sub(/^data-/, "").to_sym] = value
20
- true
21
- else
22
- false
23
- end
24
- end
25
-
26
- data[:controller] = if data.fetch(:controller, {}).present?
27
- "#{data[:controller]} ariadne-form"
15
+ data_controller = options[:html].fetch(:"data-controller", "")
16
+ options[:html][:"data-controller"] = if data_controller.present?
17
+ "#{data_controller} ariadne-form"
28
18
  else
29
19
  "ariadne-form"
30
20
  end
31
21
 
32
- form_with(model: model, scope: scope, url: url, format: format, data: data, attributes: attributes, **options, &block)
22
+ form_with(model: model, scope: scope, url: url, format: format, **options, &block)
33
23
  end
34
24
  end
35
25
  end
@@ -62,9 +62,12 @@ module Ariadne
62
62
  def compile_command(debug: false, **kwargs)
63
63
  [
64
64
  executable(**kwargs),
65
- "-i", local_path("app/assets/stylesheets/ariadne_view_components.css"),
66
- "-o", "app/assets/builds/ariadne_view_components.css",
67
- "-c", local_path("tailwind.config.js"),
65
+ "-i",
66
+ local_path("app/assets/stylesheets/ariadne_view_components.css"),
67
+ "-o",
68
+ "app/assets/builds/ariadne_view_components.css",
69
+ "-c",
70
+ local_path("tailwind.config.js"),
68
71
  ].tap do |command|
69
72
  command << "--minify" unless debug
70
73
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ariadne
4
4
  module ViewComponents
5
- VERSION = "0.0.29"
5
+ VERSION = "0.0.31"
6
6
  end
7
7
  end
data/lib/tasks/docs.rake CHANGED
@@ -17,7 +17,7 @@ namespace :docs do
17
17
  puts "added absolute path: #{added}"
18
18
  puts "removed absolute path: #{removed}"
19
19
 
20
- unless modified.length.zero?
20
+ if modified.length.nonzero?
21
21
  changed = modified.dup.uniq
22
22
  while (path = changed.shift)
23
23
  puts "Reloading #{path}"
@@ -159,7 +159,7 @@ namespace :docs do
159
159
 
160
160
  params = initialize_method.tags(:param)
161
161
 
162
- errors << { component.name => { arguments: "No argument documentation found" } } unless params.any?
162
+ errors << { component.name => { arguments: "No argument documentation found" } } if params.none?
163
163
 
164
164
  f.puts
165
165
  f.puts("## Arguments")
@@ -279,7 +279,7 @@ namespace :docs do
279
279
 
280
280
  File.open("static/classes.yml", "w") do |f|
281
281
  non_ariadne_classes = classes_found_in_examples.reject { |c| c =~ /(?:ariadne|tiptap)/ }.uniq
282
- unless non_ariadne_classes.length.zero?
282
+ if non_ariadne_classes.length.nonzero?
283
283
  puts "==============================================="
284
284
  puts "===================== ERRORS =================="
285
285
  puts "===============================================\n\n"
data/static/arguments.yml CHANGED
@@ -174,6 +174,10 @@
174
174
  type: String
175
175
  default: N/A
176
176
  description: A label to introduce these tabs for screen readers.
177
+ - name: hidden_fields
178
+ type: "[String]"
179
+ default: "`[]`"
180
+ description: An array of arrays of additional (hidden) fields to add to the form.
177
181
  - name: classes
178
182
  type: String
179
183
  default: '`""`'
data/static/classes.yml CHANGED
@@ -117,6 +117,7 @@
117
117
  - ".ariadne-ring-opacity-5"
118
118
  - ".ariadne-text-gray-700"
119
119
  - ".ariadne-text-red-500"
120
+ - ".ariadne-mt-0"
120
121
  - ".ariadne-text-slate-700"
121
122
  - ".ariadne-p-4"
122
123
  - ".ariadne-bg-blue-50"
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.29
4
+ version: 0.0.31
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Garen J. Torikian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-21 00:00:00.000000000 Z
11
+ date: 2023-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tailwind_merge
@@ -24,6 +24,7 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.1'
27
+ force_ruby_platform: false
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: actionview
29
30
  requirement: !ruby/object:Gem::Requirement
@@ -78,6 +79,7 @@ dependencies:
78
79
  - - "~>"
79
80
  - !ruby/object:Gem::Version
80
81
  version: '0.6'
82
+ force_ruby_platform: false
81
83
  - !ruby/object:Gem::Dependency
82
84
  name: view_component
83
85
  requirement: !ruby/object:Gem::Requirement
@@ -87,7 +89,7 @@ dependencies:
87
89
  version: '2.0'
88
90
  - - "<"
89
91
  - !ruby/object:Gem::Version
90
- version: '3.0'
92
+ version: '4.0'
91
93
  type: :runtime
92
94
  prerelease: false
93
95
  version_requirements: !ruby/object:Gem::Requirement
@@ -97,10 +99,10 @@ dependencies:
97
99
  version: '2.0'
98
100
  - - "<"
99
101
  - !ruby/object:Gem::Version
100
- version: '3.0'
102
+ version: '4.0'
101
103
  description:
102
104
  email:
103
- - gjtorikian@yettoapp.com
105
+ - gjtorikian@yetto.app
104
106
  executables:
105
107
  - tailwindcss
106
108
  extensions: []
@@ -247,7 +249,7 @@ files:
247
249
  - static/statuses.json
248
250
  - static/tailwindcss.yml
249
251
  - tailwind.config.js
250
- homepage: https://github.com/yettoapp/ariadne/view_components
252
+ homepage: https://github.com/yettoapp/ariadne
251
253
  licenses:
252
254
  - MIT
253
255
  metadata:
@@ -258,19 +260,16 @@ require_paths:
258
260
  - lib
259
261
  required_ruby_version: !ruby/object:Gem::Requirement
260
262
  requirements:
261
- - - ">="
262
- - !ruby/object:Gem::Version
263
- version: '3.1'
264
- - - "<"
263
+ - - "~>"
265
264
  - !ruby/object:Gem::Version
266
- version: '4.0'
265
+ version: '3.2'
267
266
  required_rubygems_version: !ruby/object:Gem::Requirement
268
267
  requirements:
269
268
  - - ">="
270
269
  - !ruby/object:Gem::Version
271
270
  version: '0'
272
271
  requirements: []
273
- rubygems_version: 3.3.26
272
+ rubygems_version: 3.4.6
274
273
  signing_key:
275
274
  specification_version: 4
276
275
  summary: ViewComponents for the Ariadne Design System