idea-react 3.0.0-rc.1 → 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 +20 -21
- package/dist/index.d.ts +20 -21
- package/dist/index.js +13 -13
- package/dist/index.mjs +12 -12
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/source/Base/Button.tsx +1 -1
- package/source/Base/{NativeDialog → Dialog}/index.tsx +11 -11
- package/source/Base/Drawer.tsx +5 -5
- package/source/Base/Placeholder.tsx +8 -22
- package/source/Base/index.ts +1 -1
- package/source/Content/Figure.tsx +1 -1
- package/source/Content/Tables.tsx +21 -7
- 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/Form/Chip.tsx +4 -16
- /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;
|
|
@@ -696,10 +696,6 @@ export interface PlaceholderProps extends ComponentPropsWithRef<'span'> {
|
|
|
696
696
|
width?: CSSProperties['width'];
|
|
697
697
|
}
|
|
698
698
|
export declare const Placeholder: PolymorphicComponent<PlaceholderProps>;
|
|
699
|
-
export interface PlaceholderAnimationProps extends ComponentPropsWithRef<'div'> {
|
|
700
|
-
animation?: PlaceholderProps['animation'];
|
|
701
|
-
}
|
|
702
|
-
export declare const PlaceholderAnimation: PolymorphicComponent<PlaceholderAnimationProps>;
|
|
703
699
|
export type PlaceholderButtonProps = ButtonProps;
|
|
704
700
|
export declare const PlaceholderButton: PolymorphicComponent<ButtonProps>;
|
|
705
701
|
export interface PopoverProps extends Omit<OverlayTriggerProps, 'title'> {
|
|
@@ -722,7 +718,7 @@ declare class ScrollSpyModel {
|
|
|
722
718
|
accessor guides: (Record<'top' | 'left' | 'width' | 'height' | 'line', number> & {
|
|
723
719
|
atBottom: boolean;
|
|
724
720
|
}) | undefined;
|
|
725
|
-
setGuides: (guides: ScrollSpyModel["guides"]) => (Record<"line" | "
|
|
721
|
+
setGuides: (guides: ScrollSpyModel["guides"]) => (Record<"line" | "top" | "width" | "height" | "left", number> & {
|
|
726
722
|
atBottom: boolean;
|
|
727
723
|
}) | undefined;
|
|
728
724
|
setActiveId: (id: string) => string;
|
|
@@ -756,7 +752,7 @@ export declare class ScrollSpy<T extends ElementType | undefined = 'div'> extend
|
|
|
756
752
|
componentWillUnmount(): void;
|
|
757
753
|
refresh: () => void;
|
|
758
754
|
handleResize: () => void;
|
|
759
|
-
handleScroll: () => (Record<"line" | "
|
|
755
|
+
handleScroll: () => (Record<"line" | "top" | "width" | "height" | "left", number> & {
|
|
760
756
|
atBottom: boolean;
|
|
761
757
|
}) | undefined;
|
|
762
758
|
private getRootHeight;
|
|
@@ -921,8 +917,12 @@ export interface TableProps extends ComponentPropsWithRef<'table'> {
|
|
|
921
917
|
hover?: boolean;
|
|
922
918
|
bordered?: boolean;
|
|
923
919
|
borderless?: boolean;
|
|
920
|
+
card?: boolean;
|
|
924
921
|
small?: boolean;
|
|
925
922
|
responsive?: boolean | Breakpoint;
|
|
923
|
+
stacked?: boolean | Breakpoint;
|
|
924
|
+
verticalAlign?: 'baseline' | 'top' | 'middle' | 'bottom' | 'text-top' | 'text-bottom';
|
|
925
|
+
captionTop?: boolean;
|
|
926
926
|
}
|
|
927
927
|
export declare const Table: PolymorphicComponent<TableProps>;
|
|
928
928
|
export type ClickBoundaryProps = PropsWithChildren<{
|
|
@@ -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>>;
|
|
@@ -1251,16 +1251,15 @@ export declare const Checkbox: PolymorphicComponent<Omit<Omit<import("react").De
|
|
|
1251
1251
|
} & {
|
|
1252
1252
|
ref?: Ref<HTMLInputElement>;
|
|
1253
1253
|
}>;
|
|
1254
|
-
export type ChipProps = ComponentPropsWithRef<'
|
|
1254
|
+
export type ChipProps = ComponentPropsWithRef<'span'> & {
|
|
1255
1255
|
active?: boolean;
|
|
1256
1256
|
theme?: ComponentTheme;
|
|
1257
|
+
type?: ComponentPropsWithRef<'button'>['type'];
|
|
1257
1258
|
};
|
|
1258
1259
|
export declare const Chip: PolymorphicComponent<ChipProps>;
|
|
1259
1260
|
export declare const ChipIcon: PolymorphicComponent<IconProps>;
|
|
1260
1261
|
export declare const ChipImage: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>>;
|
|
1261
1262
|
export declare const ChipDismiss: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
|
|
1262
|
-
export type ChipTokenProps = ComponentPropsWithRef<'span'> & Pick<ChipProps, 'active' | 'theme'>;
|
|
1263
|
-
export declare const ChipToken: PolymorphicComponent<ChipTokenProps>;
|
|
1264
1263
|
export type ChipInputProps = ComponentPropsWithoutRef<'div'> & FormValidationProps & {
|
|
1265
1264
|
theme?: ComponentTheme;
|
|
1266
1265
|
separator?: string | null;
|
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;
|
|
@@ -696,10 +696,6 @@ export interface PlaceholderProps extends ComponentPropsWithRef<'span'> {
|
|
|
696
696
|
width?: CSSProperties['width'];
|
|
697
697
|
}
|
|
698
698
|
export declare const Placeholder: PolymorphicComponent<PlaceholderProps>;
|
|
699
|
-
export interface PlaceholderAnimationProps extends ComponentPropsWithRef<'div'> {
|
|
700
|
-
animation?: PlaceholderProps['animation'];
|
|
701
|
-
}
|
|
702
|
-
export declare const PlaceholderAnimation: PolymorphicComponent<PlaceholderAnimationProps>;
|
|
703
699
|
export type PlaceholderButtonProps = ButtonProps;
|
|
704
700
|
export declare const PlaceholderButton: PolymorphicComponent<ButtonProps>;
|
|
705
701
|
export interface PopoverProps extends Omit<OverlayTriggerProps, 'title'> {
|
|
@@ -722,7 +718,7 @@ declare class ScrollSpyModel {
|
|
|
722
718
|
accessor guides: (Record<'top' | 'left' | 'width' | 'height' | 'line', number> & {
|
|
723
719
|
atBottom: boolean;
|
|
724
720
|
}) | undefined;
|
|
725
|
-
setGuides: (guides: ScrollSpyModel["guides"]) => (Record<"line" | "
|
|
721
|
+
setGuides: (guides: ScrollSpyModel["guides"]) => (Record<"line" | "top" | "width" | "height" | "left", number> & {
|
|
726
722
|
atBottom: boolean;
|
|
727
723
|
}) | undefined;
|
|
728
724
|
setActiveId: (id: string) => string;
|
|
@@ -756,7 +752,7 @@ export declare class ScrollSpy<T extends ElementType | undefined = 'div'> extend
|
|
|
756
752
|
componentWillUnmount(): void;
|
|
757
753
|
refresh: () => void;
|
|
758
754
|
handleResize: () => void;
|
|
759
|
-
handleScroll: () => (Record<"line" | "
|
|
755
|
+
handleScroll: () => (Record<"line" | "top" | "width" | "height" | "left", number> & {
|
|
760
756
|
atBottom: boolean;
|
|
761
757
|
}) | undefined;
|
|
762
758
|
private getRootHeight;
|
|
@@ -921,8 +917,12 @@ export interface TableProps extends ComponentPropsWithRef<'table'> {
|
|
|
921
917
|
hover?: boolean;
|
|
922
918
|
bordered?: boolean;
|
|
923
919
|
borderless?: boolean;
|
|
920
|
+
card?: boolean;
|
|
924
921
|
small?: boolean;
|
|
925
922
|
responsive?: boolean | Breakpoint;
|
|
923
|
+
stacked?: boolean | Breakpoint;
|
|
924
|
+
verticalAlign?: 'baseline' | 'top' | 'middle' | 'bottom' | 'text-top' | 'text-bottom';
|
|
925
|
+
captionTop?: boolean;
|
|
926
926
|
}
|
|
927
927
|
export declare const Table: PolymorphicComponent<TableProps>;
|
|
928
928
|
export type ClickBoundaryProps = PropsWithChildren<{
|
|
@@ -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>>;
|
|
@@ -1251,16 +1251,15 @@ export declare const Checkbox: PolymorphicComponent<Omit<Omit<import("react").De
|
|
|
1251
1251
|
} & {
|
|
1252
1252
|
ref?: Ref<HTMLInputElement>;
|
|
1253
1253
|
}>;
|
|
1254
|
-
export type ChipProps = ComponentPropsWithRef<'
|
|
1254
|
+
export type ChipProps = ComponentPropsWithRef<'span'> & {
|
|
1255
1255
|
active?: boolean;
|
|
1256
1256
|
theme?: ComponentTheme;
|
|
1257
|
+
type?: ComponentPropsWithRef<'button'>['type'];
|
|
1257
1258
|
};
|
|
1258
1259
|
export declare const Chip: PolymorphicComponent<ChipProps>;
|
|
1259
1260
|
export declare const ChipIcon: PolymorphicComponent<IconProps>;
|
|
1260
1261
|
export declare const ChipImage: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>>;
|
|
1261
1262
|
export declare const ChipDismiss: PolymorphicComponent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
|
|
1262
|
-
export type ChipTokenProps = ComponentPropsWithRef<'span'> & Pick<ChipProps, 'active' | 'theme'>;
|
|
1263
|
-
export declare const ChipToken: PolymorphicComponent<ChipTokenProps>;
|
|
1264
1263
|
export type ChipInputProps = ComponentPropsWithoutRef<'div'> & FormValidationProps & {
|
|
1265
1264
|
theme?: ComponentTheme;
|
|
1266
1265
|
separator?: string | null;
|