noorui-rtl 0.2.0 โ†’ 0.2.2

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.
@@ -1,5 +1,5 @@
1
1
  // Noor UI - Main entry point
2
- // https://noorui.ositaka.com
2
+ // https://noorui.com
3
3
 
4
4
  // UI Components
5
5
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './ui/accordion'
@@ -188,6 +188,11 @@ export { WorkflowNode } from './ui/workflow-node'
188
188
  export { workflowNodeTypes } from './ui/workflow-nodes'
189
189
  export { ZakatCalculator } from './ui/zakat-calculator'
190
190
 
191
+ // Providers
192
+ export { DirectionProvider, useDirection } from './providers/direction-provider'
193
+ export { DesignSystemProvider } from './providers/design-system-provider'
194
+ export { ThemeProvider } from './providers/theme-provider'
195
+
191
196
  // Utility exports
192
197
  export { cn } from '../lib/utils'
193
198
 
package/package.json CHANGED
@@ -1,20 +1,17 @@
1
1
  {
2
2
  "name": "noorui-rtl",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Noor UI - Beautiful RTL-first React components for bilingual applications",
5
5
  "author": {
6
6
  "name": "Nuno Marques",
7
7
  "url": "https://ositaka.com",
8
8
  "email": "info@ositaka.com"
9
9
  },
10
- "homepage": "https://noorui.ositaka.com",
10
+ "homepage": "https://ositaka.com",
11
11
  "repository": {
12
12
  "type": "git",
13
13
  "url": "https://github.com/ositaka/noor-ui"
14
14
  },
15
- "bugs": {
16
- "url": "https://github.com/ositaka/noor-ui/issues"
17
- },
18
15
  "keywords": [
19
16
  "react",
20
17
  "components",
@@ -26,9 +23,7 @@
26
23
  "gcc",
27
24
  "nextjs",
28
25
  "tailwindcss",
29
- "typescript",
30
- "radix-ui",
31
- "shadcn"
26
+ "typescript"
32
27
  ],
33
28
  "license": "MIT",
34
29
  "main": "./components/index.ts",
package/CHANGELOG.md DELETED
@@ -1,85 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to Noor UI will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [0.2.0] - 2025-11-20
9
-
10
- ### Added
11
-
12
- Major update to Noor UI with significant component additions and improvements.
13
-
14
- **Core Components (54)**
15
- - Form components: Form, Button, Input, Label, Textarea, Checkbox, Radio Group, Select, Switch, Slider
16
- - Layout components: Card, Separator, Tabs, Accordion, Collapsible
17
- - Navigation: Breadcrumb, Pagination, Command
18
- - Feedback: Alert, Toast, Progress, Skeleton, Badge, Avatar
19
- - Overlays: Dialog, Sheet, Popover, Tooltip, Dropdown Menu, Context Menu
20
- - Data display: Table, DataTable, StatsCard, FeatureCard, EmptyState, ListingCard
21
- - Advanced forms: File Upload, Rich Text Editor, Date Picker, Time Picker, Number Input
22
- - Layout shells: Dashboard Shell
23
- - User interface: User Menu, Notification Center, Stepper
24
-
25
- **GCC-Specific Components (5)**
26
- - Prayer Times with countdown and Adhan notifications
27
- - Hijri Date with dual calendar display
28
- - Arabic Number utilities for Arabic-Indic numerals
29
- - Zakat Calculator with export/sharing
30
- - Calendar with Gregorian/Hijri support
31
-
32
- **AI/LLM Components (10)** ๐Ÿงช Experimental
33
- - ChatMessage, StreamingText, PromptInput, ThinkingIndicator
34
- - MessageActions, ModelSelector, ParameterSlider, TokenCounter
35
- - ConversationHistory, WorkflowCanvas
36
-
37
- **Features**
38
- - Complete RTL support with logical properties
39
- - 64 production-ready and experimental components
40
- - Full TypeScript support with type definitions
41
- - Radix UI primitives for accessibility
42
- - Tailwind CSS with design tokens
43
- - Light/dark mode support
44
- - Bilingual content (English/Arabic)
45
- - WCAG AA compliant
46
-
47
- ### Changed
48
- - Updated package structure to include all 64 components
49
- - Improved TypeScript types and exports
50
- - Enhanced documentation
51
-
52
- ### Notes
53
- This release includes 10 new experimental AI/LLM components. These are functional but APIs may evolve based on feedback.
54
-
55
- ---
56
-
57
- ## [0.1.2] - 2025-11-14
58
-
59
- ### Added
60
-
61
- Initial release of Noor UI - RTL-first React component library with core components.
62
-
63
- ---
64
-
65
- ## Format
66
-
67
- ### [Version] - YYYY-MM-DD
68
-
69
- #### Added
70
- - New features or components
71
-
72
- #### Changed
73
- - Changes in existing functionality
74
-
75
- #### Deprecated
76
- - Features that will be removed in upcoming releases
77
-
78
- #### Removed
79
- - Features that were removed
80
-
81
- #### Fixed
82
- - Bug fixes
83
-
84
- #### Security
85
- - Security fixes or improvements
package/CONTRIBUTING.md DELETED
@@ -1,313 +0,0 @@
1
- # Contributing to Noor UI
2
-
3
- Thank you for considering contributing to Noor UI! This document outlines how you can help improve this RTL-first component library.
4
-
5
- ## Table of Contents
6
-
7
- - [Code of Conduct](#code-of-conduct)
8
- - [How Can I Contribute?](#how-can-i-contribute)
9
- - [Development Setup](#development-setup)
10
- - [Component Guidelines](#component-guidelines)
11
- - [RTL Guidelines](#rtl-guidelines)
12
- - [Submitting Changes](#submitting-changes)
13
- - [Style Guide](#style-guide)
14
-
15
- ## Code of Conduct
16
-
17
- This project adheres to a code of conduct that all contributors are expected to follow:
18
-
19
- - Be respectful and inclusive
20
- - Welcome newcomers and help them get started
21
- - Focus on what is best for the community
22
- - Show empathy towards other community members
23
-
24
- ## How Can I Contribute?
25
-
26
- ### Reporting Bugs
27
-
28
- Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
29
-
30
- - **Clear title and description**
31
- - **Steps to reproduce** the issue
32
- - **Expected behavior** vs actual behavior
33
- - **Screenshots or code samples** if applicable
34
- - **Environment details** (OS, browser, Node version)
35
-
36
- ### Suggesting Enhancements
37
-
38
- Enhancement suggestions are welcome! Please provide:
39
-
40
- - **Clear use case** for the feature
41
- - **Proposed API or implementation** if possible
42
- - **Examples** from other libraries (if relevant)
43
- - **RTL considerations** for the feature
44
-
45
- ### Contributing Code
46
-
47
- 1. **Fork the repository** and create a branch from `main`
48
- 2. **Make your changes** following the style guide
49
- 3. **Add tests** for new functionality
50
- 4. **Update documentation** as needed
51
- 5. **Ensure all tests pass** and there are no linting errors
52
- 6. **Submit a pull request** with a clear description
53
-
54
- ## Development Setup
55
-
56
- ### Prerequisites
57
-
58
- - Node.js 20+
59
- - npm or yarn
60
- - Git
61
-
62
- ### Installation
63
-
64
- ```bash
65
- # Clone your fork
66
- git clone https://github.com/YOUR_USERNAME/noor-ui.git
67
- cd noor-ui
68
-
69
- # Install dependencies
70
- npm install
71
-
72
- # Start development server
73
- npm run dev
74
- ```
75
-
76
- ### Available Scripts
77
-
78
- - `npm run dev` - Start development server (documentation site)
79
- - `npm run build` - Build for production (includes checks)
80
- - `npm run build:skip-checks` - Build without running checks
81
- - `npm run lint` - Run ESLint
82
- - `npm run type-check` - Run TypeScript type checking
83
- - `npm run check:translations` - Verify translation completeness
84
- - `npm run check:links` - Check for broken links
85
- - `npm run check:all` - Run all checks
86
- - `npm test` - Run tests
87
- - `npm run test:watch` - Run tests in watch mode
88
- - `npm run test:coverage` - Generate coverage report
89
-
90
- ## Component Guidelines
91
-
92
- ### Component Structure
93
-
94
- Each component should:
95
-
96
- 1. **Use TypeScript** with proper type definitions
97
- 2. **Export interface** for props
98
- 3. **Use forwardRef** for ref forwarding
99
- 4. **Include displayName** for debugging
100
- 5. **Support className** for customization
101
- 6. **Use Radix UI** primitives when applicable
102
-
103
- ```tsx
104
- import * as React from 'react'
105
- import { cn } from '@/lib/utils'
106
-
107
- export interface ComponentProps
108
- extends React.HTMLAttributes<HTMLDivElement> {
109
- variant?: 'default' | 'special'
110
- // Other props
111
- }
112
-
113
- export const Component = React.forwardRef<
114
- HTMLDivElement,
115
- ComponentProps
116
- >(({ variant = 'default', className, ...props }, ref) => {
117
- return (
118
- <div
119
- ref={ref}
120
- className={cn(
121
- 'base-styles',
122
- variantStyles[variant],
123
- className
124
- )}
125
- {...props}
126
- />
127
- )
128
- })
129
-
130
- Component.displayName = 'Component'
131
- ```
132
-
133
- ### Accessibility Requirements
134
-
135
- All components must:
136
-
137
- - Use semantic HTML elements
138
- - Include proper ARIA labels and roles
139
- - Support keyboard navigation
140
- - Maintain focus management
141
- - Provide sufficient color contrast (WCAG AA)
142
- - Respect `prefers-reduced-motion`
143
-
144
- ### Testing
145
-
146
- Components should include:
147
-
148
- - Unit tests for core functionality
149
- - Accessibility tests (keyboard navigation, ARIA)
150
- - RTL/LTR rendering tests
151
- - Theme variation tests
152
-
153
- ## RTL Guidelines
154
-
155
- ### Critical Rules
156
-
157
- 1. **Use logical properties only**
158
- - `ms-*` not `ml-*` (margin-inline-start)
159
- - `me-*` not `mr-*` (margin-inline-end)
160
- - `ps-*` not `pl-*` (padding-inline-start)
161
- - `pe-*` not `pr-*` (padding-inline-end)
162
-
163
- 2. **No hardcoded directional values**
164
- - โŒ `left-0`, `right-4`, `float-left`
165
- - โœ… `start-0`, `end-4`, `float-start`
166
-
167
- 3. **Test in both directions**
168
- - Always verify components work in both LTR and RTL
169
- - Check icon positions and text alignment
170
- - Verify keyboard navigation (Tab order)
171
-
172
- 4. **Use direction context**
173
- ```tsx
174
- import { useDirection } from '@/components/providers/direction-provider'
175
-
176
- const { direction, locale } = useDirection()
177
- ```
178
-
179
- ### Common RTL Patterns
180
-
181
- **Icons with text:**
182
- ```tsx
183
- <Button>
184
- <Icon className="me-2 h-4 w-4" />
185
- Text
186
- </Button>
187
- ```
188
-
189
- **Flexbox alignment:**
190
- ```tsx
191
- <div className="flex items-center justify-start">
192
- {/* Content flows correctly in both directions */}
193
- </div>
194
- ```
195
-
196
- **Conditional rendering:**
197
- ```tsx
198
- const { direction } = useDirection()
199
- const ArrowIcon = direction === 'rtl' ? ArrowRight : ArrowLeft
200
- ```
201
-
202
- ## Submitting Changes
203
-
204
- ### Pull Request Process
205
-
206
- 1. **Update documentation** for any changed functionality
207
- 2. **Add tests** for new features or bug fixes
208
- 3. **Follow the style guide** (ESLint rules)
209
- 4. **Ensure all checks pass**:
210
- - `npm run type-check`
211
- - `npm run lint`
212
- - `npm run check:all`
213
- - `npm test`
214
- 5. **Write clear commit messages** (see below)
215
- 6. **Reference related issues** in PR description
216
-
217
- ### Commit Message Format
218
-
219
- Use conventional commits:
220
-
221
- ```
222
- type(scope): brief description
223
-
224
- Longer description if needed
225
-
226
- Fixes #123
227
- ```
228
-
229
- **Types:**
230
- - `feat`: New feature
231
- - `fix`: Bug fix
232
- - `docs`: Documentation changes
233
- - `style`: Code style changes (formatting)
234
- - `refactor`: Code refactoring
235
- - `test`: Test additions or changes
236
- - `chore`: Build process or tooling changes
237
-
238
- **Examples:**
239
- ```
240
- feat(button): add loading state with spinner
241
-
242
- fix(tabs): correct RTL keyboard navigation direction
243
-
244
- docs(readme): update installation instructions
245
-
246
- test(calendar): add Hijri date conversion tests
247
- ```
248
-
249
- ### Review Process
250
-
251
- 1. At least one maintainer must review the PR
252
- 2. All CI checks must pass
253
- 3. Documentation must be updated
254
- 4. Breaking changes require discussion
255
-
256
- ## Style Guide
257
-
258
- ### TypeScript
259
-
260
- - Use strict mode
261
- - Prefer interfaces over types for props
262
- - Export all public types
263
- - Avoid `any` - use `unknown` if needed
264
-
265
- ### React
266
-
267
- - Use functional components
268
- - Use hooks for state management
269
- - Prefer composition over inheritance
270
- - Extract complex logic into custom hooks
271
-
272
- ### CSS/Tailwind
273
-
274
- - Use Tailwind utility classes
275
- - Use `cn()` utility for conditional classes
276
- - Follow mobile-first approach
277
- - Use design tokens from theme
278
-
279
- ### File Naming
280
-
281
- - Components: `kebab-case.tsx`
282
- - Types: `kebab-case.ts`
283
- - Utilities: `kebab-case.ts`
284
- - Tests: `component.test.tsx`
285
-
286
- ### Code Organization
287
-
288
- ```
289
- components/
290
- ui/
291
- component-name.tsx # Component implementation
292
- docs/
293
- component-name-docs.tsx # Documentation component
294
- lib/
295
- utils.ts # Utility functions
296
- tokens.ts # Design tokens
297
- hooks/
298
- use-custom-hook.ts # Custom hooks
299
- ```
300
-
301
- ## Questions?
302
-
303
- - ๐Ÿ’ฌ Open an issue for questions
304
- - ๐Ÿ“ง Email: info@ositaka.com
305
- - ๐Ÿ› Report bugs via GitHub issues
306
-
307
- ## License
308
-
309
- By contributing, you agree that your contributions will be licensed under the MIT License.
310
-
311
- ---
312
-
313
- Thank you for contributing to Noor UI! ๐ŸŒŸ