@stackone/malachite 0.67.2 → 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/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
 
@@ -1980,8 +2034,12 @@ export declare interface TabsProps {
1980
2034
 
1981
2035
  export declare const Tag: default_2.FC<TagProps>;
1982
2036
 
2037
+ declare type TagFontSize = 'xsmall' | 'small' | 'medium';
2038
+
1983
2039
  export declare interface TagProps {
1984
2040
  value: string | number | default_2.ReactNode;
2041
+ /** Defaults to 12px. Use `xsmall` for a secondary badge beside a primary one. */
2042
+ fontSize?: TagFontSize;
1985
2043
  type?: TagType;
1986
2044
  bordered?: boolean;
1987
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, B as i, f as l, g as n, h as p, i as d, j as T, k as S, l as m, m as c, n as h, o as u, p as g, D as C, q as y, r as w, s as x, F, t as f, u as v, v as k, w as B, x as L, y as P, z as b, E as A, I as D, K as z, L as R, G as M, M as I, H as N, N as V, O as j, P as q, J 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 la, aa as na, ab as pa, ac as da, ad as Ta, ae as Sa, af as ma, ag as ca, ah as ha, ai as ua, aj as ga, ak as Ca, al as ya, am as wa, an as xa, ao as Fa, ap as fa, aq as va, ar as ka, as as Ba, at as La, au as Pa, av as ba, aw as Aa, ax as Da, ay as za } from "./index-BBZpz36P.js";
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 ActionMenu,
5
- o as Alert,
6
- r as Avatar,
7
- i as BaseFormComponent,
8
- l as Button,
9
- n as ButtonList,
10
- p as Card,
11
- d as CardStrip,
12
- T as Checkbox,
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
- m as CodeBlock,
15
- c as CollapsibleSection,
16
- h as Confetti,
17
- u as ConnectionHeader,
18
- g as CustomIcons,
19
- C as DefinitionRow,
20
- y as Divider,
21
- w as DividerVariant,
22
- x as Dropdown,
23
- F as Flex,
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
- k as FlexGapSize,
27
- B as FlexJustify,
28
- L as FooterLinks,
28
+ L as FlexGapSize,
29
+ b as FlexJustify,
30
+ k as FooterLinks,
29
31
  P as FooterNav,
30
- b as Form,
31
- A as FormItem,
32
- D as Input,
33
- z as KeyValueList,
34
- R as Link,
35
- M as LoadingBar,
36
- I as MalachiteContext,
37
- N as MultiSelect,
38
- V as NumberTag,
39
- j as OverflowRow,
40
- q as Padded,
41
- E as PaddingSize,
42
- G as PillButton,
43
- H as PreviewTree,
44
- J as PreviewTreeRow,
45
- K as Progress,
46
- O as Radio,
47
- W as Search,
48
- Q as SegmentedControl,
49
- U as SelectableCard,
50
- X as ShadowEscape,
51
- Y as SidePanel,
52
- Z as SidePanelNavFooter,
53
- $ as Skeleton,
54
- _ as Spacer,
55
- aa as SpacingSize,
56
- ea as Spinner,
57
- sa as SplitScreenLayout,
58
- ta as StatBadge,
59
- oa as Statistic,
60
- ra as StatusBadge,
61
- ia as Stepper,
62
- la as Surface,
63
- na as SurfaceRow,
64
- pa as Swatch,
65
- da as Table,
66
- Ta as Tabs,
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
- ma as TextArea,
69
- ca as ThemeScope,
70
- ha as Toggle,
71
- ua as Toolbar,
72
- ga as Tooltip,
73
- Ca as TruncatedTooltip,
74
- ya as Typography,
75
- wa as WizardLayout,
76
- xa as applyCustomTheme,
77
- Fa as applyDarkTheme,
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
- ka as applyThemeVars,
81
- Ba as darkTheme,
82
- La as defaultTheme,
83
- Pa as getCurrentTheme,
84
- ba as getCurrentThemeMode,
85
- Aa as initializeTheme,
86
- Da as resetTheme,
87
- za as toggleTheme
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.67.2",
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
+ }