@medway-ui/core 1.15.3 → 1.15.4

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
@@ -1,10 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as react from 'react';
3
+ import * as React from 'react';
4
4
  import { ComponentProps, ReactNode, HTMLAttributes, ButtonHTMLAttributes, ReactElement, TableHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef } from 'react';
5
5
  import { VariantProps } from 'class-variance-authority';
6
6
  import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Avatar as Avatar$1, Progress as Progress$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, DropdownMenu as DropdownMenu$1, Label as Label$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Tabs as Tabs$1, Separator as Separator$1, Tooltip as Tooltip$1, Switch as Switch$1, Toast as Toast$2 } from 'radix-ui';
7
- import { Command } from 'cmdk';
8
7
 
9
8
  interface AlertProps extends ComponentProps<"div"> {
10
9
  variant?: "regular" | "emphasis" | "success" | "warning" | "error";
@@ -42,6 +41,59 @@ declare function AlertDialogDescription({ className, ...props }: ComponentProps<
42
41
  declare function AlertDialogAction({ className, ...props }: ComponentProps<typeof AlertDialog$1.Action>): react_jsx_runtime.JSX.Element;
43
42
  declare function AlertDialogCancel({ className, ...props }: ComponentProps<typeof AlertDialog$1.Cancel>): react_jsx_runtime.JSX.Element;
44
43
 
44
+ /**
45
+ * Command component - Forked from cmdk (https://github.com/pacocoursey/cmdk)
46
+ * MIT License - Copyright (c) 2024 Paco Coursey
47
+ *
48
+ * Modified to remove React 18 dependency (useSyncExternalStore)
49
+ * and external @radix-ui/* dependencies, making it compatible with React 17+.
50
+ */
51
+
52
+ type Children = {
53
+ children?: React.ReactNode;
54
+ };
55
+ type DivProps = React.HTMLAttributes<HTMLDivElement>;
56
+ type CommandFilter = (value: string, search: string, keywords?: string[]) => number;
57
+ declare const pkg: React.ForwardRefExoticComponent<Children & DivProps & {
58
+ label?: string;
59
+ shouldFilter?: boolean;
60
+ filter?: CommandFilter;
61
+ defaultValue?: string;
62
+ value?: string;
63
+ onValueChange?: (value: string) => void;
64
+ loop?: boolean;
65
+ disablePointerSelection?: boolean;
66
+ vimBindings?: boolean;
67
+ } & React.RefAttributes<HTMLDivElement>> & {
68
+ List: React.ForwardRefExoticComponent<Children & DivProps & {
69
+ label?: string;
70
+ } & React.RefAttributes<HTMLDivElement>>;
71
+ Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "onSelect" | "disabled" | "value"> & {
72
+ disabled?: boolean;
73
+ onSelect?: (value: string) => void;
74
+ value?: string;
75
+ keywords?: string[];
76
+ forceMount?: boolean;
77
+ } & React.RefAttributes<HTMLDivElement>>;
78
+ Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "value"> & {
79
+ value?: string;
80
+ onValueChange?: (search: string) => void;
81
+ } & React.RefAttributes<HTMLInputElement>>;
82
+ Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
83
+ heading?: React.ReactNode;
84
+ value?: string;
85
+ forceMount?: boolean;
86
+ } & React.RefAttributes<HTMLDivElement>>;
87
+ Separator: React.ForwardRefExoticComponent<DivProps & {
88
+ alwaysRender?: boolean;
89
+ } & React.RefAttributes<HTMLDivElement>>;
90
+ Empty: React.ForwardRefExoticComponent<Children & DivProps & React.RefAttributes<HTMLDivElement>>;
91
+ Loading: React.ForwardRefExoticComponent<Children & DivProps & {
92
+ progress?: number;
93
+ label?: string;
94
+ } & React.RefAttributes<HTMLDivElement>>;
95
+ };
96
+
45
97
  declare function Dialog({ ...props }: ComponentProps<typeof Dialog$1.Root>): react_jsx_runtime.JSX.Element;
46
98
  declare function DialogTrigger({ ...props }: ComponentProps<typeof Dialog$1.Trigger>): react_jsx_runtime.JSX.Element;
47
99
  declare function DialogPortal({ ...props }: ComponentProps<typeof Dialog$1.Portal>): react_jsx_runtime.JSX.Element;
@@ -71,7 +123,7 @@ interface DialogTitleProps extends ComponentProps<typeof Dialog$1.Title> {
71
123
  declare function DialogTitle({ className, iconLeft, iconRight, children, ...props }: DialogTitleProps): react_jsx_runtime.JSX.Element;
72
124
  declare function DialogDescription({ className, ...props }: ComponentProps<typeof Dialog$1.Description>): react_jsx_runtime.JSX.Element;
73
125
 
74
- declare function CommandGroup({ className, ...props }: ComponentProps<typeof Command.Group>): react_jsx_runtime.JSX.Element;
126
+ declare function CommandGroup({ className, ...props }: ComponentProps<typeof pkg.Group>): react_jsx_runtime.JSX.Element;
75
127
 
76
128
  type AutocompleteTextProps = HTMLAttributes<HTMLSpanElement>;
77
129
  interface AutocompleteContextValue {
@@ -732,7 +784,7 @@ type ToastActionElement = ReactElement<typeof ToastAction>;
732
784
  declare const toastVariants: (props?: ({
733
785
  variant?: "success" | "warning" | "error" | "primary" | "secondary" | null | undefined;
734
786
  } & class_variance_authority_types.ClassProp) | undefined) => string;
735
- declare const ToastProvider: react.FC<Toast$2.ToastProviderProps>;
787
+ declare const ToastProvider: React.FC<Toast$2.ToastProviderProps>;
736
788
  declare function ToastViewport({ className, ...props }: ComponentPropsWithoutRef<typeof Toast$2.Viewport>): react_jsx_runtime.JSX.Element;
737
789
  declare function Toast$1({ className, variant, showIcon, duration, children, ...props }: ToastProps): react_jsx_runtime.JSX.Element;
738
790
  declare function ToastAction({ className, variant, size, iconLeft, iconRight, children, altText, ...props }: ToastActionProps): react_jsx_runtime.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as react from 'react';
3
+ import * as React from 'react';
4
4
  import { ComponentProps, ReactNode, HTMLAttributes, ButtonHTMLAttributes, ReactElement, TableHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef } from 'react';
5
5
  import { VariantProps } from 'class-variance-authority';
6
6
  import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Avatar as Avatar$1, Progress as Progress$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, DropdownMenu as DropdownMenu$1, Label as Label$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Tabs as Tabs$1, Separator as Separator$1, Tooltip as Tooltip$1, Switch as Switch$1, Toast as Toast$2 } from 'radix-ui';
7
- import { Command } from 'cmdk';
8
7
 
9
8
  interface AlertProps extends ComponentProps<"div"> {
10
9
  variant?: "regular" | "emphasis" | "success" | "warning" | "error";
@@ -42,6 +41,59 @@ declare function AlertDialogDescription({ className, ...props }: ComponentProps<
42
41
  declare function AlertDialogAction({ className, ...props }: ComponentProps<typeof AlertDialog$1.Action>): react_jsx_runtime.JSX.Element;
43
42
  declare function AlertDialogCancel({ className, ...props }: ComponentProps<typeof AlertDialog$1.Cancel>): react_jsx_runtime.JSX.Element;
44
43
 
44
+ /**
45
+ * Command component - Forked from cmdk (https://github.com/pacocoursey/cmdk)
46
+ * MIT License - Copyright (c) 2024 Paco Coursey
47
+ *
48
+ * Modified to remove React 18 dependency (useSyncExternalStore)
49
+ * and external @radix-ui/* dependencies, making it compatible with React 17+.
50
+ */
51
+
52
+ type Children = {
53
+ children?: React.ReactNode;
54
+ };
55
+ type DivProps = React.HTMLAttributes<HTMLDivElement>;
56
+ type CommandFilter = (value: string, search: string, keywords?: string[]) => number;
57
+ declare const pkg: React.ForwardRefExoticComponent<Children & DivProps & {
58
+ label?: string;
59
+ shouldFilter?: boolean;
60
+ filter?: CommandFilter;
61
+ defaultValue?: string;
62
+ value?: string;
63
+ onValueChange?: (value: string) => void;
64
+ loop?: boolean;
65
+ disablePointerSelection?: boolean;
66
+ vimBindings?: boolean;
67
+ } & React.RefAttributes<HTMLDivElement>> & {
68
+ List: React.ForwardRefExoticComponent<Children & DivProps & {
69
+ label?: string;
70
+ } & React.RefAttributes<HTMLDivElement>>;
71
+ Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "onSelect" | "disabled" | "value"> & {
72
+ disabled?: boolean;
73
+ onSelect?: (value: string) => void;
74
+ value?: string;
75
+ keywords?: string[];
76
+ forceMount?: boolean;
77
+ } & React.RefAttributes<HTMLDivElement>>;
78
+ Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "value"> & {
79
+ value?: string;
80
+ onValueChange?: (search: string) => void;
81
+ } & React.RefAttributes<HTMLInputElement>>;
82
+ Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
83
+ heading?: React.ReactNode;
84
+ value?: string;
85
+ forceMount?: boolean;
86
+ } & React.RefAttributes<HTMLDivElement>>;
87
+ Separator: React.ForwardRefExoticComponent<DivProps & {
88
+ alwaysRender?: boolean;
89
+ } & React.RefAttributes<HTMLDivElement>>;
90
+ Empty: React.ForwardRefExoticComponent<Children & DivProps & React.RefAttributes<HTMLDivElement>>;
91
+ Loading: React.ForwardRefExoticComponent<Children & DivProps & {
92
+ progress?: number;
93
+ label?: string;
94
+ } & React.RefAttributes<HTMLDivElement>>;
95
+ };
96
+
45
97
  declare function Dialog({ ...props }: ComponentProps<typeof Dialog$1.Root>): react_jsx_runtime.JSX.Element;
46
98
  declare function DialogTrigger({ ...props }: ComponentProps<typeof Dialog$1.Trigger>): react_jsx_runtime.JSX.Element;
47
99
  declare function DialogPortal({ ...props }: ComponentProps<typeof Dialog$1.Portal>): react_jsx_runtime.JSX.Element;
@@ -71,7 +123,7 @@ interface DialogTitleProps extends ComponentProps<typeof Dialog$1.Title> {
71
123
  declare function DialogTitle({ className, iconLeft, iconRight, children, ...props }: DialogTitleProps): react_jsx_runtime.JSX.Element;
72
124
  declare function DialogDescription({ className, ...props }: ComponentProps<typeof Dialog$1.Description>): react_jsx_runtime.JSX.Element;
73
125
 
74
- declare function CommandGroup({ className, ...props }: ComponentProps<typeof Command.Group>): react_jsx_runtime.JSX.Element;
126
+ declare function CommandGroup({ className, ...props }: ComponentProps<typeof pkg.Group>): react_jsx_runtime.JSX.Element;
75
127
 
76
128
  type AutocompleteTextProps = HTMLAttributes<HTMLSpanElement>;
77
129
  interface AutocompleteContextValue {
@@ -732,7 +784,7 @@ type ToastActionElement = ReactElement<typeof ToastAction>;
732
784
  declare const toastVariants: (props?: ({
733
785
  variant?: "success" | "warning" | "error" | "primary" | "secondary" | null | undefined;
734
786
  } & class_variance_authority_types.ClassProp) | undefined) => string;
735
- declare const ToastProvider: react.FC<Toast$2.ToastProviderProps>;
787
+ declare const ToastProvider: React.FC<Toast$2.ToastProviderProps>;
736
788
  declare function ToastViewport({ className, ...props }: ComponentPropsWithoutRef<typeof Toast$2.Viewport>): react_jsx_runtime.JSX.Element;
737
789
  declare function Toast$1({ className, variant, showIcon, duration, children, ...props }: ToastProps): react_jsx_runtime.JSX.Element;
738
790
  declare function ToastAction({ className, variant, size, iconLeft, iconRight, children, altText, ...props }: ToastActionProps): react_jsx_runtime.JSX.Element;