@arolariu/components 1.0.0 → 1.1.0
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/CHANGELOG.md +57 -0
- package/EXAMPLES.md +2510 -0
- package/dist/components/ui/alert-dialog.d.ts +4 -16
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +18 -14
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +3 -12
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +18 -15
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/calendar.d.ts +1 -4
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +7 -7
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +125 -59
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox-group.d.ts +2 -6
- package/dist/components/ui/checkbox-group.d.ts.map +1 -1
- package/dist/components/ui/checkbox-group.js +8 -7
- package/dist/components/ui/checkbox-group.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +3 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +4 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/combobox.d.ts +335 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +206 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/combobox.module.js +23 -0
- package/dist/components/ui/combobox.module.js.map +1 -0
- package/dist/components/ui/combobox_module.css +142 -0
- package/dist/components/ui/combobox_module.css.map +1 -0
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +25 -16
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +10 -16
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +28 -20
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/item.d.ts.map +1 -1
- package/dist/components/ui/menubar.d.ts +11 -13
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/meter.d.ts +8 -24
- package/dist/components/ui/meter.d.ts.map +1 -1
- package/dist/components/ui/meter.js +23 -19
- package/dist/components/ui/meter.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +3 -12
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +14 -11
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/number-field.d.ts +6 -12
- package/dist/components/ui/number-field.d.ts.map +1 -1
- package/dist/components/ui/number-field.js.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -4
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +10 -9
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +2 -4
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +3 -3
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scratcher.d.ts +1 -1
- package/dist/components/ui/scratcher.d.ts.map +1 -1
- package/dist/components/ui/scratcher.js +5 -4
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +2 -4
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -4
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +9 -8
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +5 -4
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +7 -6
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +2 -8
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +12 -10
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toolbar.d.ts +10 -30
- package/dist/components/ui/toolbar.d.ts.map +1 -1
- package/dist/components/ui/toolbar.js +28 -23
- package/dist/components/ui/toolbar.js.map +1 -1
- package/dist/hooks/useClipboard.d.ts +77 -0
- package/dist/hooks/useClipboard.d.ts.map +1 -0
- package/dist/hooks/useClipboard.js +42 -0
- package/dist/hooks/useClipboard.js.map +1 -0
- package/dist/hooks/useControllableState.d.ts +54 -0
- package/dist/hooks/useControllableState.d.ts.map +1 -0
- package/dist/hooks/useControllableState.js +29 -0
- package/dist/hooks/useControllableState.js.map +1 -0
- package/dist/hooks/useDebounce.d.ts +33 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useDebounce.js +20 -0
- package/dist/hooks/useDebounce.js.map +1 -0
- package/dist/hooks/useEventCallback.d.ts +34 -0
- package/dist/hooks/useEventCallback.d.ts.map +1 -0
- package/dist/hooks/useEventCallback.js +12 -0
- package/dist/hooks/useEventCallback.js.map +1 -0
- package/dist/hooks/useId.d.ts +30 -0
- package/dist/hooks/useId.d.ts.map +1 -0
- package/dist/hooks/useId.js +9 -0
- package/dist/hooks/useId.js.map +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +51 -0
- package/dist/hooks/useIntersectionObserver.d.ts.map +1 -0
- package/dist/hooks/useIntersectionObserver.js +25 -0
- package/dist/hooks/useIntersectionObserver.js.map +1 -0
- package/dist/hooks/useInterval.d.ts +55 -0
- package/dist/hooks/useInterval.d.ts.map +1 -0
- package/dist/hooks/useInterval.js +24 -0
- package/dist/hooks/useInterval.js.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +43 -0
- package/dist/hooks/useLocalStorage.d.ts.map +1 -0
- package/dist/hooks/useLocalStorage.js +53 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useMergedRefs.d.ts +27 -0
- package/dist/hooks/useMergedRefs.d.ts.map +1 -0
- package/dist/hooks/useMergedRefs.js +11 -0
- package/dist/hooks/useMergedRefs.js.map +1 -0
- package/dist/hooks/useOnClickOutside.d.ts +32 -0
- package/dist/hooks/useOnClickOutside.d.ts.map +1 -0
- package/dist/hooks/useOnClickOutside.js +23 -0
- package/dist/hooks/useOnClickOutside.js.map +1 -0
- package/dist/hooks/usePrevious.d.ts +33 -0
- package/dist/hooks/usePrevious.d.ts.map +1 -0
- package/dist/hooks/usePrevious.js +14 -0
- package/dist/hooks/usePrevious.js.map +1 -0
- package/dist/hooks/useThrottle.d.ts +37 -0
- package/dist/hooks/useThrottle.d.ts.map +1 -0
- package/dist/hooks/useThrottle.js +34 -0
- package/dist/hooks/useThrottle.js.map +1 -0
- package/dist/hooks/useTimeout.d.ts +28 -0
- package/dist/hooks/useTimeout.d.ts.map +1 -0
- package/dist/hooks/useTimeout.js +24 -0
- package/dist/hooks/useTimeout.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/lib/utilities.d.ts +2 -3
- package/dist/lib/utilities.d.ts.map +1 -1
- package/dist/lib/utilities.js.map +1 -1
- package/dist/motion/tokens.js +5 -5
- package/dist/motion/tokens.js.map +1 -1
- package/dist/rslib-runtime.js +39 -0
- package/dist/rslib-runtime.js.map +1 -0
- package/package.json +82 -3
- package/src/components/ui/alert-dialog.tsx +15 -8
- package/src/components/ui/avatar.tsx +9 -6
- package/src/components/ui/calendar.tsx +7 -13
- package/src/components/ui/carousel.tsx +2 -0
- package/src/components/ui/chart.tsx +63 -60
- package/src/components/ui/checkbox-group.tsx +4 -5
- package/src/components/ui/checkbox.tsx +10 -2
- package/src/components/ui/collapsible.tsx +1 -0
- package/src/components/ui/combobox.module.css +158 -0
- package/src/components/ui/combobox.tsx +569 -0
- package/src/components/ui/command.tsx +31 -15
- package/src/components/ui/context-menu.tsx +3 -0
- package/src/components/ui/drawer.tsx +2 -0
- package/src/components/ui/dropdown-menu.tsx +3 -0
- package/src/components/ui/dropdrawer.tsx +80 -62
- package/src/components/ui/menubar.tsx +9 -10
- package/src/components/ui/meter.tsx +16 -17
- package/src/components/ui/navigation-menu.tsx +41 -33
- package/src/components/ui/number-field.tsx +6 -13
- package/src/components/ui/progress.tsx +3 -2
- package/src/components/ui/radio-group.tsx +2 -5
- package/src/components/ui/resizable.tsx +2 -2
- package/src/components/ui/scratcher.tsx +6 -10
- package/src/components/ui/scroll-area.tsx +2 -5
- package/src/components/ui/separator.tsx +4 -3
- package/src/components/ui/sheet.tsx +3 -0
- package/src/components/ui/sidebar.tsx +1 -0
- package/src/components/ui/sonner.tsx +20 -12
- package/src/components/ui/toggle-group.tsx +6 -4
- package/src/components/ui/toolbar.tsx +20 -21
- package/src/hooks/useClipboard.tsx +137 -0
- package/src/hooks/useControllableState.tsx +81 -0
- package/src/hooks/useDebounce.tsx +50 -0
- package/src/hooks/useEventCallback.tsx +47 -0
- package/src/hooks/useId.tsx +36 -0
- package/src/hooks/useIntersectionObserver.tsx +81 -0
- package/src/hooks/useInterval.tsx +80 -0
- package/src/hooks/useLocalStorage.tsx +111 -0
- package/src/hooks/useMergedRefs.tsx +48 -0
- package/src/hooks/useOnClickOutside.tsx +55 -0
- package/src/hooks/usePrevious.tsx +44 -0
- package/src/hooks/useThrottle.tsx +78 -0
- package/src/hooks/useTimeout.tsx +51 -0
- package/src/index.ts +23 -0
- package/src/lib/utilities.ts +4 -4
- package/src/motion/tokens.ts +4 -4
- package/src/stories/DesignPrinciples.mdx +48 -0
- package/src/stories/GettingStarted.mdx +92 -0
- package/src/stories/Welcome.mdx +44 -0
package/src/index.ts
CHANGED
|
@@ -149,6 +149,16 @@ export {Checkbox} from "./components/ui/checkbox";
|
|
|
149
149
|
|
|
150
150
|
export {Collapsible, CollapsibleContent, CollapsibleTrigger} from "./components/ui/collapsible";
|
|
151
151
|
|
|
152
|
+
export {
|
|
153
|
+
Combobox,
|
|
154
|
+
ComboboxContent,
|
|
155
|
+
ComboboxEmpty,
|
|
156
|
+
ComboboxGroup,
|
|
157
|
+
ComboboxItem,
|
|
158
|
+
ComboboxSeparator,
|
|
159
|
+
ComboboxTrigger,
|
|
160
|
+
} from "./components/ui/combobox";
|
|
161
|
+
|
|
152
162
|
export {
|
|
153
163
|
Command,
|
|
154
164
|
CommandDialog,
|
|
@@ -489,12 +499,25 @@ export {
|
|
|
489
499
|
export {VisuallyHidden, type VisuallyHiddenProps} from "./components/ui/visually-hidden";
|
|
490
500
|
|
|
491
501
|
export {useBreakpoint, type Breakpoint} from "./hooks/useBreakpoint";
|
|
502
|
+
export {useClipboard, type UseClipboardOptions, type UseClipboardReturn} from "./hooks/useClipboard";
|
|
492
503
|
export {useColorScheme, type ColorScheme} from "./hooks/useColorScheme";
|
|
504
|
+
export {useControllableState, type UseControllableStateOptions} from "./hooks/useControllableState";
|
|
505
|
+
export {useDebounce} from "./hooks/useDebounce";
|
|
506
|
+
export {useEventCallback} from "./hooks/useEventCallback";
|
|
493
507
|
export {useFocusVisible} from "./hooks/useFocusVisible";
|
|
508
|
+
export {useId} from "./hooks/useId";
|
|
509
|
+
export {useIntersectionObserver} from "./hooks/useIntersectionObserver";
|
|
510
|
+
export {useInterval} from "./hooks/useInterval";
|
|
494
511
|
export {useIsMobile} from "./hooks/useIsMobile";
|
|
512
|
+
export {useLocalStorage} from "./hooks/useLocalStorage";
|
|
495
513
|
export {useMediaQuery} from "./hooks/useMediaQuery";
|
|
514
|
+
export {useMergedRefs} from "./hooks/useMergedRefs";
|
|
515
|
+
export {useOnClickOutside} from "./hooks/useOnClickOutside";
|
|
496
516
|
export {usePrefersContrast} from "./hooks/usePrefersContrast";
|
|
517
|
+
export {usePrevious} from "./hooks/usePrevious";
|
|
497
518
|
export {useReducedMotion} from "./hooks/useReducedMotion";
|
|
519
|
+
export {useThrottle} from "./hooks/useThrottle";
|
|
520
|
+
export {useTimeout} from "./hooks/useTimeout";
|
|
498
521
|
export {useWindowSize} from "./hooks/useWindowSize";
|
|
499
522
|
|
|
500
523
|
export {
|
package/src/lib/utilities.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {clsx
|
|
1
|
+
import {clsx} from "clsx";
|
|
2
|
+
|
|
3
|
+
export type {ClassValue} from "clsx";
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* Helper function that merges CSS class names.
|
|
@@ -6,8 +8,6 @@ import {clsx, type ClassValue} from "clsx";
|
|
|
6
8
|
* @param inputs Array of class names
|
|
7
9
|
* @returns Merged class names string
|
|
8
10
|
*/
|
|
9
|
-
export function cn(...inputs: ReadonlyArray<ClassValue>): string {
|
|
11
|
+
export function cn(...inputs: ReadonlyArray<import("clsx").ClassValue>): string {
|
|
10
12
|
return clsx(inputs);
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
export type {ClassValue};
|
package/src/motion/tokens.ts
CHANGED
|
@@ -19,10 +19,10 @@ export const durations = {
|
|
|
19
19
|
* Standard easing curves for consistent motion across the library.
|
|
20
20
|
*/
|
|
21
21
|
export const easings = {
|
|
22
|
-
ease: [0.25, 0.1, 0.25, 1
|
|
23
|
-
easeIn: [0.42, 0, 1
|
|
24
|
-
easeOut: [0, 0, 0.58, 1
|
|
25
|
-
easeInOut: [0.42, 0, 0.58, 1
|
|
22
|
+
ease: [0.25, 0.1, 0.25, 1],
|
|
23
|
+
easeIn: [0.42, 0, 1, 1],
|
|
24
|
+
easeOut: [0, 0, 0.58, 1],
|
|
25
|
+
easeInOut: [0.42, 0, 0.58, 1],
|
|
26
26
|
spring: {type: "spring" as const, stiffness: 300, damping: 24},
|
|
27
27
|
} as const;
|
|
28
28
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{/* @meta title: Introduction/Design Principles */}
|
|
2
|
+
|
|
3
|
+
# Design Principles
|
|
4
|
+
|
|
5
|
+
## 🎯 Accessibility First
|
|
6
|
+
|
|
7
|
+
Every component is built on **Base UI** primitives, ensuring:
|
|
8
|
+
- Correct ARIA attributes and roles
|
|
9
|
+
- Keyboard navigation support
|
|
10
|
+
- Screen reader compatibility
|
|
11
|
+
- Focus management
|
|
12
|
+
- Color contrast compliance (WCAG 2.1 AA)
|
|
13
|
+
|
|
14
|
+
## 🎨 Design Tokens
|
|
15
|
+
|
|
16
|
+
We use **OKLCH** color space for perceptually uniform colors:
|
|
17
|
+
- Colors stay visually consistent across light and dark themes
|
|
18
|
+
- Tokens are CSS custom properties (`--ac-*` prefix)
|
|
19
|
+
- Override any token to create custom themes
|
|
20
|
+
|
|
21
|
+
## 🧩 Composition Over Configuration
|
|
22
|
+
|
|
23
|
+
Components follow the **compound component** pattern:
|
|
24
|
+
```tsx
|
|
25
|
+
<Card>
|
|
26
|
+
<CardHeader>
|
|
27
|
+
<CardTitle>Title</CardTitle>
|
|
28
|
+
</CardHeader>
|
|
29
|
+
<CardContent>Content</CardContent>
|
|
30
|
+
<CardFooter>Footer</CardFooter>
|
|
31
|
+
</Card>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 🔧 Progressive Enhancement
|
|
35
|
+
|
|
36
|
+
- Server Components by default
|
|
37
|
+
- `"use client"` only when hooks/interactivity needed
|
|
38
|
+
- CSS Modules for scoped, predictable styles
|
|
39
|
+
- No runtime CSS-in-JS overhead
|
|
40
|
+
|
|
41
|
+
## 📐 Consistent API
|
|
42
|
+
|
|
43
|
+
Every component follows these conventions:
|
|
44
|
+
- `className` prop for custom styling
|
|
45
|
+
- `forwardRef` for DOM access
|
|
46
|
+
- `displayName` for debugging
|
|
47
|
+
- JSDoc for API documentation
|
|
48
|
+
- Co-located tests and stories
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{/* @meta title: Introduction/Getting Started */}
|
|
2
|
+
|
|
3
|
+
# Getting Started
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the package and its peer dependencies:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @arolariu/components @base-ui/react motion react react-dom
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Setup
|
|
14
|
+
|
|
15
|
+
### 1. Import Styles
|
|
16
|
+
|
|
17
|
+
Add the required CSS import to your app entry point:
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
// app/layout.tsx or main.tsx
|
|
21
|
+
import "@arolariu/components/styles";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 2. Use Components
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import {Button, Card, CardContent, CardHeader, CardTitle} from "@arolariu/components";
|
|
28
|
+
|
|
29
|
+
export function MyCard() {
|
|
30
|
+
return (
|
|
31
|
+
<Card>
|
|
32
|
+
<CardHeader>
|
|
33
|
+
<CardTitle>Hello World</CardTitle>
|
|
34
|
+
</CardHeader>
|
|
35
|
+
<CardContent>
|
|
36
|
+
<p>Your first component!</p>
|
|
37
|
+
<Button>Click me</Button>
|
|
38
|
+
</CardContent>
|
|
39
|
+
</Card>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 3. Dark Mode
|
|
45
|
+
|
|
46
|
+
Add `data-theme="dark"` to your root element:
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
<html data-theme="dark">
|
|
50
|
+
<body>{children}</body>
|
|
51
|
+
</html>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Or toggle with JavaScript:
|
|
55
|
+
```tsx
|
|
56
|
+
document.documentElement.setAttribute("data-theme", "dark");
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 4. Tree-Shaking
|
|
60
|
+
|
|
61
|
+
Import individual components for smaller bundles:
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
// ✅ Import from subpath (tree-shakeable)
|
|
65
|
+
import {Button} from "@arolariu/components/button";
|
|
66
|
+
import {useMediaQuery} from "@arolariu/components/useMediaQuery";
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## TypeScript
|
|
70
|
+
|
|
71
|
+
All components are fully typed. Use `Readonly<Props>` for component props:
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import type {ButtonProps} from "@arolariu/components";
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Next.js Integration
|
|
78
|
+
|
|
79
|
+
The library works with Next.js App Router. Server Components can import components — client-only ones have `"use client"` directives.
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
// app/page.tsx (Server Component)
|
|
83
|
+
import {Card, CardContent} from "@arolariu/components";
|
|
84
|
+
|
|
85
|
+
export default function Page() {
|
|
86
|
+
return (
|
|
87
|
+
<Card>
|
|
88
|
+
<CardContent>Server-rendered!</CardContent>
|
|
89
|
+
</Card>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{/* @meta title: Introduction/Welcome */}
|
|
2
|
+
|
|
3
|
+
# 👋 Welcome to @arolariu/components
|
|
4
|
+
|
|
5
|
+
A modern, accessible React component library built on **Base UI** primitives with **CSS Modules** and **OKLCH** design tokens.
|
|
6
|
+
|
|
7
|
+
## ✨ Highlights
|
|
8
|
+
|
|
9
|
+
- **84+ components** — From buttons to data tables, charts to animated backgrounds
|
|
10
|
+
- **23 hooks** — Utility hooks for state, media queries, clipboard, local storage
|
|
11
|
+
- **Base UI foundation** — Accessible, composable, lightweight
|
|
12
|
+
- **CSS Modules** — Scoped styles, zero Tailwind dependency
|
|
13
|
+
- **OKLCH color space** — Perceptually uniform, modern color tokens
|
|
14
|
+
- **95%+ test coverage** — 1300+ tests across all components
|
|
15
|
+
- **TypeScript strict** — Full type safety, no `any` types
|
|
16
|
+
- **Dark mode** — Built-in light/dark theme support via CSS variables
|
|
17
|
+
- **Motion system** — Animation tokens, presets, and utilities
|
|
18
|
+
|
|
19
|
+
## 🚀 Quick Start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @arolariu/components @base-ui/react motion
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import "@arolariu/components/styles";
|
|
27
|
+
import {Button} from "@arolariu/components";
|
|
28
|
+
|
|
29
|
+
function App() {
|
|
30
|
+
return <Button variant="default">Click me</Button>;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 📚 Explore
|
|
35
|
+
|
|
36
|
+
- **[Design Tokens](?path=/docs/foundations-design-tokens--docs)** — Colors, spacing, typography, radius
|
|
37
|
+
- **[Components](?path=/docs/components-actions-button--docs)** — Interactive UI building blocks
|
|
38
|
+
- **[Hooks](?path=/docs/components-actions-button--docs)** — Utility hooks for common patterns
|
|
39
|
+
|
|
40
|
+
## 🔗 Links
|
|
41
|
+
|
|
42
|
+
- [GitHub Repository](https://github.com/arolariu/arolariu.ro)
|
|
43
|
+
- [npm Package](https://www.npmjs.com/package/@arolariu/components)
|
|
44
|
+
- [arolariu.ro](https://arolariu.ro)
|