@adsgency_npm/adsgency-ads-ui 0.1.0-alpha.29 → 0.1.0-alpha.30
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 +28 -2
- package/dist/index.js +28 -2
- package/package.json +1 -1
- package/dist/chunk-YJFQM6IB.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/tokens/designTokens.cjs.map +0 -1
- package/dist/tokens/designTokens.js.map +0 -1
- package/dist/tokens/tailwindPreset.cjs.map +0 -1
- package/dist/tokens/tailwindPreset.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -6008,6 +6008,18 @@ function AdsRadialProgressChart({
|
|
|
6008
6008
|
|
|
6009
6009
|
// src/components/AdsSparklineChart/index.tsx
|
|
6010
6010
|
var import_recharts3 = require("recharts");
|
|
6011
|
+
|
|
6012
|
+
// src/lib/chartTooltip.ts
|
|
6013
|
+
var ISO_TIMESTAMP_PATTERN = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})?$/;
|
|
6014
|
+
function formatChartTooltipLabel(label) {
|
|
6015
|
+
if (typeof label !== "string") {
|
|
6016
|
+
return String(label ?? "");
|
|
6017
|
+
}
|
|
6018
|
+
const match = label.match(ISO_TIMESTAMP_PATTERN);
|
|
6019
|
+
return match ? `${match[1]} ${match[2]}` : label;
|
|
6020
|
+
}
|
|
6021
|
+
|
|
6022
|
+
// src/components/AdsSparklineChart/index.tsx
|
|
6011
6023
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
6012
6024
|
var DEFAULT_HEIGHT = 40;
|
|
6013
6025
|
var tooltipContentStyle2 = {
|
|
@@ -6065,7 +6077,14 @@ function AdsSparklineChart({
|
|
|
6065
6077
|
height: "100%",
|
|
6066
6078
|
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_recharts3.LineChart, { data: chartData, margin: chartMargin, children: [
|
|
6067
6079
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_recharts3.XAxis, { dataKey: xKey, hide: true, type: "category" }),
|
|
6068
|
-
showTooltip && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6080
|
+
showTooltip && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6081
|
+
import_recharts3.Tooltip,
|
|
6082
|
+
{
|
|
6083
|
+
contentStyle: tooltipContentStyle2,
|
|
6084
|
+
cursor: false,
|
|
6085
|
+
labelFormatter: formatChartTooltipLabel
|
|
6086
|
+
}
|
|
6087
|
+
),
|
|
6069
6088
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6070
6089
|
import_recharts3.Line,
|
|
6071
6090
|
{
|
|
@@ -6303,7 +6322,14 @@ function AdsBarChart({
|
|
|
6303
6322
|
width: yAxis.width
|
|
6304
6323
|
}
|
|
6305
6324
|
),
|
|
6306
|
-
showTooltip && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6325
|
+
showTooltip && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6326
|
+
import_recharts4.Tooltip,
|
|
6327
|
+
{
|
|
6328
|
+
contentStyle: tooltipContentStyle3,
|
|
6329
|
+
cursor: { fill: "transparent" },
|
|
6330
|
+
labelFormatter: formatChartTooltipLabel
|
|
6331
|
+
}
|
|
6332
|
+
),
|
|
6307
6333
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6308
6334
|
import_recharts4.Bar,
|
|
6309
6335
|
{
|
package/dist/index.js
CHANGED
|
@@ -5837,6 +5837,18 @@ function AdsRadialProgressChart({
|
|
|
5837
5837
|
|
|
5838
5838
|
// src/components/AdsSparklineChart/index.tsx
|
|
5839
5839
|
import { Line, LineChart, Tooltip as Tooltip2, XAxis } from "recharts";
|
|
5840
|
+
|
|
5841
|
+
// src/lib/chartTooltip.ts
|
|
5842
|
+
var ISO_TIMESTAMP_PATTERN = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})?$/;
|
|
5843
|
+
function formatChartTooltipLabel(label) {
|
|
5844
|
+
if (typeof label !== "string") {
|
|
5845
|
+
return String(label ?? "");
|
|
5846
|
+
}
|
|
5847
|
+
const match = label.match(ISO_TIMESTAMP_PATTERN);
|
|
5848
|
+
return match ? `${match[1]} ${match[2]}` : label;
|
|
5849
|
+
}
|
|
5850
|
+
|
|
5851
|
+
// src/components/AdsSparklineChart/index.tsx
|
|
5840
5852
|
import { jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5841
5853
|
var DEFAULT_HEIGHT = 40;
|
|
5842
5854
|
var tooltipContentStyle2 = {
|
|
@@ -5894,7 +5906,14 @@ function AdsSparklineChart({
|
|
|
5894
5906
|
height: "100%",
|
|
5895
5907
|
children: /* @__PURE__ */ jsxs28(LineChart, { data: chartData, margin: chartMargin, children: [
|
|
5896
5908
|
/* @__PURE__ */ jsx55(XAxis, { dataKey: xKey, hide: true, type: "category" }),
|
|
5897
|
-
showTooltip && /* @__PURE__ */ jsx55(
|
|
5909
|
+
showTooltip && /* @__PURE__ */ jsx55(
|
|
5910
|
+
Tooltip2,
|
|
5911
|
+
{
|
|
5912
|
+
contentStyle: tooltipContentStyle2,
|
|
5913
|
+
cursor: false,
|
|
5914
|
+
labelFormatter: formatChartTooltipLabel
|
|
5915
|
+
}
|
|
5916
|
+
),
|
|
5898
5917
|
/* @__PURE__ */ jsx55(
|
|
5899
5918
|
Line,
|
|
5900
5919
|
{
|
|
@@ -6132,7 +6151,14 @@ function AdsBarChart({
|
|
|
6132
6151
|
width: yAxis.width
|
|
6133
6152
|
}
|
|
6134
6153
|
),
|
|
6135
|
-
showTooltip && /* @__PURE__ */ jsx59(
|
|
6154
|
+
showTooltip && /* @__PURE__ */ jsx59(
|
|
6155
|
+
Tooltip4,
|
|
6156
|
+
{
|
|
6157
|
+
contentStyle: tooltipContentStyle3,
|
|
6158
|
+
cursor: { fill: "transparent" },
|
|
6159
|
+
labelFormatter: formatChartTooltipLabel
|
|
6160
|
+
}
|
|
6161
|
+
),
|
|
6136
6162
|
/* @__PURE__ */ jsx59(
|
|
6137
6163
|
Bar,
|
|
6138
6164
|
{
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tokens/designTokens.ts"],"sourcesContent":["export const designTokens = {\n background: \"#151619\",\n foreground: \"#fdfdfd\",\n card: \"#1b1c21\",\n cardForeground: \"#fdfdfd\",\n popover: \"#2a2b2f\",\n popoverForeground: \"#fdfdfd\",\n primary: \"#844fff\",\n primaryForeground: \"#fdfdfd\",\n secondary: \"#3f4043\",\n secondaryForeground: \"#fdfdfd\",\n muted: \"#3f4043\",\n mutedForeground: \"#7e7f81\",\n accent: \"#3f4043\",\n accentForeground: \"#fdfdfd\",\n destructive: \"#dc2626\",\n destructiveForeground: \"#ff9b9b\",\n border: \"#545558\",\n input: \"#151619\",\n ring: \"#a984ff\",\n brandSecondary: \"#af41ff\",\n brandSecondaryForeground: \"#151619\",\n brandGradientFrom: \"#6859ff\",\n brandGradientTo: \"#af41ff\",\n success: \"#008e61\",\n successForeground: \"#fdfdfd\",\n warning: \"#cd6c00\",\n warningForeground: \"#fdfdfd\",\n info: \"#844fff\",\n infoForeground: \"#fdfdfd\",\n borderMuted: \"#3f4043\",\n active: \"#422880\",\n activeForeground: \"#fdfdfd\",\n labelForeground: \"#a8a9aa\",\n icon: \"#939496\",\n iconMuted: \"#545558\",\n spacing: {\n xs: \"0.25rem\",\n sm: \"0.5rem\",\n md: \"0.75rem\",\n lg: \"1rem\",\n xl: \"1.5rem\",\n \"2xl\": \"2rem\",\n },\n radius: {\n sm: \"0.25rem\",\n md: \"0.375rem\",\n lg: \"0.5rem\",\n xl: \"0.75rem\",\n full: \"9999px\",\n },\n size: {\n controlHeight: \"2.5rem\",\n modalWidth: \"42rem\",\n sidebarWidth: \"17.5rem\",\n },\n zIndex: {\n toolbar: 30,\n overlay: 40,\n modal: 50,\n toast: 60,\n },\n} as const;\n\nexport type DesignTokens = typeof designTokens;\n"],"mappings":";;;AAAO,IAAM,eAAe;AAAA,EAC1B,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,uBAAuB;AAAA,EACvB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,0BAA0B;AAAA,EAC1B,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,MAAM;AAAA,EACN,WAAW;AAAA,EACX,SAAS;AAAA,IACP,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;","names":[]}
|