ariadne_view_components 0.0.65 → 0.0.66

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25ccf8068907120ea6f4590719bb2062ff4a38ce97ebb3846ef5a28c1e5cb25f
4
- data.tar.gz: 3d28c350db0b1d7c0c295e64e6cf06e8dfe4a636461dd52214bf02b4b56205dc
3
+ metadata.gz: ced29e9d5d3ea81b63053dafceebaff0a5faa5912341adc06e5561ffde74f4be
4
+ data.tar.gz: d1edeaa13348008834ea70e582393cb760de8fdb0257720cf18607e312e5f5d4
5
5
  SHA512:
6
- metadata.gz: b87643f46b71707855adffca18747d9e284f876158dff83a7fcab9223d09127f48a4e6ea9f3beed0bdfae7bdfeee043fd51cfe95c864805be79691173495b988
7
- data.tar.gz: 5f9bfdd0743f61bc4a98c3c891a8bf982efcdb124bd7846a78a3a9dcd1ff486d27d5b11162b85c81685f155fc4d47523b0bdc393625c3365ef2a87706c6dafdd
6
+ metadata.gz: abd39c12342494f01b486c4fe679a1d235d5c6ef3218b08ab59079bc6aa5ef462e78e37b779a04c7c3d8e154c0a21a3b4a65d09c3905619d418ef9c690887f3e
7
+ data.tar.gz: 490bc1b70b1225d84988fffd9f7c6c09332c2c49424cc9f35547f8932147ff6790822f63ea6cf6745a9a3370f730a23e75d962ef05e8db3c23e7d46da8334c48
data/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ ## [v0.0.65] - 05-04-2024
2
+ **Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.64...v0.0.65
1
3
  ## [v0.0.64] - 05-04-2024
2
4
  **Full Changelog**: https://github.com/yettoapp/ariadne/compare/v0.0.63.1...v0.0.64
3
5
  ## [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.66"
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.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian