@discuss-ds/ui 0.7.0 → 0.8.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/CHANGELOG.md +12 -0
- package/dist/index.cjs +158 -91
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +153 -87
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -783,6 +783,33 @@ interface RatingScaleProps extends Omit<React.ComponentPropsWithoutRef<typeof To
|
|
|
783
783
|
}
|
|
784
784
|
declare const RatingScale: React.ForwardRefExoticComponent<RatingScaleProps & React.RefAttributes<HTMLDivElement>>;
|
|
785
785
|
|
|
786
|
+
interface StimulusCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
787
|
+
/** Image shown in the 80px thumbnail. Without one the thumbnail shows `icon` on a neutral fill. */
|
|
788
|
+
thumbnail?: string;
|
|
789
|
+
/** Alt text for `thumbnail`. Leave empty when the caption already describes the image. */
|
|
790
|
+
thumbnailAlt?: string;
|
|
791
|
+
/** Placeholder shown in the thumbnail when there is no `thumbnail` (e.g. a video camera for a video). Defaults to an image icon. */
|
|
792
|
+
icon?: React.ReactNode;
|
|
793
|
+
/**
|
|
794
|
+
* `error` swaps the thumbnail for a broken-image icon on the destructive soft fill, for a stimulus that could not be
|
|
795
|
+
* loaded. It is also applied automatically when `thumbnail` fails to load.
|
|
796
|
+
*/
|
|
797
|
+
status?: 'default' | 'error';
|
|
798
|
+
/** Small line above the caption saying who speaks it. */
|
|
799
|
+
label?: React.ReactNode;
|
|
800
|
+
/** What the AI moderator says when it shows the stimulus, e.g. "Look at this image". */
|
|
801
|
+
caption?: string;
|
|
802
|
+
/** Editor mode: makes the caption editable (click to edit, Enter or blur saves) and is called with the new text. */
|
|
803
|
+
onCaptionChange?: (caption: string) => void;
|
|
804
|
+
/** Editor mode: placeholder for an empty caption. */
|
|
805
|
+
captionPlaceholder?: string;
|
|
806
|
+
/** Shows the trash button. */
|
|
807
|
+
onRemove?: () => void;
|
|
808
|
+
/** Accessible name of the trash button. Defaults to "Remove stimulus". */
|
|
809
|
+
removeLabel?: string;
|
|
810
|
+
}
|
|
811
|
+
declare const StimulusCard: React.ForwardRefExoticComponent<StimulusCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
812
|
+
|
|
786
813
|
interface ProgressProps extends React.ComponentPropsWithoutRef<typeof Progress$1.Root> {
|
|
787
814
|
/** Heading shown above the track, left-aligned (e.g. "Project Progress"). */
|
|
788
815
|
label?: React.ReactNode;
|
|
@@ -935,4 +962,4 @@ interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onCha
|
|
|
935
962
|
}
|
|
936
963
|
declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
|
|
937
964
|
|
|
938
|
-
export { AIMiniAvatar, type AIMiniAvatarProps, AIResponseContainer, type AIResponseContainerProps, type AIStatus, type ActivitySection, type ActivityStat, ActivityStructure, type ActivityStructureProps, AskAiInput, type AskAiInputProps, AskAiToggle, type AskAiToggleProps, Badge, type BadgeProps, Button, type ButtonProps, Calendar, type CalendarProps, ChatChoices, type ChatChoicesProps, ChatInput, type ChatInputProps, ChatOption, type ChatOptionActionProps, type ChatOptionCheckboxProps, type ChatOptionProps, type ChatOptionRadioProps, Checkbox, CheckboxField, type CheckboxFieldProps, type CheckboxProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuSelectableItemProps, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTag, type EditableTagProps, Field, type FieldControlProps, type FieldProps, type FieldStatus, FileAttachment, type FileAttachmentProps, FileUploadItem, type FileUploadItemProps, FileUploadZone, type FileUploadZoneProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, ImagePreview, type ImagePreviewProps, ImageThumbnails, type ImageThumbnailsProps, InlineEdit, type InlineEditProps, Input, type InputProps, InputWithAction, type InputWithActionProps, Label, type LabelProps, MediaInfo, type MediaInfoProps, NumberInput, type NumberInputProps, OpenEndAnswer, type OpenEndAnswerProps, Pagination, type PaginationItemValue, type PaginationProps, Progress, type ProgressProps, ProjectSelector, type ProjectSelectorProps, QuestionCard, type QuestionCheckboxOptionProps, QuestionEditorCard, type QuestionEditorCardProps, QuestionHeader, type QuestionHeaderProps, QuestionNavItem, type QuestionNavItemProps, QuestionOption, QuestionOptionEditor, type QuestionOptionEditorProps, type QuestionOptionProps, QuestionOtherOption, type QuestionOtherOptionProps, type QuestionRadioOptionProps, type QuestionType, QuestionTypeIcon, type QuestionTypeIconProps, RadioGroup, RadioGroupFieldItem, type RadioGroupFieldItemProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RankItemData, RankList, type RankListProps, RatingScale, type RatingScaleProps, SearchBar, type SearchBarProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, StatCard, type StatCardProps, StatusTag, type StatusTagProps, Switch, type SwitchProps, TabItem, type TabItemProps, TabNavigation, TabNavigationContext, type TabNavigationProps, type TabNavigationVariant, Table, TableBody, TableCell, type TableCellProps, TableCellTwoLines, type TableCellTwoLinesProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, Tag, type TagProps, Textarea, type TextareaProps, TimeItem, type TimeItemProps, TimePicker, type TimePickerProps, type TimeValue, Timestamp, type TimestampProps, Toast, ToastAction, ToastInline, type ToastInlineProps, type ToastProps, ToastProvider, type ToastVariant, ToastViewport, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TopicActivityRow, type TopicActivityRowProps, TopicCard, TopicCardMetaItem, type TopicCardMetaItemProps, type TopicCardProps, TopicCardTag, UserMessageBubble, type UserMessageBubbleProps, VideoPlayer, type VideoPlayerProps, VolumeControl, type VolumeControlProps, fieldSurfaceClasses, formatDateTime, getPaginationItems, useFormField };
|
|
965
|
+
export { AIMiniAvatar, type AIMiniAvatarProps, AIResponseContainer, type AIResponseContainerProps, type AIStatus, type ActivitySection, type ActivityStat, ActivityStructure, type ActivityStructureProps, AskAiInput, type AskAiInputProps, AskAiToggle, type AskAiToggleProps, Badge, type BadgeProps, Button, type ButtonProps, Calendar, type CalendarProps, ChatChoices, type ChatChoicesProps, ChatInput, type ChatInputProps, ChatOption, type ChatOptionActionProps, type ChatOptionCheckboxProps, type ChatOptionProps, type ChatOptionRadioProps, Checkbox, CheckboxField, type CheckboxFieldProps, type CheckboxProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuSelectableItemProps, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTag, type EditableTagProps, Field, type FieldControlProps, type FieldProps, type FieldStatus, FileAttachment, type FileAttachmentProps, FileUploadItem, type FileUploadItemProps, FileUploadZone, type FileUploadZoneProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, ImagePreview, type ImagePreviewProps, ImageThumbnails, type ImageThumbnailsProps, InlineEdit, type InlineEditProps, Input, type InputProps, InputWithAction, type InputWithActionProps, Label, type LabelProps, MediaInfo, type MediaInfoProps, NumberInput, type NumberInputProps, OpenEndAnswer, type OpenEndAnswerProps, Pagination, type PaginationItemValue, type PaginationProps, Progress, type ProgressProps, ProjectSelector, type ProjectSelectorProps, QuestionCard, type QuestionCheckboxOptionProps, QuestionEditorCard, type QuestionEditorCardProps, QuestionHeader, type QuestionHeaderProps, QuestionNavItem, type QuestionNavItemProps, QuestionOption, QuestionOptionEditor, type QuestionOptionEditorProps, type QuestionOptionProps, QuestionOtherOption, type QuestionOtherOptionProps, type QuestionRadioOptionProps, type QuestionType, QuestionTypeIcon, type QuestionTypeIconProps, RadioGroup, RadioGroupFieldItem, type RadioGroupFieldItemProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RankItemData, RankList, type RankListProps, RatingScale, type RatingScaleProps, SearchBar, type SearchBarProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, StatCard, type StatCardProps, StatusTag, type StatusTagProps, StimulusCard, type StimulusCardProps, Switch, type SwitchProps, TabItem, type TabItemProps, TabNavigation, TabNavigationContext, type TabNavigationProps, type TabNavigationVariant, Table, TableBody, TableCell, type TableCellProps, TableCellTwoLines, type TableCellTwoLinesProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, Tag, type TagProps, Textarea, type TextareaProps, TimeItem, type TimeItemProps, TimePicker, type TimePickerProps, type TimeValue, Timestamp, type TimestampProps, Toast, ToastAction, ToastInline, type ToastInlineProps, type ToastProps, ToastProvider, type ToastVariant, ToastViewport, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TopicActivityRow, type TopicActivityRowProps, TopicCard, TopicCardMetaItem, type TopicCardMetaItemProps, type TopicCardProps, TopicCardTag, UserMessageBubble, type UserMessageBubbleProps, VideoPlayer, type VideoPlayerProps, VolumeControl, type VolumeControlProps, fieldSurfaceClasses, formatDateTime, getPaginationItems, useFormField };
|
package/dist/index.d.ts
CHANGED
|
@@ -783,6 +783,33 @@ interface RatingScaleProps extends Omit<React.ComponentPropsWithoutRef<typeof To
|
|
|
783
783
|
}
|
|
784
784
|
declare const RatingScale: React.ForwardRefExoticComponent<RatingScaleProps & React.RefAttributes<HTMLDivElement>>;
|
|
785
785
|
|
|
786
|
+
interface StimulusCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
787
|
+
/** Image shown in the 80px thumbnail. Without one the thumbnail shows `icon` on a neutral fill. */
|
|
788
|
+
thumbnail?: string;
|
|
789
|
+
/** Alt text for `thumbnail`. Leave empty when the caption already describes the image. */
|
|
790
|
+
thumbnailAlt?: string;
|
|
791
|
+
/** Placeholder shown in the thumbnail when there is no `thumbnail` (e.g. a video camera for a video). Defaults to an image icon. */
|
|
792
|
+
icon?: React.ReactNode;
|
|
793
|
+
/**
|
|
794
|
+
* `error` swaps the thumbnail for a broken-image icon on the destructive soft fill, for a stimulus that could not be
|
|
795
|
+
* loaded. It is also applied automatically when `thumbnail` fails to load.
|
|
796
|
+
*/
|
|
797
|
+
status?: 'default' | 'error';
|
|
798
|
+
/** Small line above the caption saying who speaks it. */
|
|
799
|
+
label?: React.ReactNode;
|
|
800
|
+
/** What the AI moderator says when it shows the stimulus, e.g. "Look at this image". */
|
|
801
|
+
caption?: string;
|
|
802
|
+
/** Editor mode: makes the caption editable (click to edit, Enter or blur saves) and is called with the new text. */
|
|
803
|
+
onCaptionChange?: (caption: string) => void;
|
|
804
|
+
/** Editor mode: placeholder for an empty caption. */
|
|
805
|
+
captionPlaceholder?: string;
|
|
806
|
+
/** Shows the trash button. */
|
|
807
|
+
onRemove?: () => void;
|
|
808
|
+
/** Accessible name of the trash button. Defaults to "Remove stimulus". */
|
|
809
|
+
removeLabel?: string;
|
|
810
|
+
}
|
|
811
|
+
declare const StimulusCard: React.ForwardRefExoticComponent<StimulusCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
812
|
+
|
|
786
813
|
interface ProgressProps extends React.ComponentPropsWithoutRef<typeof Progress$1.Root> {
|
|
787
814
|
/** Heading shown above the track, left-aligned (e.g. "Project Progress"). */
|
|
788
815
|
label?: React.ReactNode;
|
|
@@ -935,4 +962,4 @@ interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onCha
|
|
|
935
962
|
}
|
|
936
963
|
declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
|
|
937
964
|
|
|
938
|
-
export { AIMiniAvatar, type AIMiniAvatarProps, AIResponseContainer, type AIResponseContainerProps, type AIStatus, type ActivitySection, type ActivityStat, ActivityStructure, type ActivityStructureProps, AskAiInput, type AskAiInputProps, AskAiToggle, type AskAiToggleProps, Badge, type BadgeProps, Button, type ButtonProps, Calendar, type CalendarProps, ChatChoices, type ChatChoicesProps, ChatInput, type ChatInputProps, ChatOption, type ChatOptionActionProps, type ChatOptionCheckboxProps, type ChatOptionProps, type ChatOptionRadioProps, Checkbox, CheckboxField, type CheckboxFieldProps, type CheckboxProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuSelectableItemProps, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTag, type EditableTagProps, Field, type FieldControlProps, type FieldProps, type FieldStatus, FileAttachment, type FileAttachmentProps, FileUploadItem, type FileUploadItemProps, FileUploadZone, type FileUploadZoneProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, ImagePreview, type ImagePreviewProps, ImageThumbnails, type ImageThumbnailsProps, InlineEdit, type InlineEditProps, Input, type InputProps, InputWithAction, type InputWithActionProps, Label, type LabelProps, MediaInfo, type MediaInfoProps, NumberInput, type NumberInputProps, OpenEndAnswer, type OpenEndAnswerProps, Pagination, type PaginationItemValue, type PaginationProps, Progress, type ProgressProps, ProjectSelector, type ProjectSelectorProps, QuestionCard, type QuestionCheckboxOptionProps, QuestionEditorCard, type QuestionEditorCardProps, QuestionHeader, type QuestionHeaderProps, QuestionNavItem, type QuestionNavItemProps, QuestionOption, QuestionOptionEditor, type QuestionOptionEditorProps, type QuestionOptionProps, QuestionOtherOption, type QuestionOtherOptionProps, type QuestionRadioOptionProps, type QuestionType, QuestionTypeIcon, type QuestionTypeIconProps, RadioGroup, RadioGroupFieldItem, type RadioGroupFieldItemProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RankItemData, RankList, type RankListProps, RatingScale, type RatingScaleProps, SearchBar, type SearchBarProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, StatCard, type StatCardProps, StatusTag, type StatusTagProps, Switch, type SwitchProps, TabItem, type TabItemProps, TabNavigation, TabNavigationContext, type TabNavigationProps, type TabNavigationVariant, Table, TableBody, TableCell, type TableCellProps, TableCellTwoLines, type TableCellTwoLinesProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, Tag, type TagProps, Textarea, type TextareaProps, TimeItem, type TimeItemProps, TimePicker, type TimePickerProps, type TimeValue, Timestamp, type TimestampProps, Toast, ToastAction, ToastInline, type ToastInlineProps, type ToastProps, ToastProvider, type ToastVariant, ToastViewport, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TopicActivityRow, type TopicActivityRowProps, TopicCard, TopicCardMetaItem, type TopicCardMetaItemProps, type TopicCardProps, TopicCardTag, UserMessageBubble, type UserMessageBubbleProps, VideoPlayer, type VideoPlayerProps, VolumeControl, type VolumeControlProps, fieldSurfaceClasses, formatDateTime, getPaginationItems, useFormField };
|
|
965
|
+
export { AIMiniAvatar, type AIMiniAvatarProps, AIResponseContainer, type AIResponseContainerProps, type AIStatus, type ActivitySection, type ActivityStat, ActivityStructure, type ActivityStructureProps, AskAiInput, type AskAiInputProps, AskAiToggle, type AskAiToggleProps, Badge, type BadgeProps, Button, type ButtonProps, Calendar, type CalendarProps, ChatChoices, type ChatChoicesProps, ChatInput, type ChatInputProps, ChatOption, type ChatOptionActionProps, type ChatOptionCheckboxProps, type ChatOptionProps, type ChatOptionRadioProps, Checkbox, CheckboxField, type CheckboxFieldProps, type CheckboxProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuSelectableItemProps, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTag, type EditableTagProps, Field, type FieldControlProps, type FieldProps, type FieldStatus, FileAttachment, type FileAttachmentProps, FileUploadItem, type FileUploadItemProps, FileUploadZone, type FileUploadZoneProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, ImagePreview, type ImagePreviewProps, ImageThumbnails, type ImageThumbnailsProps, InlineEdit, type InlineEditProps, Input, type InputProps, InputWithAction, type InputWithActionProps, Label, type LabelProps, MediaInfo, type MediaInfoProps, NumberInput, type NumberInputProps, OpenEndAnswer, type OpenEndAnswerProps, Pagination, type PaginationItemValue, type PaginationProps, Progress, type ProgressProps, ProjectSelector, type ProjectSelectorProps, QuestionCard, type QuestionCheckboxOptionProps, QuestionEditorCard, type QuestionEditorCardProps, QuestionHeader, type QuestionHeaderProps, QuestionNavItem, type QuestionNavItemProps, QuestionOption, QuestionOptionEditor, type QuestionOptionEditorProps, type QuestionOptionProps, QuestionOtherOption, type QuestionOtherOptionProps, type QuestionRadioOptionProps, type QuestionType, QuestionTypeIcon, type QuestionTypeIconProps, RadioGroup, RadioGroupFieldItem, type RadioGroupFieldItemProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RankItemData, RankList, type RankListProps, RatingScale, type RatingScaleProps, SearchBar, type SearchBarProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectTrigger, type SelectTriggerProps, SelectValue, Slider, type SliderProps, StatCard, type StatCardProps, StatusTag, type StatusTagProps, StimulusCard, type StimulusCardProps, Switch, type SwitchProps, TabItem, type TabItemProps, TabNavigation, TabNavigationContext, type TabNavigationProps, type TabNavigationVariant, Table, TableBody, TableCell, type TableCellProps, TableCellTwoLines, type TableCellTwoLinesProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, Tag, type TagProps, Textarea, type TextareaProps, TimeItem, type TimeItemProps, TimePicker, type TimePickerProps, type TimeValue, Timestamp, type TimestampProps, Toast, ToastAction, ToastInline, type ToastInlineProps, type ToastProps, ToastProvider, type ToastVariant, ToastViewport, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TopicActivityRow, type TopicActivityRowProps, TopicCard, TopicCardMetaItem, type TopicCardMetaItemProps, type TopicCardProps, TopicCardTag, UserMessageBubble, type UserMessageBubbleProps, VideoPlayer, type VideoPlayerProps, VolumeControl, type VolumeControlProps, fieldSurfaceClasses, formatDateTime, getPaginationItems, useFormField };
|
package/dist/index.js
CHANGED
|
@@ -2194,16 +2194,14 @@ var FileUploadItem = React36.forwardRef(
|
|
|
2194
2194
|
/* @__PURE__ */ jsx37("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground", children: icon ?? /* @__PURE__ */ jsx37(FileText, { size: 24, "aria-hidden": true }) }),
|
|
2195
2195
|
/* @__PURE__ */ jsxs26("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
2196
2196
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */ jsx37("p", { className: "truncate text-ui-label text-surface-foreground", children: name }),
|
|
2199
|
-
status === "complete" && /* @__PURE__ */ jsx37(Tag, { variant: "success", children: "Complete" }),
|
|
2200
|
-
status === "error" && /* @__PURE__ */ jsx37(Tag, { variant: "destructive", children: "Error" })
|
|
2201
|
-
] }),
|
|
2197
|
+
/* @__PURE__ */ jsx37("p", { className: "min-w-0 truncate text-ui-label text-surface-foreground", children: name }),
|
|
2202
2198
|
onRemove && /* @__PURE__ */ jsx37(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ jsx37(X5, { size: 16, "aria-hidden": true }) })
|
|
2203
2199
|
] }),
|
|
2204
2200
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between text-ui-caption text-secondary-muted-foreground", children: [
|
|
2205
2201
|
/* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
|
|
2206
2202
|
size,
|
|
2203
|
+
status === "complete" && /* @__PURE__ */ jsx37(Tag, { variant: "success", children: "Complete" }),
|
|
2204
|
+
status === "error" && /* @__PURE__ */ jsx37(Tag, { variant: "destructive", children: "Error" }),
|
|
2207
2205
|
uploading && timeLeft && /* @__PURE__ */ jsxs26(Fragment5, { children: [
|
|
2208
2206
|
/* @__PURE__ */ jsx37("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
|
|
2209
2207
|
timeLeft
|
|
@@ -3050,28 +3048,95 @@ var RatingScale = React46.forwardRef(
|
|
|
3050
3048
|
);
|
|
3051
3049
|
RatingScale.displayName = "RatingScale";
|
|
3052
3050
|
|
|
3053
|
-
// src/components/
|
|
3051
|
+
// src/components/Question Types/StimulusCard.tsx
|
|
3054
3052
|
import * as React47 from "react";
|
|
3055
|
-
import {
|
|
3053
|
+
import { Image as ImageIcon2, ImageBroken, Trash as Trash5 } from "@phosphor-icons/react";
|
|
3056
3054
|
import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3057
|
-
var
|
|
3055
|
+
var StimulusCard = React47.forwardRef(
|
|
3056
|
+
({
|
|
3057
|
+
className,
|
|
3058
|
+
thumbnail,
|
|
3059
|
+
thumbnailAlt = "",
|
|
3060
|
+
icon,
|
|
3061
|
+
status = "default",
|
|
3062
|
+
label = "AI Moderator",
|
|
3063
|
+
caption,
|
|
3064
|
+
onCaptionChange,
|
|
3065
|
+
captionPlaceholder = "Click to write what the AI moderator says",
|
|
3066
|
+
onRemove,
|
|
3067
|
+
removeLabel = "Remove stimulus",
|
|
3068
|
+
...props
|
|
3069
|
+
}, ref) => {
|
|
3070
|
+
const [failedSrc, setFailedSrc] = React47.useState();
|
|
3071
|
+
const error = status === "error" || thumbnail !== void 0 && failedSrc === thumbnail;
|
|
3072
|
+
const showImage = thumbnail !== void 0 && !error;
|
|
3073
|
+
return /* @__PURE__ */ jsxs34(
|
|
3074
|
+
"div",
|
|
3075
|
+
{
|
|
3076
|
+
ref,
|
|
3077
|
+
"data-status": error ? "error" : "default",
|
|
3078
|
+
className: cn("flex w-full items-center gap-4 rounded-md border border-border p-0.5 pr-4", className),
|
|
3079
|
+
...props,
|
|
3080
|
+
children: [
|
|
3081
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
|
|
3082
|
+
/* @__PURE__ */ jsx48(
|
|
3083
|
+
"span",
|
|
3084
|
+
{
|
|
3085
|
+
className: cn(
|
|
3086
|
+
"flex size-20 shrink-0 items-center justify-center overflow-hidden rounded-sm border",
|
|
3087
|
+
error ? "border-destructive-soft-border bg-destructive-soft bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-destructive" : "border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground",
|
|
3088
|
+
showImage && "bg-none"
|
|
3089
|
+
),
|
|
3090
|
+
children: showImage ? /* @__PURE__ */ jsx48("img", { src: thumbnail, alt: thumbnailAlt, className: "size-full object-cover", onError: () => setFailedSrc(thumbnail) }) : error ? /* @__PURE__ */ jsx48(ImageBroken, { size: 24, "aria-hidden": true }) : icon ?? /* @__PURE__ */ jsx48(ImageIcon2, { size: 24, "aria-hidden": true })
|
|
3091
|
+
}
|
|
3092
|
+
),
|
|
3093
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex min-w-0 flex-1 flex-col items-start gap-2 text-surface-foreground", children: [
|
|
3094
|
+
/* @__PURE__ */ jsx48("p", { className: "w-full text-ui-label", children: label }),
|
|
3095
|
+
onCaptionChange ? /* @__PURE__ */ jsx48(
|
|
3096
|
+
InlineEdit,
|
|
3097
|
+
{
|
|
3098
|
+
variant: "question",
|
|
3099
|
+
multiline: true,
|
|
3100
|
+
className: "-mx-3 w-auto",
|
|
3101
|
+
"aria-label": "Stimulus caption",
|
|
3102
|
+
value: caption ?? "",
|
|
3103
|
+
placeholder: captionPlaceholder,
|
|
3104
|
+
onValueChange: onCaptionChange,
|
|
3105
|
+
textClassName: "text-body-base"
|
|
3106
|
+
}
|
|
3107
|
+
) : /* @__PURE__ */ jsx48("p", { className: "w-full text-body-base [word-break:break-word]", children: caption })
|
|
3108
|
+
] })
|
|
3109
|
+
] }),
|
|
3110
|
+
onRemove && /* @__PURE__ */ jsx48(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": removeLabel, onClick: onRemove, children: /* @__PURE__ */ jsx48(Trash5, { size: 16, "aria-hidden": true }) })
|
|
3111
|
+
]
|
|
3112
|
+
}
|
|
3113
|
+
);
|
|
3114
|
+
}
|
|
3115
|
+
);
|
|
3116
|
+
StimulusCard.displayName = "StimulusCard";
|
|
3117
|
+
|
|
3118
|
+
// src/components/Data Display/Progress.tsx
|
|
3119
|
+
import * as React48 from "react";
|
|
3120
|
+
import { Progress as ProgressPrimitive2 } from "radix-ui";
|
|
3121
|
+
import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3122
|
+
var Progress = React48.forwardRef(
|
|
3058
3123
|
({ className, value = 0, label, valueLabel, detailsStart, detailsEnd, ...props }, ref) => {
|
|
3059
3124
|
const hasHeader = label != null || valueLabel != null;
|
|
3060
3125
|
const hasDetails = detailsStart != null || detailsEnd != null;
|
|
3061
3126
|
const clamped = Math.min(100, Math.max(0, value ?? 0));
|
|
3062
|
-
return /* @__PURE__ */
|
|
3063
|
-
hasHeader && /* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3127
|
+
return /* @__PURE__ */ jsxs35("div", { className: cn("flex w-full flex-col gap-2", className), children: [
|
|
3128
|
+
hasHeader && /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between text-ui-label text-surface-foreground", children: [
|
|
3129
|
+
/* @__PURE__ */ jsx49("span", { children: label }),
|
|
3130
|
+
/* @__PURE__ */ jsx49("span", { children: valueLabel === true ? `${Math.round(clamped)}%` : valueLabel })
|
|
3066
3131
|
] }),
|
|
3067
|
-
/* @__PURE__ */
|
|
3132
|
+
/* @__PURE__ */ jsx49(
|
|
3068
3133
|
ProgressPrimitive2.Root,
|
|
3069
3134
|
{
|
|
3070
3135
|
ref,
|
|
3071
3136
|
value: clamped,
|
|
3072
3137
|
className: "relative h-2 w-full overflow-hidden rounded-full bg-secondary",
|
|
3073
3138
|
...props,
|
|
3074
|
-
children: /* @__PURE__ */
|
|
3139
|
+
children: /* @__PURE__ */ jsx49(
|
|
3075
3140
|
ProgressPrimitive2.Indicator,
|
|
3076
3141
|
{
|
|
3077
3142
|
className: "h-full rounded-full bg-accent transition-[width]",
|
|
@@ -3080,9 +3145,9 @@ var Progress = React47.forwardRef(
|
|
|
3080
3145
|
)
|
|
3081
3146
|
}
|
|
3082
3147
|
),
|
|
3083
|
-
hasDetails && /* @__PURE__ */
|
|
3084
|
-
/* @__PURE__ */
|
|
3085
|
-
/* @__PURE__ */
|
|
3148
|
+
hasDetails && /* @__PURE__ */ jsxs35("div", { className: "flex items-start justify-between text-ui-label leading-5 text-secondary-muted-foreground", children: [
|
|
3149
|
+
/* @__PURE__ */ jsx49("span", { children: detailsStart }),
|
|
3150
|
+
/* @__PURE__ */ jsx49("span", { children: detailsEnd })
|
|
3086
3151
|
] })
|
|
3087
3152
|
] });
|
|
3088
3153
|
}
|
|
@@ -3090,11 +3155,11 @@ var Progress = React47.forwardRef(
|
|
|
3090
3155
|
Progress.displayName = "Progress";
|
|
3091
3156
|
|
|
3092
3157
|
// src/components/Data Display/Table.tsx
|
|
3093
|
-
import * as
|
|
3158
|
+
import * as React49 from "react";
|
|
3094
3159
|
import { CaretDown as CaretDown4, CaretUp } from "@phosphor-icons/react";
|
|
3095
|
-
import { jsx as
|
|
3096
|
-
var Table =
|
|
3097
|
-
({ className, containerClassName, striped, ...props }, ref) => /* @__PURE__ */
|
|
3160
|
+
import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3161
|
+
var Table = React49.forwardRef(
|
|
3162
|
+
({ className, containerClassName, striped, ...props }, ref) => /* @__PURE__ */ jsx50("div", { className: cn("relative w-full overflow-auto rounded-lg border border-border bg-surface", containerClassName), children: /* @__PURE__ */ jsx50(
|
|
3098
3163
|
"table",
|
|
3099
3164
|
{
|
|
3100
3165
|
ref,
|
|
@@ -3105,16 +3170,16 @@ var Table = React48.forwardRef(
|
|
|
3105
3170
|
) })
|
|
3106
3171
|
);
|
|
3107
3172
|
Table.displayName = "Table";
|
|
3108
|
-
var TableHeader =
|
|
3109
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3173
|
+
var TableHeader = React49.forwardRef(
|
|
3174
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx50("thead", { ref, className, ...props })
|
|
3110
3175
|
);
|
|
3111
3176
|
TableHeader.displayName = "TableHeader";
|
|
3112
|
-
var TableBody =
|
|
3113
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3177
|
+
var TableBody = React49.forwardRef(
|
|
3178
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx50("tbody", { ref, className, ...props })
|
|
3114
3179
|
);
|
|
3115
3180
|
TableBody.displayName = "TableBody";
|
|
3116
|
-
var TableRow =
|
|
3117
|
-
({ className, selected, ...props }, ref) => /* @__PURE__ */
|
|
3181
|
+
var TableRow = React49.forwardRef(
|
|
3182
|
+
({ className, selected, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
3118
3183
|
"tr",
|
|
3119
3184
|
{
|
|
3120
3185
|
ref,
|
|
@@ -3131,10 +3196,10 @@ var TableRow = React48.forwardRef(
|
|
|
3131
3196
|
);
|
|
3132
3197
|
TableRow.displayName = "TableRow";
|
|
3133
3198
|
var ariaSort = { none: "none", asc: "ascending", desc: "descending" };
|
|
3134
|
-
var TableHead =
|
|
3199
|
+
var TableHead = React49.forwardRef(
|
|
3135
3200
|
({ className, align = "left", sortable, sort = "none", onSort, checkbox, children, ...props }, ref) => {
|
|
3136
|
-
const caret = sort === "asc" ? /* @__PURE__ */
|
|
3137
|
-
return /* @__PURE__ */
|
|
3201
|
+
const caret = sort === "asc" ? /* @__PURE__ */ jsx50(CaretUp, { size: 16, "aria-hidden": true, className: "shrink-0" }) : /* @__PURE__ */ jsx50(CaretDown4, { size: 16, "aria-hidden": true, className: "shrink-0" });
|
|
3202
|
+
return /* @__PURE__ */ jsx50(
|
|
3138
3203
|
"th",
|
|
3139
3204
|
{
|
|
3140
3205
|
ref,
|
|
@@ -3147,7 +3212,7 @@ var TableHead = React48.forwardRef(
|
|
|
3147
3212
|
className
|
|
3148
3213
|
),
|
|
3149
3214
|
...props,
|
|
3150
|
-
children: sortable ? /* @__PURE__ */
|
|
3215
|
+
children: sortable ? /* @__PURE__ */ jsxs36(
|
|
3151
3216
|
"button",
|
|
3152
3217
|
{
|
|
3153
3218
|
type: "button",
|
|
@@ -3158,14 +3223,14 @@ var TableHead = React48.forwardRef(
|
|
|
3158
3223
|
caret
|
|
3159
3224
|
]
|
|
3160
3225
|
}
|
|
3161
|
-
) : checkbox ? /* @__PURE__ */
|
|
3226
|
+
) : checkbox ? /* @__PURE__ */ jsx50("div", { className: "flex items-center justify-center", children }) : children
|
|
3162
3227
|
}
|
|
3163
3228
|
);
|
|
3164
3229
|
}
|
|
3165
3230
|
);
|
|
3166
3231
|
TableHead.displayName = "TableHead";
|
|
3167
|
-
var TableCell =
|
|
3168
|
-
({ className, align = "left", muted, checkbox, actions, children, ...props }, ref) => /* @__PURE__ */
|
|
3232
|
+
var TableCell = React49.forwardRef(
|
|
3233
|
+
({ className, align = "left", muted, checkbox, actions, children, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
3169
3234
|
"td",
|
|
3170
3235
|
{
|
|
3171
3236
|
ref,
|
|
@@ -3178,25 +3243,25 @@ var TableCell = React48.forwardRef(
|
|
|
3178
3243
|
className
|
|
3179
3244
|
),
|
|
3180
3245
|
...props,
|
|
3181
|
-
children: checkbox ? /* @__PURE__ */
|
|
3246
|
+
children: checkbox ? /* @__PURE__ */ jsx50("div", { className: "flex items-center justify-center", children }) : actions ? /* @__PURE__ */ jsx50("div", { className: "flex items-start justify-end gap-1", children }) : children
|
|
3182
3247
|
}
|
|
3183
3248
|
)
|
|
3184
3249
|
);
|
|
3185
3250
|
TableCell.displayName = "TableCell";
|
|
3186
3251
|
function TableCellTwoLines({ primary, secondary, avatar, className, ...props }) {
|
|
3187
|
-
return /* @__PURE__ */
|
|
3252
|
+
return /* @__PURE__ */ jsxs36("div", { className: cn("flex items-center gap-2", className), ...props, children: [
|
|
3188
3253
|
avatar,
|
|
3189
|
-
/* @__PURE__ */
|
|
3190
|
-
/* @__PURE__ */
|
|
3191
|
-
secondary && /* @__PURE__ */
|
|
3254
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-0.5 whitespace-nowrap", children: [
|
|
3255
|
+
/* @__PURE__ */ jsx50("span", { className: "text-ui-label text-surface-foreground", children: primary }),
|
|
3256
|
+
secondary && /* @__PURE__ */ jsx50("span", { className: "text-ui-caption text-secondary-muted-foreground", children: secondary })
|
|
3192
3257
|
] })
|
|
3193
3258
|
] });
|
|
3194
3259
|
}
|
|
3195
3260
|
|
|
3196
3261
|
// src/components/Data Display/StatCard.tsx
|
|
3197
|
-
import * as
|
|
3262
|
+
import * as React50 from "react";
|
|
3198
3263
|
import { cva as cva6 } from "class-variance-authority";
|
|
3199
|
-
import { jsx as
|
|
3264
|
+
import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3200
3265
|
var statCardVariants = cva6("flex min-w-0 flex-col gap-2 rounded-md border p-3", {
|
|
3201
3266
|
variants: {
|
|
3202
3267
|
variant: {
|
|
@@ -3206,11 +3271,11 @@ var statCardVariants = cva6("flex min-w-0 flex-col gap-2 rounded-md border p-3",
|
|
|
3206
3271
|
},
|
|
3207
3272
|
defaultVariants: { variant: "default" }
|
|
3208
3273
|
});
|
|
3209
|
-
var StatCard =
|
|
3210
|
-
({ className, variant, label, value, icon, ...props }, ref) => /* @__PURE__ */
|
|
3211
|
-
/* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3213
|
-
icon && /* @__PURE__ */
|
|
3274
|
+
var StatCard = React50.forwardRef(
|
|
3275
|
+
({ className, variant, label, value, icon, ...props }, ref) => /* @__PURE__ */ jsxs37("div", { ref, className: cn(statCardVariants({ variant }), className), ...props, children: [
|
|
3276
|
+
/* @__PURE__ */ jsx51("p", { className: "truncate text-ui-caption text-secondary-muted-foreground", children: label }),
|
|
3277
|
+
/* @__PURE__ */ jsxs37("p", { className: "flex items-center gap-2 text-body-base text-surface-foreground", children: [
|
|
3278
|
+
icon && /* @__PURE__ */ jsx51("span", { "aria-hidden": "true", className: "inline-flex size-6 shrink-0 items-center justify-center", children: icon }),
|
|
3214
3279
|
value
|
|
3215
3280
|
] })
|
|
3216
3281
|
] })
|
|
@@ -3218,13 +3283,13 @@ var StatCard = React49.forwardRef(
|
|
|
3218
3283
|
StatCard.displayName = "StatCard";
|
|
3219
3284
|
|
|
3220
3285
|
// src/components/Research-Specific/ActivityStructure.tsx
|
|
3221
|
-
import * as
|
|
3286
|
+
import * as React52 from "react";
|
|
3222
3287
|
|
|
3223
3288
|
// src/components/Tags & Badges/EditableTag.tsx
|
|
3224
|
-
import * as
|
|
3289
|
+
import * as React51 from "react";
|
|
3225
3290
|
import { Crown, Plus as Plus5, X as X6 } from "@phosphor-icons/react";
|
|
3226
3291
|
import { cva as cva7 } from "class-variance-authority";
|
|
3227
|
-
import { jsx as
|
|
3292
|
+
import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3228
3293
|
var editableTagVariants = cva7(
|
|
3229
3294
|
"inline-flex h-6.5 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors",
|
|
3230
3295
|
{
|
|
@@ -3239,27 +3304,27 @@ var editableTagVariants = cva7(
|
|
|
3239
3304
|
defaultVariants: { type: "default" }
|
|
3240
3305
|
}
|
|
3241
3306
|
);
|
|
3242
|
-
var EditableTag =
|
|
3307
|
+
var EditableTag = React51.forwardRef(
|
|
3243
3308
|
({ className, type = "default", icon, onRemove, onClick, children, ...props }, ref) => {
|
|
3244
3309
|
const classes = cn(editableTagVariants({ type }), className);
|
|
3245
|
-
const leading = type === "add" ? /* @__PURE__ */
|
|
3310
|
+
const leading = type === "add" ? /* @__PURE__ */ jsx52(Plus5, { size: 12, "aria-hidden": true }) : icon !== void 0 ? icon : type === "default" ? /* @__PURE__ */ jsx52(Crown, { size: 12, weight: "fill", "aria-hidden": true }) : null;
|
|
3246
3311
|
if (type === "add" || type === "multiple" && onClick) {
|
|
3247
|
-
return /* @__PURE__ */
|
|
3312
|
+
return /* @__PURE__ */ jsxs38("button", { ref, type: "button", className: classes, onClick, ...props, children: [
|
|
3248
3313
|
leading,
|
|
3249
3314
|
children
|
|
3250
3315
|
] });
|
|
3251
3316
|
}
|
|
3252
|
-
return /* @__PURE__ */
|
|
3317
|
+
return /* @__PURE__ */ jsxs38("span", { ref, className: classes, ...props, children: [
|
|
3253
3318
|
leading,
|
|
3254
3319
|
children,
|
|
3255
|
-
onRemove && /* @__PURE__ */
|
|
3320
|
+
onRemove && /* @__PURE__ */ jsx52(
|
|
3256
3321
|
"button",
|
|
3257
3322
|
{
|
|
3258
3323
|
type: "button",
|
|
3259
3324
|
"aria-label": typeof children === "string" ? `Remove ${children}` : "Remove",
|
|
3260
3325
|
onClick: onRemove,
|
|
3261
3326
|
className: "inline-flex size-3 items-center justify-center rounded-xs",
|
|
3262
|
-
children: /* @__PURE__ */
|
|
3327
|
+
children: /* @__PURE__ */ jsx52(X6, { size: 12, "aria-hidden": true })
|
|
3263
3328
|
}
|
|
3264
3329
|
)
|
|
3265
3330
|
] });
|
|
@@ -3268,23 +3333,23 @@ var EditableTag = React50.forwardRef(
|
|
|
3268
3333
|
EditableTag.displayName = "EditableTag";
|
|
3269
3334
|
|
|
3270
3335
|
// src/components/Research-Specific/ActivityStructure.tsx
|
|
3271
|
-
import { jsx as
|
|
3272
|
-
var ActivityStructure =
|
|
3273
|
-
({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", children, ...props }, ref) => /* @__PURE__ */
|
|
3336
|
+
import { jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3337
|
+
var ActivityStructure = React52.forwardRef(
|
|
3338
|
+
({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", children, ...props }, ref) => /* @__PURE__ */ jsxs39(
|
|
3274
3339
|
"section",
|
|
3275
3340
|
{
|
|
3276
3341
|
ref,
|
|
3277
3342
|
className: cn("flex w-full max-w-96.5 flex-col gap-4 rounded-xl bg-surface p-4", className),
|
|
3278
3343
|
...props,
|
|
3279
3344
|
children: [
|
|
3280
|
-
/* @__PURE__ */
|
|
3281
|
-
stats.length > 0 && /* @__PURE__ */
|
|
3282
|
-
sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */
|
|
3283
|
-
/* @__PURE__ */
|
|
3284
|
-
/* @__PURE__ */
|
|
3285
|
-
(tags?.length || onAddTag) && /* @__PURE__ */
|
|
3286
|
-
tags?.map((tag) => /* @__PURE__ */
|
|
3287
|
-
onAddTag && /* @__PURE__ */
|
|
3345
|
+
/* @__PURE__ */ jsx53("h3", { className: "text-heading-h3 text-primary", children: title }),
|
|
3346
|
+
stats.length > 0 && /* @__PURE__ */ jsx53("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ jsx53(StatCard, { ...stat }, id)) }),
|
|
3347
|
+
sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-2", children: [
|
|
3348
|
+
/* @__PURE__ */ jsx53("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
|
|
3349
|
+
/* @__PURE__ */ jsx53("div", { className: "text-body-base text-surface-foreground", children: body }),
|
|
3350
|
+
(tags?.length || onAddTag) && /* @__PURE__ */ jsxs39("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
3351
|
+
tags?.map((tag) => /* @__PURE__ */ jsx53(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
|
|
3352
|
+
onAddTag && /* @__PURE__ */ jsx53(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
|
|
3288
3353
|
] })
|
|
3289
3354
|
] }, id)),
|
|
3290
3355
|
children
|
|
@@ -3295,10 +3360,10 @@ var ActivityStructure = React51.forwardRef(
|
|
|
3295
3360
|
ActivityStructure.displayName = "ActivityStructure";
|
|
3296
3361
|
|
|
3297
3362
|
// src/components/Tags & Badges/Badge.tsx
|
|
3298
|
-
import * as
|
|
3363
|
+
import * as React53 from "react";
|
|
3299
3364
|
import { DotsSixVertical as DotsSixVertical5, RadioButton as RadioButton2 } from "@phosphor-icons/react";
|
|
3300
3365
|
import { cva as cva8 } from "class-variance-authority";
|
|
3301
|
-
import { jsx as
|
|
3366
|
+
import { jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
3302
3367
|
var roleTagVariants = cva8(
|
|
3303
3368
|
"group inline-flex h-6 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors",
|
|
3304
3369
|
{
|
|
@@ -3324,11 +3389,11 @@ var roleTagVariants = cva8(
|
|
|
3324
3389
|
defaultVariants: { type: "primary", selected: false }
|
|
3325
3390
|
}
|
|
3326
3391
|
);
|
|
3327
|
-
var Badge =
|
|
3392
|
+
var Badge = React53.forwardRef(
|
|
3328
3393
|
({ className, type = "primary", selected = false, onClick, children, ...props }, ref) => {
|
|
3329
3394
|
const classes = cn(roleTagVariants({ type, selected: type === "interactable" ? selected : false }), className);
|
|
3330
3395
|
if (type === "interactable") {
|
|
3331
|
-
return /* @__PURE__ */
|
|
3396
|
+
return /* @__PURE__ */ jsxs40(
|
|
3332
3397
|
"button",
|
|
3333
3398
|
{
|
|
3334
3399
|
ref,
|
|
@@ -3338,15 +3403,15 @@ var Badge = React52.forwardRef(
|
|
|
3338
3403
|
onClick,
|
|
3339
3404
|
...props,
|
|
3340
3405
|
children: [
|
|
3341
|
-
/* @__PURE__ */
|
|
3406
|
+
/* @__PURE__ */ jsx54(DotsSixVertical5, { size: 16, "aria-hidden": true, className: "hidden shrink-0 group-hover:block" }),
|
|
3342
3407
|
children
|
|
3343
3408
|
]
|
|
3344
3409
|
}
|
|
3345
3410
|
);
|
|
3346
3411
|
}
|
|
3347
|
-
return /* @__PURE__ */
|
|
3348
|
-
type === "question" && /* @__PURE__ */
|
|
3349
|
-
type === "id" && /* @__PURE__ */
|
|
3412
|
+
return /* @__PURE__ */ jsxs40("span", { ref, className: classes, ...props, children: [
|
|
3413
|
+
type === "question" && /* @__PURE__ */ jsx54(RadioButton2, { size: 16, weight: "fill", "aria-hidden": true }),
|
|
3414
|
+
type === "id" && /* @__PURE__ */ jsx54("span", { className: "text-secondary-muted-foreground", children: "ID" }),
|
|
3350
3415
|
children
|
|
3351
3416
|
] });
|
|
3352
3417
|
}
|
|
@@ -3354,9 +3419,9 @@ var Badge = React52.forwardRef(
|
|
|
3354
3419
|
Badge.displayName = "Badge";
|
|
3355
3420
|
|
|
3356
3421
|
// src/components/Utility/Pagination.tsx
|
|
3357
|
-
import * as
|
|
3422
|
+
import * as React54 from "react";
|
|
3358
3423
|
import { ArrowLeft, ArrowRight, DotsThree as DotsThree2 } from "@phosphor-icons/react";
|
|
3359
|
-
import { jsx as
|
|
3424
|
+
import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
3360
3425
|
function getPaginationItems(page, pageCount, siblings = 1) {
|
|
3361
3426
|
const keep = /* @__PURE__ */ new Set([1, pageCount]);
|
|
3362
3427
|
for (let p = page - siblings; p <= page + siblings; p++) if (p >= 1 && p <= pageCount) keep.add(p);
|
|
@@ -3370,10 +3435,10 @@ function getPaginationItems(page, pageCount, siblings = 1) {
|
|
|
3370
3435
|
});
|
|
3371
3436
|
return items;
|
|
3372
3437
|
}
|
|
3373
|
-
var Pagination =
|
|
3438
|
+
var Pagination = React54.forwardRef(
|
|
3374
3439
|
({ className, page, pageCount, onPageChange, variant = "full", siblings = 1, ...props }, ref) => {
|
|
3375
3440
|
const go = (next2) => onPageChange(Math.min(pageCount, Math.max(1, next2)));
|
|
3376
|
-
const previous = /* @__PURE__ */
|
|
3441
|
+
const previous = /* @__PURE__ */ jsx55(
|
|
3377
3442
|
Button,
|
|
3378
3443
|
{
|
|
3379
3444
|
type: "button",
|
|
@@ -3382,10 +3447,10 @@ var Pagination = React53.forwardRef(
|
|
|
3382
3447
|
"aria-label": "Previous page",
|
|
3383
3448
|
disabled: page <= 1,
|
|
3384
3449
|
onClick: () => go(page - 1),
|
|
3385
|
-
children: /* @__PURE__ */
|
|
3450
|
+
children: /* @__PURE__ */ jsx55(ArrowLeft, { size: 16, "aria-hidden": true })
|
|
3386
3451
|
}
|
|
3387
3452
|
);
|
|
3388
|
-
const next = /* @__PURE__ */
|
|
3453
|
+
const next = /* @__PURE__ */ jsx55(
|
|
3389
3454
|
Button,
|
|
3390
3455
|
{
|
|
3391
3456
|
type: "button",
|
|
@@ -3394,10 +3459,10 @@ var Pagination = React53.forwardRef(
|
|
|
3394
3459
|
"aria-label": "Next page",
|
|
3395
3460
|
disabled: page >= pageCount,
|
|
3396
3461
|
onClick: () => go(page + 1),
|
|
3397
|
-
children: /* @__PURE__ */
|
|
3462
|
+
children: /* @__PURE__ */ jsx55(ArrowRight, { size: 16, "aria-hidden": true })
|
|
3398
3463
|
}
|
|
3399
3464
|
);
|
|
3400
|
-
return /* @__PURE__ */
|
|
3465
|
+
return /* @__PURE__ */ jsxs41(
|
|
3401
3466
|
"nav",
|
|
3402
3467
|
{
|
|
3403
3468
|
ref,
|
|
@@ -3406,14 +3471,14 @@ var Pagination = React53.forwardRef(
|
|
|
3406
3471
|
...props,
|
|
3407
3472
|
children: [
|
|
3408
3473
|
previous,
|
|
3409
|
-
variant === "compact" ? /* @__PURE__ */
|
|
3474
|
+
variant === "compact" ? /* @__PURE__ */ jsxs41("span", { className: "text-body-small text-surface-foreground", "aria-live": "polite", children: [
|
|
3410
3475
|
page,
|
|
3411
3476
|
"/",
|
|
3412
3477
|
pageCount
|
|
3413
|
-
] }) : /* @__PURE__ */
|
|
3414
|
-
/* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
] }) : /* @__PURE__ */
|
|
3478
|
+
] }) : /* @__PURE__ */ jsx55("ul", { className: "flex items-center gap-2", children: getPaginationItems(page, pageCount, siblings).map((item, index) => /* @__PURE__ */ jsx55("li", { children: item === "ellipsis" ? /* @__PURE__ */ jsxs41("span", { className: "inline-flex size-8 items-center justify-center rounded-sm border border-border bg-surface text-surface-foreground", children: [
|
|
3479
|
+
/* @__PURE__ */ jsx55(DotsThree2, { size: 16, "aria-hidden": true }),
|
|
3480
|
+
/* @__PURE__ */ jsx55("span", { className: "sr-only", children: "More pages" })
|
|
3481
|
+
] }) : /* @__PURE__ */ jsx55(
|
|
3417
3482
|
Button,
|
|
3418
3483
|
{
|
|
3419
3484
|
type: "button",
|
|
@@ -3517,6 +3582,7 @@ export {
|
|
|
3517
3582
|
Slider,
|
|
3518
3583
|
StatCard,
|
|
3519
3584
|
StatusTag,
|
|
3585
|
+
StimulusCard,
|
|
3520
3586
|
Switch,
|
|
3521
3587
|
TabItem,
|
|
3522
3588
|
TabNavigation,
|