trebol 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/README.md +2 -0
  2. package/dist/cli.js +10040 -7519
  3. package/dist/lib/core/boot.js +10 -7
  4. package/dist/lib/core/eval.js +2 -2
  5. package/dist/lib/core/machine/checks.d.ts +1 -0
  6. package/dist/lib/core/machine/checks.js +250 -0
  7. package/dist/lib/core/machine/events.d.ts +1 -0
  8. package/dist/lib/core/machine/events.js +365 -0
  9. package/dist/lib/core/machine/running.d.ts +1 -0
  10. package/dist/lib/core/machine/running.js +180 -0
  11. package/dist/lib/core/machine/shared.d.ts +1 -0
  12. package/dist/lib/core/machine/shared.js +123 -0
  13. package/dist/lib/core/machine/snapshot.d.ts +1 -0
  14. package/dist/lib/core/machine/snapshot.js +244 -0
  15. package/dist/lib/core/machine/spec.d.ts +1 -0
  16. package/dist/lib/core/machine/spec.js +274 -0
  17. package/dist/lib/core/machine/words.d.ts +1 -0
  18. package/dist/lib/core/machine/words.js +98 -0
  19. package/dist/lib/core/machine.d.ts +1 -0
  20. package/dist/lib/core/machine.js +17 -0
  21. package/dist/lib/core/mezz.js +31 -0
  22. package/dist/lib/core/natives/control.js +1 -1
  23. package/dist/lib/core/natives/data.js +6 -1
  24. package/dist/lib/core/natives/series.js +49 -9
  25. package/dist/lib/core/natives/text.js +0 -1
  26. package/dist/lib/host/browser/calendar.d.ts +34 -0
  27. package/dist/lib/host/browser/calendar.js +268 -0
  28. package/dist/lib/host/browser/count.d.ts +15 -0
  29. package/dist/lib/host/browser/count.js +48 -0
  30. package/dist/lib/host/browser/dialogs.d.ts +39 -0
  31. package/dist/lib/host/browser/dialogs.js +443 -0
  32. package/dist/lib/host/browser/drag.d.ts +70 -0
  33. package/dist/lib/host/browser/drag.js +268 -0
  34. package/dist/lib/host/browser/drawings.d.ts +30 -0
  35. package/dist/lib/host/browser/drawings.js +176 -0
  36. package/dist/lib/host/browser/events.d.ts +16 -0
  37. package/dist/lib/host/browser/events.js +125 -0
  38. package/dist/lib/host/browser/faces.d.ts +35 -0
  39. package/dist/lib/host/browser/faces.js +131 -0
  40. package/dist/lib/host/browser/fields.d.ts +16 -0
  41. package/dist/lib/host/browser/fields.js +322 -0
  42. package/dist/lib/host/browser/keys.d.ts +29 -0
  43. package/dist/lib/host/browser/keys.js +151 -0
  44. package/dist/lib/host/browser/lookup.d.ts +25 -0
  45. package/dist/lib/host/browser/lookup.js +275 -0
  46. package/dist/lib/host/browser/menus.d.ts +20 -0
  47. package/dist/lib/host/browser/menus.js +149 -0
  48. package/dist/lib/host/browser/mount.d.ts +92 -0
  49. package/dist/lib/host/browser/mount.js +448 -0
  50. package/dist/lib/host/browser/orbits.d.ts +90 -0
  51. package/dist/lib/host/browser/orbits.js +379 -0
  52. package/dist/lib/host/browser/page.d.ts +13 -0
  53. package/dist/lib/host/browser/page.js +35 -0
  54. package/dist/lib/host/browser/richtext.d.ts +19 -0
  55. package/dist/lib/host/browser/richtext.js +379 -0
  56. package/dist/lib/host/browser/row-faces.d.ts +5 -0
  57. package/dist/lib/host/browser/row-faces.js +74 -0
  58. package/dist/lib/host/browser/screens.d.ts +37 -0
  59. package/dist/lib/host/browser/screens.js +140 -0
  60. package/dist/lib/host/browser/swipe.d.ts +31 -0
  61. package/dist/lib/host/browser/swipe.js +178 -0
  62. package/dist/lib/host/browser/sync.d.ts +24 -0
  63. package/dist/lib/host/browser/sync.js +450 -0
  64. package/dist/lib/host/browser/tables.d.ts +65 -0
  65. package/dist/lib/host/browser/tables.js +505 -0
  66. package/dist/lib/host/browser/times.d.ts +14 -0
  67. package/dist/lib/host/browser/times.js +114 -0
  68. package/dist/lib/host/browser/toolbars.d.ts +17 -0
  69. package/dist/lib/host/browser/toolbars.js +129 -0
  70. package/dist/lib/host/browser/trees.d.ts +20 -0
  71. package/dist/lib/host/browser/trees.js +235 -0
  72. package/dist/lib/host/browser/uploads.d.ts +29 -0
  73. package/dist/lib/host/browser/uploads.js +370 -0
  74. package/dist/lib/host/browser/widget.d.ts +13 -0
  75. package/dist/lib/host/browser/widget.js +105 -0
  76. package/dist/lib/host/browser.d.ts +25 -0
  77. package/dist/lib/host/browser.js +84 -4812
  78. package/dist/lib/host/devtools/console.d.ts +9 -0
  79. package/dist/lib/host/devtools/console.js +104 -0
  80. package/dist/lib/host/devtools/faces.d.ts +25 -0
  81. package/dist/lib/host/devtools/faces.js +169 -0
  82. package/dist/lib/host/devtools/log.d.ts +3 -0
  83. package/dist/lib/host/devtools/log.js +32 -0
  84. package/dist/lib/host/devtools/machines.d.ts +34 -0
  85. package/dist/lib/host/devtools/machines.js +212 -0
  86. package/dist/lib/host/devtools/read.d.ts +13 -0
  87. package/dist/lib/host/devtools/read.js +52 -0
  88. package/dist/lib/host/devtools/state.d.ts +90 -0
  89. package/dist/lib/host/devtools/state.js +123 -0
  90. package/dist/lib/host/devtools.d.ts +15 -19
  91. package/dist/lib/host/devtools.js +39 -427
  92. package/dist/lib/host/fonts.js +4 -3
  93. package/dist/lib/host/icons.js +4 -0
  94. package/dist/lib/host/index.d.ts +3 -1
  95. package/dist/lib/host/index.js +107 -4
  96. package/dist/lib/host/locale.d.ts +18 -0
  97. package/dist/lib/host/locale.js +75 -5
  98. package/dist/lib/host/markdown.d.ts +4 -0
  99. package/dist/lib/host/markdown.js +8 -0
  100. package/dist/lib/host/modules.js +118 -19
  101. package/dist/lib/host/motion.d.ts +32 -0
  102. package/dist/lib/host/motion.js +190 -0
  103. package/dist/lib/host/net.js +5 -2
  104. package/dist/lib/host/palette.d.ts +17 -0
  105. package/dist/lib/host/palette.js +131 -0
  106. package/dist/lib/host/scheduler.d.ts +2 -0
  107. package/dist/lib/host/scheduler.js +4 -0
  108. package/dist/lib/host/share.d.ts +31 -0
  109. package/dist/lib/host/share.js +134 -0
  110. package/dist/lib/host/theme/classic.d.ts +1 -0
  111. package/dist/lib/host/theme/classic.js +120 -0
  112. package/dist/lib/host/theme/cupertino.d.ts +1 -0
  113. package/dist/lib/host/theme/cupertino.js +65 -0
  114. package/dist/lib/host/theme/data.d.ts +1 -0
  115. package/dist/lib/host/theme/data.js +109 -0
  116. package/dist/lib/host/theme/devtools.d.ts +1 -0
  117. package/dist/lib/host/theme/devtools.js +166 -0
  118. package/dist/lib/host/theme/dialogs.d.ts +1 -0
  119. package/dist/lib/host/theme/dialogs.js +63 -0
  120. package/dist/lib/host/theme/fluent.d.ts +1 -0
  121. package/dist/lib/host/theme/fluent.js +64 -0
  122. package/dist/lib/host/theme/forms.d.ts +1 -0
  123. package/dist/lib/host/theme/forms.js +239 -0
  124. package/dist/lib/host/theme/fusion.d.ts +1 -0
  125. package/dist/lib/host/theme/fusion.js +66 -0
  126. package/dist/lib/host/theme/layout.d.ts +1 -0
  127. package/dist/lib/host/theme/layout.js +166 -0
  128. package/dist/lib/host/theme/media.d.ts +1 -0
  129. package/dist/lib/host/theme/media.js +106 -0
  130. package/dist/lib/host/theme/navigation.d.ts +1 -0
  131. package/dist/lib/host/theme/navigation.js +36 -0
  132. package/dist/lib/host/theme/panes.d.ts +1 -0
  133. package/dist/lib/host/theme/panes.js +99 -0
  134. package/dist/lib/host/theme/popups.d.ts +1 -0
  135. package/dist/lib/host/theme/popups.js +149 -0
  136. package/dist/lib/host/theme/responsive.d.ts +1 -0
  137. package/dist/lib/host/theme/responsive.js +103 -0
  138. package/dist/lib/host/theme/toasts.d.ts +1 -0
  139. package/dist/lib/host/theme/toasts.js +62 -0
  140. package/dist/lib/host/theme.js +19 -1384
  141. package/dist/lib/ui/dialect/events.trb +276 -0
  142. package/dist/lib/ui/dialect/faces.trb +135 -0
  143. package/dist/lib/ui/dialect/layout.trb +283 -0
  144. package/dist/lib/ui/dialect/palette.trb +87 -0
  145. package/dist/lib/ui/dialect/problems.trb +174 -0
  146. package/dist/lib/ui/dialect/reactions.trb +198 -0
  147. package/dist/lib/ui/dialect/rows.trb +208 -0
  148. package/dist/lib/ui/dialect/screens.trb +293 -0
  149. package/dist/lib/ui/dialect/steps.trb +203 -0
  150. package/dist/lib/ui/dialect/validation.trb +137 -0
  151. package/dist/lib/ui/dialect/view.trb +110 -0
  152. package/dist/lib/ui/dialect/walking.trb +98 -0
  153. package/dist/lib/ui/dialect/words.trb +70 -0
  154. package/dist/lib/ui/i18n.trb +17 -0
  155. package/dist/lib/ui/test.trb +3 -556
  156. package/dist/lib/ui/testing/actions.trb +421 -0
  157. package/dist/lib/ui/testing/faces.trb +148 -0
  158. package/dist/lib/ui/testing/server.trb +73 -0
  159. package/dist/lib/ui/ui.trb +25 -1675
  160. package/dist/trebol.js +4463 -1891
  161. package/package.json +1 -1
  162. package/src/core/boot.ts +9 -6
  163. package/src/core/eval.ts +2 -2
  164. package/src/core/machine/checks.ts +251 -0
  165. package/src/core/machine/events.ts +366 -0
  166. package/src/core/machine/running.ts +181 -0
  167. package/src/core/machine/shared.ts +124 -0
  168. package/src/core/machine/snapshot.ts +245 -0
  169. package/src/core/machine/spec.ts +275 -0
  170. package/src/core/machine/words.ts +99 -0
  171. package/src/core/machine.ts +20 -0
  172. package/src/core/mezz.ts +31 -0
  173. package/src/core/natives/control.ts +1 -1
  174. package/src/core/natives/data.ts +6 -1
  175. package/src/core/natives/parse.ts +1 -1
  176. package/src/core/natives/series.ts +47 -11
  177. package/src/core/natives/text.ts +0 -1
  178. package/src/host/browser/calendar.ts +264 -0
  179. package/src/host/browser/count.ts +48 -0
  180. package/src/host/browser/dialogs.ts +439 -0
  181. package/src/host/browser/drag.ts +278 -0
  182. package/src/host/browser/drawings.ts +178 -0
  183. package/src/host/browser/events.ts +117 -0
  184. package/src/host/browser/faces.ts +143 -0
  185. package/src/host/browser/fields.ts +315 -0
  186. package/src/host/browser/keys.ts +145 -0
  187. package/src/host/browser/lookup.ts +262 -0
  188. package/src/host/browser/menus.ts +146 -0
  189. package/src/host/browser/mount.ts +420 -0
  190. package/src/host/browser/orbits.ts +418 -0
  191. package/src/host/browser/page.ts +43 -0
  192. package/src/host/browser/richtext.ts +346 -0
  193. package/src/host/browser/row-faces.ts +75 -0
  194. package/src/host/browser/screens.ts +142 -0
  195. package/src/host/browser/swipe.ts +168 -0
  196. package/src/host/browser/sync.ts +354 -0
  197. package/src/host/browser/tables.ts +461 -0
  198. package/src/host/browser/times.ts +115 -0
  199. package/src/host/browser/toolbars.ts +126 -0
  200. package/src/host/browser/trees.ts +205 -0
  201. package/src/host/browser/uploads.ts +367 -0
  202. package/src/host/browser/widget.ts +103 -0
  203. package/src/host/browser.ts +82 -4612
  204. package/src/host/devtools/console.ts +102 -0
  205. package/src/host/devtools/faces.ts +160 -0
  206. package/src/host/devtools/log.ts +34 -0
  207. package/src/host/devtools/machines.ts +208 -0
  208. package/src/host/devtools/read.ts +58 -0
  209. package/src/host/devtools/state.ts +148 -0
  210. package/src/host/devtools.ts +39 -442
  211. package/src/host/fonts.ts +4 -3
  212. package/src/host/icons.ts +4 -0
  213. package/src/host/index.ts +107 -4
  214. package/src/host/locale.ts +71 -5
  215. package/src/host/markdown.ts +9 -0
  216. package/src/host/modules.ts +117 -21
  217. package/src/host/motion.ts +204 -0
  218. package/src/host/net.ts +4 -2
  219. package/src/host/palette.ts +139 -0
  220. package/src/host/scheduler.ts +5 -0
  221. package/src/host/share.ts +168 -0
  222. package/src/host/theme/classic.ts +121 -0
  223. package/src/host/theme/cupertino.ts +66 -0
  224. package/src/host/theme/data.ts +110 -0
  225. package/src/host/theme/devtools.ts +167 -0
  226. package/src/host/theme/dialogs.ts +64 -0
  227. package/src/host/theme/fluent.ts +65 -0
  228. package/src/host/theme/forms.ts +240 -0
  229. package/src/host/theme/fusion.ts +67 -0
  230. package/src/host/theme/layout.ts +167 -0
  231. package/src/host/theme/media.ts +107 -0
  232. package/src/host/theme/navigation.ts +37 -0
  233. package/src/host/theme/panes.ts +100 -0
  234. package/src/host/theme/popups.ts +150 -0
  235. package/src/host/theme/responsive.ts +104 -0
  236. package/src/host/theme/toasts.ts +63 -0
  237. package/src/host/theme.ts +19 -1384
  238. package/src/ui/dialect/events.trb +276 -0
  239. package/src/ui/dialect/faces.trb +135 -0
  240. package/src/ui/dialect/layout.trb +283 -0
  241. package/src/ui/dialect/palette.trb +87 -0
  242. package/src/ui/dialect/problems.trb +174 -0
  243. package/src/ui/dialect/reactions.trb +198 -0
  244. package/src/ui/dialect/rows.trb +208 -0
  245. package/src/ui/dialect/screens.trb +293 -0
  246. package/src/ui/dialect/steps.trb +203 -0
  247. package/src/ui/dialect/validation.trb +137 -0
  248. package/src/ui/dialect/view.trb +110 -0
  249. package/src/ui/dialect/walking.trb +98 -0
  250. package/src/ui/dialect/words.trb +70 -0
  251. package/src/ui/i18n.trb +17 -0
  252. package/src/ui/test.trb +3 -556
  253. package/src/ui/testing/actions.trb +421 -0
  254. package/src/ui/testing/faces.trb +148 -0
  255. package/src/ui/testing/server.trb +73 -0
  256. package/src/ui/ui.trb +25 -1675
@@ -6,6 +6,21 @@
6
6
  // comes from the theme (`base`, `accent`, `neutral`). `contrast()` checks it
7
7
  // and the tests run it over every hue.
8
8
  import { DRAW_COLORS } from "./draw.js";
9
+ import { LAYOUT } from "./theme/layout.js";
10
+ import { FORMS } from "./theme/forms.js";
11
+ import { NAVIGATION } from "./theme/navigation.js";
12
+ import { MEDIA } from "./theme/media.js";
13
+ import { DATA } from "./theme/data.js";
14
+ import { DIALOGS } from "./theme/dialogs.js";
15
+ import { PANES } from "./theme/panes.js";
16
+ import { POPUPS } from "./theme/popups.js";
17
+ import { TOASTS } from "./theme/toasts.js";
18
+ import { DEVTOOLS } from "./theme/devtools.js";
19
+ import { RESPONSIVE } from "./theme/responsive.js";
20
+ import { CLASSIC } from "./theme/classic.js";
21
+ import { CUPERTINO } from "./theme/cupertino.js";
22
+ import { FUSION } from "./theme/fusion.js";
23
+ import { FLUENT } from "./theme/fluent.js";
9
24
  export const DEFAULT_THEME = {
10
25
  base: 250, accent: 30, neutral: 'neutral', density: 'normal', radius: 'soft', font: 'inter', headings: null, mode: 'auto',
11
26
  color: 1, line: 1, depth: 'soft', icons: 'round', skin: 'modern',
@@ -264,7 +279,7 @@ function sizeVars(t) {
264
279
  lines.push(` --tb-line: ${t.line}px;`);
265
280
  const icon = ICONS[t.icons];
266
281
  lines.push(` --tb-icon-stroke: ${icon.stroke};`, ` --tb-icon-cap: ${icon.cap};`, ` --tb-icon-join: ${icon.join};`);
267
- lines.push(' --tb-ease: cubic-bezier(0.2, 0, 0, 1);', ' --tb-fast: 150ms;');
282
+ lines.push(' --tb-ease: cubic-bezier(0.2, 0, 0, 1);', ' --tb-fast: 150ms;', ' --tb-move: 240ms;');
268
283
  return lines.join('\n');
269
284
  }
270
285
  /** The full stylesheet for a theme: tokens, then the fixed component rules. */
@@ -281,1387 +296,7 @@ export function themeCss(t) {
281
296
  colors = `:root {\n${light}\n}\n@media (prefers-color-scheme: dark) {\n:root:not([data-tb-scheme="light"]) {\n${dark}\n}\n}\n:root[data-tb-scheme="dark"] {\n${dark}\n}`;
282
297
  return `:root {\n${sizeVars(t)}\n}\n${colors}\n${COMPONENTS}${SKINS[t.skin]}`;
283
298
  }
284
- /** Component rules. Only token variables appear here, never raw values of color. */
285
- const COMPONENTS = String.raw `
286
- *, *::before, *::after { box-sizing: border-box; }
287
- html, body { margin: 0; }
288
- body {
289
- background: var(--tb-bg);
290
- color: var(--tb-text);
291
- font-family: var(--tb-font);
292
- font-size: 15px;
293
- line-height: 1.5;
294
- font-variant-numeric: tabular-nums;
295
- -webkit-font-smoothing: antialiased;
296
- text-rendering: optimizeLegibility;
297
- }
298
- .tb-view {
299
- max-width: 720px;
300
- margin: 0 auto;
301
- padding: var(--tb-space-7) var(--tb-space-5);
302
- display: flex;
303
- flex-direction: column;
304
- gap: var(--tb-space-5);
305
- }
306
- .tb-view:has(> .tb-split) { max-width: 1120px; }
307
- .tb-view.tb-small { max-width: 480px; font-size: inherit; }
308
- .tb-view.tb-large { max-width: 1120px; }
309
- .tb-view.tb-fill { max-width: none; }
310
- .tb-column { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
311
- .tb-screens, .tb-screen { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
312
- .tb-screen:focus { outline: none; }
313
- /* entering a screen focuses its title for screen readers; it is not a control, so no ring */
314
- .tb-screen :is(h1, h2)[tabindex="-1"]:focus { outline: none; }
315
- .tb-screens[aria-busy] { cursor: progress; }
316
- .tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-space-3); }
317
- .tb-row:where(:not(.tb-top, .tb-middle, .tb-bottom)):has(> .tb-field) { align-items: flex-end; }
318
- /* with fields, a text beside them sits on the line of the controls, not on their labels */
319
- .tb-row:where(:not(.tb-top, .tb-middle, .tb-bottom)):has(> .tb-field) > :is(.tb-text, .tb-heading) { margin-bottom: max(0px, calc((var(--tb-control) - 1lh) / 2)); }
320
- .tb-row.tb-top { align-items: flex-start; }
321
- .tb-row.tb-middle { align-items: center; }
322
- .tb-row.tb-bottom { align-items: flex-end; }
323
- .tb-row.tb-center { justify-content: center; }
324
- .tb-row.tb-right { justify-content: flex-end; }
325
- .tb-row.tb-spread { justify-content: space-between; }
326
- .tb-fill { flex: 1 1 0; min-width: 0; }
327
- .tb-view:has(.tb-desktop) { min-height: 100dvh; box-sizing: border-box; }
328
- .tb-view:has(.tb-desktop) .tb-screens, .tb-screen:has(> .tb-desktop) { flex: 1 1 auto; }
329
- .tb-view:has(.tb-fit) .tb-screens, .tb-screen:has(> .tb-fit) { flex: 1 1 auto; min-height: 0; }
330
- .tb-view:has(.tb-fit) { height: 100dvh; box-sizing: border-box; }
331
- .tb-fit { flex: 1 1 auto; min-height: 0; }
332
- .tb-fit > * { min-height: 0; overflow: auto; }
333
- .tb-fit > * > * { flex-shrink: 0; }
334
- .tb-desktop {
335
- flex: 1 1 auto;
336
- min-height: 240px;
337
- display: flex;
338
- flex-wrap: wrap;
339
- align-content: flex-start;
340
- gap: var(--tb-space-3);
341
- padding: var(--tb-space-5);
342
- border-radius: var(--tb-radius);
343
- background-color: color-mix(in oklch, var(--tb-primary) 9%, var(--tb-bg));
344
- background-size: cover;
345
- background-position: center;
346
- }
347
- /* an image behind what holds it, under a veil that keeps text on it AA; muted text needs the text's color there */
348
- :has(> .tb-backdrop) { position: relative; isolation: isolate; --tb-muted: var(--tb-text); }
349
- .tb-backdrop { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background-size: cover; background-position: center; pointer-events: none; }
350
- .tb-backdrop::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--tb-scrim); }
351
- /* the backdrop of the view or of a screen is the window's */
352
- :is(.tb-view, .tb-screen) > .tb-backdrop { position: fixed; border-radius: 0; }
353
- .tb-tile {
354
- font: inherit;
355
- font-size: 13px;
356
- width: 112px;
357
- min-height: 96px;
358
- padding: var(--tb-space-3) var(--tb-space-2);
359
- border: 1px solid transparent;
360
- border-radius: var(--tb-radius);
361
- background: transparent;
362
- color: var(--tb-text);
363
- cursor: pointer;
364
- display: flex;
365
- flex-direction: column;
366
- align-items: center;
367
- gap: var(--tb-space-2);
368
- text-align: center;
369
- overflow-wrap: anywhere;
370
- transition: background var(--tb-fast) var(--tb-ease), border-color var(--tb-fast) var(--tb-ease);
371
- }
372
- .tb-tile:hover { background: var(--tb-surface); border-color: var(--tb-border); }
373
- .tb-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
374
- .tb-tile > svg { flex: none; width: 36px; height: 36px; color: var(--tb-primary); }
375
- .tb-tile-linked { position: relative; }
376
- .tb-tile-linked::after {
377
- content: '';
378
- position: absolute;
379
- top: calc(var(--tb-space-3) + 21px);
380
- left: calc(50% - 22px);
381
- width: 16px;
382
- height: 16px;
383
- border-radius: 3px;
384
- background: var(--tb-text);
385
- outline: 2px solid var(--tb-bg);
386
- -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 0h16v16H0z M6 4v2h2.6L4 10.6 5.4 12 10 7.4V10h2V4z' fill-rule='evenodd'/%3E%3C/svg%3E");
387
- mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 0h16v16H0z M6 4v2h2.6L4 10.6 5.4 12 10 7.4V10h2V4z' fill-rule='evenodd'/%3E%3C/svg%3E");
388
- }
389
- .tb-grid { --tb-tracks: initial; --tb-cols: 2; display: grid; gap: var(--tb-space-4); grid-template-columns: var(--tb-tracks, repeat(var(--tb-cols), minmax(0, 1fr))); }
390
- .tb-panel {
391
- background: var(--tb-raised);
392
- border: var(--tb-line) solid var(--tb-border);
393
- border-radius: var(--tb-radius-lg);
394
- box-shadow: var(--tb-shadow-1);
395
- padding: var(--tb-space-6);
396
- display: flex;
397
- flex-direction: column;
398
- gap: var(--tb-space-5);
399
- }
400
- .tb-panel.tb-small { width: 100%; max-width: 420px; font-size: inherit; }
401
- .tb-panel.tb-primary { border-color: var(--tb-primary); box-shadow: inset 0 0 0 1px var(--tb-primary), var(--tb-shadow-1); }
402
- .tb-panel.tb-accent { border-color: var(--tb-accent); }
403
- .tb-panel.tb-danger { border-color: var(--tb-danger); }
404
- .tb-panel.tb-success { border-color: var(--tb-success); }
405
- .tb-panel.tb-warning { border-color: var(--tb-warning); }
406
- .tb-panel:focus-visible, .tb-column:focus-visible, .tb-row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
407
- .tb-panel.tb-primary:focus-visible { box-shadow: inset 0 0 0 1px var(--tb-primary), 0 0 0 3px var(--tb-focus-ring); }
408
- .tb-panel > .tb-panel-title { margin: 0; font-family: var(--tb-headings); font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
409
- .tb-divider { border: 0; border-top: var(--tb-line) solid var(--tb-border); margin: var(--tb-space-2) 0; width: 100%; }
410
-
411
- .tb-title { margin: 0; font-family: var(--tb-headings); font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; }
412
- .tb-heading { margin: 0; font-family: var(--tb-headings); font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
413
- .tb-text { margin: 0; }
414
- .tb-small { font-size: 13px; }
415
- .tb-muted { color: var(--tb-muted); }
416
- .tb-text.tb-danger { color: var(--tb-danger); }
417
- .tb-text.tb-success { color: var(--tb-success); }
418
- .tb-text.tb-primary { color: var(--tb-primary); }
419
-
420
- /* forms: labels and controls aligned in two columns */
421
- .tb-form {
422
- display: grid;
423
- grid-template-columns: minmax(120px, max-content) minmax(0, 1fr);
424
- column-gap: var(--tb-space-5);
425
- row-gap: var(--tb-space-4);
426
- align-items: start;
427
- /* a narrow form (in a grid cell, beside another panel) stacks like one on a phone; see @container below */
428
- container-type: inline-size;
429
- contain-intrinsic-inline-size: 30rem;
430
- }
431
- /* a panel in a form (a section) keeps the form's two columns */
432
- .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel { display: grid; grid-template-columns: subgrid; row-gap: var(--tb-space-4); align-items: start; }
433
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > * { grid-column: 1 / -1; }
434
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field { display: contents; }
435
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field > .tb-label { grid-column: 1; padding-top: calc((var(--tb-control) - 1.5em) / 2); }
436
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field > .tb-control { grid-column: 2; }
437
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-actions, :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-check-row { grid-column: 2; }
438
- .tb-field { display: flex; flex-direction: column; gap: var(--tb-space-2); min-width: 0; }
439
- @container (max-width: 420px) {
440
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field { display: flex; }
441
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field > .tb-label, :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field > .tb-control,
442
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-actions, :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-check-row { grid-column: 1 / -1; padding-top: 0; }
443
- }
444
- .tb-rows { display: flex; flex-direction: column; gap: var(--tb-space-3); align-items: stretch; }
445
- .tb-rows > .tb-button { align-self: flex-start; }
446
- .tb-entry { display: flex; gap: var(--tb-space-3); align-items: flex-start; }
447
- .tb-entry > * { flex: 1 1 0; min-width: 0; }
448
- .tb-entry > .tb-button { flex: none; }
449
- /* the labels of the first row are the headers of the others */
450
- .tb-entry:not(:first-child) .tb-field > .tb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
451
- .tb-entry:first-child:has(.tb-label:not(:empty)) > .tb-button { margin-top: calc(14px * 1.5 + var(--tb-space-2)); }
452
- .tb-rich { display: flex; flex-direction: column; gap: var(--tb-space-1); }
453
- .tb-rich-tools { display: flex; flex-wrap: wrap; gap: var(--tb-space-1); }
454
- .tb-rich-tools[hidden], .tb-rich-link[hidden] { display: none; }
455
- .tb-rich-tool { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--tb-radius); background: transparent; color: var(--tb-muted); cursor: pointer; }
456
- .tb-rich-tool:hover { background: var(--tb-primary-soft); color: var(--tb-text); }
457
- .tb-rich-tool:focus-visible { outline: 2px solid var(--tb-primary); outline-offset: 1px; }
458
- .tb-rich-tool .tb-icon { width: 18px; height: 18px; }
459
- .tb-rich-link { display: flex; gap: var(--tb-space-2); align-items: center; }
460
- .tb-input.tb-rich-box { padding: var(--tb-space-2) var(--tb-space-3); min-height: calc(var(--tb-control) * 2.5); overflow-wrap: anywhere; cursor: text; }
461
- .tb-input.tb-rich-box[aria-readonly="true"] { background: color-mix(in srgb, var(--tb-muted) 12%, transparent); border-color: transparent; cursor: default; }
462
- .tb-input.tb-rich-box[aria-disabled="true"] { opacity: 0.45; }
463
- .tb-rich-box:focus { outline: none; border-color: var(--tb-primary); box-shadow: 0 0 0 3px var(--tb-focus-ring); }
464
- .tb-rich-box > :first-child { margin-top: 0; }
465
- .tb-rich-box > :last-child { margin-bottom: 0; }
466
- .tb-rich-box p, .tb-rich-box ul, .tb-rich-box ol { margin: 0 0 var(--tb-space-2); }
467
- .tb-rich-box ul, .tb-rich-box ol { padding-left: var(--tb-space-5); }
468
- .tb-rich-box h1, .tb-rich-box h2, .tb-rich-box h3 { margin: var(--tb-space-3) 0 var(--tb-space-2); line-height: 1.3; font-weight: 600; }
469
- .tb-rich-box h1 { font-size: 22px; }
470
- .tb-rich-box h2 { font-size: 18px; }
471
- .tb-rich-box h3 { font-size: 16px; }
472
- .tb-rich-box a { color: var(--tb-primary); }
473
- .tb-control { display: flex; flex-direction: column; gap: var(--tb-space-1); min-width: 0; }
474
- .tb-label { font-weight: 550; font-size: 14px; color: var(--tb-text); }
475
- .tb-required::after { content: " *"; color: var(--tb-muted); font-weight: 400; }
476
- .tb-input {
477
- font: inherit;
478
- color: var(--tb-text);
479
- background: var(--tb-surface);
480
- border: var(--tb-line) solid var(--tb-border-strong);
481
- border-radius: var(--tb-radius);
482
- min-height: var(--tb-control);
483
- padding: 0 var(--tb-space-3);
484
- width: 100%;
485
- transition: border-color var(--tb-fast) var(--tb-ease), box-shadow var(--tb-fast) var(--tb-ease);
486
- }
487
- textarea.tb-input { padding: var(--tb-space-2) var(--tb-space-3); min-height: calc(var(--tb-control) * 2.5); resize: vertical; }
488
- select.tb-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--tb-muted) 50%), linear-gradient(135deg, var(--tb-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: var(--tb-space-6); }
489
- .tb-input::placeholder { color: var(--tb-muted); opacity: 0.8; }
490
- .tb-input:hover { border-color: var(--tb-muted); }
491
- .tb-input:focus { outline: none; border-color: var(--tb-primary); box-shadow: 0 0 0 3px var(--tb-focus-ring); }
492
- .tb-input[readonly] { background: color-mix(in srgb, var(--tb-muted) 12%, transparent); border-color: transparent; color: var(--tb-muted); cursor: default; }
493
- .tb-input[readonly]:focus { border-color: var(--tb-muted); box-shadow: none; }
494
- .tb-invalid .tb-input { border-color: var(--tb-danger); }
495
- .tb-invalid .tb-input:focus { box-shadow: 0 0 0 3px var(--tb-danger-soft); }
496
- .tb-error { color: var(--tb-danger); font-size: 13px; min-height: 0; }
497
- .tb-error:empty { display: none; }
498
- .tb-hint { color: var(--tb-muted); font-size: 13px; }
499
- .tb-pending .tb-input { background-image: linear-gradient(90deg, transparent, var(--tb-primary-soft), transparent); background-size: 200% 100%; animation: tb-pending 1.2s linear infinite; }
500
- @keyframes tb-pending { from { background-position: 200% 0; } to { background-position: -200% 0; } }
501
-
502
- .tb-check-row { display: flex; }
503
- .tb-check { display: inline-flex; align-items: center; gap: var(--tb-space-3); min-height: var(--tb-control); cursor: pointer; }
504
- .tb-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--tb-primary); cursor: pointer; }
505
- .tb-check input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); border-radius: 4px; }
506
- .tb-check input[type="radio"]:focus-visible { border-radius: 50%; }
507
- .tb-radios { display: flex; flex-wrap: wrap; column-gap: var(--tb-space-5); }
508
- .tb-radio-group { flex-basis: 100%; }
509
- .tb-radio-title { display: block; margin-top: var(--tb-space-2); font-size: 13px; font-weight: 600; color: var(--tb-muted); }
510
- .tb-switch input {
511
- appearance: none;
512
- width: 36px;
513
- height: 20px;
514
- flex: none;
515
- border-radius: 10px;
516
- background: var(--tb-muted);
517
- position: relative;
518
- transition: background var(--tb-fast) var(--tb-ease);
519
- }
520
- .tb-switch input::before {
521
- content: "";
522
- position: absolute;
523
- top: 2px;
524
- left: 2px;
525
- width: 16px;
526
- height: 16px;
527
- border-radius: 50%;
528
- background: var(--tb-surface);
529
- box-shadow: var(--tb-shadow-1);
530
- transition: transform var(--tb-fast) var(--tb-ease);
531
- }
532
- .tb-switch input:checked { background: var(--tb-primary); }
533
- .tb-switch input:checked::before { transform: translateX(16px); }
534
- .tb-switch input:focus-visible { border-radius: 10px; }
535
- .tb-check input:disabled, .tb-check input:disabled + span { opacity: 0.45; cursor: not-allowed; }
536
-
537
- .tb-actions { display: flex; flex-wrap: wrap; gap: var(--tb-space-3); padding-top: var(--tb-space-2); }
538
- .tb-button {
539
- font: inherit;
540
- font-weight: 600;
541
- font-size: 14px;
542
- min-height: var(--tb-control);
543
- padding: 0 var(--tb-space-5);
544
- border-radius: var(--tb-radius);
545
- border: var(--tb-line) solid var(--tb-border-strong);
546
- background: var(--tb-surface);
547
- color: var(--tb-text);
548
- cursor: pointer;
549
- display: inline-flex;
550
- align-items: center;
551
- justify-content: center;
552
- gap: var(--tb-space-2);
553
- transition: background var(--tb-fast) var(--tb-ease), border-color var(--tb-fast) var(--tb-ease), box-shadow var(--tb-fast) var(--tb-ease), opacity var(--tb-fast) var(--tb-ease);
554
- }
555
- .tb-button.tb-small { font-size: 13px; padding: 0 var(--tb-space-3); gap: var(--tb-space-1); }
556
- .tb-button:hover { background: var(--tb-bg); border-color: var(--tb-muted); }
557
- .tb-button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
558
- .tb-button.tb-primary { background: var(--tb-primary); border-color: var(--tb-primary); color: var(--tb-on-primary); box-shadow: var(--tb-shadow-1); }
559
- .tb-button.tb-primary:hover { background: var(--tb-primary-hover); border-color: var(--tb-primary-hover); }
560
- .tb-button.tb-accent { background: var(--tb-accent); border-color: var(--tb-accent); color: var(--tb-on-accent); }
561
- .tb-button.tb-danger { background: var(--tb-danger); border-color: var(--tb-danger); color: var(--tb-on-danger); }
562
- .tb-button:disabled, .tb-button[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
563
- .tb-button.tb-primary[aria-disabled="true"]:hover { background: var(--tb-primary); border-color: var(--tb-primary); }
564
- .tb-button.tb-has-icon:not(:has(> span:not(:empty))) { padding: 0; width: var(--tb-control); }
565
- /* a button that opens a menu: a chevron after its text, or alone after its icon */
566
- .tb-menu-chevron { transition: transform var(--tb-fast) var(--tb-ease); }
567
- .tb-button .tb-menu-chevron { width: 16px; height: 16px; margin-inline-end: calc(var(--tb-space-1) * -1); }
568
- [aria-expanded="true"] > .tb-menu-chevron { transform: rotate(180deg); }
569
- .tb-button.tb-has-icon[aria-haspopup]:not(:has(> span:not(:empty))) { width: auto; padding: 0 var(--tb-space-2); gap: 2px; }
570
-
571
- .tb-icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: var(--tb-icon-stroke); stroke-linecap: var(--tb-icon-cap); stroke-linejoin: var(--tb-icon-join); }
572
- .tb-button .tb-icon { width: 18px; height: 18px; }
573
- .tb-icon-face { display: inline-flex; align-self: flex-start; color: var(--tb-text); }
574
- .tb-icon-face .tb-icon { width: 24px; height: 24px; }
575
- .tb-icon-face.tb-small .tb-icon { width: 18px; height: 18px; }
576
- .tb-icon-face.tb-large .tb-icon { width: 32px; height: 32px; }
577
- .tb-icon-face.tb-muted { color: var(--tb-muted); }
578
- .tb-icon-face.tb-primary { color: var(--tb-primary); }
579
- .tb-icon-face.tb-accent { color: var(--tb-accent); }
580
- .tb-icon-face.tb-danger { color: var(--tb-danger); }
581
- .tb-icon-face.tb-success { color: var(--tb-success); }
582
- .tb-icon-face.tb-warning { color: var(--tb-warning); }
583
- .tb-input-icon { position: relative; display: flex; }
584
- .tb-input-icon > .tb-icon { position: absolute; left: var(--tb-space-3); top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--tb-muted); pointer-events: none; }
585
- .tb-input-icon > .tb-input { padding-left: calc(var(--tb-space-3) + 26px); }
586
- .tb-upload { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-space-3); padding: var(--tb-space-3); border: 1px dashed var(--tb-border-strong); border-radius: var(--tb-radius); background: var(--tb-surface); transition: border-color var(--tb-fast) var(--tb-ease), background var(--tb-fast) var(--tb-ease); }
587
- .tb-upload.tb-drop-over { border-color: var(--tb-primary); background: var(--tb-primary-soft); }
588
- .tb-invalid .tb-upload { border-color: var(--tb-danger); }
589
- .tb-upload-hint { color: var(--tb-muted); font-size: 0.9em; }
590
- .tb-upload[hidden] { display: none; }
591
- .tb-upload[hidden] + .tb-upload-list { margin-top: 0; }
592
- .tb-upload-list { list-style: none; margin: var(--tb-space-2) 0 0; padding: 0; display: grid; gap: var(--tb-space-1); }
593
- .tb-upload-list li { display: flex; align-items: center; gap: var(--tb-space-2); min-height: 36px; padding: 0 var(--tb-space-1) 0 var(--tb-space-3); border: var(--tb-line) solid var(--tb-border); border-radius: var(--tb-radius); background: var(--tb-surface); }
594
- .tb-upload-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
595
- a.tb-upload-name { color: var(--tb-primary); text-decoration: none; }
596
- a.tb-upload-name:hover { text-decoration: underline; }
597
- .tb-upload-thumb { width: 32px; height: 32px; margin: var(--tb-space-1) 0; object-fit: cover; border-radius: var(--tb-radius); flex: none; }
598
- .tb-upload-size { color: var(--tb-muted); font-size: 0.9em; font-variant-numeric: tabular-nums; }
599
- .tb-upload-remove { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--tb-radius); background: transparent; color: var(--tb-muted); cursor: pointer; }
600
- .tb-upload-remove:hover:not(:disabled) { background: var(--tb-danger-soft); color: var(--tb-danger); }
601
- .tb-upload-remove:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
602
- .tb-upload-remove .tb-icon { width: 16px; height: 16px; }
603
- .tb-date { position: relative; display: flex; }
604
- .tb-date > .tb-input { padding-right: calc(var(--tb-control) + var(--tb-space-1)); }
605
- .tb-date-button { position: absolute; right: 1px; top: 1px; bottom: 1px; width: var(--tb-control); display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--tb-radius); background: transparent; color: var(--tb-muted); cursor: pointer; }
606
- .tb-date-button:hover:not(:disabled) { color: var(--tb-text); }
607
- .tb-date-button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
608
- .tb-date-button:disabled { cursor: default; opacity: 0.5; }
609
- .tb-date-button .tb-icon { width: 18px; height: 18px; }
610
- .tb-tree-wrap { min-width: 0; }
611
- .tb-tree, .tb-tree ul { list-style: none; margin: 0; padding: 0; }
612
- .tb-tree li { outline: none; }
613
- .tb-tree-row {
614
- display: flex;
615
- align-items: center;
616
- gap: var(--tb-space-1);
617
- min-height: calc(var(--tb-control) - 8px);
618
- padding: 0 var(--tb-space-2) 0 calc(var(--tb-level, 0) * 20px + var(--tb-space-1));
619
- border-radius: var(--tb-radius);
620
- cursor: pointer;
621
- user-select: none;
622
- transition: background var(--tb-fast) var(--tb-ease);
623
- }
624
- .tb-tree-row:hover { background: var(--tb-bg); }
625
- .tb-tree li:focus-visible > .tb-tree-row { box-shadow: inset 0 0 0 2px var(--tb-focus); }
626
- .tb-tree li.tb-selected > .tb-tree-row { background: var(--tb-primary-soft); font-weight: 550; }
627
- .tb-tree-toggle { display: inline-flex; flex: none; width: 20px; height: 20px; align-items: center; justify-content: center; color: var(--tb-muted); border-radius: var(--tb-radius); }
628
- .tb-tree-toggle .tb-icon { width: 16px; height: 16px; transition: transform var(--tb-fast) var(--tb-ease); }
629
- .tb-tree li:not([aria-expanded]) > .tb-tree-row > .tb-tree-toggle { visibility: hidden; }
630
- .tb-tree li[aria-expanded="true"] > .tb-tree-row > .tb-tree-toggle .tb-icon { transform: rotate(90deg); }
631
- .tb-tree-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
632
- .tb-tree-row.tb-drop-over { box-shadow: inset 0 0 0 2px var(--tb-primary); }
633
-
634
- .tb-toolbar {
635
- display: flex;
636
- flex-wrap: wrap;
637
- align-items: center;
638
- gap: var(--tb-space-1);
639
- padding: var(--tb-space-1);
640
- background: var(--tb-surface);
641
- border: var(--tb-line) solid var(--tb-border);
642
- border-radius: var(--tb-radius-lg);
643
- }
644
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger) { border-color: transparent; background: transparent; }
645
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):hover { background: var(--tb-bg); }
646
- .tb-toolbar > .tb-button { padding: 0 var(--tb-space-3); }
647
- .tb-toolbar > .tb-divider { width: 0; height: calc(var(--tb-control) - 12px); margin: 0 var(--tb-space-1); border-top: 0; border-left: var(--tb-line) solid var(--tb-border); }
648
-
649
- .tb-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-space-1); margin: 0; padding: 0; list-style: none; font-size: 14px; }
650
- .tb-breadcrumb li { display: inline-flex; align-items: center; gap: var(--tb-space-1); min-width: 0; }
651
- .tb-breadcrumb li + li::before { content: "›" / ""; color: var(--tb-muted); padding: 0 var(--tb-space-1); }
652
- .tb-crumb { font: inherit; color: var(--tb-muted); background: none; border: 0; padding: var(--tb-space-1); border-radius: var(--tb-radius); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 24ch; }
653
- button.tb-crumb { cursor: pointer; }
654
- button.tb-crumb:hover { color: var(--tb-text); text-decoration: underline; text-underline-offset: 3px; }
655
- button.tb-crumb:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
656
- .tb-crumb[aria-current] { color: var(--tb-text); font-weight: 600; }
657
- .tb-crumb-more { display: none !important; }
658
-
659
- .tb-link { display: inline-flex; align-items: center; gap: var(--tb-space-1); color: var(--tb-primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
660
-
661
- .tb-hidden { display: none !important; }
662
- /* read by screen readers, not shown */
663
- .tb-sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
664
- @media (min-width: 641px) { .tb-narrow-only { display: none !important; } }
665
-
666
- .tb-scroll {
667
- display: flex;
668
- flex-direction: column;
669
- gap: var(--tb-space-4);
670
- min-width: 0;
671
- max-height: 400px;
672
- overflow: auto;
673
- overscroll-behavior: contain;
674
- padding: var(--tb-space-3);
675
- border: var(--tb-line) solid var(--tb-border);
676
- border-radius: var(--tb-radius);
677
- }
678
- .tb-scroll.tb-small { max-height: 240px; font-size: inherit; }
679
- .tb-scroll.tb-large { max-height: 640px; }
680
- .tb-scroll:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
681
-
682
- .tb-image { display: block; max-width: 100%; height: auto; border-radius: var(--tb-radius); object-fit: cover; }
683
- .tb-image.tb-round { aspect-ratio: 1; border-radius: 50%; }
684
- .tb-video { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: auto 16 / 9; border-radius: var(--tb-radius); }
685
- .tb-audio { display: block; width: 100%; max-width: 480px; }
686
- :is(.tb-video, .tb-audio).tb-small { width: 320px; }
687
- :is(.tb-video, .tb-audio).tb-medium { width: 480px; }
688
- .tb-video.tb-large { width: 720px; }
689
- :is(.tb-video, .tb-audio).tb-fill { max-width: none; }
690
- :is(.tb-video, .tb-audio):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
691
- .tb-canvas { display: block; max-width: 100%; }
692
- .tb-canvas > svg { display: block; max-width: 100%; height: auto; overflow: visible; }
693
- .tb-canvas.tb-fill > svg { width: 100%; }
694
- .tb-chart { display: flex; flex-direction: column; gap: var(--tb-space-2); align-self: stretch; width: 100%; margin: 0; min-width: 0; }
695
- .tb-chart-caption { font-weight: 600; }
696
- .tb-chart-plot { width: 100%; min-width: 0; }
697
- .tb-chart-plot > svg { display: block; width: 100%; height: auto; overflow: visible; }
698
- .tb-chart-legend { display: flex; flex-wrap: wrap; gap: var(--tb-space-1) var(--tb-space-4); margin: 0; padding: 0; list-style: none; color: var(--tb-muted); font-size: 13px; }
699
- .tb-chart-key { display: inline-flex; align-items: center; gap: var(--tb-space-2); }
700
- .tb-chart-swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--tb-swatch); }
701
- .tb-chart-empty { margin: 0; color: var(--tb-muted); }
702
- .tb-chart-caption[hidden], .tb-chart-plot[hidden], .tb-chart-legend[hidden], .tb-chart-empty[hidden] { display: none; }
703
- .tb-orbit { position: relative; align-self: stretch; width: 100%; min-width: 0; height: 480px; border-radius: var(--tb-radius);
704
- background: radial-gradient(ellipse at 50% 45%, color-mix(in oklch, var(--tb-primary) 7%, transparent) 0%, transparent 70%); }
705
- .tb-orbit.tb-small { height: 320px; }
706
- .tb-orbit.tb-large { height: 640px; }
707
- .tb-orbit.tb-fit { height: auto; min-height: 320px; }
708
- .tb-orbit > svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; user-select: none; touch-action: none; outline: none; }
709
- .tb-orbit > svg.tb-orbit-panning { cursor: grabbing; }
710
- .tb-orbit > svg:focus-visible { box-shadow: inset 0 0 0 3px var(--tb-focus-ring); border-radius: var(--tb-radius); }
711
- .tb-orbit-node { cursor: pointer; outline: none; }
712
- .tb-orbit-focus { cursor: default; }
713
- .tb-orbit-body { vector-effect: non-scaling-stroke; transition: stroke-width .2s; }
714
- .tb-orbit-node:hover .tb-orbit-body, .tb-orbit-node:focus-visible .tb-orbit-body { stroke-width: 3; }
715
- .tb-orbit-node:focus-visible .tb-orbit-body { stroke: var(--tb-focus); }
716
- .tb-orbit-halo { opacity: .55; transition: opacity .25s; pointer-events: none; }
717
- .tb-orbit-node:hover .tb-orbit-halo, .tb-orbit-node:focus-visible .tb-orbit-halo { opacity: 1; }
718
- .tb-orbit-node text { pointer-events: none; fill: var(--tb-text); text-anchor: middle; dominant-baseline: middle; font-family: var(--tb-font); }
719
- .tb-orbit-node .tb-orbit-count { fill: var(--tb-muted); }
720
- .tb-orbit-line, .tb-orbit-step { fill: none; vector-effect: non-scaling-stroke; pointer-events: none; }
721
- .tb-orbit-line { stroke-width: 1; }
722
- .tb-orbit-step { stroke-linecap: round; }
723
- .tb-orbit-spin { animation: tb-orbit-spin 60s linear infinite; }
724
- .tb-orbit-spin.tb-orbit-rev { animation-direction: reverse; animation-duration: 90s; }
725
- .tb-orbit-spin.tb-orbit-fast { animation-duration: 24s; }
726
- @keyframes tb-orbit-spin { to { transform: rotate(360deg); } }
727
- .tb-orbit-now { animation: tb-orbit-pulse 1.8s ease-in-out infinite; }
728
- @keyframes tb-orbit-pulse { 50% { opacity: .35; } }
729
- .tb-orbit-edge { fill: none; pointer-events: none; }
730
- .tb-orbit-edge-solid, .tb-orbit-edge-dashed { stroke: var(--tb-accent); stroke-width: 1.4; stroke-opacity: .7; }
731
- .tb-orbit-edge-dashed { stroke-dasharray: 5 5; }
732
- .tb-orbit-edge-faint { stroke: var(--tb-muted); stroke-width: 1; stroke-opacity: .35; }
733
- .tb-orbit-edge-trail { stroke: var(--tb-muted); stroke-width: 1; stroke-opacity: .5; stroke-dasharray: 2 6; }
734
- .tb-orbit-label { font-size: 11px; font-family: var(--tb-font); fill: var(--tb-muted); text-anchor: middle; pointer-events: none;
735
- paint-order: stroke; stroke: var(--tb-bg); stroke-width: 3px; letter-spacing: .02em; }
736
- .tb-orbit-label.tb-orbit-later { visibility: hidden; }
737
- .tb-orbit-label.tb-orbit-later.tb-orbit-shown { visibility: visible; }
738
- .tb-image.tb-small { width: 96px; }
739
- .tb-image.tb-medium { width: 240px; }
740
- .tb-image.tb-large { width: 480px; }
741
- .tb-image.tb-fill { width: 100%; }
742
-
743
- .tb-progress-wrap { display: flex; flex-direction: column; gap: var(--tb-space-2); min-width: 0; }
744
- .tb-progress-label { font-size: 14px; font-weight: 550; }
745
- .tb-progress-label[hidden] { display: none; }
746
- .tb-progress { height: 8px; border-radius: 4px; background: var(--tb-border); overflow: hidden; }
747
- .tb-upload-progress { height: 6px; }
748
- .tb-widget { display: block; width: 100%; min-width: 0; }
749
- .tb-photo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-space-4); margin: calc(-1 * var(--tb-space-2)); padding: var(--tb-space-2); border: 1px dashed transparent; border-radius: var(--tb-radius-lg); transition: border-color var(--tb-fast) var(--tb-ease), background var(--tb-fast) var(--tb-ease); }
750
- .tb-photo.tb-drop-over { border-color: var(--tb-primary); background: var(--tb-primary-soft); }
751
- .tb-photo-frame { flex: none; width: 96px; height: 96px; display: grid; place-items: center; overflow: hidden; border: var(--tb-line) solid var(--tb-border); border-radius: var(--tb-radius-lg); background: var(--tb-bg); color: var(--tb-muted); }
752
- .tb-photo-frame.tb-photo-pick { cursor: pointer; }
753
- .tb-photo-frame.tb-round { border-radius: 50%; }
754
- .tb-photo-frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }
755
- .tb-photo-frame > .tb-icon { width: 32px; height: 32px; }
756
- .tb-invalid .tb-photo-frame { border-color: var(--tb-danger); }
757
- .tb-photo-actions { display: flex; flex-wrap: wrap; gap: var(--tb-space-2); }
758
- .tb-photo-actions[hidden], .tb-photo-remove[hidden] { display: none; }
759
- .tb-upload-progress[hidden] { display: none; }
760
- .tb-progress-bar { height: 100%; width: 0; border-radius: inherit; background: var(--tb-primary); transition: width 300ms var(--tb-ease); }
761
- .tb-success .tb-progress-bar { background: var(--tb-success); }
762
- .tb-warning .tb-progress-bar { background: var(--tb-warning); }
763
- .tb-danger .tb-progress-bar { background: var(--tb-danger); }
764
- .tb-accent .tb-progress-bar { background: var(--tb-accent); }
765
- .tb-indeterminate .tb-progress-bar { width: 35%; animation: tb-indeterminate 1.4s var(--tb-ease) infinite; }
766
- @keyframes tb-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
767
-
768
- /* tables: rows become cards on narrow screens */
769
- .tb-table-wrap, .tb-list-wrap { min-width: 0; }
770
- .tb-table-wrap {
771
- overflow-x: auto;
772
- background: var(--tb-surface);
773
- border: var(--tb-line) solid var(--tb-border);
774
- border-radius: var(--tb-radius-lg);
775
- box-shadow: var(--tb-shadow-1);
776
- }
777
- .tb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
778
- .tb-table th {
779
- text-align: left;
780
- font-size: 13px;
781
- font-weight: 600;
782
- color: var(--tb-muted);
783
- white-space: nowrap;
784
- padding: var(--tb-space-3) var(--tb-space-4);
785
- background: var(--tb-bg);
786
- border-bottom: var(--tb-line) solid var(--tb-border);
787
- }
788
- .tb-table td { padding: var(--tb-space-3) var(--tb-space-4); border-bottom: var(--tb-line) solid var(--tb-border); height: var(--tb-control); }
789
- .tb-table tbody tr:last-child td { border-bottom: 0; }
790
- .tb-table .tb-num { text-align: right; font-variant-numeric: tabular-nums; }
791
- .tb-table-wrap:has(tbody:empty) thead { display: none; }
792
- /* the room of the rows a long table does not draw */
793
- .tb-table .tb-room[hidden] { display: none; }
794
- .tb-table.tb-fixed { table-layout: fixed; }
795
- .tb-table .tb-room :is(tr, td) { padding: 0; border: 0; margin: 0; background: none; box-shadow: none; }
796
- .tb-table th:has(> .tb-sort) { padding: 0; }
797
- .tb-sort {
798
- display: flex;
799
- align-items: center;
800
- gap: var(--tb-space-1);
801
- width: 100%;
802
- padding: var(--tb-space-3) var(--tb-space-4);
803
- border: 0;
804
- background: none;
805
- font: inherit;
806
- color: inherit;
807
- text-align: inherit;
808
- cursor: pointer;
809
- border-radius: 0;
810
- }
811
- .tb-sort:hover, th[aria-sort] > .tb-sort { color: var(--tb-text); }
812
- .tb-sort:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--tb-focus); }
813
- .tb-sort svg { width: 14px; height: 14px; flex: none; }
814
- .tb-sort .tb-sort-idle { opacity: 0; transition: opacity var(--tb-fast) var(--tb-ease); }
815
- .tb-sort:hover .tb-sort-idle, .tb-sort:focus-visible .tb-sort-idle { opacity: 0.5; }
816
- .tb-table tfoot[hidden] { display: none !important; }
817
- .tb-table tfoot td {
818
- font-weight: 600;
819
- background: var(--tb-bg);
820
- border-top: var(--tb-line) solid var(--tb-border);
821
- border-bottom: 0;
822
- }
823
- .tb-selectable tbody:not(.tb-room) tr:not(.tb-group-head, .tb-group-foot), .tb-selectable .tb-list > li:not(.tb-group-head, .tb-group-foot) { cursor: pointer; transition: background var(--tb-fast) var(--tb-ease); }
824
- .tb-selectable tbody:not(.tb-room) tr:not(.tb-group-head, .tb-group-foot):hover, .tb-selectable .tb-list > li:not(.tb-group-head, .tb-group-foot):hover { background: var(--tb-bg); }
825
- .tb-selectable tbody tr:focus-visible, .tb-selectable .tb-list > li:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--tb-focus); }
826
- .tb-table tr.tb-selected, .tb-list > li.tb-selected { background: var(--tb-primary-soft); }
827
- /* the head and foot of a group in the rows: a title the width of the row, and its subtotals */
828
- .tb-table .tb-group-head > th { font-size: 14px; color: var(--tb-text); white-space: normal; background: var(--tb-bg); border-top: var(--tb-line) solid var(--tb-border); }
829
- .tb-table .tb-group-head.tb-level-2 > th { font-weight: 500; background: var(--tb-surface); }
830
- .tb-table .tb-group-foot > td { font-weight: 600; background: var(--tb-bg); }
831
- .tb-table .tb-level-2 > :first-child, .tb-list > .tb-level-2 { padding-left: calc(var(--tb-space-4) + var(--tb-space-5)); }
832
- .tb-list > li.tb-group-head { font-weight: 600; background: var(--tb-bg); }
833
- .tb-list > li.tb-group-foot { font-weight: 600; }
834
- .tb-empty { margin: 0; padding: var(--tb-space-6) var(--tb-space-4); text-align: center; color: var(--tb-muted); }
835
- .tb-empty[hidden] { display: none; }
836
-
837
- .tb-list {
838
- list-style: none;
839
- margin: 0;
840
- padding: 0;
841
- background: var(--tb-surface);
842
- border: var(--tb-line) solid var(--tb-border);
843
- border-radius: var(--tb-radius-lg);
844
- box-shadow: var(--tb-shadow-1);
845
- overflow: hidden;
846
- }
847
- .tb-list:empty { display: none; }
848
- .tb-list > li {
849
- display: flex;
850
- align-items: center;
851
- gap: var(--tb-space-3);
852
- min-height: var(--tb-control);
853
- padding: var(--tb-space-3) var(--tb-space-4);
854
- border-bottom: var(--tb-line) solid var(--tb-border);
855
- }
856
- .tb-list > li:last-child { border-bottom: 0; }
857
- .tb-list-texts { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
858
- .tb-list-primary { font-weight: 550; }
859
- /* the picture of a row, in a column of images or at the start of a list's item */
860
- .tb-thumb { display: block; flex: none; width: 40px; height: 40px; object-fit: cover; border-radius: var(--tb-radius); background: var(--tb-bg); }
861
- .tb-thumb.tb-round { border-radius: 50%; }
862
- .tb-table td.tb-thumb-cell { width: 1%; padding-top: var(--tb-space-1); padding-bottom: var(--tb-space-1); }
863
- .tb-list-secondary { color: var(--tb-muted); font-size: 13px; }
864
- .tb-list-secondary:empty { display: none; }
865
-
866
- /* dialogs: centered window, full screen when narrow */
867
- .tb-dialog {
868
- border: 0;
869
- padding: 0;
870
- width: min(560px, calc(100vw - 32px));
871
- max-height: calc(100vh - 64px);
872
- background: var(--tb-raised);
873
- color: var(--tb-text);
874
- border-radius: var(--tb-radius-lg);
875
- box-shadow: var(--tb-shadow-3);
876
- }
877
- .tb-dialog[open] { display: flex; flex-direction: column; animation: tb-rise 180ms var(--tb-ease); }
878
- .tb-dialog::backdrop { background: var(--tb-overlay); }
879
- .tb-dialog-head {
880
- display: flex;
881
- align-items: center;
882
- justify-content: space-between;
883
- gap: var(--tb-space-3);
884
- padding: var(--tb-space-4) var(--tb-space-4) 0 var(--tb-space-6);
885
- }
886
- .tb-dialog-title { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
887
- .tb-dialog-close {
888
- font: inherit;
889
- font-size: 22px;
890
- line-height: 1;
891
- width: var(--tb-control);
892
- height: var(--tb-control);
893
- flex: none;
894
- border: 0;
895
- border-radius: var(--tb-radius);
896
- background: transparent;
897
- color: var(--tb-muted);
898
- cursor: pointer;
899
- }
900
- .tb-dialog-close:hover { background: var(--tb-bg); color: var(--tb-text); }
901
- .tb-dialog-close:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
902
- .tb-dialog-body {
903
- display: flex;
904
- flex-direction: column;
905
- gap: var(--tb-space-4);
906
- padding: var(--tb-space-4) var(--tb-space-6) var(--tb-space-6);
907
- overflow: auto;
908
- }
909
- .tb-dialog.tb-confirm { width: min(420px, calc(100vw - 32px)); }
910
- .tb-dialog.tb-confirm > .tb-dialog-body { padding-top: var(--tb-space-6); gap: var(--tb-space-6); }
911
- .tb-confirm-question { margin: 0; font-size: 15px; line-height: 1.5; }
912
- @keyframes tb-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
913
-
914
- /* tabs */
915
- .tb-tabs { display: flex; flex-direction: column; gap: var(--tb-space-5); min-width: 0; }
916
- .tb-tablist { display: flex; gap: var(--tb-space-1); box-shadow: inset 0 -1px 0 var(--tb-border); overflow-x: auto; scrollbar-width: none; }
917
- .tb-tab {
918
- font: inherit;
919
- font-size: 14px;
920
- font-weight: 550;
921
- min-height: var(--tb-control);
922
- padding: 0 var(--tb-space-4);
923
- border: 0;
924
- border-bottom: 2px solid transparent;
925
- background: transparent;
926
- color: var(--tb-muted);
927
- cursor: pointer;
928
- white-space: nowrap;
929
- transition: color var(--tb-fast) var(--tb-ease), border-color var(--tb-fast) var(--tb-ease);
930
- }
931
- .tb-tab:hover { color: var(--tb-text); }
932
- .tb-tab[aria-selected="true"] { color: var(--tb-primary); border-bottom-color: var(--tb-primary); }
933
- .tb-tab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--tb-focus-ring); border-radius: var(--tb-radius) var(--tb-radius) 0 0; }
934
- .tb-tab-panel { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
935
- .tb-tab-panel[hidden] { display: none; }
936
-
937
- /* split: two panes and a handle; one pane at a time when narrow */
938
- .tb-split { display: grid; grid-template-columns: minmax(0, var(--tb-split, 40%)) auto minmax(0, 1fr); align-items: start; }
939
- .tb-split-pane { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
940
- .tb-split-pane:focus { outline: none; }
941
- .tb-split-handle {
942
- align-self: stretch;
943
- width: var(--tb-space-5);
944
- cursor: col-resize;
945
- touch-action: none;
946
- display: flex;
947
- justify-content: center;
948
- border-radius: var(--tb-radius);
949
- }
950
- .tb-split-handle::before { content: ""; width: 1px; background: var(--tb-border); transition: background var(--tb-fast) var(--tb-ease), width var(--tb-fast) var(--tb-ease); }
951
- .tb-split-handle:hover::before { width: 3px; background: var(--tb-border-strong); }
952
- .tb-split-handle:focus-visible { outline: none; }
953
- .tb-split-handle:focus-visible::before { width: 3px; background: var(--tb-focus); }
954
- .tb-split-back { display: none; }
955
-
956
- /* the calendar of a date field: in the top layer, placed by the host */
957
- .tb-calendar {
958
- position: fixed;
959
- inset: auto;
960
- margin: 0;
961
- padding: var(--tb-space-3);
962
- background: var(--tb-raised);
963
- color: var(--tb-text);
964
- border: var(--tb-line) solid var(--tb-border);
965
- border-radius: var(--tb-radius-lg);
966
- box-shadow: var(--tb-shadow-3);
967
- animation: tb-pop 120ms var(--tb-ease);
968
- }
969
- .tb-calendar-head { display: flex; align-items: center; gap: var(--tb-space-2); margin-bottom: var(--tb-space-2); }
970
- .tb-calendar-month { flex: 1; margin: 0; font-size: 1em; font-weight: 600; text-align: center; }
971
- .tb-calendar-month::first-letter { text-transform: uppercase; }
972
- .tb-calendar-step { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--tb-radius); background: transparent; color: var(--tb-muted); cursor: pointer; }
973
- .tb-calendar-step:hover { background: var(--tb-bg); color: var(--tb-text); }
974
- .tb-calendar-step:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
975
- .tb-calendar-step .tb-icon { width: 18px; height: 18px; }
976
- .tb-calendar-grid { border-collapse: collapse; }
977
- .tb-calendar-grid th { width: 36px; height: 28px; font-size: 0.8em; font-weight: 500; color: var(--tb-muted); text-transform: uppercase; }
978
- .tb-calendar-day { width: 36px; height: 36px; padding: 0; text-align: center; border-radius: var(--tb-radius); cursor: pointer; font-variant-numeric: tabular-nums; transition: background var(--tb-fast) var(--tb-ease); }
979
- .tb-calendar-day:hover { background: var(--tb-bg); }
980
- .tb-calendar-day:focus { outline: none; box-shadow: inset 0 0 0 2px var(--tb-focus); }
981
- .tb-calendar-other { color: var(--tb-muted); }
982
- .tb-calendar-day[aria-current="date"] { font-weight: 700; color: var(--tb-primary); }
983
- .tb-calendar-day[aria-selected="true"] { background: var(--tb-primary); color: var(--tb-on-primary); }
984
- .tb-calendar-day[aria-disabled="true"] { color: var(--tb-border-strong); background: transparent; cursor: default; text-decoration: line-through; }
985
-
986
- /* menus: in the top layer, placed by the host */
987
- .tb-lookup { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-space-1); }
988
- .tb-lookup .tb-input { flex: 1; min-width: 8em; width: auto; }
989
- .tb-lookup-chosen { list-style: none; margin: 0; padding: 0; display: contents; }
990
- .tb-lookup-chip { display: inline-flex; align-items: center; gap: var(--tb-space-1); min-height: 32px; padding: 0 var(--tb-space-1) 0 var(--tb-space-3); border: var(--tb-line) solid var(--tb-border); border-radius: var(--tb-radius); background: var(--tb-surface); }
991
- .tb-lookup-chip:not(:has(button)) { padding-right: var(--tb-space-3); }
992
- .tb-lookup-list {
993
- position: fixed;
994
- inset: auto;
995
- margin: 0;
996
- padding: var(--tb-space-1);
997
- list-style: none;
998
- max-height: 280px;
999
- overflow-y: auto;
1000
- color: var(--tb-text);
1001
- background: var(--tb-raised);
1002
- border: var(--tb-line) solid var(--tb-border);
1003
- border-radius: var(--tb-radius-lg);
1004
- box-shadow: var(--tb-shadow-3);
1005
- }
1006
- .tb-lookup-option { padding: var(--tb-space-2) var(--tb-space-3); border-radius: var(--tb-radius); cursor: pointer; }
1007
- .tb-lookup-option:hover, .tb-lookup-option[aria-selected="true"] { background: var(--tb-primary-soft); }
1008
- .tb-lookup-none { padding: var(--tb-space-2) var(--tb-space-3); color: var(--tb-muted); }
1009
-
1010
- .tb-menu {
1011
- position: fixed;
1012
- inset: auto;
1013
- margin: 0;
1014
- min-width: 180px;
1015
- max-width: min(320px, calc(100vw - 16px));
1016
- max-height: calc(100vh - 16px);
1017
- overflow-y: auto;
1018
- padding: var(--tb-space-1);
1019
- background: var(--tb-raised);
1020
- color: var(--tb-text);
1021
- border: var(--tb-line) solid var(--tb-border);
1022
- border-radius: var(--tb-radius);
1023
- box-shadow: var(--tb-shadow-3);
1024
- animation: tb-pop 120ms var(--tb-ease);
1025
- }
1026
- .tb-menu-item {
1027
- display: flex;
1028
- align-items: center;
1029
- gap: var(--tb-space-3);
1030
- width: 100%;
1031
- min-height: 36px;
1032
- padding: 0 var(--tb-space-3);
1033
- border: 0;
1034
- border-radius: calc(var(--tb-radius) - 2px);
1035
- background: transparent;
1036
- color: inherit;
1037
- font: inherit;
1038
- font-size: 14px;
1039
- text-align: left;
1040
- cursor: pointer;
1041
- }
1042
- .tb-menu-item > span:not(.tb-menu-gap) { flex: 1; }
1043
- .tb-menu-item svg { width: 16px; height: 16px; flex: none; color: var(--tb-muted); }
1044
- .tb-menu-gap { width: 16px; flex: none; }
1045
- .tb-menu-item:focus { outline: none; background: var(--tb-primary-soft); }
1046
- .tb-menu-item[aria-expanded="true"] { background: var(--tb-bg); }
1047
- .tb-menu-divider { height: 1px; margin: var(--tb-space-1) calc(-1 * var(--tb-space-1)); background: var(--tb-border); }
1048
- @keyframes tb-pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
1049
-
1050
- /* drag and drop */
1051
- .tb-drag-active, .tb-drag-active * { user-select: none; cursor: grabbing !important; }
1052
- .tb-dragging { opacity: 0.4; }
1053
- .tb-drop-zone { min-height: var(--tb-control); }
1054
- .tb-drop-over { outline: 2px dashed var(--tb-focus-ring); outline-offset: 4px; border-radius: var(--tb-radius); }
1055
- .tb-drop-line {
1056
- position: fixed;
1057
- height: 2px;
1058
- border-radius: 1px;
1059
- background: var(--tb-primary);
1060
- pointer-events: none;
1061
- z-index: 2147483647;
1062
- }
1063
- .tb-drop-line.tb-across { width: 2px; }
1064
- .tb-drag-ghost {
1065
- position: fixed;
1066
- left: 0;
1067
- top: 0;
1068
- max-width: 240px;
1069
- overflow: hidden;
1070
- text-overflow: ellipsis;
1071
- white-space: nowrap;
1072
- padding: var(--tb-space-2) var(--tb-space-3);
1073
- background: var(--tb-raised);
1074
- color: var(--tb-text);
1075
- border: var(--tb-line) solid var(--tb-border);
1076
- border-radius: var(--tb-radius);
1077
- box-shadow: var(--tb-shadow-3);
1078
- font-size: 14px;
1079
- font-weight: 500;
1080
- pointer-events: none;
1081
- z-index: 2147483647;
1082
- }
1083
-
1084
- /* toasts */
1085
- .tb-toasts {
1086
- position: fixed;
1087
- inset: auto 0 var(--tb-space-5) 0;
1088
- margin: 0 auto;
1089
- width: max-content;
1090
- max-width: calc(100vw - 32px);
1091
- padding: 0;
1092
- border: 0;
1093
- background: transparent;
1094
- overflow: visible;
1095
- display: flex;
1096
- flex-direction: column;
1097
- align-items: center;
1098
- gap: var(--tb-space-2);
1099
- }
1100
- .tb-toast {
1101
- display: flex;
1102
- align-items: center;
1103
- gap: var(--tb-space-3);
1104
- padding: var(--tb-space-3) var(--tb-space-5);
1105
- min-height: var(--tb-control);
1106
- background: var(--tb-text);
1107
- color: var(--tb-bg);
1108
- border-radius: var(--tb-radius);
1109
- box-shadow: var(--tb-shadow-3);
1110
- font-size: 14px;
1111
- font-weight: 500;
1112
- cursor: pointer;
1113
- animation: tb-rise 180ms var(--tb-ease);
1114
- }
1115
- .tb-toast.tb-success::before, .tb-toast.tb-warning::before, .tb-toast.tb-primary::before {
1116
- content: "";
1117
- width: 8px;
1118
- height: 8px;
1119
- border-radius: 50%;
1120
- flex: none;
1121
- background: var(--tb-primary);
1122
- }
1123
- .tb-toast.tb-success::before { background: var(--tb-success); }
1124
- .tb-toast.tb-warning::before { background: var(--tb-warning); }
1125
- .tb-toast.tb-danger { background: var(--tb-danger); color: var(--tb-on-danger); }
1126
-
1127
- /* under trebol dev, the errors the app does not catch */
1128
- .tb-dev-errors {
1129
- position: fixed;
1130
- inset: var(--tb-space-4) var(--tb-space-4) auto;
1131
- width: auto;
1132
- max-width: 960px;
1133
- max-height: calc(100vh - 2 * var(--tb-space-4));
1134
- margin: 0 auto;
1135
- overflow: auto;
1136
- box-sizing: border-box;
1137
- padding: var(--tb-space-4) var(--tb-space-5);
1138
- border: 1px solid var(--tb-border);
1139
- border-left: 4px solid var(--tb-danger);
1140
- border-radius: var(--tb-radius);
1141
- background: var(--tb-surface);
1142
- color: var(--tb-text);
1143
- box-shadow: var(--tb-shadow-3);
1144
- font-family: var(--tb-font);
1145
- }
1146
- .tb-dev-errors header {
1147
- display: flex;
1148
- align-items: center;
1149
- justify-content: space-between;
1150
- gap: var(--tb-space-3);
1151
- margin-bottom: var(--tb-space-3);
1152
- font-weight: 600;
1153
- }
1154
- .tb-dev-errors pre {
1155
- margin: 0 0 var(--tb-space-3);
1156
- white-space: pre-wrap;
1157
- overflow-wrap: anywhere;
1158
- font: 13px/1.6 ui-monospace, Menlo, Consolas, monospace;
1159
- }
1160
-
1161
- /* under trebol dev, the dev tools: Faces, Console, Log */
1162
- .tb-dev-tools {
1163
- position: fixed;
1164
- inset: auto 0 0 0;
1165
- width: 100%;
1166
- max-width: none;
1167
- margin: 0;
1168
- padding: 0;
1169
- box-sizing: border-box;
1170
- flex-direction: column;
1171
- border: 0;
1172
- border-top: 1px solid var(--tb-border-strong);
1173
- background: var(--tb-surface);
1174
- color: var(--tb-text);
1175
- box-shadow: var(--tb-shadow-3);
1176
- font: 13px/1.5 var(--tb-font);
1177
- }
1178
- .tb-dev-tools:popover-open { display: flex; }
1179
- .tb-dev-tools :is(pre, code, .tb-dev-in, .tb-dev-node, .tb-dev-detail dd, .tb-dev-text) {
1180
- font-family: ui-monospace, Menlo, Consolas, monospace;
1181
- font-size: 12px;
1182
- }
1183
- .tb-dev-grip { height: 6px; margin-top: -3px; cursor: ns-resize; flex: none; touch-action: none; }
1184
- .tb-dev-tools header {
1185
- display: flex;
1186
- align-items: center;
1187
- gap: var(--tb-space-2);
1188
- padding: 0 var(--tb-space-3) 0 0;
1189
- border-bottom: 1px solid var(--tb-border);
1190
- flex: none;
1191
- }
1192
- .tb-dev-tabs { display: flex; }
1193
- .tb-dev-space { flex: 1; }
1194
- .tb-dev-tab, .tb-dev-button, .tb-dev-node, .tb-dev-opener {
1195
- font: inherit;
1196
- color: inherit;
1197
- cursor: pointer;
1198
- }
1199
- .tb-dev-tab {
1200
- padding: var(--tb-space-2) var(--tb-space-4);
1201
- border: 0;
1202
- border-bottom: 2px solid transparent;
1203
- background: transparent;
1204
- color: var(--tb-muted);
1205
- }
1206
- .tb-dev-tab[aria-selected="true"] { color: var(--tb-text); border-bottom-color: var(--tb-primary); font-weight: 600; }
1207
- .tb-dev-button {
1208
- padding: 2px var(--tb-space-3);
1209
- border: 1px solid var(--tb-border-strong);
1210
- border-radius: var(--tb-radius);
1211
- background: var(--tb-bg);
1212
- }
1213
- .tb-dev-button[aria-pressed="true"] { background: var(--tb-primary); color: var(--tb-on-primary); border-color: var(--tb-primary); }
1214
- .tb-dev-tools :is(button, a, textarea):focus-visible { outline: 2px solid var(--tb-focus); outline-offset: -2px; }
1215
- .tb-dev-body { flex: 1; min-height: 0; display: flex; }
1216
- .tb-dev-pane { flex: 1; min-width: 0; min-height: 0; }
1217
- .tb-dev-pane[hidden] { display: none; }
1218
- .tb-dev-faces { display: grid; grid-template-columns: minmax(200px, 2fr) 3fr; }
1219
- .tb-dev-tree { overflow: auto; border-right: 1px solid var(--tb-border); padding: var(--tb-space-1) 0; }
1220
- .tb-dev-node {
1221
- display: block;
1222
- width: 100%;
1223
- padding: 1px var(--tb-space-2);
1224
- border: 0;
1225
- background: transparent;
1226
- text-align: left;
1227
- white-space: nowrap;
1228
- overflow: hidden;
1229
- text-overflow: ellipsis;
1230
- }
1231
- .tb-dev-node:hover { background: var(--tb-primary-soft); }
1232
- .tb-dev-node[aria-current="true"] { background: var(--tb-primary); color: var(--tb-on-primary); }
1233
- .tb-dev-unseen { color: var(--tb-muted); }
1234
- .tb-dev-detail { overflow: auto; padding: var(--tb-space-3) var(--tb-space-4); }
1235
- .tb-dev-detail h3 { margin: 0 0 var(--tb-space-1); font-size: 14px; }
1236
- .tb-dev-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px var(--tb-space-4); margin: var(--tb-space-3) 0 0; }
1237
- .tb-dev-detail dt { color: var(--tb-muted); }
1238
- .tb-dev-detail dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
1239
- .tb-dev-place { margin: 0; }
1240
- .tb-dev-place a { color: var(--tb-primary); }
1241
- .tb-dev-hint { margin: 0; color: var(--tb-muted); }
1242
- .tb-dev-console { display: flex; flex-direction: column; }
1243
- .tb-dev-out { flex: 1; overflow: auto; padding: var(--tb-space-2) var(--tb-space-3); }
1244
- .tb-dev-out pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
1245
- .tb-dev-said-in { color: var(--tb-muted); }
1246
- .tb-dev-said-error { color: var(--tb-danger); }
1247
- .tb-dev-face { padding: 2px var(--tb-space-3); color: var(--tb-muted); border-top: 1px solid var(--tb-border); }
1248
- .tb-dev-prompt { display: flex; align-items: flex-start; gap: var(--tb-space-2); padding: var(--tb-space-1) var(--tb-space-3) var(--tb-space-2); }
1249
- .tb-dev-sign { font: 12px/20px ui-monospace, Menlo, Consolas, monospace; color: var(--tb-primary); }
1250
- textarea.tb-dev-in { flex: 1; resize: none; border: 0; padding: 0; background: transparent; color: var(--tb-text); line-height: 20px; outline: none; }
1251
- .tb-dev-log { display: flex; flex-direction: column; }
1252
- .tb-dev-bar { display: flex; justify-content: flex-end; padding: var(--tb-space-1) var(--tb-space-3); flex: none; }
1253
- ol.tb-dev-entries { flex: 1; margin: 0; overflow: auto; list-style: none; padding: 0 var(--tb-space-3) var(--tb-space-2); }
1254
- ol.tb-dev-entries li { display: grid; grid-template-columns: max-content 5.5em 1fr; gap: var(--tb-space-3); padding: 1px 0; border-bottom: 1px solid var(--tb-border); }
1255
- ol.tb-dev-entries time { color: var(--tb-muted); font-variant-numeric: tabular-nums; }
1256
- .tb-dev-kind { color: var(--tb-muted); }
1257
- ol.tb-dev-entries .tb-dev-text { overflow-wrap: anywhere; }
1258
- ol.tb-dev-entries :is(.tb-dev-error, .tb-dev-failed) .tb-dev-kind, ol.tb-dev-entries :is(.tb-dev-error, .tb-dev-failed) .tb-dev-text { color: var(--tb-danger); }
1259
- ol.tb-dev-entries .tb-dev-warning .tb-dev-kind { color: var(--tb-warning); }
1260
- .tb-dev-opener {
1261
- position: fixed;
1262
- inset: auto var(--tb-space-3) var(--tb-space-3) auto;
1263
- margin: 0;
1264
- padding: 2px var(--tb-space-3);
1265
- border: 1px solid var(--tb-border-strong);
1266
- border-radius: 999px;
1267
- background: var(--tb-surface);
1268
- box-shadow: var(--tb-shadow-1);
1269
- font: 600 12px/1.6 var(--tb-font);
1270
- opacity: 0.7;
1271
- }
1272
- .tb-dev-opener:hover, .tb-dev-opener:focus-visible { opacity: 1; }
1273
- .tb-dev-outline {
1274
- position: fixed;
1275
- margin: 0;
1276
- padding: 0;
1277
- box-sizing: border-box;
1278
- border: 2px solid var(--tb-primary);
1279
- border-radius: 2px;
1280
- background: transparent;
1281
- pointer-events: none;
1282
- }
1283
- .tb-dev-outline.tb-dev-pointed { border-style: dashed; background: color-mix(in srgb, var(--tb-primary) 12%, transparent); }
1284
- .tb-dev-picking, .tb-dev-picking * { cursor: crosshair !important; }
1285
- @media (max-width: 640px) {
1286
- .tb-dev-faces { grid-template-columns: 1fr; grid-template-rows: 2fr 3fr; }
1287
- .tb-dev-tree { border-right: 0; border-bottom: 1px solid var(--tb-border); }
1288
- ol.tb-dev-entries li { grid-template-columns: max-content 1fr; }
1289
- ol.tb-dev-entries time { display: none; }
1290
- }
1291
-
1292
- @media (max-width: 640px) {
1293
- .tb-wide-only { display: none !important; }
1294
- .tb-view:has(.tb-fit) { height: auto; }
1295
- .tb-fit > * { overflow: visible; }
1296
- .tb-split { display: block; }
1297
- .tb-split-handle { display: none; }
1298
- .tb-split[data-pane="1"] > .tb-split-pane:last-child, .tb-split[data-pane="2"] > .tb-split-pane:first-child { display: none; }
1299
- .tb-split-back { display: inline-flex; align-self: flex-start; padding: 0 var(--tb-space-3); border: 0; background: transparent; color: var(--tb-primary); }
1300
- .tb-view { padding: var(--tb-space-5) var(--tb-space-4); }
1301
- .tb-form { grid-template-columns: minmax(0, 1fr); }
1302
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field { display: flex; }
1303
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field > .tb-label, :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field > .tb-control,
1304
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-actions, :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-check-row { grid-column: 1; padding-top: 0; }
1305
- .tb-row:has(> .tb-field) { flex-direction: column; align-items: stretch; }
1306
- .tb-row:has(> .tb-field) > :is(.tb-text, .tb-heading) { margin-bottom: 0; }
1307
- .tb-entry { flex-direction: column; align-items: stretch; padding: var(--tb-space-3); border: var(--tb-line) solid var(--tb-border); border-radius: var(--tb-radius); }
1308
- .tb-entry > * { flex: none; }
1309
- .tb-entry:not(:first-child) .tb-field > .tb-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
1310
- .tb-entry > .tb-button, .tb-entry:first-child:has(.tb-label:not(:empty)) > .tb-button { align-self: flex-end; margin-top: 0; }
1311
- .tb-grid { grid-template-columns: minmax(0, 1fr); }
1312
- .tb-actions > .tb-button { flex: 1 1 auto; }
1313
- .tb-table-wrap { overflow: visible; background: none; border: 0; box-shadow: none; }
1314
- .tb-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
1315
- .tb-table, .tb-table tbody, .tb-table tfoot, .tb-table tr, .tb-table td { display: block; }
1316
- .tb-table tfoot { margin-top: var(--tb-space-3); }
1317
- .tb-table tfoot tr { background: var(--tb-bg); }
1318
- .tb-table tfoot td { background: none; }
1319
- .tb-table tfoot td:empty { display: none; }
1320
- .tb-table tbody { display: flex; flex-direction: column; gap: var(--tb-space-3); }
1321
- .tb-table tr {
1322
- padding: var(--tb-space-3) var(--tb-space-4);
1323
- background: var(--tb-surface);
1324
- border: var(--tb-line) solid var(--tb-border);
1325
- border-radius: var(--tb-radius-lg);
1326
- box-shadow: var(--tb-shadow-1);
1327
- }
1328
- .tb-table td, .tb-table tbody tr:last-child td, .tb-table tfoot td {
1329
- display: flex;
1330
- justify-content: space-between;
1331
- gap: var(--tb-space-4);
1332
- height: auto;
1333
- padding: var(--tb-space-1) 0;
1334
- border: 0;
1335
- text-align: right;
1336
- }
1337
- .tb-table td::before { content: attr(data-label); color: var(--tb-muted); font-weight: 500; text-align: left; }
1338
- .tb-table td.tb-thumb-cell { width: auto; justify-content: flex-start; }
1339
- .tb-table td.tb-thumb-cell::before { content: none; }
1340
- .tb-table tr.tb-group-head { padding: var(--tb-space-3) 0 0; background: none; border: 0; box-shadow: none; }
1341
- .tb-table .tb-group-head > th, .tb-table .tb-group-head.tb-level-2 > th { display: block; padding: 0; background: none; border: 0; }
1342
- .tb-table .tb-level-2 > :first-child { padding-left: 0; }
1343
- .tb-table tr.tb-group-head.tb-level-2, .tb-table tr.tb-group-foot.tb-level-2 { margin-left: var(--tb-space-4); }
1344
- .tb-table tr.tb-group-foot { background: var(--tb-bg); }
1345
- .tb-table .tb-group-foot > td { background: none; }
1346
- .tb-table .tb-group-foot > td:empty { display: none; }
1347
- .tb-toolbar > .tb-button.tb-has-icon { padding: 0; width: var(--tb-control); }
1348
- .tb-toolbar > .tb-button.tb-has-icon > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
1349
- .tb-crumb-middle { display: none !important; }
1350
- .tb-crumb-more { display: inline-flex !important; }
1351
- .tb-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
1352
- .tb-dialog.tb-confirm { width: calc(100vw - 32px); height: fit-content; max-height: calc(100dvh - 32px); margin: auto; border-radius: var(--tb-radius-lg); }
1353
- }
1354
- @media print {
1355
- .tb-toasts, .tb-dialog:not([open]) { display: none !important; }
1356
- /* print-page/only: the face alone, at the top of the page, with what holds it out of sight */
1357
- .tb-print-only body * { visibility: hidden; }
1358
- .tb-print-only .tb-print-target, .tb-print-only .tb-print-target * { visibility: visible; }
1359
- .tb-print-only .tb-print-target { position: absolute; inset: 0 0 auto 0; margin: 0; box-shadow: none; }
1360
- }
1361
- @media (pointer: coarse) { :root { --tb-control: 44px; } }
1362
- @media (prefers-reduced-motion: reduce) {
1363
- * { transition: none !important; animation: none !important; }
1364
- .tb-indeterminate .tb-progress-bar { width: 100%; opacity: 0.35; }
1365
- }
1366
- `;
299
+ /** Component rules, one file per kind of face under theme/. Only token variables appear there, never raw values of color. */
300
+ const COMPONENTS = `\n${[LAYOUT, FORMS, NAVIGATION, MEDIA, DATA, DIALOGS, PANES, POPUPS, TOASTS, DEVTOOLS, RESPONSIVE].map(part => part.slice(1)).join('')}`;
1367
301
  /** What a skin changes on top of the component rules: '' for the modern one. */
1368
- const SKINS = {
1369
- modern: '',
1370
- classic: String.raw `
1371
- /* classic: controls in relief on a grey window, sunken wells for what is typed, title bars on dialogs */
1372
- :root {
1373
- --tb-raise: inset 1px 1px 0 var(--tb-bevel-hi), inset -1px -1px 0 var(--tb-bevel-lo);
1374
- --tb-sink: inset 1px 1px 0 var(--tb-bevel-lo), inset -1px -1px 0 var(--tb-bevel-hi);
1375
- --tb-drop: 3px 3px 0 color-mix(in oklch, var(--tb-bevel-lo) 60%, transparent);
1376
- --tb-ring: 0 0 0 2px var(--tb-focus);
1377
- --tb-face: linear-gradient(var(--tb-face-hi), var(--tb-face-lo));
1378
- }
1379
- body { font-size: 14px; -webkit-font-smoothing: auto; }
1380
- .tb-title { font-weight: 700; letter-spacing: 0; color: var(--tb-primary); text-shadow: 1px 1px 0 var(--tb-bevel-hi); }
1381
- .tb-heading, .tb-panel > .tb-panel-title, .tb-dialog-title { font-weight: 700; letter-spacing: 0; }
1382
- .tb-label { font-weight: 700; font-size: 13px; }
1383
- .tb-divider { border-top: 1px solid var(--tb-bevel-lo); border-bottom: 1px solid var(--tb-bevel-hi); }
1384
-
1385
- .tb-panel { border: 1px solid var(--tb-border-strong); border-radius: var(--tb-radius); box-shadow: var(--tb-raise); padding: var(--tb-space-5); }
1386
- .tb-panel.tb-primary { box-shadow: var(--tb-raise); }
1387
- .tb-panel:focus-visible, .tb-panel.tb-primary:focus-visible { box-shadow: var(--tb-raise), var(--tb-ring); }
1388
- .tb-tile:hover { background: var(--tb-face); border-color: var(--tb-border-strong); box-shadow: var(--tb-raise); }
1389
-
1390
- /* buttons: a face lit from the top left; pressed, it sinks */
1391
- .tb-button { font-size: 13px; font-weight: 700; padding: 0 var(--tb-space-4); border: 1px solid var(--tb-border-strong); background: var(--tb-face); box-shadow: var(--tb-raise); transition: none; }
1392
- .tb-button:hover { background: linear-gradient(var(--tb-bevel-hi), var(--tb-face-hi)); border-color: var(--tb-border-strong); }
1393
- .tb-button:active:not(:disabled, [aria-disabled="true"]) { background: linear-gradient(var(--tb-face-lo), var(--tb-face-hi)); box-shadow: var(--tb-sink); }
1394
- .tb-button:focus-visible { box-shadow: var(--tb-raise), var(--tb-ring); }
1395
- .tb-button:disabled, .tb-button[aria-disabled="true"] { box-shadow: var(--tb-raise); }
1396
- .tb-button.tb-primary { --tb-tint: var(--tb-primary); }
1397
- .tb-button.tb-accent { --tb-tint: var(--tb-accent); }
1398
- .tb-button.tb-danger { --tb-tint: var(--tb-danger); }
1399
- .tb-button:is(.tb-primary, .tb-accent, .tb-danger), .tb-button:is(.tb-primary, .tb-accent, .tb-danger):hover, .tb-button.tb-primary[aria-disabled="true"]:hover {
1400
- background: linear-gradient(color-mix(in oklch, var(--tb-tint) 85%, var(--tb-bevel-hi)), var(--tb-tint));
1401
- border-color: color-mix(in oklch, var(--tb-tint) 50%, var(--tb-border-strong));
1402
- box-shadow: inset 1px 1px 0 color-mix(in oklch, var(--tb-bevel-hi) 45%, transparent), inset -1px -1px 0 color-mix(in oklch, var(--tb-bevel-lo) 60%, transparent);
1403
- }
1404
- .tb-button:is(.tb-primary, .tb-accent, .tb-danger):hover:not(:disabled, [aria-disabled="true"]) { filter: brightness(1.08); }
1405
- .tb-button:is(.tb-primary, .tb-accent, .tb-danger):active:not(:disabled, [aria-disabled="true"]) { background: var(--tb-tint); box-shadow: inset 1px 1px 0 color-mix(in oklch, var(--tb-bevel-lo) 60%, transparent); }
1406
- .tb-button:is(.tb-primary, .tb-accent, .tb-danger):focus-visible { box-shadow: var(--tb-raise), var(--tb-ring); }
1407
- .tb-toolbar { background: var(--tb-face); border: 1px solid var(--tb-border-strong); border-radius: var(--tb-radius); box-shadow: var(--tb-raise); }
1408
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger) { box-shadow: none; }
1409
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):hover { background: var(--tb-face); border-color: var(--tb-border-strong); box-shadow: var(--tb-raise); }
1410
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):focus-visible { box-shadow: var(--tb-ring); }
1411
- .tb-toolbar > .tb-divider { border-left-color: var(--tb-bevel-lo); border-right: 1px solid var(--tb-bevel-hi); border-bottom: 0; }
1412
- .tb-rich-tool:hover { background: var(--tb-face); box-shadow: var(--tb-raise); color: var(--tb-text); }
1413
-
1414
- /* what is typed sits in a sunken well; a choice is a button that drops a list */
1415
- .tb-input { border: 1px solid var(--tb-border-strong); box-shadow: var(--tb-sink); transition: none; }
1416
- .tb-input:focus, .tb-rich-box:focus { border-color: var(--tb-focus); box-shadow: var(--tb-sink), 0 0 0 1px var(--tb-focus); }
1417
- .tb-invalid .tb-input:focus { box-shadow: var(--tb-sink), 0 0 0 1px var(--tb-danger); }
1418
- .tb-input[readonly], .tb-input.tb-rich-box[aria-readonly="true"] { background: var(--tb-bg); border-color: var(--tb-border); box-shadow: none; color: var(--tb-text); }
1419
- select.tb-input {
1420
- font-weight: 700;
1421
- font-size: 13px;
1422
- background-image: linear-gradient(45deg, transparent 50%, var(--tb-text) 50%), linear-gradient(135deg, var(--tb-text) 50%, transparent 50%), var(--tb-face);
1423
- background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%, 0 0;
1424
- background-size: 5px 5px, 5px 5px, 100% 100%;
1425
- box-shadow: var(--tb-raise);
1426
- }
1427
- select.tb-input:focus { box-shadow: var(--tb-raise), var(--tb-ring); }
1428
- .tb-switch input, .tb-switch input:focus-visible { border-radius: var(--tb-radius); box-shadow: var(--tb-sink); }
1429
- .tb-switch input:focus-visible { box-shadow: var(--tb-sink), var(--tb-ring); }
1430
- .tb-switch input::before { border-radius: var(--tb-radius); background: var(--tb-face); box-shadow: var(--tb-raise), 0 0 0 1px var(--tb-border-strong); }
1431
- .tb-upload { box-shadow: var(--tb-sink); }
1432
- .tb-date-button { top: 1px; right: 1px; bottom: 1px; width: calc(var(--tb-control) - 2px); border-left: 1px solid var(--tb-border-strong); border-radius: 0; background: var(--tb-face); box-shadow: var(--tb-raise); color: var(--tb-text); }
1433
- .tb-scroll { background: var(--tb-surface); border-color: var(--tb-border-strong); box-shadow: var(--tb-sink); }
1434
- .tb-scroll:focus-visible { box-shadow: var(--tb-sink), var(--tb-ring); }
1435
-
1436
- /* progress: a sunken trough filled with blocks */
1437
- .tb-progress { height: 18px; padding: 2px; border: 1px solid var(--tb-border-strong); border-radius: var(--tb-radius); background: var(--tb-surface); box-shadow: var(--tb-sink); }
1438
- .tb-progress-bar { --tb-bar: var(--tb-primary); border-radius: 0; background: repeating-linear-gradient(90deg, var(--tb-bar) 0 10px, transparent 10px 12px); }
1439
- .tb-success .tb-progress-bar { --tb-bar: var(--tb-success); background: repeating-linear-gradient(90deg, var(--tb-bar) 0 10px, transparent 10px 12px); }
1440
- .tb-warning .tb-progress-bar { --tb-bar: var(--tb-warning); background: repeating-linear-gradient(90deg, var(--tb-bar) 0 10px, transparent 10px 12px); }
1441
- .tb-danger .tb-progress-bar { --tb-bar: var(--tb-danger); background: repeating-linear-gradient(90deg, var(--tb-bar) 0 10px, transparent 10px 12px); }
1442
- .tb-accent .tb-progress-bar { --tb-bar: var(--tb-accent); background: repeating-linear-gradient(90deg, var(--tb-bar) 0 10px, transparent 10px 12px); }
1443
-
1444
- /* tables and lists: a sunken frame, buttons for headers, what is chosen in the primary color */
1445
- .tb-table-wrap, .tb-list { border: 1px solid; border-color: var(--tb-bevel-lo) var(--tb-bevel-hi) var(--tb-bevel-hi) var(--tb-bevel-lo); border-radius: var(--tb-radius); box-shadow: none; }
1446
- .tb-table th { color: var(--tb-text); font-weight: 700; padding: var(--tb-space-2) var(--tb-space-3); background: var(--tb-face); border-bottom: 1px solid var(--tb-border-strong); box-shadow: var(--tb-raise); }
1447
- .tb-sort { padding: var(--tb-space-2) var(--tb-space-3); }
1448
- .tb-table tfoot td { background: var(--tb-bg); border-top-color: var(--tb-border-strong); }
1449
- @media (min-width: 641px) {
1450
- .tb-table td { padding: var(--tb-space-2) var(--tb-space-3); border-right: 1px solid var(--tb-border); }
1451
- .tb-table th { border-right: 1px solid var(--tb-border-strong); }
1452
- .tb-table tr > :last-child { border-right: 0; }
1453
- }
1454
- .tb-selectable :is(tbody > tr, .tb-list > li).tb-selected, .tb-tree li.tb-selected > .tb-tree-row { background: var(--tb-primary); color: var(--tb-on-primary); }
1455
- .tb-list > li.tb-selected .tb-list-secondary, .tb-tree li.tb-selected > .tb-tree-row .tb-tree-toggle { color: inherit; }
1456
- .tb-selectable tbody tr.tb-selected:focus-visible, .tb-selectable .tb-list > li.tb-selected:focus-visible { box-shadow: inset 0 0 0 2px var(--tb-focus), inset 0 0 0 3px var(--tb-on-primary); }
1457
- .tb-tree-row { border-radius: 0; }
1458
-
1459
- /* tabs: raised tabs on a line; the chosen one is taller and opens onto what it shows */
1460
- .tb-tablist { gap: 2px; padding: 0 var(--tb-space-2); box-shadow: inset 0 -1px 0 var(--tb-border-strong); }
1461
- .tb-tab { font-size: 13px; font-weight: 700; min-height: calc(var(--tb-control) - 4px); margin-top: 4px; border: 1px solid var(--tb-border-strong); border-bottom: 0; border-radius: var(--tb-radius) var(--tb-radius) 0 0; background: var(--tb-face); color: var(--tb-muted); box-shadow: inset 1px 1px 0 var(--tb-bevel-hi); }
1462
- .tb-tab[aria-selected="true"] { margin-top: 0; min-height: var(--tb-control); background: var(--tb-bg); color: var(--tb-text); }
1463
-
1464
- /* what floats: raised, with a hard shadow; the item under the pointer or the keys in the primary color */
1465
- .tb-menu, .tb-lookup-list, .tb-calendar { border: 1px solid var(--tb-border-strong); border-radius: var(--tb-radius); box-shadow: var(--tb-raise), var(--tb-drop); animation: none; }
1466
- .tb-menu-item, .tb-lookup-option { border-radius: 0; }
1467
- .tb-menu-item:focus, .tb-lookup-option:hover, .tb-lookup-option[aria-selected="true"] { background: var(--tb-primary); color: var(--tb-on-primary); }
1468
- .tb-menu-item:focus svg { color: inherit; }
1469
- .tb-menu-divider { background: var(--tb-bevel-lo); box-shadow: 0 1px 0 var(--tb-bevel-hi); }
1470
- .tb-calendar-step, .tb-upload-remove { background: var(--tb-face); border: 1px solid var(--tb-border-strong); box-shadow: var(--tb-raise); color: var(--tb-text); }
1471
- .tb-toast { background: var(--tb-raised); color: var(--tb-text); border: 1px solid var(--tb-border-strong); border-radius: var(--tb-radius); box-shadow: var(--tb-raise), var(--tb-drop); font-weight: 700; }
1472
- .tb-drag-ghost { border-color: var(--tb-border-strong); box-shadow: var(--tb-raise), var(--tb-drop); }
1473
-
1474
- /* dialogs: a window with a title bar */
1475
- .tb-dialog { border: 1px solid var(--tb-border-strong); border-radius: var(--tb-radius); box-shadow: var(--tb-raise), var(--tb-drop); animation: none; }
1476
- .tb-dialog-head { margin: 3px 3px 0; padding: var(--tb-space-1) var(--tb-space-1) var(--tb-space-1) var(--tb-space-4); background: linear-gradient(90deg, var(--tb-primary), color-mix(in oklch, var(--tb-primary) 60%, var(--tb-bevel-hi))); color: var(--tb-on-primary); }
1477
- .tb-dialog-title { font-size: 14px; }
1478
- .tb-dialog-close, .tb-dialog-close:hover { width: 24px; height: 24px; font-size: 16px; border: 1px solid var(--tb-border-strong); background: var(--tb-face); color: var(--tb-text); box-shadow: var(--tb-raise); }
1479
- .tb-dialog-close:focus-visible { box-shadow: var(--tb-raise), var(--tb-ring); }
1480
- .tb-dialog-body { padding-top: var(--tb-space-5); }
1481
- `,
1482
- cupertino: String.raw `
1483
- /* cupertino: recalls the Mac: small controls on a light window, labels to the right, segmented tabs, translucent menus */
1484
- body { font-size: 13px; }
1485
- .tb-title { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
1486
- .tb-heading { font-size: 17px; font-weight: 700; }
1487
- .tb-panel { border-radius: 10px; border-color: var(--tb-border); box-shadow: none; padding: var(--tb-space-5); }
1488
- .tb-panel > .tb-panel-title { font-size: 13px; font-weight: 700; }
1489
- .tb-label { font-size: 13px; font-weight: 400; }
1490
- :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field > .tb-label { text-align: right; }
1491
- @container (max-width: 420px) { :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel) > .tb-field > .tb-label { text-align: left; } }
1492
- .tb-button { font-size: 13px; font-weight: 400; padding: 0 var(--tb-space-4); border: 0; border-radius: 6px; background: var(--tb-surface); box-shadow: 0 0 0 1px var(--tb-border), var(--tb-shadow-1); }
1493
- .tb-button:hover { background: var(--tb-surface); }
1494
- .tb-button:active:not(:disabled, [aria-disabled="true"]) { background: var(--tb-border); }
1495
- .tb-button:focus-visible { box-shadow: 0 0 0 1px var(--tb-border), 0 0 0 4px var(--tb-focus-ring); }
1496
- .tb-button.tb-primary, .tb-button.tb-primary:hover, .tb-button.tb-primary[aria-disabled="true"]:hover { background: linear-gradient(color-mix(in oklch, var(--tb-primary) 85%, var(--tb-on-primary)), var(--tb-primary)); box-shadow: var(--tb-shadow-1); }
1497
- .tb-button.tb-primary:active:not(:disabled, [aria-disabled="true"]) { background: var(--tb-primary-hover); }
1498
- .tb-button.tb-primary:focus-visible { box-shadow: 0 0 0 4px var(--tb-focus-ring); }
1499
- .tb-toolbar { background: transparent; border: 0; padding: 0; }
1500
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger) { box-shadow: none; }
1501
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):hover { background: var(--tb-border); }
1502
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):focus-visible { box-shadow: 0 0 0 3px var(--tb-focus-ring); }
1503
- .tb-input { border-radius: 5px; border-color: var(--tb-border-strong); }
1504
- /* a choice is a pop-up button: the arrow in a small square of the primary color */
1505
- select.tb-input {
1506
- border: 0;
1507
- border-radius: 6px;
1508
- box-shadow: 0 0 0 1px var(--tb-border), var(--tb-shadow-1);
1509
- background-image: linear-gradient(45deg, transparent 50%, var(--tb-on-primary) 50%), linear-gradient(135deg, var(--tb-on-primary) 50%, transparent 50%), linear-gradient(var(--tb-primary), var(--tb-primary));
1510
- background-position: calc(100% - 15px) 45%, calc(100% - 11px) 45%, calc(100% - 4px) 50%;
1511
- background-size: 4px 4px, 4px 4px, 20px calc(100% - 8px);
1512
- padding-right: 34px;
1513
- }
1514
- select.tb-input:focus { box-shadow: 0 0 0 1px var(--tb-border), 0 0 0 4px var(--tb-focus-ring); }
1515
- .tb-tablist { align-self: center; gap: 0; padding: 2px; border-radius: 7px; background: var(--tb-border); box-shadow: none; }
1516
- .tb-tab { min-height: 24px; padding: 0 var(--tb-space-4); border: 0; border-radius: 5px; font-size: 13px; font-weight: 400; color: var(--tb-text); }
1517
- .tb-tab[aria-selected="true"] { background: var(--tb-segment); color: var(--tb-text); box-shadow: var(--tb-shadow-1); }
1518
- .tb-tab:focus-visible { box-shadow: 0 0 0 3px var(--tb-focus-ring); border-radius: 5px; }
1519
- .tb-table-wrap { border-radius: 8px; box-shadow: none; }
1520
- .tb-table th { background: var(--tb-surface); color: var(--tb-text); font-size: 12px; font-weight: 400; padding: 6px var(--tb-space-3); }
1521
- .tb-sort { padding: 6px var(--tb-space-3); }
1522
- @media (min-width: 641px) {
1523
- .tb-table th:not(:last-child) { box-shadow: inset -1px 0 0 var(--tb-border); }
1524
- .tb-table td { height: auto; padding: 6px var(--tb-space-3); border-bottom: 0; }
1525
- .tb-table tbody tr:nth-child(even) { background: var(--tb-bg); }
1526
- }
1527
- .tb-list { padding: 4px; box-shadow: none; }
1528
- .tb-list > li { border-bottom: 0; border-radius: 6px; }
1529
- .tb-selectable :is(tbody > tr, .tb-list > li).tb-selected, .tb-tree li.tb-selected > .tb-tree-row { background: var(--tb-primary); color: var(--tb-on-primary); }
1530
- .tb-list > li.tb-selected .tb-list-secondary, .tb-tree li.tb-selected > .tb-tree-row .tb-tree-toggle { color: inherit; }
1531
- .tb-tree-row { border-radius: 6px; }
1532
- .tb-menu, .tb-lookup-list { padding: 5px; border-radius: 8px; background: color-mix(in oklch, var(--tb-raised) 82%, transparent); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); animation: none; }
1533
- .tb-menu-item { min-height: 24px; border-radius: 5px; font-size: 13px; }
1534
- .tb-menu-item:focus, .tb-lookup-option:hover, .tb-lookup-option[aria-selected="true"] { background: var(--tb-primary); color: var(--tb-on-primary); }
1535
- .tb-menu-item:focus svg { color: inherit; }
1536
- .tb-calendar { border-radius: 10px; }
1537
- /* dialogs: a sheet with its title centred, closed by a red dot on the left */
1538
- .tb-dialog { border: 1px solid var(--tb-border); border-radius: 12px; }
1539
- .tb-dialog-head { position: relative; justify-content: center; padding: var(--tb-space-3) var(--tb-space-6) 0; }
1540
- .tb-dialog-title { font-size: 13px; font-weight: 700; }
1541
- .tb-dialog-close, .tb-dialog-close:hover { position: absolute; left: 12px; top: 12px; width: 14px; height: 14px; border-radius: 50%; background: var(--tb-danger); color: transparent; font-size: 12px; line-height: 14px; }
1542
- .tb-dialog-close:hover { color: var(--tb-on-danger); }
1543
- .tb-toast { border-radius: 10px; background: color-mix(in oklch, var(--tb-text) 80%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
1544
- .tb-scroll { border-radius: 8px; background: var(--tb-surface); }
1545
- `,
1546
- fusion: String.raw `
1547
- /* fusion: recalls Qt: group boxes with their title on the frame, buttons with a gentle gradient, tab widgets in a frame */
1548
- .tb-title { font-size: 24px; font-weight: 600; letter-spacing: 0; }
1549
- .tb-heading { font-size: 18px; font-weight: 600; letter-spacing: 0; }
1550
- .tb-label { font-weight: 400; }
1551
- .tb-panel { position: relative; margin-top: var(--tb-space-2); padding: var(--tb-space-5) var(--tb-space-4) var(--tb-space-4); background: transparent; border: 1px solid var(--tb-border-strong); border-radius: 3px; box-shadow: none; }
1552
- .tb-panel > .tb-panel-title { position: absolute; top: 0; left: var(--tb-space-3); transform: translateY(-50%); padding: 0 var(--tb-space-1); background: var(--tb-bg); font-size: 14px; font-weight: 600; line-height: 1.2; }
1553
- .tb-dialog .tb-panel > .tb-panel-title { background: var(--tb-raised); }
1554
- .tb-button { font-weight: 400; padding: 0 var(--tb-space-4); border: 1px solid var(--tb-border-strong); border-radius: 3px; background: linear-gradient(var(--tb-face-hi), var(--tb-face-lo)); box-shadow: none; transition: none; }
1555
- .tb-button:hover { background: linear-gradient(var(--tb-face-hi), var(--tb-face-hi)); border-color: var(--tb-border-strong); }
1556
- .tb-button:active:not(:disabled, [aria-disabled="true"]) { background: var(--tb-face-lo); box-shadow: inset 0 1px 2px var(--tb-border-strong); }
1557
- .tb-button:focus-visible { border-color: var(--tb-focus); box-shadow: 0 0 0 2px var(--tb-focus-ring); }
1558
- /* the default button is framed in the primary color; danger and accent color their text */
1559
- .tb-button.tb-primary, .tb-button.tb-primary:hover, .tb-button.tb-primary[aria-disabled="true"]:hover { background: linear-gradient(color-mix(in oklch, var(--tb-primary) 12%, var(--tb-face-hi)), color-mix(in oklch, var(--tb-primary) 22%, var(--tb-face-lo))); border-color: var(--tb-primary); color: var(--tb-text); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--tb-primary) 35%, transparent); }
1560
- .tb-button.tb-primary:hover:not(:disabled, [aria-disabled="true"]) { background: linear-gradient(color-mix(in oklch, var(--tb-primary) 8%, var(--tb-face-hi)), color-mix(in oklch, var(--tb-primary) 14%, var(--tb-face-hi))); }
1561
- .tb-button.tb-primary:focus-visible { box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--tb-primary) 35%, transparent), 0 0 0 2px var(--tb-focus-ring); }
1562
- .tb-button.tb-danger, .tb-button.tb-accent { background: linear-gradient(var(--tb-face-hi), var(--tb-face-lo)); color: var(--tb-danger); border-color: var(--tb-border-strong); }
1563
- .tb-button.tb-accent { color: var(--tb-accent); }
1564
- .tb-toolbar { padding: 2px; background: linear-gradient(var(--tb-face-hi), var(--tb-face-lo)); border-color: var(--tb-border); border-radius: 0; }
1565
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):hover { background: var(--tb-face-hi); border-color: var(--tb-border-strong); }
1566
- .tb-input { border-radius: 2px; border-color: var(--tb-border-strong); box-shadow: inset 0 1px 1px var(--tb-border); }
1567
- .tb-input:focus, .tb-rich-box:focus { border-color: var(--tb-focus); box-shadow: 0 0 0 1px var(--tb-focus); }
1568
- .tb-invalid .tb-input:focus { box-shadow: 0 0 0 1px var(--tb-danger); }
1569
- .tb-input[readonly] { box-shadow: none; }
1570
- select.tb-input {
1571
- border-radius: 3px;
1572
- background-image: linear-gradient(45deg, transparent 50%, var(--tb-text) 50%), linear-gradient(135deg, var(--tb-text) 50%, transparent 50%), linear-gradient(var(--tb-face-hi), var(--tb-face-lo));
1573
- background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%, 0 0;
1574
- background-size: 5px 5px, 5px 5px, 100% 100%;
1575
- box-shadow: none;
1576
- }
1577
- select.tb-input:focus { box-shadow: 0 0 0 2px var(--tb-focus-ring); }
1578
- /* tabs: a tab widget, the chosen tab open onto a framed page */
1579
- .tb-tabs { gap: 0; }
1580
- .tb-tablist { position: relative; z-index: 1; gap: 0; margin-bottom: -1px; padding-left: 2px; box-shadow: none; }
1581
- .tb-tab { min-height: 30px; margin: 3px -1px 0 0; padding: 0 var(--tb-space-4); border: 1px solid var(--tb-border-strong); border-radius: 3px 3px 0 0; background: linear-gradient(var(--tb-face-hi), var(--tb-face-lo)); color: var(--tb-text); font-weight: 400; }
1582
- .tb-tab[aria-selected="true"] { margin-top: 0; min-height: 33px; background: var(--tb-bg); border-bottom-color: var(--tb-bg); color: var(--tb-text); }
1583
- .tb-tab-panel { padding: var(--tb-space-4); border: 1px solid var(--tb-border-strong); border-radius: 0 3px 3px 3px; }
1584
- .tb-table-wrap, .tb-list { border-color: var(--tb-border-strong); border-radius: 2px; box-shadow: none; }
1585
- .tb-table th { color: var(--tb-text); font-weight: 400; padding: 4px var(--tb-space-3); background: linear-gradient(var(--tb-face-hi), var(--tb-face-lo)); border-bottom: 1px solid var(--tb-border-strong); }
1586
- .tb-sort { padding: 4px var(--tb-space-3); }
1587
- @media (min-width: 641px) {
1588
- .tb-table th { border-right: 1px solid var(--tb-border-strong); }
1589
- .tb-table td { height: 30px; padding: 4px var(--tb-space-3); border-right: 1px solid var(--tb-border); }
1590
- .tb-table tr > :last-child { border-right: 0; }
1591
- }
1592
- .tb-list > li { padding: var(--tb-space-2) var(--tb-space-3); }
1593
- .tb-selectable :is(tbody > tr, .tb-list > li).tb-selected, .tb-tree li.tb-selected > .tb-tree-row { background: var(--tb-primary); color: var(--tb-on-primary); }
1594
- .tb-list > li.tb-selected .tb-list-secondary, .tb-tree li.tb-selected > .tb-tree-row .tb-tree-toggle { color: inherit; }
1595
- .tb-tree-row { border-radius: 0; }
1596
- .tb-progress { height: 20px; border: 1px solid var(--tb-border-strong); border-radius: 3px; background: var(--tb-surface); }
1597
- .tb-progress-bar { border-radius: 2px; background-image: repeating-linear-gradient(-45deg, transparent 0 6px, color-mix(in oklch, var(--tb-surface) 22%, transparent) 6px 12px); }
1598
- .tb-menu, .tb-lookup-list, .tb-calendar { padding: 2px; border-color: var(--tb-border-strong); border-radius: 2px; box-shadow: var(--tb-shadow-2); animation: none; }
1599
- .tb-menu-item, .tb-lookup-option { min-height: 28px; border-radius: 0; }
1600
- .tb-menu-item:focus, .tb-lookup-option:hover, .tb-lookup-option[aria-selected="true"] { background: var(--tb-primary); color: var(--tb-on-primary); }
1601
- .tb-menu-item:focus svg { color: inherit; }
1602
- .tb-dialog { border: 1px solid var(--tb-border-strong); border-radius: 3px; }
1603
- .tb-dialog-head { padding: 4px 4px 4px var(--tb-space-4); background: linear-gradient(var(--tb-face-hi), var(--tb-face-lo)); border-bottom: 1px solid var(--tb-border-strong); }
1604
- .tb-dialog-title { font-size: 14px; font-weight: 600; }
1605
- .tb-dialog-close { width: 28px; height: 28px; font-size: 18px; border-radius: 3px; }
1606
- .tb-dialog-body { padding-top: var(--tb-space-5); }
1607
- /* a toast is a tooltip */
1608
- .tb-toast { background: color-mix(in oklch, var(--tb-warning) 22%, var(--tb-surface)); color: var(--tb-text); border: 1px solid var(--tb-border-strong); border-radius: 2px; box-shadow: var(--tb-shadow-2); font-weight: 400; }
1609
- .tb-scroll { background: var(--tb-surface); border-color: var(--tb-border-strong); border-radius: 2px; }
1610
- `,
1611
- fluent: String.raw `
1612
- /* fluent: recalls Windows 11: white layers on a calm window, a darker stroke under controls, accent pills for what is chosen */
1613
- .tb-title { font-size: 28px; font-weight: 600; letter-spacing: 0; }
1614
- .tb-heading { font-size: 20px; font-weight: 600; letter-spacing: 0; }
1615
- .tb-panel > .tb-panel-title { font-size: 16px; font-weight: 600; letter-spacing: 0; }
1616
- .tb-label { font-weight: 400; }
1617
- .tb-panel { border-color: var(--tb-border); border-radius: 8px; box-shadow: none; }
1618
- .tb-button { font-weight: 400; border: 1px solid var(--tb-border); border-bottom-color: var(--tb-border-strong); border-radius: 4px; box-shadow: none; }
1619
- .tb-button:hover { background: var(--tb-bg); border-color: var(--tb-border); border-bottom-color: var(--tb-border-strong); }
1620
- .tb-button:active:not(:disabled, [aria-disabled="true"]) { color: var(--tb-muted); }
1621
- .tb-button:focus-visible { box-shadow: 0 0 0 1px var(--tb-surface), 0 0 0 3px var(--tb-focus-ring); }
1622
- .tb-button.tb-primary { border-color: color-mix(in oklch, var(--tb-primary) 88%, var(--tb-on-primary)); border-bottom-color: color-mix(in oklch, var(--tb-primary) 70%, var(--tb-text)); box-shadow: none; }
1623
- .tb-button.tb-primary:focus-visible { box-shadow: 0 0 0 1px var(--tb-surface), 0 0 0 3px var(--tb-focus-ring); }
1624
- .tb-toolbar { background: var(--tb-raised); border-color: var(--tb-border); border-radius: 8px; }
1625
- .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):hover { background: var(--tb-subtle); }
1626
- /* a field: a quiet frame with a darker line under it, which turns into the accent while typing */
1627
- .tb-input { border-color: var(--tb-border); border-radius: 4px; box-shadow: inset 0 -1px 0 var(--tb-muted); }
1628
- .tb-input:hover { border-color: var(--tb-border); }
1629
- .tb-input:focus, .tb-rich-box:focus { border-color: var(--tb-border); box-shadow: inset 0 -2px 0 var(--tb-primary); }
1630
- .tb-invalid .tb-input, .tb-invalid .tb-input:focus { box-shadow: inset 0 -2px 0 var(--tb-danger); }
1631
- .tb-input[readonly] { box-shadow: none; }
1632
- select.tb-input { border-bottom-color: var(--tb-border-strong); box-shadow: none; }
1633
- select.tb-input:focus { box-shadow: 0 0 0 1px var(--tb-surface), 0 0 0 3px var(--tb-focus-ring); }
1634
- .tb-switch input { width: 40px; border: 1px solid var(--tb-muted); background: transparent; }
1635
- .tb-switch input::before { top: 3px; left: 3px; width: 12px; height: 12px; background: var(--tb-muted); box-shadow: none; }
1636
- .tb-switch input:checked { border-color: var(--tb-primary); }
1637
- .tb-switch input:checked::before { transform: translateX(20px); background: var(--tb-on-primary); }
1638
- .tb-switch input:focus-visible { box-shadow: 0 0 0 1px var(--tb-surface), 0 0 0 3px var(--tb-focus-ring); }
1639
- /* tabs: plain words; a short pill of the accent under the chosen one */
1640
- .tb-tablist { gap: var(--tb-space-1); box-shadow: none; }
1641
- .tb-tab { position: relative; border-bottom: 0; border-radius: 4px; font-weight: 400; color: var(--tb-muted); }
1642
- .tb-tab:hover { background: var(--tb-subtle); }
1643
- .tb-tab[aria-selected="true"] { color: var(--tb-text); font-weight: 600; }
1644
- .tb-tab[aria-selected="true"]::after { content: ""; position: absolute; left: calc(50% - 8px); bottom: 3px; width: 16px; height: 3px; border-radius: 2px; background: var(--tb-primary); }
1645
- .tb-tab:focus-visible { box-shadow: 0 0 0 3px var(--tb-focus-ring); }
1646
- /* what is chosen: a shade of the text, and a pill of the accent at its left */
1647
- .tb-table-wrap { border-radius: 8px; box-shadow: none; }
1648
- .tb-table th { background: var(--tb-surface); color: var(--tb-text); }
1649
- .tb-list { padding: 4px; border-radius: 8px; box-shadow: none; }
1650
- .tb-list > li { position: relative; border-bottom: 0; border-radius: 4px; }
1651
- .tb-tree-row { position: relative; border-radius: 4px; }
1652
- .tb-selectable :is(tbody > tr, .tb-list > li).tb-selected, .tb-tree li.tb-selected > .tb-tree-row { background: var(--tb-subtle); }
1653
- .tb-tree li.tb-selected > .tb-tree-row { font-weight: 400; }
1654
- .tb-list > li.tb-selected::before, .tb-tree li.tb-selected > .tb-tree-row::before { content: ""; position: absolute; left: 0; top: calc(50% - 8px); width: 3px; height: 16px; border-radius: 2px; background: var(--tb-primary); }
1655
- .tb-selectable tbody > tr.tb-selected > td:first-child { box-shadow: inset 3px 0 0 var(--tb-primary); }
1656
- .tb-selectable :is(tbody > tr, .tb-list > li):hover { background: var(--tb-subtle); }
1657
- .tb-progress { height: 3px; border-radius: 2px; background: linear-gradient(var(--tb-muted), var(--tb-muted)) center / 100% 1px no-repeat; }
1658
- .tb-menu, .tb-lookup-list, .tb-calendar { padding: 4px; border-radius: 8px; }
1659
- .tb-menu-item, .tb-lookup-option { min-height: 32px; border-radius: 4px; }
1660
- .tb-menu-item:focus, .tb-lookup-option:hover, .tb-lookup-option[aria-selected="true"] { background: var(--tb-subtle); }
1661
- .tb-dialog { border: 1px solid var(--tb-border); border-radius: 8px; }
1662
- .tb-dialog-head { padding: var(--tb-space-5) var(--tb-space-3) 0 var(--tb-space-6); }
1663
- .tb-dialog-title { font-size: 20px; font-weight: 600; letter-spacing: 0; }
1664
- .tb-toast { background: var(--tb-raised); color: var(--tb-text); border: 1px solid var(--tb-border); border-radius: 8px; font-weight: 400; }
1665
- .tb-scroll { border-radius: 8px; }
1666
- `,
1667
- };
302
+ const SKINS = { modern: '', classic: CLASSIC, cupertino: CUPERTINO, fusion: FUSION, fluent: FLUENT };