@keenmate/pure-admin-core 2.3.3 → 2.3.4

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 CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  Lightweight, data-focused CSS/SCSS admin framework with Corporate theme as default.
4
4
 
5
- ## What's New in 2.3.3
5
+ ## What's New in 2.3.4
6
6
 
7
- - **Command palette rewrite** — Multi-step command wizards (`/deploy`, `/assign`, `/go`, `/theme`), context search (`:p`, `:u`, `:o`), global search, inline/tokens display modes matching keen-pure-admin
8
- - **Dark theme fixes** — Command palette loading overlay, key badges, and item badges all use CSS variables instead of SCSS defaults stuck on light mode
7
+ - **Command palette home screen & hotkeys** — Opens with categorized commands and search contexts. Alt+D/A/G/T hotkeys jump directly into commands. Global search finds commands alongside data. Form codes for quick `/go` navigation.
8
+ - **Dropdown z-index fix** — Split button menus no longer go under sidebar/header
9
9
 
10
- ## What's New in 2.3.2
10
+ ## What's New in 2.3.3
11
11
 
12
12
  - **Themeable border-radius via CSS variables** — All components now use `var(--pa-border-radius)`. Themes override in `:root` (same pattern as colors). Fixes long-standing issue where `@use` module isolation prevented theme control of border-radius
13
13
  - **Outline-secondary button contrast** — New `--pa-btn-secondary-outline-color` variable, readable on all dark themes
@@ -338,26 +338,65 @@ Works with both `pa-table` and `web-grid` component. First/last columns automati
338
338
  - `.pa-modal--primary/success/danger/warning` - Themed headers
339
339
 
340
340
  ### Command Palette
341
- - `.pa-command-palette` - Base container (add `--active` to show)
341
+
342
+ macOS Spotlight-style search with multi-step commands, context search, and global search. Opens with `Ctrl+K` / `Cmd+K`.
343
+
344
+ #### Behavior
345
+
346
+ **Home Screen** — On open, displays a categorized list of available commands (with hotkey badges) and search contexts. Items are clickable. Typing immediately filters or switches to the appropriate mode.
347
+
348
+ **Three Input Modes:**
349
+
350
+ | Prefix | Mode | Behavior |
351
+ |--------|------|----------|
352
+ | `/` | Commands | Shows matching commands. Exact match + space enters the command wizard. |
353
+ | `:` | Context search | Shows matching search contexts. Exact match + space enters scoped search with debounced filtering. |
354
+ | (none) | Global search | Searches across all categories (commands, contexts, and data). Results limited to ~3 per category. |
355
+
356
+ **Multi-step Commands** — Commands define an array of `steps`. Each step has `getOptions(query, previousSelections)` returning filterable options. Steps can be conditional (`shouldShow(selections)`), support free-text entry (`freeText: true`), and have prompts displayed between selections (e.g., "in", "to", "as"). The command's `onComplete(selections)` fires after all steps.
357
+
358
+ **Fuzzy Matching** — Commands and contexts match on `shortcut`, `aliases`, and `name`. Matching is bidirectional: typing `/d` finds `/deploy`, and typing `/deploy` finds `/d`.
359
+
360
+ **Form Codes** — Step options can have a `code` property (e.g., `"24"` for Alerts). The `filterOpts` helper matches on `label`, `description`, and exact `code` — enabling quick navigation by numeric codes common in business applications.
361
+
362
+ **Display Styles:**
363
+
364
+ - **Inline** — Everything in one input: `/deploy in Production branch main`. The input shows the full command string with prompts and selected values concatenated.
365
+ - **Tokens** — Selections render as `pa-badge` chips in `__tokens` container above the input. Each badge has a `×` remove button to rewind to that step. The input only contains the current step's query. The command shortcut is the first badge.
366
+
367
+ **Hotkeys** — Commands can define a `hotkey` (e.g., `"Alt+D"`). These work globally (palette closed) and inside the palette (on the home screen). The hotkey opens the palette and enters the command directly, skipping the command list.
368
+
369
+ **Context Label** — `__context` element shows the active command name (e.g., "Assign to User") or search context (e.g., "Searching in Products"). Positioned inside `__input-wrapper` relative to the input.
370
+
371
+ **Search Highlighting** — Matching text in result titles is wrapped in `<mark>` elements, styled with `--pa-command-palette-highlight-bg` and `--pa-command-palette-highlight-text`. Highlights persist during keyboard navigation.
372
+
373
+ **Keyboard:** `↑↓` navigate, `Enter`/`Tab` select (or submit free text), `Esc` close, `Alt+key` command hotkeys.
374
+
375
+ #### CSS Classes
376
+
377
+ - `.pa-command-palette` - Base container (`--active` to show)
342
378
  - `.pa-command-palette__backdrop` - Overlay backdrop
343
379
  - `.pa-command-palette__container` - Modal dialog
344
- - `.pa-command-palette__search` - Search area (input + tokens + context)
345
- - `.pa-command-palette__tokens` - Token badges container (for token display mode)
380
+ - `.pa-command-palette__search` - Search area (tokens + input-wrapper)
381
+ - `.pa-command-palette__tokens` - Token badges container (hidden when empty via `:empty`)
346
382
  - `.pa-command-palette__input-wrapper` - Wraps input + context label (positioning anchor)
347
383
  - `.pa-command-palette__input` - Search input
348
- - `.pa-command-palette__context` - Context label (e.g., "Assign to User", "Searching in Products")
349
- - `.pa-command-palette__results` - Scrollable results area
350
- - `.pa-command-palette__item` - Result row (`--active` for keyboard-highlighted)
384
+ - `.pa-command-palette__context` - Context label (`--visible` to show)
385
+ - `.pa-command-palette__results` - Scrollable results area (`--loading` for overlay)
386
+ - `.pa-command-palette__home` - Home screen container
387
+ - `.pa-command-palette__home-section` - Section with border-top separator
388
+ - `.pa-command-palette__home-heading` - Uppercase section heading
389
+ - `.pa-command-palette__item` - Result row (`--active` for keyboard highlight)
351
390
  - `.pa-command-palette__item-icon` - Item icon
352
391
  - `.pa-command-palette__item-content` - Title + subtitle wrapper
353
- - `.pa-command-palette__item-title` - Item title (supports `<mark>` for search highlights)
354
- - `.pa-command-palette__item-meta` - Subtitle/metadata
355
- - `.pa-command-palette__preview` - Command step preview text
356
- - `.pa-command-palette__footer` - Keyboard hints bar
357
- - `.pa-command-palette__key` - Keyboard shortcut badge
392
+ - `.pa-command-palette__item-title` - Title (supports `<mark>` for highlights)
393
+ - `.pa-command-palette__item-meta` - Subtitle/metadata (shows `[code]` prefix when present)
394
+ - `.pa-command-palette__shortcut` - Hotkey badge group (flex container)
395
+ - `.pa-command-palette__key` - Keyboard key badge (themeable via `--pa-command-palette-key-bg/key-text`)
358
396
  - `.pa-command-palette__token-prompt` - Step prompt text between token badges
359
- - **Modes:** `/` commands, `:` context search, plain text global search
360
- - **Display styles:** Inline (everything in input) or Tokens (selections as badges)
397
+ - `.pa-command-palette__footer` - Keyboard hints bar
398
+ - `.pa-command-palette__empty` - Empty state message
399
+ - `.pa-command-palette__loader` - Loading spinner + text
361
400
 
362
401
  ### Toasts
363
402
  - `.pa-toast` - Base toast
package/dist/css/main.css CHANGED
@@ -6230,7 +6230,7 @@ a.pa-card p {
6230
6230
  border: 1px solid var(--pa-border-color);
6231
6231
  border-radius: var(--pa-border-radius);
6232
6232
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
6233
- z-index: 1000;
6233
+ z-index: 7500;
6234
6234
  display: none;
6235
6235
  flex-direction: column;
6236
6236
  padding: 0.4rem 0;
@@ -7819,7 +7819,7 @@ a.pa-card p {
7819
7819
  border: 1px solid var(--pa-border-color);
7820
7820
  border-radius: var(--pa-border-radius);
7821
7821
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.15);
7822
- z-index: 1000;
7822
+ z-index: 7500;
7823
7823
  overflow: hidden;
7824
7824
  }
7825
7825
  .pa-btn-split__menu--open {
@@ -8594,7 +8594,7 @@ a.pa-card p {
8594
8594
  border: 1px solid var(--pa-border-color);
8595
8595
  border-radius: var(--pa-border-radius);
8596
8596
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
8597
- z-index: 1060;
8597
+ z-index: 7600;
8598
8598
  }
8599
8599
  .pa-popover__content[data-show] {
8600
8600
  display: block;
@@ -13909,6 +13909,28 @@ code {
13909
13909
  pointer-events: none;
13910
13910
  z-index: 1;
13911
13911
  }
13912
+ .pa-command-palette__home {
13913
+ padding: 0.8rem 0;
13914
+ }
13915
+ .pa-command-palette__home-section:not(:first-child) {
13916
+ border-top: 1px solid var(--pa-border-color);
13917
+ margin-top: 0.4rem;
13918
+ padding-top: 0.4rem;
13919
+ }
13920
+ .pa-command-palette__home-heading {
13921
+ padding: 0.4rem 0.8rem;
13922
+ font-size: 1rem;
13923
+ font-weight: 600;
13924
+ color: var(--pa-text-color-2);
13925
+ text-transform: uppercase;
13926
+ letter-spacing: 0.05em;
13927
+ }
13928
+ .pa-command-palette__shortcut {
13929
+ display: flex;
13930
+ align-items: center;
13931
+ gap: 0.4rem;
13932
+ flex-shrink: 0;
13933
+ }
13912
13934
  .pa-command-palette__empty {
13913
13935
  padding: 4.8rem 0.8rem;
13914
13936
  text-align: center;
@@ -14003,8 +14025,8 @@ code {
14003
14025
  border: 1px solid var(--pa-border-color);
14004
14026
  border-radius: var(--pa-border-radius-sm);
14005
14027
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
14006
- font-weight: 500;
14007
- font-size: 1rem;
14028
+ font-weight: var(--pa-command-palette-key-font-weight);
14029
+ font-size: var(--pa-command-palette-key-font-size);
14008
14030
  line-height: 1;
14009
14031
  }
14010
14032
  .pa-command-palette__section {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keenmate/pure-admin-core",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Lightweight, data-focused HTML/CSS admin framework built with PureCSS foundation and comprehensive component system",
5
5
  "style": "dist/css/main.css",
6
6
  "exports": {
@@ -461,6 +461,8 @@
461
461
  --pa-command-palette-highlight-text: #{$command-palette-highlight-text};
462
462
  --pa-command-palette-key-bg: #{$subtle-bg};
463
463
  --pa-command-palette-key-text: #{$text-color-1};
464
+ --pa-command-palette-key-font-size: #{$font-size-xs};
465
+ --pa-command-palette-key-font-weight: #{$font-weight-semibold};
464
466
 
465
467
  // =========================================================================
466
468
  // MULTISELECT COLORS
@@ -156,6 +156,35 @@
156
156
  }
157
157
  }
158
158
 
159
+ // Home screen (idle state)
160
+ &__home {
161
+ padding: $spacing-sm 0;
162
+ }
163
+
164
+ &__home-section {
165
+ &:not(:first-child) {
166
+ border-top: $border-width-base solid var(--pa-border-color);
167
+ margin-top: $spacing-xs;
168
+ padding-top: $spacing-xs;
169
+ }
170
+ }
171
+
172
+ &__home-heading {
173
+ padding: $spacing-xs $command-palette-input-padding-h;
174
+ font-size: $font-size-2xs;
175
+ font-weight: $font-weight-semibold;
176
+ color: var(--pa-text-color-2);
177
+ text-transform: uppercase;
178
+ letter-spacing: 0.05em;
179
+ }
180
+
181
+ &__shortcut {
182
+ display: flex;
183
+ align-items: center;
184
+ gap: $spacing-xs;
185
+ flex-shrink: 0;
186
+ }
187
+
159
188
  // Empty state
160
189
  &__empty {
161
190
  padding: $command-palette-empty-padding-v $command-palette-input-padding-h;
@@ -271,8 +300,8 @@
271
300
  border: $border-width-base solid var(--pa-border-color);
272
301
  border-radius: var(--pa-border-radius-sm);
273
302
  font-family: $body-font-family;
274
- font-weight: $font-weight-medium;
275
- font-size: $font-size-2xs;
303
+ font-weight: var(--pa-command-palette-key-font-weight);
304
+ font-size: var(--pa-command-palette-key-font-size);
276
305
  line-height: 1;
277
306
  }
278
307
 
@@ -17,8 +17,8 @@ $z-index-toast: 8000 !default;
17
17
  $z-index-tooltip: 9000 !default;
18
18
 
19
19
  // Additional z-index values
20
- $z-index-dropdown: 1000 !default;
21
- $z-index-popover: 1060 !default;
20
+ $z-index-dropdown: 7500 !default;
21
+ $z-index-popover: 7600 !default;
22
22
  $z-index-loader: 10 !default;
23
23
  $z-index-command-palette: 10500 !default;
24
24
  $z-index-settings-panel: 10000 !default;