@billy_mcdowell/prmn-angular-v3 0.0.1 → 0.0.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.
Files changed (2) hide show
  1. package/README.md +248 -8
  2. package/package.json +14 -3
package/README.md CHANGED
@@ -8,14 +8,254 @@ Reusable, themeable UI primitives for Angular, built on top of `@spartan-ng/brai
8
8
 
9
9
  ## Package name
10
10
 
11
- The library is published from the `projects/ui` workspace library.
12
- In the examples below, we assume the npm package name is `ui`:
11
+ The library is published from the `projects/ui` workspace library as the scoped package `@billy_mcdowell/prmn-angular-v3`:
13
12
 
14
13
  ```bash
15
- npm install ui
14
+ npm install @billy_mcdowell/prmn-angular-v3
16
15
  ```
17
16
 
18
- If you publish under a different name (for example `@your-org/ui`), adjust the import paths accordingly.
17
+ All import examples below assume this package name.
18
+
19
+ ---
20
+
21
+ ## Prerequisites
22
+
23
+ - **Angular**: `^20.3.0` (standalone components recommended). Your app should already be an Angular CLI app with `@angular/core` / `@angular/common` installed.
24
+ - **Node / package manager**: Node 18+ with npm, pnpm, or yarn.
25
+ - **CSS tooling** (installed in your app, typically as devDependencies):
26
+ - `tailwindcss@^4`
27
+ - `@tailwindcss/postcss`
28
+ - **UI peer dependencies used by this library** (must be installed in your app):
29
+ - `@spartan-ng/brain`
30
+ - `@ng-icons/core`, `@ng-icons/lucide` (for icons)
31
+ - `embla-carousel-angular` (for carousel components)
32
+ - `ngx-sonner` (for toast notifications)
33
+
34
+ You may not need all of these for every project, but they are used across components exported by this library and are declared as `peerDependencies` of `@billy_mcdowell/prmn-angular-v3`.
35
+
36
+ ---
37
+
38
+ ## 1. Install the library and peer dependencies
39
+
40
+ From your Angular application:
41
+
42
+ ```bash
43
+ npm install @billy_mcdowell/prmn-angular-v3 @spartan-ng/brain @ng-icons/core @ng-icons/lucide embla-carousel-angular ngx-sonner tailwindcss @tailwindcss/postcss
44
+ ```
45
+
46
+ If you are using pnpm or yarn, use the equivalent command.
47
+
48
+ ---
49
+
50
+ ## 2. Configure Tailwind CSS 4 + PostCSS
51
+
52
+ Create (or update) `postcss.config.json` in the root of your Angular app:
53
+
54
+ ```json
55
+ {
56
+ "plugins": {
57
+ "@tailwindcss/postcss": {}
58
+ }
59
+ }
60
+ ```
61
+
62
+ Tailwind 4 uses this PostCSS plugin to process the special `@import "tailwindcss";` directive that the library’s styles rely on.
63
+
64
+ ---
65
+
66
+ ## 3. Import the styles in your global stylesheet
67
+
68
+ In your app’s global stylesheet (for example `src/styles.css`), add the following:
69
+
70
+ ```css
71
+ @import "tailwindcss";
72
+ @import "@spartan-ng/brain/hlm-tailwind-preset.css";
73
+
74
+ /* Theme tokens & base styles matching this UI library.
75
+ You can start with these values and tweak colors/typography as needed. */
76
+ :root {
77
+ --background: #ffffff;
78
+ --foreground: #1d2327;
79
+ --card: #ffffff;
80
+ --card-foreground: #1d2327;
81
+ --popover: #ffffff;
82
+ --popover-foreground: #1d2327;
83
+ --primary: #21016b;
84
+ --primary-foreground: #ffffff;
85
+ --secondary: #4e5a62;
86
+ --secondary-foreground: #ffffff;
87
+ --muted: #f3f5f6;
88
+ --muted-foreground: #5f6c75;
89
+ --accent: #f78e1e;
90
+ --accent-foreground: #121516;
91
+ --destructive: #cb2420;
92
+ --destructive-foreground: #ffffff;
93
+ --border: #b8c0c6;
94
+ --input: #b8c0c6;
95
+ --ring: #5f6c75;
96
+ --sidebar: #f3f5f6;
97
+ --sidebar-foreground: #1d2327;
98
+ --sidebar-primary: #21016b;
99
+ --sidebar-primary-foreground: #ffffff;
100
+ --sidebar-accent: #f78e1e;
101
+ --sidebar-accent-foreground: #121516;
102
+ --sidebar-border: #b8c0c6;
103
+ --sidebar-ring: #5f6c75;
104
+ --font-sans: Libre Franklin, ui-sans-serif, sans-serif, system-ui;
105
+ --font-serif: Merriweather, ui-serif, serif;
106
+ --font-mono: Open Sans, ui-sans-serif, sans-serif, system-ui;
107
+ --radius: 0.125rem;
108
+ }
109
+
110
+ .dark {
111
+ --background: #1d2327;
112
+ --foreground: #ffffff;
113
+ --card: #1d2327;
114
+ --card-foreground: #ffffff;
115
+ --popover: #1d2327;
116
+ --popover-foreground: #ffffff;
117
+ --primary: #21016b;
118
+ --primary-foreground: #ffffff;
119
+ --secondary: #4e5a62;
120
+ --secondary-foreground: #ffffff;
121
+ --muted: #424d55;
122
+ --muted-foreground: #5f6c75;
123
+ --accent: #f78e1e;
124
+ --accent-foreground: #121516;
125
+ --destructive: #cb2420;
126
+ --destructive-foreground: #ffffff;
127
+ --border: #5f6c75;
128
+ --input: #424d55;
129
+ --ring: #5f6c75;
130
+ --sidebar: #1d2327;
131
+ --sidebar-foreground: #ffffff;
132
+ --sidebar-primary: #21016b;
133
+ --sidebar-primary-foreground: #ffffff;
134
+ --sidebar-accent: #f78e1e;
135
+ --sidebar-accent-foreground: #121516;
136
+ --sidebar-border: #5f6c75;
137
+ --sidebar-ring: #5f6c75;
138
+ }
139
+
140
+ @layer base {
141
+ * {
142
+ @apply border-border outline-ring/50;
143
+ }
144
+ body {
145
+ @apply bg-background text-foreground;
146
+ }
147
+ }
148
+ ```
149
+
150
+ Notes:
151
+
152
+ - The color/spacing/font variables above are the same design tokens used by this library (you can customize them as needed).
153
+ - Ensure your `index.html` (or root layout) toggles a `.dark` class on the `<html>` or `<body>` element if you want dark mode.
154
+
155
+ ---
156
+
157
+ ## 4. Import and use components
158
+
159
+ All public components/directives are exported from the library’s public API (`src/public-api.ts`), which is what consumers import from the npm package.
160
+
161
+ ### Example: Button
162
+
163
+ ```ts
164
+ // app/example/example.component.ts
165
+ import { Component } from '@angular/core';
166
+ import { HlmButton } from '@billy_mcdowell/prmn-angular-v3';
167
+
168
+ @Component({
169
+ standalone: true,
170
+ selector: 'app-example',
171
+ imports: [HlmButton],
172
+ template: `
173
+ <button hlmBtn variant="default">
174
+ Primary button
175
+ </button>
176
+ `,
177
+ })
178
+ export class ExampleComponent {}
179
+ ```
180
+
181
+ You can also use the convenience import group where available (for example, `HlmButtonImports`):
182
+
183
+ ```ts
184
+ import { HlmButtonImports } from '@billy_mcdowell/prmn-angular-v3';
185
+
186
+ @Component({
187
+ standalone: true,
188
+ selector: 'app-example',
189
+ imports: [...HlmButtonImports],
190
+ template: `<button hlmBtn>Click me</button>`,
191
+ })
192
+ export class ExampleComponent {}
193
+ ```
194
+
195
+ ### Other components
196
+
197
+ The library exposes many primitives, for example:
198
+
199
+ - Accordion, Alert, Dialog, Dropdown Menu
200
+ - Button, Badge, Avatar, Breadcrumb
201
+ - Form elements (`Input`, `Textarea`, `Checkbox`, `RadioGroup`, `Switch`, `Select`, `NativeSelect`, etc.)
202
+ - Layout and navigation (`Sidebar`, `NavigationMenu`, `Tabs`, `Pagination`, `Collapsible`, `ScrollArea`, `Resizable`)
203
+ - Feedback components (`AlertDialog`, `Popover`, `Tooltip`, `Sonner` toasts, `Skeleton`, `Spinner`, `Progress`)
204
+ - Typography utilities (`hlmH1`–`hlmH4`, `hlmP`, `hlmLead`, etc.)
205
+
206
+ Each feature is exported from the root package (for example `import { HlmInput } from '@billy_mcdowell/prmn-angular-v3';`).
207
+ When in doubt, check the library’s `public-api.ts` for the full list of exports.
208
+
209
+ ---
210
+
211
+ ## 5. Running your app
212
+
213
+ After installation and setup:
214
+
215
+ ```bash
216
+ npm run build # build your Angular app
217
+ npm start # or ng serve
218
+ ```
219
+
220
+ You should now see the components rendered with the design system styles from this library.
221
+
222
+ ---
223
+
224
+ ## Local development / Storybook (optional)
225
+
226
+ If you are working in this monorepo:
227
+
228
+ - **Build the library**:
229
+
230
+ ```bash
231
+ npm run build:ui
232
+ ```
233
+
234
+ - **Run Storybook for the UI library**:
235
+
236
+ ```bash
237
+ npm run storybook
238
+ ```
239
+
240
+ These commands are for contributors to this repo; external consumers only need the steps in sections 1–4.
241
+
242
+ # PRMN Angular UI Library
243
+
244
+ Reusable, themeable UI primitives for Angular, built on top of `@spartan-ng/brain` and Tailwind CSS.
245
+
246
+ > This README explains how to consume the `ui` library **from an external Angular application**, not how to develop the library itself.
247
+
248
+ ---
249
+
250
+ ## Package name
251
+
252
+ The library is published from the `projects/ui` workspace library as the scoped package `@billy_mcdowell/prmn-angular-v3`:
253
+
254
+ ```bash
255
+ npm install @billy_mcdowell/prmn-angular-v3
256
+ ```
257
+
258
+ All import examples below assume this package name.
19
259
 
20
260
  ---
21
261
 
@@ -41,7 +281,7 @@ You may not need all of these for every project, but they are used across compon
41
281
  From your Angular application:
42
282
 
43
283
  ```bash
44
- npm install ui @spartan-ng/brain @ng-icons/core @ng-icons/lucide embla-carousel-angular ngx-sonner tailwindcss @tailwindcss/postcss
284
+ npm install @billy_mcdowell/prmn-angular-v3 @spartan-ng/brain @ng-icons/core @ng-icons/lucide embla-carousel-angular ngx-sonner tailwindcss @tailwindcss/postcss
45
285
  ```
46
286
 
47
287
  If you are using pnpm or yarn, use the equivalent command.
@@ -164,7 +404,7 @@ All public components/directives are exported from the library’s public API (`
164
404
  ```ts
165
405
  // app/example/example.component.ts
166
406
  import { Component } from '@angular/core';
167
- import { HlmButton } from 'ui'; // or '@your-org/ui'
407
+ import { HlmButton } from '@billy_mcdowell/prmn-angular-v3';
168
408
 
169
409
  @Component({
170
410
  standalone: true,
@@ -182,7 +422,7 @@ export class ExampleComponent {}
182
422
  You can also use the convenience import group where available (for example, `HlmButtonImports`):
183
423
 
184
424
  ```ts
185
- import { HlmButtonImports } from 'ui';
425
+ import { HlmButtonImports } from '@billy_mcdowell/prmn-angular-v3';
186
426
 
187
427
  @Component({
188
428
  standalone: true,
@@ -204,7 +444,7 @@ The library exposes many primitives, for example:
204
444
  - Feedback components (`AlertDialog`, `Popover`, `Tooltip`, `Sonner` toasts, `Skeleton`, `Spinner`, `Progress`)
205
445
  - Typography utilities (`hlmH1`–`hlmH4`, `hlmP`, `hlmLead`, etc.)
206
446
 
207
- Each feature is exported from the root package (for example `import { HlmInput } from 'ui';`).
447
+ Each feature is exported from the root package (for example `import { HlmInput } from '@billy_mcdowell/prmn-angular-v3';`).
208
448
  When in doubt, check the library’s `public-api.ts` for the full list of exports.
209
449
 
210
450
  ---
package/package.json CHANGED
@@ -1,15 +1,26 @@
1
1
  {
2
2
  "name": "@billy_mcdowell/prmn-angular-v3",
3
3
  "private": false,
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.3.0",
7
- "@angular/core": "^20.3.0"
7
+ "@angular/core": "^20.3.0",
8
+ "@spartan-ng/brain": "^0.0.1-alpha.649",
9
+ "@ng-icons/core": "^33.1.0",
10
+ "@ng-icons/lucide": "^33.1.0",
11
+ "embla-carousel-angular": "^21.0.0",
12
+ "ngx-sonner": "^3.1.0"
8
13
  },
9
14
  "dependencies": {
10
- "tslib": "^2.3.0"
15
+ "tslib": "^2.3.0",
16
+ "class-variance-authority": "^0.7.1",
17
+ "clsx": "^2.1.1",
18
+ "tailwind-merge": "^3.5.0"
11
19
  },
12
20
  "sideEffects": false,
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
13
24
  "module": "fesm2022/billy_mcdowell-prmn-angular-v3.mjs",
14
25
  "typings": "index.d.ts",
15
26
  "exports": {