@pcoi/components 0.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.
Files changed (103) hide show
  1. package/dist/components.css +1 -0
  2. package/dist/index.d.ts +667 -0
  3. package/dist/index.js +2 -0
  4. package/dist/index.mjs +1048 -0
  5. package/package.json +36 -0
  6. package/src/Badge/Badge.css +40 -0
  7. package/src/Badge/Badge.tsx +36 -0
  8. package/src/Badge/index.ts +2 -0
  9. package/src/Button/Button.css +93 -0
  10. package/src/Button/Button.figma.tsx +29 -0
  11. package/src/Button/Button.tsx +47 -0
  12. package/src/Button/index.ts +1 -0
  13. package/src/Callout/Callout.css +43 -0
  14. package/src/Callout/Callout.tsx +39 -0
  15. package/src/Callout/index.ts +1 -0
  16. package/src/Card/Card.css +88 -0
  17. package/src/Card/Card.tsx +60 -0
  18. package/src/Card/index.ts +1 -0
  19. package/src/ChatInterface/ChatInterface.css +49 -0
  20. package/src/ChatInterface/ChatInterface.tsx +120 -0
  21. package/src/ChatInterface/index.ts +6 -0
  22. package/src/ChatMessage/ChatMessage.css +55 -0
  23. package/src/ChatMessage/ChatMessage.tsx +71 -0
  24. package/src/ChatMessage/index.ts +2 -0
  25. package/src/ChatMessageList/ChatMessageList.css +24 -0
  26. package/src/ChatMessageList/ChatMessageList.tsx +51 -0
  27. package/src/ChatMessageList/index.ts +2 -0
  28. package/src/Checkbox/Checkbox.css +97 -0
  29. package/src/Checkbox/Checkbox.tsx +70 -0
  30. package/src/Checkbox/index.ts +2 -0
  31. package/src/CitationMark/CitationMark.css +40 -0
  32. package/src/CitationMark/CitationMark.tsx +38 -0
  33. package/src/CitationMark/index.ts +2 -0
  34. package/src/CitedExcerpt/CitedExcerpt.css +75 -0
  35. package/src/CitedExcerpt/CitedExcerpt.tsx +51 -0
  36. package/src/CitedExcerpt/index.ts +2 -0
  37. package/src/ComparisonTable/ComparisonTable.css +66 -0
  38. package/src/ComparisonTable/ComparisonTable.tsx +48 -0
  39. package/src/ComparisonTable/index.ts +1 -0
  40. package/src/ContactForm/ContactForm.css +38 -0
  41. package/src/ContactForm/ContactForm.tsx +57 -0
  42. package/src/ContactForm/index.ts +1 -0
  43. package/src/DataTable/DataTable.css +56 -0
  44. package/src/DataTable/DataTable.tsx +104 -0
  45. package/src/DataTable/index.ts +2 -0
  46. package/src/DocumentOverlay/DocumentOverlay.css +57 -0
  47. package/src/DocumentOverlay/DocumentOverlay.tsx +86 -0
  48. package/src/DocumentOverlay/index.ts +2 -0
  49. package/src/Footer/Footer.css +72 -0
  50. package/src/Footer/Footer.tsx +56 -0
  51. package/src/Footer/index.ts +1 -0
  52. package/src/FormField/FormField.css +78 -0
  53. package/src/FormField/FormField.tsx +103 -0
  54. package/src/FormField/index.ts +2 -0
  55. package/src/HowStep/HowStep.css +48 -0
  56. package/src/HowStep/HowStep.tsx +38 -0
  57. package/src/HowStep/index.ts +1 -0
  58. package/src/LogoMark/LogoMark.css +16 -0
  59. package/src/LogoMark/LogoMark.tsx +25 -0
  60. package/src/LogoMark/index.ts +2 -0
  61. package/src/Modal/Modal.css +101 -0
  62. package/src/Modal/Modal.tsx +141 -0
  63. package/src/Modal/index.ts +2 -0
  64. package/src/Nav/Nav.css +161 -0
  65. package/src/Nav/Nav.tsx +101 -0
  66. package/src/Nav/index.ts +1 -0
  67. package/src/Panel/Panel.css +35 -0
  68. package/src/Panel/Panel.tsx +61 -0
  69. package/src/Panel/index.ts +2 -0
  70. package/src/PromptBar/PromptBar.css +68 -0
  71. package/src/PromptBar/PromptBar.tsx +93 -0
  72. package/src/PromptBar/index.ts +2 -0
  73. package/src/RadioGroup/RadioGroup.css +117 -0
  74. package/src/RadioGroup/RadioGroup.tsx +112 -0
  75. package/src/RadioGroup/index.ts +2 -0
  76. package/src/SectionHeader/SectionHeader.css +38 -0
  77. package/src/SectionHeader/SectionHeader.tsx +55 -0
  78. package/src/SectionHeader/index.ts +1 -0
  79. package/src/Select/Select.css +90 -0
  80. package/src/Select/Select.tsx +100 -0
  81. package/src/Select/index.ts +2 -0
  82. package/src/SignalsPanel/SignalsPanel.css +51 -0
  83. package/src/SignalsPanel/SignalsPanel.tsx +33 -0
  84. package/src/SignalsPanel/index.ts +1 -0
  85. package/src/SuggestionCard/SuggestionCard.css +51 -0
  86. package/src/SuggestionCard/SuggestionCard.tsx +34 -0
  87. package/src/SuggestionCard/index.ts +2 -0
  88. package/src/SuggestionCards/SuggestionCards.css +15 -0
  89. package/src/SuggestionCards/SuggestionCards.tsx +40 -0
  90. package/src/SuggestionCards/index.ts +2 -0
  91. package/src/Toast/Toast.css +85 -0
  92. package/src/Toast/Toast.tsx +77 -0
  93. package/src/Toast/index.ts +2 -0
  94. package/src/Toggle/Toggle.css +110 -0
  95. package/src/Toggle/Toggle.tsx +73 -0
  96. package/src/Toggle/index.ts +2 -0
  97. package/src/TypingIndicator/TypingIndicator.css +70 -0
  98. package/src/TypingIndicator/TypingIndicator.tsx +37 -0
  99. package/src/TypingIndicator/index.ts +2 -0
  100. package/src/index.ts +37 -0
  101. package/src/styles/utilities.css +14 -0
  102. package/src/styles.css +32 -0
  103. package/src/types.ts +65 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,1048 @@
1
+ import { jsxs as n, jsx as e, Fragment as E } from "react/jsx-runtime";
2
+ import _, { useState as $, useEffect as y, useRef as w, useCallback as R } from "react";
3
+ import { createPortal as F } from "react-dom";
4
+ const I = _.forwardRef(
5
+ ({ href: i = "#", className: a = "", ...c }, l) => /* @__PURE__ */ n("a", { ref: l, href: i, className: `pcoi-logo ${a}`, ...c, children: [
6
+ /* @__PURE__ */ e("span", { className: "pcoi-logo__mark", children: "P" }),
7
+ "COI"
8
+ ] })
9
+ );
10
+ I.displayName = "LogoMark";
11
+ const k = _.forwardRef(
12
+ ({ variant: i = "primary", size: a = "default", children: c, className: l = "", ...o }, s) => {
13
+ const r = [
14
+ "pcoi-btn",
15
+ `pcoi-btn--${i}`,
16
+ a !== "default" ? `pcoi-btn--${a}` : "",
17
+ l
18
+ ].filter(Boolean).join(" ");
19
+ return /* @__PURE__ */ e("button", { ref: s, className: r, ...o, children: c });
20
+ }
21
+ );
22
+ k.displayName = "Button";
23
+ const g = _.forwardRef(
24
+ ({
25
+ label: i,
26
+ name: a,
27
+ multiline: c = !1,
28
+ rows: l = 3,
29
+ error: o,
30
+ required: s = !1,
31
+ disabled: r = !1,
32
+ className: t = "",
33
+ ...p
34
+ }, d) => {
35
+ const h = `pcoi-field-${a}`, m = o ? `${h}-error` : void 0, u = [
36
+ "pcoi-field",
37
+ o ? "pcoi-field--error" : "",
38
+ r ? "pcoi-field--disabled" : "",
39
+ t
40
+ ].filter(Boolean).join(" ");
41
+ return /* @__PURE__ */ n("div", { className: u, children: [
42
+ /* @__PURE__ */ n("label", { htmlFor: h, className: "pcoi-field__label", children: [
43
+ i,
44
+ s && /* @__PURE__ */ e("span", { className: "pcoi-field__required", "aria-hidden": "true", children: "*" })
45
+ ] }),
46
+ c ? /* @__PURE__ */ e(
47
+ "textarea",
48
+ {
49
+ ref: d,
50
+ id: h,
51
+ name: a,
52
+ rows: l,
53
+ required: s,
54
+ disabled: r,
55
+ "aria-invalid": !!o,
56
+ "aria-describedby": m,
57
+ className: "pcoi-field__textarea",
58
+ ...p
59
+ }
60
+ ) : /* @__PURE__ */ e(
61
+ "input",
62
+ {
63
+ ref: d,
64
+ id: h,
65
+ name: a,
66
+ required: s,
67
+ disabled: r,
68
+ "aria-invalid": !!o,
69
+ "aria-describedby": m,
70
+ className: "pcoi-field__input",
71
+ ...p
72
+ }
73
+ ),
74
+ o && /* @__PURE__ */ e("span", { id: m, className: "pcoi-field__error", role: "alert", children: o })
75
+ ] });
76
+ }
77
+ );
78
+ g.displayName = "FormField";
79
+ const Y = _.forwardRef(
80
+ ({ variant: i = "problem", title: a, description: c, icon: l, number: o, headingLevel: s = "h3", className: r = "", ...t }, p) => {
81
+ const d = s, h = [
82
+ "pcoi-card",
83
+ `pcoi-card--${i}`,
84
+ r
85
+ ].filter(Boolean).join(" ");
86
+ return /* @__PURE__ */ n("div", { ref: p, className: h, ...t, children: [
87
+ i === "problem" && l && /* @__PURE__ */ e("div", { className: "pcoi-card__icon", children: l }),
88
+ i === "principle" && o && /* @__PURE__ */ e("div", { className: "pcoi-card__number", children: o }),
89
+ /* @__PURE__ */ e(d, { className: "pcoi-card__title", children: a }),
90
+ /* @__PURE__ */ e("p", { className: "pcoi-card__description", children: c })
91
+ ] });
92
+ }
93
+ );
94
+ Y.displayName = "Card";
95
+ const K = _.forwardRef(
96
+ ({
97
+ links: i = [
98
+ { label: "Problem", href: "#problem" },
99
+ { label: "How It Works", href: "#how-it-works" },
100
+ { label: "Difference", href: "#difference" },
101
+ { label: "Who It's For", href: "#who" }
102
+ ],
103
+ ctaLabel: a = "Start a Conversation",
104
+ ctaHref: c = "#contact",
105
+ onCtaClick: l,
106
+ className: o = "",
107
+ ...s
108
+ }, r) => {
109
+ const [t, p] = $(!1), [d, h] = $(!1);
110
+ return y(() => {
111
+ const m = () => p(window.scrollY > 40);
112
+ return window.addEventListener("scroll", m, { passive: !0 }), m(), () => window.removeEventListener("scroll", m);
113
+ }, []), y(() => {
114
+ if (!d) return;
115
+ const m = (u) => {
116
+ u.key === "Escape" && h(!1);
117
+ };
118
+ return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
119
+ }, [d]), /* @__PURE__ */ n(
120
+ "nav",
121
+ {
122
+ ref: r,
123
+ className: `pcoi-nav ${t ? "pcoi-nav--scrolled" : ""} ${d ? "pcoi-nav--menu-open" : ""} ${o}`,
124
+ "aria-label": "Main",
125
+ ...s,
126
+ children: [
127
+ /* @__PURE__ */ n("div", { className: "pcoi-nav__inner", children: [
128
+ /* @__PURE__ */ e(I, {}),
129
+ /* @__PURE__ */ n("div", { className: "pcoi-nav__links", children: [
130
+ i.map((m) => /* @__PURE__ */ e("a", { href: m.href, "data-track-id": m.trackingId, children: m.label }, m.href)),
131
+ /* @__PURE__ */ e("a", { href: c, children: /* @__PURE__ */ e(k, { variant: "nav-cta", onClick: l, children: a }) })
132
+ ] }),
133
+ /* @__PURE__ */ n(
134
+ "button",
135
+ {
136
+ className: `pcoi-nav__hamburger ${d ? "pcoi-nav__hamburger--active" : ""}`,
137
+ onClick: () => h(!d),
138
+ "aria-label": "Toggle menu",
139
+ "aria-expanded": d,
140
+ "aria-controls": "pcoi-mobile-menu",
141
+ children: [
142
+ /* @__PURE__ */ e("span", {}),
143
+ /* @__PURE__ */ e("span", {}),
144
+ /* @__PURE__ */ e("span", {})
145
+ ]
146
+ }
147
+ )
148
+ ] }),
149
+ /* @__PURE__ */ n("div", { className: "pcoi-nav__mobile-menu", id: "pcoi-mobile-menu", children: [
150
+ i.map((m) => /* @__PURE__ */ e("a", { href: m.href, "data-track-id": m.trackingId, onClick: () => h(!1), children: m.label }, m.href)),
151
+ /* @__PURE__ */ e("a", { href: c, children: /* @__PURE__ */ e(k, { variant: "nav-cta", onClick: () => {
152
+ l == null || l(), h(!1);
153
+ }, children: a }) })
154
+ ] })
155
+ ]
156
+ }
157
+ );
158
+ }
159
+ );
160
+ K.displayName = "Nav";
161
+ const z = _.forwardRef(
162
+ ({ label: i, title: a, titleEmphasis: c, description: l, headingLevel: o = "h2", className: s = "", ...r }, t) => {
163
+ const p = o;
164
+ return /* @__PURE__ */ n("div", { ref: t, className: `pcoi-section-header ${s}`, ...r, children: [
165
+ /* @__PURE__ */ e("span", { className: "pcoi-section-header__label", children: i }),
166
+ /* @__PURE__ */ e(p, { className: "pcoi-section-header__title", children: c ? /* @__PURE__ */ n(E, { children: [
167
+ a.replace(c, ""),
168
+ /* @__PURE__ */ e("em", { children: c })
169
+ ] }) : a }),
170
+ l && /* @__PURE__ */ e("p", { className: "pcoi-section-header__desc", children: l })
171
+ ] });
172
+ }
173
+ );
174
+ z.displayName = "SectionHeader";
175
+ const V = _.forwardRef(
176
+ ({ number: i, title: a, description: c, isLast: l = !1, headingLevel: o = "h3", className: s = "", ...r }, t) => {
177
+ const p = o;
178
+ return /* @__PURE__ */ n("div", { ref: t, className: `pcoi-how-step ${l ? "pcoi-how-step--last" : ""} ${s}`, ...r, children: [
179
+ /* @__PURE__ */ e("div", { className: "pcoi-how-step__number", children: i }),
180
+ /* @__PURE__ */ n("div", { className: "pcoi-how-step__content", children: [
181
+ /* @__PURE__ */ e(p, { className: "pcoi-how-step__title", children: a }),
182
+ /* @__PURE__ */ e("p", { className: "pcoi-how-step__desc", children: c })
183
+ ] })
184
+ ] });
185
+ }
186
+ );
187
+ V.displayName = "HowStep";
188
+ const G = _.forwardRef(
189
+ ({ competitorName: i = "Typical SaaS AI", pcoiName: a = "PCOI", rows: c, className: l = "", ...o }, s) => /* @__PURE__ */ e("div", { ref: s, className: `pcoi-comparison ${l}`, ...o, children: /* @__PURE__ */ n("table", { className: "pcoi-comparison__table", children: [
190
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "pcoi-comparison__header", children: [
191
+ /* @__PURE__ */ e("th", { className: "pcoi-comparison__col", scope: "col", children: /* @__PURE__ */ e("span", { className: "pcoi-sr-only", children: "Feature" }) }),
192
+ /* @__PURE__ */ e("th", { className: "pcoi-comparison__col", scope: "col", children: i }),
193
+ /* @__PURE__ */ e("th", { className: "pcoi-comparison__col pcoi-comparison__col--highlight", scope: "col", children: a })
194
+ ] }) }),
195
+ /* @__PURE__ */ e("tbody", { children: c.map((r, t) => /* @__PURE__ */ n("tr", { className: "pcoi-comparison__row", children: [
196
+ /* @__PURE__ */ e("th", { className: "pcoi-comparison__col pcoi-comparison__col--label", scope: "row", children: r.label }),
197
+ /* @__PURE__ */ e("td", { className: "pcoi-comparison__col", children: r.competitor }),
198
+ /* @__PURE__ */ e("td", { className: "pcoi-comparison__col pcoi-comparison__col--highlight", children: r.pcoi })
199
+ ] }, t)) })
200
+ ] }) })
201
+ );
202
+ G.displayName = "ComparisonTable";
203
+ const J = _.forwardRef(
204
+ ({ onSubmit: i, className: a = "", ...c }, l) => {
205
+ const [o, s] = $(!1), r = (t) => {
206
+ t.preventDefault();
207
+ const p = t.currentTarget, d = new FormData(p), h = Object.fromEntries(d.entries());
208
+ i == null || i(h), s(!0), p.reset(), setTimeout(() => s(!1), 3e3);
209
+ };
210
+ return /* @__PURE__ */ n("form", { ref: l, className: `pcoi-form ${a}`, onSubmit: r, "aria-label": "Contact form", ...c, children: [
211
+ /* @__PURE__ */ n("div", { className: "pcoi-form__row", children: [
212
+ /* @__PURE__ */ e(g, { label: "Name", name: "name", placeholder: "Your name", required: !0 }),
213
+ /* @__PURE__ */ e(g, { label: "Company", name: "company", placeholder: "Company name", required: !0 })
214
+ ] }),
215
+ /* @__PURE__ */ n("div", { className: "pcoi-form__row", children: [
216
+ /* @__PURE__ */ e(g, { label: "Email", name: "email", type: "email", placeholder: "you@company.com", required: !0 }),
217
+ /* @__PURE__ */ e(g, { label: "Your Role", name: "role", placeholder: "CEO, COO, VP Ops, etc." })
218
+ ] }),
219
+ /* @__PURE__ */ e(
220
+ g,
221
+ {
222
+ label: "What problem are you trying to solve?",
223
+ name: "context",
224
+ multiline: !0,
225
+ rows: 3,
226
+ placeholder: "Tell us about the knowledge challenges in your organization...",
227
+ className: "pcoi-form__full"
228
+ }
229
+ ),
230
+ /* @__PURE__ */ e(k, { type: "submit", variant: "primary", size: "large", disabled: o, children: o ? "Message Received" : "Start the Conversation" }),
231
+ /* @__PURE__ */ e("p", { className: "pcoi-form__note", children: "No sales automation. A real person reads this and responds personally." })
232
+ ] });
233
+ }
234
+ );
235
+ J.displayName = "ContactForm";
236
+ const Q = _.forwardRef(
237
+ ({ quote: i, attribution: a, attributionTitle: c, sourceUrl: l, sourceLabel: o, className: s = "", ...r }, t) => /* @__PURE__ */ n("div", { ref: t, className: `pcoi-callout ${s}`, ...r, children: [
238
+ /* @__PURE__ */ e("div", { className: "pcoi-callout__line" }),
239
+ /* @__PURE__ */ e("p", { className: "pcoi-callout__quote", children: i }),
240
+ (a || l) && /* @__PURE__ */ n("p", { className: "pcoi-callout__attribution", children: [
241
+ c && /* @__PURE__ */ n("span", { children: [
242
+ c,
243
+ "  ~  "
244
+ ] }),
245
+ a,
246
+ l && /* @__PURE__ */ n(E, { children: [
247
+ "  |  ",
248
+ /* @__PURE__ */ e("a", { href: l, target: "_blank", rel: "noopener noreferrer", children: o || "Source" })
249
+ ] })
250
+ ] })
251
+ ] })
252
+ );
253
+ Q.displayName = "Callout";
254
+ const X = _.forwardRef(
255
+ ({ title: i = "You'll know this is for you if:", signals: a, headingLevel: c = "h3", className: l = "", ...o }, s) => {
256
+ const r = c;
257
+ return /* @__PURE__ */ n("div", { ref: s, className: `pcoi-signals ${l}`, ...o, children: [
258
+ /* @__PURE__ */ e(r, { className: "pcoi-signals__title", children: i }),
259
+ /* @__PURE__ */ e("ul", { className: "pcoi-signals__list", children: a.map((t, p) => /* @__PURE__ */ e("li", { className: "pcoi-signals__item", children: t }, p)) })
260
+ ] });
261
+ }
262
+ );
263
+ X.displayName = "SignalsPanel";
264
+ const Z = _.forwardRef(
265
+ ({
266
+ links: i = [
267
+ { label: "Problem", href: "#problem" },
268
+ { label: "How It Works", href: "#how-it-works" },
269
+ { label: "Difference", href: "#difference" },
270
+ { label: "Principles", href: "#principles" },
271
+ { label: "Who It's For", href: "#who" },
272
+ { label: "Contact", href: "#contact" }
273
+ ],
274
+ tagline: a = `Portable, Company-Owned
275
+ Operational Intelligence`,
276
+ copyright: c = `© ${(/* @__PURE__ */ new Date()).getFullYear()} PCOI. Operational intelligence you own.`,
277
+ className: l = "",
278
+ ...o
279
+ }, s) => /* @__PURE__ */ n("footer", { ref: s, className: `pcoi-footer ${l}`, ...o, children: [
280
+ /* @__PURE__ */ n("div", { className: "pcoi-footer__inner", children: [
281
+ /* @__PURE__ */ n("div", { className: "pcoi-footer__brand", children: [
282
+ /* @__PURE__ */ e(I, { className: "pcoi-footer__logo" }),
283
+ /* @__PURE__ */ e("p", { className: "pcoi-footer__tagline", children: a })
284
+ ] }),
285
+ /* @__PURE__ */ e("div", { className: "pcoi-footer__links", children: i.map((r) => /* @__PURE__ */ e("a", { href: r.href, "data-track-id": r.trackingId, children: r.label }, r.href)) })
286
+ ] }),
287
+ /* @__PURE__ */ e("div", { className: "pcoi-footer__bottom", children: /* @__PURE__ */ e("p", { children: c }) })
288
+ ] })
289
+ );
290
+ Z.displayName = "Footer";
291
+ const T = ({
292
+ size: i = 24,
293
+ title: a,
294
+ ...c
295
+ }) => /* @__PURE__ */ n(
296
+ "svg",
297
+ {
298
+ width: i,
299
+ height: i,
300
+ viewBox: "0 0 24 24",
301
+ fill: "none",
302
+ stroke: "currentColor",
303
+ strokeWidth: 1.5,
304
+ strokeLinecap: "round",
305
+ strokeLinejoin: "round",
306
+ role: a ? "img" : "presentation",
307
+ "aria-hidden": !a,
308
+ xmlns: "http://www.w3.org/2000/svg",
309
+ ...c,
310
+ children: [
311
+ a && /* @__PURE__ */ e("title", { children: a }),
312
+ /* @__PURE__ */ e("polyline", { points: "6 9 12 15 18 9" })
313
+ ]
314
+ }
315
+ );
316
+ T.displayName = "ChevronDownIcon";
317
+ const U = _.forwardRef(
318
+ ({
319
+ label: i,
320
+ name: a,
321
+ options: c,
322
+ placeholder: l,
323
+ error: o,
324
+ required: s = !1,
325
+ disabled: r = !1,
326
+ className: t = "",
327
+ ...p
328
+ }, d) => {
329
+ const h = `pcoi-field-${a}`, m = o ? `${h}-error` : void 0, u = [
330
+ "pcoi-select",
331
+ o ? "pcoi-select--error" : "",
332
+ r ? "pcoi-select--disabled" : "",
333
+ t
334
+ ].filter(Boolean).join(" ");
335
+ return /* @__PURE__ */ n("div", { className: u, children: [
336
+ /* @__PURE__ */ n("label", { htmlFor: h, className: "pcoi-select__label", children: [
337
+ i,
338
+ s && /* @__PURE__ */ e("span", { className: "pcoi-select__required", "aria-hidden": "true", children: "*" })
339
+ ] }),
340
+ /* @__PURE__ */ n("div", { className: "pcoi-select__wrapper", children: [
341
+ /* @__PURE__ */ n(
342
+ "select",
343
+ {
344
+ ref: d,
345
+ id: h,
346
+ name: a,
347
+ required: s,
348
+ disabled: r,
349
+ "aria-invalid": !!o,
350
+ "aria-describedby": m,
351
+ className: "pcoi-select__native",
352
+ defaultValue: l ? "" : void 0,
353
+ ...p,
354
+ children: [
355
+ l && /* @__PURE__ */ e("option", { value: "", disabled: !0, hidden: !0, children: l }),
356
+ c.map((f) => /* @__PURE__ */ e("option", { value: f.value, disabled: f.disabled, children: f.label }, f.value))
357
+ ]
358
+ }
359
+ ),
360
+ /* @__PURE__ */ e("span", { className: "pcoi-select__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(T, { size: 16 }) })
361
+ ] }),
362
+ o && /* @__PURE__ */ e("span", { id: m, className: "pcoi-select__error", role: "alert", children: o })
363
+ ] });
364
+ }
365
+ );
366
+ U.displayName = "Select";
367
+ const ee = _.forwardRef(
368
+ ({
369
+ label: i,
370
+ name: a,
371
+ error: c,
372
+ disabled: l = !1,
373
+ className: o = "",
374
+ ...s
375
+ }, r) => {
376
+ const t = `pcoi-field-${a}`, p = c ? `${t}-error` : void 0, d = [
377
+ "pcoi-checkbox",
378
+ c ? "pcoi-checkbox--error" : "",
379
+ l ? "pcoi-checkbox--disabled" : "",
380
+ o
381
+ ].filter(Boolean).join(" ");
382
+ return /* @__PURE__ */ n("div", { className: d, children: [
383
+ /* @__PURE__ */ n("label", { htmlFor: t, className: "pcoi-checkbox__control", children: [
384
+ /* @__PURE__ */ e(
385
+ "input",
386
+ {
387
+ ref: r,
388
+ type: "checkbox",
389
+ id: t,
390
+ name: a,
391
+ disabled: l,
392
+ "aria-invalid": !!c,
393
+ "aria-describedby": p,
394
+ className: "pcoi-checkbox__input",
395
+ ...s
396
+ }
397
+ ),
398
+ /* @__PURE__ */ e("span", { className: "pcoi-checkbox__box", "aria-hidden": "true" }),
399
+ /* @__PURE__ */ e("span", { className: "pcoi-checkbox__label", children: i })
400
+ ] }),
401
+ c && /* @__PURE__ */ e("span", { id: p, className: "pcoi-checkbox__error", role: "alert", children: c })
402
+ ] });
403
+ }
404
+ );
405
+ ee.displayName = "Checkbox";
406
+ const ae = _.forwardRef(
407
+ ({
408
+ label: i,
409
+ name: a,
410
+ error: c,
411
+ disabled: l = !1,
412
+ className: o = "",
413
+ ...s
414
+ }, r) => {
415
+ const t = `pcoi-field-${a}`, p = c ? `${t}-error` : void 0, d = [
416
+ "pcoi-toggle",
417
+ c ? "pcoi-toggle--error" : "",
418
+ l ? "pcoi-toggle--disabled" : "",
419
+ o
420
+ ].filter(Boolean).join(" ");
421
+ return /* @__PURE__ */ n("div", { className: d, children: [
422
+ /* @__PURE__ */ n("label", { htmlFor: t, className: "pcoi-toggle__control", children: [
423
+ /* @__PURE__ */ e(
424
+ "input",
425
+ {
426
+ ref: r,
427
+ type: "checkbox",
428
+ id: t,
429
+ name: a,
430
+ disabled: l,
431
+ "aria-invalid": !!c,
432
+ "aria-describedby": p,
433
+ className: "pcoi-toggle__input",
434
+ role: "switch",
435
+ ...s
436
+ }
437
+ ),
438
+ /* @__PURE__ */ e("span", { className: "pcoi-toggle__track", "aria-hidden": "true", children: /* @__PURE__ */ e("span", { className: "pcoi-toggle__thumb" }) }),
439
+ /* @__PURE__ */ e("span", { className: "pcoi-toggle__label", children: i })
440
+ ] }),
441
+ c && /* @__PURE__ */ e("span", { id: p, className: "pcoi-toggle__error", role: "alert", children: c })
442
+ ] });
443
+ }
444
+ );
445
+ ae.displayName = "Toggle";
446
+ const ie = _.forwardRef(
447
+ ({
448
+ label: i,
449
+ name: a,
450
+ options: c,
451
+ defaultValue: l,
452
+ error: o,
453
+ required: s = !1,
454
+ disabled: r = !1,
455
+ onChange: t,
456
+ className: p = "",
457
+ ...d
458
+ }, h) => {
459
+ const m = o ? `pcoi-field-${a}-error` : void 0, u = [
460
+ "pcoi-radio-group",
461
+ o ? "pcoi-radio-group--error" : "",
462
+ r ? "pcoi-radio-group--disabled" : "",
463
+ p
464
+ ].filter(Boolean).join(" "), f = (N) => {
465
+ t == null || t(N.target.value);
466
+ };
467
+ return /* @__PURE__ */ n(
468
+ "fieldset",
469
+ {
470
+ ref: h,
471
+ className: u,
472
+ "aria-invalid": !!o,
473
+ "aria-describedby": m,
474
+ ...d,
475
+ children: [
476
+ /* @__PURE__ */ n("legend", { className: "pcoi-radio-group__legend", children: [
477
+ i,
478
+ s && /* @__PURE__ */ e("span", { className: "pcoi-radio-group__required", "aria-hidden": "true", children: "*" })
479
+ ] }),
480
+ /* @__PURE__ */ e("div", { className: "pcoi-radio-group__options", children: c.map((N) => {
481
+ const x = `pcoi-field-${a}-${N.value}`;
482
+ return /* @__PURE__ */ n(
483
+ "label",
484
+ {
485
+ htmlFor: x,
486
+ className: "pcoi-radio-group__option",
487
+ children: [
488
+ /* @__PURE__ */ e(
489
+ "input",
490
+ {
491
+ type: "radio",
492
+ id: x,
493
+ name: a,
494
+ value: N.value,
495
+ defaultChecked: l === N.value,
496
+ required: s,
497
+ disabled: r || N.disabled,
498
+ onChange: f,
499
+ className: "pcoi-radio-group__input"
500
+ }
501
+ ),
502
+ /* @__PURE__ */ e("span", { className: "pcoi-radio-group__circle", "aria-hidden": "true" }),
503
+ /* @__PURE__ */ e("span", { className: "pcoi-radio-group__label", children: N.label })
504
+ ]
505
+ },
506
+ N.value
507
+ );
508
+ }) }),
509
+ o && /* @__PURE__ */ e("span", { id: m, className: "pcoi-radio-group__error", role: "alert", children: o })
510
+ ]
511
+ }
512
+ );
513
+ }
514
+ );
515
+ ie.displayName = "RadioGroup";
516
+ const ce = _.forwardRef(
517
+ ({
518
+ title: i,
519
+ headingLevel: a = "h3",
520
+ action: c,
521
+ children: l,
522
+ flush: o = !1,
523
+ className: s = "",
524
+ ...r
525
+ }, t) => {
526
+ const p = a, d = [
527
+ "pcoi-panel",
528
+ o ? "pcoi-panel--flush" : "",
529
+ s
530
+ ].filter(Boolean).join(" ");
531
+ return /* @__PURE__ */ n("div", { ref: t, className: d, ...r, children: [
532
+ (i || c) && /* @__PURE__ */ n("div", { className: "pcoi-panel__header", children: [
533
+ i && /* @__PURE__ */ e(p, { className: "pcoi-panel__title", children: i }),
534
+ c && /* @__PURE__ */ e("div", { className: "pcoi-panel__action", children: c })
535
+ ] }),
536
+ /* @__PURE__ */ e("div", { className: "pcoi-panel__body", children: l })
537
+ ] });
538
+ }
539
+ );
540
+ ce.displayName = "Panel";
541
+ const oe = _.forwardRef(
542
+ ({
543
+ columns: i,
544
+ rows: a,
545
+ rowKey: c,
546
+ emptyText: l = "No data available",
547
+ ariaLabel: o,
548
+ className: s = "",
549
+ ...r
550
+ }, t) => {
551
+ const p = (d, h) => c ? typeof c == "function" ? c(d, h) : String(d[c]) : String(h);
552
+ return /* @__PURE__ */ e("div", { ref: t, className: `pcoi-data-table ${s}`, ...r, children: /* @__PURE__ */ n("table", { className: "pcoi-data-table__table", "aria-label": o, children: [
553
+ /* @__PURE__ */ e("thead", { className: "pcoi-data-table__head", children: /* @__PURE__ */ e("tr", { className: "pcoi-data-table__head-row", children: i.map((d) => /* @__PURE__ */ e(
554
+ "th",
555
+ {
556
+ className: `pcoi-data-table__th${d.align ? ` pcoi-data-table__th--${d.align}` : ""}`,
557
+ children: d.header
558
+ },
559
+ d.key
560
+ )) }) }),
561
+ /* @__PURE__ */ e("tbody", { className: "pcoi-data-table__body", children: a.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
562
+ "td",
563
+ {
564
+ colSpan: i.length,
565
+ className: "pcoi-data-table__empty",
566
+ children: l
567
+ }
568
+ ) }) : a.map((d, h) => /* @__PURE__ */ e(
569
+ "tr",
570
+ {
571
+ className: "pcoi-data-table__row",
572
+ children: i.map((m) => {
573
+ const u = d[m.key];
574
+ return /* @__PURE__ */ e(
575
+ "td",
576
+ {
577
+ className: `pcoi-data-table__td${m.align ? ` pcoi-data-table__td--${m.align}` : ""}`,
578
+ children: m.render ? m.render(u, d) : String(u ?? "")
579
+ },
580
+ m.key
581
+ );
582
+ })
583
+ },
584
+ p(d, h)
585
+ )) })
586
+ ] }) });
587
+ }
588
+ );
589
+ oe.displayName = "DataTable";
590
+ const C = _.forwardRef(
591
+ ({ children: i, variant: a = "default", className: c = "", ...l }, o) => {
592
+ const s = [
593
+ "pcoi-badge",
594
+ `pcoi-badge--${a}`,
595
+ c
596
+ ].filter(Boolean).join(" ");
597
+ return /* @__PURE__ */ e("span", { ref: o, className: s, ...l, children: i });
598
+ }
599
+ );
600
+ C.displayName = "Badge";
601
+ const B = ({
602
+ size: i = 24,
603
+ title: a,
604
+ ...c
605
+ }) => /* @__PURE__ */ n(
606
+ "svg",
607
+ {
608
+ width: i,
609
+ height: i,
610
+ viewBox: "0 0 24 24",
611
+ fill: "none",
612
+ stroke: "currentColor",
613
+ strokeWidth: 1.5,
614
+ strokeLinecap: "round",
615
+ strokeLinejoin: "round",
616
+ role: a ? "img" : "presentation",
617
+ "aria-hidden": !a,
618
+ xmlns: "http://www.w3.org/2000/svg",
619
+ ...c,
620
+ children: [
621
+ a && /* @__PURE__ */ e("title", { children: a }),
622
+ /* @__PURE__ */ e("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
623
+ /* @__PURE__ */ e("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
624
+ ]
625
+ }
626
+ );
627
+ B.displayName = "CloseIcon";
628
+ const D = ({
629
+ open: i,
630
+ onClose: a,
631
+ title: c,
632
+ headingLevel: l = "h2",
633
+ size: o = "default",
634
+ children: s,
635
+ footer: r,
636
+ className: t = "",
637
+ ...p
638
+ }) => {
639
+ const d = w(null), h = w(null), m = l, u = c ? "pcoi-modal-title" : void 0, f = R(
640
+ (b) => {
641
+ if (b.key === "Escape") {
642
+ a();
643
+ return;
644
+ }
645
+ if (b.key === "Tab" && d.current) {
646
+ const v = d.current.querySelectorAll(
647
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
648
+ );
649
+ if (v.length === 0) return;
650
+ const S = v[0], j = v[v.length - 1];
651
+ b.shiftKey && document.activeElement === S ? (b.preventDefault(), j.focus()) : !b.shiftKey && document.activeElement === j && (b.preventDefault(), S.focus());
652
+ }
653
+ },
654
+ [a]
655
+ );
656
+ y(() => (i && (h.current = document.activeElement, document.addEventListener("keydown", f), document.body.style.overflow = "hidden", requestAnimationFrame(() => {
657
+ var v;
658
+ const b = (v = d.current) == null ? void 0 : v.querySelector(
659
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
660
+ );
661
+ b == null || b.focus();
662
+ })), () => {
663
+ var b;
664
+ document.removeEventListener("keydown", f), document.body.style.overflow = "", (b = h.current) == null || b.focus();
665
+ }), [i, f]);
666
+ const N = (b) => {
667
+ b.target === b.currentTarget && a();
668
+ };
669
+ if (!i) return null;
670
+ const x = ["pcoi-modal", t].filter(Boolean).join(" ");
671
+ return F(
672
+ /* @__PURE__ */ e("div", { className: x, onClick: N, children: /* @__PURE__ */ n(
673
+ "div",
674
+ {
675
+ ref: d,
676
+ className: `pcoi-modal__dialog${o === "wide" ? " pcoi-modal__dialog--wide" : ""}`,
677
+ role: "dialog",
678
+ "aria-modal": "true",
679
+ "aria-labelledby": u,
680
+ ...p,
681
+ children: [
682
+ /* @__PURE__ */ n("div", { className: "pcoi-modal__header", children: [
683
+ c && /* @__PURE__ */ e(m, { id: u, className: "pcoi-modal__title", children: c }),
684
+ /* @__PURE__ */ e(
685
+ "button",
686
+ {
687
+ type: "button",
688
+ className: "pcoi-modal__close",
689
+ onClick: a,
690
+ "aria-label": "Close modal",
691
+ children: /* @__PURE__ */ e(B, { size: 20 })
692
+ }
693
+ )
694
+ ] }),
695
+ /* @__PURE__ */ e("div", { className: "pcoi-modal__body", children: s }),
696
+ r && /* @__PURE__ */ e("div", { className: "pcoi-modal__footer", children: r })
697
+ ]
698
+ }
699
+ ) }),
700
+ document.body
701
+ );
702
+ };
703
+ D.displayName = "Modal";
704
+ const le = ({
705
+ message: i,
706
+ variant: a = "info",
707
+ open: c,
708
+ onClose: l,
709
+ duration: o = 5e3,
710
+ className: s = "",
711
+ ...r
712
+ }) => {
713
+ const t = R(() => {
714
+ l == null || l();
715
+ }, [l]);
716
+ if (y(() => {
717
+ if (!c || o === 0) return;
718
+ const d = setTimeout(t, o);
719
+ return () => clearTimeout(d);
720
+ }, [c, o, t]), !c) return null;
721
+ const p = [
722
+ "pcoi-toast",
723
+ `pcoi-toast--${a}`,
724
+ s
725
+ ].filter(Boolean).join(" ");
726
+ return F(
727
+ /* @__PURE__ */ e("div", { className: p, role: "alert", ...r, children: /* @__PURE__ */ n("div", { className: "pcoi-toast__content", children: [
728
+ /* @__PURE__ */ e("span", { className: "pcoi-toast__message", children: i }),
729
+ l && /* @__PURE__ */ e(
730
+ "button",
731
+ {
732
+ type: "button",
733
+ className: "pcoi-toast__close",
734
+ onClick: t,
735
+ "aria-label": "Dismiss notification",
736
+ children: /* @__PURE__ */ e(B, { size: 16 })
737
+ }
738
+ )
739
+ ] }) }),
740
+ document.body
741
+ );
742
+ };
743
+ le.displayName = "Toast";
744
+ const O = _.forwardRef(({ label: i, icon: a, className: c = "", ...l }, o) => {
745
+ const s = ["pcoi-suggestion-card", c].filter(Boolean).join(" ");
746
+ return /* @__PURE__ */ n("button", { ref: o, type: "button", className: s, ...l, children: [
747
+ a && /* @__PURE__ */ e("span", { className: "pcoi-suggestion-card__icon", children: a }),
748
+ /* @__PURE__ */ e("span", { className: "pcoi-suggestion-card__label", children: i })
749
+ ] });
750
+ });
751
+ O.displayName = "SuggestionCard";
752
+ const P = _.forwardRef(
753
+ ({ index: i, excerpt: a, sourceTitle: c, onSourceClick: l, className: o = "", ...s }, r) => {
754
+ const t = ["pcoi-cited-excerpt", o].filter(Boolean).join(" ");
755
+ return /* @__PURE__ */ n("div", { ref: r, className: t, ...s, children: [
756
+ /* @__PURE__ */ e(
757
+ "button",
758
+ {
759
+ type: "button",
760
+ className: "pcoi-cited-excerpt__source",
761
+ onClick: l,
762
+ children: c
763
+ }
764
+ ),
765
+ /* @__PURE__ */ n("div", { className: "pcoi-cited-excerpt__body", children: [
766
+ /* @__PURE__ */ n(
767
+ "button",
768
+ {
769
+ type: "button",
770
+ className: "pcoi-cited-excerpt__index",
771
+ onClick: l,
772
+ children: [
773
+ "[",
774
+ i,
775
+ "]"
776
+ ]
777
+ }
778
+ ),
779
+ /* @__PURE__ */ e("p", { className: "pcoi-cited-excerpt__text", children: a })
780
+ ] })
781
+ ] });
782
+ }
783
+ );
784
+ P.displayName = "CitedExcerpt";
785
+ const L = ({
786
+ size: i = 24,
787
+ title: a,
788
+ ...c
789
+ }) => /* @__PURE__ */ n(
790
+ "svg",
791
+ {
792
+ width: i,
793
+ height: i,
794
+ viewBox: "0 0 24 24",
795
+ fill: "none",
796
+ stroke: "currentColor",
797
+ strokeWidth: 1.5,
798
+ strokeLinecap: "round",
799
+ strokeLinejoin: "round",
800
+ role: a ? "img" : "presentation",
801
+ "aria-hidden": !a,
802
+ xmlns: "http://www.w3.org/2000/svg",
803
+ ...c,
804
+ children: [
805
+ a && /* @__PURE__ */ e("title", { children: a }),
806
+ /* @__PURE__ */ e("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
807
+ /* @__PURE__ */ e("polyline", { points: "12 5 19 12 12 19" })
808
+ ]
809
+ }
810
+ );
811
+ L.displayName = "ArrowRightIcon";
812
+ const H = _.forwardRef(
813
+ ({
814
+ value: i,
815
+ onChange: a,
816
+ onSubmit: c,
817
+ placeholder: l = "Ask a question…",
818
+ disabled: o = !1,
819
+ loading: s = !1,
820
+ className: r = "",
821
+ ...t
822
+ }, p) => {
823
+ const d = w(null), h = R(
824
+ (f) => {
825
+ f.key === "Enter" && !f.shiftKey && (f.preventDefault(), i.trim() && !o && !s && c(i.trim()));
826
+ },
827
+ [i, o, s, c]
828
+ ), m = R(() => {
829
+ i.trim() && !o && !s && c(i.trim());
830
+ }, [i, o, s, c]), u = ["pcoi-prompt-bar", r].filter(Boolean).join(" ");
831
+ return /* @__PURE__ */ n("div", { ref: p, className: u, ...t, children: [
832
+ /* @__PURE__ */ e(
833
+ "textarea",
834
+ {
835
+ ref: d,
836
+ className: "pcoi-prompt-bar__input",
837
+ value: i,
838
+ onChange: (f) => a(f.target.value),
839
+ onKeyDown: h,
840
+ placeholder: l,
841
+ disabled: o,
842
+ rows: 1,
843
+ "aria-label": l
844
+ }
845
+ ),
846
+ /* @__PURE__ */ e("div", { className: "pcoi-prompt-bar__actions", children: /* @__PURE__ */ e(
847
+ k,
848
+ {
849
+ variant: "primary",
850
+ className: "pcoi-prompt-bar__send",
851
+ onClick: m,
852
+ disabled: o || s || !i.trim(),
853
+ "aria-label": "Send message",
854
+ children: /* @__PURE__ */ e("span", { className: "pcoi-prompt-bar__send-icon", children: /* @__PURE__ */ e(L, { size: 16 }) })
855
+ }
856
+ ) })
857
+ ] });
858
+ }
859
+ );
860
+ H.displayName = "PromptBar";
861
+ const M = _.forwardRef(
862
+ ({ role: i, children: a, citations: c, timestamp: l, onCitationClick: o, className: s = "", ...r }, t) => {
863
+ const p = [
864
+ "pcoi-chat-message",
865
+ `pcoi-chat-message--${i}`,
866
+ s
867
+ ].filter(Boolean).join(" ");
868
+ return /* @__PURE__ */ n("div", { ref: t, className: p, ...r, children: [
869
+ /* @__PURE__ */ e("div", { className: "pcoi-chat-message__header", children: /* @__PURE__ */ e(C, { variant: i === "assistant" ? "default" : "info", children: i === "assistant" ? "PCOI" : "You" }) }),
870
+ /* @__PURE__ */ e("div", { className: "pcoi-chat-message__body", children: a }),
871
+ c && c.length > 0 && /* @__PURE__ */ e("div", { className: "pcoi-chat-message__citations", children: c.map((d) => /* @__PURE__ */ e(
872
+ P,
873
+ {
874
+ index: d.index,
875
+ excerpt: d.excerpt,
876
+ sourceTitle: d.sourceTitle,
877
+ onSourceClick: () => o == null ? void 0 : o(d)
878
+ },
879
+ d.index
880
+ )) }),
881
+ l && /* @__PURE__ */ e("time", { className: "pcoi-chat-message__timestamp", children: l })
882
+ ] });
883
+ }
884
+ );
885
+ M.displayName = "ChatMessage";
886
+ const q = _.forwardRef(({ suggestions: i, onSelect: a, className: c = "", ...l }, o) => {
887
+ const s = ["pcoi-suggestion-cards", c].filter(Boolean).join(" ");
888
+ return /* @__PURE__ */ e("div", { ref: o, className: s, ...l, children: i.map((r) => /* @__PURE__ */ e(
889
+ O,
890
+ {
891
+ label: r.label,
892
+ icon: r.icon,
893
+ onClick: () => a(r)
894
+ },
895
+ r.id
896
+ )) });
897
+ });
898
+ q.displayName = "SuggestionCards";
899
+ const A = _.forwardRef(({ children: i, className: a = "", ...c }, l) => {
900
+ const o = w(null);
901
+ y(() => {
902
+ const r = o.current;
903
+ if (!r) return;
904
+ const t = () => {
905
+ requestAnimationFrame(() => {
906
+ r.scrollTop = r.scrollHeight;
907
+ });
908
+ }, p = new MutationObserver(t);
909
+ return p.observe(r, { childList: !0, subtree: !0 }), t(), () => p.disconnect();
910
+ }, []);
911
+ const s = ["pcoi-chat-message-list", a].filter(Boolean).join(" ");
912
+ return /* @__PURE__ */ e("div", { ref: l, className: s, ...c, children: /* @__PURE__ */ e("div", { ref: o, className: "pcoi-chat-message-list__inner", children: i }) });
913
+ });
914
+ A.displayName = "ChatMessageList";
915
+ const re = _.forwardRef(
916
+ ({ open: i, onClose: a, title: c, sourceLabel: l, children: o, highlightId: s, highlightIndex: r, className: t = "", ...p }, d) => {
917
+ const h = w(null);
918
+ y(() => {
919
+ i && s && h.current && requestAnimationFrame(() => {
920
+ var N;
921
+ const f = (N = h.current) == null ? void 0 : N.querySelector(`#${CSS.escape(s)}`);
922
+ f && (f.scrollIntoView({ behavior: "smooth", block: "center" }), f.classList.add("pcoi-doc-overlay__highlight"), r !== void 0 && f.setAttribute("data-highlight-index", `[${r}]`));
923
+ });
924
+ }, [i, s, r]);
925
+ const m = ["pcoi-doc-overlay", t].filter(Boolean).join(" "), u = l ? _.createElement(
926
+ "div",
927
+ { className: "pcoi-doc-overlay__source" },
928
+ _.createElement(C, null, l)
929
+ ) : void 0;
930
+ return _.createElement(
931
+ D,
932
+ {
933
+ open: i,
934
+ onClose: a,
935
+ title: c,
936
+ size: "wide",
937
+ footer: u,
938
+ className: m,
939
+ ...p
940
+ },
941
+ _.createElement(
942
+ "div",
943
+ { ref: h, className: "pcoi-doc-overlay__content" },
944
+ o
945
+ )
946
+ );
947
+ }
948
+ );
949
+ re.displayName = "DocumentOverlay";
950
+ const W = _.forwardRef(({ label: i = "PCOI", className: a = "", ...c }, l) => {
951
+ const o = ["pcoi-typing-indicator", a].filter(Boolean).join(" ");
952
+ return /* @__PURE__ */ n("div", { ref: l, className: o, ...c, children: [
953
+ /* @__PURE__ */ e("div", { className: "pcoi-typing-indicator__header", children: /* @__PURE__ */ e(C, { children: i }) }),
954
+ /* @__PURE__ */ n("div", { className: "pcoi-typing-indicator__dots", "aria-label": "Typing", children: [
955
+ /* @__PURE__ */ e("span", { className: "pcoi-typing-indicator__dot" }),
956
+ /* @__PURE__ */ e("span", { className: "pcoi-typing-indicator__dot" }),
957
+ /* @__PURE__ */ e("span", { className: "pcoi-typing-indicator__dot" })
958
+ ] })
959
+ ] });
960
+ });
961
+ W.displayName = "TypingIndicator";
962
+ const se = _.forwardRef(
963
+ ({
964
+ messages: i,
965
+ suggestions: a,
966
+ promptValue: c,
967
+ onPromptChange: l,
968
+ onPromptSubmit: o,
969
+ onSuggestionSelect: s,
970
+ onCitationClick: r,
971
+ placeholder: t,
972
+ loading: p = !1,
973
+ className: d = "",
974
+ ...h
975
+ }, m) => {
976
+ const u = i.length === 0, f = [
977
+ "pcoi-chat",
978
+ u ? "pcoi-chat--empty" : "",
979
+ d
980
+ ].filter(Boolean).join(" ");
981
+ return /* @__PURE__ */ n("div", { ref: m, className: f, ...h, children: [
982
+ u ? /* @__PURE__ */ e("div", { className: "pcoi-chat__empty-state", children: a && a.length > 0 && s && /* @__PURE__ */ e("div", { className: "pcoi-chat__suggestions", children: /* @__PURE__ */ e(
983
+ q,
984
+ {
985
+ suggestions: a,
986
+ onSelect: s
987
+ }
988
+ ) }) }) : /* @__PURE__ */ n(A, { className: "pcoi-chat__messages", children: [
989
+ i.map((N) => /* @__PURE__ */ e(
990
+ M,
991
+ {
992
+ role: N.role,
993
+ citations: N.citations,
994
+ timestamp: N.timestamp,
995
+ onCitationClick: r,
996
+ children: N.content
997
+ },
998
+ N.id
999
+ )),
1000
+ p && /* @__PURE__ */ e(W, {})
1001
+ ] }),
1002
+ /* @__PURE__ */ e("div", { className: "pcoi-chat__prompt", children: /* @__PURE__ */ e(
1003
+ H,
1004
+ {
1005
+ value: c,
1006
+ onChange: l,
1007
+ onSubmit: o,
1008
+ placeholder: t,
1009
+ loading: p,
1010
+ disabled: p
1011
+ }
1012
+ ) })
1013
+ ] });
1014
+ }
1015
+ );
1016
+ se.displayName = "ChatInterface";
1017
+ export {
1018
+ C as Badge,
1019
+ k as Button,
1020
+ Q as Callout,
1021
+ Y as Card,
1022
+ se as ChatInterface,
1023
+ M as ChatMessage,
1024
+ A as ChatMessageList,
1025
+ ee as Checkbox,
1026
+ P as CitedExcerpt,
1027
+ G as ComparisonTable,
1028
+ J as ContactForm,
1029
+ oe as DataTable,
1030
+ re as DocumentOverlay,
1031
+ Z as Footer,
1032
+ g as FormField,
1033
+ V as HowStep,
1034
+ I as LogoMark,
1035
+ D as Modal,
1036
+ K as Nav,
1037
+ ce as Panel,
1038
+ H as PromptBar,
1039
+ ie as RadioGroup,
1040
+ z as SectionHeader,
1041
+ U as Select,
1042
+ X as SignalsPanel,
1043
+ O as SuggestionCard,
1044
+ q as SuggestionCards,
1045
+ le as Toast,
1046
+ ae as Toggle,
1047
+ W as TypingIndicator
1048
+ };