@cyber-harbour/ui 1.0.19 → 1.0.21

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/dist/index.d.mts CHANGED
@@ -2,9 +2,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import react__default, { SVGProps, ElementType, CSSProperties as CSSProperties$1 } from 'react';
4
4
  import * as styled_components from 'styled-components';
5
- import { DefaultTheme, CSSProperties } from 'styled-components';
5
+ import { CSSProperties, DefaultTheme } from 'styled-components';
6
+ import { PopoverPosition, PopoverAlign } from 'react-tiny-popover';
6
7
  import * as styled_components_dist_types from 'styled-components/dist/types';
7
8
  import { DefaultTheme as DefaultTheme$1 } from 'styled-components/dist/types';
9
+ import { GraphData } from 'react-force-graph-2d';
8
10
 
9
11
  declare const GlobalStyle: react.NamedExoticComponent<styled_components.ExecutionProps & object>;
10
12
 
@@ -141,6 +143,24 @@ type Theme = {
141
143
  margin: string;
142
144
  };
143
145
  };
146
+ contextMenu: {
147
+ button: Record<ButtonState, ButtonElementStyle>;
148
+ padding: number;
149
+ delimeter: {
150
+ style: CSSProperties['borderStyle'];
151
+ color: string;
152
+ thickness: number;
153
+ marginInline: number | string;
154
+ marginBlock: number | string;
155
+ };
156
+ shadow: string;
157
+ icon: {
158
+ size: number | string;
159
+ };
160
+ };
161
+ select: {
162
+ item: Record<ButtonState, ButtonElementStyle>;
163
+ };
144
164
  };
145
165
  type ThemeColors = Theme['colors'];
146
166
  type ColorCategory = keyof ThemeColors;
@@ -172,7 +192,7 @@ declare const pxToRem: (pxValue: number | string, baseSize?: number) => string;
172
192
  * @param baseSize - Base font size in pixels. Default is 16px
173
193
  * @returns A new object with pixel values converted to rem
174
194
  */
175
- declare const convertPaletteToRem: (obj: Record<string, any>, baseSize?: number) => Record<string, any>;
195
+ declare const convertPaletteToRem: (obj: Record<string, any>, baseSize?: number, parentKey?: string) => Record<string, any>;
176
196
  /**
177
197
  * Функція для отримання стилів кнопки за варіантом, кольором, станом та розміром
178
198
  */
@@ -347,10 +367,10 @@ interface PhonebookIconProps extends SVGProps<SVGSVGElement> {
347
367
  }
348
368
  declare const PhonebookIcon: ({ fill, ...props }: PhonebookIconProps) => react_jsx_runtime.JSX.Element;
349
369
 
350
- interface PrintIconProps extends SVGProps<SVGSVGElement> {
370
+ interface PrintIconProps$1 extends SVGProps<SVGSVGElement> {
351
371
  fill?: string;
352
372
  }
353
- declare const PrintIcon: ({ fill, ...props }: PrintIconProps) => react_jsx_runtime.JSX.Element;
373
+ declare const PrintIcon: ({ fill, ...props }: PrintIconProps$1) => react_jsx_runtime.JSX.Element;
354
374
 
355
375
  interface Profiler20IconProps extends SVGProps<SVGSVGElement> {
356
376
  fill?: string;
@@ -408,6 +428,11 @@ interface ChevronRightIconProps extends SVGProps<SVGSVGElement> {
408
428
  }
409
429
  declare const ChevronUpIcon: ({ fill, ...props }: ChevronRightIconProps) => react_jsx_runtime.JSX.Element;
410
430
 
431
+ interface PrintIconProps extends SVGProps<SVGSVGElement> {
432
+ fill?: string;
433
+ }
434
+ declare const PlusIcon: ({ fill, ...props }: PrintIconProps) => react_jsx_runtime.JSX.Element;
435
+
411
436
  interface SidebarProps {
412
437
  defaultCollapsed?: boolean;
413
438
  children: any;
@@ -535,6 +560,47 @@ interface PaginationProps {
535
560
  }
536
561
  declare const Pagination: ({ total_items, limit, offset, onChangePage }: PaginationProps) => react_jsx_runtime.JSX.Element;
537
562
 
563
+ interface ContextMenuProps {
564
+ isOpen: boolean;
565
+ onClick: () => void;
566
+ onClickOutside: (e: MouseEvent) => void;
567
+ size?: ButtonSize;
568
+ disabled?: boolean;
569
+ fullWidth?: boolean;
570
+ className?: string;
571
+ children?: any;
572
+ anchor?: any;
573
+ positions?: PopoverPosition[] | PopoverPosition;
574
+ align?: PopoverAlign;
575
+ }
576
+ declare const ContextMenu: ({ isOpen, onClickOutside, onClick, anchor, size, disabled, fullWidth, className, positions, align, children, }: ContextMenuProps) => react_jsx_runtime.JSX.Element;
577
+
578
+ interface StyledProps {
579
+ }
580
+ declare const ContextMenuDelimiter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps>> & string;
581
+
582
+ declare const useContextMenuControl: () => {
583
+ isOpen: boolean;
584
+ toggleMenu: () => void;
585
+ closeMenu: () => void;
586
+ openMenu: () => void;
587
+ };
588
+
589
+ interface SelectProps<T extends string | number> {
590
+ selected?: T;
591
+ options: {
592
+ value: T;
593
+ inputDisplay?: string;
594
+ }[];
595
+ handleSelect: (id: T) => void;
596
+ placeholder: string;
597
+ disabled?: boolean;
598
+ positions?: PopoverPosition[] | PopoverPosition;
599
+ align?: PopoverAlign;
600
+ size?: ButtonSize;
601
+ }
602
+ declare const Select: <T extends string | number>({ options, selected, handleSelect, placeholder, disabled, positions, align, size, }: SelectProps<T>) => react_jsx_runtime.JSX.Element;
603
+
538
604
  interface PageLayoutProps {
539
605
  header?: any;
540
606
  sidebar?: any;
@@ -547,4 +613,22 @@ interface StyledContainerProps {
547
613
  }
548
614
  declare const StyledContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledContainerProps>> & string;
549
615
 
550
- export { AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, type Breakpoint, BugReportIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EnableVisibleIcon, EnterArrowLeftIcon, FiltersIcon, GlobalStyle, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleIcon, type InputSize, type InputState, type InputVariant, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MoonIcon, type NestedColorPaths, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, SandBoxIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, type Theme, ThemeProvider, Typography, type TypographyProps, type TypographyVariant, UpRightArrowCircleIcon, VectorIcon, convertPaletteToRem, darkTheme, getBreakpoint, getButtonSizeStyles, getButtonStyles, getTypographyStyles, lightTheme, lightThemePx, pxToRem, resolveThemeColor };
616
+ interface Graph2DProps {
617
+ graphData?: GraphData;
618
+ linkSource?: string;
619
+ linkTarget?: string;
620
+ width?: number;
621
+ height?: number;
622
+ config?: {
623
+ nodeSizeFactor: number;
624
+ fontSize: number;
625
+ nodeSizeBase: number;
626
+ textPaddingFactor: number;
627
+ };
628
+ onNodeClick?: (node: any) => void;
629
+ onLinkClick?: (link: any) => void;
630
+ }
631
+
632
+ declare const Graph2D: ({ graphData, width, height, linkTarget, linkSource, config, onNodeClick, onLinkClick, }: Graph2DProps) => react_jsx_runtime.JSX.Element;
633
+
634
+ export { AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, type Breakpoint, BugReportIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, ContextMenu, ContextMenuDelimiter, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EnableVisibleIcon, EnterArrowLeftIcon, FiltersIcon, GlobalStyle, Graph2D, type Graph2DProps, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleIcon, type InputSize, type InputState, type InputVariant, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MoonIcon, type NestedColorPaths, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, SandBoxIcon, Select, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, type Theme, ThemeProvider, Typography, type TypographyProps, type TypographyVariant, UpRightArrowCircleIcon, VectorIcon, convertPaletteToRem, darkTheme, getBreakpoint, getButtonSizeStyles, getButtonStyles, getTypographyStyles, lightTheme, lightThemePx, pxToRem, resolveThemeColor, useContextMenuControl };
package/dist/index.d.ts CHANGED
@@ -2,9 +2,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import react__default, { SVGProps, ElementType, CSSProperties as CSSProperties$1 } from 'react';
4
4
  import * as styled_components from 'styled-components';
5
- import { DefaultTheme, CSSProperties } from 'styled-components';
5
+ import { CSSProperties, DefaultTheme } from 'styled-components';
6
+ import { PopoverPosition, PopoverAlign } from 'react-tiny-popover';
6
7
  import * as styled_components_dist_types from 'styled-components/dist/types';
7
8
  import { DefaultTheme as DefaultTheme$1 } from 'styled-components/dist/types';
9
+ import { GraphData } from 'react-force-graph-2d';
8
10
 
9
11
  declare const GlobalStyle: react.NamedExoticComponent<styled_components.ExecutionProps & object>;
10
12
 
@@ -141,6 +143,24 @@ type Theme = {
141
143
  margin: string;
142
144
  };
143
145
  };
146
+ contextMenu: {
147
+ button: Record<ButtonState, ButtonElementStyle>;
148
+ padding: number;
149
+ delimeter: {
150
+ style: CSSProperties['borderStyle'];
151
+ color: string;
152
+ thickness: number;
153
+ marginInline: number | string;
154
+ marginBlock: number | string;
155
+ };
156
+ shadow: string;
157
+ icon: {
158
+ size: number | string;
159
+ };
160
+ };
161
+ select: {
162
+ item: Record<ButtonState, ButtonElementStyle>;
163
+ };
144
164
  };
145
165
  type ThemeColors = Theme['colors'];
146
166
  type ColorCategory = keyof ThemeColors;
@@ -172,7 +192,7 @@ declare const pxToRem: (pxValue: number | string, baseSize?: number) => string;
172
192
  * @param baseSize - Base font size in pixels. Default is 16px
173
193
  * @returns A new object with pixel values converted to rem
174
194
  */
175
- declare const convertPaletteToRem: (obj: Record<string, any>, baseSize?: number) => Record<string, any>;
195
+ declare const convertPaletteToRem: (obj: Record<string, any>, baseSize?: number, parentKey?: string) => Record<string, any>;
176
196
  /**
177
197
  * Функція для отримання стилів кнопки за варіантом, кольором, станом та розміром
178
198
  */
@@ -347,10 +367,10 @@ interface PhonebookIconProps extends SVGProps<SVGSVGElement> {
347
367
  }
348
368
  declare const PhonebookIcon: ({ fill, ...props }: PhonebookIconProps) => react_jsx_runtime.JSX.Element;
349
369
 
350
- interface PrintIconProps extends SVGProps<SVGSVGElement> {
370
+ interface PrintIconProps$1 extends SVGProps<SVGSVGElement> {
351
371
  fill?: string;
352
372
  }
353
- declare const PrintIcon: ({ fill, ...props }: PrintIconProps) => react_jsx_runtime.JSX.Element;
373
+ declare const PrintIcon: ({ fill, ...props }: PrintIconProps$1) => react_jsx_runtime.JSX.Element;
354
374
 
355
375
  interface Profiler20IconProps extends SVGProps<SVGSVGElement> {
356
376
  fill?: string;
@@ -408,6 +428,11 @@ interface ChevronRightIconProps extends SVGProps<SVGSVGElement> {
408
428
  }
409
429
  declare const ChevronUpIcon: ({ fill, ...props }: ChevronRightIconProps) => react_jsx_runtime.JSX.Element;
410
430
 
431
+ interface PrintIconProps extends SVGProps<SVGSVGElement> {
432
+ fill?: string;
433
+ }
434
+ declare const PlusIcon: ({ fill, ...props }: PrintIconProps) => react_jsx_runtime.JSX.Element;
435
+
411
436
  interface SidebarProps {
412
437
  defaultCollapsed?: boolean;
413
438
  children: any;
@@ -535,6 +560,47 @@ interface PaginationProps {
535
560
  }
536
561
  declare const Pagination: ({ total_items, limit, offset, onChangePage }: PaginationProps) => react_jsx_runtime.JSX.Element;
537
562
 
563
+ interface ContextMenuProps {
564
+ isOpen: boolean;
565
+ onClick: () => void;
566
+ onClickOutside: (e: MouseEvent) => void;
567
+ size?: ButtonSize;
568
+ disabled?: boolean;
569
+ fullWidth?: boolean;
570
+ className?: string;
571
+ children?: any;
572
+ anchor?: any;
573
+ positions?: PopoverPosition[] | PopoverPosition;
574
+ align?: PopoverAlign;
575
+ }
576
+ declare const ContextMenu: ({ isOpen, onClickOutside, onClick, anchor, size, disabled, fullWidth, className, positions, align, children, }: ContextMenuProps) => react_jsx_runtime.JSX.Element;
577
+
578
+ interface StyledProps {
579
+ }
580
+ declare const ContextMenuDelimiter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps>> & string;
581
+
582
+ declare const useContextMenuControl: () => {
583
+ isOpen: boolean;
584
+ toggleMenu: () => void;
585
+ closeMenu: () => void;
586
+ openMenu: () => void;
587
+ };
588
+
589
+ interface SelectProps<T extends string | number> {
590
+ selected?: T;
591
+ options: {
592
+ value: T;
593
+ inputDisplay?: string;
594
+ }[];
595
+ handleSelect: (id: T) => void;
596
+ placeholder: string;
597
+ disabled?: boolean;
598
+ positions?: PopoverPosition[] | PopoverPosition;
599
+ align?: PopoverAlign;
600
+ size?: ButtonSize;
601
+ }
602
+ declare const Select: <T extends string | number>({ options, selected, handleSelect, placeholder, disabled, positions, align, size, }: SelectProps<T>) => react_jsx_runtime.JSX.Element;
603
+
538
604
  interface PageLayoutProps {
539
605
  header?: any;
540
606
  sidebar?: any;
@@ -547,4 +613,22 @@ interface StyledContainerProps {
547
613
  }
548
614
  declare const StyledContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledContainerProps>> & string;
549
615
 
550
- export { AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, type Breakpoint, BugReportIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EnableVisibleIcon, EnterArrowLeftIcon, FiltersIcon, GlobalStyle, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleIcon, type InputSize, type InputState, type InputVariant, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MoonIcon, type NestedColorPaths, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, SandBoxIcon, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, type Theme, ThemeProvider, Typography, type TypographyProps, type TypographyVariant, UpRightArrowCircleIcon, VectorIcon, convertPaletteToRem, darkTheme, getBreakpoint, getButtonSizeStyles, getButtonStyles, getTypographyStyles, lightTheme, lightThemePx, pxToRem, resolveThemeColor };
616
+ interface Graph2DProps {
617
+ graphData?: GraphData;
618
+ linkSource?: string;
619
+ linkTarget?: string;
620
+ width?: number;
621
+ height?: number;
622
+ config?: {
623
+ nodeSizeFactor: number;
624
+ fontSize: number;
625
+ nodeSizeBase: number;
626
+ textPaddingFactor: number;
627
+ };
628
+ onNodeClick?: (node: any) => void;
629
+ onLinkClick?: (link: any) => void;
630
+ }
631
+
632
+ declare const Graph2D: ({ graphData, width, height, linkTarget, linkSource, config, onNodeClick, onLinkClick, }: Graph2DProps) => react_jsx_runtime.JSX.Element;
633
+
634
+ export { AlertIcon, ApiIcon, ArrowCircleTopRightIcon, ArrowRightIcon, BallsMenu, type Breakpoint, BugReportIcon, Button, type ButtonColor, type ButtonElementStyle, type ButtonProps, type ButtonSize, type ButtonSizeStyle, type ButtonState, type ButtonVariant, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClosedLockIcon, type ColorVariant, type ColumnTable, ContextMenu, ContextMenuDelimiter, DataSetsIcon, DeepSearchIcon, DisabledVisibleIcon, DocsIcon, DownloadIcon, EditUserIcon, EnableVisibleIcon, EnterArrowLeftIcon, FiltersIcon, GlobalStyle, Graph2D, type Graph2DProps, Header, HeaderDelimeter, HeaderSection, HomepageIcon, InfoCircleIcon, type InputSize, type InputState, type InputVariant, ListMenu, ListMenuItem, type ListMenuItemAnchorProps, type ListMenuItemBase, type ListMenuItemButtonProps, type ListMenuItemProps, type ListMenuProps, ListMenuSection, type ListMenuSectionProps, MapRadarIcon, MoonIcon, type NestedColorPaths, OpenLockIcon, OrganizationIcon, PageLayout, Pagination, type PaginationProps, PasswordFinderIcon, PhonebookIcon, PlusIcon, PrintIcon, Profiler2Icon, ProfilerIcon, type RenderCellProps, type RenderHeaderCellProps, SandBoxIcon, Select, Sidebar, SidebarContext, SidebarDelimeter, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, StatisticIcon, StyledContainer, SunIcon, Table, type Theme, ThemeProvider, Typography, type TypographyProps, type TypographyVariant, UpRightArrowCircleIcon, VectorIcon, convertPaletteToRem, darkTheme, getBreakpoint, getButtonSizeStyles, getButtonStyles, getTypographyStyles, lightTheme, lightThemePx, pxToRem, resolveThemeColor, useContextMenuControl };