@vonage/vivid 5.23.1-preview.0 → 5.24.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 (746) hide show
  1. package/accordion/index.cjs +1 -1
  2. package/accordion/index.js +1 -1
  3. package/accordion-item/index.cjs +1 -1
  4. package/accordion-item/index.js +1 -1
  5. package/action-group/index.cjs +1 -1
  6. package/action-group/index.js +1 -1
  7. package/alert/definition.cjs +1 -1
  8. package/alert/definition.js +1 -1
  9. package/alert/index.cjs +7 -7
  10. package/alert/index.js +13 -14
  11. package/audio-player/definition.cjs +1 -1
  12. package/audio-player/definition.js +1 -1
  13. package/audio-player/index.cjs +19 -17
  14. package/audio-player/index.js +24 -22
  15. package/avatar/definition.cjs +1 -1
  16. package/avatar/definition.js +1 -1
  17. package/avatar/index.cjs +4 -4
  18. package/avatar/index.js +6 -6
  19. package/badge/definition.cjs +1 -1
  20. package/badge/definition.js +1 -1
  21. package/badge/index.cjs +1 -1
  22. package/badge/index.js +1 -1
  23. package/banner/definition.cjs +1 -1
  24. package/banner/definition.js +1 -1
  25. package/banner/index.cjs +3 -3
  26. package/banner/index.js +8 -8
  27. package/breadcrumb/definition.cjs +1 -1
  28. package/breadcrumb/definition.js +1 -1
  29. package/breadcrumb-item/definition.cjs +1 -1
  30. package/breadcrumb-item/definition.js +1 -1
  31. package/breadcrumb-item/index.cjs +2 -2
  32. package/breadcrumb-item/index.js +5 -5
  33. package/bundled/affix.cjs +1 -1
  34. package/bundled/affix.js +1 -1
  35. package/bundled/base-color-picker.cjs +2 -2
  36. package/bundled/base-color-picker.js +5 -5
  37. package/bundled/calendar-picker.template.cjs +1 -1
  38. package/bundled/calendar-picker.template.js +1 -1
  39. package/bundled/definition11.cjs +4 -4
  40. package/bundled/definition11.js +5 -5
  41. package/bundled/definition12.cjs +9 -7
  42. package/bundled/definition12.js +28 -26
  43. package/bundled/definition13.cjs +9 -7
  44. package/bundled/definition13.js +16 -15
  45. package/bundled/definition15.cjs +8 -7
  46. package/bundled/definition15.js +26 -24
  47. package/bundled/definition16.cjs +4 -2
  48. package/bundled/definition16.js +8 -6
  49. package/bundled/definition17.cjs +8 -6
  50. package/bundled/definition17.js +15 -14
  51. package/bundled/definition18.cjs +12 -83
  52. package/bundled/definition18.js +35 -420
  53. package/bundled/definition19.cjs +87 -5
  54. package/bundled/definition19.js +432 -14
  55. package/bundled/definition2.cjs +1 -13
  56. package/bundled/definition2.js +181 -48
  57. package/bundled/definition20.cjs +7 -35
  58. package/bundled/definition20.js +17 -170
  59. package/bundled/definition21.cjs +35 -27
  60. package/bundled/definition21.js +154 -155
  61. package/bundled/definition22.cjs +29 -4
  62. package/bundled/definition22.js +171 -17
  63. package/bundled/definition23.cjs +6 -12
  64. package/bundled/definition23.js +17 -32
  65. package/bundled/definition24.cjs +12 -39
  66. package/bundled/definition24.js +32 -67
  67. package/bundled/definition25.cjs +44 -0
  68. package/bundled/definition25.js +77 -0
  69. package/bundled/definition3.cjs +13 -1
  70. package/bundled/definition3.js +48 -181
  71. package/bundled/definition4.cjs +9 -7
  72. package/bundled/definition4.js +18 -16
  73. package/bundled/definition5.cjs +5 -5
  74. package/bundled/definition5.js +9 -9
  75. package/bundled/definition6.cjs +3 -3
  76. package/bundled/definition6.js +16 -16
  77. package/bundled/definition7.cjs +1 -1
  78. package/bundled/definition7.js +1 -1
  79. package/bundled/definition8.cjs +7 -7
  80. package/bundled/definition8.js +9 -7
  81. package/bundled/definition9.cjs +4 -4
  82. package/bundled/definition9.js +12 -12
  83. package/bundled/extractOptions.cjs +1 -0
  84. package/bundled/extractOptions.js +11 -0
  85. package/bundled/listbox.cjs +1 -1
  86. package/bundled/listbox.js +24 -11
  87. package/bundled/mixins.cjs +3 -3
  88. package/bundled/mixins.js +5 -5
  89. package/bundled/numberConverter.cjs +1 -1
  90. package/bundled/numberConverter.js +36 -1
  91. package/bundled/picker-field.template.cjs +13 -13
  92. package/bundled/picker-field.template.js +16 -16
  93. package/bundled/render-in-light-dom.cjs +1 -1
  94. package/bundled/render-in-light-dom.js +16 -19
  95. package/bundled/slider.template.cjs +8 -8
  96. package/bundled/slider.template.js +9 -9
  97. package/bundled/text-field.cjs +1 -1
  98. package/bundled/text-field.js +1 -1
  99. package/bundled/time-selection-picker.template.cjs +3 -3
  100. package/bundled/time-selection-picker.template.js +9 -9
  101. package/bundled/vivid-element.cjs +1 -1
  102. package/bundled/vivid-element.js +9 -1
  103. package/button/definition.cjs +1 -1
  104. package/button/definition.js +1 -1
  105. package/calendar/definition.cjs +1 -1
  106. package/calendar/definition.js +1 -1
  107. package/calendar/index.cjs +9 -9
  108. package/calendar/index.js +7 -7
  109. package/calendar-event/definition.cjs +1 -1
  110. package/calendar-event/definition.js +1 -1
  111. package/calendar-event/index.cjs +2 -2
  112. package/calendar-event/index.js +2 -2
  113. package/card/definition.cjs +1 -1
  114. package/card/definition.js +1 -1
  115. package/card/index.cjs +3 -3
  116. package/card/index.js +6 -6
  117. package/color-picker/index.cjs +10 -10
  118. package/color-picker/index.js +52 -52
  119. package/combobox/definition.cjs +1 -1
  120. package/combobox/definition.js +1 -1
  121. package/combobox/index.cjs +11 -8
  122. package/combobox/index.js +59 -49
  123. package/country/definition.cjs +1 -1
  124. package/country/definition.js +1 -1
  125. package/country/index.cjs +1 -1
  126. package/country/index.js +1 -1
  127. package/country-group/definition.cjs +1 -1
  128. package/country-group/definition.js +1 -1
  129. package/country-group/index.cjs +1 -1
  130. package/country-group/index.js +2 -2
  131. package/custom-elements.json +837 -1225
  132. package/data-grid/definition.cjs +1 -1
  133. package/data-grid/definition.js +1 -1
  134. package/data-grid/index.cjs +8 -6
  135. package/data-grid/index.js +22 -20
  136. package/date-picker/definition.cjs +1 -1
  137. package/date-picker/definition.js +1 -1
  138. package/date-picker/index.cjs +1 -1
  139. package/date-picker/index.js +1 -1
  140. package/date-range-picker/definition.cjs +1 -1
  141. package/date-range-picker/definition.js +1 -1
  142. package/date-range-picker/index.cjs +1 -1
  143. package/date-range-picker/index.js +1 -1
  144. package/date-time-picker/definition.cjs +1 -1
  145. package/date-time-picker/definition.js +1 -1
  146. package/date-time-picker/index.cjs +1 -1
  147. package/date-time-picker/index.js +1 -1
  148. package/dial-pad/definition.cjs +1 -1
  149. package/dial-pad/definition.js +1 -1
  150. package/dial-pad/index.cjs +25 -23
  151. package/dial-pad/index.js +127 -56
  152. package/dialog/definition.cjs +1 -1
  153. package/dialog/definition.js +1 -1
  154. package/dialog/index.cjs +14 -14
  155. package/dialog/index.js +17 -18
  156. package/divider/definition.cjs +1 -1
  157. package/divider/definition.js +1 -1
  158. package/divider/index.cjs +1 -1
  159. package/divider/index.js +1 -1
  160. package/elevation/definition.cjs +1 -1
  161. package/elevation/definition.js +1 -1
  162. package/empty-state/definition.cjs +1 -1
  163. package/empty-state/definition.js +1 -1
  164. package/empty-state/index.cjs +4 -4
  165. package/empty-state/index.js +7 -11
  166. package/fab/definition.cjs +1 -1
  167. package/fab/definition.js +1 -1
  168. package/fab/index.cjs +4 -4
  169. package/fab/index.js +9 -13
  170. package/file-picker/definition.cjs +1 -1
  171. package/file-picker/definition.js +1 -1
  172. package/file-picker/index.cjs +8 -8
  173. package/file-picker/index.js +19 -19
  174. package/flag/definition.cjs +1 -1
  175. package/flag/definition.js +1 -1
  176. package/flag/index.cjs +5 -5
  177. package/flag/index.js +8 -12
  178. package/header/definition.cjs +1 -1
  179. package/header/definition.js +1 -1
  180. package/header/index.cjs +7 -7
  181. package/header/index.js +6 -10
  182. package/icon/index.cjs +1 -1
  183. package/icon/index.js +1 -1
  184. package/index.cjs +214 -209
  185. package/index.js +67 -66
  186. package/kbd-key/definition.cjs +1 -1
  187. package/kbd-key/definition.js +1 -1
  188. package/kbd-key/index.cjs +3 -3
  189. package/kbd-key/index.js +2 -6
  190. package/kbd-shortcut/definition.cjs +1 -1
  191. package/kbd-shortcut/definition.js +1 -1
  192. package/layout/definition.cjs +1 -1
  193. package/layout/definition.js +1 -1
  194. package/layout/index.cjs +3 -1
  195. package/layout/index.js +3 -1
  196. package/lib/accordion/variations.browser-spec.d.ts +1 -0
  197. package/lib/accordion-item/accordion-item.d.ts +2 -1
  198. package/lib/accordion-item/variations.browser-spec.d.ts +1 -0
  199. package/lib/action-group/action-group.d.ts +1 -1
  200. package/lib/action-group/variations.browser-spec.d.ts +1 -0
  201. package/lib/alert/alert.d.ts +2 -2
  202. package/lib/alert/variations.browser-spec.d.ts +1 -0
  203. package/lib/audio-player/audio-player.d.ts +1 -1
  204. package/lib/audio-player/variations.browser-spec.d.ts +1 -0
  205. package/lib/avatar/avatar.d.ts +1 -1
  206. package/lib/avatar/variations.browser-spec.d.ts +1 -0
  207. package/lib/badge/badge.d.ts +5 -5
  208. package/lib/badge/badge.template.d.ts +1 -2
  209. package/lib/badge/variations.browser-spec.d.ts +1 -0
  210. package/lib/banner/banner.d.ts +3 -3
  211. package/lib/banner/variations.browser-spec.d.ts +1 -0
  212. package/lib/breadcrumb/breadcrumb.d.ts +1 -1
  213. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  214. package/lib/breadcrumb-item/variations.browser-spec.d.ts +1 -0
  215. package/lib/button/button.d.ts +3 -3
  216. package/lib/button/variations.browser-spec.d.ts +1 -0
  217. package/lib/calendar/variations.browser-spec.d.ts +1 -0
  218. package/lib/calendar-event/calendar-event.d.ts +1 -1
  219. package/lib/calendar-event/variations.browser-spec.d.ts +1 -0
  220. package/lib/card/card.d.ts +5 -5
  221. package/lib/card/variations.browser-spec.d.ts +1 -0
  222. package/lib/checkbox/checkbox.d.ts +6 -6
  223. package/lib/checkbox/variations.browser-spec.d.ts +1 -0
  224. package/lib/color-picker/color-picker.d.ts +8 -8
  225. package/lib/color-picker/variations.browser-spec.d.ts +1 -0
  226. package/lib/combobox/combobox.d.ts +7 -7
  227. package/lib/combobox/variations.browser-spec.d.ts +1 -0
  228. package/lib/components.d.ts +1 -0
  229. package/lib/contextual-help/variations.browser-spec.d.ts +1 -0
  230. package/lib/country/variations.browser-spec.d.ts +1 -0
  231. package/lib/country-group/country-group.d.ts +2 -2
  232. package/lib/data-grid/data-grid-cell.d.ts +4 -3
  233. package/lib/data-grid/data-grid-row.d.ts +3 -2
  234. package/lib/data-grid/data-grid.options.d.ts +5 -0
  235. package/lib/data-grid/variations.browser-spec.d.ts +1 -0
  236. package/lib/date-picker/date-picker.d.ts +8 -8
  237. package/lib/date-picker/variations.browser-spec.d.ts +1 -0
  238. package/lib/date-range-picker/date-range-picker.d.ts +4 -4
  239. package/lib/date-range-picker/variations.browser-spec.d.ts +1 -0
  240. package/lib/date-time-picker/date-time-picker.d.ts +8 -8
  241. package/lib/date-time-picker/variations.browser-spec.d.ts +1 -0
  242. package/lib/dial-pad/dial-pad.d.ts +2 -1
  243. package/lib/dial-pad/variations.browser-spec.d.ts +1 -0
  244. package/lib/dialog/dialog.d.ts +2 -2
  245. package/lib/dialog/variations.browser-spec.d.ts +1 -0
  246. package/lib/divider/divider.d.ts +1 -1
  247. package/lib/divider/variations.browser-spec.d.ts +1 -0
  248. package/lib/empty-state/variations.browser-spec.d.ts +1 -0
  249. package/lib/fab/fab.d.ts +6 -6
  250. package/lib/fab/variations.browser-spec.d.ts +1 -0
  251. package/lib/file-picker/file-picker.d.ts +7 -7
  252. package/lib/file-picker/variations.browser-spec.d.ts +1 -0
  253. package/lib/flag/variations.browser-spec.d.ts +1 -0
  254. package/lib/header/header.d.ts +1 -1
  255. package/lib/header/variations.browser-spec.d.ts +1 -0
  256. package/lib/icon/variations.browser-spec.d.ts +1 -0
  257. package/lib/kbd-key/variations.browser-spec.d.ts +1 -0
  258. package/lib/kbd-shortcut/variations.browser-spec.d.ts +1 -0
  259. package/lib/layout/variations.browser-spec.d.ts +1 -0
  260. package/lib/menu/menu.d.ts +2 -2
  261. package/lib/menu/variations.browser-spec.d.ts +1 -0
  262. package/lib/menu-item/menu-item.d.ts +3 -3
  263. package/lib/menu-item/variations.browser-spec.d.ts +1 -0
  264. package/lib/nav/nav.d.ts +1 -1
  265. package/lib/nav/variations.browser-spec.d.ts +1 -0
  266. package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
  267. package/lib/nav-disclosure/variations.browser-spec.d.ts +1 -0
  268. package/lib/nav-item/nav-item.d.ts +2 -2
  269. package/lib/nav-item/variations.browser-spec.d.ts +1 -0
  270. package/lib/note/note.d.ts +1 -1
  271. package/lib/note/variations.browser-spec.d.ts +1 -0
  272. package/lib/number-field/number-field.d.ts +9 -9
  273. package/lib/number-field/variations.browser-spec.d.ts +1 -0
  274. package/lib/optgroup/definition.d.ts +3 -0
  275. package/lib/optgroup/index.d.ts +1 -0
  276. package/lib/optgroup/optgroup.d.ts +430 -0
  277. package/lib/optgroup/optgroup.template.d.ts +2 -0
  278. package/lib/optgroup/variations.browser-spec.d.ts +1 -0
  279. package/lib/option/option.d.ts +2 -2
  280. package/lib/option/variations.browser-spec.d.ts +1 -0
  281. package/lib/pagination/pagination.d.ts +1 -1
  282. package/lib/pagination/variations.browser-spec.d.ts +1 -0
  283. package/lib/popover/popover.d.ts +2 -2
  284. package/lib/popover/variations.browser-spec.d.ts +1 -0
  285. package/lib/progress/progress.d.ts +1 -1
  286. package/lib/progress/variations.browser-spec.d.ts +1 -0
  287. package/lib/progress-ring/progress-ring.d.ts +1 -1
  288. package/lib/progress-ring/variations.browser-spec.d.ts +1 -0
  289. package/lib/radio/radio.d.ts +3 -3
  290. package/lib/radio/variations.browser-spec.d.ts +1 -0
  291. package/lib/radio-group/radio-group.d.ts +1 -1
  292. package/lib/radio-group/variations.browser-spec.d.ts +1 -0
  293. package/lib/range-slider/range-slider.d.ts +3 -3
  294. package/lib/range-slider/variations.browser-spec.d.ts +1 -0
  295. package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
  296. package/lib/rich-text-editor/rte/features/internal/cursor-fix.d.ts +6 -1
  297. package/lib/rich-text-editor/variations.browser-spec.d.ts +1 -0
  298. package/lib/rich-text-view/variations.browser-spec.d.ts +1 -0
  299. package/lib/searchable-select/option-tag.d.ts +1 -1
  300. package/lib/searchable-select/searchable-select.d.ts +47 -47
  301. package/lib/searchable-select/variations.browser-spec.d.ts +1 -0
  302. package/lib/select/select.d.ts +9 -9
  303. package/lib/select/variations.browser-spec.d.ts +1 -0
  304. package/lib/selectable-box/selectable-box.d.ts +1 -1
  305. package/lib/selectable-box/variations.browser-spec.d.ts +1 -0
  306. package/lib/side-drawer/variations.browser-spec.d.ts +1 -0
  307. package/lib/simple-color-picker/simple-color-picker.d.ts +4 -4
  308. package/lib/simple-color-picker/variations.browser-spec.d.ts +1 -0
  309. package/lib/slider/slider.d.ts +3 -3
  310. package/lib/slider/variations.browser-spec.d.ts +1 -0
  311. package/lib/split-button/split-button.d.ts +3 -3
  312. package/lib/split-button/variations.browser-spec.d.ts +1 -0
  313. package/lib/status/status.d.ts +1 -1
  314. package/lib/status/variations.browser-spec.d.ts +1 -0
  315. package/lib/switch/switch.d.ts +2 -2
  316. package/lib/switch/variations.browser-spec.d.ts +1 -0
  317. package/lib/tab/tab.d.ts +15 -15
  318. package/lib/tab-panel/tab-panel.d.ts +1 -1
  319. package/lib/table/table-cell.d.ts +1 -1
  320. package/lib/table/table-header-cell.d.ts +1 -1
  321. package/lib/table/table-row.d.ts +1 -1
  322. package/lib/table/table-sorting-button.d.ts +1 -1
  323. package/lib/table/variations.browser-spec.d.ts +1 -0
  324. package/lib/tabs/variations.browser-spec.d.ts +1 -0
  325. package/lib/tag/tag.d.ts +15 -15
  326. package/lib/tag/variations.browser-spec.d.ts +1 -0
  327. package/lib/tag-group/tag-group.d.ts +1 -1
  328. package/lib/tag-name-map.d.ts +2 -1
  329. package/lib/text-area/text-area.d.ts +8 -8
  330. package/lib/text-area/text-area.template.d.ts +1 -2
  331. package/lib/text-area/variations.browser-spec.d.ts +1 -0
  332. package/lib/text-field/text-field.d.ts +9 -9
  333. package/lib/text-field/variations.browser-spec.d.ts +1 -0
  334. package/lib/time-picker/time-picker.d.ts +4 -4
  335. package/lib/time-picker/variations.browser-spec.d.ts +1 -0
  336. package/lib/toggletip/toggletip.d.ts +2 -2
  337. package/lib/toggletip/variations.browser-spec.d.ts +1 -0
  338. package/lib/tooltip/tooltip.d.ts +2 -2
  339. package/lib/tooltip/variations.browser-spec.d.ts +1 -0
  340. package/lib/tree-item/tree-item.d.ts +2 -2
  341. package/lib/tree-item/variations.browser-spec.d.ts +1 -0
  342. package/lib/tree-view/tree-view.d.ts +1 -1
  343. package/lib/video-player/variations.browser-spec.d.ts +1 -0
  344. package/lib/video-player/video-player.d.ts +1 -1
  345. package/menu/definition.cjs +1 -1
  346. package/menu/definition.js +1 -1
  347. package/menu/index.cjs +1 -1
  348. package/menu/index.js +1 -1
  349. package/menu-item/definition.cjs +1 -1
  350. package/menu-item/definition.js +1 -1
  351. package/menu-item/index.cjs +1 -1
  352. package/menu-item/index.js +1 -1
  353. package/nav/definition.cjs +1 -1
  354. package/nav/definition.js +1 -1
  355. package/nav-disclosure/definition.cjs +1 -1
  356. package/nav-disclosure/definition.js +1 -1
  357. package/nav-disclosure/index.cjs +6 -6
  358. package/nav-disclosure/index.js +11 -15
  359. package/nav-item/definition.cjs +1 -1
  360. package/nav-item/definition.js +1 -1
  361. package/nav-item/index.cjs +2 -2
  362. package/nav-item/index.js +11 -15
  363. package/note/definition.cjs +1 -1
  364. package/note/definition.js +1 -1
  365. package/note/index.cjs +5 -5
  366. package/note/index.js +10 -11
  367. package/number-field/definition.cjs +1 -1
  368. package/number-field/definition.js +1 -1
  369. package/number-field/index.cjs +12 -12
  370. package/number-field/index.js +35 -36
  371. package/optgroup/definition.cjs +5 -0
  372. package/optgroup/definition.js +2 -0
  373. package/optgroup/index.cjs +1 -0
  374. package/optgroup/index.js +4 -0
  375. package/package.json +15 -6
  376. package/pagination/definition.cjs +1 -1
  377. package/pagination/definition.js +1 -1
  378. package/platform-switch/definition.cjs +1 -1
  379. package/platform-switch/definition.js +1 -1
  380. package/popover/definition.cjs +1 -1
  381. package/popover/definition.js +1 -1
  382. package/popover/index.cjs +8 -8
  383. package/popover/index.js +11 -15
  384. package/popup/definition.cjs +1 -1
  385. package/popup/definition.js +1 -1
  386. package/progress/definition.cjs +1 -1
  387. package/progress/definition.js +1 -1
  388. package/progress/index.cjs +8 -8
  389. package/progress/index.js +9 -10
  390. package/radio/definition.cjs +1 -1
  391. package/radio/definition.js +1 -1
  392. package/radio-group/definition.cjs +1 -1
  393. package/radio-group/definition.js +1 -1
  394. package/range-slider/definition.cjs +1 -1
  395. package/range-slider/definition.js +1 -1
  396. package/range-slider/index.cjs +10 -8
  397. package/range-slider/index.js +26 -24
  398. package/rich-text-editor/definition.cjs +1 -1
  399. package/rich-text-editor/definition.js +1 -1
  400. package/rich-text-editor/index.cjs +3 -3
  401. package/rich-text-editor/index.js +762 -751
  402. package/rich-text-view/definition.cjs +1 -1
  403. package/rich-text-view/definition.js +1 -1
  404. package/searchable-select/definition.cjs +2 -1
  405. package/searchable-select/definition.js +2 -2
  406. package/searchable-select/index.cjs +30 -27
  407. package/searchable-select/index.js +104 -85
  408. package/select/definition.cjs +1 -1
  409. package/select/definition.js +1 -1
  410. package/select/index.cjs +1 -1
  411. package/select/index.js +1 -1
  412. package/selectable-box/definition.cjs +1 -1
  413. package/selectable-box/definition.js +1 -1
  414. package/selectable-box/index.cjs +8 -8
  415. package/selectable-box/index.js +8 -9
  416. package/shared/aria/delegates-aria.d.ts +1 -1
  417. package/shared/aria/host-semantics.d.ts +1 -1
  418. package/shared/color-picker/base-color-picker.d.ts +1 -1
  419. package/shared/feedback/feedback-message.d.ts +1 -1
  420. package/shared/feedback/mixins.d.ts +2 -2
  421. package/shared/foundation/button/button.d.ts +2 -2
  422. package/shared/foundation/form-associated/form-associated.d.ts +2 -2
  423. package/shared/foundation/listbox/extractOptions.d.ts +2 -0
  424. package/shared/foundation/listbox/listbox.d.ts +2 -0
  425. package/shared/patterns/affix.d.ts +2 -2
  426. package/shared/patterns/anchored.d.ts +2 -2
  427. package/shared/patterns/char-count/char-count.d.ts +1 -1
  428. package/shared/patterns/form-elements/form-element.d.ts +1 -1
  429. package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
  430. package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
  431. package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
  432. package/shared/patterns/kbd-shortcut.d.ts +1 -1
  433. package/shared/patterns/linkable.d.ts +1 -1
  434. package/shared/patterns/localized.d.ts +2 -2
  435. package/shared/patterns/trapped-focus.d.ts +1 -1
  436. package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
  437. package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
  438. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
  439. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
  440. package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
  441. package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
  442. package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
  443. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
  444. package/shared/picker-field/picker-field.d.ts +7 -7
  445. package/side-drawer/definition.cjs +1 -1
  446. package/side-drawer/definition.js +1 -1
  447. package/side-drawer/index.cjs +3 -3
  448. package/side-drawer/index.js +3 -3
  449. package/simple-color-picker/definition.cjs +1 -1
  450. package/simple-color-picker/definition.js +1 -1
  451. package/simple-color-picker/index.cjs +4 -4
  452. package/simple-color-picker/index.js +6 -6
  453. package/slider/definition.cjs +1 -1
  454. package/slider/definition.js +1 -1
  455. package/slider/index.cjs +1 -1
  456. package/slider/index.js +1 -1
  457. package/split-button/definition.cjs +1 -1
  458. package/split-button/definition.js +1 -1
  459. package/split-button/index.cjs +5 -4
  460. package/split-button/index.js +10 -9
  461. package/status/definition.cjs +1 -1
  462. package/status/definition.js +1 -1
  463. package/status/index.cjs +7 -5
  464. package/status/index.js +14 -12
  465. package/styles/core/all.css +5 -7
  466. package/styles/core/theme.css +5 -7
  467. package/styles/core/typography.css +0 -3
  468. package/styles/tokens/vivid-2-compat.css +1 -6
  469. package/switch/definition.cjs +1 -1
  470. package/switch/definition.js +1 -1
  471. package/switch/index.cjs +5 -4
  472. package/switch/index.js +14 -12
  473. package/tab/definition.cjs +1 -1
  474. package/tab/definition.js +1 -1
  475. package/tab-panel/definition.cjs +1 -1
  476. package/tab-panel/definition.js +1 -1
  477. package/table/definition.cjs +1 -1
  478. package/table/definition.js +1 -1
  479. package/table/index.cjs +10 -10
  480. package/table/index.js +12 -12
  481. package/tabs/definition.cjs +1 -1
  482. package/tabs/definition.js +1 -1
  483. package/tabs/index.cjs +6 -4
  484. package/tabs/index.js +10 -9
  485. package/tag/definition.cjs +1 -1
  486. package/tag/definition.js +1 -1
  487. package/tag/index.cjs +6 -6
  488. package/tag/index.js +8 -8
  489. package/tag-group/definition.cjs +1 -1
  490. package/tag-group/definition.js +1 -1
  491. package/text-area/definition.cjs +1 -1
  492. package/text-area/definition.js +1 -1
  493. package/text-area/index.cjs +8 -6
  494. package/text-area/index.js +20 -19
  495. package/time-picker/definition.cjs +1 -1
  496. package/time-picker/definition.js +1 -1
  497. package/tree-item/definition.cjs +1 -1
  498. package/tree-item/definition.js +1 -1
  499. package/tree-view/definition.cjs +1 -1
  500. package/tree-view/definition.js +1 -1
  501. package/unbundled/affix.cjs +2 -7
  502. package/unbundled/affix.js +2 -7
  503. package/unbundled/anchored.cjs +2 -6
  504. package/unbundled/anchored.js +2 -6
  505. package/unbundled/aria-binding-directive.cjs +1 -3
  506. package/unbundled/aria-binding-directive.js +1 -3
  507. package/unbundled/base-color-picker.cjs +18 -52
  508. package/unbundled/base-color-picker.js +18 -52
  509. package/unbundled/base-progress.cjs +4 -14
  510. package/unbundled/base-progress.js +4 -14
  511. package/unbundled/button.cjs +2 -8
  512. package/unbundled/button.js +2 -8
  513. package/unbundled/calendar-picker.template.cjs +31 -85
  514. package/unbundled/calendar-picker.template.js +30 -84
  515. package/unbundled/char-count.cjs +2 -4
  516. package/unbundled/char-count.js +2 -4
  517. package/unbundled/data-grid.options.cjs +3 -19
  518. package/unbundled/data-grid.options.js +3 -19
  519. package/unbundled/definition.cjs +3 -8
  520. package/unbundled/definition.js +3 -8
  521. package/unbundled/definition10.cjs +316 -211
  522. package/unbundled/definition10.js +313 -202
  523. package/unbundled/definition11.cjs +262 -356
  524. package/unbundled/definition11.js +248 -354
  525. package/unbundled/definition12.cjs +243 -274
  526. package/unbundled/definition12.js +241 -260
  527. package/unbundled/definition13.cjs +341 -255
  528. package/unbundled/definition13.js +338 -252
  529. package/unbundled/definition14.cjs +61 -371
  530. package/unbundled/definition14.js +57 -367
  531. package/unbundled/definition15.cjs +32 -77
  532. package/unbundled/definition15.js +28 -73
  533. package/unbundled/definition16.cjs +120 -32
  534. package/unbundled/definition16.js +117 -29
  535. package/unbundled/definition17.cjs +24 -132
  536. package/unbundled/definition17.js +24 -126
  537. package/unbundled/definition18.cjs +74 -26
  538. package/unbundled/definition18.js +67 -25
  539. package/unbundled/definition19.cjs +33 -79
  540. package/unbundled/definition19.js +32 -73
  541. package/unbundled/definition2.cjs +11 -8
  542. package/unbundled/definition2.js +11 -8
  543. package/unbundled/definition20.cjs +272 -29
  544. package/unbundled/definition20.js +264 -27
  545. package/unbundled/definition21.cjs +135 -263
  546. package/unbundled/definition21.js +133 -260
  547. package/unbundled/definition22.cjs +17 -155
  548. package/unbundled/definition22.js +13 -151
  549. package/unbundled/definition23.cjs +9 -17
  550. package/unbundled/definition23.js +10 -18
  551. package/unbundled/definition24.cjs +4 -10
  552. package/unbundled/definition24.js +4 -10
  553. package/unbundled/definition25.cjs +2 -10
  554. package/unbundled/definition25.js +2 -10
  555. package/unbundled/definition26.cjs +28 -70
  556. package/unbundled/definition26.js +28 -70
  557. package/unbundled/definition27.cjs +6 -13
  558. package/unbundled/definition27.js +6 -13
  559. package/unbundled/definition28.cjs +30 -77
  560. package/unbundled/definition28.js +30 -77
  561. package/unbundled/definition29.cjs +7 -14
  562. package/unbundled/definition29.js +7 -14
  563. package/unbundled/definition3.cjs +5 -16
  564. package/unbundled/definition3.js +5 -16
  565. package/unbundled/definition30.cjs +66 -516
  566. package/unbundled/definition30.js +58 -514
  567. package/unbundled/definition31.cjs +502 -42
  568. package/unbundled/definition31.js +500 -40
  569. package/unbundled/definition32.cjs +42 -253
  570. package/unbundled/definition32.js +39 -250
  571. package/unbundled/definition33.cjs +238 -81
  572. package/unbundled/definition33.js +235 -78
  573. package/unbundled/definition34.cjs +75 -2059
  574. package/unbundled/definition34.js +72 -2032
  575. package/unbundled/definition35.cjs +1990 -25
  576. package/unbundled/definition35.js +1960 -24
  577. package/unbundled/definition36.cjs +27 -134
  578. package/unbundled/definition36.js +24 -126
  579. package/unbundled/definition37.cjs +71 -368
  580. package/unbundled/definition37.js +66 -363
  581. package/unbundled/definition38.cjs +300 -176
  582. package/unbundled/definition38.js +295 -171
  583. package/unbundled/definition39.cjs +184 -374
  584. package/unbundled/definition39.js +180 -370
  585. package/unbundled/definition4.cjs +2 -11
  586. package/unbundled/definition4.js +2 -7
  587. package/unbundled/definition40.cjs +392 -237
  588. package/unbundled/definition40.js +389 -234
  589. package/unbundled/definition41.cjs +264 -50
  590. package/unbundled/definition41.js +259 -45
  591. package/unbundled/definition42.cjs +48 -71
  592. package/unbundled/definition42.js +46 -69
  593. package/unbundled/definition43.cjs +56 -426
  594. package/unbundled/definition43.js +55 -425
  595. package/unbundled/definition44.cjs +387 -48
  596. package/unbundled/definition44.js +383 -44
  597. package/unbundled/definition45.cjs +54 -48
  598. package/unbundled/definition45.js +50 -44
  599. package/unbundled/definition46.cjs +40 -173
  600. package/unbundled/definition46.js +36 -169
  601. package/unbundled/definition47.cjs +172 -33
  602. package/unbundled/definition47.js +168 -28
  603. package/unbundled/definition48.cjs +31 -97
  604. package/unbundled/definition48.js +23 -95
  605. package/unbundled/definition49.cjs +71 -38
  606. package/unbundled/definition49.js +68 -35
  607. package/unbundled/definition5.cjs +2 -5
  608. package/unbundled/definition5.js +2 -5
  609. package/unbundled/definition50.cjs +55 -26
  610. package/unbundled/definition50.js +53 -21
  611. package/unbundled/definition51.cjs +24 -43
  612. package/unbundled/definition51.js +18 -40
  613. package/unbundled/definition52.cjs +30 -340
  614. package/unbundled/definition52.js +28 -338
  615. package/unbundled/definition53.cjs +295 -197
  616. package/unbundled/definition53.js +292 -194
  617. package/unbundled/definition54.cjs +211 -45
  618. package/unbundled/definition54.js +207 -41
  619. package/unbundled/definition55.cjs +42 -308
  620. package/unbundled/definition55.js +38 -304
  621. package/unbundled/definition56.cjs +266 -53
  622. package/unbundled/definition56.js +263 -49
  623. package/unbundled/definition57.cjs +51 -162
  624. package/unbundled/definition57.js +49 -160
  625. package/unbundled/definition58.cjs +135 -253
  626. package/unbundled/definition58.js +130 -251
  627. package/unbundled/definition59.cjs +209 -457
  628. package/unbundled/definition59.js +206 -454
  629. package/unbundled/definition6.cjs +179 -17
  630. package/unbundled/definition6.js +170 -14
  631. package/unbundled/definition60.cjs +441 -3722
  632. package/unbundled/definition60.js +435 -3553
  633. package/unbundled/definition61.cjs +3713 -761
  634. package/unbundled/definition61.js +3540 -751
  635. package/unbundled/definition62.cjs +761 -95
  636. package/unbundled/definition62.js +758 -92
  637. package/unbundled/definition63.cjs +106 -1055
  638. package/unbundled/definition63.js +98 -1047
  639. package/unbundled/definition64.cjs +991 -103
  640. package/unbundled/definition64.js +986 -101
  641. package/unbundled/definition65.cjs +111 -83
  642. package/unbundled/definition65.js +106 -77
  643. package/unbundled/definition66.cjs +71 -179
  644. package/unbundled/definition66.js +62 -176
  645. package/unbundled/definition67.cjs +154 -120
  646. package/unbundled/definition67.js +151 -117
  647. package/unbundled/definition68.cjs +126 -52
  648. package/unbundled/definition68.js +122 -48
  649. package/unbundled/definition69.cjs +52 -94
  650. package/unbundled/definition69.js +50 -91
  651. package/unbundled/definition7.cjs +31 -177
  652. package/unbundled/definition7.js +24 -170
  653. package/unbundled/definition70.cjs +92 -22
  654. package/unbundled/definition70.js +87 -17
  655. package/unbundled/definition71.cjs +21 -93
  656. package/unbundled/definition71.js +15 -90
  657. package/unbundled/definition72.cjs +77 -309
  658. package/unbundled/definition72.js +72 -232
  659. package/unbundled/definition73.cjs +288 -335
  660. package/unbundled/definition73.js +217 -329
  661. package/unbundled/definition74.cjs +327 -29
  662. package/unbundled/definition74.js +318 -26
  663. package/unbundled/definition75.cjs +28 -129
  664. package/unbundled/definition75.js +23 -125
  665. package/unbundled/definition76.cjs +107 -271
  666. package/unbundled/definition76.js +103 -267
  667. package/unbundled/definition77.cjs +258 -27
  668. package/unbundled/definition77.js +249 -25
  669. package/unbundled/definition78.cjs +30 -155
  670. package/unbundled/definition78.js +28 -140
  671. package/unbundled/definition79.cjs +117 -183
  672. package/unbundled/definition79.js +108 -179
  673. package/unbundled/definition8.cjs +152 -36
  674. package/unbundled/definition8.js +148 -31
  675. package/unbundled/definition80.cjs +180 -492
  676. package/unbundled/definition80.js +175 -486
  677. package/unbundled/definition81.cjs +517 -0
  678. package/unbundled/definition81.js +497 -0
  679. package/unbundled/definition9.cjs +200 -135
  680. package/unbundled/definition9.js +189 -130
  681. package/unbundled/delegates-aria.cjs +1 -3
  682. package/unbundled/delegates-aria.js +1 -3
  683. package/unbundled/divider.cjs +2 -7
  684. package/unbundled/divider.js +2 -7
  685. package/unbundled/extractOptions.cjs +21 -0
  686. package/unbundled/extractOptions.js +16 -0
  687. package/unbundled/form-associated.cjs +20 -60
  688. package/unbundled/form-associated.js +20 -60
  689. package/unbundled/form-element.cjs +5 -15
  690. package/unbundled/form-element.js +5 -15
  691. package/unbundled/host-semantics.cjs +1 -3
  692. package/unbundled/host-semantics.js +1 -3
  693. package/unbundled/kbd-shortcut.cjs +1 -3
  694. package/unbundled/kbd-shortcut.js +1 -3
  695. package/unbundled/linkable.cjs +1 -3
  696. package/unbundled/linkable.js +1 -3
  697. package/unbundled/listbox.cjs +29 -26
  698. package/unbundled/listbox.js +29 -26
  699. package/unbundled/localized.cjs +3 -9
  700. package/unbundled/localized.js +3 -9
  701. package/unbundled/mixins.cjs +9 -25
  702. package/unbundled/mixins.js +9 -25
  703. package/unbundled/numberConverter.cjs +39 -9
  704. package/unbundled/numberConverter.js +39 -9
  705. package/unbundled/picker-field.template.cjs +16 -36
  706. package/unbundled/picker-field.template.js +16 -36
  707. package/unbundled/platform.cjs +1 -3
  708. package/unbundled/platform.js +1 -3
  709. package/unbundled/playbackRates.cjs +1 -3
  710. package/unbundled/playbackRates.js +1 -3
  711. package/unbundled/randomId.cjs +1 -3
  712. package/unbundled/randomId.js +1 -3
  713. package/unbundled/single-date-picker.cjs +6 -18
  714. package/unbundled/single-date-picker.js +6 -18
  715. package/unbundled/single-value-picker.cjs +7 -21
  716. package/unbundled/single-value-picker.js +7 -21
  717. package/unbundled/slider.template.cjs +6 -14
  718. package/unbundled/slider.template.js +6 -14
  719. package/unbundled/slottable-request.cjs +2 -6
  720. package/unbundled/slottable-request.js +2 -6
  721. package/unbundled/text-field.cjs +1 -1
  722. package/unbundled/text-field.js +1 -1
  723. package/unbundled/time-selection-picker.template.cjs +27 -79
  724. package/unbundled/time-selection-picker.template.js +27 -79
  725. package/unbundled/trapped-focus.cjs +1 -3
  726. package/unbundled/trapped-focus.js +1 -3
  727. package/unbundled/vivid-element.cjs +16 -19
  728. package/unbundled/vivid-element.js +16 -19
  729. package/unbundled/with-contextual-help.cjs +4 -13
  730. package/unbundled/with-contextual-help.js +4 -13
  731. package/unbundled/with-error-text.cjs +2 -6
  732. package/unbundled/with-error-text.js +2 -6
  733. package/unbundled/with-success-text.cjs +1 -3
  734. package/unbundled/with-success-text.js +1 -3
  735. package/video-player/definition.cjs +1 -1
  736. package/video-player/definition.js +1 -1
  737. package/video-player/index.cjs +3 -3
  738. package/video-player/index.js +5 -5
  739. package/visually-hidden/definition.cjs +1 -1
  740. package/visually-hidden/definition.js +1 -1
  741. package/vivid.api.json +194 -0
  742. package/shared/color-picker/index.d.ts +0 -3
  743. package/shared/foundation/button/index.d.ts +0 -2
  744. package/shared/patterns/char-count/index.d.ts +0 -1
  745. package/shared/patterns/form-elements/index.d.ts +0 -4
  746. package/shared/patterns/index.d.ts +0 -7
@@ -1,2057 +1,97 @@
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 { n as resolveIcon, r as PLACEHOLDER_ICON, t as numberConverter } from "./numberConverter.js";
3
3
  import { t as __decorate } from "./decorate.js";
4
- import { t as Localized } from "./localized.js";
5
- import { n as visuallyHiddenDefinition, r as VisuallyHidden } from "./definition6.js";
6
- import { n as keyArrowRight$1, t as keyArrowLeft$1 } from "./key-codes.js";
7
- import { n as applyHostSemantics, t as HostSemantics } from "./host-semantics.js";
8
- import { a as GenerateHeaderOptions, i as DataGridRowTypes, n as DataGridCellSortStates, r as DataGridCellTypes, t as DataGridCellRole } from "./data-grid.options.js";
9
- import { Observable, RepeatDirective, Updates, attr, children, elements, html, normalizeBinding, nullableNumberConverter, observable, slotted, when } from "@microsoft/fast-element";
10
- import { classNames, eventFocus, eventFocusIn, eventFocusOut, eventKeyDown, keyArrowDown, keyArrowUp, keyEnd, keyEnter, keyEscape, keyFunction2, keyHome, keyPageDown, keyPageUp, keySpace } from "@microsoft/fast-web-utilities";
11
- //#region src/lib/data-grid/data-grid.scss?inline
12
- var data_grid_default = ":host{display:block}:host([generate-header=sticky]){max-block-size:400px}.base{--scrollbar-track-color:transparent;--scrollbar-thumb-color:color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%);scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.base ::-webkit-scrollbar{width:4px}.base ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.base ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-fallback-track-color,var(--scrollbar-thumb-color));border:0;border-radius:4px}.base{block-size:inherit;inline-size:100%;max-block-size:inherit;position:relative;overflow:auto}";
4
+ import { n as visuallyHiddenDefinition, r as VisuallyHidden } from "./definition22.js";
5
+ import { t as getFlagIconName } from "./utils.js";
6
+ import { attr, html, observable, when } from "@microsoft/fast-element";
7
+ import { classNames } from "@microsoft/fast-web-utilities";
8
+ //#region src/lib/flag/flag.scss?inline
9
+ var flag_default = ":host{vertical-align:sub;display:inline-block}.control.size--6{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--5{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.control.size--4{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--3{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.control.size--2{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.control.size--1{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.control.size-0{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.control.size-1{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.control.size-2{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.control.size-3{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.control.size-4{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.control.size-5{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.control:not(.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-0,.size-1,.size-2,.size-3,.size-4,.size-5){--_flag-block-size:1em}.control{margin:unset;block-size:var(--_flag-block-size);color:currentColor;contain:strict;inline-size:var(--_flag-block-size);display:flex}svg{block-size:inherit;inline-size:inherit;margin:auto}";
13
10
  //#endregion
14
- //#region src/lib/data-grid/data-grid-row.scss?inline
15
- var data_grid_row_default = ".base.connotation-cta{--_connotation-color-primary:var(--vvd-data-grid-row-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-data-grid-row-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-data-grid-row-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-firm:var(--vvd-data-grid-row-cta-firm,var(--vvd-color-cta-600));--_connotation-color-faint:var(--vvd-data-grid-row-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-data-grid-row-cta-soft,var(--vvd-color-cta-100));--_connotation-color-pale:var(--vvd-data-grid-row-cta-pale,var(--vvd-color-cta-300));--_connotation-color-dim:var(--vvd-data-grid-row-cta-dim,var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-data-grid-row-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-data-grid-row-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-data-grid-row-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-data-grid-row-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-data-grid-row-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-data-grid-row-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-pale:var(--vvd-data-grid-row-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-dim:var(--vvd-data-grid-row-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.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;width:100%;color:var(--vvd-color-canvas-text);display:grid}:host([row-type=sticky-header]) .base{z-index:9;background:var(--data-grid-row-background,var(--vvd-color-canvas));position:sticky;top:0}:host([row-type=hidden-header]) .base{display:none}:host([selected]:not([row-type*=header])) .base{background-color:var(--_appearance-color-fill)}";
16
- //#endregion
17
- //#region src/lib/data-grid/data-grid-cell.scss?inline
18
- var data_grid_cell_default = ":host{block-size:100%;min-inline-size:80px}:host(:focus-visible){outline:none}:host([data-fixed]){z-index:5;background:var(--data-grid-cell-background,var(--vvd-color-surface-2dp));position:sticky}:host([data-fixed]):before{z-index:1;width:1px;content:\"\";pointer-events:none;block-size:100%;position:absolute;top:0;right:0;box-shadow:4px 0 4px #0000001a,2px 0 2px #0000000d,1px 0 1px #0000000d}.base.connotation-cta{--_connotation-color-primary:var(--vvd-data-grid-cell-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-data-grid-cell-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-data-grid-cell-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-firm:var(--vvd-data-grid-cell-cta-firm,var(--vvd-color-cta-600));--_connotation-color-soft:var(--vvd-data-grid-cell-cta-soft,var(--vvd-color-cta-100));--_connotation-color-faint:var(--vvd-data-grid-cell-cta-faint,var(--vvd-color-cta-50));--_connotation-color-pale:var(--vvd-data-grid-cell-cta-pale,var(--vvd-color-cta-300));--_connotation-color-dim:var(--vvd-data-grid-cell-cta-dim,var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-data-grid-cell-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-data-grid-cell-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-data-grid-cell-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-data-grid-cell-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-soft:var(--vvd-data-grid-cell-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-faint:var(--vvd-data-grid-cell-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-pale:var(--vvd-data-grid-cell-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-dim:var(--vvd-data-grid-cell-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.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;border-bottom:1px solid var(--vvd-color-neutral-300);block-size:var(--data-grid-cell-block-size,var(--_data-grid-cell-default-block-size));color:var(--_appearance-color-text);font:var(--vvd-typography-base);min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));align-items:center;padding-block:13px 14px;padding-inline:12px;display:flex}:host(:focus-visible) .base{--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([cell-type=columnheader]) .base{border-color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);--_data-grid-cell-default-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));--_data-grid-cell-default-white-space:nowrap}:host(:not([cell-type=columnheader])) .base{--_data-grid-cell-default-block-size:100%;--_data-grid-cell-default-white-space:normal}:host([selected]:not([cell-type=columnheader])) .base{background-color:var(--_appearance-color-fill)}.content{align-items:center;display:flex;overflow:hidden}.content[role=button]{cursor:pointer}slot:not([name]){text-overflow:ellipsis;white-space:var(--data-grid-cell-white-space,var(--_data-grid-cell-default-white-space));display:block;overflow:hidden}:host(:not([cell-type=columnheader][aria-sort])) slot:not([name]){inline-size:100%}.header-icon{flex-shrink:0;margin-inline-start:16px}slot[name=action-items]{flex-shrink:0;align-items:center;display:flex}.base.has-action-items slot[name=action-items]{margin-inline-start:16px}";
19
- //#endregion
20
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/interfaces.js
21
- var kernelMode;
22
- var kernelAttr = "fast-kernel";
23
- try {
24
- if (document.currentScript) kernelMode = document.currentScript.getAttribute(kernelAttr);
25
- else {
26
- const scripts = document.getElementsByTagName("script");
27
- kernelMode = scripts[scripts.length - 1].getAttribute(kernelAttr);
28
- }
29
- } catch (e) {
30
- kernelMode = "isolate";
31
- }
32
- var KernelServiceId;
33
- switch (kernelMode) {
34
- case "share":
35
- KernelServiceId = Object.freeze({
36
- updateQueue: 1,
37
- observable: 2,
38
- contextEvent: 3,
39
- elementRegistry: 4
40
- });
41
- break;
42
- case "share-v2":
43
- KernelServiceId = Object.freeze({
44
- updateQueue: 1.2,
45
- observable: 2.2,
46
- contextEvent: 3.2,
47
- elementRegistry: 4.2
48
- });
49
- break;
50
- default:
51
- const postfix = `-${Math.random().toString(36).substring(2, 8)}`;
52
- KernelServiceId = Object.freeze({
53
- updateQueue: `1.2${postfix}`,
54
- observable: `2.2${postfix}`,
55
- contextEvent: `3.2${postfix}`,
56
- elementRegistry: `4.2${postfix}`
57
- });
58
- break;
59
- }
60
- /**
61
- * Warning and error messages.
62
- * @internal
63
- */
64
- var Message;
65
- (function(Message) {
66
- Message[Message["needsArrayObservation"] = 1101] = "needsArrayObservation";
67
- Message[Message["onlySetDOMPolicyOnce"] = 1201] = "onlySetDOMPolicyOnce";
68
- Message[Message["bindingInnerHTMLRequiresTrustedTypes"] = 1202] = "bindingInnerHTMLRequiresTrustedTypes";
69
- Message[Message["twoWayBindingRequiresObservables"] = 1203] = "twoWayBindingRequiresObservables";
70
- Message[Message["hostBindingWithoutHost"] = 1204] = "hostBindingWithoutHost";
71
- Message[Message["unsupportedBindingBehavior"] = 1205] = "unsupportedBindingBehavior";
72
- Message[Message["directCallToHTMLTagNotAllowed"] = 1206] = "directCallToHTMLTagNotAllowed";
73
- Message[Message["onlySetTemplatePolicyOnce"] = 1207] = "onlySetTemplatePolicyOnce";
74
- Message[Message["cannotSetTemplatePolicyAfterCompilation"] = 1208] = "cannotSetTemplatePolicyAfterCompilation";
75
- Message[Message["blockedByDOMPolicy"] = 1209] = "blockedByDOMPolicy";
76
- Message[Message["missingElementDefinition"] = 1401] = "missingElementDefinition";
77
- Message[Message["noRegistrationForContext"] = 1501] = "noRegistrationForContext";
78
- Message[Message["noFactoryForResolver"] = 1502] = "noFactoryForResolver";
79
- Message[Message["invalidResolverStrategy"] = 1503] = "invalidResolverStrategy";
80
- Message[Message["cannotAutoregisterDependency"] = 1504] = "cannotAutoregisterDependency";
81
- Message[Message["cannotResolveKey"] = 1505] = "cannotResolveKey";
82
- Message[Message["cannotConstructNativeFunction"] = 1506] = "cannotConstructNativeFunction";
83
- Message[Message["cannotJITRegisterNonConstructor"] = 1507] = "cannotJITRegisterNonConstructor";
84
- Message[Message["cannotJITRegisterIntrinsic"] = 1508] = "cannotJITRegisterIntrinsic";
85
- Message[Message["cannotJITRegisterInterface"] = 1509] = "cannotJITRegisterInterface";
86
- Message[Message["invalidResolver"] = 1510] = "invalidResolver";
87
- Message[Message["invalidKey"] = 1511] = "invalidKey";
88
- Message[Message["noDefaultResolver"] = 1512] = "noDefaultResolver";
89
- Message[Message["cyclicDependency"] = 1513] = "cyclicDependency";
90
- Message[Message["connectUpdateRequiresController"] = 1514] = "connectUpdateRequiresController";
91
- })(Message || (Message = {}));
92
- /**
93
- * Determines whether or not an object is a function.
94
- * @public
95
- */
96
- var isFunction = (object) => typeof object === "function";
97
- /**
98
- * Determines whether or not an object is a string.
99
- * @public
100
- */
101
- var isString = (object) => typeof object === "string";
102
- /**
103
- * A function which does nothing.
104
- * @public
105
- */
106
- var noop = () => void 0;
107
- //#endregion
108
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/polyfills.js
109
- (function ensureGlobalThis() {
110
- if (typeof globalThis !== "undefined") return;
111
- if (typeof global !== "undefined") global.globalThis = global;
112
- else if (typeof self !== "undefined") self.globalThis = self;
113
- else if (typeof window !== "undefined") window.globalThis = window;
114
- else {
115
- const result = new Function("return this")();
116
- result.globalThis = result;
117
- }
118
- })();
119
- (function requestIdleCallbackPolyfill() {
120
- if ("requestIdleCallback" in globalThis) return;
121
- /**
122
- * A polyfill for requestIdleCallback that falls back to setTimeout.
123
- *
124
- * @param callback - The function to call when the browser is idle.
125
- * @param options - Options object that may contain a timeout property.
126
- * @returns An ID that can be used to cancel the callback.
127
- * @public
128
- */
129
- globalThis.requestIdleCallback = function requestIdleCallback(callback, options) {
130
- const start = Date.now();
131
- return setTimeout(() => {
132
- callback({
133
- didTimeout: (options === null || options === void 0 ? void 0 : options.timeout) ? Date.now() - start >= options.timeout : false,
134
- timeRemaining: () => 0
135
- });
136
- }, 1);
137
- };
138
- /**
139
- * A polyfill for cancelIdleCallback that falls back to clearTimeout.
140
- *
141
- * @param id - The ID of the callback to cancel.
142
- * @public
143
- */
144
- globalThis.cancelIdleCallback = function cancelIdleCallback(id) {
145
- clearTimeout(id);
146
- };
147
- })();
148
- //#endregion
149
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/platform.js
150
- var propConfig = {
151
- configurable: false,
152
- enumerable: false,
153
- writable: false
154
- };
155
- if (globalThis.FAST === void 0) Reflect.defineProperty(globalThis, "FAST", Object.assign({ value: Object.create(null) }, propConfig));
156
- /**
157
- * The FAST global.
158
- * @public
159
- */
160
- var FAST = globalThis.FAST;
161
- if (FAST.getById === void 0) {
162
- const storage = Object.create(null);
163
- Reflect.defineProperty(FAST, "getById", Object.assign({ value(id, initialize) {
164
- let found = storage[id];
165
- if (found === void 0) found = initialize ? storage[id] = initialize() : null;
166
- return found;
167
- } }, propConfig));
168
- }
169
- if (FAST.error === void 0) Object.assign(FAST, {
170
- warn() {},
171
- error(code) {
172
- return /* @__PURE__ */ new Error(`Error ${code}`);
173
- },
174
- addMessages() {}
175
- });
176
- Object.freeze([]);
177
- /**
178
- * Creates a function capable of locating metadata associated with a type.
179
- * @returns A metadata locator function.
180
- * @internal
181
- */
182
- function createMetadataLocator() {
183
- const metadataLookup = /* @__PURE__ */ new WeakMap();
184
- return function(target) {
185
- let metadata = metadataLookup.get(target);
186
- if (metadata === void 0) {
187
- let currentTarget = Reflect.getPrototypeOf(target);
188
- while (metadata === void 0 && currentTarget !== null) {
189
- metadata = metadataLookup.get(currentTarget);
190
- currentTarget = Reflect.getPrototypeOf(currentTarget);
191
- }
192
- metadata = metadata === void 0 ? [] : metadata.slice(0);
193
- metadataLookup.set(target, metadata);
194
- }
195
- return metadata;
196
- };
197
- }
198
- /**
199
- * Makes a type noop for JSON serialization.
200
- * @param type - The type to make noop for JSON serialization.
201
- * @internal
202
- */
203
- function makeSerializationNoop(type) {
204
- type.prototype.toJSON = noop;
205
- }
206
- Object.freeze({
207
- /**
208
- * Not aspected.
209
- */
210
- none: 0,
211
- /**
212
- * An attribute.
213
- */
214
- attribute: 1,
215
- /**
216
- * A boolean attribute.
217
- */
218
- booleanAttribute: 2,
219
- /**
220
- * A property.
221
- */
222
- property: 3,
223
- /**
224
- * Content
225
- */
226
- content: 4,
227
- /**
228
- * A token list.
229
- */
230
- tokenList: 5,
231
- /**
232
- * An event.
233
- */
234
- event: 6
235
- });
236
- var createHTML = (html) => html;
237
- var fastTrustedType = globalThis.trustedTypes ? globalThis.trustedTypes.createPolicy("fast-html", { createHTML }) : { createHTML };
238
- var defaultPolicy = Object.freeze({
239
- createHTML(value) {
240
- return fastTrustedType.createHTML(value);
241
- },
242
- protect(tagName, aspect, aspectName, sink) {
243
- return sink;
244
- }
245
- });
246
- var fastPolicy = defaultPolicy;
247
- /**
248
- * Common DOM APIs.
249
- * @public
250
- */
251
- var DOM$1 = Object.freeze({
252
- /**
253
- * Gets the dom policy used by the templating system.
254
- */
255
- get policy() {
256
- return defaultPolicy;
257
- },
258
- /**
259
- * Sets the dom policy used by the templating system.
260
- * @param policy - The policy to set.
261
- * @remarks
262
- * This API can only be called once, for security reasons. It should be
263
- * called by the application developer at the start of their program.
264
- */
265
- setPolicy(value) {
266
- if (defaultPolicy !== fastPolicy) throw FAST.error(Message.onlySetDOMPolicyOnce);
267
- defaultPolicy = value;
268
- },
269
- /**
270
- * Sets an attribute value on an element.
271
- * @param element - The element to set the attribute value on.
272
- * @param attributeName - The attribute name to set.
273
- * @param value - The value of the attribute to set.
274
- * @remarks
275
- * If the value is `null` or `undefined`, the attribute is removed, otherwise
276
- * it is set to the provided value using the standard `setAttribute` API.
277
- */
278
- setAttribute(element, attributeName, value) {
279
- value === null || value === void 0 ? element.removeAttribute(attributeName) : element.setAttribute(attributeName, value);
280
- },
281
- /**
282
- * Sets a boolean attribute value.
283
- * @param element - The element to set the boolean attribute value on.
284
- * @param attributeName - The attribute name to set.
285
- * @param value - The value of the attribute to set.
286
- * @remarks
287
- * If the value is true, the attribute is added; otherwise it is removed.
288
- */
289
- setBooleanAttribute(element, attributeName, value) {
290
- value ? element.setAttribute(attributeName, "") : element.removeAttribute(attributeName);
291
- }
292
- });
293
- //#endregion
294
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/observation/notifier.js
295
- /**
296
- * An implementation of {@link Notifier} that efficiently keeps track of
297
- * subscribers interested in a specific change notification on an
298
- * observable subject.
299
- *
300
- * @remarks
301
- * This set is optimized for the most common scenario of 1 or 2 subscribers.
302
- * With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.
303
- * If the set ever exceeds two subscribers, it upgrades to an array automatically.
304
- * @public
305
- */
306
- var SubscriberSet = class {
307
- /**
308
- * Creates an instance of SubscriberSet for the specified subject.
309
- * @param subject - The subject that subscribers will receive notifications from.
310
- * @param initialSubscriber - An initial subscriber to changes.
311
- */
312
- constructor(subject, initialSubscriber) {
313
- this.sub1 = void 0;
314
- this.sub2 = void 0;
315
- this.spillover = void 0;
316
- this.subject = subject;
317
- this.sub1 = initialSubscriber;
318
- }
319
- /**
320
- * Checks whether the provided subscriber has been added to this set.
321
- * @param subscriber - The subscriber to test for inclusion in this set.
322
- */
323
- has(subscriber) {
324
- return this.spillover === void 0 ? this.sub1 === subscriber || this.sub2 === subscriber : this.spillover.indexOf(subscriber) !== -1;
325
- }
326
- /**
327
- * Subscribes to notification of changes in an object's state.
328
- * @param subscriber - The object that is subscribing for change notification.
329
- */
330
- subscribe(subscriber) {
331
- const spillover = this.spillover;
332
- if (spillover === void 0) {
333
- if (this.has(subscriber)) return;
334
- if (this.sub1 === void 0) {
335
- this.sub1 = subscriber;
336
- return;
337
- }
338
- if (this.sub2 === void 0) {
339
- this.sub2 = subscriber;
340
- return;
341
- }
342
- this.spillover = [
343
- this.sub1,
344
- this.sub2,
345
- subscriber
346
- ];
347
- this.sub1 = void 0;
348
- this.sub2 = void 0;
349
- } else if (spillover.indexOf(subscriber) === -1) spillover.push(subscriber);
350
- }
351
- /**
352
- * Unsubscribes from notification of changes in an object's state.
353
- * @param subscriber - The object that is unsubscribing from change notification.
354
- */
355
- unsubscribe(subscriber) {
356
- const spillover = this.spillover;
357
- if (spillover === void 0) {
358
- if (this.sub1 === subscriber) this.sub1 = void 0;
359
- else if (this.sub2 === subscriber) this.sub2 = void 0;
360
- } else {
361
- const index = spillover.indexOf(subscriber);
362
- if (index !== -1) spillover.splice(index, 1);
363
- }
364
- }
365
- /**
366
- * Notifies all subscribers.
367
- * @param args - Data passed along to subscribers during notification.
368
- */
369
- notify(args) {
370
- const spillover = this.spillover;
371
- const subject = this.subject;
372
- if (spillover === void 0) {
373
- const sub1 = this.sub1;
374
- const sub2 = this.sub2;
375
- if (sub1 !== void 0) sub1.handleChange(subject, args);
376
- if (sub2 !== void 0) sub2.handleChange(subject, args);
377
- } else for (let i = 0, ii = spillover.length; i < ii; ++i) spillover[i].handleChange(subject, args);
378
- }
379
- };
380
- /**
381
- * An implementation of Notifier that allows subscribers to be notified
382
- * of individual property changes on an object.
383
- * @public
384
- */
385
- var PropertyChangeNotifier = class {
386
- /**
387
- * Creates an instance of PropertyChangeNotifier for the specified subject.
388
- * @param subject - The object that subscribers will receive notifications for.
389
- */
390
- constructor(subject) {
391
- this.subscribers = {};
392
- this.subjectSubscribers = null;
393
- this.subject = subject;
394
- }
395
- /**
396
- * Notifies all subscribers, based on the specified property.
397
- * @param propertyName - The property name, passed along to subscribers during notification.
398
- */
399
- notify(propertyName) {
400
- var _a, _b;
401
- (_a = this.subscribers[propertyName]) === null || _a === void 0 || _a.notify(propertyName);
402
- (_b = this.subjectSubscribers) === null || _b === void 0 || _b.notify(propertyName);
403
- }
404
- /**
405
- * Subscribes to notification of changes in an object's state.
406
- * @param subscriber - The object that is subscribing for change notification.
407
- * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.
408
- */
409
- subscribe(subscriber, propertyToWatch) {
410
- var _a, _b;
411
- let subscribers;
412
- if (propertyToWatch) subscribers = (_a = this.subscribers[propertyToWatch]) !== null && _a !== void 0 ? _a : this.subscribers[propertyToWatch] = new SubscriberSet(this.subject);
413
- else subscribers = (_b = this.subjectSubscribers) !== null && _b !== void 0 ? _b : this.subjectSubscribers = new SubscriberSet(this.subject);
414
- subscribers.subscribe(subscriber);
415
- }
416
- /**
417
- * Unsubscribes from notification of changes in an object's state.
418
- * @param subscriber - The object that is unsubscribing from change notification.
419
- * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.
420
- */
421
- unsubscribe(subscriber, propertyToUnwatch) {
422
- var _a, _b;
423
- if (propertyToUnwatch) (_a = this.subscribers[propertyToUnwatch]) === null || _a === void 0 || _a.unsubscribe(subscriber);
424
- else (_b = this.subjectSubscribers) === null || _b === void 0 || _b.unsubscribe(subscriber);
425
- }
426
- };
427
- //#endregion
428
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/observation/update-queue.js
429
- /**
430
- * The default UpdateQueue.
431
- * @public
432
- */
433
- var Updates$1 = FAST.getById(KernelServiceId.updateQueue, () => {
434
- const tasks = [];
435
- const pendingErrors = [];
436
- const rAF = globalThis.requestAnimationFrame;
437
- let updateAsync = true;
438
- function throwFirstError() {
439
- if (pendingErrors.length) throw pendingErrors.shift();
440
- }
441
- function tryRunTask(task) {
442
- try {
443
- task.call();
444
- } catch (error) {
445
- if (updateAsync) {
446
- pendingErrors.push(error);
447
- setTimeout(throwFirstError, 0);
448
- } else {
449
- tasks.length = 0;
450
- throw error;
451
- }
452
- }
453
- }
454
- function process() {
455
- const capacity = 1024;
456
- let index = 0;
457
- while (index < tasks.length) {
458
- tryRunTask(tasks[index]);
459
- index++;
460
- if (index > capacity) {
461
- for (let scan = 0, newLength = tasks.length - index; scan < newLength; scan++) tasks[scan] = tasks[scan + index];
462
- tasks.length -= index;
463
- index = 0;
464
- }
465
- }
466
- tasks.length = 0;
467
- }
468
- function enqueue(callable) {
469
- tasks.push(callable);
470
- if (tasks.length < 2) updateAsync ? rAF(process) : process();
471
- }
472
- return Object.freeze({
473
- enqueue,
474
- next: () => new Promise(enqueue),
475
- process,
476
- setMode: (isAsync) => updateAsync = isAsync
477
- });
478
- });
479
- //#endregion
480
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/observation/observable.js
481
- /**
482
- * Describes how the source's lifetime relates to its controller's lifetime.
483
- * @public
484
- */
485
- var SourceLifetime = Object.freeze({
486
- /**
487
- * The source to controller lifetime relationship is unknown.
488
- */
489
- unknown: void 0,
490
- /**
491
- * The source and controller lifetimes are coupled to one another.
492
- * They can/will be GC'd together.
493
- */
494
- coupled: 1
495
- });
496
- FAST.getById(KernelServiceId.observable, () => {
497
- const queueUpdate = Updates$1.enqueue;
498
- const volatileRegex = /(:|&&|\|\||if|\?\.)/;
499
- const notifierLookup = /* @__PURE__ */ new WeakMap();
500
- let watcher = void 0;
501
- let createArrayObserver = (array) => {
502
- throw FAST.error(Message.needsArrayObservation);
503
- };
504
- function getNotifier(source) {
505
- var _a;
506
- let found = (_a = source.$fastController) !== null && _a !== void 0 ? _a : notifierLookup.get(source);
507
- if (found === void 0) Array.isArray(source) ? found = createArrayObserver(source) : notifierLookup.set(source, found = new PropertyChangeNotifier(source));
508
- return found;
509
- }
510
- const getAccessors = createMetadataLocator();
511
- class DefaultObservableAccessor {
512
- constructor(name) {
513
- this.name = name;
514
- this.field = `_${name}`;
515
- this.callback = `${name}Changed`;
516
- }
517
- getValue(source) {
518
- if (watcher !== void 0) watcher.watch(source, this.name);
519
- return source[this.field];
520
- }
521
- setValue(source, newValue) {
522
- const field = this.field;
523
- const oldValue = source[field];
524
- if (oldValue !== newValue) {
525
- source[field] = newValue;
526
- const callback = source[this.callback];
527
- if (isFunction(callback)) callback.call(source, oldValue, newValue);
528
- getNotifier(source).notify(this.name);
529
- }
530
- }
531
- }
532
- class ExpressionNotifierImplementation extends SubscriberSet {
533
- constructor(expression, initialSubscriber, isVolatileBinding = false) {
534
- super(expression, initialSubscriber);
535
- this.expression = expression;
536
- this.isVolatileBinding = isVolatileBinding;
537
- this.needsRefresh = true;
538
- this.needsQueue = true;
539
- this.isAsync = true;
540
- this.first = this;
541
- this.last = null;
542
- this.propertySource = void 0;
543
- this.propertyName = void 0;
544
- this.notifier = void 0;
545
- this.next = void 0;
546
- }
547
- setMode(isAsync) {
548
- this.isAsync = this.needsQueue = isAsync;
549
- }
550
- bind(controller) {
551
- this.controller = controller;
552
- const value = this.observe(controller.source, controller.context);
553
- if (!controller.isBound && this.requiresUnbind(controller)) controller.onUnbind(this);
554
- return value;
555
- }
556
- requiresUnbind(controller) {
557
- return controller.sourceLifetime !== SourceLifetime.coupled || this.first !== this.last || this.first.propertySource !== controller.source;
558
- }
559
- unbind(controller) {
560
- this.dispose();
561
- }
562
- observe(source, context) {
563
- if (this.needsRefresh && this.last !== null) this.dispose();
564
- const previousWatcher = watcher;
565
- watcher = this.needsRefresh ? this : void 0;
566
- this.needsRefresh = this.isVolatileBinding;
567
- let result;
568
- try {
569
- result = this.expression(source, context);
570
- } finally {
571
- watcher = previousWatcher;
572
- }
573
- return result;
574
- }
575
- disconnect() {
576
- this.dispose();
577
- }
578
- dispose() {
579
- if (this.last !== null) {
580
- let current = this.first;
581
- while (current !== void 0) {
582
- current.notifier.unsubscribe(this, current.propertyName);
583
- current = current.next;
584
- }
585
- this.last = null;
586
- this.needsRefresh = this.needsQueue = this.isAsync;
587
- }
588
- }
589
- watch(propertySource, propertyName) {
590
- const prev = this.last;
591
- const notifier = getNotifier(propertySource);
592
- const current = prev === null ? this.first : {};
593
- current.propertySource = propertySource;
594
- current.propertyName = propertyName;
595
- current.notifier = notifier;
596
- notifier.subscribe(this, propertyName);
597
- if (prev !== null) {
598
- if (!this.needsRefresh) {
599
- let prevValue;
600
- watcher = void 0;
601
- prevValue = prev.propertySource[prev.propertyName];
602
- watcher = this;
603
- if (propertySource === prevValue) this.needsRefresh = true;
604
- }
605
- prev.next = current;
606
- }
607
- this.last = current;
608
- }
609
- handleChange() {
610
- if (this.needsQueue) {
611
- this.needsQueue = false;
612
- queueUpdate(this);
613
- } else if (!this.isAsync) this.call();
614
- }
615
- call() {
616
- if (this.last !== null) {
617
- this.needsQueue = this.isAsync;
618
- this.notify(this);
619
- }
620
- }
621
- *records() {
622
- let next = this.first;
623
- while (next !== void 0) {
624
- yield next;
625
- next = next.next;
626
- }
627
- }
628
- }
629
- makeSerializationNoop(ExpressionNotifierImplementation);
630
- return Object.freeze({
631
- /**
632
- * @internal
633
- * @param factory - The factory used to create array observers.
634
- */
635
- setArrayObserverFactory(factory) {
636
- createArrayObserver = factory;
637
- },
638
- /**
639
- * Gets a notifier for an object or Array.
640
- * @param source - The object or Array to get the notifier for.
641
- */
642
- getNotifier,
643
- /**
644
- * Records a property change for a source object.
645
- * @param source - The object to record the change against.
646
- * @param propertyName - The property to track as changed.
647
- */
648
- track(source, propertyName) {
649
- watcher && watcher.watch(source, propertyName);
650
- },
651
- /**
652
- * Notifies watchers that the currently executing property getter or function is volatile
653
- * with respect to its observable dependencies.
654
- */
655
- trackVolatile() {
656
- watcher && (watcher.needsRefresh = true);
657
- },
658
- /**
659
- * Notifies subscribers of a source object of changes.
660
- * @param source - the object to notify of changes.
661
- * @param args - The change args to pass to subscribers.
662
- */
663
- notify(source, args) {
664
- getNotifier(source).notify(args);
665
- },
666
- /**
667
- * Defines an observable property on an object or prototype.
668
- * @param target - The target object to define the observable on.
669
- * @param nameOrAccessor - The name of the property to define as observable;
670
- * or a custom accessor that specifies the property name and accessor implementation.
671
- */
672
- defineProperty(target, nameOrAccessor) {
673
- if (isString(nameOrAccessor)) nameOrAccessor = new DefaultObservableAccessor(nameOrAccessor);
674
- getAccessors(target).push(nameOrAccessor);
675
- Reflect.defineProperty(target, nameOrAccessor.name, {
676
- enumerable: true,
677
- get() {
678
- return nameOrAccessor.getValue(this);
679
- },
680
- set(newValue) {
681
- nameOrAccessor.setValue(this, newValue);
682
- }
683
- });
684
- },
685
- /**
686
- * Finds all the observable accessors defined on the target,
687
- * including its prototype chain.
688
- * @param target - The target object to search for accessor on.
689
- */
690
- getAccessors,
691
- /**
692
- * Creates a {@link ExpressionNotifier} that can watch the
693
- * provided {@link Expression} for changes.
694
- * @param expression - The binding to observe.
695
- * @param initialSubscriber - An initial subscriber to changes in the binding value.
696
- * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.
697
- */
698
- binding(expression, initialSubscriber, isVolatileBinding = this.isVolatileBinding(expression)) {
699
- return new ExpressionNotifierImplementation(expression, initialSubscriber, isVolatileBinding);
700
- },
701
- /**
702
- * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated
703
- * on every evaluation of the value.
704
- * @param expression - The binding to inspect.
705
- */
706
- isVolatileBinding(expression) {
707
- return volatileRegex.test(expression.toString());
708
- }
709
- });
710
- });
711
- var contextEvent = FAST.getById(KernelServiceId.contextEvent, () => {
712
- let current = null;
713
- return {
714
- get() {
715
- return current;
716
- },
717
- set(event) {
718
- current = event;
719
- }
720
- };
721
- });
11
+ //#region src/lib/flag/flag.ts
12
+ var PLACEHOLDER_DELAY = 500;
13
+ var PLACEHOLDER_TIMEOUT = 2e3;
722
14
  /**
723
- * Provides additional contextual information available to behaviors and expressions.
724
15
  * @public
16
+ * @component flag
17
+ * @testQuery code code
725
18
  */
726
- var ExecutionContext$1 = Object.freeze({
727
- /**
728
- * A default execution context.
729
- */
730
- default: {
731
- index: 0,
732
- length: 0,
733
- get event() {
734
- return ExecutionContext$1.getEvent();
735
- },
736
- eventDetail() {
737
- return this.event.detail;
738
- },
739
- eventTarget() {
740
- return this.event.target;
741
- }
742
- },
743
- /**
744
- * Gets the current event.
745
- * @returns An event object.
746
- */
747
- getEvent() {
748
- return contextEvent.get();
749
- },
750
- /**
751
- * Sets the current event.
752
- * @param event - An event object.
753
- */
754
- setEvent(event) {
755
- contextEvent.set(event);
756
- }
757
- });
758
- //#endregion
759
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/templating/markup.js
760
- /**
761
- * A unique per-session random marker string used to create placeholder tokens in HTML.
762
- * Bindings embedded in template literals are replaced with interpolation markers
763
- * of the form `fast-xxxxxx{id}fast-xxxxxx` so the compiler can later locate them in the
764
- * parsed DOM and associate each marker with its ViewBehaviorFactory.
765
- */
766
- var marker = `fast-${Math.random().toString(36).substring(2, 8)}`;
767
- var interpolationStart = `${marker}{`;
768
- var interpolationEnd = `}${marker}`;
769
- var interpolationEndLength = interpolationEnd.length;
770
- var id = 0;
771
- /** @internal */
772
- var nextId = () => `${marker}-${++id}`;
773
- Object.freeze({
774
- /**
775
- * Creates a placeholder string suitable for marking out a location *within*
776
- * an attribute value or HTML content.
777
- * @param index - The directive index to create the placeholder for.
778
- * @remarks
779
- * Used internally by binding directives.
780
- */
781
- interpolation: (id) => `${interpolationStart}${id}${interpolationEnd}`,
782
- /**
783
- * Creates a placeholder that manifests itself as an attribute on an
784
- * element.
785
- * @param attributeName - The name of the custom attribute.
786
- * @param index - The directive index to create the placeholder for.
787
- * @remarks
788
- * Used internally by attribute directives such as `ref`, `slotted`, and `children`.
789
- */
790
- attribute: (id) => `${nextId()}="${interpolationStart}${id}${interpolationEnd}"`,
791
- /**
792
- * Creates a placeholder that manifests itself as a marker within the DOM structure.
793
- * @param index - The directive index to create the placeholder for.
794
- * @remarks
795
- * Used internally by structural directives such as `repeat`.
796
- */
797
- comment: (id) => `<!--${interpolationStart}${id}${interpolationEnd}-->`
798
- });
799
- Object.freeze({
800
- /**
801
- * Parses text content or HTML attribute content, separating out the static strings
802
- * from the directives.
803
- * @param value - The content or attribute string to parse.
804
- * @param factories - A list of directives to search for in the string.
805
- * @returns A heterogeneous array of static strings interspersed with
806
- * directives or null if no directives are found in the string.
807
- */
808
- parse(value, factories) {
809
- const parts = value.split(interpolationStart);
810
- if (parts.length === 1) return null;
811
- const result = [];
812
- for (let i = 0, ii = parts.length; i < ii; ++i) {
813
- const current = parts[i];
814
- const index = current.indexOf(interpolationEnd);
815
- let literal;
816
- if (index === -1) literal = current;
817
- else {
818
- const factoryId = current.substring(0, index);
819
- result.push(factories[factoryId]);
820
- literal = current.substring(index + interpolationEndLength);
821
- }
822
- if (literal !== "") result.push(literal);
823
- }
824
- return result;
825
- } });
826
- //#endregion
827
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/utilities.js
828
- /**
829
- * Bridges between ViewBehaviors and HostBehaviors, enabling a host to
830
- * control ViewBehaviors.
831
- * @public
832
- */
833
- var ViewBehaviorOrchestrator = Object.freeze({
834
- /**
835
- * Creates a ViewBehaviorOrchestrator.
836
- * @param source - The source to to associate behaviors with.
837
- * @returns A ViewBehaviorOrchestrator.
838
- */
839
- create(source) {
840
- const behaviors = [];
841
- const targets = {};
842
- let unbindables = null;
843
- let isConnected = false;
844
- return {
845
- source,
846
- context: ExecutionContext$1.default,
847
- targets,
848
- get isBound() {
849
- return isConnected;
850
- },
851
- addBehaviorFactory(factory, target) {
852
- var _a, _b, _c, _d;
853
- const compiled = factory;
854
- compiled.id = (_a = compiled.id) !== null && _a !== void 0 ? _a : nextId();
855
- compiled.targetNodeId = (_b = compiled.targetNodeId) !== null && _b !== void 0 ? _b : nextId();
856
- compiled.targetTagName = (_c = target.tagName) !== null && _c !== void 0 ? _c : null;
857
- compiled.policy = (_d = compiled.policy) !== null && _d !== void 0 ? _d : DOM$1.policy;
858
- this.addTarget(compiled.targetNodeId, target);
859
- this.addBehavior(compiled.createBehavior());
860
- },
861
- addTarget(nodeId, target) {
862
- targets[nodeId] = target;
863
- },
864
- addBehavior(behavior) {
865
- behaviors.push(behavior);
866
- if (isConnected) behavior.bind(this);
867
- },
868
- onUnbind(unbindable) {
869
- if (unbindables === null) unbindables = [];
870
- unbindables.push(unbindable);
871
- },
872
- connectedCallback(controller) {
873
- if (!isConnected) {
874
- isConnected = true;
875
- behaviors.forEach((x) => x.bind(this));
876
- }
877
- },
878
- disconnectedCallback(controller) {
879
- if (isConnected) {
880
- isConnected = false;
881
- if (unbindables !== null) unbindables.forEach((x) => x.unbind(this));
882
- }
883
- }
884
- };
885
- } });
886
- //#endregion
887
- //#region src/lib/data-grid/data-grid.ts
888
- var DataGridSelectionMode = {
889
- none: "none",
890
- singleRow: "single-row",
891
- multiRow: "multi-row",
892
- singleCell: "single-cell",
893
- multiCell: "multi-cell"
894
- };
895
- /**
896
- * @public
897
- * @component data-grid
898
- * @slot - Default slot.
899
- * @event {CustomEvent<{cell: HTMLElement, row: HTMLElement, isHeaderCell: boolean, columnDataKey: string}>} cell-click - Event that fires when a cell is clicked
900
- */
901
- var DataGrid = class DataGrid extends VividElement {
902
- /**
903
- * generates a gridTemplateColumns based on columndata array
904
- */
905
- static generateTemplateColumns(columnDefinitions) {
906
- let templateColumns = "";
907
- columnDefinitions.forEach((_) => {
908
- templateColumns = `${templateColumns}${templateColumns === "" ? "" : " "}1fr`;
909
- });
910
- return templateColumns;
911
- }
912
- /**
913
- * @internal
914
- */
915
- noTabbingChanged() {
916
- if (this.$fastController.isConnected) this.#setTabIndex();
917
- }
918
- #setTabIndex() {
919
- this.setAttribute("tabIndex", this.noTabbing || this.contains(document.activeElement) ? "-1" : "0");
920
- }
921
- /**
922
- * @internal
923
- */
924
- generateHeaderChanged() {
925
- if (this.$fastController.isConnected) this.toggleGeneratedHeader();
926
- }
927
- /**
928
- * @internal
929
- */
930
- gridTemplateColumnsChanged() {
931
- /* v8 ignore if -- @preserve */
932
- if (this.$fastController.isConnected) {
933
- this.updateRowIndexes();
934
- if (this.fixedColumns && this.fixedColumns > 0) this.applyFixedColumns();
935
- }
936
- }
937
- /**
938
- * @internal
939
- */
940
- rowsDataChanged() {
941
- if (this.columnDefinitions === null && this.rowsData.length > 0) this.columnDefinitions = DataGrid.generateColumns(this.rowsData[0]);
942
- if (this.$fastController.isConnected) this.toggleGeneratedHeader();
943
- }
944
- /**
945
- * @internal
946
- */
947
- columnDefinitionsChanged() {
948
- if (this.columnDefinitions === null) {
949
- this.generatedGridTemplateColumns = "";
950
- return;
951
- }
952
- this.generatedGridTemplateColumns = DataGrid.generateTemplateColumns(this.columnDefinitions);
953
- /* v8 ignore if -- @preserve */
954
- if (this.$fastController.isConnected) {
955
- this.columnDefinitionsStale = true;
956
- this.queueRowIndexUpdate();
957
- }
958
- }
959
- /**
960
- * @internal
961
- */
962
- headerCellItemTemplateChanged() {
963
- /* v8 ignore if -- @preserve */
964
- if (this.$fastController.isConnected) {
965
- if (this.generatedHeader !== null) this.generatedHeader.headerCellItemTemplate = this.headerCellItemTemplate;
966
- }
967
- }
968
- /**
969
- * @internal
970
- */
971
- focusRowIndexChanged() {
972
- if (this.$fastController.isConnected) this.queueFocusUpdate();
973
- }
974
- /**
975
- * @internal
976
- */
977
- focusColumnIndexChanged() {
978
- if (this.$fastController.isConnected) this.queueFocusUpdate();
979
- }
980
- /**
981
- * @internal
982
- */
983
- fixedColumnsChanged() {
984
- /* v8 ignore if -- @preserve */
985
- if (this.$fastController.isConnected) {
986
- this.applyFixedColumns();
987
- this.setupResizeObserver();
988
- }
989
- }
990
- /**
991
- * @internal
992
- */
993
- setupResizeObserver() {
994
- if (this.resizeObserver) {
995
- this.resizeObserver.disconnect();
996
- this.resizeObserver = void 0;
997
- }
998
- if (typeof ResizeObserver !== "undefined" && this.fixedColumns && this.fixedColumns > 0) {
999
- this.resizeObserver = new ResizeObserver(() => {
1000
- this.applyFixedColumns();
1001
- });
1002
- this.resizeObserver.observe(this);
1003
- }
1004
- }
1005
- /**
1006
- * @internal
1007
- */
1008
- connectedCallback() {
1009
- super.connectedCallback();
1010
- /* v8 ignore else -- @preserve */
1011
- if (this.rowItemTemplate === void 0) this.rowItemTemplate = this.defaultRowItemTemplate;
1012
- /* v8 ignore else -- @preserve */
1013
- if (this.behaviorOrchestrator === null) {
1014
- this.behaviorOrchestrator = ViewBehaviorOrchestrator.create(this);
1015
- this.$fastController.addBehavior(this.behaviorOrchestrator);
1016
- this.behaviorOrchestrator.addBehaviorFactory(new RepeatDirective(normalizeBinding((x) => x.rowsData), normalizeBinding((x) => x.rowItemTemplate), { positioning: true }), this.appendChild(document.createComment("")));
1017
- }
1018
- this.toggleGeneratedHeader();
1019
- this.addEventListener("row-focused", this.handleRowFocus);
1020
- this.addEventListener(eventFocus, this.handleFocus);
1021
- this.addEventListener(eventKeyDown, this.handleKeydown);
1022
- this.addEventListener(eventFocusOut, this.handleFocusOut);
1023
- this.observer = new MutationObserver(this.onChildListChange);
1024
- this.observer.observe(this, { childList: true });
1025
- this.setupResizeObserver();
1026
- Updates.enqueue(this.queueRowIndexUpdate);
1027
- this.#setTabIndex();
1028
- Observable.getNotifier(this).subscribe(this.#changeHandler, "columnDefinitions");
1029
- }
1030
- /**
1031
- * @internal
1032
- */
1033
- disconnectedCallback() {
1034
- super.disconnectedCallback();
1035
- this.removeEventListener("row-focused", this.handleRowFocus);
1036
- this.removeEventListener(eventFocus, this.handleFocus);
1037
- this.removeEventListener(eventKeyDown, this.handleKeydown);
1038
- this.removeEventListener(eventFocusOut, this.handleFocusOut);
1039
- this.observer.disconnect();
1040
- if (this.resizeObserver) {
1041
- this.resizeObserver.disconnect();
1042
- this.resizeObserver = void 0;
1043
- }
1044
- this.generatedHeader = null;
1045
- Observable.getNotifier(this).unsubscribe(this.#changeHandler, "columnDefinitions");
1046
- }
1047
- /**
1048
- * @internal
1049
- */
1050
- handleRowFocus(e) {
1051
- this.isUpdatingFocus = true;
1052
- const focusRow = e.target;
1053
- this.focusRowIndex = this.rowElements.indexOf(focusRow);
1054
- this.focusColumnIndex = focusRow.focusColumnIndex;
1055
- this.setAttribute("tabIndex", "-1");
1056
- this.isUpdatingFocus = false;
1057
- }
1058
- /**
1059
- * @internal
1060
- */
1061
- handleFocus(_) {
1062
- this.focusOnCell(this.focusRowIndex, this.focusColumnIndex, true);
1063
- }
1064
- /**
1065
- * @internal
1066
- */
1067
- handleFocusOut(e) {
1068
- if (e.relatedTarget === null || !this.contains(e.relatedTarget)) this.setAttribute("tabIndex", this.noTabbing ? "-1" : "0");
1069
- }
1070
- /**
1071
- * @internal
1072
- */
1073
- handleKeydown(e) {
1074
- if (e.defaultPrevented) return;
1075
- let newFocusRowIndex;
1076
- const maxIndex = this.rowElements.length - 1;
1077
- const currentGridBottom = this.offsetHeight + this.scrollTop;
1078
- const lastRow = this.rowElements[maxIndex];
1079
- switch (e.key) {
1080
- case keyArrowUp:
1081
- e.preventDefault();
1082
- this.focusOnCell(this.focusRowIndex - 1, this.focusColumnIndex, true);
1083
- break;
1084
- case keyArrowDown:
1085
- e.preventDefault();
1086
- this.focusOnCell(this.focusRowIndex + 1, this.focusColumnIndex, true);
1087
- break;
1088
- case keyPageUp:
1089
- e.preventDefault();
1090
- if (this.rowElements.length === 0) {
1091
- this.focusOnCell(0, 0, false);
1092
- break;
1093
- }
1094
- if (this.focusRowIndex === 0) {
1095
- this.focusOnCell(0, this.focusColumnIndex, false);
1096
- return;
1097
- }
1098
- newFocusRowIndex = this.focusRowIndex - 1;
1099
- for (; newFocusRowIndex >= 0; newFocusRowIndex--) {
1100
- const thisRow = this.rowElements[newFocusRowIndex];
1101
- if (thisRow.offsetTop < this.scrollTop) {
1102
- this.scrollTop = thisRow.offsetTop + thisRow.clientHeight - this.clientHeight;
1103
- break;
1104
- }
1105
- }
1106
- this.focusOnCell(newFocusRowIndex, this.focusColumnIndex, false);
1107
- break;
1108
- case keyPageDown:
1109
- e.preventDefault();
1110
- if (this.rowElements.length === 0) {
1111
- this.focusOnCell(0, 0, false);
1112
- break;
1113
- }
1114
- if (this.focusRowIndex >= maxIndex || lastRow.offsetTop + lastRow.offsetHeight <= currentGridBottom) {
1115
- this.focusOnCell(maxIndex, this.focusColumnIndex, false);
1116
- return;
1117
- }
1118
- newFocusRowIndex = this.focusRowIndex + 1;
1119
- for (; newFocusRowIndex <= maxIndex; newFocusRowIndex++) {
1120
- const thisRow = this.rowElements[newFocusRowIndex];
1121
- if (thisRow.offsetTop + thisRow.offsetHeight > currentGridBottom) {
1122
- let stickyHeaderOffset = 0;
1123
- if (this.generateHeader === GenerateHeaderOptions.sticky && this.generatedHeader !== null) stickyHeaderOffset = this.generatedHeader.clientHeight;
1124
- this.scrollTop = thisRow.offsetTop - stickyHeaderOffset;
1125
- break;
1126
- }
1127
- }
1128
- this.focusOnCell(newFocusRowIndex, this.focusColumnIndex, false);
1129
- break;
1130
- case keyHome:
1131
- /* v8 ignore else -- @preserve */
1132
- if (e.ctrlKey) {
1133
- e.preventDefault();
1134
- this.focusOnCell(0, 0, true);
1135
- }
1136
- break;
1137
- case keyEnd:
1138
- /* v8 ignore else -- @preserve */
1139
- if (e.ctrlKey && this.columnDefinitions !== null) {
1140
- e.preventDefault();
1141
- this.focusOnCell(this.rowElements.length - 1, this.columnDefinitions.length - 1, true);
1142
- }
1143
- break;
1144
- }
1145
- }
1146
- queueFocusUpdate() {
1147
- if (this.isUpdatingFocus && this.contains(document.activeElement)) return;
1148
- if (!this.pendingFocusUpdate) {
1149
- this.pendingFocusUpdate = true;
1150
- Updates.enqueue(() => this.updateFocus());
1151
- }
1152
- }
1153
- updateFocus() {
1154
- this.pendingFocusUpdate = false;
1155
- this.focusOnCell(this.focusRowIndex, this.focusColumnIndex, true);
1156
- }
1157
- toggleGeneratedHeader() {
1158
- if (this.generatedHeader !== null) {
1159
- this.removeChild(this.generatedHeader);
1160
- this.generatedHeader = null;
1161
- }
1162
- if (this.generateHeader !== GenerateHeaderOptions.none && this.columnDefinitions !== null) {
1163
- const generatedHeaderElement = document.createElement(this.rowElementTag);
1164
- this.generatedHeader = generatedHeaderElement;
1165
- this.generatedHeader.columnDefinitions = this.columnDefinitions;
1166
- this.generatedHeader.gridTemplateColumns = this.gridTemplateColumns;
1167
- this.generatedHeader.rowType = this.generateHeader === GenerateHeaderOptions.sticky ? DataGridRowTypes.stickyHeader : DataGridRowTypes.header;
1168
- /* v8 ignore else -- @preserve */
1169
- if (this.firstChild !== null) this.insertBefore(generatedHeaderElement, this.firstChild);
1170
- return;
1171
- }
1172
- }
1173
- /**
1174
- *
1175
- *
1176
- * @internal
1177
- */
1178
- slottedRowElementsChanged() {
1179
- this._resetSelection();
1180
- }
1181
- get #selectedRows() {
1182
- return this.rowElements.filter((row) => row.selected);
1183
- }
1184
- get #selectedCells() {
1185
- return this.rowElements.reduce((acc, row) => {
1186
- const selectedCells = Array.from(row.children).filter((cell) => cell.selected);
1187
- return acc.concat(selectedCells);
1188
- }, []);
1189
- }
1190
- /**
1191
- * @internal
1192
- */
1193
- selectionModeChanged(oldValue) {
1194
- if (oldValue === void 0) {
1195
- Updates.enqueue(this._resetSelection);
19
+ var Flag = class extends VividElement {
20
+ constructor(..._args) {
21
+ super(..._args);
22
+ this.flagLoaded = false;
23
+ this.#currentRequestId = 0;
24
+ this.#abortController = null;
25
+ }
26
+ #currentRequestId;
27
+ #abortController;
28
+ /** @internal */
29
+ async codeChanged() {
30
+ const requestId = ++this.#currentRequestId;
31
+ if (this.#abortController) this.#abortController.abort();
32
+ this.#abortController = new AbortController();
33
+ const iconName = getFlagIconName(this.code);
34
+ if (!iconName) {
35
+ this._svg = "";
36
+ this.flagLoaded = true;
1196
37
  return;
1197
38
  }
1198
- this._resetSelection(true);
1199
- }
1200
- #handleKeypress;
1201
- #handleClick;
1202
- #handleCellSelection;
1203
- #handleRowSelection;
1204
- constructor() {
1205
- super();
1206
- this.noTabbing = false;
1207
- this.generateHeader = GenerateHeaderOptions.default;
1208
- this.rowsData = [];
1209
- this.columnDefinitions = null;
1210
- this.focusRowIndex = 0;
1211
- this.focusColumnIndex = 0;
1212
- this.fixedColumnsPositions = [];
1213
- this.behaviorOrchestrator = null;
1214
- this.generatedHeader = null;
1215
- this.isUpdatingFocus = false;
1216
- this.pendingFocusUpdate = false;
1217
- this.rowindexUpdateQueued = false;
1218
- this.columnDefinitionsStale = true;
1219
- this.generatedGridTemplateColumns = "";
1220
- this.focusOnCell = (rowIndex, columnIndex, scrollIntoView) => {
1221
- if (this.rowElements.length === 0) {
1222
- this.focusRowIndex = 0;
1223
- this.focusColumnIndex = 0;
1224
- return;
1225
- }
1226
- const focusRowIndex = Math.max(0, Math.min(this.rowElements.length - 1, rowIndex));
1227
- const cells = this.rowElements[focusRowIndex].querySelectorAll("[role=\"cell\"], [role=\"gridcell\"], [role=\"columnheader\"], [role=\"rowheader\"], [data-vvd-component=\"data-grid-cell\"]");
1228
- const focusTarget = cells[Math.max(0, Math.min(cells.length - 1, columnIndex))];
1229
- if (scrollIntoView && this.scrollHeight !== this.clientHeight && (focusRowIndex < this.focusRowIndex && this.scrollTop > 0 || focusRowIndex > this.focusRowIndex && this.scrollTop < this.scrollHeight - this.clientHeight)) focusTarget.scrollIntoView({
1230
- block: "center",
1231
- inline: "center"
1232
- });
1233
- focusTarget.focus();
1234
- };
1235
- this.onChildListChange = (mutations, _) => {
39
+ this._svg = void 0;
40
+ this.flagLoaded = false;
41
+ let timeout = setTimeout(() => {
1236
42
  /* v8 ignore else -- @preserve */
1237
- if (mutations && mutations.length) {
1238
- mutations.forEach((mutation) => {
1239
- mutation.addedNodes.forEach((newNode) => {
1240
- if (newNode.nodeType === 1 && (newNode.getAttribute("role") === "row" || newNode.getAttribute("row-type") === "default")) newNode.columnDefinitions = this.columnDefinitions;
1241
- });
1242
- });
1243
- this.queueRowIndexUpdate();
1244
- }
1245
- };
1246
- this.queueRowIndexUpdate = () => {
1247
- if (!this.rowindexUpdateQueued) {
1248
- this.rowindexUpdateQueued = true;
1249
- Updates.enqueue(this.updateRowIndexes);
1250
- }
1251
- };
1252
- this.updateRowIndexes = () => {
1253
- let newGridTemplateColumns = this.gridTemplateColumns;
1254
- if (newGridTemplateColumns === void 0) {
1255
- if (this.generatedGridTemplateColumns === "" && this.rowElements.length > 0) {
1256
- const firstRow = this.rowElements[0];
1257
- this.generatedGridTemplateColumns = new Array(firstRow.cellElements.length).fill("1fr").join(" ");
1258
- }
1259
- newGridTemplateColumns = this.generatedGridTemplateColumns;
1260
- }
1261
- this.rowElements.forEach((element, index) => {
1262
- const thisRow = element;
1263
- thisRow.rowIndex = index;
1264
- thisRow.gridTemplateColumns = newGridTemplateColumns;
1265
- if (this.columnDefinitionsStale) thisRow.columnDefinitions = this.columnDefinitions;
1266
- });
1267
- this.rowindexUpdateQueued = false;
1268
- this.columnDefinitionsStale = false;
1269
- };
1270
- this.#handleKeypress = (e) => {
1271
- if (e.key === "Enter" || e.key === " ") this.#handleClick(e);
1272
- };
1273
- this.#handleClick = ({ target, ctrlKey, shiftKey, metaKey }) => {
1274
- if (target.getAttribute("role") !== "gridcell" || target.getAttribute("cell-type") !== "default") return;
1275
- if (this.selectionMode === DataGridSelectionMode.singleCell || this.selectionMode === DataGridSelectionMode.multiCell) {
1276
- this.#handleCellSelection({
1277
- target,
1278
- ctrlKey,
1279
- shiftKey,
1280
- metaKey
1281
- });
1282
- return;
1283
- }
1284
- if (this.selectionMode === DataGridSelectionMode.singleRow || this.selectionMode === DataGridSelectionMode.multiRow) this.#handleRowSelection({
1285
- target,
1286
- ctrlKey,
1287
- shiftKey,
1288
- metaKey
1289
- });
1290
- };
1291
- this.#handleCellSelection = ({ target, ctrlKey, shiftKey, metaKey }) => {
1292
- const cell = target;
1293
- if (this.selectionMode === DataGridSelectionMode.multiCell && (ctrlKey || shiftKey || metaKey)) cell.selected = !this.#selectedCells.includes(cell);
1294
- else {
1295
- const cacheTargetSelection = cell.selected;
1296
- this._resetSelection(true);
1297
- cell.selected = !cacheTargetSelection;
1298
- }
1299
- };
1300
- this.#handleRowSelection = ({ target, ctrlKey, shiftKey, metaKey }) => {
1301
- const row = target.parentNode;
1302
- if (this.selectionMode === DataGridSelectionMode.multiRow && (ctrlKey || shiftKey || metaKey)) row.selected = !this.#selectedRows.includes(row);
1303
- else {
1304
- const cacheTargetSelection = row.selected;
1305
- this._resetSelection(true);
1306
- row.selected = !cacheTargetSelection;
1307
- }
1308
- };
1309
- this.#changeHandler = { handleChange(dataGrid, propertyName) {
1310
- /* v8 ignore else -- @preserve */
1311
- if (propertyName === "columnDefinitions") {
1312
- /* v8 ignore else -- @preserve */
1313
- if (dataGrid.$fastController.isConnected) dataGrid.toggleGeneratedHeader();
1314
- }
1315
- } };
1316
- this._resetSelection = (clear = false) => {
1317
- const cells = Array.from(this.querySelectorAll("[role=\"gridcell\"], [cell-type=\"default\"]"));
1318
- const rows = Array.from(this.querySelectorAll("[role=\"row\"], [row-type=\"default\"]"));
1319
- if (this.selectionMode === DataGridSelectionMode.singleCell || this.selectionMode === DataGridSelectionMode.multiCell) {
1320
- for (const cell of cells) {
1321
- cell._selectable = true;
1322
- cell.selected = clear ? false : cell.selected || false;
1323
- }
1324
- for (const row of rows) {
1325
- row._selectable = false;
1326
- row.selected = false;
1327
- }
1328
- }
1329
- if (this.selectionMode === DataGridSelectionMode.none) for (const element of [...cells, ...rows]) {
1330
- element._selectable = false;
1331
- element.selected = false;
1332
- }
1333
- if (this.selectionMode === DataGridSelectionMode.singleRow || this.selectionMode === DataGridSelectionMode.multiRow) {
1334
- for (const cell of cells) {
1335
- cell._selectable = false;
1336
- cell.selected = false;
1337
- }
1338
- for (const row of rows) {
1339
- row._selectable = true;
1340
- row.selected = clear ? false : row.selected || false;
1341
- }
1342
- }
1343
- };
1344
- this.addEventListener("click", this.#handleClick);
1345
- this.addEventListener("keydown", this.#handleKeypress);
1346
- }
1347
- #changeHandler;
1348
- static generateColumns(rowData) {
1349
- return Object.keys(rowData).map((property, index) => {
1350
- return {
1351
- columnDataKey: property,
1352
- gridColumn: `${index}`
1353
- };
1354
- });
1355
- }
1356
- /**
1357
- * @internal
1358
- */
1359
- applyFixedColumns() {
1360
- if (!this.fixedColumns || this.fixedColumns <= 0) {
1361
- this.clearFixedColumns();
1362
- return;
1363
- }
1364
- this.calculateFixedColumnPositions();
1365
- this.applyFixedColumnStyling();
1366
- }
1367
- /**
1368
- * Applies fixed columns styling using cached positions
1369
- * @internal
1370
- */
1371
- applyFixedColumnStyling() {
1372
- this.rowElements.forEach((row) => {
1373
- const cells = row.querySelectorAll("[role=\"cell\"], [role=\"gridcell\"], [role=\"columnheader\"], [cell-type=\"default\"], [cell-type=\"columnheader\"]");
1374
- this.fixedColumnsPositions.forEach((position, index) => {
1375
- /* v8 ignore else -- @preserve */
1376
- if (index < cells.length) {
1377
- const gridCell = cells[index];
43
+ if (this.#currentRequestId === requestId) {
44
+ this._svg = PLACEHOLDER_ICON;
45
+ timeout = setTimeout(() => {
1378
46
  /* v8 ignore else -- @preserve */
1379
- if (typeof gridCell.setFixedPosition === "function") gridCell.setFixedPosition(`${position}px`);
1380
- }
1381
- });
1382
- });
1383
- }
1384
- /**
1385
- * Calculates and caches fixed columns positions based on current layout
1386
- * @internal
1387
- */
1388
- calculateFixedColumnPositions() {
1389
- this.fixedColumnsPositions = [];
1390
- if (this.rowElements.length === 0) return;
1391
- const cells = this.rowElements[0].querySelectorAll("[role=\"cell\"], [role=\"gridcell\"], [role=\"columnheader\"], [cell-type=\"default\"], [cell-type=\"columnheader\"]");
1392
- let accumulator = 0;
1393
- for (let i = 0; i < Math.min(this.fixedColumns, cells.length); i++) {
1394
- this.fixedColumnsPositions.push(accumulator);
1395
- accumulator += cells[i].offsetWidth;
1396
- }
1397
- }
1398
- /**
1399
- * Clears all fixed columns state and styling
1400
- * @internal
1401
- */
1402
- clearFixedColumns() {
1403
- if (this.rowElements.length === 0) {
1404
- this.fixedColumnsPositions = [];
1405
- return;
1406
- }
1407
- this.rowElements.forEach((row) => {
1408
- const cells = row.querySelectorAll("[role=\"cell\"], [role=\"gridcell\"], [role=\"columnheader\"], [cell-type=\"default\"], [cell-type=\"columnheader\"]");
1409
- this.fixedColumnsPositions.forEach((_, index) => {
1410
- /* v8 ignore else -- @preserve */
1411
- if (index < cells.length) {
1412
- const gridCell = cells[index];
1413
- /* v8 ignore else -- @preserve */
1414
- if (typeof gridCell.setFixedPosition === "function") gridCell.setFixedPosition(void 0);
1415
- }
1416
- });
1417
- });
1418
- this.fixedColumnsPositions = [];
1419
- }
1420
- };
1421
- __decorate([attr({
1422
- attribute: "no-tabbing",
1423
- mode: "boolean"
1424
- })], DataGrid.prototype, "noTabbing", void 0);
1425
- __decorate([attr({ attribute: "generate-header" })], DataGrid.prototype, "generateHeader", void 0);
1426
- __decorate([attr({ attribute: "grid-template-columns" })], DataGrid.prototype, "gridTemplateColumns", void 0);
1427
- __decorate([observable], DataGrid.prototype, "rowsData", void 0);
1428
- __decorate([observable], DataGrid.prototype, "columnDefinitions", void 0);
1429
- __decorate([observable], DataGrid.prototype, "rowItemTemplate", void 0);
1430
- __decorate([observable], DataGrid.prototype, "cellItemTemplate", void 0);
1431
- __decorate([observable], DataGrid.prototype, "headerCellItemTemplate", void 0);
1432
- __decorate([observable], DataGrid.prototype, "focusRowIndex", void 0);
1433
- __decorate([observable], DataGrid.prototype, "focusColumnIndex", void 0);
1434
- __decorate([attr({
1435
- attribute: "fixed-columns",
1436
- converter: nullableNumberConverter
1437
- })], DataGrid.prototype, "fixedColumns", void 0);
1438
- __decorate([observable], DataGrid.prototype, "defaultRowItemTemplate", void 0);
1439
- __decorate([observable], DataGrid.prototype, "rowElementTag", void 0);
1440
- __decorate([observable], DataGrid.prototype, "rowElements", void 0);
1441
- __decorate([observable], DataGrid.prototype, "slottedRowElements", void 0);
1442
- __decorate([attr({ attribute: "selection-mode" })], DataGrid.prototype, "selectionMode", void 0);
1443
- //#endregion
1444
- //#region src/lib/data-grid/data-grid-row.ts
1445
- /**
1446
- * @public
1447
- * @component data-grid-row
1448
- * @slot - Default slot.
1449
- * @event {CustomEvent<{cell: HTMLElement, row: HTMLElement, isHeaderCell: boolean, columnDataKey: string}>} cell-click - Event that fires when a cell is clicked
1450
- * @event {CustomEvent<HTMLElement>} row-focused - Fires a custom 'row-focused' event when focus is on an element (usually a cell or its contents) in the row
1451
- */
1452
- var DataGridRow = class extends HostSemantics(VividElement) {
1453
- constructor(..._args) {
1454
- super(..._args);
1455
- this.rowType = DataGridRowTypes.default;
1456
- this.rowData = null;
1457
- this.columnDefinitions = null;
1458
- this.behaviorOrchestrator = null;
1459
- this.focusColumnIndex = 0;
1460
- this.updateRowStyle = () => {
1461
- this.style.gridTemplateColumns = this.gridTemplateColumns;
1462
- };
1463
- this.ariaSelected = null;
1464
- this._selectable = false;
1465
- this.selected = false;
1466
- }
1467
- /**
1468
- * @internal
1469
- */
1470
- gridTemplateColumnsChanged() {
1471
- if (this.$fastController.isConnected) this.updateRowStyle();
1472
- }
1473
- /**
1474
- * @internal
1475
- */
1476
- rowTypeChanged() {
1477
- if (this.$fastController.isConnected) this.updateItemTemplate();
1478
- }
1479
- /**
1480
- * @internal
1481
- */
1482
- cellItemTemplateChanged() {
1483
- this.updateItemTemplate();
1484
- }
1485
- /**
1486
- * @internal
1487
- */
1488
- headerCellItemTemplateChanged() {
1489
- this.updateItemTemplate();
1490
- }
1491
- /**
1492
- * @internal
1493
- */
1494
- connectedCallback() {
1495
- super.connectedCallback();
1496
- /* v8 ignore else -- @preserve */
1497
- if (this.behaviorOrchestrator === null) {
1498
- this.updateItemTemplate();
1499
- this.behaviorOrchestrator = ViewBehaviorOrchestrator.create(this);
1500
- this.$fastController.addBehavior(this.behaviorOrchestrator);
1501
- this.behaviorOrchestrator.addBehaviorFactory(new RepeatDirective(normalizeBinding((x) => x.columnDefinitions), normalizeBinding((x) => x.activeCellItemTemplate), { positioning: true }), this.appendChild(document.createComment("")));
1502
- }
1503
- this.addEventListener("cell-focused", this.handleCellFocus);
1504
- this.addEventListener(eventFocusOut, this.handleFocusout);
1505
- this.addEventListener(eventKeyDown, this.handleKeydown);
1506
- this.updateRowStyle();
1507
- }
1508
- /**
1509
- * @internal
1510
- */
1511
- disconnectedCallback() {
1512
- super.disconnectedCallback();
1513
- this.removeEventListener("cell-focused", this.handleCellFocus);
1514
- this.removeEventListener(eventFocusOut, this.handleFocusout);
1515
- this.removeEventListener(eventKeyDown, this.handleKeydown);
1516
- }
1517
- /**
1518
- * @internal
1519
- */
1520
- handleFocusout(_) {
1521
- /* v8 ignore else -- @preserve */
1522
- if (!this.contains(document.activeElement)) this.focusColumnIndex = 0;
1523
- }
1524
- /**
1525
- * @internal
1526
- */
1527
- handleCellFocus(e) {
1528
- this.focusColumnIndex = this.cellElements.indexOf(e.target);
1529
- this.$emit("row-focused", this);
1530
- }
1531
- /**
1532
- * @internal
1533
- */
1534
- handleKeydown(e) {
1535
- if (e.defaultPrevented) return;
1536
- switch (e.key) {
1537
- case keyArrowLeft$1: {
1538
- const newFocusColumnIndex = Math.max(0, this.focusColumnIndex - 1);
1539
- this.cellElements[newFocusColumnIndex].focus();
1540
- e.preventDefault();
1541
- break;
47
+ if (this.#currentRequestId === requestId && this._svg === PLACEHOLDER_ICON) this._svg = void 0;
48
+ }, PLACEHOLDER_TIMEOUT);
1542
49
  }
1543
- case keyArrowRight$1: {
1544
- const newFocusColumnIndex = Math.min(this.cellElements.length - 1, this.focusColumnIndex + 1);
1545
- this.cellElements[newFocusColumnIndex].focus();
1546
- e.preventDefault();
1547
- break;
50
+ }, PLACEHOLDER_DELAY);
51
+ try {
52
+ const svg = await resolveIcon(iconName, this.#abortController.signal);
53
+ /* v8 ignore else -- @preserve */
54
+ if (this.#currentRequestId === requestId) this._svg = svg;
55
+ } catch {
56
+ if (this.#currentRequestId === requestId) this._svg = void 0;
57
+ } finally {
58
+ if (this.#currentRequestId === requestId) {
59
+ clearTimeout(timeout);
60
+ this.flagLoaded = true;
1548
61
  }
1549
- case keyHome:
1550
- if (!e.ctrlKey) {
1551
- this.cellElements[0].focus();
1552
- e.preventDefault();
1553
- }
1554
- break;
1555
- case keyEnd:
1556
- if (!e.ctrlKey) {
1557
- this.cellElements[this.cellElements.length - 1].focus();
1558
- e.preventDefault();
1559
- }
1560
- break;
1561
62
  }
1562
63
  }
1563
- updateItemTemplate() {
1564
- this.activeCellItemTemplate = this.rowType === DataGridRowTypes.default && this.cellItemTemplate !== void 0 ? this.cellItemTemplate : this.rowType === DataGridRowTypes.default && this.cellItemTemplate === void 0 ? this.defaultCellItemTemplate : this.headerCellItemTemplate !== void 0 ? this.headerCellItemTemplate : this.defaultHeaderCellItemTemplate;
1565
- }
1566
- /**
1567
- * @internal
1568
- */
1569
- ariaSelectedChanged(oldValue, newValue) {
1570
- super.ariaSelectedChanged(oldValue, newValue);
1571
- this._selectable = newValue !== null;
1572
- this.selected = newValue === "true";
1573
- }
1574
64
  };
1575
- __decorate([attr({ attribute: "grid-template-columns" })], DataGridRow.prototype, "gridTemplateColumns", void 0);
1576
- __decorate([attr({ attribute: "row-type" })], DataGridRow.prototype, "rowType", void 0);
1577
- __decorate([observable], DataGridRow.prototype, "rowData", void 0);
1578
- __decorate([observable], DataGridRow.prototype, "columnDefinitions", void 0);
1579
- __decorate([observable], DataGridRow.prototype, "cellItemTemplate", void 0);
1580
- __decorate([observable], DataGridRow.prototype, "headerCellItemTemplate", void 0);
1581
- __decorate([observable], DataGridRow.prototype, "rowIndex", void 0);
1582
- __decorate([observable], DataGridRow.prototype, "activeCellItemTemplate", void 0);
1583
- __decorate([observable], DataGridRow.prototype, "defaultCellItemTemplate", void 0);
1584
- __decorate([observable], DataGridRow.prototype, "defaultHeaderCellItemTemplate", void 0);
1585
- __decorate([observable], DataGridRow.prototype, "cellElements", void 0);
1586
- __decorate([observable], DataGridRow.prototype, "_selectable", void 0);
1587
- __decorate([attr({ mode: "boolean" })], DataGridRow.prototype, "selected", void 0);
1588
- //#endregion
1589
- //#region src/lib/data-grid/data-grid.template.ts
1590
- function createRowItemTemplate(context) {
1591
- const rowTag = context.tagFor(DataGridRow);
65
+ __decorate([attr], Flag.prototype, "code", void 0);
66
+ __decorate([attr], Flag.prototype, "label", void 0);
67
+ __decorate([attr({ converter: numberConverter })], Flag.prototype, "size", void 0);
68
+ __decorate([observable], Flag.prototype, "_svg", void 0);
69
+ __decorate([observable], Flag.prototype, "flagLoaded", void 0);
70
+ //#endregion
71
+ //#region src/lib/flag/flag.template.ts
72
+ var flagTemplate = (context) => {
73
+ const visuallyHiddenTag = context.tagFor(VisuallyHidden);
74
+ const isDecorative = (x) => !x.label || x.label.trim().length === 0;
1592
75
  return html`
1593
- <${rowTag}
1594
- :rowData="${(x) => x}"
1595
- :cellItemTemplate="${(_, c) => c.parent.cellItemTemplate}"
1596
- :headerCellItemTemplate="${(_, c) => c.parent.headerCellItemTemplate}"
1597
- ></${rowTag}>
1598
- `;
1599
- }
1600
- function getMultiSelectAriaState(x) {
1601
- return x.selectionMode === void 0 || x.selectionMode === DataGridSelectionMode.none ? null : x.selectionMode.includes("multi") ? "true" : "false";
1602
- }
1603
- function setHeaderRow(x) {
1604
- if (x.columnDefinitions === null) {
1605
- const headerRow = x.querySelector("[cell-type=\"columnheader\"]")?.parentElement;
1606
- if (x.generateHeader === GenerateHeaderOptions.default && (headerRow?.getAttribute("row-type") === DataGridRowTypes.header || headerRow?.getAttribute("row-type") === DataGridRowTypes.stickyHeader)) return;
1607
- if (headerRow) {
1608
- const rowType = x.generateHeader === GenerateHeaderOptions.sticky ? DataGridRowTypes.stickyHeader : DataGridRowTypes.header;
1609
- headerRow.setAttribute("row-type", rowType);
1610
- }
1611
- }
1612
- }
1613
- function handleColumnSort(_, { event }) {
1614
- event.stopPropagation();
1615
- }
1616
- var DataGridTemplate = (context) => {
1617
- const rowItemTemplate = createRowItemTemplate(context);
1618
- const rowTag = context.tagFor(DataGridRow, true);
1619
- return html`
1620
- <template
1621
- aria-multiselectable="${getMultiSelectAriaState}"
1622
- role="grid"
1623
- tabindex="0"
1624
- @sort="${handleColumnSort}"
1625
- :rowElementTag="${() => rowTag}"
1626
- :defaultRowItemTemplate="${rowItemTemplate}"
1627
- ${children({
1628
- property: "rowElements",
1629
- filter: elements("[role=row],[data-vvd-component=data-grid-row]")
1630
- })}
76
+ <figure
77
+ class="${(x) => classNames("control", [`size-${x.size}`, typeof x.size === "number"])}"
78
+ ?aria-hidden="${(x) => isDecorative(x)}"
79
+ ?aria-busy="${(x) => !x?.flagLoaded}"
1631
80
  >
1632
- <div class="base">
1633
- ${setHeaderRow}
1634
- <slot ${slotted("slottedRowElements")}></slot>
1635
- </div>
1636
- </template>
81
+ ${when((x) => x?.flagLoaded && x?._svg, (x) => html`${html.partial(x._svg)}`)}
82
+ <${visuallyHiddenTag} class="label">${(x) => x?.label}</${visuallyHiddenTag}>
83
+ </figure>
1637
84
  `;
1638
85
  };
1639
86
  //#endregion
1640
- //#region src/lib/data-grid/data-grid-cell.ts
1641
- var defaultCellContentsTemplate = html`
1642
- <template>
1643
- ${(x) => x.rowData === null || x.columnDefinition === null || x.columnDefinition.columnDataKey === null ? null : x.rowData[x.columnDefinition.columnDataKey]}
1644
- </template>
1645
- `;
1646
- var defaultHeaderCellContentsTemplate = html`
1647
- <template>
1648
- ${(x) => x.columnDefinition.title === void 0 ? x.columnDefinition.columnDataKey : x.columnDefinition.title}
1649
- </template>
1650
- `;
1651
- /**
1652
- * @public
1653
- * @component data-grid-cell
1654
- * @slot - Default slot.
1655
- * @slot action-items - Add action items to the cell using this slot.
1656
- * @event {CustomEvent<{columnDataKey: string, ariaSort: string | null, sortDirection: string | null}>} sort - Event that fires when a sortable column header is clicked
1657
- * @event {CustomEvent<{cell: HTMLElement, row: HTMLElement, isHeaderCell: boolean, columnDataKey: string}>} cell-click - Event that fires when a cell is clicked
1658
- * @event {CustomEvent<HTMLElement>} cell-focused - Fires a custom 'cell-focused' event when focus is on the cell or its contents
1659
- */
1660
- var DataGridCell = class extends Localized(HostSemantics(VividElement)) {
1661
- constructor(..._args) {
1662
- super(..._args);
1663
- this.cellType = DataGridCellTypes.default;
1664
- this.rowData = null;
1665
- this.columnDefinition = null;
1666
- this.isActiveCell = false;
1667
- this.customCellView = null;
1668
- this.updateCellStyle = () => {
1669
- if (this.gridColumn && !this.gridColumn.includes("undefined")) this.style.gridColumn = this.gridColumn;
1670
- else this.style.removeProperty("grid-column");
1671
- };
1672
- this._selectable = false;
1673
- this.selected = false;
1674
- this.ariaSelected = null;
1675
- this.ariaSort = null;
1676
- }
1677
- /**
1678
- * @internal
1679
- */
1680
- cellTypeChanged() {
1681
- if (this.$fastController.isConnected) this.updateCellView();
1682
- }
1683
- /**
1684
- * @internal
1685
- */
1686
- gridColumnChanged() {
1687
- if (this.$fastController.isConnected) this.updateCellStyle();
1688
- }
1689
- /**
1690
- * @internal
1691
- */
1692
- columnDefinitionChanged(_oldValue, _newValue) {
1693
- if (this.$fastController.isConnected) this.updateCellView();
1694
- }
1695
- /**
1696
- * Updates the fixed column style
1697
- * @internal
1698
- */
1699
- updateFixedStyle() {
1700
- if (this.fixedPosition !== void 0) {
1701
- this.setAttribute("data-fixed", "");
1702
- this.style.left = this.fixedPosition;
1703
- } else {
1704
- this.removeAttribute("data-fixed");
1705
- this.style.removeProperty("left");
1706
- }
1707
- }
1708
- /**
1709
- * Sets the fixed state and position for this cell
1710
- * @internal
1711
- */
1712
- setFixedPosition(position) {
1713
- this.fixedPosition = position;
1714
- this.updateFixedStyle();
1715
- }
1716
- /**
1717
- * @internal
1718
- */
1719
- connectedCallback() {
1720
- super.connectedCallback();
1721
- this.addEventListener(eventFocusIn, this.handleFocusin);
1722
- this.addEventListener(eventFocusOut, this.handleFocusout);
1723
- this.addEventListener(eventKeyDown, this.handleKeydown);
1724
- this.style.gridColumn = `${this.columnDefinition?.gridColumn === void 0 ? 0 : this.columnDefinition.gridColumn}`;
1725
- this.updateCellView();
1726
- this.updateCellStyle();
1727
- this.updateFixedStyle();
1728
- }
1729
- /**
1730
- * @internal
1731
- */
1732
- disconnectedCallback() {
1733
- super.disconnectedCallback();
1734
- this.removeEventListener(eventFocusIn, this.handleFocusin);
1735
- this.removeEventListener(eventFocusOut, this.handleFocusout);
1736
- this.removeEventListener(eventKeyDown, this.handleKeydown);
1737
- this.disconnectCellView();
1738
- }
1739
- /**
1740
- * @internal
1741
- */
1742
- handleFocusin(_) {
1743
- this.shadowRoot.querySelector(".base").classList.add("active");
1744
- if (this.isActiveCell) return;
1745
- this.isActiveCell = true;
1746
- switch (this.cellType) {
1747
- case DataGridCellTypes.columnHeader:
1748
- if (this.columnDefinition !== null && this.columnDefinition.headerCellInternalFocusQueue !== true && typeof this.columnDefinition.headerCellFocusTargetCallback === "function") {
1749
- const focusTarget = this.columnDefinition.headerCellFocusTargetCallback(this);
1750
- /* v8 ignore else -- @preserve */
1751
- if (focusTarget !== null) focusTarget.focus();
1752
- }
1753
- break;
1754
- default:
1755
- if (this.columnDefinition !== null && this.columnDefinition.cellInternalFocusQueue !== true && typeof this.columnDefinition.cellFocusTargetCallback === "function") {
1756
- const focusTarget = this.columnDefinition.cellFocusTargetCallback(this);
1757
- /* v8 ignore else -- @preserve */
1758
- if (focusTarget !== null) focusTarget.focus();
1759
- }
1760
- break;
1761
- }
1762
- this.$emit("cell-focused", this);
1763
- }
1764
- /**
1765
- * @internal
1766
- */
1767
- handleFocusout(_) {
1768
- this.shadowRoot.querySelector(".base").classList.remove("active");
1769
- /* v8 ignore else -- @preserve */
1770
- if (this !== document.activeElement && !this.contains(document.activeElement)) this.isActiveCell = false;
1771
- }
1772
- /**
1773
- * @internal
1774
- */
1775
- handleKeydown(e) {
1776
- if (e.defaultPrevented || this.columnDefinition === null || this.cellType === DataGridCellTypes.default && this.columnDefinition.cellInternalFocusQueue !== true || this.cellType === DataGridCellTypes.columnHeader && this.columnDefinition.headerCellInternalFocusQueue !== true) return;
1777
- switch (e.key) {
1778
- case keyEnter:
1779
- case keyFunction2:
1780
- if (this.contains(document.activeElement) && document.activeElement !== this) return;
1781
- switch (this.cellType) {
1782
- case DataGridCellTypes.columnHeader:
1783
- if (this.columnDefinition.headerCellFocusTargetCallback !== void 0) {
1784
- const focusTarget = this.columnDefinition.headerCellFocusTargetCallback(this);
1785
- /* v8 ignore else -- @preserve */
1786
- if (focusTarget !== null) focusTarget.focus();
1787
- e.preventDefault();
1788
- }
1789
- break;
1790
- default:
1791
- if (this.columnDefinition.cellFocusTargetCallback !== void 0) {
1792
- const focusTarget = this.columnDefinition.cellFocusTargetCallback(this);
1793
- /* v8 ignore else -- @preserve */
1794
- if (focusTarget !== null) focusTarget.focus();
1795
- e.preventDefault();
1796
- }
1797
- break;
1798
- }
1799
- break;
1800
- case keyEscape:
1801
- /* v8 ignore else -- @preserve */
1802
- if (this.contains(document.activeElement) && document.activeElement !== this) {
1803
- this.focus();
1804
- e.preventDefault();
1805
- }
1806
- break;
1807
- }
1808
- }
1809
- updateCellView() {
1810
- this.disconnectCellView();
1811
- if (this.columnDefinition === null) return;
1812
- switch (this.cellType) {
1813
- case DataGridCellTypes.columnHeader:
1814
- if (this.columnDefinition.headerCellTemplate !== void 0) this.customCellView = this.columnDefinition.headerCellTemplate.render(this, this);
1815
- else this.customCellView = defaultHeaderCellContentsTemplate.render(this, this);
1816
- break;
1817
- case DataGridCellTypes.rowHeader:
1818
- case DataGridCellTypes.default:
1819
- if (this.columnDefinition.cellTemplate !== void 0) this.customCellView = this.columnDefinition.cellTemplate.render(this, this);
1820
- else this.customCellView = defaultCellContentsTemplate.render(this, this);
1821
- break;
1822
- }
1823
- if (!this.columnDefinition?.sortable) this.sortDirection = void 0;
1824
- else if (this.columnDefinition.sortDirection) this.sortDirection = this.columnDefinition.sortDirection;
1825
- else this.sortDirection = DataGridCellSortStates.none;
1826
- }
1827
- disconnectCellView() {
1828
- if (this.customCellView !== null) {
1829
- this.customCellView.dispose();
1830
- this.customCellView = null;
1831
- }
1832
- }
1833
- /**
1834
- * @internal
1835
- */
1836
- ariaSelectedChanged(prevValue, newValue) {
1837
- super.ariaSelectedChanged(prevValue, newValue);
1838
- this._selectable = newValue !== null;
1839
- this.selected = newValue === "true";
1840
- }
1841
- /**
1842
- * @internal
1843
- */
1844
- ariaSortChanged(oldValue, newValue) {
1845
- super.ariaSortChanged(oldValue, newValue);
1846
- if (newValue === null) {
1847
- this.sortDirection = void 0;
1848
- return;
1849
- }
1850
- this.sortDirection = newValue;
1851
- }
1852
- #getColumnDataKey() {
1853
- return this.columnDefinition && this.columnDefinition.columnDataKey ? this.columnDefinition.columnDataKey : this.textContent.trim();
1854
- }
1855
- /**
1856
- * @internal
1857
- */
1858
- _handleInteraction() {
1859
- const isHeaderCell = this.cellType === "columnheader";
1860
- if (isHeaderCell && this.sortDirection !== void 0) this.$emit("sort", {
1861
- columnDataKey: this.#getColumnDataKey(),
1862
- sortDirection: this.sortDirection
1863
- });
1864
- if (!(isHeaderCell ? this.columnDefinition?.headerCellInternalFocusQueue : this.columnDefinition?.cellInternalFocusQueue)) this.$emit("cell-click", {
1865
- cell: this,
1866
- row: this.parentElement,
1867
- isHeaderCell,
1868
- columnDataKey: this.#getColumnDataKey()
1869
- });
1870
- return true;
1871
- }
1872
- };
1873
- __decorate([attr({ attribute: "cell-type" })], DataGridCell.prototype, "cellType", void 0);
1874
- __decorate([attr({ attribute: "grid-column" })], DataGridCell.prototype, "gridColumn", void 0);
1875
- __decorate([observable], DataGridCell.prototype, "rowData", void 0);
1876
- __decorate([observable], DataGridCell.prototype, "columnDefinition", void 0);
1877
- __decorate([observable], DataGridCell.prototype, "_selectable", void 0);
1878
- __decorate([attr({ mode: "boolean" })], DataGridCell.prototype, "selected", void 0);
1879
- __decorate([attr({ attribute: "sort-direction" })], DataGridCell.prototype, "sortDirection", void 0);
1880
- __decorate([observable], DataGridCell.prototype, "_actionItemsSlottedContent", void 0);
1881
- //#endregion
1882
- //#region src/lib/data-grid/data-grid-row.template.ts
1883
- function calculateAriaSelectedValue$1(x) {
1884
- if (x._selectable && x.selected) return "true";
1885
- if (x._selectable && !x.selected) return "false";
1886
- return null;
1887
- }
1888
- function createCellItemTemplate(context) {
1889
- const cellTag = context.tagFor(DataGridCell);
1890
- return html`
1891
- <${cellTag}
1892
- cell-type="${(x) => x.isRowHeader ? "rowheader" : void 0}"
1893
- grid-column="${(_, c) => c.index + 1}"
1894
- :rowData="${(_, c) => c.parent.rowData}"
1895
- :columnDefinition="${(x) => x}"
1896
- selected="${(_, c) => c.parent.ariaSelected === "true" ? true : null}"
1897
- ></${cellTag}>
1898
- `;
1899
- }
1900
- function createHeaderCellItemTemplate(context) {
1901
- const cellTag = context.tagFor(DataGridCell);
1902
- return html`
1903
- <${cellTag}
1904
- cell-type="columnheader"
1905
- grid-column="${(_, c) => c.index + 1}"
1906
- :columnDefinition="${(x) => x}"
1907
- ></${cellTag}>
1908
- `;
1909
- }
1910
- var DataGridRowTemplate = (context) => {
1911
- const cellItemTemplate = createCellItemTemplate(context);
1912
- const headerCellItemTemplate = createHeaderCellItemTemplate(context);
1913
- const getBaseClasses = (x) => classNames("base", ["selected", !!x.selected]);
1914
- return html`
1915
- <template
1916
- ${applyHostSemantics({
1917
- role: "row",
1918
- ariaSelected: calculateAriaSelectedValue$1
1919
- })}
1920
- class="${(x) => x.rowType !== "default" ? x.rowType : ""}"
1921
- :defaultCellItemTemplate="${cellItemTemplate}"
1922
- :defaultHeaderCellItemTemplate="${headerCellItemTemplate}"
1923
- ${children({
1924
- property: "cellElements",
1925
- filter: elements("[role=\"cell\"],[role=\"gridcell\"],[role=\"columnheader\"],[role=\"rowheader\"],[data-vvd-component=\"data-grid-cell\"]")
1926
- })}
1927
- >
1928
- <div
1929
- class="${getBaseClasses}"
1930
- style="grid-template-columns: ${(x) => x.gridTemplateColumns};"
1931
- >
1932
- <slot ${slotted("slottedCellElements")}></slot>
1933
- </div>
1934
- </template>
1935
- `;
1936
- };
1937
- //#endregion
1938
- //#region src/lib/data-grid/data-grid-cell.template.ts
1939
- function shouldShowSortIcons(x) {
1940
- return x.cellType === "columnheader" && x.sortDirection !== void 0 && x.sortDirection !== DataGridCellSortStates.other;
1941
- }
1942
- function getSortIcon(x) {
1943
- if (x.sortDirection === DataGridCellSortStates.ascending) return "sort-asc-solid";
1944
- if (x.sortDirection === DataGridCellSortStates.descending) return "sort-desc-solid";
1945
- return "sort-solid";
1946
- }
1947
- function calculateAriaSelectedValue(x) {
1948
- if (x._selectable && x.selected) return "true";
1949
- if (x._selectable && !x.selected) return "false";
1950
- return null;
1951
- }
1952
- function renderSortIcons(c) {
1953
- const iconTag = c.tagFor(Icon);
1954
- return html`
1955
- ${when(shouldShowSortIcons, html`
1956
- <${iconTag} class="header-icon" name="${getSortIcon}"></${iconTag}>
1957
- `)}
1958
- `;
1959
- }
1960
- function shouldAnnounceSortState(x) {
1961
- return x.cellType === DataGridCellTypes.columnHeader && x.sortDirection !== void 0;
1962
- }
1963
- function getSortStateKey(x) {
1964
- return x.sortDirection ?? DataGridCellSortStates.none;
1965
- }
1966
- function getLocalizedSortStatus(x) {
1967
- const direction = getSortStateKey(x);
1968
- return x.locale.dataGrid.cell.sortStatus?.[direction];
1969
- }
1970
- function getLocalizedSortInstruction(x) {
1971
- const direction = getSortStateKey(x);
1972
- return x.locale.dataGrid.cell.sortInstruction?.[direction];
1973
- }
1974
- function getSortAnnouncement(x) {
1975
- return [getLocalizedSortStatus(x), getLocalizedSortInstruction(x)].filter((part) => !!part).join(" ").trim();
1976
- }
1977
- function handleKeyDown(x, e) {
1978
- if (e.key === keyEnter || e.key === keySpace) {
1979
- if (e.target.closest("[slot=\"action-items\"]")) return true;
1980
- x._handleInteraction();
1981
- }
1982
- return true;
1983
- }
1984
- function handleClick(x, e) {
1985
- if (e.target.closest("[slot=\"action-items\"]")) return true;
1986
- x._handleInteraction();
1987
- return true;
1988
- }
1989
- var DataGridCellTemplate = (context) => {
1990
- const visuallyHiddenTagName = context.tagFor(VisuallyHidden);
1991
- const getBaseClasses = ({ selected, _actionItemsSlottedContent }) => classNames("base", ["selected", selected], ["has-action-items", Boolean(_actionItemsSlottedContent?.length)]);
1992
- return html`
1993
- <template
1994
- tabindex="-1"
1995
- ${applyHostSemantics({
1996
- role: (x) => DataGridCellRole[x.cellType] ?? DataGridCellRole.default,
1997
- ariaSelected: calculateAriaSelectedValue,
1998
- ariaSort: (x) => x.sortDirection ?? null
1999
- })}
2000
- @click="${(x, c) => handleClick(x, c.event)}"
2001
- @keydown="${(x, c) => handleKeyDown(x, c.event)}"
2002
- >
2003
- <div class="${getBaseClasses}">
2004
- <div
2005
- class="content"
2006
- role="${(x) => shouldShowSortIcons(x) ? "button" : void 0}"
2007
- >
2008
- ${(x) => x.selected ? html`<${visuallyHiddenTagName}
2009
- data-announcement="selection"
2010
- >
2011
- ${(x) => x.locale.dataGrid.cell.selected}
2012
- </${visuallyHiddenTagName}>` : null}
2013
- <slot></slot>
2014
- ${when(shouldShowSortIcons, html`<${visuallyHiddenTagName}
2015
- data-announcement="button-role"
2016
- >
2017
- ${(x) => x.locale.dataGrid.cell.button}
2018
- </${visuallyHiddenTagName}>
2019
- `)}
2020
- ${when(shouldAnnounceSortState, html`<${visuallyHiddenTagName}
2021
- aria-live="polite"
2022
- data-announcement="sort-state"
2023
- >
2024
- ${getSortAnnouncement}
2025
- </${visuallyHiddenTagName}>`)}
2026
- ${(_) => renderSortIcons(context)}
2027
- </div>
2028
- <slot
2029
- name="action-items"
2030
- ${slotted("_actionItemsSlottedContent")}
2031
- ></slot>
2032
- </div>
2033
- </template>
2034
- `;
2035
- };
2036
- //#endregion
2037
- //#region src/lib/data-grid/definition.ts
2038
- /**
2039
- * @internal
2040
- */
2041
- var dataGridCellDefinition = defineVividComponent("data-grid-cell", DataGridCell, DataGridCellTemplate, [iconDefinition, visuallyHiddenDefinition], { styles: data_grid_cell_default });
2042
- /**
2043
- * @internal
2044
- */
2045
- var dataGridRowDefinition = defineVividComponent("data-grid-row", DataGridRow, DataGridRowTemplate, [dataGridCellDefinition], { styles: data_grid_row_default });
2046
- /**
2047
- * @internal
2048
- */
2049
- var dataGridDefinition = defineVividComponent("data-grid", DataGrid, DataGridTemplate, [dataGridRowDefinition], { styles: data_grid_default });
87
+ //#region src/lib/flag/definition.ts
88
+ /** @internal */
89
+ var flagDefinition = defineVividComponent("flag", Flag, flagTemplate, [visuallyHiddenDefinition], { styles: flag_default });
2050
90
  /**
2051
- * Registers the data-grid element with the design system.
91
+ * Registers the flag component & its prerequisite components with the design system.
2052
92
  *
2053
93
  * @param prefix - the prefix to use for the component name
2054
94
  */
2055
- var registerDataGrid = createRegisterFunction(dataGridDefinition);
95
+ var registerFlag = createRegisterFunction(flagDefinition);
2056
96
  //#endregion
2057
- export { DataGridCell as a, registerDataGrid as i, dataGridDefinition as n, DataGridRow as o, dataGridRowDefinition as r, DataGrid as s, dataGridCellDefinition as t };
97
+ export { registerFlag as n, Flag as r, flagDefinition as t };