primer_view_components 0.0.108 → 0.0.109
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/components/primer/alpha/action_list.css.json +1 -1
- data/app/components/primer/alpha/dialog.rb +0 -1
- data/app/components/primer/alpha/segmented_control/item.rb +1 -1
- data/app/components/primer/alpha/segmented_control.css.json +1 -1
- data/app/components/primer/beta/banner.css.json +1 -1
- data/app/components/primer/beta/banner.html.erb +2 -2
- data/app/components/primer/beta/banner.rb +2 -3
- data/app/components/primer/beta/button.css.json +1 -1
- data/app/components/primer/beta/x_banner.d.ts +1 -3
- data/app/components/primer/beta/x_banner.js +2 -4
- data/app/components/primer/beta/x_banner.ts +2 -3
- data/app/forms/name_with_question_mark_form/enabled_caption.html.erb +1 -0
- data/app/forms/name_with_question_mark_form.rb +11 -0
- data/app/lib/primer/css/layout.css +1918 -0
- data/app/lib/primer/css/layout.css.json +1 -0
- data/app/lib/primer/css/utilities.css +7304 -0
- data/app/lib/primer/css/utilities.css.json +1 -0
- data/lib/primer/classify/utilities.rb +1 -1
- data/lib/primer/forms/base.rb +7 -3
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/tasks/utilities.rake +3 -18
- data/previews/primer/forms/forms_preview/name_with_question_mark_form.html.erb +3 -0
- data/previews/primer/forms/forms_preview.rb +2 -0
- data/static/constants.json +6 -0
- metadata +9 -2
@@ -1 +1 @@
|
|
1
|
-
{"name":"
|
1
|
+
{"name":"alpha/action_list","selectors":[":root",".ActionListWrap",".ActionListWrap--inset",".ActionListWrap--divided .ActionListItem-label:before",".ActionListWrap--divided .ActionListItem-descriptionWrap--inline:before",".ActionListWrap--divided .ActionListItem-descriptionWrap--inline .ActionListItem-label:before",".ActionList-sectionDivider+.ActionListItem .ActionListItem-descriptionWrap--inline:before",".ActionList-sectionDivider+.ActionListItem .ActionListItem-label:before",".ActionListItem:first-of-type .ActionListItem-descriptionWrap--inline:before",".ActionListItem:first-of-type .ActionListItem-label:before",".ActionListWrap--divided .ActionListItem--navActive .ActionListItem-label:before",":is(.ActionListWrap--divided .ActionListItem--navActive)+.ActionListItem .ActionListItem-label:before",".ActionListItem",".ActionListItem:active",".ActionListItem:hover",".ActionListItem:hover .ActionListItem-descriptionWrap--inline:before",".ActionListItem:hover .ActionListItem-label:before",".ActionListItem:hover+.ActionListItem .ActionListItem-descriptionWrap--inline:before",".ActionListItem:hover+.ActionListItem .ActionListItem-label:before",".ActionListItem[hidden]+.ActionList-sectionDivider",".ActionListItem.ActionListItem--hasSubItem>.ActionListContent",".ActionListItem.ActionListItem--hasSubItem>.ActionListContent:hover",".ActionListItem.ActionListItem--hasSubItem>.ActionListContent:active",":is(.ActionListItem:not(.ActionListItem--hasSubItem)",".ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover",".ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover:not(.ActionListItem--navActive",":focus-visible)",".ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active",".ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active:not(.ActionListItem--navActive)","50%","to",".ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active .ActionListItem-label:before",".ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active+.ActionListItem .ActionListItem-label:before",".ActionListItem[aria-checked=true] .ActionListItem-multiSelectCheckmark",".ActionListItem[aria-selected=true] .ActionListItem-multiSelectCheckmark",".ActionListItem[aria-checked=true] .ActionListItem-singleSelectCheckmark",".ActionListItem[aria-selected=true] .ActionListItem-singleSelectCheckmark",".ActionListItem[aria-checked=true] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectIconRect",".ActionListItem[aria-selected=true] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectIconRect",".ActionListItem[aria-checked=true] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectCheckmark",".ActionListItem[aria-selected=true] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectCheckmark",".ActionListItem[aria-checked=false] .ActionListItem-multiSelectCheckmark",".ActionListItem[aria-selected=false] .ActionListItem-multiSelectCheckmark",".ActionListItem[aria-checked=false] .ActionListItem-singleSelectCheckmark",".ActionListItem[aria-selected=false] .ActionListItem-singleSelectCheckmark",".ActionListItem[aria-checked=false] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectIconRect",".ActionListItem[aria-selected=false] .ActionListItem-multiSelectIcon .ActionListItem-multiSelectIconRect",".ActionListItem[aria-checked=false] .ActionListItem-multiSelectIconRect",".ActionListItem[aria-selected=false] .ActionListItem-multiSelectIconRect","0%",".ActionListItem[aria-selected=true]",".ActionListItem[aria-selected=true]:hover",".ActionListItem[aria-selected=true]+.ActionListItem:before",".ActionListItem[aria-selected=true]:before",".ActionListItem[aria-selected=true]:after",".ActionListItem.ActionListItem--navActive:not(.ActionListItem--subItem) .ActionListItem-label",".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)",".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):hover",".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)+.ActionListItem:before",".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):before",".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):after",".ActionListItem[aria-disabled=true] .ActionListContent .ActionListItem-description",".ActionListItem[aria-disabled=true] .ActionListContent .ActionListItem-label",".ActionListItem[aria-disabled=true] .ActionListContent .ActionListItem-visual",".ActionListItem[aria-disabled=true]:hover",".ActionListItem.ActionListItem--danger .ActionListItem-label",".ActionListItem.ActionListItem--danger .ActionListItem-visual",".ActionListItem.ActionListItem--danger:hover",".ActionListItem.ActionListItem--danger:hover .ActionListItem-label",".ActionListItem.ActionListItem--danger .ActionListContent:active",".ActionListContent",".ActionListContent>:not(:last-child)",".ActionListContent:hover",".ActionListContent[aria-disabled=true] .ActionListItem-description",".ActionListContent[aria-disabled=true] .ActionListItem-label",".ActionListContent[aria-disabled=true] .ActionListItem-visual",".ActionListContent[aria-disabled=true]:hover",".ActionListContent[aria-expanded]+.ActionList--subGroup",".ActionListContent[aria-expanded]+.ActionList--subGroup .ActionListContent",".ActionListContent.ActionListContent--visual16[aria-expanded]+.ActionList--subGroup .ActionListContent",".ActionListContent.ActionListContent--visual20[aria-expanded]+.ActionList--subGroup .ActionListContent",".ActionListContent.ActionListContent--visual24[aria-expanded]+.ActionList--subGroup .ActionListContent",".ActionListContent[aria-expanded=true] .ActionListItem-collapseIcon",".ActionListContent[aria-expanded=true]+.ActionList--subGroup",".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=true]>.ActionListItem-label",".ActionListContent[aria-expanded=false] .ActionListItem-collapseIcon",".ActionListContent[aria-expanded=false]+.ActionList--subGroup",".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]",".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false] .ActionListItem-label",".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]+.ActionListItem:before",".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:before",".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:after",".ActionListContent.ActionListContent--sizeLarge",".ActionListContent.ActionListContent--sizeXLarge",".ActionListContent.ActionListContent--blockDescription .ActionListItem-visual",".ActionListItem-action--leading",".ActionListItem-visual--leading",".ActionListItem-visual--trailing",".ActionListItem-action--trailing",".ActionListItem-descriptionWrap",".ActionListItem-descriptionWrap .ActionListItem-label",".ActionListItem-descriptionWrap--inline",".ActionListItem-description",".ActionListItem-action",".ActionListItem-visual",".ActionListItem-label",".ActionListItem-label--truncate",".ActionListItem--subItem>.ActionListContent>.ActionListItem-label",".ActionListItem--withActions",".ActionListItem-trailingAction",".ActionListItem--trailingActionHover .ActionListItem-trailingAction",".ActionListItem--trailingActionHover:focus-within .ActionListItem-trailingAction",".ActionListItem--trailingActionHover:hover .ActionListItem-trailingAction",".ActionList-sectionDivider:not(:empty)",".ActionList-sectionDivider:empty",".ActionList-sectionDivider .ActionList-sectionDivider-title",".ActionList-sectionDivider--filled",".ActionList-sectionDivider--filled:empty",".ActionList-sectionDivider--filled:first-child"]}
|
@@ -54,7 +54,6 @@ module Primer
|
|
54
54
|
system_arguments[:classes]
|
55
55
|
)
|
56
56
|
system_arguments[:id] = "dialog-show-#{@system_arguments[:id]}"
|
57
|
-
system_arguments["data-show-dialog-id"] = @system_arguments[:id]
|
58
57
|
system_arguments[:data] = (system_arguments[:data] || {}).merge({ "show-dialog-id": @system_arguments[:id] })
|
59
58
|
Primer::ButtonComponent.new(**system_arguments)
|
60
59
|
}
|
@@ -19,7 +19,7 @@ module Primer
|
|
19
19
|
@selected = selected
|
20
20
|
|
21
21
|
@system_arguments = system_arguments
|
22
|
-
@system_arguments[:"data-action"] = "click:segmented-control#select"
|
22
|
+
@system_arguments[:"data-action"] = "click:segmented-control#select" if system_arguments[:href].nil?
|
23
23
|
@system_arguments[:"aria-current"] = selected
|
24
24
|
@system_arguments[:scheme] = :invisible
|
25
25
|
end
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"
|
1
|
+
{"name":"alpha/segmented_control","selectors":[".SegmentedControl",".SegmentedControl-item",".SegmentedControl-item.SegmentedControl-item--selected",".SegmentedControl-item.SegmentedControl-item--selected .Button",".SegmentedControl-item.SegmentedControl-item--selected .Button:hover",".SegmentedControl-item.SegmentedControl-item--selected+.SegmentedControl-item:before",".SegmentedControl-item.SegmentedControl-item--selected:before",".SegmentedControl-item .Button-label[data-content]:before",".SegmentedControl-item:before",".SegmentedControl-item .Button",".SegmentedControl-item .Button:focus-visible",".SegmentedControl-item .Button--small",".SegmentedControl-item .Button--small.Button--iconOnly",".SegmentedControl-item .Button--medium",".SegmentedControl-item .Button--medium.Button--iconOnly",".SegmentedControl-item .Button--large",".SegmentedControl-item .Button--large.Button--iconOnly",".SegmentedControl-item .Button--iconOnly",".SegmentedControl-item .Button--invisible.Button--invisible-noVisuals .Button-label",".SegmentedControl--fullWidth",".SegmentedControl--fullWidth .SegmentedControl-item",".SegmentedControl--fullWidth .Button--iconOnly",".SegmentedControl--fullWidth .Button-withTooltip"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"
|
1
|
+
{"name":"beta/banner","selectors":[".Banner",".Banner .Banner-actions",".Banner .Banner-visual",".Banner .Banner-visual>.octicon",".Banner .Banner-visual>*",".Banner .Banner-message",".Banner .Banner-message p:last-child",".Banner .Banner-message .Banner-title:not(:only-child)",".Banner .Banner-actions:last-child",".Banner .Banner-close",".Banner .Banner-visual .octicon",".Banner.Banner--warning",".Banner.Banner--warning .Banner-visual .octicon",".Banner.Banner--error",".Banner.Banner--error .Banner-visual .octicon",".Banner.Banner--success",".Banner.Banner--success .Banner-visual .octicon",".Banner.Banner--full",".Banner.Banner--full-whenNarrow"]}
|
@@ -12,12 +12,12 @@
|
|
12
12
|
<% end %>
|
13
13
|
<% end %>
|
14
14
|
<% if action %>
|
15
|
-
<div class="Banner-actions">
|
15
|
+
<div class="flash-action Banner-actions">
|
16
16
|
<%= action %>
|
17
17
|
</div>
|
18
18
|
<% end %>
|
19
19
|
<% if @dismissible %>
|
20
|
-
<div class="Banner-close">
|
20
|
+
<div class="flash-close Banner-close">
|
21
21
|
<%= render(
|
22
22
|
Primer::Beta::IconButton.new(
|
23
23
|
scheme: :invisible,
|
@@ -96,9 +96,6 @@ module Primer
|
|
96
96
|
|
97
97
|
@system_arguments = deny_tag_argument(**system_arguments)
|
98
98
|
@system_arguments[:tag] = :div
|
99
|
-
@system_arguments[:data] ||= {}
|
100
|
-
@system_arguments[:data][:target] = catalyst_target(field: "root")
|
101
|
-
@system_arguments[:data][:reappear] = @reappear if @reappear
|
102
99
|
@system_arguments[:classes] = class_names(
|
103
100
|
@system_arguments[:classes],
|
104
101
|
"Banner",
|
@@ -118,6 +115,8 @@ module Primer
|
|
118
115
|
@wrapper_arguments = {
|
119
116
|
tag: custom_element_name
|
120
117
|
}
|
118
|
+
|
119
|
+
@wrapper_arguments[:data] = { reappear: @reappear } if @reappear
|
121
120
|
end
|
122
121
|
|
123
122
|
private
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"
|
1
|
+
{"name":"beta/button","selectors":[":root",".Button",".Button:before",".Button:hover",".Button:active",".Button:disabled",".Button[aria-disabled=true]",".Button-withTooltip","a.Button","summary.Button","a.Button:hover","summary.Button:hover",".Button-content",".Button-content>:not(:last-child)",".Button-content--alignStart",".Button-visual",".Button-label",".Button-leadingVisual",".Button-trailingVisual",".Button-trailingAction",".Button--small",".Button--small .Button-label",".Button--small .Button-content>:not(:last-child)",".Button--large",".Button--large .Button-label",".Button--large .Button-content>:not(:last-child)",".Button--fullWidth",".Button--primary",".Button--primary:hover:not(:disabled)",".Button--primary:focus",".Button--primary:focus:not(:focus-visible)",".Button--primary:focus-visible",".Button--primary:active:not(:disabled)",".Button--primary[aria-pressed=true]",".Button--primary:disabled",".Button--primary[aria-disabled=true]",".Button--secondary",".Button--secondary:hover:not(:disabled)",".Button--secondary:active:not(:disabled)",".Button--secondary[aria-pressed=true]",".Button--secondary:disabled",".Button--secondary[aria-disabled=true]",".Button--invisible",".Button--invisible:hover:not(:disabled)",".Button--invisible:active:not(:disabled)",".Button--invisible[aria-pressed=true]",".Button--invisible:disabled",".Button--invisible[aria-disabled=true]",".Button--invisible.Button--invisible-noVisuals .Button-label",".Button--invisible .Button-visual",".Button--link",".Button--link:hover:not(:disabled)",".Button--link:focus",".Button--link:focus-visible",".Button--link:disabled",".Button--link[aria-disabled=true]",".Button--danger",".Button--danger:hover:not(:disabled)",".Button--danger:active:not(:disabled)",".Button--danger[aria-pressed=true]",".Button--danger:disabled",".Button--danger[aria-disabled=true]",".Button--iconOnly",".Button--iconOnly.Button--small",".Button--iconOnly.Button--large"]}
|
@@ -1,5 +1,4 @@
|
|
1
|
-
declare class XBannerElement extends HTMLElement {
|
2
|
-
root: HTMLElement;
|
1
|
+
export declare class XBannerElement extends HTMLElement {
|
3
2
|
titleText: HTMLElement;
|
4
3
|
dismiss(): void;
|
5
4
|
private shouldReappear;
|
@@ -9,4 +8,3 @@ declare global {
|
|
9
8
|
XBannerElement: typeof XBannerElement;
|
10
9
|
}
|
11
10
|
}
|
12
|
-
export {};
|
@@ -20,18 +20,16 @@ let XBannerElement = class XBannerElement extends HTMLElement {
|
|
20
20
|
parentElement.removeChild(this);
|
21
21
|
}
|
22
22
|
shouldReappear() {
|
23
|
-
return this.
|
23
|
+
return this.getAttribute('data-reappear') === 'true';
|
24
24
|
}
|
25
25
|
};
|
26
|
-
__decorate([
|
27
|
-
target
|
28
|
-
], XBannerElement.prototype, "root", void 0);
|
29
26
|
__decorate([
|
30
27
|
target
|
31
28
|
], XBannerElement.prototype, "titleText", void 0);
|
32
29
|
XBannerElement = __decorate([
|
33
30
|
controller
|
34
31
|
], XBannerElement);
|
32
|
+
export { XBannerElement };
|
35
33
|
if (!window.customElements.get('x-banner')) {
|
36
34
|
window.XBannerElement = XBannerElement;
|
37
35
|
window.customElements.define('x-banner', XBannerElement);
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import {controller, target} from '@github/catalyst'
|
2
2
|
|
3
3
|
@controller
|
4
|
-
class XBannerElement extends HTMLElement {
|
5
|
-
@target root: HTMLElement
|
4
|
+
export class XBannerElement extends HTMLElement {
|
6
5
|
@target titleText: HTMLElement
|
7
6
|
|
8
7
|
dismiss() {
|
@@ -23,7 +22,7 @@ class XBannerElement extends HTMLElement {
|
|
23
22
|
}
|
24
23
|
|
25
24
|
private shouldReappear(): boolean {
|
26
|
-
return this.
|
25
|
+
return this.getAttribute('data-reappear') === 'true'
|
27
26
|
}
|
28
27
|
}
|
29
28
|
|
@@ -0,0 +1 @@
|
|
1
|
+
<p class="my-test-caption">The caption for Enabled?</p>
|