@noya-app/noya-designsystem 0.1.23 → 0.1.25
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 +12 -0
- package/dist/index.d.mts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.js +692 -603
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +357 -268
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Chip.tsx +14 -9
- package/src/components/ContextMenu.tsx +2 -1
- package/src/components/DropdownMenu.tsx +3 -2
- package/src/components/IconButton.tsx +2 -2
- package/src/components/Icons.tsx +18 -0
- package/src/components/InputField.tsx +34 -0
- package/src/components/ListView.tsx +33 -8
- package/src/components/SelectMenu.tsx +34 -4
- package/src/components/Switch.tsx +3 -0
- package/src/components/TreeView.tsx +3 -2
- package/src/components/internal/Menu.tsx +2 -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
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
8
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m216.08 KB[39m
|
|
9
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m471.92 KB[39m
|
|
10
|
+
[32mESM[39m ⚡️ Build success in 141ms
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m234.49 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m471.82 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 141ms
|
|
14
14
|
[34mDTS[39m Build start
|
|
15
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
15
|
+
[32mDTS[39m ⚡️ Build success in 11480ms
|
|
16
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m62.01 KB[39m
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m62.01 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @noya-app/noya-designsystem
|
|
2
2
|
|
|
3
|
+
## 0.1.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b1903d5: Update json editor and improve multiplayer sync
|
|
8
|
+
|
|
9
|
+
## 0.1.24
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- d0eb712: Add token import and export
|
|
14
|
+
|
|
3
15
|
## 0.1.23
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import React__default, { CSSProperties, ReactNode, ComponentProps, AriaRole, Key
|
|
|
3
3
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
5
|
import { CSSObject, CSSProperties as CSSProperties$1 } from 'styled-components';
|
|
6
|
+
import * as Icons from '@noya-app/noya-icons';
|
|
6
7
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
7
8
|
import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
8
9
|
import { Sketch } from '@noya-app/noya-file-format';
|
|
@@ -10,7 +11,6 @@ import * as csstype from 'csstype';
|
|
|
10
11
|
import { Property } from 'csstype';
|
|
11
12
|
import * as _noya_app_noya_keymap from '@noya-app/noya-keymap';
|
|
12
13
|
import { KeyModifiers, PlatformName } from '@noya-app/noya-keymap';
|
|
13
|
-
import * as Icons from '@noya-app/noya-icons';
|
|
14
14
|
import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
|
|
15
15
|
import { Size } from '@noya-app/noya-geometry';
|
|
16
16
|
import { IItemScore } from 'vscode-fuzzy-scorer';
|
|
@@ -73,7 +73,7 @@ interface ButtonRootProps {
|
|
|
73
73
|
declare const Button: (props: ButtonRootProps & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
74
74
|
|
|
75
75
|
type ChipColorScheme = "primary" | "secondary" | "error";
|
|
76
|
-
type ChipSize = "small" | "medium";
|
|
76
|
+
type ChipSize = "small" | "medium" | "large";
|
|
77
77
|
type ChipVariant = "solid" | "outlined" | "ghost";
|
|
78
78
|
interface ChipProps {
|
|
79
79
|
id?: string;
|
|
@@ -229,6 +229,8 @@ type PickByValue<T, V> = Pick<T, {
|
|
|
229
229
|
}[keyof T]>;
|
|
230
230
|
type ThemeColorName = keyof PickByValue<Theme['colors'], string>;
|
|
231
231
|
|
|
232
|
+
type IconName = keyof typeof Icons;
|
|
233
|
+
|
|
232
234
|
declare const SEPARATOR_ITEM = "separator";
|
|
233
235
|
type MenuItemRole = "undo" | "redo" | "cut" | "copy" | "paste" | "pasteAndMatchStyle" | "delete" | "selectAll" | "reload" | "forceReload" | "toggleDevTools" | "resetZoom" | "zoomIn" | "zoomOut" | "toggleSpellChecker" | "togglefullscreen" | "window" | "minimize" | "close" | "help" | "about" | "services" | "hide" | "hideOthers" | "unhide" | "quit" | "showSubstitutions" | "toggleSmartQuotes" | "toggleSmartDashes" | "toggleTextReplacement" | "startSpeaking" | "stopSpeaking" | "zoom" | "front" | "appMenu" | "fileMenu" | "editMenu" | "viewMenu" | "shareMenu" | "recentDocuments" | "toggleTabBar" | "selectNextTab" | "selectPreviousTab" | "mergeAllWindows" | "clearRecentDocuments" | "moveTabToNewWindow" | "windowMenu";
|
|
234
236
|
type RegularMenuItem<T extends string> = {
|
|
@@ -237,7 +239,7 @@ type RegularMenuItem<T extends string> = {
|
|
|
237
239
|
shortcut?: string;
|
|
238
240
|
checked?: boolean;
|
|
239
241
|
disabled?: boolean;
|
|
240
|
-
icon?: ReactNode;
|
|
242
|
+
icon?: Exclude<ReactNode, string> | IconName;
|
|
241
243
|
items?: MenuItem<T>[];
|
|
242
244
|
role?: MenuItemRole;
|
|
243
245
|
};
|
|
@@ -432,7 +434,7 @@ declare namespace GridView {
|
|
|
432
434
|
}
|
|
433
435
|
|
|
434
436
|
declare const IconButton: (props: Omit<ButtonRootProps, "children" | "size" | "flex" | "variant"> & {
|
|
435
|
-
iconName:
|
|
437
|
+
iconName: IconName;
|
|
436
438
|
className?: string | undefined;
|
|
437
439
|
style?: React__default.CSSProperties | undefined;
|
|
438
440
|
selected?: boolean | undefined;
|
|
@@ -537,6 +539,7 @@ declare namespace InputField {
|
|
|
537
539
|
onClick?: (() => void) | undefined;
|
|
538
540
|
}) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
539
541
|
const Label: (props: InputFieldLabelProps & React__default.RefAttributes<HTMLLabelElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
542
|
+
const PrimitiveElement: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
540
543
|
}
|
|
541
544
|
|
|
542
545
|
declare function fuzzyScore({ item, query }: {
|
|
@@ -869,6 +872,8 @@ type Props$8<T extends string> = {
|
|
|
869
872
|
value: T;
|
|
870
873
|
onSelect?: (value: T) => void;
|
|
871
874
|
placeholder?: string;
|
|
875
|
+
disabled?: boolean;
|
|
876
|
+
readOnly?: boolean;
|
|
872
877
|
};
|
|
873
878
|
declare const SelectMenu: <T extends string = string>(props: Props$8<T>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
874
879
|
|
|
@@ -973,8 +978,9 @@ interface Props$4 {
|
|
|
973
978
|
value: boolean;
|
|
974
979
|
onChange: (value: boolean) => void;
|
|
975
980
|
colorScheme?: SwitchColorScheme;
|
|
981
|
+
disabled?: boolean;
|
|
976
982
|
}
|
|
977
|
-
declare const Switch: ({ value, onChange, colorScheme, }: Props$4) => React__default.JSX.Element;
|
|
983
|
+
declare const Switch: ({ value, onChange, colorScheme, disabled, }: Props$4) => React__default.JSX.Element;
|
|
978
984
|
|
|
979
985
|
type StyleProps = {
|
|
980
986
|
flex?: CSSProperties$1["flex"];
|
|
@@ -1049,7 +1055,7 @@ interface Props$2 {
|
|
|
1049
1055
|
declare const Tooltip: (props: Props$2) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1050
1056
|
|
|
1051
1057
|
type TreeRowBaseProps = {
|
|
1052
|
-
icon?: ReactNode;
|
|
1058
|
+
icon?: Exclude<ReactNode, string> | IconName;
|
|
1053
1059
|
expanded?: boolean;
|
|
1054
1060
|
onClickChevron?: ({ altKey }: {
|
|
1055
1061
|
altKey: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import React__default, { CSSProperties, ReactNode, ComponentProps, AriaRole, Key
|
|
|
3
3
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
5
|
import { CSSObject, CSSProperties as CSSProperties$1 } from 'styled-components';
|
|
6
|
+
import * as Icons from '@noya-app/noya-icons';
|
|
6
7
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
7
8
|
import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
8
9
|
import { Sketch } from '@noya-app/noya-file-format';
|
|
@@ -10,7 +11,6 @@ import * as csstype from 'csstype';
|
|
|
10
11
|
import { Property } from 'csstype';
|
|
11
12
|
import * as _noya_app_noya_keymap from '@noya-app/noya-keymap';
|
|
12
13
|
import { KeyModifiers, PlatformName } from '@noya-app/noya-keymap';
|
|
13
|
-
import * as Icons from '@noya-app/noya-icons';
|
|
14
14
|
import * as _noya_app_noya_geometry from '@noya-app/noya-geometry';
|
|
15
15
|
import { Size } from '@noya-app/noya-geometry';
|
|
16
16
|
import { IItemScore } from 'vscode-fuzzy-scorer';
|
|
@@ -73,7 +73,7 @@ interface ButtonRootProps {
|
|
|
73
73
|
declare const Button: (props: ButtonRootProps & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
74
74
|
|
|
75
75
|
type ChipColorScheme = "primary" | "secondary" | "error";
|
|
76
|
-
type ChipSize = "small" | "medium";
|
|
76
|
+
type ChipSize = "small" | "medium" | "large";
|
|
77
77
|
type ChipVariant = "solid" | "outlined" | "ghost";
|
|
78
78
|
interface ChipProps {
|
|
79
79
|
id?: string;
|
|
@@ -229,6 +229,8 @@ type PickByValue<T, V> = Pick<T, {
|
|
|
229
229
|
}[keyof T]>;
|
|
230
230
|
type ThemeColorName = keyof PickByValue<Theme['colors'], string>;
|
|
231
231
|
|
|
232
|
+
type IconName = keyof typeof Icons;
|
|
233
|
+
|
|
232
234
|
declare const SEPARATOR_ITEM = "separator";
|
|
233
235
|
type MenuItemRole = "undo" | "redo" | "cut" | "copy" | "paste" | "pasteAndMatchStyle" | "delete" | "selectAll" | "reload" | "forceReload" | "toggleDevTools" | "resetZoom" | "zoomIn" | "zoomOut" | "toggleSpellChecker" | "togglefullscreen" | "window" | "minimize" | "close" | "help" | "about" | "services" | "hide" | "hideOthers" | "unhide" | "quit" | "showSubstitutions" | "toggleSmartQuotes" | "toggleSmartDashes" | "toggleTextReplacement" | "startSpeaking" | "stopSpeaking" | "zoom" | "front" | "appMenu" | "fileMenu" | "editMenu" | "viewMenu" | "shareMenu" | "recentDocuments" | "toggleTabBar" | "selectNextTab" | "selectPreviousTab" | "mergeAllWindows" | "clearRecentDocuments" | "moveTabToNewWindow" | "windowMenu";
|
|
234
236
|
type RegularMenuItem<T extends string> = {
|
|
@@ -237,7 +239,7 @@ type RegularMenuItem<T extends string> = {
|
|
|
237
239
|
shortcut?: string;
|
|
238
240
|
checked?: boolean;
|
|
239
241
|
disabled?: boolean;
|
|
240
|
-
icon?: ReactNode;
|
|
242
|
+
icon?: Exclude<ReactNode, string> | IconName;
|
|
241
243
|
items?: MenuItem<T>[];
|
|
242
244
|
role?: MenuItemRole;
|
|
243
245
|
};
|
|
@@ -432,7 +434,7 @@ declare namespace GridView {
|
|
|
432
434
|
}
|
|
433
435
|
|
|
434
436
|
declare const IconButton: (props: Omit<ButtonRootProps, "children" | "size" | "flex" | "variant"> & {
|
|
435
|
-
iconName:
|
|
437
|
+
iconName: IconName;
|
|
436
438
|
className?: string | undefined;
|
|
437
439
|
style?: React__default.CSSProperties | undefined;
|
|
438
440
|
selected?: boolean | undefined;
|
|
@@ -537,6 +539,7 @@ declare namespace InputField {
|
|
|
537
539
|
onClick?: (() => void) | undefined;
|
|
538
540
|
}) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
539
541
|
const Label: (props: InputFieldLabelProps & React__default.RefAttributes<HTMLLabelElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
542
|
+
const PrimitiveElement: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
540
543
|
}
|
|
541
544
|
|
|
542
545
|
declare function fuzzyScore({ item, query }: {
|
|
@@ -869,6 +872,8 @@ type Props$8<T extends string> = {
|
|
|
869
872
|
value: T;
|
|
870
873
|
onSelect?: (value: T) => void;
|
|
871
874
|
placeholder?: string;
|
|
875
|
+
disabled?: boolean;
|
|
876
|
+
readOnly?: boolean;
|
|
872
877
|
};
|
|
873
878
|
declare const SelectMenu: <T extends string = string>(props: Props$8<T>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
874
879
|
|
|
@@ -973,8 +978,9 @@ interface Props$4 {
|
|
|
973
978
|
value: boolean;
|
|
974
979
|
onChange: (value: boolean) => void;
|
|
975
980
|
colorScheme?: SwitchColorScheme;
|
|
981
|
+
disabled?: boolean;
|
|
976
982
|
}
|
|
977
|
-
declare const Switch: ({ value, onChange, colorScheme, }: Props$4) => React__default.JSX.Element;
|
|
983
|
+
declare const Switch: ({ value, onChange, colorScheme, disabled, }: Props$4) => React__default.JSX.Element;
|
|
978
984
|
|
|
979
985
|
type StyleProps = {
|
|
980
986
|
flex?: CSSProperties$1["flex"];
|
|
@@ -1049,7 +1055,7 @@ interface Props$2 {
|
|
|
1049
1055
|
declare const Tooltip: (props: Props$2) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1050
1056
|
|
|
1051
1057
|
type TreeRowBaseProps = {
|
|
1052
|
-
icon?: ReactNode;
|
|
1058
|
+
icon?: Exclude<ReactNode, string> | IconName;
|
|
1053
1059
|
expanded?: boolean;
|
|
1054
1060
|
onClickChevron?: ({ altKey }: {
|
|
1055
1061
|
altKey: boolean;
|