@coinbase/cdp-react 0.0.97 → 0.0.99

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.
Files changed (198) hide show
  1. package/dist/components/AuthButton/index.d.ts +102 -0
  2. package/dist/components/CDPReactProvider/index.d.ts +114 -0
  3. package/dist/components/CopyAddress/index.d.ts +29 -0
  4. package/dist/components/CopyEvmKeyButton/index.d.ts +77 -0
  5. package/dist/components/CopySolanaKeyButton/index.d.ts +73 -0
  6. package/dist/components/EnrollMfa/EnrollMfaDescription.d.ts +21 -0
  7. package/dist/components/EnrollMfa/EnrollMfaFlow.d.ts +27 -0
  8. package/dist/components/EnrollMfa/EnrollMfaFlowBackButton.d.ts +19 -0
  9. package/dist/components/EnrollMfa/EnrollMfaFlowProvider.d.ts +52 -0
  10. package/dist/components/EnrollMfa/EnrollMfaFooter.d.ts +18 -0
  11. package/dist/components/EnrollMfa/EnrollMfaImage.d.ts +24 -0
  12. package/dist/components/EnrollMfa/EnrollMfaItem.d.ts +21 -0
  13. package/dist/components/EnrollMfa/EnrollMfaItems.d.ts +17 -0
  14. package/dist/components/EnrollMfa/EnrollMfaProvider.d.ts +35 -0
  15. package/dist/components/EnrollMfa/EnrollMfaTitle.d.ts +21 -0
  16. package/dist/components/EnrollMfa/index.d.ts +65 -0
  17. package/dist/components/EnrollMfa/methods/sms.d.ts +25 -0
  18. package/dist/components/EnrollMfa/methods/totp.d.ts +25 -0
  19. package/dist/components/EnrollMfa/types.d.ts +48 -0
  20. package/dist/components/EnrollMfa/useEnrollMfaReducer.d.ts +6 -0
  21. package/dist/components/EnrollMfaModal/index.d.ts +111 -0
  22. package/dist/components/ExportWallet/index.d.ts +163 -0
  23. package/dist/components/ExportWalletModal/index.d.ts +173 -0
  24. package/dist/components/Fund/FundForm.d.ts +18 -0
  25. package/dist/components/Fund/FundProvider.d.ts +17 -0
  26. package/dist/components/Fund/FundTitle.d.ts +12 -0
  27. package/dist/components/Fund/components/FundAmountInput.d.ts +13 -0
  28. package/dist/components/Fund/components/FundErrorScreen.d.ts +7 -0
  29. package/dist/components/Fund/components/FundPaymentMethods.d.ts +7 -0
  30. package/dist/components/Fund/components/FundPresetAmountInputs.d.ts +7 -0
  31. package/dist/components/Fund/components/FundTransactionStatus.d.ts +6 -0
  32. package/dist/components/Fund/hooks/useBuyUrl.d.ts +23 -0
  33. package/dist/components/Fund/hooks/useEmitLifecycleStatus.d.ts +12 -0
  34. package/dist/components/Fund/hooks/useExchangeRate.d.ts +17 -0
  35. package/dist/components/Fund/hooks/usePaymentMethods.d.ts +16 -0
  36. package/dist/components/Fund/hooks/usePopupMonitor.d.ts +9 -0
  37. package/dist/components/Fund/hooks/useSetupOnrampEventListeners.d.ts +6 -0
  38. package/dist/components/Fund/index.d.ts +87 -0
  39. package/dist/components/Fund/types.d.ts +137 -0
  40. package/dist/components/Fund/useFundReducer.d.ts +15 -0
  41. package/dist/components/Fund/utils/buildPaymentMethods.d.ts +15 -0
  42. package/dist/components/Fund/utils/setupOnrampEventListeners.d.ts +10 -0
  43. package/dist/components/Fund/utils/subscribeToWindowMessage.d.ts +27 -0
  44. package/dist/components/FundModal/index.d.ts +106 -0
  45. package/dist/components/LinkAuth/LinkAuthFlow.d.ts +25 -0
  46. package/dist/components/LinkAuth/LinkAuthFlowBackButton.d.ts +19 -0
  47. package/dist/components/LinkAuth/LinkAuthFlowProvider.d.ts +60 -0
  48. package/dist/components/LinkAuth/LinkAuthItem.d.ts +23 -0
  49. package/dist/components/LinkAuth/LinkAuthItems.d.ts +17 -0
  50. package/dist/components/LinkAuth/LinkAuthProvider.d.ts +31 -0
  51. package/dist/components/LinkAuth/LinkAuthTitle.d.ts +17 -0
  52. package/dist/components/LinkAuth/index.d.ts +170 -0
  53. package/dist/components/LinkAuth/types.d.ts +31 -0
  54. package/dist/components/LinkAuth/utils.d.ts +12 -0
  55. package/dist/components/LinkAuthModal/index.d.ts +112 -0
  56. package/dist/components/OAuthStatusModal/index.d.ts +24 -0
  57. package/dist/components/SendEvmTransactionButton/index.d.ts +27 -0
  58. package/dist/components/SendSolanaTransactionButton/index.d.ts +27 -0
  59. package/dist/components/SignIn/SignInAuthMethodButtons.d.ts +26 -0
  60. package/dist/components/SignIn/SignInBackButton.d.ts +40 -0
  61. package/dist/components/SignIn/SignInCredentials.d.ts +13 -0
  62. package/dist/components/SignIn/SignInDescription.d.ts +35 -0
  63. package/dist/components/SignIn/SignInFooter.d.ts +27 -0
  64. package/dist/components/SignIn/SignInForm.d.ts +39 -0
  65. package/dist/components/SignIn/SignInImage.d.ts +38 -0
  66. package/dist/components/SignIn/SignInProvider.d.ts +54 -0
  67. package/dist/components/SignIn/SignInTitle.d.ts +35 -0
  68. package/dist/components/SignIn/flows/SignInWithEmail.d.ts +26 -0
  69. package/dist/components/SignIn/flows/SignInWithOAuth.d.ts +19 -0
  70. package/dist/components/SignIn/flows/SignInWithSms.d.ts +26 -0
  71. package/dist/components/SignIn/hooks/useEmailForm.d.ts +7 -0
  72. package/dist/components/SignIn/hooks/useOTPForm.d.ts +8 -0
  73. package/dist/components/SignIn/hooks/usePhoneNumberForm.d.ts +7 -0
  74. package/dist/components/SignIn/hooks/useSignInWithOAuth.d.ts +8 -0
  75. package/dist/components/SignIn/index.d.ts +124 -0
  76. package/dist/components/SignIn/types.d.ts +37 -0
  77. package/dist/components/SignIn/useSignInReducer.d.ts +9 -0
  78. package/dist/components/SignInModal/index.d.ts +123 -0
  79. package/dist/components/SignOutButton/index.d.ts +39 -0
  80. package/dist/components/ThemeProvider/index.d.ts +70 -0
  81. package/dist/components/VerifyMfa/VerifyMfaDescription.d.ts +24 -0
  82. package/dist/components/VerifyMfa/VerifyMfaFlow.d.ts +30 -0
  83. package/dist/components/VerifyMfa/VerifyMfaFlowBackButton.d.ts +19 -0
  84. package/dist/components/VerifyMfa/VerifyMfaFlowProvider.d.ts +51 -0
  85. package/dist/components/VerifyMfa/VerifyMfaFooter.d.ts +18 -0
  86. package/dist/components/VerifyMfa/VerifyMfaImage.d.ts +23 -0
  87. package/dist/components/VerifyMfa/VerifyMfaItem.d.ts +20 -0
  88. package/dist/components/VerifyMfa/VerifyMfaItems.d.ts +18 -0
  89. package/dist/components/VerifyMfa/VerifyMfaProvider.d.ts +40 -0
  90. package/dist/components/VerifyMfa/VerifyMfaTitle.d.ts +24 -0
  91. package/dist/components/VerifyMfa/index.d.ts +55 -0
  92. package/dist/components/VerifyMfa/methods/sms.d.ts +29 -0
  93. package/dist/components/VerifyMfa/methods/totp.d.ts +29 -0
  94. package/dist/components/VerifyMfa/types.d.ts +33 -0
  95. package/dist/components/VerifyMfa/useVerifyMfaReducer.d.ts +7 -0
  96. package/dist/components/VerifyMfaInline/index.d.ts +212 -0
  97. package/dist/components/VerifyMfaModal/index.d.ts +114 -0
  98. package/dist/components/forms/AmountInput/index.d.ts +16 -0
  99. package/dist/components/forms/AmountInput/types.d.ts +9 -0
  100. package/dist/components/forms/AmountInput/useAmountInput.d.ts +14 -0
  101. package/dist/components/forms/AmountInput/useInputScale.d.ts +12 -0
  102. package/dist/components/forms/AmountInput/useNumberParseAndFormat.d.ts +20 -0
  103. package/dist/components/forms/CountrySelect/index.d.ts +9 -0
  104. package/dist/components/forms/EmailForm/index.d.ts +17 -0
  105. package/dist/components/forms/ExchangeAmountInput/index.d.ts +19 -0
  106. package/dist/components/forms/ExchangeAmountInput/types.d.ts +12 -0
  107. package/dist/components/forms/ExchangeAmountInput/useExchangeAmountInput.d.ts +17 -0
  108. package/dist/components/forms/Field/index.d.ts +15 -0
  109. package/dist/components/forms/Input/index.d.ts +15 -0
  110. package/dist/components/forms/Label/index.d.ts +8 -0
  111. package/dist/components/forms/OTP/index.d.ts +6 -0
  112. package/dist/components/forms/OTPForm/index.d.ts +20 -0
  113. package/dist/components/forms/PhoneNumberForm/index.d.ts +27 -0
  114. package/dist/components/forms/PhoneNumberInput/index.d.ts +16 -0
  115. package/dist/components/forms/PhoneNumberInput/maskOverride.d.ts +6 -0
  116. package/dist/components/forms/PhoneNumberInput/usePhoneNumberFormatter.d.ts +7 -0
  117. package/dist/components/forms/Select/index.d.ts +30 -0
  118. package/dist/components/ui/Badge/index.d.ts +19 -0
  119. package/dist/components/ui/Banner/index.d.ts +25 -0
  120. package/dist/components/ui/Button/index.d.ts +50 -0
  121. package/dist/components/ui/ButtonBase/index.d.ts +20 -0
  122. package/dist/components/ui/CoinbaseFooter/index.d.ts +16 -0
  123. package/dist/components/ui/CopyTextField/index.d.ts +35 -0
  124. package/dist/components/ui/Error/index.d.ts +14 -0
  125. package/dist/components/ui/IframeButton/index.d.ts +17 -0
  126. package/dist/components/ui/LoadingSkeleton/index.d.ts +22 -0
  127. package/dist/components/ui/LoadingSpinner/index.d.ts +11 -0
  128. package/dist/components/ui/Modal/index.d.ts +82 -0
  129. package/dist/components/ui/QRCode/QRCodeSvg.d.ts +35 -0
  130. package/dist/components/ui/QRCode/index.d.ts +7 -0
  131. package/dist/components/ui/QRCode/useCorners.d.ts +9 -0
  132. package/dist/components/ui/QRCode/useDotsPath.d.ts +18 -0
  133. package/dist/components/ui/QRCode/useLogo.d.ts +18 -0
  134. package/dist/components/ui/QRCode/useMatrix.d.ts +7 -0
  135. package/dist/components/ui/ServerError/index.d.ts +6 -0
  136. package/dist/components/ui/SuccessMessage/index.d.ts +14 -0
  137. package/dist/components/ui/SwitchFadeTransition/index.d.ts +15 -0
  138. package/dist/components/ui/SwitchSlideTransition/index.d.ts +16 -0
  139. package/dist/components/ui/SwitchTransition/index.d.ts +42 -0
  140. package/dist/components/ui/ToggleListItem/index.d.ts +31 -0
  141. package/dist/components/ui/VisuallyHidden/index.d.ts +18 -0
  142. package/dist/data/countries.d.ts +15 -0
  143. package/dist/data/countryNames.d.ts +4 -0
  144. package/dist/hooks/useKeyExportPostMessage.d.ts +25 -0
  145. package/dist/hooks/usePhoneNumberState.d.ts +47 -0
  146. package/dist/hooks/usePhoneNumberValidators.d.ts +8 -0
  147. package/dist/hooks/useTimeout.d.ts +18 -0
  148. package/dist/hooks/useTimer.d.ts +6 -0
  149. package/dist/hooks/useTransitionMap.d.ts +22 -0
  150. package/dist/hooks/useVerifyMfaModal.d.ts +78 -0
  151. package/dist/icons/IconAppleLogo.d.ts +22 -0
  152. package/dist/icons/IconArrowLeft.d.ts +22 -0
  153. package/dist/icons/IconArrowsUpDown.d.ts +22 -0
  154. package/dist/icons/IconCheck.d.ts +22 -0
  155. package/dist/icons/IconCheckCircle.d.ts +21 -0
  156. package/dist/icons/IconChevronDown.d.ts +22 -0
  157. package/dist/icons/IconCoinbaseMark.d.ts +22 -0
  158. package/dist/icons/IconCoinbaseWordmark.d.ts +22 -0
  159. package/dist/icons/IconCopy.d.ts +22 -0
  160. package/dist/icons/IconCreditCard.d.ts +22 -0
  161. package/dist/icons/IconCurrencies.d.ts +22 -0
  162. package/dist/icons/IconEnvelope.d.ts +22 -0
  163. package/dist/icons/IconExclamationCircle.d.ts +22 -0
  164. package/dist/icons/IconExclamationTriangle.d.ts +22 -0
  165. package/dist/icons/IconGoogleColorLogo.d.ts +22 -0
  166. package/dist/icons/IconGoogleLogo.d.ts +22 -0
  167. package/dist/icons/IconLock.d.ts +22 -0
  168. package/dist/icons/IconMinus.d.ts +21 -0
  169. package/dist/icons/IconPhone.d.ts +22 -0
  170. package/dist/icons/IconPinCode.d.ts +22 -0
  171. package/dist/icons/IconPlus.d.ts +21 -0
  172. package/dist/icons/IconShield.d.ts +22 -0
  173. package/dist/icons/IconSmartPhone.d.ts +22 -0
  174. package/dist/icons/IconTelegramLogo.d.ts +22 -0
  175. package/dist/icons/IconXLogo.d.ts +22 -0
  176. package/dist/icons/IconXMark.d.ts +22 -0
  177. package/dist/icons/SvgIcon.d.ts +6 -0
  178. package/dist/theme/cssVariables.d.ts +10 -0
  179. package/dist/theme/theme.d.ts +246 -0
  180. package/dist/theme/tokens.d.ts +54 -0
  181. package/dist/theme/utils.d.ts +63 -0
  182. package/dist/types/secureIframe.d.ts +3 -0
  183. package/dist/utils/capitalize.d.ts +8 -0
  184. package/dist/utils/childrenHasComponent.d.ts +10 -0
  185. package/dist/utils/clamp.d.ts +10 -0
  186. package/dist/utils/formatFiat.d.ts +11 -0
  187. package/dist/utils/formatPhoneNumber.d.ts +8 -0
  188. package/dist/utils/getMessageFromUnknownError.d.ts +9 -0
  189. package/dist/utils/isApiError.d.ts +21 -0
  190. package/dist/utils/isEmailInvalid.d.ts +15 -0
  191. package/dist/utils/openPopup.d.ts +15 -0
  192. package/dist/utils/parseValuesFromPhoneNumber.d.ts +16 -0
  193. package/dist/utils/sendIframeMessage.d.ts +8 -0
  194. package/dist/utils/toOAuthProviderType.d.ts +8 -0
  195. package/dist/utils/transition.d.ts +41 -0
  196. package/dist/version.d.ts +5 -1
  197. package/dist/version.js +1 -1
  198. package/package.json +5 -5
@@ -1,6 +1,31 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * The props for the Banner component.
4
+ */
2
5
  export interface BannerProps extends HTMLAttributes<HTMLElement> {
6
+ /** A custom icon to display in the banner. If not provided, the variant icon will be displayed. */
3
7
  icon?: ReactNode;
8
+ /** The variant of the banner. When undefined, no icon will be rendered unless provided via the `icon` prop. */
4
9
  variant?: "success" | "warning" | "error";
5
10
  }
11
+ /**
12
+ * The Banner component is used to display a message to the user.
13
+ *
14
+ * @param {BannerProps} props - The props for the Banner component.
15
+ * @returns {JSX.Element} The Banner component.
16
+ *
17
+ * @group Components
18
+ *
19
+ * @example
20
+ * ```tsx lines
21
+ * // Render a success banner
22
+ * <Banner variant="success">A success message</Banner>
23
+ * ```
24
+ *
25
+ * @example
26
+ * ```tsx lines
27
+ * // Render a banner with no variant and a custom icon
28
+ * <Banner icon={<CustomIcon />}>A banner message</Banner>
29
+ * ```
30
+ */
6
31
  export declare const Banner: ({ className, children, icon, variant, ...props }: BannerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,58 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ButtonBaseProps } from '../ButtonBase';
3
3
  import { ButtonVariant } from '../../../theme/theme';
4
+ /**
5
+ * The props for the Button component.
6
+ *
7
+ * @interface ButtonProps
8
+ * @augments {ButtonBaseProps}
9
+ * @property {ReactNode} [pendingLabel] - The label to display when the button is pending.
10
+ * @property {ButtonVariant} [variant] - The variant of the button. Defaults to "primary".
11
+ */
4
12
  export interface ButtonProps extends ButtonBaseProps {
13
+ /** A label to render when the button state is pending. */
5
14
  pendingLabel?: ReactNode;
15
+ /** The variant of the button. Defaults to "primary". */
6
16
  variant?: ButtonVariant;
7
17
  }
18
+ /**
19
+ * A themed button component with loading state.
20
+ *
21
+ * @param {ButtonProps} props - The props for the component.
22
+ * @returns {JSX.Element} The Button component.
23
+ *
24
+ * @group Components
25
+ *
26
+ * @example
27
+ * ```tsx lines
28
+ * // Render a submit button
29
+ * <Button type="submit" onClick={() => console.log("Button clicked")}>Click me</Button>
30
+ * ```
31
+ *
32
+ * @example
33
+ * ```tsx lines
34
+ * // Render a small secondary button
35
+ * <Button type="button" variant="secondary" size="sm">Secondary button</Button>
36
+ * ```
37
+ *
38
+ * @example
39
+ * ```tsx lines
40
+ * // Render a full width button
41
+ * <Button fullWidth>Full width button</Button>
42
+ * ```
43
+ *
44
+ * @example
45
+ * ```tsx lines
46
+ * // Render a button with a pending state
47
+ * <Button isPending pendingLabel="Sending...">Send transaction</Button>
48
+ * ```
49
+ *
50
+ * @example
51
+ * ```tsx lines
52
+ * // Render a button with a custom button element
53
+ * <Button onClick={() => console.log("Button clicked")} asChild>
54
+ * <button>Send transaction</button>
55
+ * </Button>
56
+ * ```
57
+ */
8
58
  export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,9 +1,29 @@
1
1
  import { ButtonHTMLAttributes } from 'react';
2
2
  import { ButtonSize } from '../../../theme/theme';
3
+ /**
4
+ * The props for the Input component.
5
+ *
6
+ * @interface ButtonBaseProps
7
+ * @augments {ButtonHTMLAttributes<HTMLButtonElement>}
8
+ * @property {boolean} [asChild] - Set to true to use a custom element or component in place of the default one.
9
+ * @property {boolean} [fullWidth] - Whether the button should be full width.
10
+ * @property {boolean} [isPending] - Whether the button is pending.
11
+ * @property {ButtonSize} [size] - The size of the button. Defaults to "md".
12
+ */
3
13
  export interface ButtonBaseProps extends ButtonHTMLAttributes<HTMLButtonElement> {
14
+ /** Set to true to use a custom element or component in place of the default button element. */
4
15
  asChild?: boolean;
16
+ /** Whether the button should be full width. */
5
17
  fullWidth?: boolean;
18
+ /** Whether the button state is pending. */
6
19
  isPending?: boolean;
20
+ /** The size of the button. Defaults to "md". */
7
21
  size?: ButtonSize;
8
22
  }
23
+ /**
24
+ * A themed button component with loading state.
25
+ *
26
+ * @param {ButtonBaseProps} props - The props for the component.
27
+ * @returns {JSX.Element} The Button component.
28
+ */
9
29
  export declare const ButtonBase: import('react').ForwardRefExoticComponent<ButtonBaseProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,2 +1,18 @@
1
1
  import { HTMLAttributes } from 'react';
2
+ /**
3
+ * A footer component for the sign-in flow.
4
+ *
5
+ * @param {HTMLAttributes<HTMLDivElement>} props - The props for the component.
6
+ * @returns {JSX.Element} The sign-in footer.
7
+ *
8
+ * @example
9
+ * ```tsx lines
10
+ * function App() {
11
+ * // Add class to the footer
12
+ * return (
13
+ * <CoinbaseFooter className="sign-in-footer" />
14
+ * );
15
+ * }
16
+ * ```
17
+ */
2
18
  export declare const CoinbaseFooter: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,45 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * The props for the CopyTextField component.
4
+ *
5
+ * @see {@link CopyTextField}
6
+ */
2
7
  export interface CopyTextFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
8
+ /** The value to copy to the clipboard. */
3
9
  value: string;
10
+ /** Custom display content. If not provided, displays the full value. */
4
11
  displayValue?: ReactNode;
12
+ /** The label for the field. */
5
13
  label?: string;
14
+ /** Aria label for the copy button. Defaults to "Copy". */
6
15
  copyAriaLabel?: string;
16
+ /** A function to call when the copy button is clicked. */
7
17
  onCopy?: () => void;
18
+ /** A function to call when the value is copied successfully. */
8
19
  onCopySuccess?: () => void;
9
20
  }
21
+ /**
22
+ * A component that displays a value in a text field style container with a copy button.
23
+ *
24
+ * @param {CopyTextFieldProps} props - The props for the component.
25
+ * @returns {JSX.Element} The CopyTextField component.
26
+ *
27
+ * @group Components
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * // Display full value
32
+ * <CopyTextField value="some-secret-key" label="Secret Key" />
33
+ * ```
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * // With truncated display
38
+ * <CopyTextField
39
+ * value={address}
40
+ * displayValue={`${address.slice(0, 6)}...${address.slice(-4)}`}
41
+ * label="Address"
42
+ * />
43
+ * ```
44
+ */
10
45
  export declare const CopyTextField: ({ className, value, displayValue, label, copyAriaLabel, onCopy, onCopySuccess, ...props }: CopyTextFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,21 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * The props for the Error component.
4
+ *
5
+ * @interface Props
6
+ * @property {ReactNode} children - The children of the component.
7
+ * @property {string} [id] - The id of the component.
8
+ * @property {string} [className] - The class name of the component.
9
+ */
2
10
  export interface Props extends HTMLAttributes<HTMLParagraphElement> {
3
11
  children: ReactNode;
4
12
  id?: string;
5
13
  className?: string;
6
14
  }
15
+ /**
16
+ * A themed Error component.
17
+ *
18
+ * @param {Props} props - The props for the component.
19
+ * @returns {JSX.Element} The Error component.
20
+ */
7
21
  export declare const Error: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLParagraphElement>>;
@@ -1,15 +1,32 @@
1
1
  import { IframeHTMLAttributes, ReactNode } from 'react';
2
2
  import { ButtonSize, ButtonVariant } from '../../../theme/theme';
3
3
  import { IframeTheme } from '../../../types/secureIframe';
4
+ /**
5
+ * The props for the IframeButton component.
6
+ */
4
7
  interface IframeButtonProps extends IframeHTMLAttributes<HTMLIFrameElement> {
8
+ /** Whether to show an icon in the button. */
5
9
  icon?: boolean;
10
+ /** Whether the button is pending. */
6
11
  isPending?: boolean;
12
+ /** Whether the button should be full width. */
7
13
  fullWidth?: boolean;
14
+ /** The label to display on the button. */
8
15
  label: ReactNode;
16
+ /** A function to call when the theme changes. */
9
17
  onThemeChange?: (theme: IframeTheme) => void;
18
+ /** The size of the button. */
10
19
  size?: ButtonSize;
20
+ /** Theme overrides to apply to the button. The theme will be computed from the provided variant and then this theme object will be merged on top of it. */
11
21
  theme?: Partial<IframeTheme>;
22
+ /** The variant of the button. Defaults to "primary". */
12
23
  variant?: Extract<ButtonVariant, "primary" | "secondary">;
13
24
  }
25
+ /**
26
+ * The IframeButton component is used to display a button that opens a secure iframe.
27
+ *
28
+ * @param {IframeButtonProps} props - The props for the IframeButton component.
29
+ * @returns {JSX.Element} The IframeButton component.
30
+ */
14
31
  declare const IframeButton: import('react').ForwardRefExoticComponent<IframeButtonProps & import('react').RefAttributes<HTMLIFrameElement>>;
15
32
  export { IframeButton, type IframeButtonProps, type IframeTheme };
@@ -5,5 +5,27 @@ interface LoadingSkeletonProps {
5
5
  style?: CSSProperties;
6
6
  children?: ReactNode;
7
7
  }
8
+ /**
9
+ * Loading skeleton component.
10
+ * Applies a pulse animation to the component.
11
+ *
12
+ * @param {LoadingSkeletonProps} props - The props for the component.
13
+ * @param {ElementType} [props.as] - The component to render. Note it must not have a Fragment as the root element. Defaults to "div".
14
+ * @param {ReactNode} [props.children] - The children of the component.
15
+ * @returns {JSX.Element} A loading skeleton component.
16
+ *
17
+ * @example
18
+ * ```tsx lines
19
+ * function LoadingCard() {
20
+ * return (
21
+ * <div className="loading-card">
22
+ * <LoadingSkeleton className="loading-title" />
23
+ * <LoadingSkeleton className="loading-p-line-1" />
24
+ * <LoadingSkeleton className="loading-p-line-2" />
25
+ * </div>
26
+ * )
27
+ * }
28
+ * ```
29
+ */
8
30
  export declare const LoadingSkeleton: ({ as: Component, children, className, style, }: LoadingSkeletonProps) => import("react/jsx-runtime").JSX.Element;
9
31
  export {};
@@ -6,5 +6,16 @@ interface LoadingSpinnerProps {
6
6
  strokeWidth?: string | number;
7
7
  style?: CSSProperties;
8
8
  }
9
+ /**
10
+ * Loading spinner component.
11
+ *
12
+ * @param {object} props - The props for the component.
13
+ * @param {string} [props.className] - The class name for the component.
14
+ * @param {boolean} [props.staticStroke] - Whether to show the static outline.
15
+ * @param {string} [props.staticStrokeColor] - The color of the static outline.
16
+ * @param {string | number} [props.strokeWidth] - The width of the spinner.
17
+ * @param {CSSProperties} [props.style] - The style for the component.
18
+ * @returns {JSX.Element} A loading spinner component.
19
+ */
9
20
  export declare const LoadingSpinner: ({ className, staticStroke, staticStrokeColor, strokeWidth, style, }: LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
10
21
  export {};
@@ -1,12 +1,94 @@
1
1
  import { DialogContentProps } from '@radix-ui/react-dialog';
2
2
  import { CSSProperties, HTMLAttributes } from 'react';
3
+ /**
4
+ * Props for the ModalContent component.
5
+ *
6
+ * @augments DialogContentProps
7
+ * @augments HTMLAttributes<HTMLDivElement>
8
+ * @property {string} overlayClassName - The class name to apply to the overlay.
9
+ * @property {CSSProperties} overlayStyle - The style to apply to the overlay.
10
+ *
11
+ * @see {@link ModalContent}
12
+ */
3
13
  export interface ModalContentProps extends DialogContentProps, HTMLAttributes<HTMLDivElement> {
4
14
  overlayClassName?: string;
5
15
  overlayStyle?: CSSProperties;
6
16
  }
17
+ /**
18
+ * The ModalContent component is a wrapper around a DialogOverlay and DialogContent. It is intended to be used with the {@link Modal} component.
19
+ *
20
+ * @see {@link Modal}
21
+ * @see {@link ModalClose}
22
+ * @see {@link ModalDescription}
23
+ * @see {@link ModalTitle}
24
+ * @see {@link ModalTrigger}
25
+ * @see https://www.radix-ui.com/primitives/docs/components/dialog
26
+ *
27
+ * @group Components
28
+ */
7
29
  export declare const ModalContent: import('react').ForwardRefExoticComponent<ModalContentProps & import('react').RefAttributes<HTMLDivElement>>;
30
+ /**
31
+ * The Modal component is the same as the Dialog component from Radix UI. This component is used to render the Radix UI Dialog component as a modal.
32
+ *
33
+ * @see {@link ModalClose}
34
+ * @see {@link ModalContent}
35
+ * @see {@link ModalDescription}
36
+ * @see {@link ModalTitle}
37
+ * @see {@link ModalTrigger}
38
+ * @see https://www.radix-ui.com/primitives/docs/components/dialog
39
+ *
40
+ * @group Components
41
+ */
8
42
  export declare const Modal: import('react').FC<import('@radix-ui/react-dialog').DialogProps>;
43
+ /**
44
+ * The ModalClose component is the same as the DialogClose component from Radix UI. It is intended to be used with the {@link Modal} component.
45
+ *
46
+ * @see {@link Modal}
47
+ * @see {@link ModalContent}
48
+ * @see {@link ModalDescription}
49
+ * @see {@link ModalTitle}
50
+ * @see {@link ModalTrigger}
51
+ * @see https://www.radix-ui.com/primitives/docs/components/dialog
52
+ *
53
+ * @group Components
54
+ */
9
55
  export declare const ModalClose: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
56
+ /**
57
+ * The ModalDescription component is the same as the DialogDescription component from Radix UI. It is intended to be used with the {@link Modal} component.
58
+ *
59
+ * @see {@link Modal}
60
+ * @see {@link ModalClose}
61
+ * @see {@link ModalContent}
62
+ * @see {@link ModalTitle}
63
+ * @see {@link ModalTrigger}
64
+ * @see https://www.radix-ui.com/primitives/docs/components/dialog
65
+ *
66
+ * @group Components
67
+ */
10
68
  export declare const ModalDescription: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>>;
69
+ /**
70
+ * The ModalTitle component is the same as the DialogTitle component from Radix UI. It is intended to be used with the {@link Modal} component.
71
+ *
72
+ * @see {@link Modal}
73
+ * @see {@link ModalClose}
74
+ * @see {@link ModalContent}
75
+ * @see {@link ModalDescription}
76
+ * @see {@link ModalTrigger}
77
+ * @see https://www.radix-ui.com/primitives/docs/components/dialog
78
+ *
79
+ * @group Components
80
+ */
11
81
  export declare const ModalTitle: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
82
+ /**
83
+ * The ModalTrigger component is the same as the DialogTrigger component from Radix UI. It is intended to be used with the {@link Modal} component.
84
+ *
85
+ * @see {@link Modal}
86
+ * @see {@link ModalClose}
87
+ * @see {@link ModalContent}
88
+ * @see {@link ModalDescription}
89
+ * @see {@link ModalTitle}
90
+ * @see https://www.radix-ui.com/primitives/docs/components/dialog
91
+ *
92
+ * @group Components
93
+ */
12
94
  export declare const ModalTrigger: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,17 +1,52 @@
1
+ /**
2
+ * The props for the QRCodeSVG component.
3
+ */
1
4
  export type QRCodeSVGProps = {
5
+ /** The value of the QR code */
2
6
  value: string;
7
+ /** The size of the QR code */
3
8
  size?: number;
9
+ /** The color of the QR code */
4
10
  color?: string;
11
+ /** The background color of the QR code */
5
12
  backgroundColor?: string;
13
+ /** The logo of the QR code */
6
14
  logo?: {
7
15
  uri: string;
8
16
  };
17
+ /** The size of the logo */
9
18
  logoSize?: number;
19
+ /** The background color of the logo */
10
20
  logoBackgroundColor?: string;
21
+ /** The margin of the logo */
11
22
  logoMargin?: number;
23
+ /** The border radius of the logo */
12
24
  logoBorderRadius?: number;
25
+ /** The error correction level of the QR code */
13
26
  ecl?: "L" | "M" | "Q" | "H";
27
+ /** Whether the data is async data fetched */
14
28
  isAsyncDataFetched?: boolean;
29
+ /** The fill color of the corners */
15
30
  cornerFillColor?: string;
16
31
  };
32
+ /**
33
+ * The QR code SVG component.
34
+ *
35
+ * @param {QRCodeSVGProps} props - The props for the QR code SVG.
36
+ * @param {string} props.value - The value of the QR code.
37
+ * @param {number} props.size - The size of the QR code.
38
+ * @param {string} props.color - The color of the QR code.
39
+ * @param {string} props.backgroundColor - The background color of the QR code.
40
+ * @param {string} props.logo - The logo of the QR code.
41
+ * @param {number} props.logoSize - The size of the logo.
42
+ * @param {string} props.logoBackgroundColor - The background color of the logo.
43
+ * @param {number} props.logoMargin - The margin of the logo.
44
+ * @param {number} props.logoBorderRadius - The border radius of the logo.
45
+ * @param {number} props.quietZone - The quiet zone of the QR code.
46
+ * @param {number} props.quietZoneBorderRadius - The border radius of the quiet zone.
47
+ * @param {string} props.ecl - The error correction level of the QR code.
48
+ * @param {string} props.gradientType - The type of gradient to use.
49
+ * @param {string} props.cornerFillColor - The fill color of the corners.
50
+ * @returns The QR code SVG component.
51
+ */
17
52
  export declare function QRCodeSVG({ value, size, color, backgroundColor, logo, logoSize, logoBackgroundColor, logoMargin, logoBorderRadius, ecl, cornerFillColor, }: QRCodeSVGProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,12 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  import { QRCodeSVGProps } from './QRCodeSvg';
3
3
  type QRCodeProps = QRCodeSVGProps & Omit<HTMLAttributes<HTMLDivElement>, "children">;
4
+ /**
5
+ * The QR code component.
6
+ *
7
+ * @param {QRCodeProps} props - The props for the QR code.
8
+ * @param {ReactNode} props.children - The children of the QR code.
9
+ * @returns The QR code.
10
+ */
4
11
  export declare const QRCode: ({ value, size, color, backgroundColor, ecl, isAsyncDataFetched, cornerFillColor, className, ...props }: QRCodeProps) => import("react/jsx-runtime").JSX.Element;
5
12
  export {};
@@ -1 +1,10 @@
1
+ /**
2
+ * Get the corners of the QR code.
3
+ *
4
+ * @param {number} size - The size of the QR code.
5
+ * @param {number} matrixLength - The length of the matrix of the QR code.
6
+ * @param {string} backgroundColor - The background color of the corners.
7
+ * @param {string} fillColor - The fill color of the corners.
8
+ * @returns The corners of the QR code.
9
+ */
1
10
  export declare function useCorners(size: number, matrixLength: number, backgroundColor: string, fillColor?: string): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,29 @@
1
1
  export declare const CORNER_SIZE = 7;
2
2
  type UseDotsPathProps = {
3
+ /** The matrix of the QR code */
3
4
  matrix: number[][];
5
+ /** The size of the QR code */
4
6
  size: number;
7
+ /** The size of the logo */
5
8
  logoSize: number;
9
+ /** The margin of the logo */
6
10
  logoMargin: number;
11
+ /** The border radius of the logo */
7
12
  logoBorderRadius: number;
13
+ /** Whether the QR code has a logo */
8
14
  hasLogo: boolean;
9
15
  };
16
+ /**
17
+ * Get the path of the QR code.
18
+ *
19
+ * @param {UseDotsPathProps} props - The props for the useDotsPath hook.
20
+ * @param {number[][]} props.matrix - The matrix of the QR code.
21
+ * @param {number} props.size - The size of the QR code.
22
+ * @param {number} props.logoSize - The size of the logo.
23
+ * @param {number} props.logoMargin - The margin of the logo.
24
+ * @param {number} props.logoBorderRadius - The border radius of the logo.
25
+ * @param {boolean} props.hasLogo - Whether the QR code has a logo.
26
+ * @returns The path of the QR code.
27
+ */
10
28
  export declare function useDotsPath({ matrix, size, logoSize, logoMargin, logoBorderRadius, hasLogo, }: UseDotsPathProps): string;
11
29
  export {};
@@ -1,12 +1,30 @@
1
1
  type RenderLogoProps = {
2
+ /** The size of the QR code */
2
3
  size: number;
4
+ /** The logo to render */
3
5
  logo: {
4
6
  uri: string;
5
7
  } | undefined;
8
+ /** The size of the logo */
6
9
  logoSize: number;
10
+ /** The background color of the logo */
7
11
  logoBackgroundColor: string;
12
+ /** The margin of the logo */
8
13
  logoMargin: number;
14
+ /** The border radius of the logo */
9
15
  logoBorderRadius: number;
10
16
  };
17
+ /**
18
+ * Get the logo for the QR code.
19
+ *
20
+ * @param {RenderLogoProps} props - The props for the useLogo hook.
21
+ * @param {number} props.size - The size of the QR code.
22
+ * @param {string} props.logo - The logo to render.
23
+ * @param {number} props.logoSize - The size of the logo.
24
+ * @param {string} props.logoBackgroundColor - The background color of the logo.
25
+ * @param {number} props.logoMargin - The margin of the logo.
26
+ * @param {number} props.logoBorderRadius - The border radius of the logo.
27
+ * @returns The logo.
28
+ */
11
29
  export declare function useLogo({ size, logo, logoSize, logoBackgroundColor, logoMargin, logoBorderRadius, }: RenderLogoProps): import("react/jsx-runtime").JSX.Element | undefined;
12
30
  export {};
@@ -1 +1,8 @@
1
+ /**
2
+ * Generate the matrix for a QR code.
3
+ *
4
+ * @param value - The value to generate the matrix for.
5
+ * @param errorCorrectionLevel - The error correction level to use.
6
+ * @returns The matrix.
7
+ */
1
8
  export declare function useMatrix(value: string, errorCorrectionLevel: "L" | "M" | "Q" | "H"): any;
@@ -4,5 +4,11 @@ interface Props {
4
4
  id?: string;
5
5
  className?: string;
6
6
  }
7
+ /**
8
+ * A themed Error component.
9
+ *
10
+ * @param {Props} props - The props for the component.
11
+ * @returns {JSX.Element} The ServerError component.
12
+ */
7
13
  export declare const ServerError: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLDivElement>>;
8
14
  export {};
@@ -1,7 +1,21 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * The props for the SuccessMessage component.
4
+ *
5
+ * @interface Props
6
+ * @property {ReactNode} children - The children of the component.
7
+ * @property {string} [id] - The id of the component.
8
+ * @property {string} [className] - The class name of the component.
9
+ */
2
10
  export interface Props extends HTMLAttributes<HTMLParagraphElement> {
3
11
  children: ReactNode;
4
12
  id?: string;
5
13
  className?: string;
6
14
  }
15
+ /**
16
+ * A themed SuccessMessage component.
17
+ *
18
+ * @param {Props} props - The props for the component.
19
+ * @returns {JSX.Element} The SuccessMessage component.
20
+ */
7
21
  export declare const SuccessMessage: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLParagraphElement>>;
@@ -1,5 +1,20 @@
1
1
  import { Key } from 'react';
2
2
  import { SwitchTransitionProps, SwitchTransitionRef } from '../SwitchTransition';
3
+ /**
4
+ * The props for the SwitchFadeTransition component.
5
+ */
3
6
  export type SwitchFadeTransitionProps<T extends Key> = Omit<SwitchTransitionProps<T>, "transitionName" | "unmountOnExit" | "mountOnEnter" | "preEnter">;
7
+ /**
8
+ * The ref for the SwitchFadeTransition component.
9
+ */
4
10
  export type SwitchFadeTransitionRef<T extends Key> = SwitchTransitionRef<T>;
11
+ /**
12
+ * A transition that slides the content in and out.
13
+ *
14
+ * @param props - The props for the component.
15
+ * @param props.children - The children to render.
16
+ * @param props.className - The class name to apply to the component.
17
+ * @param props.direction - The direction of the transition.
18
+ * @returns {JSX.Element} The SwitchFadeTransition component.
19
+ */
5
20
  export declare const SwitchFadeTransition: <T extends Key>({ children, className, ...props }: SwitchFadeTransitionProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,23 @@
1
1
  import { Key } from 'react';
2
2
  import { SwitchTransitionProps, SwitchTransitionRef } from '../SwitchTransition';
3
+ /**
4
+ * The props for the SwitchSlideTransition component.
5
+ */
3
6
  export interface SwitchSlideTransitionProps<T extends Key> extends Omit<SwitchTransitionProps<T>, "transitionName" | "unmountOnExit" | "mountOnEnter" | "preEnter"> {
4
7
  direction?: "left" | "right";
5
8
  }
9
+ /**
10
+ * The ref for the SwitchSlideTransition component.
11
+ */
6
12
  export type SwitchSlideTransitionRef<T extends Key> = SwitchTransitionRef<T>;
13
+ /**
14
+ * A transition that slides the content in and out.
15
+ *
16
+ * @param props - The props for the component.
17
+ * @param props.children - The children to render.
18
+ * @param props.className - The class name to apply to the component.
19
+ * @param props.direction - The direction of the transition.
20
+ * @param props.timeout - The timeout for the transition.
21
+ * @returns {JSX.Element} The SwitchSlideTransition component.
22
+ */
7
23
  export declare const SwitchSlideTransition: <T extends Key>({ children, className, direction, timeout, ...props }: SwitchSlideTransitionProps<T>) => import("react/jsx-runtime").JSX.Element;