@vonage/vivid 5.8.0 → 5.10.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/affix.js +1 -1
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/data-grid.options.cjs +1 -0
- package/bundled/data-grid.options.js +29 -0
- package/bundled/definition10.js +4 -4
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition7.js +3 -3
- package/bundled/definition9.cjs +9 -9
- package/bundled/definition9.js +113 -1342
- package/bundled/floating-ui.dom.cjs +1 -0
- package/bundled/floating-ui.dom.js +1242 -0
- package/bundled/host-semantics.js +4 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +21 -16
- package/bundled/mixins.cjs +2 -2
- package/bundled/mixins.js +6 -6
- package/bundled/slottable-request.cjs +4 -0
- package/bundled/slottable-request.js +2907 -0
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +89 -69
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/card/index.cjs +10 -10
- package/card/index.js +42 -42
- package/combobox/definition.cjs +14 -15
- package/combobox/definition.js +15 -16
- package/combobox/index.cjs +4 -4
- package/combobox/index.js +82 -87
- package/country/definition.cjs +340 -0
- package/country/definition.js +334 -0
- package/country/index.cjs +12 -0
- package/country/index.js +317 -0
- package/custom-elements.json +4835 -613
- package/data-grid/definition.cjs +23 -49
- package/data-grid/definition.js +1 -27
- package/data-grid/index.cjs +27 -27
- package/data-grid/index.js +44 -64
- package/file-picker/definition.cjs +10 -8
- package/file-picker/definition.js +10 -8
- package/file-picker/index.cjs +5 -5
- package/file-picker/index.js +12 -12
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/index.cjs +38 -4
- package/index.js +7 -2
- package/lib/components.d.ts +6 -1
- package/lib/country/countries-data.d.ts +6 -0
- package/lib/country/country-code-to-flag-icon.d.ts +5 -0
- package/lib/country/country.d.ts +5 -0
- package/lib/country/country.template.d.ts +3 -0
- package/lib/country/definition.d.ts +3 -0
- package/lib/popover/definition.d.ts +4 -0
- package/lib/popover/locale.d.ts +3 -0
- package/lib/popover/popover.d.ts +781 -0
- package/lib/popover/popover.template.d.ts +3 -0
- package/lib/rich-text-editor/locale.d.ts +2 -0
- package/lib/rich-text-editor/popover.d.ts +1 -0
- package/lib/rich-text-editor/rte/config.d.ts +5 -1
- package/lib/rich-text-editor/rte/document.d.ts +2 -0
- package/lib/rich-text-editor/rte/exports.d.ts +5 -0
- package/lib/rich-text-editor/rte/feature.d.ts +7 -1
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/input-rules.d.ts +15 -0
- package/lib/rich-text-editor/rte/instance.d.ts +4 -2
- package/lib/rich-text-editor/rte/utils/feature-state.d.ts +8 -0
- package/lib/rich-text-editor/rte/utils/text-before-cursor.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/ui.d.ts +2 -0
- package/lib/rich-text-editor/rte/view.d.ts +30 -0
- package/lib/rich-text-view/definition.d.ts +5 -0
- package/lib/rich-text-view/rich-text-view.d.ts +19 -0
- package/lib/rich-text-view/rich-text-view.template.d.ts +3 -0
- package/lib/selectable-box/selectable-box.d.ts +1 -0
- package/lib/status/definition.d.ts +4 -0
- package/lib/status/status.d.ts +388 -0
- package/lib/status/status.template.d.ts +3 -0
- package/lib/table/definition.d.ts +8 -0
- package/lib/table/table-body.d.ts +3 -0
- package/lib/table/table-body.template.d.ts +3 -0
- package/lib/table/table-cell.d.ts +381 -0
- package/lib/table/table-cell.template.d.ts +3 -0
- package/lib/table/table-head.d.ts +3 -0
- package/lib/table/table-head.template.d.ts +3 -0
- package/lib/table/table-header-cell.d.ts +381 -0
- package/lib/table/table-header-cell.template.d.ts +3 -0
- package/lib/table/table-row.d.ts +381 -0
- package/lib/table/table-row.template.d.ts +3 -0
- package/lib/table/table.d.ts +3 -0
- package/lib/table/table.template.d.ts +3 -0
- package/lib/tag/tag.d.ts +1 -1
- package/lib/tag-name-map.d.ts +11 -1
- package/locales/de-DE.cjs +6 -1
- package/locales/de-DE.js +6 -1
- package/locales/en-GB.cjs +6 -1
- package/locales/en-GB.js +6 -1
- package/locales/en-US.cjs +6 -1
- package/locales/en-US.js +6 -1
- package/locales/ja-JP.cjs +6 -1
- package/locales/ja-JP.js +6 -1
- package/locales/zh-CN.cjs +6 -1
- package/locales/zh-CN.js +6 -1
- package/package.json +10 -9
- package/popover/definition.cjs +363 -0
- package/popover/definition.js +357 -0
- package/popover/index.cjs +27 -0
- package/popover/index.js +263 -0
- package/rich-text-editor/definition.cjs +12125 -14657
- package/rich-text-editor/definition.js +8876 -11412
- package/rich-text-editor/index.cjs +20 -22
- package/rich-text-editor/index.js +5046 -7096
- package/rich-text-view/definition.cjs +171 -0
- package/rich-text-view/definition.js +165 -0
- package/rich-text-view/index.cjs +1 -0
- package/rich-text-view/index.js +103 -0
- package/selectable-box/definition.cjs +16 -5
- package/selectable-box/definition.js +16 -5
- package/selectable-box/index.cjs +11 -9
- package/selectable-box/index.js +86 -78
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/utils/slottable-request.d.ts +7 -0
- package/status/definition.cjs +76 -0
- package/status/definition.js +70 -0
- package/status/index.cjs +11 -0
- package/status/index.js +55 -0
- package/styles/core/all.css +2 -2
- package/styles/core/theme.css +2 -2
- 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/table/definition.cjs +168 -0
- package/table/definition.js +152 -0
- package/table/index.cjs +37 -0
- package/table/index.js +107 -0
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +24 -24
- package/tag/index.js +89 -89
- package/unbundled/_commonjsHelpers.cjs +26 -0
- package/unbundled/_commonjsHelpers.js +26 -1
- package/unbundled/data-grid.options.cjs +34 -0
- package/unbundled/data-grid.options.js +28 -0
- package/unbundled/definition.cjs +1 -1
- package/unbundled/definition.js +1 -1
- package/unbundled/slottable-request.cjs +3702 -0
- package/unbundled/slottable-request.js +3684 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +11 -1
- package/video-player/definition.js +12 -2
- package/video-player/index.cjs +30 -30
- package/video-player/index.js +705 -702
- package/vivid.api.json +1957 -143
package/bundled/vivid-element.js
CHANGED
|
@@ -44,6 +44,25 @@ var tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
44
44
|
function ci(i) {
|
|
45
45
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
46
46
|
}
|
|
47
|
+
function di(i) {
|
|
48
|
+
if (i.__esModule) return i;
|
|
49
|
+
var t = i.default;
|
|
50
|
+
if (typeof t == "function") {
|
|
51
|
+
var e = function s() {
|
|
52
|
+
return this instanceof s ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
|
|
53
|
+
};
|
|
54
|
+
e.prototype = t.prototype;
|
|
55
|
+
} else e = {};
|
|
56
|
+
return Object.defineProperty(e, "__esModule", { value: !0 }), Object.keys(i).forEach(function(s) {
|
|
57
|
+
var n = Object.getOwnPropertyDescriptor(i, s);
|
|
58
|
+
Object.defineProperty(e, s, n.get ? n : {
|
|
59
|
+
enumerable: !0,
|
|
60
|
+
get: function() {
|
|
61
|
+
return i[s];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}), e;
|
|
65
|
+
}
|
|
47
66
|
(function() {
|
|
48
67
|
if (!(typeof globalThis < "u"))
|
|
49
68
|
if (typeof tt < "u")
|
|
@@ -93,7 +112,7 @@ v.error === void 0 && Object.assign(v, {
|
|
|
93
112
|
addMessages() {
|
|
94
113
|
}
|
|
95
114
|
});
|
|
96
|
-
const
|
|
115
|
+
const hi = Object.freeze([]);
|
|
97
116
|
function Pt() {
|
|
98
117
|
const i = /* @__PURE__ */ new Map();
|
|
99
118
|
return Object.freeze({
|
|
@@ -529,10 +548,10 @@ const J = Object.freeze({
|
|
|
529
548
|
}
|
|
530
549
|
});
|
|
531
550
|
});
|
|
532
|
-
function
|
|
551
|
+
function ui(i, t) {
|
|
533
552
|
g.defineProperty(i, t);
|
|
534
553
|
}
|
|
535
|
-
function
|
|
554
|
+
function fi(i, t, e) {
|
|
536
555
|
return Object.assign({}, e, {
|
|
537
556
|
get() {
|
|
538
557
|
return g.trackVolatile(), e.get.apply(this);
|
|
@@ -783,7 +802,7 @@ function U(i) {
|
|
|
783
802
|
}
|
|
784
803
|
const ct = `fast-${Math.random().toString(36).substring(2, 8)}`, H = `${ct}{`, R = `}${ct}`, ve = R.length;
|
|
785
804
|
let me = 0;
|
|
786
|
-
const
|
|
805
|
+
const j = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
787
806
|
/**
|
|
788
807
|
* Creates a placeholder string suitable for marking out a location *within*
|
|
789
808
|
* an attribute value or HTML content.
|
|
@@ -800,7 +819,7 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
800
819
|
* @remarks
|
|
801
820
|
* Used internally by attribute directives such as `ref`, `slotted`, and `children`.
|
|
802
821
|
*/
|
|
803
|
-
attribute: (i) => `${
|
|
822
|
+
attribute: (i) => `${j()}="${H}${i}${R}"`,
|
|
804
823
|
/**
|
|
805
824
|
* Creates a placeholder that manifests itself as a marker within the DOM structure.
|
|
806
825
|
* @param index - The directive index to create the placeholder for.
|
|
@@ -1460,7 +1479,7 @@ class Re {
|
|
|
1460
1479
|
}
|
|
1461
1480
|
addFactory(t, e, s, n, r) {
|
|
1462
1481
|
var o, c;
|
|
1463
|
-
this.nodeIds.has(s) || (this.nodeIds.add(s), this.addTargetDescriptor(e, s, n)), t.id = (o = t.id) !== null && o !== void 0 ? o :
|
|
1482
|
+
this.nodeIds.has(s) || (this.nodeIds.add(s), this.addTargetDescriptor(e, s, n)), t.id = (o = t.id) !== null && o !== void 0 ? o : j(), t.targetNodeId = s, t.targetTagName = r, t.policy = (c = t.policy) !== null && c !== void 0 ? c : this.policy, this.factories.push(t);
|
|
1464
1483
|
}
|
|
1465
1484
|
freeze() {
|
|
1466
1485
|
return this.proto = Object.create(null, this.descriptors), this;
|
|
@@ -1503,7 +1522,7 @@ function se(i, t, e, s, n, r = !1) {
|
|
|
1503
1522
|
u === null ? r && (b = new M(Gt(() => h, i.policy)), $.assignAspect(b, a.name)) : b = ht.aggregate(u, i.policy), b !== null && (e.removeAttributeNode(a), d--, l--, i.addFactory(b, t, s, n, e.tagName));
|
|
1504
1523
|
}
|
|
1505
1524
|
}
|
|
1506
|
-
function
|
|
1525
|
+
function _e(i, t, e, s, n) {
|
|
1507
1526
|
const r = K.parse(t.textContent, i.directives);
|
|
1508
1527
|
if (r === null)
|
|
1509
1528
|
return C.node = t.nextSibling, C.index = n + 1, C;
|
|
@@ -1517,18 +1536,18 @@ function Ie(i, t, e, s, n) {
|
|
|
1517
1536
|
function ne(i, t, e) {
|
|
1518
1537
|
let s = 0, n = t.firstChild;
|
|
1519
1538
|
for (; n; ) {
|
|
1520
|
-
const r =
|
|
1539
|
+
const r = Ie(i, e, n, s);
|
|
1521
1540
|
n = r.node, s = r.index;
|
|
1522
1541
|
}
|
|
1523
1542
|
}
|
|
1524
|
-
function
|
|
1543
|
+
function Ie(i, t, e, s) {
|
|
1525
1544
|
const n = ie(t, s);
|
|
1526
1545
|
switch (e.nodeType) {
|
|
1527
1546
|
case 1:
|
|
1528
1547
|
se(i, t, e, n, s), ne(i, e, n);
|
|
1529
1548
|
break;
|
|
1530
1549
|
case 3:
|
|
1531
|
-
return
|
|
1550
|
+
return _e(i, e, t, n, s);
|
|
1532
1551
|
case 8:
|
|
1533
1552
|
const r = K.parse(e.data, i.directives);
|
|
1534
1553
|
r !== null && i.addFactory(
|
|
@@ -1543,7 +1562,7 @@ function _e(i, t, e, s) {
|
|
|
1543
1562
|
}
|
|
1544
1563
|
return C.index = s + 1, C.node = e.nextSibling, C;
|
|
1545
1564
|
}
|
|
1546
|
-
function
|
|
1565
|
+
function je(i, t) {
|
|
1547
1566
|
return i && i.nodeType == 8 && K.parse(i.data, t) !== null;
|
|
1548
1567
|
}
|
|
1549
1568
|
const At = "TEMPLATE", ht = {
|
|
@@ -1581,7 +1600,7 @@ const At = "TEMPLATE", ht = {
|
|
|
1581
1600
|
// because something like a when, repeat, etc. could add nodes before the marker.
|
|
1582
1601
|
// To mitigate this, we insert a stable first node. However, if we insert a node,
|
|
1583
1602
|
// that will alter the result of the TreeWalker. So, we also need to offset the target index.
|
|
1584
|
-
(
|
|
1603
|
+
(je(n.firstChild, t) || // Or if there is only one node and a directive, it means the template's content
|
|
1585
1604
|
// is *only* the directive. In that case, HTMLView.dispose() misses any nodes inserted by
|
|
1586
1605
|
// the directive. Inserting a new node ensures proper disposal of nodes added by the directive.
|
|
1587
1606
|
n.childNodes.length === 1 && Object.keys(t).length > 0) && n.insertBefore(document.createComment(""), n.firstChild), ne(
|
|
@@ -1618,16 +1637,16 @@ const At = "TEMPLATE", ht = {
|
|
|
1618
1637
|
}, d = new M(Wt(c, n ?? t, s));
|
|
1619
1638
|
return $.assignAspect(d, e), d;
|
|
1620
1639
|
}
|
|
1621
|
-
},
|
|
1640
|
+
}, Le = (
|
|
1622
1641
|
/* eslint-disable-next-line no-control-regex, max-len */
|
|
1623
1642
|
/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/
|
|
1624
|
-
),
|
|
1625
|
-
class
|
|
1643
|
+
), Ve = /* @__PURE__ */ Object.create(null);
|
|
1644
|
+
class L {
|
|
1626
1645
|
/**
|
|
1627
1646
|
* Creates an instance of InlineTemplateDirective.
|
|
1628
1647
|
* @param template - The template to inline.
|
|
1629
1648
|
*/
|
|
1630
|
-
constructor(t, e =
|
|
1649
|
+
constructor(t, e = Ve) {
|
|
1631
1650
|
this.html = t, this.factories = e;
|
|
1632
1651
|
}
|
|
1633
1652
|
/**
|
|
@@ -1641,11 +1660,11 @@ class V {
|
|
|
1641
1660
|
return this.html;
|
|
1642
1661
|
}
|
|
1643
1662
|
}
|
|
1644
|
-
|
|
1645
|
-
$.define(
|
|
1663
|
+
L.empty = new L("");
|
|
1664
|
+
$.define(L);
|
|
1646
1665
|
function Fe(i, t, e, s = $.getForInstance(i)) {
|
|
1647
1666
|
if (s.aspected) {
|
|
1648
|
-
const n =
|
|
1667
|
+
const n = Le.exec(t);
|
|
1649
1668
|
n !== null && $.assignAspect(i, n[2]);
|
|
1650
1669
|
}
|
|
1651
1670
|
return i.createHTML(e);
|
|
@@ -1677,7 +1696,7 @@ class Y {
|
|
|
1677
1696
|
* Returns a directive that can inline the template.
|
|
1678
1697
|
*/
|
|
1679
1698
|
inline() {
|
|
1680
|
-
return new
|
|
1699
|
+
return new L(B(this.html) ? this.html : this.html.innerHTML, this.factories);
|
|
1681
1700
|
}
|
|
1682
1701
|
/**
|
|
1683
1702
|
* Sets the DOMPolicy for this template.
|
|
@@ -1728,7 +1747,7 @@ class Y {
|
|
|
1728
1747
|
let n = "";
|
|
1729
1748
|
const r = /* @__PURE__ */ Object.create(null), o = (c) => {
|
|
1730
1749
|
var d;
|
|
1731
|
-
const l = (d = c.id) !== null && d !== void 0 ? d : c.id =
|
|
1750
|
+
const l = (d = c.id) !== null && d !== void 0 ? d : c.id = j();
|
|
1732
1751
|
return r[l] = c, l;
|
|
1733
1752
|
};
|
|
1734
1753
|
for (let c = 0, d = t.length - 1; c < d; ++c) {
|
|
@@ -1756,7 +1775,7 @@ const re = (i, ...t) => {
|
|
|
1756
1775
|
/* Message.directCallToHTMLTagNotAllowed */
|
|
1757
1776
|
);
|
|
1758
1777
|
};
|
|
1759
|
-
re.partial = (i) => new
|
|
1778
|
+
re.partial = (i) => new L(i);
|
|
1760
1779
|
const Mt = "boolean", Ot = "reflect", ae = Object.freeze({
|
|
1761
1780
|
/**
|
|
1762
1781
|
* Locates all attribute configurations associated with a type.
|
|
@@ -1776,7 +1795,7 @@ function Et(i) {
|
|
|
1776
1795
|
const t = i * 1;
|
|
1777
1796
|
return isNaN(t) ? null : t;
|
|
1778
1797
|
}
|
|
1779
|
-
const
|
|
1798
|
+
const pi = {
|
|
1780
1799
|
toView(i) {
|
|
1781
1800
|
const t = Et(i);
|
|
1782
1801
|
return t && t.toString();
|
|
@@ -1891,7 +1910,7 @@ var Pe = function(i, t, e, s) {
|
|
|
1891
1910
|
l((s = s.apply(i, t || [])).next());
|
|
1892
1911
|
});
|
|
1893
1912
|
};
|
|
1894
|
-
const Rt = { mode: "open" },
|
|
1913
|
+
const Rt = { mode: "open" }, _t = {}, it = /* @__PURE__ */ new Set(), _ = v.getById(N.elementRegistry, () => Pt()), ze = {
|
|
1895
1914
|
deferAndHydrate: "defer-and-hydrate"
|
|
1896
1915
|
};
|
|
1897
1916
|
class p {
|
|
@@ -1906,7 +1925,7 @@ class p {
|
|
|
1906
1925
|
Reflect.defineProperty(t, "observedAttributes", {
|
|
1907
1926
|
value: o,
|
|
1908
1927
|
enumerable: !0
|
|
1909
|
-
}), this.attributes = r, this.propertyLookup = c, this.attributeLookup = d, this.shadowOptions = e.shadowOptions === void 0 ? Rt : e.shadowOptions === null ? void 0 : Object.assign(Object.assign({}, Rt), e.shadowOptions), this.elementOptions = e.elementOptions === void 0 ?
|
|
1928
|
+
}), this.attributes = r, this.propertyLookup = c, this.attributeLookup = d, this.shadowOptions = e.shadowOptions === void 0 ? Rt : e.shadowOptions === null ? void 0 : Object.assign(Object.assign({}, Rt), e.shadowOptions), this.elementOptions = e.elementOptions === void 0 ? _t : Object.assign(Object.assign({}, _t), e.elementOptions), this.styles = m.normalize(e.styles), _.register(this), g.defineProperty(p.isRegistered, this.name), p.isRegistered[this.name] = this.type;
|
|
1910
1929
|
}
|
|
1911
1930
|
/**
|
|
1912
1931
|
* Indicates if this element has been defined in at least one registry.
|
|
@@ -1932,7 +1951,7 @@ class p {
|
|
|
1932
1951
|
* that describes the element to define.
|
|
1933
1952
|
*/
|
|
1934
1953
|
static compose(t, e) {
|
|
1935
|
-
return it.has(t) ||
|
|
1954
|
+
return it.has(t) || _.getByType(t) ? new p(class extends t {
|
|
1936
1955
|
}, e) : new p(t, e);
|
|
1937
1956
|
}
|
|
1938
1957
|
/**
|
|
@@ -1954,7 +1973,7 @@ class p {
|
|
|
1954
1973
|
*/
|
|
1955
1974
|
static composeAsync(t, e) {
|
|
1956
1975
|
return new Promise((s) => {
|
|
1957
|
-
(it.has(t) ||
|
|
1976
|
+
(it.has(t) || _.getByType(t)) && s(new p(class extends t {
|
|
1958
1977
|
}, e));
|
|
1959
1978
|
const n = new p(t, e);
|
|
1960
1979
|
g.getNotifier(n).subscribe({
|
|
@@ -1967,8 +1986,8 @@ class p {
|
|
|
1967
1986
|
}
|
|
1968
1987
|
}
|
|
1969
1988
|
p.isRegistered = {};
|
|
1970
|
-
p.getByType =
|
|
1971
|
-
p.getForInstance =
|
|
1989
|
+
p.getByType = _.getByType;
|
|
1990
|
+
p.getForInstance = _.getForInstance;
|
|
1972
1991
|
p.registerAsync = (i) => Pe(void 0, void 0, void 0, function* () {
|
|
1973
1992
|
return new Promise((t) => {
|
|
1974
1993
|
p.isRegistered[i] && t(p.isRegistered[i]), g.getNotifier(p.isRegistered).subscribe({ handleChange: () => t(p.isRegistered[i]) }, i);
|
|
@@ -1993,7 +2012,7 @@ class Ue extends MutationObserver {
|
|
|
1993
2012
|
this.observedNodes.delete(t), this.observedNodes.size < 1 && this.disconnect();
|
|
1994
2013
|
}
|
|
1995
2014
|
}
|
|
1996
|
-
const
|
|
2015
|
+
const bi = Object.freeze({
|
|
1997
2016
|
/**
|
|
1998
2017
|
* Creates a ViewBehaviorOrchestrator.
|
|
1999
2018
|
* @param source - The source to to associate behaviors with.
|
|
@@ -2012,7 +2031,7 @@ const pi = Object.freeze({
|
|
|
2012
2031
|
addBehaviorFactory(r, o) {
|
|
2013
2032
|
var c, d, l, a;
|
|
2014
2033
|
const h = r;
|
|
2015
|
-
h.id = (c = h.id) !== null && c !== void 0 ? c :
|
|
2034
|
+
h.id = (c = h.id) !== null && c !== void 0 ? c : j(), h.targetNodeId = (d = h.targetNodeId) !== null && d !== void 0 ? d : j(), h.targetTagName = (l = o.tagName) !== null && l !== void 0 ? l : null, h.policy = (a = h.policy) !== null && a !== void 0 ? a : T.policy, this.addTarget(h.targetNodeId, o), this.addBehavior(h.createBehavior());
|
|
2016
2035
|
},
|
|
2017
2036
|
addTarget(r, o) {
|
|
2018
2037
|
e[r] = o;
|
|
@@ -2036,11 +2055,11 @@ const pi = Object.freeze({
|
|
|
2036
2055
|
composed: !0,
|
|
2037
2056
|
cancelable: !0
|
|
2038
2057
|
}, P = "isConnected", oe = /* @__PURE__ */ new WeakMap();
|
|
2039
|
-
function
|
|
2058
|
+
function I(i) {
|
|
2040
2059
|
var t, e;
|
|
2041
2060
|
return (e = (t = i.shadowRoot) !== null && t !== void 0 ? t : oe.get(i)) !== null && e !== void 0 ? e : null;
|
|
2042
2061
|
}
|
|
2043
|
-
let
|
|
2062
|
+
let It;
|
|
2044
2063
|
class S extends qt {
|
|
2045
2064
|
/**
|
|
2046
2065
|
* Creates a Controller to control the specified element.
|
|
@@ -2171,7 +2190,7 @@ class S extends qt {
|
|
|
2171
2190
|
return;
|
|
2172
2191
|
const s = this.source;
|
|
2173
2192
|
if (t instanceof HTMLElement)
|
|
2174
|
-
((e =
|
|
2193
|
+
((e = I(s)) !== null && e !== void 0 ? e : this.source).append(t);
|
|
2175
2194
|
else if (!t.isAttachedTo(s)) {
|
|
2176
2195
|
const n = t.behaviors;
|
|
2177
2196
|
if (t.addStylesTo(s), n !== null)
|
|
@@ -2189,7 +2208,7 @@ class S extends qt {
|
|
|
2189
2208
|
return;
|
|
2190
2209
|
const s = this.source;
|
|
2191
2210
|
if (t instanceof HTMLElement)
|
|
2192
|
-
((e =
|
|
2211
|
+
((e = I(s)) !== null && e !== void 0 ? e : s).removeChild(t);
|
|
2193
2212
|
else if (t.isAttachedTo(s)) {
|
|
2194
2213
|
const n = t.behaviors;
|
|
2195
2214
|
if (t.removeStylesFrom(s), n !== null)
|
|
@@ -2279,7 +2298,7 @@ class S extends qt {
|
|
|
2279
2298
|
*/
|
|
2280
2299
|
renderTemplate(t) {
|
|
2281
2300
|
var e;
|
|
2282
|
-
const s = this.source, n = (e =
|
|
2301
|
+
const s = this.source, n = (e = I(s)) !== null && e !== void 0 ? e : s;
|
|
2283
2302
|
if (this.view !== null)
|
|
2284
2303
|
this.view.dispose(), this.view = null;
|
|
2285
2304
|
else if (!this.needsInitialization || this.hasExistingShadowRoot) {
|
|
@@ -2316,7 +2335,7 @@ class S extends qt {
|
|
|
2316
2335
|
handleChange: () => {
|
|
2317
2336
|
S.forCustomElement(t, !0), t.$fastController.connect();
|
|
2318
2337
|
}
|
|
2319
|
-
}, "shadowOptions"), t.$fastController = new
|
|
2338
|
+
}, "shadowOptions"), t.$fastController = new It(t, n);
|
|
2320
2339
|
}
|
|
2321
2340
|
/**
|
|
2322
2341
|
* Sets the strategy that ElementController.forCustomElement uses to construct
|
|
@@ -2324,14 +2343,14 @@ class S extends qt {
|
|
|
2324
2343
|
* @param strategy - The strategy to use.
|
|
2325
2344
|
*/
|
|
2326
2345
|
static setStrategy(t) {
|
|
2327
|
-
|
|
2346
|
+
It = t;
|
|
2328
2347
|
}
|
|
2329
2348
|
}
|
|
2330
2349
|
x(S);
|
|
2331
2350
|
S.setStrategy(S);
|
|
2332
2351
|
function Q(i) {
|
|
2333
2352
|
var t;
|
|
2334
|
-
return "adoptedStyleSheets" in i ? i : (t =
|
|
2353
|
+
return "adoptedStyleSheets" in i ? i : (t = I(i)) !== null && t !== void 0 ? t : i.getRootNode();
|
|
2335
2354
|
}
|
|
2336
2355
|
class Z {
|
|
2337
2356
|
constructor(t) {
|
|
@@ -2353,7 +2372,7 @@ class Z {
|
|
|
2353
2372
|
Z.styleSheetCache = /* @__PURE__ */ new Map();
|
|
2354
2373
|
let We = 0;
|
|
2355
2374
|
const Qe = () => `fast-${++We}`;
|
|
2356
|
-
function
|
|
2375
|
+
function jt(i) {
|
|
2357
2376
|
return i === document ? document.body : i;
|
|
2358
2377
|
}
|
|
2359
2378
|
class Ge {
|
|
@@ -2361,7 +2380,7 @@ class Ge {
|
|
|
2361
2380
|
this.styles = t, this.styleClass = Qe();
|
|
2362
2381
|
}
|
|
2363
2382
|
addStylesTo(t) {
|
|
2364
|
-
t =
|
|
2383
|
+
t = jt(Q(t));
|
|
2365
2384
|
const e = this.styles, s = this.styleClass;
|
|
2366
2385
|
for (let n = 0; n < e.length; n++) {
|
|
2367
2386
|
const r = document.createElement("style");
|
|
@@ -2369,7 +2388,7 @@ class Ge {
|
|
|
2369
2388
|
}
|
|
2370
2389
|
}
|
|
2371
2390
|
removeStylesFrom(t) {
|
|
2372
|
-
t =
|
|
2391
|
+
t = jt(Q(t));
|
|
2373
2392
|
const e = t.querySelectorAll(`.${this.styleClass}`);
|
|
2374
2393
|
for (let s = 0, n = e.length; s < n; ++s)
|
|
2375
2394
|
t.removeChild(e[s]);
|
|
@@ -2395,7 +2414,7 @@ if (m.supportsAdoptedStyleSheets) {
|
|
|
2395
2414
|
m.setDefaultStrategy(Z);
|
|
2396
2415
|
} else
|
|
2397
2416
|
m.setDefaultStrategy(Ge);
|
|
2398
|
-
const
|
|
2417
|
+
const V = "defer-hydration", st = "needs-hydration";
|
|
2399
2418
|
class f extends S {
|
|
2400
2419
|
/**
|
|
2401
2420
|
* {@inheritdoc ElementController.shadowOptions}
|
|
@@ -2404,7 +2423,7 @@ class f extends S {
|
|
|
2404
2423
|
return super.shadowOptions;
|
|
2405
2424
|
}
|
|
2406
2425
|
set shadowOptions(t) {
|
|
2407
|
-
super.shadowOptions = t, (this.hasExistingShadowRoot || t !== void 0 && !this.template) && this.definition.templateOptions === ze.deferAndHydrate && (this.source.toggleAttribute(
|
|
2426
|
+
super.shadowOptions = t, (this.hasExistingShadowRoot || t !== void 0 && !this.template) && this.definition.templateOptions === ze.deferAndHydrate && (this.source.toggleAttribute(V, !0), this.source.toggleAttribute(st, !0));
|
|
2408
2427
|
}
|
|
2409
2428
|
/**
|
|
2410
2429
|
* Adds the current element instance to the hydrating instances map
|
|
@@ -2424,7 +2443,7 @@ class f extends S {
|
|
|
2424
2443
|
}
|
|
2425
2444
|
static hydrationObserverHandler(t) {
|
|
2426
2445
|
for (const e of t)
|
|
2427
|
-
e.target.hasAttribute(
|
|
2446
|
+
e.target.hasAttribute(V) || (f.hydrationObserver.unobserve(e.target), e.target.$fastController.connect());
|
|
2428
2447
|
}
|
|
2429
2448
|
/**
|
|
2430
2449
|
* Checks to see if hydration is complete and if so, invokes the hydrationComplete callback.
|
|
@@ -2446,9 +2465,9 @@ class f extends S {
|
|
|
2446
2465
|
*/
|
|
2447
2466
|
connect() {
|
|
2448
2467
|
var t, e, s, n, r;
|
|
2449
|
-
if (this.needsHydration = (t = this.needsHydration) !== null && t !== void 0 ? t : this.source.hasAttribute(st), this.needsHydration && ((s = (e = f.lifecycleCallbacks) === null || e === void 0 ? void 0 : e.elementWillHydrate) === null || s === void 0 || s.call(e, this.definition.name)), this.source.hasAttribute(
|
|
2468
|
+
if (this.needsHydration = (t = this.needsHydration) !== null && t !== void 0 ? t : this.source.hasAttribute(st), this.needsHydration && ((s = (e = f.lifecycleCallbacks) === null || e === void 0 ? void 0 : e.elementWillHydrate) === null || s === void 0 || s.call(e, this.definition.name)), this.source.hasAttribute(V)) {
|
|
2450
2469
|
this.addHydratingInstance(), f.hydrationObserver.observe(this.source, {
|
|
2451
|
-
attributeFilter: [
|
|
2470
|
+
attributeFilter: [V]
|
|
2452
2471
|
});
|
|
2453
2472
|
return;
|
|
2454
2473
|
}
|
|
@@ -2459,7 +2478,7 @@ class f extends S {
|
|
|
2459
2478
|
if (this.stage === 3) {
|
|
2460
2479
|
if (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.template)
|
|
2461
2480
|
if (U(this.template)) {
|
|
2462
|
-
const o = this.source, c = (n =
|
|
2481
|
+
const o = this.source, c = (n = I(o)) !== null && n !== void 0 ? n : o;
|
|
2463
2482
|
let d = c.firstChild, l = c.lastChild;
|
|
2464
2483
|
o.shadowRoot === null && (w.isElementBoundaryStartMarker(d) && (d.data = "", d = d.nextSibling), w.isElementBoundaryEndMarker(l) && (l.data = "", l = l.previousSibling)), this.view = this.template.hydrate(d, l, o), (r = this.view) === null || r === void 0 || r.bind(this.source);
|
|
2465
2484
|
} else
|
|
@@ -2564,14 +2583,14 @@ const Ze = Object.assign(de(HTMLElement), {
|
|
|
2564
2583
|
function ti(i, t) {
|
|
2565
2584
|
return i instanceof Function ? i(t) : i;
|
|
2566
2585
|
}
|
|
2567
|
-
const
|
|
2586
|
+
const Lt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), gi = (i) => (t = "vwc") => {
|
|
2568
2587
|
const e = (n) => `${t}-${n}`, s = (n) => {
|
|
2569
2588
|
const r = e(n.name);
|
|
2570
2589
|
let o = n.type;
|
|
2571
|
-
if (o.componentName = n.name,
|
|
2590
|
+
if (o.componentName = n.name, Lt.has(r))
|
|
2572
2591
|
return;
|
|
2573
2592
|
nt.has(o) && nt.get(o) !== r && (o = class extends o {
|
|
2574
|
-
}),
|
|
2593
|
+
}), Lt.add(r), nt.set(o, r);
|
|
2575
2594
|
for (const a of n.dependencies)
|
|
2576
2595
|
s(a);
|
|
2577
2596
|
const c = new Map([
|
|
@@ -2602,16 +2621,16 @@ const Vt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), bi = (i) =
|
|
|
2602
2621
|
}).define();
|
|
2603
2622
|
};
|
|
2604
2623
|
s(i);
|
|
2605
|
-
},
|
|
2624
|
+
}, yi = (i, t, e, s, n) => ({
|
|
2606
2625
|
name: i,
|
|
2607
2626
|
type: t,
|
|
2608
2627
|
template: e,
|
|
2609
2628
|
dependencies: s,
|
|
2610
2629
|
options: n
|
|
2611
|
-
}),
|
|
2612
|
-
let t =
|
|
2613
|
-
return t || (t = [],
|
|
2614
|
-
},
|
|
2630
|
+
}), Vt = /* @__PURE__ */ new WeakMap(), he = (i) => {
|
|
2631
|
+
let t = Vt.get(i);
|
|
2632
|
+
return t || (t = [], Vt.set(i, t)), t;
|
|
2633
|
+
}, vi = (i, t) => {
|
|
2615
2634
|
he(i).push(t);
|
|
2616
2635
|
}, ei = (i, t) => {
|
|
2617
2636
|
he(i).forEach((e) => e(i, t));
|
|
@@ -2705,7 +2724,7 @@ function oi() {
|
|
|
2705
2724
|
const i = /* @__PURE__ */ new WeakMap();
|
|
2706
2725
|
return (t) => (i.has(t) || i.set(t, []), i.get(t));
|
|
2707
2726
|
}
|
|
2708
|
-
const fe = oi(),
|
|
2727
|
+
const fe = oi(), mi = (i) => (t, e) => {
|
|
2709
2728
|
fe(t.constructor).push({
|
|
2710
2729
|
newPropertyName: e,
|
|
2711
2730
|
...i
|
|
@@ -2742,9 +2761,9 @@ const fe = oi(), vi = (i) => (t, e) => {
|
|
|
2742
2761
|
}
|
|
2743
2762
|
return t;
|
|
2744
2763
|
};
|
|
2745
|
-
class
|
|
2764
|
+
class wi extends ai(li(Ze)) {
|
|
2746
2765
|
static {
|
|
2747
|
-
this.VIVID_VERSION = "5.
|
|
2766
|
+
this.VIVID_VERSION = "5.10.0";
|
|
2748
2767
|
}
|
|
2749
2768
|
/**
|
|
2750
2769
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -2757,6 +2776,7 @@ class mi extends ai(li(Ze)) {
|
|
|
2757
2776
|
}
|
|
2758
2777
|
}
|
|
2759
2778
|
export {
|
|
2779
|
+
di as A,
|
|
2760
2780
|
lt as B,
|
|
2761
2781
|
T as D,
|
|
2762
2782
|
O as E,
|
|
@@ -2765,12 +2785,12 @@ export {
|
|
|
2765
2785
|
g as O,
|
|
2766
2786
|
we as S,
|
|
2767
2787
|
Ut as U,
|
|
2768
|
-
|
|
2788
|
+
wi as V,
|
|
2769
2789
|
He as a,
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2790
|
+
bi as b,
|
|
2791
|
+
gi as c,
|
|
2792
|
+
yi as d,
|
|
2793
|
+
hi as e,
|
|
2774
2794
|
E as f,
|
|
2775
2795
|
Wt as g,
|
|
2776
2796
|
re as h,
|
|
@@ -2779,15 +2799,15 @@ export {
|
|
|
2779
2799
|
Dt as k,
|
|
2780
2800
|
rt as l,
|
|
2781
2801
|
U as m,
|
|
2782
|
-
|
|
2783
|
-
|
|
2802
|
+
pi as n,
|
|
2803
|
+
ui as o,
|
|
2784
2804
|
A as p,
|
|
2785
2805
|
X as q,
|
|
2786
|
-
|
|
2787
|
-
|
|
2806
|
+
mi as r,
|
|
2807
|
+
vi as s,
|
|
2788
2808
|
w as t,
|
|
2789
2809
|
Gt as u,
|
|
2790
|
-
|
|
2810
|
+
fi as v,
|
|
2791
2811
|
m as w,
|
|
2792
2812
|
pe as x,
|
|
2793
2813
|
ci as y,
|
package/card/definition.cjs
CHANGED
|
@@ -11,7 +11,7 @@ const fastWebUtilities = require('@microsoft/fast-web-utilities');
|
|
|
11
11
|
const enums = require('../unbundled/enums.cjs');
|
|
12
12
|
const delegatesAria = require('../unbundled/delegates-aria.cjs');
|
|
13
13
|
|
|
14
|
-
const styles = ":host{display:flex}.base{border-radius:8px;inline-size:100%;text-align:start}.base{padding:0;border:0 none;outline:none;text-decoration:none}.base:is(button,a):not(:disabled){cursor:pointer}.base:is(button,a):disabled{cursor:not-allowed}.base:is(button,a):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))}.wrapper{display:flex;overflow:hidden;flex-flow:column;border-radius:inherit;block-size:100%;color:var(--vvd-color-canvas-text)}.wrapper{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.wrapper:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.wrapper.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.wrapper:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper{--_connotation-color-primary: var(--vvd-card-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-card-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-card-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-faint: var(--vvd-card-cta-faint, var(--vvd-color-cta-50));--_connotation-color-soft: var(--vvd-card-cta-soft, var(--vvd-color-cta-100))}@media (hover: hover){.base:is(button,a):hover>.wrapper{background-color:var(--_appearance-color-fill)}}.main-content{display:flex;flex-flow:column;padding:24px}.header{display:flex;flex:1;align-items:flex-start;gap:8px}.header-content{flex:1}.header-wrapper{display:flex;gap:8px}.header-headline,.header-subtitle{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}.header-headline{font:var(--vvd-typography-heading-4);-webkit-line-clamp:var(--headline-line-clamp)}.header-subtitle{font:var(--vvd-typography-base);-webkit-line-clamp:var(--subtitle-line-clamp)}.hide-header .header{display:none}.header-subtitle,.text{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base)}.text{padding-right:8px;margin-top:12px}.footer{display:inline-flex;flex-direction:column;align-items:flex-end;padding-bottom:24px;margin-top:auto;padding-inline:24px}.hide-footer .footer{display:none}::slotted([slot=graphic i]),.icon{flex-shrink:0;align-self:baseline;margin-block-start:4px}.icon{font-size:20px}::slotted([slot=meta i]){flex-shrink:0;align-self:flex-start;margin-block-start:-8px;margin-inline:auto -8px}";
|
|
14
|
+
const styles = ":host{display:flex;--_vvd-tinted-shadow-surface-0dp: drop-shadow( 1px 0px 0px var(--card-border-color) ) drop-shadow(0px 1px 0px var(--card-border-color)) drop-shadow(0px -1px 0px var(--card-border-color)) drop-shadow(-1px 0px 0px var(--card-border-color))}.base{border-radius:8px;inline-size:100%;text-align:start}.base{padding:0;border:0 none;outline:none;text-decoration:none}.base:is(button,a):not(:disabled){cursor:pointer}.base:is(button,a):disabled{cursor:not-allowed}.base:is(button,a):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))}.wrapper{display:flex;overflow:hidden;flex-flow:column;border-radius:inherit;block-size:100%;color:var(--vvd-color-canvas-text)}.wrapper{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.wrapper:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.wrapper.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.wrapper:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper{--_connotation-color-primary: var(--vvd-card-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-card-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-card-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-faint: var(--vvd-card-cta-faint, var(--vvd-color-cta-50));--_connotation-color-soft: var(--vvd-card-cta-soft, var(--vvd-color-cta-100))}@media (hover: hover){.base:is(button,a):hover>.wrapper{background-color:var(--_appearance-color-fill)}}.main-content{display:flex;flex-flow:column;padding:24px}.header{display:flex;flex:1;align-items:flex-start;gap:8px}.header-content{flex:1}.header-wrapper{display:flex;gap:8px}.header-headline,.header-subtitle{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}.header-headline{font:var(--vvd-typography-heading-4);-webkit-line-clamp:var(--headline-line-clamp)}.header-subtitle{font:var(--vvd-typography-base);-webkit-line-clamp:var(--subtitle-line-clamp)}.hide-header .header{display:none}.header-subtitle,.text{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base)}.text{padding-right:8px;margin-top:12px}.footer{display:inline-flex;flex-direction:column;align-items:flex-end;padding-bottom:24px;margin-top:auto;padding-inline:24px}.hide-footer .footer{display:none}::slotted([slot=graphic i]),.icon{flex-shrink:0;align-self:baseline;margin-block-start:4px}.icon{font-size:20px}::slotted([slot=meta i]){flex-shrink:0;align-self:flex-start;margin-block-start:-8px;margin-inline:auto -8px}";
|
|
15
15
|
|
|
16
16
|
var __defProp = Object.defineProperty;
|
|
17
17
|
var __decorateClass = (decorators, target, key, kind) => {
|
package/card/definition.js
CHANGED
|
@@ -7,7 +7,7 @@ import { classNames } from '@microsoft/fast-web-utilities';
|
|
|
7
7
|
import { A as Appearance } from '../unbundled/enums.js';
|
|
8
8
|
import { d as delegateAria } from '../unbundled/delegates-aria.js';
|
|
9
9
|
|
|
10
|
-
const styles = ":host{display:flex}.base{border-radius:8px;inline-size:100%;text-align:start}.base{padding:0;border:0 none;outline:none;text-decoration:none}.base:is(button,a):not(:disabled){cursor:pointer}.base:is(button,a):disabled{cursor:not-allowed}.base:is(button,a):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))}.wrapper{display:flex;overflow:hidden;flex-flow:column;border-radius:inherit;block-size:100%;color:var(--vvd-color-canvas-text)}.wrapper{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.wrapper:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.wrapper.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.wrapper:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper{--_connotation-color-primary: var(--vvd-card-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-card-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-card-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-faint: var(--vvd-card-cta-faint, var(--vvd-color-cta-50));--_connotation-color-soft: var(--vvd-card-cta-soft, var(--vvd-color-cta-100))}@media (hover: hover){.base:is(button,a):hover>.wrapper{background-color:var(--_appearance-color-fill)}}.main-content{display:flex;flex-flow:column;padding:24px}.header{display:flex;flex:1;align-items:flex-start;gap:8px}.header-content{flex:1}.header-wrapper{display:flex;gap:8px}.header-headline,.header-subtitle{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}.header-headline{font:var(--vvd-typography-heading-4);-webkit-line-clamp:var(--headline-line-clamp)}.header-subtitle{font:var(--vvd-typography-base);-webkit-line-clamp:var(--subtitle-line-clamp)}.hide-header .header{display:none}.header-subtitle,.text{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base)}.text{padding-right:8px;margin-top:12px}.footer{display:inline-flex;flex-direction:column;align-items:flex-end;padding-bottom:24px;margin-top:auto;padding-inline:24px}.hide-footer .footer{display:none}::slotted([slot=graphic i]),.icon{flex-shrink:0;align-self:baseline;margin-block-start:4px}.icon{font-size:20px}::slotted([slot=meta i]){flex-shrink:0;align-self:flex-start;margin-block-start:-8px;margin-inline:auto -8px}";
|
|
10
|
+
const styles = ":host{display:flex;--_vvd-tinted-shadow-surface-0dp: drop-shadow( 1px 0px 0px var(--card-border-color) ) drop-shadow(0px 1px 0px var(--card-border-color)) drop-shadow(0px -1px 0px var(--card-border-color)) drop-shadow(-1px 0px 0px var(--card-border-color))}.base{border-radius:8px;inline-size:100%;text-align:start}.base{padding:0;border:0 none;outline:none;text-decoration:none}.base:is(button,a):not(:disabled){cursor:pointer}.base:is(button,a):disabled{cursor:not-allowed}.base:is(button,a):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))}.wrapper{display:flex;overflow:hidden;flex-flow:column;border-radius:inherit;block-size:100%;color:var(--vvd-color-canvas-text)}.wrapper{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.wrapper:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.wrapper.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.wrapper:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper{--_connotation-color-primary: var(--vvd-card-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-card-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-card-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-faint: var(--vvd-card-cta-faint, var(--vvd-color-cta-50));--_connotation-color-soft: var(--vvd-card-cta-soft, var(--vvd-color-cta-100))}@media (hover: hover){.base:is(button,a):hover>.wrapper{background-color:var(--_appearance-color-fill)}}.main-content{display:flex;flex-flow:column;padding:24px}.header{display:flex;flex:1;align-items:flex-start;gap:8px}.header-content{flex:1}.header-wrapper{display:flex;gap:8px}.header-headline,.header-subtitle{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}.header-headline{font:var(--vvd-typography-heading-4);-webkit-line-clamp:var(--headline-line-clamp)}.header-subtitle{font:var(--vvd-typography-base);-webkit-line-clamp:var(--subtitle-line-clamp)}.hide-header .header{display:none}.header-subtitle,.text{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base)}.text{padding-right:8px;margin-top:12px}.footer{display:inline-flex;flex-direction:column;align-items:flex-end;padding-bottom:24px;margin-top:auto;padding-inline:24px}.hide-footer .footer{display:none}::slotted([slot=graphic i]),.icon{flex-shrink:0;align-self:baseline;margin-block-start:4px}.icon{font-size:20px}::slotted([slot=meta i]){flex-shrink:0;align-self:flex-start;margin-block-start:-8px;margin-inline:auto -8px}";
|
|
11
11
|
|
|
12
12
|
var __defProp = Object.defineProperty;
|
|
13
13
|
var __decorateClass = (decorators, target, key, kind) => {
|
package/card/index.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";const f=require("../bundled/definition2.cjs"),b=require("../bundled/definition4.cjs"),t=require("../bundled/vivid-element.cjs"),m=require("../bundled/linkable.cjs"),
|
|
1
|
+
"use strict";const f=require("../bundled/definition2.cjs"),b=require("../bundled/definition4.cjs"),t=require("../bundled/vivid-element.cjs"),m=require("../bundled/linkable.cjs"),d=require("../bundled/enums.cjs"),x=require("../bundled/delegates-aria.cjs"),l=require("../bundled/when.cjs"),v=require("../bundled/slotted.cjs"),g=require("../bundled/class-names.cjs"),w=":host{display:flex;--_vvd-tinted-shadow-surface-0dp: drop-shadow( 1px 0px 0px var(--card-border-color) ) drop-shadow(0px 1px 0px var(--card-border-color)) drop-shadow(0px -1px 0px var(--card-border-color)) drop-shadow(-1px 0px 0px var(--card-border-color))}.base{border-radius:8px;inline-size:100%;text-align:start}.base{padding:0;border:0 none;outline:none;text-decoration:none}.base:is(button,a):not(:disabled){cursor:pointer}.base:is(button,a):disabled{cursor:not-allowed}.base:is(button,a):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))}.wrapper{display:flex;overflow:hidden;flex-flow:column;border-radius:inherit;block-size:100%;color:var(--vvd-color-canvas-text)}.wrapper{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.wrapper:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.wrapper.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.wrapper:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.wrapper{--_connotation-color-primary: var(--vvd-card-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-card-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-card-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-faint: var(--vvd-card-cta-faint, var(--vvd-color-cta-50));--_connotation-color-soft: var(--vvd-card-cta-soft, var(--vvd-color-cta-100))}@media (hover: hover){.base:is(button,a):hover>.wrapper{background-color:var(--_appearance-color-fill)}}.main-content{display:flex;flex-flow:column;padding:24px}.header{display:flex;flex:1;align-items:flex-start;gap:8px}.header-content{flex:1}.header-wrapper{display:flex;gap:8px}.header-headline,.header-subtitle{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}.header-headline{font:var(--vvd-typography-heading-4);-webkit-line-clamp:var(--headline-line-clamp)}.header-subtitle{font:var(--vvd-typography-base);-webkit-line-clamp:var(--subtitle-line-clamp)}.hide-header .header{display:none}.header-subtitle,.text{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base)}.text{padding-right:8px;margin-top:12px}.footer{display:inline-flex;flex-direction:column;align-items:flex-end;padding-bottom:24px;margin-top:auto;padding-inline:24px}.hide-footer .footer{display:none}::slotted([slot=graphic i]),.icon{flex-shrink:0;align-self:baseline;margin-block-start:4px}.icon{font-size:20px}::slotted([slot=meta i]){flex-shrink:0;align-self:flex-start;margin-block-start:-8px;margin-inline:auto -8px}";var y=Object.defineProperty,n=(e,a,r,h)=>{for(var i=void 0,c=e.length-1,u;c>=0;c--)(u=e[c])&&(i=u(a,r,i)||i);return i&&y(a,r,i),i};class o extends m.Linkable(t.VividElement){constructor(){super(...arguments),this.clickableCard=!1}}n([t.attr],o.prototype,"appearance");n([t.attr],o.prototype,"headline");n([t.attr],o.prototype,"subtitle");n([t.attr],o.prototype,"text");n([t.attr],o.prototype,"icon");n([t.attr],o.prototype,"elevation");n([t.attr({mode:"boolean",attribute:"clickable-card"})],o.prototype,"clickableCard");n([t.observable],o.prototype,"footerSlottedContent");n([t.observable],o.prototype,"graphicSlottedContent");n([t.observable],o.prototype,"hasMetaSlottedContent");const p=e=>g.classNames("base",["hide-footer",!e.footerSlottedContent||!e.footerSlottedContent.length],["hide-header",q(e)]);function $(e){return t.html`
|
|
2
2
|
<${e} class="icon" inline name="${a=>a.icon}"></${e}>`}function _(){return t.html`
|
|
3
3
|
<div class="header-headline" id="card-headline">${e=>e.headline}</div>
|
|
4
4
|
`}function C(){return t.html` <div class="header-subtitle">${e=>e.subtitle}</div> `}function k(){return t.html`
|
|
5
5
|
<div class="header-content">
|
|
6
|
-
${
|
|
7
|
-
${
|
|
6
|
+
${l.when(e=>e.headline,_())}
|
|
7
|
+
${l.when(e=>e.subtitle,C())}
|
|
8
8
|
</div>
|
|
9
9
|
`}function S(e){return t.html` <div class="header">
|
|
10
10
|
<slot name="graphic" ${v.slotted("graphicSlottedContent")}
|
|
11
|
-
>${
|
|
11
|
+
>${l.when(a=>a.icon,$(e))}</slot
|
|
12
12
|
>
|
|
13
|
-
${
|
|
13
|
+
${l.when(a=>a.headline||a.subtitle,k())}
|
|
14
14
|
</div>`}function q(e){return!e.headline&&!e.subtitle&&!e.icon&&(!e.graphicSlottedContent||!e.graphicSlottedContent.length)}function A(){return t.html` <slot name="meta" ${v.slotted("metaSlottedContent")}></slot> `}function E(){return t.html` <div class="text">${e=>e.text}</div> `}function H(e){return t.html`<button
|
|
15
15
|
class="${p}"
|
|
16
16
|
type="button"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<div class="header-wrapper">
|
|
34
34
|
${S(a)} ${A()}
|
|
35
35
|
</div>
|
|
36
|
-
${
|
|
36
|
+
${l.when(h=>h.text,E())}
|
|
37
37
|
</div>
|
|
38
38
|
</slot>
|
|
39
39
|
<div class="footer">
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
</div>
|
|
42
42
|
</div> `)}
|
|
43
43
|
`}const D=e=>{const a=e.tagFor(b.Elevation);return t.html`
|
|
44
|
-
${
|
|
44
|
+
${l.when(r=>r.appearance!==d.Appearance.Ghost&&r.appearance!==d.Appearance.Outlined,t.html`
|
|
45
45
|
<${a} dp=${r=>r.elevation??"4"}>
|
|
46
46
|
${s(e)}
|
|
47
47
|
</${a}>
|
|
48
48
|
`)}
|
|
49
|
-
${
|
|
49
|
+
${l.when(r=>r.appearance===d.Appearance.Outlined,t.html`
|
|
50
50
|
<${a} dp='0')}>
|
|
51
51
|
${s(e)}
|
|
52
52
|
</${a}>
|
|
53
53
|
`)}
|
|
54
|
-
${
|
|
55
|
-
`},F=t.defineVividComponent("card",o,D,[f.iconDefinition,b.elevationDefinition],{styles:
|
|
54
|
+
${l.when(r=>r.appearance===d.Appearance.Ghost,t.html` ${s(e)} `)}
|
|
55
|
+
`},F=t.defineVividComponent("card",o,D,[f.iconDefinition,b.elevationDefinition],{styles:w}),O=t.createRegisterFunction(F);O();
|