@rfdtech/components 2.0.0 → 2.1.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/README.md +156 -54
- package/dist/components/app-layout/AppSidebar.d.ts +1 -1
- package/dist/components/app-layout/AppSidebar.d.ts.map +1 -1
- package/dist/components/bulk-import-modal/BulkImportModal.d.ts.map +1 -1
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/date-selector/DateSelector.d.ts.map +1 -1
- package/dist/components/launchpad/Launchpad.d.ts.map +1 -1
- package/dist/components/lottie/ClientLottie.d.ts +6 -0
- package/dist/components/lottie/ClientLottie.d.ts.map +1 -0
- package/dist/components/page-section/PageSection.d.ts +4 -0
- package/dist/components/page-section/PageSection.d.ts.map +1 -0
- package/dist/components/page-section/PageSection.test.d.ts +2 -0
- package/dist/components/page-section/PageSection.test.d.ts.map +1 -0
- package/dist/components/page-section/index.d.ts +2 -0
- package/dist/components/page-section/index.d.ts.map +1 -0
- package/dist/components/quick-actions/QuickActions.d.ts +4 -0
- package/dist/components/quick-actions/QuickActions.d.ts.map +1 -0
- package/dist/components/quick-actions/QuickActions.test.d.ts +2 -0
- package/dist/components/quick-actions/QuickActions.test.d.ts.map +1 -0
- package/dist/components/quick-actions/index.d.ts +2 -0
- package/dist/components/quick-actions/index.d.ts.map +1 -0
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/table/ProgressModal.d.ts.map +1 -1
- package/dist/components/table/Table.d.ts.map +1 -1
- package/dist/generated/components.theme.d.ts +1 -0
- package/dist/generated/components.theme.d.ts.map +1 -1
- package/dist/index.cjs +28 -28
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6353 -6000
- package/dist/mcp/generated/components.json +187 -20
- package/dist/mcp/generated/examples.json +37 -1
- package/dist/mcp/generated/index.meta.json +212 -202
- package/dist/mcp/generated/rules.json +13 -4
- package/dist/mcp/generated/search.json +88 -2
- package/dist/mcp/generated/tokens.json +10 -4
- package/dist/mcp/installers/codex.js +2 -1
- package/dist/mcp/installers/opencode.js +6 -2
- package/dist/mcp/installers/setup.js +1 -1
- package/dist/mcp/installers/util.js +14 -1
- package/dist/next.cjs +89 -99
- package/dist/next.css +1 -1
- package/dist/next.js +16695 -24578
- package/dist/types/card.d.ts +2 -0
- package/dist/types/card.d.ts.map +1 -1
- package/dist/types/combobox.d.ts +3 -0
- package/dist/types/combobox.d.ts.map +1 -1
- package/dist/types/date-selector.d.ts +4 -0
- package/dist/types/date-selector.d.ts.map +1 -1
- package/dist/types/launchpad.d.ts +5 -2
- package/dist/types/launchpad.d.ts.map +1 -1
- package/dist/types/metric-card.d.ts +6 -2
- package/dist/types/metric-card.d.ts.map +1 -1
- package/dist/types/page-section.d.ts +9 -0
- package/dist/types/page-section.d.ts.map +1 -0
- package/dist/types/quick-actions.d.ts +35 -0
- package/dist/types/quick-actions.d.ts.map +1 -0
- package/dist/types/sidebar.d.ts +10 -0
- package/dist/types/sidebar.d.ts.map +1 -1
- package/dist/types/table.d.ts +2 -0
- package/dist/types/table.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -454,7 +454,16 @@
|
|
|
454
454
|
"components": [
|
|
455
455
|
"sidebar"
|
|
456
456
|
],
|
|
457
|
-
"body": "The old default layout shell renders `<SidebarTrigger>Menu</SidebarTrigger>` to manually toggle\
|
|
457
|
+
"body": "The old default layout shell renders `<SidebarTrigger>Menu</SidebarTrigger>` to manually toggle the\nsidebar. The new shell drops it entirely — don't render `SidebarTrigger` in new or touched\nlayouts. Use `SidebarProvider` with its defaults and no manual collapse control."
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"id": "page-composition-sidebar-overlay-optional",
|
|
461
|
+
"title": "SidebarOverlay is rendered internally by Sidebar on mobile — explicit usage is optional",
|
|
462
|
+
"severity": "do",
|
|
463
|
+
"components": [
|
|
464
|
+
"sidebar"
|
|
465
|
+
],
|
|
466
|
+
"body": "`Sidebar` now renders the mobile overlay (the full-viewport close-on-click backdrop) as a sibling\nof the `<aside>` whenever the viewport is below the sidebar's mobile breakpoint. The old default\nlayout shell required you to drop `<SidebarOverlay />` into `<AppSidebar>` — forgetting it left\nthe drawer with no backdrop. Drop the explicit `<SidebarOverlay />` in new/touched layouts; it\nremains exported for backward compatibility and is harmless if duplicated (two stacked overlays\nboth close the drawer on click, no visual artifact)."
|
|
458
467
|
},
|
|
459
468
|
{
|
|
460
469
|
"id": "page-composition-sidebar-badge-numeric",
|
|
@@ -467,13 +476,13 @@
|
|
|
467
476
|
},
|
|
468
477
|
{
|
|
469
478
|
"id": "page-composition-branding-in-app-header",
|
|
470
|
-
"title": "Branding lives in AppHeader via AppHeaderBranding
|
|
479
|
+
"title": "Branding lives in AppHeader via AppHeaderBranding; pass a matching mobileHeader to the plain Sidebar for the mobile drawer",
|
|
471
480
|
"severity": "do",
|
|
472
481
|
"components": [
|
|
473
482
|
"app-header",
|
|
474
483
|
"sidebar"
|
|
475
484
|
],
|
|
476
|
-
"body": "Put branding in `AppHeader` via `AppHeaderBranding` (`logo`/`title`/`subtitle`)
|
|
485
|
+
"body": "Put branding in `AppHeader` via `AppHeaderBranding` (`logo`/`title`/`subtitle`). On desktop, the\nplain `Sidebar` has no `SidebarHeader`/`SidebarBrand` — the same logo must not appear twice on\nscreen. On mobile, the `AppHeader` collapses to just the hamburger and the sidebar becomes a\nfull-overlay drawer — pass the same brand content as a `mobileHeader` prop on the plain `Sidebar`\n(typically a `SidebarBrand` with the same logo/title as the `AppHeaderBranding`). The library\nwraps it in a `SidebarHeader` with the built-in `clet-sidebar__header--mobile-only` class, hidden\non desktop. `AppLayout` does NOT auto-extract the `AppHeaderBranding` — the two brand blocks are\nintentionally separate, since they live in different visual contexts with different styling.\nUse the current brand logo (`clet-logo.png`) for any new system — `gsl-logo.png` is the older\nmark used only by the legacy default layout shell."
|
|
477
486
|
},
|
|
478
487
|
{
|
|
479
488
|
"id": "page-composition-profile-popover-default-items",
|
|
@@ -521,7 +530,7 @@
|
|
|
521
530
|
"components": [
|
|
522
531
|
"table"
|
|
523
532
|
],
|
|
524
|
-
"body": "New or touched `Table`s use all three together: `TableContent variant=\"panel\"` (not `\"default\"`),\n`TableFilter variant=\"spread\"` (not the default `\"popover\"`), and `TableFooter
|
|
533
|
+
"body": "New or touched `Table`s use all three together: `TableContent variant=\"panel\"` (not `\"default\"`),\n`TableFilter variant=\"spread\"` (not the default `\"popover\"`), and `TableFooter noBorder` (a real\n`TableFooterProps` prop, not a demo hack)."
|
|
525
534
|
},
|
|
526
535
|
{
|
|
527
536
|
"id": "page-composition-other-preferred-variants",
|
|
@@ -238,6 +238,14 @@
|
|
|
238
238
|
"headings": [
|
|
239
239
|
"Changelog",
|
|
240
240
|
"[Unreleased]",
|
|
241
|
+
"[2.1.0] - 2026-07-25",
|
|
242
|
+
"Added",
|
|
243
|
+
"Changed",
|
|
244
|
+
"Fixed",
|
|
245
|
+
"[2.0.2] - 2026-07-23",
|
|
246
|
+
"Changed",
|
|
247
|
+
"Fixed",
|
|
248
|
+
"[2.0.1] - 2026-07-16",
|
|
241
249
|
"Added",
|
|
242
250
|
"Breaking",
|
|
243
251
|
"Deprecated",
|
|
@@ -452,6 +460,31 @@
|
|
|
452
460
|
"Notes"
|
|
453
461
|
]
|
|
454
462
|
},
|
|
463
|
+
{
|
|
464
|
+
"slug": "dashboard-patterns",
|
|
465
|
+
"name": "Dashboard patterns",
|
|
466
|
+
"category": "Guide",
|
|
467
|
+
"keywords": [
|
|
468
|
+
"dashboard",
|
|
469
|
+
"page composition",
|
|
470
|
+
"page section",
|
|
471
|
+
"quick actions",
|
|
472
|
+
"tabs",
|
|
473
|
+
"timeline",
|
|
474
|
+
"stepper",
|
|
475
|
+
"multi-step"
|
|
476
|
+
],
|
|
477
|
+
"description": "Composing a dashboard with PageSection, QuickActions, Tabs, Timeline, and Stepper",
|
|
478
|
+
"headings": [
|
|
479
|
+
"Dashboard patterns",
|
|
480
|
+
"Section layout with PageSection",
|
|
481
|
+
"Quick actions",
|
|
482
|
+
"Tabbed content with pill tabs",
|
|
483
|
+
"Audit trail with Timeline",
|
|
484
|
+
"Multi-step form with Stepper",
|
|
485
|
+
"Checklist"
|
|
486
|
+
]
|
|
487
|
+
},
|
|
455
488
|
{
|
|
456
489
|
"slug": "date-range-selector",
|
|
457
490
|
"name": "DateRangeSelector",
|
|
@@ -764,7 +797,7 @@
|
|
|
764
797
|
"product switcher",
|
|
765
798
|
"grid menu"
|
|
766
799
|
],
|
|
767
|
-
"description": "Constrained 9-app launcher with a
|
|
800
|
+
"description": "Constrained 9-app launcher with a top-right expand button + a See more line under the grid + required role switcher",
|
|
768
801
|
"headings": [
|
|
769
802
|
"Launchpad",
|
|
770
803
|
"Examples",
|
|
@@ -826,7 +859,13 @@
|
|
|
826
859
|
"stacked layout",
|
|
827
860
|
"CountrySelector",
|
|
828
861
|
"Combobox",
|
|
829
|
-
"NetworkOperator"
|
|
862
|
+
"NetworkOperator",
|
|
863
|
+
"gsl-to-clet",
|
|
864
|
+
"cletTheme",
|
|
865
|
+
"gslTheme",
|
|
866
|
+
"rename",
|
|
867
|
+
"TableFooter",
|
|
868
|
+
"noBorder"
|
|
830
869
|
],
|
|
831
870
|
"description": "Agent instructions for upgrading to v2 and the new design system",
|
|
832
871
|
"headings": [
|
|
@@ -839,12 +878,15 @@
|
|
|
839
878
|
"6. Prefer `Launchpad` over deprecated `AppSwitcher`",
|
|
840
879
|
"7. `CountrySelector` → `Combobox` or `PhoneNumberInput`'s country picker",
|
|
841
880
|
"8. `NetworkOperator` → `Combobox`",
|
|
881
|
+
"9. Naming rename: `.gsl-*` → `.clet-*`, `gslTheme()` → `cletTheme()`",
|
|
842
882
|
"Adopting the new design system",
|
|
843
883
|
"Layout shell: `AppLayout variant=\"stacked\"` + `AppHeader variant=\"plain\"` + `Sidebar variant=\"plain\"`",
|
|
844
884
|
"Use built-in `loading` states — never hand-roll placeholders",
|
|
845
885
|
"One role switcher, consistent across all three locations",
|
|
846
886
|
"Table family — adopt together",
|
|
847
887
|
"Other preferred variants",
|
|
888
|
+
"PageSection — consistent section spacing",
|
|
889
|
+
"QuickActions — dashboard action grids",
|
|
848
890
|
"Checklist"
|
|
849
891
|
]
|
|
850
892
|
},
|
|
@@ -970,6 +1012,27 @@
|
|
|
970
1012
|
"Notes"
|
|
971
1013
|
]
|
|
972
1014
|
},
|
|
1015
|
+
{
|
|
1016
|
+
"slug": "page-section",
|
|
1017
|
+
"name": "PageSection",
|
|
1018
|
+
"category": "Components",
|
|
1019
|
+
"keywords": [
|
|
1020
|
+
"page section",
|
|
1021
|
+
"section",
|
|
1022
|
+
"spacing",
|
|
1023
|
+
"layout",
|
|
1024
|
+
"vertical gap"
|
|
1025
|
+
],
|
|
1026
|
+
"description": "Uniform vertical spacing wrapper for page sections",
|
|
1027
|
+
"headings": [
|
|
1028
|
+
"PageSection",
|
|
1029
|
+
"Example",
|
|
1030
|
+
"Props",
|
|
1031
|
+
"Types",
|
|
1032
|
+
"`PageSectionClassNames`",
|
|
1033
|
+
"Notes"
|
|
1034
|
+
]
|
|
1035
|
+
},
|
|
973
1036
|
{
|
|
974
1037
|
"slug": "phone-number-input",
|
|
975
1038
|
"name": "PhoneNumberInput",
|
|
@@ -1105,6 +1168,28 @@
|
|
|
1105
1168
|
"Notes"
|
|
1106
1169
|
]
|
|
1107
1170
|
},
|
|
1171
|
+
{
|
|
1172
|
+
"slug": "quick-actions",
|
|
1173
|
+
"name": "QuickActions",
|
|
1174
|
+
"category": "Components",
|
|
1175
|
+
"keywords": [
|
|
1176
|
+
"quick actions",
|
|
1177
|
+
"action grid",
|
|
1178
|
+
"shortcuts",
|
|
1179
|
+
"customize",
|
|
1180
|
+
"dashboard actions"
|
|
1181
|
+
],
|
|
1182
|
+
"description": "Quick action grid with optional customize dialog",
|
|
1183
|
+
"headings": [
|
|
1184
|
+
"QuickActions",
|
|
1185
|
+
"Example",
|
|
1186
|
+
"Props",
|
|
1187
|
+
"Types",
|
|
1188
|
+
"`QuickActionItem`",
|
|
1189
|
+
"`QuickActionsClassNames`",
|
|
1190
|
+
"Notes"
|
|
1191
|
+
]
|
|
1192
|
+
},
|
|
1108
1193
|
{
|
|
1109
1194
|
"slug": "radio-group",
|
|
1110
1195
|
"name": "RadioGroup",
|
|
@@ -1529,6 +1614,7 @@
|
|
|
1529
1614
|
"Types",
|
|
1530
1615
|
"`TimelineItemClassNames`",
|
|
1531
1616
|
"Notes",
|
|
1617
|
+
"Don't",
|
|
1532
1618
|
"Tokens"
|
|
1533
1619
|
]
|
|
1534
1620
|
},
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"--clet-border": {
|
|
9
9
|
"group": "color",
|
|
10
10
|
"scope": "global",
|
|
11
|
-
"light": "#
|
|
11
|
+
"light": "#dadce073",
|
|
12
12
|
"dark": "#3c4043"
|
|
13
13
|
},
|
|
14
14
|
"--clet-border-strong": {
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
"--clet-z-header": {
|
|
242
242
|
"group": "zIndex",
|
|
243
243
|
"scope": "global",
|
|
244
|
-
"base": "
|
|
244
|
+
"base": "2"
|
|
245
245
|
},
|
|
246
246
|
"--clet-z-modal": {
|
|
247
247
|
"group": "zIndex",
|
|
@@ -567,7 +567,7 @@
|
|
|
567
567
|
"group": "font",
|
|
568
568
|
"scope": "component",
|
|
569
569
|
"component": "metric-card",
|
|
570
|
-
"base": "var(--gsl-font-header
|
|
570
|
+
"base": "var(\n --gsl-font-header,\n var(--clet-font-header)\n )"
|
|
571
571
|
},
|
|
572
572
|
"--clet-metric-card-value-size": {
|
|
573
573
|
"group": "length",
|
|
@@ -813,7 +813,7 @@
|
|
|
813
813
|
"group": "color",
|
|
814
814
|
"scope": "component",
|
|
815
815
|
"component": "sidebar",
|
|
816
|
-
"base": "var(--gsl-text-secondary
|
|
816
|
+
"base": "var(\n\t\t--gsl-text-secondary,\n\t\tvar(--clet-text-secondary)\n\t)"
|
|
817
817
|
},
|
|
818
818
|
"--clet-sidebar-bg": {
|
|
819
819
|
"group": "color",
|
|
@@ -845,6 +845,12 @@
|
|
|
845
845
|
"component": "sidebar",
|
|
846
846
|
"base": "0px"
|
|
847
847
|
},
|
|
848
|
+
"--clet-sidebar-z": {
|
|
849
|
+
"group": "misc",
|
|
850
|
+
"scope": "component",
|
|
851
|
+
"component": "sidebar",
|
|
852
|
+
"base": "10000"
|
|
853
|
+
},
|
|
848
854
|
"--clet-stepper-accent": {
|
|
849
855
|
"group": "color",
|
|
850
856
|
"scope": "component",
|
|
@@ -2,6 +2,7 @@ import { existsSync } from "node:fs";
|
|
|
2
2
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { MCP_SERVER_COMMAND } from "./util.js";
|
|
5
6
|
const CODEX_DIR = path.join(os.homedir(), ".codex");
|
|
6
7
|
const CONFIG_PATH = path.join(CODEX_DIR, "config.toml");
|
|
7
8
|
const MARKER = "[mcp_servers.rfdtech-ui]";
|
|
@@ -18,7 +19,7 @@ export async function install() {
|
|
|
18
19
|
if (existing.includes(MARKER)) {
|
|
19
20
|
return { name: "Codex", changed: false, detail: "~/.codex/config.toml (already set)" };
|
|
20
21
|
}
|
|
21
|
-
const block = `\n${MARKER}\ncommand =
|
|
22
|
+
const block = `\n${MARKER}\ncommand = ${JSON.stringify(MCP_SERVER_COMMAND.command)}\nargs = ${JSON.stringify(MCP_SERVER_COMMAND.args)}\n`;
|
|
22
23
|
await writeFile(CONFIG_PATH, existing.replace(/\s*$/, "") + "\n" + block, "utf8");
|
|
23
24
|
return { name: "Codex", changed: true, detail: "~/.codex/config.toml (updated)" };
|
|
24
25
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { appendPointerOnce, readJsonIfExists, writeJson } from "./util.js";
|
|
4
|
+
import { MCP_SERVER_COMMAND, appendPointerOnce, readJsonIfExists, writeJson, } from "./util.js";
|
|
5
5
|
export function detect(cwd) {
|
|
6
6
|
return (existsSync(path.join(cwd, "opencode.json")) ||
|
|
7
7
|
existsSync(path.join(os.homedir(), ".config", "opencode")));
|
|
@@ -17,7 +17,11 @@ export async function install(cwd) {
|
|
|
17
17
|
if (isNewFile)
|
|
18
18
|
data.$schema ??= "https://opencode.ai/config.json";
|
|
19
19
|
const mcp = { ...data.mcp };
|
|
20
|
-
const desired = {
|
|
20
|
+
const desired = {
|
|
21
|
+
type: "local",
|
|
22
|
+
command: [MCP_SERVER_COMMAND.command, ...MCP_SERVER_COMMAND.args],
|
|
23
|
+
enabled: true,
|
|
24
|
+
};
|
|
21
25
|
const already = JSON.stringify(mcp["rfdtech-ui"]) === JSON.stringify(desired);
|
|
22
26
|
mcp["rfdtech-ui"] = desired;
|
|
23
27
|
data.mcp = mcp;
|
|
@@ -25,7 +25,7 @@ export async function runSetup(cwd = process.cwd()) {
|
|
|
25
25
|
if (results.length === 0) {
|
|
26
26
|
console.log("No supported AI tool detected (looked for .claude/, .mcp.json, .cursor/, ~/.codex/, " +
|
|
27
27
|
"opencode.json, ~/.config/opencode).\n" +
|
|
28
|
-
"The MCP server is still available directly: `npx
|
|
28
|
+
"The MCP server is still available directly: `npx components-mcp` or `rfdui mcp`.");
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
for (const r of results) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
4
5
|
export async function readJsonIfExists(filePath) {
|
|
5
6
|
if (!existsSync(filePath))
|
|
6
7
|
return null;
|
|
@@ -15,9 +16,21 @@ export async function writeJson(filePath, data) {
|
|
|
15
16
|
await mkdir(path.dirname(filePath), { recursive: true });
|
|
16
17
|
await writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf8");
|
|
17
18
|
}
|
|
19
|
+
/** Absolute path to this package's own compiled server entry (dist/mcp/index.js,
|
|
20
|
+
* one level up from dist/mcp/installers/). Resolved from where THIS module is
|
|
21
|
+
* actually loaded from, so it's correct no matter how the host project's package
|
|
22
|
+
* manager lays out node_modules.
|
|
23
|
+
*
|
|
24
|
+
* `npx -y components-mcp` used to be used here, on the theory that npx would
|
|
25
|
+
* resolve the already-installed local bin. That's false in non-hoisted/strict
|
|
26
|
+
* node_modules layouts (e.g. a pnpm workspace where nothing at the repo root
|
|
27
|
+
* directly depends on @rfdtech/components) — npx finds no local bin and silently
|
|
28
|
+
* installs an unrelated same-named package from the npm registry instead. A
|
|
29
|
+
* direct `node <absolute path>` has no such ambiguity. */
|
|
30
|
+
const SERVER_ENTRY_PATH = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "index.js");
|
|
18
31
|
/** The MCP server identity every installer wires up, consistently named across tools. */
|
|
19
32
|
export const MCP_SERVER_NAME = "rfdtech-ui";
|
|
20
|
-
export const MCP_SERVER_COMMAND = { command: "
|
|
33
|
+
export const MCP_SERVER_COMMAND = { command: "node", args: [SERVER_ENTRY_PATH] };
|
|
21
34
|
/** Merge `{ mcpServers: { "rfdtech-ui": {...} } }` into an existing config object without touching anything else. */
|
|
22
35
|
export function mergeMcpServers(existing) {
|
|
23
36
|
const data = existing && typeof existing === "object" ? { ...existing } : {};
|