ariadne_view_components 0.0.29 → 0.0.30

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: 3aad73fe39a0f2bd10df4d2a29ad133d9b6047aaac7c07787c6bad69061edb80
4
- data.tar.gz: 72f7979de2705e1daaeed9e8ded80c2bf0c88f2d57ad44e7856b7a1a2155acc3
3
+ metadata.gz: 62d09d6f19249d602502227eb39661c309260634b3d2fb903446c4b8e4241c56
4
+ data.tar.gz: f7038c3b4790118829a6663d2a34f52bbbdf515106c3b6ef587d502f3be22dfb
5
5
  SHA512:
6
- metadata.gz: 50c2349075778f08c96c243e0f7488dda4abeeb4bc3ca2679765e118ad02be33d38f48d70b9bde7908082f66be355edd4ccd048908eab9cdd0e566f738b8d63a
7
- data.tar.gz: 0a7fe86d5335c079f2a888e173149006e821f64ef34c897ac3b4ca55588d80da6fe220f1c8aeac0a1796f3b72efdf955c07b56b17d7d4109566fe79202564d7c
6
+ metadata.gz: 4b0c3bb0fdd229e7f4943e8bf8e2071cf91ee3a2266437f52a31d72627de2c85aec0bb8c92e8d4da373ac536e64c612c09d7d039ab6d614122ca99a46f6e8343
7
+ data.tar.gz: 722cafc830c605d259ffc16c0013a0af9a42907fd6218978324b0fb726f393acc39ad5d6e0ecc6d48db3454ebb624f32bbd8966b380c031f4addc298d7544be5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.0.30](https://github.com/yettoapp/ariadne/tree/v0.0.30) (2023-03-08)
4
+
5
+ [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.29...v0.0.30)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - 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))
10
+ - Fix grids [\#170](https://github.com/yettoapp/ariadne/pull/170) ([gjtorikian](https://github.com/gjtorikian))
11
+ - Upgrade to VC3 [\#169](https://github.com/yettoapp/ariadne/pull/169) ([gjtorikian](https://github.com/gjtorikian))
12
+ - 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))
13
+ - 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))
14
+ - 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))
15
+ - 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))
16
+ - 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))
17
+ - 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))
18
+ - 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))
19
+ - 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))
20
+ - 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))
21
+ - 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))
22
+ - 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))
23
+ - 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))
24
+ - 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))
25
+ - 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))
26
+ - 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))
27
+ - 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))
28
+
3
29
  ## [v0.0.29](https://github.com/yettoapp/ariadne/tree/v0.0.29) (2023-02-21)
4
30
 
5
31
  [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
@@ -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.30"
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.30
5
5
  platform: ruby
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-08 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: []
@@ -246,7 +248,7 @@ files:
246
248
  - static/statuses.json
247
249
  - static/tailwindcss.yml
248
250
  - tailwind.config.js
249
- homepage: https://github.com/yettoapp/ariadne/view_components
251
+ homepage: https://github.com/yettoapp/ariadne
250
252
  licenses:
251
253
  - MIT
252
254
  metadata:
@@ -257,19 +259,16 @@ require_paths:
257
259
  - lib
258
260
  required_ruby_version: !ruby/object:Gem::Requirement
259
261
  requirements:
260
- - - ">="
261
- - !ruby/object:Gem::Version
262
- version: '3.1'
263
- - - "<"
262
+ - - "~>"
264
263
  - !ruby/object:Gem::Version
265
- version: '4.0'
264
+ version: '3.2'
266
265
  required_rubygems_version: !ruby/object:Gem::Requirement
267
266
  requirements:
268
267
  - - ">="
269
268
  - !ruby/object:Gem::Version
270
269
  version: '0'
271
270
  requirements: []
272
- rubygems_version: 3.3.26
271
+ rubygems_version: 3.4.6
273
272
  signing_key:
274
273
  specification_version: 4
275
274
  summary: ViewComponents for the Ariadne Design System