@mediaradar/design-components 0.18.2 → 0.18.4

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.js CHANGED
@@ -1,7 +1,10 @@
1
1
  "use client";
2
2
 
3
+ // <define:__FONT_SIZE_KEYS__>
4
+ var define_FONT_SIZE_KEYS_default = ["micro", "xs", "card-title", "dense", "sm", "panel-title", "base", "md", "lg", "xl", "h1"];
5
+
3
6
  // src/InfoTip.tsx
4
- import { useEffect, useRef, useState } from "react";
7
+ import { useEffect, useId, useRef, useState } from "react";
5
8
  import { createPortal } from "react-dom";
6
9
  import { Info } from "lucide-react";
7
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -9,6 +12,17 @@ function InfoTip({ text, size = 11, label = "More information", trigger = "click
9
12
  const [open, setOpen] = useState(false);
10
13
  const [pos, setPos] = useState(null);
11
14
  const btnRef = useRef(null);
15
+ const closeTimer = useRef(null);
16
+ const textId = useId();
17
+ const cancelClose = () => {
18
+ if (closeTimer.current) clearTimeout(closeTimer.current);
19
+ closeTimer.current = null;
20
+ };
21
+ const closeSoon = () => {
22
+ cancelClose();
23
+ closeTimer.current = setTimeout(() => setOpen(false), 120);
24
+ };
25
+ useEffect(() => cancelClose, []);
12
26
  useEffect(() => {
13
27
  if (!open) return;
14
28
  const onDown = (e) => {
@@ -30,6 +44,7 @@ function InfoTip({ text, size = 11, label = "More information", trigger = "click
30
44
  setPos({ top: r.bottom + 6, left, width });
31
45
  };
32
46
  const show = () => {
47
+ cancelClose();
33
48
  place();
34
49
  setOpen(true);
35
50
  };
@@ -40,7 +55,7 @@ function InfoTip({ text, size = 11, label = "More information", trigger = "click
40
55
  };
41
56
  const hoverProps = trigger === "hover" ? {
42
57
  onMouseEnter: show,
43
- onMouseLeave: () => setOpen(false),
58
+ onMouseLeave: closeSoon,
44
59
  onFocus: show,
45
60
  onBlur: () => setOpen(false)
46
61
  } : {};
@@ -53,16 +68,20 @@ function InfoTip({ text, size = 11, label = "More information", trigger = "click
53
68
  onClick: toggle,
54
69
  "aria-label": label,
55
70
  "aria-expanded": open,
71
+ "aria-describedby": textId,
56
72
  ...hoverProps,
57
73
  className: "inline-flex cursor-pointer items-center text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
58
74
  children: /* @__PURE__ */ jsx(Info, { size, "aria-hidden": "true" })
59
75
  }
60
76
  ),
77
+ /* @__PURE__ */ jsx("span", { id: textId, hidden: true, children: text }),
61
78
  open && pos && createPortal(
62
79
  /* @__PURE__ */ jsx(
63
80
  "div",
64
81
  {
65
- role: "tooltip",
82
+ "aria-hidden": "true",
83
+ onMouseEnter: trigger === "hover" ? cancelClose : void 0,
84
+ onMouseLeave: trigger === "hover" ? closeSoon : void 0,
66
85
  style: { position: "fixed", top: pos.top, left: pos.left, width: pos.width },
67
86
  className: "z-[90] rounded-control border border-border-default bg-surface px-3 py-2 text-[12px] font-normal not-italic normal-case leading-relaxed tracking-normal text-text-secondary shadow-overlay",
68
87
  children: text
@@ -396,7 +415,7 @@ import { extendTailwindMerge } from "tailwind-merge";
396
415
  var twMerge = extendTailwindMerge({
397
416
  extend: {
398
417
  classGroups: {
399
- "font-size": [{ text: ["micro", "dense"] }]
418
+ "font-size": [{ text: define_FONT_SIZE_KEYS_default }]
400
419
  }
401
420
  }
402
421
  });
@@ -511,7 +530,7 @@ import { jsx as jsx6 } from "react/jsx-runtime";
511
530
  function boxClass(on, disabled) {
512
531
  return cn(
513
532
  "flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border transition-colors",
514
- on ? "border-transparent bg-brand-primaryAction text-white" : "border-border-interactive bg-input",
533
+ on ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-input",
515
534
  disabled && "cursor-not-allowed opacity-50"
516
535
  );
517
536
  }
@@ -851,7 +870,7 @@ function DateRangeFilter({
851
870
  /* @__PURE__ */ jsx7(
852
871
  "span",
853
872
  {
854
- className: `relative z-10 flex h-8 w-8 items-center justify-center rounded-full text-[13px] tabular-nums ${endpoint ? "bg-brand-primaryAction font-semibold text-white" : inMonth ? "text-text-primary hover:bg-subtle" : "text-text-tertiary"}`,
873
+ className: `relative z-10 flex h-8 w-8 items-center justify-center rounded-full text-[13px] tabular-nums ${endpoint ? "bg-brand-primaryAction font-semibold text-brand-onprimary" : inMonth ? "text-text-primary hover:bg-subtle" : "text-text-tertiary"}`,
855
874
  children: d.getDate()
856
875
  }
857
876
  )
@@ -862,7 +881,7 @@ function DateRangeFilter({
862
881
  }) }),
863
882
  /* @__PURE__ */ jsxs6("div", { className: "mt-4 flex justify-end gap-2", children: [
864
883
  /* @__PURE__ */ jsx7("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-cancel`, onClick: () => setOpen(false), className: "rounded-control border border-border-default bg-surface px-5 py-2 text-[13px] font-semibold text-text-primary transition-colors hover:bg-subtle", children: "Cancel" }),
865
- /* @__PURE__ */ jsx7("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-apply`, onClick: apply, className: "rounded-control bg-brand-primaryAction px-5 py-2 text-[13px] font-semibold text-white transition-[filter] hover:brightness-110", children: "Apply" })
884
+ /* @__PURE__ */ jsx7("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-apply`, onClick: apply, className: "rounded-control bg-brand-primaryAction px-5 py-2 text-[13px] font-semibold text-brand-onprimary transition-[filter] hover:brightness-110", children: "Apply" })
866
885
  ] })
867
886
  ] })
868
887
  ]
@@ -881,7 +900,7 @@ function NavBtn({ children, onClick, ...rest }) {
881
900
  }
882
901
 
883
902
  // src/SearchBar.tsx
884
- import { useEffect as useEffect4, useRef as useRef4, useState as useState4 } from "react";
903
+ import { useEffect as useEffect4, useId as useId2, useRef as useRef4, useState as useState4 } from "react";
885
904
  import { AlertCircle, Check as Check3, ChevronDown as ChevronDown3, Search as Search3 } from "lucide-react";
886
905
  import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
887
906
  var DEFAULT_SEARCH_MATCH = { mode: "anyWord", wordJoin: "Or" };
@@ -1142,6 +1161,7 @@ function RadioOption({
1142
1161
  }
1143
1162
  function RowInfoTip({ text }) {
1144
1163
  const [open, setOpen] = useState4(false);
1164
+ const id = useId2();
1145
1165
  const ref = useRef4(null);
1146
1166
  useEffect4(() => {
1147
1167
  if (!open) return;
@@ -1162,14 +1182,16 @@ function RowInfoTip({ text }) {
1162
1182
  },
1163
1183
  "aria-label": "More information",
1164
1184
  "aria-expanded": open,
1165
- className: "inline-flex text-text-tertiary transition-colors hover:text-text-primary",
1185
+ "aria-describedby": id,
1186
+ className: "inline-flex text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
1166
1187
  children: /* @__PURE__ */ jsx8(AlertCircle, { size: 13, "aria-hidden": "true" })
1167
1188
  }
1168
1189
  ),
1169
- open && /* @__PURE__ */ jsx8(
1190
+ /* @__PURE__ */ jsx8(
1170
1191
  "span",
1171
1192
  {
1172
- role: "tooltip",
1193
+ id,
1194
+ hidden: !open,
1173
1195
  className: "absolute left-0 top-[calc(100%+6px)] z-40 w-[220px] rounded-control border border-border-default bg-surface px-2.5 py-1.5 text-[11.5px] font-normal leading-snug text-text-secondary shadow-overlay",
1174
1196
  children: text
1175
1197
  }
@@ -1521,7 +1543,7 @@ var NO_RESULTS_BODY = "Your filters may be too narrow, conflict with each other,
1521
1543
  function noResultsBody(workspaceName) {
1522
1544
  return workspaceName ? `Nothing in the \u201C${workspaceName}\u201D workspace matches. ${NO_RESULTS_BODY}` : NO_RESULTS_BODY;
1523
1545
  }
1524
- var PRIMARY_ACTION_CLASS = "rounded-control bg-brand-primaryAction px-3.5 py-2 text-[13px] font-semibold text-white transition-colors hover:opacity-90";
1546
+ var PRIMARY_ACTION_CLASS = "rounded-control bg-brand-primaryAction px-3.5 py-2 text-[13px] font-semibold text-brand-onprimary transition-colors hover:opacity-90";
1525
1547
  var QUIET_ACTION_CLASS = "rounded-control text-[13px] font-medium text-text-link transition-colors hover:underline focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus";
1526
1548
  function NoResultsEmptyState({
1527
1549
  title = NO_RESULTS_TITLE,
@@ -1856,12 +1878,21 @@ function StackedColumnPlaceholder({
1856
1878
  }
1857
1879
 
1858
1880
  // src/Tooltip.tsx
1859
- import { useEffect as useEffect8, useId, useLayoutEffect as useLayoutEffect2, useRef as useRef9, useState as useState8 } from "react";
1881
+ import { useEffect as useEffect8, useId as useId3, useLayoutEffect as useLayoutEffect2, useRef as useRef9, useState as useState8 } from "react";
1860
1882
  import { createPortal as createPortal3 } from "react-dom";
1861
1883
  import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
1862
1884
  function cx6(...parts) {
1863
1885
  return parts.filter(Boolean).join(" ");
1864
1886
  }
1887
+ function addDescribedBy(el, id) {
1888
+ const ids = (el.getAttribute("aria-describedby") ?? "").split(" ").filter(Boolean);
1889
+ if (!ids.includes(id)) el.setAttribute("aria-describedby", [...ids, id].join(" "));
1890
+ }
1891
+ function removeDescribedBy(el, id) {
1892
+ const ids = (el.getAttribute("aria-describedby") ?? "").split(" ").filter((x) => x && x !== id);
1893
+ if (ids.length) el.setAttribute("aria-describedby", ids.join(" "));
1894
+ else el.removeAttribute("aria-describedby");
1895
+ }
1865
1896
  function exitDurationMs(el) {
1866
1897
  if (typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) return 0;
1867
1898
  const cs = window.getComputedStyle(el);
@@ -1898,7 +1929,8 @@ function Tooltip({
1898
1929
  const [shown, setShown] = useState8(false);
1899
1930
  const openRef = useRef9(false);
1900
1931
  const mountedRef = useRef9(false);
1901
- const id = useId();
1932
+ const id = useId3();
1933
+ const describedRef = useRef9(null);
1902
1934
  const clearHideTimer = () => {
1903
1935
  if (hideTimer.current) {
1904
1936
  clearTimeout(hideTimer.current);
@@ -1935,7 +1967,8 @@ function Tooltip({
1935
1967
  if (!mountedRef.current) setBoxWidth(null);
1936
1968
  mountedRef.current = true;
1937
1969
  setAnchor({ top: r.top, left: r.left, width: r.width, height: r.height, bottom: r.bottom, right: r.right });
1938
- if (anchorRef) el.setAttribute("aria-describedby", id);
1970
+ const target = anchorRef ? el : describedRef.current;
1971
+ if (target) addDescribedBy(target, id);
1939
1972
  };
1940
1973
  const show = () => {
1941
1974
  clearHideTimer();
@@ -1952,7 +1985,9 @@ function Tooltip({
1952
1985
  mountedRef.current = false;
1953
1986
  setAnchor(null);
1954
1987
  setBoxWidth(null);
1955
- if (anchorRef?.current) anchorRef.current.removeAttribute("aria-describedby");
1988
+ if (anchorRef?.current) removeDescribedBy(anchorRef.current, id);
1989
+ if (describedRef.current) removeDescribedBy(describedRef.current, id);
1990
+ describedRef.current = null;
1956
1991
  };
1957
1992
  const hideNow = () => {
1958
1993
  clearShowTimer();
@@ -2003,6 +2038,12 @@ function Tooltip({
2003
2038
  el.removeEventListener("blur", hide);
2004
2039
  };
2005
2040
  }, [anchorRef, placement, delay]);
2041
+ useEffect8(() => {
2042
+ if (!anchor) return;
2043
+ const onKey = (e) => e.key === "Escape" && hideNow();
2044
+ window.addEventListener("keydown", onKey);
2045
+ return () => window.removeEventListener("keydown", onKey);
2046
+ }, [anchor]);
2006
2047
  useLayoutEffect2(() => {
2007
2048
  if (!anchor) return;
2008
2049
  const el = boxRef.current;
@@ -2066,9 +2107,11 @@ function Tooltip({
2066
2107
  className,
2067
2108
  onMouseEnter: show,
2068
2109
  onMouseLeave: hide,
2069
- onFocus: show,
2110
+ onFocus: (e) => {
2111
+ describedRef.current = e.target;
2112
+ show();
2113
+ },
2070
2114
  onBlur: hide,
2071
- "aria-describedby": anchor ? id : void 0,
2072
2115
  children: [
2073
2116
  children,
2074
2117
  floating
@@ -2712,7 +2755,7 @@ function MetricCells({ spendN, yoy }) {
2712
2755
  return /* @__PURE__ */ jsxs23("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2713
2756
  /* @__PURE__ */ jsx25("span", { className: "text-right text-[12px] font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
2714
2757
  /* @__PURE__ */ jsx25("span", { className: "text-right text-[12px] font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
2715
- /* @__PURE__ */ jsx25("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ jsx25("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-[10px] font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ jsxs23("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
2758
+ /* @__PURE__ */ jsx25("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ jsx25("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-micro font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ jsxs23("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
2716
2759
  up ? "+" : "\u2212",
2717
2760
  Math.abs(yoy),
2718
2761
  "%"
@@ -2763,7 +2806,7 @@ import { cva } from "class-variance-authority";
2763
2806
  import { Loader2 as Loader22 } from "lucide-react";
2764
2807
  import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2765
2808
  var buttonVariants = cva(
2766
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-control transition-all duration-(--mr-motion-duration-interactive) ease-interactive disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-hidden focus-visible:ring-0",
2809
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-control transition-all duration-(--mr-motion-duration-interactive) ease-interactive disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
2767
2810
  {
2768
2811
  variants: {
2769
2812
  variant: {
@@ -2861,7 +2904,7 @@ function FilterDropdownFooter({
2861
2904
  }
2862
2905
 
2863
2906
  // src/NameListModal.tsx
2864
- import { useEffect as useEffect10, useState as useState11 } from "react";
2907
+ import { useEffect as useEffect10, useId as useId4, useRef as useRef11, useState as useState11 } from "react";
2865
2908
  import { createPortal as createPortal5 } from "react-dom";
2866
2909
  import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
2867
2910
  function NameListModal({
@@ -2879,11 +2922,38 @@ function NameListModal({
2879
2922
  () => Object.fromEntries((options ?? []).map((o) => [o.key, !!o.initial]))
2880
2923
  );
2881
2924
  const toggle = (key) => setChecked((c) => ({ ...c, [key]: !c[key] }));
2925
+ const dialogRef = useRef11(null);
2926
+ const titleId = useId4();
2927
+ const fieldId = useId4();
2882
2928
  useEffect10(() => {
2883
2929
  const onKey = (e) => e.key === "Escape" && onCancel();
2884
2930
  window.addEventListener("keydown", onKey);
2885
2931
  return () => window.removeEventListener("keydown", onKey);
2886
2932
  }, [onCancel]);
2933
+ const [opener] = useState11(() => typeof document === "undefined" ? null : document.activeElement);
2934
+ useEffect10(
2935
+ () => () => {
2936
+ const active = document.activeElement;
2937
+ if (!active || active === document.body) opener?.focus?.();
2938
+ },
2939
+ [opener]
2940
+ );
2941
+ const trapTab = (e) => {
2942
+ if (e.key !== "Tab" || !dialogRef.current) return;
2943
+ const items = [
2944
+ ...dialogRef.current.querySelectorAll("button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex='-1'])")
2945
+ ];
2946
+ if (items.length === 0) return;
2947
+ const first = items[0];
2948
+ const last = items[items.length - 1];
2949
+ if (e.shiftKey && document.activeElement === first) {
2950
+ e.preventDefault();
2951
+ last.focus();
2952
+ } else if (!e.shiftKey && document.activeElement === last) {
2953
+ e.preventDefault();
2954
+ first.focus();
2955
+ }
2956
+ };
2887
2957
  return createPortal5(
2888
2958
  // bg-scrim, not a literal: design-tokens gained a scrim token in 2.5.0.
2889
2959
  // No in-data-[theme=dark] override needed any more -- the token redefines
@@ -2896,18 +2966,20 @@ function NameListModal({
2896
2966
  children: /* @__PURE__ */ jsxs26(
2897
2967
  "div",
2898
2968
  {
2969
+ ref: dialogRef,
2899
2970
  role: "dialog",
2900
2971
  "aria-modal": "true",
2901
- "aria-label": title,
2972
+ "aria-labelledby": titleId,
2973
+ onKeyDown: trapTab,
2902
2974
  className: "w-full max-w-[420px] rounded-card border border-border-default bg-surface p-5 shadow-overlay",
2903
2975
  children: [
2904
- /* @__PURE__ */ jsx28("h2", { className: "text-[16px] font-semibold text-text-primary", children: title }),
2976
+ /* @__PURE__ */ jsx28("h2", { id: titleId, className: "text-[16px] font-semibold text-text-primary", children: title }),
2905
2977
  /* @__PURE__ */ jsxs26("div", { className: "mt-4 flex flex-col gap-1.5", children: [
2906
- /* @__PURE__ */ jsx28("label", { htmlFor: "account-list-name", className: "text-[12px] font-medium text-text-secondary", children: fieldLabel }),
2978
+ /* @__PURE__ */ jsx28("label", { htmlFor: fieldId, className: "text-[12px] font-medium text-text-secondary", children: fieldLabel }),
2907
2979
  /* @__PURE__ */ jsx28(
2908
2980
  "input",
2909
2981
  {
2910
- id: "account-list-name",
2982
+ id: fieldId,
2911
2983
  autoFocus: true,
2912
2984
  value: name,
2913
2985
  onChange: (e) => setName(e.target.value),
@@ -3065,7 +3137,7 @@ function SortButton({
3065
3137
  // subtly tighter than the fixed headers next to them. A control
3066
3138
  // should carry exactly the properties that do not inherit, and
3067
3139
  // nothing more.
3068
- "group inline-flex items-center gap-1 uppercase transition-colors",
3140
+ "group inline-flex items-center gap-1 uppercase transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
3069
3141
  ALIGN[align],
3070
3142
  !disabled && "hover:text-text-primary"
3071
3143
  ),
@@ -3337,7 +3409,7 @@ function TablePagination({
3337
3409
  }
3338
3410
 
3339
3411
  // src/DateRangePicker.tsx
3340
- import { useEffect as useEffect11, useMemo as useMemo4, useRef as useRef11, useState as useState12 } from "react";
3412
+ import { useEffect as useEffect11, useMemo as useMemo4, useRef as useRef12, useState as useState12 } from "react";
3341
3413
  import { ChevronDown as ChevronDown10 } from "lucide-react";
3342
3414
  import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
3343
3415
  var MONTH_ABBR = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
@@ -3404,7 +3476,7 @@ function DateRangePicker({
3404
3476
  const [open, setOpen] = useState12(false);
3405
3477
  const [value, setValue] = useState12(defaultValue);
3406
3478
  const [draft, setDraft] = useState12(defaultValue);
3407
- const ref = useRef11(null);
3479
+ const ref = useRef12(null);
3408
3480
  const [fromMo, setFromMo] = useState12(end.getMonth());
3409
3481
  const [fromYr, setFromYr] = useState12(end.getFullYear() - 1);
3410
3482
  const [toMo, setToMo] = useState12(end.getMonth());
@@ -3511,7 +3583,7 @@ function DateRangePicker({
3511
3583
  }
3512
3584
 
3513
3585
  // src/MultiSelectFilter.tsx
3514
- import { useCallback as useCallback4, useEffect as useEffect12, useRef as useRef12, useState as useState13 } from "react";
3586
+ import { useCallback as useCallback4, useEffect as useEffect12, useRef as useRef13, useState as useState13 } from "react";
3515
3587
  import { ChevronDown as ChevronDown11, Check as Check7, Minus as Minus2, Search as Search5, X as X4 } from "lucide-react";
3516
3588
  import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
3517
3589
  function MultiSelectFilter({
@@ -3540,7 +3612,7 @@ function MultiSelectFilter({
3540
3612
  const [open, setOpen] = useState13(false);
3541
3613
  const [q, setQ] = useState13("");
3542
3614
  const [draft, setDraft] = useState13(selected);
3543
- const ref = useRef12(null);
3615
+ const ref = useRef13(null);
3544
3616
  const close = useCallback4(() => {
3545
3617
  setOpen(false);
3546
3618
  setQ("");
@@ -3794,11 +3866,11 @@ function Toggle({ checked, onChange, label, size = "md", disabled, className, te
3794
3866
  }
3795
3867
 
3796
3868
  // src/AISpark.tsx
3797
- import { useId as useId2 } from "react";
3869
+ import { useId as useId5 } from "react";
3798
3870
  import { Sparkles } from "lucide-react";
3799
3871
  import { Fragment as Fragment5, jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
3800
3872
  function AISpark({ size = 16, className }) {
3801
- const id = useId2();
3873
+ const id = useId5();
3802
3874
  return /* @__PURE__ */ jsxs34(Fragment5, { children: [
3803
3875
  /* @__PURE__ */ jsx39("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ jsx39("defs", { children: /* @__PURE__ */ jsxs34("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
3804
3876
  /* @__PURE__ */ jsx39("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),