primer_view_components 0.0.116 → 0.0.117
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +2 -2
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.json +1 -1
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/auto_complete/item.rb +4 -4
- data/app/components/primer/alpha/auto_complete.rb +6 -6
- data/app/components/primer/alpha/dialog.rb +0 -2
- data/app/components/primer/alpha/dropdown.rb +53 -53
- data/app/components/primer/alpha/hellip_button.rb +41 -0
- data/app/components/primer/alpha/hidden_text_expander.rb +1 -1
- data/app/components/primer/alpha/layout.rb +48 -48
- data/app/components/primer/alpha/menu.css +1 -1
- data/app/components/primer/alpha/menu.css.json +1 -1
- data/app/components/primer/alpha/menu.css.map +1 -1
- data/app/components/primer/alpha/menu.rb +5 -5
- data/app/components/primer/alpha/segmented_control.rb +20 -20
- data/app/components/primer/{tab_container_component.d.ts → alpha/tab_container.d.ts} +0 -0
- data/app/components/primer/{tab_container_component.js → alpha/tab_container.js} +0 -0
- data/app/components/primer/alpha/tab_container.rb +43 -0
- data/app/components/primer/{tab_container_component.ts → alpha/tab_container.ts} +0 -0
- data/app/components/primer/alpha/tab_nav.css +1 -1
- data/app/components/primer/alpha/tab_nav.css.json +1 -1
- data/app/components/primer/alpha/tab_nav.css.map +1 -1
- data/app/components/primer/alpha/tab_nav.rb +32 -32
- data/app/components/primer/alpha/tool_tip.js +3 -7
- data/app/components/primer/alpha/tool_tip.ts +3 -7
- data/app/components/primer/alpha/tooltip.rb +18 -18
- data/app/components/primer/alpha/underline_nav.css +1 -1
- data/app/components/primer/alpha/underline_nav.css.json +1 -1
- data/app/components/primer/alpha/underline_nav.css.map +1 -1
- data/app/components/primer/alpha/underline_nav.rb +18 -18
- data/app/components/primer/beta/auto_complete/item.rb +2 -3
- data/app/components/primer/beta/auto_complete.rb +14 -16
- data/app/components/primer/beta/avatar_stack.rb +12 -14
- data/app/components/primer/beta/blankslate.rb +0 -1
- data/app/components/primer/beta/border_box/header.rb +0 -2
- data/app/components/primer/beta/border_box.rb +0 -2
- data/app/components/primer/beta/breadcrumbs.css +1 -1
- data/app/components/primer/beta/breadcrumbs.css.json +1 -1
- data/app/components/primer/beta/breadcrumbs.css.map +1 -1
- data/app/components/primer/beta/breadcrumbs.rb +0 -1
- data/app/components/primer/beta/button.rb +9 -10
- data/app/components/primer/beta/button_group.rb +0 -1
- data/app/components/primer/beta/details.rb +0 -1
- data/app/components/primer/beta/flash.rb +0 -1
- data/app/components/primer/beta/link.rb +2 -3
- data/app/components/primer/beta/octicon.rb +0 -1
- data/app/components/primer/beta/popover.rb +0 -1
- data/app/components/primer/{state_component.css → beta/state.css} +0 -0
- data/app/components/primer/beta/state.css.json +1 -0
- data/app/components/primer/beta/state.css.map +1 -0
- data/app/components/primer/{state_component.pcss → beta/state.pcss} +0 -0
- data/app/components/primer/beta/state.rb +76 -0
- data/app/components/primer/{subhead_component.css → beta/subhead.css} +0 -0
- data/app/components/primer/beta/subhead.css.json +1 -0
- data/app/components/primer/beta/subhead.css.map +1 -0
- data/app/components/primer/{subhead_component.html.erb → beta/subhead.html.erb} +0 -0
- data/app/components/primer/{subhead_component.pcss → beta/subhead.pcss} +0 -0
- data/app/components/primer/beta/subhead.rb +135 -0
- data/app/components/primer/{timeline_item_component.css → beta/timeline_item.css} +0 -0
- data/app/components/primer/beta/timeline_item.css.json +1 -0
- data/app/components/primer/beta/timeline_item.css.map +1 -0
- data/app/components/primer/{timeline_item_component.html.erb → beta/timeline_item.html.erb} +0 -0
- data/app/components/primer/{timeline_item_component.pcss → beta/timeline_item.pcss} +0 -0
- data/app/components/primer/beta/timeline_item.rb +90 -0
- data/app/components/primer/beta/truncate.css +1 -1
- data/app/components/primer/beta/truncate.css.json +1 -1
- data/app/components/primer/beta/truncate.css.map +1 -1
- data/app/components/primer/beta/truncate.rb +0 -1
- data/app/components/primer/button_component.rb +9 -9
- data/app/components/primer/component.rb +0 -1
- data/app/components/primer/hellip_button.rb +2 -34
- data/app/components/primer/navigation/tab_component.rb +16 -16
- data/app/components/primer/primer.d.ts +1 -1
- data/app/components/primer/primer.js +1 -1
- data/app/components/primer/primer.pcss +3 -3
- data/app/components/primer/primer.ts +1 -1
- data/app/components/primer/state_component.rb +2 -69
- data/app/components/primer/subhead_component.rb +2 -128
- data/app/components/primer/tab_container_component.rb +2 -36
- data/app/components/primer/timeline_item_component.rb +5 -78
- data/app/forms/example_toggle_switch_form/example_field_caption.html.erb +1 -0
- data/app/forms/example_toggle_switch_form.rb +8 -0
- data/app/forms/submit_button_form.rb +4 -4
- data/app/lib/primer/tabbed_component_helper.rb +1 -1
- data/lib/primer/deprecations.rb +7 -13
- data/lib/primer/deprecations.yml +24 -0
- data/lib/primer/forms/button.html.erb +2 -2
- data/lib/primer/forms/dsl/toggle_switch_input.rb +35 -0
- data/lib/primer/forms/toggle_switch.html.erb +17 -0
- data/lib/primer/forms/toggle_switch.rb +19 -0
- data/lib/primer/forms/toggle_switch_form.rb +74 -0
- data/lib/primer/view_components/linters/subhead_component_migration_counter.rb +1 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/rubocop/cop/primer/component_name_migration.rb +2 -1
- data/lib/tasks/docs.rake +6 -6
- data/previews/primer/alpha/action_list_preview.rb +44 -44
- data/previews/primer/alpha/dropdown_preview.rb +97 -97
- data/previews/primer/alpha/hellip_button_preview.rb +24 -0
- data/previews/primer/alpha/layout_preview.rb +63 -63
- data/previews/primer/alpha/menu_preview/default.html.erb +5 -5
- data/previews/primer/alpha/menu_preview/playground.html.erb +5 -5
- data/previews/primer/alpha/segmented_control_preview.rb +60 -60
- data/previews/primer/alpha/tab_nav_preview.rb +22 -22
- data/previews/primer/alpha/tab_panels_preview.rb +2 -2
- data/previews/primer/alpha/tooltip_preview/with_multiple_on_a_page.html.erb +6 -6
- data/previews/primer/alpha/tooltip_preview.rb +12 -12
- data/previews/primer/alpha/underline_nav_preview.rb +4 -4
- data/previews/primer/alpha/underline_panels_preview.rb +8 -8
- data/previews/primer/beta/auto_complete_item_preview/default.html.erb +2 -2
- data/previews/primer/beta/auto_complete_item_preview/playground.html.erb +2 -2
- data/previews/primer/beta/auto_complete_item_preview/with_description.html.erb +3 -3
- data/previews/primer/beta/auto_complete_preview/with_submit_button.html.erb +2 -2
- data/previews/primer/beta/auto_complete_preview.rb +18 -18
- data/previews/primer/beta/avatar_stack_preview.rb +32 -32
- data/previews/primer/beta/blankslate_preview.rb +40 -40
- data/previews/primer/beta/border_box_preview.rb +38 -38
- data/previews/primer/beta/breadcrumbs_preview.rb +2 -2
- data/previews/primer/beta/button_group_preview.rb +10 -10
- data/previews/primer/beta/button_preview/all_schemes.html.erb +4 -4
- data/previews/primer/beta/button_preview/invisible_all_visuals.html.erb +16 -16
- data/previews/primer/beta/button_preview/leading_visual.html.erb +2 -2
- data/previews/primer/beta/button_preview/trailing_action.html.erb +2 -2
- data/previews/primer/beta/button_preview/trailing_visual.html.erb +2 -2
- data/previews/primer/beta/button_preview/with_tooltip.html.erb +2 -2
- data/previews/primer/beta/details_preview.rb +6 -6
- data/previews/primer/beta/state_preview.rb +66 -0
- data/previews/primer/beta/subhead_preview/actions.html.erb +14 -0
- data/previews/primer/beta/subhead_preview.rb +99 -0
- data/previews/primer/beta/timeline_item_preview.rb +30 -0
- data/previews/primer/forms/forms_preview/example_toggle_switch_form.html.erb +1 -0
- data/previews/primer/forms/forms_preview.rb +2 -0
- data/static/arguments.json +118 -118
- data/static/audited_at.json +6 -0
- data/static/constants.json +67 -54
- data/static/statuses.json +12 -6
- metadata +36 -23
- data/app/components/primer/state_component.css.json +0 -1
- data/app/components/primer/state_component.css.map +0 -1
- data/app/components/primer/subhead_component.css.json +0 -1
- data/app/components/primer/subhead_component.css.map +0 -1
- data/app/components/primer/timeline_item_component.css.json +0 -1
- data/app/components/primer/timeline_item_component.css.map +0 -1
- data/previews/primer/hellip_button_preview.rb +0 -22
- data/previews/primer/state_component_preview.rb +0 -26
- data/previews/primer/subhead_component_preview.rb +0 -40
- data/previews/primer/timeline_item_component_preview.rb +0 -28
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["underline_nav.pcss","<no source>"],"names":[],"mappings":"AAEA,cAME,+BAAgC,CADhC,mDAAoD,CAJpD,YAAa,CAMb,6BAA8B,CAL9B,mCAAqC,CACrC,eAAgB,CAChB,iBAeF,CAVE,uBAGE,2CAA4C,CAD5C,6BAA8B,CAD9B,gDAGF,CAEA,gCAEE,8CAA+C,CAD/C,iCAEF,CAGF,mBAEE,kBAAmB,CADnB,YAAa,CAEb,wCAA0C,CAC1C,eACF,CAEA,mBAaE,kBAAmB,CAHnB,wBAA6B,CAC7B,QAAS,CACT,mDAAqD,CANrD,6BAA8B,CAG9B,cAAe,CAPf,YAAa,CAEb,kDAAoD,CACpD,gBAAiB,CAFjB,kEAAoE,CAFpE,iBAAkB,CAMlB,iBAAkB,CAClB,kBA6DF,CAtDE,mFAKE,8CAA+C,CAF/C,6BAA8B,CAG9B,mBAAoB,CAFpB,oBAAqB,CAGrB,4CACF,CAGA,yCAKE,0BAA2B,CAJ3B,aAAc,CAEd,gDAAkD,CADlD,QAAS,CAET,iBAEF,CAIE,0BClEJ,WAAA,YAAA,SAAA,gBAAA,kBAAA,QAAA,4CAAA,UDkE8B,CAI5B,sBACE,yBAGE,yDAA0D,CAF1D,6BAA8B,CAC9B,oBAAqB,CAErB,mCACF,CACF,CAEA,wIAKE,qDAAsD,CADtD,6BAA8B,CAD9B,gDAgBF,CAXE,
|
1
|
+
{"version":3,"sources":["underline_nav.pcss","<no source>"],"names":[],"mappings":"AAEA,cAME,+BAAgC,CADhC,mDAAoD,CAJpD,YAAa,CAMb,6BAA8B,CAL9B,mCAAqC,CACrC,eAAgB,CAChB,iBAeF,CAVE,uBAGE,2CAA4C,CAD5C,6BAA8B,CAD9B,gDAGF,CAEA,gCAEE,8CAA+C,CAD/C,iCAEF,CAGF,mBAEE,kBAAmB,CADnB,YAAa,CAEb,wCAA0C,CAC1C,eACF,CAEA,mBAaE,kBAAmB,CAHnB,wBAA6B,CAC7B,QAAS,CACT,mDAAqD,CANrD,6BAA8B,CAG9B,cAAe,CAPf,YAAa,CAEb,kDAAoD,CACpD,gBAAiB,CAFjB,kEAAoE,CAFpE,iBAAkB,CAMlB,iBAAkB,CAClB,kBA6DF,CAtDE,mFAKE,8CAA+C,CAF/C,6BAA8B,CAG9B,mBAAoB,CAFpB,oBAAqB,CAGrB,4CACF,CAGA,yCAKE,0BAA2B,CAJ3B,aAAc,CAEd,gDAAkD,CADlD,QAAS,CAET,iBAEF,CAIE,0BClEJ,WAAA,YAAA,SAAA,gBAAA,kBAAA,QAAA,4CAAA,UDkE8B,CAI5B,sBACE,yBAGE,yDAA0D,CAF1D,6BAA8B,CAC9B,oBAAqB,CAErB,mCACF,CACF,CAEA,wIAKE,qDAAsD,CADtD,6BAA8B,CAD9B,gDAgBF,CAXE,0JAOE,4CAA6C,CAC7C,mDAAqD,CALrD,uBAAwB,CAGxB,UAAW,CADX,UAAW,CAJX,iBAAkB,CAClB,SAAU,CAOV,6BAA+B,CAL/B,UAMF,CAIJ,qBACE,wBAKF,CAHE,2CACE,aACF,CAGF,sBACE,iBACF,CAEA,oBACE,aAMF,CAHE,uCACE,mCACF,CAGF,sBAIE,0BAA2B,CAD3B,2BAA4B,CAF5B,wBAA0B,CAC1B,iDAGF,CAEA,wBACE,YAAa,CACb,6BACF","file":"underline_nav.css","sourcesContent":["/* UnderlineNav */\n\n.UnderlineNav {\n display: flex;\n min-height: var(--base-size-48, 48px);\n overflow-x: auto;\n overflow-y: hidden;\n box-shadow: inset 0 -1px 0 var(--color-border-muted);\n -webkit-overflow-scrolling: auto;\n justify-content: space-between;\n\n & .Counter {\n margin-left: var(--primer-control-medium-gap, 8px);\n color: var(--color-fg-default);\n background-color: var(--color-neutral-muted);\n }\n\n & .Counter--primary {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-neutral-emphasis);\n }\n}\n\n.UnderlineNav-body {\n display: flex;\n align-items: center;\n gap: var(--primer-control-medium-gap, 8px);\n list-style: none;\n}\n\n.UnderlineNav-item {\n position: relative;\n display: flex;\n padding: 0 var(--primer-control-medium-paddingInline-condensed, 8px);\n font-size: var(--primer-text-body-size-medium, 14px);\n line-height: 30px;\n color: var(--color-fg-default);\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n background-color: transparent;\n border: 0;\n border-radius: var(--primer-borderRadius-medium, 6px);\n align-items: center;\n\n &:hover,\n &:focus,\n &:focus-visible {\n color: var(--color-fg-default);\n text-decoration: none;\n border-bottom-color: var(--color-neutral-muted);\n outline-offset: -2px;\n transition: border-bottom-color 0.12s ease-out;\n }\n\n /* renders a visibly hidden \"copy\" of the label in bold, reserving box space for when label becomes bold on selected */\n & [data-content]::before {\n display: block;\n height: 0;\n font-weight: var(--base-text-weight-semibold, 600);\n visibility: hidden;\n content: attr(data-content);\n }\n\n /* increase touch target area */\n &::before {\n @mixin minTouchTarget 48px;\n }\n\n /* hover state was \"sticking\" on mobile after click */\n @media (pointer: fine) {\n &:hover {\n color: var(--color-fg-default);\n text-decoration: none;\n background: var(--color-action-list-item-default-hover-bg);\n transition: background 0.12s ease-out;\n }\n }\n\n &.selected,\n &[role='tab'][aria-selected='true'],\n &[aria-current]:not([aria-current='false']) {\n font-weight: var(--base-text-weight-semibold, 600);\n color: var(--color-fg-default);\n border-bottom-color: var(--color-primer-border-active);\n\n /* current/selected underline */\n &::after {\n position: absolute;\n right: 50%;\n bottom: calc(50% - 25px); /* 48px total height / 2 (24px) + 1px */\n width: 100%;\n height: 2px;\n content: '';\n background: var(--color-primer-border-active);\n border-radius: var(--primer-borderRadius-medium, 6px);\n transform: translate(50%, -50%);\n }\n }\n}\n\n.UnderlineNav--right {\n justify-content: flex-end;\n\n & .UnderlineNav-actions {\n flex: 1 1 auto;\n }\n}\n\n.UnderlineNav-actions {\n align-self: center;\n}\n\n.UnderlineNav--full {\n display: block;\n\n /* required for underline to align with additional wrapper element */\n & .UnderlineNav-body {\n min-height: var(--base-size-48, 48px);\n }\n}\n\n.UnderlineNav-octicon {\n display: inline !important;\n margin-right: var(--primer-control-medium-gap, 8px);\n color: var(--color-fg-muted);\n fill: var(--color-fg-muted);\n}\n\n.UnderlineNav-container {\n display: flex;\n justify-content: space-between;\n}\n",null]}
|
@@ -71,18 +71,18 @@ module Primer
|
|
71
71
|
#
|
72
72
|
# @example With icons and counters
|
73
73
|
# <%= render(Primer::Alpha::UnderlineNav.new(label: "With icons and counters")) do |component| %>
|
74
|
-
# <% component.with_tab(href: "#", selected: true) do |
|
75
|
-
# <%
|
76
|
-
# <%
|
74
|
+
# <% component.with_tab(href: "#", selected: true) do |tab| %>
|
75
|
+
# <% tab.with_icon(icon: :star) %>
|
76
|
+
# <% tab.with_text { "Item 1" } %>
|
77
77
|
# <% end %>
|
78
|
-
# <% component.with_tab(href: "#") do |
|
79
|
-
# <%
|
80
|
-
# <%
|
81
|
-
# <%
|
78
|
+
# <% component.with_tab(href: "#") do |tab| %>
|
79
|
+
# <% tab.with_icon(icon: :star) %>
|
80
|
+
# <% tab.with_text { "Item 2" } %>
|
81
|
+
# <% tab.with_counter(count: 10) %>
|
82
82
|
# <% end %>
|
83
|
-
# <% component.with_tab(href: "#") do |
|
84
|
-
# <%
|
85
|
-
# <%
|
83
|
+
# <% component.with_tab(href: "#") do |tab| %>
|
84
|
+
# <% tab.with_text { "Item 3" } %>
|
85
|
+
# <% tab.with_counter(count: 10) %>
|
86
86
|
# <% end %>
|
87
87
|
# <% component.with_actions do %>
|
88
88
|
# <%= render(Primer::ButtonComponent.new) { "Button!" } %>
|
@@ -91,11 +91,11 @@ module Primer
|
|
91
91
|
#
|
92
92
|
# @example Align right
|
93
93
|
# <%= render(Primer::Alpha::UnderlineNav.new(label: "Align right", align: :right)) do |component| %>
|
94
|
-
# <% component.with_tab(href: "#", selected: true) do |
|
95
|
-
# <%
|
94
|
+
# <% component.with_tab(href: "#", selected: true) do |tab| %>
|
95
|
+
# <% tab.with_text { "Item 1" } %>
|
96
96
|
# <% end %>
|
97
|
-
# <% component.with_tab(href: "#") do |
|
98
|
-
# <%
|
97
|
+
# <% component.with_tab(href: "#") do |tab| %>
|
98
|
+
# <% tab.with_text { "Item 2" } %>
|
99
99
|
# <% end %>
|
100
100
|
# <% component.with_actions do %>
|
101
101
|
# <%= render(Primer::ButtonComponent.new) { "Button!" } %>
|
@@ -103,10 +103,10 @@ module Primer
|
|
103
103
|
# <% end %>
|
104
104
|
#
|
105
105
|
# @example Customizing the body
|
106
|
-
# <%= render(Primer::Alpha::UnderlineNav.new(label: "Default", body_arguments: { classes: "custom-class", border: true, border_color: :accent_emphasis })) do |
|
107
|
-
# <%
|
108
|
-
# <%
|
109
|
-
# <%
|
106
|
+
# <%= render(Primer::Alpha::UnderlineNav.new(label: "Default", body_arguments: { classes: "custom-class", border: true, border_color: :accent_emphasis })) do |component| %>
|
107
|
+
# <% component.with_tab(selected: true, href: "#") { "Tab 1" }%>
|
108
|
+
# <% component.with_tab(href: "#") { "Tab 2" } %>
|
109
|
+
# <% component.with_tab(href: "#") { "Tab 3" } %>
|
110
110
|
# <% end %>
|
111
111
|
#
|
112
112
|
# @param tag [Symbol] <%= one_of(Primer::Alpha::UnderlineNav::TAG_OPTIONS) %>
|
@@ -6,7 +6,6 @@ module Primer
|
|
6
6
|
class AutoComplete
|
7
7
|
# Use `AutoCompleteItem` to list results of an auto-completed search.
|
8
8
|
class Item < Primer::Component
|
9
|
-
warn_on_deprecated_slot_setter
|
10
9
|
status :beta
|
11
10
|
|
12
11
|
ALLOWED_DESCRIPTION_VARIANTS = [:inline, :block].freeze
|
@@ -36,10 +35,10 @@ module Primer
|
|
36
35
|
renders_one :description
|
37
36
|
|
38
37
|
# @example Default
|
39
|
-
# <%= render(Primer::Beta::AutoComplete::Item.new(selected: true, value: "value")) do
|
38
|
+
# <%= render(Primer::Beta::AutoComplete::Item.new(selected: true, value: "value")) do %>
|
40
39
|
# Selected
|
41
40
|
# <% end %>
|
42
|
-
# <%= render(Primer::Beta::AutoComplete::Item.new(value: "value")) do
|
41
|
+
# <%= render(Primer::Beta::AutoComplete::Item.new(value: "value")) do %>
|
43
42
|
# Not selected
|
44
43
|
# <% end %>
|
45
44
|
#
|
@@ -12,8 +12,6 @@ module Primer
|
|
12
12
|
# However, please note that a visible label should almost always
|
13
13
|
# be used unless there is compelling reason not to. A placeholder is not a label.
|
14
14
|
class AutoComplete < Primer::Component
|
15
|
-
warn_on_deprecated_slot_setter
|
16
|
-
|
17
15
|
status :beta
|
18
16
|
|
19
17
|
DEFAULT_SIZE = :medium
|
@@ -96,8 +94,8 @@ module Primer
|
|
96
94
|
# @description
|
97
95
|
# Display any Octicon as a leading visual within the field
|
98
96
|
# @code
|
99
|
-
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", src: "/view-components/rails-app/auto_complete", input_id:"input-id-1", list_id: "list-id-1")) do |
|
100
|
-
# <%
|
97
|
+
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", src: "/view-components/rails-app/auto_complete", input_id:"input-id-1", list_id: "list-id-1")) do |component| %>
|
98
|
+
# <% component.with_leading_visual_icon(icon: :search) %>
|
101
99
|
# <% end %>
|
102
100
|
#
|
103
101
|
# @example Trailing action
|
@@ -110,42 +108,42 @@ module Primer
|
|
110
108
|
# @description
|
111
109
|
# A non-visible label may be rendered with `visually_hide_label: true`, but it is highly discouraged. See <%= link_to_accessibility %>.
|
112
110
|
# @code
|
113
|
-
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-1", list_id: "fruits-popup--custom-result-1", src: "/view-components/rails-app/auto_complete", visually_hide_label: true)) do |
|
114
|
-
# <%
|
111
|
+
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-1", list_id: "fruits-popup--custom-result-1", src: "/view-components/rails-app/auto_complete", visually_hide_label: true)) do |component| %>
|
112
|
+
# <% component.with_leading_visual_icon(icon: :search) %>
|
115
113
|
# <% end %>
|
116
114
|
#
|
117
115
|
# @example Full width field
|
118
116
|
# @description
|
119
117
|
# To allow field to span width of its container, set `full_width` to `true`.
|
120
118
|
# @code
|
121
|
-
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/view-components/rails-app/auto_complete", full_width: true)) do |
|
122
|
-
# <%
|
119
|
+
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/view-components/rails-app/auto_complete", full_width: true)) do |component| %>
|
120
|
+
# <% component.with_leading_visual_icon(icon: :search) %>
|
123
121
|
# <% end %>
|
124
122
|
#
|
125
123
|
# @example Inset variant
|
126
124
|
# @description
|
127
125
|
# Use the `inset` variant to change the input background color to be subtle.
|
128
126
|
# @code
|
129
|
-
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/view-components/rails-app/auto_complete", inset: true)) do |
|
130
|
-
# <%
|
127
|
+
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/view-components/rails-app/auto_complete", inset: true)) do |component| %>
|
128
|
+
# <% component.with_leading_visual_icon(icon: :search) %>
|
131
129
|
# <% end %>
|
132
130
|
#
|
133
131
|
# @example Monospace variant
|
134
132
|
# @description
|
135
133
|
# Use the `monospace` variant to change the input font family.
|
136
134
|
# @code
|
137
|
-
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/view-components/rails-app/auto_complete", monospace: true)) do |
|
138
|
-
# <%
|
135
|
+
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/view-components/rails-app/auto_complete", monospace: true)) do |component| %>
|
136
|
+
# <% component.with_leading_visual_icon(icon: :search) %>
|
139
137
|
# <% end %>
|
140
138
|
#
|
141
139
|
# @example With custom classes for the input
|
142
|
-
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Fruits", src: "/view-components/rails-app/auto_complete", input_id: "fruits-input--custom-input", list_id: "fruits-popup--custom-input")) do |
|
143
|
-
# <%
|
140
|
+
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Fruits", src: "/view-components/rails-app/auto_complete", input_id: "fruits-input--custom-input", list_id: "fruits-popup--custom-input")) do |component| %>
|
141
|
+
# <% component.with_input(classes: "custom-class") %>
|
144
142
|
# <% end %>
|
145
143
|
#
|
146
144
|
# @example With custom classes for the results
|
147
|
-
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Fruits", src: "/view-components/rails-app/auto_complete", input_id: "fruits-input--custom-results", list_id: "fruits-popup--custom-results")) do |
|
148
|
-
# <%
|
145
|
+
# <%= render(Primer::Beta::AutoComplete.new(label_text: "Fruits", src: "/view-components/rails-app/auto_complete", input_id: "fruits-input--custom-results", list_id: "fruits-popup--custom-results")) do |component| %>
|
146
|
+
# <% component.with_results(classes: "custom-class") %>
|
149
147
|
# <% end %>
|
150
148
|
#
|
151
149
|
# @param label_text [String] The label of the input.
|
@@ -4,8 +4,6 @@ module Primer
|
|
4
4
|
module Beta
|
5
5
|
# Use `AvatarStack` to stack multiple avatars together.
|
6
6
|
class AvatarStack < Primer::Component
|
7
|
-
warn_on_deprecated_slot_setter
|
8
|
-
|
9
7
|
status :beta
|
10
8
|
|
11
9
|
ALIGN_DEFAULT = :left
|
@@ -22,24 +20,24 @@ module Primer
|
|
22
20
|
renders_many :avatars, "Primer::Beta::Avatar"
|
23
21
|
|
24
22
|
# @example Default
|
25
|
-
# <%= render(Primer::Beta::AvatarStack.new) do |
|
26
|
-
# <%
|
27
|
-
# <%
|
28
|
-
# <%
|
23
|
+
# <%= render(Primer::Beta::AvatarStack.new) do |component| %>
|
24
|
+
# <% component.with_avatar(src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser") %>
|
25
|
+
# <% component.with_avatar(src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser") %>
|
26
|
+
# <% component.with_avatar(src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser") %>
|
29
27
|
# <% end %>
|
30
28
|
#
|
31
29
|
# @example Align right
|
32
|
-
# <%= render(Primer::Beta::AvatarStack.new(align: :right)) do |
|
33
|
-
# <%
|
34
|
-
# <%
|
35
|
-
# <%
|
30
|
+
# <%= render(Primer::Beta::AvatarStack.new(align: :right)) do |component| %>
|
31
|
+
# <% component.with_avatar(src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser") %>
|
32
|
+
# <% component.with_avatar(src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser") %>
|
33
|
+
# <% component.with_avatar(src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser") %>
|
36
34
|
# <% end %>
|
37
35
|
#
|
38
36
|
# @example With tooltip
|
39
|
-
# <%= render(Primer::Beta::AvatarStack.new(tooltipped: true, body_arguments: { label: 'This is a tooltip!' })) do |
|
40
|
-
# <%
|
41
|
-
# <%
|
42
|
-
# <%
|
37
|
+
# <%= render(Primer::Beta::AvatarStack.new(tooltipped: true, body_arguments: { label: 'This is a tooltip!' })) do |component| %>
|
38
|
+
# <% component.with_avatar(src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser") %>
|
39
|
+
# <% component.with_avatar(src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser") %>
|
40
|
+
# <% component.with_avatar(src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser") %>
|
43
41
|
# <% end %>
|
44
42
|
#
|
45
43
|
# @param tag [Symbol] <%= one_of(Primer::Beta::AvatarStack::TAG_OPTIONS) %>
|
@@ -11,7 +11,6 @@ module Primer
|
|
11
11
|
# - `secondary_action` text should be meaningful out of context and clearly describe the destination. Avoid using vague text like, "Learn more" or "Click here".
|
12
12
|
# - The blankslate can leverage the spinner component, which will communicate to screen reader users that the content is still loading.
|
13
13
|
class Blankslate < Primer::Component
|
14
|
-
warn_on_deprecated_slot_setter
|
15
14
|
status :beta
|
16
15
|
|
17
16
|
VISUAL_OPTIONS = %i[icon spinner image].freeze
|
@@ -7,8 +7,6 @@ module Primer
|
|
7
7
|
#
|
8
8
|
# @accessibility When using `header.with_title`, set `tag` to one of `h1`, `h2`, `h3`, etc. based on what is appropriate for the page context. <%= link_to_heading_practices %>
|
9
9
|
class Header < Primer::Component
|
10
|
-
warn_on_deprecated_slot_setter
|
11
|
-
|
12
10
|
status :beta
|
13
11
|
|
14
12
|
TITLE_TAG_FALLBACK = :h2
|
@@ -1 +1 @@
|
|
1
|
-
.breadcrumb-item{display:inline-block;list-style:none;margin-left:-.35em;white-space:nowrap}.breadcrumb-item:after{border-right:.1em solid var(--color-fg-muted);content:"";display:inline-block;height:.8em;margin:0 .5em;transform:rotate(15deg)}.breadcrumb-item:first-child{margin-left:0}
|
1
|
+
.breadcrumb-item{display:inline-block;list-style:none;margin-left:-.35em;white-space:nowrap}.breadcrumb-item:after{border-right:.1em solid var(--color-fg-muted);content:"";display:inline-block;height:.8em;margin:0 .5em;transform:rotate(15deg)}.breadcrumb-item:first-child{margin-left:0}.breadcrumb-item-selected:after,.breadcrumb-item[aria-current]:not([aria-current=false]):after{content:none}.breadcrumb-item-selected a{color:var(--color-fg-default)}
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"beta/breadcrumbs","selectors":[".breadcrumb-item",".breadcrumb-item:after",".breadcrumb-item:first-child","
|
1
|
+
{"name":"beta/breadcrumbs","selectors":[".breadcrumb-item",".breadcrumb-item:after",".breadcrumb-item:first-child",".breadcrumb-item-selected:after",".breadcrumb-item[aria-current]:not([aria-current=false]):after",".breadcrumb-item-selected a"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["breadcrumbs.pcss"],"names":[],"mappings":"AAAA,iBACE,oBAAqB,CAGrB,eAAgB,CAFhB,kBAAoB,CACpB,kBAeF,CAZE,uBAKE,6CAA+C,CAD/C,UAAW,CAHX,oBAAqB,CACrB,WAAa,CACb,aAAe,CAGf,uBACF,CAEA,6BACE,aACF,CAKA,
|
1
|
+
{"version":3,"sources":["breadcrumbs.pcss"],"names":[],"mappings":"AAAA,iBACE,oBAAqB,CAGrB,eAAgB,CAFhB,kBAAoB,CACpB,kBAeF,CAZE,uBAKE,6CAA+C,CAD/C,UAAW,CAHX,oBAAqB,CACrB,WAAa,CACb,aAAe,CAGf,uBACF,CAEA,6BACE,aACF,CAKA,+FACE,YACF,CAGF,4BACE,6BACF","file":"breadcrumbs.css","sourcesContent":[".breadcrumb-item {\n display: inline-block;\n margin-left: -0.35em;\n white-space: nowrap;\n list-style: none;\n\n &::after {\n display: inline-block;\n height: 0.8em;\n margin: 0 0.5em;\n content: '';\n border-right: 0.1em solid var(--color-fg-muted);\n transform: rotate(15deg);\n }\n\n &:first-child {\n margin-left: 0;\n }\n}\n\n.breadcrumb-item-selected,\n.breadcrumb-item[aria-current]:not([aria-current='false']) {\n &::after {\n content: none;\n }\n}\n\n.breadcrumb-item-selected a {\n color: var(--color-fg-default);\n}\n"]}
|
@@ -17,7 +17,6 @@ module Primer
|
|
17
17
|
#
|
18
18
|
# For more information on the breadcrumbs pattern implemented by this component, see [WAI-ARIA 1.1 Breadcrumb](https://www.w3.org/TR/wai-aria-practices-1.1/#breadcrumb).
|
19
19
|
class Breadcrumbs < Primer::Component
|
20
|
-
warn_on_deprecated_slot_setter
|
21
20
|
status :beta
|
22
21
|
|
23
22
|
PADDING_MESSAGE = "Padding system arguments are not allowed on Breadcrumbs. Consider using margins instead."
|
@@ -4,7 +4,6 @@ module Primer
|
|
4
4
|
module Beta
|
5
5
|
# Use `Button` for actions (e.g. in forms). Use links for destinations, or moving from one page to another.
|
6
6
|
class Button < Primer::Component
|
7
|
-
warn_on_deprecated_slot_setter
|
8
7
|
status :beta
|
9
8
|
|
10
9
|
DEFAULT_SCHEME = :default
|
@@ -103,21 +102,21 @@ module Primer
|
|
103
102
|
# <%= render(Primer::Beta::Button.new(block: :true, scheme: :primary)) { "Primary full width" } %>
|
104
103
|
#
|
105
104
|
# @example With leading visual
|
106
|
-
# <%= render(Primer::Beta::Button.new) do |
|
107
|
-
# <%
|
105
|
+
# <%= render(Primer::Beta::Button.new) do |component| %>
|
106
|
+
# <% component.with_leading_visual_icon(icon: :star) %>
|
108
107
|
# Button
|
109
108
|
# <% end %>
|
110
109
|
#
|
111
110
|
# @example With trailing visual
|
112
|
-
# <%= render(Primer::Beta::Button.new) do |
|
113
|
-
# <%
|
111
|
+
# <%= render(Primer::Beta::Button.new) do |component| %>
|
112
|
+
# <% component.with_trailing_visual_counter(count: 15) %>
|
114
113
|
# Button
|
115
114
|
# <% end %>
|
116
115
|
#
|
117
116
|
# @example With leading and trailing visuals
|
118
|
-
# <%= render(Primer::Beta::Button.new) do |
|
119
|
-
# <%
|
120
|
-
# <%
|
117
|
+
# <%= render(Primer::Beta::Button.new) do |component| %>
|
118
|
+
# <% component.with_leading_visual_icon(icon: :star) %>
|
119
|
+
# <% component.with_trailing_visual_counter(count: 15) %>
|
121
120
|
# Button
|
122
121
|
# <% end %>
|
123
122
|
#
|
@@ -125,8 +124,8 @@ module Primer
|
|
125
124
|
# @description
|
126
125
|
# Use tooltips sparingly and as a last resort. Consult the <%= link_to_component(Primer::Alpha::Tooltip) %> documentation for more information.
|
127
126
|
# @code
|
128
|
-
# <%= render(Primer::Beta::Button.new(id: "button-with-tooltip")) do |
|
129
|
-
# <%
|
127
|
+
# <%= render(Primer::Beta::Button.new(id: "button-with-tooltip")) do |component| %>
|
128
|
+
# <% component.with_tooltip(text: "Tooltip text") %>
|
130
129
|
# Button
|
131
130
|
# <% end %>
|
132
131
|
#
|
@@ -4,7 +4,6 @@ module Primer
|
|
4
4
|
module Beta
|
5
5
|
# Use `Link` for navigating from one page to another. `Link` styles anchor tags with default blue styling and hover text-decoration.
|
6
6
|
class Link < Primer::Component
|
7
|
-
warn_on_deprecated_slot_setter
|
8
7
|
status :beta
|
9
8
|
|
10
9
|
DEFAULT_SCHEME = :default
|
@@ -51,8 +50,8 @@ module Primer
|
|
51
50
|
# @description
|
52
51
|
# Use tooltips sparingly and as a last resort. Consult the <%= link_to_component(Primer::Alpha::Tooltip) %> documentation for more information.
|
53
52
|
# @code
|
54
|
-
# <%= render(Primer::Beta::Link.new(href: "#", id: "link-with-tooltip")) do |
|
55
|
-
# <%
|
53
|
+
# <%= render(Primer::Beta::Link.new(href: "#", id: "link-with-tooltip")) do |component| %>
|
54
|
+
# <% component.with_tooltip(text: "Tooltip text") %>
|
56
55
|
# Link
|
57
56
|
# <% end %>
|
58
57
|
#
|
@@ -7,7 +7,6 @@ module Primer
|
|
7
7
|
# `Octicon` renders an <%= link_to_octicons %> with <%= link_to_system_arguments_docs %>.
|
8
8
|
# `Octicon` can also be rendered with the `primer_octicon` helper, which accepts the same arguments.
|
9
9
|
class Octicon < Primer::Component
|
10
|
-
warn_on_deprecated_slot_setter
|
11
10
|
status :beta
|
12
11
|
|
13
12
|
SIZE_XSMALL = :xsmall
|
@@ -6,7 +6,6 @@ module Primer
|
|
6
6
|
#
|
7
7
|
# By default, the popover renders with absolute positioning, meaning it should usually be wrapped in an element with a relative position in order to be positioned properly. To render the popover with relative positioning, use the relative property.
|
8
8
|
class Popover < Primer::Component
|
9
|
-
warn_on_deprecated_slot_setter
|
10
9
|
status :beta
|
11
10
|
|
12
11
|
CARET_DEFAULT = :top
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"beta/state","selectors":[".State",".state",".State--draft",".State--open",".State--merged",".State--closed",".State--small",".State--small .octicon"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["state.pcss"],"names":[],"mappings":"AAIA,cASE,iBAAkB,CAPlB,oBAAqB,CAErB,kDAAoD,CACpD,8CAAgD,CAChD,2DAA6D,CAH7D,kEAAoE,CAIpE,iBAAkB,CAClB,kBAEF,CAEA,4BAIE,8CAA+C,CAC/C,qDAA6D,CAF7D,iCAGF,CAEA,aAEE,2CACF,CAEA,4BAJE,iCAOF,CAHA,eAEE,2CACF,CAEA,eAEE,6CAA8C,CAD9C,iCAEF,CAIA,cAEE,iDAAmD,CACnD,oCAAsC,CAFtC,cAOF,CAHE,uBACE,SACF","file":"state.css","sourcesContent":["/* State */\n\n/* Default 32px */\n\n.state, /* TODO: Deprecate */\n.State {\n display: inline-block;\n padding: 5px var(--primer-control-medium-paddingInline-normal, 12px);\n font-size: var(--primer-text-body-size-medium, 14px);\n font-weight: var(--base-text-weight-medium, 500);\n line-height: var(--primer-control-medium-lineBoxHeight, 20px);\n text-align: center;\n white-space: nowrap;\n border-radius: 2em;\n}\n\n.state, /* TODO: Deprecate */\n.State,\n.State--draft {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-neutral-emphasis);\n border: var(--primer-borderWidth-thin, 1px) solid transparent;\n}\n\n.State--open {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-open-emphasis);\n}\n\n.State--merged {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-done-emphasis);\n}\n\n.State--closed {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-closed-emphasis);\n}\n\n/* Small 24px */\n\n.State--small {\n padding: 0 10px;\n font-size: var(--primer-text-body-size-small, 12px);\n line-height: var(--base-size-24, 24px);\n\n & .octicon {\n width: 1em; /* Ensures different icons don't change State indicator width */\n }\n}\n"]}
|
File without changes
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Primer
|
4
|
+
module Beta
|
5
|
+
# Use `State` for rendering the status of an item.
|
6
|
+
class State < Primer::Component
|
7
|
+
status :beta
|
8
|
+
|
9
|
+
SCHEME_DEFAULT = :default
|
10
|
+
NEW_SCHEME_MAPPINGS = {
|
11
|
+
open: "State--open",
|
12
|
+
closed: "State--closed",
|
13
|
+
merged: "State--merged"
|
14
|
+
}.freeze
|
15
|
+
|
16
|
+
DEPRECATED_SCHEME_MAPPINGS = {
|
17
|
+
SCHEME_DEFAULT => "",
|
18
|
+
:green => "State--open",
|
19
|
+
:red => "State--closed",
|
20
|
+
:purple => "State--merged"
|
21
|
+
}.freeze
|
22
|
+
SCHEME_MAPPINGS = NEW_SCHEME_MAPPINGS.merge(DEPRECATED_SCHEME_MAPPINGS)
|
23
|
+
SCHEME_OPTIONS = SCHEME_MAPPINGS.keys
|
24
|
+
|
25
|
+
SIZE_DEFAULT = :default
|
26
|
+
SIZE_MAPPINGS = {
|
27
|
+
SIZE_DEFAULT => "",
|
28
|
+
:small => "State--small"
|
29
|
+
}.freeze
|
30
|
+
SIZE_OPTIONS = SIZE_MAPPINGS.keys
|
31
|
+
|
32
|
+
TAG_DEFAULT = :span
|
33
|
+
TAG_OPTIONS = [TAG_DEFAULT, :div].freeze
|
34
|
+
|
35
|
+
# @example Default
|
36
|
+
# <%= render(Primer::Beta::State.new(title: "title")) { "State" } %>
|
37
|
+
#
|
38
|
+
# @example Schemes
|
39
|
+
# <%= render(Primer::Beta::State.new(title: "title")) { "Default" } %>
|
40
|
+
# <%= render(Primer::Beta::State.new(title: "title", scheme: :open)) { "Open" } %>
|
41
|
+
# <%= render(Primer::Beta::State.new(title: "title", scheme: :closed)) { "Closed" } %>
|
42
|
+
# <%= render(Primer::Beta::State.new(title: "title", scheme: :merged)) { "Merged" } %>
|
43
|
+
#
|
44
|
+
# @example Sizes
|
45
|
+
# <%= render(Primer::Beta::State.new(title: "title")) { "Default" } %>
|
46
|
+
# <%= render(Primer::Beta::State.new(title: "title", size: :small)) { "Small" } %>
|
47
|
+
#
|
48
|
+
# @param title [String] `title` HTML attribute.
|
49
|
+
# @param scheme [Symbol] Background color. <%= one_of(Primer::Beta::State::SCHEME_OPTIONS) %>
|
50
|
+
# @param tag [Symbol] HTML tag for element. <%= one_of(Primer::Beta::State::TAG_OPTIONS) %>
|
51
|
+
# @param size [Symbol] <%= one_of(Primer::Beta::State::SIZE_OPTIONS) %>
|
52
|
+
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
53
|
+
def initialize(
|
54
|
+
title:,
|
55
|
+
scheme: SCHEME_DEFAULT,
|
56
|
+
tag: TAG_DEFAULT,
|
57
|
+
size: SIZE_DEFAULT,
|
58
|
+
**system_arguments
|
59
|
+
)
|
60
|
+
@system_arguments = system_arguments
|
61
|
+
@system_arguments[:title] = title
|
62
|
+
@system_arguments[:tag] = fetch_or_fallback(TAG_OPTIONS, tag, TAG_DEFAULT)
|
63
|
+
@system_arguments[:classes] = class_names(
|
64
|
+
@system_arguments[:classes],
|
65
|
+
"State",
|
66
|
+
SCHEME_MAPPINGS[fetch_or_fallback(SCHEME_OPTIONS, scheme, SCHEME_DEFAULT)],
|
67
|
+
SIZE_MAPPINGS[fetch_or_fallback(SIZE_OPTIONS, size, SIZE_DEFAULT)]
|
68
|
+
)
|
69
|
+
end
|
70
|
+
|
71
|
+
def call
|
72
|
+
render(Primer::BaseComponent.new(**@system_arguments)) { content }
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"beta/subhead","selectors":[".Subhead",".Subhead--spacious",".Subhead-heading",".Subhead-heading--danger",".Subhead-description",".Subhead-actions",".Subhead-actions+.Subhead-description"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["subhead.pcss"],"names":[],"mappings":"AAEA,SAIE,gFAAkF,CAHlF,YAAa,CAIb,kBAAmB,CACnB,wBAAyB,CAHzB,iDAAmD,CADnD,wDAKF,CAGA,mBACE,mCACF,CAGA,iBAGE,aAAc,CAFd,cAAe,CACf,8CAAgD,CAEhD,OACF,CAGA,yBAEE,4BAA6B,CAD7B,gDAEF,CAGA,qBAEE,2BAA4B,CAC5B,WAAY,CAFZ,kDAAoD,CAGpD,OACF,CAGA,iBAEE,iBAAkB,CAClB,wBAAyB,CAFzB,6EAAiF,CAGjF,OAKF,CAHE,sCACE,iCACF","file":"subhead.css","sourcesContent":["/* Subhead */\n\n.Subhead {\n display: flex;\n padding-bottom: var(--primer-stack-padding-condensed, 8px);\n margin-bottom: var(--primer-stack-gap-normal, 16px);\n border-bottom: var(--primer-borderWidth-thin, 1px) solid var(--color-border-muted);\n flex-flow: row wrap;\n justify-content: flex-end; /* Keep actions right aligned. */\n}\n\n/* Modifier class to give a lot of breathing room between sections of content. */\n.Subhead--spacious {\n margin-top: var(--base-size-40, 40px);\n}\n\n/* <h2> sized heading with normal font weight */\n.Subhead-heading {\n font-size: 24px;\n font-weight: var(--base-text-weight-normal, 400);\n flex: 1 1 auto;\n order: 0;\n}\n\n/* Make the text bold and red for dangerous content */\n.Subhead-heading--danger {\n font-weight: var(--base-text-weight-semibold, 600);\n color: var(--color-danger-fg);\n}\n\n/* One-liner of supporting text */\n.Subhead-description {\n font-size: var(--primer-text-body-size-medium, 14px);\n color: var(--color-fg-muted);\n flex: 1 100%;\n order: 2;\n}\n\n/* Add 1 or 2 buttons to the right of the heading */\n.Subhead-actions {\n margin: var(--base-size-4, 4px) 0 var(--base-size-4, 4px) var(--base-size-4, 4px);\n align-self: center;\n justify-content: flex-end;\n order: 1;\n\n & + .Subhead-description {\n margin-top: var(--base-size-4, 4px);\n }\n}\n"]}
|
File without changes
|
File without changes
|