@mintlify/components 1.0.1 → 1.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.
@@ -44,7 +44,7 @@ const x = ({
44
44
  /* @__PURE__ */ r(
45
45
  "div",
46
46
  {
47
- className: "text-left leading-tight",
47
+ className: "w-full text-left leading-tight",
48
48
  contentEditable: !1,
49
49
  "data-component-part": "accordion-title-container",
50
50
  children: [
@@ -1,7 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { IconType } from '../../utils/icon-utils';
3
3
  type AccordionProps = {
4
- title: string;
4
+ /**
5
+ * @remarks Prefer using a string value for better compatibility with URL state synchronization and tracking callbacks.
6
+ * ReactNode is supported for internal use only.
7
+ */
8
+ title: ReactNode;
5
9
  description?: string;
6
10
  defaultOpen: boolean;
7
11
  icon?: ReactNode | string;
@@ -19,8 +23,13 @@ type AccordionProps = {
19
23
  topOffset?: string;
20
24
  getInitialOpenFromUrl?: (id: string, parentIds: string[]) => boolean;
21
25
  onUrlStateChange?: (isOpen: boolean, id: string | undefined, parentIds: string[]) => void;
26
+ /**
27
+ * Custom keyboard event handler for the accordion.
28
+ * @remarks For internal use.
29
+ */
30
+ _onKeyDownCapture?: (e: React.KeyboardEvent<HTMLDetailsElement>) => void;
22
31
  };
23
- declare const Accordion: ({ title, description, defaultOpen, icon, iconType, children, className, _disabled, trackOpen, trackClose, onMount, topOffset, getInitialOpenFromUrl, onUrlStateChange, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
32
+ declare const Accordion: ({ title, description, defaultOpen, icon, iconType, children, className, _disabled, trackOpen, trackClose, onMount, topOffset, getInitialOpenFromUrl, onUrlStateChange, _onKeyDownCapture, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
24
33
  export { Accordion };
25
34
  export type { AccordionProps };
26
35
  //# sourceMappingURL=accordion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAKnD,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC;IACrE,gBAAgB,CAAC,EAAE,CACjB,MAAM,EAAE,OAAO,EACf,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,SAAS,EAAE,MAAM,EAAE,KAChB,IAAI,CAAC;CACX,CAAC;AAEF,QAAA,MAAM,SAAS,GAAI,0KAehB,cAAc,4CAmChB,CAAC;AAuIF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;A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indresorhus_slugify@2.2.1/node_modules/@sindresorhus/slugify/index.js";
3
- import { useId as $, useContext as h, createContext as j, useState as C, useRef as E, useEffect as z } from "react";
4
- import { Classes as G } from "../../constants/selectors.js";
1
+ import { jsx as u, jsxs as T } from "react/jsx-runtime";
2
+ import $ from "../../node_modules/.pnpm/@sindresorhus_slugify@2.2.1/node_modules/@sindresorhus/slugify/index.js";
3
+ import { useId as h, useContext as j, createContext as C, useState as E, useRef as z, useEffect as G } from "react";
4
+ import { Classes as S } from "../../constants/selectors.js";
5
5
  import { cn as H } from "../../utils/cn.js";
6
6
  import { AccordionCover as P } from "./accordion-cover.js";
7
- import { CONNECTING_CHARACTER as S } from "./accordion-url-utils.js";
8
- import { Icon as _ } from "../icon/icon.js";
9
- const X = ({
7
+ import { CONNECTING_CHARACTER as q } from "./accordion-url-utils.js";
8
+ import { Icon as B } from "../icon/icon.js";
9
+ const Z = ({
10
10
  title: r,
11
- description: l,
11
+ description: b,
12
12
  defaultOpen: c = !1,
13
13
  icon: d,
14
14
  iconType: i,
15
- children: b,
16
- className: x,
17
- _disabled: I,
18
- trackOpen: t,
15
+ children: x,
16
+ className: g,
17
+ _disabled: y,
18
+ trackOpen: s,
19
19
  trackClose: f,
20
- onMount: s,
20
+ onMount: n,
21
21
  topOffset: a,
22
- getInitialOpenFromUrl: g,
23
- onUrlStateChange: e
24
- }) => /* @__PURE__ */ u(
25
- q,
26
- {
27
- _disabled: I,
28
- className: x,
29
- defaultOpen: c === !0 || typeof c == "string" && c === "true",
30
- description: l,
31
- getInitialOpenFromUrl: g,
32
- icon: typeof d == "string" ? /* @__PURE__ */ u(_, { className: "size-4", icon: d, iconType: i }) : d,
33
- onChange: (p) => {
34
- p ? t == null || t({ title: r }) : f == null || f({ title: r });
35
- },
36
- onMount: s,
37
- onUrlStateChange: e,
38
- title: r,
39
- topOffset: a,
40
- children: b
41
- }
42
- ), A = j({ parentIds: [] }), q = ({
22
+ getInitialOpenFromUrl: p,
23
+ onUrlStateChange: I,
24
+ _onKeyDownCapture: e
25
+ }) => {
26
+ const o = typeof r == "string" ? r : "";
27
+ return /* @__PURE__ */ u(
28
+ D,
29
+ {
30
+ _disabled: y,
31
+ _onKeyDownCapture: e,
32
+ className: g,
33
+ defaultOpen: c === !0 || typeof c == "string" && c === "true",
34
+ description: b,
35
+ getInitialOpenFromUrl: p,
36
+ icon: typeof d == "string" ? /* @__PURE__ */ u(B, { className: "size-4", icon: d, iconType: i }) : d,
37
+ onChange: (m) => {
38
+ m ? s == null || s({ title: o }) : f == null || f({ title: o });
39
+ },
40
+ onMount: n,
41
+ onUrlStateChange: I,
42
+ title: r,
43
+ topOffset: a,
44
+ children: x
45
+ }
46
+ );
47
+ }, N = C({ parentIds: [] }), D = ({
43
48
  title: r,
44
- description: l,
49
+ description: b,
45
50
  defaultOpen: c = !1,
46
51
  icon: d,
47
52
  onChange: i,
48
- children: b,
49
- className: x,
50
- _disabled: I,
51
- onMount: t,
53
+ children: x,
54
+ className: g,
55
+ _disabled: y,
56
+ onMount: s,
52
57
  topOffset: f,
53
- getInitialOpenFromUrl: s,
54
- onUrlStateChange: a
58
+ getInitialOpenFromUrl: n,
59
+ onUrlStateChange: a,
60
+ _onKeyDownCapture: p
55
61
  }) => {
56
- const g = $(), e = typeof r == "string" ? T(r.split(S).join("-"), {
62
+ const I = h(), e = typeof r == "string" ? $(r.split(q).join("-"), {
57
63
  decamelize: !1
58
- }) : g, n = h(A), v = s && e && s(e, n.parentIds) === !0 ? !0 : c, [p, y] = C(v), m = E(v);
59
- z(() => {
60
- s && e && s(e, n.parentIds) === !0 && !m.current && (y(!0), m.current = !0), t == null || t();
64
+ }) : I, o = j(N), v = n && e && n(e, o.parentIds) === !0 ? !0 : c, [R, m] = E(v), l = z(v);
65
+ G(() => {
66
+ n && e && n(e, o.parentIds) === !0 && !l.current && (m(!0), l.current = !0), s == null || s();
61
67
  }, []);
62
- const N = (o) => {
63
- y(o), m.current = o, !I && a && a(
64
- o,
68
+ const w = (t) => {
69
+ m(t), l.current = t, !y && a && a(
70
+ t,
65
71
  typeof r == "string" ? e : void 0,
66
- n.parentIds
67
- ), i == null || i(o);
72
+ o.parentIds
73
+ ), i == null || i(t);
68
74
  };
69
75
  return /* @__PURE__ */ u(
70
- A.Provider,
76
+ N.Provider,
71
77
  {
72
78
  value: {
73
- ...n,
79
+ ...o,
74
80
  parentIds: [
75
- ...n.parentIds,
81
+ ...o.parentIds,
76
82
  ...typeof r == "string" ? [e] : []
77
83
  ]
78
84
  },
79
- children: /* @__PURE__ */ w(
85
+ children: /* @__PURE__ */ T(
80
86
  "details",
81
87
  {
82
88
  className: H(
83
- G.Accordion,
89
+ S.Accordion,
84
90
  "mb-3 cursor-default overflow-hidden rounded-2xl border border-stone-200/70 bg-white dark:border-white/10 dark:bg-[#0b0c0e]",
85
- x
91
+ g
86
92
  ),
87
93
  "data-component-part": "accordion",
88
- onToggle: (o) => {
89
- const R = o.currentTarget.open;
90
- R !== m.current && N(R);
94
+ ...p && { onKeyDownCapture: p },
95
+ onToggle: (t) => {
96
+ const A = t.currentTarget.open;
97
+ A !== l.current && w(A);
91
98
  },
92
- open: p,
99
+ open: R,
93
100
  children: [
94
101
  /* @__PURE__ */ u(
95
102
  P,
96
103
  {
97
- description: l,
104
+ description: b,
98
105
  icon: d,
99
106
  id: e,
100
- open: p,
107
+ open: R,
101
108
  title: r,
102
109
  topOffset: f
103
110
  }
@@ -110,7 +117,7 @@ const X = ({
110
117
  "data-component-part": "accordion-content",
111
118
  id: `${e}-accordion-children`,
112
119
  role: "region",
113
- children: b
120
+ children: x
114
121
  }
115
122
  )
116
123
  ]
@@ -121,5 +128,5 @@ const X = ({
121
128
  );
122
129
  };
123
130
  export {
124
- X as Accordion
131
+ Z as Accordion
125
132
  };
@@ -1,4 +1,4 @@
1
- export declare const Accordion: (({ title, description, defaultOpen, icon, iconType, children, className, _disabled, trackOpen, trackClose, onMount, topOffset, getInitialOpenFromUrl, onUrlStateChange, }: import('./accordion').AccordionProps) => import("react/jsx-runtime").JSX.Element) & {
1
+ export declare const Accordion: (({ title, description, defaultOpen, icon, iconType, children, className, _disabled, trackOpen, trackClose, onMount, topOffset, getInitialOpenFromUrl, onUrlStateChange, _onKeyDownCapture, }: import('./accordion').AccordionProps) => import("react/jsx-runtime").JSX.Element) & {
2
2
  Group: ({ children, className }: import('./accordion-group').AccordionGroupProps) => import("react/jsx-runtime").JSX.Element;
3
3
  };
4
4
  export type { AccordionProps } from './accordion';
@@ -24,31 +24,31 @@ const I = {
24
24
  color: g = "gray",
25
25
  shape: x = "rounded",
26
26
  variant: p,
27
- stroke: u,
27
+ stroke: k,
28
28
  disabled: r = !1,
29
- size: k = "md",
29
+ size: u = "md",
30
30
  leadIcon: F,
31
31
  tailIcon: E,
32
32
  icon: m,
33
33
  iconType: D,
34
34
  iconLibrary: A = "fontawesome",
35
- onClick: t,
36
- href: e
35
+ onClick: a,
36
+ href: d
37
37
  }) => {
38
- const v = p ?? (u ? "outline" : "solid"), f = E ?? m, b = (a, C) => {
39
- if (!a)
38
+ const v = p ?? (k ? "outline" : "solid"), f = E ?? m, b = (t, C) => {
39
+ if (!t)
40
40
  return null;
41
- const i = typeof a == "string", h = i ? /* @__PURE__ */ o(
41
+ const i = typeof t == "string", h = i ? /* @__PURE__ */ o(
42
42
  B,
43
43
  {
44
44
  className: "shrink-0",
45
- icon: a,
45
+ icon: t,
46
46
  iconLibrary: A,
47
47
  iconType: D,
48
48
  overrideColor: !0,
49
49
  overrideSize: !0
50
50
  }
51
- ) : a;
51
+ ) : t;
52
52
  return /* @__PURE__ */ o(
53
53
  "span",
54
54
  {
@@ -57,24 +57,24 @@ const I = {
57
57
  children: h
58
58
  }
59
59
  );
60
- }, y = !!(t || e), d = (
60
+ }, y = !!(a || d), e = (
61
61
  // biome-ignore lint/style/noNestedTernary: ignore
62
- e && !r ? "a" : t && !r ? "button" : "span"
62
+ d && !r ? "a" : a && !r ? "button" : "span"
63
63
  ), l = {
64
64
  "data-shape": x,
65
65
  "data-variant": v,
66
- "data-disabled": r,
66
+ "data-disabled": r || void 0,
67
67
  className: z(
68
- 'relative inline-flex w-fit items-center font-medium data-[disabled="true"]:cursor-not-allowed',
68
+ "relative inline-flex w-fit items-center font-medium data-disabled:cursor-not-allowed",
69
69
  "data-[shape='pill']:rounded-full",
70
70
  "data-[variant='outline']:outline-1 data-[variant='outline']:outline-[rgba(11,12,14,0.08)] data-[variant='outline']:outline-solid data-[variant='outline']:-outline-offset-1 dark:data-[variant='outline']:outline-[rgba(255,255,255,0.14)]",
71
- 'bg-(--color-bg) text-(--color-text) data-[disabled="true"]:bg-(--color-bg-disabled) data-[disabled="true"]:text-(--color-text-disabled)',
72
- '[&_[data-component-part$="-icon"][data-icon-type="string"]_svg]:bg-(--color-text) data-[disabled="true"]:[&_[data-component-part$="-icon"][data-icon-type="string"]_svg]:bg-(--color-text-disabled)',
71
+ "bg-(--color-bg) text-(--color-text) data-disabled:bg-(--color-bg-disabled) data-disabled:text-(--color-text-disabled)",
72
+ '[&_[data-component-part$="-icon"][data-icon-type="string"]_svg]:bg-(--color-text) data-disabled:[&_[data-component-part$="-icon"][data-icon-type="string"]_svg]:bg-(--color-text-disabled)',
73
73
  '[&_[data-component-part$="-icon"][data-icon-type="inline"]_svg]:fill-current',
74
- I[k],
74
+ I[u],
75
75
  $[g],
76
76
  y && !r && "cursor-pointer transition-opacity hover:opacity-80",
77
- d === "button" && "border-0",
77
+ e === "button" && "border-0",
78
78
  n
79
79
  )
80
80
  }, c = /* @__PURE__ */ _(w, { children: [
@@ -82,7 +82,7 @@ const I = {
82
82
  s,
83
83
  b(f, "tail")
84
84
  ] });
85
- return d === "a" ? /* @__PURE__ */ o("a", { ...l, href: e, onClick: t, children: c }) : d === "button" ? /* @__PURE__ */ o("button", { ...l, onClick: t, type: "button", children: c }) : /* @__PURE__ */ o("span", { ...l, children: c });
85
+ return e === "a" ? /* @__PURE__ */ o("a", { ...l, href: d, onClick: a, children: c }) : e === "button" ? /* @__PURE__ */ o("button", { ...l, onClick: a, type: "button", children: c }) : /* @__PURE__ */ o("span", { ...l, children: c });
86
86
  };
87
87
  export {
88
88
  P as Badge
@@ -1,7 +1,11 @@
1
1
  import { default as React, ComponentPropsWithoutRef, ElementType, ReactNode, Ref } from 'react';
2
2
  import { IconLibrary, IconType } from '../../utils/icon-utils';
3
3
  interface CardPropsBase<T> {
4
- title?: string;
4
+ /**
5
+ * @remarks Prefer using a string value for better compatibility with accessibility and semantic HTML.
6
+ * ReactNode is supported for internal use only.
7
+ */
8
+ title?: ReactNode;
5
9
  icon?: ReactNode;
6
10
  img?: string;
7
11
  horizontal?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EAEX,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGhE,UAAU,aAAa,CAAC,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,KAAK,SAAS,CAAC,CAAC,SAAS,WAAW,IAAI,aAAa,CAAC,CAAC,CAAC,GACtD,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,a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+1,25 @@
1
1
  import { jsx as e, jsxs as p, Fragment as y } from "react/jsx-runtime";
2
2
  import { Classes as j } from "../../constants/selectors.js";
3
3
  import { ArrowRightIcon as C } from "../../icons/index.js";
4
- import { cn as o } from "../../utils/cn.js";
4
+ import { cn as a } from "../../utils/cn.js";
5
5
  import { isRemoteUrl as I } from "../../utils/is-remote-url.js";
6
6
  import A from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-up-right.js";
7
7
  import { Icon as R } from "../icon/icon.js";
8
8
  const L = ({
9
- title: a,
9
+ title: o,
10
10
  icon: r,
11
11
  iconType: n,
12
- iconLibrary: h,
12
+ iconLibrary: f,
13
13
  color: d,
14
14
  horizontal: s,
15
- href: f,
16
- img: x,
17
- children: g,
15
+ href: h,
16
+ img: g,
17
+ children: x,
18
18
  disabled: i,
19
19
  cta: c,
20
20
  arrow: t,
21
21
  as: v,
22
- className: l
22
+ className: m
23
23
  }) => {
24
24
  const b = typeof r == "string" ? /* @__PURE__ */ e(
25
25
  R,
@@ -27,53 +27,53 @@ const L = ({
27
27
  className: "m-0! size-6 shrink-0",
28
28
  color: d,
29
29
  icon: r,
30
- iconLibrary: h,
30
+ iconLibrary: f,
31
31
  iconType: n,
32
32
  overrideColor: !!d
33
33
  }
34
- ) : r, m = i ? void 0 : f;
34
+ ) : r, l = i ? void 0 : h;
35
35
  return /* @__PURE__ */ e(
36
36
  z,
37
37
  {
38
38
  arrow: t,
39
39
  as: v,
40
- className: o(
41
- m && "hover:border-primary! dark:hover:border-primary-light!",
42
- l
40
+ className: a(
41
+ l && "hover:border-primary! dark:hover:border-primary-light!",
42
+ m
43
43
  ),
44
44
  cta: c,
45
45
  disabled: i,
46
46
  horizontal: s,
47
- href: m,
47
+ href: l,
48
48
  icon: b,
49
- img: x,
50
- title: a,
51
- children: g
49
+ img: g,
50
+ title: o,
51
+ children: x
52
52
  }
53
53
  );
54
54
  }, z = ({
55
- title: a,
55
+ title: o,
56
56
  icon: r,
57
57
  img: n,
58
- className: h,
58
+ className: f,
59
59
  children: d,
60
60
  horizontal: s,
61
- arrow: f,
62
- as: x,
63
- mRef: g,
61
+ arrow: h,
62
+ as: g,
63
+ mRef: x,
64
64
  cta: i,
65
65
  disabled: c,
66
66
  ...t
67
67
  }) => {
68
68
  var u;
69
- const v = c ? "div" : x || (t.href !== void 0 ? "a" : "div"), l = I(t.href ?? ""), b = l ? { target: "_blank", rel: "noreferrer" } : {}, m = f ?? l, k = typeof r == "string", w = n ? ((u = n.match(/\/([^/]+)\.[^.]+$/)) == null ? void 0 : u[1]) ?? "" : "", N = /* @__PURE__ */ e(y, { children: r ? (
69
+ const v = c ? "div" : g || (t.href !== void 0 ? "a" : "div"), m = I(t.href ?? ""), b = m ? { target: "_blank", rel: "noreferrer" } : {}, l = h ?? m, k = typeof r == "string", w = n ? ((u = n.match(/\/([^/]+)\.[^.]+$/)) == null ? void 0 : u[1]) ?? "" : "", N = /* @__PURE__ */ e(y, { children: r ? (
70
70
  // biome-ignore lint/style/noNestedTernary: TODO
71
71
  k ? (
72
72
  // biome-ignore lint/correctness/useImageSize: TODO
73
73
  /* @__PURE__ */ e(
74
74
  "img",
75
75
  {
76
- alt: a,
76
+ alt: typeof o == "string" ? o : "",
77
77
  className: "size-6 object-cover object-center",
78
78
  "data-component-part": "card-icon",
79
79
  src: r
@@ -91,16 +91,16 @@ const L = ({
91
91
  return /* @__PURE__ */ p(
92
92
  v,
93
93
  {
94
- className: o(
94
+ className: a(
95
95
  j.Card,
96
96
  "group relative my-2 block w-full overflow-hidden rounded-2xl border border-stone-950/10 bg-white font-normal ring-2 ring-transparent dark:border-white/10 dark:bg-background-dark",
97
97
  t.href && "cursor-pointer",
98
98
  t.href && "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary dark:focus-visible:ring-primary-light",
99
- h
99
+ f
100
100
  ),
101
101
  ...b,
102
102
  ...t,
103
- ref: g,
103
+ ref: x,
104
104
  children: [
105
105
  n && // biome-ignore lint/correctness/useImageSize: TODO
106
106
  /* @__PURE__ */ e(
@@ -115,7 +115,7 @@ const L = ({
115
115
  /* @__PURE__ */ p(
116
116
  "div",
117
117
  {
118
- className: o(
118
+ className: a(
119
119
  "relative px-6 py-5",
120
120
  s && "flex items-center gap-x-4"
121
121
  ),
@@ -125,9 +125,9 @@ const L = ({
125
125
  "div",
126
126
  {
127
127
  "aria-hidden": "true",
128
- className: o(
128
+ className: a(
129
129
  "absolute top-5 right-5 text-stone-400 group-hover:text-primary dark:text-stone-500 dark:group-hover:text-primary-light",
130
- !m && "hidden"
130
+ !l && "hidden"
131
131
  ),
132
132
  "data-component-part": "card-arrow",
133
133
  children: /* @__PURE__ */ e(A, { className: "size-4" })
@@ -135,24 +135,24 @@ const L = ({
135
135
  ),
136
136
  N,
137
137
  /* @__PURE__ */ p("div", { className: "min-w-0 flex-1", children: [
138
- a && /* @__PURE__ */ e(
138
+ o && /* @__PURE__ */ e(
139
139
  "h2",
140
140
  {
141
- className: o(
141
+ className: a(
142
142
  "not-prose wrap-break-word font-semibold text-base text-stone-800 dark:text-white",
143
143
  r != null && !s && "mt-4"
144
144
  ),
145
145
  contentEditable: !1,
146
146
  "data-component-part": "card-title",
147
- children: a
147
+ children: o
148
148
  }
149
149
  ),
150
150
  /* @__PURE__ */ e(
151
151
  "div",
152
152
  {
153
- className: o(
153
+ className: a(
154
154
  "prose wrap-break-word mt-1 font-normal text-base leading-6",
155
- a ? "text-stone-600 dark:text-stone-400" : "text-stone-700 dark:text-stone-300",
155
+ o ? "text-stone-600 dark:text-stone-400" : "text-stone-700 dark:text-stone-300",
156
156
  s && "mt-0 leading-6"
157
157
  ),
158
158
  "data-component-part": "card-content",
@@ -162,7 +162,7 @@ const L = ({
162
162
  i && /* @__PURE__ */ e("div", { className: "mt-8", "data-component-part": "card-cta", children: /* @__PURE__ */ p(
163
163
  "span",
164
164
  {
165
- className: o(
165
+ className: a(
166
166
  "flex flex-row items-center gap-2 text-left font-medium text-sm text-stone-600 dark:text-stone-400",
167
167
  !c && "group-hover:text-primary group-hover:dark:text-primary-light",
168
168
  c && "opacity-50"
@@ -42,7 +42,7 @@ const y = ({
42
42
  x,
43
43
  {
44
44
  className: a(
45
- "relative max-h-96 min-w-[var(--anchor-width)] overflow-y-auto rounded-2xl border-standard bg-white p-1 text-stone-950/70 shadow-stone-500/5 shadow-xl dark:bg-stone-950 dark:text-white/70 dark:shadow-none dark:shadow-stone-500/5",
45
+ "relative max-h-96 min-w-(--anchor-width) overflow-y-auto rounded-2xl border-standard bg-white p-1 text-stone-950/70 shadow-stone-500/5 shadow-xl dark:bg-stone-950 dark:text-white/70 dark:shadow-none dark:shadow-stone-500/5",
46
46
  "data-[ending-style]:fade-out-0 data-[starting-style]:fade-in-0 data-[ending-style]:zoom-out-95 data-[starting-style]:zoom-in-95",
47
47
  t
48
48
  ),
@@ -64,7 +64,7 @@ const M = ({
64
64
  w,
65
65
  {
66
66
  className: a(
67
- "group relative flex w-full cursor-pointer select-none items-center justify-between gap-2 rounded-md px-2 py-1 text-sm outline-0 hover:bg-stone-950/[0.03] focus:bg-stone-950/5 data-[disabled]:pointer-events-none data-[disabled]:cursor-default data-[disabled]:opacity-50 dark:focus:bg-white/5 dark:hover:bg-white/[0.03]",
67
+ "group relative flex w-full cursor-pointer select-none items-center justify-between gap-2 rounded-md px-2 py-1 text-sm outline-0 hover:bg-stone-950/3 focus:bg-stone-950/5 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:opacity-50 dark:focus:bg-white/5 dark:hover:bg-white/3",
68
68
  e ? "font-medium text-primary dark:text-primary-light" : "text-stone-950/50 hover:text-stone-950/75 focus:text-stone-950/75 dark:text-white/50 dark:focus:text-white/75 dark:hover:text-white/75",
69
69
  t
70
70
  ),
@@ -1 +1 @@
1
- {"version":3,"file":"mermaid.d.ts","sourceRoot":"","sources":["../../../src/components/mermaid/mermaid.tsx"],"names":[],"mappings":"AAUA,KAAK,gBAAgB,GACjB,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC;AAEnB,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,OAAO,GAAI,sDAMd,YAAY,4CA6Id,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"mermaid.d.ts","sourceRoot":"","sources":["../../../src/components/mermaid/mermaid.tsx"],"names":[],"mappings":"AAYA,KAAK,gBAAgB,GACjB,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC;AAEnB,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,OAAO,GAAI,sDAMd,YAAY,4CAiJd,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC"}