@godxjp/ui 28.9.0 → 28.10.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/agent/START-HERE.md +193 -0
- package/agent/anti-ai-tells.json +158 -0
- package/agent/components/Accordion.json +60 -0
- package/agent/components/AccountChip.json +59 -0
- package/agent/components/Actions.json +78 -0
- package/agent/components/Activity.json +80 -0
- package/agent/components/Affix.json +78 -0
- package/agent/components/Alert.json +65 -0
- package/agent/components/AlertDialog.json +109 -0
- package/agent/components/AlertDialogRoot.json +52 -0
- package/agent/components/Anchor.json +119 -0
- package/agent/components/AppLauncher.json +95 -0
- package/agent/components/AppProvider.json +105 -0
- package/agent/components/AppSettingPicker.json +88 -0
- package/agent/components/AppSettingToggle.json +70 -0
- package/agent/components/AppShell.json +159 -0
- package/agent/components/AreaChart.json +105 -0
- package/agent/components/AspectRatio.json +38 -0
- package/agent/components/Attachments.json +76 -0
- package/agent/components/AuthAccountSummary.json +64 -0
- package/agent/components/AuthDivider.json +35 -0
- package/agent/components/AuthFooter.json +48 -0
- package/agent/components/AuthIdentity.json +42 -0
- package/agent/components/AuthShell.json +108 -0
- package/agent/components/AuthStack.json +21 -0
- package/agent/components/Avatar.json +89 -0
- package/agent/components/Badge.json +96 -0
- package/agent/components/Banner.json +48 -0
- package/agent/components/BarChart.json +108 -0
- package/agent/components/BranchScopePicker.json +89 -0
- package/agent/components/Breadcrumb.json +54 -0
- package/agent/components/Button.json +133 -0
- package/agent/components/Calendar.json +259 -0
- package/agent/components/Callout.json +46 -0
- package/agent/components/Card.json +112 -0
- package/agent/components/CardBar.json +49 -0
- package/agent/components/CardContent.json +51 -0
- package/agent/components/Carousel.json +50 -0
- package/agent/components/Cascader.json +209 -0
- package/agent/components/CenteredShell.json +66 -0
- package/agent/components/ChatBubble.json +100 -0
- package/agent/components/ChatBubbleList.json +64 -0
- package/agent/components/ChatComposer.json +160 -0
- package/agent/components/ChatSuggestion.json +86 -0
- package/agent/components/Checkbox.json +68 -0
- package/agent/components/CheckboxGroup.json +96 -0
- package/agent/components/CodeBlock.json +64 -0
- package/agent/components/Collapsible.json +74 -0
- package/agent/components/ColorPicker.json +87 -0
- package/agent/components/Command.json +168 -0
- package/agent/components/CommandPalette.json +84 -0
- package/agent/components/CompactBarTrend.json +101 -0
- package/agent/components/Conversations.json +82 -0
- package/agent/components/CredentialReveal.json +93 -0
- package/agent/components/DataState.json +79 -0
- package/agent/components/DataTable.json +268 -0
- package/agent/components/DatePicker.json +275 -0
- package/agent/components/Descriptions.json +67 -0
- package/agent/components/Dialog.json +78 -0
- package/agent/components/DraggablePanel.json +106 -0
- package/agent/components/DropdownMenu.json +102 -0
- package/agent/components/EmptyState.json +83 -0
- package/agent/components/ErrorSurface.json +128 -0
- package/agent/components/FeatureList.json +43 -0
- package/agent/components/Field.json +64 -0
- package/agent/components/FilterBar.json +99 -0
- package/agent/components/Flex.json +153 -0
- package/agent/components/FloatButton.json +91 -0
- package/agent/components/Form.json +87 -0
- package/agent/components/FormErrors.json +51 -0
- package/agent/components/FormField.json +137 -0
- package/agent/components/FormFieldArray.json +39 -0
- package/agent/components/FormFieldControl.json +129 -0
- package/agent/components/FormRoot.json +122 -0
- package/agent/components/Heading.json +61 -0
- package/agent/components/HoverCard.json +55 -0
- package/agent/components/Icon.json +60 -0
- package/agent/components/InfiniteQueryState.json +58 -0
- package/agent/components/Input.json +122 -0
- package/agent/components/InputOTP.json +106 -0
- package/agent/components/Label.json +43 -0
- package/agent/components/LegalDocumentShell.json +102 -0
- package/agent/components/Legend.json +42 -0
- package/agent/components/LineChart.json +103 -0
- package/agent/components/Link.json +41 -0
- package/agent/components/ListRow.json +92 -0
- package/agent/components/Logo.json +85 -0
- package/agent/components/Marquee.json +91 -0
- package/agent/components/Masonry.json +82 -0
- package/agent/components/MasterDetail.json +95 -0
- package/agent/components/MegaMenu.json +120 -0
- package/agent/components/MobileShell.json +73 -0
- package/agent/components/NavList.json +63 -0
- package/agent/components/NumberInput.json +158 -0
- package/agent/components/OrgSwitcher.json +89 -0
- package/agent/components/OverlayPortalProvider.json +42 -0
- package/agent/components/PageContainer.json +181 -0
- package/agent/components/Pagination.json +132 -0
- package/agent/components/Paragraph.json +40 -0
- package/agent/components/PasswordInput.json +79 -0
- package/agent/components/PasswordStrength.json +51 -0
- package/agent/components/PermissionMatrix.json +81 -0
- package/agent/components/PieChart.json +99 -0
- package/agent/components/Popover.json +110 -0
- package/agent/components/PrefetchLink.json +65 -0
- package/agent/components/Progress.json +79 -0
- package/agent/components/Prose.json +57 -0
- package/agent/components/QrCode.json +62 -0
- package/agent/components/Radio.json +98 -0
- package/agent/components/RadioGroup.json +91 -0
- package/agent/components/RangeTimeline.json +80 -0
- package/agent/components/Rating.json +92 -0
- package/agent/components/ResizablePanel.json +69 -0
- package/agent/components/ResponsiveGrid.json +77 -0
- package/agent/components/Reveal.json +70 -0
- package/agent/components/ScrollArea.json +104 -0
- package/agent/components/SearchInput.json +98 -0
- package/agent/components/Segmented.json +96 -0
- package/agent/components/Select.json +397 -0
- package/agent/components/Separator.json +86 -0
- package/agent/components/ServiceCatalogCta.json +46 -0
- package/agent/components/ServiceLauncherCard.json +86 -0
- package/agent/components/ServiceRolePanel.json +83 -0
- package/agent/components/Sheet.json +85 -0
- package/agent/components/Sidebar.json +118 -0
- package/agent/components/Skeleton.json +57 -0
- package/agent/components/SkeletonArticle.json +71 -0
- package/agent/components/SkeletonAvatar.json +50 -0
- package/agent/components/SkeletonButton.json +57 -0
- package/agent/components/SkeletonForm.json +52 -0
- package/agent/components/SkeletonImage.json +37 -0
- package/agent/components/SkeletonInput.json +51 -0
- package/agent/components/SkeletonNode.json +42 -0
- package/agent/components/SkeletonRows.json +49 -0
- package/agent/components/SkeletonTable.json +45 -0
- package/agent/components/Slider.json +160 -0
- package/agent/components/SplitPane.json +66 -0
- package/agent/components/StatCard.json +83 -0
- package/agent/components/Steps.json +95 -0
- package/agent/components/Swatch.json +41 -0
- package/agent/components/Switch.json +81 -0
- package/agent/components/Table.json +112 -0
- package/agent/components/Tabs.json +158 -0
- package/agent/components/TagInput.json +105 -0
- package/agent/components/Text.json +201 -0
- package/agent/components/Textarea.json +126 -0
- package/agent/components/ThoughtChain.json +76 -0
- package/agent/components/Thumbnail.json +70 -0
- package/agent/components/TimePicker.json +200 -0
- package/agent/components/TimeRangePicker.json +90 -0
- package/agent/components/Timeline.json +47 -0
- package/agent/components/TimelineGrid.json +92 -0
- package/agent/components/Title.json +67 -0
- package/agent/components/Toaster.json +42 -0
- package/agent/components/Toggle.json +90 -0
- package/agent/components/ToggleGroup.json +102 -0
- package/agent/components/Toolbar.json +120 -0
- package/agent/components/Tooltip.json +110 -0
- package/agent/components/Topbar.json +83 -0
- package/agent/components/TopbarItem.json +79 -0
- package/agent/components/Transfer.json +141 -0
- package/agent/components/Tree.json +185 -0
- package/agent/components/TreeSelect.json +232 -0
- package/agent/components/TwoFactorSetup.json +79 -0
- package/agent/components/Typography.json +42 -0
- package/agent/components/Upload.json +221 -0
- package/agent/components/UploadCropDialog.json +60 -0
- package/agent/components/VisuallyHidden.json +20 -0
- package/agent/components/Welcome.json +65 -0
- package/agent/components/formatDate.json +46 -0
- package/agent/components/inertiaUpload.json +32 -0
- package/agent/components/useZodForm.json +39 -0
- package/agent/components-index.json +884 -0
- package/agent/components.json +15507 -0
- package/agent/index.json +56 -0
- package/agent/llms.txt +32 -0
- package/agent/patterns/account-recovery-settings.json +19 -0
- package/agent/patterns/async-data-state.json +20 -0
- package/agent/patterns/auth-recovery-panels.json +29 -0
- package/agent/patterns/badge-coloring.json +14 -0
- package/agent/patterns/common-fixes.json +16 -0
- package/agent/patterns/confirm-destructive.json +11 -0
- package/agent/patterns/data-table-page.json +18 -0
- package/agent/patterns/deferred-loading.json +12 -0
- package/agent/patterns/error-pages.json +28 -0
- package/agent/patterns/inertia-detail-page.json +13 -0
- package/agent/patterns/inertia-list-page.json +15 -0
- package/agent/patterns/inertia-persistent-layout.json +14 -0
- package/agent/patterns/organization-memberships.json +19 -0
- package/agent/patterns/page-sections.json +18 -0
- package/agent/patterns/settings-page-responsive.json +18 -0
- package/agent/patterns/settings-section-rows.json +23 -0
- package/agent/patterns/signup-form.json +13 -0
- package/agent/patterns/topbar-account-chip.json +18 -0
- package/agent/patterns/transactional-email.json +22 -0
- package/agent/patterns-index.json +323 -0
- package/agent/patterns.json +342 -0
- package/agent/rules.json +237 -0
- package/agent/tokens.json +8422 -0
- package/agent/vocabulary.json +198 -0
- package/dist/components/data-entry/input.js +8 -1
- package/dist/components/layout/flex.d.ts +2 -2
- package/dist/components/layout/flex.js +2 -0
- package/dist/components/ui/tag-input.d.ts +10 -0
- package/dist/components/ui/tag-input.js +35 -2
- package/dist/contracts/measurement.json +1 -1
- package/dist/i18n/messages/en.json +23 -1
- package/dist/i18n/messages/ja.json +21 -1
- package/dist/i18n/messages/vi.json +21 -1
- package/dist/props/components/data-entry.prop.d.ts +21 -2
- package/dist/props/components/layout.prop.d.ts +42 -0
- package/dist/props/registry.d.ts +9 -0
- package/dist/props/registry.js +6 -0
- package/dist/styles/card-layout.css +4 -4
- package/dist/styles/control.css +31 -2
- package/dist/styles/data-display-layout.css +1 -1
- package/dist/styles/layout.css +17 -0
- package/dist/styles/navigation-layout.css +3 -1
- package/dist/styles/shell-layout.css +2 -0
- package/dist/styles/table-layout.css +50 -9
- package/dist/tokens/components/segmented.css +5 -1
- package/dist/tokens/components/table.css +2 -1
- package/docs/COMPOSITION-VS-COMPONENT.md +41 -0
- package/docs/DESIGN-AUTHORITY.md +14 -0
- package/docs/DEVELOPMENT.md +81 -6
- package/docs/data-entry/tag-input.tsx +37 -0
- package/docs/layout/flex.tsx +40 -0
- package/docs/roadmap/website-components.md +34 -0
- package/docs/showcase/marketing-page.tsx +54 -45
- package/docs/showcase/table-pagination.tsx +88 -18
- package/docs/showcase/theme-customization.tsx +25 -2
- package/package.json +6 -4
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"docPath": "docs/general/typography.tsx",
|
|
3
|
+
"example": "<VisuallyHidden>Unread</VisuallyHidden>",
|
|
4
|
+
"group": "general",
|
|
5
|
+
"importPath": "@godxjp/ui/general",
|
|
6
|
+
"name": "VisuallyHidden",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"description": "Text available to assistive technology.",
|
|
10
|
+
"name": "children",
|
|
11
|
+
"type": "ReactNode"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"rules": [],
|
|
15
|
+
"storyPath": "general/typography.tsx",
|
|
16
|
+
"tagline": "Accessible supporting text without a visible layout box.",
|
|
17
|
+
"usage": [
|
|
18
|
+
"Use for supplementary accessible labels. Do not hide controls that remain focusable."
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"docPath": "data-display/welcome.tsx",
|
|
3
|
+
"example": "import { Welcome } from \"@godxjp/ui/data-display\";\nimport { Button } from \"@godxjp/ui/general\";\nimport { Bot } from \"lucide-react\";\n\n<Welcome\n icon={<Bot />}\n title=\"こんにちは\"\n description=\"請求、経費、勤怠のことならお手伝いできます。\"\n extra={<Button variant=\"ghost\" size=\"sm\">閉じる</Button>}\n/>",
|
|
4
|
+
"group": "data-display",
|
|
5
|
+
"importPath": "@godxjp/ui/data-display",
|
|
6
|
+
"name": "Welcome",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"description": "Leading glyph. A STRING beginning with http(s) is rendered as a decorative <img alt=\"\"> (Ant Design X does the same, with alt=\"icon\"); any other string renders as text.",
|
|
10
|
+
"name": "icon",
|
|
11
|
+
"type": "React.ReactNode | string"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "The greeting. Renders as an <h4>, which is Ant Design X's hardcoded Typography.Title level={4}.",
|
|
15
|
+
"name": "title",
|
|
16
|
+
"type": "React.ReactNode"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "The line under the greeting.",
|
|
20
|
+
"name": "description",
|
|
21
|
+
"type": "React.ReactNode"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"description": "Trailing slot on the TITLE row — a dismiss button, a model picker. Not under the description.",
|
|
25
|
+
"name": "extra",
|
|
26
|
+
"type": "React.ReactNode"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"defaultValue": "\"filled\"",
|
|
30
|
+
"description": "filled gives the block its own tinted ground and hairline; borderless lets it sit on the page.",
|
|
31
|
+
"name": "variant",
|
|
32
|
+
"type": "\"filled\" | \"borderless\""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"description": "DOM id of the block.",
|
|
36
|
+
"name": "id",
|
|
37
|
+
"type": "string"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"related": [
|
|
41
|
+
"EmptyState — the general 'nothing here yet' block for a list or a table. Welcome is the chat surface's greeting and carries an icon/title/description/extra shape of its own.",
|
|
42
|
+
"PageContainer — owns the PAGE header; Welcome sits inside the page body.",
|
|
43
|
+
"ChatSuggestion / ChatBubbleList — the rest of the same surface."
|
|
44
|
+
],
|
|
45
|
+
"rules": [
|
|
46
|
+
2,
|
|
47
|
+
6,
|
|
48
|
+
44,
|
|
49
|
+
45
|
|
50
|
+
],
|
|
51
|
+
"storyPath": "data-display/Welcome.stories.tsx",
|
|
52
|
+
"tagline": "The greeting block at the head of an empty conversation (Ant Design X Welcome): glyph, greeting, one line under it, and a trailing slot ON THE TITLE ROW — which is the placement a hand-roll gets wrong.",
|
|
53
|
+
"usage": [
|
|
54
|
+
"DO put it above the composer on an empty chat, with ChatSuggestion or a Prompts row beneath it — that is the surface it belongs to.",
|
|
55
|
+
"DO pass `extra` for the one action the greeting carries (dismiss, switch model). It lands beside the title, top-aligned, so a two-line title does not float it.",
|
|
56
|
+
"DON'T reach for it as a generic page header — that is PageContainer's title/subtitle/extra, which owns the page rhythm.",
|
|
57
|
+
"DON'T expect a heading-level prop: Ant Design X hardcodes level 4 and this ports that. Wrap it in your own heading hierarchy if the page needs a different rung.",
|
|
58
|
+
"DON'T expect `styles`/`classNames` from Ant Design X — retune through the --welcome-* tokens."
|
|
59
|
+
],
|
|
60
|
+
"useCases": [
|
|
61
|
+
"The first screen of an assistant, before the first message.",
|
|
62
|
+
"The head of a fresh conversation started from the Conversations rail.",
|
|
63
|
+
"A feature introduction card inside a chat surface, dismissed through `extra`."
|
|
64
|
+
]
|
|
65
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { formatDate } from \"@godxjp/ui/datetime\";\n\nformatDate(coupon.validFrom); // \"2026-05-01\"\nformatDate(order.createdAt, { kind: \"relative\" }); // \"3日前\"",
|
|
3
|
+
"group": "providers",
|
|
4
|
+
"importPath": "@godxjp/ui/app",
|
|
5
|
+
"name": "formatDate",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "ISO date, ISO datetime, HH:mm, or Date.",
|
|
9
|
+
"name": "value",
|
|
10
|
+
"required": true,
|
|
11
|
+
"type": "string | Date | null | undefined"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"defaultValue": "\"auto\"",
|
|
15
|
+
"description": "Output preset; auto infers from the value.",
|
|
16
|
+
"name": "options.kind",
|
|
17
|
+
"type": "\"auto\" | \"date\" | \"datetime\" | \"time\" | \"long\" | \"relative\""
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"related": [
|
|
21
|
+
"AppProvider — required peer that seeds locale, timezone, dateFormat, and timeFormat into the module-level context that `formatDate` reads. Must be mounted once at app root; omitting it means `formatDate` silently falls back to Vietnamese/Ho Chi Minh City defaults.",
|
|
22
|
+
"DatePicker — the corresponding input control for calendar dates. Use `DatePicker` to capture a date from the user; use `formatDate(value, { calendar: true })` to display the picked `Date` object back as a string.",
|
|
23
|
+
"DateFormatPicker / TimeFormatPicker / TimezonePicker — preference pickers that update AppProvider context; their selections are automatically picked up by subsequent `formatDate` calls with no extra wiring needed.",
|
|
24
|
+
"TimePicker — the corresponding input control for HH:mm time values. Use `TimePicker` to capture time; use `formatDate(hhmm)` (auto-detects `'time'` kind) to display the stored `HH:mm` string respecting the user's 12h/24h preference."
|
|
25
|
+
],
|
|
26
|
+
"rules": [
|
|
27
|
+
5
|
|
28
|
+
],
|
|
29
|
+
"storyPath": "app/formatDate.stories.tsx",
|
|
30
|
+
"tagline": "MANDATORY for all date/time display. Auto-detects ISO date / HH:mm / instant; reads AppProvider context. Import from @godxjp/ui/datetime.",
|
|
31
|
+
"usage": [
|
|
32
|
+
"DO import from `@godxjp/ui/datetime` — NOT from `date-fns` or any other datetime utility. `formatDate` is the single mandatory display entry point; calling `date-fns/format` directly bypasses AppProvider locale/timezone/dateFormat/timeFormat context and produces inconsistent output across the app.",
|
|
33
|
+
"DO ensure `AppProvider` is mounted at the app root before the first `formatDate` call. The function reads a module-level context synced by `AppProvider` via `syncDatetimeContext`. Without it the fallback locale is `'vi'` / timezone `'Asia/Ho_Chi_Minh'` / `'24h'`, which will silently produce wrong output in Japanese or English apps.",
|
|
34
|
+
"DO pass `null` or `undefined` safely — `formatDate` returns an em-dash `'—'` for null/undefined/empty string values. Never guard with a ternary before calling it.",
|
|
35
|
+
"DO use `options.kind` when auto-detection is wrong: pass `kind: 'date'` for an ISO datetime string you want displayed as date-only, `kind: 'relative'` for age display (e.g. `'3日前'`), `kind: 'long'` for full PPP format in modals/detail panels. Auto-detection maps plain `yyyy-MM-dd` → `'date'`, `HH:mm` → `'time'`, everything else → `'datetime'`.",
|
|
36
|
+
"DO pass `{ calendar: true }` when the `Date` object came from a react-day-picker calendar pick — this prevents timezone shift that would occur if the Date were treated as a UTC instant.",
|
|
37
|
+
"DON'T hand-roll per-call locale/timezone resolution with `Intl.DateTimeFormat` or raw `date-fns/format`. The `options.locale` / `options.timezone` overrides exist for one-off per-cell display differences (e.g. showing a partner's local time), not as a substitute for AppProvider context."
|
|
38
|
+
],
|
|
39
|
+
"useCases": [
|
|
40
|
+
"Rendering all date/time columns in a DataTable — invoice due dates (`kind: 'date'`), transaction timestamps (`kind: 'datetime'`), and elapsed time since last sync (`kind: 'relative'`) all go through `formatDate` so the locale/timezone/12h-24h setting from AppProvider is respected everywhere.",
|
|
41
|
+
"Displaying a single date/time field in a Descriptions or Card detail panel, e.g. `formatDate(invoice.issuedAt)` for the issued-at row — no extra formatting logic needed, null is handled as `'—'` automatically.",
|
|
42
|
+
"Formatting a stored `HH:mm` string (24h canonical storage) for display according to the user's timeFormat preference — pass the raw `'14:30'` string and auto-detection routes it through `formatTimeOfDay`, outputting `'2:30 PM'` or `'14:30'` based on context.",
|
|
43
|
+
"Rendering a 'last modified' timestamp with relative wording in an activity feed or audit log row — `formatDate(entry.updatedAt, { kind: 'relative' })` produces locale-correct relative strings like `'3日前'` / `'3 days ago'`.",
|
|
44
|
+
"Converting a `Date` selected from `DatePicker` (react-day-picker) back to a display string — pass `{ calendar: true }` to avoid the UTC midnight shift that the default instant path would apply."
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"docPath": "FORMS.md",
|
|
3
|
+
"example": "import { inertiaUpload } from \"@godxjp/ui/inertia\";\nconst upload = inertiaUpload((file, callbacks) => router.post(endpoint, { file }, callbacks), t(\"Upload failed\"));\n<Upload onUpload={upload} />;",
|
|
4
|
+
"group": "data-entry",
|
|
5
|
+
"importPath": "@godxjp/ui/inertia",
|
|
6
|
+
"name": "inertiaUpload",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"description": "Start a router.post visit with the supplied callbacks and file.",
|
|
10
|
+
"name": "send",
|
|
11
|
+
"type": "(file: File, callbacks: InertiaUploadCallbacks) => void"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "Localized fallback for network or HTTP failures.",
|
|
15
|
+
"name": "errorMessage",
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"related": [
|
|
20
|
+
"Upload",
|
|
21
|
+
"FormRoot"
|
|
22
|
+
],
|
|
23
|
+
"rules": [
|
|
24
|
+
1
|
|
25
|
+
],
|
|
26
|
+
"storyPath": "data-entry/Upload.stories.tsx",
|
|
27
|
+
"tagline": "Bridge Inertia multipart visits to Upload progress, cancellation, retry and error recovery.",
|
|
28
|
+
"usage": [
|
|
29
|
+
"Pass the returned callback to Upload.onUpload. Spread callbacks into router.post options; they enable multipart and independent async requests.",
|
|
30
|
+
"Keep failed items in controlled value so the user can retry; remove only done items when server props provide the saved list."
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"docPath": "docs/FORMS.md",
|
|
3
|
+
"example": "import { useZodForm } from \"@godxjp/ui/form\";\nimport { z } from \"zod\";\nconst form = useZodForm(z.object({email: z.string().email()}), {defaultValues: {email: \"\"}, mode: \"onBlur\"});",
|
|
4
|
+
"group": "data-entry",
|
|
5
|
+
"importPath": "@godxjp/ui/form",
|
|
6
|
+
"name": "useZodForm",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"description": "Zod schema, including async refinements.",
|
|
10
|
+
"name": "schema",
|
|
11
|
+
"type": "z.ZodType<T>"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "RHF options such as defaultValues, mode, reValidateMode, criteriaMode and shouldUnregister.",
|
|
15
|
+
"name": "options",
|
|
16
|
+
"type": "UseZodFormOptionsProp<T>"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"related": [
|
|
20
|
+
"Form",
|
|
21
|
+
"FormField",
|
|
22
|
+
"FormRoot",
|
|
23
|
+
"FormFieldControl"
|
|
24
|
+
],
|
|
25
|
+
"rules": [
|
|
26
|
+
23,
|
|
27
|
+
31
|
|
28
|
+
],
|
|
29
|
+
"storyPath": "data-entry/Form.stories.tsx",
|
|
30
|
+
"tagline": "Create a typed React Hook Form instance with Zod validation; reuse reset, setValue, trigger, formState and field errors.",
|
|
31
|
+
"usage": [
|
|
32
|
+
"Use inside the documented form composition; do not nest native form elements.",
|
|
33
|
+
"Use godx-ui controls and preserve field names, errors and disabled state."
|
|
34
|
+
],
|
|
35
|
+
"useCases": [
|
|
36
|
+
"Validated settings forms",
|
|
37
|
+
"Nested repeating data entry"
|
|
38
|
+
]
|
|
39
|
+
}
|