@openhive-eu/payment 0.0.0-beta.4 → 1.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/components/country-select.d.ts +7 -0
  2. package/dist/components/ui/button.d.ts +11 -7
  3. package/dist/components/ui/field.d.ts +4 -24
  4. package/dist/components/ui/icons.d.ts +2 -0
  5. package/dist/components/ui/input.d.ts +4 -3
  6. package/dist/components/ui/radio-group.d.ts +22 -5
  7. package/dist/components/ui/radio-input.d.ts +11 -0
  8. package/dist/components/ui/skeleton.d.ts +3 -2
  9. package/dist/components/ui/spinner.d.ts +2 -2
  10. package/dist/index.cdn.d.ts +1 -0
  11. package/dist/index.d.ts +2 -18
  12. package/dist/index.js +5290 -10102
  13. package/dist/index.js.gz +0 -0
  14. package/dist/index.min.js +248 -0
  15. package/dist/index.min.js.gz +0 -0
  16. package/dist/lib/api-client.d.ts +2 -4
  17. package/dist/lib/i18n.d.ts +22 -0
  18. package/dist/lib/pay-client.d.ts +16 -27
  19. package/dist/lib/utils.d.ts +2 -0
  20. package/dist/payment-widget.d.ts +59 -0
  21. package/dist/react-widget.d.ts +40 -0
  22. package/dist/react.js +6231 -0
  23. package/dist/register.d.ts +3 -0
  24. package/dist/styles.css +1 -0
  25. package/dist/styles.css.gz +0 -0
  26. package/package.json +51 -32
  27. package/README.md +0 -1
  28. package/dist/components/activity.d.ts +0 -6
  29. package/dist/components/channel.d.ts +0 -7
  30. package/dist/components/error-fallback.d.ts +0 -2
  31. package/dist/components/pay-client-provider.d.ts +0 -5
  32. package/dist/components/pay-provider.d.ts +0 -8
  33. package/dist/components/pay-terminal.d.ts +0 -18
  34. package/dist/components/payment-methods.d.ts +0 -6
  35. package/dist/components/select-countries.d.ts +0 -6
  36. package/dist/components/ui/fade-in.d.ts +0 -4
  37. package/dist/components/ui/label.d.ts +0 -4
  38. package/dist/components/ui/select.d.ts +0 -15
  39. package/dist/components/ui/separator.d.ts +0 -4
  40. package/dist/index.css +0 -1
  41. package/dist/index.umd.cjs +0 -58
@@ -0,0 +1,7 @@
1
+ import type { TemplateResult } from "lit";
2
+ import { type CountryCode } from "../lib/countries";
3
+ export declare function renderCountrySelect(params: {
4
+ value: CountryCode;
5
+ label: string;
6
+ onChange: (e: Event) => void;
7
+ }): TemplateResult;
@@ -1,10 +1,14 @@
1
- import * as React from "react";
1
+ import type { TemplateResult } from "lit";
2
2
  import { type VariantProps } from "class-variance-authority";
3
- declare const buttonVariants: (props?: ({
4
- variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
3
+ export declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
5
  size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
- asChild?: boolean;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export { Button, buttonVariants };
7
+ export type ButtonVariants = VariantProps<typeof buttonVariants>;
8
+ export interface ButtonProps extends ButtonVariants {
9
+ type?: "button" | "submit" | "reset";
10
+ class?: string;
11
+ disabled?: boolean;
12
+ onClick?: (e: Event) => void;
13
+ }
14
+ export declare function button(opts: ButtonProps, children: TemplateResult | string): TemplateResult;
@@ -1,24 +1,4 @@
1
- import { type VariantProps } from "class-variance-authority";
2
- import { Label } from "~/components/ui/label";
3
- declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
4
- declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
5
- variant?: "legend" | "label";
6
- }): import("react/jsx-runtime").JSX.Element;
7
- declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
- declare const fieldVariants: (props?: ({
9
- orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
10
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
- declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
12
- declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
- declare function FieldLabel({ className, children, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
14
- declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
15
- declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
16
- declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
17
- children?: React.ReactNode;
18
- }): import("react/jsx-runtime").JSX.Element;
19
- declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
20
- errors?: Array<{
21
- message?: string;
22
- } | undefined>;
23
- }): import("react/jsx-runtime").JSX.Element | null;
24
- export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
1
+ import { nothing } from "lit";
2
+ import type { TemplateResult } from "lit";
3
+ export declare function fieldLabel(text: string, htmlFor: string): TemplateResult;
4
+ export declare function fieldError(msg: string | false | null | undefined): TemplateResult | typeof nothing;
@@ -0,0 +1,2 @@
1
+ export declare const MAIL_ICON: import("lit-html").TemplateResult<1>;
2
+ export declare const SMS_ICON: import("lit-html").TemplateResult<1>;
@@ -1,3 +1,4 @@
1
- import * as React from "react";
2
- declare function Input({ className, type, ...props }: React.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
3
- export { Input };
1
+ import { type VariantProps } from "class-variance-authority";
2
+ export declare const inputVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
3
+ export type InputVariants = VariantProps<typeof inputVariants>;
4
+ export declare const INPUT_CLS: string;
@@ -1,5 +1,22 @@
1
- import * as React from "react";
2
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
- declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
5
- export { RadioGroup, RadioGroupItem };
1
+ import { TemplateResult } from "lit";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ export declare const radioLabelVariants: (props?: ({
4
+ size?: "method" | "channel" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export type RadioLabelVariants = VariantProps<typeof radioLabelVariants>;
7
+ export declare function radioMethodItem(opts: {
8
+ name: string;
9
+ value: string;
10
+ checked: boolean;
11
+ onChange: (e: Event) => void;
12
+ label: string;
13
+ logoUrl?: string;
14
+ }): TemplateResult;
15
+ export declare function radioChannelItem(opts: {
16
+ name: string;
17
+ value: string;
18
+ checked: boolean;
19
+ onChange: (e: Event) => void;
20
+ label: string;
21
+ icon: TemplateResult;
22
+ }): TemplateResult;
@@ -0,0 +1,11 @@
1
+ import type { TemplateResult } from "lit";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ export declare const radioInputVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
4
+ export declare const radioIndicatorVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
+ export type RadioInputVariants = VariantProps<typeof radioInputVariants>;
6
+ export declare function radioInput(opts: {
7
+ name: string;
8
+ value: string;
9
+ checked: boolean;
10
+ onChange: (e: Event) => void;
11
+ }): TemplateResult;
@@ -1,2 +1,3 @@
1
- declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
2
- export { Skeleton };
1
+ import type { TemplateResult } from "lit";
2
+ export declare function skeleton(className?: string): TemplateResult;
3
+ export declare function methodsSkeleton(): TemplateResult;
@@ -1,2 +1,2 @@
1
- declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
2
- export { Spinner };
1
+ import type { TemplateResult } from "lit";
2
+ export declare function spinner(): TemplateResult;
@@ -0,0 +1 @@
1
+ export * from "./register";
package/dist/index.d.ts CHANGED
@@ -1,18 +1,2 @@
1
- import "./app.css";
2
- import { PayProvider } from "./components/pay-provider";
3
- import type { RequestToPay } from "./lib/api-client";
4
- declare const Root: ({ onClose, onRequestToPay, customer, maxAmount, readOnlyAmount, defaultAmount, defaultReference, ...props }: Omit<React.ComponentProps<typeof PayProvider>, "children"> & {
5
- onClose?: () => void;
6
- onRequestToPay?: (requestToPay: RequestToPay) => Promise<void>;
7
- customer: {
8
- name?: string;
9
- email?: string;
10
- phone?: string;
11
- };
12
- maxAmount?: number;
13
- defaultAmount?: RequestToPay["amount"];
14
- readOnlyAmount?: boolean;
15
- defaultReference?: string;
16
- }) => import("react/jsx-runtime").JSX.Element;
17
- export { PayClientProvider } from "./components/pay-client-provider";
18
- export { Root as PaymentWidget };
1
+ import "./styles.css";
2
+ export * from "./register";