@lctafrica/ui 0.0.3 → 0.0.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/README.md +1 -2
- package/dist/components/ui/Label/Label.d.ts +4 -0
- package/dist/components/ui/badge/Badge.d.ts +19 -0
- package/dist/components/ui/button/Button.d.ts +11 -0
- package/dist/components/ui/button/Button.test.d.ts +1 -0
- package/dist/components/ui/button-group/ButtonGroup.d.ts +24 -0
- package/dist/components/ui/button-group/ButtonGroup.test.d.ts +1 -0
- package/dist/components/ui/checkbox/Checkbox.d.ts +15 -0
- package/dist/components/ui/checkbox/Checkbox.test.d.ts +1 -0
- package/dist/components/ui/field/Field.d.ts +24 -0
- package/dist/components/ui/field/Filed.test.d.ts +1 -0
- package/dist/components/ui/input/Input.d.ts +3 -0
- package/dist/components/ui/input/Input.test.d.ts +1 -0
- package/dist/components/ui/separator/separator.d.ts +4 -0
- package/dist/components/ui/text/Text.d.ts +11 -0
- package/dist/components/ui/text/Text.test.d.ts +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1800 -652
- package/package.json +23 -7
- package/dist/components/ui/button./Button.d.ts +0 -11
- /package/dist/components/ui/{button./Button.test.d.ts → badge/Badge.test.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# LCT Africa UI Library
|
|
2
2
|
|
|
3
|
-
This is an internal UI component library for **LCT Africa**, built with **React**, **TypeScript**, and **Vite**. It provides reusable, consistent, and tested UI components for use across LCT Africa’s frontend projects.
|
|
4
|
-
---
|
|
3
|
+
## This is an internal UI component library for **LCT Africa**, built with **React**, **TypeScript**, and **Vite**. It provides reusable, consistent, and tested UI components for use across LCT Africa’s frontend projects.
|
|
5
4
|
|
|
6
5
|
## Project Structure
|
|
7
6
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type BadgeColor = "red" | "blue" | "green" | "yellow" | "gray" | "purple" | "pink" | "orange";
|
|
2
|
+
export type BadgeSize = "sm" | "md" | "lg";
|
|
3
|
+
export type BadgeIndicator = "default" | "dot-Icon" | "x-Icon";
|
|
4
|
+
export declare const BADGE_COLORS: ["red", "blue", "green", "yellow", "gray", "purple", "pink", "orange"];
|
|
5
|
+
export declare const badgeGroupVariants: (props?: ({
|
|
6
|
+
size?: BadgeSize | null | undefined;
|
|
7
|
+
color?: BadgeColor | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export type BadgeProps = {
|
|
10
|
+
color?: BadgeColor | string;
|
|
11
|
+
text: string;
|
|
12
|
+
size?: BadgeSize;
|
|
13
|
+
indicator?: BadgeIndicator;
|
|
14
|
+
containerClassName?: string;
|
|
15
|
+
textClassName?: string;
|
|
16
|
+
};
|
|
17
|
+
declare function Badge({ color, text, size, indicator, containerClassName, textClassName, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default Badge;
|
|
19
|
+
export { Badge };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "primary" | "primary-destructive" | "secondary" | "secondary-destructive" | "outline" | "outline-destructive" | "ghost" | "ghost-destructive" | "link-destructive" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl" | "icon-2xl" | null | undefined;
|
|
6
|
+
defaultVariants?: "size" | "variant" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Separator } from '../separator/separator';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
declare const buttonGroupVariants: (props?: ({
|
|
5
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export declare function ButtonGroupRoot({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export type ButtonGroupOption<T> = {
|
|
13
|
+
label: string;
|
|
14
|
+
Icon?: ReactNode;
|
|
15
|
+
value: T;
|
|
16
|
+
};
|
|
17
|
+
export type ButtonGroupProps<T> = {
|
|
18
|
+
options: ButtonGroupOption<T>[];
|
|
19
|
+
onSelect(value: T): void;
|
|
20
|
+
containerClassName?: string;
|
|
21
|
+
value: T | null | undefined;
|
|
22
|
+
} & VariantProps<typeof buttonGroupVariants>;
|
|
23
|
+
export declare function ButtonGroup<T>({ onSelect, options, containerClassName, value, orientation, }: ButtonGroupProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
4
|
+
declare const checkboxVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "md" | null | undefined;
|
|
6
|
+
variant?: "default" | "circle" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
declare const iconVariants: (props?: ({
|
|
9
|
+
size?: "sm" | "md" | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
|
+
interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
|
|
12
|
+
}
|
|
13
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export { Checkbox, checkboxVariants, iconVariants };
|
|
15
|
+
export type { CheckboxProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Label } from '../Label/Label';
|
|
3
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
|
|
5
|
+
variant?: "legend" | "label";
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const fieldVariants: (props?: ({
|
|
9
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
|
+
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
|
|
20
|
+
errors?: Array<{
|
|
21
|
+
message?: string;
|
|
22
|
+
} | undefined>;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Separator as SeparatorPrimitive } from 'radix-ui';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
declare const textVariants: (props?: ({
|
|
4
|
+
variant?: "heading" | "subheading" | "paragraph" | "description" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
interface Props extends VariantProps<typeof textVariants> {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function Text({ children, className, variant }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
export * from './components/ui/
|
|
1
|
+
export * from './components/ui/badge/Badge';
|
|
2
|
+
export * from './components/ui/button-group/ButtonGroup';
|
|
3
|
+
export * from './components/ui/button/Button';
|
|
4
|
+
export * from './components/ui/checkbox/Checkbox';
|
|
5
|
+
export * from './components/ui/field/Field';
|
|
6
|
+
export * from './components/ui/input/Input';
|
|
7
|
+
export * from './components/ui/text/Text';
|