@tamagui/linear-gradient 1.46.2 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/types/LinearGradient.shared.d.ts +1 -1
- package/dist/jsx/LinearGradient.mjs +0 -2
- package/dist/jsx/LinearGradient.mjs.map +0 -6
- package/dist/jsx/LinearGradient.native.mjs +0 -8
- package/dist/jsx/LinearGradient.native.mjs.map +0 -6
- package/dist/jsx/LinearGradient.shared.mjs +0 -47
- package/dist/jsx/LinearGradient.shared.mjs.map +0 -6
- package/dist/jsx/index.mjs +0 -2
- package/dist/jsx/index.mjs.map +0 -6
- package/dist/jsx/linear-gradient.mjs +0 -5
- package/dist/jsx/linear-gradient.mjs.map +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/linear-gradient",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.0",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@tamagui/core": "1.
|
|
35
|
-
"@tamagui/stacks": "1.
|
|
34
|
+
"@tamagui/core": "1.47.0",
|
|
35
|
+
"@tamagui/stacks": "1.47.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "*"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "1.
|
|
41
|
+
"@tamagui/build": "1.47.0",
|
|
42
42
|
"expo-linear-gradient": "~12.3.0",
|
|
43
43
|
"react": "^18.2.0"
|
|
44
44
|
},
|
|
@@ -44,7 +44,7 @@ export declare const LinearGradient: import("@tamagui/core").ReactComponentWithR
|
|
|
44
44
|
readonly fullscreen?: boolean | undefined;
|
|
45
45
|
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
46
46
|
}>>>, import("@tamagui/core").TamaguiElement> & {
|
|
47
|
-
staticConfig: import("@tamagui/core").
|
|
47
|
+
staticConfig: import("@tamagui/core").StaticConfig;
|
|
48
48
|
styleable: import("@tamagui/core").Styleable<Omit<import("react-native").ViewProps, "style" | "children" | "onLayout" | "display" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & {
|
|
49
49
|
style?: import("@tamagui/core").StyleProp<ViewStyle | import("react").CSSProperties | (import("react").CSSProperties & ViewStyle)>;
|
|
50
50
|
} & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & import("@tamagui/core/types/reactNativeTypes").RNViewProps & Omit<{}, "elevation" | "fullscreen"> & {
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getVariable,
|
|
3
|
-
styled,
|
|
4
|
-
useProps,
|
|
5
|
-
useTheme
|
|
6
|
-
} from "@tamagui/core";
|
|
7
|
-
import { YStack } from "@tamagui/stacks";
|
|
8
|
-
import {
|
|
9
|
-
LinearGradient as ExpoLinearGradient
|
|
10
|
-
} from "./linear-gradient";
|
|
11
|
-
const LinearGradient = YStack.styleable((propsIn, ref) => {
|
|
12
|
-
const props = useProps(propsIn);
|
|
13
|
-
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
14
|
-
const colors = useThemeColors(colorsProp || []);
|
|
15
|
-
return <LinearGradientFrame ref={ref} {...stackProps}><ExpoLinearGradient
|
|
16
|
-
start={start}
|
|
17
|
-
end={end}
|
|
18
|
-
colors={colors}
|
|
19
|
-
locations={locations}
|
|
20
|
-
style={absoluteFill}
|
|
21
|
-
>{children}</ExpoLinearGradient></LinearGradientFrame>;
|
|
22
|
-
});
|
|
23
|
-
const absoluteFill = {
|
|
24
|
-
position: "absolute",
|
|
25
|
-
top: 0,
|
|
26
|
-
left: 0,
|
|
27
|
-
right: 0,
|
|
28
|
-
bottom: 0
|
|
29
|
-
};
|
|
30
|
-
const LinearGradientFrame = styled(YStack, {
|
|
31
|
-
name: "LinearGradient",
|
|
32
|
-
overflow: "hidden",
|
|
33
|
-
position: "relative"
|
|
34
|
-
});
|
|
35
|
-
const useThemeColors = (colors) => {
|
|
36
|
-
const theme = useTheme();
|
|
37
|
-
return colors.map((color) => {
|
|
38
|
-
if (color[0] === "$") {
|
|
39
|
-
return getVariable(theme[color] || color);
|
|
40
|
-
}
|
|
41
|
-
return color;
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
export {
|
|
45
|
-
LinearGradient
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=LinearGradient.shared.mjs.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/LinearGradient.shared.tsx"],
|
|
4
|
-
"mappings": "AAAA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAA2B;AAGpC;AAAA,EACE,kBAAkB;AAAA,OAEb;AAQA,MAAM,iBAAiB,OAAO,UAA+B,CAAC,SAAS,QAAQ;AACpF,QAAM,QAAQ,SAAS,OAAO;AAE9B,QAAM,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI;AAC/E,QAAM,SAAS,eAAe,cAAc,CAAC,CAAC;AAC9C,SACE,CAAC,oBAAoB,KAAK,SAAgB,YACxC,CAAC;AAAA,IACC,OAAO;AAAA,IACP,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,OAAO;AAAA,IAEN,SACH,EARC,mBASH,EAVC;AAYL,CAAC;AAED,MAAM,eAA0B;AAAA,EAC9B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,sBAAsB,OAAO,QAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC;AAGD,MAAM,iBAAiB,CAAC,WAAqB;AAC3C,QAAM,QAAQ,SAAS;AACvB,SAAO,OAAO,IAAI,CAAC,UAAU;AAC3B,QAAI,MAAM,CAAC,MAAM,KAAK;AACpB,aAAO,YAAY,MAAM,KAAK,KAAK,KAAK;AAAA,IAC1C;AACA,WAAO;AAAA,EACT,CAAC;AACH;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
package/dist/jsx/index.mjs
DELETED
package/dist/jsx/index.mjs.map
DELETED