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