@assure-one/design-system 1.0.0 → 1.1.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/dist/index.d.ts +41 -1
- package/dist/index.js +365 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -990,6 +990,46 @@ interface PhoneInputProps extends Omit<InputProps, "type" | "onChange" | "value"
|
|
|
990
990
|
}
|
|
991
991
|
declare const PhoneInput: React$1.ForwardRefExoticComponent<Omit<PhoneInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
992
992
|
|
|
993
|
+
interface CountryCode {
|
|
994
|
+
iso: string;
|
|
995
|
+
name: string;
|
|
996
|
+
dialCode: string;
|
|
997
|
+
}
|
|
998
|
+
declare const COUNTRY_CODES: CountryCode[];
|
|
999
|
+
/**
|
|
1000
|
+
* Convert an ISO 3166-1 alpha-2 country code to its Unicode flag emoji.
|
|
1001
|
+
* (Fallback for environments without the SVG flag set.)
|
|
1002
|
+
*/
|
|
1003
|
+
declare function getFlagEmoji(iso: string): string;
|
|
1004
|
+
/**
|
|
1005
|
+
* Split a stored E.164-ish phone string (e.g. "+44 7700 900000") into the
|
|
1006
|
+
* matching country ISO and the local portion, for seeding an edit form.
|
|
1007
|
+
* Falls back to US + the raw string when no dial code matches.
|
|
1008
|
+
*/
|
|
1009
|
+
declare function parsePhoneForEditing(phone: string): {
|
|
1010
|
+
iso: string;
|
|
1011
|
+
localPhone: string;
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
declare function CountryFlag({ iso }: {
|
|
1015
|
+
iso: string;
|
|
1016
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1017
|
+
declare function CountrySelect({ value, onChange, disabled, }: {
|
|
1018
|
+
value: string;
|
|
1019
|
+
onChange: (iso: string) => void;
|
|
1020
|
+
disabled?: boolean;
|
|
1021
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1022
|
+
declare function PhoneCountryInput({ countryIso, localPhone, onCountryChange, onPhoneChange, placeholder, error, disabled, id, }: {
|
|
1023
|
+
countryIso: string;
|
|
1024
|
+
localPhone: string;
|
|
1025
|
+
onCountryChange: (iso: string) => void;
|
|
1026
|
+
onPhoneChange: (phone: string) => void;
|
|
1027
|
+
placeholder?: string;
|
|
1028
|
+
error?: string;
|
|
1029
|
+
disabled?: boolean;
|
|
1030
|
+
id?: string;
|
|
1031
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1032
|
+
|
|
993
1033
|
declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
|
|
994
1034
|
declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
995
1035
|
declare const PopoverAnchor: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -2839,4 +2879,4 @@ declare const KbdHint: React$1.ForwardRefExoticComponent<KbdHintProps & React$1.
|
|
|
2839
2879
|
|
|
2840
2880
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2841
2881
|
|
|
2842
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActivityDotVariant, ActivityEventItem, type ActivityEventItemProps, ActivityItem, type ActivityItemProps, ActivityList, type ActivityListProps, 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, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightSmallIcon, ArrowUpIcon, AspectRatio, AssureAuditBrandIcon, AssureBooksBrandIcon, AssureProBrandIcon, AssureTaxBrandIcon, AtSignIcon, Avatar, Badge, type BadgeProps, BarChartIcon, BellIcon, Blockquote, BoldIcon, 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, Calendar, type CalendarHighlight, type CalendarHighlightColor, CalendarIcon, type CalendarProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardVariants, ChatBubbleIcon, CheckCircle2Icon, CheckCircleSolidIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleDotIcon, CircleIcon, 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, CreditCardIcon, DATE_DISPLAY_PLACEHOLDER, DangerAction, type DangerActionProps, 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, 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, DocumentIcon, DollarSignIcon, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, EyeIcon, EyeOffIcon, Eyebrow, type EyebrowProps, FileIcon, FileReturnIcon, FileTextIcon, FileUpload, FilterChip, type FilterChipProps, FilterIcon, FlagIcon, FolderClosedIcon, FolderOpenIcon, FolderPlusIcon, FormError, FormSection, FormSuccess, GlobeIcon, GoogleBrandIcon, HelpCircleIcon, HistoryIcon, HomeIcon, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, IconAction, type IconActionProps, InboxIcon, InfoCircleSolidIcon, InfoIcon, Input, type InputVariants, 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, 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, MenuIcon, MessageBubble, MessageBubbleAction, type MessageBubbleActionProps, type MessageBubbleProps, MessageBubbleTombstone, type MessageBubbleTombstoneProps, MessageCircleIcon, MessageCircleWarningIcon, MessageComposer, type MessageComposerProps, MetadataGrid, MicrosoftBrandIcon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoveIcon, MultiFilterPill, MultiSelectField, MutedSpec, type MutedSpecProps, 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, PenSignIcon, PencilIcon, PhoneIcon, PhoneInput, PlayIcon, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PrimaryAction, type PrimaryActionProps, type Priority, PriorityIcon, type PriorityIconProps, ProgressBar, type ProgressBarProps, ProgressRing, type ProgressRingProps, type QuickReplyChip, RadioGroup, RadioGroupItem, ReceiptIcon, ReplyIcon, RotateCcwIcon, SaveIcon, ScrollArea, ScrollBar, SearchIcon, SearchInput, type SearchInputVariants, SearchSelect, type SearchSelectOption, SecondaryAction, type SecondaryActionProps, Section, SectionHead, SectionHeader, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, type SelectProps, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableKpiCard, type SelectableKpiCardProps, SendIcon, Separator, 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, Skeleton, SkeletonCircle, SkeletonText, SlashIcon, Slider, SmartphoneIcon, type SortDirection, SparkleIcon, SparklesIcon, Spinner, type SpinnerProps, StarIcon, StarRating, type StarRatingProps, Stat, StatusIcon, type StatusIconProps, type StatusState, type Step, Stepper, type StepperProps, StopIcon, StrikethroughIcon, SubmitButton, 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 TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, TagIcon, 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, ToastProvider, 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, badgeVariants, buttonVariants, cardVariants, cn, dateToIso, displayToIso, filterChipVariants, formatClock, formatCurrency, formatDuration, inputVariants, isoToDate, isoToDisplay, isoToYear, labelVariants, parseDuration, progressBarVariants, progressRingVariants, searchInputVariants, sidebarLinkBadgeVariants, spinnerVariants, starRatingVariants, textareaVariants, useSidebarPeekLock, useSidebarState, useStopwatch, useToast, yearToIso };
|
|
2882
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActivityDotVariant, ActivityEventItem, type ActivityEventItemProps, ActivityItem, type ActivityItemProps, ActivityList, type ActivityListProps, 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, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightSmallIcon, ArrowUpIcon, AspectRatio, AssureAuditBrandIcon, AssureBooksBrandIcon, AssureProBrandIcon, AssureTaxBrandIcon, AtSignIcon, Avatar, Badge, type BadgeProps, BarChartIcon, BellIcon, Blockquote, BoldIcon, 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, ChatBubbleIcon, CheckCircle2Icon, CheckCircleSolidIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleDotIcon, CircleIcon, 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, 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, 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, DocumentIcon, DollarSignIcon, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, EyeIcon, EyeOffIcon, Eyebrow, type EyebrowProps, FileIcon, FileReturnIcon, FileTextIcon, FileUpload, FilterChip, type FilterChipProps, FilterIcon, FlagIcon, FolderClosedIcon, FolderOpenIcon, FolderPlusIcon, FormError, FormSection, FormSuccess, GlobeIcon, GoogleBrandIcon, HelpCircleIcon, HistoryIcon, HomeIcon, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, IconAction, type IconActionProps, InboxIcon, InfoCircleSolidIcon, InfoIcon, Input, type InputVariants, 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, 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, MenuIcon, MessageBubble, MessageBubbleAction, type MessageBubbleActionProps, type MessageBubbleProps, MessageBubbleTombstone, type MessageBubbleTombstoneProps, MessageCircleIcon, MessageCircleWarningIcon, MessageComposer, type MessageComposerProps, MetadataGrid, MicrosoftBrandIcon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoveIcon, MultiFilterPill, MultiSelectField, MutedSpec, type MutedSpecProps, 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, PenSignIcon, PencilIcon, PhoneCountryInput, PhoneIcon, PhoneInput, PlayIcon, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PrimaryAction, type PrimaryActionProps, type Priority, PriorityIcon, type PriorityIconProps, ProgressBar, type ProgressBarProps, ProgressRing, type ProgressRingProps, type QuickReplyChip, RadioGroup, RadioGroupItem, ReceiptIcon, ReplyIcon, RotateCcwIcon, SaveIcon, ScrollArea, ScrollBar, SearchIcon, SearchInput, type SearchInputVariants, SearchSelect, type SearchSelectOption, SecondaryAction, type SecondaryActionProps, Section, SectionHead, SectionHeader, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, type SelectProps, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableKpiCard, type SelectableKpiCardProps, SendIcon, Separator, 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, Skeleton, SkeletonCircle, SkeletonText, SlashIcon, Slider, SmartphoneIcon, type SortDirection, SparkleIcon, SparklesIcon, Spinner, type SpinnerProps, StarIcon, StarRating, type StarRatingProps, Stat, StatusIcon, type StatusIconProps, type StatusState, type Step, Stepper, type StepperProps, StopIcon, StrikethroughIcon, SubmitButton, 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 TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, TagIcon, 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, ToastProvider, 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, badgeVariants, buttonVariants, cardVariants, cn, dateToIso, displayToIso, filterChipVariants, formatClock, formatCurrency, formatDuration, getFlagEmoji, inputVariants, isoToDate, isoToDisplay, isoToYear, labelVariants, parseDuration, parsePhoneForEditing, progressBarVariants, progressRingVariants, searchInputVariants, sidebarLinkBadgeVariants, spinnerVariants, starRatingVariants, textareaVariants, useSidebarPeekLock, useSidebarState, useStopwatch, useToast, yearToIso };
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
|
|
|
25
25
|
import Link from 'next/link';
|
|
26
26
|
import Image2 from 'next/image';
|
|
27
27
|
import { OTPInput as OTPInput$1, REGEXP_ONLY_DIGITS } from 'input-otp';
|
|
28
|
+
import * as AllFlags from 'country-flag-icons/react/3x2';
|
|
28
29
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
29
30
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
30
31
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
@@ -5684,6 +5685,367 @@ var PhoneInput = forwardRef(function PhoneInput2({ value, defaultValue, onChange
|
|
|
5684
5685
|
] });
|
|
5685
5686
|
});
|
|
5686
5687
|
PhoneInput.displayName = "PhoneInput";
|
|
5688
|
+
|
|
5689
|
+
// src/lib/country-codes.ts
|
|
5690
|
+
var COUNTRY_CODES = [
|
|
5691
|
+
{ iso: "US", name: "United States", dialCode: "+1" },
|
|
5692
|
+
{ iso: "CA", name: "Canada", dialCode: "+1" },
|
|
5693
|
+
{ iso: "GB", name: "United Kingdom", dialCode: "+44" },
|
|
5694
|
+
{ iso: "AU", name: "Australia", dialCode: "+61" },
|
|
5695
|
+
{ iso: "IN", name: "India", dialCode: "+91" },
|
|
5696
|
+
{ iso: "AF", name: "Afghanistan", dialCode: "+93" },
|
|
5697
|
+
{ iso: "AL", name: "Albania", dialCode: "+355" },
|
|
5698
|
+
{ iso: "DZ", name: "Algeria", dialCode: "+213" },
|
|
5699
|
+
{ iso: "AD", name: "Andorra", dialCode: "+376" },
|
|
5700
|
+
{ iso: "AO", name: "Angola", dialCode: "+244" },
|
|
5701
|
+
{ iso: "AG", name: "Antigua and Barbuda", dialCode: "+1268" },
|
|
5702
|
+
{ iso: "AR", name: "Argentina", dialCode: "+54" },
|
|
5703
|
+
{ iso: "AM", name: "Armenia", dialCode: "+374" },
|
|
5704
|
+
{ iso: "AT", name: "Austria", dialCode: "+43" },
|
|
5705
|
+
{ iso: "AZ", name: "Azerbaijan", dialCode: "+994" },
|
|
5706
|
+
{ iso: "BS", name: "Bahamas", dialCode: "+1242" },
|
|
5707
|
+
{ iso: "BH", name: "Bahrain", dialCode: "+973" },
|
|
5708
|
+
{ iso: "BD", name: "Bangladesh", dialCode: "+880" },
|
|
5709
|
+
{ iso: "BB", name: "Barbados", dialCode: "+1246" },
|
|
5710
|
+
{ iso: "BY", name: "Belarus", dialCode: "+375" },
|
|
5711
|
+
{ iso: "BE", name: "Belgium", dialCode: "+32" },
|
|
5712
|
+
{ iso: "BZ", name: "Belize", dialCode: "+501" },
|
|
5713
|
+
{ iso: "BJ", name: "Benin", dialCode: "+229" },
|
|
5714
|
+
{ iso: "BT", name: "Bhutan", dialCode: "+975" },
|
|
5715
|
+
{ iso: "BO", name: "Bolivia", dialCode: "+591" },
|
|
5716
|
+
{ iso: "BA", name: "Bosnia and Herzegovina", dialCode: "+387" },
|
|
5717
|
+
{ iso: "BW", name: "Botswana", dialCode: "+267" },
|
|
5718
|
+
{ iso: "BR", name: "Brazil", dialCode: "+55" },
|
|
5719
|
+
{ iso: "BN", name: "Brunei", dialCode: "+673" },
|
|
5720
|
+
{ iso: "BG", name: "Bulgaria", dialCode: "+359" },
|
|
5721
|
+
{ iso: "BF", name: "Burkina Faso", dialCode: "+226" },
|
|
5722
|
+
{ iso: "BI", name: "Burundi", dialCode: "+257" },
|
|
5723
|
+
{ iso: "KH", name: "Cambodia", dialCode: "+855" },
|
|
5724
|
+
{ iso: "CM", name: "Cameroon", dialCode: "+237" },
|
|
5725
|
+
{ iso: "CV", name: "Cape Verde", dialCode: "+238" },
|
|
5726
|
+
{ iso: "CF", name: "Central African Republic", dialCode: "+236" },
|
|
5727
|
+
{ iso: "TD", name: "Chad", dialCode: "+235" },
|
|
5728
|
+
{ iso: "CL", name: "Chile", dialCode: "+56" },
|
|
5729
|
+
{ iso: "CN", name: "China", dialCode: "+86" },
|
|
5730
|
+
{ iso: "CO", name: "Colombia", dialCode: "+57" },
|
|
5731
|
+
{ iso: "KM", name: "Comoros", dialCode: "+269" },
|
|
5732
|
+
{ iso: "CG", name: "Congo", dialCode: "+242" },
|
|
5733
|
+
{ iso: "CD", name: "Congo, DR", dialCode: "+243" },
|
|
5734
|
+
{ iso: "CR", name: "Costa Rica", dialCode: "+506" },
|
|
5735
|
+
{ iso: "HR", name: "Croatia", dialCode: "+385" },
|
|
5736
|
+
{ iso: "CU", name: "Cuba", dialCode: "+53" },
|
|
5737
|
+
{ iso: "CY", name: "Cyprus", dialCode: "+357" },
|
|
5738
|
+
{ iso: "CZ", name: "Czech Republic", dialCode: "+420" },
|
|
5739
|
+
{ iso: "DK", name: "Denmark", dialCode: "+45" },
|
|
5740
|
+
{ iso: "DJ", name: "Djibouti", dialCode: "+253" },
|
|
5741
|
+
{ iso: "DM", name: "Dominica", dialCode: "+1767" },
|
|
5742
|
+
{ iso: "DO", name: "Dominican Republic", dialCode: "+1809" },
|
|
5743
|
+
{ iso: "EC", name: "Ecuador", dialCode: "+593" },
|
|
5744
|
+
{ iso: "EG", name: "Egypt", dialCode: "+20" },
|
|
5745
|
+
{ iso: "SV", name: "El Salvador", dialCode: "+503" },
|
|
5746
|
+
{ iso: "GQ", name: "Equatorial Guinea", dialCode: "+240" },
|
|
5747
|
+
{ iso: "ER", name: "Eritrea", dialCode: "+291" },
|
|
5748
|
+
{ iso: "EE", name: "Estonia", dialCode: "+372" },
|
|
5749
|
+
{ iso: "SZ", name: "Eswatini", dialCode: "+268" },
|
|
5750
|
+
{ iso: "ET", name: "Ethiopia", dialCode: "+251" },
|
|
5751
|
+
{ iso: "FJ", name: "Fiji", dialCode: "+679" },
|
|
5752
|
+
{ iso: "FI", name: "Finland", dialCode: "+358" },
|
|
5753
|
+
{ iso: "FR", name: "France", dialCode: "+33" },
|
|
5754
|
+
{ iso: "GA", name: "Gabon", dialCode: "+241" },
|
|
5755
|
+
{ iso: "GM", name: "Gambia", dialCode: "+220" },
|
|
5756
|
+
{ iso: "GE", name: "Georgia", dialCode: "+995" },
|
|
5757
|
+
{ iso: "DE", name: "Germany", dialCode: "+49" },
|
|
5758
|
+
{ iso: "GH", name: "Ghana", dialCode: "+233" },
|
|
5759
|
+
{ iso: "GR", name: "Greece", dialCode: "+30" },
|
|
5760
|
+
{ iso: "GD", name: "Grenada", dialCode: "+1473" },
|
|
5761
|
+
{ iso: "GT", name: "Guatemala", dialCode: "+502" },
|
|
5762
|
+
{ iso: "GN", name: "Guinea", dialCode: "+224" },
|
|
5763
|
+
{ iso: "GW", name: "Guinea-Bissau", dialCode: "+245" },
|
|
5764
|
+
{ iso: "GY", name: "Guyana", dialCode: "+592" },
|
|
5765
|
+
{ iso: "HT", name: "Haiti", dialCode: "+509" },
|
|
5766
|
+
{ iso: "HN", name: "Honduras", dialCode: "+504" },
|
|
5767
|
+
{ iso: "HK", name: "Hong Kong", dialCode: "+852" },
|
|
5768
|
+
{ iso: "HU", name: "Hungary", dialCode: "+36" },
|
|
5769
|
+
{ iso: "IS", name: "Iceland", dialCode: "+354" },
|
|
5770
|
+
{ iso: "ID", name: "Indonesia", dialCode: "+62" },
|
|
5771
|
+
{ iso: "IR", name: "Iran", dialCode: "+98" },
|
|
5772
|
+
{ iso: "IQ", name: "Iraq", dialCode: "+964" },
|
|
5773
|
+
{ iso: "IE", name: "Ireland", dialCode: "+353" },
|
|
5774
|
+
{ iso: "IL", name: "Israel", dialCode: "+972" },
|
|
5775
|
+
{ iso: "IT", name: "Italy", dialCode: "+39" },
|
|
5776
|
+
{ iso: "CI", name: "Ivory Coast", dialCode: "+225" },
|
|
5777
|
+
{ iso: "JM", name: "Jamaica", dialCode: "+1876" },
|
|
5778
|
+
{ iso: "JP", name: "Japan", dialCode: "+81" },
|
|
5779
|
+
{ iso: "JO", name: "Jordan", dialCode: "+962" },
|
|
5780
|
+
{ iso: "KZ", name: "Kazakhstan", dialCode: "+7" },
|
|
5781
|
+
{ iso: "KE", name: "Kenya", dialCode: "+254" },
|
|
5782
|
+
{ iso: "KI", name: "Kiribati", dialCode: "+686" },
|
|
5783
|
+
{ iso: "KW", name: "Kuwait", dialCode: "+965" },
|
|
5784
|
+
{ iso: "KG", name: "Kyrgyzstan", dialCode: "+996" },
|
|
5785
|
+
{ iso: "LA", name: "Laos", dialCode: "+856" },
|
|
5786
|
+
{ iso: "LV", name: "Latvia", dialCode: "+371" },
|
|
5787
|
+
{ iso: "LB", name: "Lebanon", dialCode: "+961" },
|
|
5788
|
+
{ iso: "LS", name: "Lesotho", dialCode: "+266" },
|
|
5789
|
+
{ iso: "LR", name: "Liberia", dialCode: "+231" },
|
|
5790
|
+
{ iso: "LY", name: "Libya", dialCode: "+218" },
|
|
5791
|
+
{ iso: "LI", name: "Liechtenstein", dialCode: "+423" },
|
|
5792
|
+
{ iso: "LT", name: "Lithuania", dialCode: "+370" },
|
|
5793
|
+
{ iso: "LU", name: "Luxembourg", dialCode: "+352" },
|
|
5794
|
+
{ iso: "MO", name: "Macau", dialCode: "+853" },
|
|
5795
|
+
{ iso: "MG", name: "Madagascar", dialCode: "+261" },
|
|
5796
|
+
{ iso: "MW", name: "Malawi", dialCode: "+265" },
|
|
5797
|
+
{ iso: "MY", name: "Malaysia", dialCode: "+60" },
|
|
5798
|
+
{ iso: "MV", name: "Maldives", dialCode: "+960" },
|
|
5799
|
+
{ iso: "ML", name: "Mali", dialCode: "+223" },
|
|
5800
|
+
{ iso: "MT", name: "Malta", dialCode: "+356" },
|
|
5801
|
+
{ iso: "MH", name: "Marshall Islands", dialCode: "+692" },
|
|
5802
|
+
{ iso: "MR", name: "Mauritania", dialCode: "+222" },
|
|
5803
|
+
{ iso: "MU", name: "Mauritius", dialCode: "+230" },
|
|
5804
|
+
{ iso: "MX", name: "Mexico", dialCode: "+52" },
|
|
5805
|
+
{ iso: "FM", name: "Micronesia", dialCode: "+691" },
|
|
5806
|
+
{ iso: "MD", name: "Moldova", dialCode: "+373" },
|
|
5807
|
+
{ iso: "MC", name: "Monaco", dialCode: "+377" },
|
|
5808
|
+
{ iso: "MN", name: "Mongolia", dialCode: "+976" },
|
|
5809
|
+
{ iso: "ME", name: "Montenegro", dialCode: "+382" },
|
|
5810
|
+
{ iso: "MA", name: "Morocco", dialCode: "+212" },
|
|
5811
|
+
{ iso: "MZ", name: "Mozambique", dialCode: "+258" },
|
|
5812
|
+
{ iso: "MM", name: "Myanmar", dialCode: "+95" },
|
|
5813
|
+
{ iso: "NA", name: "Namibia", dialCode: "+264" },
|
|
5814
|
+
{ iso: "NR", name: "Nauru", dialCode: "+674" },
|
|
5815
|
+
{ iso: "NP", name: "Nepal", dialCode: "+977" },
|
|
5816
|
+
{ iso: "NL", name: "Netherlands", dialCode: "+31" },
|
|
5817
|
+
{ iso: "NZ", name: "New Zealand", dialCode: "+64" },
|
|
5818
|
+
{ iso: "NI", name: "Nicaragua", dialCode: "+505" },
|
|
5819
|
+
{ iso: "NE", name: "Niger", dialCode: "+227" },
|
|
5820
|
+
{ iso: "NG", name: "Nigeria", dialCode: "+234" },
|
|
5821
|
+
{ iso: "KP", name: "North Korea", dialCode: "+850" },
|
|
5822
|
+
{ iso: "MK", name: "North Macedonia", dialCode: "+389" },
|
|
5823
|
+
{ iso: "NO", name: "Norway", dialCode: "+47" },
|
|
5824
|
+
{ iso: "OM", name: "Oman", dialCode: "+968" },
|
|
5825
|
+
{ iso: "PK", name: "Pakistan", dialCode: "+92" },
|
|
5826
|
+
{ iso: "PW", name: "Palau", dialCode: "+680" },
|
|
5827
|
+
{ iso: "PS", name: "Palestine", dialCode: "+970" },
|
|
5828
|
+
{ iso: "PA", name: "Panama", dialCode: "+507" },
|
|
5829
|
+
{ iso: "PG", name: "Papua New Guinea", dialCode: "+675" },
|
|
5830
|
+
{ iso: "PY", name: "Paraguay", dialCode: "+595" },
|
|
5831
|
+
{ iso: "PE", name: "Peru", dialCode: "+51" },
|
|
5832
|
+
{ iso: "PH", name: "Philippines", dialCode: "+63" },
|
|
5833
|
+
{ iso: "PL", name: "Poland", dialCode: "+48" },
|
|
5834
|
+
{ iso: "PT", name: "Portugal", dialCode: "+351" },
|
|
5835
|
+
{ iso: "PR", name: "Puerto Rico", dialCode: "+1787" },
|
|
5836
|
+
{ iso: "QA", name: "Qatar", dialCode: "+974" },
|
|
5837
|
+
{ iso: "RO", name: "Romania", dialCode: "+40" },
|
|
5838
|
+
{ iso: "RU", name: "Russia", dialCode: "+7" },
|
|
5839
|
+
{ iso: "RW", name: "Rwanda", dialCode: "+250" },
|
|
5840
|
+
{ iso: "KN", name: "Saint Kitts and Nevis", dialCode: "+1869" },
|
|
5841
|
+
{ iso: "LC", name: "Saint Lucia", dialCode: "+1758" },
|
|
5842
|
+
{ iso: "VC", name: "Saint Vincent", dialCode: "+1784" },
|
|
5843
|
+
{ iso: "WS", name: "Samoa", dialCode: "+685" },
|
|
5844
|
+
{ iso: "SM", name: "San Marino", dialCode: "+378" },
|
|
5845
|
+
{ iso: "ST", name: "Sao Tome and Principe", dialCode: "+239" },
|
|
5846
|
+
{ iso: "SA", name: "Saudi Arabia", dialCode: "+966" },
|
|
5847
|
+
{ iso: "SN", name: "Senegal", dialCode: "+221" },
|
|
5848
|
+
{ iso: "RS", name: "Serbia", dialCode: "+381" },
|
|
5849
|
+
{ iso: "SC", name: "Seychelles", dialCode: "+248" },
|
|
5850
|
+
{ iso: "SL", name: "Sierra Leone", dialCode: "+232" },
|
|
5851
|
+
{ iso: "SG", name: "Singapore", dialCode: "+65" },
|
|
5852
|
+
{ iso: "SK", name: "Slovakia", dialCode: "+421" },
|
|
5853
|
+
{ iso: "SI", name: "Slovenia", dialCode: "+386" },
|
|
5854
|
+
{ iso: "SB", name: "Solomon Islands", dialCode: "+677" },
|
|
5855
|
+
{ iso: "SO", name: "Somalia", dialCode: "+252" },
|
|
5856
|
+
{ iso: "ZA", name: "South Africa", dialCode: "+27" },
|
|
5857
|
+
{ iso: "KR", name: "South Korea", dialCode: "+82" },
|
|
5858
|
+
{ iso: "SS", name: "South Sudan", dialCode: "+211" },
|
|
5859
|
+
{ iso: "ES", name: "Spain", dialCode: "+34" },
|
|
5860
|
+
{ iso: "LK", name: "Sri Lanka", dialCode: "+94" },
|
|
5861
|
+
{ iso: "SD", name: "Sudan", dialCode: "+249" },
|
|
5862
|
+
{ iso: "SR", name: "Suriname", dialCode: "+597" },
|
|
5863
|
+
{ iso: "SE", name: "Sweden", dialCode: "+46" },
|
|
5864
|
+
{ iso: "CH", name: "Switzerland", dialCode: "+41" },
|
|
5865
|
+
{ iso: "SY", name: "Syria", dialCode: "+963" },
|
|
5866
|
+
{ iso: "TW", name: "Taiwan", dialCode: "+886" },
|
|
5867
|
+
{ iso: "TJ", name: "Tajikistan", dialCode: "+992" },
|
|
5868
|
+
{ iso: "TZ", name: "Tanzania", dialCode: "+255" },
|
|
5869
|
+
{ iso: "TH", name: "Thailand", dialCode: "+66" },
|
|
5870
|
+
{ iso: "TL", name: "Timor-Leste", dialCode: "+670" },
|
|
5871
|
+
{ iso: "TG", name: "Togo", dialCode: "+228" },
|
|
5872
|
+
{ iso: "TO", name: "Tonga", dialCode: "+676" },
|
|
5873
|
+
{ iso: "TT", name: "Trinidad and Tobago", dialCode: "+1868" },
|
|
5874
|
+
{ iso: "TN", name: "Tunisia", dialCode: "+216" },
|
|
5875
|
+
{ iso: "TR", name: "Turkey", dialCode: "+90" },
|
|
5876
|
+
{ iso: "TM", name: "Turkmenistan", dialCode: "+993" },
|
|
5877
|
+
{ iso: "TV", name: "Tuvalu", dialCode: "+688" },
|
|
5878
|
+
{ iso: "UG", name: "Uganda", dialCode: "+256" },
|
|
5879
|
+
{ iso: "UA", name: "Ukraine", dialCode: "+380" },
|
|
5880
|
+
{ iso: "AE", name: "United Arab Emirates", dialCode: "+971" },
|
|
5881
|
+
{ iso: "UY", name: "Uruguay", dialCode: "+598" },
|
|
5882
|
+
{ iso: "UZ", name: "Uzbekistan", dialCode: "+998" },
|
|
5883
|
+
{ iso: "VU", name: "Vanuatu", dialCode: "+678" },
|
|
5884
|
+
{ iso: "VE", name: "Venezuela", dialCode: "+58" },
|
|
5885
|
+
{ iso: "VN", name: "Vietnam", dialCode: "+84" },
|
|
5886
|
+
{ iso: "YE", name: "Yemen", dialCode: "+967" },
|
|
5887
|
+
{ iso: "ZM", name: "Zambia", dialCode: "+260" },
|
|
5888
|
+
{ iso: "ZW", name: "Zimbabwe", dialCode: "+263" }
|
|
5889
|
+
];
|
|
5890
|
+
function getFlagEmoji(iso) {
|
|
5891
|
+
return iso.toUpperCase().split("").map((c) => String.fromCodePoint(127456 + c.charCodeAt(0) - 65)).join("");
|
|
5892
|
+
}
|
|
5893
|
+
function parsePhoneForEditing(phone) {
|
|
5894
|
+
if (!phone || !phone.startsWith("+")) {
|
|
5895
|
+
return { iso: "US", localPhone: phone };
|
|
5896
|
+
}
|
|
5897
|
+
const sorted = [...COUNTRY_CODES].sort((a, b) => b.dialCode.length - a.dialCode.length);
|
|
5898
|
+
for (const c of sorted) {
|
|
5899
|
+
if (phone.startsWith(c.dialCode)) {
|
|
5900
|
+
return { iso: c.iso, localPhone: phone.slice(c.dialCode.length).trimStart() };
|
|
5901
|
+
}
|
|
5902
|
+
}
|
|
5903
|
+
return { iso: "US", localPhone: phone };
|
|
5904
|
+
}
|
|
5905
|
+
function CountryFlag({ iso }) {
|
|
5906
|
+
const Flag = AllFlags[iso];
|
|
5907
|
+
if (!Flag) return /* @__PURE__ */ jsx("span", { className: "text-[10px] font-mono", children: iso });
|
|
5908
|
+
return /* @__PURE__ */ jsx(Flag, { style: { width: 20, height: 14, borderRadius: 2, display: "block", flexShrink: 0 } });
|
|
5909
|
+
}
|
|
5910
|
+
function CountrySelect({
|
|
5911
|
+
value,
|
|
5912
|
+
onChange,
|
|
5913
|
+
disabled
|
|
5914
|
+
}) {
|
|
5915
|
+
const [open, setOpen] = useState(false);
|
|
5916
|
+
const [search, setSearch] = useState("");
|
|
5917
|
+
const searchRef = useRef(null);
|
|
5918
|
+
const selected = COUNTRY_CODES.find((c) => c.iso === value) ?? COUNTRY_CODES[0];
|
|
5919
|
+
const filtered = useMemo(() => {
|
|
5920
|
+
const q = search.toLowerCase();
|
|
5921
|
+
if (!q) return COUNTRY_CODES;
|
|
5922
|
+
return COUNTRY_CODES.filter(
|
|
5923
|
+
(c) => c.name.toLowerCase().includes(q) || c.dialCode.includes(q) || c.iso.toLowerCase().includes(q)
|
|
5924
|
+
);
|
|
5925
|
+
}, [search]);
|
|
5926
|
+
return /* @__PURE__ */ jsxs(
|
|
5927
|
+
PopoverPrimitive.Root,
|
|
5928
|
+
{
|
|
5929
|
+
modal: true,
|
|
5930
|
+
open,
|
|
5931
|
+
onOpenChange: (next) => {
|
|
5932
|
+
setOpen(next);
|
|
5933
|
+
if (!next) setSearch("");
|
|
5934
|
+
},
|
|
5935
|
+
children: [
|
|
5936
|
+
/* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
5937
|
+
"button",
|
|
5938
|
+
{
|
|
5939
|
+
type: "button",
|
|
5940
|
+
disabled,
|
|
5941
|
+
"aria-label": "Select country code",
|
|
5942
|
+
className: "flex h-10 w-[90px] shrink-0 items-center gap-1.5 rounded-lg border border-input bg-input-background px-2.5 text-sm text-foreground focus-visible:outline-none focus-visible:[box-shadow:var(--shadow-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
5943
|
+
children: [
|
|
5944
|
+
/* @__PURE__ */ jsx(CountryFlag, { iso: selected.iso }),
|
|
5945
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs tabular-nums text-muted-foreground", children: selected.dialCode }),
|
|
5946
|
+
/* @__PURE__ */ jsx("svg", { className: "ml-auto size-3 shrink-0 text-muted-foreground", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }) })
|
|
5947
|
+
]
|
|
5948
|
+
}
|
|
5949
|
+
) }),
|
|
5950
|
+
/* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
5951
|
+
PopoverPrimitive.Content,
|
|
5952
|
+
{
|
|
5953
|
+
side: "bottom",
|
|
5954
|
+
align: "start",
|
|
5955
|
+
sideOffset: 4,
|
|
5956
|
+
style: { zIndex: 9999, minWidth: 248 },
|
|
5957
|
+
className: "rounded-xl border border-border bg-popover shadow-xl outline-none",
|
|
5958
|
+
onOpenAutoFocus: (e) => {
|
|
5959
|
+
e.preventDefault();
|
|
5960
|
+
searchRef.current?.focus({ preventScroll: true });
|
|
5961
|
+
},
|
|
5962
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
5963
|
+
onKeyDown: (e) => {
|
|
5964
|
+
if (e.key !== "Escape") e.stopPropagation();
|
|
5965
|
+
},
|
|
5966
|
+
children: [
|
|
5967
|
+
/* @__PURE__ */ jsx("div", { className: "rounded-t-xl border-b border-border px-3 py-2.5", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-input bg-input-background px-2.5", children: [
|
|
5968
|
+
/* @__PURE__ */ jsxs("svg", { className: "size-3.5 shrink-0 text-muted-foreground", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
5969
|
+
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
5970
|
+
/* @__PURE__ */ jsx("path", { d: "m21 21-4.35-4.35" })
|
|
5971
|
+
] }),
|
|
5972
|
+
/* @__PURE__ */ jsx(
|
|
5973
|
+
"input",
|
|
5974
|
+
{
|
|
5975
|
+
ref: searchRef,
|
|
5976
|
+
value: search,
|
|
5977
|
+
onChange: (e) => setSearch(e.target.value),
|
|
5978
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
5979
|
+
placeholder: "Search country or code...",
|
|
5980
|
+
className: "h-8 flex-1 bg-transparent text-xs text-foreground placeholder:text-muted-foreground focus:outline-none"
|
|
5981
|
+
}
|
|
5982
|
+
)
|
|
5983
|
+
] }) }),
|
|
5984
|
+
/* @__PURE__ */ jsx(
|
|
5985
|
+
"div",
|
|
5986
|
+
{
|
|
5987
|
+
className: "max-h-56 overflow-y-auto rounded-b-xl",
|
|
5988
|
+
style: { overscrollBehavior: "contain" },
|
|
5989
|
+
onWheel: (e) => e.stopPropagation(),
|
|
5990
|
+
children: filtered.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-4 py-3 text-center text-xs text-muted-foreground", children: "No countries found" }) : filtered.map((c) => /* @__PURE__ */ jsxs(
|
|
5991
|
+
"button",
|
|
5992
|
+
{
|
|
5993
|
+
type: "button",
|
|
5994
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
5995
|
+
onClick: () => {
|
|
5996
|
+
onChange(c.iso);
|
|
5997
|
+
setOpen(false);
|
|
5998
|
+
setSearch("");
|
|
5999
|
+
},
|
|
6000
|
+
className: cn(
|
|
6001
|
+
"flex w-full items-center gap-3 px-3 py-2 text-left transition-colors hover:bg-muted/60",
|
|
6002
|
+
c.iso === value && "bg-primary/5"
|
|
6003
|
+
),
|
|
6004
|
+
children: [
|
|
6005
|
+
/* @__PURE__ */ jsx(CountryFlag, { iso: c.iso }),
|
|
6006
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-xs text-foreground", children: c.name }),
|
|
6007
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: c.dialCode })
|
|
6008
|
+
]
|
|
6009
|
+
},
|
|
6010
|
+
c.iso
|
|
6011
|
+
))
|
|
6012
|
+
}
|
|
6013
|
+
)
|
|
6014
|
+
]
|
|
6015
|
+
}
|
|
6016
|
+
) })
|
|
6017
|
+
]
|
|
6018
|
+
}
|
|
6019
|
+
);
|
|
6020
|
+
}
|
|
6021
|
+
function PhoneCountryInput({
|
|
6022
|
+
countryIso,
|
|
6023
|
+
localPhone,
|
|
6024
|
+
onCountryChange,
|
|
6025
|
+
onPhoneChange,
|
|
6026
|
+
placeholder,
|
|
6027
|
+
error,
|
|
6028
|
+
disabled,
|
|
6029
|
+
id
|
|
6030
|
+
}) {
|
|
6031
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
6032
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-1.5", children: [
|
|
6033
|
+
/* @__PURE__ */ jsx(CountrySelect, { value: countryIso, onChange: onCountryChange, disabled }),
|
|
6034
|
+
/* @__PURE__ */ jsx(
|
|
6035
|
+
Input,
|
|
6036
|
+
{
|
|
6037
|
+
id,
|
|
6038
|
+
value: localPhone,
|
|
6039
|
+
onChange: (e) => onPhoneChange(e.target.value),
|
|
6040
|
+
placeholder: placeholder ?? "(555) 555-0100",
|
|
6041
|
+
disabled,
|
|
6042
|
+
className: "flex-1"
|
|
6043
|
+
}
|
|
6044
|
+
)
|
|
6045
|
+
] }),
|
|
6046
|
+
error && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-destructive", children: error })
|
|
6047
|
+
] });
|
|
6048
|
+
}
|
|
5687
6049
|
var BARS = [
|
|
5688
6050
|
{ x: 1.5, y: 9, height: 5 },
|
|
5689
6051
|
// bar 1 (shortest)
|
|
@@ -7898,7 +8260,7 @@ var Main = forwardRef(function Main2({ className, ...props }, ref) {
|
|
|
7898
8260
|
);
|
|
7899
8261
|
});
|
|
7900
8262
|
Main.displayName = "Main";
|
|
7901
|
-
var
|
|
8263
|
+
var Content16 = forwardRef(function Content17({ padTop, padBottom, className, style, ...props }, ref) {
|
|
7902
8264
|
const paddingStyle = padTop || padBottom ? {
|
|
7903
8265
|
...padTop ? { paddingTop: padTop } : null,
|
|
7904
8266
|
...padBottom ? { paddingBottom: padBottom } : null,
|
|
@@ -7917,7 +8279,7 @@ var Content15 = forwardRef(function Content16({ padTop, padBottom, className, st
|
|
|
7917
8279
|
}
|
|
7918
8280
|
);
|
|
7919
8281
|
});
|
|
7920
|
-
|
|
8282
|
+
Content16.displayName = "Content";
|
|
7921
8283
|
var SidebarContext = React36.createContext(null);
|
|
7922
8284
|
var NOOP_CONTEXT = {
|
|
7923
8285
|
state: "expanded",
|
|
@@ -10943,6 +11305,6 @@ var KbdHint = forwardRef(function KbdHint2({ className, children, ...props }, re
|
|
|
10943
11305
|
});
|
|
10944
11306
|
KbdHint.displayName = "KbdHint";
|
|
10945
11307
|
|
|
10946
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityEventItem, ActivityItem, ActivityList, Alert, AlertCircleIcon, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTriangleIcon, AlertTriangleSolidIcon, AppHeader, AppHeaderActions, AppHeaderBreadcrumb, AppHeaderSearch, AppHeaderTitle, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightSmallIcon, ArrowUpIcon, AspectRatio, AssureAuditBrandIcon, AssureBooksBrandIcon, AssureProBrandIcon, AssureTaxBrandIcon, AtSignIcon, Avatar, Badge, BarChartIcon, BellIcon, Blockquote, BoldIcon, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BriefcaseIcon, Building2Icon, BuildingIcon, BulkActionBar, BulkActionBarAction, BulkActionBarSeparator, Button, Calendar, CalendarIcon, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatBubbleIcon, CheckCircle2Icon, CheckCircleSolidIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleDotIcon, CircleIcon, ClientSelect, ClipboardCheckIcon, ClockIcon, CloseIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, ComingSoon, CommandIcon, CommandPalette, ConfirmActionButton,
|
|
11308
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityEventItem, ActivityItem, ActivityList, Alert, AlertCircleIcon, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTriangleIcon, AlertTriangleSolidIcon, AppHeader, AppHeaderActions, AppHeaderBreadcrumb, AppHeaderSearch, AppHeaderTitle, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightSmallIcon, ArrowUpIcon, AspectRatio, AssureAuditBrandIcon, AssureBooksBrandIcon, AssureProBrandIcon, AssureTaxBrandIcon, AtSignIcon, Avatar, Badge, BarChartIcon, BellIcon, Blockquote, BoldIcon, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BriefcaseIcon, Building2Icon, BuildingIcon, BulkActionBar, BulkActionBarAction, BulkActionBarSeparator, Button, COUNTRY_CODES, Calendar, CalendarIcon, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatBubbleIcon, CheckCircle2Icon, CheckCircleSolidIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleDotIcon, CircleIcon, ClientSelect, ClipboardCheckIcon, ClockIcon, CloseIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, ComingSoon, CommandIcon, CommandPalette, ConfirmActionButton, Content16 as Content, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, CopyIcon, CornerDownLeftIcon, CountryFlag, CountrySelect, CreditCardIcon, DATE_DISPLAY_PLACEHOLDER, DangerAction, DataItem, DataTable, DataTableBody, DataTableCell, DataTableCellDue, DataTableCellId, DataTableCellMono, DataTableCellName, DataTableCheckbox, DataTableHead, DataTableHeader, DataTablePagination, DataTableResultsCount, DataTableRow, DataTableSearch, DataTableSpacer, DataTableToolbar, DatePicker, DateRangePicker, DetailGrid, DetailMain, DetailSpine, DetailSpineHeader, DetailSpineSection, DetailSpineStats, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DismissibleChip, DocumentIcon, DollarSignIcon, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EyeIcon, EyeOffIcon, Eyebrow, FileIcon, FileReturnIcon, FileTextIcon, FileUpload, FilterChip, FilterIcon, FlagIcon, FolderClosedIcon, FolderOpenIcon, FolderPlusIcon, FormError, FormSection, FormSuccess, GlobeIcon, GoogleBrandIcon, HelpCircleIcon, HistoryIcon, HomeIcon, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, IconAction, InboxIcon, InfoCircleSolidIcon, InfoIcon, Input, ItalicIcon, Kanban, KanbanCard, KanbanColumn, KanbanIcon, KbdHint, KeyIcon, KeyboardShortcutsDialog, KpiCard, Label4 as Label, LayoutDashboardIcon, LayoutGridIcon, LayoutListIcon, LightningIcon, Link2Icon, LinkAction, LinkButton, LinkIcon, ListChecksIcon, ListIcon, ListOrderedIcon, LoaderIcon, LoadingRows, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, Logo, MailIcon, Main, MapPinIcon, MenuIcon, MessageBubble, MessageBubbleAction, MessageBubbleTombstone, MessageCircleIcon, MessageCircleWarningIcon, MessageComposer, MetadataGrid, MicrosoftBrandIcon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoveIcon, MultiFilterPill, MultiSelectField, MutedSpec, NotificationFilter, NotificationItem, NotificationList, NotificationPanel, NotificationPanelFooter, NotificationPanelHeader, Numeric, OTPInput, PageHeader, PageHeaderSep, PageHeaderSpec, Pagination, PaletteIcon, PanelLeftCloseIcon, PanelLeftIcon, PaperclipIcon, PauseIcon, PenSignIcon, PencilIcon, PhoneCountryInput, PhoneIcon, PhoneInput, PlayIcon, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PrimaryAction, PriorityIcon, ProgressBar, ProgressRing, RadioGroup3 as RadioGroup, RadioGroupItem, ReceiptIcon, ReplyIcon, RotateCcwIcon, SaveIcon, ScrollArea, ScrollBar, SearchIcon, SearchInput, SearchSelect, SecondaryAction, Section, SectionHead, SectionHeader, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableKpiCard, SendIcon, Separator4 as Separator, SettingsIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Shell, ShieldIcon, SideDrawer, Sidebar, SidebarBrand, SidebarBrandSwitcher, SidebarBrandSwitcherTile, SidebarBrandText, SidebarFooter, SidebarLink, SidebarLinkAction, SidebarLinkBadge, SidebarLinkGroup, SidebarLinkLabel, SidebarPinButton, SidebarProvider, SidebarSection, SidebarTrigger, SidebarUser, Skeleton, SkeletonCircle, SkeletonText, SlashIcon, Slider, SmartphoneIcon, SparkleIcon, SparklesIcon, Spinner, StarIcon, StarRating, Stat, StatusIcon, Stepper, StopIcon, StrikethroughIcon, SubmitButton, SunIcon, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableIcon, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagIcon, TeamIcon, TeamMemberSelect, Textarea, TimeLogger, TimeLoggerActions, TimeLoggerBillable, TimeLoggerContextRow, TimeLoggerEntry, TimeLoggerEntryList, TimeLoggerField, TimeLoggerFooter, TimeLoggerHeader, TimeLoggerNotes, TimeLoggerTimer, ToastProvider, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Trash2Icon, TrashIcon, TrendingDownIcon, TrendingUpIcon, UnderlineIcon, UploadIcon, UserCircleIcon, UserIcon, UsersIcon, VisuallyHidden, WorkflowIcon, XCircleSolidIcon, XIcon, YEAR_DISPLAY_PLACEHOLDER, ZoomInIcon, ZoomOutIcon, alertVariants, applyMask, applyYearMask, badgeVariants, buttonVariants, cardVariants, cn, colors, dateToIso, displayToIso, filterChipVariants, formatClock, formatCurrency, formatDuration, getFlagEmoji, inputVariants, isoToDate, isoToDisplay, isoToYear, labelVariants, parseDuration, parsePhoneForEditing, progressBarVariants, progressRingVariants, radii, reference, searchInputVariants, shadows, sidebarLinkBadgeVariants, spacing, spinnerVariants, starRatingVariants, surfaces, systemTokens, textareaVariants, typography, useSidebarPeekLock, useSidebarState, useStopwatch, useToast, yearToIso };
|
|
10947
11309
|
//# sourceMappingURL=index.js.map
|
|
10948
11310
|
//# sourceMappingURL=index.js.map
|