@heartlandone/vega 2.85.0 → 2.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-54327b0a.js → app-globals-3080f55a.js} +5 -5
- package/dist/cjs/{code-block-6da521e6.js → code-block-c6c70464.js} +6 -0
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-f3f35f94.js → component-value-history-controller-slimmer.abstract-a523b747.js} +2 -2
- package/dist/cjs/{content-state-89fafb3b.js → content-state-efd3b1a7.js} +1 -1
- package/dist/cjs/{image-annotation-action-025389a7.js → image-annotation-action-93bace08.js} +2 -2
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/loader.cjs.js +6 -6
- package/dist/cjs/{public-rules-fc52d624.js → public-rules-3cd0f182.js} +3 -3
- package/dist/cjs/{range-93cc8ab1.js → range-c9bde0b4.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-fd3711fb.js → rich-text-editor-required-rule-d1f0509c.js} +1 -1
- package/dist/cjs/{split-cell-operation-532fb9f0.js → split-cell-operation-6a59c9b0.js} +2 -2
- package/dist/cjs/{token-extension-4f6ed976.js → token-extension-d7d2ead6.js} +19 -6
- package/dist/cjs/vega-calendar_4.cjs.entry.js +4 -3
- package/dist/cjs/vega-code-block.cjs.entry.js +3 -3
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -1
- package/dist/cjs/vega-dialog_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +11 -1
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +12 -10
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +3 -3
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +6 -6
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +157 -24
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +5 -11
- package/dist/cjs/vega.cjs.js +6 -6
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +2 -2
- package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +2 -1
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +3 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +17 -1
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +31 -1
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +10 -0
- package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +1 -1
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-controller.js +10 -8
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-zindex-controller.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +8 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-toolbar-button-renderer.js +5 -1
- package/dist/collection/components/vega-selection-tile/slimmers/renderers/vega-selection-tile-renderer.js +71 -10
- package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.js +39 -11
- package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.css +1 -3
- package/dist/collection/components/vega-selection-tile/vega-selection-tile.css +23 -18
- package/dist/collection/components/vega-selection-tile/vega-selection-tile.js +45 -1
- package/dist/collection/components/vega-time-picker/vega-time-picker.js +6 -12
- package/dist/esm/{app-globals-b1999c09.js → app-globals-37536ac9.js} +5 -5
- package/dist/esm/{code-block-e43c8120.js → code-block-10be3916.js} +6 -0
- package/dist/esm/{component-value-history-controller-slimmer.abstract-60c1910e.js → component-value-history-controller-slimmer.abstract-82d51b7a.js} +2 -2
- package/dist/esm/{content-state-d363f2ca.js → content-state-afeb700d.js} +1 -1
- package/dist/esm/{image-annotation-action-008ca25b.js → image-annotation-action-bad7c565.js} +2 -2
- package/dist/esm/index.js +6 -6
- package/dist/esm/loader.js +6 -6
- package/dist/esm/{public-rules-1561e357.js → public-rules-f54e6f39.js} +3 -3
- package/dist/esm/{range-784d5ec8.js → range-f32f9185.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-8768bc8d.js → rich-text-editor-required-rule-627fd7e4.js} +1 -1
- package/dist/esm/{split-cell-operation-35ce149b.js → split-cell-operation-90c30861.js} +2 -2
- package/dist/esm/{token-extension-23b5ab65.js → token-extension-728c0678.js} +19 -6
- package/dist/esm/vega-calendar_4.entry.js +4 -3
- package/dist/esm/vega-code-block.entry.js +3 -3
- package/dist/esm/vega-date-picker_2.entry.js +13 -1
- package/dist/esm/vega-dialog_2.entry.js +1 -1
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-input-phone-number.entry.js +11 -1
- package/dist/esm/vega-left-nav_5.entry.js +12 -10
- package/dist/esm/vega-rich-text-content.entry.js +3 -3
- package/dist/esm/vega-rich-text-editor_4.entry.js +6 -6
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +3 -3
- package/dist/esm/vega-selection-tile_2.entry.js +157 -24
- package/dist/esm/vega-time-picker_2.entry.js +5 -11
- package/dist/esm/vega.js +6 -6
- package/dist/sri/vega-sri-manifest.json +78 -78
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +1 -0
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +8 -0
- package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +2 -0
- package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-controller.d.ts +2 -1
- package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/interface.d.ts +5 -0
- package/dist/types/components/vega-selection-tile/slimmers/renderers/vega-selection-tile-renderer.d.ts +12 -0
- package/dist/types/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.d.ts +0 -1
- package/dist/types/components/vega-selection-tile/vega-selection-tile.d.ts +2 -0
- package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +5 -11
- package/dist/types/components.d.ts +14 -4
- package/dist/types/types/public-api.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-2ae5acfc.entry.js → p-268e84e0.entry.js} +1 -1
- package/dist/vega/p-2edc066c.entry.js +1 -0
- package/dist/vega/{p-386895e9.js → p-33234385.js} +1 -1
- package/dist/vega/{p-487ecdb0.entry.js → p-3d0ba2c6.entry.js} +1 -1
- package/dist/vega/{p-c15a58b5.entry.js → p-4c90d013.entry.js} +1 -1
- package/dist/vega/p-5087fa1e.entry.js +1 -0
- package/dist/vega/{p-1d30cab2.js → p-51b2b3de.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-a07c5dae.js → p-6817b9bd.js} +1 -1
- package/dist/vega/{p-fcb0d4d8.js → p-7730bace.js} +1 -1
- package/dist/vega/p-818da356.js +1 -0
- package/dist/vega/{p-fb05335d.js → p-84eb3b9c.js} +1 -1
- package/dist/vega/{p-77300901.js → p-93afdfc3.js} +1 -1
- package/dist/vega/p-a9f34735.entry.js +1 -0
- package/dist/vega/{p-c2e1f33d.entry.js → p-aaf44879.entry.js} +1 -1
- package/dist/vega/p-af00e6e2.entry.js +1 -0
- package/dist/vega/p-ce61d23f.entry.js +1 -0
- package/dist/vega/p-d4e519a0.js +1 -0
- package/dist/vega/{p-fcce494e.js → p-e1709e59.js} +1 -1
- package/dist/vega/{p-77754d62.entry.js → p-e95cb28f.entry.js} +1 -1
- package/dist/vega/{p-5904616e.js → p-f5f5a0d9.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-56c1a8ac.entry.js +0 -1
- package/dist/vega/p-64b566be.entry.js +0 -1
- package/dist/vega/p-887b3e2d.entry.js +0 -1
- package/dist/vega/p-9763fbbe.entry.js +0 -1
- package/dist/vega/p-bceee942.entry.js +0 -1
- package/dist/vega/p-c74060a7.js +0 -1
- package/dist/vega/p-f54fb4e5.js +0 -1
|
@@ -1084,6 +1084,22 @@
|
|
|
1084
1084
|
max-height: 600px;
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
|
+
:host(.fill-container) .calendar .container__main,
|
|
1088
|
+
:host(.fill-container.dual-months) .calendar .container__main {
|
|
1089
|
+
max-width: 100%;
|
|
1090
|
+
max-height: 100%;
|
|
1091
|
+
}
|
|
1092
|
+
:host(.fill-container) .calendar .container__main .container__days,
|
|
1093
|
+
:host(.fill-container.dual-months) .calendar .container__main .container__days {
|
|
1094
|
+
width: 100%;
|
|
1095
|
+
min-height: 0px;
|
|
1096
|
+
flex: 1 1 auto;
|
|
1097
|
+
}
|
|
1098
|
+
:host(.fill-container) .calendar.static-height .container__main,
|
|
1099
|
+
:host(.fill-container.dual-months) .calendar.static-height .container__main {
|
|
1100
|
+
aspect-ratio: auto;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1087
1103
|
.calendar .container__main {
|
|
1088
1104
|
display: flex;
|
|
1089
1105
|
flex-direction: column;
|
|
@@ -1155,7 +1171,7 @@
|
|
|
1155
1171
|
align-content: flex-start;
|
|
1156
1172
|
}
|
|
1157
1173
|
|
|
1158
|
-
.calendar:not(.static-height) .container__days {
|
|
1174
|
+
:host(:not(.fill-container)) .calendar:not(.static-height) .container__days {
|
|
1159
1175
|
flex: none;
|
|
1160
1176
|
}
|
|
1161
1177
|
|
|
@@ -51,6 +51,13 @@ export class VegaDatePickerCalendar {
|
|
|
51
51
|
* @vegaVersion 2.72.0
|
|
52
52
|
*/
|
|
53
53
|
this.size = 'regular';
|
|
54
|
+
/**
|
|
55
|
+
* Specifies whether to allow the calendar picker to fill the width and height of its parent container.
|
|
56
|
+
* As default, the calendar picker has a max width and height limit based on the size and mode variant.
|
|
57
|
+
*
|
|
58
|
+
* @vegaVersion 2.86.0
|
|
59
|
+
*/
|
|
60
|
+
this.fillContainer = false;
|
|
54
61
|
/**
|
|
55
62
|
* Specifies the selection mode of the date picker calendar.
|
|
56
63
|
*
|
|
@@ -81,6 +88,7 @@ export class VegaDatePickerCalendar {
|
|
|
81
88
|
this.clearButton = false;
|
|
82
89
|
/**
|
|
83
90
|
* Specifies the calendar is static height.
|
|
91
|
+
* It means the height of calendar will not change according to the number of weeks in the month.
|
|
84
92
|
*
|
|
85
93
|
* @vegaVersion 2.72.0
|
|
86
94
|
*/
|
|
@@ -170,6 +178,7 @@ export class VegaDatePickerCalendar {
|
|
|
170
178
|
return sanitizeVegaComponent(h(Host, { class: {
|
|
171
179
|
[this.size]: true,
|
|
172
180
|
[this.mode]: true,
|
|
181
|
+
'fill-container': this.fillContainer,
|
|
173
182
|
'mobile': this.isMobileDevice,
|
|
174
183
|
'dual-months': this.isDualMonths,
|
|
175
184
|
} }, this.renderer.render()), this.host);
|
|
@@ -209,6 +218,27 @@ export class VegaDatePickerCalendar {
|
|
|
209
218
|
"reflect": false,
|
|
210
219
|
"defaultValue": "'regular'"
|
|
211
220
|
},
|
|
221
|
+
"fillContainer": {
|
|
222
|
+
"type": "boolean",
|
|
223
|
+
"mutable": false,
|
|
224
|
+
"complexType": {
|
|
225
|
+
"original": "boolean",
|
|
226
|
+
"resolved": "boolean",
|
|
227
|
+
"references": {}
|
|
228
|
+
},
|
|
229
|
+
"required": false,
|
|
230
|
+
"optional": false,
|
|
231
|
+
"docs": {
|
|
232
|
+
"tags": [{
|
|
233
|
+
"name": "vegaVersion",
|
|
234
|
+
"text": "2.86.0"
|
|
235
|
+
}],
|
|
236
|
+
"text": "Specifies whether to allow the calendar picker to fill the width and height of its parent container.\n As default, the calendar picker has a max width and height limit based on the size and mode variant."
|
|
237
|
+
},
|
|
238
|
+
"attribute": "fill-container",
|
|
239
|
+
"reflect": false,
|
|
240
|
+
"defaultValue": "false"
|
|
241
|
+
},
|
|
212
242
|
"mode": {
|
|
213
243
|
"type": "string",
|
|
214
244
|
"mutable": false,
|
|
@@ -362,7 +392,7 @@ export class VegaDatePickerCalendar {
|
|
|
362
392
|
"name": "vegaVersion",
|
|
363
393
|
"text": "2.72.0"
|
|
364
394
|
}],
|
|
365
|
-
"text": "Specifies the calendar is static height."
|
|
395
|
+
"text": "Specifies the calendar is static height.\n It means the height of calendar will not change according to the number of weeks in the month."
|
|
366
396
|
},
|
|
367
397
|
"attribute": "static-height",
|
|
368
398
|
"reflect": false,
|
|
@@ -13,6 +13,7 @@ import { PhoneNumberInputRenderer } from './slimmers/renderers/phone-number-inpu
|
|
|
13
13
|
import { getCountryCallingCode } from '../../polyfill/libphonenumber';
|
|
14
14
|
import { VegaInputPhoneNumberValueController } from './slimmers/controllers/vega-input-phone-number-value-controller';
|
|
15
15
|
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics';
|
|
16
|
+
import { AriaAttributesValueMapper } from '../../helpers/slimmers/mutation-observer/aria-attributes-value-mapper';
|
|
16
17
|
import { FormFieldControllerSlimmer } from '../../helpers/slimmers/form-field-controller-slimmer';
|
|
17
18
|
import { ValidPhoneNumberRule } from '../../helpers/validator/rules/valid-phone-number-rule';
|
|
18
19
|
import { CountrySelectController } from './slimmers/controllers/country-select-controller';
|
|
@@ -34,6 +35,12 @@ export class VegaInputPhoneNumber {
|
|
|
34
35
|
this.countrySelectController = new CountrySelectController();
|
|
35
36
|
this.changeEventEmitter = createEventEmitSlimmer(VegaInputPhoneNumber, VegaChange);
|
|
36
37
|
this.countryChangeEventEmitter = createEventEmitSlimmer(VegaInputPhoneNumber, VegaCountryChange);
|
|
38
|
+
this.ariaAttributesValueMapper = new AriaAttributesValueMapper(() => this.host.shadowRoot.querySelector('vega-input'), {
|
|
39
|
+
'data-aria-label': {
|
|
40
|
+
dependency: ['data-aria-label', 'label'],
|
|
41
|
+
defaultValue: 'No label defined',
|
|
42
|
+
},
|
|
43
|
+
});
|
|
37
44
|
this.inputPhoneNumberEventPrevent = new ChildNodesEventPreventSlimmer([VegaChange], () => this.host, true);
|
|
38
45
|
this.formFieldController = new FormFieldControllerSlimmer({
|
|
39
46
|
propertyRules: [
|
|
@@ -699,6 +706,9 @@ __decorate([
|
|
|
699
706
|
__decorate([
|
|
700
707
|
InjectVegaSlimmer()
|
|
701
708
|
], VegaInputPhoneNumber.prototype, "countryChangeEventEmitter", void 0);
|
|
709
|
+
__decorate([
|
|
710
|
+
InjectVegaSlimmer()
|
|
711
|
+
], VegaInputPhoneNumber.prototype, "ariaAttributesValueMapper", void 0);
|
|
702
712
|
__decorate([
|
|
703
713
|
InjectVegaSlimmer()
|
|
704
714
|
], VegaInputPhoneNumber.prototype, "inputPhoneNumberEventPrevent", void 0);
|
|
@@ -55,7 +55,7 @@ export class VegaModalRenderer extends VegaSlimmer {
|
|
|
55
55
|
return (h("vega-box", { class: {
|
|
56
56
|
'vega-modal-content': true,
|
|
57
57
|
'vega-modal-content-with-scroll': this.isContentScrollable(),
|
|
58
|
-
}, padding: this.sectionPaddingState.getContentPadding(), maxHeight: this.contentMaxHeight, ref: (e) => (this.modalContent = e) },
|
|
58
|
+
}, padding: this.sectionPaddingState.getContentPadding(), maxHeight: this.contentMaxHeight, ref: (e) => (this.modalContent = e), role: this.isContentScrollable() ? 'document' : undefined, tabindex: this.isContentScrollable() ? '-1' : undefined },
|
|
59
59
|
h(Fragment, null,
|
|
60
60
|
h("slot", null),
|
|
61
61
|
h("slot", { name: "content" }),
|
|
@@ -19,13 +19,17 @@ export class VegaLeftNavBackdropController extends PageResizeObserverSlimmer {
|
|
|
19
19
|
this.updateBackdropUI(this.openState);
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
|
+
this.backdrop = null;
|
|
22
23
|
/* eslint-enable jsdoc/require-jsdoc*/
|
|
23
24
|
}
|
|
24
25
|
connectedCallback() {
|
|
25
|
-
this.backdrop
|
|
26
|
+
if (!this.backdrop || !this.backdrop.isConnected) {
|
|
27
|
+
this.backdrop = this.createBackdrop();
|
|
28
|
+
}
|
|
26
29
|
}
|
|
27
30
|
disconnectedCallback() {
|
|
28
31
|
this.backdrop && this.backdrop.remove();
|
|
32
|
+
this.backdrop = null;
|
|
29
33
|
}
|
|
30
34
|
watchOpenState(newState) {
|
|
31
35
|
this.updateBackdropUI(newState);
|
|
@@ -59,16 +63,14 @@ export class VegaLeftNavBackdropController extends PageResizeObserverSlimmer {
|
|
|
59
63
|
updateBackdropUI(state) {
|
|
60
64
|
// eslint-disable-next-line no-restricted-globals
|
|
61
65
|
const mainContent = document.querySelector('vega-left-nav + .vega-left-nav-content');
|
|
66
|
+
const backdrop = this.backdrop;
|
|
67
|
+
if (!backdrop)
|
|
68
|
+
return;
|
|
62
69
|
if (state === 'open') {
|
|
63
|
-
|
|
64
|
-
this.backdrop.visible = false;
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
this.backdrop.visible = true;
|
|
68
|
-
}
|
|
70
|
+
backdrop.visible = !mainContent || this.shouldShowBackdrop();
|
|
69
71
|
}
|
|
70
72
|
else {
|
|
71
|
-
|
|
73
|
+
backdrop.visible = false;
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
isLargeScreen() {
|
|
@@ -19,12 +19,12 @@ export class VegaLeftNavZIndexController extends VegaSlimmer {
|
|
|
19
19
|
updateZIndex() {
|
|
20
20
|
const backDrop = this.backdropController.getBackdrop();
|
|
21
21
|
if (this.openState == 'open') {
|
|
22
|
-
InternalVegaZIndexManager.setZIndex(backDrop, 'base');
|
|
22
|
+
backDrop && InternalVegaZIndexManager.setZIndex(backDrop, 'base');
|
|
23
23
|
InternalVegaZIndexManager.setZIndex(this.host, 'base');
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
26
|
executeAfterTransition(() => {
|
|
27
|
-
InternalVegaZIndexManager.removeZIndex(backDrop, 'base');
|
|
27
|
+
backDrop && InternalVegaZIndexManager.removeZIndex(backDrop, 'base');
|
|
28
28
|
InternalVegaZIndexManager.removeZIndex(this.host, 'base');
|
|
29
29
|
}, this.host, 300);
|
|
30
30
|
}
|
|
@@ -245,6 +245,12 @@ export class RTETextNode extends RTENode {
|
|
|
245
245
|
* @returns {string} HTML string from that depth onward.
|
|
246
246
|
*/
|
|
247
247
|
renderHtmlFromDepth(depth, options) {
|
|
248
|
+
// At depth 0 this is, by contract, equivalent to `toHtml`. Delegate
|
|
249
|
+
// so derived classes that override `toHtml` (token, and future RTE
|
|
250
|
+
// extensions) emit their own markup instead of falling back to the
|
|
251
|
+
// base text rendering. See VD-9042.
|
|
252
|
+
if (depth === 0)
|
|
253
|
+
return this.toHtml(options);
|
|
248
254
|
const annotation = this.getInlineHtmlAnnotationAtDepth(depth);
|
|
249
255
|
if (!annotation)
|
|
250
256
|
return this.renderTextStr(options);
|
package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js
CHANGED
|
@@ -110,6 +110,8 @@ export class VegaRTEToolbarButtonRenderer {
|
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* Renders a common toolbar button with optional icon, label, and arrow icon.
|
|
113
|
+
* When a tooltip is provided via `buttonProps.tooltip`, the button is wrapped
|
|
114
|
+
* in a `vega-tooltip` element, matching the behavior of default toolbar buttons.
|
|
113
115
|
*
|
|
114
116
|
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
115
117
|
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
@@ -117,9 +119,9 @@ export class VegaRTEToolbarButtonRenderer {
|
|
|
117
119
|
* @returns {VegaRTERenderResult} - The render result for the button.
|
|
118
120
|
*/
|
|
119
121
|
renderButton(h, editorContext, buttonProps) {
|
|
120
|
-
const { icon, label, showArrowIcon } = buttonProps;
|
|
122
|
+
const { icon, label, showArrowIcon, tooltip } = buttonProps;
|
|
121
123
|
const isDisabled = this.isDisabled(editorContext);
|
|
122
|
-
|
|
124
|
+
const button = h('vega-rich-text-editor-toolbar-button', {
|
|
123
125
|
disabled: isDisabled,
|
|
124
126
|
icon: icon,
|
|
125
127
|
hidden: this.isHidden(editorContext),
|
|
@@ -140,6 +142,10 @@ export class VegaRTEToolbarButtonRenderer {
|
|
|
140
142
|
})
|
|
141
143
|
: null,
|
|
142
144
|
].filter(isNonNullable));
|
|
145
|
+
if (tooltip === null || tooltip === void 0 ? void 0 : tooltip.text) {
|
|
146
|
+
return h('vega-tooltip', { text: tooltip.text, placement: ['bottom', 'top'] }, [button]);
|
|
147
|
+
}
|
|
148
|
+
return button;
|
|
143
149
|
}
|
|
144
150
|
/**
|
|
145
151
|
* Renders the button label.
|
|
@@ -14,6 +14,7 @@ export class FunctionToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer
|
|
|
14
14
|
this.renderButton(h, editorContext, {
|
|
15
15
|
label: 'Functions',
|
|
16
16
|
showArrowIcon: true,
|
|
17
|
+
tooltip: { text: 'Insert function' },
|
|
17
18
|
}),
|
|
18
19
|
this.renderDropdownListTemplate(h, FunctionToolbarButtonRenderer.FUNCTION_LIST),
|
|
19
20
|
]);
|
|
@@ -62,6 +62,7 @@ export class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRender
|
|
|
62
62
|
this.renderButton(createElement, editorContext, {
|
|
63
63
|
label: this.getLanguageLabelByKey(this.selectedLanguage),
|
|
64
64
|
showArrowIcon: true,
|
|
65
|
+
tooltip: { text: 'Select language' },
|
|
65
66
|
}),
|
|
66
67
|
]);
|
|
67
68
|
}
|
|
@@ -18,6 +18,7 @@ export class RTETableToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer
|
|
|
18
18
|
return createTablePopoverRenderer.render(h, super.renderButton(h, editorContext, {
|
|
19
19
|
showArrowIcon: true,
|
|
20
20
|
icon: 'rte-table',
|
|
21
|
+
tooltip: { text: 'Insert table' },
|
|
21
22
|
}));
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
@@ -20,7 +20,11 @@ export class RTETokenToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer
|
|
|
20
20
|
*/
|
|
21
21
|
render(createElement, editorContext) {
|
|
22
22
|
return this.renderDropdown(createElement, editorContext, {}, [
|
|
23
|
-
this.renderButton(createElement, editorContext, {
|
|
23
|
+
this.renderButton(createElement, editorContext, {
|
|
24
|
+
label: 'Tokens',
|
|
25
|
+
showArrowIcon: true,
|
|
26
|
+
tooltip: { text: 'Insert token' },
|
|
27
|
+
}),
|
|
24
28
|
this.renderDropdownListTemplate(createElement, this.tokenList),
|
|
25
29
|
]);
|
|
26
30
|
}
|
|
@@ -6,25 +6,83 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { h } from '@stencil/core';
|
|
8
8
|
import { MapToComponentField, VegaSlimmer } from 'vega-slimmer/core';
|
|
9
|
-
import { createEnterKeyHandlerToTriggerClick } from '../../../../utils/accessibility';
|
|
10
9
|
export class VegaSelectionTileRenderer extends VegaSlimmer {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/**
|
|
13
|
+
* Activation handler invoked from the host's `@Listen('click')` listener
|
|
14
|
+
* (registered on the host element itself). The host carries
|
|
15
|
+
* `role="radio"`/`"checkbox"`, `tabindex`, and the activation listeners,
|
|
16
|
+
* so this is the only interactive node per tile. VoiceOver's VO+Space
|
|
17
|
+
* dispatches a synthetic click on the focused host, which reaches this
|
|
18
|
+
* function through `VegaSelectionTile.onHostClick()`.
|
|
19
|
+
*/
|
|
20
|
+
this.activate = () => {
|
|
21
|
+
if (this.disabled) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (!(this.selectType === 'radio' && this.checked)) {
|
|
25
|
+
this.checkedController.onCheck(!this.checked);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
this.handleTileKeydown = (event) => {
|
|
29
|
+
if (this.disabled) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
// eslint-disable-next-line spellcheck/spell-checker
|
|
33
|
+
if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
this.activate();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
11
39
|
getSelectorContainerRef() {
|
|
12
40
|
return this.selectorContainerRef;
|
|
13
41
|
}
|
|
42
|
+
// Accessible name for the host's `aria-label`. Public because the
|
|
43
|
+
// component renders the host and needs to call this to compute the
|
|
44
|
+
// host's `aria-label` value (see `VegaSelectionTile.render`).
|
|
45
|
+
//
|
|
46
|
+
// Fallback chain: titleText (+ note) → trimmed host light-DOM text
|
|
47
|
+
// (covers `content`/`prefix` slots) → `value`. `note` is appended so
|
|
48
|
+
// VoiceOver announces both the title and the supporting line
|
|
49
|
+
// (e.g. "Basic Plan, $9 / month") when traversing tiles with VO+→/VO+←;
|
|
50
|
+
// the visual subtree is `aria-hidden`, so without this the note would
|
|
51
|
+
// never reach the accessibility tree.
|
|
52
|
+
//
|
|
53
|
+
// The parent group's label is intentionally NOT prepended here: the
|
|
54
|
+
// group renderer exposes its label as an independently focusable AT
|
|
55
|
+
// stop, so duplicating it on every tile would make AT users hear the
|
|
56
|
+
// group label N+1 times.
|
|
57
|
+
getAccessibleName() {
|
|
58
|
+
if (this.titleText) {
|
|
59
|
+
return this.note ? `${this.titleText}, ${this.note}` : this.titleText;
|
|
60
|
+
}
|
|
61
|
+
// Prefer `innerText` so adjacent inline/block elements are separated
|
|
62
|
+
// by whitespace (e.g. `<div>Pro Plan<span>Popular</span></div>` reads
|
|
63
|
+
// as "Pro Plan Popular" instead of "Pro PlanPopular" from raw
|
|
64
|
+
// `textContent` concatenation). Fall back to `textContent` for
|
|
65
|
+
// environments (e.g. jsdom) that do not implement `innerText`, and
|
|
66
|
+
// to `''` to satisfy the `string | null` type of `textContent`.
|
|
67
|
+
const raw = this.host.innerText || this.host.textContent || '';
|
|
68
|
+
const slotText = raw.replace(/\s+/g, ' ').trim();
|
|
69
|
+
return slotText || this.value || '';
|
|
70
|
+
}
|
|
14
71
|
render() {
|
|
72
|
+
// ARIA semantics (role/aria-*), focus (tabindex), and activation
|
|
73
|
+
// handlers live on the COMPONENT HOST (see `VegaSelectionTile.render`
|
|
74
|
+
// and the `@Listen('click')`/`@Listen('keydown')` methods on the
|
|
75
|
+
// component class), not on this inner element. Keeping role + tabindex
|
|
76
|
+
// off this element is what prevents Firefox/VoiceOver from triple-
|
|
77
|
+
// announcing each tile (host group wrapper + inner role=radio + host
|
|
78
|
+
// close). This element is now purely a layout/styling wrapper.
|
|
15
79
|
return (h("vega-flex", { "align-items": "start", "justify-content": "start", gap: "size-16", class: {
|
|
16
80
|
'selection-tile': true,
|
|
17
81
|
'disabled': this.disabled,
|
|
18
82
|
'checked': this.checked,
|
|
19
83
|
'error': this.showError,
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
onClick: () => {
|
|
23
|
-
if (!(this.selectType === 'radio' && this.checked)) {
|
|
24
|
-
this.checkedController.onCheck(!this.checked);
|
|
25
|
-
}
|
|
26
|
-
}, onKeyDown: createEnterKeyHandlerToTriggerClick() },
|
|
27
|
-
h("div", { class: "vega-flex-grow" }, this.renderContent()),
|
|
84
|
+
} },
|
|
85
|
+
h("div", { class: "vega-flex-grow", "aria-hidden": "true" }, this.renderContent()),
|
|
28
86
|
this.renderSelect()));
|
|
29
87
|
}
|
|
30
88
|
renderContent() {
|
|
@@ -51,7 +109,7 @@ export class VegaSelectionTileRenderer extends VegaSlimmer {
|
|
|
51
109
|
this.note && h("div", { class: "selection-tile-note" }, this.note)));
|
|
52
110
|
}
|
|
53
111
|
renderSelect() {
|
|
54
|
-
return (h("vega-flex", { "align-items": "start", class: "vega-flex-shrink-0 selection-tile-select", ref: (ref) => (this.selectorContainerRef = ref) }, this.selectType === 'checkbox' ? this.renderCheckbox() : this.renderRadio()));
|
|
112
|
+
return (h("vega-flex", Object.assign({ "align-items": "start", class: "vega-flex-shrink-0 selection-tile-select", "aria-hidden": "true" }, { inert: true }, { ref: (ref) => (this.selectorContainerRef = ref) }), this.selectType === 'checkbox' ? this.renderCheckbox() : this.renderRadio()));
|
|
55
113
|
}
|
|
56
114
|
renderCheckbox() {
|
|
57
115
|
return h("vega-checkbox", { size: "small", disabled: this.disabled, checked: this.checked });
|
|
@@ -90,6 +148,9 @@ __decorate([
|
|
|
90
148
|
__decorate([
|
|
91
149
|
MapToComponentField()
|
|
92
150
|
], VegaSelectionTileRenderer.prototype, "showError", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
MapToComponentField()
|
|
153
|
+
], VegaSelectionTileRenderer.prototype, "value", void 0);
|
|
93
154
|
__decorate([
|
|
94
155
|
MapToComponentField()
|
|
95
156
|
], VegaSelectionTileRenderer.prototype, "checkedController", void 0);
|
|
@@ -17,16 +17,37 @@ export class VegaSelectionTileGroupRenderer extends VegaSlimmer {
|
|
|
17
17
|
this.renderHint()));
|
|
18
18
|
}
|
|
19
19
|
renderLabel() {
|
|
20
|
-
return (this.label && (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
return (this.label && (
|
|
21
|
+
// The label is exposed as its own focusable VoiceOver stop:
|
|
22
|
+
// `tabindex="0"` puts it in the tab / VO swipe order, and
|
|
23
|
+
// `aria-label` provides a clean accessible name that includes
|
|
24
|
+
// "required" as a spoken word.
|
|
25
|
+
//
|
|
26
|
+
// The visible text + asterisk are wrapped in an
|
|
27
|
+
// `aria-hidden="true"` span so VoiceOver does not descend into
|
|
28
|
+
// the children and create extra swipe stops on the raw text
|
|
29
|
+
// or the decorative "*" — the `aria-label` above is the
|
|
30
|
+
// single thing AT users hear for this stop.
|
|
31
|
+
h("div", { class: "vega-label" },
|
|
32
|
+
h("span", {
|
|
33
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
34
|
+
tabindex: 0, "aria-label": this.required ? `${this.label} (required)` : this.label },
|
|
35
|
+
h("span", { "aria-hidden": "true" },
|
|
36
|
+
this.label,
|
|
37
|
+
this.renderRequire())))));
|
|
24
38
|
}
|
|
25
39
|
renderRequire() {
|
|
26
|
-
return this.required && h("span", { class: "vega-require" }, "*");
|
|
40
|
+
return (this.required && (h("span", { class: "vega-require", "aria-hidden": "true" }, "*")));
|
|
27
41
|
}
|
|
28
42
|
renderContainer() {
|
|
29
|
-
return (
|
|
43
|
+
return (
|
|
44
|
+
// The container intentionally drops `role="radiogroup"`/`role="group"`
|
|
45
|
+
// (and the group-level `aria-*` attributes those roles would imply)
|
|
46
|
+
// so VoiceOver does not treat the container as a separate stop ahead
|
|
47
|
+
// of the first tile. The group label above is now the single AT
|
|
48
|
+
// stop that announces the group's purpose; child tiles are reached
|
|
49
|
+
// directly after it without a wrapper announcement.
|
|
50
|
+
h("div", { class: "container", ref: (e) => (this.groupContainerRef = e) },
|
|
30
51
|
h("vega-flex", { direction: this.layout === 'horizontal' ? 'row' : 'col', gap: "size-12" },
|
|
31
52
|
h("slot", {
|
|
32
53
|
/* eslint-disable-next-line react/jsx-no-bind */
|
|
@@ -39,8 +60,18 @@ export class VegaSelectionTileGroupRenderer extends VegaSlimmer {
|
|
|
39
60
|
() => this.itemsController.syncTileArrayAndValue() }))));
|
|
40
61
|
}
|
|
41
62
|
renderHint() {
|
|
42
|
-
return (this.hint && (
|
|
43
|
-
|
|
63
|
+
return (this.hint && (
|
|
64
|
+
// Mirrors `renderLabel`: the hint is exposed as its own
|
|
65
|
+
// focusable VoiceOver stop after the tile list, so AT users
|
|
66
|
+
// can swipe to it and hear the supporting copy. The visible
|
|
67
|
+
// text is wrapped in an `aria-hidden` span so VO only speaks
|
|
68
|
+
// the `aria-label` once instead of also descending into the
|
|
69
|
+
// child text node.
|
|
70
|
+
h("div", { class: "vega-hint" },
|
|
71
|
+
h("span", {
|
|
72
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
73
|
+
tabindex: 0, "aria-label": this.hint },
|
|
74
|
+
h("span", { "aria-hidden": "true" }, this.hint)))));
|
|
44
75
|
}
|
|
45
76
|
}
|
|
46
77
|
__decorate([
|
|
@@ -58,9 +89,6 @@ __decorate([
|
|
|
58
89
|
__decorate([
|
|
59
90
|
MapToComponentField()
|
|
60
91
|
], VegaSelectionTileGroupRenderer.prototype, "layout", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
MapToComponentField()
|
|
63
|
-
], VegaSelectionTileGroupRenderer.prototype, "selectType", void 0);
|
|
64
92
|
__decorate([
|
|
65
93
|
MapToComponentField()
|
|
66
94
|
], VegaSelectionTileGroupRenderer.prototype, "itemsController", void 0);
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
line-height: 22px;
|
|
56
56
|
letter-spacing: 0px;
|
|
57
57
|
margin-bottom: 16px;
|
|
58
|
+
color: rgba(var(--v-text-primary, 32, 54, 69, 1));
|
|
58
59
|
}
|
|
59
60
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
60
61
|
:host .vega-label {
|
|
@@ -83,9 +84,6 @@
|
|
|
83
84
|
letter-spacing: 0px;
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
:host .vega-label label {
|
|
87
|
-
color: rgba(var(--v-text-primary, 32, 54, 69, 1));
|
|
88
|
-
}
|
|
89
87
|
:host .vega-label .vega-require {
|
|
90
88
|
color: rgba(var(--v-text-error, 189, 41, 71, 1));
|
|
91
89
|
margin-left: 4px;
|
|
@@ -34,12 +34,6 @@
|
|
|
34
34
|
border: 1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1));
|
|
35
35
|
background-color: rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));
|
|
36
36
|
}
|
|
37
|
-
:host .selection-tile:not(.disabled):focus-visible {
|
|
38
|
-
border: 1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));
|
|
39
|
-
background-color: rgba(var(--v-bg-tile, 252, 252, 252, 1));
|
|
40
|
-
outline: 2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));
|
|
41
|
-
outline-offset: 2px;
|
|
42
|
-
}
|
|
43
37
|
:host .selection-tile:not(.disabled).checked {
|
|
44
38
|
background-color: rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));
|
|
45
39
|
border: 2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));
|
|
@@ -49,12 +43,6 @@
|
|
|
49
43
|
border: 2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1));
|
|
50
44
|
background-color: rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1));
|
|
51
45
|
}
|
|
52
|
-
:host .selection-tile:not(.disabled).checked:focus-visible {
|
|
53
|
-
border: 2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));
|
|
54
|
-
background-color: rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));
|
|
55
|
-
outline: 2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));
|
|
56
|
-
outline-offset: 2px;
|
|
57
|
-
}
|
|
58
46
|
:host .selection-tile:not(.disabled).error {
|
|
59
47
|
border: 1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));
|
|
60
48
|
background-color: rgba(var(--v-bg-tile, 252, 252, 252, 1));
|
|
@@ -63,12 +51,6 @@
|
|
|
63
51
|
border: 1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1));
|
|
64
52
|
background-color: rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));
|
|
65
53
|
}
|
|
66
|
-
:host .selection-tile:not(.disabled).error:focus-visible {
|
|
67
|
-
border: 1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));
|
|
68
|
-
background-color: rgba(var(--v-bg-tile, 252, 252, 252, 1));
|
|
69
|
-
outline: 2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));
|
|
70
|
-
outline-offset: 2px;
|
|
71
|
-
}
|
|
72
54
|
:host .selection-tile.disabled {
|
|
73
55
|
border: 1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));
|
|
74
56
|
background-color: rgba(var(--v-bg-secondary, 245, 247, 247, 1));
|
|
@@ -158,4 +140,27 @@
|
|
|
158
140
|
:host .selection-tile .selection-tile-select vega-checkbox,
|
|
159
141
|
:host .selection-tile .selection-tile-select vega-radio {
|
|
160
142
|
margin-top: 4px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:host(:focus-visible) {
|
|
146
|
+
outline: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:host(:focus-visible:not([aria-disabled=true])) .selection-tile {
|
|
150
|
+
border: 1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));
|
|
151
|
+
background-color: rgba(var(--v-bg-tile, 252, 252, 252, 1));
|
|
152
|
+
outline: 2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));
|
|
153
|
+
outline-offset: 2px;
|
|
154
|
+
}
|
|
155
|
+
:host(:focus-visible:not([aria-disabled=true])) .selection-tile.checked {
|
|
156
|
+
border: 2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));
|
|
157
|
+
background-color: rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));
|
|
158
|
+
outline: 2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));
|
|
159
|
+
outline-offset: 2px;
|
|
160
|
+
}
|
|
161
|
+
:host(:focus-visible:not([aria-disabled=true])) .selection-tile.error {
|
|
162
|
+
border: 1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1));
|
|
163
|
+
background-color: rgba(var(--v-bg-tile, 252, 252, 252, 1));
|
|
164
|
+
outline: 2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));
|
|
165
|
+
outline-offset: 2px;
|
|
161
166
|
}
|
|
@@ -70,9 +70,53 @@ export class VegaSelectionTile {
|
|
|
70
70
|
*/
|
|
71
71
|
/* eslint-disable-next-line @stencil/strict-mutable */
|
|
72
72
|
this.selectType = 'radio';
|
|
73
|
+
// Host-level activation listeners are attached via vDOM listeners
|
|
74
|
+
// (`onClick` / `onKeyDown` on the `<Host>` element below). Stencil's
|
|
75
|
+
// vDOM listeners use `addEventListener` under the hood, NOT the
|
|
76
|
+
// `onclick`/`onkeydown` IDL properties, so:
|
|
77
|
+
// 1. A consumer doing `tileEl.onclick = fn` cannot overwrite or
|
|
78
|
+
// remove our listener.
|
|
79
|
+
// 2. A consumer attaching their own `addEventListener('click', ...)`
|
|
80
|
+
// coexists with ours and fires alongside it (DOM event spec).
|
|
81
|
+
// So consumer code can observe / augment activation but cannot silently
|
|
82
|
+
// break it. Only `event.stopImmediatePropagation()` in a handler that
|
|
83
|
+
// runs before ours would suppress it -- an explicit opt-out, not a
|
|
84
|
+
// surprise override.
|
|
85
|
+
this.onHostClick = () => {
|
|
86
|
+
this.renderer.activate();
|
|
87
|
+
};
|
|
88
|
+
this.onHostKeyDown = (event) => {
|
|
89
|
+
this.renderer.handleTileKeydown(event);
|
|
90
|
+
};
|
|
73
91
|
}
|
|
74
92
|
render() {
|
|
75
|
-
|
|
93
|
+
// ARIA semantics, focus, and activation handlers ALL live on the host.
|
|
94
|
+
//
|
|
95
|
+
// Why not `role="presentation"` on the host + role on an inner shadow
|
|
96
|
+
// element? Per ARIA 1.2, `role="presentation"`/`role="none"` is dropped
|
|
97
|
+
// ("presentation conflict resolution") whenever the element has any
|
|
98
|
+
// focusable descendants in the flat tree. Putting `tabindex="0"` on an
|
|
99
|
+
// inner shadow element therefore demotes the host's presentation role,
|
|
100
|
+
// and Firefox -- which enforces this rule strictly -- exposes the host
|
|
101
|
+
// as a generic/group wrapper around the inner radio. VoiceOver then
|
|
102
|
+
// triple-announces each tile:
|
|
103
|
+
// 1. "<title>, group" (host wrapper)
|
|
104
|
+
// 2. "<title>, <note>, radio button" (inner role=radio)
|
|
105
|
+
// 3. "end of <title>, group" (host wrapper close)
|
|
106
|
+
// Safari/Chrome happen to flatten the host out, masking the bug.
|
|
107
|
+
// Collapsing role + tabindex + aria-* onto the host eliminates the
|
|
108
|
+
// wrapper entirely -- the host *is* the radio/checkbox.
|
|
109
|
+
//
|
|
110
|
+
// NOTE on the `title` HTML attribute: `@Prop({ attribute: 'title' })
|
|
111
|
+
// titleText` observes the `title` attribute, so we deliberately do
|
|
112
|
+
// NOT pass `title={null}` to the Host -- doing so would strip the
|
|
113
|
+
// attribute at render time, which would then trigger Stencil's
|
|
114
|
+
// attribute observer and wipe `titleText` itself. The HTML `title`
|
|
115
|
+
// attribute stays on the host as a harmless tooltip; the explicit
|
|
116
|
+
// `aria-label` we emit takes precedence as the accessible name per
|
|
117
|
+
// the W3C accessible name computation, so VoiceOver/NVDA announce
|
|
118
|
+
// `aria-label` (which folds in the note line), not the tooltip text.
|
|
119
|
+
return sanitizeVegaComponent(h(Host, { role: this.selectType === 'checkbox' ? 'checkbox' : 'radio', "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.renderer.getAccessibleName() || undefined, tabindex: this.disabled ? -1 : 0, class: { 'distribute-evenly': this.distributeEvenly }, onClick: this.onHostClick, onKeyDown: this.onHostKeyDown }, this.renderer.render()), this.host);
|
|
76
120
|
}
|
|
77
121
|
static get is() { return "vega-selection-tile"; }
|
|
78
122
|
static get encapsulation() { return "shadow"; }
|
|
@@ -173,17 +173,11 @@ export class VegaTimePicker {
|
|
|
173
173
|
* Controls whether a clear (✕) icon button is displayed inside the time
|
|
174
174
|
* picker input when the field has a non-empty value.
|
|
175
175
|
*
|
|
176
|
-
* When `true`, clicking the clear icon resets the
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* The clear icon is also hidden when the component is `disabled`.
|
|
182
|
-
*
|
|
183
|
-
* When the component is `readOnly`, the clear icon remains visible by
|
|
184
|
-
* design: read-only only suppresses manual keyboard text entry, while
|
|
185
|
-
* users can still update the value via the dropdown UI, so clearing the
|
|
186
|
-
* selected value is still a valid interaction.
|
|
176
|
+
* When `true`, clicking the clear icon resets the value (or `['', '']` in `range` mode) and emits a `vegaChange` event.
|
|
177
|
+
* Set to `false` to hide the icon. The clear icon is always hidden when `disabled`.
|
|
178
|
+
* When `readOnly`, the clear icon remains visible — read-only suppresses manual keyboard
|
|
179
|
+
* entry but the value can still be updated via the dropdown, so clearing
|
|
180
|
+
* remains a valid interaction.
|
|
187
181
|
*
|
|
188
182
|
* @default true
|
|
189
183
|
* @vegaVersion 2.84.0
|
|
@@ -529,7 +523,7 @@ export class VegaTimePicker {
|
|
|
529
523
|
"name": "vegaVersion",
|
|
530
524
|
"text": "2.84.0"
|
|
531
525
|
}],
|
|
532
|
-
"text": "Controls whether a clear (\u2715) icon button is displayed inside the time\npicker input when the field has a non-empty value.\n\nWhen `true`, clicking the clear icon resets the
|
|
526
|
+
"text": "Controls whether a clear (\u2715) icon button is displayed inside the time\npicker input when the field has a non-empty value.\n\nWhen `true`, clicking the clear icon resets the value (or `['', '']` in `range` mode) and emits a `vegaChange` event.\nSet to `false` to hide the icon. The clear icon is always hidden when `disabled`.\nWhen `readOnly`, the clear icon remains visible \u2014 read-only suppresses manual keyboard\nentry but the value can still be updated via the dropdown, so clearing\nremains a valid interaction."
|
|
533
527
|
},
|
|
534
528
|
"attribute": "show-clear-icon",
|
|
535
529
|
"reflect": false,
|