buildgrid-ui 1.9.4 → 1.11.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.
@@ -0,0 +1,80 @@
1
+ import { type DialogProps } from '@radix-ui/react-dialog';
2
+ import * as React from 'react';
3
+ declare const Command: React.ForwardRefExoticComponent<Omit<{
4
+ children?: React.ReactNode;
5
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
6
+ ref?: React.Ref<HTMLDivElement>;
7
+ } & {
8
+ asChild?: boolean;
9
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
10
+ label?: string;
11
+ shouldFilter?: boolean;
12
+ filter?: (value: string, search: string, keywords?: string[]) => number;
13
+ defaultValue?: string;
14
+ value?: string;
15
+ onValueChange?: (value: string) => void;
16
+ loop?: boolean;
17
+ disablePointerSelection?: boolean;
18
+ vimBindings?: boolean;
19
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ declare const CommandDialog: ({ children, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
21
+ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
22
+ ref?: React.Ref<HTMLInputElement>;
23
+ } & {
24
+ asChild?: boolean;
25
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
26
+ value?: string;
27
+ onValueChange?: (search: string) => void;
28
+ } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
29
+ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
30
+ children?: React.ReactNode;
31
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
32
+ ref?: React.Ref<HTMLDivElement>;
33
+ } & {
34
+ asChild?: boolean;
35
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
36
+ label?: string;
37
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
38
+ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
39
+ children?: React.ReactNode;
40
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
41
+ ref?: React.Ref<HTMLDivElement>;
42
+ } & {
43
+ asChild?: boolean;
44
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
45
+ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
46
+ children?: React.ReactNode;
47
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
48
+ ref?: React.Ref<HTMLDivElement>;
49
+ } & {
50
+ asChild?: boolean;
51
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
52
+ heading?: React.ReactNode;
53
+ value?: string;
54
+ forceMount?: boolean;
55
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
56
+ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
57
+ ref?: React.Ref<HTMLDivElement>;
58
+ } & {
59
+ asChild?: boolean;
60
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
61
+ alwaysRender?: boolean;
62
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
63
+ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
64
+ children?: React.ReactNode;
65
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
66
+ ref?: React.Ref<HTMLDivElement>;
67
+ } & {
68
+ asChild?: boolean;
69
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
70
+ disabled?: boolean;
71
+ onSelect?: (value: string) => void;
72
+ value?: string;
73
+ keywords?: string[];
74
+ forceMount?: boolean;
75
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
76
+ declare const CommandShortcut: {
77
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
78
+ displayName: string;
79
+ };
80
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, };
@@ -0,0 +1 @@
1
+ export * from './command';
@@ -8,11 +8,13 @@ export * from './button';
8
8
  export * from './calendar';
9
9
  export * from './card';
10
10
  export * from './checkbox';
11
+ export * from './command';
11
12
  export * from './currency-input';
12
13
  export * from './dialog';
13
14
  export * from './dropdown-menu';
14
15
  export * from './input';
15
16
  export * from './label';
17
+ export * from './multi-select';
16
18
  export * from './navigation-menu';
17
19
  export * from './pagination';
18
20
  export * from './password-input';
@@ -20,6 +22,7 @@ export * from './popover';
20
22
  export * from './progress';
21
23
  export * from './radio-group';
22
24
  export * from './select';
25
+ export * from './separator';
23
26
  export * from './skeleton';
24
27
  export * from './spinner';
25
28
  export * from './switch';
@@ -0,0 +1 @@
1
+ export * from './multi-select';
@@ -0,0 +1,59 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ /**
4
+ * Variants for the multi-select component to handle different styles.
5
+ * Uses class-variance-authority (cva) to define different styles based on "variant" prop.
6
+ */
7
+ declare const multiSelectVariants: (props?: ({
8
+ variant?: "default" | "destructive" | "secondary" | "inverted" | null | undefined;
9
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
+ /**
11
+ * Props for MultiSelect component
12
+ */
13
+ interface MultiSelectProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof multiSelectVariants> {
14
+ /**
15
+ * An array of option objects to be displayed in the multi-select component.
16
+ * Each option object has a label, value, and an optional icon.
17
+ */
18
+ options: {
19
+ /** The text to display for the option. */
20
+ label: string;
21
+ /** The unique value associated with the option. */
22
+ value: string;
23
+ }[];
24
+ /**
25
+ * Callback function triggered when the selected values change.
26
+ * Receives an array of the new selected values.
27
+ */
28
+ onValueChange: (value: string[]) => void;
29
+ /** The default selected values when the component mounts. */
30
+ defaultValue?: string[];
31
+ /**
32
+ * Placeholder text to be displayed when no values are selected.
33
+ * Optional, defaults to "Select options".
34
+ */
35
+ placeholder?: string;
36
+ /**
37
+ * Maximum number of items to display. Extra selected items will be summarized.
38
+ * Optional, defaults to 3.
39
+ */
40
+ maxCount?: number;
41
+ /**
42
+ * The modality of the popover. When set to true, interaction with outside elements
43
+ * will be disabled and only popover content will be visible to screen readers.
44
+ * Optional, defaults to false.
45
+ */
46
+ modalPopover?: boolean;
47
+ /**
48
+ * If true, renders the multi-select component as a child of another component.
49
+ * Optional, defaults to false.
50
+ */
51
+ asChild?: boolean;
52
+ /**
53
+ * Additional class names to apply custom styles to the multi-select component.
54
+ * Optional, can be used to add custom styles.
55
+ */
56
+ className?: string;
57
+ }
58
+ export declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<HTMLButtonElement>>;
59
+ export {};
@@ -0,0 +1 @@
1
+ export * from './separator';
@@ -0,0 +1,4 @@
1
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
2
+ import * as React from 'react';
3
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export { Separator };
@@ -7,11 +7,21 @@ interface DialogOptions {
7
7
  icon?: React.ElementType;
8
8
  className?: string;
9
9
  type?: DialogType;
10
- confirmLabel?: string;
11
- cancelLabel?: string;
12
- displayCancel?: boolean;
13
- onConfirm?: () => void | Promise<void>;
14
10
  size?: DialogSize;
11
+ confirmButton?: {
12
+ label: string;
13
+ className?: string;
14
+ disabled?: boolean;
15
+ loading?: boolean;
16
+ onClick?: () => void | Promise<void>;
17
+ };
18
+ cancelButton?: {
19
+ label: string;
20
+ className?: string;
21
+ disabled?: boolean;
22
+ loading?: boolean;
23
+ onClick?: () => void;
24
+ };
15
25
  }
16
26
  interface DialogContextType {
17
27
  open: (options: DialogOptions) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buildgrid-ui",
3
- "version": "1.9.4",
3
+ "version": "1.11.0",
4
4
  "homepage": "http://adrianomaringolo.github.io/buildgrid-ui",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -50,6 +50,7 @@
50
50
  "@radix-ui/react-progress": "^1.1.1",
51
51
  "@radix-ui/react-radio-group": "^1.2.2",
52
52
  "@radix-ui/react-select": "^2.1.4",
53
+ "@radix-ui/react-separator": "^1.1.1",
53
54
  "@radix-ui/react-slot": "^1.1.1",
54
55
  "@radix-ui/react-switch": "^1.1.2",
55
56
  "@radix-ui/react-tabs": "^1.1.2",
@@ -59,6 +60,7 @@
59
60
  "@shadcn/ui": "^0.0.4",
60
61
  "class-variance-authority": "^0.7.1",
61
62
  "clsx": "^2.1.1",
63
+ "cmdk": "^1.0.4",
62
64
  "compressorjs": "^1.2.1",
63
65
  "cva-extended": "^2.0.0",
64
66
  "date-fns": "^4.1.0",