@vonage/vivid 3.47.0 → 3.49.0-preview.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/README.md +3 -403
- package/accordion/index.cjs +21 -0
- package/accordion-item/index.cjs +18 -0
- package/action-group/index.cjs +7 -0
- package/alert/index.cjs +30 -0
- package/alert/index.js +0 -1
- package/appearance-ui/index.cjs +96 -0
- package/audio-player/index.cjs +34 -0
- package/audio-player/index.js +0 -1
- package/avatar/index.cjs +11 -0
- package/badge/index.cjs +14 -0
- package/banner/index.cjs +29 -0
- package/banner/index.js +0 -1
- package/breadcrumb/index.cjs +13 -0
- package/breadcrumb-item/index.cjs +22 -0
- package/button/index.cjs +25 -0
- package/button/index.js +0 -1
- package/calendar/index.cjs +9 -0
- package/calendar-event/index.cjs +9 -0
- package/card/index.cjs +14 -0
- package/checkbox/index.cjs +21 -0
- package/combobox/index.cjs +39 -0
- package/combobox/index.js +1 -1
- package/custom-elements.json +30 -35
- package/data-grid/index.cjs +18 -0
- package/date-picker/index.cjs +40 -0
- package/date-picker/index.js +1 -1
- package/date-range-picker/index.cjs +40 -0
- package/date-range-picker/index.js +1 -1
- package/dialog/index.cjs +31 -0
- package/dialog/index.js +1 -1
- package/divider/index.cjs +8 -0
- package/elevation/index.cjs +7 -0
- package/empty-state/index.cjs +12 -0
- package/fab/index.cjs +22 -0
- package/file-picker/index.cjs +30 -0
- package/file-picker/index.js +1 -1
- package/focus/index.cjs +7 -0
- package/header/index.cjs +8 -0
- package/icon/index.cjs +10 -0
- package/index.cjs +296 -0
- package/index.js +1 -1
- package/layout/index.cjs +7 -0
- package/lib/menu-item/menu-item.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +1 -0
- package/listbox/index.cjs +77 -0
- package/locales/en-GB.cjs +106 -0
- package/locales/en-US.cjs +106 -0
- package/locales/ja-JP.cjs +106 -0
- package/locales/zh-CN.cjs +106 -0
- package/menu/index.cjs +32 -0
- package/menu/index.js +0 -1
- package/menu-item/index.cjs +22 -0
- package/menu-item/index.js +0 -1
- package/nav/index.cjs +6 -0
- package/nav-disclosure/index.cjs +17 -0
- package/nav-disclosure/index.js +0 -1
- package/nav-item/index.cjs +22 -0
- package/note/index.cjs +16 -0
- package/number-field/index.cjs +33 -0
- package/number-field/index.js +1 -1
- package/option/index.cjs +23 -0
- package/package.json +20 -2
- package/pagination/index.cjs +28 -0
- package/pagination/index.js +0 -1
- package/popup/index.cjs +27 -0
- package/popup/index.js +0 -1
- package/progress/index.cjs +9 -0
- package/progress-ring/index.cjs +9 -0
- package/radio/index.cjs +14 -0
- package/radio-group/index.cjs +14 -0
- package/select/index.cjs +38 -0
- package/select/index.js +1 -1
- package/selectable-box/index.cjs +25 -0
- package/shared/Reflector.cjs +67 -0
- package/shared/_has.cjs +62 -0
- package/shared/affix.cjs +64 -0
- package/shared/affix.js +8 -4
- package/shared/anchor.cjs +90 -0
- package/shared/anchored.cjs +78 -0
- package/shared/apply-mixins.cjs +25 -0
- package/shared/aria-global.cjs +74 -0
- package/shared/aria.cjs +11 -0
- package/shared/aria2.cjs +11 -0
- package/shared/base-progress.cjs +72 -0
- package/shared/breadcrumb-item.cjs +27 -0
- package/shared/button.cjs +202 -0
- package/shared/calendar-event.cjs +41 -0
- package/shared/children.cjs +61 -0
- package/shared/class-names.cjs +17 -0
- package/shared/definition.cjs +165 -0
- package/shared/definition10.cjs +102 -0
- package/shared/definition11.cjs +164 -0
- package/shared/definition11.js +39 -42
- package/shared/definition12.cjs +50 -0
- package/shared/definition13.cjs +779 -0
- package/shared/definition14.cjs +157 -0
- package/shared/definition15.cjs +249 -0
- package/shared/definition16.cjs +746 -0
- package/shared/definition17.cjs +1372 -0
- package/shared/definition18.cjs +175 -0
- package/shared/definition19.cjs +416 -0
- package/shared/definition2.cjs +232 -0
- package/shared/definition20.cjs +278 -0
- package/shared/definition21.cjs +83 -0
- package/shared/definition22.cjs +74 -0
- package/shared/definition23.cjs +106 -0
- package/shared/definition24.cjs +2392 -0
- package/shared/definition25.cjs +75 -0
- package/shared/definition26.cjs +39 -0
- package/shared/definition27.cjs +66 -0
- package/shared/definition28.cjs +849 -0
- package/shared/definition28.js +5 -4
- package/shared/definition29.cjs +72 -0
- package/shared/definition29.js +1 -1
- package/shared/definition3.cjs +72 -0
- package/shared/definition30.cjs +98 -0
- package/shared/definition30.js +1 -4
- package/shared/definition31.cjs +37 -0
- package/shared/definition32.cjs +24 -0
- package/shared/definition33.cjs +64 -0
- package/shared/definition34.cjs +533 -0
- package/shared/definition35.cjs +295 -0
- package/shared/definition36.cjs +219 -0
- package/shared/definition37.cjs +109 -0
- package/shared/definition38.cjs +92 -0
- package/shared/definition39.cjs +448 -0
- package/shared/definition4.cjs +198 -0
- package/shared/definition40.cjs +49 -0
- package/shared/definition41.cjs +694 -0
- package/shared/definition41.js +1 -6
- package/shared/definition42.cjs +152 -0
- package/shared/definition43.cjs +113 -0
- package/shared/definition44.cjs +607 -0
- package/shared/definition45.cjs +152 -0
- package/shared/definition45.js +1 -6
- package/shared/definition46.cjs +166 -0
- package/shared/definition46.js +2 -7
- package/shared/definition47.cjs +35 -0
- package/shared/definition48.cjs +98 -0
- package/shared/definition49.cjs +543 -0
- package/shared/definition49.js +12 -3
- package/shared/definition5.cjs +199 -0
- package/shared/definition50.cjs +52 -0
- package/shared/definition51.cjs +150 -0
- package/shared/definition52.cjs +304 -0
- package/shared/definition53.cjs +309 -0
- package/shared/definition54.cjs +146 -0
- package/shared/definition55.cjs +128 -0
- package/shared/definition56.cjs +99 -0
- package/shared/definition57.cjs +310 -0
- package/shared/definition58.cjs +20 -0
- package/shared/definition59.cjs +51 -0
- package/shared/definition6.cjs +83 -0
- package/shared/definition60.cjs +1810 -0
- package/shared/definition7.cjs +72 -0
- package/shared/definition8.cjs +152 -0
- package/shared/definition9.cjs +69 -0
- package/shared/dialog-polyfill.esm.cjs +862 -0
- package/shared/direction.cjs +22 -0
- package/shared/dom.cjs +23 -0
- package/shared/enums.cjs +87 -0
- package/shared/focus.cjs +8 -0
- package/shared/focus2.cjs +11 -0
- package/shared/form-associated.cjs +470 -0
- package/shared/icon.cjs +237 -0
- package/shared/index.cjs +5061 -0
- package/shared/index2.cjs +231 -0
- package/shared/key-codes.cjs +115 -0
- package/shared/key-codes2.cjs +14 -0
- package/shared/listbox.cjs +1072 -0
- package/shared/localized.cjs +11 -0
- package/shared/numbers.cjs +38 -0
- package/shared/patterns/affix.d.ts +5 -1
- package/shared/presentationDate.cjs +6192 -0
- package/shared/presentationDate.js +1 -6
- package/shared/radio.cjs +153 -0
- package/shared/ref.cjs +43 -0
- package/shared/repeat.cjs +767 -0
- package/shared/select.options.cjs +12 -0
- package/shared/slotted.cjs +123 -0
- package/shared/start-end.cjs +52 -0
- package/shared/strings.cjs +11 -0
- package/shared/text-anchor.cjs +33 -0
- package/shared/text-anchor.template.cjs +48 -0
- package/shared/text-field.cjs +5 -0
- package/shared/text-field2.cjs +228 -0
- package/shared/tree-item.cjs +154 -0
- package/shared/when.cjs +31 -0
- package/side-drawer/index.cjs +8 -0
- package/slider/index.cjs +16 -0
- package/split-button/index.cjs +20 -0
- package/split-button/index.js +0 -1
- package/style.css +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +15 -0
- package/switch/index.js +0 -5
- package/tab/index.cjs +17 -0
- package/tab-panel/index.cjs +6 -0
- package/tabs/index.cjs +24 -0
- package/tag/index.cjs +17 -0
- package/tag-group/index.cjs +7 -0
- package/text-anchor/index.cjs +24 -0
- package/text-area/index.cjs +25 -0
- package/text-field/index.cjs +27 -0
- package/toggletip/index.cjs +29 -0
- package/toggletip/index.js +0 -1
- package/tooltip/index.cjs +29 -0
- package/tooltip/index.js +0 -1
- package/tree-item/index.cjs +22 -0
- package/tree-view/index.cjs +14 -0
|
@@ -5683,8 +5683,6 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
5683
5683
|
this._closePopup(false);
|
|
5684
5684
|
}
|
|
5685
5685
|
};
|
|
5686
|
-
/// Used to stop the popup from immediately opening when closing popup and returning focus to text field
|
|
5687
|
-
this.#isClosingPopup = false;
|
|
5688
5686
|
this._presentationValue = "";
|
|
5689
5687
|
this._numCalendars = 1;
|
|
5690
5688
|
/**
|
|
@@ -5790,9 +5788,8 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
5790
5788
|
super.validate(this._textFieldEl?.querySelector("input") ?? void 0);
|
|
5791
5789
|
}
|
|
5792
5790
|
#dismissOnClickOutside;
|
|
5793
|
-
#isClosingPopup;
|
|
5794
5791
|
#openPopupIfPossible() {
|
|
5795
|
-
if (!this.readOnly
|
|
5792
|
+
if (!this.readOnly) {
|
|
5796
5793
|
this._popupOpen = true;
|
|
5797
5794
|
}
|
|
5798
5795
|
}
|
|
@@ -5803,9 +5800,7 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
5803
5800
|
this._popupOpen = false;
|
|
5804
5801
|
this._monthPickerYear = null;
|
|
5805
5802
|
if (restoreFocusToTextField) {
|
|
5806
|
-
this.#isClosingPopup = true;
|
|
5807
5803
|
this._textFieldEl.focus();
|
|
5808
|
-
this.#isClosingPopup = false;
|
|
5809
5804
|
}
|
|
5810
5805
|
}
|
|
5811
5806
|
/**
|
package/shared/radio.cjs
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index.cjs');
|
|
4
|
+
const formAssociated = require('./form-associated.cjs');
|
|
5
|
+
const keyCodes = require('./key-codes.cjs');
|
|
6
|
+
|
|
7
|
+
class _Radio extends index.FoundationElement {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A form-associated base class for the {@link @microsoft/fast-foundation#(Radio:class)} component.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
class FormAssociatedRadio extends formAssociated.CheckableFormAssociated(_Radio) {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.proxy = document.createElement("input");
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A Radio Custom HTML Element.
|
|
23
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radio | ARIA radio }.
|
|
24
|
+
*
|
|
25
|
+
* @slot checked-indicator - The checked indicator
|
|
26
|
+
* @slot - The default slot for the label
|
|
27
|
+
* @csspart control - The element representing the visual radio control
|
|
28
|
+
* @csspart label - The label
|
|
29
|
+
* @fires change - Emits a custom change event when the checked state changes
|
|
30
|
+
*
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
let Radio$1 = class Radio extends FormAssociatedRadio {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
/**
|
|
37
|
+
* The element's value to be included in form submission when checked.
|
|
38
|
+
* Default to "on" to reach parity with input[type="radio"]
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
this.initialValue = "on";
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
this.keypressHandler = (e) => {
|
|
47
|
+
switch (e.key) {
|
|
48
|
+
case keyCodes.keySpace:
|
|
49
|
+
if (!this.checked && !this.readOnly) {
|
|
50
|
+
this.checked = true;
|
|
51
|
+
}
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
return true;
|
|
55
|
+
};
|
|
56
|
+
this.proxy.setAttribute("type", "radio");
|
|
57
|
+
}
|
|
58
|
+
readOnlyChanged() {
|
|
59
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
60
|
+
this.proxy.readOnly = this.readOnly;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
defaultCheckedChanged() {
|
|
67
|
+
var _a;
|
|
68
|
+
if (this.$fastController.isConnected && !this.dirtyChecked) {
|
|
69
|
+
// Setting this.checked will cause us to enter a dirty state,
|
|
70
|
+
// but if we are clean when defaultChecked is changed, we want to stay
|
|
71
|
+
// in a clean state, so reset this.dirtyChecked
|
|
72
|
+
if (!this.isInsideRadioGroup()) {
|
|
73
|
+
this.checked = (_a = this.defaultChecked) !== null && _a !== void 0 ? _a : false;
|
|
74
|
+
this.dirtyChecked = false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
connectedCallback() {
|
|
82
|
+
var _a, _b;
|
|
83
|
+
super.connectedCallback();
|
|
84
|
+
this.validate();
|
|
85
|
+
if (((_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.getAttribute("role")) !== "radiogroup" &&
|
|
86
|
+
this.getAttribute("tabindex") === null) {
|
|
87
|
+
if (!this.disabled) {
|
|
88
|
+
this.setAttribute("tabindex", "0");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (this.checkedAttribute) {
|
|
92
|
+
if (!this.dirtyChecked) {
|
|
93
|
+
// Setting this.checked will cause us to enter a dirty state,
|
|
94
|
+
// but if we are clean when defaultChecked is changed, we want to stay
|
|
95
|
+
// in a clean state, so reset this.dirtyChecked
|
|
96
|
+
if (!this.isInsideRadioGroup()) {
|
|
97
|
+
this.checked = (_b = this.defaultChecked) !== null && _b !== void 0 ? _b : false;
|
|
98
|
+
this.dirtyChecked = false;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
isInsideRadioGroup() {
|
|
104
|
+
const parent = this.closest("[role=radiogroup]");
|
|
105
|
+
return parent !== null;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
clickHandler(e) {
|
|
111
|
+
if (!this.disabled && !this.readOnly && !this.checked) {
|
|
112
|
+
this.checked = true;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
index.__decorate([
|
|
117
|
+
index.attr({ attribute: "readonly", mode: "boolean" })
|
|
118
|
+
], Radio$1.prototype, "readOnly", void 0);
|
|
119
|
+
index.__decorate([
|
|
120
|
+
index.observable
|
|
121
|
+
], Radio$1.prototype, "name", void 0);
|
|
122
|
+
index.__decorate([
|
|
123
|
+
index.observable
|
|
124
|
+
], Radio$1.prototype, "defaultSlottedNodes", void 0);
|
|
125
|
+
|
|
126
|
+
var __defProp = Object.defineProperty;
|
|
127
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
128
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
129
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
130
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
131
|
+
if (decorator = decorators[i])
|
|
132
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
133
|
+
if (kind && result)
|
|
134
|
+
__defProp(target, key, result);
|
|
135
|
+
return result;
|
|
136
|
+
};
|
|
137
|
+
class Radio extends Radio$1 {
|
|
138
|
+
constructor() {
|
|
139
|
+
super(...arguments);
|
|
140
|
+
this.ariaLabel = null;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
__decorateClass([
|
|
144
|
+
index.attr({ attribute: "aria-label" })
|
|
145
|
+
], Radio.prototype, "ariaLabel", 2);
|
|
146
|
+
__decorateClass([
|
|
147
|
+
index.attr
|
|
148
|
+
], Radio.prototype, "label", 2);
|
|
149
|
+
__decorateClass([
|
|
150
|
+
index.attr
|
|
151
|
+
], Radio.prototype, "connotation", 2);
|
|
152
|
+
|
|
153
|
+
exports.Radio = Radio;
|
package/shared/ref.cjs
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index.cjs');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The runtime behavior for template references.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
class RefBehavior {
|
|
10
|
+
/**
|
|
11
|
+
* Creates an instance of RefBehavior.
|
|
12
|
+
* @param target - The element to reference.
|
|
13
|
+
* @param propertyName - The name of the property to assign the reference to.
|
|
14
|
+
*/
|
|
15
|
+
constructor(target, propertyName) {
|
|
16
|
+
this.target = target;
|
|
17
|
+
this.propertyName = propertyName;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Bind this behavior to the source.
|
|
21
|
+
* @param source - The source to bind to.
|
|
22
|
+
* @param context - The execution context that the binding is operating within.
|
|
23
|
+
*/
|
|
24
|
+
bind(source) {
|
|
25
|
+
source[this.propertyName] = this.target;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Unbinds this behavior from the source.
|
|
29
|
+
* @param source - The source to unbind from.
|
|
30
|
+
*/
|
|
31
|
+
/* eslint-disable-next-line @typescript-eslint/no-empty-function */
|
|
32
|
+
unbind() { }
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A directive that observes the updates a property with a reference to the element.
|
|
36
|
+
* @param propertyName - The name of the property to assign the reference to.
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
function ref(propertyName) {
|
|
40
|
+
return new index.AttachedBehaviorHTMLDirective("fast-ref", RefBehavior, propertyName);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
exports.ref = ref;
|