@godxjp/ui-mcp 0.21.1 → 0.21.3

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/dist/index.js CHANGED
@@ -57,6 +57,17 @@ var COMPONENTS = [
57
57
  type: "boolean",
58
58
  defaultValue: "false",
59
59
  description: 'Pin footer to viewport bottom on scroll \u2014 pairs with variant="narrow".'
60
+ },
61
+ {
62
+ name: "fill",
63
+ type: "boolean",
64
+ defaultValue: "false",
65
+ description: "Grow the body to fill the remaining shell height. Default false = top-packed, content-height (short pages leave no stretched void). Enable for a full-height DataTable, SplitPane, or a chat surface."
66
+ },
67
+ {
68
+ name: "linkComponent",
69
+ type: "React.ElementType",
70
+ description: "Link component used for breadcrumb / header links (e.g. an Inertia or React Router `Link`). Defaults to a native `<a>`."
60
71
  }
61
72
  ],
62
73
  usage: [
@@ -65,7 +76,8 @@ var COMPONENTS = [
65
76
  "DO: Use `variant='flush'` when the page body contains a full-bleed component like DataTable. Inside a flush container, wrap any padded strips (Toolbar, intro text) in `<PageContainer.Inset>` to align them with the header. Never add manual `px-*` or `p-*` padding to compensate \u2014 use PageContainer.Inset.",
66
77
  "DO: Pass `breadcrumb` as an ordered array of `{ label, to? }` objects from root to current page. The last item is automatically rendered without a link and receives `aria-current='page'`; earlier items with `to` become router `<Link>` elements. Never hand-roll a breadcrumb nav inside a PageContainer.",
67
78
  "DON'T: Use `density` to change individual control sizes \u2014 it cascades spacing across the entire page subtree. Set it once per page (e.g. `density='compact'` for data-dense list pages) and let all child components inherit it. Do not apply density classes manually.",
68
- "DON'T: Confuse PageContainer's prop names with the old PageHeader's prop names \u2014 PageContainer uses `subtitle` (not `description`) and `extra` (not `actions`). If you see those legacy names in old code, migrate them to PageContainer."
79
+ "DON'T: Confuse PageContainer's prop names with the old PageHeader's prop names \u2014 PageContainer uses `subtitle` (not `description`) and `extra` (not `actions`). If you see those legacy names in old code, migrate them to PageContainer.",
80
+ "DO: Leave `fill` off (the default) for ordinary pages \u2014 the body is content-height and top-packed, so a short page on a tall viewport leaves no stretched empty void below the content (the page background simply spans the shell). Only set `fill` when the body itself should occupy the full remaining height: a full-height DataTable, a SplitPane, or a chat surface whose message list scrolls and whose composer is pinned to the bottom via `footer` + `stickyFooter`. DON'T add a manual `min-h-screen` / `flex-1` wrapper or a spacer div to fight or fake this."
69
81
  ],
70
82
  useCases: [
71
83
  "A master list page (e.g. invoices, journal entries, customers) where the header holds the page title, a 'New Invoice' button in `extra`, a breadcrumb trail, and a full-bleed DataTable as the body \u2014 use `variant='flush'` + `<PageContainer.Inset>` for the Toolbar above the table.",
@@ -73,11 +85,12 @@ var COMPONENTS = [
73
85
  "A settings or narrow-form page (e.g. account profile, entity configuration) where `variant='narrow'` constrains content to a readable column width and `stickyFooter` pins the submit bar.",
74
86
  "A dashboard page with KPI cards and chart sections \u2014 use `variant='default'` with `children={<Flex direction='col' gap='lg'>\u2026</Flex>}` to vertically stack multiple Card/StatCard sections beneath the page title.",
75
87
  "Any deep-nav page in a multi-level admin (e.g. Accounting > Ledger > Journal Entry #42) where a 3-segment breadcrumb trail provides back-navigation without browser history dependence.",
76
- "A high-density data reconciliation page where an analyst needs to see maximum rows \u2014 use `density='compact'` to tighten all spacing across the DataTable, Toolbar, and controls in a single prop."
88
+ "A high-density data reconciliation page where an analyst needs to see maximum rows \u2014 use `density='compact'` to tighten all spacing across the DataTable, Toolbar, and controls in a single prop.",
89
+ "A chat / messaging detail page where the message list should scroll inside the page and the composer stays pinned at the bottom \u2014 use `fill` so the body occupies the full shell height, with `footer={<Composer/>}` + `stickyFooter`. Without `fill` the page would top-pack and the composer would float mid-screen on a tall viewport."
77
90
  ],
78
91
  related: [
79
92
  "PageContainer.Inset \u2014 use INSIDE a `variant='flush'` PageContainer to re-introduce horizontal padding for strips like Toolbar or intro text that should align with the page header, while the surrounding DataTable stays full-bleed. Not a standalone page shell.",
80
- "PageContainer \u2014 always use PageContainer for new pages; it supports `children`, `footer`, `variant`, `density`, and `stickyFooter`. Legacy code using the old prop names (`description` \u2192 `subtitle`, `actions` \u2192 `extra`) should be migrated to PageContainer.",
93
+ "PageContainer \u2014 always use PageContainer for new pages; it supports `children`, `footer`, `variant`, `density`, `stickyFooter`, and `fill`. Legacy code using the old prop names (`description` \u2192 `subtitle`, `actions` \u2192 `extra`) should be migrated to PageContainer.",
81
94
  "AppShell \u2014 the outer shell that owns the sidebar/topbar layout grid; PageContainer lives inside AppShell's `children` slot. Do not put AppShell inside PageContainer \u2014 the nesting order is AppShell \u2192 PageContainer.",
82
95
  "SplitPane \u2014 use instead of PageContainer when the page body needs a fixed-width aside panel alongside main content (e.g. a detail drawer next to a list). PageContainer has no aside slot; SplitPane fills that gap and can itself be placed inside PageContainer's children."
83
96
  ],
@@ -267,6 +280,11 @@ import { StatCard } from "@godxjp/ui/data-display";
267
280
  name: "footer",
268
281
  type: "ReactNode",
269
282
  description: "App-level footer outside the main content area."
283
+ },
284
+ {
285
+ name: "breadcrumb",
286
+ type: "BreadcrumbProp",
287
+ description: "Breadcrumb trail rendered in the topbar header for back-navigation."
270
288
  }
271
289
  ],
272
290
  usage: [
@@ -750,6 +768,23 @@ function MyShell({ children }: { content: React.ReactNode }) {
750
768
  name: "onClick",
751
769
  type: "React.MouseEventHandler<HTMLButtonElement>",
752
770
  description: "Click handler. Does not fire while `loading` or `disabled`."
771
+ },
772
+ {
773
+ name: "count",
774
+ type: "number",
775
+ description: 'Trailing borderless counter pill after the label (filter tabs / segmented toggles, e.g. "Ch\u1EDD bay 18"). Localized via `Intl.NumberFormat`; styled per variant \u2014 never nest a `Badge` in a Button for this. Ignored when `asChild`.'
776
+ },
777
+ {
778
+ name: "overflowCount",
779
+ type: "number",
780
+ defaultValue: "99",
781
+ description: "Cap for `count` (Ant Badge parity) \u2014 when `count` exceeds it the pill renders `{overflowCount}+` (e.g. `99+`)."
782
+ },
783
+ {
784
+ name: "showZero",
785
+ type: "boolean",
786
+ defaultValue: "true",
787
+ description: "Whether the pill renders when `count` is 0 (Ant Badge parity). Pass `false` to hide the pill at zero."
753
788
  }
754
789
  ],
755
790
  usage: [
@@ -818,6 +853,11 @@ import { Trash2 } from "lucide-react";
818
853
  type: '"span" | "p" | "div" | "label" | "strong" | "em" | "small" | "code" | "kbd" | "dt" | "dd" | "caption" | "abbr"',
819
854
  defaultValue: '"span"',
820
855
  description: "Rendered element. `code`/`kbd` are monospace by default."
856
+ },
857
+ {
858
+ name: "htmlFor",
859
+ type: "string",
860
+ description: "When set, Text renders as a `<label>` bound to this control id (polymorphic label use)."
821
861
  }
822
862
  ],
823
863
  usage: [
@@ -1415,6 +1455,11 @@ import { ResponsiveGrid } from "@godxjp/ui/layout";
1415
1455
  type: "ReactNode",
1416
1456
  required: true,
1417
1457
  description: "Descriptions.Item elements."
1458
+ },
1459
+ {
1460
+ name: "items",
1461
+ type: "DescriptionsItemProp[]",
1462
+ description: "Data-driven rows `{ label, value, span? }` (label/value are ReactNode) \u2014 the alternative to composing `Descriptions.Item` children."
1418
1463
  }
1419
1464
  ],
1420
1465
  usage: [
@@ -1900,6 +1945,17 @@ import { ResponsiveGrid } from "@godxjp/ui/layout";
1900
1945
  name: "onChange",
1901
1946
  type: "React.ChangeEventHandler<HTMLInputElement>",
1902
1947
  description: "Native change handler."
1948
+ },
1949
+ {
1950
+ name: "allowClear",
1951
+ type: "boolean",
1952
+ defaultValue: "false",
1953
+ description: "Opt-in inline \u2715 that clears the field while it holds text (works controlled + uncontrolled). Off by default, so existing inputs are unchanged."
1954
+ },
1955
+ {
1956
+ name: "onClear",
1957
+ type: "() => void",
1958
+ description: "Called after the field is cleared via the inline \u2715 (requires `allowClear`)."
1903
1959
  }
1904
1960
  ],
1905
1961
  usage: [
@@ -2066,6 +2122,32 @@ import { ResponsiveGrid } from "@godxjp/ui/layout";
2066
2122
  type: "number",
2067
2123
  defaultValue: "250",
2068
2124
  description: "Debounce delay (ms)."
2125
+ },
2126
+ {
2127
+ name: "id",
2128
+ type: "string",
2129
+ description: "Input id; pair with `label` or an external `<label htmlFor>`."
2130
+ },
2131
+ {
2132
+ name: "label",
2133
+ type: "React.ReactNode",
2134
+ description: "Optional visible label rendered above the search box (falls back to an sr-only label)."
2135
+ },
2136
+ {
2137
+ name: "onChange",
2138
+ type: "(value: string) => void",
2139
+ description: "Fires on EVERY keystroke (immediate) \u2014 required to keep a controlled `value` responsive."
2140
+ },
2141
+ {
2142
+ name: "onSearchChange",
2143
+ type: "(value: string) => void",
2144
+ description: "Fires the DEBOUNCED search term after `debounceMs` \u2014 wire your query/filter here, not onChange."
2145
+ },
2146
+ {
2147
+ name: "debounceMs",
2148
+ type: "number",
2149
+ defaultValue: "250",
2150
+ description: "Debounce delay (ms) before `onSearchChange` / `onSearch` fires."
2069
2151
  }
2070
2152
  ],
2071
2153
  usage: [
@@ -2103,7 +2185,7 @@ import { ResponsiveGrid } from "@godxjp/ui/layout";
2103
2185
  {
2104
2186
  name: "options",
2105
2187
  type: "SearchSelectOptionProp[]",
2106
- description: "Static option list. Passing this (or loadOptions) switches Select from the compound API to the data-driven API. Each option has { value, label, sublabel?, group?, disabled? }. group buckets the option under an optgroup-style heading."
2188
+ description: "Static option list. Passing this (or loadOptions) switches Select from the compound API to the data-driven API. Each option has { value, label, sublabel?, icon?, group?, disabled? }. `icon` (avatar / flag / lucide node) renders before the label in the rows AND on the trigger once selected. group buckets the option under an optgroup-style heading."
2107
2189
  },
2108
2190
  {
2109
2191
  name: "loadOptions",
@@ -2135,13 +2217,23 @@ import { ResponsiveGrid } from "@godxjp/ui/layout";
2135
2217
  {
2136
2218
  name: "renderOption",
2137
2219
  type: "(option: SearchSelectOptionProp) => React.ReactNode",
2138
- description: "Custom per-option renderer (Ant-Design style). Defaults to label + optional sublabel."
2220
+ description: "Custom per-option renderer for the dropdown ROWS (Ant-Design style). Defaults to label + optional sublabel. Does not change the trigger \u2014 use `labelRender` for that."
2221
+ },
2222
+ {
2223
+ name: "labelRender",
2224
+ type: "(selected: { value: string; label: React.ReactNode; option?: SearchSelectOptionProp }) => React.ReactNode",
2225
+ description: "Custom renderer for the SELECTED value shown on the TRIGGER (Ant Design `labelRender`) \u2014 avatar + name + role badge, etc. `option` is undefined for an async preset whose page hasn't loaded. Only used while a value is selected; the placeholder still shows when empty."
2139
2226
  },
2140
2227
  {
2141
2228
  name: "selectedLabel",
2142
2229
  type: "string",
2143
2230
  description: "Display label for the current value when its option is not in the loaded page (async). Prevents a flash of the raw id."
2144
2231
  },
2232
+ {
2233
+ name: "selectedIcon",
2234
+ type: "React.ReactNode",
2235
+ description: "Leading icon shown on the trigger for the current value when its option isn't loaded yet (async preset) \u2014 the trigger counterpart of `selectedLabel`, so an edit form pre-filled from the server shows the avatar/flag at rest."
2236
+ },
2145
2237
  {
2146
2238
  name: "placeholder",
2147
2239
  type: "string",
@@ -2390,6 +2482,17 @@ export function PrioritySelect({ value, onValueChange }) {
2390
2482
  name: "onChange",
2391
2483
  type: "React.ChangeEventHandler<HTMLTextAreaElement>",
2392
2484
  description: "Change handler."
2485
+ },
2486
+ {
2487
+ name: "allowClear",
2488
+ type: "boolean",
2489
+ defaultValue: "false",
2490
+ description: "Opt-in inline \u2715 at the top-end that clears the field while it holds text (controlled + uncontrolled). Off by default."
2491
+ },
2492
+ {
2493
+ name: "onClear",
2494
+ type: "() => void",
2495
+ description: "Called after the field is cleared via the inline \u2715 (requires `allowClear`)."
2393
2496
  }
2394
2497
  ],
2395
2498
  usage: [
@@ -2524,6 +2627,21 @@ export function PrioritySelect({ value, onValueChange }) {
2524
2627
  type: '"horizontal" | "vertical"',
2525
2628
  defaultValue: '"vertical"',
2526
2629
  description: "Layout direction."
2630
+ },
2631
+ {
2632
+ name: "defaultValue",
2633
+ type: "string",
2634
+ description: "Uncontrolled initial selected value."
2635
+ },
2636
+ {
2637
+ name: "disabled",
2638
+ type: "boolean",
2639
+ description: "Disable the whole group."
2640
+ },
2641
+ {
2642
+ name: "name",
2643
+ type: "string",
2644
+ description: "Form field name for native submission."
2527
2645
  }
2528
2646
  ],
2529
2647
  usage: [
@@ -2613,6 +2731,22 @@ export function PrioritySelect({ value, onValueChange }) {
2613
2731
  name: "toDate",
2614
2732
  type: "Date",
2615
2733
  description: "Latest selectable date in the calendar. Days after this date are disabled in the grid, and the calendar navigation ends at this month."
2734
+ },
2735
+ {
2736
+ name: "allowClear",
2737
+ type: "boolean",
2738
+ defaultValue: "true",
2739
+ description: "Inline \u2715 on the trigger that resets the value when one is set (Ant-style). Pass `false` to hide it (e.g. a required field)."
2740
+ },
2741
+ {
2742
+ name: "defaultValue",
2743
+ type: "Date",
2744
+ description: "Uncontrolled initial date."
2745
+ },
2746
+ {
2747
+ name: "onValueChange",
2748
+ type: "(value: Date | undefined) => void",
2749
+ description: "Fires with the selected date (undefined when cleared)."
2616
2750
  }
2617
2751
  ],
2618
2752
  usage: [
@@ -2881,6 +3015,11 @@ import { Button } from "@godxjp/ui/general";
2881
3015
  name: "icon",
2882
3016
  type: "LucideIcon | false",
2883
3017
  description: "Override or hide (false) the icon."
3018
+ },
3019
+ {
3020
+ name: "tone",
3021
+ type: '"success" | "warning" | "destructive" | "info" | "neutral"',
3022
+ description: "Semantic tone driving the colour + leading icon."
2884
3023
  }
2885
3024
  ],
2886
3025
  usage: [
@@ -3072,6 +3211,16 @@ toast.error("\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F");`,
3072
3211
  name: "onValueChange",
3073
3212
  type: "(page: number, pageSize: number) => void",
3074
3213
  description: "Page / page-size change handler."
3214
+ },
3215
+ {
3216
+ name: "pageSizeOptions",
3217
+ type: "number[]",
3218
+ description: "Selectable page sizes shown in the size changer."
3219
+ },
3220
+ {
3221
+ name: "showSizeChanger",
3222
+ type: "boolean",
3223
+ description: "Show the page-size selector beside the pager."
3075
3224
  }
3076
3225
  ],
3077
3226
  usage: [
@@ -3176,6 +3325,31 @@ import { Button } from "@godxjp/ui/general";
3176
3325
  type: '"horizontal" | "vertical"',
3177
3326
  defaultValue: '"horizontal"',
3178
3327
  description: "Layout direction."
3328
+ },
3329
+ {
3330
+ name: "status",
3331
+ type: '"wait" | "process" | "finish" | "error"',
3332
+ description: "Status of the CURRENT step (drives the active step colour)."
3333
+ },
3334
+ {
3335
+ name: "type",
3336
+ type: '"default" | "dot"',
3337
+ description: "Render full steps or compact dots."
3338
+ },
3339
+ {
3340
+ name: "size",
3341
+ type: '"md" | "sm"',
3342
+ description: "Step size."
3343
+ },
3344
+ {
3345
+ name: "titlePlacement",
3346
+ type: '"horizontal" | "vertical"',
3347
+ description: "Lay step titles beside or below the step icons."
3348
+ },
3349
+ {
3350
+ name: "onValueChange",
3351
+ type: "(value: number) => void",
3352
+ description: "Fires with the clicked step index (0-based)."
3179
3353
  }
3180
3354
  ],
3181
3355
  usage: [
@@ -3365,6 +3539,17 @@ formatDate(order.createdAt, { kind: "relative" }); // "3\u65E5\u524D"`,
3365
3539
  name: "className",
3366
3540
  type: "string",
3367
3541
  description: "Extra Tailwind classes applied to the outer wrapper `<div>`. Use for width overrides (e.g. `w-32`)."
3542
+ },
3543
+ {
3544
+ name: "allowClear",
3545
+ type: "boolean",
3546
+ defaultValue: "true",
3547
+ description: "Inline \u2715 on the trigger that resets the value when one is set (Ant-style). Pass `false` to hide it (e.g. a required field)."
3548
+ },
3549
+ {
3550
+ name: "onValueChange",
3551
+ type: "(value: string) => void",
3552
+ description: "Fires with the canonical 24h `HH:mm` string (empty when cleared)."
3368
3553
  }
3369
3554
  ],
3370
3555
  usage: [
@@ -3485,6 +3670,22 @@ export function CutoffTimeForm() {
3485
3670
  name: "className",
3486
3671
  type: "string",
3487
3672
  description: "Extra CSS classes applied to the root flex container (flex items-center gap-1). Use to constrain width or adjust layout; avoid overriding token colors."
3673
+ },
3674
+ {
3675
+ name: "allowClear",
3676
+ type: "boolean",
3677
+ defaultValue: "true",
3678
+ description: "Inline \u2715 on the trigger that resets the range when one is set (Ant-style). Pass `false` to hide it."
3679
+ },
3680
+ {
3681
+ name: "defaultValue",
3682
+ type: "DateRange",
3683
+ description: "Uncontrolled initial range."
3684
+ },
3685
+ {
3686
+ name: "onValueChange",
3687
+ type: "(value: DateRange | undefined) => void",
3688
+ description: "Fires with the selected range (undefined when cleared)."
3488
3689
  }
3489
3690
  ],
3490
3691
  usage: [
@@ -3964,6 +4165,11 @@ export function DepartmentFilter() {
3964
4165
  name: "onSelectChange",
3965
4166
  type: "(sourceSelectedKeys: string[], targetSelectedKeys: string[]) => void",
3966
4167
  description: "Called whenever the checked selection in either panel changes. Provides updated arrays for source and target selections. Required when `selectedKeys` is controlled."
4168
+ },
4169
+ {
4170
+ name: "onValueChange",
4171
+ type: '(targetKeys: string[], direction: "left" | "right", moveKeys: string[]) => void',
4172
+ description: "Fires when items move between panels; you own `targetKeys` state."
3967
4173
  }
3968
4174
  ],
3969
4175
  usage: [
@@ -4086,6 +4292,11 @@ export function AccountMapping() {
4086
4292
  name: "children",
4087
4293
  type: "React.ReactNode",
4088
4294
  description: "Custom button label for variant='button'. Falls back to the i18n 'Upload file' string."
4295
+ },
4296
+ {
4297
+ name: "onValueChange",
4298
+ type: "(items: UploadFileItemProp[]) => void",
4299
+ description: "Fires with the current file list."
4089
4300
  }
4090
4301
  ],
4091
4302
  usage: [
@@ -4295,6 +4506,11 @@ export function AvatarField() {
4295
4506
  type: "string",
4296
4507
  defaultValue: "undefined",
4297
4508
  description: "DOM id applied to the hidden native <input type='color'>. Pass the FormField id here so the label's htmlFor targets this control correctly."
4509
+ },
4510
+ {
4511
+ name: "onValueChange",
4512
+ type: "(value: string) => void",
4513
+ description: "Fires with the committed hex string."
4298
4514
  }
4299
4515
  ],
4300
4516
  usage: [
@@ -5009,6 +5225,11 @@ function AccountQuickPick({ onSelect }: { onSelect: (id: string) => void }) {
5009
5225
  name: "children",
5010
5226
  type: "React.ReactNode",
5011
5227
  description: "Manual children mode: used when `options` is omitted or empty. Render Checkbox items directly as children. You are responsible for composing each Checkbox with a Field for correct label/description layout."
5228
+ },
5229
+ {
5230
+ name: "onValueChange",
5231
+ type: "(value: string[]) => void",
5232
+ description: "Fires with the checked values array."
5012
5233
  }
5013
5234
  ],
5014
5235
  usage: [
@@ -8304,7 +8525,12 @@ primitive, see gaps handling in design-to-page/gaps-extend-or-ask + report-bug.`
8304
8525
  1\u20132 hero facts + ONE primary list/form + contextual actions; push tertiary content to
8305
8526
  a Sheet/Dialog/next page. An 8-stat-card wall is a red flag. Use real page chrome
8306
8527
  (AppShell/Sidebar/Topbar/PageContainer) \u2014 content never touches the viewport edge,
8307
- two bordered surfaces never touch (\u9593/breathing via Stack gap). Exactly ONE --primary
8528
+ two bordered surfaces never touch (\u9593/breathing via Stack gap). PageContainer is
8529
+ top-packed by default: a short page on a tall viewport leaves NO stretched void
8530
+ (the page background just spans the shell) \u2014 never add min-h-screen / flex-1 / a
8531
+ spacer div to fight it. Reach for PageContainer fill ONLY when the body must own
8532
+ the full height: a full-height DataTable, a SplitPane, or a chat surface whose
8533
+ composer is pinned to the bottom via footer + stickyFooter. Exactly ONE --primary
8308
8534
  action per view; status uses the FIXED semantic mapping (success/warning/info/
8309
8535
  attention/danger) \u2014 never recolor a wa-iro hue into a role, never use --primary for
8310
8536
  status. Pick density up front (compact 28 heavy-table / default 32 / comfortable 44
@@ -10222,7 +10448,7 @@ ${c.example}
10222
10448
  // package.json
10223
10449
  var package_default = {
10224
10450
  name: "@godxjp/ui-mcp",
10225
- version: "0.21.1",
10451
+ version: "0.21.3",
10226
10452
  description: "Model Context Protocol server for @godxjp/ui \u2014 gives Claude Code / Codex CLI / Cursor / any MCP-aware agent live access to the component catalog, prop vocabulary, design tokens, 34 cardinal rules, copy-paste-ready patterns, 12 design / taste skills synthesised from Leonxlnx/taste-skill, 20+ anti-AI-tell patterns, and a 50-check redesign audit \u2014 token-efficient (list \u2192 drill-down).",
10227
10453
  type: "module",
10228
10454
  main: "./dist/index.js",