toggle-components-library 1.27.3 → 1.27.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.27.3",
3
+ "version": "1.27.5",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -75,6 +75,17 @@ export default {
75
75
  prependString: {
76
76
  type: String,
77
77
  required: false
78
+ },
79
+ max: {
80
+ type: Number,
81
+ required: false,
82
+ validator(value) {
83
+ return value > 0
84
+ }
85
+ },
86
+ min: {
87
+ type: Number,
88
+ required: false
78
89
  }
79
90
  },
80
91
 
@@ -139,6 +150,17 @@ export default {
139
150
  if (this.value != '') {
140
151
  // When the user clicks out of the box, add the prepend and/or append values
141
152
  let tempValue = this.value;
153
+
154
+ // If max prop is set and value is greater than max, set value to max
155
+ if (this.max && (tempValue > this.max)) {
156
+ tempValue = this.max
157
+ }
158
+
159
+ // If min prop is set and value is less than min, set value to min
160
+ if (this.min && (tempValue < this.min)) {
161
+ tempValue = this.min
162
+ }
163
+
142
164
  if (this.appendString) {
143
165
  // First add the append string
144
166
  tempValue += this.appendString;
@@ -302,7 +302,7 @@
302
302
  margin-left: 1rem;
303
303
  }
304
304
  .toggle-input-checkbox-icon {
305
- height: 2.5rem;
305
+ height: 2rem;
306
306
  margin-left: auto ;
307
307
  }
308
308