@memobit/libs 3.27.0 → 3.28.1
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/components/ColorPicker/ColorPicker.css +1 -1
- package/dist/components/ColorPicker/ColorPicker2.js +114 -114
- package/dist/components/ContextMenu/ContextMenu2.js +46 -33
- package/dist/components/Dropdown/Dropdown2.js +42 -42
- package/dist/components/MenuBar/MenuBar.css +1 -0
- package/dist/components/MenuBar/MenuBar2.js +46 -0
- package/dist/components/ToolButton/ToolButton.css +1 -0
- package/dist/components/ToolButton/ToolButton2.js +36 -0
- package/dist/components/ToolPalette/ToolPalette.css +1 -0
- package/dist/components/ToolPalette/ToolPalette2.js +83 -0
- package/dist/components/Tooltip/Tooltip2.js +72 -66
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/index.d.ts +89 -2
- package/dist/index.js +191 -185
- package/dist/memobit-icons.json +3 -0
- package/dist/version.js +2 -2
- package/dist/version.json +4 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -619,6 +619,11 @@ export declare interface ColorPickerProps {
|
|
|
619
619
|
*/
|
|
620
620
|
swatches?: string[];
|
|
621
621
|
swatchesLabel?: string;
|
|
622
|
+
/**
|
|
623
|
+
* Without the card around it (border, padding, background) and as wide as its container: for a picker that
|
|
624
|
+
* sits in a side panel rather than a popover. The gradient's height follows `--color-picker-field-height`.
|
|
625
|
+
*/
|
|
626
|
+
bare?: boolean;
|
|
622
627
|
}
|
|
623
628
|
|
|
624
629
|
export declare interface ColProps {
|
|
@@ -708,13 +713,22 @@ export declare interface ConfirmPopoverProps {
|
|
|
708
713
|
offset?: number;
|
|
709
714
|
}
|
|
710
715
|
|
|
711
|
-
export declare const ContextMenu: ({ target, onClose, children, autoClose }: ContextMenuProps) => ReactPortal | null;
|
|
716
|
+
export declare const ContextMenu: ({ target, position, onClose, children, autoClose }: ContextMenuProps) => ReactPortal | null;
|
|
712
717
|
|
|
713
718
|
declare interface ContextMenuProps {
|
|
714
719
|
autoClose?: boolean;
|
|
715
720
|
children: ReactElement;
|
|
716
721
|
onClose?: () => void;
|
|
717
|
-
|
|
722
|
+
/** The element the menu opens below. Not needed when `position` is given. */
|
|
723
|
+
target?: EventTarget | null;
|
|
724
|
+
/**
|
|
725
|
+
* Opens the menu at a point in the viewport instead of below an element: pass a right-click's `clientX` and
|
|
726
|
+
* `clientY` for a menu at the cursor. Wins over `target` when both are given.
|
|
727
|
+
*/
|
|
728
|
+
position?: {
|
|
729
|
+
x: number;
|
|
730
|
+
y: number;
|
|
731
|
+
} | null;
|
|
718
732
|
}
|
|
719
733
|
|
|
720
734
|
export declare interface ContextToastAction {
|
|
@@ -1487,6 +1501,8 @@ declare interface DropdownProps {
|
|
|
1487
1501
|
allowCustomValue?: boolean;
|
|
1488
1502
|
autofocus?: boolean;
|
|
1489
1503
|
className?: string;
|
|
1504
|
+
/** Shows the clear (×) button once something is selected. Turn it off when a value must always be set. Defaults to true. */
|
|
1505
|
+
clearable?: boolean;
|
|
1490
1506
|
disabled?: boolean;
|
|
1491
1507
|
error?: string;
|
|
1492
1508
|
highlighted?: boolean;
|
|
@@ -2628,6 +2644,29 @@ export declare const matchesKeyFilter: (filterValue: string | string[] | null |
|
|
|
2628
2644
|
|
|
2629
2645
|
export declare const matchStringsByLogicalOperator: (searchItems: string[], targetString: string, operator: LogicalOperator) => boolean;
|
|
2630
2646
|
|
|
2647
|
+
/**
|
|
2648
|
+
* A desktop menu bar: File, Edit, Image… A click opens a menu; while one is open, hovering another switches to it,
|
|
2649
|
+
* as in Windows. Esc or a click elsewhere closes it. Shortcuts are only shown: handling the keys is the app's job.
|
|
2650
|
+
*/
|
|
2651
|
+
export declare const MenuBar: ({ menus, className }: MenuBarProps) => JSX.Element;
|
|
2652
|
+
|
|
2653
|
+
export declare type MenuBarEntry = {
|
|
2654
|
+
label: string;
|
|
2655
|
+
shortcut?: string;
|
|
2656
|
+
onSelect: () => void;
|
|
2657
|
+
disabled?: boolean;
|
|
2658
|
+
} | 'separator';
|
|
2659
|
+
|
|
2660
|
+
export declare interface MenuBarMenu {
|
|
2661
|
+
label: string;
|
|
2662
|
+
entries: MenuBarEntry[];
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
export declare interface MenuBarProps {
|
|
2666
|
+
menus: MenuBarMenu[];
|
|
2667
|
+
className?: string;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2631
2670
|
export declare const MenuHamburger: FC<MenuHamburgerProps>;
|
|
2632
2671
|
|
|
2633
2672
|
export declare interface MenuHamburgerItem {
|
|
@@ -3738,6 +3777,54 @@ export declare interface ToolbarSortValue {
|
|
|
3738
3777
|
field: string;
|
|
3739
3778
|
}
|
|
3740
3779
|
|
|
3780
|
+
/** An icon-only toolbar button, its label in a Tooltip rather than a native title. */
|
|
3781
|
+
export declare const ToolButton: ({ icon, hint, onClick, disabled, active, danger, mirrored, badge, hintPosition, className }: ToolButtonProps) => JSX.Element;
|
|
3782
|
+
|
|
3783
|
+
export declare interface ToolButtonProps {
|
|
3784
|
+
icon: IconName | ReactElement;
|
|
3785
|
+
/** What it does, with its shortcut if any ("Rotate right (Ctrl+R)"), shown in a Tooltip. */
|
|
3786
|
+
hint: string;
|
|
3787
|
+
onClick: () => void;
|
|
3788
|
+
disabled?: boolean;
|
|
3789
|
+
/** Shown pressed: the current tool, or a toggle that is on. */
|
|
3790
|
+
active?: boolean;
|
|
3791
|
+
/** Red, for the destructive action of a toolbar. */
|
|
3792
|
+
danger?: boolean;
|
|
3793
|
+
/** Flips the icon, e.g. to turn a clockwise arrow into the counter-clockwise one. */
|
|
3794
|
+
mirrored?: boolean;
|
|
3795
|
+
/** A short tag on the icon's corner that sets it apart from the plain action, e.g. "WEB" on a floppy. */
|
|
3796
|
+
badge?: string;
|
|
3797
|
+
hintPosition?: TooltipPosition;
|
|
3798
|
+
className?: string;
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
/**
|
|
3802
|
+
* A tool column, as in an image editor. Items that share a group share a slot showing the one last used: clicking the
|
|
3803
|
+
* slot again moves to the next item of the group, right-clicking lists them all. A corner mark shows which slots hold more.
|
|
3804
|
+
*/
|
|
3805
|
+
export declare const ToolPalette: ({ items, activeId, onSelect, columns, children, className }: ToolPaletteProps) => JSX.Element;
|
|
3806
|
+
|
|
3807
|
+
export declare interface ToolPaletteItem {
|
|
3808
|
+
id: string;
|
|
3809
|
+
label: string;
|
|
3810
|
+
icon: IconName | ReactElement;
|
|
3811
|
+
/** Shown in the hint and the group menu, e.g. "M". */
|
|
3812
|
+
shortcut?: string;
|
|
3813
|
+
/** Items with the same group share one slot, as Photoshop's marquees do. Defaults to the item's own id. */
|
|
3814
|
+
group?: string;
|
|
3815
|
+
}
|
|
3816
|
+
|
|
3817
|
+
export declare interface ToolPaletteProps {
|
|
3818
|
+
items: ToolPaletteItem[];
|
|
3819
|
+
activeId: string;
|
|
3820
|
+
onSelect: (id: string) => void;
|
|
3821
|
+
/** Slots per row. Defaults to 2, which keeps a long set of tools on screen in a small window. */
|
|
3822
|
+
columns?: number;
|
|
3823
|
+
/** Shown under the tools, e.g. the foreground and background colours. */
|
|
3824
|
+
children?: ReactNode;
|
|
3825
|
+
className?: string;
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3741
3828
|
export declare const Tooltip: default_2.FC<TooltipProps>;
|
|
3742
3829
|
|
|
3743
3830
|
export declare type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|