@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.
- package/dist/components/accordion/accordion-cover.js +1 -1
- package/dist/components/accordion/accordion.d.ts +11 -2
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +71 -64
- package/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/badge/badge.js +18 -18
- package/dist/components/card/card.d.ts +5 -1
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +35 -35
- package/dist/components/code-group/dropdown.js +2 -2
- package/dist/components/mermaid/mermaid.d.ts.map +1 -1
- package/dist/components/mermaid/mermaid.js +38 -31
- package/dist/components/steps/steps.d.ts +9 -1
- package/dist/components/steps/steps.d.ts.map +1 -1
- package/dist/components/steps/steps.js +156 -58
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +54 -48
- package/dist/components/tooltip/tooltip.d.ts +3 -2
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +82 -71
- package/dist/components/view/view.d.ts.map +1 -1
- package/dist/components/view/view.js +29 -23
- package/dist/styles.css +1 -1
- package/dist/utils/make-marker-ids-unique.d.ts +3 -0
- package/dist/utils/make-marker-ids-unique.d.ts.map +1 -0
- package/dist/utils/make-marker-ids-unique.js +42 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TooltipPositionerProps } from '@base-ui/react/tooltip';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
type TooltipProps = {
|
|
3
4
|
description?: string;
|
|
@@ -6,8 +7,8 @@ type TooltipProps = {
|
|
|
6
7
|
cta?: string;
|
|
7
8
|
href?: string;
|
|
8
9
|
className?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const Tooltip: ({ description, children, title, cta, href, className, }: TooltipProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
} & Pick<TooltipPositionerProps, "side" | "align">;
|
|
11
|
+
declare const Tooltip: ({ description, children, title, cta, href, className, side, align, }: TooltipProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
12
|
export { Tooltip };
|
|
12
13
|
export type { TooltipProps };
|
|
13
14
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGrE,OAAO,EAAkB,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAO1E,KAAK,YAAY,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,sBAAsB,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;AAEnD,QAAA,MAAM,OAAO,GAAI,sEASd,YAAY,mDA+Gd,CAAC;AAyCF,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,110 +1,121 @@
|
|
|
1
1
|
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Classes as
|
|
4
|
-
import { useHasHover as
|
|
2
|
+
import { useState as k, useMemo as T, isValidElement as d } from "react";
|
|
3
|
+
import { Classes as C } from "../../constants/selectors.js";
|
|
4
|
+
import { useHasHover as N } from "../../hooks/use-has-hover.js";
|
|
5
5
|
import { cn as u } from "../../utils/cn.js";
|
|
6
|
-
import { isRemoteUrl as
|
|
7
|
-
import { renderAsChild as
|
|
8
|
-
import
|
|
9
|
-
import { TooltipProvider as
|
|
10
|
-
import { TooltipRoot as
|
|
11
|
-
import { TooltipTrigger as
|
|
12
|
-
import { TooltipPortal as
|
|
13
|
-
import { TooltipPositioner as
|
|
14
|
-
import { TooltipPopup as
|
|
15
|
-
const
|
|
6
|
+
import { isRemoteUrl as P } from "../../utils/is-remote-url.js";
|
|
7
|
+
import { renderAsChild as w } from "../../utils/render-as-child.js";
|
|
8
|
+
import O from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
9
|
+
import { TooltipProvider as j } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/tooltip/provider/TooltipProvider.js";
|
|
10
|
+
import { TooltipRoot as H } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/tooltip/root/TooltipRoot.js";
|
|
11
|
+
import { TooltipTrigger as R } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTrigger.js";
|
|
12
|
+
import { TooltipPortal as z } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortal.js";
|
|
13
|
+
import { TooltipPositioner as E } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositioner.js";
|
|
14
|
+
import { TooltipPopup as I } from "../../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/tooltip/popup/TooltipPopup.js";
|
|
15
|
+
const X = ({
|
|
16
16
|
description: e,
|
|
17
17
|
children: n,
|
|
18
18
|
title: o,
|
|
19
19
|
cta: p,
|
|
20
20
|
href: a,
|
|
21
|
-
className: c
|
|
21
|
+
className: c,
|
|
22
|
+
side: x = "top",
|
|
23
|
+
align: g = "center"
|
|
22
24
|
}) => {
|
|
23
|
-
const [
|
|
25
|
+
const [b, i] = k(!1), m = N(), r = L(n), v = m ? void 0 : () => {
|
|
24
26
|
i((s) => !s);
|
|
25
|
-
},
|
|
26
|
-
const { reason: f } =
|
|
27
|
+
}, y = (s, _) => {
|
|
28
|
+
const { reason: f } = _;
|
|
27
29
|
if (m) {
|
|
28
30
|
i(s);
|
|
29
31
|
return;
|
|
30
32
|
}
|
|
31
33
|
s ? i(!0) : (f === "escape-key" || f === "outside-press") && i(!1);
|
|
32
|
-
},
|
|
34
|
+
}, h = T(() => {
|
|
33
35
|
if (!r)
|
|
34
36
|
return o && e ? `${o}: ${e}` : o || e;
|
|
35
37
|
}, [o, e, r]);
|
|
36
|
-
return n == null ? null : /* @__PURE__ */ t(
|
|
38
|
+
return n == null ? null : /* @__PURE__ */ t(j, { delay: 0, children: /* @__PURE__ */ l(H, { onOpenChange: y, open: b, children: [
|
|
37
39
|
/* @__PURE__ */ t(
|
|
38
|
-
|
|
40
|
+
R,
|
|
39
41
|
{
|
|
40
|
-
"aria-label":
|
|
42
|
+
"aria-label": h,
|
|
41
43
|
className: u(
|
|
42
44
|
c,
|
|
43
45
|
!r && "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2"
|
|
44
46
|
),
|
|
45
|
-
onClick:
|
|
46
|
-
render: r ?
|
|
47
|
-
children: r ? null :
|
|
47
|
+
onClick: v,
|
|
48
|
+
render: r ? w(n) : void 0,
|
|
49
|
+
children: r ? null : W(n)
|
|
48
50
|
}
|
|
49
51
|
),
|
|
50
|
-
/* @__PURE__ */ t(
|
|
51
|
-
|
|
52
|
+
/* @__PURE__ */ t(z, { children: /* @__PURE__ */ t(
|
|
53
|
+
E,
|
|
52
54
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
55
|
+
align: g,
|
|
56
|
+
collisionPadding: 8,
|
|
57
|
+
side: x,
|
|
58
|
+
sideOffset: 4,
|
|
59
|
+
children: /* @__PURE__ */ l(
|
|
60
|
+
I,
|
|
61
|
+
{
|
|
62
|
+
className: "z-50 flex max-w-[16rem] flex-col gap-1 rounded-xl border border-stone-200 bg-white px-4 py-3 shadow-[0_10px_16px_-3px_rgb(10_10_10/0.05),0_3px_10px_-2px_rgb(10_10_10/0.02)] dark:border-stone-900 dark:bg-stone-950",
|
|
63
|
+
"data-component-part": "tooltip-content",
|
|
64
|
+
children: [
|
|
65
|
+
!!o && /* @__PURE__ */ t(
|
|
66
|
+
"p",
|
|
67
|
+
{
|
|
68
|
+
className: "font-medium text-stone-900 text-xs leading-4 dark:text-stone-200",
|
|
69
|
+
"data-component-part": "tooltip-title",
|
|
70
|
+
children: o
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
!!e && /* @__PURE__ */ t(
|
|
74
|
+
"p",
|
|
75
|
+
{
|
|
76
|
+
className: "text-stone-600 text-xs leading-4 dark:text-stone-400",
|
|
77
|
+
"data-component-part": "tooltip-description",
|
|
78
|
+
children: e
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
p && a && /* @__PURE__ */ l(
|
|
82
|
+
"a",
|
|
83
|
+
{
|
|
84
|
+
href: a,
|
|
85
|
+
...P(a) ? { target: "_blank", rel: "noreferrer" } : {},
|
|
86
|
+
className: "mt-2! flex items-center gap-0.5 rounded-sm font-medium text-stone-600 text-xs leading-4 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 dark:text-stone-400 dark:hover:text-primary-light",
|
|
87
|
+
"data-component-part": "tooltip-cta",
|
|
88
|
+
children: [
|
|
89
|
+
p,
|
|
90
|
+
/* @__PURE__ */ t(
|
|
91
|
+
O,
|
|
92
|
+
{
|
|
93
|
+
"aria-hidden": "true",
|
|
94
|
+
className: "size-3",
|
|
95
|
+
strokeWidth: 2.5
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
)
|
|
93
104
|
}
|
|
94
|
-
) })
|
|
105
|
+
) })
|
|
95
106
|
] }) });
|
|
96
|
-
},
|
|
107
|
+
}, L = (e) => d(e) ? typeof e.type == "function" || typeof e.type == "object" ? !0 : typeof e.type == "string" ? ["button", "a", "input", "select", "textarea"].includes(
|
|
97
108
|
e.type.toLowerCase()
|
|
98
|
-
) : !1 : !1,
|
|
109
|
+
) : !1 : !1, W = (e) => d(e) ? e : /* @__PURE__ */ t(
|
|
99
110
|
"span",
|
|
100
111
|
{
|
|
101
112
|
className: u(
|
|
102
|
-
|
|
113
|
+
C.Tooltip,
|
|
103
114
|
"underline decoration-2 decoration-stone-400 decoration-dotted underline-offset-4 dark:decoration-stone-500"
|
|
104
115
|
),
|
|
105
116
|
children: e
|
|
106
117
|
}
|
|
107
118
|
);
|
|
108
119
|
export {
|
|
109
|
-
|
|
120
|
+
X as Tooltip
|
|
110
121
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/components/view/view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/components/view/view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAwB,MAAM,OAAO,CAAC;AAK5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAEF,KAAK,SAAS,GAAG,aAAa,GAC5B,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,aAAa,CAAC,CAAC;AAE7D,QAAA,MAAM,IAAI,sPA4BT,CAAC;AAIF,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Classes as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l, useState as c } from "react";
|
|
3
|
+
import { Classes as d } from "../../constants/selectors.js";
|
|
4
|
+
import { useIsomorphicLayoutEffect as w } from "../../hooks/use-isomorphic-layout-effect.js";
|
|
5
|
+
import { cn as V } from "../../utils/cn.js";
|
|
6
|
+
const v = l(
|
|
7
|
+
({ children: t, title: r, items: o, className: i, ...s }, m) => {
|
|
8
|
+
var e;
|
|
9
|
+
const [f, a] = c(!1);
|
|
10
|
+
w(() => {
|
|
11
|
+
a(!0);
|
|
12
|
+
}, []);
|
|
13
|
+
const n = (e = o.find((p) => p.title === r)) == null ? void 0 : e.active;
|
|
14
|
+
return f && n ? /* @__PURE__ */ u(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: V(
|
|
18
|
+
d.MultiViewItem,
|
|
19
|
+
"prose dark:prose-invert",
|
|
20
|
+
i
|
|
21
|
+
),
|
|
22
|
+
ref: m,
|
|
23
|
+
...s,
|
|
24
|
+
children: t
|
|
25
|
+
}
|
|
26
|
+
) : null;
|
|
27
|
+
}
|
|
22
28
|
);
|
|
23
|
-
|
|
29
|
+
v.displayName = "View";
|
|
24
30
|
export {
|
|
25
|
-
|
|
31
|
+
v as View
|
|
26
32
|
};
|