@tamagui/linear-gradient 1.15.40 → 1.16.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/dist/cjs/LinearGradient.shared.js +16 -31
- package/dist/cjs/LinearGradient.shared.js.map +1 -1
- package/dist/esm/LinearGradient.shared.js +16 -22
- package/dist/esm/LinearGradient.shared.js.map +1 -1
- package/dist/esm/LinearGradient.shared.mjs +16 -22
- package/dist/esm/LinearGradient.shared.mjs.map +1 -1
- package/dist/jsx/LinearGradient.shared.js +12 -18
- package/dist/jsx/LinearGradient.shared.js.map +1 -1
- package/dist/jsx/LinearGradient.shared.mjs +12 -18
- package/dist/jsx/LinearGradient.shared.mjs.map +1 -1
- package/package.json +4 -4
- package/src/LinearGradient.shared.tsx +19 -26
- package/types/LinearGradient.shared.d.ts +24 -3
- package/types/LinearGradient.shared.d.ts.map +1 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var LinearGradient_shared_exports = {};
|
|
30
20
|
__export(LinearGradient_shared_exports, {
|
|
@@ -34,28 +24,23 @@ module.exports = __toCommonJS(LinearGradient_shared_exports);
|
|
|
34
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
25
|
var import_core = require("@tamagui/core");
|
|
36
26
|
var import_stacks = require("@tamagui/stacks");
|
|
37
|
-
var React = __toESM(require("react"));
|
|
38
27
|
var import_linear_gradient = require("./linear-gradient");
|
|
39
|
-
const LinearGradient = import_stacks.YStack.
|
|
40
|
-
(0, import_core.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
) });
|
|
56
|
-
})
|
|
57
|
-
)
|
|
58
|
-
);
|
|
28
|
+
const LinearGradient = import_stacks.YStack.styleable((propsIn, ref) => {
|
|
29
|
+
const props = (0, import_core.useMediaPropsActive)(propsIn);
|
|
30
|
+
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
31
|
+
const colors = useThemeColors(colorsProp || []);
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LinearGradientFrame, { ref, ...stackProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
+
import_linear_gradient.LinearGradient,
|
|
34
|
+
{
|
|
35
|
+
start,
|
|
36
|
+
end,
|
|
37
|
+
colors,
|
|
38
|
+
locations,
|
|
39
|
+
style: absoluteFill,
|
|
40
|
+
children
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
43
|
+
});
|
|
59
44
|
const absoluteFill = {
|
|
60
45
|
position: "absolute",
|
|
61
46
|
top: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinearGradient.shared.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BM;AA7BN,kBAOO;AACP,oBAAoC;AAGpC,6BAGO;AAQA,MAAM,iBAAiB,qBAAO,UAA+B,CAAC,SAAS,QAAQ;AACpF,QAAM,YAAQ,iCAAoB,OAAO;AAEzC,QAAM,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI;AAC/E,QAAM,SAAS,eAAe,cAAc,CAAC,CAAC;AAC9C,SACE,4CAAC,uBAAoB,KAAkB,GAAG,YACxC;AAAA,IAAC,uBAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MAEN;AAAA;AAAA,EACH,GACF;AAEJ,CAAC;AAED,MAAM,eAA0B;AAAA,EAC9B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,0BAAsB,oBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC;AAGD,MAAM,iBAAiB,CAAC,WAAqB;AAC3C,QAAM,YAAQ,sBAAS;AACvB,SAAO,OAAO,IAAI,CAAC,UAAU;AAC3B,QAAI,MAAM,CAAC,MAAM,KAAK;AACpB,iBAAO,yBAAY,MAAM,KAAK,KAAK,KAAK;AAAA,IAC1C;AACA,WAAO;AAAA,EACT,CAAC;AACH;",
|
|
5
5
|
"names": ["ExpoLinearGradient"]
|
|
6
6
|
}
|
|
@@ -2,35 +2,29 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import {
|
|
3
3
|
getVariable,
|
|
4
4
|
styled,
|
|
5
|
-
themeable,
|
|
6
5
|
useMediaPropsActive,
|
|
7
6
|
useTheme
|
|
8
7
|
} from "@tamagui/core";
|
|
9
8
|
import { YStack } from "@tamagui/stacks";
|
|
10
|
-
import * as React from "react";
|
|
11
9
|
import {
|
|
12
10
|
LinearGradient as ExpoLinearGradient
|
|
13
11
|
} from "./linear-gradient";
|
|
14
|
-
const LinearGradient = YStack.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
) });
|
|
31
|
-
})
|
|
32
|
-
)
|
|
33
|
-
);
|
|
12
|
+
const LinearGradient = YStack.styleable((propsIn, ref) => {
|
|
13
|
+
const props = useMediaPropsActive(propsIn);
|
|
14
|
+
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
15
|
+
const colors = useThemeColors(colorsProp || []);
|
|
16
|
+
return /* @__PURE__ */ jsx(LinearGradientFrame, { ref, ...stackProps, children: /* @__PURE__ */ jsx(
|
|
17
|
+
ExpoLinearGradient,
|
|
18
|
+
{
|
|
19
|
+
start,
|
|
20
|
+
end,
|
|
21
|
+
colors,
|
|
22
|
+
locations,
|
|
23
|
+
style: absoluteFill,
|
|
24
|
+
children
|
|
25
|
+
}
|
|
26
|
+
) });
|
|
27
|
+
});
|
|
34
28
|
const absoluteFill = {
|
|
35
29
|
position: "absolute",
|
|
36
30
|
top: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinearGradient.shared.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AA6BM;AA7BN;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,oBAAoB,OAAO;AAEzC,QAAM,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI;AAC/E,QAAM,SAAS,eAAe,cAAc,CAAC,CAAC;AAC9C,SACE,oBAAC,uBAAoB,KAAkB,GAAG,YACxC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MAEN;AAAA;AAAA,EACH,GACF;AAEJ,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
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -2,35 +2,29 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import {
|
|
3
3
|
getVariable,
|
|
4
4
|
styled,
|
|
5
|
-
themeable,
|
|
6
5
|
useMediaPropsActive,
|
|
7
6
|
useTheme
|
|
8
7
|
} from "@tamagui/core";
|
|
9
8
|
import { YStack } from "@tamagui/stacks";
|
|
10
|
-
import * as React from "react";
|
|
11
9
|
import {
|
|
12
10
|
LinearGradient as ExpoLinearGradient
|
|
13
11
|
} from "./linear-gradient";
|
|
14
|
-
const LinearGradient = YStack.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
) });
|
|
31
|
-
})
|
|
32
|
-
)
|
|
33
|
-
);
|
|
12
|
+
const LinearGradient = YStack.styleable((propsIn, ref) => {
|
|
13
|
+
const props = useMediaPropsActive(propsIn);
|
|
14
|
+
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
15
|
+
const colors = useThemeColors(colorsProp || []);
|
|
16
|
+
return /* @__PURE__ */ jsx(LinearGradientFrame, { ref, ...stackProps, children: /* @__PURE__ */ jsx(
|
|
17
|
+
ExpoLinearGradient,
|
|
18
|
+
{
|
|
19
|
+
start,
|
|
20
|
+
end,
|
|
21
|
+
colors,
|
|
22
|
+
locations,
|
|
23
|
+
style: absoluteFill,
|
|
24
|
+
children
|
|
25
|
+
}
|
|
26
|
+
) });
|
|
27
|
+
});
|
|
34
28
|
const absoluteFill = {
|
|
35
29
|
position: "absolute",
|
|
36
30
|
top: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinearGradient.shared.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AA6BM;AA7BN;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,oBAAoB,OAAO;AAEzC,QAAM,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI;AAC/E,QAAM,SAAS,eAAe,cAAc,CAAC,CAAC;AAC9C,SACE,oBAAC,uBAAoB,KAAkB,GAAG,YACxC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MAEN;AAAA;AAAA,EACH,GACF;AAEJ,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
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,31 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getVariable,
|
|
3
3
|
styled,
|
|
4
|
-
themeable,
|
|
5
4
|
useMediaPropsActive,
|
|
6
5
|
useTheme
|
|
7
6
|
} from "@tamagui/core";
|
|
8
7
|
import { YStack } from "@tamagui/stacks";
|
|
9
|
-
import * as React from "react";
|
|
10
8
|
import {
|
|
11
9
|
LinearGradient as ExpoLinearGradient
|
|
12
10
|
} from "./linear-gradient";
|
|
13
|
-
const LinearGradient = YStack.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
>{children}</ExpoLinearGradient></LinearGradientFrame>;
|
|
26
|
-
})
|
|
27
|
-
)
|
|
28
|
-
);
|
|
11
|
+
const LinearGradient = YStack.styleable((propsIn, ref) => {
|
|
12
|
+
const props = useMediaPropsActive(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
|
+
});
|
|
29
23
|
const absoluteFill = {
|
|
30
24
|
position: "absolute",
|
|
31
25
|
top: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinearGradient.shared.tsx"],
|
|
4
|
-
"mappings": "AAAA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,
|
|
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,oBAAoB,OAAO;AAEzC,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
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,31 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getVariable,
|
|
3
3
|
styled,
|
|
4
|
-
themeable,
|
|
5
4
|
useMediaPropsActive,
|
|
6
5
|
useTheme
|
|
7
6
|
} from "@tamagui/core";
|
|
8
7
|
import { YStack } from "@tamagui/stacks";
|
|
9
|
-
import * as React from "react";
|
|
10
8
|
import {
|
|
11
9
|
LinearGradient as ExpoLinearGradient
|
|
12
10
|
} from "./linear-gradient";
|
|
13
|
-
const LinearGradient = YStack.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
>{children}</ExpoLinearGradient></LinearGradientFrame>;
|
|
26
|
-
})
|
|
27
|
-
)
|
|
28
|
-
);
|
|
11
|
+
const LinearGradient = YStack.styleable((propsIn, ref) => {
|
|
12
|
+
const props = useMediaPropsActive(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
|
+
});
|
|
29
23
|
const absoluteFill = {
|
|
30
24
|
position: "absolute",
|
|
31
25
|
top: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinearGradient.shared.tsx"],
|
|
4
|
-
"mappings": "AAAA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,
|
|
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,oBAAoB,OAAO;AAEzC,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
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/linear-gradient",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.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.16.0",
|
|
35
|
+
"@tamagui/stacks": "1.16.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "*"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "1.
|
|
41
|
+
"@tamagui/build": "1.16.0",
|
|
42
42
|
"expo-linear-gradient": "^12.0.1",
|
|
43
43
|
"react": "^18.2.0"
|
|
44
44
|
},
|
|
@@ -3,13 +3,11 @@ import {
|
|
|
3
3
|
ThemeTokens,
|
|
4
4
|
getVariable,
|
|
5
5
|
styled,
|
|
6
|
-
themeable,
|
|
7
6
|
useMediaPropsActive,
|
|
8
7
|
useTheme,
|
|
9
8
|
} from '@tamagui/core'
|
|
10
9
|
import { YStack, YStackProps } from '@tamagui/stacks'
|
|
11
|
-
import
|
|
12
|
-
import type { View, ViewStyle } from 'react-native'
|
|
10
|
+
import type { ViewStyle } from 'react-native'
|
|
13
11
|
|
|
14
12
|
import {
|
|
15
13
|
LinearGradient as ExpoLinearGradient,
|
|
@@ -22,30 +20,25 @@ export type LinearGradientProps = Omit<ExpoLinearGradientProps, 'colors'> &
|
|
|
22
20
|
colors?: (ColorTokens | ThemeTokens | (string & {}))[]
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
export const LinearGradient
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
{children}
|
|
43
|
-
</ExpoLinearGradient>
|
|
44
|
-
</LinearGradientFrame>
|
|
45
|
-
)
|
|
46
|
-
})
|
|
23
|
+
export const LinearGradient = YStack.styleable<LinearGradientProps>((propsIn, ref) => {
|
|
24
|
+
const props = useMediaPropsActive(propsIn)
|
|
25
|
+
|
|
26
|
+
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props
|
|
27
|
+
const colors = useThemeColors(colorsProp || [])
|
|
28
|
+
return (
|
|
29
|
+
<LinearGradientFrame ref={ref as any} {...stackProps}>
|
|
30
|
+
<ExpoLinearGradient
|
|
31
|
+
start={start}
|
|
32
|
+
end={end}
|
|
33
|
+
colors={colors}
|
|
34
|
+
locations={locations}
|
|
35
|
+
style={absoluteFill}
|
|
36
|
+
>
|
|
37
|
+
{children}
|
|
38
|
+
</ExpoLinearGradient>
|
|
39
|
+
</LinearGradientFrame>
|
|
47
40
|
)
|
|
48
|
-
)
|
|
41
|
+
})
|
|
49
42
|
|
|
50
43
|
const absoluteFill: ViewStyle = {
|
|
51
44
|
position: 'absolute',
|
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import { ColorTokens, ThemeTokens } from '@tamagui/core';
|
|
2
2
|
import { YStackProps } from '@tamagui/stacks';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import type { View } from 'react-native';
|
|
5
3
|
import { LinearGradientProps as ExpoLinearGradientProps } from './linear-gradient';
|
|
6
4
|
export type LinearGradientProps = Omit<ExpoLinearGradientProps, 'colors'> & Omit<YStackProps, 'children' | keyof ExpoLinearGradientProps> & {
|
|
7
5
|
colors?: (ColorTokens | ThemeTokens | (string & {}))[];
|
|
8
6
|
};
|
|
9
|
-
export declare const LinearGradient:
|
|
7
|
+
export declare const LinearGradient: import("@tamagui/core").ReactComponentWithRef<Omit<ExpoLinearGradientProps, "colors"> & Omit<Omit<import("react-native").ViewProps, "children" | "onLayout" | "display" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & 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"> & {
|
|
8
|
+
readonly fullscreen?: boolean | undefined;
|
|
9
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
10
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "onLayout" | "display" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & 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"> & {
|
|
11
|
+
readonly fullscreen?: boolean | undefined;
|
|
12
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
13
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "onLayout" | "display" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & 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"> & {
|
|
14
|
+
readonly fullscreen?: boolean | undefined;
|
|
15
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
16
|
+
}>>, "colors" | keyof import("react-native").ViewProps | "locations" | "start" | "end"> & {
|
|
17
|
+
colors?: (ColorTokens | (string & {}))[] | undefined;
|
|
18
|
+
} & Omit<Omit<import("react-native").ViewProps, "children" | "onLayout" | "display" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & 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"> & {
|
|
19
|
+
readonly fullscreen?: boolean | undefined;
|
|
20
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
21
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "children" | "onLayout" | "display" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & 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"> & {
|
|
22
|
+
readonly fullscreen?: boolean | undefined;
|
|
23
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
24
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "onLayout" | "display" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & 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"> & {
|
|
25
|
+
readonly fullscreen?: boolean | undefined;
|
|
26
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
27
|
+
}>>, "colors" | keyof import("react-native").ViewProps | "locations" | "start" | "end" | "display" | "elevation" | "gap" | "columnGap" | "rowGap" | "backgroundColor" | "borderBottomColor" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderBottomWidth" | "borderColor" | "borderEndColor" | "borderLeftColor" | "borderLeftWidth" | "borderRadius" | "borderRightColor" | "borderRightWidth" | "borderStartColor" | "borderStyle" | "borderTopColor" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderTopWidth" | "borderWidth" | "opacity" | "alignContent" | "alignItems" | "alignSelf" | "aspectRatio" | "borderEndWidth" | "borderStartWidth" | "bottom" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "height" | "justifyContent" | "left" | "margin" | "marginBottom" | "marginEnd" | "marginHorizontal" | "marginLeft" | "marginRight" | "marginStart" | "marginTop" | "marginVertical" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "overflow" | "padding" | "paddingBottom" | "paddingEnd" | "paddingHorizontal" | "paddingLeft" | "paddingRight" | "paddingStart" | "paddingTop" | "paddingVertical" | "position" | "right" | "top" | "width" | "zIndex" | "direction" | "shadowColor" | "shadowOffset" | "shadowOpacity" | "shadowRadius" | "transform" | "transformMatrix" | "rotation" | "translateX" | "translateY" | "fullscreen" | `$${string}` | `$${number}` | keyof import("@tamagui/core").TransformStyleProps | "cursor" | "contain" | "userSelect" | "outlineColor" | "outlineStyle" | "outlineOffset" | "outlineWidth" | "theme" | "space" | "separator" | "target" | "asChild" | "spaceDirection" | "dangerouslySetInnerHTML" | "animation" | "animateOnly" | "debug" | "disabled" | "className" | "themeShallow" | "tag" | "componentName" | "tabIndex" | "forceStyle" | "onPress" | "onPressIn" | "onPressOut" | "onHoverIn" | "onHoverOut" | "onMouseEnter" | "onMouseLeave" | "onMouseDown" | "onMouseUp" | "onFocus" | "onScroll" | "rel" | "download" | "dataSet" | "onScrollShouldSetResponder" | "onScrollShouldSetResponderCapture" | "onSelectionChangeShouldSetResponder" | "onSelectionChangeShouldSetResponderCapture" | "href" | "hrefAttrs" | "elevationAndroid" | keyof import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "children" | "onLayout" | "display" | keyof import("react-native").GestureResponderHandlers> & import("@tamagui/core").ExtendBaseStackProps & import("@tamagui/core").TamaguiComponentPropsBase & 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"> & {
|
|
28
|
+
readonly fullscreen?: boolean | undefined;
|
|
29
|
+
readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
30
|
+
}>>>, import("@tamagui/core").TamaguiElement>;
|
|
10
31
|
//# sourceMappingURL=LinearGradient.shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinearGradient.shared.d.ts","sourceRoot":"","sources":["../src/LinearGradient.shared.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,
|
|
1
|
+
{"version":3,"file":"LinearGradient.shared.d.ts","sourceRoot":"","sources":["../src/LinearGradient.shared.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EAKZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAU,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGrD,OAAO,EAEL,mBAAmB,IAAI,uBAAuB,EAC/C,MAAM,mBAAmB,CAAA;AAG1B,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC,GACvE,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,uBAAuB,CAAC,GAAG;IAC9D,MAAM,CAAC,EAAE,CAAC,WAAW,GAAG,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAA;CACvD,CAAA;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;6CAkBzB,CAAA"}
|