@ruc-lib/tour-guide 2.0.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,41 +15,52 @@ npm install @uxpractice/ruc-lib
15
15
 
16
16
  If you only need the Tour Guide component
17
17
  ```bash
18
- npm install @uxpractice/tour-guide
18
+ npm install @ruc-lib/tour-guide
19
19
  ```
20
20
 
21
- ## Usage
22
- ### 1. Import the Module
23
- In your Angular module file (e.g., `app.module.ts`), import the `RuclibTourGuideModule`:
21
+ ### 📦 Version Compatibility
22
+
23
+ Please ensure you install the correct version of `@ruc-lib/tour-guide` based on your Angular version.
24
+
25
+ | Angular Version | Compatible `@ruc-lib/tour-guide` Version |
26
+ |--------------------|---------------------------------------------|
27
+ | 15.x.x | `npm install @ruc-lib/tour-guide@^3.0.0` |
28
+ | 16.x.x | `npm install @ruc-lib/tour-guide@^3.0.0` |
24
29
 
25
- ```typescript
26
- import { RuclibTourGuideModule } from '@uxpractice/tour-guide';
27
- import { AppComponent } from './app.component';
28
- import { NgModule } from '@angular/core';
29
- import { BrowserModule } from '@angular/platform-browser';
30
-
31
- @NgModule({
32
- declarations: [AppComponent],
33
- imports: [
34
- BrowserModule,
35
- RuclibTourGuideModule
36
- ],
37
- providers: [],
38
- bootstrap: [AppComponent]
39
- })
40
- export class AppModule {}
30
+
31
+ ## Usage
32
+ ### 1. Import the Component
33
+ In your Angular component file (e.g., `app.component.ts`), import the `RuclibTourGuideComponent`:
34
+
35
+ ```typescript
36
+ import { Component } from '@angular/core';
37
+
38
+ // For Complete Library
39
+ import { RuclibTourGuideComponent } from '@uxpractice/ruc-lib/tour-guide';
40
+
41
+ // For Individual Package
42
+ import { RuclibTourGuideComponent } from '@ruc-lib/tour-guide';
43
+
44
+ @Component({
45
+ selector: 'app-root',
46
+ imports: [RuclibTourGuideComponent],
47
+ templateUrl: './app.component.html',
48
+ })
49
+ export class AppComponent {
50
+ // Component code here
51
+ }
41
52
  ```
42
53
 
43
54
  ### 2. Use the Component
44
- In your component's template, use the `<uxp-ruc-tour-guide>` selector and pass the configuration object to the `rucInputData` input.
55
+ In your component's template, use the `<uxp-ruclib-tour-guide>` selector and pass the configuration object to the `rucInputData` input and the data array to the `dataSource` input.
45
56
 
46
57
  ```html
47
- <uxp-ruc-tour-guide
58
+ <uxp-ruclib-tour-guide
48
59
  [rucInputData]="tourGuideConfig"
49
60
  [customTheme]="customTheme"
50
61
  (rucEvent)="passEvent($event)"
51
62
  [dataSource]="tourGuideData">
52
- </uxp-ruc-tour-guide>
63
+ </uxp-ruclib-tour-guide>
53
64
  ```
54
65
 
55
66
  ## API Reference
@@ -58,9 +69,9 @@ In your component's template, use the `<uxp-ruc-tour-guide>` selector and pass t
58
69
 
59
70
  | Input | Type | Description |
60
71
  |----------------|--------------------|---------------------------------------------------|
61
- | `rucInputData` | `tourGuideConfig` | The main configuration object for the tour guide. |
72
+ | `rucInputData` | `TourGuideConfig` | The main configuration object for the tour guide. |
62
73
  | `customTheme` | `string` | An optional CSS class for custom theming. |
63
- | `dataSource` | `tourGuideData` | An optional CSS class for custom theming. |
74
+ | `dataSource` | `TourGuideData` | Data for the tour guide. |
64
75
 
65
76
  ### Component Outputs
66
77
 
@@ -68,7 +79,7 @@ In your component's template, use the `<uxp-ruc-tour-guide>` selector and pass t
68
79
  |-----------|-----------|---------------------------------------------------|
69
80
  | `rucEvent`| `any` | Emits events related to tour guide actions (e.g., 'skip', 'next', 'finish'). |
70
81
 
71
- ### `tourGuideConfig`
82
+ ### `TourGuideConfig`
72
83
  This is the main configuration object for the Tour Guide component.
73
84
 
74
85
  | Property | Type | Description |
@@ -90,7 +101,7 @@ This is the main configuration object for the Tour Guide component.
90
101
  | `highlightBorderWidth` | `string` | Width of the highlight border around the guided element. |
91
102
  | `defaultPopupWidth` | `string` | Default width of the tour guide popup. |
92
103
 
93
- ### `tourGuideData`
104
+ ### `TourGuideData`
94
105
  This array of objects defines the content for each step of the tour guide.
95
106
 
96
107
  | Property | Type | Description |
@@ -108,7 +119,12 @@ Here's an example of how to configure the Tour Guide component in your component
108
119
 
109
120
  ```typescript
110
121
  import { Component } from '@angular/core';
111
- import { TourGuideConfig, TourGuideData } from '@uxpractice/tour-guide';
122
+
123
+ // For Complete Library
124
+ import { TourGuideConfig, TourGuideData } from '@uxpractice/ruc-lib/tour-guide';
125
+
126
+ // For Individual package
127
+ import { TourGuideConfig, TourGuideData } from '@ruc-lib/tour-guide';
112
128
 
113
129
  @Component({
114
130
  selector: 'app-root',
@@ -183,6 +199,22 @@ export class AppComponent {
183
199
  }
184
200
  ```
185
201
 
202
+ > ⚠️ **IMPORTANT: Custom Theme Usage in Angular Material**
203
+
204
+ When implementing **custom themes**, such as:
205
+
206
+ ```scss
207
+ .custom-theme-1 {
208
+ @include angular-material-theme($custom-theme);
209
+ }
210
+
211
+ // You must also include the typography mixin to ensure text styles are applied correctly as shown below:
212
+ .custom-theme-1 {
213
+ @include angular-material-theme($custom-theme);
214
+ @include mat.typography-level($theme-custom-typography-name, body-1);
215
+ }
216
+ ```
217
+
186
218
  ## Contribution
187
219
 
188
220
  Contributions are welcome! Feel free to open issues or pull requests for any enhancements or fixes.