sdr_view_components 0.1.5 → 0.1.7
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 +4 -4
- data/README.md +45 -0
- data/app/components/sdr_view_components/elements/navigation/nav_item_component.rb +6 -2
- data/app/components/sdr_view_components/elements/toast_component.html.erb +3 -1
- data/app/components/sdr_view_components/elements/toast_component.rb +1 -1
- data/app/components/sdr_view_components/forms/basic_checkbox_component.rb +3 -4
- data/app/components/sdr_view_components/forms/basic_file_component.rb +21 -0
- data/app/components/sdr_view_components/forms/basic_radio_button_component.rb +22 -0
- data/app/components/sdr_view_components/forms/basic_text_area_component.rb +21 -0
- data/app/components/sdr_view_components/forms/basic_text_field_component.rb +21 -0
- data/app/components/sdr_view_components/forms/checkbox_component.rb +2 -6
- data/app/components/sdr_view_components/forms/field_component.html.erb +3 -3
- data/app/components/sdr_view_components/forms/field_component.rb +51 -31
- data/app/components/sdr_view_components/forms/file_component.rb +19 -0
- data/app/components/sdr_view_components/forms/radio_button_component.rb +19 -0
- data/app/components/sdr_view_components/forms/text_area_component.rb +18 -0
- data/app/components/sdr_view_components/forms/text_field_component.rb +18 -0
- data/lib/sdr_view_components/version.rb +1 -1
- metadata +10 -3
- data/app/components/sdr_view_components/forms/checkbox_component.html.erb +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 922b619be06bc6e16085fb78c7a864f55f3de6ed487e50a8e746f3e3a5173560
|
|
4
|
+
data.tar.gz: 7e0a6b7edbb738707553d5bb70919372429c5b5890e943c393c1eddde2ad106f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 499e4fab33d04108d386d9078130620d635f088f8e3d32312ad0e5f81be4744d5b33f0326090fc1e7bb1d206e6eaee454fa3bb02b81a2a65d9db68b3689e883d
|
|
7
|
+
data.tar.gz: 7262325a09c98dd14f89260050f1e0560272fce01ca485f6c9198767a32b11b923f875f0a97be98b2efa8ce626637f407fbe5b051717c9e248a5d0b7a4cc3fb1
|
data/README.md
CHANGED
|
@@ -63,6 +63,51 @@ The `:dark` variation supports providing an rgb value via the `background_color`
|
|
|
63
63
|
|
|
64
64
|
By default, the SUL Rosette is included in the header, this can be disabled by setting `rosette: false` in the parameter list when instantiating the header.
|
|
65
65
|
|
|
66
|
+
### Form components
|
|
67
|
+
|
|
68
|
+
SdrViewComponents provides a wrapper for several [ActionView::Helper::Tags](https://api.rubyonrails.org/v8.1.1/classes/ActionView/Helpers/Tags.html).
|
|
69
|
+
|
|
70
|
+
Currently supported tags:
|
|
71
|
+
- Checkbox
|
|
72
|
+
- File
|
|
73
|
+
- RadioButton
|
|
74
|
+
- TextArea
|
|
75
|
+
- TextField
|
|
76
|
+
|
|
77
|
+
#### Composed form components
|
|
78
|
+
|
|
79
|
+
SdrViewComponents provides fully composed (label, help text, and validation) instances of the above components as:
|
|
80
|
+
|
|
81
|
+
- SdrViewComponents::Forms::CheckboxComponent
|
|
82
|
+
- SdrViewComponents::Forms::FileComponent
|
|
83
|
+
- SdrViewComponents::Forms::RadioButtonComponent
|
|
84
|
+
- SdrViewComponents::Forms::TextAreaComponent
|
|
85
|
+
- SdrViewComponents::Forms::TextFieldComponent
|
|
86
|
+
|
|
87
|
+
At a minimum, each of these components must be provided wih the `form:` and `field_name:` parameters. Additionally, you can provide prefixed parameters that will be passed the the individual parts of the components:
|
|
88
|
+
|
|
89
|
+
- `container_`: is used to pass arguments to the surrounding `div` for the component.
|
|
90
|
+
- `input_`: is used to pass arguments to the actual input component.
|
|
91
|
+
- `label_`: is used to pass arguments to the label for the component.
|
|
92
|
+
- `help_`: is used to pass arguments to the help text available for the component.
|
|
93
|
+
- `error_`: is used to pass arguments to the validation output of the component.
|
|
94
|
+
|
|
95
|
+
TODO:
|
|
96
|
+
- Outline the supported params for each prefix
|
|
97
|
+
- Provide an example instantiation and output
|
|
98
|
+
|
|
99
|
+
#### Basic form components
|
|
100
|
+
|
|
101
|
+
Each of the supported components above uses the provided "basic" components:
|
|
102
|
+
|
|
103
|
+
- SdrViewComponents::Forms::BasicCheckboxComponent
|
|
104
|
+
- SdrViewComponents::Forms::BasicFileComponent
|
|
105
|
+
- SdrViewComponents::Forms::BasicRadioButtonComponent
|
|
106
|
+
- SdrViewComponents::Forms::BasicTextAreaComponent
|
|
107
|
+
- SdrViewComponents::Forms::BasicTextFieldComponent
|
|
108
|
+
|
|
109
|
+
At a minimum, each of these components must be provided wih the `form:` and `field_name:` parameters. Additionally, you can provide additional parameters that will be passed to the standard ActionView::Helpers::Tag.
|
|
110
|
+
|
|
66
111
|
### General usage:
|
|
67
112
|
|
|
68
113
|
```
|
|
@@ -5,7 +5,7 @@ module SdrViewComponents
|
|
|
5
5
|
module Navigation
|
|
6
6
|
# Component for navigation item link.
|
|
7
7
|
class NavItemComponent < BaseComponent
|
|
8
|
-
def initialize(text:, path
|
|
8
|
+
def initialize(text:, path: nil, data: {})
|
|
9
9
|
@text = text
|
|
10
10
|
@path = path
|
|
11
11
|
@data = data
|
|
@@ -16,7 +16,11 @@ module SdrViewComponents
|
|
|
16
16
|
|
|
17
17
|
def call
|
|
18
18
|
tag.li class: 'nav-item' do
|
|
19
|
-
|
|
19
|
+
if path.present?
|
|
20
|
+
link_to text, path, class: 'nav-link', data:
|
|
21
|
+
else
|
|
22
|
+
tag.span text, class: 'nav-link'
|
|
23
|
+
end
|
|
20
24
|
end
|
|
21
25
|
end
|
|
22
26
|
end
|
|
@@ -4,7 +4,7 @@ module SdrViewComponents
|
|
|
4
4
|
module Elements
|
|
5
5
|
# Component for rendering a toast element.
|
|
6
6
|
class ToastComponent < BaseComponent
|
|
7
|
-
def initialize(title:, text
|
|
7
|
+
def initialize(title:, text: nil, close_text: nil, variant: :black)
|
|
8
8
|
@title = title
|
|
9
9
|
@text = text
|
|
10
10
|
@close_text = close_text
|
|
@@ -4,18 +4,17 @@ module SdrViewComponents
|
|
|
4
4
|
module Forms
|
|
5
5
|
# Component for form checkbox field
|
|
6
6
|
class BasicCheckboxComponent < BaseComponent
|
|
7
|
-
def initialize(form:, field_name:,
|
|
7
|
+
def initialize(form:, field_name:, **args)
|
|
8
8
|
@form = form
|
|
9
9
|
@field_name = field_name
|
|
10
10
|
@args = args
|
|
11
|
-
@data = data
|
|
12
11
|
super()
|
|
13
12
|
end
|
|
14
13
|
|
|
15
|
-
attr_reader :args, :
|
|
14
|
+
attr_reader :args, :form, :field_name
|
|
16
15
|
|
|
17
16
|
def call
|
|
18
|
-
form.check_box field_name,
|
|
17
|
+
form.check_box field_name, **args
|
|
19
18
|
end
|
|
20
19
|
end
|
|
21
20
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Forms
|
|
5
|
+
# Component for form file field
|
|
6
|
+
class BasicFileComponent < BaseComponent
|
|
7
|
+
def initialize(form:, field_name:, **args)
|
|
8
|
+
@form = form
|
|
9
|
+
@field_name = field_name
|
|
10
|
+
@args = args
|
|
11
|
+
super()
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
attr_reader :args, :form, :field_name
|
|
15
|
+
|
|
16
|
+
def call
|
|
17
|
+
form.file_field field_name, **args
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Forms
|
|
5
|
+
# Component for form radio button field
|
|
6
|
+
class BasicRadioButtonComponent < BaseComponent
|
|
7
|
+
def initialize(form:, field_name:, value:, **args)
|
|
8
|
+
@form = form
|
|
9
|
+
@field_name = field_name
|
|
10
|
+
@value = value
|
|
11
|
+
@args = args
|
|
12
|
+
super()
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
attr_reader :args, :form, :field_name, :value
|
|
16
|
+
|
|
17
|
+
def call
|
|
18
|
+
form.radio_button field_name, value, **args
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Forms
|
|
5
|
+
# Component for form text area field
|
|
6
|
+
class BasicTextAreaComponent < BaseComponent
|
|
7
|
+
def initialize(form:, field_name:, **args)
|
|
8
|
+
@form = form
|
|
9
|
+
@field_name = field_name
|
|
10
|
+
@args = args
|
|
11
|
+
super()
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
attr_reader :args, :form, :field_name
|
|
15
|
+
|
|
16
|
+
def call
|
|
17
|
+
form.text_area field_name, **args
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Forms
|
|
5
|
+
# Component for form text field
|
|
6
|
+
class BasicTextFieldComponent < BaseComponent
|
|
7
|
+
def initialize(form:, field_name:, **args)
|
|
8
|
+
@form = form
|
|
9
|
+
@field_name = field_name
|
|
10
|
+
@args = args
|
|
11
|
+
super()
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
attr_reader :args, :form, :field_name
|
|
15
|
+
|
|
16
|
+
def call
|
|
17
|
+
form.text_field field_name, **args
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -11,12 +11,8 @@ module SdrViewComponents
|
|
|
11
11
|
super
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# The component must implement a `default_component` method in order
|
|
17
|
-
# to render in the component slot of the FieldComponent.
|
|
18
|
-
def default_component
|
|
19
|
-
render SdrViewComponents::Forms::BasicCheckboxComponent.new(form:, field_name:, data:, **input_args)
|
|
14
|
+
def input_component
|
|
15
|
+
SdrViewComponents::Forms::BasicCheckboxComponent.new(form:, field_name:, **input_args)
|
|
20
16
|
end
|
|
21
17
|
end
|
|
22
18
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<%= tag.div container_args do %>
|
|
2
|
-
<%= component %>
|
|
1
|
+
<%= tag.div **container_args do %>
|
|
3
2
|
<%= render SdrViewComponents::Forms::LabelComponent.new(form:, field_name:, **label_args) %>
|
|
4
3
|
<%= render SdrViewComponents::Forms::HelpTextComponent.new(**help_text_args) %>
|
|
5
|
-
<%= render
|
|
4
|
+
<%= render input_component %>
|
|
5
|
+
<%= render SdrViewComponents::Forms::InvalidFeedbackComponent.new(form:, field_name:, **error_args) %>
|
|
6
6
|
<% end %>
|
|
@@ -4,8 +4,6 @@ module SdrViewComponents
|
|
|
4
4
|
module Forms
|
|
5
5
|
# Base component for all form fields.
|
|
6
6
|
class FieldComponent < BaseComponent
|
|
7
|
-
renders_one :component
|
|
8
|
-
|
|
9
7
|
def initialize(**args)
|
|
10
8
|
@args = args
|
|
11
9
|
super()
|
|
@@ -13,38 +11,53 @@ module SdrViewComponents
|
|
|
13
11
|
|
|
14
12
|
attr_reader :args
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
# Any component that inherits from FieldComponent must implement this method
|
|
15
|
+
# or provide its own template.
|
|
16
|
+
def input_component
|
|
17
|
+
raise NotImplementedError
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
##########################################################################
|
|
21
|
+
# Argument builders for the various sub-components of a form field.
|
|
22
|
+
# These methods extract arguments from the main args hash
|
|
23
|
+
# based on a prefix convention.
|
|
24
|
+
|
|
25
|
+
# Returns a hash of arguments for the container element.
|
|
26
|
+
# Prefix and argument with 'container_' in order for it to be passed to
|
|
27
|
+
# the container div. (i.e. :container_class will be passed as :class to
|
|
28
|
+
# the container div)
|
|
20
29
|
def container_args
|
|
21
30
|
args_for(args:, prefix: 'container_')
|
|
22
31
|
end
|
|
23
32
|
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
# Returns a hash of arguments for the error element.
|
|
34
|
+
# Prefix and argument with 'error_' in order for it to be passed to
|
|
35
|
+
# to the invalid feedback element.
|
|
36
|
+
def error_args
|
|
37
|
+
args_for(args:, prefix: 'error_')
|
|
26
38
|
end
|
|
27
39
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
40
|
+
# Returns a hash of arguments for the help text element.
|
|
41
|
+
# Prefix and argument with 'help_' in order for it to be passed to
|
|
42
|
+
# to the help text element.
|
|
43
|
+
def help_text_args
|
|
44
|
+
args_for(args:, prefix: 'help_').merge({ id: help_text_id })
|
|
32
45
|
end
|
|
33
46
|
|
|
34
|
-
|
|
35
|
-
|
|
47
|
+
# Returns a hash of arguments for the input element.
|
|
48
|
+
# Prefix and argument with 'input_' in order for it to be passed to
|
|
49
|
+
# the input element.
|
|
50
|
+
def input_args
|
|
51
|
+
args_for(args:, prefix: 'input_').merge({ aria: field_aria })
|
|
36
52
|
end
|
|
37
53
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
# This is used for collection/work forms where we do server-side
|
|
44
|
-
# validation and don't want to block form submission on empty fields
|
|
45
|
-
arias[:required] = true if @mark_required
|
|
46
|
-
end
|
|
54
|
+
# Returns a hash of arguments for the label element.
|
|
55
|
+
# Prefix and argument with 'label_' in order for it to be passed to
|
|
56
|
+
# the label element.
|
|
57
|
+
def label_args
|
|
58
|
+
args_for(args:, prefix: 'label_')
|
|
47
59
|
end
|
|
60
|
+
##########################################################################
|
|
48
61
|
|
|
49
62
|
def field_name
|
|
50
63
|
@field_name ||= args.delete(:field_name)
|
|
@@ -54,21 +67,28 @@ module SdrViewComponents
|
|
|
54
67
|
@form ||= args.delete(:form)
|
|
55
68
|
end
|
|
56
69
|
|
|
57
|
-
|
|
58
|
-
args_for(args:, prefix: 'help_').merge({
|
|
59
|
-
id: help_text_id
|
|
60
|
-
})
|
|
61
|
-
end
|
|
70
|
+
private
|
|
62
71
|
|
|
63
|
-
def
|
|
64
|
-
|
|
72
|
+
def error_aria
|
|
73
|
+
InvalidFeedbackSupport.arias_for(field_name:, form:).tap do |arias|
|
|
74
|
+
arias[:describedby] = merge_actions(arias[:describedby], help_text_id) if help_text_args[:text].present?
|
|
75
|
+
end
|
|
65
76
|
end
|
|
66
77
|
|
|
67
|
-
def
|
|
68
|
-
|
|
78
|
+
def field_aria
|
|
79
|
+
error_aria.tap do |arias|
|
|
80
|
+
# Set aria-required if we want to indicate required, but the field
|
|
81
|
+
# does not actually have a required attribute
|
|
82
|
+
#
|
|
83
|
+
# This is used for collection/work forms where we do server-side
|
|
84
|
+
# validation and don't want to block form submission on empty fields
|
|
85
|
+
arias[:required] = true if @args[:mark_required]
|
|
86
|
+
end
|
|
69
87
|
end
|
|
70
88
|
|
|
71
|
-
|
|
89
|
+
def help_text_id
|
|
90
|
+
@help_text_id ||= form.field_id(field_name, 'help')
|
|
91
|
+
end
|
|
72
92
|
end
|
|
73
93
|
end
|
|
74
94
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Forms
|
|
5
|
+
# Component for form file field
|
|
6
|
+
class FileComponent < FieldComponent
|
|
7
|
+
def initialize(**args)
|
|
8
|
+
args[:container_class] = merge_classes('form-file', args[:container_class])
|
|
9
|
+
args[:input_class] = merge_classes('form-file-input', args[:input_class])
|
|
10
|
+
args[:label_default_class] = merge_classes('form-file-label', args[:input_class])
|
|
11
|
+
super
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def input_component
|
|
15
|
+
SdrViewComponents::Forms::BasicFileComponent.new(form:, field_name:, **input_args)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Forms
|
|
5
|
+
# Component for form radio button field
|
|
6
|
+
class RadioButtonComponent < FieldComponent
|
|
7
|
+
def initialize(**args)
|
|
8
|
+
args[:container_class] = merge_classes('form-check', args[:container_class])
|
|
9
|
+
args[:input_class] = merge_classes('form-check-input', args[:input_class])
|
|
10
|
+
args[:label_default_class] = merge_classes('form-check-label', args[:input_class])
|
|
11
|
+
super
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def input_component
|
|
15
|
+
SdrViewComponents::Forms::BasicRadioButtonComponent.new(form:, field_name:, **input_args)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Forms
|
|
5
|
+
# Component for form text area field
|
|
6
|
+
class TextAreaComponent < FieldComponent
|
|
7
|
+
def initialize(**args)
|
|
8
|
+
args[:container_class] = merge_classes('form-text', args[:container_class])
|
|
9
|
+
args[:input_class] = merge_classes('form-control', args[:input_class])
|
|
10
|
+
super
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def input_component
|
|
14
|
+
SdrViewComponents::Forms::BasicTextAreaComponent.new(form:, field_name:, **input_args)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Forms
|
|
5
|
+
# Component for form text field
|
|
6
|
+
class TextFieldComponent < FieldComponent
|
|
7
|
+
def initialize(**args)
|
|
8
|
+
args[:container_class] = merge_classes('field-container', args[:container_class])
|
|
9
|
+
args[:input_class] = merge_classes('form-control', args[:input_class])
|
|
10
|
+
super
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def input_component
|
|
14
|
+
SdrViewComponents::Forms::BasicTextFieldComponent.new(form:, field_name:, **input_args)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sdr_view_components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Collier
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-12-
|
|
10
|
+
date: 2025-12-16 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rails
|
|
@@ -86,19 +86,26 @@ files:
|
|
|
86
86
|
- app/components/sdr_view_components/elements/tooltip_component.html.erb
|
|
87
87
|
- app/components/sdr_view_components/elements/tooltip_component.rb
|
|
88
88
|
- app/components/sdr_view_components/forms/basic_checkbox_component.rb
|
|
89
|
+
- app/components/sdr_view_components/forms/basic_file_component.rb
|
|
90
|
+
- app/components/sdr_view_components/forms/basic_radio_button_component.rb
|
|
91
|
+
- app/components/sdr_view_components/forms/basic_text_area_component.rb
|
|
92
|
+
- app/components/sdr_view_components/forms/basic_text_field_component.rb
|
|
89
93
|
- app/components/sdr_view_components/forms/button_component.rb
|
|
90
|
-
- app/components/sdr_view_components/forms/checkbox_component.html.erb
|
|
91
94
|
- app/components/sdr_view_components/forms/checkbox_component.rb
|
|
92
95
|
- app/components/sdr_view_components/forms/field_component.html.erb
|
|
93
96
|
- app/components/sdr_view_components/forms/field_component.rb
|
|
97
|
+
- app/components/sdr_view_components/forms/file_component.rb
|
|
94
98
|
- app/components/sdr_view_components/forms/help_text_component.html.erb
|
|
95
99
|
- app/components/sdr_view_components/forms/help_text_component.rb
|
|
96
100
|
- app/components/sdr_view_components/forms/invalid_feedback_component.rb
|
|
97
101
|
- app/components/sdr_view_components/forms/invalid_feedback_support.rb
|
|
98
102
|
- app/components/sdr_view_components/forms/label_component.html.erb
|
|
99
103
|
- app/components/sdr_view_components/forms/label_component.rb
|
|
104
|
+
- app/components/sdr_view_components/forms/radio_button_component.rb
|
|
100
105
|
- app/components/sdr_view_components/forms/submit_component.html.erb
|
|
101
106
|
- app/components/sdr_view_components/forms/submit_component.rb
|
|
107
|
+
- app/components/sdr_view_components/forms/text_area_component.rb
|
|
108
|
+
- app/components/sdr_view_components/forms/text_field_component.rb
|
|
102
109
|
- app/components/sdr_view_components/forms/toggle_component.html.erb
|
|
103
110
|
- app/components/sdr_view_components/forms/toggle_component.rb
|
|
104
111
|
- app/components/sdr_view_components/forms/toggle_option_component.html.erb
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<%= tag.div container_args do %>
|
|
2
|
-
<%= render SdrViewComponents::Forms::BasicCheckboxComponent.new(form:, field_name:, data:, **input_args) %>
|
|
3
|
-
<%= render SdrViewComponents::Forms::LabelComponent.new(form:, field_name:, **label_args) %>
|
|
4
|
-
<%= render SdrViewComponents::Forms::HelpTextComponent.new(**help_text_args) %>
|
|
5
|
-
<%= render SdrViewComponents::Forms::InvalidFeedbackComponent.new(form:, field_name:) %>
|
|
6
|
-
<% end %>
|