@noya-app/noya-designsystem 0.1.15 → 0.1.16
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 +9 -9
- package/CHANGELOG.md +9 -0
- package/dist/index.d.mts +56 -59
- package/dist/index.d.ts +56 -59
- package/dist/index.js +849 -826
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +557 -534
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/components/ActivityIndicator.tsx +23 -13
- package/src/components/ArrayController.tsx +5 -5
- package/src/components/Avatar.tsx +5 -5
- package/src/components/Button.tsx +39 -36
- package/src/components/Chip.tsx +25 -25
- package/src/components/Divider.tsx +45 -20
- package/src/components/FillInputField.tsx +23 -23
- package/src/components/InputField.tsx +78 -91
- package/src/components/InputFieldWithCompletions.tsx +4 -4
- package/src/components/InspectorPrimitives.tsx +18 -18
- package/src/components/Label.tsx +21 -21
- package/src/components/ListView.tsx +100 -95
- package/src/components/RadioGroup.tsx +1 -2
- package/src/components/Select.tsx +11 -11
- package/src/components/Spacer.tsx +30 -7
- package/src/components/Stack.tsx +8 -8
- package/src/components/Switch.tsx +9 -10
- package/src/components/Text.tsx +15 -15
- package/src/components/internal/Menu.tsx +6 -10
- package/src/contexts/DesignSystemConfiguration.tsx +8 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
[34mCLI[39m Target: esnext
|
|
6
6
|
[34mCJS[39m Build start
|
|
7
7
|
[34mESM[39m Build start
|
|
8
|
-
[32mCJS[39m [1mdist/index.js [22m[32m215.09 KB[39m
|
|
9
|
-
[32mCJS[39m [1mdist/index.js.map [22m[32m434.94 KB[39m
|
|
10
|
-
[32mCJS[39m ⚡️ Build success in 51ms
|
|
11
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m197.86 KB[39m
|
|
12
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[32m434.84 KB[39m
|
|
13
|
-
[32mESM[39m ⚡️ Build success in 51ms
|
|
14
8
|
[34mDTS[39m Build start
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
9
|
+
[32mCJS[39m [1mdist/index.js [22m[32m215.33 KB[39m
|
|
10
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m437.28 KB[39m
|
|
11
|
+
[32mCJS[39m ⚡️ Build success in 221ms
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m198.05 KB[39m
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m437.20 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 222ms
|
|
15
|
+
[32mDTS[39m ⚡️ Build success in 9679ms
|
|
16
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m58.61 KB[39m
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m58.61 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @noya-app/noya-designsystem
|
|
2
2
|
|
|
3
|
+
## 0.1.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 86288ca: styled-components 6
|
|
8
|
+
- b1b4809: Adjust focus style and add boolean to JSON Editor
|
|
9
|
+
- Updated dependencies [e2a3468]
|
|
10
|
+
- @noya-app/noya-colorpicker@0.1.9
|
|
11
|
+
|
|
3
12
|
## 0.1.15
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { CSSProperties, ReactNode, ReactElement, ComponentProps, AriaRole, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, FocusEventHandler, InputHTMLAttributes, Ref, ReactHTML } from 'react';
|
|
3
|
+
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
3
4
|
import * as styled_components from 'styled-components';
|
|
4
5
|
import { CSSObject, CSSProperties as CSSProperties$1 } from 'styled-components';
|
|
5
6
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -15,7 +16,6 @@ import { Size } from '@noya-app/noya-geometry';
|
|
|
15
16
|
import { IItemScore } from 'vscode-fuzzy-scorer';
|
|
16
17
|
import { useSortable } from '@dnd-kit/sortable';
|
|
17
18
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
18
|
-
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
19
19
|
import { RgbaColor } from '@noya-app/noya-colorpicker';
|
|
20
20
|
|
|
21
21
|
interface Props$h {
|
|
@@ -42,13 +42,13 @@ declare function AvatarStack({ size, children, }: {
|
|
|
42
42
|
|
|
43
43
|
type ButtonVariant = "normal" | "primary" | "primaryGradient" | "secondary" | "secondaryBright" | "white" | "thin" | "floating" | "none";
|
|
44
44
|
type ButtonSize = "normal" | "large";
|
|
45
|
-
declare const ButtonElement:
|
|
46
|
-
active: boolean;
|
|
47
|
-
variant: ButtonVariant;
|
|
48
|
-
size: ButtonSize;
|
|
49
|
-
flex?: CSSProperties["flex"];
|
|
50
|
-
defaultBackground?: string | undefined;
|
|
51
|
-
}
|
|
45
|
+
declare const ButtonElement: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
46
|
+
$active: boolean;
|
|
47
|
+
$variant: ButtonVariant;
|
|
48
|
+
$size: ButtonSize;
|
|
49
|
+
$flex?: CSSProperties["flex"];
|
|
50
|
+
$defaultBackground?: string | undefined;
|
|
51
|
+
}>> & string;
|
|
52
52
|
interface ButtonRootProps {
|
|
53
53
|
id?: string;
|
|
54
54
|
className?: string;
|
|
@@ -264,8 +264,8 @@ interface MenuProps<T extends string> {
|
|
|
264
264
|
}
|
|
265
265
|
declare const ContextMenu: <T extends string>(props: MenuProps<T>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
266
266
|
|
|
267
|
-
declare const StyledContent: styled_components.
|
|
268
|
-
declare const CloseButtonContainer:
|
|
267
|
+
declare const StyledContent: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<DialogPrimitive.DialogContentProps & React__default.RefAttributes<HTMLDivElement>, never>> & string & Omit<React__default.ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & React__default.RefAttributes<HTMLDivElement>>, keyof React__default.Component<any, {}, any>>;
|
|
268
|
+
declare const CloseButtonContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
269
269
|
interface IDialog {
|
|
270
270
|
containsElement: (element: HTMLElement) => boolean;
|
|
271
271
|
}
|
|
@@ -282,7 +282,7 @@ interface Props$g {
|
|
|
282
282
|
declare const Dialog: (props: Props$g & React__default.RefAttributes<IDialog>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
283
283
|
declare const FullscreenDialog: (props: Props$g & React__default.RefAttributes<IDialog>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
284
284
|
|
|
285
|
-
type DividerVariant =
|
|
285
|
+
type DividerVariant = "normal" | "strong" | "subtle";
|
|
286
286
|
interface DividerProps {
|
|
287
287
|
variant?: DividerVariant;
|
|
288
288
|
overflow?: number;
|
|
@@ -318,7 +318,7 @@ type SketchPattern = {
|
|
|
318
318
|
interface Props$f {
|
|
319
319
|
id?: string;
|
|
320
320
|
value?: Sketch.Color | Sketch.Gradient | SketchPattern;
|
|
321
|
-
flex?: CSSProperties[
|
|
321
|
+
flex?: CSSProperties["flex"];
|
|
322
322
|
}
|
|
323
323
|
declare const FillInputField: (props: Props$f & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
324
324
|
|
|
@@ -481,17 +481,17 @@ interface InputFieldDropdownProps<T extends string> {
|
|
|
481
481
|
children?: ReactNode;
|
|
482
482
|
}
|
|
483
483
|
type InputFieldVariant = "normal" | "bare";
|
|
484
|
-
declare const InputElement:
|
|
485
|
-
labelPosition: LabelPosition;
|
|
486
|
-
labelSize: number;
|
|
487
|
-
hasLabel: boolean;
|
|
488
|
-
hasDropdown: boolean;
|
|
489
|
-
textAlign?: Property.TextAlign | undefined;
|
|
484
|
+
declare const InputElement: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<(TextInputProps & React__default.RefAttributes<HTMLInputElement>) & styled_components_dist_types.BaseObject, {
|
|
490
485
|
disabled?: boolean | undefined;
|
|
491
|
-
variant?: InputFieldVariant | undefined;
|
|
492
486
|
readOnly?: boolean | undefined;
|
|
493
|
-
|
|
494
|
-
|
|
487
|
+
$labelPosition: LabelPosition;
|
|
488
|
+
$labelSize: number;
|
|
489
|
+
$hasLabel: boolean;
|
|
490
|
+
$hasDropdown: boolean;
|
|
491
|
+
$textAlign?: Property.TextAlign | undefined;
|
|
492
|
+
$variant?: InputFieldVariant | undefined;
|
|
493
|
+
$size: InputFieldSize;
|
|
494
|
+
}>> & string & Omit<(props: TextInputProps & React__default.RefAttributes<HTMLInputElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null, keyof React__default.Component<any, {}, any>>;
|
|
495
495
|
type InputFieldNumberInputProps = Omit<TextInputProps, "value" | "onChange" | "onKeyDown" | "onSubmit"> & {
|
|
496
496
|
value: number | undefined;
|
|
497
497
|
onNudge?: (value: number) => void;
|
|
@@ -691,7 +691,7 @@ type ListViewRootProps = {
|
|
|
691
691
|
colorScheme?: ListColorScheme;
|
|
692
692
|
};
|
|
693
693
|
declare namespace ListView {
|
|
694
|
-
const RowTitle: React__default.
|
|
694
|
+
const RowTitle: (props: styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
695
695
|
const EditableRowTitle: (props: EditableRowProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
696
696
|
const Row: <MenuItemType extends string>(props: ListViewRowProps<MenuItemType> & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
697
697
|
const Root: <T = any>(props: ((ChildrenProps$1 | RenderProps<T>) & ListViewRootProps) & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
@@ -700,21 +700,21 @@ declare namespace ListView {
|
|
|
700
700
|
type ItemInfo = ListViewItemInfo;
|
|
701
701
|
type RowProps<MenuItemType extends string = string> = ListViewRowProps<MenuItemType>;
|
|
702
702
|
type VirtualizedList = IVirtualizedList;
|
|
703
|
-
const DragIndicator:
|
|
704
|
-
relativeDropPosition: RelativeDropPosition;
|
|
705
|
-
gap: number;
|
|
706
|
-
offsetLeft: number;
|
|
707
|
-
colorScheme: ListColorScheme;
|
|
708
|
-
}
|
|
703
|
+
const DragIndicator: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
704
|
+
$relativeDropPosition: RelativeDropPosition;
|
|
705
|
+
$gap: number;
|
|
706
|
+
$offsetLeft: number;
|
|
707
|
+
$colorScheme: ListColorScheme;
|
|
708
|
+
}>> & string;
|
|
709
709
|
const rowHeight = 31;
|
|
710
710
|
const sectionHeaderLabelHeight = 27;
|
|
711
711
|
const calculateHeight: (items: number, headerCount: number, headerVariant: ListViewSectionHeaderVariant) => number;
|
|
712
712
|
const normalizeDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
-
declare const CompletionToken:
|
|
716
|
-
type: IToken["type"];
|
|
717
|
-
}
|
|
715
|
+
declare const CompletionToken: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
716
|
+
$type: IToken["type"];
|
|
717
|
+
}>> & string;
|
|
718
718
|
interface CompletionMenuProps {
|
|
719
719
|
items: CompletionListItem[];
|
|
720
720
|
selectedIndex: number;
|
|
@@ -753,9 +753,9 @@ interface LabelRootProps {
|
|
|
753
753
|
children: ReactNode;
|
|
754
754
|
}
|
|
755
755
|
declare namespace Label {
|
|
756
|
-
const Label: React__default.
|
|
757
|
-
selected?: boolean | undefined;
|
|
758
|
-
},
|
|
756
|
+
const Label: (props: styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {
|
|
757
|
+
$selected?: boolean | undefined;
|
|
758
|
+
}>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
759
759
|
const Root: (props: LabelRootProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
760
760
|
}
|
|
761
761
|
|
|
@@ -792,9 +792,6 @@ declare function Progress({ value, width, height, flex, variant, }: {
|
|
|
792
792
|
}): React__default.JSX.Element;
|
|
793
793
|
|
|
794
794
|
type RadioGroupColorScheme = "primary" | "secondary";
|
|
795
|
-
declare const StyledRoot: styled_components.StyledComponent<React__default.ForwardRefExoticComponent<(ToggleGroupPrimitive.ToggleGroupSingleProps | ToggleGroupPrimitive.ToggleGroupMultipleProps) & React__default.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {
|
|
796
|
-
colorScheme?: RadioGroupColorScheme | undefined;
|
|
797
|
-
}, never>;
|
|
798
795
|
interface ItemProps {
|
|
799
796
|
value: string;
|
|
800
797
|
tooltip?: ReactNode;
|
|
@@ -804,7 +801,7 @@ interface ItemProps {
|
|
|
804
801
|
interface Props$9 {
|
|
805
802
|
id?: string;
|
|
806
803
|
value?: string;
|
|
807
|
-
onValueChange?:
|
|
804
|
+
onValueChange?: (value: string) => void;
|
|
808
805
|
colorScheme?: RadioGroupColorScheme;
|
|
809
806
|
allowEmpty?: boolean;
|
|
810
807
|
children: ReactNode;
|
|
@@ -854,8 +851,8 @@ interface Props$5 {
|
|
|
854
851
|
inline?: boolean;
|
|
855
852
|
}
|
|
856
853
|
declare namespace Spacer {
|
|
857
|
-
const Vertical:
|
|
858
|
-
const Horizontal:
|
|
854
|
+
const Vertical: (props: Props$5 & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
855
|
+
const Horizontal: (props: Props$5 & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
859
856
|
}
|
|
860
857
|
|
|
861
858
|
type BreakpointKey = number | string;
|
|
@@ -1047,7 +1044,7 @@ declare namespace TreeView {
|
|
|
1047
1044
|
gap?: number | undefined;
|
|
1048
1045
|
colorScheme?: ("primary" | "secondary") | undefined;
|
|
1049
1046
|
}) & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1050
|
-
const RowTitle: React__default.
|
|
1047
|
+
const RowTitle: (props: styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1051
1048
|
const EditableRowTitle: (props: EditableRowProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1052
1049
|
const Row: <MenuItemType extends string>(props: ListView.RowProps<MenuItemType> & TreeRowBaseProps & React__default.RefAttributes<HTMLLIElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1053
1050
|
type ClickInfo = ListView.ClickInfo;
|
|
@@ -1069,7 +1066,7 @@ declare const DesignSystemConfigurationProvider: (props: {
|
|
|
1069
1066
|
declare function useDesignSystemConfiguration(): DesignSystemConfigurationContextValue;
|
|
1070
1067
|
declare function useDesignSystemTheme(): styled_components.DefaultTheme;
|
|
1071
1068
|
|
|
1072
|
-
declare const Row$1:
|
|
1069
|
+
declare const Row$1: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
1073
1070
|
type DialogContextValue = {
|
|
1074
1071
|
openInputDialog(title: string, inputValue?: string): Promise<string | undefined>;
|
|
1075
1072
|
containsElement(element: HTMLElement): boolean;
|
|
@@ -1298,25 +1295,25 @@ interface Props {
|
|
|
1298
1295
|
}
|
|
1299
1296
|
declare const DimensionInput: (props: Props) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1300
1297
|
|
|
1301
|
-
declare const Section:
|
|
1302
|
-
padding?: CSSProperties["padding"];
|
|
1303
|
-
gap?: CSSProperties["gap"];
|
|
1304
|
-
}
|
|
1305
|
-
declare const SectionHeader:
|
|
1306
|
-
declare const Title:
|
|
1307
|
-
textStyle?: "small" | "heading3" | "heading4" | "heading5" | undefined;
|
|
1308
|
-
}
|
|
1309
|
-
declare const Row:
|
|
1310
|
-
gap?: CSSProperties["gap"];
|
|
1311
|
-
}
|
|
1312
|
-
declare const Column:
|
|
1313
|
-
declare const Checkbox:
|
|
1314
|
-
declare const Text:
|
|
1298
|
+
declare const Section: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
1299
|
+
$padding?: CSSProperties["padding"];
|
|
1300
|
+
$gap?: CSSProperties["gap"];
|
|
1301
|
+
}>> & string;
|
|
1302
|
+
declare const SectionHeader: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
1303
|
+
declare const Title: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
1304
|
+
$textStyle?: "small" | "heading3" | "heading4" | "heading5" | undefined;
|
|
1305
|
+
}>> & string;
|
|
1306
|
+
declare const Row: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
1307
|
+
$gap?: CSSProperties["gap"];
|
|
1308
|
+
}>> & string;
|
|
1309
|
+
declare const Column: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
1310
|
+
declare const Checkbox: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
1311
|
+
declare const Text: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
1315
1312
|
declare const VerticalSeparator: () => React__default.JSX.Element;
|
|
1316
1313
|
declare const HorizontalSeparator: () => React__default.JSX.Element;
|
|
1317
|
-
declare const RowLabel:
|
|
1318
|
-
textStyle?: "small" | "heading3" | "heading4" | "heading5" | undefined;
|
|
1319
|
-
}
|
|
1314
|
+
declare const RowLabel: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
1315
|
+
$textStyle?: "small" | "heading3" | "heading4" | "heading5" | undefined;
|
|
1316
|
+
}>> & string;
|
|
1320
1317
|
declare const LabeledRow: (props: {
|
|
1321
1318
|
id?: string | undefined;
|
|
1322
1319
|
children: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { CSSProperties, ReactNode, ReactElement, ComponentProps, AriaRole, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, FocusEventHandler, InputHTMLAttributes, Ref, ReactHTML } from 'react';
|
|
3
|
+
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
3
4
|
import * as styled_components from 'styled-components';
|
|
4
5
|
import { CSSObject, CSSProperties as CSSProperties$1 } from 'styled-components';
|
|
5
6
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -15,7 +16,6 @@ import { Size } from '@noya-app/noya-geometry';
|
|
|
15
16
|
import { IItemScore } from 'vscode-fuzzy-scorer';
|
|
16
17
|
import { useSortable } from '@dnd-kit/sortable';
|
|
17
18
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
18
|
-
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
19
19
|
import { RgbaColor } from '@noya-app/noya-colorpicker';
|
|
20
20
|
|
|
21
21
|
interface Props$h {
|
|
@@ -42,13 +42,13 @@ declare function AvatarStack({ size, children, }: {
|
|
|
42
42
|
|
|
43
43
|
type ButtonVariant = "normal" | "primary" | "primaryGradient" | "secondary" | "secondaryBright" | "white" | "thin" | "floating" | "none";
|
|
44
44
|
type ButtonSize = "normal" | "large";
|
|
45
|
-
declare const ButtonElement:
|
|
46
|
-
active: boolean;
|
|
47
|
-
variant: ButtonVariant;
|
|
48
|
-
size: ButtonSize;
|
|
49
|
-
flex?: CSSProperties["flex"];
|
|
50
|
-
defaultBackground?: string | undefined;
|
|
51
|
-
}
|
|
45
|
+
declare const ButtonElement: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
46
|
+
$active: boolean;
|
|
47
|
+
$variant: ButtonVariant;
|
|
48
|
+
$size: ButtonSize;
|
|
49
|
+
$flex?: CSSProperties["flex"];
|
|
50
|
+
$defaultBackground?: string | undefined;
|
|
51
|
+
}>> & string;
|
|
52
52
|
interface ButtonRootProps {
|
|
53
53
|
id?: string;
|
|
54
54
|
className?: string;
|
|
@@ -264,8 +264,8 @@ interface MenuProps<T extends string> {
|
|
|
264
264
|
}
|
|
265
265
|
declare const ContextMenu: <T extends string>(props: MenuProps<T>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
266
266
|
|
|
267
|
-
declare const StyledContent: styled_components.
|
|
268
|
-
declare const CloseButtonContainer:
|
|
267
|
+
declare const StyledContent: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<DialogPrimitive.DialogContentProps & React__default.RefAttributes<HTMLDivElement>, never>> & string & Omit<React__default.ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & React__default.RefAttributes<HTMLDivElement>>, keyof React__default.Component<any, {}, any>>;
|
|
268
|
+
declare const CloseButtonContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
269
269
|
interface IDialog {
|
|
270
270
|
containsElement: (element: HTMLElement) => boolean;
|
|
271
271
|
}
|
|
@@ -282,7 +282,7 @@ interface Props$g {
|
|
|
282
282
|
declare const Dialog: (props: Props$g & React__default.RefAttributes<IDialog>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
283
283
|
declare const FullscreenDialog: (props: Props$g & React__default.RefAttributes<IDialog>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
284
284
|
|
|
285
|
-
type DividerVariant =
|
|
285
|
+
type DividerVariant = "normal" | "strong" | "subtle";
|
|
286
286
|
interface DividerProps {
|
|
287
287
|
variant?: DividerVariant;
|
|
288
288
|
overflow?: number;
|
|
@@ -318,7 +318,7 @@ type SketchPattern = {
|
|
|
318
318
|
interface Props$f {
|
|
319
319
|
id?: string;
|
|
320
320
|
value?: Sketch.Color | Sketch.Gradient | SketchPattern;
|
|
321
|
-
flex?: CSSProperties[
|
|
321
|
+
flex?: CSSProperties["flex"];
|
|
322
322
|
}
|
|
323
323
|
declare const FillInputField: (props: Props$f & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
324
324
|
|
|
@@ -481,17 +481,17 @@ interface InputFieldDropdownProps<T extends string> {
|
|
|
481
481
|
children?: ReactNode;
|
|
482
482
|
}
|
|
483
483
|
type InputFieldVariant = "normal" | "bare";
|
|
484
|
-
declare const InputElement:
|
|
485
|
-
labelPosition: LabelPosition;
|
|
486
|
-
labelSize: number;
|
|
487
|
-
hasLabel: boolean;
|
|
488
|
-
hasDropdown: boolean;
|
|
489
|
-
textAlign?: Property.TextAlign | undefined;
|
|
484
|
+
declare const InputElement: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<(TextInputProps & React__default.RefAttributes<HTMLInputElement>) & styled_components_dist_types.BaseObject, {
|
|
490
485
|
disabled?: boolean | undefined;
|
|
491
|
-
variant?: InputFieldVariant | undefined;
|
|
492
486
|
readOnly?: boolean | undefined;
|
|
493
|
-
|
|
494
|
-
|
|
487
|
+
$labelPosition: LabelPosition;
|
|
488
|
+
$labelSize: number;
|
|
489
|
+
$hasLabel: boolean;
|
|
490
|
+
$hasDropdown: boolean;
|
|
491
|
+
$textAlign?: Property.TextAlign | undefined;
|
|
492
|
+
$variant?: InputFieldVariant | undefined;
|
|
493
|
+
$size: InputFieldSize;
|
|
494
|
+
}>> & string & Omit<(props: TextInputProps & React__default.RefAttributes<HTMLInputElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null, keyof React__default.Component<any, {}, any>>;
|
|
495
495
|
type InputFieldNumberInputProps = Omit<TextInputProps, "value" | "onChange" | "onKeyDown" | "onSubmit"> & {
|
|
496
496
|
value: number | undefined;
|
|
497
497
|
onNudge?: (value: number) => void;
|
|
@@ -691,7 +691,7 @@ type ListViewRootProps = {
|
|
|
691
691
|
colorScheme?: ListColorScheme;
|
|
692
692
|
};
|
|
693
693
|
declare namespace ListView {
|
|
694
|
-
const RowTitle: React__default.
|
|
694
|
+
const RowTitle: (props: styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
695
695
|
const EditableRowTitle: (props: EditableRowProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
696
696
|
const Row: <MenuItemType extends string>(props: ListViewRowProps<MenuItemType> & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
697
697
|
const Root: <T = any>(props: ((ChildrenProps$1 | RenderProps<T>) & ListViewRootProps) & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
@@ -700,21 +700,21 @@ declare namespace ListView {
|
|
|
700
700
|
type ItemInfo = ListViewItemInfo;
|
|
701
701
|
type RowProps<MenuItemType extends string = string> = ListViewRowProps<MenuItemType>;
|
|
702
702
|
type VirtualizedList = IVirtualizedList;
|
|
703
|
-
const DragIndicator:
|
|
704
|
-
relativeDropPosition: RelativeDropPosition;
|
|
705
|
-
gap: number;
|
|
706
|
-
offsetLeft: number;
|
|
707
|
-
colorScheme: ListColorScheme;
|
|
708
|
-
}
|
|
703
|
+
const DragIndicator: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
704
|
+
$relativeDropPosition: RelativeDropPosition;
|
|
705
|
+
$gap: number;
|
|
706
|
+
$offsetLeft: number;
|
|
707
|
+
$colorScheme: ListColorScheme;
|
|
708
|
+
}>> & string;
|
|
709
709
|
const rowHeight = 31;
|
|
710
710
|
const sectionHeaderLabelHeight = 27;
|
|
711
711
|
const calculateHeight: (items: number, headerCount: number, headerVariant: ListViewSectionHeaderVariant) => number;
|
|
712
712
|
const normalizeDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
-
declare const CompletionToken:
|
|
716
|
-
type: IToken["type"];
|
|
717
|
-
}
|
|
715
|
+
declare const CompletionToken: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
716
|
+
$type: IToken["type"];
|
|
717
|
+
}>> & string;
|
|
718
718
|
interface CompletionMenuProps {
|
|
719
719
|
items: CompletionListItem[];
|
|
720
720
|
selectedIndex: number;
|
|
@@ -753,9 +753,9 @@ interface LabelRootProps {
|
|
|
753
753
|
children: ReactNode;
|
|
754
754
|
}
|
|
755
755
|
declare namespace Label {
|
|
756
|
-
const Label: React__default.
|
|
757
|
-
selected?: boolean | undefined;
|
|
758
|
-
},
|
|
756
|
+
const Label: (props: styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {
|
|
757
|
+
$selected?: boolean | undefined;
|
|
758
|
+
}>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
759
759
|
const Root: (props: LabelRootProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
760
760
|
}
|
|
761
761
|
|
|
@@ -792,9 +792,6 @@ declare function Progress({ value, width, height, flex, variant, }: {
|
|
|
792
792
|
}): React__default.JSX.Element;
|
|
793
793
|
|
|
794
794
|
type RadioGroupColorScheme = "primary" | "secondary";
|
|
795
|
-
declare const StyledRoot: styled_components.StyledComponent<React__default.ForwardRefExoticComponent<(ToggleGroupPrimitive.ToggleGroupSingleProps | ToggleGroupPrimitive.ToggleGroupMultipleProps) & React__default.RefAttributes<HTMLDivElement>>, styled_components.DefaultTheme, {
|
|
796
|
-
colorScheme?: RadioGroupColorScheme | undefined;
|
|
797
|
-
}, never>;
|
|
798
795
|
interface ItemProps {
|
|
799
796
|
value: string;
|
|
800
797
|
tooltip?: ReactNode;
|
|
@@ -804,7 +801,7 @@ interface ItemProps {
|
|
|
804
801
|
interface Props$9 {
|
|
805
802
|
id?: string;
|
|
806
803
|
value?: string;
|
|
807
|
-
onValueChange?:
|
|
804
|
+
onValueChange?: (value: string) => void;
|
|
808
805
|
colorScheme?: RadioGroupColorScheme;
|
|
809
806
|
allowEmpty?: boolean;
|
|
810
807
|
children: ReactNode;
|
|
@@ -854,8 +851,8 @@ interface Props$5 {
|
|
|
854
851
|
inline?: boolean;
|
|
855
852
|
}
|
|
856
853
|
declare namespace Spacer {
|
|
857
|
-
const Vertical:
|
|
858
|
-
const Horizontal:
|
|
854
|
+
const Vertical: (props: Props$5 & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
855
|
+
const Horizontal: (props: Props$5 & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
859
856
|
}
|
|
860
857
|
|
|
861
858
|
type BreakpointKey = number | string;
|
|
@@ -1047,7 +1044,7 @@ declare namespace TreeView {
|
|
|
1047
1044
|
gap?: number | undefined;
|
|
1048
1045
|
colorScheme?: ("primary" | "secondary") | undefined;
|
|
1049
1046
|
}) & React__default.RefAttributes<IVirtualizedList>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1050
|
-
const RowTitle: React__default.
|
|
1047
|
+
const RowTitle: (props: styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1051
1048
|
const EditableRowTitle: (props: EditableRowProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1052
1049
|
const Row: <MenuItemType extends string>(props: ListView.RowProps<MenuItemType> & TreeRowBaseProps & React__default.RefAttributes<HTMLLIElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1053
1050
|
type ClickInfo = ListView.ClickInfo;
|
|
@@ -1069,7 +1066,7 @@ declare const DesignSystemConfigurationProvider: (props: {
|
|
|
1069
1066
|
declare function useDesignSystemConfiguration(): DesignSystemConfigurationContextValue;
|
|
1070
1067
|
declare function useDesignSystemTheme(): styled_components.DefaultTheme;
|
|
1071
1068
|
|
|
1072
|
-
declare const Row$1:
|
|
1069
|
+
declare const Row$1: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
1073
1070
|
type DialogContextValue = {
|
|
1074
1071
|
openInputDialog(title: string, inputValue?: string): Promise<string | undefined>;
|
|
1075
1072
|
containsElement(element: HTMLElement): boolean;
|
|
@@ -1298,25 +1295,25 @@ interface Props {
|
|
|
1298
1295
|
}
|
|
1299
1296
|
declare const DimensionInput: (props: Props) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1300
1297
|
|
|
1301
|
-
declare const Section:
|
|
1302
|
-
padding?: CSSProperties["padding"];
|
|
1303
|
-
gap?: CSSProperties["gap"];
|
|
1304
|
-
}
|
|
1305
|
-
declare const SectionHeader:
|
|
1306
|
-
declare const Title:
|
|
1307
|
-
textStyle?: "small" | "heading3" | "heading4" | "heading5" | undefined;
|
|
1308
|
-
}
|
|
1309
|
-
declare const Row:
|
|
1310
|
-
gap?: CSSProperties["gap"];
|
|
1311
|
-
}
|
|
1312
|
-
declare const Column:
|
|
1313
|
-
declare const Checkbox:
|
|
1314
|
-
declare const Text:
|
|
1298
|
+
declare const Section: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
1299
|
+
$padding?: CSSProperties["padding"];
|
|
1300
|
+
$gap?: CSSProperties["gap"];
|
|
1301
|
+
}>> & string;
|
|
1302
|
+
declare const SectionHeader: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
1303
|
+
declare const Title: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
1304
|
+
$textStyle?: "small" | "heading3" | "heading4" | "heading5" | undefined;
|
|
1305
|
+
}>> & string;
|
|
1306
|
+
declare const Row: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
1307
|
+
$gap?: CSSProperties["gap"];
|
|
1308
|
+
}>> & string;
|
|
1309
|
+
declare const Column: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
1310
|
+
declare const Checkbox: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
1311
|
+
declare const Text: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
1315
1312
|
declare const VerticalSeparator: () => React__default.JSX.Element;
|
|
1316
1313
|
declare const HorizontalSeparator: () => React__default.JSX.Element;
|
|
1317
|
-
declare const RowLabel:
|
|
1318
|
-
textStyle?: "small" | "heading3" | "heading4" | "heading5" | undefined;
|
|
1319
|
-
}
|
|
1314
|
+
declare const RowLabel: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
1315
|
+
$textStyle?: "small" | "heading3" | "heading4" | "heading5" | undefined;
|
|
1316
|
+
}>> & string;
|
|
1320
1317
|
declare const LabeledRow: (props: {
|
|
1321
1318
|
id?: string | undefined;
|
|
1322
1319
|
children: ReactNode;
|