nexus-shared 1.1.2 → 1.1.4
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/chunk-7GVFDWOS.js +28 -0
- package/dist/chunk-7GVFDWOS.js.map +1 -0
- package/dist/chunk-EW6K4PYI.js +96 -0
- package/dist/chunk-EW6K4PYI.js.map +1 -0
- package/dist/chunk-UMV7E2RN.js +1 -0
- package/dist/chunk-UMV7E2RN.js.map +1 -0
- package/dist/client.css +119 -0
- package/dist/client.css.map +1 -0
- package/dist/client.d.ts +9 -0
- package/dist/client.js +7 -0
- package/dist/client.js.map +1 -0
- package/dist/index.css +178 -946
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +5 -1011
- package/dist/index.js +10 -2854
- package/dist/index.js.map +1 -1
- package/dist/interface.d.ts +9 -0
- package/dist/interface.js +2 -0
- package/dist/interface.js.map +1 -0
- package/dist/nexus-list-DV45tcM0.d.ts +24 -0
- package/dist/server.css +88 -0
- package/dist/server.css.map +1 -0
- package/dist/server.d.ts +9 -0
- package/dist/server.js +7 -0
- package/dist/server.js.map +1 -0
- package/package.json +35 -45
- package/src/client/index.ts +1 -0
- package/src/client/nexus-selectable-list.css +131 -0
- package/src/client/nexus-selectable-list.tsx +111 -0
- package/src/client.ts +7 -0
- package/src/index.ts +11 -0
- package/src/interface.ts +5 -0
- package/src/interfaces/index.ts +6 -0
- package/src/interfaces/nexus-base.ts +5 -0
- package/src/interfaces/nexus-list.ts +24 -0
- package/src/server/index.ts +1 -0
- package/src/server/nexus-stat-list.css +92 -0
- package/src/server/nexus-stat-list.tsx +46 -0
- package/src/server.ts +8 -0
- package/USER-GUIDE.md +0 -175
- package/dist/index.cjs +0 -3002
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.mts +0 -1011
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/server.ts
|
|
2
|
+
import "server-only";
|
|
3
|
+
|
|
4
|
+
// src/server/nexus-stat-list.tsx
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function NexusStatList({
|
|
7
|
+
title,
|
|
8
|
+
items,
|
|
9
|
+
emptyMessage = "No items to display.",
|
|
10
|
+
className
|
|
11
|
+
}) {
|
|
12
|
+
const rootClass = className ? `nexus-stat-list ${className}` : "nexus-stat-list";
|
|
13
|
+
return /* @__PURE__ */ jsxs("section", { className: rootClass, "aria-labelledby": "nexus-stat-list-title", children: [
|
|
14
|
+
/* @__PURE__ */ jsx("h2", { id: "nexus-stat-list-title", className: "nexus-stat-list__title", children: title }),
|
|
15
|
+
items.length === 0 ? /* @__PURE__ */ jsx("p", { className: "nexus-stat-list__empty", children: emptyMessage }) : /* @__PURE__ */ jsx("ul", { className: "nexus-stat-list__list", children: items.map((item) => /* @__PURE__ */ jsxs("li", { className: "nexus-stat-list__item", children: [
|
|
16
|
+
/* @__PURE__ */ jsxs("div", { className: "nexus-stat-list__label-group", children: [
|
|
17
|
+
/* @__PURE__ */ jsx("span", { className: "nexus-stat-list__label", children: item.label }),
|
|
18
|
+
item.description ? /* @__PURE__ */ jsx("span", { className: "nexus-stat-list__description", children: item.description }) : null
|
|
19
|
+
] }),
|
|
20
|
+
item.value !== void 0 && item.value !== null ? /* @__PURE__ */ jsx("span", { className: "nexus-stat-list__value", children: item.value }) : null
|
|
21
|
+
] }, item.id)) })
|
|
22
|
+
] });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
NexusStatList
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-7GVFDWOS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/server.ts","../src/server/nexus-stat-list.tsx"],"sourcesContent":["import \"server-only\";\r\nimport \"./server/nexus-stat-list.css\";\r\n\r\n/**\r\n * Barrel entry for server-only modules (RSC, server actions, etc.).\r\n * Add exports here as you create modules under ./server/\r\n */\r\nexport * from \"./server/index\";\r\n","import type { NexusStatListProps } from \"../interfaces/nexus-list\";\r\nimport \"./nexus-stat-list.css\";\r\n\r\n/**\r\n * Server component — renders a read-only list of labeled items with optional values.\r\n */\r\nexport function NexusStatList({\r\n title,\r\n items,\r\n emptyMessage = \"No items to display.\",\r\n className,\r\n}: NexusStatListProps) {\r\n const rootClass = className\r\n ? `nexus-stat-list ${className}`\r\n : \"nexus-stat-list\";\r\n\r\n return (\r\n <section className={rootClass} aria-labelledby=\"nexus-stat-list-title\">\r\n <h2 id=\"nexus-stat-list-title\" className=\"nexus-stat-list__title\">\r\n {title}\r\n </h2>\r\n\r\n {items.length === 0 ? (\r\n <p className=\"nexus-stat-list__empty\">{emptyMessage}</p>\r\n ) : (\r\n <ul className=\"nexus-stat-list__list\">\r\n {items.map((item) => (\r\n <li key={item.id} className=\"nexus-stat-list__item\">\r\n <div className=\"nexus-stat-list__label-group\">\r\n <span className=\"nexus-stat-list__label\">{item.label}</span>\r\n {item.description ? (\r\n <span className=\"nexus-stat-list__description\">\r\n {item.description}\r\n </span>\r\n ) : null}\r\n </div>\r\n {item.value !== undefined && item.value !== null ? (\r\n <span className=\"nexus-stat-list__value\">{item.value}</span>\r\n ) : null}\r\n </li>\r\n ))}\r\n </ul>\r\n )}\r\n </section>\r\n );\r\n}\r\n"],"mappings":";AAAA,OAAO;;;ACkBD,cAUQ,YAVR;AAZC,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AACF,GAAuB;AACrB,QAAM,YAAY,YACd,mBAAmB,SAAS,KAC5B;AAEJ,SACE,qBAAC,aAAQ,WAAW,WAAW,mBAAgB,yBAC7C;AAAA,wBAAC,QAAG,IAAG,yBAAwB,WAAU,0BACtC,iBACH;AAAA,IAEC,MAAM,WAAW,IAChB,oBAAC,OAAE,WAAU,0BAA0B,wBAAa,IAEpD,oBAAC,QAAG,WAAU,yBACX,gBAAM,IAAI,CAAC,SACV,qBAAC,QAAiB,WAAU,yBAC1B;AAAA,2BAAC,SAAI,WAAU,gCACb;AAAA,4BAAC,UAAK,WAAU,0BAA0B,eAAK,OAAM;AAAA,QACpD,KAAK,cACJ,oBAAC,UAAK,WAAU,gCACb,eAAK,aACR,IACE;AAAA,SACN;AAAA,MACC,KAAK,UAAU,UAAa,KAAK,UAAU,OAC1C,oBAAC,UAAK,WAAU,0BAA0B,eAAK,OAAM,IACnD;AAAA,SAXG,KAAK,EAYd,CACD,GACH;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// src/client/nexus-selectable-list.tsx
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
function NexusSelectableList({
|
|
5
|
+
title,
|
|
6
|
+
items,
|
|
7
|
+
placeholder = "Filter items\u2026",
|
|
8
|
+
emptyMessage = "No matching items.",
|
|
9
|
+
className
|
|
10
|
+
}) {
|
|
11
|
+
const [query, setQuery] = useState("");
|
|
12
|
+
const [selectedId, setSelectedId] = useState(
|
|
13
|
+
items[0]?.id ?? null
|
|
14
|
+
);
|
|
15
|
+
const filtered = useMemo(() => {
|
|
16
|
+
const q = query.trim().toLowerCase();
|
|
17
|
+
if (!q) return items;
|
|
18
|
+
return items.filter(
|
|
19
|
+
(item) => item.label.toLowerCase().includes(q) || item.description?.toLowerCase().includes(q)
|
|
20
|
+
);
|
|
21
|
+
}, [items, query]);
|
|
22
|
+
const selected = items.find((item) => item.id === selectedId) ?? null;
|
|
23
|
+
const rootClass = className ? `nexus-selectable-list ${className}` : "nexus-selectable-list";
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
25
|
+
"section",
|
|
26
|
+
{
|
|
27
|
+
className: rootClass,
|
|
28
|
+
"aria-labelledby": "nexus-selectable-list-title",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { className: "nexus-selectable-list__header", children: [
|
|
31
|
+
/* @__PURE__ */ jsx("h2", { id: "nexus-selectable-list-title", className: "nexus-selectable-list__title", children: title }),
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
"input",
|
|
34
|
+
{
|
|
35
|
+
type: "search",
|
|
36
|
+
className: "nexus-selectable-list__search",
|
|
37
|
+
placeholder,
|
|
38
|
+
value: query,
|
|
39
|
+
onChange: (e) => setQuery(e.target.value),
|
|
40
|
+
"aria-label": `Filter ${title}`
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsxs("p", { className: "nexus-selectable-list__meta", children: [
|
|
44
|
+
"Showing ",
|
|
45
|
+
filtered.length,
|
|
46
|
+
" of ",
|
|
47
|
+
items.length
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx("p", { className: "nexus-selectable-list__empty", children: emptyMessage }) : /* @__PURE__ */ jsx(
|
|
51
|
+
"ul",
|
|
52
|
+
{
|
|
53
|
+
className: "nexus-selectable-list__list",
|
|
54
|
+
role: "listbox",
|
|
55
|
+
"aria-label": title,
|
|
56
|
+
children: filtered.map((item) => {
|
|
57
|
+
const isSelected = item.id === selectedId;
|
|
58
|
+
const itemClass = isSelected ? "nexus-selectable-list__item nexus-selectable-list__item--selected" : "nexus-selectable-list__item";
|
|
59
|
+
return /* @__PURE__ */ jsx("li", { role: "presentation", children: /* @__PURE__ */ jsxs(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
role: "option",
|
|
64
|
+
"aria-selected": isSelected,
|
|
65
|
+
className: itemClass,
|
|
66
|
+
onClick: () => setSelectedId(item.id),
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsx("span", { className: "nexus-selectable-list__label", children: item.label }),
|
|
69
|
+
item.description ? /* @__PURE__ */ jsx("span", { className: "nexus-selectable-list__description", children: item.description }) : null
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
) }, item.id);
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
selected ? /* @__PURE__ */ jsxs("div", { className: "nexus-selectable-list__detail", children: [
|
|
77
|
+
/* @__PURE__ */ jsx("strong", { children: selected.label }),
|
|
78
|
+
selected.description ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
+
" \u2014 ",
|
|
80
|
+
selected.description
|
|
81
|
+
] }) : null,
|
|
82
|
+
selected.value !== void 0 && selected.value !== null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
83
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
84
|
+
"Value: ",
|
|
85
|
+
/* @__PURE__ */ jsx("strong", { children: selected.value })
|
|
86
|
+
] }) : null
|
|
87
|
+
] }) : null
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
NexusSelectableList
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=chunk-EW6K4PYI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/client/nexus-selectable-list.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport { useMemo, useState } from \"react\";\r\nimport type { NexusSelectableListProps } from \"../interfaces/nexus-list\";\r\nimport \"./nexus-selectable-list.css\";\r\n\r\n/**\r\n * Client component — filterable list with selection and detail preview.\r\n */\r\nexport function NexusSelectableList({\r\n title,\r\n items,\r\n placeholder = \"Filter items…\",\r\n emptyMessage = \"No matching items.\",\r\n className,\r\n}: NexusSelectableListProps) {\r\n const [query, setQuery] = useState(\"\");\r\n const [selectedId, setSelectedId] = useState<string | null>(\r\n items[0]?.id ?? null,\r\n );\r\n\r\n const filtered = useMemo(() => {\r\n const q = query.trim().toLowerCase();\r\n if (!q) return items;\r\n return items.filter(\r\n (item) =>\r\n item.label.toLowerCase().includes(q) ||\r\n item.description?.toLowerCase().includes(q),\r\n );\r\n }, [items, query]);\r\n\r\n const selected = items.find((item) => item.id === selectedId) ?? null;\r\n const rootClass = className\r\n ? `nexus-selectable-list ${className}`\r\n : \"nexus-selectable-list\";\r\n\r\n return (\r\n <section\r\n className={rootClass}\r\n aria-labelledby=\"nexus-selectable-list-title\"\r\n >\r\n <div className=\"nexus-selectable-list__header\">\r\n <h2 id=\"nexus-selectable-list-title\" className=\"nexus-selectable-list__title\">\r\n {title}\r\n </h2>\r\n <input\r\n type=\"search\"\r\n className=\"nexus-selectable-list__search\"\r\n placeholder={placeholder}\r\n value={query}\r\n onChange={(e) => setQuery(e.target.value)}\r\n aria-label={`Filter ${title}`}\r\n />\r\n <p className=\"nexus-selectable-list__meta\">\r\n Showing {filtered.length} of {items.length}\r\n </p>\r\n </div>\r\n\r\n {filtered.length === 0 ? (\r\n <p className=\"nexus-selectable-list__empty\">{emptyMessage}</p>\r\n ) : (\r\n <ul\r\n className=\"nexus-selectable-list__list\"\r\n role=\"listbox\"\r\n aria-label={title}\r\n >\r\n {filtered.map((item) => {\r\n const isSelected = item.id === selectedId;\r\n const itemClass = isSelected\r\n ? \"nexus-selectable-list__item nexus-selectable-list__item--selected\"\r\n : \"nexus-selectable-list__item\";\r\n\r\n return (\r\n <li key={item.id} role=\"presentation\">\r\n <button\r\n type=\"button\"\r\n role=\"option\"\r\n aria-selected={isSelected}\r\n className={itemClass}\r\n onClick={() => setSelectedId(item.id)}\r\n >\r\n <span className=\"nexus-selectable-list__label\">\r\n {item.label}\r\n </span>\r\n {item.description ? (\r\n <span className=\"nexus-selectable-list__description\">\r\n {item.description}\r\n </span>\r\n ) : null}\r\n </button>\r\n </li>\r\n );\r\n })}\r\n </ul>\r\n )}\r\n\r\n {selected ? (\r\n <div className=\"nexus-selectable-list__detail\">\r\n <strong>{selected.label}</strong>\r\n {selected.description ? <> — {selected.description}</> : null}\r\n {selected.value !== undefined && selected.value !== null ? (\r\n <>\r\n <br />\r\n Value: <strong>{selected.value}</strong>\r\n </>\r\n ) : null}\r\n </div>\r\n ) : null}\r\n </section>\r\n );\r\n}\r\n"],"mappings":";AAEA,SAAS,SAAS,gBAAgB;AAwC1B,SAyD0B,UAzD1B,KAWA,YAXA;AAjCD,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,eAAe;AAAA,EACf;AACF,GAA6B;AAC3B,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,EAAE;AACrC,QAAM,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC,MAAM,CAAC,GAAG,MAAM;AAAA,EAClB;AAEA,QAAM,WAAW,QAAQ,MAAM;AAC7B,UAAM,IAAI,MAAM,KAAK,EAAE,YAAY;AACnC,QAAI,CAAC,EAAG,QAAO;AACf,WAAO,MAAM;AAAA,MACX,CAAC,SACC,KAAK,MAAM,YAAY,EAAE,SAAS,CAAC,KACnC,KAAK,aAAa,YAAY,EAAE,SAAS,CAAC;AAAA,IAC9C;AAAA,EACF,GAAG,CAAC,OAAO,KAAK,CAAC;AAEjB,QAAM,WAAW,MAAM,KAAK,CAAC,SAAS,KAAK,OAAO,UAAU,KAAK;AACjE,QAAM,YAAY,YACd,yBAAyB,SAAS,KAClC;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,MACX,mBAAgB;AAAA,MAEhB;AAAA,6BAAC,SAAI,WAAU,iCACb;AAAA,8BAAC,QAAG,IAAG,+BAA8B,WAAU,gCAC5C,iBACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,WAAU;AAAA,cACV;AAAA,cACA,OAAO;AAAA,cACP,UAAU,CAAC,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,cACxC,cAAY,UAAU,KAAK;AAAA;AAAA,UAC7B;AAAA,UACA,qBAAC,OAAE,WAAU,+BAA8B;AAAA;AAAA,YAChC,SAAS;AAAA,YAAO;AAAA,YAAK,MAAM;AAAA,aACtC;AAAA,WACF;AAAA,QAEC,SAAS,WAAW,IACnB,oBAAC,OAAE,WAAU,gCAAgC,wBAAa,IAE1D;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,cAAY;AAAA,YAEX,mBAAS,IAAI,CAAC,SAAS;AACtB,oBAAM,aAAa,KAAK,OAAO;AAC/B,oBAAM,YAAY,aACd,sEACA;AAEJ,qBACE,oBAAC,QAAiB,MAAK,gBACrB;AAAA,gBAAC;AAAA;AAAA,kBACC,MAAK;AAAA,kBACL,MAAK;AAAA,kBACL,iBAAe;AAAA,kBACf,WAAW;AAAA,kBACX,SAAS,MAAM,cAAc,KAAK,EAAE;AAAA,kBAEpC;AAAA,wCAAC,UAAK,WAAU,gCACb,eAAK,OACR;AAAA,oBACC,KAAK,cACJ,oBAAC,UAAK,WAAU,sCACb,eAAK,aACR,IACE;AAAA;AAAA;AAAA,cACN,KAhBO,KAAK,EAiBd;AAAA,YAEJ,CAAC;AAAA;AAAA,QACH;AAAA,QAGD,WACC,qBAAC,SAAI,WAAU,iCACb;AAAA,8BAAC,YAAQ,mBAAS,OAAM;AAAA,UACvB,SAAS,cAAc,iCAAE;AAAA;AAAA,YAAI,SAAS;AAAA,aAAY,IAAM;AAAA,UACxD,SAAS,UAAU,UAAa,SAAS,UAAU,OAClD,iCACE;AAAA,gCAAC,QAAG;AAAA,YAAE;AAAA,YACC,oBAAC,YAAQ,mBAAS,OAAM;AAAA,aACjC,IACE;AAAA,WACN,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-UMV7E2RN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/client.css
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* src/client/nexus-selectable-list.css */
|
|
2
|
+
.nexus-selectable-list {
|
|
3
|
+
--nexus-select-bg: #12101a;
|
|
4
|
+
--nexus-select-surface: #1e1b28;
|
|
5
|
+
--nexus-select-border: #3d3654;
|
|
6
|
+
--nexus-select-accent: #a855f7;
|
|
7
|
+
--nexus-select-accent-dim: rgba(168, 85, 247, 0.15);
|
|
8
|
+
--nexus-select-text: #f4f0fa;
|
|
9
|
+
--nexus-select-muted: #9d94b0;
|
|
10
|
+
font-family:
|
|
11
|
+
system-ui,
|
|
12
|
+
-apple-system,
|
|
13
|
+
"Segoe UI",
|
|
14
|
+
sans-serif;
|
|
15
|
+
background: var(--nexus-select-bg);
|
|
16
|
+
border: 1px solid var(--nexus-select-border);
|
|
17
|
+
border-radius: 12px;
|
|
18
|
+
padding: 1.25rem 1.5rem;
|
|
19
|
+
color: var(--nexus-select-text);
|
|
20
|
+
max-width: 32rem;
|
|
21
|
+
}
|
|
22
|
+
.nexus-selectable-list__header {
|
|
23
|
+
margin-bottom: 1rem;
|
|
24
|
+
}
|
|
25
|
+
.nexus-selectable-list__title {
|
|
26
|
+
margin: 0 0 0.75rem;
|
|
27
|
+
font-size: 1.125rem;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
letter-spacing: -0.02em;
|
|
30
|
+
}
|
|
31
|
+
.nexus-selectable-list__search {
|
|
32
|
+
width: 100%;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
padding: 0.625rem 0.875rem;
|
|
35
|
+
font-size: 0.875rem;
|
|
36
|
+
color: var(--nexus-select-text);
|
|
37
|
+
background: var(--nexus-select-surface);
|
|
38
|
+
border: 1px solid var(--nexus-select-border);
|
|
39
|
+
border-radius: 8px;
|
|
40
|
+
outline: none;
|
|
41
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
42
|
+
}
|
|
43
|
+
.nexus-selectable-list__search::placeholder {
|
|
44
|
+
color: var(--nexus-select-muted);
|
|
45
|
+
}
|
|
46
|
+
.nexus-selectable-list__search:focus {
|
|
47
|
+
border-color: var(--nexus-select-accent);
|
|
48
|
+
box-shadow: 0 0 0 3px var(--nexus-select-accent-dim);
|
|
49
|
+
}
|
|
50
|
+
.nexus-selectable-list__meta {
|
|
51
|
+
margin: 0.5rem 0 0;
|
|
52
|
+
font-size: 0.75rem;
|
|
53
|
+
color: var(--nexus-select-muted);
|
|
54
|
+
}
|
|
55
|
+
.nexus-selectable-list__list {
|
|
56
|
+
list-style: none;
|
|
57
|
+
margin: 0;
|
|
58
|
+
padding: 0;
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
gap: 0.375rem;
|
|
62
|
+
max-height: 16rem;
|
|
63
|
+
overflow-y: auto;
|
|
64
|
+
}
|
|
65
|
+
.nexus-selectable-list__item {
|
|
66
|
+
display: block;
|
|
67
|
+
width: 100%;
|
|
68
|
+
text-align: left;
|
|
69
|
+
padding: 0.75rem 1rem;
|
|
70
|
+
font: inherit;
|
|
71
|
+
color: inherit;
|
|
72
|
+
background: var(--nexus-select-surface);
|
|
73
|
+
border: 1px solid transparent;
|
|
74
|
+
border-radius: 8px;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
77
|
+
}
|
|
78
|
+
.nexus-selectable-list__item:hover {
|
|
79
|
+
border-color: var(--nexus-select-border);
|
|
80
|
+
}
|
|
81
|
+
.nexus-selectable-list__item--selected {
|
|
82
|
+
background: var(--nexus-select-accent-dim);
|
|
83
|
+
border-color: var(--nexus-select-accent);
|
|
84
|
+
}
|
|
85
|
+
.nexus-selectable-list__label {
|
|
86
|
+
display: block;
|
|
87
|
+
font-size: 0.9375rem;
|
|
88
|
+
font-weight: 500;
|
|
89
|
+
}
|
|
90
|
+
.nexus-selectable-list__description {
|
|
91
|
+
display: block;
|
|
92
|
+
margin-top: 0.2rem;
|
|
93
|
+
font-size: 0.8125rem;
|
|
94
|
+
color: var(--nexus-select-muted);
|
|
95
|
+
line-height: 1.35;
|
|
96
|
+
}
|
|
97
|
+
.nexus-selectable-list__empty {
|
|
98
|
+
margin: 0;
|
|
99
|
+
padding: 1.25rem;
|
|
100
|
+
text-align: center;
|
|
101
|
+
font-size: 0.875rem;
|
|
102
|
+
color: var(--nexus-select-muted);
|
|
103
|
+
background: var(--nexus-select-surface);
|
|
104
|
+
border-radius: 8px;
|
|
105
|
+
}
|
|
106
|
+
.nexus-selectable-list__detail {
|
|
107
|
+
margin-top: 1rem;
|
|
108
|
+
padding: 0.875rem 1rem;
|
|
109
|
+
background: var(--nexus-select-surface);
|
|
110
|
+
border-left: 3px solid var(--nexus-select-accent);
|
|
111
|
+
border-radius: 0 8px 8px 0;
|
|
112
|
+
font-size: 0.8125rem;
|
|
113
|
+
line-height: 1.5;
|
|
114
|
+
}
|
|
115
|
+
.nexus-selectable-list__detail strong {
|
|
116
|
+
color: var(--nexus-select-accent);
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
}
|
|
119
|
+
/*# sourceMappingURL=client.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/client/nexus-selectable-list.css"],"sourcesContent":[".nexus-selectable-list {\r\n --nexus-select-bg: #12101a;\r\n --nexus-select-surface: #1e1b28;\r\n --nexus-select-border: #3d3654;\r\n --nexus-select-accent: #a855f7;\r\n --nexus-select-accent-dim: rgba(168, 85, 247, 0.15);\r\n --nexus-select-text: #f4f0fa;\r\n --nexus-select-muted: #9d94b0;\r\n\r\n font-family: system-ui, -apple-system, \"Segoe UI\", sans-serif;\r\n background: var(--nexus-select-bg);\r\n border: 1px solid var(--nexus-select-border);\r\n border-radius: 12px;\r\n padding: 1.25rem 1.5rem;\r\n color: var(--nexus-select-text);\r\n max-width: 32rem;\r\n}\r\n\r\n.nexus-selectable-list__header {\r\n margin-bottom: 1rem;\r\n}\r\n\r\n.nexus-selectable-list__title {\r\n margin: 0 0 0.75rem;\r\n font-size: 1.125rem;\r\n font-weight: 600;\r\n letter-spacing: -0.02em;\r\n}\r\n\r\n.nexus-selectable-list__search {\r\n width: 100%;\r\n box-sizing: border-box;\r\n padding: 0.625rem 0.875rem;\r\n font-size: 0.875rem;\r\n color: var(--nexus-select-text);\r\n background: var(--nexus-select-surface);\r\n border: 1px solid var(--nexus-select-border);\r\n border-radius: 8px;\r\n outline: none;\r\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\r\n}\r\n\r\n.nexus-selectable-list__search::placeholder {\r\n color: var(--nexus-select-muted);\r\n}\r\n\r\n.nexus-selectable-list__search:focus {\r\n border-color: var(--nexus-select-accent);\r\n box-shadow: 0 0 0 3px var(--nexus-select-accent-dim);\r\n}\r\n\r\n.nexus-selectable-list__meta {\r\n margin: 0.5rem 0 0;\r\n font-size: 0.75rem;\r\n color: var(--nexus-select-muted);\r\n}\r\n\r\n.nexus-selectable-list__list {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.375rem;\r\n max-height: 16rem;\r\n overflow-y: auto;\r\n}\r\n\r\n.nexus-selectable-list__item {\r\n display: block;\r\n width: 100%;\r\n text-align: left;\r\n padding: 0.75rem 1rem;\r\n font: inherit;\r\n color: inherit;\r\n background: var(--nexus-select-surface);\r\n border: 1px solid transparent;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n transition:\r\n background 0.15s ease,\r\n border-color 0.15s ease;\r\n}\r\n\r\n.nexus-selectable-list__item:hover {\r\n border-color: var(--nexus-select-border);\r\n}\r\n\r\n.nexus-selectable-list__item--selected {\r\n background: var(--nexus-select-accent-dim);\r\n border-color: var(--nexus-select-accent);\r\n}\r\n\r\n.nexus-selectable-list__label {\r\n display: block;\r\n font-size: 0.9375rem;\r\n font-weight: 500;\r\n}\r\n\r\n.nexus-selectable-list__description {\r\n display: block;\r\n margin-top: 0.2rem;\r\n font-size: 0.8125rem;\r\n color: var(--nexus-select-muted);\r\n line-height: 1.35;\r\n}\r\n\r\n.nexus-selectable-list__empty {\r\n margin: 0;\r\n padding: 1.25rem;\r\n text-align: center;\r\n font-size: 0.875rem;\r\n color: var(--nexus-select-muted);\r\n background: var(--nexus-select-surface);\r\n border-radius: 8px;\r\n}\r\n\r\n.nexus-selectable-list__detail {\r\n margin-top: 1rem;\r\n padding: 0.875rem 1rem;\r\n background: var(--nexus-select-surface);\r\n border-left: 3px solid var(--nexus-select-accent);\r\n border-radius: 0 8px 8px 0;\r\n font-size: 0.8125rem;\r\n line-height: 1.5;\r\n}\r\n\r\n.nexus-selectable-list__detail strong {\r\n color: var(--nexus-select-accent);\r\n font-weight: 600;\r\n}\r\n"],"mappings":";AAAA,CAAC;AACC,qBAAmB;AACnB,0BAAwB;AACxB,yBAAuB;AACvB,yBAAuB;AACvB,6BAA2B,KAAK,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE;AAC9C,uBAAqB;AACrB,wBAAsB;AAEtB;AAAA,IAAa,SAAS;AAAA,IAAE,aAAa;AAAA,IAAE,UAAU;AAAA,IAAE;AACnD,cAAY,IAAI;AAChB,UAAQ,IAAI,MAAM,IAAI;AACtB,iBAAe;AACf,WAAS,QAAQ;AACjB,SAAO,IAAI;AACX,aAAW;AACb;AAEA,CAAC;AACC,iBAAe;AACjB;AAEA,CAAC;AACC,UAAQ,EAAE,EAAE;AACZ,aAAW;AACX,eAAa;AACb,kBAAgB;AAClB;AAEA,CAAC;AACC,SAAO;AACP,cAAY;AACZ,WAAS,SAAS;AAClB,aAAW;AACX,SAAO,IAAI;AACX,cAAY,IAAI;AAChB,UAAQ,IAAI,MAAM,IAAI;AACtB,iBAAe;AACf,WAAS;AACT,cAAY,aAAa,MAAM,IAAI,EAAE,WAAW,MAAM;AACxD;AAEA,CAbC,6BAa6B;AAC5B,SAAO,IAAI;AACb;AAEA,CAjBC,6BAiB6B;AAC5B,gBAAc,IAAI;AAClB,cAAY,EAAE,EAAE,EAAE,IAAI,IAAI;AAC5B;AAEA,CAAC;AACC,UAAQ,OAAO,EAAE;AACjB,aAAW;AACX,SAAO,IAAI;AACb;AAEA,CAAC;AACC,cAAY;AACZ,UAAQ;AACR,WAAS;AACT,WAAS;AACT,kBAAgB;AAChB,OAAK;AACL,cAAY;AACZ,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACT,SAAO;AACP,cAAY;AACZ,WAAS,QAAQ;AACjB,QAAM;AACN,SAAO;AACP,cAAY,IAAI;AAChB,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,UAAQ;AACR,cACE,WAAW,MAAM,IAAI,EACrB,aAAa,MAAM;AACvB;AAEA,CAhBC,2BAgB2B;AAC1B,gBAAc,IAAI;AACpB;AAEA,CAAC;AACC,cAAY,IAAI;AAChB,gBAAc,IAAI;AACpB;AAEA,CAAC;AACC,WAAS;AACT,aAAW;AACX,eAAa;AACf;AAEA,CAAC;AACC,WAAS;AACT,cAAY;AACZ,aAAW;AACX,SAAO,IAAI;AACX,eAAa;AACf;AAEA,CAAC;AACC,UAAQ;AACR,WAAS;AACT,cAAY;AACZ,aAAW;AACX,SAAO,IAAI;AACX,cAAY,IAAI;AAChB,iBAAe;AACjB;AAEA,CAAC;AACC,cAAY;AACZ,WAAS,SAAS;AAClB,cAAY,IAAI;AAChB,eAAa,IAAI,MAAM,IAAI;AAC3B,iBAAe,EAAE,IAAI,IAAI;AACzB,aAAW;AACX,eAAa;AACf;AAEA,CAVC,8BAU8B;AAC7B,SAAO,IAAI;AACX,eAAa;AACf;","names":[]}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { a as NexusSelectableListProps } from './nexus-list-DV45tcM0.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Client component — filterable list with selection and detail preview.
|
|
6
|
+
*/
|
|
7
|
+
declare function NexusSelectableList({ title, items, placeholder, emptyMessage, className, }: NexusSelectableListProps): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { NexusSelectableList };
|
package/dist/client.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|