@vonage/vivid 3.0.0-next.2 → 3.0.0-next.5

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.
Files changed (88) hide show
  1. package/accordion/index.js +61 -0
  2. package/accordion-item/index.js +125 -0
  3. package/badge/index.js +19 -10
  4. package/banner/index.js +212 -0
  5. package/breadcrumb/index.js +100 -0
  6. package/breadcrumb-item/index.js +15 -8
  7. package/button/index.js +24 -15
  8. package/calendar/index.js +1521 -0
  9. package/elevation/index.js +5 -12
  10. package/focus/index.js +2 -2
  11. package/icon/index.js +33 -4
  12. package/index.d.ts +1 -0
  13. package/index.js +21 -5
  14. package/layout/index.js +1 -1
  15. package/lib/accordion/accordion.d.ts +9 -0
  16. package/lib/accordion/accordion.template.d.ts +4 -0
  17. package/lib/accordion/index.d.ts +2 -0
  18. package/lib/accordion-item/accordion-item.d.ts +13 -0
  19. package/lib/accordion-item/accordion-item.template.d.ts +4 -0
  20. package/lib/accordion-item/index.d.ts +3 -0
  21. package/lib/badge/badge.d.ts +3 -3
  22. package/lib/banner/banner.d.ts +20 -0
  23. package/lib/banner/banner.template.d.ts +6 -0
  24. package/lib/banner/index.d.ts +2 -0
  25. package/lib/breadcrumb/breadcrumb.d.ts +3 -0
  26. package/lib/breadcrumb/index.d.ts +2 -0
  27. package/lib/breadcrumb-item/breadcrumb-item.d.ts +3 -3
  28. package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +0 -1
  29. package/lib/breadcrumb-item/index.d.ts +1 -0
  30. package/lib/button/button.d.ts +3 -3
  31. package/lib/calendar/calendar.d.ts +11 -0
  32. package/lib/calendar/calendar.template.d.ts +4 -0
  33. package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
  34. package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
  35. package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
  36. package/lib/calendar/index.d.ts +3 -0
  37. package/lib/components.d.ts +9 -0
  38. package/lib/elevation/elevation.d.ts +1 -1
  39. package/lib/enums.d.ts +3 -2
  40. package/lib/icon/icon.d.ts +1 -3
  41. package/lib/popup/index.d.ts +4 -0
  42. package/lib/popup/popup.d.ts +29 -0
  43. package/lib/popup/popup.template.d.ts +4 -0
  44. package/lib/progress/index.d.ts +2 -0
  45. package/lib/progress/progress.d.ts +9 -0
  46. package/lib/progress/progress.template.d.ts +5 -0
  47. package/lib/progress-ring/index.d.ts +2 -0
  48. package/lib/progress-ring/progress-ring.d.ts +6 -0
  49. package/lib/progress-ring/progress-ring.template.d.ts +4 -0
  50. package/lib/side-drawer/index.d.ts +2 -0
  51. package/lib/side-drawer/side-drawer.d.ts +12 -0
  52. package/lib/side-drawer/side-drawer.template.d.ts +4 -0
  53. package/lib/sidenav-item/sidenav-item.d.ts +4 -5
  54. package/lib/text/index.d.ts +2 -0
  55. package/lib/text/text.d.ts +10 -0
  56. package/lib/text/text.template.d.ts +4 -0
  57. package/lib/text-anchor/text-anchor.d.ts +3 -0
  58. package/lib/tooltip/index.d.ts +3 -0
  59. package/lib/tooltip/tooltip.d.ts +10 -0
  60. package/lib/tooltip/tooltip.template.d.ts +4 -0
  61. package/package.json +9 -5
  62. package/popup/index.js +2087 -0
  63. package/progress/index.js +98 -0
  64. package/progress-ring/index.js +76 -0
  65. package/shared/_has.js +58 -0
  66. package/shared/affix.js +10 -25
  67. package/shared/anchor.js +3 -3
  68. package/shared/aria-global.js +20 -20
  69. package/shared/base-progress.js +65 -0
  70. package/shared/breadcrumb-item.js +25 -0
  71. package/shared/es.object.assign.js +68 -0
  72. package/shared/icon.js +1393 -0
  73. package/shared/index.js +4918 -1427
  74. package/shared/index2.js +15 -4905
  75. package/shared/patterns/affix.d.ts +3 -4
  76. package/shared/slotted.js +119 -0
  77. package/shared/text-anchor.js +21 -0
  78. package/shared/text-anchor.template.js +14 -19
  79. package/shared/web.dom-collections.iterator.js +639 -639
  80. package/shared/when.js +15 -0
  81. package/side-drawer/index.js +103 -0
  82. package/sidenav-item/index.js +15 -56
  83. package/styles/themes/dark.css +4 -4
  84. package/styles/themes/light.css +4 -4
  85. package/text/index.js +45 -0
  86. package/text-anchor/index.js +6 -2
  87. package/tooltip/index.js +73 -0
  88. package/shared/index3.js +0 -21
@@ -0,0 +1,98 @@
1
+ import { _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
2
+ import { s as styleInject } from '../shared/style-inject.es.js';
3
+ import { h as classofRaw, _ as _export, f as functionUncurryThis } from '../shared/web.dom-collections.iterator.js';
4
+ import { B as BaseProgress } from '../shared/base-progress.js';
5
+ import { w as when } from '../shared/when.js';
6
+ import { c as classNames } from '../shared/class-names.js';
7
+
8
+ var css_248z = ".base {\n height: 6px;\n align-items: center;\n margin: 0;\n outline: none;\n}\n.base.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n}\n\n.base:not(.connotation-pacific):not(.connotation-cta):not(.connotation-alert):not(.connotation-success) {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n}\n\n.base.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n\n.base.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n\n.base.connotation-pacific {\n --connotation: linear-gradient(to right, var(--vvd-color-info-30), var(--vvd-color-cta-70));\n}\n\n.indeterminate {\n display: flex;\n overflow: hidden;\n width: 100%;\n height: 100%;\n border-radius: 3px;\n}\n\n.progress {\n position: relative;\n display: flex;\n align-items: center;\n background-color: var(--vvd-color-neutral-20);\n block-size: 100%;\n inline-size: 100%;\n}\n.progress .indeterminate {\n background-color: var(--connotation);\n}\n\n.determinate {\n background-color: var(--connotation);\n block-size: 100%;\n border-radius: 3px;\n transition: all 0.2s ease-in-out;\n}\n.connotation-pacific .determinate {\n background-image: var(--connotation);\n}\n\n.indeterminate-indicator-1, .indeterminate-indicator-2 {\n position: absolute;\n animation: indeterminate-1 2s infinite;\n animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);\n background-color: var(--vvd-color-neutral-20);\n block-size: 100%;\n inline-size: 30%;\n opacity: 0;\n}\n\n.indeterminate-indicator-2 {\n animation: indeterminate-2 2s infinite;\n inline-size: 60%;\n}\n\n.connotation-pacific .indeterminate-indicator-1, .connotation-pacific .indeterminate-indicator-2 {\n background-image: var(--connotation);\n}\n\n.reverse .indeterminate-indicator-1, .reverse .indeterminate-indicator-2 {\n animation-direction: reverse;\n}\n.reverse .determinate {\n position: absolute;\n right: 0;\n}\n\n.base.shape-sharp .determinate, .base.shape-sharp .indeterminate {\n border-radius: 0;\n}\n\n.base.paused .indeterminate-indicator-1,\n.base.paused .indeterminate-indicator-2 {\n animation-play-state: paused;\n background-color: var(--connotation);\n}\n\n.base.paused .determinate {\n background-color: var(--vvd-color-neutral-40);\n}\n\n@keyframes indeterminate-1 {\n 0% {\n opacity: 1;\n transform: translateX(-100%);\n }\n 70% {\n opacity: 1;\n transform: translateX(300%);\n }\n 70.01% {\n opacity: 0;\n }\n 100% {\n opacity: 0;\n transform: translateX(300%);\n }\n}\n@keyframes indeterminate-2 {\n 0% {\n opacity: 0;\n transform: translateX(-150%);\n }\n 29.99% {\n opacity: 0;\n }\n 30% {\n opacity: 1;\n transform: translateX(-150%);\n }\n 100% {\n opacity: 1;\n transform: translateX(166.66%);\n }\n}";
9
+ styleInject(css_248z);
10
+
11
+ var classof = classofRaw;
12
+
13
+ // `IsArray` abstract operation
14
+ // https://tc39.es/ecma262/#sec-isarray
15
+ // eslint-disable-next-line es/no-array-isarray -- safe
16
+ var isArray$1 = Array.isArray || function isArray(argument) {
17
+ return classof(argument) == 'Array';
18
+ };
19
+
20
+ var $ = _export;
21
+ var uncurryThis = functionUncurryThis;
22
+ var isArray = isArray$1;
23
+
24
+ var un$Reverse = uncurryThis([].reverse);
25
+ var test = [1, 2];
26
+
27
+ // `Array.prototype.reverse` method
28
+ // https://tc39.es/ecma262/#sec-array.prototype.reverse
29
+ // fix for Safari 12.0 bug
30
+ // https://bugs.webkit.org/show_bug.cgi?id=188794
31
+ $({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
32
+ reverse: function reverse() {
33
+ // eslint-disable-next-line no-self-assign -- dirty hack
34
+ if (isArray(this)) this.length = this.length;
35
+ return un$Reverse(this);
36
+ }
37
+ });
38
+
39
+ class Progress extends BaseProgress {
40
+ constructor() {
41
+ super(...arguments);
42
+ this.reverse = false;
43
+ }
44
+
45
+ }
46
+
47
+ __decorate([attr(), __metadata("design:type", String)], Progress.prototype, "shape", void 0);
48
+
49
+ __decorate([attr(), __metadata("design:type", String)], Progress.prototype, "connotation", void 0);
50
+
51
+ __decorate([attr({
52
+ mode: 'boolean'
53
+ }), __metadata("design:type", Object)], Progress.prototype, "reverse", void 0);
54
+
55
+ let _2 = t => t,
56
+ _t,
57
+ _t2,
58
+ _t3;
59
+
60
+ const getClasses = _ => classNames('base', [`connotation-${_.connotation}`, !!_.connotation], [`shape-${_.shape}`, !!_.shape], ['reverse', _.reverse]);
61
+
62
+ const ProgressTemplate = _ => {
63
+ return html(_t || (_t = _2`
64
+ <div
65
+ role="progressbar"
66
+ aria-valuenow="${0}"
67
+ aria-valuemin="${0}"
68
+ aria-valuemax="${0}"
69
+ class="${0} ${0}"
70
+ >
71
+ ${0}
72
+ ${0}
73
+ </div>
74
+ `), x => x.value, x => x.min, x => x.max, x => x.paused ? 'paused' : '', getClasses, when(x => typeof x.value === 'number', html(_t2 || (_t2 = _2`
75
+ <div class="progress">
76
+ <div
77
+ class="determinate"
78
+ style="width: ${0}%"
79
+ ></div>
80
+ </div>
81
+ `), x => x.percentComplete)), when(x => typeof x.value !== 'number', html(_t3 || (_t3 = _2`
82
+ <div class="progress indeterminate">
83
+ <span class="indeterminate" name="indeterminate">
84
+ <span class="indeterminate-indicator-1"></span>
85
+ <span class="indeterminate-indicator-2"></span>
86
+ </span>
87
+ </div>
88
+ `))));
89
+ };
90
+
91
+ const vividProgress = Progress.compose({
92
+ baseName: 'progress',
93
+ template: ProgressTemplate,
94
+ styles: css_248z
95
+ });
96
+ designSystem.register(vividProgress());
97
+
98
+ export { vividProgress };
@@ -0,0 +1,76 @@
1
+ import { _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
2
+ import { s as styleInject } from '../shared/style-inject.es.js';
3
+ import { B as BaseProgress } from '../shared/base-progress.js';
4
+ import { w as when } from '../shared/when.js';
5
+ import { c as classNames } from '../shared/class-names.js';
6
+
7
+ var css_248z = ".base {\n width: 36px;\n height: 36px;\n align-items: center;\n outline: none;\n}\n.base.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n}\n\n.base:not(.connotation-cta):not(.connotation-alert):not(.connotation-success) {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n}\n\n.base.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n\n.base.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n\n.base.base-large {\n width: 48px;\n height: 48px;\n}\n\n.base.base-small {\n width: 24px;\n height: 24px;\n}\n\n.progress {\n width: 100%;\n height: 100%;\n}\n\n.background {\n fill: none;\n stroke: transparent;\n stroke-width: 2px;\n}\n\n.determinate {\n fill: none;\n stroke: var(--connotation);\n stroke-linecap: round;\n stroke-width: 2px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.indeterminate-indicator-1 {\n animation: spin-infinite 2s linear infinite;\n fill: none;\n stroke: var(--connotation);\n stroke-linecap: round;\n stroke-width: 2px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.base.paused .indeterminate-indicator-1 {\n animation-play-state: paused;\n stroke: var(--vvd-color-neutral);\n}\n\n.base.paused .determinate {\n stroke: var(--vvd-color-neutral);\n}\n\n@keyframes spin-infinite {\n 0% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(0deg);\n }\n 50% {\n stroke-dasharray: 21.99px 21.99px;\n transform: rotate(450deg);\n }\n 100% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(1080deg);\n }\n}";
8
+ styleInject(css_248z);
9
+
10
+ class ProgressRing extends BaseProgress {}
11
+
12
+ __decorate([attr(), __metadata("design:type", String)], ProgressRing.prototype, "connotation", void 0);
13
+
14
+ let _2 = t => t,
15
+ _t,
16
+ _t2,
17
+ _t3;
18
+
19
+ const getClasses = _ => classNames('base', [`connotation-${_.connotation}`, !!_.connotation]);
20
+
21
+ const progressSegments = 44;
22
+ const ProgressRingTemplate = _ => html(_t || (_t = _2`
23
+ <div
24
+ role="progressbar"
25
+ aria-valuenow="${0}"
26
+ aria-valuemin="${0}"
27
+ aria-valuemax="${0}"
28
+ class="${0} ${0}"
29
+ >
30
+ ${0}
31
+ ${0}
32
+ </div>
33
+ `), x => x.value, x => x.min, x => x.max, x => x.paused ? 'paused' : '', getClasses, when(x => typeof x.value === 'number', html(_t2 || (_t2 = _2`
34
+ <svg
35
+ class="progress"
36
+ viewBox="0 0 16 16"
37
+ >
38
+ <circle
39
+ class="background"
40
+ cx="8px"
41
+ cy="8px"
42
+ r="7px"
43
+ ></circle>
44
+ <circle
45
+ class="determinate"
46
+ style="stroke-dasharray: ${0}px ${0}px"
47
+ cx="8px"
48
+ cy="8px"
49
+ r="7px"
50
+ ></circle>
51
+ </svg>
52
+ `), x => progressSegments * x.percentComplete / 100, progressSegments)), when(x => typeof x.value !== 'number', html(_t3 || (_t3 = _2`
53
+ <svg class="progress" viewBox="0 0 16 16">
54
+ <circle
55
+ class="background"
56
+ cx="8px"
57
+ cy="8px"
58
+ r="7px"
59
+ ></circle>
60
+ <circle
61
+ class="indeterminate-indicator-1"
62
+ cx="8px"
63
+ cy="8px"
64
+ r="7px"
65
+ ></circle>
66
+ </svg>
67
+ `))));
68
+
69
+ const vividProgressRing = ProgressRing.compose({
70
+ baseName: 'progress-ring',
71
+ template: ProgressRingTemplate,
72
+ styles: css_248z
73
+ });
74
+ designSystem.register(vividProgressRing());
75
+
76
+ export { vividProgressRing };
package/shared/_has.js ADDED
@@ -0,0 +1,58 @@
1
+ function _isPlaceholder(a) {
2
+ return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
3
+ }
4
+
5
+ /**
6
+ * Optimized internal one-arity curry function.
7
+ *
8
+ * @private
9
+ * @category Function
10
+ * @param {Function} fn The function to curry.
11
+ * @return {Function} The curried function.
12
+ */
13
+
14
+ function _curry1(fn) {
15
+ return function f1(a) {
16
+ if (arguments.length === 0 || _isPlaceholder(a)) {
17
+ return f1;
18
+ } else {
19
+ return fn.apply(this, arguments);
20
+ }
21
+ };
22
+ }
23
+
24
+ /**
25
+ * Optimized internal two-arity curry function.
26
+ *
27
+ * @private
28
+ * @category Function
29
+ * @param {Function} fn The function to curry.
30
+ * @return {Function} The curried function.
31
+ */
32
+
33
+ function _curry2(fn) {
34
+ return function f2(a, b) {
35
+ switch (arguments.length) {
36
+ case 0:
37
+ return f2;
38
+
39
+ case 1:
40
+ return _isPlaceholder(a) ? f2 : _curry1(function (_b) {
41
+ return fn(a, _b);
42
+ });
43
+
44
+ default:
45
+ return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {
46
+ return fn(_a, b);
47
+ }) : _isPlaceholder(b) ? _curry1(function (_b) {
48
+ return fn(a, _b);
49
+ }) : fn(a, b);
50
+ }
51
+ };
52
+ }
53
+
54
+ function _has(prop, obj) {
55
+ return Object.prototype.hasOwnProperty.call(obj, prop);
56
+ }
57
+
58
+ export { _curry1 as _, _curry2 as a, _has as b };
package/shared/affix.js CHANGED
@@ -1,18 +1,14 @@
1
1
  import './web.dom-collections.iterator.js';
2
- import { _ as __decorate, a as attr, b as __metadata, h as html } from './index2.js';
3
- import { I as Icon } from './index.js';
4
- import { c as classNames } from './class-names.js';
2
+ import { _ as __decorate, a as attr, b as __metadata, h as html } from './index.js';
3
+ import { I as Icon } from './icon.js';
5
4
 
6
5
  let _ = t => t,
7
- _t,
8
- _t2,
9
- _t3,
10
- _t4;
11
- class Prefix {}
6
+ _t;
7
+ class AffixIcon {}
12
8
 
13
- __decorate([attr, __metadata("design:type", String)], Prefix.prototype, "icon", void 0);
9
+ __decorate([attr, __metadata("design:type", String)], AffixIcon.prototype, "icon", void 0);
14
10
 
15
- class PrefixOrSuffix extends Prefix {
11
+ class AffixIconWithTrailing extends AffixIcon {
16
12
  constructor() {
17
13
  super(...arguments);
18
14
  this.iconTrailing = false;
@@ -23,22 +19,11 @@ class PrefixOrSuffix extends Prefix {
23
19
  __decorate([attr({
24
20
  mode: 'boolean',
25
21
  attribute: 'icon-trailing'
26
- }), __metadata("design:type", Object)], PrefixOrSuffix.prototype, "iconTrailing", void 0);
22
+ }), __metadata("design:type", Object)], AffixIconWithTrailing.prototype, "iconTrailing", void 0);
27
23
 
28
- const prefixTemplate = context => {
24
+ const affixIconTemplateFactory = context => {
29
25
  const iconTag = context.tagFor(Icon);
30
- const iconTemplate = html(_t || (_t = _`<span class="icon"><${0} :type="${0}"></${0}></span>`), iconTag, x => x.icon, iconTag);
31
- return html(_t2 || (_t2 = _`${0}`), x => x.icon ? iconTemplate : '');
32
- };
33
- const prefixOrSuffixTemplate = context => {
34
- const iconTag = context.tagFor(Icon);
35
-
36
- const classes = ({
37
- iconTrailing
38
- }) => classNames('icon', ['icon-trailing', iconTrailing]);
39
-
40
- const iconTemplate = html(_t3 || (_t3 = _`<span class="${0}"><${0} :type="${0}"></${0}></span>`), classes, iconTag, x => x.icon, iconTag);
41
- return html(_t4 || (_t4 = _`${0}`), x => x.icon ? iconTemplate : '');
26
+ return icon => icon ? html(_t || (_t = _`<span class="icon"><${0} :type="${0}"></${0}></span>`), iconTag, () => icon, iconTag) : null;
42
27
  };
43
28
 
44
- export { PrefixOrSuffix as P, Prefix as a, prefixTemplate as b, prefixOrSuffixTemplate as p };
29
+ export { AffixIconWithTrailing as A, affixIconTemplateFactory as a, AffixIcon as b };
package/shared/anchor.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as FoundationElement, _ as __decorate, a as attr, o as observable } from './index2.js';
1
+ import { F as FoundationElement, _ as __decorate, a as attr, o as observable } from './index.js';
2
2
  import { a as applyMixins } from './apply-mixins.js';
3
3
  import { A as ARIAGlobalStatesAndProperties, S as StartEnd } from './aria-global.js';
4
4
 
@@ -70,9 +70,9 @@ __decorate([
70
70
  class DelegatesARIALink {
71
71
  }
72
72
  __decorate([
73
- attr({ attribute: "aria-expanded", mode: "fromView" })
73
+ attr({ attribute: "aria-expanded" })
74
74
  ], DelegatesARIALink.prototype, "ariaExpanded", void 0);
75
75
  applyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);
76
76
  applyMixins(Anchor, StartEnd, DelegatesARIALink);
77
77
 
78
- export { Anchor as A };
78
+ export { Anchor as A, DelegatesARIALink as D };
@@ -1,4 +1,4 @@
1
- import { A as AttachedBehaviorHTMLDirective, h as html, _ as __decorate, a as attr } from './index2.js';
1
+ import { A as AttachedBehaviorHTMLDirective, h as html, _ as __decorate, a as attr } from './index.js';
2
2
 
3
3
  /**
4
4
  * The runtime behavior for template references.
@@ -96,61 +96,61 @@ html `
96
96
  class ARIAGlobalStatesAndProperties {
97
97
  }
98
98
  __decorate([
99
- attr({ attribute: "aria-atomic", mode: "fromView" })
99
+ attr({ attribute: "aria-atomic" })
100
100
  ], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
101
101
  __decorate([
102
- attr({ attribute: "aria-busy", mode: "fromView" })
102
+ attr({ attribute: "aria-busy" })
103
103
  ], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
104
104
  __decorate([
105
- attr({ attribute: "aria-controls", mode: "fromView" })
105
+ attr({ attribute: "aria-controls" })
106
106
  ], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
107
107
  __decorate([
108
- attr({ attribute: "aria-current", mode: "fromView" })
108
+ attr({ attribute: "aria-current" })
109
109
  ], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
110
110
  __decorate([
111
- attr({ attribute: "aria-describedby", mode: "fromView" })
111
+ attr({ attribute: "aria-describedby" })
112
112
  ], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
113
113
  __decorate([
114
- attr({ attribute: "aria-details", mode: "fromView" })
114
+ attr({ attribute: "aria-details" })
115
115
  ], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
116
116
  __decorate([
117
- attr({ attribute: "aria-disabled", mode: "fromView" })
117
+ attr({ attribute: "aria-disabled" })
118
118
  ], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
119
119
  __decorate([
120
- attr({ attribute: "aria-errormessage", mode: "fromView" })
120
+ attr({ attribute: "aria-errormessage" })
121
121
  ], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
122
122
  __decorate([
123
- attr({ attribute: "aria-flowto", mode: "fromView" })
123
+ attr({ attribute: "aria-flowto" })
124
124
  ], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
125
125
  __decorate([
126
- attr({ attribute: "aria-haspopup", mode: "fromView" })
126
+ attr({ attribute: "aria-haspopup" })
127
127
  ], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
128
128
  __decorate([
129
- attr({ attribute: "aria-hidden", mode: "fromView" })
129
+ attr({ attribute: "aria-hidden" })
130
130
  ], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
131
131
  __decorate([
132
- attr({ attribute: "aria-invalid", mode: "fromView" })
132
+ attr({ attribute: "aria-invalid" })
133
133
  ], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
134
134
  __decorate([
135
- attr({ attribute: "aria-keyshortcuts", mode: "fromView" })
135
+ attr({ attribute: "aria-keyshortcuts" })
136
136
  ], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
137
137
  __decorate([
138
- attr({ attribute: "aria-label", mode: "fromView" })
138
+ attr({ attribute: "aria-label" })
139
139
  ], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
140
140
  __decorate([
141
- attr({ attribute: "aria-labelledby", mode: "fromView" })
141
+ attr({ attribute: "aria-labelledby" })
142
142
  ], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
143
143
  __decorate([
144
- attr({ attribute: "aria-live", mode: "fromView" })
144
+ attr({ attribute: "aria-live" })
145
145
  ], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
146
146
  __decorate([
147
- attr({ attribute: "aria-owns", mode: "fromView" })
147
+ attr({ attribute: "aria-owns" })
148
148
  ], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
149
149
  __decorate([
150
- attr({ attribute: "aria-relevant", mode: "fromView" })
150
+ attr({ attribute: "aria-relevant" })
151
151
  ], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
152
152
  __decorate([
153
- attr({ attribute: "aria-roledescription", mode: "fromView" })
153
+ attr({ attribute: "aria-roledescription" })
154
154
  ], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
155
155
 
156
156
  export { ARIAGlobalStatesAndProperties as A, StartEnd as S, ref as r };
@@ -0,0 +1,65 @@
1
+ import { F as FoundationElement, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable } from './index.js';
2
+
3
+ /**
4
+ * An Progress HTML Element.
5
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
6
+ *
7
+ * @public
8
+ */
9
+ class BaseProgress extends FoundationElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ /**
13
+ * Indicates progress in %
14
+ * @internal
15
+ */
16
+ this.percentComplete = 0;
17
+ }
18
+ valueChanged() {
19
+ if (this.$fastController.isConnected) {
20
+ this.updatePercentComplete();
21
+ }
22
+ }
23
+ minChanged() {
24
+ if (this.$fastController.isConnected) {
25
+ this.updatePercentComplete();
26
+ }
27
+ }
28
+ maxChanged() {
29
+ if (this.$fastController.isConnected) {
30
+ this.updatePercentComplete();
31
+ }
32
+ }
33
+ /**
34
+ * @internal
35
+ */
36
+ connectedCallback() {
37
+ super.connectedCallback();
38
+ this.updatePercentComplete();
39
+ }
40
+ updatePercentComplete() {
41
+ const min = typeof this.min === "number" ? this.min : 0;
42
+ const max = typeof this.max === "number" ? this.max : 100;
43
+ const value = typeof this.value === "number" ? this.value : 0;
44
+ const range = max - min;
45
+ this.percentComplete =
46
+ range === 0 ? 0 : Math.fround(((value - min) / range) * 100);
47
+ }
48
+ }
49
+ __decorate([
50
+ attr({ converter: nullableNumberConverter })
51
+ ], BaseProgress.prototype, "value", void 0);
52
+ __decorate([
53
+ attr({ converter: nullableNumberConverter })
54
+ ], BaseProgress.prototype, "min", void 0);
55
+ __decorate([
56
+ attr({ converter: nullableNumberConverter })
57
+ ], BaseProgress.prototype, "max", void 0);
58
+ __decorate([
59
+ attr({ mode: "boolean" })
60
+ ], BaseProgress.prototype, "paused", void 0);
61
+ __decorate([
62
+ observable
63
+ ], BaseProgress.prototype, "percentComplete", void 0);
64
+
65
+ export { BaseProgress as B };
@@ -0,0 +1,25 @@
1
+ import { _ as __decorate, o as observable } from './index.js';
2
+ import { A as Anchor, D as DelegatesARIALink } from './anchor.js';
3
+ import { a as applyMixins } from './apply-mixins.js';
4
+ import { S as StartEnd } from './aria-global.js';
5
+
6
+ /**
7
+ * A Breadcrumb Item Custom HTML Element.
8
+ *
9
+ * @public
10
+ */
11
+ class BreadcrumbItem extends Anchor {
12
+ constructor() {
13
+ super(...arguments);
14
+ /**
15
+ * @internal
16
+ */
17
+ this.separator = true;
18
+ }
19
+ }
20
+ __decorate([
21
+ observable
22
+ ], BreadcrumbItem.prototype, "separator", void 0);
23
+ applyMixins(BreadcrumbItem, StartEnd, DelegatesARIALink);
24
+
25
+ export { BreadcrumbItem as B };
@@ -0,0 +1,68 @@
1
+ import { d as descriptors, f as functionUncurryThis, l as functionCall, p as fails$1, H as objectKeys$1, I as toObject$1, J as indexedObject, K as objectGetOwnPropertySymbols, L as objectPropertyIsEnumerable, _ as _export } from './web.dom-collections.iterator.js';
2
+
3
+ var DESCRIPTORS = descriptors;
4
+ var uncurryThis = functionUncurryThis;
5
+ var call = functionCall;
6
+ var fails = fails$1;
7
+ var objectKeys = objectKeys$1;
8
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
9
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
10
+ var toObject = toObject$1;
11
+ var IndexedObject = indexedObject;
12
+
13
+ // eslint-disable-next-line es/no-object-assign -- safe
14
+ var $assign = Object.assign;
15
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
16
+ var defineProperty = Object.defineProperty;
17
+ var concat = uncurryThis([].concat);
18
+
19
+ // `Object.assign` method
20
+ // https://tc39.es/ecma262/#sec-object.assign
21
+ var objectAssign = !$assign || fails(function () {
22
+ // should have correct order of operations (Edge bug)
23
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
24
+ enumerable: true,
25
+ get: function () {
26
+ defineProperty(this, 'b', {
27
+ value: 3,
28
+ enumerable: false
29
+ });
30
+ }
31
+ }), { b: 2 })).b !== 1) return true;
32
+ // should work with symbols and should have deterministic property order (V8 bug)
33
+ var A = {};
34
+ var B = {};
35
+ // eslint-disable-next-line es/no-symbol -- safe
36
+ var symbol = Symbol();
37
+ var alphabet = 'abcdefghijklmnopqrst';
38
+ A[symbol] = 7;
39
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
40
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
41
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
42
+ var T = toObject(target);
43
+ var argumentsLength = arguments.length;
44
+ var index = 1;
45
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
46
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
47
+ while (argumentsLength > index) {
48
+ var S = IndexedObject(arguments[index++]);
49
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
50
+ var length = keys.length;
51
+ var j = 0;
52
+ var key;
53
+ while (length > j) {
54
+ key = keys[j++];
55
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
56
+ }
57
+ } return T;
58
+ } : $assign;
59
+
60
+ var $ = _export;
61
+ var assign = objectAssign;
62
+
63
+ // `Object.assign` method
64
+ // https://tc39.es/ecma262/#sec-object.assign
65
+ // eslint-disable-next-line es/no-object-assign -- required for testing
66
+ $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
67
+ assign: assign
68
+ });