@rubenlangeweg/mero-ui 0.0.0-stage → 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 (200) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/LICENSE +21 -0
  3. package/README.md +141 -2
  4. package/agent-docs/components/accordion.md +31 -0
  5. package/agent-docs/components/action-bar.md +45 -0
  6. package/agent-docs/components/action-button.md +73 -0
  7. package/agent-docs/components/agenda.md +38 -0
  8. package/agent-docs/components/alert-dialog.md +36 -0
  9. package/agent-docs/components/alert.md +25 -0
  10. package/agent-docs/components/app-layout.md +36 -0
  11. package/agent-docs/components/area-chart.md +36 -0
  12. package/agent-docs/components/aura.md +24 -0
  13. package/agent-docs/components/autocomplete.md +81 -0
  14. package/agent-docs/components/avatar-group.md +26 -0
  15. package/agent-docs/components/avatar.md +25 -0
  16. package/agent-docs/components/badge.md +26 -0
  17. package/agent-docs/components/bar-chart.md +36 -0
  18. package/agent-docs/components/breadcrumbs.md +28 -0
  19. package/agent-docs/components/browser-mockup.md +26 -0
  20. package/agent-docs/components/button-group.md +26 -0
  21. package/agent-docs/components/button.md +106 -0
  22. package/agent-docs/components/calendar.md +105 -0
  23. package/agent-docs/components/card.md +81 -0
  24. package/agent-docs/components/carousel.md +78 -0
  25. package/agent-docs/components/cell-color-picker.md +32 -0
  26. package/agent-docs/components/cell-select.md +32 -0
  27. package/agent-docs/components/cell-slider.md +32 -0
  28. package/agent-docs/components/cell-switch.md +32 -0
  29. package/agent-docs/components/chain-of-thought.md +26 -0
  30. package/agent-docs/components/chart-tooltip.md +36 -0
  31. package/agent-docs/components/chat-attachment.md +26 -0
  32. package/agent-docs/components/chat-conversation.md +61 -0
  33. package/agent-docs/components/chat-list-view.md +25 -0
  34. package/agent-docs/components/chat-loader.md +24 -0
  35. package/agent-docs/components/chat-message-actions.md +25 -0
  36. package/agent-docs/components/chat-message.md +24 -0
  37. package/agent-docs/components/chat-source.md +24 -0
  38. package/agent-docs/components/chat-tool.md +41 -0
  39. package/agent-docs/components/checkbox-button-group.md +29 -0
  40. package/agent-docs/components/checkbox-group.md +29 -0
  41. package/agent-docs/components/checkbox.md +25 -0
  42. package/agent-docs/components/chip.md +22 -0
  43. package/agent-docs/components/close-button.md +33 -0
  44. package/agent-docs/components/code-block.md +24 -0
  45. package/agent-docs/components/code-mockup.md +25 -0
  46. package/agent-docs/components/color-area.md +30 -0
  47. package/agent-docs/components/color-field.md +30 -0
  48. package/agent-docs/components/color-picker.md +28 -0
  49. package/agent-docs/components/color-slider.md +31 -0
  50. package/agent-docs/components/color-swatch.md +26 -0
  51. package/agent-docs/components/combo-box.md +41 -0
  52. package/agent-docs/components/command-menu.md +46 -0
  53. package/agent-docs/components/command.md +38 -0
  54. package/agent-docs/components/composed-chart.md +36 -0
  55. package/agent-docs/components/context-menu.md +31 -0
  56. package/agent-docs/components/countdown.md +26 -0
  57. package/agent-docs/components/data-grid.md +159 -0
  58. package/agent-docs/components/date-field.md +28 -0
  59. package/agent-docs/components/date-picker.md +30 -0
  60. package/agent-docs/components/date-range-picker.md +40 -0
  61. package/agent-docs/components/description-list.md +30 -0
  62. package/agent-docs/components/description.md +28 -0
  63. package/agent-docs/components/diff.md +43 -0
  64. package/agent-docs/components/disclosure-group.md +31 -0
  65. package/agent-docs/components/disclosure.md +25 -0
  66. package/agent-docs/components/dock.md +26 -0
  67. package/agent-docs/components/drawer.md +116 -0
  68. package/agent-docs/components/drop-zone.md +34 -0
  69. package/agent-docs/components/dropdown.md +31 -0
  70. package/agent-docs/components/emoji-picker.md +31 -0
  71. package/agent-docs/components/emoji-reaction-button.md +26 -0
  72. package/agent-docs/components/empty-state.md +56 -0
  73. package/agent-docs/components/error-message.md +25 -0
  74. package/agent-docs/components/fab.md +26 -0
  75. package/agent-docs/components/field-error.md +30 -0
  76. package/agent-docs/components/fieldset.md +82 -0
  77. package/agent-docs/components/file-input.md +32 -0
  78. package/agent-docs/components/file-tree.md +24 -0
  79. package/agent-docs/components/filter-chips.md +149 -0
  80. package/agent-docs/components/floating-toc.md +24 -0
  81. package/agent-docs/components/footer.md +24 -0
  82. package/agent-docs/components/form.md +189 -0
  83. package/agent-docs/components/hero.md +26 -0
  84. package/agent-docs/components/holo-card.md +33 -0
  85. package/agent-docs/components/hover-card.md +26 -0
  86. package/agent-docs/components/hover-gallery.md +78 -0
  87. package/agent-docs/components/indicator.md +24 -0
  88. package/agent-docs/components/inline-select.md +26 -0
  89. package/agent-docs/components/input-group.md +30 -0
  90. package/agent-docs/components/input-otp.md +30 -0
  91. package/agent-docs/components/input.md +28 -0
  92. package/agent-docs/components/item-card-group.md +24 -0
  93. package/agent-docs/components/item-card.md +24 -0
  94. package/agent-docs/components/join.md +24 -0
  95. package/agent-docs/components/joined-filter.md +28 -0
  96. package/agent-docs/components/kanban.md +26 -0
  97. package/agent-docs/components/kbd.md +53 -0
  98. package/agent-docs/components/kpi-group.md +24 -0
  99. package/agent-docs/components/kpi.md +24 -0
  100. package/agent-docs/components/label.md +28 -0
  101. package/agent-docs/components/line-chart.md +64 -0
  102. package/agent-docs/components/link.md +22 -0
  103. package/agent-docs/components/list-box.md +30 -0
  104. package/agent-docs/components/list-view.md +24 -0
  105. package/agent-docs/components/live-progress.md +71 -0
  106. package/agent-docs/components/map.md +26 -0
  107. package/agent-docs/components/markdown.md +36 -0
  108. package/agent-docs/components/mask.md +26 -0
  109. package/agent-docs/components/megamenu.md +26 -0
  110. package/agent-docs/components/menu-button.md +112 -0
  111. package/agent-docs/components/menu.md +24 -0
  112. package/agent-docs/components/meter.md +28 -0
  113. package/agent-docs/components/modal.md +34 -0
  114. package/agent-docs/components/native-select.md +26 -0
  115. package/agent-docs/components/navbar.md +24 -0
  116. package/agent-docs/components/number-field.md +28 -0
  117. package/agent-docs/components/number-stepper.md +31 -0
  118. package/agent-docs/components/number-value.md +26 -0
  119. package/agent-docs/components/page-header.md +69 -0
  120. package/agent-docs/components/pagination.md +40 -0
  121. package/agent-docs/components/phone-mockup.md +26 -0
  122. package/agent-docs/components/pie-chart.md +36 -0
  123. package/agent-docs/components/popover.md +30 -0
  124. package/agent-docs/components/pressable-feedback.md +24 -0
  125. package/agent-docs/components/progress-bar.md +27 -0
  126. package/agent-docs/components/progress-circle.md +23 -0
  127. package/agent-docs/components/prompt-input.md +32 -0
  128. package/agent-docs/components/prompt-suggestion.md +32 -0
  129. package/agent-docs/components/radar-chart.md +36 -0
  130. package/agent-docs/components/radial-chart.md +36 -0
  131. package/agent-docs/components/radio-button-group.md +28 -0
  132. package/agent-docs/components/radio-group.md +29 -0
  133. package/agent-docs/components/range-calendar.md +40 -0
  134. package/agent-docs/components/rating.md +26 -0
  135. package/agent-docs/components/resizable.md +55 -0
  136. package/agent-docs/components/rich-text-editor.md +35 -0
  137. package/agent-docs/components/scroll-shadow.md +31 -0
  138. package/agent-docs/components/search-field.md +70 -0
  139. package/agent-docs/components/segment.md +28 -0
  140. package/agent-docs/components/select.md +31 -0
  141. package/agent-docs/components/separator.md +26 -0
  142. package/agent-docs/components/sheet.md +34 -0
  143. package/agent-docs/components/sidebar.md +36 -0
  144. package/agent-docs/components/skeleton.md +26 -0
  145. package/agent-docs/components/slider.md +27 -0
  146. package/agent-docs/components/sortable-table.md +303 -0
  147. package/agent-docs/components/spinner.md +25 -0
  148. package/agent-docs/components/stack.md +26 -0
  149. package/agent-docs/components/status.md +24 -0
  150. package/agent-docs/components/stepper.md +32 -0
  151. package/agent-docs/components/surface.md +25 -0
  152. package/agent-docs/components/swap.md +24 -0
  153. package/agent-docs/components/switch.md +75 -0
  154. package/agent-docs/components/table.md +88 -0
  155. package/agent-docs/components/tabs.md +88 -0
  156. package/agent-docs/components/tag-group.md +26 -0
  157. package/agent-docs/components/text-area.md +27 -0
  158. package/agent-docs/components/text-field.md +28 -0
  159. package/agent-docs/components/text-rotate.md +24 -0
  160. package/agent-docs/components/text-shimmer.md +24 -0
  161. package/agent-docs/components/theme-controller.md +24 -0
  162. package/agent-docs/components/time-field.md +30 -0
  163. package/agent-docs/components/timeline.md +24 -0
  164. package/agent-docs/components/toast.md +22 -0
  165. package/agent-docs/components/toggle-button-group.md +31 -0
  166. package/agent-docs/components/toggle-button.md +24 -0
  167. package/agent-docs/components/toolbar.md +28 -0
  168. package/agent-docs/components/tooltip.md +27 -0
  169. package/agent-docs/components/trend-chip.md +24 -0
  170. package/agent-docs/components/typed-confirmation.md +160 -0
  171. package/agent-docs/components/typography.md +49 -0
  172. package/agent-docs/components/validator.md +26 -0
  173. package/agent-docs/components/visually-hidden.md +27 -0
  174. package/agent-docs/components/widget.md +24 -0
  175. package/agent-docs/components/window-mockup.md +24 -0
  176. package/agent-docs/llms-components.txt +6676 -0
  177. package/agent-docs/llms-full.txt +6925 -0
  178. package/agent-docs/llms-patterns.txt +250 -0
  179. package/agent-docs/llms.txt +264 -0
  180. package/package.json +48 -4
  181. package/ui/insight-charts.mjs +124 -0
  182. package/ui/insight-markdown.mjs +46 -0
  183. package/ui/mero-collections.css +140 -0
  184. package/ui/mero-collections.js +272 -0
  185. package/ui/mero-composition.css +342 -0
  186. package/ui/mero-composition.js +79 -0
  187. package/ui/mero-forms.js +611 -0
  188. package/ui/mero-gallery.css +122 -0
  189. package/ui/mero-gallery.js +193 -0
  190. package/ui/mero-insights.css +168 -0
  191. package/ui/mero-insights.js +188 -0
  192. package/ui/mero-inventory.css +182 -0
  193. package/ui/mero-inventory.js +56 -0
  194. package/ui/mero-layouts.css +70 -0
  195. package/ui/mero-live.js +141 -0
  196. package/ui/mero-workspace.css +152 -0
  197. package/ui/mero-workspace.js +590 -0
  198. package/ui/mero.css +1021 -0
  199. package/ui/mero.js +1068 -0
  200. package/ui/studio-lamp.webp +0 -0
@@ -0,0 +1,250 @@
1
+ # Mero UI 0.8.0 integration patterns
2
+
3
+ ## Install a component
4
+
5
+ Copy the selected HTML template into your server-rendered page. Serve the listed Mero scripts, stylesheets and media from your static directory. The release package keeps these files in ui/. For requests, serve htmx.org@4’s dist/htmx.min.js at the path used by the template. Load HTMX before mero.js, followed by the listed family scripts.
6
+
7
+ ## Connect an HTML endpoint
8
+
9
+ Replace demonstration URLs with your routes and render user data with your template engine’s HTML escaping. Return the fragment expected by hx-target and hx-swap. Preserve explicit wrapper inheritance such as hx-target:inherited. Keep validation, permissions and persistence in your handler.
10
+
11
+ For a validating data-mero-form, return the filled form with HTTP 422 and mark the invalid field. For Typed Confirmation, keep the original form on a successful save using the response headers under mero:form-saved below.
12
+
13
+ ## Apply a theme
14
+
15
+ Load your --mero-* token overrides after mero.css. Set data-theme="light" or data-theme="dark" on the document or section. Check both themes and keyboard focus after the fragment changes.
16
+
17
+ ## Events Mero sends
18
+
19
+ Events bubble to the document.
20
+
21
+ ### mero:selection
22
+
23
+ Fires on the `data-mero-listbox` element when a person chooses an option.
24
+
25
+ event.detail: `{ value, option }`. `value` is the option’s `data-value`, or its text when that is absent. `option` is the chosen element.
26
+
27
+ ### mero:query
28
+
29
+ Fires on a remote combobox input when it needs fresh options, for example an arrow key after a failed request. Add it to `hx-trigger` next to `input`.
30
+
31
+ ### mero:action
32
+
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
+
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
+
37
+ ### mero:refresh
38
+
39
+ Fires on a `data-mero-live` region to read the latest status. Set `hx-trigger="mero:refresh"` on the region. Requires `mero-live.js`.
40
+
41
+ ### mero:kanban-move
42
+
43
+ Fires on a card after it moves to another lane. Requires `mero-collections.js`.
44
+
45
+ event.detail: `{ card, from, to }`. `from` and `to` are the lanes’ `data-lane` values.
46
+
47
+ ### mero:reaction
48
+
49
+ Fires on a reaction button after its count and pressed state change. Requires `mero-insights.js`.
50
+
51
+ event.detail: `{ label, pressed }`. `label` is the button’s `data-label`. `pressed` is the new state.
52
+
53
+ ## Events Mero acts on
54
+
55
+ ### mero:toast
56
+
57
+ Shows a notification. `message` is required. `tone` and `duration` match `MeroUI.toast`.
58
+
59
+ ```http
60
+ HX-Trigger: {"mero:toast":{"message":"Export ready","tone":"success"}}
61
+ ```
62
+
63
+ ### mero:form-saved
64
+
65
+ Requires `mero-forms.js`. Closes the dialog around the `data-mero-form` that received the event, returns focus and shows `message` as a success toast. Set `target` to a selector when the form is not the element that made the request.
66
+
67
+ ```http
68
+ HX-Reswap: none
69
+ HX-Trigger: {"mero:form-saved":{"message":"Saved"}}
70
+ ```
71
+
72
+ ## window.MeroUI
73
+
74
+ ### MeroUI.open(dialog, { trigger })
75
+
76
+ Opens a `<dialog>` as a modal. Pass the element or its ID. Focus returns to `trigger` on close, by default the element focused when you call it.
77
+
78
+ ### MeroUI.close(dialog, { focus, value })
79
+
80
+ Closes an open dialog. `focus` overrides where focus returns. `value` becomes the dialog’s `returnValue`.
81
+
82
+ ### MeroUI.toast(message, { tone, duration })
83
+
84
+ Shows a notification. `tone` is `accent`, `success`, `warning` or `danger`. `duration` is in milliseconds, 4800 by default. Use 0 to keep it until dismissed.
85
+
86
+ ### MeroUI.init(root)
87
+
88
+ Sets up tabs, listboxes, comboboxes and auto-opening dialogs inside `root`. Mero calls it for every htmx swap. Call it yourself for markup you insert another way.
89
+
90
+ ## Component attributes
91
+
92
+ ### Core · mero.js
93
+
94
+ - `data-mero-open` — On a button. The value is the ID of the `<dialog>` to open as a modal.
95
+ - `data-mero-close` — On a control inside a dialog. Closes it. The value becomes the dialog’s `returnValue`.
96
+ - `data-mero-autoopen` — On a dialog. Opens it as soon as it is on the page or swapped in.
97
+ - `data-mero-static` — On a dialog. A click on the backdrop does not close it.
98
+ - `data-mero-toast` — On a button. Shows the value as a notification on click.
99
+ - `data-mero-tone` — With `data-mero-toast`. One of `accent`, `success`, `warning` or `danger`.
100
+ - `data-mero-toggle` — On a button. Flips `aria-pressed` on click.
101
+ - `data-mero-remove` — On a button inside `.mero-chip`. Removes the chip and moves focus to a neighbour.
102
+ - `data-mero-tabs` — Root of a tab set. Selects tabs in the `role="tablist"` inside and shows the matching panel. Also scopes IDs like `data-mero-scope`.
103
+ - `data-mero-tabs-ready` (set by Mero) — On the tab root once a tab is selected.
104
+ - `data-mero-accordion` — On the parent of `<details>` elements. Only one stays open at a time.
105
+ - `data-mero-radio-group` — Around radios that sit outside a form. Repeated copies with the same `name` stay independent.
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`, `data-mero-fallback-focus`, `data-mero-action-unknown`, `data-mero-action-reread` and `data-mero-ephemeral-dismiss` to match.
108
+ - `data-mero-listbox` — On a `role="listbox"`. Adds arrow-key navigation and selection, and fires `mero:selection`.
109
+ - `data-mero-combo` — Root of a combobox. Wraps the `role="combobox"` input and its options.
110
+ - `data-mero-combo-remote` — On the combobox root when the options come from your server. Mero then leaves filtering to the response.
111
+ - `data-mero-combo-status` — Inside a combobox. The element that receives loading and error text.
112
+ - `data-mero-empty-option` — On the option to show when nothing matches. It cannot be selected.
113
+ - `data-mero-active` (set by Mero) — On the option highlighted with the keyboard.
114
+ - `data-mero-combo-pending` (set by Mero) — On the combobox input while a request for options is in flight.
115
+ - `data-mero-combo-error` (set by Mero) — On the combobox input after a request for options failed.
116
+ - `data-mero-combo-dismissed` (set by Mero) — On the combobox input after Escape. Dismissal clears the active option and blocks late responses. Arrow Down requests fresh options when the server has yet to confirm the current query.
117
+ - `data-mero-error` (set by Mero) — On the combobox status element while it shows an error.
118
+ - `data-mero-tooltip-below` (set by Mero) — On a tooltip placed below its anchor because there is no room above.
119
+ - `data-mero-tooltip-dismissed` (set by Mero) — On a tooltip closed with Escape, until the pointer and focus leave it.
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).
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.
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.
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`.
125
+ - `data-mero-peek-close` (set by Mero) — On the Close button of the Preview panel Mero adds.
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`.
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.
135
+ - `data-mero-pending` — On any element. Shows a `.mero-indicator` inside it, as `.htmx-request` does.
136
+ - `data-mero-request` — With a pending state. Sets a progress cursor on the element.
137
+
138
+ ### Forms · mero-forms.js
139
+
140
+ - `data-mero-confirm` — Add to a `data-mero-form` inside a static alert dialog. [Typed Confirmation](components/typed-confirmation.md) is a UX guard only. The server must re-check the phrase and permissions. Return HTTP 422 with the replacement form and mark its invalid field. Other 4xx responses report rejection. A 5xx or network failure leaves the dialog open with an unknown outcome. On a confirmed 2xx send `HX-Reswap: none` and `mero:form-saved` to close and return focus.
141
+ - `data-mero-confirm-phrase` — On the visible code element containing the exact phrase. Reference its ID in the input’s `aria-describedby`.
142
+ - `data-mero-confirm-input` — On the text input. Matching is case-sensitive and ignores leading and trailing whitespace.
143
+ - `data-mero-confirm-reason` — On the optional reason field. Add `required` to require a non-empty, trimmed value.
144
+ - `data-mero-confirm-submit` — On the danger submit button. Render it disabled until the phrase and any required reason are ready.
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.
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.
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.
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.
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.
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.
157
+ - `data-mero-return-focus` — On the form. Selector for the element to focus after `mero:form-saved`.
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.
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.
165
+
166
+ ### Live progress · mero-live.js
167
+
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.
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.
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.
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.
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.
174
+
175
+ ### Gallery · mero-gallery.js
176
+
177
+ - `data-mero-slide` — On each slide. Its value links the slide to a choice control.
178
+ - `data-mero-gallery-choice` — On a radio or select whose value names a slide. Changing it shows that slide.
179
+ - `data-mero-prev` — On a button. Goes to the previous slide.
180
+ - `data-mero-next` — On a button. Goes to the next slide.
181
+ - `data-mero-gallery-label` — Receives the current slide’s `data-label` text.
182
+ - `data-mero-gallery-link` — On a link. Its `href` follows the current slide’s `data-href`.
183
+ - `data-mero-hover-preview` — On the gallery element. Hovering a choice with a mouse previews its slide.
184
+ - `data-mero-before` — On the first image of an image diff. The slider clips this one.
185
+
186
+ ### Collections · mero-collections.js
187
+
188
+ - `data-mero-grid` — Root of a data grid. Keeps the select-all checkbox, the selection count and the bulk action bar in step with the row checkboxes.
189
+ - `data-mero-grid-focus` — On the grid in a server response. Names what to focus after the swap: `field`, `cancel`, `invalid`, `add`, `search`, `filter`, `sort-name`, `sort-status`, or `edit-ID` and `delete-ID` for that row’s Actions button. Mero removes it once used.
190
+ - `data-mero-agenda` — Root of an agenda. Restores focus after a swap from its `data-agenda-focus` value, and swaps an error response only on HTTP 422.
191
+ - `data-mero-load-superseded` (set by Mero) — On a grid or agenda mount when the person acted before its first refresh returned. That refresh is then discarded.
192
+ - `data-mero-kanban` — Root of a board. Cards move between its `data-lane` columns by drag or by the Move to menu, and fire `mero:kanban-move`.
193
+ - `data-mero-hover-card` — Around a trigger and its preview panel. Opens the panel on hover or focus.
194
+ - `data-mero-toc` — Root of a floating table of contents. Its links scroll the content and mark the current section.
195
+ - `data-mero-place-map` — Root of a map. Choosing a `data-place` pin shows the matching `data-place-detail`.
196
+ - `data-mero-widget` — Around a checklist. Updates its `<progress>` and `<output>` as boxes are checked.
197
+
198
+ ### Insights · mero-insights.js
199
+
200
+ - `data-mero-chart` — On a chart figure. The chart type, used to style the legend. `renderChart` writes it.
201
+ - `data-mero-plot-value` — On each chart mark. The text announced and shown when the mark has focus or hover.
202
+ - `data-mero-series` — On each chart mark. Arrow up and down move between series at the same category.
203
+ - `data-mero-plot-readout` — Receives the text of the active mark for assistive technology.
204
+ - `data-mero-plot-tooltip` — The tooltip positioned at the active mark.
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`).
206
+ - `data-mero-copy-label` (set by Mero) — On a copy button. Its original label, restored after “Copied”.
207
+ - `data-mero-message-text` — Inside a chat message. The text a copy button copies.
208
+ - `data-mero-reaction` — On a reaction button. Toggles `aria-pressed`, updates the count and fires `mero:reaction`.
209
+ - `data-mero-count` — Inside a reaction button. The element holding the count.
210
+ - `data-mero-pressable` — On a button. Flips `aria-pressed` and swaps its star icon.
211
+ - `data-mero-press-icon` — Inside a pressable button. The element holding the icon.
212
+ - `data-mero-suggest` — On a button in a prompt form. Puts its text into the form’s textarea.
213
+ - `data-mero-compose` — On a chat form. Shows progress in its status element, keeps the draft when sending fails and blocks error swaps.
214
+ - `data-mero-chat-status` — Inside a chat form. Receives “Preparing reply…” and send errors.
215
+ - `data-mero-topic` — On each conversation link in a chat inbox. Its value is the conversation’s ID.
216
+ - `data-mero-current-topic` — In a thread response. Marks the link with the same value as current.
217
+ - `data-mero-report-status` — In a chat inbox, Markdown editor or report filter. Receives the result of the last update.
218
+
219
+ ### Workspace · mero-workspace.js
220
+
221
+ - `data-mero-ws-shell` — Root of an app shell. A `data-mero-ws-open` button inside opens its dialog.
222
+ - `data-mero-ws-open` — On a button inside a shell, command menu or emoji picker. Opens that component’s dialog.
223
+ - `data-mero-ws-command` — Root of a command menu. Cmd or Ctrl and K opens it, and typing filters its actions.
224
+ - `data-mero-ws-emoji` — Root of an emoji picker. Choosing an emoji fills its hidden input and closes the dialog.
225
+ - `data-mero-ws-context` — Root of a context menu. A right click, the menu key or Shift and F10 on a row opens its `role="menu"`.
226
+ - `data-mero-ws-context-open` — On the button that opens the same context menu.
227
+ - `data-mero-ws-action` — On a context menu item. Only `pin` has built-in behavior: it toggles the pinned state.
228
+ - `data-mero-ws-editor` — On a rich text form. Copies the formatted text into its `runs` and `body` fields. Buttons with `data-format` apply formatting.
229
+ - `data-mero-ws-number` — Around a number input. Buttons with `data-step` step the value and disable at the limits.
230
+ - `data-mero-ws-upload` — On an upload form. Shows the chosen file name and ignores the response for a file that has since been replaced.
231
+ - `data-mero-ws-wizard` — On a multi-step form. Shows one panel at a time.
232
+ - `data-mero-ws-next` — On the wizard’s button to the next step.
233
+ - `data-mero-ws-back` — On the wizard’s button to the previous step.
234
+ - `data-mero-ws-finish` — On the wizard’s submit button. Shown on the last step only.
235
+ - `data-mero-ws-review` — In the wizard. Receives a summary of the `project` and `access` fields.
236
+ - `data-mero-ws-split` — Root of a resizable split. The separator inside resizes it by drag or arrow keys.
237
+ - `data-mero-ws-snap` — With `data-mero-ws-split`. Adds a snap point learned from the widths the person has chosen.
238
+ - `data-mero-ws-snap-key` — With a snapping split. A name under which the width is remembered for the browser session.
239
+ - `data-mero-ws-split-ready` (set by Mero) — On a snapping split once it is set up.
240
+ - `data-mero-ws-dragging` (set by Mero) — On the split handle during a drag.
241
+ - `data-mero-ws-snapped` (set by Mero) — On the split handle while it rests on the snap point.
242
+ - `data-mero-ws-width` (set by Mero) — On the split handle. The current width in pixels, shown by the stylesheet.
243
+
244
+ ### Composition · mero-composition.js
245
+
246
+ - `data-mero-text-cycle` — Around rotating text. Buttons with `data-cycle-next` and `data-cycle-play` step or auto-advance its `data-cycle-item` elements.
247
+ - `data-mero-theme-scope` — On a section. Receives the theme chosen in the picker inside it.
248
+ - `data-mero-theme-picker` — On a select or radio. Its value becomes the scope’s `data-theme`.
249
+ - `data-mero-cutoff-hour` — Around a `<time>`. Counts down to that hour, 0 to 23 in UTC.
250
+ - `data-mero-check-form` — On the catalog’s validation demo form. It reports a fixed message and is not meant for your app.
@@ -0,0 +1,264 @@
1
+ # Mero UI
2
+
3
+ > Mero UI 0.8.0 provides HTML components and HTMX 4 patterns for server-rendered applications.
4
+
5
+ Choose a component to find its variants, templates and required assets. Use the bundled index for the release installed in your application.
6
+
7
+ ## Guides
8
+
9
+ - [Integration patterns and API reference](llms-patterns.txt)
10
+ - [All component templates](llms-components.txt)
11
+ - [Patterns, reference and all templates in one file](llms-full.txt)
12
+
13
+ ## Media galleries
14
+
15
+ - [Carousel](components/carousel.md) — Browse product photography with native scroll snap, thumbnails and keyboard controls.
16
+ - [Hover Gallery](components/hover-gallery.md) — Explore the shade, base and profile of a product with a pointer, touch or keyboard.
17
+ - [Image Diff](components/diff.md) — Reveal two finishes at the same position using an accessible comparison slider.
18
+ - [Holo Card](components/holo-card.md) — Catch a material sample in a shifting foil reflection.
19
+
20
+ ## Studio collections
21
+
22
+ - [Data Grid](components/data-grid.md) — Search, sort, select and edit products in a server-rendered collection.
23
+ - [Action Bar](components/action-bar.md) — Select records and apply one status change to the selection.
24
+ - [Agenda](components/agenda.md) — Browse daily bookings and add a timed event.
25
+ - [File Tree](components/file-tree.md) — Expand folders and preview a selected file with native disclosure controls.
26
+ - [Floating TOC](components/floating-toc.md) — Navigate to sections with an index that follows the reading position.
27
+ - [Hover Card](components/hover-card.md) — Preview a contributor on hover, focus or tap.
28
+ - [Item Card](components/item-card.md) — Give a related destination an identity, title and supporting detail.
29
+ - [Item Card Group](components/item-card-group.md) — Arrange related destinations into a responsive group.
30
+ - [Kanban](components/kanban.md) — Move a card between stages with a drag or its Move to menu.
31
+ - [List View](components/list-view.md) — Browse structured destinations in a compact keyboard-accessible list.
32
+ - [Map](components/map.md) — Choose a location on a self-contained campus map and read its address.
33
+ - [Timeline](components/timeline.md) — Present milestones in order and identify the current step.
34
+ - [Widget](components/widget.md) — Use a dashboard panel to track a checklist and its progress.
35
+
36
+ ## Workspace forms
37
+
38
+ - [Cell Color Picker](components/cell-color-picker.md) — Change one preference and receive inline confirmation from the server.
39
+ - [Cell Select](components/cell-select.md) — Change one preference and receive inline confirmation from the server.
40
+ - [Cell Slider](components/cell-slider.md) — Change one preference and receive inline confirmation from the server.
41
+ - [Cell Switch](components/cell-switch.md) — Change one preference and receive inline confirmation from the server.
42
+ - [Checkbox Button Group](components/checkbox-button-group.md) — Select several release channels using native checkboxes.
43
+ - [Radio Button Group](components/radio-button-group.md) — Choose one release schedule with labelled option cards.
44
+ - [Native Select](components/native-select.md) — Choose a workspace from labelled option groups.
45
+ - [Inline Select](components/inline-select.md) — Change an audience within the sentence that describes it.
46
+ - [Number Stepper](components/number-stepper.md) — Change a bounded quantity with the keyboard or step buttons.
47
+ - [File Input](components/file-input.md) — Choose a local product image and validate it on the server.
48
+ - [Drop Zone](components/drop-zone.md) — Drop an image or use the native file picker and check the file.
49
+ - [Rich Text Editor](components/rich-text-editor.md) — Edit a short description with bold and italic text and preview the submitted result.
50
+ - [Joined Filter](components/joined-filter.md) — Search and filter releases with one server request.
51
+
52
+ ## Workspace navigation
53
+
54
+ - [App Layout](components/app-layout.md) — A responsive workspace with a sidebar, content area and mobile navigation drawer.
55
+ - [Sidebar](components/sidebar.md) — Navigate the workspace from a side rail that becomes a drawer at narrow widths.
56
+ - [Navbar](components/navbar.md) — Place the workspace name and destinations in a wrapping top bar.
57
+ - [Command](components/command.md) — Search destinations and actions, then use the arrows and Enter to execute.
58
+ - [Context Menu](components/context-menu.md) — Open item actions with the visible button, a secondary click, or Shift F10.
59
+ - [Segment](components/segment.md) — Choose one display density in a compact segmented control.
60
+ - [Stepper](components/stepper.md) — Move through validated project details and review the values before submitting.
61
+ - [Dock](components/dock.md) — Group frequently used workspace destinations in a compact navigation dock.
62
+ - [Megamenu](components/megamenu.md) — Explore grouped destinations from a native disclosure.
63
+ - [Floating Action Button](components/fab.md) — Reveal a small set of workspace shortcuts.
64
+
65
+ ## Workspace tools
66
+
67
+ - [Resizable](components/resizable.md) — Resize two adjacent panels by dragging the divider or using the arrow keys.
68
+ - [Emoji Picker](components/emoji-picker.md) — Search named reactions and submit the selected emoji as a form value.
69
+
70
+ ## Charts
71
+
72
+ - [Area Chart](components/area-chart.md) — Show the volume and shape of a series over time.
73
+ - [Bar Chart](components/bar-chart.md) — Compare adjacent categories on a shared linear scale.
74
+ - [Chart Tooltip](components/chart-tooltip.md) — Inspect the active data point using a pointer or keyboard.
75
+ - [Composed Chart](components/composed-chart.md) — Compare actual volume with its target using columns and a line.
76
+ - [Line Chart](components/line-chart.md) — Trace changes across a reporting period.
77
+ - [Pie Chart](components/pie-chart.md) — See how each collection contributes to total volume.
78
+ - [Radar Chart](components/radar-chart.md) — Compare profiles across axes that use the same units.
79
+ - [Radial Chart](components/radial-chart.md) — Compare categories as concentric rings against the largest category.
80
+
81
+ ## Metrics
82
+
83
+ - [KPI](components/kpi.md) — Pair an exact figure with the reporting period it describes.
84
+ - [KPI Group](components/kpi-group.md) — Keep related measures on a common reporting period.
85
+
86
+ ## Interaction feedback
87
+
88
+ - [Emoji Reaction Button](components/emoji-reaction-button.md) — Add or remove a reaction while keeping its count visible.
89
+ - [Number Value](components/number-value.md) — Display a localized number with its machine-readable value.
90
+ - [Pressable Feedback](components/pressable-feedback.md) — Give a press a tactile response and keep its selected state visible.
91
+ - [Rating](components/rating.md) — Choose a labelled score using native radio controls.
92
+ - [Trend Chip](components/trend-chip.md) — Label the direction and magnitude of a change.
93
+
94
+ ## Conversation
95
+
96
+ - [Chain Of Thought](components/chain-of-thought.md) — Display a disclosure of observable execution steps for a report.
97
+ - [Chat Attachment](components/chat-attachment.md) — Display a named file and provide a working download.
98
+ - [Chat Conversation](components/chat-conversation.md) — Keep messages, controls and a composer in one scoped conversation.
99
+ - [Chat List View](components/chat-list-view.md) — Open a conversation returned by the server.
100
+ - [Chat Loader](components/chat-loader.md) — Show a concise status while a response is being prepared.
101
+ - [Chat Message](components/chat-message.md) — Distinguish the sender and keep the message readable after a swap.
102
+ - [Chat Message Actions](components/chat-message-actions.md) — Copy a reply or mark it as helpful.
103
+ - [Chat Source](components/chat-source.md) — Open the exact data behind a generated summary.
104
+ - [Chat Tool](components/chat-tool.md) — Disclose the inputs and output of an application action.
105
+ - [Code Block](components/code-block.md) — Show a file caption, selectable code and a copy control.
106
+ - [Markdown](components/markdown.md) — Render a small safe subset of Markdown into semantic HTML.
107
+ - [Prompt Input](components/prompt-input.md) — Collect a question and submit it to a server-rendered response endpoint.
108
+ - [Prompt Suggestion](components/prompt-suggestion.md) — Choose a suggested prompt, edit it, then send it.
109
+ - [Text Shimmer](components/text-shimmer.md) — Indicate work in progress with a moving highlight across readable text.
110
+
111
+ ## Buttons
112
+
113
+ - [Button](components/button.md) — Trigger an action with a consistent hierarchy of visual emphasis.
114
+ - [Action Button](components/action-button.md) — Run a server action and report whether it succeeded, was refused or has an unknown result.
115
+ - [Button Group](components/button-group.md) — Keep related actions together while preserving each button’s own label and focus.
116
+ - [Close Button](components/close-button.md) — Give a dialog an icon-only close action with an accessible name.
117
+ - [Toggle Button](components/toggle-button.md) — Represent a persistent on or off state with a pressed button.
118
+ - [Toggle Button Group](components/toggle-button-group.md) — Select one presentation mode from a connected set of controls.
119
+
120
+ ## Forms
121
+
122
+ - [Checkbox](components/checkbox.md) — Include an independent binary choice in a form.
123
+ - [Checkbox Group](components/checkbox-group.md) — Group related independent choices with a fieldset and legend.
124
+ - [Description](components/description.md) — Connect persistent help text to a control.
125
+ - [Error Message](components/error-message.md) — Present a form-level failure where the user can act on it.
126
+ - [Field Error](components/field-error.md) — Associate a validation error with the field that needs attention.
127
+ - [Fieldset](components/fieldset.md) — Add a shared label to a related set of form controls.
128
+ - [Form](components/form.md) — Submit native fields to the server and render an HTML response in place.
129
+ - [Input](components/input.md) — A styled native input with browser validation and autocomplete.
130
+ - [Input Group](components/input-group.md) — Combine a control and contextual prefix with a single outline.
131
+ - [Input OTP](components/input-otp.md) — Collect a six-digit code in one input with mobile autofill.
132
+ - [Label](components/label.md) — Name an input and expand its activation area.
133
+ - [Number Field](components/number-field.md) — Set numeric bounds and increments for a native field.
134
+ - [Radio Group](components/radio-group.md) — Choose exactly one option from a labeled set.
135
+ - [Search Field](components/search-field.md) — Use a native search field with the platform’s clear affordance.
136
+ - [Text Area](components/text-area.md) — Let users edit multiple lines of text with an optional autosizing surface.
137
+ - [Text Field](components/text-field.md) — Compose a label, input, and hint into a reusable form field.
138
+
139
+ ## Date and time
140
+
141
+ - [Calendar](components/calendar.md) — Navigate months and choose a day on an inline calendar rendered by the server.
142
+ - [Date Field](components/date-field.md) — Enter a calendar date in the system’s preferred format.
143
+ - [Date Picker](components/date-picker.md) — Choose a date with the browser’s calendar picker and native constraints.
144
+ - [Date Range Picker](components/date-range-picker.md) — Collect the start and end dates of a range.
145
+ - [Range Calendar](components/range-calendar.md) — Build a range with two native calendar controls.
146
+ - [Time Field](components/time-field.md) — Choose a wall-clock time without a timezone conversion.
147
+
148
+ ## Navigation
149
+
150
+ - [Accordion](components/accordion.md) — Disclose one section at a time using grouped native details.
151
+ - [Breadcrumbs](components/breadcrumbs.md) — Show the user’s current location and its parent pages.
152
+ - [Disclosure](components/disclosure.md) — Reveal a single block of supplementary information.
153
+ - [Disclosure Group](components/disclosure-group.md) — Present a collection of independently expandable sections.
154
+ - [Link](components/link.md) — Navigate to a real URL with native link semantics.
155
+ - [Pagination](components/pagination.md) — Navigate between result pages with server-rendered fragments.
156
+ - [Tabs](components/tabs.md) — Switch between labeled panels with mouse or arrow keys.
157
+
158
+ ## Overlays
159
+
160
+ - [Alert Dialog](components/alert-dialog.md) — Ask for confirmation on a decision that calls for attention.
161
+ - [Typed Confirmation](components/typed-confirmation.md) — Require an exact phrase before submitting a destructive action.
162
+ - [Drawer](components/drawer.md) — Open a full-height edge panel for work that benefits from more room.
163
+ - [Modal](components/modal.md) — Open a centered, named dialog with native focus containment.
164
+ - [Command Menu](components/command-menu.md) — Press Cmd or Ctrl K to search pages and actions returned by your server.
165
+ - [Popover](components/popover.md) — Display contextual information using the browser’s top layer.
166
+ - [Sheet](components/sheet.md) — Present concise secondary content from the bottom edge.
167
+ - [Toast](components/toast.md) — Announce a completed action without interrupting the current task.
168
+ - [Tooltip](components/tooltip.md) — Show a brief hint on pointer hover or keyboard focus.
169
+
170
+ ## Collections
171
+
172
+ - [Dropdown](components/dropdown.md) — Open a compact list of actions or destinations.
173
+ - [Menu Button](components/menu-button.md) — Open row actions and move through them with the arrow keys.
174
+ - [List Box](components/list-box.md) — Present a selectable collection with arrow-key navigation.
175
+ - [Tag Group](components/tag-group.md) — Display a small, labeled collection of metadata tags.
176
+
177
+ ## Controls
178
+
179
+ - [Slider](components/slider.md) — Choose a value from a bounded range.
180
+ - [Switch](components/switch.md) — Toggle one setting with a checkbox-backed switch.
181
+
182
+ ## Feedback
183
+
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
+ - [Meter](components/meter.md) — Show a measurement between known bounds.
187
+ - [Live Progress](components/live-progress.md) — Follow a deployment through to its final status.
188
+ - [Progress Bar](components/progress-bar.md) — Report measurable progress toward completion.
189
+ - [Progress Circle](components/progress-circle.md) — Show a completion value in a compact circular display.
190
+ - [Skeleton](components/skeleton.md) — Reserve space for content while its HTML is loading.
191
+ - [Spinner](components/spinner.md) — Indicate that work is underway when the completion time is unknown.
192
+
193
+ ## Layout
194
+
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.
197
+ - [Separator](components/separator.md) — Separate related content sections using a semantic rule.
198
+ - [Surface](components/surface.md) — Give related content a tonal background with shared theme tokens.
199
+ - [Toolbar](components/toolbar.md) — Keep nearby actions aligned and grouped by purpose.
200
+
201
+ ## Media
202
+
203
+ - [Avatar](components/avatar.md) — Represent a person with initials and an accessible name.
204
+ - [Avatar Group](components/avatar-group.md) — Show a compact cluster of people associated with a workspace.
205
+
206
+ ## Pickers
207
+
208
+ - [Autocomplete](components/autocomplete.md) — Request matching options from the server as a user types.
209
+ - [Combo Box](components/combo-box.md) — Filter and select from suggestions already on the page.
210
+ - [Select](components/select.md) — Choose one of a fixed set of values using the platform’s picker.
211
+
212
+ ## Typography
213
+
214
+ - [Kbd](components/kbd.md) — Format a keyboard shortcut with native semantics.
215
+ - [Typography](components/typography.md) — Apply the type scale to semantic content.
216
+
217
+ ## Data display
218
+
219
+ - [Badge](components/badge.md) — Label a status using text and a semantic tone.
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.
222
+ - [Table](components/table.md) — Show comparable records in a native table with column headers.
223
+ - [Sortable Table](components/sortable-table.md) — Sort server-rendered rows from the column headers and open a row from anywhere in it.
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.
225
+
226
+ ## Colors
227
+
228
+ - [Color Area](components/color-area.md) — Open a browser-managed color surface and submit the selected color.
229
+ - [Color Field](components/color-field.md) — Enter a six-digit hex value directly in a text field.
230
+ - [Color Picker](components/color-picker.md) — Choose a color using the native picker UI.
231
+ - [Color Slider](components/color-slider.md) — Adjust a hue along the color spectrum.
232
+ - [Color Swatch](components/color-swatch.md) — Show a color with its human-readable label.
233
+
234
+ ## Utilities
235
+
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.
238
+
239
+ ## Composition
240
+
241
+ - [Join](components/join.md) — Connect related controls with a shared outline.
242
+ - [Menu](components/menu.md) — Group destinations with an active page and section labels.
243
+ - [Hero](components/hero.md) — Pair a product introduction with a single destination.
244
+ - [Footer](components/footer.md) — Close a workspace with a small group of navigation links.
245
+ - [Theme Controller](components/theme-controller.md) — Set a theme inside one section of a page.
246
+ - [Validator](components/validator.md) — Show a native field constraint and its correction.
247
+
248
+ ## Display utilities
249
+
250
+ - [Aura](components/aura.md) — Frame an interactive surface with a subtle moving highlight.
251
+ - [Countdown](components/countdown.md) — Show the time remaining until the next daily shipping cutoff.
252
+ - [Indicator](components/indicator.md) — Anchor a quantity to an icon or action.
253
+ - [Mask](components/mask.md) — Crop an image while keeping its alternative text.
254
+ - [Stack](components/stack.md) — Layer related previews while keeping the current item legible.
255
+ - [Status](components/status.md) — Show system status with a label and a visual marker.
256
+ - [Swap](components/swap.md) — Switch between two labels or icons on a native control.
257
+ - [Text Rotate](components/text-rotate.md) — Rotate through short messages with explicit playback controls.
258
+
259
+ ## Mockups
260
+
261
+ - [Browser Mockup](components/browser-mockup.md) — Present a site preview inside a compact browser frame.
262
+ - [Phone Mockup](components/phone-mockup.md) — Frame a mobile product screen.
263
+ - [Window Mockup](components/window-mockup.md) — Place a desktop tool inside a labelled window.
264
+ - [Code Mockup](components/code-mockup.md) — Present a terminal command and its output.
package/package.json CHANGED
@@ -1,6 +1,50 @@
1
1
  {
2
2
  "name": "@rubenlangeweg/mero-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.8.0",
4
+ "type": "module",
5
+ "description": "HTML components and HTMX patterns for server-rendered interfaces.",
6
+ "scripts": {
7
+ "start": "node server.mjs",
8
+ "demo:premium": "node examples/premium/server.mjs",
9
+ "dev": "node --watch server.mjs",
10
+ "test": "node --test --test-concurrency=2",
11
+ "audit:catalog": "node scripts/audit-catalog.mjs",
12
+ "prepack": "node scripts/pack-agent-docs.mjs",
13
+ "pack:ui": "npm pack --dry-run",
14
+ "banner": "node scripts/version-banner.mjs",
15
+ "version": "node scripts/version-banner.mjs && git add ui",
16
+ "build": "node scripts/build-assets.mjs && cf build",
17
+ "deploy": "npm run build && cf deploy --prebuilt"
18
+ },
19
+ "exports": {
20
+ "./charts": "./ui/insight-charts.mjs",
21
+ "./markdown": "./ui/insight-markdown.mjs",
22
+ "./ui/*": "./ui/*",
23
+ "./package.json": "./package.json"
24
+ },
25
+ "files": [
26
+ "ui",
27
+ "agent-docs",
28
+ "README.md",
29
+ "CHANGELOG.md"
30
+ ],
31
+ "engines": {
32
+ "node": ">=22"
33
+ },
34
+ "devDependencies": {
35
+ "@cloudflare/vite-plugin": "2.0.0-rc.2",
36
+ "axe-core": "^4.14.1",
37
+ "cf": "1.0.0-rc.2",
38
+ "playwright": "^1.65.1",
39
+ "vite": "8.3.8"
40
+ },
41
+ "homepage": "https://mero-ui.rubenlangeweg.com",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/rubenlangeweg/mero-ui.git"
45
+ },
46
+ "license": "MIT",
47
+ "publishConfig": {
48
+ "access": "public"
49
+ }
50
+ }