@brainfish-ai/components 0.18.4-alpha.5 → 0.18.4-alpha.7
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/README.md +253 -0
- package/dist/alert-dialog.d.ts +2 -2
- package/dist/alert.d.ts +1 -0
- package/dist/badge.d.ts +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/chart-radial-stacked.d.ts +9 -1
- package/dist/confirm-dialog.d.ts +1 -1
- package/dist/convos.d.ts +12 -17
- package/dist/div-button.d.ts +1 -1
- package/dist/esm/chunks/{ChatSearch.DheHGnl7.js → ChatSearch.BJtS7ZMs.js} +2 -2
- package/dist/esm/chunks/{ChatSearch.DheHGnl7.js.map → ChatSearch.BJtS7ZMs.js.map} +1 -1
- package/dist/esm/chunks/dark.Cl9Z44CU.js +17 -0
- package/dist/esm/chunks/dark.Cl9Z44CU.js.map +1 -0
- package/dist/esm/chunks/{feedback.DkdQ_9Xt.js → feedback.D139-1Wr.js} +52 -3
- package/dist/esm/chunks/feedback.D139-1Wr.js.map +1 -0
- package/dist/esm/chunks/logo.BXk28Fqo.js +181 -0
- package/dist/esm/chunks/logo.BXk28Fqo.js.map +1 -0
- package/dist/esm/chunks/primary.CtiRZbqq.js +18 -0
- package/dist/esm/chunks/primary.CtiRZbqq.js.map +1 -0
- package/dist/esm/chunks/trend-value.COSukPwk.js +51 -0
- package/dist/esm/chunks/trend-value.COSukPwk.js.map +1 -0
- package/dist/esm/colors.js +8 -36
- package/dist/esm/colors.js.map +1 -1
- package/dist/esm/components/chart-area-linear.js +1 -1
- package/dist/esm/components/chart-area-linear.js.map +1 -1
- package/dist/esm/components/chart-radial-stacked.js +14 -24
- package/dist/esm/components/chart-radial-stacked.js.map +1 -1
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/convos.js +125 -46
- package/dist/esm/components/convos.js.map +1 -1
- package/dist/esm/components/feedback.js +1 -1
- package/dist/esm/components/logo.js +2 -0
- package/dist/esm/components/logo.js.map +1 -0
- package/dist/esm/components/metric-card.js +6 -39
- package/dist/esm/components/metric-card.js.map +1 -1
- package/dist/esm/components/trend-value.js +2 -0
- package/dist/esm/components/trend-value.js.map +1 -0
- package/dist/esm/components/ui/accordion.js +2 -2
- package/dist/esm/components/ui/accordion.js.map +1 -1
- package/dist/esm/components/ui/alert.js +10 -5
- package/dist/esm/components/ui/alert.js.map +1 -1
- package/dist/esm/components/ui/badge.js +2 -1
- package/dist/esm/components/ui/badge.js.map +1 -1
- package/dist/esm/components/ui/button.js +2 -1
- package/dist/esm/components/ui/button.js.map +1 -1
- package/dist/esm/components/ui/card.js +1 -1
- package/dist/esm/components/ui/card.js.map +1 -1
- package/dist/esm/components/ui/div-button.js +4 -2
- package/dist/esm/components/ui/div-button.js.map +1 -1
- package/dist/esm/global.css +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +33 -5
- package/dist/logo.d.ts +14 -0
- package/dist/metric-card.d.ts +1 -1
- package/dist/stats.html +1 -1
- package/dist/trend-value.d.ts +19 -0
- package/package.json +1 -1
- package/dist/esm/chunks/feedback.DkdQ_9Xt.js.map +0 -1
- package/dist/esm/chunks/love.o_d3F-ZG.js +0 -56
- package/dist/esm/chunks/love.o_d3F-ZG.js.map +0 -1
package/README.md
CHANGED
|
@@ -110,6 +110,259 @@ Build the library with individual component exports:
|
|
|
110
110
|
yarn build:components
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Development Guide
|
|
116
|
+
|
|
117
|
+
This section explains the architecture and patterns used in this component library to help new developers get started quickly.
|
|
118
|
+
|
|
119
|
+
### Color System
|
|
120
|
+
|
|
121
|
+
Our color system is built on CSS custom properties (variables) defined in `src/global.css`. All variables use the `--bfc-` prefix (Brainfish Components).
|
|
122
|
+
|
|
123
|
+
#### Color Token Scale
|
|
124
|
+
|
|
125
|
+
Colors follow a 100-1000 scale where lower numbers are lighter and higher numbers are darker:
|
|
126
|
+
|
|
127
|
+
```css
|
|
128
|
+
--bfc-v2-color-blue-100: #e9f2fe; /* lightest */
|
|
129
|
+
--bfc-v2-color-blue-500: #4688ec; /* mid-tone */
|
|
130
|
+
--bfc-v2-color-blue-1000: #1c2b42; /* darkest */
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
#### Available Color Palettes
|
|
134
|
+
|
|
135
|
+
| Palette | CSS Variable Pattern |
|
|
136
|
+
|-----------|-----------------------------------|
|
|
137
|
+
| Mono | `--bfc-v2-color-mono-{100-1000}` |
|
|
138
|
+
| Red | `--bfc-v2-color-red-{100-1000}` |
|
|
139
|
+
| Orange | `--bfc-v2-color-orange-{100-1000}`|
|
|
140
|
+
| Yellow | `--bfc-v2-color-yellow-{100-1000}`|
|
|
141
|
+
| Lime | `--bfc-v2-color-lime-{100-1000}` |
|
|
142
|
+
| Green | `--bfc-v2-color-green-{100-1000}` |
|
|
143
|
+
| Blue | `--bfc-v2-color-blue-{100-1000}` |
|
|
144
|
+
| Teal | `--bfc-v2-color-teal-{100-1000}` |
|
|
145
|
+
| Purple | `--bfc-v2-color-purple-{100-1000}`|
|
|
146
|
+
| Magenta | `--bfc-v2-color-magenta-{100-1000}`|
|
|
147
|
+
|
|
148
|
+
#### Semantic Color Tokens
|
|
149
|
+
|
|
150
|
+
Instead of using raw color values, use semantic tokens that adapt to themes:
|
|
151
|
+
|
|
152
|
+
| Token | Purpose |
|
|
153
|
+
|--------------------------|--------------------------------|
|
|
154
|
+
| `--bfc-primary` | Primary brand color |
|
|
155
|
+
| `--bfc-background` | Page background |
|
|
156
|
+
| `--bfc-foreground` | Primary text color |
|
|
157
|
+
| `--bfc-muted` | Subdued backgrounds |
|
|
158
|
+
| `--bfc-muted-foreground` | Subdued text |
|
|
159
|
+
| `--bfc-border` | Border color |
|
|
160
|
+
| `--bfc-destructive-bg` | Error/danger backgrounds |
|
|
161
|
+
| `--bfc-success-bg` | Success state backgrounds |
|
|
162
|
+
|
|
163
|
+
#### Dark Mode
|
|
164
|
+
|
|
165
|
+
Dark mode is activated by adding the `.dark` class to the <html> element. The color scale is automatically inverted (100 becomes the darkest, 1000 becomes the lightest), ensuring consistent contrast in both themes.
|
|
166
|
+
|
|
167
|
+
```html
|
|
168
|
+
<!-- Light mode (default) -->
|
|
169
|
+
<html>...</html>
|
|
170
|
+
|
|
171
|
+
<!-- Dark mode -->
|
|
172
|
+
<html class="dark">...</html>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Tailwind CSS Integration
|
|
176
|
+
|
|
177
|
+
We use Tailwind CSS with a custom preset that maps our color system to Tailwind utilities.
|
|
178
|
+
|
|
179
|
+
#### Using the Tailwind Preset
|
|
180
|
+
|
|
181
|
+
Consumers of this library can import our Tailwind preset to use the same design tokens:
|
|
182
|
+
|
|
183
|
+
```js
|
|
184
|
+
// tailwind.config.js
|
|
185
|
+
module.exports = {
|
|
186
|
+
presets: [require('@brainfish-ai/components/tailwind')],
|
|
187
|
+
// ... your config
|
|
188
|
+
};
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### Semantic Color Classes
|
|
192
|
+
|
|
193
|
+
Use semantic Tailwind classes instead of raw colors:
|
|
194
|
+
|
|
195
|
+
```tsx
|
|
196
|
+
// Good - uses semantic colors that adapt to themes
|
|
197
|
+
<div className="bg-primary text-foreground border-border" />
|
|
198
|
+
<div className="bg-destructive text-destructive" />
|
|
199
|
+
<div className="bg-muted text-muted-foreground" />
|
|
200
|
+
|
|
201
|
+
// Bad - hardcoded colors won't adapt to dark mode
|
|
202
|
+
<div className="bg-[#a3e635] text-[#171717]" />
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### Typography Utilities
|
|
206
|
+
|
|
207
|
+
Custom typography classes are available for consistent text styles:
|
|
208
|
+
|
|
209
|
+
| Class | Font Size | Use Case |
|
|
210
|
+
|----------------|-----------|---------------------|
|
|
211
|
+
| `.heading-xxl` | 2rem | Page titles |
|
|
212
|
+
| `.heading-xl` | 1.75rem | Section headers |
|
|
213
|
+
| `.heading-lg` | 1.5rem | Card headers |
|
|
214
|
+
| `.heading-m` | 1.25rem | Subsections |
|
|
215
|
+
| `.heading-sm` | 1rem | Small headers |
|
|
216
|
+
| `.paragraph-lg`| 1rem | Body text |
|
|
217
|
+
| `.paragraph-md`| 0.875rem | Default text |
|
|
218
|
+
| `.paragraph-sm`| 0.75rem | Captions, labels |
|
|
219
|
+
|
|
220
|
+
#### The `cn()` Utility
|
|
221
|
+
|
|
222
|
+
Use `cn()` from `@/lib/utils` to merge Tailwind classes safely:
|
|
223
|
+
|
|
224
|
+
```tsx
|
|
225
|
+
import { cn } from '@/lib/utils';
|
|
226
|
+
|
|
227
|
+
// Merges classes and handles conflicts properly
|
|
228
|
+
<div className={cn('bg-primary p-4', isActive && 'bg-accent', className)} />
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Component Patterns (shadcn/ui)
|
|
232
|
+
|
|
233
|
+
Our UI components follow [shadcn/ui](https://ui.shadcn.com/) patterns and conventions.
|
|
234
|
+
|
|
235
|
+
#### Component Location
|
|
236
|
+
|
|
237
|
+
- Base UI components: `src/components/ui/`
|
|
238
|
+
- Complex/composite components: `src/components/`
|
|
239
|
+
|
|
240
|
+
#### Component Structure
|
|
241
|
+
|
|
242
|
+
Components use `class-variance-authority` (CVA) for variant management:
|
|
243
|
+
|
|
244
|
+
```tsx
|
|
245
|
+
import * as React from 'react';
|
|
246
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
247
|
+
import { cn } from '@/lib/utils';
|
|
248
|
+
|
|
249
|
+
// Define variants with CVA
|
|
250
|
+
const buttonVariants = cva(
|
|
251
|
+
'inline-flex items-center justify-center rounded-md text-sm font-medium',
|
|
252
|
+
{
|
|
253
|
+
variants: {
|
|
254
|
+
variant: {
|
|
255
|
+
default: 'bg-primary text-primary-foreground',
|
|
256
|
+
destructive: 'bg-destructive text-destructive-foreground',
|
|
257
|
+
outline: 'border border-input bg-background',
|
|
258
|
+
},
|
|
259
|
+
size: {
|
|
260
|
+
default: 'h-9 px-4 py-2',
|
|
261
|
+
sm: 'h-8 px-3 text-sm',
|
|
262
|
+
lg: 'h-10 px-8',
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
defaultVariants: {
|
|
266
|
+
variant: 'default',
|
|
267
|
+
size: 'default',
|
|
268
|
+
},
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
|
|
272
|
+
// Component with forwarded ref
|
|
273
|
+
export interface ButtonProps
|
|
274
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
275
|
+
VariantProps<typeof buttonVariants> {}
|
|
276
|
+
|
|
277
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
278
|
+
({ className, variant, size, ...props }, ref) => (
|
|
279
|
+
<button
|
|
280
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
281
|
+
ref={ref}
|
|
282
|
+
{...props}
|
|
283
|
+
/>
|
|
284
|
+
)
|
|
285
|
+
);
|
|
286
|
+
Button.displayName = 'Button';
|
|
287
|
+
|
|
288
|
+
export { Button, buttonVariants };
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
#### Key Conventions
|
|
292
|
+
|
|
293
|
+
1. **Always use semantic colors** - Never use raw hex values in components
|
|
294
|
+
2. **Forward refs** - All components should forward refs for flexibility
|
|
295
|
+
3. **Use `cn()` for className** - Always merge with incoming className prop
|
|
296
|
+
4. **Export variants** - Export the CVA variants for reuse
|
|
297
|
+
5. **Set displayName** - Always set `displayName` for better debugging
|
|
298
|
+
|
|
299
|
+
### Storybook Requirements
|
|
300
|
+
|
|
301
|
+
**Every component MUST have an accompanying Storybook story file.**
|
|
302
|
+
|
|
303
|
+
#### Why Stories Matter
|
|
304
|
+
|
|
305
|
+
- Enable independent component testing and development
|
|
306
|
+
- Serve as living documentation for the component API
|
|
307
|
+
- Allow visual regression testing
|
|
308
|
+
- Help designers and developers collaborate
|
|
309
|
+
|
|
310
|
+
#### Story File Convention
|
|
311
|
+
|
|
312
|
+
For a component `Button.tsx`, create `Button.stories.tsx` in the same directory:
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
src/components/ui/
|
|
316
|
+
├── button.tsx
|
|
317
|
+
├── button.stories.tsx <-- Required!
|
|
318
|
+
└── button.test.tsx <-- Optional unit tests
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
#### Story Structure
|
|
322
|
+
|
|
323
|
+
```tsx
|
|
324
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
325
|
+
import { Button } from './button';
|
|
326
|
+
|
|
327
|
+
const meta: Meta<typeof Button> = {
|
|
328
|
+
title: 'UI/Button',
|
|
329
|
+
component: Button,
|
|
330
|
+
tags: ['autodocs'],
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
export default meta;
|
|
334
|
+
type Story = StoryObj<typeof Button>;
|
|
335
|
+
|
|
336
|
+
// Show all variants
|
|
337
|
+
export const Default: Story = {
|
|
338
|
+
args: { children: 'Click me' },
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
export const Destructive: Story = {
|
|
342
|
+
args: { variant: 'destructive', children: 'Delete' },
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
export const AllSizes: Story = {
|
|
346
|
+
render: () => (
|
|
347
|
+
<div className="flex gap-4">
|
|
348
|
+
<Button size="sm">Small</Button>
|
|
349
|
+
<Button size="default">Default</Button>
|
|
350
|
+
<Button size="lg">Large</Button>
|
|
351
|
+
</div>
|
|
352
|
+
),
|
|
353
|
+
};
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
#### Running Storybook
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
yarn storybook
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
Then open [http://localhost:6006](http://localhost:6006) in your browser.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
113
366
|
## Linting and Code formating for Typescript
|
|
114
367
|
|
|
115
368
|
Linting and code formating is done via [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/) using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) and
|
package/dist/alert-dialog.d.ts
CHANGED
|
@@ -6,14 +6,14 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
6
6
|
export declare const AlertDialog: React_2.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogProps & React_2.RefAttributes<never>>;
|
|
7
7
|
|
|
8
8
|
export declare const AlertDialogAction: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
-
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | null | undefined;
|
|
9
|
+
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
|
|
10
10
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
|
|
11
11
|
} & ClassProp) | undefined) => string> & {
|
|
12
12
|
asChild?: boolean | undefined;
|
|
13
13
|
} & React_2.RefAttributes<HTMLButtonElement>>;
|
|
14
14
|
|
|
15
15
|
export declare const AlertDialogCancel: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
16
|
-
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | null | undefined;
|
|
16
|
+
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
|
|
17
17
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
|
|
18
18
|
} & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
19
19
|
|
package/dist/alert.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
|
|
5
5
|
export declare const Alert: React_2.ForwardRefExoticComponent<Omit<React_2.ClassAttributes<HTMLDivElement> & React_2.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
6
|
variant?: "default" | "success" | "warning" | "danger" | "info" | null | undefined;
|
|
7
|
+
layout?: "compact" | "longForm" | null | undefined;
|
|
7
8
|
} & ClassProp) | undefined) => string>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
8
9
|
|
|
9
10
|
export declare const AlertAction: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
package/dist/badge.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElemen
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export declare const badgeVariants: (props?: ({
|
|
11
|
-
variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
11
|
+
variant?: "default" | "disabled" | "destructive" | "success" | "warning" | null | undefined;
|
|
12
12
|
} & ClassProp) | undefined) => string;
|
|
13
13
|
|
|
14
14
|
export { }
|
package/dist/button.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLBu
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export declare const buttonVariants: (props?: ({
|
|
12
|
-
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | null | undefined;
|
|
12
|
+
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
|
|
13
13
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
|
|
14
14
|
} & ClassProp) | undefined) => string;
|
|
15
15
|
|
|
@@ -14,12 +14,14 @@ declare type ChartConfig = {
|
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export declare function ChartRadialStacked({ title, data, chartConfig, className }: ChartRadialStackedProps): default_2.JSX.Element | null;
|
|
17
|
+
export declare function ChartRadialStacked({ title, data, chartConfig, trend, trendValue, className, }: ChartRadialStackedProps): default_2.JSX.Element | null;
|
|
18
18
|
|
|
19
19
|
export declare interface ChartRadialStackedProps {
|
|
20
20
|
title: string;
|
|
21
21
|
data: Record<string, number>[];
|
|
22
22
|
chartConfig: ChartConfig;
|
|
23
|
+
trend: Trend;
|
|
24
|
+
trendValue: string;
|
|
23
25
|
className?: string;
|
|
24
26
|
}
|
|
25
27
|
|
|
@@ -28,4 +30,10 @@ declare const THEMES: {
|
|
|
28
30
|
readonly dark: ".dark";
|
|
29
31
|
};
|
|
30
32
|
|
|
33
|
+
declare enum Trend {
|
|
34
|
+
UP = "up",
|
|
35
|
+
DOWN = "down",
|
|
36
|
+
FLAT = "flat"
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
export { }
|
package/dist/confirm-dialog.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as React_2 from 'react';
|
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
|
|
7
7
|
declare const AlertDialogAction: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
8
|
-
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | null | undefined;
|
|
8
|
+
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
|
|
9
9
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
|
|
10
10
|
} & ClassProp) | undefined) => string> & {
|
|
11
11
|
asChild?: boolean | undefined;
|
package/dist/convos.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
-
import {
|
|
2
|
+
import { BadgeProps } from '../ui/badge';
|
|
3
3
|
import { default as default_2 } from 'react';
|
|
4
4
|
import * as React_2 from 'react';
|
|
5
|
-
import { VariantProps } from 'class-variance-authority';
|
|
6
5
|
|
|
7
6
|
declare function AccordionItem({ className, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Item>): React_2.JSX.Element;
|
|
8
7
|
|
|
@@ -30,19 +29,12 @@ declare type AnswerDiagnostics = {
|
|
|
30
29
|
|
|
31
30
|
declare type AnswerGenerationType = 'Direct Extraction' | 'Summarization' | 'Inference' | 'Combination' | 'Cannot Answer';
|
|
32
31
|
|
|
33
|
-
declare function Badge({ className, variant, ...props }: BadgeProps): React_2.JSX.Element;
|
|
34
|
-
|
|
35
|
-
declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
declare const badgeVariants: (props?: ({
|
|
39
|
-
variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
40
|
-
} & ClassProp) | undefined) => string;
|
|
41
|
-
|
|
42
32
|
declare interface BaseMessage {
|
|
43
33
|
id: string;
|
|
44
34
|
timestamp: Date;
|
|
45
35
|
locale?: string;
|
|
36
|
+
isFeedbackDialogOpen?: boolean;
|
|
37
|
+
onFeedbackDialogChange?: (isOpen: boolean) => void;
|
|
46
38
|
}
|
|
47
39
|
|
|
48
40
|
declare type ContextSufficiency = 'Sufficient' | 'Partially Sufficient' | 'Insufficient';
|
|
@@ -137,7 +129,7 @@ declare interface Props {
|
|
|
137
129
|
question: string;
|
|
138
130
|
timestamp: Date;
|
|
139
131
|
location?: string;
|
|
140
|
-
source?:
|
|
132
|
+
source?: Source;
|
|
141
133
|
status?: default_2.ComponentProps<typeof StatusBadge>['variant'];
|
|
142
134
|
statusMessage?: string;
|
|
143
135
|
hasAttributes?: boolean;
|
|
@@ -145,10 +137,6 @@ declare interface Props {
|
|
|
145
137
|
score?: number;
|
|
146
138
|
}
|
|
147
139
|
|
|
148
|
-
declare type Props_2 = default_2.ComponentPropsWithRef<typeof Badge> & {
|
|
149
|
-
suffix?: default_2.ReactNode;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
140
|
declare type QueryContextRelevance = 'High' | 'Medium' | 'Low';
|
|
153
141
|
|
|
154
142
|
export declare interface RelatedArticle {
|
|
@@ -158,7 +146,14 @@ export declare interface RelatedArticle {
|
|
|
158
146
|
score: number;
|
|
159
147
|
}
|
|
160
148
|
|
|
161
|
-
|
|
149
|
+
declare interface Source {
|
|
150
|
+
name: string;
|
|
151
|
+
color?: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export declare const StatusBadge: default_2.ForwardRefExoticComponent<BadgeProps & {
|
|
155
|
+
suffix?: default_2.ReactNode;
|
|
156
|
+
} & default_2.RefAttributes<HTMLDivElement>>;
|
|
162
157
|
|
|
163
158
|
export declare function useConvosContext(): ConvosContextValue;
|
|
164
159
|
|
package/dist/div-button.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare interface DivButtonProps extends React_2.HTMLAttributes<HTMLDivEl
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export declare const divButtonVariants: (props?: ({
|
|
12
|
-
variant?: "link" | "dark" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
12
|
+
variant?: "link" | "dark" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "shadow" | "shadowSurface" | null | undefined;
|
|
13
13
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
14
14
|
} & ClassProp) | undefined) => string;
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ import { useImmerReducer } from 'use-immer';
|
|
|
21
21
|
import { useSearchParam, useEffectOnce } from 'react-use';
|
|
22
22
|
import { MemoizedIcon } from '../components/ui/icon.js';
|
|
23
23
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '../components/ui/collapsible.js';
|
|
24
|
-
import { F as Feedback } from './feedback.
|
|
24
|
+
import { F as Feedback } from './feedback.D139-1Wr.js';
|
|
25
25
|
import { G as GeneratingStar } from './generating-star.CozjECmM.js';
|
|
26
26
|
import { getCountry } from 'countries-and-timezones';
|
|
27
27
|
import { Switch } from '../components/ui/switch.js';
|
|
@@ -6479,4 +6479,4 @@ const ChatSearch = forwardRef(({ featureFlags, ...props }, ref) => /* @__PURE__
|
|
|
6479
6479
|
ChatSearch.displayName = "ChatSearch";
|
|
6480
6480
|
|
|
6481
6481
|
export { ChatSearch as C, ChatSearchProvider as a, useIsChatSearchDirty as b, useChatSearch as u };
|
|
6482
|
-
//# sourceMappingURL=ChatSearch.
|
|
6482
|
+
//# sourceMappingURL=ChatSearch.BJtS7ZMs.js.map
|