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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!-- Size small -->
<segmented-control>
<ul aria-label="File view" role="list" data-view-component="true" class="SegmentedControl--small SegmentedControl SegmentedControl--iconOnly">
<li class="SegmentedControl-item SegmentedControl-item--selected" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-6c06fecd-1792-4a0e-b72a-8298a2d3da85" aria-current="true" aria-labelledby="tooltip-ffeebd17-6da4-4149-a7c3-2ee894e6bc02" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--small"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-eye Button-visual">
<path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"></path>
</svg>
</button><tool-tip id="tooltip-ffeebd17-6da4-4149-a7c3-2ee894e6bc02" for="icon-button-6c06fecd-1792-4a0e-b72a-8298a2d3da85" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Preview</tool-tip>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-34115a8c-f76e-4e08-86ab-4e16bc577214" aria-current="false" aria-labelledby="tooltip-1eeb51d6-138a-4548-bfe4-08d2ce4c929f" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--small"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-code Button-visual">
<path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path>
</svg>
</button><tool-tip id="tooltip-1eeb51d6-138a-4548-bfe4-08d2ce4c929f" for="icon-button-34115a8c-f76e-4e08-86ab-4e16bc577214" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Raw</tool-tip>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-a6a72b14-8a59-4612-a68d-8a7b3701216d" aria-current="false" aria-labelledby="tooltip-01fdf67a-47b8-4b46-be83-68a36f51acab" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--small"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-people Button-visual">
<path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path>
</svg>
</button><tool-tip id="tooltip-01fdf67a-47b8-4b46-be83-68a36f51acab" for="icon-button-a6a72b14-8a59-4612-a68d-8a7b3701216d" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Blame</tool-tip>
</li>
</ul>
</segmented-control>
<!-- Size medium -->
<segmented-control>
<ul aria-label="File view" role="list" data-view-component="true" class="SegmentedControl--medium SegmentedControl SegmentedControl--iconOnly">
<li class="SegmentedControl-item SegmentedControl-item--selected" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-52dfdc25-49aa-4724-ac94-870a39b19aec" aria-current="true" aria-labelledby="tooltip-42d7d422-8ed6-4b11-8bb0-a3588e32cc2a" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-eye Button-visual">
<path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"></path>
</svg>
</button><tool-tip id="tooltip-42d7d422-8ed6-4b11-8bb0-a3588e32cc2a" for="icon-button-52dfdc25-49aa-4724-ac94-870a39b19aec" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Preview</tool-tip>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-b61c86a4-8f32-408a-acce-33ae641faf78" aria-current="false" aria-labelledby="tooltip-8b716e47-d6db-4013-a1f1-d5d7d5d14a9e" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-code Button-visual">
<path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path>
</svg>
</button><tool-tip id="tooltip-8b716e47-d6db-4013-a1f1-d5d7d5d14a9e" for="icon-button-b61c86a4-8f32-408a-acce-33ae641faf78" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Raw</tool-tip>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-3da60511-cd79-45c3-b10b-c2cd95c8212b" aria-current="false" aria-labelledby="tooltip-12d793cb-0eef-43a2-8f00-aec439fceca5" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-people Button-visual">
<path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path>
</svg>
</button><tool-tip id="tooltip-12d793cb-0eef-43a2-8f00-aec439fceca5" for="icon-button-3da60511-cd79-45c3-b10b-c2cd95c8212b" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Blame</tool-tip>
</li>
</ul>
</segmented-control>
<!-- Full width, size small -->
<segmented-control>
<ul aria-label="File view" role="list" data-view-component="true" class="SegmentedControl--small SegmentedControl SegmentedControl--iconOnly SegmentedControl--fullWidth">
<li class="SegmentedControl-item SegmentedControl-item--selected" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-cfb9358c-8a01-4a1f-9679-655928ec6018" aria-current="true" aria-labelledby="tooltip-1d4f6ff9-5745-4183-9dd3-de36a5f31195" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--small btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-eye Button-visual">
<path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"></path>
</svg>
</button><tool-tip id="tooltip-1d4f6ff9-5745-4183-9dd3-de36a5f31195" for="icon-button-cfb9358c-8a01-4a1f-9679-655928ec6018" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Preview</tool-tip>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-866fc993-934a-45e6-8361-0a2e8e95da45" aria-current="false" aria-labelledby="tooltip-a3514a06-f230-44c5-911a-35c7c6b7f4ff" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--small btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-code Button-visual">
<path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path>
</svg>
</button><tool-tip id="tooltip-a3514a06-f230-44c5-911a-35c7c6b7f4ff" for="icon-button-866fc993-934a-45e6-8361-0a2e8e95da45" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Raw</tool-tip>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-95b667a3-c33d-4fbb-8ac7-259c577a6b09" aria-current="false" aria-labelledby="tooltip-5c24c19f-c57c-43ab-9ff0-f6f5f83ff42e" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--small btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-people Button-visual">
<path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path>
</svg>
</button><tool-tip id="tooltip-5c24c19f-c57c-43ab-9ff0-f6f5f83ff42e" for="icon-button-95b667a3-c33d-4fbb-8ac7-259c577a6b09" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Blame</tool-tip>
</li>
</ul>
</segmented-control>
<!-- Full width, size medium -->
<segmented-control>
<ul aria-label="File view" role="list" data-view-component="true" class="SegmentedControl--medium SegmentedControl SegmentedControl--iconOnly SegmentedControl--fullWidth">
<li class="SegmentedControl-item SegmentedControl-item--selected" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-7bb115ac-bd2f-4dc9-8bc9-f47cc9f83d8c" aria-current="true" aria-labelledby="tooltip-ea340e10-ffba-44e5-b710-8f0648a559e5" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-eye Button-visual">
<path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"></path>
</svg>
</button><tool-tip id="tooltip-ea340e10-ffba-44e5-b710-8f0648a559e5" for="icon-button-7bb115ac-bd2f-4dc9-8bc9-f47cc9f83d8c" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Preview</tool-tip>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-394b7d99-e0f6-45e1-8059-f9e93b8669a6" aria-current="false" aria-labelledby="tooltip-08f22de0-a2eb-414b-8924-e79b4dbc53ee" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-code Button-visual">
<path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path>
</svg>
</button><tool-tip id="tooltip-08f22de0-a2eb-414b-8924-e79b4dbc53ee" for="icon-button-394b7d99-e0f6-45e1-8059-f9e93b8669a6" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Raw</tool-tip>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" id="icon-button-88aa79c4-6fe2-484f-876e-f7f07d5a01a3" aria-current="false" aria-labelledby="tooltip-e2001f16-ef8c-4c42-a5b2-b6f5c3ff0242" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium btn-block"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-people Button-visual">
<path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path>
</svg>
</button><tool-tip id="tooltip-e2001f16-ef8c-4c42-a5b2-b6f5c3ff0242" for="icon-button-88aa79c4-6fe2-484f-876e-f7f07d5a01a3" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Blame</tool-tip>
</li>
</ul>
</segmented-control>
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
# Size small
render(Primer::Alpha::SegmentedControl.new("aria-label": "File view", hide_labels: true, size: :small)) do |component|
component.with_item(label: "Preview", icon: :eye, selected: true)
component.with_item(label: "Raw", icon: :"file-code")
component.with_item(label: "Blame", icon: :people)
end
# Size medium
render(Primer::Alpha::SegmentedControl.new("aria-label": "File view", hide_labels: true, size: :medium)) do |component|
component.with_item(label: "Preview", icon: :eye, selected: true)
component.with_item(label: "Raw", icon: :"file-code")
component.with_item(label: "Blame", icon: :people)
end
# Full width, size small
render(Primer::Alpha::SegmentedControl.new("aria-label": "File view", hide_labels: true, full_width: true, size: :small)) do |component|
component.with_item(label: "Preview", icon: :eye, selected: true)
component.with_item(label: "Raw", icon: :"file-code")
component.with_item(label: "Blame", icon: :people)
end
# Full width, size medium
render(Primer::Alpha::SegmentedControl.new("aria-label": "File view", hide_labels: true, full_width: true, size: :medium)) do |component|
component.with_item(label: "Preview", icon: :eye, selected: true)
component.with_item(label: "Raw", icon: :"file-code")
component.with_item(label: "Blame", icon: :people)
end

app/components/primer/alpha/segmented_control.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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/* SegmentedControl */
.SegmentedControl {
--segmentedControl-item-padding: var(--control-small-paddingBlock);
--overlay-offset: 0.5rem;
display: inline-flex;
list-style: none;
background-color: var(--controlTrack-bgColor-rest, var(--color-segmented-control-bg));
border-color: var(--controlTrack-borderColor-rest, transparent);
border-radius: var(--borderRadius-medium);
}
.SegmentedControl--iconOnly .Button--iconOnly.Button--small,.SegmentedControl--iconOnly .Button--iconOnly.Button--medium {
width: 100%;
padding-inline: 0 !important;
}
/* sizes */
.SegmentedControl--small {
--segmentedControl-item-padding: var(--control-xsmall-paddingBlock);
}
.SegmentedControl--small .SegmentedControl-item {
height: var(--control-small-size);
}
:is(.SegmentedControl--small .SegmentedControl-item) .Button {
/* stylelint-disable-next-line primer/spacing */
padding-inline: calc(var(--control-xsmall-paddingInline-normal) - var(--segmentedControl-item-padding));
}
.SegmentedControl--small.SegmentedControl--iconOnly .SegmentedControl-item {
width: var(--control-small-size);
}
.SegmentedControl--medium .SegmentedControl-item {
height: var(--control-medium-size);
}
.SegmentedControl--medium.SegmentedControl--iconOnly .SegmentedControl-item {
width: var(--control-medium-size);
}
/* item */
.SegmentedControl-item {
position: relative;
display: inline-flex;
height: var(--control-medium-size);
/* stylelint-disable-next-line primer/spacing */
padding: var(--segmentedControl-item-padding);
border: var(--borderWidth-thin) solid transparent;
border-radius: var(--borderRadius-medium);
justify-content: center;
/* button color overrides */
}
:is(.SegmentedControl-item .Button--invisible):hover:not(:disabled) {
background-color: var(--controlTrack-bgColor-hover, var(--color-action-list-item-default-hover-bg));
}
:is(.SegmentedControl-item .Button--invisible):active:not(:disabled) {
background-color: var(--controlTrack-bgColor-active, var(--color-action-list-item-default-active-bg));
}
/* Selected ---------------------------------------- */
.SegmentedControl-item.SegmentedControl-item--selected {
background-color: var(--controlKnob-bgColor-rest, var(--color-segmented-control-button-bg));
border-color: var(--controlKnob-borderColor-rest, var(--color-segmented-control-button-selected-border));
}
.SegmentedControl-item.SegmentedControl-item--selected .Button {
font-weight: var(--base-text-weight-semibold);
}
:is(.SegmentedControl-item.SegmentedControl-item--selected .Button):hover {
background-color: transparent;
}
.SegmentedControl-item.SegmentedControl-item--selected::before {
border-color: transparent !important;
}
.SegmentedControl-item.SegmentedControl-item--selected + .SegmentedControl-item::before {
border-color: transparent;
}
/* renders a visibly hidden "copy" of the text in bold, reserving box space for when text becomes bold on selected */
.SegmentedControl-item .Button-label[data-content]::before {
display: block;
height: 0;
font-weight: var(--base-text-weight-semibold);
visibility: hidden;
content: attr(data-content);
}
/* Separator lines */
.SegmentedControl-item:not(:first-child)::before {
position: absolute;
inset: 0 0 0 -1px;
/* stylelint-disable-next-line primer/spacing */
margin-top: var(--control-medium-paddingBlock);
/* stylelint-disable-next-line primer/spacing */
margin-bottom: var(--control-medium-paddingBlock);
content: '';
border-left: var(--borderWidth-thin) solid var(--borderColor-default);
}
/* Button ----------------------------------------- */
.SegmentedControl-item .Button {
width: 100%;
min-width: -moz-fit-content;
min-width: fit-content;
height: 100%;
font-weight: var(--base-text-weight-normal);
border: 0;
/* stylelint-disable-next-line primer/borders */
border-radius: calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding) / 2);
/* stylelint-disable-next-line primer/spacing */
padding-inline: calc(var(--control-medium-paddingInline-normal) - var(--segmentedControl-item-padding));
}
:is(.SegmentedControl-item .Button):focus-visible {
/* stylelint-disable-next-line primer/borders */
border-radius: calc(var(--borderRadius-medium) - var(--segmentedControl-item-padding) / 1);
outline-offset: calc(var(--segmentedControl-item-padding) - var(--borderWidth-thin));
}
.SegmentedControl-item .Button--invisible.Button--invisible-noVisuals .Button-label {
color: var(--button-default-fgColor-rest);
}
.SegmentedControl-item .Button-content {
flex: 1 1 auto;
align-self: stretch;
}
/* use ellipsis with the assumption that icon only variant will be used when not enough space is available */
.SegmentedControl-item .Button-label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* fullWidth */
.SegmentedControl--fullWidth {
display: flex;
}
.SegmentedControl--fullWidth .SegmentedControl-item {
flex: 1;
justify-content: center;
}

app/components/primer/alpha/segmented_control.ts

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
import {controller, targets} from '@github/catalyst'
@controller
class SegmentedControlElement extends HTMLElement {
@targets items: HTMLElement[]
connectedCallback() {
this.#updateButtonLabels()
}
select(event: Event) {
const button = event.currentTarget as HTMLButtonElement
for (const item of this.items) {
item.classList.remove('SegmentedControl-item--selected')
item.querySelector('[aria-current]')?.setAttribute('aria-current', 'false')
}
button.closest('li.SegmentedControl-item')?.classList.add('SegmentedControl-item--selected')
button.setAttribute('aria-current', 'true')
}
// Updates the button labels to have a data-content attribute with the text
// This is for selection styling to avoid the text jumping. It only needs to be
// setup when the component is first loaded.
#updateButtonLabels() {
for (const label of this.querySelectorAll('.Button-label')) {
label.setAttribute('data-content', label.textContent || '')
}
}
}
declare global {
interface Window {
SegmentedControlElement: typeof SegmentedControlElement
}
}
if (!window.customElements.get('segmented-control')) {
window.SegmentedControlElement = SegmentedControlElement
window.customElements.define('segmented-control', SegmentedControlElement)
}