@tamagui/core 1.0.1-beta.74 → 1.0.1-beta.77
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/Pressability.js +0 -0
- package/dist/cjs/Pressability.js.map +0 -0
- package/dist/cjs/Pressability.native.js +0 -0
- package/dist/cjs/Pressability.native.js.map +0 -0
- package/dist/cjs/Tamagui.js +0 -0
- package/dist/cjs/Tamagui.js.map +0 -0
- package/dist/cjs/ThemeContext.js +0 -0
- package/dist/cjs/ThemeContext.js.map +0 -0
- package/dist/cjs/ThemeManager.js +0 -0
- package/dist/cjs/ThemeManager.js.map +0 -0
- package/dist/cjs/conf.js +0 -0
- package/dist/cjs/conf.js.map +0 -0
- package/dist/cjs/constants/constants.js +0 -0
- package/dist/cjs/constants/constants.js.map +0 -0
- package/dist/cjs/constants/platform.js +0 -0
- package/dist/cjs/constants/platform.js.map +0 -0
- package/dist/cjs/constants/rnw.js +0 -0
- package/dist/cjs/constants/rnw.js.map +0 -0
- package/dist/cjs/contexts/ButtonInsideButtonContext.js +0 -0
- package/dist/cjs/contexts/ButtonInsideButtonContext.js.map +0 -0
- package/dist/cjs/createComponent.js +11 -9
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createFont.js +0 -0
- package/dist/cjs/createFont.js.map +1 -1
- package/dist/cjs/createShorthands.js +0 -0
- package/dist/cjs/createShorthands.js.map +0 -0
- package/dist/cjs/createTamagui.js +2 -2
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createTheme.js +0 -0
- package/dist/cjs/createTheme.js.map +0 -0
- package/dist/cjs/createTokens.js +0 -0
- package/dist/cjs/createTokens.js.map +0 -0
- package/dist/cjs/createVariable.js +9 -1
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/createVariables.js +0 -0
- package/dist/cjs/createVariables.js.map +0 -0
- package/dist/cjs/defaultComponentState.js +0 -0
- package/dist/cjs/defaultComponentState.js.map +0 -0
- package/dist/cjs/helpers/RNComponents.js +0 -0
- package/dist/cjs/helpers/RNComponents.js.map +0 -0
- package/dist/cjs/helpers/areEqualSets.js +0 -0
- package/dist/cjs/helpers/areEqualSets.js.map +0 -0
- package/dist/cjs/helpers/calc.js +0 -0
- package/dist/cjs/helpers/calc.js.map +0 -0
- package/dist/cjs/helpers/createMediaStyle.js +0 -0
- package/dist/cjs/helpers/createMediaStyle.js.map +0 -0
- package/dist/cjs/helpers/createPropMapper.js +3 -1
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/createShallowUpdate.js +0 -0
- package/dist/cjs/helpers/createShallowUpdate.js.map +0 -0
- package/dist/cjs/helpers/createTamaguiProvider.js +0 -0
- package/dist/cjs/helpers/createTamaguiProvider.js.map +0 -0
- package/dist/cjs/helpers/extendStaticConfig.js +0 -0
- package/dist/cjs/helpers/extendStaticConfig.js.map +0 -0
- package/dist/cjs/helpers/fixNativeShadow.js +0 -0
- package/dist/cjs/helpers/fixNativeShadow.js.map +0 -0
- package/dist/cjs/helpers/fixNativeShadow.native.js +0 -0
- package/dist/cjs/helpers/fixNativeShadow.native.js.map +0 -0
- package/dist/cjs/helpers/generateAtomicStyles.js +55 -70
- package/dist/cjs/helpers/generateAtomicStyles.js.map +2 -2
- package/dist/cjs/helpers/getExpandedShorthands.js +0 -0
- package/dist/cjs/helpers/getExpandedShorthands.js.map +0 -0
- package/dist/cjs/helpers/getSize.js +0 -0
- package/dist/cjs/helpers/getSize.js.map +0 -0
- package/dist/cjs/helpers/getSplitStyles.js +15 -10
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStackSize.js +0 -0
- package/dist/cjs/helpers/getStackSize.js.map +0 -0
- package/dist/cjs/helpers/getStylesAtomic.js +4 -2
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.native.js +0 -0
- package/dist/cjs/helpers/getStylesAtomic.native.js.map +0 -0
- package/dist/cjs/helpers/getTextSize.js +0 -0
- package/dist/cjs/helpers/getTextSize.js.map +0 -0
- package/dist/cjs/helpers/getVariantExtras.js +0 -0
- package/dist/cjs/helpers/getVariantExtras.js.map +0 -0
- package/dist/cjs/helpers/insertStyleRule.js +12 -10
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/isObj.js +0 -0
- package/dist/cjs/helpers/isObj.js.map +0 -0
- package/dist/cjs/helpers/isTamaguiComponent.js +0 -0
- package/dist/cjs/helpers/isTamaguiComponent.js.map +0 -0
- package/dist/cjs/helpers/isTamaguiElement.js +0 -0
- package/dist/cjs/helpers/isTamaguiElement.js.map +0 -0
- package/dist/cjs/helpers/matchMedia.js +0 -0
- package/dist/cjs/helpers/matchMedia.js.map +0 -0
- package/dist/cjs/helpers/matchMedia.native.js +0 -0
- package/dist/cjs/helpers/matchMedia.native.js.map +0 -0
- package/dist/cjs/helpers/mergeProps.js +0 -0
- package/dist/cjs/helpers/mergeProps.js.map +0 -0
- package/dist/cjs/helpers/mergeTransform.js +0 -0
- package/dist/cjs/helpers/mergeTransform.js.map +0 -0
- package/dist/cjs/helpers/nativeGestureHandler.native.js +0 -0
- package/dist/cjs/helpers/nativeGestureHandler.native.js.map +0 -0
- package/dist/cjs/helpers/proxyThemeVariables.js +0 -0
- package/dist/cjs/helpers/proxyThemeVariables.js.map +0 -0
- package/dist/cjs/helpers/{pseudos.js → pseudoDescriptors.js} +7 -7
- package/dist/cjs/helpers/pseudoDescriptors.js.map +7 -0
- package/dist/cjs/helpers/registerCSSVariable.js +0 -0
- package/dist/cjs/helpers/registerCSSVariable.js.map +0 -0
- package/dist/cjs/helpers/themeable.js +0 -0
- package/dist/cjs/helpers/themeable.js.map +0 -0
- package/dist/cjs/helpers/validate.js +0 -0
- package/dist/cjs/helpers/validate.js.map +0 -0
- package/dist/cjs/helpers/withStaticProperties.js +0 -0
- package/dist/cjs/helpers/withStaticProperties.js.map +0 -0
- package/dist/cjs/helpers/wrapThemeManagerContext.js +0 -0
- package/dist/cjs/helpers/wrapThemeManagerContext.js.map +0 -0
- package/dist/cjs/hooks/useConstant.js +0 -0
- package/dist/cjs/hooks/useConstant.js.map +0 -0
- package/dist/cjs/hooks/useFeatures.js +0 -0
- package/dist/cjs/hooks/useFeatures.js.map +0 -0
- package/dist/cjs/hooks/useId.js +0 -0
- package/dist/cjs/hooks/useId.js.map +0 -0
- package/dist/cjs/hooks/useIsMounted.js +0 -0
- package/dist/cjs/hooks/useIsMounted.js.map +0 -0
- package/dist/cjs/hooks/useIsTouchDevice.js +0 -0
- package/dist/cjs/hooks/useIsTouchDevice.js.map +0 -0
- package/dist/cjs/hooks/useMedia.js +0 -0
- package/dist/cjs/hooks/useMedia.js.map +0 -0
- package/dist/cjs/hooks/usePressable.js +0 -0
- package/dist/cjs/hooks/usePressable.js.map +0 -0
- package/dist/cjs/hooks/usePrevious.js +0 -0
- package/dist/cjs/hooks/usePrevious.js.map +0 -0
- package/dist/cjs/hooks/useTheme.js +0 -0
- package/dist/cjs/hooks/useTheme.js.map +0 -0
- package/dist/cjs/hooks/useUnmountEffect.js +0 -0
- package/dist/cjs/hooks/useUnmountEffect.js.map +0 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/insertFont.js +16 -4
- package/dist/cjs/insertFont.js.map +2 -2
- package/dist/cjs/static.js +1 -1
- package/dist/cjs/static.js.map +2 -2
- package/dist/cjs/styled.js +0 -0
- package/dist/cjs/styled.js.map +0 -0
- package/dist/cjs/types-rnw.js +0 -0
- package/dist/cjs/types-rnw.js.map +0 -0
- package/dist/cjs/types.js +0 -0
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/views/Slot.js +0 -0
- package/dist/cjs/views/Slot.js.map +0 -0
- package/dist/cjs/views/Stack.js +0 -0
- package/dist/cjs/views/Stack.js.map +0 -0
- package/dist/cjs/views/Text.js +0 -0
- package/dist/cjs/views/Text.js.map +0 -0
- package/dist/cjs/views/TextAncestorContext.js +0 -0
- package/dist/cjs/views/TextAncestorContext.js.map +0 -0
- package/dist/cjs/views/Theme.js +0 -0
- package/dist/cjs/views/Theme.js.map +0 -0
- package/dist/cjs/views/ThemeInverse.js +0 -0
- package/dist/cjs/views/ThemeInverse.js.map +0 -0
- package/dist/cjs/views/ThemeProvider.js +0 -0
- package/dist/cjs/views/ThemeProvider.js.map +0 -0
- package/dist/cjs/views/ThemeReset.js +0 -0
- package/dist/cjs/views/ThemeReset.js.map +0 -0
- package/dist/esm/Pressability.js +0 -0
- package/dist/esm/Pressability.js.map +0 -0
- package/dist/esm/Pressability.native.js +0 -0
- package/dist/esm/Pressability.native.js.map +0 -0
- package/dist/esm/Tamagui.js +0 -0
- package/dist/esm/Tamagui.js.map +0 -0
- package/dist/esm/ThemeContext.js +0 -0
- package/dist/esm/ThemeContext.js.map +0 -0
- package/dist/esm/ThemeManager.js +6 -22
- package/dist/esm/ThemeManager.js.map +1 -1
- package/dist/esm/conf.js +0 -0
- package/dist/esm/conf.js.map +0 -0
- package/dist/esm/constants/constants.js +23 -8
- package/dist/esm/constants/constants.js.map +1 -1
- package/dist/esm/constants/platform.js +0 -0
- package/dist/esm/constants/platform.js.map +0 -0
- package/dist/esm/constants/rnw.js +0 -0
- package/dist/esm/constants/rnw.js.map +0 -0
- package/dist/esm/contexts/ButtonInsideButtonContext.js +0 -0
- package/dist/esm/contexts/ButtonInsideButtonContext.js.map +0 -0
- package/dist/esm/createComponent.js +226 -120
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createFont.js +0 -0
- package/dist/esm/createFont.js.map +1 -1
- package/dist/esm/createShorthands.js +0 -0
- package/dist/esm/createShorthands.js.map +0 -0
- package/dist/esm/createTamagui.js +28 -10
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createTheme.js +0 -0
- package/dist/esm/createTheme.js.map +0 -0
- package/dist/esm/createTokens.js +0 -0
- package/dist/esm/createTokens.js.map +0 -0
- package/dist/esm/createVariable.js +9 -1
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/createVariables.js +0 -0
- package/dist/esm/createVariables.js.map +0 -0
- package/dist/esm/defaultComponentState.js +0 -0
- package/dist/esm/defaultComponentState.js.map +0 -0
- package/dist/esm/helpers/RNComponents.js +0 -0
- package/dist/esm/helpers/RNComponents.js.map +0 -0
- package/dist/esm/helpers/areEqualSets.js +0 -0
- package/dist/esm/helpers/areEqualSets.js.map +0 -0
- package/dist/esm/helpers/calc.js +0 -0
- package/dist/esm/helpers/calc.js.map +0 -0
- package/dist/esm/helpers/createMediaStyle.js +0 -0
- package/dist/esm/helpers/createMediaStyle.js.map +0 -0
- package/dist/esm/helpers/createPropMapper.js +20 -5
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/createShallowUpdate.js +17 -1
- package/dist/esm/helpers/createShallowUpdate.js.map +1 -1
- package/dist/esm/helpers/createTamaguiProvider.js +39 -9
- package/dist/esm/helpers/createTamaguiProvider.js.map +1 -1
- package/dist/esm/helpers/extendStaticConfig.js +28 -27
- package/dist/esm/helpers/extendStaticConfig.js.map +1 -1
- package/dist/esm/helpers/fixNativeShadow.js +0 -0
- package/dist/esm/helpers/fixNativeShadow.js.map +0 -0
- package/dist/esm/helpers/fixNativeShadow.native.js +2 -3
- package/dist/esm/helpers/fixNativeShadow.native.js.map +1 -1
- package/dist/esm/helpers/generateAtomicStyles.js +75 -76
- package/dist/esm/helpers/generateAtomicStyles.js.map +2 -2
- package/dist/esm/helpers/getExpandedShorthands.js +0 -0
- package/dist/esm/helpers/getExpandedShorthands.js.map +0 -0
- package/dist/esm/helpers/getSize.js +2 -3
- package/dist/esm/helpers/getSize.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.js +47 -30
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStackSize.js +1 -2
- package/dist/esm/helpers/getStackSize.js.map +1 -1
- package/dist/esm/helpers/getStylesAtomic.js +38 -7
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.js +0 -0
- package/dist/esm/helpers/getStylesAtomic.native.js.map +0 -0
- package/dist/esm/helpers/getTextSize.js +0 -0
- package/dist/esm/helpers/getTextSize.js.map +0 -0
- package/dist/esm/helpers/getVariantExtras.js +0 -0
- package/dist/esm/helpers/getVariantExtras.js.map +0 -0
- package/dist/esm/helpers/insertStyleRule.js +12 -10
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/isObj.js +0 -0
- package/dist/esm/helpers/isObj.js.map +0 -0
- package/dist/esm/helpers/isTamaguiComponent.js +0 -0
- package/dist/esm/helpers/isTamaguiComponent.js.map +0 -0
- package/dist/esm/helpers/isTamaguiElement.js +0 -0
- package/dist/esm/helpers/isTamaguiElement.js.map +0 -0
- package/dist/esm/helpers/matchMedia.js +0 -0
- package/dist/esm/helpers/matchMedia.js.map +0 -0
- package/dist/esm/helpers/matchMedia.native.js +0 -0
- package/dist/esm/helpers/matchMedia.native.js.map +0 -0
- package/dist/esm/helpers/mergeProps.js +0 -0
- package/dist/esm/helpers/mergeProps.js.map +0 -0
- package/dist/esm/helpers/mergeTransform.js +1 -1
- package/dist/esm/helpers/mergeTransform.js.map +1 -1
- package/dist/esm/helpers/nativeGestureHandler.native.js +0 -0
- package/dist/esm/helpers/nativeGestureHandler.native.js.map +0 -0
- package/dist/esm/helpers/proxyThemeVariables.js +0 -0
- package/dist/esm/helpers/proxyThemeVariables.js.map +0 -0
- package/dist/{jsx/helpers/pseudos.js → esm/helpers/pseudoDescriptors.js} +3 -2
- package/dist/esm/helpers/pseudoDescriptors.js.map +7 -0
- package/dist/esm/helpers/registerCSSVariable.js +0 -0
- package/dist/esm/helpers/registerCSSVariable.js.map +0 -0
- package/dist/esm/helpers/themeable.js +33 -2
- package/dist/esm/helpers/themeable.js.map +1 -1
- package/dist/esm/helpers/validate.js +30 -5
- package/dist/esm/helpers/validate.js.map +1 -1
- package/dist/esm/helpers/withStaticProperties.js +0 -0
- package/dist/esm/helpers/withStaticProperties.js.map +0 -0
- package/dist/esm/helpers/wrapThemeManagerContext.js +0 -0
- package/dist/esm/helpers/wrapThemeManagerContext.js.map +0 -0
- package/dist/esm/hooks/useConstant.js +0 -0
- package/dist/esm/hooks/useConstant.js.map +0 -0
- package/dist/esm/hooks/useFeatures.js +40 -8
- package/dist/esm/hooks/useFeatures.js.map +1 -1
- package/dist/esm/hooks/useId.js +2 -3
- package/dist/esm/hooks/useId.js.map +1 -1
- package/dist/esm/hooks/useIsMounted.js +0 -0
- package/dist/esm/hooks/useIsMounted.js.map +0 -0
- package/dist/esm/hooks/useIsTouchDevice.js +0 -0
- package/dist/esm/hooks/useIsTouchDevice.js.map +0 -0
- package/dist/esm/hooks/useMedia.js +18 -6
- package/dist/esm/hooks/useMedia.js.map +1 -1
- package/dist/esm/hooks/usePressable.js +16 -1
- package/dist/esm/hooks/usePressable.js.map +1 -1
- package/dist/esm/hooks/usePrevious.js +0 -0
- package/dist/esm/hooks/usePrevious.js.map +0 -0
- package/dist/esm/hooks/useTheme.js +24 -7
- package/dist/esm/hooks/useTheme.js.map +1 -1
- package/dist/esm/hooks/useUnmountEffect.js +0 -0
- package/dist/esm/hooks/useUnmountEffect.js.map +0 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/insertFont.js +16 -4
- package/dist/esm/insertFont.js.map +2 -2
- package/dist/esm/static.js +1 -1
- package/dist/esm/static.js.map +1 -1
- package/dist/esm/styled.js +38 -9
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/types-rnw.js +0 -0
- package/dist/esm/types-rnw.js.map +0 -0
- package/dist/esm/types.js +0 -0
- package/dist/esm/types.js.map +0 -0
- package/dist/esm/views/Slot.js +40 -11
- package/dist/esm/views/Slot.js.map +1 -1
- package/dist/esm/views/Stack.js +21 -3
- package/dist/esm/views/Stack.js.map +1 -1
- package/dist/esm/views/Text.js +24 -12
- package/dist/esm/views/Text.js.map +1 -1
- package/dist/esm/views/TextAncestorContext.js +2 -2
- package/dist/esm/views/TextAncestorContext.js.map +1 -1
- package/dist/esm/views/Theme.js +0 -0
- package/dist/esm/views/Theme.js.map +0 -0
- package/dist/esm/views/ThemeInverse.js +0 -0
- package/dist/esm/views/ThemeInverse.js.map +0 -0
- package/dist/esm/views/ThemeProvider.js +0 -0
- package/dist/esm/views/ThemeProvider.js.map +0 -0
- package/dist/esm/views/ThemeReset.js +0 -0
- package/dist/esm/views/ThemeReset.js.map +0 -0
- package/package.json +7 -7
- package/reset.css +4 -0
- package/types/Pressability.d.ts +0 -0
- package/types/Pressability.d.ts.map +0 -0
- package/types/Pressability.native.d.ts +0 -0
- package/types/Pressability.native.d.ts.map +0 -0
- package/types/Tamagui.d.ts +0 -0
- package/types/Tamagui.d.ts.map +0 -0
- package/types/ThemeContext.d.ts +0 -0
- package/types/ThemeContext.d.ts.map +0 -0
- package/types/ThemeManager.d.ts +0 -0
- package/types/ThemeManager.d.ts.map +0 -0
- package/types/conf.d.ts +0 -0
- package/types/conf.d.ts.map +0 -0
- package/types/constants/constants.d.ts +0 -0
- package/types/constants/constants.d.ts.map +0 -0
- package/types/constants/platform.d.ts +0 -0
- package/types/constants/platform.d.ts.map +0 -0
- package/types/constants/rnw.d.ts +0 -0
- package/types/constants/rnw.d.ts.map +0 -0
- package/types/contexts/ButtonInsideButtonContext.d.ts +0 -0
- package/types/contexts/ButtonInsideButtonContext.d.ts.map +0 -0
- package/types/createComponent.d.ts +2 -4
- package/types/createComponent.d.ts.map +1 -1
- package/types/createFont.d.ts +0 -0
- package/types/createFont.d.ts.map +0 -0
- package/types/createShorthands.d.ts +0 -0
- package/types/createShorthands.d.ts.map +0 -0
- package/types/createTamagui.d.ts +0 -0
- package/types/createTamagui.d.ts.map +0 -0
- package/types/createTheme.d.ts +0 -0
- package/types/createTheme.d.ts.map +0 -0
- package/types/createTokens.d.ts +0 -0
- package/types/createTokens.d.ts.map +0 -0
- package/types/createVariable.d.ts +0 -0
- package/types/createVariable.d.ts.map +1 -1
- package/types/createVariables.d.ts +0 -0
- package/types/createVariables.d.ts.map +0 -0
- package/types/defaultComponentState.d.ts +0 -0
- package/types/defaultComponentState.d.ts.map +0 -0
- package/types/helpers/RNComponents.d.ts +0 -0
- package/types/helpers/RNComponents.d.ts.map +0 -0
- package/types/helpers/areEqualSets.d.ts +0 -0
- package/types/helpers/areEqualSets.d.ts.map +0 -0
- package/types/helpers/calc.d.ts +0 -0
- package/types/helpers/calc.d.ts.map +0 -0
- package/types/helpers/createMediaStyle.d.ts +0 -0
- package/types/helpers/createMediaStyle.d.ts.map +0 -0
- package/types/helpers/createPropMapper.d.ts +0 -0
- package/types/helpers/createPropMapper.d.ts.map +0 -0
- package/types/helpers/createShallowUpdate.d.ts +0 -0
- package/types/helpers/createShallowUpdate.d.ts.map +0 -0
- package/types/helpers/createTamaguiProvider.d.ts +0 -0
- package/types/helpers/createTamaguiProvider.d.ts.map +0 -0
- package/types/helpers/extendStaticConfig.d.ts +0 -0
- package/types/helpers/extendStaticConfig.d.ts.map +0 -0
- package/types/helpers/fixNativeShadow.d.ts +0 -0
- package/types/helpers/fixNativeShadow.d.ts.map +0 -0
- package/types/helpers/fixNativeShadow.native.d.ts +0 -0
- package/types/helpers/fixNativeShadow.native.d.ts.map +0 -0
- package/types/helpers/generateAtomicStyles.d.ts +2 -2
- package/types/helpers/generateAtomicStyles.d.ts.map +1 -1
- package/types/helpers/getExpandedShorthands.d.ts +0 -0
- package/types/helpers/getExpandedShorthands.d.ts.map +0 -0
- package/types/helpers/getSize.d.ts +0 -0
- package/types/helpers/getSize.d.ts.map +0 -0
- package/types/helpers/getSplitStyles.d.ts +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStackSize.d.ts +0 -0
- package/types/helpers/getStackSize.d.ts.map +0 -0
- package/types/helpers/getStylesAtomic.d.ts +2 -0
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.native.d.ts +0 -0
- package/types/helpers/getStylesAtomic.native.d.ts.map +0 -0
- package/types/helpers/getTextSize.d.ts +0 -0
- package/types/helpers/getTextSize.d.ts.map +0 -0
- package/types/helpers/getVariantExtras.d.ts +0 -0
- package/types/helpers/getVariantExtras.d.ts.map +0 -0
- package/types/helpers/insertStyleRule.d.ts +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/isObj.d.ts +0 -0
- package/types/helpers/isObj.d.ts.map +0 -0
- package/types/helpers/isTamaguiComponent.d.ts +0 -0
- package/types/helpers/isTamaguiComponent.d.ts.map +0 -0
- package/types/helpers/isTamaguiElement.d.ts +0 -0
- package/types/helpers/isTamaguiElement.d.ts.map +0 -0
- package/types/helpers/matchMedia.d.ts +0 -0
- package/types/helpers/matchMedia.d.ts.map +0 -0
- package/types/helpers/matchMedia.native.d.ts +0 -0
- package/types/helpers/matchMedia.native.d.ts.map +0 -0
- package/types/helpers/mergeProps.d.ts +0 -0
- package/types/helpers/mergeProps.d.ts.map +0 -0
- package/types/helpers/mergeTransform.d.ts +0 -0
- package/types/helpers/mergeTransform.d.ts.map +0 -0
- package/types/helpers/nativeGestureHandler.native.d.ts +0 -0
- package/types/helpers/nativeGestureHandler.native.d.ts.map +0 -0
- package/types/helpers/proxyThemeVariables.d.ts +0 -0
- package/types/helpers/proxyThemeVariables.d.ts.map +0 -0
- package/types/helpers/{pseudos.d.ts → pseudoDescriptors.d.ts} +3 -3
- package/types/helpers/pseudoDescriptors.d.ts.map +1 -0
- package/types/helpers/registerCSSVariable.d.ts +0 -0
- package/types/helpers/registerCSSVariable.d.ts.map +0 -0
- package/types/helpers/themeable.d.ts +0 -0
- package/types/helpers/themeable.d.ts.map +0 -0
- package/types/helpers/validate.d.ts +0 -0
- package/types/helpers/validate.d.ts.map +0 -0
- package/types/helpers/withStaticProperties.d.ts +0 -0
- package/types/helpers/withStaticProperties.d.ts.map +0 -0
- package/types/helpers/wrapThemeManagerContext.d.ts +0 -0
- package/types/helpers/wrapThemeManagerContext.d.ts.map +0 -0
- package/types/hooks/useConstant.d.ts +0 -0
- package/types/hooks/useConstant.d.ts.map +0 -0
- package/types/hooks/useFeatures.d.ts +0 -0
- package/types/hooks/useFeatures.d.ts.map +0 -0
- package/types/hooks/useId.d.ts +0 -0
- package/types/hooks/useId.d.ts.map +0 -0
- package/types/hooks/useIsMounted.d.ts +0 -0
- package/types/hooks/useIsMounted.d.ts.map +0 -0
- package/types/hooks/useIsTouchDevice.d.ts +0 -0
- package/types/hooks/useIsTouchDevice.d.ts.map +0 -0
- package/types/hooks/useMedia.d.ts +0 -0
- package/types/hooks/useMedia.d.ts.map +0 -0
- package/types/hooks/usePressable.d.ts +0 -0
- package/types/hooks/usePressable.d.ts.map +0 -0
- package/types/hooks/usePrevious.d.ts +0 -0
- package/types/hooks/usePrevious.d.ts.map +0 -0
- package/types/hooks/useTheme.d.ts +0 -0
- package/types/hooks/useTheme.d.ts.map +0 -0
- package/types/hooks/useUnmountEffect.d.ts +0 -0
- package/types/hooks/useUnmountEffect.d.ts.map +0 -0
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/insertFont.d.ts +1 -1
- package/types/insertFont.d.ts.map +1 -1
- package/types/static.d.ts +1 -1
- package/types/static.d.ts.map +1 -1
- package/types/styled.d.ts +0 -0
- package/types/styled.d.ts.map +0 -0
- package/types/types-rnw.d.ts +0 -0
- package/types/types-rnw.d.ts.map +0 -0
- package/types/types.d.ts +2 -2
- package/types/types.d.ts.map +1 -1
- package/types/views/Slot.d.ts +0 -0
- package/types/views/Slot.d.ts.map +0 -0
- package/types/views/Stack.d.ts +0 -0
- package/types/views/Stack.d.ts.map +0 -0
- package/types/views/Text.d.ts +0 -0
- package/types/views/Text.d.ts.map +0 -0
- package/types/views/TextAncestorContext.d.ts +0 -0
- package/types/views/TextAncestorContext.d.ts.map +0 -0
- package/types/views/Theme.d.ts +0 -0
- package/types/views/Theme.d.ts.map +0 -0
- package/types/views/ThemeInverse.d.ts +0 -0
- package/types/views/ThemeInverse.d.ts.map +0 -0
- package/types/views/ThemeProvider.d.ts +0 -0
- package/types/views/ThemeProvider.d.ts.map +0 -0
- package/types/views/ThemeReset.d.ts +0 -0
- package/types/views/ThemeReset.d.ts.map +0 -0
- package/dist/cjs/helpers/pseudos.js.map +0 -7
- package/dist/esm/helpers/pseudos.js +0 -18
- package/dist/esm/helpers/pseudos.js.map +0 -7
- package/dist/jsx/Pressability.js +0 -4
- package/dist/jsx/Pressability.native.js +0 -4
- package/dist/jsx/Tamagui.js +0 -38
- package/dist/jsx/ThemeContext.js +0 -5
- package/dist/jsx/ThemeManager.js +0 -194
- package/dist/jsx/conf.js +0 -38
- package/dist/jsx/constants/constants.js +0 -17
- package/dist/jsx/constants/platform.js +0 -25
- package/dist/jsx/constants/rnw.js +0 -10
- package/dist/jsx/contexts/ButtonInsideButtonContext.js +0 -5
- package/dist/jsx/createComponent.js +0 -1036
- package/dist/jsx/createFont.js +0 -25
- package/dist/jsx/createShorthands.js +0 -6
- package/dist/jsx/createTamagui.js +0 -245
- package/dist/jsx/createTheme.js +0 -6
- package/dist/jsx/createTokens.js +0 -11
- package/dist/jsx/createVariable.js +0 -64
- package/dist/jsx/createVariables.js +0 -31
- package/dist/jsx/defaultComponentState.js +0 -0
- package/dist/jsx/helpers/RNComponents.js +0 -11
- package/dist/jsx/helpers/areEqualSets.js +0 -13
- package/dist/jsx/helpers/calc.js +0 -46
- package/dist/jsx/helpers/createMediaStyle.js +0 -29
- package/dist/jsx/helpers/createPropMapper.js +0 -243
- package/dist/jsx/helpers/createShallowUpdate.js +0 -16
- package/dist/jsx/helpers/createTamaguiProvider.js +0 -28
- package/dist/jsx/helpers/extendStaticConfig.js +0 -62
- package/dist/jsx/helpers/fixNativeShadow.js +0 -5
- package/dist/jsx/helpers/fixNativeShadow.native.js +0 -28
- package/dist/jsx/helpers/generateAtomicStyles.js +0 -410
- package/dist/jsx/helpers/getExpandedShorthands.js +0 -15
- package/dist/jsx/helpers/getSize.js +0 -19
- package/dist/jsx/helpers/getSplitStyles.js +0 -380
- package/dist/jsx/helpers/getStackSize.js +0 -15
- package/dist/jsx/helpers/getStylesAtomic.js +0 -61
- package/dist/jsx/helpers/getStylesAtomic.native.js +0 -6
- package/dist/jsx/helpers/getTextSize.js +0 -31
- package/dist/jsx/helpers/getVariantExtras.js +0 -22
- package/dist/jsx/helpers/insertStyleRule.js +0 -91
- package/dist/jsx/helpers/isObj.js +0 -4
- package/dist/jsx/helpers/isTamaguiComponent.js +0 -12
- package/dist/jsx/helpers/isTamaguiElement.js +0 -8
- package/dist/jsx/helpers/matchMedia.js +0 -15
- package/dist/jsx/helpers/matchMedia.native.js +0 -6
- package/dist/jsx/helpers/mergeProps.js +0 -15
- package/dist/jsx/helpers/mergeTransform.js +0 -16
- package/dist/jsx/helpers/nativeGestureHandler.native.js +0 -1
- package/dist/jsx/helpers/proxyThemeVariables.js +0 -14
- package/dist/jsx/helpers/registerCSSVariable.js +0 -14
- package/dist/jsx/helpers/themeable.js +0 -22
- package/dist/jsx/helpers/validate.js +0 -73
- package/dist/jsx/helpers/withStaticProperties.js +0 -7
- package/dist/jsx/helpers/wrapThemeManagerContext.js +0 -7
- package/dist/jsx/hooks/useConstant.js +0 -11
- package/dist/jsx/hooks/useFeatures.js +0 -165
- package/dist/jsx/hooks/useId.js +0 -32
- package/dist/jsx/hooks/useIsMounted.js +0 -15
- package/dist/jsx/hooks/useIsTouchDevice.js +0 -14
- package/dist/jsx/hooks/useMedia.js +0 -153
- package/dist/jsx/hooks/usePressable.js +0 -11
- package/dist/jsx/hooks/usePrevious.js +0 -0
- package/dist/jsx/hooks/useTheme.js +0 -164
- package/dist/jsx/hooks/useUnmountEffect.js +0 -7
- package/dist/jsx/index.js +0 -64
- package/dist/jsx/insertFont.js +0 -51
- package/dist/jsx/static.js +0 -18
- package/dist/jsx/styled.js +0 -49
- package/dist/jsx/types-rnw.js +0 -0
- package/dist/jsx/types.js +0 -0
- package/dist/jsx/views/Slot.js +0 -70
- package/dist/jsx/views/Stack.js +0 -12
- package/dist/jsx/views/Text.js +0 -57
- package/dist/jsx/views/TextAncestorContext.js +0 -13
- package/dist/jsx/views/Theme.js +0 -27
- package/dist/jsx/views/ThemeInverse.js +0 -24
- package/dist/jsx/views/ThemeProvider.js +0 -34
- package/dist/jsx/views/ThemeReset.js +0 -32
- package/types/helpers/pseudos.d.ts.map +0 -1
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
1
32
|
import { composeEventHandlers, stylePropsView, validStyles } from "@tamagui/helpers";
|
|
2
33
|
import { useForceUpdate } from "@tamagui/use-force-update";
|
|
3
34
|
import React, {
|
|
@@ -82,7 +113,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
82
113
|
let tamaguiDefaultProps;
|
|
83
114
|
let initialSplitStyles;
|
|
84
115
|
const component = forwardRef((propsIn, forwardedRef) => {
|
|
85
|
-
var _a,
|
|
116
|
+
var _a, _d, _e, _f;
|
|
86
117
|
let props;
|
|
87
118
|
if (tamaguiDefaultProps && !propsIn.asChild) {
|
|
88
119
|
props = mergeProps(tamaguiDefaultProps, propsIn);
|
|
@@ -110,32 +141,29 @@ function createComponent(configIn, ParentComponent) {
|
|
|
110
141
|
const setStateShallow = createShallowUpdate(statesUsed[1]);
|
|
111
142
|
let state = statesUsed[0];
|
|
112
143
|
if (propsIn.forceStyle) {
|
|
113
|
-
state = {
|
|
114
|
-
...state,
|
|
144
|
+
state = __spreadProps(__spreadValues({}, state), {
|
|
115
145
|
[propsIn.forceStyle]: true
|
|
116
|
-
};
|
|
146
|
+
});
|
|
117
147
|
}
|
|
118
148
|
const shouldAvoidClasses = !!(props.animation && avoidClasses);
|
|
119
149
|
const shouldForcePseudo = !!propsIn.forceStyle;
|
|
120
150
|
const hasTextAncestor = !!(isWeb ? useContext(TextAncestorContext) : false);
|
|
121
|
-
const splitStyleState = !shouldAvoidClasses && !shouldForcePseudo ? {
|
|
122
|
-
...state,
|
|
151
|
+
const splitStyleState = !shouldAvoidClasses && !shouldForcePseudo ? __spreadProps(__spreadValues({}, state), {
|
|
123
152
|
hasTextAncestor,
|
|
124
153
|
dynamicStylesInline: true
|
|
125
|
-
} : {
|
|
126
|
-
...state,
|
|
154
|
+
}) : __spreadProps(__spreadValues({}, state), {
|
|
127
155
|
noClassNames: true,
|
|
128
156
|
dynamicStylesInline: true,
|
|
129
157
|
hasTextAncestor,
|
|
130
158
|
resolveVariablesAs: "value"
|
|
131
|
-
};
|
|
159
|
+
});
|
|
132
160
|
const splitStyles = useSplitStyles(props, staticConfig, theme, splitStyleState, props.asChild ? null : initialSplitStyles.classNames, props["debug"]);
|
|
133
161
|
const { viewProps: viewPropsIn, pseudos, medias, style, classNames } = splitStyles;
|
|
134
162
|
const useAnimations = (_a = tamaguiConfig.animations) == null ? void 0 : _a.useAnimations;
|
|
135
163
|
const isAnimated = !!(useAnimations && props.animation);
|
|
136
164
|
const hasEnterStyle = !!props.enterStyle;
|
|
137
165
|
const hostRef = useRef(null);
|
|
138
|
-
const animationFeatureStylesIn = props.animation ? {
|
|
166
|
+
const animationFeatureStylesIn = props.animation ? __spreadValues(__spreadValues({}, defaultNativeStyle), style) : null;
|
|
139
167
|
const features = useFeatures(props, {
|
|
140
168
|
forceUpdate,
|
|
141
169
|
setStateShallow,
|
|
@@ -148,7 +176,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
148
176
|
hostRef,
|
|
149
177
|
onDidAnimate: props.onDidAnimate
|
|
150
178
|
});
|
|
151
|
-
const {
|
|
179
|
+
const _b = viewPropsIn, {
|
|
152
180
|
tag,
|
|
153
181
|
hitSlop,
|
|
154
182
|
asChild,
|
|
@@ -170,9 +198,31 @@ function createComponent(configIn, ParentComponent) {
|
|
|
170
198
|
forceStyle: _forceStyle,
|
|
171
199
|
onClick,
|
|
172
200
|
theme: _themeProp,
|
|
173
|
-
defaultVariants
|
|
174
|
-
|
|
175
|
-
|
|
201
|
+
defaultVariants
|
|
202
|
+
} = _b, nonTamaguiProps = __objRest(_b, [
|
|
203
|
+
"tag",
|
|
204
|
+
"hitSlop",
|
|
205
|
+
"asChild",
|
|
206
|
+
"children",
|
|
207
|
+
"onPress",
|
|
208
|
+
"onPressIn",
|
|
209
|
+
"onPressOut",
|
|
210
|
+
"onHoverIn",
|
|
211
|
+
"onHoverOut",
|
|
212
|
+
"space",
|
|
213
|
+
"spaceDirection",
|
|
214
|
+
"disabled",
|
|
215
|
+
"onMouseUp",
|
|
216
|
+
"onMouseDown",
|
|
217
|
+
"onMouseEnter",
|
|
218
|
+
"onMouseLeave",
|
|
219
|
+
"hrefAttrs",
|
|
220
|
+
"separator",
|
|
221
|
+
"forceStyle",
|
|
222
|
+
"onClick",
|
|
223
|
+
"theme",
|
|
224
|
+
"defaultVariants"
|
|
225
|
+
]);
|
|
176
226
|
const isTaggable = !Component || typeof Component === "string";
|
|
177
227
|
const element = isWeb ? isTaggable ? tag || Component : Component : Component;
|
|
178
228
|
const BaseTextComponent = !isWeb ? Text : element || "span";
|
|
@@ -183,7 +233,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
183
233
|
const disabled = props.accessibilityState != null && props.accessibilityState.disabled === true || props.accessibilityDisabled;
|
|
184
234
|
let viewProps;
|
|
185
235
|
if (isWeb && !staticConfig.isReactNativeWeb) {
|
|
186
|
-
const {
|
|
236
|
+
const _c = nonTamaguiProps, {
|
|
187
237
|
onMoveShouldSetResponder,
|
|
188
238
|
onMoveShouldSetResponderCapture,
|
|
189
239
|
onResponderEnd,
|
|
@@ -252,9 +302,78 @@ function createComponent(configIn, ParentComponent) {
|
|
|
252
302
|
accessibilityValue,
|
|
253
303
|
collapsable,
|
|
254
304
|
focusable,
|
|
255
|
-
onLayout
|
|
256
|
-
|
|
257
|
-
|
|
305
|
+
onLayout
|
|
306
|
+
} = _c, webProps = __objRest(_c, [
|
|
307
|
+
"onMoveShouldSetResponder",
|
|
308
|
+
"onMoveShouldSetResponderCapture",
|
|
309
|
+
"onResponderEnd",
|
|
310
|
+
"onResponderGrant",
|
|
311
|
+
"onResponderMove",
|
|
312
|
+
"onResponderReject",
|
|
313
|
+
"onResponderRelease",
|
|
314
|
+
"onResponderStart",
|
|
315
|
+
"onResponderTerminate",
|
|
316
|
+
"onResponderTerminationRequest",
|
|
317
|
+
"onScrollShouldSetResponder",
|
|
318
|
+
"onScrollShouldSetResponderCapture",
|
|
319
|
+
"onSelectionChangeShouldSetResponder",
|
|
320
|
+
"onSelectionChangeShouldSetResponderCapture",
|
|
321
|
+
"onStartShouldSetResponder",
|
|
322
|
+
"onStartShouldSetResponderCapture",
|
|
323
|
+
"nativeID",
|
|
324
|
+
"accessibilityActiveDescendant",
|
|
325
|
+
"accessibilityAtomic",
|
|
326
|
+
"accessibilityAutoComplete",
|
|
327
|
+
"accessibilityBusy",
|
|
328
|
+
"accessibilityChecked",
|
|
329
|
+
"accessibilityColumnCount",
|
|
330
|
+
"accessibilityColumnIndex",
|
|
331
|
+
"accessibilityColumnSpan",
|
|
332
|
+
"accessibilityControls",
|
|
333
|
+
"accessibilityCurrent",
|
|
334
|
+
"accessibilityDescribedBy",
|
|
335
|
+
"accessibilityDetails",
|
|
336
|
+
"accessibilityDisabled",
|
|
337
|
+
"accessibilityErrorMessage",
|
|
338
|
+
"accessibilityExpanded",
|
|
339
|
+
"accessibilityFlowTo",
|
|
340
|
+
"accessibilityHasPopup",
|
|
341
|
+
"accessibilityHidden",
|
|
342
|
+
"accessibilityInvalid",
|
|
343
|
+
"accessibilityKeyShortcuts",
|
|
344
|
+
"accessibilityLabel",
|
|
345
|
+
"accessibilityLabelledBy",
|
|
346
|
+
"accessibilityLevel",
|
|
347
|
+
"accessibilityLiveRegion",
|
|
348
|
+
"accessibilityModal",
|
|
349
|
+
"accessibilityMultiline",
|
|
350
|
+
"accessibilityMultiSelectable",
|
|
351
|
+
"accessibilityOrientation",
|
|
352
|
+
"accessibilityOwns",
|
|
353
|
+
"accessibilityPlaceholder",
|
|
354
|
+
"accessibilityPosInSet",
|
|
355
|
+
"accessibilityPressed",
|
|
356
|
+
"accessibilityReadOnly",
|
|
357
|
+
"accessibilityRequired",
|
|
358
|
+
"accessibilityRole",
|
|
359
|
+
"accessibilityRoleDescription",
|
|
360
|
+
"accessibilityRowCount",
|
|
361
|
+
"accessibilityRowIndex",
|
|
362
|
+
"accessibilityRowSpan",
|
|
363
|
+
"accessibilitySelected",
|
|
364
|
+
"accessibilitySetSize",
|
|
365
|
+
"accessibilitySort",
|
|
366
|
+
"accessibilityValueMax",
|
|
367
|
+
"accessibilityValueMin",
|
|
368
|
+
"accessibilityValueNow",
|
|
369
|
+
"accessibilityValueText",
|
|
370
|
+
"accessible",
|
|
371
|
+
"accessibilityState",
|
|
372
|
+
"accessibilityValue",
|
|
373
|
+
"collapsable",
|
|
374
|
+
"focusable",
|
|
375
|
+
"onLayout"
|
|
376
|
+
]);
|
|
258
377
|
viewProps = webProps;
|
|
259
378
|
assignNativePropsToWeb(elementType, viewProps, nonTamaguiProps);
|
|
260
379
|
if (!asChild) {
|
|
@@ -358,15 +477,11 @@ function createComponent(configIn, ParentComponent) {
|
|
|
358
477
|
let styles;
|
|
359
478
|
const animationStyles = state.animation ? state.animation.style : null;
|
|
360
479
|
if (isStringElement && shouldAvoidClasses && !shouldForcePseudo) {
|
|
361
|
-
styles = {
|
|
362
|
-
...defaultNativeStyle,
|
|
363
|
-
...animationStyles != null ? animationStyles : style,
|
|
364
|
-
...medias
|
|
365
|
-
};
|
|
480
|
+
styles = __spreadValues(__spreadValues(__spreadValues({}, defaultNativeStyle), animationStyles ?? style), medias);
|
|
366
481
|
} else {
|
|
367
482
|
styles = [
|
|
368
483
|
isWeb ? null : defaultNativeStyleSheet ? defaultNativeStyleSheet.base : null,
|
|
369
|
-
animationStyles
|
|
484
|
+
animationStyles ?? style,
|
|
370
485
|
medias
|
|
371
486
|
];
|
|
372
487
|
if (!animationStyles) {
|
|
@@ -397,17 +512,16 @@ function createComponent(configIn, ParentComponent) {
|
|
|
397
512
|
classNames ? Object.values(classNames).join(" ") : ""
|
|
398
513
|
];
|
|
399
514
|
const className = classList.join(" ");
|
|
400
|
-
const style2 = animationStyles
|
|
515
|
+
const style2 = animationStyles ?? splitStyles.style;
|
|
401
516
|
if (process.env.NODE_ENV === "development" && props["debug"]) {
|
|
402
517
|
console.log(" \xBB className", { splitStyles, style: style2, isStringElement, pseudos, state, classNames, propsClassName: props.className, classList, className: className.trim().split(" "), themeClassName: theme.className, values: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) });
|
|
403
518
|
}
|
|
404
519
|
const isAnimatedReactNativeWeb = props.animation && avoidClasses;
|
|
405
520
|
if (staticConfig.isReactNativeWeb || isAnimatedReactNativeWeb) {
|
|
406
|
-
viewProps.dataSet = {
|
|
407
|
-
...viewProps.dataSet,
|
|
521
|
+
viewProps.dataSet = __spreadProps(__spreadValues({}, viewProps.dataSet), {
|
|
408
522
|
className,
|
|
409
523
|
id: props.id
|
|
410
|
-
};
|
|
524
|
+
});
|
|
411
525
|
if (props["data-is"]) {
|
|
412
526
|
viewProps.dataSet.is = props["data-is"];
|
|
413
527
|
}
|
|
@@ -436,44 +550,44 @@ function createComponent(configIn, ParentComponent) {
|
|
|
436
550
|
pressIn: false
|
|
437
551
|
});
|
|
438
552
|
}, []);
|
|
439
|
-
const events = shouldAttach ? {
|
|
553
|
+
const events = shouldAttach ? __spreadValues(__spreadProps(__spreadValues({
|
|
440
554
|
[pressOutKey]: attachPress ? (e) => {
|
|
441
555
|
unPress();
|
|
442
556
|
onPressOut == null ? void 0 : onPressOut(e);
|
|
443
557
|
onMouseUp == null ? void 0 : onMouseUp(e);
|
|
558
|
+
} : void 0
|
|
559
|
+
}, isHoverable && {
|
|
560
|
+
onMouseEnter: attachHover ? (e) => {
|
|
561
|
+
let next = {};
|
|
562
|
+
if (attachHover) {
|
|
563
|
+
next.hover = true;
|
|
564
|
+
}
|
|
565
|
+
if (state.pressIn) {
|
|
566
|
+
next.press = true;
|
|
567
|
+
}
|
|
568
|
+
if (Object.keys(next).length) {
|
|
569
|
+
setStateShallow(next);
|
|
570
|
+
}
|
|
571
|
+
onHoverIn == null ? void 0 : onHoverIn(e);
|
|
572
|
+
onMouseEnter == null ? void 0 : onMouseEnter(e);
|
|
444
573
|
} : void 0,
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
mouseUps.add(unPress);
|
|
463
|
-
if (attachHover) {
|
|
464
|
-
next.hover = false;
|
|
465
|
-
}
|
|
466
|
-
if (state.pressIn) {
|
|
467
|
-
next.press = false;
|
|
468
|
-
next.pressIn = false;
|
|
469
|
-
}
|
|
470
|
-
if (Object.keys(next).length) {
|
|
471
|
-
setStateShallow(next);
|
|
472
|
-
}
|
|
473
|
-
onHoverOut == null ? void 0 : onHoverOut(e);
|
|
474
|
-
onMouseLeave == null ? void 0 : onMouseLeave(e);
|
|
475
|
-
} : void 0
|
|
476
|
-
},
|
|
574
|
+
onMouseLeave: attachHover ? (e) => {
|
|
575
|
+
let next = {};
|
|
576
|
+
mouseUps.add(unPress);
|
|
577
|
+
if (attachHover) {
|
|
578
|
+
next.hover = false;
|
|
579
|
+
}
|
|
580
|
+
if (state.pressIn) {
|
|
581
|
+
next.press = false;
|
|
582
|
+
next.pressIn = false;
|
|
583
|
+
}
|
|
584
|
+
if (Object.keys(next).length) {
|
|
585
|
+
setStateShallow(next);
|
|
586
|
+
}
|
|
587
|
+
onHoverOut == null ? void 0 : onHoverOut(e);
|
|
588
|
+
onMouseLeave == null ? void 0 : onMouseLeave(e);
|
|
589
|
+
} : void 0
|
|
590
|
+
}), {
|
|
477
591
|
[pressInKey]: attachPress ? (e) => {
|
|
478
592
|
setStateShallow({
|
|
479
593
|
press: true,
|
|
@@ -489,18 +603,17 @@ function createComponent(configIn, ParentComponent) {
|
|
|
489
603
|
unPress();
|
|
490
604
|
onClick == null ? void 0 : onClick(e);
|
|
491
605
|
onPress == null ? void 0 : onPress(e);
|
|
492
|
-
} : null
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
} : null;
|
|
606
|
+
} : null
|
|
607
|
+
}), !isWeb && {
|
|
608
|
+
cancelable: !props.rejectResponderTermination,
|
|
609
|
+
disabled: props.disabled !== null ? props.disabled : (_d = props.accessibilityState) == null ? void 0 : _d.disabled,
|
|
610
|
+
hitSlop: props.hitSlop,
|
|
611
|
+
delayLongPress: props.delayLongPress,
|
|
612
|
+
delayPressIn: props.delayPressIn,
|
|
613
|
+
delayPressOut: props.delayPressOut,
|
|
614
|
+
focusable: viewProps.focusable ?? true,
|
|
615
|
+
minPressDuration: 0
|
|
616
|
+
}) : null;
|
|
504
617
|
let space = spaceProp;
|
|
505
618
|
if (features.enabled.mediaQuery) {
|
|
506
619
|
for (const key in mediaState) {
|
|
@@ -521,23 +634,22 @@ function createComponent(configIn, ParentComponent) {
|
|
|
521
634
|
let content;
|
|
522
635
|
if (asChild) {
|
|
523
636
|
elementType = Slot;
|
|
524
|
-
viewProps = {
|
|
525
|
-
...viewProps,
|
|
637
|
+
viewProps = __spreadProps(__spreadValues({}, viewProps), {
|
|
526
638
|
onPress,
|
|
527
639
|
onPressIn,
|
|
528
640
|
onPressOut
|
|
529
|
-
};
|
|
641
|
+
});
|
|
530
642
|
}
|
|
531
643
|
if (isWeb) {
|
|
532
|
-
const [pressableProps] = usePressable(events ? {
|
|
533
|
-
disabled
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
644
|
+
const [pressableProps] = usePressable(events ? __spreadProps(__spreadValues({
|
|
645
|
+
disabled
|
|
646
|
+
}, hitSlop && {
|
|
647
|
+
hitSlop
|
|
648
|
+
}), {
|
|
537
649
|
onPressOut: events[pressOutKey],
|
|
538
650
|
onPressIn: events[pressInKey],
|
|
539
651
|
onPress: events[pressKey]
|
|
540
|
-
} : {
|
|
652
|
+
}) : {
|
|
541
653
|
disabled: true
|
|
542
654
|
});
|
|
543
655
|
if (events) {
|
|
@@ -592,21 +704,20 @@ function createComponent(configIn, ParentComponent) {
|
|
|
592
704
|
if (shouldWrapWithHover || shouldWrapWithComponentTheme) {
|
|
593
705
|
const themeClassName = shouldWrapWithComponentTheme ? `${theme.className}` : "";
|
|
594
706
|
const hoverClassName = shouldWrapWithHover ? "t_Hoverable" : "";
|
|
595
|
-
content = /* @__PURE__ */ React.createElement("span", {
|
|
707
|
+
content = /* @__PURE__ */ React.createElement("span", __spreadValues({
|
|
596
708
|
className: `${hoverClassName} ${themeClassName}`,
|
|
597
709
|
style: {
|
|
598
710
|
display: "contents"
|
|
599
|
-
},
|
|
600
|
-
...shouldWrapWithHover && {
|
|
601
|
-
onMouseEnter: events.onMouseEnter,
|
|
602
|
-
onMouseLeave: events.onMouseLeave
|
|
603
711
|
}
|
|
604
|
-
},
|
|
712
|
+
}, shouldWrapWithHover && {
|
|
713
|
+
onMouseEnter: events.onMouseEnter,
|
|
714
|
+
onMouseLeave: events.onMouseLeave
|
|
715
|
+
}), content);
|
|
605
716
|
}
|
|
606
717
|
}
|
|
607
718
|
if (process.env.NODE_ENV === "development") {
|
|
608
719
|
if (props["debug"]) {
|
|
609
|
-
console.log("\u2B50\uFE0F", { propsIn: {
|
|
720
|
+
console.log("\u2B50\uFE0F", __spreadValues({ propsIn: __spreadValues({}, props), propsOut: __spreadValues({}, viewProps), elementType, state, splitStyles, animationStyles, isStringElement, classNamesIn: (_e = props.className) == null ? void 0 : _e.split(" "), classNamesOut: (_f = viewProps.className) == null ? void 0 : _f.split(" "), events, shouldAttach, ViewComponent: elementType, viewProps, styles, pseudos, content, childEls, shouldAvoidClasses, avoidClasses, animation: props.animation, style, defaultNativeStyle, initialSplitStyles }, typeof window !== "undefined" ? { theme, themeClassName: theme.className, staticConfig, tamaguiConfig, events, shouldAvoidClasses, shouldForcePseudo } : null));
|
|
610
721
|
}
|
|
611
722
|
}
|
|
612
723
|
if (features.elements.length) {
|
|
@@ -670,12 +781,14 @@ function createComponent(configIn, ParentComponent) {
|
|
|
670
781
|
const defaults = mergeProps(component.defaultProps, initialSplitStyles.viewProps);
|
|
671
782
|
defaultNativeStyle = {};
|
|
672
783
|
const validStyles2 = staticConfig.validStyles || stylePropsView;
|
|
673
|
-
|
|
674
|
-
const
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
784
|
+
if (!isWeb) {
|
|
785
|
+
for (const key in defaults) {
|
|
786
|
+
const val = defaults[key];
|
|
787
|
+
if (typeof val === "string" && val[0] === "$" || !validStyles2[key] || val[0] === "_") {
|
|
788
|
+
defaults[key] = val;
|
|
789
|
+
} else {
|
|
790
|
+
defaultNativeStyle[key] = val;
|
|
791
|
+
}
|
|
679
792
|
}
|
|
680
793
|
}
|
|
681
794
|
defaultNativeStyleSheet = StyleSheet.create({
|
|
@@ -700,21 +813,17 @@ function createComponent(configIn, ParentComponent) {
|
|
|
700
813
|
if (configIn.memo) {
|
|
701
814
|
res = memo(res);
|
|
702
815
|
}
|
|
703
|
-
res.staticConfig = {
|
|
704
|
-
validStyles: staticConfig.validStyles || stylePropsView
|
|
705
|
-
|
|
706
|
-
};
|
|
816
|
+
res.staticConfig = __spreadValues({
|
|
817
|
+
validStyles: staticConfig.validStyles || stylePropsView
|
|
818
|
+
}, staticConfig);
|
|
707
819
|
res.extractable = (Component, conf) => {
|
|
708
|
-
Component.staticConfig = extendStaticConfig({
|
|
709
|
-
Component
|
|
710
|
-
|
|
820
|
+
Component.staticConfig = extendStaticConfig(__spreadProps(__spreadValues({
|
|
821
|
+
Component
|
|
822
|
+
}, conf), {
|
|
711
823
|
neverFlatten: true,
|
|
712
824
|
isExtractable: true,
|
|
713
|
-
defaultProps: {
|
|
714
|
-
|
|
715
|
-
...conf == null ? void 0 : conf.defaultProps
|
|
716
|
-
}
|
|
717
|
-
}, res);
|
|
825
|
+
defaultProps: __spreadValues(__spreadValues({}, Component.defaultProps), conf == null ? void 0 : conf.defaultProps)
|
|
826
|
+
}), res);
|
|
718
827
|
return Component;
|
|
719
828
|
};
|
|
720
829
|
return res;
|
|
@@ -728,16 +837,14 @@ const Spacer = createComponent({
|
|
|
728
837
|
memo: true,
|
|
729
838
|
componentName: "Spacer",
|
|
730
839
|
validStyles,
|
|
731
|
-
defaultProps: {
|
|
732
|
-
...stackDefaultStyles,
|
|
840
|
+
defaultProps: __spreadProps(__spreadValues({}, stackDefaultStyles), {
|
|
733
841
|
size: true
|
|
734
|
-
},
|
|
842
|
+
}),
|
|
735
843
|
variants: {
|
|
736
844
|
size: {
|
|
737
845
|
"...size": (size, { tokens }) => {
|
|
738
|
-
var _a;
|
|
739
846
|
size = size == true ? "$true" : size;
|
|
740
|
-
const sizePx =
|
|
847
|
+
const sizePx = tokens.space[size] ?? size;
|
|
741
848
|
return {
|
|
742
849
|
width: sizePx,
|
|
743
850
|
height: sizePx,
|
|
@@ -763,7 +870,7 @@ const Spacer = createComponent({
|
|
|
763
870
|
}
|
|
764
871
|
},
|
|
765
872
|
defaultVariants: {
|
|
766
|
-
direction: "
|
|
873
|
+
direction: "both"
|
|
767
874
|
}
|
|
768
875
|
});
|
|
769
876
|
function spacedChildren({
|
|
@@ -832,14 +939,13 @@ function spacedChildren({
|
|
|
832
939
|
return final;
|
|
833
940
|
}
|
|
834
941
|
function createSpacer({ key, direction, space, spaceFlex }) {
|
|
835
|
-
return /* @__PURE__ */ React.createElement(Spacer, {
|
|
942
|
+
return /* @__PURE__ */ React.createElement(Spacer, __spreadValues({
|
|
836
943
|
key,
|
|
837
|
-
direction: direction === "both" ? void 0 : direction === "row" || direction === "row-reverse" ? "horizontal" : "vertical",
|
|
838
944
|
size: space,
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
});
|
|
945
|
+
direction
|
|
946
|
+
}, spaceFlex && {
|
|
947
|
+
flex: spaceFlex
|
|
948
|
+
}));
|
|
843
949
|
}
|
|
844
950
|
function isUnspaced(child) {
|
|
845
951
|
var _a, _b;
|
|
@@ -1031,7 +1137,7 @@ function addPseudoToStyles(styles, initialPseudos, pseudos, name, force = false)
|
|
|
1031
1137
|
const pseudoStyle = pseudos[name];
|
|
1032
1138
|
const shouldNestObject = isWeb && name !== "enterStyle" && name !== "exitStyle";
|
|
1033
1139
|
const defaultPseudoStyle = initialPseudos[name];
|
|
1034
|
-
const style = defaultPseudoStyle ? {
|
|
1140
|
+
const style = defaultPseudoStyle ? __spreadValues(__spreadValues({}, defaultPseudoStyle), pseudoStyle) : pseudoStyle;
|
|
1035
1141
|
if (style) {
|
|
1036
1142
|
styles.push(shouldNestObject && !force ? { [name]: style } : style);
|
|
1037
1143
|
}
|