@graphty/compact-mantine 0.9.7 → 0.9.8
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.cjs +68 -62
- package/dist/index.d.cts +44 -6
- package/dist/index.d.ts +44 -6
- package/dist/index.js +2933 -2873
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -460,7 +460,7 @@ export declare type ColorPickerPaintType = "solid" | "gradient";
|
|
|
460
460
|
* @param props - Component props
|
|
461
461
|
* @param props.value - the value
|
|
462
462
|
* @param props.onChange - called on every change
|
|
463
|
-
* @param props.onChangeEnd - called
|
|
463
|
+
* @param props.onChangeEnd - called once per finished edit: a settled drag, a step, a commit or a pick
|
|
464
464
|
* @param props.withAlpha - offer opacity
|
|
465
465
|
* @param props.swatches - the swatch set
|
|
466
466
|
* @param props.defaultFormat - the value row's first format
|
|
@@ -511,7 +511,10 @@ export declare interface ColorPickerPanelProps {
|
|
|
511
511
|
* Reports `#RRGGBBAA` (upper case) when `withAlpha`, `#RRGGBB` otherwise.
|
|
512
512
|
*/
|
|
513
513
|
onChange: (value: string) => void;
|
|
514
|
-
/**
|
|
514
|
+
/**
|
|
515
|
+
* Called once per finished edit, with the settled color: when a drag in the field or a slider
|
|
516
|
+
* settles, and once for each arrow key, typed commit, swatch or eyedropper pick.
|
|
517
|
+
*/
|
|
515
518
|
onChangeEnd?: (value: string) => void;
|
|
516
519
|
/**
|
|
517
520
|
* Offer opacity: the opacity slider and box.
|
|
@@ -6198,6 +6201,8 @@ export declare interface ToggleIconButtonProps extends Omit<ActionIconProps, "va
|
|
|
6198
6201
|
* @param props.boundDescription - What a screen reader says about a bound row, defaulting to `fieldBound`
|
|
6199
6202
|
* @param props.onFocus - Called when the control takes focus
|
|
6200
6203
|
* @param props.onBlur - Called when the control loses focus
|
|
6204
|
+
* @param props."aria-expanded" - Whether the content this toggle shows is on screen
|
|
6205
|
+
* @param props."aria-controls" - The id of the element this toggle shows or hides
|
|
6201
6206
|
* @returns The toggle row
|
|
6202
6207
|
* @example
|
|
6203
6208
|
* ```tsx
|
|
@@ -6207,7 +6212,7 @@ export declare interface ToggleIconButtonProps extends Omit<ActionIconProps, "va
|
|
|
6207
6212
|
* </ToggleRowGroup>
|
|
6208
6213
|
* ```
|
|
6209
6214
|
*/
|
|
6210
|
-
export declare function ToggleRow({ label, checked, defaultChecked, onChange, control, trailing, disabled, disabledReason, bound, boundDescription, onFocus, onBlur, }: ToggleRowProps): default_2.JSX.Element;
|
|
6215
|
+
export declare function ToggleRow({ label, checked, defaultChecked, onChange, control, trailing, disabled, disabledReason, bound, boundDescription, onFocus, onBlur, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, }: ToggleRowProps): default_2.JSX.Element;
|
|
6211
6216
|
|
|
6212
6217
|
/**
|
|
6213
6218
|
* The column two or more toggle rows are packed into.
|
|
@@ -6376,6 +6381,23 @@ export declare interface ToggleRowProps {
|
|
|
6376
6381
|
onFocus?: default_2.FocusEventHandler<HTMLInputElement>;
|
|
6377
6382
|
/** Called when the control loses focus. */
|
|
6378
6383
|
onBlur?: default_2.FocusEventHandler<HTMLInputElement>;
|
|
6384
|
+
/**
|
|
6385
|
+
* Whether the content this toggle shows is on screen, for a toggle that
|
|
6386
|
+
* shows or hides something elsewhere in the panel.
|
|
6387
|
+
*
|
|
6388
|
+
* Set it together with `aria-controls` and a screen reader announces the
|
|
6389
|
+
* toggle as one that opens something, rather than leaving the reader to
|
|
6390
|
+
* notice new controls appearing. Leave both unset on a toggle that only
|
|
6391
|
+
* records a setting.
|
|
6392
|
+
*/
|
|
6393
|
+
"aria-expanded"?: boolean;
|
|
6394
|
+
/**
|
|
6395
|
+
* The `id` of the element this toggle shows or hides.
|
|
6396
|
+
*
|
|
6397
|
+
* Set it only while that element is in the document: a reference to an id
|
|
6398
|
+
* that is not on the page is worse than no reference at all.
|
|
6399
|
+
*/
|
|
6400
|
+
"aria-controls"?: string;
|
|
6379
6401
|
}
|
|
6380
6402
|
|
|
6381
6403
|
/**
|
|
@@ -6583,6 +6605,7 @@ declare function ToolbarRoot({ floating, children, className, onKeyDown, onFocus
|
|
|
6583
6605
|
* @param props.shortcut - The keyboard shortcut shown in the tooltip
|
|
6584
6606
|
* @param props.selected - Whether this is the current tool
|
|
6585
6607
|
* @param props.tooltipPosition - Where the tooltip opens
|
|
6608
|
+
* @param props.disabledReason - Why the tool cannot be used now; set, the tool is disabled
|
|
6586
6609
|
* @returns The tool button
|
|
6587
6610
|
*/
|
|
6588
6611
|
export declare const ToolButton: default_2.ForwardRefExoticComponent<ToolButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
@@ -6604,6 +6627,13 @@ export declare interface ToolButtonProps extends Omit<UnstyledButtonProps, "chil
|
|
|
6604
6627
|
selected?: boolean;
|
|
6605
6628
|
/** Where the tooltip opens. Defaults to above, as on Figma's bottom toolbar. */
|
|
6606
6629
|
tooltipPosition?: TooltipProps["position"];
|
|
6630
|
+
/**
|
|
6631
|
+
* Why the tool cannot be used now, as one sentence ("Nothing is drawn"). Set, the button is
|
|
6632
|
+
* drawn in the disabled ink, ignores clicks and is `aria-disabled` -- it stays focusable, so the
|
|
6633
|
+
* arrows still reach it -- and the reason follows the name in the tooltip and is read out as
|
|
6634
|
+
* the button's description.
|
|
6635
|
+
*/
|
|
6636
|
+
disabledReason?: string;
|
|
6607
6637
|
}
|
|
6608
6638
|
|
|
6609
6639
|
/**
|
|
@@ -6782,6 +6812,8 @@ export declare const TreeItem: default_2.ForwardRefExoticComponent<TreeItemProps
|
|
|
6782
6812
|
export declare interface TreeItemProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
6783
6813
|
/** The visible name. */
|
|
6784
6814
|
name: string;
|
|
6815
|
+
/** The accessible name; defaults to `name`. */
|
|
6816
|
+
label?: string;
|
|
6785
6817
|
/** The 16 x 16 type glyph. */
|
|
6786
6818
|
icon?: default_2.ReactNode;
|
|
6787
6819
|
/** Depth, 1 for a top-level row. Each level indents 24px. */
|
|
@@ -6837,8 +6869,13 @@ export declare interface TreeMove {
|
|
|
6837
6869
|
export declare interface TreeNodeData {
|
|
6838
6870
|
/** Stable, unique across the whole tree. */
|
|
6839
6871
|
id: string;
|
|
6840
|
-
/** The visible name; also the item's
|
|
6872
|
+
/** The visible name; also the item's type-ahead key, and its accessible name unless `label` is given. */
|
|
6841
6873
|
name: string;
|
|
6874
|
+
/**
|
|
6875
|
+
* The accessible name, when the visible name alone is not enough: "value, edge attribute"
|
|
6876
|
+
* where two rows read "value". Start it with the visible name. Defaults to `name`.
|
|
6877
|
+
*/
|
|
6878
|
+
label?: string;
|
|
6842
6879
|
/** The 16 x 16 type glyph drawn before the name. */
|
|
6843
6880
|
icon?: default_2.ReactNode;
|
|
6844
6881
|
/**
|
|
@@ -6858,7 +6895,8 @@ export declare interface TreeNodeData {
|
|
|
6858
6895
|
/**
|
|
6859
6896
|
* The row's trailing toggles (lock, eye): the caller's own controls. They stay hidden until
|
|
6860
6897
|
* the row is hovered or focused; a control with `aria-pressed="true"`, `aria-checked="true"`
|
|
6861
|
-
* or `data-pinned` stays visible.
|
|
6898
|
+
* or `data-pinned` stays visible. A click on passive text here (nothing focusable) counts as a
|
|
6899
|
+
* click on the row.
|
|
6862
6900
|
*/
|
|
6863
6901
|
actions?: default_2.ReactNode;
|
|
6864
6902
|
/**
|
|
@@ -6880,7 +6918,7 @@ export declare interface TreeNodeData {
|
|
|
6880
6918
|
/**
|
|
6881
6919
|
* The row's state in words -- "Running", "Failed: the graph has no edges" -- read by a
|
|
6882
6920
|
* screen reader after the name (the row's `aria-describedby`) and never drawn. A row's
|
|
6883
|
-
* accessible name is only its `name
|
|
6921
|
+
* accessible name is only its `name` (or `label`), so anything a glyph or a tooltip says belongs here
|
|
6884
6922
|
* too.
|
|
6885
6923
|
*/
|
|
6886
6924
|
description?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -460,7 +460,7 @@ export declare type ColorPickerPaintType = "solid" | "gradient";
|
|
|
460
460
|
* @param props - Component props
|
|
461
461
|
* @param props.value - the value
|
|
462
462
|
* @param props.onChange - called on every change
|
|
463
|
-
* @param props.onChangeEnd - called
|
|
463
|
+
* @param props.onChangeEnd - called once per finished edit: a settled drag, a step, a commit or a pick
|
|
464
464
|
* @param props.withAlpha - offer opacity
|
|
465
465
|
* @param props.swatches - the swatch set
|
|
466
466
|
* @param props.defaultFormat - the value row's first format
|
|
@@ -511,7 +511,10 @@ export declare interface ColorPickerPanelProps {
|
|
|
511
511
|
* Reports `#RRGGBBAA` (upper case) when `withAlpha`, `#RRGGBB` otherwise.
|
|
512
512
|
*/
|
|
513
513
|
onChange: (value: string) => void;
|
|
514
|
-
/**
|
|
514
|
+
/**
|
|
515
|
+
* Called once per finished edit, with the settled color: when a drag in the field or a slider
|
|
516
|
+
* settles, and once for each arrow key, typed commit, swatch or eyedropper pick.
|
|
517
|
+
*/
|
|
515
518
|
onChangeEnd?: (value: string) => void;
|
|
516
519
|
/**
|
|
517
520
|
* Offer opacity: the opacity slider and box.
|
|
@@ -6198,6 +6201,8 @@ export declare interface ToggleIconButtonProps extends Omit<ActionIconProps, "va
|
|
|
6198
6201
|
* @param props.boundDescription - What a screen reader says about a bound row, defaulting to `fieldBound`
|
|
6199
6202
|
* @param props.onFocus - Called when the control takes focus
|
|
6200
6203
|
* @param props.onBlur - Called when the control loses focus
|
|
6204
|
+
* @param props."aria-expanded" - Whether the content this toggle shows is on screen
|
|
6205
|
+
* @param props."aria-controls" - The id of the element this toggle shows or hides
|
|
6201
6206
|
* @returns The toggle row
|
|
6202
6207
|
* @example
|
|
6203
6208
|
* ```tsx
|
|
@@ -6207,7 +6212,7 @@ export declare interface ToggleIconButtonProps extends Omit<ActionIconProps, "va
|
|
|
6207
6212
|
* </ToggleRowGroup>
|
|
6208
6213
|
* ```
|
|
6209
6214
|
*/
|
|
6210
|
-
export declare function ToggleRow({ label, checked, defaultChecked, onChange, control, trailing, disabled, disabledReason, bound, boundDescription, onFocus, onBlur, }: ToggleRowProps): default_2.JSX.Element;
|
|
6215
|
+
export declare function ToggleRow({ label, checked, defaultChecked, onChange, control, trailing, disabled, disabledReason, bound, boundDescription, onFocus, onBlur, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, }: ToggleRowProps): default_2.JSX.Element;
|
|
6211
6216
|
|
|
6212
6217
|
/**
|
|
6213
6218
|
* The column two or more toggle rows are packed into.
|
|
@@ -6376,6 +6381,23 @@ export declare interface ToggleRowProps {
|
|
|
6376
6381
|
onFocus?: default_2.FocusEventHandler<HTMLInputElement>;
|
|
6377
6382
|
/** Called when the control loses focus. */
|
|
6378
6383
|
onBlur?: default_2.FocusEventHandler<HTMLInputElement>;
|
|
6384
|
+
/**
|
|
6385
|
+
* Whether the content this toggle shows is on screen, for a toggle that
|
|
6386
|
+
* shows or hides something elsewhere in the panel.
|
|
6387
|
+
*
|
|
6388
|
+
* Set it together with `aria-controls` and a screen reader announces the
|
|
6389
|
+
* toggle as one that opens something, rather than leaving the reader to
|
|
6390
|
+
* notice new controls appearing. Leave both unset on a toggle that only
|
|
6391
|
+
* records a setting.
|
|
6392
|
+
*/
|
|
6393
|
+
"aria-expanded"?: boolean;
|
|
6394
|
+
/**
|
|
6395
|
+
* The `id` of the element this toggle shows or hides.
|
|
6396
|
+
*
|
|
6397
|
+
* Set it only while that element is in the document: a reference to an id
|
|
6398
|
+
* that is not on the page is worse than no reference at all.
|
|
6399
|
+
*/
|
|
6400
|
+
"aria-controls"?: string;
|
|
6379
6401
|
}
|
|
6380
6402
|
|
|
6381
6403
|
/**
|
|
@@ -6583,6 +6605,7 @@ declare function ToolbarRoot({ floating, children, className, onKeyDown, onFocus
|
|
|
6583
6605
|
* @param props.shortcut - The keyboard shortcut shown in the tooltip
|
|
6584
6606
|
* @param props.selected - Whether this is the current tool
|
|
6585
6607
|
* @param props.tooltipPosition - Where the tooltip opens
|
|
6608
|
+
* @param props.disabledReason - Why the tool cannot be used now; set, the tool is disabled
|
|
6586
6609
|
* @returns The tool button
|
|
6587
6610
|
*/
|
|
6588
6611
|
export declare const ToolButton: default_2.ForwardRefExoticComponent<ToolButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
@@ -6604,6 +6627,13 @@ export declare interface ToolButtonProps extends Omit<UnstyledButtonProps, "chil
|
|
|
6604
6627
|
selected?: boolean;
|
|
6605
6628
|
/** Where the tooltip opens. Defaults to above, as on Figma's bottom toolbar. */
|
|
6606
6629
|
tooltipPosition?: TooltipProps["position"];
|
|
6630
|
+
/**
|
|
6631
|
+
* Why the tool cannot be used now, as one sentence ("Nothing is drawn"). Set, the button is
|
|
6632
|
+
* drawn in the disabled ink, ignores clicks and is `aria-disabled` -- it stays focusable, so the
|
|
6633
|
+
* arrows still reach it -- and the reason follows the name in the tooltip and is read out as
|
|
6634
|
+
* the button's description.
|
|
6635
|
+
*/
|
|
6636
|
+
disabledReason?: string;
|
|
6607
6637
|
}
|
|
6608
6638
|
|
|
6609
6639
|
/**
|
|
@@ -6782,6 +6812,8 @@ export declare const TreeItem: default_2.ForwardRefExoticComponent<TreeItemProps
|
|
|
6782
6812
|
export declare interface TreeItemProps extends Omit<default_2.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
6783
6813
|
/** The visible name. */
|
|
6784
6814
|
name: string;
|
|
6815
|
+
/** The accessible name; defaults to `name`. */
|
|
6816
|
+
label?: string;
|
|
6785
6817
|
/** The 16 x 16 type glyph. */
|
|
6786
6818
|
icon?: default_2.ReactNode;
|
|
6787
6819
|
/** Depth, 1 for a top-level row. Each level indents 24px. */
|
|
@@ -6837,8 +6869,13 @@ export declare interface TreeMove {
|
|
|
6837
6869
|
export declare interface TreeNodeData {
|
|
6838
6870
|
/** Stable, unique across the whole tree. */
|
|
6839
6871
|
id: string;
|
|
6840
|
-
/** The visible name; also the item's
|
|
6872
|
+
/** The visible name; also the item's type-ahead key, and its accessible name unless `label` is given. */
|
|
6841
6873
|
name: string;
|
|
6874
|
+
/**
|
|
6875
|
+
* The accessible name, when the visible name alone is not enough: "value, edge attribute"
|
|
6876
|
+
* where two rows read "value". Start it with the visible name. Defaults to `name`.
|
|
6877
|
+
*/
|
|
6878
|
+
label?: string;
|
|
6842
6879
|
/** The 16 x 16 type glyph drawn before the name. */
|
|
6843
6880
|
icon?: default_2.ReactNode;
|
|
6844
6881
|
/**
|
|
@@ -6858,7 +6895,8 @@ export declare interface TreeNodeData {
|
|
|
6858
6895
|
/**
|
|
6859
6896
|
* The row's trailing toggles (lock, eye): the caller's own controls. They stay hidden until
|
|
6860
6897
|
* the row is hovered or focused; a control with `aria-pressed="true"`, `aria-checked="true"`
|
|
6861
|
-
* or `data-pinned` stays visible.
|
|
6898
|
+
* or `data-pinned` stays visible. A click on passive text here (nothing focusable) counts as a
|
|
6899
|
+
* click on the row.
|
|
6862
6900
|
*/
|
|
6863
6901
|
actions?: default_2.ReactNode;
|
|
6864
6902
|
/**
|
|
@@ -6880,7 +6918,7 @@ export declare interface TreeNodeData {
|
|
|
6880
6918
|
/**
|
|
6881
6919
|
* The row's state in words -- "Running", "Failed: the graph has no edges" -- read by a
|
|
6882
6920
|
* screen reader after the name (the row's `aria-describedby`) and never drawn. A row's
|
|
6883
|
-
* accessible name is only its `name
|
|
6921
|
+
* accessible name is only its `name` (or `label`), so anything a glyph or a tooltip says belongs here
|
|
6884
6922
|
* too.
|
|
6885
6923
|
*/
|
|
6886
6924
|
description?: string;
|