@brainfish-ai/components 0.11.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.
Files changed (39) hide show
  1. package/dist/badge.d.ts +14 -0
  2. package/dist/calendar.d.ts +12 -0
  3. package/dist/components/ui/badge.d.ts +9 -0
  4. package/dist/components/ui/calendar.d.ts +8 -0
  5. package/dist/components/ui/icon.d.ts +22 -0
  6. package/dist/components/ui/progress.d.ts +6 -0
  7. package/dist/components/ui/select.d.ts +13 -0
  8. package/dist/components/ui/table.d.ts +10 -0
  9. package/dist/esm/chunks/{ChatSearch.BAhBvhQb.js → ChatSearch.C-yI2ooj.js} +5 -16
  10. package/dist/esm/chunks/ChatSearch.C-yI2ooj.js.map +1 -0
  11. package/dist/esm/chunks/{date-picker.Ca8jXimG.js → date-picker.WGre3lsB.js} +3 -23
  12. package/dist/esm/chunks/date-picker.WGre3lsB.js.map +1 -0
  13. package/dist/esm/chunks/simpleSelect.Bzw8xrbM.js +23 -0
  14. package/dist/esm/chunks/simpleSelect.Bzw8xrbM.js.map +1 -0
  15. package/dist/esm/components/chat-search.js +1 -1
  16. package/dist/esm/components/date-picker.js +1 -1
  17. package/dist/esm/components/select.js +1 -1
  18. package/dist/esm/components/ui/badge.js +26 -0
  19. package/dist/esm/components/ui/badge.js.map +1 -0
  20. package/dist/esm/components/ui/calendar.js +26 -0
  21. package/dist/esm/components/ui/calendar.js.map +1 -0
  22. package/dist/esm/components/ui/icon.js +16 -0
  23. package/dist/esm/components/ui/icon.js.map +1 -0
  24. package/dist/esm/components/ui/progress.js +23 -0
  25. package/dist/esm/components/ui/progress.js.map +1 -0
  26. package/dist/esm/{chunks/simpleSelect.BiVUOs29.js → components/ui/select.js} +4 -20
  27. package/dist/esm/components/ui/select.js.map +1 -0
  28. package/dist/esm/components/ui/table.js +83 -0
  29. package/dist/esm/components/ui/table.js.map +1 -0
  30. package/dist/esm/index.js +9 -124
  31. package/dist/esm/index.js.map +1 -1
  32. package/dist/icon.d.ts +26 -0
  33. package/dist/progress.d.ts +8 -0
  34. package/dist/stats.html +1 -1
  35. package/dist/table.d.ts +19 -0
  36. package/package.json +1 -1
  37. package/dist/esm/chunks/ChatSearch.BAhBvhQb.js.map +0 -1
  38. package/dist/esm/chunks/date-picker.Ca8jXimG.js.map +0 -1
  39. package/dist/esm/chunks/simpleSelect.BiVUOs29.js.map +0 -1
@@ -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,4 +1,4 @@
1
- import React__default, { memo, forwardRef, lazy, Suspense, Fragment, useState, useCallback, useMemo, createContext, useContext, useRef, useEffect, useImperativeHandle } from 'react';
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';
@@ -10,10 +10,11 @@ import require$$0 from 'ajv';
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.BiVUOs29.js';
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.Ca8jXimG.js';
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;
@@ -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.BAhBvhQb.js.map
5964
+ //# sourceMappingURL=ChatSearch.C-yI2ooj.js.map