@yenio-pld/blocks 1.2.0-rc.13 → 1.2.0-rc.14
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.cjs +449 -108
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +354 -14
- package/dist/index.js.map +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -793,6 +793,18 @@ type PasswordInputProps = Omit<react.ComponentProps<"input">, "type"> & {
|
|
|
793
793
|
};
|
|
794
794
|
declare function PasswordInput({ className, disabled, showLabel, hideLabel, ...props }: PasswordInputProps): react.JSX.Element;
|
|
795
795
|
|
|
796
|
+
type PhoneInputProps = Omit<react.ComponentProps<"input">, "value" | "onChange" | "type" | "inputMode"> & {
|
|
797
|
+
value: string;
|
|
798
|
+
onValueChange: (value: string) => void;
|
|
799
|
+
/** ISO 3166-1 alpha-2. Defaults to Mexico (`MX` / +52). */
|
|
800
|
+
defaultCountry?: string;
|
|
801
|
+
searchPlaceholder?: string;
|
|
802
|
+
countryListLabel?: string;
|
|
803
|
+
countryTriggerLabel?: string;
|
|
804
|
+
emptyLabel?: string;
|
|
805
|
+
};
|
|
806
|
+
declare function PhoneInput({ value, onValueChange, defaultCountry, searchPlaceholder, countryListLabel, countryTriggerLabel, emptyLabel, className, disabled, id, name, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, placeholder, ...props }: PhoneInputProps): react.JSX.Element;
|
|
807
|
+
|
|
796
808
|
type AvatarEditorLabels = {
|
|
797
809
|
uploadAria?: string;
|
|
798
810
|
uploadHint?: string;
|
|
@@ -1474,4 +1486,4 @@ declare function sourceUrlIsHttps(url: string): boolean;
|
|
|
1474
1486
|
declare function matchClaimIsUnverified(hit: MatchReviewHit): boolean;
|
|
1475
1487
|
declare function MatchReview({ hit, onResolve, labels, sourceLabels, emptyAction, className, }: MatchReviewProps): react.JSX.Element;
|
|
1476
1488
|
|
|
1477
|
-
export { AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AppNavGroup, type AppNavItem, AppShell, type AppShellProps, type AuditActor, type AuditSubject, AuditTimeline, type AuditTimelineItem, type AuditTimelineLabels, type AuditTimelineProps, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, COUNTRY_OPTIONS, CURP_REGEX, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ControlKind, CookieConsentBanner, type CookieConsentBannerLabels, type CookieConsentBannerProps, CookieConsentValue, CostBreakdownCard, type CostBreakdownCardProps, type CostBreakdownItem, type CountryLocale, type CountryOption, CountryPicker, type CountryPickerItem, type CountryPickerLabels, type CountryPickerProps, type CountryPickerPurpose, type CountryRecord, type CreateMultipartUploadControllerOptions, CurpInput, type CurpInputProps, type CurpValidationError, DATA_TABLE_BODY_MIN_CLASS, DATA_TABLE_DEFAULT_SKELETON_ROWS, DATA_TABLE_ROW_CLASS, DEFAULT_AUDIT_TIMELINE_LABELS, DEFAULT_COOKIE_CONSENT_BANNER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_ENTITY_GRAPH_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_LEGAL_ACCEPT_CHECKBOX_LABELS, DEFAULT_LEGAL_ACCEPT_DIALOG_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DEFAULT_RISK_BADGE_LABELS, DashboardSkeleton, type DashboardSkeletonVariant, DataList, DataListItem, type DataListItemProps, type DataListProps, DataTable, type DataTableColumn, type DataTableProps, DataTableSkeleton, type DetailFact, DetailHeader, type DetailHeaderProps, DetailPageSkeleton, type DimensionBreakdownRow, DimensionBreakdownTable, type DimensionBreakdownTableProps, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, EntityGraph, type EntityGraphEdge, type EntityGraphLabels, type EntityGraphNode, type EntityGraphProps, ErrorState, Field, FieldMessage, type FieldMessageProps, FileDropzone, type FileDropzoneLabels, type FileDropzoneProps, FileUploadMenu, type FileUploadMenuProps, FileUploadTray, type FileUploadTrayLabels, type FileUploadTrayProps, FormCardSkeleton, FormSection, type FormSectionProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LegalAcceptCheckbox, type LegalAcceptCheckboxLabels, type LegalAcceptCheckboxProps, LegalAcceptDialog, type LegalAcceptDialogLabels, type LegalAcceptDialogProps, LegalMarkdown, type LegalMarkdownProps, ListSkeleton, LoadingState, MatchReview, type MatchReviewHit, type MatchReviewLabels, type MatchReviewProps, type MatchReviewSource, type MatchReviewStatus, MetricChartCard, type MetricChartCardProps, MetricEmptyState, type MetricEmptyStateProps, MetricSkeleton, type MetricSkeletonProps, type MultipartUploadAdapter, type MultipartUploadController, type MultipartUploadPart, type NavTab, NavTabs, type NavTabsProps, NavigationProgress, type NavigationProgressProps, NotificationBell, type NotificationBellItem, type NotificationBellLabels, type NotificationBellProps, OptionRow, type OptionRowProps, PageContainer, PageTitle, type PageTitleProps, PageTitleSkeleton, PaginatedCombobox, type PaginatedComboboxItem, type PaginatedComboboxLabels, type PaginatedComboboxProps, type PartRange, PasswordInput, type PasswordInputProps, type PersonKindForRfc, QueueLayout, type QueueLayoutProps, RfcInput, type RfcInputProps, type RfcValidationError, RiskBadge, type RiskBadgeLabels, type RiskBadgeProps, type RiskSeverity, RouteLoading, SafeImage, type SafeImageProps, SearchablePicker, type SearchablePickerOption, type SearchablePickerProps, SectionCard, type SectionCardProps, type SectionCardTone, SectionNav, type SectionNavItem, SectionNavList, type SectionNavListProps, type SectionNavProps, SectionSummary, type SectionSummaryProps, SettingRow, type SettingRowProps, type ShellIcon, type ShellLinkProps, type ShellLinkRenderer, SparklineStat, type SparklineStatProps, StatHighlightCard, type StatHighlightCardProps, StatusBadge, type StatusBadgeProps, type StatusTone, StepProgress, type StepProgressProps, type StepProgressSegment, StickyActionBar, type StickyActionBarProps, TIME_RANGE_OPTIONS, TableSkeleton, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type TimeRange, TimeRangePicker, type TimeRangePickerLabels, type TimeRangePickerProps, type UploadControllerStatus, type UploadJob, type UploadJobStatus, type UploadProgress, type UseEditableSectionOptions, type UseEditableSectionResult, type UseQueueKeysOptions, type UseSectionNavResult, WizardLayout, type WizardLayoutProps, cn, countryLabel, countryPickerItems, createMultipartUploadController, curpCheckDigit, dataTableBodyMinClass, defaultLanguages, fileMatchesAccept, filterCountries, formatCountryOptionLabel, isKnownCountryCode, matchClaimIsUnverified, normalizeCurpInput, normalizeRfc, partRanges, progressFromBytes, queueRowKeyDown, renderShellLink, rfcMaxLengthForPersonKind, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, useDirtyGuard, useEditableSection, useLanguageContext, useMediaQuery, useQueueKeys, useSectionNav, validateCurp, validateRfcForPersonKind };
|
|
1489
|
+
export { AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AppNavGroup, type AppNavItem, AppShell, type AppShellProps, type AuditActor, type AuditSubject, AuditTimeline, type AuditTimelineItem, type AuditTimelineLabels, type AuditTimelineProps, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, COUNTRY_OPTIONS, CURP_REGEX, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ControlKind, CookieConsentBanner, type CookieConsentBannerLabels, type CookieConsentBannerProps, CookieConsentValue, CostBreakdownCard, type CostBreakdownCardProps, type CostBreakdownItem, type CountryLocale, type CountryOption, CountryPicker, type CountryPickerItem, type CountryPickerLabels, type CountryPickerProps, type CountryPickerPurpose, type CountryRecord, type CreateMultipartUploadControllerOptions, CurpInput, type CurpInputProps, type CurpValidationError, DATA_TABLE_BODY_MIN_CLASS, DATA_TABLE_DEFAULT_SKELETON_ROWS, DATA_TABLE_ROW_CLASS, DEFAULT_AUDIT_TIMELINE_LABELS, DEFAULT_COOKIE_CONSENT_BANNER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_ENTITY_GRAPH_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_LEGAL_ACCEPT_CHECKBOX_LABELS, DEFAULT_LEGAL_ACCEPT_DIALOG_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DEFAULT_RISK_BADGE_LABELS, DashboardSkeleton, type DashboardSkeletonVariant, DataList, DataListItem, type DataListItemProps, type DataListProps, DataTable, type DataTableColumn, type DataTableProps, DataTableSkeleton, type DetailFact, DetailHeader, type DetailHeaderProps, DetailPageSkeleton, type DimensionBreakdownRow, DimensionBreakdownTable, type DimensionBreakdownTableProps, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, EntityGraph, type EntityGraphEdge, type EntityGraphLabels, type EntityGraphNode, type EntityGraphProps, ErrorState, Field, FieldMessage, type FieldMessageProps, FileDropzone, type FileDropzoneLabels, type FileDropzoneProps, FileUploadMenu, type FileUploadMenuProps, FileUploadTray, type FileUploadTrayLabels, type FileUploadTrayProps, FormCardSkeleton, FormSection, type FormSectionProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LegalAcceptCheckbox, type LegalAcceptCheckboxLabels, type LegalAcceptCheckboxProps, LegalAcceptDialog, type LegalAcceptDialogLabels, type LegalAcceptDialogProps, LegalMarkdown, type LegalMarkdownProps, ListSkeleton, LoadingState, MatchReview, type MatchReviewHit, type MatchReviewLabels, type MatchReviewProps, type MatchReviewSource, type MatchReviewStatus, MetricChartCard, type MetricChartCardProps, MetricEmptyState, type MetricEmptyStateProps, MetricSkeleton, type MetricSkeletonProps, type MultipartUploadAdapter, type MultipartUploadController, type MultipartUploadPart, type NavTab, NavTabs, type NavTabsProps, NavigationProgress, type NavigationProgressProps, NotificationBell, type NotificationBellItem, type NotificationBellLabels, type NotificationBellProps, OptionRow, type OptionRowProps, PageContainer, PageTitle, type PageTitleProps, PageTitleSkeleton, PaginatedCombobox, type PaginatedComboboxItem, type PaginatedComboboxLabels, type PaginatedComboboxProps, type PartRange, PasswordInput, type PasswordInputProps, type PersonKindForRfc, PhoneInput, type PhoneInputProps, QueueLayout, type QueueLayoutProps, RfcInput, type RfcInputProps, type RfcValidationError, RiskBadge, type RiskBadgeLabels, type RiskBadgeProps, type RiskSeverity, RouteLoading, SafeImage, type SafeImageProps, SearchablePicker, type SearchablePickerOption, type SearchablePickerProps, SectionCard, type SectionCardProps, type SectionCardTone, SectionNav, type SectionNavItem, SectionNavList, type SectionNavListProps, type SectionNavProps, SectionSummary, type SectionSummaryProps, SettingRow, type SettingRowProps, type ShellIcon, type ShellLinkProps, type ShellLinkRenderer, SparklineStat, type SparklineStatProps, StatHighlightCard, type StatHighlightCardProps, StatusBadge, type StatusBadgeProps, type StatusTone, StepProgress, type StepProgressProps, type StepProgressSegment, StickyActionBar, type StickyActionBarProps, TIME_RANGE_OPTIONS, TableSkeleton, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type TimeRange, TimeRangePicker, type TimeRangePickerLabels, type TimeRangePickerProps, type UploadControllerStatus, type UploadJob, type UploadJobStatus, type UploadProgress, type UseEditableSectionOptions, type UseEditableSectionResult, type UseQueueKeysOptions, type UseSectionNavResult, WizardLayout, type WizardLayoutProps, cn, countryLabel, countryPickerItems, createMultipartUploadController, curpCheckDigit, dataTableBodyMinClass, defaultLanguages, fileMatchesAccept, filterCountries, formatCountryOptionLabel, isKnownCountryCode, matchClaimIsUnverified, normalizeCurpInput, normalizeRfc, partRanges, progressFromBytes, queueRowKeyDown, renderShellLink, rfcMaxLengthForPersonKind, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, useDirtyGuard, useEditableSection, useLanguageContext, useMediaQuery, useQueueKeys, useSectionNav, validateCurp, validateRfcForPersonKind };
|
package/dist/index.d.ts
CHANGED
|
@@ -793,6 +793,18 @@ type PasswordInputProps = Omit<react.ComponentProps<"input">, "type"> & {
|
|
|
793
793
|
};
|
|
794
794
|
declare function PasswordInput({ className, disabled, showLabel, hideLabel, ...props }: PasswordInputProps): react.JSX.Element;
|
|
795
795
|
|
|
796
|
+
type PhoneInputProps = Omit<react.ComponentProps<"input">, "value" | "onChange" | "type" | "inputMode"> & {
|
|
797
|
+
value: string;
|
|
798
|
+
onValueChange: (value: string) => void;
|
|
799
|
+
/** ISO 3166-1 alpha-2. Defaults to Mexico (`MX` / +52). */
|
|
800
|
+
defaultCountry?: string;
|
|
801
|
+
searchPlaceholder?: string;
|
|
802
|
+
countryListLabel?: string;
|
|
803
|
+
countryTriggerLabel?: string;
|
|
804
|
+
emptyLabel?: string;
|
|
805
|
+
};
|
|
806
|
+
declare function PhoneInput({ value, onValueChange, defaultCountry, searchPlaceholder, countryListLabel, countryTriggerLabel, emptyLabel, className, disabled, id, name, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, placeholder, ...props }: PhoneInputProps): react.JSX.Element;
|
|
807
|
+
|
|
796
808
|
type AvatarEditorLabels = {
|
|
797
809
|
uploadAria?: string;
|
|
798
810
|
uploadHint?: string;
|
|
@@ -1474,4 +1486,4 @@ declare function sourceUrlIsHttps(url: string): boolean;
|
|
|
1474
1486
|
declare function matchClaimIsUnverified(hit: MatchReviewHit): boolean;
|
|
1475
1487
|
declare function MatchReview({ hit, onResolve, labels, sourceLabels, emptyAction, className, }: MatchReviewProps): react.JSX.Element;
|
|
1476
1488
|
|
|
1477
|
-
export { AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AppNavGroup, type AppNavItem, AppShell, type AppShellProps, type AuditActor, type AuditSubject, AuditTimeline, type AuditTimelineItem, type AuditTimelineLabels, type AuditTimelineProps, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, COUNTRY_OPTIONS, CURP_REGEX, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ControlKind, CookieConsentBanner, type CookieConsentBannerLabels, type CookieConsentBannerProps, CookieConsentValue, CostBreakdownCard, type CostBreakdownCardProps, type CostBreakdownItem, type CountryLocale, type CountryOption, CountryPicker, type CountryPickerItem, type CountryPickerLabels, type CountryPickerProps, type CountryPickerPurpose, type CountryRecord, type CreateMultipartUploadControllerOptions, CurpInput, type CurpInputProps, type CurpValidationError, DATA_TABLE_BODY_MIN_CLASS, DATA_TABLE_DEFAULT_SKELETON_ROWS, DATA_TABLE_ROW_CLASS, DEFAULT_AUDIT_TIMELINE_LABELS, DEFAULT_COOKIE_CONSENT_BANNER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_ENTITY_GRAPH_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_LEGAL_ACCEPT_CHECKBOX_LABELS, DEFAULT_LEGAL_ACCEPT_DIALOG_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DEFAULT_RISK_BADGE_LABELS, DashboardSkeleton, type DashboardSkeletonVariant, DataList, DataListItem, type DataListItemProps, type DataListProps, DataTable, type DataTableColumn, type DataTableProps, DataTableSkeleton, type DetailFact, DetailHeader, type DetailHeaderProps, DetailPageSkeleton, type DimensionBreakdownRow, DimensionBreakdownTable, type DimensionBreakdownTableProps, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, EntityGraph, type EntityGraphEdge, type EntityGraphLabels, type EntityGraphNode, type EntityGraphProps, ErrorState, Field, FieldMessage, type FieldMessageProps, FileDropzone, type FileDropzoneLabels, type FileDropzoneProps, FileUploadMenu, type FileUploadMenuProps, FileUploadTray, type FileUploadTrayLabels, type FileUploadTrayProps, FormCardSkeleton, FormSection, type FormSectionProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LegalAcceptCheckbox, type LegalAcceptCheckboxLabels, type LegalAcceptCheckboxProps, LegalAcceptDialog, type LegalAcceptDialogLabels, type LegalAcceptDialogProps, LegalMarkdown, type LegalMarkdownProps, ListSkeleton, LoadingState, MatchReview, type MatchReviewHit, type MatchReviewLabels, type MatchReviewProps, type MatchReviewSource, type MatchReviewStatus, MetricChartCard, type MetricChartCardProps, MetricEmptyState, type MetricEmptyStateProps, MetricSkeleton, type MetricSkeletonProps, type MultipartUploadAdapter, type MultipartUploadController, type MultipartUploadPart, type NavTab, NavTabs, type NavTabsProps, NavigationProgress, type NavigationProgressProps, NotificationBell, type NotificationBellItem, type NotificationBellLabels, type NotificationBellProps, OptionRow, type OptionRowProps, PageContainer, PageTitle, type PageTitleProps, PageTitleSkeleton, PaginatedCombobox, type PaginatedComboboxItem, type PaginatedComboboxLabels, type PaginatedComboboxProps, type PartRange, PasswordInput, type PasswordInputProps, type PersonKindForRfc, QueueLayout, type QueueLayoutProps, RfcInput, type RfcInputProps, type RfcValidationError, RiskBadge, type RiskBadgeLabels, type RiskBadgeProps, type RiskSeverity, RouteLoading, SafeImage, type SafeImageProps, SearchablePicker, type SearchablePickerOption, type SearchablePickerProps, SectionCard, type SectionCardProps, type SectionCardTone, SectionNav, type SectionNavItem, SectionNavList, type SectionNavListProps, type SectionNavProps, SectionSummary, type SectionSummaryProps, SettingRow, type SettingRowProps, type ShellIcon, type ShellLinkProps, type ShellLinkRenderer, SparklineStat, type SparklineStatProps, StatHighlightCard, type StatHighlightCardProps, StatusBadge, type StatusBadgeProps, type StatusTone, StepProgress, type StepProgressProps, type StepProgressSegment, StickyActionBar, type StickyActionBarProps, TIME_RANGE_OPTIONS, TableSkeleton, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type TimeRange, TimeRangePicker, type TimeRangePickerLabels, type TimeRangePickerProps, type UploadControllerStatus, type UploadJob, type UploadJobStatus, type UploadProgress, type UseEditableSectionOptions, type UseEditableSectionResult, type UseQueueKeysOptions, type UseSectionNavResult, WizardLayout, type WizardLayoutProps, cn, countryLabel, countryPickerItems, createMultipartUploadController, curpCheckDigit, dataTableBodyMinClass, defaultLanguages, fileMatchesAccept, filterCountries, formatCountryOptionLabel, isKnownCountryCode, matchClaimIsUnverified, normalizeCurpInput, normalizeRfc, partRanges, progressFromBytes, queueRowKeyDown, renderShellLink, rfcMaxLengthForPersonKind, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, useDirtyGuard, useEditableSection, useLanguageContext, useMediaQuery, useQueueKeys, useSectionNav, validateCurp, validateRfcForPersonKind };
|
|
1489
|
+
export { AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AppNavGroup, type AppNavItem, AppShell, type AppShellProps, type AuditActor, type AuditSubject, AuditTimeline, type AuditTimelineItem, type AuditTimelineLabels, type AuditTimelineProps, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorLabels, type AvatarEditorProps, type BlocksLanguage, COUNTRY_OPTIONS, CURP_REGEX, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ControlKind, CookieConsentBanner, type CookieConsentBannerLabels, type CookieConsentBannerProps, CookieConsentValue, CostBreakdownCard, type CostBreakdownCardProps, type CostBreakdownItem, type CountryLocale, type CountryOption, CountryPicker, type CountryPickerItem, type CountryPickerLabels, type CountryPickerProps, type CountryPickerPurpose, type CountryRecord, type CreateMultipartUploadControllerOptions, CurpInput, type CurpInputProps, type CurpValidationError, DATA_TABLE_BODY_MIN_CLASS, DATA_TABLE_DEFAULT_SKELETON_ROWS, DATA_TABLE_ROW_CLASS, DEFAULT_AUDIT_TIMELINE_LABELS, DEFAULT_COOKIE_CONSENT_BANNER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_ENTITY_GRAPH_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_LEGAL_ACCEPT_CHECKBOX_LABELS, DEFAULT_LEGAL_ACCEPT_DIALOG_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DEFAULT_RISK_BADGE_LABELS, DashboardSkeleton, type DashboardSkeletonVariant, DataList, DataListItem, type DataListItemProps, type DataListProps, DataTable, type DataTableColumn, type DataTableProps, DataTableSkeleton, type DetailFact, DetailHeader, type DetailHeaderProps, DetailPageSkeleton, type DimensionBreakdownRow, DimensionBreakdownTable, type DimensionBreakdownTableProps, EditableSection, type EditableSectionLabels, type EditableSectionMode, type EditableSectionProps, type EditableSectionSlots, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, EntityGraph, type EntityGraphEdge, type EntityGraphLabels, type EntityGraphNode, type EntityGraphProps, ErrorState, Field, FieldMessage, type FieldMessageProps, FileDropzone, type FileDropzoneLabels, type FileDropzoneProps, FileUploadMenu, type FileUploadMenuProps, FileUploadTray, type FileUploadTrayLabels, type FileUploadTrayProps, FormCardSkeleton, FormSection, type FormSectionProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LegalAcceptCheckbox, type LegalAcceptCheckboxLabels, type LegalAcceptCheckboxProps, LegalAcceptDialog, type LegalAcceptDialogLabels, type LegalAcceptDialogProps, LegalMarkdown, type LegalMarkdownProps, ListSkeleton, LoadingState, MatchReview, type MatchReviewHit, type MatchReviewLabels, type MatchReviewProps, type MatchReviewSource, type MatchReviewStatus, MetricChartCard, type MetricChartCardProps, MetricEmptyState, type MetricEmptyStateProps, MetricSkeleton, type MetricSkeletonProps, type MultipartUploadAdapter, type MultipartUploadController, type MultipartUploadPart, type NavTab, NavTabs, type NavTabsProps, NavigationProgress, type NavigationProgressProps, NotificationBell, type NotificationBellItem, type NotificationBellLabels, type NotificationBellProps, OptionRow, type OptionRowProps, PageContainer, PageTitle, type PageTitleProps, PageTitleSkeleton, PaginatedCombobox, type PaginatedComboboxItem, type PaginatedComboboxLabels, type PaginatedComboboxProps, type PartRange, PasswordInput, type PasswordInputProps, type PersonKindForRfc, PhoneInput, type PhoneInputProps, QueueLayout, type QueueLayoutProps, RfcInput, type RfcInputProps, type RfcValidationError, RiskBadge, type RiskBadgeLabels, type RiskBadgeProps, type RiskSeverity, RouteLoading, SafeImage, type SafeImageProps, SearchablePicker, type SearchablePickerOption, type SearchablePickerProps, SectionCard, type SectionCardProps, type SectionCardTone, SectionNav, type SectionNavItem, SectionNavList, type SectionNavListProps, type SectionNavProps, SectionSummary, type SectionSummaryProps, SettingRow, type SettingRowProps, type ShellIcon, type ShellLinkProps, type ShellLinkRenderer, SparklineStat, type SparklineStatProps, StatHighlightCard, type StatHighlightCardProps, StatusBadge, type StatusBadgeProps, type StatusTone, StepProgress, type StepProgressProps, type StepProgressSegment, StickyActionBar, type StickyActionBarProps, TIME_RANGE_OPTIONS, TableSkeleton, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type TimeRange, TimeRangePicker, type TimeRangePickerLabels, type TimeRangePickerProps, type UploadControllerStatus, type UploadJob, type UploadJobStatus, type UploadProgress, type UseEditableSectionOptions, type UseEditableSectionResult, type UseQueueKeysOptions, type UseSectionNavResult, WizardLayout, type WizardLayoutProps, cn, countryLabel, countryPickerItems, createMultipartUploadController, curpCheckDigit, dataTableBodyMinClass, defaultLanguages, fileMatchesAccept, filterCountries, formatCountryOptionLabel, isKnownCountryCode, matchClaimIsUnverified, normalizeCurpInput, normalizeRfc, partRanges, progressFromBytes, queueRowKeyDown, renderShellLink, rfcMaxLengthForPersonKind, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, useDirtyGuard, useEditableSection, useLanguageContext, useMediaQuery, useQueueKeys, useSectionNav, validateCurp, validateRfcForPersonKind };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
2
|
+
import * as React5 from 'react';
|
|
3
3
|
import { createContext, useContext, cloneElement, useRef, useEffect, useState, useId, useCallback, useLayoutEffect } from 'react';
|
|
4
4
|
import { Skeleton } from './ui/skeleton.js';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -23,6 +23,7 @@ import { Combobox } from './ui/combobox.js';
|
|
|
23
23
|
import { useDialogPortalContainer, DialogClose, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './ui/dialog.js';
|
|
24
24
|
import { Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerClose, DrawerFooter } from './ui/drawer.js';
|
|
25
25
|
import { Input } from './ui/input.js';
|
|
26
|
+
import { getCountries, getCountryCallingCode, parsePhoneNumberFromString, AsYouType } from 'libphonenumber-js';
|
|
26
27
|
import { Slider } from './ui/slider.js';
|
|
27
28
|
import { Toggle } from './ui/toggle.js';
|
|
28
29
|
import { AnimatePresence, motion, useReducedMotion } from 'framer-motion';
|
|
@@ -3064,8 +3065,8 @@ function CountryPicker({
|
|
|
3064
3065
|
"aria-invalid": ariaInvalid
|
|
3065
3066
|
}) {
|
|
3066
3067
|
const labels = { ...defaultLabels2(purpose, locale), ...labelsProp };
|
|
3067
|
-
const items =
|
|
3068
|
-
const selected =
|
|
3068
|
+
const items = React5.useMemo(() => countryPickerItems(locale), [locale]);
|
|
3069
|
+
const selected = React5.useMemo(() => findItem(items, value), [items, value]);
|
|
3069
3070
|
const dialogPortalContainer = useDialogPortalContainer();
|
|
3070
3071
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3071
3072
|
name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value: value.trim().toUpperCase() }) : null,
|
|
@@ -3221,21 +3222,21 @@ function SearchablePicker({
|
|
|
3221
3222
|
}) {
|
|
3222
3223
|
const isMdUp = useMediaQuery(MD_UP);
|
|
3223
3224
|
const dialogPortalContainer = useDialogPortalContainer();
|
|
3224
|
-
const [open, setOpen] =
|
|
3225
|
-
const searchRef =
|
|
3225
|
+
const [open, setOpen] = React5.useState(false);
|
|
3226
|
+
const searchRef = React5.useRef(null);
|
|
3226
3227
|
function setOpenState(next) {
|
|
3227
3228
|
setOpen(next);
|
|
3228
3229
|
onOpenChange?.(next);
|
|
3229
3230
|
if (!next) onQueryChange("");
|
|
3230
3231
|
}
|
|
3231
|
-
const selected =
|
|
3232
|
+
const selected = React5.useMemo(() => {
|
|
3232
3233
|
if (!value) return null;
|
|
3233
3234
|
return options.find((option) => option.id === value) ?? {
|
|
3234
3235
|
id: value,
|
|
3235
3236
|
label: selectedLabel || value
|
|
3236
3237
|
};
|
|
3237
3238
|
}, [options, selectedLabel, value]);
|
|
3238
|
-
|
|
3239
|
+
React5.useEffect(() => {
|
|
3239
3240
|
if (!open || isMdUp) return;
|
|
3240
3241
|
const handle = window.setTimeout(() => searchRef.current?.focus(), 0);
|
|
3241
3242
|
return () => window.clearTimeout(handle);
|
|
@@ -3556,18 +3557,18 @@ function PaginatedCombobox({
|
|
|
3556
3557
|
}) {
|
|
3557
3558
|
const labels = { ...DEFAULT_LABELS, ...labelsProp };
|
|
3558
3559
|
const dialogPortalContainer = useDialogPortalContainer();
|
|
3559
|
-
const selected =
|
|
3560
|
+
const selected = React5.useMemo(
|
|
3560
3561
|
() => resolveSelected(value, items, selectedItem),
|
|
3561
3562
|
[value, items, selectedItem]
|
|
3562
3563
|
);
|
|
3563
|
-
const listItems =
|
|
3564
|
+
const listItems = React5.useMemo(() => {
|
|
3564
3565
|
if (!selected) return items;
|
|
3565
3566
|
if (items.some((item) => item.value === selected.value)) return items;
|
|
3566
3567
|
return [selected, ...items];
|
|
3567
3568
|
}, [items, selected]);
|
|
3568
|
-
const queryRef =
|
|
3569
|
-
const debounceRef =
|
|
3570
|
-
|
|
3569
|
+
const queryRef = React5.useRef("");
|
|
3570
|
+
const debounceRef = React5.useRef(null);
|
|
3571
|
+
React5.useEffect(() => {
|
|
3571
3572
|
return () => {
|
|
3572
3573
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
3573
3574
|
};
|
|
@@ -3840,7 +3841,7 @@ function PasswordInput({
|
|
|
3840
3841
|
hideLabel = "Hide password",
|
|
3841
3842
|
...props
|
|
3842
3843
|
}) {
|
|
3843
|
-
const [visible, setVisible] =
|
|
3844
|
+
const [visible, setVisible] = React5.useState(false);
|
|
3844
3845
|
return /* @__PURE__ */ jsxs("div", { className: "relative w-full", children: [
|
|
3845
3846
|
/* @__PURE__ */ jsx(
|
|
3846
3847
|
Input,
|
|
@@ -3867,6 +3868,345 @@ function PasswordInput({
|
|
|
3867
3868
|
)
|
|
3868
3869
|
] });
|
|
3869
3870
|
}
|
|
3871
|
+
var MD_UP2 = "(min-width: 768px)";
|
|
3872
|
+
var ROW_CLASS = "flex h-8 w-full min-w-0 items-stretch overflow-hidden rounded-lg border border-input bg-transparent transition-colors outline-none focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40";
|
|
3873
|
+
var SEARCH_CLASS2 = "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 md:text-sm dark:bg-input/30";
|
|
3874
|
+
function isCountryCode(value) {
|
|
3875
|
+
return getCountries().includes(value);
|
|
3876
|
+
}
|
|
3877
|
+
function resolveCountry(code, fallback) {
|
|
3878
|
+
const normalized = (code ?? "").trim().toUpperCase();
|
|
3879
|
+
return isCountryCode(normalized) ? normalized : fallback;
|
|
3880
|
+
}
|
|
3881
|
+
function flagEmoji(iso) {
|
|
3882
|
+
const code = iso.trim().toUpperCase();
|
|
3883
|
+
if (!/^[A-Z]{2}$/.test(code)) return "\u{1F3F3}\uFE0F";
|
|
3884
|
+
return String.fromCodePoint(
|
|
3885
|
+
...code.split("").map((char) => 127397 + char.charCodeAt(0))
|
|
3886
|
+
);
|
|
3887
|
+
}
|
|
3888
|
+
var regionNames;
|
|
3889
|
+
function countryName(code) {
|
|
3890
|
+
try {
|
|
3891
|
+
regionNames ??= new Intl.DisplayNames(["en"], { type: "region" });
|
|
3892
|
+
return regionNames.of(code) ?? code;
|
|
3893
|
+
} catch {
|
|
3894
|
+
return code;
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
function buildCountryOptions() {
|
|
3898
|
+
return getCountries().map((id) => {
|
|
3899
|
+
const dialCode = `+${getCountryCallingCode(id)}`;
|
|
3900
|
+
const name = countryName(id);
|
|
3901
|
+
return {
|
|
3902
|
+
id,
|
|
3903
|
+
dialCode,
|
|
3904
|
+
flag: flagEmoji(id),
|
|
3905
|
+
label: `${name} (${dialCode})`
|
|
3906
|
+
};
|
|
3907
|
+
}).sort((left, right) => left.label.localeCompare(right.label, "en"));
|
|
3908
|
+
}
|
|
3909
|
+
var COUNTRY_OPTIONS2 = buildCountryOptions();
|
|
3910
|
+
function nationalDigits(value) {
|
|
3911
|
+
return value.replace(/\D/g, "");
|
|
3912
|
+
}
|
|
3913
|
+
function formatNational(country, raw) {
|
|
3914
|
+
const digits = nationalDigits(raw);
|
|
3915
|
+
if (!digits) return "";
|
|
3916
|
+
return new AsYouType(country).input(digits);
|
|
3917
|
+
}
|
|
3918
|
+
function toE164(country, national) {
|
|
3919
|
+
const digits = nationalDigits(national);
|
|
3920
|
+
if (!digits) return "";
|
|
3921
|
+
const parsed = parsePhoneNumberFromString(digits, country);
|
|
3922
|
+
if (parsed?.number) return parsed.number;
|
|
3923
|
+
return `+${getCountryCallingCode(country)}${digits}`;
|
|
3924
|
+
}
|
|
3925
|
+
function parseIncoming(value, defaultCountry) {
|
|
3926
|
+
const trimmed = value.trim();
|
|
3927
|
+
if (!trimmed) {
|
|
3928
|
+
return { country: defaultCountry, national: "" };
|
|
3929
|
+
}
|
|
3930
|
+
const parsed = parsePhoneNumberFromString(trimmed, defaultCountry);
|
|
3931
|
+
if (parsed) {
|
|
3932
|
+
const country = parsed.country ?? defaultCountry;
|
|
3933
|
+
const national = parsed.formatNational();
|
|
3934
|
+
return { country, national };
|
|
3935
|
+
}
|
|
3936
|
+
return {
|
|
3937
|
+
country: defaultCountry,
|
|
3938
|
+
national: formatNational(defaultCountry, trimmed)
|
|
3939
|
+
};
|
|
3940
|
+
}
|
|
3941
|
+
function filterCountries2(options, query) {
|
|
3942
|
+
const needle = query.trim().toLowerCase();
|
|
3943
|
+
if (!needle) return options;
|
|
3944
|
+
return options.filter((option) => {
|
|
3945
|
+
const haystack = `${option.label} ${option.id} ${option.dialCode}`.toLowerCase();
|
|
3946
|
+
return haystack.includes(needle);
|
|
3947
|
+
});
|
|
3948
|
+
}
|
|
3949
|
+
function PhoneInput({
|
|
3950
|
+
value,
|
|
3951
|
+
onValueChange,
|
|
3952
|
+
defaultCountry = "MX",
|
|
3953
|
+
searchPlaceholder = "Search country or code\u2026",
|
|
3954
|
+
countryListLabel = "Country",
|
|
3955
|
+
countryTriggerLabel = "Select country",
|
|
3956
|
+
emptyLabel = "No matches",
|
|
3957
|
+
className,
|
|
3958
|
+
disabled,
|
|
3959
|
+
id,
|
|
3960
|
+
name,
|
|
3961
|
+
"aria-invalid": ariaInvalid,
|
|
3962
|
+
"aria-label": ariaLabel,
|
|
3963
|
+
placeholder,
|
|
3964
|
+
...props
|
|
3965
|
+
}) {
|
|
3966
|
+
const resolvedDefault = resolveCountry(defaultCountry, "MX");
|
|
3967
|
+
const [country, setCountry] = React5.useState(
|
|
3968
|
+
() => parseIncoming(value, resolvedDefault).country
|
|
3969
|
+
);
|
|
3970
|
+
const [national, setNational] = React5.useState(
|
|
3971
|
+
() => parseIncoming(value, resolvedDefault).national
|
|
3972
|
+
);
|
|
3973
|
+
const [open, setOpen] = React5.useState(false);
|
|
3974
|
+
const [query, setQuery] = React5.useState("");
|
|
3975
|
+
const lastEmittedRef = React5.useRef(value);
|
|
3976
|
+
const isMdUp = useMediaQuery(MD_UP2);
|
|
3977
|
+
const dialogPortalContainer = useDialogPortalContainer();
|
|
3978
|
+
const searchRef = React5.useRef(null);
|
|
3979
|
+
React5.useEffect(() => {
|
|
3980
|
+
if (value === lastEmittedRef.current) return;
|
|
3981
|
+
lastEmittedRef.current = value;
|
|
3982
|
+
const next = parseIncoming(value, resolvedDefault);
|
|
3983
|
+
setCountry(next.country);
|
|
3984
|
+
setNational(next.national);
|
|
3985
|
+
}, [value, resolvedDefault]);
|
|
3986
|
+
React5.useEffect(() => {
|
|
3987
|
+
if (!open || isMdUp) return;
|
|
3988
|
+
const handle = window.setTimeout(() => searchRef.current?.focus(), 0);
|
|
3989
|
+
return () => window.clearTimeout(handle);
|
|
3990
|
+
}, [isMdUp, open]);
|
|
3991
|
+
const selected = COUNTRY_OPTIONS2.find((option) => option.id === country) ?? COUNTRY_OPTIONS2.find((option) => option.id === resolvedDefault);
|
|
3992
|
+
const filtered = React5.useMemo(
|
|
3993
|
+
() => filterCountries2(COUNTRY_OPTIONS2, query),
|
|
3994
|
+
[query]
|
|
3995
|
+
);
|
|
3996
|
+
function emit(nextCountry, nextNational) {
|
|
3997
|
+
const nextValue = toE164(nextCountry, nextNational);
|
|
3998
|
+
lastEmittedRef.current = nextValue;
|
|
3999
|
+
setCountry(nextCountry);
|
|
4000
|
+
setNational(nextNational);
|
|
4001
|
+
onValueChange(nextValue);
|
|
4002
|
+
}
|
|
4003
|
+
function setOpenState(next) {
|
|
4004
|
+
setOpen(next);
|
|
4005
|
+
if (!next) setQuery("");
|
|
4006
|
+
}
|
|
4007
|
+
function selectCountry(next) {
|
|
4008
|
+
const formatted = formatNational(next, national);
|
|
4009
|
+
emit(next, formatted);
|
|
4010
|
+
setOpenState(false);
|
|
4011
|
+
}
|
|
4012
|
+
function onNationalChange(nextRaw) {
|
|
4013
|
+
const formatted = formatNational(country, nextRaw);
|
|
4014
|
+
emit(country, formatted);
|
|
4015
|
+
}
|
|
4016
|
+
const dialDisplay = selected.dialCode;
|
|
4017
|
+
const countryTriggerClass = "inline-flex h-full shrink-0 items-center gap-1 border-r border-input px-2 text-sm outline-none disabled:pointer-events-none";
|
|
4018
|
+
const desktopPicker = /* @__PURE__ */ jsxs(
|
|
4019
|
+
Combobox.Root,
|
|
4020
|
+
{
|
|
4021
|
+
items: filtered,
|
|
4022
|
+
value: selected,
|
|
4023
|
+
open,
|
|
4024
|
+
onOpenChange: setOpenState,
|
|
4025
|
+
inputValue: query,
|
|
4026
|
+
onInputValueChange: setQuery,
|
|
4027
|
+
onValueChange: (item) => {
|
|
4028
|
+
if (item) selectCountry(item.id);
|
|
4029
|
+
},
|
|
4030
|
+
disabled,
|
|
4031
|
+
filter: null,
|
|
4032
|
+
autoComplete: "none",
|
|
4033
|
+
itemToStringLabel: (item) => item.label,
|
|
4034
|
+
itemToStringValue: (item) => item.id,
|
|
4035
|
+
isItemEqualToValue: (item, current) => item.id === current.id,
|
|
4036
|
+
children: [
|
|
4037
|
+
/* @__PURE__ */ jsxs(
|
|
4038
|
+
Combobox.Trigger,
|
|
4039
|
+
{
|
|
4040
|
+
"aria-invalid": ariaInvalid,
|
|
4041
|
+
"aria-label": countryTriggerLabel,
|
|
4042
|
+
className: countryTriggerClass,
|
|
4043
|
+
disabled,
|
|
4044
|
+
children: [
|
|
4045
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-base leading-none", children: selected.flag }),
|
|
4046
|
+
/* @__PURE__ */ jsx("span", { className: "tabular-nums text-muted-foreground", children: dialDisplay }),
|
|
4047
|
+
/* @__PURE__ */ jsx(
|
|
4048
|
+
ChevronDownIcon,
|
|
4049
|
+
{
|
|
4050
|
+
"aria-hidden": true,
|
|
4051
|
+
className: "size-3.5 shrink-0 text-muted-foreground"
|
|
4052
|
+
}
|
|
4053
|
+
)
|
|
4054
|
+
]
|
|
4055
|
+
}
|
|
4056
|
+
),
|
|
4057
|
+
/* @__PURE__ */ jsx(Combobox.Portal, { container: dialogPortalContainer ?? void 0, children: /* @__PURE__ */ jsx(
|
|
4058
|
+
Combobox.Positioner,
|
|
4059
|
+
{
|
|
4060
|
+
className: "pointer-events-auto isolate z-[60] outline-none",
|
|
4061
|
+
sideOffset: 4,
|
|
4062
|
+
children: /* @__PURE__ */ jsxs(
|
|
4063
|
+
Combobox.Popup,
|
|
4064
|
+
{
|
|
4065
|
+
className: cn(
|
|
4066
|
+
"pointer-events-auto z-[60] flex w-[min(20rem,var(--anchor-width))] min-w-[16rem] flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
4067
|
+
"motion-safe:data-open:animate-in motion-safe:data-open:fade-in-0 motion-safe:data-open:zoom-in-95"
|
|
4068
|
+
),
|
|
4069
|
+
children: [
|
|
4070
|
+
/* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 border-b border-border bg-popover p-2", children: /* @__PURE__ */ jsx(
|
|
4071
|
+
Combobox.Input,
|
|
4072
|
+
{
|
|
4073
|
+
"aria-label": searchPlaceholder,
|
|
4074
|
+
className: SEARCH_CLASS2,
|
|
4075
|
+
placeholder: searchPlaceholder
|
|
4076
|
+
}
|
|
4077
|
+
) }),
|
|
4078
|
+
/* @__PURE__ */ jsx(Combobox.Empty, { className: "px-3 py-3 text-sm text-muted-foreground", children: emptyLabel }),
|
|
4079
|
+
/* @__PURE__ */ jsx(
|
|
4080
|
+
Combobox.List,
|
|
4081
|
+
{
|
|
4082
|
+
"aria-label": countryListLabel,
|
|
4083
|
+
className: "max-h-60 overflow-y-auto p-1 outline-none",
|
|
4084
|
+
onWheel: (event) => event.stopPropagation(),
|
|
4085
|
+
children: (item) => /* @__PURE__ */ jsxs(
|
|
4086
|
+
Combobox.Item,
|
|
4087
|
+
{
|
|
4088
|
+
value: item,
|
|
4089
|
+
className: cn(
|
|
4090
|
+
"relative flex cursor-default items-center gap-2 rounded-md py-2 pr-2 pl-8 text-sm outline-none select-none",
|
|
4091
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground"
|
|
4092
|
+
),
|
|
4093
|
+
children: [
|
|
4094
|
+
/* @__PURE__ */ jsx(Combobox.ItemIndicator, { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4", "aria-hidden": true }) }),
|
|
4095
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-base leading-none", children: item.flag }),
|
|
4096
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: item.label })
|
|
4097
|
+
]
|
|
4098
|
+
},
|
|
4099
|
+
item.id
|
|
4100
|
+
)
|
|
4101
|
+
}
|
|
4102
|
+
)
|
|
4103
|
+
]
|
|
4104
|
+
}
|
|
4105
|
+
)
|
|
4106
|
+
}
|
|
4107
|
+
) })
|
|
4108
|
+
]
|
|
4109
|
+
}
|
|
4110
|
+
);
|
|
4111
|
+
const mobileTrigger = /* @__PURE__ */ jsxs(
|
|
4112
|
+
"button",
|
|
4113
|
+
{
|
|
4114
|
+
"aria-expanded": open,
|
|
4115
|
+
"aria-haspopup": "dialog",
|
|
4116
|
+
"aria-invalid": ariaInvalid,
|
|
4117
|
+
"aria-label": countryTriggerLabel,
|
|
4118
|
+
className: countryTriggerClass,
|
|
4119
|
+
disabled,
|
|
4120
|
+
type: "button",
|
|
4121
|
+
onClick: () => setOpenState(true),
|
|
4122
|
+
children: [
|
|
4123
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-base leading-none", children: selected.flag }),
|
|
4124
|
+
/* @__PURE__ */ jsx("span", { className: "tabular-nums text-muted-foreground", children: dialDisplay }),
|
|
4125
|
+
/* @__PURE__ */ jsx(
|
|
4126
|
+
ChevronDownIcon,
|
|
4127
|
+
{
|
|
4128
|
+
"aria-hidden": true,
|
|
4129
|
+
className: "size-3.5 shrink-0 text-muted-foreground"
|
|
4130
|
+
}
|
|
4131
|
+
)
|
|
4132
|
+
]
|
|
4133
|
+
}
|
|
4134
|
+
);
|
|
4135
|
+
return /* @__PURE__ */ jsxs(
|
|
4136
|
+
"div",
|
|
4137
|
+
{
|
|
4138
|
+
"aria-invalid": ariaInvalid,
|
|
4139
|
+
className: cn(
|
|
4140
|
+
ROW_CLASS,
|
|
4141
|
+
disabled ? "pointer-events-none cursor-not-allowed bg-input/50 opacity-50 dark:bg-input/80" : null,
|
|
4142
|
+
className
|
|
4143
|
+
),
|
|
4144
|
+
children: [
|
|
4145
|
+
name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value }) : null,
|
|
4146
|
+
isMdUp ? desktopPicker : mobileTrigger,
|
|
4147
|
+
/* @__PURE__ */ jsx(
|
|
4148
|
+
"input",
|
|
4149
|
+
{
|
|
4150
|
+
...props,
|
|
4151
|
+
"aria-invalid": ariaInvalid,
|
|
4152
|
+
"aria-label": ariaLabel,
|
|
4153
|
+
autoComplete: props.autoComplete ?? "tel-national",
|
|
4154
|
+
className: "h-full min-w-0 flex-1 border-0 bg-transparent px-2.5 py-1 text-base outline-none placeholder:text-muted-foreground md:text-sm",
|
|
4155
|
+
disabled,
|
|
4156
|
+
id,
|
|
4157
|
+
inputMode: "tel",
|
|
4158
|
+
placeholder,
|
|
4159
|
+
type: "tel",
|
|
4160
|
+
value: national,
|
|
4161
|
+
onChange: (event) => onNationalChange(event.target.value)
|
|
4162
|
+
}
|
|
4163
|
+
),
|
|
4164
|
+
!isMdUp ? /* @__PURE__ */ jsx(Drawer, { open, onOpenChange: setOpenState, children: /* @__PURE__ */ jsxs(DrawerContent, { className: "max-h-[85vh]", children: [
|
|
4165
|
+
/* @__PURE__ */ jsx(DrawerHeader, { className: "text-left", children: /* @__PURE__ */ jsx(DrawerTitle, { children: countryListLabel }) }),
|
|
4166
|
+
/* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 border-b border-border bg-background px-4 pb-3", children: /* @__PURE__ */ jsx(
|
|
4167
|
+
Input,
|
|
4168
|
+
{
|
|
4169
|
+
ref: searchRef,
|
|
4170
|
+
"aria-label": searchPlaceholder,
|
|
4171
|
+
disabled,
|
|
4172
|
+
placeholder: searchPlaceholder,
|
|
4173
|
+
value: query,
|
|
4174
|
+
onChange: (event) => setQuery(event.target.value)
|
|
4175
|
+
}
|
|
4176
|
+
) }),
|
|
4177
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-y-auto px-2 pb-4", children: filtered.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-2 py-3 text-sm text-muted-foreground", children: emptyLabel }) : /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1 p-1", role: "listbox", children: filtered.map((option) => {
|
|
4178
|
+
const isSelected = option.id === country;
|
|
4179
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
4180
|
+
"button",
|
|
4181
|
+
{
|
|
4182
|
+
"aria-selected": isSelected,
|
|
4183
|
+
className: cn(
|
|
4184
|
+
"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm outline-none transition-colors",
|
|
4185
|
+
"hover:bg-muted/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
4186
|
+
isSelected ? "bg-accent" : null
|
|
4187
|
+
),
|
|
4188
|
+
role: "option",
|
|
4189
|
+
type: "button",
|
|
4190
|
+
onClick: () => selectCountry(option.id),
|
|
4191
|
+
children: [
|
|
4192
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-base leading-none", children: option.flag }),
|
|
4193
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: option.label }),
|
|
4194
|
+
isSelected ? /* @__PURE__ */ jsx(
|
|
4195
|
+
CheckIcon,
|
|
4196
|
+
{
|
|
4197
|
+
"aria-hidden": true,
|
|
4198
|
+
className: "size-4 shrink-0"
|
|
4199
|
+
}
|
|
4200
|
+
) : null
|
|
4201
|
+
]
|
|
4202
|
+
}
|
|
4203
|
+
) }, option.id);
|
|
4204
|
+
}) }) })
|
|
4205
|
+
] }) }) : null
|
|
4206
|
+
]
|
|
4207
|
+
}
|
|
4208
|
+
);
|
|
4209
|
+
}
|
|
3870
4210
|
var DEFAULT_LABELS2 = {
|
|
3871
4211
|
uploadAria: "Upload image",
|
|
3872
4212
|
uploadHint: "Click to upload",
|
|
@@ -6921,6 +7261,6 @@ function MatchReview({
|
|
|
6921
7261
|
);
|
|
6922
7262
|
}
|
|
6923
7263
|
|
|
6924
|
-
export { AccountMenu, AppShell, AuditTimeline, AvatarEditor, AvatarEditorDialog, COOKIE_CONSENT_MAX_AGE, COOKIE_CONSENT_NAME, COOKIE_CONSENT_VALUES, COUNTRY_OPTIONS, CURP_REGEX, ConfirmDestructiveDialog, CookieConsentBanner, CostBreakdownCard, CountryPicker, CurpInput, DATA_TABLE_BODY_MIN_CLASS, DATA_TABLE_DEFAULT_SKELETON_ROWS, DATA_TABLE_ROW_CLASS, DEFAULT_AUDIT_TIMELINE_LABELS, DEFAULT_COOKIE_CONSENT_BANNER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_ENTITY_GRAPH_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_LEGAL_ACCEPT_CHECKBOX_LABELS, DEFAULT_LEGAL_ACCEPT_DIALOG_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DEFAULT_RISK_BADGE_LABELS, DashboardSkeleton, DataList, DataListItem, DataTable, DataTableSkeleton, DetailHeader, DetailPageSkeleton, DimensionBreakdownTable, EditableSection, Empty2 as Empty, EmptyContent2 as EmptyContent, EmptyDescription2 as EmptyDescription, EmptyHeader2 as EmptyHeader, EmptyMedia2 as EmptyMedia, EmptyState, EmptyTitle2 as EmptyTitle, EntityGraph, ErrorState, Field, FieldMessage, FileDropzone, FileUploadMenu, FileUploadTray, FormCardSkeleton, FormSection, LanguageContext, LanguageSwitcher, LegalAcceptCheckbox, LegalAcceptDialog, LegalMarkdown, ListSkeleton, LoadingState, MatchReview, MetricChartCard, MetricEmptyState, MetricSkeleton, NavTabs, NavigationProgress, NotificationBell, OptionRow, PageContainer, PageTitle, PageTitleSkeleton, PaginatedCombobox, PasswordInput, QueueLayout, RfcInput, RiskBadge, RouteLoading, SafeImage, SearchablePicker, SectionCard, SectionNav, SectionNavList, SectionSummary, SettingRow, SparklineStat, StatHighlightCard, StatusBadge, StepProgress, StickyActionBar, THEME_INIT_SCRIPT, THEME_INIT_SCRIPT_ID, THEME_STORAGE_KEY, TIME_RANGE_OPTIONS, TableSkeleton, ThemeSwitcher, TimeRangePicker, WizardLayout, avatarFallbackStyle, cn, cookieConsentAllowsReplay, cookieDomainFromHostname, countryLabel, countryPickerItems, createMultipartUploadController, curpCheckDigit, dataTableBodyMinClass, defaultLanguages, fileMatchesAccept, filterCountries, formatCountryOptionLabel, getAvatarColors, getInitials, isCookieConsentValue, isEmbeddedWindow, isKnownCountryCode, matchClaimIsUnverified, normalizeCurpInput, normalizeRfc, parseCookieConsent, partRanges, progressFromBytes, queueRowKeyDown, readCookieConsent, renderShellLink, rfcMaxLengthForPersonKind, serializeCookieConsent, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, useDirtyGuard, useEditableSection, useLanguageContext, useMediaQuery, useQueueKeys, useSectionNav, validateCurp, validateRfcForPersonKind, writeCookieConsent };
|
|
7264
|
+
export { AccountMenu, AppShell, AuditTimeline, AvatarEditor, AvatarEditorDialog, COOKIE_CONSENT_MAX_AGE, COOKIE_CONSENT_NAME, COOKIE_CONSENT_VALUES, COUNTRY_OPTIONS, CURP_REGEX, ConfirmDestructiveDialog, CookieConsentBanner, CostBreakdownCard, CountryPicker, CurpInput, DATA_TABLE_BODY_MIN_CLASS, DATA_TABLE_DEFAULT_SKELETON_ROWS, DATA_TABLE_ROW_CLASS, DEFAULT_AUDIT_TIMELINE_LABELS, DEFAULT_COOKIE_CONSENT_BANNER_LABELS, DEFAULT_EDITABLE_SECTION_LABELS, DEFAULT_ENTITY_GRAPH_LABELS, DEFAULT_FILE_DROPZONE_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILE_UPLOAD_TRAY_LABELS, DEFAULT_LEGAL_ACCEPT_CHECKBOX_LABELS, DEFAULT_LEGAL_ACCEPT_DIALOG_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_NOTIFICATION_BELL_LABELS, DEFAULT_RISK_BADGE_LABELS, DashboardSkeleton, DataList, DataListItem, DataTable, DataTableSkeleton, DetailHeader, DetailPageSkeleton, DimensionBreakdownTable, EditableSection, Empty2 as Empty, EmptyContent2 as EmptyContent, EmptyDescription2 as EmptyDescription, EmptyHeader2 as EmptyHeader, EmptyMedia2 as EmptyMedia, EmptyState, EmptyTitle2 as EmptyTitle, EntityGraph, ErrorState, Field, FieldMessage, FileDropzone, FileUploadMenu, FileUploadTray, FormCardSkeleton, FormSection, LanguageContext, LanguageSwitcher, LegalAcceptCheckbox, LegalAcceptDialog, LegalMarkdown, ListSkeleton, LoadingState, MatchReview, MetricChartCard, MetricEmptyState, MetricSkeleton, NavTabs, NavigationProgress, NotificationBell, OptionRow, PageContainer, PageTitle, PageTitleSkeleton, PaginatedCombobox, PasswordInput, PhoneInput, QueueLayout, RfcInput, RiskBadge, RouteLoading, SafeImage, SearchablePicker, SectionCard, SectionNav, SectionNavList, SectionSummary, SettingRow, SparklineStat, StatHighlightCard, StatusBadge, StepProgress, StickyActionBar, THEME_INIT_SCRIPT, THEME_INIT_SCRIPT_ID, THEME_STORAGE_KEY, TIME_RANGE_OPTIONS, TableSkeleton, ThemeSwitcher, TimeRangePicker, WizardLayout, avatarFallbackStyle, cn, cookieConsentAllowsReplay, cookieDomainFromHostname, countryLabel, countryPickerItems, createMultipartUploadController, curpCheckDigit, dataTableBodyMinClass, defaultLanguages, fileMatchesAccept, filterCountries, formatCountryOptionLabel, getAvatarColors, getInitials, isCookieConsentValue, isEmbeddedWindow, isKnownCountryCode, matchClaimIsUnverified, normalizeCurpInput, normalizeRfc, parseCookieConsent, partRanges, progressFromBytes, queueRowKeyDown, readCookieConsent, renderShellLink, rfcMaxLengthForPersonKind, serializeCookieConsent, signalNavigationStart, sourceUrlIsHttps, suppressNavigationProgress, useDirtyGuard, useEditableSection, useLanguageContext, useMediaQuery, useQueueKeys, useSectionNav, validateCurp, validateRfcForPersonKind, writeCookieConsent };
|
|
6925
7265
|
//# sourceMappingURL=index.js.map
|
|
6926
7266
|
//# sourceMappingURL=index.js.map
|