@gv-tech/ui-core 1.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.
Files changed (52) hide show
  1. package/package.json +42 -0
  2. package/src/contracts/accordion.ts +23 -0
  3. package/src/contracts/alert-dialog.ts +48 -0
  4. package/src/contracts/alert.ts +17 -0
  5. package/src/contracts/aspect-ratio.ts +7 -0
  6. package/src/contracts/avatar.ts +17 -0
  7. package/src/contracts/badge.ts +7 -0
  8. package/src/contracts/breadcrumb.ts +37 -0
  9. package/src/contracts/button.ts +17 -0
  10. package/src/contracts/calendar.ts +4 -0
  11. package/src/contracts/card.ts +11 -0
  12. package/src/contracts/carousel.ts +29 -0
  13. package/src/contracts/chart.ts +31 -0
  14. package/src/contracts/checkbox.ts +11 -0
  15. package/src/contracts/collapsible.ts +21 -0
  16. package/src/contracts/command.ts +43 -0
  17. package/src/contracts/context-menu.ts +78 -0
  18. package/src/contracts/dialog.ts +29 -0
  19. package/src/contracts/drawer.ts +39 -0
  20. package/src/contracts/dropdown-menu.ts +87 -0
  21. package/src/contracts/form.ts +29 -0
  22. package/src/contracts/hover-card.ts +21 -0
  23. package/src/contracts/input.ts +11 -0
  24. package/src/contracts/label.ts +7 -0
  25. package/src/contracts/menubar.ts +86 -0
  26. package/src/contracts/navigation-menu.ts +55 -0
  27. package/src/contracts/pagination.ts +38 -0
  28. package/src/contracts/popover.ts +28 -0
  29. package/src/contracts/progress.ts +4 -0
  30. package/src/contracts/radio.ts +16 -0
  31. package/src/contracts/resizable.ts +36 -0
  32. package/src/contracts/scroll-area.ts +15 -0
  33. package/src/contracts/search.ts +13 -0
  34. package/src/contracts/select.ts +64 -0
  35. package/src/contracts/separator.ts +5 -0
  36. package/src/contracts/sheet.ts +58 -0
  37. package/src/contracts/skeleton.ts +6 -0
  38. package/src/contracts/slider.ts +15 -0
  39. package/src/contracts/sonner.ts +15 -0
  40. package/src/contracts/switch.ts +11 -0
  41. package/src/contracts/table.ts +41 -0
  42. package/src/contracts/tabs.ts +31 -0
  43. package/src/contracts/text.ts +12 -0
  44. package/src/contracts/textarea.ts +7 -0
  45. package/src/contracts/theme-provider.ts +14 -0
  46. package/src/contracts/theme-toggle.ts +15 -0
  47. package/src/contracts/toast.ts +15 -0
  48. package/src/contracts/toaster.ts +3 -0
  49. package/src/contracts/toggle-group.ts +23 -0
  50. package/src/contracts/toggle.ts +49 -0
  51. package/src/contracts/tooltip.ts +28 -0
  52. package/src/index.ts +327 -0
@@ -0,0 +1,86 @@
1
+ import * as React from 'react';
2
+
3
+ export interface MenubarBaseProps {
4
+ children?: React.ReactNode;
5
+ className?: string;
6
+ defaultValue?: string;
7
+ value?: string;
8
+ onValueChange?: (value: string) => void;
9
+ dir?: 'ltr' | 'rtl';
10
+ loop?: boolean;
11
+ }
12
+
13
+ export interface MenubarMenuBaseProps {
14
+ children?: React.ReactNode;
15
+ value?: string;
16
+ }
17
+
18
+ export interface MenubarTriggerBaseProps {
19
+ children: React.ReactNode;
20
+ className?: string;
21
+ disabled?: boolean;
22
+ }
23
+
24
+ export interface MenubarContentBaseProps {
25
+ children?: React.ReactNode;
26
+ className?: string;
27
+ align?: 'start' | 'center' | 'end';
28
+ alignOffset?: number;
29
+ sideOffset?: number;
30
+ }
31
+
32
+ export interface MenubarItemBaseProps {
33
+ children?: React.ReactNode;
34
+ className?: string;
35
+ disabled?: boolean;
36
+ inset?: boolean;
37
+ onSelect?: (event: Event) => void;
38
+ }
39
+
40
+ export interface MenubarCheckboxItemBaseProps {
41
+ children?: React.ReactNode;
42
+ className?: string;
43
+ checked?: boolean | 'indeterminate';
44
+ onCheckedChange?: (checked: boolean) => void;
45
+ disabled?: boolean;
46
+ }
47
+
48
+ export interface MenubarRadioItemBaseProps {
49
+ children?: React.ReactNode;
50
+ className?: string;
51
+ value: string;
52
+ disabled?: boolean;
53
+ }
54
+
55
+ export interface MenubarLabelBaseProps {
56
+ children?: React.ReactNode;
57
+ className?: string;
58
+ inset?: boolean;
59
+ }
60
+
61
+ export interface MenubarSeparatorBaseProps {
62
+ className?: string;
63
+ }
64
+
65
+ export interface MenubarShortcutBaseProps {
66
+ children?: React.ReactNode;
67
+ className?: string;
68
+ }
69
+
70
+ export interface MenubarSubBaseProps {
71
+ children?: React.ReactNode;
72
+ open?: boolean;
73
+ onOpenChange?: (open: boolean) => void;
74
+ }
75
+
76
+ export interface MenubarSubTriggerBaseProps {
77
+ children?: React.ReactNode;
78
+ className?: string;
79
+ disabled?: boolean;
80
+ inset?: boolean;
81
+ }
82
+
83
+ export interface MenubarSubContentBaseProps {
84
+ children?: React.ReactNode;
85
+ className?: string;
86
+ }
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+
3
+ export interface NavigationMenuBaseProps {
4
+ children?: React.ReactNode;
5
+ className?: string;
6
+ value?: string;
7
+ onValueChange?: (value: string) => void;
8
+ dir?: 'ltr' | 'rtl';
9
+ orientation?: 'horizontal' | 'vertical';
10
+ delayDuration?: number;
11
+ skipDelayDuration?: number;
12
+ }
13
+
14
+ export interface NavigationMenuListBaseProps {
15
+ children?: React.ReactNode;
16
+ className?: string;
17
+ }
18
+
19
+ export interface NavigationMenuItemBaseProps {
20
+ children?: React.ReactNode;
21
+ className?: string;
22
+ value?: string;
23
+ }
24
+
25
+ export interface NavigationMenuTriggerBaseProps {
26
+ children?: React.ReactNode;
27
+ className?: string;
28
+ disabled?: boolean;
29
+ }
30
+
31
+ export interface NavigationMenuContentBaseProps {
32
+ children?: React.ReactNode;
33
+ className?: string;
34
+ forceMount?: true;
35
+ }
36
+
37
+ export interface NavigationMenuLinkBaseProps {
38
+ children?: React.ReactNode;
39
+ className?: string;
40
+ active?: boolean;
41
+ onSelect?: (event: Event) => void;
42
+ href?: string;
43
+ }
44
+
45
+ export interface NavigationMenuViewportBaseProps {
46
+ children?: React.ReactNode;
47
+ className?: string;
48
+ forceMount?: true;
49
+ }
50
+
51
+ export interface NavigationMenuIndicatorBaseProps {
52
+ children?: React.ReactNode;
53
+ className?: string;
54
+ forceMount?: true;
55
+ }
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import { ButtonSize } from './button';
3
+
4
+ export interface PaginationBaseProps {
5
+ children?: React.ReactNode;
6
+ className?: string;
7
+ }
8
+
9
+ export interface PaginationContentBaseProps {
10
+ children?: React.ReactNode;
11
+ className?: string;
12
+ }
13
+
14
+ export interface PaginationItemBaseProps {
15
+ children?: React.ReactNode;
16
+ className?: string;
17
+ }
18
+
19
+ export interface PaginationLinkBaseProps {
20
+ children?: React.ReactNode;
21
+ className?: string;
22
+ isActive?: boolean;
23
+ size?: ButtonSize;
24
+ }
25
+
26
+ export interface PaginationEllipsisBaseProps {
27
+ className?: string;
28
+ }
29
+
30
+ export interface PaginationNextBaseProps {
31
+ children?: React.ReactNode;
32
+ className?: string;
33
+ }
34
+
35
+ export interface PaginationPreviousBaseProps {
36
+ children?: React.ReactNode;
37
+ className?: string;
38
+ }
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+
3
+ export interface PopoverBaseProps {
4
+ children?: React.ReactNode;
5
+ defaultOpen?: boolean;
6
+ open?: boolean;
7
+ onOpenChange?: (open: boolean) => void;
8
+ modal?: boolean;
9
+ }
10
+
11
+ export interface PopoverTriggerBaseProps {
12
+ children: React.ReactNode;
13
+ className?: string;
14
+ asChild?: boolean;
15
+ }
16
+
17
+ export interface PopoverContentBaseProps {
18
+ children?: React.ReactNode;
19
+ className?: string;
20
+ align?: 'start' | 'center' | 'end';
21
+ sideOffset?: number;
22
+ }
23
+
24
+ export interface PopoverAnchorBaseProps {
25
+ children?: React.ReactNode;
26
+ className?: string;
27
+ asChild?: boolean;
28
+ }
@@ -0,0 +1,4 @@
1
+ export interface ProgressBaseProps {
2
+ className?: string;
3
+ value?: number | null;
4
+ }
@@ -0,0 +1,16 @@
1
+ // Shared Radio contracts.
2
+ // Both ui-web and ui-native implementations must satisfy these types.
3
+
4
+ // Platform-agnostic props shared by every RadioGroup implementation.
5
+ // Avoids value/onValueChange that conflict with Radix's prop typings.
6
+ export interface RadioGroupBaseProps {
7
+ disabled?: boolean;
8
+ className?: string;
9
+ }
10
+
11
+ // Platform-agnostic props shared by every RadioGroupItem implementation.
12
+ export interface RadioGroupItemBaseProps {
13
+ value: string;
14
+ disabled?: boolean;
15
+ className?: string;
16
+ }
@@ -0,0 +1,36 @@
1
+ import * as React from 'react';
2
+
3
+ export interface ResizablePanelGroupBaseProps {
4
+ children?: React.ReactNode;
5
+ className?: string;
6
+ direction: 'horizontal' | 'vertical';
7
+ autoSaveId?: string;
8
+ storage?: unknown;
9
+ }
10
+
11
+ export interface ResizablePanelBaseProps {
12
+ children?: React.ReactNode;
13
+ className?: string;
14
+ defaultSize?: number;
15
+ minSize?: number;
16
+ maxSize?: number;
17
+ collapsible?: boolean;
18
+ collapsedSize?: number;
19
+ minPixelSize?: number;
20
+ maxPixelSize?: number;
21
+ order?: number;
22
+ tagName?: string;
23
+ id?: string;
24
+ onCollapse?: () => void;
25
+ onExpand?: () => void;
26
+ onResize?: (size: number, prevSize: number | undefined) => void;
27
+ }
28
+
29
+ export interface ResizableHandleBaseProps {
30
+ className?: string;
31
+ withHandle?: boolean;
32
+ disabled?: boolean;
33
+ tagName?: string;
34
+ id?: string;
35
+ hitAreaMargins?: { top?: number; bottom?: number; left?: number; right?: number };
36
+ }
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ export interface ScrollAreaBaseProps {
4
+ children?: React.ReactNode;
5
+ className?: string;
6
+ type?: 'auto' | 'always' | 'scroll' | 'hover';
7
+ scrollHideDelay?: number;
8
+ dir?: 'ltr' | 'rtl';
9
+ }
10
+
11
+ export interface ScrollBarBaseProps {
12
+ className?: string;
13
+ orientation?: 'horizontal' | 'vertical';
14
+ forceMount?: true;
15
+ }
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+
3
+ export interface SearchBaseProps {
4
+ children?: React.ReactNode;
5
+ open?: boolean;
6
+ onOpenChange?: (open: boolean) => void;
7
+ }
8
+
9
+ export interface SearchTriggerBaseProps {
10
+ className?: string;
11
+ placeholder?: string;
12
+ variant?: 'default' | 'compact';
13
+ }
@@ -0,0 +1,64 @@
1
+ import * as React from 'react';
2
+
3
+ export interface SelectBaseProps {
4
+ children?: React.ReactNode;
5
+ value?: string;
6
+ defaultValue?: string;
7
+ onValueChange?: (value: string) => void;
8
+ open?: boolean;
9
+ defaultOpen?: boolean;
10
+ onOpenChange?: (open: boolean) => void;
11
+ dir?: 'ltr' | 'rtl';
12
+ name?: string;
13
+ autoComplete?: string;
14
+ disabled?: boolean;
15
+ required?: boolean;
16
+ }
17
+
18
+ export interface SelectGroupBaseProps {
19
+ children?: React.ReactNode;
20
+ className?: string;
21
+ }
22
+
23
+ export interface SelectValueBaseProps {
24
+ className?: string;
25
+ placeholder?: React.ReactNode;
26
+ }
27
+
28
+ export interface SelectTriggerBaseProps {
29
+ children?: React.ReactNode;
30
+ className?: string;
31
+ disabled?: boolean;
32
+ }
33
+
34
+ export interface SelectContentBaseProps {
35
+ children?: React.ReactNode;
36
+ className?: string;
37
+ position?: 'popper' | 'item-aligned';
38
+ sideOffset?: number;
39
+ align?: 'start' | 'center' | 'end';
40
+ }
41
+
42
+ export interface SelectLabelBaseProps {
43
+ children?: React.ReactNode;
44
+ className?: string;
45
+ }
46
+
47
+ export interface SelectItemBaseProps {
48
+ children?: React.ReactNode;
49
+ className?: string;
50
+ value: string;
51
+ disabled?: boolean;
52
+ }
53
+
54
+ export interface SelectSeparatorBaseProps {
55
+ className?: string;
56
+ }
57
+
58
+ export interface SelectScrollUpButtonBaseProps {
59
+ className?: string;
60
+ }
61
+
62
+ export interface SelectScrollDownButtonBaseProps {
63
+ className?: string;
64
+ }
@@ -0,0 +1,5 @@
1
+ export interface SeparatorBaseProps {
2
+ className?: string;
3
+ orientation?: 'horizontal' | 'vertical';
4
+ decorative?: boolean;
5
+ }
@@ -0,0 +1,58 @@
1
+ import * as React from 'react';
2
+
3
+ export interface SheetBaseProps {
4
+ children?: React.ReactNode;
5
+ open?: boolean;
6
+ defaultOpen?: boolean;
7
+ onOpenChange?: (open: boolean) => void;
8
+ modal?: boolean;
9
+ }
10
+
11
+ export interface SheetTriggerBaseProps {
12
+ children: React.ReactNode;
13
+ className?: string;
14
+ asChild?: boolean;
15
+ }
16
+
17
+ export interface SheetCloseBaseProps {
18
+ children?: React.ReactNode;
19
+ className?: string;
20
+ asChild?: boolean;
21
+ }
22
+
23
+ export interface SheetPortalBaseProps {
24
+ children?: React.ReactNode;
25
+ className?: string;
26
+ forceMount?: true;
27
+ }
28
+
29
+ export interface SheetOverlayBaseProps {
30
+ className?: string;
31
+ forceMount?: true;
32
+ }
33
+
34
+ export interface SheetContentBaseProps {
35
+ children?: React.ReactNode;
36
+ className?: string;
37
+ side?: 'top' | 'bottom' | 'left' | 'right';
38
+ }
39
+
40
+ export interface SheetHeaderBaseProps {
41
+ className?: string;
42
+ children?: React.ReactNode;
43
+ }
44
+
45
+ export interface SheetFooterBaseProps {
46
+ className?: string;
47
+ children?: React.ReactNode;
48
+ }
49
+
50
+ export interface SheetTitleBaseProps {
51
+ className?: string;
52
+ children?: React.ReactNode;
53
+ }
54
+
55
+ export interface SheetDescriptionBaseProps {
56
+ className?: string;
57
+ children?: React.ReactNode;
58
+ }
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+
3
+ export interface SkeletonBaseProps {
4
+ className?: string;
5
+ children?: React.ReactNode;
6
+ }
@@ -0,0 +1,15 @@
1
+ export interface SliderBaseProps {
2
+ className?: string;
3
+ name?: string;
4
+ defaultValue?: number[];
5
+ value?: number[];
6
+ onValueChange?: (value: number[]) => void;
7
+ onValueCommit?: (value: number[]) => void;
8
+ min?: number;
9
+ max?: number;
10
+ step?: number;
11
+ minStepsBetweenThumbs?: number;
12
+ dir?: 'ltr' | 'rtl';
13
+ inverted?: boolean;
14
+ disabled?: boolean;
15
+ }
@@ -0,0 +1,15 @@
1
+ export interface SonnerBaseProps {
2
+ theme?: 'light' | 'dark' | 'system';
3
+ className?: string;
4
+ toastOptions?: {
5
+ classNames?: {
6
+ toast?: string;
7
+ description?: string;
8
+ actionButton?: string;
9
+ cancelButton?: string;
10
+ [key: string]: string | undefined;
11
+ };
12
+ [key: string]: unknown;
13
+ };
14
+ [key: string]: unknown;
15
+ }
@@ -0,0 +1,11 @@
1
+ export interface SwitchBaseProps {
2
+ className?: string;
3
+ checked?: boolean;
4
+ defaultChecked?: boolean;
5
+ required?: boolean;
6
+ onCheckedChange?: (checked: boolean) => void;
7
+ disabled?: boolean;
8
+ name?: string;
9
+ value?: string;
10
+ id?: string;
11
+ }
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+
3
+ export interface TableBaseProps {
4
+ className?: string;
5
+ children?: React.ReactNode;
6
+ }
7
+
8
+ export interface TableHeaderBaseProps {
9
+ className?: string;
10
+ children?: React.ReactNode;
11
+ }
12
+
13
+ export interface TableBodyBaseProps {
14
+ className?: string;
15
+ children?: React.ReactNode;
16
+ }
17
+
18
+ export interface TableFooterBaseProps {
19
+ className?: string;
20
+ children?: React.ReactNode;
21
+ }
22
+
23
+ export interface TableRowBaseProps {
24
+ className?: string;
25
+ children?: React.ReactNode;
26
+ }
27
+
28
+ export interface TableHeadBaseProps {
29
+ className?: string;
30
+ children?: React.ReactNode;
31
+ }
32
+
33
+ export interface TableCellBaseProps {
34
+ className?: string;
35
+ children?: React.ReactNode;
36
+ }
37
+
38
+ export interface TableCaptionBaseProps {
39
+ className?: string;
40
+ children?: React.ReactNode;
41
+ }
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+
3
+ export interface TabsBaseProps {
4
+ children?: React.ReactNode;
5
+ defaultValue?: string;
6
+ value?: string;
7
+ onValueChange?: (value: string) => void;
8
+ orientation?: 'horizontal' | 'vertical';
9
+ dir?: 'ltr' | 'rtl';
10
+ activationMode?: 'automatic' | 'manual';
11
+ }
12
+
13
+ export interface TabsListBaseProps {
14
+ children?: React.ReactNode;
15
+ className?: string;
16
+ loop?: boolean;
17
+ }
18
+
19
+ export interface TabsTriggerBaseProps {
20
+ children?: React.ReactNode;
21
+ className?: string;
22
+ value: string;
23
+ disabled?: boolean;
24
+ }
25
+
26
+ export interface TabsContentBaseProps {
27
+ children?: React.ReactNode;
28
+ className?: string;
29
+ value: string;
30
+ forceMount?: true;
31
+ }
@@ -0,0 +1,12 @@
1
+ // Shared Text contracts.
2
+ // Foundation typography component for cross-platform text rendering.
3
+
4
+ export const textVariantValues = ['h1', 'h2', 'h3', 'h4', 'body', 'bodySmall', 'caption', 'label', 'overline'] as const;
5
+ export type TextVariant = (typeof textVariantValues)[number];
6
+
7
+ // Platform-agnostic props shared by every Text implementation.
8
+ // Does NOT include variant — that comes from platform-specific CVA bindings.
9
+ export interface TextBaseProps {
10
+ className?: string;
11
+ children?: React.ReactNode;
12
+ }
@@ -0,0 +1,7 @@
1
+ export interface TextareaBaseProps {
2
+ className?: string;
3
+ placeholder?: string;
4
+ value?: string;
5
+ defaultValue?: string;
6
+ disabled?: boolean;
7
+ }
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+
3
+ export interface ThemeProviderBaseProps {
4
+ children?: React.ReactNode;
5
+ attribute?: string | string[];
6
+ defaultTheme?: string;
7
+ enableSystem?: boolean;
8
+ disableTransitionOnChange?: boolean;
9
+ themes?: string[];
10
+ forcedTheme?: string;
11
+ storageKey?: string;
12
+ nonce?: string;
13
+ [key: string]: unknown;
14
+ }
@@ -0,0 +1,15 @@
1
+ export interface ThemeToggleBaseProps {
2
+ /**
3
+ * The mode of the theme toggle. 'binary' allows toggling between light and dark. 'ternary' allows choosing between
4
+ * light, dark, and system.
5
+ *
6
+ * @default 'binary'
7
+ */
8
+ variant?: 'binary' | 'ternary';
9
+ /** Optional callback when the theme changes. */
10
+ onThemeChange?: (theme: string) => void;
11
+ /** Optional current theme value for external control. */
12
+ customTheme?: string;
13
+ /** Optional className for the button. */
14
+ className?: string;
15
+ }
@@ -0,0 +1,15 @@
1
+ // Shared Toast contracts.
2
+ // Feedback pattern — web uses shadcn/sonner, native uses a custom View.
3
+
4
+ export const toastVariantValues = ['default', 'destructive'] as const;
5
+ export type ToastVariant = (typeof toastVariantValues)[number];
6
+
7
+ // Platform-agnostic props shared by every Toast implementation.
8
+ export interface ToastBaseProps {
9
+ variant?: ToastVariant;
10
+ title?: string;
11
+ description?: string;
12
+ action?: React.ReactNode;
13
+ className?: string;
14
+ onDismiss?: () => void;
15
+ }
@@ -0,0 +1,3 @@
1
+ export interface ToasterBaseProps {
2
+ [key: string]: unknown;
3
+ }
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { ToggleSize, ToggleVariant } from './toggle';
3
+
4
+ export interface ToggleGroupBaseProps {
5
+ children?: React.ReactNode;
6
+ className?: string;
7
+ variant?: ToggleVariant;
8
+ size?: ToggleSize;
9
+ type?: 'single' | 'multiple';
10
+ defaultValue?: string | string[];
11
+ value?: string | string[];
12
+ onValueChange?: (value: string | string[]) => void;
13
+ disabled?: boolean;
14
+ }
15
+
16
+ export interface ToggleGroupItemBaseProps {
17
+ children?: React.ReactNode;
18
+ className?: string;
19
+ value: string;
20
+ variant?: ToggleVariant;
21
+ size?: ToggleSize;
22
+ disabled?: boolean;
23
+ }