@path58/ui 2.0.0-rc.1

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.
Files changed (98) hide show
  1. package/LICENSE +21 -0
  2. package/dist/atoms/Badge/Badge.d.ts +17 -0
  3. package/dist/atoms/Badge/Badge.d.ts.map +1 -0
  4. package/dist/atoms/Badge/index.d.ts +3 -0
  5. package/dist/atoms/Badge/index.d.ts.map +1 -0
  6. package/dist/atoms/Button/Button.d.ts +18 -0
  7. package/dist/atoms/Button/Button.d.ts.map +1 -0
  8. package/dist/atoms/Button/index.d.ts +3 -0
  9. package/dist/atoms/Button/index.d.ts.map +1 -0
  10. package/dist/atoms/Container/Container.d.ts +15 -0
  11. package/dist/atoms/Container/Container.d.ts.map +1 -0
  12. package/dist/atoms/Container/index.d.ts +3 -0
  13. package/dist/atoms/Container/index.d.ts.map +1 -0
  14. package/dist/atoms/Icon/Icon.d.ts +17 -0
  15. package/dist/atoms/Icon/Icon.d.ts.map +1 -0
  16. package/dist/atoms/Icon/index.d.ts +3 -0
  17. package/dist/atoms/Icon/index.d.ts.map +1 -0
  18. package/dist/atoms/IconContainer/IconContainer.d.ts +17 -0
  19. package/dist/atoms/IconContainer/IconContainer.d.ts.map +1 -0
  20. package/dist/atoms/IconContainer/index.d.ts +3 -0
  21. package/dist/atoms/IconContainer/index.d.ts.map +1 -0
  22. package/dist/atoms/Input/Input.d.ts +15 -0
  23. package/dist/atoms/Input/Input.d.ts.map +1 -0
  24. package/dist/atoms/Input/index.d.ts +3 -0
  25. package/dist/atoms/Input/index.d.ts.map +1 -0
  26. package/dist/atoms/Label/Label.d.ts +17 -0
  27. package/dist/atoms/Label/Label.d.ts.map +1 -0
  28. package/dist/atoms/Label/index.d.ts +3 -0
  29. package/dist/atoms/Label/index.d.ts.map +1 -0
  30. package/dist/atoms/List/List.d.ts +15 -0
  31. package/dist/atoms/List/List.d.ts.map +1 -0
  32. package/dist/atoms/List/index.d.ts +3 -0
  33. package/dist/atoms/List/index.d.ts.map +1 -0
  34. package/dist/atoms/ListItem/ListItem.d.ts +20 -0
  35. package/dist/atoms/ListItem/ListItem.d.ts.map +1 -0
  36. package/dist/atoms/ListItem/index.d.ts +3 -0
  37. package/dist/atoms/ListItem/index.d.ts.map +1 -0
  38. package/dist/atoms/index.d.ts +15 -0
  39. package/dist/atoms/index.d.ts.map +1 -0
  40. package/dist/index.d.ts +60 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +829 -0
  43. package/dist/molecules/CategoryHeader/CategoryHeader.d.ts +18 -0
  44. package/dist/molecules/CategoryHeader/CategoryHeader.d.ts.map +1 -0
  45. package/dist/molecules/CategoryHeader/index.d.ts +3 -0
  46. package/dist/molecules/CategoryHeader/index.d.ts.map +1 -0
  47. package/dist/molecules/FileItem/FileItem.d.ts +18 -0
  48. package/dist/molecules/FileItem/FileItem.d.ts.map +1 -0
  49. package/dist/molecules/FileItem/index.d.ts +3 -0
  50. package/dist/molecules/FileItem/index.d.ts.map +1 -0
  51. package/dist/molecules/InfoCard/InfoCard.d.ts +20 -0
  52. package/dist/molecules/InfoCard/InfoCard.d.ts.map +1 -0
  53. package/dist/molecules/InfoCard/index.d.ts +3 -0
  54. package/dist/molecules/InfoCard/index.d.ts.map +1 -0
  55. package/dist/molecules/SearchInput/SearchInput.d.ts +17 -0
  56. package/dist/molecules/SearchInput/SearchInput.d.ts.map +1 -0
  57. package/dist/molecules/SearchInput/index.d.ts +3 -0
  58. package/dist/molecules/SearchInput/index.d.ts.map +1 -0
  59. package/dist/molecules/TagBadge/TagBadge.d.ts +18 -0
  60. package/dist/molecules/TagBadge/TagBadge.d.ts.map +1 -0
  61. package/dist/molecules/TagBadge/index.d.ts +3 -0
  62. package/dist/molecules/TagBadge/index.d.ts.map +1 -0
  63. package/dist/molecules/index.d.ts +11 -0
  64. package/dist/molecules/index.d.ts.map +1 -0
  65. package/dist/organisms/ArtifactList/ArtifactList.d.ts +19 -0
  66. package/dist/organisms/ArtifactList/ArtifactList.d.ts.map +1 -0
  67. package/dist/organisms/ArtifactList/index.d.ts +3 -0
  68. package/dist/organisms/ArtifactList/index.d.ts.map +1 -0
  69. package/dist/organisms/CategoryGroup/CategoryGroup.d.ts +21 -0
  70. package/dist/organisms/CategoryGroup/CategoryGroup.d.ts.map +1 -0
  71. package/dist/organisms/CategoryGroup/index.d.ts +3 -0
  72. package/dist/organisms/CategoryGroup/index.d.ts.map +1 -0
  73. package/dist/organisms/SearchSection/SearchSection.d.ts +18 -0
  74. package/dist/organisms/SearchSection/SearchSection.d.ts.map +1 -0
  75. package/dist/organisms/SearchSection/index.d.ts +3 -0
  76. package/dist/organisms/SearchSection/index.d.ts.map +1 -0
  77. package/dist/organisms/TagFilterList/TagFilterList.d.ts +17 -0
  78. package/dist/organisms/TagFilterList/TagFilterList.d.ts.map +1 -0
  79. package/dist/organisms/TagFilterList/index.d.ts +3 -0
  80. package/dist/organisms/TagFilterList/index.d.ts.map +1 -0
  81. package/dist/organisms/index.d.ts +10 -0
  82. package/dist/organisms/index.d.ts.map +1 -0
  83. package/dist/primitives/P58Button.d.ts +23 -0
  84. package/dist/primitives/P58Button.d.ts.map +1 -0
  85. package/dist/primitives/P58Card.d.ts +18 -0
  86. package/dist/primitives/P58Card.d.ts.map +1 -0
  87. package/dist/primitives/P58Eyebrow.d.ts +15 -0
  88. package/dist/primitives/P58Eyebrow.d.ts.map +1 -0
  89. package/dist/primitives/P58Icon.d.ts +34 -0
  90. package/dist/primitives/P58Icon.d.ts.map +1 -0
  91. package/dist/primitives/P58Metric.d.ts +25 -0
  92. package/dist/primitives/P58Metric.d.ts.map +1 -0
  93. package/dist/primitives/index.d.ts +22 -0
  94. package/dist/primitives/index.d.ts.map +1 -0
  95. package/dist/styles.css +1 -0
  96. package/dist/types.d.ts +17 -0
  97. package/dist/types.d.ts.map +1 -0
  98. package/package.json +67 -0
package/dist/index.js ADDED
@@ -0,0 +1,829 @@
1
+ import { jsxs as h, jsx as o } from "react/jsx-runtime";
2
+ import { X as j, ChevronRight as M, Folder as A, Search as H, Tag as T } from "lucide-react";
3
+ import y, { useState as C, useEffect as x, useRef as _ } from "react";
4
+ const P = ({
5
+ variant: t = "primary",
6
+ size: e = "md",
7
+ icon: a,
8
+ iconPosition: r = "left",
9
+ children: n,
10
+ className: s = "",
11
+ ...c
12
+ }) => {
13
+ const l = "path58-button", i = `path58-button--${t}`, u = `path58-button--${e}`, m = a ? `path58-button--with-icon path58-button--icon-${r}` : "";
14
+ return /* @__PURE__ */ h(
15
+ "button",
16
+ {
17
+ className: `${l} ${i} ${u} ${m} ${s}`.trim(),
18
+ ...c,
19
+ children: [
20
+ a && r === "left" && /* @__PURE__ */ o("span", { className: "path58-button-icon", children: a }),
21
+ n && /* @__PURE__ */ o("span", { className: "path58-button-text", children: n }),
22
+ a && r === "right" && /* @__PURE__ */ o("span", { className: "path58-button-icon", children: a })
23
+ ]
24
+ }
25
+ );
26
+ }, D = ({
27
+ variant: t = "default",
28
+ error: e = !1,
29
+ className: a = "",
30
+ ...r
31
+ }) => {
32
+ const n = "path58-input", s = `path58-input--${t}`;
33
+ return /* @__PURE__ */ o(
34
+ "input",
35
+ {
36
+ className: `${n} ${s} ${e ? "path58-input--error" : ""} ${a}`.trim(),
37
+ ...r
38
+ }
39
+ );
40
+ }, F = ({
41
+ variant: t = "default",
42
+ active: e = !1,
43
+ categoryColor: a,
44
+ children: r,
45
+ className: n = "",
46
+ style: s,
47
+ ...c
48
+ }) => {
49
+ const l = "path58-badge", i = `path58-badge--${t}`, u = e ? "path58-badge--active" : "", m = t === "tag" && a ? {
50
+ borderColor: e ? a : `${a}80`,
51
+ color: e ? "var(--p58-bg)" : a,
52
+ backgroundColor: e ? a : "transparent",
53
+ ...s
54
+ } : s;
55
+ return /* @__PURE__ */ o(
56
+ "span",
57
+ {
58
+ className: `${l} ${i} ${u} ${n}`.trim(),
59
+ style: m,
60
+ ...c,
61
+ children: r
62
+ }
63
+ );
64
+ }, R = ({
65
+ children: t,
66
+ variant: e = "default",
67
+ size: a = 16,
68
+ className: r = ""
69
+ }) => {
70
+ const n = `path58-icon--${e}`, s = typeof a == "number" ? { width: a, height: a } : {};
71
+ return /* @__PURE__ */ o(
72
+ "span",
73
+ {
74
+ className: `path58-icon ${n} ${r}`.trim(),
75
+ style: s,
76
+ children: t
77
+ }
78
+ );
79
+ }, W = ({
80
+ children: t,
81
+ variant: e = "default",
82
+ size: a = "md",
83
+ className: r = ""
84
+ }) => {
85
+ const n = "path58-icon-container", s = `path58-icon-container--${e}`, c = `path58-icon-container--${a}`;
86
+ return /* @__PURE__ */ o(
87
+ "div",
88
+ {
89
+ className: `${n} ${s} ${c} ${r}`.trim(),
90
+ children: t
91
+ }
92
+ );
93
+ }, N = ({
94
+ variant: t = "default",
95
+ icon: e,
96
+ children: a,
97
+ as: r = "span",
98
+ className: n = "",
99
+ ...s
100
+ }) => {
101
+ const c = "path58-label", l = `path58-label--${t}`;
102
+ return /* @__PURE__ */ h(
103
+ r,
104
+ {
105
+ className: `${c} ${l} ${e ? "path58-label--with-icon" : ""} ${n}`.trim(),
106
+ ...s,
107
+ children: [
108
+ e && /* @__PURE__ */ o("span", { className: "path58-label-icon", children: e }),
109
+ /* @__PURE__ */ o("span", { className: "path58-label-text", children: a })
110
+ ]
111
+ }
112
+ );
113
+ }, S = ({
114
+ variant: t = "default",
115
+ children: e,
116
+ className: a = "",
117
+ ...r
118
+ }) => {
119
+ const n = "path58-container", s = `path58-container--${t}`;
120
+ return /* @__PURE__ */ o(
121
+ "div",
122
+ {
123
+ className: `${n} ${s} ${a}`.trim(),
124
+ ...r,
125
+ children: e
126
+ }
127
+ );
128
+ }, k = ({
129
+ variant: t = "vertical",
130
+ children: e,
131
+ className: a = "",
132
+ ...r
133
+ }) => {
134
+ const n = "path58-list path58-scrollbar", s = `path58-list--${t}`;
135
+ return /* @__PURE__ */ o(
136
+ "div",
137
+ {
138
+ className: `${n} ${s} ${a}`.trim(),
139
+ ...r,
140
+ children: e
141
+ }
142
+ );
143
+ }, U = ({
144
+ selected: t = !1,
145
+ children: e,
146
+ as: a = "button",
147
+ className: r = "",
148
+ ...n
149
+ }) => {
150
+ const s = "path58-list-item", c = t ? "path58-list-item--selected" : "", { onClick: l, disabled: i, ...u } = n, m = a === "button" ? { onClick: l, disabled: i, ...u } : { onClick: l, ...u };
151
+ return /* @__PURE__ */ o(
152
+ a,
153
+ {
154
+ className: `${s} ${c} ${r}`.trim(),
155
+ ...m,
156
+ children: e
157
+ }
158
+ );
159
+ }, B = ({
160
+ value: t,
161
+ onChange: e,
162
+ placeholder: a = "Search...",
163
+ showClear: r = !0,
164
+ className: n = "",
165
+ ...s
166
+ }) => /* @__PURE__ */ h("div", { className: `path58-search-input ${n}`.trim(), children: [
167
+ /* @__PURE__ */ o(
168
+ D,
169
+ {
170
+ type: "text",
171
+ variant: "search",
172
+ value: t,
173
+ onChange: (c) => e(c.target.value),
174
+ placeholder: a,
175
+ ...s
176
+ }
177
+ ),
178
+ r && t && /* @__PURE__ */ o(
179
+ P,
180
+ {
181
+ variant: "ghost",
182
+ size: "sm",
183
+ icon: /* @__PURE__ */ o(j, { size: 14 }),
184
+ onClick: () => e(""),
185
+ className: "path58-search-input-clear",
186
+ title: "Clear search"
187
+ }
188
+ )
189
+ ] }), q = ({
190
+ tag: t,
191
+ selected: e = !1,
192
+ categoryColor: a,
193
+ onClick: r,
194
+ className: n = ""
195
+ }) => {
196
+ const c = ((i) => {
197
+ const u = /* @__PURE__ */ new Set([
198
+ "cro",
199
+ "ceo",
200
+ "cfo",
201
+ "cto",
202
+ "vp",
203
+ "svp",
204
+ "evp",
205
+ "it",
206
+ "ui",
207
+ "ux",
208
+ "api",
209
+ "sdk",
210
+ "ecp",
211
+ "icp",
212
+ "jtbd",
213
+ "gtm",
214
+ "b2b",
215
+ "b2c",
216
+ "arr",
217
+ "mrr",
218
+ "ltv",
219
+ "cac",
220
+ "mql",
221
+ "sql",
222
+ "sdr",
223
+ "ae",
224
+ "swot",
225
+ "poc",
226
+ "mvp",
227
+ "kpi",
228
+ "okr",
229
+ "roi"
230
+ ]), m = /* @__PURE__ */ new Set(["saas", "paas", "iaas"]);
231
+ return i.split(/[\s-]+/).map((p) => {
232
+ const d = p.toLowerCase();
233
+ return m.has(d) ? d.charAt(0).toUpperCase() + d.slice(1) : u.has(d) ? d.toUpperCase() : p.charAt(0).toUpperCase() + p.slice(1).toLowerCase();
234
+ }).join(" ");
235
+ })(t);
236
+ return /* @__PURE__ */ o(
237
+ F,
238
+ {
239
+ variant: "tag",
240
+ active: e,
241
+ categoryColor: a || "var(--p58-accent-fg)",
242
+ onClick: r,
243
+ className: n,
244
+ children: c
245
+ }
246
+ );
247
+ }, ht = ({
248
+ icon: t,
249
+ iconVariant: e = "default",
250
+ label: a,
251
+ value: r,
252
+ onClick: n,
253
+ variant: s = "default",
254
+ className: c = ""
255
+ }) => {
256
+ const l = `path58-info-card--${s}`;
257
+ return /* @__PURE__ */ h(
258
+ S,
259
+ {
260
+ variant: "card",
261
+ className: `path58-info-card ${l} ${n ? "path58-info-card--clickable" : ""} ${c}`.trim(),
262
+ onClick: n,
263
+ style: { cursor: n ? "pointer" : "default" },
264
+ children: [
265
+ /* @__PURE__ */ o(W, { variant: e, size: "md", children: t }),
266
+ /* @__PURE__ */ h("div", { className: "path58-info-card-content", children: [
267
+ /* @__PURE__ */ o(N, { variant: "card", children: a }),
268
+ /* @__PURE__ */ o("div", { className: "path58-info-card-value", children: r })
269
+ ] })
270
+ ]
271
+ }
272
+ );
273
+ }, G = ({
274
+ name: t,
275
+ count: e,
276
+ expanded: a,
277
+ onClick: r,
278
+ className: n = ""
279
+ }) => /* @__PURE__ */ h(
280
+ "button",
281
+ {
282
+ className: `path58-category-header ${n}`.trim(),
283
+ onClick: r,
284
+ children: [
285
+ /* @__PURE__ */ o(
286
+ M,
287
+ {
288
+ size: 16,
289
+ className: a ? "path58-category-chevron path58-category-chevron--expanded" : "path58-category-chevron"
290
+ }
291
+ ),
292
+ /* @__PURE__ */ o(A, { size: 16 }),
293
+ /* @__PURE__ */ o("span", { className: "path58-category-name", children: t.toUpperCase() }),
294
+ /* @__PURE__ */ h("span", { className: "path58-category-count", children: [
295
+ "(",
296
+ e,
297
+ ")"
298
+ ] })
299
+ ]
300
+ }
301
+ );
302
+ var L = {
303
+ color: void 0,
304
+ size: void 0,
305
+ className: void 0,
306
+ style: void 0,
307
+ attr: void 0
308
+ }, z = y.createContext && /* @__PURE__ */ y.createContext(L), V = ["attr", "size", "title"];
309
+ function K(t, e) {
310
+ if (t == null) return {};
311
+ var a, r, n = X(t, e);
312
+ if (Object.getOwnPropertySymbols) {
313
+ var s = Object.getOwnPropertySymbols(t);
314
+ for (r = 0; r < s.length; r++) a = s[r], e.indexOf(a) === -1 && {}.propertyIsEnumerable.call(t, a) && (n[a] = t[a]);
315
+ }
316
+ return n;
317
+ }
318
+ function X(t, e) {
319
+ if (t == null) return {};
320
+ var a = {};
321
+ for (var r in t) if ({}.hasOwnProperty.call(t, r)) {
322
+ if (e.indexOf(r) !== -1) continue;
323
+ a[r] = t[r];
324
+ }
325
+ return a;
326
+ }
327
+ function w() {
328
+ return w = Object.assign ? Object.assign.bind() : function(t) {
329
+ for (var e = 1; e < arguments.length; e++) {
330
+ var a = arguments[e];
331
+ for (var r in a) ({}).hasOwnProperty.call(a, r) && (t[r] = a[r]);
332
+ }
333
+ return t;
334
+ }, w.apply(null, arguments);
335
+ }
336
+ function O(t, e) {
337
+ var a = Object.keys(t);
338
+ if (Object.getOwnPropertySymbols) {
339
+ var r = Object.getOwnPropertySymbols(t);
340
+ e && (r = r.filter(function(n) {
341
+ return Object.getOwnPropertyDescriptor(t, n).enumerable;
342
+ })), a.push.apply(a, r);
343
+ }
344
+ return a;
345
+ }
346
+ function $(t) {
347
+ for (var e = 1; e < arguments.length; e++) {
348
+ var a = arguments[e] != null ? arguments[e] : {};
349
+ e % 2 ? O(Object(a), !0).forEach(function(r) {
350
+ Y(t, r, a[r]);
351
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : O(Object(a)).forEach(function(r) {
352
+ Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(a, r));
353
+ });
354
+ }
355
+ return t;
356
+ }
357
+ function Y(t, e, a) {
358
+ return (e = Z(e)) in t ? Object.defineProperty(t, e, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = a, t;
359
+ }
360
+ function Z(t) {
361
+ var e = J(t, "string");
362
+ return typeof e == "symbol" ? e : e + "";
363
+ }
364
+ function J(t, e) {
365
+ if (typeof t != "object" || !t) return t;
366
+ var a = t[Symbol.toPrimitive];
367
+ if (a !== void 0) {
368
+ var r = a.call(t, e);
369
+ if (typeof r != "object") return r;
370
+ throw new TypeError("@@toPrimitive must return a primitive value.");
371
+ }
372
+ return (e === "string" ? String : Number)(t);
373
+ }
374
+ function E(t) {
375
+ return t && t.map((e, a) => /* @__PURE__ */ y.createElement(e.tag, $({
376
+ key: a
377
+ }, e.attr), E(e.child)));
378
+ }
379
+ function I(t) {
380
+ return (e) => /* @__PURE__ */ y.createElement(Q, w({
381
+ attr: $({}, t.attr)
382
+ }, e), E(t.child));
383
+ }
384
+ function Q(t) {
385
+ var e = (a) => {
386
+ var {
387
+ attr: r,
388
+ size: n,
389
+ title: s
390
+ } = t, c = K(t, V), l = n || a.size || "1em", i;
391
+ return a.className && (i = a.className), t.className && (i = (i ? i + " " : "") + t.className), /* @__PURE__ */ y.createElement("svg", w({
392
+ stroke: "currentColor",
393
+ fill: "currentColor",
394
+ strokeWidth: "0"
395
+ }, a.attr, r, c, {
396
+ className: i,
397
+ style: $($({
398
+ color: t.color || a.color
399
+ }, a.style), t.style),
400
+ height: l,
401
+ width: l,
402
+ xmlns: "http://www.w3.org/2000/svg"
403
+ }), s && /* @__PURE__ */ y.createElement("title", null, s), t.children);
404
+ };
405
+ return z !== void 0 ? /* @__PURE__ */ y.createElement(z.Consumer, null, (a) => e(a)) : e(L);
406
+ }
407
+ function tt(t) {
408
+ return I({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M0 32l34.9 395.8L191.5 480l157.6-52.2L384 32H0zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1l-4.4 47.7z" }, child: [] }] })(t);
409
+ }
410
+ function et(t) {
411
+ return I({ attr: { role: "img", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z" }, child: [] }] })(t);
412
+ }
413
+ const at = ({
414
+ name: t,
415
+ type: e,
416
+ selected: a = !1,
417
+ onClick: r,
418
+ className: n = ""
419
+ }) => {
420
+ const s = e === "html" ? "html" : "tsx", c = e === "html" ? tt : et;
421
+ return /* @__PURE__ */ h(
422
+ U,
423
+ {
424
+ selected: a,
425
+ onClick: r,
426
+ className: `path58-file-item ${n}`.trim(),
427
+ children: [
428
+ /* @__PURE__ */ o(R, { variant: s, children: /* @__PURE__ */ o(c, { size: 16 }) }),
429
+ /* @__PURE__ */ o("span", { className: "path58-file-name", children: t })
430
+ ]
431
+ }
432
+ );
433
+ }, mt = ({
434
+ value: t,
435
+ onChange: e,
436
+ placeholder: a = "Search artifacts...",
437
+ label: r = "Search",
438
+ className: n = ""
439
+ }) => /* @__PURE__ */ h(S, { variant: "section", className: `path58-search-section ${n}`.trim(), children: [
440
+ /* @__PURE__ */ o(N, { variant: "section", icon: /* @__PURE__ */ o(H, { size: 14 }), children: r }),
441
+ /* @__PURE__ */ o("div", { className: "path58-search-input-wrapper", children: /* @__PURE__ */ o(
442
+ B,
443
+ {
444
+ value: t,
445
+ onChange: e,
446
+ placeholder: a
447
+ }
448
+ ) })
449
+ ] }), ft = ({
450
+ allTags: t,
451
+ selectedTags: e,
452
+ onToggleTag: a,
453
+ className: r = ""
454
+ }) => {
455
+ const [n, s] = C(/* @__PURE__ */ new Map()), [c, l] = C(/* @__PURE__ */ new Map());
456
+ x(() => {
457
+ (async () => {
458
+ try {
459
+ const d = await fetch("/api/tags");
460
+ if (d.ok) {
461
+ const f = await d.json();
462
+ if (f.tags && f.categories) {
463
+ const g = /* @__PURE__ */ new Map();
464
+ f.tags.forEach((b) => {
465
+ typeof b == "object" && b.name && b.category && g.set(b.name, b.category);
466
+ });
467
+ const v = /* @__PURE__ */ new Map();
468
+ f.categories.forEach((b) => {
469
+ v.set(b.id, { name: b.name, color: b.color });
470
+ }), s(g), l(v);
471
+ }
472
+ }
473
+ } catch {
474
+ }
475
+ })();
476
+ }, []);
477
+ const i = (p) => {
478
+ if (n.has(p))
479
+ return n.get(p) || null;
480
+ for (const [d, f] of n.entries())
481
+ if (d.toLowerCase() === p.toLowerCase())
482
+ return f;
483
+ return null;
484
+ }, u = (p) => {
485
+ if (!p) return "var(--p58-accent-fg)";
486
+ const d = c.get(p);
487
+ return (d == null ? void 0 : d.color) || "var(--p58-accent-fg)";
488
+ }, m = (p) => {
489
+ const d = /* @__PURE__ */ new Set([
490
+ "cro",
491
+ "ceo",
492
+ "cfo",
493
+ "cto",
494
+ "vp",
495
+ "svp",
496
+ "evp",
497
+ "it",
498
+ "ui",
499
+ "ux",
500
+ "api",
501
+ "sdk",
502
+ "ecp",
503
+ "icp",
504
+ "jtbd",
505
+ "gtm",
506
+ "b2b",
507
+ "b2c",
508
+ "arr",
509
+ "mrr",
510
+ "ltv",
511
+ "cac",
512
+ "mql",
513
+ "sql",
514
+ "sdr",
515
+ "ae",
516
+ "swot",
517
+ "poc",
518
+ "mvp",
519
+ "kpi",
520
+ "okr",
521
+ "roi"
522
+ ]), f = /* @__PURE__ */ new Set(["saas", "paas", "iaas"]);
523
+ return p.split(/[\s-]+/).map((g) => {
524
+ const v = g.toLowerCase();
525
+ return f.has(v) ? v.charAt(0).toUpperCase() + v.slice(1) : d.has(v) ? v.toUpperCase() : g.charAt(0).toUpperCase() + g.slice(1).toLowerCase();
526
+ }).join(" ");
527
+ };
528
+ return t.length === 0 ? null : /* @__PURE__ */ h(S, { variant: "section", className: `path58-tag-filter path58-scrollbar ${r}`.trim(), children: [
529
+ /* @__PURE__ */ h("div", { className: "path58-tag-filter-header", children: [
530
+ /* @__PURE__ */ o(N, { variant: "section", icon: /* @__PURE__ */ o(T, { size: 14 }), children: "Filter by tags:" }),
531
+ e.size > 0 && /* @__PURE__ */ o(
532
+ P,
533
+ {
534
+ variant: "ghost",
535
+ size: "sm",
536
+ icon: /* @__PURE__ */ o(j, { size: 12 }),
537
+ onClick: () => {
538
+ e.forEach((p) => a(p));
539
+ },
540
+ className: "path58-tag-filter-clear",
541
+ children: "Clear"
542
+ }
543
+ )
544
+ ] }),
545
+ /* @__PURE__ */ o(k, { variant: "wrap", className: "path58-tag-filter-list", children: t.map((p) => {
546
+ const d = i(p), f = u(d), g = m(p), v = e.has(g);
547
+ return /* @__PURE__ */ o(
548
+ q,
549
+ {
550
+ tag: p,
551
+ selected: v,
552
+ categoryColor: f,
553
+ onClick: () => a(g)
554
+ },
555
+ p
556
+ );
557
+ }) }),
558
+ t.length > 8 && /* @__PURE__ */ o("div", { className: "path58-tag-filter-scroll-hint", children: /* @__PURE__ */ o("span", { children: "Scroll for more tags" }) })
559
+ ] });
560
+ }, rt = ({
561
+ category: t,
562
+ artifacts: e,
563
+ selectedFile: a,
564
+ onSelectFile: r,
565
+ expanded: n,
566
+ onToggle: s,
567
+ className: c = ""
568
+ }) => /* @__PURE__ */ h("div", { className: `path58-category-group ${c}`.trim(), "data-category": t, children: [
569
+ /* @__PURE__ */ o(
570
+ G,
571
+ {
572
+ name: t,
573
+ count: e.length,
574
+ expanded: n,
575
+ onClick: s
576
+ }
577
+ ),
578
+ n && /* @__PURE__ */ o("div", { className: "path58-category-file-list", children: e.map((l) => /* @__PURE__ */ o(
579
+ at,
580
+ {
581
+ name: l.displayName,
582
+ type: l.type,
583
+ selected: a === l.path,
584
+ onClick: () => r(l.path)
585
+ },
586
+ l.path
587
+ )) })
588
+ ] }), vt = ({
589
+ artifacts: t,
590
+ selectedFile: e,
591
+ onSelectFile: a,
592
+ categoryToExpand: r,
593
+ className: n = ""
594
+ }) => {
595
+ const [s, c] = C(/* @__PURE__ */ new Set());
596
+ x(() => {
597
+ if (r && !s.has(r)) {
598
+ const i = new Set(s);
599
+ i.add(r), c(i);
600
+ }
601
+ }, [r, s]);
602
+ const l = (i) => {
603
+ const u = new Set(s);
604
+ u.has(i) ? u.delete(i) : u.add(i), c(u);
605
+ };
606
+ return /* @__PURE__ */ o(k, { variant: "vertical", className: `path58-artifact-list ${n}`.trim(), children: Object.entries(t).map(([i, u]) => /* @__PURE__ */ o(
607
+ rt,
608
+ {
609
+ category: i,
610
+ artifacts: u,
611
+ selectedFile: e,
612
+ onSelectFile: a,
613
+ expanded: s.has(i),
614
+ onToggle: () => l(i)
615
+ },
616
+ i
617
+ )) });
618
+ }, nt = ({
619
+ name: t,
620
+ size: e = 16,
621
+ stroke: a = 1.75,
622
+ className: r = "",
623
+ style: n = {}
624
+ }) => {
625
+ const s = _(null);
626
+ return x(() => {
627
+ if (window.lucide && s.current) {
628
+ s.current.innerHTML = "";
629
+ const c = document.createElement("i");
630
+ c.setAttribute("data-lucide", t), s.current.appendChild(c), window.lucide.createIcons({
631
+ attrs: { width: e, height: e, "stroke-width": a }
632
+ });
633
+ }
634
+ }, [t, e, a]), /* @__PURE__ */ o(
635
+ "span",
636
+ {
637
+ ref: s,
638
+ className: r,
639
+ style: { display: "inline-flex", lineHeight: 0, ...n }
640
+ }
641
+ );
642
+ }, st = {
643
+ sm: { padding: "4px 10px", fontSize: 12 },
644
+ md: { padding: "8px 14px", fontSize: 13 },
645
+ lg: { padding: "10px 18px", fontSize: 14 }
646
+ }, ot = (t, e, a) => {
647
+ switch (t) {
648
+ case "primary":
649
+ return {
650
+ background: a ? "var(--p58-teal-press)" : e ? "var(--p58-teal-hover)" : "var(--p58-teal)",
651
+ color: "var(--p58-on-accent)",
652
+ border: "1px solid var(--p58-teal-press)"
653
+ };
654
+ case "secondary":
655
+ return {
656
+ background: e ? "var(--p58-surface-3)" : "var(--p58-surface)",
657
+ color: "var(--p58-fg-1)",
658
+ border: "1px solid var(--p58-border-strong)"
659
+ };
660
+ case "ghost":
661
+ return {
662
+ background: e ? "var(--p58-surface-3)" : "transparent",
663
+ color: e ? "var(--p58-fg-1)" : "var(--p58-fg-2)",
664
+ border: "1px solid transparent"
665
+ };
666
+ case "danger":
667
+ return {
668
+ background: e ? "color-mix(in srgb, var(--p58-danger) 10%, transparent)" : "transparent",
669
+ color: "var(--p58-danger)",
670
+ border: "1px solid color-mix(in srgb, var(--p58-danger) 30%, transparent)"
671
+ };
672
+ }
673
+ }, gt = ({
674
+ variant: t = "primary",
675
+ size: e = "md",
676
+ icon: a,
677
+ children: r,
678
+ onClick: n,
679
+ disabled: s = !1,
680
+ style: c = {}
681
+ }) => {
682
+ const [l, i] = C(!1), [u, m] = C(!1);
683
+ return /* @__PURE__ */ h(
684
+ "button",
685
+ {
686
+ onClick: s ? void 0 : n,
687
+ onMouseEnter: () => i(!0),
688
+ onMouseLeave: () => {
689
+ i(!1), m(!1);
690
+ },
691
+ onMouseDown: () => m(!0),
692
+ onMouseUp: () => m(!1),
693
+ style: {
694
+ fontFamily: "var(--p58-font-ui)",
695
+ fontWeight: 500,
696
+ borderRadius: "var(--p58-radius-md)",
697
+ cursor: s ? "not-allowed" : "pointer",
698
+ display: "inline-flex",
699
+ alignItems: "center",
700
+ gap: 8,
701
+ opacity: s ? 0.4 : 1,
702
+ boxShadow: "var(--p58-shadow-inset)",
703
+ transition: "background var(--p58-duration-fast)",
704
+ outline: "none",
705
+ ...st[e],
706
+ ...ot(t, l, u),
707
+ ...c
708
+ },
709
+ children: [
710
+ a && /* @__PURE__ */ o(nt, { name: a, size: 14 }),
711
+ r
712
+ ]
713
+ }
714
+ );
715
+ }, ct = "var(--p58-shadow-inset)", it = "0 2px 8px color-mix(in srgb, var(--p58-bg) 35%, transparent), var(--p58-shadow-inset)", bt = ({
716
+ children: t,
717
+ hover: e = !1,
718
+ onClick: a,
719
+ style: r = {}
720
+ }) => {
721
+ const [n, s] = C(!1);
722
+ return /* @__PURE__ */ o(
723
+ "div",
724
+ {
725
+ onClick: a,
726
+ onMouseEnter: () => s(!0),
727
+ onMouseLeave: () => s(!1),
728
+ style: {
729
+ background: "var(--p58-surface)",
730
+ border: "1px solid var(--p58-border)",
731
+ borderRadius: "var(--p58-radius-lg)",
732
+ boxShadow: e && n ? it : ct,
733
+ cursor: a ? "pointer" : "default",
734
+ transition: "box-shadow var(--p58-duration-base)",
735
+ ...r
736
+ },
737
+ children: t
738
+ }
739
+ );
740
+ }, lt = ({ children: t, style: e = {} }) => /* @__PURE__ */ o(
741
+ "span",
742
+ {
743
+ style: {
744
+ fontFamily: "var(--p58-font-mono)",
745
+ fontSize: "var(--p58-text-2xs)",
746
+ color: "var(--p58-fg-3)",
747
+ textTransform: "uppercase",
748
+ letterSpacing: "var(--p58-tracking-caps)",
749
+ ...e
750
+ },
751
+ children: t
752
+ }
753
+ ), yt = ({
754
+ label: t,
755
+ value: e,
756
+ unit: a,
757
+ delta: r,
758
+ deltaTone: n = "up"
759
+ }) => /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
760
+ /* @__PURE__ */ o(lt, { children: t }),
761
+ /* @__PURE__ */ h(
762
+ "div",
763
+ {
764
+ style: {
765
+ fontFamily: "var(--p58-font-mono)",
766
+ fontSize: "var(--p58-text-4xl)",
767
+ fontWeight: 500,
768
+ color: "var(--p58-fg-1)",
769
+ lineHeight: 1,
770
+ letterSpacing: "-0.01em",
771
+ fontVariantNumeric: "tabular-nums"
772
+ },
773
+ children: [
774
+ e,
775
+ a && /* @__PURE__ */ o(
776
+ "span",
777
+ {
778
+ style: {
779
+ fontSize: "var(--p58-text-lg)",
780
+ color: "var(--p58-fg-3)",
781
+ marginLeft: 2
782
+ },
783
+ children: a
784
+ }
785
+ )
786
+ ]
787
+ }
788
+ ),
789
+ r && /* @__PURE__ */ h(
790
+ "span",
791
+ {
792
+ style: {
793
+ fontFamily: "var(--p58-font-mono)",
794
+ fontSize: "var(--p58-text-xs)",
795
+ color: n === "up" ? "var(--p58-success)" : "var(--p58-danger)"
796
+ },
797
+ children: [
798
+ n === "up" ? "↑" : "↓",
799
+ " ",
800
+ r
801
+ ]
802
+ }
803
+ )
804
+ ] });
805
+ export {
806
+ vt as ArtifactList,
807
+ F as Badge,
808
+ P as Button,
809
+ rt as CategoryGroup,
810
+ G as CategoryHeader,
811
+ S as Container,
812
+ at as FileItem,
813
+ R as Icon,
814
+ W as IconContainer,
815
+ ht as InfoCard,
816
+ D as Input,
817
+ N as Label,
818
+ k as List,
819
+ U as ListItem,
820
+ gt as P58Button,
821
+ bt as P58Card,
822
+ lt as P58Eyebrow,
823
+ nt as P58Icon,
824
+ yt as P58Metric,
825
+ B as SearchInput,
826
+ mt as SearchSection,
827
+ q as TagBadge,
828
+ ft as TagFilterList
829
+ };