@aceshooting/lyra-ui 2.4.0 → 2.5.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 (307) hide show
  1. package/README.md +32 -3
  2. package/custom-elements.json +505 -87
  3. package/dist/components/app-rail/app-rail-item.class.d.ts.map +1 -1
  4. package/dist/components/app-rail/app-rail-item.class.js +6 -1
  5. package/dist/components/app-rail/app-rail-item.class.js.map +1 -1
  6. package/dist/components/app-rail/app-rail.class.js +1 -1
  7. package/dist/components/app-rail/app-rail.class.js.map +1 -1
  8. package/dist/components/attachment-chip/attachment-chip.class.d.ts.map +1 -1
  9. package/dist/components/attachment-chip/attachment-chip.class.js +13 -5
  10. package/dist/components/attachment-chip/attachment-chip.class.js.map +1 -1
  11. package/dist/components/attachment-trigger/attachment-trigger.class.d.ts +4 -4
  12. package/dist/components/attachment-trigger/attachment-trigger.class.d.ts.map +1 -1
  13. package/dist/components/attachment-trigger/attachment-trigger.class.js +8 -7
  14. package/dist/components/attachment-trigger/attachment-trigger.class.js.map +1 -1
  15. package/dist/components/avatar/avatar.class.d.ts +26 -12
  16. package/dist/components/avatar/avatar.class.d.ts.map +1 -1
  17. package/dist/components/avatar/avatar.class.js +60 -13
  18. package/dist/components/avatar/avatar.class.js.map +1 -1
  19. package/dist/components/avatar/avatar.styles.d.ts.map +1 -1
  20. package/dist/components/avatar/avatar.styles.js +16 -1
  21. package/dist/components/avatar/avatar.styles.js.map +1 -1
  22. package/dist/components/chart/box-plot.class.d.ts.map +1 -1
  23. package/dist/components/chart/box-plot.class.js +26 -14
  24. package/dist/components/chart/box-plot.class.js.map +1 -1
  25. package/dist/components/chart/chart.class.d.ts.map +1 -1
  26. package/dist/components/chart/chart.class.js +21 -6
  27. package/dist/components/chart/chart.class.js.map +1 -1
  28. package/dist/components/chart/histogram.class.d.ts +1 -0
  29. package/dist/components/chart/histogram.class.d.ts.map +1 -1
  30. package/dist/components/chart/histogram.class.js +8 -2
  31. package/dist/components/chart/histogram.class.js.map +1 -1
  32. package/dist/components/chart/lite-chart.class.d.ts +5 -3
  33. package/dist/components/chart/lite-chart.class.d.ts.map +1 -1
  34. package/dist/components/chart/lite-chart.class.js +27 -18
  35. package/dist/components/chart/lite-chart.class.js.map +1 -1
  36. package/dist/components/chart/lite-chart.d.ts +1 -0
  37. package/dist/components/chart/lite-chart.d.ts.map +1 -1
  38. package/dist/components/chart/lite-chart.js +1 -0
  39. package/dist/components/chart/lite-chart.js.map +1 -1
  40. package/dist/components/chart/lite-chart.styles.js +7 -7
  41. package/dist/components/chat-composer/chat-composer.class.js +1 -1
  42. package/dist/components/chat-composer/chat-composer.class.js.map +1 -1
  43. package/dist/components/chat-message/chat-message.class.d.ts +1 -0
  44. package/dist/components/chat-message/chat-message.class.d.ts.map +1 -1
  45. package/dist/components/chat-message/chat-message.class.js +1 -3
  46. package/dist/components/chat-message/chat-message.class.js.map +1 -1
  47. package/dist/components/chat-message/chat-message.styles.d.ts.map +1 -1
  48. package/dist/components/chat-message/chat-message.styles.js +15 -0
  49. package/dist/components/chat-message/chat-message.styles.js.map +1 -1
  50. package/dist/components/checkbox/checkbox.class.d.ts.map +1 -1
  51. package/dist/components/checkbox/checkbox.class.js +1 -1
  52. package/dist/components/checkbox/checkbox.class.js.map +1 -1
  53. package/dist/components/chip/chip-group.class.d.ts +4 -1
  54. package/dist/components/chip/chip-group.class.d.ts.map +1 -1
  55. package/dist/components/chip/chip-group.class.js.map +1 -1
  56. package/dist/components/chip/chip.class.d.ts +31 -13
  57. package/dist/components/chip/chip.class.d.ts.map +1 -1
  58. package/dist/components/chip/chip.class.js +46 -18
  59. package/dist/components/chip/chip.class.js.map +1 -1
  60. package/dist/components/citation-badge/citation-badge.class.d.ts +5 -1
  61. package/dist/components/citation-badge/citation-badge.class.d.ts.map +1 -1
  62. package/dist/components/citation-badge/citation-badge.class.js +15 -12
  63. package/dist/components/citation-badge/citation-badge.class.js.map +1 -1
  64. package/dist/components/code-block/code-block-core.class.d.ts +3 -0
  65. package/dist/components/code-block/code-block-core.class.d.ts.map +1 -1
  66. package/dist/components/code-block/code-block-core.class.js +4 -3
  67. package/dist/components/code-block/code-block-core.class.js.map +1 -1
  68. package/dist/components/code-block/code-block-shared.d.ts +18 -0
  69. package/dist/components/code-block/code-block-shared.d.ts.map +1 -0
  70. package/dist/components/code-block/code-block-shared.js +21 -0
  71. package/dist/components/code-block/code-block-shared.js.map +1 -0
  72. package/dist/components/code-block/code-block.class.d.ts +3 -0
  73. package/dist/components/code-block/code-block.class.d.ts.map +1 -1
  74. package/dist/components/code-block/code-block.class.js +4 -10
  75. package/dist/components/code-block/code-block.class.js.map +1 -1
  76. package/dist/components/code-block/code-block.styles.d.ts.map +1 -1
  77. package/dist/components/code-block/code-block.styles.js +9 -0
  78. package/dist/components/code-block/code-block.styles.js.map +1 -1
  79. package/dist/components/combobox/combobox.class.d.ts +3 -2
  80. package/dist/components/combobox/combobox.class.d.ts.map +1 -1
  81. package/dist/components/combobox/combobox.class.js +15 -13
  82. package/dist/components/combobox/combobox.class.js.map +1 -1
  83. package/dist/components/combobox/combobox.styles.d.ts.map +1 -1
  84. package/dist/components/combobox/combobox.styles.js +3 -0
  85. package/dist/components/combobox/combobox.styles.js.map +1 -1
  86. package/dist/components/context-meter/context-meter.class.d.ts +7 -0
  87. package/dist/components/context-meter/context-meter.class.d.ts.map +1 -1
  88. package/dist/components/context-meter/context-meter.class.js +30 -12
  89. package/dist/components/context-meter/context-meter.class.js.map +1 -1
  90. package/dist/components/conversation-item/conversation-item.class.js +2 -2
  91. package/dist/components/conversation-item/conversation-item.class.js.map +1 -1
  92. package/dist/components/date-picker/date-input.class.d.ts +3 -1
  93. package/dist/components/date-picker/date-input.class.d.ts.map +1 -1
  94. package/dist/components/date-picker/date-input.class.js +16 -9
  95. package/dist/components/date-picker/date-input.class.js.map +1 -1
  96. package/dist/components/date-picker/date-picker.class.d.ts +6 -2
  97. package/dist/components/date-picker/date-picker.class.d.ts.map +1 -1
  98. package/dist/components/date-picker/date-picker.class.js +23 -6
  99. package/dist/components/date-picker/date-picker.class.js.map +1 -1
  100. package/dist/components/date-picker/date-picker.styles.d.ts.map +1 -1
  101. package/dist/components/date-picker/date-picker.styles.js +16 -1
  102. package/dist/components/date-picker/date-picker.styles.js.map +1 -1
  103. package/dist/components/dialog/confirm.d.ts +2 -2
  104. package/dist/components/dialog/confirm.d.ts.map +1 -1
  105. package/dist/components/dialog/confirm.js +10 -7
  106. package/dist/components/dialog/confirm.js.map +1 -1
  107. package/dist/components/diff-view/diff-view.class.d.ts +3 -0
  108. package/dist/components/diff-view/diff-view.class.d.ts.map +1 -1
  109. package/dist/components/diff-view/diff-view.class.js +24 -3
  110. package/dist/components/diff-view/diff-view.class.js.map +1 -1
  111. package/dist/components/dock-panel/dock-panel.class.js +2 -2
  112. package/dist/components/dock-panel/dock-panel.class.js.map +1 -1
  113. package/dist/components/document-preview/document-preview.class.d.ts.map +1 -1
  114. package/dist/components/document-preview/document-preview.class.js +11 -11
  115. package/dist/components/document-preview/document-preview.class.js.map +1 -1
  116. package/dist/components/document-preview/document-preview.styles.d.ts.map +1 -1
  117. package/dist/components/document-preview/document-preview.styles.js +6 -1
  118. package/dist/components/document-preview/document-preview.styles.js.map +1 -1
  119. package/dist/components/export-button/export-button.class.d.ts +17 -1
  120. package/dist/components/export-button/export-button.class.d.ts.map +1 -1
  121. package/dist/components/export-button/export-button.class.js +36 -4
  122. package/dist/components/export-button/export-button.class.js.map +1 -1
  123. package/dist/components/file-input/file-input.class.d.ts +4 -0
  124. package/dist/components/file-input/file-input.class.d.ts.map +1 -1
  125. package/dist/components/file-input/file-input.class.js +16 -6
  126. package/dist/components/file-input/file-input.class.js.map +1 -1
  127. package/dist/components/file-input/file-input.styles.d.ts.map +1 -1
  128. package/dist/components/file-input/file-input.styles.js +0 -7
  129. package/dist/components/file-input/file-input.styles.js.map +1 -1
  130. package/dist/components/gauge/gauge.class.d.ts.map +1 -1
  131. package/dist/components/gauge/gauge.class.js +16 -6
  132. package/dist/components/gauge/gauge.class.js.map +1 -1
  133. package/dist/components/generation-status/generation-status.class.d.ts.map +1 -1
  134. package/dist/components/generation-status/generation-status.class.js +39 -20
  135. package/dist/components/generation-status/generation-status.class.js.map +1 -1
  136. package/dist/components/graph/graph.class.d.ts +10 -0
  137. package/dist/components/graph/graph.class.d.ts.map +1 -1
  138. package/dist/components/graph/graph.class.js +35 -9
  139. package/dist/components/graph/graph.class.js.map +1 -1
  140. package/dist/components/graph/graph.styles.d.ts.map +1 -1
  141. package/dist/components/graph/graph.styles.js +4 -0
  142. package/dist/components/graph/graph.styles.js.map +1 -1
  143. package/dist/components/heatmap/heatmap.class.d.ts +12 -10
  144. package/dist/components/heatmap/heatmap.class.d.ts.map +1 -1
  145. package/dist/components/heatmap/heatmap.class.js +43 -25
  146. package/dist/components/heatmap/heatmap.class.js.map +1 -1
  147. package/dist/components/heatmap/heatmap.styles.js +1 -1
  148. package/dist/components/json-viewer/json-viewer.class.d.ts.map +1 -1
  149. package/dist/components/json-viewer/json-viewer.class.js +20 -5
  150. package/dist/components/json-viewer/json-viewer.class.js.map +1 -1
  151. package/dist/components/kbd/kbd.class.d.ts +13 -3
  152. package/dist/components/kbd/kbd.class.d.ts.map +1 -1
  153. package/dist/components/kbd/kbd.class.js +57 -33
  154. package/dist/components/kbd/kbd.class.js.map +1 -1
  155. package/dist/components/map/map.class.d.ts +4 -0
  156. package/dist/components/map/map.class.d.ts.map +1 -1
  157. package/dist/components/map/map.class.js +24 -2
  158. package/dist/components/map/map.class.js.map +1 -1
  159. package/dist/components/map/map.styles.d.ts.map +1 -1
  160. package/dist/components/map/map.styles.js +5 -0
  161. package/dist/components/map/map.styles.js.map +1 -1
  162. package/dist/components/markdown/markdown.class.d.ts +3 -0
  163. package/dist/components/markdown/markdown.class.d.ts.map +1 -1
  164. package/dist/components/markdown/markdown.class.js +3 -0
  165. package/dist/components/markdown/markdown.class.js.map +1 -1
  166. package/dist/components/media-card/media-card.class.d.ts +4 -1
  167. package/dist/components/media-card/media-card.class.d.ts.map +1 -1
  168. package/dist/components/media-card/media-card.class.js +6 -4
  169. package/dist/components/media-card/media-card.class.js.map +1 -1
  170. package/dist/components/mention-popover/mention-popover.class.d.ts +9 -0
  171. package/dist/components/mention-popover/mention-popover.class.d.ts.map +1 -1
  172. package/dist/components/mention-popover/mention-popover.class.js +14 -2
  173. package/dist/components/mention-popover/mention-popover.class.js.map +1 -1
  174. package/dist/components/menu/menu.class.d.ts +21 -2
  175. package/dist/components/menu/menu.class.d.ts.map +1 -1
  176. package/dist/components/menu/menu.class.js +40 -9
  177. package/dist/components/menu/menu.class.js.map +1 -1
  178. package/dist/components/model-select/model-select.class.d.ts +9 -0
  179. package/dist/components/model-select/model-select.class.d.ts.map +1 -1
  180. package/dist/components/model-select/model-select.class.js +19 -4
  181. package/dist/components/model-select/model-select.class.js.map +1 -1
  182. package/dist/components/model-settings-panel/model-settings-panel.class.d.ts.map +1 -1
  183. package/dist/components/model-settings-panel/model-settings-panel.class.js +4 -3
  184. package/dist/components/model-settings-panel/model-settings-panel.class.js.map +1 -1
  185. package/dist/components/playback/playback.class.d.ts +4 -0
  186. package/dist/components/playback/playback.class.d.ts.map +1 -1
  187. package/dist/components/playback/playback.class.js +6 -2
  188. package/dist/components/playback/playback.class.js.map +1 -1
  189. package/dist/components/poll-status/poll-status.class.d.ts +3 -2
  190. package/dist/components/poll-status/poll-status.class.d.ts.map +1 -1
  191. package/dist/components/poll-status/poll-status.class.js +10 -7
  192. package/dist/components/poll-status/poll-status.class.js.map +1 -1
  193. package/dist/components/poll-status/poll-status.styles.d.ts.map +1 -1
  194. package/dist/components/poll-status/poll-status.styles.js +8 -1
  195. package/dist/components/poll-status/poll-status.styles.js.map +1 -1
  196. package/dist/components/segmented/segmented.class.d.ts +6 -0
  197. package/dist/components/segmented/segmented.class.d.ts.map +1 -1
  198. package/dist/components/segmented/segmented.class.js +12 -2
  199. package/dist/components/segmented/segmented.class.js.map +1 -1
  200. package/dist/components/select/select.class.d.ts +7 -1
  201. package/dist/components/select/select.class.d.ts.map +1 -1
  202. package/dist/components/select/select.class.js +14 -4
  203. package/dist/components/select/select.class.js.map +1 -1
  204. package/dist/components/skeleton/skeleton.class.d.ts.map +1 -1
  205. package/dist/components/skeleton/skeleton.class.js +2 -1
  206. package/dist/components/skeleton/skeleton.class.js.map +1 -1
  207. package/dist/components/source-card/source-card.class.d.ts +5 -1
  208. package/dist/components/source-card/source-card.class.d.ts.map +1 -1
  209. package/dist/components/source-card/source-card.class.js.map +1 -1
  210. package/dist/components/source-list/source-list.class.d.ts +8 -7
  211. package/dist/components/source-list/source-list.class.d.ts.map +1 -1
  212. package/dist/components/source-list/source-list.class.js +9 -8
  213. package/dist/components/source-list/source-list.class.js.map +1 -1
  214. package/dist/components/source-list/source-list.styles.d.ts.map +1 -1
  215. package/dist/components/source-list/source-list.styles.js +10 -0
  216. package/dist/components/source-list/source-list.styles.js.map +1 -1
  217. package/dist/components/sparkline/sparkline.styles.js +2 -2
  218. package/dist/components/split/split.class.d.ts +1 -1
  219. package/dist/components/split/split.class.d.ts.map +1 -1
  220. package/dist/components/split/split.class.js +6 -1
  221. package/dist/components/split/split.class.js.map +1 -1
  222. package/dist/components/stat/stat.class.js +2 -2
  223. package/dist/components/stat/stat.class.js.map +1 -1
  224. package/dist/components/stepper/stepper.class.d.ts +6 -1
  225. package/dist/components/stepper/stepper.class.d.ts.map +1 -1
  226. package/dist/components/stepper/stepper.class.js +4 -1
  227. package/dist/components/stepper/stepper.class.js.map +1 -1
  228. package/dist/components/stream-status/stream-status.class.d.ts.map +1 -1
  229. package/dist/components/stream-status/stream-status.class.js +5 -11
  230. package/dist/components/stream-status/stream-status.class.js.map +1 -1
  231. package/dist/components/switch/switch.class.d.ts.map +1 -1
  232. package/dist/components/switch/switch.class.js +1 -1
  233. package/dist/components/switch/switch.class.js.map +1 -1
  234. package/dist/components/table/table.class.d.ts.map +1 -1
  235. package/dist/components/table/table.class.js +7 -1
  236. package/dist/components/table/table.class.js.map +1 -1
  237. package/dist/components/thinking-panel/thinking-panel.class.d.ts +2 -1
  238. package/dist/components/thinking-panel/thinking-panel.class.d.ts.map +1 -1
  239. package/dist/components/thinking-panel/thinking-panel.class.js +14 -5
  240. package/dist/components/thinking-panel/thinking-panel.class.js.map +1 -1
  241. package/dist/components/time-range/time-range.class.d.ts +8 -3
  242. package/dist/components/time-range/time-range.class.d.ts.map +1 -1
  243. package/dist/components/time-range/time-range.class.js +10 -5
  244. package/dist/components/time-range/time-range.class.js.map +1 -1
  245. package/dist/components/time-range/time-range.styles.d.ts.map +1 -1
  246. package/dist/components/time-range/time-range.styles.js +16 -0
  247. package/dist/components/time-range/time-range.styles.js.map +1 -1
  248. package/dist/components/toast/toast-item.class.js +2 -2
  249. package/dist/components/toast/toast-item.class.js.map +1 -1
  250. package/dist/components/tool-approval-dialog/tool-approval-dialog.class.d.ts.map +1 -1
  251. package/dist/components/tool-approval-dialog/tool-approval-dialog.class.js +11 -6
  252. package/dist/components/tool-approval-dialog/tool-approval-dialog.class.js.map +1 -1
  253. package/dist/components/tool-call-chip/tool-call-chip.class.d.ts +8 -4
  254. package/dist/components/tool-call-chip/tool-call-chip.class.d.ts.map +1 -1
  255. package/dist/components/tool-call-chip/tool-call-chip.class.js +46 -16
  256. package/dist/components/tool-call-chip/tool-call-chip.class.js.map +1 -1
  257. package/dist/components/tool-param-form/tool-param-form.class.d.ts +3 -0
  258. package/dist/components/tool-param-form/tool-param-form.class.d.ts.map +1 -1
  259. package/dist/components/tool-param-form/tool-param-form.class.js +21 -16
  260. package/dist/components/tool-param-form/tool-param-form.class.js.map +1 -1
  261. package/dist/components/tool-param-form/tool-param-form.styles.d.ts.map +1 -1
  262. package/dist/components/tool-param-form/tool-param-form.styles.js +5 -0
  263. package/dist/components/tool-param-form/tool-param-form.styles.js.map +1 -1
  264. package/dist/components/tool-result-dialog/tool-result-dialog.class.d.ts +5 -5
  265. package/dist/components/tool-result-dialog/tool-result-dialog.class.d.ts.map +1 -1
  266. package/dist/components/tool-result-dialog/tool-result-dialog.class.js +18 -10
  267. package/dist/components/tool-result-dialog/tool-result-dialog.class.js.map +1 -1
  268. package/dist/components/tool-result-view/registry.d.ts +3 -3
  269. package/dist/components/tool-result-view/registry.js +3 -3
  270. package/dist/components/tool-select-dialog/tool-select-dialog.class.d.ts.map +1 -1
  271. package/dist/components/tool-select-dialog/tool-select-dialog.class.js +27 -9
  272. package/dist/components/tool-select-dialog/tool-select-dialog.class.js.map +1 -1
  273. package/dist/components/tree/tree-node.class.d.ts +1 -0
  274. package/dist/components/tree/tree-node.class.d.ts.map +1 -1
  275. package/dist/components/tree/tree-node.class.js +3 -66
  276. package/dist/components/tree/tree-node.class.js.map +1 -1
  277. package/dist/components/tree/tree-node.styles.d.ts +2 -0
  278. package/dist/components/tree/tree-node.styles.d.ts.map +1 -0
  279. package/dist/components/tree/tree-node.styles.js +68 -0
  280. package/dist/components/tree/tree-node.styles.js.map +1 -0
  281. package/dist/components/tree/tree.class.d.ts +3 -1
  282. package/dist/components/tree/tree.class.d.ts.map +1 -1
  283. package/dist/components/tree/tree.class.js +6 -1
  284. package/dist/components/tree/tree.class.js.map +1 -1
  285. package/dist/components/typing-indicator/typing-indicator.class.d.ts +14 -11
  286. package/dist/components/typing-indicator/typing-indicator.class.d.ts.map +1 -1
  287. package/dist/components/typing-indicator/typing-indicator.class.js +16 -12
  288. package/dist/components/typing-indicator/typing-indicator.class.js.map +1 -1
  289. package/dist/components/widget/widget.class.d.ts +34 -8
  290. package/dist/components/widget/widget.class.d.ts.map +1 -1
  291. package/dist/components/widget/widget.class.js +36 -16
  292. package/dist/components/widget/widget.class.js.map +1 -1
  293. package/dist/components/word-cloud/word-cloud.class.d.ts +6 -0
  294. package/dist/components/word-cloud/word-cloud.class.d.ts.map +1 -1
  295. package/dist/components/word-cloud/word-cloud.class.js +22 -8
  296. package/dist/components/word-cloud/word-cloud.class.js.map +1 -1
  297. package/dist/internal/group-by-recency.d.ts +3 -2
  298. package/dist/internal/group-by-recency.d.ts.map +1 -1
  299. package/dist/internal/group-by-recency.js.map +1 -1
  300. package/dist/internal/localization.d.ts +1 -1
  301. package/dist/internal/localization.d.ts.map +1 -1
  302. package/dist/internal/localization.js +204 -0
  303. package/dist/internal/localization.js.map +1 -1
  304. package/dist/lyra.d.ts +13 -0
  305. package/dist/lyra.d.ts.map +1 -1
  306. package/dist/lyra.js.map +1 -1
  307. package/package.json +1 -1
@@ -10,72 +10,8 @@ import { repeat } from 'lit/directives/repeat.js';
10
10
  import { LyraElement } from '../../internal/lyra-element.js';
11
11
  import { tag } from '../../internal/prefix.js';
12
12
  import { chevronIcon } from '../../internal/icons.js';
13
- import { css } from 'lit';
14
13
  import { cascadeUpdateComplete } from './update-cascade.js';
15
- const styles = css `
16
- :host {
17
- display: block;
18
- outline: none; /* the host is the focusable treeitem; the visible ring lives on [part=row] */
19
- }
20
- :host(:focus-visible) [part='row'] {
21
- outline: var(--lyra-focus-ring-width) solid var(--lyra-focus-ring-color);
22
- outline-offset: var(--lyra-focus-ring-offset);
23
- }
24
- [part='row'] {
25
- display: flex;
26
- align-items: center;
27
- gap: var(--lyra-space-xs);
28
- padding: var(--lyra-space-xs) var(--lyra-space-s);
29
- /* Depth-based indent is capped at 8rem so a deeply-nested item can't
30
- push its content off-screen with no way back; [part=label] below
31
- truncates the remaining overflow and tree.styles.ts's [part=base]
32
- adds an overflow-x:auto fallback for whatever's left. */
33
- padding-inline-start: calc(var(--lyra-space-s) + min(var(--lyra-tree-depth, 0) * 1rem, 8rem));
34
- cursor: pointer;
35
- border-radius: var(--lyra-radius);
36
- }
37
- [part='row']:hover {
38
- background: var(--lyra-color-brand-quiet);
39
- }
40
- [part='toggle'] {
41
- /* Deliberately smaller than the shared --lyra-icon-button-size (2.5rem,
42
- for standalone icon-only buttons) — this toggle sits inline in a
43
- compact row, but still needs a real touch target, not a 1rem hitbox. */
44
- min-inline-size: 1.75rem;
45
- min-block-size: 1.75rem;
46
- padding: var(--lyra-space-xs);
47
- display: inline-flex;
48
- align-items: center;
49
- justify-content: center;
50
- border: none;
51
- background: none;
52
- color: var(--lyra-color-text-quiet);
53
- cursor: pointer;
54
- flex: 0 0 auto;
55
- }
56
- [part='toggle'][hidden] {
57
- /* visibility (not display) so the placeholder keeps its layout box --
58
- a leaf row still lines up with sibling rows that do have a chevron. */
59
- visibility: hidden;
60
- }
61
- :host([expanded]) [part='toggle'] {
62
- transform: rotate(90deg);
63
- }
64
- [part='label'] {
65
- flex: 1 1 auto;
66
- min-inline-size: 0;
67
- overflow: hidden;
68
- text-overflow: ellipsis;
69
- white-space: nowrap;
70
- }
71
- [part='badge'] {
72
- font-size: 0.75rem;
73
- color: var(--lyra-color-text);
74
- background: var(--lyra-color-border);
75
- border-radius: var(--lyra-radius);
76
- padding: 0 0.35rem;
77
- }
78
- `;
14
+ import { styles } from './tree-node.styles.js';
79
15
  /**
80
16
  * `<lyra-tree-node>` — internal recursive renderer for `<lyra-tree>`.
81
17
  *
@@ -94,6 +30,7 @@ const styles = css `
94
30
  * @csspart toggle - The expand/collapse button.
95
31
  * @csspart label - The node label.
96
32
  * @csspart badge - The optional node badge.
33
+ * @csspart group - The wrapper around a node's expanded child items.
97
34
  */
98
35
  export class LyraTreeNode extends LyraElement {
99
36
  constructor() {
@@ -189,7 +126,7 @@ export class LyraTreeNode extends LyraElement {
189
126
  ${this.item.badge != null ? html `<span part="badge">${this.item.badge}</span>` : nothing}
190
127
  </div>
191
128
  ${this.expanded && this.hasChildren
192
- ? html `<div role="group">
129
+ ? html `<div part="group" role="group">
193
130
  ${repeat(this.item.children, (child) => child.id, (child, i) => html `<lyra-tree-node
194
131
  .item=${child}
195
132
  .depth=${this.depth + 1}
@@ -1 +1 @@
1
- {"version":3,"file":"tree-node.class.js","sourceRoot":"","sources":["../../../src/components/tree/tree-node.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACzD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I,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AAE7B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8CAAgC;AACjB;IAA7C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6CAAa;AACZ;IAA7C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8CAAc"}
@@ -0,0 +1,2 @@
1
+ export declare const styles: import("lit").CSSResult;
2
+ //# sourceMappingURL=tree-node.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-node.styles.d.ts","sourceRoot":"","sources":["../../../src/components/tree/tree-node.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAiElB,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { css } from 'lit';
2
+ export const styles = css `
3
+ :host {
4
+ display: block;
5
+ outline: none; /* the host is the focusable treeitem; the visible ring lives on [part=row] */
6
+ }
7
+ :host(:focus-visible) [part='row'] {
8
+ outline: var(--lyra-focus-ring-width) solid var(--lyra-focus-ring-color);
9
+ outline-offset: var(--lyra-focus-ring-offset);
10
+ }
11
+ [part='row'] {
12
+ display: flex;
13
+ align-items: center;
14
+ gap: var(--lyra-space-xs);
15
+ padding: var(--lyra-space-xs) var(--lyra-space-s);
16
+ /* Depth-based indent is capped at --lyra-size-8rem (8rem) so a deeply-nested
17
+ item can't push its content off-screen with no way back; [part=label]
18
+ below truncates the remaining overflow and tree.styles.ts's [part=base]
19
+ adds an overflow-x:auto fallback for whatever's left. */
20
+ padding-inline-start: calc(
21
+ var(--lyra-space-s) + min(var(--lyra-tree-depth, 0) * var(--lyra-space-l), var(--lyra-size-8rem))
22
+ );
23
+ cursor: pointer;
24
+ border-radius: var(--lyra-radius);
25
+ }
26
+ [part='row']:hover {
27
+ background: var(--lyra-color-brand-quiet);
28
+ }
29
+ [part='toggle'] {
30
+ /* Deliberately smaller than the shared --lyra-icon-button-size (2.5rem,
31
+ for standalone icon-only buttons) — this toggle sits inline in a
32
+ compact row, but still needs a real touch target, not a 1rem hitbox. */
33
+ min-inline-size: var(--lyra-size-1-75rem);
34
+ min-block-size: var(--lyra-size-1-75rem);
35
+ padding: var(--lyra-space-xs);
36
+ display: inline-flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+ border: none;
40
+ background: none;
41
+ color: var(--lyra-color-text-quiet);
42
+ cursor: pointer;
43
+ flex: 0 0 auto;
44
+ }
45
+ [part='toggle'][hidden] {
46
+ /* visibility (not display) so the placeholder keeps its layout box --
47
+ a leaf row still lines up with sibling rows that do have a chevron. */
48
+ visibility: hidden;
49
+ }
50
+ :host([expanded]) [part='toggle'] {
51
+ transform: rotate(90deg);
52
+ }
53
+ [part='label'] {
54
+ flex: 1 1 auto;
55
+ min-inline-size: 0;
56
+ overflow: hidden;
57
+ text-overflow: ellipsis;
58
+ white-space: nowrap;
59
+ }
60
+ [part='badge'] {
61
+ font-size: var(--lyra-font-size-xs);
62
+ color: var(--lyra-color-text);
63
+ background: var(--lyra-color-border);
64
+ border-radius: var(--lyra-radius);
65
+ padding: 0 var(--lyra-space-xs);
66
+ }
67
+ `;
68
+ //# sourceMappingURL=tree-node.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-node.styles.js","sourceRoot":"","sources":["../../../src/components/tree/tree-node.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiExB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { type PropertyValues, type TemplateResult } from 'lit';
2
2
  import { LyraElement } from '../../internal/lyra-element.js';
3
+ import '../empty/empty.class.js';
3
4
  import './tree-node.class.js';
4
5
  export interface TreeItem {
5
6
  id: string;
@@ -21,7 +22,8 @@ export interface TreeItem {
21
22
  * @customElement lyra-tree
22
23
  * @event lyra-node-toggle - `detail: { id, expanded }`, dispatched by a descendant `<lyra-tree-node>` and observed here (bubbling, composed) to keep the roving-tabindex `activeId` in sync.
23
24
  * @event lyra-node-select - `detail: { id }`, dispatched by a descendant `<lyra-tree-node>` and observed here (bubbling, composed) to keep the roving-tabindex `activeId` in sync.
24
- * @csspart base
25
+ * @csspart base - The tree's root wrapper (role="tree").
26
+ * @csspart empty - The empty-state message shown when `data` is empty.
25
27
  * @slot - `<lyra-tree-node>` elements (top-level tree items).
26
28
  */
27
29
  export declare class LyraTree extends LyraElement {
@@ -1 +1 @@
1
- {"version":3,"file":"tree.class.d.ts","sourceRoot":"","sources":["../../../src/components/tree/tree.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAK7D,OAAO,sBAAsB,CAAC;AAG9B,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC,MAAM,CAAC,MAAM,iCAAgC;IAEb,IAAI,EAAE,QAAQ,EAAE,CAAM;IACtD,oLAAoL;IACxK,KAAK,SAAM;IAEd,OAAO,CAAC,QAAQ,CAAuB;IAChD,mNAAmN;IACnN,OAAO,CAAC,cAAc,CAAuB;IAE7C,OAAO,KAAK,YAAY,GAEvB;IAED,OAAO,CAAC,UAAU;IAIlB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,mBAAmB;IA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CAAM;IACtD,oLAAoL;IACxK,KAAK,SAAM;IAEd,OAAO,CAAC,QAAQ,CAAuB;IAChD,mNAAmN;IACnN,OAAO,CAAC,cAAc,CAAuB;IAE7C,OAAO,KAAK,YAAY,GAEvB;IAED,OAAO,CAAC,UAAU;IAIlB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,QAAQ;IAShB,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAgBlD;IAED,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAS/C;IAED,kJAAkJ;IAClJ,OAAO,CAAC,SAAS;IAwBjB,OAAO,CAAC,SAAS;IAMjB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,cAAc,CAEpB;IAEF;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,UAAgB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CASpD;IAED,OAAO,CAAC,aAAa,CA2DnB;IAEF;;;;;;;;;;;;OAYG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAW/B;IAED;;;;;;;OAOG;IACH,WAAW,IAAI,IAAI,CAQlB;IAED,MAAM,IAAI,cAAc,CAgBvB;CACF;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -11,6 +11,7 @@ import { tag } from '../../internal/prefix.js';
11
11
  import { isRtl } from '../../internal/rtl.js';
12
12
  import { styles } from './tree.styles.js';
13
13
  import { cascadeUpdateComplete } from './update-cascade.js';
14
+ import '../empty/empty.class.js';
14
15
  import './tree-node.class.js';
15
16
  /**
16
17
  * `<lyra-tree>` — an expand/collapse hierarchy for graph/document navigation.
@@ -26,7 +27,8 @@ import './tree-node.class.js';
26
27
  * @customElement lyra-tree
27
28
  * @event lyra-node-toggle - `detail: { id, expanded }`, dispatched by a descendant `<lyra-tree-node>` and observed here (bubbling, composed) to keep the roving-tabindex `activeId` in sync.
28
29
  * @event lyra-node-select - `detail: { id }`, dispatched by a descendant `<lyra-tree-node>` and observed here (bubbling, composed) to keep the roving-tabindex `activeId` in sync.
29
- * @csspart base
30
+ * @csspart base - The tree's root wrapper (role="tree").
31
+ * @csspart empty - The empty-state message shown when `data` is empty.
30
32
  * @slot - `<lyra-tree-node>` elements (top-level tree items).
31
33
  */
32
34
  export class LyraTree extends LyraElement {
@@ -309,6 +311,9 @@ export class LyraTree extends LyraElement {
309
311
  @lyra-node-toggle=${this.onNodeActivate}
310
312
  @lyra-node-select=${this.onNodeActivate}
311
313
  >
314
+ ${this.data.length === 0
315
+ ? html `<lyra-empty part="empty" heading=${this.localize('noData')}></lyra-empty>`
316
+ : nothing}
312
317
  <slot></slot>
313
318
  </div>
314
319
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"tree.class.js","sourceRoot":"","sources":["../../../src/components/tree/tree.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAA4C,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,sBAAsB,CAAC;AAU9B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QAGkC,SAAI,GAAe,EAAE,CAAC;QACtD,oLAAoL;QACxK,UAAK,GAAG,EAAE,CAAC;QAEN,aAAQ,GAAkB,IAAI,CAAC;QAChD,m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CAAC,QAAQ,CAAC,gBAAgB;YACjF,CAAC,CAAC,OAAO;;;KAGd,CAAC;IACJ,CAAC;CACF;AA/RiC;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;sCAAuB;AAE1C;IAAX,QAAQ,EAAE;uCAAY;AAEN;IAAhB,KAAK,EAAE;0CAAwC"}
@@ -29,9 +29,10 @@ export type TypingIndicatorSize = 'sm' | 'md';
29
29
  * accessible name derived from `label` is sufficient, set both as an
30
30
  * `aria-label` on the host *and* as a visually-hidden text node in the
31
31
  * shadow tree, so the name survives even if only one of the two is picked up
32
- * by a given assistive-tech/browser pairing. An empty or whitespace-only
33
- * `label` falls back to the default "Thinking…" copy in both places, rather
34
- * than leaving the component with no accessible name at all. The animated dots/pulse/cursor
32
+ * by a given assistive-tech/browser pairing. An untouched-default, empty, or
33
+ * whitespace-only `label` falls back to the localized "Thinking…" copy in
34
+ * both places, rather than leaving the component with no accessible name at
35
+ * all. The animated dots/pulse/cursor
35
36
  * shape is `aria-hidden="true"` — it's decorative; `label` is the entire
36
37
  * accessible content, so nothing narrates individual animation frames.
37
38
  *
@@ -47,17 +48,19 @@ export declare class LyraTypingIndicator extends LyraElement {
47
48
  variant: TypingIndicatorVariant;
48
49
  /** Accessible name, exposed via `role="status"`. Not re-announced on every
49
50
  * animation frame — only mount (and any later change to this property)
50
- * produces a new announcement. An empty or whitespace-only value falls
51
- * back to the default "Thinking…" copy (see `accessibleLabel`) so the
52
- * component never loses its accessible name. */
51
+ * produces a new announcement. An untouched-default, empty, or
52
+ * whitespace-only value falls back to the localized "Thinking…" copy (see
53
+ * `accessibleLabel`) so the component never loses its accessible name. */
53
54
  label: string;
54
55
  /** Compact sizing for dense layouts (e.g. inline with a message bubble). */
55
56
  size: TypingIndicatorSize;
56
- /** The accessible name actually used, falling back to the default
57
- * "Thinking…" copy when `label` is set to an empty or whitespace-only
58
- * string -- otherwise both the `aria-label` and the sr-only text node
59
- * would go blank, leaving this purely-decorative component with no
60
- * accessible name at all. */
57
+ /** The accessible name actually used, falling back to the localized
58
+ * `'thinking'` message (`"Thinking…"` in English) when `label` is left at
59
+ * its untouched default or set to an empty/whitespace-only string --
60
+ * otherwise both the `aria-label` and the sr-only text node would go
61
+ * blank, leaving this purely-decorative component with no accessible name
62
+ * at all. A caller-customized `label` is used verbatim (not a translation
63
+ * concern), same convention as `<lyra-date-picker>`'s `previousLabel`. */
61
64
  private get accessibleLabel();
62
65
  protected willUpdate(changed: PropertyValues): void;
63
66
  render(): TemplateResult;
@@ -1 +1 @@
1
- {"version":3,"file":"typing-indicator.class.d.ts","sourceRoot":"","sources":["../../../src/components/typing-indicator/typing-indicator.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAI7D,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AACjE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,MAAM,CAAC,MAAM,iCAAwC;IAErD,+CAA+C;IAClB,OAAO,EAAE,sBAAsB,CAAU;IAEtE;;;;qDAIiD;IACrC,KAAK,SAAe;IAEhC,4EAA4E;IAC/C,IAAI,EAAE,mBAAmB,CAAQ;IAE9D;;;;kCAI8B;IAC9B,OAAO,KAAK,eAAe,GAE1B;IAED,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAKlD;IAED,MAAM,IAAI,cAAc,CAKvB;IAED,OAAO,CAAC,WAAW;CAWpB;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,uBAAuB,EAAE,mBAAmB,CAAC;KAC9C;CACF"}
1
+ {"version":3,"file":"typing-indicator.class.d.ts","sourceRoot":"","sources":["../../../src/components/typing-indicator/typing-indicator.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAI7D,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AACjE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,MAAM,CAAC,MAAM,iCAAwC;IAErD,+CAA+C;IAClB,OAAO,EAAE,sBAAsB,CAAU;IAEtE;;;;+EAI2E;IAC/D,KAAK,SAAe;IAEhC,4EAA4E;IAC/C,IAAI,EAAE,mBAAmB,CAAQ;IAE9D;;;;;;+EAM2E;IAC3E,OAAO,KAAK,eAAe,GAG1B;IAED,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAKlD;IAED,MAAM,IAAI,cAAc,CAKvB;IAED,OAAO,CAAC,WAAW;CAWpB;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,uBAAuB,EAAE,mBAAmB,CAAC;KAC9C;CACF"}
@@ -36,9 +36,10 @@ import { styles } from './typing-indicator.styles.js';
36
36
  * accessible name derived from `label` is sufficient, set both as an
37
37
  * `aria-label` on the host *and* as a visually-hidden text node in the
38
38
  * shadow tree, so the name survives even if only one of the two is picked up
39
- * by a given assistive-tech/browser pairing. An empty or whitespace-only
40
- * `label` falls back to the default "Thinking…" copy in both places, rather
41
- * than leaving the component with no accessible name at all. The animated dots/pulse/cursor
39
+ * by a given assistive-tech/browser pairing. An untouched-default, empty, or
40
+ * whitespace-only `label` falls back to the localized "Thinking…" copy in
41
+ * both places, rather than leaving the component with no accessible name at
42
+ * all. The animated dots/pulse/cursor
42
43
  * shape is `aria-hidden="true"` — it's decorative; `label` is the entire
43
44
  * accessible content, so nothing narrates individual animation frames.
44
45
  *
@@ -55,21 +56,24 @@ export class LyraTypingIndicator extends LyraElement {
55
56
  this.variant = 'dots';
56
57
  /** Accessible name, exposed via `role="status"`. Not re-announced on every
57
58
  * animation frame — only mount (and any later change to this property)
58
- * produces a new announcement. An empty or whitespace-only value falls
59
- * back to the default "Thinking…" copy (see `accessibleLabel`) so the
60
- * component never loses its accessible name. */
59
+ * produces a new announcement. An untouched-default, empty, or
60
+ * whitespace-only value falls back to the localized "Thinking…" copy (see
61
+ * `accessibleLabel`) so the component never loses its accessible name. */
61
62
  this.label = 'Thinking…';
62
63
  /** Compact sizing for dense layouts (e.g. inline with a message bubble). */
63
64
  this.size = 'md';
64
65
  }
65
66
  static { this.styles = [LyraElement.styles, styles, srOnly]; }
66
- /** The accessible name actually used, falling back to the default
67
- * "Thinking…" copy when `label` is set to an empty or whitespace-only
68
- * string -- otherwise both the `aria-label` and the sr-only text node
69
- * would go blank, leaving this purely-decorative component with no
70
- * accessible name at all. */
67
+ /** The accessible name actually used, falling back to the localized
68
+ * `'thinking'` message (`"Thinking…"` in English) when `label` is left at
69
+ * its untouched default or set to an empty/whitespace-only string --
70
+ * otherwise both the `aria-label` and the sr-only text node would go
71
+ * blank, leaving this purely-decorative component with no accessible name
72
+ * at all. A caller-customized `label` is used verbatim (not a translation
73
+ * concern), same convention as `<lyra-date-picker>`'s `previousLabel`. */
71
74
  get accessibleLabel() {
72
- return this.label.trim() || 'Thinking…';
75
+ const trimmed = this.label.trim();
76
+ return this.localize('thinking', trimmed === '' || trimmed === 'Thinking…' ? undefined : trimmed);
73
77
  }
74
78
  willUpdate(changed) {
75
79
  this.setAttribute('role', 'status');
@@ -1 +1 @@
1
- {"version":3,"file":"typing-indicator.class.js","sourceRoot":"","sources":["../../../src/components/typing-indicator/typing-indicator.class.ts"],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;gBACX,OAAO,IAAI,CAAA,6BAA6B,CAAC;YAC3C,KAAK,MAAM,CAAC;YACZ;gBACE,OAAO,IAAI,CAAA,0EAA0E,CAAC;QAC1F,CAAC;IACH,CAAC;CACF;AA9C8B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAA0C;AAO1D;IAAX,QAAQ,EAAE;kDAAqB;AAGH;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAkC"}
1
+ {"version":3,"file":"typing-indicator.class.js","sourceRoot":"","sources":["../../../src/components/typing-indicator/typing-indicator.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAKtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAApD;;QAGE,+CAA+C;QAClB,YAAO,GAA2B,MAAM,CAAC;QAEtE;;;;mFAI2E;QAC/D,UAAK,GAAG,WAAW,CAAC;QAEhC,4EAA4E;QAC/C,SAAI,GAAwB,IAAI,CAAC;IAuChE,CAAC;aApDQ,WAAM,GAAG,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,AAAvC,CAAwC;IAerD;;;;;;+EAM2E;IAC3E,IAAY,eAAe;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,KAAK,EAAE,IAAI,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IACpG,CAAC;IAES,UAAU,CAAC,OAAuB;QAC1C,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACpC,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;6CAC8B,IAAI,CAAC,WAAW,EAAE;8BACjC,IAAI,CAAC,eAAe;KAC7C,CAAC;IACJ,CAAC;IAEO,WAAW;QACjB,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;YACrB,KAAK,OAAO;gBACV,OAAO,IAAI,CAAA,4BAA4B,CAAC;YAC1C,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAA,6BAA6B,CAAC;YAC3C,KAAK,MAAM,CAAC;YACZ;gBACE,OAAO,IAAI,CAAA,0EAA0E,CAAC;QAC1F,CAAC;IACH,CAAC;CACF;AAjD8B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAA0C;AAO1D;IAAX,QAAQ,EAAE;kDAAqB;AAGH;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAkC"}
@@ -2,13 +2,27 @@ import { type TemplateResult, type PropertyValues } from 'lit';
2
2
  import { LyraElement } from '../../internal/lyra-element.js';
3
3
  export interface WidgetView {
4
4
  id: string;
5
- label: string;
5
+ /** Visible label text. Optional so a toggle can be icon-only (`icon` set, `label` omitted) --
6
+ * set `ariaLabel` too in that case so the button keeps a real accessible name; see `ariaLabel`'s
7
+ * own doc for what happens if both are left unset. */
8
+ label?: string;
6
9
  icon?: TemplateResult;
10
+ /** Accessible name for the toggle button, used only when `label` is omitted -- ignored otherwise,
11
+ * since the visible label text already supplies the accessible name. If both `label` and
12
+ * `ariaLabel` are omitted, the button falls back to its own `id` as a last-resort accessible name:
13
+ * not silently unlabeled, but not a good name either, so set one of the two for any icon-only view. */
14
+ ariaLabel?: string;
7
15
  }
8
16
  export interface LyraWidgetEventMap {
9
- 'lyra-collapse-change': CustomEvent<boolean>;
10
- 'lyra-fullscreen-change': CustomEvent<boolean>;
11
- 'lyra-view-change': CustomEvent<string>;
17
+ 'lyra-collapse-change': CustomEvent<{
18
+ collapsed: boolean;
19
+ }>;
20
+ 'lyra-fullscreen-change': CustomEvent<{
21
+ fullscreen: boolean;
22
+ }>;
23
+ 'lyra-view-change': CustomEvent<{
24
+ viewId: string;
25
+ }>;
12
26
  }
13
27
  /**
14
28
  * `<lyra-widget>` — a titled panel shell with an optional collapse toggle and
@@ -22,10 +36,21 @@ export interface LyraWidgetEventMap {
22
36
  * @slot label - Rich label content (overrides the `label` attribute).
23
37
  * @slot sublabel - Rich sublabel content (overrides the `sublabel` attribute).
24
38
  * @slot actions - Header action controls, rendered before the collapse/expand buttons.
25
- * @event lyra-collapse-change - `detail: boolean` (the new `collapsed` state).
26
- * @event lyra-fullscreen-change - `detail: boolean` (the new `fullscreen` state).
39
+ * @slot collapse-icon - Overrides the built-in chevron glyph inside the collapse/expand toggle
40
+ * button entirely, via the platform's own slot-fallback-content mechanism (same convention as
41
+ * `<lyra-tool-call-chip>`'s `icon` slot): whatever is assigned wins, otherwise the default chevron
42
+ * renders. Only meaningful while `collapsible`.
43
+ * @slot fullscreen-icon - Overrides the built-in expand/close glyph inside the fullscreen toggle
44
+ * button entirely, using the same mechanism -- the override replaces *both* the "expand" and
45
+ * "exit fullscreen" default icons, so a consumer supplying one is responsible for its own
46
+ * expand/exit distinction (e.g. by reading the `fullscreen` attribute). Only meaningful while
47
+ * `expandable`.
48
+ * @slot view-{id} - Content for the view whose `WidgetView.id` matches `{id}`, rendered when
49
+ * `views` is non-empty.
50
+ * @event lyra-collapse-change - `detail: { collapsed }` (the new `collapsed` state).
51
+ * @event lyra-fullscreen-change - `detail: { fullscreen }` (the new `fullscreen` state).
27
52
  * @event lyra-view-change - Fired when the active view changes via a header toggle click.
28
- * `detail: string` (the new view's `id`).
53
+ * `detail: { viewId }` (the new view's `id`).
29
54
  * @csspart base - The panel root (dialog role + backdrop when fullscreen).
30
55
  * @csspart header - The header row containing the title, actions, and toggle buttons.
31
56
  * @csspart title - The wrapper around the label/sublabel.
@@ -61,7 +86,8 @@ export declare class LyraWidget extends LyraElement<LyraWidgetEventMap> {
61
86
  compact: boolean;
62
87
  /** Named alternate views for the panel body -- e.g. a chart/table toggle inside the same card
63
88
  * chrome. Each entry gets a header toggle button and a `<slot name="view-${id}">`. Empty (the
64
- * default) renders today's single unnamed default slot as the sole view, unchanged. */
89
+ * default) renders today's single unnamed default slot as the sole view, unchanged. An entry's
90
+ * `label` is optional -- see `WidgetView`'s own doc for the icon-only (`ariaLabel`) case. */
65
91
  views: WidgetView[];
66
92
  /** The currently active view's `id` -- defaults to the first entry of `views` (or `''` when
67
93
  * `views` is empty). Settable directly by a consumer wanting to control the active view
@@ -1 +1 @@
1
- {"version":3,"file":"widget.class.d.ts","sourceRoot":"","sources":["../../../src/components/widget/widget.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAY7D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,sBAAsB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7C,wBAAwB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACzC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,eAAe,CAAS;IAEzC,OAAO,CAAC,iBAAiB,CAAC,CAAa;IACvC,OAAO,CAAC,aAAa,CAAC,CAAgB;IACtC,OAAO,CAAC,eAAe,CAAC,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;IAEhD,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAiBlD;IAeD,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAW/C;IAED,iBAAiB,IAAI,IAAI,CAgBxB;IAED,oBAAoB,IAAI,IAAI,CAK3B;IAED,OAAO,CAAC,yBAAyB;IAYjC,OAAO,CAAC,2BAA2B;IAOnC,OAAO,CAAC,mBAAmB,CAEzB;IAEF,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,iBAAiB,CAEvB;IAEF,OAAO,CAAC,oBAAoB,CAE1B;IAEF,OAAO,CAAC,aAAa,CAInB;IAEF,OAAO,CAAC,eAAe,CAGrB;IAEF,OAAO,CAAC,gBAAgB,CAItB;IAEF,OAAO,CAAC,iBAAiB,CAIvB;IAEF,OAAO,CAAC,eAAe,CAErB;IAEF,MAAM,IAAI,cAAc,CAwFvB;CACF;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
@@ -24,10 +24,21 @@ import { styles } from './widget.styles.js';
24
24
  * @slot label - Rich label content (overrides the `label` attribute).
25
25
  * @slot sublabel - Rich sublabel content (overrides the `sublabel` attribute).
26
26
  * @slot actions - Header action controls, rendered before the collapse/expand buttons.
27
- * @event lyra-collapse-change - `detail: boolean` (the new `collapsed` state).
28
- * @event lyra-fullscreen-change - `detail: boolean` (the new `fullscreen` state).
27
+ * @slot collapse-icon - Overrides the built-in chevron glyph inside the collapse/expand toggle
28
+ * button entirely, via the platform's own slot-fallback-content mechanism (same convention as
29
+ * `<lyra-tool-call-chip>`'s `icon` slot): whatever is assigned wins, otherwise the default chevron
30
+ * renders. Only meaningful while `collapsible`.
31
+ * @slot fullscreen-icon - Overrides the built-in expand/close glyph inside the fullscreen toggle
32
+ * button entirely, using the same mechanism -- the override replaces *both* the "expand" and
33
+ * "exit fullscreen" default icons, so a consumer supplying one is responsible for its own
34
+ * expand/exit distinction (e.g. by reading the `fullscreen` attribute). Only meaningful while
35
+ * `expandable`.
36
+ * @slot view-{id} - Content for the view whose `WidgetView.id` matches `{id}`, rendered when
37
+ * `views` is non-empty.
38
+ * @event lyra-collapse-change - `detail: { collapsed }` (the new `collapsed` state).
39
+ * @event lyra-fullscreen-change - `detail: { fullscreen }` (the new `fullscreen` state).
29
40
  * @event lyra-view-change - Fired when the active view changes via a header toggle click.
30
- * `detail: string` (the new view's `id`).
41
+ * `detail: { viewId }` (the new view's `id`).
31
42
  * @csspart base - The panel root (dialog role + backdrop when fullscreen).
32
43
  * @csspart header - The header row containing the title, actions, and toggle buttons.
33
44
  * @csspart title - The wrapper around the label/sublabel.
@@ -64,7 +75,8 @@ export class LyraWidget extends LyraElement {
64
75
  this.compact = false;
65
76
  /** Named alternate views for the panel body -- e.g. a chart/table toggle inside the same card
66
77
  * chrome. Each entry gets a header toggle button and a `<slot name="view-${id}">`. Empty (the
67
- * default) renders today's single unnamed default slot as the sole view, unchanged. */
78
+ * default) renders today's single unnamed default slot as the sole view, unchanged. An entry's
79
+ * `label` is optional -- see `WidgetView`'s own doc for the icon-only (`ariaLabel`) case. */
68
80
  this.views = [];
69
81
  /** The currently active view's `id` -- defaults to the first entry of `views` (or `''` when
70
82
  * `views` is empty). Settable directly by a consumer wanting to control the active view
@@ -91,23 +103,23 @@ export class LyraWidget extends LyraElement {
91
103
  if (id === this.activeView)
92
104
  return;
93
105
  this.activeView = id;
94
- this.emit('lyra-view-change', id);
106
+ this.emit('lyra-view-change', { viewId: id });
95
107
  };
96
108
  this.toggleCollapsed = () => {
97
109
  this.collapsed = !this.collapsed;
98
- this.emit('lyra-collapse-change', this.collapsed);
110
+ this.emit('lyra-collapse-change', { collapsed: this.collapsed });
99
111
  };
100
112
  this.toggleFullscreen = (e) => {
101
113
  if (!this.fullscreen)
102
114
  this.explicitTrigger = e.currentTarget;
103
115
  this.fullscreen = !this.fullscreen;
104
- this.emit('lyra-fullscreen-change', this.fullscreen);
116
+ this.emit('lyra-fullscreen-change', { fullscreen: this.fullscreen });
105
117
  };
106
118
  this.dismissFullscreen = () => {
107
119
  if (!this.fullscreen)
108
120
  return;
109
121
  this.fullscreen = false;
110
- this.emit('lyra-fullscreen-change', false);
122
+ this.emit('lyra-fullscreen-change', { fullscreen: false });
111
123
  };
112
124
  this.onBackdropClick = () => {
113
125
  this.overlayHandle?.dismissBackdrop();
@@ -217,7 +229,7 @@ export class LyraWidget extends LyraElement {
217
229
  part="base"
218
230
  role=${this.fullscreen ? 'dialog' : nothing}
219
231
  aria-modal=${this.fullscreen ? 'true' : nothing}
220
- aria-label=${this.fullscreen ? (hasLabel ? this.label : 'Fullscreen panel') : nothing}
232
+ aria-label=${this.fullscreen ? (hasLabel ? this.label : this.localize('widgetFullscreenPanel')) : nothing}
221
233
  tabindex=${this.fullscreen ? '-1' : nothing}
222
234
  style=${this.fullscreenInset ? `--lyra-widget-fullscreen-inset:${this.fullscreenInset}` : nothing}
223
235
  >
@@ -239,13 +251,21 @@ export class LyraWidget extends LyraElement {
239
251
  <slot name="actions" @slotchange=${this.onActionsSlotChange}></slot>
240
252
  </div>
241
253
  ${this.views.length > 0
242
- ? html `<div part="view-toggles" role="group" aria-label="Panel view">
243
- ${this.views.map((v) => html `<button
254
+ ? html `<div part="view-toggles" role="group" aria-label=${this.localize('widgetViewGroup')}>
255
+ ${this.views.map((v) => {
256
+ // `label` supplies the accessible name via its own visible text, same as
257
+ // before -- aria-label is only ever added for an icon-only toggle (`label`
258
+ // omitted), where `ariaLabel` is the intended name and `id` is the last-resort
259
+ // fallback if even that's missing (see WidgetView's doc).
260
+ const hasLabel = !!v.label;
261
+ return html `<button
244
262
  part="view-toggle"
245
263
  type="button"
246
264
  aria-pressed=${v.id === this.activeView ? 'true' : 'false'}
265
+ aria-label=${hasLabel ? nothing : v.ariaLabel || v.id}
247
266
  @click=${() => this.setActiveView(v.id)}
248
- >${v.icon ?? nothing}${v.label}</button>`)}
267
+ >${v.icon ?? nothing}${v.label ?? nothing}</button>`;
268
+ })}
249
269
  </div>`
250
270
  : nothing}
251
271
  ${this.collapsible
@@ -253,12 +273,12 @@ export class LyraWidget extends LyraElement {
253
273
  part="collapse-button"
254
274
  type="button"
255
275
  aria-expanded=${this.collapsed ? 'false' : 'true'}
256
- aria-label=${this.collapsed ? 'Expand panel' : 'Collapse panel'}
276
+ aria-label=${this.collapsed ? this.localize('dockPanelExpand') : this.localize('dockPanelCollapse')}
257
277
  aria-controls=${this.bodyId}
258
278
  style="transform:rotate(${this.collapsed ? '0deg' : '90deg'})"
259
279
  @click=${this.toggleCollapsed}
260
280
  >
261
- ${chevronIcon()}
281
+ <slot name="collapse-icon">${chevronIcon()}</slot>
262
282
  </button>`
263
283
  : nothing}
264
284
  ${this.expandable
@@ -266,10 +286,10 @@ export class LyraWidget extends LyraElement {
266
286
  part="fullscreen-button"
267
287
  type="button"
268
288
  aria-pressed=${this.fullscreen ? 'true' : 'false'}
269
- aria-label=${this.fullscreen ? 'Exit fullscreen' : 'Expand to fullscreen'}
289
+ aria-label=${this.fullscreen ? this.localize('widgetExitFullscreen') : this.localize('widgetExpandToFullscreen')}
270
290
  @click=${this.toggleFullscreen}
271
291
  >
272
- ${this.fullscreen ? closeIcon() : expandIcon()}
292
+ <slot name="fullscreen-icon">${this.fullscreen ? closeIcon() : expandIcon()}</slot>
273
293
  </button>`
274
294
  : nothing}
275
295
  </div>