@mintlify/components 1.0.8 → 1.0.10
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/code-group/code-group-select.d.ts +24 -0
- package/dist/components/code-group/code-group-select.d.ts.map +1 -0
- package/dist/components/code-group/code-group-select.js +109 -0
- package/dist/components/code-group/code-select-dropdown.d.ts +1 -3
- package/dist/components/code-group/code-select-dropdown.d.ts.map +1 -1
- package/dist/components/code-group/code-select-dropdown.js +41 -0
- package/dist/components/code-group/dropdown.d.ts +1 -1
- package/dist/components/code-group/dropdown.d.ts.map +1 -1
- package/dist/components/code-group/dropdown.js +10 -10
- package/dist/components/code-group/index.d.ts +4 -0
- package/dist/components/code-group/index.d.ts.map +1 -1
- package/dist/components/property/index.d.ts +2 -0
- package/dist/components/property/index.d.ts.map +1 -1
- package/dist/components/property/pills.d.ts +7 -4
- package/dist/components/property/pills.d.ts.map +1 -1
- package/dist/components/property/pills.js +1 -1
- package/dist/index.js +75 -64
- package/dist/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/floating-ui-react/components/FloatingPortal.js +6 -6
- package/dist/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/floating-ui-react/utils/element.js +1 -1
- package/dist/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/menu/root/MenuRoot.js +4 -4
- package/dist/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/menu/trigger/MenuTrigger.js +3 -3
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +3 -3
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +4 -4
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CodeBlockTheme, CodeStyling } from '../../utils/shiki/code-styling';
|
|
3
|
+
import { CopyToClipboardButtonProps } from '../code-block/copy-button';
|
|
4
|
+
type ExampleCodeSnippet = {
|
|
5
|
+
filename: string;
|
|
6
|
+
code: string;
|
|
7
|
+
language: string;
|
|
8
|
+
audioUrl?: string;
|
|
9
|
+
};
|
|
10
|
+
interface CodeGroupSelectProps {
|
|
11
|
+
snippets: Record<string, Record<string, ExampleCodeSnippet>>;
|
|
12
|
+
className?: string;
|
|
13
|
+
syncedLabel?: string;
|
|
14
|
+
setSyncedLabel?: (label: string) => void;
|
|
15
|
+
setSelectedExampleIndex?: (index: number) => void;
|
|
16
|
+
askAiButton?: ReactNode;
|
|
17
|
+
codeBlockTheme?: CodeBlockTheme;
|
|
18
|
+
codeBlockThemeObject?: CodeStyling;
|
|
19
|
+
codeSnippetAriaLabel?: string;
|
|
20
|
+
copyButtonProps?: CopyToClipboardButtonProps;
|
|
21
|
+
}
|
|
22
|
+
declare const CodeGroupSelect: ({ snippets, syncedLabel, setSyncedLabel, setSelectedExampleIndex, askAiButton, codeBlockTheme, codeBlockThemeObject, codeSnippetAriaLabel, copyButtonProps, className, }: CodeGroupSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { type ExampleCodeSnippet, type CodeGroupSelectProps, CodeGroupSelect };
|
|
24
|
+
//# sourceMappingURL=code-group-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-group-select.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/code-group-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AAKnC,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,oBAAoB,CAAC,EAAE,WAAW,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,0BAA0B,CAAC;CAC9C;AAED,QAAA,MAAM,eAAe,GAAI,0KAWtB,oBAAoB,4CA0HtB,CAAC;AAEF,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { jsxs as v, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as e, useMemo as U, useEffect as B } from "react";
|
|
3
|
+
import { cn as F } from "../../utils/cn.js";
|
|
4
|
+
import { BaseCodeBlock as M } from "../code-block/base-code-block.js";
|
|
5
|
+
import { CopyToClipboardButton as R } from "../code-block/copy-button.js";
|
|
6
|
+
import { CodeSelectDropdown as j } from "./code-select-dropdown.js";
|
|
7
|
+
const q = "Code snippet", W = ({
|
|
8
|
+
snippets: s,
|
|
9
|
+
syncedLabel: f,
|
|
10
|
+
setSyncedLabel: l,
|
|
11
|
+
setSelectedExampleIndex: c,
|
|
12
|
+
askAiButton: N,
|
|
13
|
+
codeBlockTheme: O = "system",
|
|
14
|
+
codeBlockThemeObject: k,
|
|
15
|
+
codeSnippetAriaLabel: G = q,
|
|
16
|
+
copyButtonProps: T,
|
|
17
|
+
className: _
|
|
18
|
+
}) => {
|
|
19
|
+
const a = Object.keys(s), [h, A] = e(a[0]), w = h && a.includes(h) ? h : a[0], t = w !== void 0 ? s[w] : void 0, o = U(
|
|
20
|
+
() => t ? Object.keys(t) : void 0,
|
|
21
|
+
[t]
|
|
22
|
+
), [g, m] = e(o == null ? void 0 : o[0]), d = g && (o != null && o.includes(g)) ? g : o == null ? void 0 : o[0], r = t !== void 0 && d !== void 0 ? t[d] : void 0, D = (i) => {
|
|
23
|
+
A(i);
|
|
24
|
+
const n = (s[i] ? Object.keys(s[i]) : [])[0];
|
|
25
|
+
n !== void 0 && (m(n), c == null || c(0), n !== f && (l == null || l(n)));
|
|
26
|
+
}, P = (i) => {
|
|
27
|
+
m(i);
|
|
28
|
+
const C = (o == null ? void 0 : o.indexOf(i)) ?? -1;
|
|
29
|
+
c == null || c(C === -1 ? 0 : C), i !== f && (l == null || l(i));
|
|
30
|
+
};
|
|
31
|
+
return B(() => {
|
|
32
|
+
if (f && f !== d && (o != null && o.includes(f))) {
|
|
33
|
+
m(f);
|
|
34
|
+
const i = (o == null ? void 0 : o.indexOf(f)) ?? -1;
|
|
35
|
+
c == null || c(i === -1 ? 0 : i);
|
|
36
|
+
}
|
|
37
|
+
}, [f, o, d, c]), /* @__PURE__ */ v(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: F(
|
|
41
|
+
"not-prose relative flex min-w-full max-w-full flex-col overflow-hidden rounded-2xl p-0.5 text-xs leading-6",
|
|
42
|
+
"border border-gray-950/10 bg-gray-50 dark:border-white/10 dark:bg-white/5",
|
|
43
|
+
_
|
|
44
|
+
),
|
|
45
|
+
"data-testid": "code-group-select",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ v("div", { className: "flex w-full justify-between rounded-t-2xl text-xs leading-6", children: [
|
|
48
|
+
/* @__PURE__ */ u(
|
|
49
|
+
j,
|
|
50
|
+
{
|
|
51
|
+
options: a,
|
|
52
|
+
selectedOption: w,
|
|
53
|
+
setSelectedOption: D
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ v("div", { className: "flex overflow-hidden", children: [
|
|
57
|
+
o && /* @__PURE__ */ u(
|
|
58
|
+
j,
|
|
59
|
+
{
|
|
60
|
+
options: o,
|
|
61
|
+
selectedOption: d,
|
|
62
|
+
setSelectedOption: P
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ v(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: "flex items-center gap-1.5 pr-2.5",
|
|
69
|
+
"data-testid": "code-group-select-copy-button",
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ u(
|
|
72
|
+
R,
|
|
73
|
+
{
|
|
74
|
+
codeBlockTheme: O,
|
|
75
|
+
textToCopy: (r == null ? void 0 : r.code) ?? "",
|
|
76
|
+
...T
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
N && N
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] })
|
|
84
|
+
] }),
|
|
85
|
+
/* @__PURE__ */ u(
|
|
86
|
+
"section",
|
|
87
|
+
{
|
|
88
|
+
"aria-label": G,
|
|
89
|
+
className: "flex flex-1 overflow-hidden",
|
|
90
|
+
children: /* @__PURE__ */ u("div", { className: "relative h-full max-h-full w-full min-w-full max-w-full", children: r != null && r.audioUrl ? /* @__PURE__ */ u("div", { className: "p-4", children: /* @__PURE__ */ u("audio", { className: "w-full", controls: !0, src: r.audioUrl, children: /* @__PURE__ */ u("track", { kind: "captions" }) }) }) : /* @__PURE__ */ u(
|
|
91
|
+
M,
|
|
92
|
+
{
|
|
93
|
+
codeBlockTheme: O,
|
|
94
|
+
codeBlockThemeObject: k ?? O,
|
|
95
|
+
isParentCodeGroup: !0,
|
|
96
|
+
isSmallText: !0,
|
|
97
|
+
language: r == null ? void 0 : r.language,
|
|
98
|
+
children: r == null ? void 0 : r.code
|
|
99
|
+
}
|
|
100
|
+
) })
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
export {
|
|
108
|
+
W as CodeGroupSelect
|
|
109
|
+
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { CodeBlockTheme } from '../../utils/shiki/code-styling';
|
|
2
1
|
type CodeSelectDropdownProps = {
|
|
3
2
|
selectedOption?: string;
|
|
4
3
|
setSelectedOption: (option: string) => void;
|
|
5
4
|
options: string[];
|
|
6
|
-
codeBlockTheme?: CodeBlockTheme;
|
|
7
5
|
};
|
|
8
|
-
declare const CodeSelectDropdown: ({ selectedOption, setSelectedOption, options,
|
|
6
|
+
declare const CodeSelectDropdown: ({ selectedOption, setSelectedOption, options, }: CodeSelectDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
7
|
export { CodeSelectDropdown };
|
|
10
8
|
//# sourceMappingURL=code-select-dropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-select-dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/code-select-dropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code-select-dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/code-select-dropdown.tsx"],"names":[],"mappings":"AAWA,KAAK,uBAAuB,GAAG;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,kBAAkB,GAAI,iDAIzB,uBAAuB,4CAiCzB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "../../utils/cn.js";
|
|
3
|
+
import { DropdownMenu as p, DropdownMenuTrigger as s, DropdownMenuContent as l, DropdownMenuItem as h } from "./dropdown.js";
|
|
4
|
+
import g from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
5
|
+
const b = ({
|
|
6
|
+
selectedOption: t,
|
|
7
|
+
setSelectedOption: m,
|
|
8
|
+
options: a
|
|
9
|
+
}) => {
|
|
10
|
+
const n = a.length > 1;
|
|
11
|
+
return /* @__PURE__ */ o(p, { children: [
|
|
12
|
+
/* @__PURE__ */ e(
|
|
13
|
+
s,
|
|
14
|
+
{
|
|
15
|
+
className: "min-w-16 select-none bg-transparent px-2 py-[5px] font-medium text-primary text-xs dark:bg-transparent dark:text-primary-light",
|
|
16
|
+
disabled: !n,
|
|
17
|
+
children: /* @__PURE__ */ o("div", { className: "flex min-w-16 items-center gap-1.5 rounded-lg px-2 py-1 group-hover:bg-primary/10 dark:group-hover:bg-primary-light/10", children: [
|
|
18
|
+
/* @__PURE__ */ e("p", { className: "truncate", children: t }),
|
|
19
|
+
n && /* @__PURE__ */ e(g, { className: "min-w-3", size: 12 })
|
|
20
|
+
] })
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
/* @__PURE__ */ e(l, { className: "overflow-y-auto border border-stone-200/70 bg-stone-50 dark:border-stone-800/50 dark:bg-[#0F1117]", children: a.map((r, d) => /* @__PURE__ */ e(
|
|
24
|
+
h,
|
|
25
|
+
{
|
|
26
|
+
className: i(
|
|
27
|
+
"rounded-xl py-1.5 text-xs",
|
|
28
|
+
"hover:bg-primary/10 hover:text-primary dark:hover:bg-primary-light/10 dark:hover:text-primary-light",
|
|
29
|
+
r === t && "font-medium text-primary dark:text-primary-light",
|
|
30
|
+
r !== t && "text-stone-500 dark:text-white/50"
|
|
31
|
+
),
|
|
32
|
+
onSelect: () => m(r),
|
|
33
|
+
children: r
|
|
34
|
+
},
|
|
35
|
+
`Option${d}${r}`
|
|
36
|
+
)) })
|
|
37
|
+
] });
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
b as CodeSelectDropdown
|
|
41
|
+
};
|
|
@@ -30,5 +30,5 @@ declare const DropdownMenuItem: {
|
|
|
30
30
|
({ className, isSelected, children, onSelect, onClick, ...props }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
displayName: string;
|
|
32
32
|
};
|
|
33
|
-
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, };
|
|
33
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, type DropdownMenuProps, type DropdownMenuContentProps, type DropdownMenuItemProps, type DropdownMenuTriggerProps, };
|
|
34
34
|
//# sourceMappingURL=dropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,QAAA,MAAM,YAAY;uCAAsC,iBAAiB;;CAIxE,CAAC;AAGF,KAAK,wBAAwB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AAE9E,QAAA,MAAM,mBAAmB;wCAItB,wBAAwB;;CAW1B,CAAC;AAGF,KAAK,wBAAwB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,mBAAmB;iDAKtB,wBAAwB;;CAmB1B,CAAC;AAGF,KAAK,qBAAqB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,gBAAgB;uEAOnB,qBAAqB;;CAwBvB,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,QAAA,MAAM,YAAY;uCAAsC,iBAAiB;;CAIxE,CAAC;AAGF,KAAK,wBAAwB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AAE9E,QAAA,MAAM,mBAAmB;wCAItB,wBAAwB;;CAW1B,CAAC;AAGF,KAAK,wBAAwB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,mBAAmB;iDAKtB,wBAAwB;;CAmB1B,CAAC;AAGF,KAAK,qBAAqB,GAAG,wBAAwB,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,gBAAgB;uEAOnB,qBAAqB;;CAwBvB,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,GAC9B,CAAC"}
|
|
@@ -2,11 +2,11 @@ import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn as a } from "../../utils/cn.js";
|
|
3
3
|
import p from "../../node_modules/.pnpm/lucide-react@0.453.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js";
|
|
4
4
|
import { MenuRoot as u } 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/menu/root/MenuRoot.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { MenuPortal as l } 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/menu/portal/MenuPortal.js";
|
|
6
|
+
import { MenuPositioner 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/menu/positioner/MenuPositioner.js";
|
|
7
|
+
import { MenuPopup as g } 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/menu/popup/MenuPopup.js";
|
|
8
|
+
import { MenuItem as x } 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/menu/item/MenuItem.js";
|
|
9
|
+
import { MenuTrigger as w } 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/menu/trigger/MenuTrigger.js";
|
|
10
10
|
const f = ({ children: t, open: e, onOpenChange: o }) => /* @__PURE__ */ r(u, { onOpenChange: o, open: e, children: t });
|
|
11
11
|
f.displayName = "DropdownMenu";
|
|
12
12
|
const c = ({
|
|
@@ -14,7 +14,7 @@ const c = ({
|
|
|
14
14
|
children: e,
|
|
15
15
|
...o
|
|
16
16
|
}) => /* @__PURE__ */ r(
|
|
17
|
-
|
|
17
|
+
w,
|
|
18
18
|
{
|
|
19
19
|
className: a(
|
|
20
20
|
"group group overflow-hidden rounded-lg disabled:pointer-events-none [&>span]:line-clamp-1",
|
|
@@ -31,15 +31,15 @@ const y = ({
|
|
|
31
31
|
sideOffset: e = 4,
|
|
32
32
|
align: o = "start",
|
|
33
33
|
...n
|
|
34
|
-
}) => /* @__PURE__ */ r(
|
|
35
|
-
|
|
34
|
+
}) => /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
|
|
35
|
+
h,
|
|
36
36
|
{
|
|
37
37
|
align: o,
|
|
38
38
|
className: "z-50",
|
|
39
39
|
collisionPadding: 16,
|
|
40
40
|
sideOffset: e,
|
|
41
41
|
children: /* @__PURE__ */ r(
|
|
42
|
-
|
|
42
|
+
g,
|
|
43
43
|
{
|
|
44
44
|
className: a(
|
|
45
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",
|
|
@@ -61,7 +61,7 @@ const M = ({
|
|
|
61
61
|
onClick: d,
|
|
62
62
|
...s
|
|
63
63
|
}) => /* @__PURE__ */ m(
|
|
64
|
-
|
|
64
|
+
x,
|
|
65
65
|
{
|
|
66
66
|
className: a(
|
|
67
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",
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export type { CodeGroupProps } from './code-group';
|
|
2
2
|
export { CodeGroup } from './code-group';
|
|
3
|
+
export type { CodeGroupSelectProps, ExampleCodeSnippet, } from './code-group-select';
|
|
4
|
+
export { CodeGroupSelect } from './code-group-select';
|
|
3
5
|
export type { CodeSnippetProps } from './code-snippet';
|
|
4
6
|
export { CodeSnippet } from './code-snippet';
|
|
7
|
+
export type { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuProps, DropdownMenuTriggerProps, } from './dropdown';
|
|
8
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from './dropdown';
|
|
5
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/code-group/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EACV,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EACV,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type { ParamHeadProps } from './param-head';
|
|
2
2
|
export { ParamHead } from './param-head';
|
|
3
|
+
export type { DeprecatedPillProps, InfoPillProps, RequiredPillProps, } from './pills';
|
|
4
|
+
export { DeprecatedPill, InfoPill, RequiredPill } from './pills';
|
|
3
5
|
export type { PropertyProps } from './property';
|
|
4
6
|
export { Property } from './property';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/property/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/property/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACjE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -5,11 +5,14 @@ type InfoPillProps = {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
7
7
|
declare const InfoPill: ({ children, prefix, className }: InfoPillProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
|
|
8
|
+
type RequiredPillProps = {
|
|
9
9
|
label?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const
|
|
10
|
+
};
|
|
11
|
+
declare const RequiredPill: ({ label }: RequiredPillProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
type DeprecatedPillProps = {
|
|
12
13
|
label?: string;
|
|
13
|
-
}
|
|
14
|
+
};
|
|
15
|
+
declare const DeprecatedPill: ({ label }: DeprecatedPillProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
16
|
export { InfoPill, RequiredPill, DeprecatedPill };
|
|
17
|
+
export type { InfoPillProps, RequiredPillProps, DeprecatedPillProps };
|
|
15
18
|
//# sourceMappingURL=pills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pills.d.ts","sourceRoot":"","sources":["../../../src/components/property/pills.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,QAAQ,GAAI,iCAAiC,aAAa,4CAe/D,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"pills.d.ts","sourceRoot":"","sources":["../../../src/components/property/pills.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,QAAQ,GAAI,iCAAiC,aAAa,4CAe/D,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,WAAW,iBAAiB,mDAajD,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,QAAA,MAAM,cAAc,GAAI,WAAW,mBAAmB,mDAarD,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAElD,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,74 +1,85 @@
|
|
|
1
1
|
import { cn as e } from "./utils/cn.js";
|
|
2
2
|
import { getInitialOpenState as p, updateAndCopyUrl as m } from "./components/accordion/accordion-url-utils.js";
|
|
3
3
|
import { Accordion as x } from "./components/accordion/index.js";
|
|
4
|
-
import { Badge as
|
|
5
|
-
import { Callout as l, Check as
|
|
6
|
-
import { Card as
|
|
7
|
-
import { BaseCodeBlock as
|
|
8
|
-
import { CodeBlock as
|
|
9
|
-
import { CodeGroup as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
4
|
+
import { Badge as a } from "./components/badge/badge.js";
|
|
5
|
+
import { Callout as l, Check as i, Danger as c, Info as u, Note as C, Tip as S, Warning as P } from "./components/callout/callout.js";
|
|
6
|
+
import { Card as s } from "./components/card/card.js";
|
|
7
|
+
import { BaseCodeBlock as g } from "./components/code-block/base-code-block.js";
|
|
8
|
+
import { CodeBlock as h } from "./components/code-block/code-block.js";
|
|
9
|
+
import { CodeGroup as B } from "./components/code-group/code-group.js";
|
|
10
|
+
import { CodeGroupSelect as E } from "./components/code-group/code-group-select.js";
|
|
11
|
+
import { CodeSnippet as Z } from "./components/code-group/code-snippet.js";
|
|
12
|
+
import { DropdownMenu as y, DropdownMenuContent as A, DropdownMenuItem as G, DropdownMenuTrigger as U } from "./components/code-group/dropdown.js";
|
|
13
|
+
import { Color as q } from "./components/color/color.js";
|
|
14
|
+
import { Columns as F } from "./components/columns/columns.js";
|
|
15
|
+
import { Expandable as L } from "./components/expandable/expandable.js";
|
|
16
|
+
import { Frame as O } from "./components/frame/frame.js";
|
|
17
|
+
import { Icon as V } from "./components/icon/icon.js";
|
|
18
|
+
import { Mermaid as j } from "./components/mermaid/mermaid.js";
|
|
19
|
+
import { usePanZoom as J } from "./components/mermaid/use-pan-zoom.js";
|
|
20
|
+
import { ZoomControls as Q } from "./components/mermaid/zoom-controls.js";
|
|
21
|
+
import { Panel as Y } from "./components/panel/panel.js";
|
|
22
|
+
import { ParamHead as oo } from "./components/property/param-head.js";
|
|
23
|
+
import { DeprecatedPill as eo, InfoPill as to, RequiredPill as po } from "./components/property/pills.js";
|
|
24
|
+
import { Property as fo } from "./components/property/property.js";
|
|
25
|
+
import { SearchButton as no } from "./components/search/button.js";
|
|
26
|
+
import { SearchProvider as lo, useSearch as io } from "./components/search/provider.js";
|
|
27
|
+
import { Search as uo } from "./components/search/search.js";
|
|
28
|
+
import { STEP_TITLE_SIZES as So } from "./components/steps/constants.js";
|
|
29
|
+
import { Steps as To } from "./components/steps/steps.js";
|
|
30
|
+
import { Tabs as Io } from "./components/tabs/tabs.js";
|
|
31
|
+
import { Tile as Do } from "./components/tile/tile.js";
|
|
32
|
+
import { Tooltip as wo } from "./components/tooltip/tooltip.js";
|
|
33
|
+
import { Tree as Mo } from "./components/tree/index.js";
|
|
34
|
+
import { Update as ko } from "./components/update/update.js";
|
|
35
|
+
import { View as bo } from "./components/view/view.js";
|
|
33
36
|
export {
|
|
34
37
|
x as Accordion,
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
a as Badge,
|
|
39
|
+
g as BaseCodeBlock,
|
|
37
40
|
l as Callout,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
41
|
+
s as Card,
|
|
42
|
+
i as Check,
|
|
43
|
+
h as CodeBlock,
|
|
44
|
+
B as CodeGroup,
|
|
45
|
+
E as CodeGroupSelect,
|
|
46
|
+
Z as CodeSnippet,
|
|
47
|
+
q as Color,
|
|
48
|
+
F as Columns,
|
|
49
|
+
c as Danger,
|
|
50
|
+
eo as DeprecatedPill,
|
|
51
|
+
y as DropdownMenu,
|
|
52
|
+
A as DropdownMenuContent,
|
|
53
|
+
G as DropdownMenuItem,
|
|
54
|
+
U as DropdownMenuTrigger,
|
|
55
|
+
L as Expandable,
|
|
56
|
+
O as Frame,
|
|
57
|
+
V as Icon,
|
|
58
|
+
u as Info,
|
|
59
|
+
to as InfoPill,
|
|
60
|
+
j as Mermaid,
|
|
61
|
+
C as Note,
|
|
62
|
+
Y as Panel,
|
|
63
|
+
oo as ParamHead,
|
|
64
|
+
fo as Property,
|
|
65
|
+
po as RequiredPill,
|
|
66
|
+
So as STEP_TITLE_SIZES,
|
|
67
|
+
uo as Search,
|
|
68
|
+
no as SearchButton,
|
|
69
|
+
lo as SearchProvider,
|
|
70
|
+
To as Steps,
|
|
71
|
+
Io as Tabs,
|
|
72
|
+
Do as Tile,
|
|
73
|
+
S as Tip,
|
|
74
|
+
wo as Tooltip,
|
|
75
|
+
Mo as Tree,
|
|
76
|
+
ko as Update,
|
|
77
|
+
bo as View,
|
|
78
|
+
P as Warning,
|
|
79
|
+
Q as ZoomControls,
|
|
69
80
|
e as cn,
|
|
70
81
|
p as getInitialOpenState,
|
|
71
82
|
m as updateAndCopyUrl,
|
|
72
|
-
|
|
73
|
-
|
|
83
|
+
J as usePanZoom,
|
|
84
|
+
io as useSearch
|
|
74
85
|
};
|
|
@@ -10,8 +10,8 @@ import { createAttribute as k } from "../utils/createAttribute.js";
|
|
|
10
10
|
import { useRenderElement as q } from "../../utils/useRenderElement.js";
|
|
11
11
|
import { ownerVisuallyHidden as A } from "../../utils/constants.js";
|
|
12
12
|
import { jsxs as L, jsx as b } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { enableFocusInside as D, isOutsideEvent as C, getPreviousTabbable as B, getNextTabbable as H, disableFocusInside as J } from "../utils/tabbable.js";
|
|
14
|
+
import { EMPTY_OBJECT as Y } from "../../../../../../../@base-ui_utils@0.2.4_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/empty.js";
|
|
15
15
|
import { focusOut as z } from "../../utils/reason-parts.js";
|
|
16
16
|
const O = /* @__PURE__ */ o.createContext(null);
|
|
17
17
|
process.env.NODE_ENV !== "production" && (O.displayName = "PortalContext");
|
|
@@ -20,7 +20,7 @@ function U(y = {}) {
|
|
|
20
20
|
const {
|
|
21
21
|
ref: d,
|
|
22
22
|
container: l,
|
|
23
|
-
componentProps: N =
|
|
23
|
+
componentProps: N = Y,
|
|
24
24
|
elementProps: F,
|
|
25
25
|
elementState: g
|
|
26
26
|
} = y, m = T(), a = K(), p = a == null ? void 0 : a.portalNode, [e, f] = o.useState(null), [E, i] = o.useState(null), R = j((n) => {
|
|
@@ -74,7 +74,7 @@ const W = /* @__PURE__ */ o.forwardRef(function(d, l) {
|
|
|
74
74
|
if (!e || n)
|
|
75
75
|
return;
|
|
76
76
|
function s(u) {
|
|
77
|
-
e && u.relatedTarget && C(u) && (u.type === "focusin" ? D :
|
|
77
|
+
e && u.relatedTarget && C(u) && (u.type === "focusin" ? D : J)(e);
|
|
78
78
|
}
|
|
79
79
|
return e.addEventListener("focusin", s, !0), e.addEventListener("focusout", s, !0), () => {
|
|
80
80
|
e.removeEventListener("focusin", s, !0), e.removeEventListener("focusout", s, !0);
|
|
@@ -101,7 +101,7 @@ const W = /* @__PURE__ */ o.forwardRef(function(d, l) {
|
|
|
101
101
|
if (C(s, e))
|
|
102
102
|
(u = R.current) == null || u.focus();
|
|
103
103
|
else {
|
|
104
|
-
const P = t ? t.domReference : null, c =
|
|
104
|
+
const P = t ? t.domReference : null, c = B(P);
|
|
105
105
|
c == null || c.focus();
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -116,7 +116,7 @@ const W = /* @__PURE__ */ o.forwardRef(function(d, l) {
|
|
|
116
116
|
if (C(s, e))
|
|
117
117
|
(u = r.current) == null || u.focus();
|
|
118
118
|
else {
|
|
119
|
-
const P = t ? t.domReference : null, c =
|
|
119
|
+
const P = t ? t.domReference : null, c = H(P);
|
|
120
120
|
c == null || c.focus(), t != null && t.closeOnFocusOut && (t == null || t.onOpenChange(!1, S(z, s.nativeEvent)));
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isShadowRoot as i, isHTMLElement as s } from "../../../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";
|
|
2
2
|
import { isJSDOM as c } from "../../../../../../../@base-ui_utils@0.2.4_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/detectBrowser.js";
|
|
3
|
-
import {
|
|
3
|
+
import { FOCUSABLE_ATTRIBUTE as u, TYPEABLE_SELECTOR as a } from "./constants.js";
|
|
4
4
|
function h(t) {
|
|
5
5
|
var e;
|
|
6
6
|
let r = t.activeElement;
|
|
@@ -25,7 +25,7 @@ import { useRole as nt } from "../../floating-ui-react/hooks/useRole.js";
|
|
|
25
25
|
import { useListNavigation as rt } from "../../floating-ui-react/hooks/useListNavigation.js";
|
|
26
26
|
import { useTypeahead as st } from "../../floating-ui-react/hooks/useTypeahead.js";
|
|
27
27
|
import { useInteractions as it } from "../../floating-ui-react/hooks/useInteractions.js";
|
|
28
|
-
import { triggerFocus as te, triggerPress as
|
|
28
|
+
import { imperativeAction as ut, triggerFocus as te, triggerPress as at, itemPress as ct, triggerHover as k, focusOut as lt, listNavigation as pt, siblingOpen as dt, escapeKey as mt } from "../../utils/reason-parts.js";
|
|
29
29
|
import { mergeProps as oe } from "../../merge-props/mergeProps.js";
|
|
30
30
|
function Yt(ne) {
|
|
31
31
|
const {
|
|
@@ -130,7 +130,7 @@ function Yt(ne) {
|
|
|
130
130
|
t && s === te ? (I.current = !1, _.start(300, () => {
|
|
131
131
|
I.current = !0;
|
|
132
132
|
})) : (I.current = !0, _.clear());
|
|
133
|
-
const G = (s ===
|
|
133
|
+
const G = (s === at || s === ct) && a.detail === 0 && (a == null ? void 0 : a.isTrusted), Fe = !t && (s === mt || s == null);
|
|
134
134
|
function J() {
|
|
135
135
|
var W;
|
|
136
136
|
const p = {
|
|
@@ -141,14 +141,14 @@ function Yt(ne) {
|
|
|
141
141
|
const Q = ((W = o.trigger) == null ? void 0 : W.id) ?? null;
|
|
142
142
|
(Q || t) && (p.activeTriggerId = Q, p.activeTriggerElement = o.trigger ?? null), e.update(p);
|
|
143
143
|
}
|
|
144
|
-
s === k ? Ae.flushSync(J) : J(), n.type === "menubar" && (s === te || s ===
|
|
144
|
+
s === k ? Ae.flushSync(J) : J(), n.type === "menubar" && (s === te || s === lt || s === k || s === pt || s === dt) ? e.set("instantType", "group") : G || Fe ? e.set("instantType", G ? "click" : "dismiss") : e.set("instantType", void 0);
|
|
145
145
|
}), V = r.useCallback((t) => {
|
|
146
146
|
const o = $e(t);
|
|
147
147
|
return o.preventUnmountOnClose = () => {
|
|
148
148
|
e.set("preventUnmountingOnClose", !0);
|
|
149
149
|
}, o;
|
|
150
150
|
}, [e]), Y = r.useCallback(() => {
|
|
151
|
-
e.setOpen(!1, V(
|
|
151
|
+
e.setOpen(!1, V(ut));
|
|
152
152
|
}, [e, V]);
|
|
153
153
|
r.useImperativeHandle(le, () => ({
|
|
154
154
|
unmount: L,
|
|
@@ -31,8 +31,8 @@ import { useClick as Ue } from "../../floating-ui-react/hooks/useClick.js";
|
|
|
31
31
|
import { useFocus as _e } from "../../floating-ui-react/hooks/useFocus.js";
|
|
32
32
|
import { useInteractions as Le } from "../../floating-ui-react/hooks/useInteractions.js";
|
|
33
33
|
import { getTabbableBeforeElement as Ge, isOutsideEvent as Ye, getTabbableAfterElement as je, getNextTabbable as Ke } from "../../floating-ui-react/utils/tabbable.js";
|
|
34
|
+
import { triggerHover as Ve, cancelOpen as Xe, focusOut as j } from "../../utils/reason-parts.js";
|
|
34
35
|
import { contains as C } from "../../floating-ui-react/utils/element.js";
|
|
35
|
-
import { cancelOpen as Ve, triggerHover as Xe, focusOut as j } from "../../utils/reason-parts.js";
|
|
36
36
|
const R = 2, $e = /* @__PURE__ */ r.forwardRef(function(f, i) {
|
|
37
37
|
const {
|
|
38
38
|
render: b,
|
|
@@ -80,11 +80,11 @@ const R = 2, $e = /* @__PURE__ */ r.forwardRef(function(f, i) {
|
|
|
80
80
|
const p = ye(g.current);
|
|
81
81
|
t.clientX >= p.left - R && t.clientX <= p.right + R && t.clientY >= p.top - R && t.clientY <= p.bottom + R || O.events.emit("close", {
|
|
82
82
|
domEvent: t,
|
|
83
|
-
reason:
|
|
83
|
+
reason: Xe
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
86
|
r.useEffect(() => {
|
|
87
|
-
n && e.select("lastOpenChangeReason") ===
|
|
87
|
+
n && e.select("lastOpenChangeReason") === Ve && _(g.current).addEventListener("mouseup", v, {
|
|
88
88
|
once: !0
|
|
89
89
|
});
|
|
90
90
|
}, [n, v, e]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { evaluate as R, getSide as E, getSideAxis as C, getOppositePlacement as Q, getExpandedPlacements as U, getOppositeAxisPlacements as Z, getAlignmentSides as ee, getAlignment as $, min as z, max as L, getPaddingObject as te, rectToClientRect as X,
|
|
1
|
+
import { evaluate as R, getSide as E, getSideAxis as C, getOppositePlacement as Q, getExpandedPlacements as U, getOppositeAxisPlacements as Z, getAlignmentSides as ee, getAlignment as $, min as z, max as L, getPaddingObject as te, rectToClientRect as X, sides as ne, clamp as _, getOppositeAxis as J, getAlignmentAxis as ie, getAxisLength as se } from "../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
|
|
2
2
|
function I(t, e, d) {
|
|
3
3
|
let {
|
|
4
4
|
reference: s,
|