@meith/theme-raidframe 0.35.0 → 0.36.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 +4 -4
- package/src/copy.ts +3 -2
- package/src/slots/header.tsx +2 -102
- package/src/slots/panel-nav.tsx +9 -10
- package/src/theme.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meith/theme-raidframe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "A gaming theme for Meith — guild, raid and match boards — built on the default theme's slots.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@meith/theme-default": "^0.
|
|
24
|
-
"@meith/theme-kit": "^0.
|
|
25
|
-
"@meith/ui": "^0.
|
|
23
|
+
"@meith/theme-default": "^0.36.0",
|
|
24
|
+
"@meith/theme-kit": "^0.36.0",
|
|
25
|
+
"@meith/ui": "^0.36.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": "^19.2.0"
|
package/src/copy.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mobileHeaderNavCopy, mobilePanelNavCopy } from '@meith/theme-default'
|
|
1
2
|
import type { SlotCopy, Translator } from '@meith/theme-kit'
|
|
2
3
|
|
|
3
4
|
function copyFor(t: Translator, keys: readonly string[]): SlotCopy {
|
|
@@ -92,7 +93,7 @@ export function forumRowCopy(t: Translator): SlotCopy {
|
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
export function headerCopy(t: Translator): SlotCopy {
|
|
95
|
-
return copyFor(t, ['raidframe.header.sectionsAriaLabel'])
|
|
96
|
+
return { ...mobileHeaderNavCopy(t), ...copyFor(t, ['raidframe.header.sectionsAriaLabel']) }
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
export function latestPostsCopy(t: Translator): SlotCopy {
|
|
@@ -149,7 +150,7 @@ export function paginationCopy(t: Translator): SlotCopy {
|
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
export function panelNavCopy(t: Translator): SlotCopy {
|
|
152
|
-
return copyFor(t, ['raidframe.panelNav.waiting'])
|
|
153
|
+
return { ...mobilePanelNavCopy(t), ...copyFor(t, ['raidframe.panelNav.waiting']) }
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
export function panelPageCopy(t: Translator): SlotCopy {
|
package/src/slots/header.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MobileHeaderNav } from '@meith/theme-default'
|
|
1
2
|
import type { HeaderModel, SlotCopy } from '@meith/theme-kit'
|
|
2
3
|
import { fromSlotCopy, linkTarget } from '@meith/theme-kit'
|
|
3
4
|
|
|
@@ -51,88 +52,6 @@ function Submenu({ items }: { items: HeaderModel['navigation'][number]['submenu'
|
|
|
51
52
|
)
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
function Chevron({ className }: { className: string }) {
|
|
55
|
-
return (
|
|
56
|
-
<svg
|
|
57
|
-
aria-hidden="true"
|
|
58
|
-
viewBox="0 0 12 12"
|
|
59
|
-
className={className}
|
|
60
|
-
fill="none"
|
|
61
|
-
stroke="currentColor"
|
|
62
|
-
strokeWidth="1.5"
|
|
63
|
-
strokeLinecap="round"
|
|
64
|
-
strokeLinejoin="round"
|
|
65
|
-
>
|
|
66
|
-
<path d="m4.5 3 3 3-3 3" />
|
|
67
|
-
</svg>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function MobileNavItem({ item }: { item: HeaderModel['navigation'][number] }) {
|
|
72
|
-
if (item.submenu === undefined || item.submenu.length === 0) {
|
|
73
|
-
return (
|
|
74
|
-
<li>
|
|
75
|
-
<a
|
|
76
|
-
href={item.href}
|
|
77
|
-
{...linkTarget(item)}
|
|
78
|
-
className="flex min-h-11 items-center px-3.5 font-mono text-[0.6875rem] font-semibold tracking-[0.14em] text-muted-foreground uppercase hover:bg-secondary hover:text-primary"
|
|
79
|
-
>
|
|
80
|
-
{item.label}
|
|
81
|
-
</a>
|
|
82
|
-
</li>
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<li>
|
|
88
|
-
<details data-nav-disclosure name="raidframe-header-submenu" className="group/submenu">
|
|
89
|
-
<summary className="flex min-h-11 cursor-default list-none items-center justify-between gap-2 px-3.5 font-mono text-[0.6875rem] font-semibold tracking-[0.14em] text-muted-foreground uppercase select-none [&::-webkit-details-marker]:hidden [&::marker]:content-none hover:bg-secondary hover:text-primary">
|
|
90
|
-
<a
|
|
91
|
-
href={item.href}
|
|
92
|
-
{...linkTarget(item)}
|
|
93
|
-
className="min-w-0 flex-1 truncate normal-case tracking-normal hover:underline"
|
|
94
|
-
>
|
|
95
|
-
{item.label}
|
|
96
|
-
</a>
|
|
97
|
-
<span className="flex size-11 shrink-0 items-center justify-center">
|
|
98
|
-
<Chevron className="size-3 transition-transform group-open/submenu:rotate-90" />
|
|
99
|
-
</span>
|
|
100
|
-
</summary>
|
|
101
|
-
<ul className="ml-3 flex flex-col gap-0.5 border-l border-border py-1 pl-2.5">
|
|
102
|
-
{item.submenu.map((child) => (
|
|
103
|
-
<li key={child.href}>
|
|
104
|
-
<a
|
|
105
|
-
href={child.href}
|
|
106
|
-
{...linkTarget(child)}
|
|
107
|
-
className="flex min-h-11 items-center px-3.5 font-mono text-[0.6875rem] font-semibold tracking-[0.14em] text-muted-foreground uppercase hover:bg-secondary hover:text-primary"
|
|
108
|
-
>
|
|
109
|
-
{child.label}
|
|
110
|
-
</a>
|
|
111
|
-
</li>
|
|
112
|
-
))}
|
|
113
|
-
</ul>
|
|
114
|
-
</details>
|
|
115
|
-
</li>
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function MenuGlyph() {
|
|
120
|
-
return (
|
|
121
|
-
<svg
|
|
122
|
-
aria-hidden="true"
|
|
123
|
-
viewBox="0 0 20 20"
|
|
124
|
-
className="size-5"
|
|
125
|
-
fill="none"
|
|
126
|
-
stroke="currentColor"
|
|
127
|
-
strokeWidth="1.75"
|
|
128
|
-
strokeLinecap="round"
|
|
129
|
-
>
|
|
130
|
-
<path className="group-open/menu:hidden" d="M3 5.5h14M3 10h14M3 14.5h14" />
|
|
131
|
-
<path className="hidden group-open/menu:block" d="m5 5 10 10M15 5 5 15" />
|
|
132
|
-
</svg>
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
55
|
export function Header({
|
|
137
56
|
boardTitle,
|
|
138
57
|
homeHref,
|
|
@@ -155,26 +74,7 @@ export function Header({
|
|
|
155
74
|
</a>
|
|
156
75
|
<div className="flex min-w-0 items-center gap-3">
|
|
157
76
|
{children}
|
|
158
|
-
{navigation
|
|
159
|
-
<nav aria-label={c('sectionsAriaLabel')} data-nav-view="mobile" className="lg:hidden">
|
|
160
|
-
<details data-nav-disclosure className="group/menu">
|
|
161
|
-
<summary
|
|
162
|
-
className={`border border-border bg-card text-foreground hover:border-primary/60 hover:text-primary group-open/menu:border-primary group-open/menu:text-primary flex size-10 cursor-default list-none items-center justify-center select-none [&::-webkit-details-marker]:hidden [&::marker]:content-none`}
|
|
163
|
-
>
|
|
164
|
-
<MenuGlyph />
|
|
165
|
-
<span className="sr-only">{c('sectionsAriaLabel')}</span>
|
|
166
|
-
</summary>
|
|
167
|
-
|
|
168
|
-
<div className="absolute inset-x-0 top-full z-30 max-h-[calc(100dvh-4rem)] overflow-y-auto border-b border-border bg-card shadow-elevation">
|
|
169
|
-
<ul className="flex flex-col gap-0.5 px-4 py-2">
|
|
170
|
-
{navigation.map((item) => (
|
|
171
|
-
<MobileNavItem key={item.href} item={item} />
|
|
172
|
-
))}
|
|
173
|
-
</ul>
|
|
174
|
-
</div>
|
|
175
|
-
</details>
|
|
176
|
-
</nav>
|
|
177
|
-
)}
|
|
77
|
+
<MobileHeaderNav boardTitle={boardTitle} navigation={navigation} copy={copy} />
|
|
178
78
|
</div>
|
|
179
79
|
</div>
|
|
180
80
|
|
package/src/slots/panel-nav.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MobilePanelNav } from '@meith/theme-default'
|
|
1
2
|
import type { PanelNavItemModel, PanelNavModel, SlotCopy } from '@meith/theme-kit'
|
|
2
3
|
import { fromSlotCopy } from '@meith/theme-kit'
|
|
3
4
|
|
|
@@ -105,6 +106,7 @@ function Sections({
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
export function PanelNav({
|
|
109
|
+
panel,
|
|
108
110
|
label,
|
|
109
111
|
sections,
|
|
110
112
|
currentTitle,
|
|
@@ -112,16 +114,13 @@ export function PanelNav({
|
|
|
112
114
|
}: PanelNavModel & { copy: SlotCopy }) {
|
|
113
115
|
return (
|
|
114
116
|
<>
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<Sections label={label} sections={sections} copy={copy} />
|
|
123
|
-
</div>
|
|
124
|
-
</details>
|
|
117
|
+
<MobilePanelNav
|
|
118
|
+
panel={panel}
|
|
119
|
+
label={label}
|
|
120
|
+
sections={sections}
|
|
121
|
+
currentTitle={currentTitle}
|
|
122
|
+
copy={copy}
|
|
123
|
+
/>
|
|
125
124
|
|
|
126
125
|
<div className="hidden border border-border bg-card shadow-elevation lg:block">
|
|
127
126
|
<p className={`${MICRO} border-b border-border bg-surface px-3 py-2 text-foreground`}>
|
package/src/theme.ts
CHANGED