@descope/flow-components 2.0.38
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/.eslintrc +119 -0
- package/.github/actions/setup/action.yml +42 -0
- package/.github/workflows/ci.yml +105 -0
- package/.github/workflows/publish.yml +41 -0
- package/.github/workflows/release.yml +44 -0
- package/.husky/pre-commit +1 -0
- package/.prettierrc +8 -0
- package/.storybook/main.js +23 -0
- package/.storybook/manager.js +10 -0
- package/.storybook/preview-head.html +29 -0
- package/.storybook/preview.js +44 -0
- package/LICENSE +21 -0
- package/README.md +20 -0
- package/babel.config.js +7 -0
- package/dist/index.cjs.js +360 -0
- package/dist/index.d.ts +397 -0
- package/dist/index.esm.js +314 -0
- package/jest.config.js +33 -0
- package/jest.setup.js +2 -0
- package/package.json +110 -0
- package/renovate.json +4 -0
- package/rollup.config.mjs +47 -0
- package/src/Boolean/Boolean.tsx +24 -0
- package/src/Boolean/index.ts +1 -0
- package/src/Button/Button.tsx +49 -0
- package/src/Button/index.ts +1 -0
- package/src/Checkbox/Checkbox.tsx +16 -0
- package/src/Checkbox/index.ts +1 -0
- package/src/Code/Code.tsx +21 -0
- package/src/Code/index.ts +1 -0
- package/src/Container/Container.tsx +111 -0
- package/src/Container/index.ts +1 -0
- package/src/CssVarImage/CssVarImage.tsx +38 -0
- package/src/CssVarImage/index.ts +1 -0
- package/src/Divider/Divider.tsx +33 -0
- package/src/Divider/index.ts +1 -0
- package/src/EmailField/EmailField.tsx +20 -0
- package/src/EmailField/index.ts +1 -0
- package/src/Image/Image.tsx +32 -0
- package/src/Image/index.ts +1 -0
- package/src/Input/Input.tsx +27 -0
- package/src/Input/index.ts +1 -0
- package/src/Link/Link.tsx +33 -0
- package/src/Link/index.ts +1 -0
- package/src/Loader/Loader.tsx +40 -0
- package/src/Loader/index.ts +1 -0
- package/src/Logo/Logo.tsx +27 -0
- package/src/Logo/index.ts +1 -0
- package/src/NewPassword/NewPassword.tsx +25 -0
- package/src/NewPassword/index.ts +1 -0
- package/src/NumberField/NumberField.tsx +20 -0
- package/src/NumberField/index.ts +1 -0
- package/src/Password/Password.tsx +20 -0
- package/src/Password/index.ts +1 -0
- package/src/Phone/Phone.tsx +22 -0
- package/src/Phone/index.ts +1 -0
- package/src/Select/Select.tsx +29 -0
- package/src/Select/index.ts +1 -0
- package/src/Switch/Switch.tsx +21 -0
- package/src/Switch/index.ts +1 -0
- package/src/TOTPImage/TOTPImage.tsx +18 -0
- package/src/TOTPImage/index.ts +1 -0
- package/src/TOTPLink/TOTPLink.tsx +16 -0
- package/src/TOTPLink/index.ts +1 -0
- package/src/Text/Text.tsx +36 -0
- package/src/Text/index.ts +1 -0
- package/src/TextField/TextField.tsx +20 -0
- package/src/TextField/index.ts +1 -0
- package/src/Textarea/Textarea.tsx +20 -0
- package/src/Textarea/index.ts +1 -0
- package/src/icons/apple.tsx +14 -0
- package/src/icons/discord.tsx +14 -0
- package/src/icons/facebook.tsx +14 -0
- package/src/icons/fingerprint.tsx +14 -0
- package/src/icons/github.tsx +14 -0
- package/src/icons/gitlab.tsx +41 -0
- package/src/icons/google.tsx +29 -0
- package/src/icons/index.ts +11 -0
- package/src/icons/input-hidden.tsx +17 -0
- package/src/icons/input-visible.tsx +17 -0
- package/src/icons/linkedin.tsx +18 -0
- package/src/icons/microsoft.tsx +41 -0
- package/src/icons/passkey.tsx +16 -0
- package/src/icons/sso.tsx +14 -0
- package/src/index.ts +29 -0
- package/src/inputHelpers.ts +41 -0
- package/src/themeToCssVars/constants.ts +13 -0
- package/src/themeToCssVars/index.ts +153 -0
- package/src/themeToCssVars/types.ts +56 -0
- package/src/types.ts +52 -0
- package/src/utils.tsx +69 -0
- package/stories/Boolean.stories.jsx +37 -0
- package/stories/Button.stories.jsx +71 -0
- package/stories/Checkbox.stories.jsx +29 -0
- package/stories/Code.stories.jsx +60 -0
- package/stories/Container.stories.jsx +53 -0
- package/stories/Divider.stories.jsx +23 -0
- package/stories/EmailField.stories.jsx +36 -0
- package/stories/Image.stories.jsx +16 -0
- package/stories/Input.stories.jsx +63 -0
- package/stories/Link.stories.jsx +21 -0
- package/stories/Loader.stories.jsx +34 -0
- package/stories/Logo.stories.jsx +14 -0
- package/stories/NewPassword.stories.jsx +52 -0
- package/stories/NumberField.stories.jsx +35 -0
- package/stories/Password.stories.jsx +37 -0
- package/stories/Phone.stories.jsx +61 -0
- package/stories/Switch.stories.jsx +29 -0
- package/stories/TOTPImage.stories.jsx +22 -0
- package/stories/TOTPLink.stories.jsx +20 -0
- package/stories/Text.stories.jsx +35 -0
- package/stories/TextField.stories.jsx +39 -0
- package/stories/Textarea.stories.jsx +25 -0
- package/storybook-static/favicon.ico +0 -0
- package/test/__snapshots__/boolean.test.tsx.snap +47 -0
- package/test/__snapshots__/buttons.test.tsx.snap +843 -0
- package/test/__snapshots__/checkbox.test.tsx.snap +51 -0
- package/test/__snapshots__/code.test.tsx.snap +1184 -0
- package/test/__snapshots__/container.test.tsx.snap +218 -0
- package/test/__snapshots__/divider.test.tsx.snap +73 -0
- package/test/__snapshots__/image.test.tsx.snap +62 -0
- package/test/__snapshots__/input.test.tsx.snap +80 -0
- package/test/__snapshots__/link.test.tsx.snap +120 -0
- package/test/__snapshots__/loader.test.tsx.snap +53 -0
- package/test/__snapshots__/logo.test.tsx.snap +10 -0
- package/test/__snapshots__/newPassword.test.tsx.snap +69 -0
- package/test/__snapshots__/numeric-input.test.tsx.snap +21 -0
- package/test/__snapshots__/password.test.tsx.snap +26 -0
- package/test/__snapshots__/phone.test.tsx.snap +504 -0
- package/test/__snapshots__/switch.test.tsx.snap +51 -0
- package/test/__snapshots__/text.test.tsx.snap +89 -0
- package/test/__snapshots__/textarea.test.tsx.snap +73 -0
- package/test/__snapshots__/themeToCssVars.test.ts.snap +45 -0
- package/test/__snapshots__/totpImage.test.tsx.snap +10 -0
- package/test/__snapshots__/totpLink.test.tsx.snap +13 -0
- package/test/boolean.test.tsx +28 -0
- package/test/buttons.test.tsx +66 -0
- package/test/checkbox.test.tsx +67 -0
- package/test/code.test.tsx +182 -0
- package/test/container.test.tsx +91 -0
- package/test/divider.test.tsx +50 -0
- package/test/image.test.tsx +40 -0
- package/test/input.test.tsx +82 -0
- package/test/inputHelpers.test.tsx +58 -0
- package/test/link.test.tsx +71 -0
- package/test/loader.test.tsx +25 -0
- package/test/logo.test.tsx +10 -0
- package/test/newPassword.test.tsx +132 -0
- package/test/numeric-input.test.tsx +114 -0
- package/test/password.test.tsx +55 -0
- package/test/phone.test.tsx +158 -0
- package/test/switch.test.tsx +67 -0
- package/test/text.test.tsx +60 -0
- package/test/textarea.test.tsx +64 -0
- package/test/themeToCssVars.test.ts +82 -0
- package/test/totpImage.test.tsx +10 -0
- package/test/totpLink.test.tsx +10 -0
- package/tsconfig.json +20 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
export * from '@descope/web-components-ui';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
type KebabCase<S extends string> = S extends `${infer First}${infer Rest}` ? Rest extends Uncapitalize<Rest> ? `${Uncapitalize<First>}${KebabCase<Rest>}` : `${Uncapitalize<First>}-${KebabCase<Rest>}` : S;
|
|
5
|
+
type ComponentSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
type TextAlign = 'left' | 'right' | 'center';
|
|
7
|
+
type FlexAlignment = 'start' | 'center' | 'end';
|
|
8
|
+
type HTMLInputAttrs = Omit<JSX.IntrinsicElements['input'], 'size'>;
|
|
9
|
+
type DescopeInputExtraProps = {
|
|
10
|
+
'full-width'?: boolean;
|
|
11
|
+
bordered?: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
size?: ComponentSize;
|
|
15
|
+
'helper-text'?: string;
|
|
16
|
+
'data-errormessage-pattern-mismatch'?: string;
|
|
17
|
+
'data-errormessage-value-missing'?: string;
|
|
18
|
+
};
|
|
19
|
+
type DescopeInputProps = HTMLInputAttrs & DescopeInputExtraProps;
|
|
20
|
+
type PropsToAttrs<R extends Record<string, any>> = {
|
|
21
|
+
[K in keyof R as KebabCase<K & string>]: R[K];
|
|
22
|
+
};
|
|
23
|
+
type TypographyVariants = 'h1' | 'h2' | 'h3' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2';
|
|
24
|
+
type Mode = 'primary' | 'secondary' | 'error' | 'success';
|
|
25
|
+
|
|
26
|
+
declare global {
|
|
27
|
+
namespace JSX {
|
|
28
|
+
interface IntrinsicElements {
|
|
29
|
+
'descope-checkbox': DescopeInputProps;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
34
|
+
|
|
35
|
+
declare global {
|
|
36
|
+
namespace JSX {
|
|
37
|
+
interface IntrinsicElements {
|
|
38
|
+
'descope-switch-toggle': DescopeInputProps;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
43
|
+
|
|
44
|
+
type BooleanType = {
|
|
45
|
+
type: 'switch' | 'checkbox';
|
|
46
|
+
};
|
|
47
|
+
type Props$e = React.ComponentProps<typeof Checkbox> & React.ComponentProps<typeof Switch> & BooleanType;
|
|
48
|
+
declare const Boolean: React.ForwardRefExoticComponent<Omit<Props$e, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
49
|
+
|
|
50
|
+
declare global {
|
|
51
|
+
namespace JSX {
|
|
52
|
+
interface IntrinsicElements {
|
|
53
|
+
'descope-button': React.DetailedHTMLProps<React.HTMLAttributes<HTMLButtonElement>, HTMLButtonElement> & {
|
|
54
|
+
mode: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
60
|
+
variant?: string;
|
|
61
|
+
color?: string;
|
|
62
|
+
size?: string;
|
|
63
|
+
loading?: boolean;
|
|
64
|
+
startIcon?: string;
|
|
65
|
+
startIconColorText?: boolean;
|
|
66
|
+
'full-width'?: boolean;
|
|
67
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
68
|
+
|
|
69
|
+
type Props$d = {
|
|
70
|
+
digits?: number;
|
|
71
|
+
};
|
|
72
|
+
declare global {
|
|
73
|
+
namespace JSX {
|
|
74
|
+
interface IntrinsicElements {
|
|
75
|
+
'descope-passcode': DescopeInputProps & Props$d;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
declare const Code: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$d, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
80
|
+
|
|
81
|
+
type Never<T extends Record<string, any>> = {
|
|
82
|
+
[K in keyof T]: never;
|
|
83
|
+
};
|
|
84
|
+
type SpaceBetween = '0' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '3.5' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '16' | '20' | '24' | '28' | '32';
|
|
85
|
+
type Flex = {
|
|
86
|
+
align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
87
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
88
|
+
spaceBetween: SpaceBetween;
|
|
89
|
+
};
|
|
90
|
+
type ContainerAlignment = {
|
|
91
|
+
'horizontal-alignment'?: FlexAlignment | 'space-between';
|
|
92
|
+
'vertical-alignment'?: FlexAlignment;
|
|
93
|
+
'space-between'?: 'sm' | 'md' | 'lg';
|
|
94
|
+
};
|
|
95
|
+
type Props$c = {
|
|
96
|
+
direction?: 'row' | 'column';
|
|
97
|
+
shadow?: 'md' | 'lg' | 'xl' | '2xl';
|
|
98
|
+
'border-radius'?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
99
|
+
paddingX?: string;
|
|
100
|
+
paddingY?: string;
|
|
101
|
+
background?: string;
|
|
102
|
+
width?: string;
|
|
103
|
+
} & ((Flex & Never<ContainerAlignment>) | (ContainerAlignment & Never<Flex>));
|
|
104
|
+
declare global {
|
|
105
|
+
namespace JSX {
|
|
106
|
+
interface IntrinsicElements {
|
|
107
|
+
'descope-container': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
declare const Container: React.ForwardRefExoticComponent<(Props$c & React.HTMLAttributes<HTMLDivElement>) & React.RefAttributes<HTMLDivElement>>;
|
|
112
|
+
|
|
113
|
+
type Props$b = {
|
|
114
|
+
vertical?: boolean;
|
|
115
|
+
italic?: boolean;
|
|
116
|
+
variant?: TypographyVariants;
|
|
117
|
+
mode?: Mode;
|
|
118
|
+
children?: JSX.Element;
|
|
119
|
+
};
|
|
120
|
+
declare global {
|
|
121
|
+
namespace JSX {
|
|
122
|
+
interface IntrinsicElements {
|
|
123
|
+
'descope-divider': React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & Omit<Props$b, 'children'>;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "size"> & Props$b, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
128
|
+
|
|
129
|
+
declare const _default$a: ({ noColor }: {
|
|
130
|
+
noColor: any;
|
|
131
|
+
}) => React.JSX.Element;
|
|
132
|
+
|
|
133
|
+
declare const _default$9: ({ noColor }: {
|
|
134
|
+
noColor: any;
|
|
135
|
+
}) => React.JSX.Element;
|
|
136
|
+
|
|
137
|
+
declare const _default$8: ({ noColor }: {
|
|
138
|
+
noColor: any;
|
|
139
|
+
}) => React.JSX.Element;
|
|
140
|
+
|
|
141
|
+
declare const _default$7: ({ noColor }: {
|
|
142
|
+
noColor: any;
|
|
143
|
+
}) => React.JSX.Element;
|
|
144
|
+
|
|
145
|
+
declare const _default$6: ({ noColor }: {
|
|
146
|
+
noColor: any;
|
|
147
|
+
}) => React.JSX.Element;
|
|
148
|
+
|
|
149
|
+
declare const _default$5: ({ noColor }: {
|
|
150
|
+
noColor: any;
|
|
151
|
+
}) => React.JSX.Element;
|
|
152
|
+
|
|
153
|
+
declare const _default$4: ({ noColor }: {
|
|
154
|
+
noColor: any;
|
|
155
|
+
}) => React.JSX.Element;
|
|
156
|
+
|
|
157
|
+
declare const _default$3: ({ noColor }: {
|
|
158
|
+
noColor: any;
|
|
159
|
+
}) => React.JSX.Element;
|
|
160
|
+
|
|
161
|
+
declare const _default$2: ({ noColor }: {
|
|
162
|
+
noColor: any;
|
|
163
|
+
}) => React.JSX.Element;
|
|
164
|
+
|
|
165
|
+
declare const _default$1: ({ noColor }: {
|
|
166
|
+
noColor: any;
|
|
167
|
+
}) => React.JSX.Element;
|
|
168
|
+
|
|
169
|
+
declare const _default: ({ noColor }: {
|
|
170
|
+
noColor: any;
|
|
171
|
+
}) => React.JSX.Element;
|
|
172
|
+
|
|
173
|
+
type Props$a = {
|
|
174
|
+
width?: number;
|
|
175
|
+
height?: number;
|
|
176
|
+
};
|
|
177
|
+
declare global {
|
|
178
|
+
namespace JSX {
|
|
179
|
+
interface IntrinsicElements {
|
|
180
|
+
'descope-image': React.DetailedHTMLProps<React.HTMLAttributes<HTMLImageElement>, HTMLImageElement> & Props$a;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
declare const Image: React.ForwardRefExoticComponent<Props$a & React.HTMLAttributes<HTMLImageElement> & React.RefAttributes<HTMLImageElement>>;
|
|
185
|
+
|
|
186
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
187
|
+
|
|
188
|
+
type Props$9 = {
|
|
189
|
+
italic?: boolean;
|
|
190
|
+
variant?: TypographyVariants;
|
|
191
|
+
mode?: Mode;
|
|
192
|
+
textAlign?: TextAlign;
|
|
193
|
+
'full-width'?: boolean;
|
|
194
|
+
children?: JSX.Element;
|
|
195
|
+
};
|
|
196
|
+
declare global {
|
|
197
|
+
namespace JSX {
|
|
198
|
+
interface IntrinsicElements {
|
|
199
|
+
'descope-link': React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & Omit<Props$9, 'children'>;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
declare const Link: React.ForwardRefExoticComponent<Props$9 & React.RefAttributes<HTMLAnchorElement>>;
|
|
204
|
+
|
|
205
|
+
type Props$8 = {
|
|
206
|
+
variant?: 'linear' | 'radial';
|
|
207
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
208
|
+
color?: Mode;
|
|
209
|
+
};
|
|
210
|
+
type LoaderType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$8>;
|
|
211
|
+
declare global {
|
|
212
|
+
namespace JSX {
|
|
213
|
+
interface IntrinsicElements {
|
|
214
|
+
'descope-loader-linear': LoaderType;
|
|
215
|
+
'descope-loader-radial': LoaderType;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
declare const Loader: React.ForwardRefExoticComponent<Props$8 & React.RefAttributes<HTMLDivElement>>;
|
|
220
|
+
|
|
221
|
+
type Props$7 = {
|
|
222
|
+
width?: string;
|
|
223
|
+
height?: string;
|
|
224
|
+
};
|
|
225
|
+
declare global {
|
|
226
|
+
namespace JSX {
|
|
227
|
+
interface IntrinsicElements {
|
|
228
|
+
'descope-logo': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & PropsToAttrs<Props$7>;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
declare const Logo: React.ForwardRefExoticComponent<Props$7 & React.RefAttributes<HTMLDivElement>>;
|
|
233
|
+
|
|
234
|
+
type Props$6 = {
|
|
235
|
+
'password-label'?: string;
|
|
236
|
+
'password-placeholder'?: string;
|
|
237
|
+
'confirm-label'?: string;
|
|
238
|
+
'confirm-placeholder'?: string;
|
|
239
|
+
'has-confirm'?: boolean;
|
|
240
|
+
};
|
|
241
|
+
declare global {
|
|
242
|
+
namespace JSX {
|
|
243
|
+
interface IntrinsicElements {
|
|
244
|
+
'descope-new-password': DescopeInputProps & Props$6;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
declare const NewPassword: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$6, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
249
|
+
|
|
250
|
+
declare global {
|
|
251
|
+
namespace JSX {
|
|
252
|
+
interface IntrinsicElements {
|
|
253
|
+
'descope-number-field': DescopeInputProps;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
declare const NumberField: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
258
|
+
|
|
259
|
+
declare global {
|
|
260
|
+
namespace JSX {
|
|
261
|
+
interface IntrinsicElements {
|
|
262
|
+
'descope-password-field': DescopeInputProps;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
declare const PasswordField: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
267
|
+
|
|
268
|
+
type Props$5 = {
|
|
269
|
+
'default-code'?: string;
|
|
270
|
+
'phone-input-placeholder'?: string;
|
|
271
|
+
'country-input-placeholder'?: string;
|
|
272
|
+
};
|
|
273
|
+
declare global {
|
|
274
|
+
namespace JSX {
|
|
275
|
+
interface IntrinsicElements {
|
|
276
|
+
'descope-phone-field': DescopeInputProps & Props$5;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
declare const Phone: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$5, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
281
|
+
|
|
282
|
+
type Props$4 = {
|
|
283
|
+
children?: JSX.Element[];
|
|
284
|
+
};
|
|
285
|
+
declare global {
|
|
286
|
+
namespace JSX {
|
|
287
|
+
interface IntrinsicElements {
|
|
288
|
+
'descope-combo-box': DescopeInputProps;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
declare const Select: React.ForwardRefExoticComponent<Omit<HTMLInputAttrs & DescopeInputExtraProps & Props$4, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
293
|
+
|
|
294
|
+
type Props$3 = {
|
|
295
|
+
italic?: boolean;
|
|
296
|
+
variant?: string;
|
|
297
|
+
mode?: string;
|
|
298
|
+
'full-width'?: boolean;
|
|
299
|
+
'text-align'?: TextAlign;
|
|
300
|
+
};
|
|
301
|
+
declare global {
|
|
302
|
+
namespace JSX {
|
|
303
|
+
interface IntrinsicElements {
|
|
304
|
+
'descope-text': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & Props$3;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
declare const Text: React.ForwardRefExoticComponent<Omit<Props$3 & {
|
|
309
|
+
typography?: TypographyVariants;
|
|
310
|
+
} & Omit<React.HTMLProps<HTMLSpanElement>, "mode">, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
311
|
+
|
|
312
|
+
declare global {
|
|
313
|
+
namespace JSX {
|
|
314
|
+
interface IntrinsicElements {
|
|
315
|
+
'descope-text-area': DescopeInputProps;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
declare const Textarea: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
320
|
+
|
|
321
|
+
declare global {
|
|
322
|
+
namespace JSX {
|
|
323
|
+
interface IntrinsicElements {
|
|
324
|
+
'descope-text-field': DescopeInputProps;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
declare const TextField: React.ForwardRefExoticComponent<Omit<DescopeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
329
|
+
|
|
330
|
+
type Props$2 = {
|
|
331
|
+
varName: string;
|
|
332
|
+
fallback?: string;
|
|
333
|
+
width?: number;
|
|
334
|
+
height?: number;
|
|
335
|
+
className?: string;
|
|
336
|
+
};
|
|
337
|
+
declare const CssVarImage: React.ForwardRefExoticComponent<Props$2 & React.HTMLAttributes<HTMLImageElement> & React.RefAttributes<HTMLDivElement>>;
|
|
338
|
+
|
|
339
|
+
type Props$1 = Omit<React.ComponentProps<typeof CssVarImage>, 'varName' | 'fallback'>;
|
|
340
|
+
declare const TOTPImage: React.ForwardRefExoticComponent<Omit<Props$1, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
341
|
+
|
|
342
|
+
type Props = Omit<React.ComponentProps<typeof Link>, 'href'>;
|
|
343
|
+
declare const TOTPLink: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
344
|
+
|
|
345
|
+
type TypographyShallowVariant = {
|
|
346
|
+
'font-family': string;
|
|
347
|
+
};
|
|
348
|
+
type FontFamily = {
|
|
349
|
+
label: string;
|
|
350
|
+
family: string[];
|
|
351
|
+
url?: string;
|
|
352
|
+
};
|
|
353
|
+
type TypographyVariant = TypographyShallowVariant & {
|
|
354
|
+
'font-size': string;
|
|
355
|
+
'font-weight': string;
|
|
356
|
+
};
|
|
357
|
+
type Theme = {
|
|
358
|
+
components: {
|
|
359
|
+
'input-border-opacity': '0' | undefined;
|
|
360
|
+
'container-background-color': string;
|
|
361
|
+
'button-border-radius': string;
|
|
362
|
+
'input-background-color': string;
|
|
363
|
+
'input-label-color': string;
|
|
364
|
+
'input-color': string;
|
|
365
|
+
'input-placeholder-color': string;
|
|
366
|
+
'input-border-radius': string;
|
|
367
|
+
'primary-text-color': string;
|
|
368
|
+
'secondary-text-color': string;
|
|
369
|
+
};
|
|
370
|
+
colors: {
|
|
371
|
+
primary: string;
|
|
372
|
+
secondary: string;
|
|
373
|
+
error: string;
|
|
374
|
+
accent: string;
|
|
375
|
+
};
|
|
376
|
+
logo: {
|
|
377
|
+
'logo-url'?: string;
|
|
378
|
+
};
|
|
379
|
+
typography: {
|
|
380
|
+
fontFamilies: [FontFamily, FontFamily];
|
|
381
|
+
variants: {
|
|
382
|
+
h1: TypographyVariant;
|
|
383
|
+
h2: TypographyVariant;
|
|
384
|
+
h3: TypographyVariant;
|
|
385
|
+
subtitle1: TypographyVariant;
|
|
386
|
+
subtitle2: TypographyVariant;
|
|
387
|
+
body1: TypographyVariant;
|
|
388
|
+
body2: TypographyVariant;
|
|
389
|
+
input: TypographyShallowVariant;
|
|
390
|
+
button: TypographyShallowVariant;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
declare const generateCssVarsFromTheme: (theme?: Partial<Theme>) => {};
|
|
396
|
+
|
|
397
|
+
export { Boolean, Button, Checkbox, Code, Container, Divider, Image, Input, Link, Loader, Logo, NewPassword, NumberField, PasswordField, Phone, Select, Switch, TOTPImage, TOTPLink, Text, TextField, Textarea, Theme, _default$a as apple, _default$2 as discord, _default$9 as facebook, _default$8 as fingerprint, _default$6 as github, _default$5 as gitlab, _default$4 as google, _default$1 as linkedin, _default$3 as microsoft, _default$7 as passkey, _default as sso, generateCssVarsFromTheme as themeToCssVars };
|