@nqlib/nqui 0.3.1 → 0.3.3

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 (107) hide show
  1. package/README.md +6 -1
  2. package/dist/App.d.ts.map +1 -1
  3. package/dist/components/AppLayout.d.ts.map +1 -1
  4. package/dist/components/app-sidebar.d.ts.map +1 -1
  5. package/dist/components/custom/command-palette.d.ts +19 -0
  6. package/dist/components/custom/command-palette.d.ts.map +1 -0
  7. package/dist/components/custom/enhanced-badge.d.ts +1 -1
  8. package/dist/components/custom/enhanced-button.d.ts +1 -1
  9. package/dist/components/custom/enhanced-checkbox.d.ts +1 -1
  10. package/dist/components/custom/enhanced-checkbox.d.ts.map +1 -1
  11. package/dist/components/custom/enhanced-scroll-area.d.ts +11 -13
  12. package/dist/components/custom/enhanced-scroll-area.d.ts.map +1 -1
  13. package/dist/components/custom/nqui-logo.d.ts +1 -0
  14. package/dist/components/custom/nqui-logo.d.ts.map +1 -1
  15. package/dist/components/custom/segmented-control.d.ts +48 -0
  16. package/dist/components/custom/segmented-control.d.ts.map +1 -0
  17. package/dist/components/ui/badge.d.ts +1 -1
  18. package/dist/components/ui/button.d.ts +1 -1
  19. package/dist/components/ui/input-group.d.ts +1 -1
  20. package/dist/components/ui/sheet.d.ts +1 -1
  21. package/dist/index.d.ts +5 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/lib/keyboard.d.ts +1 -0
  24. package/dist/lib/keyboard.d.ts.map +1 -1
  25. package/dist/nqui.cjs.js +85 -85
  26. package/dist/nqui.es.js +13099 -12927
  27. package/dist/pages/ChartShowcase.d.ts.map +1 -1
  28. package/dist/pages/ComponentShowcase.d.ts.map +1 -1
  29. package/dist/pages/DataTableShowcase.d.ts +2 -0
  30. package/dist/pages/DataTableShowcase.d.ts.map +1 -0
  31. package/dist/styles.css +5 -13
  32. package/docs/components/README.md +119 -0
  33. package/docs/components/nqui-accordion.md +20 -0
  34. package/docs/components/nqui-alert-dialog.md +31 -0
  35. package/docs/components/nqui-alert.md +19 -0
  36. package/docs/components/nqui-aspect-ratio.md +17 -0
  37. package/docs/components/nqui-avatar.md +18 -0
  38. package/docs/components/nqui-badge.md +42 -0
  39. package/docs/components/nqui-breadcrumb.md +24 -0
  40. package/docs/components/nqui-button-group.md +31 -0
  41. package/docs/components/nqui-button.md +56 -0
  42. package/docs/components/nqui-calendar.md +46 -0
  43. package/docs/components/nqui-card.md +31 -0
  44. package/docs/components/nqui-carousel.md +22 -0
  45. package/docs/components/nqui-checkbox.md +34 -0
  46. package/docs/components/nqui-code-block.md +39 -0
  47. package/docs/components/nqui-code-editor.md +21 -0
  48. package/docs/components/nqui-collapsible.md +18 -0
  49. package/docs/components/nqui-color-picker.md +38 -0
  50. package/docs/components/nqui-color-slider.md +23 -0
  51. package/docs/components/nqui-combobox.md +65 -0
  52. package/docs/components/nqui-command-palette.md +29 -0
  53. package/docs/components/nqui-command.md +39 -0
  54. package/docs/components/nqui-context-menu.md +33 -0
  55. package/docs/components/nqui-dialog.md +36 -0
  56. package/docs/components/nqui-drawer.md +27 -0
  57. package/docs/components/nqui-dropdown-menu.md +56 -0
  58. package/docs/components/nqui-empty.md +22 -0
  59. package/docs/components/nqui-field.md +42 -0
  60. package/docs/components/nqui-frosted-glass.md +19 -0
  61. package/docs/components/nqui-hover-card.md +18 -0
  62. package/docs/components/nqui-input-group.md +22 -0
  63. package/docs/components/nqui-input-otp.md +23 -0
  64. package/docs/components/nqui-input.md +25 -0
  65. package/docs/components/nqui-item.md +25 -0
  66. package/docs/components/nqui-kbd.md +25 -0
  67. package/docs/components/nqui-label.md +16 -0
  68. package/docs/components/nqui-logo.md +16 -0
  69. package/docs/components/nqui-menubar.md +22 -0
  70. package/docs/components/nqui-native-select.md +28 -0
  71. package/docs/components/nqui-navigation-menu.md +25 -0
  72. package/docs/components/nqui-pagination.md +25 -0
  73. package/docs/components/nqui-popover.md +34 -0
  74. package/docs/components/nqui-progress.md +22 -0
  75. package/docs/components/nqui-radio-group.md +34 -0
  76. package/docs/components/nqui-rating.md +35 -0
  77. package/docs/components/nqui-resizable.md +23 -0
  78. package/docs/components/nqui-sandbox.md +27 -0
  79. package/docs/components/nqui-scroll-area.md +32 -0
  80. package/docs/components/nqui-segmented-control.md +18 -0
  81. package/docs/components/nqui-select.md +50 -0
  82. package/docs/components/nqui-separator.md +16 -0
  83. package/docs/components/nqui-sheet.md +27 -0
  84. package/docs/components/nqui-sidebar.md +45 -0
  85. package/docs/components/nqui-skeleton.md +15 -0
  86. package/docs/components/nqui-slider.md +16 -0
  87. package/docs/components/nqui-snippet.md +28 -0
  88. package/docs/components/nqui-sortable.md +46 -0
  89. package/docs/components/nqui-spinner.md +16 -0
  90. package/docs/components/nqui-switch.md +15 -0
  91. package/docs/components/nqui-table-of-contents.md +37 -0
  92. package/docs/components/nqui-tabs.md +35 -0
  93. package/docs/components/nqui-textarea.md +15 -0
  94. package/docs/components/nqui-toaster.md +44 -0
  95. package/docs/components/nqui-toggle-group.md +21 -0
  96. package/docs/components/nqui-toggle.md +15 -0
  97. package/docs/components/nqui-tooltip.md +24 -0
  98. package/docs/components/nqui-tracker.md +38 -0
  99. package/docs/internal-notes/BUILD_VERIFICATION.md +174 -0
  100. package/docs/internal-notes/DASHBOARD_LAYOUT_DESIGN.md +1429 -0
  101. package/docs/internal-notes/FROSTED_GLASS_FIX.md +50 -0
  102. package/docs/internal-notes/PUBLISHING.md +339 -0
  103. package/docs/internal-notes/layoutdesign.md +616 -0
  104. package/docs/internal-notes/progress.md +348 -0
  105. package/docs/internal-notes/stacked-avatar-implementation.md +38 -0
  106. package/package.json +2 -1
  107. /package/{INSTALLATION.md → docs/internal-notes/INSTALLATION.md} +0 -0
@@ -0,0 +1,50 @@
1
+ # Frosted Glass Header Fix - Release Notes
2
+
3
+ ## Issue
4
+ Content was not visible behind sticky headers with frosted glass effect. Headers appeared solid/opaque, preventing the backdrop-filter blur effect from showing content scrolling behind them.
5
+
6
+ ## Root Cause
7
+ The scroll container structure prevented content from actually scrolling behind sticky headers. Content was positioned below headers rather than overlapping them, so backdrop-filter had nothing to blur.
8
+
9
+ ## Fix Applied
10
+
11
+ ### AppLayout Header (`packages/nqui/src/components/AppLayout.tsx`)
12
+ 1. **Scroll Container Structure**: Ensured scroll container uses `flex flex-col` to allow normal content flow
13
+ 2. **Header Positioning**: Header uses `sticky top-0 z-10` with `FrostedGlass` component as backdrop layer
14
+ 3. **Content Layer**: Added semi-transparent background (`bg-background/40`) to content div for visibility while maintaining transparency
15
+ 4. **Removed Aggressive Scroll Resets**: Removed setInterval-based scroll resets that were interfering with user scrolling
16
+
17
+ ### Card Header (`packages/nqui/src/components/ui/card.tsx`)
18
+ 1. **FrostedGlass Integration**: Added `FrostedGlass` component with `borderRadius={8}` for rounded corners
19
+ 2. **Transparent Content Layer**: Removed background from content wrapper to allow content behind to show through
20
+ 3. **ScrollArea Structure**: Simplified ScrollArea wrapper to use `flex-1 min-h-0` directly, allowing content to scroll behind sticky header
21
+ 4. **Same Root Cause**: Content wasn't positioned to scroll behind sticky header - fixed by ensuring ScrollArea allows normal content flow
22
+
23
+ ## Technical Details
24
+
25
+ ### FrostedGlass Component Features
26
+ - Extended backdrop (`h-[200%]`) to capture reflections from nearby elements (Josh Comeau method)
27
+ - SVG mask for rounded corners when `borderRadius > 0`
28
+ - Linear gradient mask for square corners
29
+ - Very light background (`bg-background/5`) to make blur effect visible
30
+ - `pointer-events: none` to allow interactions
31
+
32
+ ### Key CSS Properties
33
+ - `backdrop-filter: blur(16px)` - Main blur effect
34
+ - `-webkit-backdrop-filter: blur(16px)` - Safari support
35
+ - `position: sticky` - Keeps header at top while scrolling
36
+ - `z-index` layering - FrostedGlass at `z-0`, content at `z-10`
37
+
38
+ ## Files Modified
39
+ - `packages/nqui/src/components/AppLayout.tsx`
40
+ - `packages/nqui/src/components/ui/card.tsx`
41
+ - `packages/nqui/src/components/ui/frosted-glass.tsx`
42
+ - `packages/nqui/src/components/custom/table-of-contents.tsx` (TOC scroll container fix)
43
+
44
+ ## Testing
45
+ - ✅ Content visible and blurred behind AppLayout header when scrolling
46
+ - ✅ Content visible and blurred behind Card sticky header when scrolling
47
+ - ✅ Reflections from nearby elements visible (extended backdrop technique)
48
+ - ✅ TOC navigation works with custom scroll container
49
+ - ✅ No scroll shaking or reset issues
50
+ - ✅ Smooth scrolling behavior maintained
@@ -0,0 +1,339 @@
1
+ # Publishing Guide
2
+
3
+ This guide covers publishing to both **npmjs.com** (public, no auth needed) and **GitHub Packages** (requires GitHub account).
4
+
5
+ ## Prerequisites
6
+
7
+ 1. **Build the library**
8
+ ```bash
9
+ npm run build:lib
10
+ ```
11
+ Verify `dist/` folder contains all required files.
12
+
13
+ 2. **Authentication** (only needed for GitHub Packages)
14
+ - GitHub Personal Access Token with `write:packages` permission
15
+ - For npmjs.com: Create account at npmjs.com and run `npm login`
16
+
17
+ ## Publishing Options
18
+
19
+ ### Option 1: Publish to npmjs.com (Recommended for Public Use)
20
+
21
+ **Why:** Anyone can install without authentication - works like `npm install react`
22
+
23
+ **Important:** Scoped packages (`@nqlib/nqui`) require either:
24
+ - An npm organization (paid, $7/month) - Create at: https://www.npmjs.com/org/create
25
+ - OR use your username scope: `@ctesibius/nqui` (free)
26
+ - OR publish unscoped: `nqui` (free, but name must be available)
27
+
28
+ **Steps:**
29
+
30
+ 1. **Set up scope** (if using `@nqlib` scope):
31
+ - Create npm organization: https://www.npmjs.com/org/create
32
+ - Organization name: `nqlib`
33
+ - Requires paid plan ($7/month per user)
34
+
35
+ 2. **Enable 2FA on npmjs.com** (required for publishing)
36
+ - Go to: https://www.npmjs.com/settings/[your-username]/security
37
+ - Enable "Two-factor authentication"
38
+ - Follow the setup instructions (use an authenticator app like Google Authenticator or Authy)
39
+ - **OR** create a granular access token with "publish" permission and "bypass 2FA" enabled:
40
+ - Go to: https://www.npmjs.com/settings/[your-username]/tokens
41
+ - Click "Generate New Token" → "Granular Access Token"
42
+ - Select "Publish" permission
43
+ - Enable "Bypass 2FA" (if available)
44
+ - Copy the token (you'll only see it once!)
45
+
46
+ 3. **Login to npmjs.com** (one-time setup or when credentials expire)
47
+ ```bash
48
+ cd packages/nqui
49
+ npm login --registry=https://registry.npmjs.com
50
+ ```
51
+ - Username: Your npmjs.com username
52
+ - Password: Your npmjs.com password (or use the granular token as password if using token)
53
+ - Email: Your npmjs.com email
54
+ - OTP: Enter your 2FA code if prompted (if using 2FA)
55
+
56
+ **Verify login:**
57
+ ```bash
58
+ npm whoami --registry=https://registry.npmjs.com
59
+ ```
60
+
61
+ 4. **Update version** (if needed)
62
+ ```bash
63
+ npm version patch # 0.1.0 → 0.1.1
64
+ npm version minor # 0.1.0 → 0.2.0
65
+ npm version major # 0.1.0 → 1.0.0
66
+ ```
67
+
68
+ 5. **Publish**
69
+ ```bash
70
+ npm run publish:npm
71
+ # or
72
+ npm publish --registry=https://registry.npmjs.com --access=public
73
+ ```
74
+
75
+ **Users install with:**
76
+ ```bash
77
+ npm install @nqlib/nqui
78
+ ```
79
+ No `.npmrc` or token needed! ✅
80
+
81
+ ---
82
+
83
+ ### Option 2: Publish to GitHub Packages
84
+
85
+ **Why:** Good for organization packages, version control integration
86
+
87
+ **Steps:**
88
+
89
+ 1. **Setup authentication** (one-time setup)
90
+
91
+ **Option A: Using `.npmrc` file (Recommended)**
92
+
93
+ Ensure `.npmrc` exists in the project root (`/Users/bnguyen/Desktop/Github/nqui/.npmrc`):
94
+ ```
95
+ //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
96
+ @nqlib:registry=https://npm.pkg.github.com
97
+ ```
98
+
99
+ **Before publishing, copy `.npmrc` to the package directory:**
100
+ ```bash
101
+ cd packages/nqui
102
+ cp ../../.npmrc .npmrc
103
+ ```
104
+
105
+ **Option B: Interactive login**
106
+ ```bash
107
+ cd packages/nqui
108
+ npm login --registry=https://npm.pkg.github.com
109
+ ```
110
+ - Username: Your GitHub username
111
+ - Password: Your GitHub Personal Access Token (not password!)
112
+ - Email: Your GitHub email
113
+
114
+ **Verify authentication:**
115
+ ```bash
116
+ npm whoami --registry=https://npm.pkg.github.com
117
+ ```
118
+
119
+ 2. **Update version** (if needed)
120
+ ```bash
121
+ npm version patch
122
+ ```
123
+
124
+ 3. **Publish**
125
+ ```bash
126
+ cd packages/nqui
127
+ # If using .npmrc method, ensure it's copied first:
128
+ cp ../../.npmrc .npmrc
129
+
130
+ npm run publish:github
131
+ # or
132
+ npm publish --registry=https://npm.pkg.github.com
133
+ ```
134
+
135
+ **Note:** The `.npmrc` file in `packages/nqui/` is gitignored and won't be committed.
136
+
137
+ **Users install with:**
138
+ ```bash
139
+ # Create .npmrc in their project
140
+ echo "@nqlib:registry=https://npm.pkg.github.com" > .npmrc
141
+
142
+ # Authenticate (they need their own GitHub token)
143
+ npm login --registry=https://npm.pkg.github.com
144
+
145
+ # Install
146
+ npm install @nqlib/nqui
147
+ ```
148
+
149
+ ⚠️ **Note:** Users need GitHub account + token even for public packages.
150
+
151
+ ---
152
+
153
+ ### Option 3: Publish to Both Registries
154
+
155
+ **Best of both worlds:** Maximum accessibility
156
+
157
+ **Steps:**
158
+
159
+ 1. **Setup authentication for both registries**
160
+
161
+ **For GitHub Packages:**
162
+ ```bash
163
+ cd packages/nqui
164
+ cp ../../.npmrc .npmrc
165
+ ```
166
+
167
+ **For npmjs.com:**
168
+ ```bash
169
+ cd packages/nqui
170
+ npm login --registry=https://registry.npmjs.com
171
+ ```
172
+
173
+ 2. **Update version** (if needed)
174
+ ```bash
175
+ npm version patch
176
+ ```
177
+
178
+ 3. **Publish to both**
179
+ ```bash
180
+ cd packages/nqui
181
+ npm run publish:both
182
+ ```
183
+
184
+ This will:
185
+ - Publish to GitHub Packages first
186
+ - Then publish to npmjs.com
187
+
188
+ **Users can choose:**
189
+ - **npmjs.com**: `npm install @nqlib/nqui` (no auth needed)
190
+ - **GitHub Packages**: Requires GitHub token (see Option 2)
191
+
192
+ ---
193
+
194
+ ### Publishing to Missing Registry Only
195
+
196
+ If you've already published to one registry, you can publish the same version to the other:
197
+
198
+ **Already on GitHub Packages, need npmjs.com:**
199
+ ```bash
200
+ npm run publish:npm
201
+ ```
202
+
203
+ **Already on npmjs.com, need GitHub Packages:**
204
+ ```bash
205
+ npm run publish:github
206
+ ```
207
+
208
+ **Note:** Different registries can have the same version number - they're independent.
209
+
210
+ ---
211
+
212
+ ## Version Management
213
+
214
+ The `npm version` command automatically:
215
+ - Updates `package.json` version
216
+ - Creates a git tag
217
+ - Commits the change
218
+
219
+ **Version types:**
220
+ - `patch`: Bug fixes (0.1.0 → 0.1.1)
221
+ - `minor`: New features, backward compatible (0.1.0 → 0.2.0)
222
+ - `major`: Breaking changes (0.1.0 → 1.0.0)
223
+
224
+ ---
225
+
226
+ ## Verification
227
+
228
+ After publishing, verify:
229
+
230
+ **npmjs.com:**
231
+ - Visit: `https://www.npmjs.com/package/@nqlib/nqui`
232
+ - Test install: `npm install @nqlib/nqui` (in a fresh project)
233
+
234
+ **GitHub Packages:**
235
+ - Visit: `https://github.com/nqlib/nqui/packages`
236
+ - Check package visibility settings
237
+
238
+ ---
239
+
240
+ ## Troubleshooting
241
+
242
+ ### "401 Unauthorized" (GitHub Packages)
243
+ - Verify token has `write:packages` permission
244
+ - Check token hasn't expired
245
+ - Ensure you're authenticated: `npm whoami --registry=https://npm.pkg.github.com`
246
+
247
+ ### "403 Forbidden" (GitHub Packages)
248
+ - Verify repository ownership matches package scope (`@nqlib`)
249
+ - Check package visibility settings in GitHub
250
+
251
+ ### "404 Not Found - Scope not found" (npmjs.com)
252
+ - The scope `@nqlib` doesn't exist on npmjs.com
253
+ - **Solution 1**: Create an npm organization named `nqlib` at https://www.npmjs.com/org/create (requires paid plan)
254
+ - **Solution 2**: Change package name to `@ctesibius/nqui` (uses your username scope, free)
255
+ - **Solution 3**: Publish as unscoped package `nqui` (check name availability first)
256
+
257
+ ### "403 Forbidden - Two-factor authentication required" (npmjs.com)
258
+ - **Enable 2FA** on your npmjs.com account:
259
+ - Visit: https://www.npmjs.com/settings/[your-username]/security
260
+ - Enable "Two-factor authentication"
261
+ - **OR** use a granular access token:
262
+ - Visit: https://www.npmjs.com/settings/[your-username]/tokens
263
+ - Create a token with "Publish" permission
264
+ - Use the token as your password when logging in
265
+
266
+ ### "404 Not Found" (npmjs.com)
267
+ - Ensure package name is available (scoped packages like `@nqlib/nqui` are always available)
268
+ - Verify you're logged in: `npm whoami`
269
+
270
+ ### "Package name already exists" (npmjs.com)
271
+ - Someone else owns that name
272
+ - Use a different scope or name
273
+
274
+ ---
275
+
276
+ ## Access Control Summary
277
+
278
+ ### npmjs.com
279
+ - ✅ **Public packages**: Anyone can install, no authentication needed
280
+ - ✅ **Private packages**: Requires paid npm account
281
+ - ✅ **Scoped packages** (`@nqlib/nqui`): Always available, no name conflicts
282
+
283
+ ### GitHub Packages
284
+ - ⚠️ **Public packages**: Anyone can install, but requires GitHub account + token
285
+ - 🔒 **Private packages**: Requires explicit access grant
286
+ - 📦 **Package visibility**: Inherits from repository visibility by default
287
+
288
+ ---
289
+
290
+ ## Recommended Workflow
291
+
292
+ For maximum accessibility:
293
+
294
+ 1. **Publish to npmjs.com** (primary)
295
+ - Zero friction for users
296
+ - Standard npm experience
297
+
298
+ 2. **Also publish to GitHub Packages** (optional)
299
+ - For users who prefer GitHub ecosystem
300
+ - Better integration with GitHub Actions/CI
301
+
302
+ **Complete workflow:**
303
+ ```bash
304
+ # 1. Navigate to package directory
305
+ cd packages/nqui
306
+
307
+ # 2. Setup authentication
308
+ cp ../../.npmrc .npmrc # For GitHub Packages
309
+ npm login --registry=https://registry.npmjs.com # For npmjs.com (if not already logged in)
310
+
311
+ # 3. Update version and publish
312
+ npm version patch
313
+ npm run publish:both
314
+ ```
315
+
316
+ **Quick reference - Login commands:**
317
+ ```bash
318
+ # Login to npmjs.com
319
+ cd packages/nqui
320
+ npm login --registry=https://registry.npmjs.com
321
+
322
+ # Login to GitHub Packages (alternative to .npmrc)
323
+ cd packages/nqui
324
+ npm login --registry=https://npm.pkg.github.com
325
+
326
+ # Verify authentication
327
+ npm whoami --registry=https://registry.npmjs.com
328
+ npm whoami --registry=https://npm.pkg.github.com
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Security Notes
334
+
335
+ - ✅ **DO**: Use `npm login` (stores credentials securely)
336
+ - ✅ **DO**: Use environment variables in CI/CD
337
+ - ❌ **DON'T**: Commit tokens to git
338
+ - ❌ **DON'T**: Share tokens publicly
339
+ - ✅ **DO**: Add `.npmrc` to `.gitignore` (already done)