docthub-core-components 3.3.15 → 3.3.17
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/components/overrides/ui/inputs/phone-input.js +261 -270
- package/dist/components/overrides/ui/mobile-number-dialog/mobile-number-dialog.js +347 -335
- package/dist/index.js +32 -35
- package/dist/src/components/overrides/ui/inputs/phone-input.d.ts +22 -8
- package/dist/src/components/overrides/ui/mobile-number-dialog/mobile-number-dialog.d.ts +1 -1
- package/dist/src/components/overrides/ui/mobile-number-dialog/types.d.ts +9 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import { Chip as c } from "./components/overrides/ui/chips/doct-chip.js";
|
|
|
6
6
|
import { CircularProgress as i } from "./components/overrides/ui/circular-progress.js";
|
|
7
7
|
import { AddressFormSection as _ } from "./components/overrides/ui/composed/address-form-section.js";
|
|
8
8
|
import { ContactFormSection as I } from "./components/overrides/ui/composed/contact-form-section.js";
|
|
9
|
-
import { SearchFilterSection as
|
|
10
|
-
import { UserRegistrationSection as
|
|
9
|
+
import { SearchFilterSection as C } from "./components/overrides/ui/composed/search-filter-section.js";
|
|
10
|
+
import { UserRegistrationSection as l } from "./components/overrides/ui/composed/user-registration-section.js";
|
|
11
11
|
import { CurrencyInput as A } from "./components/overrides/ui/currencyInput/currency-input.js";
|
|
12
12
|
import { DoctAnimationLoader as N } from "./components/overrides/ui/doct-animation-loader.js";
|
|
13
13
|
import { ExpandableCard as u } from "./components/overrides/ui/expandable-card.js";
|
|
@@ -18,7 +18,7 @@ import { DoctPhoneInput as x } from "./components/overrides/ui/inputs/phone-inpu
|
|
|
18
18
|
import { DatePickerField as f } from "./components/overrides/ui/pickers/date-picker-field.js";
|
|
19
19
|
import { DateRangePickerField as F } from "./components/overrides/ui/pickers/date-range-picker-field.js";
|
|
20
20
|
import { SelectField as v } from "./components/overrides/ui/pickers/select-field.js";
|
|
21
|
-
import { AutoComplete as
|
|
21
|
+
import { AutoComplete as h } from "./components/overrides/ui/search/auto-complete.js";
|
|
22
22
|
import { SearchInput as Y } from "./components/overrides/ui/search/search-input.js";
|
|
23
23
|
import { ComponentVariant as y, ComponentSection as W } from "./components/overrides/ui/showcase/component-section.js";
|
|
24
24
|
import { Alert as Q, AlertDescription as Z, AlertTitle as X } from "./components/ui/alert.js";
|
|
@@ -27,44 +27,43 @@ import { Badge as oo, badgeVariants as eo } from "./components/ui/badge.js";
|
|
|
27
27
|
import { Breadcrumb as to, BreadcrumbEllipsis as ao, BreadcrumbItem as Do, BreadcrumbLink as po, BreadcrumbList as co, BreadcrumbPage as no, BreadcrumbSeparator as io } from "./components/ui/breadcrumb.js";
|
|
28
28
|
import { DoctButton as _o } from "./components/ui/button.js";
|
|
29
29
|
import { CalendarDayButton as Io, Calendar as To } from "./components/ui/calendar.js";
|
|
30
|
-
import { Checkbox as
|
|
30
|
+
import { Checkbox as Oo } from "./components/ui/checkbox.js";
|
|
31
31
|
import { Collapsible as Lo, CollapsibleContent as Ao, CollapsibleTrigger as Eo } from "./components/ui/collapsible.js";
|
|
32
32
|
import { Command as uo, CommandDialog as Mo, CommandEmpty as Po, CommandGroup as Ro, CommandInput as So, CommandItem as go, CommandList as bo, CommandSeparator as Bo, CommandShortcut as xo } from "./components/ui/command.js";
|
|
33
33
|
import { CookieDialog as fo } from "./components/ui/cookie-dialog.js";
|
|
34
|
-
import { Dialog as Fo, DialogClose as wo, DialogContent as vo, DialogDescription as
|
|
34
|
+
import { Dialog as Fo, DialogClose as wo, DialogContent as vo, DialogDescription as Ho, DialogFooter as ho, DialogHeader as ko, DialogScrollableBody as Yo, DialogTitle as Vo, DialogTrigger as yo } from "./components/ui/dialog.js";
|
|
35
35
|
import { Drawer as Ko, DrawerClose as Qo, DrawerContent as Zo, DrawerDescription as Xo, DrawerFooter as zo, DrawerHeader as jo, DrawerTitle as qo, DrawerTrigger as Jo } from "./components/ui/drawer.js";
|
|
36
36
|
import { DropdownMenu as oe, DropdownMenuCheckboxItem as ee, DropdownMenuContent as re, DropdownMenuGroup as te, DropdownMenuItem as ae, DropdownMenuLabel as De, DropdownMenuRadioGroup as pe, DropdownMenuRadioItem as ce, DropdownMenuSeparator as ne, DropdownMenuShortcut as ie, DropdownMenuSub as se, DropdownMenuSubContent as _e, DropdownMenuSubTrigger as me, DropdownMenuTrigger as Ie } from "./components/ui/dropdown-menu.js";
|
|
37
|
-
import { Input as
|
|
38
|
-
import { Label as
|
|
37
|
+
import { Input as Ce } from "./components/ui/input.js";
|
|
38
|
+
import { Label as le } from "./components/ui/label.js";
|
|
39
39
|
import { Popover as Ae, PopoverArrow as Ee, PopoverBackdrop as Ne, PopoverClose as de, PopoverContent as ue, PopoverDescription as Me, PopoverHeader as Pe, PopoverTitle as Re, PopoverTrigger as Se, PopoverViewport as ge } from "./components/ui/popover.js";
|
|
40
40
|
import { Progress as Be } from "./components/ui/progress.js";
|
|
41
41
|
import { RadioGroup as Ue, RadioGroupItem as fe } from "./components/ui/radio-group.js";
|
|
42
42
|
import { Skeleton as Fe } from "./components/ui/skeleton.js";
|
|
43
|
-
import { Stepper as ve, StepperContent as
|
|
43
|
+
import { Stepper as ve, StepperContent as He, StepperDescription as he, StepperIndicator as ke, StepperItem as Ye, StepperNav as Ve, StepperPanel as ye, StepperSeparator as We, StepperTitle as Ke, StepperTrigger as Qe, useStepItem as Ze, useStepper as Xe } from "./components/ui/stepper.js";
|
|
44
44
|
import { Tabs as je, TabsContent as qe, TabsList as Je, TabsTrigger as $e } from "./components/ui/tabs.js";
|
|
45
45
|
import { Textarea as er } from "./components/ui/textarea.js";
|
|
46
46
|
import { Timeline as tr } from "./components/ui/timeline.js";
|
|
47
47
|
import { toast as Dr, Toaster as pr } from "./components/ui/toast.js";
|
|
48
48
|
import { Tooltip as nr, TooltipContent as ir, TooltipProvider as sr, TooltipTrigger as _r } from "./components/ui/tooltip.js";
|
|
49
49
|
import { DoctTypography as Ir } from "./components/ui/typography.js";
|
|
50
|
-
import { useAutocompleteCheckbox as
|
|
51
|
-
import { ACCOUNT_CONFLICT_PROMPT_BODY_TITLE as
|
|
50
|
+
import { useAutocompleteCheckbox as Cr } from "./hooks/useAutocompleteCheckbox.js";
|
|
51
|
+
import { ACCOUNT_CONFLICT_PROMPT_BODY_TITLE as lr, ACCOUNT_CONFLICT_PROMPT_DEFAULT_COUNTRY_CODE as Lr, ACCOUNT_CONFLICT_PROMPT_DEFAULT_EXISTING_ACCOUNT_ERROR as Ar, ACCOUNT_CONFLICT_PROMPT_DEFAULT_INFO_MESSAGE as Er, ACCOUNT_CONFLICT_PROMPT_DEFAULT_MASKED_EMAIL as Nr, ACCOUNT_CONFLICT_PROMPT_DEFAULT_PHONE_DISPLAY as dr, ACCOUNT_CONFLICT_PROMPT_DEFAULT_PHONE_NUMBER as ur, ACCOUNT_CONFLICT_PROMPT_DEFAULT_PHONE_PLACEHOLDER as Mr, ACCOUNT_CONFLICT_PROMPT_HEADER_TITLE as Pr, ACCOUNT_CONFLICT_PROMPT_LOGIN_UNIFY_HINT as Rr, ACCOUNT_CONFLICT_PROMPT_PRIMARY_LABEL as Sr, ACCOUNT_CONFLICT_PROMPT_SECONDARY_LABEL as gr, MOBILE_NUMBER_DIALOG_BODY_TITLE as br, MOBILE_NUMBER_DIALOG_DEFAULT_COUNTRY_CODE as Br, MOBILE_NUMBER_DIALOG_DEFAULT_EXISTING_ACCOUNT_ERROR as xr, MOBILE_NUMBER_DIALOG_DEFAULT_INFO_MESSAGE as Ur, MOBILE_NUMBER_DIALOG_DEFAULT_MASKED_EMAIL as fr, MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_DISPLAY as Gr, MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_NUMBER as Fr, MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_PLACEHOLDER as wr, MOBILE_NUMBER_DIALOG_HEADER_TITLE as vr, MOBILE_NUMBER_DIALOG_LOGIN_UNIFY_HINT as Hr, MOBILE_NUMBER_DIALOG_OTP_HEADER_TITLE as hr, MOBILE_NUMBER_DIALOG_OTP_RESEND_BUTTON_LABEL as kr, MOBILE_NUMBER_DIALOG_OTP_RESEND_LABEL as Yr, MOBILE_NUMBER_DIALOG_OTP_SUBMIT_LABEL as Vr, MOBILE_NUMBER_DIALOG_OTP_TITLE as yr, MOBILE_NUMBER_DIALOG_PRIMARY_LABEL as Wr, MOBILE_NUMBER_DIALOG_SECONDARY_LABEL as Kr, buildExistingAccountError as Qr, buildExistingMobileNumberError as Zr, buildLoginWithMobileNumberLabel as Xr, buildLoginWithPhoneLabel as zr, buildMobileNumberDisplay as jr, buildPhoneDisplay as qr, isMobileNumberDialogPrimaryDisabled as Jr } from "./components/overrides/ui/mobile-number-dialog/presets.js";
|
|
52
52
|
import { ACCOUNT_CONFLICT_PROMPT_DRAWER_BACKDROP_CLASS as ot, MOBILE_NUMBER_DIALOG_DRAWER_BACKDROP_CLASS as et } from "./components/overrides/ui/mobile-number-dialog/types.js";
|
|
53
53
|
import { DoctAccountConflictPrompt as tt, DoctMobileNumberDialog as at, MobileNumberDialog as Dt } from "./components/overrides/ui/mobile-number-dialog/mobile-number-dialog.js";
|
|
54
54
|
import { DoctFooter as ct } from "./components/overrides/ui/footer/doct-footer.js";
|
|
55
55
|
import { DoctLoginDialog as it } from "./components/overrides/ui/login-dialog/login-dialog.js";
|
|
56
56
|
import { DoctNavigationMenu as _t } from "./components/overrides/ui/navigation-menu/doct-navigation-menu.js";
|
|
57
|
-
import { INDIVIDUAL_NAV_ROUTES as It, INDIVIDUAL_NAV_ROUTES_PROD as Tt, INDIVIDUAL_NAV_ROUTES_QA as
|
|
58
|
-
import { IndividualNavigationMenu as
|
|
57
|
+
import { INDIVIDUAL_NAV_ROUTES as It, INDIVIDUAL_NAV_ROUTES_PROD as Tt, INDIVIDUAL_NAV_ROUTES_QA as Ct } from "./components/overrides/ui/navigation-menu/individual-nav-routes.js";
|
|
58
|
+
import { IndividualNavigationMenu as lt } from "./components/overrides/ui/navigation-menu/individual-navigation-menu.js";
|
|
59
59
|
import { LOGIN_DIALOG_ASSETS as At, LOGIN_DIALOG_CONTINUE_ANOTHER_WAY_LABEL as Et, LOGIN_DIALOG_CONTINUE_PHONE_EMAIL_LABEL as Nt, LOGIN_DIALOG_DEFAULT_COPY as dt, LOGIN_DIALOG_RETURNING_HINT as ut, LOGIN_DIALOG_RETURNING_PRIMARY_LABEL as Mt } from "./components/overrides/ui/login-dialog/presets.js";
|
|
60
60
|
import { LOGIN_DIALOG_IMAGE_HEIGHT as Rt, LOGIN_DIALOG_IMAGE_WIDTH as St, LOGIN_DRAWER_BACKDROP_CLASS as gt } from "./components/overrides/ui/login-dialog/types.js";
|
|
61
61
|
import { MobileNumberDialogOtpSurface as Bt } from "./components/overrides/ui/mobile-number-dialog/otp-dialog.js";
|
|
62
62
|
import { ORGANIZATION_NAV_ROUTES as Ut, ORGANIZATION_NAV_ROUTES_PROD as ft, ORGANIZATION_NAV_ROUTES_QA as Gt } from "./components/overrides/ui/navigation-menu/organization-nav-routes.js";
|
|
63
63
|
import { OrganizationNavigationMenu as wt } from "./components/overrides/ui/navigation-menu/organization-navigation-menu.js";
|
|
64
|
-
import {
|
|
65
|
-
import { isProdNav as Yt, isQaNav as Vt, resolveNavEnv as yt } from "./components/overrides/ui/navigation-menu/nav-env.js";
|
|
64
|
+
import { isProdNav as Ht, isQaNav as ht, resolveNavEnv as kt } from "./components/overrides/ui/navigation-menu/nav-env.js";
|
|
66
65
|
export {
|
|
67
|
-
|
|
66
|
+
lr as ACCOUNT_CONFLICT_PROMPT_BODY_TITLE,
|
|
68
67
|
Lr as ACCOUNT_CONFLICT_PROMPT_DEFAULT_COUNTRY_CODE,
|
|
69
68
|
Ar as ACCOUNT_CONFLICT_PROMPT_DEFAULT_EXISTING_ACCOUNT_ERROR,
|
|
70
69
|
Er as ACCOUNT_CONFLICT_PROMPT_DEFAULT_INFO_MESSAGE,
|
|
@@ -85,7 +84,7 @@ export {
|
|
|
85
84
|
Z as DoctAlertDescription,
|
|
86
85
|
X as DoctAlertTitle,
|
|
87
86
|
N as DoctAnimationLoader,
|
|
88
|
-
|
|
87
|
+
h as DoctAutoComplete,
|
|
89
88
|
t as DoctAutocomplete,
|
|
90
89
|
D as DoctAutocompleteCheckbox,
|
|
91
90
|
j as DoctAvatar,
|
|
@@ -101,7 +100,7 @@ export {
|
|
|
101
100
|
io as DoctBreadcrumbSeparator,
|
|
102
101
|
_o as DoctButton,
|
|
103
102
|
To as DoctCalendar,
|
|
104
|
-
|
|
103
|
+
Oo as DoctCheckbox,
|
|
105
104
|
c as DoctChip,
|
|
106
105
|
i as DoctCircularProgress,
|
|
107
106
|
Lo as DoctCollapsible,
|
|
@@ -125,8 +124,8 @@ export {
|
|
|
125
124
|
Fo as DoctDialog,
|
|
126
125
|
wo as DoctDialogClose,
|
|
127
126
|
vo as DoctDialogContent,
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
Ho as DoctDialogDescription,
|
|
128
|
+
ho as DoctDialogFooter,
|
|
130
129
|
ko as DoctDialogHeader,
|
|
131
130
|
Yo as DoctDialogScrollableBody,
|
|
132
131
|
Vo as DoctDialogTitle,
|
|
@@ -155,8 +154,8 @@ export {
|
|
|
155
154
|
Ie as DoctDropdownMenuTrigger,
|
|
156
155
|
u as DoctExpandableCard,
|
|
157
156
|
ct as DoctFooter,
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
Ce as DoctInput,
|
|
158
|
+
le as DoctLabel,
|
|
160
159
|
P as DoctLabeledInput,
|
|
161
160
|
it as DoctLoginDialog,
|
|
162
161
|
at as DoctMobileNumberDialog,
|
|
@@ -177,13 +176,13 @@ export {
|
|
|
177
176
|
Be as DoctProgress,
|
|
178
177
|
Ue as DoctRadioGroup,
|
|
179
178
|
fe as DoctRadioGroupItem,
|
|
180
|
-
|
|
179
|
+
C as DoctSearchFilterSection,
|
|
181
180
|
Y as DoctSearchInput,
|
|
182
181
|
v as DoctSelectField,
|
|
183
182
|
Fe as DoctSkeleton,
|
|
184
183
|
ve as DoctStepper,
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
He as DoctStepperContent,
|
|
185
|
+
he as DoctStepperDescription,
|
|
187
186
|
ke as DoctStepperIndicator,
|
|
188
187
|
Ye as DoctStepperItem,
|
|
189
188
|
Ve as DoctStepperNav,
|
|
@@ -204,11 +203,11 @@ export {
|
|
|
204
203
|
sr as DoctTooltipProvider,
|
|
205
204
|
_r as DoctTooltipTrigger,
|
|
206
205
|
Ir as DoctTypography,
|
|
207
|
-
|
|
206
|
+
l as DoctUserRegistrationSection,
|
|
208
207
|
It as INDIVIDUAL_NAV_ROUTES,
|
|
209
208
|
Tt as INDIVIDUAL_NAV_ROUTES_PROD,
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
Ct as INDIVIDUAL_NAV_ROUTES_QA,
|
|
210
|
+
lt as IndividualNavigationMenu,
|
|
212
211
|
At as LOGIN_DIALOG_ASSETS,
|
|
213
212
|
Et as LOGIN_DIALOG_CONTINUE_ANOTHER_WAY_LABEL,
|
|
214
213
|
Nt as LOGIN_DIALOG_CONTINUE_PHONE_EMAIL_LABEL,
|
|
@@ -228,8 +227,8 @@ export {
|
|
|
228
227
|
wr as MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_PLACEHOLDER,
|
|
229
228
|
et as MOBILE_NUMBER_DIALOG_DRAWER_BACKDROP_CLASS,
|
|
230
229
|
vr as MOBILE_NUMBER_DIALOG_HEADER_TITLE,
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
Hr as MOBILE_NUMBER_DIALOG_LOGIN_UNIFY_HINT,
|
|
231
|
+
hr as MOBILE_NUMBER_DIALOG_OTP_HEADER_TITLE,
|
|
233
232
|
kr as MOBILE_NUMBER_DIALOG_OTP_RESEND_BUTTON_LABEL,
|
|
234
233
|
Yr as MOBILE_NUMBER_DIALOG_OTP_RESEND_LABEL,
|
|
235
234
|
Vr as MOBILE_NUMBER_DIALOG_OTP_SUBMIT_LABEL,
|
|
@@ -250,12 +249,10 @@ export {
|
|
|
250
249
|
jr as buildMobileNumberDisplay,
|
|
251
250
|
qr as buildPhoneDisplay,
|
|
252
251
|
Jr as isMobileNumberDialogPrimaryDisabled,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
yt as resolveNavEnv,
|
|
258
|
-
lr as useAutocompleteCheckbox,
|
|
252
|
+
Ht as isProdNav,
|
|
253
|
+
ht as isQaNav,
|
|
254
|
+
kt as resolveNavEnv,
|
|
255
|
+
Cr as useAutocompleteCheckbox,
|
|
259
256
|
Ze as useDoctStepItem,
|
|
260
257
|
Xe as useDoctStepper
|
|
261
258
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { CountryCode } from 'libphonenumber-js';
|
|
1
2
|
import * as React from "react";
|
|
2
|
-
import * as RPNInput from "react-phone-number-input";
|
|
3
|
-
/** Re-exported for form validation: checks if value is a possible/valid phone number (no country length restriction). */
|
|
4
|
-
export { isPossiblePhoneNumber, isValidPhoneNumber } from 'react-phone-number-input';
|
|
5
3
|
type DoctPhoneInputVariant = "default" | "flag";
|
|
6
4
|
/** Custom country object from API */
|
|
7
5
|
export interface CustomCountry {
|
|
8
6
|
countryId: number;
|
|
9
7
|
countryName: string;
|
|
8
|
+
/** Dial code such as "+91" / "91", or an ISO 3166-1 alpha-2 code such as "IN". */
|
|
10
9
|
countryCode: string;
|
|
11
10
|
}
|
|
12
11
|
export interface DoctPhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "type"> {
|
|
@@ -21,12 +20,16 @@ export interface DoctPhoneInputProps extends Omit<React.InputHTMLAttributes<HTML
|
|
|
21
20
|
/** Callback that provides both values as an array: [countryCode, phone] for API integration */
|
|
22
21
|
onValuesChange?: (values: [string, string]) => void;
|
|
23
22
|
/** Callback when country selection changes (provides full country object) */
|
|
24
|
-
onCountryChange?: (country: CustomCountry |
|
|
23
|
+
onCountryChange?: (country: CustomCountry | CountryCode) => void;
|
|
25
24
|
/** Custom countries from API or ISO 3166-1 alpha-2 codes */
|
|
26
|
-
countries?: CustomCountry[] |
|
|
25
|
+
countries?: CustomCountry[] | CountryCode[];
|
|
27
26
|
/** Default country (custom country object, ISO code, or index for custom countries) */
|
|
28
|
-
defaultCountry?: CustomCountry |
|
|
29
|
-
/**
|
|
27
|
+
defaultCountry?: CustomCountry | CountryCode | number;
|
|
28
|
+
/**
|
|
29
|
+
* Visual variant controlling the dropdown row layout: "default" shows `code · name`;
|
|
30
|
+
* "flag" shows `name · code` (right-aligned code). Retained for backward compatibility —
|
|
31
|
+
* no country flag icons are rendered.
|
|
32
|
+
*/
|
|
30
33
|
variant?: DoctPhoneInputVariant;
|
|
31
34
|
/** Label text for the input */
|
|
32
35
|
label?: string;
|
|
@@ -34,6 +37,16 @@ export interface DoctPhoneInputProps extends Omit<React.InputHTMLAttributes<HTML
|
|
|
34
37
|
helperText?: string;
|
|
35
38
|
/** Error message (overrides helperText when present) */
|
|
36
39
|
error?: string;
|
|
40
|
+
/** Whether the country list is loading (e.g. awaiting an API response). Shows a loading row. */
|
|
41
|
+
loading?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Called with the search text as the user types in the country search box. When provided, the
|
|
44
|
+
* component switches to API-driven mode: it renders `countries` verbatim and does NOT filter
|
|
45
|
+
* internally — the consumer is expected to fetch and supply the filtered list.
|
|
46
|
+
*/
|
|
47
|
+
onCountrySearch?: (search: string) => void;
|
|
48
|
+
/** Empty-state text shown when there are no countries to display. Defaults to "No data found". */
|
|
49
|
+
noDataText?: string;
|
|
37
50
|
/** Ref for the underlying national phone number input. */
|
|
38
51
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
39
52
|
/** Whether the field is required */
|
|
@@ -44,4 +57,5 @@ export interface DoctPhoneInputProps extends Omit<React.InputHTMLAttributes<HTML
|
|
|
44
57
|
*/
|
|
45
58
|
onValueChange?: (value: string) => void;
|
|
46
59
|
}
|
|
47
|
-
export declare function DoctPhoneInput({ label, helperText, error, required, className, "aria-describedby": ariaDescribedBy, id, value, onPhoneChange, countryCode, onCountryCodeChange, onValuesChange, onCountryChange, onValueChange, countries, defaultCountry, variant, disabled, placeholder, inputRef, ...rest }: DoctPhoneInputProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export declare function DoctPhoneInput({ label, helperText, error, required, className, "aria-describedby": ariaDescribedBy, id, value, onPhoneChange, countryCode, onCountryCodeChange, onValuesChange, onCountryChange, onValueChange, countries, defaultCountry, variant, disabled, placeholder, loading, onCountrySearch, noDataText, inputRef, ...rest }: DoctPhoneInputProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MobileNumberDialogProps } from './types';
|
|
2
|
-
export declare function MobileNumberDialog({ open, onOpenChange, trigger, state, headerTitle, bodyTitle, infoMessage, phoneNumber, onPhoneNumberChange, onCountryCodeChange, countries, defaultCountry, onCountryChange, onValuesChange, step, defaultStep, onStepChange, onExistingAccountLoginClick, phoneErrorMessage, onPrimaryClick, onSecondaryClick, isPrimaryLoading, maskedRecipient, otpHeaderTitle, onOtpBack, otpError, otpCanResend, onOtpResend, otpTimerText, isOtpSubmitting, otpValue, onOtpChange, otpLength, onOtpSubmit, otpTitle, otpResendLabel, otpSubmitLabel, existingAccountErrorMessage, phonePlaceholder, countryCode, icon, isMobileOverride, closeOnOutsideClick, className, }: MobileNumberDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function MobileNumberDialog({ open, onOpenChange, trigger, state, headerTitle, bodyTitle, infoMessage, phoneNumber, onPhoneNumberChange, onCountryCodeChange, countries, defaultCountry, onCountryChange, onValuesChange, countriesLoading, onCountrySearch, noDataText, step, defaultStep, onStepChange, onExistingAccountLoginClick, phoneErrorMessage, onPrimaryClick, onSecondaryClick, isPrimaryLoading, maskedRecipient, otpHeaderTitle, onOtpBack, otpError, otpCanResend, onOtpResend, otpTimerText, isOtpSubmitting, otpValue, onOtpChange, otpLength, onOtpSubmit, otpTitle, otpResendLabel, otpSubmitLabel, existingAccountErrorMessage, phonePlaceholder, countryCode, icon, isMobileOverride, closeOnOutsideClick, className, }: MobileNumberDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare const DoctMobileNumberDialog: typeof MobileNumberDialog;
|
|
4
4
|
/** @deprecated Use `MobileNumberDialog`. */
|
|
5
5
|
export declare const DoctAccountConflictPrompt: typeof MobileNumberDialog;
|
|
@@ -41,6 +41,15 @@ export interface MobileNumberDialogProps {
|
|
|
41
41
|
onCountryChange?: DoctPhoneInputProps["onCountryChange"];
|
|
42
42
|
/** Called with `[countryCode, phoneNumber]` when either phone value changes. */
|
|
43
43
|
onValuesChange?: DoctPhoneInputProps["onValuesChange"];
|
|
44
|
+
/** Whether the consumer's country list request is in progress. Shows a loading row. */
|
|
45
|
+
countriesLoading?: DoctPhoneInputProps["loading"];
|
|
46
|
+
/**
|
|
47
|
+
* Called with the country search text so the consumer can run API-driven search.
|
|
48
|
+
* When provided, the phone input renders `countries` verbatim without internal filtering.
|
|
49
|
+
*/
|
|
50
|
+
onCountrySearch?: DoctPhoneInputProps["onCountrySearch"];
|
|
51
|
+
/** Empty-state text when there are no countries. Defaults to "No data found". */
|
|
52
|
+
noDataText?: DoctPhoneInputProps["noDataText"];
|
|
44
53
|
/** Controlled view step. Use `otp` when authentication has moved to OTP verification. */
|
|
45
54
|
step?: MobileNumberDialogStep;
|
|
46
55
|
/** Initial uncontrolled view step. Default `mobileNumber`. */
|
package/dist/src/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { LabeledInput as DoctLabeledInput } from './components/overrides/ui/inpu
|
|
|
14
14
|
export { OtpInput as DoctOtpInput } from './components/overrides/ui/inputs/otp-input';
|
|
15
15
|
export { PasswordInput as DoctPasswordInput } from './components/overrides/ui/inputs/password-input';
|
|
16
16
|
export type { CustomCountry, DoctPhoneInputProps, } from './components/overrides/ui/inputs/phone-input';
|
|
17
|
-
export { DoctPhoneInput
|
|
17
|
+
export { DoctPhoneInput } from './components/overrides/ui/inputs/phone-input';
|
|
18
18
|
export { DoctLoginDialog, type DoctLoginDialogProps, LOGIN_DIALOG_ASSETS, LOGIN_DIALOG_CONTINUE_ANOTHER_WAY_LABEL, LOGIN_DIALOG_CONTINUE_PHONE_EMAIL_LABEL, LOGIN_DIALOG_DEFAULT_COPY, LOGIN_DIALOG_IMAGE_HEIGHT, LOGIN_DIALOG_IMAGE_WIDTH, LOGIN_DIALOG_RETURNING_HINT, LOGIN_DIALOG_RETURNING_PRIMARY_LABEL, LOGIN_DRAWER_BACKDROP_CLASS, type LoginDialogLastProvider, type LoginDialogVariant, } from './components/overrides/ui/login-dialog';
|
|
19
19
|
export { ACCOUNT_CONFLICT_PROMPT_BODY_TITLE, ACCOUNT_CONFLICT_PROMPT_DEFAULT_COUNTRY_CODE, ACCOUNT_CONFLICT_PROMPT_DEFAULT_EXISTING_ACCOUNT_ERROR, ACCOUNT_CONFLICT_PROMPT_DEFAULT_INFO_MESSAGE, ACCOUNT_CONFLICT_PROMPT_DEFAULT_MASKED_EMAIL, ACCOUNT_CONFLICT_PROMPT_DEFAULT_PHONE_DISPLAY, ACCOUNT_CONFLICT_PROMPT_DEFAULT_PHONE_NUMBER, ACCOUNT_CONFLICT_PROMPT_DEFAULT_PHONE_PLACEHOLDER, ACCOUNT_CONFLICT_PROMPT_DRAWER_BACKDROP_CLASS, ACCOUNT_CONFLICT_PROMPT_HEADER_TITLE, ACCOUNT_CONFLICT_PROMPT_LOGIN_UNIFY_HINT, ACCOUNT_CONFLICT_PROMPT_PRIMARY_LABEL, ACCOUNT_CONFLICT_PROMPT_SECONDARY_LABEL, type AccountConflictPromptState, type AccountConflictPromptStep, type AccountConflictPromptTrigger, buildExistingAccountError, buildExistingMobileNumberError, buildLoginWithMobileNumberLabel, buildLoginWithPhoneLabel, buildMobileNumberDisplay, buildPhoneDisplay, DoctAccountConflictPrompt, type DoctAccountConflictPromptProps, DoctMobileNumberDialog, isMobileNumberDialogPrimaryDisabled, MOBILE_NUMBER_DIALOG_BODY_TITLE, MOBILE_NUMBER_DIALOG_DEFAULT_COUNTRY_CODE, MOBILE_NUMBER_DIALOG_DEFAULT_EXISTING_ACCOUNT_ERROR, MOBILE_NUMBER_DIALOG_DEFAULT_INFO_MESSAGE, MOBILE_NUMBER_DIALOG_DEFAULT_MASKED_EMAIL, MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_DISPLAY, MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_NUMBER, MOBILE_NUMBER_DIALOG_DEFAULT_PHONE_PLACEHOLDER, MOBILE_NUMBER_DIALOG_DRAWER_BACKDROP_CLASS, MOBILE_NUMBER_DIALOG_HEADER_TITLE, MOBILE_NUMBER_DIALOG_LOGIN_UNIFY_HINT, MOBILE_NUMBER_DIALOG_OTP_HEADER_TITLE, MOBILE_NUMBER_DIALOG_OTP_RESEND_BUTTON_LABEL, MOBILE_NUMBER_DIALOG_OTP_RESEND_LABEL, MOBILE_NUMBER_DIALOG_OTP_SUBMIT_LABEL, MOBILE_NUMBER_DIALOG_OTP_TITLE, MOBILE_NUMBER_DIALOG_PRIMARY_LABEL, MOBILE_NUMBER_DIALOG_SECONDARY_LABEL, MobileNumberDialog, MobileNumberDialogOtpSurface, type MobileNumberDialogOtpSurfaceProps, type MobileNumberDialogProps, type MobileNumberDialogState, type MobileNumberDialogStep, type MobileNumberDialogTrigger, } from './components/overrides/ui/mobile-number-dialog';
|
|
20
20
|
export { DoctNavigationMenu, type DoctNavigationMenuProps, type DoctNavigationMenuVariant, INDIVIDUAL_NAV_ROUTES, INDIVIDUAL_NAV_ROUTES_PROD, INDIVIDUAL_NAV_ROUTES_QA, IndividualNavigationMenu, type IndividualNavigationMenuProps, type IndividualNavRoutes, isProdNav, isQaNav, type MobileMenuCategory, type NavigationMenuGroup, type NavigationMenuGroupVariant, type NavigationMenuItem, type NavigationMenuSection, ORGANIZATION_NAV_ROUTES, ORGANIZATION_NAV_ROUTES_PROD, ORGANIZATION_NAV_ROUTES_QA, OrganizationNavigationMenu, type OrganizationNavigationMenuProps, type OrganizationNavRoutes, resolveNavEnv, } from './components/overrides/ui/navigation-menu';
|