@kaio-xyz/design-system 1.1.11 → 1.1.13

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
@@ -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