@chenyqthu/tp-mobile-ui-kit 0.0.0-stage → 0.2.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.
Files changed (113) hide show
  1. package/README.md +214 -2
  2. package/dist/assets.js +5 -0
  3. package/dist/catalog.json +12355 -0
  4. package/dist/chunks/OmadaAppDemo-BO8a6A-m.js +4910 -0
  5. package/dist/chunks/TPPrompt-DLd32rsN.js +3456 -0
  6. package/dist/chunks/asset-icons-BIenKvAh.js +7613 -0
  7. package/dist/chunks/asset-illustrations-YHXzEd7z.js +3086 -0
  8. package/dist/chunks/asset-logos-DAyGwOLj.js +59 -0
  9. package/dist/chunks/asset-motion-D7fWh_JS.js +376 -0
  10. package/dist/core.js +3 -0
  11. package/dist/index.js +7 -0
  12. package/dist/libpag.wasm +0 -0
  13. package/dist/omada.js +7 -0
  14. package/dist/standalone.js +3438 -0
  15. package/dist/style.css +2 -0
  16. package/dist/types/assets-lib/TPBrandLogo.d.ts +15 -0
  17. package/dist/types/assets-lib/TPIcon.d.ts +19 -0
  18. package/dist/types/assets-lib/TPIllustration.d.ts +17 -0
  19. package/dist/types/assets-lib/TPMotion.d.ts +25 -0
  20. package/dist/types/assets-lib/assetsManifest.d.ts +22 -0
  21. package/dist/types/assets-lib/iconsManifest.d.ts +14 -0
  22. package/dist/types/assets-lib/index.d.ts +8 -0
  23. package/dist/types/assets-lib/motionsManifest.d.ts +12 -0
  24. package/dist/types/assets-lib/runtimeUrl.d.ts +4 -0
  25. package/dist/types/core/components/TPActionSheet.d.ts +4 -0
  26. package/dist/types/core/components/TPAlert.d.ts +4 -0
  27. package/dist/types/core/components/TPAvatar.d.ts +7 -0
  28. package/dist/types/core/components/TPBadge.d.ts +7 -0
  29. package/dist/types/core/components/TPBottomSheet.d.ts +4 -0
  30. package/dist/types/core/components/TPButton.d.ts +4 -0
  31. package/dist/types/core/components/TPCheckbox.d.ts +11 -0
  32. package/dist/types/core/components/TPDatePicker.d.ts +7 -0
  33. package/dist/types/core/components/TPDaySwitcher.d.ts +7 -0
  34. package/dist/types/core/components/TPDivider.d.ts +7 -0
  35. package/dist/types/core/components/TPEmptyState.d.ts +7 -0
  36. package/dist/types/core/components/TPFixedButtonBar.d.ts +4 -0
  37. package/dist/types/core/components/TPFixedToast.d.ts +7 -0
  38. package/dist/types/core/components/TPHeader.d.ts +4 -0
  39. package/dist/types/core/components/TPIconButton.d.ts +11 -0
  40. package/dist/types/core/components/TPInput.d.ts +8 -0
  41. package/dist/types/core/components/TPKeyboard.d.ts +7 -0
  42. package/dist/types/core/components/TPLast7DaysPicker.d.ts +7 -0
  43. package/dist/types/core/components/TPLiquidGlass.d.ts +8 -0
  44. package/dist/types/core/components/TPListButton.d.ts +7 -0
  45. package/dist/types/core/components/TPListCard.d.ts +7 -0
  46. package/dist/types/core/components/TPListItem.d.ts +7 -0
  47. package/dist/types/core/components/TPMenu.d.ts +4 -0
  48. package/dist/types/core/components/TPMonthPicker.d.ts +7 -0
  49. package/dist/types/core/components/TPPageControl.d.ts +4 -0
  50. package/dist/types/core/components/TPPhoneFrame.d.ts +4 -0
  51. package/dist/types/core/components/TPPinInput.d.ts +7 -0
  52. package/dist/types/core/components/TPPopup.d.ts +4 -0
  53. package/dist/types/core/components/TPProgress.d.ts +7 -0
  54. package/dist/types/core/components/TPPrompt.d.ts +4 -0
  55. package/dist/types/core/components/TPRadio.d.ts +11 -0
  56. package/dist/types/core/components/TPSearchBar.d.ts +7 -0
  57. package/dist/types/core/components/TPSectionHeader.d.ts +7 -0
  58. package/dist/types/core/components/TPSectionNote.d.ts +7 -0
  59. package/dist/types/core/components/TPSegment.d.ts +4 -0
  60. package/dist/types/core/components/TPSkeleton.d.ts +7 -0
  61. package/dist/types/core/components/TPSlider.d.ts +4 -0
  62. package/dist/types/core/components/TPStatusBar.d.ts +4 -0
  63. package/dist/types/core/components/TPStepText.d.ts +7 -0
  64. package/dist/types/core/components/TPStepper.d.ts +7 -0
  65. package/dist/types/core/components/TPSwipeRow.d.ts +8 -0
  66. package/dist/types/core/components/TPSwitch.d.ts +4 -0
  67. package/dist/types/core/components/TPTabBar.d.ts +4 -0
  68. package/dist/types/core/components/TPTag.d.ts +7 -0
  69. package/dist/types/core/components/TPText.d.ts +7 -0
  70. package/dist/types/core/components/TPTimePicker.d.ts +7 -0
  71. package/dist/types/core/components/TPToast.d.ts +13 -0
  72. package/dist/types/core/components/TPTooltip.d.ts +7 -0
  73. package/dist/types/core/components/TPWheelPicker.d.ts +7 -0
  74. package/dist/types/core/index.d.ts +50 -0
  75. package/dist/types/core/types.d.ts +646 -0
  76. package/dist/types/lib/assets.d.ts +1 -0
  77. package/dist/types/lib/core.d.ts +2 -0
  78. package/dist/types/lib/index.d.ts +4 -0
  79. package/dist/types/lib/omada.d.ts +4 -0
  80. package/dist/types/lib/standalone.d.ts +8 -0
  81. package/dist/types/omada/blocks/OmadaDeviceListBlock.d.ts +42 -0
  82. package/dist/types/omada/blocks/OmadaFirmwareUpdateBlock.d.ts +23 -0
  83. package/dist/types/omada/blocks/OmadaIncidentsBlock.d.ts +26 -0
  84. package/dist/types/omada/blocks/OmadaPortPanelBlock.d.ts +31 -0
  85. package/dist/types/omada/blocks/OmadaScheduleBlock.d.ts +33 -0
  86. package/dist/types/omada/blocks/OmadaTopologyBlock.d.ts +26 -0
  87. package/dist/types/omada/blocks/OmadaWirelessNetworkBlock.d.ts +25 -0
  88. package/dist/types/omada/components/OmadaStandardInput.d.ts +23 -0
  89. package/dist/types/omada/index.d.ts +18 -0
  90. package/dist/types/omada/pages/OmadaAppDemo.d.ts +18 -0
  91. package/dist/types/omada/pages/OmadaControllerListPage.d.ts +26 -0
  92. package/dist/types/omada/pages/OmadaDeviceDetailPage.d.ts +15 -0
  93. package/dist/types/omada/pages/OmadaHealthDetailPage.d.ts +17 -0
  94. package/dist/types/omada/pages/OmadaLaunchLoadingPage.d.ts +24 -0
  95. package/dist/types/omada/pages/OmadaSiteClientsPage.d.ts +34 -0
  96. package/dist/types/omada/pages/OmadaSiteDashboardPage.d.ts +28 -0
  97. package/dist/types/omada/pages/OmadaSiteDevicesPage.d.ts +18 -0
  98. package/dist/types/omada/pages/OmadaSiteInsightsPage.d.ts +17 -0
  99. package/dist/types/omada/pages/OmadaSiteSettingsPage.d.ts +22 -0
  100. package/dist/types/theme/TPThemeProvider.d.ts +33 -0
  101. package/dist/types/theme/index.d.ts +2 -0
  102. package/dist/types/theme/tokens.d.ts +80 -0
  103. package/package.json +88 -4
  104. package/skills/tp-mobile-ui-kit/SKILL.md +226 -0
  105. package/skills/tp-mobile-ui-kit/references/catalog.json +12355 -0
  106. package/skills/tp-mobile-ui-kit/scripts/query-catalog.mjs +289 -0
  107. package/skills/tp-mobile-ui-kit/scripts/verify-demo.mjs +193 -0
  108. package/skills/tp-mobile-ui-kit/templates/multi-brand.html +319 -0
  109. package/skills/tp-mobile-ui-kit/templates/multi-brand.tsx +337 -0
  110. package/skills/tp-mobile-ui-kit/templates/omada-dashboard.html +138 -0
  111. package/skills/tp-mobile-ui-kit/templates/omada-dashboard.tsx +119 -0
  112. package/skills/tp-mobile-ui-kit/templates/omada-device-detail.html +158 -0
  113. package/skills/tp-mobile-ui-kit/templates/omada-device-detail.tsx +135 -0
@@ -0,0 +1,646 @@
1
+ import type React from 'react';
2
+ import type { TPPlatformOS, TPResolvedMode, TPScreenSize } from '../theme';
3
+ import type { TPIconName, TPIllustrationName } from '../assets-lib';
4
+ export interface TPPhoneFrameProps {
5
+ device?: 'iphone16pro' | 'iphone14' | 'android' | 'compact';
6
+ width?: number;
7
+ height?: number;
8
+ screenSize?: TPScreenSize;
9
+ showFrame?: boolean;
10
+ showDynamicIsland?: boolean;
11
+ showHomeIndicator?: boolean;
12
+ overlayTop?: boolean;
13
+ overlayBottom?: boolean;
14
+ statusBar?: React.ReactNode;
15
+ bottomBar?: React.ReactNode;
16
+ floatingAction?: React.ReactNode;
17
+ className?: string;
18
+ style?: React.CSSProperties;
19
+ children: React.ReactNode;
20
+ }
21
+ export interface TPLiquidGlassProps {
22
+ shape?: 'pill' | 'circle' | 'rounded';
23
+ tint?: 'clear' | 'brand' | 'dark';
24
+ interactive?: boolean;
25
+ as?: 'div' | 'button' | 'nav' | 'section';
26
+ ariaLabel?: string;
27
+ disabled?: boolean;
28
+ onClick?: (event: React.MouseEvent<HTMLElement>) => void;
29
+ className?: string;
30
+ style?: React.CSSProperties;
31
+ children?: React.ReactNode;
32
+ }
33
+ export interface TPStatusBarProps {
34
+ time?: string;
35
+ os?: TPPlatformOS;
36
+ carrier?: string;
37
+ signalStrength?: 1 | 2 | 3 | 4;
38
+ wifiStrength?: 1 | 2 | 3;
39
+ battery?: number;
40
+ muted?: boolean;
41
+ locationActive?: boolean;
42
+ transparent?: boolean;
43
+ className?: string;
44
+ style?: React.CSSProperties;
45
+ }
46
+ export interface TPHeaderProps {
47
+ title?: React.ReactNode;
48
+ subtitle?: React.ReactNode;
49
+ variant?: 'standard' | 'floating';
50
+ left?: React.ReactNode;
51
+ right?: React.ReactNode;
52
+ showBack?: boolean;
53
+ onBack?: () => void;
54
+ titleDropdown?: boolean;
55
+ onTitleClick?: () => void;
56
+ rightBadge?: number | string;
57
+ translucent?: boolean;
58
+ className?: string;
59
+ style?: React.CSSProperties;
60
+ }
61
+ export interface TPTabBarItem {
62
+ key: string;
63
+ label: string;
64
+ icon: TPIconName | React.ReactNode;
65
+ activeIcon?: TPIconName | React.ReactNode;
66
+ badge?: number | string | boolean;
67
+ }
68
+ export interface TPTabBarProps {
69
+ items: readonly TPTabBarItem[];
70
+ activeKey: string;
71
+ onChange: (key: string) => void;
72
+ variant?: 'floating-pill' | 'docked';
73
+ extraAction?: React.ReactNode;
74
+ className?: string;
75
+ style?: React.CSSProperties;
76
+ }
77
+ export interface TPSegmentOption {
78
+ key: string;
79
+ label: React.ReactNode;
80
+ badge?: number | string;
81
+ disabled?: boolean;
82
+ }
83
+ export interface TPSegmentProps {
84
+ options: readonly TPSegmentOption[];
85
+ value: string;
86
+ onChange: (key: string) => void;
87
+ variant?: 'underline' | 'pill';
88
+ fullWidth?: boolean;
89
+ className?: string;
90
+ style?: React.CSSProperties;
91
+ }
92
+ export interface TPPageControlProps {
93
+ total: number;
94
+ current: number;
95
+ onChange?: (index: number) => void;
96
+ className?: string;
97
+ style?: React.CSSProperties;
98
+ }
99
+ export interface TPButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
100
+ variant?: 'primary' | 'secondary' | 'text' | 'alert' | 'tonal' | 'in-card';
101
+ size?: 'lg' | 'md' | 'sm';
102
+ block?: boolean;
103
+ loading?: boolean;
104
+ htmlType?: 'button' | 'submit' | 'reset';
105
+ icon?: React.ReactNode;
106
+ }
107
+ export interface TPFixedButtonBarProps {
108
+ layout?: 'single' | 'dual-horizontal' | 'dual-vertical';
109
+ primaryText: string;
110
+ onPrimaryClick?: () => void;
111
+ primaryLoading?: boolean;
112
+ primaryDisabled?: boolean;
113
+ secondaryText?: string;
114
+ onSecondaryClick?: () => void;
115
+ secondaryVariant?: 'secondary' | 'text' | 'alert';
116
+ note?: React.ReactNode;
117
+ className?: string;
118
+ style?: React.CSSProperties;
119
+ }
120
+ export interface TPSwitchProps {
121
+ checked?: boolean;
122
+ defaultChecked?: boolean;
123
+ onChange?: (checked: boolean) => void;
124
+ disabled?: boolean;
125
+ loading?: boolean;
126
+ ariaLabel?: string;
127
+ className?: string;
128
+ style?: React.CSSProperties;
129
+ }
130
+ export interface TPSliderProps {
131
+ value?: number;
132
+ defaultValue?: number;
133
+ min?: number;
134
+ max?: number;
135
+ step?: number;
136
+ marks?: readonly {
137
+ value: number;
138
+ label?: string;
139
+ }[];
140
+ showValue?: boolean;
141
+ unit?: string;
142
+ disabled?: boolean;
143
+ range?: boolean;
144
+ rangeValue?: readonly [number, number];
145
+ defaultRangeValue?: readonly [number, number];
146
+ onRangeChange?: (value: [number, number]) => void;
147
+ onRangeAfterChange?: (value: [number, number]) => void;
148
+ onChange?: (value: number) => void;
149
+ onAfterChange?: (value: number) => void;
150
+ ariaLabel?: string;
151
+ className?: string;
152
+ style?: React.CSSProperties;
153
+ }
154
+ export interface TPListCardProps {
155
+ title?: React.ReactNode;
156
+ extra?: React.ReactNode;
157
+ radius?: 'theme' | 'lg';
158
+ padding?: 'none' | 'sm' | 'md';
159
+ divided?: boolean;
160
+ className?: string;
161
+ style?: React.CSSProperties;
162
+ children: React.ReactNode;
163
+ }
164
+ export interface TPListItemProps {
165
+ title: React.ReactNode;
166
+ subtitle?: React.ReactNode;
167
+ description?: React.ReactNode;
168
+ value?: React.ReactNode;
169
+ leading?: React.ReactNode;
170
+ trailing?: React.ReactNode;
171
+ badge?: number | string;
172
+ arrow?: boolean;
173
+ checked?: boolean;
174
+ switchProps?: TPSwitchProps;
175
+ danger?: boolean;
176
+ disabled?: boolean;
177
+ onClick?: () => void;
178
+ className?: string;
179
+ style?: React.CSSProperties;
180
+ }
181
+ export interface TPListButtonProps {
182
+ children: React.ReactNode;
183
+ tone?: 'primary' | 'alert' | 'neutral' | 'focus';
184
+ align?: 'center' | 'left';
185
+ disabled?: boolean;
186
+ onClick?: () => void;
187
+ className?: string;
188
+ style?: React.CSSProperties;
189
+ }
190
+ export interface TPSectionHeaderProps {
191
+ title: React.ReactNode;
192
+ count?: number | string;
193
+ action?: React.ReactNode;
194
+ className?: string;
195
+ style?: React.CSSProperties;
196
+ }
197
+ export interface TPSectionNoteProps {
198
+ children: React.ReactNode;
199
+ tone?: 'default' | 'warning' | 'alert';
200
+ className?: string;
201
+ style?: React.CSSProperties;
202
+ }
203
+ export interface TPTextProps {
204
+ variant?: 'title1' | 'title2' | 'title3' | 'title4' | 'body' | 'subhead' | 'caption' | 'footnote';
205
+ tone?: 'primary' | 'secondary' | 'secondary-alt' | 'disabled' | 'focus' | 'highlighted' | 'alert' | 'success' | 'warning';
206
+ as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4';
207
+ weight?: 'light' | 'regular' | 'medium' | 'semibold' | 'bold';
208
+ className?: string;
209
+ style?: React.CSSProperties;
210
+ children: React.ReactNode;
211
+ }
212
+ export interface TPTagProps {
213
+ children: React.ReactNode;
214
+ tone?: 'focus' | 'neutral' | 'success' | 'warning' | 'alert' | 'info';
215
+ selected?: boolean;
216
+ size?: 'sm' | 'md';
217
+ closable?: boolean;
218
+ onClose?: () => void;
219
+ onClick?: () => void;
220
+ className?: string;
221
+ style?: React.CSSProperties;
222
+ }
223
+ export interface TPBadgeProps {
224
+ count?: number | string;
225
+ dot?: boolean;
226
+ tone?: 'alert' | 'focus' | 'warning' | 'neutral';
227
+ max?: number;
228
+ showZero?: boolean;
229
+ children?: React.ReactNode;
230
+ className?: string;
231
+ style?: React.CSSProperties;
232
+ }
233
+ export interface TPEmptyStateProps {
234
+ illustration?: TPIllustrationName;
235
+ theme?: TPResolvedMode;
236
+ icon?: React.ReactNode;
237
+ title: React.ReactNode;
238
+ description?: React.ReactNode;
239
+ actionText?: string;
240
+ onAction?: () => void;
241
+ compact?: boolean;
242
+ className?: string;
243
+ style?: React.CSSProperties;
244
+ }
245
+ export interface TPInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'prefix'> {
246
+ variant?: 'standard' | 'list' | 'borderless' | 'icon';
247
+ label?: React.ReactNode;
248
+ value?: string;
249
+ defaultValue?: string;
250
+ onChange?: (value: string) => void;
251
+ clearable?: boolean;
252
+ password?: boolean;
253
+ multiline?: boolean;
254
+ rows?: number;
255
+ error?: string;
256
+ helperText?: string;
257
+ prefix?: React.ReactNode;
258
+ suffix?: React.ReactNode;
259
+ containerClassName?: string;
260
+ }
261
+ export interface TPSearchBarProps {
262
+ value?: string;
263
+ defaultValue?: string;
264
+ placeholder?: string;
265
+ onChange?: (value: string) => void;
266
+ onSearch?: (value: string) => void;
267
+ onCancel?: () => void;
268
+ showCancel?: boolean;
269
+ autoFocus?: boolean;
270
+ className?: string;
271
+ style?: React.CSSProperties;
272
+ }
273
+ export interface TPWheelPickerColumn {
274
+ key: string;
275
+ options: readonly {
276
+ value: string;
277
+ label: string;
278
+ }[];
279
+ value: string;
280
+ }
281
+ export interface TPWheelPickerProps {
282
+ columns: readonly TPWheelPickerColumn[];
283
+ onChange: (key: string, value: string) => void;
284
+ itemHeight?: number;
285
+ visibleItems?: 3 | 5;
286
+ className?: string;
287
+ style?: React.CSSProperties;
288
+ }
289
+ export interface TPDatePickerProps {
290
+ value?: Date;
291
+ defaultValue?: Date;
292
+ minYear?: number;
293
+ maxYear?: number;
294
+ onChange?: (date: Date) => void;
295
+ onConfirm?: (date: Date) => void;
296
+ onCancel?: () => void;
297
+ title?: string;
298
+ className?: string;
299
+ style?: React.CSSProperties;
300
+ }
301
+ export interface TPTimePickerProps {
302
+ value?: {
303
+ hour: number;
304
+ minute: number;
305
+ period?: 'AM' | 'PM';
306
+ };
307
+ use12Hour?: boolean;
308
+ minuteStep?: number;
309
+ onChange?: (val: {
310
+ hour: number;
311
+ minute: number;
312
+ period?: 'AM' | 'PM';
313
+ }) => void;
314
+ className?: string;
315
+ style?: React.CSSProperties;
316
+ }
317
+ export type TPDayKey = 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat';
318
+ export interface TPDaySwitcherProps {
319
+ value?: readonly TPDayKey[];
320
+ defaultValue?: readonly TPDayKey[];
321
+ onChange?: (days: TPDayKey[]) => void;
322
+ disabled?: boolean;
323
+ locale?: 'en' | 'zh';
324
+ className?: string;
325
+ style?: React.CSSProperties;
326
+ }
327
+ export interface TPKeyboardProps {
328
+ mode?: 'numeric' | 'pin' | 'mac-hex';
329
+ onKeyPress?: (key: string) => void;
330
+ onBackspace?: () => void;
331
+ onDone?: () => void;
332
+ doneLabel?: string;
333
+ showDot?: boolean;
334
+ showDash?: boolean;
335
+ className?: string;
336
+ style?: React.CSSProperties;
337
+ }
338
+ export interface TPAlertAction {
339
+ label: string;
340
+ role?: 'default' | 'cancel' | 'destructive';
341
+ onClick?: (inputValue?: string) => void;
342
+ }
343
+ export interface TPAlertProps {
344
+ open: boolean;
345
+ title?: React.ReactNode;
346
+ message?: React.ReactNode;
347
+ actions: readonly TPAlertAction[];
348
+ os?: TPPlatformOS;
349
+ inputPlaceholder?: string;
350
+ defaultInputValue?: string;
351
+ onClose?: () => void;
352
+ children?: React.ReactNode;
353
+ }
354
+ export interface TPActionSheetOption {
355
+ key: string;
356
+ label: React.ReactNode;
357
+ description?: React.ReactNode;
358
+ icon?: React.ReactNode;
359
+ destructive?: boolean;
360
+ disabled?: boolean;
361
+ selected?: boolean;
362
+ }
363
+ export interface TPActionSheetProps {
364
+ open: boolean;
365
+ title?: React.ReactNode;
366
+ message?: React.ReactNode;
367
+ options: readonly TPActionSheetOption[];
368
+ cancelText?: string;
369
+ os?: TPPlatformOS;
370
+ onSelect: (option: TPActionSheetOption) => void;
371
+ onClose: () => void;
372
+ }
373
+ export interface TPBottomSheetProps {
374
+ open: boolean;
375
+ title?: React.ReactNode;
376
+ subtitle?: React.ReactNode;
377
+ onClose: () => void;
378
+ showCloseButton?: boolean;
379
+ showGrabber?: boolean;
380
+ footer?: React.ReactNode;
381
+ maxHeight?: number | string;
382
+ children: React.ReactNode;
383
+ }
384
+ export interface TPPopupProps {
385
+ open: boolean;
386
+ placement?: 'center' | 'top' | 'bottom';
387
+ title?: React.ReactNode;
388
+ closable?: boolean;
389
+ maskClosable?: boolean;
390
+ onClose: () => void;
391
+ footer?: React.ReactNode;
392
+ className?: string;
393
+ style?: React.CSSProperties;
394
+ children: React.ReactNode;
395
+ }
396
+ export interface TPMenuItem {
397
+ key: string;
398
+ label: React.ReactNode;
399
+ icon?: React.ReactNode;
400
+ selected?: boolean;
401
+ danger?: boolean;
402
+ disabled?: boolean;
403
+ dividerBefore?: boolean;
404
+ }
405
+ export interface TPMenuProps {
406
+ open: boolean;
407
+ items: readonly TPMenuItem[];
408
+ onSelect: (item: TPMenuItem) => void;
409
+ onClose: () => void;
410
+ align?: 'left' | 'right' | 'center';
411
+ className?: string;
412
+ style?: React.CSSProperties;
413
+ }
414
+ export type TPToastType = 'default' | 'info' | 'success' | 'warning' | 'error' | 'loading';
415
+ export interface TPToastProps {
416
+ open?: boolean;
417
+ type?: TPToastType;
418
+ message: React.ReactNode;
419
+ duration?: number;
420
+ position?: 'top' | 'center' | 'bottom';
421
+ onClose?: () => void;
422
+ className?: string;
423
+ style?: React.CSSProperties;
424
+ }
425
+ export interface TPPromptProps {
426
+ tone?: 'info' | 'focus' | 'warning' | 'alert';
427
+ title: React.ReactNode;
428
+ actionLabel?: string;
429
+ onAction?: () => void;
430
+ closable?: boolean;
431
+ onClose?: () => void;
432
+ icon?: React.ReactNode;
433
+ className?: string;
434
+ style?: React.CSSProperties;
435
+ }
436
+ export interface TPIconButtonProps {
437
+ icon: TPIconName | React.ReactNode;
438
+ variant?: 'glass' | 'filled' | 'tonal' | 'ghost';
439
+ size?: 'sm' | 'md' | 'lg';
440
+ badge?: number | string | boolean;
441
+ disabled?: boolean;
442
+ ariaLabel: string;
443
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
444
+ className?: string;
445
+ style?: React.CSSProperties;
446
+ }
447
+ export interface TPIconButtonGroupProps {
448
+ variant?: 'glass' | 'solid';
449
+ children: React.ReactNode;
450
+ className?: string;
451
+ style?: React.CSSProperties;
452
+ }
453
+ export interface TPCheckboxProps {
454
+ checked?: boolean;
455
+ defaultChecked?: boolean;
456
+ indeterminate?: boolean;
457
+ disabled?: boolean;
458
+ label?: React.ReactNode;
459
+ description?: React.ReactNode;
460
+ onChange?: (checked: boolean) => void;
461
+ ariaLabel?: string;
462
+ className?: string;
463
+ style?: React.CSSProperties;
464
+ }
465
+ export interface TPCheckboxOption {
466
+ value: string;
467
+ label: React.ReactNode;
468
+ description?: React.ReactNode;
469
+ disabled?: boolean;
470
+ }
471
+ export interface TPCheckboxGroupProps {
472
+ options: readonly TPCheckboxOption[];
473
+ value?: readonly string[];
474
+ defaultValue?: readonly string[];
475
+ onChange?: (values: string[]) => void;
476
+ direction?: 'vertical' | 'horizontal';
477
+ disabled?: boolean;
478
+ className?: string;
479
+ style?: React.CSSProperties;
480
+ }
481
+ export interface TPRadioProps {
482
+ checked?: boolean;
483
+ defaultChecked?: boolean;
484
+ disabled?: boolean;
485
+ label?: React.ReactNode;
486
+ description?: React.ReactNode;
487
+ value?: string;
488
+ name?: string;
489
+ onChange?: (checked: boolean) => void;
490
+ ariaLabel?: string;
491
+ className?: string;
492
+ style?: React.CSSProperties;
493
+ }
494
+ export interface TPRadioOption {
495
+ value: string;
496
+ label: React.ReactNode;
497
+ description?: React.ReactNode;
498
+ disabled?: boolean;
499
+ }
500
+ export interface TPRadioGroupProps {
501
+ options: readonly TPRadioOption[];
502
+ value?: string;
503
+ defaultValue?: string;
504
+ onChange?: (value: string) => void;
505
+ direction?: 'vertical' | 'horizontal';
506
+ disabled?: boolean;
507
+ name?: string;
508
+ className?: string;
509
+ style?: React.CSSProperties;
510
+ }
511
+ export interface TPSwipeAction {
512
+ key: string;
513
+ label: React.ReactNode;
514
+ tone?: 'neutral' | 'focus' | 'warning' | 'alert';
515
+ onClick?: () => void;
516
+ }
517
+ export interface TPSwipeRowProps {
518
+ actions: readonly TPSwipeAction[];
519
+ open?: boolean;
520
+ defaultOpen?: boolean;
521
+ onOpenChange?: (open: boolean) => void;
522
+ disabled?: boolean;
523
+ children: React.ReactNode;
524
+ className?: string;
525
+ style?: React.CSSProperties;
526
+ }
527
+ export interface TPTooltipProps {
528
+ content: React.ReactNode;
529
+ arrowPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'left' | 'right';
530
+ contextAdaptive?: boolean;
531
+ open?: boolean;
532
+ defaultOpen?: boolean;
533
+ onOpenChange?: (open: boolean) => void;
534
+ children?: React.ReactNode;
535
+ className?: string;
536
+ style?: React.CSSProperties;
537
+ }
538
+ export interface TPFixedToastProps {
539
+ status?: 'default' | 'info' | 'success' | 'warning' | 'danger';
540
+ action?: 'none' | 'close' | 'go-to' | 'button';
541
+ actionLabel?: string;
542
+ onAction?: () => void;
543
+ onClose?: () => void;
544
+ message: React.ReactNode;
545
+ className?: string;
546
+ style?: React.CSSProperties;
547
+ }
548
+ export interface TPMonthPickerValue {
549
+ year: number;
550
+ month: number;
551
+ }
552
+ export interface TPMonthPickerProps {
553
+ value?: TPMonthPickerValue;
554
+ defaultValue?: TPMonthPickerValue;
555
+ minYear?: number;
556
+ maxYear?: number;
557
+ locale?: 'en' | 'zh';
558
+ onChange?: (val: TPMonthPickerValue) => void;
559
+ className?: string;
560
+ style?: React.CSSProperties;
561
+ }
562
+ export interface TPLast7DaysPickerProps {
563
+ value?: Date;
564
+ defaultValue?: Date;
565
+ referenceDate?: Date;
566
+ markedDates?: readonly string[];
567
+ locale?: 'en' | 'zh';
568
+ onChange?: (date: Date) => void;
569
+ className?: string;
570
+ style?: React.CSSProperties;
571
+ }
572
+ export interface TPStepTextItem {
573
+ key?: string;
574
+ title?: React.ReactNode;
575
+ text: React.ReactNode;
576
+ note?: React.ReactNode;
577
+ }
578
+ export interface TPStepTextProps {
579
+ variant?: 'step' | 'numbered' | 'bullet';
580
+ items: readonly TPStepTextItem[];
581
+ className?: string;
582
+ style?: React.CSSProperties;
583
+ }
584
+ export interface TPProgressProps {
585
+ variant?: 'linear' | 'circular';
586
+ percent: number;
587
+ tone?: 'focus' | 'success' | 'warning' | 'alert' | 'info';
588
+ size?: number;
589
+ strokeWidth?: number;
590
+ showValue?: boolean;
591
+ label?: React.ReactNode;
592
+ className?: string;
593
+ style?: React.CSSProperties;
594
+ }
595
+ export interface TPSkeletonProps {
596
+ variant?: 'text' | 'rect' | 'circle' | 'card';
597
+ width?: number | string;
598
+ height?: number | string;
599
+ lines?: number;
600
+ animated?: boolean;
601
+ className?: string;
602
+ style?: React.CSSProperties;
603
+ }
604
+ export interface TPStepperItem {
605
+ key: string;
606
+ title: React.ReactNode;
607
+ description?: React.ReactNode;
608
+ }
609
+ export interface TPStepperProps {
610
+ steps: readonly TPStepperItem[];
611
+ current: number;
612
+ direction?: 'horizontal' | 'vertical';
613
+ className?: string;
614
+ style?: React.CSSProperties;
615
+ }
616
+ export interface TPDividerProps {
617
+ inset?: boolean;
618
+ label?: React.ReactNode;
619
+ spacing?: 'sm' | 'md' | 'lg';
620
+ className?: string;
621
+ style?: React.CSSProperties;
622
+ }
623
+ export interface TPAvatarProps {
624
+ src?: string;
625
+ name?: string;
626
+ icon?: TPIconName | React.ReactNode;
627
+ size?: 'sm' | 'md' | 'lg';
628
+ status?: 'online' | 'offline' | 'busy' | 'none';
629
+ shape?: 'circle' | 'rounded';
630
+ alt?: string;
631
+ className?: string;
632
+ style?: React.CSSProperties;
633
+ }
634
+ export interface TPPinInputProps {
635
+ length?: number;
636
+ value?: string;
637
+ defaultValue?: string;
638
+ masked?: boolean;
639
+ error?: string;
640
+ disabled?: boolean;
641
+ onChange?: (value: string) => void;
642
+ onComplete?: (value: string) => void;
643
+ ariaLabel?: string;
644
+ className?: string;
645
+ style?: React.CSSProperties;
646
+ }
@@ -0,0 +1 @@
1
+ export * from '../assets-lib';
@@ -0,0 +1,2 @@
1
+ export * from '../theme';
2
+ export * from '../core';
@@ -0,0 +1,4 @@
1
+ export * from '../theme';
2
+ export * from '../assets-lib';
3
+ export * from '../core';
4
+ export * from '../omada';
@@ -0,0 +1,4 @@
1
+ export * from '../theme';
2
+ export * from '../assets-lib';
3
+ export * from '../core';
4
+ export * from '../omada';
@@ -0,0 +1,8 @@
1
+ import * as ReactNS from 'react';
2
+ import * as ReactDOMNS from 'react-dom/client';
3
+ export * from './index';
4
+ export { ReactNS as React, ReactDOMNS as ReactDOM };
5
+ /**
6
+ * Convenience mount helper for zero-build single-file HTML demos (`window.TPMobileUI.render(...)`).
7
+ */
8
+ export declare function render(element: ReactNS.ReactElement, target?: string | HTMLElement): ReactDOMNS.Root;