@noya-app/noya-designsystem 0.1.54 → 0.1.56
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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +16 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +136 -44
- package/dist/index.d.ts +136 -44
- package/dist/index.js +1240 -802
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1484 -1054
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/validateDropIndicator.test.ts +35 -9
- package/src/components/Button.tsx +13 -0
- package/src/components/Dialog.tsx +3 -5
- package/src/components/Grid.tsx +3 -1
- package/src/components/GridView.tsx +1 -0
- package/src/components/InputField.tsx +10 -3
- package/src/components/ListView.tsx +5 -8
- package/src/components/Popover.tsx +68 -4
- package/src/components/SegmentedControl.tsx +41 -18
- package/src/components/SelectionToolbar.tsx +35 -22
- package/src/components/Toolbar.tsx +22 -12
- package/src/components/connected-users-menu/ConnectedUsersMenuLayout.tsx +3 -26
- package/src/components/sorting/DragRegistration.tsx +110 -0
- package/src/components/sorting/SharedDragProvider.tsx +307 -0
- package/src/components/sorting/Sortable.tsx +404 -0
- package/src/components/sorting/createSharedDrag.tsx +46 -0
- package/src/components/sorting/sorting.ts +180 -0
- package/src/contexts/DesignSystemConfiguration.tsx +8 -5
- package/src/contexts/OpenPortalsContext.tsx +67 -0
- package/src/index.css +2 -2
- package/src/index.tsx +5 -2
- package/src/utils/moveTreeItem.ts +4 -2
- package/src/components/Sortable.tsx +0 -468
package/dist/index.d.ts
CHANGED
|
@@ -5,9 +5,8 @@ import * as Icons from '@noya-app/noya-icons';
|
|
|
5
5
|
export { Icons };
|
|
6
6
|
import tailwindConfig from '@noya-app/noya-tailwind-config';
|
|
7
7
|
import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
|
|
8
|
-
import { Size, Rect } from '@noya-app/noya-geometry';
|
|
9
|
-
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
10
|
-
import { useSortable } from '@dnd-kit/sortable';
|
|
8
|
+
import { Size, Rect, Point as Point$1 } from '@noya-app/noya-geometry';
|
|
9
|
+
import { UniqueIdentifier, Active, Over, CollisionDetection } from '@dnd-kit/core';
|
|
11
10
|
import { Property } from 'csstype';
|
|
12
11
|
import * as _noya_app_noya_designsystem from '@noya-app/noya-designsystem';
|
|
13
12
|
import { SectionProps as SectionProps$1, BannerProps as BannerProps$1 } from '@noya-app/noya-designsystem';
|
|
@@ -20,6 +19,7 @@ import * as RadixContextMenu from '@radix-ui/react-context-menu';
|
|
|
20
19
|
import { MultiplayerUser } from '@noya-app/noya-multiplayer-react';
|
|
21
20
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
22
21
|
import { SelectProps } from '@radix-ui/react-select';
|
|
22
|
+
import { useSortable } from '@dnd-kit/sortable';
|
|
23
23
|
import { ImperativePanelGroupHandle } from 'react-resizable-panels';
|
|
24
24
|
import { RgbaColor } from '@noya-app/noya-colorpicker';
|
|
25
25
|
|
|
@@ -658,6 +658,8 @@ interface ButtonRootProps {
|
|
|
658
658
|
className?: string;
|
|
659
659
|
style?: CSSProperties;
|
|
660
660
|
tabIndex?: number;
|
|
661
|
+
icon?: MenuItemIcon;
|
|
662
|
+
iconRight?: MenuItemIcon;
|
|
661
663
|
children: ReactNode;
|
|
662
664
|
active?: boolean;
|
|
663
665
|
disabled?: boolean;
|
|
@@ -707,7 +709,23 @@ interface ChipProps {
|
|
|
707
709
|
declare const Chip: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ChipProps & React__default.RefAttributes<HTMLSpanElement>>>;
|
|
708
710
|
|
|
709
711
|
type RelativeDropPosition = "above" | "below" | "inside";
|
|
710
|
-
type DropValidator = (sourceIndex: number, targetIndex: number, position: RelativeDropPosition) => boolean;
|
|
712
|
+
type DropValidator = (sourceIndex: number, targetIndex: number, position: RelativeDropPosition, sourceListId: string, targetListId: string) => boolean;
|
|
713
|
+
type AcceptsDrop = (sourceIndex: number, targetIndex: number, position: RelativeDropPosition, sourceListId: string, targetListId: string) => boolean;
|
|
714
|
+
type MoveDragItemHandler = (sourceIndex: number, targetIndex: number, position: RelativeDropPosition, sourceListId: string, targetListId: string) => void;
|
|
715
|
+
type AcceptsFromList = ({ sourceListId, targetListId, }: {
|
|
716
|
+
sourceListId: string;
|
|
717
|
+
targetListId: string;
|
|
718
|
+
}) => boolean;
|
|
719
|
+
interface DragItem {
|
|
720
|
+
id: UniqueIdentifier;
|
|
721
|
+
listId: string;
|
|
722
|
+
index: number;
|
|
723
|
+
}
|
|
724
|
+
interface DropTarget {
|
|
725
|
+
id: UniqueIdentifier;
|
|
726
|
+
listId: string;
|
|
727
|
+
index: number;
|
|
728
|
+
}
|
|
711
729
|
declare const normalizeListTargetIndex: (index: number, position: "above" | "below") => number;
|
|
712
730
|
declare const defaultAcceptsDrop: DropValidator;
|
|
713
731
|
type SortableItemContextProps = {
|
|
@@ -720,7 +738,9 @@ type SortableItemContextProps = {
|
|
|
720
738
|
};
|
|
721
739
|
setActivatorEvent: (event: PointerEvent) => void;
|
|
722
740
|
getDropTargetParentIndex?: (index: number) => number | undefined;
|
|
741
|
+
listId: string;
|
|
723
742
|
};
|
|
743
|
+
declare const SortableItemContext: React$1.Context<SortableItemContextProps>;
|
|
724
744
|
type ValidateDropIndicatorParams = {
|
|
725
745
|
acceptsDrop: DropValidator;
|
|
726
746
|
keys: UniqueIdentifier[];
|
|
@@ -729,41 +749,10 @@ type ValidateDropIndicatorParams = {
|
|
|
729
749
|
offsetStart: number;
|
|
730
750
|
elementStart: number;
|
|
731
751
|
elementSize: number;
|
|
752
|
+
sourceListId: string;
|
|
753
|
+
targetListId: string;
|
|
732
754
|
};
|
|
733
|
-
declare function validateDropIndicator({ acceptsDrop, keys, activeId, overId, offsetStart, elementStart, elementSize, }: ValidateDropIndicatorParams): RelativeDropPosition | undefined;
|
|
734
|
-
type UseSortableReturnType = ReturnType<typeof useSortable>;
|
|
735
|
-
type ItemChildrenProps<T> = {
|
|
736
|
-
ref: React$1.Ref<T>;
|
|
737
|
-
relativeDropPosition?: RelativeDropPosition;
|
|
738
|
-
style?: React$1.CSSProperties;
|
|
739
|
-
} & UseSortableReturnType["attributes"];
|
|
740
|
-
interface ItemProps$1<T> {
|
|
741
|
-
id: UniqueIdentifier;
|
|
742
|
-
disabled?: boolean;
|
|
743
|
-
children: (props: ItemChildrenProps<T>) => JSX.Element;
|
|
744
|
-
}
|
|
745
|
-
interface RootProps {
|
|
746
|
-
keys: UniqueIdentifier[];
|
|
747
|
-
children: React$1.ReactNode;
|
|
748
|
-
renderOverlay?: (index: number) => React$1.ReactNode;
|
|
749
|
-
onMoveItem?: (sourceIndex: number, targetIndex: number, position: RelativeDropPosition) => void;
|
|
750
|
-
acceptsDrop?: SortableItemContextProps["acceptsDrop"];
|
|
751
|
-
axis?: SortableItemContextProps["axis"];
|
|
752
|
-
getDropTargetParentIndex?: SortableItemContextProps["getDropTargetParentIndex"];
|
|
753
|
-
}
|
|
754
|
-
declare function SortableRoot({ keys, children, onMoveItem, renderOverlay, acceptsDrop, axis, getDropTargetParentIndex, }: RootProps): React$1.JSX.Element;
|
|
755
|
-
interface SortableProps<T, TElement extends HTMLElement> extends Omit<RootProps, "children" | "keys" | "renderOverlay"> {
|
|
756
|
-
items: T[];
|
|
757
|
-
keyExtractor: (item: T) => UniqueIdentifier;
|
|
758
|
-
shouldRenderOverlay?: boolean;
|
|
759
|
-
renderItem: (item: T, props: ItemChildrenProps<TElement>, { isOverlay }: {
|
|
760
|
-
isOverlay: boolean;
|
|
761
|
-
}) => JSX.Element;
|
|
762
|
-
}
|
|
763
|
-
declare const Sortable: (<TItem, TElement extends HTMLElement>(props: SortableProps<TItem, TElement>) => React$1.ReactElement | null) & {
|
|
764
|
-
readonly Root: React$1.MemoExoticComponent<typeof SortableRoot>;
|
|
765
|
-
readonly Item: <T extends HTMLElement>(props: ItemProps$1<T>) => React$1.ReactElement | null;
|
|
766
|
-
};
|
|
755
|
+
declare function validateDropIndicator({ acceptsDrop, keys, activeId, overId, offsetStart, elementStart, elementSize, sourceListId, targetListId, }: ValidateDropIndicatorParams): RelativeDropPosition | undefined;
|
|
767
756
|
|
|
768
757
|
type ListRowMarginType = "none" | "top" | "bottom" | "vertical";
|
|
769
758
|
type ListRowPosition = "only" | "first" | "middle" | "last";
|
|
@@ -864,7 +853,7 @@ type ListViewRootProps = {
|
|
|
864
853
|
onPress?: () => void;
|
|
865
854
|
scrollable?: boolean;
|
|
866
855
|
expandable?: boolean;
|
|
867
|
-
onMoveItem?:
|
|
856
|
+
onMoveItem?: MoveDragItemHandler;
|
|
868
857
|
indentation?: number;
|
|
869
858
|
acceptsDrop?: DropValidator;
|
|
870
859
|
pressEventName?: PressEventName;
|
|
@@ -1099,7 +1088,9 @@ interface InputFieldRootProps {
|
|
|
1099
1088
|
id?: string;
|
|
1100
1089
|
children?: ReactNode;
|
|
1101
1090
|
start?: ReactNode;
|
|
1091
|
+
startClassName?: string;
|
|
1102
1092
|
end?: ReactNode;
|
|
1093
|
+
endClassName?: string;
|
|
1103
1094
|
label?: ReactNode;
|
|
1104
1095
|
width?: number;
|
|
1105
1096
|
startWidth?: number;
|
|
@@ -1118,7 +1109,7 @@ interface InputFieldRootProps {
|
|
|
1118
1109
|
style?: React__default.CSSProperties;
|
|
1119
1110
|
className?: string;
|
|
1120
1111
|
}
|
|
1121
|
-
declare function InputFieldRoot({ id, children, width, sideOffset, startWidth: startWidthProp, endWidth: endWidthProp, size, renderPopoverContent, onFocusChange, style, className, start, end, label: labelProp, }: InputFieldRootProps): React__default.JSX.Element;
|
|
1112
|
+
declare function InputFieldRoot({ id, children, width, sideOffset, startWidth: startWidthProp, endWidth: endWidthProp, size, renderPopoverContent, onFocusChange, style, className, start, end, startClassName, endClassName, label: labelProp, }: InputFieldRootProps): React__default.JSX.Element;
|
|
1122
1113
|
type InputFieldProps = InputFieldRootProps & InputFieldInputProps;
|
|
1123
1114
|
declare const InputField: React__default.ForwardRefExoticComponent<InputFieldProps & React__default.RefAttributes<HTMLInputElement>> & {
|
|
1124
1115
|
readonly Root: React__default.MemoExoticComponent<typeof InputFieldRoot>;
|
|
@@ -1226,11 +1217,10 @@ declare const CommandPalette: React__default.NamedExoticComponent<{
|
|
|
1226
1217
|
declare const UserAvatar: ({ userId, name, image }: AvatarProps) => React__default.JSX.Element;
|
|
1227
1218
|
type ConnectedUsersMenuLayoutProps = {
|
|
1228
1219
|
renderUsers: () => React__default.ReactNode;
|
|
1229
|
-
currentUserId?: string;
|
|
1230
1220
|
launchAIAssistant?: () => void;
|
|
1231
1221
|
isAssistantOpen?: boolean;
|
|
1232
1222
|
};
|
|
1233
|
-
declare const ConnectedUsersMenuLayout: ({ renderUsers,
|
|
1223
|
+
declare const ConnectedUsersMenuLayout: ({ renderUsers, launchAIAssistant, isAssistantOpen, }: ConnectedUsersMenuLayoutProps) => React__default.JSX.Element;
|
|
1234
1224
|
|
|
1235
1225
|
interface MenuItemProps<T extends string> {
|
|
1236
1226
|
value?: T;
|
|
@@ -1686,13 +1676,14 @@ interface Props$7 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content
|
|
|
1686
1676
|
onClickClose?: () => void;
|
|
1687
1677
|
showArrow?: boolean;
|
|
1688
1678
|
className?: string;
|
|
1679
|
+
portalContainer?: HTMLElement | null;
|
|
1689
1680
|
}
|
|
1690
1681
|
declare const popoverStyle: {
|
|
1691
1682
|
base: string;
|
|
1692
1683
|
large: string;
|
|
1693
1684
|
normal: string;
|
|
1694
1685
|
};
|
|
1695
|
-
declare function Popover({ children, trigger, variant, closable, open, side, sideOffset, showArrow, onOpenChange, onOpenAutoFocus, onCloseAutoFocus, onPointerDownOutside, onInteractOutside, onFocusOutside, onClickClose, className, }: Props$7): React__default.JSX.Element;
|
|
1686
|
+
declare function Popover({ children, trigger, variant, closable, open, side, sideOffset, showArrow, onOpenChange, onOpenAutoFocus, onCloseAutoFocus, onPointerDownOutside, onInteractOutside, onFocusOutside, onClickClose, className, portalContainer, }: Props$7): React__default.JSX.Element;
|
|
1696
1687
|
|
|
1697
1688
|
type ProgressVariant = "normal" | "warning" | "primary" | "secondary";
|
|
1698
1689
|
declare function Progress({ value, variant, className, }: {
|
|
@@ -1729,6 +1720,7 @@ type ExpandableSectionProps = {
|
|
|
1729
1720
|
declare const Section$1: React__default.NamedExoticComponent<SectionProps & Partial<ExpandableSectionProps>>;
|
|
1730
1721
|
|
|
1731
1722
|
type SegmentedControlColorScheme = "primary" | "secondary";
|
|
1723
|
+
type SegmentedControlVariant = "default" | "tabs";
|
|
1732
1724
|
interface SegmentedControlProps<T extends string> {
|
|
1733
1725
|
id?: string;
|
|
1734
1726
|
value?: T;
|
|
@@ -1739,18 +1731,21 @@ interface SegmentedControlProps<T extends string> {
|
|
|
1739
1731
|
items: SegmentedControlItemProps<T>[];
|
|
1740
1732
|
className?: string;
|
|
1741
1733
|
style?: React__default.CSSProperties;
|
|
1734
|
+
variant?: SegmentedControlVariant;
|
|
1742
1735
|
}
|
|
1743
1736
|
type SegmentedControlItemProps<T extends string> = {
|
|
1744
1737
|
title?: ReactNode;
|
|
1745
1738
|
className?: string;
|
|
1746
1739
|
style?: React__default.CSSProperties;
|
|
1747
1740
|
tooltip?: ReactNode;
|
|
1741
|
+
variant?: SegmentedControlVariant;
|
|
1748
1742
|
} & Pick<SelectableMenuItem<T>, "value" | "disabled" | "icon" | "role" | "title">;
|
|
1749
1743
|
declare const SegmentedControl: <T extends string>(props: SegmentedControlProps<T>) => React__default.ReactElement | null;
|
|
1750
1744
|
|
|
1751
1745
|
type SelectionToolbarContainerProps = {
|
|
1752
1746
|
rect: Rect;
|
|
1753
1747
|
children: React__default.ReactNode;
|
|
1748
|
+
portalContainer?: HTMLElement | null;
|
|
1754
1749
|
};
|
|
1755
1750
|
declare const SelectionToolbarContainer: React__default.NamedExoticComponent<SelectionToolbarContainerProps>;
|
|
1756
1751
|
|
|
@@ -1789,6 +1784,87 @@ interface Props$4 {
|
|
|
1789
1784
|
}
|
|
1790
1785
|
declare const Slider: React__default.NamedExoticComponent<Props$4>;
|
|
1791
1786
|
|
|
1787
|
+
type GetDropIndicatorParameters = {
|
|
1788
|
+
absolutePosition: Point$1;
|
|
1789
|
+
active: Active;
|
|
1790
|
+
over: Over;
|
|
1791
|
+
sourceListId: string;
|
|
1792
|
+
targetListId: string;
|
|
1793
|
+
};
|
|
1794
|
+
interface RegisteredList {
|
|
1795
|
+
id: string;
|
|
1796
|
+
keys: UniqueIdentifier[];
|
|
1797
|
+
onMoveItem: MoveDragItemHandler;
|
|
1798
|
+
renderOverlay?: (id: UniqueIdentifier) => React__default.ReactNode;
|
|
1799
|
+
acceptsFromList: AcceptsFromList;
|
|
1800
|
+
acceptsDrop: AcceptsDrop;
|
|
1801
|
+
getDropIndicator: (parameters: GetDropIndicatorParameters) => RelativeDropPosition | undefined;
|
|
1802
|
+
}
|
|
1803
|
+
interface DragRegistrationContextType {
|
|
1804
|
+
registerList: (list: RegisteredList) => void;
|
|
1805
|
+
unregisterList: (listId: string) => void;
|
|
1806
|
+
}
|
|
1807
|
+
type ActiveDragContextType = {
|
|
1808
|
+
activeItem: DragItem | null;
|
|
1809
|
+
delta: Point$1;
|
|
1810
|
+
};
|
|
1811
|
+
type SharedDragProviderContexts = {
|
|
1812
|
+
dragRegistrationContext: React__default.Context<DragRegistrationContextType | null>;
|
|
1813
|
+
activeDragContext: React__default.Context<ActiveDragContextType | null>;
|
|
1814
|
+
};
|
|
1815
|
+
|
|
1816
|
+
type SharedDragProviderProps = {
|
|
1817
|
+
children: React$1.ReactNode;
|
|
1818
|
+
contexts?: SharedDragProviderContexts;
|
|
1819
|
+
};
|
|
1820
|
+
declare function SharedDragProvider({ children, contexts, }: SharedDragProviderProps): React$1.JSX.Element;
|
|
1821
|
+
declare function withDragProvider<T extends object>(Component: React$1.ComponentType<T>): (props: T) => React$1.JSX.Element;
|
|
1822
|
+
declare const getItemFirstCollisionDetection: (registeredListIds: string[]) => CollisionDetection;
|
|
1823
|
+
|
|
1824
|
+
type UseSortableReturnType = ReturnType<typeof useSortable>;
|
|
1825
|
+
type ItemChildrenProps<T> = {
|
|
1826
|
+
ref: React$1.Ref<T>;
|
|
1827
|
+
relativeDropPosition?: RelativeDropPosition;
|
|
1828
|
+
style?: React$1.CSSProperties;
|
|
1829
|
+
} & UseSortableReturnType["attributes"];
|
|
1830
|
+
interface RootProps {
|
|
1831
|
+
id?: string;
|
|
1832
|
+
keys: UniqueIdentifier[];
|
|
1833
|
+
axis?: "x" | "y";
|
|
1834
|
+
children?: React$1.ReactNode;
|
|
1835
|
+
renderOverlay?: (index: number) => React$1.ReactNode;
|
|
1836
|
+
onMoveItem?: MoveDragItemHandler;
|
|
1837
|
+
acceptsFromList?: AcceptsFromList;
|
|
1838
|
+
acceptsDrop?: DropValidator;
|
|
1839
|
+
getDropTargetParentIndex?: (index: number) => number | undefined;
|
|
1840
|
+
sharedDragProviderContexts?: SharedDragProviderContexts;
|
|
1841
|
+
containerRef?: React$1.RefObject<HTMLElement>;
|
|
1842
|
+
}
|
|
1843
|
+
declare function SortableItem<TElement extends HTMLElement>({ id, disabled, children, }: {
|
|
1844
|
+
id: UniqueIdentifier;
|
|
1845
|
+
disabled?: boolean;
|
|
1846
|
+
children: (props: ItemChildrenProps<TElement>) => React$1.ReactNode;
|
|
1847
|
+
}): React$1.ReactNode;
|
|
1848
|
+
declare function SortableRoot_({ id: idProp, keys, onMoveItem, renderOverlay, acceptsFromList, acceptsDrop, axis, children, getDropTargetParentIndex, sharedDragProviderContexts, containerRef, }: RootProps): React$1.JSX.Element;
|
|
1849
|
+
interface SortableProps<TItem, TElement extends HTMLElement> extends Omit<RootProps, "children" | "keys" | "renderOverlay"> {
|
|
1850
|
+
items: TItem[];
|
|
1851
|
+
keyExtractor: (item: TItem) => UniqueIdentifier;
|
|
1852
|
+
shouldRenderOverlay?: boolean;
|
|
1853
|
+
renderItem: (item: TItem, props: ItemChildrenProps<TElement>, { isOverlay }: {
|
|
1854
|
+
isOverlay: boolean;
|
|
1855
|
+
}) => React$1.ReactNode;
|
|
1856
|
+
}
|
|
1857
|
+
declare const Sortable: (<TItem, TElement extends HTMLElement>({ items, keyExtractor, shouldRenderOverlay, renderItem, ...rest }: SortableProps<TItem, TElement>) => React$1.JSX.Element) & {
|
|
1858
|
+
Root: typeof SortableRoot_;
|
|
1859
|
+
Item: typeof SortableItem;
|
|
1860
|
+
};
|
|
1861
|
+
|
|
1862
|
+
declare function createSharedDrag(): {
|
|
1863
|
+
Provider: typeof SharedDragProvider;
|
|
1864
|
+
props: SharedDragProviderContexts;
|
|
1865
|
+
Sortable: <TItem, TElement extends HTMLElement>(props: SortableProps<TItem, TElement>) => React$1.ReactNode;
|
|
1866
|
+
};
|
|
1867
|
+
|
|
1792
1868
|
interface Props$3 {
|
|
1793
1869
|
size?: number | string;
|
|
1794
1870
|
inline?: boolean;
|
|
@@ -2024,6 +2100,19 @@ declare const ImageDataProvider: React$1.NamedExoticComponent<{
|
|
|
2024
2100
|
}>;
|
|
2025
2101
|
declare function useImageData(ref: string): ArrayBuffer | undefined;
|
|
2026
2102
|
|
|
2103
|
+
type OpenPortalsContextValue = {
|
|
2104
|
+
hasOpenPortals: boolean;
|
|
2105
|
+
};
|
|
2106
|
+
type OpenPortalControlsContextValue = {
|
|
2107
|
+
addOpenPortal: (portal: string) => void;
|
|
2108
|
+
removeOpenPortal: (portal: string) => void;
|
|
2109
|
+
};
|
|
2110
|
+
declare const OpenPortalsProvider: React$1.NamedExoticComponent<{
|
|
2111
|
+
children: React$1.ReactNode;
|
|
2112
|
+
}>;
|
|
2113
|
+
declare function useHasOpenPortals(): boolean;
|
|
2114
|
+
declare function useOpenPortalsControls(): OpenPortalControlsContextValue;
|
|
2115
|
+
|
|
2027
2116
|
type PortalScopeContextValue = string;
|
|
2028
2117
|
declare const PortalScopeProvider: React$1.NamedExoticComponent<{
|
|
2029
2118
|
children: React$1.ReactNode;
|
|
@@ -2310,14 +2399,17 @@ declare const ToolbarMenuDropdown: <T extends string>(props: {
|
|
|
2310
2399
|
declare const ToolbarMenuButton: <T extends string>(props: {
|
|
2311
2400
|
item: SelectableMenuItem<T>;
|
|
2312
2401
|
onSelectMenuItem?: (value: T) => void;
|
|
2402
|
+
as?: ComponentProps<typeof Button>["as"];
|
|
2313
2403
|
}) => React__default.ReactElement | null;
|
|
2314
2404
|
declare const ToolbarMenuItem: <T extends string>(props: {
|
|
2315
2405
|
item: MenuItem<T>;
|
|
2316
2406
|
onSelectMenuItem?: (value: T) => void;
|
|
2407
|
+
buttonAs?: ComponentProps<typeof Button>["as"];
|
|
2317
2408
|
}) => React__default.ReactElement | null;
|
|
2318
2409
|
declare const ToolbarMenu: <T extends string>(props: {
|
|
2319
2410
|
items: MenuItem<T>[];
|
|
2320
2411
|
onSelectMenuItem?: (value: T) => void;
|
|
2412
|
+
buttonAs?: ComponentProps<typeof Button>["as"];
|
|
2321
2413
|
}) => React__default.ReactElement | null;
|
|
2322
2414
|
interface ToolbarProps<T extends string = string> {
|
|
2323
2415
|
children?: React__default.ReactNode;
|
|
@@ -2330,4 +2422,4 @@ interface ToolbarProps<T extends string = string> {
|
|
|
2330
2422
|
}
|
|
2331
2423
|
declare function Toolbar<T extends string = string>({ children, logo, leftMenuItems, rightMenuItems, onSelectMenuItem, shouldBindKeyboardShortcuts, }: ToolbarProps<T>): React__default.JSX.Element;
|
|
2332
2424
|
|
|
2333
|
-
export { AIAssistantInput, AIAssistantLayout, AIAssistantLoadingIndicator, type AcceptsDropOptions, ActionMenu, ActivityIndicator, AnimatePresence, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, Banner, type BannerProps, type BaseComboboxProps, BaseToolbar, type BaseToolbarProps, Body, BreadcrumbSlash, BreadcrumbText, Button, type ButtonRootProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, CONTENT_AREA_ID, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionItemSize, type CollectionProps, type CollectionRef, type CollectionRenderActionProps, type CollectionThumbnailProps, type CollectionThumbnailSize, type CollectionViewType, ColorSwatch, ColorSwatchControl, type ColorSwatchSize, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ConnectedUsersMenuLayout, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, type DetectSizeType, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, type DragIndicatorStyleProps, DraggableMenuButton, Drawer, type DrawerProps, type DropValidator, DropdownMenu, type DropdownRootProps, EDITOR_PANEL_GROUP_ID, type EditableRowProps, EditableText, type EditableTextRef, type ExtractMenuItemType, Fade, type FadeDirection, type FadeProps, FileExplorerCollection, FileExplorerDetail, FileExplorerEmptyState, FileExplorerLayout, FileExplorerUploadButton, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, Grid, GridView, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, INPUT_HEIGHT, type IScoredItem, type ISearchCompletionMenu, type IToken, type IVirtualizedList, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, IndentContext, InputField, type InputFieldInputProps, type InputFieldProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, Italic, KeyboardShortcut, LEFT_SIDEBAR_ID, Label, LabelContext, type LabelPosition, LabelPositionContext, type LabelPositionContextValue, type LabelProps, LabelWidthContext, type LabelWidthContextValue, LabeledElementView, LabeledField, type LayoutProps, List, type ListRowMarginType, type ListRowPosition, ListView, type ListViewItemInfo, type ListViewRootProps, type ListViewRowProps, Logo, type MatchRange, MediaThumbnail, type MenuComponents, type MenuConfig, type MenuItem, type MenuItemIcon, type MenuItemProps, type MenuItemRole, type MenuProps, MenuViewport, Message, type MessageProps, type MoveTreeItemOptions, type NonSelectableMenuItem, type OptionModeOnlyProps, type OptionModeProps, type Optional, type PanelLayoutState, PatternPreviewBackground, type PercentageSidebarOptions, PipelineResultLayout, PipelineResultLink, Popover, type PortalScopeContextValue, PortalScopeProvider, Progress, RIGHT_SIDEBAR_ID, type RelativeDropPosition, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, type ScoredMenuItem, ScrollArea, SearchCompletionMenu, Section$1 as Section, SectionHeader$1 as SectionHeader, type SectionHeaderMenuItem, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SelectableMenuItem, SelectionToolbarContainer, type SeparatorItem, type SetNumberMode, type SideOptions, type SideType, type SidebarRef, type SketchPattern, Slider, Small, Sortable, type SortableItemContextProps, Spacer, type StringModeOnlyProps, type StringModeProps, type SubMenuItem, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, type TokenValue, Toolbar, ToolbarMenu, ToolbarMenuButton, ToolbarMenuDropdown, ToolbarMenuItem, type ToolbarProps, Tooltip, TreeView, type UseThemeReturnType, UserAvatar, UserPointer, type UserPointerProps, WorkspaceLayout, type WorkspaceLayoutProps, type WorkspaceLayoutRef, acceptsDrop, colorForStringValues, colorFromString, colorSwatchSizeMap, createSectionedMenu, cssVarNames, cssVars, cx, defaultAcceptsDrop, filterWithGroupedSections, fuzzyFilter, fuzzyScore, fuzzyTokenize, getClosestPortalScope, getFieldSpacing, getGradientBackground, getGridSize, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, getPipelineResultLink, getThumbnailColors, isMenuItemSectionHeader, isNonSelectableMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, labeledFieldStyles, mediaQuery, mergeConflictingClassNames, moveTreeItem, normalizeListTargetIndex, popoverStyle, portalScopeDataSetName, portalScopePropName, portalScopeProps, renderIcon, rgbaToSketchColor, separator, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, styles, textStyles, updateSelection, useAutoResize, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useDialogContext, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelPosition, useLabelWidth, useOpenConfirmationDialog, useOpenDialog, useOpenInputDialog, usePlatform, usePlatformModKey, usePortalScopeId, usePreservePanelSize, useTheme, validateDropIndicator, withSeparatorElements };
|
|
2425
|
+
export { AIAssistantInput, AIAssistantLayout, AIAssistantLoadingIndicator, type AcceptsDrop, type AcceptsDropOptions, type AcceptsFromList, ActionMenu, ActivityIndicator, AnimatePresence, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, Banner, type BannerProps, type BaseComboboxProps, BaseToolbar, type BaseToolbarProps, Body, BreadcrumbSlash, BreadcrumbText, Button, type ButtonRootProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, CONTENT_AREA_ID, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionItemSize, type CollectionProps, type CollectionRef, type CollectionRenderActionProps, type CollectionThumbnailProps, type CollectionThumbnailSize, type CollectionViewType, ColorSwatch, ColorSwatchControl, type ColorSwatchSize, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ConnectedUsersMenuLayout, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, type DetectSizeType, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, type DragIndicatorStyleProps, type DragItem, DraggableMenuButton, Drawer, type DrawerProps, type DropTarget, type DropValidator, DropdownMenu, type DropdownRootProps, EDITOR_PANEL_GROUP_ID, type EditableRowProps, EditableText, type EditableTextRef, type ExtractMenuItemType, Fade, type FadeDirection, type FadeProps, FileExplorerCollection, FileExplorerDetail, FileExplorerEmptyState, FileExplorerLayout, FileExplorerUploadButton, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, Grid, GridView, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, INPUT_HEIGHT, type IScoredItem, type ISearchCompletionMenu, type IToken, type IVirtualizedList, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, IndentContext, InputField, type InputFieldInputProps, type InputFieldProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, Italic, KeyboardShortcut, LEFT_SIDEBAR_ID, Label, LabelContext, type LabelPosition, LabelPositionContext, type LabelPositionContextValue, type LabelProps, LabelWidthContext, type LabelWidthContextValue, LabeledElementView, LabeledField, type LayoutProps, List, type ListRowMarginType, type ListRowPosition, ListView, type ListViewItemInfo, type ListViewRootProps, type ListViewRowProps, Logo, type MatchRange, MediaThumbnail, type MenuComponents, type MenuConfig, type MenuItem, type MenuItemIcon, type MenuItemProps, type MenuItemRole, type MenuProps, MenuViewport, Message, type MessageProps, type MoveDragItemHandler, type MoveTreeItemOptions, type NonSelectableMenuItem, type OpenPortalControlsContextValue, type OpenPortalsContextValue, OpenPortalsProvider, type OptionModeOnlyProps, type OptionModeProps, type Optional, type PanelLayoutState, PatternPreviewBackground, type PercentageSidebarOptions, PipelineResultLayout, PipelineResultLink, Popover, type PortalScopeContextValue, PortalScopeProvider, Progress, RIGHT_SIDEBAR_ID, type RelativeDropPosition, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, type ScoredMenuItem, ScrollArea, SearchCompletionMenu, Section$1 as Section, SectionHeader$1 as SectionHeader, type SectionHeaderMenuItem, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SelectableMenuItem, SelectionToolbarContainer, type SeparatorItem, type SetNumberMode, SharedDragProvider, type SideOptions, type SideType, type SidebarRef, type SketchPattern, Slider, Small, Sortable, SortableItemContext, type SortableItemContextProps, type SortableProps, Spacer, type StringModeOnlyProps, type StringModeProps, type SubMenuItem, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, type TokenValue, Toolbar, ToolbarMenu, ToolbarMenuButton, ToolbarMenuDropdown, ToolbarMenuItem, type ToolbarProps, Tooltip, TreeView, type UseThemeReturnType, UserAvatar, UserPointer, type UserPointerProps, type ValidateDropIndicatorParams, WorkspaceLayout, type WorkspaceLayoutProps, type WorkspaceLayoutRef, acceptsDrop, colorForStringValues, colorFromString, colorSwatchSizeMap, createSectionedMenu, createSharedDrag, cssVarNames, cssVars, cx, defaultAcceptsDrop, filterWithGroupedSections, fuzzyFilter, fuzzyScore, fuzzyTokenize, getClosestPortalScope, getFieldSpacing, getGradientBackground, getGridSize, getItemFirstCollisionDetection, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, getPipelineResultLink, getThumbnailColors, isMenuItemSectionHeader, isNonSelectableMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, labeledFieldStyles, mediaQuery, mergeConflictingClassNames, moveTreeItem, normalizeListTargetIndex, popoverStyle, portalScopeDataSetName, portalScopePropName, portalScopeProps, renderIcon, rgbaToSketchColor, separator, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, styles, textStyles, updateSelection, useAutoResize, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useDialogContext, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHasOpenPortals, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelPosition, useLabelWidth, useOpenConfirmationDialog, useOpenDialog, useOpenInputDialog, useOpenPortalsControls, usePlatform, usePlatformModKey, usePortalScopeId, usePreservePanelSize, useTheme, validateDropIndicator, withDragProvider, withSeparatorElements };
|