@nutui/nutui-react 2.3.0 → 2.3.2
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/CHANGELOG.md +21 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Calendar/style/style.css +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/DatePicker/style/style.css +1 -1
- package/dist/esm/FixedNav.js +1 -1
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/NumberKeyboard/style/style.css +1 -1
- package/dist/esm/Picker/style/style.css +1 -1
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Popup/style/style.css +1 -1
- package/dist/esm/SearchBar/style/style.css +1 -1
- package/dist/esm/SearchBar.js +2 -2
- package/dist/esm/ShortPassword/style/style.css +1 -1
- package/dist/esm/SideNavBar/style/style.css +1 -1
- package/dist/esm/Swiper.js +120 -167
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/Tour/style/style.css +1 -1
- package/dist/esm/types/src/packages/address/address.d.ts +1 -1
- package/dist/esm/types/src/packages/address/address.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/address/existRender.d.ts +1 -1
- package/dist/esm/types/src/packages/address/existRender.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/animate/animate.d.ts +1 -1
- package/dist/esm/types/src/packages/animate/animate.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/animate/index.d.ts +1 -1
- package/dist/esm/types/src/packages/animate/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/calendar/calendar.d.ts +1 -1
- package/dist/esm/types/src/packages/calendar/calendar.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/calendar/utils.d.ts +1 -1
- package/dist/esm/types/src/packages/calendaritem/calendaritem.d.ts +1 -1
- package/dist/esm/types/src/packages/calendaritem/calendaritem.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +1 -1
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +2 -6
- package/dist/esm/types/src/packages/fixednav/fixednav.taro.d.ts +2 -6
- package/dist/esm/types/src/packages/fixednav/index.d.ts +2 -1
- package/dist/esm/types/src/packages/fixednav/index.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/fixednav/types.d.ts +12 -0
- package/dist/esm/types/src/packages/radiogroup/radiogroup.d.ts +1 -1
- package/dist/esm/types/src/packages/radiogroup/radiogroup.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/utils.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +1 -1
- package/dist/esm/types/src/utils/use-touch.d.ts +2 -0
- package/dist/esm/use-touch.js +7 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +133 -174
- package/dist/nutui.react.umd.js +133 -174
- package/dist/packages/cascader/cascader.scss +1 -1
- package/dist/packages/popup/popup.scss +2 -2
- package/dist/packages/searchbar/searchbar.scss +6 -2
- package/dist/packages/tabs/tabs.scss +3 -3
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +36 -11
- package/dist/types/packages/address/address.d.ts +1 -1
- package/dist/types/packages/address/address.taro.d.ts +1 -1
- package/dist/types/packages/address/existRender.d.ts +1 -1
- package/dist/types/packages/address/existRender.taro.d.ts +1 -1
- package/dist/types/packages/animate/animate.d.ts +1 -1
- package/dist/types/packages/animate/animate.taro.d.ts +1 -1
- package/dist/types/packages/animate/index.d.ts +1 -1
- package/dist/types/packages/animate/index.taro.d.ts +1 -1
- package/dist/types/packages/calendar/calendar.d.ts +1 -1
- package/dist/types/packages/calendar/calendar.taro.d.ts +1 -1
- package/dist/types/packages/calendar/utils.d.ts +1 -1
- package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
- package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +1 -1
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +1 -1
- package/dist/types/packages/fixednav/fixednav.d.ts +2 -6
- package/dist/types/packages/fixednav/fixednav.taro.d.ts +2 -6
- package/dist/types/packages/fixednav/index.d.ts +2 -1
- package/dist/types/packages/fixednav/index.taro.d.ts +2 -1
- package/dist/types/packages/fixednav/types.d.ts +12 -0
- package/dist/types/packages/radiogroup/radiogroup.d.ts +1 -1
- package/dist/types/packages/radiogroup/radiogroup.taro.d.ts +1 -1
- package/dist/types/packages/virtuallist/utils.d.ts +1 -1
- package/dist/types/packages/virtuallist/virtuallist.d.ts +1 -1
- package/dist/types/packages/virtuallist/virtuallist.taro.d.ts +1 -1
- package/dist/types/utils/use-touch.d.ts +2 -0
- package/package.json +1 -1
- /package/dist/esm/types/src/packages/address/{type.d.ts → types.d.ts} +0 -0
- /package/dist/esm/types/src/packages/animate/{type.d.ts → types.d.ts} +0 -0
- /package/dist/esm/types/src/packages/calendar/{type.d.ts → types.d.ts} +0 -0
- /package/dist/esm/types/src/packages/checkboxgroup/{type.d.ts → types.d.ts} +0 -0
- /package/dist/esm/types/src/packages/radiogroup/{type.d.ts → types.d.ts} +0 -0
- /package/dist/esm/types/src/packages/virtuallist/{type.d.ts → types.d.ts} +0 -0
- /package/dist/types/packages/address/{type.d.ts → types.d.ts} +0 -0
- /package/dist/types/packages/animate/{type.d.ts → types.d.ts} +0 -0
- /package/dist/types/packages/calendar/{type.d.ts → types.d.ts} +0 -0
- /package/dist/types/packages/checkboxgroup/{type.d.ts → types.d.ts} +0 -0
- /package/dist/types/packages/radiogroup/{type.d.ts → types.d.ts} +0 -0
- /package/dist/types/packages/virtuallist/{type.d.ts → types.d.ts} +0 -0
package/dist/style.mjs
CHANGED
|
@@ -871,6 +871,7 @@ $switch-button-box-shadow: var(
|
|
|
871
871
|
) !default;
|
|
872
872
|
|
|
873
873
|
// toast(✅)
|
|
874
|
+
$toast-inner-text-align: var(--nutui-toast-inner-text-align, center) !default;
|
|
874
875
|
$toast-title-font-size: var(--nutui-toast-title-font-size, 16px) !default;
|
|
875
876
|
$toast-text-font-size: var(--nutui-toast-text-font-size, 14px) !default;
|
|
876
877
|
$toast-font-color: var(--nutui-toast-font-color, $white) !default;
|
|
@@ -933,11 +934,18 @@ $calendar-choose-background-color: var(
|
|
|
933
934
|
--nutui-calendar-choose-background-color,
|
|
934
935
|
$color-primary-light
|
|
935
936
|
) !default;
|
|
937
|
+
$calendar-choose-color: var(
|
|
938
|
+
--nutui-calendar-choose-color,
|
|
939
|
+
$color-primary
|
|
940
|
+
) !default;
|
|
936
941
|
$calendar-choose-disable-background-color: var(
|
|
937
942
|
--nutui-calendar-choose-disable-background-color,
|
|
938
943
|
rgba(191, 191, 191, 0.09)
|
|
939
944
|
) !default;
|
|
940
|
-
$calendar-disable-color: var(
|
|
945
|
+
$calendar-disable-color: var(
|
|
946
|
+
--nutui-calendar-disable-color,
|
|
947
|
+
$color-text-disabled
|
|
948
|
+
) !default;
|
|
941
949
|
$calendar-base-font-size: var(
|
|
942
950
|
--nutui-calendar-base-font-size,
|
|
943
951
|
$font-size-large
|
|
@@ -1068,12 +1076,9 @@ $tabbar-height: var(--nutui-tabbar-height, 50px) !default;
|
|
|
1068
1076
|
$tabbar-text-margin-top: var(--nutui-tabbar-text-margin-top, 3px) !default;
|
|
1069
1077
|
|
|
1070
1078
|
//pulltorefresh
|
|
1071
|
-
$pulltorefresh-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
) !default;
|
|
1075
|
-
$pulltorefresh-top-icon-height: var(
|
|
1076
|
-
--nutui-pulltorefresh-top-icon-height,
|
|
1079
|
+
$pulltorefresh-icon-width: var(--nutui-pulltorefresh-icon-width, 36px) !default;
|
|
1080
|
+
$pulltorefresh-icon-height: var(
|
|
1081
|
+
--nutui-pulltorefresh-icon-height,
|
|
1077
1082
|
26px
|
|
1078
1083
|
) !default;
|
|
1079
1084
|
|
|
@@ -1082,8 +1087,8 @@ $infiniteloading-color: var(
|
|
|
1082
1087
|
--nutui-infiniteloading-color,
|
|
1083
1088
|
$color-text-help
|
|
1084
1089
|
) !default;
|
|
1085
|
-
$infiniteloading-
|
|
1086
|
-
--nutui-infiniteloading-
|
|
1090
|
+
$infiniteloading-icon-size: var(
|
|
1091
|
+
--nutui-infiniteloading-icon-size,
|
|
1087
1092
|
24px
|
|
1088
1093
|
) !default;
|
|
1089
1094
|
|
|
@@ -1335,23 +1340,31 @@ $radio-icon-font-size: var(
|
|
|
1335
1340
|
--nutui-radio-icon-font-size,
|
|
1336
1341
|
$font-size-large
|
|
1337
1342
|
) !default;
|
|
1343
|
+
$radio-label-color: var(--nutui-radio-label-color, $color-text) !default;
|
|
1344
|
+
$radio-label-disable-color: var(
|
|
1345
|
+
--nutui-radio-label-disable-color,
|
|
1346
|
+
$color-text-disabled
|
|
1347
|
+
) !default;
|
|
1338
1348
|
$radio-label-font-size: var(
|
|
1339
1349
|
--nutui-radio-label-font-size,
|
|
1340
1350
|
$font-size-base
|
|
1341
1351
|
) !default;
|
|
1342
|
-
$radio-label-color: var(--nutui-radio-label-color, $color-
|
|
1352
|
+
$radio-label-color: var(--nutui-radio-label-color, $color-title) !default;
|
|
1343
1353
|
$radio-label-margin-left: var(--nutui-radio-label-margin-left, 4px) !default;
|
|
1344
1354
|
$radio-button-font-size: var(
|
|
1345
1355
|
--nutui-radio-button-font-size,
|
|
1346
1356
|
$font-size-base
|
|
1347
1357
|
) !default;
|
|
1348
1358
|
$radio-button-color: $color-text;
|
|
1349
|
-
$radio-button-background: $color-background;
|
|
1350
1359
|
$radio-button-padding: var(--nutui-radio-button-padding, 5px 18px) !default;
|
|
1351
1360
|
$radio-button-border-radius: var(
|
|
1352
1361
|
--nutui-radio-button-border-radius,
|
|
1353
1362
|
$radius-xs
|
|
1354
1363
|
) !default;
|
|
1364
|
+
$radio-button-background: var(
|
|
1365
|
+
--nutui-radio-button-background,
|
|
1366
|
+
$color-background
|
|
1367
|
+
) !default;
|
|
1355
1368
|
$radio-button-active-border: var(
|
|
1356
1369
|
--nutui-radio-button-active-border,
|
|
1357
1370
|
1px solid $color-primary-light
|
|
@@ -1656,6 +1669,18 @@ $tabs-tab-line-border-radius: var(
|
|
|
1656
1669
|
3px
|
|
1657
1670
|
) !default;
|
|
1658
1671
|
$tabs-tab-line-opacity: var(--nutui-tabs-tab-line-opacity, 1) !default;
|
|
1672
|
+
$tabs-tab-button-border-radius: var(
|
|
1673
|
+
--nutui-tabs-button-border-radius,
|
|
1674
|
+
$radius-circle
|
|
1675
|
+
) !default;
|
|
1676
|
+
$tabs-tab-button-active-background-color: var(
|
|
1677
|
+
--nutui-tabs-button-active-background-color,
|
|
1678
|
+
$color-primary-light
|
|
1679
|
+
) !default;
|
|
1680
|
+
$tabs-tab-button-active-border: var(
|
|
1681
|
+
--nutui-tabs-button-active-border,
|
|
1682
|
+
1px solid $color-primary
|
|
1683
|
+
) !default;
|
|
1659
1684
|
$tabs-vertical-titles-width: var(
|
|
1660
1685
|
--nutui-tabs-vertical-titles-width,
|
|
1661
1686
|
100px
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ForwardRefRenderFunction } from 'react';
|
|
2
|
-
import { AddressList } from './
|
|
2
|
+
import { AddressList } from './types';
|
|
3
3
|
import { CascaderOption, CascaderOptionKey, CascaderProps, CascaderValue } from '../../packages/cascader/index';
|
|
4
4
|
type AddressRef = {
|
|
5
5
|
open: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
-
import { AnimateType, AnimateAction } from './
|
|
2
|
+
import { AnimateType, AnimateAction } from './types';
|
|
3
3
|
import { BasicComponent } from '../../utils/typings';
|
|
4
4
|
export interface AnimateProps extends BasicComponent {
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
-
import { AnimateType, AnimateAction } from './
|
|
2
|
+
import { AnimateType, AnimateAction } from './types';
|
|
3
3
|
import { BasicComponent } from '../../utils/typings';
|
|
4
4
|
export interface AnimateProps extends BasicComponent {
|
|
5
5
|
type: AnimateType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Day, MonthInfo } from './
|
|
1
|
+
import { Day, MonthInfo } from './types';
|
|
2
2
|
export declare const splitDate: (date: string) => string[];
|
|
3
3
|
export declare const isMultiple: (day: string, days: string[]) => boolean;
|
|
4
4
|
export declare const isCurrDay: (month: MonthInfo, day: string | number) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { PopupProps } from '../../packages/popup/index';
|
|
3
|
-
import { Day, InputDate, SelectedType } from '../calendar/
|
|
3
|
+
import { Day, InputDate, SelectedType } from '../calendar/types';
|
|
4
4
|
type CalendarRef = {
|
|
5
5
|
scrollToDate: (date: string) => void;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { PopupProps } from '../../packages/popup/index.taro';
|
|
3
|
-
import { Day, InputDate, SelectedType } from '../calendar/
|
|
3
|
+
import { Day, InputDate, SelectedType } from '../calendar/types';
|
|
4
4
|
type CalendarRef = {
|
|
5
5
|
scrollToDate: (date: string) => void;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RadioGroupOptionType } from '../../packages/radiogroup/
|
|
2
|
+
import { RadioGroupOptionType } from '../../packages/radiogroup/types';
|
|
3
3
|
export type CheckboxLabelPosition = 'left' | 'right';
|
|
4
4
|
export type CheckboxDirection = 'horizontal' | 'vertical';
|
|
5
5
|
export interface CheckboxGroupProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RadioGroupOptionType } from '../../packages/radiogroup/
|
|
2
|
+
import { RadioGroupOptionType } from '../../packages/radiogroup/types';
|
|
3
3
|
export type CheckboxLabelPosition = 'left' | 'right';
|
|
4
4
|
export type CheckboxDirection = 'horizontal' | 'vertical';
|
|
5
5
|
export interface CheckboxGroupProps {
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React, { FunctionComponent, MouseEvent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
|
-
|
|
4
|
-
export type FixedNavPosition = {
|
|
5
|
-
top?: string;
|
|
6
|
-
bottom?: string;
|
|
7
|
-
};
|
|
3
|
+
import { FixedNavDirection, FixedNavItem, FixedNavPosition } from '../../packages/fixednav/types';
|
|
8
4
|
export interface FixedNavProps extends BasicComponent {
|
|
9
5
|
/**
|
|
10
6
|
* 是否打开
|
|
@@ -20,7 +16,7 @@ export interface FixedNavProps extends BasicComponent {
|
|
|
20
16
|
* 悬浮列表内容数据
|
|
21
17
|
* @default []
|
|
22
18
|
*/
|
|
23
|
-
list: Array<
|
|
19
|
+
list: Array<FixedNavItem>
|
|
24
20
|
/**
|
|
25
21
|
* 收起列表按钮文案
|
|
26
22
|
* @default 收起导航
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React, { FunctionComponent, MouseEvent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
|
-
|
|
4
|
-
export type FixedNavPosition = {
|
|
5
|
-
top?: string;
|
|
6
|
-
bottom?: string;
|
|
7
|
-
};
|
|
3
|
+
import { FixedNavDirection, FixedNavItem, FixedNavPosition } from '../../packages/fixednav/types';
|
|
8
4
|
export interface FixedNavProps extends BasicComponent {
|
|
9
5
|
visible: boolean;
|
|
10
6
|
overlay: boolean;
|
|
11
|
-
list: Array<
|
|
7
|
+
list: Array<FixedNavItem>;
|
|
12
8
|
activeText: string;
|
|
13
9
|
inactiveText: string;
|
|
14
10
|
position: FixedNavPosition;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { FixedNav } from './fixednav';
|
|
2
|
-
export type {
|
|
2
|
+
export type { FixedNavDirection, FixedNavPosition, FixedNavItem } from './types';
|
|
3
|
+
export type { FixedNavProps } from './fixednav';
|
|
3
4
|
export default FixedNav;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { FixedNav } from './fixednav.taro';
|
|
2
|
-
export type {
|
|
2
|
+
export type { FixedNavDirection, FixedNavPosition, FixedNavItem } from './types';
|
|
3
|
+
export type { FixedNavProps } from './fixednav.taro';
|
|
3
4
|
export default FixedNav;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Key, ReactNode } from 'react';
|
|
2
|
+
export type FixedNavDirection = 'right' | 'left';
|
|
3
|
+
export type FixedNavPosition = {
|
|
4
|
+
top?: string;
|
|
5
|
+
bottom?: string;
|
|
6
|
+
};
|
|
7
|
+
export interface FixedNavItem {
|
|
8
|
+
id: Key;
|
|
9
|
+
num?: number;
|
|
10
|
+
text: ReactNode;
|
|
11
|
+
icon: ReactNode;
|
|
12
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PositionType, Data } from './
|
|
1
|
+
import { PositionType, Data } from './types';
|
|
2
2
|
declare const initPositinoCache: (reaItemSize: number, length?: number) => PositionType[];
|
|
3
3
|
declare const getListTotalSize: (positions: Array<PositionType>, horizontal: true | false) => number;
|
|
4
4
|
declare const binarySearch: (positionsList: Array<PositionType>, horizontal: true | false, value?: number) => number;
|
|
@@ -4,10 +4,12 @@ export declare function useTouch(): {
|
|
|
4
4
|
move: (event: React.TouchEvent<HTMLElement>) => void;
|
|
5
5
|
start: (event: React.TouchEvent<HTMLElement>) => void;
|
|
6
6
|
reset: () => void;
|
|
7
|
+
touchTime: React.MutableRefObject<number | null>;
|
|
7
8
|
startX: React.MutableRefObject<number>;
|
|
8
9
|
startY: React.MutableRefObject<number>;
|
|
9
10
|
deltaX: React.MutableRefObject<number>;
|
|
10
11
|
deltaY: React.MutableRefObject<number>;
|
|
12
|
+
delta: React.MutableRefObject<number>;
|
|
11
13
|
offsetX: React.MutableRefObject<number>;
|
|
12
14
|
offsetY: React.MutableRefObject<number>;
|
|
13
15
|
direction: React.MutableRefObject<Direction>;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|