@nutui/nutui-react-taro 2.3.8-beta.0 → 2.3.9
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 +43 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/ActionSheet.js +2 -2
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Address.js +4 -4
- package/dist/esm/Animate/style/style.css +1 -1
- package/dist/esm/Audio/style/style.css +1 -1
- package/dist/esm/Audio.js +2 -2
- package/dist/esm/Avatar/style/style.css +1 -1
- package/dist/esm/AvatarCropper/style/style.css +1 -1
- package/dist/esm/AvatarGroup/style/style.css +1 -1
- package/dist/esm/Badge/style/style.css +1 -1
- package/dist/esm/Barrage/style/style.css +1 -1
- package/dist/esm/Button/style/style.css +1 -1
- package/dist/esm/Calendar/style/style.css +1 -1
- package/dist/esm/Calendar.js +4 -4
- package/dist/esm/CalendarCard/style/style.css +1 -1
- package/dist/esm/CalendarCard.js +2 -2
- package/dist/esm/CalendarItem.js +2 -2
- package/dist/esm/Card/style/style.css +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Cell/style/style.css +1 -1
- package/dist/esm/CellGroup/style/style.css +1 -1
- package/dist/esm/Checkbox/style/style.css +1 -1
- package/dist/esm/CheckboxGroup/style/style.css +1 -1
- package/dist/esm/CircleProgress/style/style.css +1 -1
- package/dist/esm/Col/style/style.css +1 -1
- package/dist/esm/Collapse/style/style.css +1 -1
- package/dist/esm/CollapseItem/style/style.css +1 -1
- package/dist/esm/ConfigProvider.js +2 -2
- package/dist/esm/CountDown.js +2 -2
- package/dist/esm/DatePicker/style/style.css +1 -1
- package/dist/esm/DatePicker.js +4 -4
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Dialog.js +2 -2
- package/dist/esm/Divider/style/style.css +1 -1
- package/dist/esm/Elevator/style/style.css +1 -1
- package/dist/esm/Empty/style/style.css +1 -1
- package/dist/esm/Empty.js +2 -2
- package/dist/esm/FixedNav/style/style.css +1 -1
- package/dist/esm/FixedNav.js +2 -2
- package/dist/esm/Form/style/style.css +1 -1
- package/dist/esm/FormItem/style/style.css +1 -1
- package/dist/esm/Grid/style/style.css +1 -1
- package/dist/esm/Grid.js +3 -3
- package/dist/esm/GridItem/style/style.css +1 -1
- package/dist/esm/GridItem.js +2 -2
- package/dist/esm/Image/style/style.css +1 -1
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/ImagePreview.js +2 -2
- package/dist/esm/Indicator/style/style.css +1 -1
- package/dist/esm/InfiniteLoading/style/style.css +1 -1
- package/dist/esm/InfiniteLoading.js +2 -2
- package/dist/esm/Input.js +2 -2
- package/dist/esm/Menu/style/style.css +1 -1
- package/dist/esm/MenuItem/style/style.css +1 -1
- package/dist/esm/NavBar/style/style.css +1 -1
- package/dist/esm/NoticeBar/style/style.css +1 -1
- package/dist/esm/Notify/style/style.css +1 -1
- package/dist/esm/NumberKeyboard/style/style.css +1 -1
- package/dist/esm/NumberKeyboard.js +3 -3
- package/dist/esm/Overlay/style/style.css +1 -1
- package/dist/esm/Pagination/style/style.css +1 -1
- package/dist/esm/Pagination.js +2 -2
- package/dist/esm/Picker/style/style.css +1 -1
- package/dist/esm/Picker.js +3 -3
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Popover.js +2 -2
- package/dist/esm/Popup/style/style.css +1 -1
- package/dist/esm/Popup.js +1 -1
- package/dist/esm/Price/style/style.css +1 -1
- package/dist/esm/Progress/style/style.css +1 -1
- package/dist/esm/PullToRefresh/style/style.css +1 -1
- package/dist/esm/PullToRefresh.js +2 -2
- package/dist/esm/Radio/style/style.css +1 -1
- package/dist/esm/Range/style/style.css +1 -1
- package/dist/esm/Rate/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/ShortPassword.js +3 -3
- package/dist/esm/SideNavBar/style/style.css +1 -1
- package/dist/esm/SideNavBar.js +2 -2
- package/dist/esm/Skeleton/style/style.css +1 -1
- package/dist/esm/Space/style/style.css +1 -1
- package/dist/esm/Step/style/style.css +1 -1
- package/dist/esm/Steps/style/style.css +1 -1
- package/dist/esm/Swipe/style/style.css +1 -1
- package/dist/esm/Swiper/style/style.css +1 -1
- package/dist/esm/Switch/style/style.css +1 -1
- package/dist/esm/Tabbar/style/style.css +1 -1
- package/dist/esm/TabbarItem/style/style.css +1 -1
- package/dist/esm/Table/style/style.css +1 -1
- package/dist/esm/Table.js +2 -2
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/Tag/style/style.css +1 -1
- package/dist/esm/TextArea/style/style.css +1 -1
- package/dist/esm/TextArea.js +2 -2
- package/dist/esm/TimeDetail/style/style.css +1 -1
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/TimeSelect.js +3 -3
- package/dist/esm/Toast/style/style.css +1 -1
- package/dist/esm/Tour/style/style.css +1 -1
- package/dist/esm/Tour.js +3 -3
- package/dist/esm/TrendArrow/style/style.css +1 -1
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +2 -2
- package/dist/esm/VirtualList/style/style.css +1 -1
- package/dist/esm/WaterMark.js +2 -2
- package/dist/esm/{actionsheet.taro-gfhQciJ4.js → actionsheet.taro-6NiOrNyd.js} +1 -1
- package/dist/esm/{address.taro-LCSSqsR-.js → address.taro-B54ZOtmo.js} +3 -3
- package/dist/esm/{audio.taro-UpVxFvGk.js → audio.taro-dJgj5qIu.js} +1 -1
- package/dist/esm/{calendar.taro-Kf91Qo5t.js → calendar.taro-iNNHje7V.js} +3 -3
- package/dist/esm/{calendarcard.taro-tY-cyh-F.js → calendarcard.taro-9s7naGmU.js} +1 -1
- package/dist/esm/{calendaritem.taro-G5BaVw8e.js → calendaritem.taro-o6Z8OOGY.js} +1 -1
- package/dist/esm/{cascader.taro-x_X9F_pH.js → cascader.taro-BxyK5ybo.js} +1 -1
- package/dist/esm/{configprovider.taro-_wngOo0k.js → configprovider.taro-q5J2gQbi.js} +6 -4
- package/dist/esm/{countdown.taro-rJngrZUZ.js → countdown.taro-XZlfWBrA.js} +1 -1
- package/dist/esm/{datepicker.taro-S111IvJO.js → datepicker.taro-DrXkqJkN.js} +2 -2
- package/dist/esm/{dialog.taro-z588FBZJ.js → dialog.taro-dmQGDu3o.js} +1 -1
- package/dist/esm/{empty.taro-98NzV-31.js → empty.taro-gwvOr1xf.js} +1 -1
- package/dist/esm/{fixednav.taro-7OfzwFBE.js → fixednav.taro-QVBXysDj.js} +1 -1
- package/dist/esm/{grid.taro-Hc4q01A_.js → grid.taro-3X-_AhXw.js} +1 -1
- package/dist/esm/{griditem.taro-RdNA-Wqv.js → griditem.taro-TJDJVeQy.js} +1 -1
- package/dist/esm/{imagepreview.taro-qDST6Lh4.js → imagepreview.taro--fVrJUOE.js} +1 -1
- package/dist/esm/{infiniteloading.taro-sl41Ddeh.js → infiniteloading.taro-BO0_y46K.js} +2 -1
- package/dist/esm/{input.taro-8gs046AH.js → input.taro-YoPsV-op.js} +20 -17
- package/dist/esm/{numberkeyboard.taro-CyW0s9bI.js → numberkeyboard.taro-bF6VCXry.js} +2 -2
- package/dist/esm/nutui-react.es.js +33 -33
- package/dist/esm/{pagination.taro-RYmB2As4.js → pagination.taro-C4_Ey5KC.js} +1 -1
- package/dist/esm/{picker.taro-RAYmFSC0.js → picker.taro-csU3SZPF.js} +2 -2
- package/dist/esm/{popover.taro-MUrnn7xY.js → popover.taro-qldQwLPC.js} +1 -1
- package/dist/esm/{popup.taro-2FdJu1kg.js → popup.taro-ObEUml4r.js} +1 -1
- package/dist/esm/{pulltorefresh.taro-VbzsD_HC.js → pulltorefresh.taro-2jER8Mat.js} +1 -1
- package/dist/esm/{searchbar.taro-Hmwspp92.js → searchbar.taro-hVzdT6nI.js} +1 -1
- package/dist/esm/{shortpassword.taro-uFeVULsY.js → shortpassword.taro-bZCwIpEn.js} +2 -2
- package/dist/esm/{sidenavbar.taro-J5SEKQIh.js → sidenavbar.taro-8qoGZg5n.js} +1 -1
- package/dist/esm/{table.taro-d172EUh9.js → table.taro-0zRh2hq6.js} +1 -1
- package/dist/esm/{textarea.taro-VYqlTewy.js → textarea.taro-9zQLTCwU.js} +2 -2
- package/dist/esm/{timeselect.taro-7FWR9oaJ.js → timeselect.taro-j8LgSCe5.js} +2 -2
- package/dist/esm/{tour.taro-HLsDVf9g.js → tour.taro-CGEjzzN_.js} +1 -1
- package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +2 -0
- package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/configprovider/index.d.ts +1 -1
- package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +7 -0
- package/dist/esm/{uploader.taro-a-U18v5C.js → uploader.taro-bRF02TR9.js} +1 -1
- package/dist/esm/{watermark.taro-WDFdgWlJ.js → watermark.taro-nvSmcwu-.js} +1 -1
- 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 +32 -24
- package/dist/nutui.react.umd.js +32 -24
- package/dist/packages/address/address.scss +12 -0
- package/dist/packages/animate/animate.scss +49 -0
- package/dist/packages/audio/audio.scss +14 -0
- package/dist/packages/avatar/avatar.scss +25 -0
- package/dist/packages/avatarcropper/avatarcropper.scss +52 -0
- package/dist/packages/avatargroup/avatargroup.scss +11 -0
- package/dist/packages/badge/badge.scss +8 -0
- package/dist/packages/barrage/barrage.scss +17 -0
- package/dist/packages/button/button.scss +18 -0
- package/dist/packages/calendar/calendar.scss +24 -0
- package/dist/packages/calendarcard/calendarcard.scss +41 -0
- package/dist/packages/card/card.scss +21 -0
- package/dist/packages/cascader/cascader.scss +8 -0
- package/dist/packages/cellgroup/cellgroup.scss +14 -0
- package/dist/packages/checkbox/checkbox.scss +38 -0
- package/dist/packages/checkboxgroup/checkboxgroup.scss +24 -8
- package/dist/packages/circleprogress/circleprogress.scss +8 -0
- package/dist/packages/col/col.scss +25 -0
- package/dist/packages/collapseitem/collapseitem.scss +15 -0
- package/dist/packages/dialog/dialog.scss +29 -0
- package/dist/packages/divider/divider.scss +22 -0
- package/dist/packages/elevator/elevator.scss +20 -0
- package/dist/packages/ellipsis/ellipsis.scss +1 -0
- package/dist/packages/empty/empty.scss +11 -0
- package/dist/packages/fixednav/fixednav.scss +75 -0
- package/dist/packages/form/form.scss +31 -0
- package/dist/packages/formitem/formitem.scss +15 -0
- package/dist/packages/grid/grid.scss +8 -0
- package/dist/packages/griditem/griditem.scss +37 -0
- package/dist/packages/image/image.scss +13 -0
- package/dist/packages/imagepreview/imagepreview.scss +26 -0
- package/dist/packages/indicator/indicator.scss +15 -0
- package/dist/packages/infiniteloading/infiniteloading.scss +13 -0
- package/dist/packages/loading/loading.scss +6 -0
- package/dist/packages/menu/menu.scss +9 -0
- package/dist/packages/menuitem/menuitem.scss +12 -0
- package/dist/packages/navbar/navbar.scss +61 -0
- package/dist/packages/noticebar/noticebar.scss +22 -0
- package/dist/packages/notify/notify.scss +10 -0
- package/dist/packages/numberkeyboard/numberkeyboard.scss +27 -0
- package/dist/packages/overlay/overlay.scss +6 -0
- package/dist/packages/pagination/pagination.scss +24 -0
- package/dist/packages/popover/popover.scss +105 -0
- package/dist/packages/popup/popup.scss +76 -0
- package/dist/packages/price/price.scss +19 -0
- package/dist/packages/progress/progress.scss +7 -0
- package/dist/packages/pulltorefresh/pulltorefresh.scss +10 -0
- package/dist/packages/radio/radio.scss +21 -0
- package/dist/packages/range/range.scss +65 -0
- package/dist/packages/rate/rate.scss +30 -0
- package/dist/packages/safearea/safearea.scss +2 -0
- package/dist/packages/searchbar/searchbar.scss +65 -0
- package/dist/packages/shortpassword/shortpassword.scss +25 -0
- package/dist/packages/sidenavbar/sidenavbar.scss +15 -0
- package/dist/packages/skeleton/skeleton.scss +22 -1
- package/dist/packages/space/space.scss +30 -0
- package/dist/packages/step/step.scss +45 -0
- package/dist/packages/swipe/swipe.scss +15 -0
- package/dist/packages/swiper/swiper.scss +14 -0
- package/dist/packages/switch/switch.scss +13 -0
- package/dist/packages/tabbar/tabbar.scss +13 -0
- package/dist/packages/tabbaritem/tabbaritem.scss +2 -0
- package/dist/packages/table/table.scss +57 -0
- package/dist/packages/tabs/tabs.scss +71 -0
- package/dist/packages/tag/tag.scss +8 -0
- package/dist/packages/textarea/textarea.scss +17 -0
- package/dist/packages/timedetail/timedetail.scss +5 -0
- package/dist/packages/timeselect/timeselect.scss +5 -0
- package/dist/packages/toast/toast.scss +15 -0
- package/dist/packages/tour/tour.scss +23 -0
- package/dist/packages/trendarrow/trendarrow.scss +13 -0
- package/dist/packages/uploader/uploader.scss +36 -0
- package/dist/packages/video/video.scss +3 -0
- package/dist/packages/virtuallist/virtuallist.scss +11 -0
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/types/packages/backtop/backtop.taro.d.ts +1 -1
- package/dist/types/packages/configprovider/configprovider.d.ts +2 -0
- package/dist/types/packages/configprovider/configprovider.taro.d.ts +2 -0
- package/dist/types/packages/configprovider/index.d.ts +1 -1
- package/dist/types/packages/configprovider/index.taro.d.ts +1 -1
- package/dist/types/packages/popover/popover.taro.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
4
|
+
import { P as Popup } from "./popup.taro-ObEUml4r.js";
|
|
5
5
|
import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-piSHvCGp.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
7
7
|
const defaultProps = {
|
|
@@ -135,7 +135,7 @@ const Popup = (props) => {
|
|
|
135
135
|
const renderPop = () => {
|
|
136
136
|
return React__default.createElement(
|
|
137
137
|
CSSTransition,
|
|
138
|
-
{ classNames: transitionName,
|
|
138
|
+
{ classNames: transitionName, mountOnEnter: true, unmountOnExit: destroyOnClose, timeout: duration, in: innerVisible, onEntered: onHandleOpened, onExited: onHandleClosed },
|
|
139
139
|
React__default.createElement(
|
|
140
140
|
View,
|
|
141
141
|
{ ref: refObject, style: popStyles, className: popClassName, onClick: onHandleClick, catchMove: lockScroll },
|
|
@@ -2,7 +2,7 @@ import React__default, { useRef, useState } from "react";
|
|
|
2
2
|
import { View } from "@tarojs/components";
|
|
3
3
|
import { Loading, More } from "@nutui/icons-react-taro";
|
|
4
4
|
import Taro from "@tarojs/taro";
|
|
5
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
5
|
+
import { u as useConfig } from "./configprovider.taro-q5J2gQbi.js";
|
|
6
6
|
import { u as useTouch } from "./use-touch-BUFdkOSA.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
8
8
|
function bound(position, min, max) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect } from "react";
|
|
2
2
|
import { Search, ArrowLeft, MaskClose } from "@nutui/icons-react-taro";
|
|
3
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
3
|
+
import { u as useConfig } from "./configprovider.taro-q5J2gQbi.js";
|
|
4
4
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
5
5
|
const defaultProps = {
|
|
6
6
|
...ComponentDefaults,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React__default, { useMemo, useEffect } from "react";
|
|
2
2
|
import { Tips } from "@nutui/icons-react-taro";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { P as Popup } from "./popup.taro-
|
|
5
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
4
|
+
import { P as Popup } from "./popup.taro-ObEUml4r.js";
|
|
5
|
+
import { u as useConfig } from "./configprovider.taro-q5J2gQbi.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
7
7
|
import { u as usePropsValue } from "./use-props-value-vKr0R0AX.js";
|
|
8
8
|
const defaultProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useState } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { P as Popup } from "./popup.taro-
|
|
3
|
+
import { P as Popup } from "./popup.taro-ObEUml4r.js";
|
|
4
4
|
import { O as OffsetContext } from "./context-6mGEMLsx.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
6
6
|
const defaultProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useEffect, useCallback, useRef } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { ArrowDown } from "@nutui/icons-react-taro";
|
|
4
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
4
|
+
import { u as useConfig } from "./configprovider.taro-q5J2gQbi.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
6
6
|
import { u as usePropsValue } from "./use-props-value-vKr0R0AX.js";
|
|
7
7
|
function useTableSticky(columns) {
|
|
@@ -2,7 +2,7 @@ import React__default, { useRef } from "react";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import Taro from "@tarojs/taro";
|
|
4
4
|
import { Textarea } from "@tarojs/components";
|
|
5
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
5
|
+
import { u as useConfig } from "./configprovider.taro-q5J2gQbi.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
7
7
|
import { u as usePropsValue } from "./use-props-value-vKr0R0AX.js";
|
|
8
8
|
const defaultProps = {
|
|
@@ -21,7 +21,7 @@ const TextArea = (props) => {
|
|
|
21
21
|
const classPrefix = "nut-textarea";
|
|
22
22
|
const compositionRef = useRef(false);
|
|
23
23
|
const format = (value2) => {
|
|
24
|
-
if (maxLength !==
|
|
24
|
+
if (maxLength !== -1 && value2.length > maxLength) {
|
|
25
25
|
return value2.substring(0, maxLength);
|
|
26
26
|
}
|
|
27
27
|
return value2;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React__default, { useState } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { P as Popup } from "./popup.taro-
|
|
3
|
+
import { P as Popup } from "./popup.taro-ObEUml4r.js";
|
|
4
4
|
import { T as TimeDetail } from "./timedetail.taro-TF9Wcblh.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
6
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
6
|
+
import { u as useConfig } from "./configprovider.taro-q5J2gQbi.js";
|
|
7
7
|
const defaultProps = {
|
|
8
8
|
...ComponentDefaults,
|
|
9
9
|
visible: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useEffect } from "react";
|
|
2
2
|
import { Close } from "@nutui/icons-react-taro";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { P as Popover } from "./popover.taro-
|
|
4
|
+
import { P as Popover } from "./popover.taro-qldQwLPC.js";
|
|
5
5
|
import Taro, { createSelectorQuery } from "@tarojs/taro";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
7
7
|
import { useConfig } from "./ConfigProvider.js";
|
|
@@ -4,8 +4,10 @@ import { BaseLang } from '@/locales/base';
|
|
|
4
4
|
import type { NutCSSVariables } from './types';
|
|
5
5
|
export interface ConfigProviderProps extends BasicComponent {
|
|
6
6
|
locale: BaseLang;
|
|
7
|
+
direction?: Direction;
|
|
7
8
|
theme?: Record<string | NutCSSVariables, string>;
|
|
8
9
|
}
|
|
10
|
+
export type Direction = 'ltr' | 'rtl' | undefined;
|
|
9
11
|
export declare const defaultConfigRef: {
|
|
10
12
|
current: ConfigProviderProps;
|
|
11
13
|
};
|
|
@@ -4,8 +4,10 @@ import { BaseLang } from '@/locales/base';
|
|
|
4
4
|
import type { NutCSSVariables } from './types';
|
|
5
5
|
export interface ConfigProviderProps extends BasicComponent {
|
|
6
6
|
locale: BaseLang;
|
|
7
|
+
direction?: Direction;
|
|
7
8
|
theme?: Record<string | NutCSSVariables, string>;
|
|
8
9
|
}
|
|
10
|
+
export type Direction = 'ltr' | 'rtl' | undefined;
|
|
9
11
|
export declare const defaultConfigRef: {
|
|
10
12
|
current: ConfigProviderProps;
|
|
11
13
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigProvider, useConfig, setDefaultConfig, getDefaultConfig } from './configprovider';
|
|
2
|
-
export type { ConfigProviderProps } from './configprovider';
|
|
2
|
+
export type { ConfigProviderProps, Direction } from './configprovider';
|
|
3
3
|
export type { NutCSSVariables } from './types';
|
|
4
4
|
export { useConfig, setDefaultConfig, getDefaultConfig };
|
|
5
5
|
export default ConfigProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigProvider, useConfig, setDefaultConfig, getDefaultConfig } from './configprovider.taro';
|
|
2
|
-
export type { ConfigProviderProps } from './configprovider.taro';
|
|
2
|
+
export type { ConfigProviderProps, Direction } from './configprovider.taro';
|
|
3
3
|
export type { NutCSSVariables } from './types';
|
|
4
4
|
export { useConfig, setDefaultConfig, getDefaultConfig };
|
|
5
5
|
export default ConfigProvider;
|
|
@@ -28,4 +28,11 @@ export interface PopoverProps extends PopupProps {
|
|
|
28
28
|
onClose: () => void;
|
|
29
29
|
onSelect: (item: List, index: number) => void;
|
|
30
30
|
}
|
|
31
|
+
export interface RootPosition {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
left: number;
|
|
35
|
+
top: number;
|
|
36
|
+
right: number;
|
|
37
|
+
}
|
|
31
38
|
export declare const Popover: FunctionComponent<Partial<PopoverProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'>>;
|
|
@@ -9,7 +9,7 @@ import classNames from "classnames";
|
|
|
9
9
|
import Taro, { uploadFile, getEnv, chooseMedia, chooseImage } from "@tarojs/taro";
|
|
10
10
|
import { Failure, Link, Del, Loading, Photograph } from "@nutui/icons-react-taro";
|
|
11
11
|
import { B as Button } from "./button.taro-3IIFy1M2.js";
|
|
12
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
12
|
+
import { u as useConfig } from "./configprovider.taro-q5J2gQbi.js";
|
|
13
13
|
import { a as isPromise } from "./index-YvHA__3D.js";
|
|
14
14
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
15
15
|
import { u as usePropsValue } from "./use-props-value-vKr0R0AX.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useEffect } from "react";
|
|
2
2
|
import { getSystemInfo, createOffscreenCanvas } from "@tarojs/taro";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
4
|
+
import { u as useConfig } from "./configprovider.taro-q5J2gQbi.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
6
6
|
const defaultProps = {
|
|
7
7
|
...ComponentDefaults,
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.es.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react-taro v2.3.
|
|
8
|
+
* @nutui/nutui-react-taro v2.3.9 Fri Feb 02 2024 16:15:32 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -1440,7 +1440,8 @@ const zhCN = {
|
|
|
1440
1440
|
const classPrefix$p = "nut-configprovider";
|
|
1441
1441
|
const defaultConfigRef$1 = {
|
|
1442
1442
|
current: {
|
|
1443
|
-
locale: zhCN
|
|
1443
|
+
locale: zhCN,
|
|
1444
|
+
direction: "ltr"
|
|
1444
1445
|
}
|
|
1445
1446
|
};
|
|
1446
1447
|
const getDefaultConfig$1 = () => {
|
|
@@ -1458,7 +1459,7 @@ function convertThemeVarsToCSSVars(themeVars) {
|
|
|
1458
1459
|
return cssVars;
|
|
1459
1460
|
}
|
|
1460
1461
|
const ConfigProvider = (props) => {
|
|
1461
|
-
const { style, className, children, ...config2 } = props;
|
|
1462
|
+
const { style, className, children, direction, ...config2 } = props;
|
|
1462
1463
|
const mergedConfig = useMemo(
|
|
1463
1464
|
() => {
|
|
1464
1465
|
return {
|
|
@@ -1478,10 +1479,11 @@ const ConfigProvider = (props) => {
|
|
|
1478
1479
|
return /* @__PURE__ */ React__default.createElement(ConfigContext$1.Provider, { value: mergedConfig }, /* @__PURE__ */ React__default.createElement(
|
|
1479
1480
|
"div",
|
|
1480
1481
|
{
|
|
1481
|
-
className: classNames(classPrefix$p, className),
|
|
1482
|
+
className: classNames(classPrefix$p, className, `nut-${direction}`),
|
|
1482
1483
|
style: {
|
|
1483
1484
|
...cssVarStyle,
|
|
1484
|
-
...style
|
|
1485
|
+
...style,
|
|
1486
|
+
direction
|
|
1485
1487
|
}
|
|
1486
1488
|
},
|
|
1487
1489
|
children
|
|
@@ -4705,7 +4707,8 @@ const Popup = (props) => {
|
|
|
4705
4707
|
CSSTransition$1,
|
|
4706
4708
|
{
|
|
4707
4709
|
classNames: transitionName,
|
|
4708
|
-
|
|
4710
|
+
mountOnEnter: true,
|
|
4711
|
+
unmountOnExit: destroyOnClose,
|
|
4709
4712
|
timeout: duration,
|
|
4710
4713
|
in: innerVisible,
|
|
4711
4714
|
onEntered: onHandleOpened,
|
|
@@ -10300,19 +10303,28 @@ const Input = forwardRef(
|
|
|
10300
10303
|
forceUpdate();
|
|
10301
10304
|
};
|
|
10302
10305
|
const handleFocus = (event) => {
|
|
10303
|
-
|
|
10304
|
-
|
|
10306
|
+
if (Taro.getEnv() === "WEB") {
|
|
10307
|
+
const val = event.target.value;
|
|
10308
|
+
onFocus && onFocus(val);
|
|
10309
|
+
} else {
|
|
10310
|
+
onFocus == null ? void 0 : onFocus(value);
|
|
10311
|
+
}
|
|
10305
10312
|
setActive(true);
|
|
10306
10313
|
};
|
|
10307
10314
|
const handleInput = (value2) => {
|
|
10308
10315
|
updateValue(value2, "onChange");
|
|
10309
10316
|
};
|
|
10310
10317
|
const handleBlur = (event) => {
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10318
|
+
if (Taro.getEnv() === "WEB") {
|
|
10319
|
+
const val = event.target.value;
|
|
10320
|
+
updateValue(val, "onBlur");
|
|
10321
|
+
setTimeout(() => {
|
|
10322
|
+
setActive(false);
|
|
10323
|
+
}, 50);
|
|
10324
|
+
} else {
|
|
10325
|
+
updateValue(value, "onBlur");
|
|
10314
10326
|
setActive(false);
|
|
10315
|
-
}
|
|
10327
|
+
}
|
|
10316
10328
|
};
|
|
10317
10329
|
const inputType = (type22) => {
|
|
10318
10330
|
if (getEnv() === ENV_TYPE.WEB) {
|
|
@@ -10352,12 +10364,8 @@ const Input = forwardRef(
|
|
|
10352
10364
|
value,
|
|
10353
10365
|
focus: autoFocus,
|
|
10354
10366
|
confirmType,
|
|
10355
|
-
onBlur:
|
|
10356
|
-
|
|
10357
|
-
},
|
|
10358
|
-
onFocus: (e2) => {
|
|
10359
|
-
handleFocus(e2);
|
|
10360
|
-
},
|
|
10367
|
+
onBlur: handleBlur,
|
|
10368
|
+
onFocus: handleFocus,
|
|
10361
10369
|
onInput: (e2) => {
|
|
10362
10370
|
handleInput(e2.currentTarget.value);
|
|
10363
10371
|
}
|
|
@@ -10373,10 +10381,8 @@ const Input = forwardRef(
|
|
|
10373
10381
|
onClick: (e2) => {
|
|
10374
10382
|
e2.stopPropagation();
|
|
10375
10383
|
if (!disabled) {
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
onClear && onClear("");
|
|
10379
|
-
}, 50);
|
|
10384
|
+
setValue("");
|
|
10385
|
+
onClear == null ? void 0 : onClear("");
|
|
10380
10386
|
}
|
|
10381
10387
|
}
|
|
10382
10388
|
},
|
|
@@ -12342,7 +12348,7 @@ const TextArea = (props) => {
|
|
|
12342
12348
|
const classPrefix2 = "nut-textarea";
|
|
12343
12349
|
const compositionRef = useRef(false);
|
|
12344
12350
|
const format2 = (value2) => {
|
|
12345
|
-
if (maxLength !==
|
|
12351
|
+
if (maxLength !== -1 && value2.length > maxLength) {
|
|
12346
12352
|
return value2.substring(0, maxLength);
|
|
12347
12353
|
}
|
|
12348
12354
|
return value2;
|
|
@@ -13738,6 +13744,7 @@ const InfiniteLoading = (props) => {
|
|
|
13738
13744
|
if (distance.current < refreshMaxH.current) {
|
|
13739
13745
|
distance.current = 0;
|
|
13740
13746
|
setTopDisScoll(0);
|
|
13747
|
+
isTouching.current = false;
|
|
13741
13748
|
} else {
|
|
13742
13749
|
await (onRefresh == null ? void 0 : onRefresh());
|
|
13743
13750
|
refreshDone();
|
|
@@ -17616,7 +17623,8 @@ const getTaroRectById = (id) => {
|
|
|
17616
17623
|
};
|
|
17617
17624
|
const defaultConfigRef = {
|
|
17618
17625
|
current: {
|
|
17619
|
-
locale: zhCN
|
|
17626
|
+
locale: zhCN,
|
|
17627
|
+
direction: "ltr"
|
|
17620
17628
|
}
|
|
17621
17629
|
};
|
|
17622
17630
|
const getDefaultConfig = () => {
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v2.3.
|
|
11
|
+
* @nutui/nutui-react-taro v2.3.9 Fri Feb 02 2024 16:15:32 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -1456,7 +1456,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1456
1456
|
const classPrefix$p = "nut-configprovider";
|
|
1457
1457
|
const defaultConfigRef$1 = {
|
|
1458
1458
|
current: {
|
|
1459
|
-
locale: zhCN
|
|
1459
|
+
locale: zhCN,
|
|
1460
|
+
direction: "ltr"
|
|
1460
1461
|
}
|
|
1461
1462
|
};
|
|
1462
1463
|
const getDefaultConfig$1 = () => {
|
|
@@ -1474,7 +1475,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1474
1475
|
return cssVars;
|
|
1475
1476
|
}
|
|
1476
1477
|
const ConfigProvider = (props) => {
|
|
1477
|
-
const { style, className, children, ...config2 } = props;
|
|
1478
|
+
const { style, className, children, direction, ...config2 } = props;
|
|
1478
1479
|
const mergedConfig = useMemo(
|
|
1479
1480
|
() => {
|
|
1480
1481
|
return {
|
|
@@ -1494,10 +1495,11 @@ var __publicField = (obj, key, value) => {
|
|
|
1494
1495
|
return /* @__PURE__ */ React.createElement(ConfigContext$1.Provider, { value: mergedConfig }, /* @__PURE__ */ React.createElement(
|
|
1495
1496
|
"div",
|
|
1496
1497
|
{
|
|
1497
|
-
className: classNames(classPrefix$p, className),
|
|
1498
|
+
className: classNames(classPrefix$p, className, `nut-${direction}`),
|
|
1498
1499
|
style: {
|
|
1499
1500
|
...cssVarStyle,
|
|
1500
|
-
...style
|
|
1501
|
+
...style,
|
|
1502
|
+
direction
|
|
1501
1503
|
}
|
|
1502
1504
|
},
|
|
1503
1505
|
children
|
|
@@ -4721,7 +4723,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4721
4723
|
CSSTransition$1,
|
|
4722
4724
|
{
|
|
4723
4725
|
classNames: transitionName,
|
|
4724
|
-
|
|
4726
|
+
mountOnEnter: true,
|
|
4727
|
+
unmountOnExit: destroyOnClose,
|
|
4725
4728
|
timeout: duration,
|
|
4726
4729
|
in: innerVisible,
|
|
4727
4730
|
onEntered: onHandleOpened,
|
|
@@ -10316,19 +10319,28 @@ var __publicField = (obj, key, value) => {
|
|
|
10316
10319
|
forceUpdate();
|
|
10317
10320
|
};
|
|
10318
10321
|
const handleFocus = (event) => {
|
|
10319
|
-
|
|
10320
|
-
|
|
10322
|
+
if (Taro.getEnv() === "WEB") {
|
|
10323
|
+
const val = event.target.value;
|
|
10324
|
+
onFocus && onFocus(val);
|
|
10325
|
+
} else {
|
|
10326
|
+
onFocus == null ? void 0 : onFocus(value);
|
|
10327
|
+
}
|
|
10321
10328
|
setActive(true);
|
|
10322
10329
|
};
|
|
10323
10330
|
const handleInput = (value2) => {
|
|
10324
10331
|
updateValue(value2, "onChange");
|
|
10325
10332
|
};
|
|
10326
10333
|
const handleBlur = (event) => {
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10334
|
+
if (Taro.getEnv() === "WEB") {
|
|
10335
|
+
const val = event.target.value;
|
|
10336
|
+
updateValue(val, "onBlur");
|
|
10337
|
+
setTimeout(() => {
|
|
10338
|
+
setActive(false);
|
|
10339
|
+
}, 50);
|
|
10340
|
+
} else {
|
|
10341
|
+
updateValue(value, "onBlur");
|
|
10330
10342
|
setActive(false);
|
|
10331
|
-
}
|
|
10343
|
+
}
|
|
10332
10344
|
};
|
|
10333
10345
|
const inputType = (type22) => {
|
|
10334
10346
|
if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
|
|
@@ -10368,12 +10380,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10368
10380
|
value,
|
|
10369
10381
|
focus: autoFocus,
|
|
10370
10382
|
confirmType,
|
|
10371
|
-
onBlur:
|
|
10372
|
-
|
|
10373
|
-
},
|
|
10374
|
-
onFocus: (e2) => {
|
|
10375
|
-
handleFocus(e2);
|
|
10376
|
-
},
|
|
10383
|
+
onBlur: handleBlur,
|
|
10384
|
+
onFocus: handleFocus,
|
|
10377
10385
|
onInput: (e2) => {
|
|
10378
10386
|
handleInput(e2.currentTarget.value);
|
|
10379
10387
|
}
|
|
@@ -10389,10 +10397,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10389
10397
|
onClick: (e2) => {
|
|
10390
10398
|
e2.stopPropagation();
|
|
10391
10399
|
if (!disabled) {
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
onClear && onClear("");
|
|
10395
|
-
}, 50);
|
|
10400
|
+
setValue("");
|
|
10401
|
+
onClear == null ? void 0 : onClear("");
|
|
10396
10402
|
}
|
|
10397
10403
|
}
|
|
10398
10404
|
},
|
|
@@ -12358,7 +12364,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12358
12364
|
const classPrefix2 = "nut-textarea";
|
|
12359
12365
|
const compositionRef = React.useRef(false);
|
|
12360
12366
|
const format2 = (value2) => {
|
|
12361
|
-
if (maxLength !==
|
|
12367
|
+
if (maxLength !== -1 && value2.length > maxLength) {
|
|
12362
12368
|
return value2.substring(0, maxLength);
|
|
12363
12369
|
}
|
|
12364
12370
|
return value2;
|
|
@@ -13754,6 +13760,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13754
13760
|
if (distance.current < refreshMaxH.current) {
|
|
13755
13761
|
distance.current = 0;
|
|
13756
13762
|
setTopDisScoll(0);
|
|
13763
|
+
isTouching.current = false;
|
|
13757
13764
|
} else {
|
|
13758
13765
|
await (onRefresh == null ? void 0 : onRefresh());
|
|
13759
13766
|
refreshDone();
|
|
@@ -17632,7 +17639,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17632
17639
|
};
|
|
17633
17640
|
const defaultConfigRef = {
|
|
17634
17641
|
current: {
|
|
17635
|
-
locale: zhCN
|
|
17642
|
+
locale: zhCN,
|
|
17643
|
+
direction: "ltr"
|
|
17636
17644
|
}
|
|
17637
17645
|
};
|
|
17638
17646
|
const getDefaultConfig = () => {
|