@apipass/design-system 5.5.0 → 5.7.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/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 +1 -1
- 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/NavigationPill/NavigationPill.d.ts +5 -2
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("../../../vendor/clsx/dist/clsx.cjs");;/* empty css */function u({className:s,alignPrimary:l="start",alignSecondary:e="start",container:t=!1,direction:x="row",gap:r,type:c="auto",wrap:f=!1,...a}){const o=n.clsx(s,"flex",t&&"flex-container",`flex-align-primary-${l}`,`flex-align-secondary-${e}`,`flex-direction-${x}`,`flex-type-${c}`,r&&`flex-gap-${r}`,f&&"flex-wrap");return i.jsx("div",{className:o,...a,style:{...a.style,"--flex-align-primary":l,"--flex-align-secondary":e,"--flex-direction":x}})}function m({className:s,children:l,size:e}){const t=n.clsx(s,"flex-item",e&&`flex-item-size-${e}`);return i.jsx("div",{className:t,children:l})}exports.Flex=u;exports.FlexItem=m;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("../../../vendor/clsx/dist/clsx.cjs");;/* empty css */function u({className:s,alignPrimary:l="start",alignSecondary:e="start",container:t=!1,direction:x="row",gap:r,type:c="auto",wrap:f=!1,...a}){const o=n.clsx(s,"flex",t&&"flex-container",`flex-align-primary-${l}`,`flex-align-secondary-${e}`,`flex-direction-${x}`,`flex-type-${c}`,r&&`flex-gap-${r}`,f&&"sds-flex-wrap");return i.jsx("div",{className:o,...a,style:{...a.style,"--flex-align-primary":l,"--flex-align-secondary":e,"--flex-direction":x}})}function m({className:s,children:l,size:e}){const t=n.clsx(s,"flex-item",e&&`flex-item-size-${e}`);return i.jsx("div",{className:t,children:l})}exports.Flex=u;exports.FlexItem=m;
|
|
2
2
|
//# sourceMappingURL=Flex.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.cjs","sources":["../../../../../src/ui/layout/Flex/Flex.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { CSSProperties, ComponentPropsWithoutRef } from \"react\";\nimport \"./flex.css\";\n\nexport type FlexProps = ComponentPropsWithoutRef<\"div\"> & {\n alignPrimary?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"space-between\";\n alignSecondary?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"space-between\";\n direction?: \"row\" | \"row-reverse\" | \"column\" | \"column-reverse\";\n gap?: \"100\" | \"200\" | \"300\" | \"400\" | \"600\" | \"800\" | \"1200\" | \"1600\";\n type?: \"quarter\" | \"third\" | \"half\" | \"auto\";\n container?: boolean;\n wrap?: boolean;\n};\nexport function Flex({\n className,\n alignPrimary = \"start\",\n alignSecondary = \"start\",\n container = false,\n direction = \"row\",\n gap,\n type = \"auto\",\n wrap = false,\n ...props\n}: FlexProps) {\n const classNames = clsx(\n className,\n \"flex\",\n container && \"flex-container\",\n `flex-align-primary-${alignPrimary}`,\n `flex-align-secondary-${alignSecondary}`,\n `flex-direction-${direction}`,\n `flex-type-${type}`,\n gap && `flex-gap-${gap}`,\n wrap && `flex-wrap`,\n );\n return (\n <div\n className={classNames}\n {...props}\n style={{\n ...props.style,\n \"--flex-align-primary\": alignPrimary,\n \"--flex-align-secondary\": alignSecondary,\n \"--flex-direction\": direction,\n } as CSSProperties}\n />\n );\n}\n\ntype FlexItemSize = \"full\" | \"major\" | \"minor\" | \"half\" | \"fill\";\nexport type FlexItemProps = ComponentPropsWithoutRef<\"div\"> & {\n size?: FlexItemSize;\n};\nexport function FlexItem({ className, children, size }: FlexItemProps) {\n const classNames = clsx(\n className,\n \"flex-item\",\n size && `flex-item-size-${size}`,\n );\n return <div className={classNames}>{children}</div>;\n}\n"],"names":["Flex","className","alignPrimary","alignSecondary","container","direction","gap","type","wrap","props","classNames","clsx","jsx","FlexItem","children","size"],"mappings":"+LAaO,SAASA,EAAK,CACnB,UAAAC,EACA,aAAAC,EAAe,QACf,eAAAC,EAAiB,QACjB,UAAAC,EAAY,GACZ,UAAAC,EAAY,MACZ,IAAAC,EACA,KAAAC,EAAO,OACP,KAAAC,EAAO,GACP,GAAGC,CACL,EAAc,CACZ,MAAMC,EAAaC,EAAAA,KACjBV,EACA,OACAG,GAAa,iBACb,sBAAsBF,CAAY,GAClC,wBAAwBC,CAAc,GACtC,kBAAkBE,CAAS,GAC3B,aAAaE,CAAI,GACjBD,GAAO,YAAYA,CAAG,GACtBE,GAAQ,
|
|
1
|
+
{"version":3,"file":"Flex.cjs","sources":["../../../../../src/ui/layout/Flex/Flex.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { CSSProperties, ComponentPropsWithoutRef } from \"react\";\nimport \"./flex.css\";\n\nexport type FlexProps = ComponentPropsWithoutRef<\"div\"> & {\n alignPrimary?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"space-between\";\n alignSecondary?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"space-between\";\n direction?: \"row\" | \"row-reverse\" | \"column\" | \"column-reverse\";\n gap?: \"100\" | \"200\" | \"300\" | \"400\" | \"600\" | \"800\" | \"1200\" | \"1600\";\n type?: \"quarter\" | \"third\" | \"half\" | \"auto\";\n container?: boolean;\n wrap?: boolean;\n};\nexport function Flex({\n className,\n alignPrimary = \"start\",\n alignSecondary = \"start\",\n container = false,\n direction = \"row\",\n gap,\n type = \"auto\",\n wrap = false,\n ...props\n}: FlexProps) {\n const classNames = clsx(\n className,\n \"flex\",\n container && \"flex-container\",\n `flex-align-primary-${alignPrimary}`,\n `flex-align-secondary-${alignSecondary}`,\n `flex-direction-${direction}`,\n `flex-type-${type}`,\n gap && `flex-gap-${gap}`,\n wrap && `sds-flex-wrap`,\n );\n return (\n <div\n className={classNames}\n {...props}\n style={{\n ...props.style,\n \"--flex-align-primary\": alignPrimary,\n \"--flex-align-secondary\": alignSecondary,\n \"--flex-direction\": direction,\n } as CSSProperties}\n />\n );\n}\n\ntype FlexItemSize = \"full\" | \"major\" | \"minor\" | \"half\" | \"fill\";\nexport type FlexItemProps = ComponentPropsWithoutRef<\"div\"> & {\n size?: FlexItemSize;\n};\nexport function FlexItem({ className, children, size }: FlexItemProps) {\n const classNames = clsx(\n className,\n \"flex-item\",\n size && `flex-item-size-${size}`,\n );\n return <div className={classNames}>{children}</div>;\n}\n"],"names":["Flex","className","alignPrimary","alignSecondary","container","direction","gap","type","wrap","props","classNames","clsx","jsx","FlexItem","children","size"],"mappings":"+LAaO,SAASA,EAAK,CACnB,UAAAC,EACA,aAAAC,EAAe,QACf,eAAAC,EAAiB,QACjB,UAAAC,EAAY,GACZ,UAAAC,EAAY,MACZ,IAAAC,EACA,KAAAC,EAAO,OACP,KAAAC,EAAO,GACP,GAAGC,CACL,EAAc,CACZ,MAAMC,EAAaC,EAAAA,KACjBV,EACA,OACAG,GAAa,iBACb,sBAAsBF,CAAY,GAClC,wBAAwBC,CAAc,GACtC,kBAAkBE,CAAS,GAC3B,aAAaE,CAAI,GACjBD,GAAO,YAAYA,CAAG,GACtBE,GAAQ,eAAA,EAEV,OACEI,EAAAA,IAAC,MAAA,CACC,UAAWF,EACV,GAAGD,EACJ,MAAO,CACL,GAAGA,EAAM,MACT,uBAAwBP,EACxB,yBAA0BC,EAC1B,mBAAoBE,CAAA,CACtB,CAAA,CAGN,CAMO,SAASQ,EAAS,CAAE,UAAAZ,EAAW,SAAAa,EAAU,KAAAC,GAAuB,CACrE,MAAML,EAAaC,EAAAA,KACjBV,EACA,YACAc,GAAQ,kBAAkBA,CAAI,EAAA,EAEhC,OAAOH,EAAAA,IAAC,MAAA,CAAI,UAAWF,EAAa,SAAAI,CAAA,CAAS,CAC/C"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as x } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as i } from "../../../vendor/clsx/dist/clsx.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
function
|
|
5
|
-
className:
|
|
4
|
+
function d({
|
|
5
|
+
className: s,
|
|
6
6
|
alignPrimary: l = "start",
|
|
7
7
|
alignSecondary: e = "start",
|
|
8
|
-
container:
|
|
8
|
+
container: t = !1,
|
|
9
9
|
direction: a = "row",
|
|
10
10
|
gap: f,
|
|
11
11
|
type: n = "auto",
|
|
@@ -13,15 +13,15 @@ function u({
|
|
|
13
13
|
...r
|
|
14
14
|
}) {
|
|
15
15
|
const m = i(
|
|
16
|
-
|
|
16
|
+
s,
|
|
17
17
|
"flex",
|
|
18
|
-
|
|
18
|
+
t && "flex-container",
|
|
19
19
|
`flex-align-primary-${l}`,
|
|
20
20
|
`flex-align-secondary-${e}`,
|
|
21
21
|
`flex-direction-${a}`,
|
|
22
22
|
`flex-type-${n}`,
|
|
23
23
|
f && `flex-gap-${f}`,
|
|
24
|
-
o && "flex-wrap"
|
|
24
|
+
o && "sds-flex-wrap"
|
|
25
25
|
);
|
|
26
26
|
return /* @__PURE__ */ x(
|
|
27
27
|
"div",
|
|
@@ -37,16 +37,16 @@ function u({
|
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
|
|
40
|
+
function u({ className: s, children: l, size: e }) {
|
|
41
|
+
const t = i(
|
|
42
|
+
s,
|
|
43
43
|
"flex-item",
|
|
44
44
|
e && `flex-item-size-${e}`
|
|
45
45
|
);
|
|
46
|
-
return /* @__PURE__ */ x("div", { className:
|
|
46
|
+
return /* @__PURE__ */ x("div", { className: t, children: l });
|
|
47
47
|
}
|
|
48
48
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
d as Flex,
|
|
50
|
+
u as FlexItem
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=Flex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.js","sources":["../../../../../src/ui/layout/Flex/Flex.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { CSSProperties, ComponentPropsWithoutRef } from \"react\";\nimport \"./flex.css\";\n\nexport type FlexProps = ComponentPropsWithoutRef<\"div\"> & {\n alignPrimary?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"space-between\";\n alignSecondary?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"space-between\";\n direction?: \"row\" | \"row-reverse\" | \"column\" | \"column-reverse\";\n gap?: \"100\" | \"200\" | \"300\" | \"400\" | \"600\" | \"800\" | \"1200\" | \"1600\";\n type?: \"quarter\" | \"third\" | \"half\" | \"auto\";\n container?: boolean;\n wrap?: boolean;\n};\nexport function Flex({\n className,\n alignPrimary = \"start\",\n alignSecondary = \"start\",\n container = false,\n direction = \"row\",\n gap,\n type = \"auto\",\n wrap = false,\n ...props\n}: FlexProps) {\n const classNames = clsx(\n className,\n \"flex\",\n container && \"flex-container\",\n `flex-align-primary-${alignPrimary}`,\n `flex-align-secondary-${alignSecondary}`,\n `flex-direction-${direction}`,\n `flex-type-${type}`,\n gap && `flex-gap-${gap}`,\n wrap && `flex-wrap`,\n );\n return (\n <div\n className={classNames}\n {...props}\n style={{\n ...props.style,\n \"--flex-align-primary\": alignPrimary,\n \"--flex-align-secondary\": alignSecondary,\n \"--flex-direction\": direction,\n } as CSSProperties}\n />\n );\n}\n\ntype FlexItemSize = \"full\" | \"major\" | \"minor\" | \"half\" | \"fill\";\nexport type FlexItemProps = ComponentPropsWithoutRef<\"div\"> & {\n size?: FlexItemSize;\n};\nexport function FlexItem({ className, children, size }: FlexItemProps) {\n const classNames = clsx(\n className,\n \"flex-item\",\n size && `flex-item-size-${size}`,\n );\n return <div className={classNames}>{children}</div>;\n}\n"],"names":["Flex","className","alignPrimary","alignSecondary","container","direction","gap","type","wrap","props","classNames","clsx","jsx","FlexItem","children","size"],"mappings":";;;AAaO,SAASA,EAAK;AAAA,EACnB,WAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,gBAAAC,IAAiB;AAAA,EACjB,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,KAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,GAAGC;AACL,GAAc;AACZ,QAAMC,IAAaC;AAAA,IACjBV;AAAA,IACA;AAAA,IACAG,KAAa;AAAA,IACb,sBAAsBF,CAAY;AAAA,IAClC,wBAAwBC,CAAc;AAAA,IACtC,kBAAkBE,CAAS;AAAA,IAC3B,aAAaE,CAAI;AAAA,IACjBD,KAAO,YAAYA,CAAG;AAAA,IACtBE,KAAQ;AAAA,EAAA;AAEV,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWF;AAAA,MACV,GAAGD;AAAA,MACJ,OAAO;AAAA,QACL,GAAGA,EAAM;AAAA,QACT,wBAAwBP;AAAA,QACxB,0BAA0BC;AAAA,QAC1B,oBAAoBE;AAAA,MAAA;AAAA,IACtB;AAAA,EAAA;AAGN;AAMO,SAASQ,EAAS,EAAE,WAAAZ,GAAW,UAAAa,GAAU,MAAAC,KAAuB;AACrE,QAAML,IAAaC;AAAA,IACjBV;AAAA,IACA;AAAA,IACAc,KAAQ,kBAAkBA,CAAI;AAAA,EAAA;AAEhC,SAAO,gBAAAH,EAAC,OAAA,EAAI,WAAWF,GAAa,UAAAI,EAAA,CAAS;AAC/C;"}
|
|
1
|
+
{"version":3,"file":"Flex.js","sources":["../../../../../src/ui/layout/Flex/Flex.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { CSSProperties, ComponentPropsWithoutRef } from \"react\";\nimport \"./flex.css\";\n\nexport type FlexProps = ComponentPropsWithoutRef<\"div\"> & {\n alignPrimary?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"space-between\";\n alignSecondary?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"space-between\";\n direction?: \"row\" | \"row-reverse\" | \"column\" | \"column-reverse\";\n gap?: \"100\" | \"200\" | \"300\" | \"400\" | \"600\" | \"800\" | \"1200\" | \"1600\";\n type?: \"quarter\" | \"third\" | \"half\" | \"auto\";\n container?: boolean;\n wrap?: boolean;\n};\nexport function Flex({\n className,\n alignPrimary = \"start\",\n alignSecondary = \"start\",\n container = false,\n direction = \"row\",\n gap,\n type = \"auto\",\n wrap = false,\n ...props\n}: FlexProps) {\n const classNames = clsx(\n className,\n \"flex\",\n container && \"flex-container\",\n `flex-align-primary-${alignPrimary}`,\n `flex-align-secondary-${alignSecondary}`,\n `flex-direction-${direction}`,\n `flex-type-${type}`,\n gap && `flex-gap-${gap}`,\n wrap && `sds-flex-wrap`,\n );\n return (\n <div\n className={classNames}\n {...props}\n style={{\n ...props.style,\n \"--flex-align-primary\": alignPrimary,\n \"--flex-align-secondary\": alignSecondary,\n \"--flex-direction\": direction,\n } as CSSProperties}\n />\n );\n}\n\ntype FlexItemSize = \"full\" | \"major\" | \"minor\" | \"half\" | \"fill\";\nexport type FlexItemProps = ComponentPropsWithoutRef<\"div\"> & {\n size?: FlexItemSize;\n};\nexport function FlexItem({ className, children, size }: FlexItemProps) {\n const classNames = clsx(\n className,\n \"flex-item\",\n size && `flex-item-size-${size}`,\n );\n return <div className={classNames}>{children}</div>;\n}\n"],"names":["Flex","className","alignPrimary","alignSecondary","container","direction","gap","type","wrap","props","classNames","clsx","jsx","FlexItem","children","size"],"mappings":";;;AAaO,SAASA,EAAK;AAAA,EACnB,WAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,gBAAAC,IAAiB;AAAA,EACjB,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,KAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,GAAGC;AACL,GAAc;AACZ,QAAMC,IAAaC;AAAA,IACjBV;AAAA,IACA;AAAA,IACAG,KAAa;AAAA,IACb,sBAAsBF,CAAY;AAAA,IAClC,wBAAwBC,CAAc;AAAA,IACtC,kBAAkBE,CAAS;AAAA,IAC3B,aAAaE,CAAI;AAAA,IACjBD,KAAO,YAAYA,CAAG;AAAA,IACtBE,KAAQ;AAAA,EAAA;AAEV,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWF;AAAA,MACV,GAAGD;AAAA,MACJ,OAAO;AAAA,QACL,GAAGA,EAAM;AAAA,QACT,wBAAwBP;AAAA,QACxB,0BAA0BC;AAAA,QAC1B,oBAAoBE;AAAA,MAAA;AAAA,IACtB;AAAA,EAAA;AAGN;AAMO,SAASQ,EAAS,EAAE,WAAAZ,GAAW,UAAAa,GAAU,MAAAC,KAAuB;AACrE,QAAML,IAAaC;AAAA,IACjBV;AAAA,IACA;AAAA,IACAc,KAAQ,kBAAkBA,CAAI;AAAA,EAAA;AAEhC,SAAO,gBAAAH,EAAC,OAAA,EAAI,WAAWF,GAAa,UAAAI,EAAA,CAAS;AAC/C;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@codemirror/view"),f=require("@codemirror/lang-json"),c=require("@codemirror/language"),e=require("@lezer/highlight"),g=c.HighlightStyle.define([{tag:e.tags.propertyName,color:"var(--json-viewer-color-key)"},{tag:e.tags.string,color:"var(--json-viewer-color-string)",fontWeight:600},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"var(--json-viewer-color-scalar)"},{tag:[e.tags.separator,e.tags.squareBracket,e.tags.brace],color:"var(--json-viewer-color-punctuation)"}]),p=u.EditorView.theme({"&":{backgroundColor:"transparent",color:"var(--json-viewer-color-punctuation)",fontSize:"13px"},"&.cm-focused":{outline:"none"},".cm-content":{fontFamily:"var(--sds-typography-family-mono)",padding:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@codemirror/view"),f=require("@codemirror/lang-json"),c=require("@codemirror/language"),e=require("@lezer/highlight"),g=c.HighlightStyle.define([{tag:e.tags.propertyName,color:"var(--json-viewer-color-key)"},{tag:e.tags.string,color:"var(--json-viewer-color-string)",fontWeight:600},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"var(--json-viewer-color-scalar)"},{tag:[e.tags.separator,e.tags.squareBracket,e.tags.brace],color:"var(--json-viewer-color-punctuation)"}]),p=u.EditorView.theme({"&":{backgroundColor:"transparent",color:"var(--json-viewer-color-punctuation)",fontSize:"13px"},"&.cm-focused":{outline:"none"},".cm-content":{fontFamily:"var(--sds-typography-family-mono)",padding:"8px 124px 12px 4px"},".cm-gutters":{backgroundColor:"transparent",border:"none",color:"var(--json-viewer-color-caret)",paddingLeft:"5px"},".cm-scroller":{overflow:"auto"}}),d=[f.json(),c.foldGutter(),c.syntaxHighlighting(g)];function h(o){try{return JSON.stringify(o,null,2)??"null"}catch{return String(o)}}function m(o){return typeof o=="number"?`${o}px`:o}function v(o){const s=[],a=o.length;let t=0;for(;t<a&&o[t]!=="{"&&o[t]!=="[";)t++;if(t>=a)return s;let r=0,l=!1,i=-1;for(;t<a;t++){const n=o[t];if(l){n==="\\"?t++:n==='"'&&(l=!1);continue}if(n==='"'){l=!0;continue}if(n==="{"||n==="["){r++,r===2&&(i=t+1);continue}(n==="}"||n==="]")&&(r===2&&i!==-1&&(s.push({from:i,to:t}),i=-1),r--)}return s}exports.computeFirstLevelFoldRanges=v;exports.jsonEditorExtensions=d;exports.jsonEditorTheme=p;exports.jsonHighlightStyle=g;exports.serializeJson=h;exports.toCssSize=m;
|
|
2
2
|
//# sourceMappingURL=json-code-mirror.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-code-mirror.cjs","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.cjs","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: \"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\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","computeFirstLevelFoldRanges","text","ranges","n","i","depth","inString","pendingStart","ch"],"mappings":"uNAKaA,EAAqBC,EAAAA,eAAe,OAAO,CACtD,CAAE,IAAKC,EAAAA,KAAE,aAAc,MAAO,8BAAA,EAC9B,CAAE,IAAKA,EAAAA,KAAE,OAAQ,MAAO,kCAAmC,WAAY,GAAA,EACvE,CAAE,IAAK,CAACA,OAAE,OAAQA,EAAAA,KAAE,KAAMA,EAAAA,KAAE,IAAI,EAAG,MAAO,iCAAA,EAC1C,CAAE,IAAK,CAACA,EAAAA,KAAE,UAAWA,EAAAA,KAAE,cAAeA,OAAE,KAAK,EAAG,MAAO,sCAAA,CACzD,CAAC,EAEYC,EAAkBC,EAAAA,WAAW,MAAM,CAC9C,IAAK,CAAE,gBAAiB,cAAe,MAAO,uCAAwC,SAAU,MAAA,EAChG,eAAgB,CAAE,QAAS,MAAA,EAC3B,cAAe,CAAE,WAAY,oCAAqC,QAAS,oBAAA,EAC3E,cAAe,CACb,gBAAiB,cACjB,OAAQ,OACR,MAAO,iCACP,YAAa,KAAA,EAEf,eAAgB,CAAE,SAAU,MAAA,CAC9B,CAAC,EAEYC,EAAuB,CAACC,EAAAA,KAAA,EAAQC,EAAAA,aAAcC,EAAAA,mBAAmBR,CAAkB,CAAC,EAE1F,SAASS,EAAcC,EAAwB,CACpD,GAAI,CACF,OAAO,KAAK,UAAUA,EAAO,KAAM,CAAC,GAAK,MAC3C,MAAQ,CACN,OAAO,OAAOA,CAAK,CACrB,CACF,CAEO,SAASC,EAAUC,EAA+B,CACvD,OAAO,OAAOA,GAAS,SAAW,GAAGA,CAAI,KAAOA,CAClD,CASO,SAASC,EAA4BC,EAA8C,CACxF,MAAMC,EAAyC,CAAA,EACzCC,EAAIF,EAAK,OACf,IAAIG,EAAI,EACR,KAAOA,EAAID,GAAKF,EAAKG,CAAC,IAAM,KAAOH,EAAKG,CAAC,IAAM,KAAKA,IACpD,GAAIA,GAAKD,EAAG,OAAOD,EAEnB,IAAIG,EAAQ,EACRC,EAAW,GACXC,EAAe,GACnB,KAAOH,EAAID,EAAGC,IAAK,CACjB,MAAMI,EAAKP,EAAKG,CAAC,EACjB,GAAIE,EAAU,CACRE,IAAO,KAAMJ,IACRI,IAAO,MAAKF,EAAW,IAChC,QACF,CACA,GAAIE,IAAO,IAAK,CACdF,EAAW,GACX,QACF,CACA,GAAIE,IAAO,KAAOA,IAAO,IAAK,CAC5BH,IACIA,IAAU,IAAGE,EAAeH,EAAI,GACpC,QACF,EACII,IAAO,KAAOA,IAAO,OACnBH,IAAU,GAAKE,IAAiB,KAClCL,EAAO,KAAK,CAAE,KAAMK,EAAc,GAAIH,EAAG,EACzCG,EAAe,IAEjBF,IAEJ,CACA,OAAOH,CACT"}
|
|
@@ -10,7 +10,7 @@ const m = p.define([
|
|
|
10
10
|
]), j = s.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",
|
|
@@ -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 { 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\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","computeFirstLevelFoldRanges","text","ranges","n","i","depth","inString","pendingStart","ch"],"mappings":";;;;AAKO,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;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;"}
|
|
@@ -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;
|