@vaadin/time-picker 25.2.7 → 25.3.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/custom-elements.json +97 -38
- package/package.json +14 -14
- package/src/vaadin-time-picker-item.js +4 -3
- package/src/vaadin-time-picker-mixin.d.ts +5 -0
- package/src/vaadin-time-picker-mixin.js +20 -21
- package/src/vaadin-time-picker-overlay.js +4 -1
- package/src/vaadin-time-picker-scroller.js +3 -1
- package/src/vaadin-time-picker.js +1 -0
- package/web-types.json +26 -10
- package/web-types.lit.json +12 -5
package/custom-elements.json
CHANGED
|
@@ -122,6 +122,20 @@
|
|
|
122
122
|
"description": "A mixin providing common time-picker functionality.",
|
|
123
123
|
"name": "TimePickerMixin",
|
|
124
124
|
"members": [
|
|
125
|
+
{
|
|
126
|
+
"kind": "field",
|
|
127
|
+
"name": "accessibleDescriptionRef",
|
|
128
|
+
"privacy": "public",
|
|
129
|
+
"type": {
|
|
130
|
+
"text": "string"
|
|
131
|
+
},
|
|
132
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
133
|
+
"attribute": "accessible-description-ref",
|
|
134
|
+
"inheritedFrom": {
|
|
135
|
+
"name": "FieldMixin",
|
|
136
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
125
139
|
{
|
|
126
140
|
"kind": "field",
|
|
127
141
|
"name": "accessibleName",
|
|
@@ -129,7 +143,7 @@
|
|
|
129
143
|
"type": {
|
|
130
144
|
"text": "string"
|
|
131
145
|
},
|
|
132
|
-
"description": "String used to label the component
|
|
146
|
+
"description": "String used to label the component for screen reader users.",
|
|
133
147
|
"attribute": "accessible-name",
|
|
134
148
|
"inheritedFrom": {
|
|
135
149
|
"name": "FieldMixin",
|
|
@@ -143,7 +157,7 @@
|
|
|
143
157
|
"type": {
|
|
144
158
|
"text": "string"
|
|
145
159
|
},
|
|
146
|
-
"description": "
|
|
160
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
147
161
|
"attribute": "accessible-name-ref",
|
|
148
162
|
"inheritedFrom": {
|
|
149
163
|
"name": "FieldMixin",
|
|
@@ -301,7 +315,7 @@
|
|
|
301
315
|
"type": {
|
|
302
316
|
"text": "Object"
|
|
303
317
|
},
|
|
304
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides both the\ntime parsing and formatting functions.\n\nThe object has the following JSON structure:\n\n```js\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\nNOTE: `formatTime` and `parseTime` must be implemented in a\ncompatible manner to ensure the component works properly.",
|
|
318
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides both the\ntime parsing and formatting functions.\n\nThe object has the following JSON structure:\n\n```js\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\nNOTE: `formatTime` and `parseTime` must be implemented in a\ncompatible manner to ensure the component works properly.\n\nNOTE: these functions only apply to the text shown in the input field and\nin the dropdown. The `value`, `min` and `max` properties always use the\nISO 8601 format, and are never passed to `parseTime`, so implementations\ndo not need to accept ISO 8601 input.",
|
|
305
319
|
"attribute": "i18n",
|
|
306
320
|
"inheritedFrom": {
|
|
307
321
|
"name": "I18nMixin",
|
|
@@ -545,12 +559,24 @@
|
|
|
545
559
|
}
|
|
546
560
|
],
|
|
547
561
|
"attributes": [
|
|
562
|
+
{
|
|
563
|
+
"name": "accessible-description-ref",
|
|
564
|
+
"type": {
|
|
565
|
+
"text": "string"
|
|
566
|
+
},
|
|
567
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
568
|
+
"fieldName": "accessibleDescriptionRef",
|
|
569
|
+
"inheritedFrom": {
|
|
570
|
+
"name": "FieldMixin",
|
|
571
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
572
|
+
}
|
|
573
|
+
},
|
|
548
574
|
{
|
|
549
575
|
"name": "accessible-name",
|
|
550
576
|
"type": {
|
|
551
577
|
"text": "string"
|
|
552
578
|
},
|
|
553
|
-
"description": "String used to label the component
|
|
579
|
+
"description": "String used to label the component for screen reader users.",
|
|
554
580
|
"fieldName": "accessibleName",
|
|
555
581
|
"inheritedFrom": {
|
|
556
582
|
"name": "FieldMixin",
|
|
@@ -562,7 +588,7 @@
|
|
|
562
588
|
"type": {
|
|
563
589
|
"text": "string"
|
|
564
590
|
},
|
|
565
|
-
"description": "
|
|
591
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
566
592
|
"fieldName": "accessibleNameRef",
|
|
567
593
|
"inheritedFrom": {
|
|
568
594
|
"name": "FieldMixin",
|
|
@@ -887,6 +913,20 @@
|
|
|
887
913
|
"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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](#/elements/vaadin-item).\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",
|
|
888
914
|
"name": "TimePicker",
|
|
889
915
|
"members": [
|
|
916
|
+
{
|
|
917
|
+
"kind": "field",
|
|
918
|
+
"name": "accessibleDescriptionRef",
|
|
919
|
+
"privacy": "public",
|
|
920
|
+
"type": {
|
|
921
|
+
"text": "string"
|
|
922
|
+
},
|
|
923
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
924
|
+
"attribute": "accessible-description-ref",
|
|
925
|
+
"inheritedFrom": {
|
|
926
|
+
"name": "FieldMixin",
|
|
927
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
928
|
+
}
|
|
929
|
+
},
|
|
890
930
|
{
|
|
891
931
|
"kind": "field",
|
|
892
932
|
"name": "accessibleName",
|
|
@@ -894,7 +934,7 @@
|
|
|
894
934
|
"type": {
|
|
895
935
|
"text": "string"
|
|
896
936
|
},
|
|
897
|
-
"description": "String used to label the component
|
|
937
|
+
"description": "String used to label the component for screen reader users.",
|
|
898
938
|
"attribute": "accessible-name",
|
|
899
939
|
"inheritedFrom": {
|
|
900
940
|
"name": "FieldMixin",
|
|
@@ -908,7 +948,7 @@
|
|
|
908
948
|
"type": {
|
|
909
949
|
"text": "string"
|
|
910
950
|
},
|
|
911
|
-
"description": "
|
|
951
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
912
952
|
"attribute": "accessible-name-ref",
|
|
913
953
|
"inheritedFrom": {
|
|
914
954
|
"name": "FieldMixin",
|
|
@@ -1066,7 +1106,7 @@
|
|
|
1066
1106
|
"type": {
|
|
1067
1107
|
"text": "Object"
|
|
1068
1108
|
},
|
|
1069
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides both the\ntime parsing and formatting functions.\n\nThe object has the following JSON structure:\n\n```js\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\nNOTE: `formatTime` and `parseTime` must be implemented in a\ncompatible manner to ensure the component works properly.",
|
|
1109
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides both the\ntime parsing and formatting functions.\n\nThe object has the following JSON structure:\n\n```js\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\nNOTE: `formatTime` and `parseTime` must be implemented in a\ncompatible manner to ensure the component works properly.\n\nNOTE: these functions only apply to the text shown in the input field and\nin the dropdown. The `value`, `min` and `max` properties always use the\nISO 8601 format, and are never passed to `parseTime`, so implementations\ndo not need to accept ISO 8601 input.",
|
|
1070
1110
|
"attribute": "i18n",
|
|
1071
1111
|
"inheritedFrom": {
|
|
1072
1112
|
"name": "I18nMixin",
|
|
@@ -1345,41 +1385,25 @@
|
|
|
1345
1385
|
"name": "value-changed"
|
|
1346
1386
|
}
|
|
1347
1387
|
],
|
|
1348
|
-
"
|
|
1349
|
-
{
|
|
1350
|
-
"name": "TimePickerMixin",
|
|
1351
|
-
"module": "src/vaadin-time-picker-mixin.js"
|
|
1352
|
-
},
|
|
1353
|
-
{
|
|
1354
|
-
"name": "ThemableMixin",
|
|
1355
|
-
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
1356
|
-
},
|
|
1357
|
-
{
|
|
1358
|
-
"name": "ElementMixin",
|
|
1359
|
-
"package": "@vaadin/component-base/src/element-mixin.js"
|
|
1360
|
-
},
|
|
1388
|
+
"attributes": [
|
|
1361
1389
|
{
|
|
1362
|
-
"name": "
|
|
1363
|
-
"
|
|
1390
|
+
"name": "accessible-description-ref",
|
|
1391
|
+
"type": {
|
|
1392
|
+
"text": "string"
|
|
1393
|
+
},
|
|
1394
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
1395
|
+
"fieldName": "accessibleDescriptionRef",
|
|
1396
|
+
"inheritedFrom": {
|
|
1397
|
+
"name": "FieldMixin",
|
|
1398
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
1399
|
+
}
|
|
1364
1400
|
},
|
|
1365
|
-
{
|
|
1366
|
-
"name": "LumoInjectionMixin",
|
|
1367
|
-
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
1368
|
-
}
|
|
1369
|
-
],
|
|
1370
|
-
"superclass": {
|
|
1371
|
-
"name": "LitElement",
|
|
1372
|
-
"package": "lit"
|
|
1373
|
-
},
|
|
1374
|
-
"tagName": "vaadin-time-picker",
|
|
1375
|
-
"customElement": true,
|
|
1376
|
-
"attributes": [
|
|
1377
1401
|
{
|
|
1378
1402
|
"name": "accessible-name",
|
|
1379
1403
|
"type": {
|
|
1380
1404
|
"text": "string"
|
|
1381
1405
|
},
|
|
1382
|
-
"description": "String used to label the component
|
|
1406
|
+
"description": "String used to label the component for screen reader users.",
|
|
1383
1407
|
"fieldName": "accessibleName",
|
|
1384
1408
|
"inheritedFrom": {
|
|
1385
1409
|
"name": "FieldMixin",
|
|
@@ -1391,7 +1415,7 @@
|
|
|
1391
1415
|
"type": {
|
|
1392
1416
|
"text": "string"
|
|
1393
1417
|
},
|
|
1394
|
-
"description": "
|
|
1418
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
1395
1419
|
"fieldName": "accessibleNameRef",
|
|
1396
1420
|
"inheritedFrom": {
|
|
1397
1421
|
"name": "FieldMixin",
|
|
@@ -1650,6 +1674,13 @@
|
|
|
1650
1674
|
"module": "src/vaadin-time-picker-mixin.js"
|
|
1651
1675
|
}
|
|
1652
1676
|
},
|
|
1677
|
+
{
|
|
1678
|
+
"type": {
|
|
1679
|
+
"text": "string"
|
|
1680
|
+
},
|
|
1681
|
+
"description": "The theme variants to apply to the component.",
|
|
1682
|
+
"name": "theme"
|
|
1683
|
+
},
|
|
1653
1684
|
{
|
|
1654
1685
|
"name": "title",
|
|
1655
1686
|
"type": {
|
|
@@ -1674,7 +1705,35 @@
|
|
|
1674
1705
|
"module": "src/vaadin-time-picker-mixin.js"
|
|
1675
1706
|
}
|
|
1676
1707
|
}
|
|
1677
|
-
]
|
|
1708
|
+
],
|
|
1709
|
+
"mixins": [
|
|
1710
|
+
{
|
|
1711
|
+
"name": "TimePickerMixin",
|
|
1712
|
+
"module": "src/vaadin-time-picker-mixin.js"
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
"name": "ThemableMixin",
|
|
1716
|
+
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
"name": "ElementMixin",
|
|
1720
|
+
"package": "@vaadin/component-base/src/element-mixin.js"
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
"name": "PolylitMixin",
|
|
1724
|
+
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"name": "LumoInjectionMixin",
|
|
1728
|
+
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
1729
|
+
}
|
|
1730
|
+
],
|
|
1731
|
+
"superclass": {
|
|
1732
|
+
"name": "LitElement",
|
|
1733
|
+
"package": "lit"
|
|
1734
|
+
},
|
|
1735
|
+
"tagName": "vaadin-time-picker",
|
|
1736
|
+
"customElement": true
|
|
1678
1737
|
}
|
|
1679
1738
|
],
|
|
1680
1739
|
"exports": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/time-picker",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.3.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "
|
|
39
|
-
"@vaadin/combo-box": "
|
|
40
|
-
"@vaadin/component-base": "
|
|
41
|
-
"@vaadin/field-base": "
|
|
42
|
-
"@vaadin/input-container": "
|
|
43
|
-
"@vaadin/item": "
|
|
44
|
-
"@vaadin/overlay": "
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
38
|
+
"@vaadin/a11y-base": "25.3.0-alpha10",
|
|
39
|
+
"@vaadin/combo-box": "25.3.0-alpha10",
|
|
40
|
+
"@vaadin/component-base": "25.3.0-alpha10",
|
|
41
|
+
"@vaadin/field-base": "25.3.0-alpha10",
|
|
42
|
+
"@vaadin/input-container": "25.3.0-alpha10",
|
|
43
|
+
"@vaadin/item": "25.3.0-alpha10",
|
|
44
|
+
"@vaadin/overlay": "25.3.0-alpha10",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-alpha10",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/aura": "
|
|
50
|
-
"@vaadin/chai-plugins": "
|
|
51
|
-
"@vaadin/test-runner-commands": "
|
|
49
|
+
"@vaadin/aura": "25.3.0-alpha10",
|
|
50
|
+
"@vaadin/chai-plugins": "25.3.0-alpha10",
|
|
51
|
+
"@vaadin/test-runner-commands": "25.3.0-alpha10",
|
|
52
52
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
53
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
53
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-alpha10",
|
|
54
54
|
"sinon": "^22.0.0"
|
|
55
55
|
},
|
|
56
56
|
"customElements": "custom-elements.json",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"web-types.json",
|
|
59
59
|
"web-types.lit.json"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "f2833abdf9b613fa0d0ed216830e3f4de87b7dac"
|
|
62
62
|
}
|
|
@@ -34,12 +34,11 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
34
34
|
*
|
|
35
35
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
36
36
|
*
|
|
37
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
37
38
|
* @customElement vaadin-time-picker-item
|
|
38
39
|
* @private
|
|
39
40
|
*/
|
|
40
|
-
|
|
41
|
-
ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
|
|
42
|
-
) {
|
|
41
|
+
class TimePickerItem extends ComboBoxItemMixin(ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
43
42
|
static get is() {
|
|
44
43
|
return 'vaadin-time-picker-item';
|
|
45
44
|
}
|
|
@@ -60,3 +59,5 @@ export class TimePickerItem extends ComboBoxItemMixin(
|
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
defineCustomElement(TimePickerItem);
|
|
62
|
+
|
|
63
|
+
export { TimePickerItem };
|
|
@@ -129,6 +129,11 @@ export declare class TimePickerMixinClass {
|
|
|
129
129
|
*
|
|
130
130
|
* NOTE: `formatTime` and `parseTime` must be implemented in a
|
|
131
131
|
* compatible manner to ensure the component works properly.
|
|
132
|
+
*
|
|
133
|
+
* NOTE: these functions only apply to the text shown in the input field and
|
|
134
|
+
* in the dropdown. The `value`, `min` and `max` properties always use the
|
|
135
|
+
* ISO 8601 format, and are never passed to `parseTime`, so implementations
|
|
136
|
+
* do not need to accept ISO 8601 input.
|
|
132
137
|
*/
|
|
133
138
|
i18n: TimePickerI18n;
|
|
134
139
|
}
|
|
@@ -108,7 +108,7 @@ export const TimePickerMixin = (superClass) =>
|
|
|
108
108
|
static get observers() {
|
|
109
109
|
return [
|
|
110
110
|
'_openedOrItemsChanged(opened, _dropdownItems)',
|
|
111
|
-
'_updateScroller(opened, _dropdownItems, _focusedIndex, _theme)',
|
|
111
|
+
'_updateScroller(opened, _dropdownItems, _focusedIndex, _theme, _comboBoxValue)',
|
|
112
112
|
'__updateAriaAttributes(_dropdownItems, opened, inputElement)',
|
|
113
113
|
'__updateDropdownItems(__effectiveI18n, min, max, step)',
|
|
114
114
|
];
|
|
@@ -169,6 +169,11 @@ export const TimePickerMixin = (superClass) =>
|
|
|
169
169
|
* NOTE: `formatTime` and `parseTime` must be implemented in a
|
|
170
170
|
* compatible manner to ensure the component works properly.
|
|
171
171
|
*
|
|
172
|
+
* NOTE: these functions only apply to the text shown in the input field and
|
|
173
|
+
* in the dropdown. The `value`, `min` and `max` properties always use the
|
|
174
|
+
* ISO 8601 format, and are never passed to `parseTime`, so implementations
|
|
175
|
+
* do not need to accept ISO 8601 input.
|
|
176
|
+
*
|
|
172
177
|
* @type {!TimePickerI18n}
|
|
173
178
|
*/
|
|
174
179
|
get i18n() {
|
|
@@ -225,16 +230,6 @@ export const TimePickerMixin = (superClass) =>
|
|
|
225
230
|
this.addController(this._tooltipController);
|
|
226
231
|
}
|
|
227
232
|
|
|
228
|
-
/** @protected */
|
|
229
|
-
updated(props) {
|
|
230
|
-
super.updated(props);
|
|
231
|
-
|
|
232
|
-
// Update selected item in the scroller
|
|
233
|
-
if (props.has('_comboBoxValue') && this._dropdownItems) {
|
|
234
|
-
this._scroller.selectedItem = this._dropdownItems.find((item) => item.value === this._comboBoxValue);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
233
|
/**
|
|
239
234
|
* Returns true if the current input value satisfies all constraints (if any).
|
|
240
235
|
* You can override this method for custom validations.
|
|
@@ -244,7 +239,7 @@ export const TimePickerMixin = (superClass) =>
|
|
|
244
239
|
checkValidity() {
|
|
245
240
|
return !!(
|
|
246
241
|
this.inputElement.checkValidity() &&
|
|
247
|
-
(!this.value || this._timeAllowed(
|
|
242
|
+
(!this.value || this._timeAllowed(parseISOTime(this.value))) &&
|
|
248
243
|
(!this._comboBoxValue || this.__effectiveI18n.parseTime(this._comboBoxValue))
|
|
249
244
|
);
|
|
250
245
|
}
|
|
@@ -259,17 +254,20 @@ export const TimePickerMixin = (superClass) =>
|
|
|
259
254
|
}
|
|
260
255
|
|
|
261
256
|
/** @private */
|
|
262
|
-
_updateScroller(opened, items, focusedIndex, theme) {
|
|
257
|
+
_updateScroller(opened, items, focusedIndex, theme, comboBoxValue) {
|
|
263
258
|
if (opened) {
|
|
264
259
|
this._scroller.style.maxHeight =
|
|
265
260
|
getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`) || '65vh';
|
|
266
261
|
}
|
|
267
262
|
|
|
263
|
+
const isClosing = this.hasAttribute('closing');
|
|
264
|
+
|
|
268
265
|
this._scroller.setProperties({
|
|
269
|
-
items: opened ? items : [],
|
|
266
|
+
items: opened || isClosing ? items : [],
|
|
270
267
|
opened,
|
|
271
268
|
focusedIndex,
|
|
272
269
|
theme,
|
|
270
|
+
selectedItem: items?.find((item) => item.value === comboBoxValue),
|
|
273
271
|
});
|
|
274
272
|
}
|
|
275
273
|
|
|
@@ -516,14 +514,15 @@ export const TimePickerMixin = (superClass) =>
|
|
|
516
514
|
|
|
517
515
|
this._dropdownItems = this.__generateDropdownList(minSec, maxSec, step);
|
|
518
516
|
|
|
517
|
+
const parsedValue = validateTime(parseISOTime(this.value), step);
|
|
518
|
+
|
|
519
519
|
if (step !== this.__oldStep) {
|
|
520
520
|
this.__oldStep = step;
|
|
521
|
-
|
|
522
|
-
this.__updateValue(parsedObj);
|
|
521
|
+
this.__updateValue(parsedValue);
|
|
523
522
|
}
|
|
524
523
|
|
|
525
524
|
if (this.value) {
|
|
526
|
-
this._comboBoxValue = effectiveI18n.formatTime(
|
|
525
|
+
this._comboBoxValue = effectiveI18n.formatTime(parsedValue);
|
|
527
526
|
}
|
|
528
527
|
}
|
|
529
528
|
|
|
@@ -656,12 +655,12 @@ export const TimePickerMixin = (superClass) =>
|
|
|
656
655
|
* @protected
|
|
657
656
|
*/
|
|
658
657
|
_timeAllowed(time) {
|
|
659
|
-
const parsedMin =
|
|
660
|
-
const parsedMax =
|
|
658
|
+
const parsedMin = parseISOTime(this.min || MIN_ALLOWED_TIME);
|
|
659
|
+
const parsedMax = parseISOTime(this.max || MAX_ALLOWED_TIME);
|
|
661
660
|
|
|
662
661
|
return (
|
|
663
|
-
(!
|
|
664
|
-
(!
|
|
662
|
+
(!parsedMin || this.__getMsec(time) >= this.__getMsec(parsedMin)) &&
|
|
663
|
+
(!parsedMax || this.__getMsec(time) <= this.__getMsec(parsedMax))
|
|
665
664
|
);
|
|
666
665
|
}
|
|
667
666
|
|
|
@@ -19,8 +19,9 @@ import { timePickerOverlayStyles } from './styles/vaadin-time-picker-overlay-bas
|
|
|
19
19
|
*
|
|
20
20
|
* @extends HTMLElement
|
|
21
21
|
* @private
|
|
22
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
class TimePickerOverlay extends ComboBoxOverlayMixin(
|
|
24
25
|
OverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))),
|
|
25
26
|
) {
|
|
26
27
|
static get is() {
|
|
@@ -44,3 +45,5 @@ export class TimePickerOverlay extends ComboBoxOverlayMixin(
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
defineCustomElement(TimePickerOverlay);
|
|
48
|
+
|
|
49
|
+
export { TimePickerOverlay };
|
|
@@ -16,7 +16,7 @@ import { timePickerScrollerStyles } from './styles/vaadin-time-picker-scroller-b
|
|
|
16
16
|
* @extends HTMLElement
|
|
17
17
|
* @private
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
class TimePickerScroller extends ComboBoxScrollerMixin(PolylitMixin(LitElement)) {
|
|
20
20
|
static get is() {
|
|
21
21
|
return 'vaadin-time-picker-scroller';
|
|
22
22
|
}
|
|
@@ -36,3 +36,5 @@ export class TimePickerScroller extends ComboBoxScrollerMixin(PolylitMixin(LitEl
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
defineCustomElement(TimePickerScroller);
|
|
39
|
+
|
|
40
|
+
export { TimePickerScroller };
|
|
@@ -103,6 +103,7 @@ import { TimePickerMixin } from './vaadin-time-picker-mixin.js';
|
|
|
103
103
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
104
104
|
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
105
105
|
*
|
|
106
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
106
107
|
* @customElement vaadin-time-picker
|
|
107
108
|
* @extends HTMLElement
|
|
108
109
|
*/
|
package/web-types.json
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/time-picker",
|
|
4
|
-
"version": "25.
|
|
4
|
+
"version": "25.3.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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.
|
|
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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha10/#/elements/vaadin-item).\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
|
+
{
|
|
14
|
+
"name": "accessible-description-ref",
|
|
15
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"string"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
13
22
|
{
|
|
14
23
|
"name": "accessible-name",
|
|
15
|
-
"description": "String used to label the component
|
|
24
|
+
"description": "String used to label the component for screen reader users.",
|
|
16
25
|
"value": {
|
|
17
26
|
"type": [
|
|
18
27
|
"string"
|
|
@@ -21,7 +30,7 @@
|
|
|
21
30
|
},
|
|
22
31
|
{
|
|
23
32
|
"name": "accessible-name-ref",
|
|
24
|
-
"description": "
|
|
33
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
25
34
|
"value": {
|
|
26
35
|
"type": [
|
|
27
36
|
"string"
|
|
@@ -213,9 +222,7 @@
|
|
|
213
222
|
"description": "The theme variants to apply to the component.",
|
|
214
223
|
"value": {
|
|
215
224
|
"type": [
|
|
216
|
-
"string"
|
|
217
|
-
"null",
|
|
218
|
-
"undefined"
|
|
225
|
+
"string"
|
|
219
226
|
]
|
|
220
227
|
}
|
|
221
228
|
},
|
|
@@ -240,9 +247,18 @@
|
|
|
240
247
|
],
|
|
241
248
|
"js": {
|
|
242
249
|
"properties": [
|
|
250
|
+
{
|
|
251
|
+
"name": "accessibleDescriptionRef",
|
|
252
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
253
|
+
"value": {
|
|
254
|
+
"type": [
|
|
255
|
+
"string"
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
},
|
|
243
259
|
{
|
|
244
260
|
"name": "accessibleName",
|
|
245
|
-
"description": "String used to label the component
|
|
261
|
+
"description": "String used to label the component for screen reader users.",
|
|
246
262
|
"value": {
|
|
247
263
|
"type": [
|
|
248
264
|
"string"
|
|
@@ -251,7 +267,7 @@
|
|
|
251
267
|
},
|
|
252
268
|
{
|
|
253
269
|
"name": "accessibleNameRef",
|
|
254
|
-
"description": "
|
|
270
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
255
271
|
"value": {
|
|
256
272
|
"type": [
|
|
257
273
|
"string"
|
|
@@ -332,7 +348,7 @@
|
|
|
332
348
|
},
|
|
333
349
|
{
|
|
334
350
|
"name": "i18n",
|
|
335
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides both the\ntime parsing and formatting functions.\n\nThe object has the following JSON structure:\n\n```js\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\nNOTE: `formatTime` and `parseTime` must be implemented in a\ncompatible manner to ensure the component works properly.",
|
|
351
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides both the\ntime parsing and formatting functions.\n\nThe object has the following JSON structure:\n\n```js\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\nNOTE: `formatTime` and `parseTime` must be implemented in a\ncompatible manner to ensure the component works properly.\n\nNOTE: these functions only apply to the text shown in the input field and\nin the dropdown. The `value`, `min` and `max` properties always use the\nISO 8601 format, and are never passed to `parseTime`, so implementations\ndo not need to accept ISO 8601 input.",
|
|
336
352
|
"value": {
|
|
337
353
|
"type": [
|
|
338
354
|
"Object"
|
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.
|
|
4
|
+
"version": "25.3.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,19 +16,26 @@
|
|
|
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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.
|
|
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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha10/#/elements/vaadin-item).\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
|
+
{
|
|
23
|
+
"name": ".accessibleDescriptionRef",
|
|
24
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
22
29
|
{
|
|
23
30
|
"name": ".accessibleName",
|
|
24
|
-
"description": "String used to label the component
|
|
31
|
+
"description": "String used to label the component for screen reader users.",
|
|
25
32
|
"value": {
|
|
26
33
|
"kind": "expression"
|
|
27
34
|
}
|
|
28
35
|
},
|
|
29
36
|
{
|
|
30
37
|
"name": ".accessibleNameRef",
|
|
31
|
-
"description": "
|
|
38
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
32
39
|
"value": {
|
|
33
40
|
"kind": "expression"
|
|
34
41
|
}
|
|
@@ -91,7 +98,7 @@
|
|
|
91
98
|
},
|
|
92
99
|
{
|
|
93
100
|
"name": ".i18n",
|
|
94
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides both the\ntime parsing and formatting functions.\n\nThe object has the following JSON structure:\n\n```js\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\nNOTE: `formatTime` and `parseTime` must be implemented in a\ncompatible manner to ensure the component works properly.",
|
|
101
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides both the\ntime parsing and formatting functions.\n\nThe object has the following JSON structure:\n\n```js\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\nNOTE: `formatTime` and `parseTime` must be implemented in a\ncompatible manner to ensure the component works properly.\n\nNOTE: these functions only apply to the text shown in the input field and\nin the dropdown. The `value`, `min` and `max` properties always use the\nISO 8601 format, and are never passed to `parseTime`, so implementations\ndo not need to accept ISO 8601 input.",
|
|
95
102
|
"value": {
|
|
96
103
|
"kind": "expression"
|
|
97
104
|
}
|