@noya-app/noya-designsystem 0.1.49 → 0.1.51
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 +19 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +169 -205
- package/dist/index.d.ts +169 -205
- package/dist/index.js +5092 -13463
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3501 -11912
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
- package/src/components/ActionMenu.tsx +4 -2
- package/src/components/Avatar.tsx +2 -2
- package/src/components/Banner.tsx +29 -0
- package/src/components/Button.tsx +2 -2
- package/src/components/Chip.tsx +8 -8
- package/src/components/Collection.tsx +18 -4
- package/src/components/ComboboxMenu.tsx +10 -1
- package/src/components/Dialog.tsx +2 -2
- package/src/components/FillInputField.tsx +1 -1
- package/src/components/Grid.tsx +12 -11
- package/src/components/Label.tsx +11 -6
- package/src/components/LabeledField.tsx +6 -1
- package/src/components/List.tsx +30 -24
- package/src/components/ListView.tsx +10 -5
- package/src/components/MediaThumbnail.tsx +31 -9
- package/src/components/Popover.tsx +9 -6
- package/src/components/SearchCompletionMenu.tsx +12 -12
- package/src/components/Section.tsx +172 -0
- package/src/components/SegmentedControl.tsx +1 -1
- package/src/components/SelectMenu.tsx +1 -1
- package/src/components/Slider.tsx +1 -1
- package/src/components/Sortable.tsx +124 -22
- package/src/components/Toolbar.tsx +22 -10
- package/src/components/UserPointer.tsx +1 -1
- package/src/components/ai-assistant/AIAssistantLayout.tsx +102 -0
- package/src/components/connected-users-menu/ConnectedUsersMenuLayout.tsx +71 -0
- package/src/components/file-explorer/FileExplorerLayout.tsx +81 -0
- package/src/components/internal/Menu.tsx +12 -7
- package/src/components/internal/TextInput.tsx +7 -2
- package/src/components/pipeline/PipelineResultLayout.tsx +32 -0
- package/src/index.css +125 -118
- package/src/index.tsx +7 -0
- package/src/theme/index.ts +1 -1
- package/src/utils/classNames.ts +28 -3
- package/src/utils/combobox.ts +18 -13
- package/src/utils/moveTreeItem.ts +99 -0
- package/tailwind.config.ts +2 -239
- package/tailwind.d.ts +1 -1
- package/tsup.config.ts +0 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { ReactNode,
|
|
2
|
+
import React__default, { ReactNode, CSSProperties, ReactHTML, HTMLAttributes, AriaRole, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, FocusEventHandler, InputHTMLAttributes, ForwardedRef, ComponentProps, SyntheticEvent, LabelHTMLAttributes } from 'react';
|
|
3
3
|
import { IItemScore } from 'vscode-fuzzy-scorer';
|
|
4
4
|
import * as Icons from '@noya-app/noya-icons';
|
|
5
5
|
export { Icons };
|
|
6
|
-
import
|
|
6
|
+
import tailwindConfig from '@noya-app/noya-tailwind-config';
|
|
7
7
|
import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
|
|
8
8
|
import { Size } from '@noya-app/noya-geometry';
|
|
9
9
|
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
10
10
|
import { useSortable } from '@dnd-kit/sortable';
|
|
11
11
|
import { Property } from 'csstype';
|
|
12
12
|
import * as _noya_app_noya_designsystem from '@noya-app/noya-designsystem';
|
|
13
|
+
import { SectionProps as SectionProps$1, BannerProps as BannerProps$1 } from '@noya-app/noya-designsystem';
|
|
13
14
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
14
15
|
import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
15
16
|
import { Sketch } from '@noya-app/noya-file-format';
|
|
@@ -131,6 +132,7 @@ type ActionMenuProps<TMenu extends string> = {
|
|
|
131
132
|
onOpenChange: (open: boolean) => void;
|
|
132
133
|
className?: string;
|
|
133
134
|
style?: React__default.CSSProperties;
|
|
135
|
+
variant?: "normal" | "bare";
|
|
134
136
|
};
|
|
135
137
|
declare const ActionMenu: <TMenu extends string>(props: ActionMenuProps<TMenu>) => React__default.ReactElement | null;
|
|
136
138
|
|
|
@@ -143,6 +145,25 @@ interface Props$e {
|
|
|
143
145
|
}
|
|
144
146
|
declare const ActivityIndicator: React$1.NamedExoticComponent<Props$e>;
|
|
145
147
|
|
|
148
|
+
declare const AIAssistantLoadingIndicator: () => React__default.JSX.Element;
|
|
149
|
+
type AIAssistantInputProps = {
|
|
150
|
+
value: string;
|
|
151
|
+
onChange: (e: React__default.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
152
|
+
onSubmitClick: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
153
|
+
onKeyDown: (e: React__default.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
154
|
+
disabled: boolean;
|
|
155
|
+
};
|
|
156
|
+
declare const AIAssistantInput: React__default.ForwardRefExoticComponent<AIAssistantInputProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
157
|
+
type AIAssistantLayoutProps = {
|
|
158
|
+
renderMessages: () => React__default.ReactNode;
|
|
159
|
+
renderInput: () => React__default.ReactNode;
|
|
160
|
+
isLoading: boolean;
|
|
161
|
+
renderLoadingIndicator?: () => React__default.ReactNode;
|
|
162
|
+
className?: string;
|
|
163
|
+
style?: React__default.CSSProperties;
|
|
164
|
+
};
|
|
165
|
+
declare const AIAssistantLayout: React__default.ForwardRefExoticComponent<AIAssistantLayoutProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
166
|
+
|
|
146
167
|
type AnimatePresenceProps = {
|
|
147
168
|
children: React__default.ReactNode;
|
|
148
169
|
/**
|
|
@@ -197,186 +218,14 @@ declare const AvatarStack: React__default.NamedExoticComponent<{
|
|
|
197
218
|
className?: string;
|
|
198
219
|
}>;
|
|
199
220
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
};
|
|
205
|
-
theme: {
|
|
206
|
-
extend: {
|
|
207
|
-
colors: {
|
|
208
|
-
"logo-fill": string;
|
|
209
|
-
"logo-highlight": string;
|
|
210
|
-
background: string;
|
|
211
|
-
text: string;
|
|
212
|
-
"text-muted": string;
|
|
213
|
-
"text-subtle": string;
|
|
214
|
-
"text-disabled": string;
|
|
215
|
-
"text-decorative-light": string;
|
|
216
|
-
"divider-subtle": string;
|
|
217
|
-
divider: string;
|
|
218
|
-
"divider-strong": string;
|
|
219
|
-
primary: string;
|
|
220
|
-
"primary-light": string;
|
|
221
|
-
"primary-pastel": string;
|
|
222
|
-
secondary: string;
|
|
223
|
-
"secondary-light": string;
|
|
224
|
-
"secondary-pastel": string;
|
|
225
|
-
"secondary-bright": string;
|
|
226
|
-
"input-background": string;
|
|
227
|
-
"input-background-light": string;
|
|
228
|
-
"list-view-hover-background": string;
|
|
229
|
-
"list-view-thumbnail-background": string;
|
|
230
|
-
"code-background": string;
|
|
231
|
-
"code-background-dark": string;
|
|
232
|
-
"selected-background": string;
|
|
233
|
-
"breadcrumb-text": string;
|
|
234
|
-
"breadcrumb-text-hover": string;
|
|
235
|
-
"breadcrumb-icon": string;
|
|
236
|
-
"canvas-background": string;
|
|
237
|
-
"canvas-grid": string;
|
|
238
|
-
"sidebar-background": string;
|
|
239
|
-
"sidebar-background-transparent": string;
|
|
240
|
-
"popover-background": string;
|
|
241
|
-
"popover-divider": string;
|
|
242
|
-
"listview-raised-background": string;
|
|
243
|
-
"listview-editing-background": string;
|
|
244
|
-
"slider-thumb-background": string;
|
|
245
|
-
"slider-border": string;
|
|
246
|
-
"segmented-control-item": string;
|
|
247
|
-
mask: string;
|
|
248
|
-
"transparent-checker": string;
|
|
249
|
-
scrollbar: string;
|
|
250
|
-
"placeholder-dots": string;
|
|
251
|
-
"drag-outline": string;
|
|
252
|
-
"active-background": string;
|
|
253
|
-
"thumbnail-background": string;
|
|
254
|
-
"thumbnail-shadow": string;
|
|
255
|
-
"inline-code-text": string;
|
|
256
|
-
"inline-code-background": string;
|
|
257
|
-
"text-link": string;
|
|
258
|
-
"text-link-focused": string;
|
|
259
|
-
icon: string;
|
|
260
|
-
"icon-selected": string;
|
|
261
|
-
warning: string;
|
|
262
|
-
dot: string;
|
|
263
|
-
"row-highlight": string;
|
|
264
|
-
"table-row-background": string;
|
|
265
|
-
"chip-primary-bg": string;
|
|
266
|
-
"chip-secondary-bg": string;
|
|
267
|
-
"chip-error-bg": string;
|
|
268
|
-
"chip-default-bg": string;
|
|
269
|
-
"chip-primary-shadow": string;
|
|
270
|
-
"chip-secondary-shadow": string;
|
|
271
|
-
"chip-error-shadow": string;
|
|
272
|
-
"chip-default-shadow": string;
|
|
273
|
-
"floating-button": string;
|
|
274
|
-
"block-border": string;
|
|
275
|
-
"block-highlight": string;
|
|
276
|
-
};
|
|
277
|
-
fontFamily: {
|
|
278
|
-
sans: [string, string, string, string, string, string, string, string, string, string];
|
|
279
|
-
mono: [string, string, string, string, string];
|
|
280
|
-
};
|
|
281
|
-
fontSize: {
|
|
282
|
-
title: [string, {
|
|
283
|
-
lineHeight: string;
|
|
284
|
-
letterSpacing: string;
|
|
285
|
-
}];
|
|
286
|
-
subtitle: [string, {
|
|
287
|
-
lineHeight: string;
|
|
288
|
-
letterSpacing: string;
|
|
289
|
-
}];
|
|
290
|
-
heading1: [string, {
|
|
291
|
-
lineHeight: string;
|
|
292
|
-
letterSpacing: string;
|
|
293
|
-
}];
|
|
294
|
-
heading2: [string, {
|
|
295
|
-
lineHeight: string;
|
|
296
|
-
letterSpacing: string;
|
|
297
|
-
}];
|
|
298
|
-
heading3: [string, {
|
|
299
|
-
lineHeight: string;
|
|
300
|
-
letterSpacing: string;
|
|
301
|
-
}];
|
|
302
|
-
heading4: [string, {
|
|
303
|
-
lineHeight: string;
|
|
304
|
-
}];
|
|
305
|
-
heading5: [string, {
|
|
306
|
-
lineHeight: string;
|
|
307
|
-
}];
|
|
308
|
-
body: [string, {
|
|
309
|
-
lineHeight: string;
|
|
310
|
-
}];
|
|
311
|
-
small: [string, {
|
|
312
|
-
lineHeight: string;
|
|
313
|
-
}];
|
|
314
|
-
code: [string, {
|
|
315
|
-
lineHeight: string;
|
|
316
|
-
}];
|
|
317
|
-
button: [string, {
|
|
318
|
-
lineHeight: string;
|
|
319
|
-
letterSpacing: string;
|
|
320
|
-
}];
|
|
321
|
-
label: [string, {
|
|
322
|
-
lineHeight: string;
|
|
323
|
-
letterSpacing: string;
|
|
324
|
-
}];
|
|
325
|
-
};
|
|
326
|
-
spacing: {
|
|
327
|
-
nano: string;
|
|
328
|
-
micro: string;
|
|
329
|
-
small: string;
|
|
330
|
-
medium: string;
|
|
331
|
-
large: string;
|
|
332
|
-
xlarge: string;
|
|
333
|
-
xxlarge: string;
|
|
334
|
-
"inset-top": string;
|
|
335
|
-
"sidebar-width": string;
|
|
336
|
-
"toolbar-height": string;
|
|
337
|
-
"toolbar-separator": string;
|
|
338
|
-
"inspector-h-separator": string;
|
|
339
|
-
"inspector-v-separator": string;
|
|
340
|
-
"dialog-padding": string;
|
|
341
|
-
"input-height": string;
|
|
342
|
-
};
|
|
343
|
-
keyframes: {
|
|
344
|
-
spin: {
|
|
345
|
-
"0%": {
|
|
346
|
-
transform: string;
|
|
347
|
-
};
|
|
348
|
-
"100%": {
|
|
349
|
-
transform: string;
|
|
350
|
-
};
|
|
351
|
-
};
|
|
352
|
-
shimmer: {
|
|
353
|
-
"0%": {
|
|
354
|
-
backgroundPosition: string;
|
|
355
|
-
};
|
|
356
|
-
"100%": {
|
|
357
|
-
backgroundPosition: string;
|
|
358
|
-
};
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
animation: {
|
|
362
|
-
spin: string;
|
|
363
|
-
shimmer: string;
|
|
364
|
-
};
|
|
365
|
-
zIndex: {
|
|
366
|
-
interactable: string;
|
|
367
|
-
label: string;
|
|
368
|
-
menu: string;
|
|
369
|
-
};
|
|
370
|
-
};
|
|
371
|
-
};
|
|
372
|
-
safelist: string[];
|
|
373
|
-
plugins: {
|
|
374
|
-
handler: tailwindcss_types_config.PluginCreator;
|
|
375
|
-
config?: Partial<tailwindcss_types_config.Config> | undefined;
|
|
376
|
-
}[];
|
|
221
|
+
type BannerProps = {
|
|
222
|
+
label?: string;
|
|
223
|
+
className?: string;
|
|
224
|
+
style?: CSSProperties;
|
|
377
225
|
};
|
|
226
|
+
declare function Banner({ label, className, style }: BannerProps): React__default.JSX.Element;
|
|
378
227
|
|
|
379
|
-
type Theme = (typeof
|
|
228
|
+
type Theme = (typeof tailwindConfig.theme)["extend"];
|
|
380
229
|
type ThemeColor = keyof Theme["colors"];
|
|
381
230
|
declare const cssVars: {
|
|
382
231
|
colors: {
|
|
@@ -493,6 +342,10 @@ declare const cssVars: {
|
|
|
493
342
|
lineHeight: string;
|
|
494
343
|
letterSpacing: string;
|
|
495
344
|
}];
|
|
345
|
+
listSmall: [string, {
|
|
346
|
+
lineHeight: string;
|
|
347
|
+
letterSpacing: string;
|
|
348
|
+
}];
|
|
496
349
|
label: [string, {
|
|
497
350
|
lineHeight: string;
|
|
498
351
|
letterSpacing: string;
|
|
@@ -632,15 +485,6 @@ interface ChipProps {
|
|
|
632
485
|
}
|
|
633
486
|
declare const Chip: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<ChipProps & React__default.RefAttributes<HTMLSpanElement>>>;
|
|
634
487
|
|
|
635
|
-
type GridViewSize = "xxs" | "xs" | "small" | "medium" | "large" | "xl";
|
|
636
|
-
declare const getGridSize: (size: GridViewSize) => {
|
|
637
|
-
minColumnWidth: string;
|
|
638
|
-
gap: number;
|
|
639
|
-
};
|
|
640
|
-
declare const Grid: <T, M extends string = string>(props: CollectionProps<T, M> & {
|
|
641
|
-
ref?: React__default.ForwardedRef<CollectionRef>;
|
|
642
|
-
} & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
|
|
643
|
-
|
|
644
488
|
type RelativeDropPosition = "above" | "below" | "inside";
|
|
645
489
|
type DropValidator = (sourceIndex: number, targetIndex: number, position: RelativeDropPosition) => boolean;
|
|
646
490
|
declare const normalizeListTargetIndex: (index: number, position: "above" | "below") => number;
|
|
@@ -667,14 +511,15 @@ type ValidateDropIndicatorParams = {
|
|
|
667
511
|
};
|
|
668
512
|
declare function validateDropIndicator({ acceptsDrop, keys, activeId, overId, offsetStart, elementStart, elementSize, }: ValidateDropIndicatorParams): RelativeDropPosition | undefined;
|
|
669
513
|
type UseSortableReturnType = ReturnType<typeof useSortable>;
|
|
514
|
+
type ItemChildrenProps<T> = {
|
|
515
|
+
ref: React$1.Ref<T>;
|
|
516
|
+
relativeDropPosition?: RelativeDropPosition;
|
|
517
|
+
style?: React$1.CSSProperties;
|
|
518
|
+
} & UseSortableReturnType["attributes"];
|
|
670
519
|
interface ItemProps$1<T> {
|
|
671
520
|
id: UniqueIdentifier;
|
|
672
521
|
disabled?: boolean;
|
|
673
|
-
children: (props:
|
|
674
|
-
ref: React$1.Ref<T>;
|
|
675
|
-
relativeDropPosition?: RelativeDropPosition;
|
|
676
|
-
style?: React$1.CSSProperties;
|
|
677
|
-
} & UseSortableReturnType["attributes"]) => JSX.Element;
|
|
522
|
+
children: (props: ItemChildrenProps<T>) => JSX.Element;
|
|
678
523
|
}
|
|
679
524
|
interface RootProps {
|
|
680
525
|
keys: UniqueIdentifier[];
|
|
@@ -685,10 +530,19 @@ interface RootProps {
|
|
|
685
530
|
axis?: SortableItemContextProps["axis"];
|
|
686
531
|
getDropTargetParentIndex?: SortableItemContextProps["getDropTargetParentIndex"];
|
|
687
532
|
}
|
|
688
|
-
declare
|
|
689
|
-
|
|
690
|
-
|
|
533
|
+
declare function SortableRoot({ keys, children, onMoveItem, renderOverlay, acceptsDrop, axis, getDropTargetParentIndex, }: RootProps): React$1.JSX.Element;
|
|
534
|
+
interface SortableProps<T, TElement extends HTMLElement> extends Omit<RootProps, "children" | "keys" | "renderOverlay"> {
|
|
535
|
+
items: T[];
|
|
536
|
+
keyExtractor: (item: T) => UniqueIdentifier;
|
|
537
|
+
shouldRenderOverlay?: boolean;
|
|
538
|
+
renderItem: (item: T, props: ItemChildrenProps<TElement>, { isOverlay }: {
|
|
539
|
+
isOverlay: boolean;
|
|
540
|
+
}) => JSX.Element;
|
|
691
541
|
}
|
|
542
|
+
declare const Sortable: (<TItem, TElement extends HTMLElement>(props: SortableProps<TItem, TElement>) => React$1.ReactElement | null) & {
|
|
543
|
+
readonly Root: React$1.MemoExoticComponent<typeof SortableRoot>;
|
|
544
|
+
readonly Item: <T extends HTMLElement>(props: ItemProps$1<T>) => React$1.ReactElement | null;
|
|
545
|
+
};
|
|
692
546
|
|
|
693
547
|
type ListRowMarginType = "none" | "top" | "bottom" | "vertical";
|
|
694
548
|
type ListRowPosition = "only" | "first" | "middle" | "last";
|
|
@@ -842,6 +696,7 @@ type CollectionRef = {
|
|
|
842
696
|
type CollectionThumbnailProps<T> = {
|
|
843
697
|
item: T;
|
|
844
698
|
selected: boolean;
|
|
699
|
+
size?: CollectionItemSize;
|
|
845
700
|
};
|
|
846
701
|
type CollectionRenderActionProps<T> = {
|
|
847
702
|
item: T;
|
|
@@ -868,7 +723,7 @@ interface CollectionProps<T, M extends string = string> {
|
|
|
868
723
|
menuItems?: MenuItem<M>[];
|
|
869
724
|
onSelectMenuItem?: (action: M, selectedItems: T[]) => void;
|
|
870
725
|
onRename?: (item: T, newName: string) => void;
|
|
871
|
-
renderThumbnail?: ({ item, selected, }: CollectionThumbnailProps<T>) => React__default.ReactNode;
|
|
726
|
+
renderThumbnail?: ({ item, selected, size, }: CollectionThumbnailProps<T>) => React__default.ReactNode;
|
|
872
727
|
renderAction?: "menu" | ((props: CollectionRenderActionProps<T>) => React__default.ReactNode);
|
|
873
728
|
renderDetail?: (item: T, selected: boolean) => React__default.ReactNode;
|
|
874
729
|
/** Callback when selection changes. If not provided, selection will be disabled. */
|
|
@@ -878,7 +733,7 @@ interface CollectionProps<T, M extends string = string> {
|
|
|
878
733
|
/** Position of the detail content. Defaults to 'end'. */
|
|
879
734
|
detailPosition?: "end" | "below";
|
|
880
735
|
/** Size of the list items. Defaults to 'medium'. */
|
|
881
|
-
size?:
|
|
736
|
+
size?: CollectionItemSize;
|
|
882
737
|
/** Size of the thumbnail. Defaults to 'auto', which will be based on the size prop. */
|
|
883
738
|
thumbnailSize?: CollectionThumbnailSize;
|
|
884
739
|
/** For testing: Override the hover state with a specific item ID */
|
|
@@ -902,8 +757,10 @@ interface CollectionProps<T, M extends string = string> {
|
|
|
902
757
|
renderEmptyState?: () => React__default.ReactElement;
|
|
903
758
|
/** @default false */
|
|
904
759
|
sortable?: boolean;
|
|
760
|
+
dragIndicatorStyle?: ListViewRowProps<M>["dragIndicatorStyle"];
|
|
905
761
|
}
|
|
906
762
|
declare const Collection: <T, M extends string = string>(props: CollectionProps<T, M> & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
|
|
763
|
+
type CollectionItemSize = "xxs" | "xs" | "small" | "medium" | "large" | "xl";
|
|
907
764
|
|
|
908
765
|
type InputSize = "small" | "medium" | "large";
|
|
909
766
|
|
|
@@ -937,6 +794,8 @@ type SubmittableProps = Props$d & {
|
|
|
937
794
|
onSubmit: (value: string) => void;
|
|
938
795
|
allowSubmittingWithSameValue?: boolean;
|
|
939
796
|
submitAutomaticallyAfterDelay?: number;
|
|
797
|
+
/** @default true */
|
|
798
|
+
submitOnBlur?: boolean;
|
|
940
799
|
};
|
|
941
800
|
type TextInputProps = ReadOnlyProps | ControlledProps | SubmittableProps;
|
|
942
801
|
|
|
@@ -1080,6 +939,8 @@ interface ComboboxMenuProps<T extends string> {
|
|
|
1080
939
|
listSize: Size;
|
|
1081
940
|
style?: React__default.CSSProperties;
|
|
1082
941
|
indented?: boolean;
|
|
942
|
+
/** @default right */
|
|
943
|
+
iconPosition?: "left" | "right";
|
|
1083
944
|
}
|
|
1084
945
|
declare const ComboboxMenu: <T extends string>(props: ComboboxMenuProps<T> & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement | null;
|
|
1085
946
|
|
|
@@ -1109,6 +970,15 @@ declare const CommandPalette: React__default.NamedExoticComponent<{
|
|
|
1109
970
|
testSearch?: string;
|
|
1110
971
|
} & React__default.RefAttributes<ISearchCompletionMenu>, "onSelect" | "items" | "onHover">>;
|
|
1111
972
|
|
|
973
|
+
declare const UserAvatar: ({ userId, name, image }: AvatarProps) => React__default.JSX.Element;
|
|
974
|
+
type ConnectedUsersMenuLayoutProps = {
|
|
975
|
+
renderUsers: () => React__default.ReactNode;
|
|
976
|
+
currentUserId?: string;
|
|
977
|
+
launchAIAssistant?: () => void;
|
|
978
|
+
isAssistantOpen?: boolean;
|
|
979
|
+
};
|
|
980
|
+
declare const ConnectedUsersMenuLayout: ({ renderUsers, currentUserId, launchAIAssistant, isAssistantOpen, }: ConnectedUsersMenuLayoutProps) => React__default.JSX.Element;
|
|
981
|
+
|
|
1112
982
|
interface MenuItemProps<T extends string> {
|
|
1113
983
|
value?: T;
|
|
1114
984
|
children: ReactNode;
|
|
@@ -1276,6 +1146,20 @@ type FadeProps = {
|
|
|
1276
1146
|
};
|
|
1277
1147
|
declare const Fade: ({ children, direction, width, height, className, zIndex, position, }: FadeProps) => React__default.JSX.Element;
|
|
1278
1148
|
|
|
1149
|
+
declare const FileExplorerLayout: ({ children, className, ...props }: SectionProps$1) => React__default.JSX.Element;
|
|
1150
|
+
declare const FileExplorerUploadButton: ({ showUploadButton, onUpload, children, }: {
|
|
1151
|
+
showUploadButton?: boolean;
|
|
1152
|
+
onUpload?: () => void;
|
|
1153
|
+
children?: React__default.ReactNode;
|
|
1154
|
+
}) => React__default.JSX.Element;
|
|
1155
|
+
declare const FileExplorerCollection: <T, M extends string = string>(props: CollectionProps<T, M> & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
|
|
1156
|
+
declare const FileExplorerDetail: ({ selected, size, children, }: {
|
|
1157
|
+
selected: boolean;
|
|
1158
|
+
children: React__default.ReactNode;
|
|
1159
|
+
size?: CollectionItemSize;
|
|
1160
|
+
}) => React__default.JSX.Element;
|
|
1161
|
+
declare const FileExplorerEmptyState: ({ label, ...props }: BannerProps$1) => React__default.JSX.Element;
|
|
1162
|
+
|
|
1279
1163
|
declare const SUPPORTED_IMAGE_UPLOAD_TYPES: ("image/png" | "image/jpeg" | "image/webp" | "image/svg+xml" | "application/pdf")[];
|
|
1280
1164
|
declare const SUPPORTED_CANVAS_UPLOAD_TYPES: ("" | "image/png" | "image/jpeg" | "image/webp" | "image/svg+xml" | "application/pdf")[];
|
|
1281
1165
|
type SupportedImageUploadType = (typeof SUPPORTED_IMAGE_UPLOAD_TYPES)[number];
|
|
@@ -1333,6 +1217,14 @@ interface Props$8 {
|
|
|
1333
1217
|
}
|
|
1334
1218
|
declare const GradientPicker: React$1.NamedExoticComponent<Props$8>;
|
|
1335
1219
|
|
|
1220
|
+
declare const getGridSize: (size: CollectionItemSize) => {
|
|
1221
|
+
minColumnWidth: string;
|
|
1222
|
+
gap: number;
|
|
1223
|
+
};
|
|
1224
|
+
declare const Grid: <T, M extends string = string>(props: CollectionProps<T, M> & {
|
|
1225
|
+
ref?: React__default.ForwardedRef<CollectionRef>;
|
|
1226
|
+
} & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
|
|
1227
|
+
|
|
1336
1228
|
interface ItemProps<MenuItemType extends string = string> {
|
|
1337
1229
|
id: string;
|
|
1338
1230
|
title?: ReactNode;
|
|
@@ -1481,7 +1373,7 @@ declare const LabeledField: React__default.NamedExoticComponent<{
|
|
|
1481
1373
|
|
|
1482
1374
|
declare const List: <T, M extends string = string>(props: CollectionProps<T, M> & React__default.RefAttributes<CollectionRef>) => React__default.ReactElement | null;
|
|
1483
1375
|
|
|
1484
|
-
type ColorScheme$1 = "primary" | "icon" | "warning";
|
|
1376
|
+
type ColorScheme$1 = "primary" | "secondary" | "icon" | "warning";
|
|
1485
1377
|
type MediaThumbnailProps = {
|
|
1486
1378
|
contentType?: string;
|
|
1487
1379
|
url?: string;
|
|
@@ -1495,6 +1387,11 @@ type MediaThumbnailProps = {
|
|
|
1495
1387
|
* If provided, use this icon instead of the default one for the asset type
|
|
1496
1388
|
*/
|
|
1497
1389
|
iconName?: IconName;
|
|
1390
|
+
size?: CollectionItemSize;
|
|
1391
|
+
};
|
|
1392
|
+
declare const getThumbnailColors: (colorScheme: ColorScheme$1, selected: boolean) => {
|
|
1393
|
+
icon: string;
|
|
1394
|
+
background: string;
|
|
1498
1395
|
};
|
|
1499
1396
|
declare const MediaThumbnail: React__default.NamedExoticComponent<MediaThumbnailProps>;
|
|
1500
1397
|
|
|
@@ -1509,6 +1406,13 @@ declare const Message: React__default.MemoExoticComponent<React__default.Forward
|
|
|
1509
1406
|
|
|
1510
1407
|
declare const Logo: React__default.ForwardRefExoticComponent<Omit<React__default.SVGProps<SVGSVGElement>, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
1511
1408
|
|
|
1409
|
+
declare const PipelineResultLink: ({ url }: {
|
|
1410
|
+
url: string;
|
|
1411
|
+
}) => React__default.JSX.Element;
|
|
1412
|
+
declare const PipelineResultLayout: ({ children, }: {
|
|
1413
|
+
children: React__default.ReactNode;
|
|
1414
|
+
}) => React__default.JSX.Element;
|
|
1415
|
+
|
|
1512
1416
|
type PopoverVariant = "normal" | "large";
|
|
1513
1417
|
interface Props$7 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content"]>, "onOpenAutoFocus" | "onCloseAutoFocus" | "onPointerDownOutside" | "onInteractOutside" | "onFocusOutside" | "side"> {
|
|
1514
1418
|
children: React__default.ReactNode;
|
|
@@ -1522,6 +1426,11 @@ interface Props$7 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content
|
|
|
1522
1426
|
showArrow?: boolean;
|
|
1523
1427
|
className?: string;
|
|
1524
1428
|
}
|
|
1429
|
+
declare const popoverStyle: {
|
|
1430
|
+
base: string;
|
|
1431
|
+
large: string;
|
|
1432
|
+
normal: string;
|
|
1433
|
+
};
|
|
1525
1434
|
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;
|
|
1526
1435
|
|
|
1527
1436
|
type ProgressVariant = "normal" | "warning" | "primary" | "secondary";
|
|
@@ -1536,6 +1445,28 @@ interface Props$6 {
|
|
|
1536
1445
|
}
|
|
1537
1446
|
declare const ScrollArea: React$1.NamedExoticComponent<Props$6>;
|
|
1538
1447
|
|
|
1448
|
+
type TitleIconOptions = {
|
|
1449
|
+
inlineBlockWrapper?: boolean;
|
|
1450
|
+
};
|
|
1451
|
+
type SectionProps = {
|
|
1452
|
+
children: React__default.ReactNode;
|
|
1453
|
+
title?: React__default.ReactNode;
|
|
1454
|
+
onClickTitle?: () => void;
|
|
1455
|
+
titleTextStyle?: "small" | "heading5" | "heading4" | "heading3";
|
|
1456
|
+
right?: React__default.ReactNode;
|
|
1457
|
+
hideRightWhenCollapsed?: boolean;
|
|
1458
|
+
extraPadding?: boolean;
|
|
1459
|
+
className?: string;
|
|
1460
|
+
style?: CSSProperties;
|
|
1461
|
+
titleIcon?: React__default.ReactNode;
|
|
1462
|
+
titleIconOptions?: TitleIconOptions;
|
|
1463
|
+
};
|
|
1464
|
+
type ExpandableSectionProps = {
|
|
1465
|
+
storageKey: string;
|
|
1466
|
+
initialVisibility?: "show" | "hide";
|
|
1467
|
+
};
|
|
1468
|
+
declare const Section$1: React__default.NamedExoticComponent<SectionProps & Partial<ExpandableSectionProps>>;
|
|
1469
|
+
|
|
1539
1470
|
type SegmentedControlColorScheme = "primary" | "secondary";
|
|
1540
1471
|
interface SegmentedControlProps<T extends string> {
|
|
1541
1472
|
id?: string;
|
|
@@ -1913,7 +1844,7 @@ declare const mediaQuery: {
|
|
|
1913
1844
|
};
|
|
1914
1845
|
|
|
1915
1846
|
type ClassNameItem = string | number | BigInt | boolean | null | undefined;
|
|
1916
|
-
type Category = "text" | "flex";
|
|
1847
|
+
type Category = "text" | "color" | "font" | "flex";
|
|
1917
1848
|
type Options = {
|
|
1918
1849
|
categories?: Category[];
|
|
1919
1850
|
};
|
|
@@ -1966,9 +1897,42 @@ declare class ComboboxState<T extends string> {
|
|
|
1966
1897
|
setSelectedIndex(index: number): void;
|
|
1967
1898
|
submitArbitraryFilter(filter: string): void;
|
|
1968
1899
|
}
|
|
1969
|
-
declare function
|
|
1900
|
+
declare function filterWithGroupedSections<T extends string>(items: MenuItem<T>[], query: string): ScoredMenuItem<T>[];
|
|
1901
|
+
declare function getNextIndex<T>({ items, currentIndex, direction, isDisabled, }: {
|
|
1902
|
+
items: T[];
|
|
1903
|
+
currentIndex: number;
|
|
1904
|
+
direction: "next" | "previous";
|
|
1905
|
+
isDisabled: (item: T) => boolean;
|
|
1906
|
+
}): number;
|
|
1970
1907
|
declare function useComboboxState<T extends string>(state: ComboboxState<T>): ComboboxStateSnapshot<T>;
|
|
1971
1908
|
|
|
1909
|
+
type MoveOptions = {
|
|
1910
|
+
indexPaths: number[][];
|
|
1911
|
+
to: number[];
|
|
1912
|
+
};
|
|
1913
|
+
type MoveTreeItemOptions<T> = {
|
|
1914
|
+
root: T;
|
|
1915
|
+
move: (root: T, options: MoveOptions) => T;
|
|
1916
|
+
position: RelativeDropPosition;
|
|
1917
|
+
sourceIndexPath: number[];
|
|
1918
|
+
targetIndexPath: number[];
|
|
1919
|
+
};
|
|
1920
|
+
declare function moveTreeItem<T>({ root, move, position, sourceIndexPath, targetIndexPath, }: MoveTreeItemOptions<T>): T;
|
|
1921
|
+
type AcceptsDropOptions = {
|
|
1922
|
+
sourceIndexPath: number[];
|
|
1923
|
+
targetIndexPath: number[];
|
|
1924
|
+
position: RelativeDropPosition;
|
|
1925
|
+
/**
|
|
1926
|
+
* Whether to allow dropping the source item within the same parent as the target item.
|
|
1927
|
+
*/
|
|
1928
|
+
allowSiblings: boolean;
|
|
1929
|
+
/**
|
|
1930
|
+
* Whether to allow dropping the source item within itself or one of its descendants.
|
|
1931
|
+
*/
|
|
1932
|
+
allowRecursion: boolean;
|
|
1933
|
+
};
|
|
1934
|
+
declare function acceptsDrop({ sourceIndexPath, targetIndexPath, position, allowSiblings, allowRecursion, }: AcceptsDropOptions): boolean;
|
|
1935
|
+
|
|
1972
1936
|
/**
|
|
1973
1937
|
* Updates the selection state based on user interaction.
|
|
1974
1938
|
* Handles single selection, multi-selection with meta/ctrl, and range selection with shift.
|
|
@@ -2063,9 +2027,9 @@ interface ToolbarProps<T extends string = string> {
|
|
|
2063
2027
|
shouldBindKeyboardShortcuts?: boolean;
|
|
2064
2028
|
}
|
|
2065
2029
|
declare function Toolbar<T extends string = string>({ children, logo, leftMenuItems, rightMenuItems, onSelectMenuItem, shouldBindKeyboardShortcuts, }: ToolbarProps<T>): React__default.JSX.Element;
|
|
2066
|
-
declare
|
|
2030
|
+
declare const ToolbarMenu: <T extends string>(props: {
|
|
2067
2031
|
items: MenuItem<T>[];
|
|
2068
2032
|
onSelectMenuItem?: (value: T) => void;
|
|
2069
|
-
})
|
|
2033
|
+
}) => React__default.ReactElement | null;
|
|
2070
2034
|
|
|
2071
|
-
export { ActionMenu, ActivityIndicator, AnimatePresence, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, type BaseComboboxProps, BaseToolbar, type BaseToolbarProps, Body, BreadcrumbText, Button, type ButtonRootProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, CONTENT_AREA_ID, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionProps, type CollectionRef, type CollectionRenderActionProps, type CollectionThumbnailProps, type CollectionThumbnailSize, type CollectionViewType, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, 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, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, Grid, GridView,
|
|
2035
|
+
export { AIAssistantInput, AIAssistantLayout, AIAssistantLoadingIndicator, type AcceptsDropOptions, ActionMenu, ActivityIndicator, AnimatePresence, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, Banner, type BannerProps, type BaseComboboxProps, BaseToolbar, type BaseToolbarProps, Body, 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, 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, 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, type SeparatorItem, type SetNumberMode, type SideOptions, type SideType, type SidebarRef, type SketchPattern, Slider, Small, Sortable, type SortableItemContextProps, 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, UserAvatar, UserPointer, type UserPointerProps, WorkspaceLayout, type WorkspaceLayoutProps, type WorkspaceLayoutRef, acceptsDrop, colorForStringValues, colorFromString, createSectionedMenu, cssVars, cx, defaultAcceptsDrop, filterWithGroupedSections, fuzzyFilter, fuzzyScore, fuzzyTokenize, getFieldSpacing, getGradientBackground, getGridSize, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, getThumbnailColors, isMenuItemSectionHeader, isNonSelectableMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, labeledFieldStyles, mediaQuery, mergeConflictingClassNames, moveTreeItem, normalizeListTargetIndex, popoverStyle, 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, usePreservePanelSize, useTheme, validateDropIndicator, withSeparatorElements };
|