@assure-one/design-system 1.17.0 → 1.17.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.
- package/dist/index.d.ts +43 -2
- package/dist/index.js +229 -27
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2927,7 +2927,7 @@ interface QuestionnairePanelProps extends Omit<React.HTMLAttributes<HTMLElement>
|
|
|
2927
2927
|
}
|
|
2928
2928
|
declare const QuestionnairePanel: React$1.ForwardRefExoticComponent<QuestionnairePanelProps & React$1.RefAttributes<HTMLElement>>;
|
|
2929
2929
|
|
|
2930
|
-
type QuestionType = "short-text" | "long-text" | "email" | "phone" | "ssn-sin" | "date" | "number" | "currency" | "percentage" | "single-choice" | "multi-choice" | "yes-no" | "dropdown" | "multi-select" | "address" | "file-upload" | "table" | "repeater" | "signature" | "section-header" | "consent-checkbox";
|
|
2930
|
+
type QuestionType = "short-text" | "long-text" | "email" | "phone" | "ssn-sin" | "date" | "number" | "currency" | "percentage" | "single-choice" | "multi-choice" | "yes-no" | "dropdown" | "multi-select" | "address" | "file-upload" | "table" | "repeater" | "signature" | "section-header" | "consent-checkbox" | "name" | "labeled-table" | "number-stepper";
|
|
2931
2931
|
interface QuestionOption {
|
|
2932
2932
|
value: string;
|
|
2933
2933
|
label: string;
|
|
@@ -2943,6 +2943,18 @@ interface QuestionAddressValue {
|
|
|
2943
2943
|
postalCode?: string;
|
|
2944
2944
|
country?: string;
|
|
2945
2945
|
}
|
|
2946
|
+
/** Personal-name payload for the `name` variant. */
|
|
2947
|
+
interface QuestionNameValue {
|
|
2948
|
+
first?: string;
|
|
2949
|
+
middle?: string;
|
|
2950
|
+
last?: string;
|
|
2951
|
+
suffix?: string;
|
|
2952
|
+
}
|
|
2953
|
+
/** Question-level help/tip rendered as a tooltip beside the title. */
|
|
2954
|
+
interface QuestionHelp {
|
|
2955
|
+
title?: string;
|
|
2956
|
+
body: string;
|
|
2957
|
+
}
|
|
2946
2958
|
interface QuestionTableColumn {
|
|
2947
2959
|
key: string;
|
|
2948
2960
|
label: string;
|
|
@@ -2950,6 +2962,20 @@ interface QuestionTableColumn {
|
|
|
2950
2962
|
inputType?: "text" | "number" | "date" | "currency";
|
|
2951
2963
|
}
|
|
2952
2964
|
type QuestionTableRow = Record<string, string>;
|
|
2965
|
+
/** Column of the fixed `labeled-table` matrix. `width` is a relative grid weight. */
|
|
2966
|
+
interface QuestionLabeledColumn {
|
|
2967
|
+
key: string;
|
|
2968
|
+
title: string;
|
|
2969
|
+
width?: number;
|
|
2970
|
+
inputType?: "text" | "number" | "date" | "currency";
|
|
2971
|
+
}
|
|
2972
|
+
/** Fixed row header (down the left edge) of the `labeled-table` matrix. */
|
|
2973
|
+
interface QuestionLabeledRow {
|
|
2974
|
+
key: string;
|
|
2975
|
+
title: string;
|
|
2976
|
+
}
|
|
2977
|
+
/** Cell text for the `labeled-table` matrix, keyed rowKey → colKey → value. */
|
|
2978
|
+
type QuestionLabeledValue = Record<string, Record<string, string>>;
|
|
2953
2979
|
interface QuestionFileValue {
|
|
2954
2980
|
name: string;
|
|
2955
2981
|
size?: number;
|
|
@@ -2968,17 +2994,32 @@ interface QuestionsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onC
|
|
|
2968
2994
|
value?: string;
|
|
2969
2995
|
values?: string[];
|
|
2970
2996
|
placeholder?: string;
|
|
2997
|
+
help?: QuestionHelp;
|
|
2971
2998
|
addressValue?: QuestionAddressValue;
|
|
2999
|
+
nameValue?: QuestionNameValue;
|
|
3000
|
+
showSuffix?: boolean;
|
|
2972
3001
|
tableColumns?: QuestionTableColumn[];
|
|
2973
3002
|
tableRows?: QuestionTableRow[];
|
|
3003
|
+
labeledColumns?: QuestionLabeledColumn[];
|
|
3004
|
+
labeledRows?: QuestionLabeledRow[];
|
|
3005
|
+
labeledValue?: QuestionLabeledValue;
|
|
2974
3006
|
files?: QuestionFileValue[];
|
|
2975
3007
|
accept?: string;
|
|
2976
3008
|
maxSize?: number;
|
|
2977
3009
|
multiple?: boolean;
|
|
2978
3010
|
currencySymbol?: string;
|
|
3011
|
+
/** Lower bound for `number-stepper`, and for a count-driven `repeater`. */
|
|
3012
|
+
min?: number;
|
|
3013
|
+
/** Upper bound for `number-stepper`, and max item count for a count-driven `repeater`. */
|
|
3014
|
+
max?: number;
|
|
3015
|
+
step?: number;
|
|
3016
|
+
/** When set on a `repeater`, renders a bounded stepper that drives the number of item grids. */
|
|
3017
|
+
countLabel?: string;
|
|
2979
3018
|
onValueChange?: (value: string) => void;
|
|
2980
3019
|
onValuesChange?: (values: string[]) => void;
|
|
2981
3020
|
onAddressChange?: (value: QuestionAddressValue) => void;
|
|
3021
|
+
onNameChange?: (value: QuestionNameValue) => void;
|
|
3022
|
+
onLabeledChange?: (value: QuestionLabeledValue) => void;
|
|
2982
3023
|
onTableRowsChange?: (rows: QuestionTableRow[]) => void;
|
|
2983
3024
|
onFilesSelected?: (files: File[]) => void;
|
|
2984
3025
|
}
|
|
@@ -5221,4 +5262,4 @@ declare namespace SignatureEditor {
|
|
|
5221
5262
|
|
|
5222
5263
|
declare function cn(...inputs: ClassValue[]): string;
|
|
5223
5264
|
|
|
5224
|
-
export { AIReceiptPanel, type AIReceiptPanelProps, type AIReceiptResult, Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActivityDotVariant, ActivityEventItem, type ActivityEventItemProps, ActivityItem, type ActivityItemProps, ActivityList, type ActivityListProps, type AgreementFirm, AgreementPaneHeading, type AgreementPaneHeadingProps, type AgreementStatus, type AgreementStep, AgreementViewer, type AgreementViewerProps, AiDraftCard, type AiDraftCardProps, type AiDraftState, Alert, AlertCircleIcon, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, AlertTriangleIcon, AlertTriangleSolidIcon, AppHeader, AppHeaderActions, type AppHeaderActionsProps, AppHeaderBreadcrumb, type AppHeaderBreadcrumbProps, type AppHeaderProps, AppHeaderSearch, type AppHeaderSearchProps, AppHeaderTitle, type AppHeaderTitleProps, AreaChart, type AreaChartProps, type AreaPoint, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightSmallIcon, ArrowUpIcon, AspectRatio, Assignee, AssureAuditBrandIcon, AssureBooksBrandIcon, AssureProBrandIcon, AssureTaxBrandIcon, AtSignIcon, AttachmentChip, type AttachmentChipProps, AttentionItem, type AttentionItemProps, type AttentionUrgency, Avatar, Badge, type BadgeProps, BarChartIcon, BellIcon, Blockquote, BoldIcon, BottomNav, type BottomNavProps, type BottomNavTab, type BrandIconProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, BriefcaseIcon, Building2Icon, BuildingIcon, BulkActionBar, BulkActionBarAction, type BulkActionBarActionProps, type BulkActionBarProps, BulkActionBarSeparator, type BulkActionBarVariant, Button, type ButtonProps, COUNTRY_CODES, Calendar, type CalendarHighlight, type CalendarHighlightColor, CalendarIcon, type CalendarProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardVariants, CategoryDivider, type CategoryDividerProps, CategoryTag, type CategoryTagProps, type CategoryTone, type CellValue, type ChannelTabItem, ChannelTabs, type ChannelTabsProps, type ChannelTone, ChatBubbleIcon, CheckCircle2Icon, CheckCircleSolidIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleDotIcon, CircleIcon, ClientRailGroupHeader, type ClientRailGroupHeaderProps, ClientRailItem, type ClientRailItemProps, ClientSelect, type ClientSelectOption, ClipboardCheckIcon, ClockIcon, CloseIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, ComingSoon, type ComingSoonProps, CommandIcon, type CommandItem, CommandPalette, ConfirmActionButton, type ConfirmActionButtonProps, Content, type ContentProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, CopyIcon, CornerDownLeftIcon, type CountryCode, CountryFlag, CountrySelect, CreditCardIcon, DATE_DISPLAY_PLACEHOLDER, DangerAction, type DangerActionProps, Dash, DashGrid, type DashGridProps, type DashWidget, DataItem, DataTable, DataTableBody, type DataTableBodyProps, DataTableCell, DataTableCellDue, type DataTableCellDueProps, DataTableCellId, DataTableCellMono, DataTableCellName, type DataTableCellProps, DataTableCheckbox, type DataTableCheckboxProps, DataTableHead, type DataTableHeadProps, DataTableHeader, type DataTableHeaderProps, DataTablePagination, type DataTablePaginationProps, type DataTableProps, DataTableResultsCount, type DataTableResultsCountProps, DataTableRow, type DataTableRowProps, DataTableSearch, type DataTableSearchProps, DataTableSpacer, type DataTableSpacerProps, DataTableToolbar, type DataTableToolbarProps, DataTableView, type DataTableViewColumn, type DataTableViewFilter, type DataTableViewProps, DatePicker, DateRangePicker, type DateRangeValue, DetailGrid, type DetailGridProps, DetailMain, type DetailMainProps, DetailSpine, DetailSpineHeader, type DetailSpineHeaderProps, type DetailSpineProps, DetailSpineSection, type DetailSpineSectionProps, DetailSpineStats, type DetailSpineStatsProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DismissibleChip, DocumentDetailActions, type DocumentDetailActionsProps, DocumentDetailBody, type DocumentDetailBodyProps, DocumentDetailHeader, type DocumentDetailHeaderProps, DocumentDetailMetaRow, type DocumentDetailMetaRowProps, DocumentDetailPanel, type DocumentDetailPanelProps, DocumentDetailRequester, type DocumentDetailRequesterProps, DocumentDetailTitle, type DocumentDetailTitleProps, DocumentFileCard, type DocumentFileCardProps, DocumentFileRow, type DocumentFileRowProps, DocumentIcon, type DocumentItemState, DocumentList, type DocumentListProps, DocumentListSection, type DocumentListSectionProps, type DocumentRequestActivityKind, type DocumentRequestAssigneeOption, DocumentRequestCard, type DocumentRequestCardProps, DocumentRequestDetail, type DocumentRequestDetailActivityEvent, type DocumentRequestDetailComment, type DocumentRequestDetailDoc, type DocumentRequestDetailProps, type DocumentRequestDetailTab, DocumentRequestField, type DocumentRequestFieldProps, type DocumentRequestItemSummary, type DocumentRequestRequestedItem, type DocumentRequestReviewStatusOption, type DocumentRequestTone, DocumentRow, type DocumentRowProps, type DocumentSource, DocumentSourceFilter, type DocumentSourceFilterProps, type DocumentSourceFilterValue, DocumentSourceTag, type DocumentSourceTagProps, DocumentsWorkspaceLayout, type DocumentsWorkspaceLayoutProps, DollarSignIcon, DonutChart, type DonutChartProps, type DonutSegment, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmailMessageCard, type EmailMessageCardProps, EmptyState, type EmptyStateProps, EngagementCard, type EngagementCardProps, EngagementTimeline, type EngagementTimelineProps, EngagementTimelineStep, type EngagementTimelineStepProps, ExtractIcon, EyeIcon, EyeOffIcon, Eyebrow, type EyebrowProps, FileChip, type FileChipProps, FileIcon, type FileKind, FileReturnIcon, FileTextIcon, FileTypeBadge, type FileTypeBadgeProps, type FileTypeTone, FileUpload, FilterChip, type FilterChipProps, FilterIcon, FlagIcon, FolderClosedIcon, type FolderNode, FolderOpenIcon, FolderPlusIcon, FolderTree, type FolderTreeProps, FolderUpIcon, FormError, FormSection, FormSuccess, GlobeIcon, GoogleBrandIcon, HelpCircleIcon, HistoryIcon, HomeIcon, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, IconAction, type IconActionProps, IconTile, type IconTileProps, InboxIcon, InfoCircleSolidIcon, InfoIcon, Input, type InputVariants, IntentBadge, type IntentBadgeProps, type IntentTone, ItalicIcon, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, KanbanIcon, type KanbanProps, KbdHint, type KbdHintProps, KeyIcon, type KeyboardShortcut, type KeyboardShortcutSection, KeyboardShortcutsDialog, type KeyboardShortcutsDialogProps, KpiCard, type KpiCardProps, type KpiDelta, Label, LandmarkIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutListIcon, LightningIcon, Link2Icon, LinkAction, type LinkActionProps, LinkButton, LinkIcon, ListChecksIcon, ListIcon, ListOrderedIcon, LoaderIcon, LoadingRows, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, Logo, MailIcon, Main, type MainProps, MapPinIcon, MasterDetailLayout, type MasterDetailLayoutProps, MenuIcon, MessageBubble, MessageBubbleAction, type MessageBubbleActionProps, type MessageBubbleProps, MessageBubbleTombstone, type MessageBubbleTombstoneProps, MessageCircleIcon, MessageCircleWarningIcon, MessageComposer, type MessageComposerProps, MetadataGrid, MicrosoftBrandIcon, MinusIcon, type MissingDocumentItem, MissingDocumentsPanel, type MissingDocumentsPanelProps, MoneyCell, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoveIcon, MultiFilterPill, MultiSelectField, MutedSpec, type MutedSpecProps, NewMenu, type NewMenuAction, type NewMenuGroup, type NewMenuProps, NotificationFilter, type NotificationFilterProps, type NotificationFilterValue, NotificationItem, type NotificationItemProps, NotificationList, type NotificationListProps, NotificationPanel, NotificationPanelFooter, type NotificationPanelFooterProps, NotificationPanelHeader, type NotificationPanelHeaderProps, type NotificationPanelProps, Numeric, type NumericProps, OTPInput, PageHeader, type PageHeaderProps, PageHeaderSep, type PageHeaderSepProps, PageHeaderSpec, type PageHeaderSpecProps, Pagination, type PaginationProps, PaletteIcon, PanelLeftCloseIcon, PanelLeftIcon, PaperclipIcon, PauseIcon, PdfPreview, type PdfPreviewProps, PenSignIcon, PenToolIcon, PencilIcon, PhoneCountryInput, PhoneIcon, PhoneInput, type PillStatus, PlayIcon, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PrimaryAction, type PrimaryActionProps, type Priority, PriorityIcon, type PriorityIconProps, ProgressBar, type ProgressBarProps, ProgressRing, type ProgressRingProps, ProposalAddOn, type ProposalAddOnProps, type ProposalBillingMode, type ProposalBillingRow, ProposalBillingTerms, type ProposalBillingTermsProps, ProposalConsentGate, type ProposalConsentGateProps, ProposalCustomPage, type ProposalCustomPageKind, type ProposalCustomPageProps, ProposalNote, type ProposalNoteProps, ProposalPackageCard, type ProposalPackageCardProps, type ProposalPackageMode, ProposalPaymentCapture, type ProposalPaymentCaptureProps, ProposalPricingSummary, type ProposalPricingSummaryProps, ProposalServiceRow, type ProposalServiceRowProps, ProposalSignatureBlock, type ProposalSignatureBlockProps, type ProposalSigner, ProposalSignerList, type ProposalSignerListProps, type ProposalSignerStatus, type QuestionAddressValue, type QuestionFileValue, type QuestionOption, type QuestionTableColumn, type QuestionTableRow, type QuestionType, QuestionnairePanel, type QuestionnairePanelGroup, type QuestionnairePanelProps, type QuestionnairePanelSection, type QuestionnairePanelStatus, Questions, type QuestionsProps, type QuickReplyChip, RadioGroup, RadioGroupItem, type RankedBar, RankedBars, type RankedBarsProps, ReceiptIcon, ReplyIcon, ResponsiveDialog, type ResponsiveDialogProps, RotateCcwIcon, RouteTransition, type RouteTransitionProps, SERVICE_TONES, SaveIcon, ScrollArea, ScrollBar, SearchIcon, SearchInput, type SearchInputVariants, SearchSelect, type SearchSelectOption, SecondaryAction, type SecondaryActionProps, Section, SectionHead, SectionHeader, SegmentedProgress, type SegmentedProgressProps, type SegmentedTone, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, type SelectProps, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableKpiCard, type SelectableKpiCardProps, SendIcon, Separator, type ServiceTone, SettingsIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Shell, type ShellProps, ShieldIcon, SideDrawer, Sidebar, SidebarBrand, type SidebarBrandProps, SidebarBrandSwitcher, type SidebarBrandSwitcherItem, type SidebarBrandSwitcherProps, SidebarBrandSwitcherTile, SidebarBrandText, type SidebarBrandTextProps, SidebarFooter, type SidebarFooterProps, SidebarLink, SidebarLinkAction, type SidebarLinkActionProps, SidebarLinkBadge, type SidebarLinkBadgeProps, type SidebarLinkBadgeVariants, SidebarLinkGroup, type SidebarLinkGroupProps, SidebarLinkLabel, type SidebarLinkLabelProps, type SidebarLinkProps, SidebarPinButton, type SidebarPinButtonProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarSection, type SidebarSectionProps, type SidebarState, SidebarTrigger, type SidebarTriggerProps, SidebarUser, type SidebarUserProps, SignatureEditor, type SignatureEditorProps, Skeleton, SkeletonCircle, SkeletonText, SlashIcon, Slider, SmartphoneIcon, type SortDirection, SparkleIcon, SparklesIcon, Spinner, type SpinnerProps, SpreadsheetPreview, type SpreadsheetPreviewProps, StackedBarChart, type StackedBarChartProps, type StackedBarDatum, type StackedBarSeries, StagePill, StarIcon, StarRating, type StarRatingProps, Stat, StatusDot, type StatusDotProps, StatusIcon, type StatusIconProps, StatusPill, type StatusPillProps, type StatusState, type Step, Stepper, type StepperProps, StickyActionBar, type StickyActionBarProps, StopIcon, StrikethroughIcon, SubmitButton, SuggestionPills, type SuggestionPillsProps, SuiteProgress, type SuiteProgressProps, type SuiteProgressSize, type SuiteProgressTone, SunIcon, Switch, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TableIcon, type TableProps, TableRow, type TableRowData, type TableRowProps, type TableTone, Tabs, TabsContent, TabsList, TabsTrigger, TagIcon, TagsCell, TeamIcon, TeamMemberSelect, Textarea, type TextareaVariants, TimeLogger, TimeLoggerActions, type TimeLoggerActionsProps, TimeLoggerBillable, type TimeLoggerBillableProps, TimeLoggerContextRow, type TimeLoggerContextRowProps, TimeLoggerEntry, TimeLoggerEntryList, type TimeLoggerEntryListProps, type TimeLoggerEntryProps, TimeLoggerField, type TimeLoggerFieldProps, TimeLoggerFooter, type TimeLoggerFooterProps, TimeLoggerHeader, type TimeLoggerHeaderProps, TimeLoggerNotes, type TimeLoggerNotesProps, type TimeLoggerPhase, type TimeLoggerProps, type TimeLoggerTier, TimeLoggerTimer, type TimeLoggerTimerProps, type TimelineState, type ToastAction, type ToastContextValue, type ToastOptions, ToastProvider, type ToastVariant, ToggleGroup, ToggleGroupItem, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Trash2Icon, TrashIcon, TrendingDownIcon, TrendingUpIcon, UnderlineIcon, UploadIcon, type UseStopwatchReturn, UserCircleIcon, UserIcon, UsersIcon, VisuallyHidden, WorkflowIcon, XCircleSolidIcon, XIcon, YEAR_DISPLAY_PLACEHOLDER, ZoomInIcon, ZoomOutIcon, alertVariants, applyMask, applyYearMask, attachmentChipVariants, badgeVariants, buttonVariants, cardVariants, cn, dateToIso, displayToIso, fileTypeBadgeVariants, fileTypeFromName, filterChipVariants, formatClock, formatCurrency, formatDuration, getFlagEmoji, iconTileVariants, inputVariants, isoToDate, isoToDisplay, isoToYear, labelVariants, parseDuration, parsePhoneForEditing, progressBarVariants, progressRingVariants, searchInputVariants, serviceToneLabel, serviceToneStyle, sidebarLinkBadgeVariants, spinnerVariants, starRatingVariants, statusDotVariants, suiteProgressFillVariants, textareaVariants, useSidebarPeekLock, useSidebarState, useStopwatch, useToast, yearToIso };
|
|
5265
|
+
export { AIReceiptPanel, type AIReceiptPanelProps, type AIReceiptResult, Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActivityDotVariant, ActivityEventItem, type ActivityEventItemProps, ActivityItem, type ActivityItemProps, ActivityList, type ActivityListProps, type AgreementFirm, AgreementPaneHeading, type AgreementPaneHeadingProps, type AgreementStatus, type AgreementStep, AgreementViewer, type AgreementViewerProps, AiDraftCard, type AiDraftCardProps, type AiDraftState, Alert, AlertCircleIcon, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, AlertTriangleIcon, AlertTriangleSolidIcon, AppHeader, AppHeaderActions, type AppHeaderActionsProps, AppHeaderBreadcrumb, type AppHeaderBreadcrumbProps, type AppHeaderProps, AppHeaderSearch, type AppHeaderSearchProps, AppHeaderTitle, type AppHeaderTitleProps, AreaChart, type AreaChartProps, type AreaPoint, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightSmallIcon, ArrowUpIcon, AspectRatio, Assignee, AssureAuditBrandIcon, AssureBooksBrandIcon, AssureProBrandIcon, AssureTaxBrandIcon, AtSignIcon, AttachmentChip, type AttachmentChipProps, AttentionItem, type AttentionItemProps, type AttentionUrgency, Avatar, Badge, type BadgeProps, BarChartIcon, BellIcon, Blockquote, BoldIcon, BottomNav, type BottomNavProps, type BottomNavTab, type BrandIconProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, BriefcaseIcon, Building2Icon, BuildingIcon, BulkActionBar, BulkActionBarAction, type BulkActionBarActionProps, type BulkActionBarProps, BulkActionBarSeparator, type BulkActionBarVariant, Button, type ButtonProps, COUNTRY_CODES, Calendar, type CalendarHighlight, type CalendarHighlightColor, CalendarIcon, type CalendarProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardVariants, CategoryDivider, type CategoryDividerProps, CategoryTag, type CategoryTagProps, type CategoryTone, type CellValue, type ChannelTabItem, ChannelTabs, type ChannelTabsProps, type ChannelTone, ChatBubbleIcon, CheckCircle2Icon, CheckCircleSolidIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleDotIcon, CircleIcon, ClientRailGroupHeader, type ClientRailGroupHeaderProps, ClientRailItem, type ClientRailItemProps, ClientSelect, type ClientSelectOption, ClipboardCheckIcon, ClockIcon, CloseIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, ComingSoon, type ComingSoonProps, CommandIcon, type CommandItem, CommandPalette, ConfirmActionButton, type ConfirmActionButtonProps, Content, type ContentProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, CopyIcon, CornerDownLeftIcon, type CountryCode, CountryFlag, CountrySelect, CreditCardIcon, DATE_DISPLAY_PLACEHOLDER, DangerAction, type DangerActionProps, Dash, DashGrid, type DashGridProps, type DashWidget, DataItem, DataTable, DataTableBody, type DataTableBodyProps, DataTableCell, DataTableCellDue, type DataTableCellDueProps, DataTableCellId, DataTableCellMono, DataTableCellName, type DataTableCellProps, DataTableCheckbox, type DataTableCheckboxProps, DataTableHead, type DataTableHeadProps, DataTableHeader, type DataTableHeaderProps, DataTablePagination, type DataTablePaginationProps, type DataTableProps, DataTableResultsCount, type DataTableResultsCountProps, DataTableRow, type DataTableRowProps, DataTableSearch, type DataTableSearchProps, DataTableSpacer, type DataTableSpacerProps, DataTableToolbar, type DataTableToolbarProps, DataTableView, type DataTableViewColumn, type DataTableViewFilter, type DataTableViewProps, DatePicker, DateRangePicker, type DateRangeValue, DetailGrid, type DetailGridProps, DetailMain, type DetailMainProps, DetailSpine, DetailSpineHeader, type DetailSpineHeaderProps, type DetailSpineProps, DetailSpineSection, type DetailSpineSectionProps, DetailSpineStats, type DetailSpineStatsProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DismissibleChip, DocumentDetailActions, type DocumentDetailActionsProps, DocumentDetailBody, type DocumentDetailBodyProps, DocumentDetailHeader, type DocumentDetailHeaderProps, DocumentDetailMetaRow, type DocumentDetailMetaRowProps, DocumentDetailPanel, type DocumentDetailPanelProps, DocumentDetailRequester, type DocumentDetailRequesterProps, DocumentDetailTitle, type DocumentDetailTitleProps, DocumentFileCard, type DocumentFileCardProps, DocumentFileRow, type DocumentFileRowProps, DocumentIcon, type DocumentItemState, DocumentList, type DocumentListProps, DocumentListSection, type DocumentListSectionProps, type DocumentRequestActivityKind, type DocumentRequestAssigneeOption, DocumentRequestCard, type DocumentRequestCardProps, DocumentRequestDetail, type DocumentRequestDetailActivityEvent, type DocumentRequestDetailComment, type DocumentRequestDetailDoc, type DocumentRequestDetailProps, type DocumentRequestDetailTab, DocumentRequestField, type DocumentRequestFieldProps, type DocumentRequestItemSummary, type DocumentRequestRequestedItem, type DocumentRequestReviewStatusOption, type DocumentRequestTone, DocumentRow, type DocumentRowProps, type DocumentSource, DocumentSourceFilter, type DocumentSourceFilterProps, type DocumentSourceFilterValue, DocumentSourceTag, type DocumentSourceTagProps, DocumentsWorkspaceLayout, type DocumentsWorkspaceLayoutProps, DollarSignIcon, DonutChart, type DonutChartProps, type DonutSegment, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmailMessageCard, type EmailMessageCardProps, EmptyState, type EmptyStateProps, EngagementCard, type EngagementCardProps, EngagementTimeline, type EngagementTimelineProps, EngagementTimelineStep, type EngagementTimelineStepProps, ExtractIcon, EyeIcon, EyeOffIcon, Eyebrow, type EyebrowProps, FileChip, type FileChipProps, FileIcon, type FileKind, FileReturnIcon, FileTextIcon, FileTypeBadge, type FileTypeBadgeProps, type FileTypeTone, FileUpload, FilterChip, type FilterChipProps, FilterIcon, FlagIcon, FolderClosedIcon, type FolderNode, FolderOpenIcon, FolderPlusIcon, FolderTree, type FolderTreeProps, FolderUpIcon, FormError, FormSection, FormSuccess, GlobeIcon, GoogleBrandIcon, HelpCircleIcon, HistoryIcon, HomeIcon, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, IconAction, type IconActionProps, IconTile, type IconTileProps, InboxIcon, InfoCircleSolidIcon, InfoIcon, Input, type InputVariants, IntentBadge, type IntentBadgeProps, type IntentTone, ItalicIcon, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, KanbanIcon, type KanbanProps, KbdHint, type KbdHintProps, KeyIcon, type KeyboardShortcut, type KeyboardShortcutSection, KeyboardShortcutsDialog, type KeyboardShortcutsDialogProps, KpiCard, type KpiCardProps, type KpiDelta, Label, LandmarkIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutListIcon, LightningIcon, Link2Icon, LinkAction, type LinkActionProps, LinkButton, LinkIcon, ListChecksIcon, ListIcon, ListOrderedIcon, LoaderIcon, LoadingRows, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, Logo, MailIcon, Main, type MainProps, MapPinIcon, MasterDetailLayout, type MasterDetailLayoutProps, MenuIcon, MessageBubble, MessageBubbleAction, type MessageBubbleActionProps, type MessageBubbleProps, MessageBubbleTombstone, type MessageBubbleTombstoneProps, MessageCircleIcon, MessageCircleWarningIcon, MessageComposer, type MessageComposerProps, MetadataGrid, MicrosoftBrandIcon, MinusIcon, type MissingDocumentItem, MissingDocumentsPanel, type MissingDocumentsPanelProps, MoneyCell, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoveIcon, MultiFilterPill, MultiSelectField, MutedSpec, type MutedSpecProps, NewMenu, type NewMenuAction, type NewMenuGroup, type NewMenuProps, NotificationFilter, type NotificationFilterProps, type NotificationFilterValue, NotificationItem, type NotificationItemProps, NotificationList, type NotificationListProps, NotificationPanel, NotificationPanelFooter, type NotificationPanelFooterProps, NotificationPanelHeader, type NotificationPanelHeaderProps, type NotificationPanelProps, Numeric, type NumericProps, OTPInput, PageHeader, type PageHeaderProps, PageHeaderSep, type PageHeaderSepProps, PageHeaderSpec, type PageHeaderSpecProps, Pagination, type PaginationProps, PaletteIcon, PanelLeftCloseIcon, PanelLeftIcon, PaperclipIcon, PauseIcon, PdfPreview, type PdfPreviewProps, PenSignIcon, PenToolIcon, PencilIcon, PhoneCountryInput, PhoneIcon, PhoneInput, type PillStatus, PlayIcon, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PrimaryAction, type PrimaryActionProps, type Priority, PriorityIcon, type PriorityIconProps, ProgressBar, type ProgressBarProps, ProgressRing, type ProgressRingProps, ProposalAddOn, type ProposalAddOnProps, type ProposalBillingMode, type ProposalBillingRow, ProposalBillingTerms, type ProposalBillingTermsProps, ProposalConsentGate, type ProposalConsentGateProps, ProposalCustomPage, type ProposalCustomPageKind, type ProposalCustomPageProps, ProposalNote, type ProposalNoteProps, ProposalPackageCard, type ProposalPackageCardProps, type ProposalPackageMode, ProposalPaymentCapture, type ProposalPaymentCaptureProps, ProposalPricingSummary, type ProposalPricingSummaryProps, ProposalServiceRow, type ProposalServiceRowProps, ProposalSignatureBlock, type ProposalSignatureBlockProps, type ProposalSigner, ProposalSignerList, type ProposalSignerListProps, type ProposalSignerStatus, type QuestionAddressValue, type QuestionFileValue, type QuestionHelp, type QuestionLabeledColumn, type QuestionLabeledRow, type QuestionLabeledValue, type QuestionNameValue, type QuestionOption, type QuestionTableColumn, type QuestionTableRow, type QuestionType, QuestionnairePanel, type QuestionnairePanelGroup, type QuestionnairePanelProps, type QuestionnairePanelSection, type QuestionnairePanelStatus, Questions, type QuestionsProps, type QuickReplyChip, RadioGroup, RadioGroupItem, type RankedBar, RankedBars, type RankedBarsProps, ReceiptIcon, ReplyIcon, ResponsiveDialog, type ResponsiveDialogProps, RotateCcwIcon, RouteTransition, type RouteTransitionProps, SERVICE_TONES, SaveIcon, ScrollArea, ScrollBar, SearchIcon, SearchInput, type SearchInputVariants, SearchSelect, type SearchSelectOption, SecondaryAction, type SecondaryActionProps, Section, SectionHead, SectionHeader, SegmentedProgress, type SegmentedProgressProps, type SegmentedTone, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, type SelectProps, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableKpiCard, type SelectableKpiCardProps, SendIcon, Separator, type ServiceTone, SettingsIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Shell, type ShellProps, ShieldIcon, SideDrawer, Sidebar, SidebarBrand, type SidebarBrandProps, SidebarBrandSwitcher, type SidebarBrandSwitcherItem, type SidebarBrandSwitcherProps, SidebarBrandSwitcherTile, SidebarBrandText, type SidebarBrandTextProps, SidebarFooter, type SidebarFooterProps, SidebarLink, SidebarLinkAction, type SidebarLinkActionProps, SidebarLinkBadge, type SidebarLinkBadgeProps, type SidebarLinkBadgeVariants, SidebarLinkGroup, type SidebarLinkGroupProps, SidebarLinkLabel, type SidebarLinkLabelProps, type SidebarLinkProps, SidebarPinButton, type SidebarPinButtonProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarSection, type SidebarSectionProps, type SidebarState, SidebarTrigger, type SidebarTriggerProps, SidebarUser, type SidebarUserProps, SignatureEditor, type SignatureEditorProps, Skeleton, SkeletonCircle, SkeletonText, SlashIcon, Slider, SmartphoneIcon, type SortDirection, SparkleIcon, SparklesIcon, Spinner, type SpinnerProps, SpreadsheetPreview, type SpreadsheetPreviewProps, StackedBarChart, type StackedBarChartProps, type StackedBarDatum, type StackedBarSeries, StagePill, StarIcon, StarRating, type StarRatingProps, Stat, StatusDot, type StatusDotProps, StatusIcon, type StatusIconProps, StatusPill, type StatusPillProps, type StatusState, type Step, Stepper, type StepperProps, StickyActionBar, type StickyActionBarProps, StopIcon, StrikethroughIcon, SubmitButton, SuggestionPills, type SuggestionPillsProps, SuiteProgress, type SuiteProgressProps, type SuiteProgressSize, type SuiteProgressTone, SunIcon, Switch, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TableIcon, type TableProps, TableRow, type TableRowData, type TableRowProps, type TableTone, Tabs, TabsContent, TabsList, TabsTrigger, TagIcon, TagsCell, TeamIcon, TeamMemberSelect, Textarea, type TextareaVariants, TimeLogger, TimeLoggerActions, type TimeLoggerActionsProps, TimeLoggerBillable, type TimeLoggerBillableProps, TimeLoggerContextRow, type TimeLoggerContextRowProps, TimeLoggerEntry, TimeLoggerEntryList, type TimeLoggerEntryListProps, type TimeLoggerEntryProps, TimeLoggerField, type TimeLoggerFieldProps, TimeLoggerFooter, type TimeLoggerFooterProps, TimeLoggerHeader, type TimeLoggerHeaderProps, TimeLoggerNotes, type TimeLoggerNotesProps, type TimeLoggerPhase, type TimeLoggerProps, type TimeLoggerTier, TimeLoggerTimer, type TimeLoggerTimerProps, type TimelineState, type ToastAction, type ToastContextValue, type ToastOptions, ToastProvider, type ToastVariant, ToggleGroup, ToggleGroupItem, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Trash2Icon, TrashIcon, TrendingDownIcon, TrendingUpIcon, UnderlineIcon, UploadIcon, type UseStopwatchReturn, UserCircleIcon, UserIcon, UsersIcon, VisuallyHidden, WorkflowIcon, XCircleSolidIcon, XIcon, YEAR_DISPLAY_PLACEHOLDER, ZoomInIcon, ZoomOutIcon, alertVariants, applyMask, applyYearMask, attachmentChipVariants, badgeVariants, buttonVariants, cardVariants, cn, dateToIso, displayToIso, fileTypeBadgeVariants, fileTypeFromName, filterChipVariants, formatClock, formatCurrency, formatDuration, getFlagEmoji, iconTileVariants, inputVariants, isoToDate, isoToDisplay, isoToYear, labelVariants, parseDuration, parsePhoneForEditing, progressBarVariants, progressRingVariants, searchInputVariants, serviceToneLabel, serviceToneStyle, sidebarLinkBadgeVariants, spinnerVariants, starRatingVariants, statusDotVariants, suiteProgressFillVariants, textareaVariants, useSidebarPeekLock, useSidebarState, useStopwatch, useToast, yearToIso };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React38 from 'react';
|
|
3
|
-
import { forwardRef, useId, useRef, useState, useEffect, useCallback, useImperativeHandle, useMemo, createContext, useContext } from 'react';
|
|
3
|
+
import { forwardRef, useId, useRef, useState, useEffect, useCallback, useImperativeHandle, useMemo, createContext, Fragment as Fragment$1, useContext } from 'react';
|
|
4
4
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -11430,17 +11430,29 @@ var Questions = forwardRef(function Questions2({
|
|
|
11430
11430
|
value = "",
|
|
11431
11431
|
values = [],
|
|
11432
11432
|
placeholder,
|
|
11433
|
+
help,
|
|
11433
11434
|
addressValue = {},
|
|
11435
|
+
nameValue = {},
|
|
11436
|
+
showSuffix = true,
|
|
11434
11437
|
tableColumns = [],
|
|
11435
11438
|
tableRows = [],
|
|
11439
|
+
labeledColumns = [],
|
|
11440
|
+
labeledRows = [],
|
|
11441
|
+
labeledValue = {},
|
|
11436
11442
|
files = [],
|
|
11437
11443
|
accept,
|
|
11438
11444
|
maxSize,
|
|
11439
11445
|
multiple,
|
|
11440
11446
|
currencySymbol = "$",
|
|
11447
|
+
min = 0,
|
|
11448
|
+
max,
|
|
11449
|
+
step = 1,
|
|
11450
|
+
countLabel,
|
|
11441
11451
|
onValueChange,
|
|
11442
11452
|
onValuesChange,
|
|
11443
11453
|
onAddressChange,
|
|
11454
|
+
onNameChange,
|
|
11455
|
+
onLabeledChange,
|
|
11444
11456
|
onTableRowsChange,
|
|
11445
11457
|
onFilesSelected,
|
|
11446
11458
|
className,
|
|
@@ -11457,21 +11469,36 @@ var Questions = forwardRef(function Questions2({
|
|
|
11457
11469
|
const updateAddress = (key, nextValue) => {
|
|
11458
11470
|
onAddressChange?.({ ...addressValue, [key]: nextValue });
|
|
11459
11471
|
};
|
|
11472
|
+
const updateName = (key, nextValue) => {
|
|
11473
|
+
onNameChange?.({ ...nameValue, [key]: nextValue });
|
|
11474
|
+
};
|
|
11475
|
+
const updateCell = (rowKey, colKey, nextValue) => {
|
|
11476
|
+
onLabeledChange?.({
|
|
11477
|
+
...labeledValue,
|
|
11478
|
+
[rowKey]: { ...labeledValue[rowKey] ?? {}, [colKey]: nextValue }
|
|
11479
|
+
});
|
|
11480
|
+
};
|
|
11460
11481
|
const updateRow = (rowIndex, key, nextValue) => {
|
|
11461
11482
|
onTableRowsChange?.(
|
|
11462
11483
|
tableRows.map((row, index2) => index2 === rowIndex ? { ...row, [key]: nextValue } : row)
|
|
11463
11484
|
);
|
|
11464
11485
|
};
|
|
11486
|
+
const emptyRow = () => tableColumns.reduce((row, column) => ({ ...row, [column.key]: "" }), {});
|
|
11465
11487
|
const addRow = () => {
|
|
11466
|
-
|
|
11467
|
-
(row, column) => ({ ...row, [column.key]: "" }),
|
|
11468
|
-
{}
|
|
11469
|
-
);
|
|
11470
|
-
onTableRowsChange?.([...tableRows, emptyRow]);
|
|
11488
|
+
onTableRowsChange?.([...tableRows, emptyRow()]);
|
|
11471
11489
|
};
|
|
11472
11490
|
const removeRow = (rowIndex) => {
|
|
11473
11491
|
onTableRowsChange?.(tableRows.filter((_, index2) => index2 !== rowIndex));
|
|
11474
11492
|
};
|
|
11493
|
+
const setRowCount = (nextCount) => {
|
|
11494
|
+
const clamped = Math.max(min, max != null ? Math.min(nextCount, max) : nextCount);
|
|
11495
|
+
if (clamped > tableRows.length) {
|
|
11496
|
+
const added = Array.from({ length: clamped - tableRows.length }, emptyRow);
|
|
11497
|
+
onTableRowsChange?.([...tableRows, ...added]);
|
|
11498
|
+
} else if (clamped < tableRows.length) {
|
|
11499
|
+
onTableRowsChange?.(tableRows.slice(0, clamped));
|
|
11500
|
+
}
|
|
11501
|
+
};
|
|
11475
11502
|
return /* @__PURE__ */ jsxs(
|
|
11476
11503
|
"section",
|
|
11477
11504
|
{
|
|
@@ -11505,6 +11532,7 @@ var Questions = forwardRef(function Questions2({
|
|
|
11505
11532
|
children: title
|
|
11506
11533
|
}
|
|
11507
11534
|
),
|
|
11535
|
+
help && /* @__PURE__ */ jsx(HelpTip, { title: help.title ?? title, body: help.body }),
|
|
11508
11536
|
required && /* @__PURE__ */ jsx("span", { className: "bg-pro-bg text-pro-fg rounded-full px-2 py-0.5 text-[11px] font-bold", children: "Required" })
|
|
11509
11537
|
] }),
|
|
11510
11538
|
description && type !== "consent-checkbox" && /* @__PURE__ */ jsx("p", { className: "text-fg-3 mt-1 text-[13px] leading-5", children: description })
|
|
@@ -11575,6 +11603,17 @@ var Questions = forwardRef(function Questions2({
|
|
|
11575
11603
|
className: "h-11 rounded-[12px] text-[14px]"
|
|
11576
11604
|
}
|
|
11577
11605
|
),
|
|
11606
|
+
type === "number-stepper" && /* @__PURE__ */ jsx(
|
|
11607
|
+
NumberStepper,
|
|
11608
|
+
{
|
|
11609
|
+
value: Number(value) || 0,
|
|
11610
|
+
onValueChange: (next) => onValueChange?.(String(next)),
|
|
11611
|
+
min,
|
|
11612
|
+
max,
|
|
11613
|
+
step,
|
|
11614
|
+
ariaLabel: title
|
|
11615
|
+
}
|
|
11616
|
+
),
|
|
11578
11617
|
type === "currency" && /* @__PURE__ */ jsx(
|
|
11579
11618
|
Input,
|
|
11580
11619
|
{
|
|
@@ -11719,6 +11758,89 @@ var Questions = forwardRef(function Questions2({
|
|
|
11719
11758
|
}
|
|
11720
11759
|
)
|
|
11721
11760
|
] }),
|
|
11761
|
+
type === "name" && /* @__PURE__ */ jsxs("div", { className: "grid gap-3 sm:grid-cols-6", children: [
|
|
11762
|
+
/* @__PURE__ */ jsx(
|
|
11763
|
+
Input,
|
|
11764
|
+
{
|
|
11765
|
+
value: nameValue.first ?? "",
|
|
11766
|
+
onChange: (event) => updateName("first", event.target.value),
|
|
11767
|
+
placeholder: "First name",
|
|
11768
|
+
"aria-label": `${title} first name`,
|
|
11769
|
+
className: "h-11 rounded-[12px] text-[14px] sm:col-span-2"
|
|
11770
|
+
}
|
|
11771
|
+
),
|
|
11772
|
+
/* @__PURE__ */ jsx(
|
|
11773
|
+
Input,
|
|
11774
|
+
{
|
|
11775
|
+
value: nameValue.middle ?? "",
|
|
11776
|
+
onChange: (event) => updateName("middle", event.target.value),
|
|
11777
|
+
placeholder: "Middle",
|
|
11778
|
+
"aria-label": `${title} middle name`,
|
|
11779
|
+
className: "h-11 rounded-[12px] text-[14px] sm:col-span-1"
|
|
11780
|
+
}
|
|
11781
|
+
),
|
|
11782
|
+
/* @__PURE__ */ jsx(
|
|
11783
|
+
Input,
|
|
11784
|
+
{
|
|
11785
|
+
value: nameValue.last ?? "",
|
|
11786
|
+
onChange: (event) => updateName("last", event.target.value),
|
|
11787
|
+
placeholder: "Last name",
|
|
11788
|
+
"aria-label": `${title} last name`,
|
|
11789
|
+
className: cn(
|
|
11790
|
+
"h-11 rounded-[12px] text-[14px]",
|
|
11791
|
+
showSuffix ? "sm:col-span-2" : "sm:col-span-3"
|
|
11792
|
+
)
|
|
11793
|
+
}
|
|
11794
|
+
),
|
|
11795
|
+
showSuffix && /* @__PURE__ */ jsx(
|
|
11796
|
+
Input,
|
|
11797
|
+
{
|
|
11798
|
+
value: nameValue.suffix ?? "",
|
|
11799
|
+
onChange: (event) => updateName("suffix", event.target.value),
|
|
11800
|
+
placeholder: "Suffix",
|
|
11801
|
+
"aria-label": `${title} suffix`,
|
|
11802
|
+
className: "h-11 rounded-[12px] text-[14px] sm:col-span-1"
|
|
11803
|
+
}
|
|
11804
|
+
)
|
|
11805
|
+
] }),
|
|
11806
|
+
type === "labeled-table" && /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs(
|
|
11807
|
+
"div",
|
|
11808
|
+
{
|
|
11809
|
+
role: "table",
|
|
11810
|
+
"aria-label": title,
|
|
11811
|
+
className: "grid min-w-[560px] gap-2",
|
|
11812
|
+
style: {
|
|
11813
|
+
gridTemplateColumns: `minmax(120px,max-content) ${labeledColumns.map((column) => `minmax(0, ${column.width ?? 1}fr)`).join(" ")}`
|
|
11814
|
+
},
|
|
11815
|
+
children: [
|
|
11816
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true" }),
|
|
11817
|
+
labeledColumns.map((column) => /* @__PURE__ */ jsx(
|
|
11818
|
+
"span",
|
|
11819
|
+
{
|
|
11820
|
+
className: "text-fg-3 flex items-end px-1 text-[12px] font-semibold",
|
|
11821
|
+
children: column.title
|
|
11822
|
+
},
|
|
11823
|
+
column.key
|
|
11824
|
+
)),
|
|
11825
|
+
labeledRows.map((row) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
11826
|
+
/* @__PURE__ */ jsx("span", { className: "text-fg flex items-center text-[13px] font-semibold", children: row.title }),
|
|
11827
|
+
labeledColumns.map((column) => /* @__PURE__ */ jsx(
|
|
11828
|
+
Input,
|
|
11829
|
+
{
|
|
11830
|
+
type: column.inputType === "date" ? "date" : "text",
|
|
11831
|
+
value: labeledValue[row.key]?.[column.key] ?? "",
|
|
11832
|
+
onChange: (event) => updateCell(row.key, column.key, event.target.value),
|
|
11833
|
+
"aria-label": `${title} ${row.title} ${column.title}`,
|
|
11834
|
+
className: "h-11 rounded-[12px] text-[14px]",
|
|
11835
|
+
inputMode: column.inputType === "number" || column.inputType === "currency" ? "decimal" : void 0,
|
|
11836
|
+
prefixIcon: column.inputType === "currency" ? /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold", children: currencySymbol }) : void 0
|
|
11837
|
+
},
|
|
11838
|
+
column.key
|
|
11839
|
+
))
|
|
11840
|
+
] }, row.key))
|
|
11841
|
+
]
|
|
11842
|
+
}
|
|
11843
|
+
) }),
|
|
11722
11844
|
type === "file-upload" && /* @__PURE__ */ jsxs("div", { className: "grid gap-3", children: [
|
|
11723
11845
|
/* @__PURE__ */ jsx(
|
|
11724
11846
|
FileUpload,
|
|
@@ -11740,6 +11862,20 @@ var Questions = forwardRef(function Questions2({
|
|
|
11740
11862
|
)) })
|
|
11741
11863
|
] }),
|
|
11742
11864
|
(type === "table" || type === "repeater") && /* @__PURE__ */ jsxs("div", { className: "grid gap-3", children: [
|
|
11865
|
+
countLabel && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
11866
|
+
/* @__PURE__ */ jsx("span", { className: "text-fg text-[13px] font-semibold", children: countLabel }),
|
|
11867
|
+
/* @__PURE__ */ jsx(
|
|
11868
|
+
NumberStepper,
|
|
11869
|
+
{
|
|
11870
|
+
value: tableRows.length,
|
|
11871
|
+
onValueChange: setRowCount,
|
|
11872
|
+
min,
|
|
11873
|
+
max,
|
|
11874
|
+
step,
|
|
11875
|
+
ariaLabel: countLabel
|
|
11876
|
+
}
|
|
11877
|
+
)
|
|
11878
|
+
] }),
|
|
11743
11879
|
tableRows.map((row, rowIndex) => /* @__PURE__ */ jsxs("div", { className: "border-rule bg-surface-2 rounded-[16px] border p-4", children: [
|
|
11744
11880
|
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center justify-between gap-3", children: [
|
|
11745
11881
|
/* @__PURE__ */ jsxs("span", { className: "text-fg text-[13px] font-semibold", children: [
|
|
@@ -11747,7 +11883,7 @@ var Questions = forwardRef(function Questions2({
|
|
|
11747
11883
|
" ",
|
|
11748
11884
|
rowIndex + 1
|
|
11749
11885
|
] }),
|
|
11750
|
-
tableRows.length > 1 && /* @__PURE__ */ jsx(
|
|
11886
|
+
!countLabel && tableRows.length > 1 && /* @__PURE__ */ jsx(
|
|
11751
11887
|
Button,
|
|
11752
11888
|
{
|
|
11753
11889
|
type: "button",
|
|
@@ -11774,7 +11910,7 @@ var Questions = forwardRef(function Questions2({
|
|
|
11774
11910
|
column.key
|
|
11775
11911
|
)) })
|
|
11776
11912
|
] }, rowIndex)),
|
|
11777
|
-
/* @__PURE__ */ jsxs(
|
|
11913
|
+
!countLabel && /* @__PURE__ */ jsxs(
|
|
11778
11914
|
Button,
|
|
11779
11915
|
{
|
|
11780
11916
|
type: "button",
|
|
@@ -11855,25 +11991,7 @@ function QuestionOptionButton({
|
|
|
11855
11991
|
),
|
|
11856
11992
|
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
11857
11993
|
/* @__PURE__ */ jsx("span", { className: cn("truncate font-bold", compact ? "text-[13px]" : "text-[15px]"), children: option.label }),
|
|
11858
|
-
option.helpText && /* @__PURE__ */
|
|
11859
|
-
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: cn("inline-flex shrink-0 cursor-help", "text-pro-fg"), children: /* @__PURE__ */ jsx(HelpCircleIcon, { size: 14, "aria-hidden": "true" }) }) }),
|
|
11860
|
-
/* @__PURE__ */ jsxs(
|
|
11861
|
-
TooltipContent,
|
|
11862
|
-
{
|
|
11863
|
-
side: "top",
|
|
11864
|
-
align: "center",
|
|
11865
|
-
sideOffset: 12,
|
|
11866
|
-
className: cn(
|
|
11867
|
-
"border-rule bg-surface shadow-pop relative max-w-[352px] rounded-[7px] p-5 text-left",
|
|
11868
|
-
"after:border-rule after:bg-surface after:absolute after:top-full after:left-1/2 after:size-4 after:-translate-x-1/2 after:-translate-y-1/2 after:rotate-45 after:border-r after:border-b after:content-['']"
|
|
11869
|
-
),
|
|
11870
|
-
children: [
|
|
11871
|
-
/* @__PURE__ */ jsx("div", { className: "text-fg text-[15px] leading-5 font-bold", children: option.label }),
|
|
11872
|
-
/* @__PURE__ */ jsx("p", { className: "text-fg-2 mt-3 text-[14px] leading-6", children: option.helpText })
|
|
11873
|
-
]
|
|
11874
|
-
}
|
|
11875
|
-
)
|
|
11876
|
-
] })
|
|
11994
|
+
option.helpText && /* @__PURE__ */ jsx(HelpTip, { title: option.label, body: option.helpText })
|
|
11877
11995
|
] }),
|
|
11878
11996
|
option.formLabel && !compact && /* @__PURE__ */ jsx(
|
|
11879
11997
|
"span",
|
|
@@ -11894,6 +12012,90 @@ function formatBytes2(bytes) {
|
|
|
11894
12012
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
11895
12013
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
11896
12014
|
}
|
|
12015
|
+
function HelpTip({ title, body }) {
|
|
12016
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
12017
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "text-pro-fg inline-flex shrink-0 cursor-help", children: /* @__PURE__ */ jsx(HelpCircleIcon, { size: 14, "aria-hidden": "true" }) }) }),
|
|
12018
|
+
/* @__PURE__ */ jsxs(
|
|
12019
|
+
TooltipContent,
|
|
12020
|
+
{
|
|
12021
|
+
side: "top",
|
|
12022
|
+
align: "center",
|
|
12023
|
+
sideOffset: 12,
|
|
12024
|
+
className: cn(
|
|
12025
|
+
"border-rule bg-surface shadow-pop relative max-w-[352px] rounded-[7px] p-5 text-left",
|
|
12026
|
+
"after:border-rule after:bg-surface after:absolute after:top-full after:left-1/2 after:size-4 after:-translate-x-1/2 after:-translate-y-1/2 after:rotate-45 after:border-r after:border-b after:content-['']"
|
|
12027
|
+
),
|
|
12028
|
+
children: [
|
|
12029
|
+
/* @__PURE__ */ jsx("div", { className: "text-fg text-[15px] leading-5 font-bold", children: title }),
|
|
12030
|
+
/* @__PURE__ */ jsx("p", { className: "text-fg-2 mt-3 text-[14px] leading-6", children: body })
|
|
12031
|
+
]
|
|
12032
|
+
}
|
|
12033
|
+
)
|
|
12034
|
+
] });
|
|
12035
|
+
}
|
|
12036
|
+
function NumberStepper({
|
|
12037
|
+
value,
|
|
12038
|
+
onValueChange,
|
|
12039
|
+
min = 0,
|
|
12040
|
+
max,
|
|
12041
|
+
step = 1,
|
|
12042
|
+
ariaLabel
|
|
12043
|
+
}) {
|
|
12044
|
+
const clamp = (next) => Math.max(min, max != null ? Math.min(next, max) : next);
|
|
12045
|
+
const current = clamp(Number.isFinite(value) ? value : min);
|
|
12046
|
+
const atMin = current <= min;
|
|
12047
|
+
const atMax = max != null && current >= max;
|
|
12048
|
+
return /* @__PURE__ */ jsxs(
|
|
12049
|
+
"div",
|
|
12050
|
+
{
|
|
12051
|
+
className: "inline-flex items-center gap-2",
|
|
12052
|
+
role: "spinbutton",
|
|
12053
|
+
"aria-valuenow": current,
|
|
12054
|
+
"aria-valuemin": min,
|
|
12055
|
+
"aria-valuemax": max,
|
|
12056
|
+
"aria-label": ariaLabel,
|
|
12057
|
+
children: [
|
|
12058
|
+
/* @__PURE__ */ jsx(
|
|
12059
|
+
Button,
|
|
12060
|
+
{
|
|
12061
|
+
type: "button",
|
|
12062
|
+
variant: "secondary",
|
|
12063
|
+
size: "icon-sm",
|
|
12064
|
+
onClick: () => onValueChange(clamp(current - step)),
|
|
12065
|
+
disabled: atMin,
|
|
12066
|
+
"aria-label": "Decrease",
|
|
12067
|
+
children: /* @__PURE__ */ jsx(MinusIcon, { size: 14, "aria-hidden": "true" })
|
|
12068
|
+
}
|
|
12069
|
+
),
|
|
12070
|
+
/* @__PURE__ */ jsx(
|
|
12071
|
+
Input,
|
|
12072
|
+
{
|
|
12073
|
+
value: String(current),
|
|
12074
|
+
onChange: (event) => {
|
|
12075
|
+
const parsed = Number(event.target.value.replace(/[^0-9-]/g, ""));
|
|
12076
|
+
onValueChange(clamp(Number.isFinite(parsed) ? parsed : min));
|
|
12077
|
+
},
|
|
12078
|
+
inputMode: "numeric",
|
|
12079
|
+
"aria-label": ariaLabel,
|
|
12080
|
+
className: "h-11 w-14 rounded-[12px] text-center text-[14px] tabular-nums"
|
|
12081
|
+
}
|
|
12082
|
+
),
|
|
12083
|
+
/* @__PURE__ */ jsx(
|
|
12084
|
+
Button,
|
|
12085
|
+
{
|
|
12086
|
+
type: "button",
|
|
12087
|
+
variant: "secondary",
|
|
12088
|
+
size: "icon-sm",
|
|
12089
|
+
onClick: () => onValueChange(clamp(current + step)),
|
|
12090
|
+
disabled: atMax,
|
|
12091
|
+
"aria-label": "Increase",
|
|
12092
|
+
children: /* @__PURE__ */ jsx(PlusIcon, { size: 14, "aria-hidden": "true" })
|
|
12093
|
+
}
|
|
12094
|
+
)
|
|
12095
|
+
]
|
|
12096
|
+
}
|
|
12097
|
+
);
|
|
12098
|
+
}
|
|
11897
12099
|
function AiSpark({ size = 16, className }) {
|
|
11898
12100
|
const id = useId();
|
|
11899
12101
|
return /* @__PURE__ */ jsxs(
|