buildgrid-ui 1.1.0-dev.15 → 1.1.0-dev.18
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/CHANGELOG.md +23 -0
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/month-navigator/index.d.ts +1 -0
- package/dist/blocks/month-navigator/month-navigator.d.ts +9 -0
- package/dist/buildgrid-ui.css +1 -0
- package/dist/buildgrid-ui.es.js +8995 -3622
- package/dist/buildgrid-ui.umd.js +85 -40
- package/dist/components/calendar/calendar.d.ts +9 -0
- package/dist/components/calendar/index.d.ts +1 -0
- package/dist/components/form/form.d.ts +23 -0
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/label/label.d.ts +5 -0
- package/dist/components/radio-group/index.d.ts +1 -0
- package/dist/components/radio-group/radio-group.d.ts +5 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/select.d.ts +13 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/table.d.ts +10 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/textarea.d.ts +3 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/toggle.d.ts +12 -0
- package/dist/components/toggle-group/index.d.ts +1 -0
- package/dist/components/toggle-group/toggle-group.d.ts +12 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/hooks/index.d.ts +5 -0
- package/dist/lib/hooks/use-debounce.d.ts +2 -0
- package/dist/lib/hooks/use-dialog.d.ts +30 -0
- package/dist/lib/hooks/use-media-query.d.ts +1 -0
- package/dist/lib/hooks/use-mobile.d.ts +1 -0
- package/dist/lib/hooks/use-pwa-install.d.ts +7 -0
- package/package.json +19 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DayPicker } from 'react-day-picker';
|
|
3
|
+
import 'react-day-picker/style.css';
|
|
4
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
5
|
+
declare function Calendar(props: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare namespace Calendar {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
export { Calendar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calendar';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ControllerProps, FieldPath, FieldValues } from 'react-hook-form';
|
|
4
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
5
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const useFormField: () => {
|
|
7
|
+
invalid: boolean;
|
|
8
|
+
isDirty: boolean;
|
|
9
|
+
isTouched: boolean;
|
|
10
|
+
isValidating: boolean;
|
|
11
|
+
error?: import("react-hook-form").FieldError;
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
formItemId: string;
|
|
15
|
+
formDescriptionId: string;
|
|
16
|
+
formMessageId: string;
|
|
17
|
+
};
|
|
18
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
20
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
21
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './form';
|
|
@@ -4,16 +4,26 @@ export * from './autocomplete';
|
|
|
4
4
|
export * from './avatar';
|
|
5
5
|
export * from './badge';
|
|
6
6
|
export * from './button';
|
|
7
|
+
export * from './calendar';
|
|
7
8
|
export * from './card';
|
|
8
9
|
export * from './checkbox';
|
|
9
10
|
export * from './currency-input';
|
|
10
11
|
export * from './dialog';
|
|
11
12
|
export * from './dropdown-menu';
|
|
13
|
+
export * from './form';
|
|
12
14
|
export * from './input';
|
|
15
|
+
export * from './label';
|
|
13
16
|
export * from './pagination';
|
|
14
17
|
export * from './password-input';
|
|
15
18
|
export * from './popover';
|
|
16
19
|
export * from './progress';
|
|
20
|
+
export * from './radio-group';
|
|
21
|
+
export * from './select';
|
|
17
22
|
export * from './skeleton';
|
|
18
23
|
export * from './switch';
|
|
24
|
+
export * from './table';
|
|
19
25
|
export * from './tabs';
|
|
26
|
+
export * from './textarea';
|
|
27
|
+
export * from './toggle';
|
|
28
|
+
export * from './toggle-group';
|
|
29
|
+
export * from './tooltip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './label';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './radio-group';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './select';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './table';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
3
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
7
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
8
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './textarea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toggle';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const toggleVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toggle-group';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tooltip';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type DialogType = 'info' | 'success' | 'error' | 'warning' | 'custom' | 'confirm';
|
|
3
|
+
type DialogSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
interface DialogOptions {
|
|
5
|
+
title?: string;
|
|
6
|
+
message: string;
|
|
7
|
+
icon?: React.ElementType;
|
|
8
|
+
className?: string;
|
|
9
|
+
type?: DialogType;
|
|
10
|
+
confirmLabel?: string;
|
|
11
|
+
cancelLabel?: string;
|
|
12
|
+
displayCancel?: boolean;
|
|
13
|
+
onConfirm?: () => void;
|
|
14
|
+
size?: DialogSize;
|
|
15
|
+
}
|
|
16
|
+
interface DialogContextType {
|
|
17
|
+
open: (options: DialogOptions) => void;
|
|
18
|
+
close: () => void;
|
|
19
|
+
info: (options: Omit<DialogOptions, 'type'>) => void;
|
|
20
|
+
success: (options: Omit<DialogOptions, 'type'>) => void;
|
|
21
|
+
error: (options: Omit<DialogOptions, 'type'>) => void;
|
|
22
|
+
warning: (options: Omit<DialogOptions, 'type'>) => void;
|
|
23
|
+
custom: (options: DialogOptions) => void;
|
|
24
|
+
confirm: (options: Omit<DialogOptions, 'type'>) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function DialogProvider({ children }: {
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function useDialog(): DialogContextType;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useMediaQuery(query: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsMobile(): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buildgrid-ui",
|
|
3
|
-
"version": "1.1.0-dev.
|
|
3
|
+
"version": "1.1.0-dev.18",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,7 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"./utils": {
|
|
23
23
|
"import": "./dist/lib/utils/index.d.ts",
|
|
24
|
-
"require": "./dist/lib/utils
|
|
24
|
+
"require": "./dist/lib/utils/index.d.ts"
|
|
25
|
+
},
|
|
26
|
+
"./hooks": {
|
|
27
|
+
"import": "./dist/lib/hooks/index.d.ts",
|
|
28
|
+
"require": "./dist/lib/hooks/index.d.ts"
|
|
25
29
|
},
|
|
26
30
|
".": "./dist/index.d.ts"
|
|
27
31
|
},
|
|
@@ -36,6 +40,9 @@
|
|
|
36
40
|
"utils": [
|
|
37
41
|
"dist/lib/utils"
|
|
38
42
|
],
|
|
43
|
+
"hooks": [
|
|
44
|
+
"dist/lib/hooks"
|
|
45
|
+
],
|
|
39
46
|
"*": [
|
|
40
47
|
"dist/*"
|
|
41
48
|
]
|
|
@@ -50,6 +57,7 @@
|
|
|
50
57
|
"build:types": "tsc --emitDeclarationOnly",
|
|
51
58
|
"build:link": "npm run build && npm link",
|
|
52
59
|
"storybook": "storybook dev -p 6006",
|
|
60
|
+
"sb": "storybook dev -p 6006",
|
|
53
61
|
"build-storybook": "storybook build",
|
|
54
62
|
"release": "semantic-release",
|
|
55
63
|
"prepublishOnly": "npm run build",
|
|
@@ -64,15 +72,24 @@
|
|
|
64
72
|
"@radix-ui/react-avatar": "^1.1.2",
|
|
65
73
|
"@radix-ui/react-checkbox": "^1.1.3",
|
|
66
74
|
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
75
|
+
"@radix-ui/react-label": "^2.1.1",
|
|
67
76
|
"@radix-ui/react-popover": "^1.1.4",
|
|
68
77
|
"@radix-ui/react-progress": "^1.1.1",
|
|
78
|
+
"@radix-ui/react-radio-group": "^1.2.2",
|
|
79
|
+
"@radix-ui/react-select": "^2.1.4",
|
|
69
80
|
"@radix-ui/react-slot": "^1.1.1",
|
|
70
81
|
"@radix-ui/react-switch": "^1.1.2",
|
|
71
82
|
"@radix-ui/react-tabs": "^1.1.2",
|
|
83
|
+
"@radix-ui/react-toggle": "^1.1.1",
|
|
84
|
+
"@radix-ui/react-toggle-group": "^1.1.1",
|
|
85
|
+
"@radix-ui/react-tooltip": "^1.1.6",
|
|
72
86
|
"@shadcn/ui": "^0.0.4",
|
|
73
87
|
"class-variance-authority": "^0.7.1",
|
|
74
88
|
"clsx": "^2.1.1",
|
|
89
|
+
"date-fns": "^4.1.0",
|
|
75
90
|
"lucide-react": "^0.469.0",
|
|
91
|
+
"react-day-picker": "^9.5.0",
|
|
92
|
+
"react-hook-form": "^7.54.2",
|
|
76
93
|
"tailwind-merge": "^2.6.0",
|
|
77
94
|
"tailwindcss-animate": "^1.0.7",
|
|
78
95
|
"vite": "^6.0.7"
|