@godxjp/ui-mcp 0.22.0 → 13.16.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 +205 -80
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58,6 +58,12 @@ var COMPONENTS = [
|
|
|
58
58
|
defaultValue: "false",
|
|
59
59
|
description: 'Pin footer to viewport bottom on scroll \u2014 pairs with variant="narrow".'
|
|
60
60
|
},
|
|
61
|
+
{
|
|
62
|
+
name: "footerReveal",
|
|
63
|
+
type: '"always" | "onScroll"',
|
|
64
|
+
defaultValue: '"always"',
|
|
65
|
+
description: 'When the footer is sticky, control WHEN it shows. "always" keeps it pinned the whole time; "onScroll" hides it until the header scrolls out of view then slides it up \u2014 the standard edit/create save bar. Stays mounted (no reflow \u2192 no jitter).'
|
|
66
|
+
},
|
|
61
67
|
{
|
|
62
68
|
name: "fill",
|
|
63
69
|
type: "boolean",
|
|
@@ -82,7 +88,7 @@ var COMPONENTS = [
|
|
|
82
88
|
],
|
|
83
89
|
useCases: [
|
|
84
90
|
"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.",
|
|
85
|
-
"A detail / edit form page where the footer holds Save and Cancel buttons \u2014 use `footer={<Flex direction='row'><Button
|
|
91
|
+
"A detail / edit form page where the footer holds Save and Cancel buttons \u2014 use `footer={<Flex direction='row' justify='between' className='w-full'><Button variant='outline'>\u524A\u9664</Button><Button>\u4FDD\u5B58</Button></Flex>}` with `stickyFooter` + `footerReveal='onScroll'` so the save bar slides up only once the header (and its actions) scroll out of view \u2014 the canonical edit/create pattern.",
|
|
86
92
|
"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.",
|
|
87
93
|
"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.",
|
|
88
94
|
"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.",
|
|
@@ -941,7 +947,7 @@ import { Trash2 } from "lucide-react";
|
|
|
941
947
|
name: "columns",
|
|
942
948
|
type: "ColumnDef<T>[]",
|
|
943
949
|
required: true,
|
|
944
|
-
description: "Column definitions. Each column: {
|
|
950
|
+
description: "Column definitions. Each column: { key: string; header: ReactNode; render?: (row: T) => ReactNode; sortable?: boolean; width?: string; align?: 'left'|'center'|'right'; hiddenOnMobile?: boolean; pin?: 'end' }. If render is omitted, the raw value at row[key] is rendered as a string. pin:'end' sticks the column (typically row actions) to the inline-end edge on horizontal scroll with a separating shadow \u2014 pin at most one column."
|
|
945
951
|
},
|
|
946
952
|
{
|
|
947
953
|
name: "getRowId",
|
|
@@ -972,15 +978,33 @@ import { Trash2 } from "lucide-react";
|
|
|
972
978
|
},
|
|
973
979
|
{
|
|
974
980
|
name: "density",
|
|
975
|
-
type: "'compact' | 'comfortable'",
|
|
981
|
+
type: "'compact' | 'default' | 'comfortable'",
|
|
976
982
|
defaultValue: "'compact'",
|
|
977
|
-
description: "Controlled row density. Omit to let DataTable manage
|
|
983
|
+
description: "Controlled row density across all three tiers (compact 28 / default 36 / comfortable 48) \u2014 drive it from a \u8868\u793A\u5BC6\u5EA6 radio. Omit to let DataTable manage it internally (DataTable.DensityToggle flips compact\u2194comfortable)."
|
|
978
984
|
},
|
|
979
985
|
{
|
|
980
986
|
name: "onDensityChange",
|
|
981
|
-
type: "(density: 'compact' | 'comfortable') => void",
|
|
987
|
+
type: "(density: 'compact' | 'default' | 'comfortable') => void",
|
|
982
988
|
description: "Called when the user toggles density. Only needed when density is controlled."
|
|
983
989
|
},
|
|
990
|
+
{
|
|
991
|
+
name: "striped",
|
|
992
|
+
type: "boolean",
|
|
993
|
+
defaultValue: "false",
|
|
994
|
+
description: "Zebra-stripe the body rows (even rows get a subtle muted fill)."
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
name: "hoverable",
|
|
998
|
+
type: "boolean",
|
|
999
|
+
defaultValue: "false",
|
|
1000
|
+
description: "Highlight a row on hover even when it is not clickable. onRowClick already implies hover; use this for read-only tables that still want the hover affordance."
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
name: "stickyHeader",
|
|
1004
|
+
type: "boolean",
|
|
1005
|
+
defaultValue: "true",
|
|
1006
|
+
description: "Pin the header to the top while the body scrolls (\u30D8\u30C3\u30C0\u8FFD\u5F93). Set false to let it scroll away with the rows."
|
|
1007
|
+
},
|
|
984
1008
|
{
|
|
985
1009
|
name: "sort",
|
|
986
1010
|
type: "{ value: string; direction: 'asc' | 'desc' }",
|
|
@@ -995,7 +1019,7 @@ import { Trash2 } from "lucide-react";
|
|
|
995
1019
|
name: "loading",
|
|
996
1020
|
type: "boolean",
|
|
997
1021
|
defaultValue: "false",
|
|
998
|
-
description: "When true,
|
|
1022
|
+
description: "When true, swaps the body for SHAPED skeleton rows rendered inside the table's own grid (one border, aligned columns) \u2014 never a separate <SkeletonTable> in a Card (that double-borders). With React Query keepPreviousData, drive this off isPlaceholderData (pagination/search) || isLoading (first load), NOT isLoading alone. Suppresses the empty state while true."
|
|
999
1023
|
},
|
|
1000
1024
|
{
|
|
1001
1025
|
name: "empty",
|
|
@@ -1210,7 +1234,7 @@ export function Grid({ rows }: { rows: Row[] }) {
|
|
|
1210
1234
|
{
|
|
1211
1235
|
name: "Card",
|
|
1212
1236
|
group: "data-display",
|
|
1213
|
-
tagline: 'Surface container with optional accent stripe, variant fill, size, and density. \u26A0\uFE0F The bare <Card> has NO inner padding \u2014 body content MUST be wrapped in <CardContent> (titles in <CardHeader>), or it sits FLUSH against the card edges. Never hand-roll padding with className="p-4"; use <CardContent>. Compose with CardHeader/CardTitle/CardContent/CardFooter.',
|
|
1237
|
+
tagline: 'Surface container with optional accent stripe, variant fill, size, and density. \u26A0\uFE0F The bare <Card> has NO inner padding \u2014 body content MUST be wrapped in <CardContent> (titles in <CardHeader>), or it sits FLUSH against the card edges. Never hand-roll padding with className="p-4"; use <CardContent>. Compose with CardHeader/CardTitle/CardContent/CardFooter. For a tab/toolbar/filter strip (view tabs, list controls) use <CardBar extra={\u2026}> \u2014 a positionable bar that auto-draws its separator from its position (top\u2192bottom border, bottom\u2192top border, middle\u2192both) and pins `extra` content to the inline-end edge; place it as first/last child of the Card. Never hand-roll a bordered div for this.',
|
|
1214
1238
|
props: [
|
|
1215
1239
|
{
|
|
1216
1240
|
name: "accent",
|
|
@@ -3604,9 +3628,40 @@ import { Button } from "@godxjp/ui/general";
|
|
|
3604
3628
|
type: '"24h" | "12h" | "locale"',
|
|
3605
3629
|
defaultValue: '"locale"',
|
|
3606
3630
|
description: "Initial clock format."
|
|
3631
|
+
},
|
|
3632
|
+
{
|
|
3633
|
+
name: "theme",
|
|
3634
|
+
type: '"light" | "dark"',
|
|
3635
|
+
defaultValue: '"light"',
|
|
3636
|
+
description: 'Theme axis \u2192 <html data-theme>. Equal alias of the legacy .dark class. Persisted; change via setTheme / <AppSettingPicker kind="theme">.'
|
|
3637
|
+
},
|
|
3638
|
+
{
|
|
3639
|
+
name: "brand",
|
|
3640
|
+
type: '"brand" | "crm" | "logistics" | "partner" | "slate" | null',
|
|
3641
|
+
defaultValue: "null",
|
|
3642
|
+
description: "Brand-palette axis \u2192 <html data-brand> (sets --primary/--ring/--accent). OPT-IN: null keeps the --primary your own theme.css defines."
|
|
3643
|
+
},
|
|
3644
|
+
{
|
|
3645
|
+
name: "density",
|
|
3646
|
+
type: '"compact" | "default" | "comfortable"',
|
|
3647
|
+
defaultValue: '"default"',
|
|
3648
|
+
description: "Density axis \u2192 <html data-density>. A named preset of the global --scaling factor (compact .92 / default 1 / comfortable 1.08): every size token rescales in proportion app-wide. PageContainer density= overrides locally."
|
|
3649
|
+
},
|
|
3650
|
+
{
|
|
3651
|
+
name: "scaling",
|
|
3652
|
+
type: "number | null",
|
|
3653
|
+
defaultValue: "null",
|
|
3654
|
+
description: "Continuous global size multiplier \u2192 inline --scaling on <html> (Radix model). Scales spacing, control/table/checkbox/switch heights, radius in proportion. null defers to the density preset; a number (e.g. 0.95) overrides it. Type is NOT scaled (separate fontSize axis)."
|
|
3655
|
+
},
|
|
3656
|
+
{
|
|
3657
|
+
name: "fontSize",
|
|
3658
|
+
type: '"sm" | "default" | "lg"',
|
|
3659
|
+
defaultValue: '"default"',
|
|
3660
|
+
description: "Base type-size axis \u2192 <html data-font-size>. A preset sets --font-size-base and the whole golden scale rescales. Orthogonal to --scaling."
|
|
3607
3661
|
}
|
|
3608
3662
|
],
|
|
3609
3663
|
usage: [
|
|
3664
|
+
'DO drive the four theme axes (theme / brand / density / fontSize) from AppProvider props ONLY \u2014 they are written to <html data-*> and read by every component via tokens. Never hand-set --font-size-base or .ui-density-* in app CSS; that bypasses persistence + the runtime switchers. For runtime switching mount `<AppSettingPicker kind="density" | "fontSize" | "theme" | "brand" >` or call setDensity/setFontSize/setTheme/setBrand from useAppContext().',
|
|
3610
3665
|
"DO mount AppProvider ONCE at the application root (e.g. in app.tsx or the Inertia layout), wrapping ALL children \u2014 every godx-ui picker (LocalePicker, TimezonePicker, DateFormatPicker, TimeFormatPicker), every formatDate call, and the Toaster all rely on the single context it provides. Nesting two AppProviders creates split contexts; inner pickers silently read the wrong one.",
|
|
3611
3666
|
"DO NOT omit AppProvider and then try to use LocalePicker, TimezonePicker, or formatDate standalone \u2014 useAppContext() throws 'useAppContext must be used within <AppProvider>' at runtime. The only exception is using those pickers in fully controlled mode (value + onChange) which reads useOptionalAppContext() and returns null safely.",
|
|
3612
3667
|
"DO use the `persist={false}` prop on AppProvider when writing isolated tests or standalone settings forms where localStorage should not be read or written. With the default `persist={true}` the provider reads from localStorage key `godxjp.app` on mount (after first render), so initial state may differ between SSR and client.",
|
|
@@ -6993,12 +7048,12 @@ export default function PasswordBlock() {
|
|
|
6993
7048
|
{
|
|
6994
7049
|
name: "AppSettingPicker",
|
|
6995
7050
|
group: "navigation",
|
|
6996
|
-
tagline: "One provider-bound Select for a single AppProvider setting, chosen by `kind` (locale | timezone | dateFormat | timeFormat) \u2014
|
|
7051
|
+
tagline: "One provider-bound Select for a single AppProvider setting, chosen by `kind` (locale | timezone | dateFormat | timeFormat | theme | brand | density | fontSize) \u2014 covers locale/format AND the four theme axes. Throws if used without AppProvider AND without controlled value+onValueChange.",
|
|
6997
7052
|
props: [
|
|
6998
7053
|
{
|
|
6999
7054
|
name: "kind",
|
|
7000
|
-
type: '"locale" | "timezone" | "dateFormat" | "timeFormat"',
|
|
7001
|
-
description: "Which AppProvider setting this picker reads and writes. Determines the option list, icon, trigger width, and the context value/setter used."
|
|
7055
|
+
type: '"locale" | "timezone" | "dateFormat" | "timeFormat" | "theme" | "brand" | "density" | "fontSize"',
|
|
7056
|
+
description: "Which AppProvider setting this picker reads and writes. Determines the option list, icon, trigger width, and the context value/setter used. The theme-axis kinds (theme/brand/density/fontSize) write <html data-*>; brand's first option opts out (null \u2192 app token)."
|
|
7002
7057
|
},
|
|
7003
7058
|
{
|
|
7004
7059
|
name: "value",
|
|
@@ -7456,257 +7511,257 @@ var COMPONENT_TOKENS = [
|
|
|
7456
7511
|
},
|
|
7457
7512
|
{
|
|
7458
7513
|
"name": "--control-height",
|
|
7459
|
-
"value": "var(--control-height-default)",
|
|
7514
|
+
"value": "calc(var(--control-height-default) * var(--scaling))",
|
|
7460
7515
|
"description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes."
|
|
7461
7516
|
},
|
|
7462
7517
|
{
|
|
7463
7518
|
"name": "--control-height-sm",
|
|
7464
|
-
"value": "calc(var(--control-height) - 0.25rem)",
|
|
7465
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7519
|
+
"value": "calc(var(--control-height) - calc(0.25rem * var(--scaling)))",
|
|
7520
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7466
7521
|
},
|
|
7467
7522
|
{
|
|
7468
7523
|
"name": "--control-height-lg",
|
|
7469
|
-
"value": "calc(var(--control-height) + 0.25rem)",
|
|
7470
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7524
|
+
"value": "calc(var(--control-height) + calc(0.25rem * var(--scaling)))",
|
|
7525
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7471
7526
|
},
|
|
7472
7527
|
{
|
|
7473
7528
|
"name": "--control-height-xs",
|
|
7474
|
-
"value": "calc(var(--control-height) - 0.5rem)",
|
|
7475
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7529
|
+
"value": "calc(var(--control-height) - calc(0.5rem * var(--scaling)))",
|
|
7530
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7476
7531
|
},
|
|
7477
7532
|
{
|
|
7478
7533
|
"name": "--control-padding-x",
|
|
7479
7534
|
"value": "var(--control-padding-x-default)",
|
|
7480
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7535
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7481
7536
|
},
|
|
7482
7537
|
{
|
|
7483
7538
|
"name": "--control-gap",
|
|
7484
7539
|
"value": "var(--space-inline-sm)",
|
|
7485
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7540
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7486
7541
|
},
|
|
7487
7542
|
{
|
|
7488
7543
|
"name": "--control-gap-sm",
|
|
7489
7544
|
"value": "var(--space-inline-xs)",
|
|
7490
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7545
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7491
7546
|
},
|
|
7492
7547
|
{
|
|
7493
7548
|
"name": "--control-radius",
|
|
7494
7549
|
"value": "var(--radius)",
|
|
7495
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7550
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7496
7551
|
},
|
|
7497
7552
|
{
|
|
7498
7553
|
"name": "--control-icon-size",
|
|
7499
|
-
"value": "1rem",
|
|
7500
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7554
|
+
"value": "calc(1rem * var(--scaling))",
|
|
7555
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7501
7556
|
},
|
|
7502
7557
|
{
|
|
7503
7558
|
"name": "--control-icon-size-sm",
|
|
7504
|
-
"value": "0.875rem",
|
|
7505
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7559
|
+
"value": "calc(0.875rem * var(--scaling))",
|
|
7560
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7506
7561
|
},
|
|
7507
7562
|
{
|
|
7508
7563
|
"name": "--control-focus-ring-width",
|
|
7509
7564
|
"value": "2px",
|
|
7510
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7565
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7511
7566
|
},
|
|
7512
7567
|
{
|
|
7513
7568
|
"name": "--checkbox-size",
|
|
7514
|
-
"value": "1rem",
|
|
7515
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7569
|
+
"value": "calc(1rem * var(--scaling))",
|
|
7570
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7516
7571
|
},
|
|
7517
7572
|
{
|
|
7518
7573
|
"name": "--checkbox-size-compact",
|
|
7519
7574
|
"value": "0.875rem",
|
|
7520
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7575
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7521
7576
|
},
|
|
7522
7577
|
{
|
|
7523
7578
|
"name": "--checkbox-size-comfortable",
|
|
7524
7579
|
"value": "1.125rem",
|
|
7525
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7580
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7526
7581
|
},
|
|
7527
7582
|
{
|
|
7528
7583
|
"name": "--choice-gap",
|
|
7529
7584
|
"value": "var(--space-inline-sm)",
|
|
7530
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7585
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7531
7586
|
},
|
|
7532
7587
|
{
|
|
7533
7588
|
"name": "--choice-group-gap-x",
|
|
7534
7589
|
"value": "var(--space-6)",
|
|
7535
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7590
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7536
7591
|
},
|
|
7537
7592
|
{
|
|
7538
7593
|
"name": "--choice-group-gap-y",
|
|
7539
7594
|
"value": "var(--space-3)",
|
|
7540
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7595
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7541
7596
|
},
|
|
7542
7597
|
{
|
|
7543
7598
|
"name": "--choice-description-gap",
|
|
7544
7599
|
"value": "0.125rem",
|
|
7545
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7600
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7546
7601
|
},
|
|
7547
7602
|
{
|
|
7548
7603
|
"name": "--choice-control-offset",
|
|
7549
7604
|
"value": "0.125rem",
|
|
7550
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7605
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7551
7606
|
},
|
|
7552
7607
|
{
|
|
7553
7608
|
"name": "--switch-width",
|
|
7554
|
-
"value": "2.25rem",
|
|
7555
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7609
|
+
"value": "calc(2.25rem * var(--scaling))",
|
|
7610
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7556
7611
|
},
|
|
7557
7612
|
{
|
|
7558
7613
|
"name": "--switch-width-compact",
|
|
7559
7614
|
"value": "2rem",
|
|
7560
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7615
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7561
7616
|
},
|
|
7562
7617
|
{
|
|
7563
7618
|
"name": "--switch-width-comfortable",
|
|
7564
7619
|
"value": "2.5rem",
|
|
7565
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7620
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7566
7621
|
},
|
|
7567
7622
|
{
|
|
7568
7623
|
"name": "--switch-height",
|
|
7569
|
-
"value": "1.25rem",
|
|
7570
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7624
|
+
"value": "calc(1.25rem * var(--scaling))",
|
|
7625
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7571
7626
|
},
|
|
7572
7627
|
{
|
|
7573
7628
|
"name": "--switch-height-compact",
|
|
7574
7629
|
"value": "1.125rem",
|
|
7575
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7630
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7576
7631
|
},
|
|
7577
7632
|
{
|
|
7578
7633
|
"name": "--switch-height-comfortable",
|
|
7579
7634
|
"value": "1.375rem",
|
|
7580
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7635
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7581
7636
|
},
|
|
7582
7637
|
{
|
|
7583
7638
|
"name": "--switch-thumb-size",
|
|
7584
|
-
"value": "1rem",
|
|
7585
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7639
|
+
"value": "calc(1rem * var(--scaling))",
|
|
7640
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7586
7641
|
},
|
|
7587
7642
|
{
|
|
7588
7643
|
"name": "--switch-thumb-size-compact",
|
|
7589
7644
|
"value": "0.875rem",
|
|
7590
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7645
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7591
7646
|
},
|
|
7592
7647
|
{
|
|
7593
7648
|
"name": "--switch-thumb-size-comfortable",
|
|
7594
7649
|
"value": "1.125rem",
|
|
7595
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7650
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7596
7651
|
},
|
|
7597
7652
|
{
|
|
7598
7653
|
"name": "--switch-thumb-translate",
|
|
7599
|
-
"value": "1rem",
|
|
7600
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7654
|
+
"value": "calc(1rem * var(--scaling))",
|
|
7655
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7601
7656
|
},
|
|
7602
7657
|
{
|
|
7603
7658
|
"name": "--switch-thumb-translate-compact",
|
|
7604
7659
|
"value": "0.875rem",
|
|
7605
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7660
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7606
7661
|
},
|
|
7607
7662
|
{
|
|
7608
7663
|
"name": "--switch-thumb-translate-comfortable",
|
|
7609
7664
|
"value": "1.125rem",
|
|
7610
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7665
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7611
7666
|
},
|
|
7612
7667
|
{
|
|
7613
7668
|
"name": "--slider-track-height",
|
|
7614
7669
|
"value": "0.375rem",
|
|
7615
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7670
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7616
7671
|
},
|
|
7617
7672
|
{
|
|
7618
7673
|
"name": "--slider-thumb-size",
|
|
7619
7674
|
"value": "1rem",
|
|
7620
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7675
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7621
7676
|
},
|
|
7622
7677
|
{
|
|
7623
7678
|
"name": "--color-picker-input-width",
|
|
7624
7679
|
"value": "6.5rem",
|
|
7625
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7680
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7626
7681
|
},
|
|
7627
7682
|
{
|
|
7628
7683
|
"name": "--command-list-max-height",
|
|
7629
7684
|
"value": "min(300px, 50vh)",
|
|
7630
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7685
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7631
7686
|
},
|
|
7632
7687
|
{
|
|
7633
7688
|
"name": "--command-input-padding-x",
|
|
7634
7689
|
"value": "var(--space-3)",
|
|
7635
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7690
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7636
7691
|
},
|
|
7637
7692
|
{
|
|
7638
7693
|
"name": "--command-group-padding",
|
|
7639
7694
|
"value": "var(--space-1)",
|
|
7640
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7695
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7641
7696
|
},
|
|
7642
7697
|
{
|
|
7643
7698
|
"name": "--command-item-padding-y",
|
|
7644
7699
|
"value": "var(--space-2)",
|
|
7645
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7700
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7646
7701
|
},
|
|
7647
7702
|
{
|
|
7648
7703
|
"name": "--command-item-padding-x",
|
|
7649
7704
|
"value": "var(--space-2)",
|
|
7650
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7705
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7651
7706
|
},
|
|
7652
7707
|
{
|
|
7653
7708
|
"name": "--search-input-edge-inset",
|
|
7654
7709
|
"value": "var(--space-3)",
|
|
7655
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7710
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7656
7711
|
},
|
|
7657
7712
|
{
|
|
7658
7713
|
"name": "--search-input-start-padding",
|
|
7659
7714
|
"value": "calc( var(--search-input-edge-inset) + var(--control-icon-size) + var(--control-gap) )",
|
|
7660
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7715
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7661
7716
|
},
|
|
7662
7717
|
{
|
|
7663
7718
|
"name": "--search-input-end-padding",
|
|
7664
7719
|
"value": "calc( var(--search-input-edge-inset) + var(--control-icon-size) + var(--control-gap) )",
|
|
7665
|
-
"description": "Adjacent control sizes, derived from the active --control-height.
|
|
7666
|
-
},
|
|
7667
|
-
{
|
|
7668
|
-
"name": "--control-height-compact",
|
|
7669
|
-
"value": "2.75rem",
|
|
7670
|
-
"description": "Rule #24 \u2014 on touch devices (coarse pointer) interactive controls keep a \u226544px tap target * regardless of density; desktop (fine pointer) keeps the compact heights above. --control-height * resolves through these via var(), so inputs/buttons/selects/table rows all bump together."
|
|
7671
|
-
},
|
|
7672
|
-
{
|
|
7673
|
-
"name": "--control-height-default",
|
|
7674
|
-
"value": "2.75rem",
|
|
7675
|
-
"description": "Rule #24 \u2014 on touch devices (coarse pointer) interactive controls keep a \u226544px tap target * regardless of density; desktop (fine pointer) keeps the compact heights above. --control-height * resolves through these via var(), so inputs/buttons/selects/table rows all bump together."
|
|
7720
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7676
7721
|
},
|
|
7677
7722
|
{
|
|
7678
7723
|
"name": "--choice-description-font-size",
|
|
7679
7724
|
"value": "var(--font-size-xs)",
|
|
7680
|
-
"description": "
|
|
7725
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7681
7726
|
},
|
|
7682
7727
|
{
|
|
7683
7728
|
"name": "--color-picker-hex-font-size",
|
|
7684
7729
|
"value": "var(--font-size-xs)",
|
|
7685
|
-
"description": "
|
|
7730
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7686
7731
|
},
|
|
7687
7732
|
{
|
|
7688
7733
|
"name": "--command-group-heading-font-size",
|
|
7689
7734
|
"value": "var(--font-size-xs)",
|
|
7690
|
-
"description": "
|
|
7735
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7691
7736
|
},
|
|
7692
7737
|
{
|
|
7693
7738
|
"name": "--search-input-label-font-size",
|
|
7694
7739
|
"value": "var(--font-size-xs)",
|
|
7695
|
-
"description": "
|
|
7740
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7696
7741
|
},
|
|
7697
7742
|
{
|
|
7698
7743
|
"name": "--tag-input-chip-font-size",
|
|
7699
7744
|
"value": "var(--font-size-xs)",
|
|
7700
|
-
"description": "
|
|
7745
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7701
7746
|
},
|
|
7702
7747
|
{
|
|
7703
7748
|
"name": "--toggle-sm-font-size",
|
|
7704
7749
|
"value": "var(--font-size-xs)",
|
|
7705
|
-
"description": "
|
|
7750
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7706
7751
|
},
|
|
7707
7752
|
{
|
|
7708
7753
|
"name": "--button-sm-font-size",
|
|
7709
7754
|
"value": "var(--font-size-xs)",
|
|
7755
|
+
"description": "Adjacent control sizes, derived from the active --control-height. The \xB1step * is scaled too so the whole control ladder stays proportional under --scaling."
|
|
7756
|
+
},
|
|
7757
|
+
{
|
|
7758
|
+
"name": "--control-height-compact",
|
|
7759
|
+
"value": "2.75rem",
|
|
7760
|
+
"description": "Rule #24 \u2014 on touch devices (coarse pointer) interactive controls keep a \u226544px tap target * regardless of density; desktop (fine pointer) keeps the compact heights above. --control-height * resolves through these via var(), so inputs/buttons/selects/table rows all bump together."
|
|
7761
|
+
},
|
|
7762
|
+
{
|
|
7763
|
+
"name": "--control-height-default",
|
|
7764
|
+
"value": "2.75rem",
|
|
7710
7765
|
"description": "Rule #24 \u2014 on touch devices (coarse pointer) interactive controls keep a \u226544px tap target * regardless of density; desktop (fine pointer) keeps the compact heights above. --control-height * resolves through these via var(), so inputs/buttons/selects/table rows all bump together."
|
|
7711
7766
|
},
|
|
7712
7767
|
{
|
|
@@ -7961,7 +8016,7 @@ var COMPONENT_TOKENS = [
|
|
|
7961
8016
|
},
|
|
7962
8017
|
{
|
|
7963
8018
|
"name": "--table-row-height",
|
|
7964
|
-
"value": "var(--table-row-height-default)",
|
|
8019
|
+
"value": "calc(var(--table-row-height-default) * var(--scaling))",
|
|
7965
8020
|
"description": "Table component tokens: row height, cell padding."
|
|
7966
8021
|
},
|
|
7967
8022
|
{
|
|
@@ -7978,6 +8033,11 @@ var COMPONENT_TOKENS = [
|
|
|
7978
8033
|
"name": "--table-head-font-size",
|
|
7979
8034
|
"value": "var(--font-size-xs)",
|
|
7980
8035
|
"description": "Table component tokens: row height, cell padding."
|
|
8036
|
+
},
|
|
8037
|
+
{
|
|
8038
|
+
"name": "--table-pin-shadow",
|
|
8039
|
+
"value": "-6px 0 6px -5px hsl(var(--foreground) / 0.12)",
|
|
8040
|
+
"description": "Inline-end shadow that lifts a pinned (sticky) action column off the body it scrolls over."
|
|
7981
8041
|
}
|
|
7982
8042
|
];
|
|
7983
8043
|
|
|
@@ -8751,6 +8811,71 @@ broken). Spinner during init is wrong (nothing to spin over).`
|
|
|
8751
8811
|
}
|
|
8752
8812
|
]
|
|
8753
8813
|
},
|
|
8814
|
+
// ── crud-list (search/list pages) ─────────────────────────────
|
|
8815
|
+
{
|
|
8816
|
+
id: "crud-list",
|
|
8817
|
+
audience: "consumer",
|
|
8818
|
+
name: "CRUD list / search page \u2014 DataTable + search recipe",
|
|
8819
|
+
whenToUse: "Building any list/index/search screen over a paginated API: an admin table with a search panel, pagination, and row actions. The invariant contract for 'processing' feedback, disabled controls, sticky actions, and the search form.",
|
|
8820
|
+
source: "@godxjp/ui DataTable + TanStack Query keepPreviousData contract",
|
|
8821
|
+
sections: [
|
|
8822
|
+
{
|
|
8823
|
+
id: "fetch-contract",
|
|
8824
|
+
title: "Fetch contract \u2014 keepPreviousData \u2192 isPlaceholderData",
|
|
8825
|
+
tagline: "Pagination/search keeps the old page on screen; isPlaceholderData IS the processing flag.",
|
|
8826
|
+
body: `Use React Query with placeholderData: keepPreviousData and the
|
|
8827
|
+
search params IN the queryKey (["orders", params]). On a new page/search
|
|
8828
|
+
the previous rows stay mounted, so isLoading is FALSE \u2014 do NOT key
|
|
8829
|
+
loading UI off isLoading. The processing signal is isPlaceholderData
|
|
8830
|
+
(params changed, new data in flight). First-ever load (no prior data) is
|
|
8831
|
+
isLoading. So: loading = isLoading || isPlaceholderData. Idle the query
|
|
8832
|
+
(enabled: params !== null) until the user searches.`
|
|
8833
|
+
},
|
|
8834
|
+
{
|
|
8835
|
+
id: "loading-skeleton",
|
|
8836
|
+
title: "Skeleton via DataTable loading \u2014 never hand-roll",
|
|
8837
|
+
tagline: "Pass loading to <DataTable>; it renders a shaped skeleton INSIDE its own grid.",
|
|
8838
|
+
body: `<DataTable data={rows} columns={columns} loading={loading} />.
|
|
8839
|
+
DataTable swaps its body for shaped skeleton rows that reuse its own
|
|
8840
|
+
grid \u2014 one border, aligned columns. NEVER render a separate
|
|
8841
|
+
<SkeletonTable> inside a <Card> next to/around the table: the skeleton's
|
|
8842
|
+
frame + the Card's border = an ugly DOUBLE BORDER. Keep summary lines as
|
|
8843
|
+
Skeleton bars while loading too, so stale counts don't flash.`
|
|
8844
|
+
},
|
|
8845
|
+
{
|
|
8846
|
+
id: "disable-controls",
|
|
8847
|
+
title: "Disable search + pager while fetching",
|
|
8848
|
+
tagline: "A request is in flight \u2192 block re-submits. loading on Button, disabled on Pagination.",
|
|
8849
|
+
body: `The \u7167\u4F1A/Search button: <Button loading={isFetching}> (loading
|
|
8850
|
+
implies disabled). The pager: <Pagination disabled={loading} /> \u2014 it
|
|
8851
|
+
blocks prev/next/page clicks AND onValueChange while a fetch is running,
|
|
8852
|
+
so the user can't queue a second request mid-flight. Drive both off the
|
|
8853
|
+
SAME processing flag as the skeleton so the screen is coherent.`
|
|
8854
|
+
},
|
|
8855
|
+
{
|
|
8856
|
+
id: "sticky-actions",
|
|
8857
|
+
title: "Row-actions column is pinned to the end",
|
|
8858
|
+
tagline: "Action buttons must stay visible on horizontal scroll \u2014 column pin: 'end'.",
|
|
8859
|
+
body: `Give the actions column { key: "actions", header: "\u64CD\u4F5C",
|
|
8860
|
+
pin: "end", align: "right" }. DataTable makes it position:sticky at the
|
|
8861
|
+
inline-end edge with an opaque, hover/selection-aware background and a
|
|
8862
|
+
separating shadow (\u2014table-pin-shadow), and suppresses the scroll fade so
|
|
8863
|
+
it isn't dimmed. Pin at most ONE column per table. RTL-correct out of the
|
|
8864
|
+
box (logical inset-inline-end).`
|
|
8865
|
+
},
|
|
8866
|
+
{
|
|
8867
|
+
id: "search-form",
|
|
8868
|
+
title: "Search panel is Form + FormField + real pickers",
|
|
8869
|
+
tagline: "No ad-hoc labels/inputs; date ranges use the range pickers; no hard-coded text sizes.",
|
|
8870
|
+
body: `Build the search conditions with <Form>/<FormField> (label +
|
|
8871
|
+
a11y wiring), real DatePicker/DateRangePicker/MonthPicker/NumberInput/
|
|
8872
|
+
Select for each field \u2014 never bare <input> or hand-rolled labels. Group
|
|
8873
|
+
advanced conditions behind a \u8A73\u7D30\u6761\u4EF6 toggle. Submit copies the live
|
|
8874
|
+
condition state into the query params (a new object \u2192 new queryKey \u2192
|
|
8875
|
+
fetch). Clear resets to the idle (null) state.`
|
|
8876
|
+
}
|
|
8877
|
+
]
|
|
8878
|
+
},
|
|
8754
8879
|
// ── soft (Awwwards / premium agency) ───────────────────────────
|
|
8755
8880
|
{
|
|
8756
8881
|
id: "soft",
|
|
@@ -11568,7 +11693,7 @@ ${c.example}
|
|
|
11568
11693
|
// package.json
|
|
11569
11694
|
var package_default = {
|
|
11570
11695
|
name: "@godxjp/ui-mcp",
|
|
11571
|
-
version: "
|
|
11696
|
+
version: "13.16.3",
|
|
11572
11697
|
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, 45 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).",
|
|
11573
11698
|
type: "module",
|
|
11574
11699
|
main: "./dist/index.js",
|