@collective-intelligence/ui-react 0.6.0 → 0.7.1

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 (87) hide show
  1. package/README.md +220 -170
  2. package/dist/components/ai-elements/index.d.ts +445 -4
  3. package/dist/components/ai-elements/index.js +3 -1
  4. package/dist/components/icons/index.d.ts +184 -1
  5. package/dist/components/icons/index.js +1 -1
  6. package/dist/components/illustrations/index.js +1 -1
  7. package/dist/components/ui/index.d.ts +293 -235
  8. package/dist/components/ui/index.js +2 -4
  9. package/dist/components/ui-extensions/atoms/ThemeToggle/index.js +1 -1
  10. package/dist/components/ui-extensions/hooks/use-mobile.js +1 -1
  11. package/dist/components/ui-extensions/index.d.ts +36 -21
  12. package/dist/components/ui-extensions/index.js +6 -6
  13. package/dist/components/ui-extensions/molecules/LabeledField/index.d.ts +22 -0
  14. package/dist/components/ui-extensions/molecules/LabeledField/index.js +2 -0
  15. package/dist/components/ui-extensions/molecules/VideoPlayer/index.js +2 -2
  16. package/dist/hooks/index.js +1 -1
  17. package/dist/hooks/operations.js +1 -1
  18. package/dist/hooks/use-debounced-callback.js +1 -1
  19. package/dist/hooks/use-mount-action.js +1 -1
  20. package/dist/index-0dt7qv78.js +2 -0
  21. package/dist/index-33ef93f6.js +2 -0
  22. package/dist/index-410hza8j.js +2 -0
  23. package/dist/index-78w37zqq.js +2 -0
  24. package/dist/{index-9gtg7nt7.js → index-9tdk1jd5.js} +2 -2
  25. package/dist/index-ampejsqd.js +2 -0
  26. package/dist/index-aq49ztmj.js +2 -0
  27. package/dist/index-brb2fssx.js +4 -0
  28. package/dist/index-c4aack9s.js +2 -0
  29. package/dist/index-e0qytqhh.js +2 -0
  30. package/dist/index-eh2w7m4e.js +2 -0
  31. package/dist/index-ftn430ea.js +2 -0
  32. package/dist/{index-6r0znbzv.js → index-fzn1f905.js} +2 -2
  33. package/dist/index-hqx38rgx.js +0 -0
  34. package/dist/{index-4cds99c5.js → index-jmgcfmxe.js} +2 -2
  35. package/dist/index-jzyzapvz.js +2 -0
  36. package/dist/{index-qbwndfn2.js → index-kzykjydw.js} +2 -2
  37. package/dist/{index-zmwpsfzp.js → index-p2yzw0qb.js} +2 -2
  38. package/dist/index-pe89kg1j.js +2 -0
  39. package/dist/index-pkw46hwt.js +2 -0
  40. package/dist/index-q560eskm.js +2 -0
  41. package/dist/{index-rjemhrz1.js → index-r9trsk22.js} +2 -2
  42. package/dist/{index-vx2b9cz3.js → index-shpd3834.js} +2 -2
  43. package/dist/index-t2rwc8rk.js +2 -0
  44. package/dist/index-tb9dhges.js +2 -0
  45. package/dist/{index-9289ppfk.js → index-w3zn83g3.js} +2 -2
  46. package/dist/index-w7hwsck8.js +2 -0
  47. package/dist/index-wnkq9nn0.js +2 -0
  48. package/dist/index-xy8a2fr7.js +2 -0
  49. package/dist/index-yaf9t9w5.js +42 -0
  50. package/dist/index-yh7sjgdy.js +2 -0
  51. package/dist/index.js +1 -1
  52. package/dist/resources.js +1 -1
  53. package/dist/shadcn.css +3 -4
  54. package/dist/tokens/theme.js +1 -1
  55. package/dist/utils/cn.js +1 -1
  56. package/package.json +12 -45
  57. package/dist/chat.d.ts +0 -579
  58. package/dist/chat.js +0 -2
  59. package/dist/index-064d20xp.js +0 -2
  60. package/dist/index-0gzm7bb9.js +0 -2
  61. package/dist/index-1hxjsnw5.js +0 -2
  62. package/dist/index-2twj52t7.js +0 -2
  63. package/dist/index-2yf6mq9g.js +0 -2
  64. package/dist/index-64r6cav3.js +0 -1
  65. package/dist/index-7j277075.js +0 -2
  66. package/dist/index-ab3fc47y.js +0 -2
  67. package/dist/index-b1wfq5b8.js +0 -2
  68. package/dist/index-dg126t3v.js +0 -2
  69. package/dist/index-dvvkk1vk.js +0 -2
  70. package/dist/index-ecvn2gnv.js +0 -2
  71. package/dist/index-fnk7gsdd.js +0 -2
  72. package/dist/index-ggr2edm8.js +0 -2
  73. package/dist/index-m0v264jr.js +0 -2
  74. package/dist/index-ngpxevag.js +0 -2
  75. package/dist/index-nxbvv8m4.js +0 -2
  76. package/dist/index-pearjjhb.js +0 -2
  77. package/dist/index-r2snvwyb.js +0 -42
  78. package/dist/index-r5ds1mtq.js +0 -2
  79. package/dist/index-r7hjj3ek.js +0 -2
  80. package/dist/index-rgbg5bsy.js +0 -2
  81. package/dist/index-sd38wa4w.js +0 -2
  82. package/dist/index-t9yq7kfg.js +0 -2
  83. package/dist/index-tcwzyy71.js +0 -2
  84. package/dist/index-vyhk8kgm.js +0 -6
  85. package/dist/index-ykjbsyeq.js +0 -2
  86. package/dist/index-zrw7ne3f.js +0 -2
  87. package/dist/styles.css +0 -2
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import"../../../../index-64r6cav3.js";import"../../../../index-dg126t3v.js";import"../../../../index-r2snvwyb.js";import"../../../../index-ngpxevag.js";import"../../../../index-ggr2edm8.js";import{Qo}from"../../../../index-b1wfq5b8.js";import"../../../../index-9gtg7nt7.js";import"../../../../index-7j277075.js";import"../../../../index-0gzm7bb9.js";export{Qo as default};
2
+ import"../../../../index-410hza8j.js";import"../../../../index-33ef93f6.js";import"../../../../index-t2rwc8rk.js";import{Ss}from"../../../../index-ftn430ea.js";import"../../../../index-9tdk1jd5.js";export{Ss as default};
@@ -1 +1 @@
1
- import{br}from"../../../index-9289ppfk.js";export{br as useIsMobile};
1
+ import{en}from"../../../index-w3zn83g3.js";export{en as useIsMobile};
@@ -1,20 +1,22 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
- import * as PopoverPrimitive from '@radix-ui/react-popover';
5
- import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+ import { Button as ButtonPrimitive } from '@base-ui/react/button';
4
+ import { Menu as MenuPrimitive } from '@base-ui/react/menu';
5
+ import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
6
+ import { Radio as RadioPrimitive } from '@base-ui/react/radio';
7
+ import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';
8
+ import { useRender } from '@base-ui/react/use-render';
6
9
  import { VariantProps } from 'class-variance-authority';
7
10
  import * as React$1 from 'react';
8
11
  import React$1 from 'react';
9
12
  import { ComponentProps, ComponentType, ReactNode } from 'react';
10
13
 
11
14
  declare const buttonVariants: (props?: ({
12
- size?: "default" | "icon" | "lg" | "sm" | null | undefined;
15
+ size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xs" | "lg" | "sm" | "xs" | null | undefined;
13
16
  variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
14
17
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
- declare const Button: ({ className, variant, size, asChild, ...props }: React$1.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
16
- asChild?: boolean;
17
- }) => React$1.JSX.Element;
18
+ export type ButtonProps = ButtonPrimitive.Props & VariantProps<typeof buttonVariants>;
19
+ declare const Button: ({ className, variant, size, type, ...props }: ButtonProps) => React$1.JSX.Element;
18
20
  export interface ActionButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
19
21
  loading?: boolean;
20
22
  fullWidth?: boolean;
@@ -151,13 +153,12 @@ export interface StatusDotProps extends React$1.HTMLAttributes<HTMLSpanElement>
151
153
  }
152
154
  export declare const StatusDot: React$1.ForwardRefExoticComponent<StatusDotProps & React$1.RefAttributes<HTMLSpanElement>>;
153
155
  declare const badgeVariants: (props?: ({
154
- variant?: "default" | "destructive" | "outline" | "secondary" | "mono" | "soft" | null | undefined;
156
+ variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | "mono" | "soft" | null | undefined;
155
157
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
156
- declare const Badge: ({ className, variant, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
157
- asChild?: boolean;
158
- }) => React$1.JSX.Element;
158
+ export type BadgeProps = useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>;
159
+ declare const Badge: ({ className, variant, render, ...props }: BadgeProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
159
160
  export type TooltipBadgeTone = "neutral" | "warning";
160
- export interface TooltipBadgeProps extends Omit<React$1.ComponentProps<typeof Badge>, "variant" | "asChild"> {
161
+ export interface TooltipBadgeProps extends Omit<React$1.ComponentProps<typeof Badge>, "variant" | "render"> {
161
162
  /** Explanation shown on hover/focus; the badge label stays compact. */
162
163
  tooltip: React$1.ReactNode;
163
164
  tone?: TooltipBadgeTone;
@@ -353,9 +354,9 @@ export interface SummaryItemProps extends Omit<React$1.HTMLAttributes<HTMLDivEle
353
354
  muted?: boolean;
354
355
  }
355
356
  export declare const SummaryItem: ({ label, value, muted, className, ...props }: SummaryItemProps) => React$1.JSX.Element;
356
- export type ChoiceCardGroupProps = React$1.ComponentProps<typeof RadioGroupPrimitive.Root>;
357
+ export type ChoiceCardGroupProps = RadioGroupPrimitive.Props;
357
358
  export declare const ChoiceCardGroup: ({ className, ...props }: ChoiceCardGroupProps) => React$1.JSX.Element;
358
- export interface ChoiceCardProps extends Omit<React$1.ComponentProps<typeof RadioGroupPrimitive.Item>, "title" | "children"> {
359
+ export interface ChoiceCardProps extends Omit<RadioPrimitive.Root.Props, "title" | "children"> {
359
360
  title: React$1.ReactNode;
360
361
  description?: React$1.ReactNode;
361
362
  /** Leading visual, typically an `IconTile`. */
@@ -364,6 +365,8 @@ export interface ChoiceCardProps extends Omit<React$1.ComponentProps<typeof Radi
364
365
  footer?: React$1.ReactNode;
365
366
  }
366
367
  export declare const ChoiceCard: ({ title, description, media, footer, className, ...props }: ChoiceCardProps) => React$1.JSX.Element;
368
+ /** Where an overlay renders; `null` or no value keeps the document body. */
369
+ export type PortalContainer = HTMLElement | null;
367
370
  declare const cardVariants: (props?: ({
368
371
  variant?: "default" | "sheet" | "island" | null | undefined;
369
372
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -371,10 +374,14 @@ declare const Card: ({ children, className, variant, visual, ...props }: CardPro
371
374
  export interface CardProps extends React$1.ComponentProps<"div">, VariantProps<typeof cardVariants> {
372
375
  visual?: "accent_gradient";
373
376
  }
374
- declare const DropdownMenu: ({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Root>) => React$1.JSX.Element;
375
- declare const DropdownMenuContent: ({ className, sideOffset, container, ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Content> & Pick<React$1.ComponentProps<typeof DropdownMenuPrimitive.Portal>, "container">) => React$1.JSX.Element;
376
- declare const PopoverContent: ({ className, align, sideOffset, container, ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Content> & Pick<React$1.ComponentProps<typeof PopoverPrimitive.Portal>, "container">) => React$1.JSX.Element;
377
- declare const RadioGroup: ({ className, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Root>) => React$1.JSX.Element;
377
+ declare const DropdownMenu: ({ ...props }: MenuPrimitive.Root.Props) => React$1.JSX.Element;
378
+ declare const DropdownMenuContent: ({ align, alignOffset, side, sideOffset, className, container, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> & {
379
+ container?: PortalContainer;
380
+ }) => React$1.JSX.Element;
381
+ declare const PopoverContent: ({ className, align, alignOffset, anchor, side, sideOffset, container, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "anchor" | "side" | "sideOffset"> & {
382
+ container?: PortalContainer;
383
+ }) => React$1.JSX.Element;
384
+ declare const RadioGroup: ({ className, ...props }: RadioGroupPrimitive.Props) => React$1.JSX.Element;
378
385
  export type CardOptionsBlockProps = React$1.HTMLAttributes<HTMLDivElement>;
379
386
  export declare const CardOptionsBlock: React$1.ForwardRefExoticComponent<CardOptionsBlockProps & React$1.RefAttributes<HTMLDivElement>>;
380
387
  export declare const RadioCardOptionsBlock: {
@@ -946,8 +953,16 @@ export interface TechnicalDetailsPopoverProps {
946
953
  triggerAriaLabel?: string;
947
954
  /** Accessible label prefix for each copy button, e.g. "Copy". */
948
955
  copyLabel?: string;
949
- /** Custom trigger; replaces the default info icon button. */
950
- trigger?: React$1.ReactNode;
956
+ /**
957
+ * Custom trigger element; replaces the default info icon button. It becomes
958
+ * the trigger itself, so pass one element, not a wrapper around a button.
959
+ */
960
+ trigger?: React$1.ReactElement;
961
+ /**
962
+ * Whether the custom `trigger` renders a native `<button>`. Defaults to
963
+ * true; set false for a non-button element such as a `Badge`.
964
+ */
965
+ triggerNativeButton?: boolean;
951
966
  align?: React$1.ComponentProps<typeof PopoverContent>["align"];
952
967
  side?: React$1.ComponentProps<typeof PopoverContent>["side"];
953
968
  onCopy?: (item: TechnicalDetailsItem) => void;
@@ -967,7 +982,7 @@ export interface TechnicalDetailsPopoverProps {
967
982
  * stays interactive: values render in monospace with `select-all` (one click
968
983
  * selects the whole value) and an optional copy button per row.
969
984
  */
970
- export declare const TechnicalDetailsPopover: ({ items, title, triggerAriaLabel, copyLabel, trigger, align, side, onCopy, className, classes }: TechnicalDetailsPopoverProps) => React$1.JSX.Element;
985
+ export declare const TechnicalDetailsPopover: ({ items, title, triggerAriaLabel, copyLabel, trigger, triggerNativeButton, align, side, onCopy, className, classes }: TechnicalDetailsPopoverProps) => React$1.JSX.Element;
971
986
  export interface TreeSelectNode {
972
987
  /** Unique across the whole tree. */
973
988
  id: string;