mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
feat: unified context panel, remove tabs, context-aware layout
- Merged AI Assistant + Lead 360 tabs into single context-aware panel - Context section shows: lead profile, AI insight (live from event bus), appointments, activity - "On call with" banner only shows during active calls (isInCall prop) - AI Chat always available at bottom of panel - Phase 1 only — AI Chat panel needs full redesign with Vercel AI SDK tool calling (Phase 2) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
49
src/components/base/select/select-shared.tsx
Normal file
49
src/components/base/select/select-shared.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import type { FC, ReactNode } from "react";
|
||||
import { createContext } from "react";
|
||||
|
||||
export type SelectItemType = {
|
||||
/** Unique identifier for the item. */
|
||||
id: string | number;
|
||||
/** The primary display text. */
|
||||
label?: string;
|
||||
/** Avatar image URL. */
|
||||
avatarUrl?: string;
|
||||
/** Whether the item is disabled. */
|
||||
isDisabled?: boolean;
|
||||
/** Secondary text displayed alongside the label. */
|
||||
supportingText?: string;
|
||||
/** Leading icon component or element. */
|
||||
icon?: FC | ReactNode;
|
||||
};
|
||||
|
||||
export interface CommonProps {
|
||||
/** Helper text displayed below the input. */
|
||||
hint?: string;
|
||||
/** Field label displayed above the input. */
|
||||
label?: string;
|
||||
/** Tooltip text for the help icon next to the label. */
|
||||
tooltip?: string;
|
||||
/**
|
||||
* The size of the component.
|
||||
* @default "md"
|
||||
*/
|
||||
size?: "sm" | "md" | "lg";
|
||||
/** Placeholder text when no value is selected. */
|
||||
placeholder?: string;
|
||||
/** Whether to hide the required indicator from the label. */
|
||||
hideRequiredIndicator?: boolean;
|
||||
}
|
||||
|
||||
export const sizes = {
|
||||
sm: {
|
||||
root: "py-2 pl-3 pr-2.5 gap-2 *:data-icon:size-4 *:data-icon:stroke-[2.25px]",
|
||||
withIcon: "",
|
||||
text: "text-sm",
|
||||
textContainer: "gap-x-1.5",
|
||||
shortcut: "pr-2.5",
|
||||
},
|
||||
md: { root: "py-2 px-3 gap-2 *:data-icon:size-5", withIcon: "", text: "text-md", textContainer: "gap-x-1.5", shortcut: "pr-2.5" },
|
||||
lg: { root: "py-2.5 px-3.5 gap-2 *:data-icon:size-5", withIcon: "", text: "text-md", textContainer: "gap-x-1.5", shortcut: "pr-3" },
|
||||
};
|
||||
|
||||
export const SelectContext = createContext<{ size: "sm" | "md" | "lg" }>({ size: "md" });
|
||||
Reference in New Issue
Block a user