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 +4 -4
- data/CHANGELOG.md +4 -0
- data/app/components/ariadne/form/caption/component.rb +19 -16
- data/app/components/ariadne/form/form_control/component.rb +18 -16
- data/app/components/ariadne/form/form_reference/component.rb +9 -7
- data/app/components/ariadne/form/group/component.rb +16 -14
- data/app/components/ariadne/form/hidden_field/component.rb +7 -5
- data/app/components/ariadne/form/separator/component.rb +3 -1
- data/app/components/ariadne/form/spacing_wrapper/component.rb +3 -1
- data/app/components/ariadne/form/validation_message/component.rb +6 -4
- data/lib/ariadne/view_components/version.rb +1 -1
- metadata +3 -3
- /data/app/lib/{view_components_contrib → view_component_contrib}/html_attrs.rb +0 -0
- /data/app/lib/{view_components_contrib → view_component_contrib}/style_variants.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd5283c6a467784134844ba0e33b4e057751409ab319edd1290d50187548d00f
|
4
|
+
data.tar.gz: 71955ed5ec0978b6dd4134e06e04ac75ab8431dcf1a773fa8ba44de714580a02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
module Caption
|
7
|
+
class Component
|
8
|
+
Ariadne::Form::BaseInputComponent
|
9
|
+
def initialize(input:)
|
10
|
+
@input = input
|
11
|
+
end
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
def caption_template?
|
14
|
+
@input.caption_template?
|
15
|
+
end
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
|
17
|
+
def render_caption_template
|
18
|
+
@input.render_caption_template
|
19
|
+
end
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
+
def before_render
|
22
|
+
return unless @input.caption? && caption_template?
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
-
|
7
|
-
|
6
|
+
module FormControl
|
7
|
+
class Component < Ariadne::Form::BaseInputComponent
|
8
|
+
delegate :builder, :form, to: :@input
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
|
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
|
-
|
7
|
-
|
6
|
+
module FormReference
|
7
|
+
class Component < Ariadne::Form::BaseInputComponent
|
8
|
+
delegate :builder, :form, to: :@input
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+
def initialize(input:)
|
11
|
+
@input = input
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
|
22
|
-
|
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
|
-
|
7
|
-
|
6
|
+
module HiddenField
|
7
|
+
class Component < Ariadne::Form::BaseInputComponent
|
8
|
+
delegate :builder, :form, to: :@input
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
@@ -3,11 +3,13 @@
|
|
3
3
|
module Ariadne
|
4
4
|
module Form
|
5
5
|
# :nodoc:
|
6
|
-
|
7
|
-
|
6
|
+
module ValidationMessage
|
7
|
+
class Component < Ariadne::Form::BaseInputComponent
|
8
|
+
attr_reader :input
|
8
9
|
|
9
|
-
|
10
|
-
|
10
|
+
def initialize(input:)
|
11
|
+
@input = input
|
12
|
+
end
|
11
13
|
end
|
12
14
|
end
|
13
15
|
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.
|
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/
|
198
|
-
- app/lib/
|
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
|
File without changes
|
File without changes
|