@krizaka/ui 2.9.0 → 3.0.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 +44 -6
- package/dist/audio-player.js +1 -1
- package/dist/blocks.css +247 -0
- package/dist/catalogue-page.d.ts +34 -0
- package/dist/catalogue-page.js +26 -0
- package/dist/catalogue-page.js.map +1 -0
- package/dist/changelog-page.d.ts +50 -0
- package/dist/changelog-page.js +27 -0
- package/dist/changelog-page.js.map +1 -0
- package/dist/{chunk-EUPTXKH7.js → chunk-BRKMQ6JV.js} +2 -1
- package/dist/chunk-FDCMBWUU.js +168 -0
- package/dist/chunk-FDCMBWUU.js.map +1 -0
- package/dist/chunk-HCNOOPZE.js +210 -0
- package/dist/chunk-HCNOOPZE.js.map +1 -0
- package/dist/{chunk-NOVUREEC.js → chunk-JZPVUJIX.js} +25 -3
- package/dist/chunk-JZPVUJIX.js.map +1 -0
- package/dist/chunk-KNBYZGSQ.js +11 -0
- package/dist/chunk-KNBYZGSQ.js.map +1 -0
- package/dist/{chunk-X6TW3X6Y.js → chunk-LCZXS6AK.js} +2 -2
- package/dist/chunk-OGJI5X4W.js +157 -0
- package/dist/chunk-OGJI5X4W.js.map +1 -0
- package/dist/combobox.js +2 -2
- package/dist/component-page.d.ts +41 -0
- package/dist/component-page.js +17 -0
- package/dist/component-page.js.map +1 -0
- package/dist/contact-page.d.ts +31 -0
- package/dist/contact-page.js +26 -0
- package/dist/contact-page.js.map +1 -0
- package/dist/data-table.d.ts +284 -24
- package/dist/data-table.js +914 -121
- package/dist/data-table.js.map +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/docs-article-page.d.ts +54 -0
- package/dist/docs-article-page.js +29 -0
- package/dist/docs-article-page.js.map +1 -0
- package/dist/docs-hub-page.d.ts +72 -0
- package/dist/docs-hub-page.js +45 -0
- package/dist/docs-hub-page.js.map +1 -0
- package/dist/error-page.d.ts +22 -0
- package/dist/error-page.js +23 -0
- package/dist/error-page.js.map +1 -0
- package/dist/filter-bar.d.ts +12 -12
- package/dist/filter-bar.js +9 -145
- package/dist/filter-bar.js.map +1 -1
- package/dist/gallery-page.d.ts +50 -0
- package/dist/gallery-page.js +30 -0
- package/dist/gallery-page.js.map +1 -0
- package/dist/{geometry-CXrAW34x.d.ts → geometry-CbOU4rtL.d.ts} +4 -4
- package/dist/how-it-works-page.d.ts +48 -0
- package/dist/how-it-works-page.js +28 -0
- package/dist/how-it-works-page.js.map +1 -0
- package/dist/image-cropper.js +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.js +93 -5
- package/dist/index.js.map +1 -1
- package/dist/landing-page.d.ts +58 -0
- package/dist/landing-page.js +42 -0
- package/dist/landing-page.js.map +1 -0
- package/dist/legal-page.d.ts +34 -0
- package/dist/legal-page.js +18 -0
- package/dist/legal-page.js.map +1 -0
- package/dist/longform-page.d.ts +42 -0
- package/dist/longform-page.js +29 -0
- package/dist/longform-page.js.map +1 -0
- package/dist/mascot-quote.d.ts +4 -4
- package/dist/mascot-quote.js +23 -1
- package/dist/mascot-quote.js.map +1 -1
- package/dist/mascot-state.d.ts +2 -2
- package/dist/mascot-state.js +1 -1
- package/dist/mascot-state.js.map +1 -1
- package/dist/mascots.d.ts +4 -4
- package/dist/mascots.js +1 -1
- package/dist/media-capture.js +1 -1
- package/dist/native/list.d.ts +95 -0
- package/dist/native/list.js +135 -0
- package/dist/native/list.js.map +1 -0
- package/dist/native.d.ts +16 -9
- package/dist/native.js +183 -74
- package/dist/native.js.map +1 -1
- package/dist/pricing-page.d.ts +62 -0
- package/dist/pricing-page.js +71 -0
- package/dist/pricing-page.js.map +1 -0
- package/dist/product-page.d.ts +83 -0
- package/dist/product-page.js +60 -0
- package/dist/product-page.js.map +1 -0
- package/dist/search-field.js +6 -160
- package/dist/search-field.js.map +1 -1
- package/dist/status-page.d.ts +42 -0
- package/dist/status-page.js +28 -0
- package/dist/status-page.js.map +1 -0
- package/dist/tag-input.js +2 -2
- package/dist/video-player.js +1 -1
- package/dist/video-trimmer.js +1 -1
- package/dist/virtual.d.ts +140 -0
- package/dist/virtual.js +19 -0
- package/dist/virtual.js.map +1 -0
- package/package.json +296 -10
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +240 -0
- package/registry/changelog-page.json +226 -0
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/component-page.json +227 -0
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +212 -0
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +643 -49
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +242 -0
- package/registry/docs-hub-page.json +270 -0
- package/registry/docs-layout.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +183 -0
- package/registry/examples/catalogue-page/components.d.ts +4 -0
- package/registry/examples/catalogue-page/components.js +33 -0
- package/registry/examples/catalogue-page/components.tsx +36 -0
- package/registry/examples/changelog-page/releases.d.ts +4 -0
- package/registry/examples/changelog-page/releases.js +44 -0
- package/registry/examples/changelog-page/releases.tsx +39 -0
- package/registry/examples/component-page/button.d.ts +4 -0
- package/registry/examples/component-page/button.js +33 -0
- package/registry/examples/component-page/button.tsx +30 -0
- package/registry/examples/contact-page/team.d.ts +4 -0
- package/registry/examples/contact-page/team.js +39 -0
- package/registry/examples/contact-page/team.tsx +38 -0
- package/registry/examples/data-table/details.d.ts +4 -0
- package/registry/examples/data-table/details.js +33 -0
- package/registry/examples/data-table/details.tsx +31 -0
- package/registry/examples/data-table/filters.d.ts +4 -0
- package/registry/examples/data-table/filters.js +40 -0
- package/registry/examples/data-table/filters.tsx +40 -0
- package/registry/examples/data-table/grouped.d.ts +4 -0
- package/registry/examples/data-table/grouped.js +24 -0
- package/registry/examples/data-table/grouped.tsx +23 -0
- package/registry/examples/data-table/paginated.d.ts +4 -0
- package/registry/examples/data-table/paginated.js +23 -0
- package/registry/examples/data-table/paginated.tsx +22 -0
- package/registry/examples/data-table/pinned.d.ts +4 -0
- package/registry/examples/data-table/pinned.js +26 -0
- package/registry/examples/data-table/pinned.tsx +25 -0
- package/registry/examples/data-table/server.d.ts +4 -0
- package/registry/examples/data-table/server.js +40 -0
- package/registry/examples/data-table/server.tsx +40 -0
- package/registry/examples/data-table/virtualized.js +2 -2
- package/registry/examples/data-table/virtualized.tsx +3 -3
- package/registry/examples/docs-article-page/cli.d.ts +4 -0
- package/registry/examples/docs-article-page/cli.js +33 -0
- package/registry/examples/docs-article-page/cli.tsx +38 -0
- package/registry/examples/docs-hub-page/krizaka.d.ts +4 -0
- package/registry/examples/docs-hub-page/krizaka.js +46 -0
- package/registry/examples/docs-hub-page/krizaka.tsx +37 -0
- package/registry/examples/error-page/not-found.d.ts +4 -0
- package/registry/examples/error-page/not-found.js +24 -0
- package/registry/examples/error-page/not-found.tsx +19 -0
- package/registry/examples/gallery-page/made-here.d.ts +4 -0
- package/registry/examples/gallery-page/made-here.js +34 -0
- package/registry/examples/gallery-page/made-here.tsx +32 -0
- package/registry/examples/how-it-works-page/orazaka.d.ts +4 -0
- package/registry/examples/how-it-works-page/orazaka.js +30 -0
- package/registry/examples/how-it-works-page/orazaka.tsx +26 -0
- package/registry/examples/landing-page/krizaka.d.ts +4 -0
- package/registry/examples/landing-page/krizaka.js +44 -0
- package/registry/examples/landing-page/krizaka.tsx +44 -0
- package/registry/examples/legal-page/privacy.d.ts +4 -0
- package/registry/examples/legal-page/privacy.js +24 -0
- package/registry/examples/legal-page/privacy.tsx +19 -0
- package/registry/examples/list/native/default.d.ts +4 -0
- package/registry/examples/list/native/default.dark.png +0 -0
- package/registry/examples/list/native/default.js +33 -0
- package/registry/examples/list/native/default.light.png +0 -0
- package/registry/examples/list/native/default.tsx +31 -0
- package/registry/examples/list/native/infinite.d.ts +4 -0
- package/registry/examples/list/native/infinite.dark.png +0 -0
- package/registry/examples/list/native/infinite.js +30 -0
- package/registry/examples/list/native/infinite.light.png +0 -0
- package/registry/examples/list/native/infinite.tsx +35 -0
- package/registry/examples/list/native/states.d.ts +4 -0
- package/registry/examples/list/native/states.dark.png +0 -0
- package/registry/examples/list/native/states.js +26 -0
- package/registry/examples/list/native/states.light.png +0 -0
- package/registry/examples/list/native/states.tsx +21 -0
- package/registry/examples/longform-page/story.d.ts +4 -0
- package/registry/examples/longform-page/story.js +38 -0
- package/registry/examples/longform-page/story.tsx +35 -0
- package/registry/examples/mascots/crane.d.ts +4 -0
- package/registry/examples/mascots/crane.js +19 -0
- package/registry/examples/mascots/crane.tsx +18 -0
- package/registry/examples/mascots/flock.tsx +2 -1
- package/registry/examples/mascots/native/crane.d.ts +4 -0
- package/registry/examples/mascots/native/crane.dark.png +0 -0
- package/registry/examples/mascots/native/crane.js +21 -0
- package/registry/examples/mascots/native/crane.light.png +0 -0
- package/registry/examples/mascots/native/crane.tsx +18 -0
- package/registry/examples/pricing-page/credits.d.ts +4 -0
- package/registry/examples/pricing-page/credits.js +41 -0
- package/registry/examples/pricing-page/credits.tsx +33 -0
- package/registry/examples/product-page/orazaka.d.ts +4 -0
- package/registry/examples/product-page/orazaka.js +44 -0
- package/registry/examples/product-page/orazaka.tsx +36 -0
- package/registry/examples/status-page/building.d.ts +4 -0
- package/registry/examples/status-page/building.js +29 -0
- package/registry/examples/status-page/building.tsx +25 -0
- package/registry/examples/status-page/operational.d.ts +4 -0
- package/registry/examples/status-page/operational.js +26 -0
- package/registry/examples/status-page/operational.tsx +20 -0
- package/registry/examples/virtual/feed.d.ts +4 -0
- package/registry/examples/virtual/feed.js +26 -0
- package/registry/examples/virtual/feed.tsx +24 -0
- package/registry/examples/virtual/gallery.d.ts +4 -0
- package/registry/examples/virtual/gallery.js +31 -0
- package/registry/examples/virtual/gallery.tsx +28 -0
- package/registry/examples/virtual/messages.d.ts +4 -0
- package/registry/examples/virtual/messages.js +28 -0
- package/registry/examples/virtual/messages.tsx +28 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/gallery-page.json +256 -0
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +242 -0
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +356 -9
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +242 -0
- package/registry/landscape.json +1 -1
- package/registry/legal-page.json +199 -0
- package/registry/link-card.json +1 -1
- package/registry/list.json +249 -0
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +213 -0
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +6 -6
- package/registry/mascot-state.json +34 -34
- package/registry/mascots.json +41 -21
- package/registry/media-capture.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +245 -0
- package/registry/product-page.json +319 -0
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +263 -0
- package/registry/stepper.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +569 -0
- package/skills/data-table/SKILL.md +56 -0
- package/skills/native-list/SKILL.md +39 -0
- package/skills/virtual/SKILL.md +35 -0
- package/dist/chunk-NOVUREEC.js.map +0 -1
- /package/dist/{chunk-EUPTXKH7.js.map → chunk-BRKMQ6JV.js.map} +0 -0
- /package/dist/{chunk-X6TW3X6Y.js.map → chunk-LCZXS6AK.js.map} +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "error-page",
|
|
3
|
+
"type": "primitive",
|
|
4
|
+
"title": "Error page",
|
|
5
|
+
"summary": "When a page is not there: the code drawn huge, the bird that lost its way, one sentence, a search and the ways back — never a dead end.",
|
|
6
|
+
"description": "When a page is not there: the code drawn huge, the bird that lost its way, one sentence, a search and the ways back — never a dead end.",
|
|
7
|
+
"status": "beta",
|
|
8
|
+
"category": "templates",
|
|
9
|
+
"platforms": "web",
|
|
10
|
+
"whenToUse": [
|
|
11
|
+
"Not found (404), server error (500), offline.",
|
|
12
|
+
"Any page that cannot show what was asked."
|
|
13
|
+
],
|
|
14
|
+
"whenNotToUse": [
|
|
15
|
+
{
|
|
16
|
+
"when": "For something not built yet.",
|
|
17
|
+
"use": "status-page"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "For an empty list inside a page.",
|
|
21
|
+
"use": "empty-state"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"bestPractices": [
|
|
25
|
+
"The title says it in words; the code is drawn, not read.",
|
|
26
|
+
"Offer a search and two or three ways back.",
|
|
27
|
+
"Words and content arrive as props; the motion is the platform's (`[data-reveal]`, still under reduced motion)."
|
|
28
|
+
],
|
|
29
|
+
"accessibility": {
|
|
30
|
+
"keyboard": [],
|
|
31
|
+
"notes": [
|
|
32
|
+
"The code is hidden from assistive technology; the `h1` says what happened.",
|
|
33
|
+
"The ways back are a named list of links."
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"related": [
|
|
37
|
+
"status-page",
|
|
38
|
+
"search-field",
|
|
39
|
+
"action-bar"
|
|
40
|
+
],
|
|
41
|
+
"web": {
|
|
42
|
+
"entry": "@krizaka/ui/error-page",
|
|
43
|
+
"import": "import { ErrorPage } from \"@krizaka/ui/error-page\";",
|
|
44
|
+
"props": [
|
|
45
|
+
{
|
|
46
|
+
"component": "ErrorPage",
|
|
47
|
+
"description": "An error page: the code drawn, the bird, a sentence, a search and the ways back.",
|
|
48
|
+
"props": [
|
|
49
|
+
{
|
|
50
|
+
"name": "code",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"default": null,
|
|
53
|
+
"description": "The code (`404`, `500`): drawn, not read — the title says it in words.",
|
|
54
|
+
"required": true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "title",
|
|
58
|
+
"type": "ReactNode",
|
|
59
|
+
"default": null,
|
|
60
|
+
"description": "The page's `h1` (`This page took another road`).",
|
|
61
|
+
"required": true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "actions",
|
|
65
|
+
"type": "ReactNode",
|
|
66
|
+
"default": null,
|
|
67
|
+
"description": "The ways back (an ActionBar: home, the docs, contact).",
|
|
68
|
+
"required": false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "mascot",
|
|
72
|
+
"type": "ReactNode",
|
|
73
|
+
"default": null,
|
|
74
|
+
"description": "The bird beside the code (a Mascot in its `empty` or `error` mood).",
|
|
75
|
+
"required": false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "search",
|
|
79
|
+
"type": "ReactNode",
|
|
80
|
+
"default": null,
|
|
81
|
+
"description": "A search, to find what was meant.",
|
|
82
|
+
"required": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "text",
|
|
86
|
+
"type": "ReactNode",
|
|
87
|
+
"default": null,
|
|
88
|
+
"description": "What happened and what to do, in one or two sentences.",
|
|
89
|
+
"required": false
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"examples": [
|
|
95
|
+
{
|
|
96
|
+
"name": "not-found",
|
|
97
|
+
"title": "Not found",
|
|
98
|
+
"description": "The pigeon, a search and three ways back.",
|
|
99
|
+
"template": true,
|
|
100
|
+
"path": "examples/error-page/not-found.tsx",
|
|
101
|
+
"module": "@krizaka/ui/registry/examples/error-page/not-found",
|
|
102
|
+
"code": "import { ActionBar } from \"@krizaka/ui/action-bar\";\nimport { ErrorPage } from \"@krizaka/ui/error-page\";\nimport { Mascot } from \"@krizaka/ui/mascots\";\nimport { SearchField } from \"@krizaka/ui/search-field\";\n\n// TEMPLATE — a page that is not there: the code drawn, the pigeon that lost its way, one sentence, a search, the ways\n// back. Never a dead end.\nexport default function ErrorPageNotFound() {\n return (\n <ErrorPage\n code=\"404\"\n mascot={<Mascot bird=\"pigeon\" mood=\"empty\" size={96} />}\n title=\"This page took another road\"\n text=\"The address may have changed. Search for it, or start again from one of these.\"\n search={<SearchField label=\"Search the site\" placeholder=\"Search…\" />}\n actions={<ActionBar label=\"Ways back\" primaryFirst actions={[{ href: \"#home\", label: \"Home\" }, { href: \"#docs\", label: \"Documentation\" }, { href: \"#contact\", label: \"Contact\" }]} />}\n />\n );\n}\n"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"native": null,
|
|
107
|
+
"files": [
|
|
108
|
+
{
|
|
109
|
+
"path": "error-page/error-page.tsx",
|
|
110
|
+
"content": "// Server-safe. When a page is not there (blocks.css `.kz-tpl-error`): the code drawn huge in outline, the bird that\n// lost its way beside it, one sentence, a search, and the ways back — never a dead end. The same frame as every page.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type ErrorPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The code (`404`, `500`): drawn, not read — the title says it in words. */\n code: string;\n /** The bird beside the code (a Mascot in its `empty` or `error` mood). */\n mascot?: React.ReactNode;\n /** The page's `h1` (`This page took another road`). */\n title: React.ReactNode;\n /** What happened and what to do, in one or two sentences. */\n text?: React.ReactNode;\n /** A search, to find what was meant. */\n search?: React.ReactNode;\n /** The ways back (an ActionBar: home, the docs, contact). */\n actions?: React.ReactNode;\n /** Under the actions: the most visited pages. */\n children?: React.ReactNode;\n};\n\n/** An error page: the code drawn, the bird, a sentence, a search and the ways back. */\nexport function ErrorPage({ code, mascot, title, text, search, actions, className, children, ...props }: ErrorPageProps) {\n return (\n <div className={cn(\"kz-frame kz-tpl-error\", className)} {...props}>\n <p className=\"kz-tpl-error-code\" aria-hidden>\n {code}\n {mascot}\n </p>\n <h1>{title}</h1>\n {text && <p>{text}</p>}\n {search && <div className=\"kz-tpl-error-search\">{search}</div>}\n {actions}\n {children}\n </div>\n );\n}\n"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"path": "error-page/index.ts",
|
|
114
|
+
"content": "/** @krizaka/ui/error-page — `ErrorPage`: An error page: the code drawn, the bird, a sentence, a search and the ways back. Server-safe; a page template. */\nexport { ErrorPage, type ErrorPageProps } from \"./error-page\";\n"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"path": "error-page/meta.ts",
|
|
118
|
+
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Error page\",\n summary: \"When a page is not there: the code drawn huge, the bird that lost its way, one sentence, a search and the ways back — never a dead end.\",\n status: \"beta\",\n category: \"templates\",\n platforms: \"web\",\n whenToUse: [\"Not found (404), server error (500), offline.\", \"Any page that cannot show what was asked.\"],\n whenNotToUse: [\n { when: \"For something not built yet.\", use: \"status-page\" },\n { when: \"For an empty list inside a page.\", use: \"empty-state\" },\n ],\n bestPractices: [\"The title says it in words; the code is drawn, not read.\", \"Offer a search and two or three ways back.\", \"Words and content arrive as props; the motion is the platform's (`[data-reveal]`, still under reduced motion).\"],\n accessibility: {\n keyboard: [],\n notes: [\"The code is hidden from assistive technology; the `h1` says what happened.\", \"The ways back are a named list of links.\"],\n },\n related: [\"status-page\", \"search-field\", \"action-bar\"],\n web: {\n imports: [\"ErrorPage\"],\n examples: [\n { name: \"not-found\", title: \"Not found\", description: \"The pigeon, a search and three ways back.\", template: true },\n ],\n },\n} satisfies ComponentMeta;\n"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"path": "meta.ts",
|
|
122
|
+
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"action-bar\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"dependencies": [],
|
|
126
|
+
"registryDependencies": [
|
|
127
|
+
"cn"
|
|
128
|
+
],
|
|
129
|
+
"demo": {
|
|
130
|
+
"path": "examples/error-page/not-found.tsx",
|
|
131
|
+
"content": "import { ActionBar } from \"@krizaka/ui/action-bar\";\nimport { ErrorPage } from \"@krizaka/ui/error-page\";\nimport { Mascot } from \"@krizaka/ui/mascots\";\nimport { SearchField } from \"@krizaka/ui/search-field\";\n\n// TEMPLATE — a page that is not there: the code drawn, the pigeon that lost its way, one sentence, a search, the ways\n// back. Never a dead end.\nexport default function ErrorPageNotFound() {\n return (\n <ErrorPage\n code=\"404\"\n mascot={<Mascot bird=\"pigeon\" mood=\"empty\" size={96} />}\n title=\"This page took another road\"\n text=\"The address may have changed. Search for it, or start again from one of these.\"\n search={<SearchField label=\"Search the site\" placeholder=\"Search…\" />}\n actions={<ActionBar label=\"Ways back\" primaryFirst actions={[{ href: \"#home\", label: \"Home\" }, { href: \"#docs\", label: \"Documentation\" }, { href: \"#contact\", label: \"Contact\" }]} />}\n />\n );\n}\n"
|
|
132
|
+
},
|
|
133
|
+
"props": [
|
|
134
|
+
{
|
|
135
|
+
"component": "ErrorPage",
|
|
136
|
+
"description": "An error page: the code drawn, the bird, a sentence, a search and the ways back.",
|
|
137
|
+
"props": [
|
|
138
|
+
{
|
|
139
|
+
"name": "code",
|
|
140
|
+
"type": "string",
|
|
141
|
+
"default": null,
|
|
142
|
+
"description": "The code (`404`, `500`): drawn, not read — the title says it in words.",
|
|
143
|
+
"required": true
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "title",
|
|
147
|
+
"type": "ReactNode",
|
|
148
|
+
"default": null,
|
|
149
|
+
"description": "The page's `h1` (`This page took another road`).",
|
|
150
|
+
"required": true
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "actions",
|
|
154
|
+
"type": "ReactNode",
|
|
155
|
+
"default": null,
|
|
156
|
+
"description": "The ways back (an ActionBar: home, the docs, contact).",
|
|
157
|
+
"required": false
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "mascot",
|
|
161
|
+
"type": "ReactNode",
|
|
162
|
+
"default": null,
|
|
163
|
+
"description": "The bird beside the code (a Mascot in its `empty` or `error` mood).",
|
|
164
|
+
"required": false
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "search",
|
|
168
|
+
"type": "ReactNode",
|
|
169
|
+
"default": null,
|
|
170
|
+
"description": "A search, to find what was meant.",
|
|
171
|
+
"required": false
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "text",
|
|
175
|
+
"type": "ReactNode",
|
|
176
|
+
"default": null,
|
|
177
|
+
"description": "What happened and what to do, in one or two sentences.",
|
|
178
|
+
"required": false
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/catalogue-page/components.tsx
|
|
4
|
+
import { CardGrid } from "@krizaka/ui/card-grid";
|
|
5
|
+
import { CataloguePage } from "@krizaka/ui/catalogue-page";
|
|
6
|
+
import { ChipLink } from "@krizaka/ui/chip-link";
|
|
7
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
8
|
+
import { SearchField } from "@krizaka/ui/search-field";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var ITEMS = ["Button", "Card", "Dialog", "Tabs", "Toast", "Data table"];
|
|
11
|
+
function CataloguePageComponents() {
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
CataloguePage,
|
|
14
|
+
{
|
|
15
|
+
eyebrow: "Krizaka UI",
|
|
16
|
+
title: "Components",
|
|
17
|
+
lead: "Every component, web and mobile, documented from its code.",
|
|
18
|
+
search: /* @__PURE__ */ jsx(SearchField, { label: "Search the components", placeholder: "Button, dialog\u2026" }),
|
|
19
|
+
filtersLabel: "Filters",
|
|
20
|
+
filters: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2 lg:flex-col lg:items-start", children: [
|
|
21
|
+
/* @__PURE__ */ jsx("p", { className: "kz-label", children: "Platform" }),
|
|
22
|
+
/* @__PURE__ */ jsx(ChipLink, { href: "#all", selected: true, children: "All" }),
|
|
23
|
+
/* @__PURE__ */ jsx(ChipLink, { href: "#web", children: "Web" }),
|
|
24
|
+
/* @__PURE__ */ jsx(ChipLink, { href: "#mobile", children: "Mobile" })
|
|
25
|
+
] }),
|
|
26
|
+
count: `${ITEMS.length} components`,
|
|
27
|
+
children: /* @__PURE__ */ jsx(CardGrid, { as: "ul", min: 200, reveal: false, children: ITEMS.map((name) => /* @__PURE__ */ jsx(LinkCard, { href: `#${name}`, title: name, titleAs: "span", description: "Web + Mobile" }, name)) })
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
CataloguePageComponents as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CardGrid } from "@krizaka/ui/card-grid";
|
|
2
|
+
import { CataloguePage } from "@krizaka/ui/catalogue-page";
|
|
3
|
+
import { ChipLink } from "@krizaka/ui/chip-link";
|
|
4
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
5
|
+
import { SearchField } from "@krizaka/ui/search-field";
|
|
6
|
+
|
|
7
|
+
const ITEMS = ["Button", "Card", "Dialog", "Tabs", "Toast", "Data table"];
|
|
8
|
+
|
|
9
|
+
// TEMPLATE — a catalogue (the components of Krizaka UI): the search in the hero, the filters in a sticky column beside
|
|
10
|
+
// the results — as links, the address keeps them — the count said politely, the results as compact link cards.
|
|
11
|
+
export default function CataloguePageComponents() {
|
|
12
|
+
return (
|
|
13
|
+
<CataloguePage
|
|
14
|
+
eyebrow="Krizaka UI"
|
|
15
|
+
title="Components"
|
|
16
|
+
lead="Every component, web and mobile, documented from its code."
|
|
17
|
+
search={<SearchField label="Search the components" placeholder="Button, dialog…" />}
|
|
18
|
+
filtersLabel="Filters"
|
|
19
|
+
filters={
|
|
20
|
+
<div className="flex flex-wrap gap-2 lg:flex-col lg:items-start">
|
|
21
|
+
<p className="kz-label">Platform</p>
|
|
22
|
+
<ChipLink href="#all" selected>All</ChipLink>
|
|
23
|
+
<ChipLink href="#web">Web</ChipLink>
|
|
24
|
+
<ChipLink href="#mobile">Mobile</ChipLink>
|
|
25
|
+
</div>
|
|
26
|
+
}
|
|
27
|
+
count={`${ITEMS.length} components`}
|
|
28
|
+
>
|
|
29
|
+
<CardGrid as="ul" min={200} reveal={false}>
|
|
30
|
+
{ITEMS.map((name) => (
|
|
31
|
+
<LinkCard key={name} href={`#${name}`} title={name} titleAs="span" description="Web + Mobile" />
|
|
32
|
+
))}
|
|
33
|
+
</CardGrid>
|
|
34
|
+
</CataloguePage>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/changelog-page/releases.tsx
|
|
4
|
+
import { ChangelogPage } from "@krizaka/ui/changelog-page";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function ChangelogPageReleases() {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
ChangelogPage,
|
|
9
|
+
{
|
|
10
|
+
eyebrow: "Krizaka UI",
|
|
11
|
+
title: "What changed",
|
|
12
|
+
lead: "Every release, newest first \u2014 and why, when it was a decision.",
|
|
13
|
+
kindLabels: { added: "Added", changed: "Changed", fixed: "Fixed", removed: "Removed" },
|
|
14
|
+
logLabel: "Releases",
|
|
15
|
+
entries: [
|
|
16
|
+
{
|
|
17
|
+
id: "v2-6-0",
|
|
18
|
+
date: "2026-10-11",
|
|
19
|
+
dateLabel: "11 Oct 2026",
|
|
20
|
+
version: "2.6.0",
|
|
21
|
+
title: "Page blocks",
|
|
22
|
+
changes: [
|
|
23
|
+
{ kind: "added", text: "Page, PageHero, CardGrid, LinkCard, ArgumentCard and seven more blocks." },
|
|
24
|
+
{ kind: "changed", text: "The blocks' stylesheet is imported once by the app." }
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "v2-4-0",
|
|
29
|
+
date: "2026-10-09",
|
|
30
|
+
dateLabel: "9 Oct 2026",
|
|
31
|
+
version: "2.4.0",
|
|
32
|
+
title: "Data and media",
|
|
33
|
+
changes: [
|
|
34
|
+
{ kind: "added", text: "DataTable, Combobox, DatePicker, VideoPlayer." },
|
|
35
|
+
{ kind: "fixed", text: "A live line chart no longer hides its line." }
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
ChangelogPageReleases as default
|
|
44
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ChangelogPage } from "@krizaka/ui/changelog-page";
|
|
2
|
+
|
|
3
|
+
// TEMPLATE — what changed (Krizaka UI's releases): the date and version stick beside each entry, the changes by kind in
|
|
4
|
+
// words and colour. On a phone the date sits above its entry.
|
|
5
|
+
export default function ChangelogPageReleases() {
|
|
6
|
+
return (
|
|
7
|
+
<ChangelogPage
|
|
8
|
+
eyebrow="Krizaka UI"
|
|
9
|
+
title="What changed"
|
|
10
|
+
lead="Every release, newest first — and why, when it was a decision."
|
|
11
|
+
kindLabels={{ added: "Added", changed: "Changed", fixed: "Fixed", removed: "Removed" }}
|
|
12
|
+
logLabel="Releases"
|
|
13
|
+
entries={[
|
|
14
|
+
{
|
|
15
|
+
id: "v2-6-0",
|
|
16
|
+
date: "2026-10-11",
|
|
17
|
+
dateLabel: "11 Oct 2026",
|
|
18
|
+
version: "2.6.0",
|
|
19
|
+
title: "Page blocks",
|
|
20
|
+
changes: [
|
|
21
|
+
{ kind: "added", text: "Page, PageHero, CardGrid, LinkCard, ArgumentCard and seven more blocks." },
|
|
22
|
+
{ kind: "changed", text: "The blocks' stylesheet is imported once by the app." },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "v2-4-0",
|
|
27
|
+
date: "2026-10-09",
|
|
28
|
+
dateLabel: "9 Oct 2026",
|
|
29
|
+
version: "2.4.0",
|
|
30
|
+
title: "Data and media",
|
|
31
|
+
changes: [
|
|
32
|
+
{ kind: "added", text: "DataTable, Combobox, DatePicker, VideoPlayer." },
|
|
33
|
+
{ kind: "fixed", text: "A live line chart no longer hides its line." },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
]}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/component-page/button.tsx
|
|
4
|
+
import { Button } from "@krizaka/ui/button";
|
|
5
|
+
import { ComponentPage } from "@krizaka/ui/component-page";
|
|
6
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
function ComponentPageButton() {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
ComponentPage,
|
|
11
|
+
{
|
|
12
|
+
className: "w-full",
|
|
13
|
+
back: /* @__PURE__ */ jsx("a", { href: "#catalogue", children: "\u2190 Components" }),
|
|
14
|
+
eyebrow: "Actions",
|
|
15
|
+
title: "Button",
|
|
16
|
+
summary: "The action: six looks, three sizes, the Krizaka cut, and the whole life of an action built in.",
|
|
17
|
+
facts: [{ label: "Web + Mobile", tone: "ok" }, { label: "Stable" }],
|
|
18
|
+
preview: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-3 p-8", children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Button, { variant: "primary", shape: "cut", shimmer: true, children: "Publish" }),
|
|
20
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", shape: "cut", children: "Save a draft" })
|
|
21
|
+
] }),
|
|
22
|
+
install: { code: 'import { Button } from "@krizaka/ui/button";', language: "ts", copyLabel: "Copy", copiedLabel: "Copied" },
|
|
23
|
+
sections: [
|
|
24
|
+
{ id: "when", title: "When to use", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-fg-secondary", children: "For the action a block is about; links that look like actions use `asChild`." }) },
|
|
25
|
+
{ id: "a11y", title: "Accessibility", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-fg-secondary", children: "A real button; while loading it says so in a live region." }) }
|
|
26
|
+
],
|
|
27
|
+
aside: /* @__PURE__ */ jsx(LinkCard, { href: "#confirm-button", title: "Confirm button", description: "A destructive action in two presses.", titleAs: "span" })
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
ComponentPageButton as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Button } from "@krizaka/ui/button";
|
|
2
|
+
import { ComponentPage } from "@krizaka/ui/component-page";
|
|
3
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
4
|
+
|
|
5
|
+
// TEMPLATE — a component's page (what krizaka.com/docs/ui generates from the registry): name, summary, status and
|
|
6
|
+
// platforms, the live preview, the import line, its sections; related components aside (under it on a phone).
|
|
7
|
+
export default function ComponentPageButton() {
|
|
8
|
+
return (
|
|
9
|
+
<ComponentPage
|
|
10
|
+
className="w-full"
|
|
11
|
+
back={<a href="#catalogue">← Components</a>}
|
|
12
|
+
eyebrow="Actions"
|
|
13
|
+
title="Button"
|
|
14
|
+
summary="The action: six looks, three sizes, the Krizaka cut, and the whole life of an action built in."
|
|
15
|
+
facts={[{ label: "Web + Mobile", tone: "ok" }, { label: "Stable" }]}
|
|
16
|
+
preview={
|
|
17
|
+
<div className="flex flex-wrap items-center justify-center gap-3 p-8">
|
|
18
|
+
<Button variant="primary" shape="cut" shimmer>Publish</Button>
|
|
19
|
+
<Button variant="secondary" shape="cut">Save a draft</Button>
|
|
20
|
+
</div>
|
|
21
|
+
}
|
|
22
|
+
install={{ code: 'import { Button } from "@krizaka/ui/button";', language: "ts", copyLabel: "Copy", copiedLabel: "Copied" }}
|
|
23
|
+
sections={[
|
|
24
|
+
{ id: "when", title: "When to use", children: <p className="text-sm text-fg-secondary">For the action a block is about; links that look like actions use `asChild`.</p> },
|
|
25
|
+
{ id: "a11y", title: "Accessibility", children: <p className="text-sm text-fg-secondary">A real button; while loading it says so in a live region.</p> },
|
|
26
|
+
]}
|
|
27
|
+
aside={<LinkCard href="#confirm-button" title="Confirm button" description="A destructive action in two presses." titleAs="span" />}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/contact-page/team.tsx
|
|
4
|
+
import { Button } from "@krizaka/ui/button";
|
|
5
|
+
import { ContactPage } from "@krizaka/ui/contact-page";
|
|
6
|
+
import { Field, Input, Textarea } from "@krizaka/ui/field";
|
|
7
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
8
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
function ContactPageTeam() {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
ContactPage,
|
|
13
|
+
{
|
|
14
|
+
eyebrow: "Contact",
|
|
15
|
+
title: "Talk to the people who build it",
|
|
16
|
+
lead: "A person answers within two working days, in English or in French.",
|
|
17
|
+
aside: /* @__PURE__ */ jsx(Mascot, { bird: "flamingo", mood: "welcome", size: 112 }),
|
|
18
|
+
channels: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx(LinkCard, { href: "https://github.com/orgs/krizaka/discussions", title: "Discussions", description: "Questions and ideas, in public.", titleAs: "span" }),
|
|
20
|
+
/* @__PURE__ */ jsx(LinkCard, { href: "https://github.com/krizaka", title: "Report a problem", description: "An issue on the repository.", titleAs: "span" })
|
|
21
|
+
] }),
|
|
22
|
+
form: /* @__PURE__ */ jsxs("form", { className: "flex flex-col gap-4", children: [
|
|
23
|
+
/* @__PURE__ */ jsxs(Field.Root, { children: [
|
|
24
|
+
/* @__PURE__ */ jsx(Field.Label, { htmlFor: "contact-email", children: "Email" }),
|
|
25
|
+
/* @__PURE__ */ jsx(Input, { id: "contact-email", type: "email", autoComplete: "email" })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsxs(Field.Root, { children: [
|
|
28
|
+
/* @__PURE__ */ jsx(Field.Label, { htmlFor: "contact-message", children: "Message" }),
|
|
29
|
+
/* @__PURE__ */ jsx(Textarea, { id: "contact-message", rows: 4 })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", variant: "primary", size: "lg", shape: "cut", shimmer: true, children: "Send" })
|
|
32
|
+
] }),
|
|
33
|
+
next: { title: "What happens next", steps: [{ title: "We read it", text: "The same day, on working days." }, { title: "We answer", text: "Within two working days." }] }
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
ContactPageTeam as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Button } from "@krizaka/ui/button";
|
|
2
|
+
import { ContactPage } from "@krizaka/ui/contact-page";
|
|
3
|
+
import { Field, Input, Textarea } from "@krizaka/ui/field";
|
|
4
|
+
import { LinkCard } from "@krizaka/ui/link-card";
|
|
5
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
6
|
+
|
|
7
|
+
// TEMPLATE — reaching the team: the public channels as cards beside the private form, then what happens after sending.
|
|
8
|
+
// On a phone the form comes after the channels, its fields at full width.
|
|
9
|
+
export default function ContactPageTeam() {
|
|
10
|
+
return (
|
|
11
|
+
<ContactPage
|
|
12
|
+
eyebrow="Contact"
|
|
13
|
+
title="Talk to the people who build it"
|
|
14
|
+
lead="A person answers within two working days, in English or in French."
|
|
15
|
+
aside={<Mascot bird="flamingo" mood="welcome" size={112} />}
|
|
16
|
+
channels={
|
|
17
|
+
<>
|
|
18
|
+
<LinkCard href="https://github.com/orgs/krizaka/discussions" title="Discussions" description="Questions and ideas, in public." titleAs="span" />
|
|
19
|
+
<LinkCard href="https://github.com/krizaka" title="Report a problem" description="An issue on the repository." titleAs="span" />
|
|
20
|
+
</>
|
|
21
|
+
}
|
|
22
|
+
form={
|
|
23
|
+
<form className="flex flex-col gap-4">
|
|
24
|
+
<Field.Root>
|
|
25
|
+
<Field.Label htmlFor="contact-email">Email</Field.Label>
|
|
26
|
+
<Input id="contact-email" type="email" autoComplete="email" />
|
|
27
|
+
</Field.Root>
|
|
28
|
+
<Field.Root>
|
|
29
|
+
<Field.Label htmlFor="contact-message">Message</Field.Label>
|
|
30
|
+
<Textarea id="contact-message" rows={4} />
|
|
31
|
+
</Field.Root>
|
|
32
|
+
<Button type="submit" variant="primary" size="lg" shape="cut" shimmer>Send</Button>
|
|
33
|
+
</form>
|
|
34
|
+
}
|
|
35
|
+
next={{ title: "What happens next", steps: [{ title: "We read it", text: "The same day, on working days." }, { title: "We answer", text: "Within two working days." }] }}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/data-table/details.tsx
|
|
4
|
+
import { Badge } from "@krizaka/ui/badge";
|
|
5
|
+
import { DataTable } from "@krizaka/ui/data-table";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var requests = [
|
|
8
|
+
{ id: "v-1042", creator: "Elena Varga", kind: "Identity check", status: "pending", note: "Passport, expires 2031. Selfie matches." },
|
|
9
|
+
{ id: "v-1041", creator: "Noah Petit", kind: "Payout account", status: "pending", note: "IBAN FR76 \u2022\u2022\u2022\u2022 0412, holder name matches." },
|
|
10
|
+
{ id: "v-1039", creator: "Maya Chen", kind: "Identity check", status: "approved", note: "Approved by Sam on Oct 11." }
|
|
11
|
+
];
|
|
12
|
+
var columns = [
|
|
13
|
+
{ id: "creator", header: "Creator", card: "title" },
|
|
14
|
+
{ id: "kind", header: "Request" },
|
|
15
|
+
{ id: "status", header: "Status", cell: (r) => /* @__PURE__ */ jsx(Badge, { tone: r.status === "pending" ? "warning" : "success", children: r.status }) }
|
|
16
|
+
];
|
|
17
|
+
function DataTableDetails() {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
DataTable,
|
|
20
|
+
{
|
|
21
|
+
caption: "Verification requests",
|
|
22
|
+
rows: requests,
|
|
23
|
+
columns,
|
|
24
|
+
getRowId: (r) => r.id,
|
|
25
|
+
rowLabel: (r) => r.creator,
|
|
26
|
+
defaultExpanded: { "v-1042": true },
|
|
27
|
+
renderDetail: (r) => /* @__PURE__ */ jsx("p", { className: "text-sm text-fg-secondary", children: r.note })
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
DataTableDetails as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Badge } from "@krizaka/ui/badge";
|
|
4
|
+
import { DataTable, type DataTableColumn } from "@krizaka/ui/data-table";
|
|
5
|
+
|
|
6
|
+
type Request = { id: string; creator: string; kind: string; status: "pending" | "approved"; note: string };
|
|
7
|
+
const requests: Request[] = [
|
|
8
|
+
{ id: "v-1042", creator: "Elena Varga", kind: "Identity check", status: "pending", note: "Passport, expires 2031. Selfie matches." },
|
|
9
|
+
{ id: "v-1041", creator: "Noah Petit", kind: "Payout account", status: "pending", note: "IBAN FR76 •••• 0412, holder name matches." },
|
|
10
|
+
{ id: "v-1039", creator: "Maya Chen", kind: "Identity check", status: "approved", note: "Approved by Sam on Oct 11." },
|
|
11
|
+
];
|
|
12
|
+
const columns: DataTableColumn<Request>[] = [
|
|
13
|
+
{ id: "creator", header: "Creator", card: "title" },
|
|
14
|
+
{ id: "kind", header: "Request" },
|
|
15
|
+
{ id: "status", header: "Status", cell: (r) => <Badge tone={r.status === "pending" ? "warning" : "success"}>{r.status}</Badge> },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
// A button per row opens a panel under it: the details, without leaving the list.
|
|
19
|
+
export default function DataTableDetails() {
|
|
20
|
+
return (
|
|
21
|
+
<DataTable
|
|
22
|
+
caption="Verification requests"
|
|
23
|
+
rows={requests}
|
|
24
|
+
columns={columns}
|
|
25
|
+
getRowId={(r) => r.id}
|
|
26
|
+
rowLabel={(r) => r.creator}
|
|
27
|
+
defaultExpanded={{ "v-1042": true }}
|
|
28
|
+
renderDetail={(r) => <p className="text-sm text-fg-secondary">{r.note}</p>}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
}
|