@nutui/nutui-react 1.2.1 → 1.2.2-beta.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/dist/esm/ConfigProvider.js +11 -0
- package/dist/esm/DatePicker.js +148 -106
- package/dist/esm/Icon.js +4 -72
- package/dist/esm/NumberKeyboard/style/index.js +2 -0
- package/dist/esm/NumberKeyboard.js +277 -0
- package/dist/esm/Picker.js +294 -195
- package/dist/esm/Progress/style/index.js +2 -0
- package/dist/esm/Progress.js +130 -0
- package/dist/esm/Range.js +186 -129
- package/dist/esm/SearchBar/style/index.js +2 -0
- package/dist/esm/SearchBar.js +247 -0
- package/dist/esm/Signature.js +3 -0
- package/dist/esm/Tabbar.js +6 -3
- package/dist/esm/TabbarItem.js +14 -5
- package/dist/esm/Tag.js +18 -9
- package/dist/esm/icon-62bd7379.js +72 -0
- package/dist/esm/nutui-react.es.js +3 -0
- package/dist/esm/useTouch-a2ea68c6.js +119 -0
- package/dist/locales/base.d.ts +11 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +12 -1
- package/dist/locales/id-ID.js +12 -1
- package/dist/locales/zh-CN.js +12 -1
- package/dist/locales/zh-TW.js +12 -1
- package/dist/nutui.react.es.js +1308 -590
- package/dist/nutui.react.umd.js +15 -15
- package/dist/packages/numberkeyboard/numberkeyboard.scss +106 -0
- package/dist/packages/picker/picker.scss +35 -16
- package/dist/packages/progress/progress.scss +81 -0
- package/dist/packages/range/range.scss +141 -13
- package/dist/packages/searchbar/searchbar.scss +106 -0
- package/dist/packages/signature/signature.scss +4 -4
- package/dist/packages/tabbar/tabbar.scss +10 -3
- package/dist/packages/tabbaritem/tabbaritem.scss +26 -8
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +3 -0
- package/dist/styles/variables.scss +73 -6
- package/dist/types/datepicker/__test__/datepicker.spec.d.ts +1 -0
- package/dist/types/datepicker/datepicker.d.ts +16 -5
- package/dist/types/divider/__test__/divider.spec.d.ts +1 -0
- package/dist/types/navbar/__test__/navbar.spec.d.ts +1 -0
- package/dist/types/numberkeyboard/_test_/index.spec.d.ts +1 -0
- package/dist/types/numberkeyboard/demo.d.ts +3 -0
- package/dist/types/numberkeyboard/index.d.ts +2 -0
- package/dist/types/numberkeyboard/numberkeyboard.d.ts +20 -0
- package/dist/types/nutui.react.d.ts +4 -1
- package/dist/types/picker/picker.d.ts +17 -13
- package/dist/types/picker/pickerSlot.d.ts +4 -3
- package/dist/types/progress/__tests__/progress.spec.d.ts +1 -0
- package/dist/types/progress/demo.d.ts +3 -0
- package/dist/types/progress/index.d.ts +2 -0
- package/dist/types/progress/progress.d.ts +26 -0
- package/dist/types/range/demo.d.ts +1 -0
- package/dist/types/range/range.d.ts +3 -1
- package/dist/types/searchbar/demo.d.ts +3 -0
- package/dist/types/searchbar/index.d.ts +2 -0
- package/dist/types/searchbar/searchbar.d.ts +60 -0
- package/dist/types/signature/__test__/signature.spec.d.ts +2 -0
- package/dist/types/tabbar/__tests__/tabbar.spec.d.ts +1 -0
- package/dist/types/tabbar/tabbar.d.ts +2 -2
- package/dist/types/tabbaritem/tabbaritem.d.ts +4 -1
- package/dist/types/tag/tag.d.ts +1 -1
- package/package.json +2 -1
- package/dist/packages/range/custom.scss +0 -9
package/dist/style.es.js
CHANGED
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
@import '../../packages/shortpassword/shortpassword.scss';
|
|
35
35
|
@import '../../packages/textarea/textarea.scss';
|
|
36
36
|
@import '../../packages/uploader/uploader.scss';
|
|
37
|
+
@import '../../packages/searchbar/searchbar.scss';
|
|
38
|
+
@import '../../packages/numberkeyboard/numberkeyboard.scss';
|
|
37
39
|
@import '../../packages/actionsheet/actionsheet.scss';
|
|
38
40
|
@import '../../packages/backtop/backtop.scss';
|
|
39
41
|
@import '../../packages/drag/drag.scss';
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
@import '../../packages/empty/empty.scss';
|
|
63
65
|
@import '../../packages/virtuallist/virtuallist.scss';
|
|
64
66
|
@import '../../packages/video/video.scss';
|
|
67
|
+
@import '../../packages/progress/progress.scss';
|
|
65
68
|
@import '../../packages/address/address.scss';
|
|
66
69
|
@import '../../packages/barrage/barrage.scss';
|
|
67
70
|
@import '../../packages/signature/signature.scss';
|
|
@@ -260,20 +260,30 @@ $rate-icon-void-color: $disable-color;
|
|
|
260
260
|
|
|
261
261
|
// tabbar
|
|
262
262
|
|
|
263
|
-
$tabbar-active-color: $primary-color;
|
|
264
|
-
$tabbar-
|
|
263
|
+
$tabbar-active-color: $primary-color !default;
|
|
264
|
+
$tabbar-unactive-color: $primary-color !default;
|
|
265
|
+
$tabbar-border-top: 1px solid #eee !default;
|
|
266
|
+
$tabbar-border-bottom: 1px solid #eee !default;
|
|
267
|
+
$tabbar-box-shadow: none !default;
|
|
268
|
+
$tabbar-item-text-font-size: $font-size-0 !default;
|
|
269
|
+
$tabbar-item-text-line-height: initial !default;
|
|
265
270
|
|
|
266
271
|
//infiniteloading
|
|
267
272
|
$infinite-bottom-color: #c8c8c8;
|
|
268
273
|
|
|
269
274
|
//range
|
|
270
|
-
$range-
|
|
271
|
-
$
|
|
272
|
-
$
|
|
275
|
+
$range-tip-font-color: #333333 !default;
|
|
276
|
+
$range-bg-color: rgba($primary-color, 0.5) !default;
|
|
277
|
+
$range-bg-color-tick: #fa958c !default;
|
|
278
|
+
$range-bar-bg-color: linear-gradient(
|
|
273
279
|
135deg,
|
|
274
280
|
$primary-color 0%,
|
|
275
281
|
$primary-color-end 100%
|
|
276
|
-
);
|
|
282
|
+
) !default;
|
|
283
|
+
$range-bar-btn-bg-color: $white !default;
|
|
284
|
+
$range-bar-btn-width: 24px !default;
|
|
285
|
+
$range-bar-btn-height: 24px !default;
|
|
286
|
+
$range-bar-btn-border: 1px solid $primary-color !default;
|
|
277
287
|
|
|
278
288
|
//address
|
|
279
289
|
$address-region-tab-line: linear-gradient(
|
|
@@ -333,6 +343,10 @@ $radio-label-button-background: rgba(240, 37, 15, 0.05) !default;
|
|
|
333
343
|
|
|
334
344
|
// signature
|
|
335
345
|
$signature-border-color: #dadada;
|
|
346
|
+
$signature-border-width: 1px;
|
|
347
|
+
$signature-height: 10rem;
|
|
348
|
+
$signature-margin-bottom: 1rem;
|
|
349
|
+
$signature-btn-margin-right: 15px;
|
|
336
350
|
|
|
337
351
|
//fixednav
|
|
338
352
|
$fixednav-bg-color: $white;
|
|
@@ -481,6 +495,29 @@ $divider-vertical-top: 2px !default;
|
|
|
481
495
|
$divider-vertical-border-left: rgba(0, 0, 0, 0.06) !default;
|
|
482
496
|
$divider-vertical-margin: 0 8px !default;
|
|
483
497
|
|
|
498
|
+
//numberkeyboard
|
|
499
|
+
$numberkeyboard-width: 100% !default;
|
|
500
|
+
$numberkeyboard-padding: 0 0 22px 0 !default;
|
|
501
|
+
$numberkeyboard-background-color: #f2f3f5 !default;
|
|
502
|
+
$numberkeyboard-header-height: 34px !default;
|
|
503
|
+
$numberkeyboard-header-padding: 6px 0 0 0 !default;
|
|
504
|
+
$numberkeyboard-header-color: #646566 !default;
|
|
505
|
+
$numberkeyboard-header-font-size: 16px !default;
|
|
506
|
+
$numberkeyboard-header-close-padding: 0 16px !default;
|
|
507
|
+
$numberkeyboard-header-close-color: #576b95 !default;
|
|
508
|
+
$numberkeyboard-header-close-font-size: 14px !default;
|
|
509
|
+
$numberkeyboard-header-close-background-color: transparent !default;
|
|
510
|
+
$numberkeyboard-key-background-color: #fff !default;
|
|
511
|
+
$numberkeyboard-key-active-background-color: #ebedf0 !default;
|
|
512
|
+
$numberkeyboard-key-height: 48px !default;
|
|
513
|
+
$numberkeyboard-key-line-height: 1.5 !default;
|
|
514
|
+
$numberkeyboard-key-border-radius: 8px !default;
|
|
515
|
+
$numberkeyboard-key-font-size: 28px !default;
|
|
516
|
+
$numberkeyboard-key-font-size-color: #333 !default;
|
|
517
|
+
$numberkeyboard-key-finish-font-size: 16px !default;
|
|
518
|
+
$numberkeyboard-key-finish-font-size-color: #fff !default;
|
|
519
|
+
$numberkeyboard-key-finish-background-color: #1989fa !default;
|
|
520
|
+
$numberkeyboard-key-activeFinsh-background-color: #0570db !default;
|
|
484
521
|
// elevator
|
|
485
522
|
$elevator-list-item-highcolor: $primary-color !default;
|
|
486
523
|
$elevator-list-item-font-size: 12px !default;
|
|
@@ -548,6 +585,35 @@ $row-content-height: 50px !default;
|
|
|
548
585
|
$row-content-line-height: 40px !default;
|
|
549
586
|
$col-default-margin-bottom: 15px !default;
|
|
550
587
|
|
|
588
|
+
|
|
589
|
+
// searchbar
|
|
590
|
+
$searchbar-background: $white !default;
|
|
591
|
+
$searchbar-right-out-color: $black !default;
|
|
592
|
+
$searchbar-padding: 9px 16px !default;
|
|
593
|
+
$searchbar-width: 100% !default;
|
|
594
|
+
$searchbar-action-text-color: #323233 !default;
|
|
595
|
+
$searchbar-input-background: #f7f7f7 !default;
|
|
596
|
+
$searchbar-input-padding: 0 28px !default;
|
|
597
|
+
$searchbar-input-height: 32px !default;
|
|
598
|
+
$searchbar-input-width: 100% !default;
|
|
599
|
+
$searchbar-input-border-radius: 16px !default;
|
|
600
|
+
$searchbar-input-box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.04) !default;
|
|
601
|
+
|
|
602
|
+
// progress
|
|
603
|
+
$progress-border-radius: 12px !default;
|
|
604
|
+
$progress-text-padding: 0 5px !default;
|
|
605
|
+
$progress-text-font-size: 13px !default;
|
|
606
|
+
$progress-insidetext-border-radius: 5px !default;
|
|
607
|
+
$progress-small-height: 5px !default;
|
|
608
|
+
$progress-base-height: 10px !default;
|
|
609
|
+
$progress-large-height: 15px !default;
|
|
610
|
+
$progress-small-padding: 0 4px !default;
|
|
611
|
+
$progress-base-padding: 0 5px !default;
|
|
612
|
+
$progress-large-padding: 0 5px !default;
|
|
613
|
+
$progress-small-font-size: 7px !default;
|
|
614
|
+
$progress-base-font-size: 9px !default;
|
|
615
|
+
$progress-large-font-size: 13px !default;
|
|
616
|
+
|
|
551
617
|
// animatingnumbers
|
|
552
618
|
$countup-height: 32px !default;
|
|
553
619
|
$countup-base-size: 18px !default;
|
|
@@ -556,3 +622,4 @@ $countup-lr-margin: 1px !default;
|
|
|
556
622
|
$countup-bgcolor: #031f63 !default;
|
|
557
623
|
$countup-color: #ffffff !default;
|
|
558
624
|
$countup-width: 24px !default;
|
|
625
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export interface PickerOption {
|
|
3
|
+
text: string | number;
|
|
4
|
+
value: string | number;
|
|
5
|
+
disabled?: string;
|
|
6
|
+
children?: PickerOption[];
|
|
7
|
+
className?: string | number;
|
|
8
|
+
}
|
|
2
9
|
export interface DatePickerProps {
|
|
3
|
-
modelValue: Date;
|
|
10
|
+
modelValue: Date | null;
|
|
4
11
|
visible: boolean;
|
|
5
12
|
title: string;
|
|
6
|
-
type:
|
|
13
|
+
type: 'date' | 'time' | 'year-month' | 'month-day' | 'datehour' | 'datetime';
|
|
7
14
|
isShowChinese: boolean;
|
|
8
15
|
minuteStep: number;
|
|
9
16
|
minDate: Date;
|
|
10
17
|
maxDate: Date;
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
threeDimensional: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
formatter: (type: string, option: PickerOption) => PickerOption;
|
|
22
|
+
filter: (type: string, option: PickerOption[]) => PickerOption[];
|
|
13
23
|
onCloseDatePicker: () => void;
|
|
14
|
-
onConfirmDatePicker: (
|
|
24
|
+
onConfirmDatePicker: (values: (string | number)[], options: PickerOption[]) => void;
|
|
25
|
+
onChangeDatePicker: (columnIndex: string | number, values: (string | number)[], options: PickerOption[]) => void;
|
|
15
26
|
}
|
|
16
27
|
export declare const DatePicker: FunctionComponent<Partial<DatePickerProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { CSSProperties, FunctionComponent } from 'react';
|
|
2
|
+
export interface NextListObj {
|
|
3
|
+
type: string;
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface NumberKeyboardProps {
|
|
7
|
+
confirmText: string;
|
|
8
|
+
title: string;
|
|
9
|
+
visible: boolean;
|
|
10
|
+
type: string;
|
|
11
|
+
customKey: Array<string>;
|
|
12
|
+
randomKeys: boolean;
|
|
13
|
+
popClass: string;
|
|
14
|
+
className: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
onDelete?: () => void;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const NumberKeyboard: FunctionComponent<Partial<NumberKeyboardProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
@@ -33,6 +33,8 @@ import Picker from './picker';
|
|
|
33
33
|
import ShortPassword from './shortpassword';
|
|
34
34
|
import TextArea from './textarea';
|
|
35
35
|
import Uploader from './uploader';
|
|
36
|
+
import SearchBar from './searchbar';
|
|
37
|
+
import NumberKeyboard from './numberkeyboard';
|
|
36
38
|
import ActionSheet from './actionsheet';
|
|
37
39
|
import BackTop from './backtop';
|
|
38
40
|
import Drag from './drag';
|
|
@@ -61,6 +63,7 @@ import AnimatingNumbers from './animatingnumbers';
|
|
|
61
63
|
import Empty from './empty';
|
|
62
64
|
import VirtualList from './virtuallist';
|
|
63
65
|
import Video from './video';
|
|
66
|
+
import Progress from './progress';
|
|
64
67
|
import Address from './address';
|
|
65
68
|
import Barrage from './barrage';
|
|
66
69
|
import Signature from './signature';
|
|
@@ -68,4 +71,4 @@ import Card from './card';
|
|
|
68
71
|
import TimePannel from './timepannel';
|
|
69
72
|
import TimeDetail from './timedetail';
|
|
70
73
|
import TimeSelect from './timeselect';
|
|
71
|
-
export { Button, Cell, CellGroup, Icon, Overlay, Popup, ConfigProvider, Layout, Col, Row, Divider, NavBar, FixedNav, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, Range, Calendar, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, ActionSheet, BackTop, Drag, Dialog, Infiniteloading, Notify, Switch, Toast, CircleProgress, NoticeBar, Steps, Step, Swiper, SwiperItem, Avatar, AvatarGroup, Price, Badge, Tag, Popover, Skeleton, CountDown, Collapse, CollapseItem, AnimatingNumbers, Empty, VirtualList, Video, Address, Barrage, Signature, Card, TimePannel, TimeDetail, TimeSelect };
|
|
74
|
+
export { Button, Cell, CellGroup, Icon, Overlay, Popup, ConfigProvider, Layout, Col, Row, Divider, NavBar, FixedNav, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, Range, Calendar, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, SearchBar, NumberKeyboard, ActionSheet, BackTop, Drag, Dialog, Infiniteloading, Notify, Switch, Toast, CircleProgress, NoticeBar, Steps, Step, Swiper, SwiperItem, Avatar, AvatarGroup, Price, Badge, Tag, Popover, Skeleton, CountDown, Collapse, CollapseItem, AnimatingNumbers, Empty, VirtualList, Video, Progress, Address, Barrage, Signature, Card, TimePannel, TimeDetail, TimeSelect };
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import React, { RefObject } from 'react';
|
|
2
|
-
interface
|
|
2
|
+
export interface PickerOption {
|
|
3
|
+
text: string | number;
|
|
4
|
+
value: string | number;
|
|
5
|
+
disabled?: string;
|
|
6
|
+
children?: PickerOption[];
|
|
7
|
+
className?: string | number;
|
|
8
|
+
}
|
|
9
|
+
export interface IPickerProps {
|
|
3
10
|
isVisible: boolean;
|
|
4
11
|
title?: string;
|
|
5
|
-
listData:
|
|
6
|
-
defaultValueData?:
|
|
7
|
-
className
|
|
8
|
-
style
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
interface IResValue {
|
|
15
|
-
label: number;
|
|
16
|
-
value: string;
|
|
12
|
+
listData: (PickerOption | PickerOption[])[];
|
|
13
|
+
defaultValueData?: (number | string)[];
|
|
14
|
+
className?: '';
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
threeDimensional?: boolean;
|
|
17
|
+
onConfirm?: (selectedValue: (string | number)[], selectedOptions: PickerOption[]) => void;
|
|
18
|
+
onClose?: (selectedValue: (string | number)[], selectedOptions: PickerOption[]) => void;
|
|
19
|
+
onCloseUpdate?: (selectedValue: (string | number)[], list: PickerOption[], pickerRef: RefObject<HTMLDivElement>) => void;
|
|
20
|
+
onChange?: (index: number, value: (string | number)[], selectedOptions: PickerOption[]) => void;
|
|
17
21
|
}
|
|
18
22
|
declare const Picker: React.ForwardRefExoticComponent<Partial<IPickerProps> & React.RefAttributes<unknown>>;
|
|
19
23
|
export default Picker;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { PickerOption } from './picker';
|
|
2
3
|
interface IPickerSlotProps {
|
|
3
|
-
isUpdate?: boolean;
|
|
4
4
|
keyIndex?: number;
|
|
5
5
|
defaultValue?: string | number;
|
|
6
|
-
listData?:
|
|
7
|
-
|
|
6
|
+
listData?: PickerOption[];
|
|
7
|
+
threeDimensional: boolean;
|
|
8
|
+
chooseItem?: (val: PickerOption, idx: number) => void;
|
|
8
9
|
}
|
|
9
10
|
declare const PickerSlot: React.ForwardRefExoticComponent<Partial<IPickerSlotProps> & React.RefAttributes<unknown>>;
|
|
10
11
|
export default PickerSlot;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { FunctionComponent, CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export declare type ProgressSize = 'small' | 'base' | 'large';
|
|
3
|
+
export declare type TextType = 'icon' | 'text';
|
|
4
|
+
export interface ProgressProps {
|
|
5
|
+
className: string;
|
|
6
|
+
style: CSSProperties;
|
|
7
|
+
isShowPercentage: boolean;
|
|
8
|
+
percentage: number;
|
|
9
|
+
fillColor: string;
|
|
10
|
+
strokeColor: string;
|
|
11
|
+
strokeWidth: string;
|
|
12
|
+
size: ProgressSize;
|
|
13
|
+
textColor: string;
|
|
14
|
+
textWidth: string;
|
|
15
|
+
showText: boolean;
|
|
16
|
+
textInside: boolean;
|
|
17
|
+
textBackground: string;
|
|
18
|
+
textType: TextType;
|
|
19
|
+
status: boolean;
|
|
20
|
+
iconName: string;
|
|
21
|
+
iconColor: string;
|
|
22
|
+
iconSize: string;
|
|
23
|
+
rounded: boolean | string;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare const Progress: FunctionComponent<Partial<ProgressProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -15,9 +15,11 @@ export interface RangeProps {
|
|
|
15
15
|
step: number | string;
|
|
16
16
|
modelValue: SliderValue;
|
|
17
17
|
button: React.ReactNode;
|
|
18
|
+
vertical: boolean;
|
|
19
|
+
marks: Record<string, unknown>;
|
|
18
20
|
change?: (value: number) => void;
|
|
19
21
|
dragStart?: () => void;
|
|
20
22
|
dragEnd?: () => void;
|
|
21
23
|
}
|
|
22
|
-
export declare const Range: FunctionComponent<Partial<RangeProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
24
|
+
export declare const Range: FunctionComponent<Partial<RangeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
23
25
|
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export interface SearchBarProps {
|
|
3
|
+
/** 文本值 */
|
|
4
|
+
value?: number | string;
|
|
5
|
+
/** 输入框占位提示文字 */
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** 搜索框形状,可选值为 round */
|
|
8
|
+
shape?: 'square' | 'round';
|
|
9
|
+
/** 自定义class名 */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** 是否禁用输入框 */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** 最大输入长度 */
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
/** 是否启用清除图标,点击清除图标后会清空输入框 */
|
|
16
|
+
clearable?: boolean;
|
|
17
|
+
/** 搜索框外部背景色 */
|
|
18
|
+
background?: string;
|
|
19
|
+
/** 搜索框背景色 */
|
|
20
|
+
inputBackground?: string;
|
|
21
|
+
/** 输入框内容对齐方式 */
|
|
22
|
+
align?: string;
|
|
23
|
+
/** 是否将输入框设为只读状态,只读状态下无法输入内容 */
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
/** 是否自动聚焦,iOS 系统不支持该属性 */
|
|
26
|
+
autoFocus?: boolean;
|
|
27
|
+
/** 搜索框左侧文本 */
|
|
28
|
+
label?: React.ReactNode;
|
|
29
|
+
/** 输入框内 左icon */
|
|
30
|
+
leftinIcon?: React.ReactNode;
|
|
31
|
+
/** 输入框内 右icon */
|
|
32
|
+
rightinIcon?: React.ReactNode;
|
|
33
|
+
/** 输入框外 左icon */
|
|
34
|
+
leftoutIcon?: React.ReactNode;
|
|
35
|
+
/** 输入框外 右icon */
|
|
36
|
+
rightoutIcon?: React.ReactNode;
|
|
37
|
+
/** 取消按钮文字 */
|
|
38
|
+
actionText?: React.ReactNode;
|
|
39
|
+
/** 确定搜索时触发 */
|
|
40
|
+
onSearch?: (val: string) => void;
|
|
41
|
+
/** 输入框内容变化时触发 */
|
|
42
|
+
onChange?: (value: string, event: Event) => void;
|
|
43
|
+
/** 输入框获得焦点时触发 */
|
|
44
|
+
onFocus?: (value: string, event: Event) => void;
|
|
45
|
+
/** 输入框失去焦点时触发 */
|
|
46
|
+
onBlur?: (value: string, event: Event) => void;
|
|
47
|
+
/** 点击清除按钮后触发 */
|
|
48
|
+
onClear?: (event: Event) => void;
|
|
49
|
+
/** 点击输入区域时触发 */
|
|
50
|
+
onClickInput?: (event: Event) => void;
|
|
51
|
+
/** 点击输入框内左侧图标时触发 */
|
|
52
|
+
onClickLeftinIcon?: (value: string, event: Event) => void;
|
|
53
|
+
/** 点击输入框外左侧图标时触发 */
|
|
54
|
+
onClickLeftoutIcon?: (value: string, event: Event) => void;
|
|
55
|
+
/** 点击输入框内右侧图标时触发 */
|
|
56
|
+
onClickRightinIcon?: (value: string, event: Event) => void;
|
|
57
|
+
/** 点击输入框外右侧图标时触发 */
|
|
58
|
+
onClickRightoutIcon?: (value: string, event: Event) => void;
|
|
59
|
+
}
|
|
60
|
+
export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -2,10 +2,10 @@ import React, { FunctionComponent } from 'react';
|
|
|
2
2
|
export interface TabbarProps {
|
|
3
3
|
visible: number | string;
|
|
4
4
|
bottom: boolean;
|
|
5
|
-
|
|
6
|
-
size: string;
|
|
5
|
+
size: string | number;
|
|
7
6
|
unactiveColor: string;
|
|
8
7
|
activeColor: string;
|
|
8
|
+
safeAreaInsetBottom: boolean;
|
|
9
9
|
className: string;
|
|
10
10
|
style: React.CSSProperties;
|
|
11
11
|
tabSwitch: (child: React.ReactElement<any>, active: number) => void;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
export interface TabbarItemProps {
|
|
3
|
+
dot: boolean;
|
|
4
|
+
size: string | number;
|
|
5
|
+
classPrefix: string;
|
|
3
6
|
tabTitle: string;
|
|
4
7
|
icon: string;
|
|
5
8
|
href: string;
|
|
6
|
-
to:
|
|
9
|
+
to: any;
|
|
7
10
|
num: string | number;
|
|
8
11
|
active: boolean;
|
|
9
12
|
activeColor: string;
|
package/dist/types/tag/tag.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export interface TagProps {
|
|
|
7
7
|
round: boolean;
|
|
8
8
|
mark: boolean;
|
|
9
9
|
closeable: boolean;
|
|
10
|
-
isShow: boolean;
|
|
11
10
|
prefixCls: string;
|
|
12
11
|
onClick: (e: MouseEvent) => void;
|
|
12
|
+
onClose: (e?: any) => void;
|
|
13
13
|
}
|
|
14
14
|
export declare type TagType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
15
15
|
export declare const Tag: FunctionComponent<Partial<TagProps>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutui/nutui-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2-beta.0",
|
|
4
4
|
"style": "dist/style.css",
|
|
5
5
|
"main": "dist/nutui.react.umd.js",
|
|
6
6
|
"module": "dist/esm/nutui-react.es.js",
|
|
@@ -123,6 +123,7 @@
|
|
|
123
123
|
"husky": "^6.0.0",
|
|
124
124
|
"inquirer": "^8.0.0",
|
|
125
125
|
"jest": "^27.5.1",
|
|
126
|
+
"jest-canvas-mock": "^2.4.0",
|
|
126
127
|
"lint-staged": "^11.0.0",
|
|
127
128
|
"lzutf8": "0.6.0",
|
|
128
129
|
"map-stream": "0.0.7",
|