@launchpad-ui/button
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -5,5 +5,5 @@ import './style.css'; | ||
import { cx } from "classix"; | ||
import { forwardRef, cloneElement, memo, isValidElement, useRef } from "react"; | ||
import { memo, forwardRef, cloneElement, isValidElement, useRef } from "react"; | ||
const Button$1 = ""; | ||
const ButtonComponent = forwardRef((props, ref) => { | ||
const ButtonComponent = /* @__PURE__ */ forwardRef((props, ref) => { | ||
const { | ||
@@ -43,3 +43,3 @@ icon, | ||
}; | ||
const renderIcon = icon && cloneElement(icon, { | ||
const renderIcon = icon && /* @__PURE__ */ cloneElement(icon, { | ||
key: "icon", | ||
@@ -58,4 +58,4 @@ size: getIconSize(), | ||
const renderChildren = () => { | ||
if (asChild && isValidElement(children)) { | ||
return cloneElement(children, void 0, getFinalChildren(children.props.children)); | ||
if (asChild && /* @__PURE__ */ isValidElement(children)) { | ||
return /* @__PURE__ */ cloneElement(children, void 0, getFinalChildren(children.props.children)); | ||
} | ||
@@ -96,3 +96,3 @@ return getFinalChildren(children); | ||
ButtonComponent.displayName = "Button"; | ||
const Button = memo(ButtonComponent); | ||
const Button = /* @__PURE__ */ memo(ButtonComponent); | ||
const ButtonGroup$1 = ""; | ||
@@ -179,3 +179,3 @@ const ButtonGroup = ({ | ||
}; | ||
const IconButtonComponent = forwardRef((props, ref) => { | ||
const IconButtonComponent = /* @__PURE__ */ forwardRef((props, ref) => { | ||
const { | ||
@@ -210,3 +210,3 @@ icon, | ||
}; | ||
const clonedIcon = cloneElement(icon, { | ||
const clonedIcon = /* @__PURE__ */ cloneElement(icon, { | ||
key: "icon", | ||
@@ -218,4 +218,4 @@ size: iconSize(), | ||
const renderChildren = () => { | ||
if (asChild && isValidElement(children)) { | ||
return cloneElement(children, void 0, clonedIcon); | ||
if (asChild && /* @__PURE__ */ isValidElement(children)) { | ||
return /* @__PURE__ */ cloneElement(children, void 0, clonedIcon); | ||
} | ||
@@ -255,3 +255,3 @@ return clonedIcon; | ||
IconButtonComponent.displayName = "IconButton"; | ||
const IconButton = memo(IconButtonComponent); | ||
const IconButton = /* @__PURE__ */ memo(IconButtonComponent); | ||
export { | ||
@@ -258,0 +258,0 @@ Button, |
@@ -9,3 +9,3 @@ require('./style.css'); | ||
const Button$1 = ""; | ||
const ButtonComponent = react.forwardRef((props, ref) => { | ||
const ButtonComponent = /* @__PURE__ */ react.forwardRef((props, ref) => { | ||
const { | ||
@@ -45,3 +45,3 @@ icon, | ||
}; | ||
const renderIcon = icon && react.cloneElement(icon, { | ||
const renderIcon = icon && /* @__PURE__ */ react.cloneElement(icon, { | ||
key: "icon", | ||
@@ -60,4 +60,4 @@ size: getIconSize(), | ||
const renderChildren = () => { | ||
if (asChild && react.isValidElement(children)) { | ||
return react.cloneElement(children, void 0, getFinalChildren(children.props.children)); | ||
if (asChild && /* @__PURE__ */ react.isValidElement(children)) { | ||
return /* @__PURE__ */ react.cloneElement(children, void 0, getFinalChildren(children.props.children)); | ||
} | ||
@@ -98,3 +98,3 @@ return getFinalChildren(children); | ||
ButtonComponent.displayName = "Button"; | ||
const Button = react.memo(ButtonComponent); | ||
const Button = /* @__PURE__ */ react.memo(ButtonComponent); | ||
const ButtonGroup$1 = ""; | ||
@@ -181,3 +181,3 @@ const ButtonGroup = ({ | ||
}; | ||
const IconButtonComponent = react.forwardRef((props, ref) => { | ||
const IconButtonComponent = /* @__PURE__ */ react.forwardRef((props, ref) => { | ||
const { | ||
@@ -212,3 +212,3 @@ icon, | ||
}; | ||
const clonedIcon = react.cloneElement(icon, { | ||
const clonedIcon = /* @__PURE__ */ react.cloneElement(icon, { | ||
key: "icon", | ||
@@ -220,4 +220,4 @@ size: iconSize(), | ||
const renderChildren = () => { | ||
if (asChild && react.isValidElement(children)) { | ||
return react.cloneElement(children, void 0, clonedIcon); | ||
if (asChild && /* @__PURE__ */ react.isValidElement(children)) { | ||
return /* @__PURE__ */ react.cloneElement(children, void 0, clonedIcon); | ||
} | ||
@@ -257,3 +257,3 @@ return clonedIcon; | ||
IconButtonComponent.displayName = "IconButton"; | ||
const IconButton = react.memo(IconButtonComponent); | ||
const IconButton = /* @__PURE__ */ react.memo(IconButtonComponent); | ||
exports.Button = Button; | ||
@@ -260,0 +260,0 @@ exports.ButtonGroup = ButtonGroup; |
{ | ||
"name": "@launchpad-ui/button", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"status": "beta", | ||
@@ -31,3 +31,3 @@ "publishConfig": { | ||
"classix": "2.1.17", | ||
"@launchpad-ui/icons": "~0.9.2", | ||
"@launchpad-ui/icons": "~0.9.3", | ||
"@launchpad-ui/tokens": "~0.6.0" | ||
@@ -34,0 +34,0 @@ }, |
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
71472
Updated@launchpad-ui/icons@~0.9.3