@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/README.md +162 -37
- package/dist/DemoRoom-Dx3PluHP.d.mts +85 -0
- package/dist/DemoRoom-Dx3PluHP.d.ts +85 -0
- package/dist/demo-room.css +3 -0
- package/dist/demo-room.css.map +1 -1
- package/dist/demo-room.d.mts +28 -64
- package/dist/demo-room.d.ts +28 -64
- package/dist/demo-room.js +478 -609
- package/dist/demo-room.js.map +1 -1
- package/dist/demo-room.mjs +480 -609
- package/dist/demo-room.mjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +118 -42
- package/dist/index.d.ts +118 -42
- package/dist/index.js +1229 -1312
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1231 -1313
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +0 -1
- package/package.json +1 -1
- package/dist/DemoRoom-CZyrsxWe.d.mts +0 -30
- package/dist/DemoRoom-CZyrsxWe.d.ts +0 -30
package/README.md
CHANGED
|
@@ -1,55 +1,187 @@
|
|
|
1
|
-
# @anker-
|
|
1
|
+
# @anker-in/ui
|
|
2
2
|
|
|
3
|
-
React UI components
|
|
3
|
+
React UI components library for demo room booking system with full TypeScript support.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- 🎨 **Three Main Components**: DemoRoom, BookingForm, and BookingSuccess
|
|
8
|
+
- 🌍 **Multi-language Support**: Configurable text through pageData props
|
|
9
|
+
- 📱 **Responsive Design**: Works on desktop and mobile devices
|
|
10
|
+
- 🎯 **TypeScript**: Full type safety with TypeScript
|
|
11
|
+
- 🎨 **Tailwind CSS**: Styled with Tailwind CSS
|
|
12
|
+
- 🔧 **Customizable**: Easy to customize through props
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
## Installation
|
|
10
15
|
|
|
11
16
|
```bash
|
|
12
|
-
|
|
17
|
+
npm install @anker-in/ui
|
|
18
|
+
# or
|
|
19
|
+
pnpm add @anker-in/ui
|
|
20
|
+
# or
|
|
21
|
+
yarn add @anker-in/ui
|
|
13
22
|
```
|
|
14
23
|
|
|
15
|
-
###
|
|
24
|
+
### Required Dependencies
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
The package requires the following peer dependencies:
|
|
18
27
|
|
|
19
28
|
```bash
|
|
20
|
-
|
|
21
|
-
pnpm add antd antd-mobile swiper dayjs clsx tailwind-merge @anker-in/headless-ui
|
|
22
|
-
|
|
23
|
-
# Also install dom-helpers if you encounter Module not found errors
|
|
24
|
-
pnpm add dom-helpers
|
|
29
|
+
pnpm add react react-dom antd antd-mobile swiper dayjs clsx tailwind-merge
|
|
25
30
|
```
|
|
26
31
|
|
|
27
|
-
##
|
|
32
|
+
## Quick Start
|
|
33
|
+
|
|
34
|
+
### 1. Import Styles
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import '@anker-in/ui/styles.css'
|
|
38
|
+
```
|
|
28
39
|
|
|
29
|
-
###
|
|
40
|
+
### 2. Use Components
|
|
30
41
|
|
|
31
42
|
```tsx
|
|
32
|
-
import { DemoRoom } from '@anker-
|
|
33
|
-
import '@anker-
|
|
43
|
+
import { DemoRoom, BookingForm, BookingSuccess } from '@anker-in/ui'
|
|
44
|
+
import type { DemoRoomPageData, BookingFormPageData, BookingSuccessPageData } from '@anker-in/ui'
|
|
45
|
+
|
|
46
|
+
// Demo room list page
|
|
47
|
+
<DemoRoom
|
|
48
|
+
apiConfig={{
|
|
49
|
+
baseUrl: '/api/demoroom',
|
|
50
|
+
locale: 'en-US',
|
|
51
|
+
apiKey: 'your-api-key'
|
|
52
|
+
}}
|
|
53
|
+
teamCode='your-team-code'
|
|
54
|
+
onSchedule={(code) => {
|
|
55
|
+
window.location.href = `/book?code=${code}`
|
|
56
|
+
}}
|
|
57
|
+
/>
|
|
58
|
+
|
|
59
|
+
// Booking form page
|
|
60
|
+
<BookingForm
|
|
61
|
+
apiConfig={{
|
|
62
|
+
baseUrl: '/api/demoroom',
|
|
63
|
+
locale: 'en-US',
|
|
64
|
+
apiKey: 'your-api-key'
|
|
65
|
+
}}
|
|
66
|
+
demoRoomCode={code}
|
|
67
|
+
handleBookingSuccess={(token) => {
|
|
68
|
+
window.location.href = `/result?token=${token}`
|
|
69
|
+
}}
|
|
70
|
+
/>
|
|
71
|
+
|
|
72
|
+
// Booking success page
|
|
73
|
+
<BookingSuccess
|
|
74
|
+
apiConfig={{
|
|
75
|
+
baseUrl: '/api/demoroom',
|
|
76
|
+
locale: 'en-US',
|
|
77
|
+
apiKey: 'your-api-key'
|
|
78
|
+
}}
|
|
79
|
+
token={token}
|
|
80
|
+
onScheduleAgain={() => {
|
|
81
|
+
window.location.href = '/demoroom'
|
|
82
|
+
}}
|
|
83
|
+
/>
|
|
34
84
|
```
|
|
35
85
|
|
|
36
|
-
|
|
86
|
+
## Multi-language Support
|
|
87
|
+
|
|
88
|
+
All components support customizable text through the `pageData` prop:
|
|
37
89
|
|
|
38
|
-
|
|
90
|
+
```typescript
|
|
91
|
+
import type { DemoRoomPageData } from '@anker-in/ui/demo-room'
|
|
92
|
+
|
|
93
|
+
const pageData: DemoRoomPageData = {
|
|
94
|
+
title: '查找附近的展厅',
|
|
95
|
+
locationFilter: {
|
|
96
|
+
country: '国家',
|
|
97
|
+
state: '州/省',
|
|
98
|
+
city: '城市'
|
|
99
|
+
},
|
|
100
|
+
studioCard: {
|
|
101
|
+
scheduleNow: '立即预约',
|
|
102
|
+
available: '可预约时间'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
<DemoRoom pageData={pageData} {...otherProps} />
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
See [PAGEDATA_COMPLETE_GUIDE.md](./PAGEDATA_COMPLETE_GUIDE.md) for complete configuration examples.
|
|
110
|
+
|
|
111
|
+
## Available Exports
|
|
112
|
+
|
|
113
|
+
### Components
|
|
114
|
+
|
|
115
|
+
- `DemoRoom` - Demo room list with map and location filtering
|
|
116
|
+
- `BookingForm` - Booking form with calendar and questionnaire
|
|
117
|
+
- `BookingSuccess` - Booking confirmation and cancellation
|
|
118
|
+
- `QuestionnaireForm` - Standalone questionnaire form
|
|
119
|
+
|
|
120
|
+
### Types
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
// From @anker-in/ui
|
|
124
|
+
export type {
|
|
125
|
+
BookingFormPageData,
|
|
126
|
+
BookingSuccessPageData,
|
|
127
|
+
BookingFormProps,
|
|
128
|
+
BookingSuccessProps,
|
|
129
|
+
QuestionnaireFormProps
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// From @anker-in/ui/demo-room
|
|
133
|
+
export type {
|
|
134
|
+
DemoRoomPageData,
|
|
135
|
+
DemoRoomProps
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### API Utilities
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
import { createDemoRoomApi } from '@anker-in/ui'
|
|
143
|
+
|
|
144
|
+
const apiClient = createDemoRoomApi({
|
|
145
|
+
baseUrl: 'https://api.example.com',
|
|
146
|
+
apiKey: 'your-api-key',
|
|
147
|
+
locale: 'en-US'
|
|
148
|
+
})
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Next.js Configuration
|
|
152
|
+
|
|
153
|
+
Add the package to `transpilePackages` in `next.config.js`:
|
|
39
154
|
|
|
40
155
|
```javascript
|
|
41
156
|
module.exports = {
|
|
42
|
-
transpilePackages: ['@anker-
|
|
43
|
-
// ... other config
|
|
157
|
+
transpilePackages: ['@anker-in/ui'],
|
|
44
158
|
}
|
|
45
159
|
```
|
|
46
160
|
|
|
47
|
-
##
|
|
161
|
+
## Documentation
|
|
162
|
+
|
|
163
|
+
- [USAGE_EXAMPLE.md](./USAGE_EXAMPLE.md) - Complete usage examples and integration guide
|
|
164
|
+
- [PAGEDATA_COMPLETE_GUIDE.md](./PAGEDATA_COMPLETE_GUIDE.md) - Full pageData configuration reference
|
|
165
|
+
- [CHANGELOG_v0.1.6.md](./CHANGELOG_v0.1.6.md) - Latest version changes
|
|
166
|
+
|
|
167
|
+
## Component Structure
|
|
168
|
+
|
|
169
|
+
### DemoRoom Page
|
|
170
|
+
- Main component with room list and map
|
|
171
|
+
- Location filtering sidebar/modal
|
|
172
|
+
- Studio cards with distance and availability
|
|
173
|
+
- Google Maps integration
|
|
48
174
|
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
175
|
+
### BookingForm Page
|
|
176
|
+
- Demo room details display
|
|
177
|
+
- Calendar and time slot selection
|
|
178
|
+
- Questionnaire form with validation
|
|
179
|
+
- HTML support in agreement checkboxes
|
|
180
|
+
|
|
181
|
+
### BookingSuccess Page
|
|
182
|
+
- Booking confirmation details
|
|
183
|
+
- Cancellation functionality with confirmation dialog
|
|
184
|
+
- Google Maps integration
|
|
53
185
|
|
|
54
186
|
## Development
|
|
55
187
|
|
|
@@ -60,9 +192,6 @@ pnpm install
|
|
|
60
192
|
# Build the package
|
|
61
193
|
pnpm build
|
|
62
194
|
|
|
63
|
-
# Run tests
|
|
64
|
-
pnpm test
|
|
65
|
-
|
|
66
195
|
# Type check
|
|
67
196
|
pnpm type-check
|
|
68
197
|
|
|
@@ -70,14 +199,10 @@ pnpm type-check
|
|
|
70
199
|
pnpm lint
|
|
71
200
|
```
|
|
72
201
|
|
|
73
|
-
##
|
|
202
|
+
## Version
|
|
74
203
|
|
|
75
|
-
|
|
76
|
-
# In this package directory
|
|
77
|
-
pnpm link --global
|
|
204
|
+
Current version: **0.1.6**
|
|
78
205
|
|
|
79
|
-
|
|
80
|
-
pnpm link --global @anker-dtc/ui
|
|
206
|
+
## License
|
|
81
207
|
|
|
82
|
-
|
|
83
|
-
```
|
|
208
|
+
ISC
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* DemoRoom 页面的可配置数据类型
|
|
5
|
+
*/
|
|
6
|
+
interface DemoRoomPageData {
|
|
7
|
+
/**
|
|
8
|
+
* 页面标题
|
|
9
|
+
*/
|
|
10
|
+
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 加载状态文案
|
|
13
|
+
*/
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 加载失败文案
|
|
17
|
+
*/
|
|
18
|
+
errorTitle?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 位置筛选相关文案
|
|
21
|
+
*/
|
|
22
|
+
locationFilter?: {
|
|
23
|
+
allLocations?: string;
|
|
24
|
+
clear?: string;
|
|
25
|
+
country?: string;
|
|
26
|
+
state?: string;
|
|
27
|
+
city?: string;
|
|
28
|
+
noStudiosFound?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 工作室卡片相关文案
|
|
32
|
+
*/
|
|
33
|
+
studioCard?: {
|
|
34
|
+
scheduleNow?: string;
|
|
35
|
+
available?: string;
|
|
36
|
+
away?: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 地图相关文案
|
|
40
|
+
*/
|
|
41
|
+
map?: {
|
|
42
|
+
apiKeyRequired?: string;
|
|
43
|
+
loadingMap?: string;
|
|
44
|
+
scheduleNow?: string;
|
|
45
|
+
available?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 其他配置
|
|
49
|
+
*/
|
|
50
|
+
defaultCountry?: string;
|
|
51
|
+
noAvailableTime?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface DemoRoomProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
55
|
+
layoutClassName?: string;
|
|
56
|
+
/**
|
|
57
|
+
* 谷歌地图 API Key
|
|
58
|
+
*/
|
|
59
|
+
googleMapsApiKey?: string;
|
|
60
|
+
/**
|
|
61
|
+
* API 配置
|
|
62
|
+
*/
|
|
63
|
+
apiConfig: {
|
|
64
|
+
baseUrl: string;
|
|
65
|
+
apiKey: string;
|
|
66
|
+
locale?: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* 团队编码或品牌站点(二选一)
|
|
70
|
+
*/
|
|
71
|
+
teamCode?: string;
|
|
72
|
+
brandWebsite?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Callback when user clicks "Schedule Now" button
|
|
75
|
+
* @param demoRoomCode - The demo room code
|
|
76
|
+
*/
|
|
77
|
+
onSchedule?: (demoRoomCode: string) => void;
|
|
78
|
+
/**
|
|
79
|
+
* 页面可配置数据(文案、图标等)
|
|
80
|
+
*/
|
|
81
|
+
pageData?: DemoRoomPageData;
|
|
82
|
+
}
|
|
83
|
+
declare const DemoRoom: React.FC<DemoRoomProps>;
|
|
84
|
+
|
|
85
|
+
export { DemoRoom as D, type DemoRoomProps as a, type DemoRoomPageData as b };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* DemoRoom 页面的可配置数据类型
|
|
5
|
+
*/
|
|
6
|
+
interface DemoRoomPageData {
|
|
7
|
+
/**
|
|
8
|
+
* 页面标题
|
|
9
|
+
*/
|
|
10
|
+
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 加载状态文案
|
|
13
|
+
*/
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 加载失败文案
|
|
17
|
+
*/
|
|
18
|
+
errorTitle?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 位置筛选相关文案
|
|
21
|
+
*/
|
|
22
|
+
locationFilter?: {
|
|
23
|
+
allLocations?: string;
|
|
24
|
+
clear?: string;
|
|
25
|
+
country?: string;
|
|
26
|
+
state?: string;
|
|
27
|
+
city?: string;
|
|
28
|
+
noStudiosFound?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 工作室卡片相关文案
|
|
32
|
+
*/
|
|
33
|
+
studioCard?: {
|
|
34
|
+
scheduleNow?: string;
|
|
35
|
+
available?: string;
|
|
36
|
+
away?: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 地图相关文案
|
|
40
|
+
*/
|
|
41
|
+
map?: {
|
|
42
|
+
apiKeyRequired?: string;
|
|
43
|
+
loadingMap?: string;
|
|
44
|
+
scheduleNow?: string;
|
|
45
|
+
available?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 其他配置
|
|
49
|
+
*/
|
|
50
|
+
defaultCountry?: string;
|
|
51
|
+
noAvailableTime?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface DemoRoomProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
55
|
+
layoutClassName?: string;
|
|
56
|
+
/**
|
|
57
|
+
* 谷歌地图 API Key
|
|
58
|
+
*/
|
|
59
|
+
googleMapsApiKey?: string;
|
|
60
|
+
/**
|
|
61
|
+
* API 配置
|
|
62
|
+
*/
|
|
63
|
+
apiConfig: {
|
|
64
|
+
baseUrl: string;
|
|
65
|
+
apiKey: string;
|
|
66
|
+
locale?: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* 团队编码或品牌站点(二选一)
|
|
70
|
+
*/
|
|
71
|
+
teamCode?: string;
|
|
72
|
+
brandWebsite?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Callback when user clicks "Schedule Now" button
|
|
75
|
+
* @param demoRoomCode - The demo room code
|
|
76
|
+
*/
|
|
77
|
+
onSchedule?: (demoRoomCode: string) => void;
|
|
78
|
+
/**
|
|
79
|
+
* 页面可配置数据(文案、图标等)
|
|
80
|
+
*/
|
|
81
|
+
pageData?: DemoRoomPageData;
|
|
82
|
+
}
|
|
83
|
+
declare const DemoRoom: React.FC<DemoRoomProps>;
|
|
84
|
+
|
|
85
|
+
export { DemoRoom as D, type DemoRoomProps as a, type DemoRoomPageData as b };
|
package/dist/demo-room.css
CHANGED
package/dist/demo-room.css.map
CHANGED
|
@@ -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/demo-room.d.mts
CHANGED
|
@@ -1,37 +1,6 @@
|
|
|
1
|
-
export { D as DemoRoom, a as DemoRoomProps } from './DemoRoom-
|
|
1
|
+
export { D as DemoRoom, b as DemoRoomPageData, a as DemoRoomProps } from './DemoRoom-Dx3PluHP.mjs';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
interface HelpNavTab {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
showNewTag?: boolean;
|
|
8
|
-
}
|
|
9
|
-
interface HelpNavProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
-
/**
|
|
11
|
-
* 标签页数组
|
|
12
|
-
*/
|
|
13
|
-
tabs?: HelpNavTab[];
|
|
14
|
-
/**
|
|
15
|
-
* 当前激活的标签页 ID
|
|
16
|
-
*/
|
|
17
|
-
activeTabId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* 标签页切换回调
|
|
20
|
-
*/
|
|
21
|
-
onTabChange?: (tabId: string) => void;
|
|
22
|
-
/**
|
|
23
|
-
* "New" 标签的背景色
|
|
24
|
-
* @default "#3ADB67"
|
|
25
|
-
*/
|
|
26
|
-
newTagColor?: string;
|
|
27
|
-
/**
|
|
28
|
-
* 激活标签的底部边框色
|
|
29
|
-
* @default "#3ADB67"
|
|
30
|
-
*/
|
|
31
|
-
activeBorderColor?: string;
|
|
32
|
-
}
|
|
33
|
-
declare const HelpNav: React.FC<HelpNavProps>;
|
|
34
|
-
|
|
35
4
|
interface EventCardButton {
|
|
36
5
|
label: string;
|
|
37
6
|
variant?: 'primary' | 'secondary';
|
|
@@ -100,6 +69,7 @@ interface StudioLocation {
|
|
|
100
69
|
lng: number;
|
|
101
70
|
availableTime?: string;
|
|
102
71
|
euifyMakeModel?: string;
|
|
72
|
+
distance?: number;
|
|
103
73
|
}
|
|
104
74
|
interface StudioMapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
105
75
|
/**
|
|
@@ -110,6 +80,10 @@ interface StudioMapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
110
80
|
* 工作室位置数据
|
|
111
81
|
*/
|
|
112
82
|
locations?: StudioLocation[];
|
|
83
|
+
/**
|
|
84
|
+
* 当前 hover 的位置 ID
|
|
85
|
+
*/
|
|
86
|
+
hoveredLocationId?: string | null;
|
|
113
87
|
/**
|
|
114
88
|
* 默认中心点
|
|
115
89
|
*/
|
|
@@ -128,7 +102,16 @@ interface StudioMapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
128
102
|
/**
|
|
129
103
|
* 点击 Schedule Now 的回调
|
|
130
104
|
*/
|
|
131
|
-
onSchedule?: (
|
|
105
|
+
onSchedule?: (demoRoomCode: string) => void;
|
|
106
|
+
/**
|
|
107
|
+
* 可配置的文案数据
|
|
108
|
+
*/
|
|
109
|
+
pageData?: {
|
|
110
|
+
apiKeyRequired?: string;
|
|
111
|
+
loadingMap?: string;
|
|
112
|
+
scheduleNow?: string;
|
|
113
|
+
available?: string;
|
|
114
|
+
};
|
|
132
115
|
}
|
|
133
116
|
declare const StudioMap: React.FC<StudioMapProps>;
|
|
134
117
|
|
|
@@ -158,41 +141,22 @@ interface StudioCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
158
141
|
*/
|
|
159
142
|
euifyMakeModel: string;
|
|
160
143
|
/**
|
|
161
|
-
*
|
|
144
|
+
* Distance from user location (optional)
|
|
162
145
|
*/
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
declare const StudioCard: React.FC<StudioCardProps>;
|
|
166
|
-
|
|
167
|
-
interface EasyStep {
|
|
168
|
-
/**
|
|
169
|
-
* Step number (1-4)
|
|
170
|
-
*/
|
|
171
|
-
stepNumber: number;
|
|
172
|
-
/**
|
|
173
|
-
* Step title
|
|
174
|
-
*/
|
|
175
|
-
title: string;
|
|
176
|
-
/**
|
|
177
|
-
* Step description
|
|
178
|
-
*/
|
|
179
|
-
description: string;
|
|
146
|
+
distance?: number;
|
|
180
147
|
/**
|
|
181
|
-
*
|
|
182
|
-
*/
|
|
183
|
-
mapImage: string;
|
|
184
|
-
}
|
|
185
|
-
interface EasyStepsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
186
|
-
/**
|
|
187
|
-
* Section title
|
|
188
|
-
* @default "Schedule in 4 Easy Steps"
|
|
148
|
+
* Callback when "Schedule Now" is clicked, receives demo room code
|
|
189
149
|
*/
|
|
190
|
-
|
|
150
|
+
onSchedule?: (code: string) => void;
|
|
191
151
|
/**
|
|
192
|
-
*
|
|
152
|
+
* 可配置的文案数据
|
|
193
153
|
*/
|
|
194
|
-
|
|
154
|
+
pageData?: {
|
|
155
|
+
scheduleNow?: string;
|
|
156
|
+
available?: string;
|
|
157
|
+
away?: string;
|
|
158
|
+
};
|
|
195
159
|
}
|
|
196
|
-
declare const
|
|
160
|
+
declare const StudioCard: React.FC<StudioCardProps>;
|
|
197
161
|
|
|
198
|
-
export {
|
|
162
|
+
export { EventCard, type EventCardButton, type EventCardProps, StudioCard, type StudioCardProps, type StudioLocation, StudioMap, type StudioMapProps, UpcomingEvents, type UpcomingEventsProps };
|
package/dist/demo-room.d.ts
CHANGED
|
@@ -1,37 +1,6 @@
|
|
|
1
|
-
export { D as DemoRoom, a as DemoRoomProps } from './DemoRoom-
|
|
1
|
+
export { D as DemoRoom, b as DemoRoomPageData, a as DemoRoomProps } from './DemoRoom-Dx3PluHP.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
interface HelpNavTab {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
showNewTag?: boolean;
|
|
8
|
-
}
|
|
9
|
-
interface HelpNavProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
-
/**
|
|
11
|
-
* 标签页数组
|
|
12
|
-
*/
|
|
13
|
-
tabs?: HelpNavTab[];
|
|
14
|
-
/**
|
|
15
|
-
* 当前激活的标签页 ID
|
|
16
|
-
*/
|
|
17
|
-
activeTabId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* 标签页切换回调
|
|
20
|
-
*/
|
|
21
|
-
onTabChange?: (tabId: string) => void;
|
|
22
|
-
/**
|
|
23
|
-
* "New" 标签的背景色
|
|
24
|
-
* @default "#3ADB67"
|
|
25
|
-
*/
|
|
26
|
-
newTagColor?: string;
|
|
27
|
-
/**
|
|
28
|
-
* 激活标签的底部边框色
|
|
29
|
-
* @default "#3ADB67"
|
|
30
|
-
*/
|
|
31
|
-
activeBorderColor?: string;
|
|
32
|
-
}
|
|
33
|
-
declare const HelpNav: React.FC<HelpNavProps>;
|
|
34
|
-
|
|
35
4
|
interface EventCardButton {
|
|
36
5
|
label: string;
|
|
37
6
|
variant?: 'primary' | 'secondary';
|
|
@@ -100,6 +69,7 @@ interface StudioLocation {
|
|
|
100
69
|
lng: number;
|
|
101
70
|
availableTime?: string;
|
|
102
71
|
euifyMakeModel?: string;
|
|
72
|
+
distance?: number;
|
|
103
73
|
}
|
|
104
74
|
interface StudioMapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
105
75
|
/**
|
|
@@ -110,6 +80,10 @@ interface StudioMapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
110
80
|
* 工作室位置数据
|
|
111
81
|
*/
|
|
112
82
|
locations?: StudioLocation[];
|
|
83
|
+
/**
|
|
84
|
+
* 当前 hover 的位置 ID
|
|
85
|
+
*/
|
|
86
|
+
hoveredLocationId?: string | null;
|
|
113
87
|
/**
|
|
114
88
|
* 默认中心点
|
|
115
89
|
*/
|
|
@@ -128,7 +102,16 @@ interface StudioMapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
128
102
|
/**
|
|
129
103
|
* 点击 Schedule Now 的回调
|
|
130
104
|
*/
|
|
131
|
-
onSchedule?: (
|
|
105
|
+
onSchedule?: (demoRoomCode: string) => void;
|
|
106
|
+
/**
|
|
107
|
+
* 可配置的文案数据
|
|
108
|
+
*/
|
|
109
|
+
pageData?: {
|
|
110
|
+
apiKeyRequired?: string;
|
|
111
|
+
loadingMap?: string;
|
|
112
|
+
scheduleNow?: string;
|
|
113
|
+
available?: string;
|
|
114
|
+
};
|
|
132
115
|
}
|
|
133
116
|
declare const StudioMap: React.FC<StudioMapProps>;
|
|
134
117
|
|
|
@@ -158,41 +141,22 @@ interface StudioCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
158
141
|
*/
|
|
159
142
|
euifyMakeModel: string;
|
|
160
143
|
/**
|
|
161
|
-
*
|
|
144
|
+
* Distance from user location (optional)
|
|
162
145
|
*/
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
declare const StudioCard: React.FC<StudioCardProps>;
|
|
166
|
-
|
|
167
|
-
interface EasyStep {
|
|
168
|
-
/**
|
|
169
|
-
* Step number (1-4)
|
|
170
|
-
*/
|
|
171
|
-
stepNumber: number;
|
|
172
|
-
/**
|
|
173
|
-
* Step title
|
|
174
|
-
*/
|
|
175
|
-
title: string;
|
|
176
|
-
/**
|
|
177
|
-
* Step description
|
|
178
|
-
*/
|
|
179
|
-
description: string;
|
|
146
|
+
distance?: number;
|
|
180
147
|
/**
|
|
181
|
-
*
|
|
182
|
-
*/
|
|
183
|
-
mapImage: string;
|
|
184
|
-
}
|
|
185
|
-
interface EasyStepsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
186
|
-
/**
|
|
187
|
-
* Section title
|
|
188
|
-
* @default "Schedule in 4 Easy Steps"
|
|
148
|
+
* Callback when "Schedule Now" is clicked, receives demo room code
|
|
189
149
|
*/
|
|
190
|
-
|
|
150
|
+
onSchedule?: (code: string) => void;
|
|
191
151
|
/**
|
|
192
|
-
*
|
|
152
|
+
* 可配置的文案数据
|
|
193
153
|
*/
|
|
194
|
-
|
|
154
|
+
pageData?: {
|
|
155
|
+
scheduleNow?: string;
|
|
156
|
+
available?: string;
|
|
157
|
+
away?: string;
|
|
158
|
+
};
|
|
195
159
|
}
|
|
196
|
-
declare const
|
|
160
|
+
declare const StudioCard: React.FC<StudioCardProps>;
|
|
197
161
|
|
|
198
|
-
export {
|
|
162
|
+
export { EventCard, type EventCardButton, type EventCardProps, StudioCard, type StudioCardProps, type StudioLocation, StudioMap, type StudioMapProps, UpcomingEvents, type UpcomingEventsProps };
|