@meith/theme-default 0.33.3 → 0.34.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meith/theme-default",
3
- "version": "0.33.3",
3
+ "version": "0.34.0",
4
4
  "description": "Meith's default theme — every slot and every token, and the reference for what a complete theme fills.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,8 +20,8 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@meith/theme-kit": "^0.33.3",
24
- "@meith/ui": "^0.33.3"
23
+ "@meith/theme-kit": "^0.34.0",
24
+ "@meith/ui": "^0.34.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "^19.2.0"
package/src/shared.tsx CHANGED
@@ -24,12 +24,8 @@ export const PRIMARY_HEADER = 'border-b-primary/15 bg-primary/6'
24
24
 
25
25
  export const MUTED_LINK = `text-muted-foreground ${LINK}`
26
26
 
27
- export const HEADER_HEIGHT = 'h-14'
28
-
29
27
  export const BELOW_HEADER = 'top-14'
30
28
 
31
- export const BELOW_DESKTOP_HEADER = 'lg:top-[6.5rem]'
32
-
33
29
  export const PAGE_TITLE =
34
30
  'font-heading text-xl font-semibold tracking-tight text-balance sm:text-2xl'
35
31
 
@@ -43,7 +39,7 @@ export const PILL =
43
39
  export function UserRef({ user, className }: { user: UserRefModel; className?: string }) {
44
40
  const classes = cn(
45
41
  'font-medium',
46
- user.nameClass == null && 'text-primary',
42
+ user.nameClass == null && 'text-foreground',
47
43
  className,
48
44
  user.nameClass,
49
45
  )
@@ -165,14 +161,19 @@ export function Counts({ items, className }: { items: readonly CountItem[]; clas
165
161
 
166
162
  export function Figures({ items, className }: { items: readonly CountItem[]; className?: string }) {
167
163
  return (
168
- <dl className={cn('grid grid-cols-2 gap-x-5 text-center', className)}>
164
+ <dl
165
+ className={cn(
166
+ 'flex flex-wrap gap-x-3 gap-y-0.5 text-xs text-muted-foreground md:grid md:grid-cols-2 md:gap-x-5 md:text-center',
167
+ className,
168
+ )}
169
+ >
169
170
  {items.map((item) => (
170
- <div key={item.label} className="flex flex-col">
171
+ <div key={item.label} className="flex items-baseline gap-x-1 md:flex-col md:gap-0">
171
172
  <dt className="sr-only">{item.label}</dt>
172
- <dd className={cn('text-sm font-semibold text-foreground', NUMERIC)}>
173
+ <dd className={cn('font-semibold text-foreground md:text-sm', NUMERIC)}>
173
174
  {item.value.label}
174
175
  </dd>
175
- <dd className="text-[0.6875rem] leading-4 text-muted-foreground">
176
+ <dd className="md:text-[0.6875rem] md:leading-4">
176
177
  {item.value.value === 1 ? item.one : item.many}
177
178
  </dd>
178
179
  </div>
@@ -70,7 +70,7 @@ export function ForumRow({ forum, copy }: ForumRowSlotModel & { copy: SlotCopy }
70
70
  </div>
71
71
 
72
72
  {!isLink && (
73
- <div className="col-start-2 flex min-w-0 flex-wrap items-center gap-x-5 gap-y-1 text-xs text-muted-foreground md:contents">
73
+ <div className="col-start-2 flex min-w-0 flex-col gap-y-1 text-xs text-muted-foreground md:contents">
74
74
  <Figures
75
75
  className="md:col-start-3 md:justify-self-end"
76
76
  items={[
@@ -89,7 +89,7 @@ export function ForumRow({ forum, copy }: ForumRowSlotModel & { copy: SlotCopy }
89
89
  ]}
90
90
  />
91
91
 
92
- <div className="flex min-w-0 max-w-full flex-wrap gap-x-1 md:col-start-4 md:block md:border-l md:border-border md:pl-5">
92
+ <div className="order-first flex min-w-0 max-w-full flex-wrap gap-x-1 md:order-none md:col-start-4 md:block md:border-l md:border-border md:pl-5">
93
93
  {forum.lastPost === null ? (
94
94
  <span className="text-forum-read">{c('noPostsYet')}</span>
95
95
  ) : (
@@ -1,7 +1,7 @@
1
1
  import type { HeaderModel, SlotCopy } from '@meith/theme-kit'
2
2
  import { fromSlotCopy, linkTarget } from '@meith/theme-kit'
3
3
 
4
- import { BELOW_HEADER, HEADER_HEIGHT, PAGE } from '../shared'
4
+ import { BELOW_HEADER, PAGE } from '../shared'
5
5
 
6
6
  const DESKTOP_LINK =
7
7
  'inline-flex h-9 items-center rounded-full px-3 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground'
@@ -158,16 +158,48 @@ export function Header({
158
158
  )
159
159
 
160
160
  return (
161
- <header className="sticky top-0 z-40 border-b border-b-border bg-card/95 backdrop-blur supports-[backdrop-filter]:bg-card/85">
162
- <div className={`${PAGE} flex ${HEADER_HEIGHT} items-center gap-x-3 sm:gap-x-4`}>
161
+ <header
162
+ data-header-peek
163
+ className="sticky top-0 z-40 border-b border-b-border bg-card/95 backdrop-blur motion-safe:transition-transform motion-safe:duration-200 data-peek:-translate-y-full supports-[backdrop-filter]:bg-card/85"
164
+ >
165
+ <div className={`${PAGE} flex min-h-14 items-center gap-x-3 sm:gap-x-4`}>
163
166
  <a
164
167
  href={homeHref}
165
- className="me-auto flex min-w-0 items-center gap-2.5 text-lg font-semibold tracking-tight text-foreground transition-colors hover:text-primary"
168
+ className="flex min-w-0 shrink-0 items-center gap-2.5 text-lg font-semibold tracking-tight text-foreground transition-colors hover:text-primary"
166
169
  >
167
170
  <BoardMark boardTitle={boardTitle} logo={logo} />
168
171
  </a>
169
172
 
170
- <div className="flex min-w-0 shrink-0 items-center gap-2 sm:gap-3">{children}</div>
173
+ {hasNavigation && (
174
+ <nav
175
+ aria-label={c('sections')}
176
+ className={
177
+ opensMenus
178
+ ? 'hidden min-w-0 flex-1 lg:block'
179
+ : 'hidden min-w-0 flex-1 overflow-x-auto [mask-image:linear-gradient(to_right,black_calc(100%-1.5rem),transparent)] [scrollbar-width:none] lg:block'
180
+ }
181
+ >
182
+ <ul
183
+ data-nav-view="desktop"
184
+ className={
185
+ opensMenus
186
+ ? 'flex flex-wrap items-center gap-0.5 py-1'
187
+ : 'flex items-center gap-0.5 pr-6 whitespace-nowrap'
188
+ }
189
+ >
190
+ {navigation.map((item) => (
191
+ <li key={item.href} className="group relative shrink-0">
192
+ <a href={item.href} {...linkTarget(item)} className={DESKTOP_LINK}>
193
+ {item.label}
194
+ </a>
195
+ <Submenu items={item.submenu} />
196
+ </li>
197
+ ))}
198
+ </ul>
199
+ </nav>
200
+ )}
201
+
202
+ <div className="ms-auto flex min-w-0 shrink-0 items-center gap-2 sm:gap-3">{children}</div>
171
203
 
172
204
  {hasNavigation && (
173
205
  <nav aria-label={c('sections')} data-nav-view="mobile" className="lg:hidden">
@@ -192,36 +224,6 @@ export function Header({
192
224
  </nav>
193
225
  )}
194
226
  </div>
195
-
196
- {hasNavigation && (
197
- <nav aria-label={c('sections')} className="hidden border-t border-border lg:block">
198
- <div
199
- className={
200
- opensMenus
201
- ? PAGE
202
- : `${PAGE} overflow-x-auto [mask-image:linear-gradient(to_right,black_calc(100%-1.5rem),transparent)] [scrollbar-width:none]`
203
- }
204
- >
205
- <ul
206
- data-nav-view="desktop"
207
- className={
208
- opensMenus
209
- ? '-mx-3 flex flex-wrap items-center gap-0.5 py-1'
210
- : '-mx-3 flex items-center gap-0.5 py-1 pr-6 whitespace-nowrap'
211
- }
212
- >
213
- {navigation.map((item) => (
214
- <li key={item.href} className="group relative shrink-0">
215
- <a href={item.href} {...linkTarget(item)} className={DESKTOP_LINK}>
216
- {item.label}
217
- </a>
218
- <Submenu items={item.submenu} />
219
- </li>
220
- ))}
221
- </ul>
222
- </div>
223
- </nav>
224
- )}
225
227
  </header>
226
228
  )
227
229
  }
@@ -1,6 +1,6 @@
1
1
  import type { PanelShellModel } from '@meith/theme-kit'
2
2
 
3
- import { BELOW_DESKTOP_HEADER, EYEBROW, MUTED_LINK } from '../shared'
3
+ import { EYEBROW, MUTED_LINK } from '../shared'
4
4
 
5
5
  const RAIL =
6
6
  'flex flex-col gap-4 px-4 pt-5 sm:px-6 lg:sticky lg:w-64 lg:shrink-0 lg:self-start lg:pt-8 lg:pr-0'
@@ -22,10 +22,10 @@ function SwitchGlyph() {
22
22
  )
23
23
  }
24
24
 
25
- export function PanelShell({ panel, links, linksLabel, regions, children }: PanelShellModel) {
25
+ export function PanelShell({ links, linksLabel, regions, children }: PanelShellModel) {
26
26
  return (
27
27
  <div className="mx-auto flex w-full max-w-6xl flex-1 flex-col lg:flex-row lg:gap-8">
28
- <aside className={`${RAIL} ${panel === 'admincp' ? 'lg:top-14' : BELOW_DESKTOP_HEADER}`}>
28
+ <aside className={`${RAIL} lg:top-14`}>
29
29
  {regions.nav}
30
30
 
31
31
  {links.length > 0 && (
@@ -68,7 +68,7 @@ export function ThreadRow({
68
68
  </p>
69
69
  </div>
70
70
 
71
- <div className="col-start-2 flex min-w-0 flex-wrap items-center gap-x-5 gap-y-1 text-xs text-muted-foreground md:contents">
71
+ <div className="col-start-2 flex min-w-0 flex-col gap-y-1 text-xs text-muted-foreground md:contents">
72
72
  <Figures
73
73
  className="md:col-start-3 md:justify-self-end"
74
74
  items={[
@@ -87,7 +87,7 @@ export function ThreadRow({
87
87
  ]}
88
88
  />
89
89
 
90
- <div className="flex min-w-0 max-w-full flex-wrap gap-x-1 md:col-start-4 md:block md:border-l md:border-border md:pl-5">
90
+ <div className="order-first flex min-w-0 max-w-full flex-wrap gap-x-1 md:order-none md:col-start-4 md:block md:border-l md:border-border md:pl-5">
91
91
  {thread.lastPost === null ? (
92
92
  <span className="text-thread-moved">{c('noRepliesYet')}</span>
93
93
  ) : (
package/src/theme.ts CHANGED
@@ -70,7 +70,7 @@ import { WhoIsOnline } from './slots/who-is-online'
70
70
  export const defaultTheme = defineTheme({
71
71
  key: 'default',
72
72
  title: 'Default',
73
- version: '0.33.3',
73
+ version: '0.34.0',
74
74
  slots: {
75
75
  Shell,
76
76
  Header,