@stackone/malachite 0.67.1 → 0.68.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/COMPONENTS.md +5 -3
- package/README.md +13 -0
- package/dist/{CodeBlockHighlighter-DdYtkBCd.js → CodeBlockHighlighter-BYwemPlk.js} +2 -2
- package/dist/CodeBlockHighlighter-BYwemPlk.js.map +1 -0
- package/dist/{index-DgGKenM_.js → index-BRH2BT_r.js} +2832 -2655
- package/dist/index-BRH2BT_r.js.map +1 -0
- package/dist/index.d.ts +66 -4
- package/dist/index.js +81 -78
- package/package.json +14 -14
- package/dist/CodeBlockHighlighter-DdYtkBCd.js.map +0 -1
- package/dist/index-DgGKenM_.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,30 @@ export declare type AccordionProps = AccordionBaseProps & ({
|
|
|
59
59
|
header: default_2.ReactNode;
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
+
export declare const ActionBar: default_2.FC<ActionBarProps>;
|
|
63
|
+
|
|
64
|
+
export declare interface ActionBarItem {
|
|
65
|
+
label: string;
|
|
66
|
+
onClick?: () => void;
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
icon?: default_2.ReactNode;
|
|
69
|
+
tooltip?: string;
|
|
70
|
+
variant?: BaseButtonProps['variant'];
|
|
71
|
+
size?: BaseButtonProps['size'];
|
|
72
|
+
radius?: BaseButtonProps['radius'];
|
|
73
|
+
/** Renders a vertical rule before this button (and a menu divider when collapsed). */
|
|
74
|
+
dividerBefore?: boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export declare interface ActionBarProps {
|
|
78
|
+
buttons: ActionBarItem[];
|
|
79
|
+
/** Container width, in px, below which the row collapses into a single menu. */
|
|
80
|
+
collapseBelow?: number;
|
|
81
|
+
/** Accessible name for the collapsed menu trigger. */
|
|
82
|
+
menuLabel?: string;
|
|
83
|
+
className?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
62
86
|
/**
|
|
63
87
|
* ActionMenu is a kebab-style overflow action menu. The trigger is a square
|
|
64
88
|
* icon-only outline Button (three-dot icon by default); on click, a popover
|
|
@@ -105,6 +129,27 @@ declare interface AlertProps {
|
|
|
105
129
|
|
|
106
130
|
declare type AlertType = 'info' | 'success' | 'error' | 'warning';
|
|
107
131
|
|
|
132
|
+
export declare const AppLogo: default_2.FC<AppLogoProps>;
|
|
133
|
+
|
|
134
|
+
export declare interface AppLogoProps {
|
|
135
|
+
/** Connector logo URL. Falls back to a coloured initial tile when missing or broken. */
|
|
136
|
+
src?: string;
|
|
137
|
+
/** Connector name — the accessible label, the fallback initial, and the visible text. */
|
|
138
|
+
name: string;
|
|
139
|
+
/** Renders the name beside the mark. Omit for a bare logo (e.g. inside a dense row). */
|
|
140
|
+
showName?: boolean;
|
|
141
|
+
/** Pixel size of the square mark. */
|
|
142
|
+
size?: number;
|
|
143
|
+
nameSize?: FontSize;
|
|
144
|
+
/** Defaults to `normal`. Raise it when the logo doubles as a page title. */
|
|
145
|
+
nameWeight?: FontWeight;
|
|
146
|
+
/** Rendered as a tag after the name, e.g. `v1.2.0` or `Legacy`. */
|
|
147
|
+
version?: string;
|
|
148
|
+
/** Truncates a long name with an ellipsis and reveals the full value on hover. */
|
|
149
|
+
truncate?: boolean;
|
|
150
|
+
className?: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
108
153
|
/**
|
|
109
154
|
* Apply a custom theme while preserving the current theme mode (light/dark)
|
|
110
155
|
*/
|
|
@@ -150,6 +195,8 @@ export declare interface AvatarProps {
|
|
|
150
195
|
|
|
151
196
|
export declare type AvatarShape = 'square' | 'circle';
|
|
152
197
|
|
|
198
|
+
declare type BaseButtonProps = default_2.ComponentProps<typeof Button>;
|
|
199
|
+
|
|
153
200
|
export declare const BaseFormComponent: default_2.FC<BaseFormComponentProps>;
|
|
154
201
|
|
|
155
202
|
declare interface BaseFormComponentProps {
|
|
@@ -176,6 +223,8 @@ declare interface BaseSkeletonProps {
|
|
|
176
223
|
className?: string;
|
|
177
224
|
}
|
|
178
225
|
|
|
226
|
+
export declare const buildActionBarMenuItems: (buttons: ActionBarItem[]) => ActionMenuItem[];
|
|
227
|
+
|
|
179
228
|
export declare const Button: default_2.ForwardRefExoticComponent<ButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
180
229
|
|
|
181
230
|
declare interface ButtonDefinition {
|
|
@@ -439,6 +488,7 @@ export declare const CustomIcons: {
|
|
|
439
488
|
CaretLeftIcon: FC<IconProps>;
|
|
440
489
|
CaretRightIcon: FC<IconProps>;
|
|
441
490
|
CaretUpIcon: FC<IconProps>;
|
|
491
|
+
CodeIcon: FC<IconProps>;
|
|
442
492
|
ChangePasswordIcon: FC<IconProps>;
|
|
443
493
|
CheckCircleFilled: FC<IconProps>;
|
|
444
494
|
CheckIcon: FC<IconProps>;
|
|
@@ -587,7 +637,7 @@ export declare interface DropdownProps {
|
|
|
587
637
|
helperText?: default_2.ReactNode;
|
|
588
638
|
placeholder?: string;
|
|
589
639
|
search?: boolean;
|
|
590
|
-
/** 'medium' (42px) for form inputs; 'small' (32px) for toolbar chips. */
|
|
640
|
+
/** 'medium' (42px) for form inputs; 'small' (32px) for toolbar chips; 'xsmall' (28px) beside a title. */
|
|
591
641
|
size?: DropdownSize;
|
|
592
642
|
/** Names the trigger from the light DOM, where `htmlFor` cannot reach into the shadow root. */
|
|
593
643
|
id?: string;
|
|
@@ -595,11 +645,15 @@ export declare interface DropdownProps {
|
|
|
595
645
|
'aria-labelledby'?: string;
|
|
596
646
|
}
|
|
597
647
|
|
|
598
|
-
export declare type DropdownSize = 'small' | 'medium';
|
|
648
|
+
export declare type DropdownSize = 'xsmall' | 'small' | 'medium';
|
|
599
649
|
|
|
600
650
|
declare interface EllipsisTextProps {
|
|
601
651
|
children: default_2.ReactNode;
|
|
602
652
|
tooltip?: default_2.ReactNode | string;
|
|
653
|
+
/**
|
|
654
|
+
* Defaults to filling the container. Pass a fixed width only when the text should
|
|
655
|
+
* truncate before its container runs out of room (e.g. a column with a hard cap).
|
|
656
|
+
*/
|
|
603
657
|
maxWidth?: string;
|
|
604
658
|
color?: TextColor;
|
|
605
659
|
className?: string;
|
|
@@ -653,7 +707,7 @@ declare interface FlexProps {
|
|
|
653
707
|
}
|
|
654
708
|
|
|
655
709
|
/** Which of the three theme typefaces to render in. Defaults to the sans body face. */
|
|
656
|
-
declare type FontFamily = 'sans' | 'heading' | 'body';
|
|
710
|
+
declare type FontFamily = 'sans' | 'heading' | 'body' | 'mono';
|
|
657
711
|
|
|
658
712
|
export declare type FontSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
|
|
659
713
|
|
|
@@ -1166,6 +1220,8 @@ export declare interface MalachiteTheme {
|
|
|
1166
1220
|
muted: string;
|
|
1167
1221
|
primary: string;
|
|
1168
1222
|
alignment: 'left' | 'right';
|
|
1223
|
+
fontSize: string;
|
|
1224
|
+
minWidth: string;
|
|
1169
1225
|
};
|
|
1170
1226
|
};
|
|
1171
1227
|
codeBlock: {
|
|
@@ -1346,7 +1402,9 @@ export declare interface PartialMalachiteTheme {
|
|
|
1346
1402
|
};
|
|
1347
1403
|
error?: Partial<MalachiteTheme['colors']['table']['error']>;
|
|
1348
1404
|
};
|
|
1349
|
-
text?: Partial<MalachiteTheme['colors']['text']
|
|
1405
|
+
text?: Partial<Omit<MalachiteTheme['colors']['text'], 'rightSideText'>> & {
|
|
1406
|
+
rightSideText?: Partial<MalachiteTheme['colors']['text']['rightSideText']>;
|
|
1407
|
+
};
|
|
1350
1408
|
codeBlock?: Partial<MalachiteTheme['colors']['codeBlock']>;
|
|
1351
1409
|
};
|
|
1352
1410
|
}
|
|
@@ -1976,8 +2034,12 @@ export declare interface TabsProps {
|
|
|
1976
2034
|
|
|
1977
2035
|
export declare const Tag: default_2.FC<TagProps>;
|
|
1978
2036
|
|
|
2037
|
+
declare type TagFontSize = 'xsmall' | 'small' | 'medium';
|
|
2038
|
+
|
|
1979
2039
|
export declare interface TagProps {
|
|
1980
2040
|
value: string | number | default_2.ReactNode;
|
|
2041
|
+
/** Defaults to 12px. Use `xsmall` for a secondary badge beside a primary one. */
|
|
2042
|
+
fontSize?: TagFontSize;
|
|
1981
2043
|
type?: TagType;
|
|
1982
2044
|
bordered?: boolean;
|
|
1983
2045
|
shadow?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1,89 +1,92 @@
|
|
|
1
|
-
import { A as s, c as t, d as o, e as r,
|
|
1
|
+
import { A as s, c as t, d as o, e as r, f as i, g as n, B as l, h as p, i as d, j as T, k as c, l as m, m as S, n as u, o as h, p as g, q as C, r as y, D as w, s as x, t as B, u as F, F as A, v as f, w as v, x as L, y as b, z as k, E as P, G as z, H as D, I as M, K as R, L as I, J as N, M as V, N as j, O as q, P as E, Q as G, R as H, S as J, T as K, U as O, V as W, W as Q, X as U, Y as X, Z as Y, $ as Z, a0 as $, a1 as _, a2 as aa, a3 as ea, a4 as sa, a5 as ta, a6 as oa, a7 as ra, a8 as ia, a9 as na, aa as la, ab as pa, ac as da, ad as Ta, ae as ca, af as ma, ag as Sa, ah as ua, ai as ha, aj as ga, ak as Ca, al as ya, am as wa, an as xa, ao as Ba, ap as Fa, aq as Aa, ar as fa, as as va, at as La, au as ba, av as ka, aw as Pa, ax as za, ay as Da, az as Ma, aA as Ra, aB as Ia } from "./index-BRH2BT_r.js";
|
|
2
2
|
export {
|
|
3
3
|
s as Accordion,
|
|
4
|
-
t as
|
|
5
|
-
o as
|
|
6
|
-
r as
|
|
7
|
-
i as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
p as
|
|
11
|
-
d as
|
|
12
|
-
T as
|
|
4
|
+
t as ActionBar,
|
|
5
|
+
o as ActionMenu,
|
|
6
|
+
r as Alert,
|
|
7
|
+
i as AppLogo,
|
|
8
|
+
n as Avatar,
|
|
9
|
+
l as BaseFormComponent,
|
|
10
|
+
p as Button,
|
|
11
|
+
d as ButtonList,
|
|
12
|
+
T as Card,
|
|
13
|
+
c as CardStrip,
|
|
14
|
+
m as Checkbox,
|
|
13
15
|
S as ClampText,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
u as CodeBlock,
|
|
17
|
+
h as CollapsibleSection,
|
|
18
|
+
g as Confetti,
|
|
19
|
+
C as ConnectionHeader,
|
|
20
|
+
y as CustomIcons,
|
|
21
|
+
w as DefinitionRow,
|
|
22
|
+
x as Divider,
|
|
23
|
+
B as DividerVariant,
|
|
24
|
+
F as Dropdown,
|
|
25
|
+
A as Flex,
|
|
24
26
|
f as FlexAlign,
|
|
25
27
|
v as FlexDirection,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
L as FlexGapSize,
|
|
29
|
+
b as FlexJustify,
|
|
30
|
+
k as FooterLinks,
|
|
29
31
|
P as FooterNav,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
32
|
+
z as Form,
|
|
33
|
+
D as FormItem,
|
|
34
|
+
M as Input,
|
|
35
|
+
R as KeyValueList,
|
|
36
|
+
I as Link,
|
|
37
|
+
N as LoadingBar,
|
|
38
|
+
V as MalachiteContext,
|
|
39
|
+
j as MultiSelect,
|
|
40
|
+
q as NumberTag,
|
|
41
|
+
E as OverflowRow,
|
|
42
|
+
G as Padded,
|
|
43
|
+
H as PaddingSize,
|
|
44
|
+
J as PillButton,
|
|
45
|
+
K as PreviewTree,
|
|
46
|
+
O as PreviewTreeRow,
|
|
47
|
+
W as Progress,
|
|
48
|
+
Q as Radio,
|
|
49
|
+
U as Search,
|
|
50
|
+
X as SegmentedControl,
|
|
51
|
+
Y as SelectableCard,
|
|
52
|
+
Z as ShadowEscape,
|
|
53
|
+
$ as SidePanel,
|
|
54
|
+
_ as SidePanelNavFooter,
|
|
55
|
+
aa as Skeleton,
|
|
56
|
+
ea as Spacer,
|
|
57
|
+
sa as SpacingSize,
|
|
58
|
+
ta as Spinner,
|
|
59
|
+
oa as SplitScreenLayout,
|
|
60
|
+
ra as StatBadge,
|
|
61
|
+
ia as Statistic,
|
|
62
|
+
na as StatusBadge,
|
|
63
|
+
la as Stepper,
|
|
64
|
+
pa as Surface,
|
|
65
|
+
da as SurfaceRow,
|
|
66
|
+
Ta as Swatch,
|
|
67
|
+
ca as Table,
|
|
68
|
+
ma as Tabs,
|
|
67
69
|
Sa as Tag,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
ua as TextArea,
|
|
71
|
+
ha as ThemeScope,
|
|
72
|
+
ga as Toggle,
|
|
73
|
+
Ca as Toolbar,
|
|
74
|
+
ya as Tooltip,
|
|
75
|
+
wa as TruncatedTooltip,
|
|
76
|
+
xa as Typography,
|
|
77
|
+
Ba as WizardLayout,
|
|
78
|
+
Fa as applyCustomTheme,
|
|
79
|
+
Aa as applyDarkTheme,
|
|
78
80
|
fa as applyLightTheme,
|
|
79
81
|
va as applyTheme,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Pa as
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
La as applyThemeVars,
|
|
83
|
+
ba as buildActionBarMenuItems,
|
|
84
|
+
ka as darkTheme,
|
|
85
|
+
Pa as defaultTheme,
|
|
86
|
+
za as getCurrentTheme,
|
|
87
|
+
Da as getCurrentThemeMode,
|
|
88
|
+
Ma as initializeTheme,
|
|
89
|
+
Ra as resetTheme,
|
|
90
|
+
Ia as toggleTheme
|
|
88
91
|
};
|
|
89
92
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackone/malachite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.68.0",
|
|
4
4
|
"description": "StackOne's themeable React component library — Shadow DOM isolated, scoped Tailwind, theme-token driven.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "StackOne",
|
|
@@ -39,18 +39,6 @@
|
|
|
39
39
|
"default": "./dist/index.js"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"dev": "vite",
|
|
44
|
-
"build": "vite build",
|
|
45
|
-
"lint": "biome lint",
|
|
46
|
-
"lint:fix": "biome lint --fix",
|
|
47
|
-
"test": "vitest run",
|
|
48
|
-
"test:watch": "vitest",
|
|
49
|
-
"typecheck": "tsc -p tsconfig.app.json --noEmit && tsc -p tsconfig.demo.json --noEmit",
|
|
50
|
-
"docs:components": "node scripts/generate-components-doc.mjs",
|
|
51
|
-
"docs:check": "node scripts/generate-components-doc.mjs --check",
|
|
52
|
-
"publish-release": "npm publish --access=public"
|
|
53
|
-
},
|
|
54
42
|
"peerDependencies": {
|
|
55
43
|
"react": "^18.3.1 || ^19.0.0",
|
|
56
44
|
"react-dom": "^18.3.1 || ^19.0.0",
|
|
@@ -88,5 +76,17 @@
|
|
|
88
76
|
"@uiw/react-json-view": "^2.0.0-alpha.35",
|
|
89
77
|
"marked-react": "^3.0.0",
|
|
90
78
|
"react-syntax-highlighter": "^16.1.1"
|
|
79
|
+
},
|
|
80
|
+
"scripts": {
|
|
81
|
+
"dev": "vite",
|
|
82
|
+
"build": "vite build",
|
|
83
|
+
"lint": "biome lint",
|
|
84
|
+
"lint:fix": "biome lint --fix",
|
|
85
|
+
"test": "vitest run",
|
|
86
|
+
"test:watch": "vitest",
|
|
87
|
+
"typecheck": "tsc -p tsconfig.app.json --noEmit && tsc -p tsconfig.demo.json --noEmit",
|
|
88
|
+
"docs:components": "node scripts/generate-components-doc.mjs",
|
|
89
|
+
"docs:check": "node scripts/generate-components-doc.mjs --check",
|
|
90
|
+
"publish-release": "pnpm publish --access=public --no-git-checks"
|
|
91
91
|
}
|
|
92
|
-
}
|
|
92
|
+
}
|