@algenium/blocks 1.15.0 → 1.16.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.cts CHANGED
@@ -14,6 +14,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
14
14
  import { Drawer as Drawer$1 } from 'vaul';
15
15
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
16
16
  import { Command as Command$1 } from 'cmdk';
17
+ import * as RPNInput from 'react-phone-number-input';
17
18
  import { ClassValue } from 'clsx';
18
19
 
19
20
  interface CalendarEvent {
@@ -1340,6 +1341,17 @@ interface USAddressInputProps {
1340
1341
  }
1341
1342
  declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
1342
1343
 
1344
+ /**
1345
+ * International phone input with country picker (default: Mexico).
1346
+ * Consuming apps must import `react-phone-number-input/style.css` in their root layout.
1347
+ */
1348
+
1349
+ type PhoneInputProps = Omit<React.ComponentProps<"input">, "onChange" | "value" | "ref"> & Omit<RPNInput.Props<typeof RPNInput.default>, "onChange" | "defaultCountry"> & {
1350
+ defaultCountry?: RPNInput.Country;
1351
+ onChange?: (value: RPNInput.Value) => void;
1352
+ };
1353
+ declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps>;
1354
+
1343
1355
  type MexicoStateId = "MXAGU" | "MXBCN" | "MXBCS" | "MXCAM" | "MXCHP" | "MXCHH" | "MXCMX" | "MXCOA" | "MXCOL" | "MXDUR" | "MXGUA" | "MXGRO" | "MXHID" | "MXJAL" | "MXMEX" | "MXMIC" | "MXMOR" | "MXNAY" | "MXNLE" | "MXOAX" | "MXPUE" | "MXQUE" | "MXROO" | "MXSLP" | "MXSIN" | "MXSON" | "MXTAB" | "MXTAM" | "MXTLA" | "MXVER" | "MXYUC" | "MXZAC";
1344
1356
  interface MexicoState {
1345
1357
  id: MexicoStateId;
@@ -1369,4 +1381,4 @@ declare const MEXICO_STATE_PATHS: Record<MexicoStateId, string>;
1369
1381
 
1370
1382
  declare function cn(...inputs: ClassValue[]): string;
1371
1383
 
1372
- export { type AddressAutocompleteAdapter, type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, CardInput, type CardInputLabels, type CardInputProps, type CardTokenResult, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DescribedPlaybackError, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmptyState, type EmptyStateProps, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, ErrorState, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, ScrollArea, ScrollBar, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };
1384
+ export { type AddressAutocompleteAdapter, type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, CardInput, type CardInputLabels, type CardInputProps, type CardTokenResult, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DescribedPlaybackError, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmptyState, type EmptyStateProps, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, ErrorState, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, ScrollArea, ScrollBar, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
14
14
  import { Drawer as Drawer$1 } from 'vaul';
15
15
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
16
16
  import { Command as Command$1 } from 'cmdk';
17
+ import * as RPNInput from 'react-phone-number-input';
17
18
  import { ClassValue } from 'clsx';
18
19
 
19
20
  interface CalendarEvent {
@@ -1340,6 +1341,17 @@ interface USAddressInputProps {
1340
1341
  }
1341
1342
  declare function USAddressInput({ value, onChange, lookupZip, validateAddress, autocomplete, labels, disabled, largeText, className, onError, }: USAddressInputProps): react_jsx_runtime.JSX.Element;
1342
1343
 
1344
+ /**
1345
+ * International phone input with country picker (default: Mexico).
1346
+ * Consuming apps must import `react-phone-number-input/style.css` in their root layout.
1347
+ */
1348
+
1349
+ type PhoneInputProps = Omit<React.ComponentProps<"input">, "onChange" | "value" | "ref"> & Omit<RPNInput.Props<typeof RPNInput.default>, "onChange" | "defaultCountry"> & {
1350
+ defaultCountry?: RPNInput.Country;
1351
+ onChange?: (value: RPNInput.Value) => void;
1352
+ };
1353
+ declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps>;
1354
+
1343
1355
  type MexicoStateId = "MXAGU" | "MXBCN" | "MXBCS" | "MXCAM" | "MXCHP" | "MXCHH" | "MXCMX" | "MXCOA" | "MXCOL" | "MXDUR" | "MXGUA" | "MXGRO" | "MXHID" | "MXJAL" | "MXMEX" | "MXMIC" | "MXMOR" | "MXNAY" | "MXNLE" | "MXOAX" | "MXPUE" | "MXQUE" | "MXROO" | "MXSLP" | "MXSIN" | "MXSON" | "MXTAB" | "MXTAM" | "MXTLA" | "MXVER" | "MXYUC" | "MXZAC";
1344
1356
  interface MexicoState {
1345
1357
  id: MexicoStateId;
@@ -1369,4 +1381,4 @@ declare const MEXICO_STATE_PATHS: Record<MexicoStateId, string>;
1369
1381
 
1370
1382
  declare function cn(...inputs: ClassValue[]): string;
1371
1383
 
1372
- export { type AddressAutocompleteAdapter, type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, CardInput, type CardInputLabels, type CardInputProps, type CardTokenResult, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DescribedPlaybackError, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmptyState, type EmptyStateProps, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, ErrorState, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, ScrollArea, ScrollBar, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };
1384
+ export { type AddressAutocompleteAdapter, type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, BLOCKS_DATA_ENVIRONMENTS, type BlocksDataEnvironment, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, CardInput, type CardInputLabels, type CardInputProps, type CardTokenResult, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type DescribedPlaybackError, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmptyState, type EmptyStateProps, EnvironmentBanner, type EnvironmentBannerLabels, type EnvironmentBannerProps, EnvironmentContext, type EnvironmentContextValue, EnvironmentDot, type EnvironmentDotProps, EnvironmentMiniBadge, type EnvironmentMiniBadgeProps, EnvironmentSwitcher, type EnvironmentSwitcherLabels, type EnvironmentSwitcherProps, ErrorState, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type ProfessionalVerificationStatus, type QualityLevel, ScrollArea, ScrollBar, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, type USAddressInputLabels, type USAddressInputProps, type USAddressValue, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import * as React7 from 'react';
3
3
  import { createContext, useContext, useState, useCallback, useEffect, useRef, useMemo, useId } from 'react';
4
- import { Loader2, AlertTriangle, Inbox, CheckIcon, CircleIcon, ChevronRightIcon, Monitor, Sun, Moon, Building2, ChevronsUpDown, Check, Plus, Languages, FlaskConical, X, Upload, Move, ZoomOut, ZoomIn, RotateCcw, RotateCw, Grid3X3, RefreshCw, XIcon, User, Pencil, Bell, CheckCheck, XCircle, CheckCircle, Info, Trash2, Clock, MapPin, Link, CalendarDays, ExternalLink, ChevronLeft, ChevronRight, HelpCircle, MessageSquare, Wifi, WifiOff, FileIcon, Download, Paperclip, Send, ArrowLeft, Search, Flag, Hash, Lightbulb, Trophy, Plane, Apple, Leaf, Hand, Smile, Play, AlertCircle, VolumeX, Pause, Volume1, Volume2, Settings, PictureInPicture2, Minimize, Maximize, SearchIcon, CreditCard, CheckCircle2, BadgeCheck } from 'lucide-react';
5
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
+ import { ChevronsUpDown, CheckIcon, SearchIcon, Loader2, AlertTriangle, Inbox, CircleIcon, ChevronRightIcon, Monitor, Sun, Moon, Building2, Check, Plus, Languages, FlaskConical, X, Upload, Move, ZoomOut, ZoomIn, RotateCcw, RotateCw, Grid3X3, RefreshCw, XIcon, User, Pencil, Bell, CheckCheck, XCircle, CheckCircle, Info, Trash2, Clock, MapPin, Link, CalendarDays, ExternalLink, ChevronLeft, ChevronRight, HelpCircle, MessageSquare, Wifi, WifiOff, FileIcon, Download, Paperclip, Send, ArrowLeft, Search, Flag, Hash, Lightbulb, Trophy, Plane, Apple, Leaf, Hand, Smile, Play, AlertCircle, VolumeX, Pause, Volume1, Volume2, Settings, PictureInPicture2, Minimize, Maximize, CreditCard, CheckCircle2, BadgeCheck } from 'lucide-react';
5
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  import { useTheme } from 'next-themes';
7
7
  import { AnimatePresence, motion } from 'framer-motion';
8
8
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -18,6 +18,8 @@ import { startOfMonth, endOfMonth, eachDayOfInterval, endOfWeek, startOfWeek, fo
18
18
  import { DayPicker } from 'react-day-picker';
19
19
  import { Command as Command$1 } from 'cmdk';
20
20
  import valid from 'card-validator';
21
+ import * as RPNInput from 'react-phone-number-input';
22
+ import flags from 'react-phone-number-input/flags';
21
23
 
22
24
  var CalendarContext = createContext(null);
23
25
  function useCalendarContext() {
@@ -10258,6 +10260,170 @@ function USAddressInput({
10258
10260
  ] })
10259
10261
  ] });
10260
10262
  }
10263
+ function Input({ className, type, ...props }) {
10264
+ return /* @__PURE__ */ jsx(
10265
+ "input",
10266
+ {
10267
+ type,
10268
+ "data-slot": "input",
10269
+ className: cn(
10270
+ "h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
10271
+ "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
10272
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
10273
+ className
10274
+ ),
10275
+ ...props
10276
+ }
10277
+ );
10278
+ }
10279
+ var phoneInputGroupClass = "flex h-9 w-full gap-0 overflow-hidden rounded-md border border-input bg-transparent shadow-xs transition-[color,box-shadow] [--PhoneInputCountrySelect-marginRight:0] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 dark:bg-input/30 [&_.PhoneInputCountry]:mr-0";
10280
+ var PhoneInput = React7.forwardRef(
10281
+ ({ className, onChange, value, defaultCountry = "MX", ...props }, ref) => {
10282
+ return /* @__PURE__ */ jsx(
10283
+ RPNInput.default,
10284
+ {
10285
+ ref,
10286
+ className: cn(phoneInputGroupClass, className),
10287
+ flagComponent: FlagComponent,
10288
+ countrySelectComponent: CountrySelect,
10289
+ inputComponent: InputComponent,
10290
+ smartCaret: false,
10291
+ defaultCountry,
10292
+ value: value || void 0,
10293
+ onChange: (nextValue) => onChange?.(nextValue || ""),
10294
+ ...props
10295
+ }
10296
+ );
10297
+ }
10298
+ );
10299
+ PhoneInput.displayName = "PhoneInput";
10300
+ var InputComponent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
10301
+ Input,
10302
+ {
10303
+ className: cn(
10304
+ "h-9 min-h-0 rounded-none border-0 bg-transparent shadow-none focus-visible:border-transparent focus-visible:ring-0 dark:bg-transparent",
10305
+ className
10306
+ ),
10307
+ ...props,
10308
+ ref
10309
+ }
10310
+ ));
10311
+ InputComponent.displayName = "InputComponent";
10312
+ var CountrySelect = ({
10313
+ disabled,
10314
+ value: selectedCountry,
10315
+ options: countryList,
10316
+ onChange
10317
+ }) => {
10318
+ const scrollAreaRef = React7.useRef(null);
10319
+ const [searchValue, setSearchValue] = React7.useState("");
10320
+ const [isOpen, setIsOpen] = React7.useState(false);
10321
+ return /* @__PURE__ */ jsxs(
10322
+ Popover,
10323
+ {
10324
+ open: isOpen,
10325
+ modal: true,
10326
+ onOpenChange: (open) => {
10327
+ setIsOpen(open);
10328
+ if (open) setSearchValue("");
10329
+ },
10330
+ children: [
10331
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
10332
+ Button,
10333
+ {
10334
+ type: "button",
10335
+ variant: "ghost",
10336
+ className: "h-9 shrink-0 gap-1 rounded-none border-0 border-r border-input px-2.5 shadow-none hover:bg-muted/50 focus:z-10",
10337
+ disabled,
10338
+ children: [
10339
+ /* @__PURE__ */ jsx(
10340
+ FlagComponent,
10341
+ {
10342
+ country: selectedCountry,
10343
+ countryName: selectedCountry
10344
+ }
10345
+ ),
10346
+ /* @__PURE__ */ jsx(
10347
+ ChevronsUpDown,
10348
+ {
10349
+ className: cn(
10350
+ "-mr-2 size-4 opacity-50",
10351
+ disabled ? "hidden" : "opacity-100"
10352
+ )
10353
+ }
10354
+ )
10355
+ ]
10356
+ }
10357
+ ) }),
10358
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-[300px] p-0", children: /* @__PURE__ */ jsxs(Command, { children: [
10359
+ /* @__PURE__ */ jsx(
10360
+ CommandInput,
10361
+ {
10362
+ value: searchValue,
10363
+ onValueChange: (value) => {
10364
+ setSearchValue(value);
10365
+ setTimeout(() => {
10366
+ if (scrollAreaRef.current) {
10367
+ const viewportElement = scrollAreaRef.current.querySelector(
10368
+ "[data-radix-scroll-area-viewport]"
10369
+ );
10370
+ if (viewportElement) {
10371
+ viewportElement.scrollTop = 0;
10372
+ }
10373
+ }
10374
+ }, 0);
10375
+ },
10376
+ placeholder: "Search country..."
10377
+ }
10378
+ ),
10379
+ /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsxs(ScrollArea, { ref: scrollAreaRef, className: "h-72", children: [
10380
+ /* @__PURE__ */ jsx(CommandEmpty, { children: "No country found." }),
10381
+ /* @__PURE__ */ jsx(CommandGroup, { children: countryList.map(
10382
+ ({ value, label }) => value ? /* @__PURE__ */ jsx(
10383
+ CountrySelectOption,
10384
+ {
10385
+ country: value,
10386
+ countryName: label,
10387
+ selectedCountry,
10388
+ onChange,
10389
+ onSelectComplete: () => setIsOpen(false)
10390
+ },
10391
+ value
10392
+ ) : null
10393
+ ) })
10394
+ ] }) })
10395
+ ] }) })
10396
+ ]
10397
+ }
10398
+ );
10399
+ };
10400
+ var CountrySelectOption = ({
10401
+ country,
10402
+ countryName,
10403
+ selectedCountry,
10404
+ onChange,
10405
+ onSelectComplete
10406
+ }) => {
10407
+ const handleSelect = () => {
10408
+ onChange(country);
10409
+ onSelectComplete();
10410
+ };
10411
+ return /* @__PURE__ */ jsxs(CommandItem, { className: "gap-2", onSelect: handleSelect, children: [
10412
+ /* @__PURE__ */ jsx(FlagComponent, { country, countryName }),
10413
+ /* @__PURE__ */ jsx("span", { className: "flex-1 text-sm", children: countryName }),
10414
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground/50", children: `+${RPNInput.getCountryCallingCode(country)}` }),
10415
+ /* @__PURE__ */ jsx(
10416
+ CheckIcon,
10417
+ {
10418
+ className: `ml-auto size-4 ${country === selectedCountry ? "opacity-100" : "opacity-0"}`
10419
+ }
10420
+ )
10421
+ ] });
10422
+ };
10423
+ var FlagComponent = ({ country, countryName }) => {
10424
+ const Flag2 = flags[country];
10425
+ return /* @__PURE__ */ jsx("span", { className: "flex h-4 w-6 overflow-hidden rounded-sm bg-foreground/20 [&_svg:not([class*='size-'])]:size-full", children: Flag2 && /* @__PURE__ */ jsx(Flag2, { title: countryName }) });
10426
+ };
10261
10427
 
10262
10428
  // src/data/mexicoStates.ts
10263
10429
  var MEXICO_STATES = [
@@ -10438,6 +10604,6 @@ function VerifiedProfessionalBadge({
10438
10604
  );
10439
10605
  }
10440
10606
 
10441
- export { AvatarEditor, AvatarEditorDialog, BLOCKS_DATA_ENVIRONMENTS, Button, CalendarContext, CalendarSubscribeButton, CalendarView, CalendarWidget, CardInput, ChatRoomView, ChatSidebar, ChatSidebarContext, ChatSidebarProvider, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmojiPicker, EmojiPickerPopover, EmptyState, EnvironmentBanner, EnvironmentContext, EnvironmentDot, EnvironmentMiniBadge, EnvironmentSwitcher, ErrorState, EventDialog, EventRsvpBadge, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, MiniCalendar, NotificationsContext, NotificationsWidget, OrgSwitcher, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, SearchCommand, Slider, ThemeSwitcher, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, UpcomingEvents, VerifiedProfessionalBadge, VideoPlayer, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };
10607
+ export { AvatarEditor, AvatarEditorDialog, BLOCKS_DATA_ENVIRONMENTS, Button, CalendarContext, CalendarSubscribeButton, CalendarView, CalendarWidget, CardInput, ChatRoomView, ChatSidebar, ChatSidebarContext, ChatSidebarProvider, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmojiPicker, EmojiPickerPopover, EmptyState, EnvironmentBanner, EnvironmentContext, EnvironmentDot, EnvironmentMiniBadge, EnvironmentSwitcher, ErrorState, EventDialog, EventRsvpBadge, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, MexicoMap, MiniCalendar, NotificationsContext, NotificationsWidget, OrgSwitcher, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, SearchCommand, Slider, ThemeSwitcher, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, USAddressInput, UpcomingEvents, VerifiedProfessionalBadge, VideoPlayer, buttonVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getEnvironmentDotClass, getEnvironmentLabel, isBlocksDataEnvironment, normalizeEmojiQuery, shouldRetryLiveEdge404, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useDebouncedValue, useDebouncedValueStrict, useEnvironmentContext, useHlsPlayback, useLanguageContext, useNotificationsContext, usePlaybackStats, useSearchHotkey };
10442
10608
  //# sourceMappingURL=index.js.map
10443
10609
  //# sourceMappingURL=index.js.map