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

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 (145) hide show
  1. package/README.md +133 -4
  2. package/accordion/index.js +2 -2
  3. package/accordion-item/index.js +26 -18
  4. package/action-group/index.js +49 -0
  5. package/badge/index.js +14 -18
  6. package/banner/index.js +18 -81
  7. package/breadcrumb/index.js +20 -16
  8. package/breadcrumb-item/index.js +14 -9
  9. package/button/index.js +28 -659
  10. package/calendar/index.js +37 -8
  11. package/calendar-event/index.js +117 -0
  12. package/card/index.js +134 -0
  13. package/checkbox/index.js +173 -0
  14. package/dialog/index.js +282 -0
  15. package/divider/index.js +88 -0
  16. package/elevation/index.js +4 -31
  17. package/fab/index.js +102 -0
  18. package/focus/index.js +20 -3
  19. package/header/index.js +68 -0
  20. package/icon/index.js +9 -3
  21. package/index.js +45 -20
  22. package/layout/index.js +4 -4
  23. package/lib/accordion-item/accordion-item.d.ts +2 -2
  24. package/lib/accordion-item/index.d.ts +2 -1
  25. package/lib/action-group/action-group.d.ts +10 -0
  26. package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
  27. package/lib/{sidenav-item → action-group}/index.d.ts +1 -2
  28. package/lib/badge/badge.d.ts +6 -6
  29. package/lib/badge/index.d.ts +1 -1
  30. package/lib/banner/banner.template.d.ts +0 -2
  31. package/lib/banner/index.d.ts +1 -0
  32. package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
  33. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  34. package/lib/breadcrumb-item/index.d.ts +1 -0
  35. package/lib/button/button.d.ts +6 -5
  36. package/lib/button/index.d.ts +2 -19
  37. package/lib/calendar/calendar.d.ts +3 -1
  38. package/lib/calendar/index.d.ts +0 -1
  39. package/lib/calendar-event/calendar-event.d.ts +14 -0
  40. package/lib/calendar-event/calendar-event.template.d.ts +4 -0
  41. package/lib/calendar-event/index.d.ts +2 -0
  42. package/lib/card/card.d.ts +10 -0
  43. package/lib/{text/text.template.d.ts → card/card.template.d.ts} +2 -2
  44. package/lib/card/index.d.ts +4 -0
  45. package/lib/checkbox/checkbox.d.ts +5 -0
  46. package/lib/checkbox/checkbox.template.d.ts +4 -0
  47. package/lib/checkbox/index.d.ts +4 -0
  48. package/lib/components.d.ts +22 -10
  49. package/lib/dialog/dialog.d.ts +20 -0
  50. package/lib/dialog/dialog.template.d.ts +4 -0
  51. package/lib/dialog/index.d.ts +5 -0
  52. package/lib/divider/divider.d.ts +3 -0
  53. package/lib/divider/divider.template.d.ts +4 -0
  54. package/lib/divider/index.d.ts +2 -0
  55. package/lib/elevation/elevation.d.ts +1 -0
  56. package/lib/elevation/index.d.ts +1 -1
  57. package/lib/enums.d.ts +11 -5
  58. package/lib/fab/fab.d.ts +13 -0
  59. package/lib/fab/fab.template.d.ts +4 -0
  60. package/lib/fab/index.d.ts +4 -0
  61. package/lib/focus/index.d.ts +1 -1
  62. package/lib/header/header.d.ts +5 -0
  63. package/lib/header/header.template.d.ts +4 -0
  64. package/lib/header/index.d.ts +3 -0
  65. package/lib/icon/icon.d.ts +4 -3
  66. package/lib/layout/index.d.ts +1 -1
  67. package/lib/layout/layout.d.ts +3 -3
  68. package/lib/menu/index.d.ts +11 -0
  69. package/lib/menu/menu.d.ts +7 -0
  70. package/lib/menu/menu.template.d.ts +3 -0
  71. package/lib/nav/index.d.ts +2 -0
  72. package/lib/nav/nav.d.ts +3 -0
  73. package/lib/nav/nav.template.d.ts +4 -0
  74. package/lib/nav-disclosure/index.d.ts +4 -0
  75. package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
  76. package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
  77. package/lib/nav-item/index.d.ts +4 -0
  78. package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
  79. package/lib/nav-item/nav-item.template.d.ts +4 -0
  80. package/lib/{text → note}/index.d.ts +1 -1
  81. package/lib/note/note.d.ts +10 -0
  82. package/lib/note/note.template.d.ts +5 -0
  83. package/lib/popup/index.d.ts +1 -1
  84. package/lib/popup/popup.d.ts +3 -15
  85. package/lib/progress/progress.d.ts +1 -1
  86. package/lib/progress-ring/progress-ring.d.ts +2 -1
  87. package/lib/side-drawer/index.d.ts +1 -1
  88. package/lib/side-drawer/side-drawer.d.ts +2 -7
  89. package/lib/side-drawer/side-drawer.template.d.ts +2 -2
  90. package/lib/text-anchor/text-anchor.d.ts +1 -1
  91. package/lib/text-field/index.d.ts +4 -0
  92. package/lib/text-field/text-field.d.ts +23 -0
  93. package/lib/text-field/text-field.template.d.ts +5 -0
  94. package/lib/tooltip/tooltip.d.ts +2 -4
  95. package/menu/index.js +661 -0
  96. package/nav/index.js +17 -0
  97. package/nav-disclosure/index.js +90 -0
  98. package/nav-item/index.js +43 -0
  99. package/note/index.js +68 -0
  100. package/package.json +48 -8
  101. package/popup/index.js +20 -2082
  102. package/progress/index.js +33 -24
  103. package/progress-ring/index.js +9 -3
  104. package/shared/anchor.js +8 -1
  105. package/shared/aria-global.js +3 -40
  106. package/shared/base-progress.js +5 -0
  107. package/shared/button.js +195 -0
  108. package/shared/calendar-event.js +26 -0
  109. package/shared/dialog-polyfill.esm.js +858 -0
  110. package/shared/enums.js +79 -0
  111. package/shared/es.object.assign.js +7 -6
  112. package/shared/export.js +972 -0
  113. package/shared/focus.js +5 -0
  114. package/shared/focus2.js +11 -0
  115. package/shared/form-associated.js +557 -0
  116. package/shared/icon.js +504 -508
  117. package/shared/index.js +79 -56
  118. package/shared/index2.js +26 -10
  119. package/shared/index3.js +2109 -0
  120. package/shared/iterators.js +61 -0
  121. package/shared/object-keys.js +13 -0
  122. package/shared/patterns/focus.d.ts +3 -0
  123. package/shared/patterns/index.d.ts +1 -0
  124. package/shared/ref.js +41 -0
  125. package/shared/text-anchor.js +2 -11
  126. package/shared/text-anchor.template.js +5 -2
  127. package/shared/to-string.js +51 -0
  128. package/shared/web.dom-collections.iterator.js +61 -1074
  129. package/side-drawer/index.js +33 -51
  130. package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff +0 -0
  131. package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
  132. package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff +0 -0
  133. package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
  134. package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff +0 -0
  135. package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
  136. package/styles/fonts/spezia.css +11 -11
  137. package/styles/themes/dark.css +12 -0
  138. package/styles/themes/light.css +12 -0
  139. package/styles/typography/desktop.css +72 -0
  140. package/text-anchor/index.js +8 -1
  141. package/text-field/index.js +412 -0
  142. package/tooltip/index.js +19 -21
  143. package/lib/text/text.d.ts +0 -10
  144. package/sidenav-item/index.js +0 -38
  145. package/text/index.js +0 -45
package/progress/index.js CHANGED
@@ -1,18 +1,21 @@
1
1
  import { _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
2
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';
3
+ import '../shared/web.dom-collections.iterator.js';
4
+ import { c as classofRaw, _ as _export, f as functionUncurryThis } from '../shared/export.js';
4
5
  import { B as BaseProgress } from '../shared/base-progress.js';
5
6
  import { w as when } from '../shared/when.js';
6
7
  import { c as classNames } from '../shared/class-names.js';
8
+ import '../shared/object-keys.js';
9
+ import '../shared/iterators.js';
7
10
 
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}";
11
+ var css_248z = ".base {\n height: 6px;\n align-items: center;\n margin: 0;\n outline: none;\n}\n.base:not(.connotation-pacific).connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta);\n}\n.base:not(.connotation-pacific).connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert);\n}\n.base:not(.connotation-pacific).connotation-success {\n --_connotation-color-primary: var(--vvd-color-success);\n}\n.base:not(.connotation-pacific):not(.connotation-cta, .connotation-alert, .connotation-success) {\n --_connotation-color-primary: var(--vvd-color-on-canvas);\n}\n.base.connotation-pacific {\n --_connotation-color-primary: linear-gradient(to right, var(--vvd-color-info-30), var(--vvd-color-cta-70));\n}\n\n.progress {\n position: relative;\n display: flex;\n overflow: hidden;\n align-items: center;\n background-color: var(--vvd-color-neutral-20);\n block-size: 100%;\n inline-size: 100%;\n /* Shape */\n}\n.base:not(.shape-sharp) .progress {\n border-radius: 3px;\n}\n\n.indeterminate {\n display: flex;\n background-color: var(--_connotation-color-primary);\n block-size: 100%;\n border-radius: inherit;\n inline-size: 100%;\n}\n\n.determinate {\n background-color: var(--_connotation-color-primary);\n block-size: 100%;\n border-radius: inherit;\n transition: all 0.2s ease-in-out;\n}\n.connotation-pacific .determinate {\n background-image: var(--_connotation-color-primary);\n}\n.reverse .determinate {\n position: absolute;\n right: 0;\n}\n.paused .determinate {\n background-color: var(--vvd-color-neutral-40);\n}\n\n.indicator-1 {\n animation: indeterminate-1 2s infinite;\n inline-size: 30%;\n}\n\n.indicator-2 {\n animation: indeterminate-2 2s infinite;\n inline-size: 60%;\n}\n\n.indicator-1,\n.indicator-2 {\n position: absolute;\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 opacity: 0;\n}\n.connotation-pacific .indicator-1,\n.connotation-pacific .indicator-2 {\n background-image: var(--_connotation-color-primary);\n}\n.paused .indicator-1,\n.paused .indicator-2 {\n animation-play-state: paused;\n background-color: var(--_connotation-color-primary);\n}\n.reverse .indicator-1,\n.reverse .indicator-2 {\n animation-direction: reverse;\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
12
  styleInject(css_248z);
10
13
 
11
14
  var classof = classofRaw;
12
15
 
13
16
  // `IsArray` abstract operation
14
17
  // https://tc39.es/ecma262/#sec-isarray
15
- // eslint-disable-next-line es/no-array-isarray -- safe
18
+ // eslint-disable-next-line es-x/no-array-isarray -- safe
16
19
  var isArray$1 = Array.isArray || function isArray(argument) {
17
20
  return classof(argument) == 'Array';
18
21
  };
@@ -57,35 +60,41 @@ let _2 = t => t,
57
60
  _t2,
58
61
  _t3;
59
62
 
60
- const getClasses = _ => classNames('base', [`connotation-${_.connotation}`, !!_.connotation], [`shape-${_.shape}`, !!_.shape], ['reverse', _.reverse]);
63
+ const getClasses = ({
64
+ connotation,
65
+ shape,
66
+ reverse,
67
+ paused
68
+ }) => classNames('base', [`connotation-${connotation}`, Boolean(connotation)], [`shape-${shape}`, Boolean(shape)], ['reverse', Boolean(reverse)], ['paused', Boolean(paused)]);
61
69
 
62
- const ProgressTemplate = _ => {
70
+ function determinate() {
63
71
  return html(_t || (_t = _2`
72
+ <span class="determinate" style="width: ${0}%"></span>`), x => x.percentComplete);
73
+ }
74
+
75
+ function indeterminate() {
76
+ return html(_t2 || (_t2 = _2`
77
+ <span class="indeterminate" name="indeterminate">
78
+ <span class="indicator-1"></span>
79
+ <span class="indicator-2"></span>
80
+ </span>`));
81
+ }
82
+
83
+ const ProgressTemplate = _ => {
84
+ return html(_t3 || (_t3 = _2`
64
85
  <div
65
86
  role="progressbar"
66
87
  aria-valuenow="${0}"
67
88
  aria-valuemin="${0}"
68
89
  aria-valuemax="${0}"
69
- class="${0} ${0}"
90
+ class="${0}"
70
91
  >
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
- `))));
92
+ <div class="progress">
93
+ ${0}
94
+ ${0}
95
+ </div>
96
+ </div>
97
+ `), x => x.value, x => x.min, x => x.max, getClasses, when(x => typeof x.value === 'number', determinate()), when(x => typeof x.value !== 'number', indeterminate()));
89
98
  };
90
99
 
91
100
  const vividProgress = Progress.compose({
@@ -4,19 +4,25 @@ import { B as BaseProgress } from '../shared/base-progress.js';
4
4
  import { w as when } from '../shared/when.js';
5
5
  import { c as classNames } from '../shared/class-names.js';
6
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}";
7
+ var css_248z = ".base {\n align-items: center;\n block-size: var(--_density);\n color: var(--_appearance-color-text);\n inline-size: var(--_density);\n outline: none;\n}\n.base.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta);\n}\n.base.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert);\n}\n.base.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success);\n}\n.base:not(.connotation-cta, .connotation-alert, .connotation-success) {\n --_connotation-color-primary: var(--vvd-color-on-canvas);\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-50);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base.density-5 {\n --_density: calc(5 * 4px);\n}\n.base.density-6 {\n --_density: calc(6 * 4px);\n}\n.base.density-7 {\n --_density: calc(7 * 4px);\n}\n.base.density-8 {\n --_density: calc(8 * 4px);\n}\n.base.density-9 {\n --_density: calc(9 * 4px);\n}\n.base.density-11 {\n --_density: calc(11 * 4px);\n}\n.base.density-12 {\n --_density: calc(12 * 4px);\n}\n.base.density-13 {\n --_density: calc(13 * 4px);\n}\n.base:not(.density-5, .density-6, .density-7, .density-8, .density-9, .density-11, .density-12, .density-13) {\n --_density: calc(10 * 4px);\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: currentColor;\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: currentColor;\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}\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
8
  styleInject(css_248z);
9
9
 
10
10
  class ProgressRing extends BaseProgress {}
11
11
 
12
- __decorate([attr(), __metadata("design:type", String)], ProgressRing.prototype, "connotation", void 0);
12
+ __decorate([attr, __metadata("design:type", String)], ProgressRing.prototype, "connotation", void 0);
13
+
14
+ __decorate([attr, __metadata("design:type", Number)], ProgressRing.prototype, "density", void 0);
13
15
 
14
16
  let _2 = t => t,
15
17
  _t,
16
18
  _t2,
17
19
  _t3;
18
20
 
19
- const getClasses = _ => classNames('base', [`connotation-${_.connotation}`, !!_.connotation]);
21
+ const getClasses = ({
22
+ connotation,
23
+ density,
24
+ paused
25
+ }) => classNames('base', ['disabled', !!paused], [`connotation-${connotation}`, !!connotation], [`density-${(density ? Number(density) : 0) + 10}`, !!density]);
20
26
 
21
27
  const progressSegments = 44;
22
28
  const ProgressRingTemplate = _ => html(_t || (_t = _2`
package/shared/anchor.js CHANGED
@@ -6,6 +6,12 @@ import { A as ARIAGlobalStatesAndProperties, S as StartEnd } from './aria-global
6
6
  * An Anchor Custom HTML Element.
7
7
  * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
8
8
  *
9
+ * @slot start - Content which can be provided before the anchor content
10
+ * @slot end - Content which can be provided after the anchor content
11
+ * @slot - The default slot for anchor content
12
+ * @csspart control - The anchor element
13
+ * @csspart content - The element wrapping anchor content
14
+ *
9
15
  * @public
10
16
  */
11
17
  class Anchor extends FoundationElement {
@@ -20,7 +26,8 @@ class Anchor extends FoundationElement {
20
26
  var _a;
21
27
  // Check to see if delegatesFocus is supported
22
28
  if (window.ShadowRoot &&
23
- !window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") && ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
29
+ !window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") &&
30
+ ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
24
31
  this.focus = () => {
25
32
  this.control.focus();
26
33
  };
@@ -1,42 +1,5 @@
1
- import { A as AttachedBehaviorHTMLDirective, h as html, _ as __decorate, a as attr } from './index.js';
2
-
3
- /**
4
- * The runtime behavior for template references.
5
- * @public
6
- */
7
- class RefBehavior {
8
- /**
9
- * Creates an instance of RefBehavior.
10
- * @param target - The element to reference.
11
- * @param propertyName - The name of the property to assign the reference to.
12
- */
13
- constructor(target, propertyName) {
14
- this.target = target;
15
- this.propertyName = propertyName;
16
- }
17
- /**
18
- * Bind this behavior to the source.
19
- * @param source - The source to bind to.
20
- * @param context - The execution context that the binding is operating within.
21
- */
22
- bind(source) {
23
- source[this.propertyName] = this.target;
24
- }
25
- /**
26
- * Unbinds this behavior from the source.
27
- * @param source - The source to unbind from.
28
- */
29
- /* eslint-disable-next-line @typescript-eslint/no-empty-function */
30
- unbind() { }
31
- }
32
- /**
33
- * A directive that observes the updates a property with a reference to the element.
34
- * @param propertyName - The name of the property to assign the reference to.
35
- * @public
36
- */
37
- function ref(propertyName) {
38
- return new AttachedBehaviorHTMLDirective("fast-ref", RefBehavior, propertyName);
39
- }
1
+ import { h as html, _ as __decorate, a as attr } from './index.js';
2
+ import { r as ref } from './ref.js';
40
3
 
41
4
  /**
42
5
  * A mixin class implementing start and end elements.
@@ -153,4 +116,4 @@ __decorate([
153
116
  attr({ attribute: "aria-roledescription" })
154
117
  ], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
155
118
 
156
- export { ARIAGlobalStatesAndProperties as A, StartEnd as S, ref as r };
119
+ export { ARIAGlobalStatesAndProperties as A, StartEnd as S };
@@ -4,6 +4,11 @@ import { F as FoundationElement, _ as __decorate, a as attr, n as nullableNumber
4
4
  * An Progress HTML Element.
5
5
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
6
6
  *
7
+ * @slot indeterminate - The slot for a custom indeterminate indicator
8
+ * @csspart progress - Represents the progress element
9
+ * @csspart determinate - The determinate indicator
10
+ * @csspart indeterminate - The indeterminate indicator
11
+ *
7
12
  * @public
8
13
  */
9
14
  class BaseProgress extends FoundationElement {
@@ -0,0 +1,195 @@
1
+ import { F as FoundationElement, _ as __decorate, a as attr, o as observable } from './index.js';
2
+ import { a as applyMixins } from './apply-mixins.js';
3
+ import { F as FormAssociated } from './form-associated.js';
4
+ import { A as ARIAGlobalStatesAndProperties, S as StartEnd } from './aria-global.js';
5
+
6
+ class _Button extends FoundationElement {
7
+ }
8
+ /**
9
+ * A form-associated base class for the {@link @microsoft/fast-foundation#(Button:class)} component.
10
+ *
11
+ * @internal
12
+ */
13
+ class FormAssociatedButton extends FormAssociated(_Button) {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.proxy = document.createElement("input");
17
+ }
18
+ }
19
+
20
+ /**
21
+ * A Button Custom HTML Element.
22
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | <button> element }.
23
+ *
24
+ * @slot start - Content which can be provided before the button content
25
+ * @slot end - Content which can be provided after the button content
26
+ * @slot - The default slot for button content
27
+ * @csspart control - The button element
28
+ * @csspart content - The element wrapping button content
29
+ *
30
+ * @public
31
+ */
32
+ class Button extends FormAssociatedButton {
33
+ constructor() {
34
+ super(...arguments);
35
+ /**
36
+ * Prevent events to propagate if disabled and has no slotted content wrapped in HTML elements
37
+ * @internal
38
+ */
39
+ this.handleClick = (e) => {
40
+ var _a;
41
+ if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a === void 0 ? void 0 : _a.length) <= 1) {
42
+ e.stopPropagation();
43
+ }
44
+ };
45
+ /**
46
+ * Submits the parent form
47
+ */
48
+ this.handleSubmission = () => {
49
+ if (!this.form) {
50
+ return;
51
+ }
52
+ const attached = this.proxy.isConnected;
53
+ if (!attached) {
54
+ this.attachProxy();
55
+ }
56
+ // Browser support for requestSubmit is not comprehensive
57
+ // so click the proxy if it isn't supported
58
+ typeof this.form.requestSubmit === "function"
59
+ ? this.form.requestSubmit(this.proxy)
60
+ : this.proxy.click();
61
+ if (!attached) {
62
+ this.detachProxy();
63
+ }
64
+ };
65
+ /**
66
+ * Resets the parent form
67
+ */
68
+ this.handleFormReset = () => {
69
+ var _a;
70
+ (_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
71
+ };
72
+ /**
73
+ * Overrides the focus call for where delegatesFocus is unsupported.
74
+ * This check works for Chrome, Edge Chromium, FireFox, and Safari
75
+ * Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
76
+ */
77
+ this.handleUnsupportedDelegatesFocus = () => {
78
+ var _a;
79
+ // Check to see if delegatesFocus is supported
80
+ if (window.ShadowRoot &&
81
+ !window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") &&
82
+ ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
83
+ this.focus = () => {
84
+ this.control.focus();
85
+ };
86
+ }
87
+ };
88
+ }
89
+ formactionChanged() {
90
+ if (this.proxy instanceof HTMLInputElement) {
91
+ this.proxy.formAction = this.formaction;
92
+ }
93
+ }
94
+ formenctypeChanged() {
95
+ if (this.proxy instanceof HTMLInputElement) {
96
+ this.proxy.formEnctype = this.formenctype;
97
+ }
98
+ }
99
+ formmethodChanged() {
100
+ if (this.proxy instanceof HTMLInputElement) {
101
+ this.proxy.formMethod = this.formmethod;
102
+ }
103
+ }
104
+ formnovalidateChanged() {
105
+ if (this.proxy instanceof HTMLInputElement) {
106
+ this.proxy.formNoValidate = this.formnovalidate;
107
+ }
108
+ }
109
+ formtargetChanged() {
110
+ if (this.proxy instanceof HTMLInputElement) {
111
+ this.proxy.formTarget = this.formtarget;
112
+ }
113
+ }
114
+ typeChanged(previous, next) {
115
+ if (this.proxy instanceof HTMLInputElement) {
116
+ this.proxy.type = this.type;
117
+ }
118
+ next === "submit" && this.addEventListener("click", this.handleSubmission);
119
+ previous === "submit" && this.removeEventListener("click", this.handleSubmission);
120
+ next === "reset" && this.addEventListener("click", this.handleFormReset);
121
+ previous === "reset" && this.removeEventListener("click", this.handleFormReset);
122
+ }
123
+ /**
124
+ * @internal
125
+ */
126
+ connectedCallback() {
127
+ var _a;
128
+ super.connectedCallback();
129
+ this.proxy.setAttribute("type", this.type);
130
+ this.handleUnsupportedDelegatesFocus();
131
+ const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
132
+ if (elements) {
133
+ elements.forEach((span) => {
134
+ span.addEventListener("click", this.handleClick);
135
+ });
136
+ }
137
+ }
138
+ /**
139
+ * @internal
140
+ */
141
+ disconnectedCallback() {
142
+ var _a;
143
+ super.disconnectedCallback();
144
+ const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
145
+ if (elements) {
146
+ elements.forEach((span) => {
147
+ span.removeEventListener("click", this.handleClick);
148
+ });
149
+ }
150
+ }
151
+ }
152
+ __decorate([
153
+ attr({ mode: "boolean" })
154
+ ], Button.prototype, "autofocus", void 0);
155
+ __decorate([
156
+ attr({ attribute: "form" })
157
+ ], Button.prototype, "formId", void 0);
158
+ __decorate([
159
+ attr
160
+ ], Button.prototype, "formaction", void 0);
161
+ __decorate([
162
+ attr
163
+ ], Button.prototype, "formenctype", void 0);
164
+ __decorate([
165
+ attr
166
+ ], Button.prototype, "formmethod", void 0);
167
+ __decorate([
168
+ attr({ mode: "boolean" })
169
+ ], Button.prototype, "formnovalidate", void 0);
170
+ __decorate([
171
+ attr
172
+ ], Button.prototype, "formtarget", void 0);
173
+ __decorate([
174
+ attr
175
+ ], Button.prototype, "type", void 0);
176
+ __decorate([
177
+ observable
178
+ ], Button.prototype, "defaultSlottedContent", void 0);
179
+ /**
180
+ * Includes ARIA states and properties relating to the ARIA button role
181
+ *
182
+ * @public
183
+ */
184
+ class DelegatesARIAButton {
185
+ }
186
+ __decorate([
187
+ attr({ attribute: "aria-expanded" })
188
+ ], DelegatesARIAButton.prototype, "ariaExpanded", void 0);
189
+ __decorate([
190
+ attr({ attribute: "aria-pressed" })
191
+ ], DelegatesARIAButton.prototype, "ariaPressed", void 0);
192
+ applyMixins(DelegatesARIAButton, ARIAGlobalStatesAndProperties);
193
+ applyMixins(Button, StartEnd, DelegatesARIAButton);
194
+
195
+ export { Button as B };
@@ -0,0 +1,26 @@
1
+ import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, n as nullableNumberConverter } from './index.js';
2
+
3
+ class CalendarEvent extends FoundationElement {}
4
+
5
+ __decorate([attr, __metadata("design:type", String)], CalendarEvent.prototype, "heading", void 0);
6
+
7
+ __decorate([attr, __metadata("design:type", String)], CalendarEvent.prototype, "description", void 0);
8
+
9
+ __decorate([attr, __metadata("design:type", String)], CalendarEvent.prototype, "connotation", void 0);
10
+
11
+ __decorate([attr, __metadata("design:type", String)], CalendarEvent.prototype, "appearance", void 0);
12
+
13
+ __decorate([attr({
14
+ converter: nullableNumberConverter,
15
+ attribute: 'overlap-count'
16
+ }), __metadata("design:type", Number)], CalendarEvent.prototype, "overlapCount", void 0);
17
+
18
+ __decorate([attr({
19
+ converter: nullableNumberConverter
20
+ }), __metadata("design:type", Number)], CalendarEvent.prototype, "start", void 0);
21
+
22
+ __decorate([attr({
23
+ converter: nullableNumberConverter
24
+ }), __metadata("design:type", Number)], CalendarEvent.prototype, "duration", void 0);
25
+
26
+ export { CalendarEvent as C };