@chenyqthu/omada-ui-kit 0.0.0-stage → 0.1.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/README.md +88 -2
- package/dist/catalog.json +13396 -0
- package/dist/index.js +22452 -0
- package/dist/standalone.js +2490 -0
- package/dist/style.css +2 -0
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/standalone.d.ts +10 -0
- package/dist/types/omada/assets/SBrandAsset.d.ts +17 -0
- package/dist/types/omada/assets/SClientIcon.d.ts +16 -0
- package/dist/types/omada/assets/SIcon.d.ts +21 -0
- package/dist/types/omada/assets/SIllustration.d.ts +22 -0
- package/dist/types/omada/assets/SProductImage.d.ts +20 -0
- package/dist/types/omada/assets/ThemedAssetImage.d.ts +26 -0
- package/dist/types/omada/assets/assetsManifest.d.ts +19 -0
- package/dist/types/omada/assets/iconsManifest.d.ts +15 -0
- package/dist/types/omada/components/SAlert.d.ts +34 -0
- package/dist/types/omada/components/SAnchor.d.ts +32 -0
- package/dist/types/omada/components/SApDistributionRuler.d.ts +32 -0
- package/dist/types/omada/components/SAvatar.d.ts +28 -0
- package/dist/types/omada/components/SBadge.d.ts +17 -0
- package/dist/types/omada/components/SBreadcrumb.d.ts +36 -0
- package/dist/types/omada/components/SButton.d.ts +11 -0
- package/dist/types/omada/components/SCard.d.ts +28 -0
- package/dist/types/omada/components/SCascader.d.ts +20 -0
- package/dist/types/omada/components/SCategoryKpiCarousel.d.ts +26 -0
- package/dist/types/omada/components/SChannelUtilization.d.ts +25 -0
- package/dist/types/omada/components/SChart.d.ts +135 -0
- package/dist/types/omada/components/SCheckbox.d.ts +41 -0
- package/dist/types/omada/components/SClientOverviewStrip.d.ts +29 -0
- package/dist/types/omada/components/SCollapse.d.ts +28 -0
- package/dist/types/omada/components/SColorPicker.d.ts +17 -0
- package/dist/types/omada/components/SDatePicker.d.ts +57 -0
- package/dist/types/omada/components/SDescriptions.d.ts +21 -0
- package/dist/types/omada/components/SDeviceHealthSummary.d.ts +34 -0
- package/dist/types/omada/components/SDevicePortGraphic.d.ts +90 -0
- package/dist/types/omada/components/SDeviceStatus.d.ts +11 -0
- package/dist/types/omada/components/SDivider.d.ts +26 -0
- package/dist/types/omada/components/SDonutSummaryCard.d.ts +60 -0
- package/dist/types/omada/components/SDrawer.d.ts +36 -0
- package/dist/types/omada/components/SDropdown.d.ts +36 -0
- package/dist/types/omada/components/SEmpty.d.ts +17 -0
- package/dist/types/omada/components/SForm.d.ts +56 -0
- package/dist/types/omada/components/SHealthGauge.d.ts +43 -0
- package/dist/types/omada/components/SHealthTrendBar.d.ts +21 -0
- package/dist/types/omada/components/SInput.d.ts +47 -0
- package/dist/types/omada/components/SIpInput.d.ts +36 -0
- package/dist/types/omada/components/SLoading.d.ts +66 -0
- package/dist/types/omada/components/SMacInput.d.ts +26 -0
- package/dist/types/omada/components/SModal.d.ts +121 -0
- package/dist/types/omada/components/SNotification.d.ts +60 -0
- package/dist/types/omada/components/SPagination.d.ts +23 -0
- package/dist/types/omada/components/SPopover.d.ts +27 -0
- package/dist/types/omada/components/SPortPanel.d.ts +28 -0
- package/dist/types/omada/components/SProgress.d.ts +32 -0
- package/dist/types/omada/components/SRadio.d.ts +40 -0
- package/dist/types/omada/components/SRate.d.ts +20 -0
- package/dist/types/omada/components/SSchedule.d.ts +55 -0
- package/dist/types/omada/components/SSelect.d.ts +25 -0
- package/dist/types/omada/components/SSettingsPageShell.d.ts +104 -0
- package/dist/types/omada/components/SSlider.d.ts +31 -0
- package/dist/types/omada/components/SSteps.d.ts +41 -0
- package/dist/types/omada/components/SSwitch.d.ts +23 -0
- package/dist/types/omada/components/STable.d.ts +81 -0
- package/dist/types/omada/components/STabs.d.ts +27 -0
- package/dist/types/omada/components/STag.d.ts +23 -0
- package/dist/types/omada/components/STerminalConsole.d.ts +57 -0
- package/dist/types/omada/components/STile.d.ts +66 -0
- package/dist/types/omada/components/STimePicker.d.ts +16 -0
- package/dist/types/omada/components/STooltip.d.ts +34 -0
- package/dist/types/omada/components/STopologyCanvas.d.ts +66 -0
- package/dist/types/omada/components/STransfer.d.ts +34 -0
- package/dist/types/omada/components/STreeSelect.d.ts +24 -0
- package/dist/types/omada/components/SUpload.d.ts +58 -0
- package/dist/types/omada/icons/OmadaLogo.d.ts +20 -0
- package/dist/types/omada/index.d.ts +38 -0
- package/dist/types/omada/layout/SAppShell.d.ts +84 -0
- package/dist/types/omada/layout/SEmulatorShell.d.ts +80 -0
- package/dist/types/omada/layout/SPageHeader.d.ts +13 -0
- package/dist/types/omada/modules/data-charts.d.ts +8 -0
- package/dist/types/omada/modules/emulator-v6.d.ts +13 -0
- package/dist/types/omada/modules/feedback-overlays.d.ts +7 -0
- package/dist/types/omada/modules/nav-shell.d.ts +6 -0
- package/dist/types/omada/modules/select-inputs.d.ts +8 -0
- package/dist/types/omada/modules/time-schedule.d.ts +5 -0
- package/dist/types/omada/theme/OmadaProvider.d.ts +22 -0
- package/dist/types/omada/theme/antdTheme.d.ts +6 -0
- package/dist/types/omada/theme/tokens.d.ts +138 -0
- package/package.json +76 -4
- package/skills/omada-ui-kit/SKILL.md +170 -0
- package/skills/omada-ui-kit/references/catalog.json +13396 -0
- package/skills/omada-ui-kit/scripts/query-catalog.mjs +202 -0
package/README.md
CHANGED
|
@@ -1,3 +1,89 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Omada UI Kit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
High-fidelity **TP-Link Omada Controller v6.3** React UI component library built on Ant Design 6, complete with Omada Design Tokens (Light/Dark), bundled Figma icons/illustrations/device photos, dual distribution formats (ESM + Single-File Browser Bundle), and an Agent Skill catalog.
|
|
4
|
+
|
|
5
|
+
## 1. Usage in React / Vite Projects (like `antd`)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @chenyqthu/omada-ui-kit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Import the stylesheet once at app entry and use components directly:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import '@chenyqthu/omada-ui-kit/style.css';
|
|
15
|
+
import {
|
|
16
|
+
OmadaProvider,
|
|
17
|
+
SEmulatorShell,
|
|
18
|
+
SPageHeader,
|
|
19
|
+
STable,
|
|
20
|
+
SButton,
|
|
21
|
+
SIcon,
|
|
22
|
+
SProductImage,
|
|
23
|
+
} from '@chenyqthu/omada-ui-kit';
|
|
24
|
+
|
|
25
|
+
export function App() {
|
|
26
|
+
return (
|
|
27
|
+
<OmadaProvider defaultThemeMode="light">
|
|
28
|
+
<SEmulatorShell activeKey="dashboard" onSelect={() => {}}>
|
|
29
|
+
<SPageHeader title="Site Overview" extra={<SButton variant="primary">Save</SButton>} />
|
|
30
|
+
</SEmulatorShell>
|
|
31
|
+
</OmadaProvider>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 2. Usage in a Single HTML File (Zero Build)
|
|
37
|
+
|
|
38
|
+
For quick PRD prototypes, load `dist/style.css` and `dist/standalone.js` (bundles React 19, AntD 6, ECharts, and all Omada `S*` components under `window.OmadaUI`):
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<!doctype html>
|
|
42
|
+
<html>
|
|
43
|
+
<head>
|
|
44
|
+
<meta charset="utf-8" />
|
|
45
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@latest/dist/style.css" />
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/@chenyqthu/omada-ui-kit@latest/dist/standalone.js"></script>
|
|
47
|
+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
|
48
|
+
</head>
|
|
49
|
+
<body style="margin: 0;">
|
|
50
|
+
<div id="root"></div>
|
|
51
|
+
<script type="text/babel">
|
|
52
|
+
const { OmadaProvider, SEmulatorShell, SCard, SButton } = window.OmadaUI;
|
|
53
|
+
OmadaUI.render(
|
|
54
|
+
<OmadaProvider>
|
|
55
|
+
<SEmulatorShell activeKey="dashboard" onSelect={() => {}}>
|
|
56
|
+
<div style={{ padding: 24 }}>
|
|
57
|
+
<SCard title="PRD Demo"><SButton variant="primary">Action</SButton></SCard>
|
|
58
|
+
</div>
|
|
59
|
+
</SEmulatorShell>
|
|
60
|
+
</OmadaProvider>,
|
|
61
|
+
);
|
|
62
|
+
</script>
|
|
63
|
+
</body>
|
|
64
|
+
</html>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
See [examples/single-file-demo.html](./examples/single-file-demo.html) for a full interactive AP Monitor example with drawer & Dark Mode toggle.
|
|
68
|
+
|
|
69
|
+
## 3. Agent Skill & Component Catalog
|
|
70
|
+
|
|
71
|
+
Install the Skill directly from GitHub into Antigravity / Claude Code / Codex / Cursor:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx skills add ChenyqThu/omada-ui-kit
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The npm package also bundles `skills/omada-ui-kit/` containing `SKILL.md`, `references/catalog.json`, and `scripts/query-catalog.mjs` so coding agents can inspect component props, icons, hardware product images, and design tokens without guessing:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
node skills/omada-ui-kit/scripts/query-catalog.mjs info
|
|
81
|
+
node skills/omada-ui-kit/scripts/query-catalog.mjs component SEmulatorShell
|
|
82
|
+
node skills/omada-ui-kit/scripts/query-catalog.mjs search-assets products eap
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## 4. Development & Build Scripts
|
|
86
|
+
|
|
87
|
+
- `pnpm dev` — Start local Showcase & Omada Controller v6.3 Emulator
|
|
88
|
+
- `pnpm build:lib` — Build ESM (`dist/index.js`), CSS (`dist/style.css`), Standalone IIFE (`dist/standalone.js`), `.d.ts` (`dist/types/`), and `dist/catalog.json` (also syncs Skill bundles)
|
|
89
|
+
- `pnpm test` — Run unit test suite
|