@shware/workflow-ui 2.0.1 → 2.0.2

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.
Files changed (39) hide show
  1. package/dist/index.mjs +56 -56
  2. package/dist/index.mjs.map +1 -1
  3. package/dist/postgres.mjs +4 -4
  4. package/dist/postgres.mjs.map +1 -1
  5. package/package.json +2 -2
  6. package/src/app/integrations/toast/toast-provider.tsx +2 -2
  7. package/src/app/routes/__root.tsx +9 -9
  8. package/src/app/routes/emails.tsx +2 -2
  9. package/src/app/routes/home.tsx +4 -4
  10. package/src/app/routes/metrics.tsx +19 -19
  11. package/src/app/routes/segment-overview.tsx +21 -21
  12. package/src/app/routes/segments.tsx +2 -2
  13. package/src/app/routes/settings.tsx +6 -6
  14. package/src/app/routes/workflows.tsx +5 -5
  15. package/src/components/avatar.tsx +1 -1
  16. package/src/components/breadcrumb.tsx +3 -3
  17. package/src/components/button/index.tsx +4 -4
  18. package/src/components/chat-markup.tsx +6 -6
  19. package/src/components/date-range.tsx +6 -6
  20. package/src/components/dropdown/index.tsx +8 -8
  21. package/src/components/email-defaults.tsx +3 -3
  22. package/src/components/email-list.tsx +6 -6
  23. package/src/components/flag.tsx +7 -4
  24. package/src/components/input/index.tsx +2 -2
  25. package/src/components/input/search-input.tsx +1 -1
  26. package/src/components/menu/index.tsx +2 -2
  27. package/src/components/metric-card.tsx +7 -7
  28. package/src/components/modal/index.tsx +2 -2
  29. package/src/components/nav-drawer.tsx +3 -3
  30. package/src/components/node-inspector.tsx +5 -5
  31. package/src/components/profile-drawer.tsx +8 -8
  32. package/src/components/segment-list.tsx +9 -9
  33. package/src/components/select/index.tsx +3 -3
  34. package/src/components/tabs/index.tsx +2 -2
  35. package/src/components/templates-page.tsx +23 -23
  36. package/src/components/textarea/index.tsx +2 -2
  37. package/src/components/thumbnail-window.tsx +1 -1
  38. package/src/components/workflow-list.tsx +8 -8
  39. package/src/postgres.ts +4 -2
package/dist/index.mjs CHANGED
@@ -58,12 +58,12 @@ const SIZE_STYLE$2 = {
58
58
  xl: "h-14 px-8 text-lg rounded-2xl focus-visible:ring-4"
59
59
  };
60
60
  const VARIANT_STYLE = {
61
- text: clsx("text-primary border-none bg-transparent", "hover:bg-gray-100 focus-visible:ring-black/10 active:bg-gray-200/80", "dark:hover:bg-gray-800 dark:focus-visible:ring-white/20 dark:active:bg-gray-700/80"),
62
- accent: clsx("bg-accent active:bg-accent/80 text-white", "focus-visible:ring-accent/40 dark:focus-visible:ring-accent/50"),
61
+ text: clsx("border-none bg-transparent text-primary", "hover:bg-gray-100 focus-visible:ring-black/10 active:bg-gray-200/80", "dark:hover:bg-gray-800 dark:focus-visible:ring-white/20 dark:active:bg-gray-700/80"),
62
+ accent: clsx("bg-accent text-white active:bg-accent/80", "focus-visible:ring-accent/40 dark:focus-visible:ring-accent/50"),
63
63
  default: clsx("border-none bg-black text-white focus-visible:ring-black/20 dark:bg-white dark:text-black", "active:bg-black/80 dark:focus-visible:ring-white/30 dark:active:bg-white/80"),
64
- secondary: clsx("text-primary bg-gray-100 focus-visible:ring-black/10 active:bg-gray-200/80", "dark:bg-gray-800 dark:focus-visible:ring-white/20 dark:active:bg-gray-700/80"),
64
+ secondary: clsx("bg-gray-100 text-primary focus-visible:ring-black/10 active:bg-gray-200/80", "dark:bg-gray-800 dark:focus-visible:ring-white/20 dark:active:bg-gray-700/80"),
65
65
  destructive: clsx("text-white focus-visible:ring-red-400/40", "bg-red-400 active:bg-red-500/90", "dark:bg-red-400/70 dark:active:bg-red-400/90"),
66
- outline: clsx("text-primary border", "bg-white focus-visible:ring-black/10 active:bg-gray-100/70", "dark:bg-gray-900/70 dark:focus-visible:ring-white/30 dark:active:bg-gray-900")
66
+ outline: clsx("border text-primary", "bg-white focus-visible:ring-black/10 active:bg-gray-100/70", "dark:bg-gray-900/70 dark:focus-visible:ring-white/30 dark:active:bg-gray-900")
67
67
  };
68
68
  function Button({ children, className, size = "md", style, type = "button", variant = "default", ...props }) {
69
69
  return /* @__PURE__ */ jsx("button", {
@@ -805,11 +805,11 @@ const RULES = {
805
805
  discord: [
806
806
  {
807
807
  pattern: /`([^`]+)`/,
808
- render: (m, key) => code(m[1] ?? "", key)
808
+ render: (m, key) => code(m[1], key)
809
809
  },
810
810
  {
811
811
  pattern: /\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/,
812
- render: (m, key, linkClass) => link(m[2] ?? "", m[1] ?? "", key, linkClass)
812
+ render: (m, key, linkClass) => link(m[2], m[1], key, linkClass)
813
813
  },
814
814
  {
815
815
  pattern: /\*\*([^*]+)\*\*/,
@@ -825,21 +825,21 @@ const RULES = {
825
825
  },
826
826
  {
827
827
  pattern: /\*([^*]+)\*|(?<!\w)_([^_]+)_(?!\w)/,
828
- render: (m, key) => /* @__PURE__ */ jsx("em", { children: m[1] ?? m[2] }, key)
828
+ render: (m, key) => /* @__PURE__ */ jsx("em", { children: m.at(1) ?? m.at(2) }, key)
829
829
  },
830
830
  {
831
831
  pattern: /(https?:\/\/[^\s<]+)/,
832
- render: (m, key, linkClass) => link(m[1] ?? "", m[1] ?? "", key, linkClass)
832
+ render: (m, key, linkClass) => link(m[1], m[1], key, linkClass)
833
833
  }
834
834
  ],
835
835
  slack: [
836
836
  {
837
837
  pattern: /`([^`]+)`/,
838
- render: (m, key) => code(m[1] ?? "", key)
838
+ render: (m, key) => code(m[1], key)
839
839
  },
840
840
  {
841
841
  pattern: /<((?:https?:\/\/|mailto:|tel:)[^|>]+)(?:\|([^>]+))?>/,
842
- render: (m, key, linkClass) => link(m[1] ?? "", m[2] ?? m[1] ?? "", key, linkClass)
842
+ render: (m, key, linkClass) => link(m[1], m.at(2) ?? m[1], key, linkClass)
843
843
  },
844
844
  {
845
845
  pattern: /(?<!\w)\*([^*]+)\*(?!\w)/,
@@ -1620,7 +1620,7 @@ const SIZE_STYLE$1 = {
1620
1620
  function Textarea({ size = "md", className, ...props }) {
1621
1621
  return /* @__PURE__ */ jsx("textarea", {
1622
1622
  ...props,
1623
- className: cn("transition-colors duration-100 focus:outline-none", "placeholder-placeholder bg-textfield focus-visible:border-accent border", "dark:focus-visible:ring-accent/50 focus-visible:ring-accent/40", SIZE_STYLE$1[size], className)
1623
+ className: cn("transition-colors duration-100 focus:outline-none", "border bg-textfield placeholder-placeholder focus-visible:border-accent", "focus-visible:ring-accent/40 dark:focus-visible:ring-accent/50", SIZE_STYLE$1[size], className)
1624
1624
  });
1625
1625
  }
1626
1626
  //#endregion
@@ -1633,10 +1633,10 @@ function Textarea({ size = "md", className, ...props }) {
1633
1633
  */
1634
1634
  function Field({ label, children }) {
1635
1635
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
1636
- className: "text-muted whitespace-nowrap",
1636
+ className: "whitespace-nowrap text-muted",
1637
1637
  children: label
1638
1638
  }), /* @__PURE__ */ jsx("dd", {
1639
- className: "text-secondary min-w-0 break-words",
1639
+ className: "min-w-0 break-words text-secondary",
1640
1640
  children
1641
1641
  })] });
1642
1642
  }
@@ -1670,13 +1670,13 @@ function PreviewPropsEditor({ initial, onChange, onInvalid, onReset }) {
1670
1670
  const [draft, setDraft] = useState(void 0);
1671
1671
  const text = draft ?? JSON.stringify(initial, null, 2);
1672
1672
  return /* @__PURE__ */ jsxs("div", {
1673
- className: "border-border bg-card border-b px-6 py-4",
1673
+ className: "border-b border-border bg-card px-6 py-4",
1674
1674
  children: [
1675
1675
  /* @__PURE__ */ jsxs("div", {
1676
1676
  className: "flex items-center justify-between",
1677
1677
  children: [/* @__PURE__ */ jsx("label", {
1678
1678
  htmlFor: "preview-props",
1679
- className: "text-muted text-sm",
1679
+ className: "text-sm text-muted",
1680
1680
  children: t("emails.previewProps")
1681
1681
  }), /* @__PURE__ */ jsx("button", {
1682
1682
  type: "button",
@@ -1684,7 +1684,7 @@ function PreviewPropsEditor({ initial, onChange, onInvalid, onReset }) {
1684
1684
  setDraft(void 0);
1685
1685
  onReset();
1686
1686
  },
1687
- className: "text-muted hover:text-primary text-xs transition-colors",
1687
+ className: "text-xs text-muted transition-colors hover:text-primary",
1688
1688
  children: t("emails.previewPropsReset")
1689
1689
  })]
1690
1690
  }),
@@ -1713,7 +1713,7 @@ function PreviewPropsEditor({ initial, onChange, onInvalid, onReset }) {
1713
1713
  }
1714
1714
  }),
1715
1715
  /* @__PURE__ */ jsx("p", {
1716
- className: "text-muted mt-1.5 text-xs",
1716
+ className: "mt-1.5 text-xs text-muted",
1717
1717
  children: t("emails.previewPropsHint")
1718
1718
  })
1719
1719
  ]
@@ -1773,13 +1773,13 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1773
1773
  return /* @__PURE__ */ jsx("div", {
1774
1774
  className: "flex flex-1",
1775
1775
  children: /* @__PURE__ */ jsx("section", {
1776
- className: "bg-page flex min-w-0 flex-1 flex-col",
1776
+ className: "flex min-w-0 flex-1 flex-col bg-page",
1777
1777
  children: active === void 0 ? /* @__PURE__ */ jsx("div", {
1778
- className: "text-muted flex flex-1 items-center justify-center text-sm",
1778
+ className: "flex flex-1 items-center justify-center text-sm text-muted",
1779
1779
  children: selected === void 0 ? t("emails.empty") : t("emails.notFound", { key: selected })
1780
1780
  }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1781
1781
  (isEmail && activeEmail !== void 0 || push !== void 0) && /* @__PURE__ */ jsx("div", {
1782
- className: "border-border bg-card border-b px-6 py-4",
1782
+ className: "border-b border-border bg-card px-6 py-4",
1783
1783
  children: /* @__PURE__ */ jsxs("dl", {
1784
1784
  className: "grid grid-cols-[max-content_1fr] gap-x-8 gap-y-2.5 text-sm",
1785
1785
  children: [isEmail && activeEmail !== void 0 && resolved !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1840,13 +1840,13 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1840
1840
  children: [/* @__PURE__ */ jsx("div", {
1841
1841
  className: "flex-1 p-6 pb-4",
1842
1842
  children: isChat ? (isDiscord ? activeDiscord : activeSlack) === void 0 ? /* @__PURE__ */ jsxs("div", {
1843
- className: "border-border bg-card mx-auto max-w-xl rounded-2xl border border-dashed p-8 text-center",
1843
+ className: "mx-auto max-w-xl rounded-2xl border border-dashed border-border bg-card p-8 text-center",
1844
1844
  style: superellipse,
1845
1845
  children: [/* @__PURE__ */ jsx("p", {
1846
- className: "text-primary text-sm font-medium",
1846
+ className: "text-sm font-medium text-primary",
1847
1847
  children: t("emails.notRegistered")
1848
1848
  }), /* @__PURE__ */ jsx("p", {
1849
- className: "text-muted mt-2 text-sm",
1849
+ className: "mt-2 text-sm text-muted",
1850
1850
  children: t("emails.chatNotRegisteredHint", {
1851
1851
  key: active.key,
1852
1852
  channel: isDiscord ? "discord" : "slack"
@@ -1863,13 +1863,13 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1863
1863
  scheme,
1864
1864
  zoom
1865
1865
  }) : null : isPush ? activePush === void 0 ? /* @__PURE__ */ jsxs("div", {
1866
- className: "border-border bg-card mx-auto max-w-xl rounded-2xl border border-dashed p-8 text-center",
1866
+ className: "mx-auto max-w-xl rounded-2xl border border-dashed border-border bg-card p-8 text-center",
1867
1867
  style: superellipse,
1868
1868
  children: [/* @__PURE__ */ jsx("p", {
1869
- className: "text-primary text-sm font-medium",
1869
+ className: "text-sm font-medium text-primary",
1870
1870
  children: t("emails.notRegistered")
1871
1871
  }), /* @__PURE__ */ jsx("p", {
1872
- className: "text-muted mt-2 text-sm",
1872
+ className: "mt-2 text-sm text-muted",
1873
1873
  children: t("emails.pushNotRegisteredHint", { key: active.key })
1874
1874
  })]
1875
1875
  }) : pushFailure !== void 0 ? /* @__PURE__ */ jsx(TemplateFailurePanel, { failure: pushFailure }) : /* @__PURE__ */ jsx(PushPreview, {
@@ -1879,17 +1879,17 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1879
1879
  scheme,
1880
1880
  zoom
1881
1881
  }) : activeEmail === void 0 ? /* @__PURE__ */ jsxs("div", {
1882
- className: "border-border bg-card mx-auto max-w-xl rounded-2xl border border-dashed p-8 text-center",
1882
+ className: "mx-auto max-w-xl rounded-2xl border border-dashed border-border bg-card p-8 text-center",
1883
1883
  style: superellipse,
1884
1884
  children: [/* @__PURE__ */ jsx("p", {
1885
- className: "text-primary text-sm font-medium",
1885
+ className: "text-sm font-medium text-primary",
1886
1886
  children: t("emails.notRegistered")
1887
1887
  }), /* @__PURE__ */ jsx("p", {
1888
- className: "text-muted mt-2 text-sm",
1888
+ className: "mt-2 text-sm text-muted",
1889
1889
  children: t("emails.notRegisteredHint", { key: active.key })
1890
1890
  })]
1891
1891
  }) : failure !== void 0 ? /* @__PURE__ */ jsx(TemplateFailurePanel, { failure }) : loading ? /* @__PURE__ */ jsx("div", {
1892
- className: "text-muted text-center text-sm",
1892
+ className: "text-center text-sm text-muted",
1893
1893
  children: t("emails.rendering")
1894
1894
  }) : error !== void 0 ? /* @__PURE__ */ jsx("div", {
1895
1895
  className: "mx-auto max-w-xl rounded-2xl border border-red-200 bg-red-50 p-6 text-sm text-red-700 dark:border-red-400/20 dark:bg-red-400/10 dark:text-red-300",
@@ -1918,7 +1918,7 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1918
1918
  }), (isChat ? chatReady : isPush ? push !== void 0 : activeEmail !== void 0 && !loading && error === void 0 && failure === void 0) && /* @__PURE__ */ jsx("div", {
1919
1919
  className: "pointer-events-none sticky bottom-0 z-10 flex justify-center pt-2 pb-4",
1920
1920
  children: /* @__PURE__ */ jsxs("div", {
1921
- className: "border-border bg-card pointer-events-auto flex items-center gap-0.5 rounded-full border p-1 shadow-lg",
1921
+ className: "pointer-events-auto flex items-center gap-0.5 rounded-full border border-border bg-card p-1 shadow-lg",
1922
1922
  children: [
1923
1923
  /* @__PURE__ */ jsx(ToolButton, {
1924
1924
  active: scheme === "light",
@@ -1941,7 +1941,7 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1941
1941
  })
1942
1942
  }),
1943
1943
  isEmail && /* @__PURE__ */ jsxs(Fragment, { children: [
1944
- /* @__PURE__ */ jsx("div", { className: "bg-border mx-1 h-4 w-px" }),
1944
+ /* @__PURE__ */ jsx("div", { className: "mx-1 h-4 w-px bg-border" }),
1945
1945
  /* @__PURE__ */ jsx(ToolButton, {
1946
1946
  active: device === "desktop",
1947
1947
  label: t("emails.previewDesktop"),
@@ -1963,7 +1963,7 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1963
1963
  })
1964
1964
  })
1965
1965
  ] }),
1966
- /* @__PURE__ */ jsx("div", { className: "bg-border mx-1 h-4 w-px" }),
1966
+ /* @__PURE__ */ jsx("div", { className: "mx-1 h-4 w-px bg-border" }),
1967
1967
  /* @__PURE__ */ jsx(ToolButton, {
1968
1968
  label: t("emails.zoomOut"),
1969
1969
  onClick: () => setZoom((level) => Math.max(.5, level - .25)),
@@ -1977,7 +1977,7 @@ function TemplatesPage({ refs, emails, pushes = {}, discords = {}, slacks = {},
1977
1977
  type: "button",
1978
1978
  title: t("emails.zoomReset"),
1979
1979
  onClick: () => setZoom(1),
1980
- className: "text-secondary hover:text-primary w-11 text-center text-xs font-medium tabular-nums transition-colors",
1980
+ className: "w-11 text-center text-xs font-medium text-secondary tabular-nums transition-colors hover:text-primary",
1981
1981
  children: [Math.round(zoom * 100), "%"]
1982
1982
  }),
1983
1983
  /* @__PURE__ */ jsx(ToolButton, {
@@ -2085,14 +2085,14 @@ function WorkflowList({ items, reports, onOpen }) {
2085
2085
  const { t } = useTranslation();
2086
2086
  const byId = new Map((reports ?? []).map((report) => [report.id, report]));
2087
2087
  return /* @__PURE__ */ jsx("div", {
2088
- className: "border-border bg-card rounded-2xl border",
2088
+ className: "rounded-2xl border border-border bg-card",
2089
2089
  style: superellipse,
2090
2090
  children: /* @__PURE__ */ jsxs("table", {
2091
2091
  className: "w-full table-fixed border-separate border-spacing-0 text-sm max-md:block",
2092
2092
  children: [/* @__PURE__ */ jsx("thead", {
2093
2093
  className: "max-md:hidden",
2094
2094
  children: /* @__PURE__ */ jsxs("tr", {
2095
- className: "text-muted text-left text-xs font-medium",
2095
+ className: "text-left text-xs font-medium text-muted",
2096
2096
  children: [
2097
2097
  /* @__PURE__ */ jsx("th", {
2098
2098
  className: clsx(HEAD_CELL, "min-w-0 px-6"),
@@ -2123,7 +2123,7 @@ function WorkflowList({ items, reports, onOpen }) {
2123
2123
  };
2124
2124
  return /* @__PURE__ */ jsxs("tr", {
2125
2125
  onClick: () => onOpen(key),
2126
- className: clsx("cursor-pointer align-top [&>td]:transition-colors", "md:hover:[&>td]:bg-hover md:last:[&>td]:border-b-0", "md:last:[&>td:first-child]:rounded-bl-2xl md:last:[&>td:last-child]:rounded-br-2xl", "border-border max-md:hover:bg-hover max-md:grid max-md:grid-cols-6", "max-md:border-b max-md:px-3 max-md:first:rounded-t-2xl", "max-md:last:rounded-b-2xl max-md:last:border-b-0"),
2126
+ className: clsx("cursor-pointer align-top [&>td]:transition-colors", "md:last:[&>td]:border-b-0 md:hover:[&>td]:bg-hover", "md:last:[&>td:first-child]:rounded-bl-2xl md:last:[&>td:last-child]:rounded-br-2xl", "border-border max-md:grid max-md:grid-cols-6 max-md:hover:bg-hover", "max-md:border-b max-md:px-3 max-md:first:rounded-t-2xl", "max-md:last:rounded-b-2xl max-md:last:border-b-0"),
2127
2127
  style: superellipse,
2128
2128
  children: [
2129
2129
  /* @__PURE__ */ jsx("td", {
@@ -2132,7 +2132,7 @@ function WorkflowList({ items, reports, onOpen }) {
2132
2132
  children: /* @__PURE__ */ jsxs("div", {
2133
2133
  className: "flex items-start gap-3",
2134
2134
  children: [/* @__PURE__ */ jsx(Workflow, {
2135
- className: "text-muted mt-0.5 size-4 shrink-0",
2135
+ className: "mt-0.5 size-4 shrink-0 text-muted",
2136
2136
  strokeWidth: 2
2137
2137
  }), /* @__PURE__ */ jsxs("div", {
2138
2138
  className: "min-w-0",
@@ -2142,11 +2142,11 @@ function WorkflowList({ items, reports, onOpen }) {
2142
2142
  children: displayName(ir.meta?.name, t("common.untitled"))
2143
2143
  }),
2144
2144
  ir.meta?.description !== void 0 && /* @__PURE__ */ jsx("p", {
2145
- className: "text-muted mt-1 truncate text-sm max-md:-ml-7",
2145
+ className: "mt-1 truncate text-sm text-muted max-md:-ml-7",
2146
2146
  children: ir.meta.description
2147
2147
  }),
2148
2148
  /* @__PURE__ */ jsxs("div", {
2149
- className: "text-muted mt-2 flex items-center gap-3 text-xs max-md:-ml-7",
2149
+ className: "mt-2 flex items-center gap-3 text-xs text-muted max-md:-ml-7",
2150
2150
  children: [/* @__PURE__ */ jsxs("span", {
2151
2151
  className: "flex items-center gap-1",
2152
2152
  children: [/* @__PURE__ */ jsx(Mail, {
@@ -2178,7 +2178,7 @@ function WorkflowList({ items, reports, onOpen }) {
2178
2178
  style: superellipse,
2179
2179
  children: [
2180
2180
  /* @__PURE__ */ jsx("div", {
2181
- className: "text-muted mb-1 truncate text-xs md:hidden",
2181
+ className: "mb-1 truncate text-xs text-muted md:hidden",
2182
2182
  children: t(`workflows.columns.${column}`)
2183
2183
  }),
2184
2184
  /* @__PURE__ */ jsx("div", {
@@ -2286,7 +2286,7 @@ function MetricCard({ label, value, delta, dates, series, format }) {
2286
2286
  setActive(Math.min(Math.max(index, 0), dates.length - 1));
2287
2287
  };
2288
2288
  return /* @__PURE__ */ jsxs("section", {
2289
- className: "border-border bg-card flex flex-col overflow-hidden rounded-2xl border",
2289
+ className: "flex flex-col overflow-hidden rounded-2xl border border-border bg-card",
2290
2290
  style: superellipse,
2291
2291
  children: [
2292
2292
  /* @__PURE__ */ jsx("div", {
@@ -2358,10 +2358,10 @@ function MetricCard({ label, value, delta, dates, series, format }) {
2358
2358
  ]
2359
2359
  }),
2360
2360
  all.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
2361
- className: "text-muted pointer-events-none absolute top-0 left-4 text-xs tabular-nums",
2361
+ className: "pointer-events-none absolute top-0 left-4 text-xs text-muted tabular-nums",
2362
2362
  children: format(max)
2363
2363
  }), /* @__PURE__ */ jsx("span", {
2364
- className: "text-muted pointer-events-none absolute right-4 bottom-1 text-xs tabular-nums",
2364
+ className: "pointer-events-none absolute right-4 bottom-1 text-xs text-muted tabular-nums",
2365
2365
  children: format(min)
2366
2366
  })] }),
2367
2367
  hovered !== void 0 && /* @__PURE__ */ jsx(HoverReadout, {
@@ -2399,11 +2399,11 @@ function HoverReadout({ x, date, rows }) {
2399
2399
  className: "pointer-events-none",
2400
2400
  children: [
2401
2401
  /* @__PURE__ */ jsx("div", {
2402
- className: "bg-border absolute inset-y-0 w-px",
2402
+ className: "absolute inset-y-0 w-px bg-border",
2403
2403
  style: { left }
2404
2404
  }),
2405
2405
  rows.map((row) => /* @__PURE__ */ jsx("div", {
2406
- className: "border-card absolute size-2.5 rounded-full border-2",
2406
+ className: "absolute size-2.5 rounded-full border-2 border-card",
2407
2407
  style: {
2408
2408
  left,
2409
2409
  top: row.y,
@@ -2412,7 +2412,7 @@ function HoverReadout({ x, date, rows }) {
2412
2412
  }
2413
2413
  }, row.label)),
2414
2414
  /* @__PURE__ */ jsxs("div", {
2415
- className: "border-border bg-card shadow-card-shadow absolute top-0 grid w-max items-center gap-x-3 gap-y-1 rounded-lg border px-2.5 py-2 text-xs shadow-md",
2415
+ className: "absolute top-0 grid w-max items-center gap-x-3 gap-y-1 rounded-lg border border-border bg-card px-2.5 py-2 text-xs shadow-md shadow-card-shadow",
2416
2416
  style: {
2417
2417
  ...superellipse,
2418
2418
  left,
@@ -2431,7 +2431,7 @@ function HoverReadout({ x, date, rows }) {
2431
2431
  }
2432
2432
  }),
2433
2433
  /* @__PURE__ */ jsx("span", {
2434
- className: "text-secondary whitespace-nowrap",
2434
+ className: "whitespace-nowrap text-secondary",
2435
2435
  children: row.label
2436
2436
  }),
2437
2437
  /* @__PURE__ */ jsx("span", {
@@ -2457,7 +2457,7 @@ function Input({ size = "md", type = "text", htmlSize, className, ...props }) {
2457
2457
  ...props,
2458
2458
  type,
2459
2459
  size: htmlSize,
2460
- className: cn("transition-colors duration-100 focus:outline-none", "placeholder-placeholder bg-textfield focus-visible:border-accent border", "dark:focus-visible:ring-accent/50 focus-visible:ring-accent/40", SIZE_STYLE[size], className)
2460
+ className: cn("transition-colors duration-100 focus:outline-none", "border bg-textfield placeholder-placeholder focus-visible:border-accent", "focus-visible:ring-accent/40 dark:focus-visible:ring-accent/50", SIZE_STYLE[size], className)
2461
2461
  });
2462
2462
  }
2463
2463
  //#endregion
@@ -2550,7 +2550,7 @@ function DateRangePicker({ value, onChange, className }) {
2550
2550
  size: 16,
2551
2551
  strokeWidth: 2,
2552
2552
  "aria-hidden": true,
2553
- className: "text-secondary shrink-0"
2553
+ className: "shrink-0 text-secondary"
2554
2554
  }), /* @__PURE__ */ jsxs("span", {
2555
2555
  className: "tabular-nums",
2556
2556
  children: [
@@ -2568,11 +2568,11 @@ function DateRangePicker({ value, onChange, className }) {
2568
2568
  ...floatingStyles,
2569
2569
  ...superellipse
2570
2570
  },
2571
- className: "border-border bg-card shadow-card-shadow z-50 w-64 rounded-xl border p-2 shadow-lg",
2571
+ className: "z-50 w-64 rounded-xl border border-border bg-card p-2 shadow-lg shadow-card-shadow",
2572
2572
  ...getFloatingProps(),
2573
2573
  children: [PRESETS.map((days) => /* @__PURE__ */ jsx("button", {
2574
2574
  type: "button",
2575
- className: "hover:bg-hover block w-full rounded-lg px-2.5 py-1.5 text-left text-sm",
2575
+ className: "block w-full rounded-lg px-2.5 py-1.5 text-left text-sm hover:bg-hover",
2576
2576
  style: superellipse,
2577
2577
  onClick: () => {
2578
2578
  onChange(lastDays(days));
@@ -2580,11 +2580,11 @@ function DateRangePicker({ value, onChange, className }) {
2580
2580
  },
2581
2581
  children: t("metrics.range.lastDays", { count: days })
2582
2582
  }, days)), /* @__PURE__ */ jsxs("div", {
2583
- className: "border-border mt-2 space-y-2 border-t pt-2",
2583
+ className: "mt-2 space-y-2 border-t border-border pt-2",
2584
2584
  children: [/* @__PURE__ */ jsxs("label", {
2585
2585
  className: "block",
2586
2586
  children: [/* @__PURE__ */ jsx("span", {
2587
- className: "text-muted text-xs",
2587
+ className: "text-xs text-muted",
2588
2588
  children: t("metrics.range.from")
2589
2589
  }), /* @__PURE__ */ jsx(Input, {
2590
2590
  size: "sm",
@@ -2597,7 +2597,7 @@ function DateRangePicker({ value, onChange, className }) {
2597
2597
  }), /* @__PURE__ */ jsxs("label", {
2598
2598
  className: "block",
2599
2599
  children: [/* @__PURE__ */ jsx("span", {
2600
- className: "text-muted text-xs",
2600
+ className: "text-xs text-muted",
2601
2601
  children: t("metrics.range.to")
2602
2602
  }), /* @__PURE__ */ jsx(Input, {
2603
2603
  size: "sm",
@@ -2653,7 +2653,7 @@ function Avatar({ picture, label, size = "md" }) {
2653
2653
  });
2654
2654
  return /* @__PURE__ */ jsx("div", {
2655
2655
  "aria-hidden": true,
2656
- className: cn("bg-selected text-secondary flex shrink-0 items-center justify-center rounded-full font-medium", SIZES[size]),
2656
+ className: cn("flex shrink-0 items-center justify-center rounded-full bg-selected font-medium text-secondary", SIZES[size]),
2657
2657
  children: label.trim().charAt(0).toUpperCase()
2658
2658
  });
2659
2659
  }