@noya-app/noya-designsystem 0.1.41 → 0.1.43
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 +268 -147
- package/dist/index.d.ts +268 -147
- package/dist/index.js +7618 -6908
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6161 -5487
- 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 +327 -337
- 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 +59 -12
- package/src/components/Toolbar.tsx +129 -0
- package/src/components/Tooltip.tsx +10 -7
- package/src/components/WorkspaceLayout.tsx +145 -152
- 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,75 @@ declare namespace InputField {
|
|
|
285
333
|
} & React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => React__default.JSX.Element;
|
|
286
334
|
}
|
|
287
335
|
|
|
336
|
+
type BaseComboboxProps = {
|
|
337
|
+
id?: string;
|
|
338
|
+
loading?: boolean;
|
|
339
|
+
placeholder?: string;
|
|
340
|
+
items: ComboboxItem[];
|
|
341
|
+
onFocus?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
342
|
+
onDeleteWhenEmpty?: () => void;
|
|
343
|
+
size?: InputFieldSize;
|
|
344
|
+
style?: React__default.CSSProperties;
|
|
345
|
+
className?: string;
|
|
346
|
+
label?: React__default.ReactNode;
|
|
347
|
+
children?: React__default.ReactNode;
|
|
348
|
+
hideMenuWhenEmptyValue?: boolean;
|
|
349
|
+
readOnly?: boolean;
|
|
350
|
+
tabBehavior?: "autocomplete" | "select";
|
|
351
|
+
openMenuBehavior?: "showAllItems" | "showFilteredItems";
|
|
352
|
+
};
|
|
353
|
+
type StringModeOnlyProps = {
|
|
354
|
+
mode: "string";
|
|
355
|
+
initialValue?: string;
|
|
356
|
+
onChange?: (value: string) => void;
|
|
357
|
+
onSelectItem?: (value: string) => void;
|
|
358
|
+
onBlur?: (didSubmit: boolean, value: string) => void;
|
|
359
|
+
onHoverItem?: (value: string | undefined) => void;
|
|
360
|
+
allowArbitraryValues?: boolean;
|
|
361
|
+
};
|
|
362
|
+
type StringModeProps = BaseComboboxProps & StringModeOnlyProps;
|
|
363
|
+
type OptionModeOnlyProps = {
|
|
364
|
+
mode?: "option";
|
|
365
|
+
initialValue?: ComboboxOption;
|
|
366
|
+
onChange?: (value: ComboboxOption) => void;
|
|
367
|
+
onSelectItem?: (value: ComboboxOption) => void;
|
|
368
|
+
onBlur?: (didSubmit: boolean, value: ComboboxOption) => void;
|
|
369
|
+
onHoverItem?: (value: ComboboxOption | undefined) => void;
|
|
370
|
+
allowArbitraryValues?: false;
|
|
371
|
+
};
|
|
372
|
+
type OptionModeProps = BaseComboboxProps & OptionModeOnlyProps;
|
|
373
|
+
type ComboboxProps = StringModeProps | OptionModeProps;
|
|
374
|
+
interface ComboboxRef {
|
|
375
|
+
focus(): void;
|
|
376
|
+
setValue(value: string | ComboboxOption): void;
|
|
377
|
+
selectAllInputText(): void;
|
|
378
|
+
}
|
|
379
|
+
declare const Combobox: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ComboboxProps & React__default.RefAttributes<ComboboxRef>>>;
|
|
380
|
+
|
|
288
381
|
type RelativeDropPosition = "above" | "below" | "inside";
|
|
289
382
|
type DropValidator = (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => boolean;
|
|
290
383
|
declare const normalizeListDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
291
384
|
type UseSortableReturnType = ReturnType<typeof useSortable>;
|
|
292
|
-
interface ItemProps$
|
|
385
|
+
interface ItemProps$1<T> {
|
|
293
386
|
id: string;
|
|
294
387
|
disabled?: boolean;
|
|
295
388
|
children: (props: {
|
|
296
|
-
ref: Ref<T>;
|
|
389
|
+
ref: React.Ref<T>;
|
|
297
390
|
relativeDropPosition?: RelativeDropPosition;
|
|
298
391
|
[key: string]: any;
|
|
299
392
|
} & UseSortableReturnType["attributes"]) => JSX.Element;
|
|
300
393
|
}
|
|
301
394
|
interface RootProps {
|
|
302
395
|
keys: string[];
|
|
303
|
-
children: ReactNode;
|
|
304
|
-
renderOverlay?: (index: number) => ReactNode;
|
|
396
|
+
children: React.ReactNode;
|
|
397
|
+
renderOverlay?: (index: number) => React.ReactNode;
|
|
305
398
|
onMoveItem?: (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => void;
|
|
306
399
|
acceptsDrop?: DropValidator;
|
|
307
400
|
axis?: "x" | "y";
|
|
308
401
|
}
|
|
309
402
|
declare namespace Sortable {
|
|
310
|
-
const Item: <T extends HTMLElement>(props: ItemProps$
|
|
311
|
-
const Root: (props: RootProps) =>
|
|
403
|
+
const Item: <T extends HTMLElement>(props: ItemProps$1<T>) => React.ReactElement | null;
|
|
404
|
+
const Root: (props: RootProps) => React.ReactElement | null;
|
|
312
405
|
}
|
|
313
406
|
|
|
314
407
|
type ListRowMarginType = "none" | "top" | "bottom" | "vertical";
|
|
@@ -435,40 +528,15 @@ declare namespace ListView {
|
|
|
435
528
|
const normalizeDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
436
529
|
}
|
|
437
530
|
|
|
438
|
-
interface
|
|
439
|
-
items:
|
|
531
|
+
interface ComboboxMenuProps {
|
|
532
|
+
items: InternalComboboxItem[];
|
|
440
533
|
selectedIndex: number;
|
|
441
|
-
onSelectItem: (item:
|
|
534
|
+
onSelectItem: (item: InternalComboboxItem) => void;
|
|
442
535
|
onHoverIndex: (index: number) => void;
|
|
443
536
|
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
537
|
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
538
|
}
|
|
471
|
-
declare const
|
|
539
|
+
declare const ComboboxMenu: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ComboboxMenuProps & React__default.RefAttributes<IVirtualizedList>>>;
|
|
472
540
|
|
|
473
541
|
interface MenuItemProps<T extends string> {
|
|
474
542
|
value?: T;
|
|
@@ -495,7 +563,7 @@ declare const StyledContent: React__default.ForwardRefExoticComponent<Omit<Dialo
|
|
|
495
563
|
interface IDialog {
|
|
496
564
|
containsElement: (element: HTMLElement) => boolean;
|
|
497
565
|
}
|
|
498
|
-
interface Props$
|
|
566
|
+
interface Props$c {
|
|
499
567
|
title?: ReactNode;
|
|
500
568
|
description?: ReactNode;
|
|
501
569
|
children?: ReactNode;
|
|
@@ -504,10 +572,11 @@ interface Props$d {
|
|
|
504
572
|
onOpenChange?: ComponentProps<typeof DialogPrimitive.Root>["onOpenChange"];
|
|
505
573
|
onOpenAutoFocus?: ComponentProps<typeof DialogPrimitive.Content>["onOpenAutoFocus"];
|
|
506
574
|
closeOnInteractOutside?: boolean;
|
|
575
|
+
showCloseButton?: boolean;
|
|
507
576
|
className?: string;
|
|
508
577
|
}
|
|
509
|
-
declare const Dialog: React__default.ForwardRefExoticComponent<Props$
|
|
510
|
-
declare const FullscreenDialog: React__default.ForwardRefExoticComponent<Props$
|
|
578
|
+
declare const Dialog: React__default.ForwardRefExoticComponent<Props$c & React__default.RefAttributes<IDialog>>;
|
|
579
|
+
declare const FullscreenDialog: React__default.ForwardRefExoticComponent<Props$c & React__default.RefAttributes<IDialog>>;
|
|
511
580
|
|
|
512
581
|
type DividerVariant = "normal" | "subtle" | "strong";
|
|
513
582
|
interface DividerProps {
|
|
@@ -545,21 +614,21 @@ type SketchPattern = {
|
|
|
545
614
|
patternTileScale: number;
|
|
546
615
|
};
|
|
547
616
|
|
|
548
|
-
interface Props$
|
|
617
|
+
interface Props$b {
|
|
549
618
|
id?: string;
|
|
550
619
|
value?: Sketch.Color | Sketch.Gradient | SketchPattern;
|
|
551
620
|
}
|
|
552
|
-
declare const FillInputField: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$
|
|
621
|
+
declare const FillInputField: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Props$b & React__default.RefAttributes<HTMLButtonElement>>>;
|
|
553
622
|
|
|
554
|
-
declare const PatternPreviewBackground:
|
|
623
|
+
declare const PatternPreviewBackground: React.NamedExoticComponent<{
|
|
555
624
|
fillType: Sketch.PatternFillType;
|
|
556
625
|
tileScale: number;
|
|
557
626
|
imageRef: string;
|
|
558
627
|
}>;
|
|
559
|
-
interface Props$
|
|
628
|
+
interface Props$a {
|
|
560
629
|
value?: Sketch.Color | Sketch.Gradient | SketchPattern;
|
|
561
630
|
}
|
|
562
|
-
declare const FillPreviewBackground:
|
|
631
|
+
declare const FillPreviewBackground: React.NamedExoticComponent<Props$a>;
|
|
563
632
|
|
|
564
633
|
interface FloatingWindowProps {
|
|
565
634
|
title?: string;
|
|
@@ -580,7 +649,7 @@ interface FloatingWindowProps {
|
|
|
580
649
|
}
|
|
581
650
|
declare const FloatingWindow: React__default.FC<FloatingWindowProps>;
|
|
582
651
|
|
|
583
|
-
interface Props$
|
|
652
|
+
interface Props$9 {
|
|
584
653
|
value: Sketch.GradientStop[];
|
|
585
654
|
selectedStop: number;
|
|
586
655
|
onChangeColor: (color: Sketch.Color) => void;
|
|
@@ -589,10 +658,10 @@ interface Props$a {
|
|
|
589
658
|
onDelete: () => void;
|
|
590
659
|
onSelectStop: (index: number) => void;
|
|
591
660
|
}
|
|
592
|
-
declare const GradientPicker:
|
|
661
|
+
declare const GradientPicker: React.NamedExoticComponent<Props$9>;
|
|
593
662
|
|
|
594
663
|
type GridViewSize = "xxs" | "xs" | "small" | "medium" | "large" | "xl";
|
|
595
|
-
interface ItemProps
|
|
664
|
+
interface ItemProps<MenuItemType extends string = string> {
|
|
596
665
|
id: string;
|
|
597
666
|
title?: ReactNode;
|
|
598
667
|
subtitle?: ReactNode;
|
|
@@ -629,19 +698,19 @@ declare function GridViewSectionHeader({ title }: {
|
|
|
629
698
|
}): React__default.JSX.Element;
|
|
630
699
|
declare namespace GridView {
|
|
631
700
|
const Root: React__default.MemoExoticComponent<typeof GridViewRoot>;
|
|
632
|
-
const Item: React__default.MemoExoticComponent<(<MenuItemType extends string>(props: ItemProps
|
|
701
|
+
const Item: React__default.MemoExoticComponent<(<MenuItemType extends string>(props: ItemProps<MenuItemType> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null)>;
|
|
633
702
|
const Section: React__default.MemoExoticComponent<typeof GridViewSection>;
|
|
634
703
|
const SectionHeader: React__default.MemoExoticComponent<typeof GridViewSectionHeader>;
|
|
635
704
|
}
|
|
636
705
|
|
|
637
|
-
declare const IconButton:
|
|
706
|
+
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<ButtonRootProps, "size" | "children" | "variant" | "flex"> & {
|
|
638
707
|
iconName: IconName;
|
|
639
708
|
className?: string;
|
|
640
|
-
style?: CSSProperties;
|
|
709
|
+
style?: React.CSSProperties;
|
|
641
710
|
selected?: boolean;
|
|
642
711
|
color?: string;
|
|
643
712
|
size?: number;
|
|
644
|
-
} &
|
|
713
|
+
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
645
714
|
|
|
646
715
|
declare const InspectorContainer: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
|
|
647
716
|
header?: React__default.ReactNode;
|
|
@@ -653,21 +722,30 @@ declare const InspectorContainer: React__default.MemoExoticComponent<React__defa
|
|
|
653
722
|
style?: React__default.CSSProperties;
|
|
654
723
|
} & React__default.RefAttributes<HTMLDivElement>>>;
|
|
655
724
|
|
|
656
|
-
interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
725
|
+
interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
657
726
|
}
|
|
658
|
-
declare const Label:
|
|
727
|
+
declare const Label: React.MemoExoticComponent<React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>>;
|
|
659
728
|
|
|
660
729
|
interface ContainerProps {
|
|
661
|
-
children: ReactNode;
|
|
730
|
+
children: React.ReactNode;
|
|
662
731
|
renderLabel: (provided: {
|
|
663
732
|
id: string;
|
|
664
733
|
index: number;
|
|
665
|
-
}) => ReactNode;
|
|
734
|
+
}) => React.ReactNode;
|
|
666
735
|
}
|
|
667
|
-
declare const LabeledElementView:
|
|
736
|
+
declare const LabeledElementView: React.NamedExoticComponent<ContainerProps>;
|
|
737
|
+
|
|
738
|
+
type MessageProps = {
|
|
739
|
+
role: "user" | "assistant" | "system" | "data";
|
|
740
|
+
children?: React__default.ReactNode;
|
|
741
|
+
user?: MultiplayerUser;
|
|
742
|
+
/** @default 27 */
|
|
743
|
+
avatarSize?: number;
|
|
744
|
+
};
|
|
745
|
+
declare const Message: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<MessageProps & React__default.RefAttributes<HTMLDivElement>>>;
|
|
668
746
|
|
|
669
747
|
type PopoverVariant = "normal" | "large";
|
|
670
|
-
interface Props$
|
|
748
|
+
interface Props$8 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content"]>, "onOpenAutoFocus" | "onCloseAutoFocus" | "onPointerDownOutside" | "onInteractOutside" | "onFocusOutside" | "side"> {
|
|
671
749
|
children: React__default.ReactNode;
|
|
672
750
|
trigger: React__default.ReactNode;
|
|
673
751
|
variant?: PopoverVariant;
|
|
@@ -678,41 +756,40 @@ interface Props$9 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content
|
|
|
678
756
|
onClickClose?: () => void;
|
|
679
757
|
showArrow?: boolean;
|
|
680
758
|
}
|
|
681
|
-
declare function Popover({ children, trigger, variant, closable, open, side, sideOffset, showArrow, onOpenChange, onOpenAutoFocus, onCloseAutoFocus, onPointerDownOutside, onInteractOutside, onFocusOutside, onClickClose, }: Props$
|
|
759
|
+
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
760
|
|
|
683
761
|
type ProgressVariant = "normal" | "warning" | "primary" | "secondary";
|
|
684
762
|
declare function Progress({ value, variant, className, }: {
|
|
685
763
|
value: number;
|
|
686
764
|
variant?: ProgressVariant;
|
|
687
765
|
className?: string;
|
|
688
|
-
}):
|
|
766
|
+
}): React.JSX.Element;
|
|
689
767
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
value: string;
|
|
693
|
-
tooltip?: ReactNode;
|
|
694
|
-
children: ReactNode;
|
|
695
|
-
disabled?: boolean;
|
|
768
|
+
interface Props$7 {
|
|
769
|
+
children?: React.ReactNode | ((scrollElementRef: HTMLDivElement) => React.ReactNode);
|
|
696
770
|
}
|
|
697
|
-
|
|
771
|
+
declare const ScrollArea: React.NamedExoticComponent<Props$7>;
|
|
772
|
+
|
|
773
|
+
type SegmentedControlColorScheme = "primary" | "secondary";
|
|
774
|
+
interface SegmentedControlProps<T extends string> {
|
|
698
775
|
id?: string;
|
|
699
|
-
value?:
|
|
700
|
-
onValueChange?: (value:
|
|
776
|
+
value?: T;
|
|
777
|
+
onValueChange?: (value: T) => void;
|
|
701
778
|
/** @default primary */
|
|
702
|
-
colorScheme?:
|
|
779
|
+
colorScheme?: SegmentedControlColorScheme;
|
|
703
780
|
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);
|
|
781
|
+
separator?: boolean;
|
|
782
|
+
items: SegmentedControlItemProps<T>[];
|
|
783
|
+
className?: string;
|
|
784
|
+
style?: React__default.CSSProperties;
|
|
714
785
|
}
|
|
715
|
-
|
|
786
|
+
type SegmentedControlItemProps<T extends string> = {
|
|
787
|
+
title?: ReactNode;
|
|
788
|
+
className?: string;
|
|
789
|
+
style?: React__default.CSSProperties;
|
|
790
|
+
tooltip?: ReactNode;
|
|
791
|
+
} & Pick<RegularMenuItem<T>, "value" | "disabled" | "icon" | "role">;
|
|
792
|
+
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
793
|
|
|
717
794
|
type Props$6<T extends string> = {
|
|
718
795
|
id?: string;
|
|
@@ -727,7 +804,8 @@ type Props$6<T extends string> = {
|
|
|
727
804
|
label?: React__default.ReactNode;
|
|
728
805
|
onFocus?: FocusEventHandler;
|
|
729
806
|
onBlur?: FocusEventHandler;
|
|
730
|
-
} & Pick<SelectProps, "open">;
|
|
807
|
+
} & Pick<SelectProps, "open" | "onOpenChange">;
|
|
808
|
+
declare const labelTextStyles = "font-sans text-label uppercase text-text-disabled leading-[19px] font-bold text-[60%]";
|
|
731
809
|
declare const SelectMenu: <T extends string = string>(props: Props$6<T>) => React__default.ReactElement | null;
|
|
732
810
|
|
|
733
811
|
type ColorScheme = "primary" | "secondary";
|
|
@@ -744,6 +822,7 @@ interface Props$5 {
|
|
|
744
822
|
label?: React__default.ReactNode;
|
|
745
823
|
onFocus?: FocusEventHandler;
|
|
746
824
|
onBlur?: FocusEventHandler;
|
|
825
|
+
readOnly?: boolean;
|
|
747
826
|
}
|
|
748
827
|
declare const Slider: React__default.NamedExoticComponent<Props$5>;
|
|
749
828
|
|
|
@@ -752,11 +831,11 @@ interface Props$4 {
|
|
|
752
831
|
inline?: boolean;
|
|
753
832
|
}
|
|
754
833
|
declare namespace Spacer {
|
|
755
|
-
const Vertical:
|
|
756
|
-
const Horizontal:
|
|
834
|
+
const Vertical: React.ForwardRefExoticComponent<Props$4 & React.RefAttributes<HTMLSpanElement>>;
|
|
835
|
+
const Horizontal: React.ForwardRefExoticComponent<Props$4 & React.RefAttributes<HTMLSpanElement>>;
|
|
757
836
|
}
|
|
758
837
|
|
|
759
|
-
type SwitchColorScheme = "
|
|
838
|
+
type SwitchColorScheme = "primary" | "secondary";
|
|
760
839
|
interface Props$3 {
|
|
761
840
|
id?: string;
|
|
762
841
|
value: boolean;
|
|
@@ -764,12 +843,12 @@ interface Props$3 {
|
|
|
764
843
|
/** @default normal */
|
|
765
844
|
colorScheme?: SwitchColorScheme;
|
|
766
845
|
disabled?: boolean;
|
|
767
|
-
onFocus?: FocusEventHandler;
|
|
768
|
-
onBlur?: FocusEventHandler;
|
|
846
|
+
onFocus?: React.FocusEventHandler;
|
|
847
|
+
onBlur?: React.FocusEventHandler;
|
|
769
848
|
className?: string;
|
|
770
|
-
style?: CSSProperties;
|
|
849
|
+
style?: React.CSSProperties;
|
|
771
850
|
}
|
|
772
|
-
declare const Switch: ({ id, value, onChange, colorScheme, disabled, onFocus, onBlur, style, className, }: Props$3) =>
|
|
851
|
+
declare const Switch: ({ id, value, onChange, colorScheme, disabled, onFocus, onBlur, style, className, }: Props$3) => React.JSX.Element;
|
|
773
852
|
|
|
774
853
|
declare const config: {
|
|
775
854
|
content: string[];
|
|
@@ -815,7 +894,7 @@ declare const config: {
|
|
|
815
894
|
"listview-editing-background": string;
|
|
816
895
|
"slider-thumb-background": string;
|
|
817
896
|
"slider-border": string;
|
|
818
|
-
"
|
|
897
|
+
"segmented-control-item": string;
|
|
819
898
|
mask: string;
|
|
820
899
|
"transparent-checker": string;
|
|
821
900
|
scrollbar: string;
|
|
@@ -831,7 +910,6 @@ declare const config: {
|
|
|
831
910
|
icon: string;
|
|
832
911
|
"icon-selected": string;
|
|
833
912
|
warning: string;
|
|
834
|
-
"radio-group-item": string;
|
|
835
913
|
dot: string;
|
|
836
914
|
"row-highlight": string;
|
|
837
915
|
"table-row-background": string;
|
|
@@ -982,7 +1060,7 @@ declare const cssVars: {
|
|
|
982
1060
|
listviewEditingBackground: string;
|
|
983
1061
|
sliderThumbBackground: string;
|
|
984
1062
|
sliderBorder: string;
|
|
985
|
-
|
|
1063
|
+
segmentedControlItem: string;
|
|
986
1064
|
mask: string;
|
|
987
1065
|
transparentChecker: string;
|
|
988
1066
|
scrollbar: string;
|
|
@@ -998,7 +1076,6 @@ declare const cssVars: {
|
|
|
998
1076
|
icon: string;
|
|
999
1077
|
iconSelected: string;
|
|
1000
1078
|
warning: string;
|
|
1001
|
-
radioGroupItem: string;
|
|
1002
1079
|
dot: string;
|
|
1003
1080
|
rowHighlight: string;
|
|
1004
1081
|
tableRowBackground: string;
|
|
@@ -1136,11 +1213,25 @@ declare const Italic: ({ children }: {
|
|
|
1136
1213
|
children: ReactNode;
|
|
1137
1214
|
}) => React__default.JSX.Element;
|
|
1138
1215
|
|
|
1139
|
-
declare const useAutoResize: (value: string) => React__default.MutableRefObject<HTMLTextAreaElement | null>;
|
|
1140
|
-
declare const
|
|
1141
|
-
onChangeText
|
|
1216
|
+
declare const useAutoResize: (value: string | undefined) => React__default.MutableRefObject<HTMLTextAreaElement | null>;
|
|
1217
|
+
declare const TextArea: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<{
|
|
1218
|
+
onChangeText?: (value: string) => void;
|
|
1142
1219
|
value?: string;
|
|
1220
|
+
autoResize?: boolean;
|
|
1143
1221
|
} & React__default.TextareaHTMLAttributes<HTMLTextAreaElement> & React__default.RefAttributes<HTMLTextAreaElement>>>;
|
|
1222
|
+
declare const TextAreaRow: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<Omit<{
|
|
1223
|
+
className?: string;
|
|
1224
|
+
textAreaClassName?: string;
|
|
1225
|
+
textAreaRef?: React__default.Ref<HTMLTextAreaElement>;
|
|
1226
|
+
end?: React__default.ReactNode;
|
|
1227
|
+
endClassName?: string;
|
|
1228
|
+
} & Omit<{
|
|
1229
|
+
onChangeText?: (value: string) => void;
|
|
1230
|
+
value?: string;
|
|
1231
|
+
autoResize?: boolean;
|
|
1232
|
+
} & React__default.TextareaHTMLAttributes<HTMLTextAreaElement> & React__default.RefAttributes<HTMLTextAreaElement>, "ref"> & {
|
|
1233
|
+
ref?: ((instance: HTMLTextAreaElement | null) => void | React__default.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React__default.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React__default.RefObject<HTMLTextAreaElement> | null | undefined;
|
|
1234
|
+
}, "ref"> & React__default.RefAttributes<HTMLDivElement>>>;
|
|
1144
1235
|
|
|
1145
1236
|
declare const Toast: ({ title, content, children, ...props }: {
|
|
1146
1237
|
title?: string;
|
|
@@ -1152,10 +1243,10 @@ declare const ToastProvider: ({ children }: {
|
|
|
1152
1243
|
}) => React__default.JSX.Element;
|
|
1153
1244
|
|
|
1154
1245
|
interface Props$2 {
|
|
1155
|
-
children: ReactNode;
|
|
1156
|
-
content: ReactNode;
|
|
1246
|
+
children: React.ReactNode;
|
|
1247
|
+
content: React.ReactNode;
|
|
1157
1248
|
}
|
|
1158
|
-
declare const Tooltip:
|
|
1249
|
+
declare const Tooltip: React.NamedExoticComponent<Props$2>;
|
|
1159
1250
|
|
|
1160
1251
|
type TreeRowBaseProps = {
|
|
1161
1252
|
icon?: Exclude<ReactNode, string> | IconName;
|
|
@@ -1231,45 +1322,43 @@ type PanelLayoutState = {
|
|
|
1231
1322
|
declare function usePreservePanelSize(panelGroupRef: React__default.RefObject<ImperativePanelGroupHandle | null>, setPanelLayoutState?: (state: PanelLayoutState) => void): void;
|
|
1232
1323
|
|
|
1233
1324
|
interface Props$1 {
|
|
1325
|
+
id?: string;
|
|
1326
|
+
className?: string;
|
|
1327
|
+
style?: React__default.CSSProperties;
|
|
1234
1328
|
autoSavePrefix?: string;
|
|
1235
|
-
|
|
1329
|
+
left?: React__default.ReactNode;
|
|
1330
|
+
leftOptions?: SideOptions;
|
|
1236
1331
|
children?: React__default.ReactNode;
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1332
|
+
right?: React__default.ReactNode;
|
|
1333
|
+
rightOptions?: SideOptions;
|
|
1334
|
+
toolbar?: React__default.ReactNode;
|
|
1240
1335
|
onChangeLayoutState?: (layoutState: PanelLayoutState) => void;
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1336
|
+
}
|
|
1337
|
+
type IWorkspaceLayout = {
|
|
1338
|
+
setLeftExpanded: (expanded: boolean) => void;
|
|
1339
|
+
setRightExpanded: (expanded: boolean) => void;
|
|
1340
|
+
toggleSides: () => void;
|
|
1341
|
+
toggleLeft: () => void;
|
|
1342
|
+
toggleRight: () => void;
|
|
1343
|
+
};
|
|
1344
|
+
type SideOptions = {
|
|
1245
1345
|
style?: React__default.CSSProperties;
|
|
1346
|
+
className?: string;
|
|
1347
|
+
resizable?: boolean;
|
|
1246
1348
|
/**
|
|
1247
1349
|
* Accepts a number (px) or % string (e.g. "50%").
|
|
1248
1350
|
* Use % to avoid flicker server-rendering.
|
|
1249
1351
|
*/
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
/**
|
|
1253
|
-
* Accepts a number (px) or % string (e.g. "50%").
|
|
1254
|
-
* Use % to avoid flicker server-rendering.
|
|
1255
|
-
*/
|
|
1256
|
-
rightSidebarInitialSize?: number | string;
|
|
1257
|
-
rightSidebarMinSize?: number | string;
|
|
1258
|
-
}
|
|
1259
|
-
type IWorkspaceLayout = {
|
|
1260
|
-
setLeftSidebarExpanded: (expanded: boolean) => void;
|
|
1261
|
-
setRightSidebarExpanded: (expanded: boolean) => void;
|
|
1262
|
-
toggleAllSidebars: () => void;
|
|
1263
|
-
toggleLeftSidebar: () => void;
|
|
1264
|
-
toggleRightSidebar: () => void;
|
|
1352
|
+
initialSize?: number | string;
|
|
1353
|
+
minSize?: number | string;
|
|
1265
1354
|
};
|
|
1266
1355
|
declare const WorkspaceLayout: React__default.ForwardRefExoticComponent<Props$1 & React__default.RefAttributes<IWorkspaceLayout>>;
|
|
1267
1356
|
|
|
1268
1357
|
type DesignSystemConfigurationContextValue = {
|
|
1269
1358
|
platform: PlatformName;
|
|
1270
1359
|
};
|
|
1271
|
-
declare const DesignSystemConfigurationProvider:
|
|
1272
|
-
children: ReactNode;
|
|
1360
|
+
declare const DesignSystemConfigurationProvider: React.NamedExoticComponent<{
|
|
1361
|
+
children: React.ReactNode;
|
|
1273
1362
|
platform?: PlatformName;
|
|
1274
1363
|
}>;
|
|
1275
1364
|
declare function useDesignSystemConfiguration(): DesignSystemConfigurationContextValue;
|
|
@@ -1281,6 +1370,10 @@ type DialogContextValue = {
|
|
|
1281
1370
|
placeholder?: string;
|
|
1282
1371
|
initialValue?: string;
|
|
1283
1372
|
}): Promise<string | undefined>;
|
|
1373
|
+
openConfirmationDialog(options: string | {
|
|
1374
|
+
title: string;
|
|
1375
|
+
description?: ReactNode;
|
|
1376
|
+
}): Promise<boolean>;
|
|
1284
1377
|
containsElement(element: HTMLElement): boolean;
|
|
1285
1378
|
};
|
|
1286
1379
|
declare const DialogProvider: ({ children, }: {
|
|
@@ -1293,6 +1386,10 @@ declare function useOpenInputDialog(): (options: string | {
|
|
|
1293
1386
|
initialValue?: string;
|
|
1294
1387
|
}) => Promise<string | undefined>;
|
|
1295
1388
|
declare function useDialogContainsElement(): (element: HTMLElement) => boolean;
|
|
1389
|
+
declare function useOpenConfirmationDialog(): (options: string | {
|
|
1390
|
+
title: string;
|
|
1391
|
+
description?: ReactNode;
|
|
1392
|
+
}) => Promise<boolean>;
|
|
1296
1393
|
|
|
1297
1394
|
type FloatingWindowContextValue = {
|
|
1298
1395
|
createWindow: (element: React__default.ReactNode) => string;
|
|
@@ -1327,8 +1424,8 @@ declare function useGlobalInputBlurTrigger(): () => void;
|
|
|
1327
1424
|
type ImageDataContextValue = {
|
|
1328
1425
|
getImageData: (ref: string) => ArrayBuffer | undefined;
|
|
1329
1426
|
};
|
|
1330
|
-
declare const ImageDataProvider:
|
|
1331
|
-
children: ReactNode;
|
|
1427
|
+
declare const ImageDataProvider: React.NamedExoticComponent<{
|
|
1428
|
+
children: React.ReactNode;
|
|
1332
1429
|
getImageData?: (ref: string) => ArrayBuffer | undefined;
|
|
1333
1430
|
}>;
|
|
1334
1431
|
declare function useImageData(ref: string): ArrayBuffer | undefined;
|
|
@@ -1429,7 +1526,7 @@ interface Props {
|
|
|
1429
1526
|
disabled?: boolean;
|
|
1430
1527
|
trigger?: "change" | "submit";
|
|
1431
1528
|
}
|
|
1432
|
-
declare const DimensionInput:
|
|
1529
|
+
declare const DimensionInput: React.NamedExoticComponent<Props>;
|
|
1433
1530
|
|
|
1434
1531
|
declare const Section: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1435
1532
|
declare const SectionHeader: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -1471,4 +1568,28 @@ declare namespace InspectorPrimitives {
|
|
|
1471
1568
|
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
1569
|
}
|
|
1473
1570
|
|
|
1474
|
-
|
|
1571
|
+
interface BaseToolbarProps {
|
|
1572
|
+
children?: React__default.ReactNode;
|
|
1573
|
+
left?: React__default.ReactNode;
|
|
1574
|
+
right?: React__default.ReactNode;
|
|
1575
|
+
logo?: React__default.ReactNode;
|
|
1576
|
+
showDivider?: boolean;
|
|
1577
|
+
}
|
|
1578
|
+
declare function BaseToolbar({ children, left, right, logo, showDivider, }: BaseToolbarProps): React__default.JSX.Element;
|
|
1579
|
+
|
|
1580
|
+
interface ToolbarProps<T extends string = string> {
|
|
1581
|
+
children?: React__default.ReactNode;
|
|
1582
|
+
logo?: React__default.ReactNode;
|
|
1583
|
+
leftMenuItems?: MenuItem<T>[];
|
|
1584
|
+
rightMenuItems?: MenuItem<T>[];
|
|
1585
|
+
onSelectMenuItem?: (value: T) => void;
|
|
1586
|
+
/** Whether to bind keyboard shortcuts for menu items. @default true */
|
|
1587
|
+
shouldBindKeyboardShortcuts?: boolean;
|
|
1588
|
+
}
|
|
1589
|
+
declare function Toolbar<T extends string = string>({ children, logo, leftMenuItems, rightMenuItems, onSelectMenuItem, shouldBindKeyboardShortcuts, }: ToolbarProps<T>): React__default.JSX.Element;
|
|
1590
|
+
declare function ToolbarMenu<T extends string>({ items, onSelectMenuItem, }: {
|
|
1591
|
+
items: MenuItem<T>[];
|
|
1592
|
+
onSelectMenuItem?: (value: T) => void;
|
|
1593
|
+
}): React__default.JSX.Element;
|
|
1594
|
+
|
|
1595
|
+
export { ActivityIndicator, AnimatePresence, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, type BaseComboboxProps, 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 OptionModeOnlyProps, type OptionModeProps, 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 SideOptions, type SketchPattern, Slider, Small, Sortable, Spacer, type StringModeOnlyProps, type StringModeProps, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, TextArea, TextAreaRow, 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 };
|