@vonage/vivid 4.2.0 → 4.4.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/appearance-ui/index.cjs +1 -2
- package/appearance-ui/index.js +1 -2
- package/custom-elements.json +435 -41
- package/index.cjs +1 -0
- package/index.js +1 -1
- package/lib/button/button.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +1 -0
- package/lib/empty-state/definition.d.ts +1 -0
- package/lib/empty-state/empty-state.d.ts +5 -0
- package/lib/enums.d.ts +4 -0
- package/lib/popup/popup.d.ts +5 -0
- package/lib/range-slider/range-slider.d.ts +2 -0
- package/lib/slider/slider.d.ts +5 -0
- package/lib/slider/slider.template.d.ts +2 -2
- package/lib/switch/switch.d.ts +1 -1
- package/package.json +1 -1
- package/shared/affix.cjs +1 -2
- package/shared/affix.js +1 -2
- package/shared/anchored.cjs +1 -2
- package/shared/anchored.js +1 -2
- package/shared/calendar-event.cjs +1 -2
- package/shared/calendar-event.js +1 -2
- package/shared/definition.cjs +2 -3
- package/shared/definition.js +2 -3
- package/shared/definition11.cjs +29 -13
- package/shared/definition11.js +29 -14
- package/shared/definition12.cjs +1 -1
- package/shared/definition12.js +1 -1
- package/shared/definition13.cjs +1 -2
- package/shared/definition13.js +1 -2
- package/shared/definition14.cjs +1 -2
- package/shared/definition14.js +1 -2
- package/shared/definition15.cjs +1 -2
- package/shared/definition15.js +1 -2
- package/shared/definition16.cjs +1 -2
- package/shared/definition16.js +1 -2
- package/shared/definition17.cjs +4 -8
- package/shared/definition17.js +4 -8
- package/shared/definition18.cjs +14 -22
- package/shared/definition18.js +14 -22
- package/shared/definition19.cjs +29 -50
- package/shared/definition19.js +29 -50
- package/shared/definition20.cjs +1 -2
- package/shared/definition20.js +1 -2
- package/shared/definition21.cjs +68 -32
- package/shared/definition21.js +68 -32
- package/shared/definition23.cjs +19 -5
- package/shared/definition23.js +20 -6
- package/shared/definition24.cjs +2 -3
- package/shared/definition24.js +2 -3
- package/shared/definition25.cjs +23 -48
- package/shared/definition25.js +23 -48
- package/shared/definition26.cjs +1 -2
- package/shared/definition26.js +1 -2
- package/shared/definition28.cjs +1 -2
- package/shared/definition28.js +1 -2
- package/shared/definition29.cjs +19 -39
- package/shared/definition29.js +19 -39
- package/shared/definition3.cjs +1 -2
- package/shared/definition3.js +1 -2
- package/shared/definition30.cjs +1 -1
- package/shared/definition30.js +1 -1
- package/shared/definition31.cjs +1 -2
- package/shared/definition31.js +1 -2
- package/shared/definition34.cjs +1 -2
- package/shared/definition34.js +1 -2
- package/shared/definition35.cjs +14 -26
- package/shared/definition35.js +14 -26
- package/shared/definition36.cjs +1 -2
- package/shared/definition36.js +1 -2
- package/shared/definition37.cjs +8 -16
- package/shared/definition37.js +8 -16
- package/shared/definition38.cjs +1 -2
- package/shared/definition38.js +1 -2
- package/shared/definition39.cjs +1 -2
- package/shared/definition39.js +1 -2
- package/shared/definition4.cjs +7 -13
- package/shared/definition4.js +7 -13
- package/shared/definition40.cjs +1 -2
- package/shared/definition40.js +1 -2
- package/shared/definition42.cjs +172 -106
- package/shared/definition42.js +172 -106
- package/shared/definition43.cjs +7 -6
- package/shared/definition43.js +5 -4
- package/shared/definition44.cjs +4 -8
- package/shared/definition44.js +4 -8
- package/shared/definition45.cjs +1 -2
- package/shared/definition45.js +1 -2
- package/shared/definition46.cjs +96 -12
- package/shared/definition46.js +97 -13
- package/shared/definition47.cjs +1 -2
- package/shared/definition47.js +1 -2
- package/shared/definition48.cjs +2 -3
- package/shared/definition48.js +2 -3
- package/shared/definition5.cjs +1 -2
- package/shared/definition5.js +1 -2
- package/shared/definition50.cjs +1 -2
- package/shared/definition50.js +1 -2
- package/shared/definition51.cjs +5 -10
- package/shared/definition51.js +5 -10
- package/shared/definition52.cjs +1 -2
- package/shared/definition52.js +1 -2
- package/shared/definition53.cjs +1 -2
- package/shared/definition53.js +1 -2
- package/shared/definition54.cjs +9 -21
- package/shared/definition54.js +9 -21
- package/shared/definition55.cjs +24 -43
- package/shared/definition55.js +24 -43
- package/shared/definition56.cjs +24 -39
- package/shared/definition56.js +24 -39
- package/shared/definition57.cjs +22 -45
- package/shared/definition57.js +22 -45
- package/shared/definition58.cjs +18 -37
- package/shared/definition58.js +18 -37
- package/shared/definition59.cjs +1 -2
- package/shared/definition59.js +1 -2
- package/shared/definition6.cjs +1 -2
- package/shared/definition6.js +1 -2
- package/shared/definition62.cjs +1 -2
- package/shared/definition62.js +1 -2
- package/shared/definition63.cjs +156 -4
- package/shared/definition63.js +157 -6
- package/shared/definition7.cjs +1 -2
- package/shared/definition7.js +1 -2
- package/shared/definition8.cjs +1 -2
- package/shared/definition8.js +1 -2
- package/shared/definition9.cjs +1 -2
- package/shared/definition9.js +1 -2
- package/shared/enums.cjs +6 -0
- package/shared/enums.js +6 -1
- package/shared/icon.cjs +2 -3
- package/shared/icon.js +2 -3
- package/shared/index2.cjs +3 -6
- package/shared/index2.js +3 -6
- package/shared/listbox.cjs +1 -2
- package/shared/listbox.js +1 -2
- package/shared/patterns/anchored.d.ts +4 -4
- package/shared/patterns/chevron.d.ts +2 -0
- package/shared/presentationDate.cjs +2 -3
- package/shared/presentationDate.js +2 -3
- package/shared/radio.cjs +1 -2
- package/shared/radio.js +1 -2
- package/shared/slider.template.cjs +27 -4
- package/shared/slider.template.js +27 -4
- package/shared/text-anchor.cjs +1 -2
- package/shared/text-anchor.js +1 -2
- package/shared/video-player.cjs +4 -8
- package/shared/video-player.js +4 -8
- 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/vivid.api.json +3228 -1108
package/shared/definition63.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as attr, F as FoundationElement, o as observable, h as html, r as registerFactory } from './index.js';
|
|
1
|
+
import { a as attr, F as FoundationElement, D as DOM, o as observable, h as html, r as registerFactory } from './index.js';
|
|
2
2
|
import { B as Button, a as buttonRegistries } from './definition11.js';
|
|
3
3
|
import { E as Elevation, e as elevationRegistries } from './definition62.js';
|
|
4
4
|
import { r as ref } from './ref.js';
|
|
@@ -6,6 +6,8 @@ import { w as when } from './when.js';
|
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
|
7
7
|
|
|
8
8
|
const sides = ['top', 'right', 'bottom', 'left'];
|
|
9
|
+
const alignments = ['start', 'end'];
|
|
10
|
+
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
9
11
|
const min = Math.min;
|
|
10
12
|
const max = Math.max;
|
|
11
13
|
const round = Math.round;
|
|
@@ -419,6 +421,109 @@ const arrow = options => ({
|
|
|
419
421
|
}
|
|
420
422
|
});
|
|
421
423
|
|
|
424
|
+
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
425
|
+
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
|
|
426
|
+
return allowedPlacementsSortedByAlignment.filter(placement => {
|
|
427
|
+
if (alignment) {
|
|
428
|
+
return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
|
|
429
|
+
}
|
|
430
|
+
return true;
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
|
435
|
+
* that has the most space available automatically, without needing to specify a
|
|
436
|
+
* preferred placement. Alternative to `flip`.
|
|
437
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
438
|
+
*/
|
|
439
|
+
const autoPlacement = function (options) {
|
|
440
|
+
if (options === void 0) {
|
|
441
|
+
options = {};
|
|
442
|
+
}
|
|
443
|
+
return {
|
|
444
|
+
name: 'autoPlacement',
|
|
445
|
+
options,
|
|
446
|
+
async fn(state) {
|
|
447
|
+
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
448
|
+
const {
|
|
449
|
+
rects,
|
|
450
|
+
middlewareData,
|
|
451
|
+
placement,
|
|
452
|
+
platform,
|
|
453
|
+
elements
|
|
454
|
+
} = state;
|
|
455
|
+
const {
|
|
456
|
+
crossAxis = false,
|
|
457
|
+
alignment,
|
|
458
|
+
allowedPlacements = placements,
|
|
459
|
+
autoAlignment = true,
|
|
460
|
+
...detectOverflowOptions
|
|
461
|
+
} = evaluate(options, state);
|
|
462
|
+
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
463
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
464
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
465
|
+
const currentPlacement = placements$1[currentIndex];
|
|
466
|
+
if (currentPlacement == null) {
|
|
467
|
+
return {};
|
|
468
|
+
}
|
|
469
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
470
|
+
|
|
471
|
+
// Make `computeCoords` start from the right place.
|
|
472
|
+
if (placement !== currentPlacement) {
|
|
473
|
+
return {
|
|
474
|
+
reset: {
|
|
475
|
+
placement: placements$1[0]
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
480
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
|
|
481
|
+
placement: currentPlacement,
|
|
482
|
+
overflows: currentOverflows
|
|
483
|
+
}];
|
|
484
|
+
const nextPlacement = placements$1[currentIndex + 1];
|
|
485
|
+
|
|
486
|
+
// There are more placements to check.
|
|
487
|
+
if (nextPlacement) {
|
|
488
|
+
return {
|
|
489
|
+
data: {
|
|
490
|
+
index: currentIndex + 1,
|
|
491
|
+
overflows: allOverflows
|
|
492
|
+
},
|
|
493
|
+
reset: {
|
|
494
|
+
placement: nextPlacement
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
const placementsSortedByMostSpace = allOverflows.map(d => {
|
|
499
|
+
const alignment = getAlignment(d.placement);
|
|
500
|
+
return [d.placement, alignment && crossAxis ?
|
|
501
|
+
// Check along the mainAxis and main crossAxis side.
|
|
502
|
+
d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
|
|
503
|
+
// Check only the mainAxis.
|
|
504
|
+
d.overflows[0], d.overflows];
|
|
505
|
+
}).sort((a, b) => a[1] - b[1]);
|
|
506
|
+
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
|
|
507
|
+
// Aligned placements should not check their opposite crossAxis
|
|
508
|
+
// side.
|
|
509
|
+
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
510
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
511
|
+
if (resetPlacement !== placement) {
|
|
512
|
+
return {
|
|
513
|
+
data: {
|
|
514
|
+
index: currentIndex + 1,
|
|
515
|
+
overflows: allOverflows
|
|
516
|
+
},
|
|
517
|
+
reset: {
|
|
518
|
+
placement: resetPlacement
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
return {};
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
|
|
422
527
|
/**
|
|
423
528
|
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
424
529
|
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
@@ -1623,10 +1728,37 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
1623
1728
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1624
1729
|
if (decorator = decorators[i])
|
|
1625
1730
|
result = (decorator(target, key, result) ) || result;
|
|
1626
|
-
if (result)
|
|
1627
|
-
__defProp(target, key, result);
|
|
1731
|
+
if (result) __defProp(target, key, result);
|
|
1628
1732
|
return result;
|
|
1629
1733
|
};
|
|
1734
|
+
const PlacementStrategy = {
|
|
1735
|
+
Flip: "flip",
|
|
1736
|
+
AutoPlacementHorizontal: "auto-placement-horizontal",
|
|
1737
|
+
AutoPlacementVertical: "auto-placement-vertical"
|
|
1738
|
+
};
|
|
1739
|
+
const placementStrategyMiddlewares = {
|
|
1740
|
+
[PlacementStrategy.Flip]: flip(),
|
|
1741
|
+
[PlacementStrategy.AutoPlacementHorizontal]: autoPlacement({
|
|
1742
|
+
allowedPlacements: [
|
|
1743
|
+
"bottom",
|
|
1744
|
+
"top",
|
|
1745
|
+
"bottom-start",
|
|
1746
|
+
"bottom-end",
|
|
1747
|
+
"top-start",
|
|
1748
|
+
"top-end"
|
|
1749
|
+
]
|
|
1750
|
+
}),
|
|
1751
|
+
[PlacementStrategy.AutoPlacementVertical]: autoPlacement({
|
|
1752
|
+
allowedPlacements: [
|
|
1753
|
+
"left",
|
|
1754
|
+
"right",
|
|
1755
|
+
"left-start",
|
|
1756
|
+
"left-end",
|
|
1757
|
+
"right-start",
|
|
1758
|
+
"right-end"
|
|
1759
|
+
]
|
|
1760
|
+
})
|
|
1761
|
+
};
|
|
1630
1762
|
class Popup extends FoundationElement {
|
|
1631
1763
|
constructor() {
|
|
1632
1764
|
super(...arguments);
|
|
@@ -1634,12 +1766,19 @@ class Popup extends FoundationElement {
|
|
|
1634
1766
|
this.dismissible = false;
|
|
1635
1767
|
this.arrow = false;
|
|
1636
1768
|
this.alternate = false;
|
|
1769
|
+
/**
|
|
1770
|
+
* The placement strategy of the popup.
|
|
1771
|
+
*
|
|
1772
|
+
* @public
|
|
1773
|
+
*/
|
|
1774
|
+
this.placementStrategy = PlacementStrategy.Flip;
|
|
1775
|
+
this.animationFrame = false;
|
|
1637
1776
|
this.strategy = "fixed";
|
|
1638
1777
|
}
|
|
1639
1778
|
get #middleware() {
|
|
1640
1779
|
let middleware = [
|
|
1641
1780
|
inline(),
|
|
1642
|
-
|
|
1781
|
+
placementStrategyMiddlewares[this.placementStrategy],
|
|
1643
1782
|
hide(),
|
|
1644
1783
|
size({
|
|
1645
1784
|
apply({ availableWidth, availableHeight, elements }) {
|
|
@@ -1662,6 +1801,12 @@ class Popup extends FoundationElement {
|
|
|
1662
1801
|
#cleanup;
|
|
1663
1802
|
openChanged(_, newValue) {
|
|
1664
1803
|
newValue ? this.$emit("vwc-popup:open") : this.$emit("vwc-popup:close");
|
|
1804
|
+
DOM.queueUpdate(() => this.#updateAutoUpdate());
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* @internal
|
|
1808
|
+
*/
|
|
1809
|
+
animationFrameChanged() {
|
|
1665
1810
|
this.#updateAutoUpdate();
|
|
1666
1811
|
}
|
|
1667
1812
|
/**
|
|
@@ -1684,7 +1829,10 @@ class Popup extends FoundationElement {
|
|
|
1684
1829
|
this.#cleanup = autoUpdate(
|
|
1685
1830
|
this.anchorEl,
|
|
1686
1831
|
this.popupEl,
|
|
1687
|
-
() => this.updatePosition()
|
|
1832
|
+
() => this.updatePosition(),
|
|
1833
|
+
{
|
|
1834
|
+
animationFrame: this.animationFrame
|
|
1835
|
+
}
|
|
1688
1836
|
);
|
|
1689
1837
|
}
|
|
1690
1838
|
}
|
|
@@ -1763,6 +1911,9 @@ __decorateClass([
|
|
|
1763
1911
|
__decorateClass([
|
|
1764
1912
|
attr({ mode: "fromView" })
|
|
1765
1913
|
], Popup.prototype, "placement");
|
|
1914
|
+
__decorateClass([
|
|
1915
|
+
attr({ mode: "boolean", attribute: "animation-frame" })
|
|
1916
|
+
], Popup.prototype, "animationFrame");
|
|
1766
1917
|
__decorateClass([
|
|
1767
1918
|
attr({ mode: "fromView" })
|
|
1768
1919
|
], Popup.prototype, "strategy");
|
|
@@ -1817,4 +1968,4 @@ const popupRegistries = [
|
|
|
1817
1968
|
];
|
|
1818
1969
|
const registerPopup = registerFactory(popupRegistries);
|
|
1819
1970
|
|
|
1820
|
-
export { Popup as P, popupRegistries as p, registerPopup as r };
|
|
1971
|
+
export { Popup as P, PlacementStrategy as a, popupRegistries as p, registerPopup as r };
|
package/shared/definition7.cjs
CHANGED
|
@@ -13,8 +13,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
13
13
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
14
14
|
if (decorator = decorators[i])
|
|
15
15
|
result = (decorator(target, key, result) ) || result;
|
|
16
|
-
if (result)
|
|
17
|
-
__defProp(target, key, result);
|
|
16
|
+
if (result) __defProp(target, key, result);
|
|
18
17
|
return result;
|
|
19
18
|
};
|
|
20
19
|
class Badge extends index.FoundationElement {
|
package/shared/definition7.js
CHANGED
|
@@ -11,8 +11,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
11
11
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
12
|
if (decorator = decorators[i])
|
|
13
13
|
result = (decorator(target, key, result) ) || result;
|
|
14
|
-
if (result)
|
|
15
|
-
__defProp(target, key, result);
|
|
14
|
+
if (result) __defProp(target, key, result);
|
|
16
15
|
return result;
|
|
17
16
|
};
|
|
18
17
|
class Badge extends FoundationElement {
|
package/shared/definition8.cjs
CHANGED
|
@@ -20,8 +20,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
20
20
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
21
21
|
if (decorator = decorators[i])
|
|
22
22
|
result = (decorator(target, key, result) ) || result;
|
|
23
|
-
if (result)
|
|
24
|
-
__defProp(target, key, result);
|
|
23
|
+
if (result) __defProp(target, key, result);
|
|
25
24
|
return result;
|
|
26
25
|
};
|
|
27
26
|
const connotationIconMap = /* @__PURE__ */ new Map([
|
package/shared/definition8.js
CHANGED
|
@@ -18,8 +18,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
18
18
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
19
19
|
if (decorator = decorators[i])
|
|
20
20
|
result = (decorator(target, key, result) ) || result;
|
|
21
|
-
if (result)
|
|
22
|
-
__defProp(target, key, result);
|
|
21
|
+
if (result) __defProp(target, key, result);
|
|
23
22
|
return result;
|
|
24
23
|
};
|
|
25
24
|
const connotationIconMap = /* @__PURE__ */ new Map([
|
package/shared/definition9.cjs
CHANGED
|
@@ -16,8 +16,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
16
16
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
17
|
if (decorator = decorators[i])
|
|
18
18
|
result = (decorator(target, key, result) ) || result;
|
|
19
|
-
if (result)
|
|
20
|
-
__defProp(target, key, result);
|
|
19
|
+
if (result) __defProp(target, key, result);
|
|
21
20
|
return result;
|
|
22
21
|
};
|
|
23
22
|
class BreadcrumbItem extends breadcrumbItem.BreadcrumbItem {
|
package/shared/definition9.js
CHANGED
|
@@ -14,8 +14,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
14
14
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
15
15
|
if (decorator = decorators[i])
|
|
16
16
|
result = (decorator(target, key, result) ) || result;
|
|
17
|
-
if (result)
|
|
18
|
-
__defProp(target, key, result);
|
|
17
|
+
if (result) __defProp(target, key, result);
|
|
19
18
|
return result;
|
|
20
19
|
};
|
|
21
20
|
class BreadcrumbItem extends BreadcrumbItem$1 {
|
package/shared/enums.cjs
CHANGED
|
@@ -34,6 +34,11 @@ var Appearance = /* @__PURE__ */ ((Appearance2) => {
|
|
|
34
34
|
Appearance2["Elevated"] = "elevated";
|
|
35
35
|
return Appearance2;
|
|
36
36
|
})(Appearance || {});
|
|
37
|
+
var IconDecoration = /* @__PURE__ */ ((IconDecoration2) => {
|
|
38
|
+
IconDecoration2["Filled"] = "filled";
|
|
39
|
+
IconDecoration2["Outlined"] = "outlined";
|
|
40
|
+
return IconDecoration2;
|
|
41
|
+
})(IconDecoration || {});
|
|
37
42
|
var Size = /* @__PURE__ */ ((Size2) => {
|
|
38
43
|
Size2["UltraCondensed"] = "ultra-condensed";
|
|
39
44
|
Size2["SuperCondensed"] = "super-condensed";
|
|
@@ -89,6 +94,7 @@ exports.Appearance = Appearance;
|
|
|
89
94
|
exports.AriaLive = AriaLive;
|
|
90
95
|
exports.Connotation = Connotation;
|
|
91
96
|
exports.ConnotationDecorative = ConnotationDecorative;
|
|
97
|
+
exports.IconDecoration = IconDecoration;
|
|
92
98
|
exports.LayoutSize = LayoutSize;
|
|
93
99
|
exports.MediaSkipBy = MediaSkipBy;
|
|
94
100
|
exports.Position = Position;
|
package/shared/enums.js
CHANGED
|
@@ -32,6 +32,11 @@ var Appearance = /* @__PURE__ */ ((Appearance2) => {
|
|
|
32
32
|
Appearance2["Elevated"] = "elevated";
|
|
33
33
|
return Appearance2;
|
|
34
34
|
})(Appearance || {});
|
|
35
|
+
var IconDecoration = /* @__PURE__ */ ((IconDecoration2) => {
|
|
36
|
+
IconDecoration2["Filled"] = "filled";
|
|
37
|
+
IconDecoration2["Outlined"] = "outlined";
|
|
38
|
+
return IconDecoration2;
|
|
39
|
+
})(IconDecoration || {});
|
|
35
40
|
var Size = /* @__PURE__ */ ((Size2) => {
|
|
36
41
|
Size2["UltraCondensed"] = "ultra-condensed";
|
|
37
42
|
Size2["SuperCondensed"] = "super-condensed";
|
|
@@ -83,4 +88,4 @@ var MediaSkipBy = /* @__PURE__ */ ((MediaSkipBy2) => {
|
|
|
83
88
|
return MediaSkipBy2;
|
|
84
89
|
})(MediaSkipBy || {});
|
|
85
90
|
|
|
86
|
-
export { Appearance as A, Connotation as C, LayoutSize as L, MediaSkipBy as M, Position as P, Role as R, Shape as S, TabsGutters as T, ConnotationDecorative as a, Size as b, AriaLive as c };
|
|
91
|
+
export { Appearance as A, Connotation as C, IconDecoration as I, LayoutSize as L, MediaSkipBy as M, Position as P, Role as R, Shape as S, TabsGutters as T, ConnotationDecorative as a, Size as b, AriaLive as c };
|
package/shared/icon.cjs
CHANGED
|
@@ -141,7 +141,7 @@ _has._curry2(function memoizeWith(mFn, fn) {
|
|
|
141
141
|
});
|
|
142
142
|
|
|
143
143
|
const ICONS_BASE_URL = "https://icon.resources.vonage.com";
|
|
144
|
-
const ICONS_VERSION = "4.
|
|
144
|
+
const ICONS_VERSION = "4.6.0";
|
|
145
145
|
|
|
146
146
|
const numberConverter = {
|
|
147
147
|
toView(value) {
|
|
@@ -181,8 +181,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
181
181
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
182
182
|
if (decorator = decorators[i])
|
|
183
183
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
184
|
-
if (kind && result)
|
|
185
|
-
__defProp(target, key, result);
|
|
184
|
+
if (kind && result) __defProp(target, key, result);
|
|
186
185
|
return result;
|
|
187
186
|
};
|
|
188
187
|
const PLACEHOLDER_DELAY = 500;
|
package/shared/icon.js
CHANGED
|
@@ -139,7 +139,7 @@ _curry2(function memoizeWith(mFn, fn) {
|
|
|
139
139
|
});
|
|
140
140
|
|
|
141
141
|
const ICONS_BASE_URL = "https://icon.resources.vonage.com";
|
|
142
|
-
const ICONS_VERSION = "4.
|
|
142
|
+
const ICONS_VERSION = "4.6.0";
|
|
143
143
|
|
|
144
144
|
const numberConverter = {
|
|
145
145
|
toView(value) {
|
|
@@ -179,8 +179,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
179
179
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
180
180
|
if (decorator = decorators[i])
|
|
181
181
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
182
|
-
if (kind && result)
|
|
183
|
-
__defProp(target, key, result);
|
|
182
|
+
if (kind && result) __defProp(target, key, result);
|
|
184
183
|
return result;
|
|
185
184
|
};
|
|
186
185
|
const PLACEHOLDER_DELAY = 500;
|
package/shared/index2.cjs
CHANGED
|
@@ -15,8 +15,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
|
15
15
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
16
16
|
if (decorator = decorators[i])
|
|
17
17
|
result = (decorator(target, key, result) ) || result;
|
|
18
|
-
if (result)
|
|
19
|
-
__defProp$1(target, key, result);
|
|
18
|
+
if (result) __defProp$1(target, key, result);
|
|
20
19
|
return result;
|
|
21
20
|
};
|
|
22
21
|
class FormElementHelperText {
|
|
@@ -203,8 +202,7 @@ function errorText(constructor) {
|
|
|
203
202
|
super(...args);
|
|
204
203
|
this._validate = this.validate;
|
|
205
204
|
this.validate = () => {
|
|
206
|
-
if (!this.#blockValidateCalls)
|
|
207
|
-
this._validate();
|
|
205
|
+
if (!this.#blockValidateCalls) this._validate();
|
|
208
206
|
};
|
|
209
207
|
}
|
|
210
208
|
errorTextChanged(_, newErrorText) {
|
|
@@ -237,8 +235,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
237
235
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
238
236
|
if (decorator = decorators[i])
|
|
239
237
|
result = (decorator(target, key, result) ) || result;
|
|
240
|
-
if (result)
|
|
241
|
-
__defProp(target, key, result);
|
|
238
|
+
if (result) __defProp(target, key, result);
|
|
242
239
|
return result;
|
|
243
240
|
};
|
|
244
241
|
class CurrentLocale {
|
package/shared/index2.js
CHANGED
|
@@ -13,8 +13,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
|
13
13
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
14
14
|
if (decorator = decorators[i])
|
|
15
15
|
result = (decorator(target, key, result) ) || result;
|
|
16
|
-
if (result)
|
|
17
|
-
__defProp$1(target, key, result);
|
|
16
|
+
if (result) __defProp$1(target, key, result);
|
|
18
17
|
return result;
|
|
19
18
|
};
|
|
20
19
|
class FormElementHelperText {
|
|
@@ -201,8 +200,7 @@ function errorText(constructor) {
|
|
|
201
200
|
super(...args);
|
|
202
201
|
this._validate = this.validate;
|
|
203
202
|
this.validate = () => {
|
|
204
|
-
if (!this.#blockValidateCalls)
|
|
205
|
-
this._validate();
|
|
203
|
+
if (!this.#blockValidateCalls) this._validate();
|
|
206
204
|
};
|
|
207
205
|
}
|
|
208
206
|
errorTextChanged(_, newErrorText) {
|
|
@@ -235,8 +233,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
235
233
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
236
234
|
if (decorator = decorators[i])
|
|
237
235
|
result = (decorator(target, key, result) ) || result;
|
|
238
|
-
if (result)
|
|
239
|
-
__defProp(target, key, result);
|
|
236
|
+
if (result) __defProp(target, key, result);
|
|
240
237
|
return result;
|
|
241
238
|
};
|
|
242
239
|
class CurrentLocale {
|
package/shared/listbox.cjs
CHANGED
|
@@ -998,8 +998,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
998
998
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
999
999
|
if (decorator = decorators[i])
|
|
1000
1000
|
result = (decorator(target, key, result) ) || result;
|
|
1001
|
-
if (result)
|
|
1002
|
-
__defProp(target, key, result);
|
|
1001
|
+
if (result) __defProp(target, key, result);
|
|
1003
1002
|
return result;
|
|
1004
1003
|
};
|
|
1005
1004
|
class Listbox extends ListboxElement {
|
package/shared/listbox.js
CHANGED
|
@@ -996,8 +996,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
996
996
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
997
997
|
if (decorator = decorators[i])
|
|
998
998
|
result = (decorator(target, key, result) ) || result;
|
|
999
|
-
if (result)
|
|
1000
|
-
__defProp(target, key, result);
|
|
999
|
+
if (result) __defProp(target, key, result);
|
|
1001
1000
|
return result;
|
|
1002
1001
|
};
|
|
1003
1002
|
class Listbox extends ListboxElement {
|
|
@@ -14,10 +14,10 @@ export declare function anchored<T extends {
|
|
|
14
14
|
_slottedAnchor?: HTMLElement[] | undefined;
|
|
15
15
|
_slottedAnchorChanged(): void;
|
|
16
16
|
_anchorEl?: HTMLElement | undefined;
|
|
17
|
-
"__#
|
|
18
|
-
"__#
|
|
19
|
-
"__#
|
|
20
|
-
"__#
|
|
17
|
+
"__#6@#updateAnchorEl": () => void;
|
|
18
|
+
"__#6@#observer"?: MutationObserver | undefined;
|
|
19
|
+
"__#6@#observeMissingAnchor": (anchorId: string) => void;
|
|
20
|
+
"__#6@#cleanupObserverIfNeeded": () => void;
|
|
21
21
|
connectedCallback(): void;
|
|
22
22
|
disconnectedCallback(): void;
|
|
23
23
|
};
|
|
@@ -17,7 +17,7 @@ const trappedFocus = require('./trapped-focus.cjs');
|
|
|
17
17
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
18
18
|
const formAssociated = require('./form-associated.cjs');
|
|
19
19
|
|
|
20
|
-
const styles = ":host{display:inline-block}.base{display:inline-block;inline-size:100%}.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column;padding:12px;gap:12px}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;gap:8px}.segments{display:flex;gap:24px}.segment{display:flex;flex-direction:column;gap:12px}.segment .header{display:flex;align-items:center;padding-block:8px}.segment .title{display:flex;flex-grow:1;justify-content:center}.segment .title-action{border-radius:8px;block-size:24px;font:var(--vvd-typography-base-extended);padding-inline:
|
|
20
|
+
const styles = ":host{display:inline-block}.base{display:inline-block;inline-size:100%}.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column;padding:12px;gap:12px}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;gap:8px}.segments{display:flex;gap:24px}.segment{display:flex;flex-direction:column;gap:12px}.segment .header{display:flex;align-items:center;padding-block:8px}.segment .title{display:flex;flex-grow:1;justify-content:center}.segment .title-action{border-radius:8px;block-size:24px;font:var(--vvd-typography-base-extended);padding-inline:8px}.calendar{display:flex;flex-direction:column;margin-top:8px;gap:4px}.calendar .calendar-separator{margin-inline:10px}.calendar .calendar-weekdays{display:flex;justify-content:center}.calendar .calendar-weekday{display:inline-flex;align-items:center;justify-content:center;block-size:16px;font:var(--vvd-typography-base-condensed);inline-size:40px}.calendar .calendar-week{display:flex;justify-content:center}.calendar .calendar-day{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;aspect-ratio:1/1;block-size:28px;font:var(--vvd-typography-base);margin-inline:6px;--focus-inset: -2px}.calendar .calendar-day.start,.calendar .calendar-day.end{border:2px solid var(--vvd-color-cta-50);background-color:var(--vvd-color-cta-200)}.calendar .calendar-day:before,.calendar .calendar-day:after{position:absolute;z-index:-1;display:block;width:20px;height:28px}.calendar .calendar-day:before{right:50%}.calendar .calendar-day:after{left:50%}.calendar .calendar-day.range:before,.calendar .calendar-day.range:after{background-color:var(--vvd-color-cta-50)}.calendar .calendar-day.range:not(.start):before,.calendar .calendar-day.range:not(.end):after{content:\"\"}.calendar .calendar-day.outside-month,.calendar .calendar-day:disabled{color:var(--vvd-color-neutral-400)}.months-separator{margin-inline:-12px}.month-grid{display:flex;flex-direction:column;gap:34px}.month-grid .months-row{display:flex;justify-content:center;gap:29px}.month-grid .month{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;aspect-ratio:1/1;block-size:48px;font:var(--vvd-typography-base-extended);text-transform:uppercase}.month-grid .month:disabled{color:var(--vvd-color-neutral-400)}.button{position:relative;padding:0;border:none;background-color:var(--_appearance-color-fill);color:var(--_appearance-color-text);cursor:pointer}.button{--_connotation-color-primary: var(--vvd-date-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-date-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-date-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-date-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-date-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-date-picker-accent-pale, var(--vvd-color-neutral-300))}.button{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.button:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.button:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.button:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.button:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.button:where(.selected):where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.button:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px));color:var(--vvd-color-canvas-text)}.button.current{border:1px solid var(--vvd-color-neutral-200)}.button:disabled{cursor:not-allowed}";
|
|
21
21
|
|
|
22
22
|
function _typeof(obj) {
|
|
23
23
|
"@babel/helpers - typeof";
|
|
@@ -5669,8 +5669,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
5669
5669
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5670
5670
|
if (decorator = decorators[i])
|
|
5671
5671
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5672
|
-
if (kind && result)
|
|
5673
|
-
__defProp(target, key, result);
|
|
5672
|
+
if (kind && result) __defProp(target, key, result);
|
|
5674
5673
|
return result;
|
|
5675
5674
|
};
|
|
5676
5675
|
const ValidDateFilter = {
|
|
@@ -15,7 +15,7 @@ import { T as TrappedFocus } from './trapped-focus.js';
|
|
|
15
15
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
16
16
|
import { F as FormAssociated } from './form-associated.js';
|
|
17
17
|
|
|
18
|
-
const styles = ":host{display:inline-block}.base{display:inline-block;inline-size:100%}.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column;padding:12px;gap:12px}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;gap:8px}.segments{display:flex;gap:24px}.segment{display:flex;flex-direction:column;gap:12px}.segment .header{display:flex;align-items:center;padding-block:8px}.segment .title{display:flex;flex-grow:1;justify-content:center}.segment .title-action{border-radius:8px;block-size:24px;font:var(--vvd-typography-base-extended);padding-inline:
|
|
18
|
+
const styles = ":host{display:inline-block}.base{display:inline-block;inline-size:100%}.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column;padding:12px;gap:12px}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;gap:8px}.segments{display:flex;gap:24px}.segment{display:flex;flex-direction:column;gap:12px}.segment .header{display:flex;align-items:center;padding-block:8px}.segment .title{display:flex;flex-grow:1;justify-content:center}.segment .title-action{border-radius:8px;block-size:24px;font:var(--vvd-typography-base-extended);padding-inline:8px}.calendar{display:flex;flex-direction:column;margin-top:8px;gap:4px}.calendar .calendar-separator{margin-inline:10px}.calendar .calendar-weekdays{display:flex;justify-content:center}.calendar .calendar-weekday{display:inline-flex;align-items:center;justify-content:center;block-size:16px;font:var(--vvd-typography-base-condensed);inline-size:40px}.calendar .calendar-week{display:flex;justify-content:center}.calendar .calendar-day{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;aspect-ratio:1/1;block-size:28px;font:var(--vvd-typography-base);margin-inline:6px;--focus-inset: -2px}.calendar .calendar-day.start,.calendar .calendar-day.end{border:2px solid var(--vvd-color-cta-50);background-color:var(--vvd-color-cta-200)}.calendar .calendar-day:before,.calendar .calendar-day:after{position:absolute;z-index:-1;display:block;width:20px;height:28px}.calendar .calendar-day:before{right:50%}.calendar .calendar-day:after{left:50%}.calendar .calendar-day.range:before,.calendar .calendar-day.range:after{background-color:var(--vvd-color-cta-50)}.calendar .calendar-day.range:not(.start):before,.calendar .calendar-day.range:not(.end):after{content:\"\"}.calendar .calendar-day.outside-month,.calendar .calendar-day:disabled{color:var(--vvd-color-neutral-400)}.months-separator{margin-inline:-12px}.month-grid{display:flex;flex-direction:column;gap:34px}.month-grid .months-row{display:flex;justify-content:center;gap:29px}.month-grid .month{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;aspect-ratio:1/1;block-size:48px;font:var(--vvd-typography-base-extended);text-transform:uppercase}.month-grid .month:disabled{color:var(--vvd-color-neutral-400)}.button{position:relative;padding:0;border:none;background-color:var(--_appearance-color-fill);color:var(--_appearance-color-text);cursor:pointer}.button{--_connotation-color-primary: var(--vvd-date-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-date-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-date-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-date-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-date-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-date-picker-accent-pale, var(--vvd-color-neutral-300))}.button{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.button:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.button:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.button:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.button:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.button:where(.selected):where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.button:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px));color:var(--vvd-color-canvas-text)}.button.current{border:1px solid var(--vvd-color-neutral-200)}.button:disabled{cursor:not-allowed}";
|
|
19
19
|
|
|
20
20
|
function _typeof(obj) {
|
|
21
21
|
"@babel/helpers - typeof";
|
|
@@ -5667,8 +5667,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
5667
5667
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
5668
5668
|
if (decorator = decorators[i])
|
|
5669
5669
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5670
|
-
if (kind && result)
|
|
5671
|
-
__defProp(target, key, result);
|
|
5670
|
+
if (kind && result) __defProp(target, key, result);
|
|
5672
5671
|
return result;
|
|
5673
5672
|
};
|
|
5674
5673
|
const ValidDateFilter = {
|
package/shared/radio.cjs
CHANGED
|
@@ -129,8 +129,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
129
129
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
130
130
|
if (decorator = decorators[i])
|
|
131
131
|
result = (decorator(target, key, result) ) || result;
|
|
132
|
-
if (result)
|
|
133
|
-
__defProp(target, key, result);
|
|
132
|
+
if (result) __defProp(target, key, result);
|
|
134
133
|
return result;
|
|
135
134
|
};
|
|
136
135
|
class Radio extends Radio$1 {
|
package/shared/radio.js
CHANGED
|
@@ -127,8 +127,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
127
127
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
128
128
|
if (decorator = decorators[i])
|
|
129
129
|
result = (decorator(target, key, result) ) || result;
|
|
130
|
-
if (result)
|
|
131
|
-
__defProp(target, key, result);
|
|
130
|
+
if (result) __defProp(target, key, result);
|
|
132
131
|
return result;
|
|
133
132
|
};
|
|
134
133
|
class Radio extends Radio$1 {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const definition = require('./definition63.cjs');
|
|
3
4
|
const aria = require('./aria.cjs');
|
|
4
5
|
const index = require('./index.cjs');
|
|
5
6
|
const ref = require('./ref.cjs');
|
|
7
|
+
const when = require('./when.cjs');
|
|
6
8
|
const classNames = require('./class-names.cjs');
|
|
7
9
|
|
|
8
10
|
/**
|
|
@@ -23,6 +25,7 @@ const getClasses = ({ disabled, connotation }) => classNames.classNames(
|
|
|
23
25
|
["disabled", Boolean(disabled)],
|
|
24
26
|
[`connotation-${connotation}`, Boolean(connotation)]
|
|
25
27
|
);
|
|
28
|
+
const getThumbClasses = ({ _focusVisible }) => classNames.classNames("thumb-container", ["focus-visible", _focusVisible]);
|
|
26
29
|
const getMarkersTemplate = (isHorizontal, numMarkers) => {
|
|
27
30
|
const placeholder = isHorizontal ? ["right", "center", "", "100% repeat-x"] : ["bottom", "top", "100%", "repeat-y"];
|
|
28
31
|
return index.html` <div
|
|
@@ -33,9 +36,12 @@ const getMarkersTemplate = (isHorizontal, numMarkers) => {
|
|
|
33
36
|
"
|
|
34
37
|
></div>`;
|
|
35
38
|
};
|
|
36
|
-
const SliderTemplate = () => {
|
|
39
|
+
const SliderTemplate = (context) => {
|
|
40
|
+
const popupTag = context.tagFor(definition.Popup);
|
|
37
41
|
return index.html`<template
|
|
38
42
|
role="${(x) => x.ariaLabel ? "presentation" : null}"
|
|
43
|
+
@focusin="${(x) => x._onFocusIn()}"
|
|
44
|
+
@focusout="${(x) => x._onFocusOut()}"
|
|
39
45
|
>
|
|
40
46
|
<div
|
|
41
47
|
role="slider"
|
|
@@ -59,11 +65,28 @@ const SliderTemplate = () => {
|
|
|
59
65
|
</div>
|
|
60
66
|
<div
|
|
61
67
|
${ref.ref("thumb")}
|
|
62
|
-
class="
|
|
68
|
+
class="${(x) => getThumbClasses(x)}"
|
|
63
69
|
style="${(x) => x.position}"
|
|
64
70
|
></div>
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
${when.when(
|
|
72
|
+
(x) => x.pin,
|
|
73
|
+
index.html`<${popupTag}
|
|
74
|
+
class="popup"
|
|
75
|
+
arrow
|
|
76
|
+
alternate
|
|
77
|
+
:anchor="${(x) => x.thumb}"
|
|
78
|
+
:open=${(x) => x._isThumbPopupOpen}
|
|
79
|
+
:placementStrategy=${(x) => x.orientation === aria.Orientation.horizontal ? definition.PlacementStrategy.AutoPlacementHorizontal : definition.PlacementStrategy.AutoPlacementVertical}
|
|
80
|
+
animation-frame
|
|
81
|
+
exportparts="vvd-theme-alternate"
|
|
82
|
+
aria-hidden="true"
|
|
83
|
+
>
|
|
84
|
+
<div class="tooltip">${(x) => x.ariaValuetext || x.valueTextFormatter(x.value)}</div>
|
|
85
|
+
</${popupTag}>`
|
|
86
|
+
)}
|
|
87
|
+
</div>
|
|
88
|
+
</div></template
|
|
89
|
+
>`;
|
|
67
90
|
};
|
|
68
91
|
|
|
69
92
|
exports.SliderTemplate = SliderTemplate;
|