@tamagui/helpers-tamagui
Advanced tools
Comparing version 1.108.0 to 1.108.1
@@ -0,5 +1,6 @@ | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
@@ -14,3 +15,10 @@ for (var name in all) | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod); | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, | ||
mod | ||
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod); | ||
var useGetThemedIcon_exports = {}; | ||
@@ -21,6 +29,6 @@ __export(useGetThemedIcon_exports, { | ||
module.exports = __toCommonJS(useGetThemedIcon_exports); | ||
var import_react = require("react"), import_useCurrentColor = require("./useCurrentColor"); | ||
var import_react = __toESM(require("react")), import_useCurrentColor = require("./useCurrentColor"); | ||
const useGetThemedIcon = (props) => { | ||
const color = (0, import_useCurrentColor.useCurrentColor)(props.color); | ||
return (el) => el && ((0, import_react.isValidElement)(el) ? (0, import_react.cloneElement)(el, { | ||
return (el) => el && (import_react.default.isValidElement(el) ? import_react.default.cloneElement(el, { | ||
...props, | ||
@@ -30,4 +38,4 @@ color, | ||
...el.props | ||
}) : (0, import_react.createElement)(el, props)); | ||
}) : import_react.default.createElement(el, props)); | ||
}; | ||
//# sourceMappingURL=useGetThemedIcon.js.map |
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
@@ -15,3 +16,10 @@ for (var name in all) | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod); | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, | ||
mod | ||
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod); | ||
var useGetThemedIcon_exports = {}; | ||
@@ -22,3 +30,3 @@ __export(useGetThemedIcon_exports, { | ||
module.exports = __toCommonJS(useGetThemedIcon_exports); | ||
var import_react = require("react"), import_useCurrentColor = require("./useCurrentColor"); | ||
var import_react = __toESM(require("react")), import_useCurrentColor = require("./useCurrentColor"); | ||
function _define_property(obj, key, value) { | ||
@@ -61,3 +69,3 @@ return key in obj ? Object.defineProperty(obj, key, { | ||
return function(el) { | ||
return el && (/* @__PURE__ */ (0, import_react.isValidElement)(el) ? /* @__PURE__ */ (0, import_react.cloneElement)(el, _object_spread( | ||
return el && (/* @__PURE__ */ import_react.default.isValidElement(el) ? /* @__PURE__ */ import_react.default.cloneElement(el, _object_spread( | ||
_object_spread_props(_object_spread({}, props), { | ||
@@ -68,3 +76,3 @@ color | ||
el.props | ||
)) : /* @__PURE__ */ (0, import_react.createElement)(el, props)); | ||
)) : /* @__PURE__ */ import_react.default.createElement(el, props)); | ||
}; | ||
@@ -71,0 +79,0 @@ }; |
@@ -1,6 +0,6 @@ | ||
import { cloneElement, createElement, isValidElement } from "react"; | ||
import React from "react"; | ||
import { useCurrentColor } from "./useCurrentColor"; | ||
const useGetThemedIcon = (props) => { | ||
const color = useCurrentColor(props.color); | ||
return (el) => el && (isValidElement(el) ? cloneElement(el, { | ||
return (el) => el && (React.isValidElement(el) ? React.cloneElement(el, { | ||
...props, | ||
@@ -10,3 +10,3 @@ color, | ||
...el.props | ||
}) : createElement(el, props)); | ||
}) : React.createElement(el, props)); | ||
}; | ||
@@ -13,0 +13,0 @@ export { |
@@ -1,2 +0,2 @@ | ||
import { cloneElement, createElement, isValidElement } from "react"; | ||
import React from "react"; | ||
import { useCurrentColor } from "./useCurrentColor"; | ||
@@ -40,3 +40,3 @@ function _define_property(obj, key, value) { | ||
return function(el) { | ||
return el && (/* @__PURE__ */ isValidElement(el) ? /* @__PURE__ */ cloneElement(el, _object_spread( | ||
return el && (/* @__PURE__ */ React.isValidElement(el) ? /* @__PURE__ */ React.cloneElement(el, _object_spread( | ||
_object_spread_props(_object_spread({}, props), { | ||
@@ -47,3 +47,3 @@ color | ||
el.props | ||
)) : /* @__PURE__ */ createElement(el, props)); | ||
)) : /* @__PURE__ */ React.createElement(el, props)); | ||
}; | ||
@@ -50,0 +50,0 @@ }; |
{ | ||
"name": "@tamagui/helpers-tamagui", | ||
"version": "1.108.0", | ||
"version": "1.108.1", | ||
"source": "src/index.ts", | ||
@@ -31,7 +31,7 @@ "types": "./types/index.d.ts", | ||
"dependencies": { | ||
"@tamagui/helpers": "1.108.0", | ||
"@tamagui/web": "1.108.0" | ||
"@tamagui/helpers": "1.108.1", | ||
"@tamagui/web": "1.108.1" | ||
}, | ||
"devDependencies": { | ||
"@tamagui/build": "1.108.0", | ||
"@tamagui/build": "1.108.1", | ||
"react": "^18.2.0 || ^19.0.0", | ||
@@ -38,0 +38,0 @@ "vitest": "^0.34.3" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29793
465
+ Added@tamagui/compose-refs@1.108.1(transitive)
+ Added@tamagui/constants@1.108.1(transitive)
+ Added@tamagui/helpers@1.108.1(transitive)
+ Added@tamagui/normalize-css-color@1.108.1(transitive)
+ Added@tamagui/simple-hash@1.108.1(transitive)
+ Added@tamagui/timer@1.108.1(transitive)
+ Added@tamagui/types@1.108.1(transitive)
+ Added@tamagui/use-did-finish-ssr@1.108.1(transitive)
+ Added@tamagui/use-event@1.108.1(transitive)
+ Added@tamagui/use-force-update@1.108.1(transitive)
+ Added@tamagui/web@1.108.1(transitive)
- Removed@tamagui/compose-refs@1.108.0(transitive)
- Removed@tamagui/constants@1.108.0(transitive)
- Removed@tamagui/helpers@1.108.0(transitive)
- Removed@tamagui/normalize-css-color@1.108.0(transitive)
- Removed@tamagui/simple-hash@1.108.0(transitive)
- Removed@tamagui/timer@1.108.0(transitive)
- Removed@tamagui/types@1.108.0(transitive)
- Removed@tamagui/use-did-finish-ssr@1.108.0(transitive)
- Removed@tamagui/use-event@1.108.0(transitive)
- Removed@tamagui/use-force-update@1.108.0(transitive)
- Removed@tamagui/web@1.108.0(transitive)
Updated@tamagui/helpers@1.108.1
Updated@tamagui/web@1.108.1