@noya-app/noya-designsystem 0.0.15 → 0.1.0
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/.eslintrc.js +11 -0
- package/.turbo/turbo-build.log +9 -9
- package/.turbo/turbo-lint.log +3 -0
- package/CHANGELOG.md +17 -0
- package/dist/index.d.mts +119 -101
- package/dist/index.d.ts +119 -101
- package/dist/index.js +7802 -641
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7790 -596
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
- package/src/components/Chip.tsx +30 -12
- package/src/components/DraggableMenuButton.tsx +116 -0
- package/src/components/InputField.tsx +196 -132
- package/src/components/InputFieldWithCompletions.tsx +43 -6
- package/src/components/InspectorPrimitives.tsx +1 -1
- package/src/components/ListView.tsx +77 -38
- package/src/components/Select.tsx +2 -0
- package/src/components/Sortable.tsx +45 -36
- package/src/components/Stack.tsx +63 -62
- package/src/contexts/DialogContext.tsx +3 -0
- package/src/index.tsx +3 -2
- package/src/theme/light.ts +1 -1
- package/src/utils/getGradientBackground.tsx +8 -10
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** @type {import("eslint").Linter.Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
root: true,
|
|
4
|
+
extends: ["@repo/eslint-config/next.js"],
|
|
5
|
+
parser: "@typescript-eslint/parser",
|
|
6
|
+
rules: {
|
|
7
|
+
"no-unused-vars": "off",
|
|
8
|
+
"no-redeclare": "off",
|
|
9
|
+
},
|
|
10
|
+
ignorePatterns: ["dist/"],
|
|
11
|
+
};
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
[34mCLI[39m Target: esnext
|
|
7
7
|
[34mCJS[39m Build start
|
|
8
8
|
[34mESM[39m Build start
|
|
9
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m169.22 KB[39m
|
|
10
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[32m369.46 KB[39m
|
|
11
|
-
[32mESM[39m ⚡️ Build success in 138ms
|
|
12
|
-
[32mCJS[39m [1mdist/index.js [22m[32m185.57 KB[39m
|
|
13
|
-
[32mCJS[39m [1mdist/index.js.map [22m[32m370.38 KB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in 165ms
|
|
15
9
|
[34mDTS[39m Build start
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
10
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m1.09 MB[39m
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m1.49 MB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 220ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m1.10 MB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m1.50 MB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 221ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6148ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m55.00 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m55.00 KB[39m
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
|
|
2
|
+
[0m[2m[35m$[0m [2m[1meslint . --max-warnings 0[0m
|
|
3
|
+
Pages directory cannot be found at /Users/devinabbott/Projects/noya-core/packages/noya-designsystem/pages or /Users/devinabbott/Projects/noya-core/packages/noya-designsystem/src/pages. If using a custom path, please configure with the `no-html-link-for-pages` rule in your eslint config file.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @noya-app/noya-designsystem
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 84323fe: Add minor version
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- f974ad5: Update versions
|
|
12
|
+
- Updated dependencies [84323fe]
|
|
13
|
+
- Updated dependencies [f974ad5]
|
|
14
|
+
- @noya-app/noya-colorpicker@0.1.0
|
|
15
|
+
- @noya-app/noya-geometry@0.1.0
|
|
16
|
+
- @noya-app/noya-icons@0.1.0
|
|
17
|
+
- @noya-app/noya-keymap@0.1.0
|
|
18
|
+
- @noya-app/noya-utils@0.1.0
|
|
19
|
+
|
|
3
20
|
## 0.0.15
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -275,6 +275,15 @@ interface DividerProps {
|
|
|
275
275
|
declare const Divider: (props: DividerProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
276
276
|
declare const DividerVertical: (props: DividerProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
277
277
|
|
|
278
|
+
/**
|
|
279
|
+
* A button that opens a menu when clicked, but also allows dragging the
|
|
280
|
+
*/
|
|
281
|
+
declare const DraggableMenuButton: <T extends string>(props: {
|
|
282
|
+
items: MenuItem<T>[];
|
|
283
|
+
onSelect: (value: T) => void;
|
|
284
|
+
isVisible?: boolean | undefined;
|
|
285
|
+
}) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
286
|
+
|
|
278
287
|
declare const DropdownMenu: <T extends string>(props: MenuProps<T> & {
|
|
279
288
|
open?: boolean | undefined;
|
|
280
289
|
onCloseAutoFocus?: ((event: React__default.SyntheticEvent<unknown, Event>) => void) | undefined;
|
|
@@ -424,11 +433,12 @@ type SubmittableProps = Props$c & {
|
|
|
424
433
|
};
|
|
425
434
|
type TextInputProps = ReadOnlyProps | ControlledProps | SubmittableProps;
|
|
426
435
|
|
|
427
|
-
type LabelPosition =
|
|
428
|
-
type InputFieldSize =
|
|
436
|
+
type LabelPosition = "start" | "end";
|
|
437
|
+
type InputFieldSize = "small" | "medium" | "large";
|
|
429
438
|
interface InputFieldLabelProps {
|
|
430
439
|
children?: ReactNode;
|
|
431
440
|
pointerEvents?: Property.PointerEvents;
|
|
441
|
+
style?: React__default.CSSProperties;
|
|
432
442
|
}
|
|
433
443
|
interface InputFieldDropdownProps<T extends string> {
|
|
434
444
|
id?: string;
|
|
@@ -436,7 +446,7 @@ interface InputFieldDropdownProps<T extends string> {
|
|
|
436
446
|
onSelect: (value: T) => void;
|
|
437
447
|
children?: ReactNode;
|
|
438
448
|
}
|
|
439
|
-
type InputFieldVariant =
|
|
449
|
+
type InputFieldVariant = "normal" | "bare";
|
|
440
450
|
declare const InputElement: styled_components.StyledComponent<(props: TextInputProps & React__default.RefAttributes<HTMLInputElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null, styled_components.DefaultTheme, {
|
|
441
451
|
labelPosition: LabelPosition;
|
|
442
452
|
labelSize: number;
|
|
@@ -448,10 +458,10 @@ declare const InputElement: styled_components.StyledComponent<(props: TextInputP
|
|
|
448
458
|
readOnly?: boolean | undefined;
|
|
449
459
|
size: InputFieldSize;
|
|
450
460
|
}, never>;
|
|
451
|
-
type InputFieldNumberInputProps = Omit<TextInputProps,
|
|
461
|
+
type InputFieldNumberInputProps = Omit<TextInputProps, "value" | "onChange" | "onKeyDown" | "onSubmit"> & {
|
|
452
462
|
value: number | undefined;
|
|
453
463
|
onNudge?: (value: number) => void;
|
|
454
|
-
variant?:
|
|
464
|
+
variant?: "bare";
|
|
455
465
|
} & ({
|
|
456
466
|
onChange: (value: number) => void;
|
|
457
467
|
} | {
|
|
@@ -477,13 +487,16 @@ declare namespace InputField {
|
|
|
477
487
|
textAlign?: Property.TextAlign | undefined;
|
|
478
488
|
variant?: "bare" | undefined;
|
|
479
489
|
}) & React__default.RefAttributes<HTMLInputElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
490
|
+
const Typeahead: (props: {
|
|
491
|
+
value: string;
|
|
492
|
+
}) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
480
493
|
const NumberInput: (props: InputFieldNumberInputProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
481
494
|
const DropdownMenu: <T extends string>(props: InputFieldDropdownProps<T>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
482
495
|
const Button: (props: {
|
|
483
496
|
children?: React__default.ReactNode;
|
|
484
497
|
onClick?: (() => void) | undefined;
|
|
485
498
|
}) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
486
|
-
const Label: (props: InputFieldLabelProps) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
499
|
+
const Label: (props: InputFieldLabelProps & React__default.RefAttributes<HTMLLabelElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
487
500
|
}
|
|
488
501
|
|
|
489
502
|
declare function fuzzyScore({ item, query }: {
|
|
@@ -529,9 +542,9 @@ type CompletionSectionHeader = {
|
|
|
529
542
|
};
|
|
530
543
|
type CompletionListItem = (CompletionItem & IScoredItem) | CompletionSectionHeader;
|
|
531
544
|
|
|
532
|
-
type RelativeDropPosition =
|
|
545
|
+
type RelativeDropPosition = "above" | "below" | "inside";
|
|
533
546
|
type DropValidator = (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => boolean;
|
|
534
|
-
declare const
|
|
547
|
+
declare const normalizeListDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
535
548
|
type UseSortableReturnType = ReturnType<typeof useSortable>;
|
|
536
549
|
interface ItemProps$1<T> {
|
|
537
550
|
id: string;
|
|
@@ -540,7 +553,7 @@ interface ItemProps$1<T> {
|
|
|
540
553
|
ref: Ref<T>;
|
|
541
554
|
relativeDropPosition?: RelativeDropPosition;
|
|
542
555
|
[key: string]: any;
|
|
543
|
-
} & UseSortableReturnType[
|
|
556
|
+
} & UseSortableReturnType["attributes"]) => JSX.Element;
|
|
544
557
|
}
|
|
545
558
|
interface RootProps {
|
|
546
559
|
keys: string[];
|
|
@@ -548,6 +561,7 @@ interface RootProps {
|
|
|
548
561
|
renderOverlay?: (index: number) => ReactNode;
|
|
549
562
|
onMoveItem?: (sourceIndex: number, destinationIndex: number, position: RelativeDropPosition) => void;
|
|
550
563
|
acceptsDrop?: DropValidator;
|
|
564
|
+
axis?: "x" | "y";
|
|
551
565
|
}
|
|
552
566
|
declare namespace Sortable {
|
|
553
567
|
const Item: <T extends HTMLElement>(props: ItemProps$1<T>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
@@ -567,7 +581,6 @@ type ListRowContextValue = {
|
|
|
567
581
|
gap: number;
|
|
568
582
|
variant: ListViewVariant;
|
|
569
583
|
sectionHeaderVariant: ListViewSectionHeaderVariant;
|
|
570
|
-
indentation: number;
|
|
571
584
|
pressEventName: PressEventName;
|
|
572
585
|
isSectionHeader: boolean;
|
|
573
586
|
colorScheme: ListColorScheme;
|
|
@@ -590,7 +603,6 @@ interface ListViewRowProps<MenuItemType extends string = string> {
|
|
|
590
603
|
selected?: boolean;
|
|
591
604
|
depth?: number;
|
|
592
605
|
disabled?: boolean;
|
|
593
|
-
draggable?: boolean;
|
|
594
606
|
hovered?: boolean;
|
|
595
607
|
sortable?: boolean;
|
|
596
608
|
gap?: number;
|
|
@@ -660,7 +672,7 @@ declare namespace ListView {
|
|
|
660
672
|
const rowHeight = 31;
|
|
661
673
|
const sectionHeaderLabelHeight = 27;
|
|
662
674
|
const calculateHeight: (items: number, headerCount: number, headerVariant: ListViewSectionHeaderVariant) => number;
|
|
663
|
-
const
|
|
675
|
+
const normalizeDestinationIndex: (index: number, position: "above" | "below") => number;
|
|
664
676
|
}
|
|
665
677
|
|
|
666
678
|
declare const CompletionToken: styled_components.StyledComponent<"span", styled_components.DefaultTheme, {
|
|
@@ -692,7 +704,12 @@ type Props$b = {
|
|
|
692
704
|
hideChildrenWhenFocused?: boolean;
|
|
693
705
|
hideMenuWhenEmptyValue?: boolean;
|
|
694
706
|
};
|
|
695
|
-
|
|
707
|
+
interface IInputFieldWithCompletions {
|
|
708
|
+
focus(): void;
|
|
709
|
+
setValue(value: string): void;
|
|
710
|
+
selectAllInputText(): void;
|
|
711
|
+
}
|
|
712
|
+
declare const InputFieldWithCompletions: (props: Props$b & React__default.RefAttributes<IInputFieldWithCompletions>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
696
713
|
|
|
697
714
|
interface LabelRootProps {
|
|
698
715
|
label: ReactNode;
|
|
@@ -810,57 +827,58 @@ type BreakpointCollection<T extends object> = Breakpoint<T>[] | Record<Breakpoin
|
|
|
810
827
|
declare function withSeparatorElements(elements: ReactNode, separator: ReactNode | (() => ReactNode)): (string | number | React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | Iterable<ReactNode> | React$1.ReactPortal)[];
|
|
811
828
|
|
|
812
829
|
interface StyleProps$1 {
|
|
813
|
-
display?:
|
|
814
|
-
visibility?: CSSProperties[
|
|
815
|
-
position?: CSSProperties[
|
|
816
|
-
zIndex?: CSSProperties[
|
|
817
|
-
gap?: CSSProperties[
|
|
818
|
-
inset?: CSSProperties[
|
|
819
|
-
top?: CSSProperties[
|
|
820
|
-
right?: CSSProperties[
|
|
821
|
-
bottom?: CSSProperties[
|
|
822
|
-
left?: CSSProperties[
|
|
823
|
-
flexDirection?: CSSProperties[
|
|
824
|
-
justifyContent?: CSSProperties[
|
|
825
|
-
alignItems?: CSSProperties[
|
|
826
|
-
alignSelf?: CSSProperties[
|
|
827
|
-
flex?: CSSProperties[
|
|
828
|
-
flexWrap?: CSSProperties[
|
|
829
|
-
height?: CSSProperties[
|
|
830
|
-
minHeight?: CSSProperties[
|
|
831
|
-
maxHeight?: CSSProperties[
|
|
832
|
-
width?: CSSProperties[
|
|
833
|
-
minWidth?: CSSProperties[
|
|
834
|
-
maxWidth?: CSSProperties[
|
|
835
|
-
aspectRatio?: CSSProperties[
|
|
836
|
-
padding?: CSSProperties[
|
|
830
|
+
display?: "flex" | "inline-flex" | "none" | "block";
|
|
831
|
+
visibility?: CSSProperties["visibility"];
|
|
832
|
+
position?: CSSProperties["position"];
|
|
833
|
+
zIndex?: CSSProperties["zIndex"];
|
|
834
|
+
gap?: CSSProperties["gap"];
|
|
835
|
+
inset?: CSSProperties["inset"];
|
|
836
|
+
top?: CSSProperties["top"];
|
|
837
|
+
right?: CSSProperties["right"];
|
|
838
|
+
bottom?: CSSProperties["bottom"];
|
|
839
|
+
left?: CSSProperties["left"];
|
|
840
|
+
flexDirection?: CSSProperties["flexDirection"];
|
|
841
|
+
justifyContent?: CSSProperties["justifyContent"];
|
|
842
|
+
alignItems?: CSSProperties["alignItems"];
|
|
843
|
+
alignSelf?: CSSProperties["alignSelf"];
|
|
844
|
+
flex?: CSSProperties["flex"];
|
|
845
|
+
flexWrap?: CSSProperties["flexWrap"];
|
|
846
|
+
height?: CSSProperties["height"];
|
|
847
|
+
minHeight?: CSSProperties["minHeight"];
|
|
848
|
+
maxHeight?: CSSProperties["maxHeight"];
|
|
849
|
+
width?: CSSProperties["width"];
|
|
850
|
+
minWidth?: CSSProperties["minWidth"];
|
|
851
|
+
maxWidth?: CSSProperties["maxWidth"];
|
|
852
|
+
aspectRatio?: CSSProperties["aspectRatio"];
|
|
853
|
+
padding?: CSSProperties["padding"];
|
|
837
854
|
paddingVertical?: string | number;
|
|
838
855
|
paddingHorizontal?: string | number;
|
|
839
|
-
margin?: CSSProperties[
|
|
840
|
-
background?: CSSProperties[
|
|
841
|
-
backgroundSize?: CSSProperties[
|
|
842
|
-
backgroundPosition?: CSSProperties[
|
|
843
|
-
borderRadius?: CSSProperties[
|
|
844
|
-
overflowX?: CSSProperties[
|
|
845
|
-
overflowY?: CSSProperties[
|
|
846
|
-
overflow?: CSSProperties[
|
|
847
|
-
textOverflow?: CSSProperties[
|
|
848
|
-
boxShadow?: CSSProperties[
|
|
849
|
-
outline?: CSSProperties[
|
|
850
|
-
border?: CSSProperties[
|
|
851
|
-
borderTop?: CSSProperties[
|
|
852
|
-
borderRight?: CSSProperties[
|
|
853
|
-
borderBottom?: CSSProperties[
|
|
854
|
-
borderLeft?: CSSProperties[
|
|
855
|
-
cursor?: CSSProperties[
|
|
856
|
-
userSelect?: CSSProperties[
|
|
857
|
-
transition?: CSSProperties[
|
|
858
|
-
opacity?: CSSProperties[
|
|
859
|
-
filter?: CSSProperties[
|
|
860
|
-
color?: CSSProperties[
|
|
861
|
-
order?: CSSProperties[
|
|
862
|
-
pointerEvents?: CSSProperties[
|
|
863
|
-
lineHeight?: CSSProperties[
|
|
856
|
+
margin?: CSSProperties["margin"];
|
|
857
|
+
background?: CSSProperties["background"];
|
|
858
|
+
backgroundSize?: CSSProperties["backgroundSize"];
|
|
859
|
+
backgroundPosition?: CSSProperties["backgroundPosition"];
|
|
860
|
+
borderRadius?: CSSProperties["borderRadius"];
|
|
861
|
+
overflowX?: CSSProperties["overflowX"];
|
|
862
|
+
overflowY?: CSSProperties["overflowY"];
|
|
863
|
+
overflow?: CSSProperties["overflow"];
|
|
864
|
+
textOverflow?: CSSProperties["textOverflow"];
|
|
865
|
+
boxShadow?: CSSProperties["boxShadow"];
|
|
866
|
+
outline?: CSSProperties["outline"];
|
|
867
|
+
border?: CSSProperties["border"];
|
|
868
|
+
borderTop?: CSSProperties["borderTop"];
|
|
869
|
+
borderRight?: CSSProperties["borderRight"];
|
|
870
|
+
borderBottom?: CSSProperties["borderBottom"];
|
|
871
|
+
borderLeft?: CSSProperties["borderLeft"];
|
|
872
|
+
cursor?: CSSProperties["cursor"];
|
|
873
|
+
userSelect?: CSSProperties["userSelect"];
|
|
874
|
+
transition?: CSSProperties["transition"];
|
|
875
|
+
opacity?: CSSProperties["opacity"];
|
|
876
|
+
filter?: CSSProperties["filter"];
|
|
877
|
+
color?: CSSProperties["color"];
|
|
878
|
+
order?: CSSProperties["order"];
|
|
879
|
+
pointerEvents?: CSSProperties["pointerEvents"];
|
|
880
|
+
lineHeight?: CSSProperties["lineHeight"];
|
|
881
|
+
isolation?: CSSProperties["isolation"];
|
|
864
882
|
}
|
|
865
883
|
type StackBreakpointList = BreakpointCollection<StyleProps$1>;
|
|
866
884
|
interface Props$4 extends StyleProps$1 {
|
|
@@ -873,7 +891,7 @@ interface Props$4 extends StyleProps$1 {
|
|
|
873
891
|
href?: string;
|
|
874
892
|
tabIndex?: number;
|
|
875
893
|
}
|
|
876
|
-
type StackProps = Omit<Props$4,
|
|
894
|
+
type StackProps = Omit<Props$4, "flexDirection">;
|
|
877
895
|
declare const Stack: {
|
|
878
896
|
V: (props: StackProps & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
879
897
|
H: (props: StackProps & React__default.RefAttributes<HTMLElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
@@ -1200,6 +1218,42 @@ declare function sketchColorToRgbaString(value: Sketch.Color): string;
|
|
|
1200
1218
|
declare function rgbaToSketchColor(value: RgbaColor): Sketch.Color;
|
|
1201
1219
|
declare function sketchColorToHex(value: Sketch.Color): string;
|
|
1202
1220
|
|
|
1221
|
+
interface ArrayControllerProps<Item> {
|
|
1222
|
+
id: string;
|
|
1223
|
+
items: Item[];
|
|
1224
|
+
title: ReactNode;
|
|
1225
|
+
sortable?: boolean;
|
|
1226
|
+
reversed?: boolean;
|
|
1227
|
+
expanded?: boolean;
|
|
1228
|
+
getKey?: (item: Item) => string;
|
|
1229
|
+
onMoveItem?: (sourceIndex: number, destinationIndex: number) => void;
|
|
1230
|
+
onClickPlus?: () => void;
|
|
1231
|
+
onClickTrash?: () => void;
|
|
1232
|
+
onClickExpand?: () => void;
|
|
1233
|
+
renderItem: (props: {
|
|
1234
|
+
item: Item;
|
|
1235
|
+
index: number;
|
|
1236
|
+
}) => ReactNode;
|
|
1237
|
+
renderExpandedContent?: () => ReactNode;
|
|
1238
|
+
padding?: number;
|
|
1239
|
+
}
|
|
1240
|
+
declare const ArrayController: <Item>(props: ArrayControllerProps<Item>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1241
|
+
|
|
1242
|
+
type SetNumberMode = "replace" | "adjust";
|
|
1243
|
+
declare function getNewValue(value: number, mode: SetNumberMode, delta?: number): number;
|
|
1244
|
+
type DimensionValue = number | undefined;
|
|
1245
|
+
interface Props {
|
|
1246
|
+
id?: string;
|
|
1247
|
+
value: DimensionValue;
|
|
1248
|
+
onSetValue: (value: number, mode: SetNumberMode) => void;
|
|
1249
|
+
label?: string;
|
|
1250
|
+
size?: number;
|
|
1251
|
+
placeholder?: string;
|
|
1252
|
+
disabled?: boolean;
|
|
1253
|
+
trigger?: "change" | "submit";
|
|
1254
|
+
}
|
|
1255
|
+
declare const DimensionInput: (props: Props) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1256
|
+
|
|
1203
1257
|
declare const Section: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
|
|
1204
1258
|
padding?: CSSProperties["padding"];
|
|
1205
1259
|
gap?: CSSProperties["gap"];
|
|
@@ -1222,7 +1276,7 @@ declare const RowLabel: styled_components.StyledComponent<"span", styled_compone
|
|
|
1222
1276
|
declare const LabeledRow: (props: {
|
|
1223
1277
|
id?: string | undefined;
|
|
1224
1278
|
children: ReactNode;
|
|
1225
|
-
label:
|
|
1279
|
+
label: ReactNode;
|
|
1226
1280
|
labelTextStyle?: "small" | "heading3" | "heading4" | "heading5" | undefined;
|
|
1227
1281
|
gap?: CSSProperties["gap"];
|
|
1228
1282
|
right?: ReactNode;
|
|
@@ -1248,45 +1302,9 @@ declare namespace InspectorPrimitives {
|
|
|
1248
1302
|
export { InspectorPrimitives_Checkbox as Checkbox, InspectorPrimitives_Column as Column, InspectorPrimitives_HorizontalSeparator as HorizontalSeparator, InspectorPrimitives_LabeledRow as LabeledRow, InspectorPrimitives_LabeledSliderRow as LabeledSliderRow, InspectorPrimitives_Row as Row, InspectorPrimitives_RowLabel as RowLabel, InspectorPrimitives_Section as Section, InspectorPrimitives_SectionHeader as SectionHeader, InspectorPrimitives_Text as Text, InspectorPrimitives_Title as Title, InspectorPrimitives_VerticalSeparator as VerticalSeparator };
|
|
1249
1303
|
}
|
|
1250
1304
|
|
|
1251
|
-
interface ArrayControllerProps<Item> {
|
|
1252
|
-
id: string;
|
|
1253
|
-
items: Item[];
|
|
1254
|
-
title: ReactNode;
|
|
1255
|
-
sortable?: boolean;
|
|
1256
|
-
reversed?: boolean;
|
|
1257
|
-
expanded?: boolean;
|
|
1258
|
-
getKey?: (item: Item) => string;
|
|
1259
|
-
onMoveItem?: (sourceIndex: number, destinationIndex: number) => void;
|
|
1260
|
-
onClickPlus?: () => void;
|
|
1261
|
-
onClickTrash?: () => void;
|
|
1262
|
-
onClickExpand?: () => void;
|
|
1263
|
-
renderItem: (props: {
|
|
1264
|
-
item: Item;
|
|
1265
|
-
index: number;
|
|
1266
|
-
}) => ReactNode;
|
|
1267
|
-
renderExpandedContent?: () => ReactNode;
|
|
1268
|
-
padding?: number;
|
|
1269
|
-
}
|
|
1270
|
-
declare const ArrayController: <Item>(props: ArrayControllerProps<Item>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1271
|
-
|
|
1272
|
-
type SetNumberMode = "replace" | "adjust";
|
|
1273
|
-
declare function getNewValue(value: number, mode: SetNumberMode, delta?: number): number;
|
|
1274
|
-
type DimensionValue = number | undefined;
|
|
1275
|
-
interface Props {
|
|
1276
|
-
id?: string;
|
|
1277
|
-
value: DimensionValue;
|
|
1278
|
-
onSetValue: (value: number, mode: SetNumberMode) => void;
|
|
1279
|
-
label?: string;
|
|
1280
|
-
size?: number;
|
|
1281
|
-
placeholder?: string;
|
|
1282
|
-
disabled?: boolean;
|
|
1283
|
-
trigger?: "change" | "submit";
|
|
1284
|
-
}
|
|
1285
|
-
declare const DimensionInput: (props: Props) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1286
|
-
|
|
1287
1305
|
declare module "react" {
|
|
1288
1306
|
function memo<A, B>(Component: (props: A) => B): (props: A) => React.ReactElement | null;
|
|
1289
1307
|
function forwardRef<T, P = {}>(render: (props: P, ref: React.ForwardedRef<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
1290
1308
|
}
|
|
1291
1309
|
|
|
1292
|
-
export { ActivityIndicator, ArrayController, type ArrayControllerProps, Avatar, Body, Button, ButtonElement, type ButtonRootProps, Chip, type ChipProps, CloseButtonContainer, type Colors, type CompletionItem, type CompletionListItem, CompletionMenu, type CompletionSectionHeader, CompletionToken, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, type DropValidator, DropdownMenu, type EditableRowProps, type EventName, type ExtractMenuItemType, FillInputField, FillPreviewBackground, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, type GridProps, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IScoredItem, type IToken, type IVirtualizedList, IconButton, type ImageDataContextValue, ImageDataProvider, InputElement, InputField, type InputFieldSize, InputFieldWithCompletions, InspectorPrimitives, Italic, KeyboardShortcut, Label, LabeledElementView, type ListRowMarginType, type ListRowPosition, ListView, type MatchRange, type MenuConfig, type MenuItem, type MenuItemProps, type MenuProps, type Optional, PatternPreviewBackground, Popover, Progress, RadioGroup, type ReactDOMEventHandlers, type ReactEventHandlers, type RegularMenuItem, type RelativeDropPosition, Row$1 as Row, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, Select, SelectOption, type SetNumberMode, type SketchPattern, Slider, Small, Sortable, Spacer, Stack, type StackBreakpointList, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, type TextBreakpointList, type Theme, type ThemeColorName, Toast, ToastProvider, Tooltip, TreeView, createSectionedMenu, dark as darkTheme, fuzzyFilter, fuzzyScore, fuzzyTokenize, getGradientBackground, getNewValue, isLeftButtonClicked, isRightButtonClicked, lightTheme, mediaQuery, mergeEventHandlers,
|
|
1310
|
+
export { ActivityIndicator, ArrayController, type ArrayControllerProps, Avatar, Body, Button, ButtonElement, type ButtonRootProps, Chip, type ChipProps, CloseButtonContainer, type Colors, type CompletionItem, type CompletionListItem, CompletionMenu, type CompletionSectionHeader, CompletionToken, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, type DropValidator, DropdownMenu, type EditableRowProps, type EventName, type ExtractMenuItemType, FillInputField, FillPreviewBackground, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, type GridProps, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IInputFieldWithCompletions, type IScoredItem, type IToken, type IVirtualizedList, IconButton, type ImageDataContextValue, ImageDataProvider, InputElement, InputField, type InputFieldSize, InputFieldWithCompletions, InspectorPrimitives, Italic, KeyboardShortcut, Label, LabeledElementView, type ListRowMarginType, type ListRowPosition, ListView, type MatchRange, type MenuConfig, type MenuItem, type MenuItemProps, type MenuProps, type Optional, PatternPreviewBackground, Popover, Progress, RadioGroup, type ReactDOMEventHandlers, type ReactEventHandlers, type RegularMenuItem, type RelativeDropPosition, Row$1 as Row, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, Select, SelectOption, type SetNumberMode, type SketchPattern, Slider, Small, Sortable, Spacer, Stack, type StackBreakpointList, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, type TextBreakpointList, type Theme, type ThemeColorName, Toast, ToastProvider, Tooltip, TreeView, createSectionedMenu, dark as darkTheme, fuzzyFilter, fuzzyScore, fuzzyTokenize, getGradientBackground, getNewValue, isLeftButtonClicked, isRightButtonClicked, lightTheme, mediaQuery, mergeEventHandlers, normalizeListDestinationIndex, rgbaToSketchColor, size, sketchColorToHex, sketchColorToRgba, sketchColorToRgbaString, useDesignSystemConfiguration, useDesignSystemTheme, useDialogContainsElement, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHover, useImageData, useOpenInputDialog, usePlatform, usePlatformModKey, withSeparatorElements };
|