@birdycom/omniaui 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +6559 -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 +404 -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,52 +1,52 @@
1
- /* File: packages/ui/src/parts/app-sortable-row.css | Map: grip cell -> grip button (dots) -> row states (dragging, drop before / after) -> reduced motion */
2
- /* Sortable row: a table row with a drag grip. This file is styling only.
3
- Use native HTML drag and drop (draggable="true" on the row) and set the state classes from your own code:
4
- .is-dragging on the row being moved, .is-drop-before / .is-drop-after on the row under the pointer. */
5
-
6
- /* Narrow first column that holds the grip. */
7
- .oc-sortable-row-grip-cell { inline-size: 2.25rem; padding-inline: 0.25rem; text-align: center; }
8
-
9
- /* The grip itself: a button so it can take keyboard focus (move with your own key handler). */
10
- .oc-sortable-row-grip {
11
- display: inline-grid;
12
- place-items: center;
13
- inline-size: 1.5rem;
14
- block-size: 1.75rem;
15
- padding: 0;
16
- color: var(--oc-muted-foreground);
17
- background: none;
18
- border: 0;
19
- border-radius: calc(var(--oc-radius) - 2px);
20
- cursor: grab;
21
- touch-action: none;
22
- }
23
- /* Six dots (2 columns x 3 rows) drawn with a repeating radial gradient in currentColor. */
24
- .oc-sortable-row-grip::before {
25
- content: "";
26
- inline-size: 0.5rem;
27
- block-size: 0.875rem;
28
- background: radial-gradient(circle, currentColor 1.1px, transparent 1.4px) 0 0 / 0.25rem 0.29rem;
29
- }
30
- .oc-sortable-row-grip:hover { color: var(--oc-foreground); background: var(--oc-accent); }
31
- .oc-sortable-row-grip:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 1px; }
32
- .oc-sortable-row-grip:active { cursor: grabbing; }
33
-
34
- /* Row being dragged: dimmed and dashed so the original place stays visible. */
35
- .oc-sortable-row { transition: opacity var(--oc-transition-fast), background var(--oc-transition-fast); }
36
- .oc-sortable-row.is-dragging { opacity: 0.45; background: var(--oc-surface); }
37
- .oc-sortable-row.is-dragging > td { border-style: dashed; }
38
-
39
- /* Drop indicator: a primary line on the top or bottom edge of the target row. */
40
- .oc-sortable-row.is-drop-before > td { box-shadow: inset 0 2px 0 var(--oc-primary); }
41
- .oc-sortable-row.is-drop-after > td { box-shadow: inset 0 -2px 0 var(--oc-primary); }
42
-
43
- /* Picked up with the keyboard (aria-pressed on the grip): highlight the whole row. */
44
- .oc-sortable-row:has(.oc-sortable-row-grip[aria-pressed="true"]) { background: oklch(from var(--oc-primary) l c h / 0.08); }
45
- .oc-sortable-row-grip[aria-pressed="true"] { color: var(--oc-primary); cursor: grabbing; }
46
-
47
- /* Locked row (cannot move): no grab cursor, faded grip. */
48
- .oc-sortable-row-grip:disabled { opacity: 0.35; cursor: not-allowed; }
49
-
50
- @media (prefers-reduced-motion: reduce) {
51
- .oc-sortable-row { transition: none; }
52
- }
1
+ /* File: packages/ui/src/parts/app-sortable-row.css | Map: grip cell -> grip button (dots) -> row states (dragging, drop before / after) -> reduced motion */
2
+ /* Sortable row: a table row with a drag grip. This file is styling only.
3
+ Use native HTML drag and drop (draggable="true" on the row) and set the state classes from your own code:
4
+ .is-dragging on the row being moved, .is-drop-before / .is-drop-after on the row under the pointer. */
5
+
6
+ /* Narrow first column that holds the grip. */
7
+ .oc-sortable-row-grip-cell { inline-size: 2.25rem; padding-inline: 0.25rem; text-align: center; }
8
+
9
+ /* The grip itself: a button so it can take keyboard focus (move with your own key handler). */
10
+ .oc-sortable-row-grip {
11
+ display: inline-grid;
12
+ place-items: center;
13
+ inline-size: 1.5rem;
14
+ block-size: 1.75rem;
15
+ padding: 0;
16
+ color: var(--oc-muted-foreground);
17
+ background: none;
18
+ border: 0;
19
+ border-radius: calc(var(--oc-radius) - 2px);
20
+ cursor: grab;
21
+ touch-action: none;
22
+ }
23
+ /* Six dots (2 columns x 3 rows) drawn with a repeating radial gradient in currentColor. */
24
+ .oc-sortable-row-grip::before {
25
+ content: "";
26
+ inline-size: 0.5rem;
27
+ block-size: 0.875rem;
28
+ background: radial-gradient(circle, currentColor 1.1px, transparent 1.4px) 0 0 / 0.25rem 0.29rem;
29
+ }
30
+ .oc-sortable-row-grip:hover { color: var(--oc-foreground); background: var(--oc-accent); }
31
+ .oc-sortable-row-grip:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 1px; }
32
+ .oc-sortable-row-grip:active { cursor: grabbing; }
33
+
34
+ /* Row being dragged: dimmed and dashed so the original place stays visible. */
35
+ .oc-sortable-row { transition: opacity var(--oc-transition-fast), background var(--oc-transition-fast); }
36
+ .oc-sortable-row.is-dragging { opacity: 0.45; background: var(--oc-surface); }
37
+ .oc-sortable-row.is-dragging > td { border-style: dashed; }
38
+
39
+ /* Drop indicator: a primary line on the top or bottom edge of the target row. */
40
+ .oc-sortable-row.is-drop-before > td { box-shadow: inset 0 2px 0 var(--oc-primary); }
41
+ .oc-sortable-row.is-drop-after > td { box-shadow: inset 0 -2px 0 var(--oc-primary); }
42
+
43
+ /* Picked up with the keyboard (aria-pressed on the grip): highlight the whole row. */
44
+ .oc-sortable-row:has(.oc-sortable-row-grip[aria-pressed="true"]) { background: oklch(from var(--oc-primary) l c h / 0.08); }
45
+ .oc-sortable-row-grip[aria-pressed="true"] { color: var(--oc-primary); cursor: grabbing; }
46
+
47
+ /* Locked row (cannot move): no grab cursor, faded grip. */
48
+ .oc-sortable-row-grip:disabled { opacity: 0.35; cursor: not-allowed; }
49
+
50
+ @media (prefers-reduced-motion: reduce) {
51
+ .oc-sortable-row { transition: none; }
52
+ }
@@ -1,68 +1,68 @@
1
- /* File: packages/ui/src/parts/app-stat-card.css | Map: grid -> card -> icon tile -> value + label -> trend -> tone modifiers -> clickable card -> reduced motion */
2
- /* Stat card: compact KPI tile with an icon tile, a big number and a small label.
3
- Tone modifiers recolor the icon tile: --accent (needs attention, red), --success, --warning.
4
- Use an <a> or <button> as the card to make it clickable (hover lift). */
5
-
6
- /* Responsive grid for a row of stat cards. */
7
- .oc-stat-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 0.75rem; }
8
-
9
- .oc-stat-card {
10
- --oc-stat-card-color: var(--oc-primary);
11
- display: flex;
12
- align-items: center;
13
- gap: 0.75rem;
14
- min-inline-size: 0;
15
- padding: 1rem;
16
- font: inherit;
17
- text-align: start;
18
- text-decoration: none;
19
- color: var(--oc-card-foreground);
20
- background: var(--oc-card-background);
21
- border: 1px solid var(--oc-card-border);
22
- border-radius: calc(var(--oc-radius) + 4px);
23
- transition: translate var(--oc-transition-fast), box-shadow var(--oc-transition-fast), border-color var(--oc-transition-fast);
24
- }
25
-
26
- /* Icon tile, tinted with the tone color. */
27
- .oc-stat-card-icon {
28
- display: grid;
29
- place-items: center;
30
- flex-shrink: 0;
31
- inline-size: 2.5rem;
32
- block-size: 2.5rem;
33
- color: var(--oc-stat-card-color);
34
- background: oklch(from var(--oc-stat-card-color) l c h / 0.12);
35
- border-radius: var(--oc-radius);
36
- }
37
- .oc-stat-card-icon svg { inline-size: 1.25rem; block-size: 1.25rem; }
38
-
39
- /* Text column: number on top, label below (ellipsis when too long). */
40
- .oc-stat-card-body { min-inline-size: 0; }
41
- .oc-stat-card-value { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--oc-foreground); }
42
- .oc-stat-card-label { display: block; margin-block-start: 0.25rem; overflow: hidden; font-size: 0.75rem; color: var(--oc-muted-foreground); text-overflow: ellipsis; white-space: nowrap; }
43
-
44
- /* Optional trend chip next to the value ("+12%"). */
45
- .oc-stat-card-trend { display: inline-block; margin-inline-start: 0.375rem; padding: 0.125rem 0.375rem; font-size: 0.6875rem; font-weight: 600; vertical-align: middle; border-radius: 999px; color: var(--oc-muted-foreground); background: var(--oc-muted); }
46
- .oc-stat-card-trend--up { color: var(--oc-success); background: oklch(from var(--oc-success) l c h / 0.12); }
47
- .oc-stat-card-trend--down { color: var(--oc-destructive); background: oklch(from var(--oc-destructive) l c h / 0.12); }
48
-
49
- /* Tones. --accent = "needs attention" (e.g. open orders). */
50
- .oc-stat-card--accent { --oc-stat-card-color: var(--oc-destructive); }
51
- .oc-stat-card--success { --oc-stat-card-color: var(--oc-success); }
52
- .oc-stat-card--warning { --oc-stat-card-color: var(--oc-warning); }
53
- /* Accent stripe on the start edge (optional, combine with a tone). */
54
- .oc-stat-card--stripe { border-inline-start: 3px solid var(--oc-stat-card-color); }
55
-
56
- /* Clickable card (a / button): lift on hover, ring on keyboard focus. */
57
- a.oc-stat-card,
58
- button.oc-stat-card { cursor: pointer; }
59
- a.oc-stat-card:hover,
60
- button.oc-stat-card:hover { translate: 0 -2px; border-color: oklch(from var(--oc-stat-card-color) l c h / 0.4); box-shadow: 0 6px 18px oklch(from var(--color-black-60) l c h / 0.1); }
61
- a.oc-stat-card:focus-visible,
62
- button.oc-stat-card:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 2px; }
63
-
64
- @media (prefers-reduced-motion: reduce) {
65
- .oc-stat-card { transition: none; }
66
- a.oc-stat-card:hover,
67
- button.oc-stat-card:hover { translate: none; }
68
- }
1
+ /* File: packages/ui/src/parts/app-stat-card.css | Map: grid -> card -> icon tile -> value + label -> trend -> tone modifiers -> clickable card -> reduced motion */
2
+ /* Stat card: compact KPI tile with an icon tile, a big number and a small label.
3
+ Tone modifiers recolor the icon tile: --accent (needs attention, red), --success, --warning.
4
+ Use an <a> or <button> as the card to make it clickable (hover lift). */
5
+
6
+ /* Responsive grid for a row of stat cards. */
7
+ .oc-stat-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 0.75rem; }
8
+
9
+ .oc-stat-card {
10
+ --oc-stat-card-color: var(--oc-primary);
11
+ display: flex;
12
+ align-items: center;
13
+ gap: 0.75rem;
14
+ min-inline-size: 0;
15
+ padding: 1rem;
16
+ font: inherit;
17
+ text-align: start;
18
+ text-decoration: none;
19
+ color: var(--oc-card-foreground);
20
+ background: var(--oc-card-background);
21
+ border: 1px solid var(--oc-card-border);
22
+ border-radius: calc(var(--oc-radius) + 4px);
23
+ transition: translate var(--oc-transition-fast), box-shadow var(--oc-transition-fast), border-color var(--oc-transition-fast);
24
+ }
25
+
26
+ /* Icon tile, tinted with the tone color. */
27
+ .oc-stat-card-icon {
28
+ display: grid;
29
+ place-items: center;
30
+ flex-shrink: 0;
31
+ inline-size: 2.5rem;
32
+ block-size: 2.5rem;
33
+ color: var(--oc-stat-card-color);
34
+ background: oklch(from var(--oc-stat-card-color) l c h / 0.12);
35
+ border-radius: var(--oc-radius);
36
+ }
37
+ .oc-stat-card-icon svg { inline-size: 1.25rem; block-size: 1.25rem; }
38
+
39
+ /* Text column: number on top, label below (ellipsis when too long). */
40
+ .oc-stat-card-body { min-inline-size: 0; }
41
+ .oc-stat-card-value { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--oc-foreground); }
42
+ .oc-stat-card-label { display: block; margin-block-start: 0.25rem; overflow: hidden; font-size: 0.75rem; color: var(--oc-muted-foreground); text-overflow: ellipsis; white-space: nowrap; }
43
+
44
+ /* Optional trend chip next to the value ("+12%"). */
45
+ .oc-stat-card-trend { display: inline-block; margin-inline-start: 0.375rem; padding: 0.125rem 0.375rem; font-size: 0.6875rem; font-weight: 600; vertical-align: middle; border-radius: 999px; color: var(--oc-muted-foreground); background: var(--oc-muted); }
46
+ .oc-stat-card-trend--up { color: var(--oc-success); background: oklch(from var(--oc-success) l c h / 0.12); }
47
+ .oc-stat-card-trend--down { color: var(--oc-destructive); background: oklch(from var(--oc-destructive) l c h / 0.12); }
48
+
49
+ /* Tones. --accent = "needs attention" (e.g. open orders). */
50
+ .oc-stat-card--accent { --oc-stat-card-color: var(--oc-destructive); }
51
+ .oc-stat-card--success { --oc-stat-card-color: var(--oc-success); }
52
+ .oc-stat-card--warning { --oc-stat-card-color: var(--oc-warning); }
53
+ /* Accent stripe on the start edge (optional, combine with a tone). */
54
+ .oc-stat-card--stripe { border-inline-start: 3px solid var(--oc-stat-card-color); }
55
+
56
+ /* Clickable card (a / button): lift on hover, ring on keyboard focus. */
57
+ a.oc-stat-card,
58
+ button.oc-stat-card { cursor: pointer; }
59
+ a.oc-stat-card:hover,
60
+ button.oc-stat-card:hover { translate: 0 -2px; border-color: oklch(from var(--oc-stat-card-color) l c h / 0.4); box-shadow: 0 6px 18px oklch(from var(--color-black-60) l c h / 0.1); }
61
+ a.oc-stat-card:focus-visible,
62
+ button.oc-stat-card:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 2px; }
63
+
64
+ @media (prefers-reduced-motion: reduce) {
65
+ .oc-stat-card { transition: none; }
66
+ a.oc-stat-card:hover,
67
+ button.oc-stat-card:hover { translate: none; }
68
+ }
@@ -1,71 +1,71 @@
1
- /* File: packages/ui/src/parts/app-table-actions.css | Map: icon actions -> tone modifiers -> overflow trigger -> menu tweaks -> reduced motion */
2
- /* Table actions: row actions as small icon buttons or as one overflow ("more") menu.
3
- Builds on the existing cell <td class="oc-table-actions"> from the table component.
4
- The overflow menu is a native popover (.oc-dropdown-menu[popover]); no JavaScript needed. */
5
-
6
- /* Icon mode: tighter gap between the square icon buttons. */
7
- .oc-table-actions--icons > * + * { margin-inline-start: 0.125rem; }
8
-
9
- /* One square icon action (link or button). Needs aria-label (and title for a tooltip). */
10
- .oc-table-actions-icon {
11
- display: inline-grid;
12
- place-items: center;
13
- inline-size: 1.75rem;
14
- block-size: 1.75rem;
15
- padding: 0;
16
- font: inherit;
17
- color: var(--oc-muted-foreground);
18
- background: none;
19
- border: 1px solid transparent;
20
- border-radius: calc(var(--oc-radius) - 2px);
21
- cursor: pointer;
22
- text-decoration: none;
23
- vertical-align: middle;
24
- transition: color var(--oc-transition-fast), background var(--oc-transition-fast), border-color var(--oc-transition-fast);
25
- }
26
- .oc-table-actions-icon svg { inline-size: 1rem; block-size: 1rem; }
27
- .oc-table-actions-icon:hover { color: var(--oc-foreground); background: var(--oc-accent); border-color: var(--oc-border); }
28
- .oc-table-actions-icon:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 1px; }
29
- .oc-table-actions-icon:disabled,
30
- .oc-table-actions-icon[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
31
-
32
- /* Tone modifiers: the hover tint shows what the action does. */
33
- .oc-table-actions-icon--primary:hover { color: var(--oc-primary); background: oklch(from var(--oc-primary) l c h / 0.1); }
34
- .oc-table-actions-icon--success:hover { color: var(--oc-success); background: oklch(from var(--oc-success) l c h / 0.1); }
35
- .oc-table-actions-icon--destructive { color: var(--oc-destructive); }
36
- .oc-table-actions-icon--destructive:hover { color: var(--oc-destructive); background: oklch(from var(--oc-destructive) l c h / 0.1); }
37
-
38
- /* Overflow trigger ("more" button, three dots drawn with CSS). Use popovertarget="<menu id>". */
39
- .oc-table-actions-more {
40
- display: inline-grid;
41
- place-items: center;
42
- inline-size: 1.75rem;
43
- block-size: 1.75rem;
44
- padding: 0;
45
- color: var(--oc-muted-foreground);
46
- background: none;
47
- border: 1px solid transparent;
48
- border-radius: calc(var(--oc-radius) - 2px);
49
- cursor: pointer;
50
- }
51
- /* Three dots: one dot plus two box-shadow copies, all in currentColor. */
52
- .oc-table-actions-more::before {
53
- content: "";
54
- inline-size: 0.2rem;
55
- block-size: 0.2rem;
56
- border-radius: 50%;
57
- background: currentColor;
58
- box-shadow: -0.35rem 0 0 currentColor, 0.35rem 0 0 currentColor;
59
- }
60
- .oc-table-actions-more:hover { color: var(--oc-foreground); background: var(--oc-accent); }
61
- .oc-table-actions-more:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 1px; }
62
- /* While its menu is open the trigger stays highlighted (:has on the cell, popover is a sibling). */
63
- .oc-table-actions:has(.oc-dropdown-menu:popover-open) .oc-table-actions-more { color: var(--oc-foreground); background: var(--oc-accent); border-color: var(--oc-border); }
64
-
65
- /* The menu opens to the left side of the trigger, because the actions column sits at the row end. */
66
- .oc-table-actions .oc-dropdown-menu[popover] { position-area: block-end span-inline-start; min-inline-size: 11rem; text-align: start; }
67
- .oc-table-actions .oc-dropdown-item svg { inline-size: 1rem; block-size: 1rem; flex-shrink: 0; }
68
-
69
- @media (prefers-reduced-motion: reduce) {
70
- .oc-table-actions-icon { transition: none; }
71
- }
1
+ /* File: packages/ui/src/parts/app-table-actions.css | Map: icon actions -> tone modifiers -> overflow trigger -> menu tweaks -> reduced motion */
2
+ /* Table actions: row actions as small icon buttons or as one overflow ("more") menu.
3
+ Builds on the existing cell <td class="oc-table-actions"> from the table component.
4
+ The overflow menu is a native popover (.oc-dropdown-menu[popover]); no JavaScript needed. */
5
+
6
+ /* Icon mode: tighter gap between the square icon buttons. */
7
+ .oc-table-actions--icons > * + * { margin-inline-start: 0.125rem; }
8
+
9
+ /* One square icon action (link or button). Needs aria-label (and title for a tooltip). */
10
+ .oc-table-actions-icon {
11
+ display: inline-grid;
12
+ place-items: center;
13
+ inline-size: 1.75rem;
14
+ block-size: 1.75rem;
15
+ padding: 0;
16
+ font: inherit;
17
+ color: var(--oc-muted-foreground);
18
+ background: none;
19
+ border: 1px solid transparent;
20
+ border-radius: calc(var(--oc-radius) - 2px);
21
+ cursor: pointer;
22
+ text-decoration: none;
23
+ vertical-align: middle;
24
+ transition: color var(--oc-transition-fast), background var(--oc-transition-fast), border-color var(--oc-transition-fast);
25
+ }
26
+ .oc-table-actions-icon svg { inline-size: 1rem; block-size: 1rem; }
27
+ .oc-table-actions-icon:hover { color: var(--oc-foreground); background: var(--oc-accent); border-color: var(--oc-border); }
28
+ .oc-table-actions-icon:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 1px; }
29
+ .oc-table-actions-icon:disabled,
30
+ .oc-table-actions-icon[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
31
+
32
+ /* Tone modifiers: the hover tint shows what the action does. */
33
+ .oc-table-actions-icon--primary:hover { color: var(--oc-primary); background: oklch(from var(--oc-primary) l c h / 0.1); }
34
+ .oc-table-actions-icon--success:hover { color: var(--oc-success); background: oklch(from var(--oc-success) l c h / 0.1); }
35
+ .oc-table-actions-icon--destructive { color: var(--oc-destructive); }
36
+ .oc-table-actions-icon--destructive:hover { color: var(--oc-destructive); background: oklch(from var(--oc-destructive) l c h / 0.1); }
37
+
38
+ /* Overflow trigger ("more" button, three dots drawn with CSS). Use popovertarget="<menu id>". */
39
+ .oc-table-actions-more {
40
+ display: inline-grid;
41
+ place-items: center;
42
+ inline-size: 1.75rem;
43
+ block-size: 1.75rem;
44
+ padding: 0;
45
+ color: var(--oc-muted-foreground);
46
+ background: none;
47
+ border: 1px solid transparent;
48
+ border-radius: calc(var(--oc-radius) - 2px);
49
+ cursor: pointer;
50
+ }
51
+ /* Three dots: one dot plus two box-shadow copies, all in currentColor. */
52
+ .oc-table-actions-more::before {
53
+ content: "";
54
+ inline-size: 0.2rem;
55
+ block-size: 0.2rem;
56
+ border-radius: 50%;
57
+ background: currentColor;
58
+ box-shadow: -0.35rem 0 0 currentColor, 0.35rem 0 0 currentColor;
59
+ }
60
+ .oc-table-actions-more:hover { color: var(--oc-foreground); background: var(--oc-accent); }
61
+ .oc-table-actions-more:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 1px; }
62
+ /* While its menu is open the trigger stays highlighted (:has on the cell, popover is a sibling). */
63
+ .oc-table-actions:has(.oc-dropdown-menu:popover-open) .oc-table-actions-more { color: var(--oc-foreground); background: var(--oc-accent); border-color: var(--oc-border); }
64
+
65
+ /* The menu opens to the left side of the trigger, because the actions column sits at the row end. */
66
+ .oc-table-actions .oc-dropdown-menu[popover] { position-area: block-end span-inline-start; min-inline-size: 11rem; text-align: start; }
67
+ .oc-table-actions .oc-dropdown-item svg { inline-size: 1rem; block-size: 1rem; flex-shrink: 0; }
68
+
69
+ @media (prefers-reduced-motion: reduce) {
70
+ .oc-table-actions-icon { transition: none; }
71
+ }
@@ -1,54 +1,54 @@
1
- /* File: packages/ui/src/parts/app-table-compact.css | Map: wrapper (scroll, inside a card) -> header cells -> body cells (compact + striped) -> footer total -> modifiers (bordered, plain) */
2
- /* Table compact: a small striped table for inside cards and side panels.
3
- Wrap a normal <table class="oc-table"> in <div class="oc-table-compact">. The wrapper removes the
4
- outer cell borders (the card gives the frame), shrinks padding and font, and stripes the rows.
5
- Numbers: data-numeric on th / td (right aligned, tabular figures; from the table component). */
6
-
7
- .oc-table-compact { inline-size: 100%; overflow-x: auto; }
8
- .oc-table-compact > .oc-table { font-size: 0.8125rem; border-collapse: collapse; }
9
-
10
- /* Cells: compact padding, only horizontal lines between rows. */
11
- .oc-table-compact > .oc-table :is(th, td) {
12
- padding: 0.3rem 0.625rem;
13
- border: 0;
14
- border-block-end: 1px solid var(--oc-border);
15
- white-space: nowrap;
16
- }
17
- .oc-table-compact > .oc-table :is(th, td):first-child { padding-inline-start: 0.75rem; }
18
- .oc-table-compact > .oc-table :is(th, td):last-child { padding-inline-end: 0.75rem; }
19
- /* Long text columns may wrap: add data-wrap to the cell. */
20
- .oc-table-compact > .oc-table :is(th, td)[data-wrap] { white-space: normal; }
21
-
22
- /* Header: small muted labels on a quiet background. */
23
- .oc-table-compact > .oc-table thead th {
24
- font-size: 0.6875rem;
25
- font-weight: 600;
26
- letter-spacing: 0.04em;
27
- text-transform: uppercase;
28
- color: var(--oc-muted-foreground);
29
- background: var(--oc-surface);
30
- border-block-end-width: 1px;
31
- }
32
-
33
- /* Stripes on every second body row; hover stays the table default. */
34
- .oc-table-compact > .oc-table tbody tr:nth-child(even) { background: var(--oc-surface); }
35
- .oc-table-compact > .oc-table tbody tr:last-child > td { border-block-end: 0; }
36
-
37
- /* Footer row (total): bold, with a stronger line above it. */
38
- .oc-table-compact > .oc-table tfoot :is(th, td) {
39
- font-weight: 600;
40
- color: var(--oc-foreground);
41
- background: none;
42
- border-block-start: 2px solid var(--oc-border);
43
- border-block-end: 0;
44
- }
45
-
46
- /* Muted secondary text inside a cell ("per unit", sub line). */
47
- .oc-table-compact-muted { color: var(--oc-muted-foreground); }
48
-
49
- /* Bordered: own rounded frame (when the table is not inside a card). */
50
- .oc-table-compact--bordered { border: 1px solid var(--oc-border); border-radius: var(--oc-radius); background: var(--oc-card); }
51
-
52
- /* Plain: no stripes, no header background (very dense lists). */
53
- .oc-table-compact--plain > .oc-table tbody tr:nth-child(even),
54
- .oc-table-compact--plain > .oc-table thead th { background: none; }
1
+ /* File: packages/ui/src/parts/app-table-compact.css | Map: wrapper (scroll, inside a card) -> header cells -> body cells (compact + striped) -> footer total -> modifiers (bordered, plain) */
2
+ /* Table compact: a small striped table for inside cards and side panels.
3
+ Wrap a normal <table class="oc-table"> in <div class="oc-table-compact">. The wrapper removes the
4
+ outer cell borders (the card gives the frame), shrinks padding and font, and stripes the rows.
5
+ Numbers: data-numeric on th / td (right aligned, tabular figures; from the table component). */
6
+
7
+ .oc-table-compact { inline-size: 100%; overflow-x: auto; }
8
+ .oc-table-compact > .oc-table { font-size: 0.8125rem; border-collapse: collapse; }
9
+
10
+ /* Cells: compact padding, only horizontal lines between rows. */
11
+ .oc-table-compact > .oc-table :is(th, td) {
12
+ padding: 0.3rem 0.625rem;
13
+ border: 0;
14
+ border-block-end: 1px solid var(--oc-border);
15
+ white-space: nowrap;
16
+ }
17
+ .oc-table-compact > .oc-table :is(th, td):first-child { padding-inline-start: 0.75rem; }
18
+ .oc-table-compact > .oc-table :is(th, td):last-child { padding-inline-end: 0.75rem; }
19
+ /* Long text columns may wrap: add data-wrap to the cell. */
20
+ .oc-table-compact > .oc-table :is(th, td)[data-wrap] { white-space: normal; }
21
+
22
+ /* Header: small muted labels on a quiet background. */
23
+ .oc-table-compact > .oc-table thead th {
24
+ font-size: 0.6875rem;
25
+ font-weight: 600;
26
+ letter-spacing: 0.04em;
27
+ text-transform: uppercase;
28
+ color: var(--oc-muted-foreground);
29
+ background: var(--oc-surface);
30
+ border-block-end-width: 1px;
31
+ }
32
+
33
+ /* Stripes on every second body row; hover stays the table default. */
34
+ .oc-table-compact > .oc-table tbody tr:nth-child(even) { background: var(--oc-surface); }
35
+ .oc-table-compact > .oc-table tbody tr:last-child > td { border-block-end: 0; }
36
+
37
+ /* Footer row (total): bold, with a stronger line above it. */
38
+ .oc-table-compact > .oc-table tfoot :is(th, td) {
39
+ font-weight: 600;
40
+ color: var(--oc-foreground);
41
+ background: none;
42
+ border-block-start: 2px solid var(--oc-border);
43
+ border-block-end: 0;
44
+ }
45
+
46
+ /* Muted secondary text inside a cell ("per unit", sub line). */
47
+ .oc-table-compact-muted { color: var(--oc-muted-foreground); }
48
+
49
+ /* Bordered: own rounded frame (when the table is not inside a card). */
50
+ .oc-table-compact--bordered { border: 1px solid var(--oc-border); border-radius: var(--oc-radius); background: var(--oc-card); }
51
+
52
+ /* Plain: no stripes, no header background (very dense lists). */
53
+ .oc-table-compact--plain > .oc-table tbody tr:nth-child(even),
54
+ .oc-table-compact--plain > .oc-table thead th { background: none; }
@@ -1,68 +1,68 @@
1
- /* File: packages/ui/src/parts/app-top-progress.css | Map: bar (fixed, native progress) -> determinate value -> indeterminate animation -> color + static modifiers -> done state -> reduced motion */
2
- /* Top progress: thin loading bar at the very top of the page, on a native <progress> element.
3
- <progress class="oc-top-progress"> without value = indeterminate (sliding glow);
4
- with value="40" max="100" = determinate. Hide it with the hidden attribute or .is-done (fades out). */
5
-
6
- .oc-top-progress {
7
- --oc-top-progress-color: var(--oc-primary);
8
- --oc-top-progress-height: 3px;
9
- position: fixed;
10
- inset-block-start: 0;
11
- inset-inline: 0;
12
- z-index: 1000;
13
- display: block;
14
- inline-size: 100%;
15
- block-size: var(--oc-top-progress-height);
16
- margin: 0;
17
- padding: 0;
18
- border: 0;
19
- appearance: none;
20
- color: var(--oc-top-progress-color);
21
- background: transparent;
22
- pointer-events: none;
23
- transition: opacity var(--oc-transition-normal);
24
- }
25
-
26
- /* Determinate value: the filled part, with a soft glow at its end. */
27
- .oc-top-progress::-webkit-progress-bar { background: transparent; }
28
- .oc-top-progress::-webkit-progress-value {
29
- background: var(--oc-top-progress-color);
30
- box-shadow: 0 0 8px var(--oc-top-progress-color);
31
- transition: inline-size var(--oc-transition-normal);
32
- }
33
- .oc-top-progress::-moz-progress-bar { background: var(--oc-top-progress-color); box-shadow: 0 0 8px var(--oc-top-progress-color); }
34
-
35
- /* Indeterminate (no value): a segment slides from start to end, again and again. */
36
- .oc-top-progress:indeterminate {
37
- background: linear-gradient(90deg, transparent, var(--oc-top-progress-color) 30% 70%, transparent) no-repeat;
38
- background-size: 35% 100%;
39
- animation: oc-top-progress-slide 1.2s ease-in-out infinite;
40
- }
41
- .oc-top-progress:indeterminate::-webkit-progress-bar { background: transparent; }
42
- .oc-top-progress:indeterminate::-moz-progress-bar { background: transparent; box-shadow: none; }
43
- @keyframes oc-top-progress-slide {
44
- from { background-position: -40% 0; }
45
- to { background-position: 140% 0; }
46
- }
47
-
48
- /* Color modifiers (theme tokens). */
49
- .oc-top-progress--success { --oc-top-progress-color: var(--oc-success); }
50
- .oc-top-progress--warning { --oc-top-progress-color: var(--oc-warning); }
51
- .oc-top-progress--danger { --oc-top-progress-color: var(--oc-destructive); }
52
- .oc-top-progress--brand { --oc-top-progress-color: var(--oc-brand-1); }
53
-
54
- /* Thicker bar. */
55
- .oc-top-progress--lg { --oc-top-progress-height: 4px; }
56
-
57
- /* Static: stays in the normal flow (inside a card, header or demo) instead of fixed to the window. */
58
- .oc-top-progress--static { position: relative; inset: auto; z-index: auto; background-color: var(--oc-surface-strong); }
59
-
60
- /* Done: fades out, then the app can remove it or set hidden. */
61
- .oc-top-progress.is-done { opacity: 0; }
62
- .oc-top-progress[hidden] { display: none; }
63
-
64
- @media (prefers-reduced-motion: reduce) {
65
- .oc-top-progress:indeterminate { animation-duration: 3s; }
66
- .oc-top-progress,
67
- .oc-top-progress::-webkit-progress-value { transition: none; }
68
- }
1
+ /* File: packages/ui/src/parts/app-top-progress.css | Map: bar (fixed, native progress) -> determinate value -> indeterminate animation -> color + static modifiers -> done state -> reduced motion */
2
+ /* Top progress: thin loading bar at the very top of the page, on a native <progress> element.
3
+ <progress class="oc-top-progress"> without value = indeterminate (sliding glow);
4
+ with value="40" max="100" = determinate. Hide it with the hidden attribute or .is-done (fades out). */
5
+
6
+ .oc-top-progress {
7
+ --oc-top-progress-color: var(--oc-primary);
8
+ --oc-top-progress-height: 3px;
9
+ position: fixed;
10
+ inset-block-start: 0;
11
+ inset-inline: 0;
12
+ z-index: 1000;
13
+ display: block;
14
+ inline-size: 100%;
15
+ block-size: var(--oc-top-progress-height);
16
+ margin: 0;
17
+ padding: 0;
18
+ border: 0;
19
+ appearance: none;
20
+ color: var(--oc-top-progress-color);
21
+ background: transparent;
22
+ pointer-events: none;
23
+ transition: opacity var(--oc-transition-normal);
24
+ }
25
+
26
+ /* Determinate value: the filled part, with a soft glow at its end. */
27
+ .oc-top-progress::-webkit-progress-bar { background: transparent; }
28
+ .oc-top-progress::-webkit-progress-value {
29
+ background: var(--oc-top-progress-color);
30
+ box-shadow: 0 0 8px var(--oc-top-progress-color);
31
+ transition: inline-size var(--oc-transition-normal);
32
+ }
33
+ .oc-top-progress::-moz-progress-bar { background: var(--oc-top-progress-color); box-shadow: 0 0 8px var(--oc-top-progress-color); }
34
+
35
+ /* Indeterminate (no value): a segment slides from start to end, again and again. */
36
+ .oc-top-progress:indeterminate {
37
+ background: linear-gradient(90deg, transparent, var(--oc-top-progress-color) 30% 70%, transparent) no-repeat;
38
+ background-size: 35% 100%;
39
+ animation: oc-top-progress-slide 1.2s ease-in-out infinite;
40
+ }
41
+ .oc-top-progress:indeterminate::-webkit-progress-bar { background: transparent; }
42
+ .oc-top-progress:indeterminate::-moz-progress-bar { background: transparent; box-shadow: none; }
43
+ @keyframes oc-top-progress-slide {
44
+ from { background-position: -40% 0; }
45
+ to { background-position: 140% 0; }
46
+ }
47
+
48
+ /* Color modifiers (theme tokens). */
49
+ .oc-top-progress--success { --oc-top-progress-color: var(--oc-success); }
50
+ .oc-top-progress--warning { --oc-top-progress-color: var(--oc-warning); }
51
+ .oc-top-progress--danger { --oc-top-progress-color: var(--oc-destructive); }
52
+ .oc-top-progress--brand { --oc-top-progress-color: var(--oc-brand-1); }
53
+
54
+ /* Thicker bar. */
55
+ .oc-top-progress--lg { --oc-top-progress-height: 4px; }
56
+
57
+ /* Static: stays in the normal flow (inside a card, header or demo) instead of fixed to the window. */
58
+ .oc-top-progress--static { position: relative; inset: auto; z-index: auto; background-color: var(--oc-surface-strong); }
59
+
60
+ /* Done: fades out, then the app can remove it or set hidden. */
61
+ .oc-top-progress.is-done { opacity: 0; }
62
+ .oc-top-progress[hidden] { display: none; }
63
+
64
+ @media (prefers-reduced-motion: reduce) {
65
+ .oc-top-progress:indeterminate { animation-duration: 3s; }
66
+ .oc-top-progress,
67
+ .oc-top-progress::-webkit-progress-value { transition: none; }
68
+ }