@vaadin/time-picker 25.0.0-alpha1 → 25.0.0-alpha10
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 +15 -13
- package/src/styles/vaadin-time-picker-base-styles.d.ts +8 -0
- package/src/styles/vaadin-time-picker-base-styles.js +27 -0
- package/src/styles/vaadin-time-picker-core-styles.d.ts +8 -0
- package/src/styles/vaadin-time-picker-core-styles.js +26 -0
- package/src/styles/vaadin-time-picker-overlay-base-styles.js +22 -0
- package/src/styles/vaadin-time-picker-overlay-core-styles.js +18 -0
- package/src/styles/vaadin-time-picker-scroller-base-styles.js +8 -0
- package/src/styles/vaadin-time-picker-scroller-core-styles.js +27 -0
- package/src/vaadin-time-picker-item.js +7 -11
- package/src/vaadin-time-picker-mixin.d.ts +4 -28
- package/src/vaadin-time-picker-mixin.js +158 -84
- package/src/vaadin-time-picker-overlay.js +5 -16
- package/src/vaadin-time-picker-scroller.js +3 -24
- package/src/vaadin-time-picker.d.ts +5 -4
- package/src/vaadin-time-picker.js +36 -61
- package/web-types.json +108 -112
- package/web-types.lit.json +33 -33
- package/src/vaadin-time-picker-combo-box.js +0 -92
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/time-picker",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-time-picker",
|
|
11
|
-
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-time-picker-overlay-width` | Width of the overlay | `auto`\n`--vaadin-time-picker-overlay-max-height`| Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-
|
|
11
|
+
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-time-picker-overlay-width` | Width of the overlay | `auto`\n`--vaadin-time-picker-overlay-max-height`| Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha10/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|----------------\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n----------|------------------------------------------\n`opened` | Set when the time-picker dropdown is open\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha10/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha10/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha10/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
|
@@ -21,6 +21,57 @@
|
|
|
21
21
|
]
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
"name": "value",
|
|
26
|
+
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
27
|
+
"value": {
|
|
28
|
+
"type": [
|
|
29
|
+
"string"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "overlay-class",
|
|
35
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
36
|
+
"value": {
|
|
37
|
+
"type": [
|
|
38
|
+
"string",
|
|
39
|
+
"null",
|
|
40
|
+
"undefined"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "opened",
|
|
46
|
+
"description": "True if the dropdown is open, false otherwise.",
|
|
47
|
+
"value": {
|
|
48
|
+
"type": [
|
|
49
|
+
"boolean"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "auto-open-disabled",
|
|
55
|
+
"description": "Set true to prevent the overlay from opening automatically.",
|
|
56
|
+
"value": {
|
|
57
|
+
"type": [
|
|
58
|
+
"boolean",
|
|
59
|
+
"null",
|
|
60
|
+
"undefined"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "readonly",
|
|
66
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
67
|
+
"value": {
|
|
68
|
+
"type": [
|
|
69
|
+
"boolean",
|
|
70
|
+
"null",
|
|
71
|
+
"undefined"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
24
75
|
{
|
|
25
76
|
"name": "autofocus",
|
|
26
77
|
"description": "Specify that this control should have input focus when the page loads.",
|
|
@@ -120,15 +171,6 @@
|
|
|
120
171
|
]
|
|
121
172
|
}
|
|
122
173
|
},
|
|
123
|
-
{
|
|
124
|
-
"name": "value",
|
|
125
|
-
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
126
|
-
"value": {
|
|
127
|
-
"type": [
|
|
128
|
-
"string"
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
174
|
{
|
|
133
175
|
"name": "clear-button-visible",
|
|
134
176
|
"description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
|
|
@@ -184,17 +226,6 @@
|
|
|
184
226
|
]
|
|
185
227
|
}
|
|
186
228
|
},
|
|
187
|
-
{
|
|
188
|
-
"name": "readonly",
|
|
189
|
-
"description": "When present, it specifies that the field is read-only.",
|
|
190
|
-
"value": {
|
|
191
|
-
"type": [
|
|
192
|
-
"boolean",
|
|
193
|
-
"null",
|
|
194
|
-
"undefined"
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
229
|
{
|
|
199
230
|
"name": "title",
|
|
200
231
|
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
@@ -217,17 +248,6 @@
|
|
|
217
248
|
]
|
|
218
249
|
}
|
|
219
250
|
},
|
|
220
|
-
{
|
|
221
|
-
"name": "opened",
|
|
222
|
-
"description": "True if the dropdown is open, false otherwise.",
|
|
223
|
-
"value": {
|
|
224
|
-
"type": [
|
|
225
|
-
"boolean",
|
|
226
|
-
"null",
|
|
227
|
-
"undefined"
|
|
228
|
-
]
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
251
|
{
|
|
232
252
|
"name": "min",
|
|
233
253
|
"description": "Minimum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
@@ -257,28 +277,6 @@
|
|
|
257
277
|
]
|
|
258
278
|
}
|
|
259
279
|
},
|
|
260
|
-
{
|
|
261
|
-
"name": "auto-open-disabled",
|
|
262
|
-
"description": "Set true to prevent the overlay from opening automatically.",
|
|
263
|
-
"value": {
|
|
264
|
-
"type": [
|
|
265
|
-
"boolean",
|
|
266
|
-
"null",
|
|
267
|
-
"undefined"
|
|
268
|
-
]
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
"name": "overlay-class",
|
|
273
|
-
"description": "A space-delimited list of CSS class names to set on the overlay element.",
|
|
274
|
-
"value": {
|
|
275
|
-
"type": [
|
|
276
|
-
"string",
|
|
277
|
-
"null",
|
|
278
|
-
"undefined"
|
|
279
|
-
]
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
280
|
{
|
|
283
281
|
"name": "theme",
|
|
284
282
|
"description": "The theme variants to apply to the component.",
|
|
@@ -304,6 +302,57 @@
|
|
|
304
302
|
]
|
|
305
303
|
}
|
|
306
304
|
},
|
|
305
|
+
{
|
|
306
|
+
"name": "value",
|
|
307
|
+
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
308
|
+
"value": {
|
|
309
|
+
"type": [
|
|
310
|
+
"string"
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"name": "overlayClass",
|
|
316
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
317
|
+
"value": {
|
|
318
|
+
"type": [
|
|
319
|
+
"string",
|
|
320
|
+
"null",
|
|
321
|
+
"undefined"
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "opened",
|
|
327
|
+
"description": "True if the dropdown is open, false otherwise.",
|
|
328
|
+
"value": {
|
|
329
|
+
"type": [
|
|
330
|
+
"boolean"
|
|
331
|
+
]
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"name": "autoOpenDisabled",
|
|
336
|
+
"description": "Set true to prevent the overlay from opening automatically.",
|
|
337
|
+
"value": {
|
|
338
|
+
"type": [
|
|
339
|
+
"boolean",
|
|
340
|
+
"null",
|
|
341
|
+
"undefined"
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "readonly",
|
|
347
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
348
|
+
"value": {
|
|
349
|
+
"type": [
|
|
350
|
+
"boolean",
|
|
351
|
+
"null",
|
|
352
|
+
"undefined"
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
},
|
|
307
356
|
{
|
|
308
357
|
"name": "autofocus",
|
|
309
358
|
"description": "Specify that this control should have input focus when the page loads.",
|
|
@@ -403,15 +452,6 @@
|
|
|
403
452
|
]
|
|
404
453
|
}
|
|
405
454
|
},
|
|
406
|
-
{
|
|
407
|
-
"name": "value",
|
|
408
|
-
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
409
|
-
"value": {
|
|
410
|
-
"type": [
|
|
411
|
-
"string"
|
|
412
|
-
]
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
455
|
{
|
|
416
456
|
"name": "clearButtonVisible",
|
|
417
457
|
"description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
|
|
@@ -467,17 +507,6 @@
|
|
|
467
507
|
]
|
|
468
508
|
}
|
|
469
509
|
},
|
|
470
|
-
{
|
|
471
|
-
"name": "readonly",
|
|
472
|
-
"description": "When present, it specifies that the field is read-only.",
|
|
473
|
-
"value": {
|
|
474
|
-
"type": [
|
|
475
|
-
"boolean",
|
|
476
|
-
"null",
|
|
477
|
-
"undefined"
|
|
478
|
-
]
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
510
|
{
|
|
482
511
|
"name": "title",
|
|
483
512
|
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
@@ -500,17 +529,6 @@
|
|
|
500
529
|
]
|
|
501
530
|
}
|
|
502
531
|
},
|
|
503
|
-
{
|
|
504
|
-
"name": "opened",
|
|
505
|
-
"description": "True if the dropdown is open, false otherwise.",
|
|
506
|
-
"value": {
|
|
507
|
-
"type": [
|
|
508
|
-
"boolean",
|
|
509
|
-
"null",
|
|
510
|
-
"undefined"
|
|
511
|
-
]
|
|
512
|
-
}
|
|
513
|
-
},
|
|
514
532
|
{
|
|
515
533
|
"name": "min",
|
|
516
534
|
"description": "Minimum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
@@ -540,28 +558,6 @@
|
|
|
540
558
|
]
|
|
541
559
|
}
|
|
542
560
|
},
|
|
543
|
-
{
|
|
544
|
-
"name": "autoOpenDisabled",
|
|
545
|
-
"description": "Set true to prevent the overlay from opening automatically.",
|
|
546
|
-
"value": {
|
|
547
|
-
"type": [
|
|
548
|
-
"boolean",
|
|
549
|
-
"null",
|
|
550
|
-
"undefined"
|
|
551
|
-
]
|
|
552
|
-
}
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
"name": "overlayClass",
|
|
556
|
-
"description": "A space-delimited list of CSS class names to set on the overlay element.",
|
|
557
|
-
"value": {
|
|
558
|
-
"type": [
|
|
559
|
-
"string",
|
|
560
|
-
"null",
|
|
561
|
-
"undefined"
|
|
562
|
-
]
|
|
563
|
-
}
|
|
564
|
-
},
|
|
565
561
|
{
|
|
566
562
|
"name": "i18n",
|
|
567
563
|
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure:\n\n```\n{\n // A function to format given `Object` as\n // time string. Object is in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`\n formatTime: (time) => {\n // returns a string representation of the given\n // object in `hh` / 'hh:mm' / 'hh:mm:ss' / 'hh:mm:ss.fff' - formats\n },\n\n // A function to parse the given text to an `Object` in the format\n // `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`.\n // Must properly parse (at least) text\n // formatted by `formatTime`.\n parseTime: text => {\n // Parses a string in object/string that can be formatted by`formatTime`.\n }\n}\n```\n\nBoth `formatTime` and `parseTime` need to be implemented\nto ensure the component works properly.",
|
|
@@ -585,10 +581,6 @@
|
|
|
585
581
|
"name": "input",
|
|
586
582
|
"description": "Fired when the value is changed by the user: on every typing keystroke,\nand the value is cleared using the clear button."
|
|
587
583
|
},
|
|
588
|
-
{
|
|
589
|
-
"name": "invalid-changed",
|
|
590
|
-
"description": "Fired when the `invalid` property changes."
|
|
591
|
-
},
|
|
592
584
|
{
|
|
593
585
|
"name": "value-changed",
|
|
594
586
|
"description": "Fired when the `value` property changes."
|
|
@@ -596,6 +588,10 @@
|
|
|
596
588
|
{
|
|
597
589
|
"name": "opened-changed",
|
|
598
590
|
"description": "Fired when the `opened` property changes."
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "invalid-changed",
|
|
594
|
+
"description": "Fired when the `invalid` property changes."
|
|
599
595
|
}
|
|
600
596
|
]
|
|
601
597
|
}
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/time-picker",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-time-picker",
|
|
19
|
-
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-time-picker-overlay-width` | Width of the overlay | `auto`\n`--vaadin-time-picker-overlay-max-height`| Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-
|
|
19
|
+
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-time-picker-overlay-width` | Width of the overlay | `auto`\n`--vaadin-time-picker-overlay-max-height`| Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha10/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|----------------\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n----------|------------------------------------------\n`opened` | Set when the time-picker dropdown is open\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha10/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha10/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha10/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -26,6 +26,27 @@
|
|
|
26
26
|
"kind": "expression"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
"name": "?opened",
|
|
31
|
+
"description": "True if the dropdown is open, false otherwise.",
|
|
32
|
+
"value": {
|
|
33
|
+
"kind": "expression"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "?autoOpenDisabled",
|
|
38
|
+
"description": "Set true to prevent the overlay from opening automatically.",
|
|
39
|
+
"value": {
|
|
40
|
+
"kind": "expression"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "?readonly",
|
|
45
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
46
|
+
"value": {
|
|
47
|
+
"kind": "expression"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
29
50
|
{
|
|
30
51
|
"name": "?autofocus",
|
|
31
52
|
"description": "Specify that this control should have input focus when the page loads.",
|
|
@@ -69,22 +90,15 @@
|
|
|
69
90
|
}
|
|
70
91
|
},
|
|
71
92
|
{
|
|
72
|
-
"name": "
|
|
73
|
-
"description": "
|
|
74
|
-
"value": {
|
|
75
|
-
"kind": "expression"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"name": "?opened",
|
|
80
|
-
"description": "True if the dropdown is open, false otherwise.",
|
|
93
|
+
"name": ".value",
|
|
94
|
+
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
81
95
|
"value": {
|
|
82
96
|
"kind": "expression"
|
|
83
97
|
}
|
|
84
98
|
},
|
|
85
99
|
{
|
|
86
|
-
"name": "
|
|
87
|
-
"description": "
|
|
100
|
+
"name": ".overlayClass",
|
|
101
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
88
102
|
"value": {
|
|
89
103
|
"kind": "expression"
|
|
90
104
|
}
|
|
@@ -124,13 +138,6 @@
|
|
|
124
138
|
"kind": "expression"
|
|
125
139
|
}
|
|
126
140
|
},
|
|
127
|
-
{
|
|
128
|
-
"name": ".value",
|
|
129
|
-
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
130
|
-
"value": {
|
|
131
|
-
"kind": "expression"
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
141
|
{
|
|
135
142
|
"name": ".allowedCharPattern",
|
|
136
143
|
"description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`",
|
|
@@ -187,13 +194,6 @@
|
|
|
187
194
|
"kind": "expression"
|
|
188
195
|
}
|
|
189
196
|
},
|
|
190
|
-
{
|
|
191
|
-
"name": ".overlayClass",
|
|
192
|
-
"description": "A space-delimited list of CSS class names to set on the overlay element.",
|
|
193
|
-
"value": {
|
|
194
|
-
"kind": "expression"
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
197
|
{
|
|
198
198
|
"name": ".i18n",
|
|
199
199
|
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure:\n\n```\n{\n // A function to format given `Object` as\n // time string. Object is in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`\n formatTime: (time) => {\n // returns a string representation of the given\n // object in `hh` / 'hh:mm' / 'hh:mm:ss' / 'hh:mm:ss.fff' - formats\n },\n\n // A function to parse the given text to an `Object` in the format\n // `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`.\n // Must properly parse (at least) text\n // formatted by `formatTime`.\n parseTime: text => {\n // Parses a string in object/string that can be formatted by`formatTime`.\n }\n}\n```\n\nBoth `formatTime` and `parseTime` need to be implemented\nto ensure the component works properly.",
|
|
@@ -223,22 +223,22 @@
|
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
|
-
"name": "@
|
|
227
|
-
"description": "Fired when the `
|
|
226
|
+
"name": "@value-changed",
|
|
227
|
+
"description": "Fired when the `value` property changes.",
|
|
228
228
|
"value": {
|
|
229
229
|
"kind": "expression"
|
|
230
230
|
}
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
|
-
"name": "@
|
|
234
|
-
"description": "Fired when the `
|
|
233
|
+
"name": "@opened-changed",
|
|
234
|
+
"description": "Fired when the `opened` property changes.",
|
|
235
235
|
"value": {
|
|
236
236
|
"kind": "expression"
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
|
-
"name": "@
|
|
241
|
-
"description": "Fired when the `
|
|
240
|
+
"name": "@invalid-changed",
|
|
241
|
+
"description": "Fired when the `invalid` property changes.",
|
|
242
242
|
"value": {
|
|
243
243
|
"kind": "expression"
|
|
244
244
|
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2018 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import './vaadin-time-picker-item.js';
|
|
7
|
-
import './vaadin-time-picker-overlay.js';
|
|
8
|
-
import './vaadin-time-picker-scroller.js';
|
|
9
|
-
import { css, html, LitElement } from 'lit';
|
|
10
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
|
-
import { ComboBoxMixin } from '@vaadin/combo-box/src/vaadin-combo-box-mixin.js';
|
|
12
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
13
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
14
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* An element used internally by `<vaadin-time-picker>`. Not intended to be used separately.
|
|
18
|
-
*
|
|
19
|
-
* @customElement
|
|
20
|
-
* @extends HTMLElement
|
|
21
|
-
* @mixes ComboBoxMixin
|
|
22
|
-
* @mixes ThemableMixin
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
class TimePickerComboBox extends ComboBoxMixin(ThemableMixin(PolylitMixin(LitElement))) {
|
|
26
|
-
static get is() {
|
|
27
|
-
return 'vaadin-time-picker-combo-box';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static get styles() {
|
|
31
|
-
return css`
|
|
32
|
-
:host([opened]) {
|
|
33
|
-
pointer-events: auto;
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
static get properties() {
|
|
39
|
-
return {
|
|
40
|
-
positionTarget: {
|
|
41
|
-
type: Object,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Tag name prefix used by scroller and items.
|
|
48
|
-
* @protected
|
|
49
|
-
* @return {string}
|
|
50
|
-
*/
|
|
51
|
-
get _tagNamePrefix() {
|
|
52
|
-
return 'vaadin-time-picker';
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Reference to the clear button element.
|
|
57
|
-
* @protected
|
|
58
|
-
* @return {!HTMLElement}
|
|
59
|
-
*/
|
|
60
|
-
get clearElement() {
|
|
61
|
-
return this.querySelector('[part="clear-button"]');
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/** @protected */
|
|
65
|
-
render() {
|
|
66
|
-
return html`
|
|
67
|
-
<slot></slot>
|
|
68
|
-
|
|
69
|
-
<vaadin-time-picker-overlay
|
|
70
|
-
id="overlay"
|
|
71
|
-
.opened="${this._overlayOpened}"
|
|
72
|
-
?loading="${this.loading}"
|
|
73
|
-
theme="${ifDefined(this._theme)}"
|
|
74
|
-
.positionTarget="${this.positionTarget}"
|
|
75
|
-
.restoreFocusNode="${this.inputElement}"
|
|
76
|
-
no-vertical-overlap
|
|
77
|
-
></vaadin-time-picker-overlay>
|
|
78
|
-
`;
|
|
79
|
-
}
|
|
80
|
-
/** @protected */
|
|
81
|
-
ready() {
|
|
82
|
-
super.ready();
|
|
83
|
-
|
|
84
|
-
this.allowCustomValue = true;
|
|
85
|
-
this._toggleElement = this.querySelector('.toggle-button');
|
|
86
|
-
|
|
87
|
-
// See https://github.com/vaadin/vaadin-time-picker/issues/145
|
|
88
|
-
this.setAttribute('dir', 'ltr');
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
defineCustomElement(TimePickerComboBox);
|