@keenmate/pure-admin-core 2.3.6 → 2.5.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.
Files changed (47) hide show
  1. package/README.md +23 -29
  2. package/dist/css/main.css +68 -148
  3. package/package.json +1 -5
  4. package/snippets/AUDIT.md +94 -0
  5. package/snippets/alerts.html +264 -89
  6. package/snippets/badges.html +193 -61
  7. package/snippets/buttons.html +178 -0
  8. package/snippets/callouts.html +210 -129
  9. package/snippets/cards.html +383 -200
  10. package/snippets/checkbox-lists.html +199 -65
  11. package/snippets/code.html +55 -11
  12. package/snippets/command-palette.html +401 -111
  13. package/snippets/comparison.html +144 -93
  14. package/snippets/customization.html +311 -104
  15. package/snippets/data-display.html +584 -0
  16. package/snippets/detail-panel.html +470 -138
  17. package/snippets/filter-card.html +246 -0
  18. package/snippets/forms.html +408 -308
  19. package/snippets/grid.html +253 -141
  20. package/snippets/layout.html +379 -480
  21. package/snippets/lists.html +144 -47
  22. package/snippets/loaders.html +64 -39
  23. package/snippets/manifest.json +330 -280
  24. package/snippets/modal-dialogs.html +137 -64
  25. package/snippets/modals.html +221 -151
  26. package/snippets/notifications.html +285 -0
  27. package/snippets/popconfirm.html +213 -19
  28. package/snippets/profile.html +290 -330
  29. package/snippets/statistics.html +247 -0
  30. package/snippets/tables.html +359 -150
  31. package/snippets/tabs.html +129 -45
  32. package/snippets/timeline.html +123 -56
  33. package/snippets/toasts.html +179 -31
  34. package/snippets/tooltips.html +199 -81
  35. package/snippets/typography.html +183 -58
  36. package/snippets/utilities.html +511 -415
  37. package/snippets/virtual-scroll.html +201 -75
  38. package/snippets/web-daterangepicker.html +369 -189
  39. package/snippets/web-multiselect.html +360 -124
  40. package/src/scss/core-components/_alerts.scss +51 -12
  41. package/src/scss/core-components/_pagers.scss +1 -1
  42. package/src/scss/core-components/_popconfirm.scss +35 -13
  43. package/src/scss/core-components/_profile.scss +18 -8
  44. package/src/scss/core-components/_statistics.scss +12 -12
  45. package/src/scss/core-components/_tables.scss +2 -134
  46. package/src/scss/variables/_components.scss +17 -2
  47. package/scripts/download-themes.js +0 -351
@@ -1,57 +1,64 @@
1
- <!-- ========================================
2
- Command Palette Component
3
- macOS Spotlight-style global search
4
- ======================================== -->
1
+ <!-- ================================
2
+ COMMAND PALETTE
3
+ Pure Admin Visual Framework
5
4
 
6
- <!--
7
- USAGE:
8
- - Include this HTML in your layout (globally available)
9
- - Include /dist/js/command-palette.js for functionality
10
- - Press Ctrl+K or Cmd+K to open
11
- - Use /p, /o, /u, /i prefixes for context switching
12
- -->
5
+ Three co-located components in _command-palette.scss:
6
+ pa-command-palette macOS Spotlight-style search modal
7
+ pa-navbar-search The clickable "search pill" in the navbar
8
+ that triggers the palette
9
+ pa-shortcut-help Modal content for an all-shortcuts help dialog
10
+
11
+ The palette is CSS + structure only — behaviour (open/close,
12
+ filtering, keyboard navigation, context switching) is wired up by
13
+ your own JS or the framework's demo script
14
+ (demo/js/command-palette.js).
15
+ ================================ -->
16
+
17
+
18
+ <!-- ================================
19
+ PALETTE MARKUP (full shell)
20
+ Place near </body> so it's not clipped by layout containers.
21
+ Toggle .pa-command-palette--active to show/hide.
22
+ ================================ -->
13
23
 
14
- <!-- Command Palette Modal -->
15
24
  <div class="pa-command-palette" id="commandPalette">
16
- <!-- Backdrop overlay -->
25
+ <!-- Backdrop fullscreen, blurred; clicking it typically closes -->
17
26
  <div class="pa-command-palette__backdrop" id="commandPaletteBackdrop"></div>
18
27
 
19
- <!-- Main container -->
20
28
  <div class="pa-command-palette__container">
21
- <!-- Search input -->
29
+ <!-- Search row: tokens (top) + input (bottom) -->
22
30
  <div class="pa-command-palette__search">
31
+ <!-- Tokens stay hidden while empty (:empty selector) -->
23
32
  <div class="pa-command-palette__tokens" id="commandPaletteTokens"></div>
33
+
24
34
  <div class="pa-command-palette__input-wrapper">
25
35
  <input
26
36
  type="text"
27
37
  class="pa-command-palette__input"
28
38
  id="commandPaletteInput"
29
- placeholder="Type / for commands, : to search, or just start typing..."
39
+ placeholder="Type to search or use / for commands…"
30
40
  autocomplete="off"
31
41
  spellcheck="false"
32
42
  >
43
+ <!-- Context pill floats over the input's inline-end;
44
+ toggle --visible when a context (e.g. /products) is active -->
33
45
  <div class="pa-command-palette__context" id="commandPaletteContext"></div>
34
46
  </div>
35
47
  </div>
36
48
 
37
- <!-- Results container -->
49
+ <!-- Results / home / empty / loader all live inside __results -->
38
50
  <div class="pa-command-palette__results" id="commandPaletteResults">
39
- <!-- Empty state (default) -->
40
51
  <div class="pa-command-palette__empty">
41
- Type to search or use /p for products, /o for orders, /u for users, /i for invoices
52
+ Start typing to search
42
53
  </div>
43
54
  </div>
44
55
 
45
- <!-- Footer with keyboard hints -->
56
+ <!-- Footer: inline keyboard hints -->
46
57
  <div class="pa-command-palette__footer">
47
58
  <div class="pa-command-palette__hint">
48
59
  <span class="pa-command-palette__key">↑↓</span>
49
60
  <span>Navigate</span>
50
61
  </div>
51
- <div class="pa-command-palette__hint">
52
- <span class="pa-command-palette__key">←→</span>
53
- <span>Pages</span>
54
- </div>
55
62
  <div class="pa-command-palette__hint">
56
63
  <span class="pa-command-palette__key">↵</span>
57
64
  <span>Select</span>
@@ -64,17 +71,18 @@
64
71
  </div>
65
72
  </div>
66
73
 
67
- <!-- ========================================
68
- JavaScript States
69
- ======================================== -->
70
74
 
71
- <!-- Loader state (shown during search) -->
75
+ <!-- ================================
76
+ RESULT STATES (swap these into __results)
77
+ ================================ -->
78
+
79
+ <!-- Loader (shown during async search) -->
72
80
  <div class="pa-command-palette__loader">
73
- <div class="pa-spinner pa-spinner--sm pa-spinner--primary"></div>
74
- <span>Searching...</span>
81
+ <div class="pa-spinner pa-spinner--primary"></div>
82
+ <span>Searching…</span>
75
83
  </div>
76
84
 
77
- <!-- Result item (generated dynamically) -->
85
+ <!-- Single result item -->
78
86
  <div class="pa-command-palette__item">
79
87
  <div class="pa-command-palette__item-icon">💻</div>
80
88
  <div class="pa-command-palette__item-content">
@@ -84,7 +92,7 @@
84
92
  <span class="pa-badge">In Stock</span>
85
93
  </div>
86
94
 
87
- <!-- Active result item -->
95
+ <!-- Highlighted / keyboard-focused item -->
88
96
  <div class="pa-command-palette__item pa-command-palette__item--active">
89
97
  <div class="pa-command-palette__item-icon">📱</div>
90
98
  <div class="pa-command-palette__item-content">
@@ -94,7 +102,7 @@
94
102
  <span class="pa-badge">New</span>
95
103
  </div>
96
104
 
97
- <!-- Result with highlighted search match -->
105
+ <!-- Item title with search highlight (<mark> gets styled) -->
98
106
  <div class="pa-command-palette__item">
99
107
  <div class="pa-command-palette__item-icon">🎧</div>
100
108
  <div class="pa-command-palette__item-content">
@@ -104,109 +112,391 @@
104
112
  <span class="pa-badge">Popular</span>
105
113
  </div>
106
114
 
107
- <!-- Pagination indicator (shown when multiple pages) -->
108
- <div class="pa-command-palette__pagination">
109
- Page 1 of 3 • 24 results
115
+ <!-- Item with inline keyboard shortcut hint -->
116
+ <div class="pa-command-palette__item">
117
+ <div class="pa-command-palette__item-icon">⚙️</div>
118
+ <div class="pa-command-palette__item-content">
119
+ <div class="pa-command-palette__item-title">Open Settings</div>
120
+ </div>
121
+ <div class="pa-command-palette__shortcut">
122
+ <span class="pa-command-palette__key">Ctrl</span>
123
+ <span class="pa-command-palette__key">,</span>
124
+ </div>
110
125
  </div>
111
126
 
112
- <!-- Section header (for grouping results) -->
113
- <div class="pa-command-palette__section">
114
- Recent Searches
127
+ <!-- Section header (group results by category) -->
128
+ <div class="pa-command-palette__section">Recent</div>
129
+
130
+ <!-- Pagination indicator (after the last result on a multi-page list) -->
131
+ <div class="pa-command-palette__pagination">Page 1 of 3 • 24 results</div>
132
+
133
+
134
+ <!-- ================================
135
+ HOME SCREEN (idle — no query yet)
136
+ Shown inside __results when the input is empty. Sections are
137
+ visually divided by a top border (added automatically by
138
+ :not(:first-child)).
139
+ ================================ -->
140
+
141
+ <div class="pa-command-palette__results">
142
+ <div class="pa-command-palette__home">
143
+ <div class="pa-command-palette__home-section">
144
+ <div class="pa-command-palette__home-heading">Recent</div>
145
+ <div class="pa-command-palette__item">
146
+ <div class="pa-command-palette__item-icon">🕑</div>
147
+ <div class="pa-command-palette__item-content">
148
+ <div class="pa-command-palette__item-title">Inventory report — Q4</div>
149
+ </div>
150
+ </div>
151
+ </div>
152
+
153
+ <div class="pa-command-palette__home-section">
154
+ <div class="pa-command-palette__home-heading">Commands</div>
155
+ <div class="pa-command-palette__item">
156
+ <div class="pa-command-palette__item-icon">/</div>
157
+ <div class="pa-command-palette__item-content">
158
+ <div class="pa-command-palette__item-title">Products</div>
159
+ <div class="pa-command-palette__item-meta">Search products by SKU or name</div>
160
+ </div>
161
+ <div class="pa-command-palette__shortcut">
162
+ <span class="pa-command-palette__key">/p</span>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ </div>
167
+ </div>
168
+
169
+
170
+ <!-- ================================
171
+ TOKENS (populated state)
172
+ The empty .pa-command-palette__tokens stays hidden (it uses the
173
+ :empty selector). Once tokens are rendered inside it, it becomes
174
+ a flex-wrap row of pa-badge pills. Each pill has a __remove
175
+ button to drop it from the query.
176
+
177
+ Optional inline prompt text (.pa-command-palette__token-prompt)
178
+ sits after the last token — useful for "in: …" language guidance.
179
+ ================================ -->
180
+
181
+ <div class="pa-command-palette__tokens">
182
+ <span class="pa-badge pa-badge--primary">
183
+ in: Products
184
+ <button class="pa-badge__remove" aria-label="Remove">×</button>
185
+ </span>
186
+ <span class="pa-badge pa-badge--info">
187
+ tag: sale
188
+ <button class="pa-badge__remove" aria-label="Remove">×</button>
189
+ </span>
190
+ <span class="pa-command-palette__token-prompt">type to filter…</span>
115
191
  </div>
116
192
 
117
- <!-- ========================================
118
- CSS Modifiers
119
- ======================================== -->
120
193
 
121
- <!-- Active state (shows the palette) -->
194
+ <!-- ================================
195
+ OTHER STATE MODIFIERS
196
+ ================================ -->
197
+
198
+ <!-- Palette visible -->
122
199
  <div class="pa-command-palette pa-command-palette--active">
123
- <!-- ... -->
200
+ <!-- -->
124
201
  </div>
125
202
 
126
- <!-- Context label visible -->
203
+ <!-- Context pill visible (e.g. "Searching in Products") -->
127
204
  <div class="pa-command-palette__context pa-command-palette__context--visible">
128
205
  Searching in Products
129
206
  </div>
130
207
 
131
- <!-- Results in loading state (shows overlay) -->
208
+ <!-- Results in loading state (subtle 70% overlay over current results) -->
132
209
  <div class="pa-command-palette__results pa-command-palette__results--loading">
133
- <!-- ... -->
210
+ <!-- -->
134
211
  </div>
135
212
 
136
- <!-- ========================================
137
- JavaScript API
138
- ======================================== -->
139
213
 
140
- <!--
141
- // Open palette
142
- document.getElementById('commandPalette').classList.add('pa-command-palette--active');
143
- document.getElementById('commandPaletteInput').focus();
144
-
145
- // Close palette
146
- document.getElementById('commandPalette').classList.remove('pa-command-palette--active');
147
- document.getElementById('commandPaletteInput').value = '';
148
-
149
- // Open with pre-filled query
150
- const input = document.getElementById('commandPaletteInput');
151
- input.value = '/p laptop';
152
- input.dispatchEvent(new Event('input'));
153
- -->
214
+ <!-- ================================
215
+ NAVBAR SEARCH TRIGGER (pa-navbar-search)
216
+ Looks like an input; functions as a button. Clicking it opens the
217
+ palette. Shows the Cmd+K / Ctrl+K hint as a <kbd> on the
218
+ inline-end side. Has size variants matching the input/button sizes.
219
+ ================================ -->
220
+
221
+ <button class="pa-navbar-search" onclick="openCommandPalette()">
222
+ <span class="pa-navbar-search__icon">🔍</span>
223
+ <span class="pa-navbar-search__placeholder">Search or jump to…</span>
224
+ <span class="pa-navbar-search__shortcut">
225
+ <kbd>Ctrl</kbd>
226
+ <kbd>K</kbd>
227
+ </span>
228
+ </button>
154
229
 
155
- <!-- ========================================
156
- Context Prefixes
157
- ======================================== -->
230
+ <!-- Sizes (align with input / button sizes): -->
231
+ <button class="pa-navbar-search pa-navbar-search--xs">…</button>
232
+ <button class="pa-navbar-search pa-navbar-search--sm">…</button>
233
+ <button class="pa-navbar-search pa-navbar-search--md">…</button>
234
+ <button class="pa-navbar-search pa-navbar-search--lg">…</button>
235
+ <button class="pa-navbar-search pa-navbar-search--xl">…</button>
158
236
 
159
237
  <!--
160
- /p → Products → "Searching in Products"
161
- /o → Orders → "Searching in Orders"
162
- /u → Users → "Searching in Users"
163
- /i → Invoices → "Searching in Invoices"
238
+ Responsive: below $mobile-breakpoint (768px), both __placeholder and
239
+ __shortcut are hidden so the trigger collapses to just the icon. The
240
+ button retains its padding and hit area.
164
241
  -->
165
242
 
166
- <!-- ========================================
167
- Keyboard Shortcuts
168
- ======================================== -->
169
243
 
170
- <!--
171
- Ctrl+K / Cmd+K → Open/close palette
172
- ↓ → Navigate between results
173
- → → Navigate between pages
174
- Enter → Select highlighted result
175
- Esc → Close palette
176
- -->
244
+ <!-- ================================
245
+ SHORTCUT HELP DIALOG (pa-shortcut-help)
246
+ Pure content block drop this into a .pa-modal body or any
247
+ other overlay when you want to show the app's keyboard shortcuts.
248
+ Grouped by category; each row is a description + one or more keys
249
+ (chord separators use pa-shortcut-help__separator).
250
+ ================================ -->
177
251
 
178
- <!-- ========================================
179
- SCSS Variables (for customization)
180
- ======================================== -->
252
+ <div class="pa-shortcut-help">
253
+ <div class="pa-shortcut-help__category">
254
+ <h3 class="pa-shortcut-help__category-title">Global</h3>
255
+ <div class="pa-shortcut-help__list">
256
+ <div class="pa-shortcut-help__item">
257
+ <div class="pa-shortcut-help__description">Open command palette</div>
258
+ <div class="pa-shortcut-help__keys">
259
+ <span class="pa-shortcut-help__key">Ctrl</span>
260
+ <span class="pa-shortcut-help__separator">+</span>
261
+ <span class="pa-shortcut-help__key">K</span>
262
+ </div>
263
+ </div>
264
+ <div class="pa-shortcut-help__item">
265
+ <div class="pa-shortcut-help__description">Close any overlay</div>
266
+ <div class="pa-shortcut-help__keys">
267
+ <span class="pa-shortcut-help__key">Esc</span>
268
+ </div>
269
+ </div>
270
+ </div>
271
+ </div>
181
272
 
182
- <!--
183
- $command-palette-width: 38rem
184
- $command-palette-offset-top: 8rem
185
- $command-palette-border-radius: $border-radius
186
- $command-palette-backdrop-bg: rgba(0, 0, 0, 0.5)
187
- $command-palette-backdrop-blur: 4px
188
- $command-palette-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3)
189
- $command-palette-input-padding-v: $spacing-base
190
- $command-palette-input-padding-h: $spacing-lg
191
- $command-palette-input-font-size: $font-size-lg
192
- $command-palette-results-max-height: 24rem
193
- $command-palette-empty-padding-v: $spacing-2xl
194
- $command-palette-item-padding-v: $spacing-sm
195
- $command-palette-item-hover-bg: rgba($accent-color, 0.05)
196
- $command-palette-item-active-bg: rgba($accent-color, 0.1)
197
- $command-palette-item-icon-size: 2rem
198
- $command-palette-highlight-bg: rgba($accent-color, 0.2)
199
- $command-palette-highlight-text: $accent-color
200
- -->
273
+ <div class="pa-shortcut-help__category">
274
+ <h3 class="pa-shortcut-help__category-title">Navigation</h3>
275
+ <div class="pa-shortcut-help__list">
276
+ <div class="pa-shortcut-help__item">
277
+ <div class="pa-shortcut-help__description">Go to next item</div>
278
+ <div class="pa-shortcut-help__keys">
279
+ <span class="pa-shortcut-help__key">↓</span>
280
+ </div>
281
+ </div>
282
+ <div class="pa-shortcut-help__item">
283
+ <div class="pa-shortcut-help__description">Go to previous item</div>
284
+ <div class="pa-shortcut-help__keys">
285
+ <span class="pa-shortcut-help__key">↑</span>
286
+ </div>
287
+ </div>
288
+ </div>
289
+ </div>
290
+
291
+ <!-- Empty state if no shortcuts are registered -->
292
+ <!--
293
+ <div class="pa-shortcut-help__empty">
294
+ No shortcuts registered for this app.
295
+ </div>
296
+ -->
297
+ </div>
298
+
299
+
300
+ <!-- ================================
301
+ JAVASCRIPT — minimal open/close
302
+ The real palette needs a search / filter / navigation implementation;
303
+ this is just the class-toggle contract.
304
+ ================================ -->
201
305
 
202
- <!-- ========================================
203
- Implementation Files
204
- ======================================== -->
306
+ <script>
307
+ function openCommandPalette() {
308
+ document.getElementById('commandPalette').classList.add('pa-command-palette--active');
309
+ document.getElementById('commandPaletteInput').focus();
310
+ }
311
+
312
+ function closeCommandPalette() {
313
+ const palette = document.getElementById('commandPalette');
314
+ palette.classList.remove('pa-command-palette--active');
315
+ document.getElementById('commandPaletteInput').value = '';
316
+ }
317
+
318
+ // Global Ctrl/Cmd+K to open; Esc to close.
319
+ document.addEventListener('keydown', (e) => {
320
+ if ((e.ctrlKey || e.metaKey) && e.key === 'k') {
321
+ e.preventDefault();
322
+ openCommandPalette();
323
+ }
324
+ if (e.key === 'Escape') {
325
+ closeCommandPalette();
326
+ }
327
+ });
328
+ </script>
329
+
330
+
331
+ <!-- ================================
332
+ COMPONENT REFERENCE
333
+ ================================ -->
205
334
 
206
335
  <!--
207
- SCSS: src/scss/core-components/_command-palette.scss
208
- Variables: src/scss/_variables.scss (17 variables)
209
- JavaScript: dist/js/command-palette.js
210
- HTML: views/layout.mustache (included globally)
211
- Demo: /command-palette
336
+ PALETTE SHELL (pa-command-palette):
337
+ - .pa-command-palette Fixed-inset modal; display: none by default.
338
+ - .pa-command-palette--active Visible state (display: flex).
339
+ - .pa-command-palette__backdrop Blurred fullscreen backdrop; fadeIn animated.
340
+ - .pa-command-palette__container Centred card holding the UI
341
+ (max-width $command-palette-width,
342
+ slideDown animation on open).
343
+
344
+ SEARCH ROW:
345
+ - .pa-command-palette__search Wrapper with bottom border.
346
+ - .pa-command-palette__tokens Flex-wrap row of token badges.
347
+ Uses :empty, so the wrapper
348
+ self-hides when you haven't
349
+ rendered any tokens yet.
350
+ - .pa-command-palette__token-prompt Italic muted caption shown
351
+ alongside tokens ("type to
352
+ filter", etc).
353
+ - .pa-command-palette__input-wrapper Positioning context for __context.
354
+ - .pa-command-palette__input The search <input>.
355
+ - .pa-command-palette__context Accent pill floating over the
356
+ input's inline-end; hidden by
357
+ default.
358
+ - .pa-command-palette__context--visible Fade-in to reveal the context pill.
359
+
360
+ RESULTS ZONE (swap contents inside __results):
361
+ - .pa-command-palette__results Scrollable results container
362
+ (max-height $command-palette-
363
+ results-max-height; drops to
364
+ 60vh under mobile breakpoint).
365
+ - .pa-command-palette__results--loading Adds a translucent overlay via
366
+ ::after so the current results
367
+ stay readable during async
368
+ refetch.
369
+ - .pa-command-palette__home Wrapper for idle-state content.
370
+ - .pa-command-palette__home-section Logical group (e.g. Recent,
371
+ Commands). Sections after the
372
+ first get an automatic top
373
+ border divider.
374
+ - .pa-command-palette__home-heading Tiny uppercase section label.
375
+ - .pa-command-palette__empty Centered muted text ("no results").
376
+ - .pa-command-palette__loader Flex row with spinner + label
377
+ during async search.
378
+ - .pa-command-palette__section Inline section divider inside
379
+ results (e.g. group headers).
380
+ - .pa-command-palette__pagination "Page X of Y" indicator below
381
+ a page's results (top border).
382
+
383
+ RESULT ITEM:
384
+ - .pa-command-palette__item One row; flex icon + content
385
+ + trailing badge/shortcut.
386
+ - .pa-command-palette__item--active Keyboard-selected state.
387
+ - .pa-command-palette__item-icon Accent-tinted square icon slot.
388
+ - .pa-command-palette__item-content Flexible middle (flex: 1).
389
+ - .pa-command-palette__item-title Title row; ellipsis on overflow.
390
+ <mark> children are auto-styled
391
+ as search-match highlights.
392
+ - .pa-command-palette__item-meta Small muted meta line.
393
+ - .pa-command-palette__shortcut Inline flex row for
394
+ __key children on an item
395
+ (shows the "Ctrl+," style hint).
396
+
397
+ FOOTER:
398
+ - .pa-command-palette__footer Border-top row with inline
399
+ keyboard hints.
400
+ - .pa-command-palette__hint Single hint (__key + label text).
401
+ - .pa-command-palette__key Individual keycap pill
402
+ (used inside __hint and __shortcut).
403
+
404
+
405
+ NAVBAR TRIGGER (pa-navbar-search):
406
+ - .pa-navbar-search Clickable pill (button).
407
+ - .pa-navbar-search--xs / --sm / --md
408
+ - .pa-navbar-search--lg / --xl Size variants matching input heights.
409
+ - .pa-navbar-search__icon Leading search icon.
410
+ - .pa-navbar-search__placeholder Muted prompt text (flex: 1,
411
+ ellipsis).
412
+ - .pa-navbar-search__shortcut Trailing flex row of <kbd>
413
+ keys styled as pillboxes.
414
+
415
+ Responsive: below 768px, __placeholder and __shortcut both hide —
416
+ trigger collapses to the icon only.
417
+
418
+
419
+ SHORTCUT HELP DIALOG (pa-shortcut-help):
420
+ - .pa-shortcut-help Root flex-column wrapper; put
421
+ inside a .pa-modal body.
422
+ - .pa-shortcut-help__category One grouping block.
423
+ - .pa-shortcut-help__category-title Tiny uppercase category label
424
+ with a bottom border.
425
+ - .pa-shortcut-help__list Flex-column list of items.
426
+ - .pa-shortcut-help__item One shortcut row (description
427
+ + keys; space-between).
428
+ - .pa-shortcut-help__keys Flex row holding the keycaps.
429
+ - .pa-shortcut-help__key Individual keycap pillbox.
430
+ - .pa-shortcut-help__separator "+" / "then" divider between
431
+ keycaps in a chord.
432
+ - .pa-shortcut-help__description Human-readable action text.
433
+ - .pa-shortcut-help__empty Fallback when no shortcuts
434
+ registered.
435
+
436
+
437
+ KEYBOARD INTEGRATION (app conventions — NOT framework classes):
438
+ The demo uses these patterns on top of the CSS; they're conventions,
439
+ not CSS rules:
440
+ - Ctrl/Cmd + K open/close the palette
441
+ - /p /o /u /i enter contexts (Products / Orders / Users /
442
+ Invoices) — flip --visible on __context and
443
+ render badges in __tokens
444
+ - ↑ ↓ navigate items (toggle __item--active)
445
+ - ← → page between result pages
446
+ - Enter commit the --active item's action
447
+ - Esc close the palette
448
+ Define your own in JS; the framework just styles the container, items,
449
+ tokens, context pill, and keyboard-hint keys.
450
+
451
+
452
+ STRUCTURE PATTERNS:
453
+
454
+ Navbar trigger + full palette together:
455
+ <!-- In header -->
456
+ <button class="pa-navbar-search" onclick="openCommandPalette()">
457
+ <span class="pa-navbar-search__icon">🔍</span>
458
+ <span class="pa-navbar-search__placeholder">Search…</span>
459
+ <span class="pa-navbar-search__shortcut"><kbd>Ctrl</kbd><kbd>K</kbd></span>
460
+ </button>
461
+
462
+ <!-- Near </body> -->
463
+ <div class="pa-command-palette" id="commandPalette">
464
+ <div class="pa-command-palette__backdrop"></div>
465
+ <div class="pa-command-palette__container">
466
+ <div class="pa-command-palette__search">
467
+ <div class="pa-command-palette__tokens"></div>
468
+ <div class="pa-command-palette__input-wrapper">
469
+ <input class="pa-command-palette__input" type="text">
470
+ <div class="pa-command-palette__context"></div>
471
+ </div>
472
+ </div>
473
+ <div class="pa-command-palette__results"></div>
474
+ <div class="pa-command-palette__footer">
475
+ <div class="pa-command-palette__hint"><span class="pa-command-palette__key">↵</span> Select</div>
476
+ </div>
477
+ </div>
478
+ </div>
479
+
480
+ Help dialog body (inside a pa-modal):
481
+ <div class="pa-shortcut-help">
482
+ <div class="pa-shortcut-help__category">
483
+ <h3 class="pa-shortcut-help__category-title">Global</h3>
484
+ <div class="pa-shortcut-help__list">
485
+ <div class="pa-shortcut-help__item">
486
+ <div class="pa-shortcut-help__description">Open command palette</div>
487
+ <div class="pa-shortcut-help__keys">
488
+ <span class="pa-shortcut-help__key">Ctrl</span>
489
+ <span class="pa-shortcut-help__separator">+</span>
490
+ <span class="pa-shortcut-help__key">K</span>
491
+ </div>
492
+ </div>
493
+ </div>
494
+ </div>
495
+ </div>
496
+
497
+
498
+ IMPLEMENTATION FILES:
499
+ - SCSS: src/scss/core-components/_command-palette.scss
500
+ - Demo JS: demo/js/command-palette.js
501
+ - Demo page: /components/command-palette
212
502
  -->