@vaadin/slider 25.2.0-alpha1 → 25.2.0-alpha11

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.
@@ -89,6 +89,34 @@
89
89
  "description": "Custom accessible name for the start (minimum) input.\nWhen not set, defaults to \"${label} min\" or \"min\" if no label.",
90
90
  "attribute": "accessible-name-start"
91
91
  },
92
+ {
93
+ "kind": "method",
94
+ "name": "checkValidity",
95
+ "description": "Returns true if the field value satisfies all constraints (if any).",
96
+ "return": {
97
+ "type": {
98
+ "text": "boolean"
99
+ }
100
+ },
101
+ "inheritedFrom": {
102
+ "name": "ValidateMixin",
103
+ "package": "@vaadin/field-base/src/validate-mixin.js"
104
+ }
105
+ },
106
+ {
107
+ "kind": "field",
108
+ "name": "disabled",
109
+ "privacy": "public",
110
+ "type": {
111
+ "text": "boolean"
112
+ },
113
+ "description": "If true, the user cannot interact with this element.",
114
+ "attribute": "disabled",
115
+ "inheritedFrom": {
116
+ "name": "DisabledMixin",
117
+ "package": "@vaadin/a11y-base/src/disabled-mixin.js"
118
+ }
119
+ },
92
120
  {
93
121
  "kind": "field",
94
122
  "name": "errorMessage",
@@ -117,6 +145,20 @@
117
145
  "package": "@vaadin/field-base/src/field-mixin.js"
118
146
  }
119
147
  },
148
+ {
149
+ "kind": "field",
150
+ "name": "invalid",
151
+ "privacy": "public",
152
+ "type": {
153
+ "text": "boolean"
154
+ },
155
+ "description": "Set to true when the field is invalid.",
156
+ "attribute": "invalid",
157
+ "inheritedFrom": {
158
+ "name": "ValidateMixin",
159
+ "package": "@vaadin/field-base/src/validate-mixin.js"
160
+ }
161
+ },
120
162
  {
121
163
  "kind": "field",
122
164
  "name": "label",
@@ -131,6 +173,20 @@
131
173
  "package": "@vaadin/field-base/src/label-mixin.js"
132
174
  }
133
175
  },
176
+ {
177
+ "kind": "field",
178
+ "name": "manualValidation",
179
+ "privacy": "public",
180
+ "type": {
181
+ "text": "boolean"
182
+ },
183
+ "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
184
+ "attribute": "manual-validation",
185
+ "inheritedFrom": {
186
+ "name": "ValidateMixin",
187
+ "package": "@vaadin/field-base/src/validate-mixin.js"
188
+ }
189
+ },
134
190
  {
135
191
  "kind": "field",
136
192
  "name": "max",
@@ -187,6 +243,20 @@
187
243
  "module": "src/vaadin-slider-mixin.js"
188
244
  }
189
245
  },
246
+ {
247
+ "kind": "field",
248
+ "name": "required",
249
+ "privacy": "public",
250
+ "type": {
251
+ "text": "boolean"
252
+ },
253
+ "description": "Specifies that the user must fill in a value.",
254
+ "attribute": "required",
255
+ "inheritedFrom": {
256
+ "name": "ValidateMixin",
257
+ "package": "@vaadin/field-base/src/validate-mixin.js"
258
+ }
259
+ },
190
260
  {
191
261
  "kind": "field",
192
262
  "name": "step",
@@ -201,6 +271,20 @@
201
271
  "module": "src/vaadin-slider-mixin.js"
202
272
  }
203
273
  },
274
+ {
275
+ "kind": "method",
276
+ "name": "validate",
277
+ "description": "Validates the field and sets the `invalid` property based on the result.\n\nThe method fires a `validated` event with the result of the validation.",
278
+ "return": {
279
+ "type": {
280
+ "text": "boolean"
281
+ }
282
+ },
283
+ "inheritedFrom": {
284
+ "name": "ValidateMixin",
285
+ "package": "@vaadin/field-base/src/validate-mixin.js"
286
+ }
287
+ },
204
288
  {
205
289
  "kind": "field",
206
290
  "name": "value",
@@ -257,11 +341,15 @@
257
341
  "name": "invalid-changed"
258
342
  },
259
343
  {
344
+ "name": "validated",
260
345
  "type": {
261
346
  "text": "CustomEvent"
262
347
  },
263
348
  "description": "Fired whenever the field is validated.",
264
- "name": "validated"
349
+ "inheritedFrom": {
350
+ "name": "ValidateMixin",
351
+ "package": "@vaadin/field-base/src/validate-mixin.js"
352
+ }
265
353
  },
266
354
  {
267
355
  "type": {
@@ -312,6 +400,18 @@
312
400
  "description": "Custom accessible name for the start (minimum) input.\nWhen not set, defaults to \"${label} min\" or \"min\" if no label.",
313
401
  "fieldName": "accessibleNameStart"
314
402
  },
403
+ {
404
+ "name": "disabled",
405
+ "type": {
406
+ "text": "boolean"
407
+ },
408
+ "description": "If true, the user cannot interact with this element.",
409
+ "fieldName": "disabled",
410
+ "inheritedFrom": {
411
+ "name": "DisabledMixin",
412
+ "package": "@vaadin/a11y-base/src/disabled-mixin.js"
413
+ }
414
+ },
315
415
  {
316
416
  "name": "error-message",
317
417
  "type": {
@@ -336,6 +436,18 @@
336
436
  "package": "@vaadin/field-base/src/field-mixin.js"
337
437
  }
338
438
  },
439
+ {
440
+ "name": "invalid",
441
+ "type": {
442
+ "text": "boolean"
443
+ },
444
+ "description": "Set to true when the field is invalid.",
445
+ "fieldName": "invalid",
446
+ "inheritedFrom": {
447
+ "name": "ValidateMixin",
448
+ "package": "@vaadin/field-base/src/validate-mixin.js"
449
+ }
450
+ },
339
451
  {
340
452
  "name": "label",
341
453
  "type": {
@@ -348,6 +460,18 @@
348
460
  "package": "@vaadin/field-base/src/label-mixin.js"
349
461
  }
350
462
  },
463
+ {
464
+ "name": "manual-validation",
465
+ "type": {
466
+ "text": "boolean"
467
+ },
468
+ "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
469
+ "fieldName": "manualValidation",
470
+ "inheritedFrom": {
471
+ "name": "ValidateMixin",
472
+ "package": "@vaadin/field-base/src/validate-mixin.js"
473
+ }
474
+ },
351
475
  {
352
476
  "name": "max",
353
477
  "type": {
@@ -396,6 +520,18 @@
396
520
  "module": "src/vaadin-slider-mixin.js"
397
521
  }
398
522
  },
523
+ {
524
+ "name": "required",
525
+ "type": {
526
+ "text": "boolean"
527
+ },
528
+ "description": "Specifies that the user must fill in a value.",
529
+ "fieldName": "required",
530
+ "inheritedFrom": {
531
+ "name": "ValidateMixin",
532
+ "package": "@vaadin/field-base/src/validate-mixin.js"
533
+ }
534
+ },
399
535
  {
400
536
  "name": "step",
401
537
  "type": {
@@ -487,6 +623,20 @@
487
623
  "description": "",
488
624
  "name": "SliderMixin",
489
625
  "members": [
626
+ {
627
+ "kind": "field",
628
+ "name": "disabled",
629
+ "privacy": "public",
630
+ "type": {
631
+ "text": "boolean"
632
+ },
633
+ "description": "If true, the user cannot interact with this element.",
634
+ "attribute": "disabled",
635
+ "inheritedFrom": {
636
+ "name": "DisabledMixin",
637
+ "package": "@vaadin/a11y-base/src/disabled-mixin.js"
638
+ }
639
+ },
490
640
  {
491
641
  "kind": "field",
492
642
  "name": "max",
@@ -563,6 +713,18 @@
563
713
  }
564
714
  ],
565
715
  "attributes": [
716
+ {
717
+ "name": "disabled",
718
+ "type": {
719
+ "text": "boolean"
720
+ },
721
+ "description": "If true, the user cannot interact with this element.",
722
+ "fieldName": "disabled",
723
+ "inheritedFrom": {
724
+ "name": "DisabledMixin",
725
+ "package": "@vaadin/a11y-base/src/disabled-mixin.js"
726
+ }
727
+ },
566
728
  {
567
729
  "name": "max",
568
730
  "type": {
@@ -677,6 +839,34 @@
677
839
  "package": "@vaadin/field-base/src/field-mixin.js"
678
840
  }
679
841
  },
842
+ {
843
+ "kind": "method",
844
+ "name": "checkValidity",
845
+ "description": "Returns true if the field value satisfies all constraints (if any).",
846
+ "return": {
847
+ "type": {
848
+ "text": "boolean"
849
+ }
850
+ },
851
+ "inheritedFrom": {
852
+ "name": "ValidateMixin",
853
+ "package": "@vaadin/field-base/src/validate-mixin.js"
854
+ }
855
+ },
856
+ {
857
+ "kind": "field",
858
+ "name": "disabled",
859
+ "privacy": "public",
860
+ "type": {
861
+ "text": "boolean"
862
+ },
863
+ "description": "If true, the user cannot interact with this element.",
864
+ "attribute": "disabled",
865
+ "inheritedFrom": {
866
+ "name": "DisabledMixin",
867
+ "package": "@vaadin/a11y-base/src/disabled-mixin.js"
868
+ }
869
+ },
680
870
  {
681
871
  "kind": "field",
682
872
  "name": "errorMessage",
@@ -705,6 +895,20 @@
705
895
  "package": "@vaadin/field-base/src/field-mixin.js"
706
896
  }
707
897
  },
898
+ {
899
+ "kind": "field",
900
+ "name": "invalid",
901
+ "privacy": "public",
902
+ "type": {
903
+ "text": "boolean"
904
+ },
905
+ "description": "Set to true when the field is invalid.",
906
+ "attribute": "invalid",
907
+ "inheritedFrom": {
908
+ "name": "ValidateMixin",
909
+ "package": "@vaadin/field-base/src/validate-mixin.js"
910
+ }
911
+ },
708
912
  {
709
913
  "kind": "field",
710
914
  "name": "label",
@@ -719,6 +923,20 @@
719
923
  "package": "@vaadin/field-base/src/label-mixin.js"
720
924
  }
721
925
  },
926
+ {
927
+ "kind": "field",
928
+ "name": "manualValidation",
929
+ "privacy": "public",
930
+ "type": {
931
+ "text": "boolean"
932
+ },
933
+ "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
934
+ "attribute": "manual-validation",
935
+ "inheritedFrom": {
936
+ "name": "ValidateMixin",
937
+ "package": "@vaadin/field-base/src/validate-mixin.js"
938
+ }
939
+ },
722
940
  {
723
941
  "kind": "field",
724
942
  "name": "max",
@@ -775,6 +993,20 @@
775
993
  "module": "src/vaadin-slider-mixin.js"
776
994
  }
777
995
  },
996
+ {
997
+ "kind": "field",
998
+ "name": "required",
999
+ "privacy": "public",
1000
+ "type": {
1001
+ "text": "boolean"
1002
+ },
1003
+ "description": "Specifies that the user must fill in a value.",
1004
+ "attribute": "required",
1005
+ "inheritedFrom": {
1006
+ "name": "ValidateMixin",
1007
+ "package": "@vaadin/field-base/src/validate-mixin.js"
1008
+ }
1009
+ },
778
1010
  {
779
1011
  "kind": "field",
780
1012
  "name": "step",
@@ -789,6 +1021,20 @@
789
1021
  "module": "src/vaadin-slider-mixin.js"
790
1022
  }
791
1023
  },
1024
+ {
1025
+ "kind": "method",
1026
+ "name": "validate",
1027
+ "description": "Validates the field and sets the `invalid` property based on the result.\n\nThe method fires a `validated` event with the result of the validation.",
1028
+ "return": {
1029
+ "type": {
1030
+ "text": "boolean"
1031
+ }
1032
+ },
1033
+ "inheritedFrom": {
1034
+ "name": "ValidateMixin",
1035
+ "package": "@vaadin/field-base/src/validate-mixin.js"
1036
+ }
1037
+ },
792
1038
  {
793
1039
  "kind": "field",
794
1040
  "name": "value",
@@ -845,11 +1091,15 @@
845
1091
  "name": "invalid-changed"
846
1092
  },
847
1093
  {
1094
+ "name": "validated",
848
1095
  "type": {
849
1096
  "text": "CustomEvent"
850
1097
  },
851
1098
  "description": "Fired whenever the field is validated.",
852
- "name": "validated"
1099
+ "inheritedFrom": {
1100
+ "name": "ValidateMixin",
1101
+ "package": "@vaadin/field-base/src/validate-mixin.js"
1102
+ }
853
1103
  },
854
1104
  {
855
1105
  "type": {
@@ -884,6 +1134,18 @@
884
1134
  "package": "@vaadin/field-base/src/field-mixin.js"
885
1135
  }
886
1136
  },
1137
+ {
1138
+ "name": "disabled",
1139
+ "type": {
1140
+ "text": "boolean"
1141
+ },
1142
+ "description": "If true, the user cannot interact with this element.",
1143
+ "fieldName": "disabled",
1144
+ "inheritedFrom": {
1145
+ "name": "DisabledMixin",
1146
+ "package": "@vaadin/a11y-base/src/disabled-mixin.js"
1147
+ }
1148
+ },
887
1149
  {
888
1150
  "name": "error-message",
889
1151
  "type": {
@@ -908,6 +1170,18 @@
908
1170
  "package": "@vaadin/field-base/src/field-mixin.js"
909
1171
  }
910
1172
  },
1173
+ {
1174
+ "name": "invalid",
1175
+ "type": {
1176
+ "text": "boolean"
1177
+ },
1178
+ "description": "Set to true when the field is invalid.",
1179
+ "fieldName": "invalid",
1180
+ "inheritedFrom": {
1181
+ "name": "ValidateMixin",
1182
+ "package": "@vaadin/field-base/src/validate-mixin.js"
1183
+ }
1184
+ },
911
1185
  {
912
1186
  "name": "label",
913
1187
  "type": {
@@ -920,6 +1194,18 @@
920
1194
  "package": "@vaadin/field-base/src/label-mixin.js"
921
1195
  }
922
1196
  },
1197
+ {
1198
+ "name": "manual-validation",
1199
+ "type": {
1200
+ "text": "boolean"
1201
+ },
1202
+ "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
1203
+ "fieldName": "manualValidation",
1204
+ "inheritedFrom": {
1205
+ "name": "ValidateMixin",
1206
+ "package": "@vaadin/field-base/src/validate-mixin.js"
1207
+ }
1208
+ },
923
1209
  {
924
1210
  "name": "max",
925
1211
  "type": {
@@ -968,6 +1254,18 @@
968
1254
  "module": "src/vaadin-slider-mixin.js"
969
1255
  }
970
1256
  },
1257
+ {
1258
+ "name": "required",
1259
+ "type": {
1260
+ "text": "boolean"
1261
+ },
1262
+ "description": "Specifies that the user must fill in a value.",
1263
+ "fieldName": "required",
1264
+ "inheritedFrom": {
1265
+ "name": "ValidateMixin",
1266
+ "package": "@vaadin/field-base/src/validate-mixin.js"
1267
+ }
1268
+ },
971
1269
  {
972
1270
  "name": "step",
973
1271
  "type": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/slider",
3
- "version": "25.2.0-alpha1",
3
+ "version": "25.2.0-alpha11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,24 +35,24 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "25.2.0-alpha1",
39
- "@vaadin/component-base": "25.2.0-alpha1",
40
- "@vaadin/field-base": "25.2.0-alpha1",
41
- "@vaadin/overlay": "25.2.0-alpha1",
42
- "@vaadin/vaadin-themable-mixin": "25.2.0-alpha1",
38
+ "@vaadin/a11y-base": "25.2.0-alpha11",
39
+ "@vaadin/component-base": "25.2.0-alpha11",
40
+ "@vaadin/field-base": "25.2.0-alpha11",
41
+ "@vaadin/overlay": "25.2.0-alpha11",
42
+ "@vaadin/vaadin-themable-mixin": "25.2.0-alpha11",
43
43
  "lit": "^3.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@vaadin/aura": "25.2.0-alpha1",
47
- "@vaadin/chai-plugins": "25.2.0-alpha1",
48
- "@vaadin/test-runner-commands": "25.2.0-alpha1",
46
+ "@vaadin/aura": "25.2.0-alpha11",
47
+ "@vaadin/chai-plugins": "25.2.0-alpha11",
48
+ "@vaadin/test-runner-commands": "25.2.0-alpha11",
49
49
  "@vaadin/testing-helpers": "^2.0.0",
50
- "@vaadin/vaadin-lumo-styles": "25.2.0-alpha1"
50
+ "@vaadin/vaadin-lumo-styles": "25.2.0-alpha11"
51
51
  },
52
52
  "customElements": "custom-elements.json",
53
53
  "web-types": [
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "866f813f89655a351cbd25328eba1fcb317e267d"
57
+ "gitHead": "fdc37e932709f95491a027aeb2090911cb7528c6"
58
58
  }
@@ -19,7 +19,7 @@ export type RangeSliderChangeEvent = Event & {
19
19
  /**
20
20
  * Fired when the slider value changes during user interaction.
21
21
  */
22
- export type RangeSliderInputEvent = Event & {
22
+ export type RangeSliderInputEvent = InputEvent & {
23
23
  target: RangeSlider;
24
24
  };
25
25
 
@@ -125,11 +125,6 @@ import { SliderMixin } from './vaadin-slider-mixin.js';
125
125
  *
126
126
  * @customElement vaadin-range-slider
127
127
  * @extends HTMLElement
128
- * @mixes ElementMixin
129
- * @mixes FieldMixin
130
- * @mixes FocusMixin
131
- * @mixes SliderMixin
132
- * @mixes ThemableMixin
133
128
  */
134
129
  class RangeSlider extends FieldMixin(
135
130
  SliderMixin(FocusMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))))),
@@ -18,10 +18,6 @@ import { sliderBubbleOverlayStyles } from './styles/vaadin-slider-bubble-overlay
18
18
  *
19
19
  * @customElement vaadin-slider-bubble-overlay
20
20
  * @extends HTMLElement
21
- * @mixes DirMixin
22
- * @mixes OverlayMixin
23
- * @mixes PositionMixin
24
- * @mixes ThemableMixin
25
21
  * @private
26
22
  */
27
23
  class SliderBubbleOverlay extends PositionMixin(
@@ -6,11 +6,6 @@
6
6
  import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
7
7
  import { SlotStylesMixin } from '@vaadin/component-base/src/slot-styles-mixin.js';
8
8
 
9
- /**
10
- * @polymerMixin
11
- * @mixes DisabledMixin
12
- * @mixes SlotStylesMixin
13
- */
14
9
  export const SliderMixin = (superClass) =>
15
10
  class SliderMixinClass extends SlotStylesMixin(DisabledMixin(superClass)) {
16
11
  static get properties() {
@@ -153,8 +148,8 @@ export const SliderMixin = (superClass) =>
153
148
  __updateValue(value, index, fullValue = this.__value) {
154
149
  const { min, max, step } = this.__getConstraints();
155
150
 
156
- const minValue = fullValue[index - 1] !== undefined ? fullValue[index - 1] : min;
157
- const maxValue = fullValue[index + 1] !== undefined ? fullValue[index + 1] : max;
151
+ const minValue = fullValue[index - 1] ?? min;
152
+ const maxValue = fullValue[index + 1] ?? max;
158
153
 
159
154
  const safeValue = Math.min(Math.max(value, minValue), maxValue);
160
155
 
@@ -184,9 +179,9 @@ export const SliderMixin = (superClass) =>
184
179
  */
185
180
  __getConstraints() {
186
181
  return {
187
- min: this.min !== undefined ? this.min : 0,
188
- max: this.max !== undefined ? this.max : 100,
189
- step: this.step !== undefined ? this.step : 1,
182
+ min: this.min ?? 0,
183
+ max: this.max ?? 100,
184
+ step: this.step ?? 1,
190
185
  };
191
186
  }
192
187
 
@@ -288,16 +283,4 @@ export const SliderMixin = (superClass) =>
288
283
  event.stopPropagation();
289
284
  this.__detectAndDispatchChange();
290
285
  }
291
-
292
- /**
293
- * Fired when the slider value changes during user interaction.
294
- *
295
- * @event input
296
- */
297
-
298
- /**
299
- * Fired when the user commits a value change.
300
- *
301
- * @event change
302
- */
303
286
  };
@@ -19,7 +19,7 @@ export type SliderChangeEvent = Event & {
19
19
  /**
20
20
  * Fired when the slider value changes during user interaction.
21
21
  */
22
- export type SliderInputEvent = Event & {
22
+ export type SliderInputEvent = InputEvent & {
23
23
  target: Slider;
24
24
  };
25
25
 
@@ -120,11 +120,6 @@ import { SliderMixin } from './vaadin-slider-mixin.js';
120
120
  *
121
121
  * @customElement vaadin-slider
122
122
  * @extends HTMLElement
123
- * @mixes ElementMixin
124
- * @mixes FieldMixin
125
- * @mixes FocusMixin
126
- * @mixes SliderMixin
127
- * @mixes ThemableMixin
128
123
  */
129
124
  class Slider extends FieldMixin(
130
125
  SliderMixin(FocusMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))))),