@stackone/malachite 2.84.1 → 2.86.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 -5
- package/dist/components/Accordion.js +130 -103
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/BaseFormComponent.js +63 -59
- package/dist/components/BaseFormComponent.js.map +1 -1
- package/dist/components/Button.js.map +1 -1
- package/dist/components/DatePickerField.js +131 -129
- package/dist/components/DatePickerField.js.map +1 -1
- package/dist/components/Dropdown.js +444 -434
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/Input/Input.js +126 -124
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/MultiSelect.js +85 -83
- package/dist/components/MultiSelect.js.map +1 -1
- package/dist/components/Sidebar.js +152 -122
- package/dist/components/Sidebar.js.map +1 -1
- package/dist/components/SplitButton.js.map +1 -1
- package/dist/components/Surface.js +211 -159
- package/dist/components/Surface.js.map +1 -1
- package/dist/components/TextArea/TextArea.js +73 -71
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/buttonStyles.js +2 -0
- package/dist/components/buttonStyles.js.map +1 -1
- package/dist/components/focusRing.js +8 -7
- package/dist/components/focusRing.js.map +1 -1
- package/dist/components/overlayBehaviour.js +159 -143
- package/dist/components/overlayBehaviour.js.map +1 -1
- package/dist/components/sidebarContext.js +7 -6
- package/dist/components/sidebarContext.js.map +1 -1
- package/dist/index.d.ts +54 -16
- package/dist/index.js +320 -319
- package/dist/tailwind.css.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -53,17 +53,10 @@ declare interface AccordionBaseProps {
|
|
|
53
53
|
trailing?: default_2.ReactNode;
|
|
54
54
|
/** Before the title, outside the toggle button. */
|
|
55
55
|
leading?: default_2.ReactNode;
|
|
56
|
-
/** `gutter` puts the arrow before `leading` as its own mouse toggle; the title stays the keyboard one. */
|
|
57
|
-
arrowPosition?: 'start' | 'end' | 'gutter';
|
|
58
56
|
/** `false` keeps an open row on the card ground. */
|
|
59
57
|
highlightExpanded?: boolean;
|
|
60
58
|
/** `title` starts the body under the title, 16px short of it for a compact `Surface.Row`. */
|
|
61
59
|
bodyIndent?: 'none' | 'title';
|
|
62
|
-
defaultExpanded?: boolean;
|
|
63
|
-
isExpanded?: boolean;
|
|
64
|
-
onToggle?: (expanded: boolean) => void;
|
|
65
|
-
/** Disables the toggle (and its hover). Trailing controls manage their own state. */
|
|
66
|
-
disabled?: boolean;
|
|
67
60
|
/**
|
|
68
61
|
* Pin the header row to the top of the nearest scroll container so it stays
|
|
69
62
|
* reachable while the body scrolls. Needs a scroll ancestor that clips without
|
|
@@ -78,19 +71,13 @@ declare interface AccordionBaseProps {
|
|
|
78
71
|
* `--malachite-ctx-pinned-surround` on an ancestor when the card sits on another ground.
|
|
79
72
|
*/
|
|
80
73
|
pinnedCorners?: boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Animate the expand/collapse height (default `true`). Set `false` for an instant
|
|
83
|
-
* open — the body isn't clipped, so a `position: sticky` child pins immediately with
|
|
84
|
-
* no post-animation settle.
|
|
85
|
-
*/
|
|
86
|
-
animate?: boolean;
|
|
87
74
|
}
|
|
88
75
|
|
|
89
76
|
/**
|
|
90
77
|
* Requires at least one of `title` (simple text header) or `header` (rich ReactNode
|
|
91
78
|
* content for the toggle area, e.g. avatar + badges) so the toggle is never empty.
|
|
92
79
|
*/
|
|
93
|
-
export declare type AccordionProps = AccordionBaseProps & ({
|
|
80
|
+
export declare type AccordionProps = AccordionBaseProps & AccordionToggleProps & ({
|
|
94
81
|
title: string;
|
|
95
82
|
header?: default_2.ReactNode;
|
|
96
83
|
} | {
|
|
@@ -98,6 +85,24 @@ export declare type AccordionProps = AccordionBaseProps & ({
|
|
|
98
85
|
header: default_2.ReactNode;
|
|
99
86
|
});
|
|
100
87
|
|
|
88
|
+
declare interface AccordionToggleProps {
|
|
89
|
+
/** `false` is a section that never closes; the toggle props are then ignored. */
|
|
90
|
+
collapsible?: boolean;
|
|
91
|
+
/** `gutter` puts the arrow before `leading` as its own mouse toggle; the title stays the keyboard one. */
|
|
92
|
+
arrowPosition?: 'start' | 'end' | 'gutter';
|
|
93
|
+
defaultExpanded?: boolean;
|
|
94
|
+
isExpanded?: boolean;
|
|
95
|
+
onToggle?: (expanded: boolean) => void;
|
|
96
|
+
/** Disables the toggle (and its hover). Trailing controls manage their own state. */
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Animate the expand/collapse height (default `true`). Set `false` for an instant
|
|
100
|
+
* open — the body isn't clipped, so a `position: sticky` child pins immediately with
|
|
101
|
+
* no post-animation settle.
|
|
102
|
+
*/
|
|
103
|
+
animate?: boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
101
106
|
export declare const AccountIcon: React.FC<IconProps>;
|
|
102
107
|
|
|
103
108
|
export declare const AccountsIcon: React.FC<IconProps_2>;
|
|
@@ -376,6 +381,8 @@ declare interface BaseFormComponentProps {
|
|
|
376
381
|
label?: string;
|
|
377
382
|
description?: string;
|
|
378
383
|
hint?: string;
|
|
384
|
+
/** Decorative, so it stays out of the accessible name; shown only with a `hint`. */
|
|
385
|
+
hintIcon?: default_2.ReactNode;
|
|
379
386
|
rightSideContent?: RightSideContent;
|
|
380
387
|
tooltip?: string;
|
|
381
388
|
required?: boolean;
|
|
@@ -509,6 +516,8 @@ export declare type ButtonVariant = 'filled' | 'outline'
|
|
|
509
516
|
* that anything is wrong.
|
|
510
517
|
*/
|
|
511
518
|
| 'assistant' | 'destructive' | 'success' | 'warning' | 'error' | 'ghost'
|
|
519
|
+
/** `ghost` until its `Surface.Row` is hovered or focused, or its menu opens. For `trailing` only. */
|
|
520
|
+
| 'row-outline'
|
|
512
521
|
/** Text only, in the accent colour, for a secondary action beside a primary one. */
|
|
513
522
|
| 'quiet'
|
|
514
523
|
/**
|
|
@@ -1475,6 +1484,8 @@ declare interface DatePickerBaseProps {
|
|
|
1475
1484
|
formControl?: Control<FieldValues, unknown>;
|
|
1476
1485
|
label?: string;
|
|
1477
1486
|
hint?: string;
|
|
1487
|
+
/** Decorative icon drawn before `hint`, such as a glyph for the value's type. Shown only with a `hint`. */
|
|
1488
|
+
hintIcon?: default_2.ReactNode;
|
|
1478
1489
|
description?: string;
|
|
1479
1490
|
tooltip?: string;
|
|
1480
1491
|
helperText?: default_2.ReactNode;
|
|
@@ -1633,11 +1644,13 @@ export declare const DoubleCheckIcon: React.FC<IconProps_42>;
|
|
|
1633
1644
|
|
|
1634
1645
|
export declare const DownloadIcon: React.FC<IconProps_43>;
|
|
1635
1646
|
|
|
1636
|
-
export declare const Dropdown: ({ items, onItemSelected, defaultValue, value, disabled, error, tone, label, hint, rightSideContent, tooltip, name, required, requiredIndicator, loading, menuLoading, formControl, description, helperText, placeholder, search, showSubtitleInTrigger, subtitleLayout, clearable, size, fullWidth, width, minWidth, menuAlign, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: DropdownProps) => JSX_2.Element;
|
|
1647
|
+
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;
|
|
1637
1648
|
|
|
1638
1649
|
declare interface DropdownBaseProps {
|
|
1639
1650
|
label?: string;
|
|
1640
1651
|
hint?: string;
|
|
1652
|
+
/** Decorative icon drawn before `hint`, such as a glyph for the value's type. Shown only with a `hint`. */
|
|
1653
|
+
hintIcon?: default_2.ReactNode;
|
|
1641
1654
|
rightSideContent?: RightSideContent;
|
|
1642
1655
|
tooltip?: string;
|
|
1643
1656
|
name: FieldPath<FieldValues> | string;
|
|
@@ -1722,9 +1735,17 @@ declare type DropdownTriggerModeProps = {
|
|
|
1722
1735
|
search?: false;
|
|
1723
1736
|
/** Promotes the selected item's `subtitle` into the closed trigger, beneath the value. */
|
|
1724
1737
|
showSubtitleInTrigger?: boolean;
|
|
1738
|
+
onSearchChange?: never;
|
|
1725
1739
|
} | {
|
|
1726
1740
|
search: true;
|
|
1727
1741
|
showSubtitleInTrigger?: never;
|
|
1742
|
+
/**
|
|
1743
|
+
* Called with the query as typed, and with `''` when a pick, a clear, Escape or a click
|
|
1744
|
+
* outside empties it. For offering the typed text as an item of its own: items are still
|
|
1745
|
+
* filtered by the query, so that item's label must contain it, and it must stay in `items`
|
|
1746
|
+
* once picked, or the trigger falls back to the placeholder.
|
|
1747
|
+
*/
|
|
1748
|
+
onSearchChange?: (query: string) => void;
|
|
1728
1749
|
};
|
|
1729
1750
|
|
|
1730
1751
|
export declare const EditIcon: React.FC<IconProps_44>;
|
|
@@ -2981,6 +3002,8 @@ export declare const Input: default_2.FC<InputProps>;
|
|
|
2981
3002
|
declare interface InputProps {
|
|
2982
3003
|
label?: string;
|
|
2983
3004
|
hint?: string;
|
|
3005
|
+
/** Decorative icon drawn before `hint`, such as a glyph for the value's type. Shown only with a `hint`. */
|
|
3006
|
+
hintIcon?: default_2.ReactNode;
|
|
2984
3007
|
tooltip?: string;
|
|
2985
3008
|
placeholder?: string;
|
|
2986
3009
|
icon?: default_2.ReactNode;
|
|
@@ -3767,6 +3790,8 @@ declare interface MultiSelectBaseProps {
|
|
|
3767
3790
|
description?: string;
|
|
3768
3791
|
tooltip?: string;
|
|
3769
3792
|
hint?: string;
|
|
3793
|
+
/** Decorative icon drawn before `hint`, such as a glyph for the value's type. Shown only with a `hint`. */
|
|
3794
|
+
hintIcon?: default_2.ReactNode;
|
|
3770
3795
|
rightSideContent?: RightSideContent;
|
|
3771
3796
|
required?: boolean;
|
|
3772
3797
|
requiredIndicator?: RequiredIndicator;
|
|
@@ -4754,6 +4779,9 @@ export declare const Sidebar: default_2.FC<SidebarProps> & {
|
|
|
4754
4779
|
}>;
|
|
4755
4780
|
};
|
|
4756
4781
|
|
|
4782
|
+
/** Below this viewport width the sidebar leaves no room for the page beside it: pass `overlay`. */
|
|
4783
|
+
export declare const SIDEBAR_OVERLAY_BREAKPOINT_PX = 768;
|
|
4784
|
+
|
|
4757
4785
|
export declare const SIDEBAR_POPOVER_WIDTH_PX = 244;
|
|
4758
4786
|
|
|
4759
4787
|
export declare const SIDEBAR_TOOLTIP_DELAY_S = 0.2;
|
|
@@ -4776,6 +4804,10 @@ declare type SidebarButtonAttributes = Omit<default_2.ButtonHTMLAttributes<HTMLB
|
|
|
4776
4804
|
|
|
4777
4805
|
export declare interface SidebarProps {
|
|
4778
4806
|
collapsed?: boolean;
|
|
4807
|
+
/** Expanded from its rail, the sidebar floats over the page as a modal drawer: a scrim, Escape
|
|
4808
|
+
* and a focus trap, each of which collapses it through `onToggleCollapse`. For viewports
|
|
4809
|
+
* under `SIDEBAR_OVERLAY_BREAKPOINT_PX`; collapse it on entering, as a drawer starts shut. */
|
|
4810
|
+
overlay?: boolean;
|
|
4779
4811
|
onToggleCollapse?: () => void;
|
|
4780
4812
|
expandLabel?: string;
|
|
4781
4813
|
collapseLabel?: string;
|
|
@@ -4950,7 +4982,7 @@ declare interface SpinnerProps {
|
|
|
4950
4982
|
export declare const SplitButton: default_2.ForwardRefExoticComponent<SplitButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
4951
4983
|
|
|
4952
4984
|
export declare interface SplitButtonProps {
|
|
4953
|
-
variant?: ButtonVariant
|
|
4985
|
+
variant?: Exclude<ButtonVariant, 'row-outline'>;
|
|
4954
4986
|
size?: ButtonSize;
|
|
4955
4987
|
children?: default_2.ReactNode;
|
|
4956
4988
|
leading?: default_2.ReactNode;
|
|
@@ -5263,6 +5295,10 @@ export declare interface SurfaceRowProps extends SurfaceRowChromeProps {
|
|
|
5263
5295
|
* which has no hover, always shows it.
|
|
5264
5296
|
*/
|
|
5265
5297
|
revealTrailing?: boolean;
|
|
5298
|
+
/** The row's indicator, before the children. */
|
|
5299
|
+
leading?: default_2.ReactNode;
|
|
5300
|
+
/** Fades the children, not `leading` or `trailing`. */
|
|
5301
|
+
dimmed?: boolean;
|
|
5266
5302
|
/** ARIA role for a clickable row, e.g. `radio`/`checkbox` (wrap the list in a `radiogroup`). */
|
|
5267
5303
|
role?: default_2.AriaRole;
|
|
5268
5304
|
'aria-label'?: string;
|
|
@@ -5497,6 +5533,8 @@ export declare const TextArea: default_2.FC<TextAreaProps>;
|
|
|
5497
5533
|
declare interface TextAreaProps {
|
|
5498
5534
|
label?: string;
|
|
5499
5535
|
hint?: string;
|
|
5536
|
+
/** Decorative icon drawn before `hint`, such as a glyph for the value's type. Shown only with a `hint`. */
|
|
5537
|
+
hintIcon?: default_2.ReactNode;
|
|
5500
5538
|
tooltip?: string;
|
|
5501
5539
|
placeholder?: string;
|
|
5502
5540
|
icon?: default_2.ReactNode;
|