hazo_ui 6.15.0 → 6.18.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.
- package/CHANGE_LOG.md +91 -0
- package/README.md +13 -0
- package/dist/index.cjs +536 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -2
- package/dist/index.d.ts +33 -2
- package/dist/index.js +539 -7
- package/dist/index.js.map +1 -1
- package/dist/index.locale-picker.cjs +7 -1
- package/dist/index.locale-picker.cjs.map +1 -1
- package/dist/index.locale-picker.js +7 -1
- package/dist/index.locale-picker.js.map +1 -1
- package/package.json +6 -4
- package/tailwind-preset.cjs +120 -0
package/CHANGE_LOG.md
CHANGED
|
@@ -5,6 +5,97 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## v6.18.0 (2026-10-19)
|
|
9
|
+
|
|
10
|
+
### Changed — widened `hazo_i18n` peer range
|
|
11
|
+
|
|
12
|
+
- **`hazo_i18n` peer range widened to `^0.9.0 || ^0.15.0` (was `^0.9.0`).** This package
|
|
13
|
+
never imports `hazo_i18n` directly — only via `hazo_core/i18n`'s stable `registerCatalog()`
|
|
14
|
+
probe — so there is no real compatibility change. npm's caret on a `0.x` version only
|
|
15
|
+
matches that exact minor line (`^0.9.0` excludes `0.15.x`), so both lines must be listed
|
|
16
|
+
explicitly for a consumer installing `hazo_i18n` 0.15.x (e.g. Kinstripe's
|
|
17
|
+
dependency-hygiene cleanup) to see a valid peer.
|
|
18
|
+
|
|
19
|
+
### Added — EditableDataTable (paste, Enter-down navigation, header styling)
|
|
20
|
+
|
|
21
|
+
- **Paste support** — pasting TSV (`\t`-separated) or CSV (`,`-separated)
|
|
22
|
+
clipboard text into a text/number cell now expands across the editable
|
|
23
|
+
columns to the right of the pasted-into cell and down into as many rows
|
|
24
|
+
as the clipboard text has lines, creating new rows via `createRow()`
|
|
25
|
+
when the paste runs past the end of the current `rows` array. Only
|
|
26
|
+
targets `editable !== false` text/number columns — select/color
|
|
27
|
+
columns are left untouched by a paste that starts on or crosses one of
|
|
28
|
+
them, same restriction already in place for the Tab traversal. A
|
|
29
|
+
single-cell paste (no tab/comma/newline) is left to the browser's
|
|
30
|
+
native paste-into-input behavior, unchanged from before.
|
|
31
|
+
- **Enter moves focus down one row** — Enter still commits the current
|
|
32
|
+
cell (unchanged), and now also moves the active-edit target one row
|
|
33
|
+
down in the *same* column (spreadsheet-style), reusing the existing
|
|
34
|
+
`activeEditCell`/`forceEdit` cross-row focus mechanism that Tab already
|
|
35
|
+
relies on. On the last row there's no next row to move into; Enter just
|
|
36
|
+
commits in place, same as before this feature existed.
|
|
37
|
+
- **Clearer column headers** — the header `<TableRow>` now gets a
|
|
38
|
+
`bg-muted/60` background and a 2px bottom border, and each `<TableHead>`
|
|
39
|
+
label is bold, uppercase, and tracked (`font-semibold uppercase
|
|
40
|
+
tracking-wide text-[11px]`), so the header reads as a distinct visual
|
|
41
|
+
tier instead of blending into the first data row. No layout/API change.
|
|
42
|
+
- Tab/Shift+Tab navigation, inline-edit, add-row, delete-row, and
|
|
43
|
+
drag-reorder are all unaffected — existing tests extended, none
|
|
44
|
+
weakened. One pre-existing render-isolation test (100+ rows, "only the
|
|
45
|
+
edited row re-renders") was updated to also expect the Enter-down
|
|
46
|
+
target row (the row directly below the edited one) to re-render,
|
|
47
|
+
since forcing that row into edit mode is the whole point of the new
|
|
48
|
+
feature.
|
|
49
|
+
|
|
50
|
+
## v6.17.0 (2026-10-18)
|
|
51
|
+
|
|
52
|
+
### Added — EditableDataTable
|
|
53
|
+
|
|
54
|
+
- **`EditableDataTable`** — inline-editable data grid for small datasets.
|
|
55
|
+
Click-to-edit cells (text, number, select, color), add/delete rows, row
|
|
56
|
+
drag-reorder via @dnd-kit. Built on shadcn Table primitives. Separate from
|
|
57
|
+
`HazoUiTable` (read-only display with sort/filter/pagination). See README
|
|
58
|
+
for comparison.
|
|
59
|
+
- Test-app demo page at `/editable-table`.
|
|
60
|
+
|
|
61
|
+
### Fixed — EditableDataTable (final-review fixes)
|
|
62
|
+
|
|
63
|
+
- **Tab navigation sent focus to `document.body` in any table mixing
|
|
64
|
+
text/number columns with select/color columns.** The cross-row Tab
|
|
65
|
+
traversal (`activeEditCell`/`forceEdit`/`onTabOut`) included `select`/
|
|
66
|
+
`color` columns as possible targets, but `EditableCell`'s `forceEdit`
|
|
67
|
+
mechanism only does anything observable for `text`/`number` cells — for
|
|
68
|
+
`select`/`color` it was a no-op, so the computed target could never
|
|
69
|
+
actually receive focus and focus fell through to `document.body`
|
|
70
|
+
instead of reaching the next row. `select`/`color` columns are now
|
|
71
|
+
excluded from this traversal entirely (same as the delete/add buttons
|
|
72
|
+
already were); they remain reachable via native Tab/click, unchanged.
|
|
73
|
+
Affects every consumer whose columns mix types — e.g. hazo_canvas's
|
|
74
|
+
Sankey/Dagre/Network node tables (which end in a color column) and
|
|
75
|
+
Sankey's link table (two select columns before its number column).
|
|
76
|
+
- **Editing one cell in a 100+ row table re-rendered every row.**
|
|
77
|
+
`SortableRow` is now wrapped in `React.memo`, and row rendering is
|
|
78
|
+
restructured into a new, module-scope `React.memo`'d row component with
|
|
79
|
+
stable, ref-backed callbacks — so editing one row no longer forces every
|
|
80
|
+
other row's cells to re-render. No API change.
|
|
81
|
+
|
|
82
|
+
## v6.16.0 (2026-10-15)
|
|
83
|
+
|
|
84
|
+
### Added — Tailwind v3 preset + responsive AppHeader
|
|
85
|
+
|
|
86
|
+
- **`hazo_ui/tailwind-preset`** — Tailwind CSS v3 preset that maps all
|
|
87
|
+
hazo_theme Tier-2 semantic tokens (background, primary, sidebar, etc.)
|
|
88
|
+
and Tier-3 chrome tokens (navbar, footer, footer-public, footer-app,
|
|
89
|
+
toolbar) to `hsl(var(--token) / <alpha-value>)` color utilities. Also
|
|
90
|
+
provides `borderRadius` mappings for `--radius`. Consumers add
|
|
91
|
+
`presets: [require('hazo_ui/tailwind-preset')]` to their
|
|
92
|
+
`tailwind.config` instead of hand-rolling 100+ color entries.
|
|
93
|
+
|
|
94
|
+
- **Responsive `AppHeader`** — below the `md:` breakpoint the navItems
|
|
95
|
+
slot collapses behind a hamburger button that opens a slide-up drawer
|
|
96
|
+
(vaul). Actions (profile menu, etc.) remain visible at all widths. No
|
|
97
|
+
API change; existing consumers get mobile support for free.
|
|
98
|
+
|
|
8
99
|
## v6.15.0 (2026-10-13)
|
|
9
100
|
|
|
10
101
|
### Added — `useHazoEvent` hook
|
package/README.md
CHANGED
|
@@ -3932,6 +3932,19 @@ display states automatically: loading skeleton, empty state, and populated list.
|
|
|
3932
3932
|
|
|
3933
3933
|
---
|
|
3934
3934
|
|
|
3935
|
+
## Table Components
|
|
3936
|
+
|
|
3937
|
+
hazo_ui ships two table components for different use cases:
|
|
3938
|
+
|
|
3939
|
+
| Component | Purpose | Editing | Pagination | Server-side data |
|
|
3940
|
+
|-----------|---------|---------|------------|-----------------|
|
|
3941
|
+
| `HazoUiTable` | Read-only data display | No | Yes | Yes (`onLoad`) |
|
|
3942
|
+
| `EditableDataTable` | Inline data editing | Click-to-edit cells, add/delete/reorder rows, Tab/Shift+Tab + Enter navigation, TSV/CSV paste | No | No |
|
|
3943
|
+
|
|
3944
|
+
**Use `HazoUiTable`** for dashboards, admin lists, and any table where users browse but don't modify data in-place.
|
|
3945
|
+
|
|
3946
|
+
**Use `EditableDataTable`** for forms, configuration panels, and data editors where users need to create, modify, and reorder small datasets (typically <100 rows) with immediate feedback.
|
|
3947
|
+
|
|
3935
3948
|
## HazoUiTable — Column-config-driven Data Table (v2.14.0+, v2.15 additions)
|
|
3936
3949
|
|
|
3937
3950
|
A higher-level data table that composes the shadcn `Table` primitive
|