@kittycad/react-shared 0.1.0 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,14 +1,97 @@
1
- import React from 'react';
1
+ import * as React$1 from 'react';
2
+ import React__default, { SVGProps } from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { Models } from '@kittycad/lib';
5
+ import { DeepPartial } from '@/lib/types';
2
6
  import { ClassValue } from 'clsx';
3
7
 
4
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
8
+ interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
5
9
  variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
6
10
  size?: 'sm' | 'md' | 'lg';
7
- children: React.ReactNode;
11
+ children: React__default.ReactNode;
8
12
  }
9
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
+ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
14
+
15
+ interface SignInPageContentProps {
16
+ shouldTrackConversions?: boolean;
17
+ trackingClasses?: (provider?: string) => string;
18
+ buttonClasses?: (provider?: string) => string;
19
+ callbackUrl?: string;
20
+ onOAuthClick?: (provider: Models['AccountProvider_type']) => void;
21
+ onEmailSubmit?: () => void;
22
+ baseUrl?: string;
23
+ className?: string;
24
+ titleColor?: string;
25
+ getAPIBase?: () => string;
26
+ }
27
+ declare function SignInPageContent({ shouldTrackConversions, trackingClasses, buttonClasses, callbackUrl, onOAuthClick, onEmailSubmit, baseUrl, className, titleColor, getAPIBase, }: SignInPageContentProps): react_jsx_runtime.JSX.Element;
28
+
29
+ type BrandTheme = 'default' | 'yellow' | 'blue' | 'green' | 'magenta' | 'hue-shift' | 'hue-shift-on-white';
30
+ interface EmailLoginFormProps extends React__default.HTMLProps<HTMLFormElement> {
31
+ theme?: BrandTheme;
32
+ buttonClassName?: string;
33
+ idSuffix?: string;
34
+ onSubmit?: () => void;
35
+ callbackUrl?: string;
36
+ baseUrl?: string;
37
+ getAPIBase?: () => string;
38
+ }
39
+ declare function EmailLoginForm({ theme, buttonClassName, className, idSuffix, onSubmit, callbackUrl, baseUrl, getAPIBase, ...props }: EmailLoginFormProps): react_jsx_runtime.JSX.Element;
40
+
41
+ interface LoginTitleProps {
42
+ color?: string;
43
+ }
44
+ declare function LoginTitle({ color }: LoginTitleProps): react_jsx_runtime.JSX.Element;
45
+
46
+ declare const Spinner: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
47
+
48
+ declare const CustomIconMap: {
49
+ readonly exclamationMark: react_jsx_runtime.JSX.Element;
50
+ readonly infinity: react_jsx_runtime.JSX.Element;
51
+ readonly star: react_jsx_runtime.JSX.Element;
52
+ };
53
+ type CustomIconName = keyof typeof CustomIconMap;
54
+ declare const CustomIcon: ({ name, ...props }: {
55
+ name: CustomIconName;
56
+ } & React.SVGProps<SVGSVGElement>) => React$1.FunctionComponentElement<any>;
57
+
58
+ type TextProps = {
59
+ heading: {
60
+ unlimited: string;
61
+ limited: string;
62
+ };
63
+ paragraph: {
64
+ unlimited: string;
65
+ limited: string;
66
+ };
67
+ button: {
68
+ limited: string;
69
+ };
70
+ };
71
+ type BillingDialogProps = {
72
+ error?: Error;
73
+ credits?: number;
74
+ allowance?: number;
75
+ upgradeHref: string;
76
+ text?: DeepPartial<TextProps>;
77
+ upgradeClick?: React.MouseEventHandler<HTMLAnchorElement>;
78
+ className?: string;
79
+ };
80
+ declare const BillingDialog: (props: BillingDialogProps) => react_jsx_runtime.JSX.Element;
81
+
82
+ declare enum BillingRemainingMode {
83
+ ProgressBarFixed = 0,
84
+ ProgressBarStretch = 1
85
+ }
86
+ interface BillingRemainingProps {
87
+ mode: BillingRemainingMode;
88
+ error?: Error;
89
+ credits?: number;
90
+ allowance?: number;
91
+ }
92
+ declare const BillingRemaining: (props: BillingRemainingProps) => react_jsx_runtime.JSX.Element;
10
93
 
11
94
  declare function cn(...inputs: ClassValue[]): string;
12
95
 
13
- export { Button, cn };
14
- export type { ButtonProps };
96
+ export { BillingDialog, BillingRemaining, BillingRemainingMode, Button, CustomIcon, EmailLoginForm, LoginTitle, SignInPageContent, Spinner, cn };
97
+ export type { BillingDialogProps, BrandTheme, ButtonProps, EmailLoginFormProps, LoginTitleProps, SignInPageContentProps };