@godxjp/ui 18.0.3 → 18.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/app/app-provider.d.ts +2 -1
  2. package/dist/components/charts/area-chart.d.ts +1 -1
  3. package/dist/components/charts/bar-chart.d.ts +1 -1
  4. package/dist/components/charts/chart-cartesian.d.ts +1 -1
  5. package/dist/components/charts/chart-frame.d.ts +1 -1
  6. package/dist/components/charts/line-chart.d.ts +1 -1
  7. package/dist/components/charts/pie-chart.d.ts +1 -1
  8. package/dist/components/data-display/badge.d.ts +1 -1
  9. package/dist/components/data-display/card.d.ts +1 -1
  10. package/dist/components/data-display/data-table.d.ts +10 -10
  11. package/dist/components/data-display/descriptions.d.ts +2 -2
  12. package/dist/components/data-display/empty-state.d.ts +1 -1
  13. package/dist/components/data-display/popover.d.ts +6 -6
  14. package/dist/components/data-display/progress.d.ts +2 -1
  15. package/dist/components/data-display/timeline.d.ts +1 -1
  16. package/dist/components/data-display/tree-list.d.ts +1 -1
  17. package/dist/components/data-entry/calendar.d.ts +1 -1
  18. package/dist/components/data-entry/cascader.d.ts +2 -1
  19. package/dist/components/data-entry/checkbox-group.d.ts +2 -1
  20. package/dist/components/data-entry/color-picker.d.ts +2 -1
  21. package/dist/components/data-entry/date-picker.d.ts +2 -1
  22. package/dist/components/data-entry/date-range-picker.d.ts +2 -1
  23. package/dist/components/data-entry/field.d.ts +2 -1
  24. package/dist/components/data-entry/form-field.d.ts +2 -1
  25. package/dist/components/data-entry/month-picker.d.ts +2 -1
  26. package/dist/components/data-entry/month-range-picker.d.ts +2 -1
  27. package/dist/components/data-entry/password-strength.d.ts +1 -1
  28. package/dist/components/data-entry/radio.d.ts +1 -1
  29. package/dist/components/data-entry/search-input.d.ts +1 -1
  30. package/dist/components/data-entry/search-select.d.ts +2 -1
  31. package/dist/components/data-entry/select.d.ts +3 -3
  32. package/dist/components/data-entry/time-picker.d.ts +2 -1
  33. package/dist/components/data-entry/transfer.d.ts +2 -1
  34. package/dist/components/data-entry/tree-select.d.ts +2 -1
  35. package/dist/components/data-entry/upload-crop-dialog.d.ts +2 -1
  36. package/dist/components/data-entry/upload.d.ts +2 -1
  37. package/dist/components/feedback/alert.d.ts +1 -1
  38. package/dist/components/feedback/dialog.d.ts +13 -13
  39. package/dist/components/feedback/sheet.d.ts +7 -7
  40. package/dist/components/feedback/skeleton.d.ts +5 -5
  41. package/dist/components/feedback/sonner.d.ts +2 -1
  42. package/dist/components/feedback/tooltip.d.ts +2 -2
  43. package/dist/components/general/button.d.ts +1 -1
  44. package/dist/components/general/reveal.d.ts +1 -1
  45. package/dist/components/layout/app-shell.d.ts +2 -1
  46. package/dist/components/layout/app-shell.js +1 -1
  47. package/dist/components/layout/auth-shell.d.ts +1 -1
  48. package/dist/components/layout/breadcrumb.d.ts +1 -1
  49. package/dist/components/layout/centered-shell.d.ts +22 -0
  50. package/dist/components/layout/centered-shell.js +35 -0
  51. package/dist/components/layout/flex.d.ts +1 -1
  52. package/dist/components/layout/index.d.ts +3 -0
  53. package/dist/components/layout/index.js +2 -0
  54. package/dist/components/layout/page-container.d.ts +2 -2
  55. package/dist/components/layout/resizable.d.ts +3 -3
  56. package/dist/components/layout/responsive-grid.d.ts +1 -1
  57. package/dist/components/layout/sidebar.d.ts +4 -4
  58. package/dist/components/layout/split-pane.d.ts +1 -1
  59. package/dist/components/layout/topbar.d.ts +1 -1
  60. package/dist/components/navigation/context-menu.d.ts +2 -2
  61. package/dist/components/navigation/dropdown-menu.d.ts +7 -7
  62. package/dist/components/navigation/filter-bar.d.ts +2 -2
  63. package/dist/components/navigation/menubar.d.ts +3 -3
  64. package/dist/components/navigation/pagination.d.ts +2 -2
  65. package/dist/components/navigation/steps.d.ts +2 -1
  66. package/dist/components/navigation/tabs.d.ts +1 -1
  67. package/dist/components/query/data-state.d.ts +2 -1
  68. package/dist/components/query/infinite-query-state.d.ts +2 -1
  69. package/dist/components/query/mutation-feedback.d.ts +1 -1
  70. package/dist/components/query/prefetch-link.d.ts +2 -1
  71. package/dist/components/query/query-refetch-button.d.ts +1 -1
  72. package/dist/components/ui/hover-card.d.ts +1 -1
  73. package/dist/form/form-context.d.ts +23 -0
  74. package/dist/form/form-context.js +29 -0
  75. package/dist/form/form-field-control.d.ts +1 -1
  76. package/dist/form/form-field-control.js +28 -2
  77. package/dist/form/form-root.d.ts +7 -1
  78. package/dist/form/form-root.js +21 -0
  79. package/dist/form/index.d.ts +2 -1
  80. package/dist/form/index.js +3 -0
  81. package/dist/i18n/messages/en.json +5 -0
  82. package/dist/i18n/messages/ja.json +5 -0
  83. package/dist/i18n/messages/vi.json +5 -0
  84. package/dist/inertia/index.d.ts +65 -0
  85. package/dist/inertia/index.js +22 -0
  86. package/dist/props/components/form.prop.d.ts +33 -1
  87. package/dist/props/components/layout.prop.d.ts +29 -1
  88. package/dist/props/registry.d.ts +10 -0
  89. package/dist/props/registry.js +10 -0
  90. package/dist/props/vocabulary/index.d.ts +1 -1
  91. package/dist/props/vocabulary/layout.prop.d.ts +2 -0
  92. package/dist/styles/shell-layout.css +85 -11
  93. package/dist/tokens/components/shell.css +12 -0
  94. package/package.json +55 -46
@@ -49,7 +49,7 @@ function AppShell({
49
49
  type: "button",
50
50
  variant: "ghost",
51
51
  size: "sm",
52
- className: "app-mobile-nav-trigger",
52
+ className: "app-mobile-nav-trigger hidden max-lg:inline-flex",
53
53
  "aria-label": t("layout.appShell.openNav"),
54
54
  "aria-haspopup": "dialog",
55
55
  children: /* @__PURE__ */ jsx(Menu, { className: "size-5", "aria-hidden": "true" })
@@ -8,4 +8,4 @@ export type { AuthShellProp, AuthShellProp as AuthShellProps, } from "../../prop
8
8
  * consumer's `.auth-shell-*` / `.ui-auth-scope` classes. Motion is delegated to `Reveal` (wrap the
9
9
  * card) so `prefers-reduced-motion` is honoured in one place.
10
10
  */
11
- export declare function AuthShell({ brand, footer, children, className }: AuthShellProp): import("react/jsx-runtime").JSX.Element;
11
+ export declare function AuthShell({ brand, footer, children, className }: AuthShellProp): import("react").JSX.Element;
@@ -10,4 +10,4 @@ export type BreadcrumbProps = {
10
10
  */
11
11
  ariaLabel?: string;
12
12
  };
13
- export declare function Breadcrumb({ items, linkComponent: LinkComponent, ariaLabel, }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function Breadcrumb({ items, linkComponent: LinkComponent, ariaLabel, }: BreadcrumbProps): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import type { CenteredShellProp } from "../../props/components/layout.prop.js";
2
+ export type { CenteredShellProp, CenteredShellProp as CenteredShellProps, } from "../../props/components/layout.prop.js";
3
+ /**
4
+ * CenteredShell — authenticated, no-sidebar, centred-column page shell: the hosted-ID "My Page",
5
+ * account / self-service, and standalone-settings shape. It fills the gap between the two existing
6
+ * shells:
7
+ *
8
+ * - `AppShell` REQUIRES a sidebar — its padded topbar chrome (`.app-topbar`) is a grid area beside
9
+ * the nav rail, so you cannot get a padded top bar without a rail.
10
+ * - `AuthShell` is the UNAUTHENTICATED root (login/mfa/reset); it centres a narrow ~24rem card
11
+ * VERTICALLY and has no top-right actions slot.
12
+ *
13
+ * CenteredShell gives a **padded top bar with real actions** (banner) reusing the SAME chrome as
14
+ * `.app-topbar` (padding-inline · border · backdrop) WITHOUT a sidebar, a scrollable `main` whose
15
+ * content is a **centred column** of a configurable medium width (`width` = sm|md|lg, all wider than
16
+ * the 24rem auth card) **top-aligned** so sections flow and scroll (not vertically centred), and an
17
+ * optional footer (contentinfo). A hosted account page thus needs ZERO custom CSS and never
18
+ * hand-rolls a bar (the bare `Topbar` primitive ships no padding — the `.ui-topbar` zero-inset
19
+ * footgun). Layout-only: delegate motion to `Reveal` (wrap a section) so `prefers-reduced-motion`
20
+ * is honoured in one place.
21
+ */
22
+ export declare function CenteredShell({ topbar, footer, children, width, className, }: CenteredShellProp): import("react").JSX.Element;
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useTranslation } from "../../i18n/use-translation.js";
4
+ import { cn } from "../../lib/utils.js";
5
+ function CenteredShell({
6
+ topbar,
7
+ footer,
8
+ children,
9
+ width = "md",
10
+ className
11
+ }) {
12
+ const { t } = useTranslation();
13
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "centered-shell", className: cn("ui-centered-shell", className), children: [
14
+ topbar !== void 0 && /* @__PURE__ */ jsx(
15
+ "header",
16
+ {
17
+ className: "ui-centered-shell-bar ui-scale-fixed",
18
+ "aria-label": t("layout.centeredShell.headerLabel"),
19
+ children: topbar
20
+ }
21
+ ),
22
+ /* @__PURE__ */ jsx("main", { className: "ui-centered-shell-main", "aria-label": t("layout.centeredShell.mainLabel"), children: /* @__PURE__ */ jsx("div", { className: "ui-centered-shell-column", "data-width": width, children }) }),
23
+ footer !== void 0 && /* @__PURE__ */ jsx(
24
+ "footer",
25
+ {
26
+ className: "ui-centered-shell-footer",
27
+ "aria-label": t("layout.centeredShell.footerLabel"),
28
+ children: footer
29
+ }
30
+ )
31
+ ] });
32
+ }
33
+ export {
34
+ CenteredShell
35
+ };
@@ -1,3 +1,3 @@
1
1
  import type { FlexProp } from "../../props/components/layout.prop.js";
2
2
  export type { FlexAlignProp, FlexDirectionProp, FlexJustifyProp, FlexProp, FlexProp as FlexProps, } from "../../props/components/layout.prop.js";
3
- export declare function Flex({ direction, gap, align, justify, wrap, className, children, ...props }: FlexProp): import("react/jsx-runtime").JSX.Element;
3
+ export declare function Flex({ direction, gap, align, justify, wrap, className, children, ...props }: FlexProp): import("react").JSX.Element;
@@ -7,6 +7,9 @@ export { AppShell } from "./app-shell.js";
7
7
  export type { AppShellProps } from "./app-shell.js";
8
8
  export { AuthShell } from "./auth-shell.js";
9
9
  export type { AuthShellProp, AuthShellProps } from "./auth-shell.js";
10
+ export { CenteredShell } from "./centered-shell.js";
11
+ export type { CenteredShellProp, CenteredShellProps } from "./centered-shell.js";
12
+ export type { CenteredShellWidthProp } from "../../props/vocabulary/index.js";
10
13
  export { Breadcrumb } from "./breadcrumb.js";
11
14
  export type { BreadcrumbProps } from "./breadcrumb.js";
12
15
  export { Sidebar, SidebarHeader, SidebarItem, SidebarSection } from "./sidebar.js";
@@ -3,6 +3,7 @@ import { Flex } from "./flex.js";
3
3
  import { ResizablePanel, ResizablePanelGroup, ResizableHandle } from "./resizable.js";
4
4
  import { AppShell } from "./app-shell.js";
5
5
  import { AuthShell } from "./auth-shell.js";
6
+ import { CenteredShell } from "./centered-shell.js";
6
7
  import { Breadcrumb } from "./breadcrumb.js";
7
8
  import { Sidebar, SidebarHeader, SidebarItem, SidebarSection } from "./sidebar.js";
8
9
  import { Topbar } from "./topbar.js";
@@ -15,6 +16,7 @@ export {
15
16
  AspectRatio,
16
17
  AuthShell,
17
18
  Breadcrumb,
19
+ CenteredShell,
18
20
  Flex,
19
21
  PageContainer,
20
22
  ResizableHandle,
@@ -1,8 +1,8 @@
1
1
  import type { PageContainerProp, PageInsetProp } from "../../props/components/layout.prop.js";
2
2
  export type { PageContainerProp, PageContainerProp as PageContainerProps, } from "../../props/components/layout.prop.js";
3
3
  export type { BreadcrumbItemProp, BreadcrumbItemProp as BreadcrumbItem, } from "../../props/vocabulary/navigation.prop.js";
4
- export declare function PageContainerInset({ className, children, ...props }: PageInsetProp): import("react/jsx-runtime").JSX.Element;
5
- declare function PageContainerRoot({ title, subtitle, extra, footer, breadcrumb, breadcrumbLabel, breadcrumbAriaLabel, linkComponent: LinkComponent, density, variant, stickyFooter, footerReveal, fill, children, className, }: PageContainerProp): import("react/jsx-runtime").JSX.Element;
4
+ export declare function PageContainerInset({ className, children, ...props }: PageInsetProp): import("react").JSX.Element;
5
+ declare function PageContainerRoot({ title, subtitle, extra, footer, breadcrumb, breadcrumbLabel, breadcrumbAriaLabel, linkComponent: LinkComponent, density, variant, stickyFooter, footerReveal, fill, children, className, }: PageContainerProp): import("react").JSX.Element;
6
6
  export declare const PageContainer: typeof PageContainerRoot & {
7
7
  Inset: typeof PageContainerInset;
8
8
  };
@@ -1,14 +1,14 @@
1
1
  import * as React from "react";
2
2
  import * as ResizablePrimitive from "react-resizable-panels";
3
3
  export declare const ResizablePanelGroup: {
4
- ({ className, ...props }: React.ComponentPropsWithoutRef<typeof ResizablePrimitive.Group>): import("react/jsx-runtime").JSX.Element;
4
+ ({ className, ...props }: React.ComponentPropsWithoutRef<typeof ResizablePrimitive.Group>): React.JSX.Element;
5
5
  displayName: string;
6
6
  };
7
7
  export declare const ResizablePanel: {
8
- ({ className, ...props }: React.ComponentPropsWithoutRef<typeof ResizablePrimitive.Panel>): import("react/jsx-runtime").JSX.Element;
8
+ ({ className, ...props }: React.ComponentPropsWithoutRef<typeof ResizablePrimitive.Panel>): React.JSX.Element;
9
9
  displayName: string;
10
10
  };
11
11
  export declare const ResizableHandle: {
12
- ({ className, ...props }: React.ComponentPropsWithoutRef<typeof ResizablePrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
12
+ ({ className, ...props }: React.ComponentPropsWithoutRef<typeof ResizablePrimitive.Separator>): React.JSX.Element;
13
13
  displayName: string;
14
14
  };
@@ -4,4 +4,4 @@ export type ResponsiveGridProps = {
4
4
  columns?: ResponsiveGridColumnsProp;
5
5
  children: ReactNode;
6
6
  };
7
- export declare function ResponsiveGrid({ columns, children }: ResponsiveGridProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ResponsiveGrid({ columns, children }: ResponsiveGridProps): import("react").JSX.Element;
@@ -15,7 +15,7 @@ type SidebarItemProps = {
15
15
  onActivate?: (id: string) => void;
16
16
  renderItem?: RenderItem;
17
17
  };
18
- export declare function SidebarHeader({ children, className, ...props }: SidebarHeaderProps): import("react/jsx-runtime").JSX.Element;
19
- export declare function SidebarSection({ label, collapsed, children, className, ...props }: SidebarSectionProps & React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
20
- export declare function SidebarItem({ item, active, sub, onActivate, renderItem, children, ...props }: SidebarItemProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onClick">): import("react/jsx-runtime").JSX.Element;
21
- export declare function Sidebar({ ariaLabel: ariaLabelCamel, activeId, onSelect, sections, product, onProductClick, brand, collapsed, children, renderItem, footer, "aria-label": ariaLabel, }: SidebarProp): import("react/jsx-runtime").JSX.Element;
18
+ export declare function SidebarHeader({ children, className, ...props }: SidebarHeaderProps): React.JSX.Element;
19
+ export declare function SidebarSection({ label, collapsed, children, className, ...props }: SidebarSectionProps & React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
20
+ export declare function SidebarItem({ item, active, sub, onActivate, renderItem, children, ...props }: SidebarItemProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onClick">): React.JSX.Element;
21
+ export declare function Sidebar({ ariaLabel: ariaLabelCamel, activeId, onSelect, sections, product, onProductClick, brand, collapsed, children, renderItem, footer, "aria-label": ariaLabel, }: SidebarProp): React.JSX.Element;
@@ -6,4 +6,4 @@ export type SplitPaneProps = {
6
6
  /** Accessible complementary landmark name; required when multiple panes share a document. */
7
7
  asideLabel?: string;
8
8
  };
9
- export declare function SplitPane({ children, aside, asideWidth, asideLabel }: SplitPaneProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function SplitPane({ children, aside, asideWidth, asideLabel }: SplitPaneProps): import("react").JSX.Element;
@@ -17,4 +17,4 @@ export type { TopbarProp, TopbarProp as TopbarProps } from "../../props/componen
17
17
  * Use it as `AppShell`'s `topbar` slot, or place it directly. For full custom content, pass
18
18
  * `children` instead of the three slots.
19
19
  */
20
- export declare function Topbar({ start, center, end, className, children, ...props }: TopbarProp): import("react/jsx-runtime").JSX.Element;
20
+ export declare function Topbar({ start, center, end, className, children, ...props }: TopbarProp): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
3
  export declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
4
- export declare function ContextMenuTrigger(props: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function ContextMenuTrigger(props: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): React.JSX.Element;
5
5
  export declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
6
6
  export declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
7
  export declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
@@ -15,7 +15,7 @@ export declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<Cont
15
15
  inset?: boolean;
16
16
  } & React.RefAttributes<HTMLDivElement>>;
17
17
  export declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
- export declare const ContextMenuShortcut: ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const ContextMenuShortcut: ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => React.JSX.Element;
19
19
  export declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
20
20
  export declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
21
  export declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,11 @@
1
1
  import * as React from "react";
2
2
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
- export declare function DropdownMenu(props: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- export declare function DropdownMenuTrigger(props: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
- export declare function DropdownMenuPortal(props: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
- export declare function DropdownMenuGroup(props: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
7
- export declare function DropdownMenuRadioGroup(props: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
8
- export declare function DropdownMenuSub(props: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
3
+ export declare function DropdownMenu(props: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
4
+ export declare function DropdownMenuTrigger(props: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
5
+ export declare function DropdownMenuPortal(props: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
6
+ export declare function DropdownMenuGroup(props: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
7
+ export declare function DropdownMenuRadioGroup(props: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
8
+ export declare function DropdownMenuSub(props: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
9
9
  export declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
10
  export declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
11
11
  inset?: boolean;
@@ -21,4 +21,4 @@ export declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omi
21
21
  inset?: boolean;
22
22
  } & React.RefAttributes<HTMLDivElement>>;
23
23
  export declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
24
- export declare const DropdownMenuShortcut: ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const DropdownMenuShortcut: ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import type { ToolbarGroupProp, ToolbarProp } from "../../props/components/navigation.prop.js";
2
2
  export type { ToolbarGroupProp, ToolbarGroupProp as ToolbarGroupProps, ToolbarProp, ToolbarProp as ToolbarProps, } from "../../props/components/navigation.prop.js";
3
- export declare function Toolbar({ onClear, hasActiveFilters, className, children }: ToolbarProp): import("react/jsx-runtime").JSX.Element;
4
- export declare function ToolbarGroup({ label, className, children }: ToolbarGroupProp): import("react/jsx-runtime").JSX.Element;
3
+ export declare function Toolbar({ onClear, hasActiveFilters, className, children }: ToolbarProp): import("react").JSX.Element;
4
+ export declare function ToolbarGroup({ label, className, children }: ToolbarGroupProp): import("react").JSX.Element;
@@ -4,10 +4,10 @@ export declare const Menubar: React.ForwardRefExoticComponent<MenubarPrimitive.M
4
4
  export declare const MenubarMenu: {
5
5
  (props: MenubarPrimitive.MenubarMenuProps & {
6
6
  __scopeMenubar?: import("@radix-ui/react-context").Scope;
7
- }): import("react/jsx-runtime").JSX.Element;
7
+ }): React.JSX.Element;
8
8
  displayName: string;
9
9
  };
10
- export declare function MenubarTrigger(props: React.ComponentProps<typeof MenubarPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function MenubarTrigger(props: React.ComponentProps<typeof MenubarPrimitive.Trigger>): React.JSX.Element;
11
11
  export declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
12
  export declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
13
13
  inset?: boolean;
@@ -18,7 +18,7 @@ export declare const MenubarRadioGroup: React.ForwardRefExoticComponent<Omit<Men
18
18
  export declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
19
  export declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
20
  export declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
- export declare const MenubarShortcut: ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const MenubarShortcut: ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => React.JSX.Element;
22
22
  export declare const MenubarSub: React.FC<MenubarPrimitive.MenubarSubProps>;
23
23
  export declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
24
24
  export declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -9,7 +9,7 @@ declare const PaginationLink: React.ForwardRefExoticComponent<Omit<Omit<React.De
9
9
  href?: string;
10
10
  } & React.RefAttributes<HTMLButtonElement>>;
11
11
  declare const PaginationEllipsis: {
12
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
12
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
13
13
  displayName: string;
14
14
  };
15
15
  declare const PaginationPrevious: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type"> & {
@@ -22,5 +22,5 @@ declare const PaginationNext: React.ForwardRefExoticComponent<Omit<Omit<React.De
22
22
  disabled?: boolean;
23
23
  href?: string;
24
24
  } & React.RefAttributes<HTMLButtonElement>>;
25
- export declare function Pagination({ ariaLabel, value, total, pageSize, pageSizeOptions, showSizeChanger, showTotal, hideOnSinglePage, simple, disabled, className, onValueChange, }: PaginationProp): import("react/jsx-runtime").JSX.Element | null;
25
+ export declare function Pagination({ ariaLabel, value, total, pageSize, pageSizeOptions, showSizeChanger, showTotal, hideOnSinglePage, simple, disabled, className, onValueChange, }: PaginationProp): React.JSX.Element | null;
26
26
  export { PaginationContent, PaginationItem, PaginationLink, PaginationEllipsis, PaginationPrevious, PaginationNext, };
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  import type { StepsProp } from "../../props/components/navigation.prop.js";
2
3
  export type { StepsProp, StepsProp as StepsProps, StepItemProp, StepStatusProp, } from "../../props/components/navigation.prop.js";
3
- export declare function Steps({ items, value: current, defaultValue, status: currentStatus, orientation, type, size, titlePlacement, onValueChange, className, }: StepsProp): import("react/jsx-runtime").JSX.Element;
4
+ export declare function Steps({ items, value: current, defaultValue, status: currentStatus, orientation, type, size, titlePlacement, onValueChange, className, }: StepsProp): React.JSX.Element;
@@ -12,7 +12,7 @@ export type TabsProps = React.ComponentProps<typeof TabsPrimitive.Root> & {
12
12
  listClassName?: string;
13
13
  contentClassName?: string;
14
14
  };
15
- export declare function Tabs({ className, orientation, items, value, defaultValue, variant, listClassName, contentClassName, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Tabs({ className, orientation, items, value, defaultValue, variant, listClassName, contentClassName, ...props }: TabsProps): React.JSX.Element;
16
16
  export declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
17
17
  variant?: "default" | "line";
18
18
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,8 @@
1
+ import * as React from "react";
1
2
  import type { DataStateProp } from "../../props/components/query.prop.js";
2
3
  export type { DataStateProp, DataStateProp as DataStateProps, } from "../../props/components/query.prop.js";
3
4
  /**
4
5
  * Query lifecycle widget — orchestrates skeleton / error / empty / success for one `useQuery` block.
5
6
  * Not a visual component; prefer `@godxjp/ui/query`. Apps may also import via `@godxjp/ui/admin`.
6
7
  */
7
- export declare function DataState<T>({ query, skeleton, prerequisite, empty, isEmpty, errorRenderer, showRetry, onRetry, onAuthError, children, }: DataStateProp<T>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function DataState<T>({ query, skeleton, prerequisite, empty, isEmpty, errorRenderer, showRetry, onRetry, onAuthError, children, }: DataStateProp<T>): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  import type { InfiniteQueryStateProp } from "../../props/components/query.prop.js";
2
3
  export type { InfiniteQueryStateProp, InfiniteQueryStateProp as InfiniteQueryStateProps, } from "../../props/components/query.prop.js";
3
4
  /** Flatten `{ pages: [{ items }] }` — default GODX paginated API shape. */
@@ -10,4 +11,4 @@ export declare function flattenItemPages<TItem, TPage extends {
10
11
  * `useInfiniteQuery` lifecycle widget — flatten pages, load-more footer.
11
12
  * Cursor / activity feeds where user accumulates pages (vs DataTable cursor buttons).
12
13
  */
13
- export declare function InfiniteQueryState<TPage, TFlat>({ query, skeleton, empty, flatten, isEmpty, errorRenderer, showRetry, onRetry, onAuthError, loadingMore, loadMore, showLoadMore, children, }: InfiniteQueryStateProp<TPage, TFlat>): import("react/jsx-runtime").JSX.Element;
14
+ export declare function InfiniteQueryState<TPage, TFlat>({ query, skeleton, empty, flatten, isEmpty, errorRenderer, showRetry, onRetry, onAuthError, loadingMore, loadMore, showLoadMore, children, }: InfiniteQueryStateProp<TPage, TFlat>): React.JSX.Element;
@@ -4,4 +4,4 @@ export type { AlertMutationFeedbackProp, AlertMutationFeedbackProp as AlertMutat
4
4
  * Inline mutation error — renders nothing when idle/success.
5
5
  * Prefer toast for transient saves; use this for blocking form sections (SimulatorPage).
6
6
  */
7
- export declare function AlertMutationFeedback({ mutation, onRetry, showRetry, pending, className, }: AlertMutationFeedbackProp): import("react/jsx-runtime").JSX.Element | null;
7
+ export declare function AlertMutationFeedback({ mutation, onRetry, showRetry, pending, className, }: AlertMutationFeedbackProp): import("react").JSX.Element | null;
@@ -1,7 +1,8 @@
1
+ import * as React from "react";
1
2
  import type { PrefetchLinkProp } from "../../props/components/query.prop.js";
2
3
  export type { PrefetchLinkProp, PrefetchLinkProp as PrefetchLinkProps, } from "../../props/components/query.prop.js";
3
4
  /**
4
5
  * React Router `Link` + `queryClient.prefetchQuery` on hover/focus.
5
6
  * Detail routes feel instant when list rows are hovered.
6
7
  */
7
- export declare function PrefetchLink({ queryKey, queryFn, prefetchOn, staleTime, onMouseEnter, onFocus, ...linkProps }: PrefetchLinkProp): import("react/jsx-runtime").JSX.Element;
8
+ export declare function PrefetchLink({ queryKey, queryFn, prefetchOn, staleTime, onMouseEnter, onFocus, ...linkProps }: PrefetchLinkProp): React.JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import type { ButtonRefetchProp } from "../../props/components/query.prop.js";
2
2
  export type { ButtonRefetchProp, ButtonRefetchProp as ButtonRefetchProps, } from "../../props/components/query.prop.js";
3
3
  /** Page-header Refresh — spins while `query.isFetching`, calls `query.refetch()`. */
4
- export declare function ButtonRefetch({ query, label, children, variant, size, className, ...props }: ButtonRefetchProp): import("react/jsx-runtime").JSX.Element;
4
+ export declare function ButtonRefetch({ query, label, children, variant, size, className, ...props }: ButtonRefetchProp): import("react").JSX.Element;
@@ -5,6 +5,6 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
5
5
  * laggy); consumers can still pass `openDelay`/`closeDelay`. A small open delay (not 0) is
6
6
  * intentional — it prevents accidental triggering as the pointer passes over the trigger.
7
7
  */
8
- export declare function HoverCard({ openDelay, closeDelay, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function HoverCard({ openDelay, closeDelay, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): React.JSX.Element;
9
9
  export declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
10
10
  export declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,23 @@
1
+ import type { FormStateAdapter } from "../props/components/form.prop.js";
2
+ /**
3
+ * Context carrying a framework-agnostic {@link FormStateAdapter}. `FormRoot` provides it on the
4
+ * adapter path (server-driven form libraries — Inertia/formik/TanStack); it stays `null` on the
5
+ * built-in react-hook-form path, where `FormFieldControl` falls back to RHF's own context.
6
+ */
7
+ export declare const FormAdapterContext: import("react").Context<FormStateAdapter | null>;
8
+ /** Read the active form-state adapter, or `null` when `FormRoot` runs the react-hook-form path. */
9
+ export declare function useFormAdapter(): FormStateAdapter | null;
10
+ /**
11
+ * Whether the surrounding `FormRoot` is currently submitting — works for BOTH paths: the adapter's
12
+ * `isSubmitting` (e.g. Inertia's `processing`) or react-hook-form's `formState.isSubmitting`. Spread
13
+ * onto a submit button so `processing` drives its loading state automatically:
14
+ * `<Button type="submit" loading={useFormSubmitting()}>`.
15
+ */
16
+ export declare function useFormSubmitting(): boolean;
17
+ /**
18
+ * Normalise a control's change payload to a bare value. The `FormFieldControl` render-prop spreads
19
+ * `onChange` onto a control that may call it with a DOM `ChangeEvent` (native `<Input>`) OR a raw
20
+ * value (a `Select`'s `onValueChange`). Mirror react-hook-form's own event unwrapping so the adapter
21
+ * path binds identically for every control kind.
22
+ */
23
+ export declare function extractControlValue(arg: unknown): unknown;
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { createContext, useContext } from "react";
3
+ import { useFormContext } from "react-hook-form";
4
+ const FormAdapterContext = createContext(null);
5
+ function useFormAdapter() {
6
+ return useContext(FormAdapterContext);
7
+ }
8
+ function useFormSubmitting() {
9
+ const adapter = useContext(FormAdapterContext);
10
+ const rhf = useFormContext();
11
+ if (adapter) return adapter.isSubmitting;
12
+ return rhf?.formState?.isSubmitting ?? false;
13
+ }
14
+ function extractControlValue(arg) {
15
+ if (arg && typeof arg === "object" && "target" in arg) {
16
+ const target = arg.target;
17
+ if (target && typeof target === "object" && "type" in target) {
18
+ const el = target;
19
+ return el.type === "checkbox" ? el.checked : el.value;
20
+ }
21
+ }
22
+ return arg;
23
+ }
24
+ export {
25
+ FormAdapterContext,
26
+ extractControlValue,
27
+ useFormAdapter,
28
+ useFormSubmitting
29
+ };
@@ -1,4 +1,4 @@
1
1
  import { type FieldValues } from "react-hook-form";
2
2
  import type { FormFieldControlProp } from "../props/components/form.prop.js";
3
3
  export type { FormFieldControlProp } from "../props/components/form.prop.js";
4
- export declare function FormFieldControl<TFieldValues extends FieldValues>({ name, label, required, helper, className, children, }: FormFieldControlProp<TFieldValues>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function FormFieldControl<TFieldValues extends FieldValues>({ name, label, required, helper, className, children, }: FormFieldControlProp<TFieldValues>): import("react").JSX.Element;
@@ -2,6 +2,9 @@
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { Controller, useFormContext } from "react-hook-form";
4
4
  import { FormField } from "../components/data-entry/form-field.js";
5
+ import { extractControlValue, useFormAdapter } from "./form-context.js";
6
+ const noopRef = () => {
7
+ };
5
8
  function FormFieldControl({
6
9
  name,
7
10
  label,
@@ -10,12 +13,35 @@ function FormFieldControl({
10
13
  className,
11
14
  children
12
15
  }) {
13
- const { control } = useFormContext();
16
+ const adapter = useFormAdapter();
17
+ const rhf = useFormContext();
18
+ if (adapter) {
19
+ const fieldName = String(name);
20
+ return /* @__PURE__ */ jsx(
21
+ FormField,
22
+ {
23
+ id: fieldName,
24
+ label,
25
+ required,
26
+ helper,
27
+ error: adapter.getError(fieldName),
28
+ className,
29
+ children: children({
30
+ id: fieldName,
31
+ name: fieldName,
32
+ value: adapter.getValue(fieldName),
33
+ onChange: (...args) => adapter.setValue(fieldName, extractControlValue(args[0])),
34
+ onBlur: () => adapter.onBlur?.(fieldName),
35
+ ref: noopRef
36
+ })
37
+ }
38
+ );
39
+ }
14
40
  return /* @__PURE__ */ jsx(
15
41
  Controller,
16
42
  {
17
43
  name,
18
- control,
44
+ control: rhf.control,
19
45
  render: ({ field, fieldState }) => /* @__PURE__ */ jsx(
20
46
  FormField,
21
47
  {
@@ -1,4 +1,10 @@
1
1
  import { type FieldValues } from "react-hook-form";
2
2
  import type { FormRootProp } from "../props/components/form.prop.js";
3
3
  export type { FormRootProp } from "../props/components/form.prop.js";
4
- export declare function FormRoot<TFieldValues extends FieldValues>({ form, onSubmit, children, className, id, }: FormRootProp<TFieldValues>): import("react/jsx-runtime").JSX.Element;
4
+ /**
5
+ * FormRoot — the form shell. Provide EITHER `form` (built-in react-hook-form + Zod, client-side
6
+ * validation) OR `adapter` (a framework-agnostic {@link FormStateAdapter} for a server-driven form
7
+ * library — Inertia's `useForm` via `@godxjp/ui/inertia`, formik, TanStack Form). Both drive the same
8
+ * `FormFieldControl` auto-binding; the core keeps ZERO dependency on any non-RHF form library.
9
+ */
10
+ export declare function FormRoot<TFieldValues extends FieldValues>({ form, adapter, onSubmit, children, className, id, }: FormRootProp<TFieldValues>): import("react").JSX.Element;
@@ -1,13 +1,34 @@
1
+ "use client";
1
2
  import { jsx } from "react/jsx-runtime";
2
3
  import { FormProvider } from "react-hook-form";
3
4
  import { cn } from "../lib/utils.js";
5
+ import { FormAdapterContext } from "./form-context.js";
4
6
  function FormRoot({
5
7
  form,
8
+ adapter,
6
9
  onSubmit,
7
10
  children,
8
11
  className,
9
12
  id
10
13
  }) {
14
+ if (adapter) {
15
+ return /* @__PURE__ */ jsx(FormAdapterContext.Provider, { value: adapter, children: /* @__PURE__ */ jsx(
16
+ "form",
17
+ {
18
+ id,
19
+ className: cn("ui-stack-md", className),
20
+ onSubmit: (event) => {
21
+ event.preventDefault();
22
+ void onSubmit(adapter.getValues?.() ?? {});
23
+ },
24
+ noValidate: true,
25
+ children
26
+ }
27
+ ) });
28
+ }
29
+ if (!form) {
30
+ throw new Error("FormRoot requires either a `form` (react-hook-form) or an `adapter` prop.");
31
+ }
11
32
  return /* @__PURE__ */ jsx(FormProvider, { ...form, children: /* @__PURE__ */ jsx(
12
33
  "form",
13
34
  {
@@ -4,4 +4,5 @@ export { FormRoot } from "./form-root.js";
4
4
  export type { FormRootProp } from "./form-root.js";
5
5
  export { FormFieldControl } from "./form-field-control.js";
6
6
  export type { FormFieldControlProp } from "./form-field-control.js";
7
- export type { ZodSchemaProp, FieldErrorMessageProp } from "../props/components/form.prop.js";
7
+ export { useFormSubmitting, useFormAdapter } from "./form-context.js";
8
+ export type { ZodSchemaProp, FieldErrorMessageProp, FormStateAdapter, } from "../props/components/form.prop.js";
@@ -1,8 +1,11 @@
1
1
  import { useZodForm } from "./use-zod-form.js";
2
2
  import { FormRoot } from "./form-root.js";
3
3
  import { FormFieldControl } from "./form-field-control.js";
4
+ import { useFormSubmitting, useFormAdapter } from "./form-context.js";
4
5
  export {
5
6
  FormFieldControl,
6
7
  FormRoot,
8
+ useFormAdapter,
9
+ useFormSubmitting,
7
10
  useZodForm
8
11
  };
@@ -138,6 +138,11 @@
138
138
  "mainLabel": "Main content",
139
139
  "footerLabel": "Footer"
140
140
  },
141
+ "centeredShell": {
142
+ "headerLabel": "Header",
143
+ "mainLabel": "Main content",
144
+ "footerLabel": "Footer"
145
+ },
141
146
  "topbar": {
142
147
  "toggleSidebar": "Toggle sidebar",
143
148
  "search": "Search",
@@ -138,6 +138,11 @@
138
138
  "mainLabel": "メインコンテンツ",
139
139
  "footerLabel": "フッター"
140
140
  },
141
+ "centeredShell": {
142
+ "headerLabel": "ヘッダー",
143
+ "mainLabel": "メインコンテンツ",
144
+ "footerLabel": "フッター"
145
+ },
141
146
  "topbar": {
142
147
  "toggleSidebar": "サイドバーの切り替え",
143
148
  "search": "検索",
@@ -138,6 +138,11 @@
138
138
  "mainLabel": "Nội dung chính",
139
139
  "footerLabel": "Chân trang"
140
140
  },
141
+ "centeredShell": {
142
+ "headerLabel": "Đầu trang",
143
+ "mainLabel": "Nội dung chính",
144
+ "footerLabel": "Chân trang"
145
+ },
141
146
  "topbar": {
142
147
  "toggleSidebar": "Bật/tắt thanh bên",
143
148
  "search": "Tìm kiếm",