buildgrid-ui 1.1.0-alpha.4 → 1.1.0-dev.10
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 +25 -0
- package/dist/buildgrid-ui.es.js +6068 -866
- package/dist/buildgrid-ui.umd.js +116 -11
- package/dist/components/adaptive-input/adaptive-input.d.ts +9 -0
- package/dist/components/adaptive-input/index.d.ts +1 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +20 -0
- package/dist/components/alert-dialog/index.d.ts +1 -0
- package/dist/components/autocomplete/autocomplete.d.ts +14 -0
- package/dist/components/autocomplete/index.d.ts +1 -0
- package/dist/components/avatar/avatar.d.ts +6 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/badge/{Badge.d.ts → badge.d.ts} +1 -1
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/button/{Button.d.ts → button.d.ts} +4 -3
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/checkbox/checkbox.d.ts +4 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/currency-input/currency-input.d.ts +10 -0
- package/dist/components/currency-input/index.d.ts +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +27 -0
- package/dist/components/dropdown-menu/index.d.ts +1 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/input.d.ts +9 -0
- package/dist/components/password-input/index.d.ts +1 -0
- package/dist/components/password-input/password-input.d.ts +16 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/popover.d.ts +7 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/progress/progress.d.ts +4 -0
- package/dist/components/skeleton/index.d.ts +1 -1
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/switch.d.ts +4 -0
- package/dist/index.d.ts +2 -5
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/utils/formatters.d.ts +8 -0
- package/package.json +16 -2
- package/.editorconfig +0 -5
- package/.eslintrc.json +0 -3
- package/.github/workflows/release.yml +0 -25
- package/.husky/commit-msg +0 -1
- package/.prettierignore +0 -6
- package/.prettierrc +0 -6
- package/.releaserc.json +0 -40
- package/.storybook/main.ts +0 -27
- package/.storybook/preview.ts +0 -15
- package/commitlint.config.js +0 -3
- package/components.json +0 -21
- package/eslint.config.mjs +0 -13
- package/postcss.config.js +0 -6
- package/src/components/badge/Badge.stories.tsx +0 -30
- package/src/components/badge/Badge.tsx +0 -34
- package/src/components/badge/index.ts +0 -1
- package/src/components/button/Button.stories.tsx +0 -40
- package/src/components/button/Button.tsx +0 -57
- package/src/components/button/index.ts +0 -1
- package/src/components/card/Card.stories.tsx +0 -41
- package/src/components/card/Card.tsx +0 -61
- package/src/components/card/index.ts +0 -1
- package/src/components/index.ts +0 -4
- package/src/components/skeleton/Skeleton.stories.tsx +0 -24
- package/src/components/skeleton/Skeleton.tsx +0 -19
- package/src/components/skeleton/index.ts +0 -1
- package/src/index.ts +0 -5
- package/src/lib/index.ts +0 -1
- package/src/lib/utils/cn.ts +0 -6
- package/src/styles/tailwind.css +0 -66
- package/tailwind.config.js +0 -57
- package/tsconfig.app.json +0 -10
- package/tsconfig.json +0 -29
- package/vite.config.ts +0 -34
- /package/dist/components/card/{Card.d.ts → card.d.ts} +0 -0
- /package/dist/components/skeleton/{Skeleton.d.ts → skeleton.d.ts} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { InputProps } from '../input';
|
|
3
|
+
export interface AdaptiveInputProps extends InputProps {
|
|
4
|
+
leftIcon?: React.ReactNode;
|
|
5
|
+
rightIcon?: React.ReactNode;
|
|
6
|
+
mask?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const AdaptiveInput: React.ForwardRefExoticComponent<AdaptiveInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
9
|
+
export { AdaptiveInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './adaptive-input';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
|
+
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
6
|
+
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const AlertDialogHeader: {
|
|
9
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const AlertDialogFooter: {
|
|
13
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alert-dialog';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Option {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
interface AutoCompleteProps {
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
options: Option[];
|
|
9
|
+
className?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
emptyMessage?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Autocomplete(props: AutoCompleteProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './autocomplete';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
5
|
+
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
export { Avatar, AvatarFallback, AvatarImage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './avatar';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './badge';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type VariantProps } from
|
|
2
|
-
import * as React from
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "xl" | "icon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
isLoading?: boolean;
|
|
8
9
|
asChild?: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './button';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './card';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Checkbox };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './checkbox';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AdaptiveInputProps } from '../adaptive-input';
|
|
3
|
+
export interface CurrencyInputProps extends AdaptiveInputProps {
|
|
4
|
+
currencySymbol?: string;
|
|
5
|
+
decimalSeparator?: string;
|
|
6
|
+
thousandSeparator?: string;
|
|
7
|
+
onValueChange: (value: number) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const CurrencyInput: React.ForwardRefExoticComponent<CurrencyInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export { CurrencyInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './currency-input';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dropdown-menu';
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
export * from './adaptive-input';
|
|
2
|
+
export * from './alert-dialog';
|
|
3
|
+
export * from './autocomplete';
|
|
4
|
+
export * from './avatar';
|
|
1
5
|
export * from './badge';
|
|
2
6
|
export * from './button';
|
|
3
7
|
export * from './card';
|
|
8
|
+
export * from './checkbox';
|
|
9
|
+
export * from './currency-input';
|
|
10
|
+
export * from './dropdown-menu';
|
|
11
|
+
export * from './input';
|
|
12
|
+
export * from './password-input';
|
|
13
|
+
export * from './popover';
|
|
14
|
+
export * from './progress';
|
|
4
15
|
export * from './skeleton';
|
|
16
|
+
export * from './switch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const inputVariants: (props?: ({
|
|
4
|
+
sizing?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
9
|
+
export { Input };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './password-input';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
interface PasswordInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
|
+
showStrengthMeter?: boolean;
|
|
4
|
+
strengthLabels?: {
|
|
5
|
+
veryWeak: string;
|
|
6
|
+
weak: string;
|
|
7
|
+
medium: string;
|
|
8
|
+
strong: string;
|
|
9
|
+
veryStrong: string;
|
|
10
|
+
};
|
|
11
|
+
showPasswordLabel?: string;
|
|
12
|
+
hidePasswordLabel?: string;
|
|
13
|
+
strengthTitle?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function PasswordInput(props: PasswordInputProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './popover';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './progress';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Progress };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './skeleton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './switch';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Switch };
|
package/dist/index.d.ts
CHANGED
package/dist/lib/index.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const formatCurrency: (number: number, language?: string, currency?: string) => string;
|
|
2
|
+
export declare const formatDateAndWeekday: (date: Date | string, language?: string) => string;
|
|
3
|
+
export declare const formatDateAndWeekdayAndYear: (date: Date | string, language?: string) => string;
|
|
4
|
+
export declare const formatDateAndMonth: (date: Date | string, language?: string) => string;
|
|
5
|
+
export declare const formatLongDate: (date: Date | string, language?: string) => string;
|
|
6
|
+
export declare const formatShortDate: (date: Date, language?: string) => string;
|
|
7
|
+
export declare const getMonthYearFromISODate: (date: string) => string;
|
|
8
|
+
export declare const formatWeekDayAndShortDate: (date: Date, language?: string) => string;
|
package/package.json
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buildgrid-ui",
|
|
3
|
-
"version": "1.1.0-
|
|
3
|
+
"version": "1.1.0-dev.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md",
|
|
10
|
+
"CHANGELOG.md",
|
|
11
|
+
"LICENSE"
|
|
12
|
+
],
|
|
7
13
|
"main": "dist/buildgrid-ui.umd.js",
|
|
8
14
|
"module": "dist/buildgrid-ui.esm.js",
|
|
9
15
|
"types": "dist/index.d.ts",
|
|
@@ -15,14 +21,22 @@
|
|
|
15
21
|
"storybook": "storybook dev -p 6006",
|
|
16
22
|
"build-storybook": "storybook build",
|
|
17
23
|
"release": "semantic-release",
|
|
18
|
-
"prepublishOnly": "npm run build"
|
|
24
|
+
"prepublishOnly": "npm run build",
|
|
25
|
+
"build:publish": "npm run build && npm publish"
|
|
19
26
|
},
|
|
20
27
|
"keywords": [],
|
|
21
28
|
"author": "",
|
|
22
29
|
"license": "ISC",
|
|
23
30
|
"description": "",
|
|
24
31
|
"dependencies": {
|
|
32
|
+
"@radix-ui/react-alert-dialog": "^1.1.4",
|
|
33
|
+
"@radix-ui/react-avatar": "^1.1.2",
|
|
34
|
+
"@radix-ui/react-checkbox": "^1.1.3",
|
|
35
|
+
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
36
|
+
"@radix-ui/react-popover": "^1.1.4",
|
|
37
|
+
"@radix-ui/react-progress": "^1.1.1",
|
|
25
38
|
"@radix-ui/react-slot": "^1.1.1",
|
|
39
|
+
"@radix-ui/react-switch": "^1.1.2",
|
|
26
40
|
"@shadcn/ui": "^0.0.4",
|
|
27
41
|
"class-variance-authority": "^0.7.1",
|
|
28
42
|
"clsx": "^2.1.1",
|
package/.editorconfig
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
- alpha
|
|
7
|
-
- beta
|
|
8
|
-
- rc
|
|
9
|
-
jobs:
|
|
10
|
-
release:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout code
|
|
14
|
-
uses: actions/checkout@v3
|
|
15
|
-
- name: Setup Node.js
|
|
16
|
-
uses: actions/setup-node@v3
|
|
17
|
-
with:
|
|
18
|
-
node-version: "20.8.1"
|
|
19
|
-
- name: Install dependencies
|
|
20
|
-
run: npm ci
|
|
21
|
-
- name: Run semantic-release
|
|
22
|
-
env:
|
|
23
|
-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
24
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
25
|
-
run: npm run release
|
package/.husky/commit-msg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npx --no-install commitlint --edit "$1"
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/.releaserc.json
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"branches": [
|
|
3
|
-
"main",
|
|
4
|
-
{
|
|
5
|
-
"name": "alpha",
|
|
6
|
-
"prerelease": "alpha"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"name": "beta",
|
|
10
|
-
"prerelease": "beta"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "release-candidate",
|
|
14
|
-
"prerelease": "rc"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"plugins": [
|
|
18
|
-
"@semantic-release/commit-analyzer",
|
|
19
|
-
"@semantic-release/release-notes-generator",
|
|
20
|
-
[
|
|
21
|
-
"@semantic-release/changelog",
|
|
22
|
-
{
|
|
23
|
-
"changelogFile": "CHANGELOG.md"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
"@semantic-release/npm",
|
|
28
|
-
{
|
|
29
|
-
"npmPublish": true
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
[
|
|
33
|
-
"@semantic-release/git",
|
|
34
|
-
{
|
|
35
|
-
"assets": ["package.json", "CHANGELOG.md"],
|
|
36
|
-
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
]
|
|
40
|
-
}
|
package/.storybook/main.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from "@storybook/react-vite";
|
|
2
|
-
import { mergeConfig } from "vite";
|
|
3
|
-
|
|
4
|
-
const config: StorybookConfig = {
|
|
5
|
-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
6
|
-
addons: [
|
|
7
|
-
"@storybook/addon-onboarding",
|
|
8
|
-
"@storybook/addon-essentials",
|
|
9
|
-
"@chromatic-com/storybook",
|
|
10
|
-
"@storybook/addon-interactions",
|
|
11
|
-
"storybook-css-modules-preset",
|
|
12
|
-
],
|
|
13
|
-
framework: {
|
|
14
|
-
name: "@storybook/react-vite",
|
|
15
|
-
options: {},
|
|
16
|
-
},
|
|
17
|
-
async viteFinal(config) {
|
|
18
|
-
return mergeConfig(config, {
|
|
19
|
-
css: {
|
|
20
|
-
postcss: {
|
|
21
|
-
plugins: [require("tailwindcss"), require("autoprefixer")],
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
export default config;
|
package/.storybook/preview.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Preview } from "@storybook/react";
|
|
2
|
-
import "../src/styles/tailwind.css";
|
|
3
|
-
|
|
4
|
-
const preview: Preview = {
|
|
5
|
-
parameters: {
|
|
6
|
-
controls: {
|
|
7
|
-
matchers: {
|
|
8
|
-
color: /(background|color)$/i,
|
|
9
|
-
date: /Date$/i,
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default preview;
|
package/commitlint.config.js
DELETED
package/components.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
-
"style": "default",
|
|
4
|
-
"rsc": false,
|
|
5
|
-
"tsx": true,
|
|
6
|
-
"tailwind": {
|
|
7
|
-
"config": "tailwind.config.js",
|
|
8
|
-
"css": "src/styles/tailwind.css",
|
|
9
|
-
"baseColor": "neutral",
|
|
10
|
-
"cssVariables": true,
|
|
11
|
-
"prefix": ""
|
|
12
|
-
},
|
|
13
|
-
"aliases": {
|
|
14
|
-
"components": "@/components",
|
|
15
|
-
"utils": "@/lib/utils",
|
|
16
|
-
"ui": "@/components/ui",
|
|
17
|
-
"lib": "@/lib",
|
|
18
|
-
"hooks": "@/hooks"
|
|
19
|
-
},
|
|
20
|
-
"iconLibrary": "lucide"
|
|
21
|
-
}
|
package/eslint.config.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
import js from "@eslint/js";
|
|
4
|
-
import { FlatCompat } from "@eslint/eslintrc";
|
|
5
|
-
|
|
6
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const __dirname = path.dirname(__filename);
|
|
8
|
-
const compat = new FlatCompat({
|
|
9
|
-
baseDirectory: __dirname,
|
|
10
|
-
recommendedConfig: js.configs.recommended,
|
|
11
|
-
allConfig: js.configs.all
|
|
12
|
-
});
|
|
13
|
-
export default [...compat.extends("next/core-web-vitals", "next/typescript", "prettier")];
|
package/postcss.config.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// organize-imports-ignore
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
4
|
-
|
|
5
|
-
import { Badge, BadgeProps, badgeVariants } from './Badge'
|
|
6
|
-
|
|
7
|
-
const meta: Meta<typeof Badge> = {
|
|
8
|
-
component: Badge,
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default meta
|
|
12
|
-
type Story = StoryObj<typeof Badge>
|
|
13
|
-
|
|
14
|
-
const Template = (args: BadgeProps) => {
|
|
15
|
-
const variants = ['default', 'secondary', 'destructive', 'outline']
|
|
16
|
-
return (
|
|
17
|
-
<div className="flex gap-2">
|
|
18
|
-
{Object.values(variants).map((variant) => (
|
|
19
|
-
<Badge {...args} variant={variant as BadgeProps['variant']}>
|
|
20
|
-
{variant}
|
|
21
|
-
</Badge>
|
|
22
|
-
))}
|
|
23
|
-
</div>
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const Default: Story = {
|
|
28
|
-
render: Template.bind({}),
|
|
29
|
-
args: {},
|
|
30
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from 'class-variance-authority'
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
|
|
4
|
-
import { cn } from '@/lib'
|
|
5
|
-
|
|
6
|
-
const badgeVariants = cva(
|
|
7
|
-
'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default:
|
|
12
|
-
'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',
|
|
13
|
-
secondary:
|
|
14
|
-
'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
15
|
-
destructive:
|
|
16
|
-
'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
|
|
17
|
-
outline: 'text-foreground',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
variant: 'default',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
export interface BadgeProps
|
|
27
|
-
extends React.HTMLAttributes<HTMLDivElement>,
|
|
28
|
-
VariantProps<typeof badgeVariants> {}
|
|
29
|
-
|
|
30
|
-
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
31
|
-
return <div className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { Badge, badgeVariants }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Badge";
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// organize-imports-ignore
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
4
|
-
import { Button, ButtonProps } from './Button'
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof Button> = {
|
|
7
|
-
component: Button,
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof Button>
|
|
12
|
-
|
|
13
|
-
const Template = (args: ButtonProps) => {
|
|
14
|
-
const variants: Array<ButtonProps['variant']> = [
|
|
15
|
-
'default',
|
|
16
|
-
'secondary',
|
|
17
|
-
'destructive',
|
|
18
|
-
'outline',
|
|
19
|
-
'ghost',
|
|
20
|
-
'link',
|
|
21
|
-
]
|
|
22
|
-
return (
|
|
23
|
-
<div className="flex gap-2">
|
|
24
|
-
{Object.values(variants).map((variant) => (
|
|
25
|
-
<Button
|
|
26
|
-
{...args}
|
|
27
|
-
variant={variant as ButtonProps['variant']}
|
|
28
|
-
className="capitalize"
|
|
29
|
-
>
|
|
30
|
-
{variant}
|
|
31
|
-
</Button>
|
|
32
|
-
))}
|
|
33
|
-
</div>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const Default: Story = {
|
|
38
|
-
render: Template.bind({}),
|
|
39
|
-
args: {},
|
|
40
|
-
}
|