@godxjp/ui-mcp 0.10.0 → 0.11.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/dist/index.js CHANGED
@@ -1281,7 +1281,11 @@ import { ResponsiveGrid } from "@godxjp/ui/layout";
1281
1281
  type: "React.ComponentType<{ className?: string }> | null",
1282
1282
  description: "Leading icon override. Pass null to suppress the auto status icon."
1283
1283
  },
1284
- { name: "children", type: "ReactNode", description: "Badge label. When omitted with status, Badge renders the translated lifecycle label or raw status." }
1284
+ {
1285
+ name: "children",
1286
+ type: "ReactNode",
1287
+ description: "Badge label. When omitted with status, Badge renders the translated lifecycle label or raw status."
1288
+ }
1285
1289
  ],
1286
1290
  usage: [
1287
1291
  "DO pick the correct variant semantically: `success` (approved/paid), `warning` (pending/overdue), `destructive` (rejected/error), `secondary` (neutral category), `outline` (subtle label), `default` (primary accent). Never force a colour just for aesthetics \u2014 agents and screen readers read the variant as intent.",
@@ -6518,7 +6522,11 @@ export function InvoiceListHeader() {
6518
6522
  group: "data-display",
6519
6523
  tagline: "Radix Avatar wrapper with image and fallback slots for users, teams, and entities.",
6520
6524
  props: [
6521
- { name: "children", type: "ReactNode", description: "Compose AvatarImage and AvatarFallback." },
6525
+ {
6526
+ name: "children",
6527
+ type: "ReactNode",
6528
+ description: "Compose AvatarImage and AvatarFallback."
6529
+ },
6522
6530
  { name: "className", type: "string", description: "Extra classes on the avatar root." }
6523
6531
  ],
6524
6532
  usage: [
@@ -6541,11 +6549,28 @@ export function InvoiceListHeader() {
6541
6549
  group: "layout",
6542
6550
  tagline: "Radix Separator wrapper for tokenized horizontal or vertical dividers.",
6543
6551
  props: [
6544
- { name: "orientation", type: '"horizontal" | "vertical"', defaultValue: '"horizontal"', description: "Divider direction." },
6545
- { name: "decorative", type: "boolean", defaultValue: "true", description: "Whether the separator is decorative for assistive tech." }
6552
+ {
6553
+ name: "orientation",
6554
+ type: '"horizontal" | "vertical"',
6555
+ defaultValue: '"horizontal"',
6556
+ description: "Divider direction."
6557
+ },
6558
+ {
6559
+ name: "decorative",
6560
+ type: "boolean",
6561
+ defaultValue: "true",
6562
+ description: "Whether the separator is decorative for assistive tech."
6563
+ }
6564
+ ],
6565
+ usage: [
6566
+ "DO use Separator for section dividers instead of raw border divs.",
6567
+ "DO set orientation='vertical' only when the parent gives it a stable height."
6568
+ ],
6569
+ useCases: [
6570
+ "Separating toolbar groups",
6571
+ "Dividing stacked page sections",
6572
+ "Vertical split between metadata groups"
6546
6573
  ],
6547
- usage: ["DO use Separator for section dividers instead of raw border divs.", "DO set orientation='vertical' only when the parent gives it a stable height."],
6548
- useCases: ["Separating toolbar groups", "Dividing stacked page sections", "Vertical split between metadata groups"],
6549
6574
  related: ["Stack \u2014 use for vertical spacing without a visible rule."],
6550
6575
  example: `import { Separator } from "@godxjp/ui/layout";
6551
6576
 
@@ -6560,8 +6585,15 @@ export function InvoiceListHeader() {
6560
6585
  props: [
6561
6586
  { name: "className", type: "string", description: "Size and layout classes for the block." }
6562
6587
  ],
6563
- usage: ["DO use Skeleton for a custom block when SkeletonRows/Table/Card do not match the final layout.", "DON'T use a spinner overlay for skeletonable page content."],
6564
- useCases: ["Single loading line", "Custom card media placeholder", "Inline metadata placeholder"],
6588
+ usage: [
6589
+ "DO use Skeleton for a custom block when SkeletonRows/Table/Card do not match the final layout.",
6590
+ "DON'T use a spinner overlay for skeletonable page content."
6591
+ ],
6592
+ useCases: [
6593
+ "Single loading line",
6594
+ "Custom card media placeholder",
6595
+ "Inline metadata placeholder"
6596
+ ],
6565
6597
  related: ["SkeletonRows", "SkeletonTable", "SkeletonCard"],
6566
6598
  example: `import { Skeleton } from "@godxjp/ui/feedback";
6567
6599
 
@@ -6575,11 +6607,28 @@ export function InvoiceListHeader() {
6575
6607
  tagline: "Radix Toggle wrapper with default/outline variants and tokenized sizes.",
6576
6608
  props: [
6577
6609
  { name: "pressed", type: "boolean", description: "Controlled pressed state." },
6578
- { name: "onPressedChange", type: "(pressed: boolean) => void", description: "Pressed-state callback." },
6579
- { name: "variant", type: '"default" | "outline"', defaultValue: '"default"', description: "Visual style." },
6580
- { name: "size", type: '"sm" | "default" | "lg"', defaultValue: '"default"', description: "Control size." }
6610
+ {
6611
+ name: "onPressedChange",
6612
+ type: "(pressed: boolean) => void",
6613
+ description: "Pressed-state callback."
6614
+ },
6615
+ {
6616
+ name: "variant",
6617
+ type: '"default" | "outline"',
6618
+ defaultValue: '"default"',
6619
+ description: "Visual style."
6620
+ },
6621
+ {
6622
+ name: "size",
6623
+ type: '"sm" | "default" | "lg"',
6624
+ defaultValue: '"default"',
6625
+ description: "Control size."
6626
+ }
6627
+ ],
6628
+ usage: [
6629
+ "DO provide an accessible label when the toggle only contains an icon.",
6630
+ "DON'T use Toggle for multi-option selection; use ToggleGroup."
6581
6631
  ],
6582
- usage: ["DO provide an accessible label when the toggle only contains an icon.", "DON'T use Toggle for multi-option selection; use ToggleGroup."],
6583
6632
  useCases: ["Bold/italic toolbar buttons", "Pinned filter toggles", "Compact view mode buttons"],
6584
6633
  related: ["ToggleGroup", "Button"],
6585
6634
  example: `import { Toggle } from "@godxjp/ui/data-entry";
@@ -6593,11 +6642,23 @@ export function InvoiceListHeader() {
6593
6642
  group: "data-entry",
6594
6643
  tagline: "Radix ToggleGroup wrapper for single or multiple toggle selection.",
6595
6644
  props: [
6596
- { name: "type", type: '"single" | "multiple"', required: true, description: "Selection mode." },
6645
+ {
6646
+ name: "type",
6647
+ type: '"single" | "multiple"',
6648
+ required: true,
6649
+ description: "Selection mode."
6650
+ },
6597
6651
  { name: "value", type: "string | string[]", description: "Controlled selected value(s)." },
6598
- { name: "onValueChange", type: "(value: string | string[]) => void", description: "Selection callback." }
6652
+ {
6653
+ name: "onValueChange",
6654
+ type: "(value: string | string[]) => void",
6655
+ description: "Selection callback."
6656
+ }
6657
+ ],
6658
+ usage: [
6659
+ "DO choose type='single' for mutually exclusive toolbar modes.",
6660
+ "DO choose type='multiple' for independent formatting toggles."
6599
6661
  ],
6600
- usage: ["DO choose type='single' for mutually exclusive toolbar modes.", "DO choose type='multiple' for independent formatting toggles."],
6601
6662
  useCases: ["Text alignment selector", "Formatting toolbar", "View density switcher"],
6602
6663
  related: ["Toggle", "RadioGroup"],
6603
6664
  example: `import { ToggleGroup, ToggleGroupItem } from "@godxjp/ui/data-entry";
@@ -6613,10 +6674,18 @@ export function InvoiceListHeader() {
6613
6674
  group: "layout",
6614
6675
  tagline: "Radix AspectRatio wrapper for stable media and preview frames.",
6615
6676
  props: [
6616
- { name: "ratio", type: "number", defaultValue: "16 / 9", description: "Width divided by height." },
6677
+ {
6678
+ name: "ratio",
6679
+ type: "number",
6680
+ defaultValue: "16 / 9",
6681
+ description: "Width divided by height."
6682
+ },
6617
6683
  { name: "children", type: "ReactNode", description: "Content constrained to the ratio." }
6618
6684
  ],
6619
- usage: ["DO use AspectRatio for media, maps, charts, or previews that must not jump during load.", "DON'T use it for unconstrained text content."],
6685
+ usage: [
6686
+ "DO use AspectRatio for media, maps, charts, or previews that must not jump during load.",
6687
+ "DON'T use it for unconstrained text content."
6688
+ ],
6620
6689
  useCases: ["Video embed frame", "Image preview slot", "Dashboard chart placeholder"],
6621
6690
  related: ["CardCover", "Skeleton"],
6622
6691
  example: `import { AspectRatio } from "@godxjp/ui/layout";
@@ -6624,6 +6693,229 @@ export function InvoiceListHeader() {
6624
6693
  <AspectRatio ratio={16 / 9}>...</AspectRatio>`,
6625
6694
  storyPath: "layout/AspectRatio.stories.tsx",
6626
6695
  rules: [2, 3]
6696
+ },
6697
+ {
6698
+ name: "Accordion",
6699
+ group: "data-display",
6700
+ tagline: "Radix accordion \u2014 vertically stacked, collapsible sections. Compose Accordion > AccordionItem > AccordionTrigger + AccordionContent.",
6701
+ props: [
6702
+ {
6703
+ name: "type",
6704
+ type: '"single" | "multiple"',
6705
+ required: true,
6706
+ description: "single = one open at a time; multiple = independent."
6707
+ },
6708
+ {
6709
+ name: "collapsible",
6710
+ type: "boolean",
6711
+ description: "When type=single, allow closing the open item."
6712
+ },
6713
+ { name: "value", type: "string | string[]", description: "Controlled open item(s)." },
6714
+ {
6715
+ name: "defaultValue",
6716
+ type: "string | string[]",
6717
+ description: "Uncontrolled initial open item(s)."
6718
+ },
6719
+ {
6720
+ name: "onValueChange",
6721
+ type: "(value: string | string[]) => void",
6722
+ description: "Open-state callback."
6723
+ }
6724
+ ],
6725
+ usage: [
6726
+ 'DO compose the full set: <Accordion type="single" collapsible><AccordionItem value="a"><AccordionTrigger/><AccordionContent/></AccordionItem></Accordion>.',
6727
+ "DO give each AccordionItem a unique `value`.",
6728
+ "DON'T use it for primary navigation \u2014 that's Sidebar/Tabs. Accordion is for collapsible content/FAQ."
6729
+ ],
6730
+ useCases: [
6731
+ "FAQ lists",
6732
+ "Grouped settings sections",
6733
+ "Collapsible detail panels on a record page",
6734
+ "Filter facet groups in a sidebar"
6735
+ ],
6736
+ related: [
6737
+ "Collapsible (single open/close region, no item set)",
6738
+ "Tabs (mutually-exclusive views, always one visible)"
6739
+ ],
6740
+ example: `import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@godxjp/ui/data-display";
6741
+
6742
+ <Accordion type="single" collapsible>
6743
+ <AccordionItem value="ship">
6744
+ <AccordionTrigger>\u914D\u9001\u306B\u3064\u3044\u3066</AccordionTrigger>
6745
+ <AccordionContent>3\u301C5\u55B6\u696D\u65E5\u3067\u304A\u5C4A\u3051\u3057\u307E\u3059\u3002</AccordionContent>
6746
+ </AccordionItem>
6747
+ </Accordion>`,
6748
+ storyPath: "data-display/Accordion.stories.tsx",
6749
+ rules: [3, 6]
6750
+ },
6751
+ {
6752
+ name: "HoverCard",
6753
+ group: "data-display",
6754
+ tagline: "Radix hover card \u2014 a rich popover shown on hover/focus of a trigger (for sighted-pointer affordances; not a replacement for Tooltip's short text).",
6755
+ props: [
6756
+ {
6757
+ name: "openDelay",
6758
+ type: "number",
6759
+ defaultValue: "700",
6760
+ description: "ms before opening on hover."
6761
+ },
6762
+ {
6763
+ name: "closeDelay",
6764
+ type: "number",
6765
+ defaultValue: "300",
6766
+ description: "ms before closing."
6767
+ },
6768
+ { name: "open", type: "boolean", description: "Controlled open state." },
6769
+ {
6770
+ name: "onOpenChange",
6771
+ type: "(open: boolean) => void",
6772
+ description: "Open-state callback."
6773
+ }
6774
+ ],
6775
+ usage: [
6776
+ "DO compose HoverCard > HoverCardTrigger > HoverCardContent.",
6777
+ "DO use for RICH preview content (a card, avatar + bio); for short plain-text hints use Tooltip.",
6778
+ "DON'T rely on it for essential info \u2014 hover isn't available on touch; provide the same content on click/tap elsewhere."
6779
+ ],
6780
+ useCases: [
6781
+ "User/profile preview on @mention hover",
6782
+ "Entity preview (customer/account) on a table cell",
6783
+ "Glossary term definitions",
6784
+ "Commit/PR preview links"
6785
+ ],
6786
+ related: [
6787
+ "Tooltip (short text label, not rich content)",
6788
+ "Popover (click-triggered, interactive content)"
6789
+ ],
6790
+ example: `import { HoverCard, HoverCardTrigger, HoverCardContent } from "@godxjp/ui/data-display";
6791
+
6792
+ <HoverCard>
6793
+ <HoverCardTrigger>@yamada</HoverCardTrigger>
6794
+ <HoverCardContent>\u5C71\u7530\u592A\u90CE \u2014 \u7D4C\u7406\u90E8</HoverCardContent>
6795
+ </HoverCard>`,
6796
+ storyPath: "data-display/HoverCard.stories.tsx",
6797
+ rules: [3, 6]
6798
+ },
6799
+ {
6800
+ name: "PasswordInput",
6801
+ group: "data-entry",
6802
+ tagline: "Input for passwords with a built-in show/hide eye toggle. Accepts all Input props except `type`.",
6803
+ props: [
6804
+ {
6805
+ name: "value",
6806
+ type: "string",
6807
+ description: "Controlled value (or use defaultValue/uncontrolled)."
6808
+ },
6809
+ { name: "name", type: "string", description: "Form field name for native submission." },
6810
+ { name: "placeholder", type: "string", description: "Placeholder text." },
6811
+ { name: "disabled", type: "boolean", description: "Disables the field + toggle." }
6812
+ ],
6813
+ usage: [
6814
+ 'DO use for any password / secret field instead of `<Input type="password">` so users get the show/hide affordance.',
6815
+ 'DO pass `name` + `autoComplete="current-password"|"new-password"` for correct form/password-manager behavior.',
6816
+ "DON'T add your own eye button \u2014 it's built in (and excluded from the tab order)."
6817
+ ],
6818
+ useCases: [
6819
+ "Login password field",
6820
+ "Sign-up / change-password forms (new-password)",
6821
+ "API key / secret entry in settings"
6822
+ ],
6823
+ related: [
6824
+ "Input (the base text field this wraps)",
6825
+ "FormField (label + error wrapper around it)"
6826
+ ],
6827
+ example: `import { PasswordInput } from "@godxjp/ui/data-entry";
6828
+
6829
+ <PasswordInput name="password" autoComplete="current-password" placeholder="\u30D1\u30B9\u30EF\u30FC\u30C9" />`,
6830
+ storyPath: "data-entry/PasswordInput.stories.tsx",
6831
+ rules: [3, 6]
6832
+ },
6833
+ {
6834
+ name: "Drawer",
6835
+ group: "feedback",
6836
+ tagline: "Bottom-sheet (vaul) \u2014 a draggable sheet that slides up from the screen edge. DISTINCT from Sheet (the side panel); use Drawer for mobile/touch bottom sheets.",
6837
+ props: [
6838
+ { name: "open", type: "boolean", description: "Controlled open state." },
6839
+ {
6840
+ name: "onOpenChange",
6841
+ type: "(open: boolean) => void",
6842
+ description: "Open-state callback."
6843
+ },
6844
+ {
6845
+ name: "shouldScaleBackground",
6846
+ type: "boolean",
6847
+ defaultValue: "true",
6848
+ description: "Scale the page behind the sheet (iOS-style)."
6849
+ }
6850
+ ],
6851
+ usage: [
6852
+ "DO compose Drawer > DrawerTrigger > DrawerContent (> DrawerHeader/DrawerTitle + body + DrawerFooter).",
6853
+ "DO use Drawer for mobile/touch bottom sheets; use Sheet for a desktop side panel and Dialog for a centered modal.",
6854
+ "DON'T confuse with Sheet \u2014 Sheet slides from a side edge, Drawer is the draggable bottom sheet."
6855
+ ],
6856
+ useCases: [
6857
+ "Mobile action sheet / menu",
6858
+ "Filter panel on small screens",
6859
+ "Quick-create form on touch",
6860
+ "Detail peek that drags up"
6861
+ ],
6862
+ related: [
6863
+ "Sheet (side panel, same Radix Dialog base, different placement)",
6864
+ "Dialog (centered modal)"
6865
+ ],
6866
+ example: `import { Drawer, DrawerTrigger, DrawerContent, DrawerHeader, DrawerTitle } from "@godxjp/ui/feedback";
6867
+
6868
+ <Drawer>
6869
+ <DrawerTrigger>\u7D5E\u308A\u8FBC\u307F</DrawerTrigger>
6870
+ <DrawerContent>
6871
+ <DrawerHeader><DrawerTitle>\u7D5E\u308A\u8FBC\u307F</DrawerTitle></DrawerHeader>
6872
+ {/* filters */}
6873
+ </DrawerContent>
6874
+ </Drawer>`,
6875
+ storyPath: "feedback/Drawer.stories.tsx",
6876
+ rules: [3, 6, 24]
6877
+ },
6878
+ {
6879
+ name: "InputOTP",
6880
+ group: "data-entry",
6881
+ tagline: "One-time-code / 2FA input (input-otp) \u2014 N single-character slots that behave as one field. Compose InputOTP > InputOTPGroup > InputOTPSlot.",
6882
+ props: [
6883
+ {
6884
+ name: "maxLength",
6885
+ type: "number",
6886
+ required: true,
6887
+ description: "Number of slots (e.g. 6)."
6888
+ },
6889
+ { name: "value", type: "string", description: "Controlled value." },
6890
+ {
6891
+ name: "onChange",
6892
+ type: "(value: string) => void",
6893
+ description: "Value callback (this is a true text input \u2014 onChange is the DOM-style value handler here)."
6894
+ },
6895
+ { name: "pattern", type: "string", description: "Allowed-char regex (e.g. digits only)." }
6896
+ ],
6897
+ usage: [
6898
+ "DO set `maxLength` to the code length and render that many InputOTPSlot with sequential `index`.",
6899
+ "DO wrap slots in InputOTPGroup; use InputOTPSeparator between groups (e.g. 3 + 3).",
6900
+ "DON'T build N separate Inputs \u2014 this is ONE field with paste, arrow-key, and caret handling built in."
6901
+ ],
6902
+ useCases: [
6903
+ "2FA / OTP verification code",
6904
+ "Email / SMS confirmation code",
6905
+ "PIN entry",
6906
+ "Invite / redemption code"
6907
+ ],
6908
+ related: ["Input (a normal single text field)", "PasswordInput (masked secret field)"],
6909
+ example: `import { InputOTP, InputOTPGroup, InputOTPSlot } from "@godxjp/ui/data-entry";
6910
+
6911
+ <InputOTP maxLength={6}>
6912
+ <InputOTPGroup>
6913
+ <InputOTPSlot index={0} /><InputOTPSlot index={1} /><InputOTPSlot index={2} />
6914
+ <InputOTPSlot index={3} /><InputOTPSlot index={4} /><InputOTPSlot index={5} />
6915
+ </InputOTPGroup>
6916
+ </InputOTP>`,
6917
+ storyPath: "data-entry/InputOTP.stories.tsx",
6918
+ rules: [3, 6]
6627
6919
  }
6628
6920
  ];
6629
6921
  function findComponent(name) {
@@ -9035,11 +9327,10 @@ function getTokens(cat) {
9035
9327
  for (const [c, items] of Object.entries(grouped)) {
9036
9328
  out += `## ${c}
9037
9329
 
9038
- | Name | Role | Value | Axis |
9039
- |---|---|---|---|
9330
+ | Name | Role | Tier |
9331
+ |---|---|---|
9040
9332
  `;
9041
- for (const t of items)
9042
- out += `| \`${t.name}\` | ${t.role} | ${t.value ?? "\u2014"} | ${t.axis ?? "\u2014"} |
9333
+ for (const t of items) out += `| \`${t.name}\` | ${t.role} | ${t.tier} |
9043
9334
  `;
9044
9335
  out += "\n";
9045
9336
  }