hazo_ui 3.5.0 → 4.1.1

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 CHANGED
@@ -5,6 +5,45 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## v4.1.1 (2026-06-14)
9
+
10
+ ### New
11
+ - `Slider` — Radix-backed (`@radix-ui/react-slider`) range slider primitive following the shadcn pattern; styled via theme tokens (`bg-primary`/`bg-secondary`) so consumers re-skin via CSS variables. Closes FR-003.
12
+ - `InputAffix` — input with optional `prefix`/`suffix` slots (e.g. a `$` affix) sharing the `Input` primitive's border/height styling; numeric-friendly. Closes FR-004.
13
+ - **ETA Progress Bar** — determinate progress with rolling-window time estimation:
14
+ - `HazoUiProgressBar` — controlled determinate bar driven by a `0..1` `value` prop.
15
+ - `useEtaProgress` — driver hook (`{ value, start, unitDone, finish }`) that estimates remaining time from a rolling window of past run durations.
16
+ - `HazoUiEtaProgress` — storage-backed self-estimating bar that persists its duration window via **`hazo_state`**.
17
+ - Pure estimation helpers `median`, `computeEta`, `easeToward` are exported for direct use/testing.
18
+
19
+ ### Dependencies
20
+ - **`hazo_state` (^0.1.0) is now a required peer dependency.** The `hazo_ui` barrel statically imports `hazo_state/client` (for `HazoUiEtaProgress`), so consumers must install `hazo_state` alongside `hazo_ui`. (It was briefly declared optional, which was incorrect — the import is unconditional.)
21
+
22
+ ### Fixed
23
+ - test-app: `hazo_state` webpack alias now uses an exact (`$`) match so subpath imports (`hazo_state/client`) resolve instead of being rewritten into the bare-package path.
24
+ - test-app autotest: `Slider` / `InputAffix` export-contract scenarios now accept `forwardRef`/`memo` components (which are objects, not functions); added `eta_progress_estimation` (pure-helper behaviour) and `eta_progress_ui` (progress-bar export contract) scenarios.
25
+
26
+ ## v4.0.0 (2026-06-13)
27
+
28
+ ### BREAKING
29
+
30
+ - **`LineChart` and `MultiLineChart` removed.** These components (along with their prop types
31
+ `LineChartProps`, `MultiLineChartProps`, and the `MultiSeries` type) have been extracted from
32
+ `hazo_ui` and re-implemented in `hazo_dataviz` on recharts with the same prop API. Consumers
33
+ must update their imports:
34
+
35
+ ```ts
36
+ // Before (hazo_ui ≤ 3.x)
37
+ import { LineChart, MultiLineChart, type MultiSeries } from "hazo_ui";
38
+
39
+ // After (hazo_ui 4.x)
40
+ import { LineChart, MultiLineChart, type MultiSeries } from "hazo_dataviz/client";
41
+ ```
42
+
43
+ All other chart primitives are **unchanged**: `Sparkline`, `InverseSparkline`, `StackedBars`,
44
+ `DateRangeSelector`, and `FunnelChart` remain in `hazo_ui` along with their shared types
45
+ (`ChartDataPoint`, `ChartDataSeries`, `StackedBar`, `DateRangeOption`, `FunnelStep`).
46
+
8
47
  ## v3.5.0 (2026-06-12)
9
48
 
10
49
  ### New
package/README.md CHANGED
@@ -224,6 +224,20 @@ Lightweight, opinionated components for the four ubiquitous async states: **load
224
224
  - **[useLoadingState](#useloadingstate)** hook - `{ isLoading, setLoading, withLoading }` with an async wrapper.
225
225
  - **[useErrorDisplay](#useerrordisplay)** hook - Passive `{ error, setError, clearError }` that coerces `Error` instances to strings.
226
226
 
227
+ ### Form & Feedback Primitives (v4.1)
228
+
229
+ - **Slider** - Radix-backed (`@radix-ui/react-slider`) range slider following the shadcn pattern. Styled via theme tokens (`bg-primary` / `bg-secondary`) so consumers re-skin through CSS variables.
230
+ - **InputAffix** - Input with optional `prefix` / `suffix` slots (e.g. a `$` affix) sharing the base `Input` primitive's border/height styling; numeric-friendly.
231
+ - **ETA Progress Bar** - Determinate progress with rolling-window time estimation:
232
+ - `HazoUiProgressBar` - controlled determinate bar driven by a `0..1` `value` prop.
233
+ - `useEtaProgress` - driver hook returning `{ value, start, unitDone, finish }` that estimates remaining time from past run durations.
234
+ - `HazoUiEtaProgress` - storage-backed self-estimating bar that persists its duration window via `hazo_state` (a **required** peer dependency of hazo_ui — see Setup).
235
+ - Pure helpers `median`, `computeEta`, `easeToward` are exported for direct use/testing.
236
+
237
+ ```tsx
238
+ import { Slider, InputAffix, HazoUiProgressBar, HazoUiEtaProgress, useEtaProgress } from 'hazo_ui';
239
+ ```
240
+
227
241
  ### shadcn/ui Primitive Re-exports
228
242
 
229
243
  All shadcn/ui base components are re-exported from hazo_ui, so sibling hazo_* packages (and consumers) can import UI primitives from a single source without installing shadcn/ui separately:
@@ -98,11 +98,13 @@ The following peer dependencies are required:
98
98
 
99
99
  - [ ] React (^18.0.0 or ^19.0.0)
100
100
  - [ ] React DOM (^18.0.0 or ^19.0.0)
101
+ - [ ] hazo_core (^1.2.0)
102
+ - [ ] hazo_state (^0.1.0) — the `hazo_ui` barrel statically imports `hazo_state/client` (for `HazoUiEtaProgress`), so this is **required** even if you don't use the ETA progress bar.
101
103
 
102
104
  If not already installed:
103
105
 
104
106
  ```bash
105
- npm install react react-dom
107
+ npm install react react-dom hazo_core hazo_state
106
108
  ```
107
109
 
108
110
  ### 3. Install Required Dependencies
@@ -137,6 +139,11 @@ npm install @radix-ui/react-dialog @radix-ui/react-popover @radix-ui/react-selec
137
139
  - **useLoadingState, useErrorDisplay** hooks: No additional dependencies
138
140
  - **Celebration (v2.18.0)**:
139
141
  - **CelebrationProvider, celebrate, CELEBRATION_GRADIENT**: No additional peer deps — `canvas-confetti` and `html-to-image` are bundled direct dependencies
142
+ - **Form & Feedback primitives (v4.1)**:
143
+ - **Slider**: `@radix-ui/react-slider`
144
+ - **InputAffix**: No additional dependencies (uses the base shadcn/ui `Input` component)
145
+ - **HazoUiProgressBar, useEtaProgress, median, computeEta, easeToward**: No additional dependencies
146
+ - **HazoUiEtaProgress**: `hazo_state` (^0.1.0) — a **required** peer dep of hazo_ui (the barrel imports it unconditionally), so it is always installed regardless of which components you use.
140
147
 
141
148
  ### 4. Configure Tailwind CSS
142
149