react-native-system-ui 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -22
- package/dist/cjs/components/field/Field.js +1 -1
- package/dist/cjs/components/flex/Flex.js +1 -1
- package/dist/cjs/components/flex/FlexItem.js +1 -1
- package/dist/cjs/components/form/Form.js +1 -1
- package/dist/cjs/components/grid/Grid.js +1 -1
- package/dist/cjs/components/grid/GridItem.js +1 -1
- package/dist/cjs/components/popup/Popup.js +1 -1
- package/dist/cjs/components/selector/Selector.js +1 -1
- package/dist/cjs/components/toast/Toast.js +1 -1
- package/dist/es/components/field/Field.js +1 -1
- package/dist/es/components/flex/Flex.js +1 -1
- package/dist/es/components/flex/FlexItem.js +1 -1
- package/dist/es/components/form/Form.js +1 -1
- package/dist/es/components/grid/Grid.js +1 -1
- package/dist/es/components/grid/GridItem.js +1 -1
- package/dist/es/components/popup/Popup.js +1 -1
- package/dist/es/components/selector/Selector.js +1 -1
- package/dist/es/components/toast/Toast.js +1 -1
- package/dist/types/components/action-sheet/ActionSheet.d.ts +1 -4
- package/dist/types/components/action-sheet/index.d.ts +1 -4
- package/dist/types/components/action-sheet/tokens.d.ts +1 -4
- package/dist/types/components/action-sheet/types.d.ts +1 -87
- package/dist/types/components/area/Area.d.ts +1 -4
- package/dist/types/components/area/index.d.ts +1 -3
- package/dist/types/components/area/tokens.d.ts +1 -7
- package/dist/types/components/area/types.d.ts +1 -20
- package/dist/types/components/avatar/Avatar.d.ts +1 -7
- package/dist/types/components/avatar/index.d.ts +1 -2
- package/dist/types/components/avatar/tokens.d.ts +1 -4
- package/dist/types/components/avatar/types.d.ts +1 -62
- package/dist/types/components/badge/Badge.d.ts +1 -4
- package/dist/types/components/badge/index.d.ts +1 -3
- package/dist/types/components/badge/tokens.d.ts +1 -2
- package/dist/types/components/badge/types.d.ts +1 -57
- package/dist/types/components/button/Button.d.ts +1 -5
- package/dist/types/components/button/ButtonContext.d.ts +1 -2
- package/dist/types/components/button/ButtonGroup.d.ts +1 -23
- package/dist/types/components/button/index.d.ts +1 -6
- package/dist/types/components/button/tokens.d.ts +1 -2
- package/dist/types/components/button/types.d.ts +1 -109
- package/dist/types/components/calendar/Calendar.d.ts +1 -4
- package/dist/types/components/calendar/index.d.ts +1 -3
- package/dist/types/components/calendar/tokens.d.ts +1 -4
- package/dist/types/components/calendar/types.d.ts +1 -111
- package/dist/types/components/cascader/Cascader.d.ts +1 -4
- package/dist/types/components/cascader/index.d.ts +1 -4
- package/dist/types/components/cascader/tokens.d.ts +1 -4
- package/dist/types/components/cascader/types.d.ts +1 -142
- package/dist/types/components/cascader/useCascaderExtend.d.ts +1 -12
- package/dist/types/components/cell/Cell.d.ts +1 -4
- package/dist/types/components/cell/CellContext.d.ts +1 -7
- package/dist/types/components/cell/CellGroup.d.ts +1 -3
- package/dist/types/components/cell/index.d.ts +1 -8
- package/dist/types/components/cell/tokens.d.ts +1 -4
- package/dist/types/components/cell/types.d.ts +1 -112
- package/dist/types/components/checkbox/Checkbox.d.ts +1 -5
- package/dist/types/components/checkbox/CheckboxContext.d.ts +1 -2
- package/dist/types/components/checkbox/CheckboxGroup.d.ts +1 -22
- package/dist/types/components/checkbox/index.d.ts +1 -7
- package/dist/types/components/checkbox/tokens.d.ts +1 -2
- package/dist/types/components/checkbox/types.d.ts +1 -99
- package/dist/types/components/circle/Circle.d.ts +1 -5
- package/dist/types/components/circle/index.d.ts +1 -3
- package/dist/types/components/circle/tokens.d.ts +1 -4
- package/dist/types/components/circle/types.d.ts +1 -51
- package/dist/types/components/collapse/Collapse.d.ts +1 -43
- package/dist/types/components/collapse/index.d.ts +1 -3
- package/dist/types/components/collapse/tokens.d.ts +1 -4
- package/dist/types/components/collapse/types.d.ts +1 -45
- package/dist/types/components/config-provider/ConfigProvider.d.ts +1 -3
- package/dist/types/components/config-provider/DirectionContext.d.ts +1 -3
- package/dist/types/components/config-provider/LocaleContext.d.ts +1 -3
- package/dist/types/components/config-provider/index.d.ts +1 -6
- package/dist/types/components/config-provider/locale/en-US.d.ts +1 -106
- package/dist/types/components/config-provider/locale/types.d.ts +1 -130
- package/dist/types/components/config-provider/locale/zh-CN.d.ts +1 -106
- package/dist/types/components/config-provider/tokens.d.ts +1 -3
- package/dist/types/components/config-provider/types.d.ts +1 -10
- package/dist/types/components/config-provider/useDirection.d.ts +1 -1
- package/dist/types/components/config-provider/useLocale.d.ts +1 -1
- package/dist/types/components/count-down/CountDown.d.ts +1 -4
- package/dist/types/components/count-down/index.d.ts +1 -4
- package/dist/types/components/count-down/tokens.d.ts +1 -4
- package/dist/types/components/count-down/types.d.ts +1 -29
- package/dist/types/components/datetime-picker/DatetimePicker.d.ts +1 -4
- package/dist/types/components/datetime-picker/index.d.ts +1 -3
- package/dist/types/components/datetime-picker/tokens.d.ts +1 -15
- package/dist/types/components/datetime-picker/types.d.ts +1 -38
- package/dist/types/components/dialog/Dialog.d.ts +1 -4
- package/dist/types/components/dialog/imperative.d.ts +1 -23
- package/dist/types/components/dialog/index.d.ts +1 -5
- package/dist/types/components/dialog/tokens.d.ts +1 -48
- package/dist/types/components/dialog/types.d.ts +1 -70
- package/dist/types/components/divider/Divider.d.ts +1 -3
- package/dist/types/components/divider/index.d.ts +1 -3
- package/dist/types/components/divider/tokens.d.ts +1 -4
- package/dist/types/components/divider/types.d.ts +1 -48
- package/dist/types/components/empty/Empty.d.ts +1 -3
- package/dist/types/components/empty/index.d.ts +1 -3
- package/dist/types/components/empty/tokens.d.ts +1 -4
- package/dist/types/components/empty/types.d.ts +1 -44
- package/dist/types/components/error-boundary/ErrorBoundary.d.ts +1 -6
- package/dist/types/components/error-boundary/index.d.ts +1 -2
- package/dist/types/components/error-boundary/types.d.ts +1 -18
- package/dist/types/components/field/Field.d.ts +1 -4
- package/dist/types/components/field/index.d.ts +1 -7
- package/dist/types/components/field/tokens.d.ts +1 -131
- package/dist/types/components/field/types.d.ts +1 -86
- package/dist/types/components/flex/Flex.d.ts +1 -9
- package/dist/types/components/flex/FlexContext.d.ts +1 -2
- package/dist/types/components/flex/FlexItem.d.ts +1 -3
- package/dist/types/components/flex/index.d.ts +1 -8
- package/dist/types/components/flex/tokens.d.ts +1 -2
- package/dist/types/components/flex/types.d.ts +1 -37
- package/dist/types/components/form/Form.d.ts +1 -26
- package/dist/types/components/form/FormItem.d.ts +1 -5
- package/dist/types/components/form/FormList.d.ts +1 -18
- package/dist/types/components/form/index.d.ts +1 -17
- package/dist/types/components/form/tokens.d.ts +1 -7
- package/dist/types/components/form/types.d.ts +1 -68
- package/dist/types/components/grid/Grid.d.ts +1 -18
- package/dist/types/components/grid/GridContext.d.ts +1 -2
- package/dist/types/components/grid/GridItem.d.ts +1 -3
- package/dist/types/components/grid/index.d.ts +1 -5
- package/dist/types/components/grid/tokens.d.ts +1 -4
- package/dist/types/components/grid/types.d.ts +1 -77
- package/dist/types/components/image/Image.d.ts +1 -5
- package/dist/types/components/image/index.d.ts +1 -4
- package/dist/types/components/image/tokens.d.ts +1 -2
- package/dist/types/components/image/types.d.ts +1 -53
- package/dist/types/components/image-preview/ImagePreview.d.ts +1 -4
- package/dist/types/components/image-preview/imperative.d.ts +1 -5
- package/dist/types/components/image-preview/index.d.ts +1 -6
- package/dist/types/components/image-preview/tokens.d.ts +1 -27
- package/dist/types/components/image-preview/types.d.ts +1 -55
- package/dist/types/components/index.d.ts +1 -213
- package/dist/types/components/input/Input.d.ts +1 -8
- package/dist/types/components/input/index.d.ts +1 -4
- package/dist/types/components/input/tokens.d.ts +1 -2
- package/dist/types/components/input/types.d.ts +1 -42
- package/dist/types/components/loading/Loading.d.ts +1 -3
- package/dist/types/components/loading/index.d.ts +1 -3
- package/dist/types/components/loading/tokens.d.ts +1 -4
- package/dist/types/components/loading/types.d.ts +1 -32
- package/dist/types/components/nav-bar/NavBar.d.ts +1 -4
- package/dist/types/components/nav-bar/index.d.ts +1 -4
- package/dist/types/components/nav-bar/tokens.d.ts +1 -4
- package/dist/types/components/nav-bar/types.d.ts +1 -67
- package/dist/types/components/notice-bar/NoticeBar.d.ts +1 -3
- package/dist/types/components/notice-bar/index.d.ts +1 -3
- package/dist/types/components/notice-bar/tokens.d.ts +1 -24
- package/dist/types/components/notice-bar/types.d.ts +1 -26
- package/dist/types/components/notify/Notify.d.ts +1 -6
- package/dist/types/components/notify/imperative.d.ts +1 -22
- package/dist/types/components/notify/index.d.ts +1 -15
- package/dist/types/components/notify/tokens.d.ts +1 -4
- package/dist/types/components/notify/types.d.ts +1 -64
- package/dist/types/components/number-keyboard/NumberKeyboard.d.ts +1 -4
- package/dist/types/components/number-keyboard/index.d.ts +1 -4
- package/dist/types/components/number-keyboard/tokens.d.ts +1 -42
- package/dist/types/components/number-keyboard/types.d.ts +1 -35
- package/dist/types/components/overlay/Overlay.d.ts +1 -5
- package/dist/types/components/overlay/index.d.ts +1 -5
- package/dist/types/components/overlay/tokens.d.ts +1 -6
- package/dist/types/components/overlay/types.d.ts +1 -13
- package/dist/types/components/password-input/PasswordInput.d.ts +1 -4
- package/dist/types/components/password-input/index.d.ts +1 -2
- package/dist/types/components/password-input/tokens.d.ts +1 -40
- package/dist/types/components/password-input/types.d.ts +1 -35
- package/dist/types/components/picker/Picker.d.ts +1 -32
- package/dist/types/components/picker/index.d.ts +1 -4
- package/dist/types/components/picker/tokens.d.ts +1 -39
- package/dist/types/components/picker/types.d.ts +1 -73
- package/dist/types/components/popup/Popup.d.ts +1 -5
- package/dist/types/components/popup/index.d.ts +1 -4
- package/dist/types/components/popup/tokens.d.ts +1 -48
- package/dist/types/components/popup/types.d.ts +1 -41
- package/dist/types/components/portal/Portal.d.ts +1 -14
- package/dist/types/components/portal/PortalContext.d.ts +1 -7
- package/dist/types/components/portal/PortalHost.d.ts +1 -11
- package/dist/types/components/portal/index.d.ts +1 -3
- package/dist/types/components/portal/tokens.d.ts +1 -3
- package/dist/types/components/portal/types.d.ts +1 -1
- package/dist/types/components/progress/Progress.d.ts +1 -8
- package/dist/types/components/progress/index.d.ts +1 -4
- package/dist/types/components/progress/tokens.d.ts +1 -4
- package/dist/types/components/progress/types.d.ts +1 -51
- package/dist/types/components/radio/Radio.d.ts +1 -3
- package/dist/types/components/radio/RadioContext.d.ts +1 -2
- package/dist/types/components/radio/RadioGroup.d.ts +1 -14
- package/dist/types/components/radio/index.d.ts +1 -7
- package/dist/types/components/radio/tokens.d.ts +1 -2
- package/dist/types/components/radio/types.d.ts +1 -95
- package/dist/types/components/safe-area-view/SafeAreaView.d.ts +1 -10
- package/dist/types/components/safe-area-view/index.d.ts +1 -2
- package/dist/types/components/safe-area-view/tokens.d.ts +1 -3
- package/dist/types/components/safe-area-view/types.d.ts +1 -1
- package/dist/types/components/search/Search.d.ts +1 -4
- package/dist/types/components/search/index.d.ts +1 -4
- package/dist/types/components/search/tokens.d.ts +1 -41
- package/dist/types/components/search/types.d.ts +1 -28
- package/dist/types/components/selector/Selector.d.ts +1 -7
- package/dist/types/components/selector/index.d.ts +1 -4
- package/dist/types/components/selector/tokens.d.ts +1 -2
- package/dist/types/components/selector/types.d.ts +1 -74
- package/dist/types/components/share-sheet/ShareSheet.d.ts +1 -4
- package/dist/types/components/share-sheet/index.d.ts +1 -4
- package/dist/types/components/share-sheet/tokens.d.ts +1 -40
- package/dist/types/components/share-sheet/types.d.ts +1 -26
- package/dist/types/components/sidebar/Sidebar.d.ts +1 -4
- package/dist/types/components/sidebar/SidebarContext.d.ts +1 -7
- package/dist/types/components/sidebar/SidebarItem.d.ts +1 -4
- package/dist/types/components/sidebar/index.d.ts +1 -8
- package/dist/types/components/sidebar/tokens.d.ts +1 -4
- package/dist/types/components/sidebar/types.d.ts +1 -64
- package/dist/types/components/skeleton/Skeleton.d.ts +1 -5
- package/dist/types/components/skeleton/index.d.ts +1 -5
- package/dist/types/components/skeleton/tokens.d.ts +1 -2
- package/dist/types/components/skeleton/types.d.ts +1 -45
- package/dist/types/components/slider/Slider.d.ts +1 -4
- package/dist/types/components/slider/index.d.ts +1 -3
- package/dist/types/components/slider/tokens.d.ts +1 -28
- package/dist/types/components/slider/types.d.ts +1 -38
- package/dist/types/components/space/Space.d.ts +1 -3
- package/dist/types/components/space/index.d.ts +1 -3
- package/dist/types/components/space/tokens.d.ts +1 -3
- package/dist/types/components/space/types.d.ts +1 -39
- package/dist/types/components/stepper/Stepper.d.ts +1 -4
- package/dist/types/components/stepper/index.d.ts +1 -4
- package/dist/types/components/stepper/tokens.d.ts +1 -46
- package/dist/types/components/stepper/types.d.ts +1 -46
- package/dist/types/components/swiper/Swiper.d.ts +1 -9
- package/dist/types/components/swiper/SwiperItem.d.ts +1 -1
- package/dist/types/components/swiper/SwiperPagIndicator.d.ts +1 -36
- package/dist/types/components/swiper/index.d.ts +1 -14
- package/dist/types/components/swiper/tokens.d.ts +1 -11
- package/dist/types/components/swiper/types.d.ts +1 -29
- package/dist/types/components/switch/Switch.d.ts +1 -7
- package/dist/types/components/switch/index.d.ts +1 -4
- package/dist/types/components/switch/tokens.d.ts +1 -2
- package/dist/types/components/switch/types.d.ts +1 -33
- package/dist/types/components/tabbar/Tabbar.d.ts +1 -4
- package/dist/types/components/tabbar/TabbarContext.d.ts +1 -13
- package/dist/types/components/tabbar/TabbarItem.d.ts +1 -4
- package/dist/types/components/tabbar/index.d.ts +1 -9
- package/dist/types/components/tabbar/tokens.d.ts +1 -28
- package/dist/types/components/tabbar/types.d.ts +1 -39
- package/dist/types/components/tabs/Tabs.d.ts +1 -8
- package/dist/types/components/tabs/index.d.ts +1 -10
- package/dist/types/components/tabs/tokens.d.ts +1 -96
- package/dist/types/components/tabs/types.d.ts +1 -64
- package/dist/types/components/tag/Tag.d.ts +1 -3
- package/dist/types/components/tag/index.d.ts +1 -3
- package/dist/types/components/tag/tokens.d.ts +1 -4
- package/dist/types/components/tag/types.d.ts +1 -69
- package/dist/types/components/theme.d.ts +1 -112
- package/dist/types/components/toast/Toast.d.ts +1 -33
- package/dist/types/components/toast/imperative.d.ts +1 -22
- package/dist/types/components/toast/index.d.ts +1 -15
- package/dist/types/components/toast/tokens.d.ts +1 -29
- package/dist/types/components/toast/types.d.ts +1 -1
- package/dist/types/components/typography/Typography.d.ts +1 -11
- package/dist/types/components/typography/index.d.ts +1 -3
- package/dist/types/components/typography/tokens.d.ts +1 -2
- package/dist/types/components/typography/types.d.ts +1 -66
- package/dist/types/components/water-mark/WaterMark.d.ts +1 -4
- package/dist/types/components/water-mark/index.d.ts +1 -5
- package/dist/types/components/water-mark/tokens.d.ts +1 -2
- package/dist/types/components/water-mark/types.d.ts +1 -58
- package/dist/types/design-system/Text.d.ts +1 -3
- package/dist/types/design-system/ThemeContext.d.ts +1 -14
- package/dist/types/design-system/ThemeProvider.d.ts +1 -14
- package/dist/types/design-system/createComponentTokensHook.d.ts +1 -4
- package/dist/types/design-system/index.d.ts +1 -11
- package/dist/types/design-system/mergeTokensOverride.d.ts +1 -2
- package/dist/types/design-system/presets.d.ts +1 -8
- package/dist/types/design-system/tokens.d.ts +1 -74
- package/dist/types/design-system/useTheme.d.ts +1 -1
- package/dist/types/hooks/animation/index.d.ts +1 -3
- package/dist/types/hooks/animation/useAnimatedTransition.d.ts +1 -13
- package/dist/types/hooks/animation/useReducedMotion.d.ts +1 -3
- package/dist/types/hooks/aria/index.d.ts +1 -4
- package/dist/types/hooks/aria/useAriaListBox.d.ts +1 -14
- package/dist/types/hooks/aria/useAriaOverlay.d.ts +1 -14
- package/dist/types/hooks/aria/useAriaPress.d.ts +1 -19
- package/dist/types/hooks/aria/useAriaToggle.d.ts +1 -12
- package/dist/types/hooks/gesture/index.d.ts +1 -1
- package/dist/types/hooks/gesture/useGestureScroll.d.ts +1 -33
- package/dist/types/hooks/index.d.ts +1 -9
- package/dist/types/hooks/overlay/OverlayStackStore.d.ts +1 -39
- package/dist/types/hooks/overlay/index.d.ts +1 -2
- package/dist/types/hooks/overlay/useOverlayStack.d.ts +1 -10
- package/dist/types/hooks/useControllableValue.d.ts +1 -9
- package/dist/types/hooks/useCountDown.d.ts +1 -23
- package/dist/types/hooks/useHairline.d.ts +1 -10
- package/dist/types/hooks/useSafeAreaPadding.d.ts +1 -13
- package/dist/types/index.d.ts +1 -9
- package/dist/types/nativewind.d.ts +1 -4
- package/dist/types/platform/animation.d.ts +1 -9
- package/dist/types/platform/history.d.ts +1 -1
- package/dist/types/platform/index.d.ts +1 -5
- package/dist/types/platform/measure.d.ts +1 -7
- package/dist/types/platform/runtime.d.ts +1 -3
- package/dist/types/platform/scrollLock.d.ts +1 -2
- package/dist/types/types.d.ts +1 -4
- package/dist/types/utils/array.d.ts +1 -1
- package/dist/types/utils/color.d.ts +1 -3
- package/dist/types/utils/compare.d.ts +1 -2
- package/dist/types/utils/createPlatformShadow.d.ts +1 -11
- package/dist/types/utils/date.d.ts +1 -13
- package/dist/types/utils/deepMerge.d.ts +1 -3
- package/dist/types/utils/hairline.d.ts +1 -15
- package/dist/types/utils/index.d.ts +1 -13
- package/dist/types/utils/number.d.ts +1 -11
- package/dist/types/utils/promise.d.ts +1 -1
- package/dist/types/utils/render.d.ts +1 -5
- package/dist/types/utils/rtl.d.ts +1 -5
- package/dist/types/utils/string.d.ts +1 -3
- package/dist/types/utils/validate.d.ts +1 -13
- package/package.json +142 -149
|
@@ -1 +1 @@
|
|
|
1
|
-
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_extends.apply(null,arguments)}import React,{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,Platform,Pressable,StyleSheet,Text,View,useWindowDimensions}from"react-native";import{SafeAreaView}from"../safe-area-view";import{addPopStateListener,nativeDriverEnabled}from"../../platform";import{useReducedMotion}from"../../hooks/animation";import{createPlatformShadow}from"../../utils/createPlatformShadow";import{isRenderable,isText}from"../../utils/validate";import{Cross}from"react-native-system-icon";import Portal from"../portal/Portal";import{useAriaOverlay,useOverlayStack}from"../../hooks";import{useLocale}from"../config-provider/useLocale";import{useDirection}from"../config-provider/useDirection";import{usePopupTokens}from"./tokens";const AnimatedPressable=Animated.createAnimatedComponent(Pressable),EASE_OUT=Easing.bezier(.075,.82,.165,1),EASE_IN=Easing.bezier(.55,.055,.675,.19),CAPTURE=()=>!0,placementConfig={top:{container:{justifyContent:"flex-start",alignItems:"center"},axis:"y"},bottom:{container:{justifyContent:"flex-end",alignItems:"center"},axis:"y"},left:{container:{justifyContent:"center",alignItems:"flex-start"},axis:"x"},right:{container:{justifyContent:"center",alignItems:"flex-end"},axis:"x"},center:{container:{justifyContent:"center",alignItems:"center"},axis:"y"}},buildRadius=(e,t,o)=>e?"top"===t?{borderBottomLeftRadius:o,borderBottomRightRadius:o}:"bottom"===t?{borderTopLeftRadius:o,borderTopRightRadius:o}:"left"===t?{borderTopRightRadius:o,borderBottomRightRadius:o}:"right"===t?{borderTopLeftRadius:o,borderBottomLeftRadius:o}:{borderRadius:o}:void 0,hiddenStyle={opacity:0,shadowOpacity:0,shadowRadius:0,elevation:0},PopupImpl=e=>{const t=useLocale(),o=useDirection(),{visible:n,placement:i,position:r,title:a,description:s,tokensOverride:l,overlay:c=!0,overlayStyle:u,overlayAccessibilityLabel:d=t?.vanPopup?.closeOverlay??"Close overlay",closeOnOverlayPress:p,closeOnClickOverlay:m,overlayTestID:f="popup-overlay",closeable:g=!1,closeIcon:y,closeIconPosition:
|
|
1
|
+
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_extends.apply(null,arguments)}import React,{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,Platform,Pressable,StyleSheet,Text,View,useWindowDimensions}from"react-native";import{SafeAreaView}from"../safe-area-view";import{addPopStateListener,nativeDriverEnabled}from"../../platform";import{useReducedMotion}from"../../hooks/animation";import{createPlatformShadow}from"../../utils/createPlatformShadow";import{isRenderable,isText}from"../../utils/validate";import{Cross}from"react-native-system-icon";import Portal from"../portal/Portal";import{useAriaOverlay,useOverlayStack}from"../../hooks";import{useLocale}from"../config-provider/useLocale";import{useDirection}from"../config-provider/useDirection";import{usePopupTokens}from"./tokens";const AnimatedPressable=Animated.createAnimatedComponent(Pressable),EASE_OUT=Easing.bezier(.075,.82,.165,1),EASE_IN=Easing.bezier(.55,.055,.675,.19),CAPTURE=()=>!0,placementConfig={top:{container:{justifyContent:"flex-start",alignItems:"center"},axis:"y"},bottom:{container:{justifyContent:"flex-end",alignItems:"center"},axis:"y"},left:{container:{justifyContent:"center",alignItems:"flex-start"},axis:"x"},right:{container:{justifyContent:"center",alignItems:"flex-end"},axis:"x"},center:{container:{justifyContent:"center",alignItems:"center"},axis:"y"}},CONTENT_SELF={top:{alignSelf:"stretch"},bottom:{alignSelf:"stretch"},left:{alignSelf:"flex-start"},right:{alignSelf:"flex-end"},center:{alignSelf:"center"}},buildRadius=(e,t,o)=>e?"top"===t?{borderBottomLeftRadius:o,borderBottomRightRadius:o}:"bottom"===t?{borderTopLeftRadius:o,borderTopRightRadius:o}:"left"===t?{borderTopRightRadius:o,borderBottomRightRadius:o}:"right"===t?{borderTopLeftRadius:o,borderBottomLeftRadius:o}:{borderRadius:o}:void 0,hiddenStyle={opacity:0,shadowOpacity:0,shadowRadius:0,elevation:0},PopupImpl=e=>{const t=useLocale(),o=useDirection(),{visible:n,placement:i,position:r,title:a,description:s,tokensOverride:l,overlay:c=!0,overlayStyle:u,overlayAccessibilityLabel:d=t?.vanPopup?.closeOverlay??"Close overlay",closeOnOverlayPress:p,closeOnClickOverlay:m,overlayTestID:f="popup-overlay",closeable:g=!1,closeIcon:y,closeIconPosition:h="top-right",round:b,safeArea:R=!1,safeAreaInsetTop:v=!1,safeAreaInsetBottom:E,lockScroll:C=!0,destroyOnClose:I=!1,duration:O=300,zIndex:P,closeOnBackPress:x=!1,closeOnPopstate:A=!1,children:T,beforeClose:w,onClickOverlay:k,onClose:z,onOpen:L,onOpened:W,onClosed:V,stopPropagation:B=!0,style:D,contentAnimationStyle:F,...H}=e,M=i??r??"center",j=m??p??!0,_="center"===M,N=E??!1,U=usePopupTokens(l),X=useReducedMotion(),Y=useRef({onOpened:W,onClosed:V,onOpen:L,onClose:z,beforeClose:w,onClickOverlay:k});Y.current={onOpened:W,onClosed:V,onOpen:L,onClose:z,beforeClose:w,onClickOverlay:k};const q=useMemo(()=>{const e=createPlatformShadow(U.shadow),{colors:t,spacing:o,typography:n,layout:i}=U;return{popup:{backgroundColor:t.background,padding:o.padding,...e},title:{color:t.title,fontFamily:n.fontFamily,fontSize:n.titleSize,fontWeight:n.titleWeight,marginHorizontal:o.descriptionHorizontal,textAlign:"center"},titleWrap:{marginTop:o.titleTop,marginBottom:o.titleBottom,marginHorizontal:o.descriptionHorizontal,alignItems:"center"},desc:{color:t.description,fontFamily:n.fontFamily,fontSize:n.descriptionSize,lineHeight:n.descriptionLineHeight},descWrap:{marginHorizontal:o.descriptionHorizontal,marginBottom:o.descriptionBottom},closeBase:{minWidth:o.closeIconSize,minHeight:o.closeIconSize,padding:o.closeIconPadding},closeDef:{width:o.closeIconSize,height:o.closeIconSize},side:{width:i.sideWidth,maxWidth:i.maxWidth},center:{minWidth:i.minWidth,maxWidth:i.centerMaxWidth}}},[U]),[G,J]=useState(n),[K,Q]=useState(n),Z=n||K,$=j&&(z||w),ee=useRef(new Animated.Value(0)).current,te=useRef(null),oe=useRef(0),ne=useRef(n),ie=useRef(!1),re="top"===M||"bottom"===M,ae="left"===M||"right"===M,se="top"===M||"left"===M?-1:1,le=useCallback((e,t)=>{oe.current+=1;const o=oe.current;te.current?.stop();const n=t?0:O,i=Animated.timing(ee,{toValue:e?1:0,duration:n,easing:e?EASE_OUT:EASE_IN,useNativeDriver:nativeDriverEnabled,isInteraction:!1});te.current=i,i.start(({finished:t})=>{t&&o===oe.current&&(e?Y.current.onOpened?.():(Q(!1),I&&J(!1),Y.current.onClosed?.()))})},[I,O,ee]);useEffect(()=>{n?(J(!0),Q(!0),le(!0,X)):ne.current&&le(!1,X)},[le,n,X]),useEffect(()=>{n&&!ne.current&&Y.current.onOpen?.(),ne.current=n},[n]),useEffect(()=>()=>{te.current?.stop()},[]);const ce=useCallback(async e=>{if(!ie.current){ie.current=!0;try{if(Y.current.beforeClose){if(!1===await Y.current.beforeClose(e))return}Y.current.onClose?.()}finally{ie.current=!1}}},[]);useEffect(()=>{if(A)return addPopStateListener(()=>{n&&ce("close")})},[A,ce,n]);const ue=useCallback(()=>{Y.current.onClickOverlay?.(),j&&ce("overlay")},[ce,j]),de=useCallback(()=>ce("close-icon"),[ce]),pe=useCallback(()=>ce("close"),[ce]),{zIndex:me}=useOverlayStack({visible:Z,onClose:pe,closeOnBack:x,lockScroll:C,zIndex:P,type:"popup"}),{overlayRef:fe,overlayProps:ge}=useAriaOverlay({isOpen:Z,onClose:()=>ce("overlay"),isDismissable:j,overlayProps:{..."android"===Platform.OS?{}:{accessibilityRole:"dialog"},accessibilityLiveRegion:"polite"}}),{onLayout:ye,...Se}=ge,he=useMemo(()=>B?{...Se,onStartShouldSetResponder:CAPTURE}:Se,[Se,B]),be=placementConfig[M],Re=buildRadius(b,M,U.radius.round),{width:ve,height:Ee}=useWindowDimensions(),Ce=ae?ve:re?Ee:0,Ie=useMemo(()=>{if(_)return null;const e=[Ce*se,0];return"y"===be.axis?{translateY:ee.interpolate({inputRange:[0,1],outputRange:e})}:{translateX:ee.interpolate({inputRange:[0,1],outputRange:e})}},[be.axis,se,Ce,_,ee]),Oe=useMemo(()=>Ie?[Ie]:[],[Ie]),Pe=useMemo(()=>{const e=F?.transform,t=Array.isArray(e)?[...Oe,...e]:Oe,o={...F,transform:t};return _?{...o,opacity:ee}:null==F?.opacity?{...o,opacity:1}:o},[Oe,F,_,ee]),[xe,Ae]=useState(0),Te=useCallback(e=>Ae(e.nativeEvent.layout.height),[]),we=G||n,ke=!Z,ze=isRenderable(a)||isRenderable(s),Le=useMemo(()=>{if(!ze)return null;const e=U.spacing.closeIconRight+U.spacing.closeIconSize,t=g&&h.startsWith("top-")?h.endsWith("right")?{paddingRight:e}:{paddingLeft:e}:void 0,o=(e,t,o)=>isRenderable(e)?isText(e)?React.createElement(Text,{style:t},e):React.createElement(View,{style:o},e):null;return React.createElement(View,{style:[S.header,t]},o(a,[S.title,q.title],q.titleWrap),o(s,[S.desc,q.desc],q.descWrap))},[g,h,s,q,ze,a,U.spacing.closeIconRight,U.spacing.closeIconSize]),We=useMemo(()=>{if(!g)return null;const e=null!=y,t=h.includes("bottom")?{bottom:U.spacing.closeIconTop}:{top:U.spacing.closeIconTop+xe},n="rtl"===o,i=h.endsWith("left")?n?{right:U.spacing.closeIconRight}:{left:U.spacing.closeIconRight}:n?{left:U.spacing.closeIconRight}:{right:U.spacing.closeIconRight};return React.createElement(Pressable,{style:[S.closeBase,q.closeBase,t,i,!e&&q.closeDef],hitSlop:8,onPress:de},e?y:React.createElement(Cross,{size:22,fill:U.colors.closeIcon,color:U.colors.closeIcon}))},[y,h,g,q,de,xe,U.colors.closeIcon,U.spacing.closeIconRight,U.spacing.closeIconTop]),Ve=ze?React.createElement(React.Fragment,null,Le,T):T;if(!we)return null;const Be=me??P,De=R?React.createElement(SafeAreaView,null,Ve):React.createElement(React.Fragment,null,v&&React.createElement(SafeAreaView,{edge:"top",onLayout:Te,pointerEvents:"none"}),Ve,N&&React.createElement(SafeAreaView,{edge:"bottom",pointerEvents:"none"}));return React.createElement(Portal,null,React.createElement(View,{style:[S.root,Be?{zIndex:Be}:void 0],pointerEvents:"box-none"},React.createElement(View,{style:[S.ctr,be.container],pointerEvents:Z?"auto":"none",accessibilityViewIsModal:Z,accessibilityLiveRegion:"polite",onAccessibilityEscape:pe},c&&Z?React.createElement(AnimatedPressable,_extends({testID:f,style:[S.ovl,{backgroundColor:U.colors.overlay,opacity:ee},u],renderToHardwareTextureAndroid:"android"===Platform.OS,shouldRasterizeIOS:"ios"===Platform.OS,pointerEvents:Z?"auto":"none"},$?{accessibilityRole:"button",accessibilityLabel:d,accessibilityHint:t?.vanPopup?.closeHint??"Double-tap to close"}:{accessible:!1},{onPress:ue})):null,!c&&C&&Z?React.createElement(View,{style:S.lock,pointerEvents:"auto",onStartShouldSetResponder:CAPTURE,onMoveShouldSetResponder:CAPTURE}):null,React.createElement(Animated.View,_extends({ref:fe},he,{onLayout:ye,renderToHardwareTextureAndroid:"android"===Platform.OS,shouldRasterizeIOS:"ios"===Platform.OS,style:[q.popup,_&&q.center,re&&S.popV,ae&&q.side,CONTENT_SELF[M],Re,Pe,D,ke&&hiddenStyle]},H),We,De))))},S=StyleSheet.create({root:{...StyleSheet.absoluteFillObject,justifyContent:"center"},ctr:{flex:1},ovl:{...StyleSheet.absoluteFillObject,opacity:0},header:{width:"100%"},title:{includeFontPadding:!1},desc:{includeFontPadding:!1},popV:{alignSelf:"stretch"},closeBase:{position:"absolute",zIndex:999,alignItems:"center",justifyContent:"center"},lock:{...StyleSheet.absoluteFillObject}});export const Popup=React.memo(PopupImpl);export default Popup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var l in o)({}).hasOwnProperty.call(o,l)&&(e[l]=o[l])}return e},_extends.apply(null,arguments)}import React,{useCallback,useMemo}from"react";import{Pressable,Text,View}from"react-native";import{useSelectorTokens}from"./tokens";import{useAriaPress,useControllableValue}from"../../hooks";import{isText}from"../../utils";const CHECK_MARK="✓",
|
|
1
|
+
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var l in o)({}).hasOwnProperty.call(o,l)&&(e[l]=o[l])}return e},_extends.apply(null,arguments)}import React,{useCallback,useMemo}from"react";import{Pressable,Text,View}from"react-native";import{useSelectorTokens}from"./tokens";import{useAriaPress,useControllableValue}from"../../hooks";import{isText}from"../../utils";const CHECK_MARK="✓",CH=8,CW=10,SelectorOptionItemImpl=({option:e,active:t,disabled:o,multiple:l,showCheckMark:a,basis:i,containerWidth:r,columns:s,gap:c,tokens:n,itemStyle:d,labelStyle:p,descriptionStyle:m,onToggle:u})=>{const y=e.label,b=e.description,g=null!=b,h=isText(y)?String(y):String(e.value),S=isText(b)?String(b):void 0,{interactionProps:f,states:k}=useAriaPress({disabled:o,onPress:()=>u(e),extraProps:{accessibilityRole:l?"checkbox":"radio",accessibilityLabel:h,accessibilityHint:S,accessibilityState:l?{checked:t,disabled:o}:{selected:t,disabled:o}}}),x=r>0?{width:(r-(s-1)*c)/s,flexGrow:0,flexShrink:0}:{flexBasis:i,flexShrink:1};return React.createElement(Pressable,_extends({},f,{style:[n.layout.pressable,x]}),React.createElement(View,{style:[n.layout.item,{paddingHorizontal:n.spacing.paddingHorizontal,paddingVertical:n.spacing.paddingVertical,borderRadius:n.radii.item,borderColor:t?n.colors.borderActive:n.colors.border,backgroundColor:t?n.colors.backgroundActive:n.colors.background,opacity:o?n.states.disabledOpacity:1},k.pressed&&{opacity:.9},d]},isText(y)?React.createElement(Text,{style:[n.layout.label,{color:t?n.colors.textActive:n.colors.text,fontSize:n.typography.fontSize,lineHeight:1.4*n.typography.fontSize,fontFamily:n.typography.fontFamily,fontWeight:n.typography.fontWeight},p]},y):y,g?isText(b)?React.createElement(Text,{style:[n.layout.description,{marginTop:n.spacing.descriptionMarginTop,color:o?n.colors.disabledText:n.colors.description,fontSize:n.typography.descriptionSize,lineHeight:1.4*n.typography.descriptionSize},m]},b):React.createElement(View,{style:{marginTop:n.spacing.descriptionMarginTop}},b):null,t&&a?React.createElement(React.Fragment,null,React.createElement(View,{style:[n.layout.checkMarkTriangle,{borderTopWidth:8,borderBottomWidth:8,borderLeftWidth:10,borderRightWidth:10,borderBottomColor:n.colors.check,borderRightColor:n.colors.check}]}),React.createElement(Text,{style:[n.layout.checkMark,{color:n.colors.checkForeground}]},"✓")):null))},SelectorOptionItemMemo=React.memo(SelectorOptionItemImpl);SelectorOptionItemMemo.displayName="SelectorOptionItem";const SelectorOptionItem=SelectorOptionItemMemo,SelectorImpl=e=>{const{tokensOverride:t,options:o,columns:l,multiple:a,showCheckMark:i,disabled:r,onChange:s,itemStyle:c,labelStyle:n,descriptionStyle:d,style:p,onLayout:m,...u}=e,y=useSelectorTokens(t),[b,g]=React.useState(0),h=l??y.defaults.columns??1,S=a??y.defaults.multiple,f=i??y.defaults.showCheckMark,k=Boolean(r??y.defaults.disabled),[x=[],v]=useControllableValue(e,{defaultValue:[]}),R=useMemo(()=>{const e=new Map;for(const t of o)e.set(t.value,t);return e},[o]),T=Math.max(1,Math.floor(h)),C=100/T+"%",M=y.spacing.gap,w=useMemo(()=>new Set(x),[x]),O=useCallback(e=>{if(k||e.disabled)return;const t=w.has(e.value),o=S?t?x.filter(t=>t!==e.value):[...x,e.value]:t?[]:[e.value];v(o,{items:o.map(e=>R.get(e)).filter(Boolean)})},[k,S,R,w,v,x]),E=useCallback(e=>{g(e.nativeEvent.layout.width),m?.(e)},[m]);return React.createElement(View,_extends({},u,{onLayout:E,style:[y.layout.container,{columnGap:M,rowGap:M},p],accessibilityRole:S?void 0:"radiogroup"}),o.map(e=>React.createElement(SelectorOptionItem,{key:String(e.value),option:e,active:w.has(e.value),disabled:k||Boolean(e.disabled),multiple:S,showCheckMark:f,basis:C,containerWidth:b,columns:T,gap:M,tokens:y,itemStyle:c,labelStyle:n,descriptionStyle:d,onToggle:O})))};export const Selector=React.memo(SelectorImpl);Selector.displayName="Selector";export default Selector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}import React,{useEffect,useMemo,useRef,useState}from"react";import{AccessibilityInfo,Animated,Easing,Pressable,StyleSheet,View,useWindowDimensions}from"react-native";import Portal from"../portal/Portal";import{SafeAreaView}from"../safe-area-view";import{useAriaPress,useOverlayStack}from"../../hooks";import Loading from"../loading";import{Checked,Close}from"react-native-system-icon";import{isFiniteNumber,isText,isRenderable}from"../../utils/validate";import{renderTextOrNode}from"../../utils";import{nativeDriverEnabled}from"../../platform";import{useReducedMotion}from"../../hooks/animation";import{useLocale}from"../config-provider/useLocale";import{useToastTokens}from"./tokens";const RT=()=>!0,ToastContentImpl=e=>{const{visible:t,message:n,icon:o,type:r="info",iconSize:i,duration:s=2e3,position:a="middle",forbidClick:c=!1,overlay:l=!1,overlayStyle:u,closeOnClickOverlay:d=!1,closeOnClick:m=!1,loadingIndicator:f,safeAreaInsetTop:p,safeAreaInsetBottom:g,tokensOverride:v,style:x,textStyle:b,onClose:R,onOpen:y,onOpened:h,onClosed:E}=e,T=useLocale(),C=useToastTokens(v),O=useReducedMotion(),{colors:
|
|
1
|
+
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}import React,{useEffect,useMemo,useRef,useState}from"react";import{AccessibilityInfo,Animated,Easing,Pressable,StyleSheet,View,useWindowDimensions}from"react-native";import Portal from"../portal/Portal";import{SafeAreaView}from"../safe-area-view";import{useAriaPress,useOverlayStack}from"../../hooks";import Loading from"../loading";import{Checked,Close}from"react-native-system-icon";import{isFiniteNumber,isText,isRenderable}from"../../utils/validate";import{renderTextOrNode}from"../../utils";import{nativeDriverEnabled}from"../../platform";import{useReducedMotion}from"../../hooks/animation";import{useLocale}from"../config-provider/useLocale";import{useToastTokens}from"./tokens";const RT=()=>!0,ToastContentImpl=e=>{const{visible:t,message:n,icon:o,type:r="info",iconSize:i,duration:s=2e3,position:a="middle",forbidClick:c=!1,overlay:l=!1,overlayStyle:u,closeOnClickOverlay:d=!1,closeOnClick:m=!1,loadingIndicator:f,safeAreaInsetTop:p,safeAreaInsetBottom:g,tokensOverride:v,style:x,textStyle:b,onClose:R,onOpen:y,onOpened:h,onClosed:E}=e,T=useLocale(),C=useToastTokens(v),O=useReducedMotion(),{colors:w}=C,{height:I}=useWindowDimensions(),P=isFiniteNumber(s)?Math.max(0,s):0,[k,z]=useState(t),A=useRef(new Animated.Value(t?1:0)).current,M=useRef(null),V=useRef(0),H=useRef(R);H.current=R;const D=useRef(y);D.current=y;const W=useRef(h);W.current=h;const j=useRef(E);j.current=E;const{zIndex:F}=useOverlayStack({visible:k,type:"toast"}),N=useRef(t),L=useRef(!1),_=I>0?Math.round(I*C.positionOffsetRatio):C.positionOffsetMin,B=void 0!==p?p:"top"===a,q=void 0!==g?g:"bottom"===a,G=useMemo(()=>"top"===a?{justifyContent:"flex-start",paddingTop:_}:"bottom"===a?{justifyContent:"flex-end",paddingBottom:_}:{justifyContent:"center"},[a,_]);useEffect(()=>{V.current+=1;const e=V.current;M.current?.stop();const n=O?0:C.animationDuration;t?(z(!0),M.current=Animated.timing(A,{toValue:1,duration:n,easing:Easing.out(Easing.cubic),useNativeDriver:nativeDriverEnabled,isInteraction:!1}),M.current.start()):(M.current=Animated.timing(A,{toValue:0,duration:n,easing:Easing.out(Easing.cubic),useNativeDriver:nativeDriverEnabled,isInteraction:!1}),M.current.start(({finished:t})=>{t&&e===V.current&&z(!1)}))},[A,O,C.animationDuration,t]),useEffect(()=>()=>{M.current?.stop()},[]),useEffect(()=>{if(!t||P<=0)return;const e=setTimeout(()=>{H.current?.()},P);return()=>clearTimeout(e)},[P,t]),useEffect(()=>{if(!t||!isText(n))return;const e=String(n);e&&AccessibilityInfo.announceForAccessibility?.(e)},[n,t]);const J=O?0:C.animationDuration;useEffect(()=>{let e=null;return t?(L.current=!1,!N.current&&(D.current?.(),W.current&&(e=setTimeout(W.current,J)))):N.current&&(L.current=!0),N.current=t,()=>{e&&clearTimeout(e)}},[J,t]),useEffect(()=>{!k&&L.current&&(L.current=!1,j.current?.())},[k]);const K=useRef(()=>H.current?.()).current,Q=useAriaPress({disabled:!m,onPress:K,extraProps:{accessibilityRole:m?"button":"alert",accessibilityHint:m?T?.vanToast?.closeHint??"Double-tap to dismiss":void 0,accessibilityLiveRegion:"assertive"}}),U=useMemo(()=>{if(o)return o;const e=i??C.iconSize;switch(r){case"success":return React.createElement(Checked,{size:e,fill:w.text,color:w.text});case"fail":return React.createElement(Close,{size:e,fill:w.text,color:w.text});case"loading":return f??React.createElement(Loading,{color:w.text,size:e});default:return null}},[w.text,o,i,f,C.iconSize,r]),X=useMemo(()=>({marginBottom:C.gap}),[C.gap]),Y=useMemo(()=>({color:w.text,fontSize:C.fontSize,lineHeight:C.lineHeight,fontFamily:C.fontFamily}),[w.text,C.fontSize,C.fontFamily,C.lineHeight]),Z="info"===r&&!U,$=useMemo(()=>Z?{minWidth:C.textMinWidth,minHeight:0,paddingVertical:C.textPaddingVertical,paddingHorizontal:C.textPaddingHorizontal}:{minWidth:C.defaultWidth,minHeight:C.defaultMinHeight,padding:C.defaultPadding},[Z,C.defaultMinHeight,C.defaultPadding,C.defaultWidth,C.textMinWidth,C.textPaddingHorizontal,C.textPaddingVertical]),ee=useMemo(()=>({borderRadius:C.radius,opacity:m&&Q.states.pressed?C.pressedOpacity:A,backgroundColor:C.colors.variants[r],maxWidth:C.maxWidth,...$}),[A,$,m,Q.states.pressed,C.colors.variants,C.maxWidth,C.pressedOpacity,C.radius,r]);if(!k)return null;const te=isRenderable(n)&&("string"!=typeof n||""!==n);return React.createElement(View,{style:[S.b,{backgroundColor:C.colors.transparent},G,F?{zIndex:F}:void 0],pointerEvents:c||l||m?"auto":"none"},(l||c)&&React.createElement(Pressable,{testID:"rv-toast-overlay",style:[S.o,{backgroundColor:C.colors.transparent},l&&{backgroundColor:w.backdrop},u],pointerEvents:"auto",onPress:l&&d?K:void 0,onStartShouldSetResponder:RT,onMoveShouldSetResponder:RT}),B&&React.createElement(SafeAreaView,{edge:"top",pointerEvents:"none"}),React.createElement(Pressable,_extends({disabled:!m},Q.interactionProps,{style:S.pw}),React.createElement(Animated.View,{renderToHardwareTextureAndroid:!0,shouldRasterizeIOS:!0,style:[S.t,ee,x]},U&&React.createElement(View,{style:X},isText(U)?renderTextOrNode(U,[{color:w.text,fontSize:C.iconSize}]):U),te&&(isText(n)?renderTextOrNode(n,[S.m,Y,b]):React.createElement(View,{style:S.mw},n)))),q&&React.createElement(SafeAreaView,{edge:"bottom",pointerEvents:"none"}))};export const ToastContent=React.memo(ToastContentImpl);const ToastImpl=e=>React.createElement(Portal,null,React.createElement(ToastContent,e));export const Toast=React.memo(ToastImpl);const S=StyleSheet.create({b:{flex:1,alignItems:"center"},o:{...StyleSheet.absoluteFillObject},pw:{alignItems:"center"},t:{alignItems:"center",justifyContent:"center"},m:{textAlign:"center"},mw:{alignItems:"center"}});export default Toast;
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { ActionSheetProps } from './types';
|
|
3
|
-
declare const ActionSheet: React.NamedExoticComponent<ActionSheetProps>;
|
|
4
|
-
export default ActionSheet;
|
|
1
|
+
import React from'react';import type{ActionSheetProps}from'./types';declare const ActionSheet:React.NamedExoticComponent<ActionSheetProps>;export default ActionSheet;
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
import ActionSheet from
|
|
2
|
-
export type { ActionSheetProps, ActionSheetAction, ActionSheetCloseAction } from './types';
|
|
3
|
-
export { useActionSheetTokens } from './tokens';
|
|
4
|
-
export default ActionSheet;
|
|
1
|
+
import ActionSheet from'./ActionSheet';export type{ActionSheetProps,ActionSheetAction,ActionSheetCloseAction}from'./types';export{useActionSheetTokens}from'./tokens';export default ActionSheet;
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ActionSheetTokens } from './types';
|
|
3
|
-
export declare const createActionSheetTokens: (foundations: Foundations) => ActionSheetTokens;
|
|
4
|
-
export declare const useActionSheetTokens: (overrides?: import("../..").DeepPartial<ActionSheetTokens> | undefined) => ActionSheetTokens;
|
|
1
|
+
import{type Foundations}from'../../design-system/tokens';import type{ActionSheetTokens}from'./types';export declare const createActionSheetTokens:(foundations:Foundations)=>ActionSheetTokens;export declare const useActionSheetTokens:(overrides?:import("../..").DeepPartial<ActionSheetTokens>|undefined)=>ActionSheetTokens;
|
|
@@ -1,87 +1 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
-
import type { DeepPartial } from '../../types';
|
|
4
|
-
import type { PopupProps } from '../popup/Popup';
|
|
5
|
-
export type ActionSheetCloseAction = 'action' | 'cancel' | 'close' | 'close-icon' | 'overlay';
|
|
6
|
-
export interface ActionSheetAction {
|
|
7
|
-
key?: React.Key;
|
|
8
|
-
name?: React.ReactNode;
|
|
9
|
-
subname?: React.ReactNode;
|
|
10
|
-
color?: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
loading?: boolean;
|
|
13
|
-
icon?: React.ReactNode;
|
|
14
|
-
style?: StyleProp<ViewStyle>;
|
|
15
|
-
onPress?: (action: ActionSheetAction) => void;
|
|
16
|
-
callback?: (action: ActionSheetAction) => void;
|
|
17
|
-
}
|
|
18
|
-
export interface ActionSheetTokens {
|
|
19
|
-
defaults: {
|
|
20
|
-
closeOnClickAction: boolean;
|
|
21
|
-
closeable: boolean;
|
|
22
|
-
round: boolean;
|
|
23
|
-
safeAreaInsetBottom: boolean;
|
|
24
|
-
overlay: boolean;
|
|
25
|
-
lockScroll: boolean;
|
|
26
|
-
};
|
|
27
|
-
layout: {
|
|
28
|
-
popup: ViewStyle;
|
|
29
|
-
panel: ViewStyle;
|
|
30
|
-
header: ViewStyle;
|
|
31
|
-
titleContainer: ViewStyle;
|
|
32
|
-
title: TextStyle;
|
|
33
|
-
titleNode: ViewStyle;
|
|
34
|
-
closeButton: ViewStyle;
|
|
35
|
-
descriptionContainer: ViewStyle;
|
|
36
|
-
description: TextStyle;
|
|
37
|
-
descriptionNode: ViewStyle;
|
|
38
|
-
actions: ViewStyle;
|
|
39
|
-
item: ViewStyle;
|
|
40
|
-
itemWithIcon: ViewStyle;
|
|
41
|
-
itemTextWrapper: ViewStyle;
|
|
42
|
-
itemText: TextStyle;
|
|
43
|
-
subname: TextStyle;
|
|
44
|
-
subnameNode: ViewStyle;
|
|
45
|
-
icon: ViewStyle;
|
|
46
|
-
cancelGap: ViewStyle;
|
|
47
|
-
cancel: ViewStyle;
|
|
48
|
-
cancelText: TextStyle;
|
|
49
|
-
};
|
|
50
|
-
colors: {
|
|
51
|
-
background: string;
|
|
52
|
-
title: string;
|
|
53
|
-
description: string;
|
|
54
|
-
item: string;
|
|
55
|
-
subitem: string;
|
|
56
|
-
cancel: string;
|
|
57
|
-
disabled: string;
|
|
58
|
-
border: string;
|
|
59
|
-
itemBackground: string;
|
|
60
|
-
itemPressedBackground: string;
|
|
61
|
-
cancelBackground: string;
|
|
62
|
-
cancelGapBackground: string;
|
|
63
|
-
};
|
|
64
|
-
typography: {
|
|
65
|
-
title: number;
|
|
66
|
-
item: number;
|
|
67
|
-
description: number;
|
|
68
|
-
};
|
|
69
|
-
spacing: {
|
|
70
|
-
horizontal: number;
|
|
71
|
-
vertical: number;
|
|
72
|
-
cancelGap: number;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
export interface ActionSheetProps extends Omit<PopupProps, 'children' | 'tokensOverride'> {
|
|
76
|
-
title?: React.ReactNode;
|
|
77
|
-
description?: React.ReactNode;
|
|
78
|
-
cancelText?: React.ReactNode;
|
|
79
|
-
actions?: ActionSheetAction[];
|
|
80
|
-
closeOnClickAction?: boolean;
|
|
81
|
-
closeOnSelect?: boolean;
|
|
82
|
-
children?: React.ReactNode;
|
|
83
|
-
onSelect?: (action: ActionSheetAction, index: number) => void;
|
|
84
|
-
onCancel?: () => void;
|
|
85
|
-
beforeClose?: (action: ActionSheetCloseAction) => boolean | Promise<boolean>;
|
|
86
|
-
tokensOverride?: DeepPartial<ActionSheetTokens>;
|
|
87
|
-
}
|
|
1
|
+
import type*as React from'react';import type{StyleProp,TextStyle,ViewStyle}from'react-native';import type{DeepPartial}from'../../types';import type{PopupProps}from'../popup/Popup';export type ActionSheetCloseAction='action'|'cancel'|'close'|'close-icon'|'overlay';export interface ActionSheetAction{key?:React.Key;name?:React.ReactNode;subname?:React.ReactNode;color?:string;disabled?:boolean;loading?:boolean;icon?:React.ReactNode;style?:StyleProp<ViewStyle>;onPress?:(action:ActionSheetAction)=>void;callback?:(action:ActionSheetAction)=>void;}export interface ActionSheetTokens{defaults:{closeOnClickAction:boolean;closeable:boolean;round:boolean;safeAreaInsetBottom:boolean;overlay:boolean;lockScroll:boolean;};layout:{popup:ViewStyle;panel:ViewStyle;header:ViewStyle;titleContainer:ViewStyle;title:TextStyle;titleNode:ViewStyle;closeButton:ViewStyle;descriptionContainer:ViewStyle;description:TextStyle;descriptionNode:ViewStyle;actions:ViewStyle;item:ViewStyle;itemWithIcon:ViewStyle;itemTextWrapper:ViewStyle;itemText:TextStyle;subname:TextStyle;subnameNode:ViewStyle;icon:ViewStyle;cancelGap:ViewStyle;cancel:ViewStyle;cancelText:TextStyle;};colors:{background:string;title:string;description:string;item:string;subitem:string;cancel:string;disabled:string;border:string;itemBackground:string;itemPressedBackground:string;cancelBackground:string;cancelGapBackground:string;};typography:{title:number;item:number;description:number;};spacing:{horizontal:number;vertical:number;cancelGap:number;};}export interface ActionSheetProps extends Omit<PopupProps,'children'|'tokensOverride'>{title?:React.ReactNode;description?:React.ReactNode;cancelText?:React.ReactNode;actions?:ActionSheetAction[];closeOnClickAction?:boolean;closeOnSelect?:boolean;children?:React.ReactNode;onSelect?:(action:ActionSheetAction,index:number)=>void;onCancel?:()=>void;beforeClose?:(action:ActionSheetCloseAction)=>boolean|Promise<boolean>;tokensOverride?:DeepPartial<ActionSheetTokens>;}
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { AreaProps } from './types';
|
|
3
|
-
declare const Area: React.NamedExoticComponent<AreaProps>;
|
|
4
|
-
export default Area;
|
|
1
|
+
import React from'react';import type{AreaProps}from'./types';declare const Area:React.NamedExoticComponent<AreaProps>;export default Area;
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export interface AreaTokens
|
|
2
|
-
defaults: {
|
|
3
|
-
columnsNum: 1 | 2 | 3;
|
|
4
|
-
interactionMode: 'freeze' | 'sync';
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export declare const useAreaTokens: (overrides?: import("../..").DeepPartial<AreaTokens> | undefined) => AreaTokens;
|
|
1
|
+
export interface AreaTokens{defaults:{columnsNum:1|2|3;interactionMode:'freeze'|'sync';};}export declare const useAreaTokens:(overrides?:import("../..").DeepPartial<AreaTokens>|undefined)=>AreaTokens;
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { PickerProps, PickerOption } from '../picker/types';
|
|
3
|
-
export interface AreaList {
|
|
4
|
-
province_list?: Record<string, string>;
|
|
5
|
-
city_list?: Record<string, string>;
|
|
6
|
-
county_list?: Record<string, string>;
|
|
7
|
-
}
|
|
8
|
-
export interface AreaOption extends PickerOption {
|
|
9
|
-
label: React.ReactNode;
|
|
10
|
-
value: string;
|
|
11
|
-
children?: AreaOption[];
|
|
12
|
-
}
|
|
13
|
-
export interface AreaProps extends Omit<PickerProps, 'columns' | 'onChange' | 'value' | 'defaultValue' | 'onConfirm'> {
|
|
14
|
-
areaList: AreaList;
|
|
15
|
-
columnsNum?: 1 | 2 | 3;
|
|
16
|
-
value?: string[];
|
|
17
|
-
defaultValue?: string[];
|
|
18
|
-
onChange?: (values: string[], options: (AreaOption | undefined)[]) => void;
|
|
19
|
-
onConfirm?: (values: string[], options: (AreaOption | undefined)[]) => void;
|
|
20
|
-
}
|
|
1
|
+
import type*as React from'react';import type{PickerProps,PickerOption}from'../picker/types';export interface AreaList{province_list?:Record<string,string>;city_list?:Record<string,string>;county_list?:Record<string,string>;}export interface AreaOption extends PickerOption{label:React.ReactNode;value:string;children?:AreaOption[];}export interface AreaProps extends Omit<PickerProps,'columns'|'onChange'|'value'|'defaultValue'|'onConfirm'>{areaList:AreaList;columnsNum?:1|2|3;value?:string[];defaultValue?:string[];onChange?:(values:string[],options:(AreaOption|undefined)[])=>void;onConfirm?:(values:string[],options:(AreaOption|undefined)[])=>void;}
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
3
|
-
import type { AvatarFallbackTextProps, AvatarImageProps, AvatarProps } from './types';
|
|
4
|
-
export declare const AvatarFallbackText: React.ForwardRefExoticComponent<AvatarFallbackTextProps & React.RefAttributes<Text>>;
|
|
5
|
-
export declare const AvatarImage: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<import("react-native").Image>>;
|
|
6
|
-
export declare const Avatar: React.NamedExoticComponent<AvatarProps & React.RefAttributes<View>>;
|
|
7
|
-
export default Avatar;
|
|
1
|
+
import React from'react';import{Text,View}from'react-native';import type{AvatarFallbackTextProps,AvatarImageProps,AvatarProps}from'./types';export declare const AvatarFallbackText:React.ForwardRefExoticComponent<AvatarFallbackTextProps&React.RefAttributes<Text>>;export declare const AvatarImage:React.ForwardRefExoticComponent<AvatarImageProps&React.RefAttributes<import("react-native").Image>>;export declare const Avatar:React.NamedExoticComponent<AvatarProps&React.RefAttributes<View>>;export default Avatar;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type { AvatarProps, AvatarShape, AvatarSize } from './types';
|
|
1
|
+
export{Avatar,Avatar as default}from'./Avatar';export type{AvatarProps,AvatarShape,AvatarSize}from'./types';
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { AvatarTokens } from "./types";
|
|
3
|
-
export declare const createAvatarTokens: (foundations: Foundations) => AvatarTokens;
|
|
4
|
-
export declare const useAvatarTokens: (overrides?: import("../..").DeepPartial<AvatarTokens> | undefined) => AvatarTokens;
|
|
1
|
+
import type{Foundations}from"../../design-system/tokens";import type{AvatarTokens}from"./types";export declare const createAvatarTokens:(foundations:Foundations)=>AvatarTokens;export declare const useAvatarTokens:(overrides?:import("../..").DeepPartial<AvatarTokens>|undefined)=>AvatarTokens;
|
|
@@ -1,62 +1 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { PressableProps, StyleProp, TextStyle, ViewStyle, ImageSourcePropType, ImageStyle } from 'react-native';
|
|
3
|
-
import type { DeepPartial } from '../../types';
|
|
4
|
-
export type AvatarShape = 'circle' | 'square';
|
|
5
|
-
export type AvatarSize = 'small' | 'medium' | 'large';
|
|
6
|
-
export interface AvatarTokens {
|
|
7
|
-
defaults: {
|
|
8
|
-
size: AvatarSize;
|
|
9
|
-
shape: AvatarShape;
|
|
10
|
-
};
|
|
11
|
-
layout: {
|
|
12
|
-
container: ViewStyle;
|
|
13
|
-
text: TextStyle;
|
|
14
|
-
image: ImageStyle;
|
|
15
|
-
iconWrapper: ViewStyle;
|
|
16
|
-
};
|
|
17
|
-
colors: {
|
|
18
|
-
background: string;
|
|
19
|
-
text: string;
|
|
20
|
-
transparent: string;
|
|
21
|
-
};
|
|
22
|
-
typography: {
|
|
23
|
-
fontWeight: TextStyle['fontWeight'];
|
|
24
|
-
fallbackTextScale: number;
|
|
25
|
-
};
|
|
26
|
-
sizing: {
|
|
27
|
-
sizes: Record<AvatarSize, number>;
|
|
28
|
-
iconMaxSize: number;
|
|
29
|
-
loadingSize: number;
|
|
30
|
-
};
|
|
31
|
-
radii: {
|
|
32
|
-
squareMin: number;
|
|
33
|
-
squareDivisor: number;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
import type { ImageFit, ImageProps } from '../image/types';
|
|
37
|
-
export interface AvatarProps extends Omit<PressableProps, 'style'> {
|
|
38
|
-
src?: string;
|
|
39
|
-
source?: ImageSourcePropType;
|
|
40
|
-
fit?: ImageFit;
|
|
41
|
-
icon?: React.ReactNode;
|
|
42
|
-
text?: string;
|
|
43
|
-
size?: AvatarSize | number;
|
|
44
|
-
width?: number;
|
|
45
|
-
height?: number;
|
|
46
|
-
shape?: AvatarShape;
|
|
47
|
-
color?: string;
|
|
48
|
-
backgroundColor?: string;
|
|
49
|
-
textStyle?: StyleProp<TextStyle>;
|
|
50
|
-
contentStyle?: StyleProp<ViewStyle>;
|
|
51
|
-
style?: StyleProp<ViewStyle>;
|
|
52
|
-
tokensOverride?: DeepPartial<AvatarTokens>;
|
|
53
|
-
children?: React.ReactNode;
|
|
54
|
-
}
|
|
55
|
-
export interface AvatarImageProps extends ImageProps {
|
|
56
|
-
style?: StyleProp<ImageStyle>;
|
|
57
|
-
}
|
|
58
|
-
export interface AvatarFallbackTextProps {
|
|
59
|
-
children?: React.ReactNode;
|
|
60
|
-
color?: string;
|
|
61
|
-
style?: StyleProp<TextStyle>;
|
|
62
|
-
}
|
|
1
|
+
import type React from'react';import type{PressableProps,StyleProp,TextStyle,ViewStyle,ImageSourcePropType,ImageStyle}from'react-native';import type{DeepPartial}from'../../types';export type AvatarShape='circle'|'square';export type AvatarSize='small'|'medium'|'large';export interface AvatarTokens{defaults:{size:AvatarSize;shape:AvatarShape;};layout:{container:ViewStyle;text:TextStyle;image:ImageStyle;iconWrapper:ViewStyle;};colors:{background:string;text:string;transparent:string;};typography:{fontWeight:TextStyle['fontWeight'];fallbackTextScale:number;};sizing:{sizes:Record<AvatarSize,number>;iconMaxSize:number;loadingSize:number;};radii:{squareMin:number;squareDivisor:number;};}import type{ImageFit,ImageProps}from'../image/types';export interface AvatarProps extends Omit<PressableProps,'style'>{src?:string;source?:ImageSourcePropType;fit?:ImageFit;icon?:React.ReactNode;text?:string;size?:AvatarSize|number;width?:number;height?:number;shape?:AvatarShape;color?:string;backgroundColor?:string;textStyle?:StyleProp<TextStyle>;contentStyle?:StyleProp<ViewStyle>;style?:StyleProp<ViewStyle>;tokensOverride?:DeepPartial<AvatarTokens>;children?:React.ReactNode;}export interface AvatarImageProps extends ImageProps{style?:StyleProp<ImageStyle>;}export interface AvatarFallbackTextProps{children?:React.ReactNode;color?:string;style?:StyleProp<TextStyle>;}
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { BadgeProps } from './types';
|
|
4
|
-
export declare const Badge: React.NamedExoticComponent<BadgeProps & React.RefAttributes<View>>;
|
|
1
|
+
import React from'react';import{View}from'react-native';import type{BadgeProps}from'./types';export declare const Badge:React.NamedExoticComponent<BadgeProps&React.RefAttributes<View>>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const useBadgeTokens: (overrides?: import("../..").DeepPartial<BadgeTokens> | undefined) => BadgeTokens;
|
|
1
|
+
import type{BadgeTokens}from'./types';export declare const useBadgeTokens:(overrides?:import("../..").DeepPartial<BadgeTokens>|undefined)=>BadgeTokens;
|
|
@@ -1,57 +1 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { DeepPartial } from '../../types';
|
|
3
|
-
export interface BadgeTokens {
|
|
4
|
-
defaults: {
|
|
5
|
-
dot: boolean;
|
|
6
|
-
showZero: boolean;
|
|
7
|
-
pressedOpacity: number;
|
|
8
|
-
};
|
|
9
|
-
layout: {
|
|
10
|
-
wrapper: ViewStyle;
|
|
11
|
-
badgeAbsolute: ViewStyle;
|
|
12
|
-
badgeStandalone: ViewStyle;
|
|
13
|
-
pressableStandalone: ViewStyle;
|
|
14
|
-
text: TextStyle;
|
|
15
|
-
};
|
|
16
|
-
colors: {
|
|
17
|
-
background: string;
|
|
18
|
-
dot: string;
|
|
19
|
-
text: string;
|
|
20
|
-
border: string;
|
|
21
|
-
};
|
|
22
|
-
typography: {
|
|
23
|
-
fontSize: number;
|
|
24
|
-
fontWeight: TextStyle['fontWeight'];
|
|
25
|
-
fontFamily: string;
|
|
26
|
-
lineHeight: number;
|
|
27
|
-
};
|
|
28
|
-
sizing: {
|
|
29
|
-
minWidth: number;
|
|
30
|
-
height: number;
|
|
31
|
-
paddingHorizontal: number;
|
|
32
|
-
paddingVertical: number;
|
|
33
|
-
dotSize: number;
|
|
34
|
-
};
|
|
35
|
-
radii: {
|
|
36
|
-
badge: number;
|
|
37
|
-
dot: number;
|
|
38
|
-
};
|
|
39
|
-
borders: {
|
|
40
|
-
width: number;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export type BadgeOffset = [number | string, number | string];
|
|
44
|
-
export interface BadgeProps extends ViewProps {
|
|
45
|
-
children?: React.ReactNode;
|
|
46
|
-
content?: React.ReactNode;
|
|
47
|
-
color?: string;
|
|
48
|
-
textColor?: string;
|
|
49
|
-
dot?: boolean;
|
|
50
|
-
max?: number | string;
|
|
51
|
-
offset?: BadgeOffset;
|
|
52
|
-
showZero?: boolean;
|
|
53
|
-
badgeStyle?: StyleProp<ViewStyle>;
|
|
54
|
-
textStyle?: StyleProp<TextStyle>;
|
|
55
|
-
onPress?: PressableProps['onPress'];
|
|
56
|
-
tokensOverride?: DeepPartial<BadgeTokens>;
|
|
57
|
-
}
|
|
1
|
+
import type{PressableProps,StyleProp,TextStyle,ViewProps,ViewStyle}from'react-native';import type{DeepPartial}from'../../types';export interface BadgeTokens{defaults:{dot:boolean;showZero:boolean;pressedOpacity:number;};layout:{wrapper:ViewStyle;badgeAbsolute:ViewStyle;badgeStandalone:ViewStyle;pressableStandalone:ViewStyle;text:TextStyle;};colors:{background:string;dot:string;text:string;border:string;};typography:{fontSize:number;fontWeight:TextStyle['fontWeight'];fontFamily:string;lineHeight:number;};sizing:{minWidth:number;height:number;paddingHorizontal:number;paddingVertical:number;dotSize:number;};radii:{badge:number;dot:number;};borders:{width:number;};}export type BadgeOffset=[number|string,number|string];export interface BadgeProps extends ViewProps{children?:React.ReactNode;content?:React.ReactNode;color?:string;textColor?:string;dot?:boolean;max?:number|string;offset?:BadgeOffset;showZero?:boolean;badgeStyle?:StyleProp<ViewStyle>;textStyle?:StyleProp<TextStyle>;onPress?:PressableProps['onPress'];tokensOverride?:DeepPartial<BadgeTokens>;}
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { ButtonProps } from './types';
|
|
4
|
-
export declare const Button: React.NamedExoticComponent<ButtonProps & React.RefAttributes<View>>;
|
|
5
|
-
export default Button;
|
|
1
|
+
import React from'react';import{View}from'react-native';import type{ButtonProps}from'./types';export declare const Button:React.NamedExoticComponent<ButtonProps&React.RefAttributes<View>>;export default Button;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export { ButtonGroupContext } from './ButtonGroup';
|
|
1
|
+
export type{ButtonGroupContextValue}from'./ButtonGroup';export{ButtonGroupContext}from'./ButtonGroup';
|
|
@@ -1,23 +1 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import type { ButtonIconPosition, ButtonShadowLevel, ButtonSize, ButtonType } from './types';
|
|
4
|
-
export interface ButtonGroupContextValue {
|
|
5
|
-
type?: ButtonType;
|
|
6
|
-
size?: ButtonSize;
|
|
7
|
-
plain?: boolean;
|
|
8
|
-
block?: boolean;
|
|
9
|
-
round?: boolean;
|
|
10
|
-
square?: boolean;
|
|
11
|
-
shadow?: boolean | ButtonShadowLevel;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
iconPosition?: ButtonIconPosition;
|
|
14
|
-
hairline?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare const ButtonGroupContext: React.Context<ButtonGroupContextValue | null>;
|
|
17
|
-
export interface ButtonGroupProps extends ButtonGroupContextValue {
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
direction?: 'horizontal' | 'vertical';
|
|
20
|
-
spacing?: number;
|
|
21
|
-
style?: StyleProp<ViewStyle>;
|
|
22
|
-
}
|
|
23
|
-
export declare const ButtonGroup: React.NamedExoticComponent<ButtonGroupProps>;
|
|
1
|
+
import React from'react';import type{StyleProp,ViewStyle}from'react-native';import type{ButtonIconPosition,ButtonShadowLevel,ButtonSize,ButtonType}from'./types';export interface ButtonGroupContextValue{type?:ButtonType;size?:ButtonSize;plain?:boolean;block?:boolean;round?:boolean;square?:boolean;shadow?:boolean|ButtonShadowLevel;disabled?:boolean;iconPosition?:ButtonIconPosition;hairline?:boolean;}export declare const ButtonGroupContext:React.Context<ButtonGroupContextValue|null>;export interface ButtonGroupProps extends ButtonGroupContextValue{children:React.ReactNode;direction?:'horizontal'|'vertical';spacing?:number;style?:StyleProp<ViewStyle>;}export declare const ButtonGroup:React.NamedExoticComponent<ButtonGroupProps>;
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
declare const Button:
|
|
2
|
-
Group: import("react").NamedExoticComponent<import("./ButtonGroup").ButtonGroupProps>;
|
|
3
|
-
};
|
|
4
|
-
export default Button;
|
|
5
|
-
export { Button };
|
|
6
|
-
export type { ButtonProps, ButtonType, ButtonSize, ButtonIconPosition, ButtonShadowLevel, } from './types';
|
|
1
|
+
declare const Button:import("react").NamedExoticComponent<import("./types").ButtonProps&import("react").RefAttributes<import("react-native").View>>&{Group:import("react").NamedExoticComponent<import("./ButtonGroup").ButtonGroupProps>;};export default Button;export{Button};export type{ButtonProps,ButtonType,ButtonSize,ButtonIconPosition,ButtonShadowLevel,}from'./types';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const useButtonTokens: (overrides?: import("../..").DeepPartial<ButtonTokens> | undefined) => ButtonTokens;
|
|
1
|
+
import type{ButtonTokens}from'./types';export declare const useButtonTokens:(overrides?:import("../..").DeepPartial<ButtonTokens>|undefined)=>ButtonTokens;
|
|
@@ -1,109 +1 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { PressableProps, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
-
import type { DeepPartial } from '../../types';
|
|
4
|
-
export type ButtonType = 'default' | 'primary' | 'success' | 'info' | 'warning' | 'danger';
|
|
5
|
-
export type ButtonSize = 'large' | 'normal' | 'small' | 'mini';
|
|
6
|
-
export type ButtonIconPosition = 'left' | 'right';
|
|
7
|
-
export type ButtonShadowLevel = 1 | 2 | 3;
|
|
8
|
-
export type ButtonIconRender = (color: string, size: number) => React.ReactNode;
|
|
9
|
-
export type ButtonLoadingSize = number | 'small' | 'large';
|
|
10
|
-
export interface ButtonTokens {
|
|
11
|
-
defaults: {
|
|
12
|
-
type: ButtonType;
|
|
13
|
-
size: ButtonSize;
|
|
14
|
-
plain: boolean;
|
|
15
|
-
block: boolean;
|
|
16
|
-
round: boolean;
|
|
17
|
-
square: boolean;
|
|
18
|
-
hairline: boolean;
|
|
19
|
-
iconPosition: ButtonIconPosition;
|
|
20
|
-
loading: boolean;
|
|
21
|
-
loadingSize: ButtonLoadingSize;
|
|
22
|
-
disabled: boolean;
|
|
23
|
-
allowFontScaling: boolean;
|
|
24
|
-
};
|
|
25
|
-
layout: {
|
|
26
|
-
base: ViewStyle;
|
|
27
|
-
block: ViewStyle;
|
|
28
|
-
content: ViewStyle;
|
|
29
|
-
iconWrapper: ViewStyle;
|
|
30
|
-
text: TextStyle;
|
|
31
|
-
};
|
|
32
|
-
colors: {
|
|
33
|
-
ripple: string;
|
|
34
|
-
backgroundTransparent: string;
|
|
35
|
-
backgroundPlain: string;
|
|
36
|
-
textDark: string;
|
|
37
|
-
textLight: string;
|
|
38
|
-
tones: Record<ButtonType, {
|
|
39
|
-
background: string;
|
|
40
|
-
border: string;
|
|
41
|
-
text: string;
|
|
42
|
-
tonalBackground: string;
|
|
43
|
-
tonalBorder: string;
|
|
44
|
-
tonalText: string;
|
|
45
|
-
}>;
|
|
46
|
-
};
|
|
47
|
-
typography: {
|
|
48
|
-
fontFamily: string;
|
|
49
|
-
lineHeightMultiplier: number;
|
|
50
|
-
fontWeight: TextStyle['fontWeight'];
|
|
51
|
-
};
|
|
52
|
-
sizing: {
|
|
53
|
-
sizes: Record<ButtonSize, {
|
|
54
|
-
height: number;
|
|
55
|
-
fontSize: number;
|
|
56
|
-
paddingHorizontal: number;
|
|
57
|
-
iconSize: number;
|
|
58
|
-
radius: number;
|
|
59
|
-
}>;
|
|
60
|
-
};
|
|
61
|
-
borders: {
|
|
62
|
-
width: number;
|
|
63
|
-
hairlineWidth: number;
|
|
64
|
-
};
|
|
65
|
-
spacing: {
|
|
66
|
-
iconGap: number;
|
|
67
|
-
groupGap: number;
|
|
68
|
-
};
|
|
69
|
-
states: {
|
|
70
|
-
disabledOpacity: number;
|
|
71
|
-
loadingOpacity: number;
|
|
72
|
-
pressedOpacity: number;
|
|
73
|
-
};
|
|
74
|
-
shadows: Record<ButtonShadowLevel, {
|
|
75
|
-
color: string;
|
|
76
|
-
opacity: number;
|
|
77
|
-
radius: number;
|
|
78
|
-
offsetY: number;
|
|
79
|
-
elevation: number;
|
|
80
|
-
}>;
|
|
81
|
-
}
|
|
82
|
-
export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
83
|
-
text?: React.ReactNode;
|
|
84
|
-
children?: React.ReactNode;
|
|
85
|
-
icon?: React.ReactNode | ButtonIconRender;
|
|
86
|
-
iconPosition?: ButtonIconPosition;
|
|
87
|
-
type?: ButtonType;
|
|
88
|
-
size?: ButtonSize;
|
|
89
|
-
color?: string;
|
|
90
|
-
textColor?: string;
|
|
91
|
-
plain?: boolean;
|
|
92
|
-
block?: boolean;
|
|
93
|
-
round?: boolean;
|
|
94
|
-
square?: boolean;
|
|
95
|
-
hairline?: boolean;
|
|
96
|
-
shadow?: boolean | ButtonShadowLevel;
|
|
97
|
-
loading?: boolean;
|
|
98
|
-
loadingText?: React.ReactNode;
|
|
99
|
-
loadingIndicator?: React.ReactNode;
|
|
100
|
-
loadingSize?: ButtonLoadingSize;
|
|
101
|
-
disabled?: boolean;
|
|
102
|
-
contentStyle?: StyleProp<ViewStyle>;
|
|
103
|
-
textStyle?: StyleProp<TextStyle>;
|
|
104
|
-
tokensOverride?: DeepPartial<ButtonTokens>;
|
|
105
|
-
style?: StyleProp<ViewStyle>;
|
|
106
|
-
rippleColor?: string;
|
|
107
|
-
allowFontScaling?: boolean;
|
|
108
|
-
maxFontSizeMultiplier?: number;
|
|
109
|
-
}
|
|
1
|
+
import type React from'react';import type{PressableProps,StyleProp,TextStyle,ViewStyle}from'react-native';import type{DeepPartial}from'../../types';export type ButtonType='default'|'primary'|'success'|'info'|'warning'|'danger';export type ButtonSize='large'|'normal'|'small'|'mini';export type ButtonIconPosition='left'|'right';export type ButtonShadowLevel=1|2|3;export type ButtonIconRender=(color:string,size:number)=>React.ReactNode;export type ButtonLoadingSize=number|'small'|'large';export interface ButtonTokens{defaults:{type:ButtonType;size:ButtonSize;plain:boolean;block:boolean;round:boolean;square:boolean;hairline:boolean;iconPosition:ButtonIconPosition;loading:boolean;loadingSize:ButtonLoadingSize;disabled:boolean;allowFontScaling:boolean;};layout:{base:ViewStyle;block:ViewStyle;content:ViewStyle;iconWrapper:ViewStyle;text:TextStyle;};colors:{ripple:string;backgroundTransparent:string;backgroundPlain:string;textDark:string;textLight:string;tones:Record<ButtonType,{background:string;border:string;text:string;tonalBackground:string;tonalBorder:string;tonalText:string;}>;};typography:{fontFamily:string;lineHeightMultiplier:number;fontWeight:TextStyle['fontWeight'];};sizing:{sizes:Record<ButtonSize,{height:number;fontSize:number;paddingHorizontal:number;iconSize:number;radius:number;}>;};borders:{width:number;hairlineWidth:number;};spacing:{iconGap:number;groupGap:number;};states:{disabledOpacity:number;loadingOpacity:number;pressedOpacity:number;};shadows:Record<ButtonShadowLevel,{color:string;opacity:number;radius:number;offsetY:number;elevation:number;}>;}export interface ButtonProps extends Omit<PressableProps,'style'|'children'>{text?:React.ReactNode;children?:React.ReactNode;icon?:React.ReactNode|ButtonIconRender;iconPosition?:ButtonIconPosition;type?:ButtonType;size?:ButtonSize;color?:string;textColor?:string;plain?:boolean;block?:boolean;round?:boolean;square?:boolean;hairline?:boolean;shadow?:boolean|ButtonShadowLevel;loading?:boolean;loadingText?:React.ReactNode;loadingIndicator?:React.ReactNode;loadingSize?:ButtonLoadingSize;disabled?:boolean;contentStyle?:StyleProp<ViewStyle>;textStyle?:StyleProp<TextStyle>;tokensOverride?:DeepPartial<ButtonTokens>;style?:StyleProp<ViewStyle>;rippleColor?:string;allowFontScaling?:boolean;maxFontSizeMultiplier?:number;}
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { CalendarProps } from './types';
|
|
3
|
-
declare const Calendar: React.NamedExoticComponent<CalendarProps>;
|
|
4
|
-
export default Calendar;
|
|
1
|
+
import React from'react';import type{CalendarProps}from'./types';declare const Calendar:React.NamedExoticComponent<CalendarProps>;export default Calendar;
|