cekat-ui 1.0.3 → 1.0.5

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 ADDED
@@ -0,0 +1,107 @@
1
+ # cekat-ui
2
+
3
+ A modern, lightweight **React UI component library** built with **TypeScript**, **Tailwind CSS**, and **Storybook**.
4
+
5
+ `cekat-ui` is designed to be:
6
+ - ✅ Composable (shadcn / Radix-inspired)
7
+ - ✅ Tree-shakeable
8
+ - ✅ Fully typed
9
+ - ✅ Framework-agnostic (works with Next.js, Vite, CRA, etc.)
10
+
11
+ ---
12
+
13
+ ## ✨ Features
14
+
15
+ - Button (compound component)
16
+ - Checkbox
17
+ - Radio Group
18
+ - Toggle (Switch)
19
+ - Tooltip
20
+ - Tailwind CSS styling
21
+
22
+ ---
23
+
24
+ ## 📦 Installation
25
+
26
+ ```bash
27
+ npm install cekat-ui
28
+
29
+ or
30
+
31
+ yarn add cekat-ui
32
+ ```
33
+
34
+ ## Styles
35
+
36
+ `cekat-ui` ships with prebuilt styles. Import once in your app entry file.
37
+
38
+ Next.js (App Router):
39
+ ```ts
40
+ import 'cekat-ui/style.css';
41
+
42
+
43
+
44
+ ## Usage
45
+
46
+ ### Button
47
+ ```tsx
48
+ import { Button } from 'cekat-ui';
49
+
50
+ export default function Example() {
51
+ return (
52
+ <Button size="md" tone="primary" variant="solid">
53
+ Click me
54
+ </Button>
55
+ );
56
+ }
57
+ ```
58
+
59
+ ### Compound usage
60
+ ```tsx
61
+ <Button>
62
+ <Button.Icon>
63
+ <IconChevronLeft size={16} />
64
+ </Button.Icon>
65
+ <Button.Text>Submit</Button.Text>
66
+ </Button>
67
+ ```
68
+
69
+ ## Components API
70
+
71
+ All components support:
72
+ - `className` override
73
+ - Controlled & uncontrolled usage
74
+ - Keyboard & screen reader accessibility
75
+ - Size variants (`sm`, `md`, `lg`)
76
+
77
+ For full props reference, see Storybook.
78
+
79
+ ## Storybook
80
+
81
+ Run Storybook locally:
82
+ ```bash
83
+ yarn dev
84
+ ```
85
+
86
+ Build static Storybook:
87
+ ```bash
88
+ yarn build:storybook
89
+ ```
90
+
91
+ ## Peer Dependencies
92
+
93
+ ```json
94
+ {
95
+ "react": ">=18",
96
+ "react-dom": ">=18"
97
+ }
98
+ ```
99
+
100
+ ## Tech Stack
101
+
102
+ - React
103
+ - TypeScript
104
+ - Tailwind CSS
105
+ - class-variance-authority
106
+ - Storybook
107
+ - Vite
@@ -0,0 +1,4 @@
1
+ import { ButtonProps } from './button.types';
2
+ declare const ButtonBase: ({ children, className, tone, variant, size, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
+ export { ButtonBase };
4
+ export default ButtonBase;
@@ -0,0 +1,2 @@
1
+ import { ButtonSubComponentProps } from './button.types';
2
+ export declare const ButtonIcon: ({ children }: ButtonSubComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ButtonSubComponentProps } from './button.types';
2
+ export declare const ButtonText: ({ children }: ButtonSubComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const buttonStyles: (props?: {
2
+ size?: "sm" | "md" | "lg" | "xl" | "2xl";
3
+ tone?: "primary" | "destructive";
4
+ variant?: "solid" | "outline" | "ghost" | "outline-primary" | "ghost-primary" | "plain" | "plain-black";
5
+ } & import('class-variance-authority/types').ClassProp) => string;
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ export type ButtonTone = 'primary';
3
+ export type ButtonVariant = 'solid';
4
+ export type ButtonSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
5
+ export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
6
+ tone?: ButtonTone;
7
+ variant?: ButtonVariant;
8
+ size?: ButtonSize;
9
+ }
10
+ export interface ButtonSubComponentProps {
11
+ children: React.ReactNode;
12
+ }
13
+ export type ButtonCompound = React.FC<ButtonProps> & {
14
+ Icon: React.FC<ButtonSubComponentProps>;
15
+ Text: React.FC<ButtonSubComponentProps>;
16
+ };
@@ -0,0 +1,3 @@
1
+ import { ButtonCompound } from './button.types';
2
+ declare const Button: ButtonCompound;
3
+ export { Button };
@@ -0,0 +1,2 @@
1
+ export { RadioGroup, RadioGroupItem } from '../../src/components/Radio';
2
+ export type { RadioGroupProps, RadioGroupItemProps, } from '../../src/components/Radio/radio.types';
@@ -0,0 +1,2 @@
1
+ export { Toggle } from '../../src/components/Toggle';
2
+ export type { ToggleProps } from '../../src/components/Toggle/toggle.types';
@@ -0,0 +1,2 @@
1
+ export { Tooltip } from '../../stories/Tooltip';
2
+ export type { TooltipProps } from '../../src/components/Tooltip/tooltip.types';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from '../stories/Button/index';
2
- export * from '../stories/Checkbox/index';
3
- export * from '../stories/Radio/index';
4
- export * from '../stories/Toggle/index';
5
- export * from '../stories/Tooltip/index';
1
+ export * from './components/Button';
2
+ export * from '../src/components/Checkbox';
3
+ export * from './components/Radio';
4
+ export * from './components/Toggle';
5
+ export * from './components/Tooltip';