openproject-primer_view_components 0.23.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +53 -0
  3. data/README.md +1 -0
  4. data/app/assets/javascripts/app/components/primer/alpha/action_list.d.ts +16 -0
  5. data/app/assets/javascripts/app/components/primer/beta/nav_list.d.ts +3 -0
  6. data/app/assets/javascripts/app/components/primer/open_project/page_header_element.d.ts +9 -0
  7. data/app/assets/javascripts/app/components/primer/primer.d.ts +2 -0
  8. data/app/assets/javascripts/primer_view_components.js +1 -1
  9. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  10. data/app/assets/styles/primer_view_components.css +1 -1
  11. data/app/assets/styles/primer_view_components.css.map +1 -1
  12. data/app/components/primer/alpha/action_list/item.rb +19 -6
  13. data/app/components/primer/alpha/action_list.css +1 -1
  14. data/app/components/primer/alpha/action_list.css.json +2 -0
  15. data/app/components/primer/alpha/action_list.css.map +1 -1
  16. data/app/components/primer/alpha/action_list.d.ts +16 -0
  17. data/app/components/primer/alpha/action_list.html.erb +19 -17
  18. data/app/components/primer/alpha/action_list.js +69 -0
  19. data/app/components/primer/alpha/action_list.pcss +8 -0
  20. data/app/components/primer/alpha/action_list.ts +58 -0
  21. data/app/components/primer/alpha/dialog.css +1 -1
  22. data/app/components/primer/alpha/dialog.css.json +1 -0
  23. data/app/components/primer/alpha/dialog.css.map +1 -1
  24. data/app/components/primer/alpha/dialog.pcss +10 -0
  25. data/app/components/primer/alpha/dropdown.css +1 -1
  26. data/app/components/primer/alpha/dropdown.css.map +1 -1
  27. data/app/components/primer/alpha/dropdown.pcss +1 -1
  28. data/app/components/primer/alpha/segmented_control.css +1 -1
  29. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  30. data/app/components/primer/alpha/segmented_control.pcss +1 -0
  31. data/app/components/primer/alpha/text_field.css +1 -1
  32. data/app/components/primer/alpha/text_field.css.json +2 -0
  33. data/app/components/primer/alpha/text_field.css.map +1 -1
  34. data/app/components/primer/alpha/text_field.pcss +10 -0
  35. data/app/components/primer/alpha/toggle_switch.rb +2 -2
  36. data/app/components/primer/alpha/tool_tip.js +46 -77
  37. data/app/components/primer/alpha/tool_tip.ts +46 -77
  38. data/app/components/primer/beta/auto_complete/auto_complete.html.erb +9 -9
  39. data/app/components/primer/beta/breadcrumbs.css +1 -1
  40. data/app/components/primer/beta/breadcrumbs.css.map +1 -1
  41. data/app/components/primer/beta/breadcrumbs.pcss +3 -1
  42. data/app/components/primer/beta/button.css +1 -1
  43. data/app/components/primer/beta/button.css.json +1 -0
  44. data/app/components/primer/beta/button.css.map +1 -1
  45. data/app/components/primer/beta/button.pcss +4 -0
  46. data/app/components/primer/beta/nav_list.d.ts +3 -0
  47. data/app/components/primer/beta/nav_list.html.erb +1 -1
  48. data/app/components/primer/beta/nav_list.js +25 -2
  49. data/app/components/primer/beta/nav_list.ts +18 -1
  50. data/app/components/primer/beta/nav_list_group_element.js +4 -1
  51. data/app/components/primer/beta/nav_list_group_element.ts +3 -0
  52. data/app/components/primer/beta/popover.css +1 -1
  53. data/app/components/primer/beta/popover.css.map +1 -1
  54. data/app/components/primer/beta/popover.pcss +3 -0
  55. data/app/components/primer/beta/popover.rb +0 -1
  56. data/app/components/primer/open_project/page_header.css +1 -1
  57. data/app/components/primer/open_project/page_header.css.json +3 -4
  58. data/app/components/primer/open_project/page_header.css.map +1 -1
  59. data/app/components/primer/open_project/page_header.html.erb +16 -5
  60. data/app/components/primer/open_project/page_header.pcss +12 -15
  61. data/app/components/primer/open_project/page_header.rb +164 -57
  62. data/app/components/primer/open_project/page_header_element.d.ts +9 -0
  63. data/app/components/primer/open_project/page_header_element.js +23 -0
  64. data/app/components/primer/open_project/page_header_element.ts +25 -0
  65. data/app/components/primer/primer.d.ts +2 -0
  66. data/app/components/primer/primer.js +2 -0
  67. data/app/components/primer/primer.ts +2 -0
  68. data/app/forms/auto_complete_form.rb +18 -0
  69. data/app/forms/select_form.rb +10 -0
  70. data/lib/primer/forms/auto_complete.html.erb +6 -0
  71. data/lib/primer/forms/auto_complete.rb +56 -0
  72. data/lib/primer/forms/builder.rb +19 -0
  73. data/lib/primer/forms/check_box_group.html.erb +4 -4
  74. data/lib/primer/forms/check_box_group.rb +0 -3
  75. data/lib/primer/forms/dsl/auto_complete_input.rb +33 -0
  76. data/lib/primer/forms/dsl/check_box_group_input.rb +8 -0
  77. data/lib/primer/forms/dsl/input.rb +8 -2
  78. data/lib/primer/forms/dsl/input_methods.rb +9 -0
  79. data/lib/primer/forms/dsl/radio_button_group_input.rb +8 -0
  80. data/lib/primer/forms/dsl/select_input.rb +5 -1
  81. data/lib/primer/forms/form_control.rb +1 -2
  82. data/lib/primer/forms/primer_text_field.js +2 -2
  83. data/lib/primer/forms/primer_text_field.ts +2 -2
  84. data/lib/primer/forms/radio_button_group.html.erb +4 -4
  85. data/lib/primer/forms/radio_button_group.rb +0 -3
  86. data/lib/primer/forms/select.html.erb +1 -0
  87. data/lib/primer/forms/select.rb +9 -5
  88. data/lib/primer/view_components/version.rb +1 -1
  89. data/previews/primer/alpha/action_list_preview.rb +42 -0
  90. data/previews/primer/alpha/action_menu_preview.rb +1 -1
  91. data/previews/primer/alpha/select_preview.rb +12 -1
  92. data/previews/primer/alpha/text_area_preview.rb +7 -1
  93. data/previews/primer/alpha/text_field_preview.rb +7 -1
  94. data/previews/primer/alpha/tooltip_preview/tooltip_e.html.erb +6 -0
  95. data/previews/primer/alpha/tooltip_preview/tooltip_n.html.erb +6 -0
  96. data/previews/primer/alpha/tooltip_preview/tooltip_ne.html.erb +6 -0
  97. data/previews/primer/alpha/tooltip_preview/tooltip_nw.html.erb +6 -0
  98. data/previews/primer/alpha/tooltip_preview/tooltip_s.html.erb +6 -0
  99. data/previews/primer/alpha/tooltip_preview/tooltip_se.html.erb +6 -0
  100. data/previews/primer/alpha/tooltip_preview/tooltip_sw.html.erb +6 -0
  101. data/previews/primer/alpha/tooltip_preview/tooltip_w.html.erb +6 -0
  102. data/previews/primer/alpha/tooltip_preview.rb +80 -0
  103. data/previews/primer/beta/nav_list_preview.rb +43 -0
  104. data/previews/primer/forms_preview/auto_complete_form.html.erb +3 -0
  105. data/previews/primer/forms_preview/select_form.html.erb +1 -1
  106. data/previews/primer/forms_preview.rb +2 -0
  107. data/previews/primer/open_project/border_grid_preview.rb +2 -2
  108. data/previews/primer/open_project/input_group_preview.rb +5 -5
  109. data/previews/primer/open_project/page_header_preview/actions.html.erb +18 -15
  110. data/previews/primer/open_project/page_header_preview/playground.html.erb +9 -24
  111. data/previews/primer/open_project/page_header_preview.rb +24 -50
  112. data/static/arguments.json +41 -8
  113. data/static/audited_at.json +1 -0
  114. data/static/classes.json +4 -4
  115. data/static/constants.json +29 -16
  116. data/static/info_arch.json +311 -69
  117. data/static/previews.json +251 -30
  118. data/static/statuses.json +1 -0
  119. metadata +23 -3
  120. data/previews/primer/open_project/page_header_preview/context_bar_actions.html.erb +0 -25
@@ -32,9 +32,7 @@ const isPopoverOpen = (() => {
32
32
  }
33
33
  return (el) => (selector ? el.matches(selector) : setSelector(el));
34
34
  })();
35
- const TOOLTIP_ARROW_EDGE_OFFSET = 6;
36
35
  const TOOLTIP_SR_ONLY_CLASS = 'sr-only';
37
- const TOOLTIP_OFFSET = 10;
38
36
  const DIRECTION_CLASSES = [
39
37
  'tooltip-n',
40
38
  'tooltip-s',
@@ -84,6 +82,8 @@ class ToolTipElement extends HTMLElement {
84
82
  styles() {
85
83
  return `
86
84
  :host {
85
+ --tooltip-top: var(--tool-tip-position-top, 0);
86
+ --tooltip-left: var(--tool-tip-position-left, 0);
87
87
  padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;
88
88
  font: var(--text-body-shorthand-small);
89
89
  color: var(--fgColor-onEmphasis, var(--color-fg-on-emphasis)) !important;
@@ -102,27 +102,29 @@ class ToolTipElement extends HTMLElement {
102
102
  word-wrap: break-word;
103
103
  white-space: normal;
104
104
  width: max-content !important;
105
- inset: var(--tool-tip-position-top, 0) auto auto var(--tool-tip-position-left, 0) !important;
105
+ inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;
106
106
  overflow: visible !important;
107
107
  text-wrap: balance;
108
108
  }
109
109
 
110
- :host:before{
111
- position: absolute;
112
- z-index: 1000001;
113
- color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
114
- content: "";
115
- border: 6px solid transparent;
116
- opacity: 0;
110
+ :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {
111
+ --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));
112
+ --tooltip-left: var(--tool-tip-position-left);
117
113
  }
118
114
 
119
- @keyframes tooltip-appear {
120
- from {
121
- opacity: 0;
122
- }
123
- to {
124
- opacity: 1;
125
- }
115
+ :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {
116
+ --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));
117
+ --tooltip-left: var(--tool-tip-position-left);
118
+ }
119
+
120
+ :host(.tooltip-w) {
121
+ --tooltip-top: var(--tool-tip-position-top);
122
+ --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));
123
+ }
124
+
125
+ :host(.tooltip-e) {
126
+ --tooltip-top: var(--tool-tip-position-top);
127
+ --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));
126
128
  }
127
129
 
128
130
  :host:after{
@@ -134,73 +136,40 @@ class ToolTipElement extends HTMLElement {
134
136
  content: "";
135
137
  }
136
138
 
137
- :host(:popover-open),
138
- :host(:popover-open):before {
139
- animation-name: tooltip-appear;
140
- animation-duration: .1s;
141
- animation-fill-mode: forwards;
142
- animation-timing-function: ease-in;
143
- }
144
-
145
- :host(.\\:popover-open),
146
- :host(.\\:popover-open):before {
147
- animation-name: tooltip-appear;
148
- animation-duration: .1s;
149
- animation-fill-mode: forwards;
150
- animation-timing-function: ease-in;
151
- animation-delay: .4s;
152
- }
153
-
154
- :host(.tooltip-s):before,
155
- :host(.tooltip-n):before {
156
- right: 50%;
157
- margin-right: -${TOOLTIP_ARROW_EDGE_OFFSET}px;
158
- }
159
- :host(.tooltip-s):before,
160
- :host(.tooltip-se):before,
161
- :host(.tooltip-sw):before {
162
- bottom: 100%;
163
- border-bottom-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
164
- }
165
139
  :host(.tooltip-s):after,
166
140
  :host(.tooltip-se):after,
167
141
  :host(.tooltip-sw):after {
168
142
  bottom: 100%
169
143
  }
170
- :host(.tooltip-n):before,
171
- :host(.tooltip-ne):before,
172
- :host(.tooltip-nw):before {
173
- top: 100%;
174
- border-top-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
175
- }
144
+
176
145
  :host(.tooltip-n):after,
177
146
  :host(.tooltip-ne):after,
178
147
  :host(.tooltip-nw):after {
179
148
  top: 100%;
180
149
  }
181
- :host(.tooltip-se):before,
182
- :host(.tooltip-ne):before {
183
- left: 0;
184
- margin-left: ${TOOLTIP_ARROW_EDGE_OFFSET}px;
185
- }
186
- :host(.tooltip-sw):before,
187
- :host(.tooltip-nw):before {
188
- right: 0;
189
- margin-right: ${TOOLTIP_ARROW_EDGE_OFFSET}px;
150
+
151
+ @keyframes tooltip-appear {
152
+ from {
153
+ opacity: 0;
154
+ }
155
+ to {
156
+ opacity: 1;
157
+ }
190
158
  }
191
- :host(.tooltip-w):before {
192
- top: 50%;
193
- bottom: 50%;
194
- left: 100%;
195
- margin-top: -6px;
196
- border-left-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
159
+
160
+ :host(:popover-open),
161
+ :host(:popover-open):before {
162
+ animation-name: tooltip-appear;
163
+ animation-duration: .1s;
164
+ animation-fill-mode: forwards;
165
+ animation-timing-function: ease-in;
197
166
  }
198
- :host(.tooltip-e):before {
199
- top: 50%;
200
- right: 100%;
201
- bottom: 50%;
202
- margin-top: -6px;
203
- border-right-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
167
+
168
+ :host(.\\:popover-open) {
169
+ animation-name: tooltip-appear;
170
+ animation-duration: .1s;
171
+ animation-fill-mode: forwards;
172
+ animation-timing-function: ease-in;
204
173
  }
205
174
 
206
175
  @media (forced-colors: active) {
@@ -390,7 +359,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
390
359
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-top', "f");
391
360
  }
392
361
  else if (direction === 'ne') {
393
- __classPrivateFieldSet(this, _ToolTipElement_align, 'start', "f");
362
+ __classPrivateFieldSet(this, _ToolTipElement_align, 'end', "f");
394
363
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-top', "f");
395
364
  }
396
365
  else if (direction === 'e') {
@@ -398,7 +367,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
398
367
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-right', "f");
399
368
  }
400
369
  else if (direction === 'se') {
401
- __classPrivateFieldSet(this, _ToolTipElement_align, 'start', "f");
370
+ __classPrivateFieldSet(this, _ToolTipElement_align, 'end', "f");
402
371
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-bottom', "f");
403
372
  }
404
373
  else if (direction === 's') {
@@ -406,7 +375,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
406
375
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-bottom', "f");
407
376
  }
408
377
  else if (direction === 'sw') {
409
- __classPrivateFieldSet(this, _ToolTipElement_align, 'end', "f");
378
+ __classPrivateFieldSet(this, _ToolTipElement_align, 'start', "f");
410
379
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-bottom', "f");
411
380
  }
412
381
  else if (direction === 'w') {
@@ -414,7 +383,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
414
383
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-left', "f");
415
384
  }
416
385
  else if (direction === 'nw') {
417
- __classPrivateFieldSet(this, _ToolTipElement_align, 'end', "f");
386
+ __classPrivateFieldSet(this, _ToolTipElement_align, 'start', "f");
418
387
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-top', "f");
419
388
  }
420
389
  }, _ToolTipElement_updatePosition = function _ToolTipElement_updatePosition() {
@@ -425,7 +394,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
425
394
  const position = getAnchoredPosition(this, this.control, {
426
395
  side: __classPrivateFieldGet(this, _ToolTipElement_side, "f"),
427
396
  align: __classPrivateFieldGet(this, _ToolTipElement_align, "f"),
428
- anchorOffset: TOOLTIP_OFFSET,
397
+ anchorOffset: 0,
429
398
  });
430
399
  const anchorSide = position.anchorSide;
431
400
  const align = position.anchorAlign;
@@ -21,9 +21,7 @@ const isPopoverOpen = (() => {
21
21
  return (el: Element) => (selector ? el.matches(selector) : setSelector(el))
22
22
  })()
23
23
 
24
- const TOOLTIP_ARROW_EDGE_OFFSET = 6
25
24
  const TOOLTIP_SR_ONLY_CLASS = 'sr-only'
26
- const TOOLTIP_OFFSET = 10
27
25
 
28
26
  type Direction = 'n' | 's' | 'e' | 'w' | 'ne' | 'se' | 'nw' | 'sw'
29
27
 
@@ -69,6 +67,8 @@ class ToolTipElement extends HTMLElement {
69
67
  styles() {
70
68
  return `
71
69
  :host {
70
+ --tooltip-top: var(--tool-tip-position-top, 0);
71
+ --tooltip-left: var(--tool-tip-position-left, 0);
72
72
  padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;
73
73
  font: var(--text-body-shorthand-small);
74
74
  color: var(--fgColor-onEmphasis, var(--color-fg-on-emphasis)) !important;
@@ -87,27 +87,29 @@ class ToolTipElement extends HTMLElement {
87
87
  word-wrap: break-word;
88
88
  white-space: normal;
89
89
  width: max-content !important;
90
- inset: var(--tool-tip-position-top, 0) auto auto var(--tool-tip-position-left, 0) !important;
90
+ inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;
91
91
  overflow: visible !important;
92
92
  text-wrap: balance;
93
93
  }
94
94
 
95
- :host:before{
96
- position: absolute;
97
- z-index: 1000001;
98
- color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
99
- content: "";
100
- border: 6px solid transparent;
101
- opacity: 0;
95
+ :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {
96
+ --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));
97
+ --tooltip-left: var(--tool-tip-position-left);
102
98
  }
103
99
 
104
- @keyframes tooltip-appear {
105
- from {
106
- opacity: 0;
107
- }
108
- to {
109
- opacity: 1;
110
- }
100
+ :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {
101
+ --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));
102
+ --tooltip-left: var(--tool-tip-position-left);
103
+ }
104
+
105
+ :host(.tooltip-w) {
106
+ --tooltip-top: var(--tool-tip-position-top);
107
+ --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));
108
+ }
109
+
110
+ :host(.tooltip-e) {
111
+ --tooltip-top: var(--tool-tip-position-top);
112
+ --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));
111
113
  }
112
114
 
113
115
  :host:after{
@@ -119,73 +121,40 @@ class ToolTipElement extends HTMLElement {
119
121
  content: "";
120
122
  }
121
123
 
122
- :host(:popover-open),
123
- :host(:popover-open):before {
124
- animation-name: tooltip-appear;
125
- animation-duration: .1s;
126
- animation-fill-mode: forwards;
127
- animation-timing-function: ease-in;
128
- }
129
-
130
- :host(.\\:popover-open),
131
- :host(.\\:popover-open):before {
132
- animation-name: tooltip-appear;
133
- animation-duration: .1s;
134
- animation-fill-mode: forwards;
135
- animation-timing-function: ease-in;
136
- animation-delay: .4s;
137
- }
138
-
139
- :host(.tooltip-s):before,
140
- :host(.tooltip-n):before {
141
- right: 50%;
142
- margin-right: -${TOOLTIP_ARROW_EDGE_OFFSET}px;
143
- }
144
- :host(.tooltip-s):before,
145
- :host(.tooltip-se):before,
146
- :host(.tooltip-sw):before {
147
- bottom: 100%;
148
- border-bottom-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
149
- }
150
124
  :host(.tooltip-s):after,
151
125
  :host(.tooltip-se):after,
152
126
  :host(.tooltip-sw):after {
153
127
  bottom: 100%
154
128
  }
155
- :host(.tooltip-n):before,
156
- :host(.tooltip-ne):before,
157
- :host(.tooltip-nw):before {
158
- top: 100%;
159
- border-top-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
160
- }
129
+
161
130
  :host(.tooltip-n):after,
162
131
  :host(.tooltip-ne):after,
163
132
  :host(.tooltip-nw):after {
164
133
  top: 100%;
165
134
  }
166
- :host(.tooltip-se):before,
167
- :host(.tooltip-ne):before {
168
- left: 0;
169
- margin-left: ${TOOLTIP_ARROW_EDGE_OFFSET}px;
170
- }
171
- :host(.tooltip-sw):before,
172
- :host(.tooltip-nw):before {
173
- right: 0;
174
- margin-right: ${TOOLTIP_ARROW_EDGE_OFFSET}px;
135
+
136
+ @keyframes tooltip-appear {
137
+ from {
138
+ opacity: 0;
139
+ }
140
+ to {
141
+ opacity: 1;
142
+ }
175
143
  }
176
- :host(.tooltip-w):before {
177
- top: 50%;
178
- bottom: 50%;
179
- left: 100%;
180
- margin-top: -6px;
181
- border-left-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
144
+
145
+ :host(:popover-open),
146
+ :host(:popover-open):before {
147
+ animation-name: tooltip-appear;
148
+ animation-duration: .1s;
149
+ animation-fill-mode: forwards;
150
+ animation-timing-function: ease-in;
182
151
  }
183
- :host(.tooltip-e):before {
184
- top: 50%;
185
- right: 100%;
186
- bottom: 50%;
187
- margin-top: -6px;
188
- border-right-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
152
+
153
+ :host(.\\:popover-open) {
154
+ animation-name: tooltip-appear;
155
+ animation-duration: .1s;
156
+ animation-fill-mode: forwards;
157
+ animation-timing-function: ease-in;
189
158
  }
190
159
 
191
160
  @media (forced-colors: active) {
@@ -398,25 +367,25 @@ class ToolTipElement extends HTMLElement {
398
367
  this.#align = 'center'
399
368
  this.#side = 'outside-top'
400
369
  } else if (direction === 'ne') {
401
- this.#align = 'start'
370
+ this.#align = 'end'
402
371
  this.#side = 'outside-top'
403
372
  } else if (direction === 'e') {
404
373
  this.#align = 'center'
405
374
  this.#side = 'outside-right'
406
375
  } else if (direction === 'se') {
407
- this.#align = 'start'
376
+ this.#align = 'end'
408
377
  this.#side = 'outside-bottom'
409
378
  } else if (direction === 's') {
410
379
  this.#align = 'center'
411
380
  this.#side = 'outside-bottom'
412
381
  } else if (direction === 'sw') {
413
- this.#align = 'end'
382
+ this.#align = 'start'
414
383
  this.#side = 'outside-bottom'
415
384
  } else if (direction === 'w') {
416
385
  this.#align = 'center'
417
386
  this.#side = 'outside-left'
418
387
  } else if (direction === 'nw') {
419
- this.#align = 'end'
388
+ this.#align = 'start'
420
389
  this.#side = 'outside-top'
421
390
  }
422
391
  }
@@ -428,7 +397,7 @@ class ToolTipElement extends HTMLElement {
428
397
  const position = getAnchoredPosition(this, this.control, {
429
398
  side: this.#side,
430
399
  align: this.#align,
431
- anchorOffset: TOOLTIP_OFFSET,
400
+ anchorOffset: 0,
432
401
  })
433
402
  const anchorSide = position.anchorSide
434
403
  const align = position.anchorAlign
@@ -4,15 +4,15 @@
4
4
  <%= @label_text %>
5
5
  </label>
6
6
  <% if leading_visual || @show_clear_button %>
7
- <div class="<%= @field_wrap_classes %> <% if leading_visual %>FormControl-input-wrap--leadingVisual<% end %>">
8
- <span class="FormControl-input-leadingVisualWrap">
9
- <%= leading_visual %>
10
- </span>
11
- <%= input %>
12
- <% if @show_clear_button %>
13
- <button id="<%= @input_id %>-clear" class="FormControl-input-trailingAction" aria-label="Clear"><%= primer_octicon "x-circle-fill" %></button>
14
- <% end %>
15
- </div>
7
+ <div class="<%= @field_wrap_classes %> <% if leading_visual %>FormControl-input-wrap--leadingVisual<% end %>">
8
+ <span class="FormControl-input-leadingVisualWrap">
9
+ <%= leading_visual %>
10
+ </span>
11
+ <%= input %>
12
+ <% if @show_clear_button %>
13
+ <button id="<%= @input_id %>-clear" class="FormControl-input-trailingAction" aria-label="Clear"><%= primer_octicon "x-circle-fill" %></button>
14
+ <% end %>
15
+ </div>
16
16
  <% else %>
17
17
  <%= input %>
18
18
  <% end %>
@@ -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(--borderColor-neutral-emphasis,var(--color-fg-subtle));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(--fgColor-default,var(--color-fg-default))}
1
+ .breadcrumb-item{display:inline-block;list-style:none;margin-left:-.35em;white-space:nowrap}.breadcrumb-item:after{border-right:.1em solid var(--borderColor-neutral-emphasis,var(--color-fg-subtle));content:"";display:inline-block;height:.8em;margin:0 .5em;transform:rotate(15deg) translateY(.0625em)}.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(--fgColor-default,var(--color-fg-default));cursor:default!important;-webkit-text-decoration:none!important;text-decoration:none!important}
@@ -1 +1 @@
1
- {"version":3,"sources":["breadcrumbs.pcss"],"names":[],"mappings":"AAAA,iBACE,oBAAqB,CAGrB,eAAgB,CAFhB,kBAAoB,CACpB,kBAeF,CAZE,uBAKE,kFAA6D,CAD7D,UAAW,CAHX,oBAAqB,CACrB,WAAa,CACb,aAAe,CAGf,uBACF,CAEA,6BACE,aACF,CAKA,+FACE,YACF,CAGF,4BACE,oDACF","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(--borderColor-neutral-emphasis);\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(--fgColor-default);\n}\n"]}
1
+ {"version":3,"sources":["breadcrumbs.pcss"],"names":[],"mappings":"AAAA,iBACE,oBAAqB,CAGrB,eAAgB,CAFhB,kBAAoB,CACpB,kBAeF,CAZE,uBAKE,kFAA6D,CAD7D,UAAW,CAHX,oBAAqB,CACrB,WAAa,CACb,aAAe,CAGf,2CACF,CAEA,6BACE,aACF,CAKA,+FACE,YACF,CAGF,4BACE,oDAA6B,CAC7B,wBAA0B,CAC1B,sCAAgC,CAAhC,8BACF","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(--borderColor-neutral-emphasis);\n transform: rotate(15deg) translateY(0.0625em);\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(--fgColor-default);\n cursor: default !important;\n text-decoration: none !important;\n}\n"]}
@@ -10,7 +10,7 @@
10
10
  margin: 0 0.5em;
11
11
  content: '';
12
12
  border-right: 0.1em solid var(--borderColor-neutral-emphasis);
13
- transform: rotate(15deg);
13
+ transform: rotate(15deg) translateY(0.0625em);
14
14
  }
15
15
 
16
16
  &:first-child {
@@ -27,4 +27,6 @@
27
27
 
28
28
  .breadcrumb-item-selected a {
29
29
  color: var(--fgColor-default);
30
+ cursor: default !important;
31
+ text-decoration: none !important;
30
32
  }
@@ -1 +1 @@
1
- :root{--duration-fast:80ms;--easing-easeInOut:cubic-bezier(0.65,0,0.35,1)}.Button{align-items:center;background-color:initial;border:var(--borderWidth-thin,max(1px,.0625rem)) solid;border-color:#0000;border-radius:var(--borderRadius-medium,.375rem);color:var(--button-default-fgColor-rest,var(--color-btn-text));cursor:pointer;display:inline-flex;flex-direction:row;font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-medium,500);gap:var(--base-size-4,.25rem);height:var(--control-medium-size,2rem);justify-content:space-between;min-width:max-content;padding:0 var(--control-medium-paddingInline-normal,.75rem);position:relative;text-align:center;transition:var(--duration-fast) var(--easing-easeInOut);transition-property:color,fill,background-color,border-color;-webkit-user-select:none;user-select:none}@media (pointer:coarse){.Button:before{content:"";height:100%;left:50%;min-height:48px;min-width:48px;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}}.Button:hover{transition-duration:var(--duration-fast)}.Button:active{transition:none}.Button:disabled,.Button[aria-disabled=true]{box-shadow:none;cursor:not-allowed}a.Button:hover,summary.Button:hover{-webkit-text-decoration:none;text-decoration:none}.Button-content{align-items:center;display:grid;flex:1 0 auto;grid-template-areas:"leadingVisual text trailingVisual";grid-template-columns:min-content minmax(0,auto) min-content;place-content:center}.Button-content>:not(:last-child){margin-right:var(--control-medium-gap,.5rem)}.Button-content--alignStart{justify-content:start}.Button-visual{display:flex;pointer-events:none}.Button-visual .Counter{background-color:var(--buttonCounter-default-bgColor-rest,var(--color-btn-counter-bg));color:inherit}.Button-label{grid-area:text;line-height:var(--text-body-lineHeight-medium,1.4285);white-space:nowrap}.Button-leadingVisual{grid-area:leadingVisual}.Button-leadingVisual svg{fill:currentcolor}.Button-trailingVisual{grid-area:trailingVisual}.Button-trailingAction{margin-right:calc(var(--base-size-4,.25rem)*-1)}.Button--small{font-size:var(--text-body-size-small,.75rem);gap:var(--control-small-gap,.25rem);height:var(--control-small-size,1.75rem);padding:0 var(--control-small-paddingInline-condensed,.5rem)}.Button--small .Button-label{line-height:var(--text-body-lineHeight-small,1.6666)}.Button--small .Button-content>:not(:last-child){margin-right:var(--control-small-gap,.25rem)}.Button--large{gap:var(--control-large-gap,.5rem);height:var(--control-large-size,2.5rem);padding:0 var(--control-large-paddingInline-spacious,1rem)}.Button--large .Button-label{line-height:var(--text-body-lineHeight-large,1.5)}.Button--large .Button-content>:not(:last-child){margin-right:var(--control-large-gap,.5rem)}.Button--fullWidth{width:100%}.Button--primary{color:var(--button-primary-fgColor-rest,var(--color-btn-primary-text));fill:var(--button-primary-iconColor-rest,var(--color-btn-primary-icon));background-color:var(--button-primary-bgColor-rest,var(--color-btn-primary-bg));border-color:var(--button-primary-borderColor-rest,var(--color-btn-primary-border));box-shadow:var(--shadow-resting-small,var(--color-btn-primary-shadow))}.Button--primary:hover:not(:disabled,.Button--inactive){background-color:var(--button-primary-bgColor-hover,var(--color-btn-primary-hover-bg));border-color:var(--button-primary-borderColor-hover,var(--color-btn-primary-hover-border))}.Button--primary:focus{box-shadow:inset 0 0 0 3px var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:-2px}.Button--primary:focus:not(:focus-visible){box-shadow:none;outline:1px solid #0000}.Button--primary:focus-visible{box-shadow:inset 0 0 0 3px var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:-2px}.Button--primary:active:not(:disabled),.Button--primary[aria-pressed=true]{background-color:var(--button-primary-bgColor-active,var(--color-btn-primary-selected-bg));box-shadow:var(--button-primary-shadow-selected,var(--color-btn-primary-selected-shadow))}.Button--primary:disabled,.Button--primary[aria-disabled=true]{background-color:var(--button-primary-bgColor-disabled,var(--color-btn-primary-disabled-bg));border-color:var(--button-primary-borderColor-disabled,var(--color-btn-primary-disabled-border));color:var(--button-primary-fgColor-disabled,var(--color-btn-primary-disabled-text));fill:var(--button-primary-fgColor-disabled,var(--color-btn-primary-disabled-text))}.Button--primary .Counter{background-color:var(--buttonCounter-primary-bgColor-rest,var(--color-btn-primary-counter-bg));color:inherit}.Button--secondary{color:var(--button-default-fgColor-rest,var(--color-btn-text));fill:var(--fgColor-muted,var(--color-fg-muted));background-color:var(--button-default-bgColor-rest,var(--color-btn-bg));border-color:var(--button-default-borderColor-rest,var(--color-btn-border));box-shadow:var(--button-default-shadow-resting,var(--color-btn-shadow)),var(--button-default-shadow-inset,var(--color-btn-inset-shadow))}.Button--secondary:hover:not(:disabled,.Button--inactive){background-color:var(--button-default-bgColor-hover,var(--color-btn-hover-bg));border-color:var(--button-default-borderColor-hover,var(--color-btn-hover-border))}.Button--secondary:active:not(:disabled){background-color:var(--button-default-bgColor-active,var(--color-btn-active-bg));border-color:var(--button-default-borderColor-active,var(--color-btn-active-border))}.Button--secondary[aria-pressed=true]{background-color:var(--button-default-bgColor-selected,var(--color-btn-selected-bg));box-shadow:var(--shadow-inset,var(--color-primer-shadow-inset))}.Button--secondary:disabled,.Button--secondary[aria-disabled=true]{background-color:var(--button-default-bgColor-disabled,var(--color-btn-bg));border-color:var(--button-default-borderColor-disabled,var(--color-btn-border));color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));fill:var(--control-fgColor-disabled,var(--color-primer-fg-disabled))}.Button--invisible{color:var(--button-default-fgColor-rest,var(--color-btn-text))}.Button--invisible.Button--iconOnly{color:var(--button-invisible-iconColor-rest,var(--color-fg-muted))}.Button--invisible:hover:not(:disabled,.Button--inactive){background-color:var(--control-transparent-bgColor-hover,var(--color-action-list-item-default-hover-bg))}.Button--invisible:active:not(:disabled),.Button--invisible[aria-pressed=true]{background-color:var(--button-invisible-bgColor-active,var(--color-action-list-item-default-active-bg))}.Button--invisible:disabled,.Button--invisible[aria-disabled=true]{background-color:var(--button-invisible-bgColor-disabled,var(--color-action-list-item-default-selected-bg));border-color:var(--button-invisible-borderColor-disabled,var(--color-action-list-item-default-selected-bg));color:var(--button-invisible-fgColor-disabled,var(--color-primer-fg-disabled));fill:var(--button-invisible-fgColor-disabled,var(--color-primer-fg-disabled))}.Button--invisible.Button--invisible-noVisuals .Button-label{color:var(--button-invisible-fgColor-rest,var(--color-btn-outline-text))}.Button--invisible .Button-visual{color:var(--button-invisible-iconColor-rest,var(--color-fg-muted))}.Button--invisible .Button-visual .Counter{color:var(--fgColor-default,var(--color-fg-default))}.Button--link{color:var(--fgColor-link,var(--color-accent-fg));fill:var(--fgColor-link,var(--color-accent-fg));border:none;display:inline-block;font-size:inherit;height:unset;padding:0}.Button--link:hover:not(:disabled,.Button--inactive){-webkit-text-decoration:underline;text-decoration:underline}.Button--link:focus,.Button--link:focus-visible{outline-offset:2px}.Button--link:disabled,.Button--link[aria-disabled=true]{background-color:initial;border-color:#0000;color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));fill:var(--control-fgColor-disabled,var(--color-primer-fg-disabled))}.Button--danger{color:var(--button-danger-fgColor-rest,var(--color-btn-danger-text));fill:var(--button-danger-iconColor-rest,var(--color-btn-danger-icon));background-color:var(--button-danger-bgColor-rest,var(--color-btn-bg));border-color:var(--button-danger-borderColor-rest,var(--color-btn-border));box-shadow:var(--button-default-shadow-resting,var(--color-btn-shadow)),var(--button-default-shadow-inset,var(--color-btn-inset-shadow))}.Button--danger:hover:not(:disabled,.Button--inactive){color:var(--button-danger-fgColor-hover,var(--color-btn-danger-hover-text));fill:var(--button-danger-fgColor-hover,var(--color-btn-danger-hover-text));background-color:var(--button-danger-bgColor-hover,var(--color-btn-danger-hover-bg));border-color:var(--button-danger-borderColor-hover,var(--color-btn-danger-hover-border));box-shadow:var(--shadow-resting-small,var(--color-shadow-small))}.Button--danger:hover:not(:disabled,.Button--inactive) .Counter{background-color:var(--buttonCounter-danger-bgColor-hover,var(--color-btn-danger-hover-counter-bg));color:var(--buttonCounter-danger-fgColor-hover,var(--color-btn-danger-hover-counter-fg))}.Button--danger:active:not(:disabled),.Button--danger[aria-pressed=true]{color:var(--button-danger-fgColor-active,var(--color-btn-danger-selected-text));fill:var(--button-danger-fgColor-active,var(--color-btn-danger-selected-text));background-color:var(--button-danger-bgColor-active,var(--color-btn-danger-selected-bg));border-color:var(--button-danger-borderColor-active,var(--color-btn-danger-selected-border));box-shadow:var(--button-danger-shadow-selected,var(--color-btn-danger-selected-shadow))}.Button--danger:disabled,.Button--danger[aria-disabled=true]{color:var(--button-danger-fgColor-disabled,var(--color-btn-danger-disabled-text));fill:var(--button-danger-fgColor-disabled,var(--color-btn-danger-disabled-text));background-color:var(--button-danger-bgColor-disabled,var(--color-btn-danger-disabled-bg));border-color:var(--button-default-borderColor-disabled,var(--color-btn-border))}.Button--danger:disabled .Counter,.Button--danger[aria-disabled=true] .Counter{background-color:var(--buttonCounter-danger-bgColor-disabled,var(--color-btn-danger-disabled-counter-bg));color:var(--buttonCounter-danger-fgColor-disabled,var(--color-btn-danger-disabled-counter-fg))}.Button--danger .Counter{background-color:var(--buttonCounter-danger-bgColor-rest,var(--color-btn-danger-counter-bg));color:var(--buttonCounter-danger-fgColor-rest,var(--color-btn-danger-counter-fg))}.Button--iconOnly{display:inline-grid;padding:unset;place-content:center;width:var(--control-medium-size,2rem)}.Button--iconOnly.Button--small{width:var(--control-small-size,1.75rem)}.Button--iconOnly.Button--large{width:var(--control-large-size,2.5rem)}.Button--inactive:not([aria-disabled=true],:disabled){background-color:var(--button-inactive-bgColor);border:0;color:var(--button-inactive-fgColor);cursor:default}
1
+ :root{--duration-fast:80ms;--easing-easeInOut:cubic-bezier(0.65,0,0.35,1)}.Button{align-items:center;background-color:initial;border:var(--borderWidth-thin,max(1px,.0625rem)) solid;border-color:#0000;border-radius:var(--borderRadius-medium,.375rem);color:var(--button-default-fgColor-rest,var(--color-btn-text));cursor:pointer;display:inline-flex;flex-direction:row;font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-medium,500);gap:var(--base-size-4,.25rem);height:var(--control-medium-size,2rem);justify-content:space-between;min-width:max-content;padding:0 var(--control-medium-paddingInline-normal,.75rem);position:relative;text-align:center;transition:var(--duration-fast) var(--easing-easeInOut);transition-property:color,fill,background-color,border-color;-webkit-user-select:none;user-select:none}@media (pointer:coarse){.Button:before{content:"";height:100%;left:50%;min-height:48px;min-width:48px;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}}.Button:hover{transition-duration:var(--duration-fast)}.Button:active{transition:none}.Button:disabled,.Button[aria-disabled=true]{box-shadow:none;cursor:not-allowed}.Button.Button--iconOnly{color:var(--fgColor-muted,var(--color-fg-muted))}a.Button:hover,summary.Button:hover{-webkit-text-decoration:none;text-decoration:none}.Button-content{align-items:center;display:grid;flex:1 0 auto;grid-template-areas:"leadingVisual text trailingVisual";grid-template-columns:min-content minmax(0,auto) min-content;place-content:center}.Button-content>:not(:last-child){margin-right:var(--control-medium-gap,.5rem)}.Button-content--alignStart{justify-content:start}.Button-visual{display:flex;pointer-events:none}.Button-visual .Counter{background-color:var(--buttonCounter-default-bgColor-rest,var(--color-btn-counter-bg));color:inherit}.Button-label{grid-area:text;line-height:var(--text-body-lineHeight-medium,1.4285);white-space:nowrap}.Button-leadingVisual{grid-area:leadingVisual}.Button-leadingVisual svg{fill:currentcolor}.Button-trailingVisual{grid-area:trailingVisual}.Button-trailingAction{margin-right:calc(var(--base-size-4,.25rem)*-1)}.Button--small{font-size:var(--text-body-size-small,.75rem);gap:var(--control-small-gap,.25rem);height:var(--control-small-size,1.75rem);padding:0 var(--control-small-paddingInline-condensed,.5rem)}.Button--small .Button-label{line-height:var(--text-body-lineHeight-small,1.6666)}.Button--small .Button-content>:not(:last-child){margin-right:var(--control-small-gap,.25rem)}.Button--large{gap:var(--control-large-gap,.5rem);height:var(--control-large-size,2.5rem);padding:0 var(--control-large-paddingInline-spacious,1rem)}.Button--large .Button-label{line-height:var(--text-body-lineHeight-large,1.5)}.Button--large .Button-content>:not(:last-child){margin-right:var(--control-large-gap,.5rem)}.Button--fullWidth{width:100%}.Button--primary{color:var(--button-primary-fgColor-rest,var(--color-btn-primary-text));fill:var(--button-primary-iconColor-rest,var(--color-btn-primary-icon));background-color:var(--button-primary-bgColor-rest,var(--color-btn-primary-bg));border-color:var(--button-primary-borderColor-rest,var(--color-btn-primary-border));box-shadow:var(--shadow-resting-small,var(--color-btn-primary-shadow))}.Button--primary:hover:not(:disabled,.Button--inactive){background-color:var(--button-primary-bgColor-hover,var(--color-btn-primary-hover-bg));border-color:var(--button-primary-borderColor-hover,var(--color-btn-primary-hover-border))}.Button--primary:focus{box-shadow:inset 0 0 0 3px var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:-2px}.Button--primary:focus:not(:focus-visible){box-shadow:none;outline:1px solid #0000}.Button--primary:focus-visible{box-shadow:inset 0 0 0 3px var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:-2px}.Button--primary:active:not(:disabled),.Button--primary[aria-pressed=true]{background-color:var(--button-primary-bgColor-active,var(--color-btn-primary-selected-bg));box-shadow:var(--button-primary-shadow-selected,var(--color-btn-primary-selected-shadow))}.Button--primary:disabled,.Button--primary[aria-disabled=true]{background-color:var(--button-primary-bgColor-disabled,var(--color-btn-primary-disabled-bg));border-color:var(--button-primary-borderColor-disabled,var(--color-btn-primary-disabled-border));color:var(--button-primary-fgColor-disabled,var(--color-btn-primary-disabled-text));fill:var(--button-primary-fgColor-disabled,var(--color-btn-primary-disabled-text))}.Button--primary .Counter{background-color:var(--buttonCounter-primary-bgColor-rest,var(--color-btn-primary-counter-bg));color:inherit}.Button--secondary{color:var(--button-default-fgColor-rest,var(--color-btn-text));fill:var(--fgColor-muted,var(--color-fg-muted));background-color:var(--button-default-bgColor-rest,var(--color-btn-bg));border-color:var(--button-default-borderColor-rest,var(--color-btn-border));box-shadow:var(--button-default-shadow-resting,var(--color-btn-shadow)),var(--button-default-shadow-inset,var(--color-btn-inset-shadow))}.Button--secondary:hover:not(:disabled,.Button--inactive){background-color:var(--button-default-bgColor-hover,var(--color-btn-hover-bg));border-color:var(--button-default-borderColor-hover,var(--color-btn-hover-border))}.Button--secondary:active:not(:disabled){background-color:var(--button-default-bgColor-active,var(--color-btn-active-bg));border-color:var(--button-default-borderColor-active,var(--color-btn-active-border))}.Button--secondary[aria-pressed=true]{background-color:var(--button-default-bgColor-selected,var(--color-btn-selected-bg));box-shadow:var(--shadow-inset,var(--color-primer-shadow-inset))}.Button--secondary:disabled,.Button--secondary[aria-disabled=true]{background-color:var(--button-default-bgColor-disabled,var(--color-btn-bg));border-color:var(--button-default-borderColor-disabled,var(--color-btn-border));color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));fill:var(--control-fgColor-disabled,var(--color-primer-fg-disabled))}.Button--invisible{color:var(--button-default-fgColor-rest,var(--color-btn-text))}.Button--invisible.Button--iconOnly{color:var(--button-invisible-iconColor-rest,var(--color-fg-muted))}.Button--invisible:hover:not(:disabled,.Button--inactive){background-color:var(--control-transparent-bgColor-hover,var(--color-action-list-item-default-hover-bg))}.Button--invisible:active:not(:disabled),.Button--invisible[aria-pressed=true]{background-color:var(--button-invisible-bgColor-active,var(--color-action-list-item-default-active-bg))}.Button--invisible:disabled,.Button--invisible[aria-disabled=true]{background-color:var(--button-invisible-bgColor-disabled,var(--color-action-list-item-default-selected-bg));border-color:var(--button-invisible-borderColor-disabled,var(--color-action-list-item-default-selected-bg));color:var(--button-invisible-fgColor-disabled,var(--color-primer-fg-disabled));fill:var(--button-invisible-fgColor-disabled,var(--color-primer-fg-disabled))}.Button--invisible.Button--invisible-noVisuals .Button-label{color:var(--button-invisible-fgColor-rest,var(--color-btn-outline-text))}.Button--invisible .Button-visual{color:var(--button-invisible-iconColor-rest,var(--color-fg-muted))}.Button--invisible .Button-visual .Counter{color:var(--fgColor-default,var(--color-fg-default))}.Button--link{color:var(--fgColor-link,var(--color-accent-fg));fill:var(--fgColor-link,var(--color-accent-fg));border:none;display:inline-block;font-size:inherit;height:unset;padding:0}.Button--link:hover:not(:disabled,.Button--inactive){-webkit-text-decoration:underline;text-decoration:underline}.Button--link:focus,.Button--link:focus-visible{outline-offset:2px}.Button--link:disabled,.Button--link[aria-disabled=true]{background-color:initial;border-color:#0000;color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled));fill:var(--control-fgColor-disabled,var(--color-primer-fg-disabled))}.Button--danger{color:var(--button-danger-fgColor-rest,var(--color-btn-danger-text));fill:var(--button-danger-iconColor-rest,var(--color-btn-danger-icon));background-color:var(--button-danger-bgColor-rest,var(--color-btn-bg));border-color:var(--button-danger-borderColor-rest,var(--color-btn-border));box-shadow:var(--button-default-shadow-resting,var(--color-btn-shadow)),var(--button-default-shadow-inset,var(--color-btn-inset-shadow))}.Button--danger:hover:not(:disabled,.Button--inactive){color:var(--button-danger-fgColor-hover,var(--color-btn-danger-hover-text));fill:var(--button-danger-fgColor-hover,var(--color-btn-danger-hover-text));background-color:var(--button-danger-bgColor-hover,var(--color-btn-danger-hover-bg));border-color:var(--button-danger-borderColor-hover,var(--color-btn-danger-hover-border));box-shadow:var(--shadow-resting-small,var(--color-shadow-small))}.Button--danger:hover:not(:disabled,.Button--inactive) .Counter{background-color:var(--buttonCounter-danger-bgColor-hover,var(--color-btn-danger-hover-counter-bg));color:var(--buttonCounter-danger-fgColor-hover,var(--color-btn-danger-hover-counter-fg))}.Button--danger:active:not(:disabled),.Button--danger[aria-pressed=true]{color:var(--button-danger-fgColor-active,var(--color-btn-danger-selected-text));fill:var(--button-danger-fgColor-active,var(--color-btn-danger-selected-text));background-color:var(--button-danger-bgColor-active,var(--color-btn-danger-selected-bg));border-color:var(--button-danger-borderColor-active,var(--color-btn-danger-selected-border));box-shadow:var(--button-danger-shadow-selected,var(--color-btn-danger-selected-shadow))}.Button--danger:disabled,.Button--danger[aria-disabled=true]{color:var(--button-danger-fgColor-disabled,var(--color-btn-danger-disabled-text));fill:var(--button-danger-fgColor-disabled,var(--color-btn-danger-disabled-text));background-color:var(--button-danger-bgColor-disabled,var(--color-btn-danger-disabled-bg));border-color:var(--button-default-borderColor-disabled,var(--color-btn-border))}.Button--danger:disabled .Counter,.Button--danger[aria-disabled=true] .Counter{background-color:var(--buttonCounter-danger-bgColor-disabled,var(--color-btn-danger-disabled-counter-bg));color:var(--buttonCounter-danger-fgColor-disabled,var(--color-btn-danger-disabled-counter-fg))}.Button--danger .Counter{background-color:var(--buttonCounter-danger-bgColor-rest,var(--color-btn-danger-counter-bg));color:var(--buttonCounter-danger-fgColor-rest,var(--color-btn-danger-counter-fg))}.Button--iconOnly{display:inline-grid;padding:unset;place-content:center;width:var(--control-medium-size,2rem)}.Button--iconOnly.Button--small{width:var(--control-small-size,1.75rem)}.Button--iconOnly.Button--large{width:var(--control-large-size,2.5rem)}.Button--inactive:not([aria-disabled=true],:disabled){background-color:var(--button-inactive-bgColor);border:0;color:var(--button-inactive-fgColor);cursor:default}
@@ -8,6 +8,7 @@
8
8
  ".Button:active",
9
9
  ".Button:disabled",
10
10
  ".Button[aria-disabled=true]",
11
+ ".Button.Button--iconOnly",
11
12
  "a.Button:hover",
12
13
  "summary.Button:hover",
13
14
  ".Button-content",
@@ -1 +1 @@
1
- {"version":3,"sources":["button.pcss","<no source>","../../../../lib/postcss_mixins/focusOutlineOnEmphasis.pcss"],"names":[],"mappings":"AAGA,MACE,oBAAqB,CACrB,8CACF,CAGA,QAmBE,kBAAmB,CAbnB,wBAA6B,CAC7B,sDAAqC,CACrC,kBAAyB,CACzB,gDAAyC,CACzC,8DAAyC,CANzC,cAAe,CAYf,mBAAoB,CACpB,kBAAmB,CAfnB,8CAAuC,CACvC,8CAA2C,CAiB3C,6BAAuB,CANvB,sCAAkC,CAIlC,6BAA8B,CAG9B,qBAAsB,CANtB,2DAAqD,CAdrD,iBAAkB,CAYlB,iBAAkB,CAFlB,uDAAwD,CACxD,4DAAgE,CAPhE,wBAAiB,CAAjB,gBAwCF,CArBE,wBAEI,eCnCN,WAAA,YAAA,SAAA,gBAAA,eAAA,kBAAA,QAAA,4CAAA,UDmCsC,CAEpC,CAIA,cACE,wCACF,CAEA,eACE,eACF,CAEA,6CAGE,eAAgB,CADhB,kBAEF,CAKA,oCACE,4BAAqB,CAArB,oBACF,CAIF,gBAKE,kBAAmB,CAHnB,YAAa,CADb,aAAc,CAEd,uDAAwD,CACxD,4DAA8D,CAE9D,oBAOF,CAHE,kCACE,4CACF,CAIF,4BACE,qBACF,CAKA,eACE,YAAa,CACb,mBAMF,CAJE,wBAEE,sFAA2D,CAD3D,aAEF,CAGF,cACE,cAAe,CAEf,qDAA+C,CAD/C,kBAEF,CAEA,sBACE,uBACF,CAEA,0BACE,iBACF,CAEA,uBACE,wBACF,CAEA,uBACE,+CACF,CAIA,eACE,4CAAsC,CAGtC,mCAA6B,CAF7B,wCAAiC,CACjC,4DAYF,CATE,6BACE,oDACF,CAGE,iDACE,4CACF,CAIJ,eAGE,kCAA6B,CAF7B,uCAAiC,CACjC,0DAYF,CATE,6BACE,iDACF,CAGE,iDACE,2CACF,CAIJ,mBACE,UACF,CAKA,iBACE,sEAAyC,CACzC,uEAA0C,CAC1C,+EAAoD,CACpD,mFAAoD,CACpD,sEAyCF,CAvCE,wDACE,sFAAqD,CACrD,0FACF,CAGA,uBE1KA,gFAAqD,CAFrD,kEAAgC,CAChC,mBFmLA,CAJE,2CAEE,eAAgB,CADhB,uBAEF,CAIF,+BErLA,gFAAqD,CAFrD,kEAAgC,CAChC,mBFwLA,CAEA,2EAEE,0FAAsD,CACtD,yFACF,CAEA,+DAGE,4FAAwD,CACxD,gGAAwD,CAFxD,mFAA6C,CAG7C,kFACF,CAEA,0BAEE,8FAA2D,CAD3D,aAEF,CAIF,mBACE,8DAAyC,CACzC,+CAA0B,CAC1B,uEAAoD,CACpD,2EAAoD,CACpD,wIAwBF,CAtBE,0DACE,8EAAqD,CACrD,kFACF,CAEA,yCACE,gFAAsD,CACtD,oFACF,CAEA,sCACE,oFAAwD,CACxD,+DACF,CAEA,mEAGE,2EAAwD,CACxD,+EAAwD,CAFxD,qEAAsC,CAGtC,oEACF,CAGF,mBACE,8DAmCF,CAjCE,oCACE,kEACF,CAEA,0DACE,wGACF,CAEA,+EAEE,uGACF,CAEA,mEAGE,2GAA0D,CAC1D,2GAA0D,CAF1D,8EAA+C,CAG/C,6EACF,CAGA,6DACE,wEACF,CAEA,kCACE,kEAKF,CAHE,2CACE,oDACF,CAIJ,cACE,gDAA0B,CAC1B,+CAAyB,CAGzB,WAAY,CAFZ,oBAAqB,CACrB,iBAAkB,CAElB,YAAa,CACb,SAkBF,CAhBE,qDACE,iCAA0B,CAA1B,yBACF,CAEA,gDAEE,kBACF,CAEA,yDAGE,wBAA6B,CAC7B,kBAAyB,CAFzB,qEAAsC,CAGtC,oEACF,CAIF,gBACE,oEAAwC,CACxC,qEAAyC,CACzC,sEAAmD,CACnD,0EAAmD,CACnD,wIAyCF,CAvCE,uDACE,2EAAyC,CACzC,0EAAwC,CACxC,oFAAoD,CACpD,wFAAoD,CACpD,gEAMF,CAJE,gEAEE,mGAA2D,CAD3D,wFAEF,CAGF,yEAEE,+EAA0C,CAC1C,8EAAyC,CACzC,wFAAqD,CACrD,4FAAqD,CACrD,uFACF,CAEA,6DAEE,iFAA4C,CAC5C,gFAA2C,CAC3C,0FAAuD,CACvD,+EAMF,CAJE,+EAEE,yGAA8D,CAD9D,8FAEF,CAGF,yBAEE,4FAA0D,CAD1D,iFAEF,CAGF,kBACE,mBAAoB,CAEpB,aAAc,CADd,oBAAqB,CAErB,qCASF,CAPE,gCACE,uCACF,CAEA,gCACE,sCACF,CAIF,sDACE,+CAAgD,CAChD,QAAS,CACT,oCAAqC,CACrC,cACF","file":"button.css","sourcesContent":["/* CSS for Button */\n\n/* temporary, pre primitives release */\n:root {\n --duration-fast: 80ms;\n --easing-easeInOut: cubic-bezier(0.65, 0, 0.35, 1);\n}\n\n/* base button */\n.Button {\n position: relative;\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-medium);\n cursor: pointer;\n user-select: none;\n background-color: transparent;\n border: var(--borderWidth-thin) solid;\n border-color: transparent;\n border-radius: var(--borderRadius-medium);\n color: var(--button-default-fgColor-rest);\n transition: var(--duration-fast) var(--easing-easeInOut);\n transition-property: color, fill, background-color, border-color;\n text-align: center;\n height: var(--control-medium-size);\n padding: 0 var(--control-medium-paddingInline-normal);\n display: inline-flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: var(--base-size-4);\n min-width: max-content;\n\n /* mobile friendly sizing */\n @media (pointer: coarse) {\n &::before {\n @mixin minTouchTarget 48px, 48px;\n }\n }\n\n /* base states */\n\n &:hover {\n transition-duration: var(--duration-fast);\n }\n\n &:active {\n transition: none;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n cursor: not-allowed;\n box-shadow: none;\n }\n}\n\na.Button,\nsummary.Button {\n &:hover {\n text-decoration: none;\n }\n}\n\n/* wrap grid content to allow trailingAction to lock-right */\n.Button-content {\n flex: 1 0 auto;\n display: grid;\n grid-template-areas: 'leadingVisual text trailingVisual';\n grid-template-columns: min-content minmax(0, auto) min-content;\n align-items: center;\n place-content: center;\n\n /* padding-bottom: 1px; optical alignment for firefox */\n\n & > :not(:last-child) {\n margin-right: var(--control-medium-gap);\n }\n}\n\n/* center child elements for fullWidth */\n.Button-content--alignStart {\n justify-content: start;\n}\n\n/* button child elements */\n\n/* align svg */\n.Button-visual {\n display: flex;\n pointer-events: none; /* allow click handler to work, avoiding visuals */\n\n & .Counter {\n color: inherit;\n background-color: var(--buttonCounter-default-bgColor-rest);\n }\n}\n\n.Button-label {\n grid-area: text;\n white-space: nowrap;\n line-height: var(--text-body-lineHeight-medium);\n}\n\n.Button-leadingVisual {\n grid-area: leadingVisual;\n}\n\n.Button-leadingVisual svg {\n fill: currentcolor;\n}\n\n.Button-trailingVisual {\n grid-area: trailingVisual;\n}\n\n.Button-trailingAction {\n margin-right: calc(var(--base-size-4) * -1);\n}\n\n/* sizes */\n\n.Button--small {\n font-size: var(--text-body-size-small);\n height: var(--control-small-size);\n padding: 0 var(--control-small-paddingInline-condensed);\n gap: var(--control-small-gap);\n\n & .Button-label {\n line-height: var(--text-body-lineHeight-small);\n }\n\n & .Button-content {\n & > :not(:last-child) {\n margin-right: var(--control-small-gap);\n }\n }\n}\n\n.Button--large {\n height: var(--control-large-size);\n padding: 0 var(--control-large-paddingInline-spacious);\n gap: var(--control-large-gap);\n\n & .Button-label {\n line-height: var(--text-body-lineHeight-large);\n }\n\n & .Button-content {\n & > :not(:last-child) {\n margin-right: var(--control-large-gap);\n }\n }\n}\n\n.Button--fullWidth {\n width: 100%;\n}\n\n/* variants */\n\n/* primary */\n.Button--primary {\n color: var(--button-primary-fgColor-rest);\n fill: var(--button-primary-iconColor-rest);\n background-color: var(--button-primary-bgColor-rest);\n border-color: var(--button-primary-borderColor-rest);\n box-shadow: var(--shadow-resting-small, var(--color-btn-primary-shadow));\n\n &:hover:not(:disabled, .Button--inactive) {\n background-color: var(--button-primary-bgColor-hover);\n border-color: var(--button-primary-borderColor-hover);\n }\n\n /* fallback :focus state */\n &:focus {\n @mixin focusOutlineOnEmphasis;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n outline: solid 1px transparent;\n box-shadow: none;\n }\n }\n\n /* default focus state */\n &:focus-visible {\n @mixin focusOutlineOnEmphasis;\n }\n\n &:active:not(:disabled),\n &[aria-pressed='true'] {\n background-color: var(--button-primary-bgColor-active);\n box-shadow: var(--button-primary-shadow-selected);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--button-primary-fgColor-disabled);\n background-color: var(--button-primary-bgColor-disabled);\n border-color: var(--button-primary-borderColor-disabled);\n fill: var(--button-primary-fgColor-disabled);\n }\n\n & .Counter {\n color: inherit;\n background-color: var(--buttonCounter-primary-bgColor-rest);\n }\n}\n\n/* default (secondary) */\n.Button--secondary {\n color: var(--button-default-fgColor-rest);\n fill: var(--fgColor-muted); /* help this */\n background-color: var(--button-default-bgColor-rest);\n border-color: var(--button-default-borderColor-rest);\n box-shadow: var(--button-default-shadow-resting), var(--button-default-shadow-inset);\n\n &:hover:not(:disabled, .Button--inactive) {\n background-color: var(--button-default-bgColor-hover);\n border-color: var(--button-default-borderColor-hover);\n }\n\n &:active:not(:disabled) {\n background-color: var(--button-default-bgColor-active);\n border-color: var(--button-default-borderColor-active);\n }\n\n &[aria-pressed='true'] {\n background-color: var(--button-default-bgColor-selected);\n box-shadow: var(--shadow-inset);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--control-fgColor-disabled);\n background-color: var(--button-default-bgColor-disabled);\n border-color: var(--button-default-borderColor-disabled);\n fill: var(--control-fgColor-disabled);\n }\n}\n\n.Button--invisible {\n color: var(--button-default-fgColor-rest);\n\n &.Button--iconOnly {\n color: var(--button-invisible-iconColor-rest, var(--color-fg-muted));\n }\n\n &:hover:not(:disabled, .Button--inactive) {\n background-color: var(--control-transparent-bgColor-hover, var(--color-action-list-item-default-hover-bg));\n }\n\n &[aria-pressed='true'],\n &:active:not(:disabled) {\n background-color: var(--button-invisible-bgColor-active);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--button-invisible-fgColor-disabled);\n background-color: var(--button-invisible-bgColor-disabled);\n border-color: var(--button-invisible-borderColor-disabled);\n fill: var(--button-invisible-fgColor-disabled);\n }\n\n /* if button has no visuals, use link blue for text */\n &.Button--invisible-noVisuals .Button-label {\n color: var(--button-invisible-fgColor-rest);\n }\n\n & .Button-visual {\n color: var(--button-invisible-iconColor-rest, var(--color-fg-muted));\n\n & .Counter {\n color: var(--fgColor-default);\n }\n }\n}\n\n.Button--link {\n color: var(--fgColor-link);\n fill: var(--fgColor-link);\n display: inline-block;\n font-size: inherit;\n border: none;\n height: unset;\n padding: 0;\n\n &:hover:not(:disabled, .Button--inactive) {\n text-decoration: underline;\n }\n\n &:focus-visible,\n &:focus {\n outline-offset: 2px;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--control-fgColor-disabled);\n background-color: transparent;\n border-color: transparent;\n fill: var(--control-fgColor-disabled);\n }\n}\n\n/* danger */\n.Button--danger {\n color: var(--button-danger-fgColor-rest);\n fill: var(--button-danger-iconColor-rest);\n background-color: var(--button-danger-bgColor-rest);\n border-color: var(--button-danger-borderColor-rest);\n box-shadow: var(--button-default-shadow-resting), var(--button-default-shadow-inset);\n\n &:hover:not(:disabled, .Button--inactive) {\n color: var(--button-danger-fgColor-hover);\n fill: var(--button-danger-fgColor-hover);\n background-color: var(--button-danger-bgColor-hover);\n border-color: var(--button-danger-borderColor-hover);\n box-shadow: var(--shadow-resting-small);\n\n & .Counter {\n color: var(--buttonCounter-danger-fgColor-hover);\n background-color: var(--buttonCounter-danger-bgColor-hover);\n }\n }\n\n &:active:not(:disabled),\n &[aria-pressed='true'] {\n color: var(--button-danger-fgColor-active);\n fill: var(--button-danger-fgColor-active);\n background-color: var(--button-danger-bgColor-active);\n border-color: var(--button-danger-borderColor-active);\n box-shadow: var(--button-danger-shadow-selected);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--button-danger-fgColor-disabled);\n fill: var(--button-danger-fgColor-disabled);\n background-color: var(--button-danger-bgColor-disabled);\n border-color: var(--button-default-borderColor-disabled);\n\n & .Counter {\n color: var(--buttonCounter-danger-fgColor-disabled);\n background-color: var(--buttonCounter-danger-bgColor-disabled);\n }\n }\n\n & .Counter {\n color: var(--buttonCounter-danger-fgColor-rest);\n background-color: var(--buttonCounter-danger-bgColor-rest);\n }\n}\n\n.Button--iconOnly {\n display: inline-grid;\n place-content: center;\n padding: unset;\n width: var(--control-medium-size);\n\n &.Button--small {\n width: var(--control-small-size);\n }\n\n &.Button--large {\n width: var(--control-large-size);\n }\n}\n\n/* `disabled` takes precedence over `inactive` */\n.Button--inactive:not([aria-disabled='true'], :disabled) {\n background-color: var(--button-inactive-bgColor);\n border: 0;\n color: var(--button-inactive-fgColor);\n cursor: default;\n}\n",null,"/* outline with fg box-shadow for buttons */\n@define-mixin focusOutlineOnEmphasis $outlineOffset: -2px, $outlineColor: var(--focus-outlineColor) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: inset 0 0 0 3px var(--fgColor-onEmphasis);\n}\n"]}
1
+ {"version":3,"sources":["button.pcss","<no source>","../../../../lib/postcss_mixins/focusOutlineOnEmphasis.pcss"],"names":[],"mappings":"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","file":"button.css","sourcesContent":["/* CSS for Button */\n\n/* temporary, pre primitives release */\n:root {\n --duration-fast: 80ms;\n --easing-easeInOut: cubic-bezier(0.65, 0, 0.35, 1);\n}\n\n/* base button */\n.Button {\n position: relative;\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-medium);\n cursor: pointer;\n user-select: none;\n background-color: transparent;\n border: var(--borderWidth-thin) solid;\n border-color: transparent;\n border-radius: var(--borderRadius-medium);\n color: var(--button-default-fgColor-rest);\n transition: var(--duration-fast) var(--easing-easeInOut);\n transition-property: color, fill, background-color, border-color;\n text-align: center;\n height: var(--control-medium-size);\n padding: 0 var(--control-medium-paddingInline-normal);\n display: inline-flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: var(--base-size-4);\n min-width: max-content;\n\n /* mobile friendly sizing */\n @media (pointer: coarse) {\n &::before {\n @mixin minTouchTarget 48px, 48px;\n }\n }\n\n /* base states */\n\n &:hover {\n transition-duration: var(--duration-fast);\n }\n\n &:active {\n transition: none;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n cursor: not-allowed;\n box-shadow: none;\n }\n\n &.Button--iconOnly {\n color: var(--fgColor-muted);\n }\n}\n\na.Button,\nsummary.Button {\n &:hover {\n text-decoration: none;\n }\n}\n\n/* wrap grid content to allow trailingAction to lock-right */\n.Button-content {\n flex: 1 0 auto;\n display: grid;\n grid-template-areas: 'leadingVisual text trailingVisual';\n grid-template-columns: min-content minmax(0, auto) min-content;\n align-items: center;\n place-content: center;\n\n /* padding-bottom: 1px; optical alignment for firefox */\n\n & > :not(:last-child) {\n margin-right: var(--control-medium-gap);\n }\n}\n\n/* center child elements for fullWidth */\n.Button-content--alignStart {\n justify-content: start;\n}\n\n/* button child elements */\n\n/* align svg */\n.Button-visual {\n display: flex;\n pointer-events: none; /* allow click handler to work, avoiding visuals */\n\n & .Counter {\n color: inherit;\n background-color: var(--buttonCounter-default-bgColor-rest);\n }\n}\n\n.Button-label {\n grid-area: text;\n white-space: nowrap;\n line-height: var(--text-body-lineHeight-medium);\n}\n\n.Button-leadingVisual {\n grid-area: leadingVisual;\n}\n\n.Button-leadingVisual svg {\n fill: currentcolor;\n}\n\n.Button-trailingVisual {\n grid-area: trailingVisual;\n}\n\n.Button-trailingAction {\n margin-right: calc(var(--base-size-4) * -1);\n}\n\n/* sizes */\n\n.Button--small {\n font-size: var(--text-body-size-small);\n height: var(--control-small-size);\n padding: 0 var(--control-small-paddingInline-condensed);\n gap: var(--control-small-gap);\n\n & .Button-label {\n line-height: var(--text-body-lineHeight-small);\n }\n\n & .Button-content {\n & > :not(:last-child) {\n margin-right: var(--control-small-gap);\n }\n }\n}\n\n.Button--large {\n height: var(--control-large-size);\n padding: 0 var(--control-large-paddingInline-spacious);\n gap: var(--control-large-gap);\n\n & .Button-label {\n line-height: var(--text-body-lineHeight-large);\n }\n\n & .Button-content {\n & > :not(:last-child) {\n margin-right: var(--control-large-gap);\n }\n }\n}\n\n.Button--fullWidth {\n width: 100%;\n}\n\n/* variants */\n\n/* primary */\n.Button--primary {\n color: var(--button-primary-fgColor-rest);\n fill: var(--button-primary-iconColor-rest);\n background-color: var(--button-primary-bgColor-rest);\n border-color: var(--button-primary-borderColor-rest);\n box-shadow: var(--shadow-resting-small, var(--color-btn-primary-shadow));\n\n &:hover:not(:disabled, .Button--inactive) {\n background-color: var(--button-primary-bgColor-hover);\n border-color: var(--button-primary-borderColor-hover);\n }\n\n /* fallback :focus state */\n &:focus {\n @mixin focusOutlineOnEmphasis;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n outline: solid 1px transparent;\n box-shadow: none;\n }\n }\n\n /* default focus state */\n &:focus-visible {\n @mixin focusOutlineOnEmphasis;\n }\n\n &:active:not(:disabled),\n &[aria-pressed='true'] {\n background-color: var(--button-primary-bgColor-active);\n box-shadow: var(--button-primary-shadow-selected);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--button-primary-fgColor-disabled);\n background-color: var(--button-primary-bgColor-disabled);\n border-color: var(--button-primary-borderColor-disabled);\n fill: var(--button-primary-fgColor-disabled);\n }\n\n & .Counter {\n color: inherit;\n background-color: var(--buttonCounter-primary-bgColor-rest);\n }\n}\n\n/* default (secondary) */\n.Button--secondary {\n color: var(--button-default-fgColor-rest);\n fill: var(--fgColor-muted); /* help this */\n background-color: var(--button-default-bgColor-rest);\n border-color: var(--button-default-borderColor-rest);\n box-shadow: var(--button-default-shadow-resting), var(--button-default-shadow-inset);\n\n &:hover:not(:disabled, .Button--inactive) {\n background-color: var(--button-default-bgColor-hover);\n border-color: var(--button-default-borderColor-hover);\n }\n\n &:active:not(:disabled) {\n background-color: var(--button-default-bgColor-active);\n border-color: var(--button-default-borderColor-active);\n }\n\n &[aria-pressed='true'] {\n background-color: var(--button-default-bgColor-selected);\n box-shadow: var(--shadow-inset);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--control-fgColor-disabled);\n background-color: var(--button-default-bgColor-disabled);\n border-color: var(--button-default-borderColor-disabled);\n fill: var(--control-fgColor-disabled);\n }\n}\n\n.Button--invisible {\n color: var(--button-default-fgColor-rest);\n\n &.Button--iconOnly {\n color: var(--button-invisible-iconColor-rest, var(--color-fg-muted));\n }\n\n &:hover:not(:disabled, .Button--inactive) {\n background-color: var(--control-transparent-bgColor-hover, var(--color-action-list-item-default-hover-bg));\n }\n\n &[aria-pressed='true'],\n &:active:not(:disabled) {\n background-color: var(--button-invisible-bgColor-active);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--button-invisible-fgColor-disabled);\n background-color: var(--button-invisible-bgColor-disabled);\n border-color: var(--button-invisible-borderColor-disabled);\n fill: var(--button-invisible-fgColor-disabled);\n }\n\n /* if button has no visuals, use link blue for text */\n &.Button--invisible-noVisuals .Button-label {\n color: var(--button-invisible-fgColor-rest);\n }\n\n & .Button-visual {\n color: var(--button-invisible-iconColor-rest, var(--color-fg-muted));\n\n & .Counter {\n color: var(--fgColor-default);\n }\n }\n}\n\n.Button--link {\n color: var(--fgColor-link);\n fill: var(--fgColor-link);\n display: inline-block;\n font-size: inherit;\n border: none;\n height: unset;\n padding: 0;\n\n &:hover:not(:disabled, .Button--inactive) {\n text-decoration: underline;\n }\n\n &:focus-visible,\n &:focus {\n outline-offset: 2px;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--control-fgColor-disabled);\n background-color: transparent;\n border-color: transparent;\n fill: var(--control-fgColor-disabled);\n }\n}\n\n/* danger */\n.Button--danger {\n color: var(--button-danger-fgColor-rest);\n fill: var(--button-danger-iconColor-rest);\n background-color: var(--button-danger-bgColor-rest);\n border-color: var(--button-danger-borderColor-rest);\n box-shadow: var(--button-default-shadow-resting), var(--button-default-shadow-inset);\n\n &:hover:not(:disabled, .Button--inactive) {\n color: var(--button-danger-fgColor-hover);\n fill: var(--button-danger-fgColor-hover);\n background-color: var(--button-danger-bgColor-hover);\n border-color: var(--button-danger-borderColor-hover);\n box-shadow: var(--shadow-resting-small);\n\n & .Counter {\n color: var(--buttonCounter-danger-fgColor-hover);\n background-color: var(--buttonCounter-danger-bgColor-hover);\n }\n }\n\n &:active:not(:disabled),\n &[aria-pressed='true'] {\n color: var(--button-danger-fgColor-active);\n fill: var(--button-danger-fgColor-active);\n background-color: var(--button-danger-bgColor-active);\n border-color: var(--button-danger-borderColor-active);\n box-shadow: var(--button-danger-shadow-selected);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--button-danger-fgColor-disabled);\n fill: var(--button-danger-fgColor-disabled);\n background-color: var(--button-danger-bgColor-disabled);\n border-color: var(--button-default-borderColor-disabled);\n\n & .Counter {\n color: var(--buttonCounter-danger-fgColor-disabled);\n background-color: var(--buttonCounter-danger-bgColor-disabled);\n }\n }\n\n & .Counter {\n color: var(--buttonCounter-danger-fgColor-rest);\n background-color: var(--buttonCounter-danger-bgColor-rest);\n }\n}\n\n.Button--iconOnly {\n display: inline-grid;\n place-content: center;\n padding: unset;\n width: var(--control-medium-size);\n\n &.Button--small {\n width: var(--control-small-size);\n }\n\n &.Button--large {\n width: var(--control-large-size);\n }\n}\n\n/* `disabled` takes precedence over `inactive` */\n.Button--inactive:not([aria-disabled='true'], :disabled) {\n background-color: var(--button-inactive-bgColor);\n border: 0;\n color: var(--button-inactive-fgColor);\n cursor: default;\n}\n",null,"/* outline with fg box-shadow for buttons */\n@define-mixin focusOutlineOnEmphasis $outlineOffset: -2px, $outlineColor: var(--focus-outlineColor) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: inset 0 0 0 3px var(--fgColor-onEmphasis);\n}\n"]}
@@ -52,6 +52,10 @@
52
52
  cursor: not-allowed;
53
53
  box-shadow: none;
54
54
  }
55
+
56
+ &.Button--iconOnly {
57
+ color: var(--fgColor-muted);
58
+ }
55
59
  }
56
60
 
57
61
  a.Button,
@@ -1,6 +1,9 @@
1
1
  export declare class NavListElement extends HTMLElement {
2
2
  #private;
3
3
  items: HTMLElement[];
4
+ topLevelList: HTMLElement;
5
+ connectedCallback(): void;
6
+ disconnectedCallback(): void;
4
7
  selectItemById(itemId: string | null): boolean;
5
8
  selectItemByHref(href: string | null): boolean;
6
9
  selectItemByCurrentLocation(): boolean;
@@ -1,7 +1,7 @@
1
1
  <%= render(Primer::BaseComponent.new(tag: :nav, **@system_arguments)) do %>
2
2
  <%= heading %>
3
3
  <nav-list>
4
- <%= render(Primer::ConditionalWrapper.new(condition: render_outer_list?, tag: :ul, classes: "ActionListWrap")) do %>
4
+ <%= render(Primer::ConditionalWrapper.new(condition: render_outer_list?, tag: :ul, classes: "ActionListWrap", data: { target: "nav-list.topLevelList" })) do %>
5
5
  <% items.each_with_index do |item, index| %>
6
6
  <% if index > 0 && render_divider_between?(item, items[index - 1]) %>
7
7
  <%= render(Primer::Alpha::ActionList::Divider.new) %>