@decidables/decidables-elements 0.4.8 → 0.5.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/CHANGELOG.md +17 -0
- package/README.md +50 -0
- package/lib/decidablesElements.esm.js +238 -157
- package/lib/decidablesElements.esm.js.map +1 -1
- package/lib/decidablesElements.esm.min.js +84 -39
- package/lib/decidablesElements.esm.min.js.map +1 -1
- package/lib/decidablesElements.umd.js +238 -157
- package/lib/decidablesElements.umd.js.map +1 -1
- package/lib/decidablesElements.umd.min.js +85 -40
- package/lib/decidablesElements.umd.min.js.map +1 -1
- package/package.json +3 -3
- package/src/button.js +5 -2
- package/src/slider.js +126 -19
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.5.0](https://github.com/decidables/decidables/compare/@decidables/decidables-elements@0.4.9...@decidables/decidables-elements@0.5.0) (2025-05-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **decidables-elements:** adding optional nonlinear scale and CSS styling to slider ([b0ac44b](https://github.com/decidables/decidables/commit/b0ac44ba9cf7ea44a66bfcf581832bd231b03f4c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.4.9](https://github.com/decidables/decidables/compare/@decidables/decidables-elements@0.4.8...@decidables/decidables-elements@0.4.9) (2025-02-06)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @decidables/decidables-elements
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## [0.4.8](https://github.com/decidables/decidables/compare/@decidables/decidables-elements@0.4.7...@decidables/decidables-elements@0.4.8) (2025-01-26)
|
|
7
24
|
|
|
8
25
|
**Note:** Version bump only for package @decidables/decidables-elements
|
package/README.md
CHANGED
|
@@ -44,6 +44,11 @@ Button for taking actions
|
|
|
44
44
|
- `disabled: boolean = false`
|
|
45
45
|
- In disabled state user can't interact
|
|
46
46
|
|
|
47
|
+
##### CSS Custom Properties
|
|
48
|
+
|
|
49
|
+
- `--decidables-button-background-color`
|
|
50
|
+
- Set the background color for the button
|
|
51
|
+
|
|
47
52
|
##### Example
|
|
48
53
|
|
|
49
54
|
```html
|
|
@@ -65,6 +70,8 @@ Slider w/spinner for selecting a numeric value from a range
|
|
|
65
70
|
|
|
66
71
|
- `disabled: boolean = false`
|
|
67
72
|
- In disabled state user can't interact
|
|
73
|
+
- `scale: boolean = false`
|
|
74
|
+
- Show maximum and minimum values with ticks next to slider
|
|
68
75
|
- `max: number = undefined`
|
|
69
76
|
- Maximum value the slider can take
|
|
70
77
|
- `min: number = undefined`
|
|
@@ -74,6 +81,32 @@ Slider w/spinner for selecting a numeric value from a range
|
|
|
74
81
|
- `value: number = undefined`
|
|
75
82
|
- Initial value of the slider
|
|
76
83
|
|
|
84
|
+
##### Methods
|
|
85
|
+
|
|
86
|
+
- `nonlinearRange(nonlinear, toRange, fromRange)`
|
|
87
|
+
- Set nonlinear scaling for the slider
|
|
88
|
+
- Parameters
|
|
89
|
+
- `nonlinear: boolean`
|
|
90
|
+
- Should the slider have nonlinear scaling
|
|
91
|
+
- `toRange: function(value)`
|
|
92
|
+
- Function defining transform from actual quantity to range position
|
|
93
|
+
- Parameters
|
|
94
|
+
- `value: number`
|
|
95
|
+
- The quantity to transform to range position
|
|
96
|
+
- `fromRange: function(value)`
|
|
97
|
+
- Function defining transform from range position back to actual quantity
|
|
98
|
+
- Parameters
|
|
99
|
+
- `value: number`
|
|
100
|
+
- The range position to transform back to an actual quantity
|
|
101
|
+
|
|
102
|
+
##### CSS Custom Properties
|
|
103
|
+
|
|
104
|
+
- `--decidables-slider-color`
|
|
105
|
+
- Set the color for the slider thumb if enabled
|
|
106
|
+
- `--decidables-slider-background-color`
|
|
107
|
+
- Set the color for the slider track, the background-color for the spinner (and the color for the
|
|
108
|
+
slider thumb, if disabled)
|
|
109
|
+
|
|
77
110
|
##### Example
|
|
78
111
|
|
|
79
112
|
```html
|
|
@@ -104,6 +137,19 @@ Text field w/spinner arrows for selecting a continuous numeric value
|
|
|
104
137
|
- `value: number = undefined`
|
|
105
138
|
- Initial value of the slider
|
|
106
139
|
|
|
140
|
+
##### CSS Custom Properties
|
|
141
|
+
|
|
142
|
+
- `--decidables-spinner-font-size`
|
|
143
|
+
- Set the font-size for the spinner
|
|
144
|
+
- `--decidables-spinner-input-width`
|
|
145
|
+
- Set the width of the input area of the spinner
|
|
146
|
+
- `--decidables-spinner-prefix`
|
|
147
|
+
- Set the prefixed text for the spinner (for example, '$')
|
|
148
|
+
- `--decidables-spinner-postfix`
|
|
149
|
+
- Set the postfixed text for the spinner (for example, 'days')
|
|
150
|
+
- `--decidables-spinner-postfix-padding`
|
|
151
|
+
- Set the width needed to fit the postfix into the spinner
|
|
152
|
+
|
|
107
153
|
##### Example
|
|
108
154
|
|
|
109
155
|
```html
|
|
@@ -130,6 +176,8 @@ Switch for turning an option on or off
|
|
|
130
176
|
- `checked: number = false`
|
|
131
177
|
- Whether the switch is **on** (`true`) or **off** (`false`)
|
|
132
178
|
|
|
179
|
+
##### CSS Custom Properties
|
|
180
|
+
|
|
133
181
|
##### Example
|
|
134
182
|
|
|
135
183
|
```html
|
|
@@ -159,6 +207,8 @@ One option in a toggle set
|
|
|
159
207
|
- `value: string = undefined`
|
|
160
208
|
- An identifier specific to this option to uniquely identify it in the group
|
|
161
209
|
|
|
210
|
+
##### CSS Custom Properties
|
|
211
|
+
|
|
162
212
|
##### Example
|
|
163
213
|
|
|
164
214
|
```html
|