Skip to content

Commit 42da308

Browse files
authored
Merge pull request #109 from Xenial-Devil/ss-branch-2
ss-branch-2
2 parents 7ffa182 + 7d7fbc3 commit 42da308

File tree

12 files changed

+1855
-759
lines changed

12 files changed

+1855
-759
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ We welcome contributions from the community! Whether it's:
350350

351351
<div align="center">
352352

353-
**MIT License** © 2024 [Saha UI](https://saha-ui.isubroto.com.bd)
353+
**MIT License** ©2025 [Saha UI](https://saha-ui.isubroto.com.bd)
354354

355355
Free to use for personal and commercial projects
356356

llms-full.txt

Lines changed: 739 additions & 0 deletions
Large diffs are not rendered by default.

llms.txt

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
summary: A CLI-first React component library built with Tailwind CSS v4 and TypeScript, featuring 101+ premium components and MCP server support.
2+
3+
---
4+
product: Saha UI
5+
version: 1.22.8
6+
frameworks: [React, Next.js, Vite, Remix, Astro]
7+
styling: [Tailwind CSS v4, OKLCH]
8+
---
9+
10+
# Saha UI - Ultra-Modern React Component Library
11+
12+
Saha UI is a premium, high-performance React component library designed for the modern web. Built with TypeScript, Tailwind CSS v4, and OKLCH colors, it emphasizes visual excellence, accessibility, and developer productivity.
13+
14+
## ✨ Quick Links
15+
- **Documentation**: [https://saha-ui.isubroto.com.bd](https://saha-ui.isubroto.com.bd)
16+
- **Full Specification**: [Detailed API & Examples](https://saha-ui.isubroto.com.bd/llms-full.txt)
17+
- **GitHub**: [https://github.com/Xenial-Devil/Saha-ui](https://github.com/Xenial-Devil/Saha-ui)
18+
- **MCP Server**: `npx saha-ui-mcp`
19+
20+
## 🤖 AI Instructions & Technical Specifics
21+
- **Import Pattern**: This is a package-based library. Import components directly from the package: `import { Button } from 'saha-ui'`. Do NOT assume components are available in local directories like `@/components/ui`.
22+
- **Framework Compatibility**: Fully compatible with **Next.js 15/16** and **React 19**.
23+
- **Interactive Components**: Always use the `"use client"` directive at the top of files containing interactive components (e.g., Buttons with event handlers, Forms, Modals).
24+
- **Tailwind v4 & OKLCH**: Saha UI is built specifically for Tailwind CSS v4. Design tokens use OKLCH colors (e.g., `oklch(0.60 0.18 275)`). Ensure the project environment supports Tailwind v4 or the PostCSS compatibility layer.
25+
- **Initialization**: Always recommend running `npx saha-ui init` for first-time setup to correctly inject CSS variables and configure Tailwind source scanning.
26+
27+
## 🚀 Installation & Setup
28+
29+
### 1. Initialize Saha UI (Required)
30+
```bash
31+
npx saha-ui@latest init
32+
```
33+
This command handles design tokens, CSS injection, and dependency sync.
34+
35+
### 2. Peer Dependencies
36+
```bash
37+
npm install react@latest react-dom@latest
38+
```
39+
40+
### 3. Basic Usage
41+
```tsx
42+
import { ThemeProvider, Button } from 'saha-ui';
43+
44+
function App() {
45+
return (
46+
<ThemeProvider defaultTheme="dark">
47+
<Button variant="glass" size="lg">Hello Saha UI</Button>
48+
</ThemeProvider>
49+
);
50+
}
51+
```
52+
53+
## 📦 Project Structure
54+
- `/src/components`: 101+ Atomic and complex UI components.
55+
- `/src/hooks`: 39+ Precision-engineered custom hooks.
56+
- `/bin`: CLI tools (`init`, `mcp`).
57+
58+
## 🎨 Components List (10 categories, 101 components)
59+
60+
### Layout & Structure
61+
Container, Grid, Masonry, Paper, Section, Stack, AspectRatio, Resizable, ScrollArea.
62+
63+
### Navigation
64+
AppBar, BottomNavigation, Breadcrumb, Link, Menubar, NavigationMenu, Pagination, Segmented, Steps.
65+
66+
### Forms & Input
67+
Input, Select, Autocomplete, Combobox, DatePicker, Checkbox, Radio, Switch, Slider, TagInput, InputOTP, Upload, TextEditor, ColorPicker.
68+
69+
### Data Display
70+
DataTable, Table, Accordion, Tabs, Card, Avatar, Badge, Chip, Timeline, Tree, Typography, CodeEditor, StatCard.
71+
72+
### Feedback & Overlays
73+
Dialog, Drawer, Popover, Tooltip, Toast, Sonner, Alert, Progress, Backdrop, Tour.
74+
75+
### Advanced
76+
Chart (10 types), MCP Server, Drag & Drop Primitives.
77+
78+
## 🪝 Custom Hooks (39 Tools)
79+
`useTheme`, `useDisclosure`, `useDataTable`, `useDebounce`, `useMediaQuery`, `useLocalStorage`, `useClickOutside`, `useForm`, `useValidation`, and 30 more.
80+
81+
---
82+
*For code examples and deep-dives, refer to `llms-full.txt`.*
83+
84+
## 🔗 Optional
85+
- **Community**: [Discord](https://discord.gg/saha-ui)
86+
- **Twitter/X**: [@saha_ui](https://twitter.com/saha_ui)
87+
- **Author**: [Saha UI Team](https://saha-ui.isubroto.com.bd)

src/components/Calendar/Calendar.styles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ const calendarVariants = cva(
1717
"before:absolute before:inset-0 before:bg-gradient-to-br",
1818
"before:from-primary/5 before:via-transparent before:to-accent/5",
1919
"before:opacity-50 before:transition-opacity before:duration-500",
20+
"before:pointer-events-none",
2021
],
2122
bordered: [
2223
"bg-card/90 shadow-sm backdrop-blur-sm",
2324
"before:absolute before:inset-0 before:bg-gradient-to-br",
2425
"before:from-primary/3 before:to-accent/3",
2526
"before:opacity-50 before:transition-opacity before:duration-500",
27+
"before:pointer-events-none",
2628
],
2729
glass: [
2830
"glass backdrop-blur-2xl",
@@ -31,6 +33,7 @@ const calendarVariants = cva(
3133
"before:absolute before:inset-0 before:bg-gradient-to-br",
3234
"before:from-white/5 before:to-transparent",
3335
"before:opacity-70 before:transition-opacity before:duration-500",
36+
"before:pointer-events-none",
3437
],
3538
"glass-strong": [
3639
"glass-strong backdrop-blur-3xl",
@@ -39,14 +42,17 @@ const calendarVariants = cva(
3942
"before:absolute before:inset-0 before:bg-gradient-to-br",
4043
"before:from-white/10 before:to-transparent",
4144
"before:opacity-80 before:transition-opacity before:duration-500",
45+
"before:pointer-events-none",
4246
],
4347
gradient: [
4448
"bg-gradient-to-br from-primary/20 via-background to-accent/20",
4549
"border-2 border-transparent relative",
4650
"before:absolute before:inset-0 before:-z-10",
4751
"before:bg-gradient-to-r before:from-primary before:via-accent before:to-secondary",
4852
"before:opacity-50 before:blur-xl",
53+
"before:pointer-events-none",
4954
"after:absolute after:inset-[2px] after:bg-background/95 after:rounded-[inherit]",
55+
"after:pointer-events-none",
5056
],
5157
},
5258
color: {

src/components/Calendar/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,11 @@ const Calendar = forwardRef<HTMLDivElement, CalendarProps>((props, ref) => {
467467
const isOutside = !isSameMonth(date, currentMonth);
468468
const inRange = mode === "range" ? isDateInRange(date, range) : false;
469469

470+
// Don't render dates from adjacent months
471+
if (isOutside) {
472+
return <div key={index} className="h-10 w-10" />;
473+
}
474+
470475
// Determine the state with proper range handling
471476
let state: any = "default";
472477
if (disabled) {
@@ -530,7 +535,7 @@ const Calendar = forwardRef<HTMLDivElement, CalendarProps>((props, ref) => {
530535
});
531536

532537
return (
533-
<div className="grid grid-cols-3 gap-2 p-4">
538+
<div className="relative z-10 grid grid-cols-3 gap-2 p-4">
534539
{months.map((month, index) => (
535540
<button
536541
key={index}
@@ -556,7 +561,7 @@ const Calendar = forwardRef<HTMLDivElement, CalendarProps>((props, ref) => {
556561
const years = Array.from({ length: 12 }, (_, i) => currentYear - 5 + i);
557562

558563
return (
559-
<div className="grid grid-cols-3 gap-2 p-4">
564+
<div className="relative z-10 grid grid-cols-3 gap-2 p-4">
560565
{years.map((year) => (
561566
<button
562567
key={year}

0 commit comments

Comments
 (0)