@altimateai/ui-components 0.0.47 → 0.0.49

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/TagsInput.js CHANGED
@@ -3519,7 +3519,7 @@ const gf = [["path", { d: "M18 6l-12 12", key: "svg-0" }], ["path", { d: "M6 6l1
3519
3519
  "aria-label": _.label,
3520
3520
  className: "al-cursor-pointer",
3521
3521
  title: _.label,
3522
- children: /* @__PURE__ */ c.jsxs("div", { className: "al-flex al-items-center al-gap-2", children: [
3522
+ children: /* @__PURE__ */ c.jsxs("div", { className: "al-flex al-items-center al-gap-2 al-w-full", children: [
3523
3523
  /* @__PURE__ */ c.jsx(
3524
3524
  uf,
3525
3525
  {
@@ -3529,7 +3529,7 @@ const gf = [["path", { d: "M18 6l-12 12", key: "svg-0" }], ["path", { d: "M6 6l1
3529
3529
  )
3530
3530
  }
3531
3531
  ),
3532
- /* @__PURE__ */ c.jsx("span", { className: "al-truncate", children: _.label })
3532
+ /* @__PURE__ */ c.jsx("div", { className: "al-flex-1 al-min-w-0", children: _.node ? _.node : /* @__PURE__ */ c.jsx("span", { className: "al-truncate", children: _.label }) })
3533
3533
  ] })
3534
3534
  },
3535
3535
  _.value
@@ -1,6 +1,6 @@
1
1
  import React__default, { FC } from 'react';
2
- import { j as ChatbotProps, k as ChatbotProviderProps, m as ChatState, A as Artifact, n as ContextOption, I as InteractionRequest, o as ChatMessage, p as AgentAction, q as ChatResponse, F as Feedback, r as LoadingState, s as ChatSession, i as Citation, t as TodoItem, M as MessageAttachment, u as AgentStreamResponse } from '../types-CqeMsC8t.js';
3
- export { v as AssistantMeta, x as ChatbotUrls, D as Datamate, w as FileUploadProps, J as FinalResponseData, B as InteractionChoice, z as InteractionType, y as Mode, H as ProgressUpdate, G as ToolUsageData, U as UploadedFile, K as agentStreamResponseSchema, E as todoItemSchema } from '../types-CqeMsC8t.js';
2
+ import { j as ChatbotProps, k as ChatbotProviderProps, m as ChatState, A as Artifact, n as ContextOption, I as InteractionRequest, o as ChatMessage, p as AgentAction, q as ChatResponse, F as Feedback, r as LoadingState, s as ChatSession, i as Citation, t as TodoItem, M as MessageAttachment, u as AgentStreamResponse } from '../types-oWZJEjV7.js';
3
+ export { v as AssistantMeta, x as ChatbotUrls, D as Datamate, w as FileUploadProps, J as FinalResponseData, B as InteractionChoice, z as InteractionType, y as Mode, H as ProgressUpdate, G as ToolUsageData, U as UploadedFile, K as agentStreamResponseSchema, E as todoItemSchema } from '../types-oWZJEjV7.js';
4
4
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
5
5
  import { UnknownAction } from '@reduxjs/toolkit';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -131,9 +131,9 @@ interface UpdateModePayload {
131
131
  sessionId: string;
132
132
  mode: string;
133
133
  }
134
- interface UpdateDatamatesPayload {
134
+ interface UpdateDatamateInSessionPayload {
135
135
  sessionId: string;
136
- datamates?: string[];
136
+ datamates: string[];
137
137
  }
138
138
  declare const initialState: ChatState;
139
139
  declare const createSession: _reduxjs_toolkit.ActionCreatorWithPayload<{
@@ -176,7 +176,7 @@ declare const clearContext: _reduxjs_toolkit.ActionCreatorWithPayload<{
176
176
  sessionId: string;
177
177
  }, "chat/clearContext">;
178
178
  declare const updateMode: _reduxjs_toolkit.ActionCreatorWithPayload<UpdateModePayload, "chat/updateMode">;
179
- declare const updateDatamates: _reduxjs_toolkit.ActionCreatorWithPayload<UpdateDatamatesPayload, "chat/updateDatamates">;
179
+ declare const updateDatamateInSession: _reduxjs_toolkit.ActionCreatorWithPayload<UpdateDatamateInSessionPayload, "chat/updateDatamateInSession">;
180
180
  declare const setSessions: _reduxjs_toolkit.ActionCreatorWithPayload<Record<string, ChatSession>, "chat/setSessions">;
181
181
  declare const resetSession: _reduxjs_toolkit.ActionCreatorWithoutPayload<"chat/resetSession">;
182
182
 
@@ -277,4 +277,4 @@ declare const Citations: ({ citations, frontEndUrl, }: {
277
277
  frontEndUrl: string;
278
278
  }) => JSX.Element | null;
279
279
 
280
- export { AgentAction, AgentStreamResponse, Artifact, Artifacts, CancelGenerationButton, ChatMessage, ChatProvider, ChatResponse, ChatSession, ChatState, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, Citations, CoachAI, ContextOption, ContextPanel, Feedback, FeedbackButtons, InteractionPrompt, InteractionRequest, LoadingIndicator, LoadingState, MessageAttachment, MessageItem, MessageList, MessageMenu, QuestionForm, RegenerateButton, StatusUpdates, TodoItem, addAction, addMessage, clearActions, clearContext, clearHistory, clearTodos, createSession, deleteMessage, initialState, processAgentMessageContent, processAgentStream, processExistingConversation, processPlaygroundSessionTurns, resetSession, sendMessageAndProcessStream, setAbortController, setCurrentSession, setError, setLoadingState, setSelectedModel, setSessions, setTodos, streamResponseToAgentMessages, updateContext, updateDatamates, updateMessageFeedback, updateMode, useAgentChat, useChatContext };
280
+ export { AgentAction, AgentStreamResponse, Artifact, Artifacts, CancelGenerationButton, ChatMessage, ChatProvider, ChatResponse, ChatSession, ChatState, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, Citations, CoachAI, ContextOption, ContextPanel, Feedback, FeedbackButtons, InteractionPrompt, InteractionRequest, LoadingIndicator, LoadingState, MessageAttachment, MessageItem, MessageList, MessageMenu, QuestionForm, RegenerateButton, StatusUpdates, TodoItem, addAction, addMessage, clearActions, clearContext, clearHistory, clearTodos, createSession, deleteMessage, initialState, processAgentMessageContent, processAgentStream, processExistingConversation, processPlaygroundSessionTurns, resetSession, sendMessageAndProcessStream, setAbortController, setCurrentSession, setError, setLoadingState, setSelectedModel, setSessions, setTodos, streamResponseToAgentMessages, updateContext, updateDatamateInSession, updateMessageFeedback, updateMode, useAgentChat, useChatContext };
@@ -1,6 +1,6 @@
1
- import { A as e, b as t, a as o, g as n, C as r, m as i, c as d, d as c, F as g, I as C, L as u, n as S, M as l, e as p, f as m, Q as M, R as A, S as h, H as x, x as I, o as L, J as P, P as T, z as b, N as k, r as B, B as F, q as R, k as f, p as v, j as y, l as E, W as D, s as G, G as H, w as Q, E as U, D as V, v as j, V as q, K as w, i as z, t as J, O as K, U as N, y as O, T as W, h as X, u as Y } from "../CoachForm.js";
1
+ import { A as a, b as t, a as o, g as n, C as r, m as i, c as d, d as c, F as g, I as C, L as S, n as u, M as l, e as p, f as m, Q as M, R as A, S as h, H as x, x as I, o as L, J as P, P as T, z as b, N as k, r as B, B as F, q as R, k as f, p as v, j as y, l as E, W as D, s as G, G as H, w as Q, E as U, D as V, v as j, V as q, K as w, i as z, t as J, O as K, U as N, y as O, T as W, h as X, u as Y } from "../CoachForm.js";
2
2
  export {
3
- e as Artifacts,
3
+ a as Artifacts,
4
4
  t as CancelGenerationButton,
5
5
  o as ChatProvider,
6
6
  n as ChatTriggerLink,
@@ -10,8 +10,8 @@ export {
10
10
  c as ContextPanel,
11
11
  g as FeedbackButtons,
12
12
  C as InteractionPrompt,
13
- u as LoadingIndicator,
14
- S as LoadingState,
13
+ S as LoadingIndicator,
14
+ u as LoadingState,
15
15
  l as MessageItem,
16
16
  p as MessageList,
17
17
  m as MessageMenu,
@@ -44,7 +44,7 @@ export {
44
44
  z as streamResponseToAgentMessages,
45
45
  J as todoItemSchema,
46
46
  K as updateContext,
47
- N as updateDatamates,
47
+ N as updateDatamateInSession,
48
48
  O as updateMessageFeedback,
49
49
  W as updateMode,
50
50
  X as useAgentChat,
package/dist/index.d.ts CHANGED
@@ -3,8 +3,8 @@ import { HTMLAttributes, ButtonHTMLAttributes, ReactNode, FC, MouseEvent } from
3
3
  import { B as ButtonProps } from './Button-CVsSwe4f.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { PlotParams } from 'react-plotly.js';
6
- import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-CqeMsC8t.js';
7
- export { i as Citation, f as CoachAiConfirmationResponse, C as CoachAiResponse, g as ContentCategory, L as Learning, P as PersonalizationScope, h as TeamMateComponentProps, l as learningSchema } from './types-CqeMsC8t.js';
6
+ import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-oWZJEjV7.js';
7
+ export { i as Citation, f as CoachAiConfirmationResponse, C as CoachAiResponse, g as ContentCategory, L as Learning, P as PersonalizationScope, h as TeamMateComponentProps, l as learningSchema } from './types-oWZJEjV7.js';
8
8
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
9
9
  import { PayloadAction } from '@reduxjs/toolkit';
10
10
  import * as immer from 'immer';
@@ -418,6 +418,7 @@ interface Props<TMultiSelect extends boolean = false> {
418
418
  options: {
419
419
  value: string;
420
420
  label: string;
421
+ node?: ReactNode;
421
422
  }[];
422
423
  value?: TMultiSelect extends true ? string[] : string;
423
424
  onChange: (value: TMultiSelect extends true ? string[] : string) => void;
@@ -1,6 +1,5 @@
1
1
  import { Meta, StoryFn } from "@storybook/react";
2
- import { Combobox } from "../shadcn";
3
- import { Button } from "../button";
2
+ import { Combobox, Button } from "../shadcn";
4
3
  import { DatabaseIcon } from "@ac-assets/icons";
5
4
  import { useState } from "react";
6
5
 
@@ -584,6 +583,259 @@ export const ComboboxCallbacksExample: StoryFn = () => {
584
583
  );
585
584
  };
586
585
 
586
+ export const ComboboxCustomNodesExample: StoryFn = () => {
587
+ const [singleValue, setSingleValue] = useState("");
588
+ const [multiValue, setMultiValue] = useState<string[]>([]);
589
+
590
+ // Options with custom node rendering
591
+ const optionsWithNodes = [
592
+ {
593
+ value: "react",
594
+ label: "React",
595
+ node: (
596
+ <div className="al-flex al-items-center al-justify-between al-w-full">
597
+ <div className="al-flex al-items-center al-gap-2">
598
+ <div className="al-w-4 al-h-4 al-bg-blue-500 al-rounded"></div>
599
+ <span>React</span>
600
+ </div>
601
+ <span className="al-text-xs al-text-muted-foreground">Meta</span>
602
+ </div>
603
+ ),
604
+ },
605
+ {
606
+ value: "vue",
607
+ label: "Vue",
608
+ node: (
609
+ <div className="al-flex al-items-center al-justify-between al-w-full">
610
+ <div className="al-flex al-items-center al-gap-2">
611
+ <div className="al-w-4 al-h-4 al-bg-green-500 al-rounded"></div>
612
+ <span>Vue.js</span>
613
+ </div>
614
+ <span className="al-text-xs al-text-muted-foreground">Evan You</span>
615
+ </div>
616
+ ),
617
+ },
618
+ {
619
+ value: "angular",
620
+ label: "Angular",
621
+ node: (
622
+ <div className="al-flex al-items-center al-justify-between al-w-full">
623
+ <div className="al-flex al-items-center al-gap-2">
624
+ <div className="al-w-4 al-h-4 al-bg-red-500 al-rounded"></div>
625
+ <span>Angular</span>
626
+ </div>
627
+ <span className="al-text-xs al-text-muted-foreground">Google</span>
628
+ </div>
629
+ ),
630
+ },
631
+ {
632
+ value: "svelte",
633
+ label: "Svelte",
634
+ node: (
635
+ <div className="al-flex al-items-center al-justify-between al-w-full">
636
+ <div className="al-flex al-items-center al-gap-2">
637
+ <div className="al-w-4 al-h-4 al-bg-orange-500 al-rounded"></div>
638
+ <span>Svelte</span>
639
+ </div>
640
+ <span className="al-text-xs al-text-muted-foreground">Rich Harris</span>
641
+ </div>
642
+ ),
643
+ },
644
+ ];
645
+
646
+ // Options with interactive elements
647
+ const optionsWithButtons = [
648
+ {
649
+ value: "typescript",
650
+ label: "TypeScript",
651
+ node: (
652
+ <div className="al-flex al-items-center al-justify-between al-w-full">
653
+ <div className="al-flex al-items-center al-gap-2">
654
+ <div className="al-w-4 al-h-4 al-bg-blue-600 al-rounded"></div>
655
+ <div>
656
+ <div className="al-font-medium">TypeScript</div>
657
+ <div className="al-text-xs al-text-muted-foreground">Strongly typed JavaScript</div>
658
+ </div>
659
+ </div>
660
+ <button
661
+ onClick={e => {
662
+ e.stopPropagation();
663
+ alert("TypeScript info clicked!");
664
+ }}
665
+ className="al-text-xs al-px-2 al-py-1 al-bg-blue-100 al-text-blue-700 al-rounded hover:al-bg-blue-200"
666
+ >
667
+ Info
668
+ </button>
669
+ </div>
670
+ ),
671
+ },
672
+ {
673
+ value: "javascript",
674
+ label: "JavaScript",
675
+ node: (
676
+ <div className="al-flex al-items-center al-justify-between al-w-full">
677
+ <div className="al-flex al-items-center al-gap-2">
678
+ <div className="al-w-4 al-h-4 al-bg-yellow-500 al-rounded"></div>
679
+ <div>
680
+ <div className="al-font-medium">JavaScript</div>
681
+ <div className="al-text-xs al-text-muted-foreground">Dynamic scripting language</div>
682
+ </div>
683
+ </div>
684
+ <button
685
+ onClick={e => {
686
+ e.stopPropagation();
687
+ alert("JavaScript info clicked!");
688
+ }}
689
+ className="al-text-xs al-px-2 al-py-1 al-bg-yellow-100 al-text-yellow-700 al-rounded hover:al-bg-yellow-200"
690
+ >
691
+ Info
692
+ </button>
693
+ </div>
694
+ ),
695
+ },
696
+ {
697
+ value: "python",
698
+ label: "Python",
699
+ node: (
700
+ <div className="al-flex al-items-center al-justify-between al-w-full">
701
+ <div className="al-flex al-items-center al-gap-2">
702
+ <div className="al-w-4 al-h-4 al-bg-green-600 al-rounded"></div>
703
+ <div>
704
+ <div className="al-font-medium">Python</div>
705
+ <div className="al-text-xs al-text-muted-foreground">
706
+ High-level programming language
707
+ </div>
708
+ </div>
709
+ </div>
710
+ <button
711
+ onClick={e => {
712
+ e.stopPropagation();
713
+ alert("Python info clicked!");
714
+ }}
715
+ className="al-text-xs al-px-2 al-py-1 al-bg-green-100 al-text-green-700 al-rounded hover:al-bg-green-200"
716
+ >
717
+ Info
718
+ </button>
719
+ </div>
720
+ ),
721
+ },
722
+ ];
723
+
724
+ // Mixed options - some with nodes, some without
725
+ const mixedOptions = [
726
+ { value: "standard1", label: "Standard Option 1" },
727
+ {
728
+ value: "custom1",
729
+ label: "Custom Option 1",
730
+ node: (
731
+ <div className="al-flex al-items-center al-gap-2">
732
+ <div className="al-w-2 al-h-2 al-bg-purple-500 al-rounded-full"></div>
733
+ <span className="al-italic">Custom with node</span>
734
+ </div>
735
+ ),
736
+ },
737
+ { value: "standard2", label: "Standard Option 2" },
738
+ {
739
+ value: "custom2",
740
+ label: "Custom Option 2",
741
+ node: (
742
+ <div className="al-flex al-items-center al-gap-2">
743
+ <div className="al-w-2 al-h-2 al-bg-pink-500 al-rounded-full"></div>
744
+ <span className="al-font-bold">Another custom node</span>
745
+ </div>
746
+ ),
747
+ },
748
+ ];
749
+
750
+ return (
751
+ <div className="al-flex al-flex-col al-gap-8 al-justify-start al-items-start">
752
+ <div className="al-flex al-flex-col al-gap-2">
753
+ <h3 className="al-text-lg al-font-medium">Custom Node Rendering</h3>
754
+ <p className="al-text-sm al-text-muted-foreground">
755
+ Use the optional <code>node</code> property to provide custom ReactNode rendering for
756
+ dropdown options while keeping <code>label</code> as a string for text operations.
757
+ </p>
758
+ </div>
759
+
760
+ <div className="al-flex al-flex-col al-gap-6">
761
+ <div className="al-flex al-flex-col al-gap-4">
762
+ <h4 className="al-text-md al-font-medium">Framework Selector with Icons & Authors</h4>
763
+ <p className="al-text-sm al-text-muted-foreground">
764
+ Custom nodes with colored indicators and author information
765
+ </p>
766
+
767
+ <div className="al-flex al-flex-col al-gap-2">
768
+ <label className="al-text-sm al-font-medium">Single Select</label>
769
+ <Combobox
770
+ options={optionsWithNodes}
771
+ value={singleValue}
772
+ onChange={value => setSingleValue(value as string)}
773
+ placeholder="Select a framework..."
774
+ buttonProps={{ className: "al-w-[300px]" }}
775
+ />
776
+ <div className="al-text-sm">Selected: {singleValue || "None"}</div>
777
+ </div>
778
+
779
+ <div className="al-flex al-flex-col al-gap-2">
780
+ <label className="al-text-sm al-font-medium">Multi Select</label>
781
+ <Combobox
782
+ options={optionsWithNodes}
783
+ value={multiValue}
784
+ onChange={value => setMultiValue(value as string[])}
785
+ placeholder="Select frameworks..."
786
+ multiSelect={true}
787
+ buttonProps={{ className: "al-w-[300px]" }}
788
+ />
789
+ <div className="al-text-sm">
790
+ Selected: {multiValue.length > 0 ? multiValue.join(", ") : "None"}
791
+ </div>
792
+ </div>
793
+ </div>
794
+
795
+ <div className="al-flex al-flex-col al-gap-4">
796
+ <h4 className="al-text-md al-font-medium">Interactive Elements in Options</h4>
797
+ <p className="al-text-sm al-text-muted-foreground">
798
+ Options with interactive buttons that can be clicked without selecting the option
799
+ </p>
800
+
801
+ <div className="al-flex al-flex-col al-gap-2">
802
+ <label className="al-text-sm al-font-medium">
803
+ Programming Languages with Info Buttons
804
+ </label>
805
+ <Combobox
806
+ options={optionsWithButtons}
807
+ value={singleValue}
808
+ onChange={value => setSingleValue(value as string)}
809
+ placeholder="Select a language..."
810
+ buttonProps={{ className: "al-w-[350px]" }}
811
+ popoverContentProps={{ className: "al-w-[350px]" }}
812
+ />
813
+ </div>
814
+ </div>
815
+
816
+ <div className="al-flex al-flex-col al-gap-4">
817
+ <h4 className="al-text-md al-font-medium">Mixed Standard and Custom Options</h4>
818
+ <p className="al-text-sm al-text-muted-foreground">
819
+ Demonstrating that you can mix standard string labels with custom node rendering
820
+ </p>
821
+
822
+ <div className="al-flex al-flex-col al-gap-2">
823
+ <label className="al-text-sm al-font-medium">Mixed Options</label>
824
+ <Combobox
825
+ options={mixedOptions}
826
+ value={singleValue}
827
+ onChange={value => setSingleValue(value as string)}
828
+ placeholder="Select an option..."
829
+ buttonProps={{ className: "al-w-[250px]" }}
830
+ />
831
+ <div className="al-text-sm">Selected: {singleValue || "None"}</div>
832
+ </div>
833
+ </div>
834
+ </div>
835
+ </div>
836
+ );
837
+ };
838
+
587
839
  export const ComboboxPopoverCustomizationExample: StoryFn = () => {
588
840
  const options = [
589
841
  { value: "react", label: "React" },
@@ -57,7 +57,6 @@ interface ChatbotUrls {
57
57
  interface Datamate {
58
58
  id: string;
59
59
  label: string;
60
- endAdornment?: ReactNode;
61
60
  }
62
61
  interface Mode {
63
62
  value: string;
@@ -73,14 +72,13 @@ interface ChatbotProps {
73
72
  contextOptions?: ContextOption[];
74
73
  placeholder?: string;
75
74
  autoFocus?: boolean;
76
- enableDatamatesSelection?: boolean;
77
- datamates?: Datamate[];
78
75
  modes?: Mode[];
79
76
  classNames?: {
80
77
  chatbot?: string;
81
78
  chatMessages?: string;
82
79
  };
83
80
  initialMessage?: string;
81
+ questionFormLeftActions?: ReactNode[];
84
82
  }
85
83
  interface ChatbotProviderProps extends ChatbotProps {
86
84
  taskLabel?: keyof typeof TaskLabels;
@@ -193,8 +191,6 @@ interface ChatState {
193
191
  feedback?: ReactNode;
194
192
  questionFormButtons?: (userPrompt: string, onAccept: (improvedPrompt: string) => void) => ReactNode;
195
193
  };
196
- enableDatamatesSelection?: boolean;
197
- datamates?: Datamate[];
198
194
  modes?: Mode[];
199
195
  classNames?: {
200
196
  chatbot?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altimateai/ui-components",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AltimateAI/altimate-components.git"