@birdycom/omniaui 0.15.1 → 0.16.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 +3 -0
  2. package/dist/carousel.d.ts +2 -0
  3. package/dist/carousel.js +38 -2
  4. package/dist/combobox.d.ts +13 -0
  5. package/dist/combobox.js +143 -0
  6. package/dist/components-extra.css +7 -3
  7. package/dist/components.css +1211 -146
  8. package/dist/components.min.css +1 -1
  9. package/dist/docs-ui.css +1 -1
  10. package/dist/fly.js +13 -2
  11. package/dist/logo.d.ts +14 -0
  12. package/dist/logo.js +98 -0
  13. package/dist/oc-theme.css +1 -1
  14. package/dist/parts/app-0160-apps.css +141 -0
  15. package/dist/parts/app-accordion-accent.css +1 -1
  16. package/dist/parts/app-busy-overlay.css +1 -1
  17. package/dist/parts/app-confirm-dialog.css +4 -18
  18. package/dist/parts/app-cookie-consent.css +1 -1
  19. package/dist/parts/app-data-table-rich.css +1 -1
  20. package/dist/parts/app-mode-badge.css +125 -0
  21. package/dist/parts/app-name-card.css +10 -0
  22. package/dist/parts/app-severity-card.css +4 -3
  23. package/dist/parts/app-sheet-options.css +70 -0
  24. package/dist/parts/app-sidebar-dark.css +1 -1
  25. package/dist/parts/app-sidebar-meta.css +40 -0
  26. package/dist/parts/app-stat-card.css +2 -2
  27. package/dist/parts/app-upgrade-banner.css +1 -1
  28. package/dist/parts/data-chart-line.css +5 -2
  29. package/dist/parts/data-reading.css +2 -1
  30. package/dist/parts/data-stock.css +1 -1
  31. package/dist/parts/forms-affix-input.css +7 -0
  32. package/dist/parts/forms-barcode-input.css +2 -1
  33. package/dist/parts/forms-combobox-icons.css +78 -0
  34. package/dist/parts/forms-language-menu.css +89 -0
  35. package/dist/parts/forms-language-select.css +3 -2
  36. package/dist/parts/forms-phone-input.css +3 -0
  37. package/dist/parts/media-art.css +7 -5
  38. package/dist/parts/media-doc-viewer.css +1 -1
  39. package/dist/parts/media-flip-card.css +1 -1
  40. package/dist/parts/media-glass-liquid.css +14 -0
  41. package/dist/parts/media-glass.css +8 -0
  42. package/dist/parts/media-live-frame.css +28 -0
  43. package/dist/parts/media-logo.css +48 -0
  44. package/dist/parts/media-terminal-log.css +4 -3
  45. package/dist/parts/media-thumb.css +1 -1
  46. package/dist/parts/site-backgrounds.css +1 -1
  47. package/dist/parts/site-brand-mark.css +1 -1
  48. package/dist/parts/site-cards.css +4 -1
  49. package/dist/parts/site-fact-list.css +1 -1
  50. package/dist/parts/site-fly.css +1 -0
  51. package/dist/parts/site-header-variants.css +6 -1
  52. package/dist/parts/site-layout.css +1 -1
  53. package/dist/parts/site-link-arrow.css +1 -1
  54. package/dist/parts/site-link-row.css +1 -1
  55. package/dist/parts/site-next-teaser.css +2 -2
  56. package/dist/parts/site-paper.css +189 -0
  57. package/dist/parts/site-price-card.css +4 -3
  58. package/dist/parts/site-product-mark.css +1 -1
  59. package/dist/parts/site-project-card.css +13 -8
  60. package/dist/parts/site-stack-list.css +1 -1
  61. package/dist/parts/site-timeline.css +1 -1
  62. package/dist/parts/utility-hover.css +4 -3
  63. package/dist/showcase.css +74 -28
  64. package/dist/theme.js +130 -0
  65. package/manifest.json +32 -0
  66. package/package.json +5 -2
  67. package/snippets/card.html +4 -1
  68. package/snippets/code-plate.html +10 -0
  69. package/snippets/collapsible.html +2 -2
  70. package/snippets/combobox.html +19 -0
  71. package/snippets/context-menu.html +5 -2
  72. package/snippets/definition-list.html +1 -1
  73. package/snippets/dropdown-menu.html +1 -0
  74. package/snippets/language-select.html +15 -0
  75. package/snippets/live-frame.html +3 -1
  76. package/snippets/logo.html +10 -0
  77. package/snippets/mode-badge.html +12 -0
  78. package/snippets/next-teaser.html +1 -1
  79. package/snippets/page-sections.html +1 -1
  80. package/snippets/paper.html +32 -0
  81. package/snippets/project-card.html +4 -4
  82. package/snippets/sheet.html +4 -0
  83. package/snippets/shot-grid.html +2 -2
  84. package/snippets/sidebar.html +2 -0
  85. package/snippets/timeline.html +1 -1
package/dist/theme.js ADDED
@@ -0,0 +1,130 @@
1
+ // File: packages/ui/src/theme.js
2
+ // Map: read / write the stored choice -> apply (data-theme, .dark, color-scheme) -> sync switches and toggle buttons
3
+ // -> listen (radios, toggle buttons, other tabs) -> head snippet against a flash -> boot
4
+ // Theme helper: remembers the choice of a .oc-theme-switch (system / light / dark) and puts it on <html> as
5
+ // data-theme, so CSS and scripts have one place to look. The switch itself keeps working without this script.
6
+ // <html data-theme="dark" class="dark"> chosen dark (no attribute = follow the operating system)
7
+ // <fieldset class="oc-theme-switch"> … radios name="oc-theme" value="system | light | dark"
8
+ // <button data-oc-theme-toggle> one button: light <-> dark (aria-pressed = dark)
9
+ // <button data-oc-theme-set="dark"> a button for one value (cards on a settings page; aria-pressed)
10
+ // Switches inside .oc-theme-scope theme only their own element and are left alone.
11
+ // Against a flash of the wrong theme on load: put THEME_HEAD_SCRIPT inline in <head>, before the stylesheets.
12
+
13
+ const VALUES = ["system", "light", "dark"];
14
+
15
+ /** "light", "dark" or "system" (also for an unknown or missing value). */
16
+ export function normalizeTheme(value) {
17
+ return VALUES.includes(value) ? value : "system";
18
+ }
19
+
20
+ /** The stored choice, "system" when nothing is stored or storage is blocked. */
21
+ export function readTheme(storage, key = "oc-theme") {
22
+ try { return normalizeTheme(storage?.getItem(key)); } catch { return "system"; }
23
+ }
24
+
25
+ /** Store the choice; "system" removes the key. Returns false when storage is blocked. */
26
+ export function writeTheme(storage, value, key = "oc-theme") {
27
+ try {
28
+ if (normalizeTheme(value) === "system") storage?.removeItem(key);
29
+ else storage?.setItem(key, value);
30
+ return true;
31
+ } catch { return false; }
32
+ }
33
+
34
+ /** The theme that is shown: the choice, or the operating system for "system". */
35
+ export function effectiveTheme(choice, prefersDark) {
36
+ const value = normalizeTheme(choice);
37
+ return value === "system" ? (prefersDark ? "dark" : "light") : value;
38
+ }
39
+
40
+ /**
41
+ * Put the choice on the root element: data-theme="light|dark" (removed for "system") and, with darkClass, the class
42
+ * .dark for code that looks at a class. Returns the theme that is shown.
43
+ */
44
+ export function applyTheme(root, choice, { darkClass = true, prefersDark = false } = {}) {
45
+ const value = normalizeTheme(choice);
46
+ const shown = effectiveTheme(value, prefersDark);
47
+ if (value === "system") root.removeAttribute("data-theme");
48
+ else root.setAttribute("data-theme", value);
49
+ if (darkClass) root.classList.toggle("dark", value === "dark");
50
+ return shown;
51
+ }
52
+
53
+ /** Inline script for <head>: sets data-theme (and .dark) before the first paint. The key must match initTheme. */
54
+ export const THEME_HEAD_SCRIPT = '(function(){try{var t=localStorage.getItem("oc-theme"),d=document.documentElement;if(t==="light"||t==="dark"){d.setAttribute("data-theme",t);if(t==="dark")d.classList.add("dark")}}catch(e){}})();';
55
+
56
+ /**
57
+ * Remember the theme and keep every switch and button on the page in step.
58
+ * @param {Document} doc
59
+ * @param {{ storageKey?: string, darkClass?: boolean, name?: string }} options
60
+ * storageKey: localStorage key ("oc-theme"); darkClass: also toggle .dark on <html> (true);
61
+ * name: only radios with this name (default: every .oc-theme-switch outside a .oc-theme-scope).
62
+ * @returns {{ get: () => string, set: (value: string) => void, stop: () => void }}
63
+ */
64
+ export function initTheme(doc = document, { storageKey = "oc-theme", darkClass = true, name } = {}) {
65
+ const win = doc.defaultView;
66
+ const root = doc.documentElement;
67
+ const media = win?.matchMedia?.("(prefers-color-scheme: dark)");
68
+ let storage = null;
69
+ try { storage = win?.localStorage ?? null; } catch { storage = null; }
70
+ let choice = readTheme(storage, storageKey);
71
+
72
+ const radios = () => [...doc.querySelectorAll(".oc-theme-switch input[type=radio]")]
73
+ .filter((input) => !input.closest(".oc-theme-scope") && (!name || input.name === name));
74
+ const sync = () => {
75
+ const shown = applyTheme(root, choice, { darkClass, prefersDark: !!media?.matches });
76
+ for (const input of radios()) input.checked = input.value === choice;
77
+ for (const button of doc.querySelectorAll("[data-oc-theme-toggle]")) button.setAttribute("aria-pressed", shown === "dark" ? "true" : "false");
78
+ for (const button of doc.querySelectorAll("[data-oc-theme-set]")) button.setAttribute("aria-pressed", button.getAttribute("data-oc-theme-set") === choice ? "true" : "false");
79
+ root.dispatchEvent(new win.CustomEvent("oc-theme-change", { detail: { choice, theme: shown } }));
80
+ };
81
+ const set = (value) => {
82
+ choice = normalizeTheme(value);
83
+ writeTheme(storage, choice, storageKey);
84
+ sync();
85
+ };
86
+
87
+ const onChange = (event) => {
88
+ const input = event.target;
89
+ if (input?.matches?.(".oc-theme-switch input[type=radio]") && radios().includes(input) && input.checked) set(input.value);
90
+ };
91
+ const onClick = (event) => {
92
+ const toggle = event.target.closest?.("[data-oc-theme-toggle]");
93
+ if (toggle) return set(effectiveTheme(choice, !!media?.matches) === "dark" ? "light" : "dark");
94
+ const one = event.target.closest?.("[data-oc-theme-set]");
95
+ if (one) set(one.getAttribute("data-oc-theme-set"));
96
+ };
97
+ // Another tab changed the choice, or the operating system switched while the choice is "system".
98
+ const onStorage = (event) => { if (event.key === storageKey) { choice = readTheme(storage, storageKey); sync(); } };
99
+ const onSystem = () => { if (choice === "system") sync(); };
100
+
101
+ doc.addEventListener("change", onChange);
102
+ doc.addEventListener("click", onClick);
103
+ win?.addEventListener("storage", onStorage);
104
+ media?.addEventListener?.("change", onSystem);
105
+ sync();
106
+ return {
107
+ get: () => choice,
108
+ set,
109
+ stop() {
110
+ doc.removeEventListener("change", onChange);
111
+ doc.removeEventListener("click", onClick);
112
+ win?.removeEventListener("storage", onStorage);
113
+ media?.removeEventListener?.("change", onSystem);
114
+ },
115
+ };
116
+ }
117
+
118
+ // Starts on its own as /js/oc-theme.js (`npx omniaui copy-js theme`), with ?auto in the URL or data-oc-auto on the tag.
119
+ function autoStart() {
120
+ if (typeof document === "undefined") return false;
121
+ const url = String(import.meta.url);
122
+ if (url.includes("oc-theme") || /[?&]auto(=|&|$)/.test(url)) return true;
123
+ const file = url.split(/[?#]/)[0];
124
+ return [...document.querySelectorAll("script[data-oc-auto][src]")].some((s) => s.src.split(/[?#]/)[0] === file);
125
+ }
126
+ if (autoStart()) {
127
+ const boot = () => initTheme(document);
128
+ if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", boot);
129
+ else boot();
130
+ }
package/manifest.json CHANGED
@@ -1392,6 +1392,14 @@
1392
1392
  "@birdycom/omniaui"
1393
1393
  ]
1394
1394
  },
1395
+ {
1396
+ "name": "paper",
1397
+ "file": "snippets/paper.html",
1398
+ "description": "An off-white paper surface with a fine grain: tones, writing paper with lines, squares or dots, and paper edges",
1399
+ "requires": [
1400
+ "@birdycom/omniaui"
1401
+ ]
1402
+ },
1395
1403
  {
1396
1404
  "name": "particle-field",
1397
1405
  "file": "snippets/particle-field.html",
@@ -1431,6 +1439,30 @@
1431
1439
  "requires": [
1432
1440
  "@birdycom/omniaui"
1433
1441
  ]
1442
+ },
1443
+ {
1444
+ "name": "code-plate",
1445
+ "file": "snippets/code-plate.html",
1446
+ "description": "A QR code or barcode on its own white plate, with a caption on the plate itself (scans in any theme, the label is on a photo or print too)",
1447
+ "requires": [
1448
+ "@birdycom/omniaui"
1449
+ ]
1450
+ },
1451
+ {
1452
+ "name": "logo",
1453
+ "file": "snippets/logo.html",
1454
+ "description": "A customer logo in its own colors and ratio, never filtered, with a neutral plate only in the theme where it would disappear",
1455
+ "requires": [
1456
+ "@birdycom/omniaui"
1457
+ ]
1458
+ },
1459
+ {
1460
+ "name": "mode-badge",
1461
+ "file": "snippets/mode-badge.html",
1462
+ "description": "Test and live at a glance: a badge in fixed mode colors (also on a photo or print), \"both\" as two parts side by side",
1463
+ "requires": [
1464
+ "@birdycom/omniaui"
1465
+ ]
1434
1466
  }
1435
1467
  ]
1436
1468
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@birdycom/omniaui",
3
- "version": "0.15.1",
3
+ "version": "0.16.0",
4
4
  "description": "OmniaUI components: CSS-first UI built on native HTML (dialog, popover, details) with light-dark() theming — no JavaScript required. Includes the omniaui CLI (add/list).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,7 +37,10 @@
37
37
  "./fly.js": "./dist/fly.js",
38
38
  "./particles.js": "./dist/particles.js",
39
39
  "./toc.js": "./dist/toc.js",
40
+ "./theme.js": "./dist/theme.js",
40
41
  "./language-select.js": "./dist/language-select.js",
42
+ "./combobox.js": "./dist/combobox.js",
43
+ "./logo.js": "./dist/logo.js",
41
44
  "./manifest.json": "./manifest.json",
42
45
  "./package.json": "./package.json"
43
46
  },
@@ -65,7 +68,7 @@
65
68
  "omniaui": "./bin/omniaui.mjs"
66
69
  },
67
70
  "peerDependencies": {
68
- "@birdycom/omniacss": "^0.15.1"
71
+ "@birdycom/omniacss": "^0.16.0"
69
72
  },
70
73
  "peerDependenciesMeta": {
71
74
  "@birdycom/omniacss": {
@@ -1,4 +1,7 @@
1
- <!-- OmniaUI component: card — Card with header, content, footer. Needs @birdycom/omniaui CSS. -->
1
+ <!-- OmniaUI component: card — Card with header, content, footer. Needs @birdycom/omniaui CSS.
2
+ Accent (0.16.0): .oc-card--accent[data-tone="primary|info|success|warning|destructive|test|live"] (2px border in that
3
+ color) + .oc-card-band at the top (soft band: a badge, .oc-card-band__title with a <small> line, a status);
4
+ data-active="false" = a set that is not in use now (dashed). -->
2
5
  <div class="oc-card">
3
6
  <div class="oc-card-header">
4
7
  <h3 class="oc-card-title">Create project</h3>
@@ -0,0 +1,10 @@
1
+ <!-- OmniaUI component: code-plate - A QR code or barcode on its own white plate, with a caption on the plate itself (scans in any theme, the label is on a photo or print too). Needs @birdycom/omniaui CSS.
2
+ Class API (modifiers are extra classes / attributes on the same element):
3
+ figure.oc-code-plate: the white plate (always light). Modifier: --sm (for a code of about 72px).
4
+ Child: the code (img, svg, canvas or .oc-barcode), then figcaption.oc-code-plate__caption.
5
+ data-mode="test|live|both": the caption in the mode colors; "both" = two spans in the caption.
6
+ -->
7
+ <figure class="oc-code-plate" data-mode="test" style="inline-size: 12rem">
8
+ <img src="/img/samples/qr-company-1-test.svg" alt="QR code to join the test round of Company 1" width="192" height="192">
9
+ <figcaption class="oc-code-plate__caption">Test</figcaption>
10
+ </figure>
@@ -1,6 +1,6 @@
1
1
  <!-- OmniaUI component: collapsible - Card-style details/summary form section with icon, title and chevron. Needs @birdycom/omniaui CSS.
2
2
  Class API (modifiers are extra classes / attributes on the same element):
3
- details.oc-collapsible: Root. Modifier: --dense (compact paddings).
3
+ details.oc-collapsible: Root. Modifiers: --dense (compact paddings), --plain (no card: for lists inside a panel, a line between neighbours).
4
4
  summary: Header row with .oc-collapsible-icon + .oc-collapsible-title; the chevron is CSS
5
5
  .oc-collapsible-content: Body with a top border
6
6
  Slots: icon, title (summary), content (default)
@@ -13,7 +13,7 @@
13
13
  <div class="oc-collapsible-content">
14
14
  <div class="oc-field">
15
15
  <label class="oc-field-label" for="oc-collapsible-name">Name</label>
16
- <input class="oc-input" id="oc-collapsible-name" value="Birdy Systems BV">
16
+ <input class="oc-input" id="oc-collapsible-name" value="Company 1 BV">
17
17
  </div>
18
18
  </div>
19
19
  </details>
@@ -5,6 +5,10 @@
5
5
  ul.oc-combobox-list: role="listbox"
6
6
  li.oc-combobox-option: role="option" tabindex="-1"; aria-selected="true" shows a check; [data-active] marks the keyboard-active option
7
7
  .oc-combobox-group / .oc-combobox-empty: group heading and empty message
8
+ Icons (0.16.0): span.oc-combobox-option-icon first in an option (svg, iconify-icon or img); span.oc-combobox-icon first in
9
+ the wrapper shows the icon of the chosen value in the field. Options without an icon line up with the others.
10
+ Behaviour: data-oc-combobox + oc-combobox.js (npx omniaui copy-js combobox) filters while typing, moves with the arrow keys,
11
+ chooses with Enter or a click, closes with Escape, copies the icon into the field; event oc-combobox-change { value, label }.
8
12
  -->
9
13
  <div class="oc-combobox">
10
14
  <input class="oc-input oc-combobox-input" type="text" role="combobox" aria-expanded="false" aria-controls="oc-cb-list" aria-autocomplete="list" placeholder="Select framework&hellip;" aria-label="Framework">
@@ -17,3 +21,18 @@
17
21
  <li class="oc-combobox-option" role="option" tabindex="-1">Vue</li>
18
22
  </ul>
19
23
  </div>
24
+
25
+ <!-- With icons in front of the options and of the chosen value (needs oc-combobox.js for typing and the keyboard) -->
26
+ <div class="oc-combobox" data-oc-combobox>
27
+ <span class="oc-combobox-icon" aria-hidden="true"><iconify-icon icon="mdi:source-branch" aria-hidden="true"></iconify-icon></span>
28
+ <input class="oc-input oc-combobox-input" type="text" role="combobox" aria-expanded="false" aria-controls="oc-cb-icons" aria-autocomplete="list" placeholder="Choose a source&hellip;" aria-label="Source">
29
+ <input type="hidden" name="source" value="">
30
+ <ul class="oc-combobox-list" id="oc-cb-icons" role="listbox" aria-label="Sources">
31
+ <li class="oc-combobox-option" role="option" tabindex="-1" data-value="github"><span class="oc-combobox-option-icon" aria-hidden="true"><iconify-icon icon="mdi:github" aria-hidden="true"></iconify-icon></span>GitHub</li>
32
+ <li class="oc-combobox-option" role="option" tabindex="-1" data-value="gitlab"><span class="oc-combobox-option-icon" aria-hidden="true"><iconify-icon icon="mdi:gitlab" aria-hidden="true"></iconify-icon></span>GitLab</li>
33
+ <li class="oc-combobox-option" role="option" tabindex="-1" data-value="folder"><span class="oc-combobox-option-icon" aria-hidden="true"><iconify-icon icon="mdi:folder-outline" aria-hidden="true"></iconify-icon></span>Local folder</li>
34
+ <li class="oc-combobox-option" role="option" tabindex="-1" data-value="other">Other</li>
35
+ <li class="oc-combobox-empty" role="presentation" hidden>No results</li>
36
+ </ul>
37
+ </div>
38
+ <script type="module" src="/js/oc-combobox.js"></script>
@@ -2,7 +2,7 @@
2
2
  Class API (modifiers are extra classes / attributes on the same element):
3
3
  .oc-dropdown-menu.oc-context-menu[popover]: the menu (role="menu"); position from --oc-context-x / --oc-context-y
4
4
  .oc-context-area: dashed right-click target (demo styling)
5
- Script: contextmenu -> preventDefault, set the two variables, showPopover()
5
+ Script: contextmenu -> preventDefault, set the two variables, showPopover() (after pointerup while a button is down: Firefox)
6
6
  -->
7
7
  <div class="oc-context-area" id="oc-ctx-area" tabindex="0">Right-click (or press the menu key) here</div>
8
8
  <div class="oc-dropdown-menu oc-context-menu" id="oc-ctx-menu" popover role="menu" aria-label="Actions">
@@ -19,7 +19,10 @@
19
19
  e.preventDefault();
20
20
  menu.style.setProperty('--oc-context-x', Math.min(e.clientX, innerWidth - 220) + 'px');
21
21
  menu.style.setProperty('--oc-context-y', Math.min(e.clientY, innerHeight - 220) + 'px');
22
- menu.showPopover();
22
+ // Firefox fires contextmenu while the right button is still down: open after the release,
23
+ // or that release would close the menu again right away.
24
+ if (e.buttons) window.addEventListener('pointerup', function () { setTimeout(function () { menu.showPopover(); }); }, { once: true });
25
+ else menu.showPopover();
23
26
  });
24
27
  })();
25
28
  </script>
@@ -14,7 +14,7 @@
14
14
  <h3 class="oc-dl-title">Company data found</h3>
15
15
  <p class="oc-dl-description">Retrieved from the VAT register.</p>
16
16
  <dl class="oc-dl">
17
- <div class="oc-dl-row"><dt class="oc-dl-term">Name</dt><dd class="oc-dl-detail">Birdy Systems BV</dd></div>
17
+ <div class="oc-dl-row"><dt class="oc-dl-term">Name</dt><dd class="oc-dl-detail">Company 1 BV</dd></div>
18
18
  <div class="oc-dl-row"><dt class="oc-dl-term">Enterprise number</dt><dd class="oc-dl-detail">BE 0123.456.789</dd></div>
19
19
  <div class="oc-dl-row"><dt class="oc-dl-term">Address</dt><dd class="oc-dl-detail">Main Street 1, 2000 Antwerp</dd></div>
20
20
  </dl>
@@ -3,6 +3,7 @@
3
3
  .oc-dropdown-sub > button.oc-dropdown-item + .oc-dropdown-submenu: nested menu (opens on hover and focus-within, chevron added)
4
4
  .oc-dropdown-item[role="menuitemcheckbox"|"menuitemradio"][aria-checked]: check mark / dot indicator
5
5
  .oc-dropdown-shortcut: right aligned key hint
6
+ .oc-dropdown-icon (0.16.0): icon in front of the label; items without one line up with the others
6
7
  .oc-dropdown-item--destructive | --inset | [aria-disabled=true]
7
8
  -->
8
9
  <button class="oc-btn oc-btn--outline" type="button" popovertarget="oc-dd-extras">Open menu</button>
@@ -4,6 +4,10 @@
4
4
  .oc-language-select: Pill frame around icon and select. Modifiers: --ghost (no frame), --currency (symbol in primary color).
5
5
  .oc-language-select-icon: Leading icon (inline SVG) or symbol; aria-hidden="true"
6
6
  .oc-language-select-control: The native <select> (give it an aria-label)
7
+ Menu (0.16.0): button.oc-language-select[popovertarget] + .oc-dropdown-menu.oc-language-menu[popover]: one link per
8
+ language (hreflang + lang) with .oc-language-flag (flag webicon), the name in that language, .oc-language-menu-code,
9
+ and a check at aria-current="true". Trigger: .oc-language-flag + .oc-language-select-code ("NL") or the name;
10
+ --icon = round icon-only trigger (globe or flag) with the name in aria-label and a tooltip (oc-tooltip). No script.
7
11
  States: :focus-within (ring), disabled select (dimmed)
8
12
  Behaviour: the app listens to "change" (navigate to /nl/..., set a cookie, or submit the form).
9
13
  -->
@@ -35,3 +39,14 @@
35
39
  </select>
36
40
  </label>
37
41
  </div>
42
+
43
+ <!-- Menu with flags: the trigger shows the flag and the code, the list the flag, the name in that language and a check -->
44
+ <button type="button" class="oc-language-select" popovertarget="oc-language-flags" aria-label="Language: Nederlands">
45
+ <span class="oc-language-flag" aria-hidden="true"><iconify-icon icon="flag:nl-4x3" aria-hidden="true"></iconify-icon></span>
46
+ <span class="oc-language-select-code">NL</span>
47
+ </button>
48
+ <div class="oc-dropdown-menu oc-language-menu" id="oc-language-flags" popover aria-label="Language">
49
+ <a class="oc-dropdown-item" href="/en/" hreflang="en" lang="en"><span class="oc-language-flag" aria-hidden="true"><iconify-icon icon="flag:gb-4x3" aria-hidden="true"></iconify-icon></span><span>English</span><span class="oc-language-menu-code" aria-hidden="true">EN</span></a>
50
+ <a class="oc-dropdown-item" href="/nl/" hreflang="nl" lang="nl" aria-current="true"><span class="oc-language-flag" aria-hidden="true"><iconify-icon icon="flag:nl-4x3" aria-hidden="true"></iconify-icon></span><span>Nederlands</span><span class="oc-language-menu-code" aria-hidden="true">NL</span></a>
51
+ <a class="oc-dropdown-item" href="/fr/" hreflang="fr" lang="fr"><span class="oc-language-flag" aria-hidden="true"><iconify-icon icon="flag:fr-4x3" aria-hidden="true"></iconify-icon></span><span>Fran&ccedil;ais</span><span class="oc-language-menu-code" aria-hidden="true">FR</span></a>
52
+ </div>
@@ -3,7 +3,9 @@
3
3
  Class API (modifiers are extra classes on the same element):
4
4
  .oc-live-frame: box with the ratio of the virtual size; its iframe / video / img / .oc-live-frame__content is laid out
5
5
  at that size and scaled to the box width (pure CSS: tan(atan2(100cqi, width)))
6
- Modifiers: --static (clicks and scrolling pass through: a picture of a page)
6
+ Modifiers: --static (clicks and scrolling pass through: a picture of a page), --phone / --tv (a device bezel;
7
+ phone 390 x 844 at most --oc-live-phone-max wide; bezel color --oc-live-bezel)
8
+ inert on the iframe: only to look at (no focus, no clicks, hidden from screen readers)
7
9
  Tokens: --oc-live-w, --oc-live-h (unitless px, default 1280 x 720)
8
10
  Also on .oc-browser-frame__view, the view slot of the browser frame.
9
11
  Slots: the iframe (or other content). Give the iframe a title; scrolling="no" hides its scrollbar.
@@ -0,0 +1,10 @@
1
+ <!-- OmniaUI component: logo - A customer logo in its own colors and ratio, never filtered, with a neutral plate only in the theme where it would disappear. Needs @birdycom/omniaui CSS.
2
+ Class API (modifiers are extra classes / attributes on the same element):
3
+ .oc-logo > img: the logo at --oc-logo-h (height), at most --oc-logo-w wide. Modifier: --box (the same box for every logo).
4
+ data-plate="light" (a white logo: a plate in the light theme) | "dark" (a dark logo: a plate in the dark theme) |
5
+ "both" (a mid plate in both) | "none" | "auto" (measured once by oc-logo.js: npx omniaui copy-js logo).
6
+ Tokens: --oc-logo-plate-light, --oc-logo-plate-dark, --oc-logo-plate-both.
7
+ The image must be same-origin (or send CORS headers) for "auto"; otherwise it stays without a plate.
8
+ -->
9
+ <span class="oc-logo" data-plate="auto"><img src="/uploads/logo-company-1.svg" alt="Company 1"></span>
10
+ <script type="module" src="/js/oc-logo.js"></script>
@@ -0,0 +1,12 @@
1
+ <!-- OmniaUI component: mode-badge - Test and live at a glance: a badge in fixed mode colors (also on a photo or print), "both" as two parts side by side. Needs @birdycom/omniaui CSS.
2
+ Class API (modifiers are extra classes / attributes on the same element):
3
+ .oc-mode-badge[data-mode="test|live|both"]: the badge (test amber, live green, the same in light and dark mode)
4
+ Modifiers: --sm, --lg. data-mode="both": two child spans (Test, Live), each in its own color.
5
+ Tokens: --oc-mode-test, --oc-mode-live, --oc-mode-ink (text). Also used by .oc-card--accent[data-tone="test|live"]
6
+ and .oc-code-plate[data-mode].
7
+ -->
8
+ <span class="oc-mode-badge" data-mode="test">Test</span>
9
+ <span class="oc-mode-badge" data-mode="live">Live</span>
10
+ <span class="oc-mode-badge" data-mode="both"><span>Test</span><span>Live</span></span>
11
+ <span class="oc-mode-badge oc-mode-badge--sm" data-mode="live">Live</span>
12
+ <span class="oc-mode-badge oc-mode-badge--lg" data-mode="test">Test</span>
@@ -10,6 +10,6 @@
10
10
  -->
11
11
  <a class="oc-next-teaser oc-accent--violet" href="#next">
12
12
  <span class="oc-next-teaser__label">Next product</span>
13
- <span class="oc-next-teaser__name"><span class="oc-product-mark oc-product-mark--sm oc-accent--violet" aria-hidden="true">&#9673;</span>Acme Design</span>
13
+ <span class="oc-next-teaser__name"><span class="oc-product-mark oc-product-mark--sm oc-accent--violet" aria-hidden="true">&#9673;</span>Product 1</span>
14
14
  <span class="oc-next-teaser__tagline">The design system behind our apps</span>
15
15
  </a>
@@ -13,7 +13,7 @@
13
13
  <section class="oc-section-pad--page" style="inline-size:100%">
14
14
  <div class="oc-container">
15
15
  <p class="oc-eyebrow">Contact</p>
16
- <h1 class="oc-display oc-display--page">Let's <span class="oc-text-gradient">talk</span></h1>
16
+ <h1 class="oc-display oc-display--page">Let's talk</h1>
17
17
  <p class="oc-lead">A new project, a question about one of our apps or help with your IT? We would like to hear from you.</p>
18
18
  <p class="oc-meta">Version 2 · 30 October 2026</p>
19
19
  <div class="oc-actions">
@@ -0,0 +1,32 @@
1
+ <!-- OmniaUI component: paper - An off-white paper surface with a fine grain: tones, writing paper with lines, squares or dots, and paper edges. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/paper.html | Map: sheet of lined paper with a margin -> torn sheet in a lift wrapper -> section with the paper theme
3
+ Class API (modifiers are extra classes / attributes on the same element):
4
+ .oc-paper: Off-white background with a fine grain and a matching ink color. Modifier: --smooth (no grain)
5
+ .oc-paper--bright / --ivory / --gray / --kraft: Tones. Own tone: --oc-paper-tint, --oc-paper-l, --oc-paper-c. The same color in light and dark mode
6
+ .oc-paper--sheet: A single sheet with padding (--oc-paper-pad) and a soft shadow
7
+ .oc-paper-lift: Wrapper that gives a sheet with a cut edge a shadow that follows the edge
8
+ .oc-paper--lined: Ruled writing paper; --oc-paper-line (1.75rem) is the rule distance and the line height
9
+ .oc-paper--margin: Red margin line on the start side (--oc-paper-margin-at)
10
+ .oc-paper--grid / --dots: Squared paper and a dot grid (--oc-paper-grid)
11
+ .oc-paper--mm: Millimeter paper, lines every 1, 5 and 10 mm (--oc-paper-mm, --oc-paper-mm-color)
12
+ .oc-paper--torn / --torn-top / --torn-both: Torn edge (--oc-paper-tear, --oc-paper-tear-width)
13
+ .oc-paper--zigzag: Zigzag cut of a receipt at the bottom (--oc-paper-tooth)
14
+ .oc-paper--holes: Punched holes on the start side. .oc-paper--fold: folded corner. .oc-paper--stack: two more sheets under it
15
+ .oc-paper-theme: Sets --oc-background, --oc-card and --oc-popover to off-white for everything inside (on <body> or a section)
16
+ One cut edge at a time: torn, zigzag and holes each use the CSS mask.
17
+ -->
18
+ <div class="oc-paper oc-paper--sheet oc-paper--lined oc-paper--margin">
19
+ <h4>Meeting notes</h4>
20
+ <p>Customer 1 wants the quote before Friday. Ask Company 1 for the delivery time of the screens.</p>
21
+ <p>Next meeting: Tuesday at 10:00.</p>
22
+ </div>
23
+
24
+ <div class="oc-paper-lift">
25
+ <div class="oc-paper oc-paper--sheet oc-paper--torn">
26
+ <p>A sheet with a torn edge at the bottom.</p>
27
+ </div>
28
+ </div>
29
+
30
+ <section class="oc-paper-theme oc-paper">
31
+ <article class="oc-card"><div class="oc-card-content"><p>A card on an off-white page.</p></div></article>
32
+ </section>
@@ -1,9 +1,9 @@
1
1
  <!-- OmniaUI component: project-card - Portfolio card with a browser-like preview, type badge, name, meta and an arrow link. Needs @birdycom/omniaui CSS.
2
2
  File: packages/ui/snippets/project-card.html | Map: a.oc-project-card -> __frame (__bar + __shot) -> __body (type, name, meta, more)
3
3
  Class API (modifiers are extra classes / attributes on the same element):
4
- .oc-project-card: The card (usually an <a>, the whole card is clickable). Modifier: --flat (edge-to-edge preview)
4
+ .oc-project-card: The card (usually an <a>, the whole card is clickable). Modifiers: --flat (edge-to-edge preview), --glow (shadow under the preview in the accent color)
5
5
  .oc-project-card__frame: Preview window. .oc-project-card__bar: title bar with three <i> dots
6
- .oc-project-card__shot: Screenshot <img>, or an empty <span> for a gradient placeholder
6
+ .oc-project-card__shot: Screenshot <img>, or an empty <span> for a tinted placeholder
7
7
  .oc-project-card__body: Text column
8
8
  .oc-project-card__type / __name / __meta / __more: Badge, title, sector line, "View" link with arrow
9
9
  .oc-accent--*: Accent preset for the badge, dot, border and placeholder
@@ -12,11 +12,11 @@
12
12
  <a class="oc-project-card oc-accent--green" href="#project">
13
13
  <span class="oc-project-card__frame">
14
14
  <span class="oc-project-card__bar" aria-hidden="true"><i></i><i></i><i></i></span>
15
- <span class="oc-project-card__shot" role="img" aria-label="Northwind Bakery website, screenshot"></span>
15
+ <span class="oc-project-card__shot" role="img" aria-label="Customer 1 website, screenshot"></span>
16
16
  </span>
17
17
  <span class="oc-project-card__body">
18
18
  <span class="oc-project-card__type">Website</span>
19
- <span class="oc-project-card__name">Northwind Bakery</span>
19
+ <span class="oc-project-card__name">Customer 1</span>
20
20
  <span class="oc-project-card__meta">Food &amp; retail &middot; Antwerp</span>
21
21
  <span class="oc-project-card__more">View project</span>
22
22
  </span>
@@ -6,6 +6,10 @@
6
6
  .oc-sheet-body: Scrolling content
7
7
  .oc-sheet-footer: Action row
8
8
  .oc-sheet-close: Close button (command="close")
9
+ Options (0.16.0): dialog.oc-sheet--glass (see-through panel over a live view, light scrim without blur; tokens
10
+ --oc-sheet-bg, --oc-sheet-blur, --oc-sheet-scrim; opaque with prefers-reduced-transparency or without backdrop-filter),
11
+ dialog.oc-sheet--inset (a strip of the page stays free beside the panel; --oc-sheet-gap),
12
+ .oc-sheet-footer--panel (the footer is a block of content on its own background, --oc-sheet-footer-bg)
9
13
  Slots: header (title, description), body (default), footer, trigger button outside the dialog
10
14
  -->
11
15
  <button class="oc-btn oc-btn--outline" type="button" command="show-modal" commandfor="oc-sheet-demo">Open sheet</button>
@@ -3,7 +3,7 @@
3
3
  Class API (modifiers are extra classes / attributes on the same element):
4
4
  .oc-shot-grid: Auto-fit grid; --oc-shot-min is the minimum column width (18rem).
5
5
  .oc-shot: Figure: image (or picture) with object-fit: contain, --oc-shot-ratio (16 / 10), caption under it; a link or button around the image shows a zoom cursor.
6
- .oc-browser-frame--glow: Browser frame with a shadow in --oc-accent-from; the screenshot zooms in a little on hover.
6
+ .oc-browser-frame--glow: Option on .oc-browser-frame: the shadow takes --oc-accent-from and the screenshot zooms in a little on hover.
7
7
  .oc-browser-frame__mark: A product mark or tile on the bottom end corner of the frame.
8
8
  -->
9
9
  <div class="oc-shot-grid" style="inline-size:100%">
@@ -20,7 +20,7 @@
20
20
  <figcaption>Product page with stock and documents</figcaption>
21
21
  </figure>
22
22
  </div>
23
- <div class="oc-browser-frame oc-browser-frame--glow oc-accent--green" style="inline-size:min(100%, 34rem)">
23
+ <div class="oc-browser-frame oc-accent--green" style="inline-size:min(100%, 34rem)">
24
24
  <div class="oc-browser-frame__bar"><i></i><i></i><i></i></div>
25
25
  <img class="oc-browser-frame__body" src="/img/blocks/dashboard-01.jpg" alt="Dashboard of Product 1" width="640" height="400">
26
26
  <span class="oc-browser-frame__mark oc-icon-tile oc-icon-tile--lg oc-accent--green" aria-hidden="true"><iconify-icon icon="mdi:chart-box-outline"></iconify-icon></span>
@@ -2,6 +2,8 @@
2
2
  Class API (modifiers are extra classes / attributes on the same element):
3
3
  .oc-sidebar: Root (aside/nav). Modifiers: --collapsed (icon only), --right, --floating. Width via --oc-sidebar-width / --oc-sidebar-width-icon.
4
4
  .oc-sidebar-header / -footer: Fixed top / bottom area (logo, workspace switcher / user)
5
+ .oc-sidebar-meta (0.16.0): brand + version + copyright line in the footer; collapsed: only the version, the line as a
6
+ tooltip (data-tooltip, oc-tooltip oc-tooltip--right). Parts: __brand, __version, __copy
5
7
  .oc-sidebar-content: Scrolling middle area
6
8
  .oc-sidebar-group: Group of items; optional .oc-sidebar-group-label heading
7
9
  .oc-sidebar-separator: Divider line
@@ -12,7 +12,7 @@
12
12
  <ol class="oc-timeline">
13
13
  <li class="oc-timeline__item">
14
14
  <time class="oc-timeline__date" datetime="2012">2012</time>
15
- <h3 class="oc-timeline__title">Acme is founded</h3>
15
+ <h3 class="oc-timeline__title">Company 1 is founded</h3>
16
16
  <p class="oc-timeline__text">Two developers start building websites for local shops.</p>
17
17
  </li>
18
18
  <li class="oc-timeline__item">