krl-alfred 1.82.9 → 1.82.10
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.
|
@@ -38,6 +38,6 @@ var Children = function (props) {
|
|
|
38
38
|
};
|
|
39
39
|
var Button = (0, react_1.forwardRef)(function (props, ref) {
|
|
40
40
|
var type = props.type, isLoading = props.isLoading, onClick = props.onClick, disabled = props.disabled, size = props.size, variant = props.variant, width = props.width, _a = props.icon, icon = _a === void 0 ? props_1.ButtonDefault.icon : _a, children = props.children, _b = props.iconSize, iconSize = _b === void 0 ? props_1.ButtonDefault.iconSize : _b, _c = props.tooltip, tooltip = _c === void 0 ? props_1.ButtonDefault.tooltip : _c, other = __rest(props, ["type", "isLoading", "onClick", "disabled", "size", "variant", "width", "icon", "children", "iconSize", "tooltip"]);
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)(Button_styled_1.ButtonStyled, __assign({ className: (0, classnames_1.default)({ "loading": isLoading }), onClick: onClick, disabled: disabled, "$size": size, "$variant": variant, "$width": width, "$icon": icon, type: type, ref: ref, "$isLoading": isLoading, "$tooltip": tooltip }, other, { children: [(0, jsx_runtime_1.jsxs)(Children, __assign({ isLoading: isLoading, icon: icon, iconSize: iconSize }, { children: [isLoading && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "loadingContent" }, { children: (0, jsx_runtime_1.jsx)(Loader_1.default, { width: ["small", "xsmall"].includes(size) ? "1rem" : "1.5rem", height: ["small", "xsmall"].includes(size) ? "1rem" : "1.5rem", variant: variant === 'primary' ? 'secondary' : 'primary' }) }))), (0, jsx_runtime_1.jsx)("span", { children: children })] })), tooltip && (0, jsx_runtime_1.jsx)("div", __assign({ className: "buttonTooltip" }, { children: tooltip }))] })));
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(Button_styled_1.ButtonStyled, __assign({ className: (0, classnames_1.default)({ "loading": isLoading }), onClick: onClick, disabled: disabled, "$size": size, "$variant": variant, "$width": width, "$icon": icon, type: type, ref: ref, "$isLoading": isLoading, "$tooltip": tooltip }, other, { children: [(0, jsx_runtime_1.jsxs)(Children, __assign({ isLoading: isLoading, icon: icon, iconSize: iconSize }, { children: [isLoading && ((0, jsx_runtime_1.jsx)("div", __assign({ className: "loadingContent" }, { children: (0, jsx_runtime_1.jsx)(Loader_1.default, { width: ["small", "xsmall"].includes(size) ? "1rem" : "1.5rem", height: ["small", "xsmall"].includes(size) ? "1rem" : "1.5rem", variant: variant === 'primary' ? 'secondary' : 'primary' }) }))), children && (0, jsx_runtime_1.jsx)("span", { children: children })] })), tooltip && (0, jsx_runtime_1.jsx)("div", __assign({ className: "buttonTooltip" }, { children: tooltip }))] })));
|
|
42
42
|
});
|
|
43
43
|
exports.default = Button;
|
|
@@ -13,10 +13,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
15
|
var props_1 = require("./props");
|
|
16
|
-
var
|
|
16
|
+
var index_1 = require("./iconList/index");
|
|
17
17
|
var Icon_styled_1 = require("./Icon.styled");
|
|
18
18
|
var Icon = function (_a) {
|
|
19
19
|
var _b = _a.hasWrapper, hasWrapper = _b === void 0 ? props_1.IconDefault.hasWrapper : _b, _c = _a.color, color = _c === void 0 ? props_1.IconDefault.color : _c, _d = _a.name, name = _d === void 0 ? props_1.IconDefault.name : _d, _e = _a.linear, linear = _e === void 0 ? props_1.IconDefault.linear : _e, _f = _a.hasColorChanged, hasColorChanged = _f === void 0 ? props_1.IconDefault.hasColorChanged : _f, _g = _a.width, width = _g === void 0 ? props_1.IconDefault.width : _g, _h = _a.height, height = _h === void 0 ? props_1.IconDefault.height : _h, _j = _a.wrapperWidth, wrapperWidth = _j === void 0 ? props_1.IconDefault.wrapperWidth : _j, _k = _a.wrapperHeight, wrapperHeight = _k === void 0 ? props_1.IconDefault.wrapperHeight : _k, strokeWidth = _a.strokeWidth;
|
|
20
|
-
return hasWrapper ? ((0, jsx_runtime_1.jsx)(Icon_styled_1.IconWrapper, __assign({ "$linear": linear, "$width": width, "$height": height, "$strokeWidth": strokeWidth, "$color": color, "$hasColorChanged": hasColorChanged }, { children: (0, jsx_runtime_1.jsx)(Icon_styled_1.IconInner, __assign({ "$wrapperWidth": wrapperWidth, "$wrapperHeight": wrapperHeight }, { children:
|
|
20
|
+
return hasWrapper ? ((0, jsx_runtime_1.jsx)(Icon_styled_1.IconWrapper, __assign({ "$linear": linear, "$width": width, "$height": height, "$strokeWidth": strokeWidth, "$color": color, "$hasColorChanged": hasColorChanged }, { children: (0, jsx_runtime_1.jsx)(Icon_styled_1.IconInner, __assign({ "$wrapperWidth": wrapperWidth, "$wrapperHeight": wrapperHeight }, { children: index_1.iconList[name] ? index_1.iconList[name]({}) : index_1.iconList["Danger"]({}) })) }))) : (index_1.iconList[name] ? index_1.iconList[name]({ width: width, height: height, color: color }) : index_1.iconList["Danger"]({}));
|
|
21
21
|
};
|
|
22
22
|
exports.default = Icon;
|