sdr_view_components 0.1.14 → 0.2.1
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 +55 -38
- data/app/assets/sdr_view_components.css +110 -0
- data/app/components/sdr_view_components/elements/heading_component.rb +3 -1
- data/app/components/sdr_view_components/elements/icon_button_component.rb +10 -0
- data/app/components/sdr_view_components/elements/spinner_component.html.erb +2 -2
- data/app/components/sdr_view_components/elements/spinner_component.rb +5 -4
- data/app/components/sdr_view_components/elements/tabs/pane_component.html.erb +3 -0
- data/app/components/sdr_view_components/elements/tabs/pane_component.rb +27 -0
- data/app/components/sdr_view_components/elements/tabs/tab_component.html.erb +3 -0
- data/app/components/sdr_view_components/elements/tabs/tab_component.rb +42 -0
- data/app/components/sdr_view_components/elements/tabs/tab_list_component.html.erb +9 -0
- data/app/components/sdr_view_components/elements/tabs/tab_list_component.rb +33 -0
- data/app/components/sdr_view_components/elements/toast_component.rb +1 -1
- data/app/components/sdr_view_components/tables/base_table_component.html.erb +32 -0
- data/app/components/sdr_view_components/tables/base_table_component.rb +69 -0
- data/app/components/sdr_view_components/tables/cell_component.html.erb +3 -0
- data/app/components/sdr_view_components/tables/cell_component.rb +21 -0
- data/app/components/sdr_view_components/tables/header_component.html.erb +4 -0
- data/app/components/sdr_view_components/tables/header_component.rb +22 -0
- data/app/components/sdr_view_components/tables/list_cell_component.html.erb +5 -0
- data/app/components/sdr_view_components/tables/list_cell_component.rb +22 -0
- data/app/components/sdr_view_components/tables/raw_table_component.rb +10 -0
- data/app/components/sdr_view_components/tables/row_component.html.erb +24 -0
- data/app/components/sdr_view_components/tables/row_component.rb +32 -0
- data/app/components/sdr_view_components/tables/table_component.rb +10 -0
- data/app/views/layouts/lookbook.html.erb +46 -0
- data/lib/sdr_view_components/configuration.rb +22 -0
- data/lib/sdr_view_components/engine.rb +17 -7
- data/lib/sdr_view_components/error.rb +7 -0
- data/lib/sdr_view_components/version.rb +1 -1
- data/lib/sdr_view_components.rb +2 -0
- data/spec/components/previews/sdr_view_components/elements/alert_component_preview.rb +71 -0
- data/spec/components/previews/sdr_view_components/elements/banner_component_preview.rb +58 -0
- data/spec/components/previews/sdr_view_components/elements/breadcrumb_nav_component_preview.rb +52 -0
- data/spec/components/previews/sdr_view_components/elements/button_component_preview.rb +71 -0
- data/spec/components/previews/sdr_view_components/elements/button_form_component_preview.rb +97 -0
- data/spec/components/previews/sdr_view_components/elements/button_link_component_preview.rb +81 -0
- data/spec/components/previews/sdr_view_components/elements/card_component_preview.rb +41 -0
- data/spec/components/previews/sdr_view_components/elements/heading_component_preview.rb +51 -0
- data/spec/components/previews/sdr_view_components/elements/horizontal_rule_component_preview/default.html.erb +5 -0
- data/spec/components/previews/sdr_view_components/elements/horizontal_rule_component_preview.rb +9 -0
- data/spec/components/previews/sdr_view_components/elements/icon_button_component_preview.rb +17 -0
- data/spec/components/previews/sdr_view_components/elements/icon_button_link_component_preview.rb +15 -0
- data/spec/components/previews/sdr_view_components/elements/modal_component_preview/default.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/elements/modal_component_preview/with_header_and_footer.html.erb +19 -0
- data/spec/components/previews/sdr_view_components/elements/modal_component_preview/without_size.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/elements/modal_component_preview.rb +15 -0
- data/spec/components/previews/sdr_view_components/elements/progress_bar_component_preview.rb +97 -0
- data/spec/components/previews/sdr_view_components/elements/spinner_component_preview.rb +83 -0
- data/spec/components/previews/sdr_view_components/elements/tabs/tab_list_component_preview/default_variant.html.erb +12 -0
- data/spec/components/previews/sdr_view_components/elements/tabs/tab_list_component_preview/underline_variant.html.erb +12 -0
- data/spec/components/previews/sdr_view_components/elements/tabs/tab_list_component_preview/with_header.html.erb +16 -0
- data/spec/components/previews/sdr_view_components/elements/tabs/tab_list_component_preview.rb +16 -0
- data/spec/components/previews/sdr_view_components/elements/toast_component_preview.rb +29 -0
- data/spec/components/previews/sdr_view_components/elements/tooltip_component_preview/default.html.erb +13 -0
- data/spec/components/previews/sdr_view_components/elements/tooltip_component_preview.rb +9 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_checkbox_component_preview/checked.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_checkbox_component_preview/default.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_checkbox_component_preview/disabled.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_checkbox_component_preview.rb +17 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview/default.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview/with_accept.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview/with_multiple.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview/with_required.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview.rb +25 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_radio_button_component_preview/checked.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_radio_button_component_preview/default.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_radio_button_component_preview/disabled.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_radio_button_component_preview.rb +17 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview/default.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview/with_placeholder.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview/with_required.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview/with_rows.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview.rb +19 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview/default.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview/disabled.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview/required.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview/with_placeholder.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview.rb +19 -0
- data/spec/components/previews/sdr_view_components/forms/checkbox_component_preview/checked.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/checkbox_component_preview/default.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/checkbox_component_preview/disabled.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/checkbox_component_preview/with_additional_container_content.html.erb +12 -0
- data/spec/components/previews/sdr_view_components/forms/checkbox_component_preview/with_help_text.html.erb +10 -0
- data/spec/components/previews/sdr_view_components/forms/checkbox_component_preview/with_label.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/checkbox_component_preview/with_validation_error.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/checkbox_component_preview.rb +33 -0
- data/spec/components/previews/sdr_view_components/forms/file_component_preview/default.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/file_component_preview/with_additional_container_content.html.erb +14 -0
- data/spec/components/previews/sdr_view_components/forms/file_component_preview/with_help_text.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/file_component_preview/with_help_text_below.html.erb +10 -0
- data/spec/components/previews/sdr_view_components/forms/file_component_preview/with_label.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/file_component_preview/with_multiple.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/file_component_preview/with_validation_error.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/file_component_preview.rb +32 -0
- data/spec/components/previews/sdr_view_components/forms/help_text_component_preview/with_block_content.html.erb +3 -0
- data/spec/components/previews/sdr_view_components/forms/help_text_component_preview/with_text.html.erb +4 -0
- data/spec/components/previews/sdr_view_components/forms/help_text_component_preview.rb +13 -0
- data/spec/components/previews/sdr_view_components/forms/label_component_preview/default.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/label_component_preview/hidden_label.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/label_component_preview/with_caption.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/label_component_preview/with_tooltip.html.erb +17 -0
- data/spec/components/previews/sdr_view_components/forms/label_component_preview.rb +17 -0
- data/spec/components/previews/sdr_view_components/forms/radio_button_component_preview/default.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_additional_container_content.html.erb +14 -0
- data/spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_help_text.html.erb +10 -0
- data/spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_help_text_below.html.erb +11 -0
- data/spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_label.html.erb +10 -0
- data/spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_validation_error.html.erb +11 -0
- data/spec/components/previews/sdr_view_components/forms/radio_button_component_preview.rb +30 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview/danger.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview/default.html.erb +5 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview/info.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview/primary.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview/secondary.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview/success.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview/warning.html.erb +6 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview/with_block_content_and_value.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview/with_form_id.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/submit_component_preview.rb +29 -0
- data/spec/components/previews/sdr_view_components/forms/text_area_component_preview/default.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_additional_container_content.html.erb +12 -0
- data/spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_help_text.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_help_text_below.html.erb +10 -0
- data/spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_hidden_label.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_mark_required.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_validation_error.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_area_component_preview.rb +32 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/default.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/disabled.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/label_hidden.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/marked_required.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/required.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_additional_container_content.html.erb +12 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_help_text.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_help_text_below.html.erb +10 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_placeholder.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_validation_error.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/forms/text_field_component_preview.rb +40 -0
- data/spec/components/previews/sdr_view_components/forms/toggle_component_preview/default.html.erb +11 -0
- data/spec/components/previews/sdr_view_components/forms/toggle_component_preview/with_validation_error.html.erb +12 -0
- data/spec/components/previews/sdr_view_components/forms/toggle_component_preview.rb +20 -0
- data/spec/components/previews/sdr_view_components/structure/footer_component_preview.rb +11 -0
- data/spec/components/previews/sdr_view_components/structure/header_component_preview/dark_variant.html.erb +15 -0
- data/spec/components/previews/sdr_view_components/structure/header_component_preview/dark_variant_with_background_color.html.erb +15 -0
- data/spec/components/previews/sdr_view_components/structure/header_component_preview/light_variant.html.erb +15 -0
- data/spec/components/previews/sdr_view_components/structure/header_component_preview/no_rosette.html.erb +15 -0
- data/spec/components/previews/sdr_view_components/structure/header_component_preview/white_variant.html.erb +15 -0
- data/spec/components/previews/sdr_view_components/structure/header_component_preview.rb +16 -0
- data/spec/components/previews/sdr_view_components/tables/cell_component_preview/default.html.erb +9 -0
- data/spec/components/previews/sdr_view_components/tables/cell_component_preview/with_colspan.html.erb +17 -0
- data/spec/components/previews/sdr_view_components/tables/cell_component_preview.rb +11 -0
- data/spec/components/previews/sdr_view_components/tables/header_component_preview/default.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/tables/header_component_preview/with_tooltip.html.erb +19 -0
- data/spec/components/previews/sdr_view_components/tables/header_component_preview.rb +11 -0
- data/spec/components/previews/sdr_view_components/tables/list_cell_component_preview/with_item_values.html.erb +7 -0
- data/spec/components/previews/sdr_view_components/tables/list_cell_component_preview/with_items.html.erb +11 -0
- data/spec/components/previews/sdr_view_components/tables/list_cell_component_preview.rb +27 -0
- data/spec/components/previews/sdr_view_components/tables/raw_table_component_preview/default.html.erb +26 -0
- data/spec/components/previews/sdr_view_components/tables/raw_table_component_preview.rb +9 -0
- data/spec/components/previews/sdr_view_components/tables/row_component_preview/label_only.html.erb +5 -0
- data/spec/components/previews/sdr_view_components/tables/row_component_preview/with_cells.html.erb +13 -0
- data/spec/components/previews/sdr_view_components/tables/row_component_preview/with_first_value_and_values.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/tables/row_component_preview/with_label_content.html.erb +11 -0
- data/spec/components/previews/sdr_view_components/tables/row_component_preview/with_tooltip.html.erb +18 -0
- data/spec/components/previews/sdr_view_components/tables/row_component_preview/with_value.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/tables/row_component_preview/with_values.html.erb +8 -0
- data/spec/components/previews/sdr_view_components/tables/row_component_preview.rb +21 -0
- data/spec/components/previews/sdr_view_components/tables/table_component_preview.rb +81 -0
- metadata +163 -6
- data/app/assets/stylesheets/styles.scss +0 -118
- data/app/components/component_support/file_hierarchy.rb +0 -22
- data/app/components/sdr_view_components/forms/button_component.rb +0 -42
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Tables
|
|
5
|
+
class RowComponentPreview < ViewComponent::Preview
|
|
6
|
+
# @!group Values
|
|
7
|
+
def with_values; end
|
|
8
|
+
def with_value; end
|
|
9
|
+
def with_cells; end
|
|
10
|
+
def with_first_value_and_values; end
|
|
11
|
+
# @!endgroup
|
|
12
|
+
|
|
13
|
+
# @!group Labels
|
|
14
|
+
def label_only; end
|
|
15
|
+
def with_label_content; end
|
|
16
|
+
# @!endgroup
|
|
17
|
+
|
|
18
|
+
def with_tooltip; end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SdrViewComponents
|
|
4
|
+
module Tables
|
|
5
|
+
class TableComponentPreview < ViewComponent::Preview
|
|
6
|
+
# @!group Variants
|
|
7
|
+
|
|
8
|
+
def h3_variant
|
|
9
|
+
render(SdrViewComponents::Tables::TableComponent.new(label: 'Sample Data')) do |component|
|
|
10
|
+
component.with_row(label: 'Item 1', values: ['Value A', 'Value B', 'Value C'])
|
|
11
|
+
component.with_row(label: 'Item 2', values: ['Value D', 'Value E', 'Value F'])
|
|
12
|
+
component.with_row(label: 'Item 3', values: ['Value G', 'Value H', 'Value I'])
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def data_variant
|
|
17
|
+
render(SdrViewComponents::Tables::TableComponent.new(label: 'Data Records', variant: :data)) do |component|
|
|
18
|
+
component.with_row(label: 'Record 1', values: %w[Alpha Beta Gamma])
|
|
19
|
+
component.with_row(label: 'Record 2', values: %w[Delta Epsilon Zeta])
|
|
20
|
+
component.with_row(label: 'Record 3', values: %w[Eta Theta Iota])
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# @!endgroup
|
|
25
|
+
|
|
26
|
+
# @!group Headers and Caption
|
|
27
|
+
|
|
28
|
+
def with_headers
|
|
29
|
+
render(SdrViewComponents::Tables::TableComponent.new(label: 'Headers Example')) do |component|
|
|
30
|
+
component.with_header(label: 'Column 1')
|
|
31
|
+
component.with_header(label: 'Column 2')
|
|
32
|
+
component.with_header(label: 'Column 3')
|
|
33
|
+
component.with_row(label: 'Row 1', values: ['Data 1', 'Data 2', 'Data 3'])
|
|
34
|
+
component.with_row(label: 'Row 2', values: ['Data 4', 'Data 5', 'Data 6'])
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def with_caption
|
|
39
|
+
render(SdrViewComponents::Tables::TableComponent.new) do |component|
|
|
40
|
+
component.with_caption { 'Table Caption: Financial Summary' }
|
|
41
|
+
component.with_header(label: 'Month')
|
|
42
|
+
component.with_header(label: 'Revenue')
|
|
43
|
+
component.with_header(label: 'Expenses')
|
|
44
|
+
component.with_row(label: 'January', values: ['$50,000', '$35,000'])
|
|
45
|
+
component.with_row(label: 'February', values: ['$55,000', '$38,000'])
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def show_label_false
|
|
50
|
+
render(SdrViewComponents::Tables::TableComponent.new(label: 'This label is hidden',
|
|
51
|
+
show_label: false)) do |component|
|
|
52
|
+
component.with_row(label: 'Data Row', values: ['Value 1', 'Value 2', 'Value 3'])
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# @!endgroup
|
|
57
|
+
|
|
58
|
+
def empty_message
|
|
59
|
+
render(SdrViewComponents::Tables::TableComponent.new(
|
|
60
|
+
label: 'No Data Available',
|
|
61
|
+
empty_message: 'No records found. Please try again later.'
|
|
62
|
+
))
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def responsive # rubocop:disable Metrics/MethodLength
|
|
66
|
+
render(SdrViewComponents::Tables::TableComponent.new(
|
|
67
|
+
label: 'Responsive Table',
|
|
68
|
+
responsive: true
|
|
69
|
+
)) do |component|
|
|
70
|
+
component.with_header(label: 'Row')
|
|
71
|
+
component.with_header(label: 'Column 1')
|
|
72
|
+
component.with_header(label: 'Column 2')
|
|
73
|
+
component.with_header(label: 'Column 3')
|
|
74
|
+
component.with_header(label: 'Column 4')
|
|
75
|
+
component.with_row(label: 'Row 1', values: ['Data 1', 'Data 2', 'Data 3', 'Data 4'])
|
|
76
|
+
component.with_row(label: 'Row 2', values: ['Data 5', 'Data 6', 'Data 7', 'Data 8'])
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
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.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Collier
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rails
|
|
@@ -61,11 +61,10 @@ files:
|
|
|
61
61
|
- MIT-LICENSE
|
|
62
62
|
- README.md
|
|
63
63
|
- Rakefile
|
|
64
|
-
- app/assets/
|
|
64
|
+
- app/assets/sdr_view_components.css
|
|
65
65
|
- app/components/base_component.rb
|
|
66
66
|
- app/components/component_support/button_support.rb
|
|
67
67
|
- app/components/component_support/css_classes.rb
|
|
68
|
-
- app/components/component_support/file_hierarchy.rb
|
|
69
68
|
- app/components/sdr_view_components/elements/alert_component.html.erb
|
|
70
69
|
- app/components/sdr_view_components/elements/alert_component.rb
|
|
71
70
|
- app/components/sdr_view_components/elements/banner_component.html.erb
|
|
@@ -98,6 +97,12 @@ files:
|
|
|
98
97
|
- app/components/sdr_view_components/elements/skip_links_component.rb
|
|
99
98
|
- app/components/sdr_view_components/elements/spinner_component.html.erb
|
|
100
99
|
- app/components/sdr_view_components/elements/spinner_component.rb
|
|
100
|
+
- app/components/sdr_view_components/elements/tabs/pane_component.html.erb
|
|
101
|
+
- app/components/sdr_view_components/elements/tabs/pane_component.rb
|
|
102
|
+
- app/components/sdr_view_components/elements/tabs/tab_component.html.erb
|
|
103
|
+
- app/components/sdr_view_components/elements/tabs/tab_component.rb
|
|
104
|
+
- app/components/sdr_view_components/elements/tabs/tab_list_component.html.erb
|
|
105
|
+
- app/components/sdr_view_components/elements/tabs/tab_list_component.rb
|
|
101
106
|
- app/components/sdr_view_components/elements/toast_component.html.erb
|
|
102
107
|
- app/components/sdr_view_components/elements/toast_component.rb
|
|
103
108
|
- app/components/sdr_view_components/elements/tooltip_component.html.erb
|
|
@@ -108,7 +113,6 @@ files:
|
|
|
108
113
|
- app/components/sdr_view_components/forms/basic_radio_button_component.rb
|
|
109
114
|
- app/components/sdr_view_components/forms/basic_text_area_component.rb
|
|
110
115
|
- app/components/sdr_view_components/forms/basic_text_field_component.rb
|
|
111
|
-
- app/components/sdr_view_components/forms/button_component.rb
|
|
112
116
|
- app/components/sdr_view_components/forms/checkbox_component.rb
|
|
113
117
|
- app/components/sdr_view_components/forms/field_component.html.erb
|
|
114
118
|
- app/components/sdr_view_components/forms/field_component.rb
|
|
@@ -140,12 +144,165 @@ files:
|
|
|
140
144
|
- app/components/sdr_view_components/structure/style_override_dark_component.rb
|
|
141
145
|
- app/components/sdr_view_components/structure/style_override_light_component.html.erb
|
|
142
146
|
- app/components/sdr_view_components/structure/style_override_light_component.rb
|
|
147
|
+
- app/components/sdr_view_components/tables/base_table_component.html.erb
|
|
148
|
+
- app/components/sdr_view_components/tables/base_table_component.rb
|
|
149
|
+
- app/components/sdr_view_components/tables/cell_component.html.erb
|
|
150
|
+
- app/components/sdr_view_components/tables/cell_component.rb
|
|
151
|
+
- app/components/sdr_view_components/tables/header_component.html.erb
|
|
152
|
+
- app/components/sdr_view_components/tables/header_component.rb
|
|
153
|
+
- app/components/sdr_view_components/tables/list_cell_component.html.erb
|
|
154
|
+
- app/components/sdr_view_components/tables/list_cell_component.rb
|
|
155
|
+
- app/components/sdr_view_components/tables/raw_table_component.rb
|
|
156
|
+
- app/components/sdr_view_components/tables/row_component.html.erb
|
|
157
|
+
- app/components/sdr_view_components/tables/row_component.rb
|
|
158
|
+
- app/components/sdr_view_components/tables/table_component.rb
|
|
159
|
+
- app/views/layouts/lookbook.html.erb
|
|
143
160
|
- config/routes.rb
|
|
144
161
|
- lib/sdr_view_components.rb
|
|
162
|
+
- lib/sdr_view_components/configuration.rb
|
|
145
163
|
- lib/sdr_view_components/engine.rb
|
|
164
|
+
- lib/sdr_view_components/error.rb
|
|
146
165
|
- lib/sdr_view_components/helpers.rb
|
|
147
166
|
- lib/sdr_view_components/helpers/icon_helper.rb
|
|
148
167
|
- lib/sdr_view_components/version.rb
|
|
168
|
+
- spec/components/previews/sdr_view_components/elements/alert_component_preview.rb
|
|
169
|
+
- spec/components/previews/sdr_view_components/elements/banner_component_preview.rb
|
|
170
|
+
- spec/components/previews/sdr_view_components/elements/breadcrumb_nav_component_preview.rb
|
|
171
|
+
- spec/components/previews/sdr_view_components/elements/button_component_preview.rb
|
|
172
|
+
- spec/components/previews/sdr_view_components/elements/button_form_component_preview.rb
|
|
173
|
+
- spec/components/previews/sdr_view_components/elements/button_link_component_preview.rb
|
|
174
|
+
- spec/components/previews/sdr_view_components/elements/card_component_preview.rb
|
|
175
|
+
- spec/components/previews/sdr_view_components/elements/heading_component_preview.rb
|
|
176
|
+
- spec/components/previews/sdr_view_components/elements/horizontal_rule_component_preview.rb
|
|
177
|
+
- spec/components/previews/sdr_view_components/elements/horizontal_rule_component_preview/default.html.erb
|
|
178
|
+
- spec/components/previews/sdr_view_components/elements/icon_button_component_preview.rb
|
|
179
|
+
- spec/components/previews/sdr_view_components/elements/icon_button_link_component_preview.rb
|
|
180
|
+
- spec/components/previews/sdr_view_components/elements/modal_component_preview.rb
|
|
181
|
+
- spec/components/previews/sdr_view_components/elements/modal_component_preview/default.html.erb
|
|
182
|
+
- spec/components/previews/sdr_view_components/elements/modal_component_preview/with_header_and_footer.html.erb
|
|
183
|
+
- spec/components/previews/sdr_view_components/elements/modal_component_preview/without_size.html.erb
|
|
184
|
+
- spec/components/previews/sdr_view_components/elements/progress_bar_component_preview.rb
|
|
185
|
+
- spec/components/previews/sdr_view_components/elements/spinner_component_preview.rb
|
|
186
|
+
- spec/components/previews/sdr_view_components/elements/tabs/tab_list_component_preview.rb
|
|
187
|
+
- spec/components/previews/sdr_view_components/elements/tabs/tab_list_component_preview/default_variant.html.erb
|
|
188
|
+
- spec/components/previews/sdr_view_components/elements/tabs/tab_list_component_preview/underline_variant.html.erb
|
|
189
|
+
- spec/components/previews/sdr_view_components/elements/tabs/tab_list_component_preview/with_header.html.erb
|
|
190
|
+
- spec/components/previews/sdr_view_components/elements/toast_component_preview.rb
|
|
191
|
+
- spec/components/previews/sdr_view_components/elements/tooltip_component_preview.rb
|
|
192
|
+
- spec/components/previews/sdr_view_components/elements/tooltip_component_preview/default.html.erb
|
|
193
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_checkbox_component_preview.rb
|
|
194
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_checkbox_component_preview/checked.html.erb
|
|
195
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_checkbox_component_preview/default.html.erb
|
|
196
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_checkbox_component_preview/disabled.html.erb
|
|
197
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview.rb
|
|
198
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview/default.html.erb
|
|
199
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview/with_accept.html.erb
|
|
200
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview/with_multiple.html.erb
|
|
201
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_file_component_preview/with_required.html.erb
|
|
202
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_radio_button_component_preview.rb
|
|
203
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_radio_button_component_preview/checked.html.erb
|
|
204
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_radio_button_component_preview/default.html.erb
|
|
205
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_radio_button_component_preview/disabled.html.erb
|
|
206
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview.rb
|
|
207
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview/default.html.erb
|
|
208
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview/with_placeholder.html.erb
|
|
209
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview/with_required.html.erb
|
|
210
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_area_component_preview/with_rows.html.erb
|
|
211
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview.rb
|
|
212
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview/default.html.erb
|
|
213
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview/disabled.html.erb
|
|
214
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview/required.html.erb
|
|
215
|
+
- spec/components/previews/sdr_view_components/forms/basic/basic_text_field_component_preview/with_placeholder.html.erb
|
|
216
|
+
- spec/components/previews/sdr_view_components/forms/checkbox_component_preview.rb
|
|
217
|
+
- spec/components/previews/sdr_view_components/forms/checkbox_component_preview/checked.html.erb
|
|
218
|
+
- spec/components/previews/sdr_view_components/forms/checkbox_component_preview/default.html.erb
|
|
219
|
+
- spec/components/previews/sdr_view_components/forms/checkbox_component_preview/disabled.html.erb
|
|
220
|
+
- spec/components/previews/sdr_view_components/forms/checkbox_component_preview/with_additional_container_content.html.erb
|
|
221
|
+
- spec/components/previews/sdr_view_components/forms/checkbox_component_preview/with_help_text.html.erb
|
|
222
|
+
- spec/components/previews/sdr_view_components/forms/checkbox_component_preview/with_label.html.erb
|
|
223
|
+
- spec/components/previews/sdr_view_components/forms/checkbox_component_preview/with_validation_error.html.erb
|
|
224
|
+
- spec/components/previews/sdr_view_components/forms/file_component_preview.rb
|
|
225
|
+
- spec/components/previews/sdr_view_components/forms/file_component_preview/default.html.erb
|
|
226
|
+
- spec/components/previews/sdr_view_components/forms/file_component_preview/with_additional_container_content.html.erb
|
|
227
|
+
- spec/components/previews/sdr_view_components/forms/file_component_preview/with_help_text.html.erb
|
|
228
|
+
- spec/components/previews/sdr_view_components/forms/file_component_preview/with_help_text_below.html.erb
|
|
229
|
+
- spec/components/previews/sdr_view_components/forms/file_component_preview/with_label.html.erb
|
|
230
|
+
- spec/components/previews/sdr_view_components/forms/file_component_preview/with_multiple.html.erb
|
|
231
|
+
- spec/components/previews/sdr_view_components/forms/file_component_preview/with_validation_error.html.erb
|
|
232
|
+
- spec/components/previews/sdr_view_components/forms/help_text_component_preview.rb
|
|
233
|
+
- spec/components/previews/sdr_view_components/forms/help_text_component_preview/with_block_content.html.erb
|
|
234
|
+
- spec/components/previews/sdr_view_components/forms/help_text_component_preview/with_text.html.erb
|
|
235
|
+
- spec/components/previews/sdr_view_components/forms/label_component_preview.rb
|
|
236
|
+
- spec/components/previews/sdr_view_components/forms/label_component_preview/default.html.erb
|
|
237
|
+
- spec/components/previews/sdr_view_components/forms/label_component_preview/hidden_label.html.erb
|
|
238
|
+
- spec/components/previews/sdr_view_components/forms/label_component_preview/with_caption.html.erb
|
|
239
|
+
- spec/components/previews/sdr_view_components/forms/label_component_preview/with_tooltip.html.erb
|
|
240
|
+
- spec/components/previews/sdr_view_components/forms/radio_button_component_preview.rb
|
|
241
|
+
- spec/components/previews/sdr_view_components/forms/radio_button_component_preview/default.html.erb
|
|
242
|
+
- spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_additional_container_content.html.erb
|
|
243
|
+
- spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_help_text.html.erb
|
|
244
|
+
- spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_help_text_below.html.erb
|
|
245
|
+
- spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_label.html.erb
|
|
246
|
+
- spec/components/previews/sdr_view_components/forms/radio_button_component_preview/with_validation_error.html.erb
|
|
247
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview.rb
|
|
248
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview/danger.html.erb
|
|
249
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview/default.html.erb
|
|
250
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview/info.html.erb
|
|
251
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview/primary.html.erb
|
|
252
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview/secondary.html.erb
|
|
253
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview/success.html.erb
|
|
254
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview/warning.html.erb
|
|
255
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview/with_block_content_and_value.html.erb
|
|
256
|
+
- spec/components/previews/sdr_view_components/forms/submit_component_preview/with_form_id.html.erb
|
|
257
|
+
- spec/components/previews/sdr_view_components/forms/text_area_component_preview.rb
|
|
258
|
+
- spec/components/previews/sdr_view_components/forms/text_area_component_preview/default.html.erb
|
|
259
|
+
- spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_additional_container_content.html.erb
|
|
260
|
+
- spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_help_text.html.erb
|
|
261
|
+
- spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_help_text_below.html.erb
|
|
262
|
+
- spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_hidden_label.html.erb
|
|
263
|
+
- spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_mark_required.html.erb
|
|
264
|
+
- spec/components/previews/sdr_view_components/forms/text_area_component_preview/with_validation_error.html.erb
|
|
265
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview.rb
|
|
266
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/default.html.erb
|
|
267
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/disabled.html.erb
|
|
268
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/label_hidden.html.erb
|
|
269
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/marked_required.html.erb
|
|
270
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/required.html.erb
|
|
271
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_additional_container_content.html.erb
|
|
272
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_help_text.html.erb
|
|
273
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_help_text_below.html.erb
|
|
274
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_placeholder.html.erb
|
|
275
|
+
- spec/components/previews/sdr_view_components/forms/text_field_component_preview/with_validation_error.html.erb
|
|
276
|
+
- spec/components/previews/sdr_view_components/forms/toggle_component_preview.rb
|
|
277
|
+
- spec/components/previews/sdr_view_components/forms/toggle_component_preview/default.html.erb
|
|
278
|
+
- spec/components/previews/sdr_view_components/forms/toggle_component_preview/with_validation_error.html.erb
|
|
279
|
+
- spec/components/previews/sdr_view_components/structure/footer_component_preview.rb
|
|
280
|
+
- spec/components/previews/sdr_view_components/structure/header_component_preview.rb
|
|
281
|
+
- spec/components/previews/sdr_view_components/structure/header_component_preview/dark_variant.html.erb
|
|
282
|
+
- spec/components/previews/sdr_view_components/structure/header_component_preview/dark_variant_with_background_color.html.erb
|
|
283
|
+
- spec/components/previews/sdr_view_components/structure/header_component_preview/light_variant.html.erb
|
|
284
|
+
- spec/components/previews/sdr_view_components/structure/header_component_preview/no_rosette.html.erb
|
|
285
|
+
- spec/components/previews/sdr_view_components/structure/header_component_preview/white_variant.html.erb
|
|
286
|
+
- spec/components/previews/sdr_view_components/tables/cell_component_preview.rb
|
|
287
|
+
- spec/components/previews/sdr_view_components/tables/cell_component_preview/default.html.erb
|
|
288
|
+
- spec/components/previews/sdr_view_components/tables/cell_component_preview/with_colspan.html.erb
|
|
289
|
+
- spec/components/previews/sdr_view_components/tables/header_component_preview.rb
|
|
290
|
+
- spec/components/previews/sdr_view_components/tables/header_component_preview/default.html.erb
|
|
291
|
+
- spec/components/previews/sdr_view_components/tables/header_component_preview/with_tooltip.html.erb
|
|
292
|
+
- spec/components/previews/sdr_view_components/tables/list_cell_component_preview.rb
|
|
293
|
+
- spec/components/previews/sdr_view_components/tables/list_cell_component_preview/with_item_values.html.erb
|
|
294
|
+
- spec/components/previews/sdr_view_components/tables/list_cell_component_preview/with_items.html.erb
|
|
295
|
+
- spec/components/previews/sdr_view_components/tables/raw_table_component_preview.rb
|
|
296
|
+
- spec/components/previews/sdr_view_components/tables/raw_table_component_preview/default.html.erb
|
|
297
|
+
- spec/components/previews/sdr_view_components/tables/row_component_preview.rb
|
|
298
|
+
- spec/components/previews/sdr_view_components/tables/row_component_preview/label_only.html.erb
|
|
299
|
+
- spec/components/previews/sdr_view_components/tables/row_component_preview/with_cells.html.erb
|
|
300
|
+
- spec/components/previews/sdr_view_components/tables/row_component_preview/with_first_value_and_values.html.erb
|
|
301
|
+
- spec/components/previews/sdr_view_components/tables/row_component_preview/with_label_content.html.erb
|
|
302
|
+
- spec/components/previews/sdr_view_components/tables/row_component_preview/with_tooltip.html.erb
|
|
303
|
+
- spec/components/previews/sdr_view_components/tables/row_component_preview/with_value.html.erb
|
|
304
|
+
- spec/components/previews/sdr_view_components/tables/row_component_preview/with_values.html.erb
|
|
305
|
+
- spec/components/previews/sdr_view_components/tables/table_component_preview.rb
|
|
149
306
|
homepage: https://github.com/sul-dlss/sdr_view_components
|
|
150
307
|
licenses: []
|
|
151
308
|
metadata:
|
|
@@ -166,7 +323,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
166
323
|
- !ruby/object:Gem::Version
|
|
167
324
|
version: '0'
|
|
168
325
|
requirements: []
|
|
169
|
-
rubygems_version:
|
|
326
|
+
rubygems_version: 4.0.6
|
|
170
327
|
specification_version: 4
|
|
171
328
|
summary: Rails gem for providing SDR-specific ViewComponents.
|
|
172
329
|
test_files: []
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
-
* listed below.
|
|
4
|
-
*
|
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
-
*
|
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
|
10
|
-
* files in this directory. Styles in this file should be added after the last require_* statement.
|
|
11
|
-
* It is generally better to create a new file per style scope.
|
|
12
|
-
*
|
|
13
|
-
*= require_tree .
|
|
14
|
-
*= require_self
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
// Header
|
|
18
|
-
.cardinal {
|
|
19
|
-
--bs-dark-rgb: var(--stanford-cardinal-rgb);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.container.without-progress-bar {
|
|
23
|
-
max-width: 960px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.masthead {
|
|
27
|
-
color: white;
|
|
28
|
-
|
|
29
|
-
h1 {
|
|
30
|
-
font-size: 2.25rem;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Submission form
|
|
35
|
-
.header-help {
|
|
36
|
-
padding-left: 42px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.header-help p:last-of-type {
|
|
40
|
-
margin-bottom: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.character-circle {
|
|
44
|
-
@extend .d-inline-flex;
|
|
45
|
-
@extend .align-items-center;
|
|
46
|
-
@extend .justify-content-center;
|
|
47
|
-
@extend .rounded-circle;
|
|
48
|
-
@extend .text-white;
|
|
49
|
-
|
|
50
|
-
width: 28px;
|
|
51
|
-
height: 28px;
|
|
52
|
-
font-size: 1rem;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.character-circle.character-circle-disabled {
|
|
56
|
-
background-color: var(--stanford-60-black);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.character-circle.character-circle-success {
|
|
60
|
-
@extend .bg-success;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.character-circle.character-circle-blank {
|
|
64
|
-
@extend .border;
|
|
65
|
-
@extend .border-1;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.character-circle.character-circle-check {
|
|
69
|
-
font-family: bootstrap-icons !important;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.badge.badge-in-progress {
|
|
73
|
-
background-color: var(--stanford-60-black);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.badge.badge-completed {
|
|
77
|
-
@extend .text-bg-success;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.btn-group-toggle {
|
|
81
|
-
// Provides visible indication when selected.
|
|
82
|
-
label.btn {
|
|
83
|
-
--bs-btn-focus-box-shadow: 0 0 0 0.25rem rgb(var(--bs-btn-focus-shadow-rgb), .5);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
input:checked + label {
|
|
87
|
-
@extend .btn-primary;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
input:not(:checked) + label {
|
|
91
|
-
@extend .btn-outline-primary;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.btn-check:checked + .btn {
|
|
95
|
-
background-color: var(--stanford-digital-blue);
|
|
96
|
-
border-color: var(--stanford-digital-blue);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:not(.btn-check:checked) + .btn {
|
|
100
|
-
color: var(--stanford-digital-blue);
|
|
101
|
-
border-color: var(--stanford-digital-blue);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.card-step {
|
|
106
|
-
--bs-card-cap-padding-y: 1rem;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.banner.alert {
|
|
110
|
-
a.btn-primary {
|
|
111
|
-
color: white;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// Increase contrast for input borders
|
|
116
|
-
.form-control, .form-select, .form-check-input {
|
|
117
|
-
border-color: var(--stanford-60-black);
|
|
118
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module ComponentSupport
|
|
4
|
-
# Support methods for working with file hierarchies.
|
|
5
|
-
class FileHierarchy
|
|
6
|
-
# Determine the difference between the last path parts and the current path parts.
|
|
7
|
-
# @param [Array<String>] last_path_parts the last path parts (e.g., ['dir1', 'dir2'])
|
|
8
|
-
# @param [Array<String>] path_parts the current path parts
|
|
9
|
-
# @return [Array<String>] path parts from the current path parts that differ
|
|
10
|
-
def self.path_parts_diff(last_path_parts:, path_parts:)
|
|
11
|
-
return [] if last_path_parts == path_parts
|
|
12
|
-
|
|
13
|
-
matching_index = 0
|
|
14
|
-
loop do
|
|
15
|
-
break if path_parts[matching_index] != last_path_parts[matching_index]
|
|
16
|
-
|
|
17
|
-
matching_index += 1
|
|
18
|
-
end
|
|
19
|
-
path_parts.slice(matching_index..)
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module SdrViewComponents
|
|
4
|
-
module Forms
|
|
5
|
-
# Component for a button that is wrapped in a form
|
|
6
|
-
class ButtonComponent < BaseComponent
|
|
7
|
-
def initialize(link:, label: nil, variant: :primary, classes: [], method: :get, confirm: nil, # rubocop:disable Metrics/ParameterLists
|
|
8
|
-
top: true, data: {})
|
|
9
|
-
@link = link
|
|
10
|
-
@label = label
|
|
11
|
-
@variant = variant
|
|
12
|
-
@classes = classes
|
|
13
|
-
@method = method
|
|
14
|
-
@confirm = confirm
|
|
15
|
-
@top = top
|
|
16
|
-
@data = data
|
|
17
|
-
super()
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
attr_reader :link
|
|
21
|
-
|
|
22
|
-
def call
|
|
23
|
-
button_to(link, method: @method,
|
|
24
|
-
class: ComponentSupport::ButtonSupport.classes(variant: @variant, classes:),
|
|
25
|
-
form: { data: }) do
|
|
26
|
-
@label || content
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def classes
|
|
31
|
-
merge_classes(@classes)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def data
|
|
35
|
-
@data.tap do |data|
|
|
36
|
-
data[:turbo_frame] = '_top' if @top
|
|
37
|
-
data[:turbo_confirm] = @confirm if @confirm
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|