@hanzogui/react-native-web-internals 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.cjs +240 -0
- package/dist/cjs/StyleSheet/__tests__/compiler-test.cjs +407 -0
- package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.cjs +121 -0
- package/dist/cjs/StyleSheet/__tests__/index-test.cjs +404 -0
- package/dist/cjs/StyleSheet/__tests__/preprocess-test.cjs +108 -0
- package/dist/cjs/StyleSheet/__tests__/validate-test.cjs +36 -0
- package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.cjs +87 -0
- package/dist/cjs/StyleSheet/compiler/hash.cjs +26 -0
- package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +36 -0
- package/dist/cjs/StyleSheet/compiler/index.cjs +318 -0
- package/dist/cjs/StyleSheet/compiler/normalizeColor.cjs +40 -0
- package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.cjs +43 -0
- package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +48 -0
- package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +37 -0
- package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.cjs +110 -0
- package/dist/cjs/StyleSheet/dom/index.cjs +67 -0
- package/dist/cjs/StyleSheet/index.cjs +57 -0
- package/dist/cjs/StyleSheet/preprocess.cjs +101 -0
- package/dist/cjs/StyleSheet/validate.cjs +69 -0
- package/dist/cjs/TextAncestorContext.cjs +27 -0
- package/dist/cjs/colorProps.cjs +37 -0
- package/dist/cjs/index.cjs +103 -0
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.cjs +50 -0
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.cjs +40 -0
- package/dist/cjs/modules/AccessibilityUtil/index.cjs +33 -0
- package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +26 -0
- package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +57 -0
- package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +47 -0
- package/dist/cjs/modules/AssetRegistry/index.cjs +33 -0
- package/dist/cjs/modules/ImageLoader/index.cjs +111 -0
- package/dist/cjs/modules/InteractionManager.cjs +184 -0
- package/dist/cjs/modules/Platform/__tests__/index-test.cjs +48 -0
- package/dist/cjs/modules/Platform/index.cjs +30 -0
- package/dist/cjs/modules/TextInputState/index.cjs +55 -0
- package/dist/cjs/modules/UIManager/__tests__/index-test.cjs +90 -0
- package/dist/cjs/modules/UIManager/index.cjs +60 -0
- package/dist/cjs/modules/canUseDOM.cjs +26 -0
- package/dist/cjs/modules/createDOMProps/__tests__/index-test.cjs +156 -0
- package/dist/cjs/modules/createDOMProps/index.cjs +179 -0
- package/dist/cjs/modules/createEventHandle/__tests__/index-test.cjs +344 -0
- package/dist/cjs/modules/createEventHandle/index.cjs +67 -0
- package/dist/cjs/modules/dismissKeyboard/index.cjs +29 -0
- package/dist/cjs/modules/forwardedProps/index.cjs +161 -0
- package/dist/cjs/modules/getBoundingClientRect/index.cjs +28 -0
- package/dist/cjs/modules/invariant.cjs +36 -0
- package/dist/cjs/modules/isSelectionValid/index.cjs +35 -0
- package/dist/cjs/modules/isWebColor/index.cjs +26 -0
- package/dist/cjs/modules/mergeRefs/__tests__/index-test.cjs +42 -0
- package/dist/cjs/modules/mergeRefs/index.cjs +42 -0
- package/dist/cjs/modules/modality/__tests__/index-test.cjs +32 -0
- package/dist/cjs/modules/modality/index.cjs +135 -0
- package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.cjs +30 -0
- package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +35 -0
- package/dist/cjs/modules/normalizeColor/index.cjs +39 -0
- package/dist/cjs/modules/pick/index.cjs +30 -0
- package/dist/cjs/modules/processColor/__tests__/index-test.cjs +66 -0
- package/dist/cjs/modules/processColor/index.cjs +42 -0
- package/dist/cjs/modules/requestIdleCallback/index.cjs +44 -0
- package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +35 -0
- package/dist/cjs/modules/setValueForStyles/index.cjs +35 -0
- package/dist/cjs/modules/unitlessNumbers/index.cjs +85 -0
- package/dist/cjs/modules/useElementLayout/index.cjs +39 -0
- package/dist/cjs/modules/useEvent/__tests__/index-test.cjs +408 -0
- package/dist/cjs/modules/useEvent/index.cjs +45 -0
- package/dist/cjs/modules/useHover/__tests__/index-test.cjs +273 -0
- package/dist/cjs/modules/useHover/index.cjs +97 -0
- package/dist/cjs/modules/useLayoutEffect/index.cjs +39 -0
- package/dist/cjs/modules/useLocale/index.cjs +66 -0
- package/dist/cjs/modules/useLocale/isLocaleRTL.cjs +83 -0
- package/dist/cjs/modules/useMergeRefs/__tests__/index-test.cjs +102 -0
- package/dist/cjs/modules/useMergeRefs/index.cjs +43 -0
- package/dist/cjs/modules/usePlatformMethods/index.cjs +35 -0
- package/dist/cjs/modules/useStable/__tests__/index-test.cjs +92 -0
- package/dist/cjs/modules/useStable/index.cjs +42 -0
- package/dist/cjs/styleTypes.cjs +16 -0
- package/dist/cjs/types.cjs +16 -0
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs +219 -0
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs +408 -0
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs +100 -0
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/index-test.mjs +383 -0
- package/dist/esm/StyleSheet/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs +109 -0
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs +37 -0
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs +63 -0
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/hash.mjs +3 -0
- package/dist/esm/StyleSheet/compiler/hash.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs +13 -0
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/index.mjs +292 -0
- package/dist/esm/StyleSheet/compiler/index.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs +17 -0
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs +20 -0
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs.map +1 -0
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs +25 -0
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs.map +1 -0
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs +14 -0
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs.map +1 -0
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs +87 -0
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs.map +1 -0
- package/dist/esm/StyleSheet/dom/index.mjs +44 -0
- package/dist/esm/StyleSheet/dom/index.mjs.map +1 -0
- package/dist/esm/StyleSheet/index.mjs +33 -0
- package/dist/esm/StyleSheet/index.mjs.map +1 -0
- package/dist/esm/StyleSheet/preprocess.mjs +75 -0
- package/dist/esm/StyleSheet/preprocess.mjs.map +1 -0
- package/dist/esm/StyleSheet/validate.mjs +46 -0
- package/dist/esm/StyleSheet/validate.mjs.map +1 -0
- package/dist/esm/TextAncestorContext.mjs +4 -0
- package/dist/esm/TextAncestorContext.mjs.map +1 -0
- package/dist/esm/colorProps.mjs +14 -0
- package/dist/esm/colorProps.mjs.map +1 -0
- package/dist/esm/index.js +45 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +45 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs +29 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs +19 -0
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/index.mjs +10 -0
- package/dist/esm/modules/AccessibilityUtil/index.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs +3 -0
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs +34 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs.map +1 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs +24 -0
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs.map +1 -0
- package/dist/esm/modules/AssetRegistry/index.mjs +9 -0
- package/dist/esm/modules/AssetRegistry/index.mjs.map +1 -0
- package/dist/esm/modules/ImageLoader/index.mjs +87 -0
- package/dist/esm/modules/ImageLoader/index.mjs.map +1 -0
- package/dist/esm/modules/InteractionManager.mjs +161 -0
- package/dist/esm/modules/InteractionManager.mjs.map +1 -0
- package/dist/esm/modules/Platform/__tests__/index-test.mjs +27 -0
- package/dist/esm/modules/Platform/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/Platform/index.mjs +7 -0
- package/dist/esm/modules/Platform/index.mjs.map +1 -0
- package/dist/esm/modules/TextInputState/index.mjs +32 -0
- package/dist/esm/modules/TextInputState/index.mjs.map +1 -0
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs +69 -0
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/UIManager/index.mjs +37 -0
- package/dist/esm/modules/UIManager/index.mjs.map +1 -0
- package/dist/esm/modules/canUseDOM.mjs +3 -0
- package/dist/esm/modules/canUseDOM.mjs.map +1 -0
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs +135 -0
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/createDOMProps/index.mjs +155 -0
- package/dist/esm/modules/createDOMProps/index.mjs.map +1 -0
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs +323 -0
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/createEventHandle/index.mjs +42 -0
- package/dist/esm/modules/createEventHandle/index.mjs.map +1 -0
- package/dist/esm/modules/dismissKeyboard/index.mjs +6 -0
- package/dist/esm/modules/dismissKeyboard/index.mjs.map +1 -0
- package/dist/esm/modules/forwardedProps/index.mjs +128 -0
- package/dist/esm/modules/forwardedProps/index.mjs.map +1 -0
- package/dist/esm/modules/getBoundingClientRect/index.mjs +5 -0
- package/dist/esm/modules/getBoundingClientRect/index.mjs.map +1 -0
- package/dist/esm/modules/invariant.mjs +12 -0
- package/dist/esm/modules/invariant.mjs.map +1 -0
- package/dist/esm/modules/isSelectionValid/index.mjs +12 -0
- package/dist/esm/modules/isSelectionValid/index.mjs.map +1 -0
- package/dist/esm/modules/isWebColor/index.mjs +3 -0
- package/dist/esm/modules/isWebColor/index.mjs.map +1 -0
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs +21 -0
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/mergeRefs/index.mjs +19 -0
- package/dist/esm/modules/mergeRefs/index.mjs.map +1 -0
- package/dist/esm/modules/modality/__tests__/index-test.mjs +33 -0
- package/dist/esm/modules/modality/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/modality/index.mjs +109 -0
- package/dist/esm/modules/modality/index.mjs.map +1 -0
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs +9 -0
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs +12 -0
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs.map +1 -0
- package/dist/esm/modules/normalizeColor/index.mjs +16 -0
- package/dist/esm/modules/normalizeColor/index.mjs.map +1 -0
- package/dist/esm/modules/pick/index.mjs +7 -0
- package/dist/esm/modules/pick/index.mjs.map +1 -0
- package/dist/esm/modules/processColor/__tests__/index-test.mjs +45 -0
- package/dist/esm/modules/processColor/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/processColor/index.mjs +8 -0
- package/dist/esm/modules/processColor/index.mjs.map +1 -0
- package/dist/esm/modules/requestIdleCallback/index.mjs +20 -0
- package/dist/esm/modules/requestIdleCallback/index.mjs.map +1 -0
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs +12 -0
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs.map +1 -0
- package/dist/esm/modules/setValueForStyles/index.mjs +12 -0
- package/dist/esm/modules/setValueForStyles/index.mjs.map +1 -0
- package/dist/esm/modules/unitlessNumbers/index.mjs +62 -0
- package/dist/esm/modules/unitlessNumbers/index.mjs.map +1 -0
- package/dist/esm/modules/useElementLayout/index.mjs +16 -0
- package/dist/esm/modules/useElementLayout/index.mjs.map +1 -0
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs +387 -0
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useEvent/index.mjs +22 -0
- package/dist/esm/modules/useEvent/index.mjs.map +1 -0
- package/dist/esm/modules/useHover/__tests__/index-test.mjs +252 -0
- package/dist/esm/modules/useHover/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useHover/index.mjs +74 -0
- package/dist/esm/modules/useHover/index.mjs.map +1 -0
- package/dist/esm/modules/useLayoutEffect/index.mjs +5 -0
- package/dist/esm/modules/useLayoutEffect/index.mjs.map +1 -0
- package/dist/esm/modules/useLocale/index.mjs +30 -0
- package/dist/esm/modules/useLocale/index.mjs.map +1 -0
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs +60 -0
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs.map +1 -0
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs +81 -0
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useMergeRefs/index.mjs +9 -0
- package/dist/esm/modules/useMergeRefs/index.mjs.map +1 -0
- package/dist/esm/modules/usePlatformMethods/index.mjs +12 -0
- package/dist/esm/modules/usePlatformMethods/index.mjs.map +1 -0
- package/dist/esm/modules/useStable/__tests__/index-test.mjs +71 -0
- package/dist/esm/modules/useStable/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/modules/useStable/index.mjs +8 -0
- package/dist/esm/modules/useStable/index.mjs.map +1 -0
- package/dist/esm/styleTypes.mjs +2 -0
- package/dist/esm/styleTypes.mjs.map +1 -0
- package/dist/esm/types.mjs +2 -0
- package/dist/esm/types.mjs.map +1 -0
- package/package.json +58 -0
- package/src/StyleSheet/__tests__/compiler-createReactDOMStyle-test.tsx +236 -0
- package/src/StyleSheet/__tests__/compiler-test.tsx +426 -0
- package/src/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.tsx +169 -0
- package/src/StyleSheet/__tests__/index-test.tsx +406 -0
- package/src/StyleSheet/__tests__/preprocess-test.tsx +107 -0
- package/src/StyleSheet/__tests__/validate-test.tsx +42 -0
- package/src/StyleSheet/compiler/createReactDOMStyle.tsx +215 -0
- package/src/StyleSheet/compiler/hash.tsx +1 -0
- package/src/StyleSheet/compiler/hyphenateStyleName.tsx +25 -0
- package/src/StyleSheet/compiler/index.tsx +478 -0
- package/src/StyleSheet/compiler/normalizeColor.tsx +35 -0
- package/src/StyleSheet/compiler/normalizeValueWithProperty.tsx +34 -0
- package/src/StyleSheet/compiler/resolveShadowValue.tsx +26 -0
- package/src/StyleSheet/dom/createCSSStyleSheet.tsx +42 -0
- package/src/StyleSheet/dom/createOrderedCSSStyleSheet.tsx +195 -0
- package/src/StyleSheet/dom/index.tsx +92 -0
- package/src/StyleSheet/index.tsx +99 -0
- package/src/StyleSheet/preprocess.tsx +119 -0
- package/src/StyleSheet/validate.tsx +90 -0
- package/src/TextAncestorContext.tsx +13 -0
- package/src/colorProps.tsx +12 -0
- package/src/index.tsx +58 -0
- package/src/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.tsx +44 -0
- package/src/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.tsx +25 -0
- package/src/modules/AccessibilityUtil/index.tsx +18 -0
- package/src/modules/AccessibilityUtil/isDisabled.tsx +13 -0
- package/src/modules/AccessibilityUtil/propsToAccessibilityComponent.tsx +54 -0
- package/src/modules/AccessibilityUtil/propsToAriaRole.tsx +37 -0
- package/src/modules/AssetRegistry/index.tsx +32 -0
- package/src/modules/ImageLoader/index.tsx +165 -0
- package/src/modules/InteractionManager.tsx +315 -0
- package/src/modules/Platform/__tests__/index-test.tsx +45 -0
- package/src/modules/Platform/index.tsx +15 -0
- package/src/modules/TextInputState/index.tsx +62 -0
- package/src/modules/UIManager/__tests__/index-test.tsx +87 -0
- package/src/modules/UIManager/index.tsx +68 -0
- package/src/modules/canUseDOM.tsx +14 -0
- package/src/modules/createDOMProps/__tests__/index-test.tsx +138 -0
- package/src/modules/createDOMProps/index.tsx +436 -0
- package/src/modules/createEventHandle/__tests__/index-test.tsx +459 -0
- package/src/modules/createEventHandle/index.tsx +100 -0
- package/src/modules/dismissKeyboard/index.tsx +14 -0
- package/src/modules/forwardedProps/index.tsx +145 -0
- package/src/modules/getBoundingClientRect/index.tsx +17 -0
- package/src/modules/invariant.ts +23 -0
- package/src/modules/isSelectionValid/index.tsx +20 -0
- package/src/modules/isWebColor/index.tsx +14 -0
- package/src/modules/mergeRefs/__tests__/index-test.tsx +32 -0
- package/src/modules/mergeRefs/index.tsx +36 -0
- package/src/modules/modality/__tests__/index-test.tsx +66 -0
- package/src/modules/modality/index.tsx +228 -0
- package/src/modules/multiplyStyleLengthValue/__tests__/index-test.tsx +23 -0
- package/src/modules/multiplyStyleLengthValue/index.tsx +26 -0
- package/src/modules/normalizeColor/index.tsx +32 -0
- package/src/modules/pick/index.tsx +25 -0
- package/src/modules/processColor/__tests__/index-test.tsx +78 -0
- package/src/modules/processColor/index.tsx +28 -0
- package/src/modules/requestIdleCallback/index.tsx +35 -0
- package/src/modules/setValueForStyles/dangerousStyleValue.tsx +74 -0
- package/src/modules/setValueForStyles/index.tsx +39 -0
- package/src/modules/unitlessNumbers/index.tsx +77 -0
- package/src/modules/useElementLayout/index.tsx +28 -0
- package/src/modules/useEvent/__tests__/index-test.tsx +511 -0
- package/src/modules/useEvent/index.tsx +64 -0
- package/src/modules/useHover/__tests__/index-test.tsx +342 -0
- package/src/modules/useHover/index.tsx +181 -0
- package/src/modules/useLayoutEffect/index.ts +15 -0
- package/src/modules/useLocale/index.tsx +57 -0
- package/src/modules/useLocale/isLocaleRTL.tsx +74 -0
- package/src/modules/useMergeRefs/__tests__/index-test.tsx +91 -0
- package/src/modules/useMergeRefs/index.tsx +22 -0
- package/src/modules/usePlatformMethods/index.tsx +40 -0
- package/src/modules/useStable/__tests__/index-test.tsx +101 -0
- package/src/modules/useStable/index.tsx +24 -0
- package/src/styleTypes.ts +321 -0
- package/src/types.ts +77 -0
- package/types/StyleSheet/compiler/createReactDOMStyle.d.ts +18 -0
- package/types/StyleSheet/compiler/createReactDOMStyle.d.ts.map +1 -0
- package/types/StyleSheet/compiler/hash.d.ts +2 -0
- package/types/StyleSheet/compiler/hash.d.ts.map +1 -0
- package/types/StyleSheet/compiler/hyphenateStyleName.d.ts +10 -0
- package/types/StyleSheet/compiler/hyphenateStyleName.d.ts.map +1 -0
- package/types/StyleSheet/compiler/index.d.ts +39 -0
- package/types/StyleSheet/compiler/index.d.ts.map +1 -0
- package/types/StyleSheet/compiler/normalizeColor.d.ts +10 -0
- package/types/StyleSheet/compiler/normalizeColor.d.ts.map +1 -0
- package/types/StyleSheet/compiler/normalizeValueWithProperty.d.ts +10 -0
- package/types/StyleSheet/compiler/normalizeValueWithProperty.d.ts.map +1 -0
- package/types/StyleSheet/compiler/resolveShadowValue.d.ts +10 -0
- package/types/StyleSheet/compiler/resolveShadowValue.d.ts.map +1 -0
- package/types/StyleSheet/dom/createCSSStyleSheet.d.ts +10 -0
- package/types/StyleSheet/dom/createCSSStyleSheet.d.ts.map +1 -0
- package/types/StyleSheet/dom/createOrderedCSSStyleSheet.d.ts +29 -0
- package/types/StyleSheet/dom/createOrderedCSSStyleSheet.d.ts.map +1 -0
- package/types/StyleSheet/dom/index.d.ts +15 -0
- package/types/StyleSheet/dom/index.d.ts.map +1 -0
- package/types/StyleSheet/index.d.ts +69 -0
- package/types/StyleSheet/index.d.ts.map +1 -0
- package/types/StyleSheet/preprocess.d.ts +16 -0
- package/types/StyleSheet/preprocess.d.ts.map +1 -0
- package/types/StyleSheet/validate.d.ts +10 -0
- package/types/StyleSheet/validate.d.ts.map +1 -0
- package/types/TextAncestorContext.d.ts +11 -0
- package/types/TextAncestorContext.d.ts.map +1 -0
- package/types/colorProps.d.ts +13 -0
- package/types/colorProps.d.ts.map +1 -0
- package/types/index.d.ts +45 -0
- package/types/index.d.ts.map +1 -0
- package/types/modules/AccessibilityUtil/index.d.ts +16 -0
- package/types/modules/AccessibilityUtil/index.d.ts.map +1 -0
- package/types/modules/AccessibilityUtil/isDisabled.d.ts +10 -0
- package/types/modules/AccessibilityUtil/isDisabled.d.ts.map +1 -0
- package/types/modules/AccessibilityUtil/propsToAccessibilityComponent.d.ts +10 -0
- package/types/modules/AccessibilityUtil/propsToAccessibilityComponent.d.ts.map +1 -0
- package/types/modules/AccessibilityUtil/propsToAriaRole.d.ts +12 -0
- package/types/modules/AccessibilityUtil/propsToAriaRole.d.ts.map +1 -0
- package/types/modules/AssetRegistry/index.d.ts +22 -0
- package/types/modules/AssetRegistry/index.d.ts.map +1 -0
- package/types/modules/ImageLoader/index.d.ts +27 -0
- package/types/modules/ImageLoader/index.d.ts.map +1 -0
- package/types/modules/InteractionManager.d.ts +48 -0
- package/types/modules/InteractionManager.d.ts.map +1 -0
- package/types/modules/Platform/index.d.ts +15 -0
- package/types/modules/Platform/index.d.ts.map +1 -0
- package/types/modules/TextInputState/index.d.ts +38 -0
- package/types/modules/TextInputState/index.d.ts.map +1 -0
- package/types/modules/UIManager/index.d.ts +23 -0
- package/types/modules/UIManager/index.d.ts.map +1 -0
- package/types/modules/canUseDOM.d.ts +10 -0
- package/types/modules/canUseDOM.d.ts.map +1 -0
- package/types/modules/createDOMProps/index.d.ts +12 -0
- package/types/modules/createDOMProps/index.d.ts.map +1 -0
- package/types/modules/createEventHandle/index.d.ts +20 -0
- package/types/modules/createEventHandle/index.d.ts.map +1 -0
- package/types/modules/dismissKeyboard/index.d.ts +10 -0
- package/types/modules/dismissKeyboard/index.d.ts.map +1 -0
- package/types/modules/forwardedProps/index.d.ts +383 -0
- package/types/modules/forwardedProps/index.d.ts.map +1 -0
- package/types/modules/getBoundingClientRect/index.d.ts +10 -0
- package/types/modules/getBoundingClientRect/index.d.ts.map +1 -0
- package/types/modules/invariant.d.ts +3 -0
- package/types/modules/invariant.d.ts.map +1 -0
- package/types/modules/isSelectionValid/index.d.ts +10 -0
- package/types/modules/isSelectionValid/index.d.ts.map +1 -0
- package/types/modules/isWebColor/index.d.ts +10 -0
- package/types/modules/isWebColor/index.d.ts.map +1 -0
- package/types/modules/mergeRefs/index.d.ts +11 -0
- package/types/modules/mergeRefs/index.d.ts.map +1 -0
- package/types/modules/modality/index.d.ts +17 -0
- package/types/modules/modality/index.d.ts.map +1 -0
- package/types/modules/multiplyStyleLengthValue/index.d.ts +10 -0
- package/types/modules/multiplyStyleLengthValue/index.d.ts.map +1 -0
- package/types/modules/normalizeColor/index.d.ts +10 -0
- package/types/modules/normalizeColor/index.d.ts.map +1 -0
- package/types/modules/pick/index.d.ts +12 -0
- package/types/modules/pick/index.d.ts.map +1 -0
- package/types/modules/processColor/index.d.ts +11 -0
- package/types/modules/processColor/index.d.ts.map +1 -0
- package/types/modules/requestIdleCallback/index.d.ts +3 -0
- package/types/modules/requestIdleCallback/index.d.ts.map +1 -0
- package/types/modules/setValueForStyles/dangerousStyleValue.d.ts +11 -0
- package/types/modules/setValueForStyles/dangerousStyleValue.d.ts.map +1 -0
- package/types/modules/setValueForStyles/index.d.ts +9 -0
- package/types/modules/setValueForStyles/index.d.ts.map +1 -0
- package/types/modules/unitlessNumbers/index.d.ts +60 -0
- package/types/modules/unitlessNumbers/index.d.ts.map +1 -0
- package/types/modules/useElementLayout/index.d.ts +4 -0
- package/types/modules/useElementLayout/index.d.ts.map +1 -0
- package/types/modules/useEvent/index.d.ts +24 -0
- package/types/modules/useEvent/index.d.ts.map +1 -0
- package/types/modules/useHover/index.d.ts +21 -0
- package/types/modules/useHover/index.d.ts.map +1 -0
- package/types/modules/useLayoutEffect/index.d.ts +13 -0
- package/types/modules/useLayoutEffect/index.d.ts.map +1 -0
- package/types/modules/useLocale/index.d.ts +14 -0
- package/types/modules/useLocale/index.d.ts.map +1 -0
- package/types/modules/useLocale/isLocaleRTL.d.ts +13 -0
- package/types/modules/useLocale/isLocaleRTL.d.ts.map +1 -0
- package/types/modules/useMergeRefs/index.d.ts +11 -0
- package/types/modules/useMergeRefs/index.d.ts.map +1 -0
- package/types/modules/usePlatformMethods/index.d.ts +18 -0
- package/types/modules/usePlatformMethods/index.d.ts.map +1 -0
- package/types/modules/useStable/index.d.ts +10 -0
- package/types/modules/useStable/index.d.ts.map +1 -0
- package/types/styleTypes.d.ts +211 -0
- package/types/styleTypes.d.ts.map +1 -0
- package/types/types.d.ts +46 -0
- package/types/types.d.ts.map +1 -0
|
@@ -0,0 +1,110 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var createOrderedCSSStyleSheet_exports = {};
|
|
22
|
+
__export(createOrderedCSSStyleSheet_exports, {
|
|
23
|
+
createOrderedCSSStyleSheet: () => createOrderedCSSStyleSheet
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(createOrderedCSSStyleSheet_exports);
|
|
26
|
+
const slice = Array.prototype.slice;
|
|
27
|
+
function createOrderedCSSStyleSheet(sheet) {
|
|
28
|
+
const groups = {},
|
|
29
|
+
selectors = {};
|
|
30
|
+
if (sheet != null) {
|
|
31
|
+
let group;
|
|
32
|
+
slice.call(sheet.cssRules).forEach((cssRule, i) => {
|
|
33
|
+
const cssText = cssRule.cssText;
|
|
34
|
+
if (cssText.indexOf("stylesheet-group") > -1) group = decodeGroupRule(cssRule), groups[group] = {
|
|
35
|
+
start: i,
|
|
36
|
+
rules: [cssText]
|
|
37
|
+
};else {
|
|
38
|
+
const selectorText = getSelectorText(cssText);
|
|
39
|
+
selectorText != null && (selectors[selectorText] = !0, groups[group].rules.push(cssText));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function sheetInsert(sheet2, group, text) {
|
|
44
|
+
const orderedGroups = getOrderedGroups(groups),
|
|
45
|
+
nextGroupIndex = orderedGroups.indexOf(group) + 1,
|
|
46
|
+
nextGroup = orderedGroups[nextGroupIndex],
|
|
47
|
+
position = nextGroup != null && groups[nextGroup].start != null ? groups[nextGroup].start : sheet2.cssRules.length,
|
|
48
|
+
isInserted = insertRuleAt(sheet2, text, position);
|
|
49
|
+
if (isInserted) {
|
|
50
|
+
groups[group].start == null && (groups[group].start = position);
|
|
51
|
+
for (let i = nextGroupIndex; i < orderedGroups.length; i += 1) {
|
|
52
|
+
const groupNumber = orderedGroups[i],
|
|
53
|
+
previousStart = groups[groupNumber].start || 0;
|
|
54
|
+
groups[groupNumber].start = previousStart + 1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return isInserted;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
/**
|
|
61
|
+
* The textContent of the style sheet.
|
|
62
|
+
*/
|
|
63
|
+
getTextContent() {
|
|
64
|
+
return getOrderedGroups(groups).map(group => {
|
|
65
|
+
const rules = groups[group].rules,
|
|
66
|
+
marker = rules.shift();
|
|
67
|
+
return rules.sort(), rules.unshift(marker), rules.join(`
|
|
68
|
+
`);
|
|
69
|
+
}).join(`
|
|
70
|
+
`);
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* Insert a rule into the style sheet
|
|
74
|
+
*/
|
|
75
|
+
insert(cssText, groupValue) {
|
|
76
|
+
const group = Number(groupValue);
|
|
77
|
+
if (groups[group] == null) {
|
|
78
|
+
const markerRule = encodeGroupRule(group);
|
|
79
|
+
groups[group] = {
|
|
80
|
+
start: null,
|
|
81
|
+
rules: [markerRule]
|
|
82
|
+
}, sheet != null && sheetInsert(sheet, group, markerRule);
|
|
83
|
+
}
|
|
84
|
+
const selectorText = getSelectorText(cssText);
|
|
85
|
+
selectorText != null && selectors[selectorText] == null && (selectors[selectorText] = !0, groups[group].rules.push(cssText), sheet != null && (sheetInsert(sheet, group, cssText) || groups[group].rules.pop()));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function encodeGroupRule(group) {
|
|
90
|
+
return `[stylesheet-group="${group}"]{}`;
|
|
91
|
+
}
|
|
92
|
+
const groupPattern = /["']/g;
|
|
93
|
+
function decodeGroupRule(cssRule) {
|
|
94
|
+
return Number(cssRule.selectorText.split(groupPattern)[1]);
|
|
95
|
+
}
|
|
96
|
+
function getOrderedGroups(obj) {
|
|
97
|
+
return Object.keys(obj).map(Number).sort((a, b) => a > b ? 1 : -1);
|
|
98
|
+
}
|
|
99
|
+
const selectorPattern = /\s*([,])\s*/g;
|
|
100
|
+
function getSelectorText(cssText) {
|
|
101
|
+
const selector = cssText.split("{")[0].trim();
|
|
102
|
+
return selector !== "" ? selector.replace(selectorPattern, "$1") : null;
|
|
103
|
+
}
|
|
104
|
+
function insertRuleAt(root, cssText, position) {
|
|
105
|
+
try {
|
|
106
|
+
return root.insertRule(cssText, position), !0;
|
|
107
|
+
} catch {
|
|
108
|
+
return !1;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var dom_exports = {};
|
|
22
|
+
__export(dom_exports, {
|
|
23
|
+
createSheet: () => createSheet
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(dom_exports);
|
|
26
|
+
var import_canUseDOM = require("../../modules/canUseDOM.cjs"),
|
|
27
|
+
import_createCSSStyleSheet = require("./createCSSStyleSheet.cjs"),
|
|
28
|
+
import_createOrderedCSSStyleSheet = require("./createOrderedCSSStyleSheet.cjs");
|
|
29
|
+
const defaultId = "react-native-stylesheet",
|
|
30
|
+
roots = /* @__PURE__ */new WeakMap(),
|
|
31
|
+
sheets = [],
|
|
32
|
+
initialRules = [
|
|
33
|
+
// minimal top-level reset
|
|
34
|
+
"html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}", "body{margin:0;}",
|
|
35
|
+
// minimal form pseudo-element reset
|
|
36
|
+
"button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}", "input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"];
|
|
37
|
+
function createSheet(root, id = defaultId) {
|
|
38
|
+
let sheet;
|
|
39
|
+
function createSheet2() {
|
|
40
|
+
if (!sheet) if (import_canUseDOM.canUseDOM) {
|
|
41
|
+
const rootNode = root != null ? root.getRootNode() : document;
|
|
42
|
+
if (sheets.length === 0) sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id)), initialRules.forEach(rule => {
|
|
43
|
+
sheet.insert(rule, 0);
|
|
44
|
+
}), roots.set(rootNode, sheets.length), sheets.push(sheet);else {
|
|
45
|
+
const index = roots.get(rootNode);
|
|
46
|
+
if (index == null) {
|
|
47
|
+
const initialSheet = sheets[0],
|
|
48
|
+
textContent = initialSheet != null ? initialSheet.getTextContent() : "";
|
|
49
|
+
sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id, rootNode, textContent)), roots.set(rootNode, sheets.length), sheets.push(sheet);
|
|
50
|
+
} else sheet = sheets[index];
|
|
51
|
+
}
|
|
52
|
+
} else sheets.length === 0 ? (sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id)), initialRules.forEach(rule => {
|
|
53
|
+
sheet.insert(rule, 0);
|
|
54
|
+
}), sheets.push(sheet)) : sheet = sheets[0];
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
getTextContent() {
|
|
58
|
+
return createSheet2(), sheet.getTextContent();
|
|
59
|
+
},
|
|
60
|
+
id,
|
|
61
|
+
insert(cssText, groupValue) {
|
|
62
|
+
createSheet2(), sheets.forEach(s => {
|
|
63
|
+
s.insert(cssText, groupValue);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var StyleSheet_exports = {};
|
|
22
|
+
__export(StyleSheet_exports, {
|
|
23
|
+
StyleSheet: () => StyleSheet,
|
|
24
|
+
flatten: () => flatten
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(StyleSheet_exports);
|
|
27
|
+
const absoluteFillObject = {
|
|
28
|
+
position: "absolute",
|
|
29
|
+
left: 0,
|
|
30
|
+
right: 0,
|
|
31
|
+
top: 0,
|
|
32
|
+
bottom: 0
|
|
33
|
+
},
|
|
34
|
+
absoluteFill = absoluteFillObject;
|
|
35
|
+
function create(styles) {
|
|
36
|
+
return styles;
|
|
37
|
+
}
|
|
38
|
+
function compose(style1, style2) {
|
|
39
|
+
return flatten(style1, style2);
|
|
40
|
+
}
|
|
41
|
+
function flatten(...styles) {
|
|
42
|
+
return styles.flat().flat().flat().flat().reduce((acc, cur) => (cur && Object.assign(acc, cur), acc), {});
|
|
43
|
+
}
|
|
44
|
+
function getSheet() {
|
|
45
|
+
return {
|
|
46
|
+
id: "",
|
|
47
|
+
textContent: sheet.getTextContent()
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function StyleSheet(styles, options) {}
|
|
51
|
+
StyleSheet.absoluteFill = absoluteFill;
|
|
52
|
+
StyleSheet.absoluteFillObject = absoluteFillObject;
|
|
53
|
+
StyleSheet.create = create;
|
|
54
|
+
StyleSheet.compose = compose;
|
|
55
|
+
StyleSheet.flatten = flatten;
|
|
56
|
+
StyleSheet.getSheet = getSheet;
|
|
57
|
+
StyleSheet.hairlineWidth = 1;
|
|
@@ -0,0 +1,101 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var preprocess_exports = {};
|
|
22
|
+
__export(preprocess_exports, {
|
|
23
|
+
createBoxShadowValue: () => createBoxShadowValue,
|
|
24
|
+
createTextShadowValue: () => createTextShadowValue,
|
|
25
|
+
preprocess: () => preprocess,
|
|
26
|
+
processStyle: () => processStyle
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(preprocess_exports);
|
|
29
|
+
var import_normalizeColor = require("./compiler/normalizeColor.cjs"),
|
|
30
|
+
import_normalizeValueWithProperty = require("./compiler/normalizeValueWithProperty.cjs");
|
|
31
|
+
const emptyObject = {},
|
|
32
|
+
defaultOffset = {
|
|
33
|
+
height: 0,
|
|
34
|
+
width: 0
|
|
35
|
+
},
|
|
36
|
+
createBoxShadowValue = style => {
|
|
37
|
+
const {
|
|
38
|
+
shadowColor,
|
|
39
|
+
shadowOffset,
|
|
40
|
+
shadowOpacity,
|
|
41
|
+
shadowRadius
|
|
42
|
+
} = style,
|
|
43
|
+
{
|
|
44
|
+
height,
|
|
45
|
+
width
|
|
46
|
+
} = shadowOffset || defaultOffset,
|
|
47
|
+
offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width),
|
|
48
|
+
offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height),
|
|
49
|
+
blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0),
|
|
50
|
+
color = (0, import_normalizeColor.normalizeColor)(shadowColor || "black", shadowOpacity);
|
|
51
|
+
if (color != null && offsetX != null && offsetY != null && blurRadius != null) return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
|
|
52
|
+
},
|
|
53
|
+
createTextShadowValue = style => {
|
|
54
|
+
const {
|
|
55
|
+
textShadowColor,
|
|
56
|
+
textShadowOffset,
|
|
57
|
+
textShadowRadius
|
|
58
|
+
} = style,
|
|
59
|
+
{
|
|
60
|
+
height,
|
|
61
|
+
width
|
|
62
|
+
} = textShadowOffset || defaultOffset,
|
|
63
|
+
radius = textShadowRadius || 0,
|
|
64
|
+
offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width),
|
|
65
|
+
offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height),
|
|
66
|
+
blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(radius),
|
|
67
|
+
color = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(textShadowColor, "textShadowColor");
|
|
68
|
+
if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
|
|
69
|
+
},
|
|
70
|
+
preprocess = originalStyle => {
|
|
71
|
+
const style = originalStyle || emptyObject,
|
|
72
|
+
nextStyle = {};
|
|
73
|
+
for (const originalProp in style) {
|
|
74
|
+
const originalValue = style[originalProp];
|
|
75
|
+
let prop = originalProp,
|
|
76
|
+
value = originalValue;
|
|
77
|
+
if (!(!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null)) {
|
|
78
|
+
if (prop === "shadowColor" || prop === "shadowOffset" || prop === "shadowOpacity" || prop === "shadowRadius") {
|
|
79
|
+
const boxShadowValue = createBoxShadowValue(style);
|
|
80
|
+
if (boxShadowValue != null && nextStyle.boxShadow == null) {
|
|
81
|
+
const {
|
|
82
|
+
boxShadow
|
|
83
|
+
} = style;
|
|
84
|
+
prop = "boxShadow", value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;
|
|
85
|
+
} else continue;
|
|
86
|
+
}
|
|
87
|
+
if (prop === "textShadowColor" || prop === "textShadowOffset" || prop === "textShadowRadius") {
|
|
88
|
+
const textShadowValue = createTextShadowValue(style);
|
|
89
|
+
if (textShadowValue != null && nextStyle.textShadow == null) {
|
|
90
|
+
const {
|
|
91
|
+
textShadow
|
|
92
|
+
} = style;
|
|
93
|
+
prop = "textShadow", value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;
|
|
94
|
+
} else continue;
|
|
95
|
+
}
|
|
96
|
+
nextStyle[prop] = value;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return nextStyle;
|
|
100
|
+
},
|
|
101
|
+
processStyle = preprocess;
|
|
@@ -0,0 +1,69 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var validate_exports = {};
|
|
22
|
+
__export(validate_exports, {
|
|
23
|
+
validate: () => validate
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(validate_exports);
|
|
26
|
+
const invalidShortforms = {
|
|
27
|
+
background: !0,
|
|
28
|
+
borderBottom: !0,
|
|
29
|
+
borderLeft: !0,
|
|
30
|
+
borderRight: !0,
|
|
31
|
+
borderTop: !0,
|
|
32
|
+
font: !0,
|
|
33
|
+
grid: !0,
|
|
34
|
+
outline: !0,
|
|
35
|
+
textDecoration: !0
|
|
36
|
+
},
|
|
37
|
+
invalidMultiValueShortforms = {
|
|
38
|
+
flex: !0,
|
|
39
|
+
margin: !0,
|
|
40
|
+
padding: !0,
|
|
41
|
+
borderColor: !0,
|
|
42
|
+
borderRadius: !0,
|
|
43
|
+
borderStyle: !0,
|
|
44
|
+
borderWidth: !0,
|
|
45
|
+
marginHorizontal: !0,
|
|
46
|
+
marginVertical: !0,
|
|
47
|
+
paddingHorizontal: !0,
|
|
48
|
+
paddingVertical: !0,
|
|
49
|
+
overflow: !0,
|
|
50
|
+
overscrollBehavior: !0,
|
|
51
|
+
backgroundPosition: !0
|
|
52
|
+
};
|
|
53
|
+
function error(message) {
|
|
54
|
+
console.error(message);
|
|
55
|
+
}
|
|
56
|
+
function validate(obj) {
|
|
57
|
+
for (const k in obj) {
|
|
58
|
+
const prop = k.trim(),
|
|
59
|
+
value = obj[prop];
|
|
60
|
+
let isInvalid = !1;
|
|
61
|
+
if (value !== null) {
|
|
62
|
+
if (typeof value == "string" && value.indexOf("!important") > -1) error(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`), isInvalid = !0;else {
|
|
63
|
+
let suggestion = "";
|
|
64
|
+
prop === "animation" || prop === "animationName" ? (suggestion = 'Did you mean "animationKeyframes"?', isInvalid = !0) : prop === "direction" ? (suggestion = 'Did you mean "writingDirection"?', isInvalid = !0) : prop === "verticalAlign" ? (suggestion = 'Did you mean "textAlignVertical"?', isInvalid = !0) : invalidShortforms[prop] ? (suggestion = "Please use long-form properties.", isInvalid = !0) : invalidMultiValueShortforms[prop], suggestion !== "" && error(`Invalid style property of "${prop}". ${suggestion}`);
|
|
65
|
+
}
|
|
66
|
+
isInvalid && delete obj[k];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var TextAncestorContext_exports = {};
|
|
22
|
+
__export(TextAncestorContext_exports, {
|
|
23
|
+
TextAncestorContext: () => TextAncestorContext
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(TextAncestorContext_exports);
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
const TextAncestorContext = (0, import_react.createContext)(!1);
|
|
@@ -0,0 +1,37 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var colorProps_exports = {};
|
|
22
|
+
__export(colorProps_exports, {
|
|
23
|
+
colorProps: () => colorProps
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(colorProps_exports);
|
|
26
|
+
const colorProps = {
|
|
27
|
+
backgroundColor: !0,
|
|
28
|
+
borderColor: !0,
|
|
29
|
+
borderTopColor: !0,
|
|
30
|
+
borderRightColor: !0,
|
|
31
|
+
borderBottomColor: !0,
|
|
32
|
+
borderLeftColor: !0,
|
|
33
|
+
color: !0,
|
|
34
|
+
shadowColor: !0,
|
|
35
|
+
textDecorationColor: !0,
|
|
36
|
+
textShadowColor: !0
|
|
37
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
},
|
|
18
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
20
|
+
value: !0
|
|
21
|
+
}), mod);
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
|
+
AccessibilityUtil: () => import_AccessibilityUtil.AccessibilityUtil,
|
|
25
|
+
ImageLoader: () => import_ImageLoader.ImageLoader,
|
|
26
|
+
InteractionManager: () => import_InteractionManager.InteractionManager,
|
|
27
|
+
Platform: () => import_Platform.Platform,
|
|
28
|
+
StyleSheet: () => import_StyleSheet2.StyleSheet,
|
|
29
|
+
TextAncestorContext: () => import_TextAncestorContext.TextAncestorContext,
|
|
30
|
+
TextInputState: () => import_TextInputState.TextInputState,
|
|
31
|
+
UIManager: () => import_UIManager.UIManager,
|
|
32
|
+
canUseDOM: () => import_canUseDOM.canUseDOM,
|
|
33
|
+
colorProps: () => import_colorProps.colorProps,
|
|
34
|
+
createDOMProps: () => import_createDOMProps.createDOMProps,
|
|
35
|
+
createEventHandle: () => import_createEventHandle.createEventHandle,
|
|
36
|
+
createReactDOMStyle: () => import_createReactDOMStyle.createReactDOMStyle,
|
|
37
|
+
createSheet: () => import_dom.createSheet,
|
|
38
|
+
createTransformValue: () => import_createReactDOMStyle.createTransformValue,
|
|
39
|
+
dismissKeyboard: () => import_dismissKeyboard.dismissKeyboard,
|
|
40
|
+
flattenStyle: () => import_StyleSheet.flatten,
|
|
41
|
+
getBoundingClientRect: () => import_getBoundingClientRect.getBoundingClientRect,
|
|
42
|
+
isSelectionValid: () => import_isSelectionValid.isSelectionValid,
|
|
43
|
+
isWebColor: () => import_isWebColor.isWebColor,
|
|
44
|
+
multiplyStyleLengthValue: () => import_multiplyStyleLengthValue.multiplyStyleLengthValue,
|
|
45
|
+
normalizeColor: () => import_normalizeColor.normalizeColor,
|
|
46
|
+
pick: () => import_pick.pick,
|
|
47
|
+
processColor: () => import_processColor.processColor,
|
|
48
|
+
requestIdleCallback: () => import_requestIdleCallback.requestIdleCallback,
|
|
49
|
+
setValueForStyles: () => import_setValueForStyles.setValueForStyles,
|
|
50
|
+
stylesFromProps: () => import_createDOMProps2.stylesFromProps,
|
|
51
|
+
unitlessNumbers: () => import_unitlessNumbers.unitlessNumbers,
|
|
52
|
+
useElementLayout: () => import_useElementLayout.useElementLayout,
|
|
53
|
+
useEvent: () => import_useEvent.useEvent,
|
|
54
|
+
useHover: () => import_useHover.useHover,
|
|
55
|
+
useLayoutEffect: () => import_useLayoutEffect.useLayoutEffectImpl,
|
|
56
|
+
useMergeRefs: () => import_useMergeRefs.useMergeRefs,
|
|
57
|
+
usePlatformMethods: () => import_usePlatformMethods.usePlatformMethods,
|
|
58
|
+
useStable: () => import_useStable.useStable
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(index_exports);
|
|
61
|
+
__reExport(index_exports, require("./modules/AssetRegistry/index.cjs"), module.exports);
|
|
62
|
+
__reExport(index_exports, require("./modules/forwardedProps/index.cjs"), module.exports);
|
|
63
|
+
__reExport(index_exports, require("./modules/mergeRefs/index.cjs"), module.exports);
|
|
64
|
+
__reExport(index_exports, require("./modules/modality/index.cjs"), module.exports);
|
|
65
|
+
__reExport(index_exports, require("./modules/useLocale/index.cjs"), module.exports);
|
|
66
|
+
var import_usePlatformMethods = require("./modules/usePlatformMethods/index.cjs"),
|
|
67
|
+
import_TextAncestorContext = require("./TextAncestorContext.cjs");
|
|
68
|
+
__reExport(index_exports, require("@hanzogui/react-native-use-pressable"), module.exports);
|
|
69
|
+
__reExport(index_exports, require("@hanzogui/react-native-use-responder-events"), module.exports);
|
|
70
|
+
var import_colorProps = require("./colorProps.cjs"),
|
|
71
|
+
import_AccessibilityUtil = require("./modules/AccessibilityUtil/index.cjs"),
|
|
72
|
+
import_canUseDOM = require("./modules/canUseDOM.cjs"),
|
|
73
|
+
import_createDOMProps = require("./modules/createDOMProps/index.cjs"),
|
|
74
|
+
import_createDOMProps2 = require("./modules/createDOMProps/index.cjs"),
|
|
75
|
+
import_createReactDOMStyle = require("./StyleSheet/compiler/createReactDOMStyle.cjs"),
|
|
76
|
+
import_createEventHandle = require("./modules/createEventHandle/index.cjs"),
|
|
77
|
+
import_dismissKeyboard = require("./modules/dismissKeyboard/index.cjs"),
|
|
78
|
+
import_getBoundingClientRect = require("./modules/getBoundingClientRect/index.cjs"),
|
|
79
|
+
import_ImageLoader = require("./modules/ImageLoader/index.cjs"),
|
|
80
|
+
import_isSelectionValid = require("./modules/isSelectionValid/index.cjs"),
|
|
81
|
+
import_isWebColor = require("./modules/isWebColor/index.cjs"),
|
|
82
|
+
import_multiplyStyleLengthValue = require("./modules/multiplyStyleLengthValue/index.cjs"),
|
|
83
|
+
import_normalizeColor = require("./modules/normalizeColor/index.cjs"),
|
|
84
|
+
import_pick = require("./modules/pick/index.cjs"),
|
|
85
|
+
import_Platform = require("./modules/Platform/index.cjs");
|
|
86
|
+
__reExport(index_exports, require("./StyleSheet/preprocess.cjs"), module.exports);
|
|
87
|
+
var import_StyleSheet = require("./StyleSheet/index.cjs"),
|
|
88
|
+
import_dom = require("./StyleSheet/dom/index.cjs"),
|
|
89
|
+
import_requestIdleCallback = require("./modules/requestIdleCallback/index.cjs"),
|
|
90
|
+
import_setValueForStyles = require("./modules/setValueForStyles/index.cjs"),
|
|
91
|
+
import_TextInputState = require("./modules/TextInputState/index.cjs"),
|
|
92
|
+
import_UIManager = require("./modules/UIManager/index.cjs"),
|
|
93
|
+
import_unitlessNumbers = require("./modules/unitlessNumbers/index.cjs"),
|
|
94
|
+
import_useElementLayout = require("./modules/useElementLayout/index.cjs"),
|
|
95
|
+
import_useEvent = require("./modules/useEvent/index.cjs"),
|
|
96
|
+
import_useHover = require("./modules/useHover/index.cjs"),
|
|
97
|
+
import_useLayoutEffect = require("./modules/useLayoutEffect/index.cjs"),
|
|
98
|
+
import_useStable = require("./modules/useStable/index.cjs"),
|
|
99
|
+
import_InteractionManager = require("./modules/InteractionManager.cjs");
|
|
100
|
+
__reExport(index_exports, require("./modules/invariant.cjs"), module.exports);
|
|
101
|
+
var import_processColor = require("./modules/processColor/index.cjs"),
|
|
102
|
+
import_StyleSheet2 = require("./StyleSheet/index.cjs"),
|
|
103
|
+
import_useMergeRefs = require("./modules/useMergeRefs/index.cjs");
|
|
@@ -0,0 +1,50 @@
|
|
|
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,
|
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
15
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
16
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
17
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
18
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
19
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: !0
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
var import_propsToAccessibilityComponent = __toESM(require("../propsToAccessibilityComponent.cjs"), 1);
|
|
24
|
+
describe("modules/AccessibilityUtil/propsToAccessibilityComponent", () => {
|
|
25
|
+
test('when missing accessibility props"', () => {
|
|
26
|
+
expect((0, import_propsToAccessibilityComponent.default)({})).toBeUndefined();
|
|
27
|
+
}), test('when "accessibilityRole" is "button"', () => {
|
|
28
|
+
expect((0, import_propsToAccessibilityComponent.default)({
|
|
29
|
+
accessibilityRole: "button"
|
|
30
|
+
})).toBeUndefined();
|
|
31
|
+
}), test('when "accessibilityRole" is "heading"', () => {
|
|
32
|
+
expect((0, import_propsToAccessibilityComponent.default)({
|
|
33
|
+
accessibilityRole: "heading"
|
|
34
|
+
})).toEqual("h1");
|
|
35
|
+
}), test('when "accessibilityRole" is "heading" and "aria-level" is set', () => {
|
|
36
|
+
expect((0, import_propsToAccessibilityComponent.default)({
|
|
37
|
+
accessibilityRole: "heading",
|
|
38
|
+
"aria-level": 3
|
|
39
|
+
})).toEqual("h3");
|
|
40
|
+
}), test('when "accessibilityRole" is "heading" and "accessibilityLevel" is set', () => {
|
|
41
|
+
expect((0, import_propsToAccessibilityComponent.default)({
|
|
42
|
+
accessibilityRole: "heading",
|
|
43
|
+
accessibilityLevel: 3
|
|
44
|
+
})).toEqual("h3");
|
|
45
|
+
}), test('when "accessibilityRole" is "label"', () => {
|
|
46
|
+
expect((0, import_propsToAccessibilityComponent.default)({
|
|
47
|
+
accessibilityRole: "label"
|
|
48
|
+
})).toEqual("label");
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
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,
|
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
15
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
16
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
17
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
18
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
19
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: !0
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
var import_propsToAriaRole = __toESM(require("../propsToAriaRole.cjs"), 1);
|
|
24
|
+
describe("modules/AccessibilityUtil/propsToAriaRole", () => {
|
|
25
|
+
test("when missing accessibility props", () => {
|
|
26
|
+
expect((0, import_propsToAriaRole.default)({})).toBeUndefined();
|
|
27
|
+
}), test('when "accessibilityRole" is defined', () => {
|
|
28
|
+
expect((0, import_propsToAriaRole.default)({
|
|
29
|
+
accessibilityRole: "banner"
|
|
30
|
+
})).toEqual("banner");
|
|
31
|
+
}), test('when "accessibilityRole" is a native-only value', () => {
|
|
32
|
+
expect((0, import_propsToAriaRole.default)({
|
|
33
|
+
accessibilityRole: "none"
|
|
34
|
+
})).toEqual("presentation"), expect((0, import_propsToAriaRole.default)({
|
|
35
|
+
accessibilityRole: "imagebutton"
|
|
36
|
+
})).toEqual(void 0), expect((0, import_propsToAriaRole.default)({
|
|
37
|
+
accessibilityRole: "label"
|
|
38
|
+
})).toEqual(void 0);
|
|
39
|
+
});
|
|
40
|
+
});
|