@noya-app/noya-designsystem 0.1.41 → 0.1.42
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 +10 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +217 -121
- package/dist/index.d.ts +217 -121
- package/dist/index.js +7435 -6796
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5257 -4660
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -5
- package/src/__tests__/combobox.test.ts +578 -0
- package/src/components/ActivityIndicator.tsx +4 -4
- package/src/components/AnimatePresence.tsx +5 -5
- package/src/components/Avatar.tsx +5 -2
- package/src/components/BaseToolbar.tsx +61 -0
- package/src/components/Button.tsx +1 -1
- package/src/components/Checkbox.tsx +6 -5
- package/src/components/Combobox.tsx +220 -324
- package/src/components/ComboboxMenu.tsx +88 -0
- package/src/components/Dialog.tsx +10 -6
- package/src/components/DimensionInput.tsx +4 -4
- package/src/components/FillPreviewBackground.tsx +51 -44
- package/src/components/FloatingWindow.tsx +5 -2
- package/src/components/GradientPicker.tsx +14 -14
- package/src/components/IconButton.tsx +6 -12
- package/src/components/Icons.tsx +3 -3
- package/src/components/InputField.tsx +145 -160
- package/src/components/Label.tsx +4 -4
- package/src/components/LabeledElementView.tsx +35 -41
- package/src/components/ListView.tsx +49 -39
- package/src/components/Message.tsx +75 -0
- package/src/components/Progress.tsx +2 -2
- package/src/components/ScrollArea.tsx +7 -5
- package/src/components/SegmentedControl.tsx +171 -0
- package/src/components/SelectMenu.tsx +61 -10
- package/src/components/Slider.tsx +5 -2
- package/src/components/Sortable.tsx +17 -27
- package/src/components/Spacer.tsx +28 -9
- package/src/components/Switch.tsx +8 -8
- package/src/components/TextArea.tsx +23 -13
- package/src/components/Toolbar.tsx +134 -0
- package/src/components/Tooltip.tsx +10 -7
- package/src/components/internal/Menu.tsx +5 -4
- package/src/contexts/DesignSystemConfiguration.tsx +15 -24
- package/src/contexts/DialogContext.tsx +137 -49
- package/src/contexts/ImageDataContext.tsx +6 -12
- package/src/index.css +1 -3
- package/src/index.tsx +12 -3
- package/src/utils/combobox.ts +369 -0
- package/tailwind.config.ts +1 -2
- package/src/components/RadioGroup.tsx +0 -100
- package/src/utils/completions.ts +0 -21
package/dist/index.d.mts
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { CSSProperties, ReactNode,
|
|
3
|
-
import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
|
|
4
|
-
import { Size } from '@noya-app/noya-geometry';
|
|
2
|
+
import React__default, { CSSProperties, ReactNode, AriaRole, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, FocusEventHandler, InputHTMLAttributes, HTMLAttributes, ComponentProps, SyntheticEvent, ReactHTML } from 'react';
|
|
5
3
|
import { IItemScore } from 'vscode-fuzzy-scorer';
|
|
6
4
|
import { Property } from 'csstype';
|
|
7
5
|
import * as Icons from '@noya-app/noya-icons';
|
|
8
6
|
export { Icons };
|
|
7
|
+
import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
|
|
8
|
+
import { Size } from '@noya-app/noya-geometry';
|
|
9
9
|
import { useSortable } from '@dnd-kit/sortable';
|
|
10
10
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
11
|
import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
12
12
|
import { Sketch } from '@noya-app/noya-file-format';
|
|
13
13
|
import * as _noya_app_noya_keymap from '@noya-app/noya-keymap';
|
|
14
14
|
import { KeyModifiers, PlatformName } from '@noya-app/noya-keymap';
|
|
15
|
+
import { MultiplayerUser } from '@noya-app/noya-multiplayer-react';
|
|
15
16
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
16
17
|
import { SelectProps } from '@radix-ui/react-select';
|
|
17
18
|
import { ImperativePanelGroupHandle } from 'react-resizable-panels';
|
|
18
19
|
import { RgbaColor } from '@noya-app/noya-colorpicker';
|
|
19
20
|
|
|
20
|
-
interface Props$
|
|
21
|
+
interface Props$e {
|
|
21
22
|
size?: number;
|
|
22
23
|
opacity?: number;
|
|
23
24
|
color?: string;
|
|
24
25
|
trackColor?: string;
|
|
25
26
|
}
|
|
26
|
-
declare const ActivityIndicator:
|
|
27
|
+
declare const ActivityIndicator: React.NamedExoticComponent<Props$e>;
|
|
27
28
|
|
|
28
29
|
type AnimatePresenceProps = {
|
|
29
30
|
children: React__default.ReactNode;
|
|
@@ -65,6 +66,9 @@ type AvatarProps = {
|
|
|
65
66
|
/** @default normal */
|
|
66
67
|
variant?: "normal" | "bare";
|
|
67
68
|
disabled?: boolean;
|
|
69
|
+
/** Intended to be used in place of a fallback monogram, like an icon */
|
|
70
|
+
children?: React__default.ReactNode;
|
|
71
|
+
onClick?: () => void;
|
|
68
72
|
};
|
|
69
73
|
declare const Avatar: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<AvatarProps & React__default.RefAttributes<HTMLDivElement>>>;
|
|
70
74
|
declare const AvatarStack: React__default.NamedExoticComponent<{
|
|
@@ -99,10 +103,10 @@ interface ButtonRootProps {
|
|
|
99
103
|
}
|
|
100
104
|
declare const Button: React__default.ForwardRefExoticComponent<ButtonRootProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
101
105
|
|
|
102
|
-
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
106
|
+
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
103
107
|
colorScheme?: "primary" | "secondary";
|
|
104
108
|
}
|
|
105
|
-
declare const Checkbox$1:
|
|
109
|
+
declare const Checkbox$1: React.MemoExoticComponent<React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>>;
|
|
106
110
|
|
|
107
111
|
type ChipColorScheme = "primary" | "secondary" | "error";
|
|
108
112
|
type ChipSize = "small" | "medium" | "large";
|
|
@@ -155,24 +159,59 @@ declare function fuzzyTokenize({ item, itemScore, }: {
|
|
|
155
159
|
itemScore: IItemScore;
|
|
156
160
|
}): IToken[];
|
|
157
161
|
|
|
158
|
-
type
|
|
162
|
+
type ComboboxOption = {
|
|
159
163
|
type?: undefined;
|
|
160
164
|
id: string;
|
|
161
165
|
name: string;
|
|
162
166
|
icon?: ReactNode;
|
|
163
167
|
alwaysInclude?: boolean;
|
|
164
168
|
};
|
|
165
|
-
type
|
|
166
|
-
type:
|
|
169
|
+
type ComboboxSectionHeader = {
|
|
170
|
+
type: "sectionHeader";
|
|
167
171
|
id: string;
|
|
168
172
|
name: string;
|
|
169
173
|
maxVisibleItems?: number;
|
|
170
174
|
};
|
|
171
|
-
type
|
|
175
|
+
type ComboboxItem = ComboboxOption | ComboboxSectionHeader;
|
|
176
|
+
type InternalComboboxItem = (ComboboxOption & IScoredItem) | ComboboxSectionHeader;
|
|
177
|
+
type ComboboxStateSnapshot = {
|
|
178
|
+
filter: string;
|
|
179
|
+
selectedIndex: number;
|
|
180
|
+
filteredItems: InternalComboboxItem[];
|
|
181
|
+
lastSubmittedValue: {
|
|
182
|
+
filter: string;
|
|
183
|
+
itemName: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
declare class ComboboxState {
|
|
187
|
+
private filter;
|
|
188
|
+
private selectedIndex;
|
|
189
|
+
private items;
|
|
190
|
+
private lastSubmittedValue;
|
|
191
|
+
private subscribers;
|
|
192
|
+
private version;
|
|
193
|
+
private _cachedSnapshot;
|
|
194
|
+
constructor(items: ComboboxItem[], initialValue: string, allowArbitraryValues: boolean);
|
|
195
|
+
subscribe: (listener: () => void) => (() => void);
|
|
196
|
+
private notifyChange;
|
|
197
|
+
private getFilteredItems;
|
|
198
|
+
getSnapshot: () => ComboboxStateSnapshot;
|
|
199
|
+
setItems(items: ComboboxItem[]): void;
|
|
200
|
+
setFilter(filter: string): void;
|
|
201
|
+
moveSelection(direction: "up" | "down"): void;
|
|
202
|
+
selectCurrentItem(item?: InternalComboboxItem): InternalComboboxItem | undefined;
|
|
203
|
+
restoreLastSubmittedValue(): void;
|
|
204
|
+
reset(newFilter?: string): void;
|
|
205
|
+
getSelectedItem(): InternalComboboxItem | undefined;
|
|
206
|
+
getTypeaheadValue(): string | undefined;
|
|
207
|
+
setSelectedIndex(index: number): void;
|
|
208
|
+
submitArbitraryFilter(filter: string): void;
|
|
209
|
+
}
|
|
210
|
+
declare function useComboboxState(state: ComboboxState): ComboboxStateSnapshot;
|
|
172
211
|
|
|
173
212
|
type IconName = keyof typeof Icons;
|
|
174
213
|
|
|
175
|
-
declare function renderIcon(iconName: Exclude<ReactNode, string> | IconName): ReactNode;
|
|
214
|
+
declare function renderIcon(iconName: Exclude<React.ReactNode, string> | IconName): React.ReactNode;
|
|
176
215
|
|
|
177
216
|
declare const SEPARATOR_ITEM = "separator";
|
|
178
217
|
type MenuItemRole = "undo" | "redo" | "cut" | "copy" | "paste" | "pasteAndMatchStyle" | "delete" | "selectAll" | "reload" | "forceReload" | "toggleDevTools" | "resetZoom" | "zoomIn" | "zoomOut" | "toggleSpellChecker" | "togglefullscreen" | "window" | "minimize" | "close" | "help" | "about" | "services" | "hide" | "hideOthers" | "unhide" | "quit" | "showSubstitutions" | "toggleSmartQuotes" | "toggleSmartDashes" | "toggleTextReplacement" | "startSpeaking" | "stopSpeaking" | "zoom" | "front" | "appMenu" | "fileMenu" | "editMenu" | "viewMenu" | "shareMenu" | "recentDocuments" | "toggleTabBar" | "selectNextTab" | "selectPreviousTab" | "mergeAllWindows" | "clearRecentDocuments" | "moveTabToNewWindow" | "windowMenu";
|
|
@@ -188,11 +227,12 @@ type RegularMenuItem<T extends string> = {
|
|
|
188
227
|
};
|
|
189
228
|
type MenuItem<T extends string> = typeof SEPARATOR_ITEM | RegularMenuItem<T>;
|
|
190
229
|
type ExtractMenuItemType<T> = T extends RegularMenuItem<infer U> ? U : never;
|
|
230
|
+
declare function getKeyboardShortcutsForMenuItems<T extends string>(menuItems: MenuItem<T>[], onSelect: (type: T) => void): Record<string, () => void>;
|
|
191
231
|
declare const KeyboardShortcut: React__default.NamedExoticComponent<{
|
|
192
232
|
shortcut: string;
|
|
193
233
|
}>;
|
|
194
234
|
|
|
195
|
-
type Props$
|
|
235
|
+
type Props$d = {
|
|
196
236
|
id?: string;
|
|
197
237
|
style?: any;
|
|
198
238
|
className?: string;
|
|
@@ -210,15 +250,15 @@ type Props$e = {
|
|
|
210
250
|
onFocusChange?: (isFocused: boolean) => void;
|
|
211
251
|
onBlur?: FocusEventHandler;
|
|
212
252
|
} & Pick<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "autoCapitalize" | "autoCorrect" | "spellCheck" | "autoFocus">;
|
|
213
|
-
type ReadOnlyProps = Props$
|
|
253
|
+
type ReadOnlyProps = Props$d & {
|
|
214
254
|
readOnly: true;
|
|
215
255
|
};
|
|
216
|
-
type ControlledProps = Props$
|
|
256
|
+
type ControlledProps = Props$d & {
|
|
217
257
|
onChange: (value: string) => void;
|
|
218
258
|
onFocus?: FocusEventHandler;
|
|
219
259
|
onBlur?: FocusEventHandler;
|
|
220
260
|
};
|
|
221
|
-
type SubmittableProps = Props$
|
|
261
|
+
type SubmittableProps = Props$d & {
|
|
222
262
|
onSubmit: (value: string) => void;
|
|
223
263
|
allowSubmittingWithSameValue?: boolean;
|
|
224
264
|
submitAutomaticallyAfterDelay?: number;
|
|
@@ -237,12 +277,13 @@ type InputFieldInputProps = TextInputProps & {
|
|
|
237
277
|
textAlign?: Property.TextAlign;
|
|
238
278
|
variant?: "bare";
|
|
239
279
|
};
|
|
240
|
-
type InputFieldNumberInputProps = Omit<TextInputProps, "value" | "onChange" | "onKeyDown" | "onSubmit"> & {
|
|
280
|
+
type InputFieldNumberInputProps = Omit<TextInputProps, "value" | "onChange" | "onKeyDown" | "onSubmit" | "readOnly"> & {
|
|
241
281
|
value: number | undefined;
|
|
242
282
|
onNudge?: (value: number) => void;
|
|
243
283
|
variant?: "bare";
|
|
244
284
|
onFocus?: FocusEventHandler;
|
|
245
285
|
onBlur?: FocusEventHandler;
|
|
286
|
+
readOnly?: boolean;
|
|
246
287
|
} & ({
|
|
247
288
|
onChange: (value: number) => void;
|
|
248
289
|
} | {
|
|
@@ -251,33 +292,40 @@ type InputFieldNumberInputProps = Omit<TextInputProps, "value" | "onChange" | "o
|
|
|
251
292
|
declare function InputFieldNumberInput(props: InputFieldNumberInputProps): React__default.JSX.Element;
|
|
252
293
|
interface InputFieldRootProps {
|
|
253
294
|
id?: string;
|
|
254
|
-
flex?: string;
|
|
255
295
|
children?: ReactNode;
|
|
256
296
|
width?: number;
|
|
257
297
|
/** @default end */
|
|
258
298
|
labelPosition?: LabelPosition;
|
|
259
299
|
labelSize?: number;
|
|
260
|
-
hasDropdown?: boolean;
|
|
261
300
|
/** @default medium */
|
|
262
301
|
size?: InputFieldSize;
|
|
263
302
|
renderPopoverContent?: (options: {
|
|
264
303
|
width: number;
|
|
265
304
|
}) => ReactNode;
|
|
305
|
+
/**
|
|
306
|
+
* if there is a popover, this is the offset from the trigger
|
|
307
|
+
* @default 3
|
|
308
|
+
*/
|
|
309
|
+
sideOffset?: number;
|
|
266
310
|
onFocusChange?: (isFocused: boolean) => void;
|
|
267
311
|
style?: React__default.CSSProperties;
|
|
268
312
|
className?: string;
|
|
269
313
|
}
|
|
270
|
-
declare function InputFieldRoot({ id,
|
|
314
|
+
declare function InputFieldRoot({ id, children, width, labelPosition, sideOffset, labelSize, size, renderPopoverContent, onFocusChange, style, className, }: InputFieldRootProps): React__default.JSX.Element;
|
|
271
315
|
declare namespace InputField {
|
|
272
316
|
const Root: React__default.MemoExoticComponent<typeof InputFieldRoot>;
|
|
273
317
|
const Input: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<InputFieldInputProps & React__default.RefAttributes<HTMLInputElement>>>;
|
|
274
318
|
const Typeahead: React__default.MemoExoticComponent<(props: {
|
|
275
319
|
prefix: string;
|
|
276
320
|
value: string;
|
|
321
|
+
isFocused: boolean;
|
|
277
322
|
}) => React__default.JSX.Element>;
|
|
278
323
|
const NumberInput: React__default.MemoExoticComponent<typeof InputFieldNumberInput>;
|
|
279
324
|
const DropdownMenu: <T extends string>(props: InputFieldDropdownProps<T>) => React__default.ReactElement | null;
|
|
280
|
-
const Button: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<React__default.ButtonHTMLAttributes<HTMLButtonElement> &
|
|
325
|
+
const Button: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
326
|
+
buttonClassName?: string;
|
|
327
|
+
variant?: "floating" | "normal";
|
|
328
|
+
} & React__default.RefAttributes<HTMLButtonElement>>>;
|
|
281
329
|
const Label: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<React__default.LabelHTMLAttributes<HTMLLabelElement> & React__default.RefAttributes<HTMLLabelElement>>>;
|
|
282
330
|
const PrimitiveElement: ({ readOnly, disabled, className, style, ...props }: {
|
|
283
331
|
readOnly?: boolean;
|
|
@@ -285,30 +333,60 @@ declare namespace InputField {
|
|
|
285
333
|
} & React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => React__default.JSX.Element;
|
|
286
334
|
}
|
|
287
335
|
|
|
336
|
+
type ComboboxProps = {
|
|
337
|
+
id?: string;
|
|
338
|
+
loading?: boolean;
|
|
339
|
+
initialValue?: string;
|
|
340
|
+
placeholder?: string;
|
|
341
|
+
items: ComboboxItem[];
|
|
342
|
+
onChange?: (value: string) => void;
|
|
343
|
+
onHoverItem?: (item: ComboboxOption | undefined) => void;
|
|
344
|
+
onSelectItem?: (item: ComboboxOption) => void;
|
|
345
|
+
onFocus?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
346
|
+
onBlur?: (didSubmit: boolean, value: string) => void;
|
|
347
|
+
onDeleteWhenEmpty?: () => void;
|
|
348
|
+
size?: InputFieldSize;
|
|
349
|
+
style?: React__default.CSSProperties;
|
|
350
|
+
className?: string;
|
|
351
|
+
label?: React__default.ReactNode;
|
|
352
|
+
children?: React__default.ReactNode;
|
|
353
|
+
hideMenuWhenEmptyValue?: boolean;
|
|
354
|
+
allowArbitraryValues?: boolean;
|
|
355
|
+
readOnly?: boolean;
|
|
356
|
+
tabBehavior?: "autocomplete" | "select";
|
|
357
|
+
openMenuBehavior?: "showAllItems" | "showFilteredItems";
|
|
358
|
+
};
|
|
359
|
+
interface ComboboxRef {
|
|
360
|
+
focus(): void;
|
|
361
|
+
setValue(value: string): void;
|
|
362
|
+
selectAllInputText(): void;
|
|
363
|
+
}
|
|
364
|
+
declare const Combobox: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ComboboxProps & React__default.RefAttributes<ComboboxRef>>>;
|
|
365
|
+
|
|
288
366
|
type RelativeDropPosition = "above" | "below" | "inside";
|
|
289
367
|
type DropValidator = (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => boolean;
|
|
290
368
|
declare const normalizeListDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
291
369
|
type UseSortableReturnType = ReturnType<typeof useSortable>;
|
|
292
|
-
interface ItemProps$
|
|
370
|
+
interface ItemProps$1<T> {
|
|
293
371
|
id: string;
|
|
294
372
|
disabled?: boolean;
|
|
295
373
|
children: (props: {
|
|
296
|
-
ref: Ref<T>;
|
|
374
|
+
ref: React.Ref<T>;
|
|
297
375
|
relativeDropPosition?: RelativeDropPosition;
|
|
298
376
|
[key: string]: any;
|
|
299
377
|
} & UseSortableReturnType["attributes"]) => JSX.Element;
|
|
300
378
|
}
|
|
301
379
|
interface RootProps {
|
|
302
380
|
keys: string[];
|
|
303
|
-
children: ReactNode;
|
|
304
|
-
renderOverlay?: (index: number) => ReactNode;
|
|
381
|
+
children: React.ReactNode;
|
|
382
|
+
renderOverlay?: (index: number) => React.ReactNode;
|
|
305
383
|
onMoveItem?: (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => void;
|
|
306
384
|
acceptsDrop?: DropValidator;
|
|
307
385
|
axis?: "x" | "y";
|
|
308
386
|
}
|
|
309
387
|
declare namespace Sortable {
|
|
310
|
-
const Item: <T extends HTMLElement>(props: ItemProps$
|
|
311
|
-
const Root: (props: RootProps) =>
|
|
388
|
+
const Item: <T extends HTMLElement>(props: ItemProps$1<T>) => React.ReactElement | null;
|
|
389
|
+
const Root: (props: RootProps) => React.ReactElement | null;
|
|
312
390
|
}
|
|
313
391
|
|
|
314
392
|
type ListRowMarginType = "none" | "top" | "bottom" | "vertical";
|
|
@@ -435,40 +513,15 @@ declare namespace ListView {
|
|
|
435
513
|
const normalizeDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
436
514
|
}
|
|
437
515
|
|
|
438
|
-
interface
|
|
439
|
-
items:
|
|
516
|
+
interface ComboboxMenuProps {
|
|
517
|
+
items: InternalComboboxItem[];
|
|
440
518
|
selectedIndex: number;
|
|
441
|
-
onSelectItem: (item:
|
|
519
|
+
onSelectItem: (item: InternalComboboxItem) => void;
|
|
442
520
|
onHoverIndex: (index: number) => void;
|
|
443
521
|
listSize: Size;
|
|
444
|
-
}
|
|
445
|
-
declare const CompletionMenu: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<CompletionMenuProps & React__default.RefAttributes<IVirtualizedList>>>;
|
|
446
|
-
type InputFieldWithCompletionsProps = {
|
|
447
|
-
id?: string;
|
|
448
|
-
loading?: boolean;
|
|
449
|
-
initialValue?: string;
|
|
450
|
-
placeholder?: string;
|
|
451
|
-
items: (CompletionItem | CompletionSectionHeader)[];
|
|
452
|
-
onChange?: (value: string) => void;
|
|
453
|
-
onHoverItem?: (item: CompletionItem | undefined) => void;
|
|
454
|
-
onSelectItem?: (item: CompletionItem) => void;
|
|
455
|
-
onFocus?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
456
|
-
onBlur?: (didSubmit: boolean, value: string) => void;
|
|
457
|
-
onDeleteWhenEmpty?: () => void;
|
|
458
|
-
size?: InputFieldSize;
|
|
459
522
|
style?: React__default.CSSProperties;
|
|
460
|
-
className?: string;
|
|
461
|
-
label?: React__default.ReactNode;
|
|
462
|
-
children?: React__default.ReactNode;
|
|
463
|
-
hideChildrenWhenFocused?: boolean;
|
|
464
|
-
hideMenuWhenEmptyValue?: boolean;
|
|
465
|
-
};
|
|
466
|
-
interface InputFieldWithCompletionsRef {
|
|
467
|
-
focus(): void;
|
|
468
|
-
setValue(value: string): void;
|
|
469
|
-
selectAllInputText(): void;
|
|
470
523
|
}
|
|
471
|
-
declare const
|
|
524
|
+
declare const ComboboxMenu: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ComboboxMenuProps & React__default.RefAttributes<IVirtualizedList>>>;
|
|
472
525
|
|
|
473
526
|
interface MenuItemProps<T extends string> {
|
|
474
527
|
value?: T;
|
|
@@ -495,7 +548,7 @@ declare const StyledContent: React__default.ForwardRefExoticComponent<Omit<Dialo
|
|
|
495
548
|
interface IDialog {
|
|
496
549
|
containsElement: (element: HTMLElement) => boolean;
|
|
497
550
|
}
|
|
498
|
-
interface Props$
|
|
551
|
+
interface Props$c {
|
|
499
552
|
title?: ReactNode;
|
|
500
553
|
description?: ReactNode;
|
|
501
554
|
children?: ReactNode;
|
|
@@ -504,10 +557,11 @@ interface Props$d {
|
|
|
504
557
|
onOpenChange?: ComponentProps<typeof DialogPrimitive.Root>["onOpenChange"];
|
|
505
558
|
onOpenAutoFocus?: ComponentProps<typeof DialogPrimitive.Content>["onOpenAutoFocus"];
|
|
506
559
|
closeOnInteractOutside?: boolean;
|
|
560
|
+
showCloseButton?: boolean;
|
|
507
561
|
className?: string;
|
|
508
562
|
}
|
|
509
|
-
declare const Dialog: React__default.ForwardRefExoticComponent<Props$
|
|
510
|
-
declare const FullscreenDialog: React__default.ForwardRefExoticComponent<Props$
|
|
563
|
+
declare const Dialog: React__default.ForwardRefExoticComponent<Props$c & React__default.RefAttributes<IDialog>>;
|
|
564
|
+
declare const FullscreenDialog: React__default.ForwardRefExoticComponent<Props$c & React__default.RefAttributes<IDialog>>;
|
|
511
565
|
|
|
512
566
|
type DividerVariant = "normal" | "subtle" | "strong";
|
|
513
567
|
interface DividerProps {
|
|
@@ -545,21 +599,21 @@ type SketchPattern = {
|
|
|
545
599
|
patternTileScale: number;
|
|
546
600
|
};
|
|
547
601
|
|
|
548
|
-
interface Props$
|
|
602
|
+
interface Props$b {
|
|
549
603
|
id?: string;
|
|
550
604
|
value?: Sketch.Color | Sketch.Gradient | SketchPattern;
|
|
551
605
|
}
|
|
552
|
-
declare const FillInputField: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$
|
|
606
|
+
declare const FillInputField: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$b & React__default.RefAttributes<HTMLButtonElement>>>;
|
|
553
607
|
|
|
554
|
-
declare const PatternPreviewBackground:
|
|
608
|
+
declare const PatternPreviewBackground: React.NamedExoticComponent<{
|
|
555
609
|
fillType: Sketch.PatternFillType;
|
|
556
610
|
tileScale: number;
|
|
557
611
|
imageRef: string;
|
|
558
612
|
}>;
|
|
559
|
-
interface Props$
|
|
613
|
+
interface Props$a {
|
|
560
614
|
value?: Sketch.Color | Sketch.Gradient | SketchPattern;
|
|
561
615
|
}
|
|
562
|
-
declare const FillPreviewBackground:
|
|
616
|
+
declare const FillPreviewBackground: React.NamedExoticComponent<Props$a>;
|
|
563
617
|
|
|
564
618
|
interface FloatingWindowProps {
|
|
565
619
|
title?: string;
|
|
@@ -580,7 +634,7 @@ interface FloatingWindowProps {
|
|
|
580
634
|
}
|
|
581
635
|
declare const FloatingWindow: React__default.FC<FloatingWindowProps>;
|
|
582
636
|
|
|
583
|
-
interface Props$
|
|
637
|
+
interface Props$9 {
|
|
584
638
|
value: Sketch.GradientStop[];
|
|
585
639
|
selectedStop: number;
|
|
586
640
|
onChangeColor: (color: Sketch.Color) => void;
|
|
@@ -589,10 +643,10 @@ interface Props$a {
|
|
|
589
643
|
onDelete: () => void;
|
|
590
644
|
onSelectStop: (index: number) => void;
|
|
591
645
|
}
|
|
592
|
-
declare const GradientPicker:
|
|
646
|
+
declare const GradientPicker: React.NamedExoticComponent<Props$9>;
|
|
593
647
|
|
|
594
648
|
type GridViewSize = "xxs" | "xs" | "small" | "medium" | "large" | "xl";
|
|
595
|
-
interface ItemProps
|
|
649
|
+
interface ItemProps<MenuItemType extends string = string> {
|
|
596
650
|
id: string;
|
|
597
651
|
title?: ReactNode;
|
|
598
652
|
subtitle?: ReactNode;
|
|
@@ -629,19 +683,19 @@ declare function GridViewSectionHeader({ title }: {
|
|
|
629
683
|
}): React__default.JSX.Element;
|
|
630
684
|
declare namespace GridView {
|
|
631
685
|
const Root: React__default.MemoExoticComponent<typeof GridViewRoot>;
|
|
632
|
-
const Item: React__default.MemoExoticComponent<(<MenuItemType extends string>(props: ItemProps
|
|
686
|
+
const Item: React__default.MemoExoticComponent<(<MenuItemType extends string>(props: ItemProps<MenuItemType> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null)>;
|
|
633
687
|
const Section: React__default.MemoExoticComponent<typeof GridViewSection>;
|
|
634
688
|
const SectionHeader: React__default.MemoExoticComponent<typeof GridViewSectionHeader>;
|
|
635
689
|
}
|
|
636
690
|
|
|
637
|
-
declare const IconButton:
|
|
691
|
+
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<ButtonRootProps, "size" | "children" | "variant" | "flex"> & {
|
|
638
692
|
iconName: IconName;
|
|
639
693
|
className?: string;
|
|
640
|
-
style?: CSSProperties;
|
|
694
|
+
style?: React.CSSProperties;
|
|
641
695
|
selected?: boolean;
|
|
642
696
|
color?: string;
|
|
643
697
|
size?: number;
|
|
644
|
-
} &
|
|
698
|
+
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
645
699
|
|
|
646
700
|
declare const InspectorContainer: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
|
|
647
701
|
header?: React__default.ReactNode;
|
|
@@ -653,21 +707,30 @@ declare const InspectorContainer: React__default.MemoExoticComponent<React__defa
|
|
|
653
707
|
style?: React__default.CSSProperties;
|
|
654
708
|
} & React__default.RefAttributes<HTMLDivElement>>>;
|
|
655
709
|
|
|
656
|
-
interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
710
|
+
interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
657
711
|
}
|
|
658
|
-
declare const Label:
|
|
712
|
+
declare const Label: React.MemoExoticComponent<React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>>;
|
|
659
713
|
|
|
660
714
|
interface ContainerProps {
|
|
661
|
-
children: ReactNode;
|
|
715
|
+
children: React.ReactNode;
|
|
662
716
|
renderLabel: (provided: {
|
|
663
717
|
id: string;
|
|
664
718
|
index: number;
|
|
665
|
-
}) => ReactNode;
|
|
719
|
+
}) => React.ReactNode;
|
|
666
720
|
}
|
|
667
|
-
declare const LabeledElementView:
|
|
721
|
+
declare const LabeledElementView: React.NamedExoticComponent<ContainerProps>;
|
|
722
|
+
|
|
723
|
+
type MessageProps = {
|
|
724
|
+
role: "user" | "assistant" | "system" | "data";
|
|
725
|
+
children?: React__default.ReactNode;
|
|
726
|
+
user?: MultiplayerUser;
|
|
727
|
+
/** @default 27 */
|
|
728
|
+
avatarSize?: number;
|
|
729
|
+
};
|
|
730
|
+
declare const Message: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<MessageProps & React__default.RefAttributes<HTMLDivElement>>>;
|
|
668
731
|
|
|
669
732
|
type PopoverVariant = "normal" | "large";
|
|
670
|
-
interface Props$
|
|
733
|
+
interface Props$8 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content"]>, "onOpenAutoFocus" | "onCloseAutoFocus" | "onPointerDownOutside" | "onInteractOutside" | "onFocusOutside" | "side"> {
|
|
671
734
|
children: React__default.ReactNode;
|
|
672
735
|
trigger: React__default.ReactNode;
|
|
673
736
|
variant?: PopoverVariant;
|
|
@@ -678,41 +741,40 @@ interface Props$9 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content
|
|
|
678
741
|
onClickClose?: () => void;
|
|
679
742
|
showArrow?: boolean;
|
|
680
743
|
}
|
|
681
|
-
declare function Popover({ children, trigger, variant, closable, open, side, sideOffset, showArrow, onOpenChange, onOpenAutoFocus, onCloseAutoFocus, onPointerDownOutside, onInteractOutside, onFocusOutside, onClickClose, }: Props$
|
|
744
|
+
declare function Popover({ children, trigger, variant, closable, open, side, sideOffset, showArrow, onOpenChange, onOpenAutoFocus, onCloseAutoFocus, onPointerDownOutside, onInteractOutside, onFocusOutside, onClickClose, }: Props$8): React__default.JSX.Element;
|
|
682
745
|
|
|
683
746
|
type ProgressVariant = "normal" | "warning" | "primary" | "secondary";
|
|
684
747
|
declare function Progress({ value, variant, className, }: {
|
|
685
748
|
value: number;
|
|
686
749
|
variant?: ProgressVariant;
|
|
687
750
|
className?: string;
|
|
688
|
-
}):
|
|
751
|
+
}): React.JSX.Element;
|
|
689
752
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
value: string;
|
|
693
|
-
tooltip?: ReactNode;
|
|
694
|
-
children: ReactNode;
|
|
695
|
-
disabled?: boolean;
|
|
753
|
+
interface Props$7 {
|
|
754
|
+
children?: React.ReactNode | ((scrollElementRef: HTMLDivElement) => React.ReactNode);
|
|
696
755
|
}
|
|
697
|
-
|
|
756
|
+
declare const ScrollArea: React.NamedExoticComponent<Props$7>;
|
|
757
|
+
|
|
758
|
+
type SegmentedControlColorScheme = "primary" | "secondary";
|
|
759
|
+
interface SegmentedControlProps<T extends string> {
|
|
698
760
|
id?: string;
|
|
699
|
-
value?:
|
|
700
|
-
onValueChange?: (value:
|
|
761
|
+
value?: T;
|
|
762
|
+
onValueChange?: (value: T) => void;
|
|
701
763
|
/** @default primary */
|
|
702
|
-
colorScheme?:
|
|
764
|
+
colorScheme?: SegmentedControlColorScheme;
|
|
703
765
|
allowEmpty?: boolean;
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
const Root: React__default.MemoExoticComponent<typeof ToggleGroupRoot>;
|
|
709
|
-
const Item: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ItemProps & React__default.RefAttributes<HTMLButtonElement>>>;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
interface Props$7 {
|
|
713
|
-
children?: ReactNode | ((scrollElementRef: HTMLDivElement) => ReactNode);
|
|
766
|
+
separator?: boolean;
|
|
767
|
+
items: SegmentedControlItemProps<T>[];
|
|
768
|
+
className?: string;
|
|
769
|
+
style?: React__default.CSSProperties;
|
|
714
770
|
}
|
|
715
|
-
|
|
771
|
+
type SegmentedControlItemProps<T extends string> = {
|
|
772
|
+
title?: ReactNode;
|
|
773
|
+
className?: string;
|
|
774
|
+
style?: React__default.CSSProperties;
|
|
775
|
+
tooltip?: ReactNode;
|
|
776
|
+
} & Pick<RegularMenuItem<T>, "value" | "disabled" | "icon" | "role">;
|
|
777
|
+
declare const SegmentedControl: React__default.MemoExoticComponent<(<T extends string>({ id, value, onValueChange, colorScheme, allowEmpty, items, separator, className, style, }: SegmentedControlProps<T>) => React__default.JSX.Element)>;
|
|
716
778
|
|
|
717
779
|
type Props$6<T extends string> = {
|
|
718
780
|
id?: string;
|
|
@@ -727,7 +789,8 @@ type Props$6<T extends string> = {
|
|
|
727
789
|
label?: React__default.ReactNode;
|
|
728
790
|
onFocus?: FocusEventHandler;
|
|
729
791
|
onBlur?: FocusEventHandler;
|
|
730
|
-
} & Pick<SelectProps, "open">;
|
|
792
|
+
} & Pick<SelectProps, "open" | "onOpenChange">;
|
|
793
|
+
declare const labelTextStyles = "font-sans text-label uppercase text-text-disabled leading-[19px] font-bold text-[60%]";
|
|
731
794
|
declare const SelectMenu: <T extends string = string>(props: Props$6<T>) => React__default.ReactElement | null;
|
|
732
795
|
|
|
733
796
|
type ColorScheme = "primary" | "secondary";
|
|
@@ -744,6 +807,7 @@ interface Props$5 {
|
|
|
744
807
|
label?: React__default.ReactNode;
|
|
745
808
|
onFocus?: FocusEventHandler;
|
|
746
809
|
onBlur?: FocusEventHandler;
|
|
810
|
+
readOnly?: boolean;
|
|
747
811
|
}
|
|
748
812
|
declare const Slider: React__default.NamedExoticComponent<Props$5>;
|
|
749
813
|
|
|
@@ -752,11 +816,11 @@ interface Props$4 {
|
|
|
752
816
|
inline?: boolean;
|
|
753
817
|
}
|
|
754
818
|
declare namespace Spacer {
|
|
755
|
-
const Vertical:
|
|
756
|
-
const Horizontal:
|
|
819
|
+
const Vertical: React.ForwardRefExoticComponent<Props$4 & React.RefAttributes<HTMLSpanElement>>;
|
|
820
|
+
const Horizontal: React.ForwardRefExoticComponent<Props$4 & React.RefAttributes<HTMLSpanElement>>;
|
|
757
821
|
}
|
|
758
822
|
|
|
759
|
-
type SwitchColorScheme = "
|
|
823
|
+
type SwitchColorScheme = "primary" | "secondary";
|
|
760
824
|
interface Props$3 {
|
|
761
825
|
id?: string;
|
|
762
826
|
value: boolean;
|
|
@@ -764,12 +828,12 @@ interface Props$3 {
|
|
|
764
828
|
/** @default normal */
|
|
765
829
|
colorScheme?: SwitchColorScheme;
|
|
766
830
|
disabled?: boolean;
|
|
767
|
-
onFocus?: FocusEventHandler;
|
|
768
|
-
onBlur?: FocusEventHandler;
|
|
831
|
+
onFocus?: React.FocusEventHandler;
|
|
832
|
+
onBlur?: React.FocusEventHandler;
|
|
769
833
|
className?: string;
|
|
770
|
-
style?: CSSProperties;
|
|
834
|
+
style?: React.CSSProperties;
|
|
771
835
|
}
|
|
772
|
-
declare const Switch: ({ id, value, onChange, colorScheme, disabled, onFocus, onBlur, style, className, }: Props$3) =>
|
|
836
|
+
declare const Switch: ({ id, value, onChange, colorScheme, disabled, onFocus, onBlur, style, className, }: Props$3) => React.JSX.Element;
|
|
773
837
|
|
|
774
838
|
declare const config: {
|
|
775
839
|
content: string[];
|
|
@@ -815,7 +879,7 @@ declare const config: {
|
|
|
815
879
|
"listview-editing-background": string;
|
|
816
880
|
"slider-thumb-background": string;
|
|
817
881
|
"slider-border": string;
|
|
818
|
-
"
|
|
882
|
+
"segmented-control-item": string;
|
|
819
883
|
mask: string;
|
|
820
884
|
"transparent-checker": string;
|
|
821
885
|
scrollbar: string;
|
|
@@ -831,7 +895,6 @@ declare const config: {
|
|
|
831
895
|
icon: string;
|
|
832
896
|
"icon-selected": string;
|
|
833
897
|
warning: string;
|
|
834
|
-
"radio-group-item": string;
|
|
835
898
|
dot: string;
|
|
836
899
|
"row-highlight": string;
|
|
837
900
|
"table-row-background": string;
|
|
@@ -982,7 +1045,7 @@ declare const cssVars: {
|
|
|
982
1045
|
listviewEditingBackground: string;
|
|
983
1046
|
sliderThumbBackground: string;
|
|
984
1047
|
sliderBorder: string;
|
|
985
|
-
|
|
1048
|
+
segmentedControlItem: string;
|
|
986
1049
|
mask: string;
|
|
987
1050
|
transparentChecker: string;
|
|
988
1051
|
scrollbar: string;
|
|
@@ -998,7 +1061,6 @@ declare const cssVars: {
|
|
|
998
1061
|
icon: string;
|
|
999
1062
|
iconSelected: string;
|
|
1000
1063
|
warning: string;
|
|
1001
|
-
radioGroupItem: string;
|
|
1002
1064
|
dot: string;
|
|
1003
1065
|
rowHighlight: string;
|
|
1004
1066
|
tableRowBackground: string;
|
|
@@ -1140,6 +1202,8 @@ declare const useAutoResize: (value: string) => React__default.MutableRefObject<
|
|
|
1140
1202
|
declare const AutoResizingTextArea: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
|
|
1141
1203
|
onChangeText: (value: string) => void;
|
|
1142
1204
|
value?: string;
|
|
1205
|
+
end?: React__default.ReactNode;
|
|
1206
|
+
endClassName?: string;
|
|
1143
1207
|
} & React__default.TextareaHTMLAttributes<HTMLTextAreaElement> & React__default.RefAttributes<HTMLTextAreaElement>>>;
|
|
1144
1208
|
|
|
1145
1209
|
declare const Toast: ({ title, content, children, ...props }: {
|
|
@@ -1152,10 +1216,10 @@ declare const ToastProvider: ({ children }: {
|
|
|
1152
1216
|
}) => React__default.JSX.Element;
|
|
1153
1217
|
|
|
1154
1218
|
interface Props$2 {
|
|
1155
|
-
children: ReactNode;
|
|
1156
|
-
content: ReactNode;
|
|
1219
|
+
children: React.ReactNode;
|
|
1220
|
+
content: React.ReactNode;
|
|
1157
1221
|
}
|
|
1158
|
-
declare const Tooltip:
|
|
1222
|
+
declare const Tooltip: React.NamedExoticComponent<Props$2>;
|
|
1159
1223
|
|
|
1160
1224
|
type TreeRowBaseProps = {
|
|
1161
1225
|
icon?: Exclude<ReactNode, string> | IconName;
|
|
@@ -1268,8 +1332,8 @@ declare const WorkspaceLayout: React__default.ForwardRefExoticComponent<Props$1
|
|
|
1268
1332
|
type DesignSystemConfigurationContextValue = {
|
|
1269
1333
|
platform: PlatformName;
|
|
1270
1334
|
};
|
|
1271
|
-
declare const DesignSystemConfigurationProvider:
|
|
1272
|
-
children: ReactNode;
|
|
1335
|
+
declare const DesignSystemConfigurationProvider: React.NamedExoticComponent<{
|
|
1336
|
+
children: React.ReactNode;
|
|
1273
1337
|
platform?: PlatformName;
|
|
1274
1338
|
}>;
|
|
1275
1339
|
declare function useDesignSystemConfiguration(): DesignSystemConfigurationContextValue;
|
|
@@ -1281,6 +1345,10 @@ type DialogContextValue = {
|
|
|
1281
1345
|
placeholder?: string;
|
|
1282
1346
|
initialValue?: string;
|
|
1283
1347
|
}): Promise<string | undefined>;
|
|
1348
|
+
openConfirmationDialog(options: string | {
|
|
1349
|
+
title: string;
|
|
1350
|
+
description?: ReactNode;
|
|
1351
|
+
}): Promise<boolean>;
|
|
1284
1352
|
containsElement(element: HTMLElement): boolean;
|
|
1285
1353
|
};
|
|
1286
1354
|
declare const DialogProvider: ({ children, }: {
|
|
@@ -1293,6 +1361,10 @@ declare function useOpenInputDialog(): (options: string | {
|
|
|
1293
1361
|
initialValue?: string;
|
|
1294
1362
|
}) => Promise<string | undefined>;
|
|
1295
1363
|
declare function useDialogContainsElement(): (element: HTMLElement) => boolean;
|
|
1364
|
+
declare function useOpenConfirmationDialog(): (options: string | {
|
|
1365
|
+
title: string;
|
|
1366
|
+
description?: ReactNode;
|
|
1367
|
+
}) => Promise<boolean>;
|
|
1296
1368
|
|
|
1297
1369
|
type FloatingWindowContextValue = {
|
|
1298
1370
|
createWindow: (element: React__default.ReactNode) => string;
|
|
@@ -1327,8 +1399,8 @@ declare function useGlobalInputBlurTrigger(): () => void;
|
|
|
1327
1399
|
type ImageDataContextValue = {
|
|
1328
1400
|
getImageData: (ref: string) => ArrayBuffer | undefined;
|
|
1329
1401
|
};
|
|
1330
|
-
declare const ImageDataProvider:
|
|
1331
|
-
children: ReactNode;
|
|
1402
|
+
declare const ImageDataProvider: React.NamedExoticComponent<{
|
|
1403
|
+
children: React.ReactNode;
|
|
1332
1404
|
getImageData?: (ref: string) => ArrayBuffer | undefined;
|
|
1333
1405
|
}>;
|
|
1334
1406
|
declare function useImageData(ref: string): ArrayBuffer | undefined;
|
|
@@ -1429,7 +1501,7 @@ interface Props {
|
|
|
1429
1501
|
disabled?: boolean;
|
|
1430
1502
|
trigger?: "change" | "submit";
|
|
1431
1503
|
}
|
|
1432
|
-
declare const DimensionInput:
|
|
1504
|
+
declare const DimensionInput: React.NamedExoticComponent<Props>;
|
|
1433
1505
|
|
|
1434
1506
|
declare const Section: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1435
1507
|
declare const SectionHeader: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -1471,4 +1543,28 @@ declare namespace InspectorPrimitives {
|
|
|
1471
1543
|
export { InspectorPrimitives_Checkbox as Checkbox, InspectorPrimitives_Column as Column, InspectorPrimitives_HorizontalSeparator as HorizontalSeparator, InspectorPrimitives_LabeledRow as LabeledRow, InspectorPrimitives_Row as Row, InspectorPrimitives_RowLabel as RowLabel, InspectorPrimitives_Section as Section, InspectorPrimitives_SectionHeader as SectionHeader, InspectorPrimitives_Text as Text, InspectorPrimitives_Title as Title, InspectorPrimitives_VerticalSeparator as VerticalSeparator };
|
|
1472
1544
|
}
|
|
1473
1545
|
|
|
1474
|
-
|
|
1546
|
+
interface BaseToolbarProps {
|
|
1547
|
+
children?: React__default.ReactNode;
|
|
1548
|
+
left?: React__default.ReactNode;
|
|
1549
|
+
right?: React__default.ReactNode;
|
|
1550
|
+
logo?: React__default.ReactNode;
|
|
1551
|
+
showDivider?: boolean;
|
|
1552
|
+
}
|
|
1553
|
+
declare function BaseToolbar({ children, left, right, logo, showDivider, }: BaseToolbarProps): React__default.JSX.Element;
|
|
1554
|
+
|
|
1555
|
+
interface ToolbarProps<T extends string = string> {
|
|
1556
|
+
children?: React__default.ReactNode;
|
|
1557
|
+
logo?: React__default.ReactNode;
|
|
1558
|
+
leftMenuItems?: MenuItem<T>[];
|
|
1559
|
+
rightMenuItems?: MenuItem<T>[];
|
|
1560
|
+
onSelectMenuItem?: (value: T) => void;
|
|
1561
|
+
/** Whether to bind keyboard shortcuts for menu items. @default true */
|
|
1562
|
+
shouldBindKeyboardShortcuts?: boolean;
|
|
1563
|
+
}
|
|
1564
|
+
declare function Toolbar<T extends string = string>({ children, logo, leftMenuItems, rightMenuItems, onSelectMenuItem, shouldBindKeyboardShortcuts, }: ToolbarProps<T>): React__default.JSX.Element;
|
|
1565
|
+
declare function ToolbarMenu<T extends string>({ items, onSelectMenuItem, }: {
|
|
1566
|
+
items: MenuItem<T>[];
|
|
1567
|
+
onSelectMenuItem?: (value: T) => void;
|
|
1568
|
+
}): React__default.JSX.Element;
|
|
1569
|
+
|
|
1570
|
+
export { ActivityIndicator, AnimatePresence, type AnimatePresenceProps, AutoResizingTextArea, Avatar, type AvatarProps, AvatarStack, BaseToolbar, type BaseToolbarProps, Body, Button, type ButtonRootProps, CONTENT_AREA_ID, Checkbox$1 as Checkbox, Chip, type ChipProps, Combobox, type ComboboxItem, ComboboxMenu, type ComboboxOption, type ComboboxProps, type ComboboxRef, type ComboboxSectionHeader, ComboboxState, type ComboboxStateSnapshot, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, type DropValidator, DropdownMenu, EDITOR_PANEL_GROUP_ID, type EditableRowProps, type ExtractMenuItemType, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IScoredItem, type IToken, type IVirtualizedList, type IWorkspaceLayout, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, InputField, type InputFieldInputProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, type InternalComboboxItem, Italic, KeyboardShortcut, LEFT_SIDEBAR_ID, Label, LabeledElementView, type ListRowMarginType, type ListRowPosition, ListView, type MatchRange, type MenuConfig, type MenuItem, type MenuItemProps, type MenuProps, Message, type MessageProps, type Optional, type PanelLayoutState, PatternPreviewBackground, Popover, Progress, RIGHT_SIDEBAR_ID, type RegularMenuItem, type RelativeDropPosition, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SetNumberMode, type SketchPattern, Slider, Small, Sortable, Spacer, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, Toolbar, ToolbarMenu, type ToolbarProps, Tooltip, TreeView, type UseThemeReturnType, UserPointer, type UserPointerProps, WorkspaceLayout, colorForStringValues, colorFromString, createSectionedMenu, cssVars, cx, fuzzyFilter, fuzzyScore, fuzzyTokenize, getGradientBackground, getKeyboardShortcutsForMenuItems, getNewValue, labelTextStyles, mediaQuery, normalizeListDestinationIndex, renderIcon, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, textStyles, useAutoResize, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenConfirmationDialog, useOpenInputDialog, usePlatform, usePlatformModKey, usePreservePanelSize, useTheme, withSeparatorElements };
|