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
@@ -0,0 +1,239 @@
1
+ // Component rules of the theme: forms and what goes in them: fields, text boxes, checks, radios, sliders, buttons, uploads, dates.
2
+ // Only token variables appear here, never raw values of color.
3
+ export const FORMS = String.raw `
4
+ /* forms: labels and controls aligned in two columns */
5
+ .tb-form {
6
+ display: grid;
7
+ grid-template-columns: minmax(120px, max-content) minmax(0, 1fr);
8
+ column-gap: var(--tb-space-5);
9
+ row-gap: var(--tb-space-4);
10
+ align-items: start;
11
+ /* a narrow form (in a grid cell, beside another panel) stacks like one on a phone; see @container below */
12
+ container-type: inline-size;
13
+ contain-intrinsic-inline-size: 30rem;
14
+ }
15
+ /* a panel in a form (a section) keeps the form's two columns */
16
+ .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel { display: grid; grid-template-columns: subgrid; row-gap: var(--tb-space-4); align-items: start; }
17
+ /* steps in a form keep its two columns too: the bar spans both, Back and Next go under the controls */
18
+ .tb-form > .tb-steps { display: grid; grid-template-columns: subgrid; row-gap: var(--tb-space-5); }
19
+ .tb-form > .tb-steps > * { grid-column: 1 / -1; }
20
+ .tb-form > .tb-steps > .tb-steps-nav { grid-column: 2; }
21
+ :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > * { grid-column: 1 / -1; }
22
+ :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-field { display: contents; }
23
+ :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-field > .tb-label { grid-column: 1; padding-top: calc((var(--tb-control) - 1.5em) / 2); }
24
+ :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-field > .tb-control { grid-column: 2; }
25
+ :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-actions, :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-check-row { grid-column: 2; }
26
+ .tb-field { display: flex; flex-direction: column; gap: var(--tb-space-2); min-width: 0; }
27
+ @container (max-width: 420px) {
28
+ :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-field { display: flex; }
29
+ :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-field > .tb-label, :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-field > .tb-control,
30
+ :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-actions, :is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-check-row { grid-column: 1 / -1; padding-top: 0; }
31
+ }
32
+ .tb-rows { display: flex; flex-direction: column; gap: var(--tb-space-3); align-items: stretch; }
33
+ .tb-rows > .tb-button { align-self: flex-start; }
34
+ .tb-entry { display: flex; gap: var(--tb-space-3); align-items: flex-start; }
35
+ .tb-entry > * { flex: 1 1 0; min-width: 0; }
36
+ .tb-entry > .tb-button { flex: none; }
37
+ /* the labels of the first row are the headers of the others */
38
+ .tb-entry:not(:first-child) .tb-field > .tb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
39
+ .tb-entry:first-child:has(.tb-label:not(:empty)) > .tb-button { margin-top: calc(14px * 1.5 + var(--tb-space-2)); }
40
+ .tb-rich { display: flex; flex-direction: column; gap: var(--tb-space-1); }
41
+ .tb-rich-tools { display: flex; flex-wrap: wrap; gap: var(--tb-space-1); }
42
+ .tb-rich-tools[hidden], .tb-rich-link[hidden] { display: none; }
43
+ .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; }
44
+ .tb-rich-tool:hover { background: var(--tb-primary-soft); color: var(--tb-text); }
45
+ .tb-rich-tool:focus-visible { outline: 2px solid var(--tb-primary); outline-offset: 1px; }
46
+ .tb-rich-tool .tb-icon { width: 18px; height: 18px; }
47
+ .tb-rich-link { display: flex; gap: var(--tb-space-2); align-items: center; }
48
+ .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; }
49
+ .tb-input.tb-rich-box[aria-readonly="true"] { background: color-mix(in srgb, var(--tb-muted) 12%, transparent); border-color: transparent; cursor: default; }
50
+ .tb-input.tb-rich-box[aria-disabled="true"] { opacity: 0.45; }
51
+ .tb-rich-box:focus { outline: none; border-color: var(--tb-primary); box-shadow: 0 0 0 3px var(--tb-focus-ring); }
52
+ .tb-rich-box > :first-child { margin-top: 0; }
53
+ .tb-rich-box > :last-child { margin-bottom: 0; }
54
+ .tb-rich-box p, .tb-rich-box ul, .tb-rich-box ol { margin: 0 0 var(--tb-space-2); }
55
+ .tb-rich-box ul, .tb-rich-box ol { padding-left: var(--tb-space-5); }
56
+ .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; }
57
+ .tb-rich-box h1 { font-size: 22px; }
58
+ .tb-rich-box h2 { font-size: 18px; }
59
+ .tb-rich-box h3 { font-size: 16px; }
60
+ .tb-rich-box a { color: var(--tb-primary); }
61
+ .tb-control { display: flex; flex-direction: column; gap: var(--tb-space-1); min-width: 0; }
62
+ .tb-label { font-weight: 550; font-size: 14px; color: var(--tb-text); }
63
+ .tb-required::after { content: " *"; color: var(--tb-muted); font-weight: 400; }
64
+ .tb-input {
65
+ font: inherit;
66
+ color: var(--tb-text);
67
+ background: var(--tb-surface);
68
+ border: var(--tb-line) solid var(--tb-border-strong);
69
+ border-radius: var(--tb-radius);
70
+ min-height: var(--tb-control);
71
+ padding: 0 var(--tb-space-3);
72
+ width: 100%;
73
+ transition: border-color var(--tb-fast) var(--tb-ease), box-shadow var(--tb-fast) var(--tb-ease);
74
+ }
75
+ textarea.tb-input { padding: var(--tb-space-2) var(--tb-space-3); min-height: calc(var(--tb-control) * 2.5); resize: vertical; }
76
+ 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); }
77
+ .tb-input::placeholder { color: var(--tb-muted); opacity: 0.8; }
78
+ .tb-input:hover { border-color: var(--tb-muted); }
79
+ .tb-input:focus { outline: none; border-color: var(--tb-primary); box-shadow: 0 0 0 3px var(--tb-focus-ring); }
80
+ .tb-input[readonly] { background: color-mix(in srgb, var(--tb-muted) 12%, transparent); border-color: transparent; color: var(--tb-muted); cursor: default; }
81
+ .tb-input[readonly]:focus { border-color: var(--tb-muted); box-shadow: none; }
82
+ .tb-invalid .tb-input { border-color: var(--tb-danger); }
83
+ .tb-invalid .tb-input:focus { box-shadow: 0 0 0 3px var(--tb-danger-soft); }
84
+ .tb-error { color: var(--tb-danger); font-size: 13px; min-height: 0; }
85
+ .tb-error:empty { display: none; }
86
+ .tb-hint { color: var(--tb-muted); font-size: 13px; }
87
+ .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; }
88
+ @keyframes tb-pending { from { background-position: 200% 0; } to { background-position: -200% 0; } }
89
+
90
+ .tb-check-row { display: flex; }
91
+ .tb-check { display: inline-flex; align-items: center; gap: var(--tb-space-3); min-height: var(--tb-control); cursor: pointer; }
92
+ .tb-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--tb-primary); cursor: pointer; }
93
+ .tb-check input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); border-radius: 4px; }
94
+ .tb-check input[type="radio"]:focus-visible { border-radius: 50%; }
95
+ .tb-radios { display: flex; flex-wrap: wrap; column-gap: var(--tb-space-5); }
96
+ .tb-radio-group { flex-basis: 100%; }
97
+ .tb-radio-title { display: block; margin-top: var(--tb-space-2); font-size: 13px; font-weight: 600; color: var(--tb-muted); }
98
+ .tb-switch input {
99
+ appearance: none;
100
+ width: 36px;
101
+ height: 20px;
102
+ flex: none;
103
+ border-radius: 10px;
104
+ background: var(--tb-muted);
105
+ position: relative;
106
+ transition: background var(--tb-fast) var(--tb-ease);
107
+ }
108
+ .tb-switch input::before {
109
+ content: "";
110
+ position: absolute;
111
+ top: 2px;
112
+ left: 2px;
113
+ width: 16px;
114
+ height: 16px;
115
+ border-radius: 50%;
116
+ background: var(--tb-surface);
117
+ box-shadow: var(--tb-shadow-1);
118
+ transition: transform var(--tb-fast) var(--tb-ease);
119
+ }
120
+ .tb-switch input:checked { background: var(--tb-primary); }
121
+ .tb-switch input:checked::before { transform: translateX(16px); }
122
+ .tb-switch input:focus-visible { border-radius: 10px; }
123
+ .tb-check input:disabled, .tb-check input:disabled + span { opacity: 0.45; cursor: not-allowed; }
124
+
125
+ /* a slider: a track filled up to where it stands (--tb-at, set by the host), then its number */
126
+ .tb-slider { display: flex; align-items: center; gap: var(--tb-space-3); min-height: var(--tb-control); }
127
+ .tb-range { appearance: none; flex: 1; min-width: 0; height: 24px; margin: 0; background: transparent; cursor: pointer; }
128
+ .tb-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--tb-primary) var(--tb-at, 0%), var(--tb-border-strong) var(--tb-at, 0%)); }
129
+ .tb-range::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--tb-primary) var(--tb-at, 0%), var(--tb-border-strong) var(--tb-at, 0%)); }
130
+ .tb-range::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; margin-top: -7px; border: 2px solid var(--tb-primary); border-radius: 50%; background: var(--tb-surface); box-shadow: var(--tb-shadow-1); transition: transform var(--tb-fast) var(--tb-ease); }
131
+ .tb-range::-moz-range-thumb { box-sizing: border-box; width: 20px; height: 20px; border: 2px solid var(--tb-primary); border-radius: 50%; background: var(--tb-surface); box-shadow: var(--tb-shadow-1); transition: transform var(--tb-fast) var(--tb-ease); }
132
+ .tb-range:active::-webkit-slider-thumb { transform: scale(1.1); }
133
+ .tb-range:active::-moz-range-thumb { transform: scale(1.1); }
134
+ .tb-range:focus-visible { outline: none; }
135
+ .tb-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--tb-focus-ring); }
136
+ .tb-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--tb-focus-ring); }
137
+ .tb-range:disabled { opacity: 0.45; cursor: not-allowed; }
138
+ .tb-slider-value { min-width: 4ch; text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; }
139
+ .tb-invalid .tb-range::-webkit-slider-thumb { border-color: var(--tb-danger); }
140
+ .tb-invalid .tb-range::-moz-range-thumb { border-color: var(--tb-danger); }
141
+
142
+ .tb-actions { display: flex; flex-wrap: wrap; gap: var(--tb-space-3); padding-top: var(--tb-space-2); }
143
+ .tb-button {
144
+ font: inherit;
145
+ font-weight: 600;
146
+ font-size: 14px;
147
+ min-height: var(--tb-control);
148
+ padding: 0 var(--tb-space-5);
149
+ border-radius: var(--tb-radius);
150
+ border: var(--tb-line) solid var(--tb-border-strong);
151
+ background: var(--tb-surface);
152
+ color: var(--tb-text);
153
+ cursor: pointer;
154
+ display: inline-flex;
155
+ align-items: center;
156
+ justify-content: center;
157
+ gap: var(--tb-space-2);
158
+ 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);
159
+ }
160
+ .tb-button.tb-small { font-size: 13px; padding: 0 var(--tb-space-3); gap: var(--tb-space-1); }
161
+ .tb-button:hover { background: var(--tb-bg); border-color: var(--tb-muted); }
162
+ .tb-button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
163
+ .tb-button.tb-primary { background: var(--tb-primary); border-color: var(--tb-primary); color: var(--tb-on-primary); box-shadow: var(--tb-shadow-1); }
164
+ .tb-button.tb-primary:hover { background: var(--tb-primary-hover); border-color: var(--tb-primary-hover); }
165
+ .tb-button.tb-accent { background: var(--tb-accent); border-color: var(--tb-accent); color: var(--tb-on-accent); }
166
+ .tb-button.tb-danger { background: var(--tb-danger); border-color: var(--tb-danger); color: var(--tb-on-danger); }
167
+ .tb-button:disabled, .tb-button[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
168
+ .tb-button.tb-primary[aria-disabled="true"]:hover { background: var(--tb-primary); border-color: var(--tb-primary); }
169
+ .tb-button.tb-has-icon:not(:has(> span:not(:empty))) { padding: 0; width: var(--tb-control); }
170
+ /* a button that opens a menu: a chevron after its text, or alone after its icon */
171
+ .tb-menu-chevron { transition: transform var(--tb-fast) var(--tb-ease); }
172
+ .tb-button .tb-menu-chevron { width: 16px; height: 16px; margin-inline-end: calc(var(--tb-space-1) * -1); }
173
+ [aria-expanded="true"] > .tb-menu-chevron { transform: rotate(180deg); }
174
+ .tb-button.tb-has-icon[aria-haspopup]:not(:has(> span:not(:empty))) { width: auto; padding: 0 var(--tb-space-2); gap: 2px; }
175
+
176
+ .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); }
177
+ .tb-button .tb-icon { width: 18px; height: 18px; }
178
+ .tb-icon-face { display: inline-flex; align-self: flex-start; color: var(--tb-text); }
179
+ .tb-icon-face .tb-icon { width: 24px; height: 24px; }
180
+ .tb-icon-face.tb-small .tb-icon { width: 18px; height: 18px; }
181
+ .tb-icon-face.tb-large .tb-icon { width: 32px; height: 32px; }
182
+ .tb-icon-face.tb-muted { color: var(--tb-muted); }
183
+ .tb-icon-face.tb-primary { color: var(--tb-primary); }
184
+ .tb-icon-face.tb-accent { color: var(--tb-accent); }
185
+ .tb-icon-face.tb-danger { color: var(--tb-danger); }
186
+ .tb-icon-face.tb-success { color: var(--tb-success); }
187
+ .tb-icon-face.tb-warning { color: var(--tb-warning); }
188
+ .tb-input-icon { position: relative; display: flex; }
189
+ .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; }
190
+ .tb-input-icon > .tb-input { padding-left: calc(var(--tb-space-3) + 26px); }
191
+ .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); }
192
+ .tb-upload.tb-drop-over { border-color: var(--tb-primary); background: var(--tb-primary-soft); }
193
+ .tb-invalid .tb-upload { border-color: var(--tb-danger); }
194
+ .tb-upload-hint { color: var(--tb-muted); font-size: 0.9em; }
195
+ .tb-upload[hidden] { display: none; }
196
+ .tb-upload[hidden] + .tb-upload-list { margin-top: 0; }
197
+ .tb-upload-list { list-style: none; margin: var(--tb-space-2) 0 0; padding: 0; display: grid; gap: var(--tb-space-1); }
198
+ .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); }
199
+ .tb-upload-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
200
+ a.tb-upload-name { color: var(--tb-primary); text-decoration: none; }
201
+ a.tb-upload-name:hover { text-decoration: underline; }
202
+ .tb-upload-thumb { width: 32px; height: 32px; margin: var(--tb-space-1) 0; object-fit: cover; border-radius: var(--tb-radius); flex: none; }
203
+ .tb-upload-size { color: var(--tb-muted); font-size: 0.9em; font-variant-numeric: tabular-nums; }
204
+ .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; }
205
+ .tb-upload-remove:hover:not(:disabled) { background: var(--tb-danger-soft); color: var(--tb-danger); }
206
+ .tb-upload-remove:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
207
+ .tb-upload-remove .tb-icon { width: 16px; height: 16px; }
208
+ .tb-date { position: relative; display: flex; }
209
+ .tb-date > .tb-input { padding-right: calc(var(--tb-control) + var(--tb-space-1)); }
210
+ .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; }
211
+ .tb-date-button:hover:not(:disabled) { color: var(--tb-text); }
212
+ .tb-date-button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
213
+ .tb-date-button:disabled { cursor: default; opacity: 0.5; }
214
+ .tb-date-button .tb-icon { width: 18px; height: 18px; }
215
+ .tb-tree-wrap { min-width: 0; }
216
+ .tb-tree, .tb-tree ul { list-style: none; margin: 0; padding: 0; }
217
+ .tb-tree li { outline: none; }
218
+ .tb-tree-row {
219
+ display: flex;
220
+ align-items: center;
221
+ gap: var(--tb-space-1);
222
+ min-height: calc(var(--tb-control) - 8px);
223
+ padding: 0 var(--tb-space-2) 0 calc(var(--tb-level, 0) * 20px + var(--tb-space-1));
224
+ border-radius: var(--tb-radius);
225
+ cursor: pointer;
226
+ user-select: none;
227
+ transition: background var(--tb-fast) var(--tb-ease);
228
+ }
229
+ .tb-tree-row:hover { background: var(--tb-bg); }
230
+ .tb-tree li:focus-visible > .tb-tree-row { box-shadow: inset 0 0 0 2px var(--tb-focus); }
231
+ .tb-tree li.tb-selected > .tb-tree-row { background: var(--tb-primary-soft); font-weight: 550; }
232
+ .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); }
233
+ .tb-tree-toggle .tb-icon { width: 16px; height: 16px; transition: transform var(--tb-fast) var(--tb-ease); }
234
+ .tb-tree li:not([aria-expanded]) > .tb-tree-row > .tb-tree-toggle { visibility: hidden; }
235
+ .tb-tree li[aria-expanded="true"] > .tb-tree-row > .tb-tree-toggle .tb-icon { transform: rotate(90deg); }
236
+ .tb-tree-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
237
+ .tb-tree-row.tb-drop-over { box-shadow: inset 0 0 0 2px var(--tb-primary); }
238
+
239
+ `;
@@ -0,0 +1 @@
1
+ export declare const FUSION: string;
@@ -0,0 +1,66 @@
1
+ // What the fusion skin changes on top of the component rules.
2
+ export const FUSION = String.raw `
3
+ /* fusion: recalls Qt: group boxes with their title on the frame, buttons with a gentle gradient, tab widgets in a frame */
4
+ .tb-title { font-size: 24px; font-weight: 600; letter-spacing: 0; }
5
+ .tb-heading { font-size: 18px; font-weight: 600; letter-spacing: 0; }
6
+ .tb-label { font-weight: 400; }
7
+ .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; }
8
+ .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; }
9
+ .tb-dialog .tb-panel > .tb-panel-title { background: var(--tb-raised); }
10
+ .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; }
11
+ .tb-button:hover { background: linear-gradient(var(--tb-face-hi), var(--tb-face-hi)); border-color: var(--tb-border-strong); }
12
+ .tb-button:active:not(:disabled, [aria-disabled="true"]) { background: var(--tb-face-lo); box-shadow: inset 0 1px 2px var(--tb-border-strong); }
13
+ .tb-button:focus-visible { border-color: var(--tb-focus); box-shadow: 0 0 0 2px var(--tb-focus-ring); }
14
+ /* the default button is framed in the primary color; danger and accent color their text */
15
+ .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); }
16
+ .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))); }
17
+ .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); }
18
+ .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); }
19
+ .tb-button.tb-accent { color: var(--tb-accent); }
20
+ .tb-toolbar { padding: 2px; background: linear-gradient(var(--tb-face-hi), var(--tb-face-lo)); border-color: var(--tb-border); border-radius: 0; }
21
+ .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):hover { background: var(--tb-face-hi); border-color: var(--tb-border-strong); }
22
+ .tb-input { border-radius: 2px; border-color: var(--tb-border-strong); box-shadow: inset 0 1px 1px var(--tb-border); }
23
+ .tb-input:focus, .tb-rich-box:focus { border-color: var(--tb-focus); box-shadow: 0 0 0 1px var(--tb-focus); }
24
+ .tb-invalid .tb-input:focus { box-shadow: 0 0 0 1px var(--tb-danger); }
25
+ .tb-input[readonly] { box-shadow: none; }
26
+ select.tb-input {
27
+ border-radius: 3px;
28
+ 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));
29
+ background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%, 0 0;
30
+ background-size: 5px 5px, 5px 5px, 100% 100%;
31
+ box-shadow: none;
32
+ }
33
+ select.tb-input:focus { box-shadow: 0 0 0 2px var(--tb-focus-ring); }
34
+ /* tabs: a tab widget, the chosen tab open onto a framed page */
35
+ .tb-tabs { gap: 0; }
36
+ .tb-tablist { position: relative; z-index: 1; gap: 0; margin-bottom: -1px; padding-left: 2px; box-shadow: none; }
37
+ .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; }
38
+ .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); }
39
+ .tb-tab-panel { padding: var(--tb-space-4); border: 1px solid var(--tb-border-strong); border-radius: 0 3px 3px 3px; }
40
+ .tb-table-wrap, .tb-list { border-color: var(--tb-border-strong); border-radius: 2px; box-shadow: none; }
41
+ .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); }
42
+ .tb-sort { padding: 4px var(--tb-space-3); }
43
+ @media (min-width: 641px) {
44
+ .tb-table th { border-right: 1px solid var(--tb-border-strong); }
45
+ .tb-table td { height: 30px; padding: 4px var(--tb-space-3); border-right: 1px solid var(--tb-border); }
46
+ .tb-table tr > :last-child { border-right: 0; }
47
+ }
48
+ .tb-list > li { padding: var(--tb-space-2) var(--tb-space-3); }
49
+ .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); }
50
+ .tb-list > li.tb-selected .tb-list-secondary, .tb-tree li.tb-selected > .tb-tree-row .tb-tree-toggle { color: inherit; }
51
+ .tb-tree-row { border-radius: 0; }
52
+ .tb-progress { height: 20px; border: 1px solid var(--tb-border-strong); border-radius: 3px; background: var(--tb-surface); }
53
+ .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); }
54
+ .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; }
55
+ .tb-menu-item, .tb-lookup-option { min-height: 28px; border-radius: 0; }
56
+ .tb-menu-item:focus, .tb-lookup-option:hover, .tb-lookup-option[aria-selected="true"] { background: var(--tb-primary); color: var(--tb-on-primary); }
57
+ .tb-menu-item:focus svg { color: inherit; }
58
+ .tb-dialog { border: 1px solid var(--tb-border-strong); border-radius: 3px; }
59
+ .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); }
60
+ .tb-dialog-title { font-size: 14px; font-weight: 600; }
61
+ .tb-dialog-close { width: 28px; height: 28px; font-size: 18px; border-radius: 3px; }
62
+ .tb-dialog-body { padding-top: var(--tb-space-5); }
63
+ /* a toast is a tooltip */
64
+ .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; }
65
+ .tb-scroll { background: var(--tb-surface); border-color: var(--tb-border-strong); border-radius: 2px; }
66
+ `;
@@ -0,0 +1 @@
1
+ export declare const LAYOUT: string;
@@ -0,0 +1,166 @@
1
+ // Component rules of the theme: the page itself, and the faces that lay others out: view, column, row, desktop, tiles, grid, panel, texts.
2
+ // Only token variables appear here, never raw values of color.
3
+ export const LAYOUT = String.raw `
4
+ *, *::before, *::after { box-sizing: border-box; }
5
+ html, body { margin: 0; }
6
+ body {
7
+ background: var(--tb-bg);
8
+ color: var(--tb-text);
9
+ font-family: var(--tb-font);
10
+ font-size: 15px;
11
+ line-height: 1.5;
12
+ font-variant-numeric: tabular-nums;
13
+ -webkit-font-smoothing: antialiased;
14
+ text-rendering: optimizeLegibility;
15
+ }
16
+ .tb-view {
17
+ max-width: 720px;
18
+ margin: 0 auto;
19
+ padding: var(--tb-space-7) var(--tb-space-5);
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: var(--tb-space-5);
23
+ }
24
+ .tb-view:has(> .tb-split) { max-width: 1120px; }
25
+ .tb-view.tb-small { max-width: 480px; font-size: inherit; }
26
+ .tb-view.tb-large { max-width: 1120px; }
27
+ .tb-view.tb-fill { max-width: none; }
28
+ .tb-column { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
29
+ .tb-screens, .tb-screen { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
30
+ .tb-screen:focus { outline: none; }
31
+ /* entering a screen focuses its title for screen readers; it is not a control, so no ring */
32
+ .tb-screen :is(h1, h2)[tabindex="-1"]:focus { outline: none; }
33
+ .tb-screens[aria-busy] { cursor: progress; }
34
+ /* a screen on show while its on-enter still loads: what has no data yet is a gray bar */
35
+ .tb-screens[data-tb-loading] :is(.tb-title, .tb-heading, .tb-text):empty::before {
36
+ content: ""; display: inline-block; vertical-align: middle; width: 14em; max-width: 100%; height: 0.8lh;
37
+ border-radius: var(--tb-radius); background: color-mix(in srgb, var(--tb-muted) 22%, transparent); animation: tb-skeleton 1.2s ease-in-out infinite;
38
+ }
39
+ .tb-screens[data-tb-loading] .tb-text:empty::before { width: 24em; }
40
+ .tb-screens[data-tb-loading] .tb-empty:not([hidden]) {
41
+ color: transparent; min-height: 9em; margin: var(--tb-space-4);
42
+ background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--tb-muted) 22%, transparent) 0 1.25em, transparent 1.25em 2.75em);
43
+ animation: tb-skeleton 1.2s ease-in-out infinite;
44
+ }
45
+ @keyframes tb-skeleton { 50% { opacity: 0.5; } }
46
+ .tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-space-3); }
47
+ .tb-row:where(:not(.tb-top, .tb-middle, .tb-bottom)):has(> .tb-field) { align-items: flex-end; }
48
+ /* with fields, a text beside them sits on the line of the controls, not on their labels */
49
+ .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)); }
50
+ .tb-row.tb-top { align-items: flex-start; }
51
+ .tb-row.tb-middle { align-items: center; }
52
+ .tb-row.tb-bottom { align-items: flex-end; }
53
+ .tb-row.tb-center { justify-content: center; }
54
+ .tb-row.tb-right { justify-content: flex-end; }
55
+ .tb-row.tb-spread { justify-content: space-between; }
56
+ .tb-fill { flex: 1 1 0; min-width: 0; }
57
+ .tb-view:has(.tb-desktop) { min-height: 100dvh; box-sizing: border-box; }
58
+ .tb-view:has(.tb-desktop) .tb-screens, .tb-screen:has(> .tb-desktop) { flex: 1 1 auto; }
59
+ .tb-view:has(.tb-fit) .tb-screens, .tb-screen:has(> .tb-fit) { flex: 1 1 auto; min-height: 0; }
60
+ .tb-view:has(.tb-fit) { height: 100dvh; box-sizing: border-box; }
61
+ .tb-fit { flex: 1 1 auto; min-height: 0; }
62
+ .tb-fit > * { min-height: 0; overflow: auto; }
63
+ .tb-fit > * > * { flex-shrink: 0; }
64
+ .tb-desktop {
65
+ flex: 1 1 auto;
66
+ min-height: 240px;
67
+ display: flex;
68
+ flex-wrap: wrap;
69
+ align-content: flex-start;
70
+ gap: var(--tb-space-3);
71
+ padding: var(--tb-space-5);
72
+ border-radius: var(--tb-radius);
73
+ background-color: color-mix(in oklch, var(--tb-primary) 9%, var(--tb-bg));
74
+ background-size: cover;
75
+ background-position: center;
76
+ }
77
+ /* an image behind what holds it, under a veil that keeps text on it AA; muted text needs the text's color there */
78
+ :has(> .tb-backdrop) { position: relative; isolation: isolate; --tb-muted: var(--tb-text); }
79
+ .tb-backdrop { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background-size: cover; background-position: center; pointer-events: none; }
80
+ .tb-backdrop::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--tb-scrim); }
81
+ /* the backdrop of the view or of a screen is the window's */
82
+ :is(.tb-view, .tb-screen) > .tb-backdrop { position: fixed; border-radius: 0; }
83
+ .tb-tile {
84
+ font: inherit;
85
+ font-size: 13px;
86
+ width: 112px;
87
+ min-height: 96px;
88
+ padding: var(--tb-space-3) var(--tb-space-2);
89
+ border: 1px solid transparent;
90
+ border-radius: var(--tb-radius);
91
+ background: transparent;
92
+ color: var(--tb-text);
93
+ cursor: pointer;
94
+ display: flex;
95
+ flex-direction: column;
96
+ align-items: center;
97
+ gap: var(--tb-space-2);
98
+ text-align: center;
99
+ overflow-wrap: anywhere;
100
+ transition: background var(--tb-fast) var(--tb-ease), border-color var(--tb-fast) var(--tb-ease);
101
+ }
102
+ .tb-tile:hover { background: var(--tb-surface); border-color: var(--tb-border); }
103
+ .tb-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
104
+ .tb-tile > svg { flex: none; width: 36px; height: 36px; color: var(--tb-primary); }
105
+ .tb-tile { position: relative; }
106
+ /* a tile's second icon (mark #list): small, at the bottom right of its icon, on a disc of the background */
107
+ .tb-tile-mark {
108
+ position: absolute;
109
+ top: calc(var(--tb-space-3) + 19px);
110
+ left: calc(50% + 5px);
111
+ width: 20px;
112
+ height: 20px;
113
+ border-radius: 50%;
114
+ background: var(--tb-bg);
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ pointer-events: none;
119
+ }
120
+ .tb-tile-mark > svg { width: 14px; height: 14px; color: var(--tb-text); }
121
+ .tb-tile:hover > .tb-tile-mark { background: var(--tb-surface); }
122
+ .tb-tile-linked::after {
123
+ content: '';
124
+ position: absolute;
125
+ top: calc(var(--tb-space-3) + 21px);
126
+ left: calc(50% - 22px);
127
+ width: 16px;
128
+ height: 16px;
129
+ border-radius: 3px;
130
+ background: var(--tb-text);
131
+ outline: 2px solid var(--tb-bg);
132
+ -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");
133
+ 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");
134
+ }
135
+ .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))); }
136
+ .tb-panel {
137
+ background: var(--tb-raised);
138
+ border: var(--tb-line) solid var(--tb-border);
139
+ border-radius: var(--tb-radius-lg);
140
+ box-shadow: var(--tb-shadow-1);
141
+ padding: var(--tb-space-6);
142
+ display: flex;
143
+ flex-direction: column;
144
+ gap: var(--tb-space-5);
145
+ }
146
+ .tb-panel.tb-small { width: 100%; max-width: 420px; font-size: inherit; }
147
+ .tb-panel.tb-primary { border-color: var(--tb-primary); box-shadow: inset 0 0 0 1px var(--tb-primary), var(--tb-shadow-1); }
148
+ .tb-panel.tb-accent { border-color: var(--tb-accent); }
149
+ .tb-panel.tb-danger { border-color: var(--tb-danger); }
150
+ .tb-panel.tb-success { border-color: var(--tb-success); }
151
+ .tb-panel.tb-warning { border-color: var(--tb-warning); }
152
+ .tb-panel:focus-visible, .tb-column:focus-visible, .tb-row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
153
+ .tb-panel.tb-primary:focus-visible { box-shadow: inset 0 0 0 1px var(--tb-primary), 0 0 0 3px var(--tb-focus-ring); }
154
+ .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; }
155
+ .tb-divider { border: 0; border-top: var(--tb-line) solid var(--tb-border); margin: var(--tb-space-2) 0; width: 100%; }
156
+
157
+ .tb-title { margin: 0; font-family: var(--tb-headings); font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; }
158
+ .tb-heading { margin: 0; font-family: var(--tb-headings); font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
159
+ .tb-text { margin: 0; }
160
+ .tb-small { font-size: 13px; }
161
+ .tb-muted { color: var(--tb-muted); }
162
+ .tb-text.tb-danger { color: var(--tb-danger); }
163
+ .tb-text.tb-success { color: var(--tb-success); }
164
+ .tb-text.tb-primary { color: var(--tb-primary); }
165
+
166
+ `;
@@ -0,0 +1 @@
1
+ export declare const MEDIA: string;
@@ -0,0 +1,106 @@
1
+ // Component rules of the theme: scrolling boxes, images, video and sound, drawings, charts, orbits, progress, widgets and photos.
2
+ // Only token variables appear here, never raw values of color.
3
+ export const MEDIA = String.raw `
4
+ .tb-scroll {
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: var(--tb-space-4);
8
+ min-width: 0;
9
+ max-height: 400px;
10
+ overflow: auto;
11
+ overscroll-behavior: contain;
12
+ padding: var(--tb-space-3);
13
+ border: var(--tb-line) solid var(--tb-border);
14
+ border-radius: var(--tb-radius);
15
+ }
16
+ .tb-scroll.tb-small { max-height: 240px; font-size: inherit; }
17
+ .tb-scroll.tb-large { max-height: 640px; }
18
+ .tb-scroll:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
19
+
20
+ .tb-image { display: block; max-width: 100%; height: auto; border-radius: var(--tb-radius); object-fit: cover; }
21
+ .tb-image.tb-round { aspect-ratio: 1; border-radius: 50%; }
22
+ .tb-video { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: auto 16 / 9; border-radius: var(--tb-radius); }
23
+ .tb-audio { display: block; width: 100%; max-width: 480px; }
24
+ :is(.tb-video, .tb-audio).tb-small { width: 320px; }
25
+ :is(.tb-video, .tb-audio).tb-medium { width: 480px; }
26
+ .tb-video.tb-large { width: 720px; }
27
+ :is(.tb-video, .tb-audio).tb-fill { max-width: none; }
28
+ :is(.tb-video, .tb-audio):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
29
+ .tb-canvas { display: block; max-width: 100%; }
30
+ .tb-canvas > svg { display: block; max-width: 100%; height: auto; overflow: visible; }
31
+ .tb-canvas.tb-fill > svg { width: 100%; }
32
+ .tb-chart { display: flex; flex-direction: column; gap: var(--tb-space-2); align-self: stretch; width: 100%; margin: 0; min-width: 0; }
33
+ .tb-chart-caption { font-weight: 600; }
34
+ .tb-chart-plot { width: 100%; min-width: 0; }
35
+ .tb-chart-plot > svg { display: block; width: 100%; height: auto; overflow: visible; }
36
+ .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; }
37
+ .tb-chart-key { display: inline-flex; align-items: center; gap: var(--tb-space-2); }
38
+ .tb-chart-swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--tb-swatch); }
39
+ .tb-chart-empty { margin: 0; color: var(--tb-muted); }
40
+ .tb-chart-caption[hidden], .tb-chart-plot[hidden], .tb-chart-legend[hidden], .tb-chart-empty[hidden] { display: none; }
41
+ .tb-orbit { position: relative; align-self: stretch; width: 100%; min-width: 0; height: 480px; border-radius: var(--tb-radius);
42
+ background: radial-gradient(ellipse at 50% 45%, color-mix(in oklch, var(--tb-primary) 7%, transparent) 0%, transparent 70%); }
43
+ .tb-orbit.tb-small { height: 320px; }
44
+ .tb-orbit.tb-large { height: 640px; }
45
+ .tb-orbit.tb-fit { height: auto; min-height: 320px; }
46
+ .tb-orbit > svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; user-select: none; touch-action: none; outline: none; }
47
+ .tb-orbit > svg.tb-orbit-panning { cursor: grabbing; }
48
+ .tb-orbit > svg:focus-visible { box-shadow: inset 0 0 0 3px var(--tb-focus-ring); border-radius: var(--tb-radius); }
49
+ .tb-orbit-node { cursor: pointer; outline: none; }
50
+ .tb-orbit-focus { cursor: default; }
51
+ .tb-orbit-body { vector-effect: non-scaling-stroke; transition: stroke-width .2s; }
52
+ .tb-orbit-node:hover .tb-orbit-body, .tb-orbit-node:focus-visible .tb-orbit-body { stroke-width: 3; }
53
+ .tb-orbit-node:focus-visible .tb-orbit-body { stroke: var(--tb-focus); }
54
+ .tb-orbit-halo { opacity: .55; transition: opacity .25s; pointer-events: none; }
55
+ .tb-orbit-node:hover .tb-orbit-halo, .tb-orbit-node:focus-visible .tb-orbit-halo { opacity: 1; }
56
+ .tb-orbit-node text { pointer-events: none; fill: var(--tb-text); text-anchor: middle; dominant-baseline: middle; font-family: var(--tb-font); }
57
+ .tb-orbit-node .tb-orbit-count { fill: var(--tb-muted); }
58
+ .tb-orbit-line, .tb-orbit-step { fill: none; vector-effect: non-scaling-stroke; pointer-events: none; }
59
+ .tb-orbit-line { stroke-width: 1; }
60
+ .tb-orbit-step { stroke-linecap: round; }
61
+ .tb-orbit-spin { animation: tb-orbit-spin 60s linear infinite; }
62
+ .tb-orbit-spin.tb-orbit-rev { animation-direction: reverse; animation-duration: 90s; }
63
+ .tb-orbit-spin.tb-orbit-fast { animation-duration: 24s; }
64
+ @keyframes tb-orbit-spin { to { transform: rotate(360deg); } }
65
+ .tb-orbit-now { animation: tb-orbit-pulse 1.8s ease-in-out infinite; }
66
+ @keyframes tb-orbit-pulse { 50% { opacity: .35; } }
67
+ .tb-orbit-edge { fill: none; pointer-events: none; }
68
+ .tb-orbit-edge-solid, .tb-orbit-edge-dashed { stroke: var(--tb-accent); stroke-width: 1.4; stroke-opacity: .7; }
69
+ .tb-orbit-edge-dashed { stroke-dasharray: 5 5; }
70
+ .tb-orbit-edge-faint { stroke: var(--tb-muted); stroke-width: 1; stroke-opacity: .35; }
71
+ .tb-orbit-edge-trail { stroke: var(--tb-muted); stroke-width: 1; stroke-opacity: .5; stroke-dasharray: 2 6; }
72
+ .tb-orbit-label { font-size: 11px; font-family: var(--tb-font); fill: var(--tb-muted); text-anchor: middle; pointer-events: none;
73
+ paint-order: stroke; stroke: var(--tb-bg); stroke-width: 3px; letter-spacing: .02em; }
74
+ .tb-orbit-label.tb-orbit-later { visibility: hidden; }
75
+ .tb-orbit-label.tb-orbit-later.tb-orbit-shown { visibility: visible; }
76
+ .tb-image.tb-small { width: 96px; }
77
+ .tb-image.tb-medium { width: 240px; }
78
+ .tb-image.tb-large { width: 480px; }
79
+ .tb-image.tb-fill { width: 100%; }
80
+
81
+ .tb-progress-wrap { display: flex; flex-direction: column; gap: var(--tb-space-2); min-width: 0; }
82
+ .tb-progress-label { font-size: 14px; font-weight: 550; }
83
+ .tb-progress-label[hidden] { display: none; }
84
+ .tb-progress { height: 8px; border-radius: 4px; background: var(--tb-border); overflow: hidden; }
85
+ .tb-upload-progress { height: 6px; }
86
+ .tb-widget { display: block; width: 100%; min-width: 0; }
87
+ .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); }
88
+ .tb-photo.tb-drop-over { border-color: var(--tb-primary); background: var(--tb-primary-soft); }
89
+ .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); }
90
+ .tb-photo-frame.tb-photo-pick { cursor: pointer; }
91
+ .tb-photo-frame.tb-round { border-radius: 50%; }
92
+ .tb-photo-frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }
93
+ .tb-photo-frame > .tb-icon { width: 32px; height: 32px; }
94
+ .tb-invalid .tb-photo-frame { border-color: var(--tb-danger); }
95
+ .tb-photo-actions { display: flex; flex-wrap: wrap; gap: var(--tb-space-2); }
96
+ .tb-photo-actions[hidden], .tb-photo-remove[hidden] { display: none; }
97
+ .tb-upload-progress[hidden] { display: none; }
98
+ .tb-progress-bar { height: 100%; width: 0; border-radius: inherit; background: var(--tb-primary); transition: width 300ms var(--tb-ease); }
99
+ .tb-success .tb-progress-bar { background: var(--tb-success); }
100
+ .tb-warning .tb-progress-bar { background: var(--tb-warning); }
101
+ .tb-danger .tb-progress-bar { background: var(--tb-danger); }
102
+ .tb-accent .tb-progress-bar { background: var(--tb-accent); }
103
+ .tb-indeterminate .tb-progress-bar { width: 35%; animation: tb-indeterminate 1.4s var(--tb-ease) infinite; }
104
+ @keyframes tb-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
105
+
106
+ `;
@@ -0,0 +1 @@
1
+ export declare const NAVIGATION: string;
@@ -0,0 +1,36 @@
1
+ // Component rules of the theme: toolbars, breadcrumbs and links, and the classes that hide.
2
+ // Only token variables appear here, never raw values of color.
3
+ export const NAVIGATION = String.raw `
4
+ .tb-toolbar {
5
+ display: flex;
6
+ flex-wrap: wrap;
7
+ align-items: center;
8
+ gap: var(--tb-space-1);
9
+ padding: var(--tb-space-1);
10
+ background: var(--tb-surface);
11
+ border: var(--tb-line) solid var(--tb-border);
12
+ border-radius: var(--tb-radius-lg);
13
+ }
14
+ .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger) { border-color: transparent; background: transparent; }
15
+ .tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):hover { background: var(--tb-bg); }
16
+ .tb-toolbar > .tb-button { padding: 0 var(--tb-space-3); }
17
+ .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); }
18
+
19
+ .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; }
20
+ .tb-breadcrumb li { display: inline-flex; align-items: center; gap: var(--tb-space-1); min-width: 0; }
21
+ .tb-breadcrumb li + li::before { content: "›" / ""; color: var(--tb-muted); padding: 0 var(--tb-space-1); }
22
+ .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; }
23
+ button.tb-crumb { cursor: pointer; }
24
+ button.tb-crumb:hover { color: var(--tb-text); text-decoration: underline; text-underline-offset: 3px; }
25
+ button.tb-crumb:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
26
+ .tb-crumb[aria-current] { color: var(--tb-text); font-weight: 600; }
27
+ .tb-crumb-more { display: none !important; }
28
+
29
+ .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; }
30
+
31
+ .tb-hidden { display: none !important; }
32
+ /* read by screen readers, not shown */
33
+ .tb-sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
34
+ @media (min-width: 641px) { .tb-narrow-only { display: none !important; } }
35
+
36
+ `;
@@ -0,0 +1 @@
1
+ export declare const PANES: string;