@ruc-lib/knob 2.0.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 ADDED
@@ -0,0 +1,108 @@
1
+ # ruclib-knob
2
+
3
+ A component for creating a custom knob with different shapes like arc, vertical slider & horizontal slider where user can adjust the value by sliding a handle on arc or by sliding a handle on vertical or horizonatl slider.
4
+
5
+ # Features
6
+
7
+ - User is allowed to add the knob of their choise from any of these: Arc, Vertical or Horizontal slider.
8
+ - User is allowed to adjust the width (stroke) of the arc or slider line.
9
+ - User is allowed to set size, color and width of the knob.
10
+ - User is allowed to set the font-size, weight and color of value text.
11
+ - User is allowed to set min and max value of range.
12
+ - User is allowed to custom text before and after the value.
13
+ - User is allowed to toggle the visibility of custom buttons to increment and decrement the value.
14
+ - User is allowed to toggle the readonly and disabled mode.
15
+ - User is allowed to toggle the visibility of tooltip.
16
+ - User is allowed to adjust the value by using arrow keys of keyboard.
17
+ - User is allowed to do some actions on these events onBlur, onFocus, onChange, onDragStart & onDragEnd.
18
+
19
+
20
+ # Installation guide
21
+
22
+ # Install complete library
23
+
24
+ `npm install @uxpractice/ruc-lib`
25
+
26
+ # Install individual component
27
+
28
+ If users only need the knob component, they can install it separately
29
+ `npm install @ruc-lib/knob`
30
+
31
+ # Usage
32
+
33
+ here path of the scss file is subject to change as per choice of the installation
34
+
35
+ for library
36
+ `@import "../node_modules/@ruc-lib/knob/lib/knob.scss";`
37
+
38
+ for seperate package
39
+ `@import "../node_modules/@uxpractice/ruc-lib/knob/lib/knob.scss";`
40
+
41
+ # import required modules
42
+
43
+ for library
44
+ `import { RuclibKnobModule } from '@uxpractice/ruc-lib/knob';`
45
+
46
+ for seperate package
47
+ `import { RuclibKnobModule } from '@ruc-lib/knob';`
48
+
49
+ # use component selector
50
+
51
+ ```
52
+ <uxp-ruclib-knob [rucInputData]="knobConfig" [customTheme]="customTheme"
53
+ (rucEvent)="passEvent($event)"></uxp-ruclib-knob>
54
+ ```
55
+
56
+
57
+ # Input and Output
58
+
59
+ # Inputs
60
+ rucInputData -> It is the configuration input to configure the knob
61
+
62
+ customTheme -> It is the name of the theme.
63
+
64
+ # Output
65
+
66
+ rucEvent -> is the event which will be fired when any change is made in knob component
67
+
68
+ # rucInputData (sample object)
69
+
70
+ # Detail definition of the each property can be found in type definition file.
71
+
72
+ ```
73
+ knobConfig = {
74
+ min:<number> 0,
75
+ max:<number> 100,
76
+ step:<number> 1,
77
+ size:<number> 150,
78
+ valueColor:<string> '',
79
+ strokeBackground:<string> 'lightblue',
80
+ progressBackground: <string | string[]> 'blue', // 'green' | ['green'] | ['red', 'blue', 'green', 'black', 'orange'],
81
+ strokeWidth:<number> 15,
82
+ valueSize:<number> 20,
83
+ valueWeight:<string> 'normal',
84
+ showHandle:<boolean> true,
85
+ handleBackground:<string> 'lightblue',
86
+ handleBorderColor:<string> 'blue',
87
+ handleBorderWidth:<number> 4,
88
+ roundedCorner:<boolean> true,
89
+ valuePrefix:<string> '',
90
+ valueSuffix:<string> '',
91
+ readOnly:<boolean> false,
92
+ disabled:<boolean> false,
93
+ enableTooltip:<boolean> false,
94
+ animateOnHover:<boolean> false,
95
+ isRangeMode:<boolean> false,
96
+ rangeStartValue:<number> 25,
97
+ rangeEndValue:<number> 75,
98
+ showButtons:<boolean> false,
99
+ knobType:<'horizontal' | 'vertical' | 'arc'> 'arc' // 'horizontal' | 'vertical' | 'arc'
100
+ };
101
+ ```
102
+
103
+
104
+ # Contribution
105
+ Contributions are welcome! Feel free to open issues or pull requests for any enhancements or fixes.
106
+
107
+ # Acknowledgements
108
+ Thank you for choosing the Knob Component Library. If you have any feedback or suggestions, please let us know!
@@ -0,0 +1,4 @@
1
+ export * from './lib/ruclib-knob.module';
2
+ export * from './lib/ruclib-knob/ruclib-knob.component';
3
+ export * from './models/knob.interface';
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL3J1Y2xpYi9rbm9iL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMseUNBQXlDLENBQUM7QUFDeEQsY0FBYyx5QkFBeUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL3J1Y2xpYi1rbm9iLm1vZHVsZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL3J1Y2xpYi1rbm9iL3J1Y2xpYi1rbm9iLmNvbXBvbmVudCc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbW9kZWxzL2tub2IuaW50ZXJmYWNlJztcclxuIl19