@noya-app/noya-designsystem 0.1.35 → 0.1.37
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 +13 -12
- package/CHANGELOG.md +14 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +1058 -0
- package/dist/index.d.ts +16 -23
- package/dist/index.js +1063 -1022
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +753 -704
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/Checkbox.tsx +76 -0
- package/src/components/Label.tsx +16 -29
- package/src/components/SelectMenu.tsx +39 -33
- package/src/components/Switch.tsx +5 -2
- package/src/index.tsx +1 -0
- package/src/utils/withSeparatorElements.ts +29 -3
- package/tailwind.config.ts +3 -2
- package/tsconfig.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { CSSProperties, ReactNode, ComponentProps, SyntheticEvent, AriaRole, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, FocusEventHandler,
|
|
2
|
+
import React__default, { CSSProperties, ReactNode, InputHTMLAttributes, ComponentProps, SyntheticEvent, AriaRole, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, FocusEventHandler, Ref, LabelHTMLAttributes, ReactHTML } from 'react';
|
|
3
3
|
import * as Icons from '@noya-app/noya-icons';
|
|
4
4
|
export { Icons };
|
|
5
5
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -64,6 +64,11 @@ interface ButtonRootProps {
|
|
|
64
64
|
}
|
|
65
65
|
declare const Button: (props: ButtonRootProps & React__default.RefAttributes<HTMLButtonElement>) => React__default.ReactElement | null;
|
|
66
66
|
|
|
67
|
+
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
68
|
+
colorScheme?: "primary" | "secondary";
|
|
69
|
+
}
|
|
70
|
+
declare const Checkbox$1: (props: CheckboxProps & React__default.RefAttributes<HTMLInputElement>) => React__default.ReactElement | null;
|
|
71
|
+
|
|
67
72
|
type ChipColorScheme = "primary" | "secondary" | "error";
|
|
68
73
|
type ChipSize = "small" | "medium" | "large";
|
|
69
74
|
type ChipVariant = "solid" | "outlined" | "ghost";
|
|
@@ -606,13 +611,9 @@ declare const InspectorContainer: (props: {
|
|
|
606
611
|
style?: React__default.CSSProperties;
|
|
607
612
|
} & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
608
613
|
|
|
609
|
-
interface
|
|
610
|
-
label: ReactNode;
|
|
611
|
-
children: ReactNode;
|
|
612
|
-
}
|
|
613
|
-
declare namespace Label {
|
|
614
|
-
const Root: (props: LabelRootProps) => React__default.ReactElement | null;
|
|
614
|
+
interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
615
615
|
}
|
|
616
|
+
declare const Label: (props: LabelProps & React__default.RefAttributes<HTMLLabelElement>) => React__default.ReactElement | null;
|
|
616
617
|
|
|
617
618
|
interface ContainerProps {
|
|
618
619
|
children: ReactNode;
|
|
@@ -704,13 +705,14 @@ declare namespace Spacer {
|
|
|
704
705
|
|
|
705
706
|
type SwitchColorScheme = "normal" | "primary" | "secondary";
|
|
706
707
|
interface Props$3 {
|
|
708
|
+
id?: string;
|
|
707
709
|
value: boolean;
|
|
708
710
|
onChange: (value: boolean) => void;
|
|
709
711
|
/** @default normal */
|
|
710
712
|
colorScheme?: SwitchColorScheme;
|
|
711
713
|
disabled?: boolean;
|
|
712
714
|
}
|
|
713
|
-
declare const Switch: ({ value, onChange, colorScheme, disabled, }: Props$3) => React__default.JSX.Element;
|
|
715
|
+
declare const Switch: ({ id, value, onChange, colorScheme, disabled, }: Props$3) => React__default.JSX.Element;
|
|
714
716
|
|
|
715
717
|
declare const config: Config;
|
|
716
718
|
|
|
@@ -988,7 +990,10 @@ declare function sketchColorToRgbaString(value: Sketch.Color): string;
|
|
|
988
990
|
declare function rgbaToSketchColor(value: RgbaColor): Sketch.Color;
|
|
989
991
|
declare function sketchColorToHex(value: Sketch.Color): string;
|
|
990
992
|
|
|
991
|
-
|
|
993
|
+
interface SeparatorOptions {
|
|
994
|
+
traverseFragments?: boolean;
|
|
995
|
+
}
|
|
996
|
+
declare function withSeparatorElements(elements: ReactNode, separator: ReactNode | (() => ReactNode), options?: SeparatorOptions): ReactNode[];
|
|
992
997
|
|
|
993
998
|
type SetNumberMode = "replace" | "adjust";
|
|
994
999
|
declare function getNewValue(value: number, mode: SetNumberMode, delta?: number): number;
|
|
@@ -1042,19 +1047,7 @@ declare const InspectorPrimitives_Text: typeof Text;
|
|
|
1042
1047
|
declare const InspectorPrimitives_Title: typeof Title;
|
|
1043
1048
|
declare const InspectorPrimitives_VerticalSeparator: typeof VerticalSeparator;
|
|
1044
1049
|
declare namespace InspectorPrimitives {
|
|
1045
|
-
export {
|
|
1046
|
-
InspectorPrimitives_Checkbox as Checkbox,
|
|
1047
|
-
InspectorPrimitives_Column as Column,
|
|
1048
|
-
InspectorPrimitives_HorizontalSeparator as HorizontalSeparator,
|
|
1049
|
-
InspectorPrimitives_LabeledRow as LabeledRow,
|
|
1050
|
-
InspectorPrimitives_Row as Row,
|
|
1051
|
-
InspectorPrimitives_RowLabel as RowLabel,
|
|
1052
|
-
InspectorPrimitives_Section as Section,
|
|
1053
|
-
InspectorPrimitives_SectionHeader as SectionHeader,
|
|
1054
|
-
InspectorPrimitives_Text as Text,
|
|
1055
|
-
InspectorPrimitives_Title as Title,
|
|
1056
|
-
InspectorPrimitives_VerticalSeparator as VerticalSeparator,
|
|
1057
|
-
};
|
|
1050
|
+
export { InspectorPrimitives_Checkbox as Checkbox, InspectorPrimitives_Column as Column, InspectorPrimitives_HorizontalSeparator as HorizontalSeparator, InspectorPrimitives_LabeledRow as LabeledRow, 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 };
|
|
1058
1051
|
}
|
|
1059
1052
|
|
|
1060
1053
|
declare module "react" {
|
|
@@ -1062,4 +1055,4 @@ declare module "react" {
|
|
|
1062
1055
|
function forwardRef<T, P = {}>(render: (props: P, ref: React.ForwardedRef<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
1063
1056
|
}
|
|
1064
1057
|
|
|
1065
|
-
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 };
|
|
1058
|
+
export { ActivityIndicator, AutoResizingTextArea, Avatar, AvatarStack, Body, Button, type ButtonRootProps, CONTENT_AREA_ID, Checkbox$1 as Checkbox, Chip, type ChipProps, type CompletionItem, type CompletionListItem, CompletionMenu, type CompletionSectionHeader, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, DraggableMenuButton, type DropValidator, DropdownMenu, EDITOR_PANEL_GROUP_ID, type EditableRowProps, type ExtractMenuItemType, FillInputField, FillPreviewBackground, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, GradientPicker, GridView, type GridViewSize, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, type IScoredItem, type IToken, type IVirtualizedList, type IWorkspaceLayout, IconButton, type IconName, type ImageDataContextValue, ImageDataProvider, InputField, type InputFieldInputProps, type InputFieldSize, InputFieldWithCompletions, type InputFieldWithCompletionsProps, type InputFieldWithCompletionsRef, InspectorContainer, InspectorPrimitives, Italic, KeyboardShortcut, LEFT_SIDEBAR_ID, Label, LabeledElementView, type ListRowMarginType, type ListRowPosition, ListView, type MatchRange, type MenuConfig, type MenuItem, type MenuItemProps, type MenuProps, type Optional, type PanelLayoutState, PatternPreviewBackground, Popover, Progress, RIGHT_SIDEBAR_ID, RadioGroup, type RegularMenuItem, type RelativeDropPosition, SEPARATOR_ITEM, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, ScrollArea, SelectMenu, type SetNumberMode, type SketchPattern, Slider, Small, Sortable, Spacer, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Text$1 as Text, type TextProps, type Theme, type 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 };
|