@ruc-lib/knob 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 +48 -24
- package/fesm2022/ruc-lib-knob.mjs +595 -0
- package/fesm2022/ruc-lib-knob.mjs.map +1 -0
- package/index.d.ts +436 -3
- package/package.json +12 -23
- package/esm2020/index.mjs +0 -4
- package/esm2020/lib/ruclib-knob/ruclib-knob.component.mjs +0 -544
- package/esm2020/lib/ruclib-knob.module.mjs +0 -37
- package/esm2020/models/knob-config.model.mjs +0 -33
- package/esm2020/models/knob.interface.mjs +0 -3
- package/esm2020/ruc-lib-knob.mjs +0 -5
- package/fesm2015/ruc-lib-knob.mjs +0 -622
- package/fesm2015/ruc-lib-knob.mjs.map +0 -1
- package/fesm2020/ruc-lib-knob.mjs +0 -618
- package/fesm2020/ruc-lib-knob.mjs.map +0 -1
- package/lib/ruclib-knob/ruclib-knob.component.d.ts +0 -275
- package/lib/ruclib-knob.module.d.ts +0 -11
- package/models/knob-config.model.d.ts +0 -32
- package/models/knob.interface.d.ts +0 -157
package/README.md
CHANGED
|
@@ -18,31 +18,38 @@ If you only need the Knob component
|
|
|
18
18
|
npm install @ruc-lib/knob
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
## Usage
|
|
22
|
-
### 1. Import the Module
|
|
23
|
-
In your Angular module file (e.g., `app.module.ts`), import the `RuclibKnobModule`:
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
22
|
+
# Version Compatibility
|
|
23
|
+
|
|
24
|
+
Please ensure you install the correct version of `@ruc-lib/knob` based on your Angular version.
|
|
25
|
+
|
|
26
|
+
| Angular Version | Compatible `@ruc-lib/knob` Version |
|
|
27
|
+
|--------------------|------------------------------------------------------|
|
|
28
|
+
| 15.x.x | `npm install @ruc-lib/knob@^3.0.0` |
|
|
29
|
+
| 16.x.x | `npm install @ruc-lib/knob@^3.0.0` |
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
### 1. Import the Component
|
|
34
|
+
In your Angular component file (e.g., `app.component.ts`), import the `RuclibKnobComponent`:
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { Component } from '@angular/core';
|
|
38
|
+
|
|
39
|
+
// For Complete Library
|
|
40
|
+
import { RuclibKnobComponent } from '@uxpractice/ruc-lib/knob';
|
|
41
|
+
|
|
42
|
+
// For Individual Package
|
|
43
|
+
import { RuclibKnobComponent } from '@ruc-lib/knob';
|
|
44
|
+
|
|
45
|
+
@Component({
|
|
46
|
+
selector: 'app-root',
|
|
47
|
+
imports: [RuclibKnobComponent],
|
|
48
|
+
templateUrl: './app.component.html',
|
|
49
|
+
})
|
|
50
|
+
export class AppComponent {
|
|
51
|
+
// Component code here
|
|
52
|
+
}
|
|
46
53
|
```
|
|
47
54
|
|
|
48
55
|
### 2. Use the Component
|
|
@@ -149,6 +156,23 @@ export class AppComponent {
|
|
|
149
156
|
}
|
|
150
157
|
```
|
|
151
158
|
|
|
159
|
+
> ⚠️ **IMPORTANT: Custom Theme Usage in Angular Material**
|
|
160
|
+
|
|
161
|
+
When implementing **custom themes**, such as:
|
|
162
|
+
|
|
163
|
+
```scss
|
|
164
|
+
.custom-theme-1 {
|
|
165
|
+
@include angular-material-theme($custom-theme);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// You must also include the typography mixin to ensure text styles are applied correctly as shown below:
|
|
169
|
+
.custom-theme-1 {
|
|
170
|
+
@include angular-material-theme($custom-theme);
|
|
171
|
+
@include mat.typography-level($theme-custom-typography-name, body-1);
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
|
|
152
176
|
## Contribution
|
|
153
177
|
|
|
154
178
|
Contributions are welcome! Feel free to open issues or pull requests for any enhancements or fixes.
|