ariadne_view_components 0.0.65 → 0.0.67

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: 25ccf8068907120ea6f4590719bb2062ff4a38ce97ebb3846ef5a28c1e5cb25f
4
- data.tar.gz: 3d28c350db0b1d7c0c295e64e6cf06e8dfe4a636461dd52214bf02b4b56205dc
3
+ metadata.gz: bd5283c6a467784134844ba0e33b4e057751409ab319edd1290d50187548d00f
4
+ data.tar.gz: 71955ed5ec0978b6dd4134e06e04ac75ab8431dcf1a773fa8ba44de714580a02
5
5
  SHA512:
6
- metadata.gz: b87643f46b71707855adffca18747d9e284f876158dff83a7fcab9223d09127f48a4e6ea9f3beed0bdfae7bdfeee043fd51cfe95c864805be79691173495b988
7
- data.tar.gz: 5f9bfdd0743f61bc4a98c3c891a8bf982efcdb124bd7846a78a3a9dcd1ff486d27d5b11162b85c81685f155fc4d47523b0bdc393625c3365ef2a87706c6dafdd
6
+ metadata.gz: fdf4d46026299a7aacc15ce2a404f214fc44f9995295970ef2108ae6b8ae9491dc8434d576087f56dbe93c2cf477cf4b57a4a62c67bacf15a7841ec657b13b4e
7
+ data.tar.gz: d7a08dbe0d5307bf83b75daaa8c9d8d788a6078ef4877aecab4aa4f54698e3b10cc1dd078d335292b5f538014ac01a3f94ad9624aeb1ba8870f7bbfffb826f93
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [v0.0.66] - 05-04-2024
2
+ **Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.65...v0.0.66
3
+ ## [v0.0.65] - 05-04-2024
4
+ **Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.64...v0.0.65
1
5
  ## [v0.0.64] - 05-04-2024
2
6
  **Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.63.1...v0.0.64
3
7
  ## [v0.0.63.1] - 05-04-2024
@@ -3,26 +3,29 @@
3
3
  module Ariadne
4
4
  module Form
5
5
  # :nodoc:
6
- class Caption < BaseComponent
7
- def initialize(input:)
8
- @input = input
9
- end
6
+ module Caption
7
+ class Component
8
+ Ariadne::Form::BaseInputComponent
9
+ def initialize(input:)
10
+ @input = input
11
+ end
10
12
 
11
- def caption_template?
12
- @input.caption_template?
13
- end
13
+ def caption_template?
14
+ @input.caption_template?
15
+ end
14
16
 
15
- def render_caption_template
16
- @input.render_caption_template
17
- end
17
+ def render_caption_template
18
+ @input.render_caption_template
19
+ end
18
20
 
19
- def before_render
20
- return unless @input.caption? && caption_template?
21
+ def before_render
22
+ return unless @input.caption? && caption_template?
21
23
 
22
- raise <<~MESSAGE
23
- Please provide either a caption: argument or caption template for the
24
- '#{@input.name}' input; both were found.
25
- MESSAGE
24
+ raise <<~MESSAGE
25
+ Please provide either a caption: argument or caption template for the
26
+ '#{@input.name}' input; both were found.
27
+ MESSAGE
28
+ end
26
29
  end
27
30
  end
28
31
  end
@@ -3,24 +3,26 @@
3
3
  module Ariadne
4
4
  module Form
5
5
  # :nodoc:
6
- class FormControl < BaseComponent
7
- delegate :builder, :form, to: :@input
6
+ module FormControl
7
+ class Component < Ariadne::Form::BaseInputComponent
8
+ delegate :builder, :form, to: :@input
8
9
 
9
- def initialize(input:, tag: :div, **system_arguments)
10
- @input = input
11
- @tag = tag
12
- @input.add_label_classes("FormControl-label")
13
- @form_group_arguments = {
14
- # **system_arguments,
15
- # class: class_names(
16
- # system_arguments[:class],
17
- # system_arguments[:classes],
18
- # "FormControl",
19
- # "width-full FormControl--fullWidth" => @input.full_width?,
20
- # ),
21
- }
10
+ def initialize(input:, tag: :div, **system_arguments)
11
+ @input = input
12
+ @tag = tag
13
+ @input.add_label_classes("FormControl-label")
14
+ @form_group_arguments = {
15
+ # **system_arguments,
16
+ # class: class_names(
17
+ # system_arguments[:class],
18
+ # system_arguments[:classes],
19
+ # "FormControl",
20
+ # "width-full FormControl--fullWidth" => @input.full_width?,
21
+ # ),
22
+ }
22
23
 
23
- @form_group_arguments[:hidden] = "hidden" if @input.hidden?
24
+ @form_group_arguments[:hidden] = "hidden" if @input.hidden?
25
+ end
24
26
  end
25
27
  end
26
28
  end
@@ -3,15 +3,17 @@
3
3
  module Ariadne
4
4
  module Form
5
5
  # :nodoc:
6
- class FormReference < BaseComponent
7
- delegate :builder, :form, to: :@input
6
+ module FormReference
7
+ class Component < Ariadne::Form::BaseInputComponent
8
+ delegate :builder, :form, to: :@input
8
9
 
9
- def initialize(input:)
10
- @input = input
11
- end
10
+ def initialize(input:)
11
+ @input = input
12
+ end
12
13
 
13
- def builder_or_view
14
- @input.nested? ? builder : @view_context
14
+ def builder_or_view
15
+ @input.nested? ? builder : @view_context
16
+ end
15
17
  end
16
18
  end
17
19
  end
@@ -4,22 +4,24 @@ module Ariadne
4
4
  module Form
5
5
  # :nodoc:
6
6
  module Group
7
- class Component < Ariadne::Form::BaseComponent
8
- VERTICAL = :vertical
9
- HORIZONTAL = :horizontal
10
- DEFAULT_LAYOUT = VERTICAL
11
- LAYOUTS = [VERTICAL, HORIZONTAL].freeze
7
+ module Component
8
+ class Component < Ariadne::Form::BaseInputComponent
9
+ VERTICAL = :vertical
10
+ HORIZONTAL = :horizontal
11
+ DEFAULT_LAYOUT = VERTICAL
12
+ LAYOUTS = [VERTICAL, HORIZONTAL].freeze
12
13
 
13
- def initialize(inputs:, builder:, form:, layout: DEFAULT_LAYOUT, **system_arguments)
14
- @inputs = inputs
15
- @builder = builder
16
- @form = form
17
- @layout = layout
18
- @system_arguments = system_arguments
19
- end
14
+ def initialize(inputs:, builder:, form:, layout: DEFAULT_LAYOUT, **system_arguments)
15
+ @inputs = inputs
16
+ @builder = builder
17
+ @form = form
18
+ @layout = layout
19
+ @system_arguments = system_arguments
20
+ end
20
21
 
21
- def horizontal?
22
- @layout == HORIZONTAL
22
+ def horizontal?
23
+ @layout == HORIZONTAL
24
+ end
23
25
  end
24
26
  end
25
27
  end
@@ -3,12 +3,14 @@
3
3
  module Ariadne
4
4
  module Form
5
5
  # :nodoc:
6
- class HiddenField < Ariadne::Forms::BaseComponent
7
- delegate :builder, :form, to: :@input
6
+ module HiddenField
7
+ class Component < Ariadne::Form::BaseInputComponent
8
+ delegate :builder, :form, to: :@input
8
9
 
9
- def initialize(input:)
10
- @input = input
11
- @input.add_input_classes("FormField-input")
10
+ def initialize(input:)
11
+ @input = input
12
+ @input.add_input_classes("FormField-input")
13
+ end
12
14
  end
13
15
  end
14
16
  end
@@ -2,7 +2,9 @@
2
2
 
3
3
  module Ariadne
4
4
  module Form
5
- class Separator < Ariadne::Forms::BaseComponent
5
+ module Separator
6
+ class Component < Ariadne::Form::BaseInputComponent
7
+ end
6
8
  end
7
9
  end
8
10
  end
@@ -2,7 +2,9 @@
2
2
 
3
3
  module Ariadne
4
4
  module Form
5
- class SpacingWrapper < BaseComponent
5
+ module SpacingWrapper
6
+ class Component < Ariadne::Form::BaseInputComponent
7
+ end
6
8
  end
7
9
  end
8
10
  end
@@ -3,11 +3,13 @@
3
3
  module Ariadne
4
4
  module Form
5
5
  # :nodoc:
6
- class ValidationMessage < BaseComponent
7
- attr_reader :input
6
+ module ValidationMessage
7
+ class Component < Ariadne::Form::BaseInputComponent
8
+ attr_reader :input
8
9
 
9
- def initialize(input:)
10
- @input = input
10
+ def initialize(input:)
11
+ @input = input
12
+ end
11
13
  end
12
14
  end
13
15
  end
@@ -3,6 +3,6 @@
3
3
  # :nocov:
4
4
  module Ariadne
5
5
  module ViewComponents
6
- VERSION = "0.0.65"
6
+ VERSION = "0.0.67"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ariadne_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.65
4
+ version: 0.0.67
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian
@@ -194,8 +194,8 @@ files:
194
194
  - app/lib/ariadne/icon_helper.rb
195
195
  - app/lib/ariadne/logger_helper.rb
196
196
  - app/lib/ariadne/view_helper.rb
197
- - app/lib/view_components_contrib/html_attrs.rb
198
- - app/lib/view_components_contrib/style_variants.rb
197
+ - app/lib/view_component_contrib/html_attrs.rb
198
+ - app/lib/view_component_contrib/style_variants.rb
199
199
  - lib/ariadne/forms/acts_as_component.rb
200
200
  - lib/ariadne/forms/base.html.erb
201
201
  - lib/ariadne/forms/base.rb