klun-ui 0.1.19 → 0.1.20
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 +19 -0
- package/dist/{chunk-NYIPE2T7.js → chunk-JFRI333P.js} +64 -3
- package/dist/chunk-JFRI333P.js.map +1 -0
- package/dist/{chunk-XMNM45KO.cjs → chunk-XNBVAUVT.cjs} +66 -2
- package/dist/chunk-XNBVAUVT.cjs.map +1 -0
- package/dist/index.cjs +167 -155
- package/dist/index.d.cts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +172 -0
- package/dist/templates/index.cjs +89 -89
- package/dist/templates/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-NYIPE2T7.js.map +0 -1
- package/dist/chunk-XMNM45KO.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,25 @@ 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.1.20] — 2026-07-11
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **`StatCard` (data-display) — a KPI metric card.** A tinted icon tile
|
|
12
|
+
(`tint` = feature | success | warning | information | error), a `label`, a big
|
|
13
|
+
`value`, and an optional up/down `delta` pill (`trend`). For a bare metric
|
|
14
|
+
without the card surface, use `Statistic`.
|
|
15
|
+
- **`EmptyState` (feedback) — a centered placeholder for empty lists/views.**
|
|
16
|
+
`icon` medallion, `title`, `description` and an `action` slot.
|
|
17
|
+
- **`Result` (feedback) — a full-page outcome screen.** `status` presets
|
|
18
|
+
(success / error / warning / info / 404 / 403 / 500) each supply an icon and
|
|
19
|
+
color (override with a custom `icon`), plus `title`, `subtitle`, an `extra`
|
|
20
|
+
actions row and optional body `children`.
|
|
21
|
+
|
|
22
|
+
These three existed in the legacy inline-style design-system but had never been
|
|
23
|
+
ported to the token-based `src/` package, so they were missing from the npm
|
|
24
|
+
build (and the browser bundle). Now ported to the standard CSS-class + token
|
|
25
|
+
architecture and exported.
|
|
26
|
+
|
|
8
27
|
## [0.1.19] — 2026-07-11
|
|
9
28
|
|
|
10
29
|
### Added
|
|
@@ -3700,6 +3700,30 @@ var Statistic = forwardRef(function Statistic2({ label, value, prefix, suffix, p
|
|
|
3700
3700
|
] });
|
|
3701
3701
|
});
|
|
3702
3702
|
Statistic.displayName = "Statistic";
|
|
3703
|
+
var StatCard = forwardRef(function StatCard2({ label, value, delta, trend = "up", icon, tint = "feature", className, ...props }, ref) {
|
|
3704
|
+
const up = trend === "up";
|
|
3705
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cx("klun-stat-card", `klun-stat-card--${tint}`, className), ...props, children: [
|
|
3706
|
+
/* @__PURE__ */ jsxs("div", { className: "klun-stat-card__head", children: [
|
|
3707
|
+
/* @__PURE__ */ jsx("span", { className: "klun-stat-card__icon", children: icon }),
|
|
3708
|
+
delta != null ? /* @__PURE__ */ jsxs(
|
|
3709
|
+
"span",
|
|
3710
|
+
{
|
|
3711
|
+
className: cx(
|
|
3712
|
+
"klun-stat-card__delta",
|
|
3713
|
+
up ? "klun-stat-card__delta--up" : "klun-stat-card__delta--down"
|
|
3714
|
+
),
|
|
3715
|
+
children: [
|
|
3716
|
+
/* @__PURE__ */ jsx("i", { className: up ? "ri-arrow-up-line" : "ri-arrow-down-line" }),
|
|
3717
|
+
delta
|
|
3718
|
+
]
|
|
3719
|
+
}
|
|
3720
|
+
) : null
|
|
3721
|
+
] }),
|
|
3722
|
+
/* @__PURE__ */ jsx("div", { className: "klun-stat-card__label", children: label }),
|
|
3723
|
+
/* @__PURE__ */ jsx("div", { className: "klun-stat-card__value", children: value })
|
|
3724
|
+
] });
|
|
3725
|
+
});
|
|
3726
|
+
StatCard.displayName = "StatCard";
|
|
3703
3727
|
var SIZES2 = { xs: 6, sm: 8, md: 10, lg: 12 };
|
|
3704
3728
|
var StatusDot = forwardRef(function StatusDot2({ tone = "neutral", size = "sm", pulse = false, label, className, style, ...props }, ref) {
|
|
3705
3729
|
const sizeStyle = { ["--klun-status-dot-size"]: `${SIZES2[size] ?? SIZES2.sm}px` };
|
|
@@ -5663,6 +5687,43 @@ var Alert = forwardRef(function Alert2({ status = "information", variant = "ligh
|
|
|
5663
5687
|
);
|
|
5664
5688
|
});
|
|
5665
5689
|
Alert.displayName = "Alert";
|
|
5690
|
+
var EmptyState = forwardRef(function EmptyState2({ icon, title, description, action, className, ...props }, ref) {
|
|
5691
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cx("klun-empty-state", className), ...props, children: [
|
|
5692
|
+
icon ? /* @__PURE__ */ jsx("div", { className: "klun-empty-state__icon", children: icon }) : null,
|
|
5693
|
+
title ? /* @__PURE__ */ jsx("div", { className: "klun-empty-state__title", children: title }) : null,
|
|
5694
|
+
description ? /* @__PURE__ */ jsx("div", { className: "klun-empty-state__desc", children: description }) : null,
|
|
5695
|
+
action ? /* @__PURE__ */ jsx("div", { className: "klun-empty-state__action", children: action }) : null
|
|
5696
|
+
] });
|
|
5697
|
+
});
|
|
5698
|
+
EmptyState.displayName = "EmptyState";
|
|
5699
|
+
var PRESET_ICON = {
|
|
5700
|
+
success: "ri-checkbox-circle-fill",
|
|
5701
|
+
error: "ri-close-circle-fill",
|
|
5702
|
+
warning: "ri-alert-fill",
|
|
5703
|
+
info: "ri-information-fill",
|
|
5704
|
+
"404": "ri-compass-3-line",
|
|
5705
|
+
"403": "ri-lock-2-line",
|
|
5706
|
+
"500": "ri-server-line"
|
|
5707
|
+
};
|
|
5708
|
+
var Result = forwardRef(function Result2({ status = "info", icon, title, subtitle, extra, children, className, ...props }, ref) {
|
|
5709
|
+
const big = status === "404" || status === "403" || status === "500";
|
|
5710
|
+
return /* @__PURE__ */ jsxs(
|
|
5711
|
+
"div",
|
|
5712
|
+
{
|
|
5713
|
+
ref,
|
|
5714
|
+
className: cx("klun-result", `klun-result--${status}`, big && "klun-result--big", className),
|
|
5715
|
+
...props,
|
|
5716
|
+
children: [
|
|
5717
|
+
/* @__PURE__ */ jsx("div", { className: "klun-result__icon", children: icon || /* @__PURE__ */ jsx("i", { className: PRESET_ICON[status] }) }),
|
|
5718
|
+
title ? /* @__PURE__ */ jsx("div", { className: "klun-result__title", children: title }) : null,
|
|
5719
|
+
subtitle ? /* @__PURE__ */ jsx("div", { className: "klun-result__subtitle", children: subtitle }) : null,
|
|
5720
|
+
extra ? /* @__PURE__ */ jsx("div", { className: "klun-result__extra", children: extra }) : null,
|
|
5721
|
+
children ? /* @__PURE__ */ jsx("div", { className: "klun-result__content", children }) : null
|
|
5722
|
+
]
|
|
5723
|
+
}
|
|
5724
|
+
);
|
|
5725
|
+
});
|
|
5726
|
+
Result.displayName = "Result";
|
|
5666
5727
|
var Banner = forwardRef(function Banner2({ status = "information", variant = "filled", icon, action, onClose, className, children, ...props }, ref) {
|
|
5667
5728
|
const { banner } = useLocale();
|
|
5668
5729
|
return /* @__PURE__ */ jsxs(
|
|
@@ -11462,6 +11523,6 @@ var Popconfirm = forwardRef(function Popconfirm2({
|
|
|
11462
11523
|
});
|
|
11463
11524
|
Popconfirm.displayName = "Popconfirm";
|
|
11464
11525
|
|
|
11465
|
-
export { Accordion, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, BulkAction, BulkActionBar, Button, ButtonGroup, Card, Carousel, Cascader, CharacterCounter, ChartLegend, ChartTooltip, Checkbox, CheckboxCard, CheckboxGroup, Chip, CircularProgress, CodeViewer, Col, Collapse, ColorDot, ColorPicker, ColorSlider, CommandMenu, CompactSelect, CompactSelectForInput, ConfigProvider, Confirm, ContentLabel, ContextMenu2 as ContextMenu, CopyButton, CounterInput, CrossRefBadge, DatePicker, DateRangePicker, DateTimePicker, Descriptions, DiffViewer, DigitInput, Divider, Drawer, Dropdown, ExpiryCountdown, FileUpload, Flex, Form, FormItem, FormList, Format, GaugeBar, Grid, Hint, HorizontalFilter, ImageUpload, ImageViewer, InlineInput, InlineSelect, Input, Kbd, KeyIcon, Label, Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutSider, List, ListItem, LiveDot, LogViewer, Markdown, Masonry, Menu, Message, Modal, Money, Notification, PageHeader, Pagination, PasswordStrength, Popconfirm, Popover, ProgressBar, Radio, RadioCard, RangeSlider, Rating, RelativeTime, RichEditorToolbar, Row, SegmentedControl, SegmentedProgress, Select, SelectMenu, Skeleton, Slider, Space, Spinner2 as Spinner, Splitter2 as Splitter, SplitterPanel, Statistic, StatusBadge, StatusDot, StepIndicator, Switch, Table, Tabs, Tag, Textarea, TimePicker, Timeline, Toast, Toaster, Tooltip, Tree, Wizard, arSA, deDE, enUS, esES, fmt, frFR, idID, itIT, jaJP, koKR, locales, nlNL, parsePatch, plPL, primaryColorVars, ptBR, renderMarkdown, ruRU, toast, trTR, useBreakpoint, useConfig, useContextMenu, useForm, useLocale, useMappedSize, useMessage, useNotification, useSize, viVN, zhCN, zhTW };
|
|
11466
|
-
//# sourceMappingURL=chunk-
|
|
11467
|
-
//# sourceMappingURL=chunk-
|
|
11526
|
+
export { Accordion, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, BulkAction, BulkActionBar, Button, ButtonGroup, Card, Carousel, Cascader, CharacterCounter, ChartLegend, ChartTooltip, Checkbox, CheckboxCard, CheckboxGroup, Chip, CircularProgress, CodeViewer, Col, Collapse, ColorDot, ColorPicker, ColorSlider, CommandMenu, CompactSelect, CompactSelectForInput, ConfigProvider, Confirm, ContentLabel, ContextMenu2 as ContextMenu, CopyButton, CounterInput, CrossRefBadge, DatePicker, DateRangePicker, DateTimePicker, Descriptions, DiffViewer, DigitInput, Divider, Drawer, Dropdown, EmptyState, ExpiryCountdown, FileUpload, Flex, Form, FormItem, FormList, Format, GaugeBar, Grid, Hint, HorizontalFilter, ImageUpload, ImageViewer, InlineInput, InlineSelect, Input, Kbd, KeyIcon, Label, Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutSider, List, ListItem, LiveDot, LogViewer, Markdown, Masonry, Menu, Message, Modal, Money, Notification, PageHeader, Pagination, PasswordStrength, Popconfirm, Popover, ProgressBar, Radio, RadioCard, RangeSlider, Rating, RelativeTime, Result, RichEditorToolbar, Row, SegmentedControl, SegmentedProgress, Select, SelectMenu, Skeleton, Slider, Space, Spinner2 as Spinner, Splitter2 as Splitter, SplitterPanel, StatCard, Statistic, StatusBadge, StatusDot, StepIndicator, Switch, Table, Tabs, Tag, Textarea, TimePicker, Timeline, Toast, Toaster, Tooltip, Tree, Wizard, arSA, deDE, enUS, esES, fmt, frFR, idID, itIT, jaJP, koKR, locales, nlNL, parsePatch, plPL, primaryColorVars, ptBR, renderMarkdown, ruRU, toast, trTR, useBreakpoint, useConfig, useContextMenu, useForm, useLocale, useMappedSize, useMessage, useNotification, useSize, viVN, zhCN, zhTW };
|
|
11527
|
+
//# sourceMappingURL=chunk-JFRI333P.js.map
|
|
11528
|
+
//# sourceMappingURL=chunk-JFRI333P.js.map
|