@apliteni/apliteni-ui 0.141.0 → 0.142.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.
@@ -0,0 +1,16 @@
1
+ // The section a selection belongs to: the closest ancestor-or-preceding h2|h3 that
2
+ // carries an id, else the first such heading in `root`. The vanilla feedback widget
3
+ // and the React <Feedback> both ask it.
4
+ export function nearestSection(node, root) {
5
+ let el = node && node.nodeType === 3 ? node.parentNode : node;
6
+ while (el && el !== root) {
7
+ let p = el;
8
+ while (p) {
9
+ if (p.tagName && /^H[23]$/.test(p.tagName) && p.id) return p;
10
+ p = p.previousElementSibling;
11
+ }
12
+ el = el.parentElement;
13
+ }
14
+ return root ? root.querySelector('h2[id],h3[id]') : null;
15
+ }
16
+
@@ -0,0 +1,5 @@
1
+ import { icon, sun, moon } from '../assets/icons.js';
2
+
3
+ // The glyph for a saved theme choice, including automatic mode. The vanilla toggle
4
+ // and the React <ThemeToggle> both draw it.
5
+ export const themeIcon = (t) => t === 'auto' ? icon('monitor') : t === 'light' ? sun : moon;
@@ -214,7 +214,7 @@
214
214
  src/styles/dropdown.css:323 `.ui-dropdown__item:hover`.
215
215
  why: docs/foundations.md#elevation */
216
216
  .vopt:hover { outline: 1px solid var(--control-edge); outline-offset: -1px; background: var(--surface); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */ }
217
- /* The row is a keyboard stop: src/components/dropdown.js:1663
217
+ /* The row is a keyboard stop: src/components/dropdown.js:1005
218
218
  `items[next < 0 ? 0 : next]?.focus()` moves focus onto a `[data-dd-item]` with
219
219
  the arrow keys, and this is one. It takes the ring on its own 10px radius, the
220
220
  same way `.amenu a` above does. #482 */