@chenyqthu/tp-mobile-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 +214 -2
- package/dist/assets.js +5 -0
- package/dist/catalog.json +11125 -0
- package/dist/chunks/OmadaAppDemo-BP4a4ch_.js +4111 -0
- package/dist/chunks/TPPrompt-Csg5YasJ.js +2460 -0
- package/dist/chunks/asset-icons-BIenKvAh.js +7613 -0
- package/dist/chunks/asset-illustrations-YHXzEd7z.js +3086 -0
- package/dist/chunks/asset-logos-DAyGwOLj.js +59 -0
- package/dist/chunks/asset-motion-D7fWh_JS.js +376 -0
- package/dist/core.js +3 -0
- package/dist/index.js +7 -0
- package/dist/libpag.wasm +0 -0
- package/dist/omada.js +7 -0
- package/dist/standalone.js +3438 -0
- package/dist/style.css +2 -0
- package/dist/types/assets-lib/TPBrandLogo.d.ts +15 -0
- package/dist/types/assets-lib/TPIcon.d.ts +19 -0
- package/dist/types/assets-lib/TPIllustration.d.ts +17 -0
- package/dist/types/assets-lib/TPMotion.d.ts +25 -0
- package/dist/types/assets-lib/assetsManifest.d.ts +22 -0
- package/dist/types/assets-lib/iconsManifest.d.ts +14 -0
- package/dist/types/assets-lib/index.d.ts +8 -0
- package/dist/types/assets-lib/motionsManifest.d.ts +12 -0
- package/dist/types/assets-lib/runtimeUrl.d.ts +4 -0
- package/dist/types/core/components/TPActionSheet.d.ts +4 -0
- package/dist/types/core/components/TPAlert.d.ts +4 -0
- package/dist/types/core/components/TPBadge.d.ts +7 -0
- package/dist/types/core/components/TPBottomSheet.d.ts +4 -0
- package/dist/types/core/components/TPButton.d.ts +4 -0
- package/dist/types/core/components/TPDatePicker.d.ts +7 -0
- package/dist/types/core/components/TPDaySwitcher.d.ts +7 -0
- package/dist/types/core/components/TPEmptyState.d.ts +7 -0
- package/dist/types/core/components/TPFixedButtonBar.d.ts +4 -0
- package/dist/types/core/components/TPHeader.d.ts +4 -0
- package/dist/types/core/components/TPInput.d.ts +8 -0
- package/dist/types/core/components/TPKeyboard.d.ts +7 -0
- package/dist/types/core/components/TPListButton.d.ts +7 -0
- package/dist/types/core/components/TPListCard.d.ts +7 -0
- package/dist/types/core/components/TPListItem.d.ts +7 -0
- package/dist/types/core/components/TPMenu.d.ts +4 -0
- package/dist/types/core/components/TPPageControl.d.ts +4 -0
- package/dist/types/core/components/TPPhoneFrame.d.ts +4 -0
- package/dist/types/core/components/TPPopup.d.ts +4 -0
- package/dist/types/core/components/TPPrompt.d.ts +4 -0
- package/dist/types/core/components/TPSearchBar.d.ts +7 -0
- package/dist/types/core/components/TPSectionHeader.d.ts +7 -0
- package/dist/types/core/components/TPSectionNote.d.ts +7 -0
- package/dist/types/core/components/TPSegment.d.ts +4 -0
- package/dist/types/core/components/TPSlider.d.ts +4 -0
- package/dist/types/core/components/TPStatusBar.d.ts +4 -0
- package/dist/types/core/components/TPSwitch.d.ts +4 -0
- package/dist/types/core/components/TPTabBar.d.ts +4 -0
- package/dist/types/core/components/TPTag.d.ts +7 -0
- package/dist/types/core/components/TPText.d.ts +7 -0
- package/dist/types/core/components/TPTimePicker.d.ts +7 -0
- package/dist/types/core/components/TPToast.d.ts +13 -0
- package/dist/types/core/components/TPWheelPicker.d.ts +7 -0
- package/dist/types/core/index.d.ts +34 -0
- package/dist/types/core/types.d.ts +414 -0
- package/dist/types/lib/assets.d.ts +1 -0
- package/dist/types/lib/core.d.ts +2 -0
- package/dist/types/lib/index.d.ts +4 -0
- package/dist/types/lib/omada.d.ts +4 -0
- package/dist/types/lib/standalone.d.ts +8 -0
- package/dist/types/omada/blocks/OmadaDeviceListBlock.d.ts +42 -0
- package/dist/types/omada/blocks/OmadaIncidentsBlock.d.ts +26 -0
- package/dist/types/omada/blocks/OmadaWirelessNetworkBlock.d.ts +25 -0
- package/dist/types/omada/components/OmadaStandardInput.d.ts +23 -0
- package/dist/types/omada/index.d.ts +14 -0
- package/dist/types/omada/pages/OmadaAppDemo.d.ts +18 -0
- package/dist/types/omada/pages/OmadaControllerListPage.d.ts +26 -0
- package/dist/types/omada/pages/OmadaDeviceDetailPage.d.ts +15 -0
- package/dist/types/omada/pages/OmadaHealthDetailPage.d.ts +17 -0
- package/dist/types/omada/pages/OmadaLaunchLoadingPage.d.ts +24 -0
- package/dist/types/omada/pages/OmadaSiteClientsPage.d.ts +34 -0
- package/dist/types/omada/pages/OmadaSiteDashboardPage.d.ts +28 -0
- package/dist/types/omada/pages/OmadaSiteDevicesPage.d.ts +18 -0
- package/dist/types/omada/pages/OmadaSiteInsightsPage.d.ts +17 -0
- package/dist/types/omada/pages/OmadaSiteSettingsPage.d.ts +20 -0
- package/dist/types/theme/TPThemeProvider.d.ts +33 -0
- package/dist/types/theme/index.d.ts +2 -0
- package/dist/types/theme/tokens.d.ts +80 -0
- package/package.json +88 -4
- package/skills/tp-mobile-ui-kit/SKILL.md +225 -0
- package/skills/tp-mobile-ui-kit/references/catalog.json +11125 -0
- package/skills/tp-mobile-ui-kit/scripts/query-catalog.mjs +289 -0
- package/skills/tp-mobile-ui-kit/scripts/verify-demo.mjs +193 -0
- package/skills/tp-mobile-ui-kit/templates/multi-brand.html +319 -0
- package/skills/tp-mobile-ui-kit/templates/multi-brand.tsx +337 -0
- package/skills/tp-mobile-ui-kit/templates/omada-dashboard.html +138 -0
- package/skills/tp-mobile-ui-kit/templates/omada-dashboard.tsx +119 -0
- package/skills/tp-mobile-ui-kit/templates/omada-device-detail.html +158 -0
- package/skills/tp-mobile-ui-kit/templates/omada-device-detail.tsx +135 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { OmadaStandardInput, type OmadaStandardInputProps, type OmadaStandardInputType, } from './components/OmadaStandardInput';
|
|
2
|
+
export { OMADA_SITE_TABS, DEFAULT_OMADA_DEVICES, OmadaDeviceThumb, OmadaDeviceListBlock, type OmadaSiteTabKey, type OmadaDeviceType, type OmadaDeviceStatus, type OmadaDeviceRecord, type OmadaDeviceListBlockProps, } from './blocks/OmadaDeviceListBlock';
|
|
3
|
+
export { OmadaWirelessNetworkBlock, type OmadaBandKey, type OmadaSecurityMode, type OmadaWirelessConfig, type OmadaWirelessNetworkBlockProps, } from './blocks/OmadaWirelessNetworkBlock';
|
|
4
|
+
export { DEFAULT_OMADA_INCIDENTS, OmadaIncidentsBlock, type OmadaIncidentCategory, type OmadaIncidentSeverity, type OmadaIncidentItem, type OmadaIncidentsBlockProps, } from './blocks/OmadaIncidentsBlock';
|
|
5
|
+
export { OmadaLaunchLoadingPage, type OmadaLaunchLoadingPageProps, } from './pages/OmadaLaunchLoadingPage';
|
|
6
|
+
export { DEFAULT_OMADA_CONTROLLERS, OmadaControllerListPage, type OmadaControllerKind, type OmadaControllerItem, type OmadaControllerListPageProps, } from './pages/OmadaControllerListPage';
|
|
7
|
+
export { OmadaSiteDashboardPage, type OmadaSiteDashboardPageProps, } from './pages/OmadaSiteDashboardPage';
|
|
8
|
+
export { OmadaSiteInsightsPage, type OmadaInsightsTabKey, type OmadaSiteInsightsPageProps, } from './pages/OmadaSiteInsightsPage';
|
|
9
|
+
export { OmadaSiteDevicesPage, type OmadaSiteDevicesPageProps, } from './pages/OmadaSiteDevicesPage';
|
|
10
|
+
export { DEFAULT_OMADA_CLIENTS, OmadaSiteClientsPage, type OmadaClientStatus, type OmadaClientLinkType, type OmadaClientRecord, type OmadaSiteClientsPageProps, } from './pages/OmadaSiteClientsPage';
|
|
11
|
+
export { OmadaSiteSettingsPage, type OmadaSettingRowKey, type OmadaSiteSettingsPageProps, } from './pages/OmadaSiteSettingsPage';
|
|
12
|
+
export { OmadaHealthDetailPage, type OmadaHealthDetailPageProps, } from './pages/OmadaHealthDetailPage';
|
|
13
|
+
export { OmadaDeviceDetailPage, type OmadaDeviceDetailPageProps, } from './pages/OmadaDeviceDetailPage';
|
|
14
|
+
export { OmadaAppDemo, type OmadaAppScreenId, type OmadaAppDemoProps, } from './pages/OmadaAppDemo';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPPhoneFrameProps } from '../../core/types';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export type OmadaAppScreenId = 'launch' | 'controllers' | 'dashboard' | 'insights' | 'devices' | 'clients' | 'settings' | 'health-detail' | 'device-detail' | 'wireless-settings' | 'incidents';
|
|
5
|
+
export interface OmadaAppDemoProps {
|
|
6
|
+
initialScreen?: OmadaAppScreenId;
|
|
7
|
+
screen?: OmadaAppScreenId;
|
|
8
|
+
onScreenChange?: (screen: OmadaAppScreenId) => void;
|
|
9
|
+
device?: TPPhoneFrameProps['device'];
|
|
10
|
+
showFrame?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Interactive end-to-end Omada APP v5.3–6.3 prototype wiring all 7 real-device screens
|
|
16
|
+
* and drill-down sub-pages inside `TPPhoneFrame`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const OmadaAppDemo: React.FC<OmadaAppDemoProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/tp-omada.css';
|
|
3
|
+
export type OmadaControllerKind = 'cloud' | 'software' | 'hardware';
|
|
4
|
+
export interface OmadaControllerItem {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
edition: string;
|
|
8
|
+
version: string;
|
|
9
|
+
kind: OmadaControllerKind;
|
|
10
|
+
ips?: string;
|
|
11
|
+
systemGroup: 'Cloud Management' | 'Local Controllers';
|
|
12
|
+
}
|
|
13
|
+
export declare const DEFAULT_OMADA_CONTROLLERS: readonly OmadaControllerItem[];
|
|
14
|
+
export interface OmadaControllerListPageProps {
|
|
15
|
+
controllers?: readonly OmadaControllerItem[];
|
|
16
|
+
onSelectController?: (controller: OmadaControllerItem) => void;
|
|
17
|
+
onAddController?: () => void;
|
|
18
|
+
onAvatarClick?: () => void;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 1:1 restoration of `controllerlist.png`: green `C` avatar, `All Systems` TPMenu filter, `+` add button,
|
|
24
|
+
* `TPSearchBar`, `Cloud Management (5)` section header, and all 5 real Omada controllers.
|
|
25
|
+
*/
|
|
26
|
+
export declare const OmadaControllerListPage: React.FC<OmadaControllerListPageProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type OmadaDeviceRecord } from '../blocks/OmadaDeviceListBlock';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export interface OmadaDeviceDetailPageProps {
|
|
5
|
+
device?: OmadaDeviceRecord;
|
|
6
|
+
onBack?: () => void;
|
|
7
|
+
onSaveConfig?: (updated: OmadaDeviceRecord) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Full Device Detail screen supporting Overview (with `update-network` Firmware Upgrade sheet),
|
|
13
|
+
* interactive Ports grid (playing `port-card-expand` PAG motion), and Config (`OmadaStandardInput` IP/MAC/Port).
|
|
14
|
+
*/
|
|
15
|
+
export declare const OmadaDeviceDetailPage: React.FC<OmadaDeviceDetailPageProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/tp-omada.css';
|
|
3
|
+
export interface OmadaHealthDetailPageProps {
|
|
4
|
+
siteName?: string;
|
|
5
|
+
score?: number;
|
|
6
|
+
deviceScore?: number;
|
|
7
|
+
wifiScore?: number;
|
|
8
|
+
wanScore?: number;
|
|
9
|
+
onBack?: () => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Drill-down Site Health Score detail screen with radial score gauge, subsystem metrics,
|
|
15
|
+
* and 24-hour historical health chart.
|
|
16
|
+
*/
|
|
17
|
+
export declare const OmadaHealthDetailPage: React.FC<OmadaHealthDetailPageProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type OmadaSiteTabKey } from '../blocks/OmadaDeviceListBlock';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export interface OmadaLaunchLoadingPageProps {
|
|
5
|
+
siteName?: string;
|
|
6
|
+
controllerName?: string;
|
|
7
|
+
upgradeVersion?: string;
|
|
8
|
+
activeTab?: OmadaSiteTabKey;
|
|
9
|
+
onTabChange?: (tab: OmadaSiteTabKey) => void;
|
|
10
|
+
onBackToGlobal?: () => void;
|
|
11
|
+
onOpenLogs?: () => void;
|
|
12
|
+
onUpgrade?: () => void;
|
|
13
|
+
onToolkitClick?: () => void;
|
|
14
|
+
showUpgradeBanner?: boolean;
|
|
15
|
+
showTabBar?: boolean;
|
|
16
|
+
showFloatingAction?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 1:1 restoration of `launchloading.png`: floating glass header, blue dismissible upgrade prompt,
|
|
22
|
+
* 3 animated skeleton dashboard cards, green Toolkit FAB, and floating glass TabBar.
|
|
23
|
+
*/
|
|
24
|
+
export declare const OmadaLaunchLoadingPage: React.FC<OmadaLaunchLoadingPageProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TPIconName } from '../../assets-lib';
|
|
3
|
+
import { type OmadaSiteTabKey } from '../blocks/OmadaDeviceListBlock';
|
|
4
|
+
import '../../styles/tp-omada.css';
|
|
5
|
+
export type OmadaClientStatus = 'online' | 'offline' | 'blocked';
|
|
6
|
+
export type OmadaClientLinkType = 'wired' | 'wireless';
|
|
7
|
+
export interface OmadaClientRecord {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
ip: string;
|
|
11
|
+
mac: string;
|
|
12
|
+
rssiDbm?: number;
|
|
13
|
+
networkName: string;
|
|
14
|
+
status: OmadaClientStatus;
|
|
15
|
+
linkType: OmadaClientLinkType;
|
|
16
|
+
iconName?: TPIconName;
|
|
17
|
+
customThumb?: 'thermostat';
|
|
18
|
+
}
|
|
19
|
+
export declare const DEFAULT_OMADA_CLIENTS: readonly OmadaClientRecord[];
|
|
20
|
+
export interface OmadaSiteClientsPageProps {
|
|
21
|
+
clients?: readonly OmadaClientRecord[];
|
|
22
|
+
activeTab?: OmadaSiteTabKey;
|
|
23
|
+
onTabChange?: (tab: OmadaSiteTabKey) => void;
|
|
24
|
+
onSelectClient?: (client: OmadaClientRecord) => void;
|
|
25
|
+
showTabBar?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 1:1 restoration of `SiteClients.png`: floating `Clients` header with `Filter | ⋮` glass capsule,
|
|
31
|
+
* live `TPSearchBar`, `Online | Offline | Blocked | All` underline segment, `All | Wired | Wireless` chips,
|
|
32
|
+
* and all 4 real clients with color-coded dBm RSSI metrics.
|
|
33
|
+
*/
|
|
34
|
+
export declare const OmadaSiteClientsPage: React.FC<OmadaSiteClientsPageProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type OmadaSiteTabKey } from '../blocks/OmadaDeviceListBlock';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export interface OmadaSiteDashboardPageProps {
|
|
5
|
+
siteName?: string;
|
|
6
|
+
controllerName?: string;
|
|
7
|
+
unreadLogsCount?: number;
|
|
8
|
+
activeTab?: OmadaSiteTabKey;
|
|
9
|
+
onTabChange?: (tab: OmadaSiteTabKey) => void;
|
|
10
|
+
onSiteChange?: (site: string) => void;
|
|
11
|
+
onBackToGlobal?: () => void;
|
|
12
|
+
onOpenLogs?: () => void;
|
|
13
|
+
onOpenHealthDetail?: () => void;
|
|
14
|
+
onOpenInsights?: () => void;
|
|
15
|
+
onOpenDevices?: () => void;
|
|
16
|
+
onOpenClients?: () => void;
|
|
17
|
+
onToolkitClick?: () => void;
|
|
18
|
+
showTabBar?: boolean;
|
|
19
|
+
showFloatingAction?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 1:1 restoration of `siteDashboard.png`: floating site selector header (`92 ⌄ / 62`, log badge `1`),
|
|
25
|
+
* 4 KPI tiles + Topology CTA, Site Health Score (`100` + 3 subcards + timeline scrubber),
|
|
26
|
+
* ISP Activity (`SFP WAN/LAN1`, `WAN3`), Internet Activity dual-series chart, Toolkit FAB, and floating TabBar.
|
|
27
|
+
*/
|
|
28
|
+
export declare const OmadaSiteDashboardPage: React.FC<OmadaSiteDashboardPageProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type OmadaDeviceRecord, type OmadaSiteTabKey } from '../blocks/OmadaDeviceListBlock';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export interface OmadaSiteDevicesPageProps {
|
|
5
|
+
devices?: readonly OmadaDeviceRecord[];
|
|
6
|
+
activeTab?: OmadaSiteTabKey;
|
|
7
|
+
onTabChange?: (tab: OmadaSiteTabKey) => void;
|
|
8
|
+
onSelectDevice?: (device: OmadaDeviceRecord) => void;
|
|
9
|
+
showTabBar?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 1:1 restoration of `SiteDevices.png`: floating `Devices` header with `+ | ⋮` glass capsule,
|
|
15
|
+
* live `TPSearchBar`, `Device List | Device Group` underline segment, expandable filter chips,
|
|
16
|
+
* `OmadaDeviceListBlock`, and floating TabBar.
|
|
17
|
+
*/
|
|
18
|
+
export declare const OmadaSiteDevicesPage: React.FC<OmadaSiteDevicesPageProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type OmadaSiteTabKey } from '../blocks/OmadaDeviceListBlock';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export type OmadaInsightsTabKey = 'wired' | 'wireless' | 'client' | 'apps';
|
|
5
|
+
export interface OmadaSiteInsightsPageProps {
|
|
6
|
+
activeTab?: OmadaSiteTabKey;
|
|
7
|
+
onTabChange?: (tab: OmadaSiteTabKey) => void;
|
|
8
|
+
showTabBar?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 1:1 restoration of `SiteInsights.png`: floating `Insights` header with calendar range button,
|
|
14
|
+
* 4 underline tabs (`Wired`, `Wireless`, `Client`, `Apps`), `ISP Load` dual-axis histogram + latency pulse,
|
|
15
|
+
* `WAN Health Trend`, `Gateway Utilization`, and `Switch Health Trend`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const OmadaSiteInsightsPage: React.FC<OmadaSiteInsightsPageProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type OmadaSiteTabKey } from '../blocks/OmadaDeviceListBlock';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export type OmadaSettingRowKey = 'internet' | 'lan' | 'wireless' | 'vpn' | 'security' | 'transmission' | 'authentication' | 'ddns' | 'profiles' | 'site' | 'logs';
|
|
5
|
+
export interface OmadaSiteSettingsPageProps {
|
|
6
|
+
logsCount?: number;
|
|
7
|
+
activeTab?: OmadaSiteTabKey;
|
|
8
|
+
onTabChange?: (tab: OmadaSiteTabKey) => void;
|
|
9
|
+
onOpenWirelessNetworks?: () => void;
|
|
10
|
+
onOpenLogs?: () => void;
|
|
11
|
+
onSelectSetting?: (key: OmadaSettingRowKey) => void;
|
|
12
|
+
showTabBar?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 1:1 restoration of `SiteSettings.png`: centered `Settings` header, live `TPSearchBar`,
|
|
18
|
+
* 4 grouped `TPListCard`s with exact Omada `settings-*` icons, and drill-downs to Wireless Networks & Logs.
|
|
19
|
+
*/
|
|
20
|
+
export declare const OmadaSiteSettingsPage: React.FC<OmadaSiteSettingsPageProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TP_BRANDS, TP_THEME_PRESETS, type TPBrand, type TPColorMode, type TPPlatformOS, type TPResolvedMode, type TPScreenSize, type TPThemeTokens } from './tokens';
|
|
3
|
+
export interface TPThemeContextValue {
|
|
4
|
+
brand: TPBrand;
|
|
5
|
+
mode: TPColorMode;
|
|
6
|
+
resolvedMode: TPResolvedMode;
|
|
7
|
+
os: TPPlatformOS;
|
|
8
|
+
screenSize: TPScreenSize;
|
|
9
|
+
tokens: TPThemeTokens;
|
|
10
|
+
setBrand: (brand: TPBrand) => void;
|
|
11
|
+
setMode: (mode: TPColorMode) => void;
|
|
12
|
+
setOS: (os: TPPlatformOS) => void;
|
|
13
|
+
setScreenSize: (size: TPScreenSize) => void;
|
|
14
|
+
toggleMode: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const TPThemeContext: React.Context<TPThemeContextValue>;
|
|
17
|
+
export interface TPThemeProviderProps {
|
|
18
|
+
brand?: TPBrand;
|
|
19
|
+
defaultBrand?: TPBrand;
|
|
20
|
+
mode?: TPColorMode;
|
|
21
|
+
defaultMode?: TPColorMode;
|
|
22
|
+
os?: TPPlatformOS;
|
|
23
|
+
defaultOS?: TPPlatformOS;
|
|
24
|
+
screenSize?: TPScreenSize;
|
|
25
|
+
/** When true, applies theme attributes only on the wrapper element instead of `document.documentElement`. */
|
|
26
|
+
scoped?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export declare const TPThemeProvider: React.FC<TPThemeProviderProps>;
|
|
32
|
+
export declare function useTPTheme(): TPThemeContextValue;
|
|
33
|
+
export { TP_BRANDS, TP_THEME_PRESETS };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { TP_BRANDS, TP_THEME_PRESETS, type TPBrand, type TPColorMode, type TPPlatformOS, type TPResolvedMode, type TPScreenSize, type TPThemeTokens, } from './tokens';
|
|
2
|
+
export { TPThemeContext, TPThemeProvider, useTPTheme, type TPThemeContextValue, type TPThemeProviderProps, } from './TPThemeProvider';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export type TPBrand = 'omada' | 'tapo' | 'tether' | 'mercusys' | 'deco' | 'ux';
|
|
2
|
+
export type TPColorMode = 'light' | 'dark' | 'system';
|
|
3
|
+
export type TPResolvedMode = 'light' | 'dark';
|
|
4
|
+
export type TPScreenSize = 'base' | 'new' | 'ios27';
|
|
5
|
+
export type TPPlatformOS = 'ios' | 'android';
|
|
6
|
+
export declare const TP_BRANDS: readonly {
|
|
7
|
+
id: TPBrand;
|
|
8
|
+
label: string;
|
|
9
|
+
accent: string;
|
|
10
|
+
description: string;
|
|
11
|
+
}[];
|
|
12
|
+
export interface TPThemeTokens {
|
|
13
|
+
brand: TPBrand;
|
|
14
|
+
mode: TPResolvedMode;
|
|
15
|
+
figmaMode: string;
|
|
16
|
+
focus: string;
|
|
17
|
+
focusSoft10: string;
|
|
18
|
+
focusSoft16: string;
|
|
19
|
+
focusSoft20: string;
|
|
20
|
+
background: string;
|
|
21
|
+
card: string;
|
|
22
|
+
modalPanel: string;
|
|
23
|
+
overlay: string;
|
|
24
|
+
searchBar: string;
|
|
25
|
+
listDivider: string;
|
|
26
|
+
viewBg: string;
|
|
27
|
+
viewDivider: string;
|
|
28
|
+
textPrimary: string;
|
|
29
|
+
textSecondary: string;
|
|
30
|
+
textSecondaryAlt: string;
|
|
31
|
+
textDisabled: string;
|
|
32
|
+
textInversePrimary: string;
|
|
33
|
+
textInverseSecondary: string;
|
|
34
|
+
textHighlighted: string;
|
|
35
|
+
alert: string;
|
|
36
|
+
alertSoft10: string;
|
|
37
|
+
green: string;
|
|
38
|
+
greenSoft10: string;
|
|
39
|
+
yellow: string;
|
|
40
|
+
yellowSoft10: string;
|
|
41
|
+
buttonPrimaryFill: string;
|
|
42
|
+
buttonSecondaryFill: string;
|
|
43
|
+
buttonSecondaryStroke: number;
|
|
44
|
+
buttonTextColor: string;
|
|
45
|
+
buttonAlertFill: string;
|
|
46
|
+
buttonDisabledFill: string;
|
|
47
|
+
buttonDisabledText: string;
|
|
48
|
+
radiusButton: number;
|
|
49
|
+
radiusInCardButton: number;
|
|
50
|
+
radiusCard: number;
|
|
51
|
+
fontFamily: string;
|
|
52
|
+
fontSizeMain: number;
|
|
53
|
+
fontWeightTitle1: string;
|
|
54
|
+
fontWeightTitle4: string;
|
|
55
|
+
fontWeightButton: string;
|
|
56
|
+
sliderStroke: number;
|
|
57
|
+
sliderTickSize: number;
|
|
58
|
+
segmentTabText: string;
|
|
59
|
+
toastDefault: string;
|
|
60
|
+
toastInfo: string;
|
|
61
|
+
toastBlue: string;
|
|
62
|
+
toastYellow: string;
|
|
63
|
+
toastRed: string;
|
|
64
|
+
toastText: string;
|
|
65
|
+
iconSet: string;
|
|
66
|
+
rawVariables: Record<string, string | number | boolean | Record<string, unknown>>;
|
|
67
|
+
}
|
|
68
|
+
export declare const TP_THEME_PRESETS: Record<TPBrand, Record<TPResolvedMode, TPThemeTokens>>;
|
|
69
|
+
export declare const TP_SCREEN_DIMENSIONS: Record<TPScreenSize, {
|
|
70
|
+
width: number;
|
|
71
|
+
height: number;
|
|
72
|
+
label: string;
|
|
73
|
+
}>;
|
|
74
|
+
export interface TPTextStyleSpec {
|
|
75
|
+
name: string;
|
|
76
|
+
fontSize: number;
|
|
77
|
+
fontWeight: number;
|
|
78
|
+
lineHeight: number;
|
|
79
|
+
}
|
|
80
|
+
export declare const TP_TEXT_STYLES: readonly TPTextStyleSpec[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,90 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chenyqthu/tp-mobile-ui-kit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TP-Link multi-brand mobile React UI component library (TP-Design 10-mode Theme Engine + Omada APP 5.3 Blocks & Real PAG Motion Assets + Single-file HTML standalone bundle)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/ChenyqThu/tp-mobile-ui-kit.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://pages.chenge.ink/tp-mobile-ui-kit/",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/ChenyqThu/tp-mobile-ui-kit/issues"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"**/*.css"
|
|
17
|
+
],
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"module": "./dist/index.js",
|
|
20
|
+
"types": "./dist/types/lib/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/types/lib/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./core": {
|
|
27
|
+
"types": "./dist/types/lib/core.d.ts",
|
|
28
|
+
"import": "./dist/core.js"
|
|
29
|
+
},
|
|
30
|
+
"./assets": {
|
|
31
|
+
"types": "./dist/types/lib/assets.d.ts",
|
|
32
|
+
"import": "./dist/assets.js"
|
|
33
|
+
},
|
|
34
|
+
"./omada": {
|
|
35
|
+
"types": "./dist/types/lib/omada.d.ts",
|
|
36
|
+
"import": "./dist/omada.js"
|
|
37
|
+
},
|
|
38
|
+
"./style.css": "./dist/style.css",
|
|
39
|
+
"./standalone": "./dist/standalone.js",
|
|
40
|
+
"./libpag.wasm": "./dist/libpag.wasm",
|
|
41
|
+
"./catalog.json": "./dist/catalog.json"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"skills/tp-mobile-ui-kit",
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"dev": "vite",
|
|
53
|
+
"build": "pnpm build:lib",
|
|
54
|
+
"build:app": "vite build --outDir dist-app",
|
|
55
|
+
"build:pages": "VITE_BASE_PATH=/tp-mobile-ui-kit/ vite build --outDir dist-app",
|
|
56
|
+
"build:esm": "vite build -c vite.lib.config.ts",
|
|
57
|
+
"build:standalone": "vite build -c vite.standalone.config.ts && rm -f dist/tp-mobile-ui-kit.css",
|
|
58
|
+
"build:types": "tsc -p tsconfig.lib.json",
|
|
59
|
+
"build:catalog": "node scripts/generate-catalog.mjs",
|
|
60
|
+
"build:lib": "pnpm build:esm && pnpm build:standalone && pnpm build:types && pnpm build:catalog",
|
|
61
|
+
"prepublishOnly": "pnpm build:lib",
|
|
62
|
+
"preview": "vite preview",
|
|
63
|
+
"typecheck": "tsc --noEmit -p tsconfig.app.json && tsc --noEmit -p tsconfig.node.json",
|
|
64
|
+
"test": "vitest run"
|
|
65
|
+
},
|
|
66
|
+
"peerDependencies": {
|
|
67
|
+
"react": ">=18.2.0 || >=19.0.0",
|
|
68
|
+
"react-dom": ">=18.2.0 || >=19.0.0"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"libpag": "^4.5.85",
|
|
72
|
+
"lucide-react": "^1.77.0"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@tailwindcss/vite": "^4.3.5",
|
|
76
|
+
"@testing-library/jest-dom": "^8.0.0",
|
|
77
|
+
"@testing-library/react": "^16.3.3",
|
|
78
|
+
"@types/node": "^22.0.0",
|
|
79
|
+
"@types/react": "^19.3.0",
|
|
80
|
+
"@types/react-dom": "^19.3.0",
|
|
81
|
+
"@vitejs/plugin-react": "^6.3.0",
|
|
82
|
+
"jsdom": "^26.1.0",
|
|
83
|
+
"react": "^19.3.1",
|
|
84
|
+
"react-dom": "^19.3.1",
|
|
85
|
+
"tailwindcss": "^4.3.5",
|
|
86
|
+
"typescript": "^5.8.3",
|
|
87
|
+
"vite": "^8.3.0",
|
|
88
|
+
"vitest": "^5.1.1"
|
|
89
|
+
}
|
|
90
|
+
}
|