@mbao01/ui 0.1.0 → 0.1.1

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,2 @@
1
+ import type { BreadcrumbsProps } from "./types";
2
+ export declare const Breadcrumbs: ({ root, labels }: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare const getBreadcrumbs: (pathname: string, labels?: Record<string, string>) => {
2
+ href: {
3
+ pathname: string;
4
+ };
5
+ segment: string;
6
+ }[];
@@ -0,0 +1 @@
1
+ export { Breadcrumbs } from './Breadcrumbs';
@@ -0,0 +1,4 @@
1
+ export type BreadcrumbsProps = {
2
+ root?: string;
3
+ labels?: Record<string, string>;
4
+ };
@@ -0,0 +1,2 @@
1
+ import { type ButtonProps } from "./types";
2
+ export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { ButtonSize, ButtonVariant } from './types';
2
+ export declare const getButtonClasses: ({ size, wide, loading, outline, variant, }: {
3
+ size?: ButtonSize | undefined;
4
+ wide?: boolean | undefined;
5
+ loading?: boolean | undefined;
6
+ outline?: boolean | undefined;
7
+ variant?: ButtonVariant | undefined;
8
+ }) => string;
@@ -0,0 +1 @@
1
+ export { Button } from "./Button";
@@ -0,0 +1,12 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
3
+ export type ButtonVariant = 'default' | 'neutral' | 'primary' | 'secondary' | 'accent' | 'ghost' | 'link' | 'info' | 'success' | 'warning' | 'error';
4
+ export type ButtonProps = {
5
+ size?: ButtonSize;
6
+ wide?: boolean;
7
+ label: ReactNode;
8
+ loading?: boolean;
9
+ outline?: boolean;
10
+ variant?: ButtonVariant;
11
+ disabled?: boolean;
12
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
@@ -0,0 +1,2 @@
1
+ import { type LinkProps } from "./types";
2
+ export declare const Link: ({ href, hover, target, variant, children, className, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { LinkVariant } from './types';
2
+ export declare const getLinkClasses: ({ hover, variant }: {
3
+ hover?: boolean | undefined;
4
+ variant?: LinkVariant | undefined;
5
+ }) => string;
@@ -0,0 +1 @@
1
+ export { Link } from './Link';
@@ -0,0 +1,7 @@
1
+ import type { To, LinkProps as RouterLinkProps } from "react-router-dom";
2
+ export type LinkVariant = "default" | "neutral" | "primary" | "secondary" | "accent" | "link" | "info" | "success" | "warning" | "error";
3
+ export type LinkProps = Omit<RouterLinkProps, "to"> & {
4
+ href: To;
5
+ hover?: boolean;
6
+ variant?: LinkVariant;
7
+ };
@@ -0,0 +1,4 @@
1
+ import { type TextProps } from './types';
2
+ export declare const Text: ({ as, size, variant, children, className }: TextProps) => import("react").DetailedReactHTMLElement<{
3
+ className: string;
4
+ }, HTMLElement>;
@@ -0,0 +1,5 @@
1
+ import type { TextSize, TextVariant } from './types';
2
+ export declare const getTextClasses: ({ size, variant }: {
3
+ size?: TextSize | undefined;
4
+ variant?: TextVariant | undefined;
5
+ }) => string;
@@ -0,0 +1 @@
1
+ export { Text } from './Text';
@@ -0,0 +1,10 @@
1
+ export type TextSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
2
+ export type TextTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'span';
3
+ export type TextVariant = 'info' | 'error' | 'success' | 'warning' | 'primary' | 'secondary' | 'accent' | 'neutral';
4
+ export type TextProps = {
5
+ as?: TextTag;
6
+ size?: TextSize;
7
+ variant?: TextVariant;
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ };
@@ -0,0 +1,4 @@
1
+ export * from "./components/Breadcrumbs";
2
+ export * from "./components/Button";
3
+ export * from "./components/Link";
4
+ export * from "./components/Text";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mbao01/ui",
3
3
  "private": false,
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "type": "module",
6
6
  "author": "Ayomide Bakare",
7
7
  "license": "MIT",
@@ -93,5 +93,5 @@
93
93
  "tailwindcss": "^3.4.0",
94
94
  "typescript": "^5.2.2"
95
95
  },
96
- "gitHead": "f59eb6ddcd7936eb43ccff7f829d6393ed3a2690"
96
+ "gitHead": "a8f9e309d549d280a3c3b1048ab7946d554744bd"
97
97
  }
package/src/index.ts CHANGED
@@ -1,2 +1,4 @@
1
+ export * from "./components/Breadcrumbs";
1
2
  export * from "./components/Button";
3
+ export * from "./components/Link";
2
4
  export * from "./components/Text";