idea-react 3.0.0-rc.2 → 3.0.0-rc.3
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/ReadMe.md +53 -34
- package/dist/index.d.mts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/source/Base/{NativeDialog → Dialog}/index.tsx +11 -11
- package/source/Base/Drawer.tsx +5 -5
- package/source/Base/index.ts +1 -1
- package/source/Content/Figure.tsx +1 -1
- package/source/Content/index.ts +1 -1
- package/source/Extension/Dialog.tsx +5 -5
- package/source/Extension/ShareBox.tsx +1 -1
- package/source/Extension/UserRank/index.tsx +1 -1
- /package/source/Base/{NativeDialog → Dialog}/style.module.css +0 -0
- /package/source/Content/{Images.tsx → Image.tsx} +0 -0
package/ReadMe.md
CHANGED
|
@@ -33,7 +33,7 @@ A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstr
|
|
|
33
33
|
9. [Carousel](source/Base/Carousel)
|
|
34
34
|
10. [Close Button](source/Base/CloseButton.tsx)
|
|
35
35
|
11. [Collapse](source/Base/Collapse.tsx)
|
|
36
|
-
12. [
|
|
36
|
+
12. [Dialog](source/Base/Dialog)
|
|
37
37
|
13. [Drawer](source/Base/Drawer.tsx)
|
|
38
38
|
14. [List Group](source/Base/ListGroup.tsx)
|
|
39
39
|
15. [Menu](source/Base/Menu.tsx)
|
|
@@ -59,7 +59,7 @@ A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstr
|
|
|
59
59
|
|
|
60
60
|
### Content components
|
|
61
61
|
|
|
62
|
-
1. [Images](source/Content/
|
|
62
|
+
1. [Images](source/Content/Image.tsx)
|
|
63
63
|
2. [Tables](source/Content/Tables.tsx)
|
|
64
64
|
|
|
65
65
|
### Form components
|
|
@@ -86,7 +86,7 @@ A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstr
|
|
|
86
86
|
1. [Click Boundary](source/Extension/ClickBoundary.tsx)
|
|
87
87
|
2. [Code Block](source/Extension/CodeBlock.tsx)
|
|
88
88
|
3. [Countdown](source/Extension/Countdown.tsx)
|
|
89
|
-
4. [
|
|
89
|
+
4. [DialogBox](source/Extension/Dialog.tsx)
|
|
90
90
|
5. [Markdown View](source/Extension/MarkdownView.tsx)
|
|
91
91
|
6. [Horizontal Marquee](source/Extension/HorizontalMarquee/)
|
|
92
92
|
7. [Icon](source/Extension/Icon.tsx)
|
|
@@ -125,7 +125,7 @@ Open Map component & model, have been migrated to https://github.com/idea2app/Op
|
|
|
125
125
|
## Usage
|
|
126
126
|
|
|
127
127
|
```sh
|
|
128
|
-
npm install idea-react mobx mobx-react react react-dom react-element-to-jsx-string
|
|
128
|
+
npm install idea-react mobx mobx-react react react-dom react-element-to-jsx-string web-utility
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
For the current alpha release, use `idea-react@next` instead of `idea-react`.
|
|
@@ -191,63 +191,82 @@ Without `as`, the default markup and props stay unchanged. Class component refs
|
|
|
191
191
|
component instance. Behavioral components require compatible root elements; custom roots must forward
|
|
192
192
|
their DOM props and refs. Components that render fragments or multiple roots do not support `as`.
|
|
193
193
|
|
|
194
|
-
###
|
|
194
|
+
### DialogBox model
|
|
195
195
|
|
|
196
196
|
```tsx
|
|
197
197
|
import { formToJSON } from 'web-utility';
|
|
198
|
-
import { Component } from 'react';
|
|
199
|
-
import {
|
|
200
|
-
|
|
198
|
+
import { Component, FormEvent } from 'react';
|
|
199
|
+
import {
|
|
200
|
+
Button,
|
|
201
|
+
Dialog,
|
|
202
|
+
DialogBody,
|
|
203
|
+
DialogBox,
|
|
204
|
+
DialogBoxClose,
|
|
205
|
+
DialogFooter,
|
|
206
|
+
DialogHeader,
|
|
207
|
+
DialogTitle,
|
|
208
|
+
Form,
|
|
209
|
+
FormControl,
|
|
210
|
+
FormField,
|
|
211
|
+
FormLabel
|
|
212
|
+
} from 'idea-react';
|
|
201
213
|
|
|
202
214
|
export class ExamplePage extends Component {
|
|
203
|
-
inputDialog = new
|
|
204
|
-
<
|
|
205
|
-
<
|
|
206
|
-
|
|
215
|
+
inputDialog = new DialogBox<{}, Record<'a' | 'b', number>>(({ defer }) => (
|
|
216
|
+
<Dialog open={!!defer} onClose={() => defer?.reject(new DialogBoxClose())}>
|
|
217
|
+
<DialogHeader>
|
|
218
|
+
<DialogTitle>Dialog</DialogTitle>
|
|
219
|
+
</DialogHeader>
|
|
220
|
+
<DialogBody>
|
|
207
221
|
<Form
|
|
222
|
+
className="d-flex flex-column gap-3"
|
|
208
223
|
id="input-dialog"
|
|
209
|
-
onSubmit={
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
defer?.resolve(formToJSON(event.currentTarget));
|
|
213
|
-
}}
|
|
214
|
-
onReset={() => defer?.reject(new DialogClose())}
|
|
224
|
+
onSubmit={this.handleSubmit}
|
|
225
|
+
onReset={() => defer?.reject(new DialogBoxClose())}
|
|
215
226
|
>
|
|
216
|
-
<
|
|
217
|
-
<
|
|
218
|
-
<
|
|
219
|
-
</
|
|
220
|
-
<
|
|
221
|
-
<
|
|
222
|
-
<
|
|
223
|
-
</
|
|
227
|
+
<FormField>
|
|
228
|
+
<FormLabel htmlFor="input-dialog-a">A</FormLabel>
|
|
229
|
+
<FormControl id="input-dialog-a" type="number" name="a" />
|
|
230
|
+
</FormField>
|
|
231
|
+
<FormField>
|
|
232
|
+
<FormLabel htmlFor="input-dialog-b">B</FormLabel>
|
|
233
|
+
<FormControl id="input-dialog-b" type="number" name="b" />
|
|
234
|
+
</FormField>
|
|
224
235
|
</Form>
|
|
225
|
-
</
|
|
226
|
-
<
|
|
227
|
-
<Button form="input-dialog" type="submit">
|
|
236
|
+
</DialogBody>
|
|
237
|
+
<DialogFooter>
|
|
238
|
+
<Button form="input-dialog" type="submit" variant="solid" theme="primary">
|
|
228
239
|
√
|
|
229
240
|
</Button>
|
|
230
|
-
<Button form="input-dialog" type="reset" variant="danger">
|
|
241
|
+
<Button form="input-dialog" type="reset" variant="solid" theme="danger">
|
|
231
242
|
×
|
|
232
243
|
</Button>
|
|
233
|
-
</
|
|
234
|
-
</
|
|
244
|
+
</DialogFooter>
|
|
245
|
+
</Dialog>
|
|
235
246
|
));
|
|
236
247
|
|
|
248
|
+
handleSubmit = (event: FormEvent<HTMLFormElement>) => {
|
|
249
|
+
event.preventDefault();
|
|
250
|
+
|
|
251
|
+
const data = formToJSON<Record<'a' | 'b', number>>(event.currentTarget);
|
|
252
|
+
|
|
253
|
+
this.inputDialog.defer?.resolve(data);
|
|
254
|
+
};
|
|
255
|
+
|
|
237
256
|
someLogic = async () => {
|
|
238
257
|
try {
|
|
239
258
|
const data = await this.inputDialog.open();
|
|
240
259
|
|
|
241
260
|
alert(JSON.stringify(data, null, 4));
|
|
242
261
|
} catch (error) {
|
|
243
|
-
if (error instanceof
|
|
262
|
+
if (error instanceof DialogBoxClose) console.warn(error.message);
|
|
244
263
|
}
|
|
245
264
|
};
|
|
246
265
|
|
|
247
266
|
render() {
|
|
248
267
|
return (
|
|
249
268
|
<>
|
|
250
|
-
<Button onClick={this.someLogic}>
|
|
269
|
+
<Button onClick={this.someLogic}>Open dialog</Button>
|
|
251
270
|
|
|
252
271
|
<this.inputDialog.Component />
|
|
253
272
|
</>
|
package/dist/index.d.mts
CHANGED
|
@@ -354,7 +354,7 @@ export interface ColBreakpointOptions {
|
|
|
354
354
|
}
|
|
355
355
|
export type ColBreakpoint = BreakpointColSize | ColBreakpointOptions;
|
|
356
356
|
export declare const Col: PolymorphicComponent<ColProps>;
|
|
357
|
-
export interface
|
|
357
|
+
export interface DialogProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, 'open'> {
|
|
358
358
|
modal?: boolean;
|
|
359
359
|
dialog?: boolean;
|
|
360
360
|
theme?: 'light' | 'dark';
|
|
@@ -371,10 +371,10 @@ export declare const DialogHeader: PolymorphicComponent<import("react").Detailed
|
|
|
371
371
|
export declare const DialogTitle: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
372
372
|
export declare const DialogBody: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
373
373
|
export declare const DialogFooter: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
374
|
-
export declare class
|
|
375
|
-
readonly props: PolymorphicClassProps<T,
|
|
376
|
-
protected get componentProps(): Readonly<
|
|
377
|
-
static scrollLocks: Set<
|
|
374
|
+
export declare class Dialog<T extends ElementType | undefined = 'dialog'> extends Component<PolymorphicClassProps<T, DialogProps>> {
|
|
375
|
+
readonly props: PolymorphicClassProps<T, DialogProps>;
|
|
376
|
+
protected get componentProps(): Readonly<DialogProps & AsProps>;
|
|
377
|
+
static scrollLocks: Set<Dialog<ElementType>>;
|
|
378
378
|
static bodyOverflow: string;
|
|
379
379
|
element: import("react").RefObject<HTMLDialogElement | null>;
|
|
380
380
|
returnFocus?: HTMLElement;
|
|
@@ -382,7 +382,7 @@ export declare class NativeDialog<T extends ElementType | undefined = 'dialog'>
|
|
|
382
382
|
closeTimer?: ReturnType<typeof setTimeout>;
|
|
383
383
|
get open(): boolean;
|
|
384
384
|
componentDidMount(): void;
|
|
385
|
-
componentDidUpdate({ open, modal, scroll }:
|
|
385
|
+
componentDidUpdate({ open, modal, scroll }: DialogProps): void;
|
|
386
386
|
show: () => void;
|
|
387
387
|
lockScroll: () => void;
|
|
388
388
|
unlockScroll: () => void;
|
|
@@ -400,7 +400,7 @@ export declare const DrawerHeader: PolymorphicComponent<import("react").Detailed
|
|
|
400
400
|
export declare const DrawerTitle: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
401
401
|
export declare const DrawerBody: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
402
402
|
export declare const DrawerFooter: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
403
|
-
export interface DrawerProps extends Omit<
|
|
403
|
+
export interface DrawerProps extends Omit<DialogProps, 'dialog' | 'onClose' | 'title' | 'animation' | 'fullscreen'> {
|
|
404
404
|
title?: ReactNode;
|
|
405
405
|
placement?: DrawerPlacement;
|
|
406
406
|
footer?: ReactNode;
|
|
@@ -417,7 +417,7 @@ export declare class Drawer<T extends ElementType | undefined = 'dialog'> extend
|
|
|
417
417
|
protected get componentProps(): Readonly<DrawerProps & AsProps>;
|
|
418
418
|
static displayName: string;
|
|
419
419
|
accessor expanded: boolean;
|
|
420
|
-
dialog: import("react").RefObject<
|
|
420
|
+
dialog: import("react").RefObject<Dialog<ElementType> | null>;
|
|
421
421
|
media?: MediaQueryList;
|
|
422
422
|
dismissed: boolean;
|
|
423
423
|
componentDidMount(): void;
|
|
@@ -718,7 +718,7 @@ declare class ScrollSpyModel {
|
|
|
718
718
|
accessor guides: (Record<'top' | 'left' | 'width' | 'height' | 'line', number> & {
|
|
719
719
|
atBottom: boolean;
|
|
720
720
|
}) | undefined;
|
|
721
|
-
setGuides: (guides: ScrollSpyModel["guides"]) => (Record<"line" | "
|
|
721
|
+
setGuides: (guides: ScrollSpyModel["guides"]) => (Record<"line" | "top" | "width" | "height" | "left", number> & {
|
|
722
722
|
atBottom: boolean;
|
|
723
723
|
}) | undefined;
|
|
724
724
|
setActiveId: (id: string) => string;
|
|
@@ -752,7 +752,7 @@ export declare class ScrollSpy<T extends ElementType | undefined = 'div'> extend
|
|
|
752
752
|
componentWillUnmount(): void;
|
|
753
753
|
refresh: () => void;
|
|
754
754
|
handleResize: () => void;
|
|
755
|
-
handleScroll: () => (Record<"line" | "
|
|
755
|
+
handleScroll: () => (Record<"line" | "top" | "width" | "height" | "left", number> & {
|
|
756
756
|
atBottom: boolean;
|
|
757
757
|
}) | undefined;
|
|
758
758
|
private getRootHeight;
|
|
@@ -975,17 +975,17 @@ export declare class Countdown<T extends ElementType | undefined = 'ol'> extends
|
|
|
975
975
|
componentWillUnmount(): void;
|
|
976
976
|
render(): import("react").JSX.Element;
|
|
977
977
|
}
|
|
978
|
-
export declare class
|
|
978
|
+
export declare class DialogBoxClose extends Error {
|
|
979
979
|
constructor(message?: string);
|
|
980
980
|
}
|
|
981
|
-
export interface
|
|
981
|
+
export interface DialogBoxProps<T = unknown> {
|
|
982
982
|
defer?: Defer<T>;
|
|
983
983
|
}
|
|
984
|
-
export declare class
|
|
984
|
+
export declare class DialogBox<I extends object = {}, O = unknown> {
|
|
985
985
|
accessor input: I;
|
|
986
986
|
accessor defer: Defer<O> | undefined;
|
|
987
987
|
Component: FC<I>;
|
|
988
|
-
constructor(Factory: FC<I &
|
|
988
|
+
constructor(Factory: FC<I & DialogBoxProps<O>>);
|
|
989
989
|
open(input?: I): Promise<O>;
|
|
990
990
|
}
|
|
991
991
|
export type HorizontalMarqueeProps = HTMLAttributes<HTMLDivElement> & Partial<Record<'maxWidth' | 'duration' | 'height', string>>;
|
|
@@ -1440,7 +1440,7 @@ export type OTPInputProps = Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'ma
|
|
|
1440
1440
|
onComplete?: (value: string) => unknown;
|
|
1441
1441
|
onValueChange?: (value: string) => unknown;
|
|
1442
1442
|
};
|
|
1443
|
-
export declare const OTPInput: PolymorphicComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "
|
|
1443
|
+
export declare const OTPInput: PolymorphicComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "type" | "maxLength"> & FormValidationProps & {
|
|
1444
1444
|
length: number;
|
|
1445
1445
|
type?: "numeric" | "alphanumeric" | "alpha";
|
|
1446
1446
|
mask?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -354,7 +354,7 @@ export interface ColBreakpointOptions {
|
|
|
354
354
|
}
|
|
355
355
|
export type ColBreakpoint = BreakpointColSize | ColBreakpointOptions;
|
|
356
356
|
export declare const Col: PolymorphicComponent<ColProps>;
|
|
357
|
-
export interface
|
|
357
|
+
export interface DialogProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, 'open'> {
|
|
358
358
|
modal?: boolean;
|
|
359
359
|
dialog?: boolean;
|
|
360
360
|
theme?: 'light' | 'dark';
|
|
@@ -371,10 +371,10 @@ export declare const DialogHeader: PolymorphicComponent<import("react").Detailed
|
|
|
371
371
|
export declare const DialogTitle: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
372
372
|
export declare const DialogBody: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
373
373
|
export declare const DialogFooter: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
374
|
-
export declare class
|
|
375
|
-
readonly props: PolymorphicClassProps<T,
|
|
376
|
-
protected get componentProps(): Readonly<
|
|
377
|
-
static scrollLocks: Set<
|
|
374
|
+
export declare class Dialog<T extends ElementType | undefined = 'dialog'> extends Component<PolymorphicClassProps<T, DialogProps>> {
|
|
375
|
+
readonly props: PolymorphicClassProps<T, DialogProps>;
|
|
376
|
+
protected get componentProps(): Readonly<DialogProps & AsProps>;
|
|
377
|
+
static scrollLocks: Set<Dialog<ElementType>>;
|
|
378
378
|
static bodyOverflow: string;
|
|
379
379
|
element: import("react").RefObject<HTMLDialogElement | null>;
|
|
380
380
|
returnFocus?: HTMLElement;
|
|
@@ -382,7 +382,7 @@ export declare class NativeDialog<T extends ElementType | undefined = 'dialog'>
|
|
|
382
382
|
closeTimer?: ReturnType<typeof setTimeout>;
|
|
383
383
|
get open(): boolean;
|
|
384
384
|
componentDidMount(): void;
|
|
385
|
-
componentDidUpdate({ open, modal, scroll }:
|
|
385
|
+
componentDidUpdate({ open, modal, scroll }: DialogProps): void;
|
|
386
386
|
show: () => void;
|
|
387
387
|
lockScroll: () => void;
|
|
388
388
|
unlockScroll: () => void;
|
|
@@ -400,7 +400,7 @@ export declare const DrawerHeader: PolymorphicComponent<import("react").Detailed
|
|
|
400
400
|
export declare const DrawerTitle: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
401
401
|
export declare const DrawerBody: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
402
402
|
export declare const DrawerFooter: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
403
|
-
export interface DrawerProps extends Omit<
|
|
403
|
+
export interface DrawerProps extends Omit<DialogProps, 'dialog' | 'onClose' | 'title' | 'animation' | 'fullscreen'> {
|
|
404
404
|
title?: ReactNode;
|
|
405
405
|
placement?: DrawerPlacement;
|
|
406
406
|
footer?: ReactNode;
|
|
@@ -417,7 +417,7 @@ export declare class Drawer<T extends ElementType | undefined = 'dialog'> extend
|
|
|
417
417
|
protected get componentProps(): Readonly<DrawerProps & AsProps>;
|
|
418
418
|
static displayName: string;
|
|
419
419
|
accessor expanded: boolean;
|
|
420
|
-
dialog: import("react").RefObject<
|
|
420
|
+
dialog: import("react").RefObject<Dialog<ElementType> | null>;
|
|
421
421
|
media?: MediaQueryList;
|
|
422
422
|
dismissed: boolean;
|
|
423
423
|
componentDidMount(): void;
|
|
@@ -718,7 +718,7 @@ declare class ScrollSpyModel {
|
|
|
718
718
|
accessor guides: (Record<'top' | 'left' | 'width' | 'height' | 'line', number> & {
|
|
719
719
|
atBottom: boolean;
|
|
720
720
|
}) | undefined;
|
|
721
|
-
setGuides: (guides: ScrollSpyModel["guides"]) => (Record<"line" | "
|
|
721
|
+
setGuides: (guides: ScrollSpyModel["guides"]) => (Record<"line" | "top" | "width" | "height" | "left", number> & {
|
|
722
722
|
atBottom: boolean;
|
|
723
723
|
}) | undefined;
|
|
724
724
|
setActiveId: (id: string) => string;
|
|
@@ -752,7 +752,7 @@ export declare class ScrollSpy<T extends ElementType | undefined = 'div'> extend
|
|
|
752
752
|
componentWillUnmount(): void;
|
|
753
753
|
refresh: () => void;
|
|
754
754
|
handleResize: () => void;
|
|
755
|
-
handleScroll: () => (Record<"line" | "
|
|
755
|
+
handleScroll: () => (Record<"line" | "top" | "width" | "height" | "left", number> & {
|
|
756
756
|
atBottom: boolean;
|
|
757
757
|
}) | undefined;
|
|
758
758
|
private getRootHeight;
|
|
@@ -975,17 +975,17 @@ export declare class Countdown<T extends ElementType | undefined = 'ol'> extends
|
|
|
975
975
|
componentWillUnmount(): void;
|
|
976
976
|
render(): import("react").JSX.Element;
|
|
977
977
|
}
|
|
978
|
-
export declare class
|
|
978
|
+
export declare class DialogBoxClose extends Error {
|
|
979
979
|
constructor(message?: string);
|
|
980
980
|
}
|
|
981
|
-
export interface
|
|
981
|
+
export interface DialogBoxProps<T = unknown> {
|
|
982
982
|
defer?: Defer<T>;
|
|
983
983
|
}
|
|
984
|
-
export declare class
|
|
984
|
+
export declare class DialogBox<I extends object = {}, O = unknown> {
|
|
985
985
|
accessor input: I;
|
|
986
986
|
accessor defer: Defer<O> | undefined;
|
|
987
987
|
Component: FC<I>;
|
|
988
|
-
constructor(Factory: FC<I &
|
|
988
|
+
constructor(Factory: FC<I & DialogBoxProps<O>>);
|
|
989
989
|
open(input?: I): Promise<O>;
|
|
990
990
|
}
|
|
991
991
|
export type HorizontalMarqueeProps = HTMLAttributes<HTMLDivElement> & Partial<Record<'maxWidth' | 'duration' | 'height', string>>;
|
|
@@ -1440,7 +1440,7 @@ export type OTPInputProps = Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'ma
|
|
|
1440
1440
|
onComplete?: (value: string) => unknown;
|
|
1441
1441
|
onValueChange?: (value: string) => unknown;
|
|
1442
1442
|
};
|
|
1443
|
-
export declare const OTPInput: PolymorphicComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "
|
|
1443
|
+
export declare const OTPInput: PolymorphicComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "type" | "maxLength"> & FormValidationProps & {
|
|
1444
1444
|
length: number;
|
|
1445
1445
|
type?: "numeric" | "alphanumeric" | "alpha";
|
|
1446
1446
|
mask?: boolean;
|