@rubenlangeweg/mero-ui 0.7.0 → 0.8.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 (198) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +4 -4
  3. package/agent-docs/components/accordion.md +1 -1
  4. package/agent-docs/components/action-bar.md +1 -1
  5. package/agent-docs/components/action-button.md +32 -1
  6. package/agent-docs/components/agenda.md +1 -1
  7. package/agent-docs/components/alert-dialog.md +1 -1
  8. package/agent-docs/components/alert.md +1 -1
  9. package/agent-docs/components/app-layout.md +1 -1
  10. package/agent-docs/components/area-chart.md +1 -1
  11. package/agent-docs/components/aura.md +1 -1
  12. package/agent-docs/components/autocomplete.md +1 -1
  13. package/agent-docs/components/avatar-group.md +1 -1
  14. package/agent-docs/components/avatar.md +1 -1
  15. package/agent-docs/components/badge.md +1 -1
  16. package/agent-docs/components/bar-chart.md +1 -1
  17. package/agent-docs/components/breadcrumbs.md +1 -1
  18. package/agent-docs/components/browser-mockup.md +1 -1
  19. package/agent-docs/components/button-group.md +1 -1
  20. package/agent-docs/components/button.md +32 -1
  21. package/agent-docs/components/calendar.md +1 -1
  22. package/agent-docs/components/card.md +56 -1
  23. package/agent-docs/components/carousel.md +1 -1
  24. package/agent-docs/components/cell-color-picker.md +1 -1
  25. package/agent-docs/components/cell-select.md +1 -1
  26. package/agent-docs/components/cell-slider.md +1 -1
  27. package/agent-docs/components/cell-switch.md +1 -1
  28. package/agent-docs/components/chain-of-thought.md +1 -1
  29. package/agent-docs/components/chart-tooltip.md +1 -1
  30. package/agent-docs/components/chat-attachment.md +1 -1
  31. package/agent-docs/components/chat-conversation.md +1 -1
  32. package/agent-docs/components/chat-list-view.md +1 -1
  33. package/agent-docs/components/chat-loader.md +1 -1
  34. package/agent-docs/components/chat-message-actions.md +1 -1
  35. package/agent-docs/components/chat-message.md +1 -1
  36. package/agent-docs/components/chat-source.md +1 -1
  37. package/agent-docs/components/chat-tool.md +1 -1
  38. package/agent-docs/components/checkbox-button-group.md +1 -1
  39. package/agent-docs/components/checkbox-group.md +1 -1
  40. package/agent-docs/components/checkbox.md +1 -1
  41. package/agent-docs/components/chip.md +1 -1
  42. package/agent-docs/components/close-button.md +1 -1
  43. package/agent-docs/components/code-block.md +1 -1
  44. package/agent-docs/components/code-mockup.md +1 -1
  45. package/agent-docs/components/color-area.md +1 -1
  46. package/agent-docs/components/color-field.md +1 -1
  47. package/agent-docs/components/color-picker.md +1 -1
  48. package/agent-docs/components/color-slider.md +1 -1
  49. package/agent-docs/components/color-swatch.md +1 -1
  50. package/agent-docs/components/combo-box.md +1 -1
  51. package/agent-docs/components/command-menu.md +1 -1
  52. package/agent-docs/components/command.md +1 -1
  53. package/agent-docs/components/composed-chart.md +1 -1
  54. package/agent-docs/components/context-menu.md +1 -1
  55. package/agent-docs/components/countdown.md +1 -1
  56. package/agent-docs/components/data-grid.md +1 -1
  57. package/agent-docs/components/date-field.md +1 -1
  58. package/agent-docs/components/date-picker.md +1 -1
  59. package/agent-docs/components/date-range-picker.md +1 -1
  60. package/agent-docs/components/description-list.md +30 -0
  61. package/agent-docs/components/description.md +1 -1
  62. package/agent-docs/components/diff.md +1 -1
  63. package/agent-docs/components/disclosure-group.md +1 -1
  64. package/agent-docs/components/disclosure.md +1 -1
  65. package/agent-docs/components/dock.md +1 -1
  66. package/agent-docs/components/drawer.md +83 -1
  67. package/agent-docs/components/drop-zone.md +1 -1
  68. package/agent-docs/components/dropdown.md +1 -1
  69. package/agent-docs/components/emoji-picker.md +1 -1
  70. package/agent-docs/components/emoji-reaction-button.md +1 -1
  71. package/agent-docs/components/empty-state.md +36 -4
  72. package/agent-docs/components/error-message.md +1 -1
  73. package/agent-docs/components/fab.md +1 -1
  74. package/agent-docs/components/field-error.md +1 -1
  75. package/agent-docs/components/fieldset.md +45 -1
  76. package/agent-docs/components/file-input.md +1 -1
  77. package/agent-docs/components/file-tree.md +1 -1
  78. package/agent-docs/components/filter-chips.md +1 -1
  79. package/agent-docs/components/floating-toc.md +1 -1
  80. package/agent-docs/components/footer.md +1 -1
  81. package/agent-docs/components/form.md +155 -1
  82. package/agent-docs/components/hero.md +1 -1
  83. package/agent-docs/components/holo-card.md +1 -1
  84. package/agent-docs/components/hover-card.md +1 -1
  85. package/agent-docs/components/hover-gallery.md +1 -1
  86. package/agent-docs/components/indicator.md +1 -1
  87. package/agent-docs/components/inline-select.md +1 -1
  88. package/agent-docs/components/input-group.md +1 -1
  89. package/agent-docs/components/input-otp.md +1 -1
  90. package/agent-docs/components/input.md +1 -1
  91. package/agent-docs/components/item-card-group.md +1 -1
  92. package/agent-docs/components/item-card.md +1 -1
  93. package/agent-docs/components/join.md +1 -1
  94. package/agent-docs/components/joined-filter.md +1 -1
  95. package/agent-docs/components/kanban.md +1 -1
  96. package/agent-docs/components/kbd.md +32 -1
  97. package/agent-docs/components/kpi-group.md +1 -1
  98. package/agent-docs/components/kpi.md +1 -1
  99. package/agent-docs/components/label.md +1 -1
  100. package/agent-docs/components/line-chart.md +1 -1
  101. package/agent-docs/components/link.md +1 -1
  102. package/agent-docs/components/list-box.md +1 -1
  103. package/agent-docs/components/list-view.md +1 -1
  104. package/agent-docs/components/live-progress.md +34 -1
  105. package/agent-docs/components/map.md +1 -1
  106. package/agent-docs/components/markdown.md +1 -1
  107. package/agent-docs/components/mask.md +1 -1
  108. package/agent-docs/components/megamenu.md +1 -1
  109. package/agent-docs/components/menu-button.md +35 -1
  110. package/agent-docs/components/menu.md +1 -1
  111. package/agent-docs/components/meter.md +1 -1
  112. package/agent-docs/components/modal.md +1 -1
  113. package/agent-docs/components/native-select.md +1 -1
  114. package/agent-docs/components/navbar.md +1 -1
  115. package/agent-docs/components/number-field.md +1 -1
  116. package/agent-docs/components/number-stepper.md +1 -1
  117. package/agent-docs/components/number-value.md +1 -1
  118. package/agent-docs/components/page-header.md +69 -0
  119. package/agent-docs/components/pagination.md +1 -1
  120. package/agent-docs/components/phone-mockup.md +1 -1
  121. package/agent-docs/components/pie-chart.md +1 -1
  122. package/agent-docs/components/popover.md +1 -1
  123. package/agent-docs/components/pressable-feedback.md +1 -1
  124. package/agent-docs/components/progress-bar.md +1 -1
  125. package/agent-docs/components/progress-circle.md +1 -1
  126. package/agent-docs/components/prompt-input.md +1 -1
  127. package/agent-docs/components/prompt-suggestion.md +1 -1
  128. package/agent-docs/components/radar-chart.md +1 -1
  129. package/agent-docs/components/radial-chart.md +1 -1
  130. package/agent-docs/components/radio-button-group.md +1 -1
  131. package/agent-docs/components/radio-group.md +1 -1
  132. package/agent-docs/components/range-calendar.md +1 -1
  133. package/agent-docs/components/rating.md +1 -1
  134. package/agent-docs/components/resizable.md +1 -1
  135. package/agent-docs/components/rich-text-editor.md +1 -1
  136. package/agent-docs/components/scroll-shadow.md +1 -1
  137. package/agent-docs/components/search-field.md +43 -1
  138. package/agent-docs/components/segment.md +1 -1
  139. package/agent-docs/components/select.md +1 -1
  140. package/agent-docs/components/separator.md +1 -1
  141. package/agent-docs/components/sheet.md +1 -1
  142. package/agent-docs/components/sidebar.md +1 -1
  143. package/agent-docs/components/skeleton.md +1 -1
  144. package/agent-docs/components/slider.md +1 -1
  145. package/agent-docs/components/sortable-table.md +1 -1
  146. package/agent-docs/components/spinner.md +1 -1
  147. package/agent-docs/components/stack.md +1 -1
  148. package/agent-docs/components/status.md +1 -1
  149. package/agent-docs/components/stepper.md +1 -1
  150. package/agent-docs/components/surface.md +1 -1
  151. package/agent-docs/components/swap.md +1 -1
  152. package/agent-docs/components/switch.md +1 -1
  153. package/agent-docs/components/table.md +58 -1
  154. package/agent-docs/components/tabs.md +24 -1
  155. package/agent-docs/components/tag-group.md +1 -1
  156. package/agent-docs/components/text-area.md +1 -1
  157. package/agent-docs/components/text-field.md +1 -1
  158. package/agent-docs/components/text-rotate.md +1 -1
  159. package/agent-docs/components/text-shimmer.md +1 -1
  160. package/agent-docs/components/theme-controller.md +1 -1
  161. package/agent-docs/components/time-field.md +1 -1
  162. package/agent-docs/components/timeline.md +1 -1
  163. package/agent-docs/components/toast.md +1 -1
  164. package/agent-docs/components/toggle-button-group.md +1 -1
  165. package/agent-docs/components/toggle-button.md +1 -1
  166. package/agent-docs/components/toolbar.md +1 -1
  167. package/agent-docs/components/tooltip.md +1 -1
  168. package/agent-docs/components/trend-chip.md +1 -1
  169. package/agent-docs/components/typed-confirmation.md +1 -1
  170. package/agent-docs/components/typography.md +24 -1
  171. package/agent-docs/components/validator.md +1 -1
  172. package/agent-docs/components/visually-hidden.md +27 -0
  173. package/agent-docs/components/widget.md +1 -1
  174. package/agent-docs/components/window-mockup.md +1 -1
  175. package/agent-docs/llms-components.txt +987 -192
  176. package/agent-docs/llms-full.txt +1016 -201
  177. package/agent-docs/llms-patterns.txt +30 -10
  178. package/agent-docs/llms.txt +5 -2
  179. package/package.json +1 -1
  180. package/ui/insight-charts.mjs +1 -1
  181. package/ui/insight-markdown.mjs +1 -1
  182. package/ui/mero-collections.css +1 -7
  183. package/ui/mero-collections.js +1 -1
  184. package/ui/mero-composition.css +1 -1
  185. package/ui/mero-composition.js +1 -1
  186. package/ui/mero-forms.js +415 -27
  187. package/ui/mero-gallery.css +1 -1
  188. package/ui/mero-gallery.js +1 -1
  189. package/ui/mero-insights.css +1 -1
  190. package/ui/mero-insights.js +1 -1
  191. package/ui/mero-inventory.css +1 -1
  192. package/ui/mero-inventory.js +1 -1
  193. package/ui/mero-layouts.css +1 -4
  194. package/ui/mero-live.js +25 -4
  195. package/ui/mero-workspace.css +1 -1
  196. package/ui/mero-workspace.js +1 -1
  197. package/ui/mero.css +104 -5
  198. package/ui/mero.js +202 -2
@@ -1,4 +1,4 @@
1
- # Mero UI 0.7.0 integration patterns
1
+ # Mero UI 0.8.0 integration patterns
2
2
 
3
3
  ## Install a component
4
4
 
@@ -30,9 +30,9 @@ Fires on a remote combobox input when it needs fresh options, for example an arr
30
30
 
31
31
  ### mero:action
32
32
 
33
- Fires on a `data-mero-action` button when its request starts and when it ends, or on the document when a swap removed the button. Requires `mero-forms.js`.
33
+ Fires on a `data-mero-action` button or a `data-mero-form` when its request starts and when it ends, or on the document when a swap removed the element. Requires `mero-forms.js`.
34
34
 
35
- event.detail: `{ state, status, message }`. `state` is `pending`, `succeeded`, `rejected` or `unknown`. `status` and `message` are set once the request ends.
35
+ event.detail: `{ state, status, message }`. `state` is `pending`, `succeeded`, `rejected` or `unknown`. `status` and `message` are set once the request ends. `status` is 0 when no response arrived.
36
36
 
37
37
  ### mero:refresh
38
38
 
@@ -104,7 +104,7 @@ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero
104
104
  - `data-mero-accordion` — On the parent of `<details>` elements. Only one stays open at a time.
105
105
  - `data-mero-radio-group` — Around radios that sit outside a form. Repeated copies with the same `name` stay independent.
106
106
  - `data-mero-radio-owner` (set by Mero) — On the hidden form Mero adds to own those radios.
107
- - `data-mero-scope` — On a repeated snippet or fragment. Mero renames duplicate IDs inside it and updates `for`, ARIA, `popovertarget`, `data-mero-open` and ID selectors in `hx-target`, `data-mero-return-focus` and `data-mero-fallback-focus` to match.
107
+ - `data-mero-scope` — On a repeated snippet or fragment. Mero renames duplicate IDs inside it and updates `for`, ARIA, `popovertarget`, `data-mero-open` and ID selectors in `hx-target`, `data-mero-return-focus`, `data-mero-fallback-focus`, `data-mero-action-unknown`, `data-mero-action-reread` and `data-mero-ephemeral-dismiss` to match.
108
108
  - `data-mero-listbox` — On a `role="listbox"`. Adds arrow-key navigation and selection, and fires `mero:selection`.
109
109
  - `data-mero-combo` — Root of a combobox. Wraps the `role="combobox"` input and its options.
110
110
  - `data-mero-combo-remote` — On the combobox root when the options come from your server. Mero then leaves filtering to the response.
@@ -118,12 +118,20 @@ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero
118
118
  - `data-mero-tooltip-below` (set by Mero) — On a tooltip placed below its anchor because there is no room above.
119
119
  - `data-mero-tooltip-dismissed` (set by Mero) — On a tooltip closed with Escape, until the pointer and focus leave it.
120
120
  - `data-mero-cell-label` — On an `aria-hidden="true"` span inside a table cell. Copy its column heading here for the card layout. Add `mero-table-cards` to the table wrapper for cards below 768 px, or `mero-table-cards-wide` for 1024 px. See the [Sortable Table](components/sortable-table.md) for the table roles and sort links.
121
+ - `data-mero-card-hidden` — On a `th` or `td` in a `mero-table-cards` table. Hides that column in the card layout below 768 px, or 1024 px with `mero-table-cards-wide`. Put it on the column's header and on each of its cells. See the [Table](components/table?variant=Cards%20on%20phones.md).
121
122
  - `data-mero-command` — On a `<dialog>` holding a remote combobox. Cmd or Ctrl K opens it with an empty query, and choosing an option runs that option’s link, `hx-*` request or toast. Give the shortcut to one command menu per page, including the workspace Command. Group server results with `role="group"` and `aria-labelledby` pointing to a visible heading. Give each option a unique ID. Up and Down cross groups, Home and End reach the first and last result, and the status counts selectable options. Omit empty groups and return one disabled “No results” option when nothing matches.
122
123
  - `data-mero-peek` — Around a table wrapper whose rows have a `.mero-row-link`. With a row link focused, Space shows the row’s `data-mero-peek-body` template in a Preview panel beside the table, or in a bottom sheet below 768 px. While it is open, Up and Down Arrow move between rows and the panel follows focus. Space or Escape closes it and focuses the row. See the [Sortable Table](components/sortable-table.md) Row peek variant.
123
124
  - `data-mero-peek-body` — On a `<template>` inside a row of a `data-mero-peek` table. Holds the server-rendered preview for that row. Give the row a stable `id` so the preview follows it through swaps; otherwise Mero matches the row link’s `href`.
124
125
  - `data-mero-peek-close` (set by Mero) — On the Close button of the Preview panel Mero adds.
125
126
  - `data-mero-restore-focus` — On a list container. After Back to this page, focuses the link in it that was opened. Links are matched by `href`.
126
- - `data-mero-focus-fallback` — On one control inside a `data-mero-restore-focus` container. Gets focus after an htmx swap when the initiating control has no focusable replacement with the same ID.
127
+ - `data-mero-copy-target` — On a button. A selector for an input, textarea or element whose value or text the button copies, then confirms with a “Copied” notification. When the browser blocks clipboard access, Mero selects the text instead. Prefer it for secrets. See the [Button](components/button.md) Copy to clipboard variant.
128
+ - `data-mero-copy-message` — With `data-mero-copy` or `data-mero-copy-target`. Replaces the “Copied” notification.
129
+ - `data-mero-time` — On a `<time datetime>`. Rewrites its text in the reader’s locale and time zone: `absolute` (date and time), `date`, `time` or `relative` (“5 minutes ago”, refreshed every minute, with the full date in `title`). Render the UTC time as its text for readers without scripts. See the [Typography](components/typography.md) Local time variant.
130
+ - `data-mero-shortcut` — On a control. A single key such as `/` or `n`, or a two-key sequence such as `g r`, that focuses a field or clicks anything else. Ignored while typing in a field, in a menu, list, tab list, grid or combobox, with Ctrl, Cmd or Alt held, and outside an open modal dialog. Mero sets `aria-keyshortcuts` for single keys. See the [Kbd](components/kbd.md) Keyboard shortcuts variant.
131
+ - `data-mero-shortcuts-toggle` — On a checkbox, switch, `menuitemcheckbox` or button. Turns single-key shortcuts off and on for every page in this browser, as WCAG 2.1.4 requires, and removes `aria-keyshortcuts` while they are off. Mero keeps its checked or pressed state in step.
132
+ - `data-mero-focus-fallback` — On one focusable element inside an htmx swap target, or inside a `data-mero-restore-focus` container. When a swap or morph removes the focused element and leaves focus on the page body, Mero focuses the same element if it survived, else the element with its ID, else this fallback. Mero only acts when focus was inside the target as the swap began, never after the person moved focus elsewhere, and a server `autofocus` wins.
133
+ - `data-mero-focus-manual` — On an htmx swap target, or an ancestor. Mero leaves focus after swaps inside it to your own code.
134
+ - `data-mero-boost` — On an element with `hx-boost:inherited`, such as `<body>`. A selector for the region every boosted page contains. The newest boosted GET wins and older ones are aborted; boosted forms that change data are never aborted. A response without the region and without `HX-Redirect`, `HX-Location` or `HX-Refresh`, or a GET that fails without a response, becomes a full page load. When a boosted page swaps in, open dialogs other than static and alert dialogs close, and focus moves to the region unless htmx `autofocus` placed it or the person moved it during the load. See the [Drawer](components/drawer.md) Boosted navigation variant.
127
135
  - `data-mero-pending` — On any element. Shows a `.mero-indicator` inside it, as `.htmx-request` does.
128
136
  - `data-mero-request` — With a pending state. Sets a progress cursor on the element.
129
137
 
@@ -135,22 +143,34 @@ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero
135
143
  - `data-mero-confirm-reason` — On the optional reason field. Add `required` to require a non-empty, trimmed value.
136
144
  - `data-mero-confirm-submit` — On the danger submit button. Render it disabled until the phrase and any required reason are ready.
137
145
  - `data-mero-confirm-hint` — A polite status in the form explaining what still needs to be entered. Associate it with the input and the confirm button.
138
- - `data-mero-form` — On a form that htmx submits. Disables its submit buttons while the request runs, swaps in the replacement form on HTTP 422 and focuses the first invalid field.
146
+ - `data-mero-form` — On a form that htmx submits. Disables its submit buttons while the request runs, swaps in the replacement form on HTTP 422 and focuses the first invalid field. Reports the outcome like `data-mero-action`: the submitter gets `data-mero-action-state`, the form fires `mero:action`, and `Mero-Action-Outcome` and `Mero-Action-Message` override the state and the error text. A `mero:form-saved` trigger only acts on a succeeded outcome. A succeeded `Mero-Action-Message` shows as a toast.
147
+ - `data-mero-clear-passwords` — On a `data-mero-form`. Empties its password fields after every response, whatever the outcome, and in the replacement form after a 422.
139
148
  - `data-mero-action` — On a button outside a form that makes an htmx request. Shows its outcome and ignores clicks while the request runs. `Mero-Action-Outcome` and `Mero-Action-Message` response headers override the state and the text.
140
- - `data-mero-action-state` (set by Mero) — On a `data-mero-action` button: `pending`, then `succeeded` (2xx), `rejected` (4xx other than 408) or `unknown` (anything else, including network errors).
149
+ - `data-mero-action-state` (set by Mero) — On a `data-mero-action` button, or on the button that submitted a `data-mero-form` (the form itself when there is none): `pending`, then `succeeded` (2xx), `rejected` (4xx other than 408) or `unknown` (anything else, including network errors, timeouts and a request aborted after it was sent). A request cancelled before it was sent clears the state.
150
+ - `data-mero-action-expect` — On a `data-mero-action` button, a `data-mero-form` or its submit button. A selector the response body must contain. A success without a match becomes `unknown`, is not swapped and does not show the server’s success message. Use it when the response carries something the person cannot get again, such as a new token.
151
+ - `data-mero-action-unknown` — On a `data-mero-action` button, a `data-mero-form` or its submit button. The text to show for an unknown outcome when the server sent no `Mero-Action-Message`, or `#id` of a hidden recovery panel to reveal. Mero hides the panel again when the next request starts. Wrap a `.mero-alert` in the hidden element, because the alert sets its own display.
152
+ - `data-mero-action-reread` — On a `data-mero-action` button, a `data-mero-form` or an ancestor. A selector for the region to read again after an `unknown` outcome. Mero GETs the current page with a `Mero-Reread` request header, morphs the region from the response and shows the unknown message again. It never repeats the action. The answer is dropped when it is not a 2xx, lacks the region, the URL changed or a newer read started. See the [Action Button](components/action-button.md) Re-read after unknown variant.
141
153
  - `data-mero-action-status` — A live region next to the button. Receives the outcome message and a `data-tone`. Without one, the message shows as a toast.
154
+ - `data-mero-search` — On a search or filter form whose htmx GET replaces a list. A failed read never replaces the list: Mero skips the swap of a non-2xx response and of a response without the `hx-select` region, shows a message in `data-mero-search-error` and, once no search is pending, returns selects, checkboxes and radios to the values of the list on screen. Text the person typed stays. A redirected response without the region, such as a login page, loads as a full page. Use `hx-sync="this:replace"` so the newest search wins. See the [Search Field](components/search-field.md) Filtered list variant.
155
+ - `data-mero-search-error` — Inside a `data-mero-search` form. A hidden alert that receives the failure message and hides again after the next successful read. Its attribute value, when set, is the message; otherwise Mero uses `Mero-Form-Error` or a default.
142
156
  - `data-mero-form-error` — Inside the form. Receives the message when a request fails with a status other than 422. Send your own text in a `Mero-Form-Error` response header.
143
157
  - `data-mero-return-focus` — On the form. Selector for the element to focus after `mero:form-saved`.
144
158
  - `data-mero-fallback-focus` — On the form. Selector to focus when the return-focus element is gone.
159
+ - `data-mero-show-when` — On a branch inside a form, ideally a `<fieldset>`. `field=value other` shows the branch while the form’s field has one of the values and hides and disables it otherwise, so its fields neither validate nor submit. Render the right state on the server too. See the [Fieldset](components/fieldset.md) Conditional fields variant.
160
+ - `data-mero-dirty` — On a form. Keeps its submit buttons disabled until a field differs from the value the server rendered, and again once every field is back to that value.
145
161
  - `data-mero-close-all` — On a form in a nested dialog. A save closes the parent dialogs too.
162
+ - `data-mero-hold` — Keeps the page while something the person cannot get back is on its way or on screen. On a `data-mero-form` or `data-mero-action` button it holds while the request is pending. On a `data-mero-ephemeral` element it holds while the element has content. While held, Mero cancels boosted navigation, history restores and requests whose target is the body or contains the held element, undoes Back to another htmx history entry and asks before the page unloads. Requests from controls inside the held content still run. The value is the warning shown as a toast; empty uses a generic text. See the [Form](components/form.md) One-time credential variant.
163
+ - `data-mero-ephemeral` — On the element that receives a one-time secret, such as a new API token. Mero empties it when its dialog closes, when a `data-mero-ephemeral-dismiss` button inside it is activated, and when the page is hidden, so the back-forward cache cannot show it again. Add `data-mero-hold` to keep the page while it has content.
164
+ - `data-mero-ephemeral-dismiss` — On a button inside a `data-mero-ephemeral` element. Empties that element. The optional value is a selector to focus afterwards; otherwise the emptied element takes focus.
146
165
 
147
166
  ### Live progress · mero-live.js
148
167
 
149
168
  - `data-mero-live` — On a region with `hx-get` and `hx-trigger="mero:refresh"`. Its value is the interval in milliseconds, 3000 by default. Polling pauses while the page is hidden. Send `Mero-Live: done` on the final successful response.
150
169
  - `data-mero-live-status` — Use this polite status region as the innerHTML target. Return a status label as an HTML fragment. Mero skips a repeated label so it is announced once.
151
- - `data-mero-live-error` — An initially empty status region that announces a failed read. The last good status stays visible until a successful read.
170
+ - `data-mero-live-error` — An initially empty status region that announces a failed read. The last good status stays visible until a successful read. The attribute value, when set, replaces the default text; `{time}` becomes the time of the last good read in the browser’s locale, or the page load when no read has succeeded yet.
171
+ - `data-mero-live-follow` — On the `data-mero-live` region. An error response with `HX-Redirect`, `HX-Location` or `HX-Refresh: true`, such as a 401 for an expired session, is handed to htmx instead of retried, and polling stops. Without it Mero ignores those headers on an error response and keeps retrying.
152
172
  - `data-mero-live-retry` — On a hidden button. Mero shows it after a failed read. Activating it refreshes the status immediately. If a successful read hides the focused button, focus returns to the region.
153
- - `data-mero-live-done` — On an operation with a final status. Mero sets it after a successful response with the terminal header. Render it yourself if the operation has already finished.
173
+ - `data-mero-live-done` — On an operation with a final status. Mero sets it after a successful response with the terminal header, and after following a redirect with `data-mero-live-follow`. Render it yourself if the operation has already finished.
154
174
 
155
175
  ### Gallery · mero-gallery.js
156
176
 
@@ -182,7 +202,7 @@ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero
182
202
  - `data-mero-series` — On each chart mark. Arrow up and down move between series at the same category.
183
203
  - `data-mero-plot-readout` — Receives the text of the active mark for assistive technology.
184
204
  - `data-mero-plot-tooltip` — The tooltip positioned at the active mark.
185
- - `data-mero-copy` — On a button in a code block or chat message. Copies the code or the message text.
205
+ - `data-mero-copy` — On a button in a code block or chat message, empty: copies the code or the message text (`mero-insights.js`). With a value, on any button: copies that text and confirms it with a notification (`mero.js`).
186
206
  - `data-mero-copy-label` (set by Mero) — On a copy button. Its original label, restored after “Copied”.
187
207
  - `data-mero-message-text` — Inside a chat message. The text a copy button copies.
188
208
  - `data-mero-reaction` — On a reaction button. Toggles `aria-pressed`, updates the count and fires `mero:reaction`.
@@ -1,6 +1,6 @@
1
1
  # Mero UI
2
2
 
3
- > Mero UI 0.7.0 provides HTML components and HTMX 4 patterns for server-rendered applications.
3
+ > Mero UI 0.8.0 provides HTML components and HTMX 4 patterns for server-rendered applications.
4
4
 
5
5
  Choose a component to find its variants, templates and required assets. Use the bundled index for the release installed in your application.
6
6
 
@@ -22,7 +22,6 @@ Choose a component to find its variants, templates and required assets. Use the
22
22
  - [Data Grid](components/data-grid.md) — Search, sort, select and edit products in a server-rendered collection.
23
23
  - [Action Bar](components/action-bar.md) — Select records and apply one status change to the selection.
24
24
  - [Agenda](components/agenda.md) — Browse daily bookings and add a timed event.
25
- - [Empty State](components/empty-state.md) — Explain an empty result and give the user a relevant next action.
26
25
  - [File Tree](components/file-tree.md) — Expand folders and preview a selected file with native disclosure controls.
27
26
  - [Floating TOC](components/floating-toc.md) — Navigate to sections with an index that follows the reading position.
28
27
  - [Hover Card](components/hover-card.md) — Preview a contributor on hover, focus or tap.
@@ -183,6 +182,7 @@ Choose a component to find its variants, templates and required assets. Use the
183
182
  ## Feedback
184
183
 
185
184
  - [Alert](components/alert.md) — Place status or guidance alongside the content it describes.
185
+ - [Empty State](components/empty-state.md) — Explain an empty result and give the user a relevant next action.
186
186
  - [Meter](components/meter.md) — Show a measurement between known bounds.
187
187
  - [Live Progress](components/live-progress.md) — Follow a deployment through to its final status.
188
188
  - [Progress Bar](components/progress-bar.md) — Report measurable progress toward completion.
@@ -193,6 +193,7 @@ Choose a component to find its variants, templates and required assets. Use the
193
193
  ## Layout
194
194
 
195
195
  - [Card](components/card.md) — Group related content and an action into one compact surface.
196
+ - [Page Header](components/page-header.md) — Open a page with its title, a short description and the page’s main actions.
196
197
  - [Separator](components/separator.md) — Separate related content sections using a semantic rule.
197
198
  - [Surface](components/surface.md) — Give related content a tonal background with shared theme tokens.
198
199
  - [Toolbar](components/toolbar.md) — Keep nearby actions aligned and grouped by purpose.
@@ -217,6 +218,7 @@ Choose a component to find its variants, templates and required assets. Use the
217
218
 
218
219
  - [Badge](components/badge.md) — Label a status using text and a semantic tone.
219
220
  - [Chip](components/chip.md) — Display a lightweight label for an attribute or filter value.
221
+ - [Description List](components/description-list.md) — Show a record’s fields as label and value pairs.
220
222
  - [Table](components/table.md) — Show comparable records in a native table with column headers.
221
223
  - [Sortable Table](components/sortable-table.md) — Sort server-rendered rows from the column headers and open a row from anywhere in it.
222
224
  - [Filter Chips](components/filter-chips.md) — Add filters from a menu, see them as chips and remove them one at a time. The URL keeps the state.
@@ -232,6 +234,7 @@ Choose a component to find its variants, templates and required assets. Use the
232
234
  ## Utilities
233
235
 
234
236
  - [Scroll Shadow](components/scroll-shadow.md) — Expose a scrollable region with a visual cue that more content is available.
237
+ - [Visually Hidden](components/visually-hidden.md) — Give screen readers context that the visible text leaves implied.
235
238
 
236
239
  ## Composition
237
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubenlangeweg/mero-ui",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "description": "HTML components and HTMX patterns for server-rendered interfaces.",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- /*! @rubenlangeweg/mero-ui 0.7.0 | MIT */
1
+ /*! @rubenlangeweg/mero-ui 0.8.0 | MIT */
2
2
  // Optional server-side helper. Render the result in a full page or an HTMX response.
3
3
  // Each row is {label, values: [number, ...]}. Values are finite and nonnegative.
4
4
  const chartTypes = new Set(['line', 'area', 'bar', 'composed', 'pie', 'radar', 'radial']);
@@ -1,4 +1,4 @@
1
- /*! @rubenlangeweg/mero-ui 0.7.0 | MIT */
1
+ /*! @rubenlangeweg/mero-ui 0.8.0 | MIT */
2
2
  // Render a small Markdown subset for messages with no raw HTML or embeds.
3
3
  function escape(value) {
4
4
  return String(value).replace(/[&<>"']/g, character => ({ '&':'&amp;', '<':'&lt;', '>':'&gt;', '"':'&quot;', "'":'&#39;' }[character]));
@@ -1,4 +1,4 @@
1
- /*! @rubenlangeweg/mero-ui 0.7.0 | MIT */
1
+ /*! @rubenlangeweg/mero-ui 0.8.0 | MIT */
2
2
  /* Optional collection components. Everything inherits the base Mero theme. */
3
3
  :where(.mero-collection,.mero-agenda,.mero-item-card,.mero-list-view,.mero-widget,.mero-file-tree,.mero-kanban,.mero-toc,.mero-place-map,.mero-collection-timeline,.mero-hover-card,.mero-collection-empty) {
4
4
  box-sizing: border-box;
@@ -59,12 +59,6 @@
59
59
  .mero-collection-message:empty { margin:0; }
60
60
  .mero-collection-foot { margin-bottom:0; }
61
61
  .mero-collection-empty { text-align:center; }
62
- .mero-empty-state { padding:1.1rem; text-align:center; color:var(--mero-text); }
63
- .mero-empty-state strong,.mero-empty-state p { display:block; margin:.3rem 0 0; }
64
- .mero-empty-state p { color:var(--mero-muted); font-size:.79rem; }
65
- .mero-empty-glyph { position:relative; display:inline-grid; place-items:center; width:2.5rem; height:2.5rem; border-radius:var(--mero-radius); background:var(--mero-raised); font:1.6rem/1 system-ui; }
66
- .mero-empty-glyph::before { content:""; box-sizing:border-box; width:.85rem; height:.85rem; border:1.5px solid currentColor; border-radius:50%; transform:translate(-.09rem,-.09rem); }
67
- .mero-empty-glyph::after { content:""; position:absolute; width:.45rem; height:1.5px; border-radius:1px; background:currentColor; transform:translate(.35rem,.35rem) rotate(45deg); }
68
62
  .mero-agenda .mero-collection-actions button { display:grid; place-items:center; inline-size:2rem; min-block-size:2rem; padding:0; }
69
63
  .mero-agenda .mero-collection-actions button span { box-sizing:border-box; inline-size:.44rem; block-size:.44rem; border:solid currentColor; border-width:1.5px 1.5px 0 0; transform:translateX(-.08rem) rotate(45deg); }
70
64
  .mero-agenda button[data-agenda-action=previous] span, .mero-agenda button[data-agenda-action=next]:dir(rtl) span { transform:translateX(.08rem) rotate(-135deg); }
@@ -1,4 +1,4 @@
1
- /*! @rubenlangeweg/mero-ui 0.7.0 | MIT */
1
+ /*! @rubenlangeweg/mero-ui 0.8.0 | MIT */
2
2
  /* Optional Studio collection interactions. HTMX owns requests and swaps. */
3
3
  (() => {
4
4
  const gridSelector = '[data-mero-grid]';
@@ -1,4 +1,4 @@
1
- /*! @rubenlangeweg/mero-ui 0.7.0 | MIT */
1
+ /*! @rubenlangeweg/mero-ui 0.8.0 | MIT */
2
2
  :where(.mero-join, .mero-link-menu, .mero-editorial-hero, .mero-footer-nav, .mero-theme-sample,
3
3
  .mero-validation-example, .mero-aura, .mero-countdown, .mero-mask-sample, .mero-deck,
4
4
  .mero-status-marker, .mero-swap, .mero-text-cycle, .mero-device) {
@@ -1,4 +1,4 @@
1
- /*! @rubenlangeweg/mero-ui 0.7.0 | MIT */
1
+ /*! @rubenlangeweg/mero-ui 0.8.0 | MIT */
2
2
  (() => {
3
3
  const rotations = new Map();
4
4
  function advance(cycle) {