@birdycom/omniaui 0.11.0 → 0.11.2

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 (214) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +21 -21
  3. package/bin/lib/add.mjs +126 -126
  4. package/bin/lib/catalog.mjs +169 -169
  5. package/bin/lib/project.mjs +90 -90
  6. package/bin/omniaui.mjs +69 -69
  7. package/dist/code-block.css +25 -25
  8. package/dist/components-extra.css +916 -914
  9. package/dist/components.css +6565 -6469
  10. package/dist/components.min.css +1 -1
  11. package/dist/data-table.d.ts +9 -9
  12. package/dist/data-table.js +505 -505
  13. package/dist/docs-ui.css +267 -265
  14. package/dist/oc-theme.css +69 -69
  15. package/dist/parts/app-accordion-accent.css +60 -60
  16. package/dist/parts/app-alpha-tabs.css +68 -68
  17. package/dist/parts/app-busy-overlay.css +25 -25
  18. package/dist/parts/app-column-menu.css +85 -85
  19. package/dist/parts/app-confirm-dialog.css +70 -70
  20. package/dist/parts/app-cookie-consent.css +63 -63
  21. package/dist/parts/app-data-table.css +174 -174
  22. package/dist/parts/app-greeting.css +47 -47
  23. package/dist/parts/app-list-toolbar.css +81 -81
  24. package/dist/parts/app-page-header.css +54 -54
  25. package/dist/parts/app-severity-card.css +91 -91
  26. package/dist/parts/app-sidebar-dark.css +15 -15
  27. package/dist/parts/app-sortable-row.css +52 -52
  28. package/dist/parts/app-stat-card.css +68 -68
  29. package/dist/parts/app-table-actions.css +71 -71
  30. package/dist/parts/app-table-compact.css +54 -54
  31. package/dist/parts/app-top-progress.css +68 -68
  32. package/dist/parts/app-tree.css +104 -104
  33. package/dist/parts/app-upgrade-banner.css +90 -90
  34. package/dist/parts/app-version-banner.css +80 -80
  35. package/dist/parts/data-chart-line.css +167 -167
  36. package/dist/parts/forms-affix-input.css +75 -75
  37. package/dist/parts/forms-barcode-input.css +75 -75
  38. package/dist/parts/forms-chip-filter.css +91 -91
  39. package/dist/parts/forms-color-select.css +97 -89
  40. package/dist/parts/forms-decimal-input.css +51 -51
  41. package/dist/parts/forms-filter-counts.css +94 -94
  42. package/dist/parts/forms-language-select.css +89 -76
  43. package/dist/parts/forms-number-input.css +98 -95
  44. package/dist/parts/forms-password-requirements.css +55 -55
  45. package/dist/parts/forms-phone-input.css +85 -85
  46. package/dist/parts/forms-time-input.css +74 -74
  47. package/dist/parts/forms-toggle-field.css +69 -69
  48. package/dist/parts/media-art.css +21 -21
  49. package/dist/parts/media-attachment.css +160 -160
  50. package/dist/parts/media-browser-frame.css +73 -73
  51. package/dist/parts/media-card.css +83 -83
  52. package/dist/parts/media-chat-composer.css +90 -90
  53. package/dist/parts/media-doc-viewer.css +151 -151
  54. package/dist/parts/media-emoji-picker.css +88 -88
  55. package/dist/parts/media-entity-card.css +52 -52
  56. package/dist/parts/media-flip-card.css +78 -78
  57. package/dist/parts/media-image-zoom.css +68 -68
  58. package/dist/parts/media-lightbox.css +131 -131
  59. package/dist/parts/media-message-thread.css +136 -136
  60. package/dist/parts/media-message.css +160 -160
  61. package/dist/parts/media-row.css +78 -78
  62. package/dist/parts/media-stack-card.css +82 -82
  63. package/dist/parts/media-terminal-log.css +76 -76
  64. package/dist/parts/media-thumb.css +71 -71
  65. package/dist/parts/site-fact-list.css +25 -25
  66. package/dist/parts/site-link-arrow.css +34 -34
  67. package/dist/parts/site-marquee.css +34 -34
  68. package/dist/parts/site-next-teaser.css +75 -75
  69. package/dist/parts/site-price-card.css +91 -75
  70. package/dist/parts/site-product-mark.css +66 -66
  71. package/dist/parts/site-project-card.css +111 -111
  72. package/dist/parts/site-prose.css +124 -124
  73. package/dist/parts/site-stack-list.css +48 -48
  74. package/dist/parts/site-timeline.css +54 -54
  75. package/dist/showcase.css +410 -404
  76. package/package.json +69 -69
  77. package/snippets/accordion-accent.html +24 -24
  78. package/snippets/accordion.html +11 -11
  79. package/snippets/affix-input.html +30 -30
  80. package/snippets/alert-dialog.html +22 -22
  81. package/snippets/alert.html +5 -5
  82. package/snippets/alpha-tabs.html +37 -37
  83. package/snippets/aspect-ratio.html +15 -15
  84. package/snippets/attachment.html +43 -43
  85. package/snippets/avatar.html +6 -6
  86. package/snippets/back-link.html +5 -5
  87. package/snippets/badge.html +5 -5
  88. package/snippets/barcode-input.html +18 -18
  89. package/snippets/breadcrumb.html +6 -6
  90. package/snippets/browser-frame.html +18 -18
  91. package/snippets/busy-overlay.html +31 -31
  92. package/snippets/button-group.html +21 -21
  93. package/snippets/button.html +8 -8
  94. package/snippets/calendar.html +43 -43
  95. package/snippets/card.html +17 -17
  96. package/snippets/carousel.html +21 -21
  97. package/snippets/chart-line.html +46 -46
  98. package/snippets/chart.html +27 -27
  99. package/snippets/chat-composer.html +21 -21
  100. package/snippets/checkbox.html +5 -5
  101. package/snippets/checklist.html +23 -23
  102. package/snippets/chip-filter.html +14 -14
  103. package/snippets/code-window.html +20 -20
  104. package/snippets/collapsible.html +19 -19
  105. package/snippets/color-field.html +13 -13
  106. package/snippets/color-select.html +18 -18
  107. package/snippets/column-menu.html +38 -38
  108. package/snippets/combobox.html +19 -19
  109. package/snippets/command.html +24 -24
  110. package/snippets/confirm-dialog.html +32 -32
  111. package/snippets/context-menu.html +25 -25
  112. package/snippets/cookie-consent.html +70 -70
  113. package/snippets/copy-field.html +19 -19
  114. package/snippets/counter.html +2 -2
  115. package/snippets/data-table.html +151 -151
  116. package/snippets/date-picker.html +32 -32
  117. package/snippets/decimal-input.html +20 -20
  118. package/snippets/definition-list.html +20 -20
  119. package/snippets/demo-panel.html +18 -18
  120. package/snippets/doc-viewer.html +58 -58
  121. package/snippets/drawer.html +30 -30
  122. package/snippets/dropdown-menu.html +27 -27
  123. package/snippets/dropdown.html +9 -9
  124. package/snippets/dropzone.html +13 -13
  125. package/snippets/emoji-picker.html +51 -51
  126. package/snippets/empty-state.html +17 -17
  127. package/snippets/entity-card.html +26 -26
  128. package/snippets/expandable-table.html +26 -26
  129. package/snippets/fact-list.html +14 -14
  130. package/snippets/filter-counts.html +30 -30
  131. package/snippets/flip-card.html +22 -22
  132. package/snippets/form-field.html +6 -6
  133. package/snippets/greeting.html +22 -22
  134. package/snippets/heading.html +14 -14
  135. package/snippets/hover-card.html +18 -18
  136. package/snippets/image-zoom.html +30 -30
  137. package/snippets/input-group.html +10 -10
  138. package/snippets/input.html +5 -5
  139. package/snippets/item.html +26 -26
  140. package/snippets/kbd.html +13 -13
  141. package/snippets/label.html +9 -9
  142. package/snippets/language-select.html +26 -26
  143. package/snippets/launcher-card.html +14 -14
  144. package/snippets/lightbox.html +50 -50
  145. package/snippets/link-arrow.html +10 -10
  146. package/snippets/list-toolbar.html +33 -33
  147. package/snippets/marquee.html +15 -15
  148. package/snippets/media-card.html +28 -28
  149. package/snippets/media-row.html +21 -21
  150. package/snippets/media-thumb.html +12 -12
  151. package/snippets/menubar.html +30 -30
  152. package/snippets/message-thread.html +123 -123
  153. package/snippets/message.html +51 -51
  154. package/snippets/modal.html +15 -15
  155. package/snippets/native-select.html +15 -15
  156. package/snippets/navmenu.html +23 -23
  157. package/snippets/next-teaser.html +15 -15
  158. package/snippets/number-input.html +27 -27
  159. package/snippets/otp-input.html +9 -9
  160. package/snippets/page-header.html +24 -24
  161. package/snippets/pagination.html +6 -6
  162. package/snippets/password-input.html +24 -24
  163. package/snippets/password-requirements.html +30 -30
  164. package/snippets/phone-input.html +22 -22
  165. package/snippets/popover.html +15 -15
  166. package/snippets/price-card.html +34 -34
  167. package/snippets/product-mark.html +13 -13
  168. package/snippets/progress.html +4 -4
  169. package/snippets/project-card.html +23 -23
  170. package/snippets/prose.html +54 -54
  171. package/snippets/radio.html +17 -17
  172. package/snippets/recovery-codes.html +20 -20
  173. package/snippets/resizable.html +16 -16
  174. package/snippets/scroll-area.html +20 -20
  175. package/snippets/search.html +8 -8
  176. package/snippets/segmented.html +11 -11
  177. package/snippets/select.html +7 -7
  178. package/snippets/separator.html +15 -15
  179. package/snippets/severity-card.html +35 -35
  180. package/snippets/sheet.html +32 -32
  181. package/snippets/sidebar-docs.html +24 -24
  182. package/snippets/sidebar.html +55 -55
  183. package/snippets/site-footer.html +6 -6
  184. package/snippets/site-header.html +26 -26
  185. package/snippets/skeleton.html +4 -4
  186. package/snippets/slider.html +17 -17
  187. package/snippets/sortable-row.html +31 -31
  188. package/snippets/spinner.html +14 -14
  189. package/snippets/stack-card.html +17 -17
  190. package/snippets/stack-list.html +16 -16
  191. package/snippets/stat-card.html +24 -24
  192. package/snippets/stepper.html +13 -13
  193. package/snippets/switch.html +6 -6
  194. package/snippets/table-actions.html +39 -39
  195. package/snippets/table-compact.html +24 -24
  196. package/snippets/table.html +29 -29
  197. package/snippets/tabs.html +9 -9
  198. package/snippets/tag-input.html +60 -17
  199. package/snippets/terminal-log.html +23 -23
  200. package/snippets/textarea.html +3 -3
  201. package/snippets/theme-switch.html +6 -6
  202. package/snippets/time-input.html +26 -26
  203. package/snippets/timeline.html +28 -28
  204. package/snippets/toast-stack.html +10 -10
  205. package/snippets/toast.html +36 -36
  206. package/snippets/toc.html +13 -13
  207. package/snippets/toggle-field.html +20 -20
  208. package/snippets/toggle.html +22 -22
  209. package/snippets/tooltip.html +4 -4
  210. package/snippets/top-progress.html +12 -12
  211. package/snippets/tree.html +38 -38
  212. package/snippets/upgrade-banner.html +28 -28
  213. package/snippets/user.html +15 -15
  214. package/snippets/version-banner.html +15 -15
@@ -1,24 +1,24 @@
1
- <!-- OmniaUI component: table-compact - Table variant: compact striped table without outer cell borders, for inside cards and side panels. Needs @birdycom/omniaui CSS.
2
- File: packages/ui/snippets/table-compact.html | Map: card -> header -> compact wrapper -> table (head, striped body, total footer)
3
- Class API (modifiers are extra classes / attributes on the same element):
4
- .oc-table-compact: Wrapper around a table.oc-table (scrolls sideways when needed). Modifiers: --bordered (own frame), --plain (no stripes, no head background).
5
- th / td [data-numeric]: Right aligned tabular numbers (table component). [data-wrap]: the cell may wrap.
6
- tfoot row: Bold total row with a stronger line above it
7
- .oc-table-compact-muted: Muted secondary text in a cell
8
- Slots: thead, tbody rows, optional tfoot
9
- -->
10
- <div class="oc-card" style="max-width:28rem">
11
- <div class="oc-card-header"><h3 class="oc-card-title">Materials</h3></div>
12
- <div class="oc-table-compact">
13
- <table class="oc-table">
14
- <thead><tr><th>Item</th><th data-numeric>Qty</th><th data-numeric>Price</th></tr></thead>
15
- <tbody>
16
- <tr><td>Oak worktop <span class="oc-table-compact-muted">(3 m)</span></td><td data-numeric>1</td><td data-numeric>&euro; 640.00</td></tr>
17
- <tr><td>Cabinet 60 cm</td><td data-numeric>2</td><td data-numeric>&euro; 380.00</td></tr>
18
- <tr><td>Sink</td><td data-numeric>1</td><td data-numeric>&euro; 210.00</td></tr>
19
- <tr><td>Tap</td><td data-numeric>1</td><td data-numeric>&euro; 95.00</td></tr>
20
- </tbody>
21
- <tfoot><tr><td colspan="2">Total</td><td data-numeric>&euro; 1,325.00</td></tr></tfoot>
22
- </table>
23
- </div>
24
- </div>
1
+ <!-- OmniaUI component: table-compact - Table variant: compact striped table without outer cell borders, for inside cards and side panels. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/table-compact.html | Map: card -> header -> compact wrapper -> table (head, striped body, total footer)
3
+ Class API (modifiers are extra classes / attributes on the same element):
4
+ .oc-table-compact: Wrapper around a table.oc-table (scrolls sideways when needed). Modifiers: --bordered (own frame), --plain (no stripes, no head background).
5
+ th / td [data-numeric]: Right aligned tabular numbers (table component). [data-wrap]: the cell may wrap.
6
+ tfoot row: Bold total row with a stronger line above it
7
+ .oc-table-compact-muted: Muted secondary text in a cell
8
+ Slots: thead, tbody rows, optional tfoot
9
+ -->
10
+ <div class="oc-card" style="max-width:28rem">
11
+ <div class="oc-card-header"><h3 class="oc-card-title">Materials</h3></div>
12
+ <div class="oc-table-compact">
13
+ <table class="oc-table">
14
+ <thead><tr><th>Item</th><th data-numeric>Qty</th><th data-numeric>Price</th></tr></thead>
15
+ <tbody>
16
+ <tr><td>Oak worktop <span class="oc-table-compact-muted">(3 m)</span></td><td data-numeric>1</td><td data-numeric>&euro; 640.00</td></tr>
17
+ <tr><td>Cabinet 60 cm</td><td data-numeric>2</td><td data-numeric>&euro; 380.00</td></tr>
18
+ <tr><td>Sink</td><td data-numeric>1</td><td data-numeric>&euro; 210.00</td></tr>
19
+ <tr><td>Tap</td><td data-numeric>1</td><td data-numeric>&euro; 95.00</td></tr>
20
+ </tbody>
21
+ <tfoot><tr><td colspan="2">Total</td><td data-numeric>&euro; 1,325.00</td></tr></tfoot>
22
+ </table>
23
+ </div>
24
+ </div>
@@ -1,29 +1,29 @@
1
- <!-- OmniaUI component: table - Data table: sortable header, selection, row actions, empty state, density modifiers. Needs @birdycom/omniaui CSS.
2
- -->
3
- <div class="oc-table-wrap">
4
- <table class="oc-table oc-table--striped">
5
- <caption>Contacts</caption>
6
- <thead>
7
- <tr>
8
- <th style="width:2.5rem"><input class="oc-checkbox" type="checkbox" aria-label="Select all"></th>
9
- <th aria-sort="ascending"><a class="oc-table-sort" href="?sort=name">Name</a></th>
10
- <th><a class="oc-table-sort" href="?sort=email">E-mail</a></th>
11
- <th data-numeric>Balance</th>
12
- <th><span class="oc-visually-hidden">Actions</span></th>
13
- </tr>
14
- </thead>
15
- <tbody>
16
- <tr aria-selected="true">
17
- <td><input class="oc-checkbox" type="checkbox" checked aria-label="Select Ada"></td>
18
- <td>Ada Lovelace</td><td>ada@example.com</td><td data-numeric>1,250.00</td>
19
- <td class="oc-table-actions"><a class="oc-table-row-action" href="#">Edit</a><button class="oc-table-row-action oc-table-row-action--destructive" type="button">Delete</button></td>
20
- </tr>
21
- <tr>
22
- <td><input class="oc-checkbox" type="checkbox" aria-label="Select Alan"></td>
23
- <td>Alan Turing</td><td>alan@example.com</td><td data-numeric>0.00</td>
24
- <td class="oc-table-actions"><a class="oc-table-row-action" href="#">Edit</a><button class="oc-table-row-action oc-table-row-action--destructive" type="button">Delete</button></td>
25
- </tr>
26
- </tbody>
27
- </table>
28
- </div>
29
- <!-- Empty state: <tbody><tr class="oc-table-empty"><td colspan="5"><div class="oc-empty">...</div></td></tr></tbody> -->
1
+ <!-- OmniaUI component: table - Data table: sortable header, selection, row actions, empty state, density modifiers. Needs @birdycom/omniaui CSS.
2
+ -->
3
+ <div class="oc-table-wrap">
4
+ <table class="oc-table oc-table--striped">
5
+ <caption>Contacts</caption>
6
+ <thead>
7
+ <tr>
8
+ <th style="width:2.5rem"><input class="oc-checkbox" type="checkbox" aria-label="Select all"></th>
9
+ <th aria-sort="ascending"><a class="oc-table-sort" href="?sort=name">Name</a></th>
10
+ <th><a class="oc-table-sort" href="?sort=email">E-mail</a></th>
11
+ <th data-numeric>Balance</th>
12
+ <th><span class="oc-visually-hidden">Actions</span></th>
13
+ </tr>
14
+ </thead>
15
+ <tbody>
16
+ <tr aria-selected="true">
17
+ <td><input class="oc-checkbox" type="checkbox" checked aria-label="Select Ada"></td>
18
+ <td>Ada Lovelace</td><td>ada@example.com</td><td data-numeric>1,250.00</td>
19
+ <td class="oc-table-actions"><a class="oc-table-row-action" href="#">Edit</a><button class="oc-table-row-action oc-table-row-action--destructive" type="button">Delete</button></td>
20
+ </tr>
21
+ <tr>
22
+ <td><input class="oc-checkbox" type="checkbox" aria-label="Select Alan"></td>
23
+ <td>Alan Turing</td><td>alan@example.com</td><td data-numeric>0.00</td>
24
+ <td class="oc-table-actions"><a class="oc-table-row-action" href="#">Edit</a><button class="oc-table-row-action oc-table-row-action--destructive" type="button">Delete</button></td>
25
+ </tr>
26
+ </tbody>
27
+ </table>
28
+ </div>
29
+ <!-- Empty state: <tbody><tr class="oc-table-empty"><td colspan="5"><div class="oc-empty">...</div></td></tr></tbody> -->
@@ -1,9 +1,9 @@
1
- <!-- OmniaUI component: tabs — Tabs with radio inputs and :has() — no JavaScript. Needs @birdycom/omniaui CSS. -->
2
- <div class="oc-tabset">
3
- <div class="oc-tab-list" role="tablist">
4
- <label class="oc-tab-trigger"><input type="radio" name="oc-tabs-demo" checked> Account</label>
5
- <label class="oc-tab-trigger"><input type="radio" name="oc-tabs-demo"> Password</label>
6
- </div>
7
- <div class="oc-tab-panel">Make changes to your account here.</div>
8
- <div class="oc-tab-panel">Change your password here.</div>
9
- </div>
1
+ <!-- OmniaUI component: tabs — Tabs with radio inputs and :has() — no JavaScript. Needs @birdycom/omniaui CSS. -->
2
+ <div class="oc-tabset">
3
+ <div class="oc-tab-list" role="tablist">
4
+ <label class="oc-tab-trigger"><input type="radio" name="oc-tabs-demo" checked> Account</label>
5
+ <label class="oc-tab-trigger"><input type="radio" name="oc-tabs-demo"> Password</label>
6
+ </div>
7
+ <div class="oc-tab-panel">Make changes to your account here.</div>
8
+ <div class="oc-tab-panel">Change your password here.</div>
9
+ </div>
@@ -1,17 +1,60 @@
1
- <!-- OmniaUI component: tag-input - Chips with remove buttons and a free-text input with suggestions. Needs @birdycom/omniaui CSS.
2
- Class API (modifiers are extra classes / attributes on the same element):
3
- .oc-tag: Chip
4
- .oc-tag-remove: Remove button inside a chip
5
- .oc-tag-input: Bordered container holding chips and one <input>
6
- .oc-tag-suggestions: Row of suggestion buttons below the control
7
- -->
8
- <div class="oc-tag-input">
9
- <span class="oc-tag">design <button class="oc-tag-remove" type="button" aria-label="Remove design">&times;</button></span>
10
- <span class="oc-tag">internal <button class="oc-tag-remove" type="button" aria-label="Remove internal">&times;</button></span>
11
- <input type="text" placeholder="Add tag..." aria-label="Add tag" list="oc-tag-options">
12
- </div>
13
- <div class="oc-tag-suggestions">
14
- <button type="button">customer</button>
15
- <button type="button">supplier</button>
16
- <button type="button">partner</button>
17
- </div>
1
+ <!-- OmniaUI component: tag-input - Chips with remove buttons and a free-text input with suggestions. Needs @birdycom/omniaui CSS.
2
+ Class API (modifiers are extra classes / attributes on the same element):
3
+ .oc-tag: Chip
4
+ .oc-tag-remove: Remove button inside a chip
5
+ .oc-tag-input: Bordered container holding chips and one <input>
6
+ .oc-tag-suggestions: Row of suggestion buttons below the control
7
+ Optional script (below): Enter/comma adds, × removes, Backspace removes the last tag, suggestions add.
8
+ data-name="tags[]" on .oc-tag-input gives every tag a hidden field, so a form submits the tags.
9
+ -->
10
+ <div class="oc-tag-input" data-name="tags[]">
11
+ <span class="oc-tag">design <button class="oc-tag-remove" type="button" aria-label="Remove design">&times;</button></span>
12
+ <span class="oc-tag">internal <button class="oc-tag-remove" type="button" aria-label="Remove internal">&times;</button></span>
13
+ <input type="text" placeholder="Add tag..." aria-label="Add tag" list="oc-tag-options">
14
+ </div>
15
+ <div class="oc-tag-suggestions">
16
+ <button type="button">customer</button>
17
+ <button type="button">supplier</button>
18
+ <button type="button">partner</button>
19
+ </div>
20
+ <script>
21
+ // Tag input: Enter or comma adds a tag, × removes one, Backspace in the empty field removes the last one,
22
+ // a suggestion button adds its text. With data-name="tags[]" on .oc-tag-input every tag carries a hidden field.
23
+ (() => {
24
+ const field = (box) => box.querySelector("input:not([type=hidden])");
25
+ const tags = (box) => [...box.querySelectorAll(".oc-tag")];
26
+ const label = (tag) => tag.firstChild.textContent.trim();
27
+ const addTag = (box, text) => {
28
+ const value = text.trim().replace(/,+$/, "");
29
+ if (!value || tags(box).some((t) => label(t) === value)) return;
30
+ const tag = document.createElement("span");
31
+ tag.className = "oc-tag";
32
+ tag.append(`${value} `);
33
+ const remove = document.createElement("button");
34
+ remove.type = "button";
35
+ remove.className = "oc-tag-remove";
36
+ remove.setAttribute("aria-label", `Remove ${value}`);
37
+ remove.textContent = "×";
38
+ tag.append(remove);
39
+ if (box.dataset.name) {
40
+ const hidden = document.createElement("input");
41
+ hidden.type = "hidden"; hidden.name = box.dataset.name; hidden.value = value;
42
+ tag.append(hidden);
43
+ }
44
+ box.insertBefore(tag, field(box));
45
+ };
46
+ document.addEventListener("keydown", (e) => {
47
+ const box = e.target.closest?.(".oc-tag-input");
48
+ if (!box || e.target !== field(box)) return;
49
+ if (e.key === "Enter" || e.key === ",") { e.preventDefault(); addTag(box, e.target.value); e.target.value = ""; }
50
+ else if (e.key === "Backspace" && !e.target.value) tags(box).pop()?.remove();
51
+ });
52
+ document.addEventListener("click", (e) => {
53
+ const remove = e.target.closest?.(".oc-tag-remove");
54
+ if (remove) { const box = remove.closest(".oc-tag-input"); remove.closest(".oc-tag").remove(); field(box)?.focus(); return; }
55
+ const suggestion = e.target.closest?.(".oc-tag-suggestions button");
56
+ const box = suggestion?.closest(".oc-tag-suggestions").previousElementSibling;
57
+ if (box?.matches(".oc-tag-input")) addTag(box, suggestion.textContent);
58
+ });
59
+ })();
60
+ </script>
@@ -1,23 +1,23 @@
1
- <!-- OmniaUI component: terminal-log — Console window with traffic lights, level colors and a blinking cursor. Needs @birdycom/omniaui CSS.
2
- File: packages/ui/snippets/terminal-log.html | Map: frame -> bar (dots, title, status) -> body (role=log) -> lines -> prompt
3
- Class API: .oc-terminal-log > .oc-terminal-log__bar (3 × <i>, .oc-terminal-log__title, .oc-terminal-log__status) ·
4
- .oc-terminal-log__body (role="log", tabindex=0) > p.oc-terminal-log__line (time.oc-terminal-log__time optional,
5
- span.oc-terminal-log__level, span.oc-terminal-log__msg) · p.oc-terminal-log__prompt (last line, blinking cursor).
6
- Modifiers (on a line): --info, --success, --warn, --error, --debug. Height: --oc-terminal-log-height (default 18rem).
7
- Always dark (color-scheme: dark). Cursor blink and live pulse stop with reduced motion. Appending lines is up to your app.
8
- -->
9
- <div class="oc-terminal-log" style="max-inline-size:40rem">
10
- <div class="oc-terminal-log__bar">
11
- <i></i><i></i><i></i>
12
- <span class="oc-terminal-log__title">scan — example.com</span>
13
- <span class="oc-terminal-log__status">Live</span>
14
- </div>
15
- <div class="oc-terminal-log__body" role="log" aria-live="polite" aria-label="Scan output" tabindex="0">
16
- <p class="oc-terminal-log__line oc-terminal-log__line--info"><time class="oc-terminal-log__time">09:41:02</time><span class="oc-terminal-log__level">info</span><span class="oc-terminal-log__msg">Starting scan of https://example.com</span></p>
17
- <p class="oc-terminal-log__line oc-terminal-log__line--debug"><time class="oc-terminal-log__time">09:41:02</time><span class="oc-terminal-log__level">debug</span><span class="oc-terminal-log__msg">Resolved 3 hosts, 14 paths queued</span></p>
18
- <p class="oc-terminal-log__line oc-terminal-log__line--success"><time class="oc-terminal-log__time">09:41:04</time><span class="oc-terminal-log__level">ok</span><span class="oc-terminal-log__msg">TLS certificate valid for 82 days</span></p>
19
- <p class="oc-terminal-log__line oc-terminal-log__line--warn"><time class="oc-terminal-log__time">09:41:06</time><span class="oc-terminal-log__level">warn</span><span class="oc-terminal-log__msg">Missing header: Content-Security-Policy</span></p>
20
- <p class="oc-terminal-log__line oc-terminal-log__line--error"><time class="oc-terminal-log__time">09:41:07</time><span class="oc-terminal-log__level">error</span><span class="oc-terminal-log__msg">/admin answered 200 without login</span></p>
21
- <p class="oc-terminal-log__prompt">waiting for next host</p>
22
- </div>
23
- </div>
1
+ <!-- OmniaUI component: terminal-log — Console window with traffic lights, level colors and a blinking cursor. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/terminal-log.html | Map: frame -> bar (dots, title, status) -> body (role=log) -> lines -> prompt
3
+ Class API: .oc-terminal-log > .oc-terminal-log__bar (3 × <i>, .oc-terminal-log__title, .oc-terminal-log__status) ·
4
+ .oc-terminal-log__body (role="log", tabindex=0) > p.oc-terminal-log__line (time.oc-terminal-log__time optional,
5
+ span.oc-terminal-log__level, span.oc-terminal-log__msg) · p.oc-terminal-log__prompt (last line, blinking cursor).
6
+ Modifiers (on a line): --info, --success, --warn, --error, --debug. Height: --oc-terminal-log-height (default 18rem).
7
+ Always dark (color-scheme: dark). Cursor blink and live pulse stop with reduced motion. Appending lines is up to your app.
8
+ -->
9
+ <div class="oc-terminal-log" style="max-inline-size:40rem">
10
+ <div class="oc-terminal-log__bar">
11
+ <i></i><i></i><i></i>
12
+ <span class="oc-terminal-log__title">scan — example.com</span>
13
+ <span class="oc-terminal-log__status">Live</span>
14
+ </div>
15
+ <div class="oc-terminal-log__body" role="log" aria-live="polite" aria-label="Scan output" tabindex="0">
16
+ <p class="oc-terminal-log__line oc-terminal-log__line--info"><time class="oc-terminal-log__time">09:41:02</time><span class="oc-terminal-log__level">info</span><span class="oc-terminal-log__msg">Starting scan of https://example.com</span></p>
17
+ <p class="oc-terminal-log__line oc-terminal-log__line--debug"><time class="oc-terminal-log__time">09:41:02</time><span class="oc-terminal-log__level">debug</span><span class="oc-terminal-log__msg">Resolved 3 hosts, 14 paths queued</span></p>
18
+ <p class="oc-terminal-log__line oc-terminal-log__line--success"><time class="oc-terminal-log__time">09:41:04</time><span class="oc-terminal-log__level">ok</span><span class="oc-terminal-log__msg">TLS certificate valid for 82 days</span></p>
19
+ <p class="oc-terminal-log__line oc-terminal-log__line--warn"><time class="oc-terminal-log__time">09:41:06</time><span class="oc-terminal-log__level">warn</span><span class="oc-terminal-log__msg">Missing header: Content-Security-Policy</span></p>
20
+ <p class="oc-terminal-log__line oc-terminal-log__line--error"><time class="oc-terminal-log__time">09:41:07</time><span class="oc-terminal-log__level">error</span><span class="oc-terminal-log__msg">/admin answered 200 without login</span></p>
21
+ <p class="oc-terminal-log__prompt">waiting for next host</p>
22
+ </div>
23
+ </div>
@@ -1,3 +1,3 @@
1
- <!-- OmniaUI component: textarea - Multi-line input. Needs @birdycom/omniaui CSS.
2
- -->
3
- <textarea class="oc-input" rows="4" placeholder="Notes"></textarea>
1
+ <!-- OmniaUI component: textarea - Multi-line input. Needs @birdycom/omniaui CSS.
2
+ -->
3
+ <textarea class="oc-input" rows="4" placeholder="Notes"></textarea>
@@ -1,6 +1,6 @@
1
- <!-- OmniaUI component: theme-switch — System / light / dark switch — CSS only (color-scheme + :has()). Needs @birdycom/omniaui CSS. -->
2
- <fieldset class="oc-theme-switch" aria-label="Color theme">
3
- <label><input type="radio" name="oc-theme" value="system" checked> System</label>
4
- <label><input type="radio" name="oc-theme" value="light"> Light</label>
5
- <label><input type="radio" name="oc-theme" value="dark"> Dark</label>
6
- </fieldset>
1
+ <!-- OmniaUI component: theme-switch — System / light / dark switch — CSS only (color-scheme + :has()). Needs @birdycom/omniaui CSS. -->
2
+ <fieldset class="oc-theme-switch" aria-label="Color theme">
3
+ <label><input type="radio" name="oc-theme" value="system" checked> System</label>
4
+ <label><input type="radio" name="oc-theme" value="light"> Light</label>
5
+ <label><input type="radio" name="oc-theme" value="dark"> Dark</label>
6
+ </fieldset>
@@ -1,26 +1,26 @@
1
- <!-- OmniaUI component: time-input - 24h time field (HH:mm) with suggested slots and an optional slot list. Needs @birdycom/omniaui CSS.
2
- File: packages/ui/snippets/time-input.html | Map: field + datalist of slots -> slot list (radio chips)
3
- Class API (modifiers are extra classes / attributes on the same element):
4
- .oc-time-input: Add to .oc-input. Narrow centered field; pattern checks HH:mm (00:00 - 23:59).
5
- .oc-time-slots: Grid of slot chips (role="radiogroup"). Modifier: --sm.
6
- .oc-time-slot: Label with one radio input and the time text
7
- States: :user-invalid on a wrong time (red), checked slot (primary), disabled slot (struck through)
8
- Slots: <datalist> options = suggestions while typing; one .oc-time-slot per time in the list.
9
- -->
10
- <div class="oc-field">
11
- <label class="oc-field-label" for="oc-time-demo">Start time</label>
12
- <input class="oc-input oc-time-input" id="oc-time-demo" name="start" type="text" inputmode="numeric" placeholder="hh:mm" maxlength="5" pattern="([01][0-9]|2[0-3]):[0-5][0-9]" list="oc-time-demo-slots" value="08:30">
13
- <datalist id="oc-time-demo-slots">
14
- <option value="08:00"></option>
15
- <option value="08:30"></option>
16
- <option value="09:00"></option>
17
- <option value="09:30"></option>
18
- </datalist>
19
- </div>
20
- <div class="oc-time-slots" role="radiogroup" aria-label="Pick a time slot">
21
- <label class="oc-time-slot"><input type="radio" name="slot" value="09:00"> 09:00</label>
22
- <label class="oc-time-slot"><input type="radio" name="slot" value="09:30" checked> 09:30</label>
23
- <label class="oc-time-slot"><input type="radio" name="slot" value="10:00" disabled> 10:00</label>
24
- <label class="oc-time-slot"><input type="radio" name="slot" value="10:30"> 10:30</label>
25
- <label class="oc-time-slot"><input type="radio" name="slot" value="11:00"> 11:00</label>
26
- </div>
1
+ <!-- OmniaUI component: time-input - 24h time field (HH:mm) with suggested slots and an optional slot list. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/time-input.html | Map: field + datalist of slots -> slot list (radio chips)
3
+ Class API (modifiers are extra classes / attributes on the same element):
4
+ .oc-time-input: Add to .oc-input. Narrow centered field; pattern checks HH:mm (00:00 - 23:59).
5
+ .oc-time-slots: Grid of slot chips (role="radiogroup"). Modifier: --sm.
6
+ .oc-time-slot: Label with one radio input and the time text
7
+ States: :user-invalid on a wrong time (red), checked slot (primary), disabled slot (struck through)
8
+ Slots: <datalist> options = suggestions while typing; one .oc-time-slot per time in the list.
9
+ -->
10
+ <div class="oc-field">
11
+ <label class="oc-field-label" for="oc-time-demo">Start time</label>
12
+ <input class="oc-input oc-time-input" id="oc-time-demo" name="start" type="text" inputmode="numeric" placeholder="hh:mm" maxlength="5" pattern="([01][0-9]|2[0-3]):[0-5][0-9]" list="oc-time-demo-slots" value="08:30">
13
+ <datalist id="oc-time-demo-slots">
14
+ <option value="08:00"></option>
15
+ <option value="08:30"></option>
16
+ <option value="09:00"></option>
17
+ <option value="09:30"></option>
18
+ </datalist>
19
+ </div>
20
+ <div class="oc-time-slots" role="radiogroup" aria-label="Pick a time slot">
21
+ <label class="oc-time-slot"><input type="radio" name="slot" value="09:00"> 09:00</label>
22
+ <label class="oc-time-slot"><input type="radio" name="slot" value="09:30" checked> 09:30</label>
23
+ <label class="oc-time-slot"><input type="radio" name="slot" value="10:00" disabled> 10:00</label>
24
+ <label class="oc-time-slot"><input type="radio" name="slot" value="10:30"> 10:30</label>
25
+ <label class="oc-time-slot"><input type="radio" name="slot" value="11:00"> 11:00</label>
26
+ </div>
@@ -1,28 +1,28 @@
1
- <!-- OmniaUI component: timeline - Vertical timeline with dated entries and an accent dot per item. Needs @birdycom/omniaui CSS.
2
- File: packages/ui/snippets/timeline.html | Map: ol.oc-timeline -> li.oc-timeline__item (date, title, text)
3
- Class API (modifiers are extra classes / attributes on the same element):
4
- .oc-timeline: The list (ol or ul) with the vertical line. Modifiers: --lg (more space), --accent (accent line)
5
- .oc-timeline__item: One entry with a dot on the line. Modifier: --current (filled dot + ring)
6
- .oc-timeline__date: Year or date label (use <time> for real dates)
7
- .oc-timeline__title / .oc-timeline__text: Entry heading and description
8
- Simple form (no item classes): <li><strong>2001</strong><span>Text</span></li>
9
- Accent: --oc-accent-from, or an .oc-accent--* preset on the list.
10
- Slots: items (date, title, text)
11
- -->
12
- <ol class="oc-timeline">
13
- <li class="oc-timeline__item">
14
- <time class="oc-timeline__date" datetime="2012">2012</time>
15
- <h3 class="oc-timeline__title">Acme is founded</h3>
16
- <p class="oc-timeline__text">Two developers start building websites for local shops.</p>
17
- </li>
18
- <li class="oc-timeline__item">
19
- <time class="oc-timeline__date" datetime="2019">2019</time>
20
- <h3 class="oc-timeline__title">First own product</h3>
21
- <p class="oc-timeline__text">A small invoicing app grows into a modular business suite.</p>
22
- </li>
23
- <li class="oc-timeline__item oc-timeline__item--current">
24
- <span class="oc-timeline__date">Today</span>
25
- <h3 class="oc-timeline__title">Products and custom work</h3>
26
- <p class="oc-timeline__text">Web apps, desktop tools and plugins for clients across Europe.</p>
27
- </li>
28
- </ol>
1
+ <!-- OmniaUI component: timeline - Vertical timeline with dated entries and an accent dot per item. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/timeline.html | Map: ol.oc-timeline -> li.oc-timeline__item (date, title, text)
3
+ Class API (modifiers are extra classes / attributes on the same element):
4
+ .oc-timeline: The list (ol or ul) with the vertical line. Modifiers: --lg (more space), --accent (accent line)
5
+ .oc-timeline__item: One entry with a dot on the line. Modifier: --current (filled dot + ring)
6
+ .oc-timeline__date: Year or date label (use <time> for real dates)
7
+ .oc-timeline__title / .oc-timeline__text: Entry heading and description
8
+ Simple form (no item classes): <li><strong>2001</strong><span>Text</span></li>
9
+ Accent: --oc-accent-from, or an .oc-accent--* preset on the list.
10
+ Slots: items (date, title, text)
11
+ -->
12
+ <ol class="oc-timeline">
13
+ <li class="oc-timeline__item">
14
+ <time class="oc-timeline__date" datetime="2012">2012</time>
15
+ <h3 class="oc-timeline__title">Acme is founded</h3>
16
+ <p class="oc-timeline__text">Two developers start building websites for local shops.</p>
17
+ </li>
18
+ <li class="oc-timeline__item">
19
+ <time class="oc-timeline__date" datetime="2019">2019</time>
20
+ <h3 class="oc-timeline__title">First own product</h3>
21
+ <p class="oc-timeline__text">A small invoicing app grows into a modular business suite.</p>
22
+ </li>
23
+ <li class="oc-timeline__item oc-timeline__item--current">
24
+ <span class="oc-timeline__date">Today</span>
25
+ <h3 class="oc-timeline__title">Products and custom work</h3>
26
+ <p class="oc-timeline__text">Web apps, desktop tools and plugins for clients across Europe.</p>
27
+ </li>
28
+ </ol>
@@ -1,10 +1,10 @@
1
- <!-- OmniaUI component: toast-stack - Toast stack: overlapping toasts that expand on hover or focus. Needs @birdycom/omniaui CSS.
2
- Class API (modifiers are extra classes / attributes on the same element):
3
- .oc-toast-container.oc-toast-container--stack: stacking container (add --static for in-flow, --top to dock to the top)
4
- Newest .oc-toast LAST; the last four layers are visible (scale, offset and opacity by depth)
5
- -->
6
- <div class="oc-toast-container oc-toast-container--static oc-toast-container--stack" tabindex="0" aria-label="Notifications">
7
- <div class="oc-toast oc-toast--info" role="status"><span class="oc-toast-icon" aria-hidden="true">i</span><div class="oc-toast-body"><p class="oc-toast-title">Update available</p><p class="oc-toast-description">Version 0.9 is ready.</p></div></div>
8
- <div class="oc-toast oc-toast--warning" role="status"><span class="oc-toast-icon" aria-hidden="true">!</span><div class="oc-toast-body"><p class="oc-toast-title">Storage almost full</p><p class="oc-toast-description">92% of 5 GB used.</p></div></div>
9
- <div class="oc-toast oc-toast--success" role="status"><span class="oc-toast-icon" aria-hidden="true">&#10003;</span><div class="oc-toast-body"><p class="oc-toast-title">Invoice sent</p><p class="oc-toast-description">Hover to expand the stack.</p></div><button class="oc-toast-close" type="button" aria-label="Dismiss">&times;</button></div>
10
- </div>
1
+ <!-- OmniaUI component: toast-stack - Toast stack: overlapping toasts that expand on hover or focus. Needs @birdycom/omniaui CSS.
2
+ Class API (modifiers are extra classes / attributes on the same element):
3
+ .oc-toast-container.oc-toast-container--stack: stacking container (add --static for in-flow, --top to dock to the top)
4
+ Newest .oc-toast LAST; the last four layers are visible (scale, offset and opacity by depth)
5
+ -->
6
+ <div class="oc-toast-container oc-toast-container--static oc-toast-container--stack" tabindex="0" aria-label="Notifications">
7
+ <div class="oc-toast oc-toast--info" role="status"><span class="oc-toast-icon" aria-hidden="true">i</span><div class="oc-toast-body"><p class="oc-toast-title">Update available</p><p class="oc-toast-description">Version 0.9 is ready.</p></div></div>
8
+ <div class="oc-toast oc-toast--warning" role="status"><span class="oc-toast-icon" aria-hidden="true">!</span><div class="oc-toast-body"><p class="oc-toast-title">Storage almost full</p><p class="oc-toast-description">92% of 5 GB used.</p></div></div>
9
+ <div class="oc-toast oc-toast--success" role="status"><span class="oc-toast-icon" aria-hidden="true">&#10003;</span><div class="oc-toast-body"><p class="oc-toast-title">Invoice sent</p><p class="oc-toast-description">Hover to expand the stack.</p></div><button class="oc-toast-close" type="button" aria-label="Dismiss">&times;</button></div>
10
+ </div>
@@ -1,36 +1,36 @@
1
- <!-- OmniaUI component: toast - Transient notifications (success, error, warning, info) with optional CSS auto-dismiss. Needs @birdycom/omniaui CSS.
2
- Class API (modifiers are extra classes / attributes on the same element):
3
- .oc-toast-container: Fixed stack (bottom right). Modifiers: --top, --static (in-flow, for docs).
4
- .oc-toast: One notification (role="status"; use role="alert" for errors). Variants: --success, --error, --warning, --info. --auto = CSS auto-dismiss.
5
- .oc-toast-icon: Status glyph
6
- .oc-toast-body: Text column
7
- .oc-toast-title / -description: Heading and optional text
8
- .oc-toast-close: Dismiss button
9
- Slots: icon, title, description, close
10
- -->
11
- <div class="oc-toast-container oc-toast-container--static">
12
- <div class="oc-toast oc-toast--success" role="status">
13
- <span class="oc-toast-icon" aria-hidden="true">&#10003;</span>
14
- <div class="oc-toast-body">
15
- <p class="oc-toast-title">Contact saved</p>
16
- <p class="oc-toast-description">Your changes are stored.</p>
17
- </div>
18
- <button class="oc-toast-close" type="button" aria-label="Dismiss">&times;</button>
19
- </div>
20
- <div class="oc-toast oc-toast--error" role="alert">
21
- <span class="oc-toast-icon" aria-hidden="true">!</span>
22
- <div class="oc-toast-body">
23
- <p class="oc-toast-title">Could not send invoice</p>
24
- <p class="oc-toast-description">The e-mail address is invalid.</p>
25
- </div>
26
- <button class="oc-toast-close" type="button" aria-label="Dismiss">&times;</button>
27
- </div>
28
- <div class="oc-toast oc-toast--warning" role="status">
29
- <span class="oc-toast-icon" aria-hidden="true">!</span>
30
- <div class="oc-toast-body"><p class="oc-toast-title">License expires in 3 days</p></div>
31
- </div>
32
- <div class="oc-toast oc-toast--info" role="status">
33
- <span class="oc-toast-icon" aria-hidden="true">i</span>
34
- <div class="oc-toast-body"><p class="oc-toast-title">A new version is available</p></div>
35
- </div>
36
- </div>
1
+ <!-- OmniaUI component: toast - Transient notifications (success, error, warning, info) with optional CSS auto-dismiss. Needs @birdycom/omniaui CSS.
2
+ Class API (modifiers are extra classes / attributes on the same element):
3
+ .oc-toast-container: Fixed stack (bottom right). Modifiers: --top, --static (in-flow, for docs).
4
+ .oc-toast: One notification (role="status"; use role="alert" for errors). Variants: --success, --error, --warning, --info. --auto = CSS auto-dismiss.
5
+ .oc-toast-icon: Status glyph
6
+ .oc-toast-body: Text column
7
+ .oc-toast-title / -description: Heading and optional text
8
+ .oc-toast-close: Dismiss button
9
+ Slots: icon, title, description, close
10
+ -->
11
+ <div class="oc-toast-container oc-toast-container--static">
12
+ <div class="oc-toast oc-toast--success" role="status">
13
+ <span class="oc-toast-icon" aria-hidden="true">&#10003;</span>
14
+ <div class="oc-toast-body">
15
+ <p class="oc-toast-title">Contact saved</p>
16
+ <p class="oc-toast-description">Your changes are stored.</p>
17
+ </div>
18
+ <button class="oc-toast-close" type="button" aria-label="Dismiss">&times;</button>
19
+ </div>
20
+ <div class="oc-toast oc-toast--error" role="alert">
21
+ <span class="oc-toast-icon" aria-hidden="true">!</span>
22
+ <div class="oc-toast-body">
23
+ <p class="oc-toast-title">Could not send invoice</p>
24
+ <p class="oc-toast-description">The e-mail address is invalid.</p>
25
+ </div>
26
+ <button class="oc-toast-close" type="button" aria-label="Dismiss">&times;</button>
27
+ </div>
28
+ <div class="oc-toast oc-toast--warning" role="status">
29
+ <span class="oc-toast-icon" aria-hidden="true">!</span>
30
+ <div class="oc-toast-body"><p class="oc-toast-title">License expires in 3 days</p></div>
31
+ </div>
32
+ <div class="oc-toast oc-toast--info" role="status">
33
+ <span class="oc-toast-icon" aria-hidden="true">i</span>
34
+ <div class="oc-toast-body"><p class="oc-toast-title">A new version is available</p></div>
35
+ </div>
36
+ </div>
package/snippets/toc.html CHANGED
@@ -1,13 +1,13 @@
1
- <!-- OmniaUI component: toc - "On this page" list of heading links. Needs @birdycom/omniaui CSS.
2
- Class API: .oc-toc (root nav, sticky) · .oc-toc-title · .oc-toc-list (ul) · .oc-toc-link (a; aria-current / .is-active = current heading) · .oc-toc-item--sub (li, sub heading)
3
- -->
4
- <nav class="oc-toc" aria-label="On this page">
5
- <p class="oc-toc-title">On this page</p>
6
- <ul class="oc-toc-list">
7
- <li><a class="oc-toc-link" href="#overview">Overview</a></li>
8
- <li><a class="oc-toc-link" href="#install" aria-current="true">Install</a></li>
9
- <li class="oc-toc-item--sub"><a class="oc-toc-link" href="#npm">With npm</a></li>
10
- <li class="oc-toc-item--sub"><a class="oc-toc-link" href="#cdn">From a CDN</a></li>
11
- <li><a class="oc-toc-link" href="#usage">Usage</a></li>
12
- </ul>
13
- </nav>
1
+ <!-- OmniaUI component: toc - "On this page" list of heading links. Needs @birdycom/omniaui CSS.
2
+ Class API: .oc-toc (root nav, sticky) · .oc-toc-title · .oc-toc-list (ul) · .oc-toc-link (a; aria-current / .is-active = current heading) · .oc-toc-item--sub (li, sub heading)
3
+ -->
4
+ <nav class="oc-toc" aria-label="On this page">
5
+ <p class="oc-toc-title">On this page</p>
6
+ <ul class="oc-toc-list">
7
+ <li><a class="oc-toc-link" href="#overview">Overview</a></li>
8
+ <li><a class="oc-toc-link" href="#install" aria-current="true">Install</a></li>
9
+ <li class="oc-toc-item--sub"><a class="oc-toc-link" href="#npm">With npm</a></li>
10
+ <li class="oc-toc-item--sub"><a class="oc-toc-link" href="#cdn">From a CDN</a></li>
11
+ <li><a class="oc-toc-link" href="#usage">Usage</a></li>
12
+ </ul>
13
+ </nav>
@@ -1,20 +1,20 @@
1
- <!-- OmniaUI component: toggle-field - Settings row with a title, a description and a switch. Needs @birdycom/omniaui CSS.
2
- File: packages/ui/snippets/toggle-field.html | Map: row label -> text (label + description) -> switch (span.oc-switch + checkbox)
3
- Class API (modifiers are extra classes / attributes on the same element):
4
- .oc-toggle-field: Row; it is the <label>, so the whole row flips the switch. Modifiers: --card (bordered box), --reverse (switch first).
5
- .oc-toggle-field-text: Text block
6
- .oc-toggle-field-label: Title
7
- .oc-toggle-field-description: Muted help text (link it with aria-describedby)
8
- .oc-switch: Use a <span class="oc-switch"> here (a label inside a label is invalid HTML)
9
- States: checked (card border turns primary), disabled (row dimmed), :focus-visible (card outline)
10
- -->
11
- <label class="oc-toggle-field">
12
- <span class="oc-toggle-field-text">
13
- <span class="oc-toggle-field-label">Email notifications</span>
14
- <span class="oc-toggle-field-description" id="oc-toggle-field-demo-desc">Get a message when a receipt is processed.</span>
15
- </span>
16
- <span class="oc-switch">
17
- <input type="checkbox" role="switch" name="notify_email" checked aria-describedby="oc-toggle-field-demo-desc">
18
- <span class="oc-switch-track"></span>
19
- </span>
20
- </label>
1
+ <!-- OmniaUI component: toggle-field - Settings row with a title, a description and a switch. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/toggle-field.html | Map: row label -> text (label + description) -> switch (span.oc-switch + checkbox)
3
+ Class API (modifiers are extra classes / attributes on the same element):
4
+ .oc-toggle-field: Row; it is the <label>, so the whole row flips the switch. Modifiers: --card (bordered box), --reverse (switch first).
5
+ .oc-toggle-field-text: Text block
6
+ .oc-toggle-field-label: Title
7
+ .oc-toggle-field-description: Muted help text (link it with aria-describedby)
8
+ .oc-switch: Use a <span class="oc-switch"> here (a label inside a label is invalid HTML)
9
+ States: checked (card border turns primary), disabled (row dimmed), :focus-visible (card outline)
10
+ -->
11
+ <label class="oc-toggle-field">
12
+ <span class="oc-toggle-field-text">
13
+ <span class="oc-toggle-field-label">Email notifications</span>
14
+ <span class="oc-toggle-field-description" id="oc-toggle-field-demo-desc">Get a message when a receipt is processed.</span>
15
+ </span>
16
+ <span class="oc-switch">
17
+ <input type="checkbox" role="switch" name="notify_email" checked aria-describedby="oc-toggle-field-demo-desc">
18
+ <span class="oc-switch-track"></span>
19
+ </span>
20
+ </label>