enwawa-ui 1.1.0 → 1.2.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.
package/lib/index.d.ts ADDED
@@ -0,0 +1,3702 @@
1
+ import React, { CSSProperties, ReactNode, ChangeEvent, JSXElementConstructor, ReactElement } from "react";
2
+ import { ButtonShape, ButtonSize, ButtonType } from "antd/es/button";
3
+ import { CheckboxProps, CountdownProps, DatePickerProps, ImageProps, InputNumberProps, SelectProps, BreadcrumbProps, DropdownProps, MenuProps, ColProps, PaginationProps, RadioChangeEvent as _RadioChangeEvent1, TooltipProps, AlertProps, RowProps, LayoutProps, SiderProps, FormProps, ModalFuncProps, ModalProps, StepsProps, SpaceProps, TableProps } from "antd";
4
+ import { Dayjs } from "dayjs";
5
+ import { IconComponentProps } from "@ant-design/icons/lib/components/Icon";
6
+ import * as Icons from "@ant-design/icons";
7
+ import { ValueType } from "@rc-component/mini-decimal";
8
+ import { RadioChangeEvent } from "antd/es/radio";
9
+ import { DefaultOptionType, LabeledValue } from "antd/es/select";
10
+ import { BlockProps, EllipsisConfig, BaseType } from "antd/es/typography/Base";
11
+ import { CardTabListType } from "antd/es/card";
12
+ import { CardType } from "antd/es/card/Card";
13
+ import { TabsProps } from "antd/es/tabs";
14
+ import { DotPosition } from "antd/es/carousel";
15
+ import { CheckboxGroupProps } from "antd/es/checkbox/Group";
16
+ import { NamePath, Store, StoreValue } from "antd/es/form/interface";
17
+ import { Rule } from "antd/es/form";
18
+ import { LabelTooltipType } from "antd/es/form/FormItemLabel";
19
+ import { Gutter } from "antd/es/grid/row";
20
+ import { DrawerProps } from "antd/es/drawer";
21
+ import { CheckboxChangeEvent } from "antd/es/checkbox";
22
+ import { AnyObject } from "antd/es/_util/type";
23
+ export interface AtAvatarProps {
24
+ /**
25
+ * This attribute defines the alternative text describing the image
26
+ */
27
+ alt?: string;
28
+ /**
29
+ * Letter type unit distance between left and right sides
30
+ */
31
+ gap?: number;
32
+ /**
33
+ * Custom icon type for an icon avatar
34
+ */
35
+ icon?: React.ReactNode;
36
+ /**
37
+ * The shape of avatar
38
+ */
39
+ shape?: 'circle' | 'square';
40
+ /**
41
+ * The size of the avatar
42
+ */
43
+ size?: 'large' | 'small' | 'default' | number;
44
+ /**
45
+ * The address of the image for an image avatar or image element
46
+ */
47
+ src?: string;
48
+ /**
49
+ * Whether the picture is allowed to be dragged
50
+ */
51
+ draggable?: boolean;
52
+ /**
53
+ * CORS settings attributes
54
+ */
55
+ crossOrigin?: 'anonymous' | 'use-credentials';
56
+ }
57
+ export const AtAvatar: React.FC<AtAvatarProps>;
58
+ export interface AtButtonProps {
59
+ /**
60
+ * The ID for input
61
+ */
62
+ id?: string;
63
+ /**
64
+ * The button content value
65
+ */
66
+ value?: string;
67
+ /**
68
+ * Hide button borders
69
+ */
70
+ borderless?: boolean;
71
+ /**
72
+ *Option to fit button width to its parent width
73
+ */
74
+ block?: boolean;
75
+ /**
76
+ *Set the danger status of button
77
+ */
78
+ danger?: boolean;
79
+ /**
80
+ * Disabled state of button
81
+ */
82
+ disabled?: boolean;
83
+ /**
84
+ * Set the original html type of button, see: MDN
85
+ */
86
+ htmlType?: string;
87
+ /**
88
+ * Set the icon component of button
89
+ */
90
+ icon?: React.ReactNode;
91
+ /**
92
+ * Set the loading status of button
93
+ */
94
+ loading?: boolean;
95
+ /**
96
+ * Can be set button
97
+ */
98
+ shape?: ButtonShape;
99
+ /**
100
+ * Set the size of button
101
+ */
102
+ size?: ButtonSize;
103
+ /**
104
+ * Can be set to primary ghost dashed link text
105
+ */
106
+ type?: ButtonType;
107
+ /**
108
+ * Set the handler to handle click
109
+ */
110
+ onClick?: React.MouseEventHandler<HTMLAnchorElement> & React.MouseEventHandler<HTMLButtonElement>;
111
+ /**
112
+ * Expand button full container width
113
+ */
114
+ $fullWidth?: boolean;
115
+ /**
116
+ * set button in ghost mode
117
+ */
118
+ ghost?: boolean;
119
+ /**
120
+ * Set the button width
121
+ */
122
+ $width?: string | number;
123
+ }
124
+ export const AtButton: React.FC<AtButtonProps>;
125
+ export interface AtCheckboxProps extends CheckboxProps {
126
+ /**
127
+ * Specifies whether the checkbox is selected
128
+ */
129
+ checked?: boolean;
130
+ /**
131
+ * Specifies the initial state: whether or not the checkbox is selected
132
+ */
133
+ defaultChecked?: boolean;
134
+ /**
135
+ * If disable checkbox
136
+ */
137
+ disabled?: boolean;
138
+ /**
139
+ * The indeterminate checked state of checkbox
140
+ */
141
+ indeterminate?: boolean;
142
+ /**
143
+ * The callback function that is triggered when the state changes
144
+ */
145
+ onChange?: CheckboxProps['onChange'];
146
+ /**
147
+ * children of checkbox
148
+ */
149
+ children?: React.ReactNode;
150
+ }
151
+ export const AtCheckbox: React.FC<AtCheckboxProps>;
152
+ interface Props {
153
+ children: React.ReactNode;
154
+ }
155
+ export const violet: string[];
156
+ export const gray: string[];
157
+ export const WaWaThemeProvider: React.FC<Props>;
158
+ export interface AtCountdownProps {
159
+ /**
160
+ * Format as dayjs string
161
+ */
162
+ format?: string;
163
+ /**
164
+ * The prefix node of value
165
+ */
166
+ prefix?: React.ReactNode;
167
+ /**
168
+ * The suffix node of value
169
+ */
170
+ suffix?: React.ReactNode;
171
+ /**
172
+ * The suffix node of value
173
+ */
174
+ title?: React.ReactNode;
175
+ /**
176
+ * Set target countdown time number
177
+ */
178
+ value?: CountdownProps['value'];
179
+ /**
180
+ * Set value section style CSSProperties
181
+ */
182
+ valueStyle?: React.CSSProperties;
183
+ /**
184
+ * Trigger when time's up
185
+ */
186
+ onFinish?: () => void;
187
+ /**
188
+ * Trigger when time's changing
189
+ */
190
+ onChange?: (value: CountdownProps['value']) => void;
191
+ /**
192
+ * Font color
193
+ */
194
+ $color?: 'normal' | 'primary';
195
+ /**
196
+ * Font size
197
+ */
198
+ $fontSize?: number;
199
+ }
200
+ export const AtCountdown: React.FC<AtCountdownProps>;
201
+ export interface AtDatePickerPros {
202
+ /**
203
+ * If true, the date picker will be disabled
204
+ */
205
+ disabled?: boolean;
206
+ /**
207
+ * Whether to show clear button
208
+ */
209
+ allowClear?: boolean;
210
+ /**
211
+ * If get focus when component mounted
212
+ */
213
+ autoFocus?: boolean;
214
+ /**
215
+ * Whether has border style
216
+ */
217
+ bordered?: boolean;
218
+ /**
219
+ * Trigger change when blur. e.g. datetime picker no need click confirm button
220
+ */
221
+ changeOnBlur?: boolean;
222
+ /**
223
+ * Specify the date that cannot be selected
224
+ */
225
+ disabledDate?: (currentDate: Dayjs) => boolean;
226
+ /**
227
+ * To set the date format, support multi-format matching when it is an array, display the first one shall prevail. refer to dayjs#format. for example: Custom Format
228
+ */
229
+ format?: string | string[];
230
+ /**
231
+ * Set the readonly attribute of the input tag (avoids virtual keyboard on touch devices)
232
+ */
233
+ inputReadOnly?: boolean;
234
+ /**
235
+ * Localization configuration
236
+ */
237
+ locale?: DatePickerProps['locale'];
238
+ /**
239
+ * The picker panel mode( Cannot select year or month anymore? )
240
+ */
241
+ mode?: 'time' | 'date' | 'month' | 'year' | 'decade';
242
+ /**
243
+ * The open state of picker
244
+ */
245
+ open?: boolean;
246
+ /**
247
+ * Set picker type
248
+ */
249
+ picker?: DatePickerProps['picker'];
250
+ /**
251
+ * Placeholder of the input
252
+ */
253
+ placeholder?: string;
254
+ /**
255
+ * The position where the selection box pops up
256
+ */
257
+ placement?: DatePickerProps['placement'];
258
+ /**
259
+ * The preset ranges for quick selection
260
+ */
261
+ presents?: DatePickerProps['presets'];
262
+ /**
263
+ * Show time on date
264
+ */
265
+ showTime?: boolean;
266
+ /**
267
+ * To determine the size of the input box, the height of large and small, are 40px and 24px respectively, while default size is 32px
268
+ */
269
+ size?: DatePickerProps['size'];
270
+ /**
271
+ * Set validation status
272
+ */
273
+ status?: DatePickerProps['status'];
274
+ /**
275
+ * Callback function, can be executed whether the popup calendar is popped up or closed
276
+ */
277
+ onOpenChange?: (status: boolean) => void;
278
+ /**
279
+ * Callback when picker panel mode is changed
280
+ */
281
+ onPanelChange?: (value: Dayjs | null, mode: DatePickerProps['mode']) => void;
282
+ /**
283
+ * set format on 12h
284
+ */
285
+ use12Hours?: boolean;
286
+ /**
287
+ * The computed style of the svg element
288
+ */
289
+ style?: CSSProperties;
290
+ /**
291
+ * width of the input box
292
+ */
293
+ $width?: string;
294
+ }
295
+ export const AtDatePicker: React.FC<AtDatePickerPros>;
296
+ export interface AtDividerProps {
297
+ /**
298
+ * The ID for input
299
+ */
300
+ id?: string;
301
+ /**
302
+ * The wrapped title
303
+ */
304
+ children?: ReactNode;
305
+ /**
306
+ * Whether line is dashed
307
+ */
308
+ dashed?: boolean;
309
+ /**
310
+ * The position of title inside divider
311
+ */
312
+ orientation?: 'left' | 'right' | 'center';
313
+ /**
314
+ * The margin-left/right between the title and its closest border, while the orientation must be left or right, If a numeric value of type string is provided without a unit, it is assumed to be in pixels (px) by default.
315
+ */
316
+ orientationMargin?: string | number;
317
+ /**
318
+ * Divider text show as plain style
319
+ */
320
+ plain?: boolean;
321
+ /**
322
+ * The direction type of divider
323
+ */
324
+ type?: 'horizontal' | 'vertical';
325
+ /**
326
+ * margin of the divider
327
+ */
328
+ $margin?: number;
329
+ }
330
+ export const AtDivider: React.FC<AtDividerProps>;
331
+ export interface AtIconProps {
332
+ /**
333
+ * The ID for input
334
+ */
335
+ id?: string;
336
+ /**
337
+ * Name of the icon
338
+ */
339
+ name?: keyof typeof Icons;
340
+ /**
341
+ * Define the color used to paint the svg element
342
+ */
343
+ fill?: string;
344
+ /**
345
+ * The computed style of the svg element
346
+ */
347
+ style?: CSSProperties;
348
+ /**
349
+ * The height of the svg element
350
+ */
351
+ height?: string | number;
352
+ /**
353
+ * The width of the svg element
354
+ */
355
+ width?: string | number;
356
+ /**
357
+ * Define extra properties to the component
358
+ */
359
+ extraCommonProps?: {
360
+ [key: string]: any;
361
+ };
362
+ /**
363
+ * The URL generated by iconfont.cn project. Support string[] after @ant-design/icons@4.1.0
364
+ */
365
+ scriptUrl?: string | string[];
366
+ /**
367
+ * The component used for the root node
368
+ */
369
+ component?: IconComponentProps['component'];
370
+ /**
371
+ * Rotate degrees (not working in IE9)
372
+ */
373
+ rotate?: number;
374
+ /**
375
+ * Rotate icon with animation
376
+ */
377
+ spin?: boolean;
378
+ /**
379
+ * Color of the icon
380
+ */
381
+ twoToneColor?: string;
382
+ }
383
+ export const AtIcon: React.FC<AtIconProps>;
384
+ export interface AtImageProps {
385
+ /**
386
+ * Image description
387
+ */
388
+ alt?: string;
389
+ /**
390
+ * Load failure fault-tolerant src
391
+ */
392
+ fallback?: string;
393
+ /**
394
+ * Image height
395
+ */
396
+ height?: string | number;
397
+ /**
398
+ * Image path
399
+ */
400
+ src?: string;
401
+ /**
402
+ * Image width
403
+ */
404
+ width?: string | number;
405
+ /**
406
+ * Load failed callback
407
+ */
408
+ onError?: ImageProps['onError'];
409
+ /**
410
+ * Load placeholder, use default placeholder when set true
411
+ */
412
+ placeholder?: ImageProps['placeholder'];
413
+ /**
414
+ * preview config, disabled when false
415
+ */
416
+ preview?: ImageProps['preview'];
417
+ }
418
+ export const AtImage: React.FC<AtImageProps>;
419
+ export interface AtLogoProps {
420
+ width?: number;
421
+ height?: number;
422
+ color?: 'violet' | 'gold' | 'white';
423
+ type?: 'logo' | 'isotype';
424
+ }
425
+ export const AtLogo: React.FC<AtLogoProps>;
426
+ export interface AtNumberInputProps {
427
+ /**
428
+ * The ID for input
429
+ */
430
+ id?: string;
431
+ /**
432
+ * The label text displayed after (on the right side of) the input field
433
+ */
434
+ addonAfter?: ReactNode;
435
+ /**
436
+ * The label text displayed before (on the left side of) the input field
437
+ */
438
+ addonBefore?: ReactNode;
439
+ /**
440
+ * If get focus when component mounted
441
+ */
442
+ autoFocus?: boolean;
443
+ /**
444
+ * Whether has border style
445
+ */
446
+ bordered?: boolean;
447
+ /**
448
+ * Whether to show +- controls, or set custom arrows icon
449
+ */
450
+ controls?: boolean | {
451
+ upIcon?: React.ReactNode;
452
+ downIcon?: React.ReactNode;
453
+ };
454
+ /**
455
+ * Decimal separator
456
+ */
457
+ decimalSeparator?: string;
458
+ /**
459
+ * The initial value
460
+ */
461
+ defaultValue?: number;
462
+ /**
463
+ * If disable the input
464
+ */
465
+ disabled?: boolean;
466
+ /**
467
+ * Specifies the format of the value presented
468
+ */
469
+ formatter?: (value: number | undefined, info: {
470
+ userTyping: boolean;
471
+ input: string;
472
+ }) => string;
473
+ /**
474
+ * If enable keyboard behavior
475
+ */
476
+ keyboard?: boolean;
477
+ /**
478
+ * The max value
479
+ */
480
+ max?: number;
481
+ /**
482
+ * The min value
483
+ */
484
+ min?: number;
485
+ /**
486
+ * Specifies the value extracted from formatter
487
+ */
488
+ parser?: (displayValue: string | undefined) => number;
489
+ /**
490
+ * The precision of input value. Will use formatter when config of formatter
491
+ */
492
+ precision?: number;
493
+ /**
494
+ * If readonly the input
495
+ */
496
+ readOnly?: boolean;
497
+ /**
498
+ * Set validation status
499
+ */
500
+ status?: 'error' | 'warning';
501
+ /**
502
+ * The prefix icon for the Input
503
+ */
504
+ prefix?: ReactNode;
505
+ /**
506
+ * The height of input box
507
+ */
508
+ size?: 'large' | 'middle' | 'small';
509
+ /**
510
+ * The number to which the current value is increased or decreased. It can be an integer or decimal
511
+ */
512
+ step?: number | string;
513
+ /**
514
+ * Set value as string to support high precision decimals. Will return string value by onChange
515
+ */
516
+ stringMode?: boolean;
517
+ /**
518
+ * The current value
519
+ */
520
+ value?: number;
521
+ /**
522
+ * The callback triggered when the value is changed
523
+ */
524
+ onChange?: (value: number | string | null) => void;
525
+ /**
526
+ * The callback function that is triggered when Enter key is pressed
527
+ */
528
+ onPressEnter?: (e: ChangeEvent<EventTarget>) => void;
529
+ /**
530
+ * The callback function that is triggered when click up or down buttons
531
+ */
532
+ onStep?: (value: number, info: {
533
+ offset: ValueType;
534
+ type: 'up' | 'down';
535
+ }) => void;
536
+ /**
537
+ * Element width
538
+ */
539
+ $width?: string;
540
+ /**
541
+ * Element height
542
+ */
543
+ $height?: string;
544
+ /**
545
+ * Text align
546
+ */
547
+ $textAlign?: 'left' | 'center' | 'right';
548
+ /**
549
+ * Font size
550
+ */
551
+ $fontSize?: string;
552
+ /**
553
+ * on Input
554
+ */
555
+ onInput?: InputNumberProps['onInput'];
556
+ /**
557
+ * max length
558
+ */
559
+ maxLength?: number;
560
+ /**
561
+ * key down
562
+ */
563
+ onKeyDown?: InputNumberProps['onKeyDown'];
564
+ /**
565
+ * On focus
566
+ */
567
+ onFocus?: InputNumberProps['onFocus'];
568
+ /**
569
+ * placeholder
570
+ */
571
+ placeholder?: string;
572
+ }
573
+ /**
574
+ * Primary input UI component for user interaction
575
+ */
576
+ export const AtNumberInput: React.FC<AtNumberInputProps>;
577
+ export interface AtTextInputProps {
578
+ /**
579
+ * The label text displayed after (on the right side of) the input field
580
+ */
581
+ addonAfter?: ReactNode;
582
+ /**
583
+ * The label text displayed before (on the left side of) the input field
584
+ */
585
+ addonBefore?: ReactNode;
586
+ /**
587
+ * If allow to remove input content with clear icon
588
+ */
589
+ allowClear?: boolean | {
590
+ clearIcon?: ReactNode;
591
+ };
592
+ /**
593
+ * Whether has border style
594
+ */
595
+ bordered?: boolean;
596
+ /**
597
+ * The initial input content
598
+ */
599
+ defaultValue?: string;
600
+ /**
601
+ * Whether the input is disabled
602
+ */
603
+ disabled?: boolean;
604
+ /**
605
+ * The ID for input
606
+ */
607
+ id?: string;
608
+ /**
609
+ * The maximum number of characters in Input
610
+ */
611
+ maxLength?: number;
612
+ /**
613
+ * Set validation status
614
+ */
615
+ status?: 'error' | 'warning' | undefined;
616
+ /**
617
+ * Whether to show character count
618
+ */
619
+ showCount?: boolean;
620
+ /**
621
+ * Placeholder text to display into the input
622
+ */
623
+ placeholder?: string;
624
+ /**
625
+ * The prefix icon for the Input
626
+ */
627
+ prefix?: ReactNode;
628
+ /**
629
+ * The size of the input box. Note: in the context of a form, the middle size is used
630
+ */
631
+ size?: 'large' | 'middle' | 'small';
632
+ /**
633
+ * The suffix icon for the Input
634
+ */
635
+ suffix?: ReactNode;
636
+ /**
637
+ * The input content value
638
+ */
639
+ value?: string;
640
+ /**
641
+ * Callback when user input
642
+ */
643
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
644
+ }
645
+ /**
646
+ * Primary input UI component for user interaction
647
+ */
648
+ export const AtTextInput: React.FC<AtTextInputProps>;
649
+ type AtPasswordInputProp = AtTextInputProps & {
650
+ iconRender?: (visible: boolean) => React.ReactNode;
651
+ };
652
+ export const AtPasswordInput: React.FC<AtPasswordInputProp>;
653
+ export interface AtRadioProps {
654
+ /**
655
+ * The ID for input
656
+ */
657
+ id?: string;
658
+ /**
659
+ * Specifies whether the radio is selected
660
+ */
661
+ checked?: boolean;
662
+ /**
663
+ * Specifies the initial state: whether or not the radio is selected
664
+ */
665
+ defaultChecked?: boolean;
666
+ /**
667
+ * Disable radio
668
+ */
669
+ disabled?: boolean;
670
+ /**
671
+ * According to value for comparison, to determine whether the selected
672
+ */
673
+ value?: any;
674
+ /**
675
+ * Children of the AtRadio
676
+ */
677
+ children?: React.ReactNode;
678
+ /**
679
+ * On select option callback
680
+ */
681
+ onChange?: ((e: RadioChangeEvent) => void) | undefined;
682
+ }
683
+ export const AtRadio: React.FC<AtRadioProps>;
684
+ export interface AtRadioButtonsProps {
685
+ /**
686
+ * The title of the button
687
+ */
688
+ title: string;
689
+ /**
690
+ * The value of the button
691
+ */
692
+ value: string;
693
+ }
694
+ export const AtRadioButtons: React.FC<AtRadioButtonsProps>;
695
+ export interface AtSelectProps {
696
+ /**
697
+ * The ID for input
698
+ */
699
+ id?: string;
700
+ /**
701
+ * Show clear button
702
+ */
703
+ allowClear?: boolean;
704
+ /**
705
+ * Whether the current search will be cleared on selecting an item. Only applies when mode is set to multiple or tags
706
+ */
707
+ autoClearSearchValue?: boolean;
708
+ /**
709
+ * Get focus by default
710
+ */
711
+ autoFocus?: boolean;
712
+ /**
713
+ * Whether has border style
714
+ */
715
+ bordered?: boolean;
716
+ /**
717
+ * The custom clear icon
718
+ */
719
+ clearIcon?: ReactNode;
720
+ /**
721
+ * Whether active first option by default
722
+ */
723
+ defaultActiveFirstOption?: boolean;
724
+ /**
725
+ * Initial selected option
726
+ */
727
+ defaultValue?: string | string[] | number | number[] | LabeledValue | LabeledValue[];
728
+ /**
729
+ * Whether disabled select
730
+ */
731
+ disabled?: boolean;
732
+ /**
733
+ * Determine whether the popup menu and the select input are the same width. Default set
734
+ * min-width same as input. Will ignore when value less than select width. false
735
+ * will disable virtual scroll
736
+ */
737
+ popupMatchSelectWidth?: boolean | number;
738
+ /**
739
+ * Customize dropdown content
740
+ */
741
+ dropdownRender?: (originNode: ReactNode) => ReactElement<any, string | JSXElementConstructor<any>>;
742
+ /**
743
+ * The style of dropdown menu
744
+ */
745
+ dropdownStyle?: CSSProperties;
746
+ /**
747
+ * Customize node label, value, options,groupLabel field name
748
+ */
749
+ fieldNames?: object;
750
+ /**
751
+ * If true, filter options by input, if function, filter options against it. The function will receive two arguments, inputValue and option, if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded
752
+ */
753
+ filterOption?: SelectProps['filterOption'];
754
+ /**
755
+ * Sort function for search options sorting, see Array.sort's
756
+ * compareFunction
757
+ */
758
+ filterSort?: (optionA: DefaultOptionType, optionB: DefaultOptionType) => number;
759
+ /**
760
+ * Whether to embed label in value, turn the format of value from string to { value: string,
761
+ * label: ReactNode }
762
+ */
763
+ labelInValue?: boolean;
764
+ /**
765
+ * Config popup height
766
+ */
767
+ listHeight?: number;
768
+ /**
769
+ * Indicate loading state
770
+ */
771
+ loading?: boolean;
772
+ /**
773
+ * Select height
774
+ */
775
+ $height?: string;
776
+ /**
777
+ * Max tag count to show. responsive will cost render performance
778
+ */
779
+ maxTagCount?: number | 'responsive';
780
+ /**
781
+ * The custom menuItemSelected icon with multiple options
782
+ */
783
+ menuItemSelectedIcon?: ReactNode;
784
+ /**
785
+ * Set mode of Select
786
+ */
787
+ mode?: 'multiple' | 'tags';
788
+ /**
789
+ * Specify content to show when no result matches
790
+ */
791
+ notFoundContent?: ReactNode;
792
+ /**
793
+ * Controlled open state of dropdown
794
+ */
795
+ open?: boolean;
796
+ /**
797
+ * Which prop value of option will be used for filter if filterOption is true. If options is
798
+ set, it should be set to label
799
+ */
800
+ optionFilterProp?: string;
801
+ /**
802
+ * Which prop value of option will render as content of select. Example
803
+ */
804
+ optionLabelProp?: string;
805
+ /**
806
+ * Select options. Will get better perf than jsx definition
807
+ */
808
+ options?: SelectProps['options'];
809
+ /**
810
+ * Placeholder of select
811
+ */
812
+ placeholder?: ReactNode;
813
+ /**
814
+ * The current input "search" text
815
+ */
816
+ searchValue?: string;
817
+ /**
818
+ * Whether select is searchable
819
+ */
820
+ showSearch?: boolean;
821
+ /**
822
+ * Size of Select input
823
+ */
824
+ size?: 'large' | 'middle' | 'small';
825
+ /**
826
+ * Set validation status
827
+ */
828
+ status?: 'error' | 'warning';
829
+ /**
830
+ * Styles
831
+ */
832
+ style?: React.CSSProperties;
833
+ /**
834
+ * Current selected option (considered as a immutable array)
835
+ */
836
+ value?: string | string[] | number | number[] | LabeledValue | LabeledValue[];
837
+ /**
838
+ * Called when blur
839
+ */
840
+ onBlur?: () => any;
841
+ /**
842
+ * Called when select an option or input value change
843
+ */
844
+ onChange?: (value: any, option: DefaultOptionType | Array<DefaultOptionType>) => any;
845
+ /**
846
+ * Called when clear
847
+ */
848
+ onClear?: () => any;
849
+ /**
850
+ * Called when an option is deselected, param is the selected option's value. Only called for
851
+ * multiple or tags, effective in multiple or tags mode only
852
+ */
853
+ onDeselect?: (value: string | number | LabeledValue) => any;
854
+ /**
855
+ * Called when dropdown open
856
+ */
857
+ onDropdownVisibleChange?: (open: boolean) => any;
858
+ /**
859
+ * Called when focus
860
+ */
861
+ onFocus?: () => any;
862
+ /**
863
+ * Callback function that is fired when input changed
864
+ */
865
+ onSearch?: (value: string) => any;
866
+ /**
867
+ * Called when an option is selected, the params are option's value (or key) and option instance
868
+ */
869
+ onSelect?: (value: string | number | LabeledValue, option: DefaultOptionType) => any;
870
+ /**
871
+ * Select width
872
+ */
873
+ $width?: string;
874
+ /**
875
+ * Children
876
+ */
877
+ children?: ReactNode;
878
+ /**
879
+ * background color
880
+ */
881
+ backgroundColor?: string;
882
+ }
883
+ export const AtSelect: React.FC<AtSelectProps>;
884
+ export interface AtTextProps {
885
+ /**
886
+ * Content type
887
+ */
888
+ type?: 'secondary' | 'success' | 'warning' | 'danger';
889
+ /**
890
+ * Whether the text is strong or not
891
+ */
892
+ strong?: boolean;
893
+ /**
894
+ * Whether the text is italic or not
895
+ */
896
+ italic?: boolean;
897
+ /**
898
+ * Whether the text is underline or not
899
+ */
900
+ underline?: boolean;
901
+ /**
902
+ * Whether the text is mark or not
903
+ */
904
+ mark?: boolean;
905
+ /**
906
+ * If editable. Can control edit state when is object
907
+ */
908
+ editable?: boolean | BlockProps['editable'];
909
+ /**
910
+ * Whether to be copyable, customize it via setting an object
911
+ */
912
+ copyable?: boolean | BlockProps['copyable'];
913
+ /**
914
+ * Keyboard style
915
+ */
916
+ keyboard?: boolean;
917
+ /**
918
+ * Code style
919
+ */
920
+ code?: boolean;
921
+ /**
922
+ * children
923
+ */
924
+ children?: React.ReactNode;
925
+ /**
926
+ * Color of the text
927
+ */
928
+ color?: 'violet' | 'gold' | 'white' | 'lightGray';
929
+ /**
930
+ * Element width
931
+ */
932
+ $width?: number;
933
+ /**
934
+ * font size
935
+ */
936
+ $fontSize?: number;
937
+ }
938
+ export const AtText: React.FC<AtTextProps>;
939
+ export interface AtTitleProps {
940
+ /**
941
+ * Code style
942
+ */
943
+ code?: boolean;
944
+ /**
945
+ * Whether to be copyable, customize it via setting an object
946
+ */
947
+ copyable?: boolean | BlockProps['copyable'];
948
+ /**
949
+ * Deleted line style
950
+ */
951
+ delete?: boolean;
952
+ /**
953
+ * Disabled content
954
+ */
955
+ disabled?: boolean;
956
+ /**
957
+ * If editable. Can control edit state when is object
958
+ */
959
+ editable?: boolean | BlockProps['editable'];
960
+ /**
961
+ * Display ellipsis when text overflows, can configure rows and expandable by using object
962
+ */
963
+ ellipsis?: boolean | EllipsisConfig;
964
+ /**
965
+ * Set content importance. Match with h1, h2, h3, h4, h5
966
+ */
967
+ level?: 1 | 2 | 3 | 4 | 5;
968
+ /**
969
+ * Whether the text is mark or not
970
+ */
971
+ mark?: boolean;
972
+ /**
973
+ * Set the handler to handle click event
974
+ */
975
+ onClick?: React.MouseEventHandler<HTMLAnchorElement>;
976
+ /**
977
+ * Whether the text is italic or not
978
+ */
979
+ italic?: boolean;
980
+ /**
981
+ * Content type
982
+ */
983
+ type?: BaseType;
984
+ /**
985
+ * Whether the text is underline or not
986
+ */
987
+ underline?: boolean;
988
+ /**
989
+ * Additional content to include
990
+ */
991
+ children?: ReactNode;
992
+ /**
993
+ * Color of the title
994
+ */
995
+ color?: 'violet' | 'gold' | 'white';
996
+ /**
997
+ * No margin on titles
998
+ */
999
+ $noMargin?: boolean;
1000
+ }
1001
+ export const AtTitle: React.FC<AtTitleProps>;
1002
+ export interface MlBreadcrumbProps {
1003
+ /**
1004
+ * Custom item renderer
1005
+ */
1006
+ itemRender?: BreadcrumbProps['itemRender'];
1007
+ /**
1008
+ * Routing parameters
1009
+ */
1010
+ params?: Record<string, string>;
1011
+ /**
1012
+ * The routing stack information of router
1013
+ */
1014
+ items: BreadcrumbProps['items'];
1015
+ /**
1016
+ * Separator character
1017
+ */
1018
+ separator?: BreadcrumbProps['separator'];
1019
+ }
1020
+ export const MlBreadcrumb: React.FC<MlBreadcrumbProps>;
1021
+ export interface MlCardProps {
1022
+ /**
1023
+ * The ID for input
1024
+ */
1025
+ id?: string;
1026
+ /**
1027
+ * The action list, shows at the bottom of the Card
1028
+ */
1029
+ actions?: Array<ReactNode>;
1030
+ /**
1031
+ * Current TabPane's key
1032
+ */
1033
+ activeTabKey?: string;
1034
+ /**
1035
+ * Inline style to apply to the card content CSSProperties
1036
+ */
1037
+ bodyStyle?: CSSProperties;
1038
+ /**
1039
+ * Toggles rendering of the border around the card
1040
+ */
1041
+ bordered?: boolean;
1042
+ /**
1043
+ * Card cover
1044
+ */
1045
+ cover?: ReactNode;
1046
+ /**
1047
+ * Initial active TabPane's key, if activeTabKey is not set
1048
+ */
1049
+ defaultActiveTabKey?: string;
1050
+ /**
1051
+ * Content to render in the top-right corner of the card
1052
+ */
1053
+ extra?: ReactNode;
1054
+ /**
1055
+ * Lift up when hovering card
1056
+ */
1057
+ hoverable?: boolean;
1058
+ /**
1059
+ * Shows a loading indicator while the contents of the card are being fetched
1060
+ */
1061
+ loading?: boolean;
1062
+ /**
1063
+ * Mark item as selected
1064
+ */
1065
+ selected?: boolean;
1066
+ /**
1067
+ * Size of card
1068
+ */
1069
+ size?: 'default' | 'small';
1070
+ /**
1071
+ * Extra content in tab bar
1072
+ */
1073
+ tabBarExtraContent?: ReactNode;
1074
+ /**
1075
+ * List of TabPane's head
1076
+ */
1077
+ tabList?: CardTabListType[];
1078
+ /**
1079
+ * Tabs
1080
+ */
1081
+ tabProps?: TabsProps;
1082
+ /**
1083
+ * Card title
1084
+ */
1085
+ title?: ReactNode;
1086
+ /**
1087
+ * Card style type, can be set to inner or not set
1088
+ */
1089
+ type?: CardType;
1090
+ /**
1091
+ /**
1092
+ * Callback when card is clicked
1093
+ */
1094
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
1095
+ /**
1096
+ * Callback when tab is switched
1097
+ */
1098
+ onTabChange?: (key: string) => void;
1099
+ children?: React.ReactNode;
1100
+ /**
1101
+ * Card width
1102
+ */
1103
+ $width?: number;
1104
+ /**
1105
+ * border color for the card
1106
+ */
1107
+ $borderColor?: 'violet' | 'gold' | 'white' | 'gray';
1108
+ /**
1109
+ * margin bottom for the card
1110
+ */
1111
+ $marginBottom?: number;
1112
+ /**
1113
+ * padding for the card
1114
+ */
1115
+ $padding?: number;
1116
+ /**
1117
+ * background color for the card
1118
+ */
1119
+ $backgroundColor?: string;
1120
+ }
1121
+ /**
1122
+ * Primary input UI component for user interaction
1123
+ */
1124
+ export const MlCard: React.FC<MlCardProps>;
1125
+ export interface MlCarouselProps {
1126
+ /**
1127
+ * The ID for input
1128
+ */
1129
+ id?: string;
1130
+ /**
1131
+ * Whether to scroll automatically
1132
+ */
1133
+ autoplay?: boolean;
1134
+ /**
1135
+ * Delay between each auto scroll (in milliseconds)
1136
+ */
1137
+ autoplaySpeed?: number;
1138
+ /**
1139
+ * Center elements into carousel
1140
+ */
1141
+ centerMode?: boolean;
1142
+ /**
1143
+ * The position of the dots, which can be one of top bottom left right
1144
+ */
1145
+ dotPosition?: DotPosition;
1146
+ /**
1147
+ * Whether to show the dots at the bottom of the gallery, object for dotsClass and any others
1148
+ */
1149
+ dots?: boolean;
1150
+ /**
1151
+ * Whether to wait for the animation when switching
1152
+ */
1153
+ waitForAnimate?: boolean;
1154
+ /**
1155
+ * Transition interpolation function name
1156
+ */
1157
+ easing?: string;
1158
+ /**
1159
+ * Transition effect
1160
+ */
1161
+ effect?: 'scrollx' | 'fade';
1162
+ /**
1163
+ * Callback function called after the current index changes
1164
+ */
1165
+ afterChange?: (current: number) => void;
1166
+ /**
1167
+ * Callback function called before the current index changes
1168
+ */
1169
+ beforeChange?: (current: number, next: number) => void;
1170
+ children?: React.ReactNode;
1171
+ }
1172
+ export const MlCarousel: React.FC<MlCarouselProps>;
1173
+ export interface MlCheckboxGroup {
1174
+ /**
1175
+ * Default selected value
1176
+ * */
1177
+ defaultValue?: (string | number)[];
1178
+ /**
1179
+ * If disable all checkboxes
1180
+ */
1181
+ disabled?: boolean;
1182
+ /**
1183
+ * The name property of all input[type="checkbox"] children
1184
+ */
1185
+ name?: string;
1186
+ /**
1187
+ * Specifies options
1188
+ */
1189
+ options?: CheckboxGroupProps['options'];
1190
+ /**
1191
+ * Used for setting the currently selected value
1192
+ */
1193
+ value?: (string | number | boolean)[];
1194
+ /**
1195
+ * The callback function that is triggered when the state changes
1196
+ */
1197
+ onChange?: CheckboxGroupProps['onChange'];
1198
+ }
1199
+ export const MlCheckboxGroup: React.FC<MlCheckboxGroup>;
1200
+ interface UseInputOTPProps {
1201
+ onChange?: (value: Array<string | undefined>) => void;
1202
+ }
1203
+ export const useCodeInput: ({ onChange, }: UseInputOTPProps) => {
1204
+ handleChange: (index: number) => void;
1205
+ handleFocus: (e: React.FocusEvent<HTMLInputElement>) => void;
1206
+ handleKeyDown: (e: React.KeyboardEvent<HTMLInputElement>, index: number) => void;
1207
+ otpValue: (string | undefined)[];
1208
+ };
1209
+ export interface CodeInputProps {
1210
+ /**
1211
+ * number of digits (input) to show
1212
+ */
1213
+ digits?: number;
1214
+ /**
1215
+ * The input content value
1216
+ */
1217
+ value?: number;
1218
+ /**
1219
+ * Callback when user input
1220
+ */
1221
+ onChange?: (value: Array<string | undefined>) => void;
1222
+ /**
1223
+ * font size of the input
1224
+ */
1225
+ fontSize?: string;
1226
+ /**
1227
+ * height of the input
1228
+ */
1229
+ height?: string;
1230
+ }
1231
+ export const MlCodeInput: React.FC<CodeInputProps>;
1232
+ export interface AtDropdownProps extends DropdownProps {
1233
+ /**
1234
+ * If true, an arrow will be shown
1235
+ */
1236
+ arrow?: boolean;
1237
+ /**
1238
+ * Whether to adjust popup placement automatically in case of overflow
1239
+ */
1240
+ autoAdjustOverflow?: boolean;
1241
+ /**
1242
+ * If true, the dropdown will be disabled
1243
+ */
1244
+ disabled?: boolean;
1245
+ /**
1246
+ * A function used to render the dropdown menu
1247
+ */
1248
+ dropdownRender?: (menu: ReactNode) => ReactNode;
1249
+ /**
1250
+ * Style of the dropdown menu
1251
+ */
1252
+ overlayStyle?: React.CSSProperties;
1253
+ /**
1254
+ * Placement of the dropdown menu. Possible values: 'topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight'
1255
+ */
1256
+ placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
1257
+ /**
1258
+ * Triggers for showing the overlay. Possible values: 'click', 'hover', 'contextMenu'
1259
+ */
1260
+ trigger?: ('click' | 'hover' | 'contextMenu')[];
1261
+ /**
1262
+ * If true, the dropdown is opened
1263
+ */
1264
+ open?: boolean;
1265
+ /**
1266
+ * A function to be called when visible changes
1267
+ */
1268
+ onOpenChange?: (visible: boolean) => void;
1269
+ /**
1270
+ * Child elements of the Dropdown component
1271
+ */
1272
+ children?: ReactNode;
1273
+ /**
1274
+ * Menu items
1275
+ */
1276
+ menu?: MenuProps;
1277
+ /**
1278
+ * If true, the loading icon will be shown
1279
+ */
1280
+ loading?: boolean;
1281
+ /**
1282
+ * If true, the dropdown will be shown as a button
1283
+ */
1284
+ button?: boolean;
1285
+ /**
1286
+ * when button is true, the onClick function will be called
1287
+ */
1288
+ onClick?: () => void;
1289
+ }
1290
+ export const MIDropdown: React.FC<AtDropdownProps>;
1291
+ export interface MlFromItemProps {
1292
+ /**
1293
+ * Set the dependencies field by names
1294
+ */
1295
+ dependencies?: string[];
1296
+ /**
1297
+ * The extra prompt message. It is similar to help. Usage example: to display error message and prompt message at the same time
1298
+ */
1299
+ extra?: string;
1300
+ /**
1301
+ * Used with validateStatus, this option specifies the validation status icon. Recommended to be used only with Input
1302
+ */
1303
+ hasFeedback?: boolean;
1304
+ /**
1305
+ * The prompt message. If not provided, the prompt message will be generated by the validation rule.
1306
+ */
1307
+ help?: string;
1308
+ /**
1309
+ * Whether to hide Form.Item (still collect and validate value)
1310
+ */
1311
+ hidden?: boolean;
1312
+ /**
1313
+ * Config sub default value. Form initialValues get higher priority when conflict
1314
+ */
1315
+ initialValue?: string;
1316
+ /**
1317
+ * Label text
1318
+ */
1319
+ label?: string;
1320
+ /**
1321
+ * The layout of label. You can set span offset to something like {span: 3, offset: 12} or sm: {span: 3, offset: 12} same as with <Col>. You can set labelCol on Form which will not affect nest Item. If both exists, use Item first
1322
+ */
1323
+ labelCol?: ColProps;
1324
+ /**
1325
+ * The default validate field info
1326
+ */
1327
+ messageVariables?: Record<string, string>;
1328
+ /**
1329
+ * Field name, support array
1330
+ */
1331
+ name?: NamePath;
1332
+ /**
1333
+ * No style for true, used as a pure field control
1334
+ */
1335
+ noStyle?: boolean;
1336
+ /**
1337
+ * Normalize value from component value before passing to Form instance. Do not support async
1338
+ */
1339
+ normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue;
1340
+ /**
1341
+ * Display required style. It will be generated by the validation rule
1342
+ */
1343
+ required?: boolean;
1344
+ /**
1345
+ * Rules for field validation. Click [here](https://ant.design/components/form#components-form-demo-basic) to see an example
1346
+ */
1347
+ rules?: Rule[];
1348
+ /**
1349
+ * Config tooltip info
1350
+ */
1351
+ tooltip?: LabelTooltipType;
1352
+ /**
1353
+ * The validation status. If not provided, it will be generated by validation rule. options: success warning error validating
1354
+ */
1355
+ validateStatus?: 'success' | 'warning' | 'error' | 'validating' | undefined;
1356
+ /**
1357
+ * When to validate the value of children node
1358
+ */
1359
+ validateTrigger?: string | string[] | false;
1360
+ /**
1361
+ * The layout for input controls, same as labelCol. You can set wrapperCol on Form which will not affect nest Item. If both exists, use Item first
1362
+ */
1363
+ wrapperCol?: ColProps;
1364
+ /**
1365
+ * Children component
1366
+ */
1367
+ children?: React.ReactNode;
1368
+ /**
1369
+ * Props of children node, for example, the prop of Switch is 'checked'. This prop is an encapsulation of getValueProps, which will be invalid after customizing getValueProps
1370
+ */
1371
+ valuePropName?: string;
1372
+ /**
1373
+ * margin of component
1374
+ */
1375
+ $margin?: string;
1376
+ }
1377
+ export const MlFormItem: React.FC<MlFromItemProps>;
1378
+ export interface MlLoadingProps {
1379
+ /**
1380
+ * zIndex of the loading
1381
+ */
1382
+ $zIndex?: number;
1383
+ }
1384
+ export const MlLoading: React.FC<MlLoadingProps>;
1385
+ export interface MlPaginationProps {
1386
+ /**
1387
+ * Current page number. (Controlled)
1388
+ */
1389
+ current?: number;
1390
+ /**
1391
+ * Default initial page number when the component is uncontrolled.
1392
+ */
1393
+ defaultCurrent?: number;
1394
+ /**
1395
+ * Default number of data items per page when the component is uncontrolled.
1396
+ */
1397
+ defaultPageSize?: number;
1398
+ /**
1399
+ * Disable pagination interaction.
1400
+ */
1401
+ disabled?: boolean;
1402
+ /**
1403
+ * Whether to hide the pager when there is only one page of data.
1404
+ */
1405
+ hideOnSinglePage?: boolean;
1406
+ /**
1407
+ * To customize the HTML content of the pagination item.
1408
+ * @param page The current page number.
1409
+ * @param type Type of the pagination item: 'page', 'prev', or 'next'.
1410
+ * @param originalElement The original React element.
1411
+ */
1412
+ itemRender?: PaginationProps['itemRender'];
1413
+ /**
1414
+ * Number of data items per page.
1415
+ */
1416
+ pageSize?: number;
1417
+ /**
1418
+ * Specify the size changer options for the pageSize select.
1419
+ */
1420
+ pageSizeOptions?: string[] | number[];
1421
+ /**
1422
+ * If true and size is not specified, the pagination will resize according to the window width.
1423
+ */
1424
+ responsive?: boolean;
1425
+ /**
1426
+ * Show fewer page items.
1427
+ */
1428
+ showLessItems?: boolean;
1429
+ /**
1430
+ * Determine whether to show the quick jumper input to directly jump to pages.
1431
+ * Can also be an object with the 'goButton' prop to customize the go button.
1432
+ */
1433
+ showQuickJumper?: boolean | {
1434
+ goButton: React.ReactNode;
1435
+ };
1436
+ /**
1437
+ * Determine whether to show the pageSize select.
1438
+ * It will be true when the total number of items is greater than 50.
1439
+ */
1440
+ showSizeChanger?: boolean;
1441
+ /**
1442
+ * Show title for the page item.
1443
+ */
1444
+ showTitle?: boolean;
1445
+ /**
1446
+ * Custom function to display the total number of data items and the current range displayed.
1447
+ * @param total Total number of data items.
1448
+ * @param range Range of data items currently displayed, represented as [start, end].
1449
+ */
1450
+ showTotal?: (total: number, range: [number, number]) => React.ReactNode;
1451
+ /**
1452
+ * Whether to use simple mode for the pagination.
1453
+ */
1454
+ simple?: boolean;
1455
+ /**
1456
+ * Specify the size of the pagination component.
1457
+ * Can be set to 'default' or 'small'.
1458
+ */
1459
+ size?: 'default' | 'small';
1460
+ /**
1461
+ * Total number of data items.
1462
+ */
1463
+ total?: PaginationProps['total'];
1464
+ /**
1465
+ * Called when the page number or pageSize is changed.
1466
+ * @param page The resulting page number.
1467
+ * @param pageSize The resulting number of data items per page.
1468
+ */
1469
+ onChange?: (page: number, pageSize: number) => void;
1470
+ /**
1471
+ * Called when the pageSize is changed.
1472
+ * @param current The current page number.
1473
+ * @param size The new number of data items per page.
1474
+ */
1475
+ onShowSizeChange?: (current: number, size: number) => void;
1476
+ }
1477
+ export const MlPagination: React.FC<MlPaginationProps>;
1478
+ export interface MlPlanCardProps {
1479
+ title: string;
1480
+ description: string;
1481
+ $color?: 'violet' | 'gold' | 'white';
1482
+ $type?: "secondary" | "success" | "warning" | "danger" | undefined;
1483
+ $fontSize?: number;
1484
+ }
1485
+ export const MlPlanCard: React.FC<MlPlanCardProps>;
1486
+ export interface MlRadioGroupProps {
1487
+ /**
1488
+ * The ID for input
1489
+ */
1490
+ id?: string;
1491
+ /**
1492
+ * The style type of radio button
1493
+ */
1494
+ buttonStyle?: 'outline' | 'solid';
1495
+ /**
1496
+ * Default selected value
1497
+ */
1498
+ defaultValue?: any;
1499
+ /**
1500
+ * Disable all radio buttons
1501
+ */
1502
+ disabled?: boolean;
1503
+ /**
1504
+ * The name property of all input[type="radio"] children
1505
+ */
1506
+ name?: string;
1507
+ /**
1508
+ * Set children optional
1509
+ */
1510
+ options?: string[] | number[] | Array<{
1511
+ label: ReactNode;
1512
+ value: string;
1513
+ disabled?: boolean;
1514
+ }>;
1515
+ /**
1516
+ * Set Radio optionType
1517
+ */
1518
+ optionType?: 'default' | 'button';
1519
+ /**
1520
+ * The size of radio button style
1521
+ */
1522
+ size?: 'large' | 'middle' | 'small';
1523
+ /**
1524
+ * Used for setting the currently selected value
1525
+ */
1526
+ value?: any;
1527
+ /**
1528
+ * The callback function that is triggered when the state changes
1529
+ */
1530
+ onChange?: (e: _RadioChangeEvent1) => void;
1531
+ /**
1532
+ * border box
1533
+ */
1534
+ bordered?: boolean;
1535
+ /**
1536
+ * padding
1537
+ */
1538
+ padding?: string;
1539
+ }
1540
+ export const MlRadioGroup: React.FC<MlRadioGroupProps>;
1541
+ export interface MlSearchBoxProps extends AtTextInputProps {
1542
+ /**
1543
+ * Prefix on search Input
1544
+ */
1545
+ inputPrefixCls?: string;
1546
+ /**
1547
+ * On search function
1548
+ */
1549
+ onSearch?: (value: string, event?: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLInputElement>) => void;
1550
+ /**
1551
+ * Input loading on search
1552
+ */
1553
+ loading?: boolean;
1554
+ /**
1555
+ * Element for enter button
1556
+ */
1557
+ enterButton?: React.ReactNode;
1558
+ }
1559
+ export const MlSearchBox: React.FC<MlSearchBoxProps>;
1560
+ export interface MlSubscriptionCardProps {
1561
+ title: string;
1562
+ description: string;
1563
+ price: number;
1564
+ value: string;
1565
+ disabled?: boolean;
1566
+ }
1567
+ export const MlSubscriptionCard: React.FC<MlSubscriptionCardProps>;
1568
+ export interface MlTooltipProps {
1569
+ /**
1570
+ * Children component
1571
+ */
1572
+ children?: React.ReactNode;
1573
+ /**
1574
+ * Tooltip text
1575
+ */
1576
+ title?: string;
1577
+ /**
1578
+ * Tooltip trigger mode. Could be multiple by passing an array
1579
+ */
1580
+ trigger?: TooltipProps['trigger'];
1581
+ /**
1582
+ * The position of the tooltip relative to the target, which can be one of top left right bottom topLeft topRight bottomLeft bottomRight leftTop leftBottom rightTop rightBottom
1583
+ */
1584
+ placement?: TooltipProps['placement'];
1585
+ }
1586
+ export const MlTooltip: React.FC<MlTooltipProps>;
1587
+ export interface OrActiveCardsProps {
1588
+ items: Array<{
1589
+ title: string;
1590
+ description: string;
1591
+ }> | undefined;
1592
+ type?: MlPlanCardProps['$type'];
1593
+ fontSize?: number;
1594
+ }
1595
+ export const OrActiveCards: React.FC<OrActiveCardsProps>;
1596
+ export interface OrAlertProps {
1597
+ /**
1598
+ * The action of Alert
1599
+ */
1600
+ action?: AlertProps['action'];
1601
+ /**
1602
+ * Called when close animation is finished
1603
+ */
1604
+ afterClose?: AlertProps['afterClose'];
1605
+ /**
1606
+ * Whether to show as banner
1607
+ */
1608
+ banner?: boolean;
1609
+ /**
1610
+ * Custom close icon, >=5.7.0: close button will be hidden when setting to null or false
1611
+ */
1612
+ closeIcon?: boolean | React.ReactNode;
1613
+ /**
1614
+ * Closable text to show
1615
+ */
1616
+ closable?: AlertProps['closable'];
1617
+ /**
1618
+ * Additional content of Alert
1619
+ */
1620
+ description?: AlertProps['description'];
1621
+ /**
1622
+ * Custom icon, effective when showIcon is true
1623
+ */
1624
+ icon?: AlertProps['icon'];
1625
+ /**
1626
+ * Content of Alert
1627
+ */
1628
+ message?: AlertProps['message'];
1629
+ /**
1630
+ * Whether to show icon
1631
+ */
1632
+ showIcon?: boolean;
1633
+ /**
1634
+ * Type of Alert styles, options: success, info, warning, error
1635
+ */
1636
+ type?: AlertProps['type'];
1637
+ /**
1638
+ * Callback when Alert is closed
1639
+ */
1640
+ onClose?: AlertProps['onClose'];
1641
+ /**
1642
+ * Children of Alert
1643
+ */
1644
+ children?: React.ReactNode;
1645
+ }
1646
+ export const OrAlert: React.FC<OrAlertProps>;
1647
+ export interface OrTabsProps {
1648
+ /**
1649
+ * The ID for input
1650
+ */
1651
+ id?: string;
1652
+ /**
1653
+ * Current TabPane's key
1654
+ */
1655
+ activeKey?: string;
1656
+ /**
1657
+ * Customize add icon
1658
+ */
1659
+ addIcon?: React.ReactNode;
1660
+ /**
1661
+ * Whether to change tabs with animation. Only works while tabPosition="top"
1662
+ */
1663
+ animated?: boolean | {
1664
+ inkBar: boolean;
1665
+ tabPane: boolean;
1666
+ };
1667
+ /**
1668
+ * Centers tabs
1669
+ */
1670
+ centered?: boolean;
1671
+ /**
1672
+ * Initial active TabPane's key, if activeKey is not set
1673
+ */
1674
+ defaultActiveKey?: string;
1675
+ /**
1676
+ * Hide plus icon or not. Only works while type="editable-card"
1677
+ */
1678
+ hideAdd?: boolean;
1679
+ /**
1680
+ * Configure tab content
1681
+ */
1682
+ items?: TabsProps['items'];
1683
+ /**
1684
+ * The custom icon of ellipsis
1685
+ */
1686
+ moreIcon?: React.ReactNode;
1687
+ /**
1688
+ * className for more dropdown.
1689
+ */
1690
+ popupClassName?: string;
1691
+ /**
1692
+ * Preset tab bar size
1693
+ */
1694
+ size?: 'large' | 'middle' | 'small';
1695
+ /**
1696
+ * Extra content in tab bar
1697
+ */
1698
+ tabBarExtraContent?: React.ReactNode | {
1699
+ left?: React.ReactNode;
1700
+ right?: React.ReactNode;
1701
+ };
1702
+ /**
1703
+ * The gap between tabs
1704
+ */
1705
+ tabBarGutter?: number;
1706
+ /**
1707
+ * Position of tabs
1708
+ */
1709
+ tabPosition?: 'top' | 'right' | 'bottom' | 'left';
1710
+ /**
1711
+ * Whether destroy inactive TabPane when change tab
1712
+ */
1713
+ destroyInactiveTabPane?: boolean;
1714
+ /**
1715
+ * Basic style of tabs
1716
+ */
1717
+ type?: 'line' | 'card' | 'editable-card';
1718
+ /**
1719
+ * Callback executed when active tab is changed
1720
+ */
1721
+ onChange?: (activeKey: string) => void;
1722
+ /**
1723
+ * Callback executed when tab is added or removed. Only works while type="editable-card"
1724
+ */
1725
+ onEdit?: ((e: string | React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>, action: 'add' | 'remove') => void) | undefined;
1726
+ /**
1727
+ * Callback executed when tab is clicked
1728
+ */
1729
+ onTabClick?: ((activeKey: string, e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void) | undefined;
1730
+ /**
1731
+ * Trigger when tab scroll
1732
+ */
1733
+ onTabScroll?: (info: {
1734
+ direction: 'left' | 'right' | 'top' | 'bottom';
1735
+ }) => void;
1736
+ /**
1737
+ * Children of the tabs
1738
+ */
1739
+ children?: React.ReactElement | React.ReactElement[];
1740
+ /**
1741
+ * hide extra content in tab bar
1742
+ */
1743
+ hideExtra?: boolean;
1744
+ }
1745
+ export const OrTabs: React.FC<OrTabsProps>;
1746
+ export interface OrTicketCardProps {
1747
+ /**
1748
+ * Image source
1749
+ */
1750
+ src?: string;
1751
+ /**
1752
+ * Title children
1753
+ */
1754
+ title?: React.ReactNode;
1755
+ /**
1756
+ * Text children
1757
+ */
1758
+ description?: React.ReactNode;
1759
+ /**
1760
+ * input value
1761
+ */
1762
+ value?: number;
1763
+ /**
1764
+ * Button Value
1765
+ */
1766
+ buttonText?: string;
1767
+ /**
1768
+ * display input
1769
+ */
1770
+ type?: 'custom' | 'static';
1771
+ /**
1772
+ * border color for the card
1773
+ */
1774
+ $borderColor?: 'violet' | 'gold' | 'white' | 'gray';
1775
+ /**
1776
+ * On change callback
1777
+ */
1778
+ onChange?: (e: string | React.MouseEvent<HTMLAnchorElement, MouseEvent> | React.MouseEvent<HTMLButtonElement, MouseEvent> | number | null) => void;
1779
+ }
1780
+ export const OrTicketCard: React.FC<OrTicketCardProps>;
1781
+ export interface OrCoinTableProps {
1782
+ /**
1783
+ * List of coins available
1784
+ */
1785
+ coinsAvailable: Array<OrTicketCardProps>;
1786
+ /**
1787
+ * coins onClick | onChange event
1788
+ */
1789
+ coinsOnChange?: OrTicketCardProps['onChange'];
1790
+ /**
1791
+ * item selected
1792
+ */
1793
+ itemSelected?: number;
1794
+ }
1795
+ export const OrCoinTable: React.FC<OrCoinTableProps>;
1796
+ export interface OrTicketsProps {
1797
+ /**
1798
+ * Tickets Title
1799
+ */
1800
+ title?: string;
1801
+ /**
1802
+ * Active Tickets
1803
+ */
1804
+ activeTickets?: Array<{
1805
+ title: string;
1806
+ description: string;
1807
+ }>;
1808
+ /**
1809
+ * Coins available
1810
+ */
1811
+ coinsAvailable: Array<OrTicketCardProps>;
1812
+ /**
1813
+ * coins onClick | onChange event
1814
+ */
1815
+ onChange?: OrTicketCardProps['onChange'];
1816
+ /**
1817
+ * item selected
1818
+ */
1819
+ itemSelected?: number;
1820
+ }
1821
+ export const OrTickets: React.FC<OrTicketsProps>;
1822
+ export interface OrRowProps {
1823
+ /**
1824
+ * The ID for input
1825
+ */
1826
+ id?: string;
1827
+ /**
1828
+ * Vertical alignment
1829
+ */
1830
+ align?: RowProps['align'];
1831
+ /**
1832
+ * Container background source
1833
+ */
1834
+ $backgroundSrc?: string;
1835
+ /**
1836
+ * Spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}. Or you can use array to make horizontal and vertical spacing work at the same time [horizontal, vertical]
1837
+ */
1838
+ gutter?: Gutter | object | [Gutter, Gutter];
1839
+ /**
1840
+ * Horizontal arrangement
1841
+ */
1842
+ justify?: RowProps['justify'];
1843
+ /**
1844
+ * Auto wrap line
1845
+ */
1846
+ wrap?: boolean;
1847
+ /**
1848
+ * Children of OrRow
1849
+ */
1850
+ children?: React.ReactNode;
1851
+ /**
1852
+ * Container padding top in px
1853
+ */
1854
+ $paddingTop?: number;
1855
+ /**
1856
+ * Container padding Bottom in px
1857
+ */
1858
+ $paddingBottom?: number;
1859
+ /**
1860
+ * Container padding Right in px
1861
+ */
1862
+ $paddingRight?: number;
1863
+ /**
1864
+ * Container padding Left in px
1865
+ */
1866
+ $paddingLeft?: number;
1867
+ /**
1868
+ * Container padding Vertical in px
1869
+ */
1870
+ $paddingVertical?: number;
1871
+ /**
1872
+ * Container padding Horizontal in px
1873
+ */
1874
+ $paddingHorizontal?: number;
1875
+ /**
1876
+ * gap
1877
+ */
1878
+ $gap?: number;
1879
+ }
1880
+ export const OrRow: React.FC<OrRowProps>;
1881
+ export interface OrTwoButtons {
1882
+ /**
1883
+ * Cancel button title
1884
+ */
1885
+ leftButtonTitle: string;
1886
+ /**
1887
+ * Confirm button title
1888
+ */
1889
+ rightButtonTitle: string;
1890
+ /**
1891
+ * Cancel onClick Event
1892
+ */
1893
+ leftButtonOnClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;
1894
+ /**
1895
+ * Confirm onClick Event
1896
+ */
1897
+ rightButtonOnClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;
1898
+ /**
1899
+ * gap between buttons
1900
+ */
1901
+ gap?: number;
1902
+ /**
1903
+ * justify buttons
1904
+ */
1905
+ justify?: RowProps['justify'];
1906
+ }
1907
+ export const OrTwoButtons: React.FC<OrTwoButtons>;
1908
+ export interface OrAssignBalanceProps {
1909
+ /**
1910
+ * Tickets page title
1911
+ */
1912
+ ticketTitle: string;
1913
+ /**
1914
+ * Width of the Drawer dialog
1915
+ */
1916
+ width?: string | number;
1917
+ /**
1918
+ * The z-index of the Drawer
1919
+ */
1920
+ zIndex?: number;
1921
+ /**
1922
+ * tab1 title
1923
+ */
1924
+ firstTabTitle: ReactNode;
1925
+ /**
1926
+ * tab2 title
1927
+ */
1928
+ secondTabTitle: ReactNode;
1929
+ /**
1930
+ * Active subscriptions
1931
+ */
1932
+ activeSubscriptions?: Array<{
1933
+ title: string;
1934
+ description: string;
1935
+ }>;
1936
+ /**
1937
+ * Active Tickets
1938
+ */
1939
+ activeTickets?: Array<{
1940
+ title: string;
1941
+ description: string;
1942
+ }>;
1943
+ /**
1944
+ * Coins available
1945
+ */
1946
+ coinsAvailable: Array<OrTicketCardProps>;
1947
+ /**
1948
+ * Cancel button title
1949
+ */
1950
+ cancelTitle: string;
1951
+ /**
1952
+ * Confirm button title
1953
+ */
1954
+ confirmTitle: string;
1955
+ /**
1956
+ * Plans and Subscriptions
1957
+ */
1958
+ subscriptions: Array<MlSubscriptionCardProps>;
1959
+ /**
1960
+ * Cancel onClick Event
1961
+ */
1962
+ cancelClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;
1963
+ /**
1964
+ * Confirm onClick Event
1965
+ */
1966
+ confirmClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;
1967
+ /**
1968
+ * subscriptions onChange event
1969
+ */
1970
+ subscriptionOnChange?: ((e: _RadioChangeEvent1) => void);
1971
+ /**
1972
+ * coins onClick | onChange event
1973
+ */
1974
+ coinsOnChange?: OrTicketCardProps['onChange'];
1975
+ /**
1976
+ * item selected
1977
+ */
1978
+ coinSelected?: number;
1979
+ }
1980
+ export const OrAssignBalance: React.FC<OrAssignBalanceProps>;
1981
+ export interface OrColProps {
1982
+ /**
1983
+ * The ID for input
1984
+ */
1985
+ id?: string;
1986
+ /**
1987
+ * Flex layout style
1988
+ */
1989
+ flex?: string | number;
1990
+ /**
1991
+ * The number of cells to offset Col from the left
1992
+ */
1993
+ offset?: number;
1994
+ /**
1995
+ * Raster order
1996
+ */
1997
+ order?: number;
1998
+ /**
1999
+ * The number of cells that raster is moved to the left
2000
+ */
2001
+ pull?: number;
2002
+ /**
2003
+ * The number of cells that raster is moved to the right
2004
+ */
2005
+ push?: number;
2006
+ /**
2007
+ * Raster number of cells to occupy, 0 corresponds to display: none
2008
+ */
2009
+ span?: number;
2010
+ /**
2011
+ * screen < 576px and also default setting, could be a span value or an object containing above props
2012
+ */
2013
+ xs?: number | object;
2014
+ /**
2015
+ * screen ≥ 576px, could be a span value or an object containing above props
2016
+ */
2017
+ sm?: number | object;
2018
+ /**
2019
+ * screen ≥ 768px, could be a span value or an object containing above props
2020
+ */
2021
+ md?: number | object;
2022
+ /**
2023
+ * screen ≥ 1200px, could be a span value or an object containing above props
2024
+ */
2025
+ xl?: number | object;
2026
+ /**
2027
+ * screen ≥ 1600px, could be a span value or an object containing above props
2028
+ */
2029
+ xxl?: number | object;
2030
+ /**
2031
+ * Children of Columns
2032
+ */
2033
+ children?: React.ReactNode;
2034
+ /**
2035
+ * Container background source
2036
+ */
2037
+ $backgroundSrc?: string;
2038
+ /**
2039
+ * Justify content
2040
+ */
2041
+ $justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly';
2042
+ /**
2043
+ * Container padding top in px
2044
+ */
2045
+ $paddingTop?: number;
2046
+ /**
2047
+ * Container padding Bottom in px
2048
+ */
2049
+ $paddingBottom?: number;
2050
+ /**
2051
+ * Container padding Right in px
2052
+ */
2053
+ $paddingRight?: number;
2054
+ /**
2055
+ * Container padding Left in px
2056
+ */
2057
+ $paddingLeft?: number;
2058
+ /**
2059
+ * Container padding Vertical in px
2060
+ */
2061
+ $paddingVertical?: number;
2062
+ /**
2063
+ * Container padding Horizontal in px
2064
+ */
2065
+ $paddingHorizontal?: number;
2066
+ /**
2067
+ * gap between columns
2068
+ */
2069
+ $gap?: number;
2070
+ }
2071
+ export const OrCol: React.FC<OrColProps>;
2072
+ export interface OrContentProps extends LayoutProps {
2073
+ /**
2074
+ * Is main content
2075
+ */
2076
+ $main?: boolean;
2077
+ }
2078
+ export const OrContent: React.FC<OrContentProps>;
2079
+ export interface OrCountryCardProps {
2080
+ /**
2081
+ * The ID for card
2082
+ */
2083
+ id?: string;
2084
+ /**
2085
+ * Country name
2086
+ **/
2087
+ name: string;
2088
+ /**
2089
+ * Country flag url
2090
+ **/
2091
+ flagSrc: string;
2092
+ /**
2093
+ * Mark item as selected
2094
+ */
2095
+ selected?: boolean;
2096
+ /**
2097
+ * Callback when card is clicked
2098
+ */
2099
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
2100
+ }
2101
+ export const OrCountryCard: React.FC<OrCountryCardProps>;
2102
+ export interface OrCvcInputProps {
2103
+ /**
2104
+ * Disabled input
2105
+ */
2106
+ disabled?: boolean;
2107
+ /**
2108
+ * Rules for validation
2109
+ * @default []
2110
+ */
2111
+ rules?: MlFromItemProps['rules'];
2112
+ /**
2113
+ * inputs label
2114
+ */
2115
+ label?: string | string[];
2116
+ }
2117
+ export const OrCvcInput: React.FC<OrCvcInputProps>;
2118
+ export interface OrLayoutProps {
2119
+ /**
2120
+ * Children component
2121
+ */
2122
+ children?: React.ReactNode;
2123
+ /**
2124
+ * Indicate if layout fill the height
2125
+ */
2126
+ $fullHeight?: boolean;
2127
+ /**
2128
+ * Whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
2129
+ */
2130
+ hasSider?: boolean;
2131
+ }
2132
+ export const OrLayout: React.FC<OrLayoutProps>;
2133
+ export interface OrSiderProps {
2134
+ /**
2135
+ * Breakpoints of the responsive layout
2136
+ */
2137
+ breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
2138
+ /**
2139
+ * Styled box shadow
2140
+ */
2141
+ $boxShadow?: string;
2142
+ /**
2143
+ * Children component
2144
+ */
2145
+ children?: React.ReactNode;
2146
+ /**
2147
+ * To set the current status boolean
2148
+ */
2149
+ collapsed?: boolean;
2150
+ /**
2151
+ * Width of the collapsed sidebar, by setting to 0 a special trigger will appear
2152
+ */
2153
+ collapsedWidth?: number;
2154
+ /**
2155
+ * To set the initial status
2156
+ */
2157
+ defaultCollapsed?: boolean;
2158
+ /**
2159
+ * Width of the sidebar
2160
+ */
2161
+ width?: number | string;
2162
+ /**
2163
+ * The callback function, executed when breakpoints changed
2164
+ */
2165
+ onBreakpoint?: (broken: boolean) => void;
2166
+ /**
2167
+ * The callback function, executed by clicking the trigger or activating the responsive layout
2168
+ */
2169
+ onCollapse?: SiderProps['onCollapse'];
2170
+ }
2171
+ export const OrSider: React.FC<OrSiderProps>;
2172
+ export interface OrMenuProps {
2173
+ /**
2174
+ * Array with the keys of default opened sub menus
2175
+ */
2176
+ defaultOpenKeys?: string[];
2177
+ /**
2178
+ * Array with the keys of default selected menu items
2179
+ */
2180
+ defaultSelectedKeys?: string[];
2181
+ /**
2182
+ * custom expand icon of submenu
2183
+ */
2184
+ expandIcon?: MenuProps['expandIcon'];
2185
+ /**
2186
+ * Menu item content
2187
+ */
2188
+ items?: MenuProps['items'];
2189
+ /**
2190
+ * Type of menu
2191
+ */
2192
+ mode?: 'vertical' | 'horizontal' | 'inline';
2193
+ /**
2194
+ * Allows selection of multiple items
2195
+ */
2196
+ multiple?: boolean;
2197
+ /**
2198
+ * Called when a menu item is clicked
2199
+ */
2200
+ onClick?: MenuProps['onClick'];
2201
+ /**
2202
+ * Called when a menu item is selected
2203
+ */
2204
+ onSelect?: MenuProps['onSelect'];
2205
+ }
2206
+ export const OrMenu: React.FC<OrMenuProps>;
2207
+ export interface OrSiderMenuProps {
2208
+ /**
2209
+ * Indicate if the menu is collapsed
2210
+ */
2211
+ collapsed?: boolean;
2212
+ /**
2213
+ * Menu item content
2214
+ */
2215
+ items?: OrMenuProps['items'];
2216
+ /**
2217
+ * Botton menu item content
2218
+ */
2219
+ bottomItems?: OrMenuProps['items'];
2220
+ /**
2221
+ * On click collapsed button
2222
+ */
2223
+ onClickCollapsed?: () => void;
2224
+ /**
2225
+ * Called when a menu item is clicked
2226
+ */
2227
+ onClick?: OrMenuProps['onClick'];
2228
+ /**
2229
+ * Called when a bottom menu item is clicked
2230
+ */
2231
+ onClickBottomItems?: OrMenuProps['onClick'];
2232
+ /**
2233
+ * Called when a menu item is selected
2234
+ */
2235
+ onSelect?: OrMenuProps['onSelect'];
2236
+ children?: React.ReactNode;
2237
+ }
2238
+ export const OrSiderMenu: React.FC<OrSiderMenuProps>;
2239
+ export interface OrHeaderProps {
2240
+ /**
2241
+ * The ID for input
2242
+ */
2243
+ id?: string;
2244
+ /**
2245
+ * option for select
2246
+ */
2247
+ countrySelectOptions?: {
2248
+ value: string;
2249
+ label: string;
2250
+ icon?: JSX.Element;
2251
+ }[];
2252
+ /**
2253
+ * Default Value for select
2254
+ */
2255
+ selectValue?: string;
2256
+ /**
2257
+ * Placeholder for select
2258
+ */
2259
+ selectPlaceholder?: string;
2260
+ /**
2261
+ * Called when an option is selected, the params are option's value (or key) and option instance
2262
+ */
2263
+ onSelect?: AtSelectProps['onChange'];
2264
+ /**
2265
+ * buttons options
2266
+ */
2267
+ navItems?: {
2268
+ value?: string;
2269
+ label?: string;
2270
+ icon: JSX.Element;
2271
+ onclick?: React.MouseEventHandler<HTMLAnchorElement> & React.MouseEventHandler<HTMLButtonElement>;
2272
+ }[];
2273
+ /**
2274
+ * Avatar image
2275
+ */
2276
+ avatar?: string;
2277
+ /**
2278
+ * Avatar name
2279
+ */
2280
+ avatarName?: string;
2281
+ /**
2282
+ * Avatar click
2283
+ */
2284
+ onClickAvatar?: React.MouseEventHandler<HTMLDivElement> | undefined;
2285
+ /**
2286
+ * Children component
2287
+ */
2288
+ children?: React.ReactNode;
2289
+ }
2290
+ export const OrHeader: React.FC<OrHeaderProps>;
2291
+ export interface OrDashboardLayoutProps {
2292
+ /**
2293
+ * Indicate if the menu is collapsed
2294
+ */
2295
+ collapsed?: boolean;
2296
+ /**
2297
+ * Children components
2298
+ */
2299
+ children?: React.ReactNode;
2300
+ /**
2301
+ * Menu items to show in sider menu
2302
+ */
2303
+ menuItems?: OrSiderMenuProps['items'];
2304
+ /**
2305
+ * On click collapsed button
2306
+ */
2307
+ onClickCollapsed?: () => void;
2308
+ /**
2309
+ * Called when a menu item is clicked
2310
+ */
2311
+ onClick?: OrSiderMenuProps['onClick'];
2312
+ /**
2313
+ * Called when a bottom menu item is clicked
2314
+ */
2315
+ onClickBottomItems?: OrSiderMenuProps['onClick'];
2316
+ /**
2317
+ * Called when a menu item is selected
2318
+ */
2319
+ onSelect?: OrSiderMenuProps['onSelect'];
2320
+ /**
2321
+ * Called when a region item is selected
2322
+ */
2323
+ onSelectCountry?: OrHeaderProps['onSelect'];
2324
+ /**
2325
+ * Header select options
2326
+ */
2327
+ countrySelectOptions?: OrHeaderProps['countrySelectOptions'];
2328
+ /**
2329
+ * Header nav items
2330
+ */
2331
+ navItems?: OrHeaderProps['navItems'];
2332
+ /**
2333
+ * Header avatar
2334
+ */
2335
+ avatar?: OrHeaderProps['avatar'];
2336
+ /**
2337
+ * Header avatar name
2338
+ */
2339
+ avatarName?: OrHeaderProps['avatarName'];
2340
+ /**
2341
+ * Default selected country
2342
+ */
2343
+ selectValue?: OrHeaderProps['selectValue'];
2344
+ /**
2345
+ * Nav item at the end of the sider
2346
+ */
2347
+ bottomItems?: OrSiderMenuProps['bottomItems'];
2348
+ }
2349
+ export const OrDashboardLayout: React.FC<OrDashboardLayoutProps>;
2350
+ export interface OrDrawerProps {
2351
+ /**
2352
+ * The ID for input
2353
+ */
2354
+ id?: string;
2355
+ /**
2356
+ * Whether Drawer should get focused after open
2357
+ */
2358
+ autoFocus?: boolean;
2359
+ /**
2360
+ * Callback after the animation ends when switching drawers
2361
+ */
2362
+ afterOpenChange?: (open: boolean) => void;
2363
+ /**
2364
+ * Style of the drawer content part
2365
+ */
2366
+ bodyStyle?: CSSProperties;
2367
+ /**
2368
+ * Config Drawer Panel className. Use rootClassName if want to config top dom style
2369
+ */
2370
+ className?: string;
2371
+ /**
2372
+ * Custom close icon. 5.7.0: close button will be hidden when setting to null or false
2373
+ */
2374
+ closeIcon?: boolean | ReactNode;
2375
+ /**
2376
+ * Style of the drawer wrapper of content part
2377
+ */
2378
+ contentWrapperStyle?: CSSProperties;
2379
+ /**
2380
+ * Whether to unmount child components on closing drawer or not
2381
+ */
2382
+ destroyOnClose?: boolean;
2383
+ /**
2384
+ * Extra actions area at corner
2385
+ */
2386
+ extra?: ReactNode;
2387
+ /**
2388
+ * The footer for Drawer
2389
+ */
2390
+ footer?: ReactNode;
2391
+ /**
2392
+ * Style of the drawer footer part
2393
+ */
2394
+ footerStyle?: CSSProperties;
2395
+ /**
2396
+ * Pre-render Drawer component forcibly
2397
+ */
2398
+ forceRender?: boolean;
2399
+ /**
2400
+ * mounted node and display window for Drawer
2401
+ */
2402
+ getContainer?: DrawerProps['getContainer'];
2403
+ /**
2404
+ * Style of the drawer header part
2405
+ */
2406
+ headerStyle?: CSSProperties;
2407
+ /**
2408
+ * Placement is top or bottom, height of the Drawer dialog
2409
+ */
2410
+ height?: string | number;
2411
+ /**
2412
+ * Whether support press esc to close
2413
+ */
2414
+ keyboard?: boolean;
2415
+ /**
2416
+ * Whether to show mask or not
2417
+ */
2418
+ mask?: boolean;
2419
+ /**
2420
+ * Clicking on the mask (area outside the Drawer) to close the Drawer or not
2421
+ */
2422
+ maskClosable?: boolean;
2423
+ /**
2424
+ * Style for Drawer's mask element
2425
+ */
2426
+ maskStyle?: CSSProperties;
2427
+ /**
2428
+ * The placement of the Drawer
2429
+ */
2430
+ placement?: 'top' | 'right' | 'bottom' | 'left';
2431
+ /**
2432
+ * Nested drawers push behavior
2433
+ */
2434
+ push?: boolean | {
2435
+ distance: string | number;
2436
+ };
2437
+ /**
2438
+ * The class name of the container of the Drawer dialog
2439
+ */
2440
+ rootClassName?: string;
2441
+ /**
2442
+ * Style of wrapper element which contains mask compare to style
2443
+ */
2444
+ rootStyle?: CSSProperties;
2445
+ /**
2446
+ * Style of Drawer panel. Use bodyStyle if want to config body only
2447
+ */
2448
+ style?: CSSProperties;
2449
+ /**
2450
+ * preset size of drawer, default 378px and large 736px
2451
+ */
2452
+ size?: 'default' | 'large';
2453
+ /**
2454
+ * The title for Drawer
2455
+ */
2456
+ title?: ReactNode;
2457
+ /**
2458
+ * Whether the Drawer dialog is visible or not
2459
+ */
2460
+ open?: boolean;
2461
+ /**
2462
+ * Width of the Drawer dialog
2463
+ */
2464
+ width?: string | number;
2465
+ /**
2466
+ * The z-index of the Drawer
2467
+ */
2468
+ zIndex?: number;
2469
+ /**
2470
+ * Specify a callback that will be called when a user clicks mask, close button or Cancel button
2471
+ */
2472
+ onClose?: (e: React.MouseEvent | React.KeyboardEvent) => void;
2473
+ /**
2474
+ * Children of the drawer
2475
+ */
2476
+ children?: React.ReactNode;
2477
+ }
2478
+ export const OrDrawer: React.FC<OrDrawerProps>;
2479
+ export interface OrFlagGridProps {
2480
+ /**
2481
+ * The ID for cards
2482
+ */
2483
+ id?: string;
2484
+ /**
2485
+ * Country data to show elements into the grid
2486
+ */
2487
+ data?: OrCountryCardProps[];
2488
+ /**
2489
+ * Number of items that can contain a row
2490
+ */
2491
+ itemsPerRow?: number;
2492
+ /**
2493
+ * Index selected Item
2494
+ */
2495
+ selectedItem?: number;
2496
+ /**
2497
+ * Callback when card is clicked
2498
+ */
2499
+ onSelectCard?: (index: number) => void;
2500
+ }
2501
+ export const OrFlagGrid: React.FC<OrFlagGridProps>;
2502
+ export interface OrFormProps extends FormProps {
2503
+ children: React.ReactNode;
2504
+ }
2505
+ export const OrForm: React.FC<OrFormProps>;
2506
+ export interface AtSpaceCompactProps {
2507
+ /**
2508
+ * The ID for input
2509
+ */
2510
+ id?: string;
2511
+ /**
2512
+ * Option to fit width to its parent's width
2513
+ */
2514
+ block?: boolean;
2515
+ /**
2516
+ * Set direction of layout
2517
+ */
2518
+ direction?: 'vertical' | 'horizontal';
2519
+ /**
2520
+ * Set child component size
2521
+ */
2522
+ size?: 'large' | 'middle' | 'small';
2523
+ /**
2524
+ * Children of the OrSpace
2525
+ */
2526
+ children?: React.ReactNode;
2527
+ }
2528
+ export const OrSpaceCompact: React.FC<AtSpaceCompactProps>;
2529
+ export interface OrPhoneInputProps {
2530
+ /**
2531
+ * Dial codes options
2532
+ */
2533
+ options: AtSelectProps['options'];
2534
+ /**
2535
+ * Disabled input
2536
+ */
2537
+ disabled?: boolean;
2538
+ /**
2539
+ * Rules for validation
2540
+ * @default []
2541
+ */
2542
+ rules?: MlFromItemProps['rules'];
2543
+ }
2544
+ export const OrPhoneInput: React.FC<OrPhoneInputProps>;
2545
+ export interface OrNameInputProps {
2546
+ /**
2547
+ * Rules for validation
2548
+ * @default []
2549
+ */
2550
+ rules?: MlFromItemProps['rules'];
2551
+ /**
2552
+ * inputs label
2553
+ */
2554
+ label?: string | string[];
2555
+ }
2556
+ export const OrNameInput: React.FC<OrNameInputProps>;
2557
+ export interface OrFormInLineItem {
2558
+ /**
2559
+ * Type of components available for the form
2560
+ */
2561
+ component: 'radio' | 'number-input' | 'checkbox' | 'select' | 'select-multiple' | 'text' | 'phone' | 'date-picker' | 'cvc' | 'name';
2562
+ /**
2563
+ * Label of the field
2564
+ */
2565
+ label?: string | string[];
2566
+ /**
2567
+ * Key identifier
2568
+ */
2569
+ key?: string;
2570
+ /**
2571
+ * Field name (develop purpose)
2572
+ */
2573
+ fieldName: string;
2574
+ /**
2575
+ * Place holder (only for inputs)
2576
+ */
2577
+ placeHolder?: string;
2578
+ /**
2579
+ * Children of the FormItems (Recursive Form)
2580
+ */
2581
+ children?: OrFormItemsInlineProps | React.ReactElement | string;
2582
+ /**
2583
+ * Specifies options for fields that allows options
2584
+ */
2585
+ options?: MlRadioGroupProps['options'] | MlCheckboxGroup['options'] | AtSelectProps['options'];
2586
+ /**
2587
+ * Rules for field validation. Click [here](https://ant.design/components/form#components-form-demo-basic) to see an example
2588
+ */
2589
+ rules?: MlFromItemProps['rules'];
2590
+ hidden?: boolean;
2591
+ disabled?: boolean;
2592
+ styles?: CSSProperties;
2593
+ addonAfter?: ReactNode;
2594
+ onSearch?: (value: string) => any;
2595
+ showSearch?: boolean;
2596
+ onChange?: (value: any, option: DefaultOptionType | Array<DefaultOptionType>) => any;
2597
+ /**
2598
+ * Format of the date
2599
+ */
2600
+ format?: string;
2601
+ }
2602
+ export interface OrFormItemsInlineProps {
2603
+ inputs?: OrFormInLineItem[];
2604
+ }
2605
+ export const OrFormItemsInline: React.FC<OrFormItemsInlineProps>;
2606
+ export interface OrTableModuleLayoutProps {
2607
+ /**
2608
+ * Page title
2609
+ */
2610
+ title?: string;
2611
+ /**
2612
+ * page subtitle
2613
+ */
2614
+ subtitle?: string;
2615
+ /**
2616
+ * subtitle Content
2617
+ */
2618
+ subtitleContent?: string;
2619
+ /**
2620
+ * Children component
2621
+ */
2622
+ children?: React.ReactNode;
2623
+ }
2624
+ export const OrTableModuleLayout: React.FC<OrTableModuleLayoutProps>;
2625
+ export interface OrHeaderBalanceProps {
2626
+ /**
2627
+ * The title of the drawer
2628
+ */
2629
+ title?: string;
2630
+ /**
2631
+ * The subtitle of the drawer
2632
+ */
2633
+ subtitle?: string;
2634
+ /**
2635
+ * The balance of the drawer
2636
+ */
2637
+ balance?: string;
2638
+ }
2639
+ export const OrHeaderBalance: React.FC<OrHeaderBalanceProps>;
2640
+ export interface OrLoginLayoutProps {
2641
+ /**
2642
+ * Carousel image background source
2643
+ */
2644
+ $carouselBackgroundSrc?: string;
2645
+ /**
2646
+ * Images to show into carousel
2647
+ */
2648
+ carouselImages: string[];
2649
+ /**
2650
+ * Content to render into layout
2651
+ */
2652
+ children?: React.ReactNode;
2653
+ }
2654
+ export const OrLoginLayout: React.FC<OrLoginLayoutProps>;
2655
+ type ConfigUpdate = ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps);
2656
+ export type instanceModal = {
2657
+ destroy: () => void;
2658
+ update: (configUpdate: ConfigUpdate) => void;
2659
+ } | null;
2660
+ interface OrModalProps {
2661
+ /**
2662
+ * Specify a function that will be called when modal is closed completely
2663
+ */
2664
+ afterClose?: () => void;
2665
+ /**
2666
+ * Body style for modal body element. Such as height, padding etc
2667
+ */
2668
+ bodyStyle?: React.CSSProperties;
2669
+ /**
2670
+ * The cancel button props
2671
+ */
2672
+ cancelButtonProps?: ModalProps['cancelButtonProps'];
2673
+ /**
2674
+ * Text of the Cancel button
2675
+ */
2676
+ cancelText?: React.ReactNode;
2677
+ /**
2678
+ * Centered Modal
2679
+ */
2680
+ centered?: boolean;
2681
+ /**
2682
+ * Custom close icon. 5.7.0: close button will be hidden when setting to null or false
2683
+ */
2684
+ closeIcon?: React.ReactNode;
2685
+ /**
2686
+ * Whether to apply loading visual effect for OK button or not
2687
+ */
2688
+ confirmLoading?: boolean;
2689
+ /**
2690
+ * Whether to unmount child components on onClose
2691
+ */
2692
+ destroyOnClose?: boolean;
2693
+ /**
2694
+ * Footer content, set as footer={null} when you don't need default buttons
2695
+ */
2696
+ footer?: React.ReactNode;
2697
+ /**
2698
+ * Force render Modal
2699
+ */
2700
+ forceRender?: boolean;
2701
+ /**
2702
+ * The mounted node for Modal but still display at fullscreen
2703
+ */
2704
+ getContainer?: ModalProps['getContainer'];
2705
+ /**
2706
+ * Whether support press esc to close
2707
+ */
2708
+ keyboard?: boolean;
2709
+ /**
2710
+ * Whether show mask or not
2711
+ */
2712
+ mask?: boolean;
2713
+ /**
2714
+ * Whether to close the modal dialog when the mask (area outside the modal) is clicked
2715
+ */
2716
+ maskClosable?: boolean;
2717
+ /**
2718
+ * Style for modal's mask element
2719
+ */
2720
+ maskStyle?: React.CSSProperties;
2721
+ /**
2722
+ * Custom modal content render
2723
+ */
2724
+ modalRender?: (node: React.ReactNode) => React.ReactNode;
2725
+ /**
2726
+ * The ok button props
2727
+ */
2728
+ okButtonProps?: ModalProps['okButtonProps'];
2729
+ /**
2730
+ * Text of the OK button
2731
+ */
2732
+ okText?: React.ReactNode;
2733
+ /**
2734
+ * Button type of the OK button
2735
+ */
2736
+ okType?: ModalProps['okType'];
2737
+ /**
2738
+ * The modal dialog's title
2739
+ */
2740
+ title?: ModalProps['title'];
2741
+ /**
2742
+ * Whether the modal dialog is visible or not
2743
+ */
2744
+ visible?: boolean;
2745
+ /**
2746
+ * Open Modal with async logic
2747
+ */
2748
+ open?: boolean;
2749
+ /**
2750
+ * Width of the modal dialog
2751
+ */
2752
+ width?: string | number;
2753
+ /**
2754
+ * The class name of the container of the modal dialog
2755
+ */
2756
+ wrapClassName?: string;
2757
+ /**
2758
+ * The z-index of the Modal
2759
+ */
2760
+ zIndex?: number;
2761
+ /**
2762
+ * Specify a function that will be called when a user clicks mask, close button on top right or Cancel button
2763
+ */
2764
+ onCancel?: (e: React.MouseEvent<HTMLElement>) => void;
2765
+ /**
2766
+ * Specify a function that will be called when a user clicks the OK button
2767
+ */
2768
+ onOk?: (e: React.MouseEvent<HTMLElement>) => void;
2769
+ /**
2770
+ * Callback when the animation ends when Modal is turned on and off
2771
+ */
2772
+ afterOpenChange?: ((open: boolean) => void) | undefined;
2773
+ /**
2774
+ * children of Modal
2775
+ */
2776
+ children?: React.ReactNode;
2777
+ /**
2778
+ * Content of the confirm dialog
2779
+ */
2780
+ content?: string | React.ReactNode;
2781
+ }
2782
+ export const OrModal: React.FC<OrModalProps>;
2783
+ export interface OrModuleTableHeaderProps {
2784
+ /**
2785
+ * Title of the module table header
2786
+ */
2787
+ title?: string;
2788
+ /**
2789
+ * Search box placeholder
2790
+ */
2791
+ searchBoxPlaceholder?: string;
2792
+ /**
2793
+ * Search box value
2794
+ */
2795
+ searchBoxValue?: string;
2796
+ /**
2797
+ * Search box onChange
2798
+ */
2799
+ searchBoxOnChange?: ((e: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
2800
+ /**
2801
+ * Search box onSearch
2802
+ */
2803
+ searchBoxOnSearch?: ((value: string, event?: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLInputElement> | undefined) => void) | undefined;
2804
+ /**
2805
+ * Search box onPressEnter
2806
+ */
2807
+ searchBoxOnPressEnter?: ((event: React.KeyboardEvent<HTMLInputElement>) => void) | undefined;
2808
+ /**
2809
+ * Button value
2810
+ */
2811
+ buttonValue?: string;
2812
+ /**
2813
+ * Button onClick
2814
+ */
2815
+ buttonOnClick?: (React.MouseEventHandler<HTMLAnchorElement> & React.MouseEventHandler<HTMLButtonElement>) | undefined;
2816
+ /**
2817
+ * Custom component to render at left side
2818
+ */
2819
+ customLeftElements?: React.ReactNode;
2820
+ }
2821
+ export const OrModuleTableHeader: React.FC<OrModuleTableHeaderProps>;
2822
+ export interface OrStepProp {
2823
+ /**
2824
+ * To set the current step, counting from 0. You can overwrite this state by using status of Step
2825
+ */
2826
+ current?: number;
2827
+ /**
2828
+ * To specify the direction of the step bar, horizontal or vertical
2829
+ */
2830
+ direction?: 'horizontal' | 'vertical';
2831
+ /**
2832
+ *
2833
+ */
2834
+ initial?: number;
2835
+ /**
2836
+ * Place title and description with horizontal or vertical direction
2837
+ * */
2838
+ labelPlacement?: 'horizontal' | 'vertical';
2839
+ /**
2840
+ * Progress circle percentage of current step in process status (only works on basic Steps)
2841
+ */
2842
+ percent?: number;
2843
+ /**
2844
+ * Steps with progress dot style, customize the progress dot by setting it to a function. labelPlacement will be vertical
2845
+ */
2846
+ progressDot?: StepsProps['progressDot'];
2847
+ /**
2848
+ * Change to vertical direction when screen width smaller than 532px
2849
+ */
2850
+ responsive?: boolean;
2851
+ /**
2852
+ * To specify the size of the step bar, default and small are currently supported
2853
+ */
2854
+ size?: 'default' | 'small';
2855
+ /**
2856
+ * To specify the status of current step, can be set to one of the following values: wait process finish error
2857
+ */
2858
+ status?: 'wait' | 'process' | 'finish' | 'error';
2859
+ /**
2860
+ * Type of steps, can be set to one of the following values: default navigation inline
2861
+ */
2862
+ type?: 'default' | 'navigation' | 'inline';
2863
+ /**
2864
+ * Trigger when Step is changed
2865
+ */
2866
+ onChange?: (current: number) => void;
2867
+ /**
2868
+ * StepItem content
2869
+ */
2870
+ items?: StepsProps['items'];
2871
+ /**
2872
+ * Element margin
2873
+ */
2874
+ $margin?: string;
2875
+ }
2876
+ export const OrStep: React.FC<OrStepProp>;
2877
+ interface _IFormData1 {
2878
+ businessName?: string;
2879
+ name?: string;
2880
+ rif?: string;
2881
+ phone: {
2882
+ dialCode: string;
2883
+ phone: string;
2884
+ };
2885
+ city?: string;
2886
+ }
2887
+ export interface IFormStep {
2888
+ title: string;
2889
+ inputs?: OrFormItemsInlineProps['inputs'];
2890
+ submitButtonText?: string;
2891
+ image?: string;
2892
+ cancelButtonText?: string;
2893
+ onCancelClick?: () => void;
2894
+ formInitialItems?: _IFormData1;
2895
+ form?: OrFormProps['form'];
2896
+ onFinish?: (e: any) => void;
2897
+ cancelBtnIcon?: ReactNode;
2898
+ }
2899
+ export interface TmCrudPageProps {
2900
+ /**
2901
+ * Columns of table
2902
+ */
2903
+ columns: OrTableProps['columns'];
2904
+ /**
2905
+ * Data record array to be displayed
2906
+ */
2907
+ data: OrTableProps['dataSource'];
2908
+ /**
2909
+ * Loading status of table
2910
+ */
2911
+ loadingTable?: OrTableProps['loading'];
2912
+ /**
2913
+ * Config of pagination. You can ref table pagination config or full pagination document, hide it by setting it to false
2914
+ */
2915
+ pagination?: OrTableProps['pagination'];
2916
+ /**
2917
+ * Row's unique key, could be a string or function that returns a string
2918
+ */
2919
+ rowKey?: OrTableProps['rowKey'];
2920
+ /**
2921
+ * On change form content
2922
+ */
2923
+ onValuesChange?: OrFormProps['onValuesChange'];
2924
+ /**
2925
+ * On press cancel and close button function
2926
+ */
2927
+ handleCloseCallback?: () => void;
2928
+ /**
2929
+ * State of the drawer
2930
+ */
2931
+ open?: boolean;
2932
+ /**
2933
+ * Page title
2934
+ */
2935
+ title?: string;
2936
+ /**
2937
+ * Page subtitle
2938
+ */
2939
+ subtitle?: string;
2940
+ /**
2941
+ * Page subtitle content
2942
+ */
2943
+ subContent?: string;
2944
+ /**
2945
+ * Page table title
2946
+ */
2947
+ tableTitle?: string;
2948
+ /**
2949
+ * Button value text
2950
+ */
2951
+ buttonAddText?: string;
2952
+ /**
2953
+ * Callback when add button is pressed
2954
+ */
2955
+ addButtonOnClick?: OrModuleTableHeaderProps['buttonOnClick'];
2956
+ /**
2957
+ * Callback when pagination changes
2958
+ */
2959
+ onChangePagination?: MlPaginationProps['onChange'];
2960
+ /**
2961
+ * Total table elements
2962
+ */
2963
+ total?: MlPaginationProps['total'];
2964
+ /**
2965
+ * Way to display total pagination table
2966
+ */
2967
+ showTotal?: MlPaginationProps['showTotal'];
2968
+ /**
2969
+ * Table page size
2970
+ */
2971
+ pageSize?: MlPaginationProps['pageSize'];
2972
+ /**
2973
+ * Current page table
2974
+ */
2975
+ currentPage?: number;
2976
+ /**
2977
+ * Disable buttons drawer
2978
+ */
2979
+ disabledButtons?: boolean;
2980
+ /**
2981
+ * Form Steps info
2982
+ */
2983
+ formSteps: IFormStep[];
2984
+ /**
2985
+ * current step
2986
+ */
2987
+ currentFormStep?: number;
2988
+ /**
2989
+ * Search table elements
2990
+ */
2991
+ searchBoxOnSearch?: OrModuleTableHeaderProps['searchBoxOnSearch'];
2992
+ /**
2993
+ * title of drawer
2994
+ */
2995
+ titleLeftDrawer?: ReactNode;
2996
+ /**
2997
+ * Specify a callback that will be called when a user clicks mask, close button or Cancel button
2998
+ */
2999
+ onCloseLeftDrawer?: (e: React.MouseEvent | React.KeyboardEvent) => void;
3000
+ /**
3001
+ * whether left drawer is open or close
3002
+ */
3003
+ openLeftDrawer?: boolean;
3004
+ /**
3005
+ * Children for Left Drawer
3006
+ */
3007
+ leftDrawerContent?: React.ReactNode;
3008
+ /**
3009
+ * Custom component to render at left side of table header
3010
+ */
3011
+ tableHeaderCustomLeftElements?: React.ReactNode;
3012
+ /**
3013
+ * Drawer Width
3014
+ */
3015
+ leftDrawerWidth?: number;
3016
+ /**
3017
+ * searchBox placeHolder
3018
+ */
3019
+ searchBoxPlaceholder?: string;
3020
+ }
3021
+ export const TmCrudPage: React.FC<TmCrudPageProps>;
3022
+ export interface OrSimpleBannerProps {
3023
+ /**
3024
+ * Id of the OrSimpleBannerProps
3025
+ */
3026
+ id?: string;
3027
+ /**
3028
+ * Background image for banner
3029
+ */
3030
+ $backgroundSrc?: string;
3031
+ }
3032
+ export const OrSimpleBanner: React.FC<OrSimpleBannerProps>;
3033
+ export interface TmLoginCountryProps {
3034
+ data?: OrCountryCardProps[];
3035
+ title?: string;
3036
+ itemsPerRow?: number;
3037
+ $backgroundSrc?: string;
3038
+ /**
3039
+ * Index selected Item
3040
+ */
3041
+ selectedItem?: number;
3042
+ /**
3043
+ * Callback when card is clicked
3044
+ */
3045
+ onSelectCard?: (index: number) => void;
3046
+ }
3047
+ export const TmLoginCountry: React.FC<TmLoginCountryProps>;
3048
+ export interface IRegion {
3049
+ id: string;
3050
+ countryName: string;
3051
+ region: string;
3052
+ city: string;
3053
+ }
3054
+ export interface IFormData {
3055
+ phone: {
3056
+ dialCode: string;
3057
+ phone: string;
3058
+ };
3059
+ }
3060
+ export interface TmLoginPhoneProps {
3061
+ countrySelectOptions?: IRegion[];
3062
+ /**
3063
+ * Welcome title
3064
+ */
3065
+ title?: string;
3066
+ /**
3067
+ * Highlighted text into title
3068
+ */
3069
+ highlightedTitle?: string;
3070
+ /**
3071
+ * Submit button text
3072
+ */
3073
+ buttonText: string;
3074
+ /**
3075
+ * Form init values
3076
+ */
3077
+ initialValues?: IFormData;
3078
+ /**
3079
+ * Dial codes available
3080
+ */
3081
+ dialCodes: string[];
3082
+ /**
3083
+ * Phone regex validation
3084
+ */
3085
+ phoneRegex?: RegExp;
3086
+ /**
3087
+ * Phone validation message
3088
+ */
3089
+ phoneValidationMessage?: string;
3090
+ /**
3091
+ * Phone validation input message
3092
+ */
3093
+ ruleMessage?: string;
3094
+ /**
3095
+ * On submit function
3096
+ */
3097
+ onFinish?: FormProps['onFinish'];
3098
+ /**
3099
+ * Form ref
3100
+ */
3101
+ form?: FormProps['form'];
3102
+ /**
3103
+ * Show country select
3104
+ */
3105
+ showCountrySelect?: boolean;
3106
+ }
3107
+ export const TmLoginPhone: React.FC<TmLoginPhoneProps>;
3108
+ export interface TmLoginPhoneCodeProps {
3109
+ /**
3110
+ * Page title
3111
+ */
3112
+ title: string;
3113
+ /**
3114
+ * Page title highlighted
3115
+ */
3116
+ highlightedTitle: string;
3117
+ /**
3118
+ * Page description
3119
+ */
3120
+ description: string;
3121
+ /**
3122
+ * Button text
3123
+ */
3124
+ buttonText: string;
3125
+ /**
3126
+ * On submit function
3127
+ */
3128
+ onFinish?: FormProps['onFinish'];
3129
+ /**
3130
+ * Form ref
3131
+ */
3132
+ form?: FormProps['form'];
3133
+ /**
3134
+ * Countdown description
3135
+ */
3136
+ countdownDescription?: string;
3137
+ /**
3138
+ * Countdown value
3139
+ */
3140
+ countdownValue?: number;
3141
+ /**
3142
+ * Countdown format
3143
+ */
3144
+ countdownFormat?: string;
3145
+ /**
3146
+ * Indicate if the count down ended
3147
+ */
3148
+ countdownEnded?: boolean;
3149
+ /**
3150
+ * Callback triggered when countdown ends
3151
+ */
3152
+ onFinishCountdown?: () => void;
3153
+ /**
3154
+ * Countdown text part
3155
+ */
3156
+ countdownText?: [string, string];
3157
+ /**
3158
+ * Send again text
3159
+ */
3160
+ sendAgainText?: string;
3161
+ /**
3162
+ * Function to call when resend is press it
3163
+ */
3164
+ onResendPress?: () => void;
3165
+ }
3166
+ export const TmLoginPhoneCode: React.FC<TmLoginPhoneCodeProps>;
3167
+ export interface TmRechargePageProps {
3168
+ /**
3169
+ * Page title
3170
+ */
3171
+ title?: string;
3172
+ /**
3173
+ * page subtitle
3174
+ */
3175
+ subtitle?: string;
3176
+ /**
3177
+ * page subtitle content
3178
+ */
3179
+ balance?: string;
3180
+ /**
3181
+ * The title of the card
3182
+ */
3183
+ cardTitle: string;
3184
+ /**
3185
+ * number of digits (input) to show
3186
+ */
3187
+ digits?: number;
3188
+ /**
3189
+ * The input content value
3190
+ */
3191
+ value?: number;
3192
+ /**
3193
+ * Callback when user input amount
3194
+ */
3195
+ onChangeAmount?: ((value: string | number | null) => void) | undefined;
3196
+ /**
3197
+ * Callback when user input coupon
3198
+ */
3199
+ couponOnChange?: ((e: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
3200
+ /**
3201
+ * font size of the input
3202
+ */
3203
+ fontSize?: string;
3204
+ /**
3205
+ * height of the input
3206
+ */
3207
+ height?: string;
3208
+ /**
3209
+ * rule for the amount input
3210
+ */
3211
+ ruleAmount?: MlFromItemProps['rules'];
3212
+ /**
3213
+ * rule for the coupon input
3214
+ */
3215
+ ruleCoupon?: MlFromItemProps['rules'];
3216
+ /**
3217
+ * Form ref
3218
+ */
3219
+ form?: FormProps['form'];
3220
+ /**
3221
+ * Form init values
3222
+ */
3223
+ initialValues?: IFormData;
3224
+ /**
3225
+ * On submit function
3226
+ */
3227
+ onFinish?: FormProps['onFinish'];
3228
+ /**
3229
+ * Coupon button text
3230
+ */
3231
+ couponBtn?: string;
3232
+ /**
3233
+ * Amount placeholder
3234
+ */
3235
+ amountPlaceholder?: string;
3236
+ /**
3237
+ * Coupon placeholder
3238
+ */
3239
+ couponPlaceholder?: string;
3240
+ /**
3241
+ * Radio group items
3242
+ */
3243
+ radioGroupItems?: MlRadioGroupProps['options'];
3244
+ /**
3245
+ * Radio group default value
3246
+ */
3247
+ radioDefaultValue?: string;
3248
+ /**
3249
+ * Amount to pay text
3250
+ */
3251
+ amountToPayText?: string;
3252
+ /**
3253
+ * Amount to pay
3254
+ */
3255
+ amountToPay?: string;
3256
+ /**
3257
+ * Coupon text
3258
+ */
3259
+ couponText?: string;
3260
+ /**
3261
+ * Discount
3262
+ */
3263
+ discount?: string;
3264
+ /**
3265
+ * Total text
3266
+ */
3267
+ totalText?: string;
3268
+ /**
3269
+ * Total
3270
+ */
3271
+ total?: string;
3272
+ /**
3273
+ * Tax text
3274
+ */
3275
+ taxText?: string;
3276
+ /**
3277
+ * Tax
3278
+ */
3279
+ tax?: string;
3280
+ /**
3281
+ * Pay button text
3282
+ */
3283
+ payBtn?: string;
3284
+ /**
3285
+ * Apply coupon click
3286
+ */
3287
+ applyCouponClick?: () => void;
3288
+ /**
3289
+ * Pay click
3290
+ */
3291
+ payClick?: () => void;
3292
+ /**
3293
+ * The title of the drawer
3294
+ */
3295
+ drawerTitle?: string;
3296
+ /**
3297
+ * Whether the Drawer dialog is visible or not
3298
+ */
3299
+ open?: boolean;
3300
+ /**
3301
+ * payment Methods
3302
+ */
3303
+ paymentMethods: PaymentMethod[];
3304
+ /**
3305
+ * Form Steps info
3306
+ */
3307
+ currentPaymentSelectedFields: IFormStep;
3308
+ /**
3309
+ * on value change function
3310
+ */
3311
+ onValuesChange?: (changedValues: any, allValues: any) => void;
3312
+ /**
3313
+ * Disable continue button drawer
3314
+ */
3315
+ disabledButton?: boolean;
3316
+ /**
3317
+ * Show payment methods
3318
+ */
3319
+ showPaymentMethods?: boolean;
3320
+ /**
3321
+ * terms and conditions disclaimer
3322
+ */
3323
+ temsDisclaimer?: string;
3324
+ /**
3325
+ * terms and conditions change
3326
+ */
3327
+ termsChange?: ((e: CheckboxChangeEvent) => void) | undefined;
3328
+ /**
3329
+ * onCloseDrawer function
3330
+ */
3331
+ onCloseDrawer?: (e: React.MouseEvent | React.KeyboardEvent) => void;
3332
+ }
3333
+ export const TmRechargePage: React.FC<TmRechargePageProps>;
3334
+ export interface OrPaymentCardProps {
3335
+ /**
3336
+ * The title of the card
3337
+ */
3338
+ cardTitle: string;
3339
+ /**
3340
+ * Callback when user input amount
3341
+ */
3342
+ onChangeAmount?: ((value: string | number | null) => void) | undefined;
3343
+ /**
3344
+ * Callback when user input coupon
3345
+ */
3346
+ couponOnChange?: ((e: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
3347
+ /**
3348
+ * font size of the input
3349
+ */
3350
+ fontSize?: string;
3351
+ /**
3352
+ * height of the input
3353
+ */
3354
+ height?: string;
3355
+ /**
3356
+ * rule for the amount input
3357
+ */
3358
+ ruleAmount?: MlFromItemProps['rules'];
3359
+ /**
3360
+ * rule for the coupon input
3361
+ */
3362
+ ruleCoupon?: MlFromItemProps['rules'];
3363
+ /**
3364
+ * Form ref
3365
+ */
3366
+ form?: FormProps['form'];
3367
+ /**
3368
+ * Form init values
3369
+ */
3370
+ initialValues?: IFormData;
3371
+ /**
3372
+ * On submit function
3373
+ */
3374
+ onFinish?: FormProps['onFinish'];
3375
+ /**
3376
+ * Coupon button text
3377
+ */
3378
+ couponBtn?: string;
3379
+ /**
3380
+ * Amount placeholder
3381
+ */
3382
+ amountPlaceholder?: string;
3383
+ /**
3384
+ * Coupon placeholder
3385
+ */
3386
+ couponPlaceholder?: string;
3387
+ /**
3388
+ * Radio group items
3389
+ */
3390
+ radioGroupItems?: MlRadioGroupProps['options'];
3391
+ /**
3392
+ * Radio group default value
3393
+ */
3394
+ radioDefaultValue?: string;
3395
+ /**
3396
+ * Amount to pay text
3397
+ */
3398
+ amountToPayText?: string;
3399
+ /**
3400
+ * Amount to pay
3401
+ */
3402
+ amountToPay?: string;
3403
+ /**
3404
+ * Coupon text
3405
+ */
3406
+ couponText?: string;
3407
+ /**
3408
+ * Discount
3409
+ */
3410
+ discount?: string;
3411
+ /**
3412
+ * Total text
3413
+ */
3414
+ totalText?: string;
3415
+ /**
3416
+ * Total
3417
+ */
3418
+ total?: string;
3419
+ /**
3420
+ * Tax text
3421
+ */
3422
+ taxText?: string;
3423
+ /**
3424
+ * Tax
3425
+ */
3426
+ tax?: string;
3427
+ /**
3428
+ * Pay button text
3429
+ */
3430
+ payBtn?: string;
3431
+ /**
3432
+ * Apply coupon click
3433
+ */
3434
+ applyCouponClick?: () => void;
3435
+ /**
3436
+ * Pay click
3437
+ */
3438
+ payClick?: () => void;
3439
+ /**
3440
+ * onChange radio group
3441
+ */
3442
+ onChangeRadio?: MlRadioGroupProps['onChange'];
3443
+ }
3444
+ export const OrPaymentCard: React.FC<OrPaymentCardProps>;
3445
+ export interface PaymentMethod {
3446
+ value: string;
3447
+ icon?: React.ReactNode;
3448
+ onClick: (value: string) => void;
3449
+ }
3450
+ export interface OrPaymentMethodsProps {
3451
+ /**
3452
+ * The title of the drawer
3453
+ */
3454
+ drawerTitle?: string;
3455
+ /**
3456
+ * Whether the Drawer dialog is visible or not
3457
+ */
3458
+ open?: boolean;
3459
+ /**
3460
+ * payment Methods
3461
+ */
3462
+ paymentMethods: PaymentMethod[];
3463
+ /**
3464
+ * Form Steps info
3465
+ */
3466
+ currentPaymentSelectedFields?: IFormStep;
3467
+ /**
3468
+ * on value change function
3469
+ */
3470
+ onValuesChange?: (changedValues: any, allValues: any) => void;
3471
+ /**
3472
+ * Disable continue button drawer
3473
+ */
3474
+ disabledButton?: boolean;
3475
+ /**
3476
+ * Show payment methods
3477
+ */
3478
+ showPaymentMethods?: boolean;
3479
+ /**
3480
+ * terms and conditions disclaimer
3481
+ */
3482
+ temsDisclaimer?: string;
3483
+ /**
3484
+ * terms and conditions change
3485
+ */
3486
+ termsChange?: ((e: CheckboxChangeEvent) => void) | undefined;
3487
+ /**
3488
+ * onCloseDrawer function
3489
+ */
3490
+ onCloseDrawer?: (e: React.MouseEvent | React.KeyboardEvent) => void;
3491
+ }
3492
+ export const OrPaymentMethods: React.FC<OrPaymentMethodsProps>;
3493
+ export interface OrRechargeProps {
3494
+ /**
3495
+ * Page title
3496
+ */
3497
+ title?: string;
3498
+ /**
3499
+ * page subtitle
3500
+ */
3501
+ subtitle?: string;
3502
+ /**
3503
+ * page subtitle content
3504
+ */
3505
+ balance?: string;
3506
+ /**
3507
+ * The title of the card
3508
+ */
3509
+ cardTitle: string;
3510
+ /**
3511
+ * number of digits (input) to show
3512
+ */
3513
+ digits?: number;
3514
+ /**
3515
+ * The input content value
3516
+ */
3517
+ value?: number;
3518
+ /**
3519
+ * Callback when user input amount
3520
+ */
3521
+ onChangeAmount?: ((value: string | number | null) => void) | undefined;
3522
+ /**
3523
+ * Callback when user input coupon
3524
+ */
3525
+ couponOnChange?: ((e: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
3526
+ /**
3527
+ * font size of the input
3528
+ */
3529
+ fontSize?: string;
3530
+ /**
3531
+ * height of the input
3532
+ */
3533
+ height?: string;
3534
+ /**
3535
+ * rule for the amount input
3536
+ */
3537
+ ruleAmount?: MlFromItemProps['rules'];
3538
+ /**
3539
+ * rule for the coupon input
3540
+ */
3541
+ ruleCoupon?: MlFromItemProps['rules'];
3542
+ /**
3543
+ * Form ref
3544
+ */
3545
+ form?: FormProps['form'];
3546
+ /**
3547
+ * Form init values
3548
+ */
3549
+ initialValues?: IFormData;
3550
+ /**
3551
+ * On submit function
3552
+ */
3553
+ onFinish?: FormProps['onFinish'];
3554
+ /**
3555
+ * Coupon button text
3556
+ */
3557
+ couponBtn?: string;
3558
+ /**
3559
+ * Amount placeholder
3560
+ */
3561
+ amountPlaceholder?: string;
3562
+ /**
3563
+ * Coupon placeholder
3564
+ */
3565
+ couponPlaceholder?: string;
3566
+ /**
3567
+ * Radio group items
3568
+ */
3569
+ radioGroupItems?: MlRadioGroupProps['options'];
3570
+ /**
3571
+ * Radio group default value
3572
+ */
3573
+ radioDefaultValue?: string;
3574
+ /**
3575
+ * Amount to pay text
3576
+ */
3577
+ amountToPayText?: string;
3578
+ /**
3579
+ * Amount to pay
3580
+ */
3581
+ amountToPay?: string;
3582
+ /**
3583
+ * Coupon text
3584
+ */
3585
+ couponText?: string;
3586
+ /**
3587
+ * Discount
3588
+ */
3589
+ discount?: string;
3590
+ /**
3591
+ * Total text
3592
+ */
3593
+ totalText?: string;
3594
+ /**
3595
+ * Total
3596
+ */
3597
+ total?: string;
3598
+ /**
3599
+ * Tax text
3600
+ */
3601
+ taxText?: string;
3602
+ /**
3603
+ * Tax
3604
+ */
3605
+ tax?: string;
3606
+ /**
3607
+ * Pay button text
3608
+ */
3609
+ payBtn?: string;
3610
+ /**
3611
+ * Apply coupon click
3612
+ */
3613
+ applyCouponClick?: () => void;
3614
+ /**
3615
+ * Pay click
3616
+ */
3617
+ payClick?: () => void;
3618
+ /**
3619
+ * onChange radio group
3620
+ */
3621
+ onChangeRadio?: MlRadioGroupProps['onChange'];
3622
+ }
3623
+ export const OrRecharge: React.FC<OrRechargeProps>;
3624
+ export interface AtSpaceProps {
3625
+ /**
3626
+ * The ID for input
3627
+ */
3628
+ id?: string;
3629
+ /**
3630
+ * Align items
3631
+ */
3632
+ align?: 'start' | 'end' | 'center' | 'baseline';
3633
+ /**
3634
+ * The space direction
3635
+ */
3636
+ direction?: 'vertical' | 'horizontal';
3637
+ /**
3638
+ * The space size
3639
+ */
3640
+ size?: SpaceProps['size'];
3641
+ /**
3642
+ * Set split
3643
+ */
3644
+ split?: ReactNode;
3645
+ /**
3646
+ * Auto wrap line, when horizontal effective
3647
+ */
3648
+ wrap?: boolean;
3649
+ /**
3650
+ * Children of the OrSpace
3651
+ */
3652
+ children?: React.ReactNode;
3653
+ }
3654
+ export const OrSpace: React.FC<AtSpaceProps>;
3655
+ export interface OrTableProps {
3656
+ /**
3657
+ * Whether to show all table borders
3658
+ */
3659
+ bordered?: boolean;
3660
+ /**
3661
+ * Columns of table
3662
+ */
3663
+ columns: TableProps<AnyObject>['columns'];
3664
+ /**
3665
+ * Data record array to be displayed
3666
+ */
3667
+ dataSource: TableProps<AnyObject>['dataSource'];
3668
+ /**
3669
+ * Loading status of table
3670
+ */
3671
+ loading?: TableProps<AnyObject>['loading'];
3672
+ /**
3673
+ * Config of pagination. You can ref table pagination config or full pagination document, hide it by setting it to false
3674
+ */
3675
+ pagination?: TableProps<AnyObject>['pagination'];
3676
+ /**
3677
+ * Row's unique key, could be a string or function that returns a string
3678
+ */
3679
+ rowKey?: TableProps<AnyObject>['rowKey'];
3680
+ /**
3681
+ * Size of table
3682
+ */
3683
+ size?: 'large' | 'middle' | 'small';
3684
+ /**
3685
+ * Set sticky header and scroll bar
3686
+ */
3687
+ sticky?: boolean;
3688
+ /**
3689
+ * Table title renderer
3690
+ */
3691
+ title?: TableProps<AnyObject>['title'];
3692
+ /**
3693
+ * Callback executed when pagination, filters or sorter is changed
3694
+ */
3695
+ onChange?: TableProps<AnyObject>['onChange'];
3696
+ }
3697
+ export const OrTable: React.FC<OrTableProps>;
3698
+ export const useMessage: () => readonly [import("antd/es/message/interface").MessageInstance, import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>];
3699
+ export const useModal: () => readonly [instance: import("antd/es/modal/useModal").HookAPI, contextHolder: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>];
3700
+ export const useForm: <T = any>() => [import("antd").FormInstance<T>];
3701
+
3702
+ //# sourceMappingURL=index.d.ts.map