@chenyqthu/tp-mobile-ui-kit 0.2.1 → 0.3.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 +11 -9
- package/dist/assets.js +5 -5
- package/dist/catalog.json +1939 -152
- package/dist/chunks/OmadaAppDemo-BxWPBACn.js +7359 -0
- package/dist/chunks/{TPPrompt-6o6zUNzO.js → TPInfoSheet-DozlNuGj.js} +856 -533
- package/dist/chunks/asset-icons-BLfOEHzP.js +10434 -0
- package/dist/chunks/{asset-illustrations-YHXzEd7z.js → asset-illustrations-CslT-sgf.js} +28 -2051
- package/dist/chunks/{asset-logos-DAyGwOLj.js → asset-logos-B18ywOgH.js} +2 -2
- package/dist/chunks/{asset-motion-D7fWh_JS.js → asset-motion-CxM2f5Ft.js} +307 -70
- package/dist/core.js +3 -3
- package/dist/index.js +7 -7
- package/dist/omada.js +7 -7
- package/dist/standalone.js +2090 -622
- package/dist/style.css +1 -1
- package/dist/types/assets-lib/TPIcon.d.ts +3 -0
- package/dist/types/assets-lib/iconsManifest.d.ts +2 -0
- package/dist/types/assets-lib/motionsManifest.d.ts +1 -1
- package/dist/types/core/components/TPDatePicker.d.ts +1 -1
- package/dist/types/core/components/TPInfoSheet.d.ts +11 -0
- package/dist/types/core/components/TPLoadMore.d.ts +7 -0
- package/dist/types/core/index.d.ts +2 -0
- package/dist/types/core/types.d.ts +93 -8
- package/dist/types/omada/blocks/OmadaChartCard.d.ts +53 -0
- package/dist/types/omada/blocks/OmadaClientListBlock.d.ts +34 -0
- package/dist/types/omada/blocks/OmadaDeviceListBlock.d.ts +15 -2
- package/dist/types/omada/blocks/OmadaFormRepeaterBlock.d.ts +48 -0
- package/dist/types/omada/blocks/OmadaPortPanelBlock.d.ts +21 -3
- package/dist/types/omada/blocks/OmadaPortSelectorBlock.d.ts +23 -0
- package/dist/types/omada/blocks/OmadaSidebarDrawer.d.ts +27 -0
- package/dist/types/omada/blocks/OmadaSiteListBlock.d.ts +26 -0
- package/dist/types/omada/blocks/OmadaVoucherPreviewCard.d.ts +21 -0
- package/dist/types/omada/components/OmadaStandardInput.d.ts +3 -2
- package/dist/types/omada/index.d.ts +14 -2
- package/dist/types/omada/pages/OmadaAccessibilitySettingsPage.d.ts +12 -0
- package/dist/types/omada/pages/OmadaAppDemo.d.ts +6 -3
- package/dist/types/omada/pages/OmadaConfigFormPage.d.ts +24 -0
- package/dist/types/omada/pages/OmadaLanSettingsPage.d.ts +25 -0
- package/dist/types/omada/pages/OmadaPortDetailPage.d.ts +16 -0
- package/dist/types/omada/pages/OmadaPrivacyPolicyPage.d.ts +18 -0
- package/dist/types/theme/TPThemeProvider.d.ts +9 -0
- package/dist/types/theme/index.d.ts +1 -1
- package/dist/types/theme/tokens.d.ts +24 -0
- package/package.json +2 -2
- package/skills/tp-mobile-ui-kit/SKILL.md +17 -14
- package/skills/tp-mobile-ui-kit/references/catalog.json +1939 -152
- package/dist/chunks/OmadaAppDemo-Dwm_iU6O.js +0 -4922
- package/dist/chunks/asset-icons-BIenKvAh.js +0 -7613
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { TPResolvedMode } from '../theme/tokens';
|
|
2
3
|
import { type TPIconMeta, type TPIconName, type TPIconPack } from './iconsManifest';
|
|
3
4
|
export declare function hasTPIcon(name: string, pack?: 'auto' | TPIconPack): boolean;
|
|
4
5
|
export declare function listTPIcons(pack?: TPIconPack): readonly TPIconMeta[];
|
|
5
6
|
export interface TPIconProps {
|
|
6
7
|
name: TPIconName;
|
|
7
8
|
pack?: 'auto' | TPIconPack;
|
|
9
|
+
/** Override dark/light icon asset variant (defaults to active TPThemeProvider resolvedMode) */
|
|
10
|
+
theme?: TPResolvedMode;
|
|
8
11
|
size?: number | string;
|
|
9
12
|
color?: string;
|
|
10
13
|
className?: string;
|
|
@@ -9,6 +9,8 @@ export interface TPIconMeta {
|
|
|
9
9
|
monochrome: boolean;
|
|
10
10
|
width: number;
|
|
11
11
|
height: number;
|
|
12
|
+
darkRelPath?: string;
|
|
13
|
+
darkFormat?: 'svg' | 'png';
|
|
12
14
|
}
|
|
13
15
|
export declare const TP_ICONS: readonly TPIconMeta[];
|
|
14
16
|
export type TPIconName = (typeof TP_ICONS)[number]['name'];
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import type { TPDatePickerProps } from '../types';
|
|
3
3
|
import '../../styles/tp-core-lists-inputs.css';
|
|
4
4
|
/**
|
|
5
|
-
* Mobile date wheel picker with Year / Month / Day columns, leap-year clamping, and header actions.
|
|
5
|
+
* Mobile date wheel picker with Year / Month / Day columns, leap-year clamping, single & range modes, and header actions.
|
|
6
6
|
*/
|
|
7
7
|
export declare const TPDatePicker: React.FC<TPDatePickerProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPInfoSheetProps, TPLegendSheetProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-overlays.css';
|
|
4
|
+
/**
|
|
5
|
+
* Informational bottom-sheet dialog presenting explanatory copy or bullet points above a confirmation CTA.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPInfoSheet: React.FC<TPInfoSheetProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Bottom-sheet key/legend sheet displaying color swatches, icons, and badge explanations.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TPLegendSheet: React.FC<TPLegendSheetProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPLoadMoreProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* List bottom footer displaying Load More trigger, Loading spinner, End-of-list state, or Retry action.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPLoadMore: React.FC<TPLoadMoreProps>;
|
|
@@ -49,3 +49,5 @@ export { TPDivider } from './components/TPDivider';
|
|
|
49
49
|
export { TPAvatar } from './components/TPAvatar';
|
|
50
50
|
export { TPPinInput } from './components/TPPinInput';
|
|
51
51
|
export { TPPrompt } from './components/TPPrompt';
|
|
52
|
+
export { TPLoadMore } from './components/TPLoadMore';
|
|
53
|
+
export { TPInfoSheet, TPLegendSheet } from './components/TPInfoSheet';
|
|
@@ -47,10 +47,18 @@ export interface TPStatusBarProps {
|
|
|
47
47
|
className?: string;
|
|
48
48
|
style?: React.CSSProperties;
|
|
49
49
|
}
|
|
50
|
+
export interface TPHeaderTabItem {
|
|
51
|
+
key: string;
|
|
52
|
+
label: React.ReactNode;
|
|
53
|
+
badge?: number | string;
|
|
54
|
+
}
|
|
50
55
|
export interface TPHeaderProps {
|
|
51
56
|
title?: React.ReactNode;
|
|
52
57
|
subtitle?: React.ReactNode;
|
|
53
|
-
variant?: 'standard' | 'floating';
|
|
58
|
+
variant?: 'standard' | 'floating' | 'large' | 'tabs';
|
|
59
|
+
os?: 'ios' | 'android';
|
|
60
|
+
/** Automatically adapt floating Liquid Glass to traditional chrome on Android (default true) */
|
|
61
|
+
adaptiveOS?: boolean;
|
|
54
62
|
left?: React.ReactNode;
|
|
55
63
|
right?: React.ReactNode;
|
|
56
64
|
showBack?: boolean;
|
|
@@ -59,6 +67,10 @@ export interface TPHeaderProps {
|
|
|
59
67
|
onTitleClick?: () => void;
|
|
60
68
|
rightBadge?: number | string;
|
|
61
69
|
translucent?: boolean;
|
|
70
|
+
loading?: boolean;
|
|
71
|
+
tabs?: readonly TPHeaderTabItem[];
|
|
72
|
+
activeTab?: string;
|
|
73
|
+
onTabChange?: (key: string) => void;
|
|
62
74
|
className?: string;
|
|
63
75
|
style?: React.CSSProperties;
|
|
64
76
|
}
|
|
@@ -74,7 +86,12 @@ export interface TPTabBarProps {
|
|
|
74
86
|
activeKey: string;
|
|
75
87
|
onChange: (key: string) => void;
|
|
76
88
|
variant?: 'floating-pill' | 'docked';
|
|
89
|
+
os?: 'ios' | 'android';
|
|
90
|
+
/** Automatically adapt floating pill to docked bar on Android (default true) */
|
|
91
|
+
adaptiveOS?: boolean;
|
|
92
|
+
iconSize?: number;
|
|
77
93
|
extraAction?: React.ReactNode;
|
|
94
|
+
fab?: React.ReactNode;
|
|
78
95
|
className?: string;
|
|
79
96
|
style?: React.CSSProperties;
|
|
80
97
|
}
|
|
@@ -88,7 +105,7 @@ export interface TPSegmentProps {
|
|
|
88
105
|
options: readonly TPSegmentOption[];
|
|
89
106
|
value: string;
|
|
90
107
|
onChange: (key: string) => void;
|
|
91
|
-
variant?: 'underline' | 'pill';
|
|
108
|
+
variant?: 'underline' | 'pill' | 'segmented';
|
|
92
109
|
fullWidth?: boolean;
|
|
93
110
|
className?: string;
|
|
94
111
|
style?: React.CSSProperties;
|
|
@@ -96,27 +113,36 @@ export interface TPSegmentProps {
|
|
|
96
113
|
export interface TPPageControlProps {
|
|
97
114
|
total: number;
|
|
98
115
|
current: number;
|
|
116
|
+
variant?: 'dots' | 'process';
|
|
99
117
|
onChange?: (index: number) => void;
|
|
100
118
|
className?: string;
|
|
101
119
|
style?: React.CSSProperties;
|
|
102
120
|
}
|
|
121
|
+
export type TPButtonVariant = 'primary' | 'secondary' | 'text' | 'alert' | 'alert-strong' | 'tonal' | 'in-card' | 'in-card-alert';
|
|
103
122
|
export interface TPButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
104
|
-
variant?:
|
|
123
|
+
variant?: TPButtonVariant;
|
|
105
124
|
size?: 'lg' | 'md' | 'sm';
|
|
106
125
|
block?: boolean;
|
|
107
126
|
loading?: boolean;
|
|
127
|
+
/** Optional deterministic progress fill percentage (0-100) rendered behind the label */
|
|
128
|
+
progress?: number;
|
|
108
129
|
htmlType?: 'button' | 'submit' | 'reset';
|
|
109
130
|
icon?: React.ReactNode;
|
|
110
131
|
}
|
|
111
132
|
export interface TPFixedButtonBarProps {
|
|
112
|
-
layout?: 'single' | 'dual-horizontal' | 'dual-vertical';
|
|
133
|
+
layout?: 'single' | 'dual-horizontal' | 'dual-vertical' | 'triple';
|
|
113
134
|
primaryText: string;
|
|
135
|
+
primaryVariant?: TPButtonVariant;
|
|
114
136
|
onPrimaryClick?: () => void;
|
|
115
137
|
primaryLoading?: boolean;
|
|
116
138
|
primaryDisabled?: boolean;
|
|
117
139
|
secondaryText?: string;
|
|
118
140
|
onSecondaryClick?: () => void;
|
|
119
|
-
secondaryVariant?:
|
|
141
|
+
secondaryVariant?: TPButtonVariant;
|
|
142
|
+
tertiaryText?: string;
|
|
143
|
+
onTertiaryClick?: () => void;
|
|
144
|
+
tertiaryVariant?: TPButtonVariant;
|
|
145
|
+
tertiaryDisabled?: boolean;
|
|
120
146
|
note?: React.ReactNode;
|
|
121
147
|
className?: string;
|
|
122
148
|
style?: React.CSSProperties;
|
|
@@ -178,6 +204,8 @@ export interface TPListItemProps {
|
|
|
178
204
|
switchProps?: TPSwitchProps;
|
|
179
205
|
danger?: boolean;
|
|
180
206
|
disabled?: boolean;
|
|
207
|
+
layout?: 'default' | 'form-field';
|
|
208
|
+
error?: React.ReactNode;
|
|
181
209
|
onClick?: () => void;
|
|
182
210
|
className?: string;
|
|
183
211
|
style?: React.CSSProperties;
|
|
@@ -213,11 +241,14 @@ export interface TPTextProps {
|
|
|
213
241
|
style?: React.CSSProperties;
|
|
214
242
|
children: React.ReactNode;
|
|
215
243
|
}
|
|
244
|
+
export type TPTagTone = 'focus' | 'neutral' | 'success' | 'warning' | 'alert' | 'info' | 'purple' | 'indigo';
|
|
216
245
|
export interface TPTagProps {
|
|
217
246
|
children: React.ReactNode;
|
|
218
|
-
tone?:
|
|
247
|
+
tone?: TPTagTone;
|
|
219
248
|
selected?: boolean;
|
|
220
|
-
size?: 'sm' | 'md';
|
|
249
|
+
size?: 'xs' | 'sm' | 'md';
|
|
250
|
+
shape?: 'pill' | 'rect';
|
|
251
|
+
appearance?: 'soft' | 'solid' | 'outline';
|
|
221
252
|
closable?: boolean;
|
|
222
253
|
onClose?: () => void;
|
|
223
254
|
onClick?: () => void;
|
|
@@ -243,11 +274,12 @@ export interface TPEmptyStateProps {
|
|
|
243
274
|
actionText?: string;
|
|
244
275
|
onAction?: () => void;
|
|
245
276
|
compact?: boolean;
|
|
277
|
+
size?: 'full' | 'compact';
|
|
246
278
|
className?: string;
|
|
247
279
|
style?: React.CSSProperties;
|
|
248
280
|
}
|
|
249
281
|
export interface TPInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'prefix'> {
|
|
250
|
-
variant?: 'standard' | 'list' | 'borderless' | 'icon';
|
|
282
|
+
variant?: 'standard' | 'list' | 'borderless' | 'icon' | 'underline';
|
|
251
283
|
label?: React.ReactNode;
|
|
252
284
|
value?: string;
|
|
253
285
|
defaultValue?: string;
|
|
@@ -256,6 +288,7 @@ export interface TPInputProps extends Omit<React.InputHTMLAttributes<HTMLInputEl
|
|
|
256
288
|
password?: boolean;
|
|
257
289
|
multiline?: boolean;
|
|
258
290
|
rows?: number;
|
|
291
|
+
showCount?: boolean;
|
|
259
292
|
error?: string;
|
|
260
293
|
helperText?: string;
|
|
261
294
|
prefix?: React.ReactNode;
|
|
@@ -271,6 +304,7 @@ export interface TPSearchBarProps {
|
|
|
271
304
|
onCancel?: () => void;
|
|
272
305
|
showCancel?: boolean;
|
|
273
306
|
autoFocus?: boolean;
|
|
307
|
+
shape?: 'auto' | 'pill' | 'rounded';
|
|
274
308
|
className?: string;
|
|
275
309
|
style?: React.CSSProperties;
|
|
276
310
|
}
|
|
@@ -291,12 +325,17 @@ export interface TPWheelPickerProps {
|
|
|
291
325
|
style?: React.CSSProperties;
|
|
292
326
|
}
|
|
293
327
|
export interface TPDatePickerProps {
|
|
328
|
+
mode?: 'single' | 'range';
|
|
294
329
|
value?: Date;
|
|
295
330
|
defaultValue?: Date;
|
|
331
|
+
rangeValue?: readonly [string, string];
|
|
332
|
+
defaultRangeValue?: readonly [string, string];
|
|
296
333
|
minYear?: number;
|
|
297
334
|
maxYear?: number;
|
|
298
335
|
onChange?: (date: Date) => void;
|
|
299
336
|
onConfirm?: (date: Date) => void;
|
|
337
|
+
onRangeChange?: (range: [string, string]) => void;
|
|
338
|
+
onRangeConfirm?: (range: [string, string]) => void;
|
|
300
339
|
onCancel?: () => void;
|
|
301
340
|
title?: string;
|
|
302
341
|
className?: string;
|
|
@@ -309,6 +348,7 @@ export interface TPTimePickerProps {
|
|
|
309
348
|
period?: 'AM' | 'PM';
|
|
310
349
|
};
|
|
311
350
|
use12Hour?: boolean;
|
|
351
|
+
format?: '24h' | '12h';
|
|
312
352
|
minuteStep?: number;
|
|
313
353
|
onChange?: (val: {
|
|
314
354
|
hour: number;
|
|
@@ -541,6 +581,8 @@ export interface TPTooltipProps {
|
|
|
541
581
|
}
|
|
542
582
|
export interface TPFixedToastProps {
|
|
543
583
|
status?: 'default' | 'info' | 'success' | 'warning' | 'danger';
|
|
584
|
+
/** Convenience alias matching status tones */
|
|
585
|
+
tone?: 'default' | 'info' | 'success' | 'warning' | 'danger';
|
|
544
586
|
action?: 'none' | 'close' | 'go-to' | 'button';
|
|
545
587
|
actionLabel?: string;
|
|
546
588
|
onAction?: () => void;
|
|
@@ -648,3 +690,46 @@ export interface TPPinInputProps {
|
|
|
648
690
|
className?: string;
|
|
649
691
|
style?: React.CSSProperties;
|
|
650
692
|
}
|
|
693
|
+
export interface TPLoadMoreProps {
|
|
694
|
+
status?: 'idle' | 'loading' | 'no-more' | 'error';
|
|
695
|
+
idleText?: React.ReactNode;
|
|
696
|
+
loadingText?: React.ReactNode;
|
|
697
|
+
noMoreText?: React.ReactNode;
|
|
698
|
+
errorText?: React.ReactNode;
|
|
699
|
+
onLoadMore?: () => void;
|
|
700
|
+
onRetry?: () => void;
|
|
701
|
+
className?: string;
|
|
702
|
+
style?: React.CSSProperties;
|
|
703
|
+
}
|
|
704
|
+
export interface TPInfoSheetProps {
|
|
705
|
+
open: boolean;
|
|
706
|
+
title?: React.ReactNode;
|
|
707
|
+
subtitle?: React.ReactNode;
|
|
708
|
+
description?: React.ReactNode;
|
|
709
|
+
bullets?: readonly React.ReactNode[];
|
|
710
|
+
confirmText?: string;
|
|
711
|
+
onConfirm?: () => void;
|
|
712
|
+
onClose: () => void;
|
|
713
|
+
children?: React.ReactNode;
|
|
714
|
+
className?: string;
|
|
715
|
+
style?: React.CSSProperties;
|
|
716
|
+
}
|
|
717
|
+
export interface TPLegendItem {
|
|
718
|
+
key: string;
|
|
719
|
+
label: React.ReactNode;
|
|
720
|
+
description?: React.ReactNode;
|
|
721
|
+
color?: string;
|
|
722
|
+
icon?: React.ReactNode;
|
|
723
|
+
badge?: React.ReactNode;
|
|
724
|
+
}
|
|
725
|
+
export interface TPLegendSheetProps {
|
|
726
|
+
open: boolean;
|
|
727
|
+
title?: React.ReactNode;
|
|
728
|
+
subtitle?: React.ReactNode;
|
|
729
|
+
items: readonly TPLegendItem[];
|
|
730
|
+
columns?: 1 | 2;
|
|
731
|
+
onClose: () => void;
|
|
732
|
+
footer?: React.ReactNode;
|
|
733
|
+
className?: string;
|
|
734
|
+
style?: React.CSSProperties;
|
|
735
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/tp-omada.css';
|
|
3
|
+
export type OmadaChartType = 'line' | 'area' | 'bar' | 'stacked-bar' | 'donut' | 'speed-bar';
|
|
4
|
+
export interface OmadaChartSeries {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
values: readonly number[];
|
|
9
|
+
stack?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface OmadaChartTimeRangeOption {
|
|
12
|
+
key: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}
|
|
15
|
+
export interface OmadaChartScaleResult {
|
|
16
|
+
min: number;
|
|
17
|
+
max: number;
|
|
18
|
+
step: number;
|
|
19
|
+
ticks: number[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Computes nice human-readable axis ticks supporting all-zero datasets and negative dBm ranges.
|
|
23
|
+
*/
|
|
24
|
+
export declare function computeOmadaAxisScale(values: readonly number[], options?: {
|
|
25
|
+
tickCount?: number;
|
|
26
|
+
allowNegative?: boolean;
|
|
27
|
+
zeroBaseline?: boolean;
|
|
28
|
+
}): OmadaChartScaleResult;
|
|
29
|
+
export interface OmadaChartCardProps {
|
|
30
|
+
title: React.ReactNode;
|
|
31
|
+
subtitle?: React.ReactNode;
|
|
32
|
+
type?: OmadaChartType;
|
|
33
|
+
labels?: readonly string[];
|
|
34
|
+
series: readonly OmadaChartSeries[];
|
|
35
|
+
secondarySeries?: readonly OmadaChartSeries[];
|
|
36
|
+
unit?: string;
|
|
37
|
+
secondaryUnit?: string;
|
|
38
|
+
timeRanges?: readonly OmadaChartTimeRangeOption[];
|
|
39
|
+
activeTimeRange?: string;
|
|
40
|
+
onTimeRangeChange?: (key: string) => void;
|
|
41
|
+
loading?: boolean;
|
|
42
|
+
empty?: boolean;
|
|
43
|
+
emptyTitle?: string;
|
|
44
|
+
emptyDescription?: string;
|
|
45
|
+
extra?: React.ReactNode;
|
|
46
|
+
className?: string;
|
|
47
|
+
style?: React.CSSProperties;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Reusable Omada data-visualization card supporting line, area, bar, stacked-bar, donut,
|
|
51
|
+
* and speed-bar charts with dual Y-axes, negative dBm scaling, tooltips, loading, and empty states.
|
|
52
|
+
*/
|
|
53
|
+
export declare const OmadaChartCard: React.FC<OmadaChartCardProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TPIconName } from '../../assets-lib';
|
|
3
|
+
import type { OmadaClientLinkType, OmadaClientStatus } from '../pages/OmadaSiteClientsPage';
|
|
4
|
+
import '../../styles/tp-omada.css';
|
|
5
|
+
export interface OmadaClientListItem {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
ip: string;
|
|
9
|
+
mac: string;
|
|
10
|
+
networkName: string;
|
|
11
|
+
status: OmadaClientStatus;
|
|
12
|
+
linkType: OmadaClientLinkType;
|
|
13
|
+
band?: '2.4G' | '5G' | '6G' | 'LAN';
|
|
14
|
+
rssiDbm?: number;
|
|
15
|
+
downRate?: string;
|
|
16
|
+
upRate?: string;
|
|
17
|
+
iconName?: TPIconName;
|
|
18
|
+
}
|
|
19
|
+
export declare const DEFAULT_OMADA_CLIENT_LIST: readonly OmadaClientListItem[];
|
|
20
|
+
export type OmadaClientFilterKey = 'all' | 'wireless' | 'wired' | 'blocked';
|
|
21
|
+
export interface OmadaClientListBlockProps {
|
|
22
|
+
clients?: readonly OmadaClientListItem[];
|
|
23
|
+
searchable?: boolean;
|
|
24
|
+
filterable?: boolean;
|
|
25
|
+
onSelectClient?: (client: OmadaClientListItem) => void;
|
|
26
|
+
onToggleBlock?: (client: OmadaClientListItem) => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Reusable Omada Client List block featuring dark-adaptive client icons, Wi-Fi band tags,
|
|
32
|
+
* RSSI signal strength, live Rx/Tx rates, filter chips, and quick block/unblock action.
|
|
33
|
+
*/
|
|
34
|
+
export declare const OmadaClientListBlock: React.FC<OmadaClientListBlockProps>;
|
|
@@ -4,7 +4,9 @@ import '../../styles/tp-omada.css';
|
|
|
4
4
|
export type OmadaSiteTabKey = 'dashboard' | 'insights' | 'devices' | 'clients' | 'settings';
|
|
5
5
|
export declare const OMADA_SITE_TABS: readonly TPTabBarItem[];
|
|
6
6
|
export type OmadaDeviceType = 'gateway' | 'switch' | 'ap';
|
|
7
|
-
export type OmadaDeviceStatus = 'connected' | 'disconnected' | 'pending';
|
|
7
|
+
export type OmadaDeviceStatus = 'connected' | 'disconnected' | 'pending' | 'adopting' | 'isolated' | 'heartbeat-missed' | 'online' | 'offline' | 'updating' | 'warning';
|
|
8
|
+
export type OmadaDeviceSecondaryMetric = 'ip' | 'mac' | 'uptime' | 'clients' | 'cpu-mem' | 'traffic' | 'firmware';
|
|
9
|
+
export type OmadaDeviceThumbSize = 'sm' | 'md' | 'lg';
|
|
8
10
|
export interface OmadaDeviceRecord {
|
|
9
11
|
id: string;
|
|
10
12
|
mac: string;
|
|
@@ -21,6 +23,8 @@ export interface OmadaDeviceRecord {
|
|
|
21
23
|
uptime?: string;
|
|
22
24
|
cpuPct?: number;
|
|
23
25
|
memoryPct?: number;
|
|
26
|
+
clientsCount?: number;
|
|
27
|
+
trafficRate?: string;
|
|
24
28
|
}
|
|
25
29
|
export declare const DEFAULT_OMADA_DEVICES: readonly OmadaDeviceRecord[];
|
|
26
30
|
export declare const OmadaDeviceThumb: React.FC<{
|
|
@@ -30,6 +34,14 @@ export declare const OmadaDeviceThumb: React.FC<{
|
|
|
30
34
|
export interface OmadaDeviceListBlockProps {
|
|
31
35
|
devices?: readonly OmadaDeviceRecord[];
|
|
32
36
|
grouped?: boolean;
|
|
37
|
+
secondaryMetric?: OmadaDeviceSecondaryMetric;
|
|
38
|
+
onSecondaryMetricChange?: (metric: OmadaDeviceSecondaryMetric) => void;
|
|
39
|
+
thumbSize?: OmadaDeviceThumbSize;
|
|
40
|
+
onThumbSizeChange?: (size: OmadaDeviceThumbSize) => void;
|
|
41
|
+
showDisplayOptions?: boolean;
|
|
42
|
+
selectable?: 'none' | 'single' | 'multi';
|
|
43
|
+
selectedIds?: readonly string[];
|
|
44
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
33
45
|
onSelectDevice?: (device: OmadaDeviceRecord) => void;
|
|
34
46
|
emptyTitle?: string;
|
|
35
47
|
emptyDescription?: string;
|
|
@@ -37,6 +49,7 @@ export interface OmadaDeviceListBlockProps {
|
|
|
37
49
|
style?: React.CSSProperties;
|
|
38
50
|
}
|
|
39
51
|
/**
|
|
40
|
-
* Reusable Omada v5.3+ Device List block matching real-device `SiteDevices.png` row geometry
|
|
52
|
+
* Reusable Omada v5.3+ Device List block matching real-device `SiteDevices.png` row geometry,
|
|
53
|
+
* extended with 6+ device statuses, 7 selectable secondary metrics, Display Options sheet, and row selection.
|
|
41
54
|
*/
|
|
42
55
|
export declare const OmadaDeviceListBlock: React.FC<OmadaDeviceListBlockProps>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/tp-omada.css';
|
|
3
|
+
export interface OmadaFormRepeaterItem {
|
|
4
|
+
id: string;
|
|
5
|
+
keyLabel?: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export interface OmadaFormRepeaterBlockProps {
|
|
9
|
+
title?: React.ReactNode;
|
|
10
|
+
items?: readonly OmadaFormRepeaterItem[];
|
|
11
|
+
defaultItems?: readonly OmadaFormRepeaterItem[];
|
|
12
|
+
keyLabel?: string;
|
|
13
|
+
keyPlaceholder?: string;
|
|
14
|
+
valueLabel?: string;
|
|
15
|
+
valuePlaceholder?: string;
|
|
16
|
+
addText?: string;
|
|
17
|
+
minItems?: number;
|
|
18
|
+
maxItems?: number;
|
|
19
|
+
onChange?: (next: OmadaFormRepeaterItem[]) => void;
|
|
20
|
+
renderRow?: (item: OmadaFormRepeaterItem, index: number, update: (patch: Partial<OmadaFormRepeaterItem>) => void) => React.ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Repeatable dynamic form row block (`Add Item` / delete row / bounded count) for DNS servers,
|
|
26
|
+
* DHCP options, VLAN subnets, or ACL match rules.
|
|
27
|
+
*/
|
|
28
|
+
export declare const OmadaFormRepeaterBlock: React.FC<OmadaFormRepeaterBlockProps>;
|
|
29
|
+
export interface OmadaCustomOption {
|
|
30
|
+
value: string;
|
|
31
|
+
label: React.ReactNode;
|
|
32
|
+
description?: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export interface OmadaCustomOptionListProps {
|
|
35
|
+
title?: React.ReactNode;
|
|
36
|
+
options: readonly OmadaCustomOption[];
|
|
37
|
+
value?: string;
|
|
38
|
+
defaultValue?: string;
|
|
39
|
+
customLabel?: string;
|
|
40
|
+
customPlaceholder?: string;
|
|
41
|
+
onChange?: (value: string) => void;
|
|
42
|
+
className?: string;
|
|
43
|
+
style?: React.CSSProperties;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Single-select option list with preset choices plus an inline Custom value entry row.
|
|
47
|
+
*/
|
|
48
|
+
export declare const OmadaCustomOptionList: React.FC<OmadaCustomOptionListProps>;
|
|
@@ -1,31 +1,49 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type TPIconName } from '../../assets-lib';
|
|
2
3
|
import '../../styles/tp-omada.css';
|
|
3
4
|
export type OmadaPortMedia = 'rj45' | 'sfp';
|
|
4
|
-
export type OmadaPortSpeed = '2.5G' | '
|
|
5
|
+
export type OmadaPortSpeed = '10/100M' | '1G' | '2.5G' | '5G' | '10G' | '25G' | '40G' | '100G' | 'Disabled' | 'Disconnected' | '100M' | '1000M' | 'Down';
|
|
6
|
+
export type OmadaPortBadgeType = 'wan' | 'poe' | 'poe-bt' | 'sfp' | 'sfp-plus' | 'uplink' | 'lag' | 'mirror' | 'mirroring' | 'stp-blocking' | 'stp-discard' | 'loop' | 'blocked' | 'disabled' | 'disconnected' | 'stack' | 'console';
|
|
5
7
|
export interface OmadaHardwarePort {
|
|
6
8
|
id: string;
|
|
7
9
|
label: string;
|
|
10
|
+
portNumber?: number;
|
|
8
11
|
media: OmadaPortMedia;
|
|
9
12
|
speed: OmadaPortSpeed;
|
|
10
13
|
poeCapable?: boolean;
|
|
11
14
|
poeEnabled?: boolean;
|
|
12
15
|
poeWatts?: number;
|
|
16
|
+
badges?: readonly OmadaPortBadgeType[];
|
|
17
|
+
lagGroup?: string;
|
|
13
18
|
vlanProfile: string;
|
|
14
19
|
rxBytes: string;
|
|
15
20
|
txBytes: string;
|
|
16
21
|
}
|
|
22
|
+
export declare function getOmadaPortSpeedColor(speed: OmadaPortSpeed): string;
|
|
23
|
+
export declare function getOmadaPortBadgeIcon(badge: OmadaPortBadgeType): TPIconName;
|
|
17
24
|
export declare const DEFAULT_OMADA_PORTS: readonly OmadaHardwarePort[];
|
|
25
|
+
export interface OmadaPortLegendSheetProps {
|
|
26
|
+
open: boolean;
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
title?: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Standardized Omada Port Panel speed color & badge icon legend sheet (`TPLegendSheet`).
|
|
32
|
+
*/
|
|
33
|
+
export declare const OmadaPortLegendSheet: React.FC<OmadaPortLegendSheetProps>;
|
|
18
34
|
export interface OmadaPortPanelBlockProps {
|
|
19
35
|
deviceModel?: string;
|
|
20
36
|
ports?: readonly OmadaHardwarePort[];
|
|
37
|
+
layout?: 'single-row' | 'dual-row';
|
|
21
38
|
showHeader?: boolean;
|
|
39
|
+
showLegendButton?: boolean;
|
|
22
40
|
onBack?: () => void;
|
|
23
41
|
onPortUpdate?: (updated: OmadaHardwarePort) => void;
|
|
24
42
|
className?: string;
|
|
25
43
|
style?: React.CSSProperties;
|
|
26
44
|
}
|
|
27
45
|
/**
|
|
28
|
-
* Reusable Omada v5.3+ hardware port panel (`SMBNET-4185` / `SMBNET-4057`)
|
|
29
|
-
*
|
|
46
|
+
* Reusable Omada v5.3+ hardware port panel (`SMBNET-4185` / `SMBNET-4057`) supporting 10 Omada speed
|
|
47
|
+
* colors, 17 port badge types, single-row & dual-row switch faceplates, legend sheet, PoE & VLAN controls.
|
|
30
48
|
*/
|
|
31
49
|
export declare const OmadaPortPanelBlock: React.FC<OmadaPortPanelBlockProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type OmadaHardwarePort } from './OmadaPortPanelBlock';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export type OmadaPortSelectorMode = 'select' | 'icon-select' | 'lag';
|
|
5
|
+
export interface OmadaPortSelectorBlockProps {
|
|
6
|
+
ports?: readonly OmadaHardwarePort[];
|
|
7
|
+
mode?: OmadaPortSelectorMode;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
value?: readonly string[];
|
|
10
|
+
defaultValue?: readonly string[];
|
|
11
|
+
lagGroupName?: string;
|
|
12
|
+
minLagPorts?: number;
|
|
13
|
+
maxLagPorts?: number;
|
|
14
|
+
title?: React.ReactNode;
|
|
15
|
+
onChange?: (selectedIds: string[]) => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Interactive Omada port selector supporting generic port selection, compact icon-grid selection,
|
|
21
|
+
* and Link Aggregation (LAG) member selection with speed mismatch & count validation.
|
|
22
|
+
*/
|
|
23
|
+
export declare const OmadaPortSelectorBlock: React.FC<OmadaPortSelectorBlockProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TPIconName } from '../../assets-lib';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export interface OmadaSidebarNavItem {
|
|
5
|
+
key: string;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
icon?: TPIconName;
|
|
8
|
+
badge?: number | string;
|
|
9
|
+
}
|
|
10
|
+
export interface OmadaSidebarDrawerProps {
|
|
11
|
+
open: boolean;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
controllerName?: string;
|
|
14
|
+
siteName?: string;
|
|
15
|
+
userRole?: string;
|
|
16
|
+
activeKey?: string;
|
|
17
|
+
items?: readonly OmadaSidebarNavItem[];
|
|
18
|
+
footerItems?: readonly OmadaSidebarNavItem[];
|
|
19
|
+
onSelectItem?: (key: string) => void;
|
|
20
|
+
onSwitchSite?: () => void;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Slide-over controller navigation drawer triggered from the top bar menu/avatar button.
|
|
26
|
+
*/
|
|
27
|
+
export declare const OmadaSidebarDrawer: React.FC<OmadaSidebarDrawerProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/tp-omada.css';
|
|
3
|
+
export interface OmadaSiteItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
region?: string;
|
|
7
|
+
controllerKind?: 'Cloud' | 'Local' | 'Hardware';
|
|
8
|
+
devicesOnline: number;
|
|
9
|
+
devicesTotal: number;
|
|
10
|
+
clientsCount: number;
|
|
11
|
+
alerts?: number;
|
|
12
|
+
status?: 'healthy' | 'warning' | 'offline';
|
|
13
|
+
}
|
|
14
|
+
export declare const DEFAULT_OMADA_SITES: readonly OmadaSiteItem[];
|
|
15
|
+
export interface OmadaSiteListBlockProps {
|
|
16
|
+
sites?: readonly OmadaSiteItem[];
|
|
17
|
+
activeSiteId?: string;
|
|
18
|
+
searchable?: boolean;
|
|
19
|
+
onSelectSite?: (site: OmadaSiteItem) => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Reusable Omada site switcher & multi-site overview list with alert counts, online device ratio, and search.
|
|
25
|
+
*/
|
|
26
|
+
export declare const OmadaSiteListBlock: React.FC<OmadaSiteListBlockProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/tp-omada.css';
|
|
3
|
+
export type OmadaVoucherStatus = 'valid' | 'in-use' | 'expired';
|
|
4
|
+
export interface OmadaVoucherPreviewCardProps {
|
|
5
|
+
code: string;
|
|
6
|
+
status?: OmadaVoucherStatus;
|
|
7
|
+
durationLabel?: string;
|
|
8
|
+
bandwidthLimit?: string;
|
|
9
|
+
dataQuota?: string;
|
|
10
|
+
validUntil?: string;
|
|
11
|
+
concurrentDevices?: number;
|
|
12
|
+
notes?: string;
|
|
13
|
+
onCopy?: (code: string) => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Printable & shareable Hotspot Voucher preview card showing access code, copy action,
|
|
19
|
+
* rate limits, data cap, and expiration timestamp.
|
|
20
|
+
*/
|
|
21
|
+
export declare const OmadaVoucherPreviewCard: React.FC<OmadaVoucherPreviewCardProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '../../styles/tp-omada.css';
|
|
3
|
-
export type OmadaStandardInputType = 'ip' | 'mac' | 'text' | 'port';
|
|
3
|
+
export type OmadaStandardInputType = 'ip' | 'mac' | 'text' | 'port' | 'ip-range' | 'cidr' | 'ip-port' | 'time-range';
|
|
4
4
|
export interface OmadaStandardInputProps {
|
|
5
5
|
type?: OmadaStandardInputType;
|
|
6
6
|
label?: React.ReactNode;
|
|
@@ -18,6 +18,7 @@ export interface OmadaStandardInputProps {
|
|
|
18
18
|
style?: React.CSSProperties;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Figma `【Omada】Standard Input` supporting segmented IPv4 (`0-255`), segmented MAC (`8C-86-DD-A6-A7-5F`),
|
|
21
|
+
* Figma `【Omada】Standard Input` supporting segmented IPv4 (`0-255`), segmented MAC (`8C-86-DD-A6-A7-5F`),
|
|
22
|
+
* port, text, IP Range, CIDR subnet, IP:Port, and Time Range structured inputs.
|
|
22
23
|
*/
|
|
23
24
|
export declare const OmadaStandardInput: React.FC<OmadaStandardInputProps>;
|