@relevate/katachi 0.1.0 → 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 +12 -2
- package/bin/katachi.mjs +0 -0
- package/dist/api/index.d.ts +11 -5
- package/dist/api/index.js +6 -7
- package/dist/cli/index.js +14 -5
- package/dist/core/ast.d.ts +17 -4
- package/dist/core/ast.js +3 -2
- package/dist/core/build.d.ts +2 -0
- package/dist/core/build.js +13 -1
- package/dist/core/parser.js +123 -16
- package/dist/core/types.d.ts +1 -0
- package/dist/targets/askama.d.ts +3 -1
- package/dist/targets/askama.js +44 -12
- package/dist/targets/index.js +14 -0
- package/dist/targets/liquid.d.ts +2 -0
- package/dist/targets/liquid.js +422 -0
- package/dist/targets/react.js +239 -5
- package/dist/targets/shared.d.ts +23 -3
- package/dist/targets/shared.js +323 -14
- package/dist/targets/static-jsx.js +15 -2
- package/docs/architecture.md +0 -1
- package/docs/getting-started.md +2 -0
- package/docs/syntax.md +35 -8
- package/docs/targets.md +16 -0
- package/examples/basic/README.md +2 -1
- package/examples/basic/components/notice-panel.html +2 -2
- package/examples/basic/dist/askama/includes/notice-panel.html +2 -2
- package/examples/basic/dist/askama/notice-panel.rs +3 -2
- package/examples/basic/dist/jsx-static/comparison-table.tsx +2 -2
- package/examples/basic/dist/jsx-static/media-frame.tsx +1 -1
- package/examples/basic/dist/jsx-static/notice-panel.tsx +6 -4
- package/examples/basic/dist/jsx-static/resource-tile.tsx +3 -3
- package/examples/basic/dist/liquid/snippets/badge-chip.liquid +5 -0
- package/examples/basic/dist/liquid/snippets/comparison-table.liquid +34 -0
- package/examples/basic/dist/liquid/snippets/glyph.liquid +6 -0
- package/examples/basic/dist/liquid/snippets/hover-note.liquid +6 -0
- package/examples/basic/dist/liquid/snippets/media-frame.liquid +23 -0
- package/examples/basic/dist/liquid/snippets/notice-panel.liquid +30 -0
- package/examples/basic/dist/liquid/snippets/resource-tile.liquid +38 -0
- package/examples/basic/dist/liquid/snippets/stack-shell.liquid +5 -0
- package/examples/basic/dist/react/badge-chip.tsx +1 -1
- package/examples/basic/dist/react/comparison-table.tsx +9 -9
- package/examples/basic/dist/react/glyph.tsx +1 -1
- package/examples/basic/dist/react/media-frame.tsx +1 -1
- package/examples/basic/dist/react/notice-panel.tsx +6 -4
- package/examples/basic/dist/react/resource-tile.tsx +3 -3
- package/examples/basic/src/templates/comparison-table.template.tsx +5 -5
- package/examples/basic/src/templates/media-frame.template.tsx +3 -3
- package/examples/basic/src/templates/notice-panel.template.tsx +48 -34
- package/examples/basic/src/templates/resource-tile.template.tsx +7 -7
- package/package.json +66 -68
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
{% let name = icon %}
|
|
9
9
|
{% include "./includes/glyph.html" %}
|
|
10
10
|
<div class="min-w-0 flex-1">
|
|
11
|
-
<
|
|
11
|
+
<h{{ headingLevel }} class="text-sm font-semibold tracking-tight">
|
|
12
12
|
{{ title }}
|
|
13
|
-
</
|
|
13
|
+
</h{{ headingLevel }}>
|
|
14
14
|
<div class="mt-2 text-sm leading-6 text-slate-700">
|
|
15
15
|
{{ children|safe }}
|
|
16
16
|
</div>
|
|
@@ -18,11 +18,11 @@ use askama::Template;
|
|
|
18
18
|
<div
|
|
19
19
|
class='min-w-0 flex-1'
|
|
20
20
|
>
|
|
21
|
-
<
|
|
21
|
+
<h{{ headingLevel }}
|
|
22
22
|
class='text-sm font-semibold tracking-tight'
|
|
23
23
|
>
|
|
24
24
|
{{ title }}
|
|
25
|
-
</
|
|
25
|
+
</h{{ headingLevel }}>
|
|
26
26
|
<div
|
|
27
27
|
class='mt-2 text-sm leading-6 text-slate-700'
|
|
28
28
|
>
|
|
@@ -42,6 +42,7 @@ use askama::Template;
|
|
|
42
42
|
)]
|
|
43
43
|
pub struct NoticePanelTemplate<'a> {
|
|
44
44
|
pub tone: &'a str,
|
|
45
|
+
pub headingLevel: i64,
|
|
45
46
|
pub title: &'a str,
|
|
46
47
|
pub icon: &'a str,
|
|
47
48
|
pub children: &'a str,
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
1
|
+
import type { ElementType, ReactNode } from "react";
|
|
2
2
|
import Glyph from "./glyph";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export type NoticePanelProps = {
|
|
6
6
|
tone: string;
|
|
7
|
+
headingLevel: number;
|
|
7
8
|
title: string;
|
|
8
9
|
icon: string;
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
};
|
|
11
12
|
|
|
12
|
-
export default function NoticePanel({ tone, title, icon, children }: NoticePanelProps) {
|
|
13
|
+
export default function NoticePanel({ tone, headingLevel, title, icon, children }: NoticePanelProps) {
|
|
14
|
+
const Tag = `h${headingLevel}` as ElementType;
|
|
13
15
|
return (
|
|
14
16
|
<aside
|
|
15
17
|
className={`rounded-3xl border px-5 py-4 backdrop-blur-sm ${(tone === "calm") ? "border-sky-200 bg-sky-50/80" : ""} ${(tone === "urgent") ? "border-rose-200 bg-rose-50/80" : ""} ${(tone === "success") ? "border-emerald-200 bg-emerald-50/80" : ""}`}
|
|
@@ -26,11 +28,11 @@ export default function NoticePanel({ tone, title, icon, children }: NoticePanel
|
|
|
26
28
|
<div
|
|
27
29
|
className="min-w-0 flex-1"
|
|
28
30
|
>
|
|
29
|
-
<
|
|
31
|
+
<Tag
|
|
30
32
|
className="text-sm font-semibold tracking-tight"
|
|
31
33
|
>
|
|
32
34
|
{title}
|
|
33
|
-
</
|
|
35
|
+
</Tag>
|
|
34
36
|
<div
|
|
35
37
|
className="mt-2 text-sm leading-6 text-slate-700"
|
|
36
38
|
>
|
|
@@ -4,9 +4,9 @@ import Glyph from "./glyph";
|
|
|
4
4
|
|
|
5
5
|
export type ResourceTileProps = {
|
|
6
6
|
href: string;
|
|
7
|
-
title_html:
|
|
8
|
-
summary_html:
|
|
9
|
-
eyebrow_html?:
|
|
7
|
+
title_html: ReactNode;
|
|
8
|
+
summary_html: ReactNode;
|
|
9
|
+
eyebrow_html?: ReactNode;
|
|
10
10
|
icon: string;
|
|
11
11
|
selected: boolean;
|
|
12
12
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class='overflow-x-auto rounded-3xl border border-slate-200 bg-white'
|
|
3
|
+
>
|
|
4
|
+
<table
|
|
5
|
+
class='min-w-full divide-y divide-slate-200'
|
|
6
|
+
>
|
|
7
|
+
<thead>
|
|
8
|
+
<tr>
|
|
9
|
+
{% for cell in head %}
|
|
10
|
+
<th
|
|
11
|
+
class='bg-slate-50 px-4 py-3 text-left text-xs font-semibold uppercase tracking-[0.2em] text-slate-500'
|
|
12
|
+
>
|
|
13
|
+
{{ cell }}
|
|
14
|
+
</th>
|
|
15
|
+
{% endfor %}
|
|
16
|
+
</tr>
|
|
17
|
+
</thead>
|
|
18
|
+
<tbody>
|
|
19
|
+
{% for row in rows %}
|
|
20
|
+
<tr
|
|
21
|
+
class='odd:bg-white even:bg-slate-50/60'
|
|
22
|
+
>
|
|
23
|
+
{% for cell in row %}
|
|
24
|
+
<td
|
|
25
|
+
class='px-4 py-3 text-sm text-slate-700'
|
|
26
|
+
>
|
|
27
|
+
{{ cell }}
|
|
28
|
+
</td>
|
|
29
|
+
{% endfor %}
|
|
30
|
+
</tr>
|
|
31
|
+
{% endfor %}
|
|
32
|
+
</tbody>
|
|
33
|
+
</table>
|
|
34
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<figure
|
|
2
|
+
class='overflow-hidden rounded-[28px] border border-slate-200 bg-white shadow-sm'
|
|
3
|
+
>
|
|
4
|
+
{% if eyebrow != null %}
|
|
5
|
+
<div
|
|
6
|
+
class='border-b border-slate-200 px-5 py-3 text-[11px] font-semibold uppercase tracking-[0.28em] text-slate-500'
|
|
7
|
+
>
|
|
8
|
+
{{ eyebrow }}
|
|
9
|
+
</div>
|
|
10
|
+
{% endif %}
|
|
11
|
+
<div
|
|
12
|
+
class='bg-slate-50 p-4'
|
|
13
|
+
>
|
|
14
|
+
{{ children }}
|
|
15
|
+
</div>
|
|
16
|
+
{% if caption_html != null %}
|
|
17
|
+
<figcaption
|
|
18
|
+
class='border-t border-slate-200 px-5 py-4 text-sm leading-6 text-slate-600'
|
|
19
|
+
>
|
|
20
|
+
{{ caption_html }}
|
|
21
|
+
</figcaption>
|
|
22
|
+
{% endif %}
|
|
23
|
+
</figure>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<aside
|
|
2
|
+
class='rounded-3xl border px-5 py-4 backdrop-blur-sm {% if tone == "calm" %}border-sky-200 bg-sky-50/80{% endif %} {% if tone == "urgent" %}border-rose-200 bg-rose-50/80{% endif %} {% if tone == "success" %}border-emerald-200 bg-emerald-50/80{% endif %}'
|
|
3
|
+
>
|
|
4
|
+
<div
|
|
5
|
+
class='flex items-start gap-3'
|
|
6
|
+
>
|
|
7
|
+
{% render 'glyph', className: "mt-0.5 h-5 w-5 shrink-0", tone: tone, size: "18", name: icon %}
|
|
8
|
+
<div
|
|
9
|
+
class='min-w-0 flex-1'
|
|
10
|
+
>
|
|
11
|
+
<h{{ headingLevel }}
|
|
12
|
+
class='text-sm font-semibold tracking-tight'
|
|
13
|
+
>
|
|
14
|
+
{{ title }}
|
|
15
|
+
</h{{ headingLevel }}>
|
|
16
|
+
<div
|
|
17
|
+
class='mt-2 text-sm leading-6 text-slate-700'
|
|
18
|
+
>
|
|
19
|
+
{{ children }}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
{% if tone == "urgent" %}
|
|
24
|
+
<p
|
|
25
|
+
class='mt-3 text-xs font-medium uppercase tracking-[0.24em] text-rose-700'
|
|
26
|
+
>
|
|
27
|
+
Action recommended
|
|
28
|
+
</p>
|
|
29
|
+
{% endif %}
|
|
30
|
+
</aside>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<li
|
|
2
|
+
class='list-none'
|
|
3
|
+
role='option'
|
|
4
|
+
tabIndex='{{ -1 }}'
|
|
5
|
+
aria-selected='{{ selected }}'
|
|
6
|
+
>
|
|
7
|
+
<a
|
|
8
|
+
href='{{ href }}'
|
|
9
|
+
class='group block rounded-2xl border border-slate-200 bg-white p-4 transition hover:border-slate-300 hover:shadow-sm'
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class='flex items-start gap-3'
|
|
13
|
+
>
|
|
14
|
+
{% render 'glyph', className: "mt-0.5 h-5 w-5 shrink-0 text-slate-500", tone: "slate", size: "18", name: icon %}
|
|
15
|
+
<div
|
|
16
|
+
class='min-w-0 flex-1'
|
|
17
|
+
>
|
|
18
|
+
{% if eyebrow_html != null %}
|
|
19
|
+
<div
|
|
20
|
+
class='truncate text-xs font-medium uppercase tracking-[0.2em] text-slate-500'
|
|
21
|
+
>
|
|
22
|
+
{{ eyebrow_html }}
|
|
23
|
+
</div>
|
|
24
|
+
{% endif %}
|
|
25
|
+
<div
|
|
26
|
+
class='mt-1 truncate text-sm font-semibold text-slate-900'
|
|
27
|
+
>
|
|
28
|
+
{{ title_html }}
|
|
29
|
+
</div>
|
|
30
|
+
<p
|
|
31
|
+
class='mt-1 text-sm leading-6 text-slate-600'
|
|
32
|
+
>
|
|
33
|
+
{{ summary_html }}
|
|
34
|
+
</p>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</a>
|
|
38
|
+
</li>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { Fragment, type ReactNode } from "react";
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
export type ComparisonTableProps = {
|
|
5
|
-
head:
|
|
6
|
-
rows:
|
|
5
|
+
head: ReactNode[];
|
|
6
|
+
rows: ReactNode[][];
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export default function ComparisonTable({ head, rows }: ComparisonTableProps) {
|
|
@@ -17,33 +17,33 @@ export default function ComparisonTable({ head, rows }: ComparisonTableProps) {
|
|
|
17
17
|
<thead>
|
|
18
18
|
<tr>
|
|
19
19
|
{(head ?? []).map((cell, __index) => (
|
|
20
|
-
|
|
20
|
+
<Fragment key={__index}>
|
|
21
21
|
<th
|
|
22
22
|
className="bg-slate-50 px-4 py-3 text-left text-xs font-semibold uppercase tracking-[0.2em] text-slate-500"
|
|
23
23
|
>
|
|
24
24
|
{cell}
|
|
25
25
|
</th>
|
|
26
|
-
|
|
26
|
+
</Fragment>
|
|
27
27
|
))}
|
|
28
28
|
</tr>
|
|
29
29
|
</thead>
|
|
30
30
|
<tbody>
|
|
31
31
|
{(rows ?? []).map((row, __index) => (
|
|
32
|
-
|
|
32
|
+
<Fragment key={__index}>
|
|
33
33
|
<tr
|
|
34
34
|
className="odd:bg-white even:bg-slate-50/60"
|
|
35
35
|
>
|
|
36
36
|
{(row ?? []).map((cell, __index) => (
|
|
37
|
-
|
|
37
|
+
<Fragment key={__index}>
|
|
38
38
|
<td
|
|
39
39
|
className="px-4 py-3 text-sm text-slate-700"
|
|
40
40
|
>
|
|
41
41
|
{cell}
|
|
42
42
|
</td>
|
|
43
|
-
|
|
43
|
+
</Fragment>
|
|
44
44
|
))}
|
|
45
45
|
</tr>
|
|
46
|
-
|
|
46
|
+
</Fragment>
|
|
47
47
|
))}
|
|
48
48
|
</tbody>
|
|
49
49
|
</table>
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
1
|
+
import type { ElementType, ReactNode } from "react";
|
|
2
2
|
import Glyph from "./glyph";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export type NoticePanelProps = {
|
|
6
6
|
tone: string;
|
|
7
|
+
headingLevel: number;
|
|
7
8
|
title: string;
|
|
8
9
|
icon: string;
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
};
|
|
11
12
|
|
|
12
|
-
export default function NoticePanel({ tone, title, icon, children }: NoticePanelProps) {
|
|
13
|
+
export default function NoticePanel({ tone, headingLevel, title, icon, children }: NoticePanelProps) {
|
|
14
|
+
const Tag = `h${headingLevel}` as ElementType;
|
|
13
15
|
return (
|
|
14
16
|
<aside
|
|
15
17
|
className={["rounded-3xl border px-5 py-4 backdrop-blur-sm", (tone === "calm") ? "border-sky-200 bg-sky-50/80" : null, (tone === "urgent") ? "border-rose-200 bg-rose-50/80" : null, (tone === "success") ? "border-emerald-200 bg-emerald-50/80" : null].filter(Boolean).join(" ")}
|
|
@@ -26,11 +28,11 @@ export default function NoticePanel({ tone, title, icon, children }: NoticePanel
|
|
|
26
28
|
<div
|
|
27
29
|
className="min-w-0 flex-1"
|
|
28
30
|
>
|
|
29
|
-
<
|
|
31
|
+
<Tag
|
|
30
32
|
className="text-sm font-semibold tracking-tight"
|
|
31
33
|
>
|
|
32
34
|
{title}
|
|
33
|
-
</
|
|
35
|
+
</Tag>
|
|
34
36
|
<div
|
|
35
37
|
className="mt-2 text-sm leading-6 text-slate-700"
|
|
36
38
|
>
|
|
@@ -4,9 +4,9 @@ import Glyph from "./glyph";
|
|
|
4
4
|
|
|
5
5
|
export type ResourceTileProps = {
|
|
6
6
|
href: string;
|
|
7
|
-
title_html:
|
|
8
|
-
summary_html:
|
|
9
|
-
eyebrow_html?:
|
|
7
|
+
title_html: ReactNode;
|
|
8
|
+
summary_html: ReactNode;
|
|
9
|
+
eyebrow_html?: ReactNode;
|
|
10
10
|
icon: string;
|
|
11
11
|
selected: boolean;
|
|
12
12
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { For,
|
|
1
|
+
import { For, type TemplateNode } from "@relevate/katachi";
|
|
2
2
|
|
|
3
3
|
export type Props = {
|
|
4
|
-
head:
|
|
5
|
-
rows:
|
|
4
|
+
head: TemplateNode[];
|
|
5
|
+
rows: TemplateNode[][];
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export default function ComparisonTable({ head, rows }: Props) {
|
|
@@ -13,7 +13,7 @@ export default function ComparisonTable({ head, rows }: Props) {
|
|
|
13
13
|
<tr>
|
|
14
14
|
<For each={head} as="cell">
|
|
15
15
|
<th className="bg-slate-50 px-4 py-3 text-left text-xs font-semibold uppercase tracking-[0.2em] text-slate-500">
|
|
16
|
-
{
|
|
16
|
+
{cell}
|
|
17
17
|
</th>
|
|
18
18
|
</For>
|
|
19
19
|
</tr>
|
|
@@ -23,7 +23,7 @@ export default function ComparisonTable({ head, rows }: Props) {
|
|
|
23
23
|
<tr className="odd:bg-white even:bg-slate-50/60">
|
|
24
24
|
<For each={row} as="cell">
|
|
25
25
|
<td className="px-4 py-3 text-sm text-slate-700">
|
|
26
|
-
{
|
|
26
|
+
{cell}
|
|
27
27
|
</td>
|
|
28
28
|
</For>
|
|
29
29
|
</tr>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { If,
|
|
1
|
+
import { If, type TemplateNode } from "@relevate/katachi";
|
|
2
2
|
|
|
3
3
|
export type Props = {
|
|
4
4
|
eyebrow?: string;
|
|
5
|
-
caption_html?:
|
|
5
|
+
caption_html?: TemplateNode;
|
|
6
6
|
children?: TemplateNode;
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ export default function MediaFrame({ eyebrow, caption_html, children }: Props) {
|
|
|
17
17
|
<div className="bg-slate-50 p-4">{children}</div>
|
|
18
18
|
<If test={caption_html != null}>
|
|
19
19
|
<figcaption className="border-t border-slate-200 px-5 py-4 text-sm leading-6 text-slate-600">
|
|
20
|
-
{
|
|
20
|
+
{caption_html}
|
|
21
21
|
</figcaption>
|
|
22
22
|
</If>
|
|
23
23
|
</figure>
|
|
@@ -1,40 +1,54 @@
|
|
|
1
|
-
import { If, type TemplateNode } from "@relevate/katachi";
|
|
1
|
+
import { Element, If, type TemplateNode } from "@relevate/katachi";
|
|
2
2
|
import Glyph from "./glyph.template";
|
|
3
3
|
|
|
4
4
|
export type Props = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
tone: "calm" | "urgent" | "success";
|
|
6
|
+
headingLevel: number;
|
|
7
|
+
title: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
children?: TemplateNode;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
|
-
export default function NoticePanel({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
12
|
+
export default function NoticePanel({
|
|
13
|
+
tone,
|
|
14
|
+
headingLevel,
|
|
15
|
+
title,
|
|
16
|
+
icon,
|
|
17
|
+
children,
|
|
18
|
+
}: Props) {
|
|
19
|
+
return (
|
|
20
|
+
<aside
|
|
21
|
+
className={[
|
|
22
|
+
"rounded-3xl border px-5 py-4 backdrop-blur-sm",
|
|
23
|
+
tone == "calm" && "border-sky-200 bg-sky-50/80",
|
|
24
|
+
tone == "urgent" && "border-rose-200 bg-rose-50/80",
|
|
25
|
+
tone == "success" && "border-emerald-200 bg-emerald-50/80",
|
|
26
|
+
]}
|
|
27
|
+
>
|
|
28
|
+
<div className="flex items-start gap-3">
|
|
29
|
+
<Glyph
|
|
30
|
+
className="mt-0.5 h-5 w-5 shrink-0"
|
|
31
|
+
tone={tone}
|
|
32
|
+
size="18"
|
|
33
|
+
name={icon}
|
|
34
|
+
/>
|
|
35
|
+
<div className="min-w-0 flex-1">
|
|
36
|
+
<Element
|
|
37
|
+
tag={["h", headingLevel]}
|
|
38
|
+
className="text-sm font-semibold tracking-tight"
|
|
39
|
+
>
|
|
40
|
+
{title}
|
|
41
|
+
</Element>
|
|
42
|
+
<div className="mt-2 text-sm leading-6 text-slate-700">
|
|
43
|
+
{children}
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<If test={tone == "urgent"}>
|
|
48
|
+
<p className="mt-3 text-xs font-medium uppercase tracking-[0.24em] text-rose-700">
|
|
49
|
+
Action recommended
|
|
50
|
+
</p>
|
|
51
|
+
</If>
|
|
52
|
+
</aside>
|
|
53
|
+
);
|
|
40
54
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { If,
|
|
1
|
+
import { If, type TemplateNode } from "@relevate/katachi";
|
|
2
2
|
import Glyph from "./glyph.template";
|
|
3
3
|
|
|
4
4
|
export type Props = {
|
|
5
5
|
href: string;
|
|
6
|
-
title_html:
|
|
7
|
-
summary_html:
|
|
8
|
-
eyebrow_html?:
|
|
6
|
+
title_html: TemplateNode;
|
|
7
|
+
summary_html: TemplateNode;
|
|
8
|
+
eyebrow_html?: TemplateNode;
|
|
9
9
|
icon: string;
|
|
10
10
|
selected: boolean;
|
|
11
11
|
};
|
|
@@ -34,14 +34,14 @@ export default function ResourceTile({
|
|
|
34
34
|
<div className="min-w-0 flex-1">
|
|
35
35
|
<If test={eyebrow_html != null}>
|
|
36
36
|
<div className="truncate text-xs font-medium uppercase tracking-[0.2em] text-slate-500">
|
|
37
|
-
{
|
|
37
|
+
{eyebrow_html}
|
|
38
38
|
</div>
|
|
39
39
|
</If>
|
|
40
40
|
<div className="mt-1 truncate text-sm font-semibold text-slate-900">
|
|
41
|
-
{
|
|
41
|
+
{title_html}
|
|
42
42
|
</div>
|
|
43
43
|
<p className="mt-1 text-sm leading-6 text-slate-600">
|
|
44
|
-
{
|
|
44
|
+
{summary_html}
|
|
45
45
|
</p>
|
|
46
46
|
</div>
|
|
47
47
|
</div>
|