@vonage/vivid 5.24.0 → 5.25.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.
Files changed (331) hide show
  1. package/README.md +1 -1
  2. package/avatar/index.cjs +10 -10
  3. package/avatar/index.js +4 -3
  4. package/breadcrumb-item/index.cjs +9 -5
  5. package/breadcrumb-item/index.js +11 -6
  6. package/bundled/affix.cjs +1 -1
  7. package/bundled/affix.js +1 -1
  8. package/bundled/definition10.cjs +2 -1
  9. package/bundled/definition10.js +3 -2
  10. package/bundled/definition11.cjs +4 -4
  11. package/bundled/definition11.js +4 -3
  12. package/bundled/definition12.cjs +1 -1
  13. package/bundled/definition12.js +1 -0
  14. package/bundled/definition15.cjs +5 -5
  15. package/bundled/definition15.js +4 -3
  16. package/bundled/definition17.cjs +7 -7
  17. package/bundled/definition17.js +22 -109
  18. package/bundled/definition18.cjs +3 -3
  19. package/bundled/definition18.js +9 -31
  20. package/bundled/definition19.cjs +19 -19
  21. package/bundled/definition19.js +3 -2
  22. package/bundled/definition21.cjs +8 -8
  23. package/bundled/definition21.js +5 -4
  24. package/bundled/definition22.cjs +2 -2
  25. package/bundled/definition22.js +2 -2
  26. package/bundled/definition24.cjs +4 -4
  27. package/bundled/definition24.js +4 -3
  28. package/bundled/definition25.cjs +3 -3
  29. package/bundled/definition25.js +32 -28
  30. package/bundled/definition3.cjs +5 -5
  31. package/bundled/definition3.js +10 -40
  32. package/bundled/definition4.cjs +6 -6
  33. package/bundled/definition4.js +4 -3
  34. package/bundled/definition6.cjs +11 -11
  35. package/bundled/definition6.js +4 -3
  36. package/bundled/definition9.cjs +12 -6
  37. package/bundled/definition9.js +66 -43
  38. package/bundled/extractOptions.cjs +1 -1
  39. package/bundled/extractOptions.js +2 -2
  40. package/bundled/icon.cjs +1 -0
  41. package/bundled/icon.js +34 -0
  42. package/bundled/listbox.cjs +1 -1
  43. package/bundled/listbox.js +5 -2
  44. package/bundled/mixins.cjs +8 -8
  45. package/bundled/mixins.js +4 -3
  46. package/bundled/optgroup.cjs +1 -0
  47. package/bundled/optgroup.js +27 -0
  48. package/bundled/option.cjs +1 -0
  49. package/bundled/option.js +93 -0
  50. package/bundled/vivid-element.cjs +1 -1
  51. package/bundled/vivid-element.js +1 -1
  52. package/card/index.cjs +22 -22
  53. package/card/index.js +4 -3
  54. package/color-picker/index.cjs +18 -18
  55. package/color-picker/index.js +4 -3
  56. package/combobox/index.cjs +7 -7
  57. package/combobox/index.js +4 -2
  58. package/custom-elements.json +4159 -3847
  59. package/data-grid/index.cjs +24 -24
  60. package/data-grid/index.js +4 -3
  61. package/dial-pad/index.cjs +21 -21
  62. package/dial-pad/index.js +4 -3
  63. package/dialog/index.cjs +14 -14
  64. package/dialog/index.js +4 -3
  65. package/empty-state/index.cjs +3 -3
  66. package/empty-state/index.js +4 -3
  67. package/file-picker/index.cjs +7 -7
  68. package/file-picker/index.js +4 -3
  69. package/icon/definition.cjs +2 -1
  70. package/icon/definition.js +2 -1
  71. package/index.cjs +148 -141
  72. package/index.js +41 -37
  73. package/lib/accordion-item/accordion-item.d.ts +1 -0
  74. package/lib/combobox/combobox.d.ts +1 -1
  75. package/lib/components.d.ts +1 -0
  76. package/lib/dial-pad/dial-pad.d.ts +0 -1
  77. package/lib/listbox/definition.d.ts +3 -0
  78. package/lib/listbox/index.d.ts +1 -0
  79. package/lib/listbox/listbox.d.ts +1302 -0
  80. package/lib/listbox/listbox.template.d.ts +3 -0
  81. package/lib/listbox/variations.browser-spec.d.ts +1 -0
  82. package/lib/menu/menu.d.ts +0 -1
  83. package/lib/number-field/number-field.d.ts +0 -1
  84. package/lib/rich-text-editor/rte/features/base.d.ts +1 -0
  85. package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -2
  86. package/lib/tag-name-map.d.ts +2 -1
  87. package/lib/text-field/text-field.d.ts +1 -0
  88. package/lib/toggletip/toggletip.d.ts +1 -0
  89. package/lib/tooltip/tooltip.d.ts +1 -0
  90. package/listbox/definition.cjs +5 -0
  91. package/listbox/definition.js +2 -0
  92. package/listbox/index.cjs +11 -0
  93. package/listbox/index.js +540 -0
  94. package/nav/definition.cjs +1 -1
  95. package/nav/definition.js +1 -1
  96. package/nav-disclosure/definition.cjs +1 -1
  97. package/nav-disclosure/definition.js +1 -1
  98. package/nav-disclosure/index.cjs +4 -4
  99. package/nav-disclosure/index.js +4 -3
  100. package/nav-item/definition.cjs +1 -1
  101. package/nav-item/definition.js +1 -1
  102. package/note/definition.cjs +1 -1
  103. package/note/definition.js +1 -1
  104. package/number-field/definition.cjs +1 -1
  105. package/number-field/definition.js +1 -1
  106. package/optgroup/definition.cjs +2 -1
  107. package/optgroup/definition.js +2 -1
  108. package/option/definition.cjs +2 -1
  109. package/option/definition.js +2 -1
  110. package/package.json +8 -7
  111. package/pagination/definition.cjs +1 -1
  112. package/pagination/definition.js +1 -1
  113. package/platform-switch/definition.cjs +1 -1
  114. package/platform-switch/definition.js +1 -1
  115. package/popover/definition.cjs +1 -1
  116. package/popover/definition.js +1 -1
  117. package/popover/index.cjs +5 -5
  118. package/popover/index.js +4 -3
  119. package/progress/definition.cjs +1 -1
  120. package/progress/definition.js +1 -1
  121. package/radio/definition.cjs +1 -1
  122. package/radio/definition.js +1 -1
  123. package/radio-group/definition.cjs +1 -1
  124. package/radio-group/definition.js +1 -1
  125. package/range-slider/definition.cjs +1 -1
  126. package/range-slider/definition.js +1 -1
  127. package/rich-text-editor/definition.cjs +1 -1
  128. package/rich-text-editor/definition.js +1 -1
  129. package/rich-text-editor/index.cjs +13 -13
  130. package/rich-text-editor/index.js +22 -19
  131. package/rich-text-view/definition.cjs +1 -1
  132. package/rich-text-view/definition.js +1 -1
  133. package/searchable-select/definition.cjs +1 -1
  134. package/searchable-select/definition.js +1 -1
  135. package/searchable-select/index.cjs +23 -23
  136. package/searchable-select/index.js +10 -7
  137. package/select/definition.cjs +1 -1
  138. package/select/definition.js +1 -1
  139. package/selectable-box/definition.cjs +1 -1
  140. package/selectable-box/definition.js +1 -1
  141. package/shared/listbox/commands.d.ts +17 -0
  142. package/shared/listbox/move.d.ts +6 -0
  143. package/shared/listbox/options.d.ts +12 -0
  144. package/shared/listbox/selection.d.ts +28 -0
  145. package/shared/listbox/state.d.ts +26 -0
  146. package/shared/listbox/typeahead.d.ts +8 -0
  147. package/shared/listbox/with-options-filter.d.ts +440 -0
  148. package/shared/listbox/with-options.d.ts +862 -0
  149. package/side-drawer/definition.cjs +1 -1
  150. package/side-drawer/definition.js +1 -1
  151. package/simple-color-picker/definition.cjs +1 -1
  152. package/simple-color-picker/definition.js +1 -1
  153. package/simple-color-picker/index.cjs +6 -6
  154. package/simple-color-picker/index.js +4 -3
  155. package/split-button/definition.cjs +1 -1
  156. package/split-button/definition.js +1 -1
  157. package/status/definition.cjs +1 -1
  158. package/status/definition.js +1 -1
  159. package/switch/definition.cjs +1 -1
  160. package/switch/definition.js +1 -1
  161. package/tab/definition.cjs +1 -1
  162. package/tab/definition.js +1 -1
  163. package/tab-panel/definition.cjs +1 -1
  164. package/tab-panel/definition.js +1 -1
  165. package/table/definition.cjs +1 -1
  166. package/table/definition.js +1 -1
  167. package/table/index.cjs +13 -13
  168. package/table/index.js +4 -3
  169. package/tabs/definition.cjs +1 -1
  170. package/tabs/definition.js +1 -1
  171. package/tag/definition.cjs +1 -1
  172. package/tag/definition.js +1 -1
  173. package/tag/index.cjs +11 -11
  174. package/tag/index.js +4 -3
  175. package/tag-group/definition.cjs +1 -1
  176. package/tag-group/definition.js +1 -1
  177. package/text-area/definition.cjs +1 -1
  178. package/text-area/definition.js +1 -1
  179. package/time-picker/definition.cjs +1 -1
  180. package/time-picker/definition.js +1 -1
  181. package/tree-item/definition.cjs +1 -1
  182. package/tree-item/definition.js +1 -1
  183. package/tree-view/definition.cjs +1 -1
  184. package/tree-view/definition.js +1 -1
  185. package/unbundled/affix.cjs +2 -2
  186. package/unbundled/affix.js +1 -1
  187. package/unbundled/base-progress.cjs +1 -1
  188. package/unbundled/base-progress.js +1 -1
  189. package/unbundled/button.cjs +2 -2
  190. package/unbundled/button.js +2 -2
  191. package/unbundled/definition.cjs +2 -65
  192. package/unbundled/definition.js +4 -61
  193. package/unbundled/definition11.cjs +4 -3
  194. package/unbundled/definition11.js +3 -2
  195. package/unbundled/definition12.cjs +3 -2
  196. package/unbundled/definition12.js +3 -2
  197. package/unbundled/definition14.cjs +2 -1
  198. package/unbundled/definition14.js +2 -1
  199. package/unbundled/definition17.cjs +9 -4
  200. package/unbundled/definition17.js +9 -4
  201. package/unbundled/definition2.cjs +7 -2
  202. package/unbundled/definition2.js +8 -3
  203. package/unbundled/definition21.cjs +2 -1
  204. package/unbundled/definition21.js +2 -1
  205. package/unbundled/definition23.cjs +2 -1
  206. package/unbundled/definition23.js +2 -1
  207. package/unbundled/definition24.cjs +6 -4
  208. package/unbundled/definition24.js +6 -4
  209. package/unbundled/definition25.cjs +2 -1
  210. package/unbundled/definition25.js +2 -1
  211. package/unbundled/definition26.cjs +7 -4
  212. package/unbundled/definition26.js +7 -4
  213. package/unbundled/definition27.cjs +39 -5
  214. package/unbundled/definition27.js +40 -6
  215. package/unbundled/definition28.cjs +4 -3
  216. package/unbundled/definition28.js +4 -3
  217. package/unbundled/definition29.cjs +5 -168
  218. package/unbundled/definition29.js +11 -162
  219. package/unbundled/definition30.cjs +2 -63
  220. package/unbundled/definition30.js +5 -54
  221. package/unbundled/definition31.cjs +5 -3
  222. package/unbundled/definition31.js +5 -3
  223. package/unbundled/definition32.cjs +2 -1
  224. package/unbundled/definition32.js +2 -1
  225. package/unbundled/definition35.cjs +2 -1
  226. package/unbundled/definition35.js +2 -1
  227. package/unbundled/definition37.cjs +1 -1
  228. package/unbundled/definition37.js +1 -1
  229. package/unbundled/definition39.cjs +1 -1
  230. package/unbundled/definition39.js +1 -1
  231. package/unbundled/definition40.cjs +4 -2
  232. package/unbundled/definition40.js +4 -2
  233. package/unbundled/definition41.cjs +11 -6
  234. package/unbundled/definition41.js +11 -6
  235. package/unbundled/definition42.cjs +5 -4
  236. package/unbundled/definition42.js +5 -4
  237. package/unbundled/definition44.cjs +3 -2
  238. package/unbundled/definition44.js +3 -2
  239. package/unbundled/definition45.cjs +2 -2
  240. package/unbundled/definition45.js +2 -2
  241. package/unbundled/definition49.cjs +583 -79
  242. package/unbundled/definition49.js +579 -76
  243. package/unbundled/definition50.cjs +71 -33
  244. package/unbundled/definition50.js +67 -29
  245. package/unbundled/definition51.cjs +54 -23
  246. package/unbundled/definition51.js +52 -18
  247. package/unbundled/definition52.cjs +23 -39
  248. package/unbundled/definition52.js +17 -36
  249. package/unbundled/definition53.cjs +29 -314
  250. package/unbundled/definition53.js +27 -312
  251. package/unbundled/definition54.cjs +302 -195
  252. package/unbundled/definition54.js +298 -191
  253. package/unbundled/definition55.cjs +210 -40
  254. package/unbundled/definition55.js +206 -36
  255. package/unbundled/definition56.cjs +42 -266
  256. package/unbundled/definition56.js +38 -262
  257. package/unbundled/definition57.cjs +270 -50
  258. package/unbundled/definition57.js +267 -46
  259. package/unbundled/definition58.cjs +48 -146
  260. package/unbundled/definition58.js +47 -143
  261. package/unbundled/definition59.cjs +127 -225
  262. package/unbundled/definition59.js +122 -223
  263. package/unbundled/definition6.cjs +2 -1
  264. package/unbundled/definition6.js +2 -1
  265. package/unbundled/definition60.cjs +199 -418
  266. package/unbundled/definition60.js +196 -415
  267. package/unbundled/definition61.cjs +442 -3738
  268. package/unbundled/definition61.js +432 -3565
  269. package/unbundled/definition62.cjs +3717 -730
  270. package/unbundled/definition62.js +3544 -720
  271. package/unbundled/definition63.cjs +770 -97
  272. package/unbundled/definition63.js +767 -94
  273. package/unbundled/definition64.cjs +100 -999
  274. package/unbundled/definition64.js +98 -994
  275. package/unbundled/definition65.cjs +991 -93
  276. package/unbundled/definition65.js +985 -90
  277. package/unbundled/definition66.cjs +109 -73
  278. package/unbundled/definition66.js +105 -63
  279. package/unbundled/definition67.cjs +69 -155
  280. package/unbundled/definition67.js +60 -152
  281. package/unbundled/definition68.cjs +155 -119
  282. package/unbundled/definition68.js +151 -115
  283. package/unbundled/definition69.cjs +124 -49
  284. package/unbundled/definition69.js +120 -45
  285. package/unbundled/definition70.cjs +51 -85
  286. package/unbundled/definition70.js +50 -81
  287. package/unbundled/definition71.cjs +91 -19
  288. package/unbundled/definition71.js +86 -14
  289. package/unbundled/definition72.cjs +20 -87
  290. package/unbundled/definition72.js +14 -84
  291. package/unbundled/definition73.cjs +77 -294
  292. package/unbundled/definition73.js +72 -217
  293. package/unbundled/definition74.cjs +289 -311
  294. package/unbundled/definition74.js +219 -306
  295. package/unbundled/definition75.cjs +326 -26
  296. package/unbundled/definition75.js +317 -23
  297. package/unbundled/definition76.cjs +27 -122
  298. package/unbundled/definition76.js +22 -118
  299. package/unbundled/definition77.cjs +105 -232
  300. package/unbundled/definition77.js +101 -228
  301. package/unbundled/definition78.cjs +259 -26
  302. package/unbundled/definition78.js +249 -23
  303. package/unbundled/definition79.cjs +29 -148
  304. package/unbundled/definition79.js +27 -133
  305. package/unbundled/definition80.cjs +118 -173
  306. package/unbundled/definition80.js +109 -169
  307. package/unbundled/definition81.cjs +181 -477
  308. package/unbundled/definition81.js +176 -471
  309. package/unbundled/definition82.cjs +517 -0
  310. package/unbundled/definition82.js +497 -0
  311. package/unbundled/extractOptions.cjs +5 -5
  312. package/unbundled/extractOptions.js +2 -2
  313. package/unbundled/icon.cjs +67 -0
  314. package/unbundled/icon.js +61 -0
  315. package/unbundled/linkable.cjs +1 -1
  316. package/unbundled/linkable.js +1 -1
  317. package/unbundled/listbox.cjs +8 -3
  318. package/unbundled/listbox.js +7 -2
  319. package/unbundled/mixins.cjs +2 -1
  320. package/unbundled/mixins.js +2 -1
  321. package/unbundled/optgroup.cjs +66 -0
  322. package/unbundled/optgroup.js +54 -0
  323. package/unbundled/option.cjs +176 -0
  324. package/unbundled/option.js +164 -0
  325. package/unbundled/time-selection-picker.template.cjs +1 -1
  326. package/unbundled/time-selection-picker.template.js +1 -1
  327. package/unbundled/vivid-element.cjs +1 -1
  328. package/unbundled/vivid-element.js +1 -1
  329. package/video-player/definition.cjs +1 -1
  330. package/video-player/definition.js +1 -1
  331. package/vivid.api.json +336 -193
@@ -1,162 +1,11 @@
1
- import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
2
- import { r as Icon, t as iconDefinition } from "./definition.js";
3
- import { t as __decorate } from "./decorate.js";
4
- import { a as affixIconTemplateFactory, i as IconWrapper, n as AffixIconWithTrailing } from "./affix.js";
5
- import { n as applyHostSemantics, t as HostSemantics } from "./host-semantics.js";
6
- import { attr, html, observable, volatile, when } from "@microsoft/fast-element";
7
- import { classNames, isHTMLElement } from "@microsoft/fast-web-utilities";
8
- //#region src/lib/option/option.ts
9
- /**
10
- * Determines if the element is a {@link (ListboxOption:class)}
11
- *
12
- * @param element - the element to test.
13
- */
14
- function isListboxOption(el) {
15
- return isHTMLElement(el) && (el.getAttribute("role") === "option" || el instanceof HTMLOptionElement || el instanceof ListboxOption);
16
- }
17
- /**
18
- * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option }.
19
- *
20
- * @public
21
- * @component option
22
- * @slot icon - The preferred way to add an icon to the component.
23
- * @slot tag-icon - Icon to be displayed in the tag when selected inside of Searchable Select.
24
- * @slot trailing-meta - For additional elements at the end of the Option.
25
- * @testAction click click #locator
26
- */
27
- var ListboxOption = class extends HostSemantics(AffixIconWithTrailing(VividElement)) {
28
- defaultSelectedChanged() {
29
- if (!this.dirtySelected) {
30
- this.selected = this.defaultSelected;
31
- if (this.proxy instanceof HTMLOptionElement) this.proxy.selected = this.defaultSelected;
32
- }
33
- if (this.proxy instanceof HTMLOptionElement) this.proxy.defaultSelected = this.defaultSelected;
34
- }
35
- disabledChanged() {
36
- /* v8 ignore if -- @preserve */
37
- if (this.proxy instanceof HTMLOptionElement) this.proxy.disabled = this.disabled;
38
- }
39
- /** @deprecated Use `defaultSelected` instead. */
40
- get selectedAttribute() {
41
- return this.defaultSelected;
42
- }
43
- set selectedAttribute(value) {
44
- this.defaultSelected = value;
45
- }
46
- selectedChanged() {
47
- if (!this.dirtySelected) this.dirtySelected = true;
48
- if (this.proxy instanceof HTMLOptionElement) this.proxy.selected = this.selected;
49
- }
50
- valueChanged() {
51
- if (typeof this.value !== "string") {
52
- this.value = "";
53
- return;
54
- }
55
- if (this.proxy instanceof HTMLOptionElement) this.proxy.value = this.value;
56
- }
57
- get label() {
58
- return this._label ?? this.text;
59
- }
60
- set label(value) {
61
- this._label = value;
62
- }
63
- set text(value) {
64
- this._text = value;
65
- }
66
- get text() {
67
- return this._text ?? "";
68
- }
69
- /**
70
- * Provides an accessible name for use by parent components.
71
- * Note: Does not implement full accessible name computation, e.g. slotted content is missed.
72
- * @internal
73
- */
74
- _getAccessibleName() {
75
- return this.ariaLabel || `${this.text}${this.textSecondary ? ` ${this.textSecondary}` : ""}`;
76
- }
77
- get form() {
78
- return null;
79
- }
80
- /** @internal */
81
- get _hasMatchedText() {
82
- return Boolean(this.matchedText ?? this._vvdSearchText);
83
- }
84
- /**
85
- * From is inclusive, to is exclusive.
86
- * @internal
87
- */
88
- get _matchedRange() {
89
- const matchedText = this.matchedText ?? this._vvdSearchText;
90
- if (matchedText) {
91
- const matchIndex = this.text.toLowerCase().indexOf(matchedText.toLowerCase());
92
- return matchIndex === -1 ? {
93
- from: 0,
94
- to: 0
95
- } : {
96
- from: matchIndex,
97
- to: matchIndex + matchedText.length
98
- };
99
- }
100
- return {
101
- from: 0,
102
- to: 0
103
- };
104
- }
105
- constructor(text, value, defaultSelected, selected) {
106
- super();
107
- this.defaultSelected = false;
108
- this.dirtySelected = false;
109
- this.value = "";
110
- this._highlighted = false;
111
- this._displayCheckmark = false;
112
- this._vvdSearchText = "";
113
- this._isNotMatching = false;
114
- if (text) this.text = text;
115
- if (value) this.value = value;
116
- if (defaultSelected) this.defaultSelected = defaultSelected;
117
- if (selected) this.selected = selected;
118
- this.proxy = new Option(this.text, this.value, this.defaultSelected, this.selected);
119
- this.proxy.disabled = this.disabled;
120
- }
121
- /** @internal */
122
- connectedCallback() {
123
- super.connectedCallback();
124
- if (!this.dirtySelected) {
125
- this.selected = this.defaultSelected;
126
- this.dirtySelected = false;
127
- }
128
- }
129
- };
130
- __decorate([attr({ converter: {
131
- fromView: (value) => {
132
- if (value === true || value === "true") return true;
133
- if (value === false || value === "false") return false;
134
- },
135
- toView: (value) => value
136
- } })], ListboxOption.prototype, "checked", void 0);
137
- __decorate([attr({
138
- attribute: "selected",
139
- mode: "boolean"
140
- })], ListboxOption.prototype, "defaultSelected", void 0);
141
- __decorate([attr({ mode: "boolean" })], ListboxOption.prototype, "disabled", void 0);
142
- __decorate([attr({
143
- attribute: "current-selected",
144
- mode: "boolean"
145
- })], ListboxOption.prototype, "selected", void 0);
146
- __decorate([attr({ attribute: "value" })], ListboxOption.prototype, "value", void 0);
147
- __decorate([attr({ attribute: "label" })], ListboxOption.prototype, "_label", void 0);
148
- __decorate([attr({ attribute: "text" })], ListboxOption.prototype, "_text", void 0);
149
- __decorate([attr({ attribute: "text-secondary" })], ListboxOption.prototype, "textSecondary", void 0);
150
- __decorate([observable], ListboxOption.prototype, "_highlighted", void 0);
151
- __decorate([observable], ListboxOption.prototype, "_displayCheckmark", void 0);
152
- __decorate([attr({ attribute: "matched-text" })], ListboxOption.prototype, "matchedText", void 0);
153
- __decorate([observable], ListboxOption.prototype, "_vvdSearchText", void 0);
154
- __decorate([volatile], ListboxOption.prototype, "_hasMatchedText", null);
155
- __decorate([observable], ListboxOption.prototype, "_isNotMatching", void 0);
156
- __decorate([volatile], ListboxOption.prototype, "_matchedRange", null);
157
- __decorate([attr], ListboxOption.prototype, "connotation", void 0);
158
- __decorate([attr({ attribute: "tag-connotation" })], ListboxOption.prototype, "tagConnotation", void 0);
159
- //#endregion
1
+ import { d as createRegisterFunction, u as defineVividComponent } from "./vivid-element.js";
2
+ import { t as iconDefinition } from "./definition.js";
3
+ import { t as Icon } from "./icon.js";
4
+ import { a as affixIconTemplateFactory, i as IconWrapper } from "./affix.js";
5
+ import { n as applyHostSemantics } from "./host-semantics.js";
6
+ import { t as ListboxOption } from "./option.js";
7
+ import { html, when } from "@microsoft/fast-element";
8
+ import { classNames } from "@microsoft/fast-web-utilities";
160
9
  //#region src/lib/option/option.template.ts
161
10
  function text() {
162
11
  return html`${when((x) => x.text || x.textSecondary, html`<span class="text">
@@ -182,7 +31,7 @@ var ListboxOptionTemplate = (context) => {
182
31
  style="${(x) => x._isNotMatching ? "display: none" : ""}"
183
32
  >
184
33
  <div
185
- class="${(x) => classNames("base", [`connotation-${x.connotation}`, Boolean(x.connotation)], ["disabled", x.disabled], ["selected", x.selected], ["hover", x._highlighted], ["highlighted", x._highlighted], ["active", Boolean(x.checked)], ["icon", Boolean(x.icon)], ["two-lines", Boolean(x.text?.length) && Boolean(x.textSecondary?.length)])}"
34
+ class="${(x) => classNames("base", [`connotation-${x.connotation}`, Boolean(x.connotation)], ["disabled", x.disabled], ["selected", x.selected], ["highlighted", x._highlighted], ["active", Boolean(x.checked)], ["icon", Boolean(x.icon)], ["two-lines", Boolean(x.text?.length) && Boolean(x.textSecondary?.length)])}"
186
35
  >
187
36
  ${(x) => affixIconTemplate(x.icon, IconWrapper.Slot)} ${text()}
188
37
  <slot name="trailing-meta"></slot>
@@ -194,7 +43,7 @@ var ListboxOptionTemplate = (context) => {
194
43
  //#endregion
195
44
  //#region src/lib/option/definition.ts
196
45
  /** @internal */
197
- var listboxOptionDefinition = defineVividComponent("option", ListboxOption, ListboxOptionTemplate, [iconDefinition], { styles: ":host([disabled]){cursor:not-allowed}.base.connotation-cta{--_connotation-color-primary:var(--vvd-option-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-option-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-option-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-firm:var(--vvd-option-cta-firm,var(--vvd-color-cta-600));--_connotation-color-faint:var(--vvd-option-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-option-cta-soft,var(--vvd-color-cta-100));--_connotation-color-pale:var(--vvd-option-cta-pale,var(--vvd-color-cta-300));--_connotation-color-dim:var(--vvd-option-cta-dim,var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-option-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-option-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-option-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-option-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-option-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-option-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-pale:var(--vvd-option-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-dim:var(--vvd-option-accent-dim,var(--vvd-color-neutral-200))}.base{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}.base:disabled,.base.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.base:active:where(:not(.disabled,:disabled)),.base.active:where(:not(.disabled,:disabled)),.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}@media (hover:hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}.base{box-sizing:border-box;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_option-appearance-color-text,var(--_appearance-color-text));font:var(--vvd-typography-base);align-items:center;gap:var(--_option-gap);hyphens:auto;inline-size:100%;min-block-size:var(--_option-min-block-size);padding-inline:var(--_option-padding-inline);vertical-align:middle;word-break:break-word;--_option-min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));--_option-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);--_option-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);border-radius:8px;display:flex}.base:not(.two-lines){--_option-gap:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4)) / 3);padding-block:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 4)}.base.two-lines{gap:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);padding-block:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2)}.base{user-select:none}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}:host([scale=condensed]) .base{--_option-min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8));--_option-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2);--_option-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5)}:host([scale=condensed]) .base:not(.two-lines){--_option-gap:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 5);padding-block:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4)) / 6)}:host([scale=condensed]) .base.two-lines{gap:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4)) / 3);padding-block:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8)) / 4)}.base.active,.base.highlighted{--focus-stroke-gap-color:transparent;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))}:host([current-selected]) .base:not(.highlighted,.active){--focus-stroke-gap-color:transparent;box-shadow:var(--_suppressable-focus-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:var(--_suppressable-focus-outline,1px solid var(--focus-stroke-color,var(--vvd-color-cta-500)));outline-offset:var(--_suppressable-focus-outline-offset,calc(-1px - var(--focus-inset,0px)))}.base.hidden{display:none}.text{font:var(--vvd-typography-base);flex-direction:column;gap:4px;margin-inline-end:auto;display:flex}.text-primary,.text-secondary{font:var(--vvd-typography-base);display:block}.text-primary{font:var(--vvd-typography-base)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}.match{color:var(--vvd-color-cta-600);font:var(--vvd-typography-base-bold)}slot[name=icon]{font-size:var(--_option-icon-size);line-height:1}.base:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}.checkmark{font-size:var(--_option-icon-size)}" });
46
+ var listboxOptionDefinition = defineVividComponent("option", ListboxOption, ListboxOptionTemplate, [iconDefinition], { styles: ":host([disabled]){cursor:not-allowed}.base.connotation-cta{--_connotation-color-primary:var(--vvd-option-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-option-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-option-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-firm:var(--vvd-option-cta-firm,var(--vvd-color-cta-600));--_connotation-color-faint:var(--vvd-option-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-option-cta-soft,var(--vvd-color-cta-100));--_connotation-color-pale:var(--vvd-option-cta-pale,var(--vvd-color-cta-300));--_connotation-color-dim:var(--vvd-option-cta-dim,var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-option-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-option-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-option-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-option-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-option-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-option-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-pale:var(--vvd-option-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-dim:var(--vvd-option-accent-dim,var(--vvd-color-neutral-200))}.base{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}.base:disabled,.base.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.base:active:where(:not(.disabled,:disabled)),.base.active:where(:not(.disabled,:disabled)),.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}@media (hover:hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}.base{box-sizing:border-box;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_option-appearance-color-text,var(--_appearance-color-text));font:var(--vvd-typography-base);align-items:center;gap:var(--_option-gap);hyphens:auto;inline-size:100%;min-block-size:var(--_option-min-block-size);padding-inline:var(--_option-padding-inline);vertical-align:middle;word-break:break-word;--_option-min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));--_option-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);--_option-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);border-radius:8px;display:flex}.base:not(.two-lines){--_option-gap:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4)) / 3);padding-block:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 4)}.base.two-lines{gap:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);padding-block:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2)}.base{user-select:none}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}:host([scale=condensed]) .base{--_option-min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8));--_option-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2);--_option-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5)}:host([scale=condensed]) .base:not(.two-lines){--_option-gap:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 5);padding-block:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4)) / 6)}:host([scale=condensed]) .base.two-lines{gap:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4)) / 3);padding-block:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8)) / 4)}.base.highlighted{--focus-stroke-gap-color:transparent;box-shadow:var(--_suppressable-focus-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:var(--_suppressable-focus-outline,1px solid var(--focus-stroke-color,var(--vvd-color-cta-500)));outline-offset:var(--_suppressable-focus-outline-offset,calc(-1px - var(--focus-inset,0px)))}.base.hidden{display:none}.text{font:var(--vvd-typography-base);flex-direction:column;gap:4px;margin-inline-end:auto;display:flex}.text-primary,.text-secondary{font:var(--vvd-typography-base);display:block}.text-primary{font:var(--vvd-typography-base)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}.match{color:var(--vvd-color-cta-600);font:var(--vvd-typography-base-bold)}slot[name=icon]{font-size:var(--_option-icon-size);line-height:1}.base:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}.checkmark{font-size:var(--_option-icon-size)}" });
198
47
  /**
199
48
  * Registers the listbox-option elements with the design system.
200
49
  *
@@ -202,4 +51,4 @@ var listboxOptionDefinition = defineVividComponent("option", ListboxOption, List
202
51
  */
203
52
  var registerOption = createRegisterFunction(listboxOptionDefinition);
204
53
  //#endregion
205
- export { isListboxOption as i, registerOption as n, ListboxOption as r, listboxOptionDefinition as t };
54
+ export { registerOption as n, listboxOptionDefinition as t };
@@ -1,57 +1,8 @@
1
1
  require("./chunk.cjs");
2
2
  const require_vivid_element = require("./vivid-element.cjs");
3
- const require_decorate = require("./decorate.cjs");
4
3
  const require_host_semantics = require("./host-semantics.cjs");
4
+ const require_optgroup = require("./optgroup.cjs");
5
5
  let _microsoft_fast_element = require("@microsoft/fast-element");
6
- let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
7
- //#region src/lib/optgroup/optgroup.ts
8
- /**
9
- * Determines if the element is an {@link Optgroup}
10
- *
11
- * @param element - the element to test.
12
- */
13
- function isOptgroup(el) {
14
- return el instanceof Optgroup;
15
- }
16
- /**
17
- * Groups options within Select, Searchable Select, or Combobox components
18
- *
19
- * @public
20
- * @component optgroup
21
- * @slot - Default slot for options.
22
- * @slot label - Label for the option group.
23
- */
24
- var Optgroup = class extends require_host_semantics.HostSemantics(require_vivid_element.VividElement) {
25
- constructor(..._args) {
26
- super(..._args);
27
- this._computedLabelledBy = null;
28
- }
29
- /** @internal */
30
- _labelSlottedContentChanged() {
31
- const elements = this._labelSlottedContent.filter((node) => node instanceof Element);
32
- const ids = [];
33
- for (const el of elements) {
34
- if (!el.id) el.id = (0, _microsoft_fast_web_utilities.uniqueId)("vvd-optgroup-label-");
35
- ids.push(el.id);
36
- }
37
- this._computedLabelledBy = ids.join(" ");
38
- }
39
- /**
40
- * Handles changes to the default slot.
41
- * Dispatches a bubbling, composed event so that parent components
42
- * (Select, Combobox, Searchable Select) can re-process their options.
43
- * @internal
44
- */
45
- _onSlotChange() {
46
- this.$emit("optgroup-change", void 0, {
47
- bubbles: true,
48
- composed: true
49
- });
50
- }
51
- };
52
- require_decorate.__decorate([_microsoft_fast_element.observable], Optgroup.prototype, "_labelSlottedContent", void 0);
53
- require_decorate.__decorate([_microsoft_fast_element.observable], Optgroup.prototype, "_computedLabelledBy", void 0);
54
- //#endregion
55
6
  //#region src/lib/optgroup/optgroup.template.ts
56
7
  var OptgroupTemplate = () => {
57
8
  return _microsoft_fast_element.html`
@@ -77,7 +28,7 @@ var OptgroupTemplate = () => {
77
28
  //#endregion
78
29
  //#region src/lib/optgroup/definition.ts
79
30
  /** @internal */
80
- var optgroupDefinition = require_vivid_element.defineVividComponent("optgroup", Optgroup, OptgroupTemplate, [], { styles: ":host{display:block}.base{flex-direction:column;display:flex}slot[name=label]{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base-condensed-bold);user-select:none;padding-block:8px 4px;padding-inline:8px;display:flex}.options{flex-direction:column;gap:2px;display:flex}" });
31
+ var optgroupDefinition = require_vivid_element.defineVividComponent("optgroup", require_optgroup.Optgroup, OptgroupTemplate, [], { styles: ":host{display:block}.base{flex-direction:column;display:flex}slot[name=label]{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base-condensed-bold);user-select:none;padding-block:8px 4px;padding-inline:8px;display:flex}.options{flex-direction:column;gap:2px;display:flex}" });
81
32
  /**
82
33
  * Registers the optgroup element with the design system.
83
34
  *
@@ -85,18 +36,6 @@ var optgroupDefinition = require_vivid_element.defineVividComponent("optgroup",
85
36
  */
86
37
  var registerOptgroup = require_vivid_element.createRegisterFunction(optgroupDefinition);
87
38
  //#endregion
88
- Object.defineProperty(exports, "Optgroup", {
89
- enumerable: true,
90
- get: function() {
91
- return Optgroup;
92
- }
93
- });
94
- Object.defineProperty(exports, "isOptgroup", {
95
- enumerable: true,
96
- get: function() {
97
- return isOptgroup;
98
- }
99
- });
100
39
  Object.defineProperty(exports, "optgroupDefinition", {
101
40
  enumerable: true,
102
41
  get: function() {
@@ -1,56 +1,7 @@
1
- import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
2
- import { t as __decorate } from "./decorate.js";
3
- import { n as applyHostSemantics, t as HostSemantics } from "./host-semantics.js";
4
- import { html, observable, slotted } from "@microsoft/fast-element";
5
- import { uniqueId } from "@microsoft/fast-web-utilities";
6
- //#region src/lib/optgroup/optgroup.ts
7
- /**
8
- * Determines if the element is an {@link Optgroup}
9
- *
10
- * @param element - the element to test.
11
- */
12
- function isOptgroup(el) {
13
- return el instanceof Optgroup;
14
- }
15
- /**
16
- * Groups options within Select, Searchable Select, or Combobox components
17
- *
18
- * @public
19
- * @component optgroup
20
- * @slot - Default slot for options.
21
- * @slot label - Label for the option group.
22
- */
23
- var Optgroup = class extends HostSemantics(VividElement) {
24
- constructor(..._args) {
25
- super(..._args);
26
- this._computedLabelledBy = null;
27
- }
28
- /** @internal */
29
- _labelSlottedContentChanged() {
30
- const elements = this._labelSlottedContent.filter((node) => node instanceof Element);
31
- const ids = [];
32
- for (const el of elements) {
33
- if (!el.id) el.id = uniqueId("vvd-optgroup-label-");
34
- ids.push(el.id);
35
- }
36
- this._computedLabelledBy = ids.join(" ");
37
- }
38
- /**
39
- * Handles changes to the default slot.
40
- * Dispatches a bubbling, composed event so that parent components
41
- * (Select, Combobox, Searchable Select) can re-process their options.
42
- * @internal
43
- */
44
- _onSlotChange() {
45
- this.$emit("optgroup-change", void 0, {
46
- bubbles: true,
47
- composed: true
48
- });
49
- }
50
- };
51
- __decorate([observable], Optgroup.prototype, "_labelSlottedContent", void 0);
52
- __decorate([observable], Optgroup.prototype, "_computedLabelledBy", void 0);
53
- //#endregion
1
+ import { d as createRegisterFunction, u as defineVividComponent } from "./vivid-element.js";
2
+ import { n as applyHostSemantics } from "./host-semantics.js";
3
+ import { t as Optgroup } from "./optgroup.js";
4
+ import { html, slotted } from "@microsoft/fast-element";
54
5
  //#region src/lib/optgroup/optgroup.template.ts
55
6
  var OptgroupTemplate = () => {
56
7
  return html`
@@ -84,4 +35,4 @@ var optgroupDefinition = defineVividComponent("optgroup", Optgroup, OptgroupTemp
84
35
  */
85
36
  var registerOptgroup = createRegisterFunction(optgroupDefinition);
86
37
  //#endregion
87
- export { isOptgroup as i, registerOptgroup as n, Optgroup as r, optgroupDefinition as t };
38
+ export { registerOptgroup as n, optgroupDefinition as t };
@@ -13,7 +13,9 @@ const require_with_error_text = require("./with-error-text.cjs");
13
13
  const require_with_success_text = require("./with-success-text.cjs");
14
14
  const require_with_contextual_help = require("./with-contextual-help.cjs");
15
15
  const require_text_field = require("./text-field.cjs");
16
+ const require_option = require("./option.cjs");
16
17
  const require_definition$3 = require("./definition29.cjs");
18
+ const require_optgroup = require("./optgroup.cjs");
17
19
  const require_definition$4 = require("./definition30.cjs");
18
20
  const require_listbox = require("./listbox.cjs");
19
21
  let _microsoft_fast_element = require("@microsoft/fast-element");
@@ -64,7 +66,7 @@ var Combobox = class extends require_with_contextual_help.WithContextualHelp(req
64
66
  this.selectedIndex = this._newDefaultSelectedIndex([], this.options, -1) ?? -1;
65
67
  this.value = this.firstSelectedOption?.text || "";
66
68
  }
67
- /** {@inheritDoc (FormAssociated:interface).validate} */
69
+ /** Validates the element against its constraints (e.g. `required`) and updates its validity state. */
68
70
  validate() {
69
71
  super.validate(this.control);
70
72
  }
@@ -151,8 +153,8 @@ var Combobox = class extends require_with_contextual_help.WithContextualHelp(req
151
153
  this._options.forEach((o) => {
152
154
  o.hidden = !this.filteredOptions.includes(o);
153
155
  });
154
- for (const el of Array.from(this.children)) if (require_definition$4.isOptgroup(el)) {
155
- const hasVisibleOption = Array.from(el.children).some((child) => require_definition$3.isListboxOption(child) && !child.hidden);
156
+ for (const el of Array.from(this.children)) if (require_optgroup.isOptgroup(el)) {
157
+ const hasVisibleOption = Array.from(el.children).some((child) => require_option.isListboxOption(child) && !child.hidden);
156
158
  el.style.display = hasVisibleOption ? "" : "none";
157
159
  }
158
160
  }
@@ -12,8 +12,10 @@ import { t as WithErrorText } from "./with-error-text.js";
12
12
  import { t as WithSuccessText } from "./with-success-text.js";
13
13
  import { t as WithContextualHelp } from "./with-contextual-help.js";
14
14
  import { t as text_field_default } from "./text-field.js";
15
- import { i as isListboxOption, t as listboxOptionDefinition } from "./definition29.js";
16
- import { i as isOptgroup, t as optgroupDefinition } from "./definition30.js";
15
+ import { n as isListboxOption } from "./option.js";
16
+ import { t as listboxOptionDefinition } from "./definition29.js";
17
+ import { n as isOptgroup } from "./optgroup.js";
18
+ import { t as optgroupDefinition } from "./definition30.js";
17
19
  import { t as Listbox } from "./listbox.js";
18
20
  import { Observable, attr, html, observable, ref, slotted, when } from "@microsoft/fast-element";
19
21
  import { classNames, limit, uniqueId } from "@microsoft/fast-web-utilities";
@@ -63,7 +65,7 @@ var Combobox = class extends WithContextualHelp(WithFeedback(WithErrorText(WithS
63
65
  this.selectedIndex = this._newDefaultSelectedIndex([], this.options, -1) ?? -1;
64
66
  this.value = this.firstSelectedOption?.text || "";
65
67
  }
66
- /** {@inheritDoc (FormAssociated:interface).validate} */
68
+ /** Validates the element against its constraints (e.g. `required`) and updates its validity state. */
67
69
  validate() {
68
70
  super.validate(this.control);
69
71
  }
@@ -2,6 +2,7 @@ require("./chunk.cjs");
2
2
  const require_vivid_element = require("./vivid-element.cjs");
3
3
  const require_definition = require("./definition.cjs");
4
4
  const require_decorate = require("./decorate.cjs");
5
+ const require_icon = require("./icon.cjs");
5
6
  const require_utils = require("./utils.cjs");
6
7
  let _microsoft_fast_element = require("@microsoft/fast-element");
7
8
  //#region src/lib/country/country.scss?inline
@@ -31,7 +32,7 @@ require_decorate.__decorate([_microsoft_fast_element.attr], Country.prototype, "
31
32
  //#endregion
32
33
  //#region src/lib/country/country.template.ts
33
34
  var CountryTemplate = (context) => {
34
- const iconTag = context.tagFor(require_definition.Icon);
35
+ const iconTag = context.tagFor(require_icon.Icon);
35
36
  return _microsoft_fast_element.html`
36
37
  <div class="base">
37
38
  <slot name="icon" class="icon">
@@ -1,6 +1,7 @@
1
1
  import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
2
- import { r as Icon, t as iconDefinition } from "./definition.js";
2
+ import { t as iconDefinition } from "./definition.js";
3
3
  import { t as __decorate } from "./decorate.js";
4
+ import { t as Icon } from "./icon.js";
4
5
  import { t as getFlagIconName } from "./utils.js";
5
6
  import { attr, html, when } from "@microsoft/fast-element";
6
7
  //#region src/lib/country/country.scss?inline
@@ -2,6 +2,7 @@ require("./chunk.cjs");
2
2
  const require_vivid_element = require("./vivid-element.cjs");
3
3
  const require_definition = require("./definition.cjs");
4
4
  const require_decorate = require("./decorate.cjs");
5
+ const require_icon = require("./icon.cjs");
5
6
  const require_localized = require("./localized.cjs");
6
7
  const require_key_codes = require("./key-codes.cjs");
7
8
  const require_host_semantics = require("./host-semantics.cjs");
@@ -1868,7 +1869,7 @@ function calculateAriaSelectedValue(x) {
1868
1869
  return null;
1869
1870
  }
1870
1871
  function renderSortIcons(c) {
1871
- const iconTag = c.tagFor(require_definition.Icon);
1872
+ const iconTag = c.tagFor(require_icon.Icon);
1872
1873
  return _microsoft_fast_element.html`
1873
1874
  ${(0, _microsoft_fast_element.when)(shouldShowSortIcons, _microsoft_fast_element.html`
1874
1875
  <${iconTag} class="header-icon" name="${getSortIcon}"></${iconTag}>
@@ -1,6 +1,7 @@
1
1
  import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
2
- import { r as Icon, t as iconDefinition } from "./definition.js";
2
+ import { t as iconDefinition } from "./definition.js";
3
3
  import { t as __decorate } from "./decorate.js";
4
+ import { t as Icon } from "./icon.js";
4
5
  import { t as Localized } from "./localized.js";
5
6
  import { n as keyArrowRight$1, t as keyArrowLeft$1 } from "./key-codes.js";
6
7
  import { n as applyHostSemantics, t as HostSemantics } from "./host-semantics.js";
@@ -17,7 +17,7 @@ let _microsoft_fast_element = require("@microsoft/fast-element");
17
17
  *
18
18
  * @public
19
19
  * @component date-picker
20
- * @slot helper-text - Describes how to use the date-picker. Alternative to the `helper-text` attribute.
20
+ * @slot helper-text - Describes how to use the Date Picker. Alternative to the `helper-text` attribute.
21
21
  * @event {CustomEvent<undefined>} input - Emitted when the date is changed by the user.
22
22
  * @event {CustomEvent<undefined>} change - Emitted when the date is changed by the user.
23
23
  * @vueModel modelValue value input,@lazy:change `event.currentTarget.value`
@@ -16,7 +16,7 @@ import { volatile } from "@microsoft/fast-element";
16
16
  *
17
17
  * @public
18
18
  * @component date-picker
19
- * @slot helper-text - Describes how to use the date-picker. Alternative to the `helper-text` attribute.
19
+ * @slot helper-text - Describes how to use the Date Picker. Alternative to the `helper-text` attribute.
20
20
  * @event {CustomEvent<undefined>} input - Emitted when the date is changed by the user.
21
21
  * @event {CustomEvent<undefined>} change - Emitted when the date is changed by the user.
22
22
  * @vueModel modelValue value input,@lazy:change `event.currentTarget.value`
@@ -52,7 +52,7 @@ var ValidDateTimeFilter = {
52
52
  *
53
53
  * @public
54
54
  * @component date-time-picker
55
- * @slot helper-text - Describes how to use the date-picker. Alternative to the `helper-text` attribute.
55
+ * @slot helper-text - Describes how to use the Date Time Picker. Alternative to the `helper-text` attribute.
56
56
  * @event {CustomEvent<undefined>} input - Emitted when the date is changed by the user.
57
57
  * @event {CustomEvent<undefined>} change - Emitted when the date is changed by the user.
58
58
  * @vueModel modelValue value input,@lazy:change `event.currentTarget.value`
@@ -51,7 +51,7 @@ var ValidDateTimeFilter = {
51
51
  *
52
52
  * @public
53
53
  * @component date-time-picker
54
- * @slot helper-text - Describes how to use the date-picker. Alternative to the `helper-text` attribute.
54
+ * @slot helper-text - Describes how to use the Date Time Picker. Alternative to the `helper-text` attribute.
55
55
  * @event {CustomEvent<undefined>} input - Emitted when the date is changed by the user.
56
56
  * @event {CustomEvent<undefined>} change - Emitted when the date is changed by the user.
57
57
  * @vueModel modelValue value input,@lazy:change `event.currentTarget.value`
@@ -2,6 +2,7 @@ require("./chunk.cjs");
2
2
  const require_vivid_element = require("./vivid-element.cjs");
3
3
  const require_definition = require("./definition.cjs");
4
4
  const require_decorate = require("./decorate.cjs");
5
+ const require_icon = require("./icon.cjs");
5
6
  const require_localized = require("./localized.cjs");
6
7
  const require_definition$1 = require("./definition6.cjs");
7
8
  const require_definition$2 = require("./definition22.cjs");
@@ -54,6 +55,7 @@ var DialPad = class extends require_localized.Localized(require_vivid_element.Vi
54
55
  this._errorAnnouncement = "";
55
56
  this._forceAnnouncementToggle = false;
56
57
  }
58
+ /** @internal */
57
59
  valueChanged(_oldValue, newValue) {
58
60
  if (newValue !== void 0 && newValue !== null && this._textFieldEl && newValue !== this._textFieldEl.value) {
59
61
  this._textFieldEl.value = newValue;
@@ -116,7 +118,7 @@ var DialPad = class extends require_localized.Localized(require_vivid_element.Vi
116
118
  }
117
119
  /**
118
120
  * Moves focus into the Dial Pad. If `no-input` attribute is specified, it will be the first digit
119
- * button. Otherwise, the input field will be focused.
121
+ * button. Otherwise, the text field will be focused.
120
122
  */
121
123
  focus() {
122
124
  const digitBtns = this.shadowRoot?.querySelectorAll(".digits .digit-btn");
@@ -413,7 +415,7 @@ function renderErrorAnnouncement(visuallyHiddenTag) {
413
415
  }
414
416
  var DialPadTemplate = (context) => {
415
417
  const buttonTag = context.tagFor(require_definition$1.Button);
416
- const iconTag = context.tagFor(require_definition.Icon);
418
+ const iconTag = context.tagFor(require_icon.Icon);
417
419
  const textFieldTag = context.tagFor(require_definition$3.TextField);
418
420
  const visuallyHiddenTag = context.tagFor(require_definition$2.VisuallyHidden);
419
421
  return _microsoft_fast_element.html` <div
@@ -1,6 +1,7 @@
1
1
  import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
2
- import { r as Icon, t as iconDefinition } from "./definition.js";
2
+ import { t as iconDefinition } from "./definition.js";
3
3
  import { t as __decorate } from "./decorate.js";
4
+ import { t as Icon } from "./icon.js";
4
5
  import { t as Localized } from "./localized.js";
5
6
  import { i as Button, t as buttonDefinition } from "./definition6.js";
6
7
  import { n as visuallyHiddenDefinition, r as VisuallyHidden } from "./definition22.js";
@@ -53,6 +54,7 @@ var DialPad = class extends Localized(VividElement) {
53
54
  this._errorAnnouncement = "";
54
55
  this._forceAnnouncementToggle = false;
55
56
  }
57
+ /** @internal */
56
58
  valueChanged(_oldValue, newValue) {
57
59
  if (newValue !== void 0 && newValue !== null && this._textFieldEl && newValue !== this._textFieldEl.value) {
58
60
  this._textFieldEl.value = newValue;
@@ -115,7 +117,7 @@ var DialPad = class extends Localized(VividElement) {
115
117
  }
116
118
  /**
117
119
  * Moves focus into the Dial Pad. If `no-input` attribute is specified, it will be the first digit
118
- * button. Otherwise, the input field will be focused.
120
+ * button. Otherwise, the text field will be focused.
119
121
  */
120
122
  focus() {
121
123
  const digitBtns = this.shadowRoot?.querySelectorAll(".digits .digit-btn");
@@ -2,6 +2,7 @@ require("./chunk.cjs");
2
2
  const require_vivid_element = require("./vivid-element.cjs");
3
3
  const require_definition = require("./definition.cjs");
4
4
  const require_decorate = require("./decorate.cjs");
5
+ const require_icon = require("./icon.cjs");
5
6
  const require_delegates_aria = require("./delegates-aria.cjs");
6
7
  const require_localized = require("./localized.cjs");
7
8
  const require_definition$1 = require("./definition6.cjs");
@@ -16,11 +17,11 @@ var dialog_default = ".base{white-space:initial;box-sizing:border-box;color:var(
16
17
  /**
17
18
  * @public
18
19
  * @component dialog
19
- * @slot graphic - Use the graphic slot in order to replace the icon.
20
- * @slot body - Use the body slot in order to add custom HTML to the dialog.
21
- * @slot footer - Use the footer slot in order to add action buttons to the bottom of the dialog.
22
- * @slot main - Assign nodes to the main slot to fully override a dialog’s predefined flow and style with your own.
23
- * @slot action-items - Use the action-items slot in order to add action buttons to the bottom of the dialog.
20
+ * @slot graphic - Use the graphic slot to replace the icon.
21
+ * @slot body - Use the body slot to add custom HTML to the Dialog.
22
+ * @slot footer - Use the footer slot to add additional content beside the action items.
23
+ * @slot main - Assign nodes to the main slot to fully override a Dialog’s predefined flow and style with your own.
24
+ * @slot action-items - Use the action-items slot to add action buttons to the bottom of the Dialog.
24
25
  * @event {CustomEvent<undefined>} open - The `open` event fires when the dialog opens.
25
26
  * @event {CustomEvent<string>} close - The `close` event fires when the dialog closes (either via user interaction or via the API). It returns the return value inside the event's details property.
26
27
  * @event {CustomEvent<undefined>} cancel - The `cancel` event fires when the user requests to close the dialog. You can prevent the dialog from closing by calling `.preventDefault()` on the event.
@@ -65,6 +66,7 @@ var Dialog = class extends require_localized.Localized(require_delegates_aria.De
65
66
  }
66
67
  }
67
68
  }
69
+ /** Gets or sets the Dialog's return value, often used to indicate which button the user pressed to close it. */
68
70
  set returnValue(value) {
69
71
  /* v8 ignore else -- @preserve */
70
72
  if (this.#dialog) this.#dialog.returnValue = value;
@@ -119,13 +121,16 @@ var Dialog = class extends require_localized.Localized(require_delegates_aria.De
119
121
  cancelable: true
120
122
  })) this.open = false;
121
123
  }
124
+ /** Closes the Dialog. */
122
125
  close() {
123
126
  this.open = false;
124
127
  }
128
+ /** Opens the Dialog as non-modal. */
125
129
  show() {
126
130
  if (this._openedAsModal && !this.modal) throw new DOMException("Failed to execute 'show' on 'Dialog': The dialog is already open as a modal dialog, and therefore cannot be opened as a non-modal dialog.", "InvalidStateError");
127
131
  this.open = true;
128
132
  }
133
+ /** Opens the Dialog as modal. */
129
134
  showModal() {
130
135
  if (this.open && !this._openedAsModal) throw new DOMException("Failed to execute 'showModal' on 'Dialog': The dialog is already open as a non-modal dialog, and therefore cannot be opened as a modal dialog.", "InvalidStateError");
131
136
  this._openedAsModal = true;
@@ -220,7 +225,7 @@ function renderDismissButton(buttonTag) {
220
225
  }
221
226
  var DialogTemplate = (context) => {
222
227
  const elevationTag = context.tagFor(require_definition$2.Elevation);
223
- const iconTag = context.tagFor(require_definition.Icon);
228
+ const iconTag = context.tagFor(require_icon.Icon);
224
229
  const buttonTag = context.tagFor(require_definition$1.Button);
225
230
  return _microsoft_fast_element.html`
226
231
  <${elevationTag} dp="8" not-relative>