@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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OmadaClientIconName } from '../assets/assetsManifest';
|
|
3
|
+
export interface ClientOverviewItem {
|
|
4
|
+
/** Logical category identifier (`online-clients`, `mobile`, `others`, `office`). */
|
|
5
|
+
key: string;
|
|
6
|
+
/** Numeric KPI value rendered above the category label. */
|
|
7
|
+
count: number;
|
|
8
|
+
/** Category label displayed beneath the numeric KPI. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Official Figma client icon slug from `OMADA_CLIENTS`. */
|
|
11
|
+
icon: OmadaClientIconName;
|
|
12
|
+
/** Forces the light asset variant when the dark asset contains upstream artifacts. */
|
|
13
|
+
forceLightIcon?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface SClientOverviewStripProps {
|
|
16
|
+
/** 4 horizontal client overview KPI blocks (`Online Clients`, `Mobile`, `Others`, `Office`). */
|
|
17
|
+
items?: ClientOverviewItem[];
|
|
18
|
+
/** Optional currently active category filter key. */
|
|
19
|
+
activeKey?: string | null;
|
|
20
|
+
/** Optional click handler invoked when a KPI block is clicked. */
|
|
21
|
+
onItemClick?: (key: string) => void;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const DEFAULT_CLIENT_OVERVIEW_ITEMS: ClientOverviewItem[];
|
|
25
|
+
/**
|
|
26
|
+
* 4-column client overview KPI strip displayed above the Emulator Clients toolbar.
|
|
27
|
+
* Shows client category artwork (`SClientIcon`) paired with count and category label.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SClientOverviewStrip: React.FC<SClientOverviewStripProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CollapseProps } from 'antd';
|
|
3
|
+
export type SCollapseVariant = 'default' | 'card' | 'ghost';
|
|
4
|
+
export interface SCollapseItem {
|
|
5
|
+
key: string;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
/** Optional subtitle displayed below the panel header title. */
|
|
8
|
+
subtitle?: React.ReactNode;
|
|
9
|
+
/** Optional status tag/badge/summary rendered on the right side of the header. */
|
|
10
|
+
status?: React.ReactNode;
|
|
11
|
+
/** Additional right-side header action/content. */
|
|
12
|
+
extra?: React.ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
collapsible?: 'header' | 'icon' | 'disabled';
|
|
15
|
+
showArrow?: boolean;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export interface SCollapseProps extends Omit<CollapseProps, 'items' | 'bordered' | 'ghost' | 'size'> {
|
|
19
|
+
items: SCollapseItem[];
|
|
20
|
+
variant?: SCollapseVariant;
|
|
21
|
+
/** AntD 6 size (`'small' | 'medium' | 'large'`). */
|
|
22
|
+
size?: 'small' | 'medium' | 'large';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Omada Collapse / Accordion panel supporting `default`, `card`, and `ghost` variants,
|
|
26
|
+
* header status/extra slots, smooth chevron rotation, and Light/Dark parity.
|
|
27
|
+
*/
|
|
28
|
+
export declare const SCollapse: React.FC<SCollapseProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ColorPickerProps } from 'antd';
|
|
3
|
+
import type { PresetsItem } from 'antd/es/color-picker/interface';
|
|
4
|
+
export type SColorPickerPreset = PresetsItem;
|
|
5
|
+
export interface SColorPickerProps extends ColorPickerProps {
|
|
6
|
+
/** Validation border state (`'error'` or `'warning'`). */
|
|
7
|
+
status?: 'error' | 'warning';
|
|
8
|
+
/** Toggle default Omada curated preset swatches (defaults to `true`). */
|
|
9
|
+
showPresets?: boolean;
|
|
10
|
+
/** Optional custom list of hex/css colors prepended as a quick palette group. */
|
|
11
|
+
presetColors?: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Omada ColorPicker with a `32px` filled trigger (`min-width: 171px` with HEX readout),
|
|
15
|
+
* curated Omada palette presets, and full Light/Dark theme legibility.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SColorPicker: React.FC<SColorPickerProps>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DatePickerProps } from 'antd';
|
|
3
|
+
import type { RangePickerProps } from 'antd/es/date-picker';
|
|
4
|
+
export type OmadaPickerDate = NonNullable<NonNullable<RangePickerProps['value']>[0]>;
|
|
5
|
+
/**
|
|
6
|
+
* Extracts a native `Date` from an AntD/Dayjs date value or Date.
|
|
7
|
+
*/
|
|
8
|
+
export declare function toNativeDate(value: unknown): Date | null;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a Dayjs-compatible wrapper backed by a native `Date` so AntD's
|
|
11
|
+
* `@rc-component/picker` dayjs adapter seamlessly promotes it to a real `Dayjs` instance.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createPickerDate(input: Date): OmadaPickerDate;
|
|
14
|
+
/**
|
|
15
|
+
* Formats a date range according to Omada Figma DatePicker (`43:34733`) rules:
|
|
16
|
+
* - Same day: `May 5, 2024`
|
|
17
|
+
* - Same month: `May 5 - 10, 2024`
|
|
18
|
+
* - Cross month (same year): `May 5 - Jun 10, 2024`
|
|
19
|
+
* - Cross year: `May 5, 2024 - May 4, 2025`
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatOmadaDateRange(start: Date, end: Date): string;
|
|
22
|
+
export interface SCapsulePreset {
|
|
23
|
+
key: string;
|
|
24
|
+
label: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
getRange: () => [Date, Date];
|
|
27
|
+
}
|
|
28
|
+
export type SRangeQuickPreset = NonNullable<RangePickerProps['presets']>[number];
|
|
29
|
+
export interface SDatePickerProps extends DatePickerProps {
|
|
30
|
+
/** Renders the picker input with an Omada capsule pill silhouette (`rounded-full`). */
|
|
31
|
+
capsule?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Omada single DatePicker defaulting to filled styling (`#F4F4F4` light / `#272727` dark),
|
|
35
|
+
* official Figma calendar icon, and optional capsule pill appearance.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SDatePicker: React.FC<SDatePickerProps>;
|
|
38
|
+
export interface SRangePickerProps extends Omit<RangePickerProps, 'presets'> {
|
|
39
|
+
/** Renders Omada's Figma capsule preset switcher (`1D · 1W · 1M` + Custom calendar trigger). */
|
|
40
|
+
capsule?: boolean;
|
|
41
|
+
/** Quick preset list for standard RangePicker (pass `false` to hide default presets). */
|
|
42
|
+
presets?: RangePickerProps['presets'] | false;
|
|
43
|
+
/** Custom preset pills for `capsule` mode (defaults to `1D`, `1W`, `1M`). */
|
|
44
|
+
capsulePresets?: SCapsulePreset[];
|
|
45
|
+
/** Controlled active preset key in `capsule` mode (`'1d' | '1w' | '1m' | 'custom'`). */
|
|
46
|
+
activePreset?: string;
|
|
47
|
+
/** Initial active preset key in uncontrolled `capsule` mode. */
|
|
48
|
+
defaultPreset?: string;
|
|
49
|
+
/** Callback invoked when a capsule preset pill or custom range is selected. */
|
|
50
|
+
onPresetChange?: (presetKey: string, range: [Date, Date]) => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Omada Date RangePicker supporting:
|
|
54
|
+
* - Standard filled RangePicker with quick range presets (`Last 24 Hours`, `Last 7 Days`, `Last 30 Days`)
|
|
55
|
+
* - Capsule filter bar (`capsule`) with `1D · 1W · 1M` segmented pills + Custom calendar range trigger.
|
|
56
|
+
*/
|
|
57
|
+
export declare const SRangePicker: React.FC<SRangePickerProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DescriptionsProps } from 'antd';
|
|
3
|
+
import type { DescriptionsItemType } from 'antd/es/descriptions';
|
|
4
|
+
export type SDescriptionsVariant = 'bordered' | 'filled' | 'borderless';
|
|
5
|
+
export interface SDescriptionItem extends DescriptionsItemType {
|
|
6
|
+
/** Render the value in monospace font (ideal for IPs, MACs, serial numbers). */
|
|
7
|
+
mono?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SDescriptionsProps extends Omit<DescriptionsProps, 'bordered' | 'size' | 'items'> {
|
|
10
|
+
items: SDescriptionItem[];
|
|
11
|
+
variant?: SDescriptionsVariant;
|
|
12
|
+
/** AntD 6 size (`'small' | 'medium' | 'large'`; never deprecated `'default'`). */
|
|
13
|
+
size?: 'small' | 'medium' | 'large';
|
|
14
|
+
/** Fixed label column width in horizontal mode (defaults to `200` per Omada Figma spec). */
|
|
15
|
+
labelWidth?: number | string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Omada Descriptions component supporting `bordered`, `filled`, and `borderless` variants,
|
|
19
|
+
* `horizontal` (`200px` fixed label column) and `vertical` layouts, and Light/Dark tokens.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SDescriptions: React.FC<SDescriptionsProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OmadaIconName } from '../assets/iconsManifest';
|
|
3
|
+
export interface DeviceHealthCounts {
|
|
4
|
+
good: number;
|
|
5
|
+
fair: number;
|
|
6
|
+
poor: number;
|
|
7
|
+
noData: number;
|
|
8
|
+
}
|
|
9
|
+
export interface DeviceHealthSummaryItem {
|
|
10
|
+
key: 'gateway' | 'switch' | 'ap' | 'olt' | string;
|
|
11
|
+
label: string;
|
|
12
|
+
icon: OmadaIconName;
|
|
13
|
+
/** Single score label (e.g. `"Good - 10"`) or single count (e.g. `"1"`). */
|
|
14
|
+
summaryText?: string;
|
|
15
|
+
/** Semantic tone when rendering `summaryText` without `counts` breakdown. */
|
|
16
|
+
summaryTone?: 'good' | 'fair' | 'poor' | 'muted';
|
|
17
|
+
/** 4-bucket health distribution rendered as `G / F / P / N` + 200x4px segmented bar. */
|
|
18
|
+
counts?: DeviceHealthCounts;
|
|
19
|
+
/** Whether to show the 200x4px segmented distribution bar beneath `counts`. */
|
|
20
|
+
showBar?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface SDeviceHealthSummaryProps {
|
|
23
|
+
/** Health summary items across device categories (defaults to Gateway / Switches / APs / OLTs). */
|
|
24
|
+
items?: DeviceHealthSummaryItem[];
|
|
25
|
+
/** Optional click handler when a category block is clicked. */
|
|
26
|
+
onCategoryClick?: (key: string) => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const DEFAULT_DEVICE_HEALTH_SUMMARY_ITEMS: DeviceHealthSummaryItem[];
|
|
30
|
+
/**
|
|
31
|
+
* 4-column device health summary strip displayed above the Emulator Devices toolbar.
|
|
32
|
+
* Shows category icon, health score or `Good / Fair / Poor / No Data` counts, and a 200x4px segmented bar.
|
|
33
|
+
*/
|
|
34
|
+
export declare const SDeviceHealthSummary: React.FC<SDeviceHealthSummaryProps>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OmadaProductName } from '../assets/assetsManifest';
|
|
3
|
+
/**
|
|
4
|
+
* Physical switch / gateway port item used by `SDevicePortGraphic` and `DevicePropertiesDrawer`.
|
|
5
|
+
*/
|
|
6
|
+
export interface DrawerPortItem {
|
|
7
|
+
port: number;
|
|
8
|
+
name: string;
|
|
9
|
+
linkStatus: '10g' | '2.5g' | '1000m' | '100m' | 'disabled' | 'disconnected';
|
|
10
|
+
isSfp?: boolean;
|
|
11
|
+
isUplink?: boolean;
|
|
12
|
+
isPoe?: boolean;
|
|
13
|
+
isMirroring?: boolean;
|
|
14
|
+
isBlocking?: boolean;
|
|
15
|
+
isLag?: boolean;
|
|
16
|
+
lacp?: string;
|
|
17
|
+
connectionName?: string;
|
|
18
|
+
connectionProductSlug?: string;
|
|
19
|
+
connectionType?: 'gateway' | 'switch' | 'ap' | 'olt' | 'client';
|
|
20
|
+
label?: string;
|
|
21
|
+
type?: string;
|
|
22
|
+
poeCapability?: string;
|
|
23
|
+
profile?: string;
|
|
24
|
+
nativeNetwork?: string;
|
|
25
|
+
txSum?: string;
|
|
26
|
+
rxSum?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface SDevicePortGraphicProps {
|
|
29
|
+
/** Ordered list of physical ports on the device. */
|
|
30
|
+
ports: DrawerPortItem[];
|
|
31
|
+
/** `compact` renders 32px tiles + Used Port header; `full` renders 40px tiles + optional connected devices + legend. */
|
|
32
|
+
mode?: 'compact' | 'full';
|
|
33
|
+
/** Displays floating connected device thumbnails with vertical stem lines above connected ports in `full` mode. */
|
|
34
|
+
showConnectedDevices?: boolean;
|
|
35
|
+
/** Controls the `Used Port: X/Y` + info icon header row (defaults to `true` in `compact` mode). */
|
|
36
|
+
showHeader?: boolean;
|
|
37
|
+
/** Controls the 10-item horizontal port legend below the graphic (defaults to `true` in `full` mode). */
|
|
38
|
+
showLegend?: boolean;
|
|
39
|
+
/** Override count of used ports shown in compact header. */
|
|
40
|
+
usedPorts?: number;
|
|
41
|
+
/** Override count of total ports shown in compact header. */
|
|
42
|
+
totalPorts?: number;
|
|
43
|
+
/** Currently selected port number for table/graphic synchronization. */
|
|
44
|
+
selectedPort?: number | null;
|
|
45
|
+
/** Callback fired when a port tile is clicked. */
|
|
46
|
+
onSelectPort?: (port: DrawerPortItem) => void;
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface PortBadgeTileProps {
|
|
50
|
+
port: Pick<DrawerPortItem, 'port' | 'name' | 'linkStatus' | 'isSfp' | 'isUplink' | 'isPoe' | 'isMirroring' | 'isBlocking' | 'isLag'>;
|
|
51
|
+
size?: number;
|
|
52
|
+
interactive?: boolean;
|
|
53
|
+
selected?: boolean;
|
|
54
|
+
onClick?: () => void;
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Resolves a valid `SProductImage` slug for a connected neighbor device.
|
|
59
|
+
*/
|
|
60
|
+
export declare function resolveConnectedProductSlug(slug?: string, connectionType?: DrawerPortItem['connectionType'], connectionName?: string): OmadaProductName;
|
|
61
|
+
/**
|
|
62
|
+
* Crisp white/monochrome SFP fiber transceiver module icon matching Omada Controller v6.3.
|
|
63
|
+
*/
|
|
64
|
+
export declare const SfpGlyph: React.FC<{
|
|
65
|
+
size?: number;
|
|
66
|
+
className?: string;
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Link Aggregation (LAG) stacked-port badge glyph.
|
|
70
|
+
*/
|
|
71
|
+
export declare const LagGlyph: React.FC<{
|
|
72
|
+
size?: number;
|
|
73
|
+
className?: string;
|
|
74
|
+
}>;
|
|
75
|
+
/**
|
|
76
|
+
* Single physical port square tile used in port graphics, connection rows, and port tables.
|
|
77
|
+
*/
|
|
78
|
+
export declare const PortBadgeTile: React.FC<PortBadgeTileProps>;
|
|
79
|
+
/**
|
|
80
|
+
* 10-item horizontal port speed & attribute legend matching Omada Controller v6.3.
|
|
81
|
+
*/
|
|
82
|
+
export declare const PortStatusLegend: React.FC<{
|
|
83
|
+
ports?: DrawerPortItem[];
|
|
84
|
+
className?: string;
|
|
85
|
+
}>;
|
|
86
|
+
/**
|
|
87
|
+
* Interactive physical port strip for Omada Quick Properties (`mode="compact"`)
|
|
88
|
+
* and Expanded Manage Device Ports view (`mode="full"` with floating connected device thumbnails).
|
|
89
|
+
*/
|
|
90
|
+
export declare const SDevicePortGraphic: React.FC<SDevicePortGraphicProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type DeviceStatusType = 'connected' | 'disconnected' | 'heartbeat-missed' | 'adopt-failed' | 'pending' | 'provisioning' | 'isolated';
|
|
3
|
+
export interface SDeviceStatusProps {
|
|
4
|
+
status: DeviceStatusType;
|
|
5
|
+
label?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Semantic network device connectivity/provisioning indicator with colored status dot.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SDeviceStatus: React.FC<SDeviceStatusProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DividerProps } from 'antd';
|
|
3
|
+
export type SDividerOrientation = 'horizontal' | 'vertical';
|
|
4
|
+
export type SDividerVariant = 'solid' | 'dashed' | 'dotted';
|
|
5
|
+
export type SDividerTitlePlacement = 'left' | 'right' | 'center' | 'start' | 'end';
|
|
6
|
+
export type SDividerSize = 'small' | 'medium';
|
|
7
|
+
export interface SDividerProps extends Omit<DividerProps, 'type' | 'orientation' | 'orientationMargin' | 'size' | 'dashed'> {
|
|
8
|
+
/** Divider orientation (AntD 6 `orientation`; replaces deprecated `type`). */
|
|
9
|
+
orientation?: SDividerOrientation;
|
|
10
|
+
/** Stroke style (`solid`, `dashed`, or `dotted`). */
|
|
11
|
+
variant?: SDividerVariant;
|
|
12
|
+
/** Title position when children are provided. */
|
|
13
|
+
titlePlacement?: SDividerTitlePlacement;
|
|
14
|
+
/** Vertical spacing density (`small` or `medium`). */
|
|
15
|
+
size?: SDividerSize;
|
|
16
|
+
/** Adds Figma's 24px (`px-6`) horizontal inset margin for settings form panels. */
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
/** Convenience dashed toggle mapped cleanly to `variant="dashed"`. */
|
|
19
|
+
dashed?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Omada Divider (`3:64432`):
|
|
23
|
+
* - `1px` `--omada-border-divider` hairline horizontal & vertical dividers
|
|
24
|
+
* - Titled dividers (`Manrope 12px` `--omada-text-tertiary`) and `inset` form margins (`24px`).
|
|
25
|
+
*/
|
|
26
|
+
export declare const SDivider: React.FC<SDividerProps>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SDonutSummaryItem {
|
|
3
|
+
/** Unique item identifier. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Display label for the slice and breakdown row. */
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
/** Numeric metric value used to compute slice proportions. */
|
|
8
|
+
value: number;
|
|
9
|
+
/** Formatted readout rendered on the right (e.g. `"58.30 MB"` or `"2 (50%)"`). */
|
|
10
|
+
displayValue?: React.ReactNode;
|
|
11
|
+
/** Optional override color for this slice and legend swatch. */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** Optional leading icon/badge rendered before `label` in vertical item rows. */
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
/** When true, styles the right value as a clickable action link with chevron. */
|
|
16
|
+
clickable?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface SDonutSummaryCardProps {
|
|
19
|
+
/** Card header title. */
|
|
20
|
+
title: React.ReactNode;
|
|
21
|
+
/** Optional icon rendered before `title`. */
|
|
22
|
+
titleIcon?: React.ReactNode;
|
|
23
|
+
/** Primary metric centered inside the donut ring (e.g. `"58.33 MB"` or `"4"`). */
|
|
24
|
+
centerValue: React.ReactNode;
|
|
25
|
+
/** Secondary subtitle centered below `centerValue` (e.g. `"Traffic"` or `"Total"`). */
|
|
26
|
+
centerLabel?: React.ReactNode;
|
|
27
|
+
/** Breakdown items powering both the donut slices and the item/legend list. */
|
|
28
|
+
data: SDonutSummaryItem[];
|
|
29
|
+
/**
|
|
30
|
+
* `'vertical'` stacks the donut above clickable breakdown rows (Application Analytics).
|
|
31
|
+
* `'horizontal'` aligns the donut on the left and a compact legend on the right (Reports).
|
|
32
|
+
*/
|
|
33
|
+
layout?: 'vertical' | 'horizontal';
|
|
34
|
+
/** Number of columns for horizontal legend layout (`1` or `2`). */
|
|
35
|
+
legendColumns?: 1 | 2;
|
|
36
|
+
/** Donut canvas diameter in pixels. */
|
|
37
|
+
donutSize?: number;
|
|
38
|
+
/** ECharts pie inner/outer radius percentages. */
|
|
39
|
+
radius?: [string, string];
|
|
40
|
+
/** Show a close (`×`) button in the card header. */
|
|
41
|
+
closable?: boolean;
|
|
42
|
+
/** Callback invoked when the close (`×`) button is clicked. */
|
|
43
|
+
onClose?: () => void;
|
|
44
|
+
/** Accessibility label for the close button. */
|
|
45
|
+
closeAriaLabel?: string;
|
|
46
|
+
/** Callback invoked when a clickable breakdown row is activated. */
|
|
47
|
+
onItemClick?: (item: SDonutSummaryItem) => void;
|
|
48
|
+
/** Optional extra header element rendered when `closable` is false. */
|
|
49
|
+
extra?: React.ReactNode;
|
|
50
|
+
/** Optional accessible label or test id on the card root. */
|
|
51
|
+
'data-testid'?: string;
|
|
52
|
+
className?: string;
|
|
53
|
+
style?: React.CSSProperties;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Omada Donut Summary Card pairing a ring chart with centered metric overlay and
|
|
57
|
+
* either vertical interactive breakdown rows (`Application Analytics`) or a compact
|
|
58
|
+
* side-by-side legend (`Reports`).
|
|
59
|
+
*/
|
|
60
|
+
export declare const SDonutSummaryCard: React.FC<SDonutSummaryCardProps>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DrawerProps } from 'antd';
|
|
3
|
+
export type SDrawerSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface SDrawerProps extends Omit<DrawerProps, 'size' | 'width'> {
|
|
5
|
+
size?: SDrawerSize;
|
|
6
|
+
width?: number | string;
|
|
7
|
+
subtitle?: React.ReactNode;
|
|
8
|
+
statusSlot?: React.ReactNode;
|
|
9
|
+
headerTabs?: React.ReactNode;
|
|
10
|
+
/** Displays a skeleton placeholder inside the drawer body while data loads */
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Omada slide-over Drawer (`sm`: 480px, `md`: 640px, `lg`: 880px)
|
|
15
|
+
* supporting a rich header slot with subtitle, status badge, tabs, and loading skeleton.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SDrawer: React.FC<SDrawerProps>;
|
|
18
|
+
export interface SDrawerFooterProps {
|
|
19
|
+
onCancel?: () => void;
|
|
20
|
+
onOk?: () => void;
|
|
21
|
+
cancelText?: React.ReactNode | null;
|
|
22
|
+
okText?: React.ReactNode | null;
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
okDisabled?: boolean;
|
|
25
|
+
danger?: boolean;
|
|
26
|
+
align?: 'left' | 'right' | 'between';
|
|
27
|
+
/** Make footer sticky inside scrollable drawer body (adds top border & surface fill) */
|
|
28
|
+
sticky?: boolean;
|
|
29
|
+
extra?: React.ReactNode;
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Standardized Omada drawer footer bar for `SDrawer`'s `footer` prop or sticky bottom body placement.
|
|
35
|
+
*/
|
|
36
|
+
export declare const SDrawerFooter: React.FC<SDrawerFooterProps>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DropdownProps, type MenuProps } from 'antd';
|
|
3
|
+
export type SDropdownWidthPreset = 'compact' | 'default' | 'wide';
|
|
4
|
+
export type SDropdownPlacement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
|
5
|
+
export type SDropdownItem = NonNullable<MenuProps['items']>[number];
|
|
6
|
+
export interface SDropdownProps extends Omit<DropdownProps, 'dropdownRender' | 'destroyPopupOnHide' | 'overlayClassName' | 'overlayStyle' | 'placement'> {
|
|
7
|
+
/** Convenience menu items array when not passing a full `menu` object. */
|
|
8
|
+
items?: SDropdownItem[];
|
|
9
|
+
/** Selected item keys highlighted with brand tint and check indicator. */
|
|
10
|
+
selectedKeys?: string[];
|
|
11
|
+
/** Convenience click handler invoked with the clicked menu item key. */
|
|
12
|
+
onSelect?: (key: string) => void;
|
|
13
|
+
/** Enables check indicator rendering on selected items. */
|
|
14
|
+
selectable?: boolean;
|
|
15
|
+
/** Width preset matching Figma `3:64442` (`compact`: 178px, `default`: 216px, `wide`: 275px). */
|
|
16
|
+
widthPreset?: SDropdownWidthPreset;
|
|
17
|
+
/** Explicit popup menu width override. */
|
|
18
|
+
menuWidth?: number | string;
|
|
19
|
+
/** Displays a search input at the top of the dropdown panel. */
|
|
20
|
+
searchable?: boolean;
|
|
21
|
+
/** Placeholder for the dropdown search input. */
|
|
22
|
+
searchPlaceholder?: string;
|
|
23
|
+
/** Optional header element rendered above the menu list. */
|
|
24
|
+
header?: React.ReactNode;
|
|
25
|
+
/** Optional footer element rendered below the menu list. */
|
|
26
|
+
footer?: React.ReactNode;
|
|
27
|
+
/** Popup placement (uses AntD 6 non-deprecated placement tokens). */
|
|
28
|
+
placement?: SDropdownPlacement;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Omada Dropdown Menu (`3:64442`):
|
|
32
|
+
* - AntD 6 `popupRender` + `destroyOnHidden` + semantic `classNames`/`styles`
|
|
33
|
+
* - Width presets (`178px`, `216px`, `275px`), grouped sections, checkable items,
|
|
34
|
+
* nested submenus, and optional built-in search & footer slots.
|
|
35
|
+
*/
|
|
36
|
+
export declare const SDropdown: React.FC<SDropdownProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OmadaIllustrationName } from '../assets/assetsManifest';
|
|
3
|
+
export interface SEmptyProps {
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
illustration?: OmadaIllustrationName | false;
|
|
8
|
+
illustrationWidth?: number;
|
|
9
|
+
action?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Clean Omada empty state placeholder for tables, drawers, and sub-panels.
|
|
14
|
+
* Defaults to the official theme-aware Figma `no-data` illustration unless overridden
|
|
15
|
+
* via `icon` or `illustration={false}`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SEmpty: React.FC<SEmptyProps>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FormItemProps, type FormProps } from 'antd';
|
|
3
|
+
export interface SFormProps<Values = Record<string, unknown>> extends Omit<FormProps<Values>, 'children'> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Omada-configured AntD Form.
|
|
8
|
+
* Defaults to horizontal layout with 200px left-aligned labels and no trailing colon.
|
|
9
|
+
*/
|
|
10
|
+
export declare function SForm<Values = Record<string, unknown>>({ layout, colon, labelAlign, labelCol, wrapperCol, className, children, ...rest }: SFormProps<Values>): React.JSX.Element;
|
|
11
|
+
export declare namespace SForm {
|
|
12
|
+
var useForm: typeof import("antd/es/form/Form").useForm;
|
|
13
|
+
var useWatch: typeof import("antd/es/form/Form").useWatch;
|
|
14
|
+
var List: React.FC<import("antd/es/form").FormListProps>;
|
|
15
|
+
}
|
|
16
|
+
export interface SFormItemProps extends Pick<FormItemProps, 'name' | 'rules' | 'valuePropName' | 'initialValue' | 'dependencies' | 'validateTrigger' | 'required' | 'className' | 'style' | 'children'> {
|
|
17
|
+
label?: React.ReactNode;
|
|
18
|
+
tooltip?: React.ReactNode;
|
|
19
|
+
optional?: boolean;
|
|
20
|
+
fieldWidth?: number | 'full';
|
|
21
|
+
hint?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Omada form row item supporting label info tooltips, 350px default field cap,
|
|
25
|
+
* inline `(Optional)` label, and helper hints.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SFormItem: React.FC<SFormItemProps>;
|
|
28
|
+
export interface SFormSectionProps {
|
|
29
|
+
title: React.ReactNode;
|
|
30
|
+
description?: React.ReactNode;
|
|
31
|
+
collapsible?: boolean;
|
|
32
|
+
defaultOpen?: boolean;
|
|
33
|
+
extra?: React.ReactNode;
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Collapsible form section header + divider matching Omada configuration panels.
|
|
39
|
+
*/
|
|
40
|
+
export declare const SFormSection: React.FC<SFormSectionProps>;
|
|
41
|
+
export interface SFormFooterProps {
|
|
42
|
+
onCancel?: () => void;
|
|
43
|
+
onApply?: () => void;
|
|
44
|
+
cancelText?: string;
|
|
45
|
+
applyText?: string;
|
|
46
|
+
loading?: boolean;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
align?: 'left' | 'right';
|
|
49
|
+
sticky?: boolean;
|
|
50
|
+
extra?: React.ReactNode;
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 56px Omada form action bar with top divider and Apply/Cancel buttons.
|
|
55
|
+
*/
|
|
56
|
+
export declare const SFormFooter: React.FC<SFormFooterProps>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SHealthGaugeProps {
|
|
3
|
+
/** Current site/device health score from `0` to `maxScore`. */
|
|
4
|
+
score?: number;
|
|
5
|
+
/** Maximum gauge score (defaults to `100`). */
|
|
6
|
+
maxScore?: number;
|
|
7
|
+
/** Subtitle beneath the large numeric score. */
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
/** Optional tooltip text displayed on the info icon next to `label`. */
|
|
10
|
+
tooltip?: React.ReactNode;
|
|
11
|
+
/** Width of the gauge SVG in pixels (defaults to `248`). */
|
|
12
|
+
width?: number;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 180-degree Omada Network Health semi-circle gauge featuring outer `0..100` ticks,
|
|
18
|
+
* rounded emerald progress arc, centered large numeric readout, and info tooltip.
|
|
19
|
+
*/
|
|
20
|
+
export declare const SHealthGauge: React.FC<SHealthGaugeProps>;
|
|
21
|
+
export interface SHealthRadarProps {
|
|
22
|
+
/** Wi-Fi dimension health score (`0..maxValue`). */
|
|
23
|
+
wifi?: number;
|
|
24
|
+
/** Client dimension health score (`0..maxValue`). */
|
|
25
|
+
client?: number;
|
|
26
|
+
/** WAN dimension health score (`0..maxValue`). */
|
|
27
|
+
wan?: number;
|
|
28
|
+
/** Device dimension health score (`0..maxValue`). */
|
|
29
|
+
device?: number;
|
|
30
|
+
/** Maximum dimension scale (defaults to `100`). */
|
|
31
|
+
maxValue?: number;
|
|
32
|
+
/** Optional tooltip shown on the WAN `(i)` icon. */
|
|
33
|
+
wanTooltip?: React.ReactNode;
|
|
34
|
+
/** SVG width/height square box in pixels (defaults to `252` wide × `180` tall). */
|
|
35
|
+
width?: number;
|
|
36
|
+
className?: string;
|
|
37
|
+
style?: React.CSSProperties;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 4-axis concentric circular radar visualization (`Wi-Fi`, `Client`, `WAN`, `Device`)
|
|
41
|
+
* with translucent emerald polygon fill and vertex markers.
|
|
42
|
+
*/
|
|
43
|
+
export declare const SHealthRadar: React.FC<SHealthRadarProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type SHealthTickStatus = 'good' | 'fair' | 'poor' | 'none';
|
|
3
|
+
export interface SHealthTrendRow {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
/** ~96 vertical status ticks ordered oldest -> newest. */
|
|
7
|
+
ticks: SHealthTickStatus[];
|
|
8
|
+
}
|
|
9
|
+
export interface SHealthTrendBarProps {
|
|
10
|
+
/** Dimension rows (`Device`, `Client`, `Wi-Fi`, `WAN`). */
|
|
11
|
+
rows: SHealthTrendRow[];
|
|
12
|
+
/** Optional labels per tick index for hover inspection. */
|
|
13
|
+
tickLabels?: string[];
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Multi-row 24h Network Health Trend timeline rendering ~96 thin vertical ticks per row
|
|
19
|
+
* across `Device`, `Client`, `Wi-Fi`, and `WAN` dimensions.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SHealthTrendBar: React.FC<SHealthTrendBarProps>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type InputNumberProps, type InputProps } from 'antd';
|
|
3
|
+
import type { PasswordProps, TextAreaProps } from 'antd/es/input';
|
|
4
|
+
export interface SInputProps extends InputProps {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Omada text input defaulting to filled grey background (`#F4F4F4` / `#272727`).
|
|
8
|
+
*/
|
|
9
|
+
export declare const SInput: React.FC<SInputProps>;
|
|
10
|
+
export interface SSearchInputProps extends InputProps {
|
|
11
|
+
width?: number | string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Omada search input (260px default width, leading search icon, clearable).
|
|
15
|
+
*/
|
|
16
|
+
export declare const SSearchInput: React.FC<SSearchInputProps>;
|
|
17
|
+
export interface PasswordRuleConfig {
|
|
18
|
+
key: string;
|
|
19
|
+
label: string;
|
|
20
|
+
validate: (value: string) => boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const DEFAULT_PASSWORD_RULES: PasswordRuleConfig[];
|
|
23
|
+
export interface SPasswordInputProps extends PasswordProps {
|
|
24
|
+
/** Show the 4-segment password strength indicator bar. */
|
|
25
|
+
showStrength?: boolean;
|
|
26
|
+
/** Show live validation checklist rules below the password field. */
|
|
27
|
+
showRules?: boolean;
|
|
28
|
+
/** Custom validation rules for `showRules` (defaults to Omada's 4 complexity rules). */
|
|
29
|
+
rules?: PasswordRuleConfig[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Omada password input with optional 4-segment strength meter (`Weak` -> `Very Strong`)
|
|
33
|
+
* and live password rule validation checklist (`showRules`).
|
|
34
|
+
*/
|
|
35
|
+
export declare const SPasswordInput: React.FC<SPasswordInputProps>;
|
|
36
|
+
export interface SNumberInputProps extends InputNumberProps {
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Omada numeric input defaulting to filled grey background.
|
|
40
|
+
*/
|
|
41
|
+
export declare const SNumberInput: React.FC<SNumberInputProps>;
|
|
42
|
+
export interface STextAreaProps extends TextAreaProps {
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Omada multiline text input defaulting to filled grey background.
|
|
46
|
+
*/
|
|
47
|
+
export declare const STextArea: React.FC<STextAreaProps>;
|