@instacks/peak 1.5.0 → 1.6.0

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.
package/README.md CHANGED
@@ -275,6 +275,9 @@ All of these work without JavaScript.
275
275
  <!-- A toast in the corner; showing it after an action needs showPopover() -->
276
276
  <div class="peak-toast success" popover="manual" role="status" id="saved">Saved.</div>
277
277
 
278
+ <!-- An icon: any single-color SVG as a mask, drawn in the text color (.sm, .lg, .xl) -->
279
+ <span class="peak-icon" style="--peak-icon: url(/icons/mail.svg)" aria-hidden="true"></span>
280
+
278
281
  <!-- Stats, steps, avatars, pagination, sidebar navigation -->
279
282
  <dl class="peak-stats"><div><dt>Downloads</dt><dd>1,284</dd></div></dl>
280
283
  <ol class="peak-steps"><li>Download</li><li aria-current="step">Install</li><li>Activate</li></ol>
package/dist/peak.css CHANGED
@@ -4156,6 +4156,10 @@
4156
4156
  }
4157
4157
  }
4158
4158
 
4159
+ [data-peak-anchor] > [popovertarget] {
4160
+ margin-block-end: 0;
4161
+ }
4162
+
4159
4163
  :is([popover="hint"], [role="tooltip"][popover]) {
4160
4164
  border-radius: var(--pico-border-radius);
4161
4165
  background-color: var(--pico-tooltip-background-color);
@@ -5148,6 +5152,45 @@
5148
5152
  background-clip: text;
5149
5153
  }
5150
5154
 
5155
+ .peak-icon {
5156
+ inline-size: var(--peak-icon-size, 1.25em);
5157
+ block-size: var(--peak-icon-size, 1.25em);
5158
+ vertical-align: middle;
5159
+ mask: var(--peak-icon) center / contain no-repeat;
5160
+ forced-color-adjust: none;
5161
+ -webkit-print-color-adjust: exact;
5162
+ print-color-adjust: exact;
5163
+ background-color: currentColor;
5164
+ flex: none;
5165
+ display: inline-block;
5166
+ }
5167
+
5168
+ .peak-icon.sm {
5169
+ --peak-icon-size: 1em;
5170
+ }
5171
+
5172
+ .peak-icon.lg {
5173
+ --peak-icon-size: 1.75em;
5174
+ }
5175
+
5176
+ .peak-icon.xl {
5177
+ --peak-icon-size: 2.5em;
5178
+ }
5179
+
5180
+ :where(a:not([role="button"], aside li a, .dropdown li a, [popover] li a):has( > .peak-icon)) {
5181
+ align-items: baseline;
5182
+ gap: .25em;
5183
+ display: inline-flex;
5184
+ }
5185
+
5186
+ :where(a:not([role="button"], aside li a, .dropdown li a, [popover] li a)) > .peak-icon {
5187
+ line-height: var(--peak-icon-size, 1.25em);
5188
+ }
5189
+
5190
+ :where(a:not([role="button"], aside li a, .dropdown li a, [popover] li a)) > .peak-icon:before {
5191
+ content: "​" / "";
5192
+ }
5193
+
5151
5194
  .site-nav .site-menu, .site-nav .site-menu-popover[popover] {
5152
5195
  display: contents;
5153
5196
  }