@anker-in/ui 0.1.4 → 0.1.8

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/dist/index.css CHANGED
@@ -30,4 +30,7 @@
30
30
  .antd-mobile-isolated-container .antdMobileScope [class*=adm-] {
31
31
  all: revert;
32
32
  }
33
+ .antd-mobile-isolated-container .antdMobileScope .adm-list-item-content-arrow {
34
+ display: none !important;
35
+ }
33
36
  /*# sourceMappingURL=index.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DemoRoom/components/RoomsList.module.css"],"sourcesContent":["/* antd-mobile 样式隔离 - 使用更强的隔离策略 */\n.antdMobileScope {\n /* 重置所有继承样式,但保持布局相关属性 */\n all: unset;\n\n /* 恢复必要的属性 */\n display: block;\n position: absolute;\n box-sizing: border-box;\n\n /* 阻止继承字体样式 */\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #333;\n\n /* 重置 CSS 变量影响 */\n --adm-color-primary: #1677ff;\n --adm-color-text: #333333;\n --adm-font-size-main: 14px;\n}\n\n/* 确保 antd-mobile 组件内部样式正常工作 */\n.antdMobileScope *,\n.antdMobileScope *::before,\n.antdMobileScope *::after {\n box-sizing: border-box;\n}\n\n/* 阻止全局样式继承 */\n.antd-mobile-isolated-container .antdMobileScope :not([class*=\"adm-\"]) {\n all: unset;\n}\n\n/* 保持 antd-mobile 组件样式 */\n.antd-mobile-isolated-container .antdMobileScope [class*=\"adm-\"] {\n all: revert;\n}\n"],"mappings":";AACA,CAAC;AAEC,OAAK;AAGL,WAAS;AACT,YAAU;AACV,cAAY;AAGZ;AAAA,IAAa,aAAa;AAAA,IAAE,kBAAkB;AAAA,IAAE,UAAU;AAAA,IAAE,MAAM;AAAA,IAAE,gBAAgB;AAAA,IAAE,KAAK;AAAA,IAAE;AAC7F,aAAW;AACX,eAAa;AACb,SAAO;AAGP,uBAAqB;AACrB,oBAAkB;AAClB,wBAAsB;AACxB;AAGA,CAtBC,gBAsBgB;AACjB,CAvBC,gBAuBgB,CAAC;AAClB,CAxBC,gBAwBgB,CAAC;AAChB,cAAY;AACd;AAGA,CAAC,+BAA+B,CA7B/B,gBA6BgD,KAAK,CAAC;AACrD,OAAK;AACP;AAGA,CALC,+BAK+B,CAlC/B,gBAkCgD,CAAC;AAChD,OAAK;AACP;","names":[]}
1
+ {"version":3,"sources":["../src/components/DemoRoom/components/RoomsList.module.css"],"sourcesContent":["/* antd-mobile 样式隔离 - 使用更强的隔离策略 */\n.antdMobileScope {\n /* 重置所有继承样式,但保持布局相关属性 */\n all: unset;\n\n /* 恢复必要的属性 */\n display: block;\n position: absolute;\n box-sizing: border-box;\n\n /* 阻止继承字体样式 */\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #333;\n\n /* 重置 CSS 变量影响 */\n --adm-color-primary: #1677ff;\n --adm-color-text: #333333;\n --adm-font-size-main: 14px;\n}\n\n/* 确保 antd-mobile 组件内部样式正常工作 */\n.antdMobileScope *,\n.antdMobileScope *::before,\n.antdMobileScope *::after {\n box-sizing: border-box;\n}\n\n/* 阻止全局样式继承 */\n.antd-mobile-isolated-container .antdMobileScope :not([class*=\"adm-\"]) {\n all: unset;\n}\n\n/* 保持 antd-mobile 组件样式 */\n.antd-mobile-isolated-container .antdMobileScope [class*=\"adm-\"] {\n all: revert;\n}\n\n/* 隐藏 List.Item 的右侧箭头 */\n.antd-mobile-isolated-container .antdMobileScope .adm-list-item-content-arrow {\n display: none !important;\n}\n"],"mappings":";AACA,CAAC;AAEC,OAAK;AAGL,WAAS;AACT,YAAU;AACV,cAAY;AAGZ;AAAA,IAAa,aAAa;AAAA,IAAE,kBAAkB;AAAA,IAAE,UAAU;AAAA,IAAE,MAAM;AAAA,IAAE,gBAAgB;AAAA,IAAE,KAAK;AAAA,IAAE;AAC7F,aAAW;AACX,eAAa;AACb,SAAO;AAGP,uBAAqB;AACrB,oBAAkB;AAClB,wBAAsB;AACxB;AAGA,CAtBC,gBAsBgB;AACjB,CAvBC,gBAuBgB,CAAC;AAClB,CAxBC,gBAwBgB,CAAC;AAChB,cAAY;AACd;AAGA,CAAC,+BAA+B,CA7B/B,gBA6BgD,KAAK,CAAC;AACrD,OAAK;AACP;AAGA,CALC,+BAK+B,CAlC/B,gBAkCgD,CAAC;AAChD,OAAK;AACP;AAGA,CAVC,+BAU+B,CAvC/B,gBAuCgD,CAAC;AAChD,WAAS;AACX;","names":[]}
package/dist/index.d.mts CHANGED
@@ -1,8 +1,109 @@
1
- export { D as DemoRoom, a as DemoRoomProps } from './DemoRoom-CZyrsxWe.mjs';
1
+ export { D as DemoRoom, a as DemoRoomProps } from './DemoRoom-Dx3PluHP.mjs';
2
2
  import React from 'react';
3
3
  export { ThemeProvider, useTheme } from './theme.mjs';
4
4
  import { ClassValue } from 'clsx';
5
5
 
6
+ /**
7
+ * BookingForm 页面的可配置数据类型
8
+ */
9
+ interface BookingFormPageData {
10
+ /**
11
+ * DemoRoomDetail 相关文案
12
+ */
13
+ demoRoomDetail?: {
14
+ loadingText?: string;
15
+ errorTitle?: string;
16
+ openInGoogleMaps?: string;
17
+ demoRoomImages?: string;
18
+ };
19
+ /**
20
+ * DateTimePicker 相关文案
21
+ */
22
+ dateTimePicker?: {
23
+ scheduleYourVisit?: string;
24
+ timeSlot?: string;
25
+ loadingTimeSlots?: string;
26
+ failedToLoadTimeSlots?: string;
27
+ noAvailableTimeSlots?: string;
28
+ full?: string;
29
+ spotsLeft?: string;
30
+ fillOutForm?: string;
31
+ loadingQuestionnaire?: string;
32
+ bookingFailed?: string;
33
+ };
34
+ /**
35
+ * QuestionnaireForm 相关文案
36
+ */
37
+ questionnaireForm?: {
38
+ submit?: string;
39
+ submitting?: string;
40
+ agrees?: string[];
41
+ };
42
+ }
43
+ /**
44
+ * BookingSuccess 页面的可配置数据类型
45
+ */
46
+ interface BookingSuccessPageData {
47
+ /**
48
+ * 页面标题
49
+ */
50
+ yourAppointment?: string;
51
+ /**
52
+ * 取消状态横幅文案
53
+ */
54
+ appointmentCanceled?: string;
55
+ /**
56
+ * 重新预约按钮
57
+ */
58
+ scheduleAgain?: string;
59
+ /**
60
+ * 位置标题
61
+ */
62
+ location?: string;
63
+ /**
64
+ * 地图链接文案
65
+ */
66
+ openInGoogleMaps?: string;
67
+ /**
68
+ * 日期时间标题
69
+ */
70
+ dateAndTime?: string;
71
+ /**
72
+ * 活动标题
73
+ */
74
+ event?: string;
75
+ /**
76
+ * Demo Room 标题
77
+ */
78
+ demoRoom?: string;
79
+ /**
80
+ * 访客信息标题
81
+ */
82
+ visitorInfo?: string;
83
+ /**
84
+ * 没有提供电话
85
+ */
86
+ noPhoneProvided?: string;
87
+ /**
88
+ * 取消预约按钮
89
+ */
90
+ cancelAppointment?: string;
91
+ /**
92
+ * 取消确认对话框
93
+ */
94
+ cancelDialog?: {
95
+ title?: string;
96
+ description?: string;
97
+ backButton?: string;
98
+ confirmButton?: string;
99
+ canceling?: string;
100
+ };
101
+ /**
102
+ * 取消错误信息
103
+ */
104
+ cancelError?: string;
105
+ }
106
+
6
107
  interface BookingFormProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
7
108
  layoutClassName?: string;
8
109
  handleBookingSuccess?: (token?: string) => void;
@@ -22,6 +123,10 @@ interface BookingFormProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
22
123
  * 时区(可选)
23
124
  */
24
125
  timezone?: string;
126
+ /**
127
+ * 页面可配置数据(文案、图标等)
128
+ */
129
+ pageData?: BookingFormPageData;
25
130
  }
26
131
  declare const BookingForm: React.FC<BookingFormProps>;
27
132
 
@@ -44,11 +149,17 @@ interface Timeslot {
44
149
  booked_count: number;
45
150
  status: TimeslotStatus;
46
151
  }
152
+ interface DemoRoomLocation {
153
+ country: string;
154
+ state: string;
155
+ city: string;
156
+ }
47
157
  interface DemoRoom {
48
158
  code: string;
49
159
  name: string;
50
160
  description: string;
51
161
  address: string;
162
+ location?: DemoRoomLocation;
52
163
  type: DemoRoomType;
53
164
  capacity: number;
54
165
  status: DemoRoomStatus;
@@ -204,52 +315,17 @@ declare class DemoRoomApiClient {
204
315
  }
205
316
  declare function createDemoRoomApi(config: DemoRoomApiConfig): DemoRoomApiClient;
206
317
 
207
- interface DemoRoomDetailProps extends React.HTMLAttributes<HTMLDivElement> {
208
- /**
209
- * API client for fetching demo room details
210
- */
211
- apiClient?: DemoRoomApiClient;
212
- /**
213
- * Demo room code to fetch details
214
- */
215
- demoRoomCode?: string;
216
- /**
217
- * Locale for API request
218
- */
219
- locale?: string;
220
- /**
221
- * Room title (fallback if not using API)
222
- */
223
- title?: string;
224
- /**
225
- * Room description paragraphs (fallback if not using API)
226
- */
227
- descriptions?: string[];
228
- /**
229
- * Device models available (fallback if not using API)
230
- */
231
- devices?: string;
232
- /**
233
- * Room address (fallback if not using API)
234
- */
235
- address?: string;
236
- /**
237
- * Google Maps link
238
- */
239
- mapsLink?: string;
240
- /**
241
- * Room images (fallback if not using API)
242
- */
243
- images?: string[];
244
- }
245
- declare const DemoRoomDetail: React.FC<DemoRoomDetailProps>;
246
-
247
318
  interface BookingSuccessProps {
248
319
  bookingData?: Booking;
249
320
  token?: string;
250
321
  apiConfig?: DemoRoomApiConfig;
251
322
  onScheduleAgain?: () => void;
323
+ onCancelSuccess?: (booking: Booking) => void;
252
324
  className?: string;
325
+ /**
326
+ * 页面可配置数据(文案、图标等)
327
+ */
328
+ pageData?: BookingSuccessPageData;
253
329
  }
254
330
  declare const BookingSuccess: React.FC<BookingSuccessProps>;
255
331
 
@@ -317,4 +393,4 @@ declare function useCancelBooking(client: DemoRoomApiClient): {
317
393
 
318
394
  declare function cn(...inputs: ClassValue[]): string;
319
395
 
320
- export { ApiError, ApiErrorCode, type ApiResponse, type Booking, BookingForm, type BookingFormProps, type BookingStatus, BookingSuccess, type BookingSuccessProps, type CancelBookingResponse, type CreateBookingRequest, DemoRoomApiClient, type DemoRoomApiConfig, type DemoRoom as DemoRoomData, DemoRoomDetail, type DemoRoomDetailProps, type DemoRoomStatus, type DemoRoomType, type GetBookingResponse, type GetDemoRoomsResponse, type GetTimeslotsResponse, type Question, type QuestionOption, type QuestionType, type Questionnaire, type Timeslot, type TimeslotStatus, cn, createDemoRoomApi, useBooking, useCancelBooking, useCreateBooking, useDemoRoom, useDemoRooms, useQuestionnaire, useTimeslots };
396
+ export { ApiError, ApiErrorCode, type ApiResponse, type Booking, BookingForm, type BookingFormProps, type BookingStatus, BookingSuccess, type BookingSuccessProps, type CancelBookingResponse, type CreateBookingRequest, DemoRoomApiClient, type DemoRoomApiConfig, type DemoRoom as DemoRoomData, type DemoRoomStatus, type DemoRoomType, type GetBookingResponse, type GetDemoRoomsResponse, type GetTimeslotsResponse, type Question, type QuestionOption, type QuestionType, type Questionnaire, type Timeslot, type TimeslotStatus, cn, createDemoRoomApi, useBooking, useCancelBooking, useCreateBooking, useDemoRoom, useDemoRooms, useQuestionnaire, useTimeslots };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,109 @@
1
- export { D as DemoRoom, a as DemoRoomProps } from './DemoRoom-CZyrsxWe.js';
1
+ export { D as DemoRoom, a as DemoRoomProps } from './DemoRoom-Dx3PluHP.js';
2
2
  import React from 'react';
3
3
  export { ThemeProvider, useTheme } from './theme.js';
4
4
  import { ClassValue } from 'clsx';
5
5
 
6
+ /**
7
+ * BookingForm 页面的可配置数据类型
8
+ */
9
+ interface BookingFormPageData {
10
+ /**
11
+ * DemoRoomDetail 相关文案
12
+ */
13
+ demoRoomDetail?: {
14
+ loadingText?: string;
15
+ errorTitle?: string;
16
+ openInGoogleMaps?: string;
17
+ demoRoomImages?: string;
18
+ };
19
+ /**
20
+ * DateTimePicker 相关文案
21
+ */
22
+ dateTimePicker?: {
23
+ scheduleYourVisit?: string;
24
+ timeSlot?: string;
25
+ loadingTimeSlots?: string;
26
+ failedToLoadTimeSlots?: string;
27
+ noAvailableTimeSlots?: string;
28
+ full?: string;
29
+ spotsLeft?: string;
30
+ fillOutForm?: string;
31
+ loadingQuestionnaire?: string;
32
+ bookingFailed?: string;
33
+ };
34
+ /**
35
+ * QuestionnaireForm 相关文案
36
+ */
37
+ questionnaireForm?: {
38
+ submit?: string;
39
+ submitting?: string;
40
+ agrees?: string[];
41
+ };
42
+ }
43
+ /**
44
+ * BookingSuccess 页面的可配置数据类型
45
+ */
46
+ interface BookingSuccessPageData {
47
+ /**
48
+ * 页面标题
49
+ */
50
+ yourAppointment?: string;
51
+ /**
52
+ * 取消状态横幅文案
53
+ */
54
+ appointmentCanceled?: string;
55
+ /**
56
+ * 重新预约按钮
57
+ */
58
+ scheduleAgain?: string;
59
+ /**
60
+ * 位置标题
61
+ */
62
+ location?: string;
63
+ /**
64
+ * 地图链接文案
65
+ */
66
+ openInGoogleMaps?: string;
67
+ /**
68
+ * 日期时间标题
69
+ */
70
+ dateAndTime?: string;
71
+ /**
72
+ * 活动标题
73
+ */
74
+ event?: string;
75
+ /**
76
+ * Demo Room 标题
77
+ */
78
+ demoRoom?: string;
79
+ /**
80
+ * 访客信息标题
81
+ */
82
+ visitorInfo?: string;
83
+ /**
84
+ * 没有提供电话
85
+ */
86
+ noPhoneProvided?: string;
87
+ /**
88
+ * 取消预约按钮
89
+ */
90
+ cancelAppointment?: string;
91
+ /**
92
+ * 取消确认对话框
93
+ */
94
+ cancelDialog?: {
95
+ title?: string;
96
+ description?: string;
97
+ backButton?: string;
98
+ confirmButton?: string;
99
+ canceling?: string;
100
+ };
101
+ /**
102
+ * 取消错误信息
103
+ */
104
+ cancelError?: string;
105
+ }
106
+
6
107
  interface BookingFormProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
7
108
  layoutClassName?: string;
8
109
  handleBookingSuccess?: (token?: string) => void;
@@ -22,6 +123,10 @@ interface BookingFormProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
22
123
  * 时区(可选)
23
124
  */
24
125
  timezone?: string;
126
+ /**
127
+ * 页面可配置数据(文案、图标等)
128
+ */
129
+ pageData?: BookingFormPageData;
25
130
  }
26
131
  declare const BookingForm: React.FC<BookingFormProps>;
27
132
 
@@ -44,11 +149,17 @@ interface Timeslot {
44
149
  booked_count: number;
45
150
  status: TimeslotStatus;
46
151
  }
152
+ interface DemoRoomLocation {
153
+ country: string;
154
+ state: string;
155
+ city: string;
156
+ }
47
157
  interface DemoRoom {
48
158
  code: string;
49
159
  name: string;
50
160
  description: string;
51
161
  address: string;
162
+ location?: DemoRoomLocation;
52
163
  type: DemoRoomType;
53
164
  capacity: number;
54
165
  status: DemoRoomStatus;
@@ -204,52 +315,17 @@ declare class DemoRoomApiClient {
204
315
  }
205
316
  declare function createDemoRoomApi(config: DemoRoomApiConfig): DemoRoomApiClient;
206
317
 
207
- interface DemoRoomDetailProps extends React.HTMLAttributes<HTMLDivElement> {
208
- /**
209
- * API client for fetching demo room details
210
- */
211
- apiClient?: DemoRoomApiClient;
212
- /**
213
- * Demo room code to fetch details
214
- */
215
- demoRoomCode?: string;
216
- /**
217
- * Locale for API request
218
- */
219
- locale?: string;
220
- /**
221
- * Room title (fallback if not using API)
222
- */
223
- title?: string;
224
- /**
225
- * Room description paragraphs (fallback if not using API)
226
- */
227
- descriptions?: string[];
228
- /**
229
- * Device models available (fallback if not using API)
230
- */
231
- devices?: string;
232
- /**
233
- * Room address (fallback if not using API)
234
- */
235
- address?: string;
236
- /**
237
- * Google Maps link
238
- */
239
- mapsLink?: string;
240
- /**
241
- * Room images (fallback if not using API)
242
- */
243
- images?: string[];
244
- }
245
- declare const DemoRoomDetail: React.FC<DemoRoomDetailProps>;
246
-
247
318
  interface BookingSuccessProps {
248
319
  bookingData?: Booking;
249
320
  token?: string;
250
321
  apiConfig?: DemoRoomApiConfig;
251
322
  onScheduleAgain?: () => void;
323
+ onCancelSuccess?: (booking: Booking) => void;
252
324
  className?: string;
325
+ /**
326
+ * 页面可配置数据(文案、图标等)
327
+ */
328
+ pageData?: BookingSuccessPageData;
253
329
  }
254
330
  declare const BookingSuccess: React.FC<BookingSuccessProps>;
255
331
 
@@ -317,4 +393,4 @@ declare function useCancelBooking(client: DemoRoomApiClient): {
317
393
 
318
394
  declare function cn(...inputs: ClassValue[]): string;
319
395
 
320
- export { ApiError, ApiErrorCode, type ApiResponse, type Booking, BookingForm, type BookingFormProps, type BookingStatus, BookingSuccess, type BookingSuccessProps, type CancelBookingResponse, type CreateBookingRequest, DemoRoomApiClient, type DemoRoomApiConfig, type DemoRoom as DemoRoomData, DemoRoomDetail, type DemoRoomDetailProps, type DemoRoomStatus, type DemoRoomType, type GetBookingResponse, type GetDemoRoomsResponse, type GetTimeslotsResponse, type Question, type QuestionOption, type QuestionType, type Questionnaire, type Timeslot, type TimeslotStatus, cn, createDemoRoomApi, useBooking, useCancelBooking, useCreateBooking, useDemoRoom, useDemoRooms, useQuestionnaire, useTimeslots };
396
+ export { ApiError, ApiErrorCode, type ApiResponse, type Booking, BookingForm, type BookingFormProps, type BookingStatus, BookingSuccess, type BookingSuccessProps, type CancelBookingResponse, type CreateBookingRequest, DemoRoomApiClient, type DemoRoomApiConfig, type DemoRoom as DemoRoomData, type DemoRoomStatus, type DemoRoomType, type GetBookingResponse, type GetDemoRoomsResponse, type GetTimeslotsResponse, type Question, type QuestionOption, type QuestionType, type Questionnaire, type Timeslot, type TimeslotStatus, cn, createDemoRoomApi, useBooking, useCancelBooking, useCreateBooking, useDemoRoom, useDemoRooms, useQuestionnaire, useTimeslots };