azamat-ui-kit 0.1.0 → 0.2.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/COMPONENT_MATURITY.md +127 -0
  3. package/README.md +124 -73
  4. package/RELEASE.md +93 -0
  5. package/dist/cli/index.js +189 -39
  6. package/dist/components/actions/button-group.d.ts +15 -0
  7. package/dist/components/actions/copy-field.d.ts +11 -0
  8. package/dist/components/actions/index.d.ts +5 -3
  9. package/dist/components/calendar/calendar.d.ts +2 -0
  10. package/dist/components/charts/charts.d.ts +65 -0
  11. package/dist/components/charts/index.d.ts +1 -0
  12. package/dist/components/data-table/data-table.d.ts +3 -5
  13. package/dist/components/display/code-block.d.ts +10 -0
  14. package/dist/components/display/data-card.d.ts +13 -0
  15. package/dist/components/display/descriptions.d.ts +19 -0
  16. package/dist/components/display/file-card.d.ts +14 -0
  17. package/dist/components/display/index.d.ts +22 -10
  18. package/dist/components/display/kanban.d.ts +25 -0
  19. package/dist/components/display/keyboard-shortcut.d.ts +7 -0
  20. package/dist/components/display/list.d.ts +26 -0
  21. package/dist/components/display/property-grid.d.ts +15 -0
  22. package/dist/components/display/statistic.d.ts +23 -0
  23. package/dist/components/display/tag-list.d.ts +17 -0
  24. package/dist/components/display/tree-view.d.ts +19 -0
  25. package/dist/components/display/user-card.d.ts +13 -0
  26. package/dist/components/feedback/alert.d.ts +11 -0
  27. package/dist/components/feedback/index.d.ts +2 -0
  28. package/dist/components/feedback/page-state.d.ts +17 -0
  29. package/dist/components/inputs/async-select.d.ts +5 -4
  30. package/dist/components/inputs/color-input.d.ts +11 -0
  31. package/dist/components/inputs/index.d.ts +18 -14
  32. package/dist/components/inputs/otp-input.d.ts +17 -0
  33. package/dist/components/inputs/rating.d.ts +17 -0
  34. package/dist/components/inputs/slider.d.ts +24 -0
  35. package/dist/components/layout/index.d.ts +2 -0
  36. package/dist/components/layout/section.d.ts +24 -0
  37. package/dist/components/layout/sticky-footer-bar.d.ts +7 -0
  38. package/dist/components/navigation/anchor-nav.d.ts +15 -0
  39. package/dist/components/navigation/index.d.ts +4 -3
  40. package/dist/components/ui/collapse.d.ts +29 -0
  41. package/dist/components/ui/divider.d.ts +9 -0
  42. package/dist/components/ui/segmented-control.d.ts +17 -0
  43. package/dist/components/ui/skeleton.d.ts +17 -0
  44. package/dist/components/ui/spinner.d.ts +12 -0
  45. package/dist/components/ui/tooltip.d.ts +8 -0
  46. package/dist/components/upload/file-upload.d.ts +11 -1
  47. package/dist/index.cjs +5 -7
  48. package/dist/index.d.ts +40 -34
  49. package/dist/index.js +6986 -9427
  50. package/package.json +1 -118
  51. package/registry.json +1 -185
  52. package/dist/components/ui/component-preview.d.ts +0 -10
package/CHANGELOG.md ADDED
@@ -0,0 +1,104 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## Unreleased
6
+
7
+ ## 0.2.0 - 2026-06-19
8
+
9
+ ### Added
10
+
11
+ - reusable dependency-free chart components: `ChartFrame`, `BarChart`, `LineChart`, `Sparkline`, `DonutChart`, `ChartLegend`, and `MetricTrend`
12
+ - base collapse primitive and composed `CollapseGroup`
13
+ - feedback `Alert` component with info, success, warning, destructive, and muted tones
14
+ - `Statistic`, `StatisticCard`, and `StatisticGrid` display components
15
+ - base UI primitives: `Skeleton`, `SkeletonText`, `SkeletonCard`, `Divider`, `SegmentedControl`, `Spinner`, `LoadingOverlay`, and `Tooltip`
16
+ - Ant-like data display components: `List`, `ListRow`, `Descriptions`, `KanbanBoard`, `TagList`, `TreeView`, `CodeBlock`, `FileCard`, `PropertyGrid`, `DataCard`, and `UserCard`
17
+ - utility display component `KeyboardShortcut`
18
+ - feedback state components `PageState` and `InlineState`
19
+ - action utilities `CopyField` and `ButtonGroup`
20
+ - navigation utility `AnchorNav`
21
+ - interactive `Rating`, `Slider`, `RangeSlider`, `OtpInput`, and `ColorInput` input components
22
+ - reusable dashboard layout helpers: `Section`, `Toolbar`, `SplitLayout`, and `StickyFooterBar`
23
+ - registry status metadata and CLI status output for stable/preview/experimental/internal components
24
+ - README component status, upload example, DataTable pagination note, and troubleshooting sections
25
+
26
+ ### Fixed
27
+
28
+ - hardened library externals so React, React DOM, JSX runtime and React Hook Form stay external in package builds
29
+ - added build-output smoke checks to catch forbidden ESM `require("react")` usage before release
30
+ - aligned CLI version with the package version
31
+ - aligned `registry.json` version with `package.json`
32
+ - added `.light` theme class output next to `:root` and `.dark`
33
+ - removed `DataTable` search prop type workarounds by typing search through `SearchInputProps`
34
+ - removed the `onValueChange as any` workaround from `DataTable`
35
+ - hardened Calendar keyboard navigation, disabled date reasons, roving tab index, and invalid range handling
36
+ - hardened FileUpload disabled/loading drag-drop behavior and localized rejection messages
37
+
38
+ ### Changed
39
+
40
+ - build now starts from a clean `dist` directory and runs output validation
41
+ - release gate now includes lint, type/a11y/registry/build-output tests, build, and `npm pack --dry-run`
42
+ - `init` supports Vite and Next.js path defaults through `--template vite|next`
43
+ - registry validation now fails on package/registry version mismatch and duplicate registry dependencies
44
+ - package tarball includes `COMPONENT_MATURITY.md` for public API handoff
45
+ - build-output smoke checks now reject indirect ESM browser require fallbacks such as Rolldown CommonJS helpers and `createRequire`
46
+ - package root exports now include charts, collapse, skeleton, divider, segmented control, spinner, tooltip, rating, sliders, OTP input, color input, list, descriptions, kanban, tree view, code block, file card, property grid, data card, user card and statistic components
47
+ - component maturity docs now define public API decisions, color policy, and font dependency rationale
48
+
49
+ ### Docs
50
+
51
+ - documented component maturity rubric, public export statuses, helper policy, and audit checklist
52
+ - expanded release handoff with npm 2FA/token, manual consumer smoke, GitHub release notes and docs-app handoff
53
+
54
+ ## 0.1.1 - 2026-06-18
55
+
56
+ Library-only cleanup release.
57
+
58
+ ### Changed
59
+
60
+ - version bumped from `0.1.0` to `0.1.1`
61
+ - package exports narrowed to reusable runtime pieces only
62
+ - release documentation updated for the `0.1.1` patch
63
+
64
+ ### Fixed
65
+
66
+ - removed docs-only `ComponentPreview` from package exports
67
+ - removed unused `prism-react-renderer` runtime dependency
68
+ - silenced expected React Compiler lint noise around TanStack Table integration
69
+
70
+ ## 0.1.0 - 2026-06-18
71
+
72
+ First public npm-ready release.
73
+
74
+ ### Added
75
+
76
+ - npm publish metadata: `description`, `keywords`, `homepage`, `repository`, `bugs`, `author`, `license`
77
+ - `LICENSE` file with MIT license
78
+ - dedicated declaration build via `tsconfig.build.json`
79
+ - router-agnostic link rendering through `renderLink` on:
80
+ - `Breadcrumbs`
81
+ - `SidebarNav`
82
+ - `AppSidebar`
83
+ - `QuickActionGrid`
84
+ - Next.js `renderLink` usage example in `README.md`
85
+
86
+ ### Changed
87
+
88
+ - version bumped from `0.0.1` to `0.1.0`
89
+ - publish pipeline switched to `prepack`
90
+ - package tarball reduced and cleaned for npm distribution
91
+ - library build no longer copies site/public assets into `dist`
92
+ - exported navigation components no longer require `react-router-dom` at runtime
93
+
94
+ ### Fixed
95
+
96
+ - `dist/index.d.ts` now generates correctly instead of shipping as an empty file
97
+ - smoke type issues in `tests/smoke/component-imports.test.tsx`
98
+ - a11y smoke compatibility in `src/components/upload/file-upload.tsx`
99
+
100
+ ### Removed
101
+
102
+ - unused `@radix-ui/*` dependencies
103
+ - unused `vite-plugin-dts`
104
+ - non-library files from published package contents (`src`, docs-site assets, empty templates, extra public artifacts)
@@ -0,0 +1,127 @@
1
+ # Component Maturity Matrix
2
+
3
+ This file is the source of truth for public API readiness in `azamat-ui-kit`. A component can be exported from `src/index.ts` only when its status is explicit.
4
+
5
+ ## Status model
6
+
7
+ | Status | Meaning | Publish rule |
8
+ | --- | --- | --- |
9
+ | `stable` | API is safe for app use and covered by type/import smoke checks. | Export from package root and registry. |
10
+ | `preview` | Useful and reusable, but API may still change. | Export is allowed with docs caveat. |
11
+ | `experimental` | API is being explored. | Prefer registry-only or internal use until audited. |
12
+ | `internal` | Helper used by other components. | Do not document as a primary component. |
13
+
14
+ The CLI registry status metadata lives in `cli/registry-status.ts`. `azamat-ui-kit list` displays these statuses so app teams can avoid accidentally treating preview/experimental APIs as stable.
15
+
16
+ ## Maturity rubric
17
+
18
+ Every public component family is reviewed against these gates:
19
+
20
+ 1. API shape: prop names, controlled/uncontrolled behavior, default values, and escape hatches are clear.
21
+ 2. Accessibility: semantic role, aria labels, title/description rules, disabled/read-only behavior, keyboard behavior, and focus return are documented.
22
+ 3. Styling: `className` merges last, `data-slot` is present, focus-visible ring uses tokens, and dark mode uses CSS variables.
23
+ 4. Runtime safety: no browser globals during SSR unless guarded, no project-specific routing/API imports, and no fake business copy.
24
+ 5. Tests/docs: import smoke, render smoke where available, README or handoff example, and registry dependency coverage.
25
+
26
+ ## Public export status
27
+
28
+ ### Stable primitives
29
+
30
+ | Component | Status | Notes |
31
+ | --- | --- | --- |
32
+ | `Button` | `stable` | Semantic variants: `default`, `secondary`, `outline`, `ghost`, `destructive`, `link`. Loading is handled with disabled state or app-level composition until a dedicated API is added. |
33
+ | `Input` | `stable` | Supports invalid/disabled/read-only styling through native attributes and token classes. Prefix/suffix stays in input wrappers. |
34
+ | `Textarea` | `stable` | Uses token-based border/ring and native resize behavior. |
35
+ | `Checkbox` | `stable` | Indeterminate usage should stay controlled by the consumer. |
36
+ | `Switch` | `stable` | Label/description composition belongs in form or settings-row wrappers. |
37
+ | `Badge` | `stable` | Tone taxonomy should stay token-based and avoid hardcoded project statuses. |
38
+ | `Card` | `stable` | Header/content/footer spacing is the package baseline. Nested cards should be avoided in app docs. |
39
+ | `Tabs` | `stable` | Keep keyboard behavior aligned with the underlying primitive/native pattern. |
40
+
41
+ ### Stable Base UI wrappers
42
+
43
+ | Component | Status | Notes |
44
+ | --- | --- | --- |
45
+ | `Dialog` | `stable` | Title/description are required by convention for accessible content. Close buttons need an aria label. |
46
+ | `Popover` | `stable` | Placement props should be passed through to the primitive wrapper. |
47
+ | `DropdownMenu` | `stable` | Disabled, destructive and shortcut slots are generic UI concerns. |
48
+ | `Select` | `stable` | Controlled/default value, placeholder, disabled options, group/label/separator remain generic. |
49
+ | `CommandPalette` | `preview` | Only `CommandPalette` and its shortcut hook should be treated as public for now. Low-level command primitives stay internal until composition tests exist. |
50
+
51
+ ### Stable complex families
52
+
53
+ | Family | Status | Boundary |
54
+ | --- | --- | --- |
55
+ | `actions` | `stable` | Async/loading/destructive behavior must be passed as props; no app API calls. |
56
+ | `layout` | `stable` | Router-agnostic with `renderLink` or regular anchors. |
57
+ | `filters` | `stable` | Controlled filter state belongs to the consumer. |
58
+ | `feedback` | `stable` | Empty/loading/error/success copy is caller-owned. |
59
+ | `display` | `stable` | Metrics/timeline/activity data is caller-owned. |
60
+ | `overlay` | `stable` | Submit/confirm async logic is caller-owned. |
61
+ | `navigation` | `stable` | Pagination is 1-based at the public edge and can be adapted by consumers. |
62
+
63
+ ### Forms and inputs
64
+
65
+ | Family | Status | Value model |
66
+ | --- | --- | --- |
67
+ | `inputs` | `preview` | Prefer `value` as raw string/number and `onValueChange` or typed callbacks for parsed values. |
68
+ | `form` | `preview` | React Hook Form wrappers should stay type-safe with `Control<FieldValues>` and field-state errors. |
69
+ | `calendar` | `preview` | Values are `YYYY-MM-DD` local-date strings. Consumers own timezone conversion for API payloads. |
70
+ | `upload` | `preview` | Consumers own validation copy; package owns disabled, accept, progress, preview and cleanup behavior. |
71
+
72
+ ### Data and patterns
73
+
74
+ | Component | Status | Contract |
75
+ | --- | --- | --- |
76
+ | `DataTable` | `preview` | Generic TanStack Table shell. Server/client sorting, filtering and pagination must be explicit in props. Public pagination config uses a 0-based `pageIndex`, matching TanStack Table; visible UI labels may display 1-based page numbers. |
77
+ | `DataTableViewPresets` | `preview` | Persistence is optional and should use caller-provided local/session storage keys. |
78
+ | `ResourcePage` | `preview` | Generic business shell only; no project copy, routes or API assumptions. |
79
+ | `ResourceDetailPage` | `preview` | Sections should remain type-safe and caller-owned. |
80
+ | `FormBuilder` | `experimental` | Remains experimental until custom field render and `FieldPath` type tests exist. |
81
+
82
+ ## Public API decisions
83
+
84
+ - `ThemeProvider` remains source-only/internal for now. The package-level contract is CSS token ownership in the consumer app, not a root provider export.
85
+ - `InputGroup`/prefix/suffix composition stays internal or wrapper-level until a stable API is designed.
86
+ - Low-level command primitives stay internal; export `CommandPalette` and shortcut helpers only.
87
+ - Root exports stay as-is until a public API snapshot proves that subpath exports are needed for documentation or tree-shaking.
88
+ - Every public API addition/removal must be recorded in `CHANGELOG.md` under Added/Changed/Removed before release.
89
+
90
+ ## Public helper rule
91
+
92
+ Variant helpers such as `buttonVariants` and `badgeVariants` may stay public when they are documented as styling helpers. If a helper is only used internally, move it out of `src/index.ts` before the next major/minor release.
93
+
94
+ ## Color policy
95
+
96
+ Token-first classes are required for neutral UI surfaces: `background`, `foreground`, `card`, `popover`, `muted`, `accent`, `border`, `input`, `ring`, `primary`, `secondary`, `destructive`.
97
+
98
+ Allowed semantic hardcoded palettes are limited to status/tone components and must represent meaning, not layout:
99
+
100
+ - emerald: success/positive/online
101
+ - amber: warning/pending
102
+ - red: danger/destructive/error when the `destructive` token is not enough for multi-tone status UI
103
+ - blue: info/neutral-progress
104
+
105
+ Non-semantic neutral palettes such as `zinc`, `slate`, `neutral`, `stone`, `white`, and `black` should be converted to token classes in package components unless they are inside documentation examples or intentionally isolated visual assets.
106
+
107
+ ## Font dependency decision
108
+
109
+ `@fontsource-variable/geist` stays as a package dependency for now because the CLI theme block imports it into the consumer app CSS. It is not imported by React components directly. If the theme block stops importing the font, the dependency can move out of runtime dependencies.
110
+
111
+ ## Component audit checklist
112
+
113
+ Use this before promoting any component to `stable`:
114
+
115
+ - `displayName` where React DevTools value is not obvious.
116
+ - `data-slot` naming matches the package convention.
117
+ - `className` is merged after defaults through `cn(...)`.
118
+ - `ref` forwarding or ref pass-through is intentional.
119
+ - Controlled/uncontrolled props do not conflict.
120
+ - Disabled, read-only and loading semantics are clear.
121
+ - Focus-visible styling uses `ring` tokens.
122
+ - Keyboard behavior is native or documented.
123
+ - Required aria labels, titles and descriptions are documented.
124
+ - Dark mode relies on theme tokens.
125
+ - Responsive overflow behavior is defined.
126
+ - SSR guards exist for `window`, `document`, `localStorage` and object URLs.
127
+ - Tree-shaking is protected by side-effect-free component modules.
package/README.md CHANGED
@@ -23,16 +23,16 @@ Good candidates:
23
23
 
24
24
  Do not put project-specific Kassa, LMS, Restaurant, tenant, billing, permission, branch, or API logic into the core UI kit.
25
25
 
26
- ## Install
27
-
28
- ```bash
29
- npm install azamat-ui-kit
30
- ```
31
-
32
- Alternative GitHub install:
33
-
34
- ```bash
35
- npm install github:AzamatJurayev-dev/azamat-ui-kit#master
26
+ ## Install
27
+
28
+ ```bash
29
+ npm install azamat-ui-kit
30
+ ```
31
+
32
+ Alternative GitHub install:
33
+
34
+ ```bash
35
+ npm install github:AzamatJurayev-dev/azamat-ui-kit#master
36
36
  ```
37
37
 
38
38
  Initialize the project once:
@@ -41,7 +41,19 @@ Initialize the project once:
41
41
  npx azamat-ui-kit init
42
42
  ```
43
43
 
44
- The package entry does **not** import global CSS. During `init`, the CLI can write Azamat UI Kit theme tokens directly into your app global CSS file, for example `src/index.css`.
44
+ Use Next.js defaults:
45
+
46
+ ```bash
47
+ npx azamat-ui-kit init --template next
48
+ ```
49
+
50
+ Use Vite defaults:
51
+
52
+ ```bash
53
+ npx azamat-ui-kit init --template vite
54
+ ```
55
+
56
+ The package entry does **not** import global CSS. During `init`, the CLI can write Azamat UI Kit theme tokens directly into your app global CSS file, for example `src/index.css` or `app/globals.css`.
45
57
 
46
58
  Do not import package CSS manually:
47
59
 
@@ -50,7 +62,7 @@ Do not import package CSS manually:
50
62
  // import "azamat-ui-kit/style.css"
51
63
  ```
52
64
 
53
- Use components:
65
+ Use components:
54
66
 
55
67
  ```tsx
56
68
  import {
@@ -80,54 +92,70 @@ import {
80
92
  ToastProvider,
81
93
  useCommandPaletteShortcut,
82
94
  useToast,
83
- } from "azamat-ui-kit"
84
- ```
85
-
86
- ## Router integration
87
-
88
- The package is router-agnostic by default. Navigation-oriented components render regular `<a>` tags unless you provide a custom link renderer.
89
-
90
- Example with Next.js:
91
-
92
- ```tsx
93
- import Link from "next/link"
94
- import { Breadcrumbs, SidebarNav } from "azamat-ui-kit"
95
-
96
- <Breadcrumbs
97
- items={[
98
- { key: "home", label: "Home", href: "/" },
99
- { key: "components", label: "Components", href: "/components" },
100
- ]}
101
- renderLink={({ item, ...props }) => <Link {...props} href={item.href || "#"} />}
102
- />
103
-
104
- <SidebarNav
105
- items={[
106
- { key: "dashboard", label: "Dashboard", href: "/dashboard" },
107
- { key: "settings", label: "Settings", href: "/settings" },
108
- ]}
109
- renderLink={({ item, ...props }) => <Link {...props} href={item.href || "#"} />}
110
- />
111
- ```
112
-
113
- ## Local development
114
-
115
- ```bash
116
- npm install
117
- npm run dev
118
- npm run build
119
- ```
120
-
121
- ## Release
122
-
123
- Useful commands before public release:
124
-
125
- ```bash
126
- npm run test:run
127
- npm pack --dry-run
128
- ```
129
-
130
- Release notes live in `CHANGELOG.md`, and the publish flow is documented in `RELEASE.md`.
95
+ } from "azamat-ui-kit"
96
+ ```
97
+
98
+ ## Component status
99
+
100
+ Component readiness is tracked in `COMPONENT_MATURITY.md` and mirrored for the CLI in `cli/registry-status.ts`.
101
+
102
+ ```bash
103
+ npx azamat-ui-kit list
104
+ ```
105
+
106
+ Statuses:
107
+
108
+ - `stable`: safe public API for app usage.
109
+ - `preview`: reusable, but API may change before a stable release.
110
+ - `experimental`: useful internally, but not ready for stable app contracts.
111
+ - `internal`: helper metadata or implementation detail.
112
+
113
+ Stable today: primitives, Base UI wrappers, router-agnostic layout/navigation, feedback/display wrappers and generic action/overlay components. Preview today: inputs, forms, calendar, upload, data-table and resource patterns. Experimental today: `FormBuilder` and presets.
114
+
115
+ ## Router integration
116
+
117
+ The package is router-agnostic by default. Navigation-oriented components render regular `<a>` tags unless you provide a custom link renderer.
118
+
119
+ Example with Next.js:
120
+
121
+ ```tsx
122
+ import Link from "next/link"
123
+ import { Breadcrumbs, SidebarNav } from "azamat-ui-kit"
124
+
125
+ <Breadcrumbs
126
+ items={[
127
+ { key: "home", label: "Home", href: "/" },
128
+ { key: "components", label: "Components", href: "/components" },
129
+ ]}
130
+ renderLink={({ item, ...props }) => <Link {...props} href={item.href || "#"} />}
131
+ />
132
+
133
+ <SidebarNav
134
+ items={[
135
+ { key: "dashboard", label: "Dashboard", href: "/dashboard" },
136
+ { key: "settings", label: "Settings", href: "/settings" },
137
+ ]}
138
+ renderLink={({ item, ...props }) => <Link {...props} href={item.href || "#"} />}
139
+ />
140
+ ```
141
+
142
+ ## Local development
143
+
144
+ ```bash
145
+ npm install
146
+ npm run build
147
+ ```
148
+
149
+ ## Release
150
+
151
+ Useful commands before public release:
152
+
153
+ ```bash
154
+ npm run release:gate
155
+ npm pack --dry-run
156
+ ```
157
+
158
+ Release notes live in `CHANGELOG.md`, and the publish flow is documented in `RELEASE.md`.
131
159
 
132
160
  ## Component rules
133
161
 
@@ -165,7 +193,9 @@ Consumer apps own the global CSS. The UI kit only uses token-based classes like
165
193
  npx azamat-ui-kit theme src/index.css
166
194
  ```
167
195
 
168
- Dark mode works by toggling the `.dark` class on the root/html element.
196
+ Dark mode works by toggling the `.dark` class on the root/html element. The theme block also provides `.light` for explicit light-mode class usage.
197
+
198
+ The generated theme block imports `@fontsource-variable/geist`; keep that dependency installed when using the CLI theme output.
169
199
 
170
200
  ## Notifications example
171
201
 
@@ -228,6 +258,24 @@ useCommandPaletteShortcut(setOpen)
228
258
  <NumberInput value={price} min={0} step={1000} onNumberChange={setPrice} />
229
259
  ```
230
260
 
261
+ ## Upload example
262
+
263
+ ```tsx
264
+ <ImageUpload
265
+ files={files}
266
+ onFilesChange={setFiles}
267
+ maxFiles={4}
268
+ maxSize={2 * 1024 * 1024}
269
+ rejectionMessages={{
270
+ "max-files": ({ maxFiles }) => `Upload at most ${maxFiles} images.`,
271
+ "max-size": ({ maxSize }) => `Each image must be under ${Math.round((maxSize ?? 0) / 1024 / 1024)} MB.`,
272
+ type: "Only image files are allowed.",
273
+ }}
274
+ />
275
+ ```
276
+
277
+ `ImageUpload` owns object URL preview cleanup when files change, preview is disabled, or the component unmounts. `FileUpload` blocks drag/drop and file dialog interactions while disabled or loading.
278
+
231
279
  ## DataTable example
232
280
 
233
281
  ```tsx
@@ -281,6 +329,7 @@ function ProductsTable() {
281
329
  data={products}
282
330
  isLoading={isLoading}
283
331
  emptyState={{ title: "No products" }}
332
+ search={{ value: search, onValueChange: setSearch, placeholder: "Search products" }}
284
333
  toolbarProps={(table) => ({
285
334
  title: "Products",
286
335
  search: <FilterBar search={<SearchInput placeholder="Search" />} />,
@@ -298,26 +347,28 @@ function ProductsTable() {
298
347
  }
299
348
  ```
300
349
 
301
- ## Migration plan
350
+ `DataTable` public pagination config uses a 0-based `pageIndex`, matching TanStack Table. UI copy can display page numbers as 1-based labels.
302
351
 
303
- Phase 1 added low-risk generic wrappers: ModalShell, SheetShell, ConfirmDialog, DialogActions, Pagination, SimpleSelect, MoneyInput, QuantityInput, useSessionStorageState, useBeforeUnloadWhenDirty, useIsMobile.
352
+ ## Troubleshooting
304
353
 
305
- Phase 2 added form and async-select layer: AsyncSelect base, FormFieldShell, FormInput, FormSelect, FormAsyncSelect, FormTextarea, FormSwitch, Textarea/Switch exports and react-hook-form peer dependency.
354
+ ### Missing theme tokens
306
355
 
307
- Phase 3 improved async select: AsyncMultiSelect, grouped options, quick create, selected option preload, local option cache, selected count labels.
356
+ Run the theme command against the actual global CSS file used by your app. For Vite this is often `src/index.css`; for Next App Router this is often `app/globals.css`.
308
357
 
309
- Phase 4 added data display layer: DataTable, DataTablePagination, DataTableToolbar, EmptyState, LoadingState, StatusBadge.
358
+ ```bash
359
+ npx azamat-ui-kit theme app/globals.css
360
+ ```
310
361
 
311
- Phase 5 added dashboard helpers: ActionMenu, PageHeader, FilterBar, StatCard, DataTableColumnVisibilityMenu.
362
+ ### ESM import issues
312
363
 
313
- Phase 6 added layout/table/input/hook helpers: AppShell, AppHeader, AppSidebar, Checkbox, createDataTableSelectColumn, DataTableSortableHeader, MaskedInput, PhoneInput, useDisclosure, useDebouncedValue, useDebouncedCallback.
364
+ Run `npm run build` in this repo before packing or installing from a local tarball. The build output check rejects ESM browser bundles that contain direct or indirect CommonJS `require` fallbacks.
314
365
 
315
- Phase 7 changed CSS strategy: package entry no longer imports global CSS; `azamat-ui-kit init` writes theme/dark-light tokens into the consumer app global CSS file.
366
+ ### Peer dependency mismatch
316
367
 
317
- Phase 8 added advanced inputs and form wrappers: ClearableInput, SearchInput, PasswordInput, NumberInput, DateInput, DateRangeInput, FormSearchInput, FormPasswordInput, FormNumberInput, FormPhoneInput, FormDateInput, FormDateRangeInput.
368
+ Install React and React DOM in the consumer app. They are peer dependencies and are intentionally not bundled into the package runtime.
318
369
 
319
- Phase 9 added data table action helpers: DataTableRowActions, createDataTableActionsColumn, DataTableBulkActions.
370
+ ### React Hook Form setup
320
371
 
321
- Phase 10 added notification and command helpers: ToastProvider, useToast, CommandPalette, useCommandPaletteShortcut.
372
+ Form wrappers require `react-hook-form` in the consumer app. Use package imports for reusable wrappers and keep form schema/business validation in the app layer.
322
373
 
323
- Next phase should add calendar / popover date picker and demo playground.
374
+ The library repo only contains reusable package source, CLI helpers, registry templates, tests, and release files. Public docs, blocks, templates showcase pages, and the marketing site live in the separate `azamat-ui` Next.js app.
package/RELEASE.md ADDED
@@ -0,0 +1,93 @@
1
+ # Release Checklist
2
+
3
+ ## Before publish
4
+
5
+ Run the same gate locally from a clean working tree:
6
+
7
+ ```bash
8
+ npm run release:gate
9
+ ```
10
+
11
+ The gate expands to:
12
+
13
+ ```bash
14
+ npm run lint
15
+ npm run test:run
16
+ npm run build
17
+ npm pack --dry-run
18
+ ```
19
+
20
+ Confirm:
21
+
22
+ - package name is correct: `azamat-ui-kit`
23
+ - version is correct in `package.json`, `registry.json`, and `CHANGELOG.md`
24
+ - `dist/index.js` does not contain runtime `require("react")`
25
+ - `dist/index.cjs` exists for Node/CommonJS consumers
26
+ - `dist/index.d.ts` is not empty and matches the package export map
27
+ - tarball only contains runtime package files, registry manifest, README, changelog, release docs, maturity docs, and license
28
+ - peer dependencies remain external: `react`, `react-dom`, `react/jsx-runtime`, `react-hook-form`
29
+
30
+ ## NPM account and 2FA/token
31
+
32
+ Use a publish token only from the owner npm account. If the account has 2FA enabled, publish with an OTP from the authenticator app. Do not store the npm token in the repo.
33
+
34
+ ```bash
35
+ npm login
36
+ npm whoami
37
+ npm publish --access public
38
+ ```
39
+
40
+ When publishing from CI later, store the npm token in GitHub Actions secrets and keep package provenance/2FA policy documented in the workflow handoff.
41
+
42
+ ## Manual consumer smoke
43
+
44
+ After `npm pack --dry-run`, test one clean consumer app before publishing:
45
+
46
+ ```bash
47
+ npm create vite@latest aui-smoke -- --template react-ts
48
+ cd aui-smoke
49
+ npm install ../azamat-ui-kit-0.2.0.tgz
50
+ npx azamat-ui-kit init --template vite
51
+ npx azamat-ui-kit add button input data-table --dry-run
52
+ ```
53
+
54
+ For Next.js:
55
+
56
+ ```bash
57
+ npx create-next-app@latest aui-next-smoke --ts --app
58
+ cd aui-next-smoke
59
+ npm install ../azamat-ui-kit-0.2.0.tgz
60
+ npx azamat-ui-kit init --template next
61
+ ```
62
+
63
+ ## After publish
64
+
65
+ ```bash
66
+ npm view azamat-ui-kit version
67
+ ```
68
+
69
+ Recommended follow-up:
70
+
71
+ - create a GitHub release for the same version
72
+ - copy the matching version notes from `CHANGELOG.md`
73
+ - update the separate docs/showcase app `azamat-ui` to install the published npm version
74
+ - remove any local tarball or workspace workaround from the docs app
75
+
76
+ ## GitHub release notes template
77
+
78
+ ```md
79
+ ## Fixes
80
+ - ...
81
+
82
+ ## Changed
83
+ - ...
84
+
85
+ ## Docs
86
+ - ...
87
+
88
+ ## Tests
89
+ - ...
90
+
91
+ ## Known limitations
92
+ - ...
93
+ ```