@noya-app/noya-designsystem 0.1.82 → 0.1.84
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 +37 -38
- package/.turbo/turbo-lint.log +1 -15
- package/CHANGELOG.md +14 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +36 -9
- package/dist/index.d.ts +36 -9
- package/dist/index.js +428 -282
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +417 -271
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/SegmentedControl.tsx +227 -48
- package/src/components/resizablePanels/Panel.tsx +22 -2
- package/src/components/resizablePanels/PanelGroup.tsx +15 -8
- package/src/components/workspace/DrawerWorkspaceLayout.tsx +131 -152
- package/src/components/workspace/HorizontalTabBar.tsx +43 -0
- package/src/components/workspace/PanelWorkspaceLayout.tsx +112 -54
- package/src/components/workspace/WorkspaceLayout.tsx +19 -5
- package/src/components/workspace/types.ts +17 -5
- package/src/contexts/DialogContext.tsx +12 -5
- package/src/contexts/__tests__/DialogContext.test.tsx +142 -0
- package/src/index.css +12 -2
- package/dist/chunk-D57E6H3M.mjs +0 -36
- package/dist/chunk-D57E6H3M.mjs.map +0 -1
- package/dist/chunk-FJ6ZGZIA.mjs +0 -43
- package/dist/chunk-FJ6ZGZIA.mjs.map +0 -1
- package/dist/chunk-QDV7OQMJ.mjs +0 -37
- package/dist/chunk-QDV7OQMJ.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1566,6 +1566,10 @@ type PanelLayoutState = {
|
|
|
1566
1566
|
leftSidebarCollapsed: boolean;
|
|
1567
1567
|
rightSidebarCollapsed: boolean;
|
|
1568
1568
|
};
|
|
1569
|
+
type SidebarState = {
|
|
1570
|
+
width: number;
|
|
1571
|
+
collapsed: boolean;
|
|
1572
|
+
};
|
|
1569
1573
|
type RenderPanel<TabValue extends string> = ReactNode | ((props: {
|
|
1570
1574
|
activeTabValue: TabValue;
|
|
1571
1575
|
/**
|
|
@@ -1590,12 +1594,19 @@ type LayoutProps<LeftTab extends string = string, RightTab extends string = stri
|
|
|
1590
1594
|
leftSidebarRef: React.RefObject<SidebarRef | null>;
|
|
1591
1595
|
rightSidebarRef: React.RefObject<SidebarRef | null>;
|
|
1592
1596
|
/**
|
|
1593
|
-
*
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
+
* Callback when left sidebar state changes (width or collapsed).
|
|
1598
|
+
*/
|
|
1599
|
+
onLeftSidebarStateChange?: (state: SidebarState) => void;
|
|
1600
|
+
/**
|
|
1601
|
+
* Callback when right sidebar state changes (width or collapsed).
|
|
1602
|
+
*/
|
|
1603
|
+
onRightSidebarStateChange?: (state: SidebarState) => void;
|
|
1604
|
+
/**
|
|
1605
|
+
* Whether to persist panel sizes to localStorage.
|
|
1606
|
+
* Set to false when using external storage (e.g., cookies) for sidebar state.
|
|
1607
|
+
* @default true
|
|
1597
1608
|
*/
|
|
1598
|
-
|
|
1609
|
+
shouldAutoSave?: boolean;
|
|
1599
1610
|
};
|
|
1600
1611
|
type WorkspaceLayoutGroup = {
|
|
1601
1612
|
expandToSizes: Record<string, number>;
|
|
@@ -2247,6 +2258,13 @@ interface SegmentedControlProps<T extends string> {
|
|
|
2247
2258
|
* @default "auto"
|
|
2248
2259
|
*/
|
|
2249
2260
|
itemWidth?: SegmentedControlItemWidth;
|
|
2261
|
+
/**
|
|
2262
|
+
* When enabled, automatically hides item titles and shows only icons
|
|
2263
|
+
* when the control doesn't fit in its parent container.
|
|
2264
|
+
* Requires all items to have icons.
|
|
2265
|
+
* @default false
|
|
2266
|
+
*/
|
|
2267
|
+
enableCompactMode?: boolean;
|
|
2250
2268
|
}
|
|
2251
2269
|
type SegmentedControlItemProps<T extends string> = {
|
|
2252
2270
|
title?: ReactNode;
|
|
@@ -2633,10 +2651,19 @@ interface WorkspaceLayoutProps<LeftTab extends string, RightTab extends string>
|
|
|
2633
2651
|
sideTypeBreakpoint?: number;
|
|
2634
2652
|
detectSize?: DetectSizeType;
|
|
2635
2653
|
/**
|
|
2636
|
-
*
|
|
2637
|
-
|
|
2654
|
+
* Callback when left sidebar state changes (width or collapsed).
|
|
2655
|
+
*/
|
|
2656
|
+
onLeftSidebarStateChange?: (state: SidebarState) => void;
|
|
2657
|
+
/**
|
|
2658
|
+
* Callback when right sidebar state changes (width or collapsed).
|
|
2659
|
+
*/
|
|
2660
|
+
onRightSidebarStateChange?: (state: SidebarState) => void;
|
|
2661
|
+
/**
|
|
2662
|
+
* Whether to persist panel sizes to localStorage.
|
|
2663
|
+
* Set to false when using external storage (e.g., cookies) for sidebar state.
|
|
2664
|
+
* @default true
|
|
2638
2665
|
*/
|
|
2639
|
-
|
|
2666
|
+
shouldAutoSave?: boolean;
|
|
2640
2667
|
}
|
|
2641
2668
|
type WorkspaceLayoutRef = {
|
|
2642
2669
|
setLeftExpanded: (expanded: boolean) => void;
|
|
@@ -3127,4 +3154,4 @@ type ToolbarDrawerProps = {
|
|
|
3127
3154
|
};
|
|
3128
3155
|
declare const ToolbarDrawer: React__default.NamedExoticComponent<ToolbarDrawerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3129
3156
|
|
|
3130
|
-
export { AIAssistantInput, AIAssistantLayout, AIAssistantLoadingIndicator, type AcceptsDrop, type AcceptsDropOptions, type AcceptsFromList, ActionMenu, type ActivityIconSemanticColor, ActivityIndicator, ActivityLog, type ActivityLogItem, Anchor, AnimatePresence, type AnimatePresenceChildState, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, Banner, type BannerProps, type BaseComboboxProps, BaseToolbar, BaseToolbarContainer, type BaseToolbarProps, Body, BreadcrumbSlash, BreadcrumbText, Button, type ButtonProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionItemSize, type CollectionProps, type CollectionRef, type CollectionRenderActionProps, type CollectionThumbnailProps, type CollectionThumbnailSize, type CollectionViewType, ColorSwatch, ColorSwatchControl, type ColorSwatchSize, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ConnectedUsersMenuLayout, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, type DetectSizeType, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, type DragItem, type DragState, DraggableMenuButton, Drawer, type DrawerProps, type DropValidator, DropdownMenu, type DropdownMenuProps, EditableText, type EditableTextRef, EmojiPicker, type EmojiPickerStorage, ExtraSmall, type ExtractMenuItemType, Fade, type FadeDirection, type FadeProps, FileExplorerCollection, FileExplorerDetail, FileExplorerEmptyState, FileExplorerLayout, FileExplorerUploadButton, FileUploadIndicator, FileUploadList, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, Grid, GridBackground, GridView, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, INPUT_HEIGHT, type IScoredItem, type ISearchCompletionMenu, type IToken, type IVirtualizedList, Icon, IconButton, type IconName, type IconProp, ImageBlockComponent, type ImageDataContextValue, ImageDataProvider, IndentContext, InputField, type InputFieldInputProps, type InputFieldProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, Italic, type ItemChildrenExtraProps, type ItemChildrenProps, KeyboardShortcut, Label, LabelContext, type LabelProps, type LabelType, LabelTypeContext, type LabelTypeContextValue, LabelWidthContext, type LabelWidthContextValue, LabeledElementView, LabeledField, type LayoutProps, type LinkComponent, LinkComponentProvider, List, ListMenu, type ListMenuProps, ListNavigator, type ListNavigatorProps, ListView, Logo, type MatchRange, MediaThumbnail, type MediaThumbnailProps, type MenuConfig, type MenuItem, type MenuItemIcon, type MenuItemProps, type MenuItemRole, type MenuProps, Message, type MessageProps, type MoveDragItemHandler, type MoveDragItemParameters, type MoveTreeItemOptions, Navigator, type NavigatorHeaderProps, type NavigatorNavigation, type NavigatorParams, type NavigatorProps, type NavigatorPushFunction, type NavigatorRenderContext, type NavigatorRenderHeader, type NavigatorReplaceFunction, type NavigatorRoute, type NavigatorRoutesConfig, type NavigatorScreenProps, type NavigatorStackEntry, type NonSelectableMenuItem, type OpenPortalControlsContextValue, type OpenPortalsContextValue, OpenPortalsProvider, type OptionModeOnlyProps, type OptionModeProps, type Optional, type OverlayLayout, OverlayToolbar, type OverlayToolbarProps, type PanelLayoutState, PipelineResultLayout, PipelineResultLink, Popover, type PopoverMenuItem, type PortalScopeContextValue, PortalScopeProvider, Progress, type RelativeDropPosition, type RenderPanel, type RenderThumbnailIconProps, ResizableContainer, RingProgress, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, type ScoredMenuItem, ScrollArea, type ScrollToIndexAlign, type ScrollToIndexOptions, type ScrollToIndexPadding, ScrollableSidebar, SearchCompletionMenu, Section$1 as Section, SectionHeader$1 as SectionHeader, SectionHeaderMenuItem, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SelectableMenuItem, SelectionToolbarContainer, type SeparatorItem, type SetNumberMode, SharedDragProvider, type SharedDragProviderProps, type SideOptions, type SideType, type SidebarOptions, type SidebarRef, type SketchPattern, Slider, Small, Sortable, SortableItemContext, type SortableItemContextProps, type SortableProps, Spacer, type StackItem, StackNavigator, type StackNavigatorHeaderProps, type StackNavigatorProps, type StackNavigatorRenderHeader, Stepper, type StringModeOnlyProps, type StringModeProps, type SubMenuItem, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Tabs, type TabsProps, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, type TokenValue, Toolbar, ToolbarDrawer, ToolbarMenu, ToolbarMenuButton, ToolbarMenuContext, ToolbarMenuDropdown, ToolbarMenuItem, ToolbarMenuPopover, type ToolbarProps, ToolbarShortcut, type ToolbarVariant, Tooltip, TreeView, type UseThemeReturnType, UserAvatar, UserPicker, type UserPickerProps, type UserPickerUser, UserPointer, type UserPointerProps, type ValidateDropIndicatorParams, Virtualized, type VirtualizedProps, type VirtualizedRenderItem, WorkspaceLayout, type WorkspaceLayoutGroup, type WorkspaceLayoutProps, type WorkspaceLayoutRef, type WorkspaceLayoutState, type WorkspaceSideContextValue, WorkspaceSideProvider, acceptsDrop, colorForStringValues, colorFromString, colorSwatchSizeMap, createDragItemKey, createNavigator, createSectionedMenu, createSharedDrag, cssVarNames, cssVars, cx, decodeImageSrc, defaultAcceptsDrop, dragItemKeySeparator, editableBlockStyles, filterWithGroupedSections, formatByteSize, fuzzyFilter, fuzzyScore, fuzzyTokenize, getClosestPortalScope, getFieldSpacing, getGridSize, getItemFirstCollisionDetection, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, getPipelineResultLink, getThumbnailColors, getUserDisplayName, isMenuItemSectionHeader, isNonSelectableMenuItem, isPopoverMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, isSubMenuItem, labeledFieldStyles, mergeConflictingClassNames, moveTreeItem, normalizeListTargetIndex, parseDragItemKey, popoverStyle, portalScopeDataSetName, portalScopePropName, portalScopeProps, proseTheme, renderIcon, separator, styles, textStyles, toolbarTransparentStyle, updateSelection, useAutoResize, useBindKeyboardShortcutsForMenuItems, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useDialogContext, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHasOpenPortals, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelType, useLabelWidth, useLinkComponent, useNavigator, useNavigatorRoute, useOpenConfirmationDialog, useOpenDialog, useOpenInputDialog, useOpenPortalsControls, usePlatform, usePlatformModKey, usePortalScopeId, useTheme, useToast, useWorkspaceSide, validateDropIndicator, whiteboardProseTheme, withDragProvider, withSeparatorElements };
|
|
3157
|
+
export { AIAssistantInput, AIAssistantLayout, AIAssistantLoadingIndicator, type AcceptsDrop, type AcceptsDropOptions, type AcceptsFromList, ActionMenu, type ActivityIconSemanticColor, ActivityIndicator, ActivityLog, type ActivityLogItem, Anchor, AnimatePresence, type AnimatePresenceChildState, type AnimatePresenceProps, Avatar, type AvatarProps, AvatarStack, Banner, type BannerProps, type BaseComboboxProps, BaseToolbar, BaseToolbarContainer, type BaseToolbarProps, Body, BreadcrumbSlash, BreadcrumbText, Button, type ButtonProps, CHECKBOX_INDENT_WIDTH, CHECKBOX_RIGHT_INSET, CHECKBOX_WIDTH, Checkbox$1 as Checkbox, Chip, type ChipProps, Collection, type CollectionItemSize, type CollectionProps, type CollectionRef, type CollectionRenderActionProps, type CollectionThumbnailProps, type CollectionThumbnailSize, type CollectionViewType, ColorSwatch, ColorSwatchControl, type ColorSwatchSize, Combobox, ComboboxMenu, type ComboboxProps, type ComboboxRef, ComboboxState, type ComboboxStateSnapshot, CommandPalette, ConnectedUsersMenuLayout, ContextMenu, type DesignSystemConfigurationContextValue, DesignSystemConfigurationProvider, type DetectSizeType, Dialog, type DialogContextValue, DialogProvider, DimensionInput, type DimensionValue, Divider, DividerVertical, type DragItem, type DragState, DraggableMenuButton, Drawer, type DrawerProps, type DropValidator, DropdownMenu, type DropdownMenuProps, EditableText, type EditableTextRef, EmojiPicker, type EmojiPickerStorage, ExtraSmall, type ExtractMenuItemType, Fade, type FadeDirection, type FadeProps, FileExplorerCollection, FileExplorerDetail, FileExplorerEmptyState, FileExplorerLayout, FileExplorerUploadButton, FileUploadIndicator, FileUploadList, FloatingWindow, FloatingWindowProvider, FullscreenDialog, type GlobalInputBlurContextValue, GlobalInputBlurProvider, Grid, GridBackground, GridView, Heading1, Heading2, Heading3, Heading4, Heading5, type HoverEvent, type HoverEvents, type HoverProps, type IDialog, INPUT_HEIGHT, type IScoredItem, type ISearchCompletionMenu, type IToken, type IVirtualizedList, Icon, IconButton, type IconName, type IconProp, ImageBlockComponent, type ImageDataContextValue, ImageDataProvider, IndentContext, InputField, type InputFieldInputProps, type InputFieldProps, type InputFieldSize, InspectorContainer, InspectorPrimitives, Italic, type ItemChildrenExtraProps, type ItemChildrenProps, KeyboardShortcut, Label, LabelContext, type LabelProps, type LabelType, LabelTypeContext, type LabelTypeContextValue, LabelWidthContext, type LabelWidthContextValue, LabeledElementView, LabeledField, type LayoutProps, type LinkComponent, LinkComponentProvider, List, ListMenu, type ListMenuProps, ListNavigator, type ListNavigatorProps, ListView, Logo, type MatchRange, MediaThumbnail, type MediaThumbnailProps, type MenuConfig, type MenuItem, type MenuItemIcon, type MenuItemProps, type MenuItemRole, type MenuProps, Message, type MessageProps, type MoveDragItemHandler, type MoveDragItemParameters, type MoveTreeItemOptions, Navigator, type NavigatorHeaderProps, type NavigatorNavigation, type NavigatorParams, type NavigatorProps, type NavigatorPushFunction, type NavigatorRenderContext, type NavigatorRenderHeader, type NavigatorReplaceFunction, type NavigatorRoute, type NavigatorRoutesConfig, type NavigatorScreenProps, type NavigatorStackEntry, type NonSelectableMenuItem, type OpenPortalControlsContextValue, type OpenPortalsContextValue, OpenPortalsProvider, type OptionModeOnlyProps, type OptionModeProps, type Optional, type OverlayLayout, OverlayToolbar, type OverlayToolbarProps, type PanelLayoutState, PipelineResultLayout, PipelineResultLink, Popover, type PopoverMenuItem, type PortalScopeContextValue, PortalScopeProvider, Progress, type RelativeDropPosition, type RenderPanel, type RenderThumbnailIconProps, ResizableContainer, RingProgress, SUPPORTED_CANVAS_UPLOAD_TYPES, SUPPORTED_IMAGE_UPLOAD_TYPES, type ScoredMenuItem, ScrollArea, type ScrollToIndexAlign, type ScrollToIndexOptions, type ScrollToIndexPadding, ScrollableSidebar, SearchCompletionMenu, Section$1 as Section, SectionHeader$1 as SectionHeader, SectionHeaderMenuItem, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectMenu, type SelectableMenuItem, SelectionToolbarContainer, type SeparatorItem, type SetNumberMode, SharedDragProvider, type SharedDragProviderProps, type SideOptions, type SideType, type SidebarOptions, type SidebarRef, type SidebarState, type SketchPattern, Slider, Small, Sortable, SortableItemContext, type SortableItemContextProps, type SortableProps, Spacer, type StackItem, StackNavigator, type StackNavigatorHeaderProps, type StackNavigatorProps, type StackNavigatorRenderHeader, Stepper, type StringModeOnlyProps, type StringModeProps, type SubMenuItem, type SupportedCanvasUploadType, type SupportedImageUploadType, Switch, Tabs, type TabsProps, Text$1 as Text, TextArea, TextAreaRow, type TextProps, type Theme, type ThemeColor, Toast, ToastProvider, type TokenValue, Toolbar, ToolbarDrawer, ToolbarMenu, ToolbarMenuButton, ToolbarMenuContext, ToolbarMenuDropdown, ToolbarMenuItem, ToolbarMenuPopover, type ToolbarProps, ToolbarShortcut, type ToolbarVariant, Tooltip, TreeView, type UseThemeReturnType, UserAvatar, UserPicker, type UserPickerProps, type UserPickerUser, UserPointer, type UserPointerProps, type ValidateDropIndicatorParams, Virtualized, type VirtualizedProps, type VirtualizedRenderItem, WorkspaceLayout, type WorkspaceLayoutGroup, type WorkspaceLayoutProps, type WorkspaceLayoutRef, type WorkspaceLayoutState, type WorkspaceSideContextValue, WorkspaceSideProvider, acceptsDrop, colorForStringValues, colorFromString, colorSwatchSizeMap, createDragItemKey, createNavigator, createSectionedMenu, createSharedDrag, cssVarNames, cssVars, cx, decodeImageSrc, defaultAcceptsDrop, dragItemKeySeparator, editableBlockStyles, filterWithGroupedSections, formatByteSize, fuzzyFilter, fuzzyScore, fuzzyTokenize, getClosestPortalScope, getFieldSpacing, getGridSize, getItemFirstCollisionDetection, getKeyboardShortcutsForMenuItems, getMenuItemKey, getNewValue, getNextIndex, getPipelineResultLink, getThumbnailColors, getUserDisplayName, isMenuItemSectionHeader, isNonSelectableMenuItem, isPopoverMenuItem, isSelectableMenuItem, isSelectableMenuItemWithScore, isSubMenuItem, labeledFieldStyles, mergeConflictingClassNames, moveTreeItem, normalizeListTargetIndex, parseDragItemKey, popoverStyle, portalScopeDataSetName, portalScopePropName, portalScopeProps, proseTheme, renderIcon, separator, styles, textStyles, toolbarTransparentStyle, updateSelection, useAutoResize, useBindKeyboardShortcutsForMenuItems, useComboboxState, useCurrentFloatingWindowInternal, useDesignSystemConfiguration, useDialogContainsElement, useDialogContext, useFloatingWindowManager, useGlobalInputBlur, useGlobalInputBlurListener, useGlobalInputBlurTrigger, useHasOpenPortals, useHover, useImageData, useIndent, useInputFieldContext, useLabel, useLabelType, useLabelWidth, useLinkComponent, useNavigator, useNavigatorRoute, useOpenConfirmationDialog, useOpenDialog, useOpenInputDialog, useOpenPortalsControls, usePlatform, usePlatformModKey, usePortalScopeId, useTheme, useToast, useWorkspaceSide, validateDropIndicator, whiteboardProseTheme, withDragProvider, withSeparatorElements };
|