@epilot/volt-ui 1.0.0-alpha.16 → 1.0.0-alpha.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/README.md CHANGED
@@ -1,50 +1,47 @@
1
- # React + TypeScript + Vite
1
+ # Volt UI
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ **@epilot/volt-ui** is a tree-shakeable design system library for React applications.
4
4
 
5
- Currently, two official plugins are available:
5
+ ## Stack
6
6
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
7
+ - [Bun](https://bun.com/)
8
+ - [Vite](https://vitejs.dev/) for development and bundling
9
+ - [Tailwind CSS](https://tailwindcss.com/) for styling
10
+ - [Radix UI](https://www.radix-ui.com/) for UI components
11
+ - [Docs](https://fumadocs.com/) for documentation
9
12
 
10
- ## Expanding the ESLint configuration
13
+ > **Note**: We prefix the CSS classes and variables with `volt-ui-` to avoid conflicts with the application styles.
11
14
 
12
- If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
15
+ ## Installation
13
16
 
14
- - Configure the top-level `parserOptions` property like this:
17
+ Install dependencies via [bun](https://bun.com/docs/installation).
15
18
 
16
- ```js
17
- export default tseslint.config({
18
- languageOptions: {
19
- // other options...
20
- parserOptions: {
21
- project: ["./tsconfig.node.json", "./tsconfig.app.json"],
22
- tsconfigRootDir: import.meta.dirname,
23
- },
24
- },
25
- })
19
+ ```bash
20
+ bun install
26
21
  ```
27
22
 
28
- - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29
- - Optionally add `...tseslint.configs.stylisticTypeChecked`
30
- - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31
-
32
- ```js
33
- // eslint.config.js
34
- import react from "eslint-plugin-react"
35
-
36
- export default tseslint.config({
37
- // Set the react version
38
- settings: { react: { version: "18.3" } },
39
- plugins: {
40
- // Add the react plugin
41
- react,
42
- },
43
- rules: {
44
- // other rules...
45
- // Enable its recommended rules
46
- ...react.configs.recommended.rules,
47
- ...react.configs["jsx-runtime"].rules,
48
- },
49
- })
23
+ ## Development
24
+
25
+ To run the development, documentation server and watch for changes, run:
26
+
27
+ ```bash
28
+ bun run dev:watch
29
+ ```
30
+
31
+ Open http://localhost:3000 with your browser to see the result.
32
+
33
+ ## Build
34
+
35
+ ```bash
36
+ bun run build
37
+ ```
38
+
39
+ > **Note**: This will generate the `dist` folder with the compiled code.
40
+
41
+ ## Release
42
+
43
+ To release a new version, run:
44
+
45
+ ```bash
46
+ npm run publish
50
47
  ```
@@ -0,0 +1,39 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const baseColors: {
4
+ readonly blue: "text-blue-default";
5
+ readonly sky: "text-sky-default";
6
+ readonly mint: "text-mint-default";
7
+ readonly green: "text-green-default";
8
+ readonly teal: "text-teal-default";
9
+ readonly cyan: "text-cyan-default";
10
+ readonly indigo: "text-indigo-default";
11
+ readonly purple: "text-purple-default";
12
+ readonly pink: "text-pink-default";
13
+ readonly red: "text-red-default";
14
+ readonly orange: "text-orange-default";
15
+ readonly yellow: "text-yellow-default";
16
+ readonly bronze: "text-bronze-default";
17
+ readonly gray: "text-gray-default";
18
+ };
19
+ declare const styleClasses: {
20
+ readonly soft: (color: string) => string;
21
+ readonly solid: (color: string) => string;
22
+ readonly surface: (color: string) => string;
23
+ };
24
+ declare const badgeVariants: (props?: ({
25
+ color?: "blue" | "sky" | "mint" | "green" | "teal" | "cyan" | "indigo" | "purple" | "pink" | "red" | "orange" | "yellow" | "bronze" | "gray" | null | undefined;
26
+ style?: "soft" | "solid" | "surface" | null | undefined;
27
+ shape?: "default" | "rounded" | null | undefined;
28
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
29
+ type BadgeColor = keyof typeof baseColors;
30
+ type BadgeStyle = keyof typeof styleClasses;
31
+ type BadgeShape = "default" | "rounded";
32
+ type BadgeProps = React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
33
+ asChild?: boolean;
34
+ color?: BadgeColor;
35
+ style?: BadgeStyle;
36
+ shape?: BadgeShape;
37
+ };
38
+ declare const Badge: ({ className, color, style, shape, asChild, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
39
+ export { Badge, badgeVariants };
@@ -2,7 +2,7 @@ import type { ComponentPropsWithoutRef } from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: ({
4
4
  variant?: "primary" | "secondary" | "tertiary" | "destructive" | null | undefined;
5
- size?: "sm" | "base" | "large" | "icon" | null | undefined;
5
+ size?: "xs" | "sm" | "base" | "large" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
8
8
  export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
@@ -11,7 +11,7 @@ export type ButtonProps = ComponentPropsWithoutRef<"button"> & VariantProps<type
11
11
  };
12
12
  export declare const Button: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
13
13
  variant?: "primary" | "secondary" | "tertiary" | "destructive" | null | undefined;
14
- size?: "sm" | "base" | "large" | "icon" | null | undefined;
14
+ size?: "xs" | "sm" | "base" | "large" | null | undefined;
15
15
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
16
16
  asChild?: boolean;
17
17
  } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const calloutVariants: (props?: ({
4
+ type?: "destructive" | "gray" | "info" | "success" | "warning" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare const Callout: ({ className, type, ...props }: React.ComponentProps<"div"> & VariantProps<typeof calloutVariants>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const CalloutTitle: ({ className, ...props }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
8
+ declare const CalloutDescription: ({ className, ...props }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
9
+ declare const CalloutAction: ({ className, align, ...props }: React.ComponentProps<"div"> & {
10
+ align?: "start" | "end";
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ declare const CalloutIcon: ({ className, custom, ...props }: React.ComponentProps<"svg"> & {
13
+ custom?: React.ReactNode;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ export { Callout, CalloutTitle, CalloutDescription, CalloutIcon, CalloutAction };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ declare const Checkbox: ({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
4
+ export { Checkbox };
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare const Dialog: ({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const DialogTrigger: ({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) => import("react/jsx-runtime").JSX.Element;
5
+ declare const DialogPortal: ({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) => import("react/jsx-runtime").JSX.Element;
6
+ declare const DialogClose: ({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const DialogOverlay: ({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) => import("react/jsx-runtime").JSX.Element;
8
+ type DialogContentSize = "small" | "medium" | "large" | "xlarge" | "2xlarge" | "3xlarge" | "4xlarge" | "5xlarge" | "full-width";
9
+ declare const DialogContent: ({ className, children, showCloseButton, size, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
10
+ showCloseButton?: boolean;
11
+ size?: DialogContentSize;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ declare const DialogHeader: ({ className, ...props }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
14
+ declare const DialogFooter: ({ className, ...props }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
15
+ declare const DialogTitle: ({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) => import("react/jsx-runtime").JSX.Element;
16
+ declare const DialogDescription: ({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) => import("react/jsx-runtime").JSX.Element;
17
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -13,10 +13,14 @@ type FieldProps = React.ComponentProps<"div"> & {
13
13
  declare const Field: ({ className, children, onClick, ...props }: FieldProps) => import("react/jsx-runtime").JSX.Element;
14
14
  declare const FieldContent: ({ className, ...props }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
15
15
  declare const FieldLabel: ({ className, ...props }: React.ComponentProps<typeof Label>) => import("react/jsx-runtime").JSX.Element;
16
+ type FieldLabelContentProps = React.ComponentProps<"div"> & {
17
+ showOnHover?: boolean;
18
+ };
19
+ declare const FieldLabelContent: ({ className, showOnHover, ...props }: FieldLabelContentProps) => import("react/jsx-runtime").JSX.Element;
16
20
  declare const FieldDescription: ({ className, ...props }: React.ComponentProps<"p">) => import("react/jsx-runtime").JSX.Element;
17
21
  declare const FieldError: ({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
18
22
  errors?: Array<{
19
23
  message?: string;
20
24
  } | undefined>;
21
25
  }) => import("react/jsx-runtime").JSX.Element | null;
22
- export { Field, FieldSet, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, useFieldContext, };
26
+ export { Field, FieldSet, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelContent, useFieldContext, };
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import * as SelectPrimitive from "@radix-ui/react-select";
3
+ declare const Select: ({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const SelectGroup: ({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) => import("react/jsx-runtime").JSX.Element;
5
+ declare const SelectValue: ({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) => import("react/jsx-runtime").JSX.Element;
6
+ declare const SelectTrigger: ({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const SelectContent: ({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>) => import("react/jsx-runtime").JSX.Element;
8
+ declare const SelectLabel: ({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) => import("react/jsx-runtime").JSX.Element;
9
+ declare const SelectItem: ({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) => import("react/jsx-runtime").JSX.Element;
10
+ declare const SelectSeparator: ({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) => import("react/jsx-runtime").JSX.Element;
11
+ declare const SelectScrollUpButton: ({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) => import("react/jsx-runtime").JSX.Element;
12
+ declare const SelectScrollDownButton: ({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) => import("react/jsx-runtime").JSX.Element;
13
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+ declare const PopoverPortal: ({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Portal>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const Popover: ({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
5
+ declare const PopoverTrigger: ({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) => import("react/jsx-runtime").JSX.Element;
6
+ declare const PopoverContent: ({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const PopoverAnchor: ({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) => import("react/jsx-runtime").JSX.Element;
8
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverPortal };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ declare const RadioGroup: ({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const RadioGroupItem: ({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) => import("react/jsx-runtime").JSX.Element;
5
+ export { RadioGroup, RadioGroupItem };