ariadne_view_components 0.0.28-arm64-darwin → 0.0.30-arm64-darwin

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: 62fd497b3d3593f9e1dc0a59d0674199edc19ccb26025e2749760ed6ff783474
4
- data.tar.gz: a21877573689c3092e70440e7980f8d6ba29bd06af2a2e5471cac4c29b1b09ab
3
+ metadata.gz: c315620f90a40661bc798120436dca525a9345aaaf57ff24a9b53458fe26c910
4
+ data.tar.gz: a9ee01f3e7d2865f20353166fa5452c4d7a0a840c5a0d338afd5527d6d71bb7b
5
5
  SHA512:
6
- metadata.gz: c0dc1dc48d1b20abdeee4bae30b29b0d29ab8a9e411ab1518869354e6c9080c70fd479a8b5c53d60802faa7fd85478c0b9bcea0f9dc4430fef907e7112d21d4e
7
- data.tar.gz: 9615285afb7ab6d4de309137560329d5e024aa6c4952ef8634dca7c7467184a080c0ce8aaea9bf99fbfad3b2394eef3c6e2c0c35a2110efe73f91bf62fa9feb1
6
+ metadata.gz: e4c2eade147211bae2d96532ae3da6977215e810ccb26338708f4727f53db704707f8ed71e18aad07bc8550919d388e6528107c6b9e04467b6b954e00219f9f5
7
+ data.tar.gz: a5ae882c4d8f665e851e138becf4415695b19c8cd0299bed6058cc50e10ac6b0f19673806e9abf77df8cf2b1b2f2a3b11a46fe12396b686c5b69f2b56ae0cd36
data/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
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
+
29
+ ## [v0.0.29](https://github.com/yettoapp/ariadne/tree/v0.0.29) (2023-02-21)
30
+
31
+ [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.28...v0.0.29)
32
+
33
+ **Merged pull requests:**
34
+
35
+ - Add ability to add hidden tags to commentcomponent [\#152](https://github.com/yettoapp/ariadne/pull/152) ([gjtorikian](https://github.com/gjtorikian))
36
+ - Bump @tiptap/core from 2.0.0-beta.217 to 2.0.0-beta.218 [\#151](https://github.com/yettoapp/ariadne/pull/151) ([dependabot[bot]](https://github.com/apps/dependabot))
37
+ - Bump @tiptap/extension-history from 2.0.0-beta.217 to 2.0.0-beta.218 [\#150](https://github.com/yettoapp/ariadne/pull/150) ([dependabot[bot]](https://github.com/apps/dependabot))
38
+ - Bump @tiptap/extension-paragraph from 2.0.0-beta.217 to 2.0.0-beta.218 [\#149](https://github.com/yettoapp/ariadne/pull/149) ([dependabot[bot]](https://github.com/apps/dependabot))
39
+ - Bump @tiptap/extension-hard-break from 2.0.0-beta.217 to 2.0.0-beta.218 [\#148](https://github.com/yettoapp/ariadne/pull/148) ([dependabot[bot]](https://github.com/apps/dependabot))
40
+ - Bump @tiptap/extension-dropcursor from 2.0.0-beta.217 to 2.0.0-beta.218 [\#147](https://github.com/yettoapp/ariadne/pull/147) ([dependabot[bot]](https://github.com/apps/dependabot))
41
+ - Bump @tiptap/extension-gapcursor from 2.0.0-beta.217 to 2.0.0-beta.218 [\#146](https://github.com/yettoapp/ariadne/pull/146) ([dependabot[bot]](https://github.com/apps/dependabot))
42
+ - Bump @tiptap/extension-document from 2.0.0-beta.217 to 2.0.0-beta.218 [\#145](https://github.com/yettoapp/ariadne/pull/145) ([dependabot[bot]](https://github.com/apps/dependabot))
43
+ - Bump @tiptap/extension-text from 2.0.0-beta.217 to 2.0.0-beta.218 [\#144](https://github.com/yettoapp/ariadne/pull/144) ([dependabot[bot]](https://github.com/apps/dependabot))
44
+
3
45
  ## [v0.0.28](https://github.com/yettoapp/ariadne/tree/v0.0.28) (2023-02-17)
4
46
 
5
47
  [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.27...v0.0.28)
@@ -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
@@ -4,6 +4,9 @@
4
4
  <% tab.text { @public_tab_text } %>
5
5
  <% tab.panel(attributes: {:"data-public" => true}) do %>
6
6
  <%= ariadne_form_with(url: @url, method: @method, classes: @classes, attributes: @attributes) do |comment_box| %>
7
+ <% @hidden_fields.each do |name, value| %>
8
+ <%= hidden_field_tag name, value %>
9
+ <% end %>
7
10
  <div class="ariadne-overflow-hidden ariadne-border ariadne-border-slate-300 ariadne-shadow-sm">
8
11
  <%= hidden_field_tag 'message_is_public', true %>
9
12
  <%= render(Ariadne::RichTextAreaComponent.new(name: :message_public_bodytext, sr_label: "Select reply type", attributes: { required: true})) %>
@@ -50,9 +50,10 @@ module Ariadne
50
50
  # @param url [String] The URL to take action against.
51
51
  # @param method [String] The method to use when submitting the form.
52
52
  # @param sr_label [String] A label to introduce these tabs for screen readers.
53
+ # @param hidden_fields [[String]] An array of arrays of additional (hidden) fields to add to the form.
53
54
  # @param classes [String] <%= link_to_classes_docs %>
54
55
  # @param attributes [Hash] <%= link_to_attributes_docs %>
55
- def initialize(url:, method: :post, sr_label:, classes: "", attributes: {})
56
+ def initialize(url:, method: :post, sr_label:, hidden_fields: [], classes: "", attributes: {})
56
57
  @tag = DEFAULT_TAG
57
58
  @classes = class_names(
58
59
  DEFAULT_CLASSES,
@@ -63,6 +64,7 @@ module Ariadne
63
64
  @sr_label = sr_label
64
65
 
65
66
  @tab_idx = -1
67
+ @hidden_fields = hidden_fields
66
68
  @attributes = attributes
67
69
  end
68
70
  end
@@ -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.28"
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.28
4
+ version: 0.0.30
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Garen J. Torikian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-17 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: []
@@ -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