@tamagui/react-native-web-lite 1.116.0 → 1.116.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AccessibilityInfo/index.js +96 -0
- package/dist/cjs/ActivityIndicator/__tests__/index-test.js +116 -0
- package/dist/cjs/ActivityIndicator/index.js +108 -0
- package/dist/cjs/Alert/index.js +25 -0
- package/dist/cjs/AppRegistry/AppContainer.js +41 -0
- package/dist/cjs/AppRegistry/__tests__/index-test.js +77 -0
- package/dist/cjs/AppRegistry/__tests__/index-test.node.js +131 -0
- package/dist/cjs/AppRegistry/index.js +98 -0
- package/dist/cjs/AppRegistry/renderApplication.js +51 -0
- package/dist/cjs/AppState/__tests__/index-test.js +33 -0
- package/dist/cjs/AppState/index.js +71 -0
- package/dist/cjs/Appearance/index.js +41 -0
- package/dist/cjs/BackHandler/index.js +32 -0
- package/dist/cjs/Clipboard/index.js +47 -0
- package/dist/cjs/DeviceEmitter.js +29 -0
- package/dist/cjs/DeviceInfo/index.js +62 -0
- package/dist/cjs/Dimensions/__tests__/index-test.js +51 -0
- package/dist/cjs/Dimensions/index.js +74 -0
- package/dist/cjs/I18nManager/index.js +30 -0
- package/dist/cjs/Image/index.js +253 -0
- package/dist/cjs/Image/types.js +14 -0
- package/dist/cjs/ImageBackground/__tests__/index-test.js +48 -0
- package/dist/cjs/ImageBackground/index.js +62 -0
- package/dist/cjs/Keyboard/index.js +35 -0
- package/dist/cjs/KeyboardAvoidingView/index.js +56 -0
- package/dist/cjs/Linking/__tests__/index-test.js +38 -0
- package/dist/cjs/Linking/index.js +86 -0
- package/dist/cjs/LogBox/index.js +31 -0
- package/dist/cjs/Modal/ModalAnimation.js +137 -0
- package/dist/cjs/Modal/ModalContent.js +75 -0
- package/dist/cjs/Modal/ModalFocusTrap.js +105 -0
- package/dist/cjs/Modal/ModalPortal.js +43 -0
- package/dist/cjs/Modal/index.js +92 -0
- package/dist/cjs/NativeModules/index.js +25 -0
- package/dist/cjs/PanResponder/index.js +29 -0
- package/dist/cjs/PixelRatio/index.js +60 -0
- package/dist/cjs/Pressable/index.js +140 -0
- package/dist/cjs/RefreshControl/index.js +48 -0
- package/dist/cjs/SafeAreaView/index.js +43 -0
- package/dist/cjs/ScrollView/ScrollViewBase.js +124 -0
- package/dist/cjs/ScrollView/index.js +374 -0
- package/dist/cjs/Share/index.js +56 -0
- package/dist/cjs/StatusBar/index.js +31 -0
- package/dist/cjs/Text/index.js +152 -0
- package/dist/cjs/Text/types.js +14 -0
- package/dist/cjs/TextInput/__tests__/index-test.js +422 -0
- package/dist/cjs/TextInput/index.js +260 -0
- package/dist/cjs/TextInput/types.js +14 -0
- package/dist/cjs/TouchableOpacity.js +123 -0
- package/dist/cjs/TouchableWithoutFeedback.js +90 -0
- package/dist/cjs/UnimplementedView.js +36 -0
- package/dist/cjs/Vibration/index.js +31 -0
- package/dist/cjs/View/index.js +101 -0
- package/dist/cjs/View/types.js +14 -0
- package/dist/cjs/createElement/__tests__/index-test.js +536 -0
- package/dist/cjs/createElement/index.js +37 -0
- package/dist/cjs/createReactDOMStyle.js +21 -0
- package/dist/cjs/findNodeHandle.js +29 -0
- package/dist/cjs/index.js +110 -0
- package/dist/cjs/render/index.js +45 -0
- package/dist/cjs/styleTypes.js +14 -0
- package/dist/cjs/types.js +14 -0
- package/dist/cjs/useColorScheme/index.js +39 -0
- package/dist/cjs/useLocaleContext/index.js +21 -0
- package/dist/cjs/useWindowDimensions/index.js +41 -0
- package/dist/cjs/vendor/react-native/Animated/Animated.js +35 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedEvent.js +143 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedImplementation.js +458 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedMock.js +126 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedPlatformConfig.js +2 -0
- package/dist/cjs/vendor/react-native/Animated/Easing.js +189 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedHelper.js +335 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedModule.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedTurboModule.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/SpringConfig.js +70 -0
- package/dist/cjs/vendor/react-native/Animated/animations/Animation.js +64 -0
- package/dist/cjs/vendor/react-native/Animated/animations/DecayAnimation.js +63 -0
- package/dist/cjs/vendor/react-native/Animated/animations/SpringAnimation.js +146 -0
- package/dist/cjs/vendor/react-native/Animated/animations/TimingAnimation.js +82 -0
- package/dist/cjs/vendor/react-native/Animated/bezier.js +72 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedImage.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedScrollView.js +38 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedText.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedView.js +29 -0
- package/dist/cjs/vendor/react-native/Animated/createAnimatedComponent.js +42 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedAddition.js +57 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedColor.js +197 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js +60 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDivision.js +58 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedInterpolation.js +175 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedModulo.js +58 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedMultiplication.js +57 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedNode.js +136 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedProps.js +112 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedStyle.js +100 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedSubtraction.js +57 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTracking.js +76 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTransform.js +100 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValue.js +182 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValueXY.js +167 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedWithChildren.js +67 -0
- package/dist/cjs/vendor/react-native/Animated/useAnimatedProps.js +89 -0
- package/dist/cjs/vendor/react-native/FeatureFlags.js +28 -0
- package/dist/cjs/vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter.js +29 -0
- package/dist/cjs/vendor/react-native/NativeEventEmitter/index.js +73 -0
- package/dist/cjs/vendor/react-native/PanResponder/index.js +272 -0
- package/dist/cjs/vendor/react-native/TouchHistoryMath/index.js +118 -0
- package/dist/cjs/vendor/react-native/TurboModule/RCTExport.js +2 -0
- package/dist/cjs/vendor/react-native/TurboModule/TurboModuleRegistry.js +28 -0
- package/dist/cjs/vendor/react-native/Types/CoreEventTypes.js +15 -0
- package/dist/cjs/vendor/react-native/Utilities/setAndForwardRef.js +29 -0
- package/dist/cjs/vendor/react-native/emitter/EventEmitter.js +30 -0
- package/dist/cjs/vendor/react-native/emitter/EventSubscription.js +2 -0
- package/dist/cjs/vendor/react-native/emitter/_EmitterSubscription.js +55 -0
- package/dist/cjs/vendor/react-native/emitter/_EventEmitter.js +135 -0
- package/dist/cjs/vendor/react-native/emitter/_EventSubscription.js +37 -0
- package/dist/cjs/vendor/react-native/emitter/_EventSubscriptionVendor.js +76 -0
- package/dist/cjs/vendor/react-native/infoLog/index.js +25 -0
- package/dist/cjs/vendor/react-native/useRefEffect.js +30 -0
- package/dist/cjs/without-animated.js +95 -0
- package/package.json +6 -6
- package/dist/cjs/PanResponder/Alternative.cjs +0 -198
- package/dist/cjs/PanResponder/Alternative.cjs.map +0 -6
- /package/dist/cjs/AccessibilityInfo/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/ActivityIndicator/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/ActivityIndicator/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Alert/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/AppRegistry/{AppContainer.cjs.map → AppContainer.js.map} +0 -0
- /package/dist/cjs/AppRegistry/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/AppRegistry/__tests__/{index-test.node.cjs.map → index-test.node.js.map} +0 -0
- /package/dist/cjs/AppRegistry/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/AppRegistry/{renderApplication.cjs.map → renderApplication.js.map} +0 -0
- /package/dist/cjs/AppState/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/AppState/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Appearance/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/BackHandler/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Clipboard/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{DeviceEmitter.cjs.map → DeviceEmitter.js.map} +0 -0
- /package/dist/cjs/DeviceInfo/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Dimensions/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/Dimensions/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/I18nManager/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Image/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Image/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/ImageBackground/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/ImageBackground/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Keyboard/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/KeyboardAvoidingView/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Linking/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/Linking/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/LogBox/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Modal/{ModalAnimation.cjs.map → ModalAnimation.js.map} +0 -0
- /package/dist/cjs/Modal/{ModalContent.cjs.map → ModalContent.js.map} +0 -0
- /package/dist/cjs/Modal/{ModalFocusTrap.cjs.map → ModalFocusTrap.js.map} +0 -0
- /package/dist/cjs/Modal/{ModalPortal.cjs.map → ModalPortal.js.map} +0 -0
- /package/dist/cjs/Modal/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/NativeModules/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/PanResponder/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/PixelRatio/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Pressable/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/RefreshControl/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/SafeAreaView/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/ScrollView/{ScrollViewBase.cjs.map → ScrollViewBase.js.map} +0 -0
- /package/dist/cjs/ScrollView/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Share/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/StatusBar/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Text/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/Text/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/TextInput/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/TextInput/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/TextInput/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/{TouchableOpacity.cjs.map → TouchableOpacity.js.map} +0 -0
- /package/dist/cjs/{TouchableWithoutFeedback.cjs.map → TouchableWithoutFeedback.js.map} +0 -0
- /package/dist/cjs/{UnimplementedView.cjs.map → UnimplementedView.js.map} +0 -0
- /package/dist/cjs/Vibration/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/View/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/View/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/createElement/__tests__/{index-test.cjs.map → index-test.js.map} +0 -0
- /package/dist/cjs/createElement/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{createReactDOMStyle.cjs.map → createReactDOMStyle.js.map} +0 -0
- /package/dist/cjs/{findNodeHandle.cjs.map → findNodeHandle.js.map} +0 -0
- /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/render/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{styleTypes.cjs.map → styleTypes.js.map} +0 -0
- /package/dist/cjs/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/useColorScheme/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/useLocaleContext/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/useWindowDimensions/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{Animated.cjs.map → Animated.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{AnimatedEvent.cjs.map → AnimatedEvent.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{AnimatedImplementation.cjs.map → AnimatedImplementation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{AnimatedMock.cjs.map → AnimatedMock.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{AnimatedPlatformConfig.cjs.map → AnimatedPlatformConfig.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{Easing.cjs.map → Easing.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{NativeAnimatedHelper.cjs.map → NativeAnimatedHelper.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{NativeAnimatedModule.cjs.map → NativeAnimatedModule.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{NativeAnimatedTurboModule.cjs.map → NativeAnimatedTurboModule.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{SpringConfig.cjs.map → SpringConfig.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/animations/{Animation.cjs.map → Animation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/animations/{DecayAnimation.cjs.map → DecayAnimation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/animations/{SpringAnimation.cjs.map → SpringAnimation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/animations/{TimingAnimation.cjs.map → TimingAnimation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{bezier.cjs.map → bezier.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/components/{AnimatedImage.cjs.map → AnimatedImage.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/components/{AnimatedScrollView.cjs.map → AnimatedScrollView.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/components/{AnimatedText.cjs.map → AnimatedText.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/components/{AnimatedView.cjs.map → AnimatedView.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{createAnimatedComponent.cjs.map → createAnimatedComponent.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedAddition.cjs.map → AnimatedAddition.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedColor.cjs.map → AnimatedColor.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedDiffClamp.cjs.map → AnimatedDiffClamp.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedDivision.cjs.map → AnimatedDivision.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedInterpolation.cjs.map → AnimatedInterpolation.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedModulo.cjs.map → AnimatedModulo.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedMultiplication.cjs.map → AnimatedMultiplication.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedNode.cjs.map → AnimatedNode.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedProps.cjs.map → AnimatedProps.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedStyle.cjs.map → AnimatedStyle.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedSubtraction.cjs.map → AnimatedSubtraction.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedTracking.cjs.map → AnimatedTracking.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedTransform.cjs.map → AnimatedTransform.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedValue.cjs.map → AnimatedValue.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedValueXY.cjs.map → AnimatedValueXY.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/nodes/{AnimatedWithChildren.cjs.map → AnimatedWithChildren.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Animated/{useAnimatedProps.cjs.map → useAnimatedProps.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/{FeatureFlags.cjs.map → FeatureFlags.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/NativeEventEmitter/{RCTDeviceEventEmitter.cjs.map → RCTDeviceEventEmitter.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/NativeEventEmitter/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/PanResponder/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/TouchHistoryMath/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/TurboModule/{RCTExport.cjs.map → RCTExport.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/TurboModule/{TurboModuleRegistry.cjs.map → TurboModuleRegistry.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Types/{CoreEventTypes.cjs.map → CoreEventTypes.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/Utilities/{setAndForwardRef.cjs.map → setAndForwardRef.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{EventEmitter.cjs.map → EventEmitter.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{EventSubscription.cjs.map → EventSubscription.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{_EmitterSubscription.cjs.map → _EmitterSubscription.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{_EventEmitter.cjs.map → _EventEmitter.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{_EventSubscription.cjs.map → _EventSubscription.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/emitter/{_EventSubscriptionVendor.cjs.map → _EventSubscriptionVendor.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/infoLog/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/vendor/react-native/{useRefEffect.cjs.map → useRefEffect.js.map} +0 -0
- /package/dist/cjs/{without-animated.cjs.map → without-animated.js.map} +0 -0
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
return to;
|
|
11
|
+
};
|
|
12
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
13
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
14
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
15
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
16
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
17
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
18
|
+
mod
|
|
19
|
+
));
|
|
20
|
+
var import_react = require("@testing-library/react"), import__ = __toESM(require("..")), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
function getAttribute(container, attribute) {
|
|
22
|
+
return container.firstChild.getAttribute(attribute);
|
|
23
|
+
}
|
|
24
|
+
function getProperty(container, prop) {
|
|
25
|
+
return container.firstChild[prop];
|
|
26
|
+
}
|
|
27
|
+
describe("exports/createElement/index.js", () => {
|
|
28
|
+
test("renders different DOM elements", () => {
|
|
29
|
+
let { container } = (0, import_react.render)((0, import__.default)("span"));
|
|
30
|
+
expect(container.firstChild).toMatchSnapshot(), { container } = (0, import_react.render)((0, import__.default)("main")), expect(container.firstChild).toMatchSnapshot(), { container } = (0, import_react.render)(
|
|
31
|
+
(0, import__.default)("svg", {
|
|
32
|
+
children: (0, import__.default)("image", { href: "#href" })
|
|
33
|
+
})
|
|
34
|
+
), expect(container.firstChild).toMatchSnapshot();
|
|
35
|
+
}), describe('prop "accessibilityRole"', () => {
|
|
36
|
+
test("string component type", () => {
|
|
37
|
+
const { container } = (0, import_react.render)((0, import__.default)("span", { accessibilityRole: "link" }));
|
|
38
|
+
expect(container.firstChild.nodeName).toBe("SPAN");
|
|
39
|
+
}), test("function component type", () => {
|
|
40
|
+
const Custom = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}), { container } = (0, import_react.render)((0, import__.default)(Custom, { accessibilityRole: "link" }));
|
|
41
|
+
expect(container.firstChild.nodeName).toBe("DIV");
|
|
42
|
+
});
|
|
43
|
+
}), describe("accessibility props", () => {
|
|
44
|
+
test("accessibilityActiveDescendant", () => {
|
|
45
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
46
|
+
(0, import__.default)("div", { accessibilityActiveDescendant: null })
|
|
47
|
+
);
|
|
48
|
+
expect(getAttribute(isEmpty, "aria-activedescendant")).toBeNull();
|
|
49
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
50
|
+
(0, import__.default)("div", { accessibilityActiveDescendant: "abc" })
|
|
51
|
+
);
|
|
52
|
+
expect(getAttribute(hasValue, "aria-activedescendant")).toBe("abc");
|
|
53
|
+
}), test("accessibilityAtomic", () => {
|
|
54
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
55
|
+
(0, import__.default)("div", { accessibilityAtomic: null })
|
|
56
|
+
);
|
|
57
|
+
expect(getAttribute(isEmpty, "aria-atomic")).toBeNull();
|
|
58
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
59
|
+
(0, import__.default)("div", { accessibilityAtomic: !0 })
|
|
60
|
+
);
|
|
61
|
+
expect(getAttribute(hasValue, "aria-atomic")).toBe("true");
|
|
62
|
+
}), test("accessibilityAutoComplete", () => {
|
|
63
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
64
|
+
(0, import__.default)("div", { accessibilityAutoComplete: null })
|
|
65
|
+
);
|
|
66
|
+
expect(getAttribute(isEmpty, "aria-autocomplete")).toBeNull();
|
|
67
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
68
|
+
(0, import__.default)("div", { accessibilityAutoComplete: !0 })
|
|
69
|
+
);
|
|
70
|
+
expect(getAttribute(hasValue, "aria-autocomplete")).toBe("true");
|
|
71
|
+
}), test("accessibilityBusy", () => {
|
|
72
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
73
|
+
(0, import__.default)("div", { accessibilityBusy: null })
|
|
74
|
+
);
|
|
75
|
+
expect(getAttribute(isEmpty, "aria-busy")).toBeNull();
|
|
76
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
77
|
+
(0, import__.default)("div", { accessibilityBusy: !0 })
|
|
78
|
+
);
|
|
79
|
+
expect(getAttribute(hasValue, "aria-busy")).toBe("true");
|
|
80
|
+
}), test("accessibilityChecked", () => {
|
|
81
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
82
|
+
(0, import__.default)("div", { accessibilityChecked: null })
|
|
83
|
+
);
|
|
84
|
+
expect(getAttribute(isEmpty, "aria-checked")).toBeNull();
|
|
85
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
86
|
+
(0, import__.default)("div", { accessibilityChecked: !0 })
|
|
87
|
+
);
|
|
88
|
+
expect(getAttribute(hasValue, "aria-checked")).toBe("true");
|
|
89
|
+
}), test("accessibilityColumnCount", () => {
|
|
90
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
91
|
+
(0, import__.default)("div", { accessibilityColumnCount: null })
|
|
92
|
+
);
|
|
93
|
+
expect(getAttribute(isEmpty, "aria-colcount")).toBeNull();
|
|
94
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
95
|
+
(0, import__.default)("div", { accessibilityColumnCount: 5 })
|
|
96
|
+
);
|
|
97
|
+
expect(getAttribute(hasValue, "aria-colcount")).toBe("5");
|
|
98
|
+
}), test("accessibilityColumnIndex", () => {
|
|
99
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
100
|
+
(0, import__.default)("div", { accessibilityColumnIndex: null })
|
|
101
|
+
);
|
|
102
|
+
expect(getAttribute(isEmpty, "aria-colindex")).toBeNull();
|
|
103
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
104
|
+
(0, import__.default)("div", { accessibilityColumnIndex: 5 })
|
|
105
|
+
);
|
|
106
|
+
expect(getAttribute(hasValue, "aria-colindex")).toBe("5");
|
|
107
|
+
}), test("accessibilityColumnSpan", () => {
|
|
108
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
109
|
+
(0, import__.default)("div", { accessibilityColumnSpan: null })
|
|
110
|
+
);
|
|
111
|
+
expect(getAttribute(isEmpty, "aria-colspan")).toBeNull();
|
|
112
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
113
|
+
(0, import__.default)("div", { accessibilityColumnSpan: 5 })
|
|
114
|
+
);
|
|
115
|
+
expect(getAttribute(hasValue, "aria-colspan")).toBe("5");
|
|
116
|
+
}), test("accessibilityControls", () => {
|
|
117
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
118
|
+
(0, import__.default)("div", { accessibilityControls: null })
|
|
119
|
+
);
|
|
120
|
+
expect(getAttribute(isEmpty, "aria-controls")).toBeNull();
|
|
121
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
122
|
+
(0, import__.default)("div", { accessibilityControls: "abc" })
|
|
123
|
+
);
|
|
124
|
+
expect(getAttribute(hasValue, "aria-controls")).toBe("abc");
|
|
125
|
+
const { container: hasMultipleValues } = (0, import_react.render)(
|
|
126
|
+
(0, import__.default)("div", { accessibilityControls: ["abc", "def"] })
|
|
127
|
+
);
|
|
128
|
+
expect(getAttribute(hasMultipleValues, "aria-controls")).toBe("abc def");
|
|
129
|
+
}), test("accessibilityCurrent", () => {
|
|
130
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
131
|
+
(0, import__.default)("div", { accessibilityCurrent: null })
|
|
132
|
+
);
|
|
133
|
+
expect(getAttribute(isEmpty, "aria-current")).toBeNull();
|
|
134
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
135
|
+
(0, import__.default)("div", { accessibilityCurrent: "page" })
|
|
136
|
+
);
|
|
137
|
+
expect(getAttribute(hasValue, "aria-current")).toBe("page");
|
|
138
|
+
}), test("accessibilityDescribedBy", () => {
|
|
139
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
140
|
+
(0, import__.default)("div", { accessibilityDescribedBy: null })
|
|
141
|
+
);
|
|
142
|
+
expect(getAttribute(isEmpty, "aria-describedby")).toBeNull();
|
|
143
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
144
|
+
(0, import__.default)("div", { accessibilityDescribedBy: "abc" })
|
|
145
|
+
);
|
|
146
|
+
expect(getAttribute(hasValue, "aria-describedby")).toBe("abc");
|
|
147
|
+
const { container: hasMultipleValues } = (0, import_react.render)(
|
|
148
|
+
(0, import__.default)("div", { accessibilityDescribedBy: ["abc", "def"] })
|
|
149
|
+
);
|
|
150
|
+
expect(getAttribute(hasMultipleValues, "aria-describedby")).toBe("abc def");
|
|
151
|
+
}), test("accessibilityDetails", () => {
|
|
152
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
153
|
+
(0, import__.default)("div", { accessibilityDetails: null })
|
|
154
|
+
);
|
|
155
|
+
expect(getAttribute(isEmpty, "aria-details")).toBeNull();
|
|
156
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
157
|
+
(0, import__.default)("div", { accessibilityDetails: "abc" })
|
|
158
|
+
);
|
|
159
|
+
expect(getAttribute(hasValue, "aria-details")).toBe("abc");
|
|
160
|
+
}), test("accessibilityDisabled", () => {
|
|
161
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
162
|
+
(0, import__.default)("button", { accessibilityDisabled: null })
|
|
163
|
+
);
|
|
164
|
+
expect(getAttribute(isEmpty, "aria-disabled")).toBeNull(), expect(getProperty(isEmpty, "disabled")).toBe(!1);
|
|
165
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
166
|
+
(0, import__.default)("button", { accessibilityDisabled: !0 })
|
|
167
|
+
);
|
|
168
|
+
expect(getAttribute(hasValue, "aria-disabled")).toBe("true"), expect(getProperty(hasValue, "disabled")).toBe(!0);
|
|
169
|
+
}), test("accessibilityErrorMessage", () => {
|
|
170
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
171
|
+
(0, import__.default)("div", { accessibilityErrorMessage: null })
|
|
172
|
+
);
|
|
173
|
+
expect(getAttribute(isEmpty, "aria-errormessage")).toBeNull();
|
|
174
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
175
|
+
(0, import__.default)("div", { accessibilityErrorMessage: "abc" })
|
|
176
|
+
);
|
|
177
|
+
expect(getAttribute(hasValue, "aria-errormessage")).toBe("abc");
|
|
178
|
+
}), test("accessibilityExpanded", () => {
|
|
179
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
180
|
+
(0, import__.default)("div", { accessibilityExpanded: null })
|
|
181
|
+
);
|
|
182
|
+
expect(getAttribute(isEmpty, "aria-expanded")).toBeNull();
|
|
183
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
184
|
+
(0, import__.default)("div", { accessibilityExpanded: !0 })
|
|
185
|
+
);
|
|
186
|
+
expect(getAttribute(hasValue, "aria-expanded")).toBe("true");
|
|
187
|
+
}), test("accessibilityFlowTo", () => {
|
|
188
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
189
|
+
(0, import__.default)("div", { accessibilityFlowTo: null })
|
|
190
|
+
);
|
|
191
|
+
expect(getAttribute(isEmpty, "aria-flowto")).toBeNull();
|
|
192
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
193
|
+
(0, import__.default)("div", { accessibilityFlowTo: "abc" })
|
|
194
|
+
);
|
|
195
|
+
expect(getAttribute(hasValue, "aria-flowto")).toBe("abc");
|
|
196
|
+
const { container: hasMultipleValues } = (0, import_react.render)(
|
|
197
|
+
(0, import__.default)("div", { accessibilityFlowTo: ["abc", "def"] })
|
|
198
|
+
);
|
|
199
|
+
expect(getAttribute(hasMultipleValues, "aria-flowto")).toBe("abc def");
|
|
200
|
+
}), test("accessibilityHasPopup", () => {
|
|
201
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
202
|
+
(0, import__.default)("div", { accessibilityHasPopup: null })
|
|
203
|
+
);
|
|
204
|
+
expect(getAttribute(isEmpty, "aria-haspopup")).toBeNull();
|
|
205
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
206
|
+
(0, import__.default)("div", { accessibilityHasPopup: !0 })
|
|
207
|
+
);
|
|
208
|
+
expect(getAttribute(hasValue, "aria-haspopup")).toBe("true");
|
|
209
|
+
}), test("accessibilityHidden", () => {
|
|
210
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
211
|
+
(0, import__.default)("div", { accessibilityHidden: null })
|
|
212
|
+
);
|
|
213
|
+
expect(getAttribute(isEmpty, "aria-hidden")).toBeNull();
|
|
214
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
215
|
+
(0, import__.default)("div", { accessibilityHidden: !0 })
|
|
216
|
+
);
|
|
217
|
+
expect(getAttribute(hasValue, "aria-hidden")).toBe("true");
|
|
218
|
+
}), test("accessibilityInvalid", () => {
|
|
219
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
220
|
+
(0, import__.default)("input", { accessibilityInvalid: null })
|
|
221
|
+
);
|
|
222
|
+
expect(getAttribute(isEmpty, "aria-invalid")).toBeNull();
|
|
223
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
224
|
+
(0, import__.default)("input", { accessibilityInvalid: !0 })
|
|
225
|
+
);
|
|
226
|
+
expect(getAttribute(hasValue, "aria-invalid")).toBe("true");
|
|
227
|
+
}), test("accessibilityKeyShortcuts", () => {
|
|
228
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
229
|
+
(0, import__.default)("div", { accessibilityKeyShortcuts: null })
|
|
230
|
+
);
|
|
231
|
+
expect(getAttribute(isEmpty, "aria-keyshortcuts")).toBeNull();
|
|
232
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
233
|
+
(0, import__.default)("div", {
|
|
234
|
+
accessibilityKeyShortcuts: ["ArrowUp", "Enter", "Space", "Alt+Shift+T"]
|
|
235
|
+
})
|
|
236
|
+
);
|
|
237
|
+
expect(getAttribute(hasValue, "aria-keyshortcuts")).toBe(
|
|
238
|
+
"ArrowUp Enter Space Alt+Shift+T"
|
|
239
|
+
);
|
|
240
|
+
}), test("accessibilityLabel", () => {
|
|
241
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
242
|
+
(0, import__.default)("div", { accessibilityLabel: null })
|
|
243
|
+
);
|
|
244
|
+
expect(getAttribute(isEmpty, "aria-label")).toBeNull();
|
|
245
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
246
|
+
(0, import__.default)("div", { accessibilityLabel: "abc" })
|
|
247
|
+
);
|
|
248
|
+
expect(getAttribute(hasValue, "aria-label")).toBe("abc");
|
|
249
|
+
}), test("accessibilityLabelledBy", () => {
|
|
250
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
251
|
+
(0, import__.default)("div", { accessibilityLabelledBy: null })
|
|
252
|
+
);
|
|
253
|
+
expect(getAttribute(isEmpty, "aria-labelledby")).toBeNull();
|
|
254
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
255
|
+
(0, import__.default)("div", { accessibilityLabelledBy: "abc" })
|
|
256
|
+
);
|
|
257
|
+
expect(getAttribute(hasValue, "aria-labelledby")).toBe("abc");
|
|
258
|
+
const { container: hasMultipleValues } = (0, import_react.render)(
|
|
259
|
+
(0, import__.default)("div", { accessibilityLabelledBy: ["abc", "def"] })
|
|
260
|
+
);
|
|
261
|
+
expect(getAttribute(hasMultipleValues, "aria-labelledby")).toBe("abc def");
|
|
262
|
+
}), test("accessibilityLevel", () => {
|
|
263
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
264
|
+
(0, import__.default)("div", { accessibilityLevel: null })
|
|
265
|
+
);
|
|
266
|
+
expect(getAttribute(isEmpty, "aria-level")).toBeNull();
|
|
267
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
268
|
+
(0, import__.default)("div", { accessibilityLevel: 3 })
|
|
269
|
+
);
|
|
270
|
+
expect(getAttribute(hasValue, "aria-level")).toBe("3");
|
|
271
|
+
}), test("accessibilityLiveRegion", () => {
|
|
272
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
273
|
+
(0, import__.default)("div", { accessibilityLiveRegion: null })
|
|
274
|
+
);
|
|
275
|
+
expect(getAttribute(isEmpty, "aria-live")).toBeNull();
|
|
276
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
277
|
+
(0, import__.default)("div", { accessibilityLiveRegion: "polite" })
|
|
278
|
+
);
|
|
279
|
+
expect(getAttribute(hasValue, "aria-live")).toBe("polite");
|
|
280
|
+
}), test("accessibilityModal", () => {
|
|
281
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
282
|
+
(0, import__.default)("div", { accessibilityModal: null })
|
|
283
|
+
);
|
|
284
|
+
expect(getAttribute(isEmpty, "aria-modal")).toBeNull();
|
|
285
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
286
|
+
(0, import__.default)("div", { accessibilityModal: !0 })
|
|
287
|
+
);
|
|
288
|
+
expect(getAttribute(hasValue, "aria-modal")).toBe("true");
|
|
289
|
+
}), test("accessibilityMultiline", () => {
|
|
290
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
291
|
+
(0, import__.default)("div", { accessibilityMultiline: null })
|
|
292
|
+
);
|
|
293
|
+
expect(getAttribute(isEmpty, "aria-multiline")).toBeNull();
|
|
294
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
295
|
+
(0, import__.default)("div", { accessibilityMultiline: !0 })
|
|
296
|
+
);
|
|
297
|
+
expect(getAttribute(hasValue, "aria-multiline")).toBe("true");
|
|
298
|
+
}), test("accessibilityMultiSelectable", () => {
|
|
299
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
300
|
+
(0, import__.default)("div", { accessibilityMultiSelectable: null })
|
|
301
|
+
);
|
|
302
|
+
expect(getAttribute(isEmpty, "aria-multiselectable")).toBeNull();
|
|
303
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
304
|
+
(0, import__.default)("div", { accessibilityMultiSelectable: !0 })
|
|
305
|
+
);
|
|
306
|
+
expect(getAttribute(hasValue, "aria-multiselectable")).toBe("true");
|
|
307
|
+
}), test("accessibilityOrientation", () => {
|
|
308
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
309
|
+
(0, import__.default)("div", { accessibilityOrientation: null })
|
|
310
|
+
);
|
|
311
|
+
expect(getAttribute(isEmpty, "aria-orientation")).toBeNull();
|
|
312
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
313
|
+
(0, import__.default)("div", { accessibilityOrientation: "vertical" })
|
|
314
|
+
);
|
|
315
|
+
expect(getAttribute(hasValue, "aria-orientation")).toBe("vertical");
|
|
316
|
+
}), test("accessibilityOwns", () => {
|
|
317
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
318
|
+
(0, import__.default)("div", { accessibilityOwns: null })
|
|
319
|
+
);
|
|
320
|
+
expect(getAttribute(isEmpty, "aria-owns")).toBeNull();
|
|
321
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
322
|
+
(0, import__.default)("div", { accessibilityOwns: "abc" })
|
|
323
|
+
);
|
|
324
|
+
expect(getAttribute(hasValue, "aria-owns")).toBe("abc");
|
|
325
|
+
const { container: hasMultipleValues } = (0, import_react.render)(
|
|
326
|
+
(0, import__.default)("div", { accessibilityOwns: ["abc", "def"] })
|
|
327
|
+
);
|
|
328
|
+
expect(getAttribute(hasMultipleValues, "aria-owns")).toBe("abc def");
|
|
329
|
+
}), test("accessibilityPlaceholder", () => {
|
|
330
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
331
|
+
(0, import__.default)("div", { accessibilityPlaceholder: null })
|
|
332
|
+
);
|
|
333
|
+
expect(getAttribute(isEmpty, "aria-placeholder")).toBeNull();
|
|
334
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
335
|
+
(0, import__.default)("div", { accessibilityPlaceholder: "MM-DD-YYYY" })
|
|
336
|
+
);
|
|
337
|
+
expect(getAttribute(hasValue, "aria-placeholder")).toBe("MM-DD-YYYY");
|
|
338
|
+
}), test("accessibilityPosInSet", () => {
|
|
339
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
340
|
+
(0, import__.default)("div", { accessibilityPosInSet: null })
|
|
341
|
+
);
|
|
342
|
+
expect(getAttribute(isEmpty, "aria-posinset")).toBeNull();
|
|
343
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
344
|
+
(0, import__.default)("div", { accessibilityPosInSet: 3 })
|
|
345
|
+
);
|
|
346
|
+
expect(getAttribute(hasValue, "aria-posinset")).toBe("3");
|
|
347
|
+
}), test("accessibilityPressed", () => {
|
|
348
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
349
|
+
(0, import__.default)("div", { accessibilityPressed: null })
|
|
350
|
+
);
|
|
351
|
+
expect(getAttribute(isEmpty, "aria-pressed")).toBeNull();
|
|
352
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
353
|
+
(0, import__.default)("div", { accessibilityPressed: !0 })
|
|
354
|
+
);
|
|
355
|
+
expect(getAttribute(hasValue, "aria-pressed")).toBe("true");
|
|
356
|
+
}), test("accessibilityReadOnly", () => {
|
|
357
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
358
|
+
(0, import__.default)("input", { accessibilityReadOnly: null })
|
|
359
|
+
);
|
|
360
|
+
expect(getAttribute(isEmpty, "aria-readonly")).toBeNull(), expect(getProperty(isEmpty, "readOnly")).toBe(!1);
|
|
361
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
362
|
+
(0, import__.default)("input", { accessibilityReadOnly: !0 })
|
|
363
|
+
);
|
|
364
|
+
expect(getAttribute(hasValue, "aria-readonly")).toBe("true"), expect(getProperty(hasValue, "readOnly")).toBe(!0);
|
|
365
|
+
}), test("accessibilityRequired", () => {
|
|
366
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
367
|
+
(0, import__.default)("input", { accessibilityRequired: null })
|
|
368
|
+
);
|
|
369
|
+
expect(getAttribute(isEmpty, "aria-required")).toBeNull(), expect(getProperty(isEmpty, "required")).toBe(!1);
|
|
370
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
371
|
+
(0, import__.default)("input", { accessibilityRequired: !0 })
|
|
372
|
+
);
|
|
373
|
+
expect(getAttribute(hasValue, "aria-required")).toBe("true"), expect(getProperty(hasValue, "required")).toBe(!0);
|
|
374
|
+
}), test("accessibilityRole", () => {
|
|
375
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
376
|
+
(0, import__.default)("div", { accessibilityRole: null })
|
|
377
|
+
);
|
|
378
|
+
expect(getAttribute(isEmpty, "role")).toBeNull();
|
|
379
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
380
|
+
(0, import__.default)("div", { accessibilityRole: "button" })
|
|
381
|
+
);
|
|
382
|
+
expect(getAttribute(hasValue, "role")).toBe("button"), expect(getAttribute(hasValue, "tabIndex")).toBe("0");
|
|
383
|
+
const { container: roleIsNone } = (0, import_react.render)(
|
|
384
|
+
(0, import__.default)("div", { accessibilityRole: "none" })
|
|
385
|
+
);
|
|
386
|
+
expect(getAttribute(roleIsNone, "role")).toBe("presentation");
|
|
387
|
+
}), test("accessibilityRoleDescription", () => {
|
|
388
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
389
|
+
(0, import__.default)("div", { accessibilityRoleDescription: null })
|
|
390
|
+
);
|
|
391
|
+
expect(getAttribute(isEmpty, "aria-roledescription")).toBeNull();
|
|
392
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
393
|
+
(0, import__.default)("div", { accessibilityRoleDescription: "abc" })
|
|
394
|
+
);
|
|
395
|
+
expect(getAttribute(hasValue, "aria-roledescription")).toBe("abc");
|
|
396
|
+
}), test("accessibilityRowCount", () => {
|
|
397
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
398
|
+
(0, import__.default)("div", { accessibilityRowCount: null })
|
|
399
|
+
);
|
|
400
|
+
expect(getAttribute(isEmpty, "aria-rowcount")).toBeNull();
|
|
401
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
402
|
+
(0, import__.default)("div", { accessibilityRowCount: 5 })
|
|
403
|
+
);
|
|
404
|
+
expect(getAttribute(hasValue, "aria-rowcount")).toBe("5");
|
|
405
|
+
}), test("accessibilityRowIndex", () => {
|
|
406
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
407
|
+
(0, import__.default)("div", { accessibilityRowIndex: null })
|
|
408
|
+
);
|
|
409
|
+
expect(getAttribute(isEmpty, "aria-rowindex")).toBeNull();
|
|
410
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
411
|
+
(0, import__.default)("div", { accessibilityRowIndex: 5 })
|
|
412
|
+
);
|
|
413
|
+
expect(getAttribute(hasValue, "aria-rowindex")).toBe("5");
|
|
414
|
+
}), test("accessibilityRowSpan", () => {
|
|
415
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
416
|
+
(0, import__.default)("div", { accessibilityRowSpan: null })
|
|
417
|
+
);
|
|
418
|
+
expect(getAttribute(isEmpty, "aria-rowspan")).toBeNull();
|
|
419
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
420
|
+
(0, import__.default)("div", { accessibilityRowSpan: 5 })
|
|
421
|
+
);
|
|
422
|
+
expect(getAttribute(hasValue, "aria-rowspan")).toBe("5");
|
|
423
|
+
}), test("accessibilitySelected", () => {
|
|
424
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
425
|
+
(0, import__.default)("div", { accessibilitySelected: null })
|
|
426
|
+
);
|
|
427
|
+
expect(getAttribute(isEmpty, "aria-selected")).toBeNull();
|
|
428
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
429
|
+
(0, import__.default)("div", { accessibilitySelected: !0 })
|
|
430
|
+
);
|
|
431
|
+
expect(getAttribute(hasValue, "aria-selected")).toBe("true");
|
|
432
|
+
}), test("accessibilitySetSize", () => {
|
|
433
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
434
|
+
(0, import__.default)("div", { accessibilitySetSize: null })
|
|
435
|
+
);
|
|
436
|
+
expect(getAttribute(isEmpty, "aria-setsize")).toBeNull();
|
|
437
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
438
|
+
(0, import__.default)("div", { accessibilitySetSize: 5 })
|
|
439
|
+
);
|
|
440
|
+
expect(getAttribute(hasValue, "aria-setsize")).toBe("5");
|
|
441
|
+
}), test("accessibilitySort", () => {
|
|
442
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
443
|
+
(0, import__.default)("div", { accessibilitySort: null })
|
|
444
|
+
);
|
|
445
|
+
expect(getAttribute(isEmpty, "aria-sort")).toBeNull();
|
|
446
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
447
|
+
(0, import__.default)("div", { accessibilitySort: "ascending" })
|
|
448
|
+
);
|
|
449
|
+
expect(getAttribute(hasValue, "aria-sort")).toBe("ascending");
|
|
450
|
+
}), test("accessibilityValueMax", () => {
|
|
451
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
452
|
+
(0, import__.default)("div", { accessibilityValueMax: null })
|
|
453
|
+
);
|
|
454
|
+
expect(getAttribute(isEmpty, "aria-valuemax")).toBeNull();
|
|
455
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
456
|
+
(0, import__.default)("div", { accessibilityValueMax: 100 })
|
|
457
|
+
);
|
|
458
|
+
expect(getAttribute(hasValue, "aria-valuemax")).toBe("100");
|
|
459
|
+
}), test("accessibilityValueMin", () => {
|
|
460
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
461
|
+
(0, import__.default)("div", { accessibilityValueMin: null })
|
|
462
|
+
);
|
|
463
|
+
expect(getAttribute(isEmpty, "aria-valuemin")).toBeNull();
|
|
464
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
465
|
+
(0, import__.default)("div", { accessibilityValueMin: 10 })
|
|
466
|
+
);
|
|
467
|
+
expect(getAttribute(hasValue, "aria-valuemin")).toBe("10");
|
|
468
|
+
}), test("accessibilityValueNow", () => {
|
|
469
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
470
|
+
(0, import__.default)("div", { accessibilityValueNow: null })
|
|
471
|
+
);
|
|
472
|
+
expect(getAttribute(isEmpty, "aria-valuenow")).toBeNull();
|
|
473
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
474
|
+
(0, import__.default)("div", { accessibilityValueNow: 50 })
|
|
475
|
+
);
|
|
476
|
+
expect(getAttribute(hasValue, "aria-valuenow")).toBe("50");
|
|
477
|
+
}), test("accessibilityValueText", () => {
|
|
478
|
+
const { container: isEmpty } = (0, import_react.render)(
|
|
479
|
+
(0, import__.default)("div", { accessibilityValueText: null })
|
|
480
|
+
);
|
|
481
|
+
expect(getAttribute(isEmpty, "aria-valuetext")).toBeNull();
|
|
482
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
483
|
+
(0, import__.default)("div", { accessibilityValueText: "fifty" })
|
|
484
|
+
);
|
|
485
|
+
expect(getAttribute(hasValue, "aria-valuetext")).toBe("fifty");
|
|
486
|
+
}), test("dataSet", () => {
|
|
487
|
+
const { container: hasValue } = (0, import_react.render)(
|
|
488
|
+
(0, import__.default)("div", {
|
|
489
|
+
dataSet: {
|
|
490
|
+
one: "1",
|
|
491
|
+
two: "2",
|
|
492
|
+
camelCase: "camelCase",
|
|
493
|
+
msPrefix: "msPrefix"
|
|
494
|
+
}
|
|
495
|
+
})
|
|
496
|
+
);
|
|
497
|
+
expect(hasValue.firstChild).toMatchInlineSnapshot(`
|
|
498
|
+
<div
|
|
499
|
+
data-camel-case="camelCase"
|
|
500
|
+
data-ms-prefix="msPrefix"
|
|
501
|
+
data-one="1"
|
|
502
|
+
data-two="2"
|
|
503
|
+
/>
|
|
504
|
+
`);
|
|
505
|
+
}), test("focusable", () => {
|
|
506
|
+
const { container: isEmpty } = (0, import_react.render)((0, import__.default)("div", { focusable: null }));
|
|
507
|
+
expect(getAttribute(isEmpty, "tabindex")).toBeNull();
|
|
508
|
+
const { container: isTrue } = (0, import_react.render)((0, import__.default)("div", { focusable: !0 }));
|
|
509
|
+
expect(getAttribute(isTrue, "tabindex")).toBe("0");
|
|
510
|
+
const { container: isFalseNativelyFocusable } = (0, import_react.render)(
|
|
511
|
+
(0, import__.default)("button", { focusable: !1 })
|
|
512
|
+
);
|
|
513
|
+
expect(getAttribute(isFalseNativelyFocusable, "tabindex")).toBe("-1");
|
|
514
|
+
const { container: isDisabledNativelyFocusable } = (0, import_react.render)(
|
|
515
|
+
(0, import__.default)("button", {
|
|
516
|
+
accessibilityDisabled: !0,
|
|
517
|
+
focusable: !0
|
|
518
|
+
})
|
|
519
|
+
);
|
|
520
|
+
expect(getAttribute(isDisabledNativelyFocusable, "tabindex")).toBe("-1");
|
|
521
|
+
const { container: isTrueNativelyFocusable } = (0, import_react.render)(
|
|
522
|
+
(0, import__.default)("button", { focusable: !0 })
|
|
523
|
+
);
|
|
524
|
+
expect(getAttribute(isTrueNativelyFocusable, "tabindex")).toBeNull();
|
|
525
|
+
const { container: isFocusableRole } = (0, import_react.render)(
|
|
526
|
+
(0, import__.default)("div", { accessibilityRole: "button", focusable: !0 })
|
|
527
|
+
);
|
|
528
|
+
expect(getAttribute(isFocusableRole, "tabindex")).toBe("0");
|
|
529
|
+
const { container: isFalseFocusableRole } = (0, import_react.render)(
|
|
530
|
+
(0, import__.default)("div", { accessibilityRole: "button", focusable: !1 })
|
|
531
|
+
);
|
|
532
|
+
expect(getAttribute(isFalseFocusableRole, "tabindex")).toBe("-1");
|
|
533
|
+
});
|
|
534
|
+
});
|
|
535
|
+
});
|
|
536
|
+
//# sourceMappingURL=index-test.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var createElement_exports = {};
|
|
24
|
+
__export(createElement_exports, {
|
|
25
|
+
default: () => createElement_default
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(createElement_exports);
|
|
28
|
+
var import_react = __toESM(require("react")), import_react_native_web_internals = require("@tamagui/react-native-web-internals"), import_web = require("@tamagui/web"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
const createElement = (component, props, options) => {
|
|
30
|
+
let accessibilityComponent;
|
|
31
|
+
component && component.constructor === String && (accessibilityComponent = import_react_native_web_internals.AccessibilityUtil.propsToAccessibilityComponent(props));
|
|
32
|
+
const Component = accessibilityComponent || component, domProps = (0, import_react_native_web_internals.createDOMProps)(Component, props, options), styles = import_react_native_web_internals.stylesFromProps.get(domProps);
|
|
33
|
+
let element = import_react.default.createElement(Component, domProps);
|
|
34
|
+
return styles && (element = (0, import_web.wrapStyleTags)(styles, element)), domProps.dir ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native_web_internals.LocaleProvider, { direction: domProps.dir, locale: domProps.lang, children: element }) : element;
|
|
35
|
+
};
|
|
36
|
+
var createElement_default = createElement;
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var createReactDOMStyle_exports = {};
|
|
16
|
+
__export(createReactDOMStyle_exports, {
|
|
17
|
+
default: () => createReactDOMStyle_default
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(createReactDOMStyle_exports);
|
|
20
|
+
var import_react_native_web_internals = require("@tamagui/react-native-web-internals"), createReactDOMStyle_default = import_react_native_web_internals.createReactDOMStyle;
|
|
21
|
+
//# sourceMappingURL=createReactDOMStyle.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var findNodeHandle_exports = {};
|
|
16
|
+
__export(findNodeHandle_exports, {
|
|
17
|
+
findNodeHandle: () => findNodeHandle
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(findNodeHandle_exports);
|
|
20
|
+
var import_react_dom = require("react-dom");
|
|
21
|
+
const findNodeHandle = (host) => {
|
|
22
|
+
let node;
|
|
23
|
+
try {
|
|
24
|
+
node = (0, import_react_dom.findDOMNode)(host);
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
return node;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=findNodeHandle.js.map
|