@mixtint/primer-view-components 0.89.1 → 0.90.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/app/assets/javascripts/primer_view_components.js +1 -1
  2. package/app/assets/javascripts/primer_view_components.js.map +1 -1
  3. package/app/assets/styles/primer_view_components.css +210 -647
  4. package/app/assets/styles/primer_view_components.css.map +1 -1
  5. package/app/components/primer/alpha/action_bar.css +9 -3
  6. package/app/components/primer/alpha/action_list.css +92 -2
  7. package/app/components/primer/alpha/auto_complete.css +4 -22
  8. package/app/components/primer/alpha/auto_complete.css.json +1 -3
  9. package/app/components/primer/alpha/banner.css +0 -1
  10. package/app/components/primer/alpha/button_marketing.css +4 -4
  11. package/app/components/primer/alpha/dialog.css +66 -1
  12. package/app/components/primer/alpha/dialog.css.json +2 -1
  13. package/app/components/primer/alpha/dropdown.css +0 -6
  14. package/app/components/primer/alpha/layout.css +3 -1
  15. package/app/components/primer/alpha/menu.css +0 -6
  16. package/app/components/primer/alpha/overlay.css +5 -0
  17. package/app/components/primer/alpha/segmented_control.css +0 -4
  18. package/app/components/primer/alpha/tab_nav.css +0 -8
  19. package/app/components/primer/alpha/text_field.css +97 -5
  20. package/app/components/primer/alpha/text_field.css.json +2 -2
  21. package/app/components/primer/alpha/toggle_switch.css +8 -7
  22. package/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.js +1 -1
  23. package/app/components/primer/alpha/tree_view.css +1 -0
  24. package/app/components/primer/alpha/underline_nav.css +0 -3
  25. package/app/components/primer/beta/avatar.css +0 -1
  26. package/app/components/primer/beta/avatar_stack.css +33 -0
  27. package/app/components/primer/beta/blankslate.css +2 -61
  28. package/app/components/primer/beta/border_box.css +35 -0
  29. package/app/components/primer/beta/breadcrumbs.css +7 -4
  30. package/app/components/primer/beta/breadcrumbs.css.json +2 -1
  31. package/app/components/primer/beta/button.css +51 -1
  32. package/app/components/primer/beta/flash.css +0 -16
  33. package/app/components/primer/beta/label.css +0 -2
  34. package/app/components/primer/beta/link.css +0 -2
  35. package/app/components/primer/beta/popover.css +138 -85
  36. package/app/components/primer/beta/popover.css.json +22 -16
  37. package/app/components/primer/beta/state.css +0 -1
  38. package/app/components/primer/beta/subhead.css +0 -8
  39. package/app/components/primer/beta/timeline_item.css +0 -5
  40. package/app/components/primer/beta/truncate.css +0 -1
  41. package/app/components/primer/dialog_helper.js +10 -1
  42. package/app/components/primer/open_project/avatar_stack.css +10 -0
  43. package/app/components/primer/open_project/border_box/collapsible_header.css +3 -1
  44. package/app/components/primer/open_project/border_grid.css +11 -9
  45. package/app/components/primer/open_project/collapsible.d.ts +1 -1
  46. package/app/components/primer/open_project/collapsible.js +8 -4
  47. package/app/components/primer/open_project/filterable_tree_view.css +2 -7
  48. package/app/components/primer/open_project/page_header.css +2 -5
  49. package/app/components/primer/open_project/pagination.css +4 -1
  50. package/app/components/primer/open_project/side_panel/section.css +3 -3
  51. package/package.json +35 -15
  52. package/static/arguments.json +12 -0
  53. package/static/classes.json +21 -0
  54. package/static/classnames.cjs +516 -0
  55. package/static/classnames.d.ts +2 -0
  56. package/static/classnames.js +518 -0
  57. package/static/info_arch.json +59 -2
  58. package/static/previews.json +2439 -2400
@@ -5,7 +5,9 @@
5
5
  /* stylelint-disable primer/spacing */
6
6
  /* stylelint-disable selector-no-qualifying-type */
7
7
  /* stylelint-disable selector-max-type */
8
+
8
9
  /* Overlay */
10
+
9
11
  /* The --dialog-scrollgutter property is used only on the body element to
10
12
  * simulate scrollbar-gutter:stable. This property is not and should not
11
13
  * be used elsewhere in the DOM. There is a performance penalty to
@@ -18,22 +20,30 @@
18
20
  inherits: false;
19
21
  syntax: "<length>";
20
22
  }
21
- body:has(dialog:modal.Overlay--disableScroll) {
23
+
24
+ body.has-modal {
22
25
  padding-right: var(--dialog-scrollgutter) !important;
26
+ }
27
+
28
+ body.has-modal-disable-scroll {
23
29
  overflow: hidden !important;
24
30
  }
31
+
25
32
  dialog.Overlay:not([open]) {
26
33
  display: none;
27
34
  }
35
+
28
36
  .Overlay--hidden {
29
37
  display: none !important;
30
38
  }
39
+
31
40
  .Overlay--visibilityHidden {
32
41
  height: 0;
33
42
  overflow: hidden;
34
43
  visibility: hidden;
35
44
  opacity: 0;
36
45
  }
46
+
37
47
  /* This is for @oddbird/popover-polyfill;
38
48
  * A FOUC occurs in browsers which do not support :popover-open.
39
49
  * We can try to hide the popover if :popover-open is not supported.
@@ -43,6 +53,7 @@ dialog.Overlay:not([open]) {
43
53
  display: none;
44
54
  }
45
55
  }
56
+
46
57
  .Overlay {
47
58
  position: static;
48
59
  display: flex;
@@ -61,107 +72,137 @@ dialog.Overlay:not([open]) {
61
72
  opacity: 1;
62
73
  inset: 0;
63
74
  }
75
+
64
76
  .Overlay.Overlay--size-auto {
65
77
  min-width: 192px;
66
78
  max-width: calc(100vw - 2rem);
67
79
  max-height: calc(100vh - 2rem);
68
80
  }
81
+
69
82
  .Overlay.Overlay--size-full {
70
83
  width: 100vw;
71
84
  height: 100vh;
72
85
  }
86
+
73
87
  .Overlay.Overlay--size-xsmall {
74
88
  --overlay-width: 192px;
75
89
 
76
90
  max-height: calc(100vh - 2rem);
77
91
  }
92
+
78
93
  .Overlay.Overlay--size-small {
79
94
  --overlay-height: 256px;
80
95
  --overlay-width: 320px;
81
96
  }
97
+
82
98
  .Overlay.Overlay--size-small-portrait {
83
99
  --overlay-height: 432px;
84
100
  --overlay-width: 320px;
85
101
  }
102
+
86
103
  .Overlay.Overlay--size-medium {
87
104
  --overlay-height: 320px;
88
105
  --overlay-width: 480px;
89
106
  }
107
+
90
108
  .Overlay.Overlay--size-medium-portrait {
91
109
  --overlay-height: 600px;
92
110
  --overlay-width: 480px;
93
111
  }
112
+
94
113
  .Overlay.Overlay--size-large {
95
114
  --overlay-height: 432px;
96
115
  --overlay-width: 640px;
97
116
  }
117
+
98
118
  .Overlay.Overlay--size-xlarge {
99
119
  --overlay-height: 600px;
100
120
  --overlay-width: 960px;
101
121
  }
122
+
102
123
  .Overlay.Overlay--height-auto {
103
124
  height: auto;
104
125
  }
126
+
105
127
  .Overlay.Overlay--placement-left,.Overlay.Overlay--placement-right {
106
128
  position: fixed;
107
129
  height: 100%;
108
130
  max-height: unset;
109
131
  }
132
+
110
133
  @media screen and (prefers-reduced-motion: no-preference) {
134
+
111
135
  .Overlay.Overlay--motion-scaleFade,.Overlay.Overlay--placement-left,.Overlay.Overlay--placement-right {
112
136
  animation: 200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-scaleFade;
113
137
  }
114
138
  }
139
+
115
140
  .Overlay.Overlay--placement-left {
116
141
  inset: 0 auto 0 0;
117
142
  border-top-left-radius: 0;
118
143
  border-bottom-left-radius: 0;
119
144
  animation-name: Overlay--motion-slideInRight;
120
145
  }
146
+
121
147
  .Overlay.Overlay--placement-right {
122
148
  inset: 0 0 0 auto;
123
149
  border-top-right-radius: 0;
124
150
  border-bottom-right-radius: 0;
125
151
  animation-name: Overlay--motion-slideInLeft;
126
152
  }
153
+
127
154
  /* start deprecate in favor of Alpha::Dialog */
155
+
128
156
  .Overlay.Overlay--height-xsmall {
129
157
  height: min(192px, 100vh - 2rem);
130
158
  }
159
+
131
160
  .Overlay.Overlay--height-small {
132
161
  height: min(256px, 100vh - 2rem);
133
162
  }
163
+
134
164
  .Overlay.Overlay--height-medium {
135
165
  height: min(320px, 100vh - 2rem);
136
166
  }
167
+
137
168
  .Overlay.Overlay--height-large {
138
169
  height: min(432px, 100vh - 2rem);
139
170
  }
171
+
140
172
  .Overlay.Overlay--height-xlarge {
141
173
  height: min(600px, 100vh - 2rem);
142
174
  }
175
+
143
176
  .Overlay.Overlay--width-auto {
144
177
  width: auto;
145
178
  }
179
+
146
180
  .Overlay.Overlay--width-small {
147
181
  width: min(256px, 100vw - 2rem);
148
182
  }
183
+
149
184
  .Overlay.Overlay--width-medium {
150
185
  width: min(320px, 100vw - 2rem);
151
186
  }
187
+
152
188
  .Overlay.Overlay--width-large {
153
189
  width: min(480px, 100vw - 2rem);
154
190
  }
191
+
155
192
  .Overlay.Overlay--width-xlarge {
156
193
  width: min(640px, 100vw - 2rem);
157
194
  }
195
+
158
196
  .Overlay.Overlay--width-xxlarge {
159
197
  width: min(960px, 100vw - 2rem);
160
198
  }
199
+
161
200
  /* end deprecate */
201
+
162
202
  .Overlay:modal {
163
203
  position: fixed;
164
204
  }
205
+
165
206
  @keyframes Overlay--motion-scaleFade {
166
207
  0% {
167
208
  opacity: 0;
@@ -173,6 +214,7 @@ dialog.Overlay:not([open]) {
173
214
  transform: scale(1);
174
215
  }
175
216
  }
217
+
176
218
  /* for <form> element that wraps entire contents of overlay */
177
219
  .Overlay-form {
178
220
  display: flex;
@@ -180,37 +222,45 @@ dialog.Overlay:not([open]) {
180
222
  flex-direction: column;
181
223
  flex-grow: 1;
182
224
  }
225
+
183
226
  .Overlay-header {
184
227
  z-index: 1;
185
228
  display: flex;
186
229
  color: var(--fgColor-default);
187
230
  flex-direction: column;
188
231
  }
232
+
189
233
  .Overlay-header.Overlay-header--divided {
190
234
  padding-bottom: var(--stack-padding-condensed);
191
235
  /* stylelint-disable-next-line primer/box-shadow */
192
236
  box-shadow: inset 0 calc(var(--borderWidth-thin) * -1) var(--borderColor-default);
193
237
  }
238
+
194
239
  :is(.Overlay-header.Overlay-header--large .Overlay-headerContentWrap) .Overlay-titleWrap {
195
240
  gap: var(--stack-gap-condensed);
196
241
  }
242
+
197
243
  :is(:is(.Overlay-header.Overlay-header--large .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-title {
198
244
  font-size: var(--text-title-size-medium);
199
245
  }
246
+
200
247
  :is(:is(.Overlay-header.Overlay-header--large .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-description {
201
248
  font-size: var(--text-body-size-medium);
202
249
  }
250
+
203
251
  .Overlay-header .Overlay-headerContentWrap {
204
252
  display: flex;
205
253
  align-items: flex-start;
206
254
  gap: var(--stack-gap-condensed);
207
255
  padding: var(--stack-gap-condensed) var(--stack-gap-condensed) 0 var(--stack-gap-condensed);
208
256
  }
257
+
209
258
  :is(.Overlay-header .Overlay-headerContentWrap) .Overlay-actionWrap {
210
259
  display: flex;
211
260
  flex-direction: row;
212
261
  gap: var(--stack-gap-condensed);
213
262
  }
263
+
214
264
  :is(.Overlay-header .Overlay-headerContentWrap) .Overlay-titleWrap {
215
265
  display: flex;
216
266
  padding: calc(var(--stack-gap-condensed) * 0.75) 0 calc(var(--stack-gap-condensed) * 0.75)
@@ -219,20 +269,24 @@ dialog.Overlay:not([open]) {
219
269
  flex-grow: 1;
220
270
  gap: var(--control-small-gap);
221
271
  }
272
+
222
273
  :is(:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-title {
223
274
  margin: 0;
224
275
  font-size: var(--text-body-size-medium);
225
276
  font-weight: var(--base-text-weight-semibold);
226
277
  }
278
+
227
279
  :is(:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-description {
228
280
  margin: 0;
229
281
  font-size: var(--text-body-size-small);
230
282
  font-weight: var(--base-text-weight-normal);
231
283
  color: var(--fgColor-muted);
232
284
  }
285
+
233
286
  .Overlay-headerFilter {
234
287
  padding: var(--stack-gap-condensed) var(--stack-gap-condensed) 0 var(--stack-gap-condensed);
235
288
  }
289
+
236
290
  /* generic body content slot */
237
291
  .Overlay-body {
238
292
  padding: var(--stack-padding-normal);
@@ -248,6 +302,7 @@ dialog.Overlay:not([open]) {
248
302
  .Overlay-body.Overlay-body--paddingNone {
249
303
  padding: 0;
250
304
  }
305
+
251
306
  /* generic footer slot */
252
307
  .Overlay-footer {
253
308
  z-index: 1;
@@ -274,6 +329,7 @@ dialog.Overlay:not([open]) {
274
329
  justify-content: flex-end;
275
330
  gap: var(--stack-gap-condensed);
276
331
  }
332
+
277
333
  /* TODO: replace with refactored IconButton */
278
334
  .Overlay-closeButton {
279
335
  position: relative;
@@ -303,8 +359,11 @@ dialog.Overlay:not([open]) {
303
359
  .Overlay-closeButton.close-button {
304
360
  border: var(--borderWidth-thin) solid transparent;
305
361
  }
362
+
306
363
  /* variants must be mixins so we can extend within a media query (@extend is not supported inside media queries) */
364
+
307
365
  /* border-radius repeats within placement options to ensure the original radius is reset when two classes co-exist */
366
+
308
367
  /* full width */
309
368
  .Overlay--full {
310
369
  width: 100%;
@@ -314,7 +373,9 @@ dialog.Overlay:not([open]) {
314
373
  border-radius: unset !important;
315
374
  flex-grow: 1;
316
375
  }
376
+
317
377
  /* responsive variants */
378
+
318
379
  /* --viewportRange-narrowLandscape */
319
380
  @media (max-width: 767px) {
320
381
  .Overlay.Overlay--placement-left-whenNarrow, .Overlay--placement-right-whenNarrow {
@@ -367,21 +428,25 @@ dialog.Overlay:not([open]) {
367
428
  border-radius: unset !important;
368
429
  }
369
430
  }
431
+
370
432
  @keyframes Overlay--motion-slideDown {
371
433
  from {
372
434
  transform: translateY(-100%);
373
435
  }
374
436
  }
437
+
375
438
  @keyframes Overlay--motion-slideUp {
376
439
  from {
377
440
  transform: translateY(100%);
378
441
  }
379
442
  }
443
+
380
444
  @keyframes Overlay--motion-slideInRight {
381
445
  from {
382
446
  transform: translateX(-100%);
383
447
  }
384
448
  }
449
+
385
450
  @keyframes Overlay--motion-slideInLeft {
386
451
  from {
387
452
  transform: translateX(100%);
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "alpha/dialog",
3
3
  "selectors": [
4
- "body:has(dialog:modal.Overlay--disableScroll)",
4
+ "body.has-modal",
5
+ "body.has-modal-disable-scroll",
5
6
  "dialog.Overlay:not([open])",
6
7
  ".Overlay--hidden",
7
8
  ".Overlay--visibilityHidden",
@@ -77,7 +77,6 @@
77
77
  }
78
78
 
79
79
  /* Dropdown items (can be links or buttons) */
80
-
81
80
  .dropdown-item {
82
81
  display: block;
83
82
  padding: var(--control-small-paddingBlock) var(--control-medium-paddingInline-condensed) var(--control-small-paddingBlock) var(--control-medium-paddingInline-spacious);
@@ -86,28 +85,23 @@
86
85
  text-overflow: ellipsis;
87
86
  white-space: nowrap;
88
87
  }
89
-
90
88
  .dropdown-item:hover {
91
89
  color: var(--fgColor-onEmphasis);
92
90
  -webkit-text-decoration: none;
93
91
  text-decoration: none;
94
92
  background-color: var(--bgColor-accent-emphasis);
95
93
  }
96
-
97
94
  .dropdown-item:hover > .octicon {
98
95
  color: inherit;
99
96
  opacity: 1;
100
97
  }
101
-
102
98
  .dropdown-item:hover [class*='color-fg-'] {
103
99
  color: inherit !important;
104
100
  }
105
-
106
101
  .dropdown-item:hover > .Label {
107
102
  color: inherit !important;
108
103
  border-color: currentcolor;
109
104
  }
110
-
111
105
  .dropdown-item.btn-link {
112
106
  width: 100%;
113
107
  text-align: left;
@@ -1,5 +1,7 @@
1
1
  /* Layout */
2
2
 
3
+ /* stylelint-disable nesting-selector-no-missing-scoping-root -- inside @define-mixin the & resolves at the @mixin include site, so there is a scoping root */
4
+
3
5
  .Layout {
4
6
  display: grid;
5
7
 
@@ -193,7 +195,7 @@
193
195
 
194
196
  grid-auto-flow: column;
195
197
  grid-template-columns: auto 0 minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))); /* sidebar column, separator, main column */
196
- grid-gap: var(--Layout-gutter);
198
+ gap: var(--Layout-gutter);
197
199
  }
198
200
 
199
201
  .Layout .Layout-sidebar {
@@ -3,7 +3,6 @@
3
3
  /* A menu on the side of a page, defaults to left side. e.g. github.com/about */
4
4
 
5
5
  .menu {
6
- /* stylelint-disable-next-line primer/spacing */
7
6
  margin-bottom: var(--stack-gap-normal);
8
7
  list-style: none;
9
8
  background-color: var(--bgColor-default);
@@ -14,7 +13,6 @@
14
13
  .menu-item {
15
14
  position: relative;
16
15
  display: block;
17
- /* stylelint-disable-next-line primer/spacing */
18
16
  padding: var(--control-medium-paddingInline-condensed) var(--control-medium-paddingInline-spacious);
19
17
  color: var(--fgColor-default);
20
18
  border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);
@@ -68,7 +66,6 @@
68
66
 
69
67
  .menu-item .octicon {
70
68
  width: 16px;
71
- /* stylelint-disable-next-line primer/spacing */
72
69
  margin-right: var(--control-medium-gap);
73
70
  color: var(--fgColor-muted);
74
71
  text-align: center;
@@ -76,7 +73,6 @@
76
73
 
77
74
  .menu-item .Counter {
78
75
  float: right;
79
- /* stylelint-disable-next-line primer/spacing */
80
76
  margin-left: var(--control-small-gap);
81
77
  }
82
78
 
@@ -87,7 +83,6 @@
87
83
 
88
84
  .menu-item .avatar {
89
85
  float: left;
90
- /* stylelint-disable-next-line primer/spacing */
91
86
  margin-right: var(--control-small-gap);
92
87
  }
93
88
 
@@ -97,7 +92,6 @@
97
92
 
98
93
  .menu-heading {
99
94
  display: block;
100
- /* stylelint-disable-next-line primer/spacing */
101
95
  padding: var(--control-medium-paddingInline-condensed) var(--control-medium-paddingInline-spacious);
102
96
  margin-top: 0;
103
97
  margin-bottom: 0;
@@ -6,18 +6,23 @@ anchored-position[popover] {
6
6
  overflow: visible;
7
7
  border-width: 0;
8
8
  }
9
+
9
10
  anchored-position:not(.Overlay) {
10
11
  background: none;
11
12
  }
13
+
12
14
  .Overlay[popover]:not(:popover-open) {
13
15
  display: none
14
16
  }
17
+
15
18
  anchored-position.not-anchored::backdrop, dialog::backdrop {
16
19
  background-color: var(--overlay-backdrop-bgColor, var(--color-neutral-muted));
17
20
  }
21
+
18
22
  select-panel dialog::backdrop {
19
23
  background: none;
20
24
  }
25
+
21
26
  @media (forced-colors: active) {
22
27
  .Overlay {
23
28
  outline: solid 1px transparent;
@@ -104,9 +104,7 @@
104
104
  .SegmentedControl-item:not(:first-child)::before {
105
105
  position: absolute;
106
106
  inset: 0 0 0 -1px;
107
- /* stylelint-disable-next-line primer/spacing */
108
107
  margin-top: var(--control-medium-paddingBlock);
109
- /* stylelint-disable-next-line primer/spacing */
110
108
  margin-bottom: var(--control-medium-paddingBlock);
111
109
  content: '';
112
110
  border-left: var(--borderWidth-thin) solid var(--borderColor-default);
@@ -150,11 +148,9 @@
150
148
  }
151
149
 
152
150
  /* fullWidth */
153
-
154
151
  .SegmentedControl--fullWidth {
155
152
  display: flex;
156
153
  }
157
-
158
154
  .SegmentedControl--fullWidth .SegmentedControl-item {
159
155
  flex: 1;
160
156
  justify-content: center;
@@ -1,10 +1,8 @@
1
1
  /* tabnav */
2
2
 
3
3
  /* Outer wrapper */
4
-
5
4
  .tabnav {
6
5
  margin-top: 0;
7
- /* stylelint-disable-next-line primer/spacing */
8
6
  margin-bottom: var(--stack-gap-normal);
9
7
  border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);
10
8
  }
@@ -26,7 +24,6 @@
26
24
  .tabnav-tab {
27
25
  display: inline-block;
28
26
  flex-shrink: 0;
29
- /* stylelint-disable-next-line primer/spacing */
30
27
  padding: var(--base-size-8) var(--control-medium-paddingInline-spacious);
31
28
  font-size: var(--text-body-size-medium);
32
29
  /* stylelint-disable-next-line primer/typography */
@@ -68,13 +65,11 @@
68
65
  }
69
66
 
70
67
  .tabnav-tab .octicon {
71
- /* stylelint-disable-next-line primer/spacing */
72
68
  margin-right: var(--control-small-gap);
73
69
  color: var(--fgColor-muted);
74
70
  }
75
71
 
76
72
  .tabnav-tab .Counter {
77
- /* stylelint-disable-next-line primer/spacing */
78
73
  margin-left: var(--control-small-gap);
79
74
  color: inherit;
80
75
  }
@@ -99,9 +94,7 @@
99
94
  }
100
95
 
101
96
  /* When tabnav-extra are anchors */
102
-
103
97
  /* stylelint-disable-next-line selector-no-qualifying-type, selector-max-type */
104
-
105
98
  a.tabnav-extra:hover {
106
99
  color: var(--fgColor-accent);
107
100
  -webkit-text-decoration: none;
@@ -114,6 +107,5 @@ a.tabnav-extra:hover {
114
107
  ** the buttons to be floated or inline-block. */
115
108
 
116
109
  .tabnav-btn {
117
- /* stylelint-disable-next-line primer/spacing */
118
110
  margin-left: var(--controlStack-medium-gap-condensed);
119
111
  }