@stackone/malachite 0.47.0 → 0.48.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 CHANGED
@@ -41,7 +41,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
41
41
  - **`Radio`** — Single radio control with hover state; parent manages the group. Pass `presentational` to render a visual-only, non-focusable indicator for use inside a clickable row/card. _Key props:_ `checked`, `onChange`, `disabled`, `size`, `presentational`.
42
42
  - **`Toggle`** — On/off switch.
43
43
  - **`Dropdown`** — Single-select dropdown. _Key props:_ `DropdownItem[]`, `DropdownSize`.
44
- - **`MultiSelect`** — Multi-select dropdown. _Key props:_ `MultiSelectOption[]`, `MultiSelectSize`.
44
+ - **`MultiSelect`** — Multi-select dropdown with chips, inline search, keyboard navigation, and per-option descriptions. Supports controlled (`value`) and uncontrolled (`defaultValue`) modes. _Key props:_ `MultiSelectOption[]`, `MultiSelectSize`, `chips`, `chipsRemovable`, `chipsMax`, `inlineSearch`, `defaultValue`, `name`, `description`, `tooltip`, `required`, `formControl`. _Base props:_ `options`, `value`, `onChange` (optional), `placeholder`, `searchable`, `size`, `width`, `disabled`, `error`, `loading`, `label`. _Option props:_ `disabled` (locked/non-removable), `badge` (right-aligned ReactNode in dropdown only), `description`, `descriptionMode` (`icon` | `subtitle` | `hover`), `descriptionIcon`, `descriptionMaxLines`.
45
45
 
46
46
  ## Buttons & actions
47
47
 
@@ -54,12 +54,12 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
54
54
  - **`Alert`** — Inline alert/callout (info, success, warning, error).
55
55
  - **`StatusBadge`** — Large status indicator (e.g. success checkmark) for terminal/confirmation screens. _Key props:_ `type`.
56
56
  - **`StatBadge`** — Pill showing a numeric value with a label (e.g. "3 accounts selected"). _Key props:_ `count`, `label`.
57
- - **`Tag`** — Small status/label tag. Types: success, error, warning, default. _Key props:_ `value`, `type`, `paddingSize`, `textTransform`, `WidthSize`.
57
+ - **`Tag`** — Small status/label tag. Types: success, error, warning, default, primary, secondary, emphasis. _Key props:_ `value`, `type`, `paddingSize`, `textTransform`, `WidthSize`, `onRemove` (renders × close icon), `bordered`, `shadow`, `icon`, `iconPosition`.
58
58
  - **`NumberTag`** — Compact numeric badge/counter.
59
59
  - **`Progress`** — Progress bar.
60
60
  - **`Spinner`** — Loading spinner.
61
61
  - **`Skeleton`** — Loading placeholders. Includes `Skeleton.Avatar` and `Skeleton.Input`.
62
- - **`Tooltip`** — Hover/focus tooltip; also works on disabled controls (see CLAUDE.md).
62
+ - **`Tooltip`** — Hover/focus tooltip; also works on disabled controls (see CLAUDE.md). _Key props:_ `text`, `delay`, `placement`, `maxWidth`, `wrapChildren`, `isShrinkable`, `fill`.
63
63
  - **`TruncatedTooltip`** — Shows a tooltip only when its text is truncated.
64
64
  - **`Confetti`** — Celebratory confetti burst for success moments. _Key props:_ `pieces`.
65
65
 
package/dist/index.d.ts CHANGED
@@ -977,16 +977,13 @@ declare interface MarkdownProps {
977
977
 
978
978
  export declare const MultiSelect: default_2.FC<MultiSelectProps>;
979
979
 
980
- export declare interface MultiSelectOption {
981
- value: string;
982
- label: default_2.ReactNode;
983
- searchText?: string;
984
- }
985
-
986
- export declare interface MultiSelectProps {
980
+ declare interface MultiSelectBaseProps {
987
981
  options: MultiSelectOption[];
988
- value: string[];
989
- onChange: (next: string[]) => void;
982
+ /** Controlled value. When provided, component is fully controlled. */
983
+ value?: string[];
984
+ /** Initial value for uncontrolled usage (like Dropdown's defaultValue). */
985
+ defaultValue?: string[];
986
+ onChange?: (next: string[]) => void;
990
987
  placeholder?: string;
991
988
  renderTrigger?: (selected: MultiSelectOption[]) => default_2.ReactNode;
992
989
  searchable?: boolean;
@@ -997,10 +994,48 @@ export declare interface MultiSelectProps {
997
994
  error?: boolean;
998
995
  loading?: boolean;
999
996
  label?: string;
997
+ description?: string;
998
+ tooltip?: string;
999
+ hint?: string;
1000
+ required?: boolean;
1001
+ /** Show selected values as chips instead of "N selected" text */
1002
+ chips?: boolean;
1003
+ /** Show × button on each chip to remove it (only when chips=true) */
1004
+ chipsRemovable?: boolean;
1005
+ /** Max visible chips. 'auto' = show all chips. Number = hard limit with "+N" badge */
1006
+ chipsMax?: number | 'auto';
1007
+ /** Search input inside the trigger field instead of external search bar */
1008
+ inlineSearch?: boolean;
1000
1009
  className?: string;
1001
1010
  style?: default_2.CSSProperties;
1002
1011
  }
1003
1012
 
1013
+ export declare interface MultiSelectOption {
1014
+ value: string;
1015
+ label: default_2.ReactNode;
1016
+ searchText?: string;
1017
+ /** Prevent toggling or removing this option — used for mandatory/locked selections */
1018
+ disabled?: boolean;
1019
+ /** Right-aligned badge shown in the dropdown only (not in chips) */
1020
+ badge?: default_2.ReactNode;
1021
+ /** Description text for this option */
1022
+ description?: string;
1023
+ /** How description renders — 'icon': info icon with tooltip, 'subtitle': text below label, 'hover': tooltip on label. Default: 'icon' */
1024
+ descriptionMode?: 'icon' | 'subtitle' | 'hover';
1025
+ /** Custom icon for 'icon' mode. Default: built-in ⓘ */
1026
+ descriptionIcon?: default_2.ReactNode;
1027
+ /** Truncate subtitle after N lines. Only applies to 'subtitle' mode */
1028
+ descriptionMaxLines?: number;
1029
+ }
1030
+
1031
+ export declare type MultiSelectProps = (MultiSelectBaseProps & {
1032
+ formControl: Control<FieldValues, unknown>;
1033
+ name: string;
1034
+ }) | (MultiSelectBaseProps & {
1035
+ formControl?: undefined;
1036
+ name?: string;
1037
+ });
1038
+
1004
1039
  export declare type MultiSelectSize = 'small' | 'medium';
1005
1040
 
1006
1041
  export declare const NumberTag: default_2.FC<NumberTagProps>;
@@ -1542,6 +1577,7 @@ export declare interface TagProps {
1542
1577
  iconColor?: TextColor;
1543
1578
  pointerType?: 'pointer' | 'default';
1544
1579
  onClick?: () => void;
1580
+ onRemove?: (e: default_2.MouseEvent) => void;
1545
1581
  className?: string;
1546
1582
  }
1547
1583
 
@@ -1649,6 +1685,8 @@ declare interface TooltipProps {
1649
1685
  placement?: 'top' | 'bottom' | 'left' | 'right';
1650
1686
  isShrinkable?: boolean;
1651
1687
  fill?: boolean;
1688
+ /** Max width of tooltip. Default: 320px */
1689
+ maxWidth?: number | string;
1652
1690
  }
1653
1691
 
1654
1692
  /**