@birdycom/omniaui 0.16.1 → 0.17.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.
Files changed (85) hide show
  1. package/bin/lib/copy-js.mjs +8 -0
  2. package/bin/lib/webicons-builtin.json +1 -0
  3. package/bin/lib/webicons.mjs +4 -0
  4. package/dist/back-link.d.ts +6 -0
  5. package/dist/back-link.js +54 -0
  6. package/dist/barcode.d.ts +5 -1
  7. package/dist/barcode.js +29 -8
  8. package/dist/calendar.d.ts +17 -0
  9. package/dist/calendar.js +190 -0
  10. package/dist/code-block.css +3 -0
  11. package/dist/combobox.d.ts +27 -4
  12. package/dist/combobox.js +231 -33
  13. package/dist/components-extra.css +33 -2
  14. package/dist/components.css +2112 -166
  15. package/dist/components.min.css +1 -1
  16. package/dist/countdown.d.ts +11 -0
  17. package/dist/countdown.js +76 -0
  18. package/dist/data-table.d.ts +28 -0
  19. package/dist/data-table.js +186 -18
  20. package/dist/docs-ui.css +11 -1
  21. package/dist/glass-lens.d.ts +41 -0
  22. package/dist/glass-lens.js +307 -0
  23. package/dist/input-mask.d.ts +31 -0
  24. package/dist/input-mask.js +228 -0
  25. package/dist/nav-overflow.d.ts +11 -0
  26. package/dist/nav-overflow.js +151 -0
  27. package/dist/oc-theme.css +1 -1
  28. package/dist/parts/app-0160-apps.css +6 -0
  29. package/dist/parts/app-compound-overlays.css +68 -0
  30. package/dist/parts/app-countdown.css +66 -0
  31. package/dist/parts/app-data-table-footer.css +6 -3
  32. package/dist/parts/app-data-table-server.css +47 -0
  33. package/dist/parts/app-data-table.css +27 -1
  34. package/dist/parts/app-header-settings.css +9 -0
  35. package/dist/parts/app-mode-badge.css +12 -0
  36. package/dist/parts/app-module-color.css +152 -0
  37. package/dist/parts/app-name-card.css +5 -0
  38. package/dist/parts/app-page-header.css +1 -1
  39. package/dist/parts/app-recovery-codes-extras.css +13 -0
  40. package/dist/parts/app-sidebar-meta.css +14 -3
  41. package/dist/parts/app-sidebar-provider.css +98 -0
  42. package/dist/parts/app-table-actions.css +16 -0
  43. package/dist/parts/app-top-progress.css +3 -0
  44. package/dist/parts/app-tree.css +6 -0
  45. package/dist/parts/app-type-picker.css +272 -0
  46. package/dist/parts/data-dl-numbered.css +17 -0
  47. package/dist/parts/data-graph.css +12 -4
  48. package/dist/parts/forms-combobox-catalog.css +142 -0
  49. package/dist/parts/forms-combobox-icons.css +40 -2
  50. package/dist/parts/forms-copy-field-extras.css +47 -0
  51. package/dist/parts/forms-field-extras.css +55 -0
  52. package/dist/parts/forms-form-section.css +39 -1
  53. package/dist/parts/forms-ledger.css +98 -0
  54. package/dist/parts/media-aspect-flush.css +6 -0
  55. package/dist/parts/media-barcode.css +25 -4
  56. package/dist/parts/media-doc-viewer.css +2 -0
  57. package/dist/parts/media-entity-card.css +5 -0
  58. package/dist/parts/media-glass-liquid.css +10 -5
  59. package/dist/parts/media-glass-options.css +37 -5
  60. package/dist/parts/media-glass.css +85 -35
  61. package/dist/parts/media-scrim.css +51 -0
  62. package/dist/parts/nav-topbar-variants.css +12 -4
  63. package/dist/parts/site-header-variants.css +40 -4
  64. package/dist/parts/site-hero-media.css +88 -0
  65. package/dist/parts/site-price-card.css +3 -1
  66. package/dist/parts/site-split-reverse.css +11 -0
  67. package/dist/parts/site-tint-card.css +5 -4
  68. package/dist/parts/utility-hover.css +6 -3
  69. package/dist/showcase.css +73 -31
  70. package/dist/sidebar.d.ts +22 -0
  71. package/dist/sidebar.js +161 -0
  72. package/dist/tabs.d.ts +9 -0
  73. package/dist/tabs.js +104 -0
  74. package/dist/theme.js +20 -4
  75. package/manifest.json +24 -0
  76. package/package.json +10 -2
  77. package/snippets/accordion-accent.html +1 -1
  78. package/snippets/copy-field.html +44 -6
  79. package/snippets/countdown.html +12 -0
  80. package/snippets/dropdown-menu.html +2 -0
  81. package/snippets/glass.html +3 -3
  82. package/snippets/hero-media.html +20 -0
  83. package/snippets/page-header.html +1 -1
  84. package/snippets/recovery-codes.html +55 -6
  85. package/snippets/scrim.html +19 -0
@@ -1,19 +1,57 @@
1
1
  <!-- OmniaUI component: copy-field - Read-only monospace value with a copy button. Needs @birdycom/omniaui CSS.
2
2
  Class API (modifiers are extra classes / attributes on the same element):
3
3
  .oc-copy-field: Wrapper
4
- .oc-copy-field-value: Read-only <input readonly> (or <output>)
5
- .oc-copy-field-button: Copy button; add .is-copied for 2s feedback
4
+ .oc-copy-field-value: Read-only <input readonly> (or <output> with --wrap)
5
+ .oc-copy-field-button: Copy button; add .is-copied for 2s feedback; data-copy="..." copies that instead of the value;
6
+ data-copied-label (0.17.0): the feedback ("Copied") in .oc-copy-field-button-label and .oc-copy-field-status
7
+ .oc-copy-field-icon-copy / -copied (0.17.0): mdi:content-copy and mdi:check on the button; they swap on .is-copied
8
+ .oc-copy-field-status (0.17.0): visually hidden role="status" live region that announces the feedback
9
+ .oc-copy-field-toggle (0.17.0): show/hide for a secret (input type="password", aria-pressed, aria-label);
10
+ .oc-copy-field-icon-show / -hide (mdi:eye / mdi:eye-off) swap on aria-pressed
11
+ .oc-copy-field--wrap (0.17.0): long values break over lines (use <output class="oc-copy-field-value">)
12
+ .oc-copy-field--display (+ --lg) (0.17.0): large centred code; .oc-copy-field-caption: a line under it
6
13
  -->
7
14
  <div class="oc-copy-field">
8
- <input class="oc-copy-field-value" type="text" readonly value="JBSWY3DPEHPK3PXP" aria-label="Setup key">
9
- <button class="oc-copy-field-button" type="button">Copy</button>
15
+ <input class="oc-copy-field-value" id="oc-copy-key" type="password" readonly value="JBSWY3DPEHPK3PXP" aria-label="Setup key" autocomplete="off">
16
+ <button class="oc-copy-field-toggle" type="button" aria-pressed="false" aria-controls="oc-copy-key" aria-label="Show value">
17
+ <svg class="oc-copy-field-icon-show" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M12 9a3 3 0 0 0-3 3a3 3 0 0 0 3 3a3 3 0 0 0 3-3a3 3 0 0 0-3-3m0 8a5 5 0 0 1-5-5a5 5 0 0 1 5-5a5 5 0 0 1 5 5a5 5 0 0 1-5 5m0-12.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5"/></svg>
18
+ <svg class="oc-copy-field-icon-hide" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M11.83 9L15 12.16V12a3 3 0 0 0-3-3zm-4.3.8l1.55 1.55c-.05.21-.08.42-.08.65a3 3 0 0 0 3 3c.22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53a5 5 0 0 1-5-5c0-.79.2-1.53.53-2.2M2 4.27l2.28 2.28l.45.45C3.08 8.3 1.78 10 1 12c1.73 4.39 6 7.5 11 7.5c1.55 0 3.03-.3 4.38-.84l.43.42L19.73 22L21 20.73L3.27 3M12 7a5 5 0 0 1 5 5c0 .64-.13 1.26-.36 1.82l2.93 2.93c1.5-1.25 2.7-2.89 3.43-4.75c-1.73-4.39-6-7.5-11-7.5c-1.4 0-2.74.25-4 .7l2.17 2.15C10.74 7.13 11.35 7 12 7"/></svg>
19
+ </button>
20
+ <button class="oc-copy-field-button" type="button" data-copied-label="Copied">
21
+ <svg class="oc-copy-field-icon-copy" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12z"/></svg>
22
+ <svg class="oc-copy-field-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"/></svg>
23
+ <span class="oc-copy-field-button-label">Copy</span>
24
+ </button>
25
+ <span class="oc-copy-field-status oc-visually-hidden" role="status" aria-live="polite"></span>
10
26
  </div>
11
27
  <script>
12
28
  document.addEventListener('click', async (e) => {
29
+ const toggle = e.target.closest('.oc-copy-field-toggle');
30
+ if (toggle) {
31
+ const show = toggle.getAttribute('aria-pressed') !== 'true';
32
+ toggle.setAttribute('aria-pressed', String(show));
33
+ const input = toggle.parentElement.querySelector('input.oc-copy-field-value');
34
+ if (input) input.type = show ? 'text' : 'password';
35
+ return;
36
+ }
13
37
  const btn = e.target.closest('.oc-copy-field-button');
14
38
  if (!btn) return;
15
- await navigator.clipboard.writeText(btn.parentElement.querySelector('.oc-copy-field-value').value);
39
+ const field = btn.parentElement;
40
+ const value = field.querySelector('.oc-copy-field-value');
41
+ // data-copy: the raw code when the field shows it in groups ("K7QM 2XPA" -> "K7QM2XPA")
42
+ try { await navigator.clipboard.writeText(btn.dataset.copy ?? value.value); } catch { return; }
43
+ // data-copied-label: the feedback on the button and in the live region (.oc-copy-field-status)
44
+ const label = btn.querySelector('.oc-copy-field-button-label');
45
+ const status = field.querySelector('.oc-copy-field-status');
46
+ const done = btn.dataset.copiedLabel || 'Copied';
47
+ if (label) { label.dataset.label ??= label.textContent; label.textContent = done; }
48
+ if (status) status.textContent = done;
16
49
  btn.classList.add('is-copied');
17
- setTimeout(() => btn.classList.remove('is-copied'), 2000);
50
+ clearTimeout(btn.ocCopyTimer);
51
+ btn.ocCopyTimer = setTimeout(() => {
52
+ btn.classList.remove('is-copied');
53
+ if (label) label.textContent = label.dataset.label;
54
+ if (status) status.textContent = '';
55
+ }, 2000);
18
56
  });
19
57
  </script>
@@ -0,0 +1,12 @@
1
+ <!-- OmniaUI component: countdown - Time left for a task, a round or a reservation: inline, a pill or large digits, with an optional shrinking bar; orange when little time is left. Needs @birdycom/omniaui CSS.
2
+ Class API (modifiers are extra classes / attributes on the same element):
3
+ .oc-countdown[role=timer] > .oc-countdown-label + .oc-countdown-time. Modifiers: --pill | --display (large digits) | --bar.
4
+ data-state="low" (orange) | "done" (red); --oc-countdown-left (1 = full, 0 = empty) for the bar.
5
+ Ticking: oc-countdown.js (npx omniaui copy-js countdown) on [data-oc-countdown] with data-oc-countdown-end (ISO or
6
+ ms) or data-oc-countdown-seconds, data-oc-countdown-total, data-oc-countdown-low. Event: oc-countdown-end.
7
+ -->
8
+ <div class="oc-countdown oc-countdown--pill" role="timer" aria-label="Time left" data-oc-countdown data-oc-countdown-seconds="90">
9
+ <span class="oc-countdown-label">Time left</span>
10
+ <b class="oc-countdown-time">1:30</b>
11
+ </div>
12
+ <script type="module" src="/js/oc-countdown.js"></script>
@@ -4,6 +4,8 @@
4
4
  .oc-dropdown-item[role="menuitemcheckbox"|"menuitemradio"][aria-checked]: check mark / dot indicator
5
5
  .oc-dropdown-shortcut: right aligned key hint
6
6
  .oc-dropdown-icon (0.16.0): icon in front of the label; items without one line up with the others
7
+ .oc-dropdown-icon--primary|--success|--warning|--destructive|--muted (0.17.0): the icon in a soft tinted square
8
+ .oc-dropdown-text > span + .oc-dropdown-desc (0.17.0): label with a muted description under it
7
9
  .oc-dropdown-item--destructive | --inset | [aria-disabled=true]
8
10
  -->
9
11
  <button class="oc-btn oc-btn--outline" type="button" popovertarget="oc-dd-extras">Open menu</button>
@@ -1,11 +1,11 @@
1
1
  <!-- OmniaUI component: glass - See-through glass sheet and panels with a light top edge, for widgets and panels over a photo, a gradient or the desktop. Needs @birdycom/omniaui CSS.
2
2
  File: packages/ui/snippets/glass.html | Map: div.oc-glass (sheet) -> content -> div.oc-glass-panel (layer) / .oc-card (becomes a glass panel)
3
3
  Class API (modifiers are extra classes on the same element):
4
- .oc-glass: the outer sheet (see-through, blurred background, light top edge, soft shadow); .oc-card inside turns into a glass panel
4
+ .oc-glass: the outer sheet (light tint over a lightly blurred backdrop, light inner edge, specular rim, fine grain, soft shadow); .oc-card inside turns into a glass panel
5
5
  .oc-glass-panel: a lighter layer inside a sheet; .oc-glass-divider: hairline
6
6
  Modifiers: --strong (more opaque), --flat (desktop window where the OS draws the blur: no own blur, no shadow)
7
- Tokens: --oc-glass-sheet, -panel, -panel-strong, -edge, -edge-hi, -hairline, -shadow, -panel-shadow, -blur, -radius, -panel-radius
8
- Solid surfaces with prefers-reduced-transparency: reduce.
7
+ Tokens: --oc-glass-sheet, -sheen, -panel, -panel-strong, -edge, -edge-hi, -edge-low, -hairline, -shadow, -panel-shadow, -blur, -radius, -panel-radius
8
+ Solid surfaces with prefers-reduced-transparency: reduce, nearly solid without backdrop-filter.
9
9
  Needs something behind it to show through: a photo, a gradient, or a transparent window (Electron, Tauri).
10
10
  -->
11
11
  <div class="oc-glass p-1 grid gap-0.7" style="max-inline-size: 24rem">
@@ -0,0 +1,20 @@
1
+ <!-- OmniaUI component: hero-media - Full-width hero with a video or photo behind the text, a dark scrim on the text side and a poster under reduced motion. Needs @birdycom/omniaui CSS.
2
+ Class API (modifiers are extra classes on the same element):
3
+ .oc-hero-media: the section (full width, dark color scheme, at least --oc-hero-media-min high)
4
+ .oc-hero-media__media: the video or img (object-fit: cover, position --oc-hero-media-position)
5
+ .oc-hero-media__content: the text in the page container, each child at most --oc-hero-media-measure wide
6
+ --scrim-start / --scrim-end: dark layer on the text side / other side; --scrim: over the whole picture
7
+ --center / --end: text centered / at the end side
8
+ -->
9
+ <section class="oc-hero-media oc-hero-media--scrim-start">
10
+ <img class="oc-hero-media__media" src="/img/hero.webp" alt="">
11
+ <div class="oc-hero-media__content">
12
+ <p class="oc-eyebrow">Company 1</p>
13
+ <h2 class="oc-display oc-display--md">Software that moves your business forward</h2>
14
+ <p class="oc-lead">Web applications, desktop tools and support, built around the way your team works.</p>
15
+ <div class="oc-actions">
16
+ <a class="oc-btn" href="#work">See our work</a>
17
+ <a class="oc-btn oc-btn--outline" href="#contact">Get in touch</a>
18
+ </div>
19
+ </div>
20
+ </section>
@@ -13,7 +13,7 @@
13
13
  <div class="oc-page-header-main">
14
14
  <div class="oc-page-header-text">
15
15
  <h1 class="oc-page-header-title">Kitchen renovation <span class="oc-badge oc-badge--success">Active</span></h1>
16
- <p class="oc-page-header-subtitle">Main street 12, Ghent - started 2 September 2026.</p>
16
+ <p class="oc-page-header-subtitle">Street 1, City 1 - started 2 September 2026.</p>
17
17
  <div class="oc-page-header-meta"><span>Owner: Contact 1</span><span>Updated 2 hours ago</span></div>
18
18
  </div>
19
19
  <div class="oc-page-header-actions">
@@ -1,20 +1,69 @@
1
- <!-- OmniaUI component: recovery-codes - Warning panel with a code grid plus copy and download actions. Needs @birdycom/omniaui CSS.
1
+ <!-- OmniaUI component: recovery-codes - Warning panel with a code grid plus copy, download and print actions. Needs @birdycom/omniaui CSS.
2
2
  Class API (modifiers are extra classes / attributes on the same element):
3
3
  .oc-recovery-codes: Panel (warning tint)
4
- .oc-recovery-codes-title / -warning: Heading and explanation
4
+ .oc-recovery-codes-title / -warning: Heading and explanation (the warning can start with an icon: mdi:alert-outline)
5
5
  .oc-recovery-codes-list: Two-column monospace grid (selectable with one click)
6
- .oc-recovery-codes-actions: Button row
6
+ .oc-recovery-codes-actions: Button row; data-oc-recovery="copy|download|print" wires a button to the script below
7
+ data-copied-label (0.17.0): feedback on the copy button (.oc-recovery-codes-label) and in .oc-recovery-codes-status
8
+ .oc-recovery-codes-icon-copy / -copied (0.17.0): mdi:content-copy and mdi:check; they swap on .is-copied
9
+ .oc-recovery-codes-status (0.17.0): visually hidden role="status" live region
7
10
  -->
8
11
  <div class="oc-recovery-codes">
9
12
  <h3 class="oc-recovery-codes-title">Recovery codes</h3>
10
- <p class="oc-recovery-codes-warning">Store these codes somewhere safe. Each code works once.</p>
13
+ <p class="oc-recovery-codes-warning"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M12 2L1 21h22M12 6l7.53 13H4.47M11 10v4h2v-4m-2 6v2h2v-2"/></svg><span>Store these codes somewhere safe. Each code works once.</span></p>
11
14
  <ul class="oc-recovery-codes-list">
12
15
  <li>4F8K-92QA</li><li>M3ZP-71LD</li>
13
16
  <li>7TQX-0BNE</li><li>C8WV-5YHR</li>
14
17
  <li>2JDA-KE63</li><li>R9UG-X4MS</li>
15
18
  </ul>
16
19
  <div class="oc-recovery-codes-actions">
17
- <button class="oc-btn oc-btn--outline oc-btn--sm" type="button">Copy all</button>
18
- <button class="oc-btn oc-btn--outline oc-btn--sm" type="button">Download .txt</button>
20
+ <button class="oc-btn oc-btn--outline oc-btn--sm" type="button" data-oc-recovery="copy" data-copied-label="Copied"><svg class="oc-recovery-codes-icon-copy" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12z"/></svg><svg class="oc-recovery-codes-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"/></svg><span class="oc-recovery-codes-label">Copy all</span></button>
21
+ <button class="oc-btn oc-btn--outline oc-btn--sm" type="button" data-oc-recovery="download"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M5 20h14v-2H5m14-9h-4V3H9v6H5l7 7z"/></svg><span>Download .txt</span></button>
22
+ <button class="oc-btn oc-btn--outline oc-btn--sm" type="button" data-oc-recovery="print"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M18 3H6v4h12m1 5a1 1 0 0 1-1-1a1 1 0 0 1 1-1a1 1 0 0 1 1 1a1 1 0 0 1-1 1m-3 7H8v-5h8m3-6H5a3 3 0 0 0-3 3v6h4v4h12v-4h4v-6a3 3 0 0 0-3-3"/></svg><span>Print</span></button>
19
23
  </div>
24
+ <span class="oc-recovery-codes-status oc-visually-hidden" role="status" aria-live="polite"></span>
20
25
  </div>
26
+ <script>
27
+ document.addEventListener('click', async (e) => {
28
+ const btn = e.target.closest('[data-oc-recovery]');
29
+ if (!btn) return;
30
+ const panel = btn.closest('.oc-recovery-codes');
31
+ const codes = Array.from(panel.querySelectorAll('.oc-recovery-codes-list li')).map((li) => li.textContent.trim());
32
+ const text = codes.join('\n');
33
+ const action = btn.dataset.ocRecovery;
34
+ if (action === 'copy') {
35
+ try { await navigator.clipboard.writeText(text); } catch { return; }
36
+ // data-copied-label: feedback on the button and in the live region (.oc-recovery-codes-status)
37
+ const label = btn.querySelector('.oc-recovery-codes-label');
38
+ const status = panel.querySelector('.oc-recovery-codes-status');
39
+ const done = btn.dataset.copiedLabel || 'Copied';
40
+ if (label) { label.dataset.label ??= label.textContent; label.textContent = done; }
41
+ if (status) status.textContent = done;
42
+ btn.classList.add('is-copied');
43
+ clearTimeout(btn.ocCopyTimer);
44
+ btn.ocCopyTimer = setTimeout(() => {
45
+ btn.classList.remove('is-copied');
46
+ if (label) label.textContent = label.dataset.label;
47
+ if (status) status.textContent = '';
48
+ }, 2000);
49
+ return;
50
+ }
51
+ if (action === 'print') {
52
+ // only the codes on paper: a hidden iframe with the title and the list
53
+ const esc = (t) => t.replace(/[&<>"']/g, (ch) => `&#${ch.charCodeAt(0)};`);
54
+ const title = esc(panel.querySelector('.oc-recovery-codes-title')?.textContent.trim() || 'Recovery codes');
55
+ const frame = document.createElement('iframe');
56
+ frame.setAttribute('aria-hidden', 'true');
57
+ frame.style.cssText = 'position:fixed;inline-size:0;block-size:0;border:0;inset:auto auto 0 0';
58
+ frame.srcdoc = `<!doctype html><meta charset="utf-8"><title>${title}</title><style>body{font:14px ui-monospace,Consolas,monospace;margin:2cm}h1{font:600 16px system-ui,sans-serif}ul{list-style:none;padding:0;columns:2}</style><h1>${title}</h1><ul>${codes.map((c) => `<li>${esc(c)}</li>`).join('')}</ul>`;
59
+ frame.addEventListener('load', () => { frame.contentWindow.print(); setTimeout(() => frame.remove(), 1000); });
60
+ document.body.append(frame);
61
+ return;
62
+ }
63
+ const a = document.createElement('a');
64
+ a.href = URL.createObjectURL(new Blob([text + '\n'], { type: 'text/plain' }));
65
+ a.download = btn.dataset.filename || 'recovery-codes.txt';
66
+ a.click();
67
+ URL.revokeObjectURL(a.href);
68
+ });
69
+ </script>
@@ -0,0 +1,19 @@
1
+ <!-- OmniaUI component: scrim - A calm fade over a picture (from a color at one edge to transparent) so text on top of it stays readable. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/scrim.html | Map: positioned box -> image -> span.oc-scrim (or .oc-has-scrim on the box) -> text (.oc-scrim-content)
3
+ Class API (modifiers are extra classes on the same element):
4
+ .oc-scrim: click-through layer over its positioned parent (child element, aria-hidden)
5
+ .oc-has-scrim: the same scrim as ::after on the box itself, no extra element
6
+ Modifiers: --top, --start, --end (default: bottom), --full (one even layer), --dark (near black instead of the page background)
7
+ .oc-scrim-content: text above the scrim (position: relative; z-index 2)
8
+ Tokens: --oc-scrim-color, --oc-scrim-strength (0 to 1, default 0.85), --oc-scrim-size (fade length, default 60%)
9
+ Slots: none. The layer is decorative (aria-hidden).
10
+ -->
11
+ <figure class="relative m-0 w-full aspect-16 overflow-hidden rounded-lg">
12
+ <img style="display:block;inline-size:100%;block-size:100%;object-fit:cover" src="/img/blocks/otp-split-photo.webp" alt="Stone surface with old carvings">
13
+ <span class="oc-scrim oc-scrim--dark" aria-hidden="true"></span>
14
+ <figcaption class="oc-scrim-content absolute p-2" style="inset-block-end:0;color:oklch(98% 0 0)">Caption on the scrim</figcaption>
15
+ </figure>
16
+
17
+ <figure class="oc-has-scrim oc-scrim--top m-0 w-full aspect-16 overflow-hidden rounded-lg">
18
+ <img style="display:block;inline-size:100%;block-size:100%;object-fit:cover" src="/img/blocks/otp-split-photo.webp" alt="">
19
+ </figure>