@waveinno/ui 0.1.0 → 0.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/CHANGELOG.md
CHANGED
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
Every release of `@waveinno/ui`. Add a line under **Unreleased** with each change; `./npmup.sh` moves it under the
|
|
4
|
-
new version when you release. Versions follow [semver](https://semver.org): patch = fix, minor = new component or
|
|
5
|
-
prop, major = a renamed or removed export or prop.
|
|
6
|
-
|
|
7
|
-
## Unreleased
|
|
8
|
-
|
|
9
|
-
## 0.1.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- **
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Every release of `@waveinno/ui`. Add a line under **Unreleased** with each change; `./npmup.sh` moves it under the
|
|
4
|
+
new version when you release. Versions follow [semver](https://semver.org): patch = fix, minor = new component or
|
|
5
|
+
prop, major = a renamed or removed export or prop.
|
|
6
|
+
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
## 0.1.1 — 2026-10-02
|
|
10
|
+
|
|
11
|
+
- DonutChart: no floating tooltip on hover; it covered the centre readout, which already shows the hovered slice.
|
|
12
|
+
|
|
13
|
+
## 0.1.0 — 2026-10-02
|
|
14
|
+
|
|
15
|
+
First release on npm, as compiled JavaScript (one module per file, `"use client"` kept per module) with type
|
|
16
|
+
definitions; no source or source maps are published.
|
|
17
|
+
|
|
18
|
+
- **Tokens** in `@waveinno/ui/styles.css`: light and dark, three densities, motion that stops for reduced motion.
|
|
19
|
+
- **Brand**: official `WaveinnoLogo` and `WaveinnoSymbol` (from brand/waveinno-logo.svg), `WaveMark` app icon in seven
|
|
20
|
+
tones drawn from the logo colours, squircle or round, flat or 3D, with shine / float / pulse / flip motion;
|
|
21
|
+
`PoweredBy` signature (inline or floating, like WAVEMAP's), `Watermark`; logo file at `@waveinno/ui/brand/`.
|
|
22
|
+
- **Primitives**: Button (primary, secondary, ghost, subtle, danger, link; gradient, glow, dark, outline, elevated,
|
|
23
|
+
glass, white; pill shape, xl size), Badge (soft, solid, outline, dot, gradient, live), Input and Textarea with
|
|
24
|
+
error / warning / success states and leading / trailing slots, FormField, Select, searchable Combobox, Checkbox,
|
|
25
|
+
Switch, Segmented (pill, solid, outline, glass, sliding thumb, three sizes), Tabs (underline, pill, solid, enclosed,
|
|
26
|
+
sliding indicator), Calendar, DatePicker, DateTimePicker, DateRangePicker with presets, TimePicker (12/24 h),
|
|
27
|
+
Dialog (floating drawer that widens or goes full width; icon and eyebrow header; frosted footer), Sheet,
|
|
28
|
+
ConfirmDialog (item preview, type-to-confirm), DropdownMenu (rich items, account header, glass and dark), Popover
|
|
29
|
+
(arrow, glass, dark, brand), Tooltip, Progress (bar, gradient, striped, segmented, indeterminate) and ProgressRing,
|
|
30
|
+
Avatar (name colours, status, verified, gradient ring, square), Skeleton.
|
|
31
|
+
- **Patterns**: DataTable with advanced filters (text, select, number, date; all / any; chips; saved in views),
|
|
32
|
+
search, sort, columns, pinning, CSV export, five looks (default, striped, bordered, cards, minimal), inline cell
|
|
33
|
+
editing with validation, bulk edit and bulk delete, sticky action column; UserCell and RowActions; PageHero;
|
|
34
|
+
PageHeader; StatCard (icon, spark, target, gradient, comparison) and KpiCard; Money; ActivityFeed (list, cards,
|
|
35
|
+
compact); ActivityTimeline; ChangeHistory (field diffs); ChangeNotes (threaded, replies); Note (tones, outline,
|
|
36
|
+
gradient); Kanban; empty, error and loading states.
|
|
37
|
+
- **Charts**: TrendChart, BarChart, LineChart (comparison and target), DonutChart, GaugeChart, Heatmap, BarList,
|
|
38
|
+
ChartCard and a validated palette.
|
|
39
|
+
- **Shell**: AppShell (rail → panel → content → drawer, ⌘K), theme and density controls, record drawer.
|
|
@@ -6,6 +6,8 @@ import * as React from "react";
|
|
|
6
6
|
* Six slices at most: past that, a donut is a guessing game, so the smallest
|
|
7
7
|
* fold into "Other" (pass `maxSlices`). The legend always shows value and
|
|
8
8
|
* percentage, because angles are the hardest thing for eyes to compare.
|
|
9
|
+
* Hovering a slice (or its legend row) reads it out in the hole — no floating
|
|
10
|
+
* tooltip, which would sit on top of that same readout.
|
|
9
11
|
*/
|
|
10
12
|
export interface DonutDatum {
|
|
11
13
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as c}from"react/jsx-runtime";import*as f from"react";import{Cell as D,Pie as M,PieChart as A,ResponsiveContainer as E}from"recharts";import{cn as N}from"../../lib/utils.js";import{SERIES as y}from"./palette.js";function _({data:d,format:m=a=>a.toLocaleString(),centerLabel:R="Total",centerValue:k,maxSlices:p=6,otherLabel:x="Other",height:w=220,legend:v="right",className:C}){const[a,r]=f.useState(null),l=f.useMemo(()=>{const e=[...d].sort((o,i)=>i.value-o.value),n=e.slice(0,p-(e.length>p?1:0)),h=e.slice(n.length),b=n.map((o,i)=>({...o,color:o.color??y[i%y.length]}));return h.length&&b.push({id:"__other",label:x,value:h.reduce((o,i)=>o+i.value,0),color:"var(--border2)"}),b},[d,p,x]),u=l.reduce((e,n)=>e+n.value,0),g=e=>u?`${(e/u*100).toFixed(e/u<.1?1:0)}%`:"0%",s=a!==null?l[a]:null;return c("div",{className:N("flex gap-5",v==="bottom"?"flex-col":"flex-col sm:flex-row sm:items-center",C),children:[c("div",{className:"relative mx-auto aspect-square w-full max-w-[220px] shrink-0",style:{height:w},children:[t(E,{width:"100%",height:"100%",children:t(A,{children:t(M,{data:l,dataKey:"value",nameKey:"label",innerRadius:"68%",outerRadius:"92%",paddingAngle:l.length>1?2:0,cornerRadius:4,stroke:"var(--raised)",strokeWidth:2,onMouseEnter:(e,n)=>r(n),onMouseLeave:()=>r(null),isAnimationActive:!0,animationDuration:700,children:l.map((e,n)=>t(D,{fill:e.color,fillOpacity:a===null||a===n?1:.35,style:{transition:"fill-opacity 150ms"}},e.id))})})}),t("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-center",children:c("div",{children:[t("p",{className:"text-[11px] font-medium uppercase tracking-[0.06em] text-muted",children:s?s.label:R}),t("p",{className:"num disp mt-0.5 text-[20px] font-semibold leading-none text-text",children:s?m(s.value):k??m(u)}),s?t("p",{className:"num mt-1 text-[11.5px] text-muted",children:g(s.value)}):null]})})]}),v!=="none"?t("ul",{className:"min-w-0 flex-1 space-y-1",children:l.map((e,n)=>c("li",{onMouseEnter:()=>r(n),onMouseLeave:()=>r(null),className:N("flex items-center gap-2.5 rounded-ctl px-2 py-1.5 text-[13px] transition-colors",a===n&&"bg-hover"),children:[t("span",{className:"size-2.5 shrink-0 rounded-[3px]",style:{background:e.color},"aria-hidden":!0}),t("span",{className:"min-w-0 flex-1 truncate text-body",children:e.label}),t("span",{className:"num font-medium text-text",children:m(e.value)}),t("span",{className:"num w-12 text-right text-[12px] text-muted",children:g(e.value)})]},e.id))}):null]})}export{_ as DonutChart};
|