@hanzogui/component-helpers 8.3.0 → 8.3.2
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/getIcon.js +19 -0
- package/dist/cjs/getIcon.js.map +1 -0
- package/dist/cjs/index.js +9 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/prevent.js +6 -0
- package/dist/cjs/prevent.js.map +1 -0
- package/dist/cjs/useCurrentColor.js +13 -0
- package/dist/cjs/useCurrentColor.js.map +1 -0
- package/dist/cjs/useGetThemedIcon.js +24 -0
- package/dist/cjs/useGetThemedIcon.js.map +1 -0
- package/dist/esm/getIcon.js +14 -0
- package/dist/esm/getIcon.js.map +1 -0
- package/dist/esm/index.js +6 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/prevent.js +2 -0
- package/dist/esm/prevent.js.map +1 -0
- package/dist/esm/useCurrentColor.js +9 -0
- package/dist/esm/useCurrentColor.js.map +1 -0
- package/dist/esm/useGetThemedIcon.js +19 -0
- package/dist/esm/useGetThemedIcon.js.map +1 -0
- package/package.json +17 -17
- package/src/index.ts +4 -4
- package/src/useGetThemedIcon.tsx +2 -2
- package/types/getIcon.d.ts.map +1 -1
- package/types/index.d.ts +4 -4
- package/types/index.d.ts.map +1 -1
- package/types/prevent.d.ts.map +1 -1
- package/types/useCurrentColor.d.ts.map +1 -1
- package/types/useGetThemedIcon.d.ts +1 -1
- package/types/useGetThemedIcon.d.ts.map +1 -1
- package/dist/cjs/getIcon.cjs +0 -50
- package/dist/cjs/getIcon.native.js +0 -53
- package/dist/cjs/getIcon.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -24
- package/dist/cjs/index.native.js +0 -27
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/cjs/prevent.cjs +0 -28
- package/dist/cjs/prevent.native.js +0 -33
- package/dist/cjs/prevent.native.js.map +0 -1
- package/dist/cjs/useCurrentColor.cjs +0 -33
- package/dist/cjs/useCurrentColor.native.js +0 -37
- package/dist/cjs/useCurrentColor.native.js.map +0 -1
- package/dist/cjs/useGetThemedIcon.cjs +0 -55
- package/dist/cjs/useGetThemedIcon.native.js +0 -58
- package/dist/cjs/useGetThemedIcon.native.js.map +0 -1
- package/dist/esm/getIcon.mjs +0 -14
- package/dist/esm/getIcon.mjs.map +0 -1
- package/dist/esm/getIcon.native.js +0 -14
- package/dist/esm/getIcon.native.js.map +0 -1
- package/dist/esm/index.mjs +0 -6
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -6
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/prevent.mjs +0 -3
- package/dist/esm/prevent.mjs.map +0 -1
- package/dist/esm/prevent.native.js +0 -5
- package/dist/esm/prevent.native.js.map +0 -1
- package/dist/esm/useCurrentColor.mjs +0 -8
- package/dist/esm/useCurrentColor.mjs.map +0 -1
- package/dist/esm/useCurrentColor.native.js +0 -9
- package/dist/esm/useCurrentColor.native.js.map +0 -1
- package/dist/esm/useGetThemedIcon.mjs +0 -19
- package/dist/esm/useGetThemedIcon.mjs.map +0 -1
- package/dist/esm/useGetThemedIcon.native.js +0 -19
- package/dist/esm/useGetThemedIcon.native.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIcon = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const getIcon = (el, props) => {
|
|
7
|
+
if (!el)
|
|
8
|
+
return el;
|
|
9
|
+
if (react_1.default.isValidElement(el)) {
|
|
10
|
+
return react_1.default.cloneElement(el, {
|
|
11
|
+
...props,
|
|
12
|
+
// @ts-expect-error
|
|
13
|
+
...el.props,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return react_1.default.createElement(el, props);
|
|
17
|
+
};
|
|
18
|
+
exports.getIcon = getIcon;
|
|
19
|
+
//# sourceMappingURL=getIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIcon.js","sourceRoot":"","sources":["../../src/getIcon.tsx"],"names":[],"mappings":";;;;AAAA,0DAAyB;AAElB,MAAM,OAAO,GAAG,CACrB,EAAO,EACP,KAIC,EACD,EAAE;IACF,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,CAAA;IAClB,IAAI,eAAK,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC;QAC7B,OAAO,eAAK,CAAC,YAAY,CAAC,EAAE,EAAE;YAC5B,GAAG,KAAK;YACR,mBAAmB;YACnB,GAAG,EAAE,CAAC,KAAK;SACZ,CAAC,CAAA;IACJ,CAAC;IACD,OAAO,eAAK,CAAC,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AACvC,CAAC,CAAA;AAjBY,QAAA,OAAO,GAAP,OAAO,CAiBnB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("@hanzogui/helpers"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./prevent.js"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./useCurrentColor.js"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./useGetThemedIcon.js"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./getIcon.js"), exports);
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAiC;AACjC,uDAA6B;AAC7B,+DAAqC;AACrC,gEAAsC;AACtC,uDAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prevent.js","sourceRoot":"","sources":["../../src/prevent.tsx"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC,CAAA;AAA1D,QAAA,OAAO,GAAP,OAAO,CAAmD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentColor = void 0;
|
|
4
|
+
const web_1 = require("@hanzogui/web");
|
|
5
|
+
const useCurrentColor = (colorProp) => {
|
|
6
|
+
const theme = (0, web_1.useTheme)();
|
|
7
|
+
const out = colorProp
|
|
8
|
+
? (0, web_1.getVariable)(colorProp)
|
|
9
|
+
: theme[colorProp]?.get() || theme.color?.get();
|
|
10
|
+
return out;
|
|
11
|
+
};
|
|
12
|
+
exports.useCurrentColor = useCurrentColor;
|
|
13
|
+
//# sourceMappingURL=useCurrentColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCurrentColor.js","sourceRoot":"","sources":["../../src/useCurrentColor.tsx"],"names":[],"mappings":";;;AACA,uCAAqD;AAG9C,MAAM,eAAe,GAAG,CAAC,SAAoB,EAAE,EAAE;IACtD,MAAM,KAAK,GAAG,IAAA,cAAQ,GAAE,CAAA;IACxB,MAAM,GAAG,GAAG,SAAS;QACnB,CAAC,CAAC,IAAA,iBAAW,EAAC,SAAS,CAAC;QACxB,CAAC,CAAC,KAAK,CAAC,SAAgB,CAAC,EAAE,GAAG,EAAE,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,CAAA;IACxD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AANY,QAAA,eAAe,GAAf,eAAe,CAM3B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGetThemedIcon = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const useCurrentColor_tsx_1 = require("./useCurrentColor.js");
|
|
7
|
+
const useGetThemedIcon = (props) => {
|
|
8
|
+
const color = (0, useCurrentColor_tsx_1.useCurrentColor)(props.color);
|
|
9
|
+
return (el) => {
|
|
10
|
+
if (!el)
|
|
11
|
+
return el;
|
|
12
|
+
if (react_1.default.isValidElement(el)) {
|
|
13
|
+
return react_1.default.cloneElement(el, {
|
|
14
|
+
...props,
|
|
15
|
+
color,
|
|
16
|
+
// @ts-expect-error
|
|
17
|
+
...el.props,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return react_1.default.createElement(el, props);
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
exports.useGetThemedIcon = useGetThemedIcon;
|
|
24
|
+
//# sourceMappingURL=useGetThemedIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetThemedIcon.js","sourceRoot":"","sources":["../../src/useGetThemedIcon.tsx"],"names":[],"mappings":";;;;AAAA,0DAAyB;AAEzB,8DAAuD;AAEhD,MAAM,gBAAgB,GAAG,CAAC,KAAyC,EAAE,EAAE;IAC5E,MAAM,KAAK,GAAG,IAAA,qCAAe,EAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAC1C,OAAO,CAAC,EAAO,EAAE,EAAE;QACjB,IAAI,CAAC,EAAE;YAAE,OAAO,EAAE,CAAA;QAClB,IAAI,eAAK,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC;YAC7B,OAAO,eAAK,CAAC,YAAY,CAAC,EAAE,EAAE;gBAC5B,GAAG,KAAK;gBACR,KAAK;gBACL,mBAAmB;gBACnB,GAAG,EAAE,CAAC,KAAK;aACZ,CAAC,CAAA;QACJ,CAAC;QACD,OAAO,eAAK,CAAC,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;IACvC,CAAC,CAAA;AACH,CAAC,CAAA;AAdY,QAAA,gBAAgB,GAAhB,gBAAgB,CAc5B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const getIcon = (el, props) => {
|
|
3
|
+
if (!el)
|
|
4
|
+
return el;
|
|
5
|
+
if (React.isValidElement(el)) {
|
|
6
|
+
return React.cloneElement(el, {
|
|
7
|
+
...props,
|
|
8
|
+
// @ts-expect-error
|
|
9
|
+
...el.props,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return React.createElement(el, props);
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=getIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIcon.js","sourceRoot":"","sources":["../../src/getIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,EAAO,EACP,KAIC,EACD,EAAE;IACF,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,CAAA;IAClB,IAAI,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC,YAAY,CAAC,EAAE,EAAE;YAC5B,GAAG,KAAK;YACR,mBAAmB;YACnB,GAAG,EAAE,CAAC,KAAK;SACZ,CAAC,CAAA;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;AACvC,CAAC,CAAA"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from '@hanzogui/helpers';
|
|
2
|
+
export * from './prevent.js';
|
|
3
|
+
export * from './useCurrentColor.js';
|
|
4
|
+
export * from './useGetThemedIcon.js';
|
|
5
|
+
export * from './getIcon.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAe,CAAA;AAC7B,cAAc,sBAAuB,CAAA;AACrC,cAAc,uBAAwB,CAAA;AACtC,cAAc,cAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prevent.js","sourceRoot":"","sources":["../../src/prevent.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getVariable, useTheme } from '@hanzogui/web';
|
|
2
|
+
export const useCurrentColor = (colorProp) => {
|
|
3
|
+
const theme = useTheme();
|
|
4
|
+
const out = colorProp
|
|
5
|
+
? getVariable(colorProp)
|
|
6
|
+
: theme[colorProp]?.get() || theme.color?.get();
|
|
7
|
+
return out;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useCurrentColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCurrentColor.js","sourceRoot":"","sources":["../../src/useCurrentColor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAGrD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAoB,EAAE,EAAE;IACtD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,MAAM,GAAG,GAAG,SAAS;QACnB,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC;QACxB,CAAC,CAAC,KAAK,CAAC,SAAgB,CAAC,EAAE,GAAG,EAAE,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,CAAA;IACxD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCurrentColor } from './useCurrentColor.js';
|
|
3
|
+
export const useGetThemedIcon = (props) => {
|
|
4
|
+
const color = useCurrentColor(props.color);
|
|
5
|
+
return (el) => {
|
|
6
|
+
if (!el)
|
|
7
|
+
return el;
|
|
8
|
+
if (React.isValidElement(el)) {
|
|
9
|
+
return React.cloneElement(el, {
|
|
10
|
+
...props,
|
|
11
|
+
color,
|
|
12
|
+
// @ts-expect-error
|
|
13
|
+
...el.props,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return React.createElement(el, props);
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useGetThemedIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetThemedIcon.js","sourceRoot":"","sources":["../../src/useGetThemedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAA;AAEvD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAyC,EAAE,EAAE;IAC5E,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAC1C,OAAO,CAAC,EAAO,EAAE,EAAE;QACjB,IAAI,CAAC,EAAE;YAAE,OAAO,EAAE,CAAA;QAClB,IAAI,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC,YAAY,CAAC,EAAE,EAAE;gBAC5B,GAAG,KAAK;gBACR,KAAK;gBACL,mBAAmB;gBACnB,GAAG,EAAE,CAAC,KAAK;aACZ,CAAC,CAAA;QACJ,CAAC;QACD,OAAO,KAAK,CAAC,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;IACvC,CAAC,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/component-helpers",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.2",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -9,42 +9,42 @@
|
|
|
9
9
|
],
|
|
10
10
|
"type": "module",
|
|
11
11
|
"sideEffects": false,
|
|
12
|
-
"main": "dist/cjs",
|
|
13
|
-
"module": "dist/esm",
|
|
12
|
+
"main": "./dist/cjs/index.js",
|
|
13
|
+
"module": "./dist/esm/index.js",
|
|
14
14
|
"types": "./types/index.d.ts",
|
|
15
15
|
"exports": {
|
|
16
16
|
"./package.json": "./package.json",
|
|
17
17
|
".": {
|
|
18
18
|
"types": "./types/index.d.ts",
|
|
19
|
-
"react-native": "./dist/esm/index.
|
|
20
|
-
"browser": "./dist/esm/index.
|
|
21
|
-
"module": "./dist/esm/index.
|
|
22
|
-
"import": "./dist/esm/index.
|
|
23
|
-
"require": "./dist/cjs/index.
|
|
24
|
-
"default": "./dist/esm/index.
|
|
19
|
+
"react-native": "./dist/esm/index.js",
|
|
20
|
+
"browser": "./dist/esm/index.js",
|
|
21
|
+
"module": "./dist/esm/index.js",
|
|
22
|
+
"import": "./dist/esm/index.js",
|
|
23
|
+
"require": "./dist/cjs/index.js",
|
|
24
|
+
"default": "./dist/esm/index.js"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"build": "hanzogui-build",
|
|
31
|
+
"build": "hanzogui-build --skip-native",
|
|
32
32
|
"watch": "hanzogui-build --watch",
|
|
33
33
|
"clean": "hanzogui-build clean",
|
|
34
34
|
"clean:build": "hanzogui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@hanzogui/helpers": "8.3.
|
|
38
|
-
"@hanzogui/web": "8.3.
|
|
37
|
+
"@hanzogui/helpers": "8.3.2",
|
|
38
|
+
"@hanzogui/web": "8.3.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@hanzogui/build": "8.3.
|
|
42
|
-
"react": "
|
|
43
|
-
"react-native": "0.
|
|
44
|
-
"vitest": "4.
|
|
41
|
+
"@hanzogui/build": "8.3.2",
|
|
42
|
+
"react": "19.2.8",
|
|
43
|
+
"react-native": "^0.87.1",
|
|
44
|
+
"vitest": "^4.1.11"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"react": ">=19"
|
|
47
|
+
"react": ">=19.2.8"
|
|
48
48
|
},
|
|
49
49
|
"repository": {
|
|
50
50
|
"type": "git",
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from '@hanzogui/helpers'
|
|
2
|
-
export * from './prevent'
|
|
3
|
-
export * from './useCurrentColor'
|
|
4
|
-
export * from './useGetThemedIcon'
|
|
5
|
-
export * from './getIcon'
|
|
2
|
+
export * from './prevent.tsx'
|
|
3
|
+
export * from './useCurrentColor.tsx'
|
|
4
|
+
export * from './useGetThemedIcon.tsx'
|
|
5
|
+
export * from './getIcon.tsx'
|
package/src/useGetThemedIcon.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import type { ColorProp } from './useCurrentColor'
|
|
3
|
-
import { useCurrentColor } from './useCurrentColor'
|
|
2
|
+
import type { ColorProp } from './useCurrentColor.tsx'
|
|
3
|
+
import { useCurrentColor } from './useCurrentColor.tsx'
|
|
4
4
|
|
|
5
5
|
export const useGetThemedIcon = (props: { color: ColorProp; size: number }) => {
|
|
6
6
|
const color = useCurrentColor(props.color)
|
package/types/getIcon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIcon.d.ts","sourceRoot":"","sources":["../src/getIcon.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"getIcon.d.ts","sourceRoot":"","sources":["../src/getIcon.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,OACd,GAAG,SACA;IACL,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5B,QAWF,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from '@hanzogui/helpers';
|
|
2
|
-
export * from './prevent';
|
|
3
|
-
export * from './useCurrentColor';
|
|
4
|
-
export * from './useGetThemedIcon';
|
|
5
|
-
export * from './getIcon';
|
|
2
|
+
export * from './prevent.tsx';
|
|
3
|
+
export * from './useCurrentColor.tsx';
|
|
4
|
+
export * from './useGetThemedIcon.tsx';
|
|
5
|
+
export * from './getIcon.tsx';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,eAAe,CAAA"}
|
package/types/prevent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prevent.d.ts","sourceRoot":"","sources":["../src/prevent.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"prevent.d.ts","sourceRoot":"","sources":["../src/prevent.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentColor.d.ts","sourceRoot":"","sources":["../src/useCurrentColor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"useCurrentColor.d.ts","sourceRoot":"","sources":["../src/useCurrentColor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,eAAO,MAAM,eAAe,cAAe,SAAS,QAMnD,CAAA;AAED,MAAM,MAAM,SAAS,GACjB,eAAe,GACf,QAAQ,GACR,WAAW,GACX,SAAS,CAAC,OAAO,CAAC,GAClB,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetThemedIcon.d.ts","sourceRoot":"","sources":["../src/useGetThemedIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useGetThemedIcon.d.ts","sourceRoot":"","sources":["../src/useGetThemedIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGtD,eAAO,MAAM,gBAAgB,UAAW;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,UAE5D,GAAG,QAYhB,CAAA"}
|
package/dist/cjs/getIcon.cjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
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 __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: true
|
|
30
|
-
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
34
|
-
var getIcon_exports = {};
|
|
35
|
-
__export(getIcon_exports, {
|
|
36
|
-
getIcon: () => getIcon
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(getIcon_exports);
|
|
39
|
-
var import_react = __toESM(require("react"), 1);
|
|
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
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
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, {
|
|
18
|
-
get: () => from[key],
|
|
19
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return to;
|
|
23
|
-
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
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);
|
|
36
|
-
var getIcon_exports = {};
|
|
37
|
-
__export(getIcon_exports, {
|
|
38
|
-
getIcon: () => getIcon
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(getIcon_exports);
|
|
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, {
|
|
46
|
-
...props,
|
|
47
|
-
// @ts-expect-error
|
|
48
|
-
...el.props
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return /* @__PURE__ */import_react.default.createElement(el, props);
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=getIcon.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|
package/dist/cjs/index.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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("@hanzogui/helpers"), module.exports);
|
|
21
|
-
__reExport(index_exports, require("./prevent.cjs"), module.exports);
|
|
22
|
-
__reExport(index_exports, require("./useCurrentColor.cjs"), module.exports);
|
|
23
|
-
__reExport(index_exports, require("./useGetThemedIcon.cjs"), module.exports);
|
|
24
|
-
__reExport(index_exports, require("./getIcon.cjs"), module.exports);
|
package/dist/cjs/index.native.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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("@hanzogui/helpers"), module.exports);
|
|
23
|
-
__reExport(index_exports, require("./prevent.native.js"), module.exports);
|
|
24
|
-
__reExport(index_exports, require("./useCurrentColor.native.js"), module.exports);
|
|
25
|
-
__reExport(index_exports, require("./useGetThemedIcon.native.js"), module.exports);
|
|
26
|
-
__reExport(index_exports, require("./getIcon.native.js"), module.exports);
|
|
27
|
-
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,oBADd,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":[]}
|
package/dist/cjs/prevent.cjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
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 prevent_exports = {};
|
|
24
|
-
__export(prevent_exports, {
|
|
25
|
-
prevent: () => prevent
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(prevent_exports);
|
|
28
|
-
const prevent = e => [e.preventDefault(), e.stopPropagation()];
|
|
@@ -1,33 +0,0 @@
|
|
|
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 prevent_exports = {};
|
|
26
|
-
__export(prevent_exports, {
|
|
27
|
-
prevent: () => prevent
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(prevent_exports);
|
|
30
|
-
var prevent = function (e) {
|
|
31
|
-
return [e.preventDefault(), e.stopPropagation()];
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=prevent.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,33 +0,0 @@
|
|
|
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 useCurrentColor_exports = {};
|
|
24
|
-
__export(useCurrentColor_exports, {
|
|
25
|
-
useCurrentColor: () => useCurrentColor
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(useCurrentColor_exports);
|
|
28
|
-
var import_web = require("@hanzogui/web");
|
|
29
|
-
const useCurrentColor = colorProp => {
|
|
30
|
-
const theme = (0, import_web.useTheme)();
|
|
31
|
-
const out = colorProp ? (0, import_web.getVariable)(colorProp) : theme[colorProp]?.get() || theme.color?.get();
|
|
32
|
-
return out;
|
|
33
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
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 useCurrentColor_exports = {};
|
|
26
|
-
__export(useCurrentColor_exports, {
|
|
27
|
-
useCurrentColor: () => useCurrentColor
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(useCurrentColor_exports);
|
|
30
|
-
var import_web = require("@hanzogui/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
|
-
};
|
|
37
|
-
//# sourceMappingURL=useCurrentColor.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,eAAyB;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":[]}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
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 __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: true
|
|
30
|
-
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
34
|
-
var useGetThemedIcon_exports = {};
|
|
35
|
-
__export(useGetThemedIcon_exports, {
|
|
36
|
-
useGetThemedIcon: () => useGetThemedIcon
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(useGetThemedIcon_exports);
|
|
39
|
-
var import_react = __toESM(require("react"), 1);
|
|
40
|
-
var import_useCurrentColor = require("./useCurrentColor.cjs");
|
|
41
|
-
const useGetThemedIcon = props => {
|
|
42
|
-
const color = (0, import_useCurrentColor.useCurrentColor)(props.color);
|
|
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
|
-
};
|
|
55
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
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, {
|
|
18
|
-
get: () => from[key],
|
|
19
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return to;
|
|
23
|
-
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
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);
|
|
36
|
-
var useGetThemedIcon_exports = {};
|
|
37
|
-
__export(useGetThemedIcon_exports, {
|
|
38
|
-
useGetThemedIcon: () => useGetThemedIcon
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(useGetThemedIcon_exports);
|
|
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, {
|
|
49
|
-
...props,
|
|
50
|
-
color,
|
|
51
|
-
// @ts-expect-error
|
|
52
|
-
...el.props
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
return /* @__PURE__ */import_react.default.createElement(el, props);
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=useGetThemedIcon.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|
package/dist/esm/getIcon.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
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
|
-
};
|
|
13
|
-
export { getIcon };
|
|
14
|
-
//# sourceMappingURL=getIcon.mjs.map
|
package/dist/esm/getIcon.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
var getIcon = function (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);
|
|
12
|
-
};
|
|
13
|
-
export { getIcon };
|
|
14
|
-
//# sourceMappingURL=getIcon.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","getIcon","el","props","isValidElement","cloneElement","createElement"],"sources":["../../src/getIcon.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAEX,IAAAC,OAAM,YAAAA,CAEXC,EAAA,EAAAC,KAKG;EACH,IAAI,CAACD,EAAA,EAAI,OAAOA,EAAA;EAChB,IAAI,eAAMF,KAAe,CAAAI,cAAK,CAAAF,EAAA;IAC5B,OAAO,eAAMF,KAAa,CAAAK,YAAI,CAAAH,EAAA;MAC5B,GAAGC,KAAA;MAAA;MAEH,GAAGD,EAAA,CAAGC;IACR,CAAC;EACH;EACA,OAAO,eAAMH,KAAc,CAAAM,aAAS,CAAAJ,EAAA,EAAAC,KAAA;AACtC","ignoreList":[]}
|
package/dist/esm/index.mjs
DELETED
package/dist/esm/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|
package/dist/esm/index.native.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|
package/dist/esm/prevent.mjs
DELETED
package/dist/esm/prevent.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["prevent","e","preventDefault","stopPropagation"],"sources":["../../src/prevent.tsx"],"sourcesContent":[null],"mappings":"AAAO,MAAMA,OAAA,GAAWC,CAAA,IAAM,CAACA,CAAA,CAAEC,cAAA,CAAe,GAAGD,CAAA,CAAEE,eAAA,CAAgB,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["prevent","e"],"sources":["../../src/prevent.tsx"],"sourcesContent":[null],"mappings":"AAAO,IAAAA,OAAM,YAAAA,CAAiBC,CAAC,EAAE","ignoreList":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { getVariable, useTheme } from "@hanzogui/web";
|
|
2
|
-
const useCurrentColor = colorProp => {
|
|
3
|
-
const theme = useTheme();
|
|
4
|
-
const out = colorProp ? getVariable(colorProp) : theme[colorProp]?.get() || theme.color?.get();
|
|
5
|
-
return out;
|
|
6
|
-
};
|
|
7
|
-
export { useCurrentColor };
|
|
8
|
-
//# sourceMappingURL=useCurrentColor.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getVariable","useTheme","useCurrentColor","colorProp","theme","out","get","color"],"sources":["../../src/useCurrentColor.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,WAAA,EAAaC,QAAA,QAAgB;AAG/B,MAAMC,eAAA,GAAmBC,SAAA,IAAyB;EACvD,MAAMC,KAAA,GAAQH,QAAA,CAAS;EACvB,MAAMI,GAAA,GAAMF,SAAA,GACRH,WAAA,CAAYG,SAAS,IACrBC,KAAA,CAAMD,SAAgB,GAAGG,GAAA,CAAI,KAAKF,KAAA,CAAMG,KAAA,EAAOD,GAAA,CAAI;EACvD,OAAOD,GAAA;AACT","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { getVariable, useTheme } from "@hanzogui/web";
|
|
2
|
-
var useCurrentColor = function (colorProp) {
|
|
3
|
-
var _theme_colorProp, _theme_color;
|
|
4
|
-
var theme = useTheme();
|
|
5
|
-
var out = colorProp ? 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());
|
|
6
|
-
return out;
|
|
7
|
-
};
|
|
8
|
-
export { useCurrentColor };
|
|
9
|
-
//# sourceMappingURL=useCurrentColor.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getVariable","useTheme","useCurrentColor","colorProp","_theme_colorProp","_theme_color","theme","out","get","color"],"sources":["../../src/useCurrentColor.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,WAAA,EAAaC,QAAA,QAAgB;AAG/B,IAAAC,eAAM,YAAAA,CAAmBC,SAAyB;EACvD,IAAAC,gBAAc,EAAAC,YAAS;EACvB,IAAAC,KAAM,GAAML,QAAA;EAGZ,IAAAM,GAAO,GAAAJ,SAAA,GAAAH,WAAA,CAAAG,SAAA,MAAAC,gBAAA,GAAAE,KAAA,CAAAH,SAAA,eAAAC,gBAAA,uBAAAA,gBAAA,CAAAI,GAAA,SAAAH,YAAA,GAAAC,KAAA,CAAAG,KAAA,cAAAJ,YAAA,uBAAAA,YAAA,CAAAG,GAAA;EACT,OAAAD,GAAA","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useCurrentColor } from "./useCurrentColor.mjs";
|
|
3
|
-
const useGetThemedIcon = props => {
|
|
4
|
-
const color = useCurrentColor(props.color);
|
|
5
|
-
return el => {
|
|
6
|
-
if (!el) return el;
|
|
7
|
-
if (React.isValidElement(el)) {
|
|
8
|
-
return React.cloneElement(el, {
|
|
9
|
-
...props,
|
|
10
|
-
color,
|
|
11
|
-
// @ts-expect-error
|
|
12
|
-
...el.props
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
return React.createElement(el, props);
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export { useGetThemedIcon };
|
|
19
|
-
//# sourceMappingURL=useGetThemedIcon.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCurrentColor","useGetThemedIcon","props","color","el","isValidElement","cloneElement","createElement"],"sources":["../../src/useGetThemedIcon.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAElB,SAASC,eAAA,QAAuB;AAEzB,MAAMC,gBAAA,GAAoBC,KAAA,IAA8C;EAC7E,MAAMC,KAAA,GAAQH,eAAA,CAAgBE,KAAA,CAAMC,KAAK;EACzC,OAAQC,EAAA,IAAY;IAClB,IAAI,CAACA,EAAA,EAAI,OAAOA,EAAA;IAChB,IAAIL,KAAA,CAAMM,cAAA,CAAeD,EAAE,GAAG;MAC5B,OAAOL,KAAA,CAAMO,YAAA,CAAaF,EAAA,EAAI;QAC5B,GAAGF,KAAA;QACHC,KAAA;QAAA;QAEA,GAAGC,EAAA,CAAGF;MACR,CAAC;IACH;IACA,OAAOH,KAAA,CAAMQ,aAAA,CAAcH,EAAA,EAAIF,KAAK;EACtC;AACF","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useCurrentColor } from "./useCurrentColor.native.js";
|
|
3
|
-
var useGetThemedIcon = function (props) {
|
|
4
|
-
var color = useCurrentColor(props.color);
|
|
5
|
-
return function (el) {
|
|
6
|
-
if (!el) return el;
|
|
7
|
-
if (/* @__PURE__ */React.isValidElement(el)) {
|
|
8
|
-
return /* @__PURE__ */React.cloneElement(el, {
|
|
9
|
-
...props,
|
|
10
|
-
color,
|
|
11
|
-
// @ts-expect-error
|
|
12
|
-
...el.props
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
return /* @__PURE__ */React.createElement(el, props);
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export { useGetThemedIcon };
|
|
19
|
-
//# sourceMappingURL=useGetThemedIcon.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCurrentColor","useGetThemedIcon","props","color","el","isValidElement","cloneElement","createElement"],"sources":["../../src/useGetThemedIcon.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAElB,SAASC,eAAA,QAAuB;AAEzB,IAAAC,gBAAM,YAAAA,CAAoBC,KAA8C;EAC7E,IAAAC,KAAM,GAAAH,eAAQ,CAAAE,KAAgB,CAAAC,KAAM;EACpC,OAAO,UAAaC,EAAA;IAClB,IAAI,CAACA,EAAA,EAAI,OAAOA,EAAA;IAChB,IAAI,eAAML,KAAe,CAAAM,cAAK,CAAAD,EAAA;MAC5B,OAAO,eAAML,KAAa,CAAAO,YAAI,CAAAF,EAAA;QAC5B,GAAGF,KAAA;QACHC,KAAA;QAAA;QAEA,GAAGC,EAAA,CAAGF;MACR,CAAC;IACH;IACA,OAAO,eAAMH,KAAc,CAAAQ,aAAS,CAAAH,EAAA,EAAAF,KAAA;EACtC;AACF","ignoreList":[]}
|