@tamagui/helpers-tamagui 2.0.0-rc.8 → 2.0.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.
Files changed (63) hide show
  1. package/dist/cjs/getIcon.cjs +35 -27
  2. package/dist/cjs/getIcon.native.js +33 -27
  3. package/dist/cjs/getIcon.native.js.map +1 -1
  4. package/dist/cjs/index.cjs +7 -5
  5. package/dist/cjs/index.native.js +7 -5
  6. package/dist/cjs/index.native.js.map +1 -1
  7. package/dist/cjs/prevent.cjs +12 -10
  8. package/dist/cjs/prevent.native.js +12 -10
  9. package/dist/cjs/prevent.native.js.map +1 -1
  10. package/dist/cjs/useCurrentColor.cjs +14 -11
  11. package/dist/cjs/useCurrentColor.native.js +19 -18
  12. package/dist/cjs/useCurrentColor.native.js.map +1 -1
  13. package/dist/cjs/useGetThemedIcon.cjs +38 -30
  14. package/dist/cjs/useGetThemedIcon.native.js +36 -30
  15. package/dist/cjs/useGetThemedIcon.native.js.map +1 -1
  16. package/dist/esm/getIcon.mjs +11 -5
  17. package/dist/esm/getIcon.mjs.map +1 -1
  18. package/dist/esm/getIcon.native.js +9 -5
  19. package/dist/esm/getIcon.native.js.map +1 -1
  20. package/dist/esm/index.js +4 -4
  21. package/dist/esm/index.js.map +1 -6
  22. package/dist/esm/useCurrentColor.mjs +2 -1
  23. package/dist/esm/useCurrentColor.mjs.map +1 -1
  24. package/dist/esm/useCurrentColor.native.js +3 -4
  25. package/dist/esm/useCurrentColor.native.js.map +1 -1
  26. package/dist/esm/useGetThemedIcon.mjs +12 -6
  27. package/dist/esm/useGetThemedIcon.mjs.map +1 -1
  28. package/dist/esm/useGetThemedIcon.native.js +10 -6
  29. package/dist/esm/useGetThemedIcon.native.js.map +1 -1
  30. package/package.json +9 -13
  31. package/src/getIcon.tsx +1 -0
  32. package/types/getIcon.d.ts +1 -0
  33. package/types/getIcon.d.ts.map +1 -1
  34. package/dist/cjs/getIcon.js +0 -34
  35. package/dist/cjs/getIcon.js.map +0 -6
  36. package/dist/cjs/index.js +0 -19
  37. package/dist/cjs/index.js.map +0 -6
  38. package/dist/cjs/prevent.js +0 -21
  39. package/dist/cjs/prevent.js.map +0 -6
  40. package/dist/cjs/useCurrentColor.js +0 -25
  41. package/dist/cjs/useCurrentColor.js.map +0 -6
  42. package/dist/cjs/useGetIcon.cjs +0 -42
  43. package/dist/cjs/useGetIcon.js +0 -34
  44. package/dist/cjs/useGetIcon.js.map +0 -6
  45. package/dist/cjs/useGetIcon.native.js +0 -49
  46. package/dist/cjs/useGetIcon.native.js.map +0 -1
  47. package/dist/cjs/useGetThemedIcon.js +0 -38
  48. package/dist/cjs/useGetThemedIcon.js.map +0 -6
  49. package/dist/esm/getIcon.js +0 -10
  50. package/dist/esm/getIcon.js.map +0 -6
  51. package/dist/esm/prevent.js +0 -5
  52. package/dist/esm/prevent.js.map +0 -6
  53. package/dist/esm/useCurrentColor.js +0 -9
  54. package/dist/esm/useCurrentColor.js.map +0 -6
  55. package/dist/esm/useGetIcon.js +0 -10
  56. package/dist/esm/useGetIcon.js.map +0 -6
  57. package/dist/esm/useGetIcon.mjs +0 -8
  58. package/dist/esm/useGetIcon.mjs.map +0 -1
  59. package/dist/esm/useGetIcon.native.js +0 -12
  60. package/dist/esm/useGetIcon.native.js.map +0 -1
  61. package/dist/esm/useGetThemedIcon.js +0 -15
  62. package/dist/esm/useGetThemedIcon.js.map +0 -6
  63. package/types/useGetIcon.d.ts.map +0 -1
@@ -2,41 +2,49 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  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", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: true
33
+ }), mod);
32
34
  var getIcon_exports = {};
33
35
  __export(getIcon_exports, {
34
36
  getIcon: () => getIcon
35
37
  });
36
38
  module.exports = __toCommonJS(getIcon_exports);
37
39
  var import_react = __toESM(require("react"), 1);
38
- const getIcon = (el, props) => el && (import_react.default.isValidElement(el) ? import_react.default.cloneElement(el, {
39
- ...props,
40
- // @ts-expect-error
41
- ...el.props
42
- }) : import_react.default.createElement(el, props));
40
+ const getIcon = (el, props) => {
41
+ if (!el) return el;
42
+ if (import_react.default.isValidElement(el)) {
43
+ return import_react.default.cloneElement(el, {
44
+ ...props,
45
+ // @ts-expect-error
46
+ ...el.props
47
+ });
48
+ }
49
+ return import_react.default.createElement(el, props);
50
+ };
@@ -4,44 +4,50 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
34
36
  var getIcon_exports = {};
35
37
  __export(getIcon_exports, {
36
38
  getIcon: () => getIcon
37
39
  });
38
40
  module.exports = __toCommonJS(getIcon_exports);
39
- var import_react = __toESM(require("react"), 1),
40
- getIcon = function (el, props) {
41
- return el && (/* @__PURE__ */import_react.default.isValidElement(el) ? /* @__PURE__ */import_react.default.cloneElement(el, {
41
+ var import_react = __toESM(require("react"), 1);
42
+ var getIcon = function (el, props) {
43
+ if (!el) return el;
44
+ if (/* @__PURE__ */import_react.default.isValidElement(el)) {
45
+ return /* @__PURE__ */import_react.default.cloneElement(el, {
42
46
  ...props,
43
47
  // @ts-expect-error
44
48
  ...el.props
45
- }) : /* @__PURE__ */import_react.default.createElement(el, props));
46
- };
49
+ });
50
+ }
51
+ return /* @__PURE__ */import_react.default.createElement(el, props);
52
+ };
47
53
  //# sourceMappingURL=getIcon.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getIcon_exports","__export","getIcon","module","exports","import_react","__toESM","require","el","props","default","isValidElement","cloneElement"],"sources":["../../src/getIcon.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,eAAA;AAEX,IAAAK,YAAgB,GACrBC,OACA,CAAAC,OAKK,QACD;EAAAL,OAAA,GAAM,SAAAA,CAAAM,EAAA,EAAAC,KAAiB;IAEvB,OAAGD,EAAA,oBAAAH,YAAA,CAAAK,OAAA,CAAAC,cAAA,CAAAH,EAAA,mBAAAH,YAAA,CAAAK,OAAA,CAAAE,YAAA,CAAAJ,EAAA;MAAA,GAAAC,KAAA;MAEH;MACD,GAEID,EAAA,CAAAC","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getIcon_exports","__export","getIcon","module","exports","import_react","__toESM","require","el","props","default","isValidElement","cloneElement","createElement"],"sources":["../../src/getIcon.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;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,eAAA;AAEX,IAAAK,YAAgB,GACrBC,OACA,CAAAC,OAKG;AACH,IAAAL,OAAS,YAAAA,CAAOM,EAAA,EAAAC,KAAA;EAChB,IAAI,CAAAD,EAAA,SAAAA,EAAA;EACF,mBAAOH,YAAM,CAAAK,OAAA,CAAAC,cAAiB,CAAAH,EAAA;IAAA,OACzB,eAAAH,YAAA,CAAAK,OAAA,CAAAE,YAAA,CAAAJ,EAAA;MAAA,GAAAC,KAAA;MAEH;MACD,GAAAD,EAAA,CAAAC;IACH;EACA;EACF,sBAAAJ,YAAA,CAAAK,OAAA,CAAAG,aAAA,CAAAL,EAAA,EAAAC,KAAA","ignoreList":[]}
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
7
8
  get: () => from[key],
8
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
10
  });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
15
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
9
10
  get: () => from[key],
10
11
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
12
  });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
17
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
18
+ value: true
17
19
  }), mod);
18
20
  var index_exports = {};
19
21
  module.exports = __toCommonJS(index_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"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;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,mBADd,GAAAH,MAAA,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,yBAAAH,MAAA,CAAAC,OAFd;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,iCAAAH,MAHd,CAAAC,OAAA;AAIAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,+BAJd,GAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"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;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,mBADd,GAAAH,MAAA,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,yBAAAH,MAAA,CAAAC,OAFd;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,iCAAAH,MAHd,CAAAC,OAAA;AAIAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,+BAJd,GAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var prevent_exports = {};
22
24
  __export(prevent_exports, {
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var prevent_exports = {};
24
26
  __export(prevent_exports, {
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","prevent_exports","__export","prevent","module","exports"],"sources":["../../src/prevent.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;AAAOC,MAAM,CAAAC,OAAA,GAAWT,YAAS,CAAAK,eAAkB,CAAE","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","prevent_exports","__export","prevent","module","exports"],"sources":["../../src/prevent.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;AAAOC,MAAM,CAAAC,OAAA,GAAWT,YAAS,CAAAK,eAAkB,CAAE","ignoreList":[]}
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var useCurrentColor_exports = {};
22
24
  __export(useCurrentColor_exports, {
@@ -26,5 +28,6 @@ module.exports = __toCommonJS(useCurrentColor_exports);
26
28
  var import_web = require("@tamagui/web");
27
29
  const useCurrentColor = colorProp => {
28
30
  const theme = (0, import_web.useTheme)();
29
- return colorProp ? (0, import_web.getVariable)(colorProp) : theme[colorProp]?.get() || theme.color?.get();
31
+ const out = colorProp ? (0, import_web.getVariable)(colorProp) : theme[colorProp]?.get() || theme.color?.get();
32
+ return out;
30
33
  };
@@ -5,32 +5,33 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var useCurrentColor_exports = {};
24
26
  __export(useCurrentColor_exports, {
25
27
  useCurrentColor: () => useCurrentColor
26
28
  });
27
29
  module.exports = __toCommonJS(useCurrentColor_exports);
28
- var import_web = require("@tamagui/web"),
29
- useCurrentColor = function (colorProp) {
30
- var _theme_colorProp,
31
- _theme_color,
32
- theme = (0, import_web.useTheme)(),
33
- out = colorProp ? (0, import_web.getVariable)(colorProp) : ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get()) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get());
34
- return out;
35
- };
30
+ var import_web = require("@tamagui/web");
31
+ var useCurrentColor = function (colorProp) {
32
+ var _theme_colorProp, _theme_color;
33
+ var theme = (0, import_web.useTheme)();
34
+ var out = colorProp ? (0, import_web.getVariable)(colorProp) : ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get()) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get());
35
+ return out;
36
+ };
36
37
  //# sourceMappingURL=useCurrentColor.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useCurrentColor_exports","__export","useCurrentColor","module","exports","import_web","require","colorProp","_theme_colorProp","_theme_color","theme","useTheme","out","getVariable","get","color"],"sources":["../../src/useCurrentColor.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,uBAAA;AAAAC,QAAA,CAAAD,uBAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAsCT,YAAA,CAAAK,uBAAA;AAG/B,IAAAK,UAAM,GAAAC,OAAkB,CAAC,cAAyB;EAAAJ,eAAA,YAAAA,CAAAK,SAAA;IACvD,IAAAC,gBAAc;MAAAC,YAAA;MAAAC,KAAS,OAAAL,UAAA,CAAAM,QAAA;MAAAC,GAAA,GAAAL,SAAA,OAAAF,UAAA,CAAAQ,WAAA,EAAAN,SAAA,MAAAC,gBAAA,GAAAE,KAAA,CAAAH,SAAA,eAAAC,gBAAA,uBAAAA,gBAAA,CAAAM,GAAA,SAAAL,YAAA,GAAAC,KAAA,CAAAK,KAAA,cAAAN,YAAA,uBAAAA,YAAA,CAAAK,GAAA;IAIvB,OAHYF,GAAA;EAId","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useCurrentColor_exports","__export","useCurrentColor","module","exports","import_web","require","colorProp","_theme_colorProp","_theme_color","theme","useTheme","out","getVariable","get","color"],"sources":["../../src/useCurrentColor.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,uBAAA;AAAAC,QAAA,CAAAD,uBAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAsCT,YAAA,CAAAK,uBAAA;AAG/B,IAAAK,UAAM,GAAAC,OAAkB,CAAC,cAAyB;AACvD,IAAAJ,eAAM,GAAQ,SAAAA,CAAAK,SAAA,EAAS;EACvB,IAAAC,gBAAY,EAAAC,YACR;EAEJ,IAAAC,KAAO,OAAAL,UAAA,CAAAM,QAAA;EACT,IAAAC,GAAA,GAAAL,SAAA,OAAAF,UAAA,CAAAQ,WAAA,EAAAN,SAAA,MAAAC,gBAAA,GAAAE,KAAA,CAAAH,SAAA,eAAAC,gBAAA,uBAAAA,gBAAA,CAAAM,GAAA,SAAAL,YAAA,GAAAC,KAAA,CAAAK,KAAA,cAAAN,YAAA,uBAAAA,YAAA,CAAAK,GAAA","ignoreList":[]}
@@ -2,46 +2,54 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  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", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: true
33
+ }), mod);
32
34
  var useGetThemedIcon_exports = {};
33
35
  __export(useGetThemedIcon_exports, {
34
36
  useGetThemedIcon: () => useGetThemedIcon
35
37
  });
36
38
  module.exports = __toCommonJS(useGetThemedIcon_exports);
37
- var import_react = __toESM(require("react"), 1),
38
- import_useCurrentColor = require("./useCurrentColor.cjs");
39
+ var import_react = __toESM(require("react"), 1);
40
+ var import_useCurrentColor = require("./useCurrentColor.cjs");
39
41
  const useGetThemedIcon = props => {
40
42
  const color = (0, import_useCurrentColor.useCurrentColor)(props.color);
41
- return el => el && (import_react.default.isValidElement(el) ? import_react.default.cloneElement(el, {
42
- ...props,
43
- color,
44
- // @ts-expect-error
45
- ...el.props
46
- }) : import_react.default.createElement(el, props));
43
+ return el => {
44
+ if (!el) return el;
45
+ if (import_react.default.isValidElement(el)) {
46
+ return import_react.default.cloneElement(el, {
47
+ ...props,
48
+ color,
49
+ // @ts-expect-error
50
+ ...el.props
51
+ });
52
+ }
53
+ return import_react.default.createElement(el, props);
54
+ };
47
55
  };
@@ -4,49 +4,55 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
34
36
  var useGetThemedIcon_exports = {};
35
37
  __export(useGetThemedIcon_exports, {
36
38
  useGetThemedIcon: () => useGetThemedIcon
37
39
  });
38
40
  module.exports = __toCommonJS(useGetThemedIcon_exports);
39
- var import_react = __toESM(require("react"), 1),
40
- import_useCurrentColor = require("./useCurrentColor.native.js"),
41
- useGetThemedIcon = function (props) {
42
- var color = (0, import_useCurrentColor.useCurrentColor)(props.color);
43
- return function (el) {
44
- return el && (/* @__PURE__ */import_react.default.isValidElement(el) ? /* @__PURE__ */import_react.default.cloneElement(el, {
41
+ var import_react = __toESM(require("react"), 1);
42
+ var import_useCurrentColor = require("./useCurrentColor.native.js");
43
+ var useGetThemedIcon = function (props) {
44
+ var color = (0, import_useCurrentColor.useCurrentColor)(props.color);
45
+ return function (el) {
46
+ if (!el) return el;
47
+ if (/* @__PURE__ */import_react.default.isValidElement(el)) {
48
+ return /* @__PURE__ */import_react.default.cloneElement(el, {
45
49
  ...props,
46
50
  color,
47
51
  // @ts-expect-error
48
52
  ...el.props
49
- }) : /* @__PURE__ */import_react.default.createElement(el, props));
50
- };
53
+ });
54
+ }
55
+ return /* @__PURE__ */import_react.default.createElement(el, props);
51
56
  };
57
+ };
52
58
  //# sourceMappingURL=useGetThemedIcon.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useGetThemedIcon_exports","__export","useGetThemedIcon","module","exports","import_react","__toESM","require","import_useCurrentColor","props","color","useCurrentColor","el","default","isValidElement","cloneElement","createElement"],"sources":["../../src/useGetThemedIcon.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,wBAElB;AAEO,IAAAK,YAAM,GAAAC,OAAoB,CAAAC,OAAA,QAA8C;EAAAC,sBAAA,GAAAD,OAAA;EAAAL,gBAAA,YAAAA,CAAAO,KAAA;IAC7E,IAAAC,KAAM,OAAAF,sBAAQ,CAAAG,eAAA,EAAAF,KAAgB,CAAAC,KAAM;IACpC,OAAO,UACAE,EAAA;MAGD,OAAGA,EAAA,oBAAAP,YAAA,CAAAQ,OAAA,CAAAC,cAAA,CAAAF,EAAA,mBAAAP,YAAA,CAAAQ,OAAA,CAAAE,YAAA,CAAAH,EAAA;QACH,GAAAH,KAAA;QAAAC,KAAA;QAEA;QACD,GAEIE,EAAA,CAAAH;MAEX,oBAAAJ,YAAA,CAAAQ,OAAA,CAAAG,aAAA,CAAAJ,EAAA,EAAAH,KAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useGetThemedIcon_exports","__export","useGetThemedIcon","module","exports","import_react","__toESM","require","import_useCurrentColor","props","color","useCurrentColor","el","default","isValidElement","cloneElement","createElement"],"sources":["../../src/useGetThemedIcon.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,wBAAA;AAElB,IAAAK,YAAA,GAAAC,OAAA,CAAAC,OAAgC;AAEzB,IAAAC,sBAA0B,GAAAD,OAA8C;AAC7E,IAAAL,gBAAc,YAAAA,CAAAO,KAAA;EACd,IAAAC,KAAQ,OAAYF,sBAAA,CAAAG,eAAA,EAAAF,KAAA,CAAAC,KAAA;EAClB,OAAK,UAAIE,EAAO;IAChB,IAAI,CAAAA,EAAA,SAAAA,EAAA;IACF,mBAAOP,YAAM,CAAAQ,OAAA,CAAAC,cAAiB,CAAAF,EAAA;MAAA,OACzB,eAAAP,YAAA,CAAAQ,OAAA,CAAAE,YAAA,CAAAH,EAAA;QACH,GAAAH,KAAA;QAAAC,KAAA;QAEA;QACD,GAAAE,EAAA,CAAAH;MACH;IACA;IACF,sBAAAJ,YAAA,CAAAQ,OAAA,CAAAG,aAAA,CAAAJ,EAAA,EAAAH,KAAA;EACF","ignoreList":[]}
@@ -1,8 +1,14 @@
1
1
  import React from "react";
2
- const getIcon = (el, props) => el && (React.isValidElement(el) ? React.cloneElement(el, {
3
- ...props,
4
- // @ts-expect-error
5
- ...el.props
6
- }) : React.createElement(el, props));
2
+ const getIcon = (el, props) => {
3
+ if (!el) return el;
4
+ if (React.isValidElement(el)) {
5
+ return React.cloneElement(el, {
6
+ ...props,
7
+ // @ts-expect-error
8
+ ...el.props
9
+ });
10
+ }
11
+ return React.createElement(el, props);
12
+ };
7
13
  export { getIcon };
8
14
  //# sourceMappingURL=getIcon.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getIcon","el","props","isValidElement","cloneElement","createElement"],"sources":["../../src/getIcon.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAEX,MAAMC,OAAA,GAAUA,CACrBC,EAAA,EACAC,KAAA,KAKKD,EAAA,KACDF,KAAA,CAAMI,cAAA,CAAeF,EAAE,IAClBF,KAAA,CAAMK,YAAA,CAAaH,EAAA,EAAI;EAC5B,GAAGC,KAAA;EAAA;EAEH,GAAGD,EAAA,CAAGC;AACR,CAAC,IAEIH,KAAA,CAAMM,aAAA,CAAcJ,EAAA,EAAIC,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["React","getIcon","el","props","isValidElement","cloneElement","createElement"],"sources":["../../src/getIcon.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAEX,MAAMC,OAAA,GAAUA,CACrBC,EAAA,EACAC,KAAA,KAKG;EACH,IAAI,CAACD,EAAA,EAAI,OAAOA,EAAA;EAChB,IAAIF,KAAA,CAAMI,cAAA,CAAeF,EAAE,GAAG;IAC5B,OAAOF,KAAA,CAAMK,YAAA,CAAaH,EAAA,EAAI;MAC5B,GAAGC,KAAA;MAAA;MAEH,GAAGD,EAAA,CAAGC;IACR,CAAC;EACH;EACA,OAAOH,KAAA,CAAMM,aAAA,CAAcJ,EAAA,EAAIC,KAAK;AACtC","ignoreList":[]}
@@ -1,10 +1,14 @@
1
1
  import React from "react";
2
2
  var getIcon = function (el, props) {
3
- return el && (/* @__PURE__ */React.isValidElement(el) ? /* @__PURE__ */React.cloneElement(el, {
4
- ...props,
5
- // @ts-expect-error
6
- ...el.props
7
- }) : /* @__PURE__ */React.createElement(el, props));
3
+ if (!el) return el;
4
+ if (/* @__PURE__ */React.isValidElement(el)) {
5
+ return /* @__PURE__ */React.cloneElement(el, {
6
+ ...props,
7
+ // @ts-expect-error
8
+ ...el.props
9
+ });
10
+ }
11
+ return /* @__PURE__ */React.createElement(el, props);
8
12
  };
9
13
  export { getIcon };
10
14
  //# sourceMappingURL=getIcon.native.js.map