diff --git a/docs/app/views/examples/components/panel/_preview.html.erb b/docs/app/views/examples/components/panel/_preview.html.erb index c56e40d26f..b3fa728c58 100644 --- a/docs/app/views/examples/components/panel/_preview.html.erb +++ b/docs/app/views/examples/components/panel/_preview.html.erb @@ -13,12 +13,15 @@ Ut elementum id leo ac fringilla. icon_name: "sage-icon-warning", } %> -<%= sage_component SagePanelHeader, { title: "Basic Panel" } %> +
Panels are rich containers that allow for grouping and organizing content details.
+ +Example:
<%= sage_component SagePanel, {} do %> <%= sage_component SagePanelHeader, { - title: "Panel Header Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Morbi rhoncus mauris ut turpis gravida bibendum", + title: "Panel Header", title_tag: "h3", } do %> <%= sage_component SageButton, { @@ -43,48 +46,25 @@ Ut elementum id leo ac fringilla. <% end %> <% end %> -<%= sage_component SagePanel, {} do %> - <%= sage_component SagePanelHeader, { - title: "Panel Header", - tag: "h3", - } do %> - <%= sage_component SageSwitch, { - hide_text: true, - id: "sage-switch-1", - label_text: "Switch (checkbox)", - name: "sage-switch-1", - type: "checkbox", - value: "switch-1-value", - } %> - <%= content_for :sage_panel_header_subtext do %> - <%= sample_copy.html_safe %> - <% end %> - <% end %> - <%= sage_component SagePanelBlock, { type_block: true } do %> - <%= sample_copy.html_safe %> - <% end %> -<% end %> +All panels are made up of three basic building blocks: Header, Body, and Footer.
-<%= md(" -Panels are rich containers that allow for grouping and organizing content details. They have the following overall setup available: +This area usually contains at least a title and an icon or menu positioned in the right corner, both optional. An optional subtext element is useful for documenting the panel objective. It employs the Sage Row layout base with 24px
gutters.
.sage-panel__block
".html_safe } %>
-<%= md("A block is a completely unopinionated container meant to provide the most flexible way to group elements within a panel. This component is purely a wrapper and does not apply any layout or spacing by default so it is great for blocks of text or small groups of content within some of the other panel components. Set `type_block` to `true` to enforce open text spacing rules as established by the `sage-type` class.", use_sage_type: true) %>
+There are a few for the panel body container.
-<%= sage_component SagePanelHeader, { title: "Panel Stack .sage-panel__stack
".html_safe } %>
-<%= md("A stack is a single column of elements sitting atop each other with the standard 8px gap between each item in the stack. A common use is for stacking cards, but this is also help for presentation of several distinct lines of text content beyond open type formatting.", use_sage_type: true) %>
+A block is a completely unopinionated container meant to provide the most flexible way to group elements within a panel. This component is purely a wrapper and does not apply any layout or spacing by default so it is great for blocks of text or small groups of content within some of the other panel components. Set type_block
to true
to enforce open text spacing rules as established by the sage-type
class.
A stack is a single column of elements sitting atop each other with the standard 8px gap between each item in the stack. A common use is for stacking cards, but this is also help for presentation of several distinct lines of text content beyond open type formatting.
<%= sage_component SagePanel, {} do %> <%= sage_component SagePanelStack, {} do %> @@ -115,10 +95,10 @@ Panels are rich containers that allow for grouping and organizing content detail <% end %> <% end %> -<%= sage_component SagePanelHeader, { title: "Panel List.sage-panel__list
".html_safe } %>
-<%= md("A list is a similar to a stack but has no space between items, and each item has a border that extends into the panel's outer gutters. Lists can also have row-like layouts with elements setup inline.", use_sage_type: true) %>
+A list is a similar to a stack but has no space between items, and each item has a border that extends into the panel's outer gutters. Lists can also have row-like layouts with elements setup inline.
-<%= sage_component SagePanelSubheader, { title: "Example:" } %> <%= sage_component SagePanel, {} do %> <%= sage_component SagePanelList, {} do %> <%= sage_component SagePanelListItem, { grid_template: "et" } do %> @@ -140,10 +120,16 @@ Panels are rich containers that allow for grouping and organizing content detail <% end %> <% end %> -<%= sage_component SagePanelHeader, { title: "Panel Row.sage-panel__row
".html_safe } %>
-<%= md("A panel row is a single or isolated inline arrangement of elements. It can either be a custom component or employ one of the standard Grid Template Patterns.", use_sage_type: true) %>
+This area often contains one or more buttons that can be sent to the right edge of the panel with the align_spread: true
component attribute. It employs the Sage Row layout base with 24px
gutters.
A panel row is a single or isolated inline arrangement of elements. It can either be a custom component or employ one of the standard Grid Template Patterns.
-<%= sage_component SagePanelSubheader, { title: "Example:" } %> <%= sage_component SagePanel, {} do %> <%= sage_component SagePanelRow, { grid_template: "ete" } do %> @@ -163,10 +149,10 @@ Panels are rich containers that allow for grouping and organizing content detail <% end %> <% end %> -<%= sage_component SagePanelHeader, { title: "Panel Tiles.sage-panel__tiles
".html_safe } %>
-<%= md("Tiles are groups of elements that typically also each contain additional content but are laid out in a neat tiling pattern. Items can use the generic `.sage-panel__tile`, or be another Sage Component such as a Card. Use one of the tiling pattern modifiers to determine how many tiles appear in a row of the grid: 2-up, 3-up, and 4-up patterns.", use_sage_type: true) %>
+Tiles are groups of elements that typically also each contain additional content but are laid out in a neat tiling pattern. Items can use the generic `.sage-panel__tile`, or be another Sage Component such as a Card. Use one of the tiling pattern modifiers to determine how many tiles appear in a row of the grid: 2-up, 3-up, and 4-up patterns.
-<%= sage_component SagePanelSubheader, { title: "Example:" } %> <%= sage_component SagePanel, {} do %> <%= sage_component SagePanelTiles, { tiles_in_row: 3 } do %> <%= sage_component SageCard, {} do %> @@ -202,22 +188,10 @@ Panels are rich containers that allow for grouping and organizing content detail <% end %> <% end %> -<%= sage_component SagePanelHeader, { title: "Panel Subheader.sage-panel__subheader
".html_safe } %>
-<%= md("The Panel Subheader provides specific styles for a subheading within a panel. It is very similar in configuration to the panel header but shows with smaller type. Format the text content itself with `.sage-panel__subtitle`, which can also be used independently. An optional subtext attribute (`subtext: ""`) is useful for documenting the panel objective.", use_sage_type: true) %>
+.sage-panel__divider
".html_safe } %>
-<%= md("The Divider is a thin rule that helps to provide additional visual separation between groups within the panel.", use_sage_type: true) %>
+The Divider is a thin rule that helps to provide additional visual separation between groups within the panel.
-<%= sage_component SagePanelSubheader, { title: "Example:" } %> <%= md("Dividers can also be set to extend to the panel edges with the `--full-bleed` modifier. They may also contain label text.", use_sage_type: true) %> <%= sage_component SagePanel, {} do %> <%= sage_component SagePanelHeader, { title: "Divider:" } %> @@ -228,8 +202,10 @@ Panels are rich containers that allow for grouping and organizing content detail <%= sage_component SagePanelDivider, { bleed: true } %> <% end %> -<%= sage_component SagePanelHeader, { title: "Panel Figure.sage-panel__figure
".html_safe } %>
-<%= md("A Panel Figure contains an image that occupies a substantive space in the panel, typically filling edge to edge.See the #{link_to("Panel Figure component", pages_component_path("panel_figure"), class: "sage-link")} for more details.", use_sage_type: true) %>
+A panel figure contains an image that occupies a substantive space in the panel, typically filling edge to edge. See the Panel Figure component, for more details.
+ +.sage-panel-grid
".html_safe } %>
-<%= md("The `.sage-panel-grid` utility class can be added onto containers in order to enforce the Panel's internal grid settings.This is helpful in cases where a container of some sort is needed around contents but those contents should still recieve the standard Panel-scoped gaps.", use_sage_type: true) %>
+The .sage-panel-grid`
utility class can be added onto containers in order to enforce the Panel's internal grid settings.This is helpful in cases where a container of some sort is needed around contents but those contents should still recieve the standard Panel-scoped gaps.