pala-ui-core 0.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/README.md ADDED
@@ -0,0 +1,164 @@
1
+ # pala-ui-core
2
+
3
+ **PalaUI** is a warm, mobile-first React component library built for platforms connecting businesses with on-the-go workers in informal job markets.
4
+
5
+ Every component ships with the signature asymmetric pill radius and a soft, approachable color palette — making job seeking feel human again.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install pala-ui-core lucide-react
11
+ ```
12
+
13
+ ## Setup
14
+
15
+ ### 1. Tailwind CSS v4 configuration
16
+
17
+ PalaUI requires **Tailwind CSS v4** (the components use Tailwind utility classes).
18
+
19
+ ```css
20
+ /* app.css */
21
+ @import "tailwindcss";
22
+ @import "pala-ui-core/tokens.css";
23
+ ```
24
+
25
+ ### 2. Load the fonts
26
+
27
+ Add Funnel Sans (headings) and Inter (body) to your project:
28
+
29
+ ```html
30
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
31
+ <link href="https://fonts.googleapis.com/css2?family=Funnel+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
32
+ ```
33
+
34
+ ### 3. (Optional) Plain CSS fallback
35
+
36
+ If you're not using Tailwind v4, import the fallback stylesheet with raw CSS variables and animations:
37
+
38
+ ```css
39
+ @import "pala-ui-core/styles.css";
40
+ ```
41
+
42
+ This provides `:root` variable defaults and utility animations, but you'll need to write your own utility classes since the components rely on Tailwind classes.
43
+
44
+ ## Usage
45
+
46
+ ```tsx
47
+ import { ButtonPrimary, Alert } from "pala-ui-core";
48
+
49
+ function MyPage() {
50
+ return (
51
+ <div>
52
+ <Alert type="success" message="Job posted successfully!" />
53
+ <ButtonPrimary onClick={() => {}} />
54
+ </div>
55
+ );
56
+ }
57
+ ```
58
+
59
+ ## Button Variants
60
+
61
+ | Component | Purpose |
62
+ |-----------|---------|
63
+ | `ButtonPrimary` | Main call-to-action |
64
+ | `ButtonSecondary` | Alternative action |
65
+ | `ButtonAccent` | High-emphasis CTA |
66
+ | `ButtonSuccess` | Positive outcome |
67
+ | `ButtonDestructive` | Irreversible action |
68
+ | `ButtonWarning` | Non-blocking caution |
69
+ | `ButtonOutline` | Secondary with border |
70
+ | `ButtonGhost` | Minimal, no fill |
71
+ | `ButtonLink` | Text-only link |
72
+ | `ButtonWithIconLeft` | Primary + leading icon |
73
+ | `ButtonWithIconRight` | Primary + trailing icon |
74
+ | `ButtonBlock` | Full-width primary |
75
+ | `ButtonSplit` | Primary + dropdown caret |
76
+ | `ButtonIcon` | Icon-only square |
77
+ | `ButtonLoading` | Disabled with spinner |
78
+ | `ButtonSmall` / `ButtonLarge` | Size variants |
79
+ | `ButtonGroup` | Segmented control |
80
+
81
+ ## Form Elements
82
+
83
+ | Component | Purpose |
84
+ |-----------|---------|
85
+ | `InputField` | Text input |
86
+ | `TextareaField` | Multi-line input |
87
+ | `ToggleSwitch` | ON/OFF toggle |
88
+ | `RadioGroup` | Single-select |
89
+ | `CheckboxInput` | Multi-select |
90
+ | `DropdownMenu` | Dropdown selection |
91
+ | `FileUpload` | File picker trigger |
92
+ | `DatePickerTrigger` | Date picker trigger |
93
+
94
+ ## Feedback Components
95
+
96
+ | Component | Purpose |
97
+ |-----------|---------|
98
+ | `Alert` | Banner with type variant |
99
+ | `ToastSuccess` | Success notification |
100
+ | `SnackbarDefault` / `SnackbarAction` | Bottom snackbars |
101
+ | `ModalDialog` | Confirmation/result modal |
102
+ | `LoaderSpinner` / `LoaderDots` | Loading indicators |
103
+ | `SkeletonBlock` | Content skeleton |
104
+
105
+ ## Navigation
106
+
107
+ | Component | Purpose |
108
+ |-----------|---------|
109
+ | `SidebarNav` | Vertical sidebar |
110
+ | `TabBar` | Horizontal tabs |
111
+ | `Breadcrumbs` | Page hierarchy |
112
+ | `Pagination` | Page navigation |
113
+ | `NavItem` / `NavItemActive` | Individual nav items |
114
+
115
+ ## Data Display & Cards
116
+
117
+ | Component | Purpose |
118
+ |-----------|---------|
119
+ | `StatCard` | Metric display |
120
+ | `Avatar` | User avatar |
121
+ | `ProgressBar` | Progress indicator |
122
+ | `Badge/*` | Status badges |
123
+ | `Tooltip/*` | Hover tooltips |
124
+ | `Accordion` | Expandable sections |
125
+
126
+ ## Recruiting Components
127
+
128
+ | Component | Purpose |
129
+ |-----------|---------|
130
+ | `CandidateCard` | Candidate profile card |
131
+ | `JobCard` | Job listing card |
132
+ | `SkillsChips` | Skill tags |
133
+ | `Rating` | Star rating |
134
+ | `AppTracker` | Application stages |
135
+ | `InterviewCard` | Interview details |
136
+ | `EmptyState` | Empty state placeholder |
137
+
138
+ ## Theming
139
+
140
+ PalaUI uses CSS custom properties for all colors. Override any token at `:root`:
141
+
142
+ ```css
143
+ :root {
144
+ --palaui-primary: #6C63FF;
145
+ --palaui-accent: #FF6B6B;
146
+ }
147
+ ```
148
+
149
+ For runtime theme switching (light/dark palettes), use the palette system:
150
+
151
+ ```tsx
152
+ import { palettes, defaultPaletteId } from "pala-ui-core";
153
+
154
+ // palettes contains 9 pre-built themes:
155
+ // - Ocean, Sunset, Forest, Lavender, Coral, Slate (light)
156
+ // - Midnight, Obsidian, Void (dark)
157
+
158
+ const ocean = palettes.find(p => p.id === "ocean")!;
159
+ // Apply tokens: iterate over ocean.tokens and set --palaui-* CSS vars
160
+ ```
161
+
162
+ ## License
163
+
164
+ MIT