@krizaka/ui 2.5.0 → 2.8.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 +49 -5
- package/dist/action-bar.d.ts +38 -0
- package/dist/action-bar.js +52 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/argument-card.d.ts +67 -0
- package/dist/argument-card.js +69 -0
- package/dist/argument-card.js.map +1 -0
- package/dist/audio-player.js +1 -1
- package/dist/block-link-BAg4eoZk.d.ts +12 -0
- package/dist/blocks.css +529 -0
- package/dist/button.js +5 -94
- package/dist/button.js.map +1 -1
- package/dist/card-grid.d.ts +42 -0
- package/dist/card-grid.js +47 -0
- package/dist/card-grid.js.map +1 -0
- package/dist/chunk-2AGSO3WH.js +20 -0
- package/dist/chunk-2AGSO3WH.js.map +1 -0
- package/dist/chunk-AB5D3KBG.js +37 -0
- package/dist/chunk-AB5D3KBG.js.map +1 -0
- package/dist/{chunk-YX6CNVJA.js → chunk-CPA5CF35.js} +1 -1
- package/dist/chunk-CPA5CF35.js.map +1 -0
- package/dist/chunk-K3SWZXYT.js +92 -0
- package/dist/chunk-K3SWZXYT.js.map +1 -0
- package/dist/chunk-NOVUREEC.js +274 -0
- package/dist/chunk-NOVUREEC.js.map +1 -0
- package/dist/{chunk-XUMJA5ZI.js → chunk-X6TW3X6Y.js} +2 -2
- package/dist/chunk-XCBVFMNV.js +41 -0
- package/dist/{chunk-YX6CNVJA.js.map → chunk-XCBVFMNV.js.map} +1 -1
- package/dist/chunk-XVLWVTQA.js +28 -0
- package/dist/chunk-XVLWVTQA.js.map +1 -0
- package/dist/chunk-Z6FUPB3Q.js +102 -0
- package/dist/chunk-Z6FUPB3Q.js.map +1 -0
- package/dist/code-block.d.ts +42 -0
- package/dist/code-block.js +202 -0
- package/dist/code-block.js.map +1 -0
- package/dist/combobox.js +2 -2
- package/dist/cta-panel.d.ts +23 -0
- package/dist/cta-panel.js +20 -0
- package/dist/cta-panel.js.map +1 -0
- package/dist/data-table.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/decision-list.d.ts +34 -0
- package/dist/decision-list.js +67 -0
- package/dist/decision-list.js.map +1 -0
- package/dist/file-upload.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/geometry-CXrAW34x.d.ts +19 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.js +86 -4
- package/dist/index.js.map +1 -1
- package/dist/link-card.d.ts +35 -0
- package/dist/link-card.js +46 -0
- package/dist/link-card.js.map +1 -0
- package/dist/mascot-quote.d.ts +43 -0
- package/dist/mascot-quote.js +287 -0
- package/dist/mascot-quote.js.map +1 -0
- package/dist/mascot-state.d.ts +128 -0
- package/dist/mascot-state.js +95 -0
- package/dist/mascot-state.js.map +1 -0
- package/dist/mascots.d.ts +5 -20
- package/dist/mascots.js +5 -246
- package/dist/mascots.js.map +1 -1
- package/dist/media-capture.js +1 -1
- package/dist/motion.css +25 -1
- package/dist/native.d.ts +54 -7
- package/dist/native.js +334 -166
- package/dist/native.js.map +1 -1
- package/dist/page-hero.d.ts +44 -0
- package/dist/page-hero.js +41 -0
- package/dist/page-hero.js.map +1 -0
- package/dist/page.d.ts +116 -0
- package/dist/page.js +17 -0
- package/dist/page.js.map +1 -0
- package/dist/pagination.js +25 -44
- package/dist/pagination.js.map +1 -1
- package/dist/pointer-light.d.ts +20 -0
- package/dist/pointer-light.js +12 -0
- package/dist/pointer-light.js.map +1 -0
- package/dist/search-field.js +1 -1
- package/dist/section-backdrop.js +4 -22
- package/dist/section-backdrop.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/terminal-replay.d.ts +68 -0
- package/dist/terminal-replay.js +231 -0
- package/dist/terminal-replay.js.map +1 -0
- package/dist/toc.d.ts +23 -0
- package/dist/toc.js +39 -0
- package/dist/toc.js.map +1 -0
- package/dist/video-player.js +1 -1
- package/package.json +208 -8
- package/registry/action-bar.json +205 -0
- package/registry/alert.json +1 -1
- package/registry/argument-card.json +327 -0
- package/registry/audio-player.json +2 -2
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +5 -5
- package/registry/card-grid.json +221 -0
- package/registry/card.json +3 -3
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/code-block.json +262 -0
- package/registry/combobox.json +2 -2
- package/registry/command.json +1 -1
- package/registry/confirm-button.json +3 -3
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +154 -0
- package/registry/data-table.json +2 -2
- package/registry/date-picker.json +2 -2
- package/registry/decision-list.json +144 -0
- package/registry/dialog.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/examples/action-bar/buttons.d.ts +4 -0
- package/registry/examples/action-bar/buttons.js +22 -0
- package/registry/examples/action-bar/buttons.tsx +17 -0
- package/registry/examples/action-bar/icons.d.ts +4 -0
- package/registry/examples/action-bar/icons.js +24 -0
- package/registry/examples/action-bar/icons.tsx +23 -0
- package/registry/examples/argument-card/building-block.d.ts +4 -0
- package/registry/examples/argument-card/building-block.js +29 -0
- package/registry/examples/argument-card/building-block.tsx +29 -0
- package/registry/examples/argument-card/grid.d.ts +4 -0
- package/registry/examples/argument-card/grid.js +17 -0
- package/registry/examples/argument-card/grid.tsx +19 -0
- package/registry/examples/argument-card/unfold.d.ts +4 -0
- package/registry/examples/argument-card/unfold.js +26 -0
- package/registry/examples/argument-card/unfold.tsx +21 -0
- package/registry/examples/card-grid/products.d.ts +4 -0
- package/registry/examples/card-grid/products.js +16 -0
- package/registry/examples/card-grid/products.tsx +13 -0
- package/registry/examples/card-grid/reveal.d.ts +4 -0
- package/registry/examples/card-grid/reveal.js +13 -0
- package/registry/examples/card-grid/reveal.tsx +16 -0
- package/registry/examples/code-block/build-tools.d.ts +4 -0
- package/registry/examples/code-block/build-tools.js +30 -0
- package/registry/examples/code-block/build-tools.tsx +25 -0
- package/registry/examples/code-block/file.d.ts +4 -0
- package/registry/examples/code-block/file.js +17 -0
- package/registry/examples/code-block/file.tsx +13 -0
- package/registry/examples/cta-panel/discuss.d.ts +4 -0
- package/registry/examples/cta-panel/discuss.js +31 -0
- package/registry/examples/cta-panel/discuss.tsx +23 -0
- package/registry/examples/decision-list/product.d.ts +4 -0
- package/registry/examples/decision-list/product.js +35 -0
- package/registry/examples/decision-list/product.tsx +30 -0
- package/registry/examples/link-card/docs-hub.d.ts +4 -0
- package/registry/examples/link-card/docs-hub.js +18 -0
- package/registry/examples/link-card/docs-hub.tsx +20 -0
- package/registry/examples/link-card/external.d.ts +4 -0
- package/registry/examples/link-card/external.js +22 -0
- package/registry/examples/link-card/external.tsx +16 -0
- package/registry/examples/link-card/stack.d.ts +4 -0
- package/registry/examples/link-card/stack.js +26 -0
- package/registry/examples/link-card/stack.tsx +21 -0
- package/registry/examples/mascot-quote/callout.d.ts +4 -0
- package/registry/examples/mascot-quote/callout.js +11 -0
- package/registry/examples/mascot-quote/callout.tsx +10 -0
- package/registry/examples/mascot-quote/inline.d.ts +4 -0
- package/registry/examples/mascot-quote/inline.js +11 -0
- package/registry/examples/mascot-quote/inline.tsx +10 -0
- package/registry/examples/mascot-state/empty.d.ts +4 -0
- package/registry/examples/mascot-state/empty.js +22 -0
- package/registry/examples/mascot-state/empty.tsx +20 -0
- package/registry/examples/mascot-state/error.d.ts +4 -0
- package/registry/examples/mascot-state/error.js +23 -0
- package/registry/examples/mascot-state/error.tsx +21 -0
- package/registry/examples/mascot-state/loading.d.ts +4 -0
- package/registry/examples/mascot-state/loading.js +22 -0
- package/registry/examples/mascot-state/loading.tsx +16 -0
- package/registry/examples/mascot-state/native/default.d.ts +4 -0
- package/registry/examples/mascot-state/native/default.dark.png +0 -0
- package/registry/examples/mascot-state/native/default.js +25 -0
- package/registry/examples/mascot-state/native/default.light.png +0 -0
- package/registry/examples/mascot-state/native/default.tsx +19 -0
- package/registry/examples/mascot-state/success.d.ts +4 -0
- package/registry/examples/mascot-state/success.js +21 -0
- package/registry/examples/mascot-state/success.tsx +19 -0
- package/registry/examples/mascot-state/welcome.d.ts +4 -0
- package/registry/examples/mascot-state/welcome.js +21 -0
- package/registry/examples/mascot-state/welcome.tsx +19 -0
- package/registry/examples/mascots/flock.tsx +1 -1
- package/registry/examples/mascots/lovebird.d.ts +4 -0
- package/registry/examples/mascots/lovebird.js +19 -0
- package/registry/examples/mascots/lovebird.tsx +18 -0
- package/registry/examples/mascots/native/lovebird.d.ts +4 -0
- package/registry/examples/mascots/native/lovebird.dark.png +0 -0
- package/registry/examples/mascots/native/lovebird.js +21 -0
- package/registry/examples/mascots/native/lovebird.light.png +0 -0
- package/registry/examples/mascots/native/lovebird.tsx +18 -0
- package/registry/examples/page/backdrop.d.ts +4 -0
- package/registry/examples/page/backdrop.js +23 -0
- package/registry/examples/page/backdrop.tsx +18 -0
- package/registry/examples/page/facts.d.ts +4 -0
- package/registry/examples/page/facts.js +24 -0
- package/registry/examples/page/facts.tsx +21 -0
- package/registry/examples/page/frame.d.ts +4 -0
- package/registry/examples/page/frame.js +15 -0
- package/registry/examples/page/frame.tsx +17 -0
- package/registry/examples/page/sections.d.ts +4 -0
- package/registry/examples/page/sections.js +14 -0
- package/registry/examples/page/sections.tsx +15 -0
- package/registry/examples/page-hero/building-block.d.ts +4 -0
- package/registry/examples/page-hero/building-block.js +24 -0
- package/registry/examples/page-hero/building-block.tsx +20 -0
- package/registry/examples/page-hero/hub.d.ts +4 -0
- package/registry/examples/page-hero/hub.js +21 -0
- package/registry/examples/page-hero/hub.tsx +15 -0
- package/registry/examples/pointer-light/list.d.ts +4 -0
- package/registry/examples/pointer-light/list.js +16 -0
- package/registry/examples/pointer-light/list.tsx +14 -0
- package/registry/examples/terminal-replay/at-rest.d.ts +4 -0
- package/registry/examples/terminal-replay/at-rest.js +32 -0
- package/registry/examples/terminal-replay/at-rest.tsx +26 -0
- package/registry/examples/terminal-replay/session.d.ts +4 -0
- package/registry/examples/terminal-replay/session.js +34 -0
- package/registry/examples/terminal-replay/session.tsx +28 -0
- package/registry/examples/toc/reading-page.d.ts +4 -0
- package/registry/examples/toc/reading-page.js +21 -0
- package/registry/examples/toc/reading-page.tsx +21 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +2 -2
- package/registry/glow-card.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +265 -5
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/link-card.json +279 -0
- package/registry/loader.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +191 -0
- package/registry/mascot-state.json +1249 -0
- package/registry/mascots.json +41 -21
- package/registry/media-capture.json +4 -4
- 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 +254 -0
- package/registry/page.json +497 -0
- package/registry/pagination.json +2 -2
- package/registry/pointer-light.json +119 -0
- package/registry/popover.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/search-field.json +2 -2
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/skeleton.json +3 -3
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/stat.json +1 -1
- 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 +317 -0
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +157 -0
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +4 -4
- package/registry/video-trimmer.json +3 -3
- /package/dist/{chunk-XUMJA5ZI.js.map → chunk-X6TW3X6Y.js.map} +0 -0
|
@@ -0,0 +1,1249 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mascot-state",
|
|
3
|
+
"type": "primitive",
|
|
4
|
+
"title": "Mascot state",
|
|
5
|
+
"summary": "A moment told by a bird of the flock: nothing yet, a long wait, done, it failed, welcome — the bird of the job beside the words and the next action.",
|
|
6
|
+
"description": "A moment told by a bird of the flock: nothing yet, a long wait, done, it failed, welcome — the bird of the job beside the words and the next action.",
|
|
7
|
+
"status": "beta",
|
|
8
|
+
"category": "feedback",
|
|
9
|
+
"platforms": "both",
|
|
10
|
+
"whenToUse": [
|
|
11
|
+
"An empty list or search the person reaches for the first time (`mood=\"empty\"`, `framed`).",
|
|
12
|
+
"A page or a panel that failed: a 404, a lost connection, a refused payment (`ErrorState`).",
|
|
13
|
+
"The end of something that matters: a payment received, an identity verified, a message sent (`SuccessState`).",
|
|
14
|
+
"A task of several seconds or more, with what runs in words (`LoadingState`).",
|
|
15
|
+
"The first screen of an onboarding (`WelcomeState`)."
|
|
16
|
+
],
|
|
17
|
+
"whenNotToUse": [
|
|
18
|
+
{
|
|
19
|
+
"when": "A short wait of a second or two, or a list that is loading.",
|
|
20
|
+
"use": "skeleton"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"when": "An error inside a form or a card, next to what it concerns.",
|
|
24
|
+
"use": "alert"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"when": "A result that needs no moment: a saved setting, a copied link.",
|
|
28
|
+
"use": "toast"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"when": "A plain empty list in a dense screen (a table, a sidebar).",
|
|
32
|
+
"use": "empty-state"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"bestPractices": [
|
|
36
|
+
"Choose the bird by the job, not by the mood: the owl reads (documents, search), the falcon watches (security, verification), the duck builds (code, uploads), the flamingo answers and gets paid (support, payments), the pigeon delivers (messages, notifications), the lovebird introduces (matches, introductions).",
|
|
37
|
+
"One bird per screen: a moment, never decoration in working content.",
|
|
38
|
+
"The title says what happened in a few words, the description what comes next; one action — the way out.",
|
|
39
|
+
"`titleAs=\"h1\"` when the state is the whole page (a 404), so the page keeps a heading."
|
|
40
|
+
],
|
|
41
|
+
"accessibility": {
|
|
42
|
+
"keyboard": [],
|
|
43
|
+
"notes": [
|
|
44
|
+
"`role=\"alert\"` for an error, `role=\"status\"` otherwise: announced when it appears; `aria-busy` while thinking.",
|
|
45
|
+
"The bird is decorative: the title and the description carry the meaning.",
|
|
46
|
+
"The staged arrival (bird, words, action) and the bird's gesture stop under `prefers-reduced-motion` and with `animated={false}`."
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"related": [
|
|
50
|
+
"mascots",
|
|
51
|
+
"empty-state",
|
|
52
|
+
"alert",
|
|
53
|
+
"progress"
|
|
54
|
+
],
|
|
55
|
+
"web": {
|
|
56
|
+
"entry": "@krizaka/ui/mascot-state",
|
|
57
|
+
"import": "import { MascotState, ErrorState, SuccessState, LoadingState, WelcomeState } from \"@krizaka/ui/mascot-state\";",
|
|
58
|
+
"props": [
|
|
59
|
+
{
|
|
60
|
+
"component": "ErrorState",
|
|
61
|
+
"description": "It failed: what went wrong and what to do (`role=\"alert\"`). `MascotState` with `mood=\"error\"`.",
|
|
62
|
+
"props": [
|
|
63
|
+
{
|
|
64
|
+
"name": "title",
|
|
65
|
+
"type": "ReactNode",
|
|
66
|
+
"default": null,
|
|
67
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
68
|
+
"required": true
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "action",
|
|
72
|
+
"type": "ReactNode",
|
|
73
|
+
"default": null,
|
|
74
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
75
|
+
"required": false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "animated",
|
|
79
|
+
"type": "boolean",
|
|
80
|
+
"default": null,
|
|
81
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
82
|
+
"required": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "bird",
|
|
86
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
87
|
+
"default": null,
|
|
88
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
89
|
+
"required": false
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "description",
|
|
93
|
+
"type": "ReactNode",
|
|
94
|
+
"default": null,
|
|
95
|
+
"description": "Why, or what comes next.",
|
|
96
|
+
"required": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "framed",
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"default": null,
|
|
102
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
103
|
+
"required": false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "layout",
|
|
107
|
+
"type": "\"inline\" | \"stacked\"",
|
|
108
|
+
"default": null,
|
|
109
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
110
|
+
"required": false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "size",
|
|
114
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
115
|
+
"default": null,
|
|
116
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
117
|
+
"required": false
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "titleAs",
|
|
121
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
122
|
+
"default": null,
|
|
123
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
124
|
+
"required": false
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "tone",
|
|
128
|
+
"type": "MascotTone",
|
|
129
|
+
"default": null,
|
|
130
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
131
|
+
"required": false
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"component": "LoadingState",
|
|
137
|
+
"description": "A long task runs (`aria-busy`): what runs, beside the bird. `MascotState` with `mood=\"thinking\"`.",
|
|
138
|
+
"props": [
|
|
139
|
+
{
|
|
140
|
+
"name": "title",
|
|
141
|
+
"type": "ReactNode",
|
|
142
|
+
"default": null,
|
|
143
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
144
|
+
"required": true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "action",
|
|
148
|
+
"type": "ReactNode",
|
|
149
|
+
"default": null,
|
|
150
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
151
|
+
"required": false
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "animated",
|
|
155
|
+
"type": "boolean",
|
|
156
|
+
"default": null,
|
|
157
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
158
|
+
"required": false
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "bird",
|
|
162
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
163
|
+
"default": null,
|
|
164
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
165
|
+
"required": false
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "description",
|
|
169
|
+
"type": "ReactNode",
|
|
170
|
+
"default": null,
|
|
171
|
+
"description": "Why, or what comes next.",
|
|
172
|
+
"required": false
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "framed",
|
|
176
|
+
"type": "boolean",
|
|
177
|
+
"default": null,
|
|
178
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
179
|
+
"required": false
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "layout",
|
|
183
|
+
"type": "\"inline\" | \"stacked\"",
|
|
184
|
+
"default": null,
|
|
185
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
186
|
+
"required": false
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "size",
|
|
190
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
191
|
+
"default": null,
|
|
192
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
193
|
+
"required": false
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "titleAs",
|
|
197
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
198
|
+
"default": null,
|
|
199
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
200
|
+
"required": false
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "tone",
|
|
204
|
+
"type": "MascotTone",
|
|
205
|
+
"default": null,
|
|
206
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
207
|
+
"required": false
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"component": "MascotState",
|
|
213
|
+
"description": "A moment told by a bird of the flock: an empty list, a long wait, a success, an error, a welcome. Announced to\nassistive technology — `role=\"alert\"` for an error, `role=\"status\"` otherwise (`aria-busy` while thinking).",
|
|
214
|
+
"props": [
|
|
215
|
+
{
|
|
216
|
+
"name": "title",
|
|
217
|
+
"type": "ReactNode",
|
|
218
|
+
"default": null,
|
|
219
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
220
|
+
"required": true
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "action",
|
|
224
|
+
"type": "ReactNode",
|
|
225
|
+
"default": null,
|
|
226
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
227
|
+
"required": false
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "animated",
|
|
231
|
+
"type": "boolean",
|
|
232
|
+
"default": "true",
|
|
233
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
234
|
+
"required": false
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "bird",
|
|
238
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
239
|
+
"default": "owl",
|
|
240
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
241
|
+
"required": false
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "description",
|
|
245
|
+
"type": "ReactNode",
|
|
246
|
+
"default": null,
|
|
247
|
+
"description": "Why, or what comes next.",
|
|
248
|
+
"required": false
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "framed",
|
|
252
|
+
"type": "boolean",
|
|
253
|
+
"default": null,
|
|
254
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
255
|
+
"required": false
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "layout",
|
|
259
|
+
"type": "\"inline\" | \"stacked\"",
|
|
260
|
+
"default": null,
|
|
261
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
262
|
+
"required": false
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "mood",
|
|
266
|
+
"type": "\"success\" | \"error\" | \"empty\" | \"welcome\" | \"thinking\"",
|
|
267
|
+
"default": "empty",
|
|
268
|
+
"description": "The moment: `empty` (nothing yet), `thinking` (a long task runs), `success` (done), `error` (it failed), `welcome`.",
|
|
269
|
+
"required": false
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "size",
|
|
273
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
274
|
+
"default": "md",
|
|
275
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
276
|
+
"required": false
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"name": "titleAs",
|
|
280
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
281
|
+
"default": "p",
|
|
282
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
283
|
+
"required": false
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "tone",
|
|
287
|
+
"type": "MascotTone",
|
|
288
|
+
"default": null,
|
|
289
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
290
|
+
"required": false
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"component": "SuccessState",
|
|
296
|
+
"description": "It is done: a payment, a verification, a delivery, a sent message. `MascotState` with `mood=\"success\"`.",
|
|
297
|
+
"props": [
|
|
298
|
+
{
|
|
299
|
+
"name": "title",
|
|
300
|
+
"type": "ReactNode",
|
|
301
|
+
"default": null,
|
|
302
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
303
|
+
"required": true
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "action",
|
|
307
|
+
"type": "ReactNode",
|
|
308
|
+
"default": null,
|
|
309
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
310
|
+
"required": false
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "animated",
|
|
314
|
+
"type": "boolean",
|
|
315
|
+
"default": null,
|
|
316
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
317
|
+
"required": false
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "bird",
|
|
321
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
322
|
+
"default": null,
|
|
323
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
324
|
+
"required": false
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "description",
|
|
328
|
+
"type": "ReactNode",
|
|
329
|
+
"default": null,
|
|
330
|
+
"description": "Why, or what comes next.",
|
|
331
|
+
"required": false
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "framed",
|
|
335
|
+
"type": "boolean",
|
|
336
|
+
"default": null,
|
|
337
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
338
|
+
"required": false
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "layout",
|
|
342
|
+
"type": "\"inline\" | \"stacked\"",
|
|
343
|
+
"default": null,
|
|
344
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
345
|
+
"required": false
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "size",
|
|
349
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
350
|
+
"default": null,
|
|
351
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
352
|
+
"required": false
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "titleAs",
|
|
356
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
357
|
+
"default": null,
|
|
358
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
359
|
+
"required": false
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "tone",
|
|
363
|
+
"type": "MascotTone",
|
|
364
|
+
"default": null,
|
|
365
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
366
|
+
"required": false
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"component": "WelcomeState",
|
|
372
|
+
"description": "A first screen, an onboarding step. `MascotState` with `mood=\"welcome\"`.",
|
|
373
|
+
"props": [
|
|
374
|
+
{
|
|
375
|
+
"name": "title",
|
|
376
|
+
"type": "ReactNode",
|
|
377
|
+
"default": null,
|
|
378
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
379
|
+
"required": true
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"name": "action",
|
|
383
|
+
"type": "ReactNode",
|
|
384
|
+
"default": null,
|
|
385
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
386
|
+
"required": false
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "animated",
|
|
390
|
+
"type": "boolean",
|
|
391
|
+
"default": null,
|
|
392
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
393
|
+
"required": false
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "bird",
|
|
397
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
398
|
+
"default": null,
|
|
399
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
400
|
+
"required": false
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "description",
|
|
404
|
+
"type": "ReactNode",
|
|
405
|
+
"default": null,
|
|
406
|
+
"description": "Why, or what comes next.",
|
|
407
|
+
"required": false
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"name": "framed",
|
|
411
|
+
"type": "boolean",
|
|
412
|
+
"default": null,
|
|
413
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
414
|
+
"required": false
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"name": "layout",
|
|
418
|
+
"type": "\"inline\" | \"stacked\"",
|
|
419
|
+
"default": null,
|
|
420
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
421
|
+
"required": false
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"name": "size",
|
|
425
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
426
|
+
"default": null,
|
|
427
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
428
|
+
"required": false
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"name": "titleAs",
|
|
432
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
433
|
+
"default": null,
|
|
434
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
435
|
+
"required": false
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "tone",
|
|
439
|
+
"type": "MascotTone",
|
|
440
|
+
"default": null,
|
|
441
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
442
|
+
"required": false
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
"examples": [
|
|
448
|
+
{
|
|
449
|
+
"name": "empty",
|
|
450
|
+
"title": "Nothing yet",
|
|
451
|
+
"description": "A framed empty list: the pigeon has no message to deliver yet.",
|
|
452
|
+
"path": "examples/mascot-state/empty.tsx",
|
|
453
|
+
"module": "@krizaka/ui/registry/examples/mascot-state/empty",
|
|
454
|
+
"code": "import { Button } from \"@krizaka/ui/button\";\nimport { MascotState } from \"@krizaka/ui/mascot-state\";\n\n// An empty inbox: the pigeon has nothing to deliver yet; the action fills it.\nexport default function MascotStateEmpty() {\n return (\n <MascotState\n bird=\"pigeon\"\n framed\n className=\"w-96\"\n title=\"No messages yet\"\n description=\"Answer a challenge or tip a creator to start a conversation.\"\n action={\n <Button variant=\"primary\" size=\"sm\">\n Find creators\n </Button>\n }\n />\n );\n}\n"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "error",
|
|
458
|
+
"title": "It failed",
|
|
459
|
+
"description": "A page that does not exist: the owl did not find it, with the way back.",
|
|
460
|
+
"path": "examples/mascot-state/error.tsx",
|
|
461
|
+
"module": "@krizaka/ui/registry/examples/mascot-state/error",
|
|
462
|
+
"code": "import { Button } from \"@krizaka/ui/button\";\nimport { ErrorState } from \"@krizaka/ui/mascot-state\";\n\n// A page that does not exist: the owl read everywhere and did not find it; the way back is the action.\nexport default function MascotStateError() {\n return (\n <ErrorState\n bird=\"owl\"\n size=\"lg\"\n titleAs=\"h1\"\n className=\"w-96\"\n title=\"This page does not exist\"\n description=\"The link may be old, or the page has moved.\"\n action={\n <Button variant=\"secondary\" size=\"sm\">\n Back to the home page\n </Button>\n }\n />\n );\n}\n"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"name": "success",
|
|
466
|
+
"title": "Done",
|
|
467
|
+
"description": "A payment received: the flamingo answers, the next step beside it.",
|
|
468
|
+
"path": "examples/mascot-state/success.tsx",
|
|
469
|
+
"module": "@krizaka/ui/registry/examples/mascot-state/success",
|
|
470
|
+
"code": "import { Button } from \"@krizaka/ui/button\";\nimport { SuccessState } from \"@krizaka/ui/mascot-state\";\n\n// A payment received: the flamingo gets paid and answers; the receipt is the next step.\nexport default function MascotStateSuccess() {\n return (\n <SuccessState\n bird=\"flamingo\"\n className=\"w-96\"\n title=\"Payment received\"\n description=\"120 credits are on your balance. The receipt is in your email.\"\n action={\n <Button variant=\"secondary\" size=\"sm\">\n See the receipt\n </Button>\n }\n />\n );\n}\n"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"name": "loading",
|
|
474
|
+
"title": "A long task",
|
|
475
|
+
"description": "The duck builds while the job runs, in a card (`layout=\"inline\"`).",
|
|
476
|
+
"path": "examples/mascot-state/loading.tsx",
|
|
477
|
+
"module": "@krizaka/ui/registry/examples/mascot-state/loading",
|
|
478
|
+
"code": "import { LoadingState } from \"@krizaka/ui/mascot-state\";\n\n// A job of a few minutes, in a card: the duck builds; the words say what runs.\nexport default function MascotStateLoading() {\n return (\n <LoadingState\n bird=\"duck\"\n size=\"sm\"\n layout=\"inline\"\n framed\n className=\"w-96\"\n title=\"Building the preview\"\n description=\"About two minutes. You can leave this page.\"\n />\n );\n}\n"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"name": "welcome",
|
|
482
|
+
"title": "Welcome",
|
|
483
|
+
"description": "An onboarding's first screen: the falcon keeps the account safe.",
|
|
484
|
+
"path": "examples/mascot-state/welcome.tsx",
|
|
485
|
+
"module": "@krizaka/ui/registry/examples/mascot-state/welcome",
|
|
486
|
+
"code": "import { Button } from \"@krizaka/ui/button\";\nimport { WelcomeState } from \"@krizaka/ui/mascot-state\";\n\n// The first step of an onboarding: the falcon keeps the account safe — the step is a second factor.\nexport default function MascotStateWelcome() {\n return (\n <WelcomeState\n bird=\"falcon\"\n className=\"w-96\"\n title=\"Welcome, Eric\"\n description=\"First, protect your account with a second factor. It takes a minute.\"\n action={\n <Button variant=\"primary\" size=\"sm\">\n Protect my account\n </Button>\n }\n />\n );\n}\n"
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
"native": {
|
|
491
|
+
"entry": "@krizaka/ui/native",
|
|
492
|
+
"import": "import { MascotState, ErrorState, SuccessState, LoadingState, WelcomeState } from \"@krizaka/ui/native\";",
|
|
493
|
+
"differences": [
|
|
494
|
+
"`title` and `description` are strings; the action is a native `Button`.",
|
|
495
|
+
"No `framed` and no `titleAs`: style with `style`.",
|
|
496
|
+
"Only the idle bob and a fade-in: the web gestures (wave, dots, hop) stay on the web."
|
|
497
|
+
],
|
|
498
|
+
"props": [
|
|
499
|
+
{
|
|
500
|
+
"component": "MascotState",
|
|
501
|
+
"description": "A moment told by a bird of the flock — an empty list, a long wait, a success, an error, a welcome — for React Native.\nAnnounced: `alert` for an error, a polite live region otherwise (`busy` while thinking).",
|
|
502
|
+
"props": [
|
|
503
|
+
{
|
|
504
|
+
"name": "title",
|
|
505
|
+
"type": "string",
|
|
506
|
+
"default": null,
|
|
507
|
+
"description": "What happened, in a few words.",
|
|
508
|
+
"required": true
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "action",
|
|
512
|
+
"type": "ReactNode",
|
|
513
|
+
"default": null,
|
|
514
|
+
"description": "What to do next: a Button.",
|
|
515
|
+
"required": false
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "animated",
|
|
519
|
+
"type": "boolean",
|
|
520
|
+
"default": "true",
|
|
521
|
+
"description": "The bird's bob and a short fade-in; still when the system reduces motion.",
|
|
522
|
+
"required": false
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"name": "bird",
|
|
526
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
527
|
+
"default": "owl",
|
|
528
|
+
"description": "The bird whose job the moment is about: `owl` (documents), `falcon` (security), `duck` (code), `flamingo` (answers, payments), `pigeon` (delivery), `lovebird` (introductions).",
|
|
529
|
+
"required": false
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "description",
|
|
533
|
+
"type": "string",
|
|
534
|
+
"default": null,
|
|
535
|
+
"description": "Why, or what comes next.",
|
|
536
|
+
"required": false
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"name": "layout",
|
|
540
|
+
"type": "\"stacked\" | \"inline\"",
|
|
541
|
+
"default": "stacked",
|
|
542
|
+
"description": "`stacked` (default): the bird above centred words. `inline`: the bird beside the words.",
|
|
543
|
+
"required": false
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"name": "mood",
|
|
547
|
+
"type": "\"success\" | \"welcome\" | \"thinking\" | \"empty\" | \"error\"",
|
|
548
|
+
"default": "empty",
|
|
549
|
+
"description": "The moment: `empty` (default), `thinking`, `success`, `error`, `welcome`.",
|
|
550
|
+
"required": false
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"name": "size",
|
|
554
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
555
|
+
"default": "md",
|
|
556
|
+
"description": "The bird's size: `sm` 64, `md` 96 (default), `lg` 128 points.",
|
|
557
|
+
"required": false
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"name": "tone",
|
|
561
|
+
"type": "MascotTone",
|
|
562
|
+
"default": null,
|
|
563
|
+
"description": "`brand` (default): the theme's accent. `own`: the bird's colours of the Krizaka story.",
|
|
564
|
+
"required": false
|
|
565
|
+
}
|
|
566
|
+
]
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"component": "ErrorState",
|
|
570
|
+
"description": "It failed: what went wrong and what to do.",
|
|
571
|
+
"props": [
|
|
572
|
+
{
|
|
573
|
+
"name": "title",
|
|
574
|
+
"type": "string",
|
|
575
|
+
"default": null,
|
|
576
|
+
"description": "What happened, in a few words.",
|
|
577
|
+
"required": true
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"name": "action",
|
|
581
|
+
"type": "ReactNode",
|
|
582
|
+
"default": null,
|
|
583
|
+
"description": "What to do next: a Button.",
|
|
584
|
+
"required": false
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"name": "animated",
|
|
588
|
+
"type": "boolean",
|
|
589
|
+
"default": null,
|
|
590
|
+
"description": "The bird's bob and a short fade-in; still when the system reduces motion.",
|
|
591
|
+
"required": false
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"name": "bird",
|
|
595
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
596
|
+
"default": null,
|
|
597
|
+
"description": "The bird whose job the moment is about: `owl` (documents), `falcon` (security), `duck` (code), `flamingo` (answers, payments), `pigeon` (delivery), `lovebird` (introductions).",
|
|
598
|
+
"required": false
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "description",
|
|
602
|
+
"type": "string",
|
|
603
|
+
"default": null,
|
|
604
|
+
"description": "Why, or what comes next.",
|
|
605
|
+
"required": false
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"name": "layout",
|
|
609
|
+
"type": "\"stacked\" | \"inline\"",
|
|
610
|
+
"default": null,
|
|
611
|
+
"description": "`stacked` (default): the bird above centred words. `inline`: the bird beside the words.",
|
|
612
|
+
"required": false
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"name": "size",
|
|
616
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
617
|
+
"default": null,
|
|
618
|
+
"description": "The bird's size: `sm` 64, `md` 96 (default), `lg` 128 points.",
|
|
619
|
+
"required": false
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "tone",
|
|
623
|
+
"type": "MascotTone",
|
|
624
|
+
"default": null,
|
|
625
|
+
"description": "`brand` (default): the theme's accent. `own`: the bird's colours of the Krizaka story.",
|
|
626
|
+
"required": false
|
|
627
|
+
}
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"component": "SuccessState",
|
|
632
|
+
"description": "It is done: a payment, a verification, a delivery.",
|
|
633
|
+
"props": [
|
|
634
|
+
{
|
|
635
|
+
"name": "title",
|
|
636
|
+
"type": "string",
|
|
637
|
+
"default": null,
|
|
638
|
+
"description": "What happened, in a few words.",
|
|
639
|
+
"required": true
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"name": "action",
|
|
643
|
+
"type": "ReactNode",
|
|
644
|
+
"default": null,
|
|
645
|
+
"description": "What to do next: a Button.",
|
|
646
|
+
"required": false
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"name": "animated",
|
|
650
|
+
"type": "boolean",
|
|
651
|
+
"default": null,
|
|
652
|
+
"description": "The bird's bob and a short fade-in; still when the system reduces motion.",
|
|
653
|
+
"required": false
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"name": "bird",
|
|
657
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
658
|
+
"default": null,
|
|
659
|
+
"description": "The bird whose job the moment is about: `owl` (documents), `falcon` (security), `duck` (code), `flamingo` (answers, payments), `pigeon` (delivery), `lovebird` (introductions).",
|
|
660
|
+
"required": false
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "description",
|
|
664
|
+
"type": "string",
|
|
665
|
+
"default": null,
|
|
666
|
+
"description": "Why, or what comes next.",
|
|
667
|
+
"required": false
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"name": "layout",
|
|
671
|
+
"type": "\"stacked\" | \"inline\"",
|
|
672
|
+
"default": null,
|
|
673
|
+
"description": "`stacked` (default): the bird above centred words. `inline`: the bird beside the words.",
|
|
674
|
+
"required": false
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"name": "size",
|
|
678
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
679
|
+
"default": null,
|
|
680
|
+
"description": "The bird's size: `sm` 64, `md` 96 (default), `lg` 128 points.",
|
|
681
|
+
"required": false
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"name": "tone",
|
|
685
|
+
"type": "MascotTone",
|
|
686
|
+
"default": null,
|
|
687
|
+
"description": "`brand` (default): the theme's accent. `own`: the bird's colours of the Krizaka story.",
|
|
688
|
+
"required": false
|
|
689
|
+
}
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"component": "LoadingState",
|
|
694
|
+
"description": "A long task runs: what runs, beside the bird.",
|
|
695
|
+
"props": [
|
|
696
|
+
{
|
|
697
|
+
"name": "title",
|
|
698
|
+
"type": "string",
|
|
699
|
+
"default": null,
|
|
700
|
+
"description": "What happened, in a few words.",
|
|
701
|
+
"required": true
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"name": "action",
|
|
705
|
+
"type": "ReactNode",
|
|
706
|
+
"default": null,
|
|
707
|
+
"description": "What to do next: a Button.",
|
|
708
|
+
"required": false
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"name": "animated",
|
|
712
|
+
"type": "boolean",
|
|
713
|
+
"default": null,
|
|
714
|
+
"description": "The bird's bob and a short fade-in; still when the system reduces motion.",
|
|
715
|
+
"required": false
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"name": "bird",
|
|
719
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
720
|
+
"default": null,
|
|
721
|
+
"description": "The bird whose job the moment is about: `owl` (documents), `falcon` (security), `duck` (code), `flamingo` (answers, payments), `pigeon` (delivery), `lovebird` (introductions).",
|
|
722
|
+
"required": false
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"name": "description",
|
|
726
|
+
"type": "string",
|
|
727
|
+
"default": null,
|
|
728
|
+
"description": "Why, or what comes next.",
|
|
729
|
+
"required": false
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"name": "layout",
|
|
733
|
+
"type": "\"stacked\" | \"inline\"",
|
|
734
|
+
"default": null,
|
|
735
|
+
"description": "`stacked` (default): the bird above centred words. `inline`: the bird beside the words.",
|
|
736
|
+
"required": false
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"name": "size",
|
|
740
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
741
|
+
"default": null,
|
|
742
|
+
"description": "The bird's size: `sm` 64, `md` 96 (default), `lg` 128 points.",
|
|
743
|
+
"required": false
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"name": "tone",
|
|
747
|
+
"type": "MascotTone",
|
|
748
|
+
"default": null,
|
|
749
|
+
"description": "`brand` (default): the theme's accent. `own`: the bird's colours of the Krizaka story.",
|
|
750
|
+
"required": false
|
|
751
|
+
}
|
|
752
|
+
]
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"component": "WelcomeState",
|
|
756
|
+
"description": "A first screen, an onboarding step.",
|
|
757
|
+
"props": [
|
|
758
|
+
{
|
|
759
|
+
"name": "title",
|
|
760
|
+
"type": "string",
|
|
761
|
+
"default": null,
|
|
762
|
+
"description": "What happened, in a few words.",
|
|
763
|
+
"required": true
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"name": "action",
|
|
767
|
+
"type": "ReactNode",
|
|
768
|
+
"default": null,
|
|
769
|
+
"description": "What to do next: a Button.",
|
|
770
|
+
"required": false
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"name": "animated",
|
|
774
|
+
"type": "boolean",
|
|
775
|
+
"default": null,
|
|
776
|
+
"description": "The bird's bob and a short fade-in; still when the system reduces motion.",
|
|
777
|
+
"required": false
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"name": "bird",
|
|
781
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
782
|
+
"default": null,
|
|
783
|
+
"description": "The bird whose job the moment is about: `owl` (documents), `falcon` (security), `duck` (code), `flamingo` (answers, payments), `pigeon` (delivery), `lovebird` (introductions).",
|
|
784
|
+
"required": false
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"name": "description",
|
|
788
|
+
"type": "string",
|
|
789
|
+
"default": null,
|
|
790
|
+
"description": "Why, or what comes next.",
|
|
791
|
+
"required": false
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"name": "layout",
|
|
795
|
+
"type": "\"stacked\" | \"inline\"",
|
|
796
|
+
"default": null,
|
|
797
|
+
"description": "`stacked` (default): the bird above centred words. `inline`: the bird beside the words.",
|
|
798
|
+
"required": false
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"name": "size",
|
|
802
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
803
|
+
"default": null,
|
|
804
|
+
"description": "The bird's size: `sm` 64, `md` 96 (default), `lg` 128 points.",
|
|
805
|
+
"required": false
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"name": "tone",
|
|
809
|
+
"type": "MascotTone",
|
|
810
|
+
"default": null,
|
|
811
|
+
"description": "`brand` (default): the theme's accent. `own`: the bird's colours of the Krizaka story.",
|
|
812
|
+
"required": false
|
|
813
|
+
}
|
|
814
|
+
]
|
|
815
|
+
}
|
|
816
|
+
],
|
|
817
|
+
"examples": [
|
|
818
|
+
{
|
|
819
|
+
"name": "default",
|
|
820
|
+
"title": "Default",
|
|
821
|
+
"description": "A payment received (flamingo) and a verification that failed (falcon).",
|
|
822
|
+
"path": "examples/mascot-state/native/default.tsx",
|
|
823
|
+
"module": "@krizaka/ui/registry/examples/mascot-state/native/default",
|
|
824
|
+
"code": "import { Button, ErrorState, SuccessState } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// A payment received (the flamingo gets paid) and a verification that failed (the falcon watches).\nexport default function NativeMascotStateDefault() {\n return (\n <View style={{ width: 320, gap: 8 }}>\n <SuccessState bird=\"flamingo\" size=\"sm\" animated={false} title=\"Payment received\" description=\"120 credits are on your balance.\" />\n <ErrorState\n bird=\"falcon\"\n size=\"sm\"\n animated={false}\n title=\"We could not verify this code\"\n description=\"It may have expired. Ask for a new one.\"\n action={<Button variant=\"secondary\" label=\"Send a new code\" />}\n />\n </View>\n );\n}\n",
|
|
825
|
+
"screenshots": {
|
|
826
|
+
"dark": "examples/mascot-state/native/default.dark.png",
|
|
827
|
+
"light": "examples/mascot-state/native/default.light.png"
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
]
|
|
831
|
+
},
|
|
832
|
+
"files": [
|
|
833
|
+
{
|
|
834
|
+
"path": "mascot-state/index.ts",
|
|
835
|
+
"content": "/** @krizaka/ui/mascot-state — `MascotState` and its moments (`ErrorState`, `SuccessState`, `LoadingState`, `WelcomeState`). Client: the bird has an id per instance. */\nexport { ErrorState, LoadingState, MascotState, mascotState, type MascotStateProps, SuccessState, WelcomeState } from \"./mascot-state\";\n"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"path": "mascot-state/mascot-state.tsx",
|
|
839
|
+
"content": "// The moments a product speaks to a person — nothing yet, a long wait, done, it failed, welcome — told by a bird of\n// the flock beside the words. Every word is a prop; the bird never carries the message alone.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport type { MascotBird, MascotMood, MascotTone } from \"../mascots/geometry\";\nimport { Mascot } from \"../mascots/mascot\";\n\n// Staged: the bird arrives, then the words, then the action — once, and not at all under reduced motion.\nconst CSS = `\n@keyframes kzms-in { from { opacity: 0; transform: translateY(6px); } }\n@media (prefers-reduced-motion: no-preference) {\n [data-kzms-staged] > [data-kzms-part] { animation: kzms-in .42s cubic-bezier(.2,.8,.2,1) both; }\n [data-kzms-staged] > [data-kzms-part=\"words\"] { animation-delay: .12s; }\n [data-kzms-staged] > [data-kzms-part=\"action\"] { animation-delay: .24s; }\n}\n`;\n\nexport const mascotState = tv({\n slots: {\n root: \"flex items-center gap-4 text-fg\",\n bird: \"shrink-0\",\n words: \"flex flex-col gap-1.5\",\n title: \"text-base font-semibold text-fg\",\n description: \"max-w-sm text-sm text-fg-secondary\",\n action: \"flex flex-wrap items-center gap-2\",\n },\n variants: {\n layout: {\n stacked: { root: \"flex-col justify-center px-6 py-10 text-center\", words: \"items-center\", action: \"justify-center\" },\n inline: { root: \"flex-row text-left\", action: \"mt-1\" },\n },\n framed: { true: { root: \"rounded-xl border border-dashed border-border-default bg-surface-1\" }, false: {} },\n },\n compoundVariants: [{ layout: \"inline\", framed: true, class: { root: \"p-4\" } }],\n defaultVariants: { layout: \"stacked\", framed: false },\n});\n\nconst SIZE = { sm: 64, md: 96, lg: 128 } as const;\n\nexport type MascotStateProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /**\n * The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n * (code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.\n */\n bird?: MascotBird;\n /** The moment: `empty` (nothing yet), `thinking` (a long task runs), `success` (done), `error` (it failed), `welcome`. */\n mood?: MascotMood;\n /** What happened, in a few words (\"No videos yet\", \"Payment received\"). */\n title: React.ReactNode;\n /** Why, or what comes next. */\n description?: React.ReactNode;\n /** What to do next: a Button, a link. One, at most two. */\n action?: React.ReactNode;\n /** The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px. */\n size?: keyof typeof SIZE;\n /** `stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form. */\n layout?: \"stacked\" | \"inline\";\n /** A dashed frame on the raised surface, for an empty list or panel. */\n framed?: boolean;\n /** `brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story. */\n tone?: MascotTone;\n /** The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`. */\n animated?: boolean;\n /** The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page. */\n titleAs?: \"p\" | \"h1\" | \"h2\" | \"h3\";\n};\n\n/**\n * A moment told by a bird of the flock: an empty list, a long wait, a success, an error, a welcome. Announced to\n * assistive technology — `role=\"alert\"` for an error, `role=\"status\"` otherwise (`aria-busy` while thinking).\n */\nexport function MascotState({\n bird = \"owl\",\n mood = \"empty\",\n title,\n description,\n action,\n size = \"md\",\n layout,\n framed,\n tone,\n animated = true,\n titleAs: Title = \"p\",\n className,\n ...props\n}: MascotStateProps) {\n const s = mascotState({ layout, framed });\n return (\n <div\n role={mood === \"error\" ? \"alert\" : \"status\"}\n aria-busy={mood === \"thinking\" ? true : undefined}\n data-mood={mood}\n data-kzms-staged={animated ? \"\" : undefined}\n className={s.root({ className })}\n {...props}\n >\n {animated && <style>{CSS}</style>}\n <span data-kzms-part=\"bird\" className={s.bird()}>\n <Mascot bird={bird} mood={mood} tone={tone} size={SIZE[size]} animated={animated} />\n </span>\n <div data-kzms-part=\"words\" className={s.words()}>\n <Title className={s.title()}>{title}</Title>\n {description && <p className={s.description()}>{description}</p>}\n {layout === \"inline\" && action && <div className={s.action()}>{action}</div>}\n </div>\n {layout !== \"inline\" && action && (\n <div data-kzms-part=\"action\" className={s.action()}>\n {action}\n </div>\n )}\n </div>\n );\n}\n\ntype PresetProps = Omit<MascotStateProps, \"mood\">;\n\n/** It failed: what went wrong and what to do (`role=\"alert\"`). `MascotState` with `mood=\"error\"`. */\nexport function ErrorState(props: PresetProps) {\n return <MascotState mood=\"error\" {...props} />;\n}\n\n/** It is done: a payment, a verification, a delivery, a sent message. `MascotState` with `mood=\"success\"`. */\nexport function SuccessState(props: PresetProps) {\n return <MascotState mood=\"success\" {...props} />;\n}\n\n/** A long task runs (`aria-busy`): what runs, beside the bird. `MascotState` with `mood=\"thinking\"`. */\nexport function LoadingState(props: PresetProps) {\n return <MascotState mood=\"thinking\" {...props} />;\n}\n\n/** A first screen, an onboarding step. `MascotState` with `mood=\"welcome\"`. */\nexport function WelcomeState(props: PresetProps) {\n return <MascotState mood=\"welcome\" {...props} />;\n}\n"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"path": "mascot-state/meta.ts",
|
|
843
|
+
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Mascot state\",\n summary:\n \"A moment told by a bird of the flock: nothing yet, a long wait, done, it failed, welcome — the bird of the job beside the words and the next action.\",\n status: \"beta\",\n category: \"feedback\",\n platforms: \"both\",\n whenToUse: [\n \"An empty list or search the person reaches for the first time (`mood=\\\"empty\\\"`, `framed`).\",\n \"A page or a panel that failed: a 404, a lost connection, a refused payment (`ErrorState`).\",\n \"The end of something that matters: a payment received, an identity verified, a message sent (`SuccessState`).\",\n \"A task of several seconds or more, with what runs in words (`LoadingState`).\",\n \"The first screen of an onboarding (`WelcomeState`).\",\n ],\n whenNotToUse: [\n { when: \"A short wait of a second or two, or a list that is loading.\", use: \"skeleton\" },\n { when: \"An error inside a form or a card, next to what it concerns.\", use: \"alert\" },\n { when: \"A result that needs no moment: a saved setting, a copied link.\", use: \"toast\" },\n { when: \"A plain empty list in a dense screen (a table, a sidebar).\", use: \"empty-state\" },\n ],\n bestPractices: [\n \"Choose the bird by the job, not by the mood: the owl reads (documents, search), the falcon watches (security, verification), the duck builds (code, uploads), the flamingo answers and gets paid (support, payments), the pigeon delivers (messages, notifications), the lovebird introduces (matches, introductions).\",\n \"One bird per screen: a moment, never decoration in working content.\",\n \"The title says what happened in a few words, the description what comes next; one action — the way out.\",\n \"`titleAs=\\\"h1\\\"` when the state is the whole page (a 404), so the page keeps a heading.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"`role=\\\"alert\\\"` for an error, `role=\\\"status\\\"` otherwise: announced when it appears; `aria-busy` while thinking.\",\n \"The bird is decorative: the title and the description carry the meaning.\",\n \"The staged arrival (bird, words, action) and the bird's gesture stop under `prefers-reduced-motion` and with `animated={false}`.\",\n ],\n },\n related: [\"mascots\", \"empty-state\", \"alert\", \"progress\"],\n web: {\n imports: [\"MascotState\", \"ErrorState\", \"SuccessState\", \"LoadingState\", \"WelcomeState\"],\n examples: [\n { name: \"empty\", title: \"Nothing yet\", description: \"A framed empty list: the pigeon has no message to deliver yet.\" },\n { name: \"error\", title: \"It failed\", description: \"A page that does not exist: the owl did not find it, with the way back.\" },\n { name: \"success\", title: \"Done\", description: \"A payment received: the flamingo answers, the next step beside it.\" },\n { name: \"loading\", title: \"A long task\", description: \"The duck builds while the job runs, in a card (`layout=\\\"inline\\\"`).\" },\n { name: \"welcome\", title: \"Welcome\", description: \"An onboarding's first screen: the falcon keeps the account safe.\" },\n ],\n },\n native: {\n imports: [\"MascotState\", \"ErrorState\", \"SuccessState\", \"LoadingState\", \"WelcomeState\"],\n differences: [\"`title` and `description` are strings; the action is a native `Button`.\", \"No `framed` and no `titleAs`: style with `style`.\", \"Only the idle bob and a fade-in: the web gestures (wave, dots, hop) stay on the web.\"],\n examples: [{ name: \"default\", title: \"Default\", description: \"A payment received (flamingo) and a verification that failed (falcon).\" }],\n },\n} satisfies ComponentMeta;\n"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"path": "meta.ts",
|
|
847
|
+
"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 | \"action-bar\"\n | \"alert\"\n | \"argument-card\"\n | \"audio-player\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"cta-panel\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"glow-card\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"link-card\"\n | \"loader\"\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 | \"progress\"\n | \"radio-group\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\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\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 */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"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\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"
|
|
848
|
+
}
|
|
849
|
+
],
|
|
850
|
+
"dependencies": [
|
|
851
|
+
"tailwind-variants@^3.3.1"
|
|
852
|
+
],
|
|
853
|
+
"registryDependencies": [
|
|
854
|
+
"mascots"
|
|
855
|
+
],
|
|
856
|
+
"demo": {
|
|
857
|
+
"path": "examples/mascot-state/empty.tsx",
|
|
858
|
+
"content": "import { Button } from \"@krizaka/ui/button\";\nimport { MascotState } from \"@krizaka/ui/mascot-state\";\n\n// An empty inbox: the pigeon has nothing to deliver yet; the action fills it.\nexport default function MascotStateEmpty() {\n return (\n <MascotState\n bird=\"pigeon\"\n framed\n className=\"w-96\"\n title=\"No messages yet\"\n description=\"Answer a challenge or tip a creator to start a conversation.\"\n action={\n <Button variant=\"primary\" size=\"sm\">\n Find creators\n </Button>\n }\n />\n );\n}\n"
|
|
859
|
+
},
|
|
860
|
+
"props": [
|
|
861
|
+
{
|
|
862
|
+
"component": "ErrorState",
|
|
863
|
+
"description": "It failed: what went wrong and what to do (`role=\"alert\"`). `MascotState` with `mood=\"error\"`.",
|
|
864
|
+
"props": [
|
|
865
|
+
{
|
|
866
|
+
"name": "title",
|
|
867
|
+
"type": "ReactNode",
|
|
868
|
+
"default": null,
|
|
869
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
870
|
+
"required": true
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"name": "action",
|
|
874
|
+
"type": "ReactNode",
|
|
875
|
+
"default": null,
|
|
876
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
877
|
+
"required": false
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"name": "animated",
|
|
881
|
+
"type": "boolean",
|
|
882
|
+
"default": null,
|
|
883
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
884
|
+
"required": false
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"name": "bird",
|
|
888
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
889
|
+
"default": null,
|
|
890
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
891
|
+
"required": false
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"name": "description",
|
|
895
|
+
"type": "ReactNode",
|
|
896
|
+
"default": null,
|
|
897
|
+
"description": "Why, or what comes next.",
|
|
898
|
+
"required": false
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
"name": "framed",
|
|
902
|
+
"type": "boolean",
|
|
903
|
+
"default": null,
|
|
904
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
905
|
+
"required": false
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"name": "layout",
|
|
909
|
+
"type": "\"inline\" | \"stacked\"",
|
|
910
|
+
"default": null,
|
|
911
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
912
|
+
"required": false
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"name": "size",
|
|
916
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
917
|
+
"default": null,
|
|
918
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
919
|
+
"required": false
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
"name": "titleAs",
|
|
923
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
924
|
+
"default": null,
|
|
925
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
926
|
+
"required": false
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"name": "tone",
|
|
930
|
+
"type": "MascotTone",
|
|
931
|
+
"default": null,
|
|
932
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
933
|
+
"required": false
|
|
934
|
+
}
|
|
935
|
+
]
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"component": "LoadingState",
|
|
939
|
+
"description": "A long task runs (`aria-busy`): what runs, beside the bird. `MascotState` with `mood=\"thinking\"`.",
|
|
940
|
+
"props": [
|
|
941
|
+
{
|
|
942
|
+
"name": "title",
|
|
943
|
+
"type": "ReactNode",
|
|
944
|
+
"default": null,
|
|
945
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
946
|
+
"required": true
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"name": "action",
|
|
950
|
+
"type": "ReactNode",
|
|
951
|
+
"default": null,
|
|
952
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
953
|
+
"required": false
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"name": "animated",
|
|
957
|
+
"type": "boolean",
|
|
958
|
+
"default": null,
|
|
959
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
960
|
+
"required": false
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
"name": "bird",
|
|
964
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
965
|
+
"default": null,
|
|
966
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
967
|
+
"required": false
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"name": "description",
|
|
971
|
+
"type": "ReactNode",
|
|
972
|
+
"default": null,
|
|
973
|
+
"description": "Why, or what comes next.",
|
|
974
|
+
"required": false
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"name": "framed",
|
|
978
|
+
"type": "boolean",
|
|
979
|
+
"default": null,
|
|
980
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
981
|
+
"required": false
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"name": "layout",
|
|
985
|
+
"type": "\"inline\" | \"stacked\"",
|
|
986
|
+
"default": null,
|
|
987
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
988
|
+
"required": false
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
"name": "size",
|
|
992
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
993
|
+
"default": null,
|
|
994
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
995
|
+
"required": false
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
"name": "titleAs",
|
|
999
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
1000
|
+
"default": null,
|
|
1001
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
1002
|
+
"required": false
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"name": "tone",
|
|
1006
|
+
"type": "MascotTone",
|
|
1007
|
+
"default": null,
|
|
1008
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
1009
|
+
"required": false
|
|
1010
|
+
}
|
|
1011
|
+
]
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
"component": "MascotState",
|
|
1015
|
+
"description": "A moment told by a bird of the flock: an empty list, a long wait, a success, an error, a welcome. Announced to\nassistive technology — `role=\"alert\"` for an error, `role=\"status\"` otherwise (`aria-busy` while thinking).",
|
|
1016
|
+
"props": [
|
|
1017
|
+
{
|
|
1018
|
+
"name": "title",
|
|
1019
|
+
"type": "ReactNode",
|
|
1020
|
+
"default": null,
|
|
1021
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
1022
|
+
"required": true
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"name": "action",
|
|
1026
|
+
"type": "ReactNode",
|
|
1027
|
+
"default": null,
|
|
1028
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
1029
|
+
"required": false
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"name": "animated",
|
|
1033
|
+
"type": "boolean",
|
|
1034
|
+
"default": "true",
|
|
1035
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
1036
|
+
"required": false
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"name": "bird",
|
|
1040
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
1041
|
+
"default": "owl",
|
|
1042
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
1043
|
+
"required": false
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
"name": "description",
|
|
1047
|
+
"type": "ReactNode",
|
|
1048
|
+
"default": null,
|
|
1049
|
+
"description": "Why, or what comes next.",
|
|
1050
|
+
"required": false
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"name": "framed",
|
|
1054
|
+
"type": "boolean",
|
|
1055
|
+
"default": null,
|
|
1056
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
1057
|
+
"required": false
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
"name": "layout",
|
|
1061
|
+
"type": "\"inline\" | \"stacked\"",
|
|
1062
|
+
"default": null,
|
|
1063
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
1064
|
+
"required": false
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"name": "mood",
|
|
1068
|
+
"type": "\"success\" | \"error\" | \"empty\" | \"welcome\" | \"thinking\"",
|
|
1069
|
+
"default": "empty",
|
|
1070
|
+
"description": "The moment: `empty` (nothing yet), `thinking` (a long task runs), `success` (done), `error` (it failed), `welcome`.",
|
|
1071
|
+
"required": false
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"name": "size",
|
|
1075
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
1076
|
+
"default": "md",
|
|
1077
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
1078
|
+
"required": false
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"name": "titleAs",
|
|
1082
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
1083
|
+
"default": "p",
|
|
1084
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
1085
|
+
"required": false
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"name": "tone",
|
|
1089
|
+
"type": "MascotTone",
|
|
1090
|
+
"default": null,
|
|
1091
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
1092
|
+
"required": false
|
|
1093
|
+
}
|
|
1094
|
+
]
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"component": "SuccessState",
|
|
1098
|
+
"description": "It is done: a payment, a verification, a delivery, a sent message. `MascotState` with `mood=\"success\"`.",
|
|
1099
|
+
"props": [
|
|
1100
|
+
{
|
|
1101
|
+
"name": "title",
|
|
1102
|
+
"type": "ReactNode",
|
|
1103
|
+
"default": null,
|
|
1104
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
1105
|
+
"required": true
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
"name": "action",
|
|
1109
|
+
"type": "ReactNode",
|
|
1110
|
+
"default": null,
|
|
1111
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
1112
|
+
"required": false
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"name": "animated",
|
|
1116
|
+
"type": "boolean",
|
|
1117
|
+
"default": null,
|
|
1118
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
1119
|
+
"required": false
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"name": "bird",
|
|
1123
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
1124
|
+
"default": null,
|
|
1125
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
1126
|
+
"required": false
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
"name": "description",
|
|
1130
|
+
"type": "ReactNode",
|
|
1131
|
+
"default": null,
|
|
1132
|
+
"description": "Why, or what comes next.",
|
|
1133
|
+
"required": false
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
"name": "framed",
|
|
1137
|
+
"type": "boolean",
|
|
1138
|
+
"default": null,
|
|
1139
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
1140
|
+
"required": false
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
"name": "layout",
|
|
1144
|
+
"type": "\"inline\" | \"stacked\"",
|
|
1145
|
+
"default": null,
|
|
1146
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
1147
|
+
"required": false
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"name": "size",
|
|
1151
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
1152
|
+
"default": null,
|
|
1153
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
1154
|
+
"required": false
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"name": "titleAs",
|
|
1158
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
1159
|
+
"default": null,
|
|
1160
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
1161
|
+
"required": false
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"name": "tone",
|
|
1165
|
+
"type": "MascotTone",
|
|
1166
|
+
"default": null,
|
|
1167
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
1168
|
+
"required": false
|
|
1169
|
+
}
|
|
1170
|
+
]
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
"component": "WelcomeState",
|
|
1174
|
+
"description": "A first screen, an onboarding step. `MascotState` with `mood=\"welcome\"`.",
|
|
1175
|
+
"props": [
|
|
1176
|
+
{
|
|
1177
|
+
"name": "title",
|
|
1178
|
+
"type": "ReactNode",
|
|
1179
|
+
"default": null,
|
|
1180
|
+
"description": "What happened, in a few words (\"No videos yet\", \"Payment received\").",
|
|
1181
|
+
"required": true
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
"name": "action",
|
|
1185
|
+
"type": "ReactNode",
|
|
1186
|
+
"default": null,
|
|
1187
|
+
"description": "What to do next: a Button, a link. One, at most two.",
|
|
1188
|
+
"required": false
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
"name": "animated",
|
|
1192
|
+
"type": "boolean",
|
|
1193
|
+
"default": null,
|
|
1194
|
+
"description": "The bird's gesture and the staged arrival. Off with `false`; always off under `prefers-reduced-motion`.",
|
|
1195
|
+
"required": false
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"name": "bird",
|
|
1199
|
+
"type": "\"falcon\" | \"owl\" | \"duck\" | \"flamingo\" | \"pigeon\" | \"lovebird\"",
|
|
1200
|
+
"default": null,
|
|
1201
|
+
"description": "The bird whose job the moment is about: `owl` (documents, reading), `falcon` (security, verification), `duck`\n(code, building), `flamingo` (answers, payments), `pigeon` (delivery, notifications), `lovebird` (introductions). One bird per idea.",
|
|
1202
|
+
"required": false
|
|
1203
|
+
},
|
|
1204
|
+
{
|
|
1205
|
+
"name": "description",
|
|
1206
|
+
"type": "ReactNode",
|
|
1207
|
+
"default": null,
|
|
1208
|
+
"description": "Why, or what comes next.",
|
|
1209
|
+
"required": false
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"name": "framed",
|
|
1213
|
+
"type": "boolean",
|
|
1214
|
+
"default": null,
|
|
1215
|
+
"description": "A dashed frame on the raised surface, for an empty list or panel.",
|
|
1216
|
+
"required": false
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"name": "layout",
|
|
1220
|
+
"type": "\"inline\" | \"stacked\"",
|
|
1221
|
+
"default": null,
|
|
1222
|
+
"description": "`stacked` (default): the bird above centred words — a page, a panel. `inline`: the bird beside the words — a card, a row of a form.",
|
|
1223
|
+
"required": false
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"name": "size",
|
|
1227
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
1228
|
+
"default": null,
|
|
1229
|
+
"description": "The bird's size: `sm` 64 px, `md` 96 px (default), `lg` 128 px.",
|
|
1230
|
+
"required": false
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
"name": "titleAs",
|
|
1234
|
+
"type": "\"h1\" | \"h2\" | \"h3\" | \"p\"",
|
|
1235
|
+
"default": null,
|
|
1236
|
+
"description": "The level of the title (default `p`): `h1` on a full page (a 404), `h2`/`h3` inside a page.",
|
|
1237
|
+
"required": false
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
"name": "tone",
|
|
1241
|
+
"type": "MascotTone",
|
|
1242
|
+
"default": null,
|
|
1243
|
+
"description": "`brand` (default): the product's accent. `own`: the bird's colours of the Krizaka story.",
|
|
1244
|
+
"required": false
|
|
1245
|
+
}
|
|
1246
|
+
]
|
|
1247
|
+
}
|
|
1248
|
+
]
|
|
1249
|
+
}
|