@tamagui/web 3.0.0-beta.807.1 → 3.0.0-beta.831.1
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/config.cjs +1 -1
- package/dist/cjs/config.native.cjs +1 -1
- package/dist/cjs/config.native.js +1 -1
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +28 -18
- package/dist/cjs/createComponent.native.cjs +30 -20
- package/dist/cjs/createComponent.native.js +30 -20
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +54 -4
- package/dist/cjs/createStyledHOC.native.cjs +55 -4
- package/dist/cjs/createStyledHOC.native.js +55 -4
- package/dist/cjs/createStyledHOC.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +1 -1
- package/dist/cjs/createTokens.native.cjs +1 -1
- package/dist/cjs/createTokens.native.js +1 -1
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +147 -99
- package/dist/cjs/dom/htmlRuntime.native.cjs +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
- package/dist/cjs/dom/primitives.native.cjs +16 -13
- package/dist/cjs/dom/primitives.native.js +16 -13
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/helpers/componentDisplayName.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/cjs/helpers/directStyleCSS.cjs +101 -104
- package/dist/cjs/helpers/formatDiagnostic.cjs +2 -4
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +2 -4
- package/dist/cjs/helpers/formatDiagnostic.native.js +2 -4
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +10 -10
- package/dist/cjs/helpers/getSplitStyles.cjs +168 -600
- package/dist/cjs/helpers/getSplitStyles.native.cjs +168 -762
- package/dist/cjs/helpers/getSplitStyles.native.js +168 -762
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/splitStyleProps.cjs +46 -0
- package/dist/cjs/helpers/splitStyleProps.native.cjs +49 -0
- package/dist/cjs/helpers/splitStyleProps.native.js +51 -0
- package/dist/cjs/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/cjs/helpers/styleStaticConfig.cjs +76 -0
- package/dist/cjs/helpers/styleStaticConfig.native.cjs +79 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js +81 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/cjs/helpers/tokenCategories.cjs +32 -71
- package/dist/cjs/helpers/tokenCategories.native.cjs +34 -73
- package/dist/cjs/helpers/tokenCategories.native.js +34 -73
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/variantResolvers.cjs +87 -0
- package/dist/cjs/helpers/variantResolvers.native.cjs +140 -0
- package/dist/cjs/helpers/variantResolvers.native.js +142 -0
- package/dist/cjs/helpers/variantResolvers.native.js.map +1 -0
- package/dist/cjs/hooks/useSplitStyles.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/cjs/index.cjs +3 -9
- package/dist/cjs/index.native.cjs +3 -9
- package/dist/cjs/index.native.js +3 -9
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +8 -7
- package/dist/cjs/internal-runtime.native.cjs +8 -7
- package/dist/cjs/internal-runtime.native.js +8 -7
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +6 -5
- package/dist/cjs/static-resolve.native.cjs +6 -5
- package/dist/cjs/static-resolve.native.js +6 -5
- package/dist/cjs/static-resolve.native.js.map +1 -1
- package/dist/cjs/styled.cjs +4 -56
- package/dist/cjs/styled.native.cjs +4 -58
- package/dist/cjs/styled.native.js +4 -58
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/types.cjs +1 -21
- package/dist/cjs/types.native.cjs +1 -21
- package/dist/cjs/types.native.js +1 -21
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +4 -2
- package/dist/cjs/views/Text.native.cjs +4 -2
- package/dist/cjs/views/Text.native.js +4 -2
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/View.cjs +4 -2
- package/dist/cjs/views/View.native.cjs +4 -2
- package/dist/cjs/views/View.native.js +4 -2
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/config.mjs +1 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +1 -1
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +29 -19
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +31 -21
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +55 -5
- package/dist/esm/createStyledHOC.mjs.map +1 -1
- package/dist/esm/createStyledHOC.native.js +56 -5
- package/dist/esm/createStyledHOC.native.js.map +1 -1
- package/dist/esm/createTokens.mjs +1 -1
- package/dist/esm/createTokens.mjs.map +1 -1
- package/dist/esm/createTokens.native.js +1 -1
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +147 -99
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/htmlRuntime.native.js +7 -3
- package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
- package/dist/esm/dom/primitives.native.js +16 -13
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/helpers/componentDisplayName.mjs +1 -8
- package/dist/esm/helpers/componentDisplayName.mjs.map +1 -1
- package/dist/esm/helpers/componentDisplayName.native.js +1 -8
- package/dist/esm/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/esm/helpers/directStyleCSS.mjs +101 -104
- package/dist/esm/helpers/directStyleCSS.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.mjs +2 -4
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +2 -4
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +10 -10
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +166 -594
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +166 -757
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/splitStyleProps.mjs +27 -0
- package/dist/esm/helpers/splitStyleProps.mjs.map +1 -0
- package/dist/esm/helpers/splitStyleProps.native.js +28 -0
- package/dist/esm/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.mjs +57 -0
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.native.js +58 -0
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/esm/helpers/tokenCategories.mjs +33 -72
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +35 -74
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/variantResolvers.mjs +65 -0
- package/dist/esm/helpers/variantResolvers.mjs.map +1 -0
- package/dist/esm/helpers/variantResolvers.native.js +116 -0
- package/dist/esm/helpers/variantResolvers.native.js.map +1 -0
- package/dist/esm/hooks/useSplitStyles.mjs +2 -2
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js +2 -2
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/esm/index.js +3 -5
- package/dist/esm/index.mjs +3 -5
- package/dist/esm/index.native.js +3 -5
- package/dist/esm/internal-runtime.mjs +8 -7
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +8 -7
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/static-resolve.mjs +8 -6
- package/dist/esm/static-resolve.mjs.map +1 -1
- package/dist/esm/static-resolve.native.js +8 -6
- package/dist/esm/static-resolve.native.js.map +1 -1
- package/dist/esm/styled.mjs +6 -57
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +6 -59
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/types.mjs +1 -18
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +1 -18
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +4 -2
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +4 -2
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/View.mjs +4 -2
- package/dist/esm/views/View.mjs.map +1 -1
- package/dist/esm/views/View.native.js +4 -2
- package/dist/esm/views/View.native.js.map +1 -1
- package/package.json +15 -15
- package/src/config.ts +1 -1
- package/src/createComponent.tsx +41 -30
- package/src/createStyledHOC.tsx +56 -9
- package/src/createTokens.ts +1 -1
- package/src/dom/html.tsx +778 -877
- package/src/dom/htmlRuntime.native.tsx +7 -3
- package/src/dom/primitives.native.tsx +30 -39
- package/src/helpers/componentDisplayName.ts +0 -11
- package/src/helpers/directStyleCSS.ts +91 -112
- package/src/helpers/formatDiagnostic.ts +2 -4
- package/src/helpers/getCSSStylesAtomic.ts +32 -26
- package/src/helpers/getSplitStyles.tsx +315 -1119
- package/src/helpers/getVariantExtras.tsx +3 -3
- package/src/helpers/splitStyleProps.ts +166 -0
- package/src/helpers/styleFrontend.ts +8 -4
- package/src/helpers/styleStaticConfig.ts +88 -0
- package/src/helpers/tokenCategories.ts +62 -93
- package/src/helpers/variantResolvers.ts +121 -0
- package/src/hooks/useSplitStyles.tsx +17 -2
- package/src/hooks/useTheme.tsx +1 -1
- package/src/index.ts +8 -4
- package/src/internal-runtime.ts +10 -9
- package/src/static-resolve.ts +18 -14
- package/src/styled.tsx +7 -264
- package/src/types.tsx +19 -40
- package/src/views/Text.tsx +6 -7
- package/src/views/View.tsx +6 -7
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts.map +1 -1
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/htmlRuntime.native.d.ts.map +1 -1
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/helpers/componentDisplayName.d.ts +0 -3
- package/types/helpers/componentDisplayName.d.ts.map +1 -1
- package/types/helpers/directStyleCSS.d.ts.map +1 -1
- package/types/helpers/formatDiagnostic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts +17 -15
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +6 -6
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/splitStyleProps.d.ts +44 -0
- package/types/helpers/splitStyleProps.d.ts.map +1 -0
- package/types/helpers/styleFrontend.d.ts +4 -4
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +19 -0
- package/types/helpers/styleStaticConfig.d.ts.map +1 -0
- package/types/helpers/tokenCategories.d.ts +1 -1
- package/types/helpers/tokenCategories.d.ts.map +1 -1
- package/types/helpers/variantResolvers.d.ts +9 -0
- package/types/helpers/variantResolvers.d.ts.map +1 -0
- package/types/hooks/useSplitStyles.d.ts.map +1 -1
- package/types/index.d.ts +2 -4
- package/types/index.d.ts.map +1 -1
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/static-resolve.d.ts +2 -2
- package/types/static-resolve.d.ts.map +1 -1
- package/types/styled.d.ts +3 -39
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +2 -12
- package/types/types.d.ts.map +1 -1
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/View.d.ts.map +1 -1
- package/dist/cjs/helpers/getDefaultProps.cjs +0 -24
- package/dist/cjs/helpers/getDefaultProps.native.cjs +0 -28
- package/dist/cjs/helpers/getDefaultProps.native.js +0 -30
- package/dist/cjs/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/cjs/helpers/themeable.cjs +0 -92
- package/dist/cjs/helpers/themeable.native.cjs +0 -95
- package/dist/cjs/helpers/themeable.native.js +0 -97
- package/dist/cjs/helpers/themeable.native.js.map +0 -1
- package/dist/cjs/hooks/useProps.cjs +0 -129
- package/dist/cjs/hooks/useProps.native.cjs +0 -135
- package/dist/cjs/hooks/useProps.native.js +0 -137
- package/dist/cjs/hooks/useProps.native.js.map +0 -1
- package/dist/esm/helpers/getDefaultProps.mjs +0 -4
- package/dist/esm/helpers/getDefaultProps.mjs.map +0 -1
- package/dist/esm/helpers/getDefaultProps.native.js +0 -6
- package/dist/esm/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/esm/helpers/themeable.mjs +0 -67
- package/dist/esm/helpers/themeable.mjs.map +0 -1
- package/dist/esm/helpers/themeable.native.js +0 -68
- package/dist/esm/helpers/themeable.native.js.map +0 -1
- package/dist/esm/hooks/useProps.mjs +0 -100
- package/dist/esm/hooks/useProps.mjs.map +0 -1
- package/dist/esm/hooks/useProps.native.js +0 -104
- package/dist/esm/hooks/useProps.native.js.map +0 -1
- package/src/helpers/getDefaultProps.ts +0 -3
- package/src/helpers/themeable.tsx +0 -96
- package/src/hooks/useProps.tsx +0 -186
- package/types/helpers/getDefaultProps.d.ts +0 -3
- package/types/helpers/getDefaultProps.d.ts.map +0 -1
- package/types/helpers/themeable.d.ts +0 -3
- package/types/helpers/themeable.d.ts.map +0 -1
- package/types/hooks/useProps.d.ts +0 -39
- package/types/hooks/useProps.d.ts.map +0 -1
package/src/internal-runtime.ts
CHANGED
|
@@ -13,7 +13,6 @@ import { createComponent } from './createComponent'
|
|
|
13
13
|
import { createVariables as createVariablesImpl } from './createVariables'
|
|
14
14
|
import { fixStyles as fixStylesImpl } from './helpers/expandStyles'
|
|
15
15
|
import { styleToCSS as styleToCSSImpl } from './helpers/styleToCSS'
|
|
16
|
-
import { setComponentDisplayName } from './helpers/componentDisplayName'
|
|
17
16
|
import { getThemeCSSRules as getThemeCSSRulesImpl } from './helpers/getThemeCSSRules'
|
|
18
17
|
import { normalizeValueWithProperty as normalizeValueWithPropertyImpl } from './helpers/normalizeValueWithProperty'
|
|
19
18
|
import { proxyThemeToParents as proxyThemeToParentsImpl } from './helpers/proxyThemeToParents'
|
|
@@ -120,13 +119,15 @@ export function createFrontendViews(frontend: StyleFrontend): {
|
|
|
120
119
|
Text: FrontendComponent
|
|
121
120
|
} {
|
|
122
121
|
return {
|
|
123
|
-
View:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
View: createComponent({
|
|
123
|
+
...viewStaticConfig,
|
|
124
|
+
styleFrontend: frontend,
|
|
125
|
+
displayName: 'View',
|
|
126
|
+
}),
|
|
127
|
+
Text: createComponent({
|
|
128
|
+
...textStaticConfig,
|
|
129
|
+
styleFrontend: frontend,
|
|
130
|
+
displayName: 'Text',
|
|
131
|
+
}),
|
|
131
132
|
}
|
|
132
133
|
}
|
package/src/static-resolve.ts
CHANGED
|
@@ -24,7 +24,8 @@ import {
|
|
|
24
24
|
updateConfig,
|
|
25
25
|
} from './config'
|
|
26
26
|
import { createTamagui, installTamaguiConfig } from './createTamagui'
|
|
27
|
-
import { getSplitStyles
|
|
27
|
+
import { getSplitStyles } from './helpers/getSplitStyles'
|
|
28
|
+
import { getStyleStaticConfig } from './helpers/styleStaticConfig'
|
|
28
29
|
import { mergeComponentProps } from './helpers/mergeProps'
|
|
29
30
|
import type {
|
|
30
31
|
SplitStyleProps,
|
|
@@ -44,7 +45,6 @@ export {
|
|
|
44
45
|
getTokens,
|
|
45
46
|
getTokenValue,
|
|
46
47
|
installTamaguiConfig,
|
|
47
|
-
prepareStyleStaticConfig,
|
|
48
48
|
setConfig,
|
|
49
49
|
updateConfig,
|
|
50
50
|
}
|
|
@@ -175,19 +175,15 @@ export function resolveStaticElement(
|
|
|
175
175
|
if (target !== 'native') {
|
|
176
176
|
delete baseStaticConfig.isReactNative
|
|
177
177
|
}
|
|
178
|
-
|
|
178
|
+
const styleStaticConfig = getStyleStaticConfig(baseStaticConfig, conf)
|
|
179
179
|
|
|
180
|
-
//
|
|
180
|
+
// mirror createComponent: only the non-style defaults are props. The styles
|
|
181
|
+
// are a base layer the style pass writes for us, so merging them here too
|
|
182
|
+
// would apply them twice and in the wrong order (above variants, not below)
|
|
181
183
|
let elementProps = element.props || {}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
) {
|
|
186
|
-
const [merged] = mergeComponentProps(
|
|
187
|
-
baseStaticConfig.defaultProps,
|
|
188
|
-
undefined,
|
|
189
|
-
elementProps
|
|
190
|
-
)
|
|
184
|
+
const { defaultProps } = styleStaticConfig
|
|
185
|
+
if (defaultProps) {
|
|
186
|
+
const [merged] = mergeComponentProps(defaultProps, undefined, elementProps)
|
|
191
187
|
elementProps = merged
|
|
192
188
|
}
|
|
193
189
|
|
|
@@ -229,7 +225,15 @@ export function resolveStaticElement(
|
|
|
229
225
|
theme,
|
|
230
226
|
themeName,
|
|
231
227
|
componentState,
|
|
232
|
-
styleProps
|
|
228
|
+
styleProps,
|
|
229
|
+
undefined,
|
|
230
|
+
undefined,
|
|
231
|
+
undefined,
|
|
232
|
+
undefined,
|
|
233
|
+
undefined,
|
|
234
|
+
undefined,
|
|
235
|
+
undefined,
|
|
236
|
+
styleStaticConfig
|
|
233
237
|
)
|
|
234
238
|
} catch (err: any) {
|
|
235
239
|
return {
|
package/src/styled.tsx
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AnchorHTMLAttributes,
|
|
3
|
-
ButtonHTMLAttributes,
|
|
4
|
-
FormHTMLAttributes,
|
|
5
|
-
HTMLAttributes,
|
|
6
|
-
InputHTMLAttributes,
|
|
7
|
-
LabelHTMLAttributes,
|
|
8
|
-
SelectHTMLAttributes,
|
|
9
|
-
TextareaHTMLAttributes,
|
|
10
|
-
} from 'react'
|
|
11
1
|
import { createComponent } from './createComponent'
|
|
12
|
-
import {
|
|
13
|
-
componentDisplayName,
|
|
14
|
-
setComponentDisplayName,
|
|
15
|
-
} from './helpers/componentDisplayName'
|
|
2
|
+
import { componentDisplayName } from './helpers/componentDisplayName'
|
|
16
3
|
import { mergeVariants } from './helpers/mergeVariants'
|
|
17
4
|
import type { FrontendComponent, StyleFrontend } from './helpers/styleFrontend'
|
|
18
5
|
import { warnOnce } from './helpers/warnOnce'
|
|
19
6
|
import type { GetRef } from './interfaces/GetRef'
|
|
20
7
|
import { getReactNativeConfig } from './setupReactNative'
|
|
21
8
|
import type {
|
|
22
|
-
CompoundVariantDefinition,
|
|
23
9
|
GetBaseStyles,
|
|
24
10
|
GetNonStyledProps,
|
|
25
11
|
GetProps,
|
|
@@ -27,17 +13,12 @@ import type {
|
|
|
27
13
|
GetStyledVariants,
|
|
28
14
|
InferStyleProps,
|
|
29
15
|
InferStyledProps,
|
|
30
|
-
StackStyle,
|
|
31
|
-
StackStyleBase,
|
|
32
16
|
StaticConfig,
|
|
33
17
|
StaticConfigPublic,
|
|
34
18
|
StylableComponent,
|
|
35
19
|
StyledContext,
|
|
36
20
|
TamaDefer,
|
|
37
21
|
TamaguiComponent,
|
|
38
|
-
TamaguiComponentPropsBase,
|
|
39
|
-
TextStyle,
|
|
40
|
-
TextStylePropsBase,
|
|
41
22
|
ThemeValueByCategory,
|
|
42
23
|
ThemeValueGet,
|
|
43
24
|
VariantDefinitions,
|
|
@@ -53,9 +34,8 @@ type AreVariantsUndefined<Variants> =
|
|
|
53
34
|
// because we pass in the Generic variants which for some reason has this :)
|
|
54
35
|
Required<Variants> extends { _isEmpty: 1 } ? true : false
|
|
55
36
|
|
|
56
|
-
// these stay strict (exact branch keys): defaultVariants, options roots,
|
|
57
|
-
//
|
|
58
|
-
// there remain type errors. the conditional flat forms (clause strings and
|
|
37
|
+
// these stay strict (exact branch keys): defaultVariants, options roots, and
|
|
38
|
+
// the stored component variants all use them, so typos there remain type errors. the conditional flat forms (clause strings and
|
|
59
39
|
// objects) widen only at the final public props, in WithThemeAndShorthands
|
|
60
40
|
type GetVariantAcceptedValues<V> = V extends object
|
|
61
41
|
? {
|
|
@@ -109,18 +89,6 @@ export type StyledOptions<
|
|
|
109
89
|
ContextPropKeys,
|
|
110
90
|
keyof GetStyledContextAllProps<Context> & string
|
|
111
91
|
>[]
|
|
112
|
-
compoundVariants?: readonly CompoundVariantDefinition<
|
|
113
|
-
NoInferLocal<
|
|
114
|
-
GetCompoundVariantMatchProps<
|
|
115
|
-
ParentComponent,
|
|
116
|
-
StyledConfig,
|
|
117
|
-
Variants,
|
|
118
|
-
Context,
|
|
119
|
-
ContextPropKeys
|
|
120
|
-
>
|
|
121
|
-
>,
|
|
122
|
-
Partial<InferStyleProps<ParentComponent, StyledConfig>>
|
|
123
|
-
>[]
|
|
124
92
|
render?: string | React.ReactElement
|
|
125
93
|
}
|
|
126
94
|
|
|
@@ -154,15 +122,6 @@ type GetStyledContextVariantProps<
|
|
|
154
122
|
Keys extends string,
|
|
155
123
|
> = Omit<GetStyledContextProps<Context, Keys>, keyof GetProps<ParentComponent>>
|
|
156
124
|
|
|
157
|
-
type GetCompoundVariantMatchProps<
|
|
158
|
-
ParentComponent extends StylableComponent,
|
|
159
|
-
StyledConfig extends StaticConfigPublic,
|
|
160
|
-
Variants extends VariantDefinitions<ParentComponent, StyledConfig>,
|
|
161
|
-
Context,
|
|
162
|
-
ContextPropKeys extends string,
|
|
163
|
-
> = Omit<StyledMergedVariants<ParentComponent, StyledConfig, Variants>, '_isEmpty'> &
|
|
164
|
-
GetStyledContextProps<Context, ContextPropKeys>
|
|
165
|
-
|
|
166
125
|
type StyledCustomTokenProps<
|
|
167
126
|
ParentComponent extends StylableComponent,
|
|
168
127
|
StyledConfig extends StaticConfigPublic,
|
|
@@ -233,178 +192,11 @@ type StyledComponentResult<
|
|
|
233
192
|
GetStaticConfig<ParentComponent, StyledConfig>
|
|
234
193
|
>
|
|
235
194
|
|
|
236
|
-
// ---- HTML element support for styledHtml('tagName') ----
|
|
237
|
-
|
|
238
|
-
// text-like elements use TextStylePropsBase
|
|
239
|
-
type TextLikeElements =
|
|
240
|
-
| 'a'
|
|
241
|
-
| 'abbr'
|
|
242
|
-
| 'b'
|
|
243
|
-
| 'bdi'
|
|
244
|
-
| 'bdo'
|
|
245
|
-
| 'cite'
|
|
246
|
-
| 'code'
|
|
247
|
-
| 'data'
|
|
248
|
-
| 'del'
|
|
249
|
-
| 'dfn'
|
|
250
|
-
| 'em'
|
|
251
|
-
| 'i'
|
|
252
|
-
| 'ins'
|
|
253
|
-
| 'kbd'
|
|
254
|
-
| 'label'
|
|
255
|
-
| 'mark'
|
|
256
|
-
| 'q'
|
|
257
|
-
| 's'
|
|
258
|
-
| 'samp'
|
|
259
|
-
| 'small'
|
|
260
|
-
| 'span'
|
|
261
|
-
| 'strong'
|
|
262
|
-
| 'sub'
|
|
263
|
-
| 'sup'
|
|
264
|
-
| 'time'
|
|
265
|
-
| 'u'
|
|
266
|
-
| 'var'
|
|
267
|
-
|
|
268
|
-
// props that conflict with tamagui style props
|
|
269
|
-
type ConflictingHTMLProps =
|
|
270
|
-
| 'color'
|
|
271
|
-
| 'display'
|
|
272
|
-
| 'height'
|
|
273
|
-
| 'width'
|
|
274
|
-
| 'size'
|
|
275
|
-
| 'left'
|
|
276
|
-
| 'right'
|
|
277
|
-
| 'top'
|
|
278
|
-
| 'bottom'
|
|
279
|
-
| 'translate'
|
|
280
|
-
| 'content'
|
|
281
|
-
|
|
282
|
-
// map HTML tag to its specific attributes
|
|
283
|
-
type HTMLElementSpecificProps<T extends keyof HTMLElementTagNameMap> = T extends 'a'
|
|
284
|
-
? Omit<AnchorHTMLAttributes<HTMLAnchorElement>, ConflictingHTMLProps>
|
|
285
|
-
: T extends 'button'
|
|
286
|
-
? Omit<ButtonHTMLAttributes<HTMLButtonElement>, ConflictingHTMLProps>
|
|
287
|
-
: T extends 'input'
|
|
288
|
-
? Omit<InputHTMLAttributes<HTMLInputElement>, ConflictingHTMLProps>
|
|
289
|
-
: T extends 'select'
|
|
290
|
-
? Omit<SelectHTMLAttributes<HTMLSelectElement>, ConflictingHTMLProps>
|
|
291
|
-
: T extends 'textarea'
|
|
292
|
-
? Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, ConflictingHTMLProps>
|
|
293
|
-
: T extends 'form'
|
|
294
|
-
? Omit<FormHTMLAttributes<HTMLFormElement>, ConflictingHTMLProps>
|
|
295
|
-
: T extends 'label'
|
|
296
|
-
? Omit<LabelHTMLAttributes<HTMLLabelElement>, ConflictingHTMLProps>
|
|
297
|
-
: Omit<HTMLAttributes<HTMLElement>, ConflictingHTMLProps>
|
|
298
|
-
|
|
299
|
-
// base style props based on element type. the BASE type feeds TamaguiComponent,
|
|
300
|
-
// whose GetFinalProps applies WithThemeAndShorthands itself — passing the
|
|
301
|
-
// already-wrapped TextStyle/StackStyle there wraps twice, which the flat object
|
|
302
|
-
// value form turns into a type-explosion. authored options still use the
|
|
303
|
-
// wrapped form so tokens and clauses typecheck in the definition
|
|
304
|
-
type HTMLElementStyleBase<T extends keyof HTMLElementTagNameMap> =
|
|
305
|
-
T extends TextLikeElements ? TextStylePropsBase : StackStyleBase
|
|
306
|
-
type HTMLElementStyle<T extends keyof HTMLElementTagNameMap> = T extends TextLikeElements
|
|
307
|
-
? TextStyle
|
|
308
|
-
: StackStyle
|
|
309
|
-
|
|
310
|
-
// runtime check for text-like elements
|
|
311
|
-
const textLikeElements = new Set<string>([
|
|
312
|
-
'a',
|
|
313
|
-
'abbr',
|
|
314
|
-
'b',
|
|
315
|
-
'bdi',
|
|
316
|
-
'bdo',
|
|
317
|
-
'cite',
|
|
318
|
-
'code',
|
|
319
|
-
'data',
|
|
320
|
-
'del',
|
|
321
|
-
'dfn',
|
|
322
|
-
'em',
|
|
323
|
-
'i',
|
|
324
|
-
'ins',
|
|
325
|
-
'kbd',
|
|
326
|
-
'label',
|
|
327
|
-
'mark',
|
|
328
|
-
'q',
|
|
329
|
-
's',
|
|
330
|
-
'samp',
|
|
331
|
-
'small',
|
|
332
|
-
'span',
|
|
333
|
-
'strong',
|
|
334
|
-
'sub',
|
|
335
|
-
'sup',
|
|
336
|
-
'time',
|
|
337
|
-
'u',
|
|
338
|
-
'var',
|
|
339
|
-
])
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* styledHtml() for HTML element tags like 'a', 'button', 'div', etc.
|
|
343
|
-
* Automatically provides element-specific props (href for anchors, type for buttons, etc.)
|
|
344
|
-
*
|
|
345
|
-
* @example
|
|
346
|
-
* const StyledAnchor = styledHtml('a', {
|
|
347
|
-
* color: 'blue10',
|
|
348
|
-
* textDecorationLine: 'underline',
|
|
349
|
-
* })
|
|
350
|
-
* // StyledAnchor now accepts `href` prop with proper typing
|
|
351
|
-
* <StyledAnchor href="/path">Link</StyledAnchor>
|
|
352
|
-
*/
|
|
353
|
-
export function styledHtml<
|
|
354
|
-
Tag extends keyof HTMLElementTagNameMap,
|
|
355
|
-
Variants extends VariantDefinitions<any, any> | undefined = undefined,
|
|
356
|
-
>(
|
|
357
|
-
tag: Tag,
|
|
358
|
-
options?: Partial<HTMLElementStyle<Tag>> & {
|
|
359
|
-
displayName?: string
|
|
360
|
-
variants?: Variants
|
|
361
|
-
defaultVariants?: GetVariantAcceptedValues<NonNullable<Variants>>
|
|
362
|
-
context?: StyledContext
|
|
363
|
-
}
|
|
364
|
-
) {
|
|
365
|
-
type StyleBase = HTMLElementStyleBase<Tag>
|
|
366
|
-
type HTMLProps = HTMLElementSpecificProps<Tag>
|
|
367
|
-
type VariantProps = Variants extends undefined
|
|
368
|
-
? {}
|
|
369
|
-
: AreVariantsUndefined<NonNullable<Variants>> extends true
|
|
370
|
-
? {}
|
|
371
|
-
: GetVariantAcceptedValues<NonNullable<Variants>>
|
|
372
|
-
|
|
373
|
-
const isText = textLikeElements.has(tag)
|
|
374
|
-
const { variants, displayName, defaultVariants, context, ...defaultProps } =
|
|
375
|
-
options || {}
|
|
376
|
-
|
|
377
|
-
const conf: Partial<StaticConfig> = {
|
|
378
|
-
Component: tag as any,
|
|
379
|
-
variants: variants as any,
|
|
380
|
-
defaultProps: defaultProps as any,
|
|
381
|
-
defaultVariants,
|
|
382
|
-
isText,
|
|
383
|
-
acceptsClassName: true,
|
|
384
|
-
context,
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
if (defaultProps['children'] || context) {
|
|
388
|
-
conf.neverFlatten = true
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
const component = setComponentDisplayName(createComponent(conf), displayName)
|
|
392
|
-
|
|
393
|
-
return component as any as TamaguiComponent<
|
|
394
|
-
TamaDefer,
|
|
395
|
-
HTMLElementTagNameMap[Tag],
|
|
396
|
-
TamaguiComponentPropsBase & HTMLProps,
|
|
397
|
-
StyleBase,
|
|
398
|
-
VariantProps,
|
|
399
|
-
{}
|
|
400
|
-
>
|
|
401
|
-
}
|
|
402
|
-
|
|
403
195
|
/**
|
|
404
196
|
* styled() for creating Tamagui components from other components.
|
|
405
197
|
*
|
|
406
198
|
* Core's public overload is object-only. The class-string form belongs to
|
|
407
|
-
* `@tamagui/tailwind`, which reaches
|
|
199
|
+
* `@tamagui/tailwind`, which reaches the implementation through
|
|
408
200
|
* `createFrontendStyled`.
|
|
409
201
|
*/
|
|
410
202
|
function styled<
|
|
@@ -599,13 +391,11 @@ function styledImpl<
|
|
|
599
391
|
defaultVariants,
|
|
600
392
|
context,
|
|
601
393
|
contextProps,
|
|
602
|
-
compoundVariants,
|
|
603
394
|
...defaultProps
|
|
604
395
|
} = (options || {}) as Record<string, any>
|
|
605
396
|
|
|
606
397
|
let parentDefaultVariants
|
|
607
398
|
let parentDefaultProps
|
|
608
|
-
let parentCompoundVariants
|
|
609
399
|
const mergedBaseClassName =
|
|
610
400
|
parentStaticConfig?.baseClassName && baseClassName
|
|
611
401
|
? `${parentStaticConfig.baseClassName} ${baseClassName}`
|
|
@@ -636,14 +426,9 @@ function styledImpl<
|
|
|
636
426
|
if (parentStaticConfig.variants) {
|
|
637
427
|
variants = mergeVariants(parentStaticConfig.variants, variants)
|
|
638
428
|
}
|
|
639
|
-
parentCompoundVariants = parentStaticConfig.compoundVariants
|
|
640
429
|
}
|
|
641
430
|
}
|
|
642
431
|
|
|
643
|
-
const mergedCompoundVariants =
|
|
644
|
-
parentCompoundVariants || compoundVariants
|
|
645
|
-
? [...(parentCompoundVariants || []), ...(compoundVariants || [])]
|
|
646
|
-
: undefined
|
|
647
432
|
const mergedContext = context || parentStaticConfig?.context
|
|
648
433
|
const mergedContextProps = context
|
|
649
434
|
? contextProps
|
|
@@ -674,7 +459,6 @@ function styledImpl<
|
|
|
674
459
|
Component,
|
|
675
460
|
}),
|
|
676
461
|
variants,
|
|
677
|
-
compoundVariants: mergedCompoundVariants,
|
|
678
462
|
baseClassName: mergedBaseClassName,
|
|
679
463
|
defaultProps,
|
|
680
464
|
defaultVariants,
|
|
@@ -688,6 +472,7 @@ function styledImpl<
|
|
|
688
472
|
...reactNativeConfig,
|
|
689
473
|
isStyledHOC: Boolean(parentStaticConfig?.isHOC),
|
|
690
474
|
parentStaticConfig,
|
|
475
|
+
displayName: displayName || (ComponentIn as any)[componentDisplayName],
|
|
691
476
|
// only an explicitly bound frontend overrides the one inherited from the parent
|
|
692
477
|
...(frontend && { styleFrontend: frontend }),
|
|
693
478
|
}
|
|
@@ -704,10 +489,7 @@ function styledImpl<
|
|
|
704
489
|
return conf
|
|
705
490
|
})()
|
|
706
491
|
|
|
707
|
-
const component =
|
|
708
|
-
createComponent(staticConfigProps || {}),
|
|
709
|
-
displayName || (ComponentIn as any)[componentDisplayName]
|
|
710
|
-
)
|
|
492
|
+
const component = createComponent(staticConfigProps || {})
|
|
711
493
|
|
|
712
494
|
for (const key in ComponentIn) {
|
|
713
495
|
// dont inherit propTypes
|
|
@@ -720,43 +502,4 @@ function styledImpl<
|
|
|
720
502
|
return component as any as StyledComponent
|
|
721
503
|
}
|
|
722
504
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
type StyledHtmlFactory<Tag extends keyof HTMLElementTagNameMap> = <
|
|
726
|
-
Variants extends VariantDefinitions<any, any> | undefined = undefined,
|
|
727
|
-
>(
|
|
728
|
-
options?: Partial<HTMLElementStyle<Tag>> & {
|
|
729
|
-
displayName?: string
|
|
730
|
-
variants?: Variants
|
|
731
|
-
defaultVariants?: GetVariantAcceptedValues<NonNullable<Variants>>
|
|
732
|
-
context?: StyledContext
|
|
733
|
-
}
|
|
734
|
-
) => TamaguiComponent<
|
|
735
|
-
TamaDefer,
|
|
736
|
-
HTMLElementTagNameMap[Tag],
|
|
737
|
-
TamaguiComponentPropsBase & HTMLElementSpecificProps<Tag>,
|
|
738
|
-
HTMLElementStyleBase<Tag>,
|
|
739
|
-
Variants extends undefined
|
|
740
|
-
? {}
|
|
741
|
-
: AreVariantsUndefined<NonNullable<Variants>> extends true
|
|
742
|
-
? {}
|
|
743
|
-
: GetVariantAcceptedValues<NonNullable<Variants>>,
|
|
744
|
-
{}
|
|
745
|
-
>
|
|
746
|
-
|
|
747
|
-
type StyledHtmlFactories = {
|
|
748
|
-
[K in keyof HTMLElementTagNameMap]: StyledHtmlFactory<K>
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
// use a proxy to make styled.a(), styled.div() etc work
|
|
752
|
-
const styledExport = new Proxy(styled as typeof styled & StyledHtmlFactories, {
|
|
753
|
-
get(target, prop: string) {
|
|
754
|
-
if (prop in target) {
|
|
755
|
-
return (target as any)[prop]
|
|
756
|
-
}
|
|
757
|
-
// return factory for HTML elements
|
|
758
|
-
return (options: any) => styledHtml(prop as keyof HTMLElementTagNameMap, options)
|
|
759
|
-
},
|
|
760
|
-
})
|
|
761
|
-
|
|
762
|
-
export { styledExport as styled }
|
|
505
|
+
export { styled }
|
package/src/types.tsx
CHANGED
|
@@ -2122,7 +2122,7 @@ type MaybeOmitLonghands<A> = OnlyShorthandStyleProps extends true
|
|
|
2122
2122
|
// variant props at the call site take the same conditional forms as style
|
|
2123
2123
|
// values: density="compact sm:roomy" and density={{ default: 'compact', sm: 'roomy' }}.
|
|
2124
2124
|
// the widening happens only here, at the final public props, so every
|
|
2125
|
-
// definition-side type (defaultVariants,
|
|
2125
|
+
// definition-side type (defaultVariants, inheritance)
|
|
2126
2126
|
// keeps the exact branch-key unions
|
|
2127
2127
|
export type WithFlatVariantValues<Variants> = {
|
|
2128
2128
|
[Key in keyof Variants]?: FlatStyleValue<NonNullable<Variants[Key]>>
|
|
@@ -2789,7 +2789,6 @@ export type TextProps = TextNonStyleProps & TextStyle
|
|
|
2789
2789
|
|
|
2790
2790
|
export interface ThemeableProps {
|
|
2791
2791
|
theme?: ThemeName | null
|
|
2792
|
-
themeReset?: boolean
|
|
2793
2792
|
debug?: DebugProp
|
|
2794
2793
|
}
|
|
2795
2794
|
|
|
@@ -3009,20 +3008,6 @@ export type GenericVariantDefinitions = {
|
|
|
3009
3008
|
}
|
|
3010
3009
|
}
|
|
3011
3010
|
|
|
3012
|
-
export type CompoundVariantDefinition<
|
|
3013
|
-
MatchProps extends Record<string, any> = Record<string, any>,
|
|
3014
|
-
StyleProps extends Record<string, any> = Record<string, any>,
|
|
3015
|
-
> = {
|
|
3016
|
-
[Key in keyof MatchProps]?: MatchProps[Key] | readonly MatchProps[Key][]
|
|
3017
|
-
} & {
|
|
3018
|
-
style: StyleProps | StaticStyleInput
|
|
3019
|
-
}
|
|
3020
|
-
|
|
3021
|
-
export type GenericCompoundVariant = CompoundVariantDefinition<
|
|
3022
|
-
Record<string, any>,
|
|
3023
|
-
Record<string, any>
|
|
3024
|
-
>
|
|
3025
|
-
|
|
3026
3011
|
export type StaticConfigPublic = {
|
|
3027
3012
|
defaultProps?: Record<string, any>
|
|
3028
3013
|
|
|
@@ -3090,20 +3075,18 @@ export type StaticConfigPublic = {
|
|
|
3090
3075
|
*/
|
|
3091
3076
|
memo?: boolean
|
|
3092
3077
|
|
|
3093
|
-
compoundVariants?: readonly GenericCompoundVariant[]
|
|
3094
|
-
|
|
3095
3078
|
contextProps?: readonly string[]
|
|
3096
3079
|
}
|
|
3097
3080
|
|
|
3098
3081
|
type StaticConfigBase = StaticConfigPublic & {
|
|
3099
3082
|
Component?: FunctionComponent<any> & StaticComponentObject<any, any, any, any, any, any>
|
|
3100
3083
|
|
|
3084
|
+
displayName?: string
|
|
3085
|
+
|
|
3101
3086
|
baseStyle?: Record<string, any>
|
|
3102
3087
|
|
|
3103
3088
|
variants?: GenericVariantDefinitions
|
|
3104
3089
|
|
|
3105
|
-
compoundVariants?: readonly GenericCompoundVariant[]
|
|
3106
|
-
|
|
3107
3090
|
context?: StyledContext
|
|
3108
3091
|
|
|
3109
3092
|
contextProps?: readonly string[]
|
|
@@ -3160,25 +3143,22 @@ export type StylableComponent =
|
|
|
3160
3143
|
| ReactComponentWithRef<any, any>
|
|
3161
3144
|
| (new (props: any) => any)
|
|
3162
3145
|
|
|
3163
|
-
export
|
|
3164
|
-
'Size'
|
|
3165
|
-
'Space'
|
|
3166
|
-
'Color'
|
|
3167
|
-
'Radius'
|
|
3168
|
-
'ZIndex'
|
|
3169
|
-
'Theme'
|
|
3170
|
-
'FontSize'
|
|
3171
|
-
'FontStyle'
|
|
3172
|
-
'FontTransform'
|
|
3173
|
-
'FontLineHeight'
|
|
3174
|
-
'FontLetterSpacing'
|
|
3175
|
-
'number'
|
|
3176
|
-
'string'
|
|
3177
|
-
'boolean'
|
|
3178
|
-
'any'
|
|
3179
|
-
] as const
|
|
3180
|
-
|
|
3181
|
-
export type VariantResolverName = (typeof variantResolverNames)[number]
|
|
3146
|
+
export type VariantResolverName =
|
|
3147
|
+
| 'Size'
|
|
3148
|
+
| 'Space'
|
|
3149
|
+
| 'Color'
|
|
3150
|
+
| 'Radius'
|
|
3151
|
+
| 'ZIndex'
|
|
3152
|
+
| 'Theme'
|
|
3153
|
+
| 'FontSize'
|
|
3154
|
+
| 'FontStyle'
|
|
3155
|
+
| 'FontTransform'
|
|
3156
|
+
| 'FontLineHeight'
|
|
3157
|
+
| 'FontLetterSpacing'
|
|
3158
|
+
| 'number'
|
|
3159
|
+
| 'string'
|
|
3160
|
+
| 'boolean'
|
|
3161
|
+
| 'any'
|
|
3182
3162
|
|
|
3183
3163
|
type TrimWhitespace = ' ' | '\n' | '\t' | '\r' | '\v' | '\f'
|
|
3184
3164
|
|
|
@@ -3390,7 +3370,6 @@ export type ResolveVariableAs =
|
|
|
3390
3370
|
export type SplitStyleProps = {
|
|
3391
3371
|
displayName?: string
|
|
3392
3372
|
styledContext?: Record<string, any>
|
|
3393
|
-
styledContextKeys?: Set<string>
|
|
3394
3373
|
mediaState?: Record<string, boolean>
|
|
3395
3374
|
noClass?: boolean
|
|
3396
3375
|
noExpand?: boolean
|
package/src/views/Text.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { stylePropsTextOnly, validStyles } from '@tamagui/helpers'
|
|
2
2
|
|
|
3
3
|
import { createComponent } from '../createComponent'
|
|
4
|
-
import { setComponentDisplayName } from '../helpers/componentDisplayName'
|
|
5
4
|
import type {
|
|
6
5
|
StaticConfig,
|
|
7
6
|
TamaguiTextElement,
|
|
@@ -70,9 +69,9 @@ export const textStaticConfig: StaticConfig = {
|
|
|
70
69
|
},
|
|
71
70
|
}
|
|
72
71
|
|
|
73
|
-
export const Text =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
)
|
|
72
|
+
export const Text = createComponent<
|
|
73
|
+
TextProps,
|
|
74
|
+
Text,
|
|
75
|
+
TextNonStyleProps,
|
|
76
|
+
TextStylePropsBase
|
|
77
|
+
>({ ...textStaticConfig, displayName: 'Text' })
|
package/src/views/View.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { validStyles } from '@tamagui/helpers'
|
|
2
2
|
|
|
3
3
|
import { createComponent } from '../createComponent'
|
|
4
|
-
import { setComponentDisplayName } from '../helpers/componentDisplayName'
|
|
5
4
|
import type {
|
|
6
5
|
StackNonStyleProps,
|
|
7
6
|
StackStyle,
|
|
@@ -26,9 +25,9 @@ export const viewStaticConfig: StaticConfig = {
|
|
|
26
25
|
validStyles,
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
export const View =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)
|
|
28
|
+
export const View = createComponent<
|
|
29
|
+
ViewProps,
|
|
30
|
+
View,
|
|
31
|
+
ViewNonStyleProps,
|
|
32
|
+
ViewStylePropsBase
|
|
33
|
+
>({ ...viewStaticConfig, displayName: 'View' })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2C,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAqC/D,OAAO,KAAK,EASV,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EAOf,MAAM,SAAS,CAAA;AAahB,KAAK,iBAAiB,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,CAAA;AAEpF,eAAO,MAAM,kBAAkB,wBAA+B,CAAA;AAwK9D,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EACnD,GAAG,SAAS,cAAc,GAAG,cAAc,EAC3C,SAAS,GAAG,KAAK,EACjB,UAAU,SAAS,MAAM,GAAG,KAAK,EACjC,YAAY,EAAE,YAAY,wEA07D3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStyledHOC.d.ts","sourceRoot":"","sources":["../src/createStyledHOC.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,IAAI,QAAQ,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"createStyledHOC.d.ts","sourceRoot":"","sources":["../src/createStyledHOC.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,IAAI,QAAQ,EAAE,MAAM,OAAO,CAAA;AAGnE,OAAO,KAAK,EACV,aAAa,EAEb,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EAEV,MAAM,SAAS,CAAA;AAEhB,wBAAgB,eAAe,CAC7B,KAAK,EACL,GAAG,EACH,cAAc,EACd,UAAU,SAAS,MAAM,EACzB,YAAY,EACZ,sBAAsB,EACtB,WAAW,SAAS,MAAM,GAAG,EAAE,EAE/B,SAAS,EAAE,gBAAgB,CACzB,KAAK,EACL,GAAG,EACH,cAAc,EACd,UAAU,EACV,YAAY,EACZ,sBAAsB,CACvB,EACD,MAAM,EAAE,CACN,KAAK,EAAE,OAAO,CACZ,KAAK,SAAS,SAAS,GACnB,aAAa,CAAC,cAAc,EAAE,UAAU,EAAE,YAAY,CAAC,GACvD,KAAK,CACV,GACC,WAAW,EACb,GAAG,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KACzB,SAAS,EACd,OAAO,CAAC,EAAE,gBAAgB,GACzB,gBAAgB,CAKjB,MAAM,WAAW,SAAS,KAAK,GAC3B,KAAK,GACL,oBAAoB,CAClB,KAAK,SAAS,SAAS,GACnB,aAAa,CAAC,cAAc,EAAE,UAAU,EAAE,YAAY,CAAC,GACvD,KAAK,EACT,WAAW,CACZ,EACL,GAAG,EACH,cAAc,GAAG,WAAW,EAC5B,UAAU,EACV,YAAY,EACZ,sBAAsB,CACvB,CA4EA"}
|
package/types/dom/html.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/dom/html.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/dom/html.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,cAAc,CAAA;AAGrB,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EAEd,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAU9C,2FAA2F;AAC3F,KAAK,cAAc,CAAC,QAAQ,EAAE,YAAY,EAAE,oBAAoB,IAAI,IAAI,CACtE,QAAQ,EACR,MAAM,oBAAoB,CAC3B,GACC,YAAY,CAAA;AAsxBd,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDhB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"htmlRuntime.native.d.ts","sourceRoot":"","sources":["../../src/dom/htmlRuntime.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAA;AAM7D;;;;;;;;;;;;;;;;;;GAkBG;AAEH,kEAAkE;AAClE,MAAM,MAAM,aAAa,GAAG;IAC1B,sEAAsE;IACtE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACzC,0EAA0E;IAC1E,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IAC3D,0EAA0E;IAC1E,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAClD,0DAA0D;IAC1D,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACtC,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAA;IACpB,oEAAoE;IACpE,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACrC,uDAAuD;IACvD,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;CACxD,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0EAA0E;IAC1E,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;CAC7B,CAAA;AA4ID;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,IAChC,KAAK,SAAS,aAAa,CAAC,GAAG,CAAC,OAChD,MAAM,aACA,KAAK,SACV,UAAU,KACf,KAAK,
|
|
1
|
+
{"version":3,"file":"htmlRuntime.native.d.ts","sourceRoot":"","sources":["../../src/dom/htmlRuntime.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,OAAO,CAAA;AAM7D;;;;;;;;;;;;;;;;;;GAkBG;AAEH,kEAAkE;AAClE,MAAM,MAAM,aAAa,GAAG;IAC1B,sEAAsE;IACtE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACzC,0EAA0E;IAC1E,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IAC3D,0EAA0E;IAC1E,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAClD,0DAA0D;IAC1D,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACtC,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAA;IACpB,oEAAoE;IACpE,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACrC,uDAAuD;IACvD,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;CACxD,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0EAA0E;IAC1E,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;CAC7B,CAAA;AA4ID;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,IAChC,KAAK,SAAS,aAAa,CAAC,GAAG,CAAC,OAChD,MAAM,aACA,KAAK,SACV,UAAU,KACf,KAAK,CAOT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;QACxC,KAAK;kBAAgB,MAAM;EAM7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.native.d.ts","sourceRoot":"","sources":["../../src/dom/primitives.native.tsx"],"names":[],"mappings":"AASA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,GAAG,EACT,MAAM,OAAO,CAAA;AAWd,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACb,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"primitives.native.d.ts","sourceRoot":"","sources":["../../src/dom/primitives.native.tsx"],"names":[],"mappings":"AASA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,GAAG,EACT,MAAM,OAAO,CAAA;AAWd,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACb,MAAM,YAAY,CAAA;AAkEnB,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,aAAa,GACd,EAAE;IACD,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;CACtB,8FAKA;AAED,wBAAgB,2BAA2B;;EAE1C;AA2HD,mFAAmF;AACnF,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,EACjB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,cAhME,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CA+N7D;AAgKD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,8FAG1C;AAkBD,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,8FAG1C;AAkBD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,8FAG5C;AA0BD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,8FAGpD;AAkHD,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,8FAEjD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,8FAEjD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,8FAEnD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,8FAE3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentDisplayName.d.ts","sourceRoot":"","sources":["../../src/helpers/componentDisplayName.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,eAEhC,CAAA
|
|
1
|
+
{"version":3,"file":"componentDisplayName.d.ts","sourceRoot":"","sources":["../../src/helpers/componentDisplayName.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,eAEhC,CAAA"}
|