@vonage/vivid 5.31.0 → 5.32.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/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +25 -26
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +5 -5
- package/bundled/char-count.cjs +2 -2
- package/bundled/char-count.js +2 -3
- package/bundled/definition4.cjs +17 -10
- package/bundled/definition4.js +17 -10
- package/bundled/form-element.cjs +1 -1
- package/bundled/form-element.js +3 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +11 -10
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +12 -17
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +7 -9
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +10 -8
- package/bundled/with-error-text.cjs +1 -1
- package/bundled/with-error-text.js +7 -9
- package/custom-elements.json +4955 -6650
- package/lib/accordion-item/accordion-item.d.ts +13 -7
- package/lib/action-group/action-group.d.ts +13 -7
- package/lib/alert/alert.d.ts +26 -14
- package/lib/audio-player/audio-player.d.ts +13 -7
- package/lib/avatar/avatar.d.ts +13 -7
- package/lib/badge/badge.d.ts +13 -7
- package/lib/banner/banner.d.ts +39 -21
- package/lib/breadcrumb/breadcrumb.d.ts +13 -7
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +13 -7
- package/lib/button/button.d.ts +39 -21
- package/lib/calendar-event/calendar-event.d.ts +13 -7
- package/lib/card/card.d.ts +13 -7
- package/lib/checkbox/checkbox.d.ts +84 -48
- package/lib/color-picker/color-picker.d.ts +98 -56
- package/lib/combobox/combobox.d.ts +98 -56
- package/lib/country-group/country-group.d.ts +26 -14
- package/lib/data-grid/data-grid-cell.d.ts +26 -14
- package/lib/data-grid/data-grid-row.d.ts +13 -7
- package/lib/date-picker/date-picker.d.ts +162 -114
- package/lib/date-range-picker/date-range-picker.d.ts +82 -58
- package/lib/date-time-picker/date-time-picker.d.ts +164 -116
- package/lib/dial-pad/dial-pad.d.ts +13 -7
- package/lib/dialog/dialog.d.ts +26 -14
- package/lib/divider/divider.d.ts +13 -7
- package/lib/fab/fab.d.ts +13 -7
- package/lib/file-picker/file-picker.d.ts +98 -56
- package/lib/header/header.d.ts +13 -7
- package/lib/listbox/listbox.d.ts +41 -23
- package/lib/menu/menu.d.ts +30 -18
- package/lib/menu-item/menu-item.d.ts +39 -21
- package/lib/nav/nav.d.ts +13 -7
- package/lib/nav-disclosure/nav-disclosure.d.ts +26 -14
- package/lib/nav-item/nav-item.d.ts +28 -16
- package/lib/note/note.d.ts +13 -7
- package/lib/number-field/number-field.d.ts +124 -70
- package/lib/optgroup/optgroup.d.ts +13 -7
- package/lib/option/option.d.ts +26 -14
- package/lib/pagination/pagination.d.ts +13 -7
- package/lib/popover/popover.d.ts +26 -14
- package/lib/progress/progress.d.ts +13 -7
- package/lib/progress-ring/progress-ring.d.ts +13 -7
- package/lib/radio/radio.d.ts +45 -27
- package/lib/radio-group/radio-group.d.ts +13 -7
- package/lib/range-slider/range-slider.d.ts +40 -22
- package/lib/rich-text-editor/rich-text-editor.d.ts +30 -18
- package/lib/searchable-select/option-tag.d.ts +13 -7
- package/lib/searchable-select/searchable-select.d.ts +124 -70
- package/lib/select/select.d.ts +124 -70
- package/lib/selectable-box/selectable-box.d.ts +13 -7
- package/lib/simple-color-picker/simple-color-picker.d.ts +31 -19
- package/lib/slider/slider.d.ts +39 -21
- package/lib/split-button/split-button.d.ts +39 -21
- package/lib/status/status.d.ts +13 -7
- package/lib/switch/switch.d.ts +26 -14
- package/lib/tab/tab.d.ts +39 -21
- package/lib/tab-panel/tab-panel.d.ts +13 -7
- package/lib/table/table-cell.d.ts +13 -7
- package/lib/table/table-header-cell.d.ts +13 -7
- package/lib/table/table-row.d.ts +13 -7
- package/lib/table/table-sorting-button.d.ts +26 -14
- package/lib/tag/tag.d.ts +39 -21
- package/lib/tag-group/tag-group.d.ts +13 -7
- package/lib/text-area/text-area.d.ts +112 -64
- package/lib/text-field/text-field.d.ts +125 -71
- package/lib/time-picker/time-picker.d.ts +82 -58
- package/lib/toggletip/toggletip.d.ts +30 -18
- package/lib/tooltip/tooltip.d.ts +30 -18
- package/lib/tree-item/tree-item.d.ts +26 -14
- package/lib/tree-view/tree-view.d.ts +13 -7
- package/lib/video-player/video-player.d.ts +13 -7
- package/listbox/index.cjs +1 -1
- package/listbox/index.js +3 -4
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +5 -1
- package/package.json +7 -7
- package/shared/aria/aria-mixin.d.ts +11 -5
- package/shared/aria/delegates-aria.d.ts +13 -7
- package/shared/aria/host-semantics.d.ts +13 -7
- package/shared/color-picker/base-color-picker.d.ts +14 -8
- package/shared/deprecation/replaced-props.d.ts +12 -6
- package/shared/feedback/feedback-message.d.ts +13 -7
- package/shared/feedback/mixins.d.ts +26 -14
- package/shared/foundation/button/button.d.ts +26 -14
- package/shared/foundation/form-associated/form-associated.d.ts +26 -14
- package/shared/foundation/vivid-element/vivid-element.d.ts +35 -17
- package/shared/framework/reactive-controller.d.ts +12 -6
- package/shared/listbox/with-options-filter.d.ts +14 -8
- package/shared/listbox/with-options.d.ts +28 -16
- package/shared/patterns/affix.d.ts +26 -14
- package/shared/patterns/anchored.d.ts +34 -22
- package/shared/patterns/char-count/char-count.d.ts +14 -8
- package/shared/patterns/form-elements/form-element.d.ts +14 -8
- package/shared/patterns/form-elements/with-contextual-help.d.ts +14 -8
- package/shared/patterns/form-elements/with-error-text.d.ts +18 -12
- package/shared/patterns/form-elements/with-success-text.d.ts +13 -7
- package/shared/patterns/kbd-shortcut.d.ts +13 -7
- package/shared/patterns/linkable.d.ts +13 -7
- package/shared/patterns/localized.d.ts +30 -18
- package/shared/patterns/trapped-focus.d.ts +13 -7
- package/shared/picker-field/mixins/calendar-picker.d.ts +41 -29
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +41 -29
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +13 -7
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +41 -29
- package/shared/picker-field/mixins/single-date-picker.d.ts +41 -29
- package/shared/picker-field/mixins/single-value-picker.d.ts +39 -27
- package/shared/picker-field/mixins/time-selection-picker.d.ts +43 -31
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +82 -58
- package/shared/picker-field/picker-field.d.ts +98 -57
- package/unbundled/anchored.cjs +39 -37
- package/unbundled/anchored.js +39 -37
- package/unbundled/calendar-picker.template.cjs +7 -5
- package/unbundled/calendar-picker.template.js +7 -5
- package/unbundled/char-count.cjs +3 -9
- package/unbundled/char-count.js +3 -9
- package/unbundled/definition5.cjs +17 -10
- package/unbundled/definition5.js +17 -10
- package/unbundled/definition50.cjs +3 -4
- package/unbundled/definition50.js +3 -4
- package/unbundled/definition52.cjs +6 -2
- package/unbundled/definition52.js +6 -2
- package/unbundled/form-element.cjs +3 -4
- package/unbundled/form-element.js +3 -4
- package/unbundled/localized.cjs +15 -11
- package/unbundled/localized.js +15 -11
- package/unbundled/picker-field.template.cjs +22 -24
- package/unbundled/picker-field.template.js +22 -24
- package/unbundled/time-selection-picker.template.cjs +10 -10
- package/unbundled/time-selection-picker.template.js +10 -10
- package/unbundled/vivid-element.cjs +12 -8
- package/unbundled/vivid-element.js +12 -8
- package/unbundled/with-error-text.cjs +11 -10
- package/unbundled/with-error-text.js +11 -10
- package/shared/foundation/vivid-element/vivid-element.browser-spec.d.ts +0 -1
package/unbundled/anchored.cjs
CHANGED
|
@@ -8,56 +8,58 @@ let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
|
8
8
|
*/
|
|
9
9
|
var Anchored = (Base) => {
|
|
10
10
|
class AnchoredElement extends Base {
|
|
11
|
+
constructor(..._args) {
|
|
12
|
+
super(..._args);
|
|
13
|
+
this._updateAnchorEl = () => {
|
|
14
|
+
if (!this.isConnected) {
|
|
15
|
+
this._anchorEl = void 0;
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
this._cleanupObserverIfNeeded();
|
|
19
|
+
let newAnchor = void 0;
|
|
20
|
+
if (this._slottedAnchor && this._slottedAnchor.length > 0) newAnchor = this._slottedAnchor[0];
|
|
21
|
+
else if (this.anchor instanceof HTMLElement) newAnchor = this.anchor;
|
|
22
|
+
else if (typeof this.anchor === "string") {
|
|
23
|
+
newAnchor = document.getElementById(this.anchor) ?? void 0;
|
|
24
|
+
if (!newAnchor) this._observeMissingAnchor(this.anchor);
|
|
25
|
+
}
|
|
26
|
+
this._anchorEl = newAnchor;
|
|
27
|
+
};
|
|
28
|
+
this._observeMissingAnchor = (anchorId) => {
|
|
29
|
+
this._observer = new MutationObserver(() => {
|
|
30
|
+
const anchor = document.getElementById(anchorId);
|
|
31
|
+
if (anchor) {
|
|
32
|
+
this._anchorEl = anchor;
|
|
33
|
+
this._cleanupObserverIfNeeded();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
this._observer.observe(document.body, {
|
|
37
|
+
childList: true,
|
|
38
|
+
subtree: true
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
this._cleanupObserverIfNeeded = () => {
|
|
42
|
+
this._observer?.disconnect();
|
|
43
|
+
this._observer = void 0;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
11
46
|
/** @internal */
|
|
12
47
|
anchorChanged() {
|
|
13
|
-
this
|
|
48
|
+
this._updateAnchorEl();
|
|
14
49
|
}
|
|
15
50
|
/** @internal */
|
|
16
51
|
_slottedAnchorChanged() {
|
|
17
52
|
const isOccupied = Boolean(this._slottedAnchor && this._slottedAnchor.length > 0);
|
|
18
53
|
_microsoft_fast_element.DOM.setBooleanAttribute(this, "slotted-anchor", isOccupied);
|
|
19
|
-
this
|
|
54
|
+
this._updateAnchorEl();
|
|
20
55
|
}
|
|
21
|
-
#updateAnchorEl = () => {
|
|
22
|
-
if (!this.isConnected) {
|
|
23
|
-
this._anchorEl = void 0;
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
this.#cleanupObserverIfNeeded();
|
|
27
|
-
let newAnchor = void 0;
|
|
28
|
-
if (this._slottedAnchor && this._slottedAnchor.length > 0) newAnchor = this._slottedAnchor[0];
|
|
29
|
-
else if (this.anchor instanceof HTMLElement) newAnchor = this.anchor;
|
|
30
|
-
else if (typeof this.anchor === "string") {
|
|
31
|
-
newAnchor = document.getElementById(this.anchor) ?? void 0;
|
|
32
|
-
if (!newAnchor) this.#observeMissingAnchor(this.anchor);
|
|
33
|
-
}
|
|
34
|
-
this._anchorEl = newAnchor;
|
|
35
|
-
};
|
|
36
|
-
#observer;
|
|
37
|
-
#observeMissingAnchor = (anchorId) => {
|
|
38
|
-
this.#observer = new MutationObserver(() => {
|
|
39
|
-
const anchor = document.getElementById(anchorId);
|
|
40
|
-
if (anchor) {
|
|
41
|
-
this._anchorEl = anchor;
|
|
42
|
-
this.#cleanupObserverIfNeeded();
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
this.#observer.observe(document.body, {
|
|
46
|
-
childList: true,
|
|
47
|
-
subtree: true
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
#cleanupObserverIfNeeded = () => {
|
|
51
|
-
this.#observer?.disconnect();
|
|
52
|
-
this.#observer = void 0;
|
|
53
|
-
};
|
|
54
56
|
connectedCallback() {
|
|
55
57
|
super.connectedCallback();
|
|
56
|
-
this
|
|
58
|
+
this._updateAnchorEl();
|
|
57
59
|
}
|
|
58
60
|
disconnectedCallback() {
|
|
59
61
|
super.disconnectedCallback();
|
|
60
|
-
this
|
|
62
|
+
this._cleanupObserverIfNeeded();
|
|
61
63
|
this._anchorEl = void 0;
|
|
62
64
|
}
|
|
63
65
|
}
|
package/unbundled/anchored.js
CHANGED
|
@@ -8,56 +8,58 @@ import { DOM, attr, html, observable, slotted } from "@microsoft/fast-element";
|
|
|
8
8
|
*/
|
|
9
9
|
var Anchored = (Base) => {
|
|
10
10
|
class AnchoredElement extends Base {
|
|
11
|
+
constructor(..._args) {
|
|
12
|
+
super(..._args);
|
|
13
|
+
this._updateAnchorEl = () => {
|
|
14
|
+
if (!this.isConnected) {
|
|
15
|
+
this._anchorEl = void 0;
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
this._cleanupObserverIfNeeded();
|
|
19
|
+
let newAnchor = void 0;
|
|
20
|
+
if (this._slottedAnchor && this._slottedAnchor.length > 0) newAnchor = this._slottedAnchor[0];
|
|
21
|
+
else if (this.anchor instanceof HTMLElement) newAnchor = this.anchor;
|
|
22
|
+
else if (typeof this.anchor === "string") {
|
|
23
|
+
newAnchor = document.getElementById(this.anchor) ?? void 0;
|
|
24
|
+
if (!newAnchor) this._observeMissingAnchor(this.anchor);
|
|
25
|
+
}
|
|
26
|
+
this._anchorEl = newAnchor;
|
|
27
|
+
};
|
|
28
|
+
this._observeMissingAnchor = (anchorId) => {
|
|
29
|
+
this._observer = new MutationObserver(() => {
|
|
30
|
+
const anchor = document.getElementById(anchorId);
|
|
31
|
+
if (anchor) {
|
|
32
|
+
this._anchorEl = anchor;
|
|
33
|
+
this._cleanupObserverIfNeeded();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
this._observer.observe(document.body, {
|
|
37
|
+
childList: true,
|
|
38
|
+
subtree: true
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
this._cleanupObserverIfNeeded = () => {
|
|
42
|
+
this._observer?.disconnect();
|
|
43
|
+
this._observer = void 0;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
11
46
|
/** @internal */
|
|
12
47
|
anchorChanged() {
|
|
13
|
-
this
|
|
48
|
+
this._updateAnchorEl();
|
|
14
49
|
}
|
|
15
50
|
/** @internal */
|
|
16
51
|
_slottedAnchorChanged() {
|
|
17
52
|
const isOccupied = Boolean(this._slottedAnchor && this._slottedAnchor.length > 0);
|
|
18
53
|
DOM.setBooleanAttribute(this, "slotted-anchor", isOccupied);
|
|
19
|
-
this
|
|
54
|
+
this._updateAnchorEl();
|
|
20
55
|
}
|
|
21
|
-
#updateAnchorEl = () => {
|
|
22
|
-
if (!this.isConnected) {
|
|
23
|
-
this._anchorEl = void 0;
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
this.#cleanupObserverIfNeeded();
|
|
27
|
-
let newAnchor = void 0;
|
|
28
|
-
if (this._slottedAnchor && this._slottedAnchor.length > 0) newAnchor = this._slottedAnchor[0];
|
|
29
|
-
else if (this.anchor instanceof HTMLElement) newAnchor = this.anchor;
|
|
30
|
-
else if (typeof this.anchor === "string") {
|
|
31
|
-
newAnchor = document.getElementById(this.anchor) ?? void 0;
|
|
32
|
-
if (!newAnchor) this.#observeMissingAnchor(this.anchor);
|
|
33
|
-
}
|
|
34
|
-
this._anchorEl = newAnchor;
|
|
35
|
-
};
|
|
36
|
-
#observer;
|
|
37
|
-
#observeMissingAnchor = (anchorId) => {
|
|
38
|
-
this.#observer = new MutationObserver(() => {
|
|
39
|
-
const anchor = document.getElementById(anchorId);
|
|
40
|
-
if (anchor) {
|
|
41
|
-
this._anchorEl = anchor;
|
|
42
|
-
this.#cleanupObserverIfNeeded();
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
this.#observer.observe(document.body, {
|
|
46
|
-
childList: true,
|
|
47
|
-
subtree: true
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
#cleanupObserverIfNeeded = () => {
|
|
51
|
-
this.#observer?.disconnect();
|
|
52
|
-
this.#observer = void 0;
|
|
53
|
-
};
|
|
54
56
|
connectedCallback() {
|
|
55
57
|
super.connectedCallback();
|
|
56
|
-
this
|
|
58
|
+
this._updateAnchorEl();
|
|
57
59
|
}
|
|
58
60
|
disconnectedCallback() {
|
|
59
61
|
super.disconnectedCallback();
|
|
60
|
-
this
|
|
62
|
+
this._cleanupObserverIfNeeded();
|
|
61
63
|
this._anchorEl = void 0;
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -4527,15 +4527,17 @@ var CalendarPicker = (Base) => {
|
|
|
4527
4527
|
_isDateInValidRange(date) {
|
|
4528
4528
|
return (!this._resolvedMinDate || compareDateStr(date, this._resolvedMinDate) >= 0) && (!this._resolvedMaxDate || compareDateStr(date, this._resolvedMaxDate) <= 0);
|
|
4529
4529
|
}
|
|
4530
|
-
|
|
4530
|
+
/** @internal */
|
|
4531
|
+
_isMonthAfterValidRange(month) {
|
|
4531
4532
|
return this._resolvedMaxDate && compareMonths(month, monthOfDate(this._resolvedMaxDate)) > 0;
|
|
4532
4533
|
}
|
|
4533
|
-
|
|
4534
|
+
/** @internal */
|
|
4535
|
+
_isMonthBeforeValidRange(month) {
|
|
4534
4536
|
return this._resolvedMinDate && compareMonths(month, monthOfDate(this._resolvedMinDate)) < 0;
|
|
4535
4537
|
}
|
|
4536
4538
|
/** @internal */
|
|
4537
4539
|
_isMonthInValidRange(month) {
|
|
4538
|
-
return !(this
|
|
4540
|
+
return !(this._isMonthBeforeValidRange(month) || this._isMonthAfterValidRange(month));
|
|
4539
4541
|
}
|
|
4540
4542
|
constructor(...args) {
|
|
4541
4543
|
super(...args);
|
|
@@ -4596,7 +4598,7 @@ var CalendarPicker = (Base) => {
|
|
|
4596
4598
|
}
|
|
4597
4599
|
/** @internal */
|
|
4598
4600
|
get _isPrevMonthDisabled() {
|
|
4599
|
-
return this
|
|
4601
|
+
return this._isMonthBeforeValidRange(addMonths(this._selectedMonth, -1));
|
|
4600
4602
|
}
|
|
4601
4603
|
/** @internal */
|
|
4602
4604
|
_onPrevMonthClick() {
|
|
@@ -4604,7 +4606,7 @@ var CalendarPicker = (Base) => {
|
|
|
4604
4606
|
}
|
|
4605
4607
|
/** @internal */
|
|
4606
4608
|
get _isNextMonthDisabled() {
|
|
4607
|
-
return this
|
|
4609
|
+
return this._isMonthAfterValidRange(addMonths(this._selectedMonth, 1));
|
|
4608
4610
|
}
|
|
4609
4611
|
/** @internal */
|
|
4610
4612
|
_onNextMonthClick() {
|
|
@@ -4527,15 +4527,17 @@ var CalendarPicker = (Base) => {
|
|
|
4527
4527
|
_isDateInValidRange(date) {
|
|
4528
4528
|
return (!this._resolvedMinDate || compareDateStr(date, this._resolvedMinDate) >= 0) && (!this._resolvedMaxDate || compareDateStr(date, this._resolvedMaxDate) <= 0);
|
|
4529
4529
|
}
|
|
4530
|
-
|
|
4530
|
+
/** @internal */
|
|
4531
|
+
_isMonthAfterValidRange(month) {
|
|
4531
4532
|
return this._resolvedMaxDate && compareMonths(month, monthOfDate(this._resolvedMaxDate)) > 0;
|
|
4532
4533
|
}
|
|
4533
|
-
|
|
4534
|
+
/** @internal */
|
|
4535
|
+
_isMonthBeforeValidRange(month) {
|
|
4534
4536
|
return this._resolvedMinDate && compareMonths(month, monthOfDate(this._resolvedMinDate)) < 0;
|
|
4535
4537
|
}
|
|
4536
4538
|
/** @internal */
|
|
4537
4539
|
_isMonthInValidRange(month) {
|
|
4538
|
-
return !(this
|
|
4540
|
+
return !(this._isMonthBeforeValidRange(month) || this._isMonthAfterValidRange(month));
|
|
4539
4541
|
}
|
|
4540
4542
|
constructor(...args) {
|
|
4541
4543
|
super(...args);
|
|
@@ -4596,7 +4598,7 @@ var CalendarPicker = (Base) => {
|
|
|
4596
4598
|
}
|
|
4597
4599
|
/** @internal */
|
|
4598
4600
|
get _isPrevMonthDisabled() {
|
|
4599
|
-
return this
|
|
4601
|
+
return this._isMonthBeforeValidRange(addMonths(this._selectedMonth, -1));
|
|
4600
4602
|
}
|
|
4601
4603
|
/** @internal */
|
|
4602
4604
|
_onPrevMonthClick() {
|
|
@@ -4604,7 +4606,7 @@ var CalendarPicker = (Base) => {
|
|
|
4604
4606
|
}
|
|
4605
4607
|
/** @internal */
|
|
4606
4608
|
get _isNextMonthDisabled() {
|
|
4607
|
-
return this
|
|
4609
|
+
return this._isMonthAfterValidRange(addMonths(this._selectedMonth, 1));
|
|
4608
4610
|
}
|
|
4609
4611
|
/** @internal */
|
|
4610
4612
|
_onNextMonthClick() {
|
package/unbundled/char-count.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var WithCharCount = (Base) => {
|
|
|
9
9
|
constructor(..._args) {
|
|
10
10
|
super(..._args);
|
|
11
11
|
this.charCount = false;
|
|
12
|
-
this
|
|
12
|
+
this._charCountTimeout = null;
|
|
13
13
|
this._charCountDescribedBy = "char-count-description";
|
|
14
14
|
this._renderCharCountRemaining = () => {
|
|
15
15
|
if (!this.charCount || !this.maxlength) return;
|
|
@@ -17,8 +17,8 @@ var WithCharCount = (Base) => {
|
|
|
17
17
|
};
|
|
18
18
|
this._updateCharCountRemaining = () => {
|
|
19
19
|
const delay = 1e3;
|
|
20
|
-
if (this
|
|
21
|
-
this
|
|
20
|
+
if (this._charCountTimeout !== null) clearTimeout(this._charCountTimeout);
|
|
21
|
+
this._charCountTimeout = setTimeout(() => this._renderCharCountRemaining(), delay);
|
|
22
22
|
};
|
|
23
23
|
this._getCharCountTemplate = (context) => {
|
|
24
24
|
const visuallyHiddenTag = context.tagFor(require_definition.VisuallyHidden);
|
|
@@ -37,12 +37,6 @@ var WithCharCount = (Base) => {
|
|
|
37
37
|
`;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Timeout of the character count update,
|
|
42
|
-
* used to debounce screen reader announcements
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
#charCountTimeout;
|
|
46
40
|
}
|
|
47
41
|
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
48
42
|
attribute: "char-count",
|
package/unbundled/char-count.js
CHANGED
|
@@ -9,7 +9,7 @@ var WithCharCount = (Base) => {
|
|
|
9
9
|
constructor(..._args) {
|
|
10
10
|
super(..._args);
|
|
11
11
|
this.charCount = false;
|
|
12
|
-
this
|
|
12
|
+
this._charCountTimeout = null;
|
|
13
13
|
this._charCountDescribedBy = "char-count-description";
|
|
14
14
|
this._renderCharCountRemaining = () => {
|
|
15
15
|
if (!this.charCount || !this.maxlength) return;
|
|
@@ -17,8 +17,8 @@ var WithCharCount = (Base) => {
|
|
|
17
17
|
};
|
|
18
18
|
this._updateCharCountRemaining = () => {
|
|
19
19
|
const delay = 1e3;
|
|
20
|
-
if (this
|
|
21
|
-
this
|
|
20
|
+
if (this._charCountTimeout !== null) clearTimeout(this._charCountTimeout);
|
|
21
|
+
this._charCountTimeout = setTimeout(() => this._renderCharCountRemaining(), delay);
|
|
22
22
|
};
|
|
23
23
|
this._getCharCountTemplate = (context) => {
|
|
24
24
|
const visuallyHiddenTag = context.tagFor(VisuallyHidden);
|
|
@@ -37,12 +37,6 @@ var WithCharCount = (Base) => {
|
|
|
37
37
|
`;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Timeout of the character count update,
|
|
42
|
-
* used to debounce screen reader announcements
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
#charCountTimeout;
|
|
46
40
|
}
|
|
47
41
|
__decorate([attr({
|
|
48
42
|
attribute: "char-count",
|
|
@@ -6,7 +6,7 @@ const require_base_progress = require("./base-progress.cjs");
|
|
|
6
6
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
7
7
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
8
8
|
//#region src/lib/progress-ring/progress-ring.scss?inline
|
|
9
|
-
var progress_ring_default = ":host{--_vvd-progress-ring-accent-firm-wrapper:var(--vvd-progress-ring-accent-firm);--_vvd-progress-ring-cta-firm-wrapper:var(--vvd-progress-ring-cta-firm);--_vvd-progress-ring-alert-firm-wrapper:var(--vvd-progress-ring-alert-firm);--_vvd-progress-ring-success-firm-wrapper:var(--vvd-progress-ring-success-firm)}.base{--vvd-progress-ring-accent-firm:var(--_vvd-progress-ring-accent-firm-wrapper,var(--vvd-progress-ring-accent-primary));--vvd-progress-ring-cta-firm:var(--_vvd-progress-ring-cta-firm-wrapper,var(--vvd-progress-ring-cta-primary));--vvd-progress-ring-alert-firm:var(--_vvd-progress-ring-alert-firm-wrapper,var(--vvd-progress-ring-alert-primary));--vvd-progress-ring-success-firm:var(--_vvd-progress-ring-success-firm-wrapper,var(--vvd-progress-ring-success-primary))}.base.size--7{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.base.size--6{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.base.size--5{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.base.size--4{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.base.size--3{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.base.size--2{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.base.size--1{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.base.size-1{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.base.size-2{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.base.size-3{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.base.size-4{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.base.size-5{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.base:not(.size--7,.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-1,.size-2,.size-3,.size-4,.size-5){--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.base{block-size:var(--_size);color:var(--_appearance-color-text);inline-size:var(--_size);outline:none;align-items:center}.progress{width:100%;height:100%}.background{fill:none;stroke:#0000;stroke-width:1px}.determinate{fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform-origin:50%;transition:all .2s ease-in-out;transform:rotate(-90deg)}.indeterminate-
|
|
9
|
+
var progress_ring_default = ":host{--_vvd-progress-ring-accent-firm-wrapper:var(--vvd-progress-ring-accent-firm);--_vvd-progress-ring-cta-firm-wrapper:var(--vvd-progress-ring-cta-firm);--_vvd-progress-ring-alert-firm-wrapper:var(--vvd-progress-ring-alert-firm);--_vvd-progress-ring-success-firm-wrapper:var(--vvd-progress-ring-success-firm)}.base{--vvd-progress-ring-accent-firm:var(--_vvd-progress-ring-accent-firm-wrapper,var(--vvd-progress-ring-accent-primary));--vvd-progress-ring-cta-firm:var(--_vvd-progress-ring-cta-firm-wrapper,var(--vvd-progress-ring-cta-primary));--vvd-progress-ring-alert-firm:var(--_vvd-progress-ring-alert-firm-wrapper,var(--vvd-progress-ring-alert-primary));--vvd-progress-ring-success-firm:var(--_vvd-progress-ring-success-firm-wrapper,var(--vvd-progress-ring-success-primary))}.base.size--7{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.base.size--6{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.base.size--5{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.base.size--4{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.base.size--3{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.base.size--2{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.base.size--1{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.base.size-1{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.base.size-2{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.base.size-3{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.base.size-4{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.base.size-5{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.base:not(.size--7,.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-1,.size-2,.size-3,.size-4,.size-5){--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.base{block-size:var(--_size);color:var(--_appearance-color-text);inline-size:var(--_size);outline:none;align-items:center}.progress{width:100%;height:100%}.background{fill:none;stroke:#0000;stroke-width:1px}.determinate{fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform-origin:50%;transition:all .2s ease-in-out;transform:rotate(-90deg)}.indeterminate{--_overlap:.5px;width:100%;height:100%;animation:2s linear infinite indeterminate-spin;position:relative}.indeterminate-clip{width:calc(50% + var(--_overlap));height:100%;position:absolute;top:0;overflow:hidden}.indeterminate-clip-left{left:0}.indeterminate-clip-right{left:calc(50% - var(--_overlap))}.indeterminate-half{width:var(--_size);height:100%;position:absolute;top:0}.indeterminate-clip-left .indeterminate-half{animation:2s linear infinite indeterminate-left;left:0}.indeterminate-clip-right .indeterminate-half{left:calc(var(--_overlap) - var(--_size) / 2);animation:2s linear infinite indeterminate-right}.indeterminate-half svg{width:100%;height:100%;display:block}.indeterminate-half circle{fill:none;stroke:currentColor;stroke-dasharray:20.77 23.21;stroke-linecap:round;stroke-width:1px;transform-origin:50%;transform:rotate(-90deg)}.indeterminate-clip-left .indeterminate-half circle{stroke-dashoffset:-1.22px}.base.paused .indeterminate,.base.paused .indeterminate-half{animation-play-state:paused}@keyframes indeterminate-spin{0%{transform:rotate(-90deg)}to{transform:rotate(990deg)}}@keyframes indeterminate-right{0%,to{transform:rotate(180deg)}50%{transform:rotate(90deg)}}@keyframes indeterminate-left{0%,to{transform:rotate(0)}50%{transform:rotate(90deg)}}";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/lib/progress-ring/progress-ring.ts
|
|
12
12
|
var progressRingConnotation = require_component_enum.componentEnum([
|
|
@@ -48,15 +48,22 @@ var ProgressRingTemplate = _microsoft_fast_element.html`<template>
|
|
|
48
48
|
</svg>
|
|
49
49
|
`)}
|
|
50
50
|
${(0, _microsoft_fast_element.when)((x) => typeof x.value !== "number", _microsoft_fast_element.html`
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
<div class="indeterminate">
|
|
52
|
+
<div class="indeterminate-clip indeterminate-clip-left">
|
|
53
|
+
<div class="indeterminate-half">
|
|
54
|
+
<svg viewBox="0 0 16 16">
|
|
55
|
+
<circle cx="8px" cy="8px" r="7px"></circle>
|
|
56
|
+
</svg>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="indeterminate-clip indeterminate-clip-right">
|
|
60
|
+
<div class="indeterminate-half">
|
|
61
|
+
<svg viewBox="0 0 16 16">
|
|
62
|
+
<circle cx="8px" cy="8px" r="7px"></circle>
|
|
63
|
+
</svg>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
60
67
|
`)}
|
|
61
68
|
</div>
|
|
62
69
|
</template>`;
|
package/unbundled/definition5.js
CHANGED
|
@@ -6,7 +6,7 @@ import { t as BaseProgress } from "./base-progress.js";
|
|
|
6
6
|
import { attr, html, when } from "@microsoft/fast-element";
|
|
7
7
|
import { classNames } from "@microsoft/fast-web-utilities";
|
|
8
8
|
//#region src/lib/progress-ring/progress-ring.scss?inline
|
|
9
|
-
var progress_ring_default = ":host{--_vvd-progress-ring-accent-firm-wrapper:var(--vvd-progress-ring-accent-firm);--_vvd-progress-ring-cta-firm-wrapper:var(--vvd-progress-ring-cta-firm);--_vvd-progress-ring-alert-firm-wrapper:var(--vvd-progress-ring-alert-firm);--_vvd-progress-ring-success-firm-wrapper:var(--vvd-progress-ring-success-firm)}.base{--vvd-progress-ring-accent-firm:var(--_vvd-progress-ring-accent-firm-wrapper,var(--vvd-progress-ring-accent-primary));--vvd-progress-ring-cta-firm:var(--_vvd-progress-ring-cta-firm-wrapper,var(--vvd-progress-ring-cta-primary));--vvd-progress-ring-alert-firm:var(--_vvd-progress-ring-alert-firm-wrapper,var(--vvd-progress-ring-alert-primary));--vvd-progress-ring-success-firm:var(--_vvd-progress-ring-success-firm-wrapper,var(--vvd-progress-ring-success-primary))}.base.size--7{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.base.size--6{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.base.size--5{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.base.size--4{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.base.size--3{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.base.size--2{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.base.size--1{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.base.size-1{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.base.size-2{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.base.size-3{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.base.size-4{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.base.size-5{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.base:not(.size--7,.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-1,.size-2,.size-3,.size-4,.size-5){--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.base{block-size:var(--_size);color:var(--_appearance-color-text);inline-size:var(--_size);outline:none;align-items:center}.progress{width:100%;height:100%}.background{fill:none;stroke:#0000;stroke-width:1px}.determinate{fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform-origin:50%;transition:all .2s ease-in-out;transform:rotate(-90deg)}.indeterminate-
|
|
9
|
+
var progress_ring_default = ":host{--_vvd-progress-ring-accent-firm-wrapper:var(--vvd-progress-ring-accent-firm);--_vvd-progress-ring-cta-firm-wrapper:var(--vvd-progress-ring-cta-firm);--_vvd-progress-ring-alert-firm-wrapper:var(--vvd-progress-ring-alert-firm);--_vvd-progress-ring-success-firm-wrapper:var(--vvd-progress-ring-success-firm)}.base{--vvd-progress-ring-accent-firm:var(--_vvd-progress-ring-accent-firm-wrapper,var(--vvd-progress-ring-accent-primary));--vvd-progress-ring-cta-firm:var(--_vvd-progress-ring-cta-firm-wrapper,var(--vvd-progress-ring-cta-primary));--vvd-progress-ring-alert-firm:var(--_vvd-progress-ring-alert-firm-wrapper,var(--vvd-progress-ring-alert-primary));--vvd-progress-ring-success-firm:var(--_vvd-progress-ring-success-firm-wrapper,var(--vvd-progress-ring-success-primary))}.base.size--7{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.base.size--6{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.base.size--5{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.base.size--4{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.base.size--3{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.base.size--2{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.base.size--1{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.base.size-1{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.base.size-2{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.base.size-3{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.base.size-4{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.base.size-5{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.base:not(.size--7,.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-1,.size-2,.size-3,.size-4,.size-5){--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.base{block-size:var(--_size);color:var(--_appearance-color-text);inline-size:var(--_size);outline:none;align-items:center}.progress{width:100%;height:100%}.background{fill:none;stroke:#0000;stroke-width:1px}.determinate{fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform-origin:50%;transition:all .2s ease-in-out;transform:rotate(-90deg)}.indeterminate{--_overlap:.5px;width:100%;height:100%;animation:2s linear infinite indeterminate-spin;position:relative}.indeterminate-clip{width:calc(50% + var(--_overlap));height:100%;position:absolute;top:0;overflow:hidden}.indeterminate-clip-left{left:0}.indeterminate-clip-right{left:calc(50% - var(--_overlap))}.indeterminate-half{width:var(--_size);height:100%;position:absolute;top:0}.indeterminate-clip-left .indeterminate-half{animation:2s linear infinite indeterminate-left;left:0}.indeterminate-clip-right .indeterminate-half{left:calc(var(--_overlap) - var(--_size) / 2);animation:2s linear infinite indeterminate-right}.indeterminate-half svg{width:100%;height:100%;display:block}.indeterminate-half circle{fill:none;stroke:currentColor;stroke-dasharray:20.77 23.21;stroke-linecap:round;stroke-width:1px;transform-origin:50%;transform:rotate(-90deg)}.indeterminate-clip-left .indeterminate-half circle{stroke-dashoffset:-1.22px}.base.paused .indeterminate,.base.paused .indeterminate-half{animation-play-state:paused}@keyframes indeterminate-spin{0%{transform:rotate(-90deg)}to{transform:rotate(990deg)}}@keyframes indeterminate-right{0%,to{transform:rotate(180deg)}50%{transform:rotate(90deg)}}@keyframes indeterminate-left{0%,to{transform:rotate(0)}50%{transform:rotate(90deg)}}";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/lib/progress-ring/progress-ring.ts
|
|
12
12
|
var progressRingConnotation = componentEnum([
|
|
@@ -48,15 +48,22 @@ var ProgressRingTemplate = html`<template>
|
|
|
48
48
|
</svg>
|
|
49
49
|
`)}
|
|
50
50
|
${when((x) => typeof x.value !== "number", html`
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
<div class="indeterminate">
|
|
52
|
+
<div class="indeterminate-clip indeterminate-clip-left">
|
|
53
|
+
<div class="indeterminate-half">
|
|
54
|
+
<svg viewBox="0 0 16 16">
|
|
55
|
+
<circle cx="8px" cy="8px" r="7px"></circle>
|
|
56
|
+
</svg>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="indeterminate-clip indeterminate-clip-right">
|
|
60
|
+
<div class="indeterminate-half">
|
|
61
|
+
<svg viewBox="0 0 16 16">
|
|
62
|
+
<circle cx="8px" cy="8px" r="7px"></circle>
|
|
63
|
+
</svg>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
60
67
|
`)}
|
|
61
68
|
</div>
|
|
62
69
|
</template>`;
|
|
@@ -65,7 +65,7 @@ var WithOptions = (Base) => {
|
|
|
65
65
|
constructor(..._args) {
|
|
66
66
|
super(..._args);
|
|
67
67
|
this._slottedElements = [];
|
|
68
|
-
this
|
|
68
|
+
this._onOptgroupChange = () => {
|
|
69
69
|
this._slottedElementsChanged();
|
|
70
70
|
};
|
|
71
71
|
this._slottedOptions = [];
|
|
@@ -74,14 +74,13 @@ var WithOptions = (Base) => {
|
|
|
74
74
|
_slottedElementsChanged() {
|
|
75
75
|
this._slottedOptions = require_extractOptions.extractOptions(this._slottedElements);
|
|
76
76
|
}
|
|
77
|
-
#onOptgroupChange;
|
|
78
77
|
connectedCallback() {
|
|
79
78
|
super.connectedCallback();
|
|
80
|
-
this.addEventListener("optgroup-change", this
|
|
79
|
+
this.addEventListener("optgroup-change", this._onOptgroupChange);
|
|
81
80
|
}
|
|
82
81
|
disconnectedCallback() {
|
|
83
82
|
super.disconnectedCallback();
|
|
84
|
-
this.removeEventListener("optgroup-change", this
|
|
83
|
+
this.removeEventListener("optgroup-change", this._onOptgroupChange);
|
|
85
84
|
}
|
|
86
85
|
/** @internal */
|
|
87
86
|
_slottedOptionsChanged() {
|
|
@@ -63,7 +63,7 @@ var WithOptions = (Base) => {
|
|
|
63
63
|
constructor(..._args) {
|
|
64
64
|
super(..._args);
|
|
65
65
|
this._slottedElements = [];
|
|
66
|
-
this
|
|
66
|
+
this._onOptgroupChange = () => {
|
|
67
67
|
this._slottedElementsChanged();
|
|
68
68
|
};
|
|
69
69
|
this._slottedOptions = [];
|
|
@@ -72,14 +72,13 @@ var WithOptions = (Base) => {
|
|
|
72
72
|
_slottedElementsChanged() {
|
|
73
73
|
this._slottedOptions = extractOptions(this._slottedElements);
|
|
74
74
|
}
|
|
75
|
-
#onOptgroupChange;
|
|
76
75
|
connectedCallback() {
|
|
77
76
|
super.connectedCallback();
|
|
78
|
-
this.addEventListener("optgroup-change", this
|
|
77
|
+
this.addEventListener("optgroup-change", this._onOptgroupChange);
|
|
79
78
|
}
|
|
80
79
|
disconnectedCallback() {
|
|
81
80
|
super.disconnectedCallback();
|
|
82
|
-
this.removeEventListener("optgroup-change", this
|
|
81
|
+
this.removeEventListener("optgroup-change", this._onOptgroupChange);
|
|
83
82
|
}
|
|
84
83
|
/** @internal */
|
|
85
84
|
_slottedOptionsChanged() {
|
|
@@ -7,13 +7,17 @@ const require_linkable = require("./linkable.cjs");
|
|
|
7
7
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
8
8
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
9
9
|
//#region src/lib/nav-item/nav-item.scss?inline
|
|
10
|
-
var nav_item_default = ".control{box-sizing:border-box;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);font:var(--vvd-typography-base);hyphens:auto;inline-size:100%;min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));vertical-align:middle;border-radius:8px;align-items:center;gap:12px;text-decoration:none;display:inline-flex}.control.current{color:var(--_appearance-color-text)}@supports not (color:color-mix(in srgb, var(--one-color), var(--second-color))){.control.current{background-color:var(--_connotation-color-primary)}}.control.current:focus-visible{outline:none;position:relative}.control.current:focus-visible:after{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.control.icon-only{block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));inline-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));place-content:center;display:flex;position:relative}.control.icon-only slot[name=meta]{display:block;position:absolute;inset-block-start:calc((calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) - 20px) / 2);inset-inline-end:calc((calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) - 20px) / 2);transform:translate(50%,-50%)}.control:not(.icon-only){padding-block:10px;padding-inline:16px}.control:not(.current){color:var(--vvd-color-canvas-text);--focus-stroke-gap-color:transparent}.control:not(.current):focus-visible{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}:host(:dir(rtl)) .icon-only slot[name=meta]{transform:translate(-50%,-50%)}slot[name=icon]{font-size:20px;line-height:1}";
|
|
10
|
+
var nav_item_default = ".control.appearance-subtle{--_appearance-idle-fill:transparent;--_appearance-hover-fill:var(--_connotation-color-faint);--_appearance-active-fill:var(--_connotation-color-soft);--_appearance-disabled-fill:transparent;--_appearance-selected-fill:var(--_connotation-color-dim);--_appearance-selected-text:var(--vvd-color-canvas-text);--_appearance-selectedAndHover-fill:var(--_connotation-color-pale);--_appearance-selectedAndHover-text:var(--vvd-color-canvas-text)}.control{box-sizing:border-box;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);font:var(--vvd-typography-base);hyphens:auto;inline-size:100%;min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));vertical-align:middle;border-radius:8px;align-items:center;gap:12px;text-decoration:none;display:inline-flex}.control.current{color:var(--_appearance-color-text)}@supports not (color:color-mix(in srgb, var(--one-color), var(--second-color))){.control.current{background-color:var(--_connotation-color-primary)}}.control.current:focus-visible{outline:none;position:relative}.control.current:focus-visible:after{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.control.icon-only{block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));inline-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));place-content:center;display:flex;position:relative}.control.icon-only slot[name=meta]{display:block;position:absolute;inset-block-start:calc((calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) - 20px) / 2);inset-inline-end:calc((calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) - 20px) / 2);transform:translate(50%,-50%)}.control:not(.icon-only){padding-block:10px;padding-inline:16px}.control:not(.current){color:var(--vvd-color-canvas-text);--focus-stroke-gap-color:transparent}.control:not(.current):focus-visible{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}:host(:dir(rtl)) .icon-only slot[name=meta]{transform:translate(-50%,-50%)}slot[name=icon]{font-size:20px;line-height:1}";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/lib/nav-item/nav-item.ts
|
|
13
13
|
/** Types of nav item connotation. */
|
|
14
14
|
var navItemConnotation = require_component_enum.componentEnum(["accent", "cta"], "accent");
|
|
15
15
|
/** Types of nav item appearance. */
|
|
16
|
-
var navItemAppearance = require_component_enum.componentEnum([
|
|
16
|
+
var navItemAppearance = require_component_enum.componentEnum([
|
|
17
|
+
"ghost",
|
|
18
|
+
"ghost-light",
|
|
19
|
+
"subtle"
|
|
20
|
+
], "ghost");
|
|
17
21
|
/**
|
|
18
22
|
* Based largely on the [`<a>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a).
|
|
19
23
|
*
|
|
@@ -7,13 +7,17 @@ import { t as Linkable } from "./linkable.js";
|
|
|
7
7
|
import { attr, html } from "@microsoft/fast-element";
|
|
8
8
|
import { classNames } from "@microsoft/fast-web-utilities";
|
|
9
9
|
//#region src/lib/nav-item/nav-item.scss?inline
|
|
10
|
-
var nav_item_default = ".control{box-sizing:border-box;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);font:var(--vvd-typography-base);hyphens:auto;inline-size:100%;min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));vertical-align:middle;border-radius:8px;align-items:center;gap:12px;text-decoration:none;display:inline-flex}.control.current{color:var(--_appearance-color-text)}@supports not (color:color-mix(in srgb, var(--one-color), var(--second-color))){.control.current{background-color:var(--_connotation-color-primary)}}.control.current:focus-visible{outline:none;position:relative}.control.current:focus-visible:after{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.control.icon-only{block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));inline-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));place-content:center;display:flex;position:relative}.control.icon-only slot[name=meta]{display:block;position:absolute;inset-block-start:calc((calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) - 20px) / 2);inset-inline-end:calc((calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) - 20px) / 2);transform:translate(50%,-50%)}.control:not(.icon-only){padding-block:10px;padding-inline:16px}.control:not(.current){color:var(--vvd-color-canvas-text);--focus-stroke-gap-color:transparent}.control:not(.current):focus-visible{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}:host(:dir(rtl)) .icon-only slot[name=meta]{transform:translate(-50%,-50%)}slot[name=icon]{font-size:20px;line-height:1}";
|
|
10
|
+
var nav_item_default = ".control.appearance-subtle{--_appearance-idle-fill:transparent;--_appearance-hover-fill:var(--_connotation-color-faint);--_appearance-active-fill:var(--_connotation-color-soft);--_appearance-disabled-fill:transparent;--_appearance-selected-fill:var(--_connotation-color-dim);--_appearance-selected-text:var(--vvd-color-canvas-text);--_appearance-selectedAndHover-fill:var(--_connotation-color-pale);--_appearance-selectedAndHover-text:var(--vvd-color-canvas-text)}.control{box-sizing:border-box;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);font:var(--vvd-typography-base);hyphens:auto;inline-size:100%;min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));vertical-align:middle;border-radius:8px;align-items:center;gap:12px;text-decoration:none;display:inline-flex}.control.current{color:var(--_appearance-color-text)}@supports not (color:color-mix(in srgb, var(--one-color), var(--second-color))){.control.current{background-color:var(--_connotation-color-primary)}}.control.current:focus-visible{outline:none;position:relative}.control.current:focus-visible:after{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.control.icon-only{block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));inline-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));place-content:center;display:flex;position:relative}.control.icon-only slot[name=meta]{display:block;position:absolute;inset-block-start:calc((calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) - 20px) / 2);inset-inline-end:calc((calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) - 20px) / 2);transform:translate(50%,-50%)}.control:not(.icon-only){padding-block:10px;padding-inline:16px}.control:not(.current){color:var(--vvd-color-canvas-text);--focus-stroke-gap-color:transparent}.control:not(.current):focus-visible{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}:host(:dir(rtl)) .icon-only slot[name=meta]{transform:translate(-50%,-50%)}slot[name=icon]{font-size:20px;line-height:1}";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/lib/nav-item/nav-item.ts
|
|
13
13
|
/** Types of nav item connotation. */
|
|
14
14
|
var navItemConnotation = componentEnum(["accent", "cta"], "accent");
|
|
15
15
|
/** Types of nav item appearance. */
|
|
16
|
-
var navItemAppearance = componentEnum([
|
|
16
|
+
var navItemAppearance = componentEnum([
|
|
17
|
+
"ghost",
|
|
18
|
+
"ghost-light",
|
|
19
|
+
"subtle"
|
|
20
|
+
], "ghost");
|
|
17
21
|
/**
|
|
18
22
|
* Based largely on the [`<a>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a).
|
|
19
23
|
*
|
|
@@ -13,7 +13,7 @@ var FormElement = (Base) => {
|
|
|
13
13
|
this.errorValidationMessage = "";
|
|
14
14
|
this.forceErrorDisplay = false;
|
|
15
15
|
this.hasBeenTouched = false;
|
|
16
|
-
this
|
|
16
|
+
this._handleInvalidEvent = () => {
|
|
17
17
|
this.forceErrorDisplay = true;
|
|
18
18
|
this.validate();
|
|
19
19
|
};
|
|
@@ -32,13 +32,12 @@ var FormElement = (Base) => {
|
|
|
32
32
|
/** @internal */
|
|
33
33
|
connectedCallback() {
|
|
34
34
|
super.connectedCallback();
|
|
35
|
-
this.proxy.addEventListener("invalid", this
|
|
35
|
+
this.proxy.addEventListener("invalid", this._handleInvalidEvent);
|
|
36
36
|
}
|
|
37
|
-
#handleInvalidEvent;
|
|
38
37
|
/** @internal */
|
|
39
38
|
disconnectedCallback() {
|
|
40
39
|
super.disconnectedCallback();
|
|
41
|
-
this.proxy.removeEventListener("invalid", this
|
|
40
|
+
this.proxy.removeEventListener("invalid", this._handleInvalidEvent);
|
|
42
41
|
}
|
|
43
42
|
/** @internal */
|
|
44
43
|
formResetCallback() {
|
|
@@ -13,7 +13,7 @@ var FormElement = (Base) => {
|
|
|
13
13
|
this.errorValidationMessage = "";
|
|
14
14
|
this.forceErrorDisplay = false;
|
|
15
15
|
this.hasBeenTouched = false;
|
|
16
|
-
this
|
|
16
|
+
this._handleInvalidEvent = () => {
|
|
17
17
|
this.forceErrorDisplay = true;
|
|
18
18
|
this.validate();
|
|
19
19
|
};
|
|
@@ -32,13 +32,12 @@ var FormElement = (Base) => {
|
|
|
32
32
|
/** @internal */
|
|
33
33
|
connectedCallback() {
|
|
34
34
|
super.connectedCallback();
|
|
35
|
-
this.proxy.addEventListener("invalid", this
|
|
35
|
+
this.proxy.addEventListener("invalid", this._handleInvalidEvent);
|
|
36
36
|
}
|
|
37
|
-
#handleInvalidEvent;
|
|
38
37
|
/** @internal */
|
|
39
38
|
disconnectedCallback() {
|
|
40
39
|
super.disconnectedCallback();
|
|
41
|
-
this.proxy.removeEventListener("invalid", this
|
|
40
|
+
this.proxy.removeEventListener("invalid", this._handleInvalidEvent);
|
|
42
41
|
}
|
|
43
42
|
/** @internal */
|
|
44
43
|
formResetCallback() {
|