hazo_ui 2.9.0 → 2.16.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 ADDED
@@ -0,0 +1,500 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.16.0] - 2026-05-17
9
+
10
+ ### Changed
11
+ - **Restyled `HazoUiMultiSortDialog` and `HazoUiMultiFilterDialog`** for a
12
+ modern, Linear/Notion-style appearance:
13
+ - Tighter dialog chrome: bordered header, padded body, bordered footer
14
+ bar with subtle muted background — replaces the flat, dated look.
15
+ - **Sort dialog**: each row now shows a numbered priority badge, a
16
+ segmented Asc/Desc pill (replaces the ambiguous switch), and a muted
17
+ delete affordance that reddens on hover.
18
+ - **Filter dialog**: rows have compact mathematical operator symbols
19
+ (`=`, `≠`, `>`, `<`, `≥`, `≤`) in a narrow select; inputs are 32px
20
+ tall for a denser layout; rows match the sort dialog visually.
21
+ - **Footer hierarchy fixed**: `Clear all` is a low-emphasis ghost
22
+ button on the left; `Cancel` (outline) and `Apply` (primary) are
23
+ grouped on the right — `Apply` is the rightmost / final action.
24
+ - Trigger buttons now show an active-count badge next to the icon.
25
+ - Empty state uses a dashed-border placeholder card; the "Add field"
26
+ affordance matches and disables itself when all fields are added.
27
+ - **Dialog animation**: removed `slide-in-from-left-1/2` /
28
+ `slide-out-to-left-1/2` classes from `DialogContent`. Modals now
29
+ fade + zoom in place from center — no more horizontal "drift" that
30
+ caught the dialog mid-animation looking off-screen.
31
+
32
+ ### API
33
+ - All component props (including the color-override props on both
34
+ dialogs) are unchanged; this is a visual refresh, not a contract
35
+ change. Existing consumers do not need to update call sites.
36
+
37
+ ## [2.15.1] - 2026-05-17
38
+
39
+ ### Fixed
40
+ - **SSR/CSR hydration mismatch in HazoUiTable number/currency/percent
41
+ formatters.** `Intl.NumberFormat(undefined, …)` resolved to the
42
+ runtime's host locale, which differs between Node (server) and the
43
+ browser (client) — e.g. server `$4,812,500.00` vs. client
44
+ `US$4,812,500.00` when the browser default is `en-GB`. The library
45
+ now pins to `"en-US"` so both environments produce the same string.
46
+
47
+ ### Added
48
+ - New `locale?: string` on `TableColumn` (BCP-47 tag, e.g. `"de-DE"`,
49
+ `"ja-JP"`) — opt-out for the new pinned default. Applies to `number`,
50
+ `currency`, and `percent` formatters. Date formatting was unaffected
51
+ and is unchanged (it uses `date-fns`, not `Intl`).
52
+
53
+ ## [2.15.0] - 2026-05-17
54
+
55
+ ### Added
56
+ - **Shift-click multi-sort on `HazoUiTable` headers.** Plain header
57
+ click still cycles asc → desc → none (single column). Shift-click
58
+ a header to append it as a secondary sort, cycling that column
59
+ asc → desc → removed without collapsing prior columns. Discoverable
60
+ via a `title=` tooltip on the sort button. `useTableState.cycleHeaderSort`
61
+ gains an `append?: boolean` parameter; new `cycleAppendColumn` helper
62
+ alongside the existing `cycleSingleColumn`.
63
+ - **Column-level `currency` override on `TableColumn`.** When `formatter`
64
+ is `"currency"`, the formatter reads `column.currency` (any ISO-4217
65
+ code, e.g. `"EUR"`, `"GBP"`) instead of the previously hard-coded
66
+ `"USD"`. Defaults to `"USD"` when omitted — fully backwards-compatible.
67
+ - **Structured `onLoad` error UX.** `HazoUiTableProps` gains
68
+ `error?: React.ReactNode | ((err: unknown) => React.ReactNode)`.
69
+ `useTableState` exposes `serverError` (always `null` outside server
70
+ mode). On `onLoad` rejection, the table renders the consumer's
71
+ `error` prop in place of rows; if none is provided, a default
72
+ `EmptyState` shows the thrown message. `console.warn` continues to
73
+ log every rejection. Branch added to both the desktop `TableBody`
74
+ and the mobile card view.
75
+ - Dev-app `/table` §9 demos the error state with a rejecting loader.
76
+ §2 copy mentions the new shift-click gesture.
77
+
78
+ ### Internal
79
+ - Renamed `use_table_state` → `useTableState` (function only — the
80
+ filename stays `use_table_state.ts`). Aligns with the package's
81
+ other hooks (`useMediaQuery`, `useLoadingState`, `useErrorDisplay`)
82
+ and unblocks the `react-hooks/rules-of-hooks` lint rule.
83
+ - New ESLint v9 flat config (`eslint.config.js`) so `npm run lint`
84
+ works again. Scoped to `src/**/*.{ts,tsx}` with
85
+ `@typescript-eslint` and `react-hooks` rules.
86
+
87
+ ### Notes
88
+ - The 200 ms search debounce default is unchanged — the spec §10
89
+ follow-up about tuning needs empirical data from the sister app.
90
+ Consumers can already override per-table via `searchDebounceMs`.
91
+
92
+ ## [2.14.0] - 2026-05-17
93
+
94
+ ### Added
95
+ - **`Table` shadcn primitive family.** Eight components (`Table`,
96
+ `TableHeader`, `TableBody`, `TableFooter`, `TableRow`, `TableHead`,
97
+ `TableCell`, `TableCaption`) re-exported under bare shadcn names.
98
+ Matches the canonical shadcn shape — drop-in for consumers that want
99
+ raw markup.
100
+ - **`HazoUiTable` composite.** Column-config-driven data table that
101
+ composes the primitive with an in-memory filter/sort/paginate
102
+ pipeline:
103
+ - `TableColumn` is the single source of truth for display, sort,
104
+ filter, and search metadata.
105
+ - Sortable headers cycle asc → desc → none and replace any
106
+ multi-column sort with single-column on click. Multi-column sort
107
+ via the optional `HazoUiMultiSortDialog` integration; indicators
108
+ show order numbers.
109
+ - Optional toolbar with debounced free-text search (200 ms),
110
+ `HazoUiMultiFilterDialog`, and `HazoUiMultiSortDialog`. Available
111
+ fields are derived from columns — declared once.
112
+ - Loading state via `SkeletonBar`; empty / no-results via
113
+ `EmptyState`.
114
+ - Optional pagination footer with "Showing X–Y of Z" + Prev/Next.
115
+ - Optional row click with full mouse + keyboard support (Enter,
116
+ Space) when `onRowClick` is set.
117
+ - Mobile card-per-row fallback below a configurable breakpoint
118
+ (default 768 px). Opt out with `mobileCardFallback={false}`.
119
+ - Optional `onLoad({ page, sort, filter })` for server-side data;
120
+ latest-request-wins.
121
+ - Dev-app `/table` route with eight demo sections covering every
122
+ acceptance scenario.
123
+
124
+ ### Dependencies
125
+ - No new dependencies. Composes existing `Skeleton`, `EmptyState`,
126
+ `Card`, `Input`, `Button`, `HazoUiMultiSortDialog`,
127
+ `HazoUiMultiFilterDialog`, `useMediaQuery` from this package, plus
128
+ `date-fns` and `lucide-react` (already deps).
129
+
130
+ ## [2.13.1] - 2026-05-16
131
+
132
+ ### Changed
133
+ - **`KanbanEditor` is now built on `HazoUiDialog`** (was raw shadcn `Dialog` primitives). Picks up the standardized header (with `title` + `description` so Radix's missing-`Description` warning is gone naturally), the standardized Save/Cancel footer with built-in `actionButtonLoading` spinner + `actionButtonDisabled`, and a priority-tinted full-width header bar via `headerBar` + `headerBarColor` — reads `hsl(var(--hazo-kanban-priority-{p0..p3}))` for visual continuity with the card left borders. The Save button gets a `Check` icon for clarity.
134
+ - Auto-detect default editor now appends a **Status** select at the end (sourced from the kanban's `columns`), so users can move the card between columns from the editor out of the box without configuring `editorFields`.
135
+ - Field labels rendered slightly smaller and muted (`text-xs font-medium text-muted-foreground`) for a more compact SaaS density.
136
+
137
+ ### Added
138
+ - New `'status'` value on `KanbanEditorFieldType`. Renders a `Select` pre-populated from the kanban's `columns` prop (label = `column.title`, value = `column.key`). Bound to `columnKey` by convention; saving with a different status moves the card to a new column through the consumer's `onCardSave` handler — same code path as `onMove`.
139
+ - Dev-app §7 editor declares `{ key: 'columnKey', type: 'status', label: 'Status' }` so the demo exercises the new field type.
140
+
141
+ ### Removed
142
+ - The explicit `aria-describedby={undefined}` workaround on `DialogContent` from v2.13.0 — `HazoUiDialog` exposes a proper `description` prop that satisfies Radix without the escape hatch.
143
+
144
+ ## [2.13.0] - 2026-05-16
145
+
146
+ ### Changed (breaking, but pre-publish)
147
+ - **Renamed `HazoUiBoard` family to `HazoUiKanban`.** v2.12.0 was committed to git but never `npm publish`'d, so this is a hard rename with no deprecation shim. Affected exports: `HazoUiBoard` → `HazoUiKanban`, `HazoUiBoardFilter` → `HazoUiKanbanFilter`, `applyBoardFilter` → `applyKanbanFilter`, plus the corresponding type aliases (`BoardItem` → `KanbanItem`, etc.). CSS class prefixes `cls_hazo_board_*` → `cls_hazo_kanban_*`; CSS variables `--hazo-board-*` → `--hazo-kanban-*`. Dev-app route `/board` → `/kanban`.
148
+
149
+ ### Added
150
+ - **Out-of-the-box card editor.** Each card now carries a pencil icon (top-right, opacity-0 idle, opacity-100 on hover/focus). Clicking opens a `HazoUiDialog`-shell editor. Three rendering modes:
151
+ 1. `renderCardEditor` render-prop — full control over the body.
152
+ 2. `editorFields` declarative config — library renders one row per field declaration. Six built-in types: `text`, `textarea`, `select`, `number`, `checkbox`, `priority`. Required-field gating disables Save when text/textarea/number fields are empty.
153
+ 3. Neither — library auto-detects string-typed fields on the item (skipping `id`, `columnKey`, `priority`).
154
+ - **Async save lifecycle.** `onCardSave` returns `void | Promise<void>`. A returned Promise gates dialog close and shows a "Saving…" spinner; a rejected Promise keeps the dialog open with `ctx.error` populated. Consumer is responsible for updating `items` on success (symmetric with `onMove`).
155
+ - Seven new props on `HazoUiKanbanProps<T>`: `editorFields`, `editorPriorities`, `editorTitle`, `renderCardEditor`, `hideEditorFooter`, `onCardSave`, `disableEdit`.
156
+ - Four new public types: `KanbanEditorField`, `KanbanEditorFieldType`, `KanbanEditorCtx<T>`, `KanbanSaveEvent<T>`.
157
+ - Dev-app demo at `/kanban` extended with three new sections (§6 default editor, §7 declarative editor, §8 renderCardEditor override).
158
+
159
+ ### Fixed
160
+ - Suppressed Radix `DialogContent` missing-`Description` warning in `KanbanEditor` by setting `aria-describedby={undefined}` explicitly. Caught during the v2.13.0 smoke test — every editor open emitted a console warning under React strict mode.
161
+
162
+ ### Notes
163
+ - No new CSS variables — the editor uses existing shadcn Dialog tokens and input/select/checkbox/textarea/button variables.
164
+ - The pencil icon is hidden when `disableEdit={true}` OR `onCardSave` is not provided (no point letting the user edit if nothing happens on save).
165
+ - The pencil's `pointerdown`/`mousedown`/`keydown` events stop propagation so dnd-kit's PointerSensor doesn't interpret the click as the start of a drag.
166
+ - One shared `<KanbanEditor>` instance mounts at the orchestrator level, not one Dialog per card.
167
+ - No `SETUP_CHECKLIST.md` changes (no new setup steps for consumers).
168
+
169
+ ## [2.12.0] - 2026-05-16
170
+
171
+ ### Added
172
+ - **`HazoUiBoard`** — drag-drop kanban board primitive with mobile tab-strip / desktop column-grid layout switch via pure CSS. Wraps `@dnd-kit/*` internally; consumers see only the `HazoUi*` API. Optimistic-overlay state model: `items` is consumer-controlled; failed moves snap back via `handle.revert()` carried on the `BoardMoveEvent`.
173
+ - **`HazoUiBoardFilter`** — controlled-or-uncontrolled filter bar with free-text search, multi-select category chips (`ToggleGroup type="multiple"`), and single-select priority chips. Decoupled from `HazoUiBoard` — consumer applies the filter to `items` before passing in.
174
+ - **`applyBoardFilter`** — pure helper that filters `items` by search / categories / priority. Convenience export; consumers can swap in their own filter function.
175
+ - Keyboard navigation per `@dnd-kit/accessibility` patterns (Tab focus → Space pick up → Arrow keys → Space drop → Esc cancel).
176
+ - Custom screen-reader announcements that name the action and column; override-able via the `announcements` prop.
177
+ - New CSS custom properties in both `src/styles/globals.css` (dev-app input) and `src/styles/hazo-ui.css` (shipped to `dist/styles.css`): `--hazo-board-priority-p0..p3` (HSL channels), `--hazo-board-card-bg`, `--hazo-board-card-border`, `--hazo-board-column-gap`. Apps can re-theme by overriding any variable in their cascade.
178
+ - Dev-app demo at `dev-app/app/board/page.tsx` (route `/board`) with 5 sections: default kanban, controlled filter, uncontrolled filter, keyboard-only walkthrough, and optimistic-update + revert.
179
+
180
+ ### Fixed (during the v2.12.0 cycle)
181
+ - **dev-app `next build` failure on pre-existing UI components.** `dev-app/package.json` pinned `@types/react` to `18.3.28` (workspace-root version) so type-check no longer fails in `src/components/ui/button-group.tsx` and `toggle-group.tsx` with "Type 'bigint' is not assignable to type 'ReactNode'". Pre-existing infrastructure issue surfaced during board demo wiring.
182
+
183
+ ### Notes
184
+ - Sub-components `BoardColumn` and `BoardCard` are intentionally internal — the data-driven `HazoUiBoard` API (`columns`, `items`, `renderCard`) is the only entry point.
185
+ - `HazoUiBoard` passes a `React.useId()`-derived value as `DndContext`'s `id` prop so multiple boards on one page produce stable, SSR-deterministic `aria-describedby` IDs (no hydration warnings).
186
+ - No new dependencies (`@dnd-kit/*` was already in `dependencies` from prior versions).
187
+ - No `SETUP_CHECKLIST.md` changes (no new setup steps for consumers).
188
+
189
+ ## [2.11.0] - 2026-05-16
190
+
191
+ ### Fixed
192
+ - **Button inline-style fallback rendering as transparent** — the v2-era inline-style fallback used bare `var(--primary)` etc., which resolved to invalid CSS when consumers (per shadcn convention) store CSS variables as raw HSL channels (e.g. `--primary: 222.2 47.4% 11.2%`). All `Button` variants (default, destructive, outline, secondary) now wrap their fallback values in `hsl(...)`, matching the documented theme convention and Tailwind preset. Buttons rendered as transparent rectangles with text-only labels before this fix.
193
+ - `destructive` variant's inline-style `color` switched from hardcoded `"white"` to `hsl(var(--destructive-foreground))` for theme consistency.
194
+
195
+ ### Notes
196
+ - No API changes — pure visual fix. Consumers on the standard shadcn theme convention will see Buttons render correctly without any further changes.
197
+ - Consumers who set CSS variables as full color values (hex/rgb) instead of HSL channels should override via the `style` prop (this was never the documented convention).
198
+
199
+ ## [2.10.0] - 2026-05-16
200
+
201
+ ### Added
202
+ - **State primitives sub-module** — `Skeleton`, `SkeletonCircle`, `SkeletonBar`, `SkeletonRect`, `SkeletonGroup` with shimmer animation (respects `prefers-reduced-motion`).
203
+ - `EmptyState` component (icon + title + description + action).
204
+ - `ErrorBanner` component with `severity: 'warning' | 'error'`, auto icon, optional title/action/dismiss.
205
+ - `ErrorPage` component for full-page error fallback (title, description, errorCode, correlationId, actions).
206
+ - `LoadingTimeout` wrapper with 5s/15s/30s escalation (silent → gentle → firm → expired).
207
+ - `ProgressiveImage` (grey → blur LQIP → sharp).
208
+ - `HazoUiToaster` + `successToast(opts)` + `errorToast(opts)` imperative helpers — wraps `sonner`.
209
+ - `useLoadingState()` hook — `{ isLoading, setLoading, withLoading }`.
210
+ - `useErrorDisplay()` hook — passive `{ error, setError, clearError }`.
211
+
212
+ ### Changed
213
+ - Added `sonner ^2.0.7` to dependencies.
214
+ - Added `@keyframes hazo-shimmer` and `.hazo-shimmer` utility class to `src/styles/hazo-ui.css`.
215
+
216
+ ### Notes
217
+ - All new components use shadcn semantic tokens (`bg-muted`, `bg-destructive`, etc.) and direct utility classes for amber tones (no `--warning` token assumed).
218
+ - Components are exported flat & unprefixed from the top-level barrel — matches the existing `Button`/`Spinner`/`Card` convention.
219
+
220
+ ## [2.9.0] - 2026-05-12
221
+
222
+ ### Added
223
+ - **Drawer primitive** (`src/components/ui/drawer.tsx`): vaul-backed bottom sheet component following the shadcn/ui Drawer pattern. Exports `Drawer`, `DrawerTrigger`, `DrawerPortal`, `DrawerOverlay`, `DrawerContent`, `DrawerHeader`, `DrawerFooter`, `DrawerTitle`, `DrawerDescription`, `DrawerClose`. Uses dynamic viewport units (`max-h-[96dvh]`) so iOS Safari's address-bar toggling doesn't crop the sheet.
224
+ - **`useMediaQuery` hook** (`src/hooks/use_media_query.ts`): SSR-safe React hook returning whether a CSS media query matches. Re-renders on match changes. Use to fork mobile/desktop rendering (e.g. swap `Dialog` ↔ `Drawer` at `(max-width: 640px)`).
225
+ - **New dependency**: `vaul@^1.1.2` (~6 KB gz, MIT). React/react-dom peers are already covered by hazo_ui's existing peer range.
226
+
227
+ ### Notes for consumers
228
+ - The Drawer is intended for mobile bottom sheets. On desktop, prefer `Dialog`. Pattern:
229
+ ```typescript
230
+ import { Drawer, Dialog, useMediaQuery } from "hazo_ui";
231
+ const is_mobile = useMediaQuery("(max-width: 640px)");
232
+ const Shell = is_mobile ? Drawer : Dialog;
233
+ ```
234
+ - Snap points, side-anchored drawers (`top`/`left`/`right`), and nested drawers are not in scope for this primitive — pass through to vaul's API directly if needed in the meantime.
235
+
236
+ ## [2.8.0] - 2026-05-11
237
+
238
+ ### Added
239
+ - **shadcn/ui Primitive Re-exports (9 new primitives)**: AlertDialog, ButtonGroup, Card, Collapsible, ScrollArea, Separator, Spinner, Toggle, ToggleGroup
240
+ - All new primitives follow the existing shadcn/ui pattern and are re-exported from the package root
241
+ - Enables sibling hazo_* packages to import these UI primitives from a single source without managing separate Radix UI dependencies
242
+ - **6 new Radix UI dependencies**: `@radix-ui/react-alert-dialog`, `@radix-ui/react-collapsible`, `@radix-ui/react-scroll-area`, `@radix-ui/react-separator`, `@radix-ui/react-toggle`, `@radix-ui/react-toggle-group`
243
+
244
+ ### Fixed
245
+ - **CardTitle ref type**: Corrected generic type from `HTMLParagraphElement` to `HTMLHeadingElement` — the rendered element is `<h3>` so the ref must be typed accordingly
246
+
247
+ ## [2.7.3] - 2026-05-10
248
+
249
+ ### Changed
250
+ - **BREAKING (build/styling)**: Migrated internal build pipeline to **Tailwind CSS v4** (`tailwindcss@^4.2.4`).
251
+ - Replaced `tailwindcss-animate` with `tw-animate-css@^1.4.0`
252
+ - Replaced PostCSS plugins `tailwindcss + autoprefixer` with single `@tailwindcss/postcss` plugin (Lightning CSS handles vendor prefixing)
253
+ - Updated `src/styles/globals.css` to use Tailwind v4 entry: `@import "tailwindcss"` + `@import "tw-animate-css"` (replaces `@tailwind base/components/utilities`)
254
+ - Updated `tailwind.preset.js` to be v4-compatible (removed `tailwindcss-animate` plugin import)
255
+ - Bumped canonical workspace versions: `clsx@^2.1.1`, `tailwind-merge@^3.5.0`, `lucide-react@^0.553.0`, `typescript@^5.7.2`, `@types/react@^18.3.3`
256
+ - Dev-app migrated to Tailwind v4 mirror of the library configuration
257
+ - `HazoUiTextbox` / `HazoUiTextarea` test pages updated to use object-form `color` prop (`{ bg, fg, border }`) for prefixes — aligns with the production pill color model
258
+
259
+ ### Migration Notes for Consumers
260
+ - If you use the published `tailwind.preset.js`, no API changes are required.
261
+ - If you previously installed `tailwindcss-animate` for hazo_ui, replace it with `tw-animate-css` and load via `@import "tw-animate-css";` in your CSS.
262
+ - Tailwind v4 consumers must keep the `@source "../node_modules/hazo_ui/dist";` directive (already documented).
263
+
264
+ ## [2.7.2] - 2026-03-31
265
+
266
+ ### Added
267
+ - **HazoUiPillRadio**: Pill-shaped radio selection component
268
+ - Optional icons (react-icons compatible)
269
+ - Customizable accent colors per option
270
+ - Size variants (sm / md / lg)
271
+ - Horizontal or vertical layout
272
+ - Equal-width option for uniform pill widths
273
+ - Auto-fit vertical layout
274
+
275
+ ## [2.7.1] - 2026-03-27
276
+
277
+ ### Changed
278
+ - **BREAKING**: Renamed `DialogVariant` value `'danger'` to `'destructive'` in HazoUiDialog for consistency with HazoUiConfirmDialog
279
+ - Extracted shared `ANIMATION_PRESETS` and `resolve_animation_classes` into `src/lib/animations.ts` (used by both dialog components)
280
+ - Removed dead `example_component` placeholder from source
281
+
282
+ ### Added
283
+ - Re-exported `ANIMATION_PRESETS` and `resolve_animation_classes` from package root for consumer use
284
+ - Added `.superpowers` and `design` to `.npmignore`
285
+
286
+ ### Removed
287
+ - Unnecessary `esbuild` devDependency (tsup bundles its own)
288
+
289
+ ## [2.7.0] - 2026-03-26
290
+
291
+ ### Added
292
+ - **HazoUiConfirmDialog**: Compact confirmation dialog with variant-driven styling
293
+ - Variant system: default, destructive, warning, info, success
294
+ - Accent top border colored by variant
295
+ - Async `onConfirm` with auto-loading state
296
+ - Configurable buttons (confirm + optional cancel)
297
+ - ReactNode children or simple description string
298
+ - Focus management: cancel button receives focus for destructive/warning variants
299
+ - **shadcn/ui Primitive Re-exports**: All shadcn/ui base components now re-exported from hazo_ui
300
+ - Accordion, Button, Calendar, Checkbox, Command, DropdownMenu, HoverCard, Input, Label, Popover, RadioGroup, Select, Switch, Tabs, Textarea, Tooltip
301
+ - Enables sibling hazo_* packages to import UI primitives from a single source
302
+ - New Radix UI dependencies: `@radix-ui/react-accordion`, `@radix-ui/react-checkbox`, `@radix-ui/react-dropdown-menu`, `@radix-ui/react-hover-card`
303
+
304
+ ## [2.6.6] - 2026-03-25
305
+
306
+ ### Fixed
307
+ - Dialog title overlapping close button and not word-wrapping
308
+
309
+ ## [2.6.5] - 2026-03-24
310
+
311
+ ### Added
312
+ - `fixedSize` prop on HazoUiDialog — when true, `sizeHeight` becomes a fixed height instead of maxHeight
313
+
314
+ ## [2.6.4] - 2026-03-23
315
+
316
+ ### Fixed
317
+ - Button styling in dialog footer
318
+
319
+ ## [2.6.3] - 2026-03-22
320
+
321
+ ### Added
322
+ - Dialog `variant` prop with preset color themes (info, success, warning, destructive)
323
+ - Global `hazo_ui_config` system for theming buttons and headers
324
+ - Per-component color override props
325
+
326
+ ## [2.6.2] - 2026-03-21
327
+
328
+ ### Added
329
+ - Compositional Dialog API: re-exported shadcn/ui Dialog primitives as `HazoUiDialogRoot`, `HazoUiDialogContent`, etc. for complex layouts
330
+
331
+ ## [2.6.0] - 2026-03-20
332
+
333
+ ### Added
334
+ - **HazoUiDialog**: Standardized dialog component with comprehensive features
335
+ - Standardized header/footer layout with customizable content area
336
+ - Flexible animation system (9 presets + custom Tailwind classes)
337
+ - Responsive sizing with viewport-relative dimensions
338
+ - Background overlay customization
339
+ - CSS variable-based theming
340
+ - Header bar mode with colored full-width header
341
+ - Loading state and custom footer content support
342
+
343
+ ## [2.5.2] - 2026-03-19
344
+
345
+ ### Added
346
+ - Documentation updates for HazoUiDialog
347
+
348
+ ## [2.5.1] - 2026-03-18
349
+
350
+ ### Added
351
+ - `instance_id` prop documentation for command components
352
+
353
+ ## [2.5.0] - 2026-03-17
354
+
355
+ ### Added
356
+ - Multiple simultaneous command instances support
357
+
358
+ ## [2.4.0] - 2026-03-15
359
+
360
+ ### Added
361
+ - **HazoUiCommand**: Headless command/mention system for Tiptap
362
+ - Command pill rendering with prefix-based colors
363
+ - Popover suggestion menu
364
+ - Multiple prefix support (@, #, /, etc.)
365
+ - `parse_commands_from_text` and `text_to_tiptap_content` utilities
366
+ - **HazoUiTextbox**: Single-line input with command pill support
367
+ - **HazoUiTextarea**: Multi-line input with command pill support
368
+
369
+ ## [2.3.0] - 2026-03-10
370
+
371
+ ### Added
372
+ - **HazoUiRte**: Rich Text Editor component based on Tiptap v3
373
+ - Variable insertion system
374
+ - File attachment support
375
+ - HTML and plain text output modes
376
+ - Comprehensive toolbar with formatting options
377
+ - Font size and font family extensions
378
+ - Tailwind preset type declarations (`tailwind.preset.d.ts`)
379
+
380
+ ### Fixed
381
+ - SSR hydration issues
382
+
383
+ ## [2.2.0] - 2025-12-17
384
+
385
+ ### Added
386
+ - **HazoUiMultiFilterDialog**: Added optional `title` prop (default: "Filter") to customize dialog title
387
+ - **HazoUiMultiFilterDialog**: Added optional `description` prop (default: "Add multiple fields to filter by...") to customize dialog description
388
+ - **HazoUiMultiSortDialog**: Added optional `title` prop (default: "Sort") to customize dialog title
389
+ - **HazoUiMultiSortDialog**: Added optional `description` prop (default: "Add multiple fields to sort by...") to customize dialog description
390
+ - **CommandItem**: Added hover styling (`hover:bg-accent hover:text-accent-foreground cursor-pointer`) for better user experience
391
+ - **Documentation**: Added troubleshooting entries for dialog backdrop and dropdown styling issues
392
+
393
+ **Design Decision**: The `title` and `description` props were added to provide better customization flexibility for different use cases. For example, a product filtering dialog might want to display "Filter Products" instead of the generic "Filter", making the interface more contextual and user-friendly. These props maintain backward compatibility by providing sensible defaults.
394
+
395
+ ## [2.1.2] - 2025-12-17
396
+
397
+ ### Added
398
+ - Color support enhancements
399
+
400
+ ## [2.1.0] - 2025-12-17
401
+
402
+ ### Added
403
+ - **HazoUiFlexInput**: New enhanced input component with type validation, character restrictions, and error messaging
404
+ - Supports multiple input types: mixed (text), numeric, alpha (letters only), and email
405
+ - Real-time character filtering for numeric and alpha types
406
+ - Validation on blur with clear error messages
407
+ - Numeric constraints: min/max value validation and decimal precision control
408
+ - Length constraints: configurable minimum and maximum character lengths
409
+ - Custom regex pattern support
410
+ - Optional format guide helper text
411
+ - Fully typed TypeScript interfaces
412
+
413
+ **Design Decision**: HazoUiFlexInput extends the shadcn Input component to provide comprehensive validation without requiring external form libraries. The validation-on-blur approach prevents disruptive real-time error messages while users are typing, improving the overall user experience.
414
+
415
+ ## [2.0.0] - 2025-12-17
416
+
417
+ ### Added
418
+ - **HazoUiFlexRadio**: New flexible radio button/icon selection component
419
+ - Support for single and multi-selection modes
420
+ - Layout options: horizontal or vertical
421
+ - Style variants: radio button style or icon-only button style
422
+ - Integration with react-icons library (supports 10+ icon sets: fa, md, hi, bi, ai, bs, fi, io, ri, tb)
423
+ - Label control with show/hide options
424
+ - Tooltips with 1-second delay
425
+ - Fully controlled component with value/onChange pattern
426
+ - TypeScript support with complete type definitions
427
+ - Accessibility features using Radix UI primitives
428
+
429
+ **Design Decision**: HazoUiFlexRadio was designed to provide maximum flexibility for both traditional radio button interfaces and modern icon-based selection patterns. The dual-mode support (single/multi selection) reduces the need for separate checkbox implementations.
430
+
431
+ ## [1.0.0] - 2025-12-17
432
+
433
+ ### Added
434
+ - **HazoUiMultiFilterDialog**: Multi-field filtering component
435
+ - Support for text, number, combobox, boolean, and date field types
436
+ - Operator support for number and date fields (equals, greater than, less than, etc.)
437
+ - Dynamic field addition and removal
438
+ - Built-in field validation for text length, number ranges, and decimal precision
439
+ - Visual feedback with active filters tooltip
440
+ - Clear all filters functionality
441
+ - Responsive design for mobile and desktop
442
+ - TypeScript support with complete interfaces
443
+ - Accessibility using Radix UI primitives
444
+
445
+ - **HazoUiMultiSortDialog**: Multi-field sorting component with drag-and-drop
446
+ - Multiple sort fields with priority ordering
447
+ - Drag-and-drop reordering using @dnd-kit
448
+ - Direction toggle for each field (ascending/descending)
449
+ - Visual feedback during drag operations
450
+ - Clear all sorts functionality
451
+ - Tooltip display of active sort configuration
452
+ - Keyboard navigation support
453
+ - Responsive design
454
+ - TypeScript support
455
+ - Accessibility features
456
+
457
+ - **Base UI Components**: Shadcn/ui components integration
458
+ - Button, Dialog, Command, Popover, Select, Input, Label, Switch, Tooltip, Calendar
459
+ - Tailwind CSS theming with CSS variable support
460
+ - Light and dark mode support
461
+
462
+ - **Build Configuration**:
463
+ - tsup bundler for ESM + CJS outputs
464
+ - TypeScript declarations generation
465
+ - Tree-shakeable exports
466
+ - "use client" directive for Next.js compatibility
467
+
468
+ - **Development Tools**:
469
+ - Storybook integration for component development
470
+ - Next.js dev app for integration testing
471
+ - TypeScript strict mode
472
+ - ESLint configuration
473
+
474
+ **Design Decision**: The library was built on shadcn/ui and Radix UI primitives to ensure accessibility, maintainability, and consistency with modern React patterns. The choice of @dnd-kit for drag-and-drop provides excellent accessibility support compared to alternatives like react-beautiful-dnd.
475
+
476
+ ## [Unreleased]
477
+
478
+ ### Planned
479
+ - Additional field types for filtering (time, datetime, multi-select)
480
+ - Preset filter configurations for common use cases
481
+ - Export/import filter configurations
482
+ - Advanced sort options (null handling, case sensitivity)
483
+ - Performance optimizations for large datasets
484
+
485
+ ---
486
+
487
+ ## Version History Reference
488
+
489
+ - **2.7.3** - Tailwind v4 migration (internal build), tw-animate-css, canonical version sync
490
+ - **2.7.2** - HazoUiPillRadio component
491
+ - **2.7.1** - Rename 'danger' to 'destructive', extract shared animations, shadcn/ui re-exports
492
+ - **2.7.0** - HazoUiConfirmDialog, shadcn/ui primitive re-exports
493
+ - **2.6.x** - HazoUiDialog variants, compositional API, fixedSize, bug fixes
494
+ - **2.5.x** - Multiple command instances, dialog docs
495
+ - **2.4.0** - HazoUiCommand, HazoUiTextbox, HazoUiTextarea
496
+ - **2.3.0** - HazoUiRte rich text editor
497
+ - **2.2.0** - Customizable dialog titles and descriptions
498
+ - **2.1.0** - HazoUiFlexInput component
499
+ - **2.0.0** - HazoUiFlexRadio component
500
+ - **1.0.0** - Initial release with filter and sort dialogs