@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.
- package/dist/components.css +1 -0
- package/dist/index.d.ts +667 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +1048 -0
- package/package.json +36 -0
- package/src/Badge/Badge.css +40 -0
- package/src/Badge/Badge.tsx +36 -0
- package/src/Badge/index.ts +2 -0
- package/src/Button/Button.css +93 -0
- package/src/Button/Button.figma.tsx +29 -0
- package/src/Button/Button.tsx +47 -0
- package/src/Button/index.ts +1 -0
- package/src/Callout/Callout.css +43 -0
- package/src/Callout/Callout.tsx +39 -0
- package/src/Callout/index.ts +1 -0
- package/src/Card/Card.css +88 -0
- package/src/Card/Card.tsx +60 -0
- package/src/Card/index.ts +1 -0
- package/src/ChatInterface/ChatInterface.css +49 -0
- package/src/ChatInterface/ChatInterface.tsx +120 -0
- package/src/ChatInterface/index.ts +6 -0
- package/src/ChatMessage/ChatMessage.css +55 -0
- package/src/ChatMessage/ChatMessage.tsx +71 -0
- package/src/ChatMessage/index.ts +2 -0
- package/src/ChatMessageList/ChatMessageList.css +24 -0
- package/src/ChatMessageList/ChatMessageList.tsx +51 -0
- package/src/ChatMessageList/index.ts +2 -0
- package/src/Checkbox/Checkbox.css +97 -0
- package/src/Checkbox/Checkbox.tsx +70 -0
- package/src/Checkbox/index.ts +2 -0
- package/src/CitationMark/CitationMark.css +40 -0
- package/src/CitationMark/CitationMark.tsx +38 -0
- package/src/CitationMark/index.ts +2 -0
- package/src/CitedExcerpt/CitedExcerpt.css +75 -0
- package/src/CitedExcerpt/CitedExcerpt.tsx +51 -0
- package/src/CitedExcerpt/index.ts +2 -0
- package/src/ComparisonTable/ComparisonTable.css +66 -0
- package/src/ComparisonTable/ComparisonTable.tsx +48 -0
- package/src/ComparisonTable/index.ts +1 -0
- package/src/ContactForm/ContactForm.css +38 -0
- package/src/ContactForm/ContactForm.tsx +57 -0
- package/src/ContactForm/index.ts +1 -0
- package/src/DataTable/DataTable.css +56 -0
- package/src/DataTable/DataTable.tsx +104 -0
- package/src/DataTable/index.ts +2 -0
- package/src/DocumentOverlay/DocumentOverlay.css +57 -0
- package/src/DocumentOverlay/DocumentOverlay.tsx +86 -0
- package/src/DocumentOverlay/index.ts +2 -0
- package/src/Footer/Footer.css +72 -0
- package/src/Footer/Footer.tsx +56 -0
- package/src/Footer/index.ts +1 -0
- package/src/FormField/FormField.css +78 -0
- package/src/FormField/FormField.tsx +103 -0
- package/src/FormField/index.ts +2 -0
- package/src/HowStep/HowStep.css +48 -0
- package/src/HowStep/HowStep.tsx +38 -0
- package/src/HowStep/index.ts +1 -0
- package/src/LogoMark/LogoMark.css +16 -0
- package/src/LogoMark/LogoMark.tsx +25 -0
- package/src/LogoMark/index.ts +2 -0
- package/src/Modal/Modal.css +101 -0
- package/src/Modal/Modal.tsx +141 -0
- package/src/Modal/index.ts +2 -0
- package/src/Nav/Nav.css +161 -0
- package/src/Nav/Nav.tsx +101 -0
- package/src/Nav/index.ts +1 -0
- package/src/Panel/Panel.css +35 -0
- package/src/Panel/Panel.tsx +61 -0
- package/src/Panel/index.ts +2 -0
- package/src/PromptBar/PromptBar.css +68 -0
- package/src/PromptBar/PromptBar.tsx +93 -0
- package/src/PromptBar/index.ts +2 -0
- package/src/RadioGroup/RadioGroup.css +117 -0
- package/src/RadioGroup/RadioGroup.tsx +112 -0
- package/src/RadioGroup/index.ts +2 -0
- package/src/SectionHeader/SectionHeader.css +38 -0
- package/src/SectionHeader/SectionHeader.tsx +55 -0
- package/src/SectionHeader/index.ts +1 -0
- package/src/Select/Select.css +90 -0
- package/src/Select/Select.tsx +100 -0
- package/src/Select/index.ts +2 -0
- package/src/SignalsPanel/SignalsPanel.css +51 -0
- package/src/SignalsPanel/SignalsPanel.tsx +33 -0
- package/src/SignalsPanel/index.ts +1 -0
- package/src/SuggestionCard/SuggestionCard.css +51 -0
- package/src/SuggestionCard/SuggestionCard.tsx +34 -0
- package/src/SuggestionCard/index.ts +2 -0
- package/src/SuggestionCards/SuggestionCards.css +15 -0
- package/src/SuggestionCards/SuggestionCards.tsx +40 -0
- package/src/SuggestionCards/index.ts +2 -0
- package/src/Toast/Toast.css +85 -0
- package/src/Toast/Toast.tsx +77 -0
- package/src/Toast/index.ts +2 -0
- package/src/Toggle/Toggle.css +110 -0
- package/src/Toggle/Toggle.tsx +73 -0
- package/src/Toggle/index.ts +2 -0
- package/src/TypingIndicator/TypingIndicator.css +70 -0
- package/src/TypingIndicator/TypingIndicator.tsx +37 -0
- package/src/TypingIndicator/index.ts +2 -0
- package/src/index.ts +37 -0
- package/src/styles/utilities.css +14 -0
- package/src/styles.css +32 -0
- package/src/types.ts +65 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,667 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PCOI Badge — Small label for status indicators, categories, and counts
|
|
5
|
+
* Tokens: surface/accent-dim, text/accent, text/success, text/error,
|
|
6
|
+
* text/warning, text/info, radius-full, font-family/mono
|
|
7
|
+
*/
|
|
8
|
+
export declare const Badge: default_2.ForwardRefExoticComponent<BadgeProps & default_2.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
|
|
10
|
+
export declare interface BadgeProps extends default_2.HTMLAttributes<HTMLSpanElement> {
|
|
11
|
+
/** Badge content */
|
|
12
|
+
children: default_2.ReactNode;
|
|
13
|
+
/** Color variant */
|
|
14
|
+
variant?: BadgeVariant;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare type BadgeVariant = "default" | "success" | "error" | "warning" | "info";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* PCOI Button Component
|
|
21
|
+
*
|
|
22
|
+
* Variants:
|
|
23
|
+
* - primary: Gold accent bg, dark text. Hero CTA, form submit.
|
|
24
|
+
* - ghost: Transparent bg, subtle border. Secondary actions.
|
|
25
|
+
* - nav-cta: Compact primary for navigation bar.
|
|
26
|
+
*
|
|
27
|
+
* Tokens consumed:
|
|
28
|
+
* - action/primary-bg, action/primary-bg-hover, action/primary-text
|
|
29
|
+
* - action/ghost-bg, action/ghost-border, action/ghost-text
|
|
30
|
+
* - radius-sm, transition/fast
|
|
31
|
+
* - shadow/btn-primary-hover, transform/hover-lift
|
|
32
|
+
*/
|
|
33
|
+
export declare const Button: default_2.ForwardRefExoticComponent<ButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
34
|
+
|
|
35
|
+
export declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
36
|
+
/** Visual variant */
|
|
37
|
+
variant?: ButtonVariant;
|
|
38
|
+
/** Size preset */
|
|
39
|
+
size?: ButtonSize;
|
|
40
|
+
/** Content */
|
|
41
|
+
children: default_2.ReactNode;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare type ButtonSize = "default" | "large";
|
|
45
|
+
|
|
46
|
+
export declare type ButtonVariant = "primary" | "ghost" | "nav-cta";
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* PCOI Callout / Blockquote
|
|
50
|
+
* Tokens: spacing-40 (padding), text/secondary, text/accent (link)
|
|
51
|
+
*/
|
|
52
|
+
export declare const Callout: default_2.ForwardRefExoticComponent<CalloutProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
|
|
54
|
+
export declare interface CalloutProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
55
|
+
/** Quote text */
|
|
56
|
+
quote: string;
|
|
57
|
+
/** Attribution name */
|
|
58
|
+
attribution?: string;
|
|
59
|
+
/** Attribution title/context */
|
|
60
|
+
attributionTitle?: string;
|
|
61
|
+
/** Link URL */
|
|
62
|
+
sourceUrl?: string;
|
|
63
|
+
/** Link label */
|
|
64
|
+
sourceLabel?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* PCOI Card Component
|
|
69
|
+
*
|
|
70
|
+
* Three variants extracted from pcoi.ai:
|
|
71
|
+
* - problem: bg-card, icon box + title + description (Problem section)
|
|
72
|
+
* - who: surface bg, accent title (Who It's For section)
|
|
73
|
+
* - principle: bg-card, roman numeral + title + description (Principles section)
|
|
74
|
+
*
|
|
75
|
+
* Tokens consumed:
|
|
76
|
+
* - bg/card, bg/surface, border/default, border/hover
|
|
77
|
+
* - radius-md, spacing-36 (padding), spacing-20 (icon margin)
|
|
78
|
+
* - text/primary, text/secondary, text/accent
|
|
79
|
+
* - transition/medium, transform/hover-lift
|
|
80
|
+
*/
|
|
81
|
+
export declare const Card: default_2.ForwardRefExoticComponent<CardProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
|
|
83
|
+
export declare interface CardProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
84
|
+
/** Card visual variant */
|
|
85
|
+
variant?: CardVariant;
|
|
86
|
+
/** Card title */
|
|
87
|
+
title: string;
|
|
88
|
+
/** Card body text */
|
|
89
|
+
description: string;
|
|
90
|
+
/** Icon element (for problem cards) */
|
|
91
|
+
icon?: default_2.ReactNode;
|
|
92
|
+
/** Roman numeral or number (for principle cards) */
|
|
93
|
+
number?: string;
|
|
94
|
+
/** Heading level for the title (default: "h3") */
|
|
95
|
+
headingLevel?: HeadingLevel;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export declare type CardVariant = "problem" | "who" | "principle";
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* PCOI ChatInterface — Top-level chat composition
|
|
102
|
+
* Empty state: suggestions + prompt. Active state: messages + prompt.
|
|
103
|
+
* Tokens: bg/default, container/narrow, spacing-16/24
|
|
104
|
+
*/
|
|
105
|
+
export declare const ChatInterface: default_2.ForwardRefExoticComponent<ChatInterfaceProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
106
|
+
|
|
107
|
+
export declare interface ChatInterfaceMessage {
|
|
108
|
+
id: string;
|
|
109
|
+
role: ChatMessageRole;
|
|
110
|
+
content: default_2.ReactNode;
|
|
111
|
+
citations?: Citation[];
|
|
112
|
+
timestamp?: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export declare interface ChatInterfaceProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
116
|
+
/** Conversation messages */
|
|
117
|
+
messages: ChatInterfaceMessage[];
|
|
118
|
+
/** Suggestion prompts for the empty state */
|
|
119
|
+
suggestions?: Suggestion[];
|
|
120
|
+
/** Current prompt textarea value */
|
|
121
|
+
promptValue: string;
|
|
122
|
+
/** Called when the prompt textarea changes */
|
|
123
|
+
onPromptChange: (value: string) => void;
|
|
124
|
+
/** Called when the user submits a prompt */
|
|
125
|
+
onPromptSubmit: (value: string) => void;
|
|
126
|
+
/** Called when a suggestion card is clicked */
|
|
127
|
+
onSuggestionSelect?: (suggestion: Suggestion) => void;
|
|
128
|
+
/** Called when a citation is clicked */
|
|
129
|
+
onCitationClick?: (citation: Citation) => void;
|
|
130
|
+
/** Textarea placeholder */
|
|
131
|
+
placeholder?: string;
|
|
132
|
+
/** Disable input while loading */
|
|
133
|
+
loading?: boolean;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* PCOI ChatMessage — User or assistant message bubble
|
|
138
|
+
* Tokens: surface/elevated (user), bg/card (assistant), border/card,
|
|
139
|
+
* radius-md, text/primary, text/muted, type/body-size
|
|
140
|
+
*/
|
|
141
|
+
export declare const ChatMessage: default_2.ForwardRefExoticComponent<ChatMessageProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* PCOI ChatMessageList — Scrollable container that auto-scrolls to newest message
|
|
145
|
+
* Tokens: spacing-16/20 (gap), spacing-16/24 (padding)
|
|
146
|
+
*/
|
|
147
|
+
export declare const ChatMessageList: default_2.ForwardRefExoticComponent<ChatMessageListProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
148
|
+
|
|
149
|
+
export declare interface ChatMessageListProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
150
|
+
/** ChatMessage elements */
|
|
151
|
+
children: default_2.ReactNode;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export declare interface ChatMessageProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
155
|
+
/** Message sender role */
|
|
156
|
+
role: ChatMessageRole;
|
|
157
|
+
/** Message body content */
|
|
158
|
+
children: default_2.ReactNode;
|
|
159
|
+
/** Citations referenced in the message */
|
|
160
|
+
citations?: Citation[];
|
|
161
|
+
/** Displayed below the message body */
|
|
162
|
+
timestamp?: string;
|
|
163
|
+
/** Called when a citation marker or source link is clicked */
|
|
164
|
+
onCitationClick?: (citation: Citation) => void;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** Chat message sender role */
|
|
168
|
+
export declare type ChatMessageRole = "user" | "assistant";
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* PCOI Checkbox — Custom styled checkbox with label
|
|
172
|
+
* Tokens: bg/default, border/default, border/error, focus/border, focus/glow,
|
|
173
|
+
* action/primary-bg, action/primary-text, text/primary, text/error, radius-sm
|
|
174
|
+
*/
|
|
175
|
+
export declare const Checkbox: default_2.ForwardRefExoticComponent<CheckboxProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
176
|
+
|
|
177
|
+
export declare interface CheckboxProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
178
|
+
/** Visible label text */
|
|
179
|
+
label: string;
|
|
180
|
+
/** Unique field name, also used to generate id */
|
|
181
|
+
name: string;
|
|
182
|
+
/** Error message — when truthy, field enters error state */
|
|
183
|
+
error?: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/** Citation reference from an assistant response */
|
|
187
|
+
export declare interface Citation {
|
|
188
|
+
/** Unique citation index (1-based) */
|
|
189
|
+
index: number;
|
|
190
|
+
/** Short excerpt from the source document */
|
|
191
|
+
excerpt: string;
|
|
192
|
+
/** Source document title */
|
|
193
|
+
sourceTitle: string;
|
|
194
|
+
/** Source document identifier (e.g. URL or document ID) */
|
|
195
|
+
sourceId: string;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* PCOI CitedExcerpt — Blockquote with excerpt text above, clickable index + source below
|
|
200
|
+
* Tokens: surface/accent-dim, border/accent-dim, accent-border-w,
|
|
201
|
+
* radius-sm, text/secondary, text/accent, type/body-compact-size
|
|
202
|
+
*/
|
|
203
|
+
export declare const CitedExcerpt: default_2.ForwardRefExoticComponent<CitedExcerptProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
204
|
+
|
|
205
|
+
export declare interface CitedExcerptProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
206
|
+
/** 1-based citation index */
|
|
207
|
+
index: number;
|
|
208
|
+
/** Short excerpt from the source document */
|
|
209
|
+
excerpt: string;
|
|
210
|
+
/** Source document title */
|
|
211
|
+
sourceTitle: string;
|
|
212
|
+
/** Called when the source link is clicked */
|
|
213
|
+
onSourceClick?: () => void;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export declare interface ComparisonRow {
|
|
217
|
+
label: string;
|
|
218
|
+
competitor: string;
|
|
219
|
+
pcoi: string;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* PCOI Comparison Table
|
|
224
|
+
* Semantic <table> with 3 columns: label | competitor | PCOI (highlighted)
|
|
225
|
+
* Tokens: radius-md, border/default, bg/alt, surface/accent-dim, text/accent
|
|
226
|
+
*/
|
|
227
|
+
export declare const ComparisonTable: default_2.ForwardRefExoticComponent<ComparisonTableProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
228
|
+
|
|
229
|
+
export declare interface ComparisonTableProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
230
|
+
competitorName?: string;
|
|
231
|
+
pcoiName?: string;
|
|
232
|
+
rows: ComparisonRow[];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* PCOI Contact Form
|
|
237
|
+
* Composes: FormField (atom), Button (atom)
|
|
238
|
+
* Tokens: bg/surface, border/default, radius-lg, spacing-40 (padding), spacing-20 (gap)
|
|
239
|
+
*/
|
|
240
|
+
export declare const ContactForm: default_2.ForwardRefExoticComponent<ContactFormProps & default_2.RefAttributes<HTMLFormElement>>;
|
|
241
|
+
|
|
242
|
+
export declare interface ContactFormProps extends default_2.FormHTMLAttributes<HTMLFormElement> {
|
|
243
|
+
onSubmit?: (data: Record<string, string>) => void;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* PCOI DataTable — Presentational data table for dashboards
|
|
248
|
+
* Tokens: bg/card-hover, border/default, text/primary, text/secondary,
|
|
249
|
+
* font-size/caption/body-default, spacing-12/16
|
|
250
|
+
*/
|
|
251
|
+
export declare const DataTable: default_2.ForwardRefExoticComponent<DataTableProps<Record<string, unknown>> & default_2.RefAttributes<HTMLDivElement>>;
|
|
252
|
+
|
|
253
|
+
export declare interface DataTableColumn<T = Record<string, unknown>> {
|
|
254
|
+
/** Unique key matching a property on the row data */
|
|
255
|
+
key: string;
|
|
256
|
+
/** Column header text */
|
|
257
|
+
header: string;
|
|
258
|
+
/** Text alignment (default: "left") */
|
|
259
|
+
align?: "left" | "center" | "right";
|
|
260
|
+
/** Custom cell renderer */
|
|
261
|
+
render?: (value: unknown, row: T) => default_2.ReactNode;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export declare interface DataTableProps<T = Record<string, unknown>> extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
265
|
+
/** Column definitions */
|
|
266
|
+
columns: DataTableColumn<T>[];
|
|
267
|
+
/** Row data */
|
|
268
|
+
rows: T[];
|
|
269
|
+
/** Key extractor for row identity */
|
|
270
|
+
rowKey?: keyof T | ((row: T, index: number) => string);
|
|
271
|
+
/** Empty state message */
|
|
272
|
+
emptyText?: string;
|
|
273
|
+
/** Accessible label for the table (describes its content for screen readers) */
|
|
274
|
+
ariaLabel?: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* PCOI DocumentOverlay — Wide modal for viewing source documents with highlighted citations
|
|
279
|
+
* Composes Modal (size="wide") + Badge
|
|
280
|
+
* Tokens: surface/highlight, border/accent-subtle, container/document
|
|
281
|
+
*/
|
|
282
|
+
export declare const DocumentOverlay: default_2.ForwardRefExoticComponent<DocumentOverlayProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
283
|
+
|
|
284
|
+
export declare interface DocumentOverlayProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
285
|
+
/** Whether the overlay is visible */
|
|
286
|
+
open: boolean;
|
|
287
|
+
/** Called when the overlay should close */
|
|
288
|
+
onClose: () => void;
|
|
289
|
+
/** Document title shown in the header */
|
|
290
|
+
title: string;
|
|
291
|
+
/** Optional source label shown as a badge */
|
|
292
|
+
sourceLabel?: string;
|
|
293
|
+
/** Document body content */
|
|
294
|
+
children: default_2.ReactNode;
|
|
295
|
+
/** Element ID to scroll to and highlight on open */
|
|
296
|
+
highlightId?: string;
|
|
297
|
+
/** Citation index to display beside the highlighted element */
|
|
298
|
+
highlightIndex?: number;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* PCOI Footer
|
|
303
|
+
* Tokens: border/default, spacing-60/40/24, text/secondary, text/muted
|
|
304
|
+
*/
|
|
305
|
+
export declare const Footer: default_2.ForwardRefExoticComponent<FooterProps & default_2.RefAttributes<HTMLElement>>;
|
|
306
|
+
|
|
307
|
+
/** @deprecated Use `LinkItem` from `@pcoi/components` instead */
|
|
308
|
+
export declare type FooterLink = LinkItem;
|
|
309
|
+
|
|
310
|
+
export declare interface FooterProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
311
|
+
links?: LinkItem[];
|
|
312
|
+
tagline?: string;
|
|
313
|
+
copyright?: string;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* PCOI FormField — Label + input/textarea atom
|
|
318
|
+
* Tokens: bg/default, border/default, border/error, focus/border, focus/glow,
|
|
319
|
+
* text/primary, text/secondary, text/muted, text/error,
|
|
320
|
+
* radius-sm, spacing-6/12/14, font-size/caption/body-default
|
|
321
|
+
*/
|
|
322
|
+
export declare const FormField: default_2.ForwardRefExoticComponent<FormFieldProps & default_2.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
323
|
+
|
|
324
|
+
export declare interface FormFieldProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>, "size"> {
|
|
325
|
+
/** Visible label text */
|
|
326
|
+
label: string;
|
|
327
|
+
/** Unique field name, also used to generate id */
|
|
328
|
+
name: string;
|
|
329
|
+
/** Render as textarea instead of input */
|
|
330
|
+
multiline?: boolean;
|
|
331
|
+
/** Number of visible text rows when multiline (default 3) */
|
|
332
|
+
rows?: number;
|
|
333
|
+
/** Error message — when truthy, field enters error state */
|
|
334
|
+
error?: string;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/** Semantic heading level for document outline (h1–h6) */
|
|
338
|
+
export declare type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* PCOI How-It-Works Step
|
|
342
|
+
* Tokens: spacing-32 (gap), spacing-40 (padding-y), border/default, radius-full (number circle)
|
|
343
|
+
*/
|
|
344
|
+
export declare const HowStep: default_2.ForwardRefExoticComponent<HowStepProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
345
|
+
|
|
346
|
+
export declare interface HowStepProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
347
|
+
/** Step number displayed in circle (e.g., "01") */
|
|
348
|
+
number: string;
|
|
349
|
+
/** Step title */
|
|
350
|
+
title: string;
|
|
351
|
+
/** Step description */
|
|
352
|
+
description: string;
|
|
353
|
+
/** Whether this is the last step (no bottom border) */
|
|
354
|
+
isLast?: boolean;
|
|
355
|
+
/** Heading level for the title (default: "h3") */
|
|
356
|
+
headingLevel?: HeadingLevel;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/** Navigation link used by Nav, Footer, and any link-list component */
|
|
360
|
+
export declare interface LinkItem {
|
|
361
|
+
label: string;
|
|
362
|
+
href: string;
|
|
363
|
+
/** Optional tracking identifier rendered as data-track-id on the anchor */
|
|
364
|
+
trackingId?: string;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* PCOI Logo Mark — Atom
|
|
369
|
+
*
|
|
370
|
+
* Renders the brand mark: accent-colored "P" + "COI" text wrapped in an anchor.
|
|
371
|
+
* Single-sourced so Nav, Footer, and any future component share one implementation.
|
|
372
|
+
*
|
|
373
|
+
* Tokens consumed:
|
|
374
|
+
* - font-family/sans, font-size/logo, letterSpacing/logo
|
|
375
|
+
* - text/primary, text/accent
|
|
376
|
+
*/
|
|
377
|
+
export declare const LogoMark: default_2.ForwardRefExoticComponent<LogoMarkProps & default_2.RefAttributes<HTMLAnchorElement>>;
|
|
378
|
+
|
|
379
|
+
export declare interface LogoMarkProps extends default_2.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* PCOI Modal — Dialog overlay with focus trap
|
|
384
|
+
* Tokens: bg/overlay, surface/elevated, border/default, shadow/elevated,
|
|
385
|
+
* zIndex/modal, radius-lg, text/primary, text/secondary
|
|
386
|
+
*/
|
|
387
|
+
export declare const Modal: default_2.FC<ModalProps>;
|
|
388
|
+
|
|
389
|
+
export declare interface ModalProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
390
|
+
/** Whether the modal is visible */
|
|
391
|
+
open: boolean;
|
|
392
|
+
/** Called when the modal should close */
|
|
393
|
+
onClose: () => void;
|
|
394
|
+
/** Modal title */
|
|
395
|
+
title?: string;
|
|
396
|
+
/** Heading level for the title (default: "h2") */
|
|
397
|
+
headingLevel?: HeadingLevel;
|
|
398
|
+
/** Dialog width: "default" (520px) or "wide" (900px) */
|
|
399
|
+
size?: "default" | "wide";
|
|
400
|
+
/** Modal body content */
|
|
401
|
+
children: default_2.ReactNode;
|
|
402
|
+
/** Footer content (e.g. action buttons) */
|
|
403
|
+
footer?: default_2.ReactNode;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* PCOI Navigation Bar
|
|
408
|
+
*
|
|
409
|
+
* Fixed navbar with scroll-triggered backdrop, responsive hamburger menu.
|
|
410
|
+
* Tokens: bg/nav-scrolled, blur/nav-backdrop, border/nav, spacing-72 (height)
|
|
411
|
+
*/
|
|
412
|
+
export declare const Nav: default_2.ForwardRefExoticComponent<NavProps & default_2.RefAttributes<HTMLElement>>;
|
|
413
|
+
|
|
414
|
+
/** @deprecated Use `LinkItem` from `@pcoi/components` instead */
|
|
415
|
+
export declare type NavLink = LinkItem;
|
|
416
|
+
|
|
417
|
+
export declare interface NavProps extends default_2.HTMLAttributes<HTMLElement> {
|
|
418
|
+
links?: LinkItem[];
|
|
419
|
+
ctaLabel?: string;
|
|
420
|
+
ctaHref?: string;
|
|
421
|
+
onCtaClick?: () => void;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/** Option item used by Select, RadioGroup */
|
|
425
|
+
export declare interface OptionItem {
|
|
426
|
+
label: string;
|
|
427
|
+
value: string;
|
|
428
|
+
disabled?: boolean;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* PCOI Panel — Dashboard section container with optional header
|
|
433
|
+
* Tokens: bg/card, border/default, radius-md, spacing-16/24, text/primary
|
|
434
|
+
*/
|
|
435
|
+
export declare const Panel: default_2.ForwardRefExoticComponent<PanelProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
436
|
+
|
|
437
|
+
export declare interface PanelProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
438
|
+
/** Panel title rendered in a header bar */
|
|
439
|
+
title?: string;
|
|
440
|
+
/** Heading level for the title (default: "h3") */
|
|
441
|
+
headingLevel?: HeadingLevel;
|
|
442
|
+
/** Action slot in the header (e.g. a Button or filter) */
|
|
443
|
+
action?: default_2.ReactNode;
|
|
444
|
+
/** Panel body content */
|
|
445
|
+
children: default_2.ReactNode;
|
|
446
|
+
/** Remove default body padding (for tables/charts that need edge-to-edge content) */
|
|
447
|
+
flush?: boolean;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* PCOI PromptBar — Textarea + send button for chat input
|
|
452
|
+
* Tokens: bg/card, border/default, focus-border, radius-md,
|
|
453
|
+
* text/primary, text/muted, transition-fast
|
|
454
|
+
*/
|
|
455
|
+
export declare const PromptBar: default_2.ForwardRefExoticComponent<PromptBarProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
456
|
+
|
|
457
|
+
export declare interface PromptBarProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
458
|
+
/** Current textarea value */
|
|
459
|
+
value: string;
|
|
460
|
+
/** Called when the textarea value changes */
|
|
461
|
+
onChange: (value: string) => void;
|
|
462
|
+
/** Called when the user submits (Enter or send button) */
|
|
463
|
+
onSubmit: (value: string) => void;
|
|
464
|
+
/** Placeholder text */
|
|
465
|
+
placeholder?: string;
|
|
466
|
+
/** Disable input and send */
|
|
467
|
+
disabled?: boolean;
|
|
468
|
+
/** Show loading state on send button */
|
|
469
|
+
loading?: boolean;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* PCOI RadioGroup — Accessible radio button group using fieldset/legend
|
|
474
|
+
* Tokens: bg/default, border/default, border/error, focus/border, focus/glow,
|
|
475
|
+
* action/primary-bg, text/primary, text/secondary, text/error, radius-full
|
|
476
|
+
*/
|
|
477
|
+
export declare const RadioGroup: default_2.ForwardRefExoticComponent<RadioGroupProps & default_2.RefAttributes<HTMLFieldSetElement>>;
|
|
478
|
+
|
|
479
|
+
export declare interface RadioGroupProps extends Omit<default_2.FieldsetHTMLAttributes<HTMLFieldSetElement>, "onChange"> {
|
|
480
|
+
/** Group label rendered as a fieldset legend */
|
|
481
|
+
label: string;
|
|
482
|
+
/** Shared name for all radio inputs */
|
|
483
|
+
name: string;
|
|
484
|
+
/** List of radio options */
|
|
485
|
+
options: OptionItem[];
|
|
486
|
+
/** Pre-selected value */
|
|
487
|
+
defaultValue?: string;
|
|
488
|
+
/** Error message — when truthy, group enters error state */
|
|
489
|
+
error?: string;
|
|
490
|
+
/** Marks the group as required */
|
|
491
|
+
required?: boolean;
|
|
492
|
+
/** Disables all radio inputs */
|
|
493
|
+
disabled?: boolean;
|
|
494
|
+
/** Called with the selected value when it changes */
|
|
495
|
+
onChange?: (value: string) => void;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* PCOI Section Header
|
|
500
|
+
*
|
|
501
|
+
* Centered header pattern used across all major sections.
|
|
502
|
+
* Label + H2 + optional description, max-width 800px.
|
|
503
|
+
*
|
|
504
|
+
* Tokens consumed:
|
|
505
|
+
* - text/accent (label), text/primary (h2), text/secondary (desc)
|
|
506
|
+
* - font-mono (label), font-sans (h2, desc)
|
|
507
|
+
* - spacing-16 (label mb, h2 mb), spacing-64 (section mb)
|
|
508
|
+
* - container-narrow (800px max-width)
|
|
509
|
+
*/
|
|
510
|
+
export declare const SectionHeader: default_2.ForwardRefExoticComponent<SectionHeaderProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
511
|
+
|
|
512
|
+
export declare interface SectionHeaderProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
513
|
+
/** Section label (mono, uppercase, accent) e.g. "The Problem" */
|
|
514
|
+
label: string;
|
|
515
|
+
/** Main heading */
|
|
516
|
+
title: string;
|
|
517
|
+
/** Emphasized portion of title (renders in accent color) */
|
|
518
|
+
titleEmphasis?: string;
|
|
519
|
+
/** Optional subtitle/description */
|
|
520
|
+
description?: string;
|
|
521
|
+
/** Heading level for the title (default: "h2") */
|
|
522
|
+
headingLevel?: HeadingLevel;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* PCOI Select — Native dropdown with custom styling
|
|
527
|
+
* Tokens: bg/default, border/default, border/error, focus/border, focus/glow,
|
|
528
|
+
* text/primary, text/secondary, text/muted, text/error, radius-sm
|
|
529
|
+
*/
|
|
530
|
+
export declare const Select: default_2.ForwardRefExoticComponent<SelectProps & default_2.RefAttributes<HTMLSelectElement>>;
|
|
531
|
+
|
|
532
|
+
export declare interface SelectProps extends Omit<default_2.SelectHTMLAttributes<HTMLSelectElement>, "size"> {
|
|
533
|
+
/** Visible label text */
|
|
534
|
+
label: string;
|
|
535
|
+
/** Unique field name, also used to generate id */
|
|
536
|
+
name: string;
|
|
537
|
+
/** List of options */
|
|
538
|
+
options: OptionItem[];
|
|
539
|
+
/** Placeholder text shown as first disabled option */
|
|
540
|
+
placeholder?: string;
|
|
541
|
+
/** Error message — when truthy, field enters error state */
|
|
542
|
+
error?: string;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* PCOI Signals Panel — "You'll know this is for you if:" section
|
|
547
|
+
* Tokens: bg/surface, border/default, radius-md, spacing-40/48, text/accent
|
|
548
|
+
*/
|
|
549
|
+
export declare const SignalsPanel: default_2.ForwardRefExoticComponent<SignalsPanelProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
550
|
+
|
|
551
|
+
export declare interface SignalsPanelProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
552
|
+
title?: string;
|
|
553
|
+
signals: string[];
|
|
554
|
+
/** Heading level for the title (default: "h3") */
|
|
555
|
+
headingLevel?: HeadingLevel;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/** Suggestion prompt for the chat empty state */
|
|
559
|
+
export declare interface Suggestion {
|
|
560
|
+
/** Unique identifier */
|
|
561
|
+
id: string;
|
|
562
|
+
/** Display text */
|
|
563
|
+
label: string;
|
|
564
|
+
/** Optional icon rendered before the label */
|
|
565
|
+
icon?: React.ReactNode;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* PCOI SuggestionCard — Clickable FAQ card for chat empty state
|
|
570
|
+
* Tokens: bg/card, bg/card-hover, border/card, border/card-hover,
|
|
571
|
+
* text/secondary, text/accent, radius-md, transition-medium,
|
|
572
|
+
* transform/hover-lift-sm, transform/press-scale, shadow/focus-ring
|
|
573
|
+
*/
|
|
574
|
+
export declare const SuggestionCard: default_2.ForwardRefExoticComponent<SuggestionCardProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
575
|
+
|
|
576
|
+
export declare interface SuggestionCardProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
577
|
+
/** Display text */
|
|
578
|
+
label: string;
|
|
579
|
+
/** Optional icon rendered before the label */
|
|
580
|
+
icon?: default_2.ReactNode;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* PCOI SuggestionCards — 3-column grid of suggestion cards for chat empty state
|
|
585
|
+
* Tokens: spacing-16 (gap), grid/suggestions
|
|
586
|
+
*/
|
|
587
|
+
export declare const SuggestionCards: default_2.ForwardRefExoticComponent<SuggestionCardsProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
588
|
+
|
|
589
|
+
export declare interface SuggestionCardsProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
590
|
+
/** Array of suggestion prompts */
|
|
591
|
+
suggestions: Suggestion[];
|
|
592
|
+
/** Called when a suggestion card is clicked */
|
|
593
|
+
onSelect: (suggestion: Suggestion) => void;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* PCOI Toast — Non-blocking notification
|
|
598
|
+
* Tokens: surface/elevated, border/success|error|warning|info,
|
|
599
|
+
* text/primary, text/success|error|warning|info,
|
|
600
|
+
* shadow/elevated, zIndex/toast, radius-md
|
|
601
|
+
*/
|
|
602
|
+
export declare const Toast: default_2.FC<ToastProps>;
|
|
603
|
+
|
|
604
|
+
export declare interface ToastProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
605
|
+
/** Toast message */
|
|
606
|
+
message: string;
|
|
607
|
+
/** Visual variant determining color */
|
|
608
|
+
variant?: ToastVariant;
|
|
609
|
+
/** Whether the toast is visible */
|
|
610
|
+
open: boolean;
|
|
611
|
+
/** Called when the toast should dismiss */
|
|
612
|
+
onClose?: () => void;
|
|
613
|
+
/** Auto-dismiss duration in ms (default 5000, 0 = no auto-dismiss) */
|
|
614
|
+
duration?: number;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export declare type ToastVariant = "success" | "error" | "warning" | "info";
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* PCOI Toggle — Switch-style boolean control
|
|
621
|
+
* Tokens: action/toggle-bg, action/toggle-bg-on, action/toggle-thumb,
|
|
622
|
+
* focus/border, focus/glow, text/primary, text/error, radius-full
|
|
623
|
+
*/
|
|
624
|
+
export declare const Toggle: default_2.ForwardRefExoticComponent<ToggleProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
625
|
+
|
|
626
|
+
export declare interface ToggleProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
627
|
+
/** Visible label text */
|
|
628
|
+
label: string;
|
|
629
|
+
/** Unique field name, also used to generate id */
|
|
630
|
+
name: string;
|
|
631
|
+
/** Error message — when truthy, field enters error state */
|
|
632
|
+
error?: string;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Standard data-track-* attributes for analytics integration.
|
|
637
|
+
* Supported on all components via HTML attribute pass-through.
|
|
638
|
+
* Exported for documentation and IDE discoverability.
|
|
639
|
+
*
|
|
640
|
+
* @example
|
|
641
|
+
* <Button data-track-id="hero-cta" data-track-action="click" data-track-category="engagement">
|
|
642
|
+
* Get Started
|
|
643
|
+
* </Button>
|
|
644
|
+
*/
|
|
645
|
+
export declare interface TrackingProps {
|
|
646
|
+
/** Unique identifier for the tracked element */
|
|
647
|
+
"data-track-id"?: string;
|
|
648
|
+
/** Action type (e.g. "click", "submit", "view", "toggle") */
|
|
649
|
+
"data-track-action"?: string;
|
|
650
|
+
/** Category grouping (e.g. "navigation", "form", "engagement") */
|
|
651
|
+
"data-track-category"?: string;
|
|
652
|
+
/** Human-readable label for analytics dashboards */
|
|
653
|
+
"data-track-label"?: string;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* PCOI TypingIndicator — Three bouncing dots indicating the assistant is composing a response
|
|
658
|
+
* Tokens: bg/card, border/card, radius-md, text/accent
|
|
659
|
+
*/
|
|
660
|
+
export declare const TypingIndicator: default_2.ForwardRefExoticComponent<TypingIndicatorProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
661
|
+
|
|
662
|
+
export declare interface TypingIndicatorProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
663
|
+
/** Label shown in the badge (default: "PCOI") */
|
|
664
|
+
label?: string;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
export { }
|