@apipass/design-system 5.5.0 → 5.8.0
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/lib/embedded-styles.js +2 -2
- package/dist/lib/style.css +1 -1
- package/dist/lib/ui/layout/Flex/Flex.cjs +1 -1
- package/dist/lib/ui/layout/Flex/Flex.cjs.map +1 -1
- package/dist/lib/ui/layout/Flex/Flex.js +12 -12
- package/dist/lib/ui/layout/Flex/Flex.js.map +1 -1
- package/dist/lib/ui/primitives/JsonViewer/JsonEditor.cjs +1 -1
- package/dist/lib/ui/primitives/JsonViewer/JsonEditor.cjs.map +1 -1
- package/dist/lib/ui/primitives/JsonViewer/JsonEditor.js +43 -42
- package/dist/lib/ui/primitives/JsonViewer/JsonEditor.js.map +1 -1
- package/dist/lib/ui/primitives/JsonViewer/JsonViewer.cjs +1 -1
- package/dist/lib/ui/primitives/JsonViewer/JsonViewer.cjs.map +1 -1
- package/dist/lib/ui/primitives/JsonViewer/JsonViewer.js +33 -26
- package/dist/lib/ui/primitives/JsonViewer/JsonViewer.js.map +1 -1
- package/dist/lib/ui/primitives/JsonViewer/json-code-mirror.cjs +1 -1
- package/dist/lib/ui/primitives/JsonViewer/json-code-mirror.cjs.map +1 -1
- package/dist/lib/ui/primitives/JsonViewer/json-code-mirror.js +37 -32
- package/dist/lib/ui/primitives/JsonViewer/json-code-mirror.js.map +1 -1
- package/dist/lib/ui/primitives/NavigationPill/NavigationPill.cjs +1 -1
- package/dist/lib/ui/primitives/NavigationPill/NavigationPill.cjs.map +1 -1
- package/dist/lib/ui/primitives/NavigationPill/NavigationPill.js +21 -17
- package/dist/lib/ui/primitives/NavigationPill/NavigationPill.js.map +1 -1
- package/dist/lib/ui/primitives/Search/Search.cjs +1 -1
- package/dist/lib/ui/primitives/Search/Search.cjs.map +1 -1
- package/dist/lib/ui/primitives/Search/Search.js +22 -49
- package/dist/lib/ui/primitives/Search/Search.js.map +1 -1
- package/dist/types/ui/primitives/JsonViewer/JsonEditor.d.ts +3 -3
- package/dist/types/ui/primitives/JsonViewer/JsonViewer.d.ts +3 -3
- package/dist/types/ui/primitives/JsonViewer/json-code-mirror.d.ts +7 -0
- package/dist/types/ui/primitives/NavigationPill/NavigationPill.d.ts +5 -2
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { EditorView as
|
|
2
|
-
import { json as
|
|
3
|
-
import { foldGutter as
|
|
1
|
+
import { EditorView as f } from "@codemirror/view";
|
|
2
|
+
import { json as u } from "@codemirror/lang-json";
|
|
3
|
+
import { foldGutter as g, syntaxHighlighting as p, HighlightStyle as m } from "@codemirror/language";
|
|
4
4
|
import { tags as n } from "@lezer/highlight";
|
|
5
|
-
const
|
|
5
|
+
const d = m.define([
|
|
6
6
|
{ tag: n.propertyName, color: "var(--json-viewer-color-key)" },
|
|
7
7
|
{ tag: n.string, color: "var(--json-viewer-color-string)", fontWeight: 600 },
|
|
8
8
|
{ tag: [n.number, n.bool, n.null], color: "var(--json-viewer-color-scalar)" },
|
|
9
9
|
{ tag: [n.separator, n.squareBracket, n.brace], color: "var(--json-viewer-color-punctuation)" }
|
|
10
|
-
]),
|
|
10
|
+
]), w = f.theme({
|
|
11
11
|
"&": { backgroundColor: "transparent", color: "var(--json-viewer-color-punctuation)", fontSize: "13px" },
|
|
12
12
|
"&.cm-focused": { outline: "none" },
|
|
13
|
-
".cm-content": { fontFamily: "var(--sds-typography-family-mono)", padding: "
|
|
13
|
+
".cm-content": { fontFamily: "var(--sds-typography-family-mono)", padding: "8px 124px 12px 4px" },
|
|
14
14
|
".cm-gutters": {
|
|
15
15
|
backgroundColor: "transparent",
|
|
16
16
|
border: "none",
|
|
@@ -18,47 +18,52 @@ const m = p.define([
|
|
|
18
18
|
paddingLeft: "5px"
|
|
19
19
|
},
|
|
20
20
|
".cm-scroller": { overflow: "auto" }
|
|
21
|
-
}),
|
|
22
|
-
function
|
|
21
|
+
}), S = [u(), g(), p(d)];
|
|
22
|
+
function b(r) {
|
|
23
23
|
try {
|
|
24
|
-
return JSON.stringify(
|
|
24
|
+
return JSON.stringify(r, null, 2) ?? "null";
|
|
25
25
|
} catch {
|
|
26
|
-
return String(
|
|
26
|
+
return String(r);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return typeof
|
|
29
|
+
function a(r) {
|
|
30
|
+
return typeof r == "number" ? `${r}px` : r;
|
|
31
31
|
}
|
|
32
|
-
function x(
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
function x({ height: r, minHeight: e, maxHeight: i }) {
|
|
33
|
+
const o = {};
|
|
34
|
+
return r !== void 0 && (o["--json-viewer-height"] = a(r)), e !== void 0 && (o["--json-viewer-min-height"] = a(e)), i !== void 0 && (o["--json-viewer-max-height"] = a(i)), o;
|
|
35
|
+
}
|
|
36
|
+
function E(r) {
|
|
37
|
+
const e = [], i = r.length;
|
|
38
|
+
let o = 0;
|
|
39
|
+
for (; o < i && r[o] !== "{" && r[o] !== "["; ) o++;
|
|
40
|
+
if (o >= i) return e;
|
|
41
|
+
let s = 0, c = !1, l = -1;
|
|
42
|
+
for (; o < i; o++) {
|
|
43
|
+
const t = r[o];
|
|
44
|
+
if (c) {
|
|
45
|
+
t === "\\" ? o++ : t === '"' && (c = !1);
|
|
42
46
|
continue;
|
|
43
47
|
}
|
|
44
48
|
if (t === '"') {
|
|
45
|
-
|
|
49
|
+
c = !0;
|
|
46
50
|
continue;
|
|
47
51
|
}
|
|
48
52
|
if (t === "{" || t === "[") {
|
|
49
|
-
|
|
53
|
+
s++, s === 2 && (l = o + 1);
|
|
50
54
|
continue;
|
|
51
55
|
}
|
|
52
|
-
(t === "}" || t === "]") && (
|
|
56
|
+
(t === "}" || t === "]") && (s === 2 && l !== -1 && (e.push({ from: l, to: o }), l = -1), s--);
|
|
53
57
|
}
|
|
54
|
-
return
|
|
58
|
+
return e;
|
|
55
59
|
}
|
|
56
60
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
E as computeFirstLevelFoldRanges,
|
|
62
|
+
S as jsonEditorExtensions,
|
|
63
|
+
w as jsonEditorTheme,
|
|
64
|
+
d as jsonHighlightStyle,
|
|
65
|
+
b as serializeJson,
|
|
66
|
+
a as toCssSize,
|
|
67
|
+
x as toEditorSizeStyle
|
|
63
68
|
};
|
|
64
69
|
//# sourceMappingURL=json-code-mirror.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-code-mirror.js","sources":["../../../../../src/ui/primitives/JsonViewer/json-code-mirror.ts"],"sourcesContent":["import { EditorView } from \"@codemirror/view\";\nimport { json } from \"@codemirror/lang-json\";\nimport { foldGutter, HighlightStyle, syntaxHighlighting } from \"@codemirror/language\";\nimport { tags as t } from \"@lezer/highlight\";\n\nexport const jsonHighlightStyle = HighlightStyle.define([\n { tag: t.propertyName, color: \"var(--json-viewer-color-key)\" },\n { tag: t.string, color: \"var(--json-viewer-color-string)\", fontWeight: 600 },\n { tag: [t.number, t.bool, t.null], color: \"var(--json-viewer-color-scalar)\" },\n { tag: [t.separator, t.squareBracket, t.brace], color: \"var(--json-viewer-color-punctuation)\" },\n]);\n\nexport const jsonEditorTheme = EditorView.theme({\n \"&\": { backgroundColor: \"transparent\", color: \"var(--json-viewer-color-punctuation)\", fontSize: \"13px\" },\n \"&.cm-focused\": { outline: \"none\" },\n \".cm-content\": { fontFamily: \"var(--sds-typography-family-mono)\", padding: \"
|
|
1
|
+
{"version":3,"file":"json-code-mirror.js","sources":["../../../../../src/ui/primitives/JsonViewer/json-code-mirror.ts"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport { EditorView } from \"@codemirror/view\";\nimport { json } from \"@codemirror/lang-json\";\nimport { foldGutter, HighlightStyle, syntaxHighlighting } from \"@codemirror/language\";\nimport { tags as t } from \"@lezer/highlight\";\n\nexport const jsonHighlightStyle = HighlightStyle.define([\n { tag: t.propertyName, color: \"var(--json-viewer-color-key)\" },\n { tag: t.string, color: \"var(--json-viewer-color-string)\", fontWeight: 600 },\n { tag: [t.number, t.bool, t.null], color: \"var(--json-viewer-color-scalar)\" },\n { tag: [t.separator, t.squareBracket, t.brace], color: \"var(--json-viewer-color-punctuation)\" },\n]);\n\nexport const jsonEditorTheme = EditorView.theme({\n \"&\": { backgroundColor: \"transparent\", color: \"var(--json-viewer-color-punctuation)\", fontSize: \"13px\" },\n \"&.cm-focused\": { outline: \"none\" },\n \".cm-content\": { fontFamily: \"var(--sds-typography-family-mono)\", padding: \"8px 124px 12px 4px\" },\n \".cm-gutters\": {\n backgroundColor: \"transparent\",\n border: \"none\",\n color: \"var(--json-viewer-color-caret)\",\n paddingLeft: \"5px\",\n },\n \".cm-scroller\": { overflow: \"auto\" },\n});\n\nexport const jsonEditorExtensions = [json(), foldGutter(), syntaxHighlighting(jsonHighlightStyle)];\n\nexport function serializeJson(value: unknown): string {\n try {\n return JSON.stringify(value, null, 2) ?? \"null\";\n } catch {\n return String(value);\n }\n}\n\nexport function toCssSize(size: string | number): string {\n return typeof size === \"number\" ? `${size}px` : size;\n}\n\nexport interface JsonEditorSize {\n height?: string | number;\n minHeight?: string | number;\n maxHeight?: string | number;\n}\n\nexport function toEditorSizeStyle({ height, minHeight, maxHeight }: JsonEditorSize): CSSProperties {\n const sizeVariables: Record<string, string> = {};\n if (height !== undefined) sizeVariables[\"--json-viewer-height\"] = toCssSize(height);\n if (minHeight !== undefined) sizeVariables[\"--json-viewer-min-height\"] = toCssSize(minHeight);\n if (maxHeight !== undefined) sizeVariables[\"--json-viewer-max-height\"] = toCssSize(maxHeight);\n return sizeVariables as CSSProperties;\n}\n\n/**\n * Finds the fold range of every direct child (depth 1) of the root object/array\n * by scanning the text itself for matching brackets. This mirrors what\n * CodeMirror's `foldable()` would compute, but doesn't depend on the lezer\n * parser having finished tokenizing the document — which for a multi-MB\n * document is not guaranteed synchronously at mount time.\n */\nexport function computeFirstLevelFoldRanges(text: string): { from: number; to: number }[] {\n const ranges: { from: number; to: number }[] = [];\n const n = text.length;\n let i = 0;\n while (i < n && text[i] !== \"{\" && text[i] !== \"[\") i++;\n if (i >= n) return ranges;\n\n let depth = 0;\n let inString = false;\n let pendingStart = -1;\n for (; i < n; i++) {\n const ch = text[i];\n if (inString) {\n if (ch === \"\\\\\") i++;\n else if (ch === '\"') inString = false;\n continue;\n }\n if (ch === '\"') {\n inString = true;\n continue;\n }\n if (ch === \"{\" || ch === \"[\") {\n depth++;\n if (depth === 2) pendingStart = i + 1;\n continue;\n }\n if (ch === \"}\" || ch === \"]\") {\n if (depth === 2 && pendingStart !== -1) {\n ranges.push({ from: pendingStart, to: i });\n pendingStart = -1;\n }\n depth--;\n }\n }\n return ranges;\n}\n"],"names":["jsonHighlightStyle","HighlightStyle","t","jsonEditorTheme","EditorView","jsonEditorExtensions","json","foldGutter","syntaxHighlighting","serializeJson","value","toCssSize","size","toEditorSizeStyle","height","minHeight","maxHeight","sizeVariables","computeFirstLevelFoldRanges","text","ranges","n","i","depth","inString","pendingStart","ch"],"mappings":";;;;AAMO,MAAMA,IAAqBC,EAAe,OAAO;AAAA,EACtD,EAAE,KAAKC,EAAE,cAAc,OAAO,+BAAA;AAAA,EAC9B,EAAE,KAAKA,EAAE,QAAQ,OAAO,mCAAmC,YAAY,IAAA;AAAA,EACvE,EAAE,KAAK,CAACA,EAAE,QAAQA,EAAE,MAAMA,EAAE,IAAI,GAAG,OAAO,kCAAA;AAAA,EAC1C,EAAE,KAAK,CAACA,EAAE,WAAWA,EAAE,eAAeA,EAAE,KAAK,GAAG,OAAO,uCAAA;AACzD,CAAC,GAEYC,IAAkBC,EAAW,MAAM;AAAA,EAC9C,KAAK,EAAE,iBAAiB,eAAe,OAAO,wCAAwC,UAAU,OAAA;AAAA,EAChG,gBAAgB,EAAE,SAAS,OAAA;AAAA,EAC3B,eAAe,EAAE,YAAY,qCAAqC,SAAS,qBAAA;AAAA,EAC3E,eAAe;AAAA,IACb,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf,gBAAgB,EAAE,UAAU,OAAA;AAC9B,CAAC,GAEYC,IAAuB,CAACC,EAAA,GAAQC,KAAcC,EAAmBR,CAAkB,CAAC;AAE1F,SAASS,EAAcC,GAAwB;AACpD,MAAI;AACF,WAAO,KAAK,UAAUA,GAAO,MAAM,CAAC,KAAK;AAAA,EAC3C,QAAQ;AACN,WAAO,OAAOA,CAAK;AAAA,EACrB;AACF;AAEO,SAASC,EAAUC,GAA+B;AACvD,SAAO,OAAOA,KAAS,WAAW,GAAGA,CAAI,OAAOA;AAClD;AAQO,SAASC,EAAkB,EAAE,QAAAC,GAAQ,WAAAC,GAAW,WAAAC,KAA4C;AACjG,QAAMC,IAAwC,CAAA;AAC9C,SAAIH,MAAW,WAAWG,EAAc,sBAAsB,IAAIN,EAAUG,CAAM,IAC9EC,MAAc,WAAWE,EAAc,0BAA0B,IAAIN,EAAUI,CAAS,IACxFC,MAAc,WAAWC,EAAc,0BAA0B,IAAIN,EAAUK,CAAS,IACrFC;AACT;AASO,SAASC,EAA4BC,GAA8C;AACxF,QAAMC,IAAyC,CAAA,GACzCC,IAAIF,EAAK;AACf,MAAIG,IAAI;AACR,SAAOA,IAAID,KAAKF,EAAKG,CAAC,MAAM,OAAOH,EAAKG,CAAC,MAAM,MAAK,CAAAA;AACpD,MAAIA,KAAKD,EAAG,QAAOD;AAEnB,MAAIG,IAAQ,GACRC,IAAW,IACXC,IAAe;AACnB,SAAOH,IAAID,GAAGC,KAAK;AACjB,UAAMI,IAAKP,EAAKG,CAAC;AACjB,QAAIE,GAAU;AACZ,MAAIE,MAAO,OAAMJ,MACRI,MAAO,QAAKF,IAAW;AAChC;AAAA,IACF;AACA,QAAIE,MAAO,KAAK;AACd,MAAAF,IAAW;AACX;AAAA,IACF;AACA,QAAIE,MAAO,OAAOA,MAAO,KAAK;AAC5B,MAAAH,KACIA,MAAU,MAAGE,IAAeH,IAAI;AACpC;AAAA,IACF;AACA,KAAII,MAAO,OAAOA,MAAO,SACnBH,MAAU,KAAKE,MAAiB,OAClCL,EAAO,KAAK,EAAE,MAAMK,GAAc,IAAIH,GAAG,GACzCG,IAAe,KAEjBF;AAAA,EAEJ;AACA,SAAOH;AACT;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("../../../vendor/clsx/dist/clsx.cjs"),t=require("react-aria-components");;/* empty css */function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("../../../vendor/clsx/dist/clsx.cjs"),t=require("react-aria-components");;/* empty css */function o({className:i,...a}){const s=n.clsx(i,"navigation-pill");return l.jsx(t.Tab,{className:s,...a})}function c({className:i,...a}){const s=n.clsx(i,"navigation-pill-list");return l.jsx(t.TabList,{className:s,...a})}function r({className:i,...a}){const s=n.clsx(i,"navigation-pill-panel");return l.jsx(t.TabPanel,{className:s,...a})}function u({className:i,shape:a="pill",...s}){const e=n.clsx(i,"navigation-pills",`navigation-pills-shape-${a}`);return l.jsx(t.Tabs,{className:e,...s})}exports.NavigationPill=o;exports.NavigationPillList=c;exports.NavigationPillPanel=r;exports.NavigationPills=u;
|
|
2
2
|
//# sourceMappingURL=NavigationPill.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationPill.cjs","sources":["../../../../../src/ui/primitives/NavigationPill/NavigationPill.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport {\n Tab as RACTab,\n TabList as RACTabList,\n TabPanel as RACTabPanel,\n Tabs as RACTabs,\n type TabListProps as RACTabListProps,\n type TabPanelProps as RACTabPanelProps,\n type TabProps as RACTabProps,\n type TabsProps as RACTabsProps,\n} from \"react-aria-components\";\nimport \"./navigationPill.css\";\n\nexport type NavigationPillProps = RACTabProps;\nexport function NavigationPill({ className, ...props }: NavigationPillProps) {\n const classNames = clsx(className, \"navigation-pill\");\n return <RACTab className={classNames} {...props} />;\n}\n\nexport type NavigationPillListProps<T> = RACTabListProps<T>;\nexport function NavigationPillList<T extends object>({\n className,\n ...props\n}: NavigationPillListProps<T>) {\n const classNames = clsx(className, \"navigation-pill-list\");\n return <RACTabList className={classNames} {...props} />;\n}\n\nexport type NavigationPillPanelProps = RACTabPanelProps;\nexport function NavigationPillPanel({\n className,\n ...props\n}: NavigationPillPanelProps) {\n const classNames = clsx(className, \"navigation-pill-panel\");\n return <RACTabPanel className={classNames} {...props} />;\n}\n\nexport type NavigationPillsProps = RACTabsProps;\nexport function NavigationPills({
|
|
1
|
+
{"version":3,"file":"NavigationPill.cjs","sources":["../../../../../src/ui/primitives/NavigationPill/NavigationPill.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport {\n Tab as RACTab,\n TabList as RACTabList,\n TabPanel as RACTabPanel,\n Tabs as RACTabs,\n type TabListProps as RACTabListProps,\n type TabPanelProps as RACTabPanelProps,\n type TabProps as RACTabProps,\n type TabsProps as RACTabsProps,\n} from \"react-aria-components\";\nimport \"./navigationPill.css\";\n\nexport type NavigationPillProps = RACTabProps;\nexport function NavigationPill({ className, ...props }: NavigationPillProps) {\n const classNames = clsx(className, \"navigation-pill\");\n return <RACTab className={classNames} {...props} />;\n}\n\nexport type NavigationPillListProps<T> = RACTabListProps<T>;\nexport function NavigationPillList<T extends object>({\n className,\n ...props\n}: NavigationPillListProps<T>) {\n const classNames = clsx(className, \"navigation-pill-list\");\n return <RACTabList className={classNames} {...props} />;\n}\n\nexport type NavigationPillPanelProps = RACTabPanelProps;\nexport function NavigationPillPanel({\n className,\n ...props\n}: NavigationPillPanelProps) {\n const classNames = clsx(className, \"navigation-pill-panel\");\n return <RACTabPanel className={classNames} {...props} />;\n}\n\nexport type NavigationPillShape = \"pill\" | \"rounded\";\n\nexport type NavigationPillsProps = RACTabsProps & {\n shape?: NavigationPillShape;\n};\nexport function NavigationPills({\n className,\n shape = \"pill\",\n ...props\n}: NavigationPillsProps) {\n const classNames = clsx(className, \"navigation-pills\", `navigation-pills-shape-${shape}`);\n return <RACTabs className={classNames} {...props} />;\n}\n"],"names":["NavigationPill","className","props","classNames","clsx","jsx","RACTab","NavigationPillList","RACTabList","NavigationPillPanel","RACTabPanel","NavigationPills","shape","RACTabs"],"mappings":"4OAcO,SAASA,EAAe,CAAE,UAAAC,EAAW,GAAGC,GAA8B,CAC3E,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,iBAAiB,EACpD,OAAOI,EAAAA,IAACC,EAAAA,IAAA,CAAO,UAAWH,EAAa,GAAGD,EAAO,CACnD,CAGO,SAASK,EAAqC,CACnD,UAAAN,EACA,GAAGC,CACL,EAA+B,CAC7B,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,sBAAsB,EACzD,OAAOI,EAAAA,IAACG,EAAAA,QAAA,CAAW,UAAWL,EAAa,GAAGD,EAAO,CACvD,CAGO,SAASO,EAAoB,CAClC,UAAAR,EACA,GAAGC,CACL,EAA6B,CAC3B,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,uBAAuB,EAC1D,OAAOI,EAAAA,IAACK,EAAAA,SAAA,CAAY,UAAWP,EAAa,GAAGD,EAAO,CACxD,CAOO,SAASS,EAAgB,CAC9B,UAAAV,EACA,MAAAW,EAAQ,OACR,GAAGV,CACL,EAAyB,CACvB,MAAMC,EAAaC,EAAAA,KAAKH,EAAW,mBAAoB,0BAA0BW,CAAK,EAAE,EACxF,OAAOP,EAAAA,IAACQ,EAAAA,KAAA,CAAQ,UAAWV,EAAa,GAAGD,EAAO,CACpD"}
|
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { Tab as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as n } from "../../../vendor/clsx/dist/clsx.js";
|
|
3
|
+
import { Tab as o, TabList as c, TabPanel as e, Tabs as r } from "react-aria-components";
|
|
4
4
|
/* empty css */
|
|
5
|
-
function
|
|
6
|
-
const s =
|
|
7
|
-
return /* @__PURE__ */
|
|
5
|
+
function v({ className: a, ...i }) {
|
|
6
|
+
const s = n(a, "navigation-pill");
|
|
7
|
+
return /* @__PURE__ */ l(o, { className: s, ...i });
|
|
8
8
|
}
|
|
9
9
|
function u({
|
|
10
10
|
className: a,
|
|
11
11
|
...i
|
|
12
12
|
}) {
|
|
13
|
-
const s =
|
|
14
|
-
return /* @__PURE__ */
|
|
13
|
+
const s = n(a, "navigation-pill-list");
|
|
14
|
+
return /* @__PURE__ */ l(c, { className: s, ...i });
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function f({
|
|
17
17
|
className: a,
|
|
18
18
|
...i
|
|
19
19
|
}) {
|
|
20
|
-
const s =
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
const s = n(a, "navigation-pill-panel");
|
|
21
|
+
return /* @__PURE__ */ l(e, { className: s, ...i });
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
function P({
|
|
24
|
+
className: a,
|
|
25
|
+
shape: i = "pill",
|
|
26
|
+
...s
|
|
27
|
+
}) {
|
|
28
|
+
const t = n(a, "navigation-pills", `navigation-pills-shape-${i}`);
|
|
29
|
+
return /* @__PURE__ */ l(r, { className: t, ...s });
|
|
26
30
|
}
|
|
27
31
|
export {
|
|
28
|
-
|
|
32
|
+
v as NavigationPill,
|
|
29
33
|
u as NavigationPillList,
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
f as NavigationPillPanel,
|
|
35
|
+
P as NavigationPills
|
|
32
36
|
};
|
|
33
37
|
//# sourceMappingURL=NavigationPill.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationPill.js","sources":["../../../../../src/ui/primitives/NavigationPill/NavigationPill.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport {\n Tab as RACTab,\n TabList as RACTabList,\n TabPanel as RACTabPanel,\n Tabs as RACTabs,\n type TabListProps as RACTabListProps,\n type TabPanelProps as RACTabPanelProps,\n type TabProps as RACTabProps,\n type TabsProps as RACTabsProps,\n} from \"react-aria-components\";\nimport \"./navigationPill.css\";\n\nexport type NavigationPillProps = RACTabProps;\nexport function NavigationPill({ className, ...props }: NavigationPillProps) {\n const classNames = clsx(className, \"navigation-pill\");\n return <RACTab className={classNames} {...props} />;\n}\n\nexport type NavigationPillListProps<T> = RACTabListProps<T>;\nexport function NavigationPillList<T extends object>({\n className,\n ...props\n}: NavigationPillListProps<T>) {\n const classNames = clsx(className, \"navigation-pill-list\");\n return <RACTabList className={classNames} {...props} />;\n}\n\nexport type NavigationPillPanelProps = RACTabPanelProps;\nexport function NavigationPillPanel({\n className,\n ...props\n}: NavigationPillPanelProps) {\n const classNames = clsx(className, \"navigation-pill-panel\");\n return <RACTabPanel className={classNames} {...props} />;\n}\n\nexport type NavigationPillsProps = RACTabsProps;\nexport function NavigationPills({
|
|
1
|
+
{"version":3,"file":"NavigationPill.js","sources":["../../../../../src/ui/primitives/NavigationPill/NavigationPill.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport {\n Tab as RACTab,\n TabList as RACTabList,\n TabPanel as RACTabPanel,\n Tabs as RACTabs,\n type TabListProps as RACTabListProps,\n type TabPanelProps as RACTabPanelProps,\n type TabProps as RACTabProps,\n type TabsProps as RACTabsProps,\n} from \"react-aria-components\";\nimport \"./navigationPill.css\";\n\nexport type NavigationPillProps = RACTabProps;\nexport function NavigationPill({ className, ...props }: NavigationPillProps) {\n const classNames = clsx(className, \"navigation-pill\");\n return <RACTab className={classNames} {...props} />;\n}\n\nexport type NavigationPillListProps<T> = RACTabListProps<T>;\nexport function NavigationPillList<T extends object>({\n className,\n ...props\n}: NavigationPillListProps<T>) {\n const classNames = clsx(className, \"navigation-pill-list\");\n return <RACTabList className={classNames} {...props} />;\n}\n\nexport type NavigationPillPanelProps = RACTabPanelProps;\nexport function NavigationPillPanel({\n className,\n ...props\n}: NavigationPillPanelProps) {\n const classNames = clsx(className, \"navigation-pill-panel\");\n return <RACTabPanel className={classNames} {...props} />;\n}\n\nexport type NavigationPillShape = \"pill\" | \"rounded\";\n\nexport type NavigationPillsProps = RACTabsProps & {\n shape?: NavigationPillShape;\n};\nexport function NavigationPills({\n className,\n shape = \"pill\",\n ...props\n}: NavigationPillsProps) {\n const classNames = clsx(className, \"navigation-pills\", `navigation-pills-shape-${shape}`);\n return <RACTabs className={classNames} {...props} />;\n}\n"],"names":["NavigationPill","className","props","classNames","clsx","jsx","RACTab","NavigationPillList","RACTabList","NavigationPillPanel","RACTabPanel","NavigationPills","shape","RACTabs"],"mappings":";;;;AAcO,SAASA,EAAe,EAAE,WAAAC,GAAW,GAAGC,KAA8B;AAC3E,QAAMC,IAAaC,EAAKH,GAAW,iBAAiB;AACpD,SAAO,gBAAAI,EAACC,GAAA,EAAO,WAAWH,GAAa,GAAGD,GAAO;AACnD;AAGO,SAASK,EAAqC;AAAA,EACnD,WAAAN;AAAA,EACA,GAAGC;AACL,GAA+B;AAC7B,QAAMC,IAAaC,EAAKH,GAAW,sBAAsB;AACzD,SAAO,gBAAAI,EAACG,GAAA,EAAW,WAAWL,GAAa,GAAGD,GAAO;AACvD;AAGO,SAASO,EAAoB;AAAA,EAClC,WAAAR;AAAA,EACA,GAAGC;AACL,GAA6B;AAC3B,QAAMC,IAAaC,EAAKH,GAAW,uBAAuB;AAC1D,SAAO,gBAAAI,EAACK,GAAA,EAAY,WAAWP,GAAa,GAAGD,GAAO;AACxD;AAOO,SAASS,EAAgB;AAAA,EAC9B,WAAAV;AAAA,EACA,OAAAW,IAAQ;AAAA,EACR,GAAGV;AACL,GAAyB;AACvB,QAAMC,IAAaC,EAAKH,GAAW,oBAAoB,0BAA0BW,CAAK,EAAE;AACxF,SAAO,gBAAAP,EAACQ,GAAA,EAAQ,WAAWV,GAAa,GAAGD,GAAO;AACpD;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),m=require("../../../vendor/clsx/dist/clsx.cjs"),a=require("react"),s=require("react-aria-components");;/* empty css */const q=require("../../hooks/useOverlayPortal.cjs"),j=require("../Fieldset/Fieldset.cjs"),S=require("../Input/Input.cjs"),i=require("../ListBox/ListBox.cjs"),v=a.forwardRef(function({className:u,results:t,onSearch:n,...o},l){const[h,x]=a.useState(""),c=e=>{x(e),n&&n(e)},p=m.clsx(u,"search-input-container"),d=q.useOverlayPortalContainer();return r.jsxs(s.ComboBox,{className:p,children:[r.jsx(j.Label,{hidden:!0,children:o["aria-label"]||"Search"}),r.jsx(S.Input,{type:"search",className:"search-input",value:h,onInput:e=>c(e.currentTarget.value),ref:l,...o}),r.jsx(s.Popover,{UNSTABLE_portalContainer:d,children:r.jsx(i.ListBox,{children:t==null?void 0:t.map(e=>r.jsx(i.ListBoxItem,{onAction:()=>c(e),children:e},e))})})]})});exports.Search=v;
|
|
2
2
|
//# sourceMappingURL=Search.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.cjs","sources":["../../../../../src/ui/primitives/Search/Search.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport {
|
|
1
|
+
{"version":3,"file":"Search.cjs","sources":["../../../../../src/ui/primitives/Search/Search.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { Input, Label, ListBox, ListBoxItem } from \"primitives\";\nimport React, { useState } from \"react\";\nimport {\n ComboBox as RACComboBox,\n Popover as RACPopover,\n type InputProps as RACInputProps,\n} from \"react-aria-components\";\nimport \"./search.css\";\n\nexport type SearchProps = Omit<RACInputProps, \"results\"> & {\n results?: string[];\n onSearch?: (search: string) => void;\n};\n\nexport const Search = React.forwardRef(function Search(\n { className, results, onSearch, ...props }: SearchProps,\n ref: React.ForwardedRef<HTMLInputElement>,\n) {\n const [searchTerm, setSearchTerm] = useState(\"\");\n\n const onInputInput = (search: string) => {\n setSearchTerm(search);\n if (onSearch) {\n onSearch(search);\n }\n };\n\n const classNames = clsx(className, \"search-input-container\");\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n\n return (\n <RACComboBox className={classNames}>\n <Label hidden>{props[\"aria-label\"] || \"Search\"}</Label>\n <Input\n type=\"search\"\n className=\"search-input\"\n value={searchTerm}\n onInput={(e) => onInputInput(e.currentTarget.value)}\n ref={ref}\n {...props}\n />\n <RACPopover UNSTABLE_portalContainer={portalContainer}>\n <ListBox>\n {results?.map((a) => (\n <ListBoxItem key={a} onAction={() => onInputInput(a)}>\n {a}\n </ListBoxItem>\n ))}\n </ListBox>\n </RACPopover>\n </RACComboBox>\n );\n});\n"],"names":["Search","React","className","results","onSearch","props","ref","searchTerm","setSearchTerm","useState","onInputInput","search","classNames","clsx","portalContainer","useOverlayPortalContainer","jsxs","RACComboBox","jsx","Label","Input","RACPopover","ListBox","a","ListBoxItem"],"mappings":"qZAgBaA,EAASC,EAAM,WAAW,SACrC,CAAE,UAAAC,EAAW,QAAAC,EAAS,SAAAC,EAAU,GAAGC,CAAA,EACnCC,EACA,CACA,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAAA,SAAS,EAAE,EAEzCC,EAAgBC,GAAmB,CACvCH,EAAcG,CAAM,EAChBP,GACFA,EAASO,CAAM,CAEnB,EAEMC,EAAaC,EAAAA,KAAKX,EAAW,wBAAwB,EAGrDY,EAAkBC,EAAAA,0BAAA,EAExB,OACEC,EAAAA,KAACC,EAAAA,SAAA,CAAY,UAAWL,EACtB,SAAA,CAAAM,MAACC,EAAAA,OAAM,OAAM,GAAE,SAAAd,EAAM,YAAY,GAAK,SAAS,EAC/Ca,EAAAA,IAACE,EAAAA,MAAA,CACC,KAAK,SACL,UAAU,eACV,MAAOb,EACP,QAAU,GAAMG,EAAa,EAAE,cAAc,KAAK,EAClD,IAAAJ,EACC,GAAGD,CAAA,CAAA,EAENa,EAAAA,IAACG,EAAAA,SAAW,yBAA0BP,EACpC,eAACQ,EAAAA,QAAA,CACE,SAAAnB,GAAA,YAAAA,EAAS,IAAKoB,SACZC,cAAA,CAAoB,SAAU,IAAMd,EAAaa,CAAC,EAChD,SAAAA,CAAA,EADeA,CAElB,EACD,CACH,CAAA,CACF,CAAA,EACF,CAEJ,CAAC"}
|
|
@@ -1,60 +1,33 @@
|
|
|
1
|
-
import { jsxs as f, jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import
|
|
4
|
-
import { ComboBox as
|
|
1
|
+
import { jsxs as f, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as h } from "../../../vendor/clsx/dist/clsx.js";
|
|
3
|
+
import u, { useState as d } from "react";
|
|
4
|
+
import { ComboBox as x, Popover as I } from "react-aria-components";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/* @__PURE__ */ e(L, { hidden: !0, children: i["aria-label"] || "Search" }),
|
|
19
|
-
/* @__PURE__ */ e(
|
|
20
|
-
P,
|
|
6
|
+
import { useOverlayPortalContainer as S } from "../../hooks/useOverlayPortal.js";
|
|
7
|
+
import { Label as v } from "../Fieldset/Fieldset.js";
|
|
8
|
+
import { Input as B } from "../Input/Input.js";
|
|
9
|
+
import { ListBox as C, ListBoxItem as L } from "../ListBox/ListBox.js";
|
|
10
|
+
const E = u.forwardRef(function({ className: i, results: t, onSearch: e, ...n }, c) {
|
|
11
|
+
const [m, p] = d(""), a = (r) => {
|
|
12
|
+
p(r), e && e(r);
|
|
13
|
+
}, s = h(i, "search-input-container"), l = S();
|
|
14
|
+
return /* @__PURE__ */ f(x, { className: s, children: [
|
|
15
|
+
/* @__PURE__ */ o(v, { hidden: !0, children: n["aria-label"] || "Search" }),
|
|
16
|
+
/* @__PURE__ */ o(
|
|
17
|
+
B,
|
|
21
18
|
{
|
|
22
19
|
type: "search",
|
|
23
20
|
className: "search-input",
|
|
24
|
-
value:
|
|
25
|
-
onInput: (r) =>
|
|
26
|
-
ref:
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
...i
|
|
21
|
+
value: m,
|
|
22
|
+
onInput: (r) => a(r.currentTarget.value),
|
|
23
|
+
ref: c,
|
|
24
|
+
...n
|
|
30
25
|
}
|
|
31
26
|
),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
m,
|
|
34
|
-
{
|
|
35
|
-
"aria-label": "Clear search",
|
|
36
|
-
onPress: () => n(""),
|
|
37
|
-
size: "small",
|
|
38
|
-
variant: "subtle",
|
|
39
|
-
children: /* @__PURE__ */ e(S, {})
|
|
40
|
-
}
|
|
41
|
-
) : /* @__PURE__ */ e(
|
|
42
|
-
m,
|
|
43
|
-
{
|
|
44
|
-
"aria-label": "Clear search",
|
|
45
|
-
onPress: () => {
|
|
46
|
-
var r;
|
|
47
|
-
return (r = t == null ? void 0 : t.current) == null ? void 0 : r.focus();
|
|
48
|
-
},
|
|
49
|
-
size: "small",
|
|
50
|
-
variant: "subtle",
|
|
51
|
-
children: /* @__PURE__ */ e(B, {})
|
|
52
|
-
}
|
|
53
|
-
) }),
|
|
54
|
-
/* @__PURE__ */ e(C, { UNSTABLE_portalContainer: u, children: /* @__PURE__ */ e(T, { children: a == null ? void 0 : a.map((r) => /* @__PURE__ */ e(y, { onAction: () => n(r), children: r }, r)) }) })
|
|
27
|
+
/* @__PURE__ */ o(I, { UNSTABLE_portalContainer: l, children: /* @__PURE__ */ o(C, { children: t == null ? void 0 : t.map((r) => /* @__PURE__ */ o(L, { onAction: () => a(r), children: r }, r)) }) })
|
|
55
28
|
] });
|
|
56
29
|
});
|
|
57
30
|
export {
|
|
58
|
-
|
|
31
|
+
E as Search
|
|
59
32
|
};
|
|
60
33
|
//# sourceMappingURL=Search.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.js","sources":["../../../../../src/ui/primitives/Search/Search.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport {
|
|
1
|
+
{"version":3,"file":"Search.js","sources":["../../../../../src/ui/primitives/Search/Search.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useOverlayPortalContainer } from \"hooks\";\nimport { Input, Label, ListBox, ListBoxItem } from \"primitives\";\nimport React, { useState } from \"react\";\nimport {\n ComboBox as RACComboBox,\n Popover as RACPopover,\n type InputProps as RACInputProps,\n} from \"react-aria-components\";\nimport \"./search.css\";\n\nexport type SearchProps = Omit<RACInputProps, \"results\"> & {\n results?: string[];\n onSearch?: (search: string) => void;\n};\n\nexport const Search = React.forwardRef(function Search(\n { className, results, onSearch, ...props }: SearchProps,\n ref: React.ForwardedRef<HTMLInputElement>,\n) {\n const [searchTerm, setSearchTerm] = useState(\"\");\n\n const onInputInput = (search: string) => {\n setSearchTerm(search);\n if (onSearch) {\n onSearch(search);\n }\n };\n\n const classNames = clsx(className, \"search-input-container\");\n // Sem container explícito o dropdown faz portal no document.body — fora da\n // shadow root do MFE, sem CSS. Ver ui/hooks/useOverlayPortal.\n const portalContainer = useOverlayPortalContainer();\n\n return (\n <RACComboBox className={classNames}>\n <Label hidden>{props[\"aria-label\"] || \"Search\"}</Label>\n <Input\n type=\"search\"\n className=\"search-input\"\n value={searchTerm}\n onInput={(e) => onInputInput(e.currentTarget.value)}\n ref={ref}\n {...props}\n />\n <RACPopover UNSTABLE_portalContainer={portalContainer}>\n <ListBox>\n {results?.map((a) => (\n <ListBoxItem key={a} onAction={() => onInputInput(a)}>\n {a}\n </ListBoxItem>\n ))}\n </ListBox>\n </RACPopover>\n </RACComboBox>\n );\n});\n"],"names":["Search","React","className","results","onSearch","props","ref","searchTerm","setSearchTerm","useState","onInputInput","search","classNames","clsx","portalContainer","useOverlayPortalContainer","jsxs","RACComboBox","jsx","Label","Input","e","RACPopover","ListBox","a","ListBoxItem"],"mappings":";;;;;;;;;AAgBO,MAAMA,IAASC,EAAM,WAAW,SACrC,EAAE,WAAAC,GAAW,SAAAC,GAAS,UAAAC,GAAU,GAAGC,EAAA,GACnCC,GACA;AACA,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAE,GAEzCC,IAAe,CAACC,MAAmB;AACvC,IAAAH,EAAcG,CAAM,GAChBP,KACFA,EAASO,CAAM;AAAA,EAEnB,GAEMC,IAAaC,EAAKX,GAAW,wBAAwB,GAGrDY,IAAkBC,EAAA;AAExB,SACE,gBAAAC,EAACC,GAAA,EAAY,WAAWL,GACtB,UAAA;AAAA,IAAA,gBAAAM,EAACC,KAAM,QAAM,IAAE,UAAAd,EAAM,YAAY,KAAK,UAAS;AAAA,IAC/C,gBAAAa;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAU;AAAA,QACV,OAAOb;AAAA,QACP,SAAS,CAACc,MAAMX,EAAaW,EAAE,cAAc,KAAK;AAAA,QAClD,KAAAf;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IAAA;AAAA,IAEN,gBAAAa,EAACI,KAAW,0BAA0BR,GACpC,4BAACS,GAAA,EACE,UAAApB,KAAA,gBAAAA,EAAS,IAAI,CAACqB,wBACZC,GAAA,EAAoB,UAAU,MAAMf,EAAac,CAAC,GAChD,UAAAA,EAAA,GADeA,CAElB,GACD,CACH,EAAA,CACF;AAAA,EAAA,GACF;AAEJ,CAAC;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { JsonEditorSize } from "./json-code-mirror";
|
|
1
2
|
import "./jsonviewer.css";
|
|
2
|
-
export interface JsonEditorProps {
|
|
3
|
+
export interface JsonEditorProps extends JsonEditorSize {
|
|
3
4
|
value: string;
|
|
4
5
|
onChange?: (value: string) => void;
|
|
5
6
|
expandAllLabel: string;
|
|
6
7
|
className?: string;
|
|
7
|
-
height?: string | number;
|
|
8
8
|
isDisabled?: boolean;
|
|
9
9
|
isReadOnly?: boolean;
|
|
10
10
|
"aria-label"?: string;
|
|
@@ -15,4 +15,4 @@ export interface JsonEditorProps {
|
|
|
15
15
|
* `JsonViewer` stays read-only-only on purpose so its bundle keeps assuming
|
|
16
16
|
* a static document; this component owns the editable/controlled behavior.
|
|
17
17
|
*/
|
|
18
|
-
export declare function JsonEditor({ value, onChange, expandAllLabel, className, height, isDisabled, isReadOnly, "aria-label": ariaLabel, }: JsonEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function JsonEditor({ value, onChange, expandAllLabel, className, height, minHeight, maxHeight, isDisabled, isReadOnly, "aria-label": ariaLabel, }: JsonEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { JsonEditorSize } from "./json-code-mirror";
|
|
2
3
|
import "./jsonviewer.css";
|
|
3
4
|
export interface JsonViewerAction {
|
|
4
5
|
key: string;
|
|
@@ -6,11 +7,10 @@ export interface JsonViewerAction {
|
|
|
6
7
|
icon: ReactNode;
|
|
7
8
|
onPress: () => void;
|
|
8
9
|
}
|
|
9
|
-
export interface JsonViewerProps {
|
|
10
|
+
export interface JsonViewerProps extends JsonEditorSize {
|
|
10
11
|
value: unknown;
|
|
11
12
|
expandAllLabel: string;
|
|
12
13
|
actions?: JsonViewerAction[];
|
|
13
14
|
className?: string;
|
|
14
|
-
height?: string | number;
|
|
15
15
|
}
|
|
16
|
-
export declare function JsonViewer({ value, expandAllLabel, actions, className, height }: JsonViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function JsonViewer({ value, expandAllLabel, actions, className, height, minHeight, maxHeight, }: JsonViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
1
2
|
import { HighlightStyle } from "@codemirror/language";
|
|
2
3
|
export declare const jsonHighlightStyle: HighlightStyle;
|
|
3
4
|
export declare const jsonEditorTheme: import("@codemirror/state").Extension;
|
|
4
5
|
export declare const jsonEditorExtensions: import("@codemirror/state").Extension[];
|
|
5
6
|
export declare function serializeJson(value: unknown): string;
|
|
6
7
|
export declare function toCssSize(size: string | number): string;
|
|
8
|
+
export interface JsonEditorSize {
|
|
9
|
+
height?: string | number;
|
|
10
|
+
minHeight?: string | number;
|
|
11
|
+
maxHeight?: string | number;
|
|
12
|
+
}
|
|
13
|
+
export declare function toEditorSizeStyle({ height, minHeight, maxHeight }: JsonEditorSize): CSSProperties;
|
|
7
14
|
/**
|
|
8
15
|
* Finds the fold range of every direct child (depth 1) of the root object/array
|
|
9
16
|
* by scanning the text itself for matching brackets. This mirrors what
|
|
@@ -6,5 +6,8 @@ export type NavigationPillListProps<T> = RACTabListProps<T>;
|
|
|
6
6
|
export declare function NavigationPillList<T extends object>({ className, ...props }: NavigationPillListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export type NavigationPillPanelProps = RACTabPanelProps;
|
|
8
8
|
export declare function NavigationPillPanel({ className, ...props }: NavigationPillPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export type
|
|
10
|
-
export
|
|
9
|
+
export type NavigationPillShape = "pill" | "rounded";
|
|
10
|
+
export type NavigationPillsProps = RACTabsProps & {
|
|
11
|
+
shape?: NavigationPillShape;
|
|
12
|
+
};
|
|
13
|
+
export declare function NavigationPills({ className, shape, ...props }: NavigationPillsProps): import("react/jsx-runtime").JSX.Element;
|