klun-ui 0.2.0 → 0.2.2

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
@@ -5,6 +5,56 @@ All notable changes to **klun-ui** are documented here. The format follows
5
5
  [Semantic Versioning](https://semver.org/) (pre-1.0: minor/patch bumps may carry
6
6
  small breaking changes).
7
7
 
8
+ ## [0.2.2] — 2026-09-16
9
+
10
+ ### Added
11
+ - **Back-office business pages (Metronic examples, continued).** The templates
12
+ subpath now ships a complete admin set beside the dashboard & settings
13
+ examples — every screen is exported for standalone use and previewable in
14
+ Storybook under *Templates / Metronic*:
15
+ - **RBAC** — `RolesScreen` (role list + module × action permission matrix
16
+ with per-row select-all, dirty tracking and Reset/Save) and `UsersScreen`
17
+ (team list with role / status / 2FA, invite & edit in a modal, suspend and
18
+ remove behind the confirm dialog).
19
+ - **CRUD with two editor flows** — `ProductsScreen` (list + detail drawer +
20
+ delete confirm) supports quick add/edit in a **modal** and a route-style
21
+ **full-page wizard** (`ProductWizardPage`: basics → pricing & stock →
22
+ review, with per-step validation). With a router, mount the wizard at
23
+ `/products/new` and `/products/:id/edit`.
24
+ - `OrdersScreen` (selection + bulk actions, column filters, CSV export,
25
+ pagination), `CustomersScreen` (segments, lifetime spend, relative times)
26
+ and `ReportsScreen` (sales / traffic views with an area chart, donut and
27
+ breakdown tables).
28
+ - **Table toolbar & pager are now density-aware**, and the remaining controls
29
+ joined the density axis: command-menu items, select-menu options,
30
+ horizontal-filter pills, popconfirm buttons, bulk-action bar, tree rows and
31
+ the image-viewer controls all follow `data-density`.
32
+
33
+ ### Changed
34
+ - **The Metronic example pages are compact by default** (`data-density="compact"`
35
+ on the template roots) — buttons 40→36, 36→32, tiny 28→24, fields 40→36,
36
+ table toolbar / pager 32→28. Drop the attribute to get the comfortable scale
37
+ back.
38
+ - Table toolbar buttons now use the small tier in the default scale as well
39
+ (36 → 32), matching the pager.
40
+
41
+ ## [0.2.1] — 2026-09-16
42
+
43
+ ### Added
44
+ - **Metronic example pages — `MetronicDashboardTemplate` /
45
+ `MetronicSettingsTemplate`** (templates subpath). They port the Metronic
46
+ design-system examples onto klun-ui components inside the Metronic 9.0 skin
47
+ (`data-mode="metronic"`, drop the attribute to fall back to the default
48
+ theme):
49
+ - *Dashboard* — app shell (brand sidebar with badge + nested nav, search top
50
+ bar) around KPI tiles with inline sparklines, a revenue/orders bar chart
51
+ with pill tabs, a traffic-sources donut and a recent-orders table.
52
+ - *Settings* — breadcrumb + section nav with profile photo, personal
53
+ information form (inputs, selects, textarea), and notification toggles.
54
+ - The charts (`Sparkline` / `BarChart` / `DonutChart`) are dependency-free
55
+ inline SVG and fully token-driven, so both pages follow the skin and dark
56
+ mode automatically. Preview both in Storybook under *Templates / Metronic*.
57
+
8
58
  ## [0.2.0] — 2026-09-16
9
59
 
10
60
  ### Added
package/README.md CHANGED
@@ -100,11 +100,11 @@ All components and their prop types are named exports; the `cx` classnames helpe
100
100
 
101
101
  ## Templates
102
102
 
103
- Full-screen example compositions are available from the `klun-ui/templates` subpath — copy-and-go starting points built entirely from klun-ui components (`DashboardTemplate`, `AIAssistantTemplate`, `AgentChatTemplate`, `CryptoTemplate`, `MarketingTemplate`, `CalendarTemplate`, `PricingTemplate`, `SettingsTemplate`):
103
+ Full-screen example compositions are available from the `klun-ui/templates` subpath — copy-and-go starting points built entirely from klun-ui components (`DashboardTemplate`, `AIAssistantTemplate`, `AgentChatTemplate`, `CryptoTemplate`, `MarketingTemplate`, `CalendarTemplate`, `PricingTemplate`, `SettingsTemplate`, plus the Metronic examples — `MetronicDashboardTemplate` / `MetronicSettingsTemplate` and the back-office screens `OrdersScreen`, `ProductsScreen` (CRUD with modal + full-page wizard editors), `CustomersScreen`, `UsersScreen`, `RolesScreen` (RBAC), `ReportsScreen` — which render inside the Metronic 9.0 skin at compact density):
104
104
 
105
105
  ```tsx
106
106
  import "klun-ui/styles.css";
107
- import { DashboardTemplate, AIAssistantTemplate, AgentChatTemplate, CryptoTemplate, MarketingTemplate, CalendarTemplate, PricingTemplate, SettingsTemplate } from "klun-ui/templates";
107
+ import { DashboardTemplate, AIAssistantTemplate, AgentChatTemplate, CryptoTemplate, MarketingTemplate, CalendarTemplate, PricingTemplate, SettingsTemplate, MetronicDashboardTemplate, MetronicSettingsTemplate } from "klun-ui/templates";
108
108
 
109
109
  export default function App() {
110
110
  return <DashboardTemplate />;
package/dist/styles.css CHANGED
@@ -2239,8 +2239,8 @@ body {
2239
2239
  display: inline-flex;
2240
2240
  align-items: center;
2241
2241
  justify-content: center;
2242
- width: 32px;
2243
- height: 32px;
2242
+ width: var(--klun-control-h-sm, 32px);
2243
+ height: var(--klun-control-h-sm, 32px);
2244
2244
  margin-left: 4px;
2245
2245
  border: none;
2246
2246
  cursor: pointer;
@@ -2259,7 +2259,7 @@ body {
2259
2259
  display: inline-flex;
2260
2260
  align-items: center;
2261
2261
  gap: 6px;
2262
- height: 32px;
2262
+ height: var(--klun-control-h-sm, 32px);
2263
2263
  padding: 0 12px;
2264
2264
  border: none;
2265
2265
  cursor: pointer;
@@ -4318,8 +4318,8 @@ body {
4318
4318
  display: inline-flex;
4319
4319
  align-items: center;
4320
4320
  gap: 6px;
4321
- height: 36px;
4322
- padding: 0 12px;
4321
+ height: var(--klun-control-h-sm, 32px);
4322
+ padding: 0 var(--klun-control-px-sm, 12px);
4323
4323
  border: none;
4324
4324
  border-radius: var(--klun-radius-lg);
4325
4325
  background: var(--klun-bg-white-0);
@@ -4353,8 +4353,8 @@ body {
4353
4353
  display: inline-flex;
4354
4354
  align-items: center;
4355
4355
  justify-content: center;
4356
- width: 28px;
4357
- height: 28px;
4356
+ width: var(--klun-control-h-xs, 28px);
4357
+ height: var(--klun-control-h-xs, 28px);
4358
4358
  border: none;
4359
4359
  border-radius: var(--klun-radius-md);
4360
4360
  background: transparent;
@@ -4516,7 +4516,7 @@ body {
4516
4516
  display: inline-flex;
4517
4517
  align-items: center;
4518
4518
  gap: 6px;
4519
- height: 32px;
4519
+ height: var(--klun-control-h-sm, 32px);
4520
4520
  padding: 0 8px 0 10px;
4521
4521
  border: none;
4522
4522
  border-radius: var(--klun-radius-md);
@@ -4570,8 +4570,8 @@ body {
4570
4570
  display: inline-flex;
4571
4571
  align-items: center;
4572
4572
  justify-content: center;
4573
- min-width: 32px;
4574
- height: 32px;
4573
+ min-width: var(--klun-control-h-sm, 32px);
4574
+ height: var(--klun-control-h-sm, 32px);
4575
4575
  padding: 0 6px;
4576
4576
  border: none;
4577
4577
  border-radius: var(--klun-radius-md);
@@ -4808,7 +4808,7 @@ body {
4808
4808
  display: flex;
4809
4809
  align-items: center;
4810
4810
  gap: 6px;
4811
- height: 32px;
4811
+ height: var(--klun-control-h-sm, 32px);
4812
4812
  padding-left: var(--klun-tree-indent, 6px);
4813
4813
  padding-right: 8px;
4814
4814
  border-radius: var(--klun-radius-md);
@@ -8045,7 +8045,7 @@ body {
8045
8045
  align-items: center;
8046
8046
  gap: 10px;
8047
8047
  width: 100%;
8048
- min-height: 36px;
8048
+ min-height: var(--klun-control-h-md, 36px);
8049
8049
  padding: 7px 10px;
8050
8050
  border: none;
8051
8051
  border-radius: var(--klun-radius-md);
@@ -8870,11 +8870,11 @@ body {
8870
8870
  display: none;
8871
8871
  }
8872
8872
  .klun-horizontal-filter--small .klun-horizontal-filter__item {
8873
- height: 30px;
8873
+ height: var(--klun-control-h-xs, 28px);
8874
8874
  font: var(--klun-text-label-xs);
8875
8875
  }
8876
8876
  .klun-horizontal-filter--medium .klun-horizontal-filter__item {
8877
- height: 36px;
8877
+ height: var(--klun-control-h-md, 36px);
8878
8878
  font: var(--klun-text-label-sm);
8879
8879
  }
8880
8880
  .klun-horizontal-filter__item {
@@ -9527,7 +9527,7 @@ body {
9527
9527
  align-items: center;
9528
9528
  gap: 12px;
9529
9529
  width: 100%;
9530
- height: 40px;
9530
+ height: var(--klun-control-h-lg, 40px);
9531
9531
  padding: 0 10px;
9532
9532
  border: none;
9533
9533
  border-radius: var(--klun-radius-md);
@@ -10039,8 +10039,8 @@ body {
10039
10039
  display: inline-flex;
10040
10040
  align-items: center;
10041
10041
  justify-content: center;
10042
- width: 32px;
10043
- height: 32px;
10042
+ width: var(--klun-control-h-sm, 32px);
10043
+ height: var(--klun-control-h-sm, 32px);
10044
10044
  border: none;
10045
10045
  border-radius: 8px;
10046
10046
  background: transparent;
@@ -10297,7 +10297,7 @@ body {
10297
10297
  margin-top: 12px;
10298
10298
  }
10299
10299
  .klun-popconfirm__cancel {
10300
- height: 32px;
10300
+ height: var(--klun-control-h-sm, 32px);
10301
10301
  padding: 0 12px;
10302
10302
  border: none;
10303
10303
  border-radius: var(--klun-radius-lg);
@@ -10315,7 +10315,7 @@ body {
10315
10315
  display: inline-flex;
10316
10316
  align-items: center;
10317
10317
  gap: 6px;
10318
- height: 32px;
10318
+ height: var(--klun-control-h-sm, 32px);
10319
10319
  padding: 0 14px;
10320
10320
  border: none;
10321
10321
  border-radius: var(--klun-radius-lg);