@sentropic/design-system-react 0.4.0 → 0.6.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/Col.d.ts +31 -0
- package/dist/Col.d.ts.map +1 -0
- package/dist/Col.js +42 -0
- package/dist/Col.js.map +1 -0
- package/dist/Container.d.ts +17 -0
- package/dist/Container.d.ts.map +1 -0
- package/dist/Container.js +9 -0
- package/dist/Container.js.map +1 -0
- package/dist/Divider.d.ts +22 -0
- package/dist/Divider.d.ts.map +1 -0
- package/dist/Divider.js +20 -0
- package/dist/Divider.js.map +1 -0
- package/dist/Flex.d.ts +31 -0
- package/dist/Flex.d.ts.map +1 -0
- package/dist/Flex.js +65 -0
- package/dist/Flex.js.map +1 -0
- package/dist/ForceGraph.d.ts +2 -2
- package/dist/ForceGraph.d.ts.map +1 -1
- package/dist/ForceGraph.js +1 -1
- package/dist/ForceGraph.js.map +1 -1
- package/dist/Hidden.d.ts +19 -0
- package/dist/Hidden.d.ts.map +1 -0
- package/dist/Hidden.js +9 -0
- package/dist/Hidden.js.map +1 -0
- package/dist/Inline.d.ts +21 -0
- package/dist/Inline.d.ts.map +1 -0
- package/dist/Inline.js +7 -0
- package/dist/Inline.js.map +1 -0
- package/dist/Row.d.ts +21 -0
- package/dist/Row.d.ts.map +1 -0
- package/dist/Row.js +19 -0
- package/dist/Row.js.map +1 -0
- package/dist/Stack.d.ts +19 -0
- package/dist/Stack.d.ts.map +1 -0
- package/dist/Stack.js +7 -0
- package/dist/Stack.js.map +1 -0
- package/dist/catalog.d.ts +34 -2
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +241 -46
- package/dist/catalog.js.map +1 -1
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +210 -2
- package/package.json +1 -1
package/dist/Col.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ColSpan = number | "auto";
|
|
3
|
+
export type ColProps = Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
4
|
+
/** Number of 12-grid columns to span, or "auto" to size to content. */
|
|
5
|
+
span?: ColSpan;
|
|
6
|
+
/** Columns to offset (0..11) via margin-inline-start. */
|
|
7
|
+
offset?: number;
|
|
8
|
+
/** Responsive overrides applied at and above the breakpoint. */
|
|
9
|
+
sm?: ColSpan;
|
|
10
|
+
md?: ColSpan;
|
|
11
|
+
lg?: ColSpan;
|
|
12
|
+
as?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
/** Width expression for a given span. Accounts for the shared row gutter so a
|
|
16
|
+
full 12 columns still fit on one line (gap-based layout). */
|
|
17
|
+
export declare function spanBasis(span: ColSpan | undefined): string | undefined;
|
|
18
|
+
export declare function offsetMargin(offset: number | undefined): string | undefined;
|
|
19
|
+
export declare const Col: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
20
|
+
/** Number of 12-grid columns to span, or "auto" to size to content. */
|
|
21
|
+
span?: ColSpan;
|
|
22
|
+
/** Columns to offset (0..11) via margin-inline-start. */
|
|
23
|
+
offset?: number;
|
|
24
|
+
/** Responsive overrides applied at and above the breakpoint. */
|
|
25
|
+
sm?: ColSpan;
|
|
26
|
+
md?: ColSpan;
|
|
27
|
+
lg?: ColSpan;
|
|
28
|
+
as?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
31
|
+
//# sourceMappingURL=Col.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Col.d.ts","sourceRoot":"","sources":["../src/Col.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG;IAC5E,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;gEACgE;AAChE,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAOvE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAM3E;AAED,eAAO,MAAM,GAAG;IA/Bd,uEAAuE;WAChE,OAAO;IACd,yDAAyD;aAChD,MAAM;IACf,gEAAgE;SAC3D,OAAO;SACP,OAAO;SACP,OAAO;SACP,MAAM;gBACC,MAAM;qCAuDnB,CAAC"}
|
package/dist/Col.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { classNames } from "./classNames.js";
|
|
4
|
+
/** Width expression for a given span. Accounts for the shared row gutter so a
|
|
5
|
+
full 12 columns still fit on one line (gap-based layout). */
|
|
6
|
+
export function spanBasis(span) {
|
|
7
|
+
if (span == null)
|
|
8
|
+
return undefined;
|
|
9
|
+
if (span === "auto")
|
|
10
|
+
return "auto";
|
|
11
|
+
const clamped = Math.max(1, Math.min(12, Math.round(span)));
|
|
12
|
+
const ratio = clamped / 12;
|
|
13
|
+
// Subtract this column's share of the inter-column gutters.
|
|
14
|
+
return `calc(${ratio * 100}% - var(--st-row-gutter, 0px) * ${(12 - clamped) / 12})`;
|
|
15
|
+
}
|
|
16
|
+
export function offsetMargin(offset) {
|
|
17
|
+
if (!offset)
|
|
18
|
+
return undefined;
|
|
19
|
+
const clamped = Math.max(0, Math.min(11, Math.round(offset)));
|
|
20
|
+
if (clamped === 0)
|
|
21
|
+
return undefined;
|
|
22
|
+
const ratio = clamped / 12;
|
|
23
|
+
return `calc(${ratio * 100}% + var(--st-row-gutter, 0px) * ${ratio})`;
|
|
24
|
+
}
|
|
25
|
+
export const Col = React.forwardRef(({ span = "auto", offset = 0, sm, md, lg, as = "div", className, style, children, ...rest }, ref) => {
|
|
26
|
+
const Tag = as;
|
|
27
|
+
const isAuto = span === "auto";
|
|
28
|
+
const basis = spanBasis(span);
|
|
29
|
+
const mergedStyle = {
|
|
30
|
+
flexBasis: basis,
|
|
31
|
+
maxInlineSize: isAuto ? undefined : basis,
|
|
32
|
+
flexGrow: isAuto ? 1 : 0,
|
|
33
|
+
marginInlineStart: offsetMargin(offset),
|
|
34
|
+
"--st-col-sm": spanBasis(sm),
|
|
35
|
+
"--st-col-md": spanBasis(md),
|
|
36
|
+
"--st-col-lg": spanBasis(lg),
|
|
37
|
+
...style,
|
|
38
|
+
};
|
|
39
|
+
return (_jsx(Tag, { ...rest, ref: ref, className: classNames("st-col", isAuto && "st-col--auto", sm != null && "st-col--has-sm", md != null && "st-col--has-md", lg != null && "st-col--has-lg", className), style: mergedStyle, children: children }));
|
|
40
|
+
});
|
|
41
|
+
Col.displayName = "Col";
|
|
42
|
+
//# sourceMappingURL=Col.js.map
|
package/dist/Col.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Col.js","sourceRoot":"","sources":["../src/Col.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiB7C;gEACgE;AAChE,MAAM,UAAU,SAAS,CAAC,IAAyB;IACjD,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IACnC,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,MAAM,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5D,MAAM,KAAK,GAAG,OAAO,GAAG,EAAE,CAAC;IAC3B,4DAA4D;IAC5D,OAAO,QAAQ,KAAK,GAAG,GAAG,mCAAmC,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;AACtF,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAA0B;IACrD,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9D,IAAI,OAAO,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACpC,MAAM,KAAK,GAAG,OAAO,GAAG,EAAE,CAAC;IAC3B,OAAO,QAAQ,KAAK,GAAG,GAAG,mCAAmC,KAAK,GAAG,CAAC;AACxE,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;IAClG,MAAM,GAAG,GAAG,EAAuB,CAAC;IACpC,MAAM,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;IAC/B,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,WAAW,GAAG;QAClB,SAAS,EAAE,KAAK;QAChB,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;QACzC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxB,iBAAiB,EAAE,YAAY,CAAC,MAAM,CAAC;QACvC,aAAa,EAAE,SAAS,CAAC,EAAE,CAAC;QAC5B,aAAa,EAAE,SAAS,CAAC,EAAE,CAAC;QAC5B,aAAa,EAAE,SAAS,CAAC,EAAE,CAAC;QAC5B,GAAG,KAAK;KACc,CAAC;IACzB,OAAO,CACL,KAAC,GAAG,OACE,IAAI,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CACnB,QAAQ,EACR,MAAM,IAAI,cAAc,EACxB,EAAE,IAAI,IAAI,IAAI,gBAAgB,EAC9B,EAAE,IAAI,IAAI,IAAI,gBAAgB,EAC9B,EAAE,IAAI,IAAI,IAAI,gBAAgB,EAC9B,SAAS,CACV,EACD,KAAK,EAAE,WAAW,YAEjB,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ContainerSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
3
|
+
export type ContainerProps = Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
4
|
+
size?: ContainerSize;
|
|
5
|
+
/** Apply horizontal padding using the spacing scale. */
|
|
6
|
+
padding?: boolean;
|
|
7
|
+
as?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const Container: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
11
|
+
size?: ContainerSize;
|
|
12
|
+
/** Apply horizontal padding using the spacing scale. */
|
|
13
|
+
padding?: boolean;
|
|
14
|
+
as?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
17
|
+
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../src/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG;IAClF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,SAAS;WAPb,aAAa;IACpB,wDAAwD;cAC9C,OAAO;SACZ,MAAM;gBACC,MAAM;qCAqBnB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { classNames } from "./classNames.js";
|
|
4
|
+
export const Container = React.forwardRef(({ size = "lg", padding = true, as = "div", className, children, ...rest }, ref) => {
|
|
5
|
+
const Tag = as;
|
|
6
|
+
return (_jsx(Tag, { ...rest, ref: ref, className: classNames("st-container", `st-container--${size}`, padding && "st-container--padded", className), children: children }));
|
|
7
|
+
});
|
|
8
|
+
Container.displayName = "Container";
|
|
9
|
+
//# sourceMappingURL=Container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../src/Container.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAY7C,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACvC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;IACjF,MAAM,GAAG,GAAG,EAAuB,CAAC;IACpC,OAAO,CACL,KAAC,GAAG,OACE,IAAI,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CACnB,cAAc,EACd,iBAAiB,IAAI,EAAE,EACvB,OAAO,IAAI,sBAAsB,EACjC,SAAS,CACV,YAEA,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type DividerOrientation = "horizontal" | "vertical";
|
|
3
|
+
export type DividerVariant = "solid" | "dashed";
|
|
4
|
+
export type DividerProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
|
|
5
|
+
orientation?: DividerOrientation;
|
|
6
|
+
/** Spacing scale step (0..12) applied as margin around the divider. */
|
|
7
|
+
spacing?: number;
|
|
8
|
+
/** Optional label centered on a horizontal divider line. */
|
|
9
|
+
label?: string;
|
|
10
|
+
variant?: DividerVariant;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const Divider: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
|
|
14
|
+
orientation?: DividerOrientation;
|
|
15
|
+
/** Spacing scale step (0..12) applied as margin around the divider. */
|
|
16
|
+
spacing?: number;
|
|
17
|
+
/** Optional label centered on a horizontal divider line. */
|
|
18
|
+
label?: string;
|
|
19
|
+
variant?: DividerVariant;
|
|
20
|
+
className?: string;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../src/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC,GAAG;IACnF,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,OAAO;kBATJ,kBAAkB;IAChC,uEAAuE;cAC7D,MAAM;IAChB,4DAA4D;YACpD,MAAM;cACJ,cAAc;gBACZ,MAAM;wCAiDnB,CAAC"}
|
package/dist/Divider.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { classNames } from "./classNames.js";
|
|
4
|
+
import { spacingToken } from "./Flex.js";
|
|
5
|
+
export const Divider = React.forwardRef(({ orientation = "horizontal", spacing, label, variant = "solid", className, style, ...rest }, ref) => {
|
|
6
|
+
const isVertical = orientation === "vertical";
|
|
7
|
+
const hasLabel = !isVertical && label != null && label !== "";
|
|
8
|
+
const margin = spacingToken(spacing);
|
|
9
|
+
const classes = classNames("st-divider", `st-divider--${orientation}`, `st-divider--${variant}`, hasLabel && "st-divider--labeled", className);
|
|
10
|
+
if (hasLabel) {
|
|
11
|
+
return (_jsxs("div", { ...rest, ref: ref, className: classes, role: "separator", "aria-orientation": "horizontal", style: { marginBlock: margin, ...style }, children: [_jsx("span", { className: "st-divider__line", "aria-hidden": "true" }), _jsx("span", { className: "st-divider__label", children: label }), _jsx("span", { className: "st-divider__line", "aria-hidden": "true" })] }));
|
|
12
|
+
}
|
|
13
|
+
return (_jsx("div", { ...rest, ref: ref, className: classes, role: "separator", "aria-orientation": orientation, style: {
|
|
14
|
+
marginBlock: isVertical ? undefined : margin,
|
|
15
|
+
marginInline: isVertical ? margin : undefined,
|
|
16
|
+
...style,
|
|
17
|
+
} }));
|
|
18
|
+
});
|
|
19
|
+
Divider.displayName = "Divider";
|
|
20
|
+
//# sourceMappingURL=Divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.js","sourceRoot":"","sources":["../src/Divider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAezC,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CACrC,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;IACpG,MAAM,UAAU,GAAG,WAAW,KAAK,UAAU,CAAC;IAC9C,MAAM,QAAQ,GAAG,CAAC,UAAU,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;IAC9D,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAErC,MAAM,OAAO,GAAG,UAAU,CACxB,YAAY,EACZ,eAAe,WAAW,EAAE,EAC5B,eAAe,OAAO,EAAE,EACxB,QAAQ,IAAI,qBAAqB,EACjC,SAAS,CACV,CAAC;IAEF,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CACL,kBACM,IAAI,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,WAAW,sBACC,YAAY,EAC7B,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,aAExC,eAAM,SAAS,EAAC,kBAAkB,iBAAa,MAAM,GAAG,EACxD,eAAM,SAAS,EAAC,mBAAmB,YAAE,KAAK,GAAQ,EAClD,eAAM,SAAS,EAAC,kBAAkB,iBAAa,MAAM,GAAG,IACpD,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,iBACM,IAAI,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,WAAW,sBACE,WAAW,EAC7B,KAAK,EAAE;YACL,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;YAC5C,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC7C,GAAG,KAAK;SACT,GACD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC"}
|
package/dist/Flex.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
|
3
|
+
export type FlexAlign = "start" | "center" | "end" | "stretch" | "baseline";
|
|
4
|
+
export type FlexJustify = "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
5
|
+
export type FlexProps = Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
6
|
+
direction?: FlexDirection;
|
|
7
|
+
/** Spacing scale step (0..12) mapped to `--st-spacing-*`. */
|
|
8
|
+
gap?: number;
|
|
9
|
+
align?: FlexAlign;
|
|
10
|
+
justify?: FlexJustify;
|
|
11
|
+
wrap?: boolean;
|
|
12
|
+
inline?: boolean;
|
|
13
|
+
as?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
/** Resolve a spacing step to a `var(--st-spacing-N, fallback)` expression. */
|
|
17
|
+
export declare function spacingToken(step: number | undefined): string | undefined;
|
|
18
|
+
export declare function alignValue(align: FlexAlign | undefined): string | undefined;
|
|
19
|
+
export declare function justifyValue(justify: FlexJustify | undefined): string | undefined;
|
|
20
|
+
export declare const Flex: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
21
|
+
direction?: FlexDirection;
|
|
22
|
+
/** Spacing scale step (0..12) mapped to `--st-spacing-*`. */
|
|
23
|
+
gap?: number;
|
|
24
|
+
align?: FlexAlign;
|
|
25
|
+
justify?: FlexJustify;
|
|
26
|
+
wrap?: boolean;
|
|
27
|
+
inline?: boolean;
|
|
28
|
+
as?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
31
|
+
//# sourceMappingURL=Flex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../src/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAChF,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;AAC5E,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEvF,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG;IAC7E,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAoBF,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKzE;AAmBD,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEjF;AAED,eAAO,MAAM,IAAI;gBA9DH,aAAa;IACzB,6DAA6D;UACvD,MAAM;YACJ,SAAS;cACP,WAAW;WACd,OAAO;aACL,OAAO;SACX,MAAM;gBACC,MAAM;qCAuFnB,CAAC"}
|
package/dist/Flex.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { classNames } from "./classNames.js";
|
|
4
|
+
/** rem fallbacks for the Sent Tech spacing scale (steps 5/7/9/10/11 are
|
|
5
|
+
interpolated since no token exists, but the var() is still preferred). */
|
|
6
|
+
const SPACING_FALLBACK = {
|
|
7
|
+
0: "0",
|
|
8
|
+
1: "0.25rem",
|
|
9
|
+
2: "0.5rem",
|
|
10
|
+
3: "0.75rem",
|
|
11
|
+
4: "1rem",
|
|
12
|
+
5: "1.25rem",
|
|
13
|
+
6: "1.5rem",
|
|
14
|
+
7: "1.75rem",
|
|
15
|
+
8: "2rem",
|
|
16
|
+
9: "2.25rem",
|
|
17
|
+
10: "2.5rem",
|
|
18
|
+
11: "2.75rem",
|
|
19
|
+
12: "3rem",
|
|
20
|
+
};
|
|
21
|
+
/** Resolve a spacing step to a `var(--st-spacing-N, fallback)` expression. */
|
|
22
|
+
export function spacingToken(step) {
|
|
23
|
+
if (step == null)
|
|
24
|
+
return undefined;
|
|
25
|
+
const clamped = Math.max(0, Math.min(12, Math.round(step)));
|
|
26
|
+
if (clamped === 0)
|
|
27
|
+
return "0";
|
|
28
|
+
return `var(--st-spacing-${clamped}, ${SPACING_FALLBACK[clamped]})`;
|
|
29
|
+
}
|
|
30
|
+
const ALIGN = {
|
|
31
|
+
start: "flex-start",
|
|
32
|
+
center: "center",
|
|
33
|
+
end: "flex-end",
|
|
34
|
+
stretch: "stretch",
|
|
35
|
+
baseline: "baseline",
|
|
36
|
+
};
|
|
37
|
+
const JUSTIFY = {
|
|
38
|
+
start: "flex-start",
|
|
39
|
+
center: "center",
|
|
40
|
+
end: "flex-end",
|
|
41
|
+
between: "space-between",
|
|
42
|
+
around: "space-around",
|
|
43
|
+
evenly: "space-evenly",
|
|
44
|
+
};
|
|
45
|
+
export function alignValue(align) {
|
|
46
|
+
return align ? ALIGN[align] : undefined;
|
|
47
|
+
}
|
|
48
|
+
export function justifyValue(justify) {
|
|
49
|
+
return justify ? JUSTIFY[justify] : undefined;
|
|
50
|
+
}
|
|
51
|
+
export const Flex = React.forwardRef(({ direction = "row", gap, align, justify, wrap = false, inline = false, as = "div", className, style, children, ...rest }, ref) => {
|
|
52
|
+
const Tag = as;
|
|
53
|
+
const mergedStyle = {
|
|
54
|
+
display: inline ? "inline-flex" : "flex",
|
|
55
|
+
flexDirection: direction,
|
|
56
|
+
flexWrap: wrap ? "wrap" : "nowrap",
|
|
57
|
+
alignItems: alignValue(align),
|
|
58
|
+
justifyContent: justifyValue(justify),
|
|
59
|
+
gap: spacingToken(gap),
|
|
60
|
+
...style,
|
|
61
|
+
};
|
|
62
|
+
return (_jsx(Tag, { ...rest, ref: ref, className: classNames("st-flex", className), style: mergedStyle, children: children }));
|
|
63
|
+
});
|
|
64
|
+
Flex.displayName = "Flex";
|
|
65
|
+
//# sourceMappingURL=Flex.js.map
|
package/dist/Flex.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flex.js","sourceRoot":"","sources":["../src/Flex.tsx"],"names":[],"mappings":"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"}
|
package/dist/ForceGraph.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ForceGraph, GraphLegend, nodeShapePath } from "./catalog.js";
|
|
2
|
-
export type { ForceGraphProps, ForceGraphNode, ForceGraphEdge, ForceGraphTone, ForceGraphNodeShape, ForceGraphLegendEntry, GraphLegendProps, } from "./catalog.js";
|
|
1
|
+
export { ForceGraph, GraphLegend, nodeShapePath, edgeDashArray } from "./catalog.js";
|
|
2
|
+
export type { ForceGraphProps, ForceGraphNode, ForceGraphEdge, ForceGraphTone, ForceGraphNodeShape, ForceGraphEdgeDash, ForceGraphLegendEntry, GraphLegendProps, } from "./catalog.js";
|
|
3
3
|
//# sourceMappingURL=ForceGraph.d.ts.map
|
package/dist/ForceGraph.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForceGraph.d.ts","sourceRoot":"","sources":["../src/ForceGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ForceGraph.d.ts","sourceRoot":"","sources":["../src/ForceGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACrF,YAAY,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,cAAc,CAAC"}
|
package/dist/ForceGraph.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ForceGraph, GraphLegend, nodeShapePath } from "./catalog.js";
|
|
1
|
+
export { ForceGraph, GraphLegend, nodeShapePath, edgeDashArray } from "./catalog.js";
|
|
2
2
|
//# sourceMappingURL=ForceGraph.js.map
|
package/dist/ForceGraph.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForceGraph.js","sourceRoot":"","sources":["../src/ForceGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"ForceGraph.js","sourceRoot":"","sources":["../src/ForceGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/Hidden.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type HiddenBreakpoint = "sm" | "md" | "lg" | "xl";
|
|
3
|
+
export type HiddenProps = Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
4
|
+
/** Hide when viewport is narrower than this breakpoint. */
|
|
5
|
+
below?: HiddenBreakpoint;
|
|
6
|
+
/** Hide when viewport is at or wider than this breakpoint. */
|
|
7
|
+
above?: HiddenBreakpoint;
|
|
8
|
+
as?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const Hidden: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
12
|
+
/** Hide when viewport is narrower than this breakpoint. */
|
|
13
|
+
below?: HiddenBreakpoint;
|
|
14
|
+
/** Hide when viewport is at or wider than this breakpoint. */
|
|
15
|
+
above?: HiddenBreakpoint;
|
|
16
|
+
as?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
19
|
+
//# sourceMappingURL=Hidden.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hidden.d.ts","sourceRoot":"","sources":["../src/Hidden.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG;IAC/E,2DAA2D;IAC3D,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,MAAM;IARjB,2DAA2D;YACnD,gBAAgB;IACxB,8DAA8D;YACtD,gBAAgB;SACnB,MAAM;gBACC,MAAM;qCAqBnB,CAAC"}
|
package/dist/Hidden.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { classNames } from "./classNames.js";
|
|
4
|
+
export const Hidden = React.forwardRef(({ below, above, as = "div", className, children, ...rest }, ref) => {
|
|
5
|
+
const Tag = as;
|
|
6
|
+
return (_jsx(Tag, { ...rest, ref: ref, className: classNames("st-hidden", below && `st-hidden--below-${below}`, above && `st-hidden--above-${above}`, className), children: children }));
|
|
7
|
+
});
|
|
8
|
+
Hidden.displayName = "Hidden";
|
|
9
|
+
//# sourceMappingURL=Hidden.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hidden.js","sourceRoot":"","sources":["../src/Hidden.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAa7C,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CACpC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;IAClE,MAAM,GAAG,GAAG,EAAuB,CAAC;IACpC,OAAO,CACL,KAAC,GAAG,OACE,IAAI,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CACnB,WAAW,EACX,KAAK,IAAI,oBAAoB,KAAK,EAAE,EACpC,KAAK,IAAI,oBAAoB,KAAK,EAAE,EACpC,SAAS,CACV,YAEA,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
|
package/dist/Inline.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { FlexAlign, FlexJustify } from "./Flex.js";
|
|
3
|
+
export type InlineProps = Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
4
|
+
/** Spacing scale step (0..12) mapped to `--st-spacing-*`. */
|
|
5
|
+
gap?: number;
|
|
6
|
+
align?: FlexAlign;
|
|
7
|
+
justify?: FlexJustify;
|
|
8
|
+
wrap?: boolean;
|
|
9
|
+
as?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const Inline: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
13
|
+
/** Spacing scale step (0..12) mapped to `--st-spacing-*`. */
|
|
14
|
+
gap?: number;
|
|
15
|
+
align?: FlexAlign;
|
|
16
|
+
justify?: FlexJustify;
|
|
17
|
+
wrap?: boolean;
|
|
18
|
+
as?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
21
|
+
//# sourceMappingURL=Inline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../src/Inline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG;IAC/E,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,MAAM;IATjB,6DAA6D;UACvD,MAAM;YACJ,SAAS;cACP,WAAW;WACd,OAAO;SACT,MAAM;gBACC,MAAM;qCAmBnB,CAAC"}
|
package/dist/Inline.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { classNames } from "./classNames.js";
|
|
4
|
+
import { Flex } from "./Flex.js";
|
|
5
|
+
export const Inline = React.forwardRef(({ gap, align, justify, wrap = true, as = "div", className, children, ...rest }, ref) => (_jsx(Flex, { ...rest, ref: ref, as: as, gap: gap, align: align, justify: justify, wrap: wrap, direction: "row", className: classNames("st-inline", className), children: children })));
|
|
6
|
+
Inline.displayName = "Inline";
|
|
7
|
+
//# sourceMappingURL=Inline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Inline.js","sourceRoot":"","sources":["../src/Inline.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAajC,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CACpC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvF,KAAC,IAAI,OACC,IAAI,EACR,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAC,KAAK,EACf,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE,SAAS,CAAC,YAE5C,QAAQ,GACJ,CACR,CACF,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
|
package/dist/Row.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { FlexAlign, FlexJustify } from "./Flex.js";
|
|
3
|
+
export type RowProps = Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
4
|
+
/** Spacing scale step (0..12) used for the column gutter. */
|
|
5
|
+
gutter?: number;
|
|
6
|
+
align?: FlexAlign;
|
|
7
|
+
justify?: FlexJustify;
|
|
8
|
+
wrap?: boolean;
|
|
9
|
+
as?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const Row: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
13
|
+
/** Spacing scale step (0..12) used for the column gutter. */
|
|
14
|
+
gutter?: number;
|
|
15
|
+
align?: FlexAlign;
|
|
16
|
+
justify?: FlexJustify;
|
|
17
|
+
wrap?: boolean;
|
|
18
|
+
as?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
21
|
+
//# sourceMappingURL=Row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../src/Row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG;IAC5E,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,GAAG;IATd,6DAA6D;aACpD,MAAM;YACP,SAAS;cACP,WAAW;WACd,OAAO;SACT,MAAM;gBACC,MAAM;qCAqBnB,CAAC"}
|
package/dist/Row.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { classNames } from "./classNames.js";
|
|
4
|
+
import { spacingToken, alignValue, justifyValue } from "./Flex.js";
|
|
5
|
+
export const Row = React.forwardRef(({ gutter = 4, align, justify, wrap = true, as = "div", className, style, children, ...rest }, ref) => {
|
|
6
|
+
const Tag = as;
|
|
7
|
+
const gap = spacingToken(gutter) ?? "0";
|
|
8
|
+
const mergedStyle = {
|
|
9
|
+
flexWrap: wrap ? "wrap" : "nowrap",
|
|
10
|
+
alignItems: alignValue(align),
|
|
11
|
+
justifyContent: justifyValue(justify),
|
|
12
|
+
gap,
|
|
13
|
+
"--st-row-gutter": gap,
|
|
14
|
+
...style,
|
|
15
|
+
};
|
|
16
|
+
return (_jsx(Tag, { ...rest, ref: ref, className: classNames("st-row", className), style: mergedStyle, children: children }));
|
|
17
|
+
});
|
|
18
|
+
Row.displayName = "Row";
|
|
19
|
+
//# sourceMappingURL=Row.js.map
|
package/dist/Row.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Row.js","sourceRoot":"","sources":["../src/Row.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAanE,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;IACpG,MAAM,GAAG,GAAG,EAAuB,CAAC;IACpC,MAAM,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC;IACxC,MAAM,WAAW,GAAG;QAClB,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;QAClC,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC;QAC7B,cAAc,EAAE,YAAY,CAAC,OAAO,CAAC;QACrC,GAAG;QACH,iBAAiB,EAAE,GAAG;QACtB,GAAG,KAAK;KACc,CAAC;IACzB,OAAO,CACL,KAAC,GAAG,OAAK,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,YACpF,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC"}
|
package/dist/Stack.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { FlexAlign, FlexJustify } from "./Flex.js";
|
|
3
|
+
export type StackProps = Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
4
|
+
/** Spacing scale step (0..12) mapped to `--st-spacing-*`. */
|
|
5
|
+
gap?: number;
|
|
6
|
+
align?: FlexAlign;
|
|
7
|
+
justify?: FlexJustify;
|
|
8
|
+
as?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const Stack: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
|
|
12
|
+
/** Spacing scale step (0..12) mapped to `--st-spacing-*`. */
|
|
13
|
+
gap?: number;
|
|
14
|
+
align?: FlexAlign;
|
|
15
|
+
justify?: FlexJustify;
|
|
16
|
+
as?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
19
|
+
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../src/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG;IAC9E,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,KAAK;IARhB,6DAA6D;UACvD,MAAM;YACJ,SAAS;cACP,WAAW;SAChB,MAAM;gBACC,MAAM;qCAkBnB,CAAC"}
|
package/dist/Stack.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { classNames } from "./classNames.js";
|
|
4
|
+
import { Flex } from "./Flex.js";
|
|
5
|
+
export const Stack = React.forwardRef(({ gap, align, justify, as = "div", className, children, ...rest }, ref) => (_jsx(Flex, { ...rest, ref: ref, as: as, gap: gap, align: align, justify: justify, direction: "column", className: classNames("st-stack", className), children: children })));
|
|
6
|
+
Stack.displayName = "Stack";
|
|
7
|
+
//# sourceMappingURL=Stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.js","sourceRoot":"","sources":["../src/Stack.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAYjC,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC1E,KAAC,IAAI,OACC,IAAI,EACR,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,YAE3C,QAAQ,GACJ,CACR,CACF,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC"}
|
package/dist/catalog.d.ts
CHANGED
|
@@ -214,7 +214,9 @@ export type FooterProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
214
214
|
};
|
|
215
215
|
export declare function Footer({ brand, columns, links, copyright, className, ...rest }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
216
216
|
export type ForceGraphTone = "category1" | "category2" | "category3" | "category4" | "category5" | "category6" | "category7" | "category8";
|
|
217
|
-
export type ForceGraphNodeShape = "dot" | "circle" | "diamond" | "star" | "hexagon" | "box" | "square" | "triangle";
|
|
217
|
+
export type ForceGraphNodeShape = "dot" | "circle" | "diamond" | "star" | "hexagon" | "box" | "square" | "roundedbox" | "triangle";
|
|
218
|
+
/** Stroke dash style for typed edges. */
|
|
219
|
+
export type ForceGraphEdgeDash = "solid" | "dashed" | "dotted" | "long-dash";
|
|
218
220
|
export type ForceGraphNode = {
|
|
219
221
|
/** Stable identifier; referenced by edges. */
|
|
220
222
|
id: string;
|
|
@@ -248,8 +250,22 @@ export type ForceGraphEdge = {
|
|
|
248
250
|
/**
|
|
249
251
|
* When true the link renders as a dashed/faded "weak" link. Lets callers
|
|
250
252
|
* map a confidence dimension onto link strength without extra props.
|
|
253
|
+
* Equivalent to `dash: "dashed"` plus a faded stroke (kept for back-compat).
|
|
251
254
|
*/
|
|
252
255
|
weak?: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* Typed dash pattern for the stroke. Independent of `weak`.
|
|
258
|
+
* "solid" = none, "dashed" = "6 4", "dotted" = "1 4", "long-dash" = "12 6".
|
|
259
|
+
* When omitted, falls back to the `weak` styling.
|
|
260
|
+
*/
|
|
261
|
+
dash?: ForceGraphEdgeDash;
|
|
262
|
+
/**
|
|
263
|
+
* Emphasise the edge (e.g. a reconciliation/match relation) with a thicker,
|
|
264
|
+
* fully-opaque stroke. Defaults to false.
|
|
265
|
+
*/
|
|
266
|
+
emphasis?: boolean;
|
|
267
|
+
/** Explicit stroke width override in px. Takes precedence over `emphasis`. */
|
|
268
|
+
width?: number;
|
|
253
269
|
};
|
|
254
270
|
export type ForceGraphLegendEntry = {
|
|
255
271
|
/** Label shown in the legend. */
|
|
@@ -260,7 +276,17 @@ export type ForceGraphLegendEntry = {
|
|
|
260
276
|
tone?: ForceGraphTone;
|
|
261
277
|
/** When true, renders as a dashed line (edge legend). */
|
|
262
278
|
weak?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Typed dash pattern for an edge legend swatch. Independent of `weak`.
|
|
281
|
+
* When set, the swatch line uses the matching dash-array.
|
|
282
|
+
*/
|
|
283
|
+
dash?: ForceGraphEdgeDash;
|
|
263
284
|
};
|
|
285
|
+
/**
|
|
286
|
+
* Maps a dash style (or the legacy `weak` flag) to an SVG stroke-dasharray.
|
|
287
|
+
* Returns null for a solid stroke.
|
|
288
|
+
*/
|
|
289
|
+
export declare function edgeDashArray(dash: ForceGraphEdgeDash | undefined, weak?: boolean): string | null;
|
|
264
290
|
export declare function nodeShapePath(shape: ForceGraphNodeShape | undefined, r: number): string | null;
|
|
265
291
|
export type ForceGraphProps = React.HTMLAttributes<HTMLElement> & {
|
|
266
292
|
nodes: ForceGraphNode[];
|
|
@@ -309,8 +335,14 @@ export type ForceGraphProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
309
335
|
* Each entry has a label + optional shape (node) or weak (edge).
|
|
310
336
|
*/
|
|
311
337
|
legend?: ForceGraphLegendEntry[];
|
|
338
|
+
/**
|
|
339
|
+
* Edge curvature, 0..1. 0 = straight <line> (back-compat). Larger values
|
|
340
|
+
* bow each edge into a quadratic <path>, offset perpendicular to the chord
|
|
341
|
+
* by `edgeCurve * dist * factor`. Defaults to a light 0.15.
|
|
342
|
+
*/
|
|
343
|
+
edgeCurve?: number;
|
|
312
344
|
};
|
|
313
|
-
export declare function ForceGraph({ nodes, edges, label, width, height, nodeRadius, showLabels, iterations, selectedIds, focusId, onSelect, onOpenEntity, onEdgeHover, legend, className, ...rest }: ForceGraphProps): import("react/jsx-runtime").JSX.Element;
|
|
345
|
+
export declare function ForceGraph({ nodes, edges, label, width, height, nodeRadius, showLabels, iterations, selectedIds, focusId, onSelect, onOpenEntity, onEdgeHover, legend, edgeCurve, className, ...rest }: ForceGraphProps): import("react/jsx-runtime").JSX.Element;
|
|
314
346
|
export type GraphLegendProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
315
347
|
entries: ForceGraphLegendEntry[];
|
|
316
348
|
/** Optional heading shown above entries. */
|