@waveinno/ui 0.7.0 → 0.9.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.
- package/CHANGELOG.md +37 -0
- package/LICENSE +1 -1
- package/README.md +20 -7
- package/bin/starter-files.d.mts +8 -0
- package/bin/starter-files.mjs +136 -0
- package/bin/waveinno-ui.mjs +466 -0
- package/dist/components/ui/bd-address.d.ts +30 -0
- package/dist/components/ui/bd-address.js +1 -0
- package/dist/components/ui/checkbox-card.d.ts +18 -0
- package/dist/components/ui/checkbox-card.js +1 -0
- package/dist/components/ui/context-menu.d.ts +32 -0
- package/dist/components/ui/context-menu.js +1 -0
- package/dist/components/ui/index.d.ts +9 -0
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/multi-select.d.ts +39 -0
- package/dist/components/ui/multi-select.js +1 -0
- package/dist/components/ui/nid-input.d.ts +23 -0
- package/dist/components/ui/nid-input.js +1 -0
- package/dist/components/ui/payment-method-picker.d.ts +34 -0
- package/dist/components/ui/payment-method-picker.js +1 -0
- package/dist/components/ui/phone-input.d.ts +26 -0
- package/dist/components/ui/phone-input.js +1 -0
- package/dist/components/ui/plate-input.d.ts +32 -0
- package/dist/components/ui/plate-input.js +1 -0
- package/dist/components/ui/sheet.d.ts +8 -3
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/taka-input.d.ts +26 -0
- package/dist/components/ui/taka-input.js +1 -0
- package/dist/lib/bangla.d.ts +50 -0
- package/dist/lib/bangla.js +1 -0
- package/dist/lib/bd-geo.d.ts +39 -0
- package/dist/lib/bd-geo.js +1 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +1 -1
- package/dist/styles.css +11 -0
- package/package.json +20 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,43 @@ prop, major = a renamed or removed export or prop.
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## 0.9.0 — 2026-10-03
|
|
10
|
+
|
|
11
|
+
- **`npx @waveinno/ui init`**: one-command setup.
|
|
12
|
+
- It asks whether you build with Next.js or React + Vite, the currency (taka by default in Bangladesh) and the
|
|
13
|
+
package manager. It can create the app with the official starter.
|
|
14
|
+
- It shows the plan before changing anything, then installs the package and Tailwind CSS 4 and writes the
|
|
15
|
+
stylesheet, fonts, providers and theme script.
|
|
16
|
+
- Starter files are replaced and kept as `.bak`; your own files are left alone, with a note. It also warns when
|
|
17
|
+
your CSS reuses a token name (`--text`, `--border`…).
|
|
18
|
+
- `npx @waveinno/ui doctor` checks a setup. `--yes` and flags for CI.
|
|
19
|
+
- **Wavi**: the design system has a name and a mark. The docs site has a new home page, a "Powered by WAVEINNO" footer,
|
|
20
|
+
and search and AI-friendly metadata: sitemap, robots.txt, llms.txt, Open Graph image, and structured data
|
|
21
|
+
(SoftwareApplication, Organization, FAQPage).
|
|
22
|
+
- **Templates** download as Next.js **or React + Vite** (React Router, a page per route, loaded on demand).
|
|
23
|
+
- PhoneInput and NidInput adapt to their width: in a narrow column the operator or ID-kind label shrinks to its tick,
|
|
24
|
+
so the number keeps its room.
|
|
25
|
+
|
|
26
|
+
## 0.8.0 — 2026-10-03
|
|
27
|
+
|
|
28
|
+
- **Bangladesh kit** (new, free):
|
|
29
|
+
- **PhoneInput:** +880 mobile numbers typed any way, Bangla digits too; names the operator and returns
|
|
30
|
+
`+8801XXXXXXXXX`.
|
|
31
|
+
- **TakaInput:** lakh grouping as you type, the amount in words, holds a number.
|
|
32
|
+
- **BdAddressPicker:** 8 divisions and 64 districts in English or Bangla.
|
|
33
|
+
- **PaymentMethodPicker:** bKash, Nagad, Rocket, Upay, card, cash, bank, cash on delivery; cards, list or chips.
|
|
34
|
+
- **PlateInput:** with the plate drawn in Bangla. **NidInput:** 10, 13 or 17 digits.
|
|
35
|
+
- Helpers: `toBanglaDigits`, `fromBanglaDigits`, `toBongabdo` and `formatBanglaDate` (the revised Bangladesh
|
|
36
|
+
calendar), `lakhCrore`, `groupLakh`, `parseBdPhone`, `BD_DIVISIONS`, `BD_DISTRICTS`.
|
|
37
|
+
- **MultiSelect:** chips in the field, search, groups, select all, a `max` that says why it stops, full keyboard.
|
|
38
|
+
- **CheckboxCard:** RadioCard's twin for choosing several.
|
|
39
|
+
- **ContextMenu:** right-click or long-press, with the same items and looks as DropdownMenu. Adds the dependency
|
|
40
|
+
`@radix-ui/react-context-menu`.
|
|
41
|
+
- **Sheet `side="bottom"`:** a bottom sheet with a handle you can drag down to close; a centred card on wide screens.
|
|
42
|
+
- `fieldStateClass`: the input states for fields made of several parts.
|
|
43
|
+
- Docs site, **Templates**: four multi-page templates made of blocks (Launch, Control, Bazaar; Gate is free). Each has
|
|
44
|
+
a live preview of every page and downloads as a Next.js project that runs with `npm install && npm run dev`.
|
|
45
|
+
|
|
9
46
|
## 0.7.0 — 2026-10-03
|
|
10
47
|
|
|
11
48
|
- **Licence: MIT.** `@waveinno/ui` is now MIT-licensed (© WAVEINNO): free to use in any project, commercial or not.
|
package/LICENSE
CHANGED
|
@@ -25,4 +25,4 @@ SOFTWARE.
|
|
|
25
25
|
This licence covers the @waveinno/ui package: everything published to npm,
|
|
26
26
|
and the free blocks in playground/blocks/free. The Pro blocks and templates
|
|
27
27
|
(playground/blocks/pro) are not covered; they are licensed separately under
|
|
28
|
-
the
|
|
28
|
+
the Wavi Pro Licence in playground/blocks/pro/LICENSE.md.
|
package/README.md
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
# @waveinno/ui
|
|
1
|
+
# Wavi — @waveinno/ui
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
**Wavi** is the React design system from Bangladesh, made by WAVEINNO: 100+ components, an application shell, charts
|
|
4
|
+
and Bangladesh-ready inputs (bKash, taka, +880, Bangla dates), styled with Tailwind CSS 4 tokens, in light and dark, in
|
|
5
|
+
English and Bangla. For Next.js and Vite. Shipped as compiled JavaScript with type definitions.
|
|
6
|
+
|
|
7
|
+
## Set up in one command
|
|
5
8
|
|
|
6
9
|
```bash
|
|
7
|
-
|
|
10
|
+
npx @waveinno/ui init
|
|
8
11
|
```
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
Run it in your app (or in an empty folder to create one). It asks whether you build with **Next.js** or **React +
|
|
14
|
+
Vite**, your currency and package manager, shows every change it will make, then installs the package and Tailwind
|
|
15
|
+
CSS 4 and writes the stylesheet, fonts, providers and theme script. It never overwrites your own files.
|
|
16
|
+
`npx @waveinno/ui doctor` checks a setup. In CI: `npx @waveinno/ui init --yes --framework next --currency BDT`.
|
|
17
|
+
|
|
18
|
+
## Set up by hand
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @waveinno/ui
|
|
22
|
+
```
|
|
11
23
|
|
|
12
24
|
Full guides, with every file: run the docs (`npm run dev`, then http://localhost:4500/docs) and open **Installation →
|
|
13
25
|
Next.js** or **Vite**. In short:
|
|
@@ -63,7 +75,8 @@ through `labels` props, so each product passes its own language.
|
|
|
63
75
|
|
|
64
76
|
| Group | Components |
|
|
65
77
|
| --- | --- |
|
|
66
|
-
| Primitives | Button (working + showcase variants), Badge (soft, solid, outline, dot, gradient, live), Input / Textarea (states, adornments), NumberInput, PasswordInput (strength, Caps Lock), PinInput (OTP), FileUpload, FormField, Select, Combobox (searchable), Checkbox, RadioGroup and RadioCard, Switch, Slider (range, marks), Segmented, Tabs (underline, pill, solid, enclosed), Calendar, DatePicker, DateTimePicker, DateRangePicker, TimePicker, Dialog (drawer that widens or goes full width), Sheet, ConfirmDialog, DropdownMenu (rich items, header, dark), Menu (soft, line, raised, gradient, dark, plus the shell's panel and rail; branches, sliding highlight), Popover (arrow, dark, brand), HoverCard, Tooltip, Alert (five tones, four looks), Toaster and toast, Spinner (ring, dots, wave), Kbd, Accordion, Pagination (seven looks), Steps (six looks), TreeView, ScrollArea, TagInput, Rating, Carousel, ColorPicker, Progress / ProgressRing, Avatar, Skeleton |
|
|
78
|
+
| Primitives | Button (working + showcase variants), Badge (soft, solid, outline, dot, gradient, live), Input / Textarea (states, adornments), NumberInput, PasswordInput (strength, Caps Lock), PinInput (OTP), FileUpload, FormField, Select, Combobox (searchable), MultiSelect, Checkbox and CheckboxCard, RadioGroup and RadioCard, Switch, Slider (range, marks), Segmented, Tabs (underline, pill, solid, enclosed), Calendar, DatePicker, DateTimePicker, DateRangePicker, TimePicker, Dialog (drawer that widens or goes full width), Sheet (right, left, bottom with drag to close), ConfirmDialog, DropdownMenu (rich items, header, dark), ContextMenu, Menu (soft, line, raised, gradient, dark, plus the shell's panel and rail; branches, sliding highlight), Popover (arrow, dark, brand), HoverCard, Tooltip, Alert (five tones, four looks), Toaster and toast, Spinner (ring, dots, wave), Kbd, Accordion, Pagination (seven looks), Steps (six looks), TreeView, ScrollArea, TagInput, Rating, Carousel, ColorPicker, Progress / ProgressRing, Avatar, Skeleton |
|
|
79
|
+
| Bangladesh | PhoneInput (+880, operator), TakaInput (lakh grouping, words), BdAddressPicker (divisions and districts, English or Bangla), PaymentMethodPicker (bKash, Nagad, Rocket, Upay, card, cash, bank, COD), PlateInput, NidInput; helpers for Bangla digits, the Bangla calendar and lakh/crore |
|
|
67
80
|
| Patterns | AppLauncher (switch-app button: grid, list, spotlight, glass, dark), OrgChart (card, gradient, avatar, compact, list), DataTable (advanced filters, saved views, five looks, inline and bulk edit, bulk delete, sticky actions), UserCell, RowActions, PageHero, PageHeader, StatCard, KpiCard, Money, ActivityFeed, ActivityTimeline, ChangeHistory, ChangeNotes, Note, Kanban, empty / error / loading states |
|
|
68
81
|
| Charts | TrendChart, BarChart, LineChart, DonutChart, GaugeChart, Heatmap, BarList, ChartCard, validated palette |
|
|
69
82
|
| Brand | WaveinnoLogo, WaveinnoSymbol, WaveMark (app icon: seven tones, round, 3D, animated), PoweredBy, Watermark; `@waveinno/ui/brand/waveinno-logo.svg` |
|
|
@@ -73,7 +86,7 @@ through `labels` props, so each product passes its own language.
|
|
|
73
86
|
|
|
74
87
|
```bash
|
|
75
88
|
npm install
|
|
76
|
-
npm run dev # http://localhost:4500 — docs (/docs), theme builder (/themes), every component on one page (/playground), live from src/
|
|
89
|
+
npm run dev # http://localhost:4500 — docs (/docs), blocks (/blocks), templates (/templates), theme builder (/themes), every component on one page (/playground), live from src/
|
|
77
90
|
```
|
|
78
91
|
|
|
79
92
|
Adding or changing a component: see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const NEXT_GLOBALS_CSS: string;
|
|
2
|
+
export declare const NEXT_PROVIDERS: string;
|
|
3
|
+
export declare const NEXT_LAYOUT: string;
|
|
4
|
+
export declare const VITE_CONFIG: string;
|
|
5
|
+
export declare const VITE_CSS: string;
|
|
6
|
+
export declare const VITE_MAIN: string;
|
|
7
|
+
export declare const FONTS_HREF: string;
|
|
8
|
+
export declare const VITE_ROUTER: string;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The files every app on WAVEINNO UI starts with, in one place: `npx @waveinno/ui init`
|
|
3
|
+
* writes them, the installation guides show them, the template downloads ship them.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** app/globals.css of a Next.js app. Its @source is relative to app/; init adjusts it for src/app/. */
|
|
7
|
+
export const NEXT_GLOBALS_CSS = `@import "tailwindcss";
|
|
8
|
+
@import "@waveinno/ui/styles.css";
|
|
9
|
+
|
|
10
|
+
/* Tailwind only generates classes it can see. Point it at the package,
|
|
11
|
+
relative to this file: "../node_modules" for app/globals.css,
|
|
12
|
+
"../../node_modules" for src/app/globals.css. */
|
|
13
|
+
@source "../node_modules/@waveinno/ui/dist";
|
|
14
|
+
|
|
15
|
+
/* The fonts loaded in layout.tsx, in the package's font slots.
|
|
16
|
+
Noto Sans Bengali carries Bangla and the Taka sign (৳), which Inter lacks. */
|
|
17
|
+
:root {
|
|
18
|
+
--font-inter: var(--font-body), var(--font-bangla);
|
|
19
|
+
--font-jakarta: var(--font-display), var(--font-bangla);
|
|
20
|
+
--font-jetbrains: var(--font-code);
|
|
21
|
+
}`;
|
|
22
|
+
|
|
23
|
+
/** app/providers.tsx */
|
|
24
|
+
export const NEXT_PROVIDERS = `"use client";
|
|
25
|
+
|
|
26
|
+
import { Toaster, TooltipProvider } from "@waveinno/ui";
|
|
27
|
+
import { NextRouterProvider } from "@waveinno/ui/next";
|
|
28
|
+
|
|
29
|
+
/** Once, around the whole app: Next.js routing for the package, tooltips, toasts. */
|
|
30
|
+
export function Providers({ children }: { children: React.ReactNode }) {
|
|
31
|
+
return (
|
|
32
|
+
<NextRouterProvider>
|
|
33
|
+
<TooltipProvider delayDuration={300}>
|
|
34
|
+
{children}
|
|
35
|
+
<Toaster />
|
|
36
|
+
</TooltipProvider>
|
|
37
|
+
</NextRouterProvider>
|
|
38
|
+
);
|
|
39
|
+
}`;
|
|
40
|
+
|
|
41
|
+
/** app/layout.tsx */
|
|
42
|
+
export const NEXT_LAYOUT = `import type { Metadata } from "next";
|
|
43
|
+
import { Inter, JetBrains_Mono, Noto_Sans_Bengali, Plus_Jakarta_Sans } from "next/font/google";
|
|
44
|
+
|
|
45
|
+
import { themeBootScript } from "@waveinno/ui";
|
|
46
|
+
|
|
47
|
+
import "./globals.css";
|
|
48
|
+
import { Providers } from "./providers";
|
|
49
|
+
|
|
50
|
+
const body = Inter({ subsets: ["latin"], variable: "--font-body" });
|
|
51
|
+
const display = Plus_Jakarta_Sans({ subsets: ["latin"], weight: ["500", "600", "700"], variable: "--font-display" });
|
|
52
|
+
const code = JetBrains_Mono({ subsets: ["latin"], variable: "--font-code" });
|
|
53
|
+
const bangla = Noto_Sans_Bengali({ subsets: ["bengali"], variable: "--font-bangla" });
|
|
54
|
+
|
|
55
|
+
export const metadata: Metadata = { title: "My app" };
|
|
56
|
+
|
|
57
|
+
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
58
|
+
return (
|
|
59
|
+
// The boot script sets data-theme before React runs, so the attribute
|
|
60
|
+
// differs from the server's HTML on purpose.
|
|
61
|
+
<html lang="en" suppressHydrationWarning className={[body.variable, display.variable, code.variable, bangla.variable].join(" ")}>
|
|
62
|
+
<head>
|
|
63
|
+
{/* Applies the saved light/dark theme and density before first paint: no flash. */}
|
|
64
|
+
<script dangerouslySetInnerHTML={{ __html: themeBootScript() }} />
|
|
65
|
+
</head>
|
|
66
|
+
<body className="bg-canvas text-body antialiased">
|
|
67
|
+
<Providers>{children}</Providers>
|
|
68
|
+
</body>
|
|
69
|
+
</html>
|
|
70
|
+
);
|
|
71
|
+
}`;
|
|
72
|
+
|
|
73
|
+
/** vite.config.ts */
|
|
74
|
+
export const VITE_CONFIG = `import tailwindcss from "@tailwindcss/vite";
|
|
75
|
+
import react from "@vitejs/plugin-react";
|
|
76
|
+
import { defineConfig } from "vite";
|
|
77
|
+
|
|
78
|
+
export default defineConfig({
|
|
79
|
+
plugins: [react(), tailwindcss()],
|
|
80
|
+
});`;
|
|
81
|
+
|
|
82
|
+
/** src/index.css of a Vite app. */
|
|
83
|
+
export const VITE_CSS = `@import "tailwindcss";
|
|
84
|
+
@import "@waveinno/ui/styles.css";
|
|
85
|
+
|
|
86
|
+
/* Tailwind only generates classes it can see: point it at the package. */
|
|
87
|
+
@source "../node_modules/@waveinno/ui/dist";
|
|
88
|
+
|
|
89
|
+
/* Noto Sans Bengali after each family: it carries Bangla and the Taka sign (৳). */
|
|
90
|
+
:root {
|
|
91
|
+
--font-inter: "Inter", "Noto Sans Bengali";
|
|
92
|
+
--font-jakarta: "Plus Jakarta Sans", "Noto Sans Bengali";
|
|
93
|
+
--font-jetbrains: "JetBrains Mono";
|
|
94
|
+
}`;
|
|
95
|
+
|
|
96
|
+
/** src/main.tsx */
|
|
97
|
+
export const VITE_MAIN = `import { StrictMode } from "react";
|
|
98
|
+
import { createRoot } from "react-dom/client";
|
|
99
|
+
|
|
100
|
+
import { Toaster, TooltipProvider } from "@waveinno/ui";
|
|
101
|
+
|
|
102
|
+
import App from "./App";
|
|
103
|
+
import "./index.css";
|
|
104
|
+
|
|
105
|
+
createRoot(document.getElementById("root")!).render(
|
|
106
|
+
<StrictMode>
|
|
107
|
+
<TooltipProvider delayDuration={300}>
|
|
108
|
+
<App />
|
|
109
|
+
<Toaster />
|
|
110
|
+
</TooltipProvider>
|
|
111
|
+
</StrictMode>,
|
|
112
|
+
);`;
|
|
113
|
+
|
|
114
|
+
/** src/ui-router.tsx: the package's links and navigation through React Router. */
|
|
115
|
+
export const VITE_ROUTER = `import { Link, useLocation, useNavigate } from "react-router";
|
|
116
|
+
|
|
117
|
+
import { RouterProvider, type RouterAdapter } from "@waveinno/ui";
|
|
118
|
+
|
|
119
|
+
// Tell the package to link and navigate through React Router.
|
|
120
|
+
const reactRouter: RouterAdapter = {
|
|
121
|
+
Link: ({ href, ...props }) => <Link to={href} {...props} />,
|
|
122
|
+
usePathname: () => useLocation().pathname,
|
|
123
|
+
useNavigate: () => {
|
|
124
|
+
const navigate = useNavigate();
|
|
125
|
+
return (href) => navigate(href);
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// Inside <BrowserRouter> (or your data router's root route):
|
|
130
|
+
export function UiRouter({ children }: { children: React.ReactNode }) {
|
|
131
|
+
return <RouterProvider adapter={reactRouter}>{children}</RouterProvider>;
|
|
132
|
+
}`;
|
|
133
|
+
|
|
134
|
+
/** The four families both setups load, for a plain HTML page. */
|
|
135
|
+
export const FONTS_HREF =
|
|
136
|
+
"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700&family=JetBrains+Mono:wght@400;500&family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap";
|