Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<div style="position:sticky;top:0;" class="color-bg-accent">
<button id="overlay-show-overlay-bf3ff775-8537-4232-832c-9555d14f4214" popovertarget="overlay-bf3ff775-8537-4232-832c-9555d14f4214" aria-haspopup="true" type="button" data-view-component="true" class="Button--secondary Button--medium Button"> <span class="Button-content">
<span class="Button-label">Show Overlay</span>
</span>
</button>
<anchored-position role="dialog" id="overlay-bf3ff775-8537-4232-832c-9555d14f4214" anchor="overlay-show-overlay-bf3ff775-8537-4232-832c-9555d14f4214" align="start" side="outside-bottom" anchor-offset="normal" popover="auto" aria-labelledby="overlay-title-overlay-bf3ff775-8537-4232-832c-9555d14f4214" data-view-component="true">
<div data-view-component="true" class="Overlay Overlay--size-large">
<header data-view-component="true" class="Overlay-header Overlay-header--divided">
<div class="Overlay-headerContentWrap">
<div class="Overlay-titleWrap">
<h1 id="overlay-title-overlay-bf3ff775-8537-4232-832c-9555d14f4214" class="Overlay-title ">Large Dialog Header</h1>
</div>
<div class="Overlay-actionWrap">
<button popovertarget="overlay-bf3ff775-8537-4232-832c-9555d14f4214" popovertargetaction="hide" data-close-dialog-id="overlay-bf3ff775-8537-4232-832c-9555d14f4214" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
<path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
</svg></button>
</div>
</div>
<div data-view-component="true" class="Overlay-headerFilter"> <primer-text-field class="FormControl width-full FormControl--fullWidth">
<label class="sr-only FormControl-label" for="filter">
Filter Overlay
</label>
<div class="FormControl-input-wrap">
<input autofocus="autofocus" aria-describedby="validation-a32a442b-c0b1-4446-835e-3c95094e986a" data-target="primer-text-field.inputElement " class="FormControl-input FormControl-medium" type="text" name="filter" id="filter" />
</div>
<div class="FormControl-inlineValidation" id="validation-a32a442b-c0b1-4446-835e-3c95094e986a" hidden="hidden">
<span class="FormControl-inlineValidation--visual" data-target="primer-text-field.validationSuccessIcon" hidden><svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-check-circle-fill">
<path d="M6 0a6 6 0 1 1 0 12A6 6 0 0 1 6 0Zm-.705 8.737L9.63 4.403 8.392 3.166 5.295 6.263l-1.7-1.702L2.356 5.8l2.938 2.938Z"></path>
</svg></span>
<span class=" FormControl-inlineValidation--visual" data-target="primer-text-field.validationErrorIcon"><svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-alert-fill">
<path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path>
</svg></span>
<span></span>
</div>
</primer-text-field>
</div>
</header>
<div data-view-component="true" class="Overlay-body Overlay-body--paddingCondensed">This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
This is a long body for the overlay dialog. <br>
</div>
<div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd">Large Dialog Footer</div>
</div>
</anchored-position></div>
<div style="height:3000px;"></div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<div style="position:sticky;top:0;" class="color-bg-accent">
<%= render(Primer::Alpha::Overlay.new(title: "Dialog", role: :dialog, size: :large, padding: :condensed)) do |d| %>
<% d.with_header(title: "Large Dialog Header", divider: true) do |header| %>
<% header.with_filter do %>
<%= render Primer::Alpha::TextField.new(
autofocus: true,
visually_hide_label:
true,
name: "filter",
label: "Filter Overlay"
) %>
<% end %>
<% end %>
<% d.with_show_button { "Show Overlay" } %>
<% d.with_footer { "Large Dialog Footer" } %>
<% d.with_body { "This is a long body for the overlay dialog. <br>".html_safe * 20 } %>
<% end %>
</div>
<div style="height:3000px;"></div>

app/components/primer/alpha/overlay.css

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* stylelint-disable selector-max-type, selector-no-qualifying-type */
anchored-position[popover] {
position: absolute;
min-width: 192px;
padding: 0;
overflow: visible;
border-width: 0;
}
anchored-position:not(.Overlay) {
background: none;
}
.Overlay[popover]:not(:popover-open) {
display: none
}
anchored-position.not-anchored::backdrop, dialog::backdrop {
background-color: var(--overlay-backdrop-bgColor, var(--color-neutral-muted));
}
select-panel dialog::backdrop {
background: none;
}
@media (forced-colors: active) {
.Overlay {
outline: solid 1px transparent;
}
}