@aceshooting/lyra-ui 21.0.0 → 21.1.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 (272) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +6 -3
  3. package/custom-elements.json +1 -1
  4. package/dist/ai/runtime.js +1 -1
  5. package/dist/ai/types.d.ts +13 -5
  6. package/dist/cli/lyra-rename-ledger.mjs +1 -0
  7. package/dist/cli/migrate-wa.mjs +33 -13
  8. package/dist/cli/migration-contract.json +1 -1
  9. package/dist/components/agent-tools/agent-trace/agent-trace.class.d.ts +5 -3
  10. package/dist/components/agent-tools/agent-trace/agent-trace.class.js +3 -2
  11. package/dist/components/agent-tools/tool-call-block/tool-call-block.class.d.ts +15 -3
  12. package/dist/components/agent-tools/tool-call-block/tool-call-block.class.js +3 -3
  13. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +24 -8
  14. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js +3 -3
  15. package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +4 -0
  16. package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.class.d.ts +9 -5
  17. package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.class.js +2 -2
  18. package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.styles.js +1 -1
  19. package/dist/components/agent-tools/tool-status.js +2 -2
  20. package/dist/components/agent-tools/tool-timeline/tool-timeline.class.d.ts +8 -0
  21. package/dist/components/agent-tools/tool-timeline/tool-timeline.class.js +3 -2
  22. package/dist/components/agent-tools/tool-timeline/tool-timeline.styles.js +1 -1
  23. package/dist/components/agent-tools/trace-tree/span.d.ts +2 -2
  24. package/dist/components/charts/chart/box-plot.class.d.ts +3 -1
  25. package/dist/components/charts/chart/box-plot.class.js +9 -9
  26. package/dist/components/charts/chart/chart-bidi.d.ts +109 -0
  27. package/dist/components/charts/chart/chart-bidi.js +1 -0
  28. package/dist/components/charts/chart/chart.class.d.ts +17 -2
  29. package/dist/components/charts/chart/chart.class.js +10 -8
  30. package/dist/components/charts/chart/histogram.class.js +1 -1
  31. package/dist/components/charts/chart/lite-chart.class.d.ts +24 -5
  32. package/dist/components/charts/chart/lite-chart.class.js +9 -9
  33. package/dist/components/charts/chart/lite-chart.styles.js +1 -1
  34. package/dist/components/conversation/code-block/shiki-dark-theme.d.ts +2 -2
  35. package/dist/components/conversation/code-block/shiki-dark-theme.js +1 -1
  36. package/dist/components/conversation/conversation-item/conversation-item.class.d.ts +18 -2
  37. package/dist/components/conversation/conversation-item/conversation-item.class.js +3 -3
  38. package/dist/components/conversation/conversation-item/conversation-item.styles.js +1 -1
  39. package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
  40. package/dist/components/conversation/markdown/markdown-core.class.d.ts +3 -1
  41. package/dist/components/conversation/markdown/markdown.class.d.ts +3 -1
  42. package/dist/components/conversation/message-actions/message-actions.class.d.ts +7 -2
  43. package/dist/components/conversation/message-actions/message-actions.class.js +2 -2
  44. package/dist/components/conversation/message-parts/message-parts.class.d.ts +6 -2
  45. package/dist/components/conversation/message-parts/message-parts.class.js +5 -3
  46. package/dist/components/conversation/selection-toolbar/selection-toolbar.class.d.ts +3 -2
  47. package/dist/components/conversation/selection-toolbar/selection-toolbar.class.js +1 -1
  48. package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +1 -5
  49. package/dist/components/conversation/streaming-text/streaming-text-base.class.js +2 -2
  50. package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +7 -1
  51. package/dist/components/conversation/streaming-text/streaming-text-core.class.js +3 -4
  52. package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +7 -1
  53. package/dist/components/conversation/streaming-text/streaming-text.class.js +3 -4
  54. package/dist/components/conversation/thread-list/thread-list.class.d.ts +13 -2
  55. package/dist/components/conversation/thread-list/thread-list.class.js +3 -3
  56. package/dist/components/data/data-grid/data-grid.class.js +1 -1
  57. package/dist/components/data/document-library/document-library.class.js +2 -0
  58. package/dist/components/data/flow-canvas/flow-canvas.class.js +1 -1
  59. package/dist/components/data/flow-minimap/flow-minimap.class.js +1 -1
  60. package/dist/components/data/flow-node/flow-node.class.d.ts +6 -2
  61. package/dist/components/data/flow-node/flow-node.class.js +6 -2
  62. package/dist/components/data/flow-node/flow-node.styles.js +1 -1
  63. package/dist/components/data/gauge/gauge.styles.js +1 -1
  64. package/dist/components/data/heatmap/heatmap.class.d.ts +3 -0
  65. package/dist/components/data/heatmap/heatmap.class.js +2 -2
  66. package/dist/components/data/heatmap/heatmap.styles.js +1 -1
  67. package/dist/components/data/sparkline/sparkline.class.d.ts +5 -3
  68. package/dist/components/data/stat/stat.class.d.ts +4 -3
  69. package/dist/components/data/table/table.class.d.ts +32 -5
  70. package/dist/components/data/table/table.class.js +3 -2
  71. package/dist/components/forms/button/button.class.d.ts +7 -1
  72. package/dist/components/forms/button/button.styles.js +1 -1
  73. package/dist/components/forms/date-picker/date-input.styles.js +1 -1
  74. package/dist/components/forms/input/input.styles.js +1 -1
  75. package/dist/components/forms/rubric-form/rubric-form.class.js +1 -0
  76. package/dist/components/layout/app-rail/app-rail.class.d.ts +50 -11
  77. package/dist/components/layout/app-rail/app-rail.class.js +2 -2
  78. package/dist/components/layout/command-palette/command-palette.class.js +1 -1
  79. package/dist/components/layout/menu/menu.class.d.ts +6 -5
  80. package/dist/components/layout/split-panel/split-panel.class.d.ts +2 -1
  81. package/dist/components/media/flag/language-map.d.ts +8 -0
  82. package/dist/components/media/flag/language-map.js +1 -1
  83. package/dist/components/media/map/map-loader.d.ts +7 -1
  84. package/dist/components/media/map/map.class.d.ts +111 -5
  85. package/dist/components/media/map/map.class.js +3 -3
  86. package/dist/components/media/media-card/media-card.class.d.ts +18 -5
  87. package/dist/components/media/media-card/media-card.class.js +1 -1
  88. package/dist/components/overlays/overlay/popover.class.d.ts +20 -0
  89. package/dist/components/overlays/overlay/popover.class.js +2 -2
  90. package/dist/components/retrieval/graph/graph.class.d.ts +3 -3
  91. package/dist/components/retrieval/graph/graph.class.js +1 -1
  92. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +5 -3
  93. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +3 -2
  94. package/dist/components/retrieval/mind-map/mind-map.class.d.ts +3 -3
  95. package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
  96. package/dist/components/retrieval/retrieval-results/retrieval-results.class.d.ts +4 -1
  97. package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +5 -1
  98. package/dist/components/retrieval/source-picker/source-picker.class.d.ts +4 -1
  99. package/dist/components/retrieval/source-picker/source-picker.class.js +5 -1
  100. package/dist/components/utility/icon/icon.class.d.ts +9 -3
  101. package/dist/components/utility/icon/icon.class.js +1 -1
  102. package/dist/components/utility/mutation-observer/mutation-observer.class.d.ts +14 -8
  103. package/dist/components/utility/mutation-observer/mutation-observer.class.js +1 -1
  104. package/dist/components/viewers/document-viewer/document-viewer.class.d.ts +6 -1
  105. package/dist/components/viewers/document-viewer/document-viewer.class.js +7 -1
  106. package/dist/components/viewers/document-viewer/registry.d.ts +12 -3
  107. package/dist/components/viewers/geojson-view/geojson-view.class.d.ts +13 -5
  108. package/dist/components/viewers/geojson-view/geojson-view.class.js +1 -1
  109. package/dist/components/viewers/geojson-view/geojson-viewer.class.d.ts +3 -2
  110. package/dist/custom-elements-jsx.d.ts +1 -1
  111. package/dist/events.d.ts +644 -1242
  112. package/dist/internal/anchored-overlay-runtime.d.ts +2 -2
  113. package/dist/internal/cell-range.d.ts +0 -6
  114. package/dist/internal/cell-range.js +1 -1
  115. package/dist/internal/css-token-length.d.ts +7 -0
  116. package/dist/internal/css-token-length.js +1 -0
  117. package/dist/internal/default-strings.generated.d.ts +1 -1
  118. package/dist/internal/default-strings.generated.js +1 -1
  119. package/dist/internal/deferred-focus-return.d.ts +7 -4
  120. package/dist/internal/deferred-focus-return.js +1 -1
  121. package/dist/internal/dev-mode-attribute-warning.d.ts +35 -0
  122. package/dist/internal/dev-mode-attribute-warning.js +1 -1
  123. package/dist/internal/localization-runtime.js +1 -1
  124. package/dist/internal/localization-types.d.ts +1 -1
  125. package/dist/internal/localization.js +2 -2
  126. package/dist/internal/package-metadata.d.ts +1 -1
  127. package/dist/internal/package-metadata.js +1 -1
  128. package/dist/internal/papaparse-loader.d.ts +1 -1
  129. package/dist/internal/papaparse-loader.js +1 -1
  130. package/dist/internal/positioner.d.ts +10 -0
  131. package/dist/internal/positioner.js +1 -1
  132. package/dist/internal/shared-unions.d.ts +2 -1
  133. package/dist/internal/slotted-overlay-controller.d.ts +20 -0
  134. package/dist/internal/slotted-overlay-controller.js +1 -0
  135. package/dist/internal/text-quote.d.ts +1 -1
  136. package/dist/internal/text-quote.js +1 -1
  137. package/dist/internal/theme-observation.d.ts +4 -0
  138. package/dist/internal/theme-observation.js +1 -0
  139. package/dist/internal/theme-watcher.js +1 -1
  140. package/dist/localization.d.ts +6 -1
  141. package/dist/localization.js +1 -1
  142. package/dist/lyra.d.ts +1 -1
  143. package/dist/lyra.js +1 -1
  144. package/dist/svelte.d.ts +1 -1
  145. package/dist/testing/lyra-tag-event-map.js +1 -1
  146. package/dist/translations/ar/agent-tools.js +1 -1
  147. package/dist/translations/cs/agent-tools.js +1 -1
  148. package/dist/translations/da/agent-tools.js +1 -1
  149. package/dist/translations/de/agent-tools.js +1 -1
  150. package/dist/translations/de-CH/agent-tools.js +1 -1
  151. package/dist/translations/es/agent-tools.js +1 -1
  152. package/dist/translations/fa/agent-tools.js +1 -1
  153. package/dist/translations/fi/agent-tools.js +1 -1
  154. package/dist/translations/fr/agent-tools.js +1 -1
  155. package/dist/translations/he/agent-tools.js +1 -1
  156. package/dist/translations/hi/agent-tools.js +1 -1
  157. package/dist/translations/hr/agent-tools.js +1 -1
  158. package/dist/translations/hu/agent-tools.js +1 -1
  159. package/dist/translations/id/agent-tools.js +1 -1
  160. package/dist/translations/it/agent-tools.js +1 -1
  161. package/dist/translations/ja/agent-tools.js +1 -1
  162. package/dist/translations/kk/agent-tools.js +1 -1
  163. package/dist/translations/ko/agent-tools.js +1 -1
  164. package/dist/translations/nb/agent-tools.js +1 -1
  165. package/dist/translations/nl/agent-tools.js +1 -1
  166. package/dist/translations/nn/agent-tools.js +1 -1
  167. package/dist/translations/pl/agent-tools.js +1 -1
  168. package/dist/translations/pt-BR/agent-tools.js +1 -1
  169. package/dist/translations/pt-PT/agent-tools.js +1 -1
  170. package/dist/translations/pt-PT/charts.js +1 -1
  171. package/dist/translations/pt-PT/conversation.js +1 -1
  172. package/dist/translations/pt-PT/data.js +1 -1
  173. package/dist/translations/pt-PT/forms.js +1 -1
  174. package/dist/translations/pt-PT/layout.js +1 -1
  175. package/dist/translations/pt-PT/media.js +1 -1
  176. package/dist/translations/pt-PT/retrieval.js +1 -1
  177. package/dist/translations/pt-PT/shared.js +1 -1
  178. package/dist/translations/pt-PT/utility.js +1 -1
  179. package/dist/translations/pt-PT/viewers.js +2 -2
  180. package/dist/translations/ro/agent-tools.js +1 -1
  181. package/dist/translations/ru/agent-tools.js +1 -1
  182. package/dist/translations/sl/agent-tools.js +1 -1
  183. package/dist/translations/sv/agent-tools.js +1 -1
  184. package/dist/translations/tr/agent-tools.js +1 -1
  185. package/dist/translations/uk/agent-tools.js +1 -1
  186. package/dist/translations/zh-CN/agent-tools.js +1 -1
  187. package/dist/translations/zh-TW/agent-tools.js +1 -1
  188. package/dist/utilities/index.d.ts +1 -1
  189. package/dist/utilities/index.js +1 -1
  190. package/dist/utilities/localization.d.ts +28 -10
  191. package/dist/vue.d.ts +1 -1
  192. package/llms/components/lr-accordion-item.md +2 -344
  193. package/llms/components/lr-accordion.md +2 -344
  194. package/llms/components/lr-app-rail-group.md +2 -721
  195. package/llms/components/lr-app-rail-item.md +2 -721
  196. package/llms/components/lr-app-rail.md +29 -4
  197. package/llms/components/lr-bar-chart.md +2 -87
  198. package/llms/components/lr-box-plot.md +1 -1
  199. package/llms/components/lr-breadcrumb-item.md +2 -67
  200. package/llms/components/lr-bubble-chart.md +2 -87
  201. package/llms/components/lr-button.md +7 -0
  202. package/llms/components/lr-chart.md +4 -5
  203. package/llms/components/lr-chip-group.md +2 -272
  204. package/llms/components/lr-conversation-item.md +20 -2
  205. package/llms/components/lr-date-input.md +2 -457
  206. package/llms/components/lr-date-picker.md +6 -2
  207. package/llms/components/lr-document-library.md +3 -3
  208. package/llms/components/lr-document-viewer.md +14 -5
  209. package/llms/components/lr-doughnut-chart.md +2 -87
  210. package/llms/components/lr-dropdown-item.md +2 -306
  211. package/llms/components/lr-dropdown.md +6 -0
  212. package/llms/components/lr-flag.md +9 -1
  213. package/llms/components/lr-flow-node.md +4 -1
  214. package/llms/components/lr-geojson-view.md +3 -90
  215. package/llms/components/lr-geojson-viewer.md +13 -5
  216. package/llms/components/lr-icon-button.md +4 -1
  217. package/llms/components/lr-icon.md +14 -6
  218. package/llms/components/lr-input.md +9 -2
  219. package/llms/components/lr-lite-chart.md +17 -9
  220. package/llms/components/lr-map.md +87 -2
  221. package/llms/components/lr-markdown-core.md +5 -4
  222. package/llms/components/lr-markdown.md +4 -2
  223. package/llms/components/lr-media-card.md +10 -5
  224. package/llms/components/lr-menu-item.md +2 -306
  225. package/llms/components/lr-menu.md +9 -6
  226. package/llms/components/lr-menubar-item.md +2 -125
  227. package/llms/components/lr-message-actions.md +4 -1
  228. package/llms/components/lr-message-parts.md +14 -5
  229. package/llms/components/lr-mutation-observer.md +12 -6
  230. package/llms/components/lr-navigation-menu-item.md +2 -237
  231. package/llms/components/lr-number-input.md +4 -0
  232. package/llms/components/lr-option.md +2 -712
  233. package/llms/components/lr-pie-chart.md +2 -87
  234. package/llms/components/lr-polar-area-chart.md +2 -87
  235. package/llms/components/lr-popover.md +10 -0
  236. package/llms/components/lr-prompt-input.md +5 -1
  237. package/llms/components/lr-radar-chart.md +2 -87
  238. package/llms/components/lr-reorder-item.md +2 -157
  239. package/llms/components/lr-result-field.md +2 -117
  240. package/llms/components/lr-retrieval-results.md +3 -1
  241. package/llms/components/lr-rubric-form.md +3 -2
  242. package/llms/components/lr-scatter-chart.md +2 -87
  243. package/llms/components/lr-selection-toolbar.md +4 -2
  244. package/llms/components/lr-source-card.md +2 -186
  245. package/llms/components/lr-source-picker.md +3 -1
  246. package/llms/components/lr-sparkline.md +9 -4
  247. package/llms/components/lr-split-panel.md +5 -3
  248. package/llms/components/lr-stat.md +4 -3
  249. package/llms/components/lr-streaming-text-core.md +7 -5
  250. package/llms/components/lr-streaming-text.md +9 -6
  251. package/llms/components/lr-swatch-picker.md +130 -0
  252. package/llms/components/lr-tag.md +2 -177
  253. package/llms/components/lr-thread-list.md +27 -4
  254. package/llms/components/lr-timeline-item.md +2 -120
  255. package/llms/components/lr-toast-item.md +2 -223
  256. package/llms/components/lr-tool-call-block.md +12 -3
  257. package/llms/components/lr-tool-call-chip.md +12 -6
  258. package/llms/components/lr-tool-param-form.md +3 -2
  259. package/llms/components/lr-tool-result-dialog.md +7 -3
  260. package/llms/components/lr-tool-result-view.md +4 -3
  261. package/llms/components/lr-tool-timeline.md +12 -5
  262. package/llms/components/lr-tree-item.md +2 -354
  263. package/llms/index.md +22 -4
  264. package/llms/migration.md +75 -1
  265. package/llms/peers.md +1 -1
  266. package/llms/shared.md +86 -39
  267. package/llms-full.txt +739 -163
  268. package/package.json +6 -6
  269. package/registrations.json +1 -1
  270. package/vscode-css-data.json +1 -1
  271. package/vscode-html-data.json +1 -1
  272. package/web-types.json +1 -1
@@ -9,461 +9,6 @@
9
9
  - **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
10
10
  - **Deprecations** none
11
11
  - **Optional peers** none
12
- - **Themeable via** 22 parts, 25 custom properties — see this component's own `@csspart`/`@cssprop` list below
13
- - **Documented with** `lr-date-picker` (same section below)
12
+ - **Themeable via** 22 parts, 25 custom properties — see `lr-date-picker.md`
13
+ - **Documented with** `lr-date-picker`: see [lr-date-picker.md](./lr-date-picker.md).
14
14
  - **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
15
-
16
- ---
17
-
18
- ## `lr-date-picker` / `lr-date-input` (+ `calendar-core.ts`)
19
-
20
- Mirrors the `<wa-date-picker>`/`<wa-date-input>` 3.11 public API under `lr-`. Both
21
- components are **experimental since 3.8**. Values use ISO 8601: `YYYY-MM-DD` (single) or
22
- `YYYY-MM-DD/YYYY-MM-DD` (range).
23
-
24
- For `lr-date-input`, host `aria-describedby` targets resolve in the host's root and describe the
25
- native combobox input through element references, before its existing error and hint descriptions.
26
- Replacement, removal, reinsertion, newly resolved IDs, reconnect, and adoption update those
27
- relationships. Removing `label`, `hint`, or `error-text` safely omits that copy while preserving
28
- `null` property readback; later supplied values render normally.
29
-
30
- `lr-date-input`'s `clearLabel`, `openLabel`, and `dialogLabel` retain their initial defaults (`''`,
31
- `''`, and `'Choose date'`). Omitted labels localize; explicitly supplied text, built-in English
32
- labels, and empty strings win over `.strings`. Attribute removal restores localization while
33
- preserving `null` readback. The composed calendar applies the same range endpoint and
34
- inclusive-length admission rules as the standalone picker.
35
-
36
- An authored host `aria-label` names an enclosing calendar group. Individual month and selection
37
- grids retain their distinct generated period names; changing or removing the purpose label updates
38
- the group without changing a caller-authored host role. Removing the `value` attribute renders an
39
- empty selection safely while preserving `null` readback; a subsequent valid value works normally.
40
-
41
- Live constraints repair roving state without moving focus from an unrelated control. If a focused
42
- cell becomes unavailable, focus recovers onto an enabled cell. Explicit distant bounds seed the
43
- bounded automatic search within the permitted domain; a genuinely empty domain has no enabled roving
44
- stop. Selected day and range-endpoint buttons retain their foreground/background pairing during
45
- hover and press; author state-token overrides remain available. Month/year/decade state buttons
46
- retain the common typography, padding, border reset, and minimum action size.
47
-
48
- The `calendar-core.ts` helper `formatISO()` returns an empty string for invalid dates or years
49
- outside `0000`–`9999`, so generated ISO anchors never advertise an unsupported signed or five-digit
50
- year.
51
-
52
- The ISO model is proleptic Gregorian in every locale and supports years `0000`–`9999`, including
53
- `0000`–`0099` without JavaScript's `Date` 1900 remap. Navigation anchors remain within that domain;
54
- moving past either boundary leaves a valid roving stop and does not change the selected value. Month/day names and visible day/week digits follow the effective locale while
55
- formatters explicitly select the Gregorian calendar. `lr-date-input` uses locale `formatRange()`
56
- for range presentation and normalizes locale digits plus bidi marks before parsing, so its own
57
- Arabic/Persian display round-trips to the same ISO value.
58
-
59
- ### `lr-date-picker`
60
-
61
- Inline month-grid calendar, not form-associated (used standalone or embedded inside
62
- `lr-date-input`'s popover).
63
-
64
- **Properties (28):**
65
-
66
- - `dayContent` (JS only): `LyraDatePickerDayContent | undefined`
67
- - `presets: LyraDateRangePreset[] = []` (JS only, new in 11.0.0) —
68
- `LyraDateRangePreset { label: string; start?: string; end?: string; id?: string }`, where
69
- `start`/`end` are ISO `YYYY-MM-DD` and `id` is an optional caller-owned
70
- correlation key, echoed verbatim on `appliedPreset` and never read by the picker itself.
71
- **Either bound may be omitted (new in 11.1.0)** to mean an OPEN bound, resolving to
72
- the picker's `min` / `max` respectively — that is how an "All time" preset is expressed. When the
73
- corresponding `min`/`max` is unset there is nothing to resolve to (a `value` of
74
- `YYYY-MM-DD/YYYY-MM-DD` has no unbounded spelling), so that preset's button renders **disabled**
75
- rather than looking live and doing nothing when pressed. Renders a `[part="presets"]` quick-range button row above the calendar, for the
76
- dashboard time-filter shape (Today / Last 7 days / Last 30 days / This month / All time).
77
- **Range mode only** — a preset names two dates, so it is ignored for a single-date picker rather
78
- than rendering a row that cannot do anything; unset renders nothing at all. Applying one commits
79
- through the same path a two-click selection uses, so the ISO serialization, the `min`/`max`
80
- clamping and the `input`-then-`change` pair are identical and a consumer's change handler cannot
81
- tell them apart. A reversed preset normalizes; a malformed one is ignored rather than clearing the
82
- current value, so a bad entry in a config-driven list never reads as "the user picked nothing".
83
- Non-array runtime assignments normalize to the empty collection, and null/non-object entries in
84
- an otherwise valid array are omitted from the rendered row rather than aborting the calendar. Empty and
85
- whitespace-only labels are also omitted, preserving named siblings. Explicit endpoints clamp to
86
- `min`/`max` before admission. Both endpoints must be selectable, and the inclusive length must
87
- satisfy `minRange`/`maxRange`; invalid outcomes render disabled and do not emit value events.
88
- Interior dates need not all be enabled. A same-day manual completion obeys those same inclusive
89
- length limits. Long preset labels wrap in narrow allocations, including unbroken text and RTL.
90
- The active button carries `aria-pressed="true"` and `data-active`. Deliberately the same
91
- `label`/`start`/`end`/`id` shape as `<lr-time-range>`'s `TimeRangePreset`, so the library has one
92
- preset vocabulary rather than two — the only difference is the unit (ISO dates, not numbers)
93
- - `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 11.1.0) — the preset whose
94
- button produced the current `value`, or `undefined` when the range was picked by hand, cleared, or changed externally.
95
- `clear()` removes identity before synchronous `input`/`change` listeners run; an external value
96
- change removes identity silently. An accepted preset retains its exact caller-owned source
97
- identity through its own update. Read it
98
- inside your own `change`/`input` handler. It exists because a dashboard filter has to persist
99
- *which* preset is active rather than the pair it froze to: "Last 7 days" must still mean the last
100
- 7 days after tomorrow's reload. That fact is not recoverable from `value` — re-deriving it by
101
- string-matching is the mapping table `presets` exists to delete, and it is ambiguous anyway
102
- (Today and This month coincide on the 1st of a month, and a hand-picked range can equal a
103
- preset's pair by construction). A property rather than an event detail because `input`/`change`
104
- here are **native** events, deliberately indistinguishable from a manual selection so existing
105
- handlers need no special case, and a native `Event` cannot carry a detail without changing type
106
- - `disabled: boolean = false` (reflected)
107
- - `disabledDates: string | string[] | Date[] = ''` (attribute `disabled-dates`)
108
- - `disabledDaysOfWeek: string = ''` (attribute `disabled-days-of-week`)
109
- - `disableFuture: boolean = false` and `disablePast: boolean = false` (reflected)
110
- - `firstDayOfWeek: LyraDatePickerFirstDayOfWeek = 'auto'` (`'auto'|'sun'|'mon'|'tue'|'wed'|
111
- 'thu'|'fri'|'sat'`; attribute
112
- `first-day-of-week`, reflected)
113
- - `focusedDate: string = ''` (attribute `focused-date`, reflected)
114
- - `isDateDisabled?: (date: Date) => boolean` (JS only)
115
- - `locale: string = ''` (reflected; malformed tags fall back to the platform locale)
116
- - `max: string = ''` and `min: string = ''` (reflected ISO bounds)
117
- - `maxRange: number = 0` and `minRange: number = 0` (attributes `max-range`/`min-range`, reflected;
118
- positive values count both range endpoints)
119
- - `mode: 'single'|'range' = 'single'` (reflected; unknown values normalize to `single`)
120
- - `months: 1|2 = 1` (reflected; finite values are truncated and clamped to `1..2`)
121
- - `pageBy: 'months'|'single' = 'months'` (attribute `page-by`, reflected)
122
- - `readonly: boolean = false` (reflected)
123
- - `size: LyraSize = 'm'` (reflected; the shared `2xs`–`xl` ladder plus
124
- `small`/`medium`/`large` aliases)
125
- - `today: string = ''` (reflected ISO override for deterministic today styling/constraints)
126
- - `value: string = ''` (reflected)
127
- - `valueAsDate: Date | null` and `valueAsRange: { from: Date|null; to: Date|null }` (JS-only
128
- accessors; setters are silent and normalize reversed ranges)
129
- - `view: 'days'|'months'|'years'|'decades' = 'days'` (reflected)
130
- - `weekdayFormat: 'narrow'|'short'|'long' = 'short'` (attribute `weekday-format`, reflected)
131
- - `withOutsideDays: boolean = false` and `withWeekNumbers: boolean = false` (reflected)
132
-
133
- Lyra retains the additive `previousLabel`/`nextLabel` accessible-label overrides and the `selection`
134
- range getter. Their initial readback remains `'Previous month'` and `'Next month'`; omitted labels
135
- localize, while explicit text, the built-in English labels, and empty strings win over locale and
136
- `.strings` copy. Removing either label attribute restores localized omission while preserving
137
- `null` property readback.
138
-
139
- **Methods:** `clear()`, `focus(options?)`, `goToToday()`, and
140
- `goToDate(date: string | Date)`. Valid navigation dates are clamped to `min`/`max`; invalid values
141
- are ignored.
142
-
143
- **Keyboard:** The day grid uses one roving Tab stop. Month, year, and decade selection views do the
144
- same: Arrow keys move through their four-column visual grid (with horizontal movement mirrored in
145
- RTL), Home/End move to the first/last enabled period in the current page, and Enter/Space drills
146
- into the focused period. Moving beyond a selection-grid edge opens the adjacent period page;
147
- disabled periods never receive the roving focus. A period is enabled only when it contains at least
148
- one date selectable under the active bounds, past/future limits, disabled dates/weekdays, predicate,
149
- and pending-range limits; activating an unavailable period is a no-op.
150
-
151
- **Events:** all are non-cancelable. `input` is a bubbling/composed native `InputEvent` (including
152
- the first endpoint of a range); `change` is a bubbling/composed native `Event` for committed
153
- values. `lr-focus-day` carries `{ date: Date }`, and `lr-view-change` carries `{ view, date }`.
154
-
155
- **Slots:** `header`, `previous-icon`, `next-icon`, and `footer`. A dynamic
156
- `day-YYYY-MM-DD` slot is also accepted as a Lyra extension and takes precedence over `dayContent`.
157
-
158
- **Custom states:** `disabled`, `range`, and `readonly`.
159
-
160
- **CSS parts (37):** `date-picker` / permanent compatibility name `base` (tokens on the same
161
- visible shell; both names remain supported), `day`, `day-disabled`, `day-label`, `day-outside`,
162
- `day-placeholder`, `day-range-end`, `day-range-inner`, `day-range-preview`, `day-range-start`,
163
- `day-selected`, `day-today`, `day-weekend`, `footer`, `grid`, `header`, `month`, `month-label`,
164
- `months`, `nav`, `next`, `previous`, `title`, `view-cell`, `view-grid`, `view-item`,
165
- `presets` (the quick-range row), `preset-button` (one quick-range button; carries `data-active`
166
- while its range is the current value),
167
- `view-item-disabled`, `view-item-selected`, `view-item-today`, `view-row`, `weekday`, `weekdays`,
168
- `weeknumber`, and `weeknumbers`. Lyra additionally retains the existing `week` part.
169
-
170
- **Themeable custom properties:** `--lr-cell-size` (default `2.25rem`, controls day-cell/grid-column
171
- size; its private default follows the `size` tier — `2xs`/`xs`/`s`/`l`/`xl`; `m` keeps the
172
- default). An inherited or direct public value remains authoritative in every tier.
173
-
174
- **Optional peer deps:** none.
175
-
176
- ### `lr-date-input`
177
-
178
- Text field + calendar popover, **form-associated** via the shared `FormAssociated` mixin (`name`,
179
- `value`, `disabled`, `required` all inherited).
180
-
181
- **Properties (44):**
182
-
183
- - `appearance: 'accent' | 'filled' | 'outlined' | 'filled-outlined' | 'plain' = 'outlined'`
184
- (reflected) — the library's shared field-surface vocabulary, matching `lr-select`'s trigger and
185
- `lr-combobox`'s own `appearance`. `outlined` (the default) is a bordered surface; `filled` swaps
186
- the border for a raised fill; `filled-outlined` keeps both; `plain` drops both; `accent` paints
187
- the loud brand fill with on-brand text (the placeholder, start/end adornments and clear/expand
188
- buttons all ride that on-brand color rather than the quiet-text tokens). An unsupported value,
189
- including a raw attribute/property write outside this type, clamps to the `'outlined'` default
190
- - `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 12.0.0) — the `presets` entry
191
- whose button produced the current `value`, or `undefined` when the value was picked on the
192
- calendar, typed into the field, cleared, or reset. Read it inside your own `change`/`input`
193
- handler; it is updated before those events are relayed, so a handler observes the preset that
194
- caused the very commit it is handling, and it is `undefined` while the popover has never been
195
- opened. Mirrors the nested `lr-date-picker`'s identically-named property across this component's
196
- shadow boundary, which is where the readback is actually needed: the compact
197
- text-field-plus-popover shape is the one a dashboard filter uses, the nested picker instance is
198
- unreachable from outside (a CSS part cannot yield it), and the fact is not recoverable from
199
- `value` — re-deriving it by string-matching is the mapping table `presets` exists to delete and is
200
- ambiguous anyway. A property rather than an event detail because `input`/`change` here are
201
- **native** events that cannot carry one
202
- - `assumeInteractionOn: string[] = ['input']` (JS only)
203
- - `autocomplete: string = ''`
204
- - `dayContent?: LyraDatePickerDayContent` (JS only)
205
- - `defaultValue: string = ''` (reset value; reflected through the `value` content attribute)
206
- - `disabled: boolean = false`
207
- - `disabledDates: string | string[] | Date[] = ''` and `disabledDaysOfWeek: string = ''`
208
- - `disableFuture: boolean = false` and `disablePast: boolean = false` (reflected)
209
- - `distance: number = 0` (reflected; finite offset from the anchor)
210
- - `firstDayOfWeek: LyraDateInputFirstDayOfWeek = 'auto'` (reflected)
211
- - `form: HTMLFormElement | null` (JS-only FACE owner)
212
- - `hint: string = ''`
213
- - `isDateDisabled?: (date: Date) => boolean` (JS only)
214
- - `label: string = ''`
215
- - `max: string = ''` and `min: string = ''` (reflected ISO bounds)
216
- - `maxRange: number = 0` and `minRange: number = 0` (reflected; positive values include both
217
- endpoints)
218
- - `mode: 'single'|'range' = 'single'` (reflected)
219
- - `months: 1|2 = 1` (reflected; finite values are truncated and clamped)
220
- - `name: string = ''` (reflected)
221
- - `open: boolean = false` (reflected)
222
- - `pageBy: 'months'|'single' = 'months'` (reflected)
223
- - `pill: boolean = false` (reflected)
224
- - `placement: LyraDateInputPlacement = 'bottom-start'` (reflected; all 12 side/alignment
225
- placements are accepted)
226
- - `presets: LyraDateRangePreset[] = []` (JS only, new in 11.1.0) — forwarded verbatim to the nested
227
- `lr-date-picker`, whose own `presets` documents the semantics (range mode only, open bounds
228
- resolving to `min`/`max`, unset renders nothing). Forwarded rather than reimplemented because the
229
- picker lives in this component's shadow root, so a consumer has no route to it. The row's parts
230
- are re-exported as `presets`/`preset-button`, and `appliedPreset` above reports which entry
231
- produced the current value
232
- - `readonly: boolean = false` and `required: boolean = false` (reflected)
233
- - `size: LyraSize = 'm'` (reflected; `2xs`–`xl` and aliases)
234
- - `today: string = ''` (reflected ISO override)
235
- - `validationTarget: HTMLElement | undefined` (JS only) — writable native-validity focus anchor.
236
- It defaults to the internal input after first render; assign another element to override it, or
237
- assign `undefined` to restore the internal input
238
- - `validators: LyraDateInputValidator[] = []` (JS only) — each entry may be a
239
- `(value, input) => void | boolean | string | ValidityStateFlags` function, an object with
240
- `validate(value, input)` returning that same result vocabulary, or a Web Awesome-compatible
241
- object with `checkValidity(input)`. The mapped object returns
242
- `{ isValid, message, invalidKeys }`, where `invalidKeys` names `ValidityState` flags; it may also
243
- expose `observedAttributes` and a string or callback `message`. Changing any listed host
244
- attribute automatically runs validity again. `isValid: true` passes. Otherwise the listed flags
245
- are set (`customError` is used when the list is empty) and the returned message wins over the
246
- validator-level fallback.
247
- - `value: string = ''` (JS property)
248
- - `valueAsDate: Date | null` and `valueAsRange: { from: Date|null; to: Date|null }` (JS-only
249
- accessors; setters are silent and normalize reversed ranges)
250
- - `weekdayFormat: 'narrow'|'short'|'long' = 'short'` (reflected)
251
- - `withClear: boolean = false`, `withHint: boolean = false`, and `withLabel: boolean = false`
252
- - `withOutsideDays: boolean = false` and `withWeekNumbers: boolean = false` (reflected)
253
-
254
- Lyra retains additive native-wrapper and form-chrome properties: `placeholder`, `locale`,
255
- `errorText`, `accessibleLabel` (attribute `aria-label`), `clearLabel`, `openLabel`, `dialogLabel`,
256
- `spellcheck`, `autocapitalize`, `autoCorrect` (attribute `autocorrect`), `inputMode: string = ''`
257
- (attribute `inputmode`), `enterKeyHint: string = ''` (attribute `enterkeyhint`), and the reflected
258
- `customError: string | null` (attribute `custom-error`). `withLabel` and `withHint` are SSR hints:
259
- they force those slot wrappers into the first render so server output and hydration have the same
260
- structure even before assigned-slot state is observable. The shared Lyra FACE contract also
261
- reflects `disabled` and accepts a `form` content-attribute owner ID in addition to the
262
- element-valued `form` IDL.
263
-
264
- **Methods:** `blur()`, `clear()`, `focus(options?)`,
265
- `formStateRestoreCallback(state)`, `hide()`, `resetValidity()`, `setCustomValidity(message)`, and
266
- `show()`. The shared form contract additionally exposes `getForm()`, `checkValidity()`, and
267
- `reportValidity()`; Lyra's native wrapper also exposes `click()`. `show()` and `hide()` return promises that settle after their corresponding transition;
268
- they do nothing when already settled, and respect cancellation of their request event. `clear()`
269
- is a no-op while blank, disabled, or readonly; otherwise it emits `lr-clear`, then `input`, then
270
- `change`. Lyra also retains native-wrapper `select()`, `setSelectionRange()`, and `setRangeText()`.
271
- The text input is itself the popup-opening combobox owner: it exposes `role="combobox"`,
272
- `aria-haspopup="dialog"`, and explicit `aria-controls`/`aria-expanded` alongside the expand button.
273
- Host focus/click/show/clear calls are synchronous no-ops as soon as direct or fieldset disablement
274
- starts, including before Lit has updated the inner native controls.
275
-
276
- **Getters:** `input: HTMLInputElement | undefined` — the internal native `<input>`, for direct DOM
277
- access.
278
-
279
- **Selection properties:** `selectionStart`, `selectionEnd`, and `selectionDirection` mirror the
280
- internal native date input.
281
-
282
- **Events:** `input` is an `InputEvent`, `change` is an `Event`, and `focus`/`blur` are
283
- `FocusEvent`s preserving `relatedTarget`; each is dispatched exactly once from the host and is
284
- bubbling, composed, and non-cancelable. `lr-show`/`lr-hide` are cancelable requests emitted before state changes;
285
- `lr-after-show`/`lr-after-hide` are non-cancelable and fire after rendering and popup animations
286
- settle. `lr-clear` is non-cancelable. `lr-invalid` **is** cancelable: `preventDefault()` on it
287
- suppresses the browser's native validation bubble and `reportValidity()`'s focus/scroll of this
288
- control, without making the control valid — see "The validity alias is cancelable in 8.0.0" above.
289
-
290
- **Slots (10):** `clear-icon`, dynamic `day-YYYY-MM-DD`, `end`, `expand-icon`, `footer`, `hint`,
291
- `label`, `next-icon`, `previous-icon`, and `start`. Lyra additionally retains `error`, which
292
- overrides `errorText`.
293
-
294
- The editable input shrinks first in a constrained row; `start` and `end` adornments are each
295
- capped at 40% and ellipsize unbroken content. Clear and calendar actions retain their fixed target.
296
-
297
- **Custom states:** `blank`, `disabled`, `open`, and `range`; the shared form-associated mixin also
298
- exposes its validity states.
299
-
300
- **CSS parts (21):** `clear-button`, `date-input`, `date-picker`, `presets` and `preset-button`
301
- (forwarded from the nested `lr-date-picker` via `exportparts`, so the quick-range row is styleable
302
- from outside — new in 11.1.0), `end`, `expand-button`,
303
- `expand-icon`, `form-control`, `form-control-input`, `form-control-label`, `hint`, `input`,
304
- `input-wrapper`, `popup`, `range-separator`, `segment`, `segment-literal`, `start`, permanent
305
- compatibility name `base` (a nested wrapper inside `date-input`), and permanent compatibility name
306
- `label` (the inner label-content wrapper inside `form-control-label`). Lyra additionally retains
307
- `error`.
308
-
309
- **Form value and validation:** a complete range submits `YYYY-MM-DD/YYYY-MM-DD`. A first range
310
- endpoint remains visible in `value` but contributes the empty string to `FormData` until the second
311
- endpoint is selected. `min`/`max`, past/future limits, disabled dates/weekdays, the predicate,
312
- range length, `required`, and configured validators all feed FACE validity. Reset and state restore
313
- use the same normalization path as direct property writes.
314
-
315
- **The required marker.** `required` with a non-empty `label` paints the library's shared marker on
316
- `[part="form-control-label"]` — the one `::after` rule described above, not a copy of it, so
317
- `--lr-form-control-required-content`, `--lr-form-control-required-color` and
318
- `--lr-form-control-required-offset` retune or suppress it here exactly as they do on `lr-input`.
319
- With no label text the part is hidden and no glyph is painted.
320
-
321
- **Themeable custom properties:** `--lr-date-input-padding-block` (default
322
- `--lr-form-control-padding-block`) pads the native text input; `--lr-date-input-padding-inline`
323
- (default `--lr-form-control-padding-inline`) pads the row. `--lr-date-input-font-size` defaults to
324
- `--lr-form-control-font-size`. The row floor `--lr-date-input-control-min-height` defaults to
325
- `--lr-form-control-height`. All four defaults follow the shared size ladder, including
326
- `small`/`medium`/`large` aliases and inherited `--lr-theme-form-control-height-*` overrides.
327
- Inherited or direct public values win. `pill` changes the private radius default to
328
- `--lr-radius-pill`; a public `--lr-date-input-radius` still wins. `--lr-date-input-text-color`
329
- (default `inherit`) recolors the row's own text; `appearance="accent"` defaults it instead to
330
- `var(--lr-color-on-brand)`, keeping the placeholder and clear/calendar actions readable on the loud
331
- brand fill.
332
-
333
- Calendar and clear actions fit inside the selected row height while retaining at least 24×24
334
- CSS-pixel targets. At the default root size, rows measure 30/40/48/56px for s/m/l/xl; 2xs and xs
335
- grow to 26px to accommodate the 24px action plus the row borders. Custom content or font metrics
336
- can grow an unconstrained row. A theme setting the small tier to 36px produces a 36px date row.
337
- `--lr-date-input-control-height` remains undeclared by default and pins an exact row height when
338
- set. If it forces a row below its target size, the action overflows instead of shrinking.
339
-
340
- The mapped `--show-duration` and `--hide-duration` hooks independently retime the popup's enter
341
- and exit transitions; both default to `var(--lr-transition-fast)`. Clear and calendar action
342
- state hooks are `--lr-date-input-action-hover-color`, `--lr-date-input-action-hover-bg`, and
343
- `--lr-date-input-action-hover-radius` (defaults: text, transparent, and the input radius), plus
344
- `--lr-date-input-action-active-color`, `--lr-date-input-action-active-bg`, and
345
- `--lr-date-input-action-active-radius` for the pressed state. They inherit from theme ancestors;
346
- direct values on `lr-date-input` win without retuning library-wide tokens.
347
-
348
- `--lr-positioning-strategy` (16.0.0) — the calendar popup reads this same cascading
349
- `absolute`/`fixed` override documented on `<lr-popover>` when it is (re)positioned, falling back to
350
- its own `fixed` default when nothing is set. There is no per-instance `positioning-strategy`
351
- property on `<lr-date-input>`; set the custom property on `:root`, a theme, or one clipping
352
- ancestor to change every unset date input beneath it.
353
-
354
- **Optional peer deps:** none.
355
-
356
- ```html
357
- <lr-date-input
358
- id="di"
359
- label="Start date"
360
- with-clear
361
- name="start"
362
- ></lr-date-input>
363
- <script type="module">
364
- const di = document.getElementById("di");
365
- di.value = "2026-07-10";
366
- di.addEventListener("change", () => console.log(di.value)); // ISO string
367
- </script>
368
- ```
369
-
370
- `calendar-core.ts` exports the pure date math both components share (**internal — not re-exported
371
- from the package root**, but worth knowing when reasoning about behavior): `parseISO`, `formatISO`,
372
- `isSameDay`, `addMonths`, `addMonthsClampingDay(date, n)` (like `addMonths` but clamps the result to
373
- the target month's last day instead of overflowing into the month after — e.g. Jan 31 + 1 month
374
- lands on Feb 28/29, not Mar 3; backs `lr-date-picker`'s PageUp/PageDown), `clampDate`,
375
- `monthMatrix(year, month, firstDayOfWeek)`, `weekdayLabels(firstDayOfWeek, format, locale)`,
376
- `monthTitle(year, month, locale)`, `resolveFirstDayOfWeek(value, locale?)`,
377
- `normalizeCalendarMode(value)`, `normalizeCalendarMonths(value)`, `normalizeWeekdayFormat(value)`,
378
- and `dateTimeFormat(locale, options)`.
379
-
380
- **Known gotchas:**
381
-
382
- - `first-day-of-week="auto"` now derives from `locale` when the runtime's `Intl.Locale` exposes
383
- week-info (`weekInfo`/`getWeekInfo()`, still shifting between engines) — `resolveFirstDayOfWeek()`
384
- only hardcodes Sunday as the fallback when that isn't available or `locale` is unset. A
385
- French/German-locale user with a supporting runtime now gets the Monday-first grid their OS would
386
- show; on an older runtime it still falls back to Sunday-first silently. **If you need a guaranteed
387
- locale-correct week start regardless of runtime**, pass an explicit
388
- `first-day-of-week="mon"` (accepted values: `sun`/`mon`/`tue`/`wed`/`thu`/`fri`/`sat`).
389
- - Runtime attribute/property inputs are normalized before calendar math or `Intl` formatting:
390
- unsupported modes and weekday formats use their documented defaults, month counts cannot exceed
391
- the two-grid API, malformed locale tags use the platform locale, and invalid `Date` objects do
392
- not replace the current view.
393
- - (date-input only) — opening the calendar does not move focus into it: `Alt+ArrowDown` leaves focus
394
- on the text input, and the expand button keeps focus when clicked. The focused opener is
395
- remembered. Escape and a finalized calendar selection close the popup and return focus to that
396
- same connected element; a direct `.open = false` also restores it when focus would otherwise
397
- remain inside the now-hidden popup. Outside-pointer dismissal deliberately leaves focus at the
398
- clicked target.
399
- - (date-input only) — typing an unparseable string and blurring/committing sets `badInput` via
400
- `internals.setValidity()` and reverts the displayed text to the last valid commit. The visible
401
- `<input part="input">` mirrors `required` through native `required`/`aria-required` and exposes
402
- touched outer validity through `aria-invalid`; this includes required, bad-input, and range
403
- failures owned by the form-associated host. A host `aria-label` is reactively forwarded to the
404
- input, including later changes/removal, and takes precedence over the component's
405
- label/placeholder fallback. Native validation attempts reveal `aria-invalid`; `form.reset()`
406
- clears that touched presentation. A parseable typed date outside an active bound is committed
407
- instead and reports the precise `rangeUnderflow`/`rangeOverflow` state.
408
- - (date-input only) — declarative, IDL, reset, and restored values are sanitized to exact ISO dates:
409
- calendar-invalid or malformed strings become `''` (and therefore `valueMissing` when required),
410
- while valid dates outside `min`/`max` or `disable-past`/`disable-future` remain submitted and expose
411
- `rangeUnderflow`/`rangeOverflow`. Changes to these constraints, `mode`, and `readonly` recompute
412
- validity synchronously; range mode validates both endpoints.
413
- - The grid keyboard pattern (Arrow/PageUp/PageDown/Home/End navigation with correct focus
414
- sequencing) is implemented correctly and safe to rely on, as is the selected/range-day text color
415
- (`--lr-date-picker-selected-color`, defaulting to `--lr-color-on-brand`, not a hardcoded literal).
416
- Override selected background and foreground together to preserve contrast.
417
-
418
- **Additional API surface:**
419
-
420
- - `--lr-date-picker-month-gap` — Gap between visible months. Default: `var(--lr-space-l)`.
421
- - `--lr-date-picker-header-gap` — Month-header child gap. Default: `var(--lr-space-s)`.
422
- - `--lr-date-picker-radius` — Calendar and control corner radius. Default: `var(--lr-radius)`.
423
- - `--lr-date-picker-nav-hover-bg` — Hover background of the previous/next month-navigation buttons.
424
- Default: `var(--lr-color-brand-quiet)`. An inline `var()` fallback rather than a `:host`
425
- declaration, and the rule wraps its selector in `:where()` so a consumer's own
426
- `::part(previous):hover` still wins without `!important`.
427
- - `--lr-date-picker-nav-active-bg` — Pressed navigation background; defaults to the hover color
428
- mixed by `--lr-color-mix-active`.
429
- - `--lr-date-picker-preset-hover-bg`, `--lr-date-picker-preset-active-bg`, and
430
- `--lr-date-picker-preset-selected-bg` (new in 11.0.0) — hover, pressed, and
431
- currently-selected paint for a `presets` quick-range button. Defaults are
432
- `var(--lr-color-brand-quiet)`, that hover colour mixed by `--lr-color-mix-active`, and
433
- `var(--lr-color-brand)` respectively.
434
- - `--lr-date-picker-preset-selected-border` (default `var(--lr-color-brand)`) and
435
- `--lr-date-picker-preset-selected-color` (default `var(--lr-color-on-brand)`) independently
436
- theme a selected preset's border and foreground; the selected background token controls only its
437
- background.
438
- - `--lr-date-picker-title-hover-color`, `--lr-date-picker-title-active-color`,
439
- `--lr-date-picker-title-active-bg`, and `--lr-date-picker-title-active-radius` — Month-title
440
- hover/press paint and pressed shape; defaults to brand, brand, brand-quiet, and
441
- `var(--lr-date-picker-radius)` respectively.
442
- - `--lr-date-picker-day-hover-bg` and `--lr-date-picker-day-active-bg` — Day hover/press
443
- backgrounds; the pressed default mixes the hover hook by `--lr-color-mix-active`.
444
- - `--lr-date-picker-day-outside-color`, `--lr-date-picker-today-outline`,
445
- `--lr-date-picker-disabled-color`, and `--lr-date-picker-disabled-opacity` — adjacent-month,
446
- today, and disabled-day paint; defaults preserve the quiet-text, brand, and shared disabled
447
- tokens.
448
- - `--lr-date-picker-range-bg`, `--lr-date-picker-range-preview-bg`, and
449
- `--lr-date-picker-range-color` — range-interior, pending-preview, and adjacent-month range text
450
- paint. The preview defaults to the range background hook.
451
- - `--lr-date-picker-selected-bg` and `--lr-date-picker-selected-color` — selected day and range
452
- endpoint paint; defaults to brand/on-brand.
453
- - `--lr-date-picker-view-hover-bg`, `--lr-date-picker-view-active-bg`,
454
- `--lr-date-picker-view-selected-bg`, `--lr-date-picker-view-selected-color`,
455
- `--lr-date-picker-view-today-outline`, and `--lr-date-picker-view-disabled-opacity` — the
456
- corresponding month/year/decade selection-view states, independently themeable from day cells.
457
- - `--lr-date-input-placeholder-color` — Placeholder text color. Default: `var(--lr-color-text-quiet)`.
458
- - `--lr-date-input-gap` — Gap between input-row children. Default: `var(--lr-space-xs)`.
459
- - `--lr-date-input-radius` — Input-row corner radius. Default: `var(--lr-radius)`.
460
- - `--lr-date-input-focus-border-color` — Focused row border color. Default: `var(--lr-color-brand)`.
461
- - `--lr-date-input-fill` — Resting input-row background, public since 16.0.0 (the radius beside it
462
- always was). Default: `var(--lr-color-surface)`, or `var(--lr-color-surface-raised)` under the
463
- `filled`/`filled-outlined` treatments; a value set here wins over every treatment.
464
- - `--lr-date-input-border-color` — Resting input-row border color. Default:
465
- `var(--lr-color-border)`, or `transparent` under `filled`.
466
- - `--lr-form-control-focus-shadow` — The shared field halo, painted as a `box-shadow` while the row
467
- holds focus. Default: `none`. Additive — the focused brand border is never replaced by it.
468
-
469
- ---
@@ -291,8 +291,12 @@ control, without making the control valid — see "The validity alias is cancela
291
291
  `label`, `next-icon`, `previous-icon`, and `start`. Lyra additionally retains `error`, which
292
292
  overrides `errorText`.
293
293
 
294
- The editable input shrinks first in a constrained row; `start` and `end` adornments are each
295
- capped at 40% and ellipsize unbroken content. Clear and calendar actions retain their fixed target.
294
+ The editable input shrinks first in a constrained row. While a `start` or `end` adornment is shown
295
+ it keeps a four-character floor, so a short adornment keeps its content width; without one it
296
+ yields entirely to the clear and calendar actions. Adornments are sized to their content, each
297
+ capped at 40%, and ellipsize unbroken content. Clear and calendar actions retain their fixed
298
+ target, so a row with an adornment that is narrower than those actions plus the floor overflows
299
+ rather than collapsing the field.
296
300
 
297
301
  **Custom states:** `blank`, `disabled`, `open`, and `range`; the shared form-associated mixin also
298
302
  exposes its validity states.
@@ -77,9 +77,9 @@ button, while `error` is set.
77
77
  selection stays silent; every post-mount `selectedDocumentIds` change appends the localized selected count
78
78
  to the document's shared light-DOM polite sink, including zero and repeated equal counts.
79
79
  Internal search, tag-filter, and checkbox native `input`/`change` plus prefixed `lr-input`/
80
- `lr-change` aliases, the tag combobox's lifecycle/filter/clear/invalid events, table pagination and
81
- priority-column visibility events, and the table's click-anywhere selection event stop at the
82
- component's translation boundary. The table is still in multiple-selection semantics so
80
+ `lr-change` aliases, the checkboxes' `lr-checkbox-toggle-request` proposals, the tag combobox's
81
+ lifecycle/filter/clear/invalid events, table pagination and priority-column visibility events, and
82
+ the table's click-anywhere selection event stop at the component's translation boundary. The table is still in multiple-selection semantics so
83
83
  `selectedDocumentIds` reaches row `aria-selected`; document selection itself remains checkbox-owned, while
84
84
  row activation opens the document. Listen for the document-library events above; one interaction
85
85
  emits one documented host contract without also leaking a composed child event.
@@ -65,7 +65,11 @@ value, without suppressing the visible `name` heading.
65
65
  (`<lr-dialog>`'s close event was spelled `lr-dialog-close` before 10.0.0.) The name itself is not
66
66
  dialog-scoped in this library: nesting this viewer inside a consumer's own `<lr-dialog>` means
67
67
  that dialog's `lr-close` listener also observes this event — see `<lr-dialog>`'s own `lr-close`
68
- section (in `overlays.md`) for the full list of emitters and the guard pattern.
68
+ section (in `overlays.md`) for the full list of emitters and the guard pattern. This `lr-close`
69
+ is not cancelable, and it is the viewer's only dismissal report: the shell dialog's own
70
+ `lr-show`, `lr-after-show`, `lr-initial-focus`, `lr-request-close`, `lr-hide`, and
71
+ `lr-after-hide` stay inside the viewer. A registered renderer's descendant dialog keeps those
72
+ events on their normal composed path.
69
73
  - `lr-download` — `detail: { src, filename }`, emitted when the native safe download action is
70
74
  activated. The browser download itself is handled by the link.
71
75
  - `lr-anchor-result` — `detail: { found }`. Emitted by this shell as `{ found: false }` once per
@@ -102,11 +106,15 @@ for the native download action's hover and pressed backgrounds.
102
106
 
103
107
  **Renderer registry exports:**
104
108
 
105
- - `DocumentFile` — the compatible mutable lookup input passed to `matches(file)` callbacks:
109
+ - `DocumentFile` (deprecated, removal not before 23.0.0; use the structurally identical
110
+ `LyraDocumentFile`) — the compatible mutable lookup input passed to `matches(file)` callbacks:
106
111
  `{ name, mimeType, src, anchor?, highlights?, alt? }`. Adapter and legacy-render boundaries
107
112
  receive an immutable file snapshot whose highlights use the shared trimmed, nonempty,
108
- first-wins identity projection.
109
- - `LyraDocumentFile` — the readonly file snapshot wrapped by every discriminated payload.
113
+ first-wins identity projection. Exported signatures, listed below, keep this name until its
114
+ removal; the two names are assignable to each other, so annotate your own code with
115
+ `LyraDocumentFile`.
116
+ - `LyraDocumentFile` — the readonly file snapshot wrapped by every discriminated payload, and the
117
+ supported name for the file type.
110
118
  - `LyraDocumentRendererPayload` — readonly `kind: 'document' | 'av'` discriminated input wrapping an
111
119
  immutable `file`. The AV branch adds readonly `cues` and `tracks`; snapshots retain at most 10,000
112
120
  cues and 64 tracks, clone and freeze every retained record, and bound every retained string.
@@ -116,7 +124,8 @@ for the native download action's hover and pressed backgrounds.
116
124
  - `LyraDocumentRendererAdapterDefinition<K>` / `LyraDocumentRendererAdapter` — strongly typed
117
125
  authoring input and its factory-created, type-erased registry form. The callbacks adapt the legacy
118
126
  file to one payload kind, derive capabilities from that retained payload, and render it.
119
- - `DocumentRendererDefinition` (also `LyraDocumentRendererDefinition`) — a validated direct
127
+ - `LyraDocumentRendererDefinition` (the deprecated `DocumentRendererDefinition` names the same
128
+ union until its removal, no earlier than 23.0.0) — a validated direct
120
129
  `{ render, matches?, capabilities? }`, adapted `{ adapter, matches? }`, or lazy
121
130
  `{ load, matches?, capabilities? }` definition; exactly one of `render`, `adapter`, and `load` is
122
131
  required. Static capabilities are rejected on adapted definitions so their adapter remains the
@@ -9,91 +9,6 @@
9
9
  - **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
10
10
  - **Deprecations** none
11
11
  - **Optional peers** `chart.js`, `chartjs-plugin-annotation`, `chartjs-plugin-datalabels`, `chartjs-plugin-zoom` — see `llms/peers.md`
12
- - **Themeable via** 16 parts, 37 custom properties — see this component's own `@csspart`/`@cssprop` list below
13
- - **Documented with** `lr-line-chart`, `lr-bar-chart`, `lr-pie-chart`, `lr-radar-chart`, `lr-polar-area-chart`, `lr-bubble-chart`, `lr-scatter-chart` (same section below)
12
+ - **Themeable via** 16 parts, 37 custom properties — see `lr-line-chart.md`
13
+ - **Documented with** `lr-line-chart`: see [lr-line-chart.md](./lr-line-chart.md).
14
14
  - **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
15
-
16
- ---
17
-
18
- ## Typed subclasses: `lr-line-chart`, `lr-bar-chart`, `lr-pie-chart`, `lr-doughnut-chart`, `lr-radar-chart`, `lr-polar-area-chart`, `lr-bubble-chart`, `lr-scatter-chart`
19
-
20
- Each is `LyraChart` with a named default `type` — respectively `line`, `bar`, `pie`, `doughnut`,
21
- `radar`, `polarArea`, `bubble`, `scatter`. In parity with the mirrored tags, `type` remains writable
22
- and accepts the full `LyraChartType` vocabulary; the tag name is a convenient default, not a lock.
23
-
24
- Everything else is inherited verbatim from `lr-chart`; each name below has the same type, default,
25
- and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
26
- of every entry in these lists.**
27
-
28
- **Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
29
- (`legend-position`), `hiddenDatums`, `legendMode` (`legend-mode`), `legendDisplay` (`legend-display`),
30
- `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
31
- `stacked`, `stackedAxes`, `withoutAnimation` (`without-animation`),
32
- `withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
33
- `yLabel` (`y-label`), plus additive `labels`, `datasets`, `valueFormatter`, `formatter`,
34
- `tooltipTitleFormatter`, `tooltipFooterFormatter`, `area`, `zoom`,
35
- `height`, `y2Label` (`y2-label`), `beginAtZero` (`begin-at-zero`), `dataLabels`
36
- (`data-labels`), `stackTotals` (`stack-totals`), `config`, `showDataTable`
37
- (`show-data-table`), `dataTableToggle` (`data-table-toggle`), `chartArea` (readonly), and `chart`.
38
- `type` differs only in its initial value.
39
-
40
- **Methods:** `appendData(label, values, maxPoints?)`, `exportData('csv' | 'png')`, `renderChart()`, `resetZoom()`,
41
- `refreshTheme()`.
42
-
43
- **Events:** `lr-zoom` (`detail: { zoomed: boolean }`), `lr-datum-activate`, `lr-point-click` (`detail: { datasetIndex,
44
- index, label, value }`), `lr-legend-visibility-change-request` (cancelable), and
45
- `lr-legend-visibility-change` (commit; both legend events carry `datasetIndex`, `visible`, and the
46
- complete `hiddenDatasets` snapshot). `lr-before-legend-visibility-change` is a **deprecated** alias
47
- of `lr-legend-visibility-change-request` (removal not before 21.0.0).
48
- Radial category legends additionally emit `lr-datum-visibility-change-request` (cancelable) and
49
- `lr-datum-visibility-change`, carrying `index`, `visible` and the frozen `hiddenDatums` snapshot.
50
- `lr-before-datum-visibility-change` is a **deprecated** alias of `lr-datum-visibility-change-request`
51
- (removal not before 21.0.0).
52
-
53
- **Slots:** default JSON configuration script, `data-table`, `center`.
54
-
55
- **CSS parts:** `base`, `plot`, `canvas`, `legend`, `legend-item`, `legend-item-hidden`, `legend-swatch`,
56
- `reset-zoom-button`, `description`, `notices`, `data-table`, `data-table-toggle`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
57
- rendered in place of `canvas` when the optional `chart.js` peer dependency fails to load; the
58
- failure transition is announced through the shared document-level light-DOM assertive sink — see
59
- `llms/components/lr-chart.md`).
60
-
61
- **Themeable custom properties:** `--lr-chart-height`, `--lr-chart-grid-color`,
62
- `--lr-chart-tick-color`, `--lr-chart-tick-font-size`, `--lr-chart-legend-color`, `--lr-chart-tooltip-bg`,
63
- `--lr-chart-tooltip-text`, `--lr-chart-legend-item-hover-bg`,
64
- `--lr-chart-legend-item-active-bg`, `--lr-chart-data-table-button-hover-bg`,
65
- `--lr-chart-data-table-button-active-bg`, `--lr-chart-data-table-toggle-hover-bg`,
66
- `--lr-chart-data-table-toggle-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
67
- `--lr-chart-reset-zoom-button-active-bg`, `--lr-chart-canvas-hover-outline-width`, and
68
- `--lr-chart-canvas-hover-outline-color`, `--lr-chart-pattern-step`, plus `--lr-chart-legend-side-max` — all inherited from `LyraChart`, identical in meaning and default (see
69
- `lr-chart` above); each of the eight variants below reads the same set, so one rule retunes them
70
- together. The mirrored hooks are `--border-color-1`,
71
- `--border-color-2`, `--border-color-3`, `--border-color-4`, `--border-color-5`,
72
- `--border-color-6`, `--fill-color-1`, `--fill-color-2`, `--fill-color-3`, `--fill-color-4`,
73
- `--fill-color-5`, `--fill-color-6`, `--border-radius`, `--border-width`, `--grid-border-width`,
74
- `--grid-color`, `--line-border-width`, and `--point-radius`, also identical to the core chart.
75
-
76
- **Optional peer deps:** same as `lr-chart` — `chart.js`, plus `chartjs-plugin-zoom` only once
77
- `zoom` is set, `chartjs-plugin-datalabels` only once `data-labels`/`stack-totals` is set, and
78
- `chartjs-plugin-annotation` only once `annotations` contains a usable entry.
79
-
80
- ```html
81
- <lr-bar-chart></lr-bar-chart>
82
- <lr-pie-chart></lr-pie-chart>
83
- <script>
84
- document.querySelector('lr-bar-chart').labels = ['A', 'B'];
85
- document.querySelector('lr-bar-chart').datasets = [{ label: 'Count', data: [4, 9] }];
86
-
87
- document.querySelector('lr-pie-chart').labels = ['A', 'B', 'C'];
88
- document.querySelector('lr-pie-chart').datasets = [{ label: 'Share', data: [30, 45, 25], color: ['#2563eb', '#16a34a', '#dc2626'] }];
89
- </script>
90
- ```
91
-
92
- **Known gotchas (in addition to the core `lr-chart` list in `llms/components/lr-chart.md`):**
93
- - Changing `type` after construction may rebuild the underlying Chart.js instance; any active zoom
94
- state is reset and announced before the new type renders.
95
- - `lr-bubble-chart` consumes the exported `LyraChartPoint` shape directly. Set `x`/`y`, optional `r`
96
- for bubble radius, and optional `label` for the point-level accessible/event/export label; no
97
- runtime cast is needed.
98
-
99
- ---