@kaio-xyz/design-system 1.1.145 → 1.1.147
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.js +14 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14 -14
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -460,14 +460,14 @@ var SpinnedIcon = function (_a) {
|
|
|
460
460
|
width: size,
|
|
461
461
|
height: size,
|
|
462
462
|
animationDuration: "".concat(duration, "s"),
|
|
463
|
-
}, children: jsxRuntime.jsx(Icon, __assign({ width: size, height: size }, rest)) }));
|
|
463
|
+
}, children: jsxRuntime.jsx(Icon, __assign({ width: size, height: size, viewBox: "0 0 24 24" }, rest)) }));
|
|
464
464
|
};
|
|
465
465
|
|
|
466
466
|
var isAnchor = function (props) { return props.href !== undefined; };
|
|
467
467
|
var Button = React.forwardRef(function (_a, ref) {
|
|
468
468
|
var _b = _a.fullWidth, fullWidth = _b === void 0 ? false : _b, _c = _a.variant, variant = _c === void 0 ? "primary" : _c, _d = _a.size, size = _d === void 0 ? "normal" : _d, _e = _a.isInverted, isInverted = _e === void 0 ? false : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.iconSize, iconSize = _g === void 0 ? 22 : _g, Icon = _a.icon, _h = _a.iconPosition, iconPosition = _h === void 0 ? "left" : _h, props = __rest(_a, ["fullWidth", "variant", "size", "isInverted", "isLoading", "iconSize", "icon", "iconPosition"]);
|
|
469
469
|
var iconProps = { width: iconSize, height: iconSize, "aria-hidden": "true" };
|
|
470
|
-
var baseIcon = Icon && jsxRuntime.jsx(Icon, __assign({}, iconProps));
|
|
470
|
+
var baseIcon = Icon && jsxRuntime.jsx(Icon, __assign({}, iconProps, { viewBox: "0 0 24 24" }));
|
|
471
471
|
var loadingIcon = isLoading && jsxRuntime.jsx(SpinnedIcon, __assign({ size: iconSize }, iconProps));
|
|
472
472
|
var iconChild = loadingIcon || baseIcon || null;
|
|
473
473
|
var classes = clsx(style$v.root, props.className);
|
|
@@ -666,7 +666,7 @@ var Clipboard = function (_a) {
|
|
|
666
666
|
}, 2000);
|
|
667
667
|
}, [value]);
|
|
668
668
|
var text = isShowingCopy ? 'Copied!' : displayValue;
|
|
669
|
-
var icon = isShowingCopy ? jsxRuntime.jsx(SvgCheck, {}) : jsxRuntime.jsx(SvgClipboard, {});
|
|
669
|
+
var icon = isShowingCopy ? jsxRuntime.jsx(SvgCheck, { viewBox: "0 0 24 24" }) : jsxRuntime.jsx(SvgClipboard, { viewBox: "0 0 24 24" });
|
|
670
670
|
return (jsxRuntime.jsx("button", { type: "button", onClick: handleClick, className: style$l.root, "data-is-copied": isCopied, "data-is-showing-copy": isShowingCopy, "data-test": dataTest, children: jsxRuntime.jsxs(Stack, { position: "horizontal", children: [jsxRuntime.jsx("span", { children: text }), icon] }) }));
|
|
671
671
|
};
|
|
672
672
|
|
|
@@ -683,7 +683,7 @@ var Step = function (_a) {
|
|
|
683
683
|
var label = _a.label, dataTest = _a.dataTest, className = _a.className, _b = _a.iconSize, iconSize = _b === void 0 ? 16 : _b, _c = _a.isCompleted, isCompleted = _c === void 0 ? false : _c, _d = _a.isCurrent, isCurrent = _d === void 0 ? false : _d, _e = _a.direction, direction = _e === void 0 ? 'vertical' : _e, props = __rest(_a, ["label", "dataTest", "className", "iconSize", "isCompleted", "isCurrent", "direction"]);
|
|
684
684
|
var icon = React.useMemo(function () {
|
|
685
685
|
switch (true) {
|
|
686
|
-
case isCompleted: return jsxRuntime.jsx(SvgCheck, { className: style$j.checkIcon });
|
|
686
|
+
case isCompleted: return jsxRuntime.jsx(SvgCheck, { className: style$j.checkIcon, viewBox: "0 0 24 24" });
|
|
687
687
|
case isCurrent: return jsxRuntime.jsx(SpinnedIcon, { icon: SvgLoadingCircle, size: iconSize, className: style$j.loadingIcon });
|
|
688
688
|
default: return jsxRuntime.jsx("span", { className: style$j.emptyIcon });
|
|
689
689
|
}
|
|
@@ -776,7 +776,7 @@ var style$c = {"content":"dropdown-menu-module__content__sSYNC","arrow":"dropdow
|
|
|
776
776
|
|
|
777
777
|
var DropdownMenu$1 = function (_a) {
|
|
778
778
|
var text = _a.text, children = _a.children, Icon = _a.icon, disabled = _a.disabled, body = _a.body, variant = _a.variant, buttonSize = _a.buttonSize, rest = __rest(_a, ["text", "children", "icon", "disabled", "body", "variant", "buttonSize"]);
|
|
779
|
-
var defaultBody = !text ? Icon && jsxRuntime.jsx(Icon, {}) : jsxRuntime.jsx(Button, { size: buttonSize, icon: Icon, variant: variant, children: text });
|
|
779
|
+
var defaultBody = !text ? Icon && jsxRuntime.jsx(Icon, { viewBox: "0 0 24 24" }) : jsxRuntime.jsx(Button, { size: buttonSize, icon: Icon, variant: variant, children: text });
|
|
780
780
|
return (jsxRuntime.jsxs(RDropdownMenu__namespace.Root, { children: [jsxRuntime.jsx(RDropdownMenu__namespace.Trigger, __assign({}, rest, { asChild: !!text, className: style$c.trigger, disabled: disabled, children: body ? body : defaultBody })), jsxRuntime.jsx(RDropdownMenu__namespace.Portal, { children: jsxRuntime.jsxs(RDropdownMenu__namespace.Content, { className: style$c.content, sideOffset: 5, children: [children, jsxRuntime.jsx(RDropdownMenu__namespace.Arrow, { className: style$c.arrow })] }) })] }));
|
|
781
781
|
};
|
|
782
782
|
|
|
@@ -793,7 +793,7 @@ var style$a = {"trigger":"tooltip-module__trigger__8Eylk","content":"tooltip-mod
|
|
|
793
793
|
|
|
794
794
|
var Tooltip = function (_a) {
|
|
795
795
|
var children = _a.children, title = _a.title, description = _a.description, rest = __rest(_a, ["children", "title", "description"]);
|
|
796
|
-
return (jsxRuntime.jsx(RTooltip__namespace.Provider, { children: jsxRuntime.jsxs(RTooltip__namespace.Root, __assign({}, rest, { children: [jsxRuntime.jsx(RTooltip__namespace.Trigger, { className: style$a.trigger, asChild: true, children: children }), jsxRuntime.jsx(RTooltip__namespace.Portal, { children: jsxRuntime.jsxs(RTooltip__namespace.Content, { className: style$a.content, sideOffset: 2, children: [jsxRuntime.jsx(SvgInfo, { className: style$a.icon, width: 20, height: 20 }), jsxRuntime.jsxs("div", { className: style$a.body, children: [jsxRuntime.jsx("span", { className: style$a.title, children: title }), description && jsxRuntime.jsx("span", { className: style$a.description, children: description })] }), jsxRuntime.jsx(RTooltip__namespace.Arrow, { className: style$a.arrow })] }) })] })) }));
|
|
796
|
+
return (jsxRuntime.jsx(RTooltip__namespace.Provider, { children: jsxRuntime.jsxs(RTooltip__namespace.Root, __assign({}, rest, { children: [jsxRuntime.jsx(RTooltip__namespace.Trigger, { className: style$a.trigger, asChild: true, children: children }), jsxRuntime.jsx(RTooltip__namespace.Portal, { children: jsxRuntime.jsxs(RTooltip__namespace.Content, { className: style$a.content, sideOffset: 2, children: [jsxRuntime.jsx(SvgInfo, { viewBox: "0 0 24 24", className: style$a.icon, width: 20, height: 20 }), jsxRuntime.jsxs("div", { className: style$a.body, children: [jsxRuntime.jsx("span", { className: style$a.title, children: title }), description && jsxRuntime.jsx("span", { className: style$a.description, children: description })] }), jsxRuntime.jsx(RTooltip__namespace.Arrow, { className: style$a.arrow })] }) })] })) }));
|
|
797
797
|
};
|
|
798
798
|
|
|
799
799
|
var isEnter = function (e) { return e.key === "Enter"; };
|
|
@@ -1118,7 +1118,7 @@ var InvestmentGraph = function (_a) {
|
|
|
1118
1118
|
? 'true'
|
|
1119
1119
|
: 'false', onClick: function () {
|
|
1120
1120
|
return setViewMode === null || setViewMode === void 0 ? void 0 : setViewMode(mode);
|
|
1121
|
-
}, children: mode === 'total' ? 'Total' : 'By Product' }, mode)); }) }))] })] }), isLocked ? (jsxRuntime.jsx("div", { className: style$9.lockedPlaceholder, children: jsxRuntime.jsx("div", { className: style$9.lockIconCircle, children: jsxRuntime.jsx(SvgLock, {}) }) })) : viewMode === 'byProduct' && hasByProductView ? (jsxRuntime.jsx(ByProductChart, { chartData: byProductChartData, data: byProductData, ticks: ticks, timeFrame: timeFrame === null || timeFrame === void 0 ? void 0 : timeFrame.value })) : (jsxRuntime.jsx(TotalChart, { data: totalData, ticks: ticks, timeFrame: timeFrame === null || timeFrame === void 0 ? void 0 : timeFrame.value }))] }));
|
|
1121
|
+
}, children: mode === 'total' ? 'Total' : 'By Product' }, mode)); }) }))] })] }), isLocked ? (jsxRuntime.jsx("div", { className: style$9.lockedPlaceholder, children: jsxRuntime.jsx("div", { className: style$9.lockIconCircle, children: jsxRuntime.jsx(SvgLock, { viewBox: "0 0 24 24" }) }) })) : viewMode === 'byProduct' && hasByProductView ? (jsxRuntime.jsx(ByProductChart, { chartData: byProductChartData, data: byProductData, ticks: ticks, timeFrame: timeFrame === null || timeFrame === void 0 ? void 0 : timeFrame.value })) : (jsxRuntime.jsx(TotalChart, { data: totalData, ticks: ticks, timeFrame: timeFrame === null || timeFrame === void 0 ? void 0 : timeFrame.value }))] }));
|
|
1122
1122
|
};
|
|
1123
1123
|
|
|
1124
1124
|
var style$8 = {"root":"investments-header-module__root__fxQmk","total":"investments-header-module__total__DrEq0","badge":"investments-header-module__badge__-aeBM"};
|
|
@@ -1201,7 +1201,7 @@ var style$6 = {"root":"drawer-module__root__D3rM0","backdrop":"drawer-module__ba
|
|
|
1201
1201
|
var Drawer = function (_a) {
|
|
1202
1202
|
var isOpen = _a.isOpen, title = _a.title, children = _a.children, className = _a.className, actions = _a.actions, onClose = _a.onClose, _b = _a.isLarge, isLarge = _b === void 0 ? false : _b, subTitle = _a.subTitle, rest = __rest(_a, ["isOpen", "title", "children", "className", "actions", "onClose", "isLarge", "subTitle"]);
|
|
1203
1203
|
var canAnimate = useCanAnimate();
|
|
1204
|
-
var drawerContent = (jsxRuntime.jsxs("div", { className: clsx(style$6.root, className), "data-is-open": isOpen, "data-can-animate": canAnimate, children: [jsxRuntime.jsx("button", { className: style$6.backdrop, tabIndex: 0, onClick: onClose, onKeyDown: function (e) { return (isEnter(e) ? onClose === null || onClose === void 0 ? void 0 : onClose() : null); } }), jsxRuntime.jsxs("div", __assign({ className: style$6.drawer, "data-is-large": isLarge }, rest, { children: [jsxRuntime.jsxs("div", { className: style$6.header, children: [jsxRuntime.jsxs(Stack, { children: [jsxRuntime.jsx("h2", { className: style$6.title, children: title }), subTitle && jsxRuntime.jsx("p", { className: style$6.subTitle, children: subTitle })] }), jsxRuntime.jsx("button", { onClick: onClose, className: style$6.closeButton, type: "button", disabled: !onClose, children: jsxRuntime.jsx(SvgCross, {}) })] }), jsxRuntime.jsxs("div", { className: style$6.body, children: [jsxRuntime.jsx("div", { className: style$6.content, children: isOpen ? children : null }), actions && jsxRuntime.jsx("div", { className: style$6.actions, children: actions })] })] }))] }));
|
|
1204
|
+
var drawerContent = (jsxRuntime.jsxs("div", { className: clsx(style$6.root, className), "data-is-open": isOpen, "data-can-animate": canAnimate, children: [jsxRuntime.jsx("button", { className: style$6.backdrop, tabIndex: 0, onClick: onClose, onKeyDown: function (e) { return (isEnter(e) ? onClose === null || onClose === void 0 ? void 0 : onClose() : null); } }), jsxRuntime.jsxs("div", __assign({ className: style$6.drawer, "data-is-large": isLarge }, rest, { children: [jsxRuntime.jsxs("div", { className: style$6.header, children: [jsxRuntime.jsxs(Stack, { children: [jsxRuntime.jsx("h2", { className: style$6.title, children: title }), subTitle && jsxRuntime.jsx("p", { className: style$6.subTitle, children: subTitle })] }), jsxRuntime.jsx("button", { onClick: onClose, className: style$6.closeButton, type: "button", disabled: !onClose, children: jsxRuntime.jsx(SvgCross, { viewBox: "0 0 24 24" }) })] }), jsxRuntime.jsxs("div", { className: style$6.body, children: [jsxRuntime.jsx("div", { className: style$6.content, children: isOpen ? children : null }), actions && jsxRuntime.jsx("div", { className: style$6.actions, children: actions })] })] }))] }));
|
|
1205
1205
|
return reactDom.createPortal(drawerContent, document.body);
|
|
1206
1206
|
};
|
|
1207
1207
|
|
|
@@ -1211,11 +1211,11 @@ var Alert = function (_a) {
|
|
|
1211
1211
|
var title = _a.title, _b = _a.type, type = _b === void 0 ? "info" : _b, children = _a.children, buttonText = _a.buttonText, dataTest = _a.dataTest, onClick = _a.onClick, rest = __rest(_a, ["title", "type", "children", "buttonText", "dataTest", "onClick"]);
|
|
1212
1212
|
var icon = React.useMemo(function () {
|
|
1213
1213
|
switch (type) {
|
|
1214
|
-
case "success": return jsxRuntime.jsx(SvgCheck, {});
|
|
1214
|
+
case "success": return jsxRuntime.jsx(SvgCheck, { viewBox: "0 0 24 24" });
|
|
1215
1215
|
case "warning":
|
|
1216
|
-
case "danger": return jsxRuntime.jsx(SvgWarning, {});
|
|
1217
|
-
case "info": return jsxRuntime.jsx(SvgInfo, {});
|
|
1218
|
-
default: return jsxRuntime.jsx(SvgLoader, {});
|
|
1216
|
+
case "danger": return jsxRuntime.jsx(SvgWarning, { viewBox: "0 0 24 24" });
|
|
1217
|
+
case "info": return jsxRuntime.jsx(SvgInfo, { viewBox: "0 0 24 24" });
|
|
1218
|
+
default: return jsxRuntime.jsx(SvgLoader, { viewBox: "0 0 24 24" });
|
|
1219
1219
|
}
|
|
1220
1220
|
}, [type]);
|
|
1221
1221
|
return (jsxRuntime.jsxs(Stack, __assign({ className: style$5.root, position: children ? "vertical" : "horizontal-space", space: "m", "data-type": type, "data-test": dataTest }, rest, { children: [jsxRuntime.jsxs(Stack, { position: "horizontal", children: [icon, title] }), jsxRuntime.jsx("p", { children: children }), buttonText && (jsxRuntime.jsx(Button, { className: style$5.button, variant: type, onClick: onClick, isInverted: true, size: "small", children: buttonText }))] })));
|
|
@@ -1225,7 +1225,7 @@ var style$4 = {"root":"box-module__root__dZ-MR","icon":"box-module__icon__3dFXL"
|
|
|
1225
1225
|
|
|
1226
1226
|
var Box = function (_a) {
|
|
1227
1227
|
var title = _a.title, description = _a.description, Icon = _a.icon, iconType = _a.iconType, fullWidth = _a.fullWidth;
|
|
1228
|
-
return (jsxRuntime.jsxs(Stack, { className: style$4.root, "data-is-full-width": fullWidth, as: "dl", children: [jsxRuntime.jsx("dt", { children: title }), jsxRuntime.jsxs("dd", { children: [description, Icon && jsxRuntime.jsx(Icon, { className: style$4.icon, "data-icon-type": iconType })] })] }));
|
|
1228
|
+
return (jsxRuntime.jsxs(Stack, { className: style$4.root, "data-is-full-width": fullWidth, as: "dl", children: [jsxRuntime.jsx("dt", { children: title }), jsxRuntime.jsxs("dd", { children: [description, Icon && jsxRuntime.jsx(Icon, { className: style$4.icon, "data-icon-type": iconType, viewBox: "0 0 24 24" })] })] }));
|
|
1229
1229
|
};
|
|
1230
1230
|
|
|
1231
1231
|
var style$3 = {"list":"tabs-module__list__Nuvl-","trigger":"tabs-module__trigger__qOk2r","content":"tabs-module__content__4w1tZ","counter":"tabs-module__counter__QkcJB"};
|
|
@@ -1736,7 +1736,7 @@ var SvgKaioLogoLight = function SvgKaioLogoLight(props) {
|
|
|
1736
1736
|
|
|
1737
1737
|
var style$1 = {"root":"login-layout-module__root__kF5mq","body":"login-layout-module__body__vmm5x","footer":"login-layout-module__footer__NHAE-","backgroundLogo":"login-layout-module__backgroundLogo__-wPXr"};
|
|
1738
1738
|
|
|
1739
|
-
var defaultFooter = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("p", { children: ["KAIO\u00A0", jsxRuntime.jsx(
|
|
1739
|
+
var defaultFooter = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("p", { children: ["KAIO\u00A0", jsxRuntime.jsx(Link, { href: "https://www.kaio.xyz/privacy-policy", target: "_blank", rel: "noreferrer", children: "Privacy Policy" }), ",\u00A0", jsxRuntime.jsx(Link, { href: "https://www.kaio.xyz/terms-of-use", target: "_blank", rel: "noreferrer", children: "Disclaimer" }), "\u00A0and Terms of Conditions apply."] }), jsxRuntime.jsx("p", { children: "Alternative investments involve risk including loss of capital and are not suitable for all investors." })] }));
|
|
1740
1740
|
var LoginLayout = function (_a) {
|
|
1741
1741
|
var children = _a.children, actions = _a.actions, header = _a.header, _b = _a.logo, logo = _b === void 0 ? jsxRuntime.jsx(SvgKaioLogoLight, { width: 114, height: 30 }) : _b, _c = _a.backgroundIcon, backgroundIcon = _c === void 0 ? jsxRuntime.jsx(SvgLoginLogo, { width: 444, height: 499 }) : _c, _d = _a.footer, footer = _d === void 0 ? defaultFooter : _d;
|
|
1742
1742
|
return (jsxRuntime.jsxs("div", { className: style$1.root, children: [jsxRuntime.jsxs("div", { className: style$1.body, children: [jsxRuntime.jsxs(Stack, { space: "xl", children: [logo, jsxRuntime.jsxs(Stack, { children: [header, jsxRuntime.jsx(Stack, { children: children })] })] }), actions, footer && jsxRuntime.jsx("div", { className: style$1.footer, children: footer })] }), backgroundIcon && (jsxRuntime.jsx("div", { className: style$1.backgroundLogo, children: backgroundIcon }))] }));
|