@brainfish-ai/components 0.10.0 → 0.12.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/badge.d.ts +14 -0
- package/dist/calendar.d.ts +12 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/icon.d.ts +22 -0
- package/dist/components/ui/progress.d.ts +6 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/esm/chunks/{ChatSearch.C05QyX0s.js → ChatSearch.C-yI2ooj.js} +8 -19
- package/dist/esm/chunks/ChatSearch.C-yI2ooj.js.map +1 -0
- package/dist/esm/chunks/{FormattedMessage.DkFftNx6.js → FormattedMessage.gZ5DiZSo.js} +30 -5
- package/dist/esm/chunks/FormattedMessage.gZ5DiZSo.js.map +1 -0
- package/dist/esm/chunks/{date-picker.Ca8jXimG.js → date-picker.WGre3lsB.js} +3 -23
- package/dist/esm/chunks/date-picker.WGre3lsB.js.map +1 -0
- package/dist/esm/chunks/simpleSelect.Bzw8xrbM.js +23 -0
- package/dist/esm/chunks/simpleSelect.Bzw8xrbM.js.map +1 -0
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/date-picker.js +1 -1
- package/dist/esm/components/markdown.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/ui/badge.js +26 -0
- package/dist/esm/components/ui/badge.js.map +1 -0
- package/dist/esm/components/ui/calendar.js +26 -0
- package/dist/esm/components/ui/calendar.js.map +1 -0
- package/dist/esm/components/ui/icon.js +16 -0
- package/dist/esm/components/ui/icon.js.map +1 -0
- package/dist/esm/components/ui/progress.js +23 -0
- package/dist/esm/components/ui/progress.js.map +1 -0
- package/dist/esm/{chunks/simpleSelect.BiVUOs29.js → components/ui/select.js} +4 -20
- package/dist/esm/components/ui/select.js.map +1 -0
- package/dist/esm/components/ui/table.js +83 -0
- package/dist/esm/components/ui/table.js.map +1 -0
- package/dist/esm/index.js +10 -125
- package/dist/esm/index.js.map +1 -1
- package/dist/icon.d.ts +26 -0
- package/dist/index.d.ts +22 -0
- package/dist/progress.d.ts +8 -0
- package/dist/stats.html +1 -1
- package/dist/table.d.ts +19 -0
- package/package.json +1 -1
- package/dist/esm/chunks/ChatSearch.C05QyX0s.js.map +0 -1
- package/dist/esm/chunks/FormattedMessage.DkFftNx6.js.map +0 -1
- package/dist/esm/chunks/date-picker.Ca8jXimG.js.map +0 -1
- package/dist/esm/chunks/simpleSelect.BiVUOs29.js.map +0 -1
package/dist/badge.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ClassProp } from 'class-variance-authority/dist/types';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
export declare function Badge({ className, variant, ...props }: BadgeProps): React_2.JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare const badgeVariants: (props?: ({
|
|
11
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
12
|
+
} & ClassProp) | undefined) => string;
|
|
13
|
+
|
|
14
|
+
export { }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DayPicker } from 'react-day-picker';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
|
|
4
|
+
export declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): React_2.JSX.Element;
|
|
5
|
+
|
|
6
|
+
export declare namespace Calendar {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare type CalendarProps = React_2.ComponentProps<typeof DayPicker>;
|
|
11
|
+
|
|
12
|
+
export { }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): React.JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DayPicker } from 'react-day-picker';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): React.JSX.Element;
|
|
5
|
+
declare namespace Calendar {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export { Calendar };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IconProps } from '@phosphor-icons/react';
|
|
3
|
+
interface PhosphorIconProps extends IconProps {
|
|
4
|
+
iconName: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* A flexible icon component that supports both Phosphor icons and image-based icons.
|
|
8
|
+
*
|
|
9
|
+
* The component uses dynamic imports to lazy load Phosphor icons, reducing the initial
|
|
10
|
+
* bundle size by only loading icons when they're needed.
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @example
|
|
14
|
+
* // Using a Phosphor icon
|
|
15
|
+
* <Icon iconName="House" size={24} />
|
|
16
|
+
*
|
|
17
|
+
* // Using an image icon
|
|
18
|
+
* <Icon iconPath="/path/to/icon.svg" />
|
|
19
|
+
*/
|
|
20
|
+
declare const PhosphorIcon: React.ForwardRefExoticComponent<Omit<PhosphorIconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
21
|
+
export declare const MemoizedIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<PhosphorIconProps, "ref"> & React.RefAttributes<SVGSVGElement>>>;
|
|
22
|
+
export { PhosphorIcon as Icon };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
3
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
4
|
+
indicatorClassName?: string | undefined;
|
|
5
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Progress };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
8
|
+
appendToBody?: boolean | undefined;
|
|
9
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
3
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
7
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
8
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import React__default, {
|
|
1
|
+
import React__default, { Fragment, useState, useCallback, useMemo, createContext, useContext, useRef, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
2
2
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
3
3
|
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../components/ui/tooltip.js';
|
|
4
4
|
import { Button } from '../components/ui/button.js';
|
|
5
5
|
import { XCircle, Check, Copy, CaretDown, ArrowSquareOut, CaretRight, ArrowsVertical, ArrowDown, MagnifyingGlass, X, CheckCircle, Circle, Image, ArrowRight, ArrowLeft, ArrowsInSimple, ArrowsOutSimple } from '@phosphor-icons/react';
|
|
6
|
+
import { g as getDefaultExportFromCjs, F as FormattedMessage, c as addPopupWidgetUtm } from './FormattedMessage.gZ5DiZSo.js';
|
|
6
7
|
import { appendErrors, useForm, Controller } from 'react-hook-form';
|
|
7
8
|
import { validateFieldsNatively, toNestErrors } from '@hookform/resolvers';
|
|
8
9
|
import require$$0 from 'ajv';
|
|
9
|
-
import { g as getDefaultExportFromCjs, F as FormattedMessage } from './FormattedMessage.DkFftNx6.js';
|
|
10
10
|
import { Input } from '../components/ui/input.js';
|
|
11
11
|
import { Label } from '../components/ui/label.js';
|
|
12
12
|
import { Textarea } from '../components/ui/textarea.js';
|
|
13
|
-
import { S as SimpleSelect } from './simpleSelect.
|
|
13
|
+
import { S as SimpleSelect } from './simpleSelect.Bzw8xrbM.js';
|
|
14
14
|
import { c as cn, i as isAnswerUncertain } from './utils.DmKr1Ojo.js';
|
|
15
|
-
import { D as DatePicker } from './date-picker.
|
|
15
|
+
import { D as DatePicker } from './date-picker.WGre3lsB.js';
|
|
16
16
|
import { createId } from '@paralleldrive/cuid2';
|
|
17
|
+
import { MemoizedIcon } from '../components/ui/icon.js';
|
|
17
18
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '../components/ui/collapsible.js';
|
|
18
19
|
import { F as Feedback } from './feedback.NWn6_mYe.js';
|
|
19
20
|
import { G as GeneratingStar } from './generating-star.C6eGHpse.js';
|
|
@@ -3511,18 +3512,6 @@ const isActionInputFormBlock = (block) => {
|
|
|
3511
3512
|
return block.type === "action-input-form";
|
|
3512
3513
|
};
|
|
3513
3514
|
|
|
3514
|
-
const PhosphorIcon = forwardRef(({ iconName, ...props }, ref) => {
|
|
3515
|
-
const IconComponent = lazy(
|
|
3516
|
-
() => import('@phosphor-icons/react').then((module) => {
|
|
3517
|
-
const icons = module;
|
|
3518
|
-
return { default: icons[iconName] };
|
|
3519
|
-
})
|
|
3520
|
-
);
|
|
3521
|
-
return /* @__PURE__ */ React__default.createElement(Suspense, { fallback: /* @__PURE__ */ React__default.createElement(React__default.Fragment, null) }, /* @__PURE__ */ React__default.createElement(IconComponent, { ...props, ref }));
|
|
3522
|
-
});
|
|
3523
|
-
PhosphorIcon.displayName = "PhosphorIcon";
|
|
3524
|
-
const MemoizedIcon = memo(PhosphorIcon);
|
|
3525
|
-
|
|
3526
3515
|
const MotionButton$1 = motion(Button);
|
|
3527
3516
|
const NextBestActions = ({ nextBestActions, onActionClick }) => {
|
|
3528
3517
|
if (!nextBestActions.length) return null;
|
|
@@ -3567,7 +3556,7 @@ const NextBestActions = ({ nextBestActions, onActionClick }) => {
|
|
|
3567
3556
|
initial: { opacity: 0, x: -20 },
|
|
3568
3557
|
animate: { opacity: 1, x: 0 },
|
|
3569
3558
|
transition: { delay: index * 0.1 },
|
|
3570
|
-
href: action.value,
|
|
3559
|
+
href: addPopupWidgetUtm(action.value),
|
|
3571
3560
|
target: "_blank",
|
|
3572
3561
|
rel: "noopener noreferrer",
|
|
3573
3562
|
className,
|
|
@@ -4574,7 +4563,7 @@ function Answer({
|
|
|
4574
4563
|
"a",
|
|
4575
4564
|
{
|
|
4576
4565
|
key: result.id,
|
|
4577
|
-
href: result.url,
|
|
4566
|
+
href: addPopupWidgetUtm(result.url),
|
|
4578
4567
|
target: "_blank",
|
|
4579
4568
|
rel: "noopener noreferrer",
|
|
4580
4569
|
className: "flex items-center gap-2 p-3 transition-colors duration-200 hover:bg-accent bg-card text-foreground"
|
|
@@ -5972,4 +5961,4 @@ const ChatSearch = forwardRef(({ featureFlags, ...props }, ref) => /* @__PURE__
|
|
|
5972
5961
|
ChatSearch.displayName = "ChatSearch";
|
|
5973
5962
|
|
|
5974
5963
|
export { ChatSearch as C, ChatSearchProvider as a, useIsChatSearchDirty as b, useChatSearch as u };
|
|
5975
|
-
//# sourceMappingURL=ChatSearch.
|
|
5964
|
+
//# sourceMappingURL=ChatSearch.C-yI2ooj.js.map
|