@stackone/malachite 2.115.0 → 2.117.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.
Files changed (56) hide show
  1. package/COMPONENTS.md +19 -9
  2. package/dist/assets/icons/caret_down.svg.js +2 -2
  3. package/dist/assets/icons/caret_down.svg.js.map +1 -1
  4. package/dist/assets/icons/caret_up.svg.js +2 -2
  5. package/dist/assets/icons/caret_up.svg.js.map +1 -1
  6. package/dist/assets/icons/minus.svg.js +6 -0
  7. package/dist/assets/icons/minus.svg.js.map +1 -0
  8. package/dist/assets/icons/warning_circle_filled.svg.js +3 -3
  9. package/dist/assets/icons/warning_circle_filled.svg.js.map +1 -1
  10. package/dist/components/Alert.js +3 -3
  11. package/dist/components/Alert.js.map +1 -1
  12. package/dist/components/BaseFormComponent.js +84 -64
  13. package/dist/components/BaseFormComponent.js.map +1 -1
  14. package/dist/components/ClampText.js +89 -15
  15. package/dist/components/ClampText.js.map +1 -1
  16. package/dist/components/CustomIcons/MinusIcon.js +16 -0
  17. package/dist/components/CustomIcons/MinusIcon.js.map +1 -0
  18. package/dist/components/CustomIcons/index.js +150 -147
  19. package/dist/components/CustomIcons/index.js.map +1 -1
  20. package/dist/components/Dropdown.js +449 -439
  21. package/dist/components/Dropdown.js.map +1 -1
  22. package/dist/components/FieldBlock.js +32 -21
  23. package/dist/components/FieldBlock.js.map +1 -1
  24. package/dist/components/GuideTimeline/GuideJumpMenu.js +74 -0
  25. package/dist/components/GuideTimeline/GuideJumpMenu.js.map +1 -0
  26. package/dist/components/GuideTimeline/GuideProgress.js +81 -0
  27. package/dist/components/GuideTimeline/GuideProgress.js.map +1 -0
  28. package/dist/components/GuideTimeline/GuideTimeline.js +313 -0
  29. package/dist/components/GuideTimeline/GuideTimeline.js.map +1 -0
  30. package/dist/components/GuideTimeline/guideTimelinePositions.js +23 -0
  31. package/dist/components/GuideTimeline/guideTimelinePositions.js.map +1 -0
  32. package/dist/components/Link.js +17 -23
  33. package/dist/components/Link.js.map +1 -1
  34. package/dist/components/MultiSelect.js +1 -1
  35. package/dist/components/MultiSelect.js.map +1 -1
  36. package/dist/components/SidePanel.js +382 -227
  37. package/dist/components/SidePanel.js.map +1 -1
  38. package/dist/components/Spacer.js +26 -26
  39. package/dist/components/Spacer.js.map +1 -1
  40. package/dist/components/Tooltip.js +1 -1
  41. package/dist/components/Tooltip.js.map +1 -1
  42. package/dist/components/TruncatedTooltip.js +1 -1
  43. package/dist/components/TruncatedTooltip.js.map +1 -1
  44. package/dist/components/Typography/MarkdownBlock.js +17 -16
  45. package/dist/components/Typography/MarkdownBlock.js.map +1 -1
  46. package/dist/components/ZoomableImage.js +144 -32
  47. package/dist/components/ZoomableImage.js.map +1 -1
  48. package/dist/components/safeHref.js +6 -5
  49. package/dist/components/safeHref.js.map +1 -1
  50. package/dist/components/sidePanelOverlay.js +7 -0
  51. package/dist/components/sidePanelOverlay.js.map +1 -0
  52. package/dist/index.d.ts +154 -13
  53. package/dist/index.js +265 -255
  54. package/dist/index.js.map +1 -1
  55. package/dist/tailwind.css.js +1 -1
  56. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1191,6 +1191,12 @@ export declare interface ClampTextProps {
1191
1191
  children: default_2.ReactNode;
1192
1192
  lines?: number;
1193
1193
  expandOnHover?: boolean;
1194
+ /**
1195
+ * Ends text that runs past `lines` with `… Read More` in the accent, which opens it in full
1196
+ * and follows it as `Show Less`. Instead of `expandOnHover`, which it turns off. The text should
1197
+ * flow inline, e.g. a `MarkdownBlock` with `variant="flow"`, so `Show Less` follows its last word.
1198
+ */
1199
+ expandable?: boolean;
1194
1200
  className?: string;
1195
1201
  }
1196
1202
 
@@ -1633,6 +1639,7 @@ export declare const CustomIcons: {
1633
1639
  McpIcon: FC<IconProps>;
1634
1640
  MembersIcon: FC<IconProps>;
1635
1641
  ModalIcon: FC<IconProps>;
1642
+ MinusIcon: FC<IconProps>;
1636
1643
  MoreHorizontalIcon: FC<IconProps>;
1637
1644
  MoreVerticalIcon: FC<IconProps>;
1638
1645
  NavbarCollapseIcon: FC<IconProps>;
@@ -1881,7 +1888,7 @@ export declare const DoubleCheckIcon: React.FC<IconProps_47>;
1881
1888
 
1882
1889
  export declare const DownloadIcon: React.FC<IconProps_48>;
1883
1890
 
1884
- export declare const Dropdown: ({ items, onItemSelected, defaultValue, value, disabled, error, tone, label, hint, hintIcon, rightSideContent, tooltip, name, required, requiredIndicator, loading, menuLoading, formControl, description, helperText, placeholder, search, onSearchChange, showSubtitleInTrigger, subtitleLayout, clearable, size, fullWidth, width, minWidth, menuAlign, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: DropdownProps) => JSX_2.Element;
1891
+ export declare const Dropdown: ({ items, onItemSelected, defaultValue, value, disabled, error, tone, label, hint, hintIcon, rightSideContent, tooltip, name, required, requiredIndicator, loading, menuLoading, formControl, description, helperText, placeholder, search, onSearchChange, showSubtitleInTrigger, triggerTooltip, subtitleLayout, wrapSubtitles, clearable, size, fullWidth, width, minWidth, menuAlign, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: DropdownProps) => JSX_2.Element;
1885
1892
 
1886
1893
  declare interface DropdownBaseProps {
1887
1894
  label?: string;
@@ -1911,6 +1918,12 @@ declare interface DropdownBaseProps {
1911
1918
  helperText?: default_2.ReactNode;
1912
1919
  placeholder?: string;
1913
1920
  subtitleLayout?: SubtitleLayout;
1921
+ /**
1922
+ * With `subtitleLayout="stacked"`: each option's subtitle wraps to show in full in the open
1923
+ * list, rather than ending in an ellipsis. For a short list, where each option needs its
1924
+ * whole description to be told apart; a long list grows uneven rows.
1925
+ */
1926
+ wrapSubtitles?: boolean;
1914
1927
  /** Adds a clear control to the trigger, reported as `onItemSelected(undefined)`. */
1915
1928
  clearable?: boolean;
1916
1929
  /** 'large' (42px) for form inputs; 'medium' (32px) for toolbar chips; 'small' (28px) beside a title. */
@@ -1972,10 +1985,16 @@ declare type DropdownTriggerModeProps = {
1972
1985
  search?: false;
1973
1986
  /** Promotes the selected item's `subtitle` into the closed trigger, beneath the value. */
1974
1987
  showSubtitleInTrigger?: boolean;
1988
+ /**
1989
+ * With `showSubtitleInTrigger`: a tooltip on the trigger carrying whichever lines it cut
1990
+ * off. Off where opening the menu is the way to read them, as its options wrap. Default: on.
1991
+ */
1992
+ triggerTooltip?: boolean;
1975
1993
  onSearchChange?: never;
1976
1994
  } | {
1977
1995
  search: true;
1978
1996
  showSubtitleInTrigger?: never;
1997
+ triggerTooltip?: never;
1979
1998
  /**
1980
1999
  * Called with the query as typed, and with `''` when a pick, a clear, Escape or a click
1981
2000
  * outside empties it. For offering the typed text as an item of its own: items are still
@@ -2077,6 +2096,12 @@ export declare interface FieldBlockProps {
2077
2096
  /** Sits at the far end of the label row — a copy button, a link. */
2078
2097
  action?: default_2.ReactNode;
2079
2098
  helperText?: default_2.ReactNode;
2099
+ /**
2100
+ * `field` sets the content at an input's full width, under the label rather than in from it,
2101
+ * and lines the action up with the button an input ends with (its copy button, say). For
2102
+ * content that is itself a box, such as a list, set among inputs.
2103
+ */
2104
+ variant?: 'default' | 'field';
2080
2105
  children: default_2.ReactNode;
2081
2106
  className?: string;
2082
2107
  style?: default_2.CSSProperties;
@@ -2425,6 +2450,82 @@ export declare interface GroupedStepperProps extends StepperBaseProps {
2425
2450
  steps?: never;
2426
2451
  }
2427
2452
 
2453
+ /**
2454
+ * Jumps to a step of a `GuideTimeline`. Its button shows the step the reader is on; the menu lists
2455
+ * every section, with the steps of the current one indented under it. Sections already
2456
+ * passed read in the accent colour.
2457
+ */
2458
+ export declare const GuideJumpMenu: default_2.FC<GuideJumpMenuProps>;
2459
+
2460
+ export declare interface GuideJumpMenuProps {
2461
+ sections: GuideTimelineSection[];
2462
+ /** The step the reader is on, as `GuideTimeline`'s `active`. */
2463
+ active?: string;
2464
+ onSelect: (key: string) => void;
2465
+ /** Names the menu. Default: `Jump to step`. */
2466
+ label?: string;
2467
+ }
2468
+
2469
+ /**
2470
+ * Where the reader is in a `GuideTimeline`: `Step 2.2 · title`, and a bar cut into one
2471
+ * segment per section, each as long as its steps and filling as they are passed. For a footer.
2472
+ */
2473
+ export declare const GuideProgress: default_2.FC<GuideProgressProps>;
2474
+
2475
+ export declare interface GuideProgressProps {
2476
+ sections: GuideTimelineSection[];
2477
+ /** The step the reader is on, as `GuideTimeline`'s `active`. */
2478
+ active?: string;
2479
+ /** Names the bar. Default: `Progress`. */
2480
+ 'aria-label'?: string;
2481
+ }
2482
+
2483
+ /**
2484
+ * A guide laid out as one scrolling column: each section a heading with a numbered mark, its
2485
+ * steps strung on a rail below it, coded `1.1`, `1.2` so a step names its section without the
2486
+ * heading in view. Marks before the
2487
+ * `active` step show a check. Place it in a scrolling container with no padding of its own,
2488
+ * such as a SidePanel aside with `bodyPadding: false`; it reports the step scrolled to the
2489
+ * top through `onActiveChange`, and scrolls to a step when `active` is set to it.
2490
+ */
2491
+ export declare const GuideTimeline: default_2.FC<GuideTimelineProps>;
2492
+
2493
+ /** One place a reader can be: a step, or a section that has no steps. */
2494
+ export declare interface GuideTimelinePosition {
2495
+ key: string;
2496
+ /** `2.2` for a section's second step, `3` for a section without steps. */
2497
+ code: string;
2498
+ title: string;
2499
+ sectionIndex: number;
2500
+ }
2501
+
2502
+ export declare const guideTimelinePositions: (sections: readonly GuideTimelineSection[]) => GuideTimelinePosition[];
2503
+
2504
+ export declare interface GuideTimelineProps {
2505
+ sections: GuideTimelineSection[];
2506
+ /** The step in view. Setting it to a step the reader is not on scrolls there. */
2507
+ active?: string;
2508
+ /** Called as the reader scrolls another step to the top, so a menu or progress bar can follow. */
2509
+ onActiveChange?: (key: string) => void;
2510
+ /** After the last section, such as what to do once the steps are done. */
2511
+ end?: default_2.ReactNode;
2512
+ 'aria-label'?: string;
2513
+ }
2514
+
2515
+ export declare interface GuideTimelineSection {
2516
+ key: string;
2517
+ title: string;
2518
+ /** Under the section's heading, above its steps. A section without steps is this alone. */
2519
+ description?: default_2.ReactNode;
2520
+ steps: GuideTimelineStep[];
2521
+ }
2522
+
2523
+ export declare interface GuideTimelineStep {
2524
+ key: string;
2525
+ title: string;
2526
+ children?: default_2.ReactNode;
2527
+ }
2528
+
2428
2529
  export declare const Hexagon: default_2.FC<HexagonProps>;
2429
2530
 
2430
2531
  export declare interface HexagonProps {
@@ -3602,6 +3703,9 @@ export declare interface LinkProps {
3602
3703
  color?: 'default' | 'dimmed';
3603
3704
  size?: FontSize;
3604
3705
  underline?: boolean;
3706
+ onClick?: default_2.MouseEventHandler<HTMLAnchorElement>;
3707
+ /** Renders a root-relative href through the app's router instead of a new-tab anchor, without `target` or `rel`. Other hrefs keep the anchor. */
3708
+ renderLink?: RenderLink;
3605
3709
  }
3606
3710
 
3607
3711
  declare interface LinkProps_2 {
@@ -4193,6 +4297,8 @@ export declare const McpIcon: React.FC<IconProps_81>;
4193
4297
 
4194
4298
  export declare const MembersIcon: React.FC<IconProps_82>;
4195
4299
 
4300
+ export declare const MinusIcon: React.FC<IconProps_84>;
4301
+
4196
4302
  export declare const Modal: default_2.FC<ModalProps>;
4197
4303
 
4198
4304
  export declare const ModalIcon: React.FC<IconProps_83>;
@@ -4277,9 +4383,9 @@ export declare type ModalSurface = 'card' | 'none';
4277
4383
 
4278
4384
  export declare type ModalTrayTone = 'neutral' | 'warning' | 'error' | 'success';
4279
4385
 
4280
- export declare const MoreHorizontalIcon: React.FC<IconProps_84>;
4386
+ export declare const MoreHorizontalIcon: React.FC<IconProps_85>;
4281
4387
 
4282
- export declare const MoreVerticalIcon: React.FC<IconProps_85>;
4388
+ export declare const MoreVerticalIcon: React.FC<IconProps_86>;
4283
4389
 
4284
4390
  export declare const MultiSelect: default_2.FC<MultiSelectProps>;
4285
4391
 
@@ -4373,9 +4479,9 @@ export declare type MultiSelectSize = 'small' | 'medium' | 'large';
4373
4479
 
4374
4480
  declare type NativeProps = Omit<default_2.HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style' | 'color' | 'title'>;
4375
4481
 
4376
- export declare const NavbarCollapseIcon: React.FC<IconProps_86>;
4482
+ export declare const NavbarCollapseIcon: React.FC<IconProps_87>;
4377
4483
 
4378
- export declare const NavbarExpandIcon: React.FC<IconProps_87>;
4484
+ export declare const NavbarExpandIcon: React.FC<IconProps_88>;
4379
4485
 
4380
4486
  export declare const NavItem: default_2.ForwardRefExoticComponent<NavItemProps & default_2.RefAttributes<HTMLElement>>;
4381
4487
 
@@ -4423,7 +4529,7 @@ export declare interface NavItemLinkProps extends NavItemBaseProps {
4423
4529
 
4424
4530
  export declare type NavItemProps = NavItemLinkProps | NavItemAsChildProps;
4425
4531
 
4426
- export declare const NotFoundIcon: React.FC<IconProps_88>;
4532
+ export declare const NotFoundIcon: React.FC<IconProps_89>;
4427
4533
 
4428
4534
  export declare const NumberTag: default_2.FC<NumberTagProps>;
4429
4535
 
@@ -4438,7 +4544,7 @@ export declare interface NumberTagProps {
4438
4544
  className?: string;
4439
4545
  }
4440
4546
 
4441
- export declare const OrganizationIcon: React.FC<IconProps_89>;
4547
+ export declare const OrganizationIcon: React.FC<IconProps_90>;
4442
4548
 
4443
4549
  export declare const OverflowRow: default_2.FC<OverflowRowProps>;
4444
4550
 
@@ -4644,11 +4750,11 @@ declare type PillButtonTone = 'default' | 'assistant';
4644
4750
 
4645
4751
  declare type PillButtonVariant = 'default' | 'inverted';
4646
4752
 
4647
- export declare const PinIcon: React.FC<IconProps_90>;
4753
+ export declare const PinIcon: React.FC<IconProps_91>;
4648
4754
 
4649
- export declare const PlaygroundIcon: React.FC<IconProps_91>;
4755
+ export declare const PlaygroundIcon: React.FC<IconProps_92>;
4650
4756
 
4651
- export declare const PlusIcon: React.FC<IconProps_92>;
4757
+ export declare const PlusIcon: React.FC<IconProps_84>;
4652
4758
 
4653
4759
  export declare const Popover: default_2.FC<PopoverProps> & {
4654
4760
  Header: default_2.FC< PopoverHeaderProps>;
@@ -4954,8 +5060,9 @@ export declare const ReloadIcon: React.FC<IconProps_99>;
4954
5060
 
4955
5061
  /**
4956
5062
  * Renders an in-app link through the app's own link component, spreading every field onto it:
4957
- * breadcrumbs, the back button, and root-relative markdown links. A client-side-routed consumer
4958
- * MUST pass this, or navigation breaks.
5063
+ * breadcrumbs, the back button, and root-relative markdown and `Link` hrefs. Forward `onClick`
5064
+ * too, which `Link` passes when its caller sets one. A client-side-routed consumer MUST pass
5065
+ * this, or navigation breaks.
4959
5066
  */
4960
5067
  export declare type RenderLink = (props: {
4961
5068
  href: string;
@@ -4963,6 +5070,7 @@ export declare type RenderLink = (props: {
4963
5070
  className?: string;
4964
5071
  'aria-current'?: 'page';
4965
5072
  'aria-label'?: string;
5073
+ onClick?: default_2.MouseEventHandler<HTMLAnchorElement>;
4966
5074
  }) => default_2.ReactNode;
4967
5075
 
4968
5076
  export declare const ReplyIcon: React.FC<IconProps_100>;
@@ -5020,6 +5128,11 @@ export declare type RightSideContent = {
5020
5128
  type: 'button';
5021
5129
  text: string;
5022
5130
  onClick: () => void;
5131
+ } | {
5132
+ /** A status beside the label, such as a value chosen for the reader: `Preselected`. */
5133
+ type: 'tag';
5134
+ text: string;
5135
+ tagType?: TagType;
5023
5136
  };
5024
5137
 
5025
5138
  declare const Row: default_2.FC<KeyValueListRowProps>;
@@ -5399,6 +5512,23 @@ export declare interface SidePanelAside {
5399
5512
  footer?: default_2.ReactNode;
5400
5513
  /** Whether the aside's body gets default padding, as the panel's `bodyPadding`. Default: true. */
5401
5514
  bodyPadding?: boolean;
5515
+ /**
5516
+ * `detached` draws the aside as a card of its own on the warm ground, tucked behind the
5517
+ * panel's left edge, which slides out from behind it and back. Default: `column`, a column
5518
+ * of the panel itself.
5519
+ */
5520
+ layout?: 'column' | 'detached';
5521
+ /** `detached` only: whether the card is out. Default: true. */
5522
+ open?: boolean;
5523
+ /**
5524
+ * `detached` only: adds a button to the card's header that tucks it away, and while it is
5525
+ * away a tab on the panel's edge that brings it back.
5526
+ */
5527
+ onOpenChange?: (open: boolean) => void;
5528
+ /** `detached` only: the edge tab's text. Default: `Open ` and the title. */
5529
+ tabLabel?: string;
5530
+ /** `detached` only: an icon before the edge tab's text, as the control that opens the aside shows. */
5531
+ tabIcon?: default_2.ReactNode;
5402
5532
  children: default_2.ReactNode;
5403
5533
  }
5404
5534
 
@@ -5430,6 +5560,8 @@ export declare interface SidePanelProps {
5430
5560
  subtitle?: default_2.ReactNode;
5431
5561
  /** `below` stacks the subtitle under the title, so neither truncates the other. */
5432
5562
  subtitlePlacement?: 'inline' | 'below';
5563
+ /** With the subtitle `below`: content at the far end of the subtitle's row, such as what comes next. */
5564
+ subtitleExtra?: default_2.ReactNode;
5433
5565
  /** Content at the end of the title row, after the subtitle (e.g. a status tag). */
5434
5566
  titleExtra?: default_2.ReactNode;
5435
5567
  /** Block paragraph below the title row, spanning the header width. Announced as the panel's description. */
@@ -5481,6 +5613,14 @@ export declare interface SidePanelProps {
5481
5613
  aside?: SidePanelAside;
5482
5614
  /** A drill-in raised over the body and footer, dimming the header; see `SidePanelSheet`. */
5483
5615
  sheet?: SidePanelSheet;
5616
+ /** How far through a multi-step form, from 0 to 1: a line along the foot of the header, or
5617
+ * of the `subheader` when there is one. */
5618
+ progress?: number;
5619
+ /**
5620
+ * A band under the header, above the body, with a rule below it: a wizard's step and what
5621
+ * comes next, say. It leaves the header at its usual height, level with the page's own.
5622
+ */
5623
+ subheader?: default_2.ReactNode;
5484
5624
  children: default_2.ReactNode;
5485
5625
  }
5486
5626
 
@@ -6770,7 +6910,8 @@ export declare interface WizardLayoutProps {
6770
6910
  /**
6771
6911
  * An image that enlarges on click, for a screenshot too detailed to read inline. The enlarged
6772
6912
  * image is as large as the window allows at its own aspect ratio, up to its natural size, and a
6773
- * click anywhere closes it.
6913
+ * click anywhere closes it. Inside a SidePanel it enlarges over the panel and its aside instead
6914
+ * of the whole window.
6774
6915
  */
6775
6916
  export declare const ZoomableImage: default_2.FC<ZoomableImageProps>;
6776
6917