@vonage/vivid 4.14.0 → 4.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +152 -197
- package/lib/divider/divider.d.ts +1 -1
- package/lib/divider/divider.template.d.ts +1 -1
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/radio/radio.form-associated.d.ts +2 -0
- package/lib/tabs/tabs.d.ts +0 -5
- package/lib/text-anchor/text-anchor.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/package.json +1 -1
- package/shared/affix.cjs +8 -8
- package/shared/affix.js +2 -2
- package/shared/anchor.cjs +10 -10
- package/shared/anchor.js +1 -1
- package/shared/anchored.cjs +6 -6
- package/shared/anchored.js +1 -1
- package/shared/apply-mixins.cjs +3 -3
- package/shared/apply-mixins.js +1 -1
- package/shared/apply-mixins2.cjs +3 -3
- package/shared/apply-mixins2.js +1 -1
- package/shared/applyMixinsWithObservables.cjs +3 -3
- package/shared/applyMixinsWithObservables.js +1 -1
- package/shared/aria-global.cjs +20 -20
- package/shared/aria-global.js +1 -1
- package/shared/base-progress.cjs +7 -8
- package/shared/base-progress.js +2 -3
- package/shared/breadcrumb-item.cjs +2 -3
- package/shared/breadcrumb-item.js +1 -2
- package/shared/button.cjs +10 -11
- package/shared/button.js +1 -2
- package/shared/calendar-event.cjs +7 -8
- package/shared/calendar-event.js +1 -2
- package/shared/children.cjs +2 -2
- package/shared/children.js +1 -1
- package/shared/definition.cjs +14 -15
- package/shared/definition.js +2 -3
- package/shared/definition10.cjs +5 -6
- package/shared/definition10.js +1 -2
- package/shared/definition11.cjs +29 -29
- package/shared/definition11.js +2 -2
- package/shared/definition12.cjs +6 -6
- package/shared/definition12.js +1 -1
- package/shared/definition13.cjs +13 -14
- package/shared/definition13.js +1 -2
- package/shared/definition14.cjs +23 -24
- package/shared/definition14.js +1 -2
- package/shared/definition15.cjs +15 -16
- package/shared/definition15.js +1 -2
- package/shared/definition16.cjs +21 -21
- package/shared/definition16.js +5 -5
- package/shared/definition17.cjs +62 -61
- package/shared/definition17.js +10 -9
- package/shared/definition18.cjs +4 -4
- package/shared/definition18.js +1 -1
- package/shared/definition19.cjs +12 -12
- package/shared/definition19.js +1 -1
- package/shared/definition2.cjs +6 -7
- package/shared/definition2.js +1 -2
- package/shared/definition20.cjs +20 -21
- package/shared/definition20.js +1 -2
- package/shared/definition21.cjs +27 -28
- package/shared/definition21.js +3 -4
- package/shared/definition22.cjs +7 -7
- package/shared/definition22.js +3 -3
- package/shared/definition23.cjs +10 -11
- package/shared/definition23.js +1 -2
- package/shared/definition24.cjs +8 -8
- package/shared/definition24.js +3 -3
- package/shared/definition25.cjs +13 -14
- package/shared/definition25.js +1 -2
- package/shared/definition26.cjs +5 -6
- package/shared/definition26.js +1 -2
- package/shared/definition27.cjs +12 -13
- package/shared/definition27.js +2 -3
- package/shared/definition28.cjs +9 -10
- package/shared/definition28.js +2 -3
- package/shared/definition29.cjs +44 -45
- package/shared/definition29.js +3 -4
- package/shared/definition3.cjs +8 -9
- package/shared/definition3.js +1 -2
- package/shared/definition30.cjs +9 -10
- package/shared/definition30.js +2 -3
- package/shared/definition31.cjs +5 -5
- package/shared/definition31.js +2 -2
- package/shared/definition32.cjs +3 -4
- package/shared/definition32.js +1 -2
- package/shared/definition33.cjs +6 -7
- package/shared/definition33.js +2 -3
- package/shared/definition34.cjs +112 -45
- package/shared/definition34.js +73 -6
- package/shared/definition35.cjs +9 -209
- package/shared/definition35.js +4 -202
- package/shared/definition36.cjs +15 -16
- package/shared/definition36.js +1 -2
- package/shared/definition37.cjs +9 -9
- package/shared/definition37.js +1 -1
- package/shared/definition38.cjs +10 -10
- package/shared/definition38.js +1 -1
- package/shared/definition39.cjs +12 -13
- package/shared/definition39.js +1 -2
- package/shared/definition4.cjs +19 -20
- package/shared/definition4.js +2 -3
- package/shared/definition40.cjs +61 -13
- package/shared/definition40.js +52 -4
- package/shared/definition41.cjs +29 -30
- package/shared/definition41.js +1 -2
- package/shared/definition42.cjs +52 -53
- package/shared/definition42.js +3 -4
- package/shared/definition43.cjs +40 -40
- package/shared/definition43.js +6 -6
- package/shared/definition44.cjs +14 -15
- package/shared/definition44.js +1 -2
- package/shared/definition45.cjs +9 -10
- package/shared/definition45.js +1 -2
- package/shared/definition46.cjs +26 -27
- package/shared/definition46.js +1 -2
- package/shared/definition47.cjs +17 -18
- package/shared/definition47.js +2 -3
- package/shared/definition48.cjs +9 -10
- package/shared/definition48.js +1 -2
- package/shared/definition49.cjs +3 -4
- package/shared/definition49.js +1 -2
- package/shared/definition5.cjs +30 -31
- package/shared/definition5.js +1 -2
- package/shared/definition50.cjs +12 -13
- package/shared/definition50.js +2 -3
- package/shared/definition51.cjs +109 -72
- package/shared/definition51.js +78 -41
- package/shared/definition52.cjs +4 -5
- package/shared/definition52.js +1 -2
- package/shared/definition53.cjs +15 -16
- package/shared/definition53.js +2 -3
- package/shared/definition54.cjs +20 -21
- package/shared/definition54.js +1 -2
- package/shared/definition55.cjs +5 -5
- package/shared/definition55.js +1 -1
- package/shared/definition56.cjs +18 -19
- package/shared/definition56.js +1 -2
- package/shared/definition57.cjs +10 -11
- package/shared/definition57.js +1 -2
- package/shared/definition58.cjs +7 -8
- package/shared/definition58.js +1 -2
- package/shared/definition59.cjs +16 -17
- package/shared/definition59.js +3 -4
- package/shared/definition6.cjs +11 -12
- package/shared/definition6.js +1 -2
- package/shared/definition60.cjs +9 -10
- package/shared/definition60.js +2 -3
- package/shared/definition61.cjs +27 -30
- package/shared/definition61.js +17 -20
- package/shared/definition62.cjs +12 -9
- package/shared/definition62.js +8 -5
- package/shared/definition63.cjs +13 -14
- package/shared/definition63.js +1 -2
- package/shared/definition7.cjs +9 -10
- package/shared/definition7.js +2 -3
- package/shared/definition8.cjs +14 -15
- package/shared/definition8.js +2 -3
- package/shared/definition9.cjs +7 -7
- package/shared/definition9.js +1 -1
- package/shared/form-associated.cjs +14 -14
- package/shared/form-associated.js +1 -1
- package/shared/form-associated2.cjs +10 -10
- package/shared/form-associated2.js +1 -1
- package/shared/form-elements.cjs +13 -13
- package/shared/form-elements.js +1 -1
- package/shared/foundation/progress/base-progress.d.ts +2 -2
- package/shared/foundation-element.cjs +11 -11
- package/shared/foundation-element.js +1 -1
- package/shared/key-codes2.cjs +0 -56
- package/shared/key-codes2.js +1 -53
- package/shared/listbox.cjs +15 -16
- package/shared/listbox.js +2 -3
- package/shared/localized.cjs +2 -2
- package/shared/localized.js +1 -1
- package/shared/option.cjs +205 -0
- package/shared/option.js +202 -0
- package/shared/presentationDate.cjs +42 -43
- package/shared/presentationDate.js +1 -2
- package/shared/ref.cjs +2 -2
- package/shared/ref.js +1 -1
- package/shared/repeat.cjs +15 -15
- package/shared/repeat.js +1 -1
- package/shared/slider.template.cjs +4 -4
- package/shared/slider.template.js +1 -1
- package/shared/slotted.cjs +4 -4
- package/shared/slotted.js +1 -1
- package/shared/start-end.cjs +52 -0
- package/shared/start-end.js +50 -0
- package/shared/text-anchor.cjs +5 -6
- package/shared/text-anchor.js +3 -4
- package/shared/text-anchor.template.cjs +2 -2
- package/shared/text-anchor.template.js +1 -1
- package/shared/text-field2.cjs +23 -24
- package/shared/text-field2.js +2 -3
- package/shared/vivid-element.cjs +2610 -2
- package/shared/vivid-element.js +2591 -2
- package/styles/core/all.css +40 -1
- package/styles/core/theme.css +40 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +25 -4
- package/styles/tokens/theme-light.css +25 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/text-anchor/index.cjs +3 -3
- package/text-anchor/index.js +1 -1
- package/lib/listbox/definition.d.ts +0 -2
- package/lib/listbox/listbox.d.ts +0 -14
- package/lib/listbox/listbox.template.d.ts +0 -2
- package/listbox/index.cjs +0 -54
- package/listbox/index.js +0 -52
- package/shared/aria-global2.cjs +0 -75
- package/shared/aria-global2.js +0 -73
- package/shared/defineVividComponent.cjs +0 -2612
- package/shared/defineVividComponent.js +0 -2592
- package/shared/listbox2.cjs +0 -1268
- package/shared/listbox2.js +0 -1265
- package/shared/strings2.cjs +0 -37
- package/shared/strings2.js +0 -33
|
@@ -4,7 +4,7 @@ const definition$1 = require('./definition11.cjs');
|
|
|
4
4
|
const definition = require('./definition63.cjs');
|
|
5
5
|
const textField = require('./text-field2.cjs');
|
|
6
6
|
const definition$2 = require('./definition22.cjs');
|
|
7
|
-
const
|
|
7
|
+
const vividElement = require('./vivid-element.cjs');
|
|
8
8
|
const ref = require('./ref.cjs');
|
|
9
9
|
const slotted = require('./slotted.cjs');
|
|
10
10
|
const repeat = require('./repeat.cjs');
|
|
@@ -13,7 +13,6 @@ const classNames = require('./class-names.cjs');
|
|
|
13
13
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
14
14
|
const index = require('./index.cjs');
|
|
15
15
|
const formAssociated = require('./form-associated.cjs');
|
|
16
|
-
const vividElement = require('./vivid-element.cjs');
|
|
17
16
|
const trappedFocus = require('./trapped-focus.cjs');
|
|
18
17
|
const formElements = require('./form-elements.cjs');
|
|
19
18
|
const localized = require('./localized.cjs');
|
|
@@ -5527,10 +5526,10 @@ const monthToStr = ({ month, year }) => `${year.toString().padStart(4, "0")}-${(
|
|
|
5527
5526
|
|
|
5528
5527
|
function renderDialogHeader(context) {
|
|
5529
5528
|
const buttonTag = context.tagFor(definition$1.Button);
|
|
5530
|
-
return
|
|
5529
|
+
return vividElement.html`<div class="header">
|
|
5531
5530
|
${when.when(
|
|
5532
5531
|
(x) => x.prevYearButton,
|
|
5533
|
-
|
|
5532
|
+
vividElement.html`
|
|
5534
5533
|
<${buttonTag}
|
|
5535
5534
|
tabindex="1"
|
|
5536
5535
|
class="vwc-button"
|
|
@@ -5544,7 +5543,7 @@ function renderDialogHeader(context) {
|
|
|
5544
5543
|
)}
|
|
5545
5544
|
${when.when(
|
|
5546
5545
|
(x) => x.prevMonthButton,
|
|
5547
|
-
|
|
5546
|
+
vividElement.html`
|
|
5548
5547
|
<${buttonTag}
|
|
5549
5548
|
tabindex="1"
|
|
5550
5549
|
class="vwc-button"
|
|
@@ -5559,7 +5558,7 @@ function renderDialogHeader(context) {
|
|
|
5559
5558
|
<div class="title">
|
|
5560
5559
|
${when.when(
|
|
5561
5560
|
(x) => x.titleClickable,
|
|
5562
|
-
|
|
5561
|
+
vividElement.html`
|
|
5563
5562
|
<button
|
|
5564
5563
|
tabindex="1"
|
|
5565
5564
|
id="${(x) => `grid-label-${x.id}`}"
|
|
@@ -5573,7 +5572,7 @@ function renderDialogHeader(context) {
|
|
|
5573
5572
|
)}
|
|
5574
5573
|
${when.when(
|
|
5575
5574
|
(x) => !x.titleClickable,
|
|
5576
|
-
|
|
5575
|
+
vividElement.html`
|
|
5577
5576
|
<div
|
|
5578
5577
|
id="${(x) => `grid-label-${x.id}`}"
|
|
5579
5578
|
class="title-action"
|
|
@@ -5587,7 +5586,7 @@ function renderDialogHeader(context) {
|
|
|
5587
5586
|
|
|
5588
5587
|
${when.when(
|
|
5589
5588
|
(x) => x.nextMonthButton,
|
|
5590
|
-
|
|
5589
|
+
vividElement.html`
|
|
5591
5590
|
<${buttonTag}
|
|
5592
5591
|
tabindex="1"
|
|
5593
5592
|
class="vwc-button"
|
|
@@ -5601,7 +5600,7 @@ function renderDialogHeader(context) {
|
|
|
5601
5600
|
)}
|
|
5602
5601
|
${when.when(
|
|
5603
5602
|
(x) => x.nextYearButton,
|
|
5604
|
-
|
|
5603
|
+
vividElement.html`
|
|
5605
5604
|
<${buttonTag}
|
|
5606
5605
|
tabindex="1"
|
|
5607
5606
|
class="vwc-button"
|
|
@@ -5617,7 +5616,7 @@ function renderDialogHeader(context) {
|
|
|
5617
5616
|
}
|
|
5618
5617
|
function renderCalendarGrid(context) {
|
|
5619
5618
|
const dividerTag = context.tagFor(definition$2.Divider);
|
|
5620
|
-
return
|
|
5619
|
+
return vividElement.html`<div
|
|
5621
5620
|
class="calendar"
|
|
5622
5621
|
role="grid"
|
|
5623
5622
|
aria-labelledby="${(x) => `grid-label-${x.id}`}"
|
|
@@ -5625,7 +5624,7 @@ function renderCalendarGrid(context) {
|
|
|
5625
5624
|
<div class="calendar-weekdays" role="row">
|
|
5626
5625
|
${repeat.repeat(
|
|
5627
5626
|
(x) => x.calendar.weekdays,
|
|
5628
|
-
|
|
5627
|
+
vividElement.html`
|
|
5629
5628
|
<div
|
|
5630
5629
|
class="calendar-weekday"
|
|
5631
5630
|
role="columnheader"
|
|
@@ -5639,17 +5638,17 @@ function renderCalendarGrid(context) {
|
|
|
5639
5638
|
<${dividerTag} class="calendar-separator" role="presentation"></${dividerTag}>
|
|
5640
5639
|
${repeat.repeat(
|
|
5641
5640
|
(x) => x.calendar.grid,
|
|
5642
|
-
|
|
5641
|
+
vividElement.html` <div class="calendar-week" role="row">
|
|
5643
5642
|
${repeat.repeat(
|
|
5644
5643
|
(x) => x,
|
|
5645
|
-
|
|
5644
|
+
vividElement.html`
|
|
5646
5645
|
${when.when(
|
|
5647
5646
|
(x, c) => c.parentContext.parentContext.parent._hideDatesOutsideMonth && x.isOutsideMonth,
|
|
5648
|
-
|
|
5647
|
+
vividElement.html`<div class="calendar-day"></div>`
|
|
5649
5648
|
)}
|
|
5650
5649
|
${when.when(
|
|
5651
5650
|
(x, c) => !c.parentContext.parentContext.parent._hideDatesOutsideMonth || !x.isOutsideMonth,
|
|
5652
|
-
|
|
5651
|
+
vividElement.html` <span role="gridcell">
|
|
5653
5652
|
<button
|
|
5654
5653
|
class="${(x, c) => classNames.classNames(
|
|
5655
5654
|
"calendar-day",
|
|
@@ -5707,7 +5706,7 @@ function renderCalendarGrid(context) {
|
|
|
5707
5706
|
}
|
|
5708
5707
|
function renderMonthPickerGrid(context) {
|
|
5709
5708
|
const dividerTag = context.tagFor(definition$2.Divider);
|
|
5710
|
-
return
|
|
5709
|
+
return vividElement.html`
|
|
5711
5710
|
<${dividerTag}
|
|
5712
5711
|
class="months-separator"
|
|
5713
5712
|
role="presentation"
|
|
@@ -5719,11 +5718,11 @@ function renderMonthPickerGrid(context) {
|
|
|
5719
5718
|
>
|
|
5720
5719
|
${repeat.repeat(
|
|
5721
5720
|
(x) => x.months,
|
|
5722
|
-
|
|
5721
|
+
vividElement.html`
|
|
5723
5722
|
<div class="months-row" role="row">
|
|
5724
5723
|
${repeat.repeat(
|
|
5725
5724
|
(x) => x,
|
|
5726
|
-
|
|
5725
|
+
vividElement.html`
|
|
5727
5726
|
<span role="gridcell">
|
|
5728
5727
|
<button
|
|
5729
5728
|
class="${(x, c) => classNames.classNames(
|
|
@@ -5782,7 +5781,7 @@ const DatePickerBaseTemplate = (context) => {
|
|
|
5782
5781
|
const popupTag = context.tagFor(definition.Popup);
|
|
5783
5782
|
const textFieldTag = context.tagFor(textField.TextField);
|
|
5784
5783
|
const buttonTag = context.tagFor(definition$1.Button);
|
|
5785
|
-
return
|
|
5784
|
+
return vividElement.html`<div class="base" @keydown="${(x, { event }) => x._onBaseKeyDown(event)}">
|
|
5786
5785
|
<${textFieldTag} id="text-field"
|
|
5787
5786
|
${ref.ref("_textFieldEl")}
|
|
5788
5787
|
class="control"
|
|
@@ -5825,15 +5824,15 @@ const DatePickerBaseTemplate = (context) => {
|
|
|
5825
5824
|
<div class="segments">
|
|
5826
5825
|
${repeat.repeat(
|
|
5827
5826
|
(x) => x._segments,
|
|
5828
|
-
|
|
5827
|
+
vividElement.html` <div class="segment">
|
|
5829
5828
|
${renderDialogHeader(context)}
|
|
5830
5829
|
${when.when(
|
|
5831
5830
|
(x) => x.type === "month-picker",
|
|
5832
|
-
|
|
5831
|
+
vividElement.html`${renderMonthPickerGrid(context)}`
|
|
5833
5832
|
)}
|
|
5834
5833
|
${when.when(
|
|
5835
5834
|
(x) => x.type === "calendar",
|
|
5836
|
-
|
|
5835
|
+
vividElement.html`${renderCalendarGrid(context)}`
|
|
5837
5836
|
)}
|
|
5838
5837
|
</div>`
|
|
5839
5838
|
)}
|
|
@@ -6088,11 +6087,11 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6088
6087
|
document.addEventListener("click", this.#dismissOnClickOutside);
|
|
6089
6088
|
this.addEventListener("focusin", this.#onFocusIn);
|
|
6090
6089
|
this.addEventListener("focusout", this.#onFocusOut);
|
|
6091
|
-
this.#localeChangeObserver =
|
|
6090
|
+
this.#localeChangeObserver = vividElement.Observable.binding(
|
|
6092
6091
|
() => this.locale,
|
|
6093
6092
|
this.#localeChangeHandler
|
|
6094
6093
|
);
|
|
6095
|
-
this.#localeChangeObserver.observe(this,
|
|
6094
|
+
this.#localeChangeObserver.observe(this, vividElement.defaultExecutionContext);
|
|
6096
6095
|
}
|
|
6097
6096
|
disconnectedCallback() {
|
|
6098
6097
|
super.disconnectedCallback();
|
|
@@ -6172,7 +6171,7 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6172
6171
|
this._closePopup();
|
|
6173
6172
|
} else {
|
|
6174
6173
|
this.#openPopupIfPossible();
|
|
6175
|
-
|
|
6174
|
+
vividElement.DOM.processUpdates();
|
|
6176
6175
|
const tabbableDate = this.shadowRoot.querySelector(
|
|
6177
6176
|
`[data-date="${this._tabbableDate}"]`
|
|
6178
6177
|
);
|
|
@@ -6340,7 +6339,7 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6340
6339
|
}
|
|
6341
6340
|
if (newDate && this._isDateInValidRange(newDate)) {
|
|
6342
6341
|
if (this._adjustSelectedMonthToEnsureVisibilityOf(newDate)) {
|
|
6343
|
-
|
|
6342
|
+
vividElement.DOM.processUpdates();
|
|
6344
6343
|
}
|
|
6345
6344
|
this._dialogEl.querySelector(
|
|
6346
6345
|
`[data-date="${newDate}"]`
|
|
@@ -6406,7 +6405,7 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6406
6405
|
if (newMonth && this._isMonthInValidRange(newMonth)) {
|
|
6407
6406
|
if (newMonth.year !== this._monthPickerYear) {
|
|
6408
6407
|
this._monthPickerYear = newMonth.year;
|
|
6409
|
-
|
|
6408
|
+
vividElement.DOM.processUpdates();
|
|
6410
6409
|
}
|
|
6411
6410
|
this._dialogEl.querySelector(
|
|
6412
6411
|
`[data-month="${monthToStr(newMonth)}"]`
|
|
@@ -6450,52 +6449,52 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6450
6449
|
}
|
|
6451
6450
|
}
|
|
6452
6451
|
__decorateClass([
|
|
6453
|
-
|
|
6452
|
+
vividElement.attr({ converter: ValidDateFilter })
|
|
6454
6453
|
], DatePickerBase.prototype, "min", 2);
|
|
6455
6454
|
__decorateClass([
|
|
6456
|
-
|
|
6455
|
+
vividElement.attr({ converter: ValidDateFilter })
|
|
6457
6456
|
], DatePickerBase.prototype, "max", 2);
|
|
6458
6457
|
__decorateClass([
|
|
6459
|
-
|
|
6458
|
+
vividElement.attr({ attribute: "value" })
|
|
6460
6459
|
], DatePickerBase.prototype, "initialValue", 2);
|
|
6461
6460
|
__decorateClass([
|
|
6462
|
-
|
|
6461
|
+
vividElement.attr({ attribute: "current-value" })
|
|
6463
6462
|
], DatePickerBase.prototype, "currentValue", 2);
|
|
6464
6463
|
__decorateClass([
|
|
6465
|
-
|
|
6464
|
+
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
6466
6465
|
], DatePickerBase.prototype, "readOnly", 2);
|
|
6467
6466
|
__decorateClass([
|
|
6468
|
-
|
|
6467
|
+
vividElement.observable
|
|
6469
6468
|
], DatePickerBase.prototype, "_selectedMonth", 2);
|
|
6470
6469
|
__decorateClass([
|
|
6471
|
-
|
|
6470
|
+
vividElement.observable
|
|
6472
6471
|
], DatePickerBase.prototype, "_popupOpen", 2);
|
|
6473
6472
|
__decorateClass([
|
|
6474
|
-
|
|
6473
|
+
vividElement.observable
|
|
6475
6474
|
], DatePickerBase.prototype, "_presentationValue", 2);
|
|
6476
6475
|
__decorateClass([
|
|
6477
|
-
|
|
6476
|
+
vividElement.volatile
|
|
6478
6477
|
], DatePickerBase.prototype, "_isPrevYearDisabled", 1);
|
|
6479
6478
|
__decorateClass([
|
|
6480
|
-
|
|
6479
|
+
vividElement.volatile
|
|
6481
6480
|
], DatePickerBase.prototype, "_isNextYearDisabled", 1);
|
|
6482
6481
|
__decorateClass([
|
|
6483
|
-
|
|
6482
|
+
vividElement.observable
|
|
6484
6483
|
], DatePickerBase.prototype, "_numCalendars", 2);
|
|
6485
6484
|
__decorateClass([
|
|
6486
|
-
|
|
6485
|
+
vividElement.observable
|
|
6487
6486
|
], DatePickerBase.prototype, "_lastFocussedDate", 2);
|
|
6488
6487
|
__decorateClass([
|
|
6489
|
-
|
|
6488
|
+
vividElement.volatile
|
|
6490
6489
|
], DatePickerBase.prototype, "_tabbableDate", 1);
|
|
6491
6490
|
__decorateClass([
|
|
6492
|
-
|
|
6491
|
+
vividElement.observable
|
|
6493
6492
|
], DatePickerBase.prototype, "_monthPickerYear", 2);
|
|
6494
6493
|
__decorateClass([
|
|
6495
|
-
|
|
6494
|
+
vividElement.observable
|
|
6496
6495
|
], DatePickerBase.prototype, "_lastFocussedMonth", 2);
|
|
6497
6496
|
__decorateClass([
|
|
6498
|
-
|
|
6497
|
+
vividElement.volatile
|
|
6499
6498
|
], DatePickerBase.prototype, "_tabbableMonth", 1);
|
|
6500
6499
|
applyMixinsWithObservables.applyMixinsWithObservables(
|
|
6501
6500
|
DatePickerBase,
|
|
@@ -2,7 +2,7 @@ import { B as Button } from './definition11.js';
|
|
|
2
2
|
import { P as Popup } from './definition63.js';
|
|
3
3
|
import { T as TextField } from './text-field2.js';
|
|
4
4
|
import { D as Divider } from './definition22.js';
|
|
5
|
-
import { h as html, O as Observable, i as defaultExecutionContext, D as DOM, a as attr, o as observable, v as volatile } from './
|
|
5
|
+
import { h as html, V as VividElement, O as Observable, i as defaultExecutionContext, D as DOM, a as attr, o as observable, v as volatile } from './vivid-element.js';
|
|
6
6
|
import { r as ref } from './ref.js';
|
|
7
7
|
import { s as slotted } from './slotted.js';
|
|
8
8
|
import { r as repeat } from './repeat.js';
|
|
@@ -11,7 +11,6 @@ import { c as classNames } from './class-names.js';
|
|
|
11
11
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
12
12
|
import { h as handleEscapeKeyAndStopPropogation } from './index.js';
|
|
13
13
|
import { F as FormAssociated } from './form-associated.js';
|
|
14
|
-
import { V as VividElement } from './vivid-element.js';
|
|
15
14
|
import { T as TrappedFocus } from './trapped-focus.js';
|
|
16
15
|
import { a as FormElementHelperText } from './form-elements.js';
|
|
17
16
|
import { L as Localized } from './localized.js';
|
package/shared/ref.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The runtime behavior for template references.
|
|
@@ -37,7 +37,7 @@ class RefBehavior {
|
|
|
37
37
|
* @public
|
|
38
38
|
*/
|
|
39
39
|
function ref(propertyName) {
|
|
40
|
-
return new
|
|
40
|
+
return new vividElement.AttachedBehaviorHTMLDirective("fast-ref", RefBehavior, propertyName);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
exports.ref = ref;
|
package/shared/ref.js
CHANGED
package/shared/repeat.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
function newSplice(index, removed, addedCount) {
|
|
@@ -188,7 +188,7 @@ function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {
|
|
|
188
188
|
currentEnd -= suffixCount;
|
|
189
189
|
oldEnd -= suffixCount;
|
|
190
190
|
if (currentEnd - currentStart === 0 && oldEnd - oldStart === 0) {
|
|
191
|
-
return
|
|
191
|
+
return vividElement.emptyArray;
|
|
192
192
|
}
|
|
193
193
|
if (currentStart === currentEnd) {
|
|
194
194
|
const splice = newSplice(currentStart, [], 0);
|
|
@@ -345,7 +345,7 @@ function adjustIndex(changeRecord, array) {
|
|
|
345
345
|
changeRecord.index = index;
|
|
346
346
|
return changeRecord;
|
|
347
347
|
}
|
|
348
|
-
class ArrayObserver extends
|
|
348
|
+
class ArrayObserver extends vividElement.SubscriberSet {
|
|
349
349
|
constructor(source) {
|
|
350
350
|
super(source);
|
|
351
351
|
this.oldCollection = void 0;
|
|
@@ -370,14 +370,14 @@ class ArrayObserver extends defineVividComponent.SubscriberSet {
|
|
|
370
370
|
}
|
|
371
371
|
if (this.needsQueue) {
|
|
372
372
|
this.needsQueue = false;
|
|
373
|
-
|
|
373
|
+
vividElement.DOM.queueUpdate(this);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
reset(oldCollection) {
|
|
377
377
|
this.oldCollection = oldCollection;
|
|
378
378
|
if (this.needsQueue) {
|
|
379
379
|
this.needsQueue = false;
|
|
380
|
-
|
|
380
|
+
vividElement.DOM.queueUpdate(this);
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
flush() {
|
|
@@ -410,7 +410,7 @@ function enableArrayObservation() {
|
|
|
410
410
|
return;
|
|
411
411
|
}
|
|
412
412
|
arrayObservationEnabled = true;
|
|
413
|
-
|
|
413
|
+
vividElement.Observable.setArrayObserverFactory((collection) => {
|
|
414
414
|
return new ArrayObserver(collection);
|
|
415
415
|
});
|
|
416
416
|
const proto = Array.prototype;
|
|
@@ -541,8 +541,8 @@ class RepeatBehavior {
|
|
|
541
541
|
this.originalContext = void 0;
|
|
542
542
|
this.childContext = void 0;
|
|
543
543
|
this.bindView = bindWithoutPositioning;
|
|
544
|
-
this.itemsBindingObserver =
|
|
545
|
-
this.templateBindingObserver =
|
|
544
|
+
this.itemsBindingObserver = vividElement.Observable.binding(itemsBinding, this, isItemsBindingVolatile);
|
|
545
|
+
this.templateBindingObserver = vividElement.Observable.binding(templateBinding, this, isTemplateBindingVolatile);
|
|
546
546
|
if (options.positioning) {
|
|
547
547
|
this.bindView = bindWithPositioning;
|
|
548
548
|
}
|
|
@@ -594,11 +594,11 @@ class RepeatBehavior {
|
|
|
594
594
|
}
|
|
595
595
|
observeItems(force = false) {
|
|
596
596
|
if (!this.items) {
|
|
597
|
-
this.items =
|
|
597
|
+
this.items = vividElement.emptyArray;
|
|
598
598
|
return;
|
|
599
599
|
}
|
|
600
600
|
const oldObserver = this.itemsObserver;
|
|
601
|
-
const newObserver = (this.itemsObserver =
|
|
601
|
+
const newObserver = (this.itemsObserver = vividElement.Observable.getNotifier(this.items));
|
|
602
602
|
const hasNewObserver = oldObserver !== newObserver;
|
|
603
603
|
if (hasNewObserver && oldObserver !== null) {
|
|
604
604
|
oldObserver.unsubscribe(this);
|
|
@@ -674,7 +674,7 @@ class RepeatBehavior {
|
|
|
674
674
|
let viewsLength = views.length;
|
|
675
675
|
if (itemsLength === 0 || templateChanged || !this.options.recycle) {
|
|
676
676
|
// all views need to be removed
|
|
677
|
-
|
|
677
|
+
vividElement.HTMLView.disposeContiguousBatch(views);
|
|
678
678
|
viewsLength = 0;
|
|
679
679
|
}
|
|
680
680
|
if (viewsLength === 0) {
|
|
@@ -719,7 +719,7 @@ class RepeatBehavior {
|
|
|
719
719
|
* A directive that configures list rendering.
|
|
720
720
|
* @public
|
|
721
721
|
*/
|
|
722
|
-
class RepeatDirective extends
|
|
722
|
+
class RepeatDirective extends vividElement.HTMLDirective {
|
|
723
723
|
/**
|
|
724
724
|
* Creates an instance of RepeatDirective.
|
|
725
725
|
* @param itemsBinding - The binding that provides the array to render.
|
|
@@ -735,10 +735,10 @@ class RepeatDirective extends defineVividComponent.HTMLDirective {
|
|
|
735
735
|
* Creates a placeholder string based on the directive's index within the template.
|
|
736
736
|
* @param index - The index of the directive within the template.
|
|
737
737
|
*/
|
|
738
|
-
this.createPlaceholder =
|
|
738
|
+
this.createPlaceholder = vividElement.DOM.createBlockPlaceholder;
|
|
739
739
|
enableArrayObservation();
|
|
740
|
-
this.isItemsBindingVolatile =
|
|
741
|
-
this.isTemplateBindingVolatile =
|
|
740
|
+
this.isItemsBindingVolatile = vividElement.Observable.isVolatileBinding(itemsBinding);
|
|
741
|
+
this.isTemplateBindingVolatile = vividElement.Observable.isVolatileBinding(templateBinding);
|
|
742
742
|
}
|
|
743
743
|
/**
|
|
744
744
|
* Creates a behavior for the provided target node.
|
package/shared/repeat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as emptyArray, O as Observable, S as SubscriberSet, D as DOM, H as HTMLDirective, g as HTMLView } from './
|
|
1
|
+
import { e as emptyArray, O as Observable, S as SubscriberSet, D as DOM, H as HTMLDirective, g as HTMLView } from './vivid-element.js';
|
|
2
2
|
|
|
3
3
|
/** @internal */
|
|
4
4
|
function newSplice(index, removed, addedCount) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const numbers = require('./numbers.cjs');
|
|
4
4
|
const definition = require('./definition63.cjs');
|
|
5
|
-
const
|
|
5
|
+
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const ref = require('./ref.cjs');
|
|
7
7
|
const aria = require('./aria.cjs');
|
|
8
8
|
const when = require('./when.cjs');
|
|
@@ -35,7 +35,7 @@ const getClasses = ({ disabled, connotation }) => classNames.classNames(
|
|
|
35
35
|
const getThumbClasses = ({ _focusVisible }) => classNames.classNames("thumb-container", ["focus-visible", _focusVisible]);
|
|
36
36
|
const getMarkersTemplate = (isHorizontal, numMarkers) => {
|
|
37
37
|
const placeholder = isHorizontal ? ["right", "center", "", "100% repeat-x"] : ["bottom", "top", "100%", "repeat-y"];
|
|
38
|
-
return
|
|
38
|
+
return vividElement.html` <div
|
|
39
39
|
class="mark"
|
|
40
40
|
style="
|
|
41
41
|
background: linear-gradient(to ${placeholder[0]}, currentcolor 1px, transparent 0px)
|
|
@@ -45,7 +45,7 @@ const getMarkersTemplate = (isHorizontal, numMarkers) => {
|
|
|
45
45
|
};
|
|
46
46
|
const SliderTemplate = (context) => {
|
|
47
47
|
const popupTag = context.tagFor(definition.Popup);
|
|
48
|
-
return
|
|
48
|
+
return vividElement.html`<template
|
|
49
49
|
role="${(x) => x.ariaLabel ? "presentation" : null}"
|
|
50
50
|
@focusin="${(x) => x._onFocusIn()}"
|
|
51
51
|
@focusout="${(x) => x._onFocusOut()}"
|
|
@@ -77,7 +77,7 @@ const SliderTemplate = (context) => {
|
|
|
77
77
|
></div>
|
|
78
78
|
${when.when(
|
|
79
79
|
(x) => x.pin,
|
|
80
|
-
|
|
80
|
+
vividElement.html`<${popupTag}
|
|
81
81
|
class="popup"
|
|
82
82
|
arrow
|
|
83
83
|
alternate
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as limit } from './numbers.js';
|
|
2
2
|
import { P as Popup, a as PlacementStrategy } from './definition63.js';
|
|
3
|
-
import { h as html } from './
|
|
3
|
+
import { h as html } from './vivid-element.js';
|
|
4
4
|
import { r as ref } from './ref.js';
|
|
5
5
|
import { O as Orientation } from './aria.js';
|
|
6
6
|
import { w as when } from './when.js';
|
package/shared/slotted.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates a function that can be used to filter a Node array, selecting only elements.
|
|
@@ -39,7 +39,7 @@ class NodeObservationBehavior {
|
|
|
39
39
|
*/
|
|
40
40
|
bind(source) {
|
|
41
41
|
const name = this.options.property;
|
|
42
|
-
this.shouldUpdate =
|
|
42
|
+
this.shouldUpdate = vividElement.Observable.getAccessors(source).some((x) => x.name === name);
|
|
43
43
|
this.source = source;
|
|
44
44
|
this.updateTarget(this.computeNodes());
|
|
45
45
|
if (this.shouldUpdate) {
|
|
@@ -51,7 +51,7 @@ class NodeObservationBehavior {
|
|
|
51
51
|
* @param source - The source to unbind from.
|
|
52
52
|
*/
|
|
53
53
|
unbind() {
|
|
54
|
-
this.updateTarget(
|
|
54
|
+
this.updateTarget(vividElement.emptyArray);
|
|
55
55
|
this.source = null;
|
|
56
56
|
if (this.shouldUpdate) {
|
|
57
57
|
this.disconnect();
|
|
@@ -115,7 +115,7 @@ function slotted(propertyOrOptions) {
|
|
|
115
115
|
if (typeof propertyOrOptions === "string") {
|
|
116
116
|
propertyOrOptions = { property: propertyOrOptions };
|
|
117
117
|
}
|
|
118
|
-
return new
|
|
118
|
+
return new vividElement.AttachedBehaviorHTMLDirective("fast-slotted", SlottedBehavior, propertyOrOptions);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
exports.NodeObservationBehavior = NodeObservationBehavior;
|
package/shared/slotted.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as Observable, e as emptyArray, b as AttachedBehaviorHTMLDirective } from './
|
|
1
|
+
import { O as Observable, e as emptyArray, b as AttachedBehaviorHTMLDirective } from './vivid-element.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates a function that can be used to filter a Node array, selecting only elements.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
|
+
const ref = require('./ref.cjs');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A mixin class implementing start and end elements.
|
|
8
|
+
* These are generally used to decorate text elements with icons or other visual indicators.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class StartEnd {
|
|
12
|
+
handleStartContentChange() {
|
|
13
|
+
this.startContainer.classList.toggle("start", this.start.assignedNodes().length > 0);
|
|
14
|
+
}
|
|
15
|
+
handleEndContentChange() {
|
|
16
|
+
this.endContainer.classList.toggle("end", this.end.assignedNodes().length > 0);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The template for the end element.
|
|
21
|
+
* For use with {@link StartEnd}
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
* @deprecated - use endSlotTemplate
|
|
25
|
+
*/
|
|
26
|
+
vividElement.html `
|
|
27
|
+
<span part="end" ${ref.ref("endContainer")}>
|
|
28
|
+
<slot
|
|
29
|
+
name="end"
|
|
30
|
+
${ref.ref("end")}
|
|
31
|
+
@slotchange="${x => x.handleEndContentChange()}"
|
|
32
|
+
></slot>
|
|
33
|
+
</span>
|
|
34
|
+
`;
|
|
35
|
+
/**
|
|
36
|
+
* The template for the start element.
|
|
37
|
+
* For use with {@link StartEnd}
|
|
38
|
+
*
|
|
39
|
+
* @public
|
|
40
|
+
* @deprecated - use startSlotTemplate
|
|
41
|
+
*/
|
|
42
|
+
vividElement.html `
|
|
43
|
+
<span part="start" ${ref.ref("startContainer")}>
|
|
44
|
+
<slot
|
|
45
|
+
name="start"
|
|
46
|
+
${ref.ref("start")}
|
|
47
|
+
@slotchange="${x => x.handleStartContentChange()}"
|
|
48
|
+
></slot>
|
|
49
|
+
</span>
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
exports.StartEnd = StartEnd;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { h as html } from './vivid-element.js';
|
|
2
|
+
import { r as ref } from './ref.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A mixin class implementing start and end elements.
|
|
6
|
+
* These are generally used to decorate text elements with icons or other visual indicators.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
class StartEnd {
|
|
10
|
+
handleStartContentChange() {
|
|
11
|
+
this.startContainer.classList.toggle("start", this.start.assignedNodes().length > 0);
|
|
12
|
+
}
|
|
13
|
+
handleEndContentChange() {
|
|
14
|
+
this.endContainer.classList.toggle("end", this.end.assignedNodes().length > 0);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The template for the end element.
|
|
19
|
+
* For use with {@link StartEnd}
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
* @deprecated - use endSlotTemplate
|
|
23
|
+
*/
|
|
24
|
+
html `
|
|
25
|
+
<span part="end" ${ref("endContainer")}>
|
|
26
|
+
<slot
|
|
27
|
+
name="end"
|
|
28
|
+
${ref("end")}
|
|
29
|
+
@slotchange="${x => x.handleEndContentChange()}"
|
|
30
|
+
></slot>
|
|
31
|
+
</span>
|
|
32
|
+
`;
|
|
33
|
+
/**
|
|
34
|
+
* The template for the start element.
|
|
35
|
+
* For use with {@link StartEnd}
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
* @deprecated - use startSlotTemplate
|
|
39
|
+
*/
|
|
40
|
+
html `
|
|
41
|
+
<span part="start" ${ref("startContainer")}>
|
|
42
|
+
<slot
|
|
43
|
+
name="start"
|
|
44
|
+
${ref("start")}
|
|
45
|
+
@slotchange="${x => x.handleStartContentChange()}"
|
|
46
|
+
></slot>
|
|
47
|
+
</span>
|
|
48
|
+
`;
|
|
49
|
+
|
|
50
|
+
export { StartEnd as S };
|
package/shared/text-anchor.cjs
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
const affix = require('./affix.cjs');
|
|
4
4
|
const applyMixins = require('./apply-mixins.cjs');
|
|
5
5
|
const anchor = require('./anchor.cjs');
|
|
6
|
-
const
|
|
7
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
6
|
+
const vividElement = require('./vivid-element.cjs');
|
|
8
7
|
|
|
9
8
|
var __defProp = Object.defineProperty;
|
|
10
9
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -15,7 +14,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
15
14
|
if (result) __defProp(target, key, result);
|
|
16
15
|
return result;
|
|
17
16
|
};
|
|
18
|
-
class TextAnchor extends
|
|
17
|
+
class TextAnchor extends vividElement.VividElement {
|
|
19
18
|
/**
|
|
20
19
|
* Allows subclasses to provide a body template that will be rendered inside the anchor.
|
|
21
20
|
* @internal
|
|
@@ -25,13 +24,13 @@ class TextAnchor extends foundationElement.FoundationElement {
|
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
__decorateClass([
|
|
28
|
-
|
|
27
|
+
vividElement.attr
|
|
29
28
|
], TextAnchor.prototype, "text");
|
|
30
29
|
__decorateClass([
|
|
31
|
-
|
|
30
|
+
vividElement.attr
|
|
32
31
|
], TextAnchor.prototype, "connotation");
|
|
33
32
|
__decorateClass([
|
|
34
|
-
|
|
33
|
+
vividElement.attr
|
|
35
34
|
], TextAnchor.prototype, "appearance");
|
|
36
35
|
applyMixins.applyMixins(TextAnchor, affix.AffixIcon, anchor.Anchor);
|
|
37
36
|
|