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.
- package/README.md +2 -0
- package/dist/cli.js +10040 -7519
- package/dist/lib/core/boot.js +10 -7
- package/dist/lib/core/eval.js +2 -2
- package/dist/lib/core/machine/checks.d.ts +1 -0
- package/dist/lib/core/machine/checks.js +250 -0
- package/dist/lib/core/machine/events.d.ts +1 -0
- package/dist/lib/core/machine/events.js +365 -0
- package/dist/lib/core/machine/running.d.ts +1 -0
- package/dist/lib/core/machine/running.js +180 -0
- package/dist/lib/core/machine/shared.d.ts +1 -0
- package/dist/lib/core/machine/shared.js +123 -0
- package/dist/lib/core/machine/snapshot.d.ts +1 -0
- package/dist/lib/core/machine/snapshot.js +244 -0
- package/dist/lib/core/machine/spec.d.ts +1 -0
- package/dist/lib/core/machine/spec.js +274 -0
- package/dist/lib/core/machine/words.d.ts +1 -0
- package/dist/lib/core/machine/words.js +98 -0
- package/dist/lib/core/machine.d.ts +1 -0
- package/dist/lib/core/machine.js +17 -0
- package/dist/lib/core/mezz.js +31 -0
- package/dist/lib/core/natives/control.js +1 -1
- package/dist/lib/core/natives/data.js +6 -1
- package/dist/lib/core/natives/series.js +49 -9
- package/dist/lib/core/natives/text.js +0 -1
- package/dist/lib/host/browser/calendar.d.ts +34 -0
- package/dist/lib/host/browser/calendar.js +268 -0
- package/dist/lib/host/browser/count.d.ts +15 -0
- package/dist/lib/host/browser/count.js +48 -0
- package/dist/lib/host/browser/dialogs.d.ts +39 -0
- package/dist/lib/host/browser/dialogs.js +443 -0
- package/dist/lib/host/browser/drag.d.ts +70 -0
- package/dist/lib/host/browser/drag.js +268 -0
- package/dist/lib/host/browser/drawings.d.ts +30 -0
- package/dist/lib/host/browser/drawings.js +176 -0
- package/dist/lib/host/browser/events.d.ts +16 -0
- package/dist/lib/host/browser/events.js +125 -0
- package/dist/lib/host/browser/faces.d.ts +35 -0
- package/dist/lib/host/browser/faces.js +131 -0
- package/dist/lib/host/browser/fields.d.ts +16 -0
- package/dist/lib/host/browser/fields.js +322 -0
- package/dist/lib/host/browser/keys.d.ts +29 -0
- package/dist/lib/host/browser/keys.js +151 -0
- package/dist/lib/host/browser/lookup.d.ts +25 -0
- package/dist/lib/host/browser/lookup.js +275 -0
- package/dist/lib/host/browser/menus.d.ts +20 -0
- package/dist/lib/host/browser/menus.js +149 -0
- package/dist/lib/host/browser/mount.d.ts +92 -0
- package/dist/lib/host/browser/mount.js +448 -0
- package/dist/lib/host/browser/orbits.d.ts +90 -0
- package/dist/lib/host/browser/orbits.js +379 -0
- package/dist/lib/host/browser/page.d.ts +13 -0
- package/dist/lib/host/browser/page.js +35 -0
- package/dist/lib/host/browser/richtext.d.ts +19 -0
- package/dist/lib/host/browser/richtext.js +379 -0
- package/dist/lib/host/browser/row-faces.d.ts +5 -0
- package/dist/lib/host/browser/row-faces.js +74 -0
- package/dist/lib/host/browser/screens.d.ts +37 -0
- package/dist/lib/host/browser/screens.js +140 -0
- package/dist/lib/host/browser/swipe.d.ts +31 -0
- package/dist/lib/host/browser/swipe.js +178 -0
- package/dist/lib/host/browser/sync.d.ts +24 -0
- package/dist/lib/host/browser/sync.js +450 -0
- package/dist/lib/host/browser/tables.d.ts +65 -0
- package/dist/lib/host/browser/tables.js +505 -0
- package/dist/lib/host/browser/times.d.ts +14 -0
- package/dist/lib/host/browser/times.js +114 -0
- package/dist/lib/host/browser/toolbars.d.ts +17 -0
- package/dist/lib/host/browser/toolbars.js +129 -0
- package/dist/lib/host/browser/trees.d.ts +20 -0
- package/dist/lib/host/browser/trees.js +235 -0
- package/dist/lib/host/browser/uploads.d.ts +29 -0
- package/dist/lib/host/browser/uploads.js +370 -0
- package/dist/lib/host/browser/widget.d.ts +13 -0
- package/dist/lib/host/browser/widget.js +105 -0
- package/dist/lib/host/browser.d.ts +25 -0
- package/dist/lib/host/browser.js +84 -4812
- package/dist/lib/host/devtools/console.d.ts +9 -0
- package/dist/lib/host/devtools/console.js +104 -0
- package/dist/lib/host/devtools/faces.d.ts +25 -0
- package/dist/lib/host/devtools/faces.js +169 -0
- package/dist/lib/host/devtools/log.d.ts +3 -0
- package/dist/lib/host/devtools/log.js +32 -0
- package/dist/lib/host/devtools/machines.d.ts +34 -0
- package/dist/lib/host/devtools/machines.js +212 -0
- package/dist/lib/host/devtools/read.d.ts +13 -0
- package/dist/lib/host/devtools/read.js +52 -0
- package/dist/lib/host/devtools/state.d.ts +90 -0
- package/dist/lib/host/devtools/state.js +123 -0
- package/dist/lib/host/devtools.d.ts +15 -19
- package/dist/lib/host/devtools.js +39 -427
- package/dist/lib/host/fonts.js +4 -3
- package/dist/lib/host/icons.js +4 -0
- package/dist/lib/host/index.d.ts +3 -1
- package/dist/lib/host/index.js +107 -4
- package/dist/lib/host/locale.d.ts +18 -0
- package/dist/lib/host/locale.js +75 -5
- package/dist/lib/host/markdown.d.ts +4 -0
- package/dist/lib/host/markdown.js +8 -0
- package/dist/lib/host/modules.js +118 -19
- package/dist/lib/host/motion.d.ts +32 -0
- package/dist/lib/host/motion.js +190 -0
- package/dist/lib/host/net.js +5 -2
- package/dist/lib/host/palette.d.ts +17 -0
- package/dist/lib/host/palette.js +131 -0
- package/dist/lib/host/scheduler.d.ts +2 -0
- package/dist/lib/host/scheduler.js +4 -0
- package/dist/lib/host/share.d.ts +31 -0
- package/dist/lib/host/share.js +134 -0
- package/dist/lib/host/theme/classic.d.ts +1 -0
- package/dist/lib/host/theme/classic.js +120 -0
- package/dist/lib/host/theme/cupertino.d.ts +1 -0
- package/dist/lib/host/theme/cupertino.js +65 -0
- package/dist/lib/host/theme/data.d.ts +1 -0
- package/dist/lib/host/theme/data.js +109 -0
- package/dist/lib/host/theme/devtools.d.ts +1 -0
- package/dist/lib/host/theme/devtools.js +166 -0
- package/dist/lib/host/theme/dialogs.d.ts +1 -0
- package/dist/lib/host/theme/dialogs.js +63 -0
- package/dist/lib/host/theme/fluent.d.ts +1 -0
- package/dist/lib/host/theme/fluent.js +64 -0
- package/dist/lib/host/theme/forms.d.ts +1 -0
- package/dist/lib/host/theme/forms.js +239 -0
- package/dist/lib/host/theme/fusion.d.ts +1 -0
- package/dist/lib/host/theme/fusion.js +66 -0
- package/dist/lib/host/theme/layout.d.ts +1 -0
- package/dist/lib/host/theme/layout.js +166 -0
- package/dist/lib/host/theme/media.d.ts +1 -0
- package/dist/lib/host/theme/media.js +106 -0
- package/dist/lib/host/theme/navigation.d.ts +1 -0
- package/dist/lib/host/theme/navigation.js +36 -0
- package/dist/lib/host/theme/panes.d.ts +1 -0
- package/dist/lib/host/theme/panes.js +99 -0
- package/dist/lib/host/theme/popups.d.ts +1 -0
- package/dist/lib/host/theme/popups.js +149 -0
- package/dist/lib/host/theme/responsive.d.ts +1 -0
- package/dist/lib/host/theme/responsive.js +103 -0
- package/dist/lib/host/theme/toasts.d.ts +1 -0
- package/dist/lib/host/theme/toasts.js +62 -0
- package/dist/lib/host/theme.js +19 -1384
- package/dist/lib/ui/dialect/events.trb +276 -0
- package/dist/lib/ui/dialect/faces.trb +135 -0
- package/dist/lib/ui/dialect/layout.trb +283 -0
- package/dist/lib/ui/dialect/palette.trb +87 -0
- package/dist/lib/ui/dialect/problems.trb +174 -0
- package/dist/lib/ui/dialect/reactions.trb +198 -0
- package/dist/lib/ui/dialect/rows.trb +208 -0
- package/dist/lib/ui/dialect/screens.trb +293 -0
- package/dist/lib/ui/dialect/steps.trb +203 -0
- package/dist/lib/ui/dialect/validation.trb +137 -0
- package/dist/lib/ui/dialect/view.trb +110 -0
- package/dist/lib/ui/dialect/walking.trb +98 -0
- package/dist/lib/ui/dialect/words.trb +70 -0
- package/dist/lib/ui/i18n.trb +17 -0
- package/dist/lib/ui/test.trb +3 -556
- package/dist/lib/ui/testing/actions.trb +421 -0
- package/dist/lib/ui/testing/faces.trb +148 -0
- package/dist/lib/ui/testing/server.trb +73 -0
- package/dist/lib/ui/ui.trb +25 -1675
- package/dist/trebol.js +4463 -1891
- package/package.json +1 -1
- package/src/core/boot.ts +9 -6
- package/src/core/eval.ts +2 -2
- package/src/core/machine/checks.ts +251 -0
- package/src/core/machine/events.ts +366 -0
- package/src/core/machine/running.ts +181 -0
- package/src/core/machine/shared.ts +124 -0
- package/src/core/machine/snapshot.ts +245 -0
- package/src/core/machine/spec.ts +275 -0
- package/src/core/machine/words.ts +99 -0
- package/src/core/machine.ts +20 -0
- package/src/core/mezz.ts +31 -0
- package/src/core/natives/control.ts +1 -1
- package/src/core/natives/data.ts +6 -1
- package/src/core/natives/parse.ts +1 -1
- package/src/core/natives/series.ts +47 -11
- package/src/core/natives/text.ts +0 -1
- package/src/host/browser/calendar.ts +264 -0
- package/src/host/browser/count.ts +48 -0
- package/src/host/browser/dialogs.ts +439 -0
- package/src/host/browser/drag.ts +278 -0
- package/src/host/browser/drawings.ts +178 -0
- package/src/host/browser/events.ts +117 -0
- package/src/host/browser/faces.ts +143 -0
- package/src/host/browser/fields.ts +315 -0
- package/src/host/browser/keys.ts +145 -0
- package/src/host/browser/lookup.ts +262 -0
- package/src/host/browser/menus.ts +146 -0
- package/src/host/browser/mount.ts +420 -0
- package/src/host/browser/orbits.ts +418 -0
- package/src/host/browser/page.ts +43 -0
- package/src/host/browser/richtext.ts +346 -0
- package/src/host/browser/row-faces.ts +75 -0
- package/src/host/browser/screens.ts +142 -0
- package/src/host/browser/swipe.ts +168 -0
- package/src/host/browser/sync.ts +354 -0
- package/src/host/browser/tables.ts +461 -0
- package/src/host/browser/times.ts +115 -0
- package/src/host/browser/toolbars.ts +126 -0
- package/src/host/browser/trees.ts +205 -0
- package/src/host/browser/uploads.ts +367 -0
- package/src/host/browser/widget.ts +103 -0
- package/src/host/browser.ts +82 -4612
- package/src/host/devtools/console.ts +102 -0
- package/src/host/devtools/faces.ts +160 -0
- package/src/host/devtools/log.ts +34 -0
- package/src/host/devtools/machines.ts +208 -0
- package/src/host/devtools/read.ts +58 -0
- package/src/host/devtools/state.ts +148 -0
- package/src/host/devtools.ts +39 -442
- package/src/host/fonts.ts +4 -3
- package/src/host/icons.ts +4 -0
- package/src/host/index.ts +107 -4
- package/src/host/locale.ts +71 -5
- package/src/host/markdown.ts +9 -0
- package/src/host/modules.ts +117 -21
- package/src/host/motion.ts +204 -0
- package/src/host/net.ts +4 -2
- package/src/host/palette.ts +139 -0
- package/src/host/scheduler.ts +5 -0
- package/src/host/share.ts +168 -0
- package/src/host/theme/classic.ts +121 -0
- package/src/host/theme/cupertino.ts +66 -0
- package/src/host/theme/data.ts +110 -0
- package/src/host/theme/devtools.ts +167 -0
- package/src/host/theme/dialogs.ts +64 -0
- package/src/host/theme/fluent.ts +65 -0
- package/src/host/theme/forms.ts +240 -0
- package/src/host/theme/fusion.ts +67 -0
- package/src/host/theme/layout.ts +167 -0
- package/src/host/theme/media.ts +107 -0
- package/src/host/theme/navigation.ts +37 -0
- package/src/host/theme/panes.ts +100 -0
- package/src/host/theme/popups.ts +150 -0
- package/src/host/theme/responsive.ts +104 -0
- package/src/host/theme/toasts.ts +63 -0
- package/src/host/theme.ts +19 -1384
- package/src/ui/dialect/events.trb +276 -0
- package/src/ui/dialect/faces.trb +135 -0
- package/src/ui/dialect/layout.trb +283 -0
- package/src/ui/dialect/palette.trb +87 -0
- package/src/ui/dialect/problems.trb +174 -0
- package/src/ui/dialect/reactions.trb +198 -0
- package/src/ui/dialect/rows.trb +208 -0
- package/src/ui/dialect/screens.trb +293 -0
- package/src/ui/dialect/steps.trb +203 -0
- package/src/ui/dialect/validation.trb +137 -0
- package/src/ui/dialect/view.trb +110 -0
- package/src/ui/dialect/walking.trb +98 -0
- package/src/ui/dialect/words.trb +70 -0
- package/src/ui/i18n.trb +17 -0
- package/src/ui/test.trb +3 -556
- package/src/ui/testing/actions.trb +421 -0
- package/src/ui/testing/faces.trb +148 -0
- package/src/ui/testing/server.trb +73 -0
- package/src/ui/ui.trb +25 -1675
|
@@ -0,0 +1,167 @@
|
|
|
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
|
+
|
|
4
|
+
export const LAYOUT = String.raw`
|
|
5
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
6
|
+
html, body { margin: 0; }
|
|
7
|
+
body {
|
|
8
|
+
background: var(--tb-bg);
|
|
9
|
+
color: var(--tb-text);
|
|
10
|
+
font-family: var(--tb-font);
|
|
11
|
+
font-size: 15px;
|
|
12
|
+
line-height: 1.5;
|
|
13
|
+
font-variant-numeric: tabular-nums;
|
|
14
|
+
-webkit-font-smoothing: antialiased;
|
|
15
|
+
text-rendering: optimizeLegibility;
|
|
16
|
+
}
|
|
17
|
+
.tb-view {
|
|
18
|
+
max-width: 720px;
|
|
19
|
+
margin: 0 auto;
|
|
20
|
+
padding: var(--tb-space-7) var(--tb-space-5);
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: var(--tb-space-5);
|
|
24
|
+
}
|
|
25
|
+
.tb-view:has(> .tb-split) { max-width: 1120px; }
|
|
26
|
+
.tb-view.tb-small { max-width: 480px; font-size: inherit; }
|
|
27
|
+
.tb-view.tb-large { max-width: 1120px; }
|
|
28
|
+
.tb-view.tb-fill { max-width: none; }
|
|
29
|
+
.tb-column { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
|
|
30
|
+
.tb-screens, .tb-screen { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
|
|
31
|
+
.tb-screen:focus { outline: none; }
|
|
32
|
+
/* entering a screen focuses its title for screen readers; it is not a control, so no ring */
|
|
33
|
+
.tb-screen :is(h1, h2)[tabindex="-1"]:focus { outline: none; }
|
|
34
|
+
.tb-screens[aria-busy] { cursor: progress; }
|
|
35
|
+
/* a screen on show while its on-enter still loads: what has no data yet is a gray bar */
|
|
36
|
+
.tb-screens[data-tb-loading] :is(.tb-title, .tb-heading, .tb-text):empty::before {
|
|
37
|
+
content: ""; display: inline-block; vertical-align: middle; width: 14em; max-width: 100%; height: 0.8lh;
|
|
38
|
+
border-radius: var(--tb-radius); background: color-mix(in srgb, var(--tb-muted) 22%, transparent); animation: tb-skeleton 1.2s ease-in-out infinite;
|
|
39
|
+
}
|
|
40
|
+
.tb-screens[data-tb-loading] .tb-text:empty::before { width: 24em; }
|
|
41
|
+
.tb-screens[data-tb-loading] .tb-empty:not([hidden]) {
|
|
42
|
+
color: transparent; min-height: 9em; margin: var(--tb-space-4);
|
|
43
|
+
background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--tb-muted) 22%, transparent) 0 1.25em, transparent 1.25em 2.75em);
|
|
44
|
+
animation: tb-skeleton 1.2s ease-in-out infinite;
|
|
45
|
+
}
|
|
46
|
+
@keyframes tb-skeleton { 50% { opacity: 0.5; } }
|
|
47
|
+
.tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-space-3); }
|
|
48
|
+
.tb-row:where(:not(.tb-top, .tb-middle, .tb-bottom)):has(> .tb-field) { align-items: flex-end; }
|
|
49
|
+
/* with fields, a text beside them sits on the line of the controls, not on their labels */
|
|
50
|
+
.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)); }
|
|
51
|
+
.tb-row.tb-top { align-items: flex-start; }
|
|
52
|
+
.tb-row.tb-middle { align-items: center; }
|
|
53
|
+
.tb-row.tb-bottom { align-items: flex-end; }
|
|
54
|
+
.tb-row.tb-center { justify-content: center; }
|
|
55
|
+
.tb-row.tb-right { justify-content: flex-end; }
|
|
56
|
+
.tb-row.tb-spread { justify-content: space-between; }
|
|
57
|
+
.tb-fill { flex: 1 1 0; min-width: 0; }
|
|
58
|
+
.tb-view:has(.tb-desktop) { min-height: 100dvh; box-sizing: border-box; }
|
|
59
|
+
.tb-view:has(.tb-desktop) .tb-screens, .tb-screen:has(> .tb-desktop) { flex: 1 1 auto; }
|
|
60
|
+
.tb-view:has(.tb-fit) .tb-screens, .tb-screen:has(> .tb-fit) { flex: 1 1 auto; min-height: 0; }
|
|
61
|
+
.tb-view:has(.tb-fit) { height: 100dvh; box-sizing: border-box; }
|
|
62
|
+
.tb-fit { flex: 1 1 auto; min-height: 0; }
|
|
63
|
+
.tb-fit > * { min-height: 0; overflow: auto; }
|
|
64
|
+
.tb-fit > * > * { flex-shrink: 0; }
|
|
65
|
+
.tb-desktop {
|
|
66
|
+
flex: 1 1 auto;
|
|
67
|
+
min-height: 240px;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-wrap: wrap;
|
|
70
|
+
align-content: flex-start;
|
|
71
|
+
gap: var(--tb-space-3);
|
|
72
|
+
padding: var(--tb-space-5);
|
|
73
|
+
border-radius: var(--tb-radius);
|
|
74
|
+
background-color: color-mix(in oklch, var(--tb-primary) 9%, var(--tb-bg));
|
|
75
|
+
background-size: cover;
|
|
76
|
+
background-position: center;
|
|
77
|
+
}
|
|
78
|
+
/* an image behind what holds it, under a veil that keeps text on it AA; muted text needs the text's color there */
|
|
79
|
+
:has(> .tb-backdrop) { position: relative; isolation: isolate; --tb-muted: var(--tb-text); }
|
|
80
|
+
.tb-backdrop { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background-size: cover; background-position: center; pointer-events: none; }
|
|
81
|
+
.tb-backdrop::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--tb-scrim); }
|
|
82
|
+
/* the backdrop of the view or of a screen is the window's */
|
|
83
|
+
:is(.tb-view, .tb-screen) > .tb-backdrop { position: fixed; border-radius: 0; }
|
|
84
|
+
.tb-tile {
|
|
85
|
+
font: inherit;
|
|
86
|
+
font-size: 13px;
|
|
87
|
+
width: 112px;
|
|
88
|
+
min-height: 96px;
|
|
89
|
+
padding: var(--tb-space-3) var(--tb-space-2);
|
|
90
|
+
border: 1px solid transparent;
|
|
91
|
+
border-radius: var(--tb-radius);
|
|
92
|
+
background: transparent;
|
|
93
|
+
color: var(--tb-text);
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: var(--tb-space-2);
|
|
99
|
+
text-align: center;
|
|
100
|
+
overflow-wrap: anywhere;
|
|
101
|
+
transition: background var(--tb-fast) var(--tb-ease), border-color var(--tb-fast) var(--tb-ease);
|
|
102
|
+
}
|
|
103
|
+
.tb-tile:hover { background: var(--tb-surface); border-color: var(--tb-border); }
|
|
104
|
+
.tb-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
|
|
105
|
+
.tb-tile > svg { flex: none; width: 36px; height: 36px; color: var(--tb-primary); }
|
|
106
|
+
.tb-tile { position: relative; }
|
|
107
|
+
/* a tile's second icon (mark #list): small, at the bottom right of its icon, on a disc of the background */
|
|
108
|
+
.tb-tile-mark {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: calc(var(--tb-space-3) + 19px);
|
|
111
|
+
left: calc(50% + 5px);
|
|
112
|
+
width: 20px;
|
|
113
|
+
height: 20px;
|
|
114
|
+
border-radius: 50%;
|
|
115
|
+
background: var(--tb-bg);
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
}
|
|
121
|
+
.tb-tile-mark > svg { width: 14px; height: 14px; color: var(--tb-text); }
|
|
122
|
+
.tb-tile:hover > .tb-tile-mark { background: var(--tb-surface); }
|
|
123
|
+
.tb-tile-linked::after {
|
|
124
|
+
content: '';
|
|
125
|
+
position: absolute;
|
|
126
|
+
top: calc(var(--tb-space-3) + 21px);
|
|
127
|
+
left: calc(50% - 22px);
|
|
128
|
+
width: 16px;
|
|
129
|
+
height: 16px;
|
|
130
|
+
border-radius: 3px;
|
|
131
|
+
background: var(--tb-text);
|
|
132
|
+
outline: 2px solid var(--tb-bg);
|
|
133
|
+
-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");
|
|
134
|
+
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");
|
|
135
|
+
}
|
|
136
|
+
.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))); }
|
|
137
|
+
.tb-panel {
|
|
138
|
+
background: var(--tb-raised);
|
|
139
|
+
border: var(--tb-line) solid var(--tb-border);
|
|
140
|
+
border-radius: var(--tb-radius-lg);
|
|
141
|
+
box-shadow: var(--tb-shadow-1);
|
|
142
|
+
padding: var(--tb-space-6);
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
gap: var(--tb-space-5);
|
|
146
|
+
}
|
|
147
|
+
.tb-panel.tb-small { width: 100%; max-width: 420px; font-size: inherit; }
|
|
148
|
+
.tb-panel.tb-primary { border-color: var(--tb-primary); box-shadow: inset 0 0 0 1px var(--tb-primary), var(--tb-shadow-1); }
|
|
149
|
+
.tb-panel.tb-accent { border-color: var(--tb-accent); }
|
|
150
|
+
.tb-panel.tb-danger { border-color: var(--tb-danger); }
|
|
151
|
+
.tb-panel.tb-success { border-color: var(--tb-success); }
|
|
152
|
+
.tb-panel.tb-warning { border-color: var(--tb-warning); }
|
|
153
|
+
.tb-panel:focus-visible, .tb-column:focus-visible, .tb-row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
|
|
154
|
+
.tb-panel.tb-primary:focus-visible { box-shadow: inset 0 0 0 1px var(--tb-primary), 0 0 0 3px var(--tb-focus-ring); }
|
|
155
|
+
.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; }
|
|
156
|
+
.tb-divider { border: 0; border-top: var(--tb-line) solid var(--tb-border); margin: var(--tb-space-2) 0; width: 100%; }
|
|
157
|
+
|
|
158
|
+
.tb-title { margin: 0; font-family: var(--tb-headings); font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; }
|
|
159
|
+
.tb-heading { margin: 0; font-family: var(--tb-headings); font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
|
|
160
|
+
.tb-text { margin: 0; }
|
|
161
|
+
.tb-small { font-size: 13px; }
|
|
162
|
+
.tb-muted { color: var(--tb-muted); }
|
|
163
|
+
.tb-text.tb-danger { color: var(--tb-danger); }
|
|
164
|
+
.tb-text.tb-success { color: var(--tb-success); }
|
|
165
|
+
.tb-text.tb-primary { color: var(--tb-primary); }
|
|
166
|
+
|
|
167
|
+
`;
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
|
|
4
|
+
export const MEDIA = String.raw`
|
|
5
|
+
.tb-scroll {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: var(--tb-space-4);
|
|
9
|
+
min-width: 0;
|
|
10
|
+
max-height: 400px;
|
|
11
|
+
overflow: auto;
|
|
12
|
+
overscroll-behavior: contain;
|
|
13
|
+
padding: var(--tb-space-3);
|
|
14
|
+
border: var(--tb-line) solid var(--tb-border);
|
|
15
|
+
border-radius: var(--tb-radius);
|
|
16
|
+
}
|
|
17
|
+
.tb-scroll.tb-small { max-height: 240px; font-size: inherit; }
|
|
18
|
+
.tb-scroll.tb-large { max-height: 640px; }
|
|
19
|
+
.tb-scroll:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
|
|
20
|
+
|
|
21
|
+
.tb-image { display: block; max-width: 100%; height: auto; border-radius: var(--tb-radius); object-fit: cover; }
|
|
22
|
+
.tb-image.tb-round { aspect-ratio: 1; border-radius: 50%; }
|
|
23
|
+
.tb-video { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: auto 16 / 9; border-radius: var(--tb-radius); }
|
|
24
|
+
.tb-audio { display: block; width: 100%; max-width: 480px; }
|
|
25
|
+
:is(.tb-video, .tb-audio).tb-small { width: 320px; }
|
|
26
|
+
:is(.tb-video, .tb-audio).tb-medium { width: 480px; }
|
|
27
|
+
.tb-video.tb-large { width: 720px; }
|
|
28
|
+
:is(.tb-video, .tb-audio).tb-fill { max-width: none; }
|
|
29
|
+
:is(.tb-video, .tb-audio):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
|
|
30
|
+
.tb-canvas { display: block; max-width: 100%; }
|
|
31
|
+
.tb-canvas > svg { display: block; max-width: 100%; height: auto; overflow: visible; }
|
|
32
|
+
.tb-canvas.tb-fill > svg { width: 100%; }
|
|
33
|
+
.tb-chart { display: flex; flex-direction: column; gap: var(--tb-space-2); align-self: stretch; width: 100%; margin: 0; min-width: 0; }
|
|
34
|
+
.tb-chart-caption { font-weight: 600; }
|
|
35
|
+
.tb-chart-plot { width: 100%; min-width: 0; }
|
|
36
|
+
.tb-chart-plot > svg { display: block; width: 100%; height: auto; overflow: visible; }
|
|
37
|
+
.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; }
|
|
38
|
+
.tb-chart-key { display: inline-flex; align-items: center; gap: var(--tb-space-2); }
|
|
39
|
+
.tb-chart-swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--tb-swatch); }
|
|
40
|
+
.tb-chart-empty { margin: 0; color: var(--tb-muted); }
|
|
41
|
+
.tb-chart-caption[hidden], .tb-chart-plot[hidden], .tb-chart-legend[hidden], .tb-chart-empty[hidden] { display: none; }
|
|
42
|
+
.tb-orbit { position: relative; align-self: stretch; width: 100%; min-width: 0; height: 480px; border-radius: var(--tb-radius);
|
|
43
|
+
background: radial-gradient(ellipse at 50% 45%, color-mix(in oklch, var(--tb-primary) 7%, transparent) 0%, transparent 70%); }
|
|
44
|
+
.tb-orbit.tb-small { height: 320px; }
|
|
45
|
+
.tb-orbit.tb-large { height: 640px; }
|
|
46
|
+
.tb-orbit.tb-fit { height: auto; min-height: 320px; }
|
|
47
|
+
.tb-orbit > svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; user-select: none; touch-action: none; outline: none; }
|
|
48
|
+
.tb-orbit > svg.tb-orbit-panning { cursor: grabbing; }
|
|
49
|
+
.tb-orbit > svg:focus-visible { box-shadow: inset 0 0 0 3px var(--tb-focus-ring); border-radius: var(--tb-radius); }
|
|
50
|
+
.tb-orbit-node { cursor: pointer; outline: none; }
|
|
51
|
+
.tb-orbit-focus { cursor: default; }
|
|
52
|
+
.tb-orbit-body { vector-effect: non-scaling-stroke; transition: stroke-width .2s; }
|
|
53
|
+
.tb-orbit-node:hover .tb-orbit-body, .tb-orbit-node:focus-visible .tb-orbit-body { stroke-width: 3; }
|
|
54
|
+
.tb-orbit-node:focus-visible .tb-orbit-body { stroke: var(--tb-focus); }
|
|
55
|
+
.tb-orbit-halo { opacity: .55; transition: opacity .25s; pointer-events: none; }
|
|
56
|
+
.tb-orbit-node:hover .tb-orbit-halo, .tb-orbit-node:focus-visible .tb-orbit-halo { opacity: 1; }
|
|
57
|
+
.tb-orbit-node text { pointer-events: none; fill: var(--tb-text); text-anchor: middle; dominant-baseline: middle; font-family: var(--tb-font); }
|
|
58
|
+
.tb-orbit-node .tb-orbit-count { fill: var(--tb-muted); }
|
|
59
|
+
.tb-orbit-line, .tb-orbit-step { fill: none; vector-effect: non-scaling-stroke; pointer-events: none; }
|
|
60
|
+
.tb-orbit-line { stroke-width: 1; }
|
|
61
|
+
.tb-orbit-step { stroke-linecap: round; }
|
|
62
|
+
.tb-orbit-spin { animation: tb-orbit-spin 60s linear infinite; }
|
|
63
|
+
.tb-orbit-spin.tb-orbit-rev { animation-direction: reverse; animation-duration: 90s; }
|
|
64
|
+
.tb-orbit-spin.tb-orbit-fast { animation-duration: 24s; }
|
|
65
|
+
@keyframes tb-orbit-spin { to { transform: rotate(360deg); } }
|
|
66
|
+
.tb-orbit-now { animation: tb-orbit-pulse 1.8s ease-in-out infinite; }
|
|
67
|
+
@keyframes tb-orbit-pulse { 50% { opacity: .35; } }
|
|
68
|
+
.tb-orbit-edge { fill: none; pointer-events: none; }
|
|
69
|
+
.tb-orbit-edge-solid, .tb-orbit-edge-dashed { stroke: var(--tb-accent); stroke-width: 1.4; stroke-opacity: .7; }
|
|
70
|
+
.tb-orbit-edge-dashed { stroke-dasharray: 5 5; }
|
|
71
|
+
.tb-orbit-edge-faint { stroke: var(--tb-muted); stroke-width: 1; stroke-opacity: .35; }
|
|
72
|
+
.tb-orbit-edge-trail { stroke: var(--tb-muted); stroke-width: 1; stroke-opacity: .5; stroke-dasharray: 2 6; }
|
|
73
|
+
.tb-orbit-label { font-size: 11px; font-family: var(--tb-font); fill: var(--tb-muted); text-anchor: middle; pointer-events: none;
|
|
74
|
+
paint-order: stroke; stroke: var(--tb-bg); stroke-width: 3px; letter-spacing: .02em; }
|
|
75
|
+
.tb-orbit-label.tb-orbit-later { visibility: hidden; }
|
|
76
|
+
.tb-orbit-label.tb-orbit-later.tb-orbit-shown { visibility: visible; }
|
|
77
|
+
.tb-image.tb-small { width: 96px; }
|
|
78
|
+
.tb-image.tb-medium { width: 240px; }
|
|
79
|
+
.tb-image.tb-large { width: 480px; }
|
|
80
|
+
.tb-image.tb-fill { width: 100%; }
|
|
81
|
+
|
|
82
|
+
.tb-progress-wrap { display: flex; flex-direction: column; gap: var(--tb-space-2); min-width: 0; }
|
|
83
|
+
.tb-progress-label { font-size: 14px; font-weight: 550; }
|
|
84
|
+
.tb-progress-label[hidden] { display: none; }
|
|
85
|
+
.tb-progress { height: 8px; border-radius: 4px; background: var(--tb-border); overflow: hidden; }
|
|
86
|
+
.tb-upload-progress { height: 6px; }
|
|
87
|
+
.tb-widget { display: block; width: 100%; min-width: 0; }
|
|
88
|
+
.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); }
|
|
89
|
+
.tb-photo.tb-drop-over { border-color: var(--tb-primary); background: var(--tb-primary-soft); }
|
|
90
|
+
.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); }
|
|
91
|
+
.tb-photo-frame.tb-photo-pick { cursor: pointer; }
|
|
92
|
+
.tb-photo-frame.tb-round { border-radius: 50%; }
|
|
93
|
+
.tb-photo-frame > img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
94
|
+
.tb-photo-frame > .tb-icon { width: 32px; height: 32px; }
|
|
95
|
+
.tb-invalid .tb-photo-frame { border-color: var(--tb-danger); }
|
|
96
|
+
.tb-photo-actions { display: flex; flex-wrap: wrap; gap: var(--tb-space-2); }
|
|
97
|
+
.tb-photo-actions[hidden], .tb-photo-remove[hidden] { display: none; }
|
|
98
|
+
.tb-upload-progress[hidden] { display: none; }
|
|
99
|
+
.tb-progress-bar { height: 100%; width: 0; border-radius: inherit; background: var(--tb-primary); transition: width 300ms var(--tb-ease); }
|
|
100
|
+
.tb-success .tb-progress-bar { background: var(--tb-success); }
|
|
101
|
+
.tb-warning .tb-progress-bar { background: var(--tb-warning); }
|
|
102
|
+
.tb-danger .tb-progress-bar { background: var(--tb-danger); }
|
|
103
|
+
.tb-accent .tb-progress-bar { background: var(--tb-accent); }
|
|
104
|
+
.tb-indeterminate .tb-progress-bar { width: 35%; animation: tb-indeterminate 1.4s var(--tb-ease) infinite; }
|
|
105
|
+
@keyframes tb-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
|
|
106
|
+
|
|
107
|
+
`;
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
|
|
4
|
+
export const NAVIGATION = String.raw`
|
|
5
|
+
.tb-toolbar {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: var(--tb-space-1);
|
|
10
|
+
padding: var(--tb-space-1);
|
|
11
|
+
background: var(--tb-surface);
|
|
12
|
+
border: var(--tb-line) solid var(--tb-border);
|
|
13
|
+
border-radius: var(--tb-radius-lg);
|
|
14
|
+
}
|
|
15
|
+
.tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger) { border-color: transparent; background: transparent; }
|
|
16
|
+
.tb-toolbar > .tb-button:not(.tb-primary, .tb-accent, .tb-danger):hover { background: var(--tb-bg); }
|
|
17
|
+
.tb-toolbar > .tb-button { padding: 0 var(--tb-space-3); }
|
|
18
|
+
.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); }
|
|
19
|
+
|
|
20
|
+
.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; }
|
|
21
|
+
.tb-breadcrumb li { display: inline-flex; align-items: center; gap: var(--tb-space-1); min-width: 0; }
|
|
22
|
+
.tb-breadcrumb li + li::before { content: "›" / ""; color: var(--tb-muted); padding: 0 var(--tb-space-1); }
|
|
23
|
+
.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; }
|
|
24
|
+
button.tb-crumb { cursor: pointer; }
|
|
25
|
+
button.tb-crumb:hover { color: var(--tb-text); text-decoration: underline; text-underline-offset: 3px; }
|
|
26
|
+
button.tb-crumb:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
|
|
27
|
+
.tb-crumb[aria-current] { color: var(--tb-text); font-weight: 600; }
|
|
28
|
+
.tb-crumb-more { display: none !important; }
|
|
29
|
+
|
|
30
|
+
.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; }
|
|
31
|
+
|
|
32
|
+
.tb-hidden { display: none !important; }
|
|
33
|
+
/* read by screen readers, not shown */
|
|
34
|
+
.tb-sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
35
|
+
@media (min-width: 641px) { .tb-narrow-only { display: none !important; } }
|
|
36
|
+
|
|
37
|
+
`;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// Component rules of the theme: tabs, steps and splits.
|
|
2
|
+
// Only token variables appear here, never raw values of color.
|
|
3
|
+
|
|
4
|
+
export const PANES = String.raw`
|
|
5
|
+
/* tabs */
|
|
6
|
+
.tb-tabs { display: flex; flex-direction: column; gap: var(--tb-space-5); min-width: 0; }
|
|
7
|
+
.tb-tablist { display: flex; gap: var(--tb-space-1); box-shadow: inset 0 -1px 0 var(--tb-border); overflow-x: auto; scrollbar-width: none; }
|
|
8
|
+
.tb-tab {
|
|
9
|
+
font: inherit;
|
|
10
|
+
font-size: 14px;
|
|
11
|
+
font-weight: 550;
|
|
12
|
+
min-height: var(--tb-control);
|
|
13
|
+
padding: 0 var(--tb-space-4);
|
|
14
|
+
border: 0;
|
|
15
|
+
border-bottom: 2px solid transparent;
|
|
16
|
+
background: transparent;
|
|
17
|
+
color: var(--tb-muted);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
transition: color var(--tb-fast) var(--tb-ease), border-color var(--tb-fast) var(--tb-ease);
|
|
21
|
+
}
|
|
22
|
+
.tb-tab:hover { color: var(--tb-text); }
|
|
23
|
+
.tb-tab[aria-selected="true"] { color: var(--tb-primary); border-bottom-color: var(--tb-primary); }
|
|
24
|
+
.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; }
|
|
25
|
+
.tb-tab-panel { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
|
|
26
|
+
.tb-tab-panel[hidden] { display: none; }
|
|
27
|
+
|
|
28
|
+
/* steps: one step at a time under a bar of numbered titles; the steps done can be chosen again */
|
|
29
|
+
.tb-steps { display: flex; flex-direction: column; gap: var(--tb-space-5); min-width: 0; }
|
|
30
|
+
.tb-steps-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-space-2) var(--tb-space-3); margin: 0; padding: 0; list-style: none; }
|
|
31
|
+
.tb-steps-bar > li:not([hidden]) { display: flex; align-items: center; gap: var(--tb-space-3); }
|
|
32
|
+
.tb-steps-bar > li:not([hidden]) ~ li:not([hidden])::before { content: ""; width: var(--tb-space-6); height: 1px; background: var(--tb-border-strong); }
|
|
33
|
+
.tb-steps-bar > li[hidden] { display: none; }
|
|
34
|
+
.tb-steps-item {
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: var(--tb-space-2);
|
|
38
|
+
min-height: var(--tb-control);
|
|
39
|
+
padding: 0 var(--tb-space-1);
|
|
40
|
+
border: 0;
|
|
41
|
+
border-radius: var(--tb-radius);
|
|
42
|
+
background: transparent;
|
|
43
|
+
color: var(--tb-muted);
|
|
44
|
+
font: inherit;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
font-weight: 550;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
50
|
+
.tb-steps-item:disabled { cursor: default; }
|
|
51
|
+
.tb-steps-item:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
|
|
52
|
+
.tb-steps-num {
|
|
53
|
+
display: inline-grid;
|
|
54
|
+
place-items: center;
|
|
55
|
+
width: 24px;
|
|
56
|
+
height: 24px;
|
|
57
|
+
border: 1px solid var(--tb-border-strong);
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
font-variant-numeric: tabular-nums;
|
|
61
|
+
transition: background var(--tb-fast) var(--tb-ease), border-color var(--tb-fast) var(--tb-ease), color var(--tb-fast) var(--tb-ease);
|
|
62
|
+
}
|
|
63
|
+
.tb-steps-bar .tb-done .tb-steps-item { color: var(--tb-text); }
|
|
64
|
+
.tb-steps-bar .tb-done .tb-steps-item:hover .tb-steps-title { text-decoration: underline; text-underline-offset: 3px; }
|
|
65
|
+
.tb-steps-bar .tb-done .tb-steps-num { background: var(--tb-primary); border-color: var(--tb-primary); color: var(--tb-on-primary); }
|
|
66
|
+
.tb-steps-bar .tb-current .tb-steps-item { color: var(--tb-text); }
|
|
67
|
+
.tb-steps-bar .tb-current .tb-steps-num { border: 2px solid var(--tb-primary); color: var(--tb-primary); font-weight: 650; }
|
|
68
|
+
.tb-steps-count { display: none; margin: 0; font-size: 14px; color: var(--tb-muted); }
|
|
69
|
+
.tb-step-panel { display: flex; flex-direction: column; row-gap: var(--tb-space-4); min-width: 0; }
|
|
70
|
+
.tb-step-panel:focus { outline: none; }
|
|
71
|
+
.tb-steps > .tb-step-panel[hidden], .tb-form > .tb-steps > .tb-step-panel[hidden] { display: none; }
|
|
72
|
+
.tb-steps-nav { justify-content: flex-end; }
|
|
73
|
+
.tb-steps-nav > :first-child:not(.tb-hidden) { margin-inline-end: auto; }
|
|
74
|
+
/* narrow: the numbers alone, and a line that says which step this is */
|
|
75
|
+
@container (max-width: 420px) {
|
|
76
|
+
.tb-steps-title { display: none; }
|
|
77
|
+
.tb-steps-count { display: block; }
|
|
78
|
+
.tb-form > .tb-steps > .tb-steps-nav { grid-column: 1 / -1; }
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* split: two panes and a handle; one pane at a time when narrow */
|
|
82
|
+
.tb-split { display: grid; grid-template-columns: minmax(0, var(--tb-split, 40%)) auto minmax(0, 1fr); align-items: start; }
|
|
83
|
+
.tb-split-pane { display: flex; flex-direction: column; gap: var(--tb-space-4); min-width: 0; }
|
|
84
|
+
.tb-split-pane:focus { outline: none; }
|
|
85
|
+
.tb-split-handle {
|
|
86
|
+
align-self: stretch;
|
|
87
|
+
width: var(--tb-space-5);
|
|
88
|
+
cursor: col-resize;
|
|
89
|
+
touch-action: none;
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
border-radius: var(--tb-radius);
|
|
93
|
+
}
|
|
94
|
+
.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); }
|
|
95
|
+
.tb-split-handle:hover::before { width: 3px; background: var(--tb-border-strong); }
|
|
96
|
+
.tb-split-handle:focus-visible { outline: none; }
|
|
97
|
+
.tb-split-handle:focus-visible::before { width: 3px; background: var(--tb-focus); }
|
|
98
|
+
.tb-split-back { display: none; }
|
|
99
|
+
|
|
100
|
+
`;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// Component rules of the theme: what opens over the page, placed by the host: calendars, lookups, menus, swipe actions, drag and drop.
|
|
2
|
+
// Only token variables appear here, never raw values of color.
|
|
3
|
+
|
|
4
|
+
export const POPUPS = String.raw`
|
|
5
|
+
/* the calendar of a date field: in the top layer, placed by the host */
|
|
6
|
+
.tb-calendar {
|
|
7
|
+
position: fixed;
|
|
8
|
+
inset: auto;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: var(--tb-space-3);
|
|
11
|
+
background: var(--tb-raised);
|
|
12
|
+
color: var(--tb-text);
|
|
13
|
+
border: var(--tb-line) solid var(--tb-border);
|
|
14
|
+
border-radius: var(--tb-radius-lg);
|
|
15
|
+
box-shadow: var(--tb-shadow-3);
|
|
16
|
+
animation: tb-pop 120ms var(--tb-ease);
|
|
17
|
+
}
|
|
18
|
+
.tb-calendar-head { display: flex; align-items: center; gap: var(--tb-space-2); margin-bottom: var(--tb-space-2); }
|
|
19
|
+
.tb-calendar-month { flex: 1; margin: 0; font-size: 1em; font-weight: 600; text-align: center; }
|
|
20
|
+
.tb-calendar-month::first-letter { text-transform: uppercase; }
|
|
21
|
+
.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; }
|
|
22
|
+
.tb-calendar-step:hover { background: var(--tb-bg); color: var(--tb-text); }
|
|
23
|
+
.tb-calendar-step:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tb-focus-ring); }
|
|
24
|
+
.tb-calendar-step .tb-icon { width: 18px; height: 18px; }
|
|
25
|
+
.tb-calendar-grid { border-collapse: collapse; }
|
|
26
|
+
.tb-calendar-grid th { width: 36px; height: 28px; font-size: 0.8em; font-weight: 500; color: var(--tb-muted); text-transform: uppercase; }
|
|
27
|
+
.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); }
|
|
28
|
+
.tb-calendar-day:hover { background: var(--tb-bg); }
|
|
29
|
+
.tb-calendar-day:focus { outline: none; box-shadow: inset 0 0 0 2px var(--tb-focus); }
|
|
30
|
+
.tb-calendar-other { color: var(--tb-muted); }
|
|
31
|
+
.tb-calendar-day[aria-current="date"] { font-weight: 700; color: var(--tb-primary); }
|
|
32
|
+
.tb-calendar-day[aria-selected="true"] { background: var(--tb-primary); color: var(--tb-on-primary); }
|
|
33
|
+
.tb-calendar-in { background: var(--tb-primary-soft); border-radius: 0; }
|
|
34
|
+
.tb-calendar-hint { margin: var(--tb-space-2) 0 0; font-size: 0.85em; color: var(--tb-muted); text-align: center; }
|
|
35
|
+
.tb-calendar-day[aria-disabled="true"] { color: var(--tb-border-strong); background: transparent; cursor: default; text-decoration: line-through; }
|
|
36
|
+
|
|
37
|
+
/* menus: in the top layer, placed by the host */
|
|
38
|
+
.tb-lookup { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tb-space-1); }
|
|
39
|
+
.tb-lookup .tb-input { flex: 1; min-width: 8em; width: auto; }
|
|
40
|
+
.tb-lookup-chosen { list-style: none; margin: 0; padding: 0; display: contents; }
|
|
41
|
+
.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); }
|
|
42
|
+
.tb-lookup-chip:not(:has(button)) { padding-right: var(--tb-space-3); }
|
|
43
|
+
.tb-lookup-list {
|
|
44
|
+
position: fixed;
|
|
45
|
+
inset: auto;
|
|
46
|
+
margin: 0;
|
|
47
|
+
padding: var(--tb-space-1);
|
|
48
|
+
list-style: none;
|
|
49
|
+
max-height: 280px;
|
|
50
|
+
overflow-y: auto;
|
|
51
|
+
color: var(--tb-text);
|
|
52
|
+
background: var(--tb-raised);
|
|
53
|
+
border: var(--tb-line) solid var(--tb-border);
|
|
54
|
+
border-radius: var(--tb-radius-lg);
|
|
55
|
+
box-shadow: var(--tb-shadow-3);
|
|
56
|
+
}
|
|
57
|
+
.tb-times .tb-lookup-option { font-variant-numeric: tabular-nums; }
|
|
58
|
+
.tb-times .tb-lookup-option:focus { outline: none; box-shadow: inset 0 0 0 2px var(--tb-focus); }
|
|
59
|
+
.tb-lookup-option { padding: var(--tb-space-2) var(--tb-space-3); border-radius: var(--tb-radius); cursor: pointer; }
|
|
60
|
+
.tb-lookup-option:hover, .tb-lookup-option[aria-selected="true"] { background: var(--tb-primary-soft); }
|
|
61
|
+
.tb-lookup-none { padding: var(--tb-space-2) var(--tb-space-3); color: var(--tb-muted); }
|
|
62
|
+
|
|
63
|
+
.tb-menu {
|
|
64
|
+
position: fixed;
|
|
65
|
+
inset: auto;
|
|
66
|
+
margin: 0;
|
|
67
|
+
min-width: 180px;
|
|
68
|
+
max-width: min(320px, calc(100vw - 16px));
|
|
69
|
+
max-height: calc(100vh - 16px);
|
|
70
|
+
overflow-y: auto;
|
|
71
|
+
padding: var(--tb-space-1);
|
|
72
|
+
background: var(--tb-raised);
|
|
73
|
+
color: var(--tb-text);
|
|
74
|
+
border: var(--tb-line) solid var(--tb-border);
|
|
75
|
+
border-radius: var(--tb-radius);
|
|
76
|
+
box-shadow: var(--tb-shadow-3);
|
|
77
|
+
animation: tb-pop 120ms var(--tb-ease);
|
|
78
|
+
}
|
|
79
|
+
.tb-menu-item {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: var(--tb-space-3);
|
|
83
|
+
width: 100%;
|
|
84
|
+
min-height: 36px;
|
|
85
|
+
padding: 0 var(--tb-space-3);
|
|
86
|
+
border: 0;
|
|
87
|
+
border-radius: calc(var(--tb-radius) - 2px);
|
|
88
|
+
background: transparent;
|
|
89
|
+
color: inherit;
|
|
90
|
+
font: inherit;
|
|
91
|
+
font-size: 14px;
|
|
92
|
+
text-align: left;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
}
|
|
95
|
+
.tb-menu-item > span:not(.tb-menu-gap) { flex: 1; }
|
|
96
|
+
.tb-menu-item svg { width: 16px; height: 16px; flex: none; color: var(--tb-muted); }
|
|
97
|
+
.tb-menu-gap { width: 16px; flex: none; }
|
|
98
|
+
.tb-menu-item:focus { outline: none; background: var(--tb-primary-soft); }
|
|
99
|
+
.tb-menu-item[aria-expanded="true"] { background: var(--tb-bg); }
|
|
100
|
+
.tb-menu-item.tb-danger, .tb-menu-item.tb-danger svg { color: var(--tb-danger); }
|
|
101
|
+
.tb-menu-item.tb-danger:focus { background: var(--tb-danger-soft); }
|
|
102
|
+
.tb-swipe-actions { position: fixed; z-index: 20; display: flex; justify-content: flex-end; overflow: hidden; }
|
|
103
|
+
.tb-swipe-action {
|
|
104
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
|
|
105
|
+
flex: none; width: 76px; padding: 0 var(--tb-space-1); border: 0;
|
|
106
|
+
background: var(--tb-primary); color: var(--tb-on-primary); font: inherit; font-size: 12px; font-weight: 550;
|
|
107
|
+
}
|
|
108
|
+
.tb-swipe-action > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
109
|
+
.tb-swipe-action svg { width: 20px; height: 20px; }
|
|
110
|
+
.tb-swipe-action.tb-danger { background: var(--tb-danger); color: var(--tb-on-danger); }
|
|
111
|
+
.tb-swipe-action.tb-swipe-more { background: var(--tb-bg); color: var(--tb-text); }
|
|
112
|
+
.tb-swipe-settle { transition: transform 200ms var(--tb-ease), left 200ms var(--tb-ease), width 200ms var(--tb-ease); }
|
|
113
|
+
.tb-menu-divider { height: 1px; margin: var(--tb-space-1) calc(-1 * var(--tb-space-1)); background: var(--tb-border); }
|
|
114
|
+
@keyframes tb-pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
|
|
115
|
+
|
|
116
|
+
/* drag and drop */
|
|
117
|
+
.tb-drag-active, .tb-drag-active * { user-select: none; cursor: grabbing !important; }
|
|
118
|
+
.tb-dragging { opacity: 0.4; }
|
|
119
|
+
.tb-drop-zone { min-height: var(--tb-control); }
|
|
120
|
+
.tb-drop-over { outline: 2px dashed var(--tb-focus-ring); outline-offset: 4px; border-radius: var(--tb-radius); }
|
|
121
|
+
.tb-drop-line {
|
|
122
|
+
position: fixed;
|
|
123
|
+
height: 2px;
|
|
124
|
+
border-radius: 1px;
|
|
125
|
+
background: var(--tb-primary);
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
z-index: 2147483647;
|
|
128
|
+
}
|
|
129
|
+
.tb-drop-line.tb-across { width: 2px; }
|
|
130
|
+
.tb-drag-ghost {
|
|
131
|
+
position: fixed;
|
|
132
|
+
left: 0;
|
|
133
|
+
top: 0;
|
|
134
|
+
max-width: 240px;
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
text-overflow: ellipsis;
|
|
137
|
+
white-space: nowrap;
|
|
138
|
+
padding: var(--tb-space-2) var(--tb-space-3);
|
|
139
|
+
background: var(--tb-raised);
|
|
140
|
+
color: var(--tb-text);
|
|
141
|
+
border: var(--tb-line) solid var(--tb-border);
|
|
142
|
+
border-radius: var(--tb-radius);
|
|
143
|
+
box-shadow: var(--tb-shadow-3);
|
|
144
|
+
font-size: 14px;
|
|
145
|
+
font-weight: 500;
|
|
146
|
+
pointer-events: none;
|
|
147
|
+
z-index: 2147483647;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
`;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// Component rules of the theme: narrow screens, paper, motion between screens, touch and less motion.
|
|
2
|
+
// Only token variables appear here, never raw values of color.
|
|
3
|
+
|
|
4
|
+
export const RESPONSIVE = String.raw`
|
|
5
|
+
@media (max-width: 640px) {
|
|
6
|
+
.tb-dev-faces { grid-template-columns: 1fr; grid-template-rows: 2fr 3fr; }
|
|
7
|
+
.tb-dev-tree { border-right: 0; border-bottom: 1px solid var(--tb-border); }
|
|
8
|
+
ol.tb-dev-entries li { grid-template-columns: max-content 1fr; }
|
|
9
|
+
ol.tb-dev-entries time { display: none; }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@media (max-width: 640px) {
|
|
13
|
+
.tb-wide-only { display: none !important; }
|
|
14
|
+
.tb-view:has(.tb-fit) { height: auto; }
|
|
15
|
+
.tb-fit > * { overflow: visible; }
|
|
16
|
+
.tb-split { display: block; }
|
|
17
|
+
.tb-split-handle { display: none; }
|
|
18
|
+
.tb-split[data-pane="1"] > .tb-split-pane:last-child, .tb-split[data-pane="2"] > .tb-split-pane:first-child { display: none; }
|
|
19
|
+
.tb-split-back { display: inline-flex; align-self: flex-start; padding: 0 var(--tb-space-3); border: 0; background: transparent; color: var(--tb-primary); }
|
|
20
|
+
.tb-view { padding: var(--tb-space-5) var(--tb-space-4); }
|
|
21
|
+
.tb-form { grid-template-columns: minmax(0, 1fr); }
|
|
22
|
+
.tb-steps-title { display: none; }
|
|
23
|
+
.tb-steps-count { display: block; }
|
|
24
|
+
.tb-form > .tb-steps > .tb-steps-nav { grid-column: 1 / -1; }
|
|
25
|
+
:is(.tb-form, .tb-form > .tb-panel, .tb-form > .tb-panel > .tb-panel, .tb-form > .tb-steps > .tb-step-panel) > .tb-field { display: flex; }
|
|
26
|
+
: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,
|
|
27
|
+
: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; padding-top: 0; }
|
|
28
|
+
.tb-row:has(> .tb-field) { flex-direction: column; align-items: stretch; }
|
|
29
|
+
.tb-row:has(> .tb-field) > :is(.tb-text, .tb-heading) { margin-bottom: 0; }
|
|
30
|
+
.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); }
|
|
31
|
+
.tb-entry > * { flex: none; }
|
|
32
|
+
.tb-entry:not(:first-child) .tb-field > .tb-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
|
|
33
|
+
.tb-entry > .tb-button, .tb-entry:first-child:has(.tb-label:not(:empty)) > .tb-button { align-self: flex-end; margin-top: 0; }
|
|
34
|
+
.tb-grid { grid-template-columns: minmax(0, 1fr); }
|
|
35
|
+
.tb-actions > .tb-button { flex: 1 1 auto; }
|
|
36
|
+
.tb-table-wrap { overflow: visible; background: none; border: 0; box-shadow: none; }
|
|
37
|
+
.tb-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
38
|
+
.tb-table, .tb-table tbody, .tb-table tfoot, .tb-table tr, .tb-table td { display: block; }
|
|
39
|
+
.tb-swipe :is(tbody tr, .tb-list > li) { touch-action: pan-y; }
|
|
40
|
+
.tb-table tfoot { margin-top: var(--tb-space-3); }
|
|
41
|
+
.tb-table tfoot tr { background: var(--tb-bg); }
|
|
42
|
+
.tb-table tfoot td { background: none; }
|
|
43
|
+
.tb-table tfoot td:empty { display: none; }
|
|
44
|
+
.tb-table tbody { display: flex; flex-direction: column; gap: var(--tb-space-3); }
|
|
45
|
+
.tb-table tr {
|
|
46
|
+
padding: var(--tb-space-3) var(--tb-space-4);
|
|
47
|
+
background: var(--tb-surface);
|
|
48
|
+
border: var(--tb-line) solid var(--tb-border);
|
|
49
|
+
border-radius: var(--tb-radius-lg);
|
|
50
|
+
box-shadow: var(--tb-shadow-1);
|
|
51
|
+
}
|
|
52
|
+
.tb-table td, .tb-table tbody tr:last-child td, .tb-table tfoot td {
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
gap: var(--tb-space-4);
|
|
56
|
+
height: auto;
|
|
57
|
+
padding: var(--tb-space-1) 0;
|
|
58
|
+
border: 0;
|
|
59
|
+
text-align: right;
|
|
60
|
+
}
|
|
61
|
+
.tb-table td::before { content: attr(data-label); color: var(--tb-muted); font-weight: 500; text-align: left; }
|
|
62
|
+
.tb-table td.tb-thumb-cell { width: auto; justify-content: flex-start; }
|
|
63
|
+
.tb-table td.tb-thumb-cell::before { content: none; }
|
|
64
|
+
.tb-table tr.tb-group-head { padding: var(--tb-space-3) 0 0; background: none; border: 0; box-shadow: none; }
|
|
65
|
+
.tb-table .tb-group-head > th, .tb-table .tb-group-head.tb-level-2 > th { display: block; padding: 0; background: none; border: 0; }
|
|
66
|
+
.tb-table .tb-level-2 > :first-child { padding-left: 0; }
|
|
67
|
+
.tb-table tr.tb-group-head.tb-level-2, .tb-table tr.tb-group-foot.tb-level-2 { margin-left: var(--tb-space-4); }
|
|
68
|
+
.tb-table tr.tb-group-foot { background: var(--tb-bg); }
|
|
69
|
+
.tb-table .tb-group-foot > td { background: none; }
|
|
70
|
+
.tb-table .tb-group-foot > td:empty { display: none; }
|
|
71
|
+
.tb-toolbar > .tb-button.tb-has-icon { padding: 0; width: var(--tb-control); }
|
|
72
|
+
.tb-toolbar > .tb-button.tb-has-icon > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
73
|
+
.tb-crumb-middle { display: none !important; }
|
|
74
|
+
.tb-crumb-more { display: inline-flex !important; }
|
|
75
|
+
.tb-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
|
|
76
|
+
.tb-dialog.tb-confirm { width: calc(100vw - 32px); height: fit-content; max-height: calc(100dvh - 32px); margin: auto; border-radius: var(--tb-radius-lg); }
|
|
77
|
+
.tb-dialog.tb-palette { width: 100vw; max-height: 100dvh; margin: 0; }
|
|
78
|
+
}
|
|
79
|
+
@media print {
|
|
80
|
+
.tb-toasts, .tb-dialog:not([open]) { display: none !important; }
|
|
81
|
+
/* print-page/only: the face alone, at the top of the page, with what holds it out of sight */
|
|
82
|
+
.tb-print-only body * { visibility: hidden; }
|
|
83
|
+
.tb-print-only .tb-print-target, .tb-print-only .tb-print-target * { visibility: visible; }
|
|
84
|
+
.tb-print-only .tb-print-target { position: absolute; inset: 0 0 auto 0; margin: 0; box-shadow: none; }
|
|
85
|
+
}
|
|
86
|
+
/* a screen that gives way to another slides the way the user went (motion.ts) */
|
|
87
|
+
::view-transition-group(*) { animation-duration: var(--tb-move); animation-timing-function: var(--tb-ease); }
|
|
88
|
+
::view-transition-old(tb-screen) { animation: var(--tb-move) var(--tb-ease) both tb-screen-out; }
|
|
89
|
+
::view-transition-new(tb-screen) { animation: var(--tb-move) var(--tb-ease) both tb-screen-in; }
|
|
90
|
+
:root[data-tb-travel="back"]::view-transition-old(tb-screen) { animation-name: tb-screen-out-back; }
|
|
91
|
+
:root[data-tb-travel="back"]::view-transition-new(tb-screen) { animation-name: tb-screen-in-back; }
|
|
92
|
+
@keyframes tb-screen-out { to { opacity: 0; transform: translateX(calc(-1 * var(--tb-travel-x))); } }
|
|
93
|
+
@keyframes tb-screen-in { from { opacity: 0; transform: translateX(var(--tb-travel-x)); } }
|
|
94
|
+
@keyframes tb-screen-out-back { to { opacity: 0; transform: translateX(var(--tb-travel-x)); } }
|
|
95
|
+
@keyframes tb-screen-in-back { from { opacity: 0; transform: translateX(calc(-1 * var(--tb-travel-x))); } }
|
|
96
|
+
:root { --tb-travel-x: 32px; }
|
|
97
|
+
:root[dir="rtl"] { --tb-travel-x: -32px; }
|
|
98
|
+
.tb-leaving { pointer-events: none; z-index: 1; }
|
|
99
|
+
@media (pointer: coarse) { :root { --tb-control: 44px; } }
|
|
100
|
+
@media (prefers-reduced-motion: reduce) {
|
|
101
|
+
* { transition: none !important; animation: none !important; }
|
|
102
|
+
.tb-indeterminate .tb-progress-bar { width: 100%; opacity: 0.35; }
|
|
103
|
+
}
|
|
104
|
+
`;
|