@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 · 23 November 2026
4
+
5
+ - **Copy:** any button can copy a value with `data-mero-copy="…"` or another element's value or text with `data-mero-copy-target`, and confirms it with a notification. When the clipboard is blocked, Mero selects the text instead. The Button has a Copy to clipboard variant.
6
+ - **Local time:** `time[data-mero-time]` shows its `datetime` in the reader's locale and time zone, as an absolute date and time, a date, a time or a relative time that refreshes every minute. Typography has a Local time variant.
7
+ - **Keyboard shortcuts:** `data-mero-shortcut` binds a single key or a two-key sequence to a control, and `data-mero-shortcuts-toggle` turns single-key shortcuts off, as WCAG 2.1.4 requires. The Kbd has a Keyboard shortcuts variant.
8
+ - **Form state:** `data-mero-show-when="field=value"` shows and enables a branch only for the chosen values, and `form[data-mero-dirty]` enables submitting only after a change. The Fieldset has a Conditional fields variant.
9
+ - **Search and filter guard:** `form[data-mero-search]` never lets a failed read replace its list. Mero skips the swap of an error response or one without the `hx-select` region, explains it in `data-mero-search-error` and returns selects, checkboxes and radios to the filters the list shows. A redirected response without the region loads as a full page. The Search Field has a Filtered list variant.
10
+ - **Boosted navigation guard:** `data-mero-boost="#main"` on a boosted container makes the newest boosted GET win, turns a response without that region (a login or proxy error page) or a failed GET into a full page load, closes open drawers and moves focus to the new region unless the person moved it. Boosted forms that change data are never aborted. The Drawer has a Boosted navigation variant.
11
+ - **Focus continuity:** when any htmx swap or morph removes the focused element, focus returns to the same element, else the element with its ID, else the target's `data-mero-focus-fallback`, instead of falling to the page body. Mero acts only when focus was inside the swap target and is on the body afterwards, so it never takes focus from where the person moved it, and a server `autofocus` still wins. Add `data-mero-focus-manual` to keep handling focus yourself.
12
+ - **Live Progress:** `data-mero-live-follow` lets htmx act on `HX-Redirect`, `HX-Location` or `HX-Refresh` from an error response and stops polling, so a 401 for an expired session goes to the login page instead of retrying forever. A `data-mero-live-error` value replaces the default failure text, and `{time}` in it shows when the status was last confirmed. Live Progress has a Stale status variant.
13
+ - **Re-read after unknown:** `data-mero-action-reread="#region"` reads the current page again after an unknown outcome and morphs that region, so the person sees whether the action happened. Mero never repeats the action, and drops the answer when the page has moved on. The Action Button has a Re-read after unknown variant.
14
+ - **One-time credentials:** `data-mero-ephemeral` marks where a secret such as a new API token is shown. Mero empties it when its dialog closes, on a `data-mero-ephemeral-dismiss` button and when the page is hidden. `data-mero-hold` keeps the page while a request is pending or while held content is shown: Mero cancels boosted navigation and requests that would replace it, undoes Back and asks before unload. The Form has a One-time credential variant.
15
+ - **Form outcomes:** `data-mero-form` reports `succeeded`, `rejected` or `unknown` like the Action Button. The submit button gets `data-mero-action-state`, the form fires `mero:action`, and `Mero-Action-Outcome` and `Mero-Action-Message` override the state and the text. A `mero:form-saved` trigger now acts only on a succeeded outcome, so an error or unknown response can never close the dialog or announce a save. The Form has an Action outcome variant.
16
+ - **Outcome safety:** `data-mero-action-expect="selector"` turns a 2xx response without the expected content into `unknown` and skips its swap. `data-mero-action-unknown` sets the text for an unknown outcome or reveals a recovery panel. A request aborted after it was sent always reports `unknown`; only a request cancelled before it was sent clears the state. `data-mero-clear-passwords` empties a form's password fields after every response.
17
+
3
18
  ## 0.7.0 · 23 November 2026
4
19
 
5
20
  - Try six HTMX 4 workflows in the playground. Review price changes with keyboard approval and undo, correct a spreadsheet before import, assign records from the command menu, publish across pages, share saved views and move cards together on a live board. [Open the workflows](https://mero-ui.rubenlangeweg.com/premium) · [Watch the seven captioned walkthroughs](https://mero-ui.rubenlangeweg.com/premium/watch)
package/README.md CHANGED
@@ -41,15 +41,15 @@ Open <http://127.0.0.1:4180> and choose **Check inventory**. Your handler return
41
41
 
42
42
  ### Install with npm
43
43
 
44
- Install the UI assets from the [GitHub release](https://github.com/rubenlangeweg/mero-ui/releases) and HTMX from npm:
44
+ Install Mero UI and HTMX from npm.
45
45
 
46
46
  ```sh
47
- npm install https://github.com/rubenlangeweg/mero-ui/releases/download/v0.7.0/rubenlangeweg-mero-ui-0.7.0.tgz htmx.org@4
47
+ npm install @rubenlangeweg/mero-ui htmx.org@4
48
48
  ```
49
49
 
50
- To skip the install, load a file straight from the tag, for example `https://cdn.jsdelivr.net/gh/rubenlangeweg/mero-ui@v0.7.0/ui/mero.css`.
50
+ To skip the install, load a file straight from the tag, for example `https://cdn.jsdelivr.net/gh/rubenlangeweg/mero-ui@v0.8.0/ui/mero.css`.
51
51
 
52
- Mero targets htmx 4 only. Copy the Mero files you use from `node_modules/@rubenlangeweg/mero-ui/ui/` into your app’s static directory. The first line of each file names its release, for example `/*! @rubenlangeweg/mero-ui 0.7.0 | MIT */`, so a copied file shows which version it is. Serve `htmx.org/dist/htmx.min.js` at the path used in your HTML.
52
+ Mero targets htmx 4 only. Copy the Mero files you use from `node_modules/@rubenlangeweg/mero-ui/ui/` into your app’s static directory. The first line of each file names its release, for example `/*! @rubenlangeweg/mero-ui 0.8.0 | MIT */`, so a copied file shows which version it is. Serve `htmx.org/dist/htmx.min.js` at the path used in your HTML.
53
53
 
54
54
  The Mero scripts listen to htmx 4 events and read `event.detail.ctx`. Load `mero.js` on every page that uses a Mero script.
55
55
 
@@ -1,6 +1,6 @@
1
1
  # Accordion
2
2
 
3
- Mero UI 0.7.0 · Navigation
3
+ Mero UI 0.8.0 · Navigation
4
4
 
5
5
  Disclose one section at a time using grouped native details.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Action Bar
2
2
 
3
- Mero UI 0.7.0 · Studio collections
3
+ Mero UI 0.8.0 · Studio collections
4
4
 
5
5
  Select records and apply one status change to the selection.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Action Button
2
2
 
3
- Mero UI 0.7.0 · Buttons
3
+ Mero UI 0.8.0 · Buttons
4
4
 
5
5
  Run a server action and report whether it succeeded, was refused or has an unknown result.
6
6
 
@@ -40,3 +40,34 @@ Template
40
40
  </span>
41
41
  </div>
42
42
  ````
43
+
44
+ ## Re-read after unknown
45
+
46
+ Read the current state again after an unknown outcome, without repeating the action.
47
+
48
+ This endpoint restarts the export and then answers 504, as a gateway timeout would. data-mero-action-reread names the region to read again: Mero GETs the current page, morphs that region and shows the unknown message again. It never re-sends the POST. A response for another page, an error or a page without the region is dropped.
49
+
50
+ Page assets
51
+
52
+ ```html
53
+ <link rel="stylesheet" href="/mero.css">
54
+ <script defer src="/vendor/htmx.min.js"></script>
55
+ <script defer src="/mero.js"></script>
56
+ <script defer src="/mero-forms.js"></script>
57
+ ```
58
+
59
+ Template
60
+
61
+ ````html
62
+
63
+ <section class="mero-stack" id="export-run" aria-labelledby="export-run-title">
64
+ <h2 class="mero-label" id="export-run-title">Nightly export</h2>
65
+ <p class="mero-description" data-export-restarts>Not restarted yet</p>
66
+ <span class="mero-row">
67
+ <button class="mero-button mero-button-secondary" type="button" id="export-run-restart" hx-post="/demo/catalog/action-button?outcome=lost" hx-swap="none"
68
+ data-mero-action data-mero-action-reread="#export-run">
69
+ <span class="mero-button-label">Restart export</span><span class="mero-indicator mero-spinner" aria-hidden="true"></span></button>
70
+ <span class="mero-action-status" data-mero-action-status role="status"></span>
71
+ </span>
72
+ </section>
73
+ ````
@@ -1,6 +1,6 @@
1
1
  # Agenda
2
2
 
3
- Mero UI 0.7.0 · Studio collections
3
+ Mero UI 0.8.0 · Studio collections
4
4
 
5
5
  Browse daily bookings and add a timed event.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Alert Dialog
2
2
 
3
- Mero UI 0.7.0 · Overlays
3
+ Mero UI 0.8.0 · Overlays
4
4
 
5
5
  Ask for confirmation on a decision that calls for attention.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Alert
2
2
 
3
- Mero UI 0.7.0 · Feedback
3
+ Mero UI 0.8.0 · Feedback
4
4
 
5
5
  Place status or guidance alongside the content it describes.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # App Layout
2
2
 
3
- Mero UI 0.7.0 · Workspace navigation
3
+ Mero UI 0.8.0 · Workspace navigation
4
4
 
5
5
  A responsive workspace with a sidebar, content area and mobile navigation drawer.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Area Chart
2
2
 
3
- Mero UI 0.7.0 · Charts
3
+ Mero UI 0.8.0 · Charts
4
4
 
5
5
  Show the volume and shape of a series over time.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Aura
2
2
 
3
- Mero UI 0.7.0 · Display utilities
3
+ Mero UI 0.8.0 · Display utilities
4
4
 
5
5
  Frame an interactive surface with a subtle moving highlight.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Autocomplete
2
2
 
3
- Mero UI 0.7.0 · Pickers
3
+ Mero UI 0.8.0 · Pickers
4
4
 
5
5
  Request matching options from the server as a user types.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Avatar Group
2
2
 
3
- Mero UI 0.7.0 · Media
3
+ Mero UI 0.8.0 · Media
4
4
 
5
5
  Show a compact cluster of people associated with a workspace.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Avatar
2
2
 
3
- Mero UI 0.7.0 · Media
3
+ Mero UI 0.8.0 · Media
4
4
 
5
5
  Represent a person with initials and an accessible name.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Badge
2
2
 
3
- Mero UI 0.7.0 · Data display
3
+ Mero UI 0.8.0 · Data display
4
4
 
5
5
  Label a status using text and a semantic tone.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Bar Chart
2
2
 
3
- Mero UI 0.7.0 · Charts
3
+ Mero UI 0.8.0 · Charts
4
4
 
5
5
  Compare adjacent categories on a shared linear scale.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Breadcrumbs
2
2
 
3
- Mero UI 0.7.0 · Navigation
3
+ Mero UI 0.8.0 · Navigation
4
4
 
5
5
  Show the user’s current location and its parent pages.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Browser Mockup
2
2
 
3
- Mero UI 0.7.0 · Mockups
3
+ Mero UI 0.8.0 · Mockups
4
4
 
5
5
  Present a site preview inside a compact browser frame.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Button Group
2
2
 
3
- Mero UI 0.7.0 · Buttons
3
+ Mero UI 0.8.0 · Buttons
4
4
 
5
5
  Keep related actions together while preserving each button’s own label and focus.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Button
2
2
 
3
- Mero UI 0.7.0 · Buttons
3
+ Mero UI 0.8.0 · Buttons
4
4
 
5
5
  Trigger an action with a consistent hierarchy of visual emphasis.
6
6
 
@@ -25,6 +25,37 @@ Template
25
25
  </div>
26
26
  ````
27
27
 
28
+ ## Copy to clipboard
29
+
30
+ Copy an ID or a field’s value and confirm it with a notification.
31
+
32
+ data-mero-copy holds the text to copy. data-mero-copy-target names an input, textarea or element whose value or text to copy, which suits secrets, because nothing is repeated in the markup and the text can be selected when the browser blocks clipboard access. data-mero-copy-message replaces the “Copied” notification. The label stays the same, so an aria-label keeps working.
33
+
34
+ Page assets
35
+
36
+ ```html
37
+ <link rel="stylesheet" href="/mero.css">
38
+ <script defer src="/mero.js"></script>
39
+ ```
40
+
41
+ Template
42
+
43
+ ````html
44
+ <div class="mero-scope" data-mero-scope>
45
+ <div class="mero-stack">
46
+ <div class="mero-field">
47
+ <label class="mero-label" for="copy-demo-key">Publishable key</label>
48
+ <div class="mero-input-group">
49
+ <input class="mero-input" id="copy-demo-key" value="pk_live_51HcX2eDeploy" readonly>
50
+ <button class="mero-button mero-button-ghost mero-button-sm" type="button" data-mero-copy-target="#copy-demo-key" aria-label="Copy publishable key">Copy</button>
51
+ </div>
52
+ </div>
53
+ <p class="mero-row">Environment <code>env_7f3a91</code>
54
+ <button class="mero-button mero-button-ghost mero-button-sm" type="button" data-mero-copy="env_7f3a91" aria-label="Copy environment ID">Copy</button></p>
55
+ </div>
56
+ </div>
57
+ ````
58
+
28
59
  ## Compact actions
29
60
 
30
61
  Page assets
@@ -1,6 +1,6 @@
1
1
  # Calendar
2
2
 
3
- Mero UI 0.7.0 · Date and time
3
+ Mero UI 0.8.0 · Date and time
4
4
 
5
5
  Navigate months and choose a day on an inline calendar rendered by the server.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Card
2
2
 
3
- Mero UI 0.7.0 · Layout
3
+ Mero UI 0.8.0 · Layout
4
4
 
5
5
  Group related content and an action into one compact surface.
6
6
 
@@ -8,6 +8,8 @@ Group related content and an action into one compact surface.
8
8
 
9
9
  ## Default
10
10
 
11
+ Put a title and optional description in mero-card-header. Use a section with aria-labelledby on the title when the card is a page region.
12
+
11
13
  Page assets
12
14
 
13
15
  ```html
@@ -24,3 +26,56 @@ Template
24
26
  <a class="mero-button mero-button-secondary" href="/playground">Open playground</a>
25
27
  </article>
26
28
  ````
29
+
30
+ ## Header actions and table
31
+
32
+ Give a card actions at the end of its header and let a table reach its edges.
33
+
34
+ Put actions in mero-card-actions as the header's last child; they stay at the inline end and wrap under the title on narrow cards. Wrap a table in mero-card-flush so its rows and borders run to the card's edges while the first and last cells keep the card's padding. Below 768 px, a mero-table-cards table inside the flush body returns to the card padding and shows labelled cards. If you change the card padding, set --mero-panel-padding instead so the flush body follows.
35
+
36
+ Page assets
37
+
38
+ ```html
39
+ <link rel="stylesheet" href="/mero.css">
40
+ <script defer src="/mero.js"></script>
41
+ ```
42
+
43
+ Template
44
+
45
+ ````html
46
+ <div class="mero-scope" data-mero-scope>
47
+ <section class="mero-card" aria-labelledby="card-releases-title">
48
+ <header class="mero-card-header">
49
+ <h2 class="mero-card-title" id="card-releases-title">Recent releases</h2>
50
+ <div class="mero-card-actions">
51
+ <a class="mero-button mero-button-ghost mero-button-sm" href="/components/sortable-table">View all</a>
52
+ <button class="mero-button mero-button-outline mero-button-sm" type="button" data-mero-toast="Release draft created">New release</button>
53
+ </div>
54
+ </header>
55
+ <div class="mero-card-flush">
56
+ <div class="mero-table-wrap mero-table-cards">
57
+ <table class="mero-table" role="table" aria-labelledby="card-releases-title">
58
+ <thead role="rowgroup"><tr role="row"><th role="columnheader" scope="col">Version</th><th role="columnheader" scope="col">Environment</th><th role="columnheader" scope="col">Status</th></tr></thead>
59
+ <tbody role="rowgroup">
60
+ <tr role="row">
61
+ <th role="rowheader" scope="row"><span data-mero-cell-label aria-hidden="true">Version</span><a class="mero-link" href="/components/sortable-table">v1.4.0</a></th>
62
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Environment</span>Staging</td>
63
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Status</span><span class="mero-badge mero-badge-warning">Review</span></td>
64
+ </tr>
65
+ <tr role="row">
66
+ <th role="rowheader" scope="row"><span data-mero-cell-label aria-hidden="true">Version</span><a class="mero-link" href="/components/sortable-table">v1.3.0</a></th>
67
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Environment</span>Production</td>
68
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Status</span><span class="mero-badge mero-badge-success">Live</span></td>
69
+ </tr>
70
+ <tr role="row">
71
+ <th role="rowheader" scope="row"><span data-mero-cell-label aria-hidden="true">Version</span><a class="mero-link" href="/components/sortable-table">v1.2.2</a></th>
72
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Environment</span>Production</td>
73
+ <td role="cell"><span data-mero-cell-label aria-hidden="true">Status</span><span class="mero-badge">Retired</span></td>
74
+ </tr>
75
+ </tbody>
76
+ </table>
77
+ </div>
78
+ </div>
79
+ </section>
80
+ </div>
81
+ ````
@@ -1,6 +1,6 @@
1
1
  # Carousel
2
2
 
3
- Mero UI 0.7.0 · Media galleries
3
+ Mero UI 0.8.0 · Media galleries
4
4
 
5
5
  Browse product photography with native scroll snap, thumbnails and keyboard controls.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Cell Color Picker
2
2
 
3
- Mero UI 0.7.0 · Workspace forms
3
+ Mero UI 0.8.0 · Workspace forms
4
4
 
5
5
  Change one preference and receive inline confirmation from the server.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Cell Select
2
2
 
3
- Mero UI 0.7.0 · Workspace forms
3
+ Mero UI 0.8.0 · Workspace forms
4
4
 
5
5
  Change one preference and receive inline confirmation from the server.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Cell Slider
2
2
 
3
- Mero UI 0.7.0 · Workspace forms
3
+ Mero UI 0.8.0 · Workspace forms
4
4
 
5
5
  Change one preference and receive inline confirmation from the server.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Cell Switch
2
2
 
3
- Mero UI 0.7.0 · Workspace forms
3
+ Mero UI 0.8.0 · Workspace forms
4
4
 
5
5
  Change one preference and receive inline confirmation from the server.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chain Of Thought
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Display a disclosure of observable execution steps for a report.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chart Tooltip
2
2
 
3
- Mero UI 0.7.0 · Charts
3
+ Mero UI 0.8.0 · Charts
4
4
 
5
5
  Inspect the active data point using a pointer or keyboard.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chat Attachment
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Display a named file and provide a working download.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chat Conversation
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Keep messages, controls and a composer in one scoped conversation.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chat List View
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Open a conversation returned by the server.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chat Loader
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Show a concise status while a response is being prepared.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chat Message Actions
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Copy a reply or mark it as helpful.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chat Message
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Distinguish the sender and keep the message readable after a swap.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chat Source
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Open the exact data behind a generated summary.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chat Tool
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Disclose the inputs and output of an application action.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Checkbox Button Group
2
2
 
3
- Mero UI 0.7.0 · Workspace forms
3
+ Mero UI 0.8.0 · Workspace forms
4
4
 
5
5
  Select several release channels using native checkboxes.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Checkbox Group
2
2
 
3
- Mero UI 0.7.0 · Forms
3
+ Mero UI 0.8.0 · Forms
4
4
 
5
5
  Group related independent choices with a fieldset and legend.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Checkbox
2
2
 
3
- Mero UI 0.7.0 · Forms
3
+ Mero UI 0.8.0 · Forms
4
4
 
5
5
  Include an independent binary choice in a form.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chip
2
2
 
3
- Mero UI 0.7.0 · Data display
3
+ Mero UI 0.8.0 · Data display
4
4
 
5
5
  Display a lightweight label for an attribute or filter value.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Close Button
2
2
 
3
- Mero UI 0.7.0 · Buttons
3
+ Mero UI 0.8.0 · Buttons
4
4
 
5
5
  Give a dialog an icon-only close action with an accessible name.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Code Block
2
2
 
3
- Mero UI 0.7.0 · Conversation
3
+ Mero UI 0.8.0 · Conversation
4
4
 
5
5
  Show a file caption, selectable code and a copy control.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Code Mockup
2
2
 
3
- Mero UI 0.7.0 · Mockups
3
+ Mero UI 0.8.0 · Mockups
4
4
 
5
5
  Present a terminal command and its output.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Color Area
2
2
 
3
- Mero UI 0.7.0 · Colors
3
+ Mero UI 0.8.0 · Colors
4
4
 
5
5
  Open a browser-managed color surface and submit the selected color.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Color Field
2
2
 
3
- Mero UI 0.7.0 · Colors
3
+ Mero UI 0.8.0 · Colors
4
4
 
5
5
  Enter a six-digit hex value directly in a text field.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Color Picker
2
2
 
3
- Mero UI 0.7.0 · Colors
3
+ Mero UI 0.8.0 · Colors
4
4
 
5
5
  Choose a color using the native picker UI.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Color Slider
2
2
 
3
- Mero UI 0.7.0 · Colors
3
+ Mero UI 0.8.0 · Colors
4
4
 
5
5
  Adjust a hue along the color spectrum.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Color Swatch
2
2
 
3
- Mero UI 0.7.0 · Colors
3
+ Mero UI 0.8.0 · Colors
4
4
 
5
5
  Show a color with its human-readable label.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Combo Box
2
2
 
3
- Mero UI 0.7.0 · Pickers
3
+ Mero UI 0.8.0 · Pickers
4
4
 
5
5
  Filter and select from suggestions already on the page.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Command Menu
2
2
 
3
- Mero UI 0.7.0 · Overlays
3
+ Mero UI 0.8.0 · Overlays
4
4
 
5
5
  Press Cmd or Ctrl K to search pages and actions returned by your server.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Command
2
2
 
3
- Mero UI 0.7.0 · Workspace navigation
3
+ Mero UI 0.8.0 · Workspace navigation
4
4
 
5
5
  Search destinations and actions, then use the arrows and Enter to execute.
6
6