najm-kit 2.11.13 → 2.11.15

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/CHANGELOG.md CHANGED
@@ -1,376 +1,411 @@
1
- # Changelog
2
-
3
- ## 2.11.13 - 2026-09-04
4
-
5
- - Fixed the documented `common.feedback.<field>` convention so all shared
6
- loading, empty, error, forbidden, and not-found states resolve localized
7
- labels without an application-owned `feedbackDefaults` key map. Missing
8
- convention keys still fall back to the packaged English labels.
9
- - Forwarded Najm i18n's missing-key fallback and language-direction resolver
10
- through `NajmAppProvider`, keeping language changes reactive for partial
11
- catalogs and non-Arabic RTL languages.
12
-
13
- ## 2.11.10 - 2026-09-03
14
-
15
- - Fixed the selected numbered `NTable` pagination button inheriting the regular
16
- foreground colour over its filled primary style. The active page now keeps
17
- the primary button foreground token, which is white in the light theme.
18
- - Fixed focused invalid inputs combining a destructive border with the normal
19
- theme focus colour. `BaseInput` now keeps the visible keyboard-focus ring but
20
- colours it from the destructive token for both directly focused composite
21
- controls and wrappers whose child has `:focus-visible`.
22
- - Made the desktop and mobile sidebar use logical inline edges, spacing, border
23
- utilities, chevrons, and drag direction so the complete rail behaves
24
- correctly in both LTR and RTL layouts.
25
-
26
- ## 2.11.9 - 2026-08-30
27
-
28
- - Fixed card grids that paginate client-side rendering their entire dataset on
29
- one page. `useTable` pinned an uncontrolled paged card list to `data.length`,
30
- a branch that predates the container measurement added in 2.2.0 and was never
31
- reconciled with it: `calculatedCardPageSize` was measured and published, but
32
- only ever applied to a server-paginated grid. A 500-row list rendered 500
33
- cards on page one, reported a single page, and showed 500 as the current
34
- Rows/page value. The measured size is now applied to an uncontrolled card grid
35
- too, through the guards that already keep a server-paginated one stable
36
- geometry bucketing, the per-container report budget, and the deferral until
37
- real cards have been measured. That loop is a property of the measurement
38
- rather than of fetching: page size decides which cards render, and rendered
39
- cards are what card height is measured from. Rendering every supplied row
40
- stays the behavior wherever there is nothing to measure against, so
41
- `dynamicHeight={false}` and a container that has not yet reported a layout are
42
- unchanged, and a controlled `pagination` prop or an explicit Rows/page choice
43
- still wins.
44
-
45
- ## 2.11.8 - 2026-08-28
46
-
47
- - Fixed `NContextMenu` leaving keyboard focus on its opener after the menu
48
- appeared. The first enabled action now receives focus, disabled actions are
49
- skipped, Arrow Up/Down wrap, Home/End jump to the bounds, Tab dismisses the
50
- menu, and Escape restores focus to the opener. Focused actions also receive
51
- the same visual treatment as hovered actions.
52
-
53
- ## 2.11.7 - 2026-08-17
54
-
55
- - Fixed date, combobox, and multiselect `FormInput` controls reaching the
56
- accessibility tree with no accessible name. These types render their trigger
57
- as a styled `div`, so the `<label for>` that `FormControl` wires up pointed at
58
- a non-labelable element and named nothing: screen readers announced an unnamed
59
- control, and `getByRole(..., { name })` could not resolve one. The form label
60
- now becomes the trigger's `aria-label`, and `DateInput` and `ComboboxInput`
61
- accept an explicit `ariaLabel` to override it. `select` keeps naming itself
62
- from `ariaLabel || placeholder`; renaming it would break consumers that select
63
- it by placeholder today.
64
- - Fixed `DateInput` rendering its popover trigger as a `div`. Radix only merges
65
- trigger props onto the child, so the control had no role, no tab stop, and no
66
- keyboard activation it was unreachable without a mouse. It is now a real
67
- `<button type="button">`, which also keeps it from submitting the surrounding
68
- form when the calendar opens.
69
-
70
- ## 2.11.6 - 2026-08-15
71
-
72
- - Fixed `FormInput` dropping React Hook Form's native field binding for text,
73
- number, password, textarea, and time controls. These controls now forward
74
- their field name, composed blur handler, and focus ref to the actual native
75
- element, preserving browser form semantics, touched-state tracking, and
76
- programmatic focus without changing composite-control contracts.
77
-
78
- ## 2.11.5 - 2026-08-14
79
-
80
- - Fixed numbered lists staying on an invalid final page after a deletion or
81
- another mutation reduced the server total. Paged lists now clamp before
82
- slicing their row buffer, render the previous valid page immediately, and
83
- reconcile the controlled pagination state without showing a false empty
84
- state. A genuinely empty result still remains on page one.
85
- - Fixed panel feedback states stretching their icon, copy, and action across
86
- separate grid rows in tall table and dialog bodies. Panel content now stays
87
- together in one centered vertical stack with consistent spacing.
88
-
89
- ## 2.11.4 - 2026-08-12
90
-
91
- - Fixed server-paginated card grids briefly rendering at a placeholder-derived
92
- page size before correcting to the real card height. Card mode now waits for
93
- real rows and publishes the measured fit before their first paint; fixed-row
94
- table sizing remains immediate during loading.
95
-
96
- ## 2.11.3 - 2026-08-12
97
-
98
- - Fixed `NTable` replacing or clipping an explicit Rows/page choice when
99
- `dynamicHeight` was enabled. Automatic fit sizing still owns the initial page
100
- size; after the reader chooses a value, the table preserves it and scrolls
101
- its bounded body when the requested rows exceed the measured fit.
102
-
103
- ## 2.11.2 - 2026-08-11
104
-
105
- - Fixed `PasswordInput` forwarding native input attributes such as generated
106
- form IDs and ARIA metadata to the actual `<input>`, restoring programmatic
107
- label association for assistive technology and browser automation.
108
-
109
- ## 2.11.1 - 2026-08-11
110
-
111
- - Fixed `NajmThemeProvider` precedence so an explicit runtime `mode` overrides
112
- a preset stored in the design config. An explicit `preset` prop still wins,
113
- allowing deliberately fixed-preset subtrees without producing mixed light
114
- and dark application surfaces.
115
-
116
- ## 2.11.0 - 2026-08-10
117
-
118
- - Gave every keyboard-focusable primitive a visible focus ring, from one shared
119
- source: `focusRingClasses` and `focusRingWithinClasses`, exported from the
120
- root barrel so consumers stop hand-rolling app-level focus CSS. `TabsContent`
121
- is keyboard-focusable (Radix sets `tabIndex={0}`) and previously showed no
122
- indicator at all; `CollapsibleTrigger` now carries its own ring rather than
123
- relying on whatever it wraps. `BaseInput` paints the ring on the wrapper via
124
- `has-[:focus-visible]:`, which is what finally gives `NumberInput` and the
125
- multi-select trigger an indicator — both suppress the inner control's ring,
126
- so focusing the child element used to change only the border colour.
127
- - Fixed `Dialog` focus restoration. The opener is captured in
128
- `onOpenAutoFocus` and refocused on close when focus would otherwise land on
129
- `<body>`, so dismissing a dialog with Escape returns the keyboard to the
130
- control that opened it (WCAG 2.4.3) instead of stranding it at the top of
131
- the document. A caller that calls `preventDefault()` on the close event still
132
- owns focus entirely.
133
- - Added `NCredentialsCard`, a one-time handover surface for freshly generated
134
- secrets. Renders a description list of fields with monospaced, break-all
135
- values, an optional header icon that defaults to a check mark, an optional
136
- consumer `actions` slot, and a built-in Copy button. The Copy action resolves
137
- text through `copyText` when supplied or joins `${label}: ${value}` with
138
- `\n` in field order otherwise. The button is disabled while a clipboard
139
- write is pending; on success it swaps to a check icon and `copiedLabel`,
140
- on failure to a warning icon and `copyErrorLabel`, and either state reverts
141
- to idle after roughly two seconds. Header and field icons are marked
142
- decorative, status is announced through a polite `aria-live` region, and
143
- the Copy button renders before consumer actions so a Done-style dismiss
144
- stays the last tab stop. The component never rethrows: a missing
145
- `navigator.clipboard`, a rejected or synchronously thrown `writeText`, and
146
- a synchronously thrown `copyText` all land in the error state with
147
- `onCopyError` invoked. State updates and revert timers are guarded so
148
- unmounting during a pending copy, or starting a second copy while the
149
- first success state is still showing, never fire stale setters. Logical
150
- spacing properties keep the layout correct under `dir="rtl"` without a
151
- consumer override, and each value carries `dir="auto"` so it resolves its own
152
- text direction: credentials are weak-directionality strings, and inheriting an
153
- ambient `rtl` paints `+1 555 0100` as `0100 555 1+` and `p@ssw0rd!` as
154
- `!p@ssw0rd` while the DOM and the copied text stay correct. A genuinely Arabic
155
- value still renders right-to-left. Packaged English fallbacks ship for the three action
156
- labels only; every field label, title, and description is the consumer's
157
- text. Exported as `NCredentialsCard`, `NCredentialField`,
158
- `NCredentialsCardProps`, and `NCredentialsCardClassNames` from the root
159
- barrel and from `packages/najm-kit/src/components/data-display`.
160
- - Added a shared `surface` contract across `NLoadingState`, `NErrorState`, and
161
- `NEmptyState`. `inline` (default) preserves existing behavior; `panel` adds a
162
- centered minimum-height frame for table, card, dialog, and sheet bodies
163
- without a page gutter or a landmark; `page` uses the configured page
164
- spacing through `NPageLayout as="div"` so it never introduces a nested
165
- `<main>`. `NLoadingState.fullScreen` keeps precedence over `surface`.
166
- - Added `NForbiddenState` and `NNotFoundState` as first-class generic Kit
167
- components. Both default to the page surface, ship token-backed default
168
- icons (`ShieldOff`, `Compass`), and resolve title and description through
169
- the new provider defaults. Neither knows the dashboard URL, renders a Next
170
- `Link`, redirects, or writes route metadata.
171
- - Added `feedbackDefaults` to `NajmUIProvider`. It is inherited by
172
- `NajmNextUIProvider` and `NajmAppProvider` through TypeScript no second
173
- adapter prop or translation source. Labels resolve through the existing
174
- structural `t` (most specific: explicit prop > literal default > translated
175
- key > packaged English). Generic error body copy and empty description
176
- deliberately have no packaged fallback so the no-provider render is
177
- unchanged.
178
- - Exported the new feedback components and props (`NLoadingStateProps`,
179
- `NErrorStateProps`, `NEmptyStateProps`, `NForbiddenStateProps`,
180
- `NNotFoundStateProps`, `NFeedbackSurface`, `NFeedbackDefaults`,
181
- `NFeedbackLabels`, `NFeedbackLabelKeys`, `NFeedbackIconSize`) from the root
182
- barrel and re-exported them directly from `najm-kit/app` so a Next Server
183
- Component route can render them without authoring a local `"use client"`
184
- wrapper. The root entry stays free of `"use client"` and continues to
185
- share a single `NFeedbackDefaultsContext` across `index` and the adapters.
186
-
187
- ## 2.10.0 - 2026-08-10
188
-
189
- - Added a shared, failure-aware media source chain for `NAvatar`, `NImage`, and
190
- the new Next-only `NNextImage` export. Sources reset cleanly when inputs or
191
- cache versions change, duplicate candidates are tried once, consumer event
192
- handlers are preserved, and failed avatars return to initials without a
193
- broken-image glyph.
194
- - `NAvatar` now uses a native lazy-loaded image so loading and error events are
195
- observable, keeps initials visible until the image paints, supports native
196
- `imageProps`, and actually tries `fallbackSrc` after a primary failure.
197
- - Added provider-level status badge defaults and the public
198
- `normalizeStatusToken` helper. Applications can configure translated status
199
- labels, colors, icons, look, shape, and size once while explicit badge props
200
- retain precedence.
201
- - Added `NNextImage` and `NNextImageProps` to `najm-kit/next` only, preserving
202
- Next Image `fill`, `sizes`, optimizer, and `unoptimized` controls without
203
- adding Next.js to the root runtime graph.
204
-
205
- ## 2.9.0 - 2026-08-09
206
-
207
- - Added `najm-kit/server`, a pure UI bootstrap loader. `createUiBootstrapLoader()`
208
- takes the application's own fetcher, endpoint paths, payload parsers, and
209
- factory values, then runs the resources concurrently, unwraps the `{ data }`
210
- envelope (or one the application selects), and falls back per resource so a
211
- branding outage never discards a valid appearance. Failures are reported
212
- through an optional structured `onDiagnostic` callback carrying resource,
213
- reason, path, and status never a response body, header, cookie, or raw
214
- thrown value. A `fallback()` that throws stays a visible error. The entry
215
- imports no React, no Next.js, and no Node built-in, and re-exports
216
- `parseNajmDesignConfig` so an appearance payload can be parsed without
217
- reaching the root barrel.
218
- - Added `najm-kit/server/react`, the React Server Component adapter.
219
- `createReactServerUiBootstrap()` memoizes one bootstrap per request with
220
- React's `cache()` and derives the per-resource accessors from it, so a root
221
- layout, a nested layout, and a page share one resolution and one stable
222
- snapshot for the whole render. Resolution is request-scoped only: separate
223
- requests share no snapshot, failure, or diagnostic, and a transient outage is
224
- retried on the next request. The `browser` export condition resolves to a
225
- module that throws, so importing the adapter from a Client Component fails at
226
- build time instead of shipping the application's fetcher and factory values
227
- into a browser bundle.
228
- - The root `najm-kit`, `najm-kit/next`, and `najm-kit/app` entries are unchanged
229
- and do not reach either server entry.
230
-
231
- ## 2.8.2 - 2026-08-08
232
-
233
- - Added the framework-neutral `najm-kit/person-images` subpath. It ships a
234
- built-in resolver for `child`, `adult`, `parent`, and `family` roles with
235
- the seven WebP illustrations embedded as base64 data URLs, plus
236
- `createPersonImageResolver` so an application can declare its own role
237
- names (`teacher`, `student`, `doctor`, `driver`, …) and TypeScript catches
238
- unknown role strings at the call site. The root `najm-kit` entry stays
239
- unchanged and does not pull in the person images.
240
-
241
- ## 2.8.1 - 2026-08-08
242
-
243
- - Added schema-driven form development tools to `NajmAppProvider`. Passing
244
- `formDevTools` enables F8 filling for every `NForm` and `WizardForm` without
245
- an application helper or additional provider.
246
- - Added built-in Zod 4 form-value generation with per-form overrides for
247
- relation fields and other application-owned values. Existing explicit
248
- `devTools.enabled` and `devTools.fill` usage remains supported.
249
-
250
- ## 2.8.0 - 2026-08-08
251
-
252
- - Added server-safe `najm-kit/format` helpers for currency minor units,
253
- numbers, percentages, dates, times, relative time, tokens, local date inputs,
254
- and slugs. Client applications can use the same contract reactively through
255
- `NajmFormatProvider` and `useNajmFormat`.
256
- - Added the server-safe `najm-kit/pagination` offset protocol, including bounded
257
- page creation, total-aware continuation, probe-row continuation for APIs
258
- without totals, and query cleanup that preserves meaningful `false` and `0`.
259
- - Added the optional-peer `najm-kit/query` entry with offset infinite-query and
260
- responsive paged/card-list hooks, plus shared card-pagination adapters and
261
- localized continuation labels.
262
- - Extended `NajmAppProvider` with formatting locale, currency, and placeholder
263
- configuration so applications can bind language, time zone, and formatting
264
- without another host bridge provider.
265
- - Added shared media-query/card-viewport helpers and avatar-source utilities.
266
-
267
- ## 2.6.2
268
-
269
- - Added `NSidebarProvider` and `useNSidebar`, so sidebar state can be read from a distance. `NSidebar` renders beside the page content rather than around it, which left applications hand-rolling a context to hand `setMobileOpen` down to a page header — a wrapper component plus an aliased import at every call site. Wrap the shell in `NSidebarProvider` and `NPageHeader` now resolves both `onSidebarOpen` and `mobileBreakpoint` from it, so a header nested anywhere below renders a working mobile trigger with no props threaded to it. Also exports the `NSidebarContextValue` type.
270
- - `NSidebar` resolves its open and collapsed state as explicit prop → surrounding provider → internal state. Passing `collapsed`, `mobileOpen`, `onCollapsedChange`, or `onMobileOpenChange` keeps behaving exactly as before, and a sidebar with no provider around it still owns its own state, so this is additive for every existing consumer.
271
- - `logo` accepts a render prop, `({ collapsed, isMobile }) => ReactNode`, alongside the existing node. It receives the state the sidebar actually resolved — including whatever `autoCollapseAt` decided — which consumers previously had to approximate with their own responsive classes, guessing at a breakpoint the sidebar had already computed. The mobile drawer always reports `collapsed: false`, matching how it renders. Exported as `SidebarLogoRender`.
272
-
273
- ## 2.6.1
274
-
275
- - Fixed the non-card `NPageHeader` bleed never taking effect. 2.6.0 cancelled the page padding with the Tailwind utilities `-mt-[var(--najm-section-gap,0px)]` and `-mx-[var(--najm-page-gutter,0px)]`, which only work if the consuming app's Tailwind build happens to emit those arbitrary classes — they exist nowhere but inside this package's bundle, so a consumer could load a stylesheet without them and the header stayed exactly where it was. The offsets are inline styles now and no longer depend on the consumer's CSS pipeline.
276
-
277
- ## 2.6.0
278
-
279
- - Added `NThemePresets`, and wired it into `NThemeCustomizer` through `presets`, `selectedPresetId`, `presetsStatus`, `savedDesign`, `onPresetSelect`, `onPresetSave`, `onPresetDelete`, and `presetLabels`. The picker renders only when a host supplies both `presets` and `onPresetSelect`. It is presentational: the host owns where presets live and what saving one means, and selecting a row hands the design back so it can be previewed before anything is stored. Each row draws a swatch strip from the design's own `sidebar`, `primary`, `secondary`, `accent`, and `background` tokens; the selected row's check sits left in the success colour and per-row delete sits right. Omit `onPresetSave` or `onPresetDelete` to hide those controls. Deleting is pointer-only — Radix owns roving focus inside the listbox.
280
- - **`NPageHeader` in non-card mode is now flush.** It rendered as a full-bleed bar (`border-b`, no radius) but still sat inside the padding `NPageLayout` applies, so it floated below and inside the page gutter and its bottom rule never met the sidebar header's. It now cancels that padding, and its base height goes `min-h-12` → `min-h-14` to match `NSidebarHeader`. **Non-card page headers move up and out to the page edges, and grow 8px below `sm`.** Card mode is unchanged.
281
- - `NPageLayout` publishes its resolved spacing as `--najm-page-gutter` and `--najm-section-gap`. Descendants could not previously cancel the page padding: a design config resolves the gutter to a literal, so the pre-existing `--page-gutter` / `--section-gap` variables only ever held the fallbacks. Full-bleed children should negate these, with `0px` fallbacks so they stay inert outside `NPageLayout`.
282
- - Fixed `SelectInput` discarding `SelectItemType.icon`. The prop was declared but `renderItems` rendered the label alone, so every per-item icon was silently dropped. Items with an icon now render it before a truncating label; items without one are unchanged.
283
-
284
- ## 2.5.0
285
-
286
- - Added `NTableDefaultsProvider`, so an application supplies `paginationLabels` once instead of at every table. Labels merge per key, most specific first: a table's own `paginationLabels` override the provider's for the keys it sets, the provider covers the rest, and anything neither supplies falls back to the packaged English. Also exports `useNTableDefaults` and the `NTableDefaults` type.
287
- - `value` is passed through the provider unmemoized; memoize it in the caller, or every table below re-renders with the shell.
288
-
289
- ## 2.4.0
290
-
291
- - `NTablePagination` renders numbered page buttons instead of `Page X of Y`. The window shows the first and last page, the current page, and one page either side, collapsing the rest into at most two gaps. The slot count is constant for any result longer than the window, so the bar does not change width as the reader pages through it, and a gap never stands in for a single page — that slot goes to the page instead.
292
- - Added `paginationVariant`, defaulting to `"numbered"`. Pass `"compact"` to keep the previous position text with first/previous/next/last controls. **This changes the default appearance of every paginated `NTable`.**
293
- - The numbered variant drops the first/last double chevrons, because page 1 and page N are now single-click targets of their own. Previous and next remain. The compact variant is unchanged.
294
- - Numbered pages fall back to compact on their own when the page count is not trustworthy — that is, under `manualPagination` with no `pageCount` supplied, where TanStack infers a count from the rows it happens to hold rather than from a result total. Numbering that would invite clicks on pages that may not exist is not rendered.
295
- - Below the `sm` breakpoint the numbers give way to the position text; seven page buttons plus the rows-per-page select do not fit a phone.
296
- - Added `paginationLabels` so the bar can be localized: `rowsPerPage`, `pagination`, `goToPage`, `currentPage`, `firstPage`, `previousPage`, `nextPage`, `lastPage`, `pageOf`, and `rowsSelected`. All optional, all falling back to the previous English strings.
297
- - Pagination chevrons now mirror under `dir="rtl"`. They previously pointed against the reading direction in right-to-left layouts.
298
- - The page controls are wrapped in a labelled `nav`, and the current page carries `aria-current="page"`.
299
- - Exported `buildPageItems` and `NTablePageItem` for consumers that need the same windowing outside the table.
300
-
301
- ## 2.2.1
302
-
303
- - Fixed a regression in 2.2.0: the dynamic page size reported under `manualPagination` could oscillate. Card row height is measured from rendered cards, so it grows as images decode; feeding that back into the page size refetched, re-rendered, re-measured, and refetched again. A list visibly settled from one page size to another with the loading skeleton flashing twice. The report is now allowed once per container geometry, which does not depend on the rows inside it, so it terminates. A resize still re-arms it, and the debounce still waits for the measurement to settle before reporting.
304
-
305
- ## 2.2.0
306
-
307
- - Added `cardPagination` mode `infinite`: card lists continue on scroll instead of behind a button. No control and no end-of-list element render while the list is healthy. The continuation button appears only after an append failure, as the retry target.
308
- - Infinite continuation is owned by `NTableCards`, so the sentinel lives inside the card list's own `NajmScroll` viewport and uses it as the observer root. An appending page renders shaped card placeholders at the grid tail rather than a spinner in a fixed strip, and the polite `aria-live` announcement of appended row counts is preserved.
309
- - `cardPagination: { mode: "all" }` is now honored in table mode as well as cards: every supplied row renders and no pagination controls are shown.
310
- - `dynamicHeight` now takes effect under `manualPagination`. The measured page size is reported through the ordinary `onPaginationChange` callback, debounced, so server-paginated tables fill their container while the consumer keeps ownership of fetching. `maxHeight` stays caller-owned under manual pagination, and no page size is reported before the first measurement.
311
- - Added `calculateCardPageSize`, floored to whole card rows, published as `calculatedCardPageSize`. A card grid page no longer ends in a ragged partial row. This deliberately differs from `calculateCardSkeletonCount`, which ceils because overfilling placeholders is harmless.
312
- - Removed the deprecated `baseUrl` compiler option from the package tsconfig; `paths` resolves relative to the config file.
313
-
314
- ## 2.1.56
315
-
316
- - Honor `showIcon` on NTable `select` and `combobox` filters. The leading filter icon is still shown by default; pass `showIcon: false` on a filter to hide it.
317
-
318
- ## 2.1.55
319
-
320
- - Added controlled remote-search and loading-state props to `ComboboxInput` and `FormInput type="combobox"` while preserving client filtering by default.
321
-
322
- ## 2.1.53 - 2026-08-05
323
-
324
- - Add typed `NBarChart`, `NLineChart`, `NPieChart`, and `NStatusBreakdown`
325
- components with caller-formatted generic data, accessible summaries, empty
326
- states, responsive RTL-safe layouts, and shape-matched loading skeletons.
327
- - Default chart colors to the live `--chart-1` through `--chart-5` theme
328
- variables, cycle deterministically after five items, and retain explicit
329
- per-series/item color overrides.
330
- - Add preset and numeric chart diameter contracts to `NPieChart` and
331
- `NDonutCard`, including narrow-container shrinking without clipped legends.
332
- - Make `NDonutCard` item colors optional and add accessible loading states to
333
- `NDonutCard` and `NStatCard`.
334
- - Add public API tests, component tests, README guidance, and playground
335
- examples for the chart and loading contracts.
336
-
337
- ## 2.1.49 - 2026-08-04
338
-
339
- ### ImageInput and AvatarInput
340
-
341
- - Add `previewAlt`, `fallbackImage`, `fallbackAlt`, `unavailableContent`,
342
- `imageClassName`, `onPreviewError`, `replaceAriaLabel`, and `clearAriaLabel`
343
- to `ImageInputProps`. `AvatarInput` forwards every new prop unchanged.
344
- - Preview sources resolve in this priority order: `value`, `fallbackImage`,
345
- `defaultImage`. Candidate URLs are deduplicated so a failing primary URL is
346
- never retried through multiple stages. When every candidate fails, the
347
- broken `<img>` is unmounted and `unavailableContent` (or a neutral default)
348
- is rendered in its place.
349
- - `imageVersion` is appended safely to relative, absolute, queried, and
350
- fragmented URLs. `data:`, `blob:`, `javascript:`, and `file:` URLs are
351
- left unchanged.
352
- - Expose `data-image-input-state="empty" | "preview" | "fallback" | "unavailable"`
353
- on the preview container for styling, testing, and consumer diagnostics.
354
- - File selection is race-safe: stale `FileReader` completions cannot replace
355
- a newer value. Object URLs created by the component are tracked so
356
- consumer-owned blob URLs are never revoked.
357
- - Replace and clear controls are real `<button>` elements, are reachable
358
- with the keyboard, and stay visible on touch and coarse-pointer devices.
359
- Only on `(hover: hover) and (pointer: fine)` desktops do the controls fall
360
- back to a hover/focus reveal. `focus-visible` always restores visibility.
361
- - Use logical positioning (`end-*`) so the clear button works correctly in
362
- RTL layouts.
363
- - Re-export `ImageInputPreviewSource` and `ImageInputPreviewError` from
364
- `najm-kit/components/inputs` and the package root.
365
-
366
- ## 2.1.48 - 2026-08-04
367
-
368
- - Keep responsive card row actions visible on phone, tablet, and touch input,
369
- while retaining hover and keyboard-focus reveal on fine-pointer desktops.
370
- - Size table and card loading skeletons from the measured body and active grid,
371
- and keep loading borders, radius, color, and shadow aligned with loaded
372
- surfaces.
373
- - Add the exported `NTableCardPagination` and `NTableLoadMorePagination`
374
- contracts for paged, complete supplied-data, and explicit server-backed Load
375
- more card presentation, including guarded append/retry behavior and accessible
376
- loading, result, error, and terminal feedback.
1
+ # Changelog
2
+
3
+ ## 2.11.15 - 2026-09-04
4
+
5
+ - Fixed `ComboboxInput` keyboard interaction. Enter and Space now open its
6
+ focusable trigger, and Enter commits the active filtered result instead of
7
+ doing nothing when the previously active CmdK item was filtered out. Disabled
8
+ comboboxes remain non-activatable.
9
+
10
+ ## 2.11.14 - 2026-09-04
11
+
12
+ - Added `defineNajmPreferences` to `najm-kit/server`: the language, theme, and
13
+ time-zone cookie contract every Najm application otherwise hand-writes across
14
+ three route handlers and a root layout. `handlers.language`, `handlers.theme`,
15
+ and `handlers.timeZone` export directly as Next.js `POST` handlers, and
16
+ `resolve(cookieStore, { languageFallback })` seeds the root layout. Pure Web
17
+ `Request`/`Response` and a structural cookie reader no React, no Next import.
18
+ - Made it convention-first. A new application passes `{ i18n }` and nothing
19
+ else: `light` default theme, `light | dark` the only accepted modes, `UTC`
20
+ default zone, the canonical `TimeZoneInput` zones, `najm-ui-*` cookie names,
21
+ and `HttpOnly; SameSite=Lax; Path=/; Max-Age=31536000` cookies are all
22
+ defaults. Applications with published cookie names or another product default
23
+ override only those keys. No consumer-side theme guard or normalizer.
24
+ - Fixed the time-zone contract having two sources of truth. `TimeZoneInput`'s
25
+ values moved out of the component into `NAJM_TIME_ZONES`, a pure module now
26
+ read by the input, the resolver, and the POST handler alike, so a zone the
27
+ control offers can no longer be rejected by server validation. Applications
28
+ that pass custom `items` pass the same values as `timeZones`.
29
+ - Exported `NAJM_TIME_ZONES`, `NAJM_DEFAULT_TIME_ZONE`, `NajmTimeZone`, and
30
+ `NajmMode` from `najm-kit/server`, plus `NajmPreferenceLanguage<T>` and
31
+ `NajmPreferenceTimeZone<T>` inferred from a configured definition, so
32
+ consumers declare no language, theme, or time-zone alias of their own.
33
+ - Validated before normalizing in every handler: an unsupported value is a
34
+ `400` with a generic message and no `Set-Cookie`, never the default silently
35
+ written into a cookie. Malformed JSON, a non-object body, and a missing field
36
+ answer the same way, and no request content reaches the response.
37
+
38
+ ## 2.11.13 - 2026-09-04
39
+
40
+ - Fixed the documented `common.feedback.<field>` convention so all shared
41
+ loading, empty, error, forbidden, and not-found states resolve localized
42
+ labels without an application-owned `feedbackDefaults` key map. Missing
43
+ convention keys still fall back to the packaged English labels.
44
+ - Forwarded Najm i18n's missing-key fallback and language-direction resolver
45
+ through `NajmAppProvider`, keeping language changes reactive for partial
46
+ catalogs and non-Arabic RTL languages.
47
+
48
+ ## 2.11.10 - 2026-09-03
49
+
50
+ - Fixed the selected numbered `NTable` pagination button inheriting the regular
51
+ foreground colour over its filled primary style. The active page now keeps
52
+ the primary button foreground token, which is white in the light theme.
53
+ - Fixed focused invalid inputs combining a destructive border with the normal
54
+ theme focus colour. `BaseInput` now keeps the visible keyboard-focus ring but
55
+ colours it from the destructive token for both directly focused composite
56
+ controls and wrappers whose child has `:focus-visible`.
57
+ - Made the desktop and mobile sidebar use logical inline edges, spacing, border
58
+ utilities, chevrons, and drag direction so the complete rail behaves
59
+ correctly in both LTR and RTL layouts.
60
+
61
+ ## 2.11.9 - 2026-08-30
62
+
63
+ - Fixed card grids that paginate client-side rendering their entire dataset on
64
+ one page. `useTable` pinned an uncontrolled paged card list to `data.length`,
65
+ a branch that predates the container measurement added in 2.2.0 and was never
66
+ reconciled with it: `calculatedCardPageSize` was measured and published, but
67
+ only ever applied to a server-paginated grid. A 500-row list rendered 500
68
+ cards on page one, reported a single page, and showed 500 as the current
69
+ Rows/page value. The measured size is now applied to an uncontrolled card grid
70
+ too, through the guards that already keep a server-paginated one stable —
71
+ geometry bucketing, the per-container report budget, and the deferral until
72
+ real cards have been measured. That loop is a property of the measurement
73
+ rather than of fetching: page size decides which cards render, and rendered
74
+ cards are what card height is measured from. Rendering every supplied row
75
+ stays the behavior wherever there is nothing to measure against, so
76
+ `dynamicHeight={false}` and a container that has not yet reported a layout are
77
+ unchanged, and a controlled `pagination` prop or an explicit Rows/page choice
78
+ still wins.
79
+
80
+ ## 2.11.8 - 2026-08-28
81
+
82
+ - Fixed `NContextMenu` leaving keyboard focus on its opener after the menu
83
+ appeared. The first enabled action now receives focus, disabled actions are
84
+ skipped, Arrow Up/Down wrap, Home/End jump to the bounds, Tab dismisses the
85
+ menu, and Escape restores focus to the opener. Focused actions also receive
86
+ the same visual treatment as hovered actions.
87
+
88
+ ## 2.11.7 - 2026-08-17
89
+
90
+ - Fixed date, combobox, and multiselect `FormInput` controls reaching the
91
+ accessibility tree with no accessible name. These types render their trigger
92
+ as a styled `div`, so the `<label for>` that `FormControl` wires up pointed at
93
+ a non-labelable element and named nothing: screen readers announced an unnamed
94
+ control, and `getByRole(..., { name })` could not resolve one. The form label
95
+ now becomes the trigger's `aria-label`, and `DateInput` and `ComboboxInput`
96
+ accept an explicit `ariaLabel` to override it. `select` keeps naming itself
97
+ from `ariaLabel || placeholder`; renaming it would break consumers that select
98
+ it by placeholder today.
99
+ - Fixed `DateInput` rendering its popover trigger as a `div`. Radix only merges
100
+ trigger props onto the child, so the control had no role, no tab stop, and no
101
+ keyboard activation it was unreachable without a mouse. It is now a real
102
+ `<button type="button">`, which also keeps it from submitting the surrounding
103
+ form when the calendar opens.
104
+
105
+ ## 2.11.6 - 2026-08-15
106
+
107
+ - Fixed `FormInput` dropping React Hook Form's native field binding for text,
108
+ number, password, textarea, and time controls. These controls now forward
109
+ their field name, composed blur handler, and focus ref to the actual native
110
+ element, preserving browser form semantics, touched-state tracking, and
111
+ programmatic focus without changing composite-control contracts.
112
+
113
+ ## 2.11.5 - 2026-08-14
114
+
115
+ - Fixed numbered lists staying on an invalid final page after a deletion or
116
+ another mutation reduced the server total. Paged lists now clamp before
117
+ slicing their row buffer, render the previous valid page immediately, and
118
+ reconcile the controlled pagination state without showing a false empty
119
+ state. A genuinely empty result still remains on page one.
120
+ - Fixed panel feedback states stretching their icon, copy, and action across
121
+ separate grid rows in tall table and dialog bodies. Panel content now stays
122
+ together in one centered vertical stack with consistent spacing.
123
+
124
+ ## 2.11.4 - 2026-08-12
125
+
126
+ - Fixed server-paginated card grids briefly rendering at a placeholder-derived
127
+ page size before correcting to the real card height. Card mode now waits for
128
+ real rows and publishes the measured fit before their first paint; fixed-row
129
+ table sizing remains immediate during loading.
130
+
131
+ ## 2.11.3 - 2026-08-12
132
+
133
+ - Fixed `NTable` replacing or clipping an explicit Rows/page choice when
134
+ `dynamicHeight` was enabled. Automatic fit sizing still owns the initial page
135
+ size; after the reader chooses a value, the table preserves it and scrolls
136
+ its bounded body when the requested rows exceed the measured fit.
137
+
138
+ ## 2.11.2 - 2026-08-11
139
+
140
+ - Fixed `PasswordInput` forwarding native input attributes such as generated
141
+ form IDs and ARIA metadata to the actual `<input>`, restoring programmatic
142
+ label association for assistive technology and browser automation.
143
+
144
+ ## 2.11.1 - 2026-08-11
145
+
146
+ - Fixed `NajmThemeProvider` precedence so an explicit runtime `mode` overrides
147
+ a preset stored in the design config. An explicit `preset` prop still wins,
148
+ allowing deliberately fixed-preset subtrees without producing mixed light
149
+ and dark application surfaces.
150
+
151
+ ## 2.11.0 - 2026-08-10
152
+
153
+ - Gave every keyboard-focusable primitive a visible focus ring, from one shared
154
+ source: `focusRingClasses` and `focusRingWithinClasses`, exported from the
155
+ root barrel so consumers stop hand-rolling app-level focus CSS. `TabsContent`
156
+ is keyboard-focusable (Radix sets `tabIndex={0}`) and previously showed no
157
+ indicator at all; `CollapsibleTrigger` now carries its own ring rather than
158
+ relying on whatever it wraps. `BaseInput` paints the ring on the wrapper via
159
+ `has-[:focus-visible]:`, which is what finally gives `NumberInput` and the
160
+ multi-select trigger an indicator both suppress the inner control's ring,
161
+ so focusing the child element used to change only the border colour.
162
+ - Fixed `Dialog` focus restoration. The opener is captured in
163
+ `onOpenAutoFocus` and refocused on close when focus would otherwise land on
164
+ `<body>`, so dismissing a dialog with Escape returns the keyboard to the
165
+ control that opened it (WCAG 2.4.3) instead of stranding it at the top of
166
+ the document. A caller that calls `preventDefault()` on the close event still
167
+ owns focus entirely.
168
+ - Added `NCredentialsCard`, a one-time handover surface for freshly generated
169
+ secrets. Renders a description list of fields with monospaced, break-all
170
+ values, an optional header icon that defaults to a check mark, an optional
171
+ consumer `actions` slot, and a built-in Copy button. The Copy action resolves
172
+ text through `copyText` when supplied or joins `${label}: ${value}` with
173
+ `\n` in field order otherwise. The button is disabled while a clipboard
174
+ write is pending; on success it swaps to a check icon and `copiedLabel`,
175
+ on failure to a warning icon and `copyErrorLabel`, and either state reverts
176
+ to idle after roughly two seconds. Header and field icons are marked
177
+ decorative, status is announced through a polite `aria-live` region, and
178
+ the Copy button renders before consumer actions so a Done-style dismiss
179
+ stays the last tab stop. The component never rethrows: a missing
180
+ `navigator.clipboard`, a rejected or synchronously thrown `writeText`, and
181
+ a synchronously thrown `copyText` all land in the error state with
182
+ `onCopyError` invoked. State updates and revert timers are guarded so
183
+ unmounting during a pending copy, or starting a second copy while the
184
+ first success state is still showing, never fire stale setters. Logical
185
+ spacing properties keep the layout correct under `dir="rtl"` without a
186
+ consumer override, and each value carries `dir="auto"` so it resolves its own
187
+ text direction: credentials are weak-directionality strings, and inheriting an
188
+ ambient `rtl` paints `+1 555 0100` as `0100 555 1+` and `p@ssw0rd!` as
189
+ `!p@ssw0rd` while the DOM and the copied text stay correct. A genuinely Arabic
190
+ value still renders right-to-left. Packaged English fallbacks ship for the three action
191
+ labels only; every field label, title, and description is the consumer's
192
+ text. Exported as `NCredentialsCard`, `NCredentialField`,
193
+ `NCredentialsCardProps`, and `NCredentialsCardClassNames` from the root
194
+ barrel and from `packages/najm-kit/src/components/data-display`.
195
+ - Added a shared `surface` contract across `NLoadingState`, `NErrorState`, and
196
+ `NEmptyState`. `inline` (default) preserves existing behavior; `panel` adds a
197
+ centered minimum-height frame for table, card, dialog, and sheet bodies
198
+ without a page gutter or a landmark; `page` uses the configured page
199
+ spacing through `NPageLayout as="div"` so it never introduces a nested
200
+ `<main>`. `NLoadingState.fullScreen` keeps precedence over `surface`.
201
+ - Added `NForbiddenState` and `NNotFoundState` as first-class generic Kit
202
+ components. Both default to the page surface, ship token-backed default
203
+ icons (`ShieldOff`, `Compass`), and resolve title and description through
204
+ the new provider defaults. Neither knows the dashboard URL, renders a Next
205
+ `Link`, redirects, or writes route metadata.
206
+ - Added `feedbackDefaults` to `NajmUIProvider`. It is inherited by
207
+ `NajmNextUIProvider` and `NajmAppProvider` through TypeScript no second
208
+ adapter prop or translation source. Labels resolve through the existing
209
+ structural `t` (most specific: explicit prop > literal default > translated
210
+ key > packaged English). Generic error body copy and empty description
211
+ deliberately have no packaged fallback so the no-provider render is
212
+ unchanged.
213
+ - Exported the new feedback components and props (`NLoadingStateProps`,
214
+ `NErrorStateProps`, `NEmptyStateProps`, `NForbiddenStateProps`,
215
+ `NNotFoundStateProps`, `NFeedbackSurface`, `NFeedbackDefaults`,
216
+ `NFeedbackLabels`, `NFeedbackLabelKeys`, `NFeedbackIconSize`) from the root
217
+ barrel and re-exported them directly from `najm-kit/app` so a Next Server
218
+ Component route can render them without authoring a local `"use client"`
219
+ wrapper. The root entry stays free of `"use client"` and continues to
220
+ share a single `NFeedbackDefaultsContext` across `index` and the adapters.
221
+
222
+ ## 2.10.0 - 2026-08-10
223
+
224
+ - Added a shared, failure-aware media source chain for `NAvatar`, `NImage`, and
225
+ the new Next-only `NNextImage` export. Sources reset cleanly when inputs or
226
+ cache versions change, duplicate candidates are tried once, consumer event
227
+ handlers are preserved, and failed avatars return to initials without a
228
+ broken-image glyph.
229
+ - `NAvatar` now uses a native lazy-loaded image so loading and error events are
230
+ observable, keeps initials visible until the image paints, supports native
231
+ `imageProps`, and actually tries `fallbackSrc` after a primary failure.
232
+ - Added provider-level status badge defaults and the public
233
+ `normalizeStatusToken` helper. Applications can configure translated status
234
+ labels, colors, icons, look, shape, and size once while explicit badge props
235
+ retain precedence.
236
+ - Added `NNextImage` and `NNextImageProps` to `najm-kit/next` only, preserving
237
+ Next Image `fill`, `sizes`, optimizer, and `unoptimized` controls without
238
+ adding Next.js to the root runtime graph.
239
+
240
+ ## 2.9.0 - 2026-08-09
241
+
242
+ - Added `najm-kit/server`, a pure UI bootstrap loader. `createUiBootstrapLoader()`
243
+ takes the application's own fetcher, endpoint paths, payload parsers, and
244
+ factory values, then runs the resources concurrently, unwraps the `{ data }`
245
+ envelope (or one the application selects), and falls back per resource so a
246
+ branding outage never discards a valid appearance. Failures are reported
247
+ through an optional structured `onDiagnostic` callback carrying resource,
248
+ reason, path, and status never a response body, header, cookie, or raw
249
+ thrown value. A `fallback()` that throws stays a visible error. The entry
250
+ imports no React, no Next.js, and no Node built-in, and re-exports
251
+ `parseNajmDesignConfig` so an appearance payload can be parsed without
252
+ reaching the root barrel.
253
+ - Added `najm-kit/server/react`, the React Server Component adapter.
254
+ `createReactServerUiBootstrap()` memoizes one bootstrap per request with
255
+ React's `cache()` and derives the per-resource accessors from it, so a root
256
+ layout, a nested layout, and a page share one resolution and one stable
257
+ snapshot for the whole render. Resolution is request-scoped only: separate
258
+ requests share no snapshot, failure, or diagnostic, and a transient outage is
259
+ retried on the next request. The `browser` export condition resolves to a
260
+ module that throws, so importing the adapter from a Client Component fails at
261
+ build time instead of shipping the application's fetcher and factory values
262
+ into a browser bundle.
263
+ - The root `najm-kit`, `najm-kit/next`, and `najm-kit/app` entries are unchanged
264
+ and do not reach either server entry.
265
+
266
+ ## 2.8.2 - 2026-08-08
267
+
268
+ - Added the framework-neutral `najm-kit/person-images` subpath. It ships a
269
+ built-in resolver for `child`, `adult`, `parent`, and `family` roles with
270
+ the seven WebP illustrations embedded as base64 data URLs, plus
271
+ `createPersonImageResolver` so an application can declare its own role
272
+ names (`teacher`, `student`, `doctor`, `driver`, …) and TypeScript catches
273
+ unknown role strings at the call site. The root `najm-kit` entry stays
274
+ unchanged and does not pull in the person images.
275
+
276
+ ## 2.8.1 - 2026-08-08
277
+
278
+ - Added schema-driven form development tools to `NajmAppProvider`. Passing
279
+ `formDevTools` enables F8 filling for every `NForm` and `WizardForm` without
280
+ an application helper or additional provider.
281
+ - Added built-in Zod 4 form-value generation with per-form overrides for
282
+ relation fields and other application-owned values. Existing explicit
283
+ `devTools.enabled` and `devTools.fill` usage remains supported.
284
+
285
+ ## 2.8.0 - 2026-08-08
286
+
287
+ - Added server-safe `najm-kit/format` helpers for currency minor units,
288
+ numbers, percentages, dates, times, relative time, tokens, local date inputs,
289
+ and slugs. Client applications can use the same contract reactively through
290
+ `NajmFormatProvider` and `useNajmFormat`.
291
+ - Added the server-safe `najm-kit/pagination` offset protocol, including bounded
292
+ page creation, total-aware continuation, probe-row continuation for APIs
293
+ without totals, and query cleanup that preserves meaningful `false` and `0`.
294
+ - Added the optional-peer `najm-kit/query` entry with offset infinite-query and
295
+ responsive paged/card-list hooks, plus shared card-pagination adapters and
296
+ localized continuation labels.
297
+ - Extended `NajmAppProvider` with formatting locale, currency, and placeholder
298
+ configuration so applications can bind language, time zone, and formatting
299
+ without another host bridge provider.
300
+ - Added shared media-query/card-viewport helpers and avatar-source utilities.
301
+
302
+ ## 2.6.2
303
+
304
+ - Added `NSidebarProvider` and `useNSidebar`, so sidebar state can be read from a distance. `NSidebar` renders beside the page content rather than around it, which left applications hand-rolling a context to hand `setMobileOpen` down to a page header — a wrapper component plus an aliased import at every call site. Wrap the shell in `NSidebarProvider` and `NPageHeader` now resolves both `onSidebarOpen` and `mobileBreakpoint` from it, so a header nested anywhere below renders a working mobile trigger with no props threaded to it. Also exports the `NSidebarContextValue` type.
305
+ - `NSidebar` resolves its open and collapsed state as explicit prop → surrounding provider → internal state. Passing `collapsed`, `mobileOpen`, `onCollapsedChange`, or `onMobileOpenChange` keeps behaving exactly as before, and a sidebar with no provider around it still owns its own state, so this is additive for every existing consumer.
306
+ - `logo` accepts a render prop, `({ collapsed, isMobile }) => ReactNode`, alongside the existing node. It receives the state the sidebar actually resolved — including whatever `autoCollapseAt` decided — which consumers previously had to approximate with their own responsive classes, guessing at a breakpoint the sidebar had already computed. The mobile drawer always reports `collapsed: false`, matching how it renders. Exported as `SidebarLogoRender`.
307
+
308
+ ## 2.6.1
309
+
310
+ - Fixed the non-card `NPageHeader` bleed never taking effect. 2.6.0 cancelled the page padding with the Tailwind utilities `-mt-[var(--najm-section-gap,0px)]` and `-mx-[var(--najm-page-gutter,0px)]`, which only work if the consuming app's Tailwind build happens to emit those arbitrary classes — they exist nowhere but inside this package's bundle, so a consumer could load a stylesheet without them and the header stayed exactly where it was. The offsets are inline styles now and no longer depend on the consumer's CSS pipeline.
311
+
312
+ ## 2.6.0
313
+
314
+ - Added `NThemePresets`, and wired it into `NThemeCustomizer` through `presets`, `selectedPresetId`, `presetsStatus`, `savedDesign`, `onPresetSelect`, `onPresetSave`, `onPresetDelete`, and `presetLabels`. The picker renders only when a host supplies both `presets` and `onPresetSelect`. It is presentational: the host owns where presets live and what saving one means, and selecting a row hands the design back so it can be previewed before anything is stored. Each row draws a swatch strip from the design's own `sidebar`, `primary`, `secondary`, `accent`, and `background` tokens; the selected row's check sits left in the success colour and per-row delete sits right. Omit `onPresetSave` or `onPresetDelete` to hide those controls. Deleting is pointer-only — Radix owns roving focus inside the listbox.
315
+ - **`NPageHeader` in non-card mode is now flush.** It rendered as a full-bleed bar (`border-b`, no radius) but still sat inside the padding `NPageLayout` applies, so it floated below and inside the page gutter and its bottom rule never met the sidebar header's. It now cancels that padding, and its base height goes `min-h-12` → `min-h-14` to match `NSidebarHeader`. **Non-card page headers move up and out to the page edges, and grow 8px below `sm`.** Card mode is unchanged.
316
+ - `NPageLayout` publishes its resolved spacing as `--najm-page-gutter` and `--najm-section-gap`. Descendants could not previously cancel the page padding: a design config resolves the gutter to a literal, so the pre-existing `--page-gutter` / `--section-gap` variables only ever held the fallbacks. Full-bleed children should negate these, with `0px` fallbacks so they stay inert outside `NPageLayout`.
317
+ - Fixed `SelectInput` discarding `SelectItemType.icon`. The prop was declared but `renderItems` rendered the label alone, so every per-item icon was silently dropped. Items with an icon now render it before a truncating label; items without one are unchanged.
318
+
319
+ ## 2.5.0
320
+
321
+ - Added `NTableDefaultsProvider`, so an application supplies `paginationLabels` once instead of at every table. Labels merge per key, most specific first: a table's own `paginationLabels` override the provider's for the keys it sets, the provider covers the rest, and anything neither supplies falls back to the packaged English. Also exports `useNTableDefaults` and the `NTableDefaults` type.
322
+ - `value` is passed through the provider unmemoized; memoize it in the caller, or every table below re-renders with the shell.
323
+
324
+ ## 2.4.0
325
+
326
+ - `NTablePagination` renders numbered page buttons instead of `Page X of Y`. The window shows the first and last page, the current page, and one page either side, collapsing the rest into at most two gaps. The slot count is constant for any result longer than the window, so the bar does not change width as the reader pages through it, and a gap never stands in for a single page — that slot goes to the page instead.
327
+ - Added `paginationVariant`, defaulting to `"numbered"`. Pass `"compact"` to keep the previous position text with first/previous/next/last controls. **This changes the default appearance of every paginated `NTable`.**
328
+ - The numbered variant drops the first/last double chevrons, because page 1 and page N are now single-click targets of their own. Previous and next remain. The compact variant is unchanged.
329
+ - Numbered pages fall back to compact on their own when the page count is not trustworthy — that is, under `manualPagination` with no `pageCount` supplied, where TanStack infers a count from the rows it happens to hold rather than from a result total. Numbering that would invite clicks on pages that may not exist is not rendered.
330
+ - Below the `sm` breakpoint the numbers give way to the position text; seven page buttons plus the rows-per-page select do not fit a phone.
331
+ - Added `paginationLabels` so the bar can be localized: `rowsPerPage`, `pagination`, `goToPage`, `currentPage`, `firstPage`, `previousPage`, `nextPage`, `lastPage`, `pageOf`, and `rowsSelected`. All optional, all falling back to the previous English strings.
332
+ - Pagination chevrons now mirror under `dir="rtl"`. They previously pointed against the reading direction in right-to-left layouts.
333
+ - The page controls are wrapped in a labelled `nav`, and the current page carries `aria-current="page"`.
334
+ - Exported `buildPageItems` and `NTablePageItem` for consumers that need the same windowing outside the table.
335
+
336
+ ## 2.2.1
337
+
338
+ - Fixed a regression in 2.2.0: the dynamic page size reported under `manualPagination` could oscillate. Card row height is measured from rendered cards, so it grows as images decode; feeding that back into the page size refetched, re-rendered, re-measured, and refetched again. A list visibly settled from one page size to another with the loading skeleton flashing twice. The report is now allowed once per container geometry, which does not depend on the rows inside it, so it terminates. A resize still re-arms it, and the debounce still waits for the measurement to settle before reporting.
339
+
340
+ ## 2.2.0
341
+
342
+ - Added `cardPagination` mode `infinite`: card lists continue on scroll instead of behind a button. No control and no end-of-list element render while the list is healthy. The continuation button appears only after an append failure, as the retry target.
343
+ - Infinite continuation is owned by `NTableCards`, so the sentinel lives inside the card list's own `NajmScroll` viewport and uses it as the observer root. An appending page renders shaped card placeholders at the grid tail rather than a spinner in a fixed strip, and the polite `aria-live` announcement of appended row counts is preserved.
344
+ - `cardPagination: { mode: "all" }` is now honored in table mode as well as cards: every supplied row renders and no pagination controls are shown.
345
+ - `dynamicHeight` now takes effect under `manualPagination`. The measured page size is reported through the ordinary `onPaginationChange` callback, debounced, so server-paginated tables fill their container while the consumer keeps ownership of fetching. `maxHeight` stays caller-owned under manual pagination, and no page size is reported before the first measurement.
346
+ - Added `calculateCardPageSize`, floored to whole card rows, published as `calculatedCardPageSize`. A card grid page no longer ends in a ragged partial row. This deliberately differs from `calculateCardSkeletonCount`, which ceils because overfilling placeholders is harmless.
347
+ - Removed the deprecated `baseUrl` compiler option from the package tsconfig; `paths` resolves relative to the config file.
348
+
349
+ ## 2.1.56
350
+
351
+ - Honor `showIcon` on NTable `select` and `combobox` filters. The leading filter icon is still shown by default; pass `showIcon: false` on a filter to hide it.
352
+
353
+ ## 2.1.55
354
+
355
+ - Added controlled remote-search and loading-state props to `ComboboxInput` and `FormInput type="combobox"` while preserving client filtering by default.
356
+
357
+ ## 2.1.53 - 2026-08-05
358
+
359
+ - Add typed `NBarChart`, `NLineChart`, `NPieChart`, and `NStatusBreakdown`
360
+ components with caller-formatted generic data, accessible summaries, empty
361
+ states, responsive RTL-safe layouts, and shape-matched loading skeletons.
362
+ - Default chart colors to the live `--chart-1` through `--chart-5` theme
363
+ variables, cycle deterministically after five items, and retain explicit
364
+ per-series/item color overrides.
365
+ - Add preset and numeric chart diameter contracts to `NPieChart` and
366
+ `NDonutCard`, including narrow-container shrinking without clipped legends.
367
+ - Make `NDonutCard` item colors optional and add accessible loading states to
368
+ `NDonutCard` and `NStatCard`.
369
+ - Add public API tests, component tests, README guidance, and playground
370
+ examples for the chart and loading contracts.
371
+
372
+ ## 2.1.49 - 2026-08-04
373
+
374
+ ### ImageInput and AvatarInput
375
+
376
+ - Add `previewAlt`, `fallbackImage`, `fallbackAlt`, `unavailableContent`,
377
+ `imageClassName`, `onPreviewError`, `replaceAriaLabel`, and `clearAriaLabel`
378
+ to `ImageInputProps`. `AvatarInput` forwards every new prop unchanged.
379
+ - Preview sources resolve in this priority order: `value`, `fallbackImage`,
380
+ `defaultImage`. Candidate URLs are deduplicated so a failing primary URL is
381
+ never retried through multiple stages. When every candidate fails, the
382
+ broken `<img>` is unmounted and `unavailableContent` (or a neutral default)
383
+ is rendered in its place.
384
+ - `imageVersion` is appended safely to relative, absolute, queried, and
385
+ fragmented URLs. `data:`, `blob:`, `javascript:`, and `file:` URLs are
386
+ left unchanged.
387
+ - Expose `data-image-input-state="empty" | "preview" | "fallback" | "unavailable"`
388
+ on the preview container for styling, testing, and consumer diagnostics.
389
+ - File selection is race-safe: stale `FileReader` completions cannot replace
390
+ a newer value. Object URLs created by the component are tracked so
391
+ consumer-owned blob URLs are never revoked.
392
+ - Replace and clear controls are real `<button>` elements, are reachable
393
+ with the keyboard, and stay visible on touch and coarse-pointer devices.
394
+ Only on `(hover: hover) and (pointer: fine)` desktops do the controls fall
395
+ back to a hover/focus reveal. `focus-visible` always restores visibility.
396
+ - Use logical positioning (`end-*`) so the clear button works correctly in
397
+ RTL layouts.
398
+ - Re-export `ImageInputPreviewSource` and `ImageInputPreviewError` from
399
+ `najm-kit/components/inputs` and the package root.
400
+
401
+ ## 2.1.48 - 2026-08-04
402
+
403
+ - Keep responsive card row actions visible on phone, tablet, and touch input,
404
+ while retaining hover and keyboard-focus reveal on fine-pointer desktops.
405
+ - Size table and card loading skeletons from the measured body and active grid,
406
+ and keep loading borders, radius, color, and shadow aligned with loaded
407
+ surfaces.
408
+ - Add the exported `NTableCardPagination` and `NTableLoadMorePagination`
409
+ contracts for paged, complete supplied-data, and explicit server-backed Load
410
+ more card presentation, including guarded append/retry behavior and accessible
411
+ loading, result, error, and terminal feedback.