@whatsaaaa/design-system 0.0.0 → 0.1.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 (168) hide show
  1. package/README.md +151 -0
  2. package/assets/building-blocks/apple-touch-icon.png +0 -0
  3. package/assets/building-blocks/favicon-16.png +0 -0
  4. package/assets/building-blocks/favicon-32.png +0 -0
  5. package/assets/building-blocks/favicon.ico +0 -0
  6. package/assets/building-blocks/favicon.svg +1 -0
  7. package/assets/building-blocks/icon-192.png +0 -0
  8. package/assets/building-blocks/icon-512.png +0 -0
  9. package/assets/building-blocks/lockup-dark.svg +1 -0
  10. package/assets/building-blocks/lockup-light.svg +1 -0
  11. package/assets/building-blocks/mark-mono.svg +1 -0
  12. package/assets/building-blocks/mark-on-dark.svg +1 -0
  13. package/assets/building-blocks/mark-on-light.svg +1 -0
  14. package/assets/building-blocks/mark.svg +1 -0
  15. package/assets/building-blocks/readme-header.png +0 -0
  16. package/assets/building-blocks/readme-header.svg +1 -0
  17. package/assets/building-blocks/social-card.png +0 -0
  18. package/assets/building-blocks/social-card.svg +1 -0
  19. package/assets/building-blocks/wordmark-dark.svg +1 -0
  20. package/assets/building-blocks/wordmark-light.svg +1 -0
  21. package/assets/dotfiles/apple-touch-icon.png +0 -0
  22. package/assets/dotfiles/favicon-16.png +0 -0
  23. package/assets/dotfiles/favicon-32.png +0 -0
  24. package/assets/dotfiles/favicon.ico +0 -0
  25. package/assets/dotfiles/favicon.svg +1 -0
  26. package/assets/dotfiles/icon-192.png +0 -0
  27. package/assets/dotfiles/icon-512.png +0 -0
  28. package/assets/dotfiles/lockup-dark.svg +1 -0
  29. package/assets/dotfiles/lockup-light.svg +1 -0
  30. package/assets/dotfiles/mark-mono.svg +1 -0
  31. package/assets/dotfiles/mark-on-dark.svg +1 -0
  32. package/assets/dotfiles/mark-on-light.svg +1 -0
  33. package/assets/dotfiles/mark.svg +1 -0
  34. package/assets/dotfiles/readme-header.png +0 -0
  35. package/assets/dotfiles/readme-header.svg +1 -0
  36. package/assets/dotfiles/social-card.png +0 -0
  37. package/assets/dotfiles/social-card.svg +1 -0
  38. package/assets/dotfiles/wordmark-dark.svg +1 -0
  39. package/assets/dotfiles/wordmark-light.svg +1 -0
  40. package/assets/form-builder/apple-touch-icon.png +0 -0
  41. package/assets/form-builder/favicon-16.png +0 -0
  42. package/assets/form-builder/favicon-32.png +0 -0
  43. package/assets/form-builder/favicon.ico +0 -0
  44. package/assets/form-builder/favicon.svg +1 -0
  45. package/assets/form-builder/icon-192.png +0 -0
  46. package/assets/form-builder/icon-512.png +0 -0
  47. package/assets/form-builder/lockup-dark.svg +1 -0
  48. package/assets/form-builder/lockup-light.svg +1 -0
  49. package/assets/form-builder/mark-mono.svg +1 -0
  50. package/assets/form-builder/mark-on-dark.svg +1 -0
  51. package/assets/form-builder/mark-on-light.svg +1 -0
  52. package/assets/form-builder/mark.svg +1 -0
  53. package/assets/form-builder/readme-header.png +0 -0
  54. package/assets/form-builder/readme-header.svg +1 -0
  55. package/assets/form-builder/social-card.png +0 -0
  56. package/assets/form-builder/social-card.svg +1 -0
  57. package/assets/form-builder/wordmark-dark.svg +1 -0
  58. package/assets/form-builder/wordmark-light.svg +1 -0
  59. package/assets/manifest.json +541 -0
  60. package/assets/whatsaaaa/apple-touch-icon.png +0 -0
  61. package/assets/whatsaaaa/favicon-16.png +0 -0
  62. package/assets/whatsaaaa/favicon-32.png +0 -0
  63. package/assets/whatsaaaa/favicon.ico +0 -0
  64. package/assets/whatsaaaa/favicon.svg +1 -0
  65. package/assets/whatsaaaa/icon-192.png +0 -0
  66. package/assets/whatsaaaa/icon-512.png +0 -0
  67. package/assets/whatsaaaa/lockup-dark.svg +1 -0
  68. package/assets/whatsaaaa/lockup-light.svg +1 -0
  69. package/assets/whatsaaaa/mark-mono.svg +1 -0
  70. package/assets/whatsaaaa/mark-on-dark.svg +1 -0
  71. package/assets/whatsaaaa/mark-on-light.svg +1 -0
  72. package/assets/whatsaaaa/mark.svg +1 -0
  73. package/assets/whatsaaaa/pose-blink-dark.svg +1 -0
  74. package/assets/whatsaaaa/pose-blink-light.svg +1 -0
  75. package/assets/whatsaaaa/pose-idle-dark.svg +1 -0
  76. package/assets/whatsaaaa/pose-idle-light.svg +1 -0
  77. package/assets/whatsaaaa/pose-lost-dark.svg +1 -0
  78. package/assets/whatsaaaa/pose-lost-light.svg +1 -0
  79. package/assets/whatsaaaa/pose-shout-dark.svg +1 -0
  80. package/assets/whatsaaaa/pose-shout-light.svg +1 -0
  81. package/assets/whatsaaaa/pose-wag-left-dark.svg +1 -0
  82. package/assets/whatsaaaa/pose-wag-left-light.svg +1 -0
  83. package/assets/whatsaaaa/pose-wag-right-dark.svg +1 -0
  84. package/assets/whatsaaaa/pose-wag-right-light.svg +1 -0
  85. package/assets/whatsaaaa/readme-header.png +0 -0
  86. package/assets/whatsaaaa/readme-header.svg +1 -0
  87. package/assets/whatsaaaa/social-card.png +0 -0
  88. package/assets/whatsaaaa/social-card.svg +1 -0
  89. package/assets/whatsaaaa/wordmark-dark.svg +1 -0
  90. package/assets/whatsaaaa/wordmark-light.svg +1 -0
  91. package/dist/color.d.ts +5 -0
  92. package/dist/color.js +7 -0
  93. package/dist/css/base.css +50 -0
  94. package/dist/css/callout.css +64 -0
  95. package/dist/css/code.css +50 -0
  96. package/dist/css/ghost.css +93 -0
  97. package/dist/css/icons.css +8 -0
  98. package/dist/css/prose.css +320 -0
  99. package/dist/css/terminal.css +424 -0
  100. package/dist/fonts/inter-latin-ext-wght-italic.woff2 +0 -0
  101. package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  102. package/dist/fonts/inter-latin-wght-italic.woff2 +0 -0
  103. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  104. package/dist/fonts/inter.OFL.txt +93 -0
  105. package/dist/fonts/jetbrains-mono-latin-ext-wght-italic.woff2 +0 -0
  106. package/dist/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  107. package/dist/fonts/jetbrains-mono-latin-wght-italic.woff2 +0 -0
  108. package/dist/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  109. package/dist/fonts/jetbrains-mono.OFL.txt +93 -0
  110. package/dist/fonts.css +85 -0
  111. package/dist/ghost/bubble.d.ts +16 -0
  112. package/dist/ghost/bubble.js +50 -0
  113. package/dist/ghost/glyphs.d.ts +12 -0
  114. package/dist/ghost/glyphs.js +19 -0
  115. package/dist/ghost/index.d.ts +57 -0
  116. package/dist/ghost/index.js +227 -0
  117. package/dist/identity/ghost.d.ts +28 -0
  118. package/dist/identity/ghost.js +129 -0
  119. package/dist/identity/marks.d.ts +48 -0
  120. package/dist/identity/marks.js +52 -0
  121. package/dist/identity/sprite.d.ts +43 -0
  122. package/dist/identity/sprite.js +100 -0
  123. package/dist/index.css +1404 -0
  124. package/dist/shiki/index.d.ts +20 -0
  125. package/dist/shiki/index.js +64 -0
  126. package/dist/shortcuts/index.d.ts +62 -0
  127. package/dist/shortcuts/index.js +169 -0
  128. package/dist/shortcuts/init.js +2 -0
  129. package/dist/theme/index.d.ts +24 -0
  130. package/dist/theme/index.js +60 -0
  131. package/dist/theme/init.js +2 -0
  132. package/dist/tokens.css +537 -0
  133. package/dist/tokens.d.ts +194 -0
  134. package/dist/tokens.js +336 -0
  135. package/dist/vitepress-config/index.d.ts +16 -0
  136. package/dist/vitepress-config/index.js +36 -0
  137. package/dist/vitepress-config/markdown.d.ts +6 -0
  138. package/dist/vitepress-config/markdown.js +50 -0
  139. package/dist/vitepress-config/types.d.ts +16 -0
  140. package/dist/vitepress-config/types.js +1 -0
  141. package/docs/usage.md +226 -0
  142. package/licenses/README.md +10 -0
  143. package/licenses/departure-mono.OFL.txt +93 -0
  144. package/licenses/rose-pine-palette.LICENSE +21 -0
  145. package/package.json +155 -3
  146. package/src/vitepress/Layout.vue +77 -0
  147. package/src/vitepress/components/Crumb.vue +32 -0
  148. package/src/vitepress/components/NavGhost.vue +23 -0
  149. package/src/vitepress/components/NotFound.vue +22 -0
  150. package/src/vitepress/components/StatusLine.vue +128 -0
  151. package/src/vitepress/env.d.ts +2 -0
  152. package/src/vitepress/index.ts +34 -0
  153. package/src/vitepress/path.ts +19 -0
  154. package/src/vitepress/styles/doc.css +385 -0
  155. package/src/vitepress/styles/home.css +47 -0
  156. package/src/vitepress/styles/layout.css +97 -0
  157. package/src/vitepress/styles/nav.css +441 -0
  158. package/src/vitepress/styles/search.css +55 -0
  159. package/src/vitepress/styles/sidebar.css +173 -0
  160. package/src/vitepress/styles/vars.css +204 -0
  161. package/src/vitepress/support.ts +15 -0
  162. package/src/vitepress/theme.d.ts +8 -0
  163. package/tokens/contrast.json +271 -0
  164. package/tokens/core.tokens.json +743 -0
  165. package/tokens/palette.tokens.json +222 -0
  166. package/tokens/theme-dark.tokens.json +146 -0
  167. package/tokens/theme-light.tokens.json +146 -0
  168. package/tokens/whatsaaaa.resolver.json +43 -0
@@ -0,0 +1,97 @@
1
+ /*
2
+ * The page frame. The status line is fixed to the bottom of the window, and everything
3
+ * that reaches the bottom leaves room for it. So does the window when it scrolls to a
4
+ * control that takes the focus: the control comes to rest above the status line, in sight.
5
+ *
6
+ * The default theme scopes its component styles, which makes them more specific than a
7
+ * plain class. The selectors in these files repeat part of the structure to win over them.
8
+ */
9
+ html {
10
+ scroll-padding-top: calc(var(--vp-nav-height) + var(--ws-space-16));
11
+ scroll-padding-bottom: var(--ws-size-status-line);
12
+ }
13
+
14
+ body {
15
+ background: var(--ws-color-bg);
16
+ color: var(--ws-color-text);
17
+ font-family: var(--ws-font-family-sans);
18
+ }
19
+
20
+ ::selection {
21
+ background: var(--ws-color-selection);
22
+ color: var(--ws-color-text);
23
+ }
24
+
25
+ :focus-visible {
26
+ outline: var(--ws-border-width-medium) solid var(--ws-color-interactive);
27
+ outline-offset: 2px;
28
+ }
29
+
30
+ .Layout {
31
+ padding-bottom: var(--ws-size-status-line);
32
+ }
33
+
34
+ .WsStatusLine {
35
+ position: fixed;
36
+ right: 0;
37
+ bottom: 0;
38
+ left: 0;
39
+ z-index: var(--vp-z-index-nav);
40
+ height: var(--ws-size-status-line);
41
+ }
42
+
43
+ .WsStatusLine .WsStatusLine-pair {
44
+ gap: var(--ws-space-6);
45
+ }
46
+
47
+ /* the two scroll controls are nothing but their keys, so they go with the keys */
48
+ [data-ws-keys='off'] .WsStatusLine .WsStatusLine-pair {
49
+ display: none;
50
+ }
51
+
52
+ .VPNavScreen.VPNavScreen {
53
+ bottom: var(--ws-size-status-line);
54
+ }
55
+
56
+ .VPFooter.VPFooter {
57
+ border-top-color: var(--ws-color-border);
58
+ background: var(--ws-color-bg);
59
+ color: var(--ws-color-text-secondary);
60
+ font: var(--ws-text-caption);
61
+ }
62
+
63
+ /* skip link */
64
+ .VPSkipLink.VPSkipLink {
65
+ border-radius: var(--ws-radius-md);
66
+ color: var(--ws-color-interactive);
67
+ font: var(--ws-text-label);
68
+ }
69
+
70
+ /* 404 */
71
+ .WsNotFound {
72
+ display: grid;
73
+ justify-items: start;
74
+ gap: var(--ws-space-16);
75
+ max-width: var(--ws-size-content);
76
+ margin-inline: auto;
77
+ padding: var(--ws-space-64) var(--ws-space-24);
78
+ }
79
+
80
+ .WsNotFound-ghost {
81
+ color: var(--ws-color-text);
82
+ line-height: 0;
83
+ }
84
+
85
+ .WsNotFound-title {
86
+ margin-top: var(--ws-space-8);
87
+ font: var(--ws-text-display-compact);
88
+ letter-spacing: var(--ws-text-display-compact-letter-spacing);
89
+ }
90
+
91
+ .WsNotFound-output {
92
+ margin: 0 0 var(--ws-space-16);
93
+ padding-left: var(--ws-space-16);
94
+ border-left: var(--ws-border-width-medium) solid var(--ws-color-border);
95
+ color: var(--ws-color-text-secondary);
96
+ font: var(--ws-text-label);
97
+ }
@@ -0,0 +1,441 @@
1
+ /*
2
+ * The default theme's nav bar, drawn as the tab bar of the terminal frame: the brand, the
3
+ * numbered tabs after it, and search, links and the ghost at the right end.
4
+ */
5
+ .VPNav .VPNavBar {
6
+ font-family: var(--ws-font-family-mono);
7
+ }
8
+
9
+ /*
10
+ * The bar is always opaque. The default theme leaves it clear in places and paints its
11
+ * parts instead, which lets the page show through between them here.
12
+ */
13
+ .VPNav .VPNavBar:not(.home),
14
+ .VPNav .VPNavBar.has-sidebar,
15
+ .VPNav .VPNavBar.home,
16
+ .VPNav .VPNavBar.home.top {
17
+ background-color: var(--ws-color-bg);
18
+ }
19
+
20
+ .VPNav .VPNavBar .wrapper {
21
+ padding: 0 var(--ws-space-8) 0 var(--ws-space-16);
22
+ }
23
+
24
+ .VPNav .VPNavBar .wrapper > .container {
25
+ max-width: 100%;
26
+ }
27
+
28
+ /* the bar is ruled off from the page everywhere, not only once the page scrolls */
29
+ .VPNav .VPNavBar .divider {
30
+ padding-left: 0;
31
+ }
32
+
33
+ .VPNav .VPNavBar .divider-line,
34
+ .VPNav .VPNavBar.home.top .divider-line {
35
+ background-color: var(--ws-color-border);
36
+ }
37
+
38
+ .VPNav .VPNavBar .title,
39
+ .VPNav .VPNavBar .content-body {
40
+ background: none;
41
+ }
42
+
43
+ /* brand */
44
+ .VPNav .VPNavBarTitle .title {
45
+ gap: var(--ws-space-10);
46
+ border-bottom: 0;
47
+ color: var(--ws-color-text);
48
+ font: var(--ws-text-label);
49
+ font-weight: var(--ws-font-weight-extrabold);
50
+ letter-spacing: -0.02em;
51
+ }
52
+
53
+ /* a mark in a 64 box at 32 px draws each sprite pixel as 2 px */
54
+ .VPNav .VPNavBarTitle .logo {
55
+ width: auto;
56
+ height: 2rem;
57
+ margin-right: 0;
58
+ image-rendering: pixelated;
59
+ }
60
+
61
+ /* tabs */
62
+ .VPNav .VPNavBar .VPNavBarMenu {
63
+ align-self: stretch;
64
+ counter-reset: ws-tab;
65
+ }
66
+
67
+ .VPNav .VPNavBarMenu .VPNavBarMenuLink,
68
+ .VPNav .VPNavBarMenu .VPNavBarMenuGroup .button {
69
+ gap: var(--ws-space-8);
70
+ height: 100%;
71
+ padding: 0 var(--ws-space-16);
72
+ border-inline: var(--ws-border-width-thin) solid transparent;
73
+ color: var(--ws-color-text-secondary);
74
+ font: var(--ws-text-label);
75
+ line-height: var(--vp-nav-height);
76
+ transition: none;
77
+ counter-increment: ws-tab;
78
+ }
79
+
80
+ .VPNav .VPNavBarMenu .VPNavBarMenuGroup .button .text {
81
+ padding: 0;
82
+ color: inherit;
83
+ font: inherit;
84
+ line-height: inherit;
85
+ }
86
+
87
+ .VPNav .VPNavBarMenu .VPNavBarMenuLink::before,
88
+ .VPNav .VPNavBarMenu .VPNavBarMenuGroup .button::before {
89
+ color: var(--ws-color-text-faint);
90
+ font-weight: var(--ws-font-weight-bold);
91
+ content: counter(ws-tab);
92
+ content: counter(ws-tab) / '';
93
+ }
94
+
95
+ /* the number names the key that goes to the tab. With the keys switched off it is left out. */
96
+ [data-ws-keys='off'] .VPNav .VPNavBarMenu .VPNavBarMenuLink::before,
97
+ [data-ws-keys='off'] .VPNav .VPNavBarMenu .VPNavBarMenuGroup .button::before {
98
+ content: none;
99
+ }
100
+
101
+ .VPNav .VPNavBarMenu .VPNavBarMenuLink:hover,
102
+ .VPNav .VPNavBarMenu .VPNavBarMenuGroup:hover .button {
103
+ color: var(--ws-color-text);
104
+ }
105
+
106
+ .VPNav .VPNavBarMenu .VPNavBarMenuLink.active,
107
+ .VPNav .VPNavBarMenu .VPNavBarMenuGroup.active .button {
108
+ border-color: var(--ws-color-border);
109
+ background: var(--ws-color-surface);
110
+ box-shadow: inset 0 var(--ws-border-width-medium) 0 var(--ws-color-brand);
111
+ color: var(--ws-color-text);
112
+ }
113
+
114
+ .VPNav .VPNavBarMenu .VPNavBarMenuLink.active::before,
115
+ .VPNav .VPNavBarMenu .VPNavBarMenuGroup.active .button::before {
116
+ color: var(--ws-color-brand);
117
+ }
118
+
119
+ /* flyout menus of a tab group, of the language picker and of the overflow menu */
120
+ .VPNav .VPFlyout .menu .VPMenu {
121
+ border: var(--ws-border-width-thin) solid var(--ws-color-border);
122
+ border-radius: var(--ws-radius-lg);
123
+ background: var(--ws-color-surface);
124
+ box-shadow: none;
125
+ font-family: var(--ws-font-family-mono);
126
+ }
127
+
128
+ .VPNav .VPMenu .VPMenuLink .link {
129
+ border-radius: var(--ws-radius-sm);
130
+ color: var(--ws-color-text-secondary);
131
+ font: var(--ws-text-label-sm);
132
+ line-height: 2rem;
133
+ transition: none;
134
+ }
135
+
136
+ .VPNav .VPMenu .VPMenuLink .link:hover,
137
+ .VPNav .VPMenu .VPMenuLink .link.active {
138
+ background: var(--ws-color-raised);
139
+ color: var(--ws-color-text);
140
+ }
141
+
142
+ /* search: a field that names its own key */
143
+ .VPNav .VPNavBarSearch .DocSearch-Button {
144
+ font-family: var(--ws-font-family-mono);
145
+ }
146
+
147
+ .VPNav .DocSearch-Button .DocSearch-Button-Placeholder {
148
+ margin: 0;
149
+ padding: 0;
150
+ color: var(--ws-color-text-secondary);
151
+ font: var(--ws-text-label-sm);
152
+ text-transform: lowercase;
153
+ transition: none;
154
+ }
155
+
156
+ /* links out: the name and an arrow, in the voice of the bar */
157
+ .VPNav .VPNavBarSocialLinks .VPSocialLink {
158
+ gap: 0.375em;
159
+ width: auto;
160
+ height: auto;
161
+ padding-inline: var(--ws-space-12);
162
+ color: var(--ws-color-text-secondary);
163
+ font: var(--ws-text-label);
164
+ transition: none;
165
+ }
166
+
167
+ .VPNav .VPNavBarSocialLinks .VPSocialLink:hover {
168
+ color: var(--ws-color-text);
169
+ }
170
+
171
+ .VPNav .VPNavBarSocialLinks .VPSocialLink > span {
172
+ display: none;
173
+ }
174
+
175
+ .VPNav .VPNavBarSocialLinks .VPSocialLink::before {
176
+ content: attr(aria-label);
177
+ }
178
+
179
+ .VPNav .VPNavBarSocialLinks .VPSocialLink::after {
180
+ width: 0.75em;
181
+ height: 0.75em;
182
+ background: currentcolor;
183
+ content: '';
184
+ mask: var(--ws-icon-arrow) center / contain no-repeat;
185
+ }
186
+
187
+ /* the ghost at the end of the bar */
188
+ .WsNavGhost {
189
+ display: flex;
190
+ align-items: center;
191
+ margin-left: var(--ws-space-12);
192
+ color: var(--ws-color-text);
193
+ line-height: 0;
194
+ }
195
+
196
+ .WsNavGhost a {
197
+ display: block;
198
+ border-radius: var(--ws-radius-sm);
199
+ color: inherit;
200
+ }
201
+
202
+ /* the lines the default theme draws between the groups of the bar */
203
+ .VPNav .VPNavBar .content-body > .translations::before,
204
+ .VPNav .VPNavBar .content-body > .appearance::before,
205
+ .VPNav .VPNavBar .content-body > .social-links::before {
206
+ display: none;
207
+ }
208
+
209
+ .VPNav .VPNavBarHamburger .container > span {
210
+ background-color: var(--ws-color-text);
211
+ }
212
+
213
+ @media (width >= 48rem) {
214
+ .VPNav .VPNavBar .wrapper,
215
+ .VPNav .VPNavBar.has-sidebar .wrapper {
216
+ padding: 0 var(--ws-space-20);
217
+ }
218
+
219
+ /* the tabs come after the brand, and search moves to the right end */
220
+ .VPNav .VPNavBar .content-body {
221
+ justify-content: flex-start;
222
+ }
223
+
224
+ .VPNav .VPNavBar .content-body > .menu {
225
+ order: -1;
226
+ }
227
+
228
+ /*
229
+ * The search field gives way first: in a window too narrow for the whole bar it gets
230
+ * shorter, down to its word and its key, and the tabs and the brand keep their width.
231
+ * Its padding keeps it off the last tab then.
232
+ */
233
+ .VPNav .VPNavBar .content {
234
+ min-width: 0;
235
+ }
236
+
237
+ .VPNav .VPNavBar .content-body > .search {
238
+ flex: 0 1 calc(13rem + var(--ws-space-8));
239
+ min-width: 6rem;
240
+ margin-left: auto;
241
+ padding-left: var(--ws-space-8);
242
+ }
243
+
244
+ .VPNav .VPNavBarSearch > div {
245
+ flex: 1;
246
+ min-width: 0;
247
+ }
248
+
249
+ .VPNav .VPNavBarSearch .DocSearch-Button {
250
+ justify-content: space-between;
251
+ width: 100%;
252
+ height: 1.875rem;
253
+ padding: 0 var(--ws-space-6) 0 var(--ws-space-10);
254
+ border: var(--ws-border-width-thin) solid var(--ws-color-field-border);
255
+ border-radius: var(--ws-radius-md);
256
+ background: var(--ws-color-surface);
257
+ transition: none;
258
+ }
259
+
260
+ /* as on a secondary button, the outline takes the text color under the pointer */
261
+ .VPNav .VPNavBarSearch .DocSearch-Button:hover {
262
+ border-color: var(--ws-color-text);
263
+ background: var(--ws-color-surface);
264
+ }
265
+
266
+ /* with the focus it takes the color of the ring, as the field of the search dialog does */
267
+ .VPNav .VPNavBarSearch .DocSearch-Button:focus-visible {
268
+ border-color: var(--ws-color-interactive);
269
+ outline: var(--ws-border-width-medium) solid var(--ws-color-interactive);
270
+ outline-offset: 2px;
271
+ }
272
+
273
+ .VPNav .DocSearch-Button .DocSearch-Search-Icon {
274
+ display: none;
275
+ }
276
+
277
+ /* The default theme shows Ctrl K here. It listens for / as well, which is the key this system names. */
278
+ .VPNav .DocSearch-Button .DocSearch-Button-Keys {
279
+ display: flex;
280
+ min-width: 0;
281
+ border: 0;
282
+ padding: 0;
283
+ }
284
+
285
+ .VPNav .DocSearch-Button .DocSearch-Button-Keys .DocSearch-Button-Key {
286
+ display: none;
287
+ }
288
+
289
+ .VPNav .DocSearch-Button .DocSearch-Button-Keys::after {
290
+ display: inline-grid;
291
+ place-items: center;
292
+ min-width: 1.125rem;
293
+ height: 1.125rem;
294
+ padding-inline: var(--ws-space-4);
295
+ border: var(--ws-border-width-thin) solid var(--ws-color-border-strong);
296
+ border-radius: var(--ws-radius-xs);
297
+ color: var(--ws-color-text);
298
+ font-family: var(--ws-font-family-mono);
299
+ font-size: var(--ws-font-size-11);
300
+ line-height: 1;
301
+ content: '/';
302
+ }
303
+
304
+ [data-ws-keys='off'] .VPNav .DocSearch-Button .DocSearch-Button-Keys::after {
305
+ content: none;
306
+ }
307
+ }
308
+
309
+ @media (width >= 60rem) {
310
+ /*
311
+ * The brand has a box as wide as the sidebar, on every page, and the tabs start where it
312
+ * ends. So one length, the width of the sidebar, places the border of the sidebar and the
313
+ * left edge of the first tab: the left border of that tab is the pixels of the sidebar's
314
+ * border, whatever the brand and the tabs are called. A short brand leaves a gap before
315
+ * the tabs, and a long tab pushes the tabs after it, never the brand.
316
+ *
317
+ * The box has the padding of the sidebar at its right too, so a brand that is cut ends
318
+ * that far before the tabs.
319
+ *
320
+ * With a sidebar the default theme pins the title above it. Here the bar is one row.
321
+ */
322
+ .VPNav .VPNavBar .container > .title,
323
+ .VPNav .VPNavBar.has-sidebar .container > .title {
324
+ position: static;
325
+ width: calc(var(--vp-sidebar-width) - var(--ws-space-20) - var(--ws-border-width-thin));
326
+ height: var(--vp-nav-height);
327
+ padding: 0 var(--ws-space-20) 0 0;
328
+ }
329
+
330
+ /* the link is as wide as the brand, and a brand too long for the box is cut with an ellipsis */
331
+ .VPNav .VPNavBar .VPNavBarTitle .title {
332
+ width: fit-content;
333
+ max-width: 100%;
334
+ height: var(--vp-nav-height);
335
+ padding: 0;
336
+ }
337
+
338
+ .VPNav .VPNavBar .VPNavBarTitle .title > span {
339
+ overflow: hidden;
340
+ text-overflow: ellipsis;
341
+ }
342
+
343
+ .VPNav .VPNavBar .content,
344
+ .VPNav .VPNavBar.has-sidebar .content {
345
+ padding: 0;
346
+ }
347
+
348
+ /* the rule under the bar starts where the sidebar ends, in a window of any width */
349
+ .VPNav .VPNavBar.has-sidebar .divider {
350
+ padding-left: var(--vp-sidebar-width);
351
+ }
352
+
353
+ .VPNav .VPNavBar .content-body,
354
+ .VPNav .VPNavBar:not(.home.top) .content-body {
355
+ background: none;
356
+ }
357
+ }
358
+
359
+ @media (width >= 80rem) {
360
+ /* at this width the status line has the theme button, so the switch in the bar goes */
361
+ .VPNav .VPNavBar .content-body > .appearance {
362
+ display: none;
363
+ }
364
+ }
365
+
366
+ /*
367
+ * On phones the tabs stay visible, in a row of their own under the brand, as in the
368
+ * framework-free tab bar. The default theme hides them behind its menu button, so this
369
+ * gives the bar a second row and moves the menu into it. It needs :has(), to leave a site
370
+ * without tabs with one row.
371
+ */
372
+ @media (width < 48rem) {
373
+ :root:has(.VPNavBarMenu) {
374
+ --ws-nav-row: 2.75rem;
375
+ --ws-tab-row: 2.5rem;
376
+ --vp-nav-height: calc(var(--ws-nav-row) + var(--ws-tab-row) + 2px);
377
+ }
378
+
379
+ :root:has(.VPNavBarMenu) .VPNav .VPNavBar .wrapper > .container,
380
+ :root:has(.VPNavBarMenu) .VPNav .VPNavBar .wrapper > .container > .title,
381
+ :root:has(.VPNavBarMenu) .VPNav .VPNavBarTitle .title,
382
+ :root:has(.VPNavBarMenu) .VPNav .VPNavBar .content-body {
383
+ height: var(--ws-nav-row);
384
+ }
385
+
386
+ :root:has(.VPNavBarMenu) .VPNav .VPNavBar .VPNavBarMenu {
387
+ display: flex;
388
+ position: absolute;
389
+ top: calc(var(--ws-nav-row) + 1px);
390
+ right: 0;
391
+ left: 0;
392
+ height: calc(var(--ws-tab-row) + 1px);
393
+ border-bottom: var(--ws-border-width-thin) solid var(--ws-color-border);
394
+ pointer-events: auto;
395
+ }
396
+
397
+ /* each tab takes the room its name needs, and they share what is left */
398
+ .VPNav .VPNavBarMenu .VPNavBarMenuLink,
399
+ .VPNav .VPNavBarMenu .VPNavBarMenuGroup,
400
+ .VPNav .VPNavBarMenu .VPNavBarMenuGroup .button {
401
+ flex: 1 1 auto;
402
+ justify-content: center;
403
+ min-width: 0;
404
+ }
405
+
406
+ :root:has(.VPNavBarMenu) .VPNav .VPNavBarHamburger,
407
+ :root:has(.VPNavBarMenu) .VPNav .VPNavBarSearch .DocSearch-Button {
408
+ height: var(--ws-nav-row);
409
+ }
410
+
411
+ .VPNav .VPNavBarMenu .VPNavBarMenuLink,
412
+ .VPNav .VPNavBarMenu .VPNavBarMenuGroup .button {
413
+ padding: 0 var(--ws-space-8);
414
+ line-height: var(--ws-tab-row);
415
+ }
416
+
417
+ .VPNav .VPNavBarMenu .VPNavBarMenuLink > span {
418
+ overflow: hidden;
419
+ text-overflow: ellipsis;
420
+ }
421
+
422
+ /* the row runs from edge to edge, so the current tab has no border at an end of it */
423
+ .VPNav .VPNavBarMenu > .visually-hidden + .VPNavBarMenuLink,
424
+ .VPNav .VPNavBarMenu > .visually-hidden + .VPNavBarMenuGroup .button {
425
+ border-left-color: transparent;
426
+ }
427
+
428
+ .VPNav .VPNavBarMenu > .VPNavBarMenuLink:last-child,
429
+ .VPNav .VPNavBarMenu > .VPNavBarMenuGroup:last-child .button {
430
+ border-right-color: transparent;
431
+ }
432
+
433
+ .VPNav .VPNavBarMenu .VPFlyout .menu {
434
+ top: 100%;
435
+ }
436
+
437
+ /* the tabs are in the bar, so the menu behind the button does not repeat them */
438
+ :root:has(.VPNavBarMenu) .VPNavScreen .VPNavScreenMenu {
439
+ display: none;
440
+ }
441
+ }
@@ -0,0 +1,55 @@
1
+ /* The local search dialog. */
2
+ .VPLocalSearchBox .shell {
3
+ border: var(--ws-border-width-thin) solid var(--ws-color-border);
4
+ border-radius: var(--ws-radius-xl);
5
+ box-shadow: none;
6
+ font-family: var(--ws-font-family-mono);
7
+ }
8
+
9
+ .VPLocalSearchBox .search-bar {
10
+ border-color: var(--ws-color-field-border);
11
+ border-radius: var(--ws-radius-md);
12
+ }
13
+
14
+ .VPLocalSearchBox .search-bar:focus-within {
15
+ border-color: var(--ws-color-interactive);
16
+ }
17
+
18
+ .VPLocalSearchBox .search-input {
19
+ color: var(--ws-color-text);
20
+ font: var(--ws-text-label);
21
+ }
22
+
23
+ .VPLocalSearchBox .result {
24
+ border-width: var(--ws-border-width-thin);
25
+ border-radius: var(--ws-radius-md);
26
+ transition: none;
27
+ }
28
+
29
+ .VPLocalSearchBox .titles {
30
+ font: var(--ws-text-label-sm);
31
+ }
32
+
33
+ .VPLocalSearchBox .title-icon {
34
+ color: var(--ws-color-brand);
35
+ opacity: 1;
36
+ }
37
+
38
+ .VPLocalSearchBox .excerpt {
39
+ color: var(--ws-color-text-secondary);
40
+ font: var(--ws-text-body-sm);
41
+ }
42
+
43
+ .VPLocalSearchBox .no-results,
44
+ .VPLocalSearchBox .search-keyboard-shortcuts {
45
+ color: var(--ws-color-text-secondary);
46
+ font: var(--ws-text-caption);
47
+ }
48
+
49
+ .VPLocalSearchBox .search-keyboard-shortcuts kbd {
50
+ border: var(--ws-border-width-thin) solid var(--ws-color-border-strong);
51
+ border-radius: var(--ws-radius-xs);
52
+ background: none;
53
+ box-shadow: none;
54
+ color: var(--ws-color-text);
55
+ }