@keenmate/pure-admin-core 2.9.0-rc03 → 2.9.0-rc05
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 +55 -13
- package/dist/css/main.css +554 -7
- package/package.json +3 -1
- package/snippets/buttons.html +51 -0
- package/snippets/cards.html +132 -47
- package/snippets/comparison.html +26 -22
- package/snippets/manifest.json +180 -115
- package/snippets/range-group.html +125 -0
- package/snippets/splitter.html +44 -38
- package/snippets/statistics.html +31 -0
- package/src/js/btn-split-auto-absorb.js +327 -0
- package/src/js/command-palette.js +472 -0
- package/src/js/file-selector.js +1275 -0
- package/src/js/internal/logging.js +121 -0
- package/src/js/logic-tree-renderer.js +303 -0
- package/src/js/modal-dialogs.js +460 -0
- package/src/js/overflow.js +371 -0
- package/src/js/pa-stat-fit.js +184 -0
- package/src/js/range-group.js +663 -0
- package/src/js/search-autocomplete-v2.js +907 -0
- package/src/js/search-autocomplete.js +434 -0
- package/src/js/settings-panel.js +245 -0
- package/src/js/split-button.js +141 -0
- package/src/js/splitter.js +1323 -0
- package/src/js/toast-service.js +302 -0
- package/src/js/tooltips-popovers.js +275 -0
- package/src/js/virtual-scroll.js +143 -0
- package/src/js/virtual-textbox.js +803 -0
- package/src/scss/_core.scss +7 -0
- package/src/scss/core-components/_buttons.scss +44 -0
- package/src/scss/core-components/_cards.scss +95 -6
- package/src/scss/core-components/_overflow.scss +50 -0
- package/src/scss/core-components/_range-group.scss +474 -0
- package/src/scss/core-components/_statistics.scss +163 -0
- package/src/scss/variables/_components.scss +41 -2
package/README.md
CHANGED
|
@@ -2,22 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Lightweight, data-focused CSS/SCSS admin framework with Corporate theme as default.
|
|
4
4
|
|
|
5
|
-
## What's New in 2.9.0-
|
|
5
|
+
## What's New in 2.9.0-rc05
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
10
|
-
- **Rail width in `--pa-splitter-rail-size` now correctly resolves `rem` / non-px units.** Previously `parseFloat("4rem")` returned `4` and snapped rail panes to 4px-wide strips; rebuilt via a hidden probe element so the browser does the unit resolution. The three-step fallback chain (per-instance attribute → CSS var → literal 40) still applies.
|
|
11
|
-
- **Gutter highlighting now isolates the dragged gutter only.** During a drag, the splitter `--dragging` modifier suppresses `:hover` / `:focus-visible` on sibling gutters so they don't light up as the cursor passes over them or as a stale focus ring lingers — only the active gutter carries the highlight.
|
|
12
|
-
- **Splitter padding subtracted from available space.** Flex children sit inside the splitter's content box but `clientWidth` includes padding — without subtracting it the last pane's `flex-basis` overflowed and got clipped by `overflow: hidden`. Visible in the N-pane demo where the rightmost rail's right edge touched the splitter border.
|
|
7
|
+
- **Card header — one canonical structure (`.pa-card__title` + new `.pa-card__description`).** The header no longer has two blessed title shapes (bare `<h3>` vs `.pa-card__title`); `.pa-card__title` is now *the* title contract for every card, with the icon optional inside `.pa-card__title-icon` — so a `<Card>` component emits one DOM tree instead of branching on whether an icon was passed. The description is promoted from a bare `<p>` to a real `.pa-card__description` element, making the header fully `title` / `description` / `actions`.
|
|
8
|
+
- **Card footer — reuses `.pa-card__actions`, auto-pinned to the trailing edge.** Footer buttons go in the same actions slot as the header and hug the right automatically, with or without leading meta/text — no more empty spacer `<div>` to right-align them, and no bare buttons scattering to opposite corners.
|
|
9
|
+
- **Header polish: `--pa-card-description-offset-y` token + descender fix.** The (smaller) description now sits on the title's baseline via a per-theme-tunable nudge, and the title's `line-height` was corrected so glyph descenders (g / y / p) are no longer clipped by the header's overflow.
|
|
13
10
|
|
|
14
|
-
## What's New in 2.9.0-
|
|
11
|
+
## What's New in 2.9.0-rc04
|
|
15
12
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
13
|
+
- **New: Range Group — a compact multi-range filter (`.pa-range-group` + a reusable `.pa-range` slider).** One toggle summarises several numeric filters inline (`AGE 25–60 / SALARY $40,000–$200,000 / CHILDREN 2+`) and expands into a Floating-UI panel with one slider per dimension — standing in for a row of separate sliders in a filter bar. Per-row dual-thumb range or single-thumb threshold, RTL-correct by construction, with a `--pa-range-*` theming token namespace and a bubbling `change` / `apply` / `reset` event contract keyed by dimension.
|
|
14
|
+
- **Range Group sliders are richly interactive.** Major/minor tick marks with optional value labels, opt-in snap-to-tick, click-anywhere-to-seek tracks that grab the nearest handle, and five selectable handle shapes (circle, rectangle, bar, chevron, needle) — all pure CSS, mixable per row. Behaviour ships in the package as `range-group.js` (exposed via the `./js/*` export).
|
|
15
|
+
- **The package now ships the components' JavaScript (`src/js/`, via the `./js/*` export).** Interactive behaviours (split-button dropdowns, splitter drag, tooltips/popovers, toasts, command palette, …) were previously referenced in markup but never published; consumers now get the actual implementations instead of dangling handlers.
|
|
16
|
+
- **Stat square — fit-to-box mode (`data-pa-stat-fit` + `pa-stat-fit.js`).** The primary number scales to fill the tile at the largest font that still fits, and supporting rows (symbol, label, change, context) reveal by priority as the tile earns both width and height — one tile that adapts across dashboard sizes instead of a fixed layout.
|
|
17
|
+
- **Auto-absorb split-button toolbars (`.pa-btn-toolbar` + `pa-btn-split--auto-absorb`).** Sibling buttons fold into a split button's dropdown when the row runs out of width and pop back out as space returns, with per-button drop priority — progressive collapse without a parallel "more" menu.
|
|
18
|
+
- **`.pa-splitter` — `pa-splitter:resize` / `:collapse` / `:expand` `CustomEvent`s.** Three bubbling events fire from the affected pane (`resize.detail = { index, pane, size }`, collapse / expand detail = `{ index, pane }`) so consumers can wire sidebars, analytics, or persistence-coupled toolbars on the splitter root with a single delegated listener. `resize` is unfiltered — debounce in the handler. `collapse` / `expand` fire only on user-initiated transitions; init from saved state stays silent.
|
|
19
|
+
- **`.pa-splitter` — drag against a rail'd primary is now asymmetric.** Dragging outward (the direction that would grow the pane) releases the rail and follows the cursor; dragging inward (into the rail, would shrink further) is fully inert. Previously the drag-from-rail path pre-cleared `isMin` on `pointerdown` regardless of direction, so the card visually flashed out of its rail state before the user could express expand intent in the opposite direction — read as the splitter "guessing wrong". Mirrors `svelte-fluentui/MultiSplitter`'s drag-to-be-explicit gate.
|
|
20
|
+
- **`.pa-splitter` — tap-without-drag on the gutter no longer restores a rail'd pane.** Restore gestures are now: rail-body click, dblclick on the gutter, focus + `Enter`/`Space`, `[data-pa-splitter-toggle]` button, or drag outward past the snap threshold. Users expected drag-to-be-explicit and didn't connect "tap the gutter" with the rail-pane body as a restore surface.
|
|
21
|
+
- **`.pa-splitter` — per-pane orientation class** (`pa-splitter__pane--horizontal` / `--vertical`) stamped at registration. Forward-compat hook for theme authors writing nested-splitter-safe rail CSS without walking the DOM to figure out the enclosing splitter's orientation.
|
|
21
22
|
|
|
22
23
|
## Installation
|
|
23
24
|
|
|
@@ -65,6 +66,47 @@ $btn-primary-bg: #your-button-color;
|
|
|
65
66
|
@import '@keenmate/pure-admin-core/src/scss/main';
|
|
66
67
|
```
|
|
67
68
|
|
|
69
|
+
### JavaScript (Interactive Components)
|
|
70
|
+
|
|
71
|
+
The framework is CSS-first, but several components need a small vanilla-JS
|
|
72
|
+
behavior to work (no framework runtime, no build step required). These ship
|
|
73
|
+
in `src/js/` and are exposed under the `./js/*` export:
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
// Split buttons + the auto-absorb button toolbar
|
|
77
|
+
import '@keenmate/pure-admin-core/js/split-button.js'; // toggleSplitMenu()
|
|
78
|
+
import '@keenmate/pure-admin-core/js/btn-split-auto-absorb.js';
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Or via a plain script tag:
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<script src="node_modules/@keenmate/pure-admin-core/src/js/split-button.js"></script>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Each file is a self-contained IIFE that wires itself up on load (and exposes a
|
|
88
|
+
small global / `window.Pa*` API for re-init after dynamic markup injection).
|
|
89
|
+
Pull in only the files for the components you use:
|
|
90
|
+
|
|
91
|
+
| Component | File(s) |
|
|
92
|
+
|---|---|
|
|
93
|
+
| Split button dropdown | `split-button.js` (defines `toggleSplitMenu`) |
|
|
94
|
+
| Auto-absorb toolbar (`.pa-btn-toolbar`) | `split-button.js` **+** `btn-split-auto-absorb.js` |
|
|
95
|
+
| Tooltips / popovers | `tooltips-popovers.js` |
|
|
96
|
+
| Splitter | `splitter.js` |
|
|
97
|
+
| Toasts | `toast-service.js` |
|
|
98
|
+
| Command palette | `command-palette.js` |
|
|
99
|
+
| Progressive overflow | `overflow.js` |
|
|
100
|
+
| Fit-to-box stat | `pa-stat-fit.js` |
|
|
101
|
+
| Modal dialogs | `modal-dialogs.js` |
|
|
102
|
+
| Range group (`.pa-range-group` / `.pa-range`) | `range-group.js` |
|
|
103
|
+
|
|
104
|
+
**Positioning dependency:** `split-button.js`, `tooltips-popovers.js`, and
|
|
105
|
+
`range-group.js` use
|
|
106
|
+
[Floating UI](https://floating-ui.com) for dropdown/tooltip placement and
|
|
107
|
+
expect it on the page as the `window.FloatingUIDOM` global (e.g. the
|
|
108
|
+
`@floating-ui/dom` UMD build). Load it before those scripts.
|
|
109
|
+
|
|
68
110
|
## Using HTML Snippets
|
|
69
111
|
|
|
70
112
|
The `snippets/` directory contains clean HTML patterns for all components:
|