@noya-app/noya-designsystem 0.1.31 → 0.1.33
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 +20 -12
- package/.turbo/turbo-lint.log +2 -1
- package/CHANGELOG.md +14 -0
- package/README.md +13 -1
- package/dist/index.css +1 -0
- package/dist/index.d.ts +132 -509
- package/dist/index.js +4167 -2716
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4097 -2643
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -6
- package/src/components/ActivityIndicator.tsx +4 -36
- package/src/components/Avatar.tsx +63 -62
- package/src/components/Button.tsx +53 -172
- package/src/components/Chip.tsx +117 -150
- package/src/components/ContextMenu.tsx +13 -35
- package/src/components/Dialog.tsx +66 -54
- package/src/components/Divider.tsx +31 -41
- package/src/components/DraggableMenuButton.tsx +29 -30
- package/src/components/DropdownMenu.tsx +30 -40
- package/src/components/FillInputField.tsx +16 -26
- package/src/components/FillPreviewBackground.tsx +18 -22
- package/src/components/FloatingWindow.tsx +4 -7
- package/src/components/GridView.tsx +70 -200
- package/src/components/IconButton.tsx +1 -5
- package/src/components/InputField.tsx +191 -194
- package/src/components/InputFieldWithCompletions.tsx +20 -27
- package/src/components/InspectorContainer.tsx +4 -9
- package/src/components/InspectorPrimitives.tsx +135 -109
- package/src/components/Label.tsx +5 -36
- package/src/components/LabeledElementView.tsx +5 -26
- package/src/components/ListView.tsx +239 -167
- package/src/components/Popover.tsx +15 -39
- package/src/components/Progress.tsx +21 -44
- package/src/components/RadioGroup.tsx +6 -71
- package/src/components/ScrollArea.tsx +11 -39
- package/src/components/SelectMenu.tsx +31 -48
- package/src/components/Slider.tsx +7 -43
- package/src/components/Spacer.tsx +6 -18
- package/src/components/Switch.tsx +4 -42
- package/src/components/Text.tsx +31 -66
- package/src/components/TextArea.tsx +5 -31
- package/src/components/Toast.tsx +15 -57
- package/src/components/Tooltip.tsx +4 -13
- package/src/components/WorkspaceLayout.tsx +4 -14
- package/src/components/internal/Menu.tsx +37 -83
- package/src/contexts/DesignSystemConfiguration.tsx +1 -47
- package/src/contexts/DialogContext.tsx +2 -10
- package/src/hooks/useDarkMode.ts +14 -0
- package/src/index.css +108 -0
- package/src/index.tsx +3 -4
- package/src/theme/index.ts +4 -16
- package/src/utils/tailwind.ts +17 -0
- package/tailwind.config.ts +106 -166
- package/tsup.config.ts +16 -0
- package/dist/index.d.mts +0 -1443
- package/src/components/Grid.tsx +0 -54
- package/src/components/Stack.tsx +0 -164
- package/src/theme/dark.ts +0 -45
- package/src/theme/light.ts +0 -226
- package/src/utils/breakpoints.ts +0 -45
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { CSSProperties, ReactNode, ComponentProps, SyntheticEvent, AriaRole, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, FocusEventHandler, InputHTMLAttributes, Ref, ReactHTML } from 'react';
|
|
3
|
-
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
4
|
-
import * as styled_components from 'styled-components';
|
|
5
|
-
import { CSSObject, CSSProperties as CSSProperties$1 } from 'styled-components';
|
|
6
3
|
import * as Icons from '@noya-app/noya-icons';
|
|
7
4
|
export { Icons };
|
|
8
5
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -17,16 +14,17 @@ import { IItemScore } from 'vscode-fuzzy-scorer';
|
|
|
17
14
|
import { useSortable } from '@dnd-kit/sortable';
|
|
18
15
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
19
16
|
import { SelectProps } from '@radix-ui/react-select';
|
|
17
|
+
import { Config } from 'tailwindcss';
|
|
20
18
|
import { ImperativePanelGroupHandle } from 'react-resizable-panels';
|
|
21
19
|
import { RgbaColor } from '@noya-app/noya-colorpicker';
|
|
22
20
|
|
|
23
|
-
interface Props$
|
|
21
|
+
interface Props$f {
|
|
24
22
|
size?: number;
|
|
25
23
|
opacity?: number;
|
|
26
24
|
color?: string;
|
|
27
25
|
trackColor?: string;
|
|
28
26
|
}
|
|
29
|
-
declare const ActivityIndicator: (props: Props$
|
|
27
|
+
declare const ActivityIndicator: (props: Props$f) => React__default.ReactElement | null;
|
|
30
28
|
|
|
31
29
|
declare const Avatar: (props: {
|
|
32
30
|
image?: string;
|
|
@@ -43,30 +41,20 @@ declare function AvatarStack({ size, children, }: {
|
|
|
43
41
|
}): React__default.JSX.Element;
|
|
44
42
|
|
|
45
43
|
type ButtonVariant = "normal" | "primary" | "primaryGradient" | "secondary" | "secondaryBright" | "white" | "thin" | "floating" | "none";
|
|
46
|
-
type ButtonSize = "small" | "normal" | "large";
|
|
47
|
-
declare const ButtonElement: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
48
|
-
$active: boolean;
|
|
49
|
-
$variant: ButtonVariant;
|
|
50
|
-
$size: ButtonSize;
|
|
51
|
-
$flex?: CSSProperties["flex"];
|
|
52
|
-
$defaultBackground?: string;
|
|
53
|
-
}>> & string;
|
|
44
|
+
type ButtonSize = "small" | "normal" | "large" | "floating";
|
|
54
45
|
interface ButtonRootProps {
|
|
55
46
|
id?: string;
|
|
56
47
|
className?: string;
|
|
57
48
|
style?: CSSProperties;
|
|
58
|
-
flex?: CSSProperties["flex"];
|
|
59
49
|
tabIndex?: number;
|
|
60
50
|
children: ReactNode;
|
|
61
51
|
active?: boolean;
|
|
62
52
|
disabled?: boolean;
|
|
63
|
-
/** @default normal */
|
|
64
53
|
variant?: ButtonVariant;
|
|
65
|
-
/** @default normal */
|
|
66
54
|
size?: ButtonSize;
|
|
67
55
|
tooltip?: ReactNode;
|
|
68
|
-
onClick?: (event: React__default.MouseEvent) => void;
|
|
69
|
-
onPointerDown?: (event: React__default.PointerEvent) => void;
|
|
56
|
+
onClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
57
|
+
onPointerDown?: (event: React__default.PointerEvent<HTMLButtonElement>) => void;
|
|
70
58
|
contentStyle?: CSSProperties;
|
|
71
59
|
defaultBackground?: string;
|
|
72
60
|
as?: React__default.ElementType;
|
|
@@ -100,152 +88,6 @@ interface ChipProps {
|
|
|
100
88
|
}
|
|
101
89
|
declare const Chip: (props: ChipProps & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement | null;
|
|
102
90
|
|
|
103
|
-
declare const name$1: string;
|
|
104
|
-
declare const colors$1: {
|
|
105
|
-
logo: {
|
|
106
|
-
fill: string;
|
|
107
|
-
highlight: string;
|
|
108
|
-
};
|
|
109
|
-
background: string;
|
|
110
|
-
text: string;
|
|
111
|
-
textMuted: string;
|
|
112
|
-
textSubtle: string;
|
|
113
|
-
textDisabled: string;
|
|
114
|
-
textDecorativeLight: string;
|
|
115
|
-
dividerSubtle: string;
|
|
116
|
-
divider: string;
|
|
117
|
-
dividerStrong: string;
|
|
118
|
-
primary: string;
|
|
119
|
-
primaryLight: string;
|
|
120
|
-
primaryPastel: string;
|
|
121
|
-
secondary: string;
|
|
122
|
-
secondaryLight: string;
|
|
123
|
-
secondaryPastel: string;
|
|
124
|
-
secondaryBright: string;
|
|
125
|
-
warning: string;
|
|
126
|
-
neutralBackground: string;
|
|
127
|
-
inputBackground: string;
|
|
128
|
-
inputBackgroundLight: string;
|
|
129
|
-
codeBackground: string;
|
|
130
|
-
codeBackgroundLight: string;
|
|
131
|
-
readonly codeBackgroundDark: string;
|
|
132
|
-
codeBackgroundDecorativeDark: string;
|
|
133
|
-
selectedBackground: string;
|
|
134
|
-
transparentChecker: string;
|
|
135
|
-
activeBackground: string;
|
|
136
|
-
scrollbar: string;
|
|
137
|
-
placeholderDots: string;
|
|
138
|
-
breadcrumb: {
|
|
139
|
-
readonly text: string;
|
|
140
|
-
readonly textHover: string;
|
|
141
|
-
readonly icon: string;
|
|
142
|
-
};
|
|
143
|
-
listView: {
|
|
144
|
-
raisedBackground: string;
|
|
145
|
-
editingBackground: string;
|
|
146
|
-
};
|
|
147
|
-
canvas: {
|
|
148
|
-
background: string;
|
|
149
|
-
readonly selectionStroke: string;
|
|
150
|
-
dragHandleStroke: string;
|
|
151
|
-
measurement: string;
|
|
152
|
-
sliceOutline: string;
|
|
153
|
-
grid: string;
|
|
154
|
-
};
|
|
155
|
-
sidebar: {
|
|
156
|
-
background: string;
|
|
157
|
-
backgroundTransparent: string;
|
|
158
|
-
};
|
|
159
|
-
popover: {
|
|
160
|
-
background: string;
|
|
161
|
-
divider: string;
|
|
162
|
-
};
|
|
163
|
-
slider: {
|
|
164
|
-
background: string;
|
|
165
|
-
border: string;
|
|
166
|
-
};
|
|
167
|
-
radioGroup: {
|
|
168
|
-
background: string;
|
|
169
|
-
};
|
|
170
|
-
icon: string;
|
|
171
|
-
iconSelected: string;
|
|
172
|
-
mask: string;
|
|
173
|
-
imageOverlay: string;
|
|
174
|
-
readonly dragOutline: string;
|
|
175
|
-
selection: string;
|
|
176
|
-
thumbnailBackground: string;
|
|
177
|
-
thumbnailShadow: string;
|
|
178
|
-
inlineCode: {
|
|
179
|
-
text: string;
|
|
180
|
-
background: string;
|
|
181
|
-
};
|
|
182
|
-
textLink: string;
|
|
183
|
-
textLinkFocused: string;
|
|
184
|
-
};
|
|
185
|
-
declare const fonts: {
|
|
186
|
-
normal: string;
|
|
187
|
-
monospace: string;
|
|
188
|
-
};
|
|
189
|
-
declare const textStyles: {
|
|
190
|
-
title: CSSObject;
|
|
191
|
-
subtitle: CSSObject;
|
|
192
|
-
heading1: CSSObject;
|
|
193
|
-
heading2: CSSObject;
|
|
194
|
-
heading3: CSSObject;
|
|
195
|
-
heading4: CSSObject;
|
|
196
|
-
heading5: CSSObject;
|
|
197
|
-
body: CSSObject;
|
|
198
|
-
small: CSSObject;
|
|
199
|
-
button: CSSObject;
|
|
200
|
-
code: CSSObject;
|
|
201
|
-
label: CSSObject;
|
|
202
|
-
};
|
|
203
|
-
declare const sizes: {
|
|
204
|
-
inset: {
|
|
205
|
-
top: number;
|
|
206
|
-
};
|
|
207
|
-
sidebarWidth: number;
|
|
208
|
-
toolbar: {
|
|
209
|
-
height: number;
|
|
210
|
-
itemSeparator: number;
|
|
211
|
-
};
|
|
212
|
-
inspector: {
|
|
213
|
-
horizontalSeparator: number;
|
|
214
|
-
verticalSeparator: number;
|
|
215
|
-
};
|
|
216
|
-
spacing: {
|
|
217
|
-
nano: number;
|
|
218
|
-
micro: number;
|
|
219
|
-
small: number;
|
|
220
|
-
medium: number;
|
|
221
|
-
large: number;
|
|
222
|
-
xlarge: number;
|
|
223
|
-
xxlarge: number;
|
|
224
|
-
};
|
|
225
|
-
dialog: {
|
|
226
|
-
padding: number;
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
declare const lightTheme_fonts: typeof fonts;
|
|
231
|
-
declare const lightTheme_sizes: typeof sizes;
|
|
232
|
-
declare const lightTheme_textStyles: typeof textStyles;
|
|
233
|
-
declare namespace lightTheme {
|
|
234
|
-
export { colors$1 as colors, lightTheme_fonts as fonts, name$1 as name, lightTheme_sizes as sizes, lightTheme_textStyles as textStyles };
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
type Theme = typeof lightTheme;
|
|
238
|
-
declare module 'styled-components' {
|
|
239
|
-
interface DefaultTheme extends Theme {
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
interface Colors {
|
|
243
|
-
}
|
|
244
|
-
type PickByValue<T, V> = Pick<T, {
|
|
245
|
-
[K in keyof T]-?: T[K] extends V ? K : never;
|
|
246
|
-
}[keyof T]>;
|
|
247
|
-
type ThemeColorName = keyof PickByValue<Theme['colors'], string>;
|
|
248
|
-
|
|
249
91
|
type IconName = keyof typeof Icons;
|
|
250
92
|
|
|
251
93
|
declare function renderIcon(iconName: Exclude<ReactNode, string> | IconName): ReactNode;
|
|
@@ -289,12 +131,11 @@ interface MenuProps<T extends string> {
|
|
|
289
131
|
}
|
|
290
132
|
declare const ContextMenu: <T extends string>(props: MenuProps<T>) => React__default.ReactElement | null;
|
|
291
133
|
|
|
292
|
-
declare const StyledContent:
|
|
293
|
-
declare const CloseButtonContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
134
|
+
declare const StyledContent: (props: Omit<DialogPrimitive.DialogContentProps & React__default.RefAttributes<HTMLDivElement>, "ref"> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
294
135
|
interface IDialog {
|
|
295
136
|
containsElement: (element: HTMLElement) => boolean;
|
|
296
137
|
}
|
|
297
|
-
interface Props$
|
|
138
|
+
interface Props$e {
|
|
298
139
|
title?: ReactNode;
|
|
299
140
|
description?: ReactNode;
|
|
300
141
|
children?: ReactNode;
|
|
@@ -304,13 +145,15 @@ interface Props$h {
|
|
|
304
145
|
onOpenAutoFocus?: ComponentProps<typeof DialogPrimitive.Content>["onOpenAutoFocus"];
|
|
305
146
|
closeOnInteractOutside?: boolean;
|
|
306
147
|
}
|
|
307
|
-
declare const Dialog: (props: Props$
|
|
308
|
-
declare const FullscreenDialog: (props: Props$
|
|
148
|
+
declare const Dialog: (props: Props$e & React__default.RefAttributes<IDialog>) => React__default.ReactElement | null;
|
|
149
|
+
declare const FullscreenDialog: (props: Props$e & React__default.RefAttributes<IDialog>) => React__default.ReactElement | null;
|
|
309
150
|
|
|
310
|
-
type DividerVariant = "normal" | "
|
|
151
|
+
type DividerVariant = "normal" | "subtle" | "strong";
|
|
311
152
|
interface DividerProps {
|
|
312
153
|
variant?: DividerVariant;
|
|
313
|
-
overflow?: number;
|
|
154
|
+
overflow?: number | string;
|
|
155
|
+
className?: string;
|
|
156
|
+
style?: React__default.CSSProperties;
|
|
314
157
|
}
|
|
315
158
|
declare const Divider: (props: DividerProps) => React__default.ReactElement | null;
|
|
316
159
|
declare const DividerVertical: (props: DividerProps) => React__default.ReactElement | null;
|
|
@@ -327,6 +170,7 @@ declare const DraggableMenuButton: <T extends string>(props: {
|
|
|
327
170
|
declare const DropdownMenu: <T extends string>(props: MenuProps<T> & {
|
|
328
171
|
open?: boolean;
|
|
329
172
|
onCloseAutoFocus?: React__default.EventHandler<SyntheticEvent<unknown>>;
|
|
173
|
+
emptyState?: React__default.ReactNode;
|
|
330
174
|
} & Pick<RadixDropdownMenu.DropdownMenuContentProps & React__default.RefAttributes<HTMLDivElement>, "align" | "side" | "sideOffset" | "alignOffset" | "collisionPadding"> & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement | null;
|
|
331
175
|
|
|
332
176
|
declare const SUPPORTED_IMAGE_UPLOAD_TYPES: ("image/png" | "image/jpeg" | "image/webp" | "image/svg+xml" | "application/pdf")[];
|
|
@@ -340,22 +184,21 @@ type SketchPattern = {
|
|
|
340
184
|
patternTileScale: number;
|
|
341
185
|
};
|
|
342
186
|
|
|
343
|
-
interface Props$
|
|
187
|
+
interface Props$d {
|
|
344
188
|
id?: string;
|
|
345
189
|
value?: Sketch.Color | Sketch.Gradient | SketchPattern;
|
|
346
|
-
flex?: CSSProperties["flex"];
|
|
347
190
|
}
|
|
348
|
-
declare const FillInputField: (props: Props$
|
|
191
|
+
declare const FillInputField: (props: Props$d & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement | null;
|
|
349
192
|
|
|
350
193
|
declare const PatternPreviewBackground: (props: {
|
|
351
194
|
fillType: Sketch.PatternFillType;
|
|
352
195
|
tileScale: number;
|
|
353
196
|
imageRef: string;
|
|
354
197
|
}) => React__default.ReactElement | null;
|
|
355
|
-
interface Props$
|
|
198
|
+
interface Props$c {
|
|
356
199
|
value?: Sketch.Color | Sketch.Gradient | SketchPattern;
|
|
357
200
|
}
|
|
358
|
-
declare const FillPreviewBackground: (props: Props$
|
|
201
|
+
declare const FillPreviewBackground: (props: Props$c) => React__default.ReactElement | null;
|
|
359
202
|
|
|
360
203
|
interface FloatingWindowProps {
|
|
361
204
|
title?: string;
|
|
@@ -376,7 +219,7 @@ interface FloatingWindowProps {
|
|
|
376
219
|
}
|
|
377
220
|
declare const FloatingWindow: React__default.FC<FloatingWindowProps>;
|
|
378
221
|
|
|
379
|
-
interface Props$
|
|
222
|
+
interface Props$b {
|
|
380
223
|
value: Sketch.GradientStop[];
|
|
381
224
|
selectedStop: number;
|
|
382
225
|
onChangeColor: (color: Sketch.Color) => void;
|
|
@@ -385,32 +228,7 @@ interface Props$e {
|
|
|
385
228
|
onDelete: () => void;
|
|
386
229
|
onSelectStop: (index: number) => void;
|
|
387
230
|
}
|
|
388
|
-
declare const GradientPicker: (props: Props$
|
|
389
|
-
|
|
390
|
-
type GridProps = {
|
|
391
|
-
columns?: string;
|
|
392
|
-
rows?: string;
|
|
393
|
-
alignItems?: 'start' | 'center' | 'end';
|
|
394
|
-
justifyItems?: 'start' | 'center' | 'end';
|
|
395
|
-
placeItems?: 'start' | 'center' | 'end';
|
|
396
|
-
width?: number | string;
|
|
397
|
-
minWidth?: number | string;
|
|
398
|
-
maxWidth?: number | string;
|
|
399
|
-
height?: number | string;
|
|
400
|
-
minHeight?: number | string;
|
|
401
|
-
maxHeight?: number | string;
|
|
402
|
-
padding?: number | string;
|
|
403
|
-
paddingX?: number | string;
|
|
404
|
-
paddingXStart?: number | string;
|
|
405
|
-
paddingXEnd?: number | string;
|
|
406
|
-
paddingY?: number | string;
|
|
407
|
-
paddingYStart?: number | string;
|
|
408
|
-
paddingYEnd?: number | string;
|
|
409
|
-
gap?: number | string;
|
|
410
|
-
gapX?: number | string;
|
|
411
|
-
gapY?: number | string;
|
|
412
|
-
background?: keyof Colors;
|
|
413
|
-
};
|
|
231
|
+
declare const GradientPicker: (props: Props$b) => React__default.ReactElement | null;
|
|
414
232
|
|
|
415
233
|
type GridViewSize = "xxs" | "xs" | "small" | "medium" | "large" | "xl";
|
|
416
234
|
interface ItemProps$2<MenuItemType extends string = string> {
|
|
@@ -445,14 +263,14 @@ declare namespace GridView {
|
|
|
445
263
|
const Item: <MenuItemType extends string>(props: ItemProps$2<MenuItemType> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
446
264
|
const Section: (props: {
|
|
447
265
|
children?: ReactNode;
|
|
448
|
-
|
|
266
|
+
className?: string;
|
|
449
267
|
}) => React__default.ReactElement | null;
|
|
450
268
|
const SectionHeader: (props: {
|
|
451
269
|
title: string;
|
|
452
270
|
}) => React__default.ReactElement | null;
|
|
453
271
|
}
|
|
454
272
|
|
|
455
|
-
declare const IconButton: (props: Omit<ButtonRootProps, "
|
|
273
|
+
declare const IconButton: (props: Omit<ButtonRootProps, "size" | "flex" | "children" | "variant"> & {
|
|
456
274
|
iconName: IconName;
|
|
457
275
|
className?: string;
|
|
458
276
|
style?: CSSProperties;
|
|
@@ -461,7 +279,7 @@ declare const IconButton: (props: Omit<ButtonRootProps, "children" | "size" | "f
|
|
|
461
279
|
size?: number;
|
|
462
280
|
} & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement | null;
|
|
463
281
|
|
|
464
|
-
type Props$
|
|
282
|
+
type Props$a = {
|
|
465
283
|
id?: string;
|
|
466
284
|
style?: any;
|
|
467
285
|
className?: string;
|
|
@@ -479,13 +297,13 @@ type Props$d = {
|
|
|
479
297
|
onFocusChange?: (isFocused: boolean) => void;
|
|
480
298
|
onBlur?: FocusEventHandler;
|
|
481
299
|
} & Pick<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "autoCapitalize" | "autoCorrect" | "spellCheck" | "autoFocus">;
|
|
482
|
-
type ReadOnlyProps = Props$
|
|
300
|
+
type ReadOnlyProps = Props$a & {
|
|
483
301
|
readOnly: true;
|
|
484
302
|
};
|
|
485
|
-
type ControlledProps = Props$
|
|
303
|
+
type ControlledProps = Props$a & {
|
|
486
304
|
onChange: (value: string) => void;
|
|
487
305
|
};
|
|
488
|
-
type SubmittableProps = Props$
|
|
306
|
+
type SubmittableProps = Props$a & {
|
|
489
307
|
onSubmit: (value: string) => void;
|
|
490
308
|
allowSubmittingWithSameValue?: boolean;
|
|
491
309
|
submitAutomaticallyAfterDelay?: number;
|
|
@@ -498,6 +316,7 @@ interface InputFieldLabelProps {
|
|
|
498
316
|
children?: ReactNode;
|
|
499
317
|
pointerEvents?: Property.PointerEvents;
|
|
500
318
|
style?: React__default.CSSProperties;
|
|
319
|
+
className?: string;
|
|
501
320
|
}
|
|
502
321
|
interface InputFieldDropdownProps<T extends string> {
|
|
503
322
|
id?: string;
|
|
@@ -505,17 +324,10 @@ interface InputFieldDropdownProps<T extends string> {
|
|
|
505
324
|
onSelect: (value: T) => void;
|
|
506
325
|
children?: ReactNode;
|
|
507
326
|
}
|
|
508
|
-
type
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
$labelPosition: LabelPosition;
|
|
513
|
-
$labelSize?: number;
|
|
514
|
-
$hasDropdown: boolean;
|
|
515
|
-
$textAlign?: Property.TextAlign;
|
|
516
|
-
$variant?: InputFieldVariant;
|
|
517
|
-
$size: InputFieldSize;
|
|
518
|
-
}>> & string & Omit<(props: TextInputProps & React__default.RefAttributes<HTMLInputElement>) => React__default.ReactElement | null, keyof React__default.Component<any, {}, any>>;
|
|
327
|
+
type InputFieldInputProps = TextInputProps & {
|
|
328
|
+
textAlign?: Property.TextAlign;
|
|
329
|
+
variant?: "bare";
|
|
330
|
+
};
|
|
519
331
|
type InputFieldNumberInputProps = Omit<TextInputProps, "value" | "onChange" | "onKeyDown" | "onSubmit"> & {
|
|
520
332
|
value: number | undefined;
|
|
521
333
|
onNudge?: (value: number) => void;
|
|
@@ -545,22 +357,19 @@ interface InputFieldRootProps {
|
|
|
545
357
|
}
|
|
546
358
|
declare namespace InputField {
|
|
547
359
|
const Root: (props: InputFieldRootProps) => React__default.ReactElement | null;
|
|
548
|
-
const Input: (props:
|
|
549
|
-
textAlign?: Property.TextAlign;
|
|
550
|
-
variant?: "bare";
|
|
551
|
-
}) & React__default.RefAttributes<HTMLInputElement>) => React__default.ReactElement | null;
|
|
360
|
+
const Input: (props: InputFieldInputProps & React__default.RefAttributes<HTMLInputElement>) => React__default.ReactElement | null;
|
|
552
361
|
const Typeahead: (props: {
|
|
553
362
|
prefix: string;
|
|
554
363
|
value: string;
|
|
555
364
|
}) => React__default.ReactElement | null;
|
|
556
365
|
const NumberInput: (props: InputFieldNumberInputProps) => React__default.ReactElement | null;
|
|
557
366
|
const DropdownMenu: <T extends string>(props: InputFieldDropdownProps<T>) => React__default.ReactElement | null;
|
|
558
|
-
const Button: (props:
|
|
559
|
-
children?: ReactNode;
|
|
560
|
-
onClick?: () => void;
|
|
561
|
-
} & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement | null;
|
|
367
|
+
const Button: (props: React__default.ButtonHTMLAttributes<HTMLButtonElement> & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement | null;
|
|
562
368
|
const Label: (props: InputFieldLabelProps & React__default.RefAttributes<HTMLLabelElement>) => React__default.ReactElement | null;
|
|
563
|
-
const PrimitiveElement:
|
|
369
|
+
const PrimitiveElement: ({ readOnly, disabled, className, ...props }: {
|
|
370
|
+
readOnly?: boolean;
|
|
371
|
+
disabled?: boolean;
|
|
372
|
+
} & React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => React__default.JSX.Element;
|
|
564
373
|
}
|
|
565
374
|
|
|
566
375
|
declare function fuzzyScore({ item, query }: {
|
|
@@ -731,7 +540,10 @@ type ListViewRootProps = {
|
|
|
731
540
|
colorScheme?: ListColorScheme;
|
|
732
541
|
};
|
|
733
542
|
declare namespace ListView {
|
|
734
|
-
const RowTitle: (props:
|
|
543
|
+
const RowTitle: (props: {
|
|
544
|
+
className?: string;
|
|
545
|
+
children: React__default.ReactNode;
|
|
546
|
+
} & React__default.HTMLAttributes<HTMLSpanElement>) => React__default.ReactElement | null;
|
|
735
547
|
const EditableRowTitle: (props: EditableRowProps) => React__default.ReactElement | null;
|
|
736
548
|
const Row: <MenuItemType extends string>(props: ListViewRowProps<MenuItemType> & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement | null;
|
|
737
549
|
const Root: <T = any>(props: ((ChildrenProps | RenderProps<T>) & ListViewRootProps) & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement | null;
|
|
@@ -740,21 +552,18 @@ declare namespace ListView {
|
|
|
740
552
|
type ItemInfo = ListViewItemInfo;
|
|
741
553
|
type RowProps<MenuItemType extends string = string> = ListViewRowProps<MenuItemType>;
|
|
742
554
|
type VirtualizedList = IVirtualizedList;
|
|
743
|
-
const DragIndicator:
|
|
555
|
+
const DragIndicator: (props: React__default.HTMLAttributes<HTMLDivElement> & {
|
|
744
556
|
$relativeDropPosition: RelativeDropPosition;
|
|
745
557
|
$gap: number;
|
|
746
558
|
$offsetLeft: number;
|
|
747
559
|
$colorScheme: ListColorScheme;
|
|
748
|
-
}
|
|
560
|
+
} & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
749
561
|
const rowHeight = 31;
|
|
750
562
|
const sectionHeaderLabelHeight = 27;
|
|
751
563
|
const calculateHeight: (items: number, headerCount: number, headerVariant: ListViewSectionHeaderVariant) => number;
|
|
752
564
|
const normalizeDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
753
565
|
}
|
|
754
566
|
|
|
755
|
-
declare const CompletionToken: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
756
|
-
$type: IToken["type"];
|
|
757
|
-
}>> & string;
|
|
758
567
|
interface CompletionMenuProps {
|
|
759
568
|
items: CompletionListItem[];
|
|
760
569
|
selectedIndex: number;
|
|
@@ -763,7 +572,7 @@ interface CompletionMenuProps {
|
|
|
763
572
|
listSize: Size;
|
|
764
573
|
}
|
|
765
574
|
declare const CompletionMenu: (props: CompletionMenuProps & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement | null;
|
|
766
|
-
type
|
|
575
|
+
type InputFieldWithCompletionsProps = {
|
|
767
576
|
loading?: boolean;
|
|
768
577
|
initialValue?: string;
|
|
769
578
|
placeholder?: string;
|
|
@@ -781,12 +590,12 @@ type Props$c = {
|
|
|
781
590
|
hideChildrenWhenFocused?: boolean;
|
|
782
591
|
hideMenuWhenEmptyValue?: boolean;
|
|
783
592
|
};
|
|
784
|
-
interface
|
|
593
|
+
interface InputFieldWithCompletionsRef {
|
|
785
594
|
focus(): void;
|
|
786
595
|
setValue(value: string): void;
|
|
787
596
|
selectAllInputText(): void;
|
|
788
597
|
}
|
|
789
|
-
declare const InputFieldWithCompletions: (props:
|
|
598
|
+
declare const InputFieldWithCompletions: (props: InputFieldWithCompletionsProps & React__default.RefAttributes<InputFieldWithCompletionsRef>) => React__default.ReactElement | null;
|
|
790
599
|
|
|
791
600
|
declare const InspectorContainer: (props: {
|
|
792
601
|
header?: React__default.ReactNode;
|
|
@@ -803,9 +612,6 @@ interface LabelRootProps {
|
|
|
803
612
|
children: ReactNode;
|
|
804
613
|
}
|
|
805
614
|
declare namespace Label {
|
|
806
|
-
const Label: (props: styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {
|
|
807
|
-
$selected?: boolean;
|
|
808
|
-
}>) => React__default.ReactElement | null;
|
|
809
615
|
const Root: (props: LabelRootProps) => React__default.ReactElement | null;
|
|
810
616
|
}
|
|
811
617
|
|
|
@@ -819,7 +625,7 @@ interface ContainerProps {
|
|
|
819
625
|
declare const LabeledElementView: (props: ContainerProps) => React__default.ReactElement | null;
|
|
820
626
|
|
|
821
627
|
type PopoverVariant = "normal" | "large";
|
|
822
|
-
interface Props$
|
|
628
|
+
interface Props$9 extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content"]>, "onOpenAutoFocus" | "onCloseAutoFocus" | "onPointerDownOutside" | "onInteractOutside" | "onFocusOutside" | "side"> {
|
|
823
629
|
children: React__default.ReactNode;
|
|
824
630
|
trigger: React__default.ReactNode;
|
|
825
631
|
variant?: PopoverVariant;
|
|
@@ -830,15 +636,13 @@ interface Props$b extends Pick<ComponentProps<(typeof PopoverPrimitive)["Content
|
|
|
830
636
|
onClickClose?: () => void;
|
|
831
637
|
showArrow?: boolean;
|
|
832
638
|
}
|
|
833
|
-
declare function Popover({ children, trigger, variant, closable, open, side, sideOffset, showArrow, onOpenChange, onOpenAutoFocus, onCloseAutoFocus, onPointerDownOutside, onInteractOutside, onFocusOutside, onClickClose, }: Props$
|
|
639
|
+
declare function Popover({ children, trigger, variant, closable, open, side, sideOffset, showArrow, onOpenChange, onOpenAutoFocus, onCloseAutoFocus, onPointerDownOutside, onInteractOutside, onFocusOutside, onClickClose, }: Props$9): React__default.JSX.Element;
|
|
834
640
|
|
|
835
|
-
type ProgressVariant =
|
|
836
|
-
declare function Progress({ value,
|
|
641
|
+
type ProgressVariant = "normal" | "warning" | "primary" | "secondary";
|
|
642
|
+
declare function Progress({ value, variant, className, }: {
|
|
837
643
|
value: number;
|
|
838
|
-
height?: CSSProperties['height'];
|
|
839
|
-
width?: CSSProperties['width'];
|
|
840
|
-
flex?: CSSProperties['flex'];
|
|
841
644
|
variant?: ProgressVariant;
|
|
645
|
+
className?: string;
|
|
842
646
|
}): React__default.JSX.Element;
|
|
843
647
|
|
|
844
648
|
type RadioGroupColorScheme = "primary" | "secondary";
|
|
@@ -848,7 +652,7 @@ interface ItemProps {
|
|
|
848
652
|
children: ReactNode;
|
|
849
653
|
disabled?: boolean;
|
|
850
654
|
}
|
|
851
|
-
interface Props$
|
|
655
|
+
interface Props$8 {
|
|
852
656
|
id?: string;
|
|
853
657
|
value?: string;
|
|
854
658
|
onValueChange?: (value: string) => void;
|
|
@@ -858,16 +662,16 @@ interface Props$a {
|
|
|
858
662
|
children: ReactNode;
|
|
859
663
|
}
|
|
860
664
|
declare namespace RadioGroup {
|
|
861
|
-
const Root: (props: Props$
|
|
665
|
+
const Root: (props: Props$8) => React__default.ReactElement | null;
|
|
862
666
|
const Item: (props: ItemProps & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement | null;
|
|
863
667
|
}
|
|
864
668
|
|
|
865
|
-
interface Props$
|
|
669
|
+
interface Props$7 {
|
|
866
670
|
children?: ReactNode | ((scrollElementRef: HTMLDivElement) => ReactNode);
|
|
867
671
|
}
|
|
868
|
-
declare const ScrollArea: (props: Props$
|
|
672
|
+
declare const ScrollArea: (props: Props$7) => React__default.ReactElement | null;
|
|
869
673
|
|
|
870
|
-
type Props$
|
|
674
|
+
type Props$6<T extends string> = {
|
|
871
675
|
id?: string;
|
|
872
676
|
style?: React__default.CSSProperties;
|
|
873
677
|
className?: string;
|
|
@@ -879,162 +683,66 @@ type Props$8<T extends string> = {
|
|
|
879
683
|
readOnly?: boolean;
|
|
880
684
|
label?: React__default.ReactNode;
|
|
881
685
|
} & Pick<SelectProps, "open">;
|
|
882
|
-
declare const SelectMenu: <T extends string = string>(props: Props$
|
|
686
|
+
declare const SelectMenu: <T extends string = string>(props: Props$6<T>) => React__default.ReactElement | null;
|
|
883
687
|
|
|
884
|
-
interface Props$
|
|
688
|
+
interface Props$5 {
|
|
885
689
|
id?: string;
|
|
886
690
|
value: number;
|
|
887
691
|
onValueChange: (value: number) => void;
|
|
888
692
|
min: number;
|
|
889
693
|
max: number;
|
|
890
694
|
}
|
|
891
|
-
declare const Slider: ({ id, value, onValueChange, min, max, }: Props$
|
|
695
|
+
declare const Slider: ({ id, value, onValueChange, min, max, }: Props$5) => React__default.JSX.Element;
|
|
892
696
|
|
|
893
|
-
interface Props$
|
|
697
|
+
interface Props$4 {
|
|
894
698
|
size?: number | string;
|
|
895
699
|
inline?: boolean;
|
|
896
700
|
}
|
|
897
701
|
declare namespace Spacer {
|
|
898
|
-
const Vertical: (props: Props$
|
|
899
|
-
const Horizontal: (props: Props$
|
|
702
|
+
const Vertical: (props: Props$4 & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement | null;
|
|
703
|
+
const Horizontal: (props: Props$4 & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement | null;
|
|
900
704
|
}
|
|
901
705
|
|
|
902
|
-
type BreakpointKey = number | string;
|
|
903
|
-
type Breakpoint<T extends object> = [BreakpointKey, T];
|
|
904
|
-
type BreakpointCollection<T extends object> = Breakpoint<T>[] | Record<BreakpointKey, T>;
|
|
905
|
-
|
|
906
|
-
declare function withSeparatorElements(elements: ReactNode, separator: ReactNode | (() => ReactNode)): (string | number | React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | Iterable<ReactNode> | React$1.ReactPortal)[];
|
|
907
|
-
|
|
908
|
-
interface StyleProps$1 {
|
|
909
|
-
display?: CSSProperties["display"];
|
|
910
|
-
visibility?: CSSProperties["visibility"];
|
|
911
|
-
position?: CSSProperties["position"];
|
|
912
|
-
zIndex?: CSSProperties["zIndex"];
|
|
913
|
-
gap?: CSSProperties["gap"];
|
|
914
|
-
inset?: CSSProperties["inset"];
|
|
915
|
-
top?: CSSProperties["top"];
|
|
916
|
-
right?: CSSProperties["right"];
|
|
917
|
-
bottom?: CSSProperties["bottom"];
|
|
918
|
-
left?: CSSProperties["left"];
|
|
919
|
-
flexDirection?: CSSProperties["flexDirection"];
|
|
920
|
-
justifyContent?: CSSProperties["justifyContent"];
|
|
921
|
-
alignItems?: CSSProperties["alignItems"];
|
|
922
|
-
alignSelf?: CSSProperties["alignSelf"];
|
|
923
|
-
flex?: CSSProperties["flex"];
|
|
924
|
-
flexWrap?: CSSProperties["flexWrap"];
|
|
925
|
-
height?: CSSProperties["height"];
|
|
926
|
-
minHeight?: CSSProperties["minHeight"];
|
|
927
|
-
maxHeight?: CSSProperties["maxHeight"];
|
|
928
|
-
width?: CSSProperties["width"];
|
|
929
|
-
minWidth?: CSSProperties["minWidth"];
|
|
930
|
-
maxWidth?: CSSProperties["maxWidth"];
|
|
931
|
-
aspectRatio?: CSSProperties["aspectRatio"];
|
|
932
|
-
padding?: CSSProperties["padding"];
|
|
933
|
-
paddingVertical?: string | number;
|
|
934
|
-
paddingHorizontal?: string | number;
|
|
935
|
-
margin?: CSSProperties["margin"];
|
|
936
|
-
background?: CSSProperties["background"];
|
|
937
|
-
backgroundSize?: CSSProperties["backgroundSize"];
|
|
938
|
-
backgroundPosition?: CSSProperties["backgroundPosition"];
|
|
939
|
-
borderRadius?: CSSProperties["borderRadius"];
|
|
940
|
-
overflowX?: CSSProperties["overflowX"];
|
|
941
|
-
overflowY?: CSSProperties["overflowY"];
|
|
942
|
-
overflow?: CSSProperties["overflow"];
|
|
943
|
-
textOverflow?: CSSProperties["textOverflow"];
|
|
944
|
-
boxShadow?: CSSProperties["boxShadow"];
|
|
945
|
-
outline?: CSSProperties["outline"];
|
|
946
|
-
border?: CSSProperties["border"];
|
|
947
|
-
borderTop?: CSSProperties["borderTop"];
|
|
948
|
-
borderRight?: CSSProperties["borderRight"];
|
|
949
|
-
borderBottom?: CSSProperties["borderBottom"];
|
|
950
|
-
borderLeft?: CSSProperties["borderLeft"];
|
|
951
|
-
cursor?: CSSProperties["cursor"];
|
|
952
|
-
userSelect?: CSSProperties["userSelect"];
|
|
953
|
-
transition?: CSSProperties["transition"];
|
|
954
|
-
opacity?: CSSProperties["opacity"];
|
|
955
|
-
filter?: CSSProperties["filter"];
|
|
956
|
-
color?: CSSProperties["color"];
|
|
957
|
-
order?: CSSProperties["order"];
|
|
958
|
-
pointerEvents?: CSSProperties["pointerEvents"];
|
|
959
|
-
lineHeight?: CSSProperties["lineHeight"];
|
|
960
|
-
isolation?: CSSProperties["isolation"];
|
|
961
|
-
backdropFilter?: CSSProperties["backdropFilter"];
|
|
962
|
-
}
|
|
963
|
-
type StackBreakpointList = BreakpointCollection<StyleProps$1>;
|
|
964
|
-
interface Props$5 extends StyleProps$1 {
|
|
965
|
-
id?: string;
|
|
966
|
-
as?: keyof ReactHTML;
|
|
967
|
-
className?: string;
|
|
968
|
-
children?: ReactNode;
|
|
969
|
-
separator?: Parameters<typeof withSeparatorElements>[1];
|
|
970
|
-
breakpoints?: StackBreakpointList | null | false;
|
|
971
|
-
href?: string;
|
|
972
|
-
tabIndex?: number;
|
|
973
|
-
style?: StyleProps$1;
|
|
974
|
-
}
|
|
975
|
-
type StackProps = Omit<Props$5, "flexDirection">;
|
|
976
|
-
declare const Stack: {
|
|
977
|
-
V: (props: StackProps & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement | null;
|
|
978
|
-
H: (props: StackProps & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement | null;
|
|
979
|
-
};
|
|
980
|
-
|
|
981
706
|
type SwitchColorScheme = "normal" | "primary" | "secondary";
|
|
982
|
-
interface Props$
|
|
707
|
+
interface Props$3 {
|
|
983
708
|
value: boolean;
|
|
984
709
|
onChange: (value: boolean) => void;
|
|
985
710
|
/** @default normal */
|
|
986
711
|
colorScheme?: SwitchColorScheme;
|
|
987
712
|
disabled?: boolean;
|
|
988
713
|
}
|
|
989
|
-
declare const Switch: ({ value, onChange, colorScheme, disabled, }: Props$
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
maxWidth?: CSSProperties$1["maxWidth"];
|
|
1008
|
-
opacity?: CSSProperties$1["opacity"];
|
|
1009
|
-
position?: CSSProperties$1["position"];
|
|
1010
|
-
overflow?: CSSProperties$1["overflow"];
|
|
1011
|
-
textOverflow?: CSSProperties$1["textOverflow"];
|
|
1012
|
-
textDecoration?: CSSProperties$1["textDecoration"];
|
|
1013
|
-
display?: CSSProperties$1["display"];
|
|
1014
|
-
top?: CSSProperties$1["top"];
|
|
1015
|
-
right?: CSSProperties$1["right"];
|
|
1016
|
-
bottom?: CSSProperties$1["bottom"];
|
|
1017
|
-
left?: CSSProperties$1["left"];
|
|
1018
|
-
userSelect?: CSSProperties$1["userSelect"];
|
|
1019
|
-
cursor?: CSSProperties$1["cursor"];
|
|
1020
|
-
};
|
|
1021
|
-
type TextBreakpointList = BreakpointCollection<StyleProps>;
|
|
1022
|
-
interface Props$3 extends StyleProps {
|
|
714
|
+
declare const Switch: ({ value, onChange, colorScheme, disabled, }: Props$3) => React__default.JSX.Element;
|
|
715
|
+
|
|
716
|
+
declare const config: Config;
|
|
717
|
+
|
|
718
|
+
type Theme = typeof config.theme.extend;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Utility for merging classes conditionally. Right side will override left side if there are any conflicts.
|
|
722
|
+
* Usage: cn('bg-red-500 text-white', 'bg-blue-500') // Returns: 'text-white bg-blue-500'
|
|
723
|
+
* @danger do not use this function to concatenate class names. Use it to merge classes conditionally.
|
|
724
|
+
*/
|
|
725
|
+
declare const cn: (...classes: (string | boolean | undefined | null)[]) => string;
|
|
726
|
+
type ThemeExtend = NonNullable<Theme['extend']>;
|
|
727
|
+
type ThemeColor = keyof ThemeExtend['colors'];
|
|
728
|
+
|
|
729
|
+
type Variant = "title" | "subtitle" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "body" | "small" | "button" | "code" | "label";
|
|
730
|
+
declare const textStyles: Record<Variant, string>;
|
|
731
|
+
type TextProps = {
|
|
1023
732
|
as?: keyof ReactHTML;
|
|
1024
733
|
href?: string;
|
|
1025
734
|
className?: string;
|
|
1026
735
|
style?: React__default.CSSProperties;
|
|
1027
|
-
variant:
|
|
1028
|
-
|
|
1029
|
-
color?: ThemeColorName;
|
|
736
|
+
variant: Variant;
|
|
737
|
+
color?: ThemeColor;
|
|
1030
738
|
children: ReactNode;
|
|
1031
739
|
onClick?: () => void;
|
|
1032
740
|
onDoubleClick?: () => void;
|
|
1033
741
|
onKeyDown?: (event: React__default.KeyboardEvent<HTMLSpanElement>) => void;
|
|
1034
742
|
tabIndex?: number;
|
|
1035
|
-
}
|
|
1036
|
-
declare const Text$1: (props:
|
|
1037
|
-
type PresetProps = Omit<
|
|
743
|
+
};
|
|
744
|
+
declare const Text$1: (props: TextProps & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement | null;
|
|
745
|
+
type PresetProps = Omit<TextProps, "variant">;
|
|
1038
746
|
declare const Heading1: (props: PresetProps & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement | null;
|
|
1039
747
|
declare const Heading2: (props: PresetProps & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement | null;
|
|
1040
748
|
declare const Heading3: (props: PresetProps & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement | null;
|
|
@@ -1047,10 +755,10 @@ declare const Italic: ({ children }: {
|
|
|
1047
755
|
}) => React__default.JSX.Element;
|
|
1048
756
|
|
|
1049
757
|
declare const useAutoResize: (value: string) => React__default.MutableRefObject<HTMLTextAreaElement | null>;
|
|
1050
|
-
declare const AutoResizingTextArea: (props:
|
|
758
|
+
declare const AutoResizingTextArea: (props: {
|
|
1051
759
|
onChangeText: (value: string) => void;
|
|
1052
760
|
value?: string;
|
|
1053
|
-
} & React__default.RefAttributes<HTMLTextAreaElement>) => React__default.ReactElement | null;
|
|
761
|
+
} & React__default.TextareaHTMLAttributes<HTMLTextAreaElement> & React__default.RefAttributes<HTMLTextAreaElement>) => React__default.ReactElement | null;
|
|
1054
762
|
|
|
1055
763
|
declare const Toast: ({ title, content, children, ...props }: {
|
|
1056
764
|
title?: string;
|
|
@@ -1103,7 +811,10 @@ declare namespace TreeView {
|
|
|
1103
811
|
gap?: number;
|
|
1104
812
|
colorScheme?: "primary" | "secondary";
|
|
1105
813
|
}) & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement | null;
|
|
1106
|
-
const RowTitle: (props:
|
|
814
|
+
const RowTitle: (props: {
|
|
815
|
+
className?: string;
|
|
816
|
+
children: React__default.ReactNode;
|
|
817
|
+
} & React__default.HTMLAttributes<HTMLSpanElement>) => React__default.ReactElement | null;
|
|
1107
818
|
const EditableRowTitle: (props: EditableRowProps) => React__default.ReactElement | null;
|
|
1108
819
|
const Row: <MenuItemType extends string>(props: ListView.RowProps<MenuItemType> & TreeRowBaseProps & React__default.RefAttributes<HTMLLIElement>) => React__default.ReactElement | null;
|
|
1109
820
|
type ClickInfo = ListView.ClickInfo;
|
|
@@ -1154,22 +865,15 @@ type IWorkspaceLayout = {
|
|
|
1154
865
|
};
|
|
1155
866
|
declare const WorkspaceLayout: (props: Props$1 & React__default.RefAttributes<IWorkspaceLayout>) => React__default.ReactElement | null;
|
|
1156
867
|
|
|
1157
|
-
declare const DesignSystemThemeProvider: (props: {
|
|
1158
|
-
children: ReactNode;
|
|
1159
|
-
theme?: Theme;
|
|
1160
|
-
}) => React__default.ReactElement | null;
|
|
1161
868
|
type DesignSystemConfigurationContextValue = {
|
|
1162
869
|
platform: PlatformName;
|
|
1163
870
|
};
|
|
1164
871
|
declare const DesignSystemConfigurationProvider: (props: {
|
|
1165
872
|
children: ReactNode;
|
|
1166
|
-
theme?: Theme | "light" | "dark";
|
|
1167
873
|
platform?: PlatformName;
|
|
1168
874
|
}) => React__default.ReactElement | null;
|
|
1169
875
|
declare function useDesignSystemConfiguration(): DesignSystemConfigurationContextValue;
|
|
1170
|
-
declare function useDesignSystemTheme(): styled_components.DefaultTheme;
|
|
1171
876
|
|
|
1172
|
-
declare const Row$1: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
1173
877
|
type DialogContextValue = {
|
|
1174
878
|
openInputDialog(title: string, inputValue?: string): Promise<string | undefined>;
|
|
1175
879
|
containsElement(element: HTMLElement): boolean;
|
|
@@ -1269,109 +973,24 @@ declare const mediaQuery: {
|
|
|
1269
973
|
xlarge: string;
|
|
1270
974
|
};
|
|
1271
975
|
|
|
1272
|
-
declare const name: string;
|
|
1273
|
-
declare const colors: {
|
|
1274
|
-
logo: {
|
|
1275
|
-
fill: string;
|
|
1276
|
-
highlight: string;
|
|
1277
|
-
};
|
|
1278
|
-
background: string;
|
|
1279
|
-
text: string;
|
|
1280
|
-
textMuted: string;
|
|
1281
|
-
textSubtle: string;
|
|
1282
|
-
textDisabled: string;
|
|
1283
|
-
textDecorativeLight: string;
|
|
1284
|
-
dividerSubtle: string;
|
|
1285
|
-
divider: string;
|
|
1286
|
-
dividerStrong: string;
|
|
1287
|
-
primary: string;
|
|
1288
|
-
primaryLight: string;
|
|
1289
|
-
primaryPastel: string;
|
|
1290
|
-
secondary: string;
|
|
1291
|
-
secondaryLight: string;
|
|
1292
|
-
secondaryPastel: string;
|
|
1293
|
-
secondaryBright: string;
|
|
1294
|
-
warning: string;
|
|
1295
|
-
neutralBackground: string;
|
|
1296
|
-
inputBackground: string;
|
|
1297
|
-
inputBackgroundLight: string;
|
|
1298
|
-
codeBackground: string;
|
|
1299
|
-
codeBackgroundLight: string;
|
|
1300
|
-
readonly codeBackgroundDark: string;
|
|
1301
|
-
codeBackgroundDecorativeDark: string;
|
|
1302
|
-
selectedBackground: string;
|
|
1303
|
-
transparentChecker: string;
|
|
1304
|
-
activeBackground: string;
|
|
1305
|
-
scrollbar: string;
|
|
1306
|
-
placeholderDots: string;
|
|
1307
|
-
breadcrumb: {
|
|
1308
|
-
readonly text: string;
|
|
1309
|
-
readonly textHover: string;
|
|
1310
|
-
readonly icon: string;
|
|
1311
|
-
};
|
|
1312
|
-
listView: {
|
|
1313
|
-
raisedBackground: string;
|
|
1314
|
-
editingBackground: string;
|
|
1315
|
-
};
|
|
1316
|
-
canvas: {
|
|
1317
|
-
background: string;
|
|
1318
|
-
readonly selectionStroke: string;
|
|
1319
|
-
dragHandleStroke: string;
|
|
1320
|
-
measurement: string;
|
|
1321
|
-
sliceOutline: string;
|
|
1322
|
-
grid: string;
|
|
1323
|
-
};
|
|
1324
|
-
sidebar: {
|
|
1325
|
-
background: string;
|
|
1326
|
-
backgroundTransparent: string;
|
|
1327
|
-
};
|
|
1328
|
-
popover: {
|
|
1329
|
-
background: string;
|
|
1330
|
-
divider: string;
|
|
1331
|
-
};
|
|
1332
|
-
slider: {
|
|
1333
|
-
background: string;
|
|
1334
|
-
border: string;
|
|
1335
|
-
};
|
|
1336
|
-
radioGroup: {
|
|
1337
|
-
background: string;
|
|
1338
|
-
};
|
|
1339
|
-
icon: string;
|
|
1340
|
-
iconSelected: string;
|
|
1341
|
-
mask: string;
|
|
1342
|
-
imageOverlay: string;
|
|
1343
|
-
readonly dragOutline: string;
|
|
1344
|
-
selection: string;
|
|
1345
|
-
thumbnailBackground: string;
|
|
1346
|
-
thumbnailShadow: string;
|
|
1347
|
-
inlineCode: {
|
|
1348
|
-
text: string;
|
|
1349
|
-
background: string;
|
|
1350
|
-
};
|
|
1351
|
-
textLink: string;
|
|
1352
|
-
textLinkFocused: string;
|
|
1353
|
-
};
|
|
1354
|
-
|
|
1355
|
-
declare const dark_colors: typeof colors;
|
|
1356
|
-
declare const dark_fonts: typeof fonts;
|
|
1357
|
-
declare const dark_name: typeof name;
|
|
1358
|
-
declare const dark_sizes: typeof sizes;
|
|
1359
|
-
declare const dark_textStyles: typeof textStyles;
|
|
1360
|
-
declare namespace dark {
|
|
1361
|
-
export { dark_colors as colors, dark_fonts as fonts, dark_name as name, dark_sizes as sizes, dark_textStyles as textStyles };
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
976
|
type Optional<T> = T | false | null | undefined;
|
|
1365
977
|
type MenuConfig<T extends string> = Optional<Optional<RegularMenuItem<T>>[]>[];
|
|
1366
978
|
declare function createSectionedMenu<T extends string>(...sections: MenuConfig<T>): MenuItem<T>[];
|
|
1367
979
|
|
|
1368
980
|
declare function getGradientBackground(value: Sketch.GradientStop[], type: Sketch.GradientType, direction?: number): string;
|
|
1369
981
|
|
|
982
|
+
declare function useDarkMode(elementRef: React.RefObject<HTMLElement>): {
|
|
983
|
+
isDark: boolean;
|
|
984
|
+
elementRef: React$1.RefObject<HTMLElement>;
|
|
985
|
+
};
|
|
986
|
+
|
|
1370
987
|
declare function sketchColorToRgba(value: Sketch.Color): RgbaColor;
|
|
1371
988
|
declare function sketchColorToRgbaString(value: Sketch.Color): string;
|
|
1372
989
|
declare function rgbaToSketchColor(value: RgbaColor): Sketch.Color;
|
|
1373
990
|
declare function sketchColorToHex(value: Sketch.Color): string;
|
|
1374
991
|
|
|
992
|
+
declare function withSeparatorElements(elements: ReactNode, separator: ReactNode | (() => ReactNode)): (string | number | React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | Iterable<ReactNode> | React$1.ReactPortal)[];
|
|
993
|
+
|
|
1375
994
|
type SetNumberMode = "replace" | "adjust";
|
|
1376
995
|
declare function getNewValue(value: number, mode: SetNumberMode, delta?: number): number;
|
|
1377
996
|
type DimensionValue = number | undefined;
|
|
@@ -1387,43 +1006,35 @@ interface Props {
|
|
|
1387
1006
|
}
|
|
1388
1007
|
declare const DimensionInput: (props: Props) => React__default.ReactElement | null;
|
|
1389
1008
|
|
|
1390
|
-
declare const Section:
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
declare const
|
|
1399
|
-
|
|
1400
|
-
}>> & string;
|
|
1401
|
-
declare const Column: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
1402
|
-
declare const Checkbox: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
1403
|
-
declare const Text: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
1009
|
+
declare const Section: (props: React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
1010
|
+
declare const SectionHeader: (props: React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
1011
|
+
type TitleTextStyle = "small" | "heading5" | "heading4" | "heading3";
|
|
1012
|
+
declare const Title: (props: React__default.HTMLAttributes<HTMLDivElement> & {
|
|
1013
|
+
$textStyle?: TitleTextStyle;
|
|
1014
|
+
} & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
1015
|
+
declare const Row: (props: React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
1016
|
+
declare const Column: (props: React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
1017
|
+
declare const Checkbox: (props: React__default.InputHTMLAttributes<HTMLInputElement> & React__default.RefAttributes<HTMLInputElement>) => React__default.ReactElement | null;
|
|
1018
|
+
declare const Text: (props: React__default.HTMLAttributes<HTMLSpanElement> & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement | null;
|
|
1404
1019
|
declare const VerticalSeparator: () => React__default.JSX.Element;
|
|
1405
1020
|
declare const HorizontalSeparator: () => React__default.JSX.Element;
|
|
1406
|
-
declare const RowLabel:
|
|
1407
|
-
$textStyle?:
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1021
|
+
declare const RowLabel: (props: React__default.HTMLAttributes<HTMLSpanElement> & {
|
|
1022
|
+
$textStyle?: TitleTextStyle | "label";
|
|
1023
|
+
} & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement | null;
|
|
1024
|
+
interface LabeledRowProps {
|
|
1410
1025
|
id?: string;
|
|
1411
1026
|
children: ReactNode;
|
|
1412
1027
|
label: ReactNode;
|
|
1413
|
-
labelTextStyle?:
|
|
1414
|
-
gap?: CSSProperties["gap"];
|
|
1028
|
+
labelTextStyle?: TitleTextStyle;
|
|
1415
1029
|
right?: ReactNode;
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
label: string;
|
|
1420
|
-
}) => React__default.ReactElement | null;
|
|
1030
|
+
className?: string;
|
|
1031
|
+
}
|
|
1032
|
+
declare const LabeledRow: (props: LabeledRowProps) => React__default.ReactElement | null;
|
|
1421
1033
|
|
|
1422
1034
|
declare const InspectorPrimitives_Checkbox: typeof Checkbox;
|
|
1423
1035
|
declare const InspectorPrimitives_Column: typeof Column;
|
|
1424
1036
|
declare const InspectorPrimitives_HorizontalSeparator: typeof HorizontalSeparator;
|
|
1425
1037
|
declare const InspectorPrimitives_LabeledRow: typeof LabeledRow;
|
|
1426
|
-
declare const InspectorPrimitives_LabeledSliderRow: typeof LabeledSliderRow;
|
|
1427
1038
|
declare const InspectorPrimitives_Row: typeof Row;
|
|
1428
1039
|
declare const InspectorPrimitives_RowLabel: typeof RowLabel;
|
|
1429
1040
|
declare const InspectorPrimitives_Section: typeof Section;
|
|
@@ -1432,7 +1043,19 @@ declare const InspectorPrimitives_Text: typeof Text;
|
|
|
1432
1043
|
declare const InspectorPrimitives_Title: typeof Title;
|
|
1433
1044
|
declare const InspectorPrimitives_VerticalSeparator: typeof VerticalSeparator;
|
|
1434
1045
|
declare namespace InspectorPrimitives {
|
|
1435
|
-
export {
|
|
1046
|
+
export {
|
|
1047
|
+
InspectorPrimitives_Checkbox as Checkbox,
|
|
1048
|
+
InspectorPrimitives_Column as Column,
|
|
1049
|
+
InspectorPrimitives_HorizontalSeparator as HorizontalSeparator,
|
|
1050
|
+
InspectorPrimitives_LabeledRow as LabeledRow,
|
|
1051
|
+
InspectorPrimitives_Row as Row,
|
|
1052
|
+
InspectorPrimitives_RowLabel as RowLabel,
|
|
1053
|
+
InspectorPrimitives_Section as Section,
|
|
1054
|
+
InspectorPrimitives_SectionHeader as SectionHeader,
|
|
1055
|
+
InspectorPrimitives_Text as Text,
|
|
1056
|
+
InspectorPrimitives_Title as Title,
|
|
1057
|
+
InspectorPrimitives_VerticalSeparator as VerticalSeparator,
|
|
1058
|
+
};
|
|
1436
1059
|
}
|
|
1437
1060
|
|
|
1438
1061
|
declare module "react" {
|
|
@@ -1440,4 +1063,4 @@ declare module "react" {
|
|
|
1440
1063
|
function forwardRef<T, P = {}>(render: (props: P, ref: React.ForwardedRef<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
1441
1064
|
}
|
|
1442
1065
|
|
|
1443
|
-
export { ActivityIndicator, AutoResizingTextArea, Avatar, AvatarStack, Body, Button,
|
|
1066
|
+
export { ActivityIndicator, AutoResizingTextArea, Avatar, AvatarStack, Body, Button, ButtonRootProps, CONTENT_AREA_ID, Chip, ChipProps, CompletionItem, CompletionListItem, CompletionMenu, CompletionSectionHeader, ContextMenu, DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, Dialog, DialogContextValue, DialogProvider, DimensionInput, DimensionValue, Divider, DividerVertical, DraggableMenuButton, DropValidator, DropdownMenu, EDITOR_PANEL_GROUP_ID, EditableRowProps, ExtractMenuItemType, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, GridView, GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, HoverEvent, HoverEvents, HoverProps, IDialog, IScoredItem, IToken, IVirtualizedList, IWorkspaceLayout, IconButton, IconName, ImageDataContextValue, ImageDataProvider, InputField, InputFieldInputProps, InputFieldSize, InputFieldWithCompletions, InputFieldWithCompletionsProps, InputFieldWithCompletionsRef, InspectorContainer, InspectorPrimitives, Italic, KeyboardShortcut, LEFT_SIDEBAR_ID, Label, LabeledElementView, ListRowMarginType, ListRowPosition, ListView, MatchRange, MenuConfig, MenuItem, MenuItemProps, MenuProps, Optional, PanelLayoutState, PatternPreviewBackground, Popover, Progress, RIGHT_SIDEBAR_ID, RadioGroup, RegularMenuItem, RelativeDropPosition, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, SelectMenu, SetNumberMode, SketchPattern, Slider, Small, Sortable, Spacer, SupportedCanvasUploadType, SupportedImageUploadType, Switch, Text$1 as Text, TextProps, Theme, ThemeColor, Toast, ToastProvider, Tooltip, TreeView, WorkspaceLayout, cn, createSectionedMenu, fuzzyFilter, fuzzyScore, fuzzyTokenize, getGradientBackground, getNewValue, mediaQuery, normalizeListDestinationIndex, renderIcon, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, textStyles, useAutoResize, useCurrentFloatingWindowInternal, useDarkMode, useDesignSystemConfiguration, useDialogContainsElement, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenInputDialog, usePlatform, usePlatformModKey, usePreservePanelSize, withSeparatorElements };
|