@tamagui/helpers-icon 1.110.5 → 1.111.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/themed.native.js +6 -79
- package/dist/cjs/themed.native.js.map +2 -2
- package/dist/esm/IconProps.native.mjs +2 -0
- package/dist/esm/IconProps.native.mjs.map +1 -0
- package/dist/esm/index.native.mjs +3 -0
- package/dist/esm/index.native.mjs.map +1 -0
- package/dist/esm/themed.native.js +6 -79
- package/dist/esm/themed.native.js.map +2 -2
- package/dist/esm/themed.native.mjs +34 -0
- package/dist/esm/themed.native.mjs.map +1 -0
- package/dist/jsx/themed.native.js +6 -79
- package/dist/jsx/themed.native.js.map +2 -2
- package/package.json +3 -3
|
@@ -27,81 +27,6 @@ __export(themed_exports, {
|
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(themed_exports);
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime"), import_core = require("@tamagui/core"), import_react = __toESM(require("react"));
|
|
30
|
-
function _array_like_to_array(arr, len) {
|
|
31
|
-
(len == null || len > arr.length) && (len = arr.length);
|
|
32
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
33
|
-
return arr2;
|
|
34
|
-
}
|
|
35
|
-
function _array_with_holes(arr) {
|
|
36
|
-
if (Array.isArray(arr)) return arr;
|
|
37
|
-
}
|
|
38
|
-
function _define_property(obj, key, value) {
|
|
39
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
40
|
-
value,
|
|
41
|
-
enumerable: !0,
|
|
42
|
-
configurable: !0,
|
|
43
|
-
writable: !0
|
|
44
|
-
}) : obj[key] = value, obj;
|
|
45
|
-
}
|
|
46
|
-
function _iterable_to_array_limit(arr, i) {
|
|
47
|
-
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
48
|
-
if (_i != null) {
|
|
49
|
-
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
50
|
-
try {
|
|
51
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
52
|
-
;
|
|
53
|
-
} catch (err) {
|
|
54
|
-
_d = !0, _e = err;
|
|
55
|
-
} finally {
|
|
56
|
-
try {
|
|
57
|
-
!_n && _i.return != null && _i.return();
|
|
58
|
-
} finally {
|
|
59
|
-
if (_d) throw _e;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return _arr;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function _non_iterable_rest() {
|
|
66
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
67
|
-
}
|
|
68
|
-
function _object_spread(target) {
|
|
69
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
70
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
71
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
72
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
73
|
-
}))), ownKeys2.forEach(function(key) {
|
|
74
|
-
_define_property(target, key, source[key]);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
return target;
|
|
78
|
-
}
|
|
79
|
-
function ownKeys(object, enumerableOnly) {
|
|
80
|
-
var keys = Object.keys(object);
|
|
81
|
-
if (Object.getOwnPropertySymbols) {
|
|
82
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
83
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
84
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
85
|
-
})), keys.push.apply(keys, symbols);
|
|
86
|
-
}
|
|
87
|
-
return keys;
|
|
88
|
-
}
|
|
89
|
-
function _object_spread_props(target, source) {
|
|
90
|
-
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
91
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
92
|
-
}), target;
|
|
93
|
-
}
|
|
94
|
-
function _sliced_to_array(arr, i) {
|
|
95
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
96
|
-
}
|
|
97
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
98
|
-
if (o) {
|
|
99
|
-
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
100
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
101
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
102
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
30
|
import_react.default.keep;
|
|
106
31
|
function themed(Component) {
|
|
107
32
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
@@ -109,16 +34,18 @@ function themed(Component) {
|
|
|
109
34
|
defaultStrokeWidth: 2,
|
|
110
35
|
fallbackColor: "#000"
|
|
111
36
|
}, wrapped = function(propsIn) {
|
|
112
|
-
var
|
|
37
|
+
var [props, style, theme] = (0, import_core.usePropsAndStyle)(propsIn, {
|
|
38
|
+
...opts,
|
|
113
39
|
forComponent: import_core.Text,
|
|
114
40
|
resolveValues: "web"
|
|
115
|
-
})
|
|
116
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component,
|
|
41
|
+
}), _style_color, defaultColor = (_style_color = style.color) !== null && _style_color !== void 0 ? _style_color : opts.defaultThemeColor, color = (0, import_core.getVariable)((defaultColor ? theme[defaultColor] : void 0) || style.color || (props.disableTheme ? null : theme.color) || opts.fallbackColor), size = typeof props.size == "string" ? (0, import_core.getTokenValue)(props.size, "size") : props.size, _props_strokeWidth, strokeWidth = typeof props.strokeWidth == "string" ? (0, import_core.getTokenValue)(props.strokeWidth, "size") : (_props_strokeWidth = props.strokeWidth) !== null && _props_strokeWidth !== void 0 ? _props_strokeWidth : `${opts.defaultStrokeWidth}`;
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {
|
|
43
|
+
...props,
|
|
117
44
|
color,
|
|
118
45
|
size,
|
|
119
46
|
strokeWidth,
|
|
120
47
|
style
|
|
121
|
-
})
|
|
48
|
+
});
|
|
122
49
|
};
|
|
123
50
|
return wrapped;
|
|
124
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/helpers-icon/src/themed.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,cAAmE,0BACnE,eAAkB
|
|
5
|
-
"names": ["React", "themed", "Component", "opts", "defaultThemeColor", "process", "env", "DEFAULT_ICON_THEME_COLOR", "defaultStrokeWidth", "fallbackColor", "wrapped", "propsIn", "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,cAAmE,0BACnE,eAAkB;AAKlBA,aAAAA,QAAM;AAYC,SAASC,OACdC,WAA8B;MAC9BC,OAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAa;IACXC,mBAAmBC,QAAQC,IAAIC,4BAA4B;IAC3DC,oBAAoB;IACpBC,eAAe;EACjB,GAEMC,UAAU,SAACC,SAAAA;AACf,QAAM,CAACC,OAAOC,OAAOC,KAAAA,QAASC,8BAAiBJ,SAAS;MACtD,GAAGR;MACHa,cAAcC;MACdC,eAAe;IACjB,CAAA,GAEqBL,cAAfM,gBAAeN,eAAAA,MAAMO,WAAK,QAAXP,iBAAAA,SAAAA,eAAeV,KAAKC,mBAEnCgB,YAAQC,0BACXF,eAAeL,MAAMK,YAAAA,IAA0BG,WAC9CT,MAAMO,UACJR,MAAMW,eAA6B,OAAdT,MAAMM,UAC7BjB,KAAKM,aAAa,GAGhBe,OACJ,OAAOZ,MAAMY,QAAS,eAClBC,2BAAcb,MAAMY,MAAa,MAAA,IACjCZ,MAAMY,MAKNZ,oBAHAc,cACJ,OAAOd,MAAMc,eAAgB,eACzBD,2BAAcb,MAAMc,aAAoB,MAAA,KACxCd,qBAAAA,MAAMc,iBAAW,QAAjBd,uBAAAA,SAAAA,qBAAqB,GAAGT,KAAKK,kBAAkB;AAErD,WACE,uCAAAmB,KAACzB,WAAAA;MACE,GAAGU;MACJQ;MACAI;MACAE;MACAb;;EAGN;AAEA,SAAOH;AACT;",
|
|
5
|
+
"names": ["React", "themed", "Component", "opts", "defaultThemeColor", "process", "env", "DEFAULT_ICON_THEME_COLOR", "defaultStrokeWidth", "fallbackColor", "wrapped", "propsIn", "props", "style", "theme", "usePropsAndStyle", "forComponent", "Text", "resolveValues", "defaultColor", "color", "getVariable", "undefined", "disableTheme", "size", "getTokenValue", "strokeWidth", "_jsx"]
|
|
6
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc","ignoreList":[]}
|
|
@@ -1,81 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getTokenValue, getVariable, usePropsAndStyle, Text } from "@tamagui/core";
|
|
3
3
|
import React from "react";
|
|
4
|
-
function _array_like_to_array(arr, len) {
|
|
5
|
-
(len == null || len > arr.length) && (len = arr.length);
|
|
6
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
7
|
-
return arr2;
|
|
8
|
-
}
|
|
9
|
-
function _array_with_holes(arr) {
|
|
10
|
-
if (Array.isArray(arr)) return arr;
|
|
11
|
-
}
|
|
12
|
-
function _define_property(obj, key, value) {
|
|
13
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
14
|
-
value,
|
|
15
|
-
enumerable: !0,
|
|
16
|
-
configurable: !0,
|
|
17
|
-
writable: !0
|
|
18
|
-
}) : obj[key] = value, obj;
|
|
19
|
-
}
|
|
20
|
-
function _iterable_to_array_limit(arr, i) {
|
|
21
|
-
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
22
|
-
if (_i != null) {
|
|
23
|
-
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
24
|
-
try {
|
|
25
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
26
|
-
;
|
|
27
|
-
} catch (err) {
|
|
28
|
-
_d = !0, _e = err;
|
|
29
|
-
} finally {
|
|
30
|
-
try {
|
|
31
|
-
!_n && _i.return != null && _i.return();
|
|
32
|
-
} finally {
|
|
33
|
-
if (_d) throw _e;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return _arr;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function _non_iterable_rest() {
|
|
40
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
41
|
-
}
|
|
42
|
-
function _object_spread(target) {
|
|
43
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
44
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
45
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
46
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
47
|
-
}))), ownKeys2.forEach(function(key) {
|
|
48
|
-
_define_property(target, key, source[key]);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return target;
|
|
52
|
-
}
|
|
53
|
-
function ownKeys(object, enumerableOnly) {
|
|
54
|
-
var keys = Object.keys(object);
|
|
55
|
-
if (Object.getOwnPropertySymbols) {
|
|
56
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
57
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
58
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
59
|
-
})), keys.push.apply(keys, symbols);
|
|
60
|
-
}
|
|
61
|
-
return keys;
|
|
62
|
-
}
|
|
63
|
-
function _object_spread_props(target, source) {
|
|
64
|
-
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
65
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
66
|
-
}), target;
|
|
67
|
-
}
|
|
68
|
-
function _sliced_to_array(arr, i) {
|
|
69
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
70
|
-
}
|
|
71
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
72
|
-
if (o) {
|
|
73
|
-
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
74
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
75
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
76
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
4
|
React.keep;
|
|
80
5
|
function themed(Component) {
|
|
81
6
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
@@ -83,16 +8,18 @@ function themed(Component) {
|
|
|
83
8
|
defaultStrokeWidth: 2,
|
|
84
9
|
fallbackColor: "#000"
|
|
85
10
|
}, wrapped = function(propsIn) {
|
|
86
|
-
var
|
|
11
|
+
var [props, style, theme] = usePropsAndStyle(propsIn, {
|
|
12
|
+
...opts,
|
|
87
13
|
forComponent: Text,
|
|
88
14
|
resolveValues: "web"
|
|
89
|
-
})
|
|
90
|
-
return /* @__PURE__ */ _jsx(Component,
|
|
15
|
+
}), _style_color, defaultColor = (_style_color = style.color) !== null && _style_color !== void 0 ? _style_color : opts.defaultThemeColor, color = getVariable((defaultColor ? theme[defaultColor] : void 0) || style.color || (props.disableTheme ? null : theme.color) || opts.fallbackColor), size = typeof props.size == "string" ? getTokenValue(props.size, "size") : props.size, _props_strokeWidth, strokeWidth = typeof props.strokeWidth == "string" ? getTokenValue(props.strokeWidth, "size") : (_props_strokeWidth = props.strokeWidth) !== null && _props_strokeWidth !== void 0 ? _props_strokeWidth : `${opts.defaultStrokeWidth}`;
|
|
16
|
+
return /* @__PURE__ */ _jsx(Component, {
|
|
17
|
+
...props,
|
|
91
18
|
color,
|
|
92
19
|
size,
|
|
93
20
|
strokeWidth,
|
|
94
21
|
style
|
|
95
|
-
})
|
|
22
|
+
});
|
|
96
23
|
};
|
|
97
24
|
return wrapped;
|
|
98
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/helpers-icon/src/themed.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,eAAeC,aAAaC,kBAAkBC,YAAY;AACnE,OAAOC,WAAW
|
|
5
|
-
"names": ["getTokenValue", "getVariable", "usePropsAndStyle", "Text", "React", "themed", "Component", "opts", "defaultThemeColor", "process", "env", "DEFAULT_ICON_THEME_COLOR", "defaultStrokeWidth", "fallbackColor", "wrapped", "propsIn", "
|
|
4
|
+
"mappings": ";AAAA,SAASA,eAAeC,aAAaC,kBAAkBC,YAAY;AACnE,OAAOC,WAAW;AAKlBA,MAAM;AAYC,SAASC,OACdC,WAA8B;MAC9BC,OAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAa;IACXC,mBAAmBC,QAAQC,IAAIC,4BAA4B;IAC3DC,oBAAoB;IACpBC,eAAe;EACjB,GAEMC,UAAU,SAACC,SAAAA;AACf,QAAM,CAACC,OAAOC,OAAOC,KAAAA,IAAShB,iBAAiBa,SAAS;MACtD,GAAGR;MACHY,cAAchB;MACdiB,eAAe;IACjB,CAAA,GAEqBH,cAAfI,gBAAeJ,eAAAA,MAAMK,WAAK,QAAXL,iBAAAA,SAAAA,eAAeV,KAAKC,mBAEnCc,QAAQrB,aACXoB,eAAeH,MAAMG,YAAAA,IAA0BE,WAC9CN,MAAMK,UACJN,MAAMQ,eAA6B,OAAdN,MAAMI,UAC7Bf,KAAKM,aAAa,GAGhBY,OACJ,OAAOT,MAAMS,QAAS,WAClBzB,cAAcgB,MAAMS,MAAa,MAAA,IACjCT,MAAMS,MAKNT,oBAHAU,cACJ,OAAOV,MAAMU,eAAgB,WACzB1B,cAAcgB,MAAMU,aAAoB,MAAA,KACxCV,qBAAAA,MAAMU,iBAAW,QAAjBV,uBAAAA,SAAAA,qBAAqB,GAAGT,KAAKK,kBAAkB;AAErD,WACE,qBAACN,WAAAA;MACE,GAAGU;MACJM;MACAG;MACAC;MACAT;;EAGN;AAEA,SAAOH;AACT;",
|
|
5
|
+
"names": ["getTokenValue", "getVariable", "usePropsAndStyle", "Text", "React", "themed", "Component", "opts", "defaultThemeColor", "process", "env", "DEFAULT_ICON_THEME_COLOR", "defaultStrokeWidth", "fallbackColor", "wrapped", "propsIn", "props", "style", "theme", "forComponent", "resolveValues", "defaultColor", "color", "undefined", "disableTheme", "size", "strokeWidth"]
|
|
6
6
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getTokenValue, getVariable, usePropsAndStyle, Text } from "@tamagui/core";
|
|
3
|
+
import React from "react";
|
|
4
|
+
React.keep;
|
|
5
|
+
function themed(Component) {
|
|
6
|
+
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
7
|
+
defaultThemeColor: process.env.DEFAULT_ICON_THEME_COLOR || "$color",
|
|
8
|
+
defaultStrokeWidth: 2,
|
|
9
|
+
fallbackColor: "#000"
|
|
10
|
+
},
|
|
11
|
+
wrapped = function (propsIn) {
|
|
12
|
+
var [props, style, theme] = usePropsAndStyle(propsIn, {
|
|
13
|
+
...opts,
|
|
14
|
+
forComponent: Text,
|
|
15
|
+
resolveValues: "web"
|
|
16
|
+
}),
|
|
17
|
+
_style_color,
|
|
18
|
+
defaultColor = (_style_color = style.color) !== null && _style_color !== void 0 ? _style_color : opts.defaultThemeColor,
|
|
19
|
+
color = getVariable((defaultColor ? theme[defaultColor] : void 0) || style.color || (props.disableTheme ? null : theme.color) || opts.fallbackColor),
|
|
20
|
+
size = typeof props.size == "string" ? getTokenValue(props.size, "size") : props.size,
|
|
21
|
+
_props_strokeWidth,
|
|
22
|
+
strokeWidth = typeof props.strokeWidth == "string" ? getTokenValue(props.strokeWidth, "size") : (_props_strokeWidth = props.strokeWidth) !== null && _props_strokeWidth !== void 0 ? _props_strokeWidth : `${opts.defaultStrokeWidth}`;
|
|
23
|
+
return /* @__PURE__ */_jsx(Component, {
|
|
24
|
+
...props,
|
|
25
|
+
color,
|
|
26
|
+
size,
|
|
27
|
+
strokeWidth,
|
|
28
|
+
style
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
return wrapped;
|
|
32
|
+
}
|
|
33
|
+
export { themed };
|
|
34
|
+
//# sourceMappingURL=themed.native.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jsx","_jsx","getTokenValue","getVariable","usePropsAndStyle","Text","React","keep","themed","Component","opts","arguments","length","defaultThemeColor","process","env","DEFAULT_ICON_THEME_COLOR","defaultStrokeWidth","fallbackColor","wrapped","propsIn","props","style","theme","forComponent","resolveValues","_style_color","defaultColor","color","disableTheme","size","_props_strokeWidth","strokeWidth"],"sources":["../../src/themed.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAA,IAAAC,IAAA,QAAe,mBAAa;AACrC,SAAOC,aAAW,EAAAC,WAAA,EAAAC,gBAAA,EAAAC,IAAA;AAoDZ,OAAAC,KAAA;AA/CNA,KAAA,CAAMC,IAAA;AAYC,SAASC,OACdC,SAAA,EACA;EACE,IAAAC,IAAA,GAAAC,SAAmB,CAAAC,MAAQ,IAAI,IAAAD,SAAA,iBAA4BA,SAAA;MAC3DE,iBAAA,EAAoBC,OAAA,CAAAC,GAAA,CAAAC,wBAAA;MACpBC,kBAAe;MAEjBC,aAAA;IAsCA;IAAAC,OArCiB,YAAAA,CAAuBC,OAAA;MACtC,KAAAC,KAAO,EAAAC,KAAO,EAAAC,KAAO,IAAKnB,gBAAI,CAAAgB,OAAiB;UAC7C,GAAGV,IAAA;UACHc,YAAA,EAAcnB,IAAA;UACdoB,aAAA,EAAe;QAAA;QAAAC,YAAA;QAAAC,YAAA,IAAAD,YAAA,GAAAJ,KAAA,CAAAM,KAAA,cAAAF,YAAA,cAAAA,YAAA,GAAAhB,IAAA,CAAAG,iBAAA;QAAAe,KAAA,GAAAzB,WAAA,EAAAwB,YAAA,GAAAJ,KAAA,CAAAI,YAAA,eAAAL,KAAA,CAAAM,KAAA,KAAAP,KAAA,CAAAQ,YAAA,UAAAN,KAAA,CAAAK,KAAA,KAAAlB,IAAA,CAAAQ,aAAA;QAAAY,IAAA,UAAAT,KAAA,CAAAS,IAAA,eAAA5B,aAAA,CAAAmB,KAAA,CAAAS,IAAA,YAAAT,KAAA,CAAAS,IAAA;QAAAC,kBAAA;QAAAC,WAAA,UAAAX,KAAA,CAAAW,WAAA,eAAA9B,aAAA,CAAAmB,KAAA,CAAAW,WAAA,aAAAD,kBAAA,GAAAV,KAAA,CAAAW,WAAA,cAAAD,kBAAA,cAAAA,kBAAA,MAAArB,IAAA,CAAAO,kBAAA;MACjB,OAEM,eAAehB,IAAM,CAAAQ,SAAS,EAAK;QAE3B,GACXY,KAAA;QAIHO,KAEM;QAUNE,IAAA;QACGE,WAAA;QAAAV;MAAA;IACK;EACJ,OACAH,OAAA;AAAA;AACA,SACAX,MAAA","ignoreList":[]}
|
|
@@ -1,81 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getTokenValue, getVariable, usePropsAndStyle, Text } from "@tamagui/core";
|
|
3
3
|
import React from "react";
|
|
4
|
-
function _array_like_to_array(arr, len) {
|
|
5
|
-
(len == null || len > arr.length) && (len = arr.length);
|
|
6
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
7
|
-
return arr2;
|
|
8
|
-
}
|
|
9
|
-
function _array_with_holes(arr) {
|
|
10
|
-
if (Array.isArray(arr)) return arr;
|
|
11
|
-
}
|
|
12
|
-
function _define_property(obj, key, value) {
|
|
13
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
14
|
-
value,
|
|
15
|
-
enumerable: !0,
|
|
16
|
-
configurable: !0,
|
|
17
|
-
writable: !0
|
|
18
|
-
}) : obj[key] = value, obj;
|
|
19
|
-
}
|
|
20
|
-
function _iterable_to_array_limit(arr, i) {
|
|
21
|
-
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
22
|
-
if (_i != null) {
|
|
23
|
-
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
24
|
-
try {
|
|
25
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
26
|
-
;
|
|
27
|
-
} catch (err) {
|
|
28
|
-
_d = !0, _e = err;
|
|
29
|
-
} finally {
|
|
30
|
-
try {
|
|
31
|
-
!_n && _i.return != null && _i.return();
|
|
32
|
-
} finally {
|
|
33
|
-
if (_d) throw _e;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return _arr;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function _non_iterable_rest() {
|
|
40
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
41
|
-
}
|
|
42
|
-
function _object_spread(target) {
|
|
43
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
44
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
45
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
46
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
47
|
-
}))), ownKeys2.forEach(function(key) {
|
|
48
|
-
_define_property(target, key, source[key]);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return target;
|
|
52
|
-
}
|
|
53
|
-
function ownKeys(object, enumerableOnly) {
|
|
54
|
-
var keys = Object.keys(object);
|
|
55
|
-
if (Object.getOwnPropertySymbols) {
|
|
56
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
57
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
58
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
59
|
-
})), keys.push.apply(keys, symbols);
|
|
60
|
-
}
|
|
61
|
-
return keys;
|
|
62
|
-
}
|
|
63
|
-
function _object_spread_props(target, source) {
|
|
64
|
-
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
65
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
66
|
-
}), target;
|
|
67
|
-
}
|
|
68
|
-
function _sliced_to_array(arr, i) {
|
|
69
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
70
|
-
}
|
|
71
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
72
|
-
if (o) {
|
|
73
|
-
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
74
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
75
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
76
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
4
|
React.keep;
|
|
80
5
|
function themed(Component) {
|
|
81
6
|
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
@@ -83,16 +8,18 @@ function themed(Component) {
|
|
|
83
8
|
defaultStrokeWidth: 2,
|
|
84
9
|
fallbackColor: "#000"
|
|
85
10
|
}, wrapped = function(propsIn) {
|
|
86
|
-
var
|
|
11
|
+
var [props, style, theme] = usePropsAndStyle(propsIn, {
|
|
12
|
+
...opts,
|
|
87
13
|
forComponent: Text,
|
|
88
14
|
resolveValues: "web"
|
|
89
|
-
})
|
|
90
|
-
return /* @__PURE__ */ _jsx(Component,
|
|
15
|
+
}), _style_color, defaultColor = (_style_color = style.color) !== null && _style_color !== void 0 ? _style_color : opts.defaultThemeColor, color = getVariable((defaultColor ? theme[defaultColor] : void 0) || style.color || (props.disableTheme ? null : theme.color) || opts.fallbackColor), size = typeof props.size == "string" ? getTokenValue(props.size, "size") : props.size, _props_strokeWidth, strokeWidth = typeof props.strokeWidth == "string" ? getTokenValue(props.strokeWidth, "size") : (_props_strokeWidth = props.strokeWidth) !== null && _props_strokeWidth !== void 0 ? _props_strokeWidth : `${opts.defaultStrokeWidth}`;
|
|
16
|
+
return /* @__PURE__ */ _jsx(Component, {
|
|
17
|
+
...props,
|
|
91
18
|
color,
|
|
92
19
|
size,
|
|
93
20
|
strokeWidth,
|
|
94
21
|
style
|
|
95
|
-
})
|
|
22
|
+
});
|
|
96
23
|
};
|
|
97
24
|
return wrapped;
|
|
98
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/helpers-icon/src/themed.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,eAAeC,aAAaC,kBAAkBC,YAAY;AACnE,OAAOC,WAAW
|
|
5
|
-
"names": ["getTokenValue", "getVariable", "usePropsAndStyle", "Text", "React", "themed", "Component", "opts", "defaultThemeColor", "process", "env", "DEFAULT_ICON_THEME_COLOR", "defaultStrokeWidth", "fallbackColor", "wrapped", "propsIn", "
|
|
4
|
+
"mappings": ";AAAA,SAASA,eAAeC,aAAaC,kBAAkBC,YAAY;AACnE,OAAOC,WAAW;AAKlBA,MAAM;AAYC,SAASC,OACdC,WAA8B;MAC9BC,OAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAa;IACXC,mBAAmBC,QAAQC,IAAIC,4BAA4B;IAC3DC,oBAAoB;IACpBC,eAAe;EACjB,GAEMC,UAAU,SAACC,SAAAA;AACf,QAAM,CAACC,OAAOC,OAAOC,KAAAA,IAAShB,iBAAiBa,SAAS;MACtD,GAAGR;MACHY,cAAchB;MACdiB,eAAe;IACjB,CAAA,GAEqBH,cAAfI,gBAAeJ,eAAAA,MAAMK,WAAK,QAAXL,iBAAAA,SAAAA,eAAeV,KAAKC,mBAEnCc,QAAQrB,aACXoB,eAAeH,MAAMG,YAAAA,IAA0BE,WAC9CN,MAAMK,UACJN,MAAMQ,eAA6B,OAAdN,MAAMI,UAC7Bf,KAAKM,aAAa,GAGhBY,OACJ,OAAOT,MAAMS,QAAS,WAClBzB,cAAcgB,MAAMS,MAAa,MAAA,IACjCT,MAAMS,MAKNT,oBAHAU,cACJ,OAAOV,MAAMU,eAAgB,WACzB1B,cAAcgB,MAAMU,aAAoB,MAAA,KACxCV,qBAAAA,MAAMU,iBAAW,QAAjBV,uBAAAA,SAAAA,qBAAqB,GAAGT,KAAKK,kBAAkB;AAErD,WACE,qBAACN,WAAAA;MACE,GAAGU;MACJM;MACAG;MACAC;MACAT;;EAGN;AAEA,SAAOH;AACT;",
|
|
5
|
+
"names": ["getTokenValue", "getVariable", "usePropsAndStyle", "Text", "React", "themed", "Component", "opts", "defaultThemeColor", "process", "env", "DEFAULT_ICON_THEME_COLOR", "defaultStrokeWidth", "fallbackColor", "wrapped", "propsIn", "props", "style", "theme", "forComponent", "resolveValues", "defaultColor", "color", "undefined", "disableTheme", "size", "strokeWidth"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-icon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.111.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "Utilities for icon packages",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tamagui/core": "1.
|
|
24
|
+
"@tamagui/core": "1.111.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "*",
|
|
28
28
|
"react-native-svg": ">=12"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@tamagui/build": "1.
|
|
31
|
+
"@tamagui/build": "1.111.1",
|
|
32
32
|
"react": "^18.2.0 || ^19.0.0",
|
|
33
33
|
"react-native-svg": "15.2.0"
|
|
34
34
|
}
|