@godxjp/ui 31.27.0 → 31.28.1
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/agent/START-HERE.md +7 -7
- package/agent/components/BlockEditor.json +8 -0
- package/agent/components/CommandPalette.json +5 -0
- package/agent/components/EmojiPicker.json +78 -0
- package/agent/components/Markdown.json +11 -0
- package/agent/components/PageContainer.json +11 -1
- package/agent/components/PageCover.json +75 -0
- package/agent/components/Tree.json +6 -0
- package/agent/components-index.json +10 -0
- package/agent/components.json +194 -1
- package/agent/index.json +8 -8
- package/agent/llms.txt +7 -7
- package/agent/tokens.json +79 -1
- package/dist/components/data-display/tree.js +5 -0
- package/dist/components/data-entry/command-palette.d.ts +5 -0
- package/dist/components/data-entry/command-palette.js +1 -0
- package/dist/components/data-entry/emoji-data.d.ts +43 -0
- package/dist/components/data-entry/emoji-data.js +54 -0
- package/dist/components/data-entry/emoji-picker.d.ts +13 -0
- package/dist/components/data-entry/emoji-picker.js +272 -0
- package/dist/components/data-entry/index.d.ts +2 -0
- package/dist/components/data-entry/index.js +2 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/layout/page-container.d.ts +1 -1
- package/dist/components/layout/page-container.js +8 -1
- package/dist/components/layout/page-cover.d.ts +14 -0
- package/dist/components/layout/page-cover.js +127 -0
- package/dist/contracts/measurement.json +1 -1
- package/dist/i18n/messages/en.json +25 -0
- package/dist/i18n/messages/ja.json +25 -0
- package/dist/i18n/messages/vi.json +25 -0
- package/dist/props/components/data-display.prop.d.ts +6 -0
- package/dist/props/components/data-entry.prop.d.ts +26 -0
- package/dist/props/components/layout.prop.d.ts +49 -2
- package/dist/props/registry.d.ts +85 -1
- package/dist/props/registry.js +95 -1
- package/dist/styles/control.css +81 -0
- package/dist/styles/data-display-layout.css +94 -0
- package/dist/styles/focus-ring.css +2 -0
- package/dist/styles/layers.json +17 -1
- package/dist/styles/layout.css +113 -0
- package/dist/tokens/components/control.css +10 -0
- package/dist/tokens/components/data-display.css +1 -0
- package/dist/tokens/semantic/layout.css +14 -0
- package/docs/FORMS.md +5 -0
- package/docs/FRAME-COVERAGE-REPORT.md +4 -2
- package/docs/data-entry/emoji-picker.tsx +35 -0
- package/docs/i18n/messages/en.json +16 -0
- package/docs/i18n/messages/ja.json +16 -0
- package/docs/i18n/messages/vi.json +16 -0
- package/docs/layout/page-cover.tsx +56 -0
- package/package.json +5 -6
|
@@ -1615,5 +1615,21 @@
|
|
|
1615
1615
|
"setup": "Cài đặt",
|
|
1616
1616
|
"release": "Các bước phát hành"
|
|
1617
1617
|
}
|
|
1618
|
+
},
|
|
1619
|
+
"pageCoverDocs": {
|
|
1620
|
+
"title": "Ghi chú kế hoạch quý",
|
|
1621
|
+
"icon": "Biểu tượng trang",
|
|
1622
|
+
"reposition": "Chỉnh vị trí",
|
|
1623
|
+
"done": "Xong",
|
|
1624
|
+
"body": "Khi đang chỉnh vị trí, kéo ảnh bìa hoặc dùng phím mũi tên; bấm biểu tượng để mở bộ chọn emoji.",
|
|
1625
|
+
"position": "Tiêu điểm: {value}% tính từ trên"
|
|
1626
|
+
},
|
|
1627
|
+
"emojiPickerDocs": {
|
|
1628
|
+
"subtitle": "Tìm theo ngôn ngữ · danh mục · dùng gần đây · điều khiển bằng bàn phím",
|
|
1629
|
+
"title": "Chọn biểu tượng trang",
|
|
1630
|
+
"description": "Gõ từ khoá theo ngôn ngữ hiện tại hoặc duyệt danh mục. Phím mũi tên để di chuyển, Enter để chọn.",
|
|
1631
|
+
"label": "Biểu tượng",
|
|
1632
|
+
"chosen": "Đã chọn: {icon}",
|
|
1633
|
+
"none": "Không có biểu tượng"
|
|
1618
1634
|
}
|
|
1619
1635
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Prose } from "@godxjp/ui/data-display";
|
|
3
|
+
import { EmojiPicker } from "@godxjp/ui/data-entry";
|
|
4
|
+
import { Button, Text } from "@godxjp/ui/general";
|
|
5
|
+
import { useTranslation } from "@godxjp/ui/i18n";
|
|
6
|
+
import { PageContainer, PageCover } from "@godxjp/ui/layout";
|
|
7
|
+
|
|
8
|
+
import shot from "../assets/shot-landscape.svg";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* PageCover + PageContainer `icon` / headerScale="display" (gh#1160) — a Notion / note.com page:
|
|
12
|
+
* a banner cover you can reposition (drag, or the arrow keys while repositioning), the page icon
|
|
13
|
+
* over its edge (chosen with EmojiPicker), and the article's display-size title.
|
|
14
|
+
*/
|
|
15
|
+
export default function Demo() {
|
|
16
|
+
const { t } = useTranslation();
|
|
17
|
+
const [y, setY] = React.useState(40);
|
|
18
|
+
const [moving, setMoving] = React.useState(false);
|
|
19
|
+
const [icon, setIcon] = React.useState<string | null>("📘");
|
|
20
|
+
return (
|
|
21
|
+
<PageContainer
|
|
22
|
+
title={t("pageCoverDocs.title")}
|
|
23
|
+
headerScale="display"
|
|
24
|
+
icon={
|
|
25
|
+
<EmojiPicker
|
|
26
|
+
value={icon}
|
|
27
|
+
onValueChange={setIcon}
|
|
28
|
+
size="lg"
|
|
29
|
+
aria-label={t("pageCoverDocs.icon")}
|
|
30
|
+
/>
|
|
31
|
+
}
|
|
32
|
+
cover={
|
|
33
|
+
<PageCover
|
|
34
|
+
src={shot}
|
|
35
|
+
alt=""
|
|
36
|
+
positionY={y}
|
|
37
|
+
onPositionChange={setY}
|
|
38
|
+
repositioning={moving}
|
|
39
|
+
onRepositioningChange={setMoving}
|
|
40
|
+
actions={
|
|
41
|
+
<Button size="sm" variant="secondary" onClick={() => setMoving((m) => !m)}>
|
|
42
|
+
{moving ? t("pageCoverDocs.done") : t("pageCoverDocs.reposition")}
|
|
43
|
+
</Button>
|
|
44
|
+
}
|
|
45
|
+
/>
|
|
46
|
+
}
|
|
47
|
+
>
|
|
48
|
+
<Prose measure="medium">
|
|
49
|
+
<p>{t("pageCoverDocs.body")}</p>
|
|
50
|
+
</Prose>
|
|
51
|
+
<Text size="sm" tone="muted">
|
|
52
|
+
{t("pageCoverDocs.position", { value: y })}
|
|
53
|
+
</Text>
|
|
54
|
+
</PageContainer>
|
|
55
|
+
);
|
|
56
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@godxjp/ui",
|
|
3
|
-
"version": "31.
|
|
4
|
-
"godxUiMcp": "31.
|
|
3
|
+
"version": "31.28.1",
|
|
4
|
+
"godxUiMcp": "31.28.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -438,7 +438,6 @@
|
|
|
438
438
|
"check:frame-token-scope": "node scripts/check-frame-token-scope.mjs"
|
|
439
439
|
},
|
|
440
440
|
"peerDependencies": {
|
|
441
|
-
"@hookform/resolvers": "^5.2.0",
|
|
442
441
|
"@tanstack/react-query": ">=5.0.0",
|
|
443
442
|
"playwright": "*",
|
|
444
443
|
"react": ">=19.0.0",
|
|
@@ -450,9 +449,6 @@
|
|
|
450
449
|
"zod": "^4.4.0"
|
|
451
450
|
},
|
|
452
451
|
"peerDependenciesMeta": {
|
|
453
|
-
"@hookform/resolvers": {
|
|
454
|
-
"optional": true
|
|
455
|
-
},
|
|
456
452
|
"@tanstack/react-query": {
|
|
457
453
|
"optional": true
|
|
458
454
|
},
|
|
@@ -483,6 +479,7 @@
|
|
|
483
479
|
"cmdk": "^1.1.1",
|
|
484
480
|
"date-fns": "^4.1.0",
|
|
485
481
|
"embla-carousel-react": "^8.6.0",
|
|
482
|
+
"emojibase-data": "^17.0.0",
|
|
486
483
|
"input-otp": "^1.5.0",
|
|
487
484
|
"lucide-react": "^1.37.0",
|
|
488
485
|
"qrcode.react": "4.2.0",
|
|
@@ -546,11 +543,13 @@
|
|
|
546
543
|
"jsqr": "^1.4.0",
|
|
547
544
|
"mdast-util-directive": "^3.1.1",
|
|
548
545
|
"mdast-util-from-markdown": "^2.1.0",
|
|
546
|
+
"mdast-util-frontmatter": "^2.0.1",
|
|
549
547
|
"mdast-util-gfm": "^3.1.0",
|
|
550
548
|
"mdast-util-to-markdown": "^2.2.0",
|
|
551
549
|
"mermaid": "^11.17.2",
|
|
552
550
|
"micromark-extension-cjk-friendly": "^2.0.2",
|
|
553
551
|
"micromark-extension-directive": "^4.0.0",
|
|
552
|
+
"micromark-extension-frontmatter": "^2.0.0",
|
|
554
553
|
"micromark-extension-gfm": "^3.0.0",
|
|
555
554
|
"micromark-util-types": "^2.0.3",
|
|
556
555
|
"playwright": "^1.62.1",
|