@meith/theme-phasebook 0.30.0 → 0.31.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/slots/footer.tsx +7 -1
- package/src/slots/forum-jump.tsx +29 -35
- package/src/theme.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meith/theme-phasebook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "A theme for Meith with a familiar social shape, 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.31.0",
|
|
24
|
+
"@meith/theme-kit": "^0.31.0",
|
|
25
|
+
"@meith/ui": "^0.31.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": "^19.2.0"
|
package/src/slots/footer.tsx
CHANGED
|
@@ -8,6 +8,7 @@ export function Footer({
|
|
|
8
8
|
links,
|
|
9
9
|
timezoneLabel,
|
|
10
10
|
poweredBy,
|
|
11
|
+
regions,
|
|
11
12
|
copy,
|
|
12
13
|
}: FooterModel & { copy: SlotCopy }) {
|
|
13
14
|
const c = (key: string) => fromSlotCopy(copy, `phasebook.footer.${key}`)
|
|
@@ -15,6 +16,11 @@ export function Footer({
|
|
|
15
16
|
return (
|
|
16
17
|
<footer className="mt-auto bg-background">
|
|
17
18
|
<div className={`${PAGE} flex flex-col gap-2 py-6 text-xs text-muted-foreground`}>
|
|
19
|
+
{regions?.controls && (
|
|
20
|
+
<div className="flex flex-wrap items-center justify-end gap-x-6 gap-y-2 pb-2">
|
|
21
|
+
{regions.controls}
|
|
22
|
+
</div>
|
|
23
|
+
)}
|
|
18
24
|
{links.length > 0 && (
|
|
19
25
|
<nav aria-label={c('ariaLabel')} className="flex flex-wrap gap-x-4 gap-y-1">
|
|
20
26
|
{links.map((link) => (
|
|
@@ -31,7 +37,7 @@ export function Footer({
|
|
|
31
37
|
{c('timezone')} {timezoneLabel}
|
|
32
38
|
</span>
|
|
33
39
|
{poweredBy && (
|
|
34
|
-
<a href={poweredBy.href} className={MUTED_LINK}>
|
|
40
|
+
<a href={poweredBy.href} target="_blank" rel="noreferrer" className={MUTED_LINK}>
|
|
35
41
|
{poweredBy.label}
|
|
36
42
|
</a>
|
|
37
43
|
)}
|
package/src/slots/forum-jump.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ForumJumpModel } from '@meith/theme-kit'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { PILL } from '../shared'
|
|
4
4
|
|
|
5
5
|
export function ForumJump({ action, field, forums, submitLabel, label }: ForumJumpModel) {
|
|
6
6
|
if (forums.length === 0) return null
|
|
@@ -8,41 +8,35 @@ export function ForumJump({ action, field, forums, submitLabel, label }: ForumJu
|
|
|
8
8
|
const id = `forum-jump-${field}`
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
className={`${PAGE} flex flex-wrap items-center gap-2 pb-4 sm:justify-end`}
|
|
16
|
-
>
|
|
17
|
-
<label htmlFor={id} className="text-xs font-semibold text-muted-foreground">
|
|
18
|
-
{label}
|
|
19
|
-
</label>
|
|
11
|
+
<form method="get" action={action} className="flex flex-wrap items-center gap-2">
|
|
12
|
+
<label htmlFor={id} className="text-xs font-semibold text-muted-foreground">
|
|
13
|
+
{label}
|
|
14
|
+
</label>
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
16
|
+
<select
|
|
17
|
+
id={id}
|
|
18
|
+
name={field}
|
|
19
|
+
defaultValue={forums.find((forum) => forum.isSelected)?.value ?? ''}
|
|
20
|
+
className="h-9 w-auto min-w-48 flex-1 rounded-full border border-input bg-card px-3 text-xs text-foreground sm:flex-none"
|
|
21
|
+
>
|
|
22
|
+
{forums.map((forum) => {
|
|
23
|
+
const indented = `${' '.repeat(forum.depth)}${forum.label}`
|
|
24
|
+
return (
|
|
25
|
+
<option
|
|
26
|
+
key={forum.value}
|
|
27
|
+
value={forum.value}
|
|
28
|
+
disabled={forum.isCategory}
|
|
29
|
+
label={indented}
|
|
30
|
+
>
|
|
31
|
+
{indented}
|
|
32
|
+
</option>
|
|
33
|
+
)
|
|
34
|
+
})}
|
|
35
|
+
</select>
|
|
41
36
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</div>
|
|
37
|
+
<button type="submit" className={PILL}>
|
|
38
|
+
{submitLabel}
|
|
39
|
+
</button>
|
|
40
|
+
</form>
|
|
47
41
|
)
|
|
48
42
|
}
|
package/src/theme.ts
CHANGED