@tamagui/spinner 2.0.0-1780064412517

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Nate Wienert
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,51 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
+ value: true
22
+ }), mod);
23
+ var Spinner_exports = {};
24
+ __export(Spinner_exports, {
25
+ Spinner: () => Spinner
26
+ });
27
+ module.exports = __toCommonJS(Spinner_exports);
28
+ var import_core = require("@tamagui/core");
29
+ var import_stacks = require("@tamagui/stacks");
30
+ var import_react_native = require("react-native-web");
31
+ var import_jsx_runtime = require("react/jsx-runtime");
32
+ const Spinner = import_stacks.YStack.styleable((props, ref) => {
33
+ const {
34
+ size,
35
+ color: colorProp,
36
+ ...stackProps
37
+ } = props;
38
+ const theme = (0, import_core.useTheme)();
39
+ let color = colorProp;
40
+ if (color && color[0] === "$") {
41
+ color = (0, import_core.variableToString)(theme[color]);
42
+ }
43
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.YStack, {
44
+ ref,
45
+ ...stackProps,
46
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.ActivityIndicator, {
47
+ size,
48
+ color
49
+ })
50
+ });
51
+ });
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
+ value: true
24
+ }), mod);
25
+ var Spinner_exports = {};
26
+ __export(Spinner_exports, {
27
+ Spinner: () => Spinner
28
+ });
29
+ module.exports = __toCommonJS(Spinner_exports);
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ var import_core = require("@tamagui/core");
32
+ var import_stacks = require("@tamagui/stacks");
33
+ var import_react_native = require("react-native");
34
+ var Spinner = import_stacks.YStack.styleable(function (props, ref) {
35
+ var {
36
+ size,
37
+ color: colorProp,
38
+ ...stackProps
39
+ } = props;
40
+ var theme = (0, import_core.useTheme)();
41
+ var color = colorProp;
42
+ if (color && color[0] === "$") {
43
+ color = (0, import_core.variableToString)(theme[color]);
44
+ }
45
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.YStack, {
46
+ ref,
47
+ ...stackProps,
48
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.ActivityIndicator, {
49
+ size,
50
+ color
51
+ })
52
+ });
53
+ });
54
+ //# sourceMappingURL=Spinner.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Spinner_exports","__export","Spinner","module","exports","import_jsx_runtime","require","import_core","import_stacks","import_react_native","YStack","styleable","props","ref","size","color","colorProp","stackProps","theme","useTheme","variableToString","jsx"],"sources":["../../src/Spinner.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAT,YAA2C,CAAAK,eAAA;AAE3C,IAAAK,kBAAuB,GAAAC,OAAA;AAEvB,IAAAC,WAAA,GAAAD,OAAA,CAAkC;AAkB5B,IAAAE,aAAA,GAAAF,OAAA;AAXC,IAAAG,mBAEH,GAAAH,OAAA,eAAkB;AACpB,IAAAJ,OAAQ,GAAAM,aAAa,CAAAE,MAAW,CAAAC,SAAG,WAAeC,KAAA,EAAAC,GAAA;EAClD;IAAMC,IAAA;IAAAC,KAAA,EAAQC,SAAA;IAAA,GAAAC;EAAS,IAAAL,KAAA;EACvB,IAAIM,KAAA,GAAQ,IAAAX,WAAA,CAAAY,QAAA;EACZ,IAAIJ,KAAA,GAAAC,SAAgB;EAClB,IAAAD,KAAA,IAAAA,KAAQ;IACVA,KAAA,OAAAR,WAAA,CAAAa,gBAAA,EAAAF,KAAA,CAAAH,KAAA;EACA;EAKD,0BAAAV,kBAAA,CAAAgB,GAAA,EAAAb,aAAA,CAAAE,MAAA","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
+ get: () => from[key],
9
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
+ });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
+ value: true
17
+ }), mod);
18
+ var index_exports = {};
19
+ module.exports = __toCommonJS(index_exports);
20
+ __reExport(index_exports, require("./Spinner.cjs"), module.exports);
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
18
+ value: true
19
+ }), mod);
20
+ var index_exports = {};
21
+ module.exports = __toCommonJS(index_exports);
22
+ __reExport(index_exports, require("./Spinner.native.js"), module.exports);
23
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ import { useTheme, variableToString } from "@tamagui/core";
2
+ import { YStack } from "@tamagui/stacks";
3
+ import { ActivityIndicator } from "react-native-web";
4
+ import { jsx } from "react/jsx-runtime";
5
+ const Spinner = YStack.styleable((props, ref) => {
6
+ const {
7
+ size,
8
+ color: colorProp,
9
+ ...stackProps
10
+ } = props;
11
+ const theme = useTheme();
12
+ let color = colorProp;
13
+ if (color && color[0] === "$") {
14
+ color = variableToString(theme[color]);
15
+ }
16
+ return /* @__PURE__ */jsx(YStack, {
17
+ ref,
18
+ ...stackProps,
19
+ children: /* @__PURE__ */jsx(ActivityIndicator, {
20
+ size,
21
+ color
22
+ })
23
+ });
24
+ });
25
+ export { Spinner };
26
+ //# sourceMappingURL=Spinner.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useTheme","variableToString","YStack","ActivityIndicator","jsx","Spinner","styleable","props","ref","size","color","colorProp","stackProps","theme","children"],"sources":["../../src/Spinner.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,QAAA,EAAUC,gBAAA,QAAwB;AAE3C,SAASC,MAAA,QAAc;AAEvB,SAASC,iBAAA,QAAyB;AAkB5B,SAAAC,GAAA;AAXC,MAAMC,OAAA,GAETH,MAAA,CAAOI,SAAA,CAAU,CAACC,KAAA,EAAqBC,GAAA,KAAQ;EACjD,MAAM;IAAEC,IAAA;IAAMC,KAAA,EAAOC,SAAA;IAAW,GAAGC;EAAW,IAAIL,KAAA;EAClD,MAAMM,KAAA,GAAQb,QAAA,CAAS;EACvB,IAAIU,KAAA,GAAQC,SAAA;EACZ,IAAID,KAAA,IAASA,KAAA,CAAM,CAAC,MAAM,KAAK;IAC7BA,KAAA,GAAQT,gBAAA,CAAiBY,KAAA,CAAMH,KAAK,CAAC;EACvC;EACA,OACE,eAAAN,GAAA,CAACF,MAAA;IAAOM,GAAA;IAAW,GAAGI,UAAA;IACpBE,QAAA,iBAAAV,GAAA,CAACD,iBAAA;MAAkBM,IAAA;MAAYC;IAAA,CAAc;EAAA,CAC/C;AAEJ,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useTheme, variableToString } from "@tamagui/core";
3
+ import { YStack } from "@tamagui/stacks";
4
+ import { ActivityIndicator } from "react-native";
5
+ var Spinner = YStack.styleable(function (props, ref) {
6
+ var {
7
+ size,
8
+ color: colorProp,
9
+ ...stackProps
10
+ } = props;
11
+ var theme = useTheme();
12
+ var color = colorProp;
13
+ if (color && color[0] === "$") {
14
+ color = variableToString(theme[color]);
15
+ }
16
+ return /* @__PURE__ */_jsx(YStack, {
17
+ ref,
18
+ ...stackProps,
19
+ children: /* @__PURE__ */_jsx(ActivityIndicator, {
20
+ size,
21
+ color
22
+ })
23
+ });
24
+ });
25
+ export { Spinner };
26
+ //# sourceMappingURL=Spinner.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jsx","_jsx","useTheme","variableToString","YStack","ActivityIndicator","Spinner","styleable","props","ref","size","color","colorProp","stackProps","theme"],"sources":["../../src/Spinner.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,GAAA,IAAAC,IAAU,2BAAwB;AAE3C,SAASC,QAAA,EAAAC,gBAAc;AAEvB,SAASC,MAAA,yBAAyB;AAkB5B,SAAAC,iBAAA;AAXC,IAAAC,OAAM,GAAAF,MAET,CAAAG,SAAO,WAAWC,KAAqB,EAAAC,GAAQ;EACjD;IAAMC,IAAE;IAAAC,KAAM,EAAAC,SAAO;IAAA,GAAWC;EAAG,IAAWL,KAAI;EAClD,IAAAM,KAAM,GAAAZ,QAAQ;EACd,IAAIS,KAAA,GAAQC,SAAA;EACZ,IAAID,KAAA,IAASA,KAAA,CAAM,CAAC,MAAM,KAAK;IAC7BA,KAAA,GAAQR,gBAAA,CAAiBW,KAAA,CAAMH,KAAK,CAAC;EACvC;EACA,OACE,eAAAV,IAAC,CAAAG,MAAA;IAIJK,GAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./Spinner.mjs";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./Spinner.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./Spinner.native.js";
2
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ import { useTheme, variableToString } from "@tamagui/core";
2
+ import { YStack } from "@tamagui/stacks";
3
+ import { ActivityIndicator } from "react-native-web";
4
+ import { jsx } from "react/jsx-runtime";
5
+ const Spinner = YStack.styleable((props, ref) => {
6
+ const {
7
+ size,
8
+ color: colorProp,
9
+ ...stackProps
10
+ } = props;
11
+ const theme = useTheme();
12
+ let color = colorProp;
13
+ if (color && color[0] === "$") {
14
+ color = variableToString(theme[color]);
15
+ }
16
+ return /* @__PURE__ */jsx(YStack, {
17
+ ref,
18
+ ...stackProps,
19
+ children: /* @__PURE__ */jsx(ActivityIndicator, {
20
+ size,
21
+ color
22
+ })
23
+ });
24
+ });
25
+ export { Spinner };
26
+ //# sourceMappingURL=Spinner.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useTheme","variableToString","YStack","ActivityIndicator","jsx","Spinner","styleable","props","ref","size","color","colorProp","stackProps","theme","children"],"sources":["../../src/Spinner.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,QAAA,EAAUC,gBAAA,QAAwB;AAE3C,SAASC,MAAA,QAAc;AAEvB,SAASC,iBAAA,QAAyB;AAkB5B,SAAAC,GAAA;AAXC,MAAMC,OAAA,GAETH,MAAA,CAAOI,SAAA,CAAU,CAACC,KAAA,EAAqBC,GAAA,KAAQ;EACjD,MAAM;IAAEC,IAAA;IAAMC,KAAA,EAAOC,SAAA;IAAW,GAAGC;EAAW,IAAIL,KAAA;EAClD,MAAMM,KAAA,GAAQb,QAAA,CAAS;EACvB,IAAIU,KAAA,GAAQC,SAAA;EACZ,IAAID,KAAA,IAASA,KAAA,CAAM,CAAC,MAAM,KAAK;IAC7BA,KAAA,GAAQT,gBAAA,CAAiBY,KAAA,CAAMH,KAAK,CAAC;EACvC;EACA,OACE,eAAAN,GAAA,CAACF,MAAA;IAAOM,GAAA;IAAW,GAAGI,UAAA;IACpBE,QAAA,iBAAAV,GAAA,CAACD,iBAAA;MAAkBM,IAAA;MAAYC;IAAA,CAAc;EAAA,CAC/C;AAEJ,CAAC","ignoreList":[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
+ value: true
24
+ }), mod);
25
+ var Spinner_exports = {};
26
+ __export(Spinner_exports, {
27
+ Spinner: () => Spinner
28
+ });
29
+ module.exports = __toCommonJS(Spinner_exports);
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ var import_core = require("@tamagui/core");
32
+ var import_stacks = require("@tamagui/stacks");
33
+ var import_react_native = require("react-native");
34
+ var Spinner = import_stacks.YStack.styleable(function (props, ref) {
35
+ var {
36
+ size,
37
+ color: colorProp,
38
+ ...stackProps
39
+ } = props;
40
+ var theme = (0, import_core.useTheme)();
41
+ var color = colorProp;
42
+ if (color && color[0] === "$") {
43
+ color = (0, import_core.variableToString)(theme[color]);
44
+ }
45
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.YStack, {
46
+ ref,
47
+ ...stackProps,
48
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.ActivityIndicator, {
49
+ size,
50
+ color
51
+ })
52
+ });
53
+ });
54
+ //# sourceMappingURL=Spinner.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call"],"sources":["../../src/Spinner.tsx"],"sourcesContent":[null],"mappings":"AACA,YAAS;;AAET,IAAAA,SAAS,GAAAC,MAAA,CAAcC,cAAA;AAEvB,IAAAC,gBAAS,GAAAF,MAAA,CAAAG,wBAAyB;AAkB5B,IAAAC,iBAAA,GAAAJ,MAAA,CAAAK,mBAAA;AAXC,IAAAC,YAEH,GAAAN,MAAO,CAAAO,SAAW,CAAAC,cAA6B;AACjD,IAAAC,QAAQ,GAAAA,CAAMC,MAAA,EAAOC,GAAA;EACrB,SAAMC,IAAA,IAAQD,GAAA,EACdZ,SAAI,CAAQW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AACZ;AACE,IAAAC,WAAQ,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAiBC,MAAM,EAAAC,IAAM;EACvC,IAAAF,IAAA,WAAAA,IAAA,wBAAAA,IAAA;IACA,KACE,IAAAG,GAAA,IAAAhB,iBAAC,CAAAa,IAAO,GAIX,KAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,E","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./Spinner.mjs";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./Spinner.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
18
+ value: true
19
+ }), mod);
20
+ var index_exports = {};
21
+ module.exports = __toCommonJS(index_exports);
22
+ __reExport(index_exports, require("./Spinner.native.js"), module.exports);
23
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA","ignoreList":[]}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@tamagui/spinner",
3
+ "version": "2.0.0-1780064412517",
4
+ "source": "src/index.ts",
5
+ "files": [
6
+ "src",
7
+ "types",
8
+ "dist"
9
+ ],
10
+ "type": "module",
11
+ "sideEffects": [
12
+ "*.css"
13
+ ],
14
+ "main": "dist/cjs",
15
+ "module": "dist/esm",
16
+ "types": "./types/index.d.ts",
17
+ "exports": {
18
+ "./package.json": "./package.json",
19
+ ".": {
20
+ "types": "./types/index.d.ts",
21
+ "react-native": "./dist/esm/index.native.js",
22
+ "browser": "./dist/esm/index.mjs",
23
+ "module": "./dist/esm/index.mjs",
24
+ "import": "./dist/esm/index.mjs",
25
+ "require": "./dist/cjs/index.cjs",
26
+ "default": "./dist/esm/index.mjs"
27
+ }
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "scripts": {
33
+ "build": "tamagui-build",
34
+ "watch": "tamagui-build --watch",
35
+ "clean": "tamagui-build clean",
36
+ "clean:build": "tamagui-build clean:build"
37
+ },
38
+ "dependencies": {
39
+ "@tamagui/core": "2.0.0-1780064412517",
40
+ "@tamagui/stacks": "2.0.0-1780064412517"
41
+ },
42
+ "devDependencies": {
43
+ "@tamagui/build": "2.0.0-1780064412517",
44
+ "react": ">=19",
45
+ "react-native": "0.83.2"
46
+ },
47
+ "peerDependencies": {
48
+ "react": ">=19"
49
+ },
50
+ "module:jsx": "dist/jsx"
51
+ }
@@ -0,0 +1,27 @@
1
+ import type { ColorTokens, ThemeTokens } from '@tamagui/core'
2
+ import { useTheme, variableToString } from '@tamagui/core'
3
+ import type { YStackProps } from '@tamagui/stacks'
4
+ import { YStack } from '@tamagui/stacks'
5
+ import type * as React from 'react'
6
+ import { ActivityIndicator } from 'react-native'
7
+
8
+ export type SpinnerProps = Omit<YStackProps, 'children'> & {
9
+ size?: 'small' | 'large'
10
+ color?: (ColorTokens | ThemeTokens | (string & {})) | null
11
+ }
12
+
13
+ export const Spinner: React.ForwardRefExoticComponent<
14
+ SpinnerProps & React.RefAttributes<any>
15
+ > = YStack.styleable((props: SpinnerProps, ref) => {
16
+ const { size, color: colorProp, ...stackProps } = props
17
+ const theme = useTheme()
18
+ let color = colorProp as string
19
+ if (color && color[0] === '$') {
20
+ color = variableToString(theme[color])
21
+ }
22
+ return (
23
+ <YStack ref={ref} {...stackProps}>
24
+ <ActivityIndicator size={size} color={color} />
25
+ </YStack>
26
+ )
27
+ })
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './Spinner'
@@ -0,0 +1,9 @@
1
+ import type { ColorTokens, ThemeTokens } from '@tamagui/core';
2
+ import type { YStackProps } from '@tamagui/stacks';
3
+ import type * as React from 'react';
4
+ export type SpinnerProps = Omit<YStackProps, 'children'> & {
5
+ size?: 'small' | 'large';
6
+ color?: (ColorTokens | ThemeTokens | (string & {})) | null;
7
+ };
8
+ export declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<any>>;
9
+ //# sourceMappingURL=Spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../src/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAGnC,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG;IACzD,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,CAAC,WAAW,GAAG,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,CAAA;CAC3D,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,yBAAyB,CACnD,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAavC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Spinner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}