@publicplan/kern-react-kit 1.3.3 → 1.3.4
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/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +26 -24
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -594,7 +594,7 @@ const _excluded$70 = [
|
|
|
594
594
|
"href",
|
|
595
595
|
"target",
|
|
596
596
|
"disabled"
|
|
597
|
-
];
|
|
597
|
+
], _excluded3 = ["type"];
|
|
598
598
|
const isIconProps = (icon) => typeof icon === "object" && icon !== null && "name" in icon && !react.default.isValidElement(icon);
|
|
599
599
|
const IconOnlyLabel = ({ labelText }) => {
|
|
600
600
|
if (!labelText) return null;
|
|
@@ -655,19 +655,19 @@ const Button = react.default.forwardRef((props, ref) => {
|
|
|
655
655
|
!iconLeft && iconElement
|
|
656
656
|
] }));
|
|
657
657
|
}
|
|
658
|
-
const buttonRest =
|
|
658
|
+
const _ref2 = rest, { type } = _ref2, buttonRest = _objectWithoutProperties(_ref2, _excluded3);
|
|
659
659
|
if (iconOnly) {
|
|
660
660
|
const labelText = text || (isIconProps(icon) ? icon.name : void 0);
|
|
661
661
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", _objectSpread2(_objectSpread2({
|
|
662
662
|
ref,
|
|
663
|
-
|
|
664
|
-
|
|
663
|
+
className: classes,
|
|
664
|
+
type
|
|
665
665
|
}, buttonRest), {}, { children: [iconElement, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconOnlyLabel, { labelText })] }));
|
|
666
666
|
}
|
|
667
667
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", _objectSpread2(_objectSpread2({
|
|
668
668
|
ref,
|
|
669
|
-
|
|
670
|
-
|
|
669
|
+
className: classes,
|
|
670
|
+
type
|
|
671
671
|
}, buttonRest), {}, { children: [
|
|
672
672
|
iconLeft && iconElement,
|
|
673
673
|
text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|