@kaio-xyz/design-system 1.1.10 → 1.1.12

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.
@@ -1 +1 @@
1
- export { InvestmentGraph, Timeframes, type TimeFrame, type DataPoint } from "./investments-graph";
1
+ export { InvestmentGraph, Timeframes, periodOptions, type TimeFrame, type DataPoint } from "./investments-graph";
@@ -12,6 +12,19 @@ export declare const Timeframes: {
12
12
  readonly year: "year";
13
13
  };
14
14
  export type TimeFrame = typeof Timeframes[keyof typeof Timeframes];
15
+ export declare const periodOptions: ({
16
+ value: "month";
17
+ label: string;
18
+ } | {
19
+ value: "quarter";
20
+ label: string;
21
+ } | {
22
+ value: "half-year";
23
+ label: string;
24
+ } | {
25
+ value: "year";
26
+ label: string;
27
+ })[];
15
28
  type InvestmentGraphProps = {
16
29
  dataPoints: DataPoint[];
17
30
  timeFrame: SingleValue<SelectOption<TimeFrame>>;
package/dist/index.cjs.js CHANGED
@@ -636,7 +636,7 @@ var style$6 = {"modal":"modal-module__modal__X2VmM","content":"modal-module__con
636
636
  var ModalElement = function (_a) {
637
637
  var id = _a.id, children = _a.children, className = _a.className, _b = _a.title, title = _b === void 0 ? "No title" : _b, _c = _a.size, size = _c === void 0 ? "default" : _c, onClose = _a.onClose, _d = _a.actions, actions = _d === void 0 ? [] : _d, _e = _a.isFullWidth, isFullWidth = _e === void 0 ? true : _e, _f = _a.isScrollable, isScrollable = _f === void 0 ? false : _f, visible = _a.visible, attributes = __rest(_a, ["id", "children", "className", "title", "size", "onClose", "actions", "isFullWidth", "isScrollable", "visible"]);
638
638
  var modalRef = React.useRef(null);
639
- return (jsxRuntime.jsxs("dialog", __assign({ ref: modalRef, "aria-modal": "true", "aria-labelledby": id, className: clsx(style$6.modal, className), "data-test": "Modal__Div__content", "data-visible": visible, "data-is-not-closable": !onClose }, attributes, { children: [jsxRuntime.jsx("dialog", { className: style$6.backdrop }), jsxRuntime.jsx("div", { className: style$6.content, "data-size": size, "data-shadow-direction": "top", "data-is-full-width": isFullWidth, "data-is-scrollable": isScrollable, children: jsxRuntime.jsxs("div", { className: style$6.bodyWrapper, children: __spreadArray([title && (jsxRuntime.jsxs("div", { className: style$6.header, children: [jsxRuntime.jsx("h2", { id: id, children: title }), jsxRuntime.jsx(SvgCross, { onClick: onClose })] })), jsxRuntime.jsx("div", { className: style$6.body, children: children })], actions.map(function (i, idx) { return jsxRuntime.jsx("div", { className: style$6.actions, children: i }, "".concat(id, "_").concat(idx)); }), true) }) })] })));
639
+ return (jsxRuntime.jsxs("dialog", __assign({ ref: modalRef, "aria-modal": "true", "aria-labelledby": id, className: clsx(style$6.modal, className), "data-test": "Modal__Div__content", "data-visible": visible, "data-is-not-closable": !onClose }, attributes, { children: [jsxRuntime.jsx("dialog", { className: style$6.backdrop }), jsxRuntime.jsx("div", { className: style$6.content, "data-size": size, "data-shadow-direction": "top", "data-is-full-width": isFullWidth, "data-is-scrollable": isScrollable, children: jsxRuntime.jsxs("div", { className: style$6.bodyWrapper, children: __spreadArray([title && (jsxRuntime.jsxs("div", { className: style$6.header, children: [jsxRuntime.jsx("h2", { id: id, children: title }), jsxRuntime.jsx(SvgCross, { "data-icon": true, onClick: onClose })] })), jsxRuntime.jsx("div", { className: style$6.body, children: children })], actions.map(function (i, idx) { return jsxRuntime.jsx("div", { className: style$6.actions, children: i }, "".concat(id, "_").concat(idx)); }), true) }) })] })));
640
640
  };
641
641
  var Modal = function (_a) {
642
642
  var visible = _a.visible, props = __rest(_a, ["visible"]);
@@ -691,12 +691,6 @@ var Tooltip = function (_a) {
691
691
  return (jsxRuntime.jsx(RTooltip__namespace.Provider, { children: jsxRuntime.jsxs(RTooltip__namespace.Root, { children: [jsxRuntime.jsx(RTooltip__namespace.Trigger, { className: style$3.trigger, asChild: true, children: children }), jsxRuntime.jsx(RTooltip__namespace.Portal, { children: jsxRuntime.jsxs(RTooltip__namespace.Content, { className: style$3.content, sideOffset: 2, children: [jsxRuntime.jsx(SvgInfo, { className: style$3.icon, width: 20, height: 20 }), jsxRuntime.jsxs("div", { className: style$3.body, children: [jsxRuntime.jsx("span", { className: style$3.title, children: title }), description && jsxRuntime.jsx("span", { className: style$3.description, children: description })] }), jsxRuntime.jsx(RTooltip__namespace.Arrow, { className: style$3.arrow })] }) })] }) }));
692
692
  };
693
693
 
694
- var Timeframes$1 = {
695
- month: "month",
696
- quarter: "quarter",
697
- halfYear: "half-year",
698
- year: "year",
699
- };
700
694
  var isEnter = function (e) { return e.key === "Enter"; };
701
695
  var dateFormatOptions = {
702
696
  year: "numeric",
@@ -739,12 +733,6 @@ var formatNumberWithCurrency = function (amount, currency) {
739
733
  if (currency === void 0) { currency = "$"; }
740
734
  return "".concat(currency, " ").concat(formatNumber(amount, isDollarCurrency(currency) ? 2 : 6));
741
735
  };
742
- var periodOptions = [
743
- { value: Timeframes$1.month, label: "1M" },
744
- { value: Timeframes$1.quarter, label: "3M" },
745
- { value: Timeframes$1.halfYear, label: "6M" },
746
- { value: Timeframes$1.year, label: "1Y" },
747
- ];
748
736
 
749
737
  var style$2 = {"root":"investments-graph-module__root__-BKux","paddedWrapper":"investments-graph-module__paddedWrapper__afkOR","timeframeSelector":"investments-graph-module__timeframeSelector__7TkDU","timeFrameValue":"investments-graph-module__timeFrameValue__CQRqG"};
750
738
 
@@ -754,6 +742,12 @@ var Timeframes = {
754
742
  halfYear: "half-year",
755
743
  year: "year",
756
744
  };
745
+ var periodOptions = [
746
+ { value: Timeframes.month, label: "1M" },
747
+ { value: Timeframes.quarter, label: "3M" },
748
+ { value: Timeframes.halfYear, label: "6M" },
749
+ { value: Timeframes.year, label: "1Y" },
750
+ ];
757
751
  var getOffset = function (dataPoints) {
758
752
  var dataMax = Math.max.apply(Math, dataPoints.map(function (i) { return i.value; }));
759
753
  var dataMin = Math.min.apply(Math, dataPoints.map(function (i) { return i.value; }));
@@ -914,4 +908,5 @@ exports.TextField = TextField;
914
908
  exports.Timeframes = Timeframes;
915
909
  exports.Tooltip = Tooltip;
916
910
  exports.ValidatePasswordField = ValidatePasswordField;
911
+ exports.periodOptions = periodOptions;
917
912
  //# sourceMappingURL=index.cjs.js.map