@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,167 +1,167 @@
1
- /* File: packages/ui/src/parts/data-chart-line.css | Map: figure (head, legend) -> plot (y axis, gridlines, svg) -> series colors
2
- -> line + area paths -> hover columns (cursor line, dots, tooltip) -> x axis -> modifiers (--area, --dots, --spark) -> reduced motion
3
- Line and area chart: an inline SVG in a 0..100 viewBox, stretched to the plot (preserveAspectRatio="none", strokes keep their
4
- width with vector-effect). Data points are HTML columns laid over the plot at --x / --n, each with one dot per series at --y
5
- (percent of the plot height) and a tooltip that opens on :hover and :focus-visible. Colors are the --oc-chart-1..5 tokens. */
6
-
7
- .oc-chart-line {
8
- --oc-chart-line-height: 12rem;
9
- display: grid;
10
- gap: 0.75rem;
11
- inline-size: 100%;
12
- min-inline-size: 0;
13
- margin: 0;
14
- color: var(--oc-foreground);
15
- font-size: 0.75rem;
16
- }
17
- .oc-chart-line__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
18
- .oc-chart-line__title { margin: 0; font-size: 0.95rem; font-weight: 650; }
19
- .oc-chart-line__sub { margin: 0; color: var(--oc-muted-foreground); font-size: 0.8rem; }
20
- .oc-chart-line__value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
21
-
22
- /* ---- Body: y axis | plot, x axis below the plot ---- */
23
- .oc-chart-line__body { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.5rem; row-gap: 0.4rem; }
24
- .oc-chart-line__y {
25
- display: flex;
26
- flex-direction: column;
27
- justify-content: space-between;
28
- block-size: var(--oc-chart-line-height);
29
- margin: 0;
30
- padding: 0;
31
- list-style: none;
32
- color: var(--oc-chart-axis, var(--oc-muted-foreground));
33
- font-variant-numeric: tabular-nums;
34
- line-height: 1;
35
- text-align: end;
36
- }
37
- /* Zero-height labels: space-between puts their centres exactly on the gridlines */
38
- .oc-chart-line__y > li { display: flex; align-items: center; justify-content: flex-end; block-size: 0; }
39
-
40
- .oc-chart-line__plot {
41
- --oc-chart-line-rows: 4;
42
- position: relative;
43
- block-size: var(--oc-chart-line-height);
44
- border-block-end: 1px solid var(--oc-chart-axis, var(--oc-border));
45
- background: repeating-linear-gradient(to top, transparent 0 calc(100% / var(--oc-chart-line-rows) - 1px), var(--oc-chart-grid, var(--oc-border)) calc(100% / var(--oc-chart-line-rows) - 1px) calc(100% / var(--oc-chart-line-rows)));
46
- }
47
- .oc-chart-line__svg { position: absolute; inset: 0; display: block; inline-size: 100%; block-size: 100%; overflow: visible; }
48
-
49
- /* ---- Series: one g per series, colored by position ---- */
50
- .oc-chart-line__series { --oc-chart-color: var(--oc-chart-1); }
51
- .oc-chart-line__series:nth-of-type(2) { --oc-chart-color: var(--oc-chart-2); }
52
- .oc-chart-line__series:nth-of-type(3) { --oc-chart-color: var(--oc-chart-3); }
53
- .oc-chart-line__series:nth-of-type(4) { --oc-chart-color: var(--oc-chart-4); }
54
- .oc-chart-line__series:nth-of-type(5) { --oc-chart-color: var(--oc-chart-5); }
55
- .oc-chart-line__path {
56
- fill: none;
57
- stroke: var(--oc-chart-color);
58
- stroke-width: 2.25;
59
- stroke-linecap: round;
60
- stroke-linejoin: round;
61
- vector-effect: non-scaling-stroke;
62
- }
63
- .oc-chart-line__area { display: none; fill: var(--oc-chart-color); fill-opacity: 0.16; stroke: none; }
64
- .oc-chart-line--area .oc-chart-line__area { display: inline; }
65
- .oc-chart-line__path--dashed { stroke-dasharray: 5 4; }
66
-
67
- /* ---- Hover columns: one per x value; the column is the hit area, the dots and tip live inside ---- */
68
- .oc-chart-line__cols { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
69
- .oc-chart-line__col {
70
- position: absolute;
71
- inset-block: 0;
72
- inset-inline-start: calc(var(--x) / (var(--n) - 1) * 100%);
73
- inline-size: calc(100% / (var(--n) - 1));
74
- translate: -50% 0;
75
- outline: 0;
76
- cursor: crosshair;
77
- }
78
- .oc-chart-line__col::before {
79
- content: "";
80
- position: absolute;
81
- inset-block: 0;
82
- inset-inline-start: 50%;
83
- border-inline-start: 1px dashed var(--oc-chart-axis, var(--oc-muted-foreground));
84
- opacity: 0;
85
- }
86
- .oc-chart-line__dot {
87
- --oc-chart-color: var(--oc-chart-1);
88
- position: absolute;
89
- inset-block-end: var(--y);
90
- inset-inline-start: 50%;
91
- inline-size: 0.6rem;
92
- block-size: 0.6rem;
93
- border: 2px solid var(--oc-card);
94
- border-radius: 50%;
95
- background: var(--oc-chart-color);
96
- translate: -50% 50%;
97
- scale: 0;
98
- transition: scale var(--oc-transition-fast);
99
- }
100
- .oc-chart-line__dot:nth-of-type(2) { --oc-chart-color: var(--oc-chart-2); }
101
- .oc-chart-line__dot:nth-of-type(3) { --oc-chart-color: var(--oc-chart-3); }
102
- .oc-chart-line__dot:nth-of-type(4) { --oc-chart-color: var(--oc-chart-4); }
103
- .oc-chart-line__dot:nth-of-type(5) { --oc-chart-color: var(--oc-chart-5); }
104
-
105
- /* Tooltip: slides from left-aligned (first point) to right-aligned (last point), so it never leaves the plot */
106
- .oc-chart-line__tip {
107
- position: absolute;
108
- z-index: 2;
109
- inset-block-start: 0.25rem;
110
- inset-inline-start: 50%;
111
- display: grid;
112
- gap: 0.3rem;
113
- min-inline-size: 8.5rem;
114
- padding: 0.45rem 0.6rem;
115
- border: 1px solid var(--oc-border);
116
- border-radius: var(--oc-radius);
117
- background: var(--oc-popover, var(--oc-card));
118
- box-shadow: 0 8px 24px oklch(from var(--color-black-60) l c h / 0.14);
119
- color: var(--oc-popover-foreground, var(--oc-foreground));
120
- white-space: nowrap;
121
- pointer-events: none;
122
- translate: calc(var(--x) / (var(--n) - 1) * -100%) 0;
123
- opacity: 0;
124
- visibility: hidden;
125
- transition: opacity var(--oc-transition-fast), visibility var(--oc-transition-fast);
126
- }
127
- .oc-chart-line__tip > strong { font-weight: 650; }
128
- .oc-chart-line__row { display: flex; align-items: center; gap: 0.45rem; color: var(--oc-muted-foreground); }
129
- .oc-chart-line__row::before { content: ""; inline-size: 0.6rem; block-size: 0.6rem; flex: none; border-radius: 2px; background: var(--oc-chart-color, var(--oc-chart-1)); }
130
- .oc-chart-line__row > b { margin-inline-start: auto; padding-inline-start: 1rem; color: var(--oc-foreground); font-weight: 600; font-variant-numeric: tabular-nums; }
131
- .oc-chart-line__row:nth-of-type(1) { --oc-chart-color: var(--oc-chart-1); }
132
- .oc-chart-line__row:nth-of-type(2) { --oc-chart-color: var(--oc-chart-2); }
133
- .oc-chart-line__row:nth-of-type(3) { --oc-chart-color: var(--oc-chart-3); }
134
- .oc-chart-line__row:nth-of-type(4) { --oc-chart-color: var(--oc-chart-4); }
135
- .oc-chart-line__row:nth-of-type(5) { --oc-chart-color: var(--oc-chart-5); }
136
-
137
- .oc-chart-line__col:is(:hover, :focus-visible)::before { opacity: 1; }
138
- .oc-chart-line__col:is(:hover, :focus-visible) > .oc-chart-line__dot { scale: 1; }
139
- .oc-chart-line__col:is(:hover, :focus-visible) > .oc-chart-line__tip { opacity: 1; visibility: visible; }
140
- .oc-chart-line__col:focus-visible::before { border-inline-start: 2px solid var(--oc-ring); }
141
-
142
- /* ---- X axis ---- */
143
- .oc-chart-line__x {
144
- grid-column: 2;
145
- display: flex;
146
- justify-content: space-between;
147
- margin: 0;
148
- padding: 0;
149
- list-style: none;
150
- color: var(--oc-chart-axis, var(--oc-muted-foreground));
151
- }
152
- .oc-chart-line__x > li { flex: 0 0 0; display: flex; justify-content: center; white-space: nowrap; }
153
- .oc-chart-line__x > li:first-child { justify-content: flex-start; }
154
- .oc-chart-line__x > li:last-child { justify-content: flex-end; }
155
-
156
- /* ---- Modifiers ---- */
157
- .oc-chart-line--dots .oc-chart-line__dot { scale: 0.8; }
158
- .oc-chart-line--dots .oc-chart-line__col:is(:hover, :focus-visible) > .oc-chart-line__dot { scale: 1.15; }
159
- /* Sparkline: no axes, no grid; for stat cards and table cells */
160
- .oc-chart-line--spark { --oc-chart-line-height: 3rem; gap: 0.25rem; }
161
- .oc-chart-line--spark .oc-chart-line__body { grid-template-columns: minmax(0, 1fr); }
162
- .oc-chart-line--spark .oc-chart-line__plot { border: 0; background: none; }
163
- .oc-chart-line--spark .oc-chart-line__tip { inset-block-start: auto; inset-block-end: calc(100% + 0.4rem); min-inline-size: 0; }
164
-
165
- @media (prefers-reduced-motion: reduce) {
166
- .oc-chart-line__dot, .oc-chart-line__tip { transition: none; }
167
- }
1
+ /* File: packages/ui/src/parts/data-chart-line.css | Map: figure (head, legend) -> plot (y axis, gridlines, svg) -> series colors
2
+ -> line + area paths -> hover columns (cursor line, dots, tooltip) -> x axis -> modifiers (--area, --dots, --spark) -> reduced motion
3
+ Line and area chart: an inline SVG in a 0..100 viewBox, stretched to the plot (preserveAspectRatio="none", strokes keep their
4
+ width with vector-effect). Data points are HTML columns laid over the plot at --x / --n, each with one dot per series at --y
5
+ (percent of the plot height) and a tooltip that opens on :hover and :focus-visible. Colors are the --oc-chart-1..5 tokens. */
6
+
7
+ .oc-chart-line {
8
+ --oc-chart-line-height: 12rem;
9
+ display: grid;
10
+ gap: 0.75rem;
11
+ inline-size: 100%;
12
+ min-inline-size: 0;
13
+ margin: 0;
14
+ color: var(--oc-foreground);
15
+ font-size: 0.75rem;
16
+ }
17
+ .oc-chart-line__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
18
+ .oc-chart-line__title { margin: 0; font-size: 0.95rem; font-weight: 650; }
19
+ .oc-chart-line__sub { margin: 0; color: var(--oc-muted-foreground); font-size: 0.8rem; }
20
+ .oc-chart-line__value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
21
+
22
+ /* ---- Body: y axis | plot, x axis below the plot ---- */
23
+ .oc-chart-line__body { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.5rem; row-gap: 0.4rem; }
24
+ .oc-chart-line__y {
25
+ display: flex;
26
+ flex-direction: column;
27
+ justify-content: space-between;
28
+ block-size: var(--oc-chart-line-height);
29
+ margin: 0;
30
+ padding: 0;
31
+ list-style: none;
32
+ color: var(--oc-chart-axis, var(--oc-muted-foreground));
33
+ font-variant-numeric: tabular-nums;
34
+ line-height: 1;
35
+ text-align: end;
36
+ }
37
+ /* Zero-height labels: space-between puts their centres exactly on the gridlines */
38
+ .oc-chart-line__y > li { display: flex; align-items: center; justify-content: flex-end; block-size: 0; }
39
+
40
+ .oc-chart-line__plot {
41
+ --oc-chart-line-rows: 4;
42
+ position: relative;
43
+ block-size: var(--oc-chart-line-height);
44
+ border-block-end: 1px solid var(--oc-chart-axis, var(--oc-border));
45
+ background: repeating-linear-gradient(to top, transparent 0 calc(100% / var(--oc-chart-line-rows) - 1px), var(--oc-chart-grid, var(--oc-border)) calc(100% / var(--oc-chart-line-rows) - 1px) calc(100% / var(--oc-chart-line-rows)));
46
+ }
47
+ .oc-chart-line__svg { position: absolute; inset: 0; display: block; inline-size: 100%; block-size: 100%; overflow: visible; }
48
+
49
+ /* ---- Series: one g per series, colored by position ---- */
50
+ .oc-chart-line__series { --oc-chart-color: var(--oc-chart-1); }
51
+ .oc-chart-line__series:nth-of-type(2) { --oc-chart-color: var(--oc-chart-2); }
52
+ .oc-chart-line__series:nth-of-type(3) { --oc-chart-color: var(--oc-chart-3); }
53
+ .oc-chart-line__series:nth-of-type(4) { --oc-chart-color: var(--oc-chart-4); }
54
+ .oc-chart-line__series:nth-of-type(5) { --oc-chart-color: var(--oc-chart-5); }
55
+ .oc-chart-line__path {
56
+ fill: none;
57
+ stroke: var(--oc-chart-color);
58
+ stroke-width: 2.25;
59
+ stroke-linecap: round;
60
+ stroke-linejoin: round;
61
+ vector-effect: non-scaling-stroke;
62
+ }
63
+ .oc-chart-line__area { display: none; fill: var(--oc-chart-color); fill-opacity: 0.16; stroke: none; }
64
+ .oc-chart-line--area .oc-chart-line__area { display: inline; }
65
+ .oc-chart-line__path--dashed { stroke-dasharray: 5 4; }
66
+
67
+ /* ---- Hover columns: one per x value; the column is the hit area, the dots and tip live inside ---- */
68
+ .oc-chart-line__cols { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
69
+ .oc-chart-line__col {
70
+ position: absolute;
71
+ inset-block: 0;
72
+ inset-inline-start: calc(var(--x) / (var(--n) - 1) * 100%);
73
+ inline-size: calc(100% / (var(--n) - 1));
74
+ translate: -50% 0;
75
+ outline: 0;
76
+ cursor: crosshair;
77
+ }
78
+ .oc-chart-line__col::before {
79
+ content: "";
80
+ position: absolute;
81
+ inset-block: 0;
82
+ inset-inline-start: 50%;
83
+ border-inline-start: 1px dashed var(--oc-chart-axis, var(--oc-muted-foreground));
84
+ opacity: 0;
85
+ }
86
+ .oc-chart-line__dot {
87
+ --oc-chart-color: var(--oc-chart-1);
88
+ position: absolute;
89
+ inset-block-end: var(--y);
90
+ inset-inline-start: 50%;
91
+ inline-size: 0.6rem;
92
+ block-size: 0.6rem;
93
+ border: 2px solid var(--oc-card);
94
+ border-radius: 50%;
95
+ background: var(--oc-chart-color);
96
+ translate: -50% 50%;
97
+ scale: 0;
98
+ transition: scale var(--oc-transition-fast);
99
+ }
100
+ .oc-chart-line__dot:nth-of-type(2) { --oc-chart-color: var(--oc-chart-2); }
101
+ .oc-chart-line__dot:nth-of-type(3) { --oc-chart-color: var(--oc-chart-3); }
102
+ .oc-chart-line__dot:nth-of-type(4) { --oc-chart-color: var(--oc-chart-4); }
103
+ .oc-chart-line__dot:nth-of-type(5) { --oc-chart-color: var(--oc-chart-5); }
104
+
105
+ /* Tooltip: slides from left-aligned (first point) to right-aligned (last point), so it never leaves the plot */
106
+ .oc-chart-line__tip {
107
+ position: absolute;
108
+ z-index: 2;
109
+ inset-block-start: 0.25rem;
110
+ inset-inline-start: 50%;
111
+ display: grid;
112
+ gap: 0.3rem;
113
+ min-inline-size: 8.5rem;
114
+ padding: 0.45rem 0.6rem;
115
+ border: 1px solid var(--oc-border);
116
+ border-radius: var(--oc-radius);
117
+ background: var(--oc-popover, var(--oc-card));
118
+ box-shadow: 0 8px 24px oklch(from var(--color-black-60) l c h / 0.14);
119
+ color: var(--oc-popover-foreground, var(--oc-foreground));
120
+ white-space: nowrap;
121
+ pointer-events: none;
122
+ translate: calc(var(--x) / (var(--n) - 1) * -100%) 0;
123
+ opacity: 0;
124
+ visibility: hidden;
125
+ transition: opacity var(--oc-transition-fast), visibility var(--oc-transition-fast);
126
+ }
127
+ .oc-chart-line__tip > strong { font-weight: 650; }
128
+ .oc-chart-line__row { display: flex; align-items: center; gap: 0.45rem; color: var(--oc-muted-foreground); }
129
+ .oc-chart-line__row::before { content: ""; inline-size: 0.6rem; block-size: 0.6rem; flex: none; border-radius: 2px; background: var(--oc-chart-color, var(--oc-chart-1)); }
130
+ .oc-chart-line__row > b { margin-inline-start: auto; padding-inline-start: 1rem; color: var(--oc-foreground); font-weight: 600; font-variant-numeric: tabular-nums; }
131
+ .oc-chart-line__row:nth-of-type(1) { --oc-chart-color: var(--oc-chart-1); }
132
+ .oc-chart-line__row:nth-of-type(2) { --oc-chart-color: var(--oc-chart-2); }
133
+ .oc-chart-line__row:nth-of-type(3) { --oc-chart-color: var(--oc-chart-3); }
134
+ .oc-chart-line__row:nth-of-type(4) { --oc-chart-color: var(--oc-chart-4); }
135
+ .oc-chart-line__row:nth-of-type(5) { --oc-chart-color: var(--oc-chart-5); }
136
+
137
+ .oc-chart-line__col:is(:hover, :focus-visible)::before { opacity: 1; }
138
+ .oc-chart-line__col:is(:hover, :focus-visible) > .oc-chart-line__dot { scale: 1; }
139
+ .oc-chart-line__col:is(:hover, :focus-visible) > .oc-chart-line__tip { opacity: 1; visibility: visible; }
140
+ .oc-chart-line__col:focus-visible::before { border-inline-start: 2px solid var(--oc-ring); }
141
+
142
+ /* ---- X axis ---- */
143
+ .oc-chart-line__x {
144
+ grid-column: 2;
145
+ display: flex;
146
+ justify-content: space-between;
147
+ margin: 0;
148
+ padding: 0;
149
+ list-style: none;
150
+ color: var(--oc-chart-axis, var(--oc-muted-foreground));
151
+ }
152
+ .oc-chart-line__x > li { flex: 0 0 0; display: flex; justify-content: center; white-space: nowrap; }
153
+ .oc-chart-line__x > li:first-child { justify-content: flex-start; }
154
+ .oc-chart-line__x > li:last-child { justify-content: flex-end; }
155
+
156
+ /* ---- Modifiers ---- */
157
+ .oc-chart-line--dots .oc-chart-line__dot { scale: 0.8; }
158
+ .oc-chart-line--dots .oc-chart-line__col:is(:hover, :focus-visible) > .oc-chart-line__dot { scale: 1.15; }
159
+ /* Sparkline: no axes, no grid; for stat cards and table cells */
160
+ .oc-chart-line--spark { --oc-chart-line-height: 3rem; gap: 0.25rem; }
161
+ .oc-chart-line--spark .oc-chart-line__body { grid-template-columns: minmax(0, 1fr); }
162
+ .oc-chart-line--spark .oc-chart-line__plot { border: 0; background: none; }
163
+ .oc-chart-line--spark .oc-chart-line__tip { inset-block-start: auto; inset-block-end: calc(100% + 0.4rem); min-inline-size: 0; }
164
+
165
+ @media (prefers-reduced-motion: reduce) {
166
+ .oc-chart-line__dot, .oc-chart-line__tip { transition: none; }
167
+ }
@@ -1,75 +1,75 @@
1
- /* File: packages/ui/src/parts/forms-affix-input.css
2
- Map: --affix group (frame on the wrapper) -> inner input -> inline affix (€, %, @) -> states -> --end alignment
3
- Affix input: extends .oc-input-group with the modifier .oc-input-group--affix.
4
- The symbol sits INSIDE the field (no grey addon box). Same markup as input-group, one extra class. */
5
-
6
- /* The wrapper owns the border; children lose theirs. */
7
- .oc-input-group--affix {
8
- align-items: center;
9
- border: 1px solid var(--oc-input);
10
- border-radius: var(--oc-radius);
11
- transition: border-color var(--oc-transition-fast), box-shadow var(--oc-transition-fast);
12
- }
13
-
14
- .oc-input-group--affix:focus-within {
15
- border-color: var(--oc-ring);
16
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-ring) 25%, transparent);
17
- }
18
-
19
- /* Input: borderless and without its own focus ring (the frame shows focus).
20
- Selectors repeat .oc-input-group to beat the base :first-child / :last-child radius rules. */
21
- .oc-input-group.oc-input-group--affix .oc-input {
22
- border: 0;
23
- border-radius: var(--oc-radius);
24
- box-shadow: none;
25
- min-inline-size: 0;
26
- }
27
-
28
- /* Symbol column: same chrome as the Korrekt / OmniaDesk fields (€, %, @, barcode icon).
29
- A divider separates the symbol from the value. */
30
- .oc-input-group.oc-input-group--affix .oc-input-addon {
31
- align-self: stretch;
32
- display: inline-flex;
33
- align-items: center;
34
- justify-content: center;
35
- min-inline-size: 2.25rem;
36
- padding-inline: 0.5rem;
37
- border: 0;
38
- border-inline-end: 1px solid var(--oc-input);
39
- border-radius: 0;
40
- background: transparent;
41
- color: var(--oc-muted-foreground);
42
- pointer-events: none;
43
- user-select: none;
44
- }
45
-
46
- /* A symbol after the value (rare) gets the divider on its left. */
47
- .oc-input-group.oc-input-group--affix .oc-input-addon:last-child:not(:first-child) {
48
- border-inline-end: 0;
49
- border-inline-start: 1px solid var(--oc-input);
50
- }
51
-
52
- .oc-input-group.oc-input-group--affix .oc-input-addon svg {
53
- inline-size: 1rem;
54
- block-size: 1rem;
55
- }
56
-
57
- /* Numbers (currency, percent) read better right-aligned. */
58
- .oc-input-group--end .oc-input {
59
- text-align: end;
60
- font-variant-numeric: tabular-nums;
61
- }
62
-
63
- /* Invalid: modifier, aria-invalid or the browser's own check (type="email", pattern...) after input. */
64
- .oc-input-group--affix.oc-input-group--error,
65
- .oc-input-group--affix:has([aria-invalid="true"]),
66
- .oc-input-group--affix:has(.oc-input:user-invalid) {
67
- border-color: var(--oc-destructive);
68
- }
69
-
70
- /* Disabled: dim the whole frame. */
71
- .oc-input-group--affix:has(.oc-input:disabled) {
72
- opacity: 0.5;
73
- cursor: not-allowed;
74
- }
75
- .oc-input-group--affix:has(.oc-input:disabled) .oc-input { opacity: 1; }
1
+ /* File: packages/ui/src/parts/forms-affix-input.css
2
+ Map: --affix group (frame on the wrapper) -> inner input -> inline affix (€, %, @) -> states -> --end alignment
3
+ Affix input: extends .oc-input-group with the modifier .oc-input-group--affix.
4
+ The symbol sits INSIDE the field (no grey addon box). Same markup as input-group, one extra class. */
5
+
6
+ /* The wrapper owns the border; children lose theirs. */
7
+ .oc-input-group--affix {
8
+ align-items: center;
9
+ border: 1px solid var(--oc-input);
10
+ border-radius: var(--oc-radius);
11
+ transition: border-color var(--oc-transition-fast), box-shadow var(--oc-transition-fast);
12
+ }
13
+
14
+ .oc-input-group--affix:focus-within {
15
+ border-color: var(--oc-ring);
16
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-ring) 25%, transparent);
17
+ }
18
+
19
+ /* Input: borderless and without its own focus ring (the frame shows focus).
20
+ Selectors repeat .oc-input-group to beat the base :first-child / :last-child radius rules. */
21
+ .oc-input-group.oc-input-group--affix .oc-input {
22
+ border: 0;
23
+ border-radius: var(--oc-radius);
24
+ box-shadow: none;
25
+ min-inline-size: 0;
26
+ }
27
+
28
+ /* Symbol column: same chrome as the Korrekt / OmniaDesk fields (€, %, @, barcode icon).
29
+ A divider separates the symbol from the value. */
30
+ .oc-input-group.oc-input-group--affix .oc-input-addon {
31
+ align-self: stretch;
32
+ display: inline-flex;
33
+ align-items: center;
34
+ justify-content: center;
35
+ min-inline-size: 2.25rem;
36
+ padding-inline: 0.5rem;
37
+ border: 0;
38
+ border-inline-end: 1px solid var(--oc-input);
39
+ border-radius: 0;
40
+ background: transparent;
41
+ color: var(--oc-muted-foreground);
42
+ pointer-events: none;
43
+ user-select: none;
44
+ }
45
+
46
+ /* A symbol after the value (rare) gets the divider on its left. */
47
+ .oc-input-group.oc-input-group--affix .oc-input-addon:last-child:not(:first-child) {
48
+ border-inline-end: 0;
49
+ border-inline-start: 1px solid var(--oc-input);
50
+ }
51
+
52
+ .oc-input-group.oc-input-group--affix .oc-input-addon svg {
53
+ inline-size: 1rem;
54
+ block-size: 1rem;
55
+ }
56
+
57
+ /* Numbers (currency, percent) read better right-aligned. */
58
+ .oc-input-group--end .oc-input {
59
+ text-align: end;
60
+ font-variant-numeric: tabular-nums;
61
+ }
62
+
63
+ /* Invalid: modifier, aria-invalid or the browser's own check (type="email", pattern...) after input. */
64
+ .oc-input-group--affix.oc-input-group--error,
65
+ .oc-input-group--affix:has([aria-invalid="true"]),
66
+ .oc-input-group--affix:has(.oc-input:user-invalid) {
67
+ border-color: var(--oc-destructive);
68
+ }
69
+
70
+ /* Disabled: dim the whole frame. */
71
+ .oc-input-group--affix:has(.oc-input:disabled) {
72
+ opacity: 0.5;
73
+ cursor: not-allowed;
74
+ }
75
+ .oc-input-group--affix:has(.oc-input:disabled) .oc-input { opacity: 1; }
@@ -1,75 +1,75 @@
1
- /* File: packages/ui/src/parts/forms-barcode-input.css
2
- Map: wrapper (field + preview stacked) -> monospace field -> preview area -> placeholder bars -> code caption -> empty / invalid states
3
- Barcode input: a field for an EAN/article code and a preview area below it.
4
- The preview slot shows CSS placeholder bars; put a real <svg>/<canvas> barcode in it if you render one. */
5
-
6
- /* Wrapper: field on top, preview below. */
7
- .oc-barcode-input {
8
- display: grid;
9
- gap: 0.5rem;
10
- max-inline-size: 22rem;
11
- }
12
-
13
- /* Field: add next to .oc-input, inside the affix group (icon column + value). */
14
- .oc-barcode-input-field {
15
- min-inline-size: 0;
16
- }
17
-
18
- .oc-barcode-input-field:user-invalid { border-color: var(--oc-destructive); }
19
-
20
- /* Preview area: light card with the bars and the code text. */
21
- .oc-barcode-preview {
22
- display: grid;
23
- justify-items: center;
24
- gap: 0.375rem;
25
- margin: 0;
26
- padding: 0.75rem 1rem;
27
- border: 1px dashed var(--oc-border-strong);
28
- border-radius: var(--oc-radius);
29
- background: var(--oc-surface);
30
- }
31
-
32
- /* Real barcode graphics placed in the slot scale to the preview width. */
33
- .oc-barcode-preview > svg,
34
- .oc-barcode-preview > canvas,
35
- .oc-barcode-preview > img {
36
- max-inline-size: 100%;
37
- block-size: auto;
38
- }
39
-
40
- /* Placeholder bars: a decorative stripe pattern (not a scannable code). */
41
- .oc-barcode-preview-bars {
42
- inline-size: 100%;
43
- block-size: 3.5rem;
44
- background: repeating-linear-gradient(
45
- 90deg,
46
- var(--oc-foreground) 0 2px,
47
- transparent 2px 4px,
48
- var(--oc-foreground) 4px 5px,
49
- transparent 5px 8px,
50
- var(--oc-foreground) 8px 11px,
51
- transparent 11px 12px
52
- );
53
- }
54
-
55
- /* Code text under the bars. */
56
- .oc-barcode-preview-code {
57
- font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
58
- font-size: 0.8rem;
59
- letter-spacing: 0.2em;
60
- color: var(--oc-foreground);
61
- }
62
-
63
- /* Empty state: faded bars and a hint instead of the code. */
64
- .oc-barcode-preview--empty .oc-barcode-preview-bars { opacity: 0.15; }
65
- .oc-barcode-preview--empty .oc-barcode-preview-code {
66
- font-family: inherit;
67
- letter-spacing: 0;
68
- color: var(--oc-muted-foreground);
69
- }
70
-
71
- /* Field invalid: the preview border turns red as well. */
72
- .oc-barcode-input:has(.oc-barcode-input-field:user-invalid) .oc-barcode-preview,
73
- .oc-barcode-input:has([aria-invalid="true"]) .oc-barcode-preview {
74
- border-color: var(--oc-destructive);
75
- }
1
+ /* File: packages/ui/src/parts/forms-barcode-input.css
2
+ Map: wrapper (field + preview stacked) -> monospace field -> preview area -> placeholder bars -> code caption -> empty / invalid states
3
+ Barcode input: a field for an EAN/article code and a preview area below it.
4
+ The preview slot shows CSS placeholder bars; put a real <svg>/<canvas> barcode in it if you render one. */
5
+
6
+ /* Wrapper: field on top, preview below. */
7
+ .oc-barcode-input {
8
+ display: grid;
9
+ gap: 0.5rem;
10
+ max-inline-size: 22rem;
11
+ }
12
+
13
+ /* Field: add next to .oc-input, inside the affix group (icon column + value). */
14
+ .oc-barcode-input-field {
15
+ min-inline-size: 0;
16
+ }
17
+
18
+ .oc-barcode-input-field:user-invalid { border-color: var(--oc-destructive); }
19
+
20
+ /* Preview area: light card with the bars and the code text. */
21
+ .oc-barcode-preview {
22
+ display: grid;
23
+ justify-items: center;
24
+ gap: 0.375rem;
25
+ margin: 0;
26
+ padding: 0.75rem 1rem;
27
+ border: 1px dashed var(--oc-border-strong);
28
+ border-radius: var(--oc-radius);
29
+ background: var(--oc-surface);
30
+ }
31
+
32
+ /* Real barcode graphics placed in the slot scale to the preview width. */
33
+ .oc-barcode-preview > svg,
34
+ .oc-barcode-preview > canvas,
35
+ .oc-barcode-preview > img {
36
+ max-inline-size: 100%;
37
+ block-size: auto;
38
+ }
39
+
40
+ /* Placeholder bars: a decorative stripe pattern (not a scannable code). */
41
+ .oc-barcode-preview-bars {
42
+ inline-size: 100%;
43
+ block-size: 3.5rem;
44
+ background: repeating-linear-gradient(
45
+ 90deg,
46
+ var(--oc-foreground) 0 2px,
47
+ transparent 2px 4px,
48
+ var(--oc-foreground) 4px 5px,
49
+ transparent 5px 8px,
50
+ var(--oc-foreground) 8px 11px,
51
+ transparent 11px 12px
52
+ );
53
+ }
54
+
55
+ /* Code text under the bars. */
56
+ .oc-barcode-preview-code {
57
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
58
+ font-size: 0.8rem;
59
+ letter-spacing: 0.2em;
60
+ color: var(--oc-foreground);
61
+ }
62
+
63
+ /* Empty state: faded bars and a hint instead of the code. */
64
+ .oc-barcode-preview--empty .oc-barcode-preview-bars { opacity: 0.15; }
65
+ .oc-barcode-preview--empty .oc-barcode-preview-code {
66
+ font-family: inherit;
67
+ letter-spacing: 0;
68
+ color: var(--oc-muted-foreground);
69
+ }
70
+
71
+ /* Field invalid: the preview border turns red as well. */
72
+ .oc-barcode-input:has(.oc-barcode-input-field:user-invalid) .oc-barcode-preview,
73
+ .oc-barcode-input:has([aria-invalid="true"]) .oc-barcode-preview {
74
+ border-color: var(--oc-destructive);
75
+ }