@chenyqthu/tp-mobile-ui-kit 0.1.0 → 0.2.1
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 +5 -5
- package/dist/catalog.json +1339 -71
- package/dist/chunks/{OmadaAppDemo-BP4a4ch_.js → OmadaAppDemo-Dwm_iU6O.js} +2050 -1239
- package/dist/chunks/TPPrompt-6o6zUNzO.js +3748 -0
- package/dist/core.js +2 -2
- package/dist/index.js +7 -7
- package/dist/omada.js +7 -7
- package/dist/standalone.js +341 -341
- package/dist/style.css +1 -1
- package/dist/types/core/components/TPAvatar.d.ts +7 -0
- package/dist/types/core/components/TPCheckbox.d.ts +11 -0
- package/dist/types/core/components/TPDivider.d.ts +7 -0
- package/dist/types/core/components/TPFixedToast.d.ts +7 -0
- package/dist/types/core/components/TPIconButton.d.ts +11 -0
- package/dist/types/core/components/TPLast7DaysPicker.d.ts +7 -0
- package/dist/types/core/components/TPLiquidGlass.d.ts +9 -0
- package/dist/types/core/components/TPLiquidGlassBackdrop.d.ts +32 -0
- package/dist/types/core/components/TPMonthPicker.d.ts +7 -0
- package/dist/types/core/components/TPPinInput.d.ts +7 -0
- package/dist/types/core/components/TPProgress.d.ts +7 -0
- package/dist/types/core/components/TPRadio.d.ts +11 -0
- package/dist/types/core/components/TPSkeleton.d.ts +7 -0
- package/dist/types/core/components/TPStepText.d.ts +7 -0
- package/dist/types/core/components/TPStepper.d.ts +7 -0
- package/dist/types/core/components/TPSwipeRow.d.ts +8 -0
- package/dist/types/core/components/TPTooltip.d.ts +7 -0
- package/dist/types/core/index.d.ts +17 -0
- package/dist/types/core/types.d.ts +236 -0
- package/dist/types/core/utils/liquidGlassEngine.d.ts +37 -0
- package/dist/types/omada/blocks/OmadaFirmwareUpdateBlock.d.ts +23 -0
- package/dist/types/omada/blocks/OmadaPortPanelBlock.d.ts +31 -0
- package/dist/types/omada/blocks/OmadaScheduleBlock.d.ts +33 -0
- package/dist/types/omada/blocks/OmadaTopologyBlock.d.ts +26 -0
- package/dist/types/omada/index.d.ts +4 -0
- package/dist/types/omada/pages/OmadaAppDemo.d.ts +1 -1
- package/dist/types/omada/pages/OmadaSiteSettingsPage.d.ts +4 -2
- package/package.json +2 -2
- package/skills/tp-mobile-ui-kit/SKILL.md +5 -4
- package/skills/tp-mobile-ui-kit/references/catalog.json +1339 -71
- package/dist/chunks/TPPrompt-Csg5YasJ.js +0 -2460
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPAvatarProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* User / account / device avatar supporting image, name initials, TPIcon, shape, and presence status dot.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPAvatar: React.FC<TPAvatarProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPCheckboxGroupProps, TPCheckboxProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* TP-Design theme-adaptive checkbox with optional indeterminate state, label, and description.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPCheckbox: React.FC<TPCheckboxProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Vertical or horizontal group of TPCheckbox options.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TPCheckboxGroup: React.FC<TPCheckboxGroupProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPDividerProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Hairline separator supporting inset alignment, optional centered label, and spacing presets.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPDivider: React.FC<TPDividerProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPFixedToastProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Persistent inline/sticky notification bar matching Figma `Toast / Fixed Toast`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPFixedToast: React.FC<TPFixedToastProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPIconButtonGroupProps, TPIconButtonProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Circular mobile icon button supporting Apple Liquid Glass, filled, tonal, and ghost variants.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPIconButton: React.FC<TPIconButtonProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Floating pill capsule grouping multiple TPIconButton actions with shared Liquid Glass or solid backing.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TPIconButtonGroup: React.FC<TPIconButtonGroupProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPLast7DaysPickerProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Horizontal 7-day rolling calendar strip matching Figma `Picker / Last 7 Days 过去7天`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPLast7DaysPicker: React.FC<TPLast7DaysPickerProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPLiquidGlassProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-nav-controls.css';
|
|
4
|
+
/**
|
|
5
|
+
* Apple iOS 26/27 Liquid Glass surface primitive combining SDF Snell-law optical backdrop
|
|
6
|
+
* refraction (with subtle RGB dispersion in Chromium), directional 135-degree specular rim
|
|
7
|
+
* highlights, and inner meniscus depth lighting.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TPLiquidGlass: React.FC<TPLiquidGlassProps>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPLiquidGlassProps } from '../types';
|
|
3
|
+
import { type LiquidGlassDisplacementAsset } from '../utils/liquidGlassEngine';
|
|
4
|
+
export interface TPLiquidGlassBackdropProps {
|
|
5
|
+
hostRef?: React.RefObject<HTMLElement | null>;
|
|
6
|
+
shape?: NonNullable<TPLiquidGlassProps['shape']>;
|
|
7
|
+
tint?: NonNullable<TPLiquidGlassProps['tint']>;
|
|
8
|
+
bezelWidth?: number;
|
|
9
|
+
refraction?: number;
|
|
10
|
+
dispersion?: number;
|
|
11
|
+
blur?: number;
|
|
12
|
+
saturation?: number;
|
|
13
|
+
optical?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Measures a glass backdrop's rendered geometry and prepares its cached SVG displacement asset.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useLiquidGlassSurface(targetRef: React.RefObject<HTMLElement | null>, options: Omit<TPLiquidGlassBackdropProps, 'hostRef'>): {
|
|
19
|
+
filterId: string;
|
|
20
|
+
asset: LiquidGlassDisplacementAsset | null;
|
|
21
|
+
size: {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
};
|
|
25
|
+
opticalEnabled: boolean;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Optical backdrop layer rendered inside a Liquid Glass container (`z-index: 0`).
|
|
29
|
+
* Never place `isolation: isolate` or `backdrop-filter` on the parent container so Chromium can
|
|
30
|
+
* sample the live scrolling DOM behind this element.
|
|
31
|
+
*/
|
|
32
|
+
export declare const TPLiquidGlassBackdrop: React.FC<TPLiquidGlassBackdropProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPMonthPickerProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Year navigation + 12-month grid selector matching Figma `Picker / Month Picker 选择月份`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPMonthPicker: React.FC<TPMonthPickerProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPPinInputProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Multi-cell OTP / verification PIN code input with auto-advance, backspace stepping, and paste distribution.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPPinInput: React.FC<TPPinInputProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPProgressProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Linear bar and circular SVG progress indicator driven by semantic `--tp-*` colors.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPProgress: React.FC<TPProgressProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPRadioGroupProps, TPRadioProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* TP-Design theme-adaptive radio selection button.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPRadio: React.FC<TPRadioProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Exclusive selection TPRadioGroup supporting vertical and horizontal layouts.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TPRadioGroup: React.FC<TPRadioGroupProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPSkeletonProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Shimmer placeholder supporting text line stacks, rect, circle, and dashboard card geometries.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPSkeleton: React.FC<TPSkeletonProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPStepTextProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Structured instructional list matching Figma `Text / Step Text`, `Numbered Text`, and `Bullet Point`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPStepText: React.FC<TPStepTextProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPStepperProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Horizontal or vertical multi-step progress stepper for onboarding and device setup flows.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPStepper: React.FC<TPStepperProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPSwipeRowProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Mobile swipeable list row exposing trailing actions (`neutral`, `focus`, `warning`, `alert`).
|
|
6
|
+
* Supports pointer horizontal drag gestures as well as accessible click/controlled `open`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const TPSwipeRow: React.FC<TPSwipeRowProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPTooltipProps } from '../types';
|
|
3
|
+
import '../../styles/tp-core-extended.css';
|
|
4
|
+
/**
|
|
5
|
+
* Callout tooltip bubble matching Figma `Prompt 提示气泡` with 6 arrow placements and optional click toggle.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TPTooltip: React.FC<TPTooltipProps>;
|
|
@@ -31,4 +31,21 @@ export { TPBottomSheet } from './components/TPBottomSheet';
|
|
|
31
31
|
export { TPPopup } from './components/TPPopup';
|
|
32
32
|
export { TPMenu } from './components/TPMenu';
|
|
33
33
|
export { TPToast, TPToastProvider, useTPToast, type TPToastOptions, type TPToastContextValue, } from './components/TPToast';
|
|
34
|
+
export { TPLiquidGlass } from './components/TPLiquidGlass';
|
|
35
|
+
export { computeLiquidGlassDisplacementField, supportsSvgBackdropFilter, type LiquidGlassFieldOptions, type LiquidGlassFieldResult, } from './utils/liquidGlassEngine';
|
|
36
|
+
export { TPIconButton, TPIconButtonGroup } from './components/TPIconButton';
|
|
37
|
+
export { TPCheckbox, TPCheckboxGroup } from './components/TPCheckbox';
|
|
38
|
+
export { TPRadio, TPRadioGroup } from './components/TPRadio';
|
|
39
|
+
export { TPSwipeRow } from './components/TPSwipeRow';
|
|
40
|
+
export { TPTooltip } from './components/TPTooltip';
|
|
41
|
+
export { TPFixedToast } from './components/TPFixedToast';
|
|
42
|
+
export { TPMonthPicker } from './components/TPMonthPicker';
|
|
43
|
+
export { TPLast7DaysPicker } from './components/TPLast7DaysPicker';
|
|
44
|
+
export { TPStepText } from './components/TPStepText';
|
|
45
|
+
export { TPProgress } from './components/TPProgress';
|
|
46
|
+
export { TPSkeleton } from './components/TPSkeleton';
|
|
47
|
+
export { TPStepper } from './components/TPStepper';
|
|
48
|
+
export { TPDivider } from './components/TPDivider';
|
|
49
|
+
export { TPAvatar } from './components/TPAvatar';
|
|
50
|
+
export { TPPinInput } from './components/TPPinInput';
|
|
34
51
|
export { TPPrompt } from './components/TPPrompt';
|
|
@@ -9,6 +9,8 @@ export interface TPPhoneFrameProps {
|
|
|
9
9
|
showFrame?: boolean;
|
|
10
10
|
showDynamicIsland?: boolean;
|
|
11
11
|
showHomeIndicator?: boolean;
|
|
12
|
+
overlayTop?: boolean;
|
|
13
|
+
overlayBottom?: boolean;
|
|
12
14
|
statusBar?: React.ReactNode;
|
|
13
15
|
bottomBar?: React.ReactNode;
|
|
14
16
|
floatingAction?: React.ReactNode;
|
|
@@ -16,6 +18,22 @@ export interface TPPhoneFrameProps {
|
|
|
16
18
|
style?: React.CSSProperties;
|
|
17
19
|
children: React.ReactNode;
|
|
18
20
|
}
|
|
21
|
+
export interface TPLiquidGlassProps {
|
|
22
|
+
shape?: 'pill' | 'circle' | 'rounded';
|
|
23
|
+
tint?: 'clear' | 'brand' | 'dark';
|
|
24
|
+
interactive?: boolean;
|
|
25
|
+
refraction?: number;
|
|
26
|
+
dispersion?: number;
|
|
27
|
+
blur?: number;
|
|
28
|
+
optical?: boolean;
|
|
29
|
+
as?: 'div' | 'button' | 'nav' | 'section';
|
|
30
|
+
ariaLabel?: string;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
33
|
+
className?: string;
|
|
34
|
+
style?: React.CSSProperties;
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}
|
|
19
37
|
export interface TPStatusBarProps {
|
|
20
38
|
time?: string;
|
|
21
39
|
os?: TPPlatformOS;
|
|
@@ -56,6 +74,7 @@ export interface TPTabBarProps {
|
|
|
56
74
|
activeKey: string;
|
|
57
75
|
onChange: (key: string) => void;
|
|
58
76
|
variant?: 'floating-pill' | 'docked';
|
|
77
|
+
extraAction?: React.ReactNode;
|
|
59
78
|
className?: string;
|
|
60
79
|
style?: React.CSSProperties;
|
|
61
80
|
}
|
|
@@ -125,6 +144,11 @@ export interface TPSliderProps {
|
|
|
125
144
|
showValue?: boolean;
|
|
126
145
|
unit?: string;
|
|
127
146
|
disabled?: boolean;
|
|
147
|
+
range?: boolean;
|
|
148
|
+
rangeValue?: readonly [number, number];
|
|
149
|
+
defaultRangeValue?: readonly [number, number];
|
|
150
|
+
onRangeChange?: (value: [number, number]) => void;
|
|
151
|
+
onRangeAfterChange?: (value: [number, number]) => void;
|
|
128
152
|
onChange?: (value: number) => void;
|
|
129
153
|
onAfterChange?: (value: number) => void;
|
|
130
154
|
ariaLabel?: string;
|
|
@@ -223,6 +247,7 @@ export interface TPEmptyStateProps {
|
|
|
223
247
|
style?: React.CSSProperties;
|
|
224
248
|
}
|
|
225
249
|
export interface TPInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'prefix'> {
|
|
250
|
+
variant?: 'standard' | 'list' | 'borderless' | 'icon';
|
|
226
251
|
label?: React.ReactNode;
|
|
227
252
|
value?: string;
|
|
228
253
|
defaultValue?: string;
|
|
@@ -412,3 +437,214 @@ export interface TPPromptProps {
|
|
|
412
437
|
className?: string;
|
|
413
438
|
style?: React.CSSProperties;
|
|
414
439
|
}
|
|
440
|
+
export interface TPIconButtonProps {
|
|
441
|
+
icon: TPIconName | React.ReactNode;
|
|
442
|
+
variant?: 'glass' | 'filled' | 'tonal' | 'ghost';
|
|
443
|
+
size?: 'sm' | 'md' | 'lg';
|
|
444
|
+
badge?: number | string | boolean;
|
|
445
|
+
disabled?: boolean;
|
|
446
|
+
ariaLabel: string;
|
|
447
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
448
|
+
className?: string;
|
|
449
|
+
style?: React.CSSProperties;
|
|
450
|
+
}
|
|
451
|
+
export interface TPIconButtonGroupProps {
|
|
452
|
+
variant?: 'glass' | 'solid';
|
|
453
|
+
children: React.ReactNode;
|
|
454
|
+
className?: string;
|
|
455
|
+
style?: React.CSSProperties;
|
|
456
|
+
}
|
|
457
|
+
export interface TPCheckboxProps {
|
|
458
|
+
checked?: boolean;
|
|
459
|
+
defaultChecked?: boolean;
|
|
460
|
+
indeterminate?: boolean;
|
|
461
|
+
disabled?: boolean;
|
|
462
|
+
label?: React.ReactNode;
|
|
463
|
+
description?: React.ReactNode;
|
|
464
|
+
onChange?: (checked: boolean) => void;
|
|
465
|
+
ariaLabel?: string;
|
|
466
|
+
className?: string;
|
|
467
|
+
style?: React.CSSProperties;
|
|
468
|
+
}
|
|
469
|
+
export interface TPCheckboxOption {
|
|
470
|
+
value: string;
|
|
471
|
+
label: React.ReactNode;
|
|
472
|
+
description?: React.ReactNode;
|
|
473
|
+
disabled?: boolean;
|
|
474
|
+
}
|
|
475
|
+
export interface TPCheckboxGroupProps {
|
|
476
|
+
options: readonly TPCheckboxOption[];
|
|
477
|
+
value?: readonly string[];
|
|
478
|
+
defaultValue?: readonly string[];
|
|
479
|
+
onChange?: (values: string[]) => void;
|
|
480
|
+
direction?: 'vertical' | 'horizontal';
|
|
481
|
+
disabled?: boolean;
|
|
482
|
+
className?: string;
|
|
483
|
+
style?: React.CSSProperties;
|
|
484
|
+
}
|
|
485
|
+
export interface TPRadioProps {
|
|
486
|
+
checked?: boolean;
|
|
487
|
+
defaultChecked?: boolean;
|
|
488
|
+
disabled?: boolean;
|
|
489
|
+
label?: React.ReactNode;
|
|
490
|
+
description?: React.ReactNode;
|
|
491
|
+
value?: string;
|
|
492
|
+
name?: string;
|
|
493
|
+
onChange?: (checked: boolean) => void;
|
|
494
|
+
ariaLabel?: string;
|
|
495
|
+
className?: string;
|
|
496
|
+
style?: React.CSSProperties;
|
|
497
|
+
}
|
|
498
|
+
export interface TPRadioOption {
|
|
499
|
+
value: string;
|
|
500
|
+
label: React.ReactNode;
|
|
501
|
+
description?: React.ReactNode;
|
|
502
|
+
disabled?: boolean;
|
|
503
|
+
}
|
|
504
|
+
export interface TPRadioGroupProps {
|
|
505
|
+
options: readonly TPRadioOption[];
|
|
506
|
+
value?: string;
|
|
507
|
+
defaultValue?: string;
|
|
508
|
+
onChange?: (value: string) => void;
|
|
509
|
+
direction?: 'vertical' | 'horizontal';
|
|
510
|
+
disabled?: boolean;
|
|
511
|
+
name?: string;
|
|
512
|
+
className?: string;
|
|
513
|
+
style?: React.CSSProperties;
|
|
514
|
+
}
|
|
515
|
+
export interface TPSwipeAction {
|
|
516
|
+
key: string;
|
|
517
|
+
label: React.ReactNode;
|
|
518
|
+
tone?: 'neutral' | 'focus' | 'warning' | 'alert';
|
|
519
|
+
onClick?: () => void;
|
|
520
|
+
}
|
|
521
|
+
export interface TPSwipeRowProps {
|
|
522
|
+
actions: readonly TPSwipeAction[];
|
|
523
|
+
open?: boolean;
|
|
524
|
+
defaultOpen?: boolean;
|
|
525
|
+
onOpenChange?: (open: boolean) => void;
|
|
526
|
+
disabled?: boolean;
|
|
527
|
+
children: React.ReactNode;
|
|
528
|
+
className?: string;
|
|
529
|
+
style?: React.CSSProperties;
|
|
530
|
+
}
|
|
531
|
+
export interface TPTooltipProps {
|
|
532
|
+
content: React.ReactNode;
|
|
533
|
+
arrowPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'left' | 'right';
|
|
534
|
+
contextAdaptive?: boolean;
|
|
535
|
+
open?: boolean;
|
|
536
|
+
defaultOpen?: boolean;
|
|
537
|
+
onOpenChange?: (open: boolean) => void;
|
|
538
|
+
children?: React.ReactNode;
|
|
539
|
+
className?: string;
|
|
540
|
+
style?: React.CSSProperties;
|
|
541
|
+
}
|
|
542
|
+
export interface TPFixedToastProps {
|
|
543
|
+
status?: 'default' | 'info' | 'success' | 'warning' | 'danger';
|
|
544
|
+
action?: 'none' | 'close' | 'go-to' | 'button';
|
|
545
|
+
actionLabel?: string;
|
|
546
|
+
onAction?: () => void;
|
|
547
|
+
onClose?: () => void;
|
|
548
|
+
message: React.ReactNode;
|
|
549
|
+
className?: string;
|
|
550
|
+
style?: React.CSSProperties;
|
|
551
|
+
}
|
|
552
|
+
export interface TPMonthPickerValue {
|
|
553
|
+
year: number;
|
|
554
|
+
month: number;
|
|
555
|
+
}
|
|
556
|
+
export interface TPMonthPickerProps {
|
|
557
|
+
value?: TPMonthPickerValue;
|
|
558
|
+
defaultValue?: TPMonthPickerValue;
|
|
559
|
+
minYear?: number;
|
|
560
|
+
maxYear?: number;
|
|
561
|
+
locale?: 'en' | 'zh';
|
|
562
|
+
onChange?: (val: TPMonthPickerValue) => void;
|
|
563
|
+
className?: string;
|
|
564
|
+
style?: React.CSSProperties;
|
|
565
|
+
}
|
|
566
|
+
export interface TPLast7DaysPickerProps {
|
|
567
|
+
value?: Date;
|
|
568
|
+
defaultValue?: Date;
|
|
569
|
+
referenceDate?: Date;
|
|
570
|
+
markedDates?: readonly string[];
|
|
571
|
+
locale?: 'en' | 'zh';
|
|
572
|
+
onChange?: (date: Date) => void;
|
|
573
|
+
className?: string;
|
|
574
|
+
style?: React.CSSProperties;
|
|
575
|
+
}
|
|
576
|
+
export interface TPStepTextItem {
|
|
577
|
+
key?: string;
|
|
578
|
+
title?: React.ReactNode;
|
|
579
|
+
text: React.ReactNode;
|
|
580
|
+
note?: React.ReactNode;
|
|
581
|
+
}
|
|
582
|
+
export interface TPStepTextProps {
|
|
583
|
+
variant?: 'step' | 'numbered' | 'bullet';
|
|
584
|
+
items: readonly TPStepTextItem[];
|
|
585
|
+
className?: string;
|
|
586
|
+
style?: React.CSSProperties;
|
|
587
|
+
}
|
|
588
|
+
export interface TPProgressProps {
|
|
589
|
+
variant?: 'linear' | 'circular';
|
|
590
|
+
percent: number;
|
|
591
|
+
tone?: 'focus' | 'success' | 'warning' | 'alert' | 'info';
|
|
592
|
+
size?: number;
|
|
593
|
+
strokeWidth?: number;
|
|
594
|
+
showValue?: boolean;
|
|
595
|
+
label?: React.ReactNode;
|
|
596
|
+
className?: string;
|
|
597
|
+
style?: React.CSSProperties;
|
|
598
|
+
}
|
|
599
|
+
export interface TPSkeletonProps {
|
|
600
|
+
variant?: 'text' | 'rect' | 'circle' | 'card';
|
|
601
|
+
width?: number | string;
|
|
602
|
+
height?: number | string;
|
|
603
|
+
lines?: number;
|
|
604
|
+
animated?: boolean;
|
|
605
|
+
className?: string;
|
|
606
|
+
style?: React.CSSProperties;
|
|
607
|
+
}
|
|
608
|
+
export interface TPStepperItem {
|
|
609
|
+
key: string;
|
|
610
|
+
title: React.ReactNode;
|
|
611
|
+
description?: React.ReactNode;
|
|
612
|
+
}
|
|
613
|
+
export interface TPStepperProps {
|
|
614
|
+
steps: readonly TPStepperItem[];
|
|
615
|
+
current: number;
|
|
616
|
+
direction?: 'horizontal' | 'vertical';
|
|
617
|
+
className?: string;
|
|
618
|
+
style?: React.CSSProperties;
|
|
619
|
+
}
|
|
620
|
+
export interface TPDividerProps {
|
|
621
|
+
inset?: boolean;
|
|
622
|
+
label?: React.ReactNode;
|
|
623
|
+
spacing?: 'sm' | 'md' | 'lg';
|
|
624
|
+
className?: string;
|
|
625
|
+
style?: React.CSSProperties;
|
|
626
|
+
}
|
|
627
|
+
export interface TPAvatarProps {
|
|
628
|
+
src?: string;
|
|
629
|
+
name?: string;
|
|
630
|
+
icon?: TPIconName | React.ReactNode;
|
|
631
|
+
size?: 'sm' | 'md' | 'lg';
|
|
632
|
+
status?: 'online' | 'offline' | 'busy' | 'none';
|
|
633
|
+
shape?: 'circle' | 'rounded';
|
|
634
|
+
alt?: string;
|
|
635
|
+
className?: string;
|
|
636
|
+
style?: React.CSSProperties;
|
|
637
|
+
}
|
|
638
|
+
export interface TPPinInputProps {
|
|
639
|
+
length?: number;
|
|
640
|
+
value?: string;
|
|
641
|
+
defaultValue?: string;
|
|
642
|
+
masked?: boolean;
|
|
643
|
+
error?: string;
|
|
644
|
+
disabled?: boolean;
|
|
645
|
+
onChange?: (value: string) => void;
|
|
646
|
+
onComplete?: (value: string) => void;
|
|
647
|
+
ariaLabel?: string;
|
|
648
|
+
className?: string;
|
|
649
|
+
style?: React.CSSProperties;
|
|
650
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface LiquidGlassFieldOptions {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
radius: number;
|
|
5
|
+
bezelWidth: number;
|
|
6
|
+
glassThickness?: number;
|
|
7
|
+
refractiveIndex?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface LiquidGlassFieldResult {
|
|
10
|
+
data: Uint8ClampedArray;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
maxScale: number;
|
|
14
|
+
}
|
|
15
|
+
export interface LiquidGlassDisplacementAsset {
|
|
16
|
+
url: string;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
maxScale: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns true only in Chromium desktop/Android browsers where SVG `backdrop-filter: url(#...)`
|
|
23
|
+
* samples live DOM pixels behind the element. Safari/WebKit and Firefox drop the entire
|
|
24
|
+
* `backdrop-filter` rule when `url(...)` appears, so they receive CSS fallback styling instead.
|
|
25
|
+
*/
|
|
26
|
+
export declare function supportsSvgBackdropFilter(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Computes a rounded-rectangle SDF displacement field using a convex squircle profile and
|
|
29
|
+
* Snell's law refraction (`n1 = 1.0 -> n2 = 1.5`), keeping interior center pixels neutral
|
|
30
|
+
* (`R = 128, G = 128`) and refracting along the curved bezel rim.
|
|
31
|
+
*/
|
|
32
|
+
export declare function computeLiquidGlassDisplacementField(options: LiquidGlassFieldOptions): LiquidGlassFieldResult;
|
|
33
|
+
/**
|
|
34
|
+
* Generates and memoizes a PNG data URL displacement map for a Liquid Glass bezel contour.
|
|
35
|
+
* Returns null safely in environments without 2D Canvas support (such as jsdom or SSR).
|
|
36
|
+
*/
|
|
37
|
+
export declare function getLiquidGlassDisplacementAsset(options: LiquidGlassFieldOptions): LiquidGlassDisplacementAsset | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/tp-omada.css';
|
|
3
|
+
export interface OmadaFirmwareCandidate {
|
|
4
|
+
id: string;
|
|
5
|
+
model: string;
|
|
6
|
+
mac: string;
|
|
7
|
+
currentVersion: string;
|
|
8
|
+
targetVersion: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const DEFAULT_FIRMWARE_CANDIDATES: readonly OmadaFirmwareCandidate[];
|
|
11
|
+
export interface OmadaFirmwareUpdateBlockProps {
|
|
12
|
+
candidates?: readonly OmadaFirmwareCandidate[];
|
|
13
|
+
showHeader?: boolean;
|
|
14
|
+
onBack?: () => void;
|
|
15
|
+
onUpgradeStart?: (selectedIds: string[]) => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Reusable Omada v5.3+ batch firmware update workflow block (`SMBNET-4894`) combining
|
|
21
|
+
* `TPFixedToast`, `TPStepText`, `TPCheckbox`, `TPProgress`, and `update-network` PAG motion.
|
|
22
|
+
*/
|
|
23
|
+
export declare const OmadaFirmwareUpdateBlock: React.FC<OmadaFirmwareUpdateBlockProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/tp-omada.css';
|
|
3
|
+
export type OmadaPortMedia = 'rj45' | 'sfp';
|
|
4
|
+
export type OmadaPortSpeed = '2.5G' | '1000M' | '100M' | 'Down';
|
|
5
|
+
export interface OmadaHardwarePort {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
media: OmadaPortMedia;
|
|
9
|
+
speed: OmadaPortSpeed;
|
|
10
|
+
poeCapable?: boolean;
|
|
11
|
+
poeEnabled?: boolean;
|
|
12
|
+
poeWatts?: number;
|
|
13
|
+
vlanProfile: string;
|
|
14
|
+
rxBytes: string;
|
|
15
|
+
txBytes: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const DEFAULT_OMADA_PORTS: readonly OmadaHardwarePort[];
|
|
18
|
+
export interface OmadaPortPanelBlockProps {
|
|
19
|
+
deviceModel?: string;
|
|
20
|
+
ports?: readonly OmadaHardwarePort[];
|
|
21
|
+
showHeader?: boolean;
|
|
22
|
+
onBack?: () => void;
|
|
23
|
+
onPortUpdate?: (updated: OmadaHardwarePort) => void;
|
|
24
|
+
className?: string;
|
|
25
|
+
style?: React.CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Reusable Omada v5.3+ hardware port panel (`SMBNET-4185` / `SMBNET-4057`) showing RJ45 & SFP+
|
|
29
|
+
* physical faceplate indicators, PoE wattage badges, VLAN assignment, and interactive inspection.
|
|
30
|
+
*/
|
|
31
|
+
export declare const OmadaPortPanelBlock: React.FC<OmadaPortPanelBlockProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TPDayKey } from '../../core/types';
|
|
3
|
+
import '../../styles/tp-omada.css';
|
|
4
|
+
export type OmadaScheduleTarget = 'wlan' | 'poe' | 'reboot';
|
|
5
|
+
export interface OmadaScheduleRule {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
target: OmadaScheduleTarget;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
days: TPDayKey[];
|
|
11
|
+
startTime: {
|
|
12
|
+
hour: number;
|
|
13
|
+
minute: number;
|
|
14
|
+
};
|
|
15
|
+
endTime?: {
|
|
16
|
+
hour: number;
|
|
17
|
+
minute: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare const DEFAULT_OMADA_SCHEDULES: readonly OmadaScheduleRule[];
|
|
21
|
+
export interface OmadaScheduleBlockProps {
|
|
22
|
+
rules?: readonly OmadaScheduleRule[];
|
|
23
|
+
showHeader?: boolean;
|
|
24
|
+
onBack?: () => void;
|
|
25
|
+
onChange?: (rules: OmadaScheduleRule[]) => void;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Reusable Omada v5.3+ Schedule block (`SMBNET-3501`) supporting WLAN, PoE, and Reboot schedules
|
|
31
|
+
* with `TPDaySwitcher` weekday selection and `TPTimePicker` bottom sheet editing.
|
|
32
|
+
*/
|
|
33
|
+
export declare const OmadaScheduleBlock: React.FC<OmadaScheduleBlockProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../styles/tp-omada.css';
|
|
3
|
+
export interface OmadaTopologyNode {
|
|
4
|
+
id: string;
|
|
5
|
+
role: 'wan' | 'gateway' | 'ap' | 'client';
|
|
6
|
+
name: string;
|
|
7
|
+
modelOrDetail: string;
|
|
8
|
+
ip: string;
|
|
9
|
+
linkLabel: string;
|
|
10
|
+
status: 'online' | 'warning';
|
|
11
|
+
}
|
|
12
|
+
export declare const DEFAULT_TOPOLOGY_NODES: readonly OmadaTopologyNode[];
|
|
13
|
+
export interface OmadaTopologyBlockProps {
|
|
14
|
+
siteName?: string;
|
|
15
|
+
nodes?: readonly OmadaTopologyNode[];
|
|
16
|
+
showHeader?: boolean;
|
|
17
|
+
onBack?: () => void;
|
|
18
|
+
onSelectNode?: (node: OmadaTopologyNode) => void;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Interactive Omada v5.3+ network topology diagram (`SMBNET-4433`) showing Internet WAN uplink,
|
|
24
|
+
* Gateway root, downlink Access Points, link rates, and loop-detection status.
|
|
25
|
+
*/
|
|
26
|
+
export declare const OmadaTopologyBlock: React.FC<OmadaTopologyBlockProps>;
|
|
@@ -2,6 +2,10 @@ export { OmadaStandardInput, type OmadaStandardInputProps, type OmadaStandardInp
|
|
|
2
2
|
export { OMADA_SITE_TABS, DEFAULT_OMADA_DEVICES, OmadaDeviceThumb, OmadaDeviceListBlock, type OmadaSiteTabKey, type OmadaDeviceType, type OmadaDeviceStatus, type OmadaDeviceRecord, type OmadaDeviceListBlockProps, } from './blocks/OmadaDeviceListBlock';
|
|
3
3
|
export { OmadaWirelessNetworkBlock, type OmadaBandKey, type OmadaSecurityMode, type OmadaWirelessConfig, type OmadaWirelessNetworkBlockProps, } from './blocks/OmadaWirelessNetworkBlock';
|
|
4
4
|
export { DEFAULT_OMADA_INCIDENTS, OmadaIncidentsBlock, type OmadaIncidentCategory, type OmadaIncidentSeverity, type OmadaIncidentItem, type OmadaIncidentsBlockProps, } from './blocks/OmadaIncidentsBlock';
|
|
5
|
+
export { DEFAULT_OMADA_SCHEDULES, OmadaScheduleBlock, type OmadaScheduleTarget, type OmadaScheduleRule, type OmadaScheduleBlockProps, } from './blocks/OmadaScheduleBlock';
|
|
6
|
+
export { DEFAULT_OMADA_PORTS, OmadaPortPanelBlock, type OmadaPortMedia, type OmadaPortSpeed, type OmadaHardwarePort, type OmadaPortPanelBlockProps, } from './blocks/OmadaPortPanelBlock';
|
|
7
|
+
export { DEFAULT_TOPOLOGY_NODES, OmadaTopologyBlock, type OmadaTopologyNode, type OmadaTopologyBlockProps, } from './blocks/OmadaTopologyBlock';
|
|
8
|
+
export { DEFAULT_FIRMWARE_CANDIDATES, OmadaFirmwareUpdateBlock, type OmadaFirmwareCandidate, type OmadaFirmwareUpdateBlockProps, } from './blocks/OmadaFirmwareUpdateBlock';
|
|
5
9
|
export { OmadaLaunchLoadingPage, type OmadaLaunchLoadingPageProps, } from './pages/OmadaLaunchLoadingPage';
|
|
6
10
|
export { DEFAULT_OMADA_CONTROLLERS, OmadaControllerListPage, type OmadaControllerKind, type OmadaControllerItem, type OmadaControllerListPageProps, } from './pages/OmadaControllerListPage';
|
|
7
11
|
export { OmadaSiteDashboardPage, type OmadaSiteDashboardPageProps, } from './pages/OmadaSiteDashboardPage';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TPPhoneFrameProps } from '../../core/types';
|
|
3
3
|
import '../../styles/tp-omada.css';
|
|
4
|
-
export type OmadaAppScreenId = 'launch' | 'controllers' | 'dashboard' | 'insights' | 'devices' | 'clients' | 'settings' | 'health-detail' | 'device-detail' | 'wireless-settings' | 'incidents';
|
|
4
|
+
export type OmadaAppScreenId = 'launch' | 'controllers' | 'dashboard' | 'insights' | 'devices' | 'clients' | 'settings' | 'health-detail' | 'device-detail' | 'wireless-settings' | 'incidents' | 'schedule' | 'firmware' | 'topology' | 'port-panel';
|
|
5
5
|
export interface OmadaAppDemoProps {
|
|
6
6
|
initialScreen?: OmadaAppScreenId;
|
|
7
7
|
screen?: OmadaAppScreenId;
|