@mechane-ai/ui 0.0.0-stage → 0.2.1
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/LICENSE +202 -0
- package/NOTICE +32 -0
- package/README.md +70 -2
- package/dist/accessibility.d.ts +14 -0
- package/dist/actions.d.ts +31 -0
- package/dist/assets/stylex.css +1466 -0
- package/dist/charts/index.d.ts +2 -0
- package/dist/charts/waterfall.d.ts +34 -0
- package/dist/charts.js +198 -0
- package/dist/control-state.d.ts +51 -0
- package/dist/copy-value.d.ts +8 -0
- package/dist/dialog.d.ts +27 -0
- package/dist/drawer.d.ts +33 -0
- package/dist/forms.d.ts +32 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +1 -0
- package/dist/inspector.d.ts +16 -0
- package/dist/layout/app-shell.d.ts +9 -0
- package/dist/layout/detail-page.d.ts +6 -0
- package/dist/layout/frame.stylex.d.ts +23 -0
- package/dist/layout/index.d.ts +4 -0
- package/dist/layout/page-toolbar.d.ts +14 -0
- package/dist/layout/sidebar.d.ts +45 -0
- package/dist/layout.js +337 -0
- package/dist/list-footer.d.ts +6 -0
- package/dist/loading.d.ts +7 -0
- package/dist/metrics.d.ts +9 -0
- package/dist/overlay-styles.d.ts +46 -0
- package/dist/select.d.ts +44 -0
- package/dist/skip-link.d.ts +6 -0
- package/dist/src-Czfi0YQa.js +1319 -0
- package/dist/style-composition.d.ts +22 -0
- package/dist/surfaces.d.ts +27 -0
- package/dist/table.d.ts +17 -0
- package/dist/tabs.d.ts +19 -0
- package/dist/text.d.ts +30 -0
- package/dist/tokens.js +84 -0
- package/dist/tokens.stylex.d.ts +83 -0
- package/dist/tooltip.d.ts +18 -0
- package/package.json +51 -3
- package/src/tokens.stylex.ts +81 -0
- package/styles.css +2 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StyleXStyles } from '@stylexjs/stylex';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
type PlacementProperties = Pick<CSSProperties, 'alignSelf' | 'flex' | 'flexGrow' | 'flexShrink' | 'gridArea' | 'gridColumn' | 'gridRow' | 'margin' | 'marginBlock' | 'marginInline' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'width' | 'maxWidth' | 'minWidth'>;
|
|
4
|
+
type ControlGeometry = Pick<CSSProperties, 'height' | 'minHeight' | 'maxHeight' | 'padding' | 'paddingBlock' | 'paddingInline' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'borderRadius' | 'justifyContent' | 'alignItems' | 'gap'>;
|
|
5
|
+
type DefinedProperties<Properties> = {
|
|
6
|
+
readonly [Key in keyof Properties]?: Exclude<Properties[Key], undefined>;
|
|
7
|
+
};
|
|
8
|
+
export type PlacementStyle = StyleXStyles<DefinedProperties<PlacementProperties>>;
|
|
9
|
+
export type ControlStyle = StyleXStyles<DefinedProperties<PlacementProperties & ControlGeometry>>;
|
|
10
|
+
type StyleProperties<State> = {
|
|
11
|
+
readonly className?: string | ((state: State) => string | undefined) | undefined;
|
|
12
|
+
readonly style?: CSSProperties | ((state: State) => CSSProperties | undefined) | undefined;
|
|
13
|
+
};
|
|
14
|
+
type CompiledStyles = {
|
|
15
|
+
readonly className?: string | undefined;
|
|
16
|
+
readonly style?: CSSProperties | undefined;
|
|
17
|
+
};
|
|
18
|
+
type MergeStylesInput<State> = StyleProperties<State> & {
|
|
19
|
+
readonly styles: CompiledStyles;
|
|
20
|
+
};
|
|
21
|
+
export declare function mergeStyles<State>({ className, style, styles }: MergeStylesInput<State>): StyleProperties<State>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
type PanelProps = ComponentProps<'section'> & {
|
|
3
|
+
readonly padded?: boolean;
|
|
4
|
+
};
|
|
5
|
+
type RowProps = ComponentProps<'div'> & {
|
|
6
|
+
readonly between?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type StackProps = ComponentProps<'div'> & {
|
|
9
|
+
readonly compact?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type ColumnsProps = ComponentProps<'div'>;
|
|
12
|
+
type DividerProps = ComponentProps<'hr'>;
|
|
13
|
+
type EmptyStateProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
14
|
+
readonly title: string;
|
|
15
|
+
readonly action?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
type NoticeProps = ComponentProps<'div'> & {
|
|
18
|
+
readonly error?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function Panel({ padded, ...props }: PanelProps): ReactNode;
|
|
21
|
+
export declare function Row({ between, ...props }: RowProps): ReactNode;
|
|
22
|
+
export declare function Stack({ compact, ...props }: StackProps): ReactNode;
|
|
23
|
+
export declare function Columns(props: ColumnsProps): ReactNode;
|
|
24
|
+
export declare function Divider(props: DividerProps): ReactNode;
|
|
25
|
+
export declare function EmptyState({ title, children, action, ...props }: EmptyStateProps): ReactNode;
|
|
26
|
+
export declare function Notice({ error, ...props }: NoticeProps): ReactNode;
|
|
27
|
+
export {};
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
type TableHeader = string | {
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly width: number;
|
|
5
|
+
readonly secondary?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type TableProps = ComponentProps<'table'> & {
|
|
8
|
+
readonly headers: ReadonlyArray<TableHeader>;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
};
|
|
11
|
+
type CellProps = ComponentProps<'td'> & {
|
|
12
|
+
readonly secondary?: boolean;
|
|
13
|
+
readonly mobileLabel?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function Table({ headers, children, label, ...props }: TableProps): ReactNode;
|
|
16
|
+
export declare function Cell({ children, secondary, mobileLabel, ...props }: CellProps): ReactNode;
|
|
17
|
+
export {};
|
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Tabs as BaseTabs } from '@base-ui/react/tabs';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import type { ValueStateProperties } from './control-state.ts';
|
|
4
|
+
type BaseTabsRootProps = ComponentProps<typeof BaseTabs.Root>;
|
|
5
|
+
type TabsRootProps = Omit<BaseTabsRootProps, 'value' | 'defaultValue' | 'onValueChange'> & ValueStateProperties<Exclude<BaseTabsRootProps['value'], undefined>, NonNullable<BaseTabsRootProps['onValueChange']>>;
|
|
6
|
+
type TabsListProps = ComponentProps<typeof BaseTabs.List>;
|
|
7
|
+
type TabsTabProps = ComponentProps<typeof BaseTabs.Tab>;
|
|
8
|
+
type TabsPanelProps = ComponentProps<typeof BaseTabs.Panel>;
|
|
9
|
+
declare function TabsRoot({ className, style, ...props }: TabsRootProps): ReactNode;
|
|
10
|
+
declare function TabsList({ className, style, ...props }: TabsListProps): ReactNode;
|
|
11
|
+
declare function TabsTab({ className, style, ...props }: TabsTabProps): ReactNode;
|
|
12
|
+
declare function TabsPanel({ className, style, ...props }: TabsPanelProps): ReactNode;
|
|
13
|
+
export declare const Tabs: {
|
|
14
|
+
Root: typeof TabsRoot;
|
|
15
|
+
List: typeof TabsList;
|
|
16
|
+
Tab: typeof TabsTab;
|
|
17
|
+
Panel: typeof TabsPanel;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
package/dist/text.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import type { PlacementStyle } from './style-composition.ts';
|
|
3
|
+
type TextVariant = 'body' | 'caption' | 'mono' | 'prose';
|
|
4
|
+
type TextTone = 'ink' | 'muted';
|
|
5
|
+
type StatusTone = 'neutral' | 'positive' | 'warning' | 'negative';
|
|
6
|
+
type TextProps = ComponentProps<'span'> & {
|
|
7
|
+
readonly variant?: TextVariant;
|
|
8
|
+
readonly tone?: TextTone;
|
|
9
|
+
readonly xstyle?: PlacementStyle;
|
|
10
|
+
};
|
|
11
|
+
type HeadingProps = ComponentProps<'h1'>;
|
|
12
|
+
type SubheadingProps = ComponentProps<'h2'>;
|
|
13
|
+
type MutedProps = ComponentProps<'p'>;
|
|
14
|
+
type IdentifierProps = ComponentProps<'span'>;
|
|
15
|
+
type ProseProps = ComponentProps<'pre'>;
|
|
16
|
+
type BadgeProps = ComponentProps<'span'> & {
|
|
17
|
+
readonly tone?: StatusTone;
|
|
18
|
+
};
|
|
19
|
+
type StatusProps = ComponentProps<'span'> & {
|
|
20
|
+
readonly tone?: StatusTone;
|
|
21
|
+
};
|
|
22
|
+
export declare function Text({ variant, tone, xstyle, ...props }: TextProps): ReactNode;
|
|
23
|
+
export declare function Heading(props: HeadingProps): ReactNode;
|
|
24
|
+
export declare function Subheading(props: SubheadingProps): ReactNode;
|
|
25
|
+
export declare function Muted(props: MutedProps): ReactNode;
|
|
26
|
+
export declare function Identifier(props: IdentifierProps): ReactNode;
|
|
27
|
+
export declare function Prose(props: ProseProps): ReactNode;
|
|
28
|
+
export declare function Badge({ children, tone, ...props }: BadgeProps): ReactNode;
|
|
29
|
+
export declare function Status({ children, tone, ...props }: StatusProps): ReactNode;
|
|
30
|
+
export {};
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import "@stylexjs/stylex";
|
|
2
|
+
// src/tokens.stylex.ts
|
|
3
|
+
var e = {
|
|
4
|
+
canvas: "var(--x1nqxagb)",
|
|
5
|
+
surface: "var(--x1kupdtt)",
|
|
6
|
+
ink: "var(--x15p3jnv)",
|
|
7
|
+
inkHover: "var(--xhixglo)",
|
|
8
|
+
inverse: "var(--x1flvyz4)",
|
|
9
|
+
muted: "var(--xpd4v19)",
|
|
10
|
+
faint: "var(--xm6oem5)",
|
|
11
|
+
line: "var(--x1glhyjp)",
|
|
12
|
+
focus: "var(--x1p3cbpj)",
|
|
13
|
+
accent: "var(--xvee6di)",
|
|
14
|
+
accentSoft: "var(--xnwsrbi)",
|
|
15
|
+
warning: "var(--x40kjqr)",
|
|
16
|
+
warningSoft: "var(--xe3cigw)",
|
|
17
|
+
danger: "var(--xp9kirc)",
|
|
18
|
+
dangerHover: "var(--xg0vt9w)",
|
|
19
|
+
dangerSoft: "var(--xd94q93)",
|
|
20
|
+
overlay: "var(--xq6u5jv)",
|
|
21
|
+
__varGroupHash__: "xr1g0yw"
|
|
22
|
+
}, t = {
|
|
23
|
+
xxs: "var(--xy2rqe2)",
|
|
24
|
+
xs: "var(--xrcifeq)",
|
|
25
|
+
sm: "var(--x1chpkuu)",
|
|
26
|
+
md: "var(--x2v3yb5)",
|
|
27
|
+
lg: "var(--xyf8nzo)",
|
|
28
|
+
xl: "var(--x1puc1tu)",
|
|
29
|
+
xxl: "var(--x1nlsusz)",
|
|
30
|
+
__varGroupHash__: "xnjkq85"
|
|
31
|
+
}, n = {
|
|
32
|
+
fontFamily: "var(--x1m9j3x4)",
|
|
33
|
+
monoFamily: "var(--xekxf36)",
|
|
34
|
+
bodySize: "var(--x1pe3ll1)",
|
|
35
|
+
bodyLineHeight: "var(--x1o4ziua)",
|
|
36
|
+
captionSize: "var(--x1mwsp88)",
|
|
37
|
+
captionLineHeight: "var(--x10r02xe)",
|
|
38
|
+
inputSize: "var(--x14ocyhu)",
|
|
39
|
+
touchInputSize: "var(--x1cbkt0e)",
|
|
40
|
+
sectionSize: "var(--x12rnewd)",
|
|
41
|
+
sectionLineHeight: "var(--x13tj69x)",
|
|
42
|
+
headingSize: "var(--x1x4emdg)",
|
|
43
|
+
headingLineHeight: "var(--x1c3nks6)",
|
|
44
|
+
compactHeadingSize: "var(--x1p83npe)",
|
|
45
|
+
compactHeadingLineHeight: "var(--xntw5c)",
|
|
46
|
+
headingTracking: "var(--xau97yy)",
|
|
47
|
+
__varGroupHash__: "x19k47ix"
|
|
48
|
+
}, r = {
|
|
49
|
+
smHeight: "var(--xauqmbp)",
|
|
50
|
+
mdHeight: "var(--x1ngx1aq)",
|
|
51
|
+
coarseTarget: "var(--xobaqj)",
|
|
52
|
+
iconSize: "var(--x9pj4p9)",
|
|
53
|
+
paddingInline: "var(--x143qv1u)",
|
|
54
|
+
gap: "var(--x17iw6mo)",
|
|
55
|
+
focusWidth: "var(--xb4pdys)",
|
|
56
|
+
disabledOpacity: "var(--x1qtwr64)",
|
|
57
|
+
__varGroupHash__: "x1w6w4x"
|
|
58
|
+
}, i = {
|
|
59
|
+
sm: "var(--xlsahia)",
|
|
60
|
+
md: "var(--xmydd8r)",
|
|
61
|
+
__varGroupHash__: "x1rar5af"
|
|
62
|
+
}, a = {
|
|
63
|
+
duration: "var(--x1a2hahs)",
|
|
64
|
+
easing: "var(--xp4majk)",
|
|
65
|
+
drawerDuration: "var(--xf96llh)",
|
|
66
|
+
drawerEasing: "var(--x1gpifc1)",
|
|
67
|
+
__varGroupHash__: "xrhtzqn"
|
|
68
|
+
}, o = {
|
|
69
|
+
popup: "var(--xj28h13)",
|
|
70
|
+
__varGroupHash__: "x1o10zac"
|
|
71
|
+
}, s = {
|
|
72
|
+
backdrop: "20",
|
|
73
|
+
dialog: "21",
|
|
74
|
+
popup: "30",
|
|
75
|
+
tooltip: "40",
|
|
76
|
+
skipLink: "50"
|
|
77
|
+
}, c = {
|
|
78
|
+
coarsePointer: "@media (pointer: coarse)",
|
|
79
|
+
hoverPointer: "@media (hover: hover) and (pointer: fine)",
|
|
80
|
+
compactText: "@media (max-width:639px)",
|
|
81
|
+
compactTable: "@media (max-width:600px)",
|
|
82
|
+
reducedMotion: "@media (prefers-reduced-motion: reduce)"
|
|
83
|
+
};
|
|
84
|
+
export { e as colors, c as conditions, r as controls, s as layers, a as motion, i as radii, o as shadows, t as spacing, n as typography };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
export declare const colors: stylex.VarGroup<Readonly<{
|
|
3
|
+
canvas: string;
|
|
4
|
+
surface: string;
|
|
5
|
+
ink: string;
|
|
6
|
+
inkHover: string;
|
|
7
|
+
inverse: string;
|
|
8
|
+
muted: string;
|
|
9
|
+
faint: string;
|
|
10
|
+
line: string;
|
|
11
|
+
focus: string;
|
|
12
|
+
accent: string;
|
|
13
|
+
accentSoft: string;
|
|
14
|
+
warning: string;
|
|
15
|
+
warningSoft: string;
|
|
16
|
+
danger: string;
|
|
17
|
+
dangerHover: string;
|
|
18
|
+
dangerSoft: string;
|
|
19
|
+
overlay: string;
|
|
20
|
+
}>, symbol>;
|
|
21
|
+
export declare const spacing: stylex.VarGroup<Readonly<{
|
|
22
|
+
xxs: string;
|
|
23
|
+
xs: string;
|
|
24
|
+
sm: string;
|
|
25
|
+
md: string;
|
|
26
|
+
lg: string;
|
|
27
|
+
xl: string;
|
|
28
|
+
xxl: string;
|
|
29
|
+
}>, symbol>;
|
|
30
|
+
export declare const typography: stylex.VarGroup<Readonly<{
|
|
31
|
+
fontFamily: string;
|
|
32
|
+
monoFamily: string;
|
|
33
|
+
bodySize: string;
|
|
34
|
+
bodyLineHeight: string;
|
|
35
|
+
captionSize: string;
|
|
36
|
+
captionLineHeight: string;
|
|
37
|
+
inputSize: string;
|
|
38
|
+
touchInputSize: string;
|
|
39
|
+
sectionSize: string;
|
|
40
|
+
sectionLineHeight: string;
|
|
41
|
+
headingSize: string;
|
|
42
|
+
headingLineHeight: string;
|
|
43
|
+
compactHeadingSize: string;
|
|
44
|
+
compactHeadingLineHeight: string;
|
|
45
|
+
headingTracking: string;
|
|
46
|
+
}>, symbol>;
|
|
47
|
+
export declare const controls: stylex.VarGroup<Readonly<{
|
|
48
|
+
smHeight: string;
|
|
49
|
+
mdHeight: string;
|
|
50
|
+
coarseTarget: string;
|
|
51
|
+
iconSize: string;
|
|
52
|
+
paddingInline: string;
|
|
53
|
+
gap: string;
|
|
54
|
+
focusWidth: string;
|
|
55
|
+
disabledOpacity: string;
|
|
56
|
+
}>, symbol>;
|
|
57
|
+
export declare const radii: stylex.VarGroup<Readonly<{
|
|
58
|
+
sm: string;
|
|
59
|
+
md: string;
|
|
60
|
+
}>, symbol>;
|
|
61
|
+
export declare const motion: stylex.VarGroup<Readonly<{
|
|
62
|
+
duration: string;
|
|
63
|
+
easing: string;
|
|
64
|
+
drawerDuration: string;
|
|
65
|
+
drawerEasing: string;
|
|
66
|
+
}>, symbol>;
|
|
67
|
+
export declare const shadows: stylex.VarGroup<Readonly<{
|
|
68
|
+
popup: string;
|
|
69
|
+
}>, symbol>;
|
|
70
|
+
export declare const layers: {
|
|
71
|
+
backdrop: string;
|
|
72
|
+
dialog: string;
|
|
73
|
+
popup: string;
|
|
74
|
+
tooltip: string;
|
|
75
|
+
skipLink: string;
|
|
76
|
+
};
|
|
77
|
+
export declare const conditions: {
|
|
78
|
+
coarsePointer: string;
|
|
79
|
+
hoverPointer: string;
|
|
80
|
+
compactText: string;
|
|
81
|
+
compactTable: string;
|
|
82
|
+
reducedMotion: string;
|
|
83
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
|
|
2
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import type { OpenStateProperties } from './control-state.ts';
|
|
4
|
+
type TooltipRootProps<Payload> = Omit<BaseTooltip.Root.Props<Payload>, 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BaseTooltip.Root.Props<Payload>['onOpenChange']>>;
|
|
5
|
+
type TooltipPositionerProps = ComponentProps<typeof BaseTooltip.Positioner>;
|
|
6
|
+
type TooltipPopupProps = ComponentProps<typeof BaseTooltip.Popup>;
|
|
7
|
+
declare function TooltipRoot<Payload = unknown>(props: TooltipRootProps<Payload>): ReactNode;
|
|
8
|
+
declare function TooltipPositioner({ className, style, sideOffset, ...props }: TooltipPositionerProps): ReactNode;
|
|
9
|
+
declare function TooltipPopup({ className, style, ...props }: TooltipPopupProps): ReactNode;
|
|
10
|
+
export declare const Tooltip: {
|
|
11
|
+
Provider: import("react").FC<import("@base-ui/react").TooltipProviderProps>;
|
|
12
|
+
Root: typeof TooltipRoot;
|
|
13
|
+
Trigger: BaseTooltip.Trigger;
|
|
14
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Positioner: typeof TooltipPositioner;
|
|
16
|
+
Popup: typeof TooltipPopup;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mechane-ai/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Mechane UI components, tokens, application layouts, and charts",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/mechane-ai/mechane.git",
|
|
9
|
+
"directory": "workspaces/core/packages/browser/ui"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"src/tokens.stylex.ts",
|
|
14
|
+
"styles.css",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"NOTICE"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"**/*.css"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./tokens": {
|
|
29
|
+
"types": "./dist/tokens.stylex.d.ts",
|
|
30
|
+
"import": "./dist/tokens.js"
|
|
31
|
+
},
|
|
32
|
+
"./tokens.stylex": "./src/tokens.stylex.ts",
|
|
33
|
+
"./layout": {
|
|
34
|
+
"types": "./dist/layout/index.d.ts",
|
|
35
|
+
"import": "./dist/layout.js"
|
|
36
|
+
},
|
|
37
|
+
"./charts": {
|
|
38
|
+
"types": "./dist/charts/index.d.ts",
|
|
39
|
+
"import": "./dist/charts.js"
|
|
40
|
+
},
|
|
41
|
+
"./styles.css": "./styles.css"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@base-ui/react": "1.9.0",
|
|
45
|
+
"@stylexjs/stylex": "0.19.1",
|
|
46
|
+
"@visx/scale": "4.0.0",
|
|
47
|
+
"@visx/shape": "4.0.0",
|
|
48
|
+
"lucide-react": "1.66.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"react": "^19.3.1",
|
|
52
|
+
"react-dom": "^19.3.1"
|
|
53
|
+
}
|
|
6
54
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
|
|
3
|
+
export const colors = stylex.defineVars({
|
|
4
|
+
canvas: '#f5f5f5',
|
|
5
|
+
surface: '#ffffff',
|
|
6
|
+
ink: '#0a0a0a',
|
|
7
|
+
inkHover: '#333333',
|
|
8
|
+
inverse: '#ffffff',
|
|
9
|
+
muted: '#545454',
|
|
10
|
+
faint: '#9d9d9d',
|
|
11
|
+
line: '#ebebeb',
|
|
12
|
+
focus: '#0a69e2',
|
|
13
|
+
accent: '#21684f',
|
|
14
|
+
accentSoft: '#eef6f1',
|
|
15
|
+
warning: '#875900',
|
|
16
|
+
warningSoft: '#fff7e6',
|
|
17
|
+
danger: '#b13838',
|
|
18
|
+
dangerHover: '#922d2d',
|
|
19
|
+
dangerSoft: '#fff1f1',
|
|
20
|
+
overlay: '#00000066',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const spacing = stylex.defineVars({
|
|
24
|
+
xxs: '2px',
|
|
25
|
+
xs: '4px',
|
|
26
|
+
sm: '8px',
|
|
27
|
+
md: '12px',
|
|
28
|
+
lg: '16px',
|
|
29
|
+
xl: '24px',
|
|
30
|
+
xxl: '32px',
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const typography = stylex.defineVars({
|
|
34
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif',
|
|
35
|
+
monoFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',
|
|
36
|
+
bodySize: '13px',
|
|
37
|
+
bodyLineHeight: '20px',
|
|
38
|
+
captionSize: '12px',
|
|
39
|
+
captionLineHeight: '18px',
|
|
40
|
+
inputSize: '14px',
|
|
41
|
+
touchInputSize: '16px',
|
|
42
|
+
sectionSize: '16px',
|
|
43
|
+
sectionLineHeight: '22px',
|
|
44
|
+
headingSize: '36px',
|
|
45
|
+
headingLineHeight: '44px',
|
|
46
|
+
compactHeadingSize: '28px',
|
|
47
|
+
compactHeadingLineHeight: '36px',
|
|
48
|
+
headingTracking: '-0.035em',
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const controls = stylex.defineVars({
|
|
52
|
+
smHeight: '32px',
|
|
53
|
+
mdHeight: '36px',
|
|
54
|
+
coarseTarget: '44px',
|
|
55
|
+
iconSize: '16px',
|
|
56
|
+
paddingInline: '10px',
|
|
57
|
+
gap: '6px',
|
|
58
|
+
focusWidth: '2px',
|
|
59
|
+
disabledOpacity: '0.45',
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export const radii = stylex.defineVars({ sm: '4px', md: '6px' });
|
|
63
|
+
|
|
64
|
+
export const motion = stylex.defineVars({
|
|
65
|
+
duration: '140ms',
|
|
66
|
+
easing: 'cubic-bezier(0.23, 1, 0.32, 1)',
|
|
67
|
+
drawerDuration: '220ms',
|
|
68
|
+
drawerEasing: 'cubic-bezier(0.32, 0.72, 0, 1)',
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export const shadows = stylex.defineVars({ popup: '0 4px 16px #00000014' });
|
|
72
|
+
|
|
73
|
+
export const layers = stylex.defineConsts({ backdrop: '20', dialog: '21', popup: '30', tooltip: '40', skipLink: '50' });
|
|
74
|
+
|
|
75
|
+
export const conditions = stylex.defineConsts({
|
|
76
|
+
coarsePointer: '@media (pointer: coarse)',
|
|
77
|
+
hoverPointer: '@media (hover: hover) and (pointer: fine)',
|
|
78
|
+
compactText: '@media (max-width:639px)',
|
|
79
|
+
compactTable: '@media (max-width:600px)',
|
|
80
|
+
reducedMotion: '@media (prefers-reduced-motion: reduce)',
|
|
81
|
+
});
|
package/styles.css
ADDED